@fugood/bricks-project 2.25.0-beta.18 → 2.25.0-beta.20

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.
@@ -350,6 +350,62 @@ export const templateActionNameMap = {
350
350
  strokeWidth: 'BRICK_SKETCH_STROKE_WIDTH',
351
351
  },
352
352
  },
353
+ BRICK_SCENE_3D: {
354
+ BRICK_SCENE_3D_ADD_OBJECT: {
355
+ objectId: 'BRICK_SCENE_3D_OBJECT_ID',
356
+ objectType: 'BRICK_SCENE_3D_OBJECT_TYPE',
357
+ objectUrl: 'BRICK_SCENE_3D_OBJECT_URL',
358
+ objectMd5: 'BRICK_SCENE_3D_OBJECT_MD5',
359
+ objectPosition: 'BRICK_SCENE_3D_OBJECT_POSITION',
360
+ objectRotation: 'BRICK_SCENE_3D_OBJECT_ROTATION',
361
+ objectScale: 'BRICK_SCENE_3D_OBJECT_SCALE',
362
+ objectColor: 'BRICK_SCENE_3D_OBJECT_COLOR',
363
+ },
364
+ BRICK_SCENE_3D_REMOVE_OBJECT: {
365
+ objectId: 'BRICK_SCENE_3D_OBJECT_ID',
366
+ },
367
+ BRICK_SCENE_3D_UPDATE_OBJECT: {
368
+ objectId: 'BRICK_SCENE_3D_OBJECT_ID',
369
+ objectPosition: 'BRICK_SCENE_3D_OBJECT_POSITION',
370
+ objectRotation: 'BRICK_SCENE_3D_OBJECT_ROTATION',
371
+ objectScale: 'BRICK_SCENE_3D_OBJECT_SCALE',
372
+ objectVisible: 'BRICK_SCENE_3D_OBJECT_VISIBLE',
373
+ objectColor: 'BRICK_SCENE_3D_OBJECT_COLOR',
374
+ },
375
+ BRICK_SCENE_3D_SET_CAMERA: {
376
+ cameraPosition: 'BRICK_SCENE_3D_CAMERA_POSITION',
377
+ cameraTarget: 'BRICK_SCENE_3D_CAMERA_TARGET',
378
+ cameraFov: 'BRICK_SCENE_3D_CAMERA_FOV',
379
+ cameraAnimateMs: 'BRICK_SCENE_3D_CAMERA_ANIMATE_MS',
380
+ },
381
+ BRICK_SCENE_3D_LOOK_AT: {
382
+ objectId: 'BRICK_SCENE_3D_OBJECT_ID',
383
+ },
384
+ BRICK_SCENE_3D_PLAY_ANIMATION: {
385
+ objectId: 'BRICK_SCENE_3D_OBJECT_ID',
386
+ animationName: 'BRICK_SCENE_3D_ANIMATION_NAME',
387
+ animationLoop: 'BRICK_SCENE_3D_ANIMATION_LOOP',
388
+ animationSpeed: 'BRICK_SCENE_3D_ANIMATION_SPEED',
389
+ },
390
+ BRICK_SCENE_3D_STOP_ANIMATION: {
391
+ objectId: 'BRICK_SCENE_3D_OBJECT_ID',
392
+ animationName: 'BRICK_SCENE_3D_ANIMATION_NAME',
393
+ },
394
+ BRICK_SCENE_3D_SET_BACKGROUND: {
395
+ backgroundColor: 'BRICK_SCENE_3D_BACKGROUND_COLOR',
396
+ backgroundHdrUrl: 'BRICK_SCENE_3D_BACKGROUND_HDR_URL',
397
+ backgroundMd5: 'BRICK_SCENE_3D_BACKGROUND_MD5',
398
+ },
399
+ BRICK_SCENE_3D_SET_CONTROLS: {
400
+ controlsEnabled: 'BRICK_SCENE_3D_CONTROLS_ENABLED',
401
+ controlsAutoRotate: 'BRICK_SCENE_3D_CONTROLS_AUTO_ROTATE',
402
+ controlsAutoRotateSpeed: 'BRICK_SCENE_3D_CONTROLS_AUTO_ROTATE_SPEED',
403
+ },
404
+ BRICK_SCENE_3D_SCREENSHOT: {
405
+ screenshotFormat: 'BRICK_SCENE_3D_SCREENSHOT_FORMAT',
406
+ screenshotQuality: 'BRICK_SCENE_3D_SCREENSHOT_QUALITY',
407
+ },
408
+ },
353
409
 
354
410
  GENERATOR_FILE: {
355
411
  GENERATOR_FILE_READ_CONTENT: {
package/compile/index.ts CHANGED
@@ -154,11 +154,13 @@ const basicAnimationEvents = ['show', 'standby', 'breatheStart']
154
154
 
155
155
  const compileAnimations = (
156
156
  templateKey: string,
157
- animations: { [key: string]: Animation },
157
+ animations: { [key: string]: Animation | (() => Animation) },
158
158
  errorReference: string,
159
159
  ) =>
160
160
  Object.entries(animations).reduce((acc, [key, animation]) => {
161
- const animationId = assertEntryId(animation?.id, 'ANIMATION', errorReference)
161
+ // Animation events accept either a direct Animation or a getter; unwrap.
162
+ const resolved = typeof animation === 'function' ? animation() : animation
163
+ const animationId = assertEntryId(resolved?.id, 'ANIMATION', errorReference)
162
164
  acc[convertEventKey(basicAnimationEvents.includes(key) ? 'BRICK' : templateKey, key)] =
163
165
  `ANIMATION#${animationId}`
164
166
  return acc
@@ -483,6 +485,8 @@ const preloadTypes = [
483
485
  'ggml-model-asset',
484
486
  'gguf-model-asset',
485
487
  'binary-asset',
488
+ 'mlx-model-asset',
489
+ 'scene3d-objects',
486
490
  ]
487
491
 
488
492
  const compileKind = (kind: Data['kind']) => {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.25.0-beta.18",
3
+ "version": "2.25.0-beta.20",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "typecheck": "tsc --noEmit",
7
7
  "build": "bun scripts/build.js"
8
8
  },
9
9
  "dependencies": {
10
- "@fugood/bricks-cli": "^2.25.0-beta.18",
10
+ "@fugood/bricks-cli": "^2.25.0-beta.20",
11
11
  "@huggingface/gguf": "^0.3.2",
12
12
  "@iarna/toml": "^3.0.0",
13
13
  "@modelcontextprotocol/sdk": "^1.15.0",
package/package.json.bak CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@fugood/bricks-ctor",
3
- "version": "2.25.0-beta.18",
3
+ "version": "2.25.0-beta.20",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "typecheck": "tsc --noEmit",
7
7
  "build": "bun scripts/build.js"
8
8
  },
9
9
  "dependencies": {
10
- "@fugood/bricks-cli": "^2.25.0-beta.18",
10
+ "@fugood/bricks-cli": "^2.25.0-beta.20",
11
11
  "@huggingface/gguf": "^0.3.2",
12
12
  "@iarna/toml": "^3.0.0",
13
13
  "@modelcontextprotocol/sdk": "^1.15.0",
@@ -84,7 +84,7 @@ The load-bearing laws. Each is unpacked in [`references/architecture-truths.md`]
84
84
  6. **Frames are grid units.** Off-grid placement is legal but only ever intentional (overflow effects, anchor-at-origin tricks). It is never a nudge to escape the grid. Bricks fully outside the grid are auto-culled.
85
85
  7. **Standby Transition is part of the design language.** Every visible Brick gets an entrance offset (`standbyMode` + `standbyOpacity` + `standbyDelay`); the runtime's auto-tween handles in-flight motion. Snap-cuts are reserved for emphasis (alarm states), never for routine navigation.
86
86
  8. **Subspace is a typed module.** Inputs are call-by-value-on-host-change; outlets emit update + value-change events on the host. Extract a Subspace only when the same flow appears 2+ times or when the boundary scopes Data meaningfully — never as a "tidy up" tactic.
87
- 9. **DataCalculation is for derivation only.** Pure inputs → outputs (DataCalculationScript or DataCalculationMap). If your transformation has side effects, navigation, or async I/O, it belongs in an Event Action chain or a Generator. DataCalc orchestrating DataCalc is the wrong primitive.
87
+ 9. **DataCalculation is for derivation, not orchestration.** Inputs → outputs via DataCalculationScript or DataCalculationMap. Keep scripts pure by default; `enableAsync: true` (Promise / timers / async libs) and Map `FILE_*` commands are available when derivation genuinely needs them. Network calls, navigation, and DataCalc-triggers-DataCalc fanout belong in Event Action chains or Generators.
88
88
  10. **No scroll, no overflow, no responsive reflow.** Frames are fixed; what doesn't fit doesn't show. Design within the Canvas; don't import web habits.
89
89
 
90
90
  ## Commit to a design language
@@ -96,19 +96,26 @@ A Subspace is a self-contained mini-Application: own Canvases, own Bricks, own G
96
96
 
97
97
  **Failure mode:** Subspaces with leaky contracts (every host Data exposed as a Prop). Tighten the contract; if you can't, the boundary is wrong.
98
98
 
99
- ## 9. DataCalculation is for derivation only
99
+ ## 9. DataCalculation is for derivation, not orchestration
100
100
 
101
- Two flavours: `DataCalculationScript` (a JS function with named inputs / outputs) and `DataCalculationMap` (a node-graph of `DataCommand`s with sandbox primitives — string, math, collection, datetime, color, etc.). Both are pure transformations: inputs → outputs.
101
+ Two flavours:
102
+
103
+ - **`DataCalculationScript`** — a sandboxed JS function with named inputs / outputs. Default is sync + pure; opt into async with `enableAsync: true`, which unlocks `Promise`, `setTimeout` / `setInterval` / `setImmediate`, `requestAnimationFrame`, and the full lodash surface (`debounce`, `delay`, `defer`). Bundled libraries include lodash, voca, mathjs, chroma, moment, json5, qs, url, bytes, ms, base45, iconv, nanoid, md5, crypto-browserify, jsrsasign (JWS), cose-js, fflate (gzip/zlib), cbor, fs (limited; no download/upload), officeparser, turndown, opencc-js, toon-format. Runs on Hermes (Android) and JavaScriptCore (iOS) — keep that in mind for engine pitfalls.
104
+ - **`DataCalculationMap`** — a node-graph of `DataCommand`s spanning these categories: `COLLECTION`, `COLOR`, `CONSTANT`, `DATETIME`, `FILE` (file-system ops: `READ` / `WRITE` / `APPEND` / `MKDIR` / `COPY_FILE` / `MOVE_FILE` / `UNLINK` / `EXISTS` / `STAT` / etc.), `ITERATEE`, `LOGICTYPE`, `MATH`, `OBJECT`, `SANDBOX` (`SANDBOX_RUN_JAVASCRIPT` runs a script node inside the graph), `STRING`.
105
+
106
+ Derivation is the intent. Purity is a strong default and the right framing for the common case, but it is a best practice — not a hard runtime restriction. `enableAsync` and `FILE_*` exist because some derivation work (document parsing, decompression, signing, reading a cached file) genuinely needs them.
102
107
 
103
108
  **Use it for**:
104
109
  - Format conversion (date → human-readable, currency → localized string).
105
110
  - Combining Data values into a derived display value.
106
111
  - Reductions / iterations over a collection.
107
112
  - Boolean conditions feeding a Switch.
113
+ - Async derivation pipelines: decode → decompress → parse → verify (cbor, fflate, cose-js, officeparser, turndown).
114
+ - Reading cached files written earlier in the flow (Map `FILE_*` commands or Script `fs`).
108
115
 
109
116
  **Triggering**: `triggerMode: 'auto'` re-runs on input change (watch for circular dependencies); `'manual'` only runs on `PROPERTY_BANK_COMMAND` action.
110
117
 
111
- **Do not use** for orchestration, side effects, navigation, async I/O, network calls, or anything that should be in an Event Action chain or a Generator. A DataCalc that triggers DataCalc that triggers DataCalc is an orchestration system in the wrong primitive — promote to event chains.
118
+ **Do not use** for orchestration, navigation, network calls (no `fetch` / XHR in the sandbox — that's a Generator's job), or anything that should be in an Event Action chain or a Generator. A DataCalc that triggers DataCalc that triggers DataCalc is an orchestration system in the wrong primitive — promote to event chains. `enableAsync` and `FILE_*` are tools for derivation, not a licence to smuggle flow control into the calc layer.
112
119
 
113
120
  **Failure mode:** spinning up a Generator just to do a string concat or unit conversion. That's a DataCalc job; the inverse misuse is just as common.
114
121
 
@@ -104,8 +104,13 @@ export interface AnimationComposeDef {
104
104
 
105
105
  export type Animation = AnimationDef | AnimationComposeDef
106
106
 
107
+ // Animation event handlers accept either a direct Animation or a getter that
108
+ // returns one. The getter form is useful for lazy/forward references between
109
+ // animations defined across files.
110
+ export type AnimationOrGetter = Animation | (() => Animation)
111
+
107
112
  export interface AnimationBasicEvents {
108
- showStart?: Animation
109
- standby?: Animation
110
- breatheStart?: Animation
113
+ showStart?: AnimationOrGetter
114
+ standby?: AnimationOrGetter
115
+ breatheStart?: AnimationOrGetter
111
116
  }
@@ -1,7 +1,7 @@
1
1
  /* Auto generated by build script */
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from './switch'
3
3
  import type { Data, DataLink } from './data'
4
- import type { Animation, AnimationBasicEvents } from './animation'
4
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from './animation'
5
5
  import type {
6
6
  Brick,
7
7
  EventAction,
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -213,13 +213,13 @@ Default property:
213
213
  faceDetected?: () => Data<Array<{ [key: string]: any }>>
214
214
  }
215
215
  animation?: AnimationBasicEvents & {
216
- stateChange?: Animation
217
- recordStart?: Animation
218
- recordEnd?: Animation
219
- barcodeRead?: Animation
220
- pictureTaken?: Animation
221
- recordFinish?: Animation
222
- mountError?: Animation
216
+ stateChange?: AnimationOrGetter
217
+ recordStart?: AnimationOrGetter
218
+ recordEnd?: AnimationOrGetter
219
+ barcodeRead?: AnimationOrGetter
220
+ pictureTaken?: AnimationOrGetter
221
+ recordFinish?: AnimationOrGetter
222
+ mountError?: AnimationOrGetter
223
223
  }
224
224
  }
225
225
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -343,9 +343,9 @@ Default property:
343
343
  >
344
344
  }
345
345
  animation?: AnimationBasicEvents & {
346
- onRender?: Animation
347
- onPress?: Animation
348
- onLegendSelectChanged?: Animation
346
+ onRender?: AnimationOrGetter
347
+ onPress?: AnimationOrGetter
348
+ onLegendSelectChanged?: AnimationOrGetter
349
349
  }
350
350
  }
351
351
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -250,20 +250,20 @@ Default property:
250
250
  loading?: () => Data<boolean>
251
251
  }
252
252
  animation?: AnimationBasicEvents & {
253
- generativeMediaOnPress?: Animation
254
- generativeMediaOnPressIn?: Animation
255
- generativeMediaOnPressOut?: Animation
256
- generativeMediaOnLongPress?: Animation
257
- generativeMediaOnFocus?: Animation
258
- generativeMediaOnBlur?: Animation
259
- onSuccess?: Animation
260
- onError?: Animation
261
- promptStart?: Animation
262
- promptSuccess?: Animation
263
- promptError?: Animation
264
- loadStart?: Animation
265
- loadSuccess?: Animation
266
- loadError?: Animation
253
+ generativeMediaOnPress?: AnimationOrGetter
254
+ generativeMediaOnPressIn?: AnimationOrGetter
255
+ generativeMediaOnPressOut?: AnimationOrGetter
256
+ generativeMediaOnLongPress?: AnimationOrGetter
257
+ generativeMediaOnFocus?: AnimationOrGetter
258
+ generativeMediaOnBlur?: AnimationOrGetter
259
+ onSuccess?: AnimationOrGetter
260
+ onError?: AnimationOrGetter
261
+ promptStart?: AnimationOrGetter
262
+ promptSuccess?: AnimationOrGetter
263
+ promptError?: AnimationOrGetter
264
+ loadStart?: AnimationOrGetter
265
+ loadSuccess?: AnimationOrGetter
266
+ loadError?: AnimationOrGetter
267
267
  }
268
268
  }
269
269
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -66,12 +66,12 @@ Default property:
66
66
  brickFocusing?: () => Data<boolean>
67
67
  }
68
68
  animation?: AnimationBasicEvents & {
69
- onPress?: Animation
70
- onPressIn?: Animation
71
- onPressOut?: Animation
72
- onLongPress?: Animation
73
- onFocus?: Animation
74
- onBlur?: Animation
69
+ onPress?: AnimationOrGetter
70
+ onPressIn?: AnimationOrGetter
71
+ onPressOut?: AnimationOrGetter
72
+ onLongPress?: AnimationOrGetter
73
+ onFocus?: AnimationOrGetter
74
+ onBlur?: AnimationOrGetter
75
75
  }
76
76
  }
77
77
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -92,14 +92,14 @@ Default property:
92
92
  brickFocusing?: () => Data<boolean>
93
93
  }
94
94
  animation?: AnimationBasicEvents & {
95
- onPress?: Animation
96
- onPressIn?: Animation
97
- onPressOut?: Animation
98
- onLongPress?: Animation
99
- onFocus?: Animation
100
- onBlur?: Animation
101
- onLoad?: Animation
102
- onError?: Animation
95
+ onPress?: AnimationOrGetter
96
+ onPressIn?: AnimationOrGetter
97
+ onPressOut?: AnimationOrGetter
98
+ onLongPress?: AnimationOrGetter
99
+ onFocus?: AnimationOrGetter
100
+ onBlur?: AnimationOrGetter
101
+ onLoad?: AnimationOrGetter
102
+ onError?: AnimationOrGetter
103
103
  }
104
104
  }
105
105
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -438,12 +438,12 @@ Default property:
438
438
  pageIsOutOfBound?: () => Data<boolean>
439
439
  }
440
440
  animation?: AnimationBasicEvents & {
441
- onPageRender?: Animation
442
- onPageChange?: Animation
443
- onPageOutOfBound?: Animation
444
- onIntoDetailMode?: Animation
445
- onIntoListMode?: Animation
446
- onError?: Animation
441
+ onPageRender?: AnimationOrGetter
442
+ onPageChange?: AnimationOrGetter
443
+ onPageOutOfBound?: AnimationOrGetter
444
+ onIntoDetailMode?: AnimationOrGetter
445
+ onIntoListMode?: AnimationOrGetter
446
+ onError?: AnimationOrGetter
447
447
  }
448
448
  }
449
449
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -133,15 +133,15 @@ Default property:
133
133
  brickFocusing?: () => Data<boolean>
134
134
  }
135
135
  animation?: AnimationBasicEvents & {
136
- onPress?: Animation
137
- onPressIn?: Animation
138
- onPressOut?: Animation
139
- onLongPress?: Animation
140
- onFocus?: Animation
141
- onBlur?: Animation
142
- onAnimationFinish?: Animation
143
- onAnimationFailure?: Animation
144
- onAnimationLoop?: Animation
136
+ onPress?: AnimationOrGetter
137
+ onPressIn?: AnimationOrGetter
138
+ onPressOut?: AnimationOrGetter
139
+ onLongPress?: AnimationOrGetter
140
+ onFocus?: AnimationOrGetter
141
+ onBlur?: AnimationOrGetter
142
+ onAnimationFinish?: AnimationOrGetter
143
+ onAnimationFailure?: AnimationOrGetter
144
+ onAnimationLoop?: AnimationOrGetter
145
145
  }
146
146
  }
147
147
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -226,16 +226,16 @@ Default property:
226
226
  brickFocusing?: () => Data<boolean>
227
227
  }
228
228
  animation?: AnimationBasicEvents & {
229
- onPress?: Animation
230
- onPressIn?: Animation
231
- onPressOut?: Animation
232
- onLongPress?: Animation
233
- onFocus?: Animation
234
- onBlur?: Animation
235
- onMarkerPress?: Animation
236
- onMapPress?: Animation
237
- onRegionChange?: Animation
238
- onReady?: Animation
229
+ onPress?: AnimationOrGetter
230
+ onPressIn?: AnimationOrGetter
231
+ onPressOut?: AnimationOrGetter
232
+ onLongPress?: AnimationOrGetter
233
+ onFocus?: AnimationOrGetter
234
+ onBlur?: AnimationOrGetter
235
+ onMarkerPress?: AnimationOrGetter
236
+ onMapPress?: AnimationOrGetter
237
+ onRegionChange?: AnimationOrGetter
238
+ onReady?: AnimationOrGetter
239
239
  }
240
240
  }
241
241
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -85,12 +85,12 @@ Default property:
85
85
  brickFocusing?: () => Data<boolean>
86
86
  }
87
87
  animation?: AnimationBasicEvents & {
88
- onPress?: Animation
89
- onPressIn?: Animation
90
- onPressOut?: Animation
91
- onLongPress?: Animation
92
- onFocus?: Animation
93
- onBlur?: Animation
88
+ onPress?: AnimationOrGetter
89
+ onPressIn?: AnimationOrGetter
90
+ onPressOut?: AnimationOrGetter
91
+ onLongPress?: AnimationOrGetter
92
+ onFocus?: AnimationOrGetter
93
+ onBlur?: AnimationOrGetter
94
94
  }
95
95
  }
96
96
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -118,12 +118,12 @@ Default property:
118
118
  brickFocusing?: () => Data<boolean>
119
119
  }
120
120
  animation?: AnimationBasicEvents & {
121
- onPress?: Animation
122
- onPressIn?: Animation
123
- onPressOut?: Animation
124
- onLongPress?: Animation
125
- onFocus?: Animation
126
- onBlur?: Animation
121
+ onPress?: AnimationOrGetter
122
+ onPressIn?: AnimationOrGetter
123
+ onPressOut?: AnimationOrGetter
124
+ onLongPress?: AnimationOrGetter
125
+ onFocus?: AnimationOrGetter
126
+ onBlur?: AnimationOrGetter
127
127
  }
128
128
  }
129
129
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -96,12 +96,12 @@ Default property:
96
96
  brickFocusing?: () => Data<boolean>
97
97
  }
98
98
  animation?: AnimationBasicEvents & {
99
- onPress?: Animation
100
- onPressIn?: Animation
101
- onPressOut?: Animation
102
- onLongPress?: Animation
103
- onFocus?: Animation
104
- onBlur?: Animation
99
+ onPress?: AnimationOrGetter
100
+ onPressIn?: AnimationOrGetter
101
+ onPressOut?: AnimationOrGetter
102
+ onLongPress?: AnimationOrGetter
103
+ onFocus?: AnimationOrGetter
104
+ onBlur?: AnimationOrGetter
105
105
  }
106
106
  }
107
107
 
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
7
- import type { Animation, AnimationBasicEvents } from '../animation'
7
+ import type { Animation, AnimationBasicEvents, AnimationOrGetter } from '../animation'
8
8
  import type {
9
9
  Brick,
10
10
  EventAction,
@@ -186,14 +186,14 @@ Default property:
186
186
  >
187
187
  }
188
188
  animation?: AnimationBasicEvents & {
189
- onPlay?: Animation
190
- onPause?: Animation
191
- onStop?: Animation
192
- onLoopEnd?: Animation
193
- onStateChanged?: Animation
194
- onError?: Animation
195
- onRiveGeneralEvent?: Animation
196
- onRiveOpenUrlEvent?: Animation
189
+ onPlay?: AnimationOrGetter
190
+ onPause?: AnimationOrGetter
191
+ onStop?: AnimationOrGetter
192
+ onLoopEnd?: AnimationOrGetter
193
+ onStateChanged?: AnimationOrGetter
194
+ onError?: AnimationOrGetter
195
+ onRiveGeneralEvent?: AnimationOrGetter
196
+ onRiveOpenUrlEvent?: AnimationOrGetter
197
197
  }
198
198
  }
199
199