@fugood/bricks-ctor 2.25.0-beta.60 → 2.25.0-beta.62

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 (192) hide show
  1. package/package.json +4 -28
  2. package/tools/__tests__/legacy-forwarder.test.js +91 -0
  3. package/tools/_forward.ts +26 -0
  4. package/tools/deploy.ts +3 -175
  5. package/tools/mcp-server.ts +3 -35
  6. package/tools/postinstall.ts +3 -291
  7. package/tools/pull.ts +3 -198
  8. package/tools/push-config.ts +3 -113
  9. package/tools/simulator.ts +3 -149
  10. package/compile/__tests__/config-diff.test.js +0 -100
  11. package/compile/__tests__/index.test.js +0 -461
  12. package/compile/__tests__/util.test.js +0 -450
  13. package/compile/action-name-map.ts +0 -1079
  14. package/compile/config-diff.ts +0 -155
  15. package/compile/index.ts +0 -1594
  16. package/compile/util.ts +0 -482
  17. package/index.ts +0 -6
  18. package/skills/bricks-ctor/SKILL.md +0 -38
  19. package/skills/bricks-ctor/references/animation.md +0 -160
  20. package/skills/bricks-ctor/references/architecture-patterns.md +0 -88
  21. package/skills/bricks-ctor/references/automations.md +0 -232
  22. package/skills/bricks-ctor/references/buttress.md +0 -245
  23. package/skills/bricks-ctor/references/data-calculation.md +0 -252
  24. package/skills/bricks-ctor/references/local-sync.md +0 -129
  25. package/skills/bricks-ctor/references/media-flow.md +0 -165
  26. package/skills/bricks-ctor/references/remote-data-bank.md +0 -196
  27. package/skills/bricks-ctor/references/simulator.md +0 -132
  28. package/skills/bricks-ctor/references/source-editing-tools.md +0 -81
  29. package/skills/bricks-ctor/references/standby-transition.md +0 -124
  30. package/skills/bricks-ctor/references/verification-toolchain.md +0 -200
  31. package/skills/bricks-design/SKILL.md +0 -171
  32. package/skills/bricks-design/references/architecture-truths.md +0 -132
  33. package/skills/bricks-design/references/avoiding-complexity.md +0 -91
  34. package/skills/bricks-design/references/design-critique.md +0 -195
  35. package/skills/bricks-design/references/design-languages.md +0 -265
  36. package/skills/bricks-design/references/performance.md +0 -116
  37. package/skills/bricks-design/references/presentation-and-slideshow.md +0 -137
  38. package/skills/bricks-design/references/translating-inputs.md +0 -152
  39. package/skills/bricks-design/references/variations-and-tweaks.md +0 -124
  40. package/skills/bricks-design/references/when-the-brief-is-branded.md +0 -284
  41. package/skills/bricks-design/references/when-the-brief-is-vague.md +0 -85
  42. package/skills/bricks-design/references/workflow.md +0 -134
  43. package/skills/bricks-ux/SKILL.md +0 -114
  44. package/skills/bricks-ux/references/accessibility.md +0 -162
  45. package/skills/bricks-ux/references/flow-states.md +0 -175
  46. package/skills/bricks-ux/references/interaction-archetypes.md +0 -189
  47. package/skills/bricks-ux/references/monitoring-screens.md +0 -153
  48. package/skills/bricks-ux/references/pressable-composition.md +0 -126
  49. package/skills/bricks-ux/references/user-journey.md +0 -168
  50. package/skills/bricks-ux/references/ux-critique.md +0 -256
  51. package/skills/rive-marketplace/SKILL.md +0 -99
  52. package/tools/__tests__/_cli-error.test.ts +0 -35
  53. package/tools/__tests__/_mcp-config.test.ts +0 -67
  54. package/tools/__tests__/pull.test.ts +0 -108
  55. package/tools/_cli-error.ts +0 -17
  56. package/tools/_edits-log.ts +0 -41
  57. package/tools/_git-author.ts +0 -37
  58. package/tools/_last-pushed-commit.ts +0 -28
  59. package/tools/_mcp-config.ts +0 -42
  60. package/tools/_shell.ts +0 -180
  61. package/tools/icons/.gitattributes +0 -1
  62. package/tools/icons/fa6pro-glyphmap.json +0 -4686
  63. package/tools/icons/fa6pro-meta.json +0 -1
  64. package/tools/mcp-env.ts +0 -13
  65. package/tools/mcp-tools/__tests__/data-calc-editing.test.js +0 -516
  66. package/tools/mcp-tools/__tests__/entry-editing.test.js +0 -866
  67. package/tools/mcp-tools/__tests__/huggingface.test.ts +0 -49
  68. package/tools/mcp-tools/__tests__/icons.test.ts +0 -21
  69. package/tools/mcp-tools/__tests__/mcp-env.test.js +0 -19
  70. package/tools/mcp-tools/_editing-helpers.ts +0 -98
  71. package/tools/mcp-tools/_verify.ts +0 -50
  72. package/tools/mcp-tools/compile.ts +0 -104
  73. package/tools/mcp-tools/data-calc-editing.ts +0 -1311
  74. package/tools/mcp-tools/entry-editing.ts +0 -2297
  75. package/tools/mcp-tools/huggingface.ts +0 -772
  76. package/tools/mcp-tools/icons.ts +0 -97
  77. package/tools/mcp-tools/lottie.ts +0 -102
  78. package/tools/mcp-tools/media.ts +0 -113
  79. package/tools/simulator-main.mjs +0 -488
  80. package/tools/simulator-preload.cjs +0 -16
  81. package/types/animation.d.ts +0 -116
  82. package/types/automation.d.ts +0 -231
  83. package/types/brick-base.d.ts +0 -80
  84. package/types/bricks/Camera.d.ts +0 -246
  85. package/types/bricks/Chart.d.ts +0 -372
  86. package/types/bricks/GenerativeMedia.d.ts +0 -290
  87. package/types/bricks/Icon.d.ts +0 -98
  88. package/types/bricks/Image.d.ts +0 -126
  89. package/types/bricks/Items.d.ts +0 -480
  90. package/types/bricks/Lottie.d.ts +0 -168
  91. package/types/bricks/Maps.d.ts +0 -262
  92. package/types/bricks/QrCode.d.ts +0 -117
  93. package/types/bricks/Rect.d.ts +0 -150
  94. package/types/bricks/RichText.d.ts +0 -131
  95. package/types/bricks/Rive.d.ts +0 -220
  96. package/types/bricks/Scene3D.d.ts +0 -676
  97. package/types/bricks/Sketch.d.ts +0 -256
  98. package/types/bricks/Slideshow.d.ts +0 -201
  99. package/types/bricks/Svg.d.ts +0 -99
  100. package/types/bricks/Text.d.ts +0 -148
  101. package/types/bricks/TextInput.d.ts +0 -242
  102. package/types/bricks/Video.d.ts +0 -242
  103. package/types/bricks/VideoStreaming.d.ts +0 -112
  104. package/types/bricks/WebRtcStream.d.ts +0 -65
  105. package/types/bricks/WebView.d.ts +0 -168
  106. package/types/bricks/index.d.ts +0 -23
  107. package/types/canvas.d.ts +0 -82
  108. package/types/common.d.ts +0 -141
  109. package/types/data-calc-command/base.d.ts +0 -57
  110. package/types/data-calc-command/collection.d.ts +0 -418
  111. package/types/data-calc-command/color.d.ts +0 -432
  112. package/types/data-calc-command/constant.d.ts +0 -50
  113. package/types/data-calc-command/datetime.d.ts +0 -147
  114. package/types/data-calc-command/file.d.ts +0 -129
  115. package/types/data-calc-command/index.d.ts +0 -13
  116. package/types/data-calc-command/iteratee.d.ts +0 -23
  117. package/types/data-calc-command/logictype.d.ts +0 -190
  118. package/types/data-calc-command/math.d.ts +0 -275
  119. package/types/data-calc-command/object.d.ts +0 -119
  120. package/types/data-calc-command/sandbox.d.ts +0 -66
  121. package/types/data-calc-command/string.d.ts +0 -407
  122. package/types/data-calc-script.d.ts +0 -21
  123. package/types/data-calc.d.ts +0 -12
  124. package/types/data.d.ts +0 -97
  125. package/types/generators/AlarmClock.d.ts +0 -110
  126. package/types/generators/Assistant.d.ts +0 -640
  127. package/types/generators/BleCentral.d.ts +0 -247
  128. package/types/generators/BlePeripheral.d.ts +0 -208
  129. package/types/generators/CanvasMap.d.ts +0 -74
  130. package/types/generators/CastlesPay.d.ts +0 -87
  131. package/types/generators/DataBank.d.ts +0 -160
  132. package/types/generators/File.d.ts +0 -432
  133. package/types/generators/GraphQl.d.ts +0 -132
  134. package/types/generators/Http.d.ts +0 -222
  135. package/types/generators/HttpServer.d.ts +0 -230
  136. package/types/generators/Information.d.ts +0 -103
  137. package/types/generators/Intent.d.ts +0 -168
  138. package/types/generators/Iterator.d.ts +0 -108
  139. package/types/generators/Keyboard.d.ts +0 -105
  140. package/types/generators/LlmAnthropicCompat.d.ts +0 -212
  141. package/types/generators/LlmAppleBuiltin.d.ts +0 -159
  142. package/types/generators/LlmGgml.d.ts +0 -903
  143. package/types/generators/LlmMediaTekNeuroPilot.d.ts +0 -235
  144. package/types/generators/LlmMlx.d.ts +0 -228
  145. package/types/generators/LlmOnnx.d.ts +0 -213
  146. package/types/generators/LlmOpenAiCompat.d.ts +0 -312
  147. package/types/generators/LlmQualcommAiEngine.d.ts +0 -247
  148. package/types/generators/Mcp.d.ts +0 -637
  149. package/types/generators/McpServer.d.ts +0 -289
  150. package/types/generators/MediaFlow.d.ts +0 -170
  151. package/types/generators/MqttBroker.d.ts +0 -141
  152. package/types/generators/MqttClient.d.ts +0 -141
  153. package/types/generators/Question.d.ts +0 -408
  154. package/types/generators/RealtimeTranscription.d.ts +0 -287
  155. package/types/generators/RerankerGgml.d.ts +0 -195
  156. package/types/generators/SerialPort.d.ts +0 -151
  157. package/types/generators/SoundPlayer.d.ts +0 -94
  158. package/types/generators/SoundRecorder.d.ts +0 -139
  159. package/types/generators/SpeechToTextGgml.d.ts +0 -424
  160. package/types/generators/SpeechToTextOnnx.d.ts +0 -236
  161. package/types/generators/SpeechToTextPlatform.d.ts +0 -85
  162. package/types/generators/SqLite.d.ts +0 -159
  163. package/types/generators/Step.d.ts +0 -107
  164. package/types/generators/SttAppleBuiltin.d.ts +0 -153
  165. package/types/generators/Tcp.d.ts +0 -126
  166. package/types/generators/TcpServer.d.ts +0 -147
  167. package/types/generators/TextToSpeechAppleBuiltin.d.ts +0 -127
  168. package/types/generators/TextToSpeechGgml.d.ts +0 -221
  169. package/types/generators/TextToSpeechOnnx.d.ts +0 -178
  170. package/types/generators/TextToSpeechOpenAiLike.d.ts +0 -121
  171. package/types/generators/ThermalPrinter.d.ts +0 -193
  172. package/types/generators/Tick.d.ts +0 -83
  173. package/types/generators/Udp.d.ts +0 -120
  174. package/types/generators/VadGgml.d.ts +0 -260
  175. package/types/generators/VadOnnx.d.ts +0 -231
  176. package/types/generators/VadTraditional.d.ts +0 -138
  177. package/types/generators/VectorStore.d.ts +0 -257
  178. package/types/generators/Watchdog.d.ts +0 -107
  179. package/types/generators/WebCrawler.d.ts +0 -103
  180. package/types/generators/WebRtc.d.ts +0 -181
  181. package/types/generators/WebSocket.d.ts +0 -148
  182. package/types/generators/index.d.ts +0 -57
  183. package/types/index.d.ts +0 -13
  184. package/types/subspace.d.ts +0 -60
  185. package/types/switch.d.ts +0 -51
  186. package/types/system.d.ts +0 -707
  187. package/utils/__tests__/calc.test.js +0 -25
  188. package/utils/__tests__/id.test.js +0 -154
  189. package/utils/calc.ts +0 -130
  190. package/utils/data.ts +0 -495
  191. package/utils/event-props.ts +0 -912
  192. package/utils/id.ts +0 -133
@@ -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.d.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'
@@ -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
- }