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,39 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AddChildRow — the single-type "Add …" affordance, in ONE place (card 66210).
|
|
5
|
+
*
|
|
6
|
+
* ONE ROW, TWO SURFACES. A slot-backed section's children can be added from the
|
|
7
|
+
* Layers tree and from the section's own settings panel, and each surface had
|
|
8
|
+
* written the button out itself: the same `.sf-add-card`, the same registry
|
|
9
|
+
* label, the same insert. That is exactly the shape card 66200 removed for the
|
|
10
|
+
* HETEROGENEOUS add ("Add block", now {@link AddBlockRow}); this is its
|
|
11
|
+
* single-type twin, and it is here for a sharper reason than tidiness.
|
|
12
|
+
*
|
|
13
|
+
* ⚠️ THE SECOND COPY WAS A SHIPPED DEFECT. Card 66189 gave a Hero slide's groups
|
|
14
|
+
* a cap — four on one anchor, because a fifth is drawn on top of the fourth —
|
|
15
|
+
* and wired the refusal into the panel's copy of this button. The tree's copy
|
|
16
|
+
* knew nothing about it, so a merchant could make the fifth group from the row
|
|
17
|
+
* sitting directly beside the four. Two buttons doing one job is how one of them
|
|
18
|
+
* gets a rule and the other does not.
|
|
19
|
+
*
|
|
20
|
+
* So the REASON is never computed here. The caller asks the section's own spec
|
|
21
|
+
* (`SlotSectionSpec.addBlocked`) and hands the answer down; this component only
|
|
22
|
+
* draws it. A surface that forgets to ask is then visibly a surface that passes
|
|
23
|
+
* `blocked={null}`, rather than a surface with its own quietly missing check.
|
|
24
|
+
*
|
|
25
|
+
* `disabled` rather than hidden, for the same reason as the Placement grid's
|
|
26
|
+
* closed square: an affordance that vanishes reads as a broken editor, while one
|
|
27
|
+
* that dims and explains itself reads as an answer.
|
|
28
|
+
*/
|
|
29
|
+
declare function AddChildRow({ label, blocked, onAdd, small, }: {
|
|
30
|
+
/** The registry's own "Add …" words — never composed here. */
|
|
31
|
+
label: string;
|
|
32
|
+
/** Why the section cannot take another child, or null. From its spec. */
|
|
33
|
+
blocked: string | null;
|
|
34
|
+
onAdd: () => void;
|
|
35
|
+
/** The Layers tree's smaller plus. Panel rows use the full-size one. */
|
|
36
|
+
small?: boolean;
|
|
37
|
+
}): react.JSX.Element;
|
|
38
|
+
|
|
39
|
+
export { AddChildRow as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{AddChildRow as default}from"../../chunk-3QVB4AG2.js";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { D as DragSession } from '../../session-DSQFmIvx.js';
|
|
4
|
+
import { SectionTemplate } from '../lib/section-template-types.js';
|
|
5
|
+
import { BlockChoice } from '../lib/puck/block-choice.js';
|
|
6
|
+
import '../../types-41704JE4.js';
|
|
7
|
+
import '../lib/puck/content-tree.js';
|
|
8
|
+
|
|
9
|
+
/** What a tile adds, parsed back out of its key. */
|
|
10
|
+
type AddKey = {
|
|
11
|
+
kind: "section";
|
|
12
|
+
type: string;
|
|
13
|
+
} | {
|
|
14
|
+
kind: "template";
|
|
15
|
+
template: SectionTemplate;
|
|
16
|
+
} | {
|
|
17
|
+
kind: "block";
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
declare const sectionKey: (type: string) => string;
|
|
21
|
+
declare const blockKey: (type: string) => string;
|
|
22
|
+
declare const templateKey: (id: string) => string;
|
|
23
|
+
type AddSidePanelProps<I> = {
|
|
24
|
+
/** The blocks a target container takes — the slot the panel was opened at,
|
|
25
|
+
* or the selected container — or null. */
|
|
26
|
+
blocks: {
|
|
27
|
+
parentName: string;
|
|
28
|
+
choices: BlockChoice[];
|
|
29
|
+
} | null;
|
|
30
|
+
/** Opened at a slot: only that slot's blocks are offered. */
|
|
31
|
+
blocksOnly: boolean;
|
|
32
|
+
/** Where the next thing goes, when the panel was opened at a place. */
|
|
33
|
+
at?: {
|
|
34
|
+
label: string;
|
|
35
|
+
onClear: () => void;
|
|
36
|
+
};
|
|
37
|
+
/** Add what a tile names. */
|
|
38
|
+
onAdd: (key: AddKey) => void;
|
|
39
|
+
/** The drag item for what a tile names — a drag in the editor's session. */
|
|
40
|
+
itemFor: (key: AddKey) => I;
|
|
41
|
+
session: DragSession<I>;
|
|
42
|
+
/** A row under the tiles for something that is not a block, drawn by the
|
|
43
|
+
* layer that owns it (the website: the Live chat bubble). Not shown where
|
|
44
|
+
* only a slot's blocks are offered. */
|
|
45
|
+
siteWide?: ReactNode;
|
|
46
|
+
/** Leave Add — back to the view underneath (the head's "Done"). */
|
|
47
|
+
onClose: () => void;
|
|
48
|
+
/** Hide the left panel (the head's last button, as on every panel). */
|
|
49
|
+
onHide?: () => void;
|
|
50
|
+
readOnly?: boolean;
|
|
51
|
+
};
|
|
52
|
+
declare function AddSidePanel<I>({ blocks, blocksOnly, at, onAdd, itemFor, session, siteWide, onClose, onHide, readOnly, }: AddSidePanelProps<I>): react.JSX.Element;
|
|
53
|
+
|
|
54
|
+
export { type AddKey, type AddSidePanelProps, blockKey, AddSidePanel as default, sectionKey, templateKey };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{blockKey,AddSidePanel as default,sectionKey,templateKey}from"../../chunk-OORDMLL4.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-GENAF3P6.js";import"../../chunk-4MXFKJUY.js";import"../../chunk-IWAPPEL4.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KDYIMJTZ.js";import"../../chunk-6TZTKAB5.js";import"../../chunk-AJBJ74ME.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-NBJ2YY6Y.js";import"../../chunk-P67FP7PG.js";import"../../chunk-AELNNAFM.js";import"../../chunk-BXZ6WLHC.js";import"../../chunk-EOJNJCMJ.js";import"../../chunk-ZFDCDJNZ.js";import"../../chunk-ZNS7727Y.js";import"../../chunk-3EDSDPIP.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-KTVH2ZRL.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-6DJHRLCU.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-JUQ6YJCG.js";import"../../chunk-RE4LP46F.js";import"../../chunk-WZ7TGAAT.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-EWVJSRRY.js";import"../../chunk-P6O363EE.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-TTJ54QGG.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { MediaPanelComponent, MediaPickRequest } from '../lib/media-panel.js';
|
|
3
|
+
import '../../host-DJ8Gzsx7.js';
|
|
4
|
+
import '../../blocks/index.js';
|
|
5
|
+
import '../../types-E3HrTPg2.js';
|
|
6
|
+
import '../../data/index.js';
|
|
7
|
+
import '../../types-41704JE4.js';
|
|
8
|
+
import '../../resolve-D68pb3Bx.js';
|
|
9
|
+
import '../../plan-DChbUXdS.js';
|
|
10
|
+
import '../lib/document-contract.js';
|
|
11
|
+
import '../lib/session.js';
|
|
12
|
+
import '../lib/host-chrome.js';
|
|
13
|
+
import '../lib/links/link-filters.js';
|
|
14
|
+
import '../../LinkPicker-W2Rtxetz.js';
|
|
15
|
+
import '../lib/document-hooks.js';
|
|
16
|
+
import '../lib/section-template-types.js';
|
|
17
|
+
import '../lib/puck/content-tree.js';
|
|
18
|
+
import '../lib/document-switch.js';
|
|
19
|
+
import '../../engine-DBxp_v6B.js';
|
|
20
|
+
import '../../edit-lock/index.js';
|
|
21
|
+
import '../lib/admin-bridge.js';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The left panel's MEDIA view: efficient-easel's `MediaPanelHead` over the
|
|
25
|
+
* HOST's media library (lib/media-panel), the host's one Media Library
|
|
26
|
+
* drawn narrow.
|
|
27
|
+
*
|
|
28
|
+
* The head is the engine's, the same one the campaign designer draws over the
|
|
29
|
+
* same library (card [MERGE] One Media Panel Head For Both Editors, owner
|
|
30
|
+
* ruling 2026-10-06: a part exists once, in efficient-easel). Its words, its
|
|
31
|
+
* two states and its Cancel are all there; this file only maps the request:
|
|
32
|
+
*
|
|
33
|
+
* • Browsing (`pick` null): "Media library", the website under it, and the
|
|
34
|
+
* hide button every panel ends with.
|
|
35
|
+
* • Choosing for a field: "Choose image / For Background image", and
|
|
36
|
+
* "Cancel" (the field gets nothing and the panel goes back to what it
|
|
37
|
+
* showed before). Hiding the panel cancels too.
|
|
38
|
+
*/
|
|
39
|
+
declare function MediaSidePanel({ panel: Panel, pick, onHide, }: {
|
|
40
|
+
panel: MediaPanelComponent;
|
|
41
|
+
pick: MediaPickRequest | null;
|
|
42
|
+
/** Hide the panel. Omitted where it cannot be hidden (the standalone section
|
|
43
|
+
* editor), and then the head draws no hide button. */
|
|
44
|
+
onHide?: () => void;
|
|
45
|
+
}): react.JSX.Element;
|
|
46
|
+
|
|
47
|
+
export { MediaSidePanel as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{MediaSidePanel as default}from"../../chunk-3M3A3DN2.js";import"../../chunk-ZZ7VLIHQ.js";import"../../chunk-NBJ2YY6Y.js";import"../../chunk-P67FP7PG.js";import"../../chunk-AELNNAFM.js";import"../../chunk-BXZ6WLHC.js";import"../../chunk-EOJNJCMJ.js";import"../../chunk-ZFDCDJNZ.js";import"../../chunk-ZNS7727Y.js";import"../../chunk-3EDSDPIP.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-KTVH2ZRL.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-6DJHRLCU.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-JUQ6YJCG.js";import"../../chunk-RE4LP46F.js";import"../../chunk-WZ7TGAAT.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-EWVJSRRY.js";import"../../chunk-P6O363EE.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { N as NodeClipboard, a as NodeOps } from '../../useNodeOps-BF0fQsif.js';
|
|
3
|
+
import { E as EaselContextMenuItem } from '../../types-Djdq6Xkd.js';
|
|
4
|
+
import { StyleSnapshot } from '../../style-clipboard/index.js';
|
|
5
|
+
import { C as CanvasTarget } from '../../watch-BTYOJpQU.js';
|
|
6
|
+
import { AddTarget } from '../lib/puck/add-target-types.js';
|
|
7
|
+
import '../../types-41704JE4.js';
|
|
8
|
+
import '../../plan-DChbUXdS.js';
|
|
9
|
+
import '../../words-CnnHb9jo.js';
|
|
10
|
+
import '../lib/puck/block-choice.js';
|
|
11
|
+
import '../lib/puck/slot-section-spec.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Where the menu is open, and WHAT it was opened on.
|
|
15
|
+
*
|
|
16
|
+
* Three kinds, because a right-click means three different things in an editor
|
|
17
|
+
* and one menu for all of them would be mostly greyed rows. The kind is decided
|
|
18
|
+
* once, at the event, by what is under the pointer — never guessed later.
|
|
19
|
+
*/
|
|
20
|
+
type NodeMenuTarget =
|
|
21
|
+
/** On a node: a Layers row, or its box on the canvas. */
|
|
22
|
+
{
|
|
23
|
+
kind: "node";
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
zone: string;
|
|
27
|
+
index: number;
|
|
28
|
+
}
|
|
29
|
+
/** On editor chrome that is not a node — the tree's ground, the panel, the
|
|
30
|
+
* canvas between sections. The menu is about the PAGE, not a block. */
|
|
31
|
+
| {
|
|
32
|
+
kind: "empty";
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
}
|
|
36
|
+
/** Inside something you type in. Text actions, not document ones. */
|
|
37
|
+
| {
|
|
38
|
+
kind: "input";
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
el: TextEl;
|
|
42
|
+
};
|
|
43
|
+
/** As much of an input as the text actions use. */
|
|
44
|
+
type TextEl = {
|
|
45
|
+
value: string;
|
|
46
|
+
selectionStart: number | null;
|
|
47
|
+
selectionEnd: number | null;
|
|
48
|
+
setRangeText: (t: string, s: number, e: number, m?: string) => void;
|
|
49
|
+
select: () => void;
|
|
50
|
+
focus: () => void;
|
|
51
|
+
dispatchEvent: (e: Event) => boolean;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* A node as the tree already models it — kept structural so this module does not
|
|
55
|
+
* import the chrome's own types and become a cycle.
|
|
56
|
+
*
|
|
57
|
+
* ⚠️ `id` IS REQUIRED, and that is the type checker's correction rather than my
|
|
58
|
+
* choice. The first cut wrote `props: Record<string, unknown>` and `tsc` refused
|
|
59
|
+
* it against `ops.replaceComponent`, whose `TreeItem` requires one. It is right:
|
|
60
|
+
* every node in the open document carries an id — it is what
|
|
61
|
+
* `data-puck-component` publishes and what `locate` reads back — so a node
|
|
62
|
+
* without one is a node the tree cannot address, and passing it to
|
|
63
|
+
* `replaceComponent` would write something unreachable.
|
|
64
|
+
*/
|
|
65
|
+
type NodeLike = {
|
|
66
|
+
type: string;
|
|
67
|
+
props: {
|
|
68
|
+
[key: string]: unknown;
|
|
69
|
+
id: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
type NodeMenuHost = {
|
|
73
|
+
/** The nodes of `zone`, in order — for "is there anything above me". */
|
|
74
|
+
nodesIn: (zone: string) => NodeLike[];
|
|
75
|
+
/** The node at an address, or null if the address has gone stale. */
|
|
76
|
+
nodeAt: (zone: string, index: number) => NodeLike | null;
|
|
77
|
+
/** The merchant-facing name of a node type, in the ZONE it was found in — a
|
|
78
|
+
* node in the ROOT zone is a section, a node in a slot is a block, and one
|
|
79
|
+
* node is named differently at each (lib/puck/section-catalog labelAtLevel).
|
|
80
|
+
* A host that does not care may still pass a one-argument function. */
|
|
81
|
+
labelOf: (type: string, zone: string) => string;
|
|
82
|
+
/**
|
|
83
|
+
* What the LAYERS TREE calls this node — its row's own words, not its type's.
|
|
84
|
+
*
|
|
85
|
+
* ⚠️ NOT `labelOf`, and the difference is the whole reason this exists. A Hero
|
|
86
|
+
* slide's tree row reads "Winter" because the merchant typed a slide name;
|
|
87
|
+
* `labelOf` would call it "Slide". The Select layer flyout lists the same
|
|
88
|
+
* nodes the tree lists, so it must say the same words — a menu that called
|
|
89
|
+
* something "Slide" while the tree three inches away called it "Winter" would
|
|
90
|
+
* be two vocabularies for one node, which is the thing card 66194 spent a
|
|
91
|
+
* whole card removing. The chrome already owns this rule
|
|
92
|
+
* (`lib/puck/slot-child-name.ts`, the ONE home) and hands it in.
|
|
93
|
+
*/
|
|
94
|
+
rowNameOf: (node: NodeLike, zone: string) => string;
|
|
95
|
+
/**
|
|
96
|
+
* Can this node be renamed, and under which prop? `null` takes `Rename` out of
|
|
97
|
+
* the menu entirely — an item that opens a box writing nowhere is worse than
|
|
98
|
+
* no item.
|
|
99
|
+
*
|
|
100
|
+
* The chrome answers it through `slotChildRenameProp` (lib/puck/slot-child-name),
|
|
101
|
+
* the ONE home for what a child is called — the same module `rowNameOf` above
|
|
102
|
+
* already reads. It is handed in rather than looked up here for the reason
|
|
103
|
+
* everything else on this type is: this module is given nodes, never the config.
|
|
104
|
+
*/
|
|
105
|
+
renamePropOf: (node: NodeLike, zone: string) => string | null;
|
|
106
|
+
/**
|
|
107
|
+
* Put the node's LAYERS ROW into its rename state — the tree owns the input,
|
|
108
|
+
* not the menu.
|
|
109
|
+
*
|
|
110
|
+
* ⚠️ THE MENU DOES NOT COLLECT THE NAME. A box drawn by the menu would be a
|
|
111
|
+
* second place to type a name, three inches from the row that shows it, and
|
|
112
|
+
* the owner deleted type-in-place on 2026-08-26 precisely to stop one string
|
|
113
|
+
* having two editors. The row a merchant is looking at is the row they type
|
|
114
|
+
* in, and this only asks for it.
|
|
115
|
+
*/
|
|
116
|
+
beginRename: (zone: string, index: number) => void;
|
|
117
|
+
/** Undo / redo, as the toolbar already drives it. The menu is a SECOND door to
|
|
118
|
+
* what a button and a key already do, never the only one. */
|
|
119
|
+
history: {
|
|
120
|
+
hasPast: boolean;
|
|
121
|
+
hasFuture: boolean;
|
|
122
|
+
back: () => void;
|
|
123
|
+
forward: () => void;
|
|
124
|
+
};
|
|
125
|
+
/** Open the Add door with nothing preselected — a new top-level section. */
|
|
126
|
+
openAddSection: () => void;
|
|
127
|
+
/** Put the panel on the page's own settings. */
|
|
128
|
+
openPageSettings: () => void;
|
|
129
|
+
/** Fold every section in the Layers tree. */
|
|
130
|
+
collapseAll: () => void;
|
|
131
|
+
/** Say, in the editor's own voice, that the browser refused clipboard reading
|
|
132
|
+
* and ⌘V is the way. NOT a console warning: the merchant pressed a row and
|
|
133
|
+
* something has to answer them. */
|
|
134
|
+
onPasteRefused: () => void;
|
|
135
|
+
/**
|
|
136
|
+
* A block that is what its section IS: it may be selected and edited, and
|
|
137
|
+
* never taken away or hidden (the Booking Form's three boxes). The host's
|
|
138
|
+
* answer, for the reason everything else on this type is handed in: this
|
|
139
|
+
* module is given nodes and is never told which blocks exist.
|
|
140
|
+
*/
|
|
141
|
+
isLocked: (node: NodeLike) => boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Why a second one of this node cannot be made, or null — a rule of the
|
|
144
|
+
* block's own (the hero's arithmetic: an anchor holds four groups). What
|
|
145
|
+
* cannot be made twice cannot be cut either.
|
|
146
|
+
*/
|
|
147
|
+
duplicateBlocked: (node: NodeLike) => string | null;
|
|
148
|
+
/**
|
|
149
|
+
* What may be added inside a node of this type, or null for one that takes
|
|
150
|
+
* no children — the ONE add lookup, the host's (its block rules), for the
|
|
151
|
+
* reason the two above are handed in. Only whether there is an answer is
|
|
152
|
+
* read: a node with none has no "Add block inside" row.
|
|
153
|
+
*/
|
|
154
|
+
canAddTo: (nodeType: string) => AddTarget | null;
|
|
155
|
+
/**
|
|
156
|
+
* The BLOCK OPERATIONS — `efficient-easel/node-ops`' `useNodeOps`, hosted by
|
|
157
|
+
* the chrome (blueprint step 2.4b). Every row that changes the document
|
|
158
|
+
* presses one of these, and nothing in this module mutates any other way.
|
|
159
|
+
*
|
|
160
|
+
* Each is ONE commit: planned whole on the document, written once through
|
|
161
|
+
* `use-section-ops`' `commitDocument` — behind the same read-only gate as
|
|
162
|
+
* every other mutation ("somebody else holds the open document") — with its
|
|
163
|
+
* selection by id, never by position. Before 2.4b two of them were several
|
|
164
|
+
* dispatches, and that is where both of this menu's worst bugs lived:
|
|
165
|
+
*
|
|
166
|
+
* - DELETE was three (drop the node, reset the inspector mode, clear the
|
|
167
|
+
* selection). This module once owned a copy with the middle one missing,
|
|
168
|
+
* and deleting a section while one of its PARTS was engaged unmounted the
|
|
169
|
+
* editor into "This page didn't load" (Lewis, 2026-09-07). The mode reset
|
|
170
|
+
* now lives in the chrome's ONE commit: any operation that changes the
|
|
171
|
+
* selection resets it, so no caller can leave it out.
|
|
172
|
+
* - PASTE was two (insert, then fill), so two undo steps.
|
|
173
|
+
*
|
|
174
|
+
* Paste still clones with fresh ids — every address in the editor is an id,
|
|
175
|
+
* and a paste that kept the original's would put two nodes with one id in
|
|
176
|
+
* the document. `node-ops`' paste does that at every depth.
|
|
177
|
+
*/
|
|
178
|
+
nodeOps: Pick<NodeOps, "held" | "remove" | "duplicate" | "step" | "canStep" | "setProps" | "copy" | "cut" | "paste">;
|
|
179
|
+
/**
|
|
180
|
+
* Is this node PINNED CHROME — the Header or the Footer section at the page's
|
|
181
|
+
* root? The Layers tree draws those two in groups of their own, with no
|
|
182
|
+
* delete, no eye and no grip; the canvas menu used to offer them Duplicate,
|
|
183
|
+
* Move, Cut, Hide and Delete anyway (blueprint step 2.4b). It now withholds
|
|
184
|
+
* exactly what the tree withholds, and says why.
|
|
185
|
+
*/
|
|
186
|
+
isPinned: (node: NodeLike, zone: string) => boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Where a SECTION may sit at the page root: after the pinned Header
|
|
189
|
+
* (`floor`) and before the pinned Footer (`cap`) — the chrome's `sectionBand`,
|
|
190
|
+
* the one home the add and drag clamps already read. A section pasted at the
|
|
191
|
+
* root lands inside it; Move up / Move down never leave it.
|
|
192
|
+
*/
|
|
193
|
+
sectionBand: () => {
|
|
194
|
+
floor: number;
|
|
195
|
+
cap: number;
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Select a node the way the LAYERS TREE selects it — the tree's own two
|
|
199
|
+
* handlers, not a third one.
|
|
200
|
+
*
|
|
201
|
+
* ⚠️ Selecting is not one action, it is two, and the difference is visible.
|
|
202
|
+
* A top-level node goes through `selectIndex` (inspector mode, the Locations
|
|
203
|
+
* focus reset, scroll the preview to it); a slot child goes through
|
|
204
|
+
* `selectChild`, which for a SLIDER parent must move the carousel to that
|
|
205
|
+
* slide BEFORE selecting, or Puck measures its overlay on an off-screen slide
|
|
206
|
+
* and the canvas grows a horizontal scrollbar. Neither is restated here. The
|
|
207
|
+
* `parentType` is what the slider question is asked of, so the chain hands it
|
|
208
|
+
* down rather than the chrome looking it up a second time.
|
|
209
|
+
*/
|
|
210
|
+
selectAt: (zone: string, index: number, id: string, parentType: string | null) => void;
|
|
211
|
+
/** Open the Add door for a parent that can take children. The chrome owns
|
|
212
|
+
* WHERE a new node lands (`placementIndex`); this only asks it to open. */
|
|
213
|
+
openAddInside: (zone: string, index: number) => void;
|
|
214
|
+
/**
|
|
215
|
+
* Turn a `data-puck-component` id into an address.
|
|
216
|
+
*
|
|
217
|
+
* The chrome owns this because the address is a fact about the OPEN DOCUMENT
|
|
218
|
+
* (which zone, which index) and this module is handed nodes, not the tree. The
|
|
219
|
+
* canvas hands us the id the browser says was clicked, so the node the menu
|
|
220
|
+
* ACTS on is the node the browser says was hit — with no second hit-test that
|
|
221
|
+
* could disagree.
|
|
222
|
+
*/
|
|
223
|
+
locate: (id: string) => {
|
|
224
|
+
zone: string;
|
|
225
|
+
index: number;
|
|
226
|
+
} | null;
|
|
227
|
+
/**
|
|
228
|
+
* COPY STYLE / PASTE STYLE (card [ADD] Copy Style And Paste Style). The rows,
|
|
229
|
+
* their words and glyphs are editor-shell's; the chrome answers the rest —
|
|
230
|
+
* which rows are a look (lib/puck/style-clipboard), the site's scope, and the
|
|
231
|
+
* toast. Optional: a host without it offers neither row.
|
|
232
|
+
*
|
|
233
|
+
* ⚠️ `paste` writes through the chrome's `ops.replaceComponent`, the one op
|
|
234
|
+
* behind the READ-ONLY gate — this module still dispatches nothing itself.
|
|
235
|
+
*/
|
|
236
|
+
style?: {
|
|
237
|
+
held: () => StyleSnapshot | null;
|
|
238
|
+
canCopy: (node: NodeLike, zone: string) => boolean;
|
|
239
|
+
copy: (node: NodeLike, zone: string) => void;
|
|
240
|
+
paste: (zone: string, index: number, node: NodeLike) => void;
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
/** One rung of the stack under the pointer: a node, and where it lives. */
|
|
244
|
+
type ChainRung = {
|
|
245
|
+
zone: string;
|
|
246
|
+
index: number;
|
|
247
|
+
node: NodeLike;
|
|
248
|
+
parentType: string | null;
|
|
249
|
+
};
|
|
250
|
+
/**
|
|
251
|
+
* The stack of nodes under the pointer, INNERMOST FIRST.
|
|
252
|
+
*
|
|
253
|
+
* ── WHY THIS EXISTS ─────────────────────────────────────────────────────────
|
|
254
|
+
* A canvas click selects the innermost thing under the pointer, because that is
|
|
255
|
+
* the element the browser says was hit. Once nesting is a few deep — Text inside
|
|
256
|
+
* a Box inside a Slide inside a Hero Slideshow — the outer three have no free
|
|
257
|
+
* pixels left to click, so they are not merely hard to select but UNREACHABLE
|
|
258
|
+
* from the canvas. Lewis asked for the fix on 2026-09-03 and chose this reading
|
|
259
|
+
* of it — the stack under the cursor, not a jump to the Layers tree.
|
|
260
|
+
*
|
|
261
|
+
* ── HOW A PARENT IS FOUND, AND WHY NOTHING NEW IS INTRODUCED ────────────────
|
|
262
|
+
* A zone is `<parentId>:<slot>` (the chrome's own words, and `ROOT_ZONE` is the
|
|
263
|
+
* literal `root:default-zone`). So the parent's ID is already written on the
|
|
264
|
+
* child's address, and walking up is `locate` on that id — the SAME lookup the
|
|
265
|
+
* canvas uses to turn a right-clicked element into an address. No second tree
|
|
266
|
+
* walk, no second idea of what contains what, and therefore no way for the two
|
|
267
|
+
* to disagree.
|
|
268
|
+
*
|
|
269
|
+
* ⚠️ THE ID IS TAKEN FROM THE LAST COLON, not the first. A node id is
|
|
270
|
+
* `${type}-${uuid}` (`newNodeId`) and carries no colon of its own today — but a
|
|
271
|
+
* slot NAME is a plain identifier and never will, while a type is somebody
|
|
272
|
+
* else's string. Splitting on the first colon is right only by luck; splitting
|
|
273
|
+
* on the last is right by construction.
|
|
274
|
+
*
|
|
275
|
+
* Ends at the root zone. `seen` is not defensive tidiness about cycles — a tree
|
|
276
|
+
* has none — it stops a STALE address (a node deleted between the right-click
|
|
277
|
+
* and the render) from resolving back onto something already in the chain and
|
|
278
|
+
* spinning the loop forever, which would hang the editor rather than draw a
|
|
279
|
+
* short menu.
|
|
280
|
+
*/
|
|
281
|
+
declare function ancestorChain(host: NodeMenuHost, target: {
|
|
282
|
+
zone: string;
|
|
283
|
+
index: number;
|
|
284
|
+
}): ChainRung[];
|
|
285
|
+
/**
|
|
286
|
+
* THE BLOCK CLIPBOARD — one node, held by us, for the whole tab.
|
|
287
|
+
*
|
|
288
|
+
* Owner 2026-09-04, asked whether we could do copy and paste ourselves: for a
|
|
289
|
+
* BLOCK we can, completely, and with no browser permission at all — the thing
|
|
290
|
+
* being copied is our own document node, not the operating system's clipboard.
|
|
291
|
+
* (Text paste is the one that is not free; see {@link textMenuItems}.)
|
|
292
|
+
*
|
|
293
|
+
* Module-level, and deliberately not React state: the clipboard outlives every
|
|
294
|
+
* menu that reads it, and putting it in the hook would give each mounted editor
|
|
295
|
+
* its own — copy in one and paste in another would silently do nothing. Since
|
|
296
|
+
* blueprint step 2.4b it is `efficient-easel/node-ops`' clipboard, which the
|
|
297
|
+
* chrome hands its `useNodeOps`; an entry remembers the zone it came from
|
|
298
|
+
* (`from`), because "may this paste here" is a question about the type and its
|
|
299
|
+
* destination.
|
|
300
|
+
*/
|
|
301
|
+
declare const EASEL_NODE_CLIPBOARD: NodeClipboard;
|
|
302
|
+
/**
|
|
303
|
+
* Build the rows for one node.
|
|
304
|
+
*
|
|
305
|
+
* Pure, and handed everything it needs — so a test can pass spies and assert,
|
|
306
|
+
* row by row, which operation each row presses.
|
|
307
|
+
*
|
|
308
|
+
* Since blueprint step 2.4b the ROWS THEMSELVES — their order, their groups,
|
|
309
|
+
* their words, glyphs and shortcuts — are `efficient-easel/node-ops`'
|
|
310
|
+
* `nodeMenuItems`, the one menu both editors draw (the campaign designer moved
|
|
311
|
+
* onto it in 2.3b). They were drawn from this module's own list, which is where
|
|
312
|
+
* that shared one was copied from, so nothing moves. What stays HERE is which
|
|
313
|
+
* rows this node gets: a row is offered by passing its action, and every rule
|
|
314
|
+
* below is the storefront's.
|
|
315
|
+
*/
|
|
316
|
+
declare function nodeMenuItems(host: NodeMenuHost, target: {
|
|
317
|
+
zone: string;
|
|
318
|
+
index: number;
|
|
319
|
+
}): EaselContextMenuItem[];
|
|
320
|
+
/**
|
|
321
|
+
* What a right-click on the PAGE offers — the tree's ground, the panel, the
|
|
322
|
+
* canvas between two sections.
|
|
323
|
+
*
|
|
324
|
+
* This ground used to fall through to Chrome, which is half of what the owner
|
|
325
|
+
* was pointing at: a right-click that sometimes gives you the editor and
|
|
326
|
+
* sometimes gives you Reload teaches you not to right-click at all.
|
|
327
|
+
*
|
|
328
|
+
* Everything here already exists on a button or a key. That is on purpose — a
|
|
329
|
+
* context menu is a second door to actions a merchant can already reach, never
|
|
330
|
+
* the only door to one, or the feature is hidden inside a gesture.
|
|
331
|
+
*/
|
|
332
|
+
declare function pageMenuItems(host: NodeMenuHost): EaselContextMenuItem[];
|
|
333
|
+
/**
|
|
334
|
+
* What a right-click INSIDE A TEXT BOX offers.
|
|
335
|
+
*
|
|
336
|
+
* ── THE ONE ROW THAT IS NOT FREE ─────────────────────────────────────────────
|
|
337
|
+
* Copy, Cut and Select all are ours outright. PASTE is not: reading the system
|
|
338
|
+
* clipboard needs the browser's `clipboard-read` permission, Chrome asks once,
|
|
339
|
+
* and a merchant who says no would have a Paste row that is dead for ever while
|
|
340
|
+
* ⌘V keeps working perfectly.
|
|
341
|
+
*
|
|
342
|
+
* So Paste TRIES, and on refusal turns into the shortcut instead — the row is
|
|
343
|
+
* never a button that does nothing. That is the whole reason `onPasteRefused`
|
|
344
|
+
* is a host callback rather than a `console.warn`: the merchant has to be told
|
|
345
|
+
* something, and this module does not own the editor's way of saying it.
|
|
346
|
+
*/
|
|
347
|
+
declare function textMenuItems(host: NodeMenuHost, el: TextEl): EaselContextMenuItem[];
|
|
348
|
+
/**
|
|
349
|
+
* Wire the menu to both surfaces and render it.
|
|
350
|
+
*
|
|
351
|
+
* Returns ONE `onContextMenu` for the whole Layers tree, and the element to
|
|
352
|
+
* render. Per-row handlers are deliberately gone — see {@link onTreeContextMenu}.
|
|
353
|
+
*
|
|
354
|
+
* `canvas` is the editor's canvas frame (`efficient-easel/canvas`
|
|
355
|
+
* `useCanvasFrame`, found once by the chrome) — null until Puck has drawn into
|
|
356
|
+
* it. The canvas half below listens on it.
|
|
357
|
+
*/
|
|
358
|
+
declare function useNodeContextMenu(host: NodeMenuHost, canvas: CanvasTarget | null): {
|
|
359
|
+
onEditorContextMenu: (e: React.MouseEvent) => void;
|
|
360
|
+
menu: react.JSX.Element | null;
|
|
361
|
+
closeMenu: () => void;
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
export { type ChainRung, EASEL_NODE_CLIPBOARD, type NodeMenuHost, type NodeMenuTarget, ancestorChain, nodeMenuItems, pageMenuItems, textMenuItems, useNodeContextMenu };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{EASEL_NODE_CLIPBOARD,ancestorChain,nodeMenuItems,pageMenuItems,textMenuItems,useNodeContextMenu}from"../../chunk-F6CCTEIX.js";import"../../chunk-FUDHI5I4.js";import"../../chunk-57DJOKXT.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-RW4XBUUW.js";import"../../chunk-KTVH2ZRL.js";import"../../chunk-2LK54I4E.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{PageEditGuardNotices as default}from"../../chunk-LG436UTD.js";import"../../chunk-YJXEHK6I.js";import"../../chunk-7MU3RJ6S.js";import"../../chunk-A7ZJII7O.js";import"../../chunk-6FY3PZS3.js";import"../../chunk-AKZWUV5Z.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-OYX47SL7.js";import"../../chunk-HMX55DYT.js";import"../../chunk-Q3SQBNJB.js";import"../../chunk-3WSPDAK2.js";import"../../chunk-R5ZVNJLJ.js";import"../../chunk-KDYIMJTZ.js";import"../../chunk-6TZTKAB5.js";import"../../chunk-AJBJ74ME.js";import"../../chunk-ZZ7VLIHQ.js";import"../../chunk-ZWK3CBRU.js";import"../../chunk-BDTITTMW.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-6DJHRLCU.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-JUQ6YJCG.js";import"../../chunk-RE4LP46F.js";import"../../chunk-WZ7TGAAT.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-L5KW4HG5.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The picture of ONE side panel: a window with its left or right column ruled
|
|
5
|
+
* off. It is the Hide panel button at the end of that panel's head and the
|
|
6
|
+
* Show panel button in the strip a hidden panel leaves (components/
|
|
7
|
+
* SidePanelHead) — one control, so one drawing. It was the top bar's two
|
|
8
|
+
* panel toggles until those went (2026-10-04).
|
|
9
|
+
*/
|
|
10
|
+
declare function PanelToggleIcon({ side }: {
|
|
11
|
+
side: "left" | "right";
|
|
12
|
+
}): react.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { PanelToggleIcon as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{PanelToggleIcon as default}from"../../chunk-KQMML6JM.js";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ViewTier } from '../lib/content/view-tiers.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* PreviewDeviceContext — the editor's current preview device.
|
|
6
|
+
*
|
|
7
|
+
* The storefront editor chrome (ScreenChrome) owns a Desktop / Tablet
|
|
8
|
+
* / Mobile switcher in its top bar (local `device` state, rendered at logical
|
|
9
|
+
* widths 2000 / 800 / 390). That switcher — NOT Puck's built-in viewports — is
|
|
10
|
+
* what resizes the preview iframe, so viewport-aware inspector fields must read
|
|
11
|
+
* IT to know which view the merchant is editing. The chrome lends its live
|
|
12
|
+
* `device` to the website layer, which provides it here
|
|
13
|
+
* (components/WebsiteScreenParts); fields (e.g. the Footer's "Logo fills its
|
|
14
|
+
* column" toggle) read it via usePreviewDevice().
|
|
15
|
+
*
|
|
16
|
+
* Defaults to "desktop" outside the chrome (e.g. a bare field harness), matching
|
|
17
|
+
* the chrome's own initial device.
|
|
18
|
+
*
|
|
19
|
+
* The device IS a `ViewTier` — the switcher, the per-view fields and the runtime
|
|
20
|
+
* grids have to name the same three views or a control sets a tier nothing
|
|
21
|
+
* renders, so the union has one home (lib/content/view-tiers) and this is an
|
|
22
|
+
* alias for the editor's word for it.
|
|
23
|
+
*/
|
|
24
|
+
type PreviewDevice = ViewTier;
|
|
25
|
+
declare const PreviewDeviceContext: react.Context<ViewTier>;
|
|
26
|
+
declare const usePreviewDevice: () => PreviewDevice;
|
|
27
|
+
|
|
28
|
+
export { type PreviewDevice, PreviewDeviceContext, usePreviewDevice };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{PreviewDeviceContext,usePreviewDevice}from"../../chunk-BSPCSC45.js";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PreviewIdSelection } from '../lib/puck/preview-selection-context.js';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Editor-preview SELECTION bridge for a section's PARTS — the headline, the
|
|
6
|
+
* body, the eyebrow a merchant clicks in the canvas to edit that one thing.
|
|
7
|
+
*
|
|
8
|
+
* The GENERAL member of a family the editor already had three hand-wired
|
|
9
|
+
* instances of (a Hero's ticker, a HeroSingle's Background and its Text). Those
|
|
10
|
+
* three each bridge ONE region of ONE section and name it in code; this one
|
|
11
|
+
* bridges any authored-text prop of any section, because what is clickable is
|
|
12
|
+
* derived from the config's own text fields (`lib/puck/text-parts.ts`) rather
|
|
13
|
+
* than listed.
|
|
14
|
+
*
|
|
15
|
+
* That is also why it is a fourth context and not a rewrite of the three: their
|
|
16
|
+
* regions carry NO Puck fields at all (a HeroSingle's copy and a Hero's ticker
|
|
17
|
+
* items are props with bespoke panels and no field declarations), so a
|
|
18
|
+
* field-derived bridge cannot see them and the two mechanisms provably never
|
|
19
|
+
* claim the same element. See the card report for why retiring them is its own
|
|
20
|
+
* piece of work.
|
|
21
|
+
*
|
|
22
|
+
* The payload is ONE string — `"<nodeId>::<propKey>"`, or `"<nodeId>::"` for the
|
|
23
|
+
* whole section — so the shared {@link createPreviewSelectionContext} factory
|
|
24
|
+
* fits unchanged; `encodePartId`/`decodePartId` own that spelling. Provider sits
|
|
25
|
+
* ABOVE <Puck> so its value reaches BOTH the chrome (which registers the select
|
|
26
|
+
* handler and mirrors the open panel back) AND the portaled preview iframe.
|
|
27
|
+
*/
|
|
28
|
+
declare const PreviewPartsProvider: ({ children }: {
|
|
29
|
+
children: react.ReactNode;
|
|
30
|
+
}) => react.JSX.Element;
|
|
31
|
+
declare const usePreviewParts: () => PreviewIdSelection<"selectedPartId">;
|
|
32
|
+
|
|
33
|
+
export { PreviewPartsProvider, usePreviewParts };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{PreviewPartsProvider,usePreviewParts}from"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{ScreenChrome as default}from"../../chunk-HDKTR5TZ.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-Q2HPBMG5.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-AKFJK65Z.js";import"../../chunk-PWZOS45R.js";import"../../chunk-7F52SZOI.js";import"../../chunk-R2HLPNQF.js";import"../../chunk-HWW4XJOH.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-OM67AJQC.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-5MZ3RNQQ.js";import"../../chunk-SERF2FAU.js";import"../../chunk-GXN65JMA.js";import"../../chunk-VV5ADNBR.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-F6CCTEIX.js";import"../../chunk-FUDHI5I4.js";import"../../chunk-LG436UTD.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-YJXEHK6I.js";import"../../chunk-7MU3RJ6S.js";import"../../chunk-A7ZJII7O.js";import"../../chunk-6FY3PZS3.js";import"../../chunk-AKZWUV5Z.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-OYX47SL7.js";import"../../chunk-HMX55DYT.js";import"../../chunk-Q3SQBNJB.js";import"../../chunk-3WSPDAK2.js";import"../../chunk-R5ZVNJLJ.js";import"../../chunk-57DJOKXT.js";import"../../chunk-3QVB4AG2.js";import"../../chunk-OORDMLL4.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-GENAF3P6.js";import"../../chunk-4MXFKJUY.js";import"../../chunk-IWAPPEL4.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KDYIMJTZ.js";import"../../chunk-6TZTKAB5.js";import"../../chunk-AJBJ74ME.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-3M3A3DN2.js";import"../../chunk-ZZ7VLIHQ.js";import"../../chunk-NBJ2YY6Y.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-ZWK3CBRU.js";import"../../chunk-P67FP7PG.js";import"../../chunk-AELNNAFM.js";import"../../chunk-BXZ6WLHC.js";import"../../chunk-EOJNJCMJ.js";import"../../chunk-ZFDCDJNZ.js";import"../../chunk-ZNS7727Y.js";import"../../chunk-3EDSDPIP.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-RW4XBUUW.js";import"../../chunk-KTVH2ZRL.js";import"../../chunk-2LK54I4E.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-OWBO4WKA.js";import"../../chunk-BDTITTMW.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-6DJHRLCU.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-JUQ6YJCG.js";import"../../chunk-RE4LP46F.js";import"../../chunk-WZ7TGAAT.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-EWVJSRRY.js";import"../../chunk-P6O363EE.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-TTJ54QGG.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|