@fugood/bricks-ctor 2.25.0-beta.8 → 2.25.0-beta.80

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.
Files changed (137) hide show
  1. package/package.json +4 -24
  2. package/tools/__tests__/legacy-forwarder.test.js +91 -0
  3. package/tools/_forward.ts +26 -0
  4. package/tools/deploy.ts +3 -164
  5. package/tools/mcp-server.ts +3 -27
  6. package/tools/postinstall.ts +3 -234
  7. package/tools/pull.ts +3 -121
  8. package/tools/push-config.ts +4 -0
  9. package/tools/simulator.ts +4 -0
  10. package/compile/__tests__/index.test.js +0 -115
  11. package/compile/action-name-map.ts +0 -1015
  12. package/compile/index.ts +0 -1458
  13. package/compile/util.ts +0 -358
  14. package/index.ts +0 -6
  15. package/skills/bricks-ctor/SKILL.md +0 -32
  16. package/skills/bricks-ctor/rules/animation.md +0 -160
  17. package/skills/bricks-ctor/rules/architecture-patterns.md +0 -69
  18. package/skills/bricks-ctor/rules/automations.md +0 -221
  19. package/skills/bricks-ctor/rules/buttress.md +0 -156
  20. package/skills/bricks-ctor/rules/data-calculation.md +0 -209
  21. package/skills/bricks-ctor/rules/local-sync.md +0 -129
  22. package/skills/bricks-ctor/rules/media-flow.md +0 -158
  23. package/skills/bricks-ctor/rules/remote-data-bank.md +0 -196
  24. package/skills/bricks-ctor/rules/standby-transition.md +0 -124
  25. package/skills/bricks-design/LICENSE.txt +0 -180
  26. package/skills/bricks-design/SKILL.md +0 -66
  27. package/skills/rive-marketplace/SKILL.md +0 -99
  28. package/tools/_git-author.ts +0 -29
  29. package/tools/_shell.ts +0 -173
  30. package/tools/icons/.gitattributes +0 -1
  31. package/tools/icons/fa6pro-glyphmap.json +0 -4686
  32. package/tools/icons/fa6pro-meta.json +0 -1
  33. package/tools/mcp-tools/compile.ts +0 -92
  34. package/tools/mcp-tools/huggingface.ts +0 -762
  35. package/tools/mcp-tools/icons.ts +0 -81
  36. package/tools/mcp-tools/lottie.ts +0 -102
  37. package/tools/mcp-tools/media.ts +0 -110
  38. package/tools/preview-main.mjs +0 -306
  39. package/tools/preview.ts +0 -150
  40. package/types/animation.ts +0 -111
  41. package/types/automation.ts +0 -235
  42. package/types/brick-base.ts +0 -80
  43. package/types/bricks/Camera.ts +0 -246
  44. package/types/bricks/Chart.ts +0 -372
  45. package/types/bricks/GenerativeMedia.ts +0 -290
  46. package/types/bricks/Icon.ts +0 -98
  47. package/types/bricks/Image.ts +0 -126
  48. package/types/bricks/Items.ts +0 -476
  49. package/types/bricks/Lottie.ts +0 -168
  50. package/types/bricks/Maps.ts +0 -262
  51. package/types/bricks/QrCode.ts +0 -117
  52. package/types/bricks/Rect.ts +0 -150
  53. package/types/bricks/RichText.ts +0 -128
  54. package/types/bricks/Rive.ts +0 -220
  55. package/types/bricks/Sketch.ts +0 -254
  56. package/types/bricks/Slideshow.ts +0 -201
  57. package/types/bricks/Svg.ts +0 -99
  58. package/types/bricks/Text.ts +0 -148
  59. package/types/bricks/TextInput.ts +0 -242
  60. package/types/bricks/Video.ts +0 -175
  61. package/types/bricks/VideoStreaming.ts +0 -112
  62. package/types/bricks/WebRtcStream.ts +0 -65
  63. package/types/bricks/WebView.ts +0 -168
  64. package/types/bricks/index.ts +0 -22
  65. package/types/canvas.ts +0 -82
  66. package/types/common.ts +0 -144
  67. package/types/data-calc-command.ts +0 -7005
  68. package/types/data-calc-script.ts +0 -21
  69. package/types/data-calc.ts +0 -11
  70. package/types/data.ts +0 -95
  71. package/types/generators/AlarmClock.ts +0 -110
  72. package/types/generators/Assistant.ts +0 -621
  73. package/types/generators/BleCentral.ts +0 -247
  74. package/types/generators/BlePeripheral.ts +0 -208
  75. package/types/generators/CanvasMap.ts +0 -74
  76. package/types/generators/CastlesPay.ts +0 -87
  77. package/types/generators/DataBank.ts +0 -160
  78. package/types/generators/File.ts +0 -432
  79. package/types/generators/GraphQl.ts +0 -132
  80. package/types/generators/Http.ts +0 -222
  81. package/types/generators/HttpServer.ts +0 -176
  82. package/types/generators/Information.ts +0 -103
  83. package/types/generators/Intent.ts +0 -168
  84. package/types/generators/Iterator.ts +0 -108
  85. package/types/generators/Keyboard.ts +0 -105
  86. package/types/generators/LlmAnthropicCompat.ts +0 -212
  87. package/types/generators/LlmAppleBuiltin.ts +0 -159
  88. package/types/generators/LlmGgml.ts +0 -861
  89. package/types/generators/LlmMediaTekNeuroPilot.ts +0 -235
  90. package/types/generators/LlmMlx.ts +0 -227
  91. package/types/generators/LlmOnnx.ts +0 -213
  92. package/types/generators/LlmOpenAiCompat.ts +0 -312
  93. package/types/generators/LlmQualcommAiEngine.ts +0 -247
  94. package/types/generators/Mcp.ts +0 -637
  95. package/types/generators/McpServer.ts +0 -289
  96. package/types/generators/MediaFlow.ts +0 -170
  97. package/types/generators/MqttBroker.ts +0 -141
  98. package/types/generators/MqttClient.ts +0 -141
  99. package/types/generators/Question.ts +0 -408
  100. package/types/generators/RealtimeTranscription.ts +0 -287
  101. package/types/generators/RerankerGgml.ts +0 -191
  102. package/types/generators/SerialPort.ts +0 -151
  103. package/types/generators/SoundPlayer.ts +0 -94
  104. package/types/generators/SoundRecorder.ts +0 -130
  105. package/types/generators/SpeechToTextGgml.ts +0 -419
  106. package/types/generators/SpeechToTextOnnx.ts +0 -236
  107. package/types/generators/SpeechToTextPlatform.ts +0 -85
  108. package/types/generators/SqLite.ts +0 -159
  109. package/types/generators/Step.ts +0 -107
  110. package/types/generators/SttAppleBuiltin.ts +0 -130
  111. package/types/generators/Tcp.ts +0 -126
  112. package/types/generators/TcpServer.ts +0 -147
  113. package/types/generators/TextToSpeechAppleBuiltin.ts +0 -127
  114. package/types/generators/TextToSpeechGgml.ts +0 -221
  115. package/types/generators/TextToSpeechOnnx.ts +0 -178
  116. package/types/generators/TextToSpeechOpenAiLike.ts +0 -121
  117. package/types/generators/ThermalPrinter.ts +0 -191
  118. package/types/generators/Tick.ts +0 -83
  119. package/types/generators/Udp.ts +0 -120
  120. package/types/generators/VadGgml.ts +0 -250
  121. package/types/generators/VadOnnx.ts +0 -231
  122. package/types/generators/VadTraditional.ts +0 -138
  123. package/types/generators/VectorStore.ts +0 -257
  124. package/types/generators/Watchdog.ts +0 -107
  125. package/types/generators/WebCrawler.ts +0 -103
  126. package/types/generators/WebRtc.ts +0 -181
  127. package/types/generators/WebSocket.ts +0 -148
  128. package/types/generators/index.ts +0 -57
  129. package/types/index.ts +0 -13
  130. package/types/subspace.ts +0 -60
  131. package/types/switch.ts +0 -51
  132. package/types/system.ts +0 -707
  133. package/utils/__tests__/id.test.js +0 -58
  134. package/utils/calc.ts +0 -126
  135. package/utils/data.ts +0 -497
  136. package/utils/event-props.ts +0 -886
  137. package/utils/id.ts +0 -80
@@ -1,107 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Trigger event with timeout by listening to specified events
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type {
8
- Brick,
9
- Generator,
10
- EventAction,
11
- ActionWithDataParams,
12
- ActionWithParams,
13
- Action,
14
- EventProperty,
15
- } from '../common'
16
- import type { TemplateEventPropsMap } from '../../utils/event-props'
17
-
18
- /* Reset watch */
19
- export type GeneratorWatchdogActionResetWatch = Action & {
20
- __actionName: 'GENERATOR_WATCHDOG_RESET_WATCH'
21
- }
22
-
23
- interface GeneratorWatchdogDef {
24
- /*
25
- Default property:
26
- {
27
- "listening": false,
28
- "timeout": 30000
29
- }
30
- */
31
- property?: {
32
- /* Start listening event */
33
- listening?: boolean | DataLink
34
- /* If no other events are fired after the specified event is fired, it times out and fires the Watchdog event. */
35
- timeout?: number | DataLink
36
- /* Reset timeout timer on properties change */
37
- resetTimeoutOnChange?: boolean | DataLink
38
- /* Set what brick id (allow mutiple) to listen for press */
39
- brickOnPress?: Array<string | DataLink> | DataLink
40
- /* Set what brick id (allow mutiple) to listen for focus */
41
- brickOnFocus?: Array<string | DataLink> | DataLink
42
- /* Set what brick id (allow mutiple) to listen for blur */
43
- brickOnBlur?: Array<string | DataLink> | DataLink
44
- /* Set what canvas id (allow mutiple) to listen for enter */
45
- canvasOnEnter?: Array<string | DataLink> | DataLink
46
- /* Set what canvas id (allow mutiple) to listen for exit */
47
- canvasOnExit?: Array<string | DataLink> | DataLink
48
- /* Set what Data id (allow mutiple) to listen for change */
49
- propertyBankOnChange?: Array<string | DataLink> | DataLink
50
- /* Set what Data id (allow mutiple) to listen for update */
51
- propertyBankOnUpdate?: Array<string | DataLink> | DataLink
52
- /* Set what Data id (allow mutiple) to listen for hit */
53
- propertyBankOnHit?: Array<string | DataLink> | DataLink
54
- /* Set what Data id (allow mutiple) to listen for hit */
55
- propertyBankOnNotHit?: Array<string | DataLink> | DataLink
56
- }
57
- events?: {
58
- /* Event on specific sender id trigger event */
59
- onEvent?: Array<EventAction<string & keyof TemplateEventPropsMap['Watchdog']['onEvent']>>
60
- /* Event on timeout */
61
- onTimeout?: Array<EventAction<string & keyof TemplateEventPropsMap['Watchdog']['onTimeout']>>
62
- }
63
- outlets?: {
64
- /* The last event */
65
- lastEvent?: () => Data<{
66
- id?: string
67
- type?: string
68
- triggerType?: string
69
- timeout?: number
70
- }>
71
- /* The type fo last event */
72
- lastEventType?: () => Data<string>
73
- /* The trigger type of last event */
74
- lastEventTriggerType?: () => Data<string>
75
- /* The sender id of last event */
76
- lastEventSenderId?: () => Data<string>
77
- /* Is timed out */
78
- isTimedOut?: () => Data<boolean>
79
- }
80
- }
81
-
82
- /* Trigger event with timeout by listening to specified events */
83
- export type GeneratorWatchdog = Generator &
84
- GeneratorWatchdogDef & {
85
- templateKey: 'GENERATOR_WATCHDOG'
86
- switches?: Array<
87
- SwitchDef &
88
- GeneratorWatchdogDef & {
89
- conds?: Array<{
90
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
91
- cond:
92
- | SwitchCondInnerStateCurrentCanvas
93
- | SwitchCondData
94
- | {
95
- __typename: 'SwitchCondInnerStateOutlet'
96
- outlet:
97
- | 'lastEvent'
98
- | 'lastEventType'
99
- | 'lastEventTriggerType'
100
- | 'lastEventSenderId'
101
- | 'isTimedOut'
102
- value: any
103
- }
104
- }>
105
- }
106
- >
107
- }
@@ -1,103 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Extract web content via CSS selectors. Supports WebView method (iOS/Android, renders JS) and HTTP method (all platforms, direct request)
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type {
8
- Brick,
9
- Generator,
10
- EventAction,
11
- ActionWithDataParams,
12
- ActionWithParams,
13
- Action,
14
- EventProperty,
15
- } from '../common'
16
- import type { TemplateEventPropsMap } from '../../utils/event-props'
17
-
18
- /* Run Crawler request with defined properties */
19
- export type GeneratorWebCrawlerActionRunRequest = Action & {
20
- __actionName: 'GENERATOR_WEB_CRAWLER_RUN_REQUEST'
21
- }
22
-
23
- interface GeneratorWebCrawlerDef {
24
- /*
25
- Default property:
26
- {
27
- "init": false,
28
- "httpMethod": "GET",
29
- "timeout": 10000,
30
- "attributePath": "textContent"
31
- }
32
- */
33
- property?: {
34
- /* Start Crawler request on generator initialized */
35
- init?: boolean | DataLink
36
- /* URL of crawler request */
37
- url?: string | DataLink
38
- /* Method of crawler request
39
-
40
- Platform not supported for `webview`: tvOS, Desktop, Web */
41
- method?: 'webview' | 'http' | DataLink
42
- /* HTTP method of crawler request (weview only supported GET, POST) */
43
- httpMethod?: 'GET' | 'POST' | 'PUT' | 'DELETE' | DataLink
44
- /* Body of crawler request */
45
- body?: string | DataLink
46
- /* User-Agent of crawler request */
47
- userAgent?: string | DataLink
48
- /* Headers of crawler request */
49
- headers?: {} | DataLink
50
- /* Timeout of crawler request */
51
- timeout?: number | DataLink
52
- /* CSS Query Selector of selected element */
53
- selector?: string | DataLink
54
- /* Attribute path of HTMLElement */
55
- attributePath?: string | DataLink
56
- /* Multiple selectors and attribute paths. */
57
- selectorList?:
58
- | Array<
59
- | DataLink
60
- | {
61
- selector?: string | DataLink
62
- attributePath?: string | DataLink
63
- }
64
- >
65
- | DataLink
66
- }
67
- events?: {
68
- /* Event of crawling start */
69
- onStart?: Array<EventAction>
70
- /* Event of crawling end */
71
- onEnd?: Array<EventAction>
72
- }
73
- outlets?: {
74
- /* Response for CRAWLER request (selector) */
75
- response?: () => Data<string>
76
- /* Responses for CRAWLER request (selectorList) */
77
- responseList?: () => Data<Array<any>>
78
- /* The error response of CRAWLER request, it will save to property bank */
79
- error?: () => Data<string>
80
- }
81
- }
82
-
83
- /* Extract web content via CSS selectors. Supports WebView method (iOS/Android, renders JS) and HTTP method (all platforms, direct request) */
84
- export type GeneratorWebCrawler = Generator &
85
- GeneratorWebCrawlerDef & {
86
- templateKey: 'GENERATOR_WEB_CRAWLER'
87
- switches?: Array<
88
- SwitchDef &
89
- GeneratorWebCrawlerDef & {
90
- conds?: Array<{
91
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
92
- cond:
93
- | SwitchCondInnerStateCurrentCanvas
94
- | SwitchCondData
95
- | {
96
- __typename: 'SwitchCondInnerStateOutlet'
97
- outlet: 'response' | 'responseList' | 'error'
98
- value: any
99
- }
100
- }>
101
- }
102
- >
103
- }
@@ -1,181 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * WebRTC peer connection for real-time audio/video/data communication
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type {
8
- Brick,
9
- Generator,
10
- EventAction,
11
- ActionWithDataParams,
12
- ActionWithParams,
13
- Action,
14
- EventProperty,
15
- } from '../common'
16
- import type { TemplateEventPropsMap } from '../../utils/event-props'
17
-
18
- /* Initiate WebRTC request */
19
- export type GeneratorWebRTCActionInitiate = Action & {
20
- __actionName: 'GENERATOR_WEBRTC_INITIATE'
21
- }
22
-
23
- /* Process input signal */
24
- export type GeneratorWebRTCActionProcessInputSignal = ActionWithParams & {
25
- __actionName: 'GENERATOR_WEBRTC_PROCESS_INPUT_SIGNAL'
26
- params?: Array<{
27
- input: 'inputSignal'
28
- value?: any | EventProperty
29
- mapping?: string
30
- }>
31
- }
32
-
33
- /* Close WebRTC */
34
- export type GeneratorWebRTCActionClose = Action & {
35
- __actionName: 'GENERATOR_WEBRTC_CLOSE'
36
- }
37
-
38
- /* Send message in data channel */
39
- export type GeneratorWebRTCActionChannelSend = ActionWithParams & {
40
- __actionName: 'GENERATOR_WEBRTC_CHANNEL_SEND'
41
- params?: Array<{
42
- input: 'textMessage'
43
- value?: string | DataLink | EventProperty
44
- mapping?: string
45
- }>
46
- }
47
-
48
- interface GeneratorWebRTCDef {
49
- /*
50
- Default property:
51
- {
52
- "enableAudio": true,
53
- "enableVideo": true,
54
- "videoFacing": "user",
55
- "videoFrameRate": 30,
56
- "videoHeight": 720,
57
- "videoWidth": 1080,
58
- "signalType": "json"
59
- }
60
- */
61
- property?: {
62
- /* Caller ID */
63
- callerId?: string | DataLink
64
- /* Calee ID, to ilter caller signal */
65
- calleeId?: string | DataLink
66
- /* Target local WebRTC stream preview brick ID */
67
- localVideoTarget?: string | DataLink | (() => Brick)
68
- /* Target remote WebRTC stream brick ID */
69
- remoteVideoTarget?: string | DataLink | (() => Brick)
70
- /* ICE Server list
71
- Default use Google public STUN servers if not setted. */
72
- iceServers?:
73
- | Array<
74
- | DataLink
75
- | {
76
- urls?: string | DataLink
77
- username?: string | DataLink
78
- credential?: string | DataLink
79
- }
80
- >
81
- | DataLink
82
- /* Enable capture device microphone */
83
- enableAudio?: boolean | DataLink
84
- /* Enable capture device camera */
85
- enableVideo?: boolean | DataLink
86
- /* Camera facing */
87
- videoFacing?: 'user' | 'environment' | DataLink
88
- /* Camera frame rate */
89
- videoFrameRate?: number | DataLink
90
- /* Output video height */
91
- videoHeight?: number | DataLink
92
- /* Output video width */
93
- videoWidth?: number | DataLink
94
- /* Label of data channel */
95
- dataChannelLabel?: string | DataLink
96
- /* Input signal for create peer connection
97
- Signal Types:
98
- `initiate`: Initiate a WebRTC call
99
- `offer`: WebRTC SDP offer
100
- `answer`: WebRTC SDP answer
101
- `candidate`: WebRTC ICE candidate
102
- `close`: Close WebRTC peer connection */
103
- inputSignal?: any
104
- /* Signal content type */
105
- signalType?: 'json' | 'object' | DataLink
106
- }
107
- events?: {
108
- /* Event of signal update */
109
- onSignalUpdate?: Array<
110
- EventAction<string & keyof TemplateEventPropsMap['Webrtc']['onSignalUpdate']>
111
- >
112
- /* Event of peer connected */
113
- onConnected?: Array<EventAction>
114
- /* Event of peer disconnected */
115
- onDisconnected?: Array<EventAction>
116
- /* Event of handshake error */
117
- onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Webrtc']['onError']>>
118
- /* Event of data channel open */
119
- onChannelOpen?: Array<EventAction>
120
- /* Event of data channel close */
121
- onChannelClose?: Array<EventAction>
122
- /* Event of received message on data channel */
123
- onChannelMessage?: Array<
124
- EventAction<string & keyof TemplateEventPropsMap['Webrtc']['onChannelMessage']>
125
- >
126
- }
127
- outlets?: {
128
- /* Signal to create peer connection */
129
- signal?: () => Data<any>
130
- /* Local SDP offer */
131
- sdpOffer?: () => Data<{
132
- type?: string
133
- sdp?: string
134
- }>
135
- /* Local SDP answer */
136
- sdpAnswer?: () => Data<{
137
- type?: string
138
- sdp?: string
139
- }>
140
- /* Peer connection state */
141
- connectionState?: () => Data<string>
142
- /* ICE connection state */
143
- iceConnectionState?: () => Data<string>
144
- /* Signaling state */
145
- signalingState?: () => Data<string>
146
- /* Last message from data channel */
147
- lastChannelMessage?: () => Data<string>
148
- /* Error message */
149
- errorMessage?: () => Data<string>
150
- }
151
- }
152
-
153
- /* WebRTC peer connection for real-time audio/video/data communication */
154
- export type GeneratorWebRTC = Generator &
155
- GeneratorWebRTCDef & {
156
- templateKey: 'GENERATOR_WEBRTC'
157
- switches?: Array<
158
- SwitchDef &
159
- GeneratorWebRTCDef & {
160
- conds?: Array<{
161
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
162
- cond:
163
- | SwitchCondInnerStateCurrentCanvas
164
- | SwitchCondData
165
- | {
166
- __typename: 'SwitchCondInnerStateOutlet'
167
- outlet:
168
- | 'signal'
169
- | 'sdpOffer'
170
- | 'sdpAnswer'
171
- | 'connectionState'
172
- | 'iceConnectionState'
173
- | 'signalingState'
174
- | 'lastChannelMessage'
175
- | 'errorMessage'
176
- value: any
177
- }
178
- }>
179
- }
180
- >
181
- }
@@ -1,148 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * WebSocket or Socket.IO Generator
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type {
8
- Brick,
9
- Generator,
10
- EventAction,
11
- ActionWithDataParams,
12
- ActionWithParams,
13
- Action,
14
- EventProperty,
15
- } from '../common'
16
- import type { TemplateEventPropsMap } from '../../utils/event-props'
17
-
18
- /* Connect */
19
- export type GeneratorWebSocketActionConnect = Action & {
20
- __actionName: 'GENERATOR_WEB_SOCKET_CONNECT'
21
- }
22
-
23
- /* Disconnect */
24
- export type GeneratorWebSocketActionDisconnect = Action & {
25
- __actionName: 'GENERATOR_WEB_SOCKET_DISCONNECT'
26
- }
27
-
28
- /* Emit event (Acknowledgement: It's callback, the channel of Socket.IO server can used it as last argument) */
29
- export type GeneratorWebSocketActionEmit = ActionWithParams & {
30
- __actionName: 'GENERATOR_WEB_SOCKET_EMIT'
31
- params?: Array<
32
- | {
33
- input: 'eventName'
34
- value?: string | DataLink | EventProperty
35
- mapping?: string
36
- }
37
- | {
38
- input: 'arguments'
39
- value?: Array<any> | DataLink | EventProperty
40
- mapping?: string
41
- }
42
- | {
43
- input: 'acknowledgementType'
44
- value?: 'text' | 'json' | DataLink | EventProperty
45
- mapping?: string
46
- }
47
- | {
48
- input: 'withAcknowledgement'
49
- value?: boolean | DataLink | EventProperty
50
- mapping?: string
51
- }
52
- >
53
- }
54
-
55
- /* Emit `message` */
56
- export type GeneratorWebSocketActionSend = ActionWithParams & {
57
- __actionName: 'GENERATOR_WEB_SOCKET_SEND'
58
- params?: Array<{
59
- input: 'value'
60
- value?: string | DataLink | EventProperty
61
- mapping?: string
62
- }>
63
- }
64
-
65
- interface GeneratorWebSocketDef {
66
- /*
67
- Default property:
68
- {}
69
- */
70
- property?: {
71
- /* Try to connect on generator initialized */
72
- init?: boolean | DataLink
73
- /* Endpoint URL (support namespace) */
74
- url?: string | DataLink
75
- /* Name of the path that is captured on the server side */
76
- path?: string | DataLink
77
- /* URL query parameters */
78
- query?: {} | DataLink
79
- /* Whether to reconnect automatically */
80
- reconnection?: boolean | DataLink
81
- /* Number of reconnection attempts before giving up */
82
- attemptTimes?: number | DataLink
83
- /* How long to initially wait before attempting a new reconnection (1000). Affected by +/- randomizationFactor, for example the default initial delay will be between 500 to 1500ms. */
84
- delayBase?: number | DataLink
85
- /* Maximum amount of time to wait between reconnections (5000). Each attempt increases the reconnection delay by 2x along with a randomization as above */
86
- delayMax?: number | DataLink
87
- /* Randomization factor 0 <= deplayRandom <= 1 */
88
- delayRandom?: number | DataLink
89
- /* Message type, if type is json it's will auto transform to object */
90
- messageType?: 'json' | 'text' | DataLink
91
- /* Use Socket.IO as transport channel */
92
- socketIoEnable?: boolean | DataLink
93
- /* Socket.IO Version */
94
- socketIoVersion?: 'latest' | 'v4' | 'v2' | DataLink
95
- /* Whether to reuse an existing connection */
96
- socketIoForceNew?: boolean | DataLink
97
- /* Connection timeout before a connect_error and connect_timeout events are emitted */
98
- socketIoTimeout?: number | DataLink
99
- /* Event name to be subscribe */
100
- socketIoEventName?: string | DataLink
101
- /* Additional query parameters that are sent when connecting a namespace (then found in socket.handshake.query object on the server-side) */
102
- socketIoQuery?: {} | DataLink
103
- /* Protocols to be used in the WebSocket connection */
104
- wsProtocols?: Array<string | DataLink> | DataLink | string | DataLink | DataLink
105
- }
106
- events?: {
107
- /* Event for connected to server */
108
- onOpen?: Array<EventAction>
109
- /* Event for disconnect from server */
110
- onClose?: Array<EventAction>
111
- /* Event for receive message */
112
- onMessage?: Array<EventAction<string & keyof TemplateEventPropsMap['WebSocket']['onMessage']>>
113
- /* Event for error occurred */
114
- onError?: Array<EventAction>
115
- }
116
- outlets?: {
117
- /* Show socket.io connected or not */
118
- readyState?: () => Data<string>
119
- /* Results of each countdown change, it will save to Data */
120
- message?: () => Data<any>
121
- /* When Socket.IO mode server can response acknowledgemnt with data to client */
122
- acknowledgeData?: () => Data<{ [key: string]: any }>
123
- /* Error message */
124
- errorMessage?: () => Data<string>
125
- }
126
- }
127
-
128
- /* WebSocket or Socket.IO Generator */
129
- export type GeneratorWebSocket = Generator &
130
- GeneratorWebSocketDef & {
131
- templateKey: 'GENERATOR_WEB_SOCKET'
132
- switches?: Array<
133
- SwitchDef &
134
- GeneratorWebSocketDef & {
135
- conds?: Array<{
136
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
137
- cond:
138
- | SwitchCondInnerStateCurrentCanvas
139
- | SwitchCondData
140
- | {
141
- __typename: 'SwitchCondInnerStateOutlet'
142
- outlet: 'readyState' | 'message' | 'acknowledgeData' | 'errorMessage'
143
- value: any
144
- }
145
- }>
146
- }
147
- >
148
- }
@@ -1,57 +0,0 @@
1
- export * from './Tick'
2
- export * from './AlarmClock'
3
- export * from './File'
4
- export * from './MediaFlow'
5
- export * from './DataBank'
6
- export * from './GraphQl'
7
- export * from './Http'
8
- export * from './SoundPlayer'
9
- export * from './Keyboard'
10
- export * from './WebSocket'
11
- export * from './CanvasMap'
12
- export * from './Step'
13
- export * from './Iterator'
14
- export * from './Watchdog'
15
- export * from './MqttClient'
16
- export * from './MqttBroker'
17
- export * from './BleCentral'
18
- export * from './SerialPort'
19
- export * from './Tcp'
20
- export * from './TcpServer'
21
- export * from './Udp'
22
- export * from './HttpServer'
23
- export * from './WebRtc'
24
- export * from './WebCrawler'
25
- export * from './SoundRecorder'
26
- export * from './BlePeripheral'
27
- export * from './Question'
28
- export * from './Information'
29
- export * from './Intent'
30
- export * from './CastlesPay'
31
- export * from './SpeechToTextPlatform'
32
- export * from './ThermalPrinter'
33
- export * from './SqLite'
34
- export * from './McpServer'
35
- export * from './Mcp'
36
- export * from './VadTraditional'
37
- export * from './TextToSpeechOnnx'
38
- export * from './LlmOnnx'
39
- export * from './SpeechToTextOnnx'
40
- export * from './VadOnnx'
41
- export * from './SpeechToTextGgml'
42
- export * from './VadGgml'
43
- export * from './RealtimeTranscription'
44
- export * from './LlmGgml'
45
- export * from './TextToSpeechGgml'
46
- export * from './RerankerGgml'
47
- export * from './LlmMlx'
48
- export * from './LlmQualcommAiEngine'
49
- export * from './LlmMediaTekNeuroPilot'
50
- export * from './LlmOpenAiCompat'
51
- export * from './TextToSpeechOpenAiLike'
52
- export * from './LlmAnthropicCompat'
53
- export * from './LlmAppleBuiltin'
54
- export * from './SttAppleBuiltin'
55
- export * from './TextToSpeechAppleBuiltin'
56
- export * from './Assistant'
57
- export * from './VectorStore'
package/types/index.ts DELETED
@@ -1,13 +0,0 @@
1
- export * from './data'
2
- export * from './data-calc'
3
- export * from './data-calc-script'
4
- export * from './data-calc-command'
5
- export * from './generators'
6
- export * from './bricks'
7
- export * from './animation'
8
- export * from './canvas'
9
- export * from './subspace'
10
- export * from './common'
11
- export * from './switch'
12
- export * from './system'
13
- export * from './automation'
package/types/subspace.ts DELETED
@@ -1,60 +0,0 @@
1
- import type { Brick, Generator, LocalSyncStrategy, EventAction, SubspaceID } from './common'
2
- import type { Animation } from './animation'
3
- import type { Canvas } from './canvas'
4
- import type { Data } from './data'
5
- import type { DataCalculation } from './data-calc'
6
-
7
- export type Subspace = {
8
- __typename: 'Subspace'
9
- id: string
10
- title?: string
11
- description?: string
12
- hideShortRef?: boolean
13
- unused?: boolean
14
- portal?: 'top' | 'left' | 'bottom' | 'right'
15
- // Unexpanded information in Editor
16
- unexpanded?: {
17
- data?: boolean
18
- dataCalculation?: boolean
19
- brick?: boolean
20
- generator?: boolean
21
- canvas?: Array<Canvas>
22
- }
23
- module?: {
24
- id: string
25
- version: string
26
- link?: boolean
27
- selectedRequirements?: Array<{
28
- subspace: SubspaceID
29
- id: string
30
- version: string
31
- }>
32
- // Module only
33
- requirements?: Array<{
34
- subspace: SubspaceID
35
- id: string
36
- version: string
37
- }>
38
- }
39
- localSyncChangeCanvas?: LocalSyncStrategy
40
- layout: {
41
- width: number
42
- height: number
43
- resizeMode?: 'cover' | 'stretch'
44
- }
45
- rootCanvas: Canvas
46
- canvases: Array<Canvas>
47
- animations: Array<Animation>
48
- bricks: Array<Brick>
49
- generators: Array<Generator>
50
- data: Array<Data>
51
- dataRouting: Array<Data>
52
- dataCalculation: Array<DataCalculation>
53
- actions?: {
54
- [key: string]: {
55
- description: string
56
- // TODO: add eventPropertyMap
57
- }
58
- }
59
- events?: { [key: string]: Array<EventAction> }
60
- }