efficient-easel 27.0.0 → 27.2.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.
Files changed (143) hide show
  1. package/dist/AddSidePanel-DoCx-ZrM.d.ts +1994 -0
  2. package/dist/{ScreenDocumentContext-DPW_6gOC.d.ts → ScreenDocumentContext-JQr4hTeP.d.ts} +7 -5
  3. package/dist/blocks/index.d.ts +1 -1
  4. package/dist/canvas/index.d.ts +2 -1
  5. package/dist/canvas/index.js +1 -1
  6. package/dist/chrome/index.js +1 -1
  7. package/dist/{chunk-PVBDKBJB.js → chunk-2EEYFRQM.js} +1 -1
  8. package/dist/{chunk-W3UZNKGS.js → chunk-2Y4CAWZQ.js} +4 -4
  9. package/dist/{chunk-CWELHADJ.js → chunk-3OOYGEJY.js} +1 -1
  10. package/dist/{chunk-BFJAEQZ6.js → chunk-3RGHXL5V.js} +1 -1
  11. package/dist/{chunk-JIP5JNRB.js → chunk-5HYVOOH3.js} +1 -1
  12. package/dist/chunk-64NREOML.js +1 -0
  13. package/dist/chunk-6GJEOER4.js +1 -0
  14. package/dist/{chunk-6ATIYLUL.js → chunk-6V6LC7QV.js} +1 -1
  15. package/dist/{chunk-KO47WAWR.js → chunk-7YXWWMBM.js} +1 -1
  16. package/dist/{chunk-GR3XRILS.js → chunk-A5USZ6Z6.js} +1 -1
  17. package/dist/{chunk-Y2T3JX7K.js → chunk-ANBPE45L.js} +1 -1
  18. package/dist/{chunk-KFWNGPW3.js → chunk-C63IB4VW.js} +5 -5
  19. package/dist/chunk-DCBUJ36Q.js +5 -0
  20. package/dist/{chunk-SQTVXE5D.js → chunk-DQSRGKSM.js} +18 -18
  21. package/dist/{chunk-YYD257TD.js → chunk-G7J6SGMF.js} +1 -1
  22. package/dist/chunk-HGTDDSFJ.js +19 -0
  23. package/dist/chunk-I4Z75MCX.js +1 -0
  24. package/dist/{chunk-AAZIMKLQ.js → chunk-JI7GUM3C.js} +1 -1
  25. package/dist/{chunk-QZJKWKGH.js → chunk-JUJEVGLY.js} +1 -1
  26. package/dist/{chunk-K53PQAMP.js → chunk-LDHUPZBK.js} +1 -1
  27. package/dist/{chunk-JQQFB7EZ.js → chunk-LK56FUFT.js} +1 -1
  28. package/dist/chunk-M5UCPD66.js +1 -0
  29. package/dist/{chunk-ZFEAWEFS.js → chunk-MMHYTIUY.js} +3 -3
  30. package/dist/{chunk-SBVIW3KJ.js → chunk-MTWQYLJE.js} +1 -1
  31. package/dist/chunk-OB4KI2AN.js +2 -0
  32. package/dist/{chunk-5OWAV3MH.js → chunk-OSF2H3LO.js} +1 -1
  33. package/dist/{chunk-TYTMUHUK.js → chunk-PTTQWCD7.js} +1 -1
  34. package/dist/{chunk-3XECMGXX.js → chunk-QEEW4X64.js} +1 -1
  35. package/dist/chunk-SDSBXW3V.js +26 -0
  36. package/dist/{chunk-76MUJIZE.js → chunk-SR2535CN.js} +17 -17
  37. package/dist/{chunk-QTHQPJWA.js → chunk-TF6NAIV7.js} +1 -1
  38. package/dist/{chunk-6EDVZBUO.js → chunk-TQUEVJOO.js} +1 -1
  39. package/dist/chunk-UMTUKSE6.js +1 -0
  40. package/dist/chunk-VNUXFD4X.js +1 -0
  41. package/dist/{chunk-VBEVZZTV.js → chunk-VTY7OQB5.js} +11 -11
  42. package/dist/{chunk-5JNVMCCB.js → chunk-XGTO4LHI.js} +1 -1
  43. package/dist/{chunk-YES5F7OS.js → chunk-XV5D4V2T.js} +1 -1
  44. package/dist/chunk-YCYGY54I.js +8 -0
  45. package/dist/chunk-YDTEYXQW.js +1 -0
  46. package/dist/chunk-ZSP4ZAQ2.js +64 -0
  47. package/dist/copy/index.js +11 -11
  48. package/dist/data/index.d.ts +2 -1
  49. package/dist/data/index.js +1 -1
  50. package/dist/drag/index.js +1 -1
  51. package/dist/easel/index.d.ts +1 -1
  52. package/dist/easel/index.js +1 -1
  53. package/dist/edit-lock/index.js +1 -1
  54. package/dist/fields/fields.css +8 -0
  55. package/dist/fields/index.d.ts +47 -3
  56. package/dist/fields/index.js +1 -1
  57. package/dist/node-ops/index.js +1 -1
  58. package/dist/phone-order-CRKvsTsz.d.ts +141 -0
  59. package/dist/screen/components/AddBlockRow.js +1 -1
  60. package/dist/screen/components/AddSidePanel.d.ts +3 -5
  61. package/dist/screen/components/AddSidePanel.js +1 -1
  62. package/dist/screen/components/NodeContextMenu.d.ts +3 -5
  63. package/dist/screen/components/NodeContextMenu.js +1 -1
  64. package/dist/screen/components/PageEditGuardNotices.js +1 -1
  65. package/dist/screen/components/SaveControls.d.ts +3 -5
  66. package/dist/screen/components/SaveControls.js +1 -1
  67. package/dist/screen/components/ScreenChrome.js +1 -1
  68. package/dist/screen/components/ScreenDocumentContext.d.ts +2 -2
  69. package/dist/screen/components/ScreenDocumentContext.js +1 -1
  70. package/dist/screen/components/ScreenMount.d.ts +3 -5
  71. package/dist/screen/components/ScreenMount.js +1 -1
  72. package/dist/screen/components/ScreenStoreProvider.d.ts +3 -5
  73. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  74. package/dist/screen/components/SectionScreenShell.js +17 -17
  75. package/dist/screen/components/SidePanelHead.js +1 -1
  76. package/dist/screen/components/panel-widths.js +1 -1
  77. package/dist/screen/components/usePartBridge.d.ts +3 -5
  78. package/dist/screen/components/usePartBridge.js +1 -1
  79. package/dist/screen/index.d.ts +3 -5
  80. package/dist/screen/index.js +1 -1
  81. package/dist/screen/lib/admin-bridge.d.ts +1 -1
  82. package/dist/screen/lib/document/add-target-types.d.ts +37 -55
  83. package/dist/screen/lib/document/block-set-host.js +1 -1
  84. package/dist/screen/lib/document/block-size-fields.d.ts +2 -2
  85. package/dist/screen/lib/document/block-size-fields.js +1 -1
  86. package/dist/screen/lib/document/block-types-in.js +1 -1
  87. package/dist/screen/lib/document/box-fields.d.ts +2 -2
  88. package/dist/screen/lib/document/box-fields.js +1 -1
  89. package/dist/screen/lib/document/button-fields.d.ts +2 -2
  90. package/dist/screen/lib/document/button-fields.js +1 -1
  91. package/dist/screen/lib/document/image-fields.d.ts +2 -2
  92. package/dist/screen/lib/document/image-fields.js +5 -5
  93. package/dist/screen/lib/document/new-child.d.ts +58 -0
  94. package/dist/screen/lib/document/new-child.js +1 -0
  95. package/dist/screen/lib/document/palette-sections.d.ts +3 -5
  96. package/dist/screen/lib/document/section-doc.d.ts +1 -1
  97. package/dist/screen/lib/document/section-doc.js +1 -1
  98. package/dist/screen/lib/document/shadow-fields.d.ts +2 -2
  99. package/dist/screen/lib/document/shadow-fields.js +2 -2
  100. package/dist/screen/lib/document/slot-section-spec.d.ts +37 -96
  101. package/dist/screen/lib/document/style-clipboard.d.ts +3 -5
  102. package/dist/screen/lib/document/style-clipboard.js +1 -1
  103. package/dist/screen/lib/document/style-fields.d.ts +2 -2
  104. package/dist/screen/lib/document/style-fields.js +1 -1
  105. package/dist/screen/lib/document/use-section-ops.d.ts +1 -1
  106. package/dist/screen/lib/document/use-section-ops.js +1 -1
  107. package/dist/screen/lib/document-addressing.d.ts +2 -2
  108. package/dist/screen/lib/document-hooks.d.ts +1 -1
  109. package/dist/screen/lib/document-switch.js +1 -1
  110. package/dist/screen/lib/failure.js +1 -1
  111. package/dist/screen/lib/host-inbound.js +1 -1
  112. package/dist/screen/lib/host.d.ts +2 -2
  113. package/dist/screen/lib/key-scope.js +1 -1
  114. package/dist/screen/lib/media-panel.d.ts +2 -2
  115. package/dist/screen/lib/media-picker.d.ts +2 -2
  116. package/dist/screen/lib/media-picker.js +1 -1
  117. package/dist/screen/lib/page-lock.d.ts +1 -1
  118. package/dist/screen/lib/page-lock.js +1 -1
  119. package/dist/screen/lib/screen-parts.d.ts +21 -1828
  120. package/dist/screen/lib/screen-parts.js +1 -1
  121. package/dist/screen/lib/section-templates.d.ts +1 -1
  122. package/dist/screen/lib/session-context.d.ts +1 -1
  123. package/dist/screen/lib/session.d.ts +1 -1
  124. package/dist/screen/lib/shared-sections.d.ts +1 -1
  125. package/dist/strings/index.d.ts +1 -1
  126. package/dist/strings/index.js +2 -2
  127. package/dist/style-clipboard/index.js +1 -1
  128. package/dist/text-styles/index.js +27 -27
  129. package/dist/{words-CFkb8XtN.d.ts → words-dNm6REMa.d.ts} +21 -0
  130. package/package.json +7 -1
  131. package/dist/chunk-2262JGFV.js +0 -5
  132. package/dist/chunk-3W2O22DZ.js +0 -19
  133. package/dist/chunk-DAKKPW2Z.js +0 -1
  134. package/dist/chunk-EUFDQ4KL.js +0 -1
  135. package/dist/chunk-FW35PCK7.js +0 -1
  136. package/dist/chunk-HG65R6IN.js +0 -20
  137. package/dist/chunk-JACEEVVF.js +0 -1
  138. package/dist/chunk-L2WK5JYB.js +0 -2
  139. package/dist/chunk-L7PSERQH.js +0 -8
  140. package/dist/chunk-NTG5ODKZ.js +0 -1
  141. package/dist/chunk-O4OWODU2.js +0 -64
  142. package/dist/chunk-TOKMFZPB.js +0 -1
  143. package/dist/resolve-Bz4mszpL.d.ts +0 -57
@@ -0,0 +1,1994 @@
1
+ import * as react from 'react';
2
+ import { ReactNode, MouseEvent, ComponentType } from 'react';
3
+ import { M as MeasuredCanvas, C as CanvasDragModel, D as DragSession } from './CanvasDragLayer-DXeQGrwJ.js';
4
+ import { SectionTemplate } from './screen/lib/section-template-types.js';
5
+ import { SharedSectionUse, SharedSection } from './screen/lib/shared-section-types.js';
6
+ import { BlockChoice } from './screen/lib/document/block-choice.js';
7
+ import { Data, Config } from './blocks/index.js';
8
+ import { C as CanvasTarget } from './watch-Unf6SfUf.js';
9
+ import { D as DeviceOption } from './types-SrGNzYeO.js';
10
+ import { P as Place } from './types-Dq180WRV.js';
11
+ import { R as RepeatCopy } from './copy-place-CQIemdtU.js';
12
+ import { E as EaselContextMenuItem } from './types-BbOBWXMP.js';
13
+ import { E as EaselRailItem } from './types-Cy7rdmXt.js';
14
+ import { StyleRow } from './style-clipboard/index.js';
15
+ import { f as TreeRowMark } from './types-CoUTWUwB.js';
16
+ import { q as AnyScreenTarget } from './ScreenDocumentContext-JQr4hTeP.js';
17
+ import { HostProduct } from './screen/lib/host-chrome.js';
18
+ import { EaselSession } from './screen/lib/session.js';
19
+ import { SlotConfigView, SlotChild } from './screen/lib/document/content-tree.js';
20
+
21
+ /**
22
+ * A component type's own `defaultProps`, looked up in the old library's config.
23
+ *
24
+ * Handed IN rather than imported: `lib/document/config` imports the seed
25
+ * registry's neighbours, and a seed registry that reached back into the config
26
+ * would close the loop. Both callers of `seeds()` already hold the config
27
+ * (`components/ScreenChrome`, `components/StandaloneSectionEditor`),
28
+ * so the lookup travels the short way.
29
+ *
30
+ * ⚠️ IT IS OPTIONAL, AND THE FIVE SPECS THAT PREDATE IT IGNORE IT. They
31
+ * seed ONE flat child whose every field is content, so a missing default changes
32
+ * nothing they draw. Image & Text Columns seeds a Box holding blocks, and a Box
33
+ * without its `direction` / `justify` / `align` / `wrap` is a different shape on
34
+ * the page — see `boxColumnSeed` in lib/document/slot-specs.
35
+ */
36
+ type NodeDefaults$1 = (type: string) => Record<string, unknown>;
37
+ interface SlotSectionSpec {
38
+ /** The primary slot field on the section (e.g. Hero's `slides`). */
39
+ slot: string;
40
+ /** The child component type the slot holds. */
41
+ childType: string;
42
+ /** The "Add …" affordance label. */
43
+ addLabel: string;
44
+ /**
45
+ * The children ARE the section, and no surface offers to add one.
46
+ *
47
+ * ⚠️ NOT THE SAME THING AS `addBlocked`, AND THE DIFFERENCE IS WHY IT EXISTS.
48
+ * `addBlocked` is a reason adding is impossible RIGHT NOW — a hero anchor
49
+ * already holds four — so the row stays, greyed, with the sentence on it, and
50
+ * the merchant can act on it (re-place a group and Add comes back). A fixed
51
+ * set has no such state: the row would be permanently dead furniture, and
52
+ * `NodeContextMenu`'s own rule says it plainest — a row must never be a button
53
+ * that does nothing.
54
+ *
55
+ * Both surfaces that draw an Add row read this. `addBlocked` is still declared
56
+ * beside it, because the DROP path asks that one and never this.
57
+ */
58
+ fixed?: boolean;
59
+ /** Children render as a HORIZONTAL slider (selection must advance it). */
60
+ slider?: boolean;
61
+ /**
62
+ * What ONE new child of this slot is, when it is more than `childType`'s
63
+ * defaults: a node with its own slot children inline, built with the
64
+ * screen's maker (the config's defaults, the screen's fresh ids) — the
65
+ * contract `ScreenBlockRules.newSectionNode` keeps for a top-level section.
66
+ * Every door that adds `childType` to this slot (the Layers row, the Add
67
+ * panel's press and drop, the settings panel list, the one-section editor's
68
+ * card and list) lays it down with ONE `insertNode`, so one Undo takes it
69
+ * back. A choice of the slot other than `childType` is inserted as before.
70
+ * The ids `make.newNodeId` mints are the contract: the screen does not
71
+ * re-mint them. Absent: the type's defaults, as before.
72
+ */
73
+ newChild?: (make: ScreenNodeMaker) => ScreenNewNode;
74
+ /**
75
+ * What one prepared child is called on the Add panel's tile (a noun, the
76
+ * host's own words: "Scrolling bar"), read only with `newChild`. The tile
77
+ * puts its own "Add" in front, so this is never cut out of `addLabel`, whose
78
+ * words a host may translate. Absent: the tile keeps the type's own word.
79
+ */
80
+ childLabel?: string;
81
+ /**
82
+ * Prop bags for the default children a fresh section is seeded with.
83
+ *
84
+ * `defaultsFor` is {@link NodeDefaults} — present when the caller holds the
85
+ * config, absent otherwise, and every spec that seeds a plain content child
86
+ * simply declines it.
87
+ */
88
+ seeds: (defaultsFor?: NodeDefaults$1) => Record<string, unknown>[];
89
+ /**
90
+ * Convert a section's LEGACY props (an older inline-array field) into slot
91
+ * children at load-time — the chrome-only migration for pages saved before the
92
+ * field became a slot. Returns [] when there's nothing to migrate, in which
93
+ * case the seeder falls back to `seeds()`.
94
+ */
95
+ legacy?: (props: Record<string, unknown>) => Record<string, unknown>[];
96
+ /**
97
+ * Why this section cannot take another child right now — a sentence the
98
+ * merchant reads — or `null` when it can (card 66189).
99
+ *
100
+ * Optional, and only the Hero slide answers it today: a group is placed on one
101
+ * of nine anchors, an anchor stacks at most four, and a fifth would be drawn
102
+ * ON TOP of the fourth. The rule lives on the SPEC rather than inside
103
+ * `SlotChildRows` because the list is shared by five sections and this is one
104
+ * section's arithmetic — the list asks, the spec answers.
105
+ */
106
+ addBlocked?: (children: readonly unknown[], incoming?: unknown) => string | null;
107
+ /**
108
+ * Why this section must NOT be seeded at all, read off its OWN stored props.
109
+ *
110
+ * The seeder's existing guard is "the slot already has children" — right for a
111
+ * section whose only shape is the slot, and blind to a section that still
112
+ * carries an OLDER one. Image & Text Columns is the first of those: its
113
+ * columns used to be a `steps` ARRAY, the owner ruled on 2026-09-05 that
114
+ * nothing is migrated, and a stored page therefore has a full `steps` and an
115
+ * empty `boxes`. Without this the seeder would drop three fresh Boxes into a
116
+ * published page that already draws three columns, and the merchant would find
117
+ * six.
118
+ *
119
+ * Deliberately a question about the PARENT'S props, not about the slot — the
120
+ * slot is what the existing guard already reads, and answering "is there an
121
+ * older shape here" from the same place is what makes this a second question
122
+ * rather than a second opinion on the first.
123
+ */
124
+ skipSeed?: (props: Record<string, unknown>) => boolean;
125
+ /**
126
+ * What the list says about the children it ALREADY holds, or `null`.
127
+ *
128
+ * The counterpart to `addBlocked`, and deliberately a second question rather
129
+ * than a second answer from the first: `addBlocked` is about a group that has
130
+ * not arrived yet, this is about the ones that are already here and cannot all
131
+ * be drawn. A section that cannot get into that state simply declares neither.
132
+ */
133
+ notice?: (children: readonly unknown[]) => string | null;
134
+ }
135
+
136
+ /** Which registry answered — the discriminator three of the four decisions read. */
137
+ type AddTargetSource = "section" | "footer" | "container";
138
+ /**
139
+ * What a parent can take, and everything the four decisions below need to act on
140
+ * it.
141
+ *
142
+ * ⚠️ THE LOOKUP DECIDES FOUR THINGS, NOT ONE. Wiring only the choice list ships
143
+ * a menu with wrong row names, wrong handlers, and unreachable on an empty
144
+ * container — which is why this returns a record rather than a list:
145
+ *
146
+ * 1 the CHOICE LIST — {@link AddTarget.choices}, what the Add menu offers, or
147
+ * `null` where the parent adds ONE child type from a button instead.
148
+ * 2 the ROW NAME — `rowNamerFor` (components/SlotChildRows) reads
149
+ * {@link AddTarget.source} to pick the FOOTER's block-label rule over
150
+ * lib/document/slot-child-name.ts. It must ask "is this a FOOTER block", NOT
151
+ * "does this parent use a menu": a Box adds from a menu too and
152
+ * keeps the slot-child rule, or its Headings, Texts and Buttons all fall
153
+ * through to a rule that reads a heading, a bound menu and first-words.
154
+ * 3 WHICH HANDLERS — SectionScreenShell's adapter reads `source` to choose
155
+ * which pair of host handlers a row presses. Keyed the other way round it
156
+ * answered null for a Box, whose rows then pressed and did nothing.
157
+ * 4 REACHABILITY — `Boolean(canAddTo(type))` feeds `nestState`, and a row
158
+ * folds open only if it has children OR an add affordance. An EMPTY
159
+ * container with no caret cannot be opened to reach its own menu — and
160
+ * empty is exactly the state a merchant is in when adding the first block.
161
+ */
162
+ interface AddTarget {
163
+ /** Which of the three registries answered. */
164
+ source: AddTargetSource;
165
+ /**
166
+ * The slot this parent keeps its children on.
167
+ *
168
+ * RETURNED rather than defaulted, so a caller can never reach it by falling
169
+ * through another mechanism's constant — the rule container-blocks states for
170
+ * its own lookup, kept here because this is now the one that is asked. A Flex
171
+ * listed on the Footer's `blocks` would draw its rows off `undefined`.
172
+ */
173
+ slot: string;
174
+ /** The registry's own choice list, or `null` for a single-type "Add …" button. */
175
+ choices: BlockChoice[] | null;
176
+ /**
177
+ * The section's own spec — its `addLabel`, `childType`, `seeds`, `addBlocked`,
178
+ * `notice` and `slider`. Non-null exactly when `source === "section"`.
179
+ *
180
+ * Carried so a caller that needs a section's own arithmetic (the Hero slide's
181
+ * anchor cap, the seed-on-load effect) reaches it through this one seam rather
182
+ * than importing the registry beside it and gaining a second opinion.
183
+ */
184
+ spec: SlotSectionSpec | null;
185
+ }
186
+
187
+ /**
188
+ * WHAT THE WEBSITE HANDS THE EDITOR'S SCREEN — the parts of the screen that
189
+ * know there is a website, given to it instead of imported by it
190
+ * (doc/adr/0003).
191
+ *
192
+ * The screen — the frame, the panels, the tree, the add panel, the inspector —
193
+ * is being made to hold nothing a website has that an email does not: no page,
194
+ * no site theme, no pinned header, no chat bubble. What it used to import and
195
+ * wire itself, the website layer now wires and hands over here, and a screen
196
+ * mounted with no layer above it draws none of it.
197
+ *
198
+ * This is NOT `EaselChrome` (lib/host-chrome): that is what a HOST stands
199
+ * round the editor — the storefront's cart, its header's settings — built in
200
+ * the host and absent on the ambient session. These parts are the builder's
201
+ * own website layer, the same for every host, and present on every mount of
202
+ * the screen (`ScreenStoreProvider` supplies them, from whoever mounts it).
203
+ *
204
+ * Fixed for the life of a mount, like the session: `useBridges`,
205
+ * `useStandaloneBridges`, `useDocumentPass` and `blockLook.useProducts` are
206
+ * called as hooks, and `Canvas` and `Inspector` are rendered as element types,
207
+ * so the provider's value must not change while the screen is mounted.
208
+ */
209
+ /** A node of the document as the screen hands it to a layer: its type and its
210
+ * props, its id among them. */
211
+ interface ScreenNode {
212
+ type: string;
213
+ props: {
214
+ id: string;
215
+ [key: string]: unknown;
216
+ };
217
+ }
218
+ /**
219
+ * A panel of the layer's own, as the screen holds it: a kind, and whatever
220
+ * else the layer put beside it to say WHICH one (the node a panel is about).
221
+ * The screen stores it and hands it back, and reads no further into it than
222
+ * `kind`.
223
+ */
224
+ type ScreenInspectorMode = {
225
+ kind: string;
226
+ };
227
+ /**
228
+ * THE SELECTION'S OWN PANEL — the one mode the screen names for itself. In it
229
+ * the inspector follows the selection: a node's settings, or the document's
230
+ * with nothing selected. Every other mode is a panel of a layer's, which the
231
+ * screen stores and hands back; this is the one it puts the inspector back to
232
+ * when the selection changes, and on every press of a row of its own.
233
+ *
234
+ * ONE object for the module's life, so setting it while it is the mode already
235
+ * bails out of the state update. A layer whose inspector names this mode names
236
+ * THIS object (the website's `SELECTION_MODE`, components/SectionEditor, is it), so
237
+ * "is the panel showing the selection's own?" has one answer on both sides.
238
+ * The kind is `"selection"`; its old spelling went in easel 22.0.0.
239
+ */
240
+ declare const SELECTION_MODE: {
241
+ readonly kind: "selection";
242
+ };
243
+ /** Is this the selection's own panel? */
244
+ declare function isSelectionMode(mode: {
245
+ kind: string;
246
+ }): boolean;
247
+ /** The inspector drilled into one PART of a node (lib/document/part-id): the mode
248
+ * the screen's part bridge (components/usePartBridge) opens and closes. The
249
+ * website's inspector modes include it (components/SectionEditor
250
+ * `InspectorMode`). */
251
+ type ScreenPartMode = {
252
+ kind: "part";
253
+ nodeId: string;
254
+ propKey: string;
255
+ };
256
+ /** Are two panels the same panel: the same kind, about the same thing? Asked
257
+ * member by member, so the screen can answer without knowing what a layer
258
+ * keeps beside the kind. */
259
+ declare function sameInspectorMode(a: ScreenInspectorMode, b: ScreenInspectorMode): boolean;
260
+ /**
261
+ * A SLOT's own panel (0.105.0): the mode the screen opens when the row of a
262
+ * slot it draws as a rung is pressed (`ScreenSlot.panel`) — the campaign
263
+ * designer's Column inspector. `kind` is the layer's (`panel`), and beside it
264
+ * the node the slot is a slot of and the slot's own name. The screen makes it
265
+ * and hands it back to the layer's inspector; a layer may name one itself to
266
+ * `ScreenInspector.select`.
267
+ */
268
+ interface ScreenSlotMode extends ScreenInspectorMode {
269
+ nodeId: string;
270
+ slot: string;
271
+ }
272
+ /** Is a panel a slot's own ({@link ScreenSlotMode}) — about a node's slot, not
273
+ * the node? */
274
+ declare function isSlotMode(mode: ScreenInspectorMode): mode is ScreenSlotMode;
275
+ /** An address of a node the screen selects, as its own ops spell one: its
276
+ * index, in the list `zone` names (left out for the top-level list); or null,
277
+ * for nothing selected. */
278
+ type ScreenSelector = {
279
+ index: number;
280
+ zone?: string;
281
+ } | null;
282
+ /** The inspector, as far as a layer needs it: which panel it shows, and how to
283
+ * show one of the layer's own. */
284
+ interface ScreenInspector {
285
+ /** The kind of panel showing now. */
286
+ kind: string;
287
+ /** The panel showing now, whole: what `open` was handed, given back. */
288
+ mode: ScreenInspectorMode;
289
+ /** Show a panel of the layer's own and reveal the inspector, leaving the
290
+ * selection where it is. The same panel already showing stays, as the
291
+ * object it was (`sameInspectorMode`). */
292
+ open: (mode: ScreenInspectorMode) => void;
293
+ /**
294
+ * Put a panel of the layer's own in the inspector and leave the inspector as
295
+ * it stands, in view or hidden: with `reveal` after it, what a press on one
296
+ * of the screen's own rows does. `open` is for a handler registered once: it
297
+ * never changes identity, so it cannot ask whether the inspector is hidden
298
+ * and brings it out every time.
299
+ */
300
+ show: (mode: ScreenInspectorMode) => void;
301
+ /** Bring the inspector into view if it is hidden. What it shows stays. */
302
+ reveal: () => void;
303
+ /**
304
+ * Move the selection AND put a panel of the layer's own in the inspector, in
305
+ * one step (0.105.0): what the campaign designer's Column needs, which is a
306
+ * slot and not a node — nothing is selected (`null`) and the Column
307
+ * inspector shows. `show` then a selection would not hold: the screen puts
308
+ * the inspector back to the selection's own panel whenever the selection
309
+ * changes, so the mode is kept pending and that reset honours it for this
310
+ * one change. The inspector is left as it stands, in view or hidden, as
311
+ * `show` leaves it. A slot's own panel ({@link ScreenSlotMode}) for a slot
312
+ * the tree draws as a rung also unfolds the tree to that rung's row.
313
+ */
314
+ select: (selector: ScreenSelector, mode: ScreenInspectorMode) => void;
315
+ }
316
+ /**
317
+ * What the screen hands THE INSPECTOR it mounts in its right panel
318
+ * (`ScreenParts.Inspector`): the panel to show, the ways out of a panel,
319
+ * and what the screen's own furniture offers one. The names are the ones the
320
+ * screen has always passed, two of them in a website's words: they are the
321
+ * doors the bridges hand back (`openSettings`, `openStyles`).
322
+ */
323
+ interface ScreenInspectorPanelProps {
324
+ /** The panel to show: the selection's own (`SELECTION_MODE`), or one of the
325
+ * layer's, handed back as the screen was handed it. */
326
+ mode: ScreenInspectorMode;
327
+ /** The way to the settings of the whole document, from a panel that edits
328
+ * one part of it (`ScreenBridges.openSettings`). */
329
+ onOpenWebsiteSettings: () => void;
330
+ /** The way to the styles a part of a block can follow, from that part's own
331
+ * panel (`ScreenBridges.openStyles`). Omitted where there is nowhere to
332
+ * keep them, and the panel draws no door. */
333
+ onOpenSiteStyles?: () => void;
334
+ /** The way to THIS document's own styles (`ScreenBridges.openPageStyles`),
335
+ * for a panel with nothing selected to point at. Omitted where the layer
336
+ * hands none. */
337
+ onOpenPageStyles?: () => void;
338
+ /** Select a node and show ITS OWN settings: the way out of a panel that was
339
+ * scoped down to part of that node. */
340
+ onSelectNode: (nodeId: string) => void;
341
+ /** Withhold the head's duplicate and remove. Set by the screen whose
342
+ * document is ONE node, which a second node or none would break. */
343
+ hideNodeActions?: boolean;
344
+ /** Say one line through the screen's toast. Omitted by a screen with none. */
345
+ onNotify?: (msg: string, tone?: "success" | "error") => void;
346
+ /** Hide the panel: the last button of its head. Omitted by a screen whose
347
+ * inspector is always in view. */
348
+ onHidePanel?: () => void;
349
+ /**
350
+ * Which of the head's two node actions the selected node's BLOCK allows
351
+ * (0.103.0): its config's `permissions.duplicate` and `permissions.delete`,
352
+ * each true unless the config says false — the answer the screen's own tree
353
+ * rows and menu honour, handed on so the head the layer draws honours it
354
+ * too, hiding or greying a refused one. With nothing selected both are true.
355
+ * Handed by the page screen; a layer that never reads it draws its head as
356
+ * it did.
357
+ */
358
+ nodeActions?: ScreenNodeActions;
359
+ }
360
+ /** What a block's config allows of the two actions that make another node or
361
+ * take one away (`ComponentConfig.permissions`): `false` only where the config
362
+ * says so (lib/document/content-tree `blockNodeActions`). */
363
+ interface ScreenNodeActions {
364
+ duplicate: boolean;
365
+ delete: boolean;
366
+ }
367
+ /**
368
+ * The document and its tree of rows, as far as a layer needs them to wire and
369
+ * draw the parts of ONE block that are not nodes of their own: what is
370
+ * selected, where a node sits, and the three things a press on such a part's
371
+ * row does to the node it belongs to. Handed to the bridges on every render,
372
+ * so each member is that render's.
373
+ */
374
+ interface ScreenTree {
375
+ /** The document, as the rules are handed it. */
376
+ data: unknown;
377
+ /** The node selected now, or null. */
378
+ selected: ScreenNode | null;
379
+ /** The key of the list a node sits in, by the node's id. */
380
+ zoneOf: (id: string) => string | undefined;
381
+ /** Somebody else holds the document: nothing may be moved. */
382
+ readOnly: boolean;
383
+ /** Select the top-level node at `index` the way a press on its row does: the
384
+ * inspector goes back to the selection's own panel, then the selection
385
+ * moves. */
386
+ select: (index: number) => void;
387
+ /** Write the top-level node at `index` back, whole. */
388
+ replace: (index: number, node: ScreenNode) => void;
389
+ /** Bring the canvas to a node, as selecting its row does. */
390
+ scrollTo: (id: string) => void;
391
+ }
392
+ /**
393
+ * The canvas, as far as a layer needs it: which device it is being looked at
394
+ * on, and how often its frame has been rebuilt. The switch, its state and the
395
+ * Refresh are the screen's; a layer whose own fields or preview ask "which
396
+ * view is this?", or which puts the canvas somewhere of its own accord, is
397
+ * told here. Handed to the bridges on every render.
398
+ */
399
+ interface ScreenCanvas {
400
+ /** The id of the device the switch is on: one of the layer's own
401
+ * (`ScreenDevices.options`). */
402
+ device: string;
403
+ /** How many times the screen has rebuilt the canvas's frame (its Refresh).
404
+ * It changes with each one and with nothing else: a layer that put the
405
+ * canvas somewhere as the document opened lists it as a dependency, and
406
+ * puts it there again in the fresh frame. */
407
+ refreshes: number;
408
+ }
409
+ /**
410
+ * The left panel, as far as a layer needs it: to put it on a view and to bring
411
+ * it out. Which view it is on, whether it is open and what a press on the rail
412
+ * does to either are the screen's. Handed to the bridges on every render.
413
+ */
414
+ interface ScreenLeftPanel {
415
+ /** Put the panel on a view, by its id: one of the layer's own
416
+ * (`ScreenLeftView`) or one of the screen's. Whether the panel is in view
417
+ * stays, and the screen keeps the choice as it keeps any other. */
418
+ setView: (view: string) => void;
419
+ /** Bring the panel into view if it is hidden. What it shows stays. */
420
+ reveal: () => void;
421
+ }
422
+ /**
423
+ * What a line of the screen's toast may carry besides its words (owner
424
+ * 2026-10-14: a delete goes at once and its toast offers "Undo" for 8 s). The
425
+ * shell's `toast` takes all three (`efficient-shell` 7.24); a host's own
426
+ * `notify` is handed them and should pass them on, or the Undo is lost.
427
+ */
428
+ interface ScreenToastExtra {
429
+ /** One action after the words: "Undo". */
430
+ action?: {
431
+ label: string;
432
+ onClick: () => void;
433
+ };
434
+ /** How long the line stays, in ms. */
435
+ duration?: number;
436
+ /** Told once how the line went: its action, its time, or a tap. */
437
+ onClose?: (how: "action" | "timeout" | "dismissed") => void;
438
+ }
439
+ /** What a view of the layer's is handed when the left panel draws it: what the
440
+ * screen hands the heads of its own views. */
441
+ interface ScreenLeftViewFrame {
442
+ /** Hide the whole left panel: the last button of every view's head. */
443
+ onHide: () => void;
444
+ /** Say one line through the screen's toast — with its Undo and its time
445
+ * where it has them (`extra`, 7.0.0: a page deleted from the layer's own
446
+ * Pages panel offers Undo through the same door as a section). */
447
+ notify: (msg: string, tone?: "success" | "error", extra?: ScreenToastExtra) => void;
448
+ }
449
+ /**
450
+ * A VIEW of the left panel that is the layer's own: a button in the rail, and
451
+ * what the panel shows while the view is the one it is on. The screen lights
452
+ * the button and switches to the view exactly as it does for its own Layers,
453
+ * and draws no frame round what `panel` returns: a view draws its own head.
454
+ */
455
+ interface ScreenLeftView {
456
+ /** The view's id: what the screen holds as the view the panel is on, and
457
+ * what is kept between mounts (`ScreenLeftViewRules`), so one in use is
458
+ * never renamed. The rail button's id as well. */
459
+ id: string;
460
+ /** The rail button's name. */
461
+ label: string;
462
+ /** …and its glyph. */
463
+ icon: ReactNode;
464
+ /** The view, for the screen to place in the left panel as it comes back. A
465
+ * function called where the panel is drawn and not a component of its own:
466
+ * what it returns is mounted in the screen's place, with nothing between. */
467
+ panel: (frame: ScreenLeftViewFrame) => ReactNode;
468
+ }
469
+ /**
470
+ * What a layer stands in the rail: a view of its own, or a button that is NOT
471
+ * a view of the left panel — one that opens something of the layer's
472
+ * elsewhere. That one is the engine's own rail item (efficient-easel/rail),
473
+ * drawn as it is handed: the layer says whether it is lit and what a press
474
+ * does.
475
+ */
476
+ type ScreenRailItem = ScreenLeftView | EaselRailItem;
477
+ /**
478
+ * The screen's own writes of the document, as far as a layer's pass over a
479
+ * document needs them. They are the writes every surface of the screen makes
480
+ * (lib/document/use-section-ops), refused the same way while somebody else holds
481
+ * the document, and ONE object from render to render until that changes — so a
482
+ * pass may list it as a dependency and run no oftener for it.
483
+ *
484
+ * Every write is FOLDED into the history entry it happens in (1.0.1,
485
+ * `foldIntoHistory`): what a pass gives a document as it opens is part of the
486
+ * document the history starts at, never an undo step that one Undo takes back
487
+ * out. Autosave still hears each write.
488
+ */
489
+ interface ScreenDocumentOps {
490
+ /** Replace the whole working document, unrecorded. */
491
+ setDocument: (data: Data) => void;
492
+ /** Insert a node of `type`, as its own defaults, into the top-level list;
493
+ * returns the id it was given. */
494
+ insertSection: (type: string, index: number) => string;
495
+ /** Insert a FULL node — its type and its props, slot children inline — into
496
+ * the list `zone` names; returns the id it was given. */
497
+ insertNode: (zone: string, index: number, node: ScreenNode) => string;
498
+ /** Write the node at a place back, whole. */
499
+ replaceComponent: (zone: string, index: number, node: ScreenNode) => void;
500
+ }
501
+ /** What the tree lends a layer that draws a row in it: the row's own click,
502
+ * for a pointer landing outside its name. */
503
+ interface ScreenTreeRows {
504
+ rowClick: (select: () => void) => (e: MouseEvent<HTMLElement>) => void;
505
+ }
506
+ /** …and, for a layer that draws rows which fold, the tree's own fold state.
507
+ * The ids are the layer's to make; the tree keeps them with its own. */
508
+ interface ScreenTreeFolds extends ScreenTreeRows {
509
+ isCollapsed: (id: string) => boolean;
510
+ toggleCollapse: (id: string) => void;
511
+ }
512
+ /**
513
+ * A layer's main action, as data (`ScreenBridges.mainAction`, 8.0.0). The
514
+ * screen draws it; the layer draws nothing. Words are the layer's, already in
515
+ * its language.
516
+ */
517
+ interface ScreenMainAction {
518
+ /** The main half's word: "Publish", "Save and close". */
519
+ label: string;
520
+ /** Its Tooltip while it can be pressed ("Saves your changes and goes back to
521
+ * the campaign. Nothing is sent."). */
522
+ tooltip?: string;
523
+ /** What a press does. */
524
+ onPress: () => void;
525
+ /**
526
+ * The quiet form, while there is nothing for the action to do: the main
527
+ * half becomes secondary, with a check glyph, these words, and off with
528
+ * `reason` ("Published" / "Everything is live"). The chevron still opens.
529
+ * Absent or null: never quiet.
530
+ */
531
+ quiet?: {
532
+ label: string;
533
+ reason: string;
534
+ } | null;
535
+ /** A reason of the layer's own to turn the main half off, besides the
536
+ * screen's (a lock, a refused save, offline, a failed save). */
537
+ disabledReason?: string | null;
538
+ /** What the menu's status row says after the save ("Saved 2 seconds ago ·
539
+ * Changes not live yet"): "Changes not live yet", "Everything is live",
540
+ * "Never published", "Draft, nothing is sent". */
541
+ status?: string | null;
542
+ /**
543
+ * What the action will put live, one short line each, in the layer's words
544
+ * ("Home", "Site styles", "Main menu"): the website editor's one Publish
545
+ * puts the whole site live, and the merchant sees what it holds before the
546
+ * press. The save menu draws each line as a status row (the shell's
547
+ * `status` entry: muted, not a menu item) under the status row. Absent or
548
+ * empty: no list.
549
+ */
550
+ goingLive?: readonly string[];
551
+ /**
552
+ * The layer's own rows of the ▾ menu ("Version history"): drawn last, under
553
+ * Save now and one divider, as the shell's menu items. A press closes the
554
+ * menu, then runs `onSelect`. Absent or empty: the menu is as before, with
555
+ * no divider of their own.
556
+ */
557
+ menuItems?: readonly ScreenMenuItem[];
558
+ /** The action is running: the main half shows the shell's spinner. */
559
+ busy?: boolean;
560
+ }
561
+ /** One of the layer's rows in the ▾ menu ({@link ScreenMainAction.menuItems}). */
562
+ interface ScreenMenuItem {
563
+ /** Unique among the layer's rows. */
564
+ key: string;
565
+ /** The row's words, in the layer's language ("Version history"). */
566
+ label: string;
567
+ /** The shell glyph before the words. */
568
+ icon?: ReactNode;
569
+ /** What a press does, after the menu has closed. */
570
+ onSelect: () => void;
571
+ /** Turns the row off. */
572
+ disabled?: boolean;
573
+ }
574
+ /** What a layer's bridges give back for the screen to place. */
575
+ interface ScreenBridges {
576
+ /** A row under the Add panel's tiles, for something that is not a block.
577
+ * Handed the way to leave Add, for a row that opens a panel. */
578
+ addPanelRow?: (leaveAdd: () => void) => ReactNode;
579
+ /**
580
+ * Rows at the END of a top-level node's own children, for a part of that
581
+ * block which is not a node: "layer, do you draw anything under this row?".
582
+ * Asked only where the node's child rows are drawn, and what comes back is
583
+ * placed as it is — the layer draws with the tree's own row.
584
+ */
585
+ partRows?: (node: ScreenNode, rows: ScreenTreeRows) => ReactNode;
586
+ /**
587
+ * Does the layer draw a subtree of its OWN under this top-level node — rows
588
+ * for things the block keeps in its props and not in a slot? Such a row
589
+ * folds like any other, so the screen asks before it draws the caret.
590
+ */
591
+ hasOwnRows?: (node: ScreenNode) => boolean;
592
+ /** That subtree's rows, for the node at `index`. Asked only when
593
+ * `hasOwnRows` said yes and the row is unfolded. */
594
+ ownRows?: (node: ScreenNode, index: number, rows: ScreenTreeFolds) => ReactNode;
595
+ /**
596
+ * The row of a top-level node was pressed, and the screen has selected it:
597
+ * a layer that keeps a focus of its own INSIDE one block puts it back to the
598
+ * block. Called between the selection and the canvas's scroll. The node is
599
+ * the one at the pressed index, if there is one.
600
+ */
601
+ sectionPressed?: (node: ScreenNode | undefined) => void;
602
+ /**
603
+ * The layer's own controls in the top bar's right cluster. The screen draws
604
+ * that cluster as the save icon and the main button (8.0.0; it was the save
605
+ * pill, Refresh and the main button); a layer has two places in it.
606
+ * `barLead` stands FIRST among the actions, right after the save icon:
607
+ * something done with the whole document that only the layer has. What
608
+ * comes back is placed as it is, and a layer with nothing to offer just now
609
+ * returns nothing.
610
+ */
611
+ barLead?: () => ReactNode;
612
+ /** …and `barTrail` stands just before the main button: a way out to where
613
+ * the document is read (the website's Preview, the email designer's "Send
614
+ * a test email"). */
615
+ barTrail?: () => ReactNode;
616
+ /** …and `barView` stands in the CENTRE cluster, right after Refresh: a way
617
+ * to look at the document drawn as an icon beside the preview's own
618
+ * controls (the website's Preview, owner 2026-10-25). A layer that has one
619
+ * hands it here instead of `barTrail`. */
620
+ barView?: () => ReactNode;
621
+ /**
622
+ * …and `barMain` IS the main button, in its place at the end of the cluster
623
+ * (0.103.0): the layer's own way to finish with the document — the campaign
624
+ * designer's Done — where the screen draws Publish (a document that
625
+ * publishes) or Save. What comes back is placed as it is, nothing round it,
626
+ * and returning nothing leaves the place empty. Absent, the screen draws its
627
+ * own button, as it always has.
628
+ */
629
+ barMain?: () => ReactNode;
630
+ /**
631
+ * THE MAIN ACTION, AS DATA (8.0.0, card [DESIGN] A Clearer Save In Both
632
+ * Editors): what the layer's main button says and does, for the screen to
633
+ * draw as the shell's `SplitButton` with the save menu on its chevron. The
634
+ * website's is Publish (quiet as "Published" while everything is live); the
635
+ * email designer's is Save and close. The screen turns the main half off,
636
+ * with the reason, while the document is locked, frozen, refused, offline or
637
+ * holding a failed save; the chevron always opens. Handed back each render,
638
+ * so it follows the layer's state. Wins over `barMain`; with neither, the
639
+ * screen's own Done (`screen.done`) stands in the same split button.
640
+ */
641
+ mainAction?: ScreenMainAction | null;
642
+ /**
643
+ * The layer's own buttons in the rail. The screen draws the rail as Add, its
644
+ * own Layers and the host's Media library; a layer has two places in it.
645
+ * `railLead` stands between Add and Layers. Each list is the buttons THIS
646
+ * document has, in the order they are drawn: one it does not have is left
647
+ * out, and a view left out is a view the panel cannot be on.
648
+ */
649
+ railLead?: ReadonlyArray<ScreenRailItem>;
650
+ /** …and `railTrail` stands between Layers and Media. */
651
+ railTrail?: ReadonlyArray<ScreenRailItem>;
652
+ /**
653
+ * Which view the left panel ACTUALLY shows, given the one it is set to: the
654
+ * view kept from another document may be one this document does not have,
655
+ * and the panel then shows the screen's Layers. The layer answers, because
656
+ * some of the views are its own and which of them a document has is its to
657
+ * know. The screen has no media view (the media library is a popup,
658
+ * harness UI-20): a stored "media" view resolves to Layers like any other
659
+ * view this document does not have.
660
+ */
661
+ resolveLeftView?: (view: string) => string;
662
+ /**
663
+ * A tool of the layer's own at the foot of the Layers tree, under the last
664
+ * row: something that reads the whole document and is not a row of it.
665
+ * Placed as it comes back.
666
+ */
667
+ treeFoot?: () => ReactNode;
668
+ /**
669
+ * Two doors out of the inspector's panels, onto wherever the layer keeps what
670
+ * they lead to: a view of its own in the left panel, a panel of its own in
671
+ * the inspector. The screen hands them to the inspector it mounts and does
672
+ * not know where they go. `openSettings` is the way to the settings of the
673
+ * whole document, from a panel that edits one part of it. The inspector
674
+ * cannot do without it, so with no layer it is handed one that leads nowhere.
675
+ */
676
+ openSettings?: () => void;
677
+ /** …and `openStyles` the way to the styles a part of a block can follow,
678
+ * from that part's own panel. A layer with nowhere to keep them hands none,
679
+ * and the panel draws no door. */
680
+ openStyles?: () => void;
681
+ /**
682
+ * The way to THIS document's own styles — the website's Styles ▸ Basics, the This page group,
683
+ * the email's Styles — from the tree ground's menu (`screen.pageStyles`).
684
+ * The tree keeps no row for the document's settings (Lewis, 2026-10-26:
685
+ * the tree's first row goes), so this is the menu's one door to them. A layer
686
+ * that hands none gets no row.
687
+ */
688
+ openPageStyles?: () => void;
689
+ /**
690
+ * THE LAYER'S OWN ROWS IN A NODE'S RIGHT-CLICK MENU (0.105.0), by the group
691
+ * each joins (`ScreenMenuRows`): the campaign designer's "Check this image
692
+ * loads" and its phone rows. Asked of the node the menu was opened on, and
693
+ * where it sits, every time the menu is drawn; what comes back is placed at
694
+ * the end of its group, after the screen's own rows, as it is handed — a row
695
+ * that writes runs a component or an op of the layer's that reaches the
696
+ * document itself. Nothing handed back adds nothing. Absent: the screen's
697
+ * rows alone, as the menu has always drawn them.
698
+ */
699
+ menuRows?: (node: ScreenNode, zone: string, index: number) => ScreenMenuRows | null | undefined;
700
+ /**
701
+ * THE ROW'S OWN ACTIONS ON A DRAWN COPY (card copy typing, 2026-10-30). A
702
+ * card template is drawn once per row of its owner's data, each copy in a
703
+ * `data-sf-repeat` wrapper; the rows are the layer's, never the document's.
704
+ * Given, a right-click on a block in a copy offers, in the node's one menu,
705
+ * Add item after, Move item earlier, Move item later (the way a row cannot
706
+ * go greyed) and Delete item, and a press comes here with the copy's place.
707
+ * Withheld while nothing may be written. Absent: the menu is as before.
708
+ */
709
+ onCopyItem?: (request: CopyItemRequest) => void;
710
+ /** The layer's own context, stood round the whole screen. What it is handed
711
+ * is the screen; what it returns is rendered in the screen's place. */
712
+ wrap?: (screen: ReactNode) => ReactNode;
713
+ }
714
+ /** The document's half of a shared section (`ScreenPinnedNodes.shared`). */
715
+ interface ScreenSharedSections {
716
+ /** The pages that use this top-level node, this page among them, when it is
717
+ * a shared section; null when it is this page's own, or the header or
718
+ * footer. */
719
+ usedOn: (node: ScreenNode) => readonly SharedSectionUse[] | null;
720
+ /** Open one of those pages (a press in On N pages ▸). */
721
+ openPage: (page: SharedSectionUse) => void;
722
+ /** MAKE SHARED: the store made `section` from `node`. From now on the layer
723
+ * holds `node`, where it stands, as that shared section; the page looks the
724
+ * same, and its row turns green. */
725
+ adopt: (node: ScreenNode, section: SharedSection) => void;
726
+ /** What Add puts on the page for `section` — the node the layer holds as it
727
+ * — or null when it cannot go on this page: it is on it already (once per
728
+ * page). */
729
+ nodeOf: (section: SharedSection) => ScreenNode | null;
730
+ /** DETACH FROM SHARED: this page's own copy of the shared `node`, every id
731
+ * fresh (efficient-easel/data `copyNode`). The screen puts it in the node's
732
+ * place, one undo step, and the layer holds it as the page's own from then
733
+ * on. The other pages keep the shared section. */
734
+ detach: (node: ScreenNode) => ScreenNode;
735
+ /** A shared section was deleted: every page that used it now holds its own
736
+ * copy, this one included, and the layer takes that in. Optional. */
737
+ removed?: (section: SharedSection) => void;
738
+ }
739
+ /** What a press on a drawn copy's item row asks (`ScreenBridges.onCopyItem`). */
740
+ type CopyItemAction = "addAfter" | "moveEarlier" | "moveLater" | "delete";
741
+ /** The copy a row was pressed on, and what to do to its row. */
742
+ interface CopyItemRequest {
743
+ /** The block whose slot is drawn once per row. */
744
+ ownerId: string;
745
+ /** That slot (`template`). */
746
+ slot: string;
747
+ /** The row the copy is drawn for; 0 is the main copy. */
748
+ index: number;
749
+ /** The copy of an outer template this copy's owner is drawn in, when
750
+ * there is one (`RepeatCopy.outer`, `efficient-easel/easel`): the inner
751
+ * index alone names no row. */
752
+ outer?: RepeatCopy;
753
+ action: CopyItemAction;
754
+ }
755
+ /** A layer's own rows in a node's menu, by the group of the menu each goes at
756
+ * the end of (efficient-easel/node-ops `nodeMenuItems`' `extras`): `pick`
757
+ * (Select layer), `make` (Duplicate … Paste), `change` (Rename, Hide …) and
758
+ * `remove` (Delete). */
759
+ type ScreenMenuRows = Partial<Record<"pick" | "make" | "change" | "remove", EaselContextMenuItem[]>>;
760
+ /** A block type's own default props, read off the config the screen holds.
761
+ * The screen's to look up and a layer's to be lent: a layer that reached into
762
+ * the config for itself would be holding a second copy of it. */
763
+ type NodeDefaults = (type: string) => Record<string, unknown>;
764
+ /** What the screen lends a rule that builds a node. All four are the screen's
765
+ * own and none is a block's: the rule states the node, the screen says what a
766
+ * type defaults to, what its next id is, what it is called and whether the
767
+ * host offers it. */
768
+ interface ScreenNodeMaker {
769
+ /** A type's default props, from the config. */
770
+ nodeDefaults: NodeDefaults;
771
+ /** A fresh id for one node of a type. Called once per node, in the order the
772
+ * nodes are written. */
773
+ newNodeId: (type: string) => string;
774
+ /** What a top-level node of a type is called, as the tree and the toast say
775
+ * it. */
776
+ sectionLabel: (type: string) => string;
777
+ /** Does this editor's host offer the type? A rule that would lay down a block
778
+ * the host left out asks first. */
779
+ blockIsOffered: (type: string) => boolean;
780
+ }
781
+ /** A node as a rule hands it back: a type and its props, slot children inline
782
+ * in them. The screen inserts it whole. */
783
+ interface ScreenNewNode {
784
+ type: string;
785
+ props: Record<string, unknown>;
786
+ }
787
+ /** The node a `canAddTo` question is asked of: its id, and the document it is in. */
788
+ interface ScreenNodeAt {
789
+ id: string;
790
+ data: unknown;
791
+ }
792
+ /**
793
+ * The rules of particular blocks, asked by the screen and never stated in it:
794
+ * the screen is handed nodes and is not told which blocks exist. Plain
795
+ * functions of what they are passed, and the same object for the life of a
796
+ * mount, so the screen may call them anywhere without listing them as a
797
+ * dependency.
798
+ */
799
+ interface ScreenBlockRules {
800
+ /** A block that is what its section IS: it may be selected and edited, and
801
+ * never removed, hidden, duplicated or dragged. `node` is the node itself,
802
+ * where the screen asks of one (every place it does, since 18.1.0): a rule
803
+ * that locks ONE node, not a whole type — a shared section another tab
804
+ * holds (Shared section design v4). A rule that reads the type alone locks
805
+ * by type, as it always did. */
806
+ isLockedBlock: (type: string | undefined, node?: ScreenNode) => boolean;
807
+ /** Why a second one of this node cannot be made in this document, or null —
808
+ * a rule of the block's own. */
809
+ duplicateBlocked: (data: unknown, node: unknown) => string | null;
810
+ /**
811
+ * How many nodes of its own kind the node with `id` already sits inside, for
812
+ * a block that limits its own nesting; 0 for every other. It is the depth the
813
+ * add lookup is asked at, so every surface that adds into one node offers the
814
+ * same list.
815
+ */
816
+ nestDepth: (data: unknown, type: string, id: string) => number;
817
+ /**
818
+ * What a new top-level section of `type` STARTS AS, when that is more than
819
+ * its own defaults — an arrangement of several blocks, or a prop no default
820
+ * carries — as ONE node for the screen to insert in one step; or null, and
821
+ * the screen inserts the type by itself. Where it goes, selecting it and
822
+ * announcing it stay the screen's.
823
+ */
824
+ newSectionNode: (type: string, make: ScreenNodeMaker) => ScreenNewNode | null;
825
+ /**
826
+ * What can go in a node of `nodeType`, sitting `nestDepth` nodes of its own
827
+ * kind deep (0 when not said): the slot its children are kept on, and the
828
+ * menu's rows or the one child type a button adds — or null for a node that
829
+ * takes no children. THE ONE ANSWER every add surface of the screen asks (the
830
+ * tree, the panel, the menu, the Add panel), so no two of them can come to
831
+ * offer one node different lists; what each of the layer's blocks takes is
832
+ * the layer's catalogue, and the screen is not told it.
833
+ *
834
+ * `slot` (0.105.0) is asked where the screen means ONE slot of a node that
835
+ * has several: a gap or an empty slot in the tree, a slot place Add was
836
+ * opened at, a drop into a slot. The answer is that slot's (the campaign
837
+ * designer's Column 2 answers `col2`); a layer that keeps one slot per node
838
+ * may ignore it, and the screen then offers that slot alone, as before.
839
+ *
840
+ * `at` (24.2.0) is the ONE node asked of, where the screen means one: its
841
+ * id and the document it is in (Add opened in it, its rows in the tree, a
842
+ * drop or an insert into it). Two nodes of one type may take different
843
+ * children — the campaign designer's Box takes any email block, a Box in a
844
+ * Banner only what the Banner's bake can draw. A layer whose nodes of one
845
+ * type all take the same may ignore it. Absent where the question is about
846
+ * a type, not a node (the Add panel's catalogue).
847
+ */
848
+ canAddTo: (nodeType: string, nestDepth?: number, slot?: string, at?: ScreenNodeAt) => AddTarget | null;
849
+ /**
850
+ * THE SLOTS OF A NODE, IN ORDER, AS THE SCREEN DRAWS THEM (0.105.0). A slot
851
+ * that is a `rung` is a row of its own in the Layers tree, with its children
852
+ * under it, a level of the Select layer flyout and a place of its own in a
853
+ * drag: the campaign designer's section draws Column 1 and Column 2 so from
854
+ * two columns up, and its lone column not at all. Every other slot's children
855
+ * hang straight off the node's row, as they do today. A slot left out of the
856
+ * answer is not drawn (a column the section's layout hides). The tree, the
857
+ * Add panel's "Adding to …", the drag and the flyout read it; where a node's
858
+ * children are FOUND (the menu, a write, a drop's checks) is still every
859
+ * slot field.
860
+ *
861
+ * Answered for every node the tree draws; null or undefined for one is the
862
+ * screen's own reading of it, so a layer may answer for its sections alone.
863
+ * Absent: every slot field the config declares, in its order, none of them a
864
+ * rung — the tree the website has.
865
+ */
866
+ slotsOf?: (node: ScreenNode) => ReadonlyArray<ScreenSlot> | null | undefined;
867
+ /**
868
+ * A RUNG MOVED (0.105.0): the rung at `from` in the node's run of rungs (its
869
+ * place among `slotsOf`'s rungs) dropped so it rests at `to` — a drag in the
870
+ * tree, or ⌥↑ / ⌥↓ on its row. The layer writes the move (the campaign
871
+ * designer swaps two columns' blocks, or reorders the phone stack) and may
872
+ * answer the slot to select after it, which the screen selects as a press
873
+ * on that rung's row does. Absent: no rung is picked up.
874
+ */
875
+ moveSlot?: (nodeId: string, from: number, to: number) => string | null | void;
876
+ /**
877
+ * What a rung's row offers besides its fold (0.105.0): the campaign
878
+ * designer's Duplicate and Delete of a column, drawn in the order handed,
879
+ * among the row's actions. The screen confirms nothing: what a press asks
880
+ * first (Delete a column that still holds blocks) is the layer's `run`.
881
+ * Withheld while the document is read-only. Absent, or nothing handed: the
882
+ * row has none.
883
+ */
884
+ slotActions?: (node: ScreenNode, slot: string) => ReadonlyArray<ScreenSlotAction> | null | undefined;
885
+ /**
886
+ * Does the host of this editor offer the type? Asked of the editor's own
887
+ * session where the screen holds it, else of the editor on the page. Where
888
+ * no host chose its blocks, every type is.
889
+ */
890
+ blockIsOffered: (type: string, session?: EaselSession) => boolean;
891
+ /**
892
+ * Is a new block RESOLVED as it goes in (0.103.0)? With true, every insert
893
+ * the screen makes — a section, a block into a slot, a saved template, a
894
+ * seeded slot child — is followed by `easel.resolveNode(id, { trigger:
895
+ * 'insert' })`, as the campaign designer's own inserts are: the block's
896
+ * `resolveData` runs the moment it arrives (seeding its children, stamping a
897
+ * default), in the insert's own undo step, not at its first edit or the next
898
+ * time the document opens. Absent, false: an insert runs no resolver, as
899
+ * the website's never has.
900
+ */
901
+ resolveOnInsert?: boolean;
902
+ /**
903
+ * CLEAN A COPY (0.106.0): handed every node the screen COPIES into the
904
+ * document — the menu's Duplicate and Paste, ⌘V (a cut block pasted back
905
+ * too), a saved section put in from Add — one node at a time, a copied
906
+ * section's blocks each as well, and it answers the node as the copy should
907
+ * hold it: what only the original may hold taken out. The campaign
908
+ * designer's image block releases the hosted picture it baked (`bakedId`):
909
+ * the next bake deletes the asset that id names, so two blocks holding one
910
+ * would destroy each other's picture. It must keep the node's id (the copy's
911
+ * own, already fresh) and its type. Absent: a copy is its original, prop for
912
+ * prop, but its ids, as before.
913
+ */
914
+ stripCopy?: (node: ScreenNode) => ScreenNode;
915
+ }
916
+ /**
917
+ * ONE SLOT OF A NODE, as the screen draws it (`ScreenBlockRules.slotsOf`,
918
+ * 0.105.0). Only `slot` and `rung` are read of a slot that is not a rung.
919
+ */
920
+ interface ScreenSlot {
921
+ /** The slot field's name (`col2`): its children are `props[slot]`, its list
922
+ * is `${nodeId}:${slot}`. */
923
+ slot: string;
924
+ /** What the rung's row says ("Column 2"), and the flyout, and Add's
925
+ * "Adding to …". */
926
+ label: string;
927
+ /** The rung's glyph, drawn as handed. Absent: none. */
928
+ glyph?: ReactNode;
929
+ /** Drawn as a row of its own, its children under it. False: its children
930
+ * hang straight off the node's row. */
931
+ rung: boolean;
932
+ /**
933
+ * The kind of the layer's panel this rung is edited in (the Column
934
+ * inspector): a press on its row selects nothing and shows that panel, as a
935
+ * {@link ScreenSlotMode} naming the node and the slot, and the row is lit
936
+ * while it shows; the flyout lists it as a level. Absent: the rung only
937
+ * folds, its press selects the node it is a slot of, and the flyout leaves
938
+ * it out.
939
+ */
940
+ panel?: string;
941
+ /** A pill after the name ("2 of 3", the phone stack's place). */
942
+ badge?: ReactNode;
943
+ /** The hint the row shows when it may be dragged. Absent: the tree's own. */
944
+ dragHint?: string;
945
+ /** Drawn above the rung's row, as handed: the campaign designer's "Phone
946
+ * order" label over its first column. */
947
+ heading?: ReactNode;
948
+ /** False: the rung keeps its place, and is not picked up (a pinned
949
+ * section's columns). Absent: it moves where `moveSlot` is handed. */
950
+ movable?: boolean;
951
+ }
952
+ /** What a rung's row offers (`ScreenBlockRules.slotActions`, 0.105.0). */
953
+ interface ScreenSlotAction {
954
+ /** Which action: the screen draws its glyph, and the delete in its red. */
955
+ kind: "duplicate" | "delete";
956
+ /** Its tooltip and accessible name: "Duplicate Column 2", or why not. */
957
+ label: string;
958
+ /** Drawn, and not pressed: the label says why. */
959
+ disabled?: boolean;
960
+ /**
961
+ * The action, the layer's whole: it asks what it must ask first and writes.
962
+ * It may answer the slot to select after it (the copy, the column that took
963
+ * a deleted one's place), which the screen selects as a press on that rung's
964
+ * row does; nothing, and the selection stays.
965
+ */
966
+ run: () => string | null | void | Promise<string | null | void>;
967
+ }
968
+ /**
969
+ * The slot fields of `node` whose row the panel shows, in the config's order —
970
+ * THE ONE READER of "does a slot follow its row" (plan 2026-10-23 §6.0, "Batch
971
+ * 3 must do" item 2, GG 2026-10-26). A slot field that carries the shell's
972
+ * show-when rule (`./fields` `fieldIsShown`) and reads false for the node's own
973
+ * values is left out: the panel hides that row, so no Layers tree lists blocks
974
+ * the section no longer draws (the Product Grid's hand-picked products once its
975
+ * content is a Category). Nothing is deleted; the blocks come back with the row.
976
+ *
977
+ * Every Layers tree reads it: {@link screenSlotsOf} (the page editor's), the
978
+ * page tree's run with no `slotsOf`, and the one-section editor's. Where a
979
+ * node's children are FOUND — a drop, the address map, dedupe — is still
980
+ * content-tree's `childSlotsOf`, every slot field.
981
+ */
982
+ declare function shownSlotFieldsOf(config: SlotConfigView, node: ScreenNode): string[];
983
+ /** The children a Layers tree lists under `node`: those of its shown slots
984
+ * ({@link shownSlotFieldsOf}), addressed as `childSlotsOf` addresses them. */
985
+ declare function shownChildSlotsOf(config: SlotConfigView, node: ScreenNode): SlotChild[];
986
+ /**
987
+ * The slots of `node` as the screen draws them: the layer's answer
988
+ * (`slotsOf`), else — with no `slotsOf`, or none for this node — the slots
989
+ * {@link shownSlotFieldsOf} answers, in the config's order, none of them a rung.
990
+ */
991
+ declare function screenSlotsOf(rules: ScreenBlockRules, config: SlotConfigView, node: ScreenNode): ReadonlyArray<ScreenSlot>;
992
+ /** The tier a node is NAMED at: a node at the top of the document is a section,
993
+ * a node inside another is a block. */
994
+ type ScreenNodeLevel = "section" | "block";
995
+ /**
996
+ * How the layer's blocks are NAMED AND DRAWN in the screen: the tree's rows and
997
+ * the Add panel's tiles put a word, a glyph and a cover on a block, and which
998
+ * word and which drawing is known only to the layer that knows every block it
999
+ * has. The screen is handed a type and asks.
1000
+ *
1001
+ * The same object for the life of a mount, and its two components the same two
1002
+ * functions throughout: the screen renders them as element types, and a type
1003
+ * that changed identity would remount every row and tile that wears one.
1004
+ */
1005
+ interface ScreenBlockLook {
1006
+ /**
1007
+ * What a node of `type` is called at a level, given `base` — the label the
1008
+ * config holds for the type, which is the name of every node the layer does
1009
+ * not name by where it sits.
1010
+ */
1011
+ labelAtLevel: (type: string, level: ScreenNodeLevel, base: string) => string;
1012
+ /** The Add panel's one-line blurb for a section, by type. A type with none
1013
+ * has no entry. */
1014
+ descriptions: Record<string, string>;
1015
+ /** The Add panel's short heading for a group of sections, by the group's
1016
+ * key, where the layer has one; undefined, and the registry's own title for
1017
+ * the group is its heading. */
1018
+ categoryLabel: (id: string) => string | undefined;
1019
+ /** The blank section: the Add panel offers it first in its own group, with
1020
+ * the ungrouped blocks after it, and the blocks it takes (and they take)
1021
+ * are the blocks Add offers beyond the catalogue (11.0.0). Null: every
1022
+ * section stands in its group in the catalogue's order, and the blocks are
1023
+ * what every section takes. */
1024
+ firstSection: string | null;
1025
+ /**
1026
+ * What the row of a block says when the block is named by its own content
1027
+ * and not by the slot-child rule (lib/document/slot-child-name): the layer reads
1028
+ * the content, and `compLabel` — the config's label for a type, lent by the
1029
+ * screen — is the word for a block it has no rule for.
1030
+ */
1031
+ blockRowName: (child: {
1032
+ type: string;
1033
+ props: Record<string, unknown>;
1034
+ }, compLabel: (type: string) => string) => string;
1035
+ /**
1036
+ * The plain words of a block's stored copy, every mark of the layer's markup
1037
+ * unwrapped: what a tree row prints of a name the author typed, where no mark
1038
+ * can be drawn (lib/document/slot-child-name `slotChildRowName`). Which marks
1039
+ * there are is the layer's grammar — a website's is not an email's.
1040
+ */
1041
+ plainText: (copy: string) => string;
1042
+ /** The glyph of a block or section type, as a tree row and a block tile wear
1043
+ * it. */
1044
+ Icon: ComponentType<{
1045
+ type: string;
1046
+ size?: number;
1047
+ className?: string;
1048
+ }>;
1049
+ /** The cover picture of a section type, filling the Add panel's card — or
1050
+ * of a preset row, asked with the preset's key (`presets`). */
1051
+ Thumbnail: ComponentType<{
1052
+ type: string;
1053
+ }>;
1054
+ /**
1055
+ * ADD ROWS THAT ARE PRESETS, NOT BLOCK TYPES (GG ruling 2026-10-30, owner
1056
+ * item C36): each with its own key, label, group, blurb and cover, and an
1057
+ * `insert` that builds the node it lays down, in one step. Searched,
1058
+ * pressed after a ➕ and dragged like a section's row; it goes in the page's
1059
+ * own list only. Absent: every row is a block type, as before
1060
+ * (lib/document/palette-sections `PalettePreset`).
1061
+ */
1062
+ presets?: readonly PalettePreset[];
1063
+ /**
1064
+ * The products a row may be named after when its block holds only a
1065
+ * product's handle: null until they arrive, and for good when there are
1066
+ * none. A HOOK — the one member here that is — called once per render where
1067
+ * the screen read the products itself, so its effect keeps its place.
1068
+ */
1069
+ useProducts: () => readonly HostProduct[] | null;
1070
+ /**
1071
+ * THE LAYER'S LAST WORD ON WHAT A LAYERS ROW SAYS (0.103.0): handed a node,
1072
+ * the level it is named at and `fallback` — what the screen's own naming
1073
+ * rule answered (lib/document/slot-child-name: a name the node carries, else its
1074
+ * type's label; a pinned row's word) — it answers the row's name. Asked of
1075
+ * every node row the page screen's Layers tree draws, and of the menu's
1076
+ * Select layer flyout, a block's canvas handle and a section's own list of
1077
+ * its children in the inspector, which say the same words. The campaign
1078
+ * designer's rows read its own labels ("Section 2", "Header"). Absent: the
1079
+ * screen's rule, as it named every row.
1080
+ */
1081
+ rowName?: (node: ScreenNode, level: ScreenNodeLevel, fallback: string) => string;
1082
+ /**
1083
+ * THE PROP A RENAME WRITES, by the layer (0.105.0; owner ruling R11, Victor
1084
+ * Mau, 2026-10-09: Rename works on top-level sections in both editors). The
1085
+ * write side of `rowName`: handed a node, the level it is named at and
1086
+ * `base` — what the screen's own rule answered (lib/document/slot-child-name
1087
+ * `slotChildRenameProp` for a block, `sectionRenameProp` for a section) — it
1088
+ * answers the prop the Layers row's rename box writes, or null for a node
1089
+ * that has no name of its own, which takes Rename out of its menu. Answer the
1090
+ * prop `rowName` reads, so a renamed row says its new name: the campaign
1091
+ * designer's sections are named by their `label` ("Section name"). Asked of
1092
+ * every node the menu opens on, a pinned node and a section group's too.
1093
+ * Absent: the screen's rule — a block's declared name, and a section's
1094
+ * `name`, which its row reads.
1095
+ */
1096
+ renamePropOf?: (node: ScreenNode, level: ScreenNodeLevel, base: string | null) => string | null;
1097
+ /**
1098
+ * The quieter words a node row draws after its name (`TreeRow`'s
1099
+ * `preview`): a node's own first words, so a tree of rows all called
1100
+ * "Section" can be told apart by eye. The layer chooses and shortens them;
1101
+ * nothing (null, undefined, "") draws nothing. Absent: no row has any.
1102
+ */
1103
+ rowPreview?: (node: ScreenNode) => string | null | undefined;
1104
+ /**
1105
+ * The small marks a node row draws right after its name (`TreeRow`'s
1106
+ * `marks`): a state the row only SHOWS, such as "Shown on phones only".
1107
+ * Absent, or nothing handed back: no marks.
1108
+ */
1109
+ rowMarks?: (node: ScreenNode) => ReadonlyArray<TreeRowMark> | null | undefined;
1110
+ /**
1111
+ * The layer's own buttons on a node row, by the node and where it sits:
1112
+ * `TreeRowAction`s (efficient-easel/tree), placed between the screen's trash
1113
+ * and its eye — the campaign designer's phone switch. Asked of every node
1114
+ * row, a locked one and a pinned one too, so the layer decides; what comes
1115
+ * back is placed as it is, and nothing draws nothing. A button that writes
1116
+ * renders a component of the layer's that reaches the document itself.
1117
+ * Absent: the screen's two, as it drew them.
1118
+ */
1119
+ rowActions?: (node: ScreenNode, zone: string, index: number) => ReactNode;
1120
+ }
1121
+ /**
1122
+ * THE DEVICES the canvas can be looked at on. That the top bar has a switch,
1123
+ * and that the canvas is fitted to the pane and framed, is the screen's: any
1124
+ * editor's canvas is looked at on more than one. WHICH devices there are, what
1125
+ * each is called and how wide it is drawn is the layer's — a website has three
1126
+ * view tiers where an email has two.
1127
+ *
1128
+ * The same object for the life of a mount: the screen reads the device it
1129
+ * starts on from it once, and draws the switch from it on every render.
1130
+ */
1131
+ interface ScreenDevices {
1132
+ /** What the switch offers, in the order it draws them: an id, a name and a
1133
+ * glyph each (efficient-easel/chrome `DeviceSwitch`). */
1134
+ options: ReadonlyArray<DeviceOption>;
1135
+ /** The device a mount starts on. */
1136
+ initial: string;
1137
+ /**
1138
+ * The ONE device with no width of its own: the canvas draws it at the
1139
+ * pane's width, so it reflows as the pane is dragged, where every other is
1140
+ * a fixed width scaled to fit the pane. Its frame is the plain one; every
1141
+ * other device's wears a class named for its id.
1142
+ */
1143
+ fluid: string;
1144
+ /** The width each device is drawn at, in CSS px, by id. For `fluid` it is
1145
+ * only the width of the frame before the pane has been measured. */
1146
+ widths: Readonly<Record<string, number>>;
1147
+ /**
1148
+ * How a fixed device is fitted to the pane (0.105.0). `"fill"`: scaled to
1149
+ * the pane's width, up to twice its size, so a phone reads big and clear in
1150
+ * a wide pane — the website's view tiers. `"shrink"`: scaled DOWN when the
1151
+ * pane is narrower than the device and never up, so a device is drawn at its
1152
+ * real size or smaller — the campaign designer's phone, a mail preview of
1153
+ * the width the recipient's phone has. The fluid device is drawn at the
1154
+ * pane's width either way. Absent: `"fill"`.
1155
+ */
1156
+ fit?: "fill" | "shrink";
1157
+ }
1158
+ /**
1159
+ * WHAT A DRAG ON THE PAGE SCREEN CARRIES (0.105.0): a node of the document —
1160
+ * its id, the list it sits in (a zone key, `<parentId>:<slot>`), its index
1161
+ * there and its type — or, with `add`, a NEW one from the Add panel, which
1162
+ * has no place yet. One kind of thing for the ONE drag the Layers tree, the
1163
+ * canvas and the Add panel share, so a block picked up on one lands on
1164
+ * another. A layer's own canvas sources (`ScreenCanvasDrag.model`) carry it
1165
+ * too; a thing of the layer's that is not a node (the campaign designer's
1166
+ * column) is told apart by a `zone` and a `type` of the layer's own — a list
1167
+ * the document has none of, so the screen's writes find no node there and
1168
+ * do nothing, and the Layers tree, which draws no gap in it, takes none. A
1169
+ * layer that offers one answers for it on the canvas (`canDrop`, `drop`,
1170
+ * `pick`).
1171
+ */
1172
+ interface ScreenDragItem {
1173
+ id: string;
1174
+ zone: string;
1175
+ index: number;
1176
+ type: string;
1177
+ add?: AddKey;
1178
+ /** A slot the Layers tree draws as a row of its own (`slotsOf`, a rung),
1179
+ * picked up by its row: `index` is its place in its node's run of rungs. */
1180
+ rung?: {
1181
+ nodeId: string;
1182
+ slot: string;
1183
+ };
1184
+ /** A file carried out of the host's media popup (`ScreenCanvasDrag.media`):
1185
+ * `add` is what it becomes between things, and a drop on a thing that
1186
+ * takes it puts it there instead. */
1187
+ media?: true;
1188
+ }
1189
+ /** A file from the host's media library, dropped on the canvas (harness
1190
+ * UI-20, 2026-10-23), as the host's pick path gave it back (`MediaPlace`):
1191
+ * `url` is what draws. */
1192
+ interface ScreenMediaFile {
1193
+ id: string;
1194
+ url: string;
1195
+ kind: "image" | "video";
1196
+ name: string;
1197
+ }
1198
+ /**
1199
+ * A FILE FROM THE MEDIA POPUP, DROPPED ON THE CANVAS (`ScreenCanvasDrag.media`,
1200
+ * harness UI-20, owner decision Lewis 2026-10-23). The drag is the screen's:
1201
+ * it hears a file carried out of the host's popup, offers the places a new
1202
+ * picture may go — the lines Add's tiles get — and outlines a thing the file
1203
+ * may land ON. What a picture IS in this document is the layer's; what the
1204
+ * file becomes in the host first is the host's (`MediaPanelProvider` `place`,
1205
+ * its pick path: a website copies in a file another website holds).
1206
+ */
1207
+ interface ScreenMediaDrop {
1208
+ /** What a file dropped BETWEEN things becomes: Add's entry for the layer's
1209
+ * picture block, offered at exactly the places Add would offer it. */
1210
+ adds: {
1211
+ kind: "section" | "block";
1212
+ type: string;
1213
+ };
1214
+ /** May a file land ON this node, its picture replaced by it? */
1215
+ takes: (node: ScreenNode) => boolean;
1216
+ /** The node's props with the file as its picture. */
1217
+ replace: (node: ScreenNode, file: ScreenMediaFile) => Record<string, unknown>;
1218
+ /** A new node of `adds` holding the file, for a drop between things, made
1219
+ * with what the screen lends a rule that builds a node (its defaults, its
1220
+ * ids). */
1221
+ create: (file: ScreenMediaFile, maker: ScreenNodeMaker) => ScreenNode;
1222
+ }
1223
+ /**
1224
+ * What the screen tells a layer's canvas drag each time it asks
1225
+ * (`ScreenCanvasDrag`, 0.105.0). Its rules are plain functions, the same for
1226
+ * the life of the mount like the block rules, so what they reason about is
1227
+ * handed to them: the document as it stands, the device the canvas is drawn
1228
+ * as, and — for a drop or a pick that does what the screen's own would not —
1229
+ * the screen's writes and its inspector.
1230
+ */
1231
+ interface ScreenCanvasDragContext {
1232
+ /** The working document (`{ root, content, zones }`), as the store holds it
1233
+ * now: what the measure and the model are of. */
1234
+ data: unknown;
1235
+ /** The device the canvas is drawn as, one of the layer's own
1236
+ * (`ScreenDevices.options`): a phone may stack what a desktop lays across. */
1237
+ device: string;
1238
+ /** The screen's writes (`ScreenDocumentOps`, refused while somebody else
1239
+ * holds the document), for a drop of the layer's own. */
1240
+ ops: ScreenDocumentOps;
1241
+ /** The inspector, for a drop or a pick that opens a panel of the layer's
1242
+ * own on what it moved or named (a column's). */
1243
+ inspector: ScreenInspector;
1244
+ }
1245
+ /**
1246
+ * THE CANVAS DRAG, AS A LAYER HAS IT (`ScreenParts.canvasDrag`, 0.105.0).
1247
+ * That there is a drag on the canvas — the handle on the smallest box under
1248
+ * the pointer, the one drop line, the catch surface, the session it shares
1249
+ * with the Layers tree and the Add panel — is the screen's
1250
+ * (efficient-easel/drag `CanvasDragLayer`). How the canvas is MEASURED, what
1251
+ * may be picked up on it and what may land where on it may be the layer's: an
1252
+ * email lays its sections out in columns, measured from cells of its own, and
1253
+ * a column is grabbed by a strip down its edge that is the column's and not its
1254
+ * blocks'.
1255
+ *
1256
+ * Each member is optional and falls back on the screen's own; each is handed
1257
+ * the screen's own answer (`base`) as well, so a layer may add to it, narrow it
1258
+ * or answer only for what is its own and leave the rest to the screen. They
1259
+ * answer for the canvas only: a drop on the Layers tree is the tree's rules',
1260
+ * whatever surface the thing was picked up on.
1261
+ *
1262
+ * Plain functions, the same object for the life of the mount, like the block
1263
+ * rules; what they reason about is handed to them (`ScreenCanvasDragContext`).
1264
+ */
1265
+ interface ScreenCanvasDrag {
1266
+ /** How the canvas is measured into boxes, in the coordinates of `layer`
1267
+ * (the element the drag layer draws in). Absent: the old library's markers, the slots
1268
+ * and the blocks directly in them (efficient-easel/drag `measureCanvas`). */
1269
+ measure?: (canvas: CanvasTarget, layer: Element, context: ScreenCanvasDragContext) => MeasuredCanvas;
1270
+ /**
1271
+ * What may be picked up on what was measured, and which lists take drops,
1272
+ * handed the screen's own model of it (`base`: every node but the pinned
1273
+ * ones — asked through `isPinnedFirst` / `isPinnedLast` — a locked block, a
1274
+ * group of sections, and a section with nothing to trade places with). It
1275
+ * is asked of an EMPTY measure too, before the frame is first measured.
1276
+ * Absent: `base`.
1277
+ */
1278
+ model?: (measured: MeasuredCanvas, base: CanvasDragModel<ScreenDragItem>, context: ScreenCanvasDragContext) => CanvasDragModel<ScreenDragItem>;
1279
+ /** May the thing in hand land at `to` on the canvas? Handed the screen's
1280
+ * own rule (`base`, the Layers tree's). Absent: `base`. */
1281
+ canDrop?: (item: ScreenDragItem, to: Place, base: (item: ScreenDragItem, to: Place) => boolean, context: ScreenCanvasDragContext) => boolean;
1282
+ /** Land it, at a place `canDrop` said yes to. Handed the screen's own write
1283
+ * (`base`, the tree's: a section moved, a block moved, a new one added).
1284
+ * Absent: `base`. */
1285
+ drop?: (item: ScreenDragItem, to: Place, base: (item: ScreenDragItem, to: Place) => void, context: ScreenCanvasDragContext) => void;
1286
+ /** A handle CLICKED, not dragged: select what it names. Handed the screen's
1287
+ * own (`base`: the node, as a press on its row selects it). Absent: `base`. */
1288
+ pick?: (item: ScreenDragItem, base: (item: ScreenDragItem) => void, context: ScreenCanvasDragContext) => void;
1289
+ /** A file carried out of the host's media popup lands on the canvas
1290
+ * (`ScreenMediaDrop`). Absent: the canvas takes no such file. */
1291
+ media?: ScreenMediaDrop;
1292
+ }
1293
+ /** What a layer's head over the canvas is handed (`ScreenParts.CanvasHead`,
1294
+ * 0.105.0): the device the canvas is drawn as, so it can say what is the
1295
+ * device's (the campaign designer's mail-app switch is desktop's only). */
1296
+ interface ScreenCanvasHeadProps {
1297
+ device: string;
1298
+ }
1299
+ /**
1300
+ * WHAT IS PINNED in the document's top-level list. That the list has a BAND
1301
+ * its sections keep to — one node pinned ahead of it at most, and one behind —
1302
+ * is the screen's: where a new section lands, where a dragged one may be put
1303
+ * down, which nodes the canvas offers a handle on and what the menu withholds
1304
+ * are all read off that band, and the arithmetic of it is written once, in the
1305
+ * screen. WHICH types are pinned is the layer's: a website pins its Header
1306
+ * first and its Footer last, where an email pins nothing.
1307
+ *
1308
+ * And the layer's GROUPS OF SECTIONS, if it has them: a pinned top-level node
1309
+ * whose one list holds ordinary sections, which move among the groups' lists
1310
+ * and nowhere else. The screen draws a group's row and keeps its sections to
1311
+ * those lists; which types are groups, and what a group's list is keyed by,
1312
+ * it asks.
1313
+ *
1314
+ * And THE PANEL A PINNED NODE IS EDITED IN, where that is not the selection's
1315
+ * own: a node the layer pins may carry no fields, the layer keeping its
1316
+ * settings and showing them in a panel of the layer's. Which node, and which
1317
+ * panel, is the layer's to say; the screen asks by type where a node is
1318
+ * selected and where a pinned node's row is pressed, and shows what it is
1319
+ * handed.
1320
+ *
1321
+ * And HOW THE LAYERS TREE FRAMES THEM (0.103.0): which node is pinned where it
1322
+ * is not one type (`isFirst`, `isLast` — the campaign designer's Header and
1323
+ * Footer are both sections, told apart by a prop), how the first one's row is
1324
+ * drawn (`firstRow`) and what the band of sections between them looks like
1325
+ * (`band`). Each is optional, and its default is the tree the website has.
1326
+ *
1327
+ * The same object for the life of a mount, its functions plain functions of
1328
+ * what they are passed: the screen reads it anywhere, inside the callbacks and
1329
+ * effects it does not rebuild for it.
1330
+ */
1331
+ interface ScreenPinnedNodes {
1332
+ /** The type of the node pinned FIRST: the band starts after it. Null when
1333
+ * the layer pins none. */
1334
+ first: string | null;
1335
+ /** The type of the node pinned LAST: the band ends at it. */
1336
+ last: string | null;
1337
+ /**
1338
+ * Is this top-level node the one pinned first (0.103.0)? Where every node
1339
+ * of the pinned type is not pinned — the campaign designer's Header is an
1340
+ * `EmailSection` with `_region: "header"`, beside body sections of the same
1341
+ * type — the layer says which. The page screen asks it wherever it tested
1342
+ * a node against `first`: the band, the tree, the canvas handles, the menu.
1343
+ * (The section screen, which holds one node, still asks the type.) The
1344
+ * first node that answers yes is the one. Absent: a node of type `first`.
1345
+ */
1346
+ isFirst?: (node: ScreenNode) => boolean;
1347
+ /** …and the one pinned last (the Footer). Absent: a node of type `last`. */
1348
+ isLast?: (node: ScreenNode) => boolean;
1349
+ /**
1350
+ * May a block cross into and out of the node pinned LAST (0.106.0) — dragged
1351
+ * in the Layers tree or on the canvas, or pasted? Absent or false, the
1352
+ * website's Footer: its blocks reorder within their own slot and nothing
1353
+ * from the page's sections lands in it, nor leaves it. True, the campaign
1354
+ * designer's Footer, a section whose columns hold any block: its slots are
1355
+ * lists like every other's, asked what they take (the slot's own list, the
1356
+ * depth, never into itself). The node itself stays pinned either way.
1357
+ */
1358
+ lastIsOpen?: boolean;
1359
+ /**
1360
+ * How the Layers tree draws the node pinned first (0.103.0). `"panel"`: a
1361
+ * row of its own that opens the layer's panel for it (`panelOf`), drawn
1362
+ * whether or not the document holds the node, and none of its children —
1363
+ * the website's Header, whose settings are a panel. `"node"`: the node
1364
+ * itself, selected by its row and folding open into its children, exactly
1365
+ * as the node pinned last is drawn — the campaign designer's Header, a
1366
+ * section with blocks in it. Absent: `"panel"`.
1367
+ */
1368
+ firstRow?: "panel" | "node";
1369
+ /** What the band of sections between the two pins looks like in the tree
1370
+ * (0.103.0). Absent: a group label in the screen's words, the sections at
1371
+ * the tree's own depth, and no row after them. */
1372
+ band?: ScreenPinnedBand;
1373
+ /**
1374
+ * HEADER AND FOOTER EDITED IN PLACE (8.2.0, owner 2026-10-15). The words of
1375
+ * the canvas TAB on a pinned node — "Header · on every page" — or null for
1376
+ * a node that has none. Asked of each node pinned first or last and of each
1377
+ * group of sections. The screen draws the tab on the band's top edge while
1378
+ * the pointer is anywhere in it or anything in it is selected, at its true
1379
+ * size whatever the device is scaled by, kept inside the canvas when the
1380
+ * band starts above it; a click on the tab selects the band. Handing it
1381
+ * also makes a group of sections NO STEP of the canvas's click-through
1382
+ * chain: a click inside walks from the group's sections in, as on the page.
1383
+ * Absent: no tab, and the click chain as it was.
1384
+ */
1385
+ groupTab?: (node: ScreenNode) => string | null;
1386
+ /**
1387
+ * …the badge on the Layers row of each pinned node and group ("Every
1388
+ * page"). Handing it draws the in-place tree: the header and footer are
1389
+ * their own rows, with no "Header" / "Footer" group labels over them, and
1390
+ * no row that opens the footer somewhere else. Hidden while the left panel
1391
+ * is narrower than 240px, where the name needs the room. Absent: the tree
1392
+ * as it was.
1393
+ */
1394
+ groupBadge?: string;
1395
+ /**
1396
+ * SHARED, AND HOW FAR (Shared section design v4, Lewis 2026-10-21): how far
1397
+ * a top-level node reaches when many pages use it live — "On every page",
1398
+ * "On 3 pages" — or null for a node that is this page's own. Asked of each
1399
+ * top-level node, the header and footer and their groups included. For a
1400
+ * node it answers, the screen draws ONE look, green with the shell's
1401
+ * `shared` mark, colour never alone:
1402
+ * · its Layers row in the shell's shared tone, the mark at the row's end
1403
+ * and these words in the mark's Tooltip — in place of `groupBadge`;
1404
+ * · its canvas tab, while it or anything in it is selected or under the
1405
+ * pointer: the green badge with the mark and the row's name, these words
1406
+ * in the tab's Tooltip — in place of `groupTab`'s words;
1407
+ * · its selected and hover outline on the canvas in green
1408
+ * (`CanvasSharedContext`).
1409
+ * `groupTab` and `groupBadge` still say what they switch (the in-place tree,
1410
+ * the click chain). Absent: nothing is shared, and the screen is as it was.
1411
+ */
1412
+ sharedReach?: (node: ScreenNode) => string | null;
1413
+ /**
1414
+ * …and the DOCUMENT'S HALF of a shared section (Shared section design v4,
1415
+ * Lewis 2026-10-21): the layer holds which top-level nodes are shared
1416
+ * sections, and how a page's document stores them (a reference in its top
1417
+ * level, the section in a document of its own). The screen draws the rows
1418
+ * and asks the store (lib/shared-sections); what changes in the document is
1419
+ * asked here. Handed with a store (`SessionBackend.sharedSections`), the
1420
+ * screen offers:
1421
+ * · a page's own section's menu: Make shared — a name asked in a dialog,
1422
+ * the store makes the shared section, `adopt` takes the node in;
1423
+ * · a shared section's menu: On N pages ▸ (`usedOn`, a press `openPage`),
1424
+ * Detach from shared (`detach`), and Remove from this page in place of
1425
+ * Delete, its Layers trash saying so too;
1426
+ * · Add's "Shared sections" group above "Your templates": a card puts
1427
+ * `nodeOf` on the page (a reference, never a copy), and the card's menu
1428
+ * deletes the shared section (`removed`).
1429
+ * Absent: none of these. The header and footer are shared (`sharedReach`)
1430
+ * but answer `usedOn` with null: they keep the menu they have.
1431
+ */
1432
+ shared?: ScreenSharedSections;
1433
+ /**
1434
+ * …what the screen says ONCE per editing session (the easel session), the
1435
+ * first time an edit changes a pinned node or a group of sections: the
1436
+ * shell's toast, with Undo ("Changed on every page"). A seed, a load or an
1437
+ * undo says nothing. Absent: nothing is said.
1438
+ */
1439
+ changeNotice?: string;
1440
+ /**
1441
+ * WHAT A GROUP OF SECTIONS TAKES (8.3.0): may a section of `sectionType` go
1442
+ * into a group of `groupType` that holds `countNow` sections BEFORE it goes
1443
+ * in? Asked of every way a section arrives in a group: a new one from Add (a
1444
+ * click on a tile, a drag of one, and which tiles Add shows), a section dragged
1445
+ * there from the other group, and a paste. A section moved within its own group
1446
+ * is not asked: nothing arrives. The website's header takes up to 3 light
1447
+ * sections and its footer up to 6. Absent: a group takes any section, as before.
1448
+ */
1449
+ groupAccepts?: (groupType: string, sectionType: string, countNow: number) => boolean;
1450
+ /** The type of the group of sections pinned first, ahead of everything. */
1451
+ firstGroup: string | null;
1452
+ /** …and of the one pinned last. */
1453
+ lastGroup: string | null;
1454
+ /** Is a node of this type a group of sections? */
1455
+ isSectionGroup: (type: string | undefined) => boolean;
1456
+ /** The key of the list a group keeps its sections in, by the group's id. */
1457
+ sectionGroupZone: (groupId: string) => string;
1458
+ /**
1459
+ * The panel of the layer's own that a node of this type is edited in, or
1460
+ * null: the node is edited by its own fields, in the selection's own panel
1461
+ * (`SELECTION_MODE`). What comes back is what the screen stores, so it is
1462
+ * the SAME object every time the same type is asked about. Asked with no
1463
+ * type where nothing is selected, and answered null.
1464
+ */
1465
+ panelOf: (type: string | null | undefined) => ScreenInspectorMode | null;
1466
+ }
1467
+ /**
1468
+ * THE BAND, AS THE LAYERS TREE FRAMES IT (`ScreenPinnedNodes.band`, 0.103.0):
1469
+ * the sections between the two pins. Where the band starts and ends is the
1470
+ * screen's arithmetic either way; this is only how it is drawn.
1471
+ */
1472
+ interface ScreenPinnedBand {
1473
+ /** What the band is called. Absent: the screen's words, `screen.pageSections`
1474
+ * ("Page") on a document with the edit guard and
1475
+ * `screen.templateSections` ("Template") on one without. */
1476
+ label?: string;
1477
+ /** The band is a ROW that folds, its sections under it — the campaign
1478
+ * designer's Body. Absent or false: a group label over the sections, which
1479
+ * sit at the tree's own depth. */
1480
+ foldable?: boolean;
1481
+ }
1482
+ /** Is `node` the one the layer pins FIRST — its own test (`isFirst`), else a
1483
+ * node of the `first` type, the test the screen has always made. */
1484
+ declare function isPinnedFirst(pinned: ScreenPinnedNodes, node: ScreenNode): boolean;
1485
+ /** …and LAST (`isLast`, else a node of the `last` type). */
1486
+ declare function isPinnedLast(pinned: ScreenPinnedNodes, node: ScreenNode): boolean;
1487
+ /**
1488
+ * THE VIEW THE LEFT PANEL IS ON, from one mount to the next. That the panel
1489
+ * has views, that one of them is current and that the choice is kept is the
1490
+ * screen's: it holds the view in state and mirrors it from ONE effect, the
1491
+ * only writer. WHERE it is kept, which view a first mount opens on and what a
1492
+ * selection does to it are the layer's — a website opens on its page list,
1493
+ * and keeps the choice under a key of its own.
1494
+ *
1495
+ * The same object for the life of a mount: the screen seeds its state from
1496
+ * `read` once, and calls the other two from an effect and a callback it does
1497
+ * not rebuild for them.
1498
+ */
1499
+ interface ScreenLeftViewRules {
1500
+ /** The view a mount opens on: the one kept, or the layer's first. */
1501
+ read: () => string;
1502
+ /** Keep the view for the next mount. */
1503
+ write: (view: string) => void;
1504
+ /** What a change of the selection does to the view: handed the id of the
1505
+ * node selected, if one is, and the view the panel is on, it answers the
1506
+ * view to be on. */
1507
+ forSelection: (selectedId: string | null | undefined, current: string) => string;
1508
+ }
1509
+ /** What a style clipboard's scope is read off (`ScreenStyleClipboard.scope`):
1510
+ * the document the screen has open. */
1511
+ interface ScreenStyleDocument {
1512
+ /** What the screen is pointed at: a website's page, or a host's own
1513
+ * document (`{ kind: "document", record }`). */
1514
+ target: AnyScreenTarget;
1515
+ /** The website the page belongs to, or null. */
1516
+ siteId: string | null;
1517
+ /** The backend's id of the loaded document, or null while it loads. */
1518
+ docId: string | null;
1519
+ }
1520
+ /** What a Paste style onto one node would do: its new props, whether they
1521
+ * changed, how many rows were pasted, and the words the merchant reads. */
1522
+ interface ScreenStylePastePlan {
1523
+ props: Record<string, unknown>;
1524
+ changed: boolean;
1525
+ pasted: number;
1526
+ message: string;
1527
+ }
1528
+ /**
1529
+ * COPY STYLE / PASTE STYLE, where it is the layer's (0.105.0, seam E10). The
1530
+ * clipboard, the matching rule, the menu rows, their words and the ⌥⌘C / ⌥⌘V
1531
+ * keys are efficient-easel/style-clipboard's and the screen's; WHICH rows of a
1532
+ * node are its look, and how far a copied look travels (its scope), are the
1533
+ * layer's — the website's look is its Style and Layout tabs and travels across
1534
+ * one site's pages, the campaign designer's is its own panels' and stays in
1535
+ * one campaign. Each member is optional, and one left out is the website's
1536
+ * (lib/document/style-clipboard): a layer may hand only its scope. Plain functions,
1537
+ * the same object for the life of the mount.
1538
+ */
1539
+ interface ScreenStyleClipboard {
1540
+ /** The clipboard's scope for the open document: in another scope nothing is
1541
+ * held. Absent: `siteStyleScope(siteId)`, one site across its pages. */
1542
+ scope?: (doc: ScreenStyleDocument) => string;
1543
+ /** A node's look, as rows the clipboard holds and matches. Absent: the
1544
+ * website's (`nodeStyleRows`), the Style and Layout tabs. */
1545
+ rows?: (config: unknown, node: ScreenNode) => StyleRow[];
1546
+ /** Copy a node's look into `scope`, named `label` (the menu's word for it).
1547
+ * Absent: its `rows`, copied as they are stored. */
1548
+ copy?: (scope: string, node: ScreenNode, label: string, config: unknown) => void;
1549
+ /** What a paste onto a node would do, or null when nothing is held in
1550
+ * `scope`. The screen writes `props` through its one replace op when
1551
+ * `changed`, and always shows `message`. Absent: the held look laid over the
1552
+ * node's `rows` (efficient-easel/style-clipboard `planPaste`). */
1553
+ plan?: (scope: string, node: ScreenNode, label: string, config: unknown) => ScreenStylePastePlan | null;
1554
+ }
1555
+ interface ScreenParts {
1556
+ /**
1557
+ * The name a panel's head gives what is being edited — the website's name,
1558
+ * a campaign's — as the hook the head calls, through `useScreenOwnerName`.
1559
+ */
1560
+ useOwnerName?: () => string;
1561
+ /**
1562
+ * The Layers head's context line — what the open document is, under the
1563
+ * word "Layers" — as the hook the head calls (0.103.0). The campaign
1564
+ * designer's names the campaign and its variant. Absent: the document's
1565
+ * address, `/${slug}`, as the website's head has always said it.
1566
+ */
1567
+ useDocumentLabel?: () => string;
1568
+ /**
1569
+ * The layer's wiring between the inspector and what the layer draws in the
1570
+ * canvas, as ONE hook the screen calls where it used to hold that wiring: a
1571
+ * click on the layer's furniture in the canvas opens its panel, and the open
1572
+ * panel outlines the furniture. And its wiring for the parts of one block
1573
+ * that are not nodes: what selecting one does, and the rows it has in the
1574
+ * tree. And its own controls in the top bar, with whatever they run on. And
1575
+ * its buttons in the rail, with the views of the left panel they open.
1576
+ */
1577
+ useBridges?: (inspector: ScreenInspector, tree: ScreenTree, canvas: ScreenCanvas, left: ScreenLeftPanel) => ScreenBridges;
1578
+ /**
1579
+ * The same, for the screen that holds ONE node as its whole document
1580
+ * (SectionScreenShell). A hook of its own and not `useBridges` with less
1581
+ * handed in: that screen wired less — no site-wide furniture, no tree of
1582
+ * sections — and a hook cannot leave out half of itself by what it is
1583
+ * passed.
1584
+ */
1585
+ useStandaloneBridges?: (inspector: ScreenInspector) => ScreenBridges;
1586
+ /**
1587
+ * The layer's own pass over a document as it opens: what it lays down in one
1588
+ * that lacks it, and takes out of one that holds it twice. A hook of its own
1589
+ * and not one more thing the bridges run, because of WHERE it must run: the
1590
+ * bridges stand early among the screen's hooks, and this pass writes the
1591
+ * document, so it is called LAST of the screen's own passes over it — after
1592
+ * the slot seeding and the duplicate-id heal, which address top-level nodes
1593
+ * by index and would be thrown out by a node laid down ahead of them. Lent
1594
+ * the screen's writes and the config it holds, for the engine's node maker.
1595
+ */
1596
+ useDocumentPass?: (ops: ScreenDocumentOps, config: unknown) => void;
1597
+ /**
1598
+ * The layer's block rules. Handed here and NOT registered at import: what a
1599
+ * registry holds depends on which modules have loaded, and that order is not
1600
+ * the same in the app and in a script that loads one file, so a rule could
1601
+ * answer in one and be absent in the other.
1602
+ */
1603
+ blockRules?: ScreenBlockRules;
1604
+ /** How the layer's blocks are named and drawn. Handed here for the reason
1605
+ * the rules are. */
1606
+ blockLook?: ScreenBlockLook;
1607
+ /** The devices the layer's canvas is looked at on. Data, and handed here
1608
+ * for the reason the rules are. */
1609
+ devices?: ScreenDevices;
1610
+ /** Where the left panel's view is kept, and which one a mount opens on.
1611
+ * Plain functions, and handed here for the reason the rules are. */
1612
+ leftView?: ScreenLeftViewRules;
1613
+ /** Which node types are pinned in the top-level list, which are groups of
1614
+ * sections, and which are edited in a panel of the layer's. Data and three
1615
+ * plain functions, and handed here for the reason the rules are. */
1616
+ pinned?: ScreenPinnedNodes;
1617
+ /**
1618
+ * May the operator pause the autosave (0.103.0)? Since 8.0.0 the switch is
1619
+ * the save menu's Auto-save check box (the main button's ▾), where it was
1620
+ * the save pill; a layer whose editor always saves says false, and the menu
1621
+ * offers Save now alone. "Retry now" stays after a failed save either way.
1622
+ * Absent, true: the switch, as both editors have it.
1623
+ */
1624
+ saveSwitch?: boolean;
1625
+ /**
1626
+ * Does a field's media pick give way to a change of selection (0.103.0)? A
1627
+ * field of the selected block asks the host's panel to choose (lib/
1628
+ * media-panel); with true, selecting another block, or none, while it waits
1629
+ * leaves pick mode and settles the field with null, as Cancel would — the
1630
+ * campaign designer's picker belongs to the block it was opened for. Absent,
1631
+ * false: a pick outlives a change of selection, as the website's does.
1632
+ */
1633
+ pickFollowsSelection?: boolean;
1634
+ /**
1635
+ * WHERE A PERSON'S PANEL WIDTHS AND TREE FOLDS ARE KEPT (0.106.0): the
1636
+ * first part of the two `localStorage` keys, `<namespace>-panel-widths` and
1637
+ * `<namespace>-collapsed-sections`, so an editor beside the website's keeps
1638
+ * its own — the campaign designer's panels and folds are not the website
1639
+ * editor's. Read once, as the screen mounts. Absent (or empty): the website
1640
+ * editor's keys, `sf-editor-panel-widths` and
1641
+ * `sf-editor-collapsed-sections`, so a website's layout is what it was.
1642
+ */
1643
+ storageNamespace?: string;
1644
+ /** Copy style / Paste style's scope and a node's look, where they are the
1645
+ * layer's (0.105.0; `ScreenStyleClipboard`). Absent: the website's. */
1646
+ styleClipboard?: ScreenStyleClipboard;
1647
+ /**
1648
+ * Do ⌘C / ⌘X / ⌘V (Ctrl on Windows) copy, cut and paste the SELECTED block
1649
+ * (0.105.0)? The keyboard door to the menu's Copy, Cut and Paste rows, which
1650
+ * print these keys beside them: the menu's rules, the menu's place for a
1651
+ * paste, and a paste with nowhere to go there refused aloud
1652
+ * (`screen.pasteRefused`). Heard on the editor and in the canvas frame, never
1653
+ * where a person types or has words selected, nor with ⌥ (Copy style) or ⇧
1654
+ * held. Nothing is cut or pasted on a document this editor cannot write; a
1655
+ * copy is allowed there.
1656
+ *
1657
+ * Owner ruling R12/R13 (Victor Mau, 2026-10-09): Copy and Paste work the same
1658
+ * way in both editors. So the keys are on unless the layer says false.
1659
+ */
1660
+ nodeKeys?: boolean;
1661
+ /**
1662
+ * THE HOST'S OWN TOASTS (0.105.0; owner ruling R17, Victor Mau, 2026-10-09).
1663
+ * Every line the screen would say in its toast — "Copied Text", "Added
1664
+ * “Hero” section", a refused paste, a pasted style, what a panel of the
1665
+ * layer's or the inspector says through the screen's toast — goes to the host
1666
+ * instead, with its tone: `"error"` for what went wrong, `"info"` for the
1667
+ * rest; and the screen draws no toast of its own. The campaign designer
1668
+ * hands the admin portal's toast, so the designer's lines stand where every
1669
+ * other window's do. Called as each line is said, so it may change between
1670
+ * renders. Absent: the shell's `toast` (efficient-shell/ui, harness UI-24;
1671
+ * up to 0.106.0 the screen drew a toast of its own, `.sf-toast`).
1672
+ */
1673
+ notify?: (message: string, tone: "info" | "error", extra?: ScreenToastExtra) => void;
1674
+ /**
1675
+ * THE CANVAS the screen frames: the engine's, as the layer dresses it — the
1676
+ * layer's own sheet and theme in the frame, its own say over the outline
1677
+ * round a block. The screen places it in the pane it has measured, hands it
1678
+ * nothing, and remounts it by key to rebuild the frame; where the frame
1679
+ * stands, how it is fitted and what is laid over it are the screen's.
1680
+ *
1681
+ * ONE function for the life of a mount: the screen renders it as an element
1682
+ * type, and a type that changed identity would remount the whole canvas.
1683
+ *
1684
+ * The frame it draws is published to it, and to the head over it
1685
+ * (`CanvasHead`), as the screen found it: `useScreenCanvasTarget()`.
1686
+ */
1687
+ Canvas?: ComponentType;
1688
+ /**
1689
+ * A HEAD OVER THE CANVAS (0.105.0): the layer's own row above the frame, in
1690
+ * the canvas's well and at its own size — never scaled with a device — such
1691
+ * as the campaign designer's Subject line, its mail-app switch and its dark
1692
+ * mail app's bar, which sit above the email the way an inbox shows them. The
1693
+ * frame fills what is left of the well under it, and is fitted to that. It is
1694
+ * handed the device the canvas is drawn as. Absent: nothing is drawn above
1695
+ * the frame, and the frame fills the well.
1696
+ *
1697
+ * ONE function for the life of a mount, for the reason `Canvas` is.
1698
+ */
1699
+ CanvasHead?: ComponentType<ScreenCanvasHeadProps>;
1700
+ /**
1701
+ * The canvas drag's measure, model and rules, where they are the layer's
1702
+ * (0.105.0; `ScreenCanvasDrag`). Each member absent, and the whole object
1703
+ * absent, is the screen's own: the old library's markers, every node but the pinned
1704
+ * ones, the Layers tree's rules. Plain functions, and handed here for the
1705
+ * reason the rules are.
1706
+ */
1707
+ canvasDrag?: ScreenCanvasDrag;
1708
+ /**
1709
+ * THE INSPECTOR the screen mounts in its right panel: the panel of whatever
1710
+ * is selected and, in its place, each panel of the layer's own — frame, head
1711
+ * and body, since the screen draws nothing round it. The screen holds WHICH
1712
+ * panel is showing and hands it over (`mode`), with the ways out of a panel
1713
+ * and its own toast and Hide button; what a mode draws is the layer's.
1714
+ *
1715
+ * ONE function for the life of a mount: the screen renders it as an element
1716
+ * type, and a type that changed identity would remount the panel and drop
1717
+ * what a merchant has open in it.
1718
+ */
1719
+ Inspector?: ComponentType<ScreenInspectorPanelProps>;
1720
+ }
1721
+ declare function ScreenPartsProvider({ parts, children }: {
1722
+ parts: ScreenParts;
1723
+ children?: ReactNode;
1724
+ }): react.JSX.Element;
1725
+ /** The layer's parts; none when the screen stands by itself. */
1726
+ declare function useScreenParts(): ScreenParts;
1727
+ /** The layer's bridges, run in the screen. With no layer, nothing runs. */
1728
+ /** The name a panel's head gives what is being edited (`useOwnerName`). */
1729
+ declare function useScreenOwnerName(): string;
1730
+ /** The Layers head's context line (`useDocumentLabel`), or null with no
1731
+ * layer's, and the screen says the document's address. */
1732
+ declare function useScreenDocumentLabel(): string | null;
1733
+ declare function useScreenBridges(inspector: ScreenInspector, tree: ScreenTree, canvas: ScreenCanvas, left: ScreenLeftPanel): ScreenBridges;
1734
+ /** The layer's bridges for the screen that holds one node by itself. With no
1735
+ * layer, nothing runs. */
1736
+ declare function useStandaloneScreenBridges(inspector: ScreenInspector): ScreenBridges;
1737
+ /** The layer's pass over a document as it opens, run in the screen. With no
1738
+ * layer, nothing runs. */
1739
+ declare function useScreenDocumentPass(ops: ScreenDocumentOps, config: unknown): void;
1740
+ /** The layer's block rules. With no layer, the rules of an editor that has no
1741
+ * blocks of its own. */
1742
+ declare function useScreenBlockRules(): ScreenBlockRules;
1743
+ /** How the layer's blocks are named and drawn. With no layer, by what the
1744
+ * config says of them and with no drawing. */
1745
+ declare function useScreenBlockLook(): ScreenBlockLook;
1746
+ /** The devices the layer's canvas is looked at on. With no layer, the one that
1747
+ * fills the pane. */
1748
+ declare function useScreenDevices(): ScreenDevices;
1749
+ /** Where the layer keeps the left panel's view. With no layer, nowhere: every
1750
+ * mount opens on the Layers tree. */
1751
+ declare function useScreenLeftView(): ScreenLeftViewRules;
1752
+ /** Which node types the layer pins in the top-level list, and which are its
1753
+ * groups of sections. With no layer, none. */
1754
+ declare function useScreenPinned(): ScreenPinnedNodes;
1755
+ /** Whether the save pill is the autosave's switch. With no layer, it is, as
1756
+ * the screen has always drawn it. */
1757
+ declare function useScreenSaveSwitch(): boolean;
1758
+ /** Leave a field's pick when `selection` changes, if the layer says a pick
1759
+ * follows the selection (`pickFollowsSelection`). With no layer, a pick
1760
+ * outlives a change of selection, as it always has. */
1761
+ declare function useScreenPickFollowsSelection(selection: unknown): void;
1762
+ /** Where widths and folds are kept (`storageNamespace`), or undefined: the
1763
+ * website editor's keys. */
1764
+ declare function useScreenStorageNamespace(): string | undefined;
1765
+ /** The layer's style clipboard (`styleClipboard`), or null: the website's. */
1766
+ declare function useScreenStyleClipboard(): ScreenStyleClipboard | null;
1767
+ /** Whether ⌘C / ⌘X / ⌘V reach the selected block (`nodeKeys`). They do
1768
+ * unless the layer says not (owner ruling R12/R13). */
1769
+ declare function useScreenNodeKeys(): boolean;
1770
+ /** The host's toast (`notify`), or null: with none, the screen says its lines
1771
+ * in its own (R17). */
1772
+ declare function useScreenNotify(): ((message: string, tone: "info" | "error", extra?: ScreenToastExtra) => void) | null;
1773
+ /** The canvas the layer dresses for the screen to frame. With no layer, the
1774
+ * engine's plain one. */
1775
+ declare function useScreenCanvasFrame(): ComponentType;
1776
+ /** The layer's head over the canvas (`CanvasHead`), or null: with no layer's,
1777
+ * nothing is drawn above the frame. */
1778
+ declare function useScreenCanvasHead(): ComponentType<ScreenCanvasHeadProps> | null;
1779
+ /** The layer's canvas drag (`canvasDrag`), or null: with no layer's, every
1780
+ * answer is the screen's own. */
1781
+ declare function useScreenCanvasDrag(): ScreenCanvasDrag | null;
1782
+ /** Publishes the frame the page screen found. The screen's own: it stands round
1783
+ * the chrome, and adds nothing to the page. */
1784
+ declare function ScreenCanvasTargetProvider({ target, children }: {
1785
+ target: CanvasTarget | null;
1786
+ children?: ReactNode;
1787
+ }): react.JSX.Element;
1788
+ /** The canvas frame the page screen found: its frame, document and window, or
1789
+ * null while there is none — and always null outside the page screen (the
1790
+ * section screen watches for no frame). */
1791
+ declare function useScreenCanvasTarget(): CanvasTarget | null;
1792
+ /** The inspector the layer draws for the screen to mount. With no layer, the
1793
+ * engine's plain rows for the selection. */
1794
+ declare function useScreenInspectorPanel(): ComponentType<ScreenInspectorPanelProps>;
1795
+
1796
+ /**
1797
+ * A PALETTE ROW THAT IS A PRESET, NOT A BLOCK TYPE (GG ruling 2026-10-30,
1798
+ * owner item C36). The website's Contact / Locations section is offered as TWO
1799
+ * rows, "City pictures" and "City maps": each lays down its own arrangement of
1800
+ * ordinary blocks, and there is no block type behind either. So a row may be a
1801
+ * preset — its own key, label, group, blurb and cover — and pressing it lays
1802
+ * down what `insert` builds, in ONE insert, so one Undo takes it back (the way
1803
+ * a splittable section's press already lands: `newSectionNode`).
1804
+ *
1805
+ * The layer hands these in (`PaletteLook.presets`); the screen states none.
1806
+ * What the arrangement IS stays where the layer keeps arrangements (the
1807
+ * website: `SECTION_PRESETS`); this says only where the row sits and what it
1808
+ * is called.
1809
+ */
1810
+ interface PalettePreset {
1811
+ /** The row's own key, unique among presets. It names NO block type: a
1812
+ * preset whose key is a registered type is not offered (a type row and a
1813
+ * preset row would be one key with two meanings). The cover is the layer's
1814
+ * `Thumbnail`, asked with this key. */
1815
+ key: string;
1816
+ /** What the row is called. Also what the toast says when it is added. */
1817
+ label: string;
1818
+ /** The key of the category (`config.categories`) it is grouped under. A
1819
+ * category the config does not have, or does not offer, offers no preset. */
1820
+ cat: string;
1821
+ /** The block type in that category the row follows; absent, or not in the
1822
+ * category, and the row closes its group. */
1823
+ after?: string;
1824
+ /** The one-line blurb, shown and searched. */
1825
+ desc?: string;
1826
+ /** More words it is found by, searched but never shown. */
1827
+ alias?: string;
1828
+ /** The node it lays down — one node, slot children inline, every id fresh
1829
+ * from `make.newNodeId` — or null, and nothing is added. Lent the same
1830
+ * four things `newSectionNode` is. */
1831
+ insert: (make: ScreenNodeMaker) => ScreenNewNode | null;
1832
+ }
1833
+ /** One offerable section, with the category it is grouped under. */
1834
+ type PaletteSection = {
1835
+ /** The block type — or, on a preset row, the preset's key (`preset`). */
1836
+ type: string;
1837
+ cat: string;
1838
+ name: string;
1839
+ desc: string;
1840
+ /**
1841
+ * The heading of the category this section sits under, resolved once at build
1842
+ * time — SEARCHED, and already SHOWN as the nav row this card sits beneath.
1843
+ *
1844
+ * ⚠️ IT IS HERE BECAUSE THE NAV AND THE SEARCH DISAGREED. Seven of the
1845
+ * thirteen category names returned NOTHING when typed: "Blog & journal" reads
1846
+ * 5 in the nav, and "blog" found 0, because not one of Issue Header, Featured
1847
+ * Cover, Article Text, Recurring Columns or Latest Posts carries the word. Same
1848
+ * for shop, about, promotions, navigation, legal and layout. A merchant reads
1849
+ * the word off the screen, types it, and is told no section matches.
1850
+ *
1851
+ * Resolved HERE, not in `matchesQuery`, because the label needs the `config`
1852
+ * (`categoryLabel`) and the matcher is given only a section — passing config
1853
+ * into the matcher would make every caller carry it.
1854
+ */
1855
+ catLabel: string;
1856
+ /**
1857
+ * Another word this section is known by, searched but never shown.
1858
+ *
1859
+ * ⚠️ THIS EXISTS FOR ONE NODE AND ONE REASON. `Flex` is offered here as
1860
+ * "Blank section" and is called "Box" everywhere it is nested — so a merchant
1861
+ * who met it in a Layers row, or in last week's handoff, types "box" and must
1862
+ * still find it. Without this they would find NOTHING: the card is pinned out
1863
+ * of its group, so a search that misses it misses it completely.
1864
+ */
1865
+ alias?: string;
1866
+ /** Set on a PRESET row only: the preset it lays down. Absent on every
1867
+ * type row, so a type row is the row it always was. */
1868
+ preset?: PalettePreset;
1869
+ };
1870
+ /**
1871
+ * What the layer says of its sections for the palette: the word for a type at
1872
+ * a level, a group's short heading where it has one, and the blurbs. The
1873
+ * screen's `blockLook` is one (lib/screen-parts); so is the website's own
1874
+ * (lib/document/add-palette).
1875
+ */
1876
+ interface PaletteLook {
1877
+ /** What a node of `type` is called at a level, given the label the config
1878
+ * holds for it. */
1879
+ labelAtLevel: (type: string, level: "section" | "block", base: string) => string;
1880
+ /** A group's short heading, by its key, where the layer has one; undefined,
1881
+ * and the config's own title is the heading. */
1882
+ categoryLabel: (id: string) => string | undefined;
1883
+ /** The one-line blurb for a section, by type. */
1884
+ descriptions: Record<string, string>;
1885
+ /** Rows that are presets, not block types (`PalettePreset`). Absent: every
1886
+ * row is a type, as before. */
1887
+ presets?: readonly PalettePreset[];
1888
+ }
1889
+ /**
1890
+ * Flatten `config.categories` into an ordered section list.
1891
+ *
1892
+ * Grouping and order ARE the category order in the config — which is the
1893
+ * catalog's order — so this adds no opinion of its own. A component listed in a
1894
+ * category but absent from `components` is skipped: a stale catalog row cannot
1895
+ * render and certainly cannot insert, so offering it would be a card that fails
1896
+ * on click.
1897
+ *
1898
+ * Child-only blocks (HeroSlide / CollectionCard / ProductRef) and the four
1899
+ * generic primitives (Heading / Text / ImageBlock / ButtonBlock) sit in NO
1900
+ * category on purpose, so they never appear here — they are added from their
1901
+ * parent's slot instead. See the note above `categories:` in lib/document/config.tsx.
1902
+ *
1903
+ * A category the config marks `visible: false` is NOT offered (0.105.0, seam
1904
+ * E9): it is a registry's way of keeping blocks it has out of the picker — the
1905
+ * campaign designer's Product parts, its retired blocks, its Sections — and a
1906
+ * palette that listed them would offer things that may not be put on a page.
1907
+ * The old library's own palette read the flag the same way. No website category carries
1908
+ * it, so the website's palette is the list it was.
1909
+ */
1910
+ declare function buildPaletteSections(config: Config, look: PaletteLook): PaletteSection[];
1911
+ /** A category's display label — the layer's short one where there is one, else the config's title. */
1912
+ declare function categoryLabel(config: Config, id: string, shortLabel: (id: string) => string | undefined): string;
1913
+ /**
1914
+ * Does a section match a search query?
1915
+ *
1916
+ * The query is matched against the NAME, any ALIAS, the blurb, the component
1917
+ * TYPE and the CATEGORY HEADING — the type because a merchant who knows the
1918
+ * section by the word they saw in a handoff should still find it, the alias
1919
+ * because one node is called something else everywhere it is nested (see
1920
+ * `PaletteSection.alias`), and the category because it is PRINTED IN THE NAV
1921
+ * BESIDE THE RESULTS: seven of thirteen headings used to match nothing at all
1922
+ * (see `PaletteSection.catLabel`). A word a merchant can read off this screen
1923
+ * must find what it is labelling.
1924
+ *
1925
+ * `q` is expected already lower-cased and trimmed; an empty query matches
1926
+ * everything.
1927
+ */
1928
+ declare function matchesQuery(s: PaletteSection, q: string): boolean;
1929
+ /** The pinned section, or `null` if the layer pins none or the config does not offer it. */
1930
+ declare function pinnedSection(sections: PaletteSection[], pinned: string | null): PaletteSection | null;
1931
+ /** Every OTHER section — what the grouped grid below the pinned card draws. */
1932
+ declare function paletteWithoutPinned(sections: PaletteSection[], pinned: string | null): PaletteSection[];
1933
+
1934
+ /** What a tile adds, parsed back out of its key. */
1935
+ type AddKey = {
1936
+ kind: "section";
1937
+ type: string;
1938
+ } | {
1939
+ kind: "template";
1940
+ template: SectionTemplate;
1941
+ } | {
1942
+ kind: "shared";
1943
+ section: SharedSection;
1944
+ }
1945
+ /** A row that is a preset, not a block type (the layer's `presets`): what
1946
+ * it lays down is its `insert`'s. */
1947
+ | {
1948
+ kind: "preset";
1949
+ preset: PalettePreset;
1950
+ } | {
1951
+ kind: "block";
1952
+ type: string;
1953
+ };
1954
+ declare const sectionKey: (type: string) => string;
1955
+ declare const blockKey: (type: string) => string;
1956
+ declare const templateKey: (id: string) => string;
1957
+ declare const sharedKey: (id: string) => string;
1958
+ declare const presetKey: (key: string) => string;
1959
+ type AddSidePanelProps<I> = {
1960
+ /** Where the next thing goes, when the panel was opened at a place. */
1961
+ at?: {
1962
+ label: string;
1963
+ onClear: () => void;
1964
+ };
1965
+ /** At a place in a list of blocks: the blocks that list takes. They are in
1966
+ * the one list whatever the catalogue holds, so a place can always be
1967
+ * filled from it. */
1968
+ placeBlocks?: readonly BlockChoice[];
1969
+ /** At a place: what a tile is called THERE, by type, where the place lays
1970
+ * down more than the type (a slot whose spec prepares its child,
1971
+ * `SlotSectionSpec.newChild`). A type not in it keeps its own word. */
1972
+ placeNames?: ReadonlyMap<string, string>;
1973
+ /** At a place: may what a tile names go there? Null when it may, else why
1974
+ * not, in the panel's words — the tile is then dimmed and says so. Absent
1975
+ * (no place): every tile is offered, to drag. */
1976
+ canTake?: (key: AddKey) => string | null;
1977
+ /** At a place: put what a pressed tile names there. Absent (no place): a
1978
+ * press adds nothing, and a tile is only dragged. */
1979
+ onPick?: (key: AddKey) => void;
1980
+ /** The drag item for what a tile names — a drag in the editor's session. */
1981
+ itemFor: (key: AddKey) => I;
1982
+ session: DragSession<I>;
1983
+ /** A row under the tiles for something that is not a block, drawn by the
1984
+ * layer that owns it (the website: the Live chat bubble). */
1985
+ siteWide?: ReactNode;
1986
+ /** Leave Add — back to the view underneath (the head's "Done"). */
1987
+ onClose: () => void;
1988
+ /** Hide the left panel (the head's last button, as on every panel). */
1989
+ onHide?: () => void;
1990
+ readOnly?: boolean;
1991
+ };
1992
+ declare function AddSidePanel<I>({ at, placeBlocks, placeNames, canTake, onPick, itemFor, session, siteWide, onClose, onHide, readOnly, }: AddSidePanelProps<I>): react.JSX.Element;
1993
+
1994
+ export { isSelectionMode as $, type ScreenNodeActions as A, type ScreenNodeAt as B, type CopyItemAction as C, type ScreenNodeLevel as D, type ScreenNodeMaker as E, type ScreenPartMode as F, type ScreenParts as G, ScreenPartsProvider as H, type ScreenPinnedBand as I, type ScreenPinnedNodes as J, type ScreenRailItem as K, type ScreenSelector as L, type ScreenSharedSections as M, type NodeDefaults as N, type ScreenSlot as O, type ScreenSlotAction as P, type ScreenSlotMode as Q, type ScreenStyleClipboard as R, SELECTION_MODE as S, type ScreenStyleDocument as T, type ScreenStylePastePlan as U, type ScreenToastExtra as V, type ScreenTree as W, type ScreenTreeFolds as X, type ScreenTreeRows as Y, isPinnedFirst as Z, isPinnedLast as _, type CopyItemRequest as a, isSlotMode as a0, sameInspectorMode as a1, screenSlotsOf as a2, shownChildSlotsOf as a3, shownSlotFieldsOf as a4, useScreenBlockLook as a5, useScreenBlockRules as a6, useScreenBridges as a7, useScreenCanvasDrag as a8, useScreenCanvasFrame as a9, matchesQuery as aA, paletteWithoutPinned as aB, pinnedSection as aC, type AddKey as aD, type AddSidePanelProps as aE, blockKey as aF, AddSidePanel as aG, presetKey as aH, sectionKey as aI, sharedKey as aJ, templateKey as aK, useScreenCanvasHead as aa, useScreenCanvasTarget as ab, useScreenDevices as ac, useScreenDocumentLabel as ad, useScreenDocumentPass as ae, useScreenInspectorPanel as af, useScreenLeftView as ag, useScreenNodeKeys as ah, useScreenNotify as ai, useScreenOwnerName as aj, useScreenParts as ak, useScreenPickFollowsSelection as al, useScreenPinned as am, useScreenSaveSwitch as an, useScreenStorageNamespace as ao, useScreenStyleClipboard as ap, useStandaloneScreenBridges as aq, type SlotSectionSpec as ar, type NodeDefaults$1 as as, type AddTarget as at, type AddTargetSource as au, type PaletteLook as av, type PalettePreset as aw, type PaletteSection as ax, buildPaletteSections as ay, categoryLabel as az, type ScreenBlockLook as b, type ScreenBlockRules as c, type ScreenBridges as d, type ScreenCanvas as e, type ScreenCanvasDrag as f, type ScreenCanvasDragContext as g, type ScreenCanvasHeadProps as h, ScreenCanvasTargetProvider as i, type ScreenDevices as j, type ScreenDocumentOps as k, type ScreenDragItem as l, type ScreenInspector as m, type ScreenInspectorMode as n, type ScreenInspectorPanelProps as o, type ScreenLeftPanel as p, type ScreenLeftView as q, type ScreenLeftViewFrame as r, type ScreenLeftViewRules as s, type ScreenMainAction as t, type ScreenMediaDrop as u, type ScreenMediaFile as v, type ScreenMenuItem as w, type ScreenMenuRows as x, type ScreenNewNode as y, type ScreenNode as z };