@elaraai/east-ui 1.0.83 → 1.0.85
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/dist/src/charts/chart/index.d.ts +7 -4
- package/dist/src/charts/chart/index.d.ts.map +1 -1
- package/dist/src/charts/chart/index.js +3 -1
- package/dist/src/charts/chart/index.js.map +1 -1
- package/dist/src/collections/library/index.d.ts +1182 -37
- package/dist/src/collections/library/index.d.ts.map +1 -1
- package/dist/src/collections/library/index.js +191 -13
- package/dist/src/collections/library/index.js.map +1 -1
- package/dist/src/collections/library/types.d.ts +376 -180
- package/dist/src/collections/library/types.d.ts.map +1 -1
- package/dist/src/collections/library/types.js +188 -91
- package/dist/src/collections/library/types.js.map +1 -1
- package/dist/src/collections/plan/root.d.ts.map +1 -1
- package/dist/src/collections/plan/root.js +10 -37
- package/dist/src/collections/plan/root.js.map +1 -1
- package/dist/src/collections/plan/types.d.ts +1 -1
- package/dist/src/collections/plan/types.js +1 -1
- package/dist/src/collections/sheet/editing-bridge.js +1 -1
- package/dist/src/collections/sheet/editing-bridge.js.map +1 -1
- package/dist/src/collections/sheet/root.d.ts +1 -1
- package/dist/src/collections/sheet/root.js +1 -1
- package/dist/src/collections/sheet/root.js.map +1 -1
- package/dist/src/component.d.ts +490 -11
- package/dist/src/component.d.ts.map +1 -1
- package/dist/src/component.js +17 -3
- package/dist/src/component.js.map +1 -1
- package/dist/src/contracts/drag.d.ts.map +1 -1
- package/dist/src/contracts/drag.js +1 -0
- package/dist/src/contracts/drag.js.map +1 -1
- package/dist/src/contracts/editing.d.ts +19 -0
- package/dist/src/contracts/editing.d.ts.map +1 -1
- package/dist/src/contracts/editing.js +31 -1
- package/dist/src/contracts/editing.js.map +1 -1
- package/dist/src/contracts/index.d.ts +1 -1
- package/dist/src/contracts/index.d.ts.map +1 -1
- package/dist/src/contracts/pick.js +4 -4
- package/dist/src/contracts/pick.js.map +1 -1
- package/dist/src/contracts/source.d.ts +87 -131
- package/dist/src/contracts/source.d.ts.map +1 -1
- package/dist/src/contracts/source.js +153 -368
- package/dist/src/contracts/source.js.map +1 -1
- package/dist/src/display/bar-strip/index.d.ts +39 -6
- package/dist/src/display/bar-strip/index.d.ts.map +1 -1
- package/dist/src/display/bar-strip/index.js +16 -38
- package/dist/src/display/bar-strip/index.js.map +1 -1
- package/dist/src/display/bar-strip/types.d.ts +17 -1
- package/dist/src/display/bar-strip/types.d.ts.map +1 -1
- package/dist/src/display/bar-strip/types.js.map +1 -1
- package/dist/src/feedback/status/index.d.ts +10 -2
- package/dist/src/feedback/status/index.d.ts.map +1 -1
- package/dist/src/feedback/status/index.js +8 -3
- package/dist/src/feedback/status/index.js.map +1 -1
- package/dist/src/index.d.ts +3 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +2 -1
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +3 -2
- package/dist/src/internal.js.map +1 -1
- package/dist/src/layout/dock/index.d.ts +58 -16
- package/dist/src/layout/dock/index.d.ts.map +1 -1
- package/dist/src/layout/dock/index.js +48 -13
- package/dist/src/layout/dock/index.js.map +1 -1
- package/dist/src/layout/dock/types.d.ts +62 -10
- package/dist/src/layout/dock/types.d.ts.map +1 -1
- package/dist/src/layout/dock/types.js +21 -4
- package/dist/src/layout/dock/types.js.map +1 -1
- package/dist/src/layout/index.d.ts +1 -0
- package/dist/src/layout/index.d.ts.map +1 -1
- package/dist/src/layout/index.js +1 -0
- package/dist/src/layout/index.js.map +1 -1
- package/dist/src/layout/snap-grid/index.d.ts +1291 -0
- package/dist/src/layout/snap-grid/index.d.ts.map +1 -0
- package/dist/src/layout/snap-grid/index.js +510 -0
- package/dist/src/layout/snap-grid/index.js.map +1 -0
- package/dist/src/layout/snap-grid/types.d.ts +1046 -0
- package/dist/src/layout/snap-grid/types.d.ts.map +1 -0
- package/dist/src/layout/snap-grid/types.js +371 -0
- package/dist/src/layout/snap-grid/types.js.map +1 -0
- package/dist/src/navigation/app/index.d.ts +15 -0
- package/dist/src/navigation/app/index.d.ts.map +1 -1
- package/dist/src/navigation/app/index.js +2 -2
- package/dist/src/navigation/app/index.js.map +1 -1
- package/dist/src/navigation/nav-list/index.d.ts +5 -3
- package/dist/src/navigation/nav-list/index.d.ts.map +1 -1
- package/dist/src/navigation/nav-list/index.js +5 -3
- package/dist/src/navigation/nav-list/index.js.map +1 -1
- package/dist/src/overlays/action-bar/index.d.ts +9 -0
- package/dist/src/overlays/action-bar/index.d.ts.map +1 -1
- package/dist/src/overlays/action-bar/index.js +11 -1
- package/dist/src/overlays/action-bar/index.js.map +1 -1
- package/dist/src/overlays/action-bar/types.d.ts +11 -7
- package/dist/src/overlays/action-bar/types.d.ts.map +1 -1
- package/dist/src/overlays/action-bar/types.js +8 -1
- package/dist/src/overlays/action-bar/types.js.map +1 -1
- package/dist/src/overlays/dialog/index.d.ts +16 -0
- package/dist/src/overlays/dialog/index.d.ts.map +1 -1
- package/dist/src/overlays/dialog/index.js +18 -0
- package/dist/src/overlays/dialog/index.js.map +1 -1
- package/dist/src/overlays/dialog/types.d.ts +18 -11
- package/dist/src/overlays/dialog/types.d.ts.map +1 -1
- package/dist/src/overlays/dialog/types.js +12 -0
- package/dist/src/overlays/dialog/types.js.map +1 -1
- package/dist/src/overlays/drawer/index.d.ts +12 -0
- package/dist/src/overlays/drawer/index.d.ts.map +1 -1
- package/dist/src/overlays/drawer/index.js +14 -0
- package/dist/src/overlays/drawer/index.js.map +1 -1
- package/dist/src/overlays/drawer/types.d.ts +13 -1
- package/dist/src/overlays/drawer/types.d.ts.map +1 -1
- package/dist/src/overlays/drawer/types.js +12 -0
- package/dist/src/overlays/drawer/types.js.map +1 -1
- package/dist/src/overlays/hover-card/index.d.ts +9 -0
- package/dist/src/overlays/hover-card/index.d.ts.map +1 -1
- package/dist/src/overlays/hover-card/index.js +12 -1
- package/dist/src/overlays/hover-card/index.js.map +1 -1
- package/dist/src/overlays/hover-card/types.d.ts +9 -1
- package/dist/src/overlays/hover-card/types.d.ts.map +1 -1
- package/dist/src/overlays/hover-card/types.js +8 -0
- package/dist/src/overlays/hover-card/types.js.map +1 -1
- package/dist/src/overlays/popover/index.d.ts +15 -0
- package/dist/src/overlays/popover/index.d.ts.map +1 -1
- package/dist/src/overlays/popover/index.js +19 -1
- package/dist/src/overlays/popover/index.js.map +1 -1
- package/dist/src/overlays/popover/types.d.ts +19 -5
- package/dist/src/overlays/popover/types.d.ts.map +1 -1
- package/dist/src/overlays/popover/types.js +14 -0
- package/dist/src/overlays/popover/types.js.map +1 -1
- package/dist/src/overlays/toggle-tip/index.d.ts +9 -0
- package/dist/src/overlays/toggle-tip/index.d.ts.map +1 -1
- package/dist/src/overlays/toggle-tip/index.js +12 -1
- package/dist/src/overlays/toggle-tip/index.js.map +1 -1
- package/dist/src/overlays/toggle-tip/types.d.ts +9 -1
- package/dist/src/overlays/toggle-tip/types.d.ts.map +1 -1
- package/dist/src/overlays/toggle-tip/types.js +8 -0
- package/dist/src/overlays/toggle-tip/types.js.map +1 -1
- package/dist/src/runtime/collections/library.d.ts +10 -6
- package/dist/src/runtime/collections/library.d.ts.map +1 -1
- package/dist/src/runtime/collections/library.js +10 -6
- package/dist/src/runtime/collections/library.js.map +1 -1
- package/dist/src/runtime/display/bar-strip.d.ts +38 -10
- package/dist/src/runtime/display/bar-strip.d.ts.map +1 -1
- package/dist/src/runtime/display/bar-strip.js +12 -34
- package/dist/src/runtime/display/bar-strip.js.map +1 -1
- package/dist/src/runtime/feedback/status.d.ts +4 -2
- package/dist/src/runtime/feedback/status.d.ts.map +1 -1
- package/dist/src/runtime/feedback/status.js +4 -2
- package/dist/src/runtime/feedback/status.js.map +1 -1
- package/dist/src/runtime/layout/dock.d.ts +13 -8
- package/dist/src/runtime/layout/dock.d.ts.map +1 -1
- package/dist/src/runtime/layout/dock.js +13 -8
- package/dist/src/runtime/layout/dock.js.map +1 -1
- package/dist/src/runtime/layout/index.d.ts +1 -0
- package/dist/src/runtime/layout/index.d.ts.map +1 -1
- package/dist/src/runtime/layout/index.js +1 -0
- package/dist/src/runtime/layout/index.js.map +1 -1
- package/dist/src/runtime/layout/snap-grid.d.ts +68 -0
- package/dist/src/runtime/layout/snap-grid.d.ts.map +1 -0
- package/dist/src/runtime/layout/snap-grid.js +44 -0
- package/dist/src/runtime/layout/snap-grid.js.map +1 -0
- package/dist/src/runtime/navigation/app.d.ts +3 -1
- package/dist/src/runtime/navigation/app.d.ts.map +1 -1
- package/dist/src/runtime/navigation/app.js +3 -1
- package/dist/src/runtime/navigation/app.js.map +1 -1
- package/dist/src/style/typography.d.ts +18 -18
- package/dist/src/style/typography.js +18 -18
- package/dist/test/collections/index.d.ts +0 -1
- package/dist/test/collections/index.d.ts.map +1 -1
- package/dist/test/collections/index.js +0 -1
- package/dist/test/collections/index.js.map +1 -1
- package/dist/test/collections/library.examples.d.ts +28 -0
- package/dist/test/collections/library.examples.d.ts.map +1 -1
- package/dist/test/collections/library.examples.js +183 -3
- package/dist/test/collections/library.examples.js.map +1 -1
- package/dist/test/collections/sheet.examples.d.ts +0 -7
- package/dist/test/collections/sheet.examples.d.ts.map +1 -1
- package/dist/test/collections/sheet.examples.js +4 -31
- package/dist/test/collections/sheet.examples.js.map +1 -1
- package/dist/test/collections/table.examples.d.ts +0 -7
- package/dist/test/collections/table.examples.d.ts.map +1 -1
- package/dist/test/collections/table.examples.js +1 -22
- package/dist/test/collections/table.examples.js.map +1 -1
- package/dist/test/display/bar-strip.examples.d.ts +6 -0
- package/dist/test/display/bar-strip.examples.d.ts.map +1 -1
- package/dist/test/display/bar-strip.examples.js +24 -1
- package/dist/test/display/bar-strip.examples.js.map +1 -1
- package/dist/test/feedback/status.examples.d.ts +1 -0
- package/dist/test/feedback/status.examples.d.ts.map +1 -1
- package/dist/test/feedback/status.examples.js +8 -0
- package/dist/test/feedback/status.examples.js.map +1 -1
- package/dist/test/layout/dock.examples.d.ts +14 -0
- package/dist/test/layout/dock.examples.d.ts.map +1 -1
- package/dist/test/layout/dock.examples.js +35 -0
- package/dist/test/layout/dock.examples.js.map +1 -1
- package/dist/test/layout/snap-grid.examples.d.ts +4 -0
- package/dist/test/layout/snap-grid.examples.d.ts.map +1 -0
- package/dist/test/layout/snap-grid.examples.js +252 -0
- package/dist/test/layout/snap-grid.examples.js.map +1 -0
- package/dist/test/navigation/app.examples.d.ts +6 -0
- package/dist/test/navigation/app.examples.d.ts.map +1 -1
- package/dist/test/navigation/app.examples.js +37 -2
- package/dist/test/navigation/app.examples.js.map +1 -1
- package/dist/test/navigation/nav-list.examples.d.ts +1 -0
- package/dist/test/navigation/nav-list.examples.d.ts.map +1 -1
- package/dist/test/navigation/nav-list.examples.js +21 -1
- package/dist/test/navigation/nav-list.examples.js.map +1 -1
- package/dist/test/overlays/dialog.examples.d.ts +1 -0
- package/dist/test/overlays/dialog.examples.d.ts.map +1 -1
- package/dist/test/overlays/dialog.examples.js +11 -0
- package/dist/test/overlays/dialog.examples.js.map +1 -1
- package/dist/test/overlays/drawer.examples.d.ts +1 -0
- package/dist/test/overlays/drawer.examples.d.ts.map +1 -1
- package/dist/test/overlays/drawer.examples.js +12 -0
- package/dist/test/overlays/drawer.examples.js.map +1 -1
- package/dist/test/overlays/hover-card.examples.d.ts +1 -0
- package/dist/test/overlays/hover-card.examples.d.ts.map +1 -1
- package/dist/test/overlays/hover-card.examples.js +10 -0
- package/dist/test/overlays/hover-card.examples.js.map +1 -1
- package/dist/test/overlays/popover.examples.d.ts +1 -0
- package/dist/test/overlays/popover.examples.d.ts.map +1 -1
- package/dist/test/overlays/popover.examples.js +12 -2
- package/dist/test/overlays/popover.examples.js.map +1 -1
- package/dist/test/overlays/toggle-tip.examples.d.ts +1 -0
- package/dist/test/overlays/toggle-tip.examples.d.ts.map +1 -1
- package/dist/test/overlays/toggle-tip.examples.js +11 -1
- package/dist/test/overlays/toggle-tip.examples.js.map +1 -1
- package/package.json +5 -9
- package/dist/test/collections/paged-source.examples.d.ts +0 -14
- package/dist/test/collections/paged-source.examples.d.ts.map +0 -1
- package/dist/test/collections/paged-source.examples.js +0 -252
- package/dist/test/collections/paged-source.examples.js.map +0 -1
|
@@ -0,0 +1,1291 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* SnapGrid — the 12-column snap grid of tiles (#989), its editing (#990),
|
|
7
|
+
* and the editing canvas's chrome (#995).
|
|
8
|
+
*
|
|
9
|
+
* `SnapGrid.Root(data, config)` lays the host's rows out as tiles in rows on a
|
|
10
|
+
* 12-column grid: the canvas under the Studio's builder, a published page, and
|
|
11
|
+
* — `variant: "wireframe"` — the page library's thumbnails. The host's
|
|
12
|
+
* collection is the source, as for the Sheet and the Plan: `cell` maps one row
|
|
13
|
+
* to its {@link SnapGridCellType}, reified once into an East function and called
|
|
14
|
+
* for every row, never spliced.
|
|
15
|
+
*
|
|
16
|
+
* Declared with `edit` and `editing`, the SnapGrid is the builder's canvas: a
|
|
17
|
+
* tile moves, resizes and drops as a draft of the shared editing session, and
|
|
18
|
+
* Apply sends every draft as one checked batch — from its history item, or
|
|
19
|
+
* when a host asks through a bound `apply` (#998).
|
|
20
|
+
*
|
|
21
|
+
* @packageDocumentation
|
|
22
|
+
*/
|
|
23
|
+
import { type BlockBuilder, type EastType, type ExprType, type SubtypeExprOrValue, type TypeOf, ArrayType, AsyncFunctionType, BlobType, BooleanType, DictType, FloatType, FunctionType, IntegerType, NullType, OptionType, StringType, StructType } from "@elaraai/east";
|
|
24
|
+
import { UIComponentType } from "../../component.js";
|
|
25
|
+
import { DragEventType, LibraryRefType } from "../../contracts/drag.js";
|
|
26
|
+
import { SnapGridAlignType, SnapGridApplyBindType, SnapGridApplyStateType, SnapGridPlaceType, SnapGridRequestType, SnapGridSurfaceType, SnapGridUiBindType, SnapGridUiStateType, SnapGridVariantType, SnapGridViewBindType, SnapGridViewStateType, SnapGridWidthType, type SnapGridAlignLiteral, type SnapGridSurfaceLiteral, type SnapGridVariantLiteral } from "./types.js";
|
|
27
|
+
export { SnapGridAlignType, SnapGridApplyBindType, SnapGridApplyStateType, SnapGridPlaceType, SnapGridRequestType, SnapGridSurfaceType, SnapGridUiBindType, SnapGridUiStateType, SnapGridVariantType, SnapGridViewBindType, SnapGridViewStateType, SnapGridWidthType, type SnapGridAlignLiteral, type SnapGridSurfaceLiteral, type SnapGridVariantLiteral, } from "./types.js";
|
|
28
|
+
/**
|
|
29
|
+
* One tile: its identity, where it sits, and what it shows.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Rows order by their first appearance among the cells, and the cells of a
|
|
33
|
+
* row by their order in the SnapGrid's `data`.
|
|
34
|
+
*
|
|
35
|
+
* @property key - The cell's identity
|
|
36
|
+
* @property row - The key of the row it sits in
|
|
37
|
+
* @property span - Its width, in columns of 12
|
|
38
|
+
* @property height - Its height in px; `none` is its content's height
|
|
39
|
+
* @property minHeight - The least height a height drag leaves it, in px; `none` stops it at its content's height
|
|
40
|
+
* @property align - Where it sits in a taller row
|
|
41
|
+
* @property frame - Drawn in a tile frame, or bare
|
|
42
|
+
* @property label - Its name — the drag ghost's, the announcements' and the history's; `none` names it by its key
|
|
43
|
+
* @property icon - A Font Awesome solid icon name, which the editing canvas's selection bar shows beside its name
|
|
44
|
+
* @property meta - A line the selection bar shows after its name
|
|
45
|
+
* @property content - What it shows
|
|
46
|
+
*/
|
|
47
|
+
export declare const SnapGridCellType: StructType<{
|
|
48
|
+
readonly key: StringType;
|
|
49
|
+
readonly row: StringType;
|
|
50
|
+
readonly span: IntegerType;
|
|
51
|
+
readonly height: OptionType<IntegerType>;
|
|
52
|
+
readonly minHeight: OptionType<IntegerType>;
|
|
53
|
+
readonly align: import("@elaraai/east").VariantType<{
|
|
54
|
+
readonly top: NullType;
|
|
55
|
+
readonly center: NullType;
|
|
56
|
+
readonly stretch: NullType;
|
|
57
|
+
}>;
|
|
58
|
+
readonly frame: BooleanType;
|
|
59
|
+
readonly label: OptionType<StringType>;
|
|
60
|
+
readonly icon: OptionType<StringType>;
|
|
61
|
+
readonly meta: OptionType<StringType>;
|
|
62
|
+
readonly content: import("@elaraai/east").RecursiveType<import("../../component.js").UIComponentNode>;
|
|
63
|
+
}>;
|
|
64
|
+
/** Type representing a SnapGrid cell. */
|
|
65
|
+
export type SnapGridCellType = typeof SnapGridCellType;
|
|
66
|
+
/**
|
|
67
|
+
* A SnapGrid's editing declaration, on the wire (#990) — the shared session's
|
|
68
|
+
* fields, the entry fields a gesture writes, the drafted collection's cells,
|
|
69
|
+
* a dropped card's new entry and the author's readiness check.
|
|
70
|
+
*
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
export declare const SnapGridEditingType: StructType<{
|
|
74
|
+
readonly fields: StructType<{
|
|
75
|
+
readonly key: StringType;
|
|
76
|
+
readonly row: StringType;
|
|
77
|
+
readonly span: StringType;
|
|
78
|
+
readonly height: OptionType<StringType>;
|
|
79
|
+
readonly align: OptionType<StringType>;
|
|
80
|
+
}>;
|
|
81
|
+
readonly derive: FunctionType<[BlobType], ArrayType<StructType<{
|
|
82
|
+
readonly key: StringType;
|
|
83
|
+
readonly row: StringType;
|
|
84
|
+
readonly span: IntegerType;
|
|
85
|
+
readonly height: OptionType<IntegerType>;
|
|
86
|
+
readonly minHeight: OptionType<IntegerType>;
|
|
87
|
+
readonly align: import("@elaraai/east").VariantType<{
|
|
88
|
+
readonly top: NullType;
|
|
89
|
+
readonly center: NullType;
|
|
90
|
+
readonly stretch: NullType;
|
|
91
|
+
}>;
|
|
92
|
+
readonly frame: BooleanType;
|
|
93
|
+
readonly label: OptionType<StringType>;
|
|
94
|
+
readonly icon: OptionType<StringType>;
|
|
95
|
+
readonly meta: OptionType<StringType>;
|
|
96
|
+
readonly content: import("@elaraai/east").RecursiveType<import("../../component.js").UIComponentNode>;
|
|
97
|
+
}>>>;
|
|
98
|
+
readonly create: OptionType<FunctionType<[StructType<{
|
|
99
|
+
readonly library: StringType;
|
|
100
|
+
readonly key: StringType;
|
|
101
|
+
}>, StructType<{
|
|
102
|
+
readonly key: StringType;
|
|
103
|
+
readonly row: StringType;
|
|
104
|
+
}>], BlobType>>;
|
|
105
|
+
readonly ready: OptionType<FunctionType<[ArrayType<StructType<{
|
|
106
|
+
readonly id: StringType;
|
|
107
|
+
readonly entry: BlobType;
|
|
108
|
+
}>>], ArrayType<import("@elaraai/east").VariantType<{
|
|
109
|
+
readonly ready: NullType;
|
|
110
|
+
readonly incomplete: ArrayType<StructType<{
|
|
111
|
+
readonly field: StringType;
|
|
112
|
+
readonly message: StringType;
|
|
113
|
+
}>>;
|
|
114
|
+
readonly invalid: ArrayType<StructType<{
|
|
115
|
+
readonly field: StringType;
|
|
116
|
+
readonly message: StringType;
|
|
117
|
+
}>>;
|
|
118
|
+
}>>>>;
|
|
119
|
+
readonly onDrafted: OptionType<FunctionType<[BlobType], NullType>>;
|
|
120
|
+
readonly sourceId: StringType;
|
|
121
|
+
readonly entryType: import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
122
|
+
readonly Never: NullType;
|
|
123
|
+
readonly Null: NullType;
|
|
124
|
+
readonly Boolean: NullType;
|
|
125
|
+
readonly Integer: NullType;
|
|
126
|
+
readonly Float: NullType;
|
|
127
|
+
readonly String: NullType;
|
|
128
|
+
readonly DateTime: NullType;
|
|
129
|
+
readonly Blob: NullType;
|
|
130
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
131
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
132
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
133
|
+
readonly Dict: StructType<{
|
|
134
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
135
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
136
|
+
}>;
|
|
137
|
+
readonly Struct: ArrayType<StructType<{
|
|
138
|
+
readonly name: StringType;
|
|
139
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
140
|
+
}>>;
|
|
141
|
+
readonly Variant: ArrayType<StructType<{
|
|
142
|
+
readonly name: StringType;
|
|
143
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
144
|
+
}>>;
|
|
145
|
+
readonly Recursive: import("@elaraai/east").VariantType<{
|
|
146
|
+
readonly ref: IntegerType;
|
|
147
|
+
readonly wrapper: StructType<{
|
|
148
|
+
readonly id: IntegerType;
|
|
149
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
150
|
+
}>;
|
|
151
|
+
}>;
|
|
152
|
+
readonly Function: StructType<{
|
|
153
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
154
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
155
|
+
}>;
|
|
156
|
+
readonly AsyncFunction: StructType<{
|
|
157
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
158
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
159
|
+
}>;
|
|
160
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
161
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
162
|
+
}>>;
|
|
163
|
+
readonly idField: OptionType<StringType>;
|
|
164
|
+
readonly draftType: import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
165
|
+
readonly Never: NullType;
|
|
166
|
+
readonly Null: NullType;
|
|
167
|
+
readonly Boolean: NullType;
|
|
168
|
+
readonly Integer: NullType;
|
|
169
|
+
readonly Float: NullType;
|
|
170
|
+
readonly String: NullType;
|
|
171
|
+
readonly DateTime: NullType;
|
|
172
|
+
readonly Blob: NullType;
|
|
173
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
174
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
175
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
176
|
+
readonly Dict: StructType<{
|
|
177
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
178
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
179
|
+
}>;
|
|
180
|
+
readonly Struct: ArrayType<StructType<{
|
|
181
|
+
readonly name: StringType;
|
|
182
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
183
|
+
}>>;
|
|
184
|
+
readonly Variant: ArrayType<StructType<{
|
|
185
|
+
readonly name: StringType;
|
|
186
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
187
|
+
}>>;
|
|
188
|
+
readonly Recursive: import("@elaraai/east").VariantType<{
|
|
189
|
+
readonly ref: IntegerType;
|
|
190
|
+
readonly wrapper: StructType<{
|
|
191
|
+
readonly id: IntegerType;
|
|
192
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
193
|
+
}>;
|
|
194
|
+
}>;
|
|
195
|
+
readonly Function: StructType<{
|
|
196
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
197
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
198
|
+
}>;
|
|
199
|
+
readonly AsyncFunction: StructType<{
|
|
200
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
201
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
202
|
+
}>;
|
|
203
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
204
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
205
|
+
}>>;
|
|
206
|
+
readonly children: OptionType<StringType>;
|
|
207
|
+
readonly keyType: OptionType<import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
208
|
+
readonly Never: NullType;
|
|
209
|
+
readonly Null: NullType;
|
|
210
|
+
readonly Boolean: NullType;
|
|
211
|
+
readonly Integer: NullType;
|
|
212
|
+
readonly Float: NullType;
|
|
213
|
+
readonly String: NullType;
|
|
214
|
+
readonly DateTime: NullType;
|
|
215
|
+
readonly Blob: NullType;
|
|
216
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
217
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
218
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
219
|
+
readonly Dict: StructType<{
|
|
220
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
221
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
222
|
+
}>;
|
|
223
|
+
readonly Struct: ArrayType<StructType<{
|
|
224
|
+
readonly name: StringType;
|
|
225
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
226
|
+
}>>;
|
|
227
|
+
readonly Variant: ArrayType<StructType<{
|
|
228
|
+
readonly name: StringType;
|
|
229
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
230
|
+
}>>;
|
|
231
|
+
readonly Recursive: import("@elaraai/east").VariantType<{
|
|
232
|
+
readonly ref: IntegerType;
|
|
233
|
+
readonly wrapper: StructType<{
|
|
234
|
+
readonly id: IntegerType;
|
|
235
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
236
|
+
}>;
|
|
237
|
+
}>;
|
|
238
|
+
readonly Function: StructType<{
|
|
239
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
240
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
241
|
+
}>;
|
|
242
|
+
readonly AsyncFunction: StructType<{
|
|
243
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
244
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
245
|
+
}>;
|
|
246
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
247
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
248
|
+
}>>>;
|
|
249
|
+
readonly snapshot: OptionType<BlobType>;
|
|
250
|
+
readonly readEntry: FunctionType<[StringType, IntegerType], OptionType<BlobType>>;
|
|
251
|
+
readonly onPatch: OptionType<FunctionType<[BlobType], NullType>>;
|
|
252
|
+
readonly onApply: OptionType<import("@elaraai/east").VariantType<{
|
|
253
|
+
readonly sync: FunctionType<[BlobType], import("@elaraai/east").VariantType<{
|
|
254
|
+
readonly applied: StructType<{
|
|
255
|
+
readonly revision: OptionType<StringType>;
|
|
256
|
+
}>;
|
|
257
|
+
readonly rejected: ArrayType<StructType<{
|
|
258
|
+
readonly entry: StringType;
|
|
259
|
+
readonly row: OptionType<IntegerType>;
|
|
260
|
+
readonly field: OptionType<StringType>;
|
|
261
|
+
readonly message: StringType;
|
|
262
|
+
}>>;
|
|
263
|
+
readonly conflict: ArrayType<StructType<{
|
|
264
|
+
readonly entry: StringType;
|
|
265
|
+
readonly row: OptionType<IntegerType>;
|
|
266
|
+
readonly field: OptionType<StringType>;
|
|
267
|
+
readonly message: StringType;
|
|
268
|
+
}>>;
|
|
269
|
+
}>>;
|
|
270
|
+
readonly async: AsyncFunctionType<[BlobType], import("@elaraai/east").VariantType<{
|
|
271
|
+
readonly applied: StructType<{
|
|
272
|
+
readonly revision: OptionType<StringType>;
|
|
273
|
+
}>;
|
|
274
|
+
readonly rejected: ArrayType<StructType<{
|
|
275
|
+
readonly entry: StringType;
|
|
276
|
+
readonly row: OptionType<IntegerType>;
|
|
277
|
+
readonly field: OptionType<StringType>;
|
|
278
|
+
readonly message: StringType;
|
|
279
|
+
}>>;
|
|
280
|
+
readonly conflict: ArrayType<StructType<{
|
|
281
|
+
readonly entry: StringType;
|
|
282
|
+
readonly row: OptionType<IntegerType>;
|
|
283
|
+
readonly field: OptionType<StringType>;
|
|
284
|
+
readonly message: StringType;
|
|
285
|
+
}>>;
|
|
286
|
+
}>>;
|
|
287
|
+
}>>;
|
|
288
|
+
readonly mode: import("@elaraai/east").VariantType<{
|
|
289
|
+
readonly batch: NullType;
|
|
290
|
+
readonly auto: NullType;
|
|
291
|
+
}>;
|
|
292
|
+
}>;
|
|
293
|
+
/** Type representing a SnapGrid's editing declaration. */
|
|
294
|
+
export type SnapGridEditingType = typeof SnapGridEditingType;
|
|
295
|
+
/**
|
|
296
|
+
* A SnapGrid's value — the named twin of the inline `SnapGrid` arm of
|
|
297
|
+
* `UIComponentType`, built by the same {@link SnapGridRootOf} over
|
|
298
|
+
* `UIComponentType`, where the arm's cells spell their content with the
|
|
299
|
+
* recursion node.
|
|
300
|
+
*
|
|
301
|
+
* @property cells - Every cell, in the order `data` holds them
|
|
302
|
+
* @property variant - Tiles (the default) or a wireframe
|
|
303
|
+
* @property width - The design width, a CSS length
|
|
304
|
+
* @property height - A pinned height, a CSS length; the grid scrolls within
|
|
305
|
+
* @property maxHeight - A height cap, a CSS length; the grid scrolls past it
|
|
306
|
+
* @property zoom - The scale the canvas draws at (`1.0` actual size)
|
|
307
|
+
* @property guides - Draw the column ruler and the column bands
|
|
308
|
+
* @property editing - The editing session (#990); `none` takes no gesture
|
|
309
|
+
* @property ui - The bound selection; `none` keeps it in the canvas
|
|
310
|
+
* @property view - The bound design width and zoom (#995); `none` keeps them in the canvas
|
|
311
|
+
* @property apply - The bound Apply request (#998); `none` takes none
|
|
312
|
+
* @property id - The drag surface's name in a drop's cell refs; `none` names one of its own
|
|
313
|
+
* @property sources - The library ids whose cards land on the canvas
|
|
314
|
+
* @property canDrop - The veto over a drop where the drag rests (the shared grammar)
|
|
315
|
+
* @property widths - The design widths the editing canvas's toolbar offers (#995)
|
|
316
|
+
* @property toolbar - The host's items in the editing canvas's toolbar: `start` leads the row, `end` closes it (#995)
|
|
317
|
+
* @property panes - The panes beside the editing canvas, under its toolbar (#995)
|
|
318
|
+
* @property surface - The editing canvas's frame (`card`, the default) or none (`shell`) (#995)
|
|
319
|
+
*/
|
|
320
|
+
export declare const SnapGridRootType: StructType<{
|
|
321
|
+
readonly cells: ArrayType<StructType<{
|
|
322
|
+
readonly key: StringType;
|
|
323
|
+
readonly row: StringType;
|
|
324
|
+
readonly span: IntegerType;
|
|
325
|
+
readonly height: OptionType<IntegerType>;
|
|
326
|
+
readonly minHeight: OptionType<IntegerType>;
|
|
327
|
+
readonly align: import("@elaraai/east").VariantType<{
|
|
328
|
+
readonly top: NullType;
|
|
329
|
+
readonly center: NullType;
|
|
330
|
+
readonly stretch: NullType;
|
|
331
|
+
}>;
|
|
332
|
+
readonly frame: BooleanType;
|
|
333
|
+
readonly label: OptionType<StringType>;
|
|
334
|
+
readonly icon: OptionType<StringType>;
|
|
335
|
+
readonly meta: OptionType<StringType>;
|
|
336
|
+
readonly content: import("@elaraai/east").RecursiveType<import("../../component.js").UIComponentNode>;
|
|
337
|
+
}>>;
|
|
338
|
+
readonly variant: OptionType<import("@elaraai/east").VariantType<{
|
|
339
|
+
readonly tiles: NullType;
|
|
340
|
+
readonly wireframe: NullType;
|
|
341
|
+
}>>;
|
|
342
|
+
readonly width: OptionType<StringType>;
|
|
343
|
+
readonly height: OptionType<StringType>;
|
|
344
|
+
readonly maxHeight: OptionType<StringType>;
|
|
345
|
+
readonly zoom: OptionType<FloatType>;
|
|
346
|
+
readonly guides: BooleanType;
|
|
347
|
+
readonly editing: OptionType<StructType<{
|
|
348
|
+
readonly fields: StructType<{
|
|
349
|
+
readonly key: StringType;
|
|
350
|
+
readonly row: StringType;
|
|
351
|
+
readonly span: StringType;
|
|
352
|
+
readonly height: OptionType<StringType>;
|
|
353
|
+
readonly align: OptionType<StringType>;
|
|
354
|
+
}>;
|
|
355
|
+
readonly derive: FunctionType<[BlobType], ArrayType<StructType<{
|
|
356
|
+
readonly key: StringType;
|
|
357
|
+
readonly row: StringType;
|
|
358
|
+
readonly span: IntegerType;
|
|
359
|
+
readonly height: OptionType<IntegerType>;
|
|
360
|
+
readonly minHeight: OptionType<IntegerType>;
|
|
361
|
+
readonly align: import("@elaraai/east").VariantType<{
|
|
362
|
+
readonly top: NullType;
|
|
363
|
+
readonly center: NullType;
|
|
364
|
+
readonly stretch: NullType;
|
|
365
|
+
}>;
|
|
366
|
+
readonly frame: BooleanType;
|
|
367
|
+
readonly label: OptionType<StringType>;
|
|
368
|
+
readonly icon: OptionType<StringType>;
|
|
369
|
+
readonly meta: OptionType<StringType>;
|
|
370
|
+
readonly content: import("@elaraai/east").RecursiveType<import("../../component.js").UIComponentNode>;
|
|
371
|
+
}>>>;
|
|
372
|
+
readonly create: OptionType<FunctionType<[StructType<{
|
|
373
|
+
readonly library: StringType;
|
|
374
|
+
readonly key: StringType;
|
|
375
|
+
}>, StructType<{
|
|
376
|
+
readonly key: StringType;
|
|
377
|
+
readonly row: StringType;
|
|
378
|
+
}>], BlobType>>;
|
|
379
|
+
readonly ready: OptionType<FunctionType<[ArrayType<StructType<{
|
|
380
|
+
readonly id: StringType;
|
|
381
|
+
readonly entry: BlobType;
|
|
382
|
+
}>>], ArrayType<import("@elaraai/east").VariantType<{
|
|
383
|
+
readonly ready: NullType;
|
|
384
|
+
readonly incomplete: ArrayType<StructType<{
|
|
385
|
+
readonly field: StringType;
|
|
386
|
+
readonly message: StringType;
|
|
387
|
+
}>>;
|
|
388
|
+
readonly invalid: ArrayType<StructType<{
|
|
389
|
+
readonly field: StringType;
|
|
390
|
+
readonly message: StringType;
|
|
391
|
+
}>>;
|
|
392
|
+
}>>>>;
|
|
393
|
+
readonly onDrafted: OptionType<FunctionType<[BlobType], NullType>>;
|
|
394
|
+
readonly sourceId: StringType;
|
|
395
|
+
readonly entryType: import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
396
|
+
readonly Never: NullType;
|
|
397
|
+
readonly Null: NullType;
|
|
398
|
+
readonly Boolean: NullType;
|
|
399
|
+
readonly Integer: NullType;
|
|
400
|
+
readonly Float: NullType;
|
|
401
|
+
readonly String: NullType;
|
|
402
|
+
readonly DateTime: NullType;
|
|
403
|
+
readonly Blob: NullType;
|
|
404
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
405
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
406
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
407
|
+
readonly Dict: StructType<{
|
|
408
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
409
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
410
|
+
}>;
|
|
411
|
+
readonly Struct: ArrayType<StructType<{
|
|
412
|
+
readonly name: StringType;
|
|
413
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
414
|
+
}>>;
|
|
415
|
+
readonly Variant: ArrayType<StructType<{
|
|
416
|
+
readonly name: StringType;
|
|
417
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
418
|
+
}>>;
|
|
419
|
+
readonly Recursive: import("@elaraai/east").VariantType<{
|
|
420
|
+
readonly ref: IntegerType;
|
|
421
|
+
readonly wrapper: StructType<{
|
|
422
|
+
readonly id: IntegerType;
|
|
423
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
424
|
+
}>;
|
|
425
|
+
}>;
|
|
426
|
+
readonly Function: StructType<{
|
|
427
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
428
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
429
|
+
}>;
|
|
430
|
+
readonly AsyncFunction: StructType<{
|
|
431
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
432
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
433
|
+
}>;
|
|
434
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
435
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
436
|
+
}>>;
|
|
437
|
+
readonly idField: OptionType<StringType>;
|
|
438
|
+
readonly draftType: import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
439
|
+
readonly Never: NullType;
|
|
440
|
+
readonly Null: NullType;
|
|
441
|
+
readonly Boolean: NullType;
|
|
442
|
+
readonly Integer: NullType;
|
|
443
|
+
readonly Float: NullType;
|
|
444
|
+
readonly String: NullType;
|
|
445
|
+
readonly DateTime: NullType;
|
|
446
|
+
readonly Blob: NullType;
|
|
447
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
448
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
449
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
450
|
+
readonly Dict: StructType<{
|
|
451
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
452
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
453
|
+
}>;
|
|
454
|
+
readonly Struct: ArrayType<StructType<{
|
|
455
|
+
readonly name: StringType;
|
|
456
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
457
|
+
}>>;
|
|
458
|
+
readonly Variant: ArrayType<StructType<{
|
|
459
|
+
readonly name: StringType;
|
|
460
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
461
|
+
}>>;
|
|
462
|
+
readonly Recursive: import("@elaraai/east").VariantType<{
|
|
463
|
+
readonly ref: IntegerType;
|
|
464
|
+
readonly wrapper: StructType<{
|
|
465
|
+
readonly id: IntegerType;
|
|
466
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
467
|
+
}>;
|
|
468
|
+
}>;
|
|
469
|
+
readonly Function: StructType<{
|
|
470
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
471
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
472
|
+
}>;
|
|
473
|
+
readonly AsyncFunction: StructType<{
|
|
474
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
475
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
476
|
+
}>;
|
|
477
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
478
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
479
|
+
}>>;
|
|
480
|
+
readonly children: OptionType<StringType>;
|
|
481
|
+
readonly keyType: OptionType<import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
482
|
+
readonly Never: NullType;
|
|
483
|
+
readonly Null: NullType;
|
|
484
|
+
readonly Boolean: NullType;
|
|
485
|
+
readonly Integer: NullType;
|
|
486
|
+
readonly Float: NullType;
|
|
487
|
+
readonly String: NullType;
|
|
488
|
+
readonly DateTime: NullType;
|
|
489
|
+
readonly Blob: NullType;
|
|
490
|
+
readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
|
|
491
|
+
readonly Array: import("@elaraai/east").RecursiveTypeMarker;
|
|
492
|
+
readonly Set: import("@elaraai/east").RecursiveTypeMarker;
|
|
493
|
+
readonly Dict: StructType<{
|
|
494
|
+
readonly key: import("@elaraai/east").RecursiveTypeMarker;
|
|
495
|
+
readonly value: import("@elaraai/east").RecursiveTypeMarker;
|
|
496
|
+
}>;
|
|
497
|
+
readonly Struct: ArrayType<StructType<{
|
|
498
|
+
readonly name: StringType;
|
|
499
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
500
|
+
}>>;
|
|
501
|
+
readonly Variant: ArrayType<StructType<{
|
|
502
|
+
readonly name: StringType;
|
|
503
|
+
readonly type: import("@elaraai/east").RecursiveTypeMarker;
|
|
504
|
+
}>>;
|
|
505
|
+
readonly Recursive: import("@elaraai/east").VariantType<{
|
|
506
|
+
readonly ref: IntegerType;
|
|
507
|
+
readonly wrapper: StructType<{
|
|
508
|
+
readonly id: IntegerType;
|
|
509
|
+
readonly inner: import("@elaraai/east").RecursiveTypeMarker;
|
|
510
|
+
}>;
|
|
511
|
+
}>;
|
|
512
|
+
readonly Function: StructType<{
|
|
513
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
514
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
515
|
+
}>;
|
|
516
|
+
readonly AsyncFunction: StructType<{
|
|
517
|
+
readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
|
|
518
|
+
readonly output: import("@elaraai/east").RecursiveTypeMarker;
|
|
519
|
+
}>;
|
|
520
|
+
readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
|
|
521
|
+
readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
|
|
522
|
+
}>>>;
|
|
523
|
+
readonly snapshot: OptionType<BlobType>;
|
|
524
|
+
readonly readEntry: FunctionType<[StringType, IntegerType], OptionType<BlobType>>;
|
|
525
|
+
readonly onPatch: OptionType<FunctionType<[BlobType], NullType>>;
|
|
526
|
+
readonly onApply: OptionType<import("@elaraai/east").VariantType<{
|
|
527
|
+
readonly sync: FunctionType<[BlobType], import("@elaraai/east").VariantType<{
|
|
528
|
+
readonly applied: StructType<{
|
|
529
|
+
readonly revision: OptionType<StringType>;
|
|
530
|
+
}>;
|
|
531
|
+
readonly rejected: ArrayType<StructType<{
|
|
532
|
+
readonly entry: StringType;
|
|
533
|
+
readonly row: OptionType<IntegerType>;
|
|
534
|
+
readonly field: OptionType<StringType>;
|
|
535
|
+
readonly message: StringType;
|
|
536
|
+
}>>;
|
|
537
|
+
readonly conflict: ArrayType<StructType<{
|
|
538
|
+
readonly entry: StringType;
|
|
539
|
+
readonly row: OptionType<IntegerType>;
|
|
540
|
+
readonly field: OptionType<StringType>;
|
|
541
|
+
readonly message: StringType;
|
|
542
|
+
}>>;
|
|
543
|
+
}>>;
|
|
544
|
+
readonly async: AsyncFunctionType<[BlobType], import("@elaraai/east").VariantType<{
|
|
545
|
+
readonly applied: StructType<{
|
|
546
|
+
readonly revision: OptionType<StringType>;
|
|
547
|
+
}>;
|
|
548
|
+
readonly rejected: ArrayType<StructType<{
|
|
549
|
+
readonly entry: StringType;
|
|
550
|
+
readonly row: OptionType<IntegerType>;
|
|
551
|
+
readonly field: OptionType<StringType>;
|
|
552
|
+
readonly message: StringType;
|
|
553
|
+
}>>;
|
|
554
|
+
readonly conflict: ArrayType<StructType<{
|
|
555
|
+
readonly entry: StringType;
|
|
556
|
+
readonly row: OptionType<IntegerType>;
|
|
557
|
+
readonly field: OptionType<StringType>;
|
|
558
|
+
readonly message: StringType;
|
|
559
|
+
}>>;
|
|
560
|
+
}>>;
|
|
561
|
+
}>>;
|
|
562
|
+
readonly mode: import("@elaraai/east").VariantType<{
|
|
563
|
+
readonly batch: NullType;
|
|
564
|
+
readonly auto: NullType;
|
|
565
|
+
}>;
|
|
566
|
+
}>>;
|
|
567
|
+
readonly ui: OptionType<StructType<{
|
|
568
|
+
readonly read: FunctionType<[], StructType<{
|
|
569
|
+
readonly selected: OptionType<StringType>;
|
|
570
|
+
readonly request: OptionType<StructType<{
|
|
571
|
+
readonly key: StringType;
|
|
572
|
+
readonly change: import("@elaraai/east").VariantType<{
|
|
573
|
+
readonly span: IntegerType;
|
|
574
|
+
readonly row: IntegerType;
|
|
575
|
+
readonly height: OptionType<IntegerType>;
|
|
576
|
+
readonly align: import("@elaraai/east").VariantType<{
|
|
577
|
+
readonly top: NullType;
|
|
578
|
+
readonly center: NullType;
|
|
579
|
+
readonly stretch: NullType;
|
|
580
|
+
}>;
|
|
581
|
+
}>;
|
|
582
|
+
}>>;
|
|
583
|
+
}>>;
|
|
584
|
+
readonly write: FunctionType<[StructType<{
|
|
585
|
+
readonly selected: OptionType<StringType>;
|
|
586
|
+
readonly request: OptionType<StructType<{
|
|
587
|
+
readonly key: StringType;
|
|
588
|
+
readonly change: import("@elaraai/east").VariantType<{
|
|
589
|
+
readonly span: IntegerType;
|
|
590
|
+
readonly row: IntegerType;
|
|
591
|
+
readonly height: OptionType<IntegerType>;
|
|
592
|
+
readonly align: import("@elaraai/east").VariantType<{
|
|
593
|
+
readonly top: NullType;
|
|
594
|
+
readonly center: NullType;
|
|
595
|
+
readonly stretch: NullType;
|
|
596
|
+
}>;
|
|
597
|
+
}>;
|
|
598
|
+
}>>;
|
|
599
|
+
}>], NullType>;
|
|
600
|
+
readonly has: FunctionType<[], BooleanType>;
|
|
601
|
+
}>>;
|
|
602
|
+
readonly view: OptionType<StructType<{
|
|
603
|
+
readonly read: FunctionType<[], StructType<{
|
|
604
|
+
readonly width: OptionType<StringType>;
|
|
605
|
+
readonly zoom: OptionType<FloatType>;
|
|
606
|
+
}>>;
|
|
607
|
+
readonly write: FunctionType<[StructType<{
|
|
608
|
+
readonly width: OptionType<StringType>;
|
|
609
|
+
readonly zoom: OptionType<FloatType>;
|
|
610
|
+
}>], NullType>;
|
|
611
|
+
readonly has: FunctionType<[], BooleanType>;
|
|
612
|
+
}>>;
|
|
613
|
+
readonly apply: OptionType<StructType<{
|
|
614
|
+
readonly read: FunctionType<[], import("@elaraai/east").VariantType<{
|
|
615
|
+
readonly idle: NullType;
|
|
616
|
+
readonly asked: StringType;
|
|
617
|
+
readonly applied: StringType;
|
|
618
|
+
readonly refused: StructType<{
|
|
619
|
+
readonly id: StringType;
|
|
620
|
+
readonly reason: StringType;
|
|
621
|
+
}>;
|
|
622
|
+
}>>;
|
|
623
|
+
readonly write: FunctionType<[import("@elaraai/east").VariantType<{
|
|
624
|
+
readonly idle: NullType;
|
|
625
|
+
readonly asked: StringType;
|
|
626
|
+
readonly applied: StringType;
|
|
627
|
+
readonly refused: StructType<{
|
|
628
|
+
readonly id: StringType;
|
|
629
|
+
readonly reason: StringType;
|
|
630
|
+
}>;
|
|
631
|
+
}>], NullType>;
|
|
632
|
+
readonly has: FunctionType<[], BooleanType>;
|
|
633
|
+
}>>;
|
|
634
|
+
readonly id: OptionType<StringType>;
|
|
635
|
+
readonly sources: ArrayType<StringType>;
|
|
636
|
+
readonly canDrop: OptionType<FunctionType<[import("@elaraai/east").VariantType<{
|
|
637
|
+
readonly add: StructType<{
|
|
638
|
+
readonly from: StructType<{
|
|
639
|
+
readonly library: StringType;
|
|
640
|
+
readonly key: StringType;
|
|
641
|
+
}>;
|
|
642
|
+
readonly into: StructType<{
|
|
643
|
+
readonly surface: StringType;
|
|
644
|
+
readonly row: StringType;
|
|
645
|
+
readonly slot: StringType;
|
|
646
|
+
readonly event: OptionType<StringType>;
|
|
647
|
+
}>;
|
|
648
|
+
readonly duplicate: BooleanType;
|
|
649
|
+
}>;
|
|
650
|
+
readonly move: StructType<{
|
|
651
|
+
readonly from: StructType<{
|
|
652
|
+
readonly surface: StringType;
|
|
653
|
+
readonly row: StringType;
|
|
654
|
+
readonly slot: StringType;
|
|
655
|
+
readonly event: OptionType<StringType>;
|
|
656
|
+
}>;
|
|
657
|
+
readonly to: StructType<{
|
|
658
|
+
readonly surface: StringType;
|
|
659
|
+
readonly row: StringType;
|
|
660
|
+
readonly slot: StringType;
|
|
661
|
+
readonly event: OptionType<StringType>;
|
|
662
|
+
}>;
|
|
663
|
+
}>;
|
|
664
|
+
readonly remove: StructType<{
|
|
665
|
+
readonly from: StructType<{
|
|
666
|
+
readonly surface: StringType;
|
|
667
|
+
readonly row: StringType;
|
|
668
|
+
readonly slot: StringType;
|
|
669
|
+
readonly event: OptionType<StringType>;
|
|
670
|
+
}>;
|
|
671
|
+
readonly to: import("@elaraai/east").VariantType<{
|
|
672
|
+
readonly trash: NullType;
|
|
673
|
+
readonly source: NullType;
|
|
674
|
+
}>;
|
|
675
|
+
}>;
|
|
676
|
+
readonly resize: StructType<{
|
|
677
|
+
readonly event: StructType<{
|
|
678
|
+
readonly surface: StringType;
|
|
679
|
+
readonly row: StringType;
|
|
680
|
+
readonly slot: StringType;
|
|
681
|
+
readonly event: OptionType<StringType>;
|
|
682
|
+
}>;
|
|
683
|
+
readonly edge: import("@elaraai/east").VariantType<{
|
|
684
|
+
readonly start: NullType;
|
|
685
|
+
readonly end: NullType;
|
|
686
|
+
}>;
|
|
687
|
+
}>;
|
|
688
|
+
}>], BooleanType>>;
|
|
689
|
+
readonly widths: ArrayType<StructType<{
|
|
690
|
+
readonly label: StringType;
|
|
691
|
+
readonly icon: OptionType<StringType>;
|
|
692
|
+
readonly width: StringType;
|
|
693
|
+
}>>;
|
|
694
|
+
readonly toolbar: StructType<{
|
|
695
|
+
readonly start: ArrayType<import("@elaraai/east").RecursiveType<import("../../component.js").UIComponentNode>>;
|
|
696
|
+
readonly end: ArrayType<import("@elaraai/east").RecursiveType<import("../../component.js").UIComponentNode>>;
|
|
697
|
+
}>;
|
|
698
|
+
readonly panes: StructType<{
|
|
699
|
+
readonly start: OptionType<import("@elaraai/east").RecursiveType<import("../../component.js").UIComponentNode>>;
|
|
700
|
+
readonly end: OptionType<import("@elaraai/east").RecursiveType<import("../../component.js").UIComponentNode>>;
|
|
701
|
+
}>;
|
|
702
|
+
readonly surface: OptionType<import("@elaraai/east").VariantType<{
|
|
703
|
+
readonly card: NullType;
|
|
704
|
+
readonly shell: NullType;
|
|
705
|
+
}>>;
|
|
706
|
+
}>;
|
|
707
|
+
/** Type representing a SnapGrid's value. */
|
|
708
|
+
export type SnapGridRootType = typeof SnapGridRootType;
|
|
709
|
+
/**
|
|
710
|
+
* What a SnapGrid's `editing.onPatch` receives for rows of `R` (#990) — the
|
|
711
|
+
* shared patch event over the SnapGrid's drafts, which are whole entries
|
|
712
|
+
* (`Editing.Types.DraftField(R)`): every gesture writes a complete entry.
|
|
713
|
+
*
|
|
714
|
+
* @typeParam R - The row type
|
|
715
|
+
* @param entryType - The SnapGrid's row type
|
|
716
|
+
* @returns The patch event type
|
|
717
|
+
*/
|
|
718
|
+
export declare function SnapGridPatchEventTypeFor<R extends EastType>(entryType: R): StructType<{
|
|
719
|
+
readonly transactionId: StringType;
|
|
720
|
+
readonly origin: import("@elaraai/east").VariantType<{
|
|
721
|
+
readonly typed: NullType;
|
|
722
|
+
readonly pasted: NullType;
|
|
723
|
+
readonly fill: NullType;
|
|
724
|
+
readonly row: NullType;
|
|
725
|
+
readonly pattern: NullType;
|
|
726
|
+
readonly insert: NullType;
|
|
727
|
+
readonly move: NullType;
|
|
728
|
+
readonly remove: NullType;
|
|
729
|
+
readonly resize: NullType;
|
|
730
|
+
readonly drop: NullType;
|
|
731
|
+
readonly verdict: NullType;
|
|
732
|
+
readonly undo: NullType;
|
|
733
|
+
readonly redo: NullType;
|
|
734
|
+
readonly discard: NullType;
|
|
735
|
+
}>;
|
|
736
|
+
readonly label: StringType;
|
|
737
|
+
readonly draftChanges: ArrayType<StructType<{
|
|
738
|
+
readonly id: StringType;
|
|
739
|
+
readonly patch: import("@elaraai/east").VariantType<{
|
|
740
|
+
unchanged: NullType;
|
|
741
|
+
replace: StructType<{
|
|
742
|
+
before: OptionType<import("@elaraai/east").VariantType<{
|
|
743
|
+
readonly missing: NullType;
|
|
744
|
+
readonly value: R;
|
|
745
|
+
readonly invalid: StringType;
|
|
746
|
+
}>>;
|
|
747
|
+
after: OptionType<import("@elaraai/east").VariantType<{
|
|
748
|
+
readonly missing: NullType;
|
|
749
|
+
readonly value: R;
|
|
750
|
+
readonly invalid: StringType;
|
|
751
|
+
}>>;
|
|
752
|
+
}>;
|
|
753
|
+
patch: import("@elaraai/east").VariantType<{
|
|
754
|
+
none: import("@elaraai/east").VariantType<{
|
|
755
|
+
unchanged: NullType;
|
|
756
|
+
replace: StructType<{
|
|
757
|
+
before: NullType;
|
|
758
|
+
after: NullType;
|
|
759
|
+
}>;
|
|
760
|
+
}>;
|
|
761
|
+
some: import("@elaraai/east").VariantType<{
|
|
762
|
+
unchanged: NullType;
|
|
763
|
+
replace: StructType<{
|
|
764
|
+
before: import("@elaraai/east").VariantType<{
|
|
765
|
+
readonly missing: NullType;
|
|
766
|
+
readonly value: R;
|
|
767
|
+
readonly invalid: StringType;
|
|
768
|
+
}>;
|
|
769
|
+
after: import("@elaraai/east").VariantType<{
|
|
770
|
+
readonly missing: NullType;
|
|
771
|
+
readonly value: R;
|
|
772
|
+
readonly invalid: StringType;
|
|
773
|
+
}>;
|
|
774
|
+
}>;
|
|
775
|
+
patch: import("@elaraai/east").VariantType<{
|
|
776
|
+
readonly missing: import("@elaraai/east").VariantType<{
|
|
777
|
+
unchanged: NullType;
|
|
778
|
+
replace: StructType<{
|
|
779
|
+
before: NullType;
|
|
780
|
+
after: NullType;
|
|
781
|
+
}>;
|
|
782
|
+
}>;
|
|
783
|
+
readonly value: R extends EastType ? import("@elaraai/east").PatchTypeOf<R> : never;
|
|
784
|
+
readonly invalid: import("@elaraai/east").VariantType<{
|
|
785
|
+
unchanged: NullType;
|
|
786
|
+
replace: StructType<{
|
|
787
|
+
before: StringType;
|
|
788
|
+
after: StringType;
|
|
789
|
+
}>;
|
|
790
|
+
}>;
|
|
791
|
+
}>;
|
|
792
|
+
}>;
|
|
793
|
+
}>;
|
|
794
|
+
}>;
|
|
795
|
+
readonly place: OptionType<import("@elaraai/east").VariantType<{
|
|
796
|
+
readonly ordered: import("@elaraai/east").VariantType<{
|
|
797
|
+
readonly start: NullType;
|
|
798
|
+
readonly end: NullType;
|
|
799
|
+
readonly before: StringType;
|
|
800
|
+
readonly after: StringType;
|
|
801
|
+
}>;
|
|
802
|
+
readonly keyOrder: NullType;
|
|
803
|
+
}>>;
|
|
804
|
+
}>>;
|
|
805
|
+
readonly domainChanges: OptionType<ArrayType<StructType<{
|
|
806
|
+
readonly id: StringType;
|
|
807
|
+
readonly patch: import("@elaraai/east").VariantType<{
|
|
808
|
+
unchanged: NullType;
|
|
809
|
+
replace: StructType<{
|
|
810
|
+
before: OptionType<R>;
|
|
811
|
+
after: OptionType<R>;
|
|
812
|
+
}>;
|
|
813
|
+
patch: import("@elaraai/east").VariantType<{
|
|
814
|
+
none: import("@elaraai/east").VariantType<{
|
|
815
|
+
unchanged: NullType;
|
|
816
|
+
replace: StructType<{
|
|
817
|
+
before: NullType;
|
|
818
|
+
after: NullType;
|
|
819
|
+
}>;
|
|
820
|
+
}>;
|
|
821
|
+
some: R extends EastType ? import("@elaraai/east").PatchTypeOf<R> : never;
|
|
822
|
+
}>;
|
|
823
|
+
}>;
|
|
824
|
+
readonly place: OptionType<import("@elaraai/east").VariantType<{
|
|
825
|
+
readonly ordered: import("@elaraai/east").VariantType<{
|
|
826
|
+
readonly start: NullType;
|
|
827
|
+
readonly end: NullType;
|
|
828
|
+
readonly before: StringType;
|
|
829
|
+
readonly after: StringType;
|
|
830
|
+
}>;
|
|
831
|
+
readonly keyOrder: NullType;
|
|
832
|
+
}>>;
|
|
833
|
+
}>>>;
|
|
834
|
+
readonly readiness: import("@elaraai/east").VariantType<{
|
|
835
|
+
readonly ready: NullType;
|
|
836
|
+
readonly incomplete: ArrayType<StructType<{
|
|
837
|
+
readonly entry: StringType;
|
|
838
|
+
readonly row: OptionType<IntegerType>;
|
|
839
|
+
readonly field: OptionType<StringType>;
|
|
840
|
+
readonly message: StringType;
|
|
841
|
+
}>>;
|
|
842
|
+
readonly invalid: ArrayType<StructType<{
|
|
843
|
+
readonly entry: StringType;
|
|
844
|
+
readonly row: OptionType<IntegerType>;
|
|
845
|
+
readonly field: OptionType<StringType>;
|
|
846
|
+
readonly message: StringType;
|
|
847
|
+
}>>;
|
|
848
|
+
}>;
|
|
849
|
+
}>;
|
|
850
|
+
/**
|
|
851
|
+
* A whole-value bind handle (`State.bind` / `Data.bind`) over a SnapGrid's rows
|
|
852
|
+
* — accepted as `data`, read where the SnapGrid renders, and written through by
|
|
853
|
+
* `editing.onUpdate`.
|
|
854
|
+
*
|
|
855
|
+
* @typeParam C - The collection it holds: an `Array` or a `Dict` of rows
|
|
856
|
+
*/
|
|
857
|
+
export interface SnapGridBindHandle<C extends EastType> {
|
|
858
|
+
/** The handle's read. */
|
|
859
|
+
read: (...args: never[]) => ExprType<C>;
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* What a SnapGrid's `data` takes: an `Array` or a `Dict` of rows, inline or
|
|
863
|
+
* through a bound handle ({@link SnapGridBindHandle}). The handle's read is
|
|
864
|
+
* checked where it resolves — an expression's type is invariant in its rows,
|
|
865
|
+
* so no one handle type here admits them all.
|
|
866
|
+
*/
|
|
867
|
+
export type SnapGridData = SubtypeExprOrValue<ArrayType<EastType>> | SubtypeExprOrValue<DictType<EastType, EastType>> | {
|
|
868
|
+
read: (...args: never[]) => unknown;
|
|
869
|
+
};
|
|
870
|
+
/** The row a collection type holds — an `Array`'s element, or a `Dict`'s value. */
|
|
871
|
+
type SnapGridElementOf<C> = C extends ArrayType<infer R extends EastType> ? R : C extends DictType<EastType, infer R extends EastType> ? R : never;
|
|
872
|
+
/**
|
|
873
|
+
* The row a SnapGrid's `data` holds — an `Array`'s element, or a `Dict`'s
|
|
874
|
+
* value, read through a bound handle when it is one.
|
|
875
|
+
*
|
|
876
|
+
* @typeParam T - The `data` passed
|
|
877
|
+
*/
|
|
878
|
+
export type SnapGridRowOf<T> = T extends {
|
|
879
|
+
read: (...args: never[]) => infer E;
|
|
880
|
+
} ? SnapGridElementOf<TypeOf<E>> : SnapGridElementOf<TypeOf<T>>;
|
|
881
|
+
/**
|
|
882
|
+
* The names of the fields of row type `R` whose type is `T` — what `edit`
|
|
883
|
+
* names a field by.
|
|
884
|
+
*
|
|
885
|
+
* @typeParam R - The row type
|
|
886
|
+
* @typeParam T - The field type wanted
|
|
887
|
+
*/
|
|
888
|
+
export type SnapGridFieldOf<R, T> = R extends StructType<infer F> ? {
|
|
889
|
+
[K in keyof F & string]: F[K] extends T ? K : never;
|
|
890
|
+
}[keyof F & string] : never;
|
|
891
|
+
/**
|
|
892
|
+
* The fields of one cell, as {@link SnapGrid.cell} takes them.
|
|
893
|
+
*
|
|
894
|
+
* @property key - The cell's identity
|
|
895
|
+
* @property row - The key of the row it sits in
|
|
896
|
+
* @property span - Its width, in columns of 12
|
|
897
|
+
* @property height - Its height in px; omitted or `none` is its content's height
|
|
898
|
+
* @property minHeight - The least height a height drag leaves it; omitted or `none` stops it at its content's height
|
|
899
|
+
* @property align - Where it sits in a taller row; `top` when omitted
|
|
900
|
+
* @property frame - Drawn in a tile frame (the default), or bare
|
|
901
|
+
* @property label - Its name, for the drag ghost, the announcements and the history; omitted, its key
|
|
902
|
+
* @property icon - A Font Awesome solid icon name, beside its name in the editing canvas's selection bar
|
|
903
|
+
* @property meta - A line after its name in the selection bar — what it is, what it reads
|
|
904
|
+
* @property content - What it shows
|
|
905
|
+
*/
|
|
906
|
+
export interface SnapGridCellFields {
|
|
907
|
+
/** The cell's identity. */
|
|
908
|
+
key: SubtypeExprOrValue<StringType>;
|
|
909
|
+
/** The key of the row it sits in. */
|
|
910
|
+
row: SubtypeExprOrValue<StringType>;
|
|
911
|
+
/** Its width, in columns of 12. */
|
|
912
|
+
span: SubtypeExprOrValue<IntegerType>;
|
|
913
|
+
/** Its height in px; omitted or `none` is its content's height. */
|
|
914
|
+
height?: SubtypeExprOrValue<OptionType<IntegerType>>;
|
|
915
|
+
/** The least height a height drag leaves it, in px — a chart's plot, say; omitted or `none` stops it at its content's height. */
|
|
916
|
+
minHeight?: SubtypeExprOrValue<OptionType<IntegerType>>;
|
|
917
|
+
/** Where it sits in a taller row; `top` when omitted. */
|
|
918
|
+
align?: SnapGridAlignLiteral | SubtypeExprOrValue<SnapGridAlignType>;
|
|
919
|
+
/** Drawn in a tile frame (the default), or bare. */
|
|
920
|
+
frame?: SubtypeExprOrValue<BooleanType>;
|
|
921
|
+
/** Its name, for the drag ghost, the announcements and the history; omitted, its key. */
|
|
922
|
+
label?: SubtypeExprOrValue<OptionType<StringType>>;
|
|
923
|
+
/** A Font Awesome solid icon name, beside its name in the editing canvas's selection bar; omitted, none. */
|
|
924
|
+
icon?: SubtypeExprOrValue<OptionType<StringType>>;
|
|
925
|
+
/** A line after its name in the selection bar — what it is, what it reads; omitted, none. */
|
|
926
|
+
meta?: SubtypeExprOrValue<OptionType<StringType>>;
|
|
927
|
+
/** What it shows. */
|
|
928
|
+
content: SubtypeExprOrValue<UIComponentType>;
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* What a gesture writes into the SnapGrid's rows (#990) — the fields it names,
|
|
932
|
+
* and the new row a dropped card becomes.
|
|
933
|
+
*
|
|
934
|
+
* @typeParam R - The row type
|
|
935
|
+
*/
|
|
936
|
+
export interface SnapGridEditConfig<R extends EastType> {
|
|
937
|
+
/** The String identity field — what the session and `Editing.apply` address a row by. */
|
|
938
|
+
key: SnapGridFieldOf<R, StringType>;
|
|
939
|
+
/** The String field holding the row key a tile sits in. */
|
|
940
|
+
row: SnapGridFieldOf<R, StringType>;
|
|
941
|
+
/** The Integer field holding a tile's span. */
|
|
942
|
+
span: SnapGridFieldOf<R, IntegerType>;
|
|
943
|
+
/** The `Option<Integer>` field holding a tile's height; omitted, a tile's height is not edited. */
|
|
944
|
+
height?: SnapGridFieldOf<R, OptionType<IntegerType>>;
|
|
945
|
+
/** The `SnapGrid.Types.Align` field an align request writes (#996); omitted, a request to align a tile is refused. */
|
|
946
|
+
align?: SnapGridFieldOf<R, SnapGridAlignType>;
|
|
947
|
+
/**
|
|
948
|
+
* A dropped card's new row, built in the block `$` — bind a lookup once with
|
|
949
|
+
* `$.let`, as in any East function body: `card` is the drag grammar's
|
|
950
|
+
* `{ library, key }`, `at` a fresh key and the row it lands in. The canvas
|
|
951
|
+
* then writes `at.row` into `row` and holds the span to the room the row
|
|
952
|
+
* has. Omitted, no card lands.
|
|
953
|
+
*/
|
|
954
|
+
create?: ($: BlockBuilder<R>, card: ExprType<LibraryRefType>, at: ExprType<SnapGridPlaceType>) => SubtypeExprOrValue<R>;
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* The SnapGrid's editing session (#990) — the Sheet's and the Plan's, over the
|
|
958
|
+
* SnapGrid's rows: every move, resize, drop and removal is a draft of the rows
|
|
959
|
+
* it changes, each gesture one undoable transaction, and Apply one checked,
|
|
960
|
+
* idempotent batch against the rows the drafts began from.
|
|
961
|
+
*
|
|
962
|
+
* @remarks
|
|
963
|
+
* The callbacks are East functions over the SnapGrid's row type `R`:
|
|
964
|
+
*
|
|
965
|
+
* - `onApply(Editing.Types.ChangeSet(R)) → Editing.Types.ApplyResult` commits
|
|
966
|
+
* a batch — sync or async; `Record.onApply(…)` commits it to an e3 record.
|
|
967
|
+
* - `onUpdate(Array<R>)` is the inline adapter instead: with
|
|
968
|
+
* `data={liveHandle}` each batch applies with `Editing.apply` over the
|
|
969
|
+
* handle's latest rows and writes them whole — idempotent across retries.
|
|
970
|
+
* Exclusive with `onApply`.
|
|
971
|
+
* - `onPatch(SnapGrid.Types.PatchEvent(R))` observes every gesture.
|
|
972
|
+
* - `onDrafted(Array<R>)` hears the rows the canvas draws (#996) — the source
|
|
973
|
+
* with the session's drafts, exactly as Apply would leave them — once as it
|
|
974
|
+
* mounts and whenever they change: a gesture, an undo or a redo, a Discard,
|
|
975
|
+
* a source that moved. A pane beside the canvas reads what it shows from
|
|
976
|
+
* them — an inspector, a palette's counts.
|
|
977
|
+
* - `ready(R) → Editing.Types.Readiness` is the author's check over one
|
|
978
|
+
* drafted row; a refusal holds Apply and names the row.
|
|
979
|
+
*
|
|
980
|
+
* @property onApply - Commit one checked batch (sync or async)
|
|
981
|
+
* @property onUpdate - The inline adapter's writer (requires `data={liveHandle}`)
|
|
982
|
+
* @property onPatch - Observe every gesture
|
|
983
|
+
* @property onDrafted - Hear the rows the canvas draws, whenever they change
|
|
984
|
+
* @property mode - `"batch"` (Apply sends) or `"auto"` (each ready gesture goes at once)
|
|
985
|
+
* @property ready - The author's readiness check over a drafted row
|
|
986
|
+
*/
|
|
987
|
+
export interface SnapGridEditingConfig {
|
|
988
|
+
/** Commit one checked batch — `Fn(Editing.Types.ChangeSet(R)) → Editing.Types.ApplyResult`, sync or async. */
|
|
989
|
+
onApply?: ExprType<EastType>;
|
|
990
|
+
/** The inline adapter's writer — `Fn(Array<R>) → Null`; requires `data={liveHandle}`, exclusive with `onApply`. */
|
|
991
|
+
onUpdate?: ExprType<EastType>;
|
|
992
|
+
/** Observe every gesture — `Fn(SnapGrid.Types.PatchEvent(R)) → Null`. */
|
|
993
|
+
onPatch?: ExprType<EastType>;
|
|
994
|
+
/** Hear the rows the canvas draws, the drafts in place, as it mounts and whenever they change — `Fn(Array<R>) → Null` (#996). */
|
|
995
|
+
onDrafted?: ExprType<EastType>;
|
|
996
|
+
/** When a ready batch goes: on Apply (`"batch"`, the default), or at once (`"auto"`). */
|
|
997
|
+
mode?: "batch" | "auto";
|
|
998
|
+
/** The author's check over one drafted row — `Fn(R) → Editing.Types.Readiness`. */
|
|
999
|
+
ready?: ExprType<EastType>;
|
|
1000
|
+
}
|
|
1001
|
+
/**
|
|
1002
|
+
* A SnapGrid's configuration.
|
|
1003
|
+
*
|
|
1004
|
+
* @typeParam R - The row `data` holds
|
|
1005
|
+
*/
|
|
1006
|
+
export interface SnapGridConfig<R extends EastType> {
|
|
1007
|
+
/** Maps one row to its cell — build it with {@link SnapGrid.cell}. Reified once into an East function. */
|
|
1008
|
+
cell: (row: ExprType<R>) => SubtypeExprOrValue<SnapGridCellType>;
|
|
1009
|
+
/** `tiles` (the default), or `wireframe`: each cell an outline at its tile's size, its content not drawn. */
|
|
1010
|
+
variant?: SnapGridVariantLiteral | SubtypeExprOrValue<SnapGridVariantType>;
|
|
1011
|
+
/**
|
|
1012
|
+
* The design width, a CSS length (`"1440px"`): a page's grid is that wide.
|
|
1013
|
+
* On the editing canvas it is the most the grid lays out at — a narrower
|
|
1014
|
+
* column lays it out at the column's width, a wider one centres it — and
|
|
1015
|
+
* the toolbar reads it out.
|
|
1016
|
+
*/
|
|
1017
|
+
width?: SubtypeExprOrValue<StringType>;
|
|
1018
|
+
/** A pinned height, a CSS length; the grid scrolls within. */
|
|
1019
|
+
height?: SubtypeExprOrValue<StringType>;
|
|
1020
|
+
/** A height cap, a CSS length; the grid scrolls past it. */
|
|
1021
|
+
maxHeight?: SubtypeExprOrValue<StringType>;
|
|
1022
|
+
/** The scale the canvas draws at — `1.0` is actual size, `0.5` half. */
|
|
1023
|
+
zoom?: number | SubtypeExprOrValue<FloatType>;
|
|
1024
|
+
/** Draw the column ruler above the rows and the column bands behind them. */
|
|
1025
|
+
guides?: boolean | SubtypeExprOrValue<BooleanType>;
|
|
1026
|
+
/** What a gesture writes into the rows (#990) — give it with `editing`. */
|
|
1027
|
+
edit?: SnapGridEditConfig<R>;
|
|
1028
|
+
/** Where the drafts go (#990) — give it with `edit`. */
|
|
1029
|
+
editing?: SnapGridEditingConfig;
|
|
1030
|
+
/** The bound selection — `State.bind([SnapGrid.Types.UiState], key, SnapGrid.uiState())`; omitted, the canvas keeps it. */
|
|
1031
|
+
ui?: SubtypeExprOrValue<SnapGridUiBindType>;
|
|
1032
|
+
/**
|
|
1033
|
+
* The bound design width and zoom (#995) — `State.bind([SnapGrid.Types.ViewState],
|
|
1034
|
+
* key, SnapGrid.viewState())`: the editing canvas draws at them and writes
|
|
1035
|
+
* the width preset and the zoom step the user picks. Omitted, the canvas
|
|
1036
|
+
* keeps them, starting from `width` and `zoom`.
|
|
1037
|
+
*/
|
|
1038
|
+
view?: SubtypeExprOrValue<SnapGridViewBindType>;
|
|
1039
|
+
/**
|
|
1040
|
+
* The bound Apply request (#998) — `State.bind([SnapGrid.Types.ApplyState],
|
|
1041
|
+
* key, variant("idle", null))`: a host writes `asked` with an id of its own,
|
|
1042
|
+
* and the editing canvas applies its drafts and answers under the id —
|
|
1043
|
+
* `applied` once the source confirms them, or at once when it has none;
|
|
1044
|
+
* `refused` with why. A publish that must not leave drafts behind asks
|
|
1045
|
+
* for one. Omitted, only the history item applies.
|
|
1046
|
+
*/
|
|
1047
|
+
apply?: SubtypeExprOrValue<SnapGridApplyBindType>;
|
|
1048
|
+
/** The drag surface's name in a drop's cell refs; omitted, the canvas names one of its own. */
|
|
1049
|
+
id?: string;
|
|
1050
|
+
/** The library ids whose cards land on the canvas (`edit.create` builds the row). */
|
|
1051
|
+
sources?: string[];
|
|
1052
|
+
/** The veto over a drop where the drag rests — a card's `add`, a tile's `move` (the ⊘ stage); a throwing predicate fails open. */
|
|
1053
|
+
canDrop?: SubtypeExprOrValue<FunctionType<[DragEventType], BooleanType>>;
|
|
1054
|
+
/**
|
|
1055
|
+
* The design widths the editing canvas's toolbar offers (#995) — a device
|
|
1056
|
+
* each, such as Desktop and Tablet. The one the canvas draws at is
|
|
1057
|
+
* pressed, and pressing another draws it at that width.
|
|
1058
|
+
*/
|
|
1059
|
+
widths?: SnapGridWidthInput[];
|
|
1060
|
+
/**
|
|
1061
|
+
* The host's items in the editing canvas's toolbar (#995): the `start`
|
|
1062
|
+
* items lead the row, before the canvas's own; the `end` items close it,
|
|
1063
|
+
* after the history item and the widths. They never fold.
|
|
1064
|
+
*/
|
|
1065
|
+
toolbar?: {
|
|
1066
|
+
/** Before the canvas's own items, at the row's start. */
|
|
1067
|
+
start?: SubtypeExprOrValue<ArrayType<UIComponentType>>;
|
|
1068
|
+
/** After the canvas's own items, at the row's end. */
|
|
1069
|
+
end?: SubtypeExprOrValue<ArrayType<UIComponentType>>;
|
|
1070
|
+
};
|
|
1071
|
+
/**
|
|
1072
|
+
* The panes beside the editing canvas, under its toolbar (#995) — a
|
|
1073
|
+
* palette, an inspector. A `<Dock>` pane collapses to its rail and the
|
|
1074
|
+
* canvas takes the room.
|
|
1075
|
+
*/
|
|
1076
|
+
panes?: {
|
|
1077
|
+
/** The pane before the canvas. */
|
|
1078
|
+
start?: SubtypeExprOrValue<UIComponentType>;
|
|
1079
|
+
/** The pane after it. */
|
|
1080
|
+
end?: SubtypeExprOrValue<UIComponentType>;
|
|
1081
|
+
};
|
|
1082
|
+
/** `card` (the default) draws the editing canvas's frame; `shell` draws none, inside a host's frame (#995). */
|
|
1083
|
+
surface?: SnapGridSurfaceLiteral | SubtypeExprOrValue<SnapGridSurfaceType>;
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* One design width, as `widths` takes it (#995).
|
|
1087
|
+
*
|
|
1088
|
+
* @property label - Its name in the toolbar
|
|
1089
|
+
* @property icon - A Font Awesome solid icon name beside the name
|
|
1090
|
+
* @property width - The design width, a CSS length
|
|
1091
|
+
*/
|
|
1092
|
+
export interface SnapGridWidthInput {
|
|
1093
|
+
/** Its name in the toolbar — `"Desktop"`. */
|
|
1094
|
+
label: SubtypeExprOrValue<StringType>;
|
|
1095
|
+
/** A Font Awesome solid icon name beside the name — `"desktop"`. */
|
|
1096
|
+
icon?: SubtypeExprOrValue<StringType>;
|
|
1097
|
+
/** The design width, a CSS length — `"1440px"`. */
|
|
1098
|
+
width: SubtypeExprOrValue<StringType>;
|
|
1099
|
+
}
|
|
1100
|
+
/**
|
|
1101
|
+
* Builds one cell's value, with the defaults filled in.
|
|
1102
|
+
*
|
|
1103
|
+
* @param fields - The cell's fields ({@link SnapGridCellFields})
|
|
1104
|
+
* @returns The cell, a {@link SnapGridCellType} value
|
|
1105
|
+
*
|
|
1106
|
+
* @example
|
|
1107
|
+
* ```tsx
|
|
1108
|
+
* import { ArrayType, East, IntegerType, StringType, StructType } from "@elaraai/east";
|
|
1109
|
+
* import { SnapGrid, Stat, UIComponentType } from "@elaraai/east-ui";
|
|
1110
|
+
*
|
|
1111
|
+
* const Kpi = StructType({ id: StringType, row: StringType, span: IntegerType, label: StringType, value: IntegerType });
|
|
1112
|
+
*
|
|
1113
|
+
* const kpis = East.function([], UIComponentType, ($) => {
|
|
1114
|
+
* const tiles = $.const([
|
|
1115
|
+
* { id: "orders", row: "top", span: 6n, label: "Orders", value: 128n },
|
|
1116
|
+
* { id: "returns", row: "top", span: 6n, label: "Returns", value: 4n },
|
|
1117
|
+
* ], ArrayType(Kpi));
|
|
1118
|
+
* return <SnapGrid data={tiles} cell={t => SnapGrid.cell({ key: t.id, row: t.row, span: t.span,
|
|
1119
|
+
* content: <Stat label={t.label} value={t.value} /> })} />;
|
|
1120
|
+
* });
|
|
1121
|
+
* ```
|
|
1122
|
+
*/
|
|
1123
|
+
declare function createCell(fields: SnapGridCellFields): ExprType<SnapGridCellType>;
|
|
1124
|
+
/**
|
|
1125
|
+
* Builds a {@link SnapGridUiStateType} value — the seed of a bound `ui`, or
|
|
1126
|
+
* what a host writes to it: a selection, and a change it asks of the editing
|
|
1127
|
+
* canvas (#996).
|
|
1128
|
+
*
|
|
1129
|
+
* @param state - The selected tile's key, and a request; omitted, nothing selected and nothing asked
|
|
1130
|
+
* @returns The state
|
|
1131
|
+
*
|
|
1132
|
+
* @example
|
|
1133
|
+
* ```ts
|
|
1134
|
+
* import { East, NullType, variant } from "@elaraai/east";
|
|
1135
|
+
* import { SnapGrid, State } from "@elaraai/east-ui";
|
|
1136
|
+
*
|
|
1137
|
+
* const select = East.function([], NullType, ($) => {
|
|
1138
|
+
* const ui = $.const(State.bind([SnapGrid.Types.UiState], "builder.selection", SnapGrid.uiState()));
|
|
1139
|
+
* $(ui.write(SnapGrid.uiState({ selected: "revenue-trend" })));
|
|
1140
|
+
* });
|
|
1141
|
+
*
|
|
1142
|
+
* // An inspector's edit: the canvas widens the tile to 8 columns, as one undoable gesture.
|
|
1143
|
+
* const widen = East.function([], NullType, ($) => {
|
|
1144
|
+
* const ui = $.const(State.bind([SnapGrid.Types.UiState], "builder.selection", SnapGrid.uiState()));
|
|
1145
|
+
* $(ui.write(SnapGrid.uiState({
|
|
1146
|
+
* selected: "revenue-trend",
|
|
1147
|
+
* request: { key: "revenue-trend", change: variant("span", 8n) },
|
|
1148
|
+
* })));
|
|
1149
|
+
* });
|
|
1150
|
+
* ```
|
|
1151
|
+
*/
|
|
1152
|
+
declare function createUiState(state?: {
|
|
1153
|
+
selected?: SubtypeExprOrValue<StringType>;
|
|
1154
|
+
request?: SubtypeExprOrValue<SnapGridRequestType>;
|
|
1155
|
+
}): ExprType<SnapGridUiStateType>;
|
|
1156
|
+
/**
|
|
1157
|
+
* Builds a {@link SnapGridViewStateType} value — the seed of a bound `view`
|
|
1158
|
+
* (#995).
|
|
1159
|
+
*
|
|
1160
|
+
* @param state - The design width and the zoom; omitted, the SnapGrid's own `width` and `zoom`
|
|
1161
|
+
* @returns The state
|
|
1162
|
+
*
|
|
1163
|
+
* @example
|
|
1164
|
+
* ```ts
|
|
1165
|
+
* import { East, NullType } from "@elaraai/east";
|
|
1166
|
+
* import { SnapGrid, State } from "@elaraai/east-ui";
|
|
1167
|
+
*
|
|
1168
|
+
* const tablet = East.function([], NullType, ($) => {
|
|
1169
|
+
* const view = $.const(State.bind([SnapGrid.Types.ViewState], "builder.view", SnapGrid.viewState()));
|
|
1170
|
+
* $(view.write(SnapGrid.viewState({ width: "1024px", zoom: 0.8 })));
|
|
1171
|
+
* });
|
|
1172
|
+
* ```
|
|
1173
|
+
*/
|
|
1174
|
+
declare function createViewState(state?: {
|
|
1175
|
+
width?: SubtypeExprOrValue<StringType>;
|
|
1176
|
+
zoom?: number | SubtypeExprOrValue<FloatType>;
|
|
1177
|
+
}): ExprType<SnapGridViewStateType>;
|
|
1178
|
+
/**
|
|
1179
|
+
* Creates a SnapGrid — the host's rows as tiles, in rows on a 12-column grid.
|
|
1180
|
+
*
|
|
1181
|
+
* @remarks
|
|
1182
|
+
* Rows order by their first appearance among the cells, and the cells of a
|
|
1183
|
+
* row by their order in `data`, a `Dict`'s by key. A row's cells sit left to
|
|
1184
|
+
* right by span, with a gap between columns and between rows; a row whose
|
|
1185
|
+
* spans pass 12 continues on a line below and never overlaps. A row is as
|
|
1186
|
+
* tall as its tallest cell, and `align` places the shorter ones. Under a
|
|
1187
|
+
* narrow container every cell takes the full width, in row order; under a
|
|
1188
|
+
* medium one a span under 6 takes 6 and any other 12; from a wide one on, the
|
|
1189
|
+
* spans declared.
|
|
1190
|
+
*
|
|
1191
|
+
* A framed tile has no header strip: the SnapGrid draws no chrome of its own and
|
|
1192
|
+
* no outer border — the host draws the panel around it.
|
|
1193
|
+
*
|
|
1194
|
+
* With `edit` and `editing` (#990) it is an editing canvas over an `Array`
|
|
1195
|
+
* source — the order of `data` is the order of its tiles, which a `Dict`
|
|
1196
|
+
* cannot take: a tile is selected by a click, moved, resized, dropped from a
|
|
1197
|
+
* library and removed, each gesture one draft of the shared editing session,
|
|
1198
|
+
* and the history item in its toolbar undoes, redoes, discards and applies.
|
|
1199
|
+
*
|
|
1200
|
+
* The editing canvas is the builder's frame (#995): a toolbar across its
|
|
1201
|
+
* width, then its `panes` beside a column holding the selection bar and the
|
|
1202
|
+
* grid panel. The toolbar leads with the host's `toolbar.start` items, the
|
|
1203
|
+
* grid chip and — once the source confirms an Apply — the time it was saved;
|
|
1204
|
+
* it closes with the width readout, the zoom, the history item, the design
|
|
1205
|
+
* `widths` and the host's `toolbar.end` items. The selection bar names the
|
|
1206
|
+
* selected tile with its `icon`, `label` and `meta`.
|
|
1207
|
+
*
|
|
1208
|
+
* A pane beside the canvas works with it through the host's state (#996): it
|
|
1209
|
+
* reads the rows the canvas draws, which `editing.onDrafted` hears, and asks
|
|
1210
|
+
* for a change by writing a `request` to the bound `ui` — a span, a row, a
|
|
1211
|
+
* height or an alignment, taken as one gesture of the session. A screen that
|
|
1212
|
+
* must not leave drafts behind asks for an Apply through the bound `apply`
|
|
1213
|
+
* (#998), and the canvas answers once its drafts land or cannot.
|
|
1214
|
+
*
|
|
1215
|
+
* @typeParam T - The `data` passed
|
|
1216
|
+
* @param data - The rows: an `Array` or a `Dict`, inline or through a bound handle
|
|
1217
|
+
* @param config - How a row becomes a cell, and how the SnapGrid is drawn and edited ({@link SnapGridConfig})
|
|
1218
|
+
* @returns An East expression of type `UIComponentType`
|
|
1219
|
+
* @throws {Error} When `data` is a paged source, or not an `Array` or a `Dict`; when the editing
|
|
1220
|
+
* declaration is inconsistent — see {@link SnapGridEditConfig} and {@link SnapGridEditingConfig};
|
|
1221
|
+
* or when the editing canvas's chrome — `view`, `apply`, `widths`, `toolbar`, `panes`, `surface` — is
|
|
1222
|
+
* given without `editing`
|
|
1223
|
+
*
|
|
1224
|
+
* @example
|
|
1225
|
+
* ```tsx
|
|
1226
|
+
* import { ArrayType, East, IntegerType, StringType, StructType } from "@elaraai/east";
|
|
1227
|
+
* import { SnapGrid, Stat, UIComponentType } from "@elaraai/east-ui";
|
|
1228
|
+
*
|
|
1229
|
+
* const Tile = StructType({ id: StringType, row: StringType, span: IntegerType, label: StringType, value: IntegerType });
|
|
1230
|
+
*
|
|
1231
|
+
* const page = East.function([], UIComponentType, ($) => {
|
|
1232
|
+
* const tiles = $.const([
|
|
1233
|
+
* { id: "orders", row: "kpis", span: 4n, label: "Orders", value: 128n },
|
|
1234
|
+
* { id: "returns", row: "kpis", span: 4n, label: "Returns", value: 4n },
|
|
1235
|
+
* { id: "late", row: "kpis", span: 4n, label: "Late", value: 9n },
|
|
1236
|
+
* ], ArrayType(Tile));
|
|
1237
|
+
* return <SnapGrid data={tiles} width="1440px"
|
|
1238
|
+
* cell={t => SnapGrid.cell({ key: t.id, row: t.row, span: t.span, content: <Stat label={t.label} value={t.value} /> })} />;
|
|
1239
|
+
* });
|
|
1240
|
+
* ```
|
|
1241
|
+
*/
|
|
1242
|
+
declare function createSnapGrid<T extends SnapGridData>(data: T, config: SnapGridConfig<SnapGridRowOf<T>>): ExprType<UIComponentType>;
|
|
1243
|
+
/**
|
|
1244
|
+
* The type of the {@link SnapGrid} namespace — declared explicitly so the
|
|
1245
|
+
* declaration emit stays within TypeScript's serialization limit.
|
|
1246
|
+
*/
|
|
1247
|
+
export interface SnapGridNamespace {
|
|
1248
|
+
/** Creates a SnapGrid ({@link createSnapGrid}). */
|
|
1249
|
+
Root: typeof createSnapGrid;
|
|
1250
|
+
/** Builds one cell's value, with the defaults filled in ({@link createCell}). */
|
|
1251
|
+
cell: typeof createCell;
|
|
1252
|
+
/** Builds the seed of a bound selection ({@link createUiState}). */
|
|
1253
|
+
uiState: typeof createUiState;
|
|
1254
|
+
/** Builds the seed of a bound design width and zoom ({@link createViewState}). */
|
|
1255
|
+
viewState: typeof createViewState;
|
|
1256
|
+
/** The SnapGrid's East types. */
|
|
1257
|
+
Types: {
|
|
1258
|
+
/** A SnapGrid's value ({@link SnapGridRootType}). */
|
|
1259
|
+
Root: typeof SnapGridRootType;
|
|
1260
|
+
/** One tile ({@link SnapGridCellType}). */
|
|
1261
|
+
Cell: typeof SnapGridCellType;
|
|
1262
|
+
/** Where a cell sits in a taller row ({@link SnapGridAlignType}). */
|
|
1263
|
+
Align: typeof SnapGridAlignType;
|
|
1264
|
+
/** Tiles or a wireframe ({@link SnapGridVariantType}). */
|
|
1265
|
+
Variant: typeof SnapGridVariantType;
|
|
1266
|
+
/** The bound selection's value ({@link SnapGridUiStateType}). */
|
|
1267
|
+
UiState: typeof SnapGridUiStateType;
|
|
1268
|
+
/** A change a host asks of the editing canvas ({@link SnapGridRequestType}). */
|
|
1269
|
+
Request: typeof SnapGridRequestType;
|
|
1270
|
+
/** The bound design width and zoom's value ({@link SnapGridViewStateType}). */
|
|
1271
|
+
ViewState: typeof SnapGridViewStateType;
|
|
1272
|
+
/** An Apply asked of the editing canvas, and its answer ({@link SnapGridApplyStateType}). */
|
|
1273
|
+
ApplyState: typeof SnapGridApplyStateType;
|
|
1274
|
+
/** One design width the editing canvas offers ({@link SnapGridWidthType}). */
|
|
1275
|
+
Width: typeof SnapGridWidthType;
|
|
1276
|
+
/** The editing canvas's frame, or none ({@link SnapGridSurfaceType}). */
|
|
1277
|
+
Surface: typeof SnapGridSurfaceType;
|
|
1278
|
+
/** Where a dropped card lands — `edit.create`'s second argument ({@link SnapGridPlaceType}). */
|
|
1279
|
+
Place: typeof SnapGridPlaceType;
|
|
1280
|
+
/** `PatchEvent(R)` — what `editing.onPatch` receives ({@link SnapGridPatchEventTypeFor}). */
|
|
1281
|
+
PatchEvent: typeof SnapGridPatchEventTypeFor;
|
|
1282
|
+
/** The editing declaration on the wire ({@link SnapGridEditingType}). */
|
|
1283
|
+
Editing: typeof SnapGridEditingType;
|
|
1284
|
+
};
|
|
1285
|
+
}
|
|
1286
|
+
/**
|
|
1287
|
+
* SnapGrid — the host's rows as tiles, in rows on a 12-column grid: the Studio's
|
|
1288
|
+
* canvas, a published page, and the page library's wireframe thumbnails.
|
|
1289
|
+
*/
|
|
1290
|
+
export declare const SnapGrid: SnapGridNamespace;
|
|
1291
|
+
//# sourceMappingURL=index.d.ts.map
|