Heinrich-XIAO/stno
This code defines a keyboard matrix hardware design featuring a 3-row by 8-column array of keys and diodes, connected to an XIAO_S3 microcontroller with traces linking keys, diodes, and columns.
Usage: To import and use the "@tsci/Heinrich-XIAO.stno" component: 1. Import the component: ```tsx import SomeComponent from "@tsci/Heinrich-XIAO.stno" ``` 2. Use the component within a board or circuit: ```tsx <board> <SomeComponent /> </board> ``` The component appears to be a keyboard matrix design utilizing a XIAO S3 microcontroller, keys, and diodes. It creates a 3x8 matrix keyboard layout with predefined row and column configurations. Key usage details: - Supports automatic key and diode placement - Uses XIAO S3 microcontroller for matrix management - Configurable row and column positions - Includes optional y-coordinate overrides for specific keys
- Version
- 0.0.7
- License
- unset
- Stars
- 3
dist/index.js
PCB
Schematic
import 'react';
import { createUseComponent } from '@tscircuit/core';
function _extends$1$1() { return _extends$1$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1$1.apply(null, arguments); }
const pinLabels$1$1 = {
"1": "pin1",
"2": "pin2"
};
const pinNames$1$1 = Object.values(pinLabels$1$1);
const KeyHotSocket$1 = props => {
return /*#__PURE__*/React.createElement("pushbutton", _extends$1$1({
layer: "bottom"
}, props, {
footprint: /*#__PURE__*/React.createElement("footprint", null, /*#__PURE__*/React.createElement("hole", {
pcbX: "3.1749999999999545mm",
pcbY: "-1.2699999999999818mm",
diameter: "2.9999939999999996mm"
}), /*#__PURE__*/React.createElement("hole", {
pcbX: "-3.1749999999999545mm",
pcbY: "1.2700000000000955mm",
diameter: "2.9999939999999996mm"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["2"],
pcbX: "6.724904000000038mm",
pcbY: "-1.2699999999999818mm",
width: "2.8999941999999996mm",
height: "2.4999949999999997mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["1"],
pcbX: "-6.724904000000038mm",
pcbY: "1.2699999999999818mm",
width: "2.8999941999999996mm",
height: "2.4999949999999997mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -5.461000000000013,
y: -0.4611370000000079
}, {
x: -5.461000000000013,
y: -2.9209999999999354
}, {
x: -5.461000000000013,
y: -2.9209999999999354
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 5.4500017999999955,
y: -2.950006799999869
}, {
x: -5.461000000000013,
y: -2.950006799999869
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 0.18298159999994823,
y: 1.0549889999999778
}, {
x: 5.450027199999909,
y: 1.0549889999999778
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 5.450027199999909,
y: 1.0549889999999778
}, {
x: 5.450027199999909,
y: 0.4611370000000079
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -2.944114000000127,
y: 2.9450030000000424
}, {
x: -5.461000000000013,
y: 2.9450030000000424
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -1.707006999999976,
y: 2.9450030000000424
}, {
x: -2.944114000000127,
y: 2.9450030000000424
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -1.707006999999976,
y: 2.9450030000000424
}, {
x: -1.460311886129034,
y: 2.9288336092640748
}, {
x: -1.2178378661753868,
y: 2.8806021044970294
}, {
x: -0.9837338087377248,
y: 2.801133754218995
}, {
x: -0.762005367588813,
y: 2.6917883071702136
}, {
x: -0.5564464426572613,
y: 2.5544367262343712
}, {
x: -0.37057426423848483,
y: 2.3914291751993915
}, {
x: -0.20756921118118044,
y: 2.2055548061152876
}, {
x: -0.07022039279377168,
y: 1.9999940353145576
}, {
x: 0.03912207440475868,
y: 1.7782641246765252
}, {
x: 0.11858727851722506,
y: 1.5441589992735771
}, {
x: 0.1668155246366041,
y: 1.301684331151364
}, {
x: 0.18298159999994823,
y: 1.0549889999999778
}]
})),
supplierPartNumbers: {
jlcpcb: ["C41430893"]
},
cadModel: {
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=c886ec2b42464573a88fc1f647577a49&pn=C5184526",
rotationOffset: {
x: 0,
y: 0,
z: 0
},
positionOffset: {
x: 0,
y: 0,
z: 0
}
},
pinLabels: pinLabels$1$1,
schPortArrangement: {
leftSide: {
direction: "top-to-bottom",
pins: [1]
},
rightSide: {
direction: "bottom-to-top",
pins: [2]
}
}
}));
};
createUseComponent(KeyHotSocket$1, pinNames$1$1);
function _extends$2$1() { return _extends$2$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2$1.apply(null, arguments); }
const pinLabels$2$1 = {
"1": "pin1",
"2": "pin2"
};
const pinNames$2 = Object.values(pinLabels$2$1);
const KeyShaftForHotSocket$1 = props => {
return /*#__PURE__*/React.createElement("chip", _extends$2$1({}, props, {
noSchematicRepresentation: true,
schWidth: 0.1,
schHeight: 0.1,
supplierPartNumbers: {
jlcpcb: ["C400227"]
},
footprint: /*#__PURE__*/React.createElement("footprint", null, /*#__PURE__*/React.createElement("hole", {
pcbX: "0.6349999999999909mm",
pcbY: "-3.1149987999999666mm",
diameter: "4.1999916mm"
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -7.165009800000007,
y: 4.685011000000031
}, {
x: 8.435009799999989,
y: 4.685011000000031
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -7.165009800000007,
y: -10.915008600000078
}, {
x: 8.435009799999989,
y: -10.915008600000078
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -7.165009800000007,
y: 4.685011000000031
}, {
x: -7.165009800000007,
y: -10.915008600000078
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 8.435009799999989,
y: 4.685011000000031
}, {
x: 8.435009799999989,
y: -10.915008600000078
}]
})),
cadModel: {
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=c00f29e7afb64c29bc388e168980ded2&pn=C400227",
rotationOffset: {
x: 0,
y: 0,
z: 90
},
positionOffset: {
x: 0,
y: 0,
z: 0
}
},
pinLabels: pinLabels$2$1,
schPinSpacing: 0.75,
schPortArrangement: {}
}));
};
createUseComponent(KeyShaftForHotSocket$1, pinNames$2);
function _extends$3() { return _extends$3 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$3.apply(null, arguments); }
const pinLabels$3 = {
pin1: ["C"],
pin2: ["A"]
};
const A_1N4148WS = props => {
return /*#__PURE__*/React.createElement("chip", _extends$3({
pinLabels: pinLabels$3,
symbolName: "diode",
supplierPartNumbers: {
jlcpcb: ["C57759"]
},
manufacturerPartNumber: "A_1N4148WS",
footprint: /*#__PURE__*/React.createElement("footprint", null, /*#__PURE__*/React.createElement("smtpad", {
portHints: ["pin1"],
pcbX: "-1.1725910000000113mm",
pcbY: "0mm",
width: "0.9999979999999999mm",
height: "0.7500112mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["pin2"],
pcbX: "1.1725910000000113mm",
pcbY: "0mm",
width: "0.9999979999999999mm",
height: "0.7500112mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 0.9012427999999773,
y: -0.726211400000011
}, {
x: 0.9012427999999773,
y: -0.5199887999999646
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 0.9012427999999773,
y: 0.726211400000011
}, {
x: 0.9012427999999773,
y: 0.5299964000000728
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -0.8512047999998913,
y: 0.726211400000011
}, {
x: 0.9012427999999773,
y: 0.726211400000011
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -0.8512047999998913,
y: -0.726211400000011
}, {
x: 0.9012427999999773,
y: -0.726211400000011
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -0.44676059999994777,
y: 0.726211400000011
}, {
x: -0.44676059999994777,
y: -0.726211400000011
}]
})),
cadModel: {
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=973acf8a660c48b1975f1ba1c890421a&pn=C57759",
rotationOffset: {
x: 0,
y: 0,
z: 0
},
positionOffset: {
x: 0,
y: 0,
z: 0
}
}
}, props));
};
function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
const pinLabels$1 = {
"1": "pin1",
"2": "pin2"
};
const pinNames$1 = Object.values(pinLabels$1);
const KeyHotSocket = props => {
return /*#__PURE__*/React.createElement("pushbutton", _extends$1({
layer: "bottom"
}, props, {
footprint: /*#__PURE__*/React.createElement("footprint", null, /*#__PURE__*/React.createElement("hole", {
pcbX: "3.1749999999999545mm",
pcbY: "-1.2699999999999818mm",
diameter: "2.9999939999999996mm"
}), /*#__PURE__*/React.createElement("hole", {
pcbX: "-3.1749999999999545mm",
pcbY: "1.2700000000000955mm",
diameter: "2.9999939999999996mm"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["2"],
pcbX: "6.724904000000038mm",
pcbY: "-1.2699999999999818mm",
width: "2.8999941999999996mm",
height: "2.4999949999999997mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["1"],
pcbX: "-6.724904000000038mm",
pcbY: "1.2699999999999818mm",
width: "2.8999941999999996mm",
height: "2.4999949999999997mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -5.461000000000013,
y: -0.4611370000000079
}, {
x: -5.461000000000013,
y: -2.9209999999999354
}, {
x: -5.461000000000013,
y: -2.9209999999999354
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 5.4500017999999955,
y: -2.950006799999869
}, {
x: -5.461000000000013,
y: -2.950006799999869
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 0.18298159999994823,
y: 1.0549889999999778
}, {
x: 5.450027199999909,
y: 1.0549889999999778
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 5.450027199999909,
y: 1.0549889999999778
}, {
x: 5.450027199999909,
y: 0.4611370000000079
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -2.944114000000127,
y: 2.9450030000000424
}, {
x: -5.461000000000013,
y: 2.9450030000000424
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -1.707006999999976,
y: 2.9450030000000424
}, {
x: -2.944114000000127,
y: 2.9450030000000424
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -1.707006999999976,
y: 2.9450030000000424
}, {
x: -1.460311886129034,
y: 2.9288336092640748
}, {
x: -1.2178378661753868,
y: 2.8806021044970294
}, {
x: -0.9837338087377248,
y: 2.801133754218995
}, {
x: -0.762005367588813,
y: 2.6917883071702136
}, {
x: -0.5564464426572613,
y: 2.5544367262343712
}, {
x: -0.37057426423848483,
y: 2.3914291751993915
}, {
x: -0.20756921118118044,
y: 2.2055548061152876
}, {
x: -0.07022039279377168,
y: 1.9999940353145576
}, {
x: 0.03912207440475868,
y: 1.7782641246765252
}, {
x: 0.11858727851722506,
y: 1.5441589992735771
}, {
x: 0.1668155246366041,
y: 1.301684331151364
}, {
x: 0.18298159999994823,
y: 1.0549889999999778
}]
})),
supplierPartNumbers: {
jlcpcb: ["C41430893"]
},
cadModel: {
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=c886ec2b42464573a88fc1f647577a49&pn=C5184526",
rotationOffset: {
x: 0,
y: 0,
z: 0
},
positionOffset: {
x: 0,
y: 0,
z: 0
}
},
pinLabels: pinLabels$1,
schPortArrangement: {
leftSide: {
direction: "top-to-bottom",
pins: [1]
},
rightSide: {
direction: "bottom-to-top",
pins: [2]
}
}
}));
};
createUseComponent(KeyHotSocket, pinNames$1);
function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
const pinLabels$2 = {
"1": "pin1",
"2": "pin2"
};
const pinNames = Object.values(pinLabels$2);
const KeyShaftForHotSocket = props => {
return /*#__PURE__*/React.createElement("chip", _extends$2({}, props, {
noSchematicRepresentation: true,
schWidth: 0.1,
schHeight: 0.1,
supplierPartNumbers: {
jlcpcb: ["C400227"]
},
footprint: /*#__PURE__*/React.createElement("footprint", null, /*#__PURE__*/React.createElement("hole", {
pcbX: "0.6349999999999909mm",
pcbY: "-3.1149987999999666mm",
diameter: "4.1999916mm"
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -7.165009800000007,
y: 4.685011000000031
}, {
x: 8.435009799999989,
y: 4.685011000000031
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -7.165009800000007,
y: -10.915008600000078
}, {
x: 8.435009799999989,
y: -10.915008600000078
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -7.165009800000007,
y: 4.685011000000031
}, {
x: -7.165009800000007,
y: -10.915008600000078
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 8.435009799999989,
y: 4.685011000000031
}, {
x: 8.435009799999989,
y: -10.915008600000078
}]
})),
cadModel: {
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=c00f29e7afb64c29bc388e168980ded2&pn=C400227",
rotationOffset: {
x: 0,
y: 0,
z: 90
},
positionOffset: {
x: 0,
y: 0,
z: 0
}
},
pinLabels: pinLabels$2,
schPinSpacing: 0.75,
schPortArrangement: {}
}));
};
createUseComponent(KeyShaftForHotSocket, pinNames);
const Key = props => {
return /*#__PURE__*/React.createElement("group", {
pcbX: props.pcbX,
pcbY: props.pcbY,
schX: props.schX,
schY: props.schY
}, /*#__PURE__*/React.createElement(KeyHotSocket, {
name: props.name,
connections: props.connections
}), /*#__PURE__*/React.createElement(KeyShaftForHotSocket, {
name: `${props.name}_shaft`,
pcbX: 0,
pcbY: -0.52
}), /*#__PURE__*/React.createElement("footprint", null, /*#__PURE__*/React.createElement("silkscreentext", {
text: props.name,
pcbY: 5
})));
};
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
const pinLabels = {
pin1: ["D0"],
pin2: ["D1"],
pin3: ["D2"],
pin4: ["D3"],
pin5: ["D4"],
pin6: ["D5"],
pin7: ["D6"],
pin8: ["D7"],
pin9: ["D8"],
pin10: ["D9"],
pin11: ["D10"],
pin12: ["VCC"],
pin13: ["GND"],
pin14: ["VUSB"],
pin15: ["BATPLUS"],
pin16: ["BATMINUS"],
pin17: ["MTDI"],
pin18: ["MTDO"],
pin19: ["EN"],
pin20: ["GND2"],
pin21: ["MTMS"],
pin22: ["MTCK"],
pin23: ["DPLUS"],
pin24: ["DMINUS"],
pin25: ["THERMAL"]
};
const xiaoFootprint = /*#__PURE__*/React.createElement("footprint", null, /*#__PURE__*/React.createElement("silkscreentext", {
text: "XIAO S3",
fontSize: "1mm",
pcbX: 2,
pcbY: -6
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["1"],
pcbX: "-8.061364mm",
pcbY: "7.573mm",
width: "2.75mm",
height: "2mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["2"],
pcbX: "-8.061364mm",
pcbY: "5.033mm",
width: "2.75mm",
height: "2mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["3"],
pcbX: "-8.061364mm",
pcbY: "2.493mm",
width: "2.75mm",
height: "2mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["4"],
pcbX: "-8.061364mm",
pcbY: "-0.047mm",
width: "2.75mm",
height: "2mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["5"],
pcbX: "-8.061364mm",
pcbY: "-2.587mm",
width: "2.75mm",
height: "2mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["6"],
pcbX: "-8.061364mm",
pcbY: "-5.127mm",
width: "2.75mm",
height: "2mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["7"],
pcbX: "-8.061364mm",
pcbY: "-7.667mm",
width: "2.75mm",
height: "2mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["8"],
pcbX: "8.103636mm",
pcbY: "-7.667mm",
width: "2.75mm",
height: "2mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["9"],
pcbX: "8.103636mm",
pcbY: "-5.127mm",
width: "2.75mm",
height: "2mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["10"],
pcbX: "8.103636mm",
pcbY: "-2.587mm",
width: "2.75mm",
height: "2mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["11"],
pcbX: "8.103636mm",
pcbY: "-0.047mm",
width: "2.75mm",
height: "2mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["12"],
pcbX: "8.103636mm",
pcbY: "2.493mm",
width: "2.75mm",
height: "2mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["13"],
pcbX: "8.103636mm",
pcbY: "5.033mm",
width: "2.75mm",
height: "2mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["14"],
pcbX: "8.103636mm",
pcbY: "7.573mm",
width: "2.75mm",
height: "2mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["15"],
pcbX: "-4.451364mm",
pcbY: "0.335mm",
width: "2mm",
height: "1.1mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["16"],
pcbX: "-4.451364mm",
pcbY: "2.24mm",
width: "2mm",
height: "1.1mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["17"],
pcbX: "-1.276364mm",
pcbY: "8.585mm",
radius: "0.8mm",
shape: "circle"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["18"],
pcbX: "1.263636mm",
pcbY: "8.585mm",
radius: "0.8mm",
shape: "circle"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["19"],
pcbX: "-1.276364mm",
pcbY: "6.045mm",
radius: "0.8mm",
shape: "circle"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["20"],
pcbX: "1.263636mm",
pcbY: "6.045mm",
radius: "0.8mm",
shape: "circle"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["21"],
pcbX: "-1.276364mm",
pcbY: "3.505mm",
radius: "0.8mm",
shape: "circle"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["22"],
pcbX: "1.263636mm",
pcbY: "3.505mm",
radius: "0.8mm",
shape: "circle"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["23"],
pcbX: "-1.276364mm",
pcbY: "0.965mm",
radius: "0.8mm",
shape: "circle"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["24"],
pcbX: "1.263636mm",
pcbY: "0.965mm",
radius: "0.8mm",
shape: "circle"
}), /*#__PURE__*/React.createElement("smtpad", {
portHints: ["25"],
pcbX: "1.5mm",
pcbY: "-2.5mm",
width: "3mm",
height: "3mm",
shape: "rect"
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -8.896364,
y: -8.56
}, {
x: -8.896364,
y: 8.585
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -6.991364,
y: -10.465
}, {
x: 6.978636,
y: -10.465
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -4.501364,
y: 10.49
}, {
x: -4.497636,
y: 11.500272
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -3.997636,
y: 12
}, {
x: 3.997636,
y: 12
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 4.497636,
y: 11.5
}, {
x: 4.497636,
y: 10.49
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 6.978636,
y: 10.49
}, {
x: -6.991364,
y: 10.49
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 8.883636,
y: -8.56
}, {
x: 8.883636,
y: 8.585
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -8.896364,
y: 8.589
}, {
x: -8.641141964987211,
y: 9.541499698293817
}, {
x: -7.943863698293818,
y: 10.23877796498721
}, {
x: -6.991364,
y: 10.494
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -6.991364,
y: -10.465
}, {
x: -7.943863698293818,
y: -10.209777964987211
}, {
x: -8.64114196498721,
y: -9.512499698293817
}, {
x: -8.896363999999997,
y: -8.56
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: -4.497636,
y: 11.500272
}, {
x: -3.997636,
y: 12
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 3.997636,
y: 12
}, {
x: 4.497636,
y: 11.5
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 6.978636,
y: 10.49
}, {
x: 7.931135698293817,
y: 10.23477796498721
}, {
x: 8.62841396498721,
y: 9.537499698293818
}, {
x: 8.883636,
y: 8.585
}]
}), /*#__PURE__*/React.createElement("silkscreenpath", {
route: [{
x: 8.883636,
y: -8.56
}, {
x: 8.62841396498721,
y: -9.512499698293817
}, {
x: 7.931135698293818,
y: -10.209777964987211
}, {
x: 6.978636,
y: -10.465
}]
}));
const XIAO_S3 = props => {
return /*#__PURE__*/React.createElement("chip", _extends({}, props, {
footprint: xiaoFootprint,
pinLabels: pinLabels
}));
};
const useXIAO_S3 = createUseComponent(XIAO_S3, pinLabels);
var index = () => {
const U1 = useXIAO_S3("U1");
// keep all positions exactly as before, except last two of ROW2 moved up
const rows = [{
name: "ROW0",
y: 5,
x: [-100, -80, -60, -40, -20, 40, 60, 80],
yOverrides: {
4: -15
}
}, {
name: "ROW1",
y: -15,
x: [-100, -80, -60, -40, 20, 40, 60, 80]
}, {
name: "ROW2",
y: -45,
x: [-90, -70, -50, 50, 70, 90, 100, 100],
yOverrides: {
6: -15,
7: 5
} // move colIdx 4 & 5 keys upward by 10 units
}];
return /*#__PURE__*/React.createElement("board", null, /*#__PURE__*/React.createElement(U1, {
pcbY: 1
}), rows.map((row, rowIdx) => row.x.map((x, colIdx) => {
const keyIndex = rowIdx * 8 + colIdx + 1;
const keyName = `K${keyIndex}`;
const diodeName = `D${keyIndex}`;
// check if this key has a yOverride (only last two in row2)
const keyY = row.yOverrides?.[colIdx] ?? row.y;
return /*#__PURE__*/React.createElement(React.Fragment, {
key: keyName
}, /*#__PURE__*/React.createElement(Key, {
name: keyName,
footprint: "0402",
pcbX: x,
pcbY: keyY,
connections: {
pin2: `net.COL${colIdx}`
}
}), /*#__PURE__*/React.createElement(A_1N4148WS, {
name: diodeName,
footprint: "0402",
pcbX: x,
pcbY: keyY - 12,
rotation: 90
}), /*#__PURE__*/React.createElement("trace", {
from: `net.ROW${rowIdx}`,
to: `.${diodeName} > .pin2`
}), /*#__PURE__*/React.createElement("trace", {
from: `.${keyName} > .pin1`,
to: `.${diodeName} > .pin1`
}));
})), /*#__PURE__*/React.createElement("trace", {
from: U1.D0,
to: "net.ROW0"
}), /*#__PURE__*/React.createElement("trace", {
from: U1.D1,
to: "net.ROW1"
}), /*#__PURE__*/React.createElement("trace", {
from: U1.D2,
to: "net.ROW2"
}), Array.from({
length: 8
}).map((_, idx) => /*#__PURE__*/React.createElement("trace", {
key: `col-trace-${idx}`,
from: U1[`D${idx + 3}`],
to: `net.COL${idx}`
})));
};
export { index as default };