@fugood/bricks-ctor 2.25.0-beta.7 → 2.25.0-beta.71

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 (135) 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/action-name-map.ts +0 -1015
  11. package/compile/index.ts +0 -1278
  12. package/compile/util.ts +0 -358
  13. package/index.ts +0 -6
  14. package/skills/bricks-ctor/SKILL.md +0 -32
  15. package/skills/bricks-ctor/rules/animation.md +0 -159
  16. package/skills/bricks-ctor/rules/architecture-patterns.md +0 -69
  17. package/skills/bricks-ctor/rules/automations.md +0 -221
  18. package/skills/bricks-ctor/rules/buttress.md +0 -156
  19. package/skills/bricks-ctor/rules/data-calculation.md +0 -209
  20. package/skills/bricks-ctor/rules/local-sync.md +0 -129
  21. package/skills/bricks-ctor/rules/media-flow.md +0 -158
  22. package/skills/bricks-ctor/rules/remote-data-bank.md +0 -196
  23. package/skills/bricks-ctor/rules/standby-transition.md +0 -124
  24. package/skills/bricks-design/LICENSE.txt +0 -180
  25. package/skills/bricks-design/SKILL.md +0 -66
  26. package/skills/rive-marketplace/SKILL.md +0 -99
  27. package/tools/_git-author.ts +0 -29
  28. package/tools/_shell.ts +0 -173
  29. package/tools/icons/.gitattributes +0 -1
  30. package/tools/icons/fa6pro-glyphmap.json +0 -4686
  31. package/tools/icons/fa6pro-meta.json +0 -1
  32. package/tools/mcp-tools/compile.ts +0 -92
  33. package/tools/mcp-tools/huggingface.ts +0 -762
  34. package/tools/mcp-tools/icons.ts +0 -81
  35. package/tools/mcp-tools/lottie.ts +0 -102
  36. package/tools/mcp-tools/media.ts +0 -110
  37. package/tools/preview-main.mjs +0 -293
  38. package/tools/preview.ts +0 -150
  39. package/types/animation.ts +0 -100
  40. package/types/automation.ts +0 -235
  41. package/types/brick-base.ts +0 -80
  42. package/types/bricks/Camera.ts +0 -246
  43. package/types/bricks/Chart.ts +0 -372
  44. package/types/bricks/GenerativeMedia.ts +0 -290
  45. package/types/bricks/Icon.ts +0 -98
  46. package/types/bricks/Image.ts +0 -126
  47. package/types/bricks/Items.ts +0 -476
  48. package/types/bricks/Lottie.ts +0 -168
  49. package/types/bricks/Maps.ts +0 -262
  50. package/types/bricks/QrCode.ts +0 -117
  51. package/types/bricks/Rect.ts +0 -150
  52. package/types/bricks/RichText.ts +0 -128
  53. package/types/bricks/Rive.ts +0 -220
  54. package/types/bricks/Sketch.ts +0 -254
  55. package/types/bricks/Slideshow.ts +0 -201
  56. package/types/bricks/Svg.ts +0 -99
  57. package/types/bricks/Text.ts +0 -148
  58. package/types/bricks/TextInput.ts +0 -242
  59. package/types/bricks/Video.ts +0 -175
  60. package/types/bricks/VideoStreaming.ts +0 -112
  61. package/types/bricks/WebRtcStream.ts +0 -65
  62. package/types/bricks/WebView.ts +0 -168
  63. package/types/bricks/index.ts +0 -22
  64. package/types/canvas.ts +0 -82
  65. package/types/common.ts +0 -144
  66. package/types/data-calc-command.ts +0 -7005
  67. package/types/data-calc-script.ts +0 -21
  68. package/types/data-calc.ts +0 -11
  69. package/types/data.ts +0 -95
  70. package/types/generators/AlarmClock.ts +0 -110
  71. package/types/generators/Assistant.ts +0 -621
  72. package/types/generators/BleCentral.ts +0 -247
  73. package/types/generators/BlePeripheral.ts +0 -208
  74. package/types/generators/CanvasMap.ts +0 -74
  75. package/types/generators/CastlesPay.ts +0 -87
  76. package/types/generators/DataBank.ts +0 -160
  77. package/types/generators/File.ts +0 -432
  78. package/types/generators/GraphQl.ts +0 -132
  79. package/types/generators/Http.ts +0 -222
  80. package/types/generators/HttpServer.ts +0 -176
  81. package/types/generators/Information.ts +0 -103
  82. package/types/generators/Intent.ts +0 -168
  83. package/types/generators/Iterator.ts +0 -108
  84. package/types/generators/Keyboard.ts +0 -105
  85. package/types/generators/LlmAnthropicCompat.ts +0 -212
  86. package/types/generators/LlmAppleBuiltin.ts +0 -159
  87. package/types/generators/LlmGgml.ts +0 -861
  88. package/types/generators/LlmMediaTekNeuroPilot.ts +0 -235
  89. package/types/generators/LlmMlx.ts +0 -227
  90. package/types/generators/LlmOnnx.ts +0 -213
  91. package/types/generators/LlmOpenAiCompat.ts +0 -312
  92. package/types/generators/LlmQualcommAiEngine.ts +0 -247
  93. package/types/generators/Mcp.ts +0 -637
  94. package/types/generators/McpServer.ts +0 -289
  95. package/types/generators/MediaFlow.ts +0 -170
  96. package/types/generators/MqttBroker.ts +0 -141
  97. package/types/generators/MqttClient.ts +0 -141
  98. package/types/generators/Question.ts +0 -408
  99. package/types/generators/RealtimeTranscription.ts +0 -287
  100. package/types/generators/RerankerGgml.ts +0 -191
  101. package/types/generators/SerialPort.ts +0 -151
  102. package/types/generators/SoundPlayer.ts +0 -94
  103. package/types/generators/SoundRecorder.ts +0 -130
  104. package/types/generators/SpeechToTextGgml.ts +0 -419
  105. package/types/generators/SpeechToTextOnnx.ts +0 -236
  106. package/types/generators/SpeechToTextPlatform.ts +0 -85
  107. package/types/generators/SqLite.ts +0 -159
  108. package/types/generators/Step.ts +0 -107
  109. package/types/generators/SttAppleBuiltin.ts +0 -130
  110. package/types/generators/Tcp.ts +0 -126
  111. package/types/generators/TcpServer.ts +0 -147
  112. package/types/generators/TextToSpeechAppleBuiltin.ts +0 -127
  113. package/types/generators/TextToSpeechGgml.ts +0 -221
  114. package/types/generators/TextToSpeechOnnx.ts +0 -178
  115. package/types/generators/TextToSpeechOpenAiLike.ts +0 -121
  116. package/types/generators/ThermalPrinter.ts +0 -191
  117. package/types/generators/Tick.ts +0 -83
  118. package/types/generators/Udp.ts +0 -120
  119. package/types/generators/VadGgml.ts +0 -250
  120. package/types/generators/VadOnnx.ts +0 -231
  121. package/types/generators/VadTraditional.ts +0 -138
  122. package/types/generators/VectorStore.ts +0 -257
  123. package/types/generators/Watchdog.ts +0 -107
  124. package/types/generators/WebCrawler.ts +0 -103
  125. package/types/generators/WebRtc.ts +0 -181
  126. package/types/generators/WebSocket.ts +0 -148
  127. package/types/generators/index.ts +0 -57
  128. package/types/index.ts +0 -13
  129. package/types/subspace.ts +0 -60
  130. package/types/switch.ts +0 -51
  131. package/types/system.ts +0 -707
  132. package/utils/calc.ts +0 -126
  133. package/utils/data.ts +0 -497
  134. package/utils/event-props.ts +0 -886
  135. package/utils/id.ts +0 -80
package/tools/preview.ts DELETED
@@ -1,150 +0,0 @@
1
- import { spawn } from 'node:child_process'
2
- import { readFile, writeFile } from 'node:fs/promises'
3
- import { watch, unlinkSync } from 'fs'
4
- import type { FSWatcher } from 'fs'
5
- import { createInterface } from 'node:readline'
6
- import { parseArgs } from 'util'
7
- import debounce from 'lodash/debounce'
8
- import { sh } from './_shell'
9
-
10
- const { values } = parseArgs({
11
- args: process.argv,
12
- options: {
13
- 'skip-typecheck': { type: 'boolean' },
14
- 'clear-cache': { type: 'boolean' },
15
- screenshot: { type: 'boolean' },
16
- 'screenshot-delay': { type: 'string' },
17
- 'screenshot-width': { type: 'string' },
18
- 'screenshot-height': { type: 'string' },
19
- 'screenshot-path': { type: 'string' },
20
- 'screenshot-no-headless': { type: 'boolean' },
21
- 'show-menu': { type: 'boolean' },
22
- 'test-id': { type: 'string' },
23
- 'test-title-like': { type: 'string' },
24
- 'no-keep-open': { type: 'boolean' },
25
- 'cdp-port': { type: 'string' },
26
- 'no-cdp': { type: 'boolean' },
27
- },
28
- strict: true,
29
- allowPositionals: true,
30
- })
31
-
32
- const cwd = process.cwd()
33
-
34
- const app = JSON.parse(await readFile(`${cwd}/application.json`, 'utf8'))
35
-
36
- const args: string[] = []
37
- if (values['clear-cache']) args.push('--clear-cache')
38
-
39
- let needWatcher = true
40
- if (values['screenshot']) {
41
- args.push(`--take-screenshot`)
42
- args.push(
43
- JSON.stringify({
44
- delay: Number(values['screenshot-delay']) || 1000,
45
- width: Number(values['screenshot-width']) || 600,
46
- height: Number(values['screenshot-height']) || 480,
47
- path: values['screenshot-path'] || `${cwd}/screenshot.jpg`,
48
- noHeadless: values['screenshot-no-headless'] ?? false,
49
- }),
50
- )
51
- needWatcher = !values['no-keep-open']
52
- }
53
-
54
- if (values['show-menu']) {
55
- args.push('--show-menu')
56
- }
57
-
58
- if (values['test-id']) {
59
- args.push('--test-id', values['test-id'])
60
- }
61
-
62
- if (values['test-title-like']) {
63
- args.push('--test-title-like', values['test-title-like'])
64
- }
65
-
66
- if (values['no-keep-open']) {
67
- args.push('--no-keep-open')
68
- }
69
-
70
- if (!values['no-cdp']) {
71
- const cdpPort = parseInt(values['cdp-port'] || '', 10) || 19852
72
- args.push('--cdp-port', String(cdpPort))
73
- }
74
-
75
- const useTypecheck = !values['skip-typecheck']
76
-
77
- const compile = async () => {
78
- if (useTypecheck) await sh`bun typecheck`
79
- await sh`bun compile.ts`
80
- }
81
-
82
- await compile()
83
-
84
- let watcher: FSWatcher | null = null
85
- if (needWatcher) {
86
- const compileDebounced = debounce(compile, 500)
87
- watcher = watch(`${cwd}/subspaces`, { recursive: true }, async (event, filename) => {
88
- console.log(`Detected ${event} in ${filename}`)
89
- compileDebounced()
90
- })
91
- }
92
-
93
- const devtoolsInfoPath = `${cwd}/.bricks/devtools.json`
94
-
95
- const cleanupDevtoolsInfo = () => {
96
- try {
97
- unlinkSync(devtoolsInfoPath)
98
- } catch {}
99
- }
100
-
101
- // Kill existing preview process if devtools.json contains a stale pid
102
- try {
103
- const devtoolsInfo = JSON.parse(await readFile(devtoolsInfoPath, 'utf8'))
104
- if (devtoolsInfo.pid) {
105
- try {
106
- process.kill(devtoolsInfo.pid)
107
- } catch {}
108
- cleanupDevtoolsInfo()
109
- }
110
- } catch {}
111
-
112
- const proc = spawn(
113
- 'bunx',
114
- ['--bun', 'electron', `${import.meta.dirname}/preview-main.mjs`, ...args],
115
- {
116
- env: { ...process.env, BRICKS_STAGE: app.stage || 'production' },
117
- stdio: ['inherit', 'pipe', 'inherit'],
118
- },
119
- )
120
-
121
- const rl = createInterface({ input: proc.stdout! })
122
-
123
- rl.on('line', (line) => {
124
- if (line.startsWith('[TEST_RESULT_TOON]')) {
125
- const toonData = line.replace('[TEST_RESULT_TOON]', '')
126
- console.log(toonData)
127
- return
128
- }
129
- if (!line) return
130
- // Detect CDP server startup from preview-main output
131
- const cdpMatch = line.match(/^CDP server: ws:\/\/localhost:(\d+)/)
132
- if (cdpMatch) {
133
- const info = {
134
- port: parseInt(cdpMatch[1], 10),
135
- pid: proc.pid,
136
- address: 'localhost',
137
- name: `${app.name || 'Unnamed'} (CTOR Preview)`,
138
- startedAt: new Date().toISOString(),
139
- }
140
- writeFile(devtoolsInfoPath, JSON.stringify(info, null, 2))
141
- }
142
- console.log(line)
143
- })
144
-
145
- await new Promise<void>((resolve) => {
146
- proc.on('close', () => resolve())
147
- })
148
-
149
- cleanupDevtoolsInfo()
150
- if (watcher) watcher.close()
@@ -1,100 +0,0 @@
1
- export type Easing =
2
- | ''
3
- | 'easeInSine'
4
- | 'easeOutSine'
5
- | 'easeInOutSine'
6
- | 'easeInQuad'
7
- | 'easeOutQuad'
8
- | 'easeInOutQuad'
9
- | 'easeInCubic'
10
- | 'easeOutCubic'
11
- | 'easeInOutCubic'
12
- | 'easeInQuart'
13
- | 'easeOutQuart'
14
- | 'easeInOutQuart'
15
- | 'easeInQuint'
16
- | 'easeOutQuint'
17
- | 'easeInOutQuint'
18
- | 'easeInExpo'
19
- | 'easeOutExpo'
20
- | 'easeInOutExpo'
21
- | 'easeInCirc'
22
- | 'easeOutCirc'
23
- | 'easeInOutCirc'
24
- | 'easeInBack'
25
- | 'easeOutBack'
26
- | 'easeInOutBack'
27
- | 'easeInElastic'
28
- | 'easeOutElastic'
29
- | 'easeInOutElastic'
30
- | 'easeInBounce'
31
- | 'easeOutBounce'
32
- | 'easeInOutBounce'
33
- | string // Support format like 'cubic-bezier(x1, y1, x2, y2)'
34
-
35
- export interface AnimationTimingConfig {
36
- __type: 'AnimationTimingConfig'
37
- toValue: number // BRICKS Grid unit
38
- duration: number // ms
39
- easing: Easing
40
- delay: number // ms
41
- isInteraction: boolean
42
- }
43
-
44
- export interface AnimationSpringConfig {
45
- __type: 'AnimationSpringConfig'
46
- toValue: number // BRICKS Grid unit
47
- friction: number
48
- tension: number
49
- speed: number
50
- bounciness: number
51
- }
52
-
53
- export interface AnimationDecayConfig {
54
- __type: 'AnimationDecayConfig'
55
- toValue: number // BRICKS Grid unit
56
- velocity: number
57
- deceleration: number
58
- isInteraction: boolean
59
- }
60
-
61
- export interface AnimationDef {
62
- __typename: 'Animation'
63
- id: string
64
- alias?: string
65
- title?: string
66
- description?: string
67
- hideShortRef?: boolean
68
- runType?: 'once' | 'loop'
69
- property:
70
- | 'transform.translateX'
71
- | 'transform.translateY'
72
- | 'transform.scale'
73
- | 'transform.scaleX'
74
- | 'transform.scaleY'
75
- | 'transform.rotate'
76
- | 'transform.rotateX'
77
- | 'transform.rotateY'
78
- | 'opacity'
79
- config: AnimationTimingConfig | AnimationSpringConfig | AnimationDecayConfig
80
- }
81
-
82
- export interface AnimationComposeDef {
83
- __typename: 'AnimationCompose'
84
- id: string
85
- alias?: string
86
- title: string
87
- description?: string
88
- hideShortRef?: boolean
89
- runType?: 'once' | 'loop'
90
- composeType: 'parallel' | 'sequence'
91
- items: Array<() => Animation>
92
- }
93
-
94
- export type Animation = AnimationDef | AnimationComposeDef
95
-
96
- export interface AnimationBasicEvents {
97
- showStart?: Animation
98
- standby?: Animation
99
- breatheStart?: Animation
100
- }
@@ -1,235 +0,0 @@
1
- /**
2
- * Automation (Test) System Types
3
- *
4
- * This module defines TypeScript types for the BRICKS automation/testing system.
5
- * The automation system allows defining automated test sequences that can be
6
- * triggered on launch, anytime, or via cron schedules.
7
- */
8
-
9
- import type { Subspace } from './subspace'
10
- import type { Brick, Generator } from './common'
11
- import type { Canvas } from './canvas'
12
- import type { Data } from './data'
13
-
14
- // Entity reference types - can be string ID or getter function
15
- export type SubspaceRef = string | (() => Subspace)
16
- export type BrickRef = string | (() => Brick)
17
- export type GeneratorRef = string | (() => Generator)
18
- export type CanvasRef = string | (() => Canvas)
19
- export type DataRef = string | (() => Data)
20
-
21
- // Variable types for test variables
22
- export type TestVariableType = 'string' | 'number' | 'array' | 'object' | 'bool' | 'any'
23
-
24
- // Trigger types for when tests should run
25
- export type TestTriggerType = 'launch' | 'anytime' | 'cron'
26
-
27
- // Jump condition operators for conditional test flow
28
- export type JumpConditionOperator = '==' | '!=' | '>' | '>=' | '<' | '<='
29
-
30
- // Jump condition status types
31
- export type JumpConditionStatus = 'finished' | 'failed'
32
-
33
- // Jump condition types
34
- export type JumpConditionType = 'status' | 'variable'
35
-
36
- /**
37
- * Jump condition for controlling test case flow
38
- */
39
- export interface TestCaseJumpCondition {
40
- type: JumpConditionType
41
- // For status-based conditions
42
- status?: JumpConditionStatus
43
- // For variable-based conditions
44
- variable?: string
45
- operator?: JumpConditionOperator
46
- value?: any
47
- // The test case to jump to (getter function for dynamic IDs or string for static IDs)
48
- jump_to?: string | (() => TestCase)
49
- }
50
-
51
- /**
52
- * Test variable definition
53
- */
54
- export interface TestVariable {
55
- __typename: 'TestVariable'
56
- id: string
57
- name: string
58
- type: TestVariableType
59
- value: any
60
- }
61
-
62
- /**
63
- * Post delay rules for test cases
64
- */
65
- export type PostDelayRule = 'include-action-time' | 'exclude-action-time'
66
-
67
- /**
68
- * Test method names (13 methods)
69
- */
70
- export type TestMethodName =
71
- | 'brick_press'
72
- | 'brick_exists'
73
- | 'wait_until_brick_exists'
74
- | 'wait_until_event_trigger'
75
- | 'wait_until_canvas_change'
76
- | 'keydown'
77
- | 'keyup'
78
- | 'http_request'
79
- | 'assert_property'
80
- | 'wait_until_property_change'
81
- | 'execute_action'
82
- | 'match_screenshot'
83
- | 'delay'
84
-
85
- /**
86
- * Run array types for each test method
87
- * Each method has a specific signature: [methodName, ...args]
88
- */
89
-
90
- // [methodName, subspaceId, brickId, options?]
91
- export type TestMethodRunBrickPress = ['brick_press', SubspaceRef, BrickRef, Record<string, any>?]
92
-
93
- // [methodName, subspaceId, brickId, frame?]
94
- export type TestMethodRunBrickExists = ['brick_exists', SubspaceRef, BrickRef, Record<string, any>?]
95
-
96
- // [methodName, subspaceId, brickId, timeout?, frame?]
97
- export type TestMethodRunWaitUntilBrickExists = [
98
- 'wait_until_brick_exists',
99
- SubspaceRef,
100
- BrickRef,
101
- number?,
102
- Record<string, any>?,
103
- ]
104
-
105
- // [methodName, subspaceId, senderId, eventKey, timeout?]
106
- // senderId can be brick or generator
107
- export type TestMethodRunWaitUntilEventTrigger = [
108
- 'wait_until_event_trigger',
109
- SubspaceRef,
110
- BrickRef | GeneratorRef,
111
- string,
112
- number?,
113
- ]
114
-
115
- // [methodName, subspaceId, canvasId, timeout?]
116
- export type TestMethodRunWaitUntilCanvasChange = [
117
- 'wait_until_canvas_change',
118
- SubspaceRef,
119
- CanvasRef,
120
- number?,
121
- ]
122
-
123
- // [methodName, keyCode, pressedKey?, flags?]
124
- export type TestMethodRunKeydown = ['keydown', number, string?, number?]
125
-
126
- // [methodName, keyCode, pressedKey?, flags?]
127
- export type TestMethodRunKeyup = ['keyup', number, string?, number?]
128
-
129
- // [methodName, url, options?]
130
- export type TestMethodRunHttpRequest = ['http_request', string, Record<string, any>?]
131
-
132
- // [methodName, subspaceId, propertyId, value]
133
- export type TestMethodRunAssertProperty = ['assert_property', SubspaceRef, DataRef, any]
134
-
135
- // [methodName, subspaceId, propertyId, value, timeout?]
136
- export type TestMethodRunWaitUntilPropertyChange = [
137
- 'wait_until_property_change',
138
- SubspaceRef,
139
- DataRef,
140
- any,
141
- number?,
142
- ]
143
-
144
- // [methodName, subspaceId, handler, action, params?, options?]
145
- export type TestMethodRunExecuteAction = [
146
- 'execute_action',
147
- SubspaceRef,
148
- string,
149
- string,
150
- Record<string, any>?,
151
- Record<string, any>?,
152
- ]
153
-
154
- // [methodName, screenshotName, threshold?, maxRetry?]
155
- export type TestMethodRunMatchScreenshot = ['match_screenshot', string, number?, number?]
156
-
157
- // [methodName, subspaceId?, propertyId?, defaultValue?]
158
- export type TestMethodRunDelay = ['delay', SubspaceRef?, DataRef?, number?]
159
-
160
- /**
161
- * Union type for all test method run arrays
162
- */
163
- export type TestMethodRun =
164
- | TestMethodRunBrickPress
165
- | TestMethodRunBrickExists
166
- | TestMethodRunWaitUntilBrickExists
167
- | TestMethodRunWaitUntilEventTrigger
168
- | TestMethodRunWaitUntilCanvasChange
169
- | TestMethodRunKeydown
170
- | TestMethodRunKeyup
171
- | TestMethodRunHttpRequest
172
- | TestMethodRunAssertProperty
173
- | TestMethodRunWaitUntilPropertyChange
174
- | TestMethodRunExecuteAction
175
- | TestMethodRunMatchScreenshot
176
- | TestMethodRunDelay
177
-
178
- /**
179
- * Test case definition
180
- */
181
- export interface TestCase {
182
- __typename: 'TestCase'
183
- id: string
184
- name: string
185
- hideShortRef?: boolean
186
- run: TestMethodRun
187
- exit_on_failed: boolean
188
- commented: boolean
189
- pre_delay: number
190
- post_delay: number
191
- post_delay_rule?: PostDelayRule
192
- jump_cond: TestCaseJumpCondition[]
193
- }
194
-
195
- /**
196
- * Local sync mode for tests
197
- */
198
- export type LocalSyncMode = 'main-only' | 'minor-only'
199
-
200
- /**
201
- * Automation test definition
202
- */
203
- export interface AutomationTest {
204
- __typename: 'AutomationTest'
205
- id: string
206
- title: string
207
- hideShortRef?: boolean
208
- timeout: number
209
- trigger_type?: TestTriggerType
210
- cron?: string // Cron expression when trigger_type is 'cron'
211
- skip_trigger_type_check?: boolean
212
- local_sync?: LocalSyncMode
213
- cases: TestCase[]
214
- variables: TestVariable[]
215
- meta?: Record<string, any>
216
- }
217
-
218
- /**
219
- * Automation test map (a collection of tests)
220
- */
221
- export interface AutomationTestMap {
222
- __typename: 'AutomationTestMap'
223
- id: string
224
- title: string
225
- hideShortRef?: boolean
226
- createdAt: number
227
- tests: AutomationTest[]
228
- }
229
-
230
- /**
231
- * Root automation map type (record of automation test maps by ID)
232
- */
233
- export type AutomationMap = {
234
- [mapId: string]: AutomationTestMap
235
- }
@@ -1,80 +0,0 @@
1
- /* Auto generated by build script */
2
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from './switch'
3
- import type { Data, DataLink } from './data'
4
- import type { Animation, AnimationBasicEvents } from './animation'
5
- import type {
6
- Brick,
7
- EventAction,
8
- EventActionForItem,
9
- ActionWithDataParams,
10
- ActionWithParams,
11
- Action,
12
- EventProperty,
13
- } from './common'
14
-
15
- export interface BrickBasicProperty {
16
- /* The brick opacity (0 ~ 1) */
17
- opacity?: number | DataLink
18
- /* The brick background color */
19
- backgroundColor?: string | DataLink
20
- /* The brick border style */
21
- borderStyle?: 'solid' | 'dotted' | 'dashed' | DataLink
22
- /* The brick border width (top) */
23
- borderTopSize?: number | DataLink
24
- /* The brick border color (top) */
25
- borderTopColor?: string | DataLink
26
- /* The brick border radius (top left) */
27
- borderTopLeftRadius?: number | DataLink
28
- /* The brick border radius (top right) */
29
- borderTopRightRadius?: number | DataLink
30
- /* The brick border width (bottom) */
31
- borderBottomSize?: number | DataLink
32
- /* The brick border color (bottom) */
33
- borderBottomColor?: string | DataLink
34
- /* The brick border radius (bottom left) */
35
- borderBottomLeftRadius?: number | DataLink
36
- /* The brick border radius (bottom right) */
37
- borderBottomRightRadius?: number | DataLink
38
- /* The brick border width (left) */
39
- borderLeftSize?: number | DataLink
40
- /* The brick border color (bottom) */
41
- borderLeftColor?: string | DataLink
42
- /* The brick border width (right) */
43
- borderRightSize?: number | DataLink
44
- /* The brick border color (right) */
45
- borderRightColor?: string | DataLink
46
- /* The brick rotate (deg) */
47
- rotate?: number | DataLink
48
- /* The brick rotateX (deg) */
49
- rotateX?: number | DataLink
50
- /* The brick rotateY (deg) */
51
- rotateY?: number | DataLink
52
- /* The brick shadow color */
53
- shadowColor?: string | DataLink
54
- /* The brick shadow opacity (0 ~ 1) */
55
- shadowOpacity?: number | DataLink
56
- /* The brick shadow radius */
57
- shadowRadius?: number | DataLink
58
- /* The brick shadow offset width */
59
- shadowOffsetWidth?: number | DataLink
60
- /* The brick shadow offset height */
61
- shadowOffsetHeight?: number | DataLink
62
- /* Brick pressable.
63
- Disabled: Disabled even if event or animation is set.
64
- Bypass: Disable and bypass the touch event on the brick. */
65
- pressable?: 'enabled' | 'disabled' | 'bypass' | DataLink
66
- /* Delay in milliseconds before long press is triggered */
67
- delayLongPress?: number | DataLink
68
- }
69
-
70
- export interface BrickBasicEvents {
71
- showStart?: Array<EventAction>
72
- switchUpdate?: Array<EventAction>
73
- standby?: Array<EventAction>
74
- }
75
-
76
- export interface BrickBasicEventsForItem {
77
- showStart?: Array<EventActionForItem>
78
- switchUpdate?: Array<EventActionForItem>
79
- standby?: Array<EventActionForItem>
80
- }