simple-circuit-engine 0.0.12 → 0.0.13
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/AGENTS.md +2 -1
- package/CLAUDE.md +2 -0
- package/dist/core/index.js +83 -73
- package/dist/core/setup.d.ts +8 -0
- package/dist/core/simulation/behaviors/arithmetic/AdderBehavior.d.ts +28 -0
- package/dist/core/simulation/behaviors/arithmetic/ArithmeticBehaviorMixin.d.ts +63 -0
- package/dist/core/simulation/behaviors/arithmetic/EightBitAdderBehavior.d.ts +51 -0
- package/dist/core/simulation/behaviors/arithmetic/EightBitOnesComplementBehavior.d.ts +29 -0
- package/dist/core/simulation/behaviors/arithmetic/HalfAdderBehavior.d.ts +22 -0
- package/dist/core/simulation/behaviors/arithmetic/index.d.ts +7 -0
- package/dist/core/simulation/behaviors/index.d.ts +4 -0
- package/dist/core/simulation/states/arithmetic/AdderState.d.ts +16 -0
- package/dist/core/simulation/states/arithmetic/ArithmeticState.d.ts +53 -0
- package/dist/core/simulation/states/arithmetic/EightBitAdderState.d.ts +25 -0
- package/dist/core/simulation/states/arithmetic/EightBitOnesComplementState.d.ts +18 -0
- package/dist/core/simulation/states/arithmetic/HalfAdderState.d.ts +16 -0
- package/dist/core/simulation/states/arithmetic/index.d.ts +7 -0
- package/dist/core/simulation/states/index.d.ts +5 -0
- package/dist/core/simulation/types.d.ts +1 -1
- package/dist/core/topology/Component.d.ts +2 -1
- package/dist/core/topology/types.d.ts +19 -5
- package/dist/{core-Bjta9Y7_.js → core-b6Q8w2sn.js} +1505 -652
- package/dist/core-b6Q8w2sn.js.map +1 -0
- package/dist/i18n/index.d.ts +882 -0
- package/dist/i18n/locales/en.json.d.ts +268 -0
- package/dist/i18n/locales/fr.json.d.ts +268 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +137 -120
- package/dist/scene/CircuitEngine.d.ts +13 -0
- package/dist/scene/index.d.ts +1 -1
- package/dist/scene/index.js +50 -45
- package/dist/scene/setup.d.ts +8 -0
- package/dist/scene/shared/AbstractCircuitController.d.ts +6 -0
- package/dist/scene/shared/components/arithmetic/AdderVisualFactory.d.ts +54 -0
- package/dist/scene/shared/components/arithmetic/EightBitAdderVisualFactory.d.ts +45 -0
- package/dist/scene/shared/components/arithmetic/EightBitOnesComplementVisualFactory.d.ts +63 -0
- package/dist/scene/shared/components/arithmetic/HalfAdderVisualFactory.d.ts +55 -0
- package/dist/scene/shared/components/arithmetic/index.d.ts +4 -0
- package/dist/scene/shared/components/index.d.ts +4 -0
- package/dist/scene/shared/types.d.ts +0 -2
- package/dist/scene/shared/utils/GeometryUtils.d.ts +76 -0
- package/dist/scene/static/CircuitController.d.ts +1 -0
- package/dist/scene/static/PinTooltipWidget.d.ts +5 -0
- package/dist/scene/static/tools/BuildTool.d.ts +4 -0
- package/dist/scene/static/tools/ComponentPickerWidget.d.ts +7 -0
- package/dist/scene/static/tools/ConfigPanelWidget.d.ts +14 -0
- package/dist/{scene-CVsDdySt.js → scene-D4QcWeiq.js} +2487 -1099
- package/dist/scene-D4QcWeiq.js.map +1 -0
- package/package.json +14 -9
- package/dist/core-Bjta9Y7_.js.map +0 -1
- package/dist/scene-CVsDdySt.js.map +0 -1
|
@@ -50,27 +50,37 @@ export declare enum ENodeType {
|
|
|
50
50
|
*/
|
|
51
51
|
BranchingPoint = "BranchingPoint"
|
|
52
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Metadata describing a logic pin's interface data.
|
|
55
|
+
*
|
|
56
|
+
* @property interface - name of the pin's interface (one interface combine several pins in the case of numeric inputs/outpus)
|
|
57
|
+
* @property index - index of the pin within the interface (starts at 0 by convention)
|
|
58
|
+
*/
|
|
59
|
+
export interface ILogicPinMetadata {
|
|
60
|
+
readonly interface: string;
|
|
61
|
+
readonly index: number;
|
|
62
|
+
}
|
|
53
63
|
/**
|
|
54
64
|
* Metadata describing a component pin's source type and subtype.
|
|
55
65
|
*
|
|
56
|
-
* @property sourceType - Voltage/Current source or undefined for passive pins
|
|
57
66
|
* @property subtype - Pin role classification: 'free', 'vcc', 'logicInput', 'logicOutput'
|
|
67
|
+
* @property logicPinData - only for pins of subtype 'logicInput' and 'logicOutput' (MANDATORY in these cases): their logic pin metadata (interface/index)
|
|
68
|
+
* @property sourceType - Voltage/Current source or undefined for passive pins
|
|
58
69
|
*/
|
|
59
70
|
export interface IPinMetadata {
|
|
60
71
|
readonly subtype: string;
|
|
61
|
-
readonly
|
|
72
|
+
readonly logicPinData?: ILogicPinMetadata;
|
|
73
|
+
readonly sourceType?: ENodeSourceType;
|
|
62
74
|
}
|
|
63
75
|
/**
|
|
64
76
|
* Metadata for a component type.
|
|
65
77
|
*
|
|
66
78
|
* @property id - Unique string identifier matching the enum value
|
|
67
|
-
* @property name - Human-readable display name
|
|
68
79
|
* @property pins - Array of pin labels (order-significant)
|
|
69
80
|
* @property config - Default configuration parameters (depends on the component, e.g., initialState, activationLogic, color...)
|
|
70
81
|
*/
|
|
71
82
|
export interface IComponentTypeMetadata {
|
|
72
83
|
readonly id: string;
|
|
73
|
-
readonly name: string;
|
|
74
84
|
readonly pins: Map<string, IPinMetadata>;
|
|
75
85
|
readonly config: Map<string, string>;
|
|
76
86
|
}
|
|
@@ -163,7 +173,11 @@ export declare enum ComponentType {
|
|
|
163
173
|
Nor8Gate = "nor8Gate",
|
|
164
174
|
XorGate = "xorGate",
|
|
165
175
|
Xor4Gate = "xor4Gate",
|
|
166
|
-
Xor8Gate = "xor8Gate"
|
|
176
|
+
Xor8Gate = "xor8Gate",
|
|
177
|
+
HalfAdder = "halfAdder",
|
|
178
|
+
Adder = "adder",
|
|
179
|
+
EightBitAdder = "eightBitAdder",
|
|
180
|
+
EightBitOnesComplement = "eightBitOnesComplement"
|
|
167
181
|
}
|
|
168
182
|
/**
|
|
169
183
|
* Component type metadata lookup table.
|