efficient-easel 22.0.0 → 23.1.0
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/README.md +45 -23
- package/dist/{CanvasDragLayer-B6Yn9S8T.d.ts → CanvasDragLayer-NZpaX6aq.d.ts} +15 -4
- package/dist/{ScreenDocumentContext-BIK3uWtF.d.ts → ScreenDocumentContext-BDLUYzlM.d.ts} +4 -4
- package/dist/blocks/index.d.ts +11 -11
- package/dist/canvas/index.d.ts +21 -9
- package/dist/canvas/index.js +1 -1
- package/dist/{canvas-typing-Be4FO4q7.d.ts → canvas-typing-DOBx8dD3.d.ts} +12 -2
- package/dist/chunk-22I55W37.js +2 -0
- package/dist/chunk-2FYFAAAK.js +2 -0
- package/dist/{chunk-3S5N4HLJ.js → chunk-6NJHYXJM.js} +1 -1
- package/dist/chunk-6QSFJCJT.js +21 -0
- package/dist/{chunk-BTDI7JAA.js → chunk-A6ZP5II4.js} +2 -2
- package/dist/{chunk-IWCKVZHS.js → chunk-AGWKB77Q.js} +1 -1
- package/dist/chunk-AT4DDMJS.js +1 -0
- package/dist/chunk-DSKNJXB4.js +1 -0
- package/dist/{chunk-ZOSEBPAI.js → chunk-GKG3M5QK.js} +1 -1
- package/dist/{chunk-XWKQP6AE.js → chunk-HNV6HUSQ.js} +4 -4
- package/dist/chunk-HZSZT3BE.js +7 -0
- package/dist/{chunk-EB6NI2VK.js → chunk-IYHO4XQX.js} +1 -1
- package/dist/chunk-IZGFJWH4.js +1 -0
- package/dist/{chunk-KN2TIXUT.js → chunk-JPCOBNYW.js} +1 -1
- package/dist/{chunk-YC6KLSW3.js → chunk-JWOBAEBH.js} +1 -1
- package/dist/chunk-KXM6YRG2.js +1 -0
- package/dist/chunk-LN43DP2A.js +18 -0
- package/dist/{chunk-IROEWITG.js → chunk-LSTOOYG7.js} +1 -1
- package/dist/{chunk-TXR7GC5A.js → chunk-NQ7NRYTK.js} +8 -8
- package/dist/chunk-OXZDSOZV.js +1 -0
- package/dist/{chunk-BSHIQIZC.js → chunk-RPMSET77.js} +1 -1
- package/dist/{chunk-TLN5ZT76.js → chunk-T3LAGI43.js} +1 -1
- package/dist/chunk-TGSK5VII.js +5 -0
- package/dist/{chunk-K7BTCBWD.js → chunk-TGZCD6IP.js} +1 -1
- package/dist/chunk-VBOSOH5M.js +16 -0
- package/dist/{chunk-RY5AWQ63.js → chunk-VHFLOHGQ.js} +1 -1
- package/dist/chunk-YCSZAP7T.js +1 -0
- package/dist/chunk-YU3WHLGI.js +1 -0
- package/dist/chunk-Z6V22QRZ.js +64 -0
- package/dist/copy/index.d.ts +20 -6
- package/dist/copy/index.js +29 -29
- package/dist/data/index.d.ts +30 -22
- package/dist/data/index.js +1 -1
- package/dist/drag/drag.css +10 -1
- package/dist/drag/index.d.ts +5 -5
- package/dist/drag/index.js +1 -1
- package/dist/draw/index.d.ts +1 -1
- package/dist/easel/easel.css +24 -14
- package/dist/easel/index.d.ts +90 -53
- package/dist/easel/index.js +1 -1
- package/dist/edit-lock/index.d.ts +5 -5
- package/dist/fields/fields.css +1 -1
- package/dist/fields/index.d.ts +50 -16
- package/dist/fields/index.js +1 -1
- package/dist/node-ops/index.d.ts +3 -3
- package/dist/node-ops/index.js +1 -1
- package/dist/panel/index.d.ts +1 -1
- package/dist/panel/panel.css +6 -1
- package/dist/pick/index.d.ts +5 -5
- package/dist/{plan-CRUh2kVK.d.ts → plan-D0DgSLnY.d.ts} +5 -5
- package/dist/render/index.d.ts +13 -13
- package/dist/render/index.js +1 -1
- package/dist/{resolve-AJ6WF4EL.d.ts → resolve-Bz4mszpL.d.ts} +5 -5
- package/dist/rowMarks-CO5TpfLY.d.ts +44 -0
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.d.ts +2 -2
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.d.ts +17 -20
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/PreviewDeviceContext.d.ts +1 -1
- package/dist/screen/components/PreviewPartsContext.d.ts +2 -2
- package/dist/screen/components/SaveControls.d.ts +8 -8
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenDocumentContext.d.ts +5 -5
- package/dist/screen/components/ScreenDocumentContext.js +1 -1
- package/dist/screen/components/ScreenMount.d.ts +9 -9
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.d.ts +12 -12
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +17 -17
- package/dist/screen/components/usePartBridge.d.ts +10 -10
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.d.ts +8 -8
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/admin-bridge.d.ts +4 -4
- package/dist/screen/lib/document/block-types-in.d.ts +2 -1
- package/dist/screen/lib/document/block-types-in.js +1 -1
- package/dist/screen/lib/document/content-tree.d.ts +8 -8
- package/dist/screen/lib/document/device-fields.d.ts +13 -27
- package/dist/screen/lib/document/device-fields.js +1 -1
- package/dist/screen/lib/document/field-markers.d.ts +4 -4
- package/dist/screen/lib/document/palette-sections.d.ts +5 -5
- package/dist/screen/lib/document/panel-fields.d.ts +5 -5
- package/dist/screen/lib/document/panel-no-control-mark.d.ts +6 -10
- package/dist/screen/lib/document/panel-no-control-mark.js +1 -1
- package/dist/screen/lib/document/part-id.d.ts +1 -1
- package/dist/screen/lib/document/preview-events.d.ts +2 -2
- package/dist/screen/lib/document/preview-selection-context.d.ts +2 -2
- package/dist/screen/lib/document/section-doc.d.ts +5 -5
- package/dist/screen/lib/document/section-doc.js +1 -1
- package/dist/screen/lib/document/slot-child-name.d.ts +1 -1
- package/dist/screen/lib/document/slot-section-spec.d.ts +1 -1
- package/dist/screen/lib/document/style-clipboard.d.ts +8 -8
- package/dist/screen/lib/document/style-clipboard.js +1 -1
- package/dist/screen/lib/document/tree-reveal.d.ts +4 -4
- package/dist/screen/lib/document/use-section-ops.d.ts +6 -6
- package/dist/screen/lib/document/use-section-ops.js +1 -1
- package/dist/screen/lib/document-addressing.d.ts +5 -5
- package/dist/screen/lib/document-hooks.d.ts +4 -4
- package/dist/screen/lib/host.d.ts +5 -5
- package/dist/screen/lib/key-scope.d.ts +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/media-panel.d.ts +5 -5
- package/dist/screen/lib/media-picker.d.ts +6 -6
- package/dist/screen/lib/page-lock.d.ts +4 -4
- package/dist/screen/lib/screen-parts.d.ts +22 -10
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/lib/section-templates.d.ts +4 -4
- package/dist/screen/lib/session-context.d.ts +4 -4
- package/dist/screen/lib/session.d.ts +5 -5
- package/dist/screen/lib/shared-sections.d.ts +4 -4
- package/dist/screen/screen.css +14 -14
- package/dist/screen/words.d.ts +4 -3
- package/dist/screen/words.js +1 -1
- package/dist/{session-CrWwDt7Z.d.ts → session-EsjORLQ0.d.ts} +1 -1
- package/dist/shell/shell.css +2 -2
- package/dist/strings/index.d.ts +2 -2
- package/dist/strings/index.js +2 -2
- package/dist/style-clipboard/index.d.ts +2 -2
- package/dist/text-styles/index.d.ts +3 -3
- package/dist/text-styles/model.d.ts +1 -1
- package/dist/{types-BFd8FqQw.d.ts → types-BIytwvvH.d.ts} +2 -2
- package/dist/{types-DFxBChE3.d.ts → types-BljCVdzR.d.ts} +17 -17
- package/dist/{types-DlQIM1YO.d.ts → types-Dq180WRV.d.ts} +8 -8
- package/dist/{useNodeOps-C_nisDHh.d.ts → useNodeOps-igxrnEhq.d.ts} +2 -2
- package/dist/{watch-D0bNZRtU.d.ts → watch-Unf6SfUf.d.ts} +3 -3
- package/dist/{words-gIDCeRv3.d.ts → words-B5Gb7KFq.d.ts} +1 -1
- package/dist/{words-BpTjCfqO.d.ts → words-Cf5VT2Ic.d.ts} +2 -2
- package/package.json +2 -2
- package/dist/chunk-4LGROS5L.js +0 -1
- package/dist/chunk-BDSLF5BR.js +0 -1
- package/dist/chunk-CPL43ZLJ.js +0 -1
- package/dist/chunk-CUZQ2HMA.js +0 -18
- package/dist/chunk-GHBK7BKL.js +0 -1
- package/dist/chunk-INRERJU4.js +0 -2
- package/dist/chunk-IYYE7VJN.js +0 -65
- package/dist/chunk-KWLHKKZO.js +0 -2
- package/dist/chunk-L55YIXDC.js +0 -1
- package/dist/chunk-MZ5GSSZ3.js +0 -7
- package/dist/chunk-SJMS247S.js +0 -5
- package/dist/chunk-SWBADIQT.js +0 -1
- package/dist/chunk-WJSEWAWK.js +0 -15
- package/dist/chunk-YHFKWV7H.js +0 -21
package/dist/easel/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { DataInput } from '../data/index.js';
|
|
2
|
-
import { N as NodeSelection, P as PassThrough } from '../plan-
|
|
3
|
-
export { I as ItemSelector } from '../plan-
|
|
4
|
-
import { E as EaselConfig, a as EaselView, b as EaselAction, P as Permissions, c as EaselCore, d as EaselUi } from '../types-
|
|
5
|
-
export { A as AppState, e as EaselHistory, H as HistoryEntry, S as SetDataPatch } from '../types-
|
|
6
|
-
import { S as SlotAddress, D as Data, P as Place, N as Node } from '../types-
|
|
7
|
-
import { c as ResolveTrigger, a as ResolveCache, R as ResolvableItem } from '../resolve-
|
|
2
|
+
import { N as NodeSelection, P as PassThrough } from '../plan-D0DgSLnY.js';
|
|
3
|
+
export { I as ItemSelector } from '../plan-D0DgSLnY.js';
|
|
4
|
+
import { E as EaselConfig, a as EaselView, b as EaselAction, P as Permissions, c as EaselCore, d as EaselUi } from '../types-BljCVdzR.js';
|
|
5
|
+
export { A as AppState, e as EaselHistory, H as HistoryEntry, S as SetDataPatch } from '../types-BljCVdzR.js';
|
|
6
|
+
import { S as SlotAddress, D as Data, a as DataConfig, P as Place, N as Node } from '../types-Dq180WRV.js';
|
|
7
|
+
import { c as ResolveTrigger, a as ResolveCache, R as ResolvableItem } from '../resolve-Bz4mszpL.js';
|
|
8
8
|
import * as react from 'react';
|
|
9
9
|
import { ReactNode, CSSProperties, ComponentType, ReactElement } from 'react';
|
|
10
10
|
import { TextToolbarProps } from 'efficient-shell/ui';
|
|
11
|
-
import { C as CopyBoxLastTool, a as CopyThemeColor, b as CanvasTypingEnd } from '../canvas-typing-
|
|
11
|
+
import { C as CopyBoxLastTool, a as CopyThemeColor, b as CanvasTypingEnd } from '../canvas-typing-DOBx8dD3.js';
|
|
12
12
|
import { InlineRule } from 'efficient-shell/markup';
|
|
13
|
-
import { b as NodeOpsHost, C as ClipboardEntry } from '../useNodeOps-
|
|
14
|
-
import { I as InspectorFields } from '../types-
|
|
15
|
-
import '../words-
|
|
13
|
+
import { b as NodeOpsHost, C as ClipboardEntry } from '../useNodeOps-igxrnEhq.js';
|
|
14
|
+
import { I as InspectorFields } from '../types-BIytwvvH.js';
|
|
15
|
+
import '../words-Cf5VT2Ic.js';
|
|
16
16
|
import '../buckets-_MGDYJlb.js';
|
|
17
17
|
|
|
18
18
|
interface EaselOptions<C extends EaselConfig = EaselConfig> {
|
|
@@ -31,11 +31,11 @@ interface EaselOptions<C extends EaselConfig = EaselConfig> {
|
|
|
31
31
|
* loaded as if it were an edit.
|
|
32
32
|
*/
|
|
33
33
|
onChange?: (data: Data) => void;
|
|
34
|
-
/** Easel-wide permissions, under each block's own (the old
|
|
34
|
+
/** Easel-wide permissions, under each block's own (the old library's `permissions`). */
|
|
35
35
|
permissions?: Partial<Permissions>;
|
|
36
36
|
/**
|
|
37
37
|
* Changes recorded closer together than this collapse into ONE undo step —
|
|
38
|
-
* The old
|
|
38
|
+
* The old library's 250 ms history debounce, so a word typed into a field is undone as
|
|
39
39
|
* a word and not as letters. A `batch` is never collapsed into its
|
|
40
40
|
* neighbours. 0 records every change on its own.
|
|
41
41
|
*/
|
|
@@ -55,7 +55,7 @@ interface Easel<C extends EaselConfig = EaselConfig> {
|
|
|
55
55
|
getState: () => EaselView<C>;
|
|
56
56
|
subscribe: (listener: () => void) => () => void;
|
|
57
57
|
/**
|
|
58
|
-
* One
|
|
58
|
+
* One action. Outside a `batch`, one undo step when it records.
|
|
59
59
|
* Permissions are not checked here (see `setPermissions`).
|
|
60
60
|
*/
|
|
61
61
|
dispatch: (action: EaselAction) => void;
|
|
@@ -87,8 +87,8 @@ interface Easel<C extends EaselConfig = EaselConfig> {
|
|
|
87
87
|
select?: NodeSelection | undefined;
|
|
88
88
|
}) => void;
|
|
89
89
|
/**
|
|
90
|
-
* Put a different document in WITHOUT remounting anything — the old
|
|
91
|
-
* new `key` on
|
|
90
|
+
* Put a different document in WITHOUT remounting anything — the old library needed a
|
|
91
|
+
* new `key` on the old library's root component for that, which threw away every subscriber's state.
|
|
92
92
|
* The history starts again at this document unless `keepHistory`.
|
|
93
93
|
*/
|
|
94
94
|
load: (data: DataInput | Data, options?: {
|
|
@@ -111,11 +111,11 @@ interface Easel<C extends EaselConfig = EaselConfig> {
|
|
|
111
111
|
*/
|
|
112
112
|
setPermissions: (permissions: Partial<Permissions>) => void;
|
|
113
113
|
/**
|
|
114
|
-
* Run every block's `resolveData` over the document, as
|
|
114
|
+
* Run every block's `resolveData` over the document, as the old library's root component did when it
|
|
115
115
|
* mounted (trigger `'load'`), and write what changed as ONE change folded
|
|
116
116
|
* into the step it happens in — a resolver bringing a stale document up to
|
|
117
|
-
* date is not an undo step (the old
|
|
118
|
-
* document). `onChange` hears it, as the old
|
|
117
|
+
* date is not an undo step (the old library made it one, which undid back to the stale
|
|
118
|
+
* document). `onChange` hears it, as the old library's did. `EaselProvider` runs this
|
|
119
119
|
* on mount; a node changed by hand while it ran is left as the hand left it.
|
|
120
120
|
*/
|
|
121
121
|
resolveAll: (options?: {
|
|
@@ -127,10 +127,10 @@ interface Easel<C extends EaselConfig = EaselConfig> {
|
|
|
127
127
|
* write what changed folded into the step it happens in — `resolveAll`, for
|
|
128
128
|
* one node. Resolves to whether anything was written.
|
|
129
129
|
*
|
|
130
|
-
* It is what the old
|
|
130
|
+
* It is what the old library's own insert ran: a block dropped from its component list
|
|
131
131
|
* was resolved with trigger `'insert'` (`insertComponent`), which is how a
|
|
132
132
|
* block seeds its children or stamps a default the moment it arrives. The
|
|
133
|
-
* `insert` ACTION never did — the old
|
|
133
|
+
* `insert` ACTION never did — the old library's reducer was pure, and so is this one —
|
|
134
134
|
* and the engine has no drop of its own: the Add list's click and the drag's
|
|
135
135
|
* drop are the host's. So a host that puts a new block in, by `dispatch` or
|
|
136
136
|
* by `run`, follows it with this (second host, 2026-10-07):
|
|
@@ -138,7 +138,7 @@ interface Easel<C extends EaselConfig = EaselConfig> {
|
|
|
138
138
|
* easel.dispatch({ type: 'insert', componentType, destinationZone, destinationIndex, id });
|
|
139
139
|
* void easel.resolveNode(id, { trigger: 'insert' });
|
|
140
140
|
*
|
|
141
|
-
* ONE undo step with the insert (the old
|
|
141
|
+
* ONE undo step with the insert (the old library made the resolver's write a second
|
|
142
142
|
* one, and a single undo left a block that had never been resolved). A node
|
|
143
143
|
* changed by hand, or taken out, while its resolver ran is left as it is.
|
|
144
144
|
* `trigger` is `'replace'` when not given, as `resolveNodeData`'s is.
|
|
@@ -148,10 +148,10 @@ interface Easel<C extends EaselConfig = EaselConfig> {
|
|
|
148
148
|
metadata?: Record<string, unknown>;
|
|
149
149
|
}) => Promise<boolean>;
|
|
150
150
|
/** This easel's memory of the last change each node was resolved for —
|
|
151
|
-
* The old
|
|
151
|
+
* The old library kept one per editor, shared by every write that resolves. */
|
|
152
152
|
readonly resolveCache: ResolveCache;
|
|
153
153
|
/**
|
|
154
|
-
* Swap the config in place —
|
|
154
|
+
* Swap the config in place — the old library's root component took a new `config` prop live. The
|
|
155
155
|
* website editor rebuilds a few blocks' fields when the site's gap moves; the
|
|
156
156
|
* document, the selection and the history are untouched.
|
|
157
157
|
*/
|
|
@@ -176,12 +176,12 @@ interface Easel<C extends EaselConfig = EaselConfig> {
|
|
|
176
176
|
* Puck 0.20's UI at mount (`defaultAppState.ui`), less the selection, which
|
|
177
177
|
* the store holds by id. A host's chrome reads these — the website editor
|
|
178
178
|
* opens its side panels from `leftSideBarVisible` / `rightSideBarVisible` — so
|
|
179
|
-
* a host moving off
|
|
179
|
+
* a host moving off the old library's root component finds them where they were.
|
|
180
180
|
*/
|
|
181
181
|
declare const DEFAULT_UI: Record<string, unknown>;
|
|
182
182
|
/**
|
|
183
183
|
* THE EASEL STORE (blueprint step 5.1): the document, the selection by id and
|
|
184
|
-
* the host's UI keys, with the old
|
|
184
|
+
* the host's UI keys, with the old library's actions, the old library's history and a `batch` the old library
|
|
185
185
|
* never had. Framework-free — `useEasel` (./react) is the React binding.
|
|
186
186
|
*/
|
|
187
187
|
declare function createEasel<C extends EaselConfig>(options: EaselOptions<C>): Easel<C>;
|
|
@@ -189,24 +189,24 @@ declare function createEasel<C extends EaselConfig>(options: EaselOptions<C>): E
|
|
|
189
189
|
/**
|
|
190
190
|
* Puck 0.20's reducer, on `efficient-easel/data` — blueprint step 5.1.
|
|
191
191
|
*
|
|
192
|
-
* Each action means what it meant to the old
|
|
192
|
+
* Each action means what it meant to the old library, so the apps' `dispatch` calls move
|
|
193
193
|
* over unchanged (`reorder`'s and `move`'s indexes, `replaceRoot` MERGING
|
|
194
194
|
* props, `duplicate` selecting the copy, `insert` leaving the selection where
|
|
195
195
|
* it was). Two things differ, on purpose:
|
|
196
196
|
*
|
|
197
|
-
* - THE SELECTION IS BY ID. The old
|
|
197
|
+
* - THE SELECTION IS BY ID. The old library held `itemSelector` — a place — so a node
|
|
198
198
|
* inserted or removed above the selected one silently moved the selection
|
|
199
199
|
* onto its neighbour, and both editors carried patches for exactly that.
|
|
200
200
|
* Here `itemSelector` is derived from the id on every read, and a
|
|
201
201
|
* selection whose node is gone becomes nothing rather than whatever now
|
|
202
202
|
* sits in its place.
|
|
203
|
-
* - A SLOT CAN BE SELECTED (a column): `ui.selectedSlot`, which the old
|
|
203
|
+
* - A SLOT CAN BE SELECTED (a column): `ui.selectedSlot`, which the old library had no
|
|
204
204
|
* way to say.
|
|
205
205
|
*/
|
|
206
|
-
/** Whether the old
|
|
206
|
+
/** Whether the old library records an action in history when the action does not say:
|
|
207
207
|
* everything but the state-setters. */
|
|
208
208
|
declare function recordsByDefault(action: EaselAction): boolean;
|
|
209
|
-
/** The UI as the old
|
|
209
|
+
/** The UI as the old library shows it: the host's keys, with the selection translated. */
|
|
210
210
|
declare function uiView(core: EaselCore, config: EaselConfig): EaselUi;
|
|
211
211
|
/** A selection that still points at something; otherwise nothing. */
|
|
212
212
|
declare function validSelection(data: Data, config: EaselConfig, selection: NodeSelection): NodeSelection;
|
|
@@ -223,13 +223,13 @@ interface EaselProviderProps {
|
|
|
223
223
|
* `edit` permission is off (`bindUndoKeys`).
|
|
224
224
|
*/
|
|
225
225
|
hotkeys?: boolean;
|
|
226
|
-
/** Run every block's `resolveData` once the easel mounts, as
|
|
226
|
+
/** Run every block's `resolveData` once the easel mounts, as the old library's root component did
|
|
227
227
|
* (`easel.resolveAll`). On by default. */
|
|
228
228
|
resolveOnMount?: boolean;
|
|
229
229
|
children?: ReactNode;
|
|
230
230
|
}
|
|
231
|
-
/** Puts one easel in reach of everything under it —
|
|
232
|
-
* half — and, as
|
|
231
|
+
/** Puts one easel in reach of everything under it — the old library's root component, its provider
|
|
232
|
+
* half — and, as the old library's root component did, binds undo / redo to the page's keyboard
|
|
233
233
|
* (`hotkeys={false}` for a host that binds its own) and runs every block's
|
|
234
234
|
* `resolveData` once on mount (`resolveOnMount={false}` to skip). */
|
|
235
235
|
declare function EaselProvider({ easel, hotkeys, resolveOnMount, children }: EaselProviderProps): react.JSX.Element;
|
|
@@ -252,7 +252,7 @@ declare function useEasel<T, C extends EaselConfig = EaselConfig>(selector: (vie
|
|
|
252
252
|
*/
|
|
253
253
|
declare function createUseEasel<C extends EaselConfig = EaselConfig>(): <T>(selector: (view: EaselView<C>) => T) => T;
|
|
254
254
|
|
|
255
|
-
/** What a slot component accepts — the old
|
|
255
|
+
/** What a slot component accepts — the old library's. */
|
|
256
256
|
interface CanvasSlotProps {
|
|
257
257
|
className?: string;
|
|
258
258
|
style?: CSSProperties;
|
|
@@ -282,7 +282,7 @@ interface CanvasFrameProps {
|
|
|
282
282
|
/** Called with the frame's document once it is ready, and null when it goes. */
|
|
283
283
|
onDocument?: (doc: Document | null) => void;
|
|
284
284
|
/**
|
|
285
|
-
* `'auto'` (the default, the old
|
|
285
|
+
* `'auto'` (the default, the old library's): the frame is as tall as its content, and
|
|
286
286
|
* the host's pane scrolls it — so the canvas reads like the page it is.
|
|
287
287
|
* `'fill'`: the frame fills its parent and scrolls itself.
|
|
288
288
|
*/
|
|
@@ -309,7 +309,7 @@ interface CanvasFrameProps {
|
|
|
309
309
|
* arriving late, a dev reload).
|
|
310
310
|
*
|
|
311
311
|
* ⚠️ THAT FIRST DOCUMENT HAS NO DOCTYPE, SO IT RENDERS IN QUIRKS MODE, and it
|
|
312
|
-
* is rewritten with one before anything is drawn. The old
|
|
312
|
+
* is rewritten with one before anything is drawn. The old library's frame was a
|
|
313
313
|
* `<!DOCTYPE html>` srcdoc, so every block was written against standards mode;
|
|
314
314
|
* in quirks mode a `height: 100%` resolves through auto-height ancestors (an
|
|
315
315
|
* empty slot grew to the frame's full height), tables stop inheriting the
|
|
@@ -359,7 +359,27 @@ declare const CanvasSharedContext: react.Context<((id: string) => boolean) | und
|
|
|
359
359
|
interface CanvasPart {
|
|
360
360
|
id: string;
|
|
361
361
|
element: Element;
|
|
362
|
+
/**
|
|
363
|
+
* The part is its block's ONLY part — a Text block's words (Lewis
|
|
364
|
+
* 2026-10-26: one box per text). The host counts its own parts; the engine
|
|
365
|
+
* cannot. A whole part of a block with no lists shares the block's box (and
|
|
366
|
+
* the handle's label on it); any other part gets a box of its own. Absent:
|
|
367
|
+
* the engine reads a block with no lists as one rung with its part.
|
|
368
|
+
*/
|
|
369
|
+
whole?: boolean;
|
|
370
|
+
/** The part's name as Layers shows it ("Scrolling bar"): the canvas's
|
|
371
|
+
* label on its box while it is selected (Lewis 2026-10-26). */
|
|
372
|
+
label?: string;
|
|
362
373
|
}
|
|
374
|
+
/**
|
|
375
|
+
* Whether a part of block `ownerId` gets a box of its own (Lewis 2026-10-26:
|
|
376
|
+
* one box per text): yes, unless the block has no lists and the part is its
|
|
377
|
+
* only one (`CanvasPart.whole`, a Text block's words) — then the block and its
|
|
378
|
+
* words are one rung and share the block's box and its handle. With no
|
|
379
|
+
* `whole` from the host, a block with no lists is read as that one rung. One
|
|
380
|
+
* rule for the canvas's boxes and the screen's label.
|
|
381
|
+
*/
|
|
382
|
+
declare function partHasOwnBox(data: Data, config: DataConfig, ownerId: string, part: CanvasPart): boolean;
|
|
363
383
|
/**
|
|
364
384
|
* THE HOST'S PARTS ON THE CLICK CHAIN (W0, click-through plan 2026-10-12; card
|
|
365
385
|
* [MERGE] One Text Block And Click Through Parts). A host that lets a merchant
|
|
@@ -379,9 +399,19 @@ interface CanvasParts {
|
|
|
379
399
|
selected(): string | null;
|
|
380
400
|
/** Select `partId` (its block is already the selection), or let it go. */
|
|
381
401
|
select(partId: string | null): void;
|
|
402
|
+
/**
|
|
403
|
+
* The selected part as it is drawn in `doc` (the canvas's document, the
|
|
404
|
+
* frame's when it has one), or null (Lewis 2026-10-26: one box per text).
|
|
405
|
+
* Handed: the canvas draws its selected outline round that part, a regular
|
|
406
|
+
* rectangle like a selected block's, and the block's own selected box
|
|
407
|
+
* stands down — unless the part is `whole` in a block with no lists, which
|
|
408
|
+
* keeps the block box. Absent: the block box, as before, and the host
|
|
409
|
+
* draws whatever it draws.
|
|
410
|
+
*/
|
|
411
|
+
selectedPart?(doc: Document): CanvasPart | null;
|
|
382
412
|
}
|
|
383
413
|
declare const CanvasPartsContext: react.Context<CanvasParts | undefined>;
|
|
384
|
-
/** What a host may wrap an outline in — the old
|
|
414
|
+
/** What a host may wrap an outline in — the old library's `componentOverlay`: render
|
|
385
415
|
* `children` to draw it, or nothing to hide it (a text part open on the
|
|
386
416
|
* block, say). */
|
|
387
417
|
type CanvasOverlay = ComponentType<{
|
|
@@ -467,7 +497,7 @@ interface EaselCanvasProps {
|
|
|
467
497
|
metadata?: Record<string, unknown>;
|
|
468
498
|
/** Copy the host's stylesheets into the frame (default true). */
|
|
469
499
|
mirrorStyles?: boolean;
|
|
470
|
-
/** The frame's height: as tall as its content (default, the old
|
|
500
|
+
/** The frame's height: as tall as its content (default, the old library's), or filling its parent. */
|
|
471
501
|
height?: 'auto' | 'fill';
|
|
472
502
|
/**
|
|
473
503
|
* The frame's accessible name — an iframe with none is announced as "frame".
|
|
@@ -490,14 +520,14 @@ interface EaselCanvasProps {
|
|
|
490
520
|
onDocument?: (doc: Document | null) => void;
|
|
491
521
|
/**
|
|
492
522
|
* Wraps everything drawn in the frame, and is handed the frame's document —
|
|
493
|
-
* The old
|
|
523
|
+
* The old library's `overrides.iframe`: where a host syncs its theme onto the frame's
|
|
494
524
|
* `<html>` or adds frame-only CSS.
|
|
495
525
|
*/
|
|
496
526
|
frameWrapper?: ComponentType<{
|
|
497
527
|
document?: Document;
|
|
498
528
|
children: ReactNode;
|
|
499
529
|
}>;
|
|
500
|
-
/** Wraps each outline — the old
|
|
530
|
+
/** Wraps each outline — the old library's `componentOverlay`; see `CanvasOverlay`. */
|
|
501
531
|
overlay?: CanvasOverlay;
|
|
502
532
|
/** Drawn inside the frame, after the document — a host's canvas-only layer. */
|
|
503
533
|
children?: ReactNode;
|
|
@@ -515,7 +545,7 @@ interface EaselCanvasProps {
|
|
|
515
545
|
passThrough?: PassThrough;
|
|
516
546
|
}
|
|
517
547
|
/**
|
|
518
|
-
* `the old
|
|
548
|
+
* `the old library's preview`, ours: the document for editing, its outlines, and the
|
|
519
549
|
* clicks that select. Must sit under an `EaselProvider`.
|
|
520
550
|
*/
|
|
521
551
|
declare function EaselCanvas({ frame, className, style, metadata, mirrorStyles, onDocument, height, title, nonce, hotkeys, frameWrapper: FrameWrapper, overlay, children, typing, passThrough: passThroughProp, }: EaselCanvasProps): ReactElement;
|
|
@@ -524,8 +554,8 @@ declare function EaselCanvas({ frame, className, style, metadata, mirrorStyles,
|
|
|
524
554
|
* THE PARTS, ON THE STORE (blueprint step 5.2).
|
|
525
555
|
*
|
|
526
556
|
* Every part built in steps 2.1–4.9 takes a HOST — what to read, how to write
|
|
527
|
-
* — so it never knew the old
|
|
528
|
-
* editor, against the old
|
|
557
|
+
* — so it never knew the old library. Until now each app wrote that host twice, once per
|
|
558
|
+
* editor, against the old library's store: `EmailFields` and `SiteFields` for the settings
|
|
529
559
|
* panel, the node-ops host for the menus. These are the hosts, written ONCE,
|
|
530
560
|
* against the engine's store; the parts' own APIs do not change.
|
|
531
561
|
*/
|
|
@@ -551,13 +581,13 @@ interface SelectedFields {
|
|
|
551
581
|
id: string;
|
|
552
582
|
/** The node the fields are for — the selected one, or the root as `{ type: 'root', props }`. */
|
|
553
583
|
node: ResolvableItem;
|
|
554
|
-
/** Its fields, resolved as the old
|
|
584
|
+
/** Its fields, resolved as the old library resolved them (`resolveFields` with the old library's params, parent included). */
|
|
555
585
|
fields: InspectorFields;
|
|
556
586
|
/** What the fields show. */
|
|
557
587
|
values: Record<string, unknown>;
|
|
558
588
|
/** The block's (or the root's) `edit` permission is off. */
|
|
559
589
|
readOnly: boolean;
|
|
560
|
-
/** Write one field: `resolveData` as the old
|
|
590
|
+
/** Write one field: `resolveData` as the old library ran it, then ONE replace — one undo step. */
|
|
561
591
|
onChange: (name: string, value: unknown) => void;
|
|
562
592
|
/**
|
|
563
593
|
* Write SEVERAL fields at once: one merged props object, `resolveData` once,
|
|
@@ -570,11 +600,11 @@ interface SelectedFields {
|
|
|
570
600
|
}
|
|
571
601
|
/**
|
|
572
602
|
* The settings panel's host: the selected node's fields and the write that
|
|
573
|
-
* changes one — what `EmailFields` and `SiteFields` each did against the old
|
|
603
|
+
* changes one — what `EmailFields` and `SiteFields` each did against the old library,
|
|
574
604
|
* here once:
|
|
575
|
-
* - fields resolve through `useResolvedFields` (the old
|
|
605
|
+
* - fields resolve through `useResolvedFields` (the old library's
|
|
576
606
|
* `useRegisterFieldsSlice`: `changed`, `lastFields`, `appState`, `parent`);
|
|
577
|
-
* - a change runs the block's `resolveData` (`resolveNodeData`, the old
|
|
607
|
+
* - a change runs the block's `resolveData` (`resolveNodeData`, the old library's
|
|
578
608
|
* `resolveComponentData`, with this easel's own memory of the last
|
|
579
609
|
* change) and then writes ONE `replace` of the node, or ONE `replaceRoot`.
|
|
580
610
|
*
|
|
@@ -583,16 +613,23 @@ interface SelectedFields {
|
|
|
583
613
|
* selected when the change began.
|
|
584
614
|
*/
|
|
585
615
|
declare function useSelectedFields(): SelectedFields;
|
|
616
|
+
/**
|
|
617
|
+
* The ROOT's fields and write, whatever is selected: `useSelectedFields` with
|
|
618
|
+
* nothing selected, for a panel that edits the page beside a selection — the
|
|
619
|
+
* website's Styles ▸ Basics, the This page group, open while a section is (Lewis, 2026-10-26).
|
|
620
|
+
* The same resolve and the same one `replaceRoot`; the selection is untouched.
|
|
621
|
+
*/
|
|
622
|
+
declare function useRootFields(): SelectedFields;
|
|
586
623
|
|
|
587
624
|
/**
|
|
588
|
-
* UNDO AND REDO ON THE KEYBOARD — the old
|
|
625
|
+
* UNDO AND REDO ON THE KEYBOARD — the old library's own six bindings, which both editors
|
|
589
626
|
* relied on without writing any: ⌘Z / Ctrl+Z undo; ⇧⌘Z, ⌘Y, Ctrl+Shift+Z and
|
|
590
627
|
* Ctrl+Y redo.
|
|
591
628
|
*
|
|
592
|
-
* Exact combinations, read off the physical key (`code`, as the old
|
|
629
|
+
* Exact combinations, read off the physical key (`code`, as the old library read it), so
|
|
593
630
|
* a layout that moves Z still undoes and ⌥⌘Z does nothing.
|
|
594
631
|
*
|
|
595
|
-
* ⚠️ THE OLD
|
|
632
|
+
* ⚠️ THE OLD LIBRARY FIRED THESE IN A TEXT FIELD TOO, and so does this: ⌘Z while typing
|
|
596
633
|
* in a setting undoes the easel's last step — which, since a field writes as
|
|
597
634
|
* it is typed, is the typing — and the browser's own text undo is prevented,
|
|
598
635
|
* so there are never two undo histories answering one key.
|
|
@@ -617,10 +654,10 @@ declare function useSelectedFields(): SelectedFields;
|
|
|
617
654
|
* editable region (efficient-easel/canvas `isTypingTarget`) — is not taken:
|
|
618
655
|
* it is that field's own undo. The assembled screen binds its keys so, to its
|
|
619
656
|
* own root and to the canvas frame, inside another app's page (lib/key-scope);
|
|
620
|
-
* left out, a press in a field undoes the easel's step, as the old
|
|
657
|
+
* left out, a press in a field undoes the easel's step, as the old library's did.
|
|
621
658
|
*/
|
|
622
659
|
declare function bindUndoKeys(doc: Document, easel: Pick<Easel, 'undo' | 'redo'> & Partial<Pick<Easel, 'getState'>>, options?: {
|
|
623
660
|
leaveTyping?: boolean;
|
|
624
661
|
}): () => void;
|
|
625
662
|
|
|
626
|
-
export { CanvasFrame, type CanvasFrameProps, type CanvasOverlay, type CanvasPart, type CanvasParts, CanvasPartsContext, CanvasPassThroughContext, CanvasSharedContext, type CanvasSlotProps, type CanvasTyping, type CanvasTypingState, type CanvasTypingTarget, DEFAULT_UI, type Easel, EaselAction, EaselCanvas, type EaselCanvasProps, EaselConfig, EaselCore, type EaselOptions, EaselProvider, type EaselProviderProps, EaselUi, EaselView, EditDocument, NodeSelection, Permissions, type SelectedFields, bindUndoKeys, createEasel, createUseEasel, recordsByDefault, reduce, uiView, useEasel, useEaselApi, useEaselNodeOps, useSelectedFields, validSelection };
|
|
663
|
+
export { CanvasFrame, type CanvasFrameProps, type CanvasOverlay, type CanvasPart, type CanvasParts, CanvasPartsContext, CanvasPassThroughContext, CanvasSharedContext, type CanvasSlotProps, type CanvasTyping, type CanvasTypingState, type CanvasTypingTarget, DEFAULT_UI, type Easel, EaselAction, EaselCanvas, type EaselCanvasProps, EaselConfig, EaselCore, type EaselOptions, EaselProvider, type EaselProviderProps, EaselUi, EaselView, EditDocument, NodeSelection, Permissions, type SelectedFields, bindUndoKeys, createEasel, createUseEasel, partHasOwnBox, recordsByDefault, reduce, uiView, useEasel, useEaselApi, useEaselNodeOps, useRootFields, useSelectedFields, validSelection };
|
package/dist/easel/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CanvasFrame,CanvasPartsContext,CanvasPassThroughContext,CanvasSharedContext,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,bindUndoKeys,createEasel,createUseEasel,recordsByDefault,reduce,uiView,useEasel,useEaselApi,useEaselNodeOps,useSelectedFields,validSelection}from"../chunk-
|
|
1
|
+
export{CanvasFrame,CanvasPartsContext,CanvasPassThroughContext,CanvasSharedContext,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,bindUndoKeys,createEasel,createUseEasel,partHasOwnBox,recordsByDefault,reduce,uiView,useEasel,useEaselApi,useEaselNodeOps,useRootFields,useSelectedFields,validSelection}from"../chunk-VBOSOH5M.js";import"../chunk-TBY3DFKS.js";import"../chunk-AGWKB77Q.js";import"../chunk-RPMSET77.js";import"../chunk-HZSZT3BE.js";import"../chunk-KRL3IUV3.js";import"../chunk-MFIRYGHW.js";import"../chunk-YU3WHLGI.js";import"../chunk-LF3FUSCQ.js";import"../chunk-TGZCD6IP.js";import"../chunk-KXM6YRG2.js";
|
|
@@ -142,7 +142,7 @@ declare function accessForNewDocument(hasEditLock: boolean): EditAccess;
|
|
|
142
142
|
declare const holderOf: (access: EditAccess) => LockHolder | null;
|
|
143
143
|
/** Read the `edit-lock` body — from a 200 or from a 409's error payload. */
|
|
144
144
|
declare function readLockHolder(data: unknown): LockHolder | null;
|
|
145
|
-
/** The five capabilities the old
|
|
145
|
+
/** The five capabilities the old library's `permissions` prop carries for the canvas. */
|
|
146
146
|
type DocumentPermissions = {
|
|
147
147
|
edit: boolean;
|
|
148
148
|
insert: boolean;
|
|
@@ -151,13 +151,13 @@ type DocumentPermissions = {
|
|
|
151
151
|
drag: boolean;
|
|
152
152
|
};
|
|
153
153
|
/**
|
|
154
|
-
* The canvas's the old
|
|
154
|
+
* The canvas's the old library `permissions`, derived from the write gate.
|
|
155
155
|
*
|
|
156
156
|
* BOTH branches name ALL FIVE keys — and that completeness is the whole point,
|
|
157
|
-
* not tidiness. The old
|
|
157
|
+
* not tidiness. The old library does not replace this prop when it changes; it MERGES it
|
|
158
158
|
* over the permissions it already holds (store/slices/permissions.ts,
|
|
159
159
|
* `useRegisterPermissionsSlice`: `{ ...existingGlobalPermissions, ...prop }`),
|
|
160
|
-
* and a field's editability is the live `getPermissions().edit`. The old
|
|
160
|
+
* and a field's editability is the live `getPermissions().edit`. The old library mounts
|
|
161
161
|
* while the lock claim is still `checking`, so `canEdit` is false and the store
|
|
162
162
|
* latches every key false. A PARTIAL writable value (say `{ drag: false }`)
|
|
163
163
|
* would then merge WITHOUT an `edit` key and leave `edit:false` stuck — every
|
|
@@ -166,7 +166,7 @@ type DocumentPermissions = {
|
|
|
166
166
|
* resets them, so the panel comes back the instant `canEdit` flips true.
|
|
167
167
|
*
|
|
168
168
|
* `drag` stays false in EITHER state: both editors move blocks with native DnD
|
|
169
|
-
* rails of their own, so the old
|
|
169
|
+
* rails of their own, so the old library's flaky cross-iframe canvas drag is always off.
|
|
170
170
|
*
|
|
171
171
|
* Write safety is unchanged: the `checking` window is still non-editable here,
|
|
172
172
|
* and the host's own write gate still drops any edit attempted before the claim
|
package/dist/fields/fields.css
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* The rows and the groups are `panel.css`'s (SettingsField, SettingsGroup),
|
|
5
5
|
* and the tabs are the shell's `Tabs`. The panel's rhythm is defined in
|
|
6
6
|
* `panel.css` ONCE (`--es-row-gap`, `--es-rhythm-*`), so this file adds no spacing between rows
|
|
7
|
-
* and no spacing between groups. What it adds is what a row HOLDS where the old
|
|
7
|
+
* and no spacing between groups. What it adds is what a row HOLDS where the old library
|
|
8
8
|
* used to put the browser's own: a text box, a number box, a dropdown.
|
|
9
9
|
*
|
|
10
10
|
* Every colour is a shell token (`shell.css`), so the dark editor is the same
|
package/dist/fields/index.d.ts
CHANGED
|
@@ -4,12 +4,12 @@ import { S as SettingsBucket } from '../buckets-_MGDYJlb.js';
|
|
|
4
4
|
export { D as DesignGroup } from '../buckets-_MGDYJlb.js';
|
|
5
5
|
import { ShowWhenContext } from 'efficient-shell/format';
|
|
6
6
|
export { ShowWhenContext, ShowWhenRule, showWhenOf, withShowWhen } from 'efficient-shell/format';
|
|
7
|
-
import { a as InspectorFieldDef, b as FieldRenderer, I as InspectorFields, c as FieldTextProps, d as FieldNumberProps, e as FieldSliderProps, f as FieldSelectManyProps, g as FieldSelectOneProps, F as FieldOption } from '../types-
|
|
8
|
-
export { A as ArrayFieldDef, C as CustomFieldDef, h as CustomFieldRenderProps, i as FieldSelectProps, N as NumberFieldDef, O as ObjectFieldDef, R as RadioFieldDef, S as SelectFieldDef, j as SlotFieldDef, T as TextFieldDef, k as TextareaFieldDef } from '../types-
|
|
9
|
-
import { R as ResolvableItem } from '../resolve-
|
|
7
|
+
import { a as InspectorFieldDef, b as FieldRenderer, I as InspectorFields, c as FieldTextProps, d as FieldNumberProps, e as FieldSliderProps, f as FieldSelectManyProps, g as FieldSelectOneProps, F as FieldOption } from '../types-BIytwvvH.js';
|
|
8
|
+
export { A as ArrayFieldDef, C as CustomFieldDef, h as CustomFieldRenderProps, i as FieldSelectProps, N as NumberFieldDef, O as ObjectFieldDef, R as RadioFieldDef, S as SelectFieldDef, j as SlotFieldDef, T as TextFieldDef, k as TextareaFieldDef } from '../types-BIytwvvH.js';
|
|
9
|
+
import { R as ResolvableItem } from '../resolve-Bz4mszpL.js';
|
|
10
10
|
export { F as FieldsWords } from '../words-CFkb8XtN.js';
|
|
11
11
|
export { LinkFilter, LinkFilterField, LinkKindChoice, LinkOption, LinkOptionGroup, LinkPicker, LinkPickerProps, LinkRules, LinkTarget } from 'efficient-shell/ui';
|
|
12
|
-
import '../types-
|
|
12
|
+
import '../types-Dq180WRV.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* A SETTINGS ROW'S SHOW-WHEN, read by the panel (SSOT batch 1, Lewis
|
|
@@ -81,12 +81,12 @@ interface InspectorFieldProps {
|
|
|
81
81
|
}
|
|
82
82
|
/** A heading level a settings group may draw at. */
|
|
83
83
|
type HeadingLevel = 2 | 3 | 4 | 5 | 6;
|
|
84
|
-
/** The label a row shows: the field's own, else its key, as the old
|
|
84
|
+
/** The label a row shows: the field's own, else its key, as the old library did. */
|
|
85
85
|
declare const labelOf: (field: InspectorFieldDef, name: string) => string;
|
|
86
86
|
/**
|
|
87
|
-
* ONE FIELD, drawn by its type — what the old
|
|
87
|
+
* ONE FIELD, drawn by its type — what the old library's `AutoField` was (blueprint 4.1).
|
|
88
88
|
*
|
|
89
|
-
* custom the field's own render, called with the old
|
|
89
|
+
* custom the field's own render, called with the old library's props plus `context`;
|
|
90
90
|
* text, textarea, number, select
|
|
91
91
|
* a SettingsField row (quiet label, control under it) holding the
|
|
92
92
|
* shell's own control, never the browser's;
|
|
@@ -162,6 +162,11 @@ interface FieldPlan {
|
|
|
162
162
|
* `bucket` ends nothing: it is a key the host keeps and nothing more. One level only — a band in a band
|
|
163
163
|
* cannot be said. A band whose rows are all hidden draws nothing
|
|
164
164
|
* (`Inspector`).
|
|
165
|
+
*
|
|
166
|
+
* THE VIEW (Lewis, 2026-10-27). When `show.context.device` is `"mobile"` (the phone
|
|
167
|
+
* view), a row without a phone value is not planned either: it would write the
|
|
168
|
+
* desktop value under the phone's name (`fieldShownInView`). Its `bucket` and
|
|
169
|
+
* `fold` still count, as for a show-when row.
|
|
165
170
|
*/
|
|
166
171
|
declare function planFields(fields: InspectorFields, show?: ShowWhenInput): FieldPlan;
|
|
167
172
|
/**
|
|
@@ -221,7 +226,7 @@ interface InspectorProps {
|
|
|
221
226
|
headingLevel?: HeadingLevel;
|
|
222
227
|
}
|
|
223
228
|
/**
|
|
224
|
-
* THE SETTINGS PANEL'S BODY (blueprint step 4.1) — what `the old
|
|
229
|
+
* THE SETTINGS PANEL'S BODY (blueprint step 4.1) — what `the old library's fields panel` was in
|
|
225
230
|
* both editors, without the hashed class names both had to hunt.
|
|
226
231
|
*
|
|
227
232
|
* - THE TABS ARE THE FIELDS' OWN. Which tab a field opens is said on the field
|
|
@@ -238,7 +243,7 @@ interface InspectorProps {
|
|
|
238
243
|
* re-bakes its colours from a field on a tab you are not looking at; taking
|
|
239
244
|
* the row out of the tree would stop that.
|
|
240
245
|
* - EVERY ROW IS ONE `.es-insp-row` WITH ITS NAME ON IT (`data-field`), a
|
|
241
|
-
* public class an app may style, where the old
|
|
246
|
+
* public class an app may style, where the old library's wrapper had a hashed one. A row
|
|
242
247
|
* that draws nothing takes no space (`:empty`).
|
|
243
248
|
* - THE SPACING IS THE PANEL'S (panel.css `--es-rhythm-*`): a row adds none of
|
|
244
249
|
* its own, so the rhythm is defined once for both editors.
|
|
@@ -259,6 +264,35 @@ interface InspectorProps {
|
|
|
259
264
|
*/
|
|
260
265
|
declare function Inspector({ fields, values, onChange, readOnly, context, showWhenContext, tab, onTab, tabs, tabIcons, renderers, idPrefix, ariaLabel, lead, children, leadFold, closedFolds, onFold, headingLevel, }: InspectorProps): react.JSX.Element;
|
|
261
266
|
|
|
267
|
+
/**
|
|
268
|
+
* IS THIS ROW DRAWN IN THIS VIEW? — the one gate (Lewis, 2026-10-27).
|
|
269
|
+
*
|
|
270
|
+
* In the phone view the panel draws only rows that have a phone value of their
|
|
271
|
+
* own: a `deviceField("mobile", …)`, which is a phone twin or a phone-only row,
|
|
272
|
+
* or a `deviceField("each", …)`, one row that writes the view's own value.
|
|
273
|
+
* Every other row writes the DESKTOP value, so drawing it under the phone view
|
|
274
|
+
* lets a merchant move the desktop while they look at the phone. The phone and
|
|
275
|
+
* the desktop are set apart and do not disturb each other.
|
|
276
|
+
*
|
|
277
|
+
* The answer comes from the one mark `deviceField` stamps (`deviceMetaOf`). It
|
|
278
|
+
* is not a list, and not a second filter beside the gate: a row is either
|
|
279
|
+
* gated to the phone or it is not a phone row.
|
|
280
|
+
*
|
|
281
|
+
* Never hidden by it, because they are not setting rows: a heading or tab mark
|
|
282
|
+
* (`marker`), a slot (it draws nothing; its name has a tab), and a field that
|
|
283
|
+
* draws no control anywhere (`noControlField(…, "always")`: the device note). Every other view (desktop, tablet, or no
|
|
284
|
+
* view named) draws every row, as before: tablet shows the desktop values.
|
|
285
|
+
*
|
|
286
|
+
* A host says which view it is in by `showWhenContext.device`; `"mobile"` is
|
|
287
|
+
* the phone. A host with no such fact (the campaign designer today) sees no
|
|
288
|
+
* change until it passes one.
|
|
289
|
+
*
|
|
290
|
+
* The `Inspector`'s `lead` (the host's own entry rows above the planned rows:
|
|
291
|
+
* the website's text boxes) is one more ungated row, so it is asked the same
|
|
292
|
+
* way: `fieldShownInView(LEAD_ROW, device)`. It is never a phone value.
|
|
293
|
+
*/
|
|
294
|
+
declare function fieldShownInView(field: unknown, device: unknown): boolean;
|
|
295
|
+
|
|
262
296
|
/** What a block may declare about its fields. */
|
|
263
297
|
interface FieldsBlock {
|
|
264
298
|
fields?: object;
|
|
@@ -279,11 +313,11 @@ interface ResolvedFieldsInput {
|
|
|
279
313
|
block: FieldsBlock | undefined;
|
|
280
314
|
/** The node that holds it, or null at the top. */
|
|
281
315
|
parent?: ResolvableItem | null;
|
|
282
|
-
/** What a resolver is told about the editor (the old
|
|
316
|
+
/** What a resolver is told about the editor (the old library's public `{ data, ui }`). */
|
|
283
317
|
appState?: unknown;
|
|
284
318
|
}
|
|
285
319
|
/**
|
|
286
|
-
* A NODE'S FIELDS, RESOLVED AS THE OLD
|
|
320
|
+
* A NODE'S FIELDS, RESOLVED AS THE OLD LIBRARY RESOLVED THEM — `useRegisterFieldsSlice`
|
|
287
321
|
* in Puck 0.20, which both editors' `resolveFields` were written against.
|
|
288
322
|
*
|
|
289
323
|
* - A new selection starts from the block's DECLARED fields (`lastFields` is
|
|
@@ -296,7 +330,7 @@ interface ResolvedFieldsInput {
|
|
|
296
330
|
* - `loading` turns on only when an answer takes longer than 50 ms.
|
|
297
331
|
*
|
|
298
332
|
* `appState` and `parent` are read when a resolution starts, never watched:
|
|
299
|
-
* The old
|
|
333
|
+
* The old library re-resolved on the node's change alone.
|
|
300
334
|
*/
|
|
301
335
|
declare function useResolvedFields({ id, node, block, parent, appState }: ResolvedFieldsInput): {
|
|
302
336
|
fields: InspectorFields;
|
|
@@ -350,9 +384,9 @@ interface ListFieldProps<T> {
|
|
|
350
384
|
noun?: string;
|
|
351
385
|
items: readonly T[];
|
|
352
386
|
onChange: (next: T[]) => void;
|
|
353
|
-
/** A fresh item for "+" (the old
|
|
387
|
+
/** A fresh item for "+" (the old library's `defaultItemProps`, copied). */
|
|
354
388
|
newItem: () => T;
|
|
355
|
-
/** The words after an item's name in its row (the old
|
|
389
|
+
/** The words after an item's name in its row (the old library's `getItemSummary`). */
|
|
356
390
|
summary?: (item: T, index: number) => ReactNode;
|
|
357
391
|
/** An item's own name; default "<Noun> <n>". */
|
|
358
392
|
itemName?: (item: T, index: number) => string;
|
|
@@ -401,7 +435,7 @@ declare function moveTo<T>(items: readonly T[], from: number, to: number): T[];
|
|
|
401
435
|
declare function removeAt<T>(items: readonly T[], index: number): T[];
|
|
402
436
|
/**
|
|
403
437
|
* A copy of an item: a deep copy of plain data, so editing the copy never
|
|
404
|
-
* writes through to the original (a list item is JSON — the old
|
|
438
|
+
* writes through to the original (a list item is JSON — the old library stored it so).
|
|
405
439
|
*/
|
|
406
440
|
declare function copyItem<T>(item: T): T;
|
|
407
441
|
declare function ListField<T>({ label, icon, noun: ownNoun, items, onChange, newItem, summary, itemName, thumb, min, max, readOnly, open, onOpen, renderItem, renderRow, canRemove: removable, lockedReason, fixed, removeOnRow, canDuplicate, above, head, }: ListFieldProps<T>): react.JSX.Element;
|
|
@@ -518,4 +552,4 @@ declare function optionFor<V>(options: readonly FieldOption<V>[], value: V | und
|
|
|
518
552
|
declare function FieldSelect<V>(props: FieldSelectManyProps<V>): ReactNode;
|
|
519
553
|
declare function FieldSelect<V>(props: FieldSelectOneProps<V>): ReactNode;
|
|
520
554
|
|
|
521
|
-
export { FieldNumber, FieldNumberProps, FieldOption, type FieldPlan, FieldRenderer, FieldSelect, FieldSelectManyProps, FieldSelectOneProps, FieldSlider, FieldSliderProps, FieldText, FieldTextProps, type FieldsBlock, Inspector, InspectorField, InspectorFieldDef, type InspectorFieldProps, InspectorFields, type InspectorProps, ListField, type ListFieldProps, type PlannedFold, type PlannedRow, type ResolvedFieldsInput, SettingsBucket, type ShowWhenInput, bucketsOf, copyItem, fieldIsShown, insertAt, labelOf, moveTo, optionFor, planFields, removeAt, shownFields, useResolvedFields };
|
|
555
|
+
export { FieldNumber, FieldNumberProps, FieldOption, type FieldPlan, FieldRenderer, FieldSelect, FieldSelectManyProps, FieldSelectOneProps, FieldSlider, FieldSliderProps, FieldText, FieldTextProps, type FieldsBlock, Inspector, InspectorField, InspectorFieldDef, type InspectorFieldProps, InspectorFields, type InspectorProps, ListField, type ListFieldProps, type PlannedFold, type PlannedRow, type ResolvedFieldsInput, SettingsBucket, type ShowWhenInput, bucketsOf, copyItem, fieldIsShown, fieldShownInView, insertAt, labelOf, moveTo, optionFor, planFields, removeAt, shownFields, useResolvedFields };
|
package/dist/fields/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{FieldText,Inspector,InspectorField,LinkPicker,ListField,bucketsOf,copyItem,insertAt,labelOf,moveTo,planFields,removeAt}from"../chunk-
|
|
1
|
+
export{FieldText,Inspector,InspectorField,LinkPicker,ListField,bucketsOf,copyItem,fieldShownInView,insertAt,labelOf,moveTo,planFields,removeAt}from"../chunk-6QSFJCJT.js";export{fieldIsShown,showWhenOf,shownFields,withShowWhen}from"../chunk-BPXEFVSQ.js";import"../chunk-YCSZAP7T.js";import"../chunk-WHS6Y55E.js";import"../chunk-K56YDHYQ.js";export{FieldSlider}from"../chunk-ZEH6QLBH.js";export{useResolvedFields}from"../chunk-AGWKB77Q.js";import"../chunk-FIVU2COQ.js";import"../chunk-FM6JO4WF.js";import"../chunk-KFV7N2DJ.js";export{FieldNumber}from"../chunk-Y2T3JX7K.js";export{FieldSelect,optionFor}from"../chunk-KFWNGPW3.js";import"../chunk-JACEEVVF.js";import"../chunk-S3DUFDQ6.js";import"../chunk-MFIRYGHW.js";import"../chunk-6NJHYXJM.js";import"../chunk-P2VEMZH5.js";import"../chunk-TGZCD6IP.js";import"../chunk-KXM6YRG2.js";
|
package/dist/node-ops/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { A as AfterRemove, I as ItemSelector, N as NodeSelection, P as PassThrough, a as Planned, S as StepBounds, c as canStep, b as clickPick, d as clickPickPart, f as fromItemSelector, n as nextInChain, e as nodeChain, p as parentStep, g as planDuplicate, h as planMove, i as planPaste, j as planRemove, k as planRestore, l as planSetProps, m as planStep, o as planSwap, t as toItemSelector } from '../plan-
|
|
2
|
-
export { C as ClipboardEntry, N as NodeClipboard, a as NodeOps, b as NodeOpsHost, c as createNodeClipboard, u as useNodeOps } from '../useNodeOps-
|
|
1
|
+
export { A as AfterRemove, I as ItemSelector, N as NodeSelection, P as PassThrough, a as Planned, S as StepBounds, c as canStep, b as clickPick, d as clickPickPart, f as fromItemSelector, n as nextInChain, e as nodeChain, p as parentStep, g as planDuplicate, h as planMove, i as planPaste, j as planRemove, k as planRestore, l as planSetProps, m as planStep, o as planSwap, t as toItemSelector } from '../plan-D0DgSLnY.js';
|
|
2
|
+
export { C as ClipboardEntry, N as NodeClipboard, a as NodeOps, b as NodeOpsHost, c as createNodeClipboard, u as useNodeOps } from '../useNodeOps-igxrnEhq.js';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
import { E as EaselContextMenuItem } from '../types-BbOBWXMP.js';
|
|
5
5
|
import { N as NodeMenuWords } from '../words-DMG4dYq2.js';
|
|
6
|
-
import '../types-
|
|
6
|
+
import '../types-Dq180WRV.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* nodeMenuItems — the right-click rows for a block, ONE list for both editors.
|
package/dist/node-ops/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{createNodeClipboard,nodeMenuItems}from"../chunk-P5VYGWYO.js";import"../chunk-WK3AFPXY.js";export{canStep,clickPick,clickPickPart,fromItemSelector,nextInChain,nodeChain,parentStep,planDuplicate,planMove,planPaste,planRemove,planRestore,planSetProps,planStep,planSwap,toItemSelector,useNodeOps}from"../chunk-
|
|
1
|
+
export{createNodeClipboard,nodeMenuItems}from"../chunk-P5VYGWYO.js";import"../chunk-WK3AFPXY.js";export{canStep,clickPick,clickPickPart,fromItemSelector,nextInChain,nodeChain,parentStep,planDuplicate,planMove,planPaste,planRemove,planRestore,planSetProps,planStep,planSwap,toItemSelector,useNodeOps}from"../chunk-RPMSET77.js";import"../chunk-TGZCD6IP.js";import"../chunk-KXM6YRG2.js";
|
package/dist/panel/index.d.ts
CHANGED
|
@@ -621,7 +621,7 @@ declare function SettingsSegmented<V = string>({ options, value, onChange, ariaL
|
|
|
621
621
|
declare function SettingsGroup({ title, open, onToggle, count, level, id, children, className, }: SettingsGroupProps): react.JSX.Element;
|
|
622
622
|
|
|
623
623
|
/**
|
|
624
|
-
* A group heading with NO group under it — the band on its own, for the old
|
|
624
|
+
* A group heading with NO group under it — the band on its own, for the old library's
|
|
625
625
|
* flat inspector list, where a heading cannot wrap the rows that follow it. A
|
|
626
626
|
* HEADING, not a control: no button, no sign, no count. THE SHELL'S
|
|
627
627
|
* `AccordionHeading` (B2 plan C, Lewis 2026-10-26); this name stays because
|
package/dist/panel/panel.css
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
token behind any of them: there was nowhere to change it once, and no floor
|
|
33
33
|
under any of it.
|
|
34
34
|
|
|
35
|
-
ON `.es-editor`, because the panel HAS no root of its own. The old
|
|
35
|
+
ON `.es-editor`, because the panel HAS no root of its own. The old library lays the
|
|
36
36
|
inspector out as a flat sibling list, so the primitives render no wrapper —
|
|
37
37
|
and `.es-editor` is the chrome root both editors already put on their own
|
|
38
38
|
chrome and the root every colour in this sheet is already read from. A host
|
|
@@ -503,6 +503,11 @@
|
|
|
503
503
|
because it is the only thing saying which name owns which control. Floored
|
|
504
504
|
on `--es-row-gap`, not replaced, and not `calc()`. */
|
|
505
505
|
.es-field { margin-top: max(var(--es-row-gap), var(--es-rhythm-between)); }
|
|
506
|
+
/* An Inspector inside a group body (a host's group of rows under a heading, e.g.
|
|
507
|
+
the website's "This page" in Styles > Basics): `.es-insp` is a flex column, so
|
|
508
|
+
the body's 32px and the first row's 32px do not fold into one. The body
|
|
509
|
+
carries the band's gap; the first row adds none. */
|
|
510
|
+
.es-group-body > .es-insp > .es-insp-rows > .es-insp-row:first-child > .es-field:first-child { margin-top: 0; }
|
|
506
511
|
.es-field-head { margin-bottom: var(--es-rhythm-within); }
|
|
507
512
|
|
|
508
513
|
/* A one-line row (a switch on the name line) has no control line, so no gap
|