@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,112 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Brick video streaming component, supports RTSP / RTMP streaming.
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
8
- import type {
9
- Brick,
10
- EventAction,
11
- EventActionForItem,
12
- ActionWithDataParams,
13
- ActionWithParams,
14
- Action,
15
- EventProperty,
16
- } from '../common'
17
- import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
- import type { TemplateEventPropsMap } from '../../utils/event-props'
19
-
20
- interface BrickVideoStreamingDef {
21
- /*
22
- Default property:
23
- {
24
- "networkCaching": 300,
25
- "paused": false,
26
- "volume": 100,
27
- "muted": false,
28
- "replayTimeout": 500
29
- }
30
- */
31
- property?: BrickBasicProperty & {
32
- /* The video path list or single path (File, URL) */
33
- uri?: string | DataLink
34
- /* Set cache time from streaming (You can adjust according to network conditions), it will delay the playing. */
35
- networkCaching?: number | DataLink
36
- /* Controls whether the video is paused */
37
- paused?: boolean | DataLink
38
- /* Volume */
39
- volume?: number | DataLink
40
- /* Muted */
41
- muted?: boolean | DataLink
42
- /* Video Auto Aspect Ratio */
43
- autoAspectRatio?: boolean | DataLink
44
- /* Video Aspect Ratio */
45
- aspectRatio?: string | DataLink
46
- /* Repeat the video path list */
47
- repeat?: boolean | DataLink
48
- /* Replay on playing error */
49
- replayOnError?: boolean | DataLink
50
- /* Timeout to replay if repeat or replayOnError is true and video is end or error */
51
- replayTimeout?: number | DataLink
52
- }
53
- events?: BrickBasicEvents & {
54
- /* Event of the brick press */
55
- onPress?: Array<EventAction>
56
- /* Event of the brick press in */
57
- onPressIn?: Array<EventAction>
58
- /* Event of the brick press out */
59
- onPressOut?: Array<EventAction>
60
- /* Event of the brick long press */
61
- onLongPress?: Array<EventAction>
62
- /* Event of the brick focus (Use TV Device with controller) */
63
- onFocus?: Array<EventAction>
64
- /* Event of the brick blur (Use TV Device with controller) */
65
- onBlur?: Array<EventAction>
66
- /* Event on plays of path are end */
67
- onEnd?: Array<EventAction>
68
- /* Event on plays of path are end */
69
- onLoad?: Array<EventAction>
70
- /* Event of the video playing error */
71
- onError?: Array<EventAction>
72
- }
73
- outlets?: {
74
- /* Brick is pressing */
75
- brickPressing?: () => Data<boolean>
76
- /* Brick is focusing (Use TV Device with controller) */
77
- brickFocusing?: () => Data<boolean>
78
- }
79
- animation?: AnimationBasicEvents & {
80
- onPress?: Animation
81
- onPressIn?: Animation
82
- onPressOut?: Animation
83
- onLongPress?: Animation
84
- onFocus?: Animation
85
- onBlur?: Animation
86
- onEnd?: Animation
87
- onLoad?: Animation
88
- onError?: Animation
89
- }
90
- }
91
-
92
- /* Brick video streaming component, supports RTSP / RTMP streaming. */
93
- export type BrickVideoStreaming = Brick &
94
- BrickVideoStreamingDef & {
95
- templateKey: 'BRICK_VIDEO_STREAMING'
96
- switches?: Array<
97
- SwitchDef &
98
- BrickVideoStreamingDef & {
99
- conds?: Array<{
100
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
101
- cond:
102
- | SwitchCondInnerStateCurrentCanvas
103
- | SwitchCondData
104
- | {
105
- __typename: 'SwitchCondInnerStateOutlet'
106
- outlet: 'brickPressing' | 'brickFocusing'
107
- value: any
108
- }
109
- }>
110
- }
111
- >
112
- }
@@ -1,65 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Display WebRTC video/audio stream from a WebRTC generator connection
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
8
- import type {
9
- Brick,
10
- EventAction,
11
- EventActionForItem,
12
- ActionWithDataParams,
13
- ActionWithParams,
14
- Action,
15
- EventProperty,
16
- } from '../common'
17
- import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
- import type { TemplateEventPropsMap } from '../../utils/event-props'
19
-
20
- interface BrickWebRTCStreamDef {
21
- /*
22
- Default property:
23
- {
24
- "mirror": false,
25
- "resizeMode": "contain",
26
- "noStreamViewText": "no stream",
27
- "noStreamViewTextSize": 44,
28
- "noStreamViewTextColor": "#000"
29
- }
30
- */
31
- property?: BrickBasicProperty & {
32
- /* Mirror video */
33
- mirror?: boolean | DataLink
34
- /* The stream resize mode */
35
- resizeMode?: 'contain' | 'cover' | DataLink
36
- /* Show text content if no stream */
37
- noStreamViewText?: string | DataLink
38
- /* The font size of shown text content if no stream */
39
- noStreamViewTextSize?: number | DataLink
40
- /* The color of shown text content if no stream */
41
- noStreamViewTextColor?: string | DataLink
42
- }
43
- }
44
-
45
- /* Display WebRTC video/audio stream from a WebRTC generator connection */
46
- export type BrickWebRTCStream = Brick &
47
- BrickWebRTCStreamDef & {
48
- templateKey: 'BRICK_WEBRTC_STREAM'
49
- switches?: Array<
50
- SwitchDef &
51
- BrickWebRTCStreamDef & {
52
- conds?: Array<{
53
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
54
- cond:
55
- | SwitchCondInnerStateCurrentCanvas
56
- | SwitchCondData
57
- | {
58
- __typename: 'SwitchCondInnerStateOutlet'
59
- outlet: ''
60
- value: any
61
- }
62
- }>
63
- }
64
- >
65
- }
@@ -1,168 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Embedded web browser with JS injection, DOM query selectors, content cropping, navigation control, and permission management
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
8
- import type {
9
- Brick,
10
- EventAction,
11
- EventActionForItem,
12
- ActionWithDataParams,
13
- ActionWithParams,
14
- Action,
15
- EventProperty,
16
- } from '../common'
17
- import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
- import type { TemplateEventPropsMap } from '../../utils/event-props'
19
-
20
- /* Run Javascript on the WebView */
21
- export type BrickWebViewActionInjectJavascript = ActionWithParams & {
22
- __actionName: 'BRICK_WEBVIEW_INJECT_JAVASCRIPT'
23
- params?: Array<{
24
- input: 'javascriptCode'
25
- value?: string | DataLink | EventProperty
26
- mapping?: string
27
- }>
28
- }
29
-
30
- /* Query selector on the WebView */
31
- export type BrickWebViewActionQuerySelector = ActionWithParams & {
32
- __actionName: 'BRICK_WEBVIEW_QUERY_SELECTOR'
33
- params?: Array<
34
- | {
35
- input: 'querySelector'
36
- value?: string | DataLink | EventProperty
37
- mapping?: string
38
- }
39
- | {
40
- input: 'expression'
41
- value?: string | DataLink | EventProperty
42
- mapping?: string
43
- }
44
- >
45
- }
46
-
47
- /* Do go forward on the WebView */
48
- export type BrickWebViewActionGoForward = Action & {
49
- __actionName: 'BRICK_WEBVIEW_GO_FORWARD'
50
- }
51
-
52
- /* Do go back on the webview */
53
- export type BrickWebViewActionGoBack = Action & {
54
- __actionName: 'BRICK_WEBVIEW_GO_BACK'
55
- }
56
-
57
- /* Do reload on the webview */
58
- export type BrickWebViewActionReload = Action & {
59
- __actionName: 'BRICK_WEBVIEW_RELOAD'
60
- }
61
-
62
- interface BrickWebViewDef {
63
- /*
64
- Default property:
65
- {
66
- "cropLeft": 0,
67
- "cropRight": 0,
68
- "cropTop": 0,
69
- "cropBottom": 0,
70
- "allowContentControl": true,
71
- "allowFileAccess": true,
72
- "domStorageEnabled": true,
73
- "cacheEnabled": true,
74
- "geolocationEnabled": true,
75
- "thirdPartyCookiesEnabled": true,
76
- "javaScriptEnabled": true,
77
- "scrollEnabled": true,
78
- "nestedScrollEnabled": true
79
- }
80
- */
81
- property?: BrickBasicProperty & {
82
- /* The WebView content URL */
83
- url?: string | DataLink
84
- /* The request headers to load content */
85
- headers?: Record<string, string | DataLink> | DataLink
86
- /* The request UserAgent */
87
- userAgent?: string | DataLink
88
- /* The webview content HTML (Use `url` first) */
89
- html?: string | DataLink
90
- /* Crop webview content left position (px) */
91
- cropLeft?: number | DataLink
92
- /* Crop webview content right position (px) */
93
- cropRight?: number | DataLink
94
- /* Crop webview content top position (px) */
95
- cropTop?: number | DataLink
96
- /* Crop webview content bottom position (px) */
97
- cropBottom?: number | DataLink
98
- /* Allow content control */
99
- allowContentControl?: boolean | DataLink
100
- /* List of origin strings to allow being navigated to. (Allowed all if not provided) */
101
- originAllowList?: Array<string | DataLink> | DataLink
102
- /* Allow file:// access */
103
- allowFileAccess?: boolean | DataLink
104
- /* Enable DOM Storage */
105
- domStorageEnabled?: boolean | DataLink
106
- /* Enable Cache */
107
- cacheEnabled?: boolean | DataLink
108
- /* Enable Geolocation */
109
- geolocationEnabled?: boolean | DataLink
110
- /* Enable Third Party Cookies */
111
- thirdPartyCookiesEnabled?: boolean | DataLink
112
- /* Enable JavaScript */
113
- javaScriptEnabled?: boolean | DataLink
114
- /* Inject JavaScript code */
115
- code?: string | DataLink
116
- /* Inject JavaScript code before content loaded */
117
- beforeContentLoaded?: string | DataLink
118
- /* Inject JavaScript code for main frame only (only `YES` supported for Android) */
119
- forMainFrameOnly?: boolean | DataLink
120
- /* Inject JavaScript code before content loaded for main frame only (only `YES` supported for Android) */
121
- beforeContentLoadedForMainFrameOnly?: boolean | DataLink
122
- /* Enable scroll in WebView */
123
- scrollEnabled?: boolean | DataLink
124
- /* Enable nested scroll in WebView (Android only) */
125
- nestedScrollEnabled?: boolean | DataLink
126
- }
127
- events?: BrickBasicEvents & {
128
- /* Event of the WebView on load */
129
- onLoad?: Array<EventAction<string & keyof TemplateEventPropsMap['Webview']['onLoad']>>
130
- /* Event when the WebView load fails */
131
- onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Webview']['onError']>>
132
- /* Event of the webview on message by `window.ReactNativeWebView.postMessage` on you're injected javascript code */
133
- onMessage?: Array<EventAction<string & keyof TemplateEventPropsMap['Webview']['onMessage']>>
134
- }
135
- outlets?: {
136
- /* The result of the query selector action */
137
- queryResult?: () => Data<any>
138
- /* The error of the query selector action */
139
- queryError?: () => Data<string>
140
- }
141
- animation?: AnimationBasicEvents & {
142
- onLoad?: Animation
143
- onError?: Animation
144
- onMessage?: Animation
145
- }
146
- }
147
-
148
- /* Embedded web browser with JS injection, DOM query selectors, content cropping, navigation control, and permission management */
149
- export type BrickWebView = Brick &
150
- BrickWebViewDef & {
151
- templateKey: 'BRICK_WEBVIEW'
152
- switches?: Array<
153
- SwitchDef &
154
- BrickWebViewDef & {
155
- conds?: Array<{
156
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
157
- cond:
158
- | SwitchCondInnerStateCurrentCanvas
159
- | SwitchCondData
160
- | {
161
- __typename: 'SwitchCondInnerStateOutlet'
162
- outlet: 'queryResult' | 'queryError'
163
- value: any
164
- }
165
- }>
166
- }
167
- >
168
- }
@@ -1,22 +0,0 @@
1
- /* Auto generated by build script */
2
- export * from './Rect'
3
- export * from './Text'
4
- export * from './TextInput'
5
- export * from './RichText'
6
- export * from './Image'
7
- export * from './Svg'
8
- export * from './Icon'
9
- export * from './Video'
10
- export * from './VideoStreaming'
11
- export * from './QrCode'
12
- export * from './Slideshow'
13
- export * from './Chart'
14
- export * from './Items'
15
- export * from './Lottie'
16
- export * from './Rive'
17
- export * from './WebView'
18
- export * from './Camera'
19
- export * from './WebRtcStream'
20
- export * from './GenerativeMedia'
21
- export * from './Maps'
22
- export * from './Sketch'
package/types/canvas.ts DELETED
@@ -1,82 +0,0 @@
1
- /* Auto generated by build script */
2
- import type { Easing } from './animation'
3
- import type { Data, DataLink } from './data'
4
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from './switch'
5
- import type { Brick, SubspaceID, EventAction } from './common'
6
-
7
- type StandbyEasing = {
8
- method: Easing
9
- duration: number
10
- }
11
-
12
- interface CanvasDef {
13
- property?: {
14
- /* The showing timeout of Canvas, need to set `Next Canvas ID` as well */
15
- showingTimeout?: number | DataLink
16
- /* Canvas ID for change next canvas on showing timeout */
17
- nextCanvasId?: string | DataLink | (() => Canvas)
18
- /* Background color of Canvas */
19
- backgroundColor?: string | DataLink
20
- /* Dismiss keyboard on press */
21
- dismissKeyboardOnPress?: boolean | DataLink
22
- }
23
- events?: {
24
- /* Event on Canvas first enter on Subspace */
25
- firstEnter?: Array<EventAction>
26
- /* Event on Canvas enter */
27
- enter?: Array<EventAction>
28
- /* Showing timeout event (If `Showing Timeout` is specified) */
29
- showingTimeout?: Array<EventAction>
30
- /* Event on Canvas exit */
31
- exit?: Array<EventAction>
32
- }
33
- }
34
-
35
- /* View renderer in subspace. */
36
- export type Canvas = CanvasDef & {
37
- __typename: 'Canvas'
38
- id: string
39
- alias?: string
40
- title?: string
41
- description?: string
42
- hideShortRef?: boolean
43
- switches?: Array<
44
- SwitchDef &
45
- CanvasDef & {
46
- conds?: Array<{
47
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
48
- cond: SwitchCondInnerStateCurrentCanvas | SwitchCondData
49
- }>
50
- }
51
- >
52
- items: Array<{
53
- item: (() => Brick) | SubspaceID
54
- frame: {
55
- x: number
56
- y: number
57
- width: number
58
- height: number
59
- standbyMode?: 'custom' | 'top' | 'left' | 'right' | 'bottom'
60
- standbyFrame?: {
61
- x?: number
62
- y?: number
63
- width?: number
64
- height?: number
65
- }
66
- standbyOpacity?: number
67
- standbyDelay?: number
68
- standbyDelayRandom?: number
69
- standbyEasing?: {
70
- default?: StandbyEasing
71
- x?: StandbyEasing
72
- y?: StandbyEasing
73
- width?: StandbyEasing
74
- height?: StandbyEasing
75
- opacity?: StandbyEasing
76
- }
77
- showingDelay?: number
78
- renderOutOfViewport?: boolean
79
- }
80
- hidden?: boolean // Hide in Editor
81
- }>
82
- }
package/types/common.ts DELETED
@@ -1,144 +0,0 @@
1
- import type { SwitchDef } from './switch'
2
- import type { Data } from './data'
3
- import type { Subspace } from './subspace'
4
- import type { AutomationMap } from './automation'
5
-
6
- export interface Brick {
7
- __typename: 'Brick'
8
- id: string
9
- alias?: string
10
- templateKey: string
11
- title?: string
12
- description?: string
13
- hideShortRef?: boolean
14
- property?: {}
15
- events: {}
16
- outlets?: {}
17
- animation?: {}
18
- switches?: Array<SwitchDef>
19
- }
20
-
21
- export enum LocalSyncStrategy {
22
- mainOnly = 'main-only',
23
- minorOnly = 'minor-only',
24
- }
25
-
26
- export interface Generator {
27
- __typename: 'Generator'
28
- id: string
29
- alias?: string
30
- templateKey: string
31
- title?: string
32
- description?: string
33
- hideShortRef?: boolean
34
- localSyncRunMode?: LocalSyncStrategy
35
- property?: {}
36
- events: {}
37
- outlets?: {}
38
- switches?: Array<SwitchDef>
39
- }
40
-
41
- export type SubspaceID = string
42
- export type SubpsaceAction = string
43
-
44
- export type Action = {
45
- __actionName: string
46
- parent: 'Brick' | 'Generator' | 'Subspace' | 'System'
47
- name?: string
48
- }
49
-
50
- // For standalone action types where specific event properties are not known
51
- export type EventProperty = string
52
-
53
- export type ActionWithParams<EP extends string = string> = Action & {
54
- params?: Array<{
55
- input: string
56
- value?: any | EP
57
- mapping?: string
58
- }>
59
- }
60
-
61
- export type ActionWithDataParams<EP extends string = string> = Action & {
62
- dataParams?: Array<{
63
- input: () => Data
64
- value?: any | EP
65
- mapping?: string
66
- }>
67
- }
68
-
69
- export type ItemBrickID = string
70
-
71
- // EP carries available event property keys for this event context
72
- // Use: EventAction<string & keyof TemplateEventPropsMap['Name']['event']>
73
- export type EventAction<EP extends string = string> = {
74
- handler: 'system' | (() => Brick | Generator) | SubspaceID | ItemBrickID
75
- action: ActionWithParams<EP> | ActionWithDataParams<EP>
76
- waitAsync?: boolean
77
- }
78
-
79
- export type EventActionForItem<EP extends string = string> = {
80
- handler:
81
- | 'system'
82
- | (() => Brick | Generator | { brickId: string; templateKey: string })
83
- | SubspaceID
84
- | ItemBrickID
85
- action: Action
86
- waitAsync?: boolean
87
- }
88
-
89
- export type ApplicationFont = {
90
- name: string
91
- url: string
92
- md5?: string
93
- }
94
-
95
- export type ApplicationSettings = {
96
- internetReachabilityUrl?: string
97
- enableDataLock?: boolean
98
- showDeprecatedFeatures?: boolean
99
- enableUnstableFeatures?: boolean // enable_unstable_bricks
100
- runtimeCacheOptions?: {
101
- disabled?: boolean
102
- behavior?: 'initiative' | 'passive'
103
- retryAttemptForFailure?: number
104
- }
105
- tvOptions?: {
106
- disabledSelectable?: boolean
107
- selectableColor?: string
108
- selectableBorder?: {
109
- borderStyle?: 'solid' | 'dashed' | 'dotted'
110
- borderTopColor?: string
111
- borderLeftColor?: string
112
- borderRightColor?: string
113
- borderBottomColor?: string
114
- // BRICK Grid unit
115
- borderTopSize?: number
116
- borderLeftSize?: number
117
- borderRightSize?: number
118
- borderBottomSize?: number
119
- borderTopLeftRadius?: number
120
- borderTopRightRadius?: number
121
- borderBottomLeftRadius?: number
122
- borderBottomRightRadius?: number
123
- }
124
- }
125
- ai?: {
126
- useAnthropicApiKeySystemData?: boolean
127
- useOpenAiApiKeySystemData?: boolean
128
- useGeminiApiKeySystemData?: boolean
129
- }
130
- hideShortRefs?: boolean
131
- }
132
-
133
- export type Application = {
134
- name: string
135
- description?: string
136
- subspaces: Subspace[]
137
- rootSubspace: Subspace
138
- fonts?: ApplicationFont[]
139
- settings?: ApplicationSettings
140
- automationMap?: AutomationMap
141
- metadata?: {
142
- [key: string]: any
143
- }
144
- }