@fugood/bricks-project 2.21.0-beta.14.test1 → 2.21.0-beta.14.test11
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/api/index.ts +1 -1
- package/api/instance.ts +180 -0
- package/compile/action-name-map.ts +502 -0
- package/compile/index.ts +208 -71
- package/compile/util.ts +2 -2
- package/index.ts +4 -9
- package/package.json +3 -1
- package/tools/deploy.ts +24 -0
- package/tools/postinstall.ts +12 -0
- package/tools/preview-main.mjs +51 -0
- package/tools/preview.ts +37 -0
- package/tools/pull.ts +51 -0
- package/types/bricks.ts +93 -76
- package/types/canvas.ts +4 -4
- package/types/common.ts +12 -9
- package/types/data-calc.ts +33 -1
- package/types/data.ts +43 -3
- package/types/generators.ts +151 -145
- package/types/subspace.ts +21 -6
- package/types/switch.ts +10 -7
- package/types/system.ts +58 -57
- package/utils/calc.ts +118 -0
- package/utils/data.ts +397 -0
- package/{uuid.ts → utils/id.ts} +26 -10
- package/api/application.ts +0 -65
package/tools/pull.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { $ } from 'bun'
|
|
2
|
+
import { format } from 'prettier'
|
|
3
|
+
import { pullApplicationProject, pullModuleProject } from '../api'
|
|
4
|
+
|
|
5
|
+
const cwd = process.cwd()
|
|
6
|
+
|
|
7
|
+
const unstagedChanges = await $`cd ${cwd} && git diff --name-only --diff-filter=ACMR`.text()
|
|
8
|
+
if (unstagedChanges)
|
|
9
|
+
throw new Error('Unstaged changes found, please commit or stash your changes before deploying')
|
|
10
|
+
|
|
11
|
+
const app = await Bun.file(`${cwd}/application.json`).json()
|
|
12
|
+
const stage = app.stage || 'production'
|
|
13
|
+
const { files, lastCommitId } =
|
|
14
|
+
app.type === 'module'
|
|
15
|
+
? await pullModuleProject(stage, app.id)
|
|
16
|
+
: await pullApplicationProject(stage, app.id)
|
|
17
|
+
|
|
18
|
+
const found = (await $`cd ${cwd} && git rev-list -1 ${lastCommitId}`.nothrow().text())
|
|
19
|
+
.trim()
|
|
20
|
+
.match(/^[a-f0-9]{40}$/)
|
|
21
|
+
|
|
22
|
+
const commitId = (await $`cd ${cwd} && git rev-parse HEAD`.text()).trim()
|
|
23
|
+
|
|
24
|
+
if (commitId === lastCommitId) throw new Error('Commit not changed')
|
|
25
|
+
|
|
26
|
+
const branchName = 'BRICKS_PROJECT_try-pull-application'
|
|
27
|
+
|
|
28
|
+
await $`cd ${cwd} && git branch -D ${branchName}`.nothrow()
|
|
29
|
+
|
|
30
|
+
let useMain = false
|
|
31
|
+
if (found) {
|
|
32
|
+
await $`cd ${cwd} && git checkout -b ${branchName} ${lastCommitId}`.nothrow()
|
|
33
|
+
} else {
|
|
34
|
+
await $`cd ${cwd} && git checkout -b ${branchName}`
|
|
35
|
+
useMain = true
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
await Promise.all(
|
|
39
|
+
files.map(async (file) =>
|
|
40
|
+
Bun.write(
|
|
41
|
+
`${cwd}/${file.name}`,
|
|
42
|
+
file.formatable ? await format(file.input, { parser: 'typescript' }) : file.input,
|
|
43
|
+
),
|
|
44
|
+
),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
await $`cd ${cwd} && git add .`
|
|
48
|
+
await $`cd ${cwd} && git commit -m 'Apply ${app.name} file changes'`
|
|
49
|
+
if (!useMain) {
|
|
50
|
+
await $`cd ${cwd} && git merge main`
|
|
51
|
+
}
|
package/types/bricks.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from './switch'
|
|
2
|
-
import { Data, DataLink } from './data'
|
|
3
|
-
import { Animation, AnimationBasicEvents } from './animation'
|
|
4
|
-
import { Brick, EventAction, ActionWithDataParams, ActionWithParams, Action } from './common'
|
|
1
|
+
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from './switch'
|
|
2
|
+
import type { Data, DataLink } from './data'
|
|
3
|
+
import type { Animation, AnimationBasicEvents } from './animation'
|
|
4
|
+
import type { Brick, EventAction, ActionWithDataParams, ActionWithParams, Action } from './common'
|
|
5
5
|
|
|
6
6
|
interface BrickBasicProperty {
|
|
7
7
|
/* The brick opacity (0 ~ 1) */
|
|
@@ -304,17 +304,17 @@ export type BrickTextInputActionSelectText = ActionWithParams & {
|
|
|
304
304
|
| {
|
|
305
305
|
input: 'regex'
|
|
306
306
|
value?: string | DataLink
|
|
307
|
-
mapping?:
|
|
307
|
+
mapping?: string
|
|
308
308
|
}
|
|
309
309
|
| {
|
|
310
310
|
input: 'start'
|
|
311
311
|
value?: number | DataLink
|
|
312
|
-
mapping?:
|
|
312
|
+
mapping?: string
|
|
313
313
|
}
|
|
314
314
|
| {
|
|
315
315
|
input: 'end'
|
|
316
316
|
value?: number | DataLink
|
|
317
|
-
mapping?:
|
|
317
|
+
mapping?: string
|
|
318
318
|
}
|
|
319
319
|
>
|
|
320
320
|
}
|
|
@@ -325,7 +325,7 @@ export type BrickTextInputActionSetText = ActionWithParams & {
|
|
|
325
325
|
params?: Array<{
|
|
326
326
|
input: 'text'
|
|
327
327
|
value?: string | DataLink
|
|
328
|
-
mapping?:
|
|
328
|
+
mapping?: string
|
|
329
329
|
}>
|
|
330
330
|
}
|
|
331
331
|
|
|
@@ -335,7 +335,7 @@ export type BrickTextInputActionAppendText = ActionWithParams & {
|
|
|
335
335
|
params?: Array<{
|
|
336
336
|
input: 'text'
|
|
337
337
|
value?: string | DataLink
|
|
338
|
-
mapping?:
|
|
338
|
+
mapping?: string
|
|
339
339
|
}>
|
|
340
340
|
}
|
|
341
341
|
|
|
@@ -1233,17 +1233,17 @@ export type BrickSlideshowActionJumpToIndex = ActionWithParams & {
|
|
|
1233
1233
|
| {
|
|
1234
1234
|
input: 'index'
|
|
1235
1235
|
value?: number | DataLink
|
|
1236
|
-
mapping?:
|
|
1236
|
+
mapping?: string
|
|
1237
1237
|
}
|
|
1238
1238
|
| {
|
|
1239
1239
|
input: 'reset'
|
|
1240
1240
|
value?: boolean | DataLink
|
|
1241
|
-
mapping?:
|
|
1241
|
+
mapping?: string
|
|
1242
1242
|
}
|
|
1243
1243
|
| {
|
|
1244
1244
|
input: 'shuffle'
|
|
1245
1245
|
value?: boolean | DataLink
|
|
1246
|
-
mapping?:
|
|
1246
|
+
mapping?: string
|
|
1247
1247
|
}
|
|
1248
1248
|
>
|
|
1249
1249
|
}
|
|
@@ -1425,27 +1425,27 @@ export type BrickChartActionDataHighlight = ActionWithParams & {
|
|
|
1425
1425
|
| {
|
|
1426
1426
|
input: 'seriesName'
|
|
1427
1427
|
value?: string | DataLink
|
|
1428
|
-
mapping?:
|
|
1428
|
+
mapping?: string
|
|
1429
1429
|
}
|
|
1430
1430
|
| {
|
|
1431
1431
|
input: 'seriesId'
|
|
1432
1432
|
value?: string | DataLink
|
|
1433
|
-
mapping?:
|
|
1433
|
+
mapping?: string
|
|
1434
1434
|
}
|
|
1435
1435
|
| {
|
|
1436
1436
|
input: 'seriesIndex'
|
|
1437
1437
|
value?: number | DataLink
|
|
1438
|
-
mapping?:
|
|
1438
|
+
mapping?: string
|
|
1439
1439
|
}
|
|
1440
1440
|
| {
|
|
1441
1441
|
input: 'dataIndex'
|
|
1442
1442
|
value?: number | DataLink
|
|
1443
|
-
mapping?:
|
|
1443
|
+
mapping?: string
|
|
1444
1444
|
}
|
|
1445
1445
|
| {
|
|
1446
1446
|
input: 'name'
|
|
1447
1447
|
value?: string | DataLink
|
|
1448
|
-
mapping?:
|
|
1448
|
+
mapping?: string
|
|
1449
1449
|
}
|
|
1450
1450
|
>
|
|
1451
1451
|
}
|
|
@@ -1457,27 +1457,27 @@ export type BrickChartActionDataDownplay = ActionWithParams & {
|
|
|
1457
1457
|
| {
|
|
1458
1458
|
input: 'seriesName'
|
|
1459
1459
|
value?: string | DataLink
|
|
1460
|
-
mapping?:
|
|
1460
|
+
mapping?: string
|
|
1461
1461
|
}
|
|
1462
1462
|
| {
|
|
1463
1463
|
input: 'seriesId'
|
|
1464
1464
|
value?: string | DataLink
|
|
1465
|
-
mapping?:
|
|
1465
|
+
mapping?: string
|
|
1466
1466
|
}
|
|
1467
1467
|
| {
|
|
1468
1468
|
input: 'seriesIndex'
|
|
1469
1469
|
value?: number | DataLink
|
|
1470
|
-
mapping?:
|
|
1470
|
+
mapping?: string
|
|
1471
1471
|
}
|
|
1472
1472
|
| {
|
|
1473
1473
|
input: 'dataIndex'
|
|
1474
1474
|
value?: number | DataLink
|
|
1475
|
-
mapping?:
|
|
1475
|
+
mapping?: string
|
|
1476
1476
|
}
|
|
1477
1477
|
| {
|
|
1478
1478
|
input: 'name'
|
|
1479
1479
|
value?: string | DataLink
|
|
1480
|
-
mapping?:
|
|
1480
|
+
mapping?: string
|
|
1481
1481
|
}
|
|
1482
1482
|
>
|
|
1483
1483
|
}
|
|
@@ -1489,27 +1489,27 @@ export type BrickChartActionDataSelect = ActionWithParams & {
|
|
|
1489
1489
|
| {
|
|
1490
1490
|
input: 'seriesName'
|
|
1491
1491
|
value?: string | DataLink
|
|
1492
|
-
mapping?:
|
|
1492
|
+
mapping?: string
|
|
1493
1493
|
}
|
|
1494
1494
|
| {
|
|
1495
1495
|
input: 'seriesId'
|
|
1496
1496
|
value?: string | DataLink
|
|
1497
|
-
mapping?:
|
|
1497
|
+
mapping?: string
|
|
1498
1498
|
}
|
|
1499
1499
|
| {
|
|
1500
1500
|
input: 'seriesIndex'
|
|
1501
1501
|
value?: number | DataLink
|
|
1502
|
-
mapping?:
|
|
1502
|
+
mapping?: string
|
|
1503
1503
|
}
|
|
1504
1504
|
| {
|
|
1505
1505
|
input: 'dataIndex'
|
|
1506
1506
|
value?: number | DataLink
|
|
1507
|
-
mapping?:
|
|
1507
|
+
mapping?: string
|
|
1508
1508
|
}
|
|
1509
1509
|
| {
|
|
1510
1510
|
input: 'name'
|
|
1511
1511
|
value?: string | DataLink
|
|
1512
|
-
mapping?:
|
|
1512
|
+
mapping?: string
|
|
1513
1513
|
}
|
|
1514
1514
|
>
|
|
1515
1515
|
}
|
|
@@ -1521,27 +1521,27 @@ export type BrickChartActionDataUnselect = ActionWithParams & {
|
|
|
1521
1521
|
| {
|
|
1522
1522
|
input: 'seriesName'
|
|
1523
1523
|
value?: string | DataLink
|
|
1524
|
-
mapping?:
|
|
1524
|
+
mapping?: string
|
|
1525
1525
|
}
|
|
1526
1526
|
| {
|
|
1527
1527
|
input: 'seriesId'
|
|
1528
1528
|
value?: string | DataLink
|
|
1529
|
-
mapping?:
|
|
1529
|
+
mapping?: string
|
|
1530
1530
|
}
|
|
1531
1531
|
| {
|
|
1532
1532
|
input: 'seriesIndex'
|
|
1533
1533
|
value?: number | DataLink
|
|
1534
|
-
mapping?:
|
|
1534
|
+
mapping?: string
|
|
1535
1535
|
}
|
|
1536
1536
|
| {
|
|
1537
1537
|
input: 'dataIndex'
|
|
1538
1538
|
value?: number | DataLink
|
|
1539
|
-
mapping?:
|
|
1539
|
+
mapping?: string
|
|
1540
1540
|
}
|
|
1541
1541
|
| {
|
|
1542
1542
|
input: 'name'
|
|
1543
1543
|
value?: string | DataLink
|
|
1544
|
-
mapping?:
|
|
1544
|
+
mapping?: string
|
|
1545
1545
|
}
|
|
1546
1546
|
>
|
|
1547
1547
|
}
|
|
@@ -1553,27 +1553,27 @@ export type BrickChartActionDataToggleSelect = ActionWithParams & {
|
|
|
1553
1553
|
| {
|
|
1554
1554
|
input: 'seriesName'
|
|
1555
1555
|
value?: string | DataLink
|
|
1556
|
-
mapping?:
|
|
1556
|
+
mapping?: string
|
|
1557
1557
|
}
|
|
1558
1558
|
| {
|
|
1559
1559
|
input: 'seriesId'
|
|
1560
1560
|
value?: string | DataLink
|
|
1561
|
-
mapping?:
|
|
1561
|
+
mapping?: string
|
|
1562
1562
|
}
|
|
1563
1563
|
| {
|
|
1564
1564
|
input: 'seriesIndex'
|
|
1565
1565
|
value?: number | DataLink
|
|
1566
|
-
mapping?:
|
|
1566
|
+
mapping?: string
|
|
1567
1567
|
}
|
|
1568
1568
|
| {
|
|
1569
1569
|
input: 'dataIndex'
|
|
1570
1570
|
value?: number | DataLink
|
|
1571
|
-
mapping?:
|
|
1571
|
+
mapping?: string
|
|
1572
1572
|
}
|
|
1573
1573
|
| {
|
|
1574
1574
|
input: 'name'
|
|
1575
1575
|
value?: string | DataLink
|
|
1576
|
-
mapping?:
|
|
1576
|
+
mapping?: string
|
|
1577
1577
|
}
|
|
1578
1578
|
>
|
|
1579
1579
|
}
|
|
@@ -1584,7 +1584,7 @@ export type BrickChartActionLegendSelect = ActionWithParams & {
|
|
|
1584
1584
|
params?: Array<{
|
|
1585
1585
|
input: 'name'
|
|
1586
1586
|
value?: string | DataLink
|
|
1587
|
-
mapping?:
|
|
1587
|
+
mapping?: string
|
|
1588
1588
|
}>
|
|
1589
1589
|
}
|
|
1590
1590
|
|
|
@@ -1594,7 +1594,7 @@ export type BrickChartActionLegendUnselect = ActionWithParams & {
|
|
|
1594
1594
|
params?: Array<{
|
|
1595
1595
|
input: 'name'
|
|
1596
1596
|
value?: string | DataLink
|
|
1597
|
-
mapping?:
|
|
1597
|
+
mapping?: string
|
|
1598
1598
|
}>
|
|
1599
1599
|
}
|
|
1600
1600
|
|
|
@@ -1620,17 +1620,17 @@ export type BrickChartActionTooltipShow = ActionWithParams & {
|
|
|
1620
1620
|
| {
|
|
1621
1621
|
input: 'seriesIndex'
|
|
1622
1622
|
value?: number | DataLink
|
|
1623
|
-
mapping?:
|
|
1623
|
+
mapping?: string
|
|
1624
1624
|
}
|
|
1625
1625
|
| {
|
|
1626
1626
|
input: 'dataIndex'
|
|
1627
1627
|
value?: number | DataLink
|
|
1628
|
-
mapping?:
|
|
1628
|
+
mapping?: string
|
|
1629
1629
|
}
|
|
1630
1630
|
| {
|
|
1631
1631
|
input: 'name'
|
|
1632
1632
|
value?: string | DataLink
|
|
1633
|
-
mapping?:
|
|
1633
|
+
mapping?: string
|
|
1634
1634
|
}
|
|
1635
1635
|
>
|
|
1636
1636
|
}
|
|
@@ -1642,17 +1642,17 @@ export type BrickChartActionTooltipHide = ActionWithParams & {
|
|
|
1642
1642
|
| {
|
|
1643
1643
|
input: 'seriesIndex'
|
|
1644
1644
|
value?: number | DataLink
|
|
1645
|
-
mapping?:
|
|
1645
|
+
mapping?: string
|
|
1646
1646
|
}
|
|
1647
1647
|
| {
|
|
1648
1648
|
input: 'dataIndex'
|
|
1649
1649
|
value?: number | DataLink
|
|
1650
|
-
mapping?:
|
|
1650
|
+
mapping?: string
|
|
1651
1651
|
}
|
|
1652
1652
|
| {
|
|
1653
1653
|
input: 'name'
|
|
1654
1654
|
value?: string | DataLink
|
|
1655
|
-
mapping?:
|
|
1655
|
+
mapping?: string
|
|
1656
1656
|
}
|
|
1657
1657
|
>
|
|
1658
1658
|
}
|
|
@@ -1833,7 +1833,7 @@ export type BrickItemsActionJumpPage = ActionWithParams & {
|
|
|
1833
1833
|
params?: Array<{
|
|
1834
1834
|
input: 'pageIndex'
|
|
1835
1835
|
value?: number | DataLink
|
|
1836
|
-
mapping?:
|
|
1836
|
+
mapping?: string
|
|
1837
1837
|
}>
|
|
1838
1838
|
}
|
|
1839
1839
|
|
|
@@ -1843,7 +1843,7 @@ export type BrickItemsActionOpenDetail = ActionWithParams & {
|
|
|
1843
1843
|
params?: Array<{
|
|
1844
1844
|
input: 'detailIndex'
|
|
1845
1845
|
value?: number | DataLink
|
|
1846
|
-
mapping?:
|
|
1846
|
+
mapping?: string
|
|
1847
1847
|
}>
|
|
1848
1848
|
}
|
|
1849
1849
|
|
|
@@ -1859,37 +1859,37 @@ export type BrickItemsActionDynamicAnimation = ActionWithParams & {
|
|
|
1859
1859
|
| {
|
|
1860
1860
|
input: 'mode'
|
|
1861
1861
|
value?: 'list' | 'detail' | DataLink
|
|
1862
|
-
mapping?:
|
|
1862
|
+
mapping?: string
|
|
1863
1863
|
}
|
|
1864
1864
|
| {
|
|
1865
1865
|
input: 'brickId'
|
|
1866
1866
|
value?: string | DataLink
|
|
1867
|
-
mapping?:
|
|
1867
|
+
mapping?: string
|
|
1868
1868
|
}
|
|
1869
1869
|
| {
|
|
1870
1870
|
input: 'dataId'
|
|
1871
1871
|
value?: string | DataLink
|
|
1872
|
-
mapping?:
|
|
1872
|
+
mapping?: string
|
|
1873
1873
|
}
|
|
1874
1874
|
| {
|
|
1875
1875
|
input: 'index'
|
|
1876
1876
|
value?: number | DataLink
|
|
1877
|
-
mapping?:
|
|
1877
|
+
mapping?: string
|
|
1878
1878
|
}
|
|
1879
1879
|
| {
|
|
1880
1880
|
input: 'animationId'
|
|
1881
1881
|
value?: string | DataLink | (() => Animation)
|
|
1882
|
-
mapping?:
|
|
1882
|
+
mapping?: string
|
|
1883
1883
|
}
|
|
1884
1884
|
| {
|
|
1885
1885
|
input: 'animationType'
|
|
1886
1886
|
value?: 'once' | 'loop' | DataLink
|
|
1887
|
-
mapping?:
|
|
1887
|
+
mapping?: string
|
|
1888
1888
|
}
|
|
1889
1889
|
| {
|
|
1890
1890
|
input: 'animationResetInitialValue'
|
|
1891
1891
|
value?: boolean | DataLink
|
|
1892
|
-
mapping?:
|
|
1892
|
+
mapping?: string
|
|
1893
1893
|
}
|
|
1894
1894
|
>
|
|
1895
1895
|
}
|
|
@@ -1901,22 +1901,22 @@ export type BrickItemsActionDynamicAnimationReset = ActionWithParams & {
|
|
|
1901
1901
|
| {
|
|
1902
1902
|
input: 'mode'
|
|
1903
1903
|
value?: 'list' | 'detail' | DataLink
|
|
1904
|
-
mapping?:
|
|
1904
|
+
mapping?: string
|
|
1905
1905
|
}
|
|
1906
1906
|
| {
|
|
1907
1907
|
input: 'brickId'
|
|
1908
1908
|
value?: string | DataLink
|
|
1909
|
-
mapping?:
|
|
1909
|
+
mapping?: string
|
|
1910
1910
|
}
|
|
1911
1911
|
| {
|
|
1912
1912
|
input: 'dataId'
|
|
1913
1913
|
value?: string | DataLink
|
|
1914
|
-
mapping?:
|
|
1914
|
+
mapping?: string
|
|
1915
1915
|
}
|
|
1916
1916
|
| {
|
|
1917
1917
|
input: 'index'
|
|
1918
1918
|
value?: number | DataLink
|
|
1919
|
-
mapping?:
|
|
1919
|
+
mapping?: string
|
|
1920
1920
|
}
|
|
1921
1921
|
>
|
|
1922
1922
|
}
|
|
@@ -1928,22 +1928,22 @@ export type BrickItemsActionDynamicAnimationStop = ActionWithParams & {
|
|
|
1928
1928
|
| {
|
|
1929
1929
|
input: 'mode'
|
|
1930
1930
|
value?: 'list' | 'detail' | DataLink
|
|
1931
|
-
mapping?:
|
|
1931
|
+
mapping?: string
|
|
1932
1932
|
}
|
|
1933
1933
|
| {
|
|
1934
1934
|
input: 'brickId'
|
|
1935
1935
|
value?: string | DataLink
|
|
1936
|
-
mapping?:
|
|
1936
|
+
mapping?: string
|
|
1937
1937
|
}
|
|
1938
1938
|
| {
|
|
1939
1939
|
input: 'dataId'
|
|
1940
1940
|
value?: string | DataLink
|
|
1941
|
-
mapping?:
|
|
1941
|
+
mapping?: string
|
|
1942
1942
|
}
|
|
1943
1943
|
| {
|
|
1944
1944
|
input: 'index'
|
|
1945
1945
|
value?: number | DataLink
|
|
1946
|
-
mapping?:
|
|
1946
|
+
mapping?: string
|
|
1947
1947
|
}
|
|
1948
1948
|
>
|
|
1949
1949
|
}
|
|
@@ -2068,6 +2068,14 @@ Default property:
|
|
|
2068
2068
|
y?: number | DataLink
|
|
2069
2069
|
width?: number | DataLink
|
|
2070
2070
|
height?: number | DataLink
|
|
2071
|
+
standbyMode?: 'custom' | 'top' | 'bottom' | 'left' | 'right' | DataLink
|
|
2072
|
+
standbyFrame?: DataLink | {}
|
|
2073
|
+
standbyOpacity?: number | DataLink
|
|
2074
|
+
standbyDelay?: number | DataLink
|
|
2075
|
+
standbyDelayRandom?: number | DataLink
|
|
2076
|
+
standbyEasing?: string | DataLink
|
|
2077
|
+
showingDelay?: number | DataLink
|
|
2078
|
+
renderOutOfViewport?: boolean | DataLink
|
|
2071
2079
|
}
|
|
2072
2080
|
show?: string | DataLink
|
|
2073
2081
|
pressToOpenDetail?: boolean | DataLink
|
|
@@ -2080,6 +2088,7 @@ Default property:
|
|
|
2080
2088
|
| DataLink
|
|
2081
2089
|
| {
|
|
2082
2090
|
title?: string | DataLink
|
|
2091
|
+
description?: string | DataLink
|
|
2083
2092
|
brickId?: string | DataLink
|
|
2084
2093
|
brickIdPrefix?: string | DataLink
|
|
2085
2094
|
templateKey?: string | DataLink
|
|
@@ -2096,6 +2105,14 @@ Default property:
|
|
|
2096
2105
|
y?: number | DataLink
|
|
2097
2106
|
width?: number | DataLink
|
|
2098
2107
|
height?: number | DataLink
|
|
2108
|
+
standbyMode?: 'custom' | 'top' | 'bottom' | 'left' | 'right' | DataLink
|
|
2109
|
+
standbyFrame?: DataLink | {}
|
|
2110
|
+
standbyOpacity?: number | DataLink
|
|
2111
|
+
standbyDelay?: number | DataLink
|
|
2112
|
+
standbyDelayRandom?: number | DataLink
|
|
2113
|
+
standbyEasing?: string | DataLink
|
|
2114
|
+
showingDelay?: number | DataLink
|
|
2115
|
+
renderOutOfViewport?: boolean | DataLink
|
|
2099
2116
|
}
|
|
2100
2117
|
show?: string | DataLink
|
|
2101
2118
|
pressToBackList?: boolean | DataLink
|
|
@@ -2376,7 +2393,7 @@ export type BrickWebViewActionInjectJavascript = ActionWithParams & {
|
|
|
2376
2393
|
params?: Array<{
|
|
2377
2394
|
input: 'javascriptCode'
|
|
2378
2395
|
value?: string | DataLink
|
|
2379
|
-
mapping?:
|
|
2396
|
+
mapping?: string
|
|
2380
2397
|
}>
|
|
2381
2398
|
}
|
|
2382
2399
|
|
|
@@ -2525,22 +2542,22 @@ export type BrickCameraActionTakePicture = ActionWithParams & {
|
|
|
2525
2542
|
| {
|
|
2526
2543
|
input: 'width'
|
|
2527
2544
|
value?: number | DataLink
|
|
2528
|
-
mapping?:
|
|
2545
|
+
mapping?: string
|
|
2529
2546
|
}
|
|
2530
2547
|
| {
|
|
2531
2548
|
input: 'quality'
|
|
2532
2549
|
value?: string | DataLink
|
|
2533
|
-
mapping?:
|
|
2550
|
+
mapping?: string
|
|
2534
2551
|
}
|
|
2535
2552
|
| {
|
|
2536
2553
|
input: 'base64'
|
|
2537
2554
|
value?: boolean | DataLink
|
|
2538
|
-
mapping?:
|
|
2555
|
+
mapping?: string
|
|
2539
2556
|
}
|
|
2540
2557
|
| {
|
|
2541
2558
|
input: 'mirrorImage'
|
|
2542
2559
|
value?: boolean | DataLink
|
|
2543
|
-
mapping?:
|
|
2560
|
+
mapping?: string
|
|
2544
2561
|
}
|
|
2545
2562
|
>
|
|
2546
2563
|
}
|
|
@@ -2552,27 +2569,27 @@ export type BrickCameraActionRecord = ActionWithParams & {
|
|
|
2552
2569
|
| {
|
|
2553
2570
|
input: 'quality'
|
|
2554
2571
|
value?: '4:3' | '288p' | '480p' | '720p' | '1080p' | '2160p' | DataLink
|
|
2555
|
-
mapping?:
|
|
2572
|
+
mapping?: string
|
|
2556
2573
|
}
|
|
2557
2574
|
| {
|
|
2558
2575
|
input: 'mirrorVideo'
|
|
2559
2576
|
value?: boolean | DataLink
|
|
2560
|
-
mapping?:
|
|
2577
|
+
mapping?: string
|
|
2561
2578
|
}
|
|
2562
2579
|
| {
|
|
2563
2580
|
input: 'videoBitrate'
|
|
2564
2581
|
value?: string | DataLink
|
|
2565
|
-
mapping?:
|
|
2582
|
+
mapping?: string
|
|
2566
2583
|
}
|
|
2567
2584
|
| {
|
|
2568
2585
|
input: 'maxDuration'
|
|
2569
2586
|
value?: number | DataLink
|
|
2570
|
-
mapping?:
|
|
2587
|
+
mapping?: string
|
|
2571
2588
|
}
|
|
2572
2589
|
| {
|
|
2573
2590
|
input: 'maxFileSize'
|
|
2574
2591
|
value?: string | DataLink
|
|
2575
|
-
mapping?:
|
|
2592
|
+
mapping?: string
|
|
2576
2593
|
}
|
|
2577
2594
|
>
|
|
2578
2595
|
}
|
|
@@ -2822,7 +2839,7 @@ export type Brick3DViewerActionAnimationPlay = ActionWithParams & {
|
|
|
2822
2839
|
params?: Array<{
|
|
2823
2840
|
input: 'objectIndex'
|
|
2824
2841
|
value?: number | DataLink
|
|
2825
|
-
mapping?:
|
|
2842
|
+
mapping?: string
|
|
2826
2843
|
}>
|
|
2827
2844
|
}
|
|
2828
2845
|
|
|
@@ -2832,7 +2849,7 @@ export type Brick3DViewerActionAnimationPause = ActionWithParams & {
|
|
|
2832
2849
|
params?: Array<{
|
|
2833
2850
|
input: 'objectIndex'
|
|
2834
2851
|
value?: number | DataLink
|
|
2835
|
-
mapping?:
|
|
2852
|
+
mapping?: string
|
|
2836
2853
|
}>
|
|
2837
2854
|
}
|
|
2838
2855
|
|
|
@@ -2843,12 +2860,12 @@ export type Brick3DViewerActionAnimationGoto = ActionWithParams & {
|
|
|
2843
2860
|
| {
|
|
2844
2861
|
input: 'objectIndex'
|
|
2845
2862
|
value?: number | DataLink
|
|
2846
|
-
mapping?:
|
|
2863
|
+
mapping?: string
|
|
2847
2864
|
}
|
|
2848
2865
|
| {
|
|
2849
2866
|
input: 'animationProgress'
|
|
2850
2867
|
value?: number | DataLink
|
|
2851
|
-
mapping?:
|
|
2868
|
+
mapping?: string
|
|
2852
2869
|
}
|
|
2853
2870
|
>
|
|
2854
2871
|
}
|
package/types/canvas.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Easing } from './animation'
|
|
2
|
-
import { Data, DataLink } from './data'
|
|
3
|
-
import { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from './switch'
|
|
4
|
-
import { Brick, SubspaceID, EventAction } from './common'
|
|
1
|
+
import type { Easing } from './animation'
|
|
2
|
+
import type { Data, DataLink } from './data'
|
|
3
|
+
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from './switch'
|
|
4
|
+
import type { Brick, SubspaceID, EventAction } from './common'
|
|
5
5
|
|
|
6
6
|
type StandbyEasing = {
|
|
7
7
|
method: Easing
|
package/types/common.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SwitchDef } from './switch'
|
|
2
|
-
import { Data } from './data'
|
|
3
|
-
import { Subspace } from './subspace'
|
|
1
|
+
import type { SwitchDef } from './switch'
|
|
2
|
+
import type { Data } from './data'
|
|
3
|
+
import type { Subspace } from './subspace'
|
|
4
4
|
|
|
5
5
|
export interface Brick {
|
|
6
6
|
__typename: 'Brick'
|
|
@@ -12,7 +12,7 @@ export interface Brick {
|
|
|
12
12
|
events: {}
|
|
13
13
|
outlets?: {}
|
|
14
14
|
animation?: {}
|
|
15
|
-
switches
|
|
15
|
+
switches?: Array<SwitchDef>
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export enum LocalSyncStrategy {
|
|
@@ -30,7 +30,7 @@ export interface Generator {
|
|
|
30
30
|
property?: {}
|
|
31
31
|
events: {}
|
|
32
32
|
outlets?: {}
|
|
33
|
-
switches
|
|
33
|
+
switches?: Array<SwitchDef>
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export type SubspaceID = string
|
|
@@ -46,7 +46,7 @@ export type ActionWithParams = Action & {
|
|
|
46
46
|
params?: Array<{
|
|
47
47
|
input: string
|
|
48
48
|
value?: any
|
|
49
|
-
mapping?:
|
|
49
|
+
mapping?: string
|
|
50
50
|
}>
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -54,7 +54,7 @@ export type ActionWithDataParams = Action & {
|
|
|
54
54
|
dataParams?: Array<{
|
|
55
55
|
input: () => Data
|
|
56
56
|
value?: any
|
|
57
|
-
mapping?:
|
|
57
|
+
mapping?: string
|
|
58
58
|
}>
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -103,7 +103,7 @@ export type ApplicationSettings = {
|
|
|
103
103
|
borderBottomLeftRadius?: number
|
|
104
104
|
borderBottomRightRadius?: number
|
|
105
105
|
}
|
|
106
|
-
}
|
|
106
|
+
}
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
export type Application = {
|
|
@@ -113,4 +113,7 @@ export type Application = {
|
|
|
113
113
|
rootSubspace: Subspace
|
|
114
114
|
fonts?: ApplicationFont[]
|
|
115
115
|
settings?: ApplicationSettings
|
|
116
|
-
|
|
116
|
+
metadata?: {
|
|
117
|
+
[key: string]: any
|
|
118
|
+
}
|
|
119
|
+
}
|