@fugood/bricks-ctor 2.24.3 → 2.24.5
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.
- package/compile/action-name-map.ts +5 -0
- package/compile/index.ts +10 -4
- package/package.json +2 -2
- package/skills/bricks-ctor/SKILL.md +3 -1
- package/skills/bricks-ctor/rules/architecture-patterns.md +12 -0
- package/skills/bricks-ctor/rules/automations.md +11 -0
- package/skills/bricks-ctor/rules/data-calculation.md +5 -5
- package/skills/bricks-ctor/rules/verification-toolchain.md +177 -0
- package/skills/bricks-design/SKILL.md +160 -45
- package/skills/bricks-design/references/architecture-truths.md +132 -0
- package/skills/bricks-design/references/avoiding-complexity.md +91 -0
- package/skills/bricks-design/references/design-critique.md +195 -0
- package/skills/bricks-design/references/design-languages.md +265 -0
- package/skills/bricks-design/references/performance.md +116 -0
- package/skills/bricks-design/references/presentation-and-slideshow.md +137 -0
- package/skills/bricks-design/references/translating-inputs.md +152 -0
- package/skills/bricks-design/references/variations-and-tweaks.md +124 -0
- package/skills/bricks-design/references/when-the-brief-is-branded.md +284 -0
- package/skills/bricks-design/references/when-the-brief-is-vague.md +85 -0
- package/skills/bricks-design/references/workflow.md +134 -0
- package/skills/bricks-ux/SKILL.md +120 -0
- package/skills/bricks-ux/references/accessibility.md +162 -0
- package/skills/bricks-ux/references/flow-states.md +175 -0
- package/skills/bricks-ux/references/interaction-archetypes.md +189 -0
- package/skills/bricks-ux/references/monitoring-screens.md +153 -0
- package/skills/bricks-ux/references/pressable-composition.md +126 -0
- package/skills/bricks-ux/references/user-journey.md +168 -0
- package/skills/bricks-ux/references/ux-critique.md +256 -0
- package/tools/_git-author.ts +10 -2
- package/tools/_last-pushed-commit.ts +28 -0
- package/tools/_shell.ts +8 -1
- package/tools/deploy.ts +15 -0
- package/tools/mcp-tools/compile.ts +17 -7
- package/tools/mcp-tools/media.ts +4 -1
- package/tools/pull.ts +91 -16
- package/tools/update-config.ts +8 -0
- package/types/animation.ts +8 -3
- package/types/automation.ts +1 -0
- package/types/brick-base.ts +1 -1
- package/types/bricks/Camera.ts +8 -8
- package/types/bricks/Chart.ts +4 -4
- package/types/bricks/GenerativeMedia.ts +15 -15
- package/types/bricks/Icon.ts +7 -7
- package/types/bricks/Image.ts +9 -9
- package/types/bricks/Items.ts +7 -7
- package/types/bricks/Lottie.ts +10 -10
- package/types/bricks/Maps.ts +11 -11
- package/types/bricks/QrCode.ts +7 -7
- package/types/bricks/Rect.ts +7 -7
- package/types/bricks/RichText.ts +12 -9
- package/types/bricks/Rive.ts +9 -9
- package/types/bricks/Sketch.ts +6 -6
- package/types/bricks/Slideshow.ts +7 -7
- package/types/bricks/Svg.ts +7 -7
- package/types/bricks/Text.ts +9 -9
- package/types/bricks/TextInput.ts +10 -10
- package/types/bricks/Video.ts +12 -12
- package/types/bricks/VideoStreaming.ts +10 -10
- package/types/bricks/WebRtcStream.ts +1 -1
- package/types/bricks/WebView.ts +4 -4
- package/types/common.ts +2 -2
- package/types/data-calc-command/base.ts +57 -0
- package/types/data-calc-command/collection.ts +418 -0
- package/types/data-calc-command/color.ts +432 -0
- package/types/data-calc-command/constant.ts +50 -0
- package/types/data-calc-command/datetime.ts +147 -0
- package/types/data-calc-command/file.ts +129 -0
- package/types/data-calc-command/index.ts +13 -0
- package/types/data-calc-command/iteratee.ts +23 -0
- package/types/data-calc-command/logictype.ts +190 -0
- package/types/data-calc-command/math.ts +275 -0
- package/types/data-calc-command/object.ts +119 -0
- package/types/data-calc-command/sandbox.ts +58 -0
- package/types/data-calc-command/string.ts +407 -0
- package/types/data-calc.ts +1 -0
- package/types/data.ts +1 -1
- package/types/generators/Assistant.ts +18 -0
- package/types/generators/LlmGgml.ts +37 -0
- package/utils/data.ts +1 -1
- package/utils/id.ts +78 -27
- package/skills/bricks-design/LICENSE.txt +0 -180
- package/types/data-calc-command.ts +0 -7005
package/tools/deploy.ts
CHANGED
|
@@ -2,6 +2,11 @@ import { access, readFile, writeFile } from 'node:fs/promises'
|
|
|
2
2
|
import { parseArgs } from 'util'
|
|
3
3
|
import { sh } from './_shell'
|
|
4
4
|
import { buildCommitArgs } from './_git-author'
|
|
5
|
+
import { writeLastPushedCommit } from './_last-pushed-commit'
|
|
6
|
+
|
|
7
|
+
if (!process.env.BRICKS_RELEASE_SIGN) {
|
|
8
|
+
process.env.BRICKS_RELEASE_SIGN = 'CTOR'
|
|
9
|
+
}
|
|
5
10
|
|
|
6
11
|
const cwd = process.cwd()
|
|
7
12
|
|
|
@@ -141,6 +146,10 @@ await writeFile(configPath, JSON.stringify(releaseConfig))
|
|
|
141
146
|
|
|
142
147
|
const args = ['bricks', command, 'release', app.id, '-c', configPath, '--json']
|
|
143
148
|
|
|
149
|
+
if (app.name) {
|
|
150
|
+
args.push('--name', app.name)
|
|
151
|
+
}
|
|
152
|
+
|
|
144
153
|
if (version) {
|
|
145
154
|
args.push('--version', version)
|
|
146
155
|
}
|
|
@@ -162,4 +171,10 @@ if (result.exitCode !== 0) {
|
|
|
162
171
|
}
|
|
163
172
|
|
|
164
173
|
const output = JSON.parse(result.stdout.toString())
|
|
174
|
+
|
|
175
|
+
// Record the commit we just pushed from so a later pull can use it as the
|
|
176
|
+
// merge base regardless of what the server stores in
|
|
177
|
+
// bricks_project_last_commit_id.
|
|
178
|
+
if (commitId) await writeLastPushedCommit(cwd, commitId)
|
|
179
|
+
|
|
165
180
|
console.log(`${isModule ? 'Module' : 'App'} deployed: ${output.name}`)
|
|
@@ -3,22 +3,29 @@ import { readFile } from 'node:fs/promises'
|
|
|
3
3
|
import { z } from 'zod'
|
|
4
4
|
import { sh } from '../_shell'
|
|
5
5
|
|
|
6
|
+
// Disable ANSI color codes from spawned tools so MCP text output stays readable
|
|
7
|
+
// (the host renders raw text; escape sequences leak into the result otherwise).
|
|
8
|
+
const noColorEnv = { FORCE_COLOR: '0', NO_COLOR: '1' }
|
|
9
|
+
|
|
6
10
|
export function register(server: McpServer, projectDir: string) {
|
|
7
11
|
const { dirname } = import.meta
|
|
8
12
|
|
|
9
13
|
server.tool('compile', {}, async () => {
|
|
10
|
-
let log = ''
|
|
14
|
+
let log = 'Type checking & Compiling...\n'
|
|
11
15
|
try {
|
|
12
|
-
log +=
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
log += await sh`bun compile`.cwd(projectDir).env(noColorEnv).text()
|
|
17
|
+
} catch (err: any) {
|
|
18
|
+
const stdout = err.stdout?.toString() ?? ''
|
|
19
|
+
const stderr = err.stderr?.toString() ?? ''
|
|
20
|
+
log += [stdout, stderr].filter(Boolean).join('\n')
|
|
16
21
|
}
|
|
17
22
|
return {
|
|
18
23
|
content: [{ type: 'text', text: log }],
|
|
19
24
|
}
|
|
20
25
|
})
|
|
21
26
|
|
|
27
|
+
if (process.env.BRICKS_CTOR_MCP_DISABLE_PREVIEW === '1') return
|
|
28
|
+
|
|
22
29
|
server.tool(
|
|
23
30
|
'preview',
|
|
24
31
|
{
|
|
@@ -63,9 +70,12 @@ export function register(server: McpServer, projectDir: string) {
|
|
|
63
70
|
if (testTitleLike) args.push('--test-title-like', testTitleLike)
|
|
64
71
|
log = await sh`bunx --bun electron ${toolsDir}/preview-main.mjs ${args}`
|
|
65
72
|
.cwd(projectDir)
|
|
73
|
+
.env(noColorEnv)
|
|
66
74
|
.text()
|
|
67
|
-
} catch (err) {
|
|
68
|
-
|
|
75
|
+
} catch (err: any) {
|
|
76
|
+
const stdout = err.stdout?.toString() ?? ''
|
|
77
|
+
const stderr = err.stderr?.toString() ?? ''
|
|
78
|
+
log = [stdout, stderr].filter(Boolean).join('\n')
|
|
69
79
|
error = true
|
|
70
80
|
}
|
|
71
81
|
let screenshotBase64: string | null = null
|
package/tools/mcp-tools/media.ts
CHANGED
|
@@ -2,9 +2,12 @@ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
|
|
|
2
2
|
import { z } from 'zod'
|
|
3
3
|
import { sh } from '../_shell'
|
|
4
4
|
|
|
5
|
+
// MCP results are rendered as raw text — disable ANSI colors from the child.
|
|
6
|
+
const noColorEnv = { FORCE_COLOR: '0', NO_COLOR: '1' }
|
|
7
|
+
|
|
5
8
|
const runBricks = async (projectDir: string, ...args: string[]) => {
|
|
6
9
|
try {
|
|
7
|
-
return await sh`bunx bricks ${args}`.cwd(projectDir).text()
|
|
10
|
+
return await sh`bunx bricks ${args}`.cwd(projectDir).env(noColorEnv).text()
|
|
8
11
|
} catch (err: any) {
|
|
9
12
|
throw new Error(err.stderr?.toString() || err.message)
|
|
10
13
|
}
|
package/tools/pull.ts
CHANGED
|
@@ -1,7 +1,31 @@
|
|
|
1
|
-
import { readFile, writeFile } from 'node:fs/promises'
|
|
1
|
+
import { readdir, readFile, unlink, writeFile } from 'node:fs/promises'
|
|
2
|
+
import { existsSync } from 'node:fs'
|
|
3
|
+
import { join, relative } from 'node:path'
|
|
2
4
|
import { format } from 'oxfmt'
|
|
3
5
|
import { sh } from './_shell'
|
|
4
6
|
import { buildCommitArgs } from './_git-author'
|
|
7
|
+
import { readLastPushedCommit, writeLastPushedCommit } from './_last-pushed-commit'
|
|
8
|
+
|
|
9
|
+
// Directories whose .ts contents are entirely owned by the generator.
|
|
10
|
+
// Anything under these dirs not present in the freshly pulled file list is an orphan.
|
|
11
|
+
const ownedTsDirs = ['subspaces', 'automation-tests']
|
|
12
|
+
|
|
13
|
+
async function walkTsFiles(dir: string, baseDir: string): Promise<string[]> {
|
|
14
|
+
if (!existsSync(dir)) return []
|
|
15
|
+
const result: string[] = []
|
|
16
|
+
const entries = await readdir(dir, { withFileTypes: true })
|
|
17
|
+
await Promise.all(
|
|
18
|
+
entries.map(async (entry) => {
|
|
19
|
+
const full = join(dir, entry.name)
|
|
20
|
+
if (entry.isDirectory()) {
|
|
21
|
+
result.push(...(await walkTsFiles(full, baseDir)))
|
|
22
|
+
} else if (entry.isFile() && entry.name.endsWith('.ts')) {
|
|
23
|
+
result.push(relative(baseDir, full))
|
|
24
|
+
}
|
|
25
|
+
}),
|
|
26
|
+
)
|
|
27
|
+
return result
|
|
28
|
+
}
|
|
5
29
|
|
|
6
30
|
const cwd = process.cwd()
|
|
7
31
|
const args = process.argv.slice(2)
|
|
@@ -52,30 +76,40 @@ if (result.exitCode !== 0) {
|
|
|
52
76
|
}
|
|
53
77
|
}
|
|
54
78
|
|
|
55
|
-
const { files, lastCommitId } = JSON.parse(result.stdout.toString())
|
|
79
|
+
const { files, lastCommitId: serverLastCommitId } = JSON.parse(result.stdout.toString())
|
|
80
|
+
|
|
81
|
+
// The locally-saved commit (recorded by deploy/update-config) is the
|
|
82
|
+
// authoritative merge base for THIS clone — the server's value can be an
|
|
83
|
+
// opaque nanoid (config-only updates) or point to a commit other clients
|
|
84
|
+
// produced. Fall back to the server's value only if we have no local
|
|
85
|
+
// record yet.
|
|
86
|
+
const savedLocalCommitId = await readLastPushedCommit(cwd)
|
|
87
|
+
const baseCommitId = savedLocalCommitId || serverLastCommitId
|
|
88
|
+
|
|
89
|
+
const branchName = isModule
|
|
90
|
+
? 'BRICKS_PROJECT_try-pull-module'
|
|
91
|
+
: 'BRICKS_PROJECT_try-pull-application'
|
|
56
92
|
|
|
57
|
-
let useMain = false
|
|
58
93
|
if (isGitRepo && !force) {
|
|
59
|
-
console.log(`Checking commit ${
|
|
60
|
-
const found = (await sh`cd ${cwd} && git rev-list -1 ${
|
|
94
|
+
console.log(`Checking commit ${baseCommitId}...`)
|
|
95
|
+
const found = (await sh`cd ${cwd} && git rev-list -1 ${baseCommitId}`.nothrow().text())
|
|
61
96
|
.trim()
|
|
62
97
|
.match(/^[\da-f]{40}$/)
|
|
63
98
|
|
|
64
|
-
const
|
|
99
|
+
const headCommitId = (await sh`cd ${cwd} && git rev-parse HEAD`.text()).trim()
|
|
65
100
|
|
|
66
|
-
if (
|
|
67
|
-
|
|
68
|
-
const branchName = isModule
|
|
69
|
-
? 'BRICKS_PROJECT_try-pull-module'
|
|
70
|
-
: 'BRICKS_PROJECT_try-pull-application'
|
|
101
|
+
if (headCommitId === serverLastCommitId) throw new Error('Commit not changed')
|
|
71
102
|
|
|
72
103
|
await sh`cd ${cwd} && git branch -D ${branchName}`.nothrow()
|
|
73
104
|
|
|
105
|
+
// When the base commit isn't reachable in this clone (server stored a
|
|
106
|
+
// nanoid, or the commit was pruned), fall back to forking from current
|
|
107
|
+
// HEAD. The downstream merge into main collapses both paths into the
|
|
108
|
+
// same result, just with different merge bases.
|
|
74
109
|
if (found) {
|
|
75
|
-
await sh`cd ${cwd} && git checkout -b ${branchName} ${
|
|
110
|
+
await sh`cd ${cwd} && git checkout -b ${branchName} ${baseCommitId}`.nothrow()
|
|
76
111
|
} else {
|
|
77
112
|
await sh`cd ${cwd} && git checkout -b ${branchName}`
|
|
78
|
-
useMain = true
|
|
79
113
|
}
|
|
80
114
|
}
|
|
81
115
|
|
|
@@ -89,6 +123,23 @@ const oxfmtConfig = await readFile(`${cwd}/.oxfmtrc.json`, 'utf8')
|
|
|
89
123
|
printWidth: 100,
|
|
90
124
|
}))
|
|
91
125
|
|
|
126
|
+
const expectedFiles = new Set(files.map((file: { name: string }) => file.name))
|
|
127
|
+
|
|
128
|
+
// Remove orphan .ts files under generator-owned directories before writing.
|
|
129
|
+
// File paths are produced by buildApplicationFiles and use forward slashes,
|
|
130
|
+
// so normalise the walked paths the same way for comparison.
|
|
131
|
+
const orphans: string[] = []
|
|
132
|
+
await Promise.all(
|
|
133
|
+
ownedTsDirs.map(async (dir) => {
|
|
134
|
+
const existing = await walkTsFiles(join(cwd, dir), cwd)
|
|
135
|
+
for (const file of existing) {
|
|
136
|
+
const normalized = file.split(/[\\/]/).join('/')
|
|
137
|
+
if (!expectedFiles.has(normalized)) orphans.push(normalized)
|
|
138
|
+
}
|
|
139
|
+
}),
|
|
140
|
+
)
|
|
141
|
+
await Promise.all(orphans.map((name) => unlink(`${cwd}/${name}`)))
|
|
142
|
+
|
|
92
143
|
await Promise.all(
|
|
93
144
|
files.map(async (file: { name: string; input: string; formatable?: boolean }) => {
|
|
94
145
|
let content = file.input
|
|
@@ -112,11 +163,35 @@ if (isGitRepo) {
|
|
|
112
163
|
const commitArgs = await buildCommitArgs(cwd, [commitMsg])
|
|
113
164
|
await sh`cd ${cwd} && git ${commitArgs}`
|
|
114
165
|
}
|
|
115
|
-
if (!force
|
|
116
|
-
|
|
166
|
+
if (!force) {
|
|
167
|
+
// Land the pulled commits on main with a single 3-way merge using
|
|
168
|
+
// baseCommit as the merge base. The user doesn't have to manage a side
|
|
169
|
+
// branch, and conflicts (if any) land in the working tree on main where
|
|
170
|
+
// auto-compile surfaces them as typecheck errors to resolve in-place.
|
|
171
|
+
await sh`cd ${cwd} && git checkout main`
|
|
172
|
+
const mergeResult = await sh`cd ${cwd} && git merge ${branchName} --no-edit`.nothrow()
|
|
173
|
+
if (mergeResult.exitCode !== 0) {
|
|
174
|
+
// Conflict markers are in the working tree — commit them so the tree
|
|
175
|
+
// is clean for auto-compile to detect, leaving the resolution to the
|
|
176
|
+
// user. Pre-commit hooks would reject markers (lint/format fail on
|
|
177
|
+
// invalid syntax), so bypass them for this controlled case.
|
|
178
|
+
await sh`cd ${cwd} && git add .`
|
|
179
|
+
const conflictArgs = await buildCommitArgs(
|
|
180
|
+
cwd,
|
|
181
|
+
['chore(project): merge with conflicts (resolve in main)'],
|
|
182
|
+
['--no-verify'],
|
|
183
|
+
)
|
|
184
|
+
await sh`cd ${cwd} && git ${conflictArgs}`
|
|
185
|
+
}
|
|
186
|
+
// The try-pull branch served its purpose; delete it so `git branch`
|
|
187
|
+
// stays tidy. The next pull recreates it anyway (line 103).
|
|
188
|
+
await sh`cd ${cwd} && git branch -D ${branchName}`.nothrow()
|
|
117
189
|
}
|
|
190
|
+
// Record the new sync point so a follow-up pull starts from the right base.
|
|
191
|
+
const newHead = (await sh`cd ${cwd} && git rev-parse HEAD`.nothrow().text()).trim()
|
|
192
|
+
if (newHead) await writeLastPushedCommit(cwd, newHead)
|
|
118
193
|
}
|
|
119
194
|
|
|
120
195
|
console.log(
|
|
121
|
-
`${isModule ? 'Module' : 'App'} project pulled: ${files.length} files${force ? ' (force)' : ''}`,
|
|
196
|
+
`${isModule ? 'Module' : 'App'} project pulled: ${files.length} files${orphans.length ? `, removed ${orphans.length} orphan .ts file${orphans.length === 1 ? '' : 's'}` : ''}${force ? ' (force)' : ''}`,
|
|
122
197
|
)
|
package/tools/update-config.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { readFile, writeFile } from 'node:fs/promises'
|
|
|
2
2
|
import { parseArgs } from 'util'
|
|
3
3
|
import { sh } from './_shell'
|
|
4
4
|
import { buildCommitArgs } from './_git-author'
|
|
5
|
+
import { writeLastPushedCommit } from './_last-pushed-commit'
|
|
5
6
|
|
|
6
7
|
const cwd = process.cwd()
|
|
7
8
|
|
|
@@ -107,4 +108,11 @@ if (result.exitCode !== 0) {
|
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
const output = JSON.parse(result.stdout.toString())
|
|
111
|
+
|
|
112
|
+
// Record the commit we just pushed from so a later pull can use it as the
|
|
113
|
+
// merge base regardless of what the server stores in
|
|
114
|
+
// bricks_project_last_commit_id (which may be an opaque nanoid for
|
|
115
|
+
// content-only edits).
|
|
116
|
+
if (commitId) await writeLastPushedCommit(cwd, commitId)
|
|
117
|
+
|
|
110
118
|
console.log(`${isModule ? 'Module' : 'App'} config updated: ${output.target?.name || app.name}`)
|
package/types/animation.ts
CHANGED
|
@@ -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?:
|
|
109
|
-
standby?:
|
|
110
|
-
breatheStart?:
|
|
113
|
+
showStart?: AnimationOrGetter
|
|
114
|
+
standby?: AnimationOrGetter
|
|
115
|
+
breatheStart?: AnimationOrGetter
|
|
111
116
|
}
|
package/types/automation.ts
CHANGED
package/types/brick-base.ts
CHANGED
|
@@ -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,
|
package/types/bricks/Camera.ts
CHANGED
|
@@ -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?:
|
|
217
|
-
recordStart?:
|
|
218
|
-
recordEnd?:
|
|
219
|
-
barcodeRead?:
|
|
220
|
-
pictureTaken?:
|
|
221
|
-
recordFinish?:
|
|
222
|
-
mountError?:
|
|
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
|
|
package/types/bricks/Chart.ts
CHANGED
|
@@ -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?:
|
|
347
|
-
onPress?:
|
|
348
|
-
onLegendSelectChanged?:
|
|
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?:
|
|
254
|
-
generativeMediaOnPressIn?:
|
|
255
|
-
generativeMediaOnPressOut?:
|
|
256
|
-
generativeMediaOnLongPress?:
|
|
257
|
-
generativeMediaOnFocus?:
|
|
258
|
-
generativeMediaOnBlur?:
|
|
259
|
-
onSuccess?:
|
|
260
|
-
onError?:
|
|
261
|
-
promptStart?:
|
|
262
|
-
promptSuccess?:
|
|
263
|
-
promptError?:
|
|
264
|
-
loadStart?:
|
|
265
|
-
loadSuccess?:
|
|
266
|
-
loadError?:
|
|
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
|
|
package/types/bricks/Icon.ts
CHANGED
|
@@ -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?:
|
|
70
|
-
onPressIn?:
|
|
71
|
-
onPressOut?:
|
|
72
|
-
onLongPress?:
|
|
73
|
-
onFocus?:
|
|
74
|
-
onBlur?:
|
|
69
|
+
onPress?: AnimationOrGetter
|
|
70
|
+
onPressIn?: AnimationOrGetter
|
|
71
|
+
onPressOut?: AnimationOrGetter
|
|
72
|
+
onLongPress?: AnimationOrGetter
|
|
73
|
+
onFocus?: AnimationOrGetter
|
|
74
|
+
onBlur?: AnimationOrGetter
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|
package/types/bricks/Image.ts
CHANGED
|
@@ -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?:
|
|
96
|
-
onPressIn?:
|
|
97
|
-
onPressOut?:
|
|
98
|
-
onLongPress?:
|
|
99
|
-
onFocus?:
|
|
100
|
-
onBlur?:
|
|
101
|
-
onLoad?:
|
|
102
|
-
onError?:
|
|
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
|
|
package/types/bricks/Items.ts
CHANGED
|
@@ -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?:
|
|
442
|
-
onPageChange?:
|
|
443
|
-
onPageOutOfBound?:
|
|
444
|
-
onIntoDetailMode?:
|
|
445
|
-
onIntoListMode?:
|
|
446
|
-
onError?:
|
|
441
|
+
onPageRender?: AnimationOrGetter
|
|
442
|
+
onPageChange?: AnimationOrGetter
|
|
443
|
+
onPageOutOfBound?: AnimationOrGetter
|
|
444
|
+
onIntoDetailMode?: AnimationOrGetter
|
|
445
|
+
onIntoListMode?: AnimationOrGetter
|
|
446
|
+
onError?: AnimationOrGetter
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
|
package/types/bricks/Lottie.ts
CHANGED
|
@@ -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?:
|
|
137
|
-
onPressIn?:
|
|
138
|
-
onPressOut?:
|
|
139
|
-
onLongPress?:
|
|
140
|
-
onFocus?:
|
|
141
|
-
onBlur?:
|
|
142
|
-
onAnimationFinish?:
|
|
143
|
-
onAnimationFailure?:
|
|
144
|
-
onAnimationLoop?:
|
|
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
|
|
package/types/bricks/Maps.ts
CHANGED
|
@@ -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?:
|
|
230
|
-
onPressIn?:
|
|
231
|
-
onPressOut?:
|
|
232
|
-
onLongPress?:
|
|
233
|
-
onFocus?:
|
|
234
|
-
onBlur?:
|
|
235
|
-
onMarkerPress?:
|
|
236
|
-
onMapPress?:
|
|
237
|
-
onRegionChange?:
|
|
238
|
-
onReady?:
|
|
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
|
|
package/types/bricks/QrCode.ts
CHANGED
|
@@ -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?:
|
|
89
|
-
onPressIn?:
|
|
90
|
-
onPressOut?:
|
|
91
|
-
onLongPress?:
|
|
92
|
-
onFocus?:
|
|
93
|
-
onBlur?:
|
|
88
|
+
onPress?: AnimationOrGetter
|
|
89
|
+
onPressIn?: AnimationOrGetter
|
|
90
|
+
onPressOut?: AnimationOrGetter
|
|
91
|
+
onLongPress?: AnimationOrGetter
|
|
92
|
+
onFocus?: AnimationOrGetter
|
|
93
|
+
onBlur?: AnimationOrGetter
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
package/types/bricks/Rect.ts
CHANGED
|
@@ -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?:
|
|
122
|
-
onPressIn?:
|
|
123
|
-
onPressOut?:
|
|
124
|
-
onLongPress?:
|
|
125
|
-
onFocus?:
|
|
126
|
-
onBlur?:
|
|
121
|
+
onPress?: AnimationOrGetter
|
|
122
|
+
onPressIn?: AnimationOrGetter
|
|
123
|
+
onPressOut?: AnimationOrGetter
|
|
124
|
+
onLongPress?: AnimationOrGetter
|
|
125
|
+
onFocus?: AnimationOrGetter
|
|
126
|
+
onBlur?: AnimationOrGetter
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
|