@tscircuit/props 0.0.715 → 0.0.717
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -0
- package/dist/index.d.ts +7297 -2879
- package/dist/index.js +1609 -1520
- package/dist/index.js.map +1 -1
- package/lib/assembly/face-mounting.ts +73 -0
- package/lib/assembly/fastener.ts +8 -11
- package/lib/assembly/index.ts +9 -1
- package/lib/assembly/motor.ts +10 -36
- package/lib/assembly/part.ts +18 -3
- package/lib/assembly/printedpart.ts +8 -34
- package/lib/assembly/subassembly.ts +8 -1
- package/lib/components/system-block-component.ts +35 -0
- package/lib/components/system-block-connection.ts +35 -0
- package/lib/components/system-block-group.ts +34 -0
- package/lib/components/system-block-page.ts +29 -0
- package/lib/index.ts +1 -0
- package/lib/systemblock/index.ts +18 -0
- package/lib/systemblock/pcb-reference.ts +39 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,6 +18,9 @@ resistorProps.parse({ resistance: "10k" } as ResistorPropsInput);
|
|
|
18
18
|
|
|
19
19
|
Assembly drawing props: [`<assembly.drawing.page>` and `<assembly.drawing.partview>`](docs/assembly-drawings.md).
|
|
20
20
|
|
|
21
|
+
See [System block diagrams](docs/system-blocks.md) for the proposed `systemblock`
|
|
22
|
+
namespace, PCB references, and a complete overview example.
|
|
23
|
+
|
|
21
24
|
<!-- COMPONENT_TABLE_START -->
|
|
22
25
|
|
|
23
26
|
## Available Components
|
|
@@ -131,6 +134,10 @@ Assembly drawing props: [`<assembly.drawing.page>` and `<assembly.drawing.partvi
|
|
|
131
134
|
| `<subpanel />` | [`SubpanelProps`](#subpanelprops-subpanel) |
|
|
132
135
|
| `<switch />` | [`SwitchProps`](#switchprops-switch) |
|
|
133
136
|
| `<symbol />` | [`SymbolProps`](#symbolprops-symbol) |
|
|
137
|
+
| `<systemblock.component />` | [`SystemBlockComponentProps`](#systemblockcomponentprops-systemblockcomponent) |
|
|
138
|
+
| `<systemblock.connection />` | [`SystemBlockConnectionProps`](#systemblockconnectionprops-systemblockconnection) |
|
|
139
|
+
| `<systemblock.group />` | [`SystemBlockGroupProps`](#systemblockgroupprops-systemblockgroup) |
|
|
140
|
+
| `<systemblock.page />` | [`SystemBlockPageProps`](#systemblockpageprops-systemblockpage) |
|
|
134
141
|
| `<testpoint />` | [`TestpointProps`](#testpointprops-testpoint) |
|
|
135
142
|
| `<toolingrail />` | [`ToolingrailProps`](#toolingrailprops-toolingrail) |
|
|
136
143
|
| `<trace />` | [`TraceProps`](#traceprops-trace) |
|
|
@@ -2577,6 +2584,86 @@ export interface SymbolProps {
|
|
|
2577
2584
|
|
|
2578
2585
|
[Source](https://github.com/tscircuit/props/blob/main/lib/components/symbol.ts)
|
|
2579
2586
|
|
|
2587
|
+
<a id="systemblockcomponentprops-systemblockcomponent"></a>
|
|
2588
|
+
|
|
2589
|
+
### SystemBlockComponentProps `<systemblock.component />`
|
|
2590
|
+
|
|
2591
|
+
```ts
|
|
2592
|
+
export interface SystemBlockComponentProps extends SystemBlockPcbReferenceProps {
|
|
2593
|
+
/** Stable block identity, unique across its page; trimmed and nonempty. */
|
|
2594
|
+
name: string;
|
|
2595
|
+
/** Human-facing title; consumers fall back to name when omitted. */
|
|
2596
|
+
displayName?: string;
|
|
2597
|
+
/** Plain-text explanation of what the block does. */
|
|
2598
|
+
description?: string;
|
|
2599
|
+
}
|
|
2600
|
+
```
|
|
2601
|
+
|
|
2602
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/system-block-component.ts)
|
|
2603
|
+
|
|
2604
|
+
<a id="systemblockconnectionprops-systemblockconnection"></a>
|
|
2605
|
+
|
|
2606
|
+
### SystemBlockConnectionProps `<systemblock.connection />`
|
|
2607
|
+
|
|
2608
|
+
```ts
|
|
2609
|
+
export interface SystemBlockConnectionProps {
|
|
2610
|
+
/** Optional stable connection identity, unique within its page when supplied. */
|
|
2611
|
+
name?: string;
|
|
2612
|
+
/** Component name within the containing page, including inside nested groups. */
|
|
2613
|
+
from: string;
|
|
2614
|
+
/** Component name within the same page; group names and pin selectors are not endpoints. */
|
|
2615
|
+
to: string;
|
|
2616
|
+
/** Interface annotation such as I2C, SPI, or 3.3 V; not the connection's identity. */
|
|
2617
|
+
label?: string;
|
|
2618
|
+
/** Relationship category; defaults to signal. */
|
|
2619
|
+
kind?: "signal" | "power";
|
|
2620
|
+
/** Arrowheads: from → to, both ends, or neither. Defaults to forward. */
|
|
2621
|
+
direction?: "forward" | "both" | "none";
|
|
2622
|
+
}
|
|
2623
|
+
```
|
|
2624
|
+
|
|
2625
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/system-block-connection.ts)
|
|
2626
|
+
|
|
2627
|
+
<a id="systemblockgroupprops-systemblockgroup"></a>
|
|
2628
|
+
|
|
2629
|
+
### SystemBlockGroupProps `<systemblock.group />`
|
|
2630
|
+
|
|
2631
|
+
```ts
|
|
2632
|
+
export interface SystemBlockGroupProps extends SystemBlockPcbReferenceProps {
|
|
2633
|
+
/** Stable group identity, unique across its page; trimmed and nonempty. */
|
|
2634
|
+
name: string;
|
|
2635
|
+
/** Human-facing title; consumers fall back to name when omitted. */
|
|
2636
|
+
displayName?: string;
|
|
2637
|
+
/** Plain-text explanation of the subsystem's responsibility. */
|
|
2638
|
+
description?: string;
|
|
2639
|
+
/** Preserved unchanged; grouping does not create electrical connectivity. */
|
|
2640
|
+
children?: ReactNode;
|
|
2641
|
+
}
|
|
2642
|
+
```
|
|
2643
|
+
|
|
2644
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/system-block-group.ts)
|
|
2645
|
+
|
|
2646
|
+
<a id="systemblockpageprops-systemblockpage"></a>
|
|
2647
|
+
|
|
2648
|
+
### SystemBlockPageProps `<systemblock.page />`
|
|
2649
|
+
|
|
2650
|
+
```ts
|
|
2651
|
+
export interface SystemBlockPageProps {
|
|
2652
|
+
/** Stable page identity, unique within the circuit; trimmed and nonempty. */
|
|
2653
|
+
name: string;
|
|
2654
|
+
/** Human-facing title; consumers fall back to name when omitted. */
|
|
2655
|
+
displayName?: string;
|
|
2656
|
+
/** Plain-text explanation of the system's purpose. */
|
|
2657
|
+
description?: string;
|
|
2658
|
+
/** Preferred automatic layout direction; defaults to right. */
|
|
2659
|
+
direction?: "right" | "left" | "down" | "up";
|
|
2660
|
+
/** System blocks, nested groups, and connections; preserved unchanged. */
|
|
2661
|
+
children?: ReactNode;
|
|
2662
|
+
}
|
|
2663
|
+
```
|
|
2664
|
+
|
|
2665
|
+
[Source](https://github.com/tscircuit/props/blob/main/lib/components/system-block-page.ts)
|
|
2666
|
+
|
|
2580
2667
|
### TestpointProps `<testpoint />`
|
|
2581
2668
|
|
|
2582
2669
|
```ts
|