efficient-easel 0.101.1 → 0.103.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -0
- package/dist/LinkPicker-W2Rtxetz.d.ts +111 -0
- package/dist/autosave/index.d.ts +6 -3
- package/dist/autosave/index.js +1 -1
- package/dist/chrome/index.d.ts +3 -2
- package/dist/chrome/index.js +1 -25
- package/dist/chunk-26OOWIJJ.js +1 -0
- package/dist/chunk-2LK54I4E.js +1 -0
- package/dist/chunk-3M3A3DN2.js +4 -0
- package/dist/chunk-3QVB4AG2.js +3 -0
- package/dist/chunk-3WSPDAK2.js +1 -0
- package/dist/chunk-4ES5JGGX.js +1 -0
- package/dist/chunk-4MXFKJUY.js +1 -0
- package/dist/chunk-57DJOKXT.js +1 -0
- package/dist/chunk-5MZ3RNQQ.js +13 -0
- package/dist/chunk-5ZBY24K7.js +1 -0
- package/dist/chunk-66ICOE3I.js +8 -0
- package/dist/chunk-6DJHRLCU.js +25 -0
- package/dist/chunk-6FY3PZS3.js +1 -0
- package/dist/chunk-6TZTKAB5.js +1 -0
- package/dist/chunk-6UJ3Y6FC.js +1 -0
- package/dist/chunk-6W7WLPZH.js +1 -0
- package/dist/chunk-7F52SZOI.js +2 -0
- package/dist/chunk-7MU3RJ6S.js +1 -0
- package/dist/chunk-A7ZJII7O.js +1 -0
- package/dist/chunk-AJBJ74ME.js +1 -0
- package/dist/chunk-AKFJK65Z.js +1 -0
- package/dist/chunk-AKZWUV5Z.js +1 -0
- package/dist/chunk-BDTITTMW.js +1 -0
- package/dist/chunk-BSPCSC45.js +1 -0
- package/dist/chunk-BXZ6WLHC.js +22 -0
- package/dist/chunk-DUVRZ456.js +1 -0
- package/dist/chunk-F6CCTEIX.js +1 -0
- package/dist/chunk-FGNR22NY.js +1 -0
- package/dist/chunk-FUDHI5I4.js +1 -0
- package/dist/chunk-GENAF3P6.js +1 -0
- package/dist/chunk-GOTN2KY4.js +2 -0
- package/dist/chunk-GXN65JMA.js +1 -0
- package/dist/chunk-GXQCZJOP.js +1 -0
- package/dist/chunk-GZO72N3Q.js +0 -0
- package/dist/chunk-HDKTR5TZ.js +62 -0
- package/dist/chunk-HMX55DYT.js +1 -0
- package/dist/chunk-HQ4VVRIC.js +1 -0
- package/dist/chunk-HWW4XJOH.js +1 -0
- package/dist/chunk-I54UCYOU.js +1 -0
- package/dist/chunk-IQ5TA7AM.js +1 -0
- package/dist/chunk-IWAPPEL4.js +6 -0
- package/dist/chunk-IYT6NN2J.js +1 -0
- package/dist/chunk-KCBEE2MC.js +2 -0
- package/dist/chunk-KDYIMJTZ.js +1 -0
- package/dist/chunk-KQMML6JM.js +4 -0
- package/dist/chunk-LG436UTD.js +1 -0
- package/dist/chunk-MSBF7IW3.js +2 -0
- package/dist/chunk-NBJ2YY6Y.js +4 -0
- package/dist/chunk-OM67AJQC.js +1 -0
- package/dist/chunk-OORDMLL4.js +5 -0
- package/dist/chunk-OYX47SL7.js +1 -0
- package/dist/chunk-P67FP7PG.js +9 -0
- package/dist/chunk-PWZOS45R.js +2 -0
- package/dist/chunk-Q2HPBMG5.js +1 -0
- package/dist/chunk-Q3SQBNJB.js +1 -0
- package/dist/chunk-R2HLPNQF.js +1 -0
- package/dist/chunk-R5L2E7JX.js +1 -0
- package/dist/chunk-R5ZVNJLJ.js +2 -0
- package/dist/chunk-RLBXE4EU.js +1 -0
- package/dist/chunk-RW4XBUUW.js +1 -0
- package/dist/chunk-SERF2FAU.js +1 -0
- package/dist/chunk-TTJ54QGG.js +18 -0
- package/dist/chunk-VV5ADNBR.js +1 -0
- package/dist/chunk-YJXEHK6I.js +2 -0
- package/dist/chunk-Z3KBLIEH.js +10 -0
- package/dist/chunk-ZE7I3PLX.js +1 -0
- package/dist/chunk-ZWK3CBRU.js +1 -0
- package/dist/chunk-ZZ7VLIHQ.js +1 -0
- package/dist/drag/index.d.ts +3 -41
- package/dist/drag/index.js +1 -18
- package/dist/easel/index.js +1 -9
- package/dist/{words-BMzV04b1.d.ts → engine-DBxp_v6B.d.ts} +1 -58
- package/dist/fields/index.d.ts +2 -109
- package/dist/fields/index.js +1 -22
- package/dist/gold/index.d.ts +4 -2
- package/dist/host-DJ8Gzsx7.d.ts +552 -0
- package/dist/menu/index.js +1 -1
- package/dist/node-ops/index.js +1 -1
- package/dist/panelWidths-D9hTLR25.d.ts +66 -0
- package/dist/screen/components/AddBlockRow.d.ts +14 -0
- package/dist/screen/components/AddBlockRow.js +1 -0
- package/dist/screen/components/AddChildRow.d.ts +39 -0
- package/dist/screen/components/AddChildRow.js +1 -0
- package/dist/screen/components/AddSidePanel.d.ts +54 -0
- package/dist/screen/components/AddSidePanel.js +1 -0
- package/dist/screen/components/MediaSidePanel.d.ts +47 -0
- package/dist/screen/components/MediaSidePanel.js +1 -0
- package/dist/screen/components/NodeContextMenu.d.ts +364 -0
- package/dist/screen/components/NodeContextMenu.js +1 -0
- package/dist/screen/components/PageEditGuardNotices.d.ts +5 -0
- package/dist/screen/components/PageEditGuardNotices.js +1 -0
- package/dist/screen/components/PanelToggleIcon.d.ts +14 -0
- package/dist/screen/components/PanelToggleIcon.js +1 -0
- package/dist/screen/components/PreviewDeviceContext.d.ts +28 -0
- package/dist/screen/components/PreviewDeviceContext.js +1 -0
- package/dist/screen/components/PreviewPartsContext.d.ts +33 -0
- package/dist/screen/components/PreviewPartsContext.js +1 -0
- package/dist/screen/components/ScreenChrome.d.ts +5 -0
- package/dist/screen/components/ScreenChrome.js +1 -0
- package/dist/screen/components/ScreenDocumentContext.d.ts +20 -0
- package/dist/screen/components/ScreenDocumentContext.js +1 -0
- package/dist/screen/components/ScreenMount.d.ts +76 -0
- package/dist/screen/components/ScreenMount.js +1 -0
- package/dist/screen/components/ScreenStoreProvider.d.ts +63 -0
- package/dist/screen/components/ScreenStoreProvider.js +1 -0
- package/dist/screen/components/SectionScreenShell.d.ts +5 -0
- package/dist/screen/components/SectionScreenShell.js +16 -0
- package/dist/screen/components/SidePanelHead.d.ts +81 -0
- package/dist/screen/components/SidePanelHead.js +1 -0
- package/dist/screen/components/SlotChildActionsContext.d.ts +41 -0
- package/dist/screen/components/SlotChildActionsContext.js +1 -0
- package/dist/screen/components/UiIcon.d.ts +52 -0
- package/dist/screen/components/UiIcon.js +1 -0
- package/dist/screen/components/panel-widths.d.ts +37 -0
- package/dist/screen/components/panel-widths.js +1 -0
- package/dist/screen/components/usePartBridge.d.ts +66 -0
- package/dist/screen/components/usePartBridge.js +1 -0
- package/dist/screen/index.d.ts +31 -0
- package/dist/screen/index.js +1 -0
- package/dist/screen/lib/admin-bridge.d.ts +105 -0
- package/dist/screen/lib/admin-bridge.js +1 -0
- package/dist/screen/lib/backend-error.d.ts +106 -0
- package/dist/screen/lib/backend-error.js +1 -0
- package/dist/screen/lib/chrome-theme.d.ts +21 -0
- package/dist/screen/lib/chrome-theme.js +1 -0
- package/dist/screen/lib/client-only.d.ts +24 -0
- package/dist/screen/lib/client-only.js +1 -0
- package/dist/screen/lib/content/view-tiers.d.ts +25 -0
- package/dist/screen/lib/content/view-tiers.js +1 -0
- package/dist/screen/lib/document-addressing.d.ts +20 -0
- package/dist/screen/lib/document-addressing.js +1 -0
- package/dist/screen/lib/document-contract.d.ts +237 -0
- package/dist/screen/lib/document-contract.js +1 -0
- package/dist/screen/lib/document-hooks.d.ts +71 -0
- package/dist/screen/lib/document-hooks.js +0 -0
- package/dist/screen/lib/document-switch.d.ts +74 -0
- package/dist/screen/lib/document-switch.js +1 -0
- package/dist/screen/lib/failure.d.ts +54 -0
- package/dist/screen/lib/failure.js +1 -0
- package/dist/screen/lib/host-chrome.d.ts +181 -0
- package/dist/screen/lib/host-chrome.js +1 -0
- package/dist/screen/lib/host-inbound.d.ts +20 -0
- package/dist/screen/lib/host-inbound.js +1 -0
- package/dist/screen/lib/host.d.ts +20 -0
- package/dist/screen/lib/host.js +1 -0
- package/dist/screen/lib/key-scope.d.ts +23 -0
- package/dist/screen/lib/key-scope.js +1 -0
- package/dist/screen/lib/links/link-filters.d.ts +41 -0
- package/dist/screen/lib/links/link-filters.js +0 -0
- package/dist/screen/lib/load-error.d.ts +29 -0
- package/dist/screen/lib/load-error.js +1 -0
- package/dist/screen/lib/media-panel.d.ts +94 -0
- package/dist/screen/lib/media-panel.js +1 -0
- package/dist/screen/lib/media-picker.d.ts +68 -0
- package/dist/screen/lib/media-picker.js +1 -0
- package/dist/screen/lib/page-lock.d.ts +5 -0
- package/dist/screen/lib/page-lock.js +1 -0
- package/dist/screen/lib/puck/add-target-types.d.ts +55 -0
- package/dist/screen/lib/puck/add-target-types.js +0 -0
- package/dist/screen/lib/puck/block-choice.d.ts +52 -0
- package/dist/screen/lib/puck/block-choice.js +1 -0
- package/dist/screen/lib/puck/block-types-in.d.ts +39 -0
- package/dist/screen/lib/puck/block-types-in.js +1 -0
- package/dist/screen/lib/puck/content-tree.d.ts +196 -0
- package/dist/screen/lib/puck/content-tree.js +1 -0
- package/dist/screen/lib/puck/device-fields.d.ts +128 -0
- package/dist/screen/lib/puck/device-fields.js +1 -0
- package/dist/screen/lib/puck/field-buckets.d.ts +22 -0
- package/dist/screen/lib/puck/field-buckets.js +1 -0
- package/dist/screen/lib/puck/field-markers.d.ts +205 -0
- package/dist/screen/lib/puck/field-markers.js +1 -0
- package/dist/screen/lib/puck/hidable.d.ts +44 -0
- package/dist/screen/lib/puck/hidable.js +1 -0
- package/dist/screen/lib/puck/palette-sections.d.ts +96 -0
- package/dist/screen/lib/puck/palette-sections.js +1 -0
- package/dist/screen/lib/puck/panel-fields.d.ts +47 -0
- package/dist/screen/lib/puck/panel-fields.js +1 -0
- package/dist/screen/lib/puck/panel-no-control-mark.d.ts +74 -0
- package/dist/screen/lib/puck/panel-no-control-mark.js +1 -0
- package/dist/screen/lib/puck/part-id.d.ts +23 -0
- package/dist/screen/lib/puck/part-id.js +1 -0
- package/dist/screen/lib/puck/preview-click.d.ts +49 -0
- package/dist/screen/lib/puck/preview-click.js +1 -0
- package/dist/screen/lib/puck/preview-dom.d.ts +8 -0
- package/dist/screen/lib/puck/preview-dom.js +1 -0
- package/dist/screen/lib/puck/preview-events.d.ts +25 -0
- package/dist/screen/lib/puck/preview-events.js +1 -0
- package/dist/screen/lib/puck/preview-selection-context.d.ts +72 -0
- package/dist/screen/lib/puck/preview-selection-context.js +1 -0
- package/dist/screen/lib/puck/section-doc.d.ts +20 -0
- package/dist/screen/lib/puck/section-doc.js +1 -0
- package/dist/screen/lib/puck/slot-child-name.d.ts +186 -0
- package/dist/screen/lib/puck/slot-child-name.js +1 -0
- package/dist/screen/lib/puck/slot-heal.d.ts +5 -0
- package/dist/screen/lib/puck/slot-heal.js +1 -0
- package/dist/screen/lib/puck/slot-section-spec.d.ts +96 -0
- package/dist/screen/lib/puck/slot-section-spec.js +0 -0
- package/dist/screen/lib/puck/style-clipboard.d.ts +78 -0
- package/dist/screen/lib/puck/style-clipboard.js +1 -0
- package/dist/screen/lib/puck/text-control-kinds.d.ts +71 -0
- package/dist/screen/lib/puck/text-control-kinds.js +1 -0
- package/dist/screen/lib/puck/tree-reveal.d.ts +62 -0
- package/dist/screen/lib/puck/tree-reveal.js +1 -0
- package/dist/screen/lib/puck/use-section-ops.d.ts +86 -0
- package/dist/screen/lib/puck/use-section-ops.js +1 -0
- package/dist/screen/lib/screen-parts.d.ts +748 -0
- package/dist/screen/lib/screen-parts.js +1 -0
- package/dist/screen/lib/section-template-types.d.ts +49 -0
- package/dist/screen/lib/section-template-types.js +0 -0
- package/dist/screen/lib/section-templates.d.ts +23 -0
- package/dist/screen/lib/section-templates.js +1 -0
- package/dist/screen/lib/session-context.d.ts +30 -0
- package/dist/screen/lib/session-context.js +1 -0
- package/dist/screen/lib/session.d.ts +255 -0
- package/dist/screen/lib/session.js +1 -0
- package/dist/screen/screen.css +1102 -0
- package/dist/screen/words.d.ts +42 -0
- package/dist/screen/words.js +1 -0
- package/dist/session-DSQFmIvx.d.ts +43 -0
- package/dist/strings/catalogue.d.ts +13 -4
- package/dist/strings/catalogue.js +1 -1
- package/dist/strings/index.d.ts +5 -2
- package/dist/strings/index.js +1 -1
- package/dist/style-clipboard/index.js +1 -1
- package/dist/{types-DGcCsxs8.d.ts → types-CqY85foL.d.ts} +3 -65
- package/dist/words-D_Lnw1Gr.d.ts +59 -0
- package/package.json +348 -2
- package/dist/chunk-IG3U5NWJ.js +0 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Data } from '../../../blocks/index.js';
|
|
2
|
+
import { TreeItem } from './content-tree.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '../../../types-E3HrTPg2.js';
|
|
5
|
+
import '../../../data/index.js';
|
|
6
|
+
import '../../../types-41704JE4.js';
|
|
7
|
+
import '../../../resolve-D68pb3Bx.js';
|
|
8
|
+
import '../../../plan-DChbUXdS.js';
|
|
9
|
+
|
|
10
|
+
type NodeSelector = {
|
|
11
|
+
index: number;
|
|
12
|
+
zone?: string;
|
|
13
|
+
} | null;
|
|
14
|
+
type ComponentData = TreeItem;
|
|
15
|
+
type SectionOps = {
|
|
16
|
+
/** Insert a component into a zone at an index; returns the generated id. */
|
|
17
|
+
insertComponent: (zone: string, type: string, index: number) => string;
|
|
18
|
+
/** Insert into ROOT_ZONE (top-level section); returns the generated id. */
|
|
19
|
+
insertSection: (type: string, index: number) => string;
|
|
20
|
+
/** Atomically replace the node at (zone, index) — heal, reseed, hide toggle. */
|
|
21
|
+
replaceComponent: (zone: string, index: number, data: ComponentData) => void;
|
|
22
|
+
/** Seed a freshly-inserted slot child's props (insert THEN replace at a stable id). */
|
|
23
|
+
seedChild: (zone: string, index: number, childType: string, props: Record<string, unknown>) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Insert a FULL node — type + props, including inline slot children — at
|
|
26
|
+
* (zone, index); returns its id. The same insert-then-replace pattern as
|
|
27
|
+
* seedChild, one level up: how a saved section template lands in a page.
|
|
28
|
+
* Callers pass a node whose ids are already fresh (cloneNodeWithFreshIds).
|
|
29
|
+
*/
|
|
30
|
+
insertNode: (zone: string, index: number, node: TreeItem) => string;
|
|
31
|
+
/** Remove the node at (zone, index). A normal dispatch, so Undo restores it. */
|
|
32
|
+
removeComponent: (zone: string, index: number) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Move the node at (zone, sourceIndex) to destinationIndex WITHIN THE SAME
|
|
35
|
+
* zone. `destinationIndex` is the node's final resting index in the array
|
|
36
|
+
* (Puck's `reorder` reducer splices it out then back in), so a caller moving a
|
|
37
|
+
* node DOWN must account for the one-slot shift itself.
|
|
38
|
+
*/
|
|
39
|
+
reorderComponent: (zone: string, sourceIndex: number, destinationIndex: number) => void;
|
|
40
|
+
/** Duplicate the node at (zone, index). */
|
|
41
|
+
duplicateComponent: (zone: string, index: number) => void;
|
|
42
|
+
/** Set (or clear) the Puck selection by index-based address. */
|
|
43
|
+
select: (selector: NodeSelector) => void;
|
|
44
|
+
/** Replace the whole working document (used by Reset). */
|
|
45
|
+
setDocument: (data: Data) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Write the next document as ONE undo step — the commit behind the block
|
|
48
|
+
* operations (`efficient-easel/node-ops`, blueprint step 2.4b: the menu's
|
|
49
|
+
* Delete, Duplicate, Move, Copy / Cut / Paste and Hide, and the rows'
|
|
50
|
+
* hover-delete). Each of those is planned whole and lands here once, instead
|
|
51
|
+
* of the two or three dispatches it used to be.
|
|
52
|
+
*
|
|
53
|
+
* Recorded in Puck's history on purpose (`setData` is not, by default), and
|
|
54
|
+
* handed a FUNCTION: the object form logs "`setData` is expensive" on every
|
|
55
|
+
* call, and both rebuild Puck's index the same way. Behind the read-only gate
|
|
56
|
+
* like every other mutation here.
|
|
57
|
+
*/
|
|
58
|
+
commitDocument: (data: Data) => void;
|
|
59
|
+
};
|
|
60
|
+
type SectionOpsOptions = {
|
|
61
|
+
/**
|
|
62
|
+
* SOMEBODY ELSE holds the open document: every MUTATION below becomes a no-op.
|
|
63
|
+
*
|
|
64
|
+
* This is the one place the editor's read-only state is enforced on the
|
|
65
|
+
* document, and it is here rather than on each button because this hook is
|
|
66
|
+
* already the single source of truth for every mutation — the tree rows, the
|
|
67
|
+
* canvas "+" seams, the inspector head buttons and the lifecycle effects all
|
|
68
|
+
* come through it. A gate on the buttons would be a gate on the ones somebody
|
|
69
|
+
* remembered.
|
|
70
|
+
*
|
|
71
|
+
* `select` and `setUi` are NOT mutations and stay live: a read-only viewer must
|
|
72
|
+
* still be able to click a section and read its settings.
|
|
73
|
+
*
|
|
74
|
+
* Deliberately keyed on "somebody else has it" and NOT on the wider save gate.
|
|
75
|
+
* The save gate is also false while the lock claim is still `checking`, and the
|
|
76
|
+
* pinned Header/Footer seed runs in the chrome's mount commit, inside that
|
|
77
|
+
* window, through these very ops. Its WRITE is what is held there — by
|
|
78
|
+
* `onChange`, released by the claim if it is granted — so the seed must be
|
|
79
|
+
* allowed to lay the node down (card 1096). Blocking it here would silently
|
|
80
|
+
* un-fix that card.
|
|
81
|
+
*/
|
|
82
|
+
readOnly?: boolean;
|
|
83
|
+
};
|
|
84
|
+
declare function useSectionOps(options?: SectionOpsOptions): SectionOps;
|
|
85
|
+
|
|
86
|
+
export { type NodeSelector, type SectionOps, type SectionOpsOptions, useSectionOps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{useSectionOps}from"../../../chunk-VV5ADNBR.js";import"../../../chunk-FUDHI5I4.js";import"../../../chunk-P67FP7PG.js";import"../../../chunk-AELNNAFM.js";import"../../../chunk-YRLPFZW3.js";import"../../../chunk-D2BCHTQR.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-ZNCEOSXO.js";import"../../../chunk-KRXQM65X.js";import"../../../chunk-NKB3KVAB.js";
|