@2112-lab/central-plant 0.1.91 → 0.1.92

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.
@@ -389,8 +389,7 @@ var ComponentDragManager = /*#__PURE__*/function (_BaseDisposable) {
389
389
  // ioConfig can use either 'states' (preferred) or legacy 'dataPoints' as the array key
390
390
  dataPoints: ((_deviceData$ioConfig = deviceData.ioConfig) === null || _deviceData$ioConfig === void 0 ? void 0 : _deviceData$ioConfig.states) || ((_deviceData$ioConfig2 = deviceData.ioConfig) === null || _deviceData$ioConfig2 === void 0 ? void 0 : _deviceData$ioConfig2.dataPoints) || [],
391
391
  // Device-level I/O direction: 'input' means the user can write state via the tooltip
392
- ioDirection: ((_deviceData$ioConfig3 = deviceData.ioConfig) === null || _deviceData$ioConfig3 === void 0 ? void 0 : _deviceData$ioConfig3.direction) || 'output',
393
- signalOutputs: attachment.signalOutputs || []
392
+ ioDirection: ((_deviceData$ioConfig3 = deviceData.ioConfig) === null || _deviceData$ioConfig3 === void 0 ? void 0 : _deviceData$ioConfig3.direction) || 'output'
394
393
  };
395
394
  if ((_attachment$attachmen = attachment.attachmentPoint) !== null && _attachment$attachmen !== void 0 && _attachment$attachmen.position) {
396
395
  pos = attachment.attachmentPoint.position;
@@ -115,9 +115,7 @@ function _attachIODevicesToComponent() {
115
115
  // ioConfig can use either 'states' (preferred) or legacy 'dataPoints' as the array key
116
116
  dataPoints: ((_deviceData$ioConfig = deviceData.ioConfig) === null || _deviceData$ioConfig === void 0 ? void 0 : _deviceData$ioConfig.states) || ((_deviceData$ioConfig2 = deviceData.ioConfig) === null || _deviceData$ioConfig2 === void 0 ? void 0 : _deviceData$ioConfig2.dataPoints) || [],
117
117
  // Device-level I/O direction: 'input' means the user can write state via the tooltip
118
- ioDirection: ((_deviceData$ioConfig3 = deviceData.ioConfig) === null || _deviceData$ioConfig3 === void 0 ? void 0 : _deviceData$ioConfig3.direction) || 'output',
119
- // Signal wiring sourced from this attachment (for state propagation reference)
120
- signalOutputs: attachment.signalOutputs || []
118
+ ioDirection: ((_deviceData$ioConfig3 = deviceData.ioConfig) === null || _deviceData$ioConfig3 === void 0 ? void 0 : _deviceData$ioConfig3.direction) || 'output'
121
119
  };
122
120
 
123
121
  // Position at the attachment point
package/dist/index.d.ts CHANGED
@@ -5,7 +5,65 @@
5
5
  * organized by their functional categories.
6
6
  */
7
7
 
8
- // Core utilities
8
+ // ─── I/O Device types ────────────────────────────────────────────────────────
9
+
10
+ export interface IoDeviceState {
11
+ id: string
12
+ name: string
13
+ defaultValue: any
14
+ stateType: 'binary' | 'number' | 'enum' | 'float' | 'string'
15
+ stateConfig?: Record<string, any>
16
+ }
17
+
18
+ export interface IoDeviceConfig {
19
+ direction: 'input' | 'output'
20
+ states: IoDeviceState[]
21
+ }
22
+
23
+ export interface IoDeviceAsset {
24
+ uuid: string
25
+ name: string
26
+ assetType: 'I/O Device'
27
+ ioConfig: IoDeviceConfig
28
+ }
29
+
30
+ export interface AttachmentDescriptor {
31
+ attachmentId: string
32
+ deviceId: string
33
+ attachmentLabel: string
34
+ attachmentPoint?: {
35
+ position: { x: number; y: number; z: number }
36
+ direction: { x: number; y: number; z: number }
37
+ }
38
+ }
39
+
40
+ export interface SmartComponentAsset {
41
+ uuid: string
42
+ name: string
43
+ isSmart: boolean
44
+ isS3Component: boolean
45
+ s3Path: string
46
+ attachedDevices: Record<string, {
47
+ deviceId: string
48
+ attachmentLabel: string
49
+ attachmentPoint: AttachmentDescriptor['attachmentPoint'] | null
50
+ attachedAt: string
51
+ }>
52
+ [key: string]: any
53
+ }
54
+
55
+ export interface IoDeviceUsageEntry {
56
+ componentId: string
57
+ componentName: string
58
+ }
59
+
60
+ export interface IAssetService {
61
+ createSmartComponent(options: { componentUuid: string; name?: string; attachments: AttachmentDescriptor[]; thumbnailBlob?: Blob }): Promise<SmartComponentAsset>
62
+ addComponentAttachment(options: { componentUuid: string; attachment: AttachmentDescriptor }): Promise<SmartComponentAsset>
63
+ removeComponentAttachment(options: { componentUuid: string; attachmentId: string }): Promise<SmartComponentAsset>
64
+ }
65
+
66
+ // ─── Re-exports ───────────────────────────────────────────────────────────────
9
67
  export { CentralPlant } from './core/centralPlant.js';
10
68
  export { DebugLogger, logger, transformLogger, pathfinderLogger, modelLogger } from './core/debugLogger.js';
11
69
  export { generateUuidFromName, getHardcodedUuid, findObjectByHardcodedUuid } from './core/nameUtils.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2112-lab/central-plant",
3
- "version": "0.1.91",
3
+ "version": "0.1.92",
4
4
  "description": "Utility modules for the Central Plant Application",
5
5
  "main": "dist/bundle/index.js",
6
6
  "module": "dist/esm/src/index.js",