efficient-easel 0.101.0 → 0.102.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 +37 -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-3QVB4AG2.js +3 -0
- package/dist/chunk-3U4GP5VA.js +10 -0
- package/dist/chunk-3WSPDAK2.js +1 -0
- package/dist/chunk-4ES5JGGX.js +1 -0
- package/dist/chunk-5464H65G.js +4 -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-6DJHRLCU.js +25 -0
- package/dist/chunk-6FY3PZS3.js +1 -0
- package/dist/chunk-6TZTKAB5.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-7RNTMJER.js +5 -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-D7M6IRPJ.js +8 -0
- package/dist/chunk-DUVRZ456.js +1 -0
- package/dist/chunk-E7GGVILG.js +1 -0
- package/dist/chunk-F2FPZIZV.js +62 -0
- package/dist/chunk-F6CCTEIX.js +1 -0
- package/dist/chunk-FGNR22NY.js +1 -0
- package/dist/chunk-FT35FX7D.js +2 -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-GXQCZJOP.js +1 -0
- package/dist/chunk-GZO72N3Q.js +0 -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-J4RAY75C.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-OM67AJQC.js +1 -0
- package/dist/chunk-OYX47SL7.js +1 -0
- package/dist/chunk-P67FP7PG.js +9 -0
- package/dist/chunk-PP44LCJM.js +1 -0
- package/dist/chunk-PWZOS45R.js +2 -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-TEZ6V6PA.js +4 -0
- package/dist/chunk-TTJ54QGG.js +18 -0
- package/dist/chunk-UH7TGWHR.js +1 -0
- package/dist/chunk-UVWVYMMZ.js +1 -0
- package/dist/chunk-VLSTGOVD.js +2 -0
- package/dist/chunk-VV5ADNBR.js +1 -0
- package/dist/chunk-ZE7I3PLX.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-B-byaQxg.d.ts +480 -0
- package/dist/menu/index.js +1 -1
- package/dist/node-ops/index.js +1 -1
- package/dist/panel/index.js +16 -16
- 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 +75 -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 +230 -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 +126 -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 +727 -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 +1088 -0
- package/dist/session-DSQFmIvx.d.ts +43 -0
- package/dist/strings/catalogue.d.ts +4 -2
- package/dist/strings/catalogue.js +1 -1
- package/dist/strings/index.d.ts +4 -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 +343 -2
- package/dist/chunk-IG3U5NWJ.js +0 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { BlockChoice } from './block-choice.js';
|
|
2
|
+
import { SlotSectionSpec } from './slot-section-spec.js';
|
|
3
|
+
|
|
4
|
+
/** Which registry answered — the discriminator three of the four decisions read. */
|
|
5
|
+
type AddTargetSource = "section" | "footer" | "container";
|
|
6
|
+
/**
|
|
7
|
+
* What a parent can take, and everything the four decisions below need to act on
|
|
8
|
+
* it.
|
|
9
|
+
*
|
|
10
|
+
* ⚠️ THE LOOKUP DECIDES FOUR THINGS, NOT ONE. Wiring only the choice list ships
|
|
11
|
+
* a menu with wrong row names, wrong handlers, and unreachable on an empty
|
|
12
|
+
* container — which is why this returns a record rather than a list:
|
|
13
|
+
*
|
|
14
|
+
* 1 the CHOICE LIST — {@link AddTarget.choices}, what the Add menu offers, or
|
|
15
|
+
* `null` where the parent adds ONE child type from a button instead.
|
|
16
|
+
* 2 the ROW NAME — `rowNamerFor` (components/SlotChildRows) reads
|
|
17
|
+
* {@link AddTarget.source} to pick the FOOTER's block-label rule over
|
|
18
|
+
* lib/puck/slot-child-name.ts. It must ask "is this a FOOTER block", NOT
|
|
19
|
+
* "does this parent use a menu": a Box adds from a menu too and
|
|
20
|
+
* keeps the slot-child rule, or its Headings, Texts and Buttons all fall
|
|
21
|
+
* through to a rule that reads a heading, a bound menu and first-words.
|
|
22
|
+
* 3 WHICH HANDLERS — SectionScreenShell's adapter reads `source` to choose
|
|
23
|
+
* which pair of host handlers a row presses. Keyed the other way round it
|
|
24
|
+
* answered null for a Box, whose rows then pressed and did nothing.
|
|
25
|
+
* 4 REACHABILITY — `Boolean(canAddTo(type))` feeds `nestState`, and a row
|
|
26
|
+
* folds open only if it has children OR an add affordance. An EMPTY
|
|
27
|
+
* container with no caret cannot be opened to reach its own menu — and
|
|
28
|
+
* empty is exactly the state a merchant is in when adding the first block.
|
|
29
|
+
*/
|
|
30
|
+
interface AddTarget {
|
|
31
|
+
/** Which of the three registries answered. */
|
|
32
|
+
source: AddTargetSource;
|
|
33
|
+
/**
|
|
34
|
+
* The slot this parent keeps its children on.
|
|
35
|
+
*
|
|
36
|
+
* RETURNED rather than defaulted, so a caller can never reach it by falling
|
|
37
|
+
* through another mechanism's constant — the rule container-blocks states for
|
|
38
|
+
* its own lookup, kept here because this is now the one that is asked. A Flex
|
|
39
|
+
* listed on the Footer's `blocks` would draw its rows off `undefined`.
|
|
40
|
+
*/
|
|
41
|
+
slot: string;
|
|
42
|
+
/** The registry's own choice list, or `null` for a single-type "Add …" button. */
|
|
43
|
+
choices: BlockChoice[] | null;
|
|
44
|
+
/**
|
|
45
|
+
* The section's own spec — its `addLabel`, `childType`, `seeds`, `addBlocked`,
|
|
46
|
+
* `notice` and `slider`. Non-null exactly when `source === "section"`.
|
|
47
|
+
*
|
|
48
|
+
* Carried so a caller that needs a section's own arithmetic (the Hero slide's
|
|
49
|
+
* anchor cap, the seed-on-load effect) reaches it through this one seam rather
|
|
50
|
+
* than importing the registry beside it and gaining a second opinion.
|
|
51
|
+
*/
|
|
52
|
+
spec: SlotSectionSpec | null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type { AddTarget, AddTargetSource };
|
|
File without changes
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One row of an "Add block" menu.
|
|
3
|
+
*
|
|
4
|
+
* `group` is OPTIONAL and is the menu's own heading, not a property of the
|
|
5
|
+
* block: the same `ImageBlock` is grouped in a Box's menu and ungrouped in a
|
|
6
|
+
* Slide box's, because grouping is a fact about the LIST a merchant is reading,
|
|
7
|
+
* not about the component. A list whose choices carry no group renders flat, so
|
|
8
|
+
* every menu that shipped before this stays exactly as it was.
|
|
9
|
+
*
|
|
10
|
+
* It is set at BUILD time by whichever module assembles the list, from the
|
|
11
|
+
* source each choice came from — never hand-written per row. See
|
|
12
|
+
* `lib/puck/container-blocks.ts`, which is the only assembler that sets one.
|
|
13
|
+
*/
|
|
14
|
+
type BlockChoice = {
|
|
15
|
+
type: string;
|
|
16
|
+
label: string;
|
|
17
|
+
group?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* One run of consecutive choices sharing a `group` — what a menu draws under one
|
|
21
|
+
* heading.
|
|
22
|
+
*
|
|
23
|
+
* ⚠️ ONE FUNCTION, BOTH SURFACES, and that is the whole reason it is a function.
|
|
24
|
+
* A Box's menu is drawn twice — the dropdown in `components/AddBlockRow`
|
|
25
|
+
* (reached from the Layers tree and from the box's own settings panel) and the
|
|
26
|
+
* chip row at the top of the Add panel (`components/AddSectionPanel`). They draw
|
|
27
|
+
* ONE list, so "where does a heading start" must be ONE answer; two `map`s each
|
|
28
|
+
* comparing with the previous item is how the two surfaces begin dividing the
|
|
29
|
+
* same list differently. That is the exact defect `lib/puck/add-target.ts`'s
|
|
30
|
+
* docblock is an essay about, one tier down.
|
|
31
|
+
*
|
|
32
|
+
* ⚠️ AND THE MENU'S CLASS NAME IS DELIBERATELY NOT WRITTEN IN THIS FILE.
|
|
33
|
+
* `test-footer-block-lists` §8 counts the files mentioning it to prove the menu
|
|
34
|
+
* has exactly ONE home, and it reads prose the same way it reads code — naming
|
|
35
|
+
* the class in a comment here makes this module look like a second menu. The
|
|
36
|
+
* markup lives in `components/AddBlockRow`; this is only the arithmetic.
|
|
37
|
+
*
|
|
38
|
+
* It preserves ORDER and never sorts: the list arrives in the order its assembler
|
|
39
|
+
* chose (`lib/puck/container-blocks.ts` says why that order is what it is), and a
|
|
40
|
+
* renderer is not the place to have a second opinion about it.
|
|
41
|
+
*
|
|
42
|
+
* A list whose choices carry NO group comes back as a single run with
|
|
43
|
+
* `group: undefined` — so a caller written for runs draws an ungrouped list
|
|
44
|
+
* exactly the way it drew it before groups existed, with no branch of its own.
|
|
45
|
+
*/
|
|
46
|
+
type BlockChoiceRun = {
|
|
47
|
+
group?: string;
|
|
48
|
+
items: BlockChoice[];
|
|
49
|
+
};
|
|
50
|
+
declare function blockRuns(choices: BlockChoice[]): BlockChoiceRun[];
|
|
51
|
+
|
|
52
|
+
export { type BlockChoice, type BlockChoiceRun, blockRuns };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{blockRuns}from"../../../chunk-HQ4VVRIC.js";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every block type a saved layout uses — the top-level sections and whatever
|
|
3
|
+
* sits in their slots, to any depth.
|
|
4
|
+
*
|
|
5
|
+
* WHAT IT IS FOR. A host chooses which blocks its editor offers
|
|
6
|
+
* (`WebsiteEditor`'s `blocks`), and that choice hides them in the palette, the
|
|
7
|
+
* slot menus and the drop targets. It is not a boundary: a saved page is a JSON
|
|
8
|
+
* document, and whoever can call the host's save endpoint can send one holding
|
|
9
|
+
* any type. So the host's SERVER reads the layout it was handed with this, and
|
|
10
|
+
* refuses a type it does not allow.
|
|
11
|
+
*
|
|
12
|
+
* READ BY SHAPE, WITH NO REGISTRY. A node is `{ type: string, props: {…} }`,
|
|
13
|
+
* and a slot is an array of nodes kept on a prop of its parent — directly, or
|
|
14
|
+
* inside an object or a list item. This walks every value under `props` and
|
|
15
|
+
* takes each array item of that shape as a node. It asks no block registry which
|
|
16
|
+
* props are slots, because the caller is a server that must not have to load
|
|
17
|
+
* one: this module imports nothing.
|
|
18
|
+
*
|
|
19
|
+
* That makes it wider than the editor's own walk in one direction only: a prop
|
|
20
|
+
* that merely LOOKS like a node (an object with a string `type` and an object
|
|
21
|
+
* `props`, inside an array) is counted. It does not ask for the `id` the engine
|
|
22
|
+
* gives every node, because the renderer draws a node without one and a request
|
|
23
|
+
* written by hand can leave it out. Wider is the safe side for an allow-list —
|
|
24
|
+
* it can refuse a page it might have accepted, never accept one it should have
|
|
25
|
+
* refused.
|
|
26
|
+
*
|
|
27
|
+
* `zones` — the engine's older place for slot children, which this editor has
|
|
28
|
+
* never written — is walked too, so a document from elsewhere hides nothing
|
|
29
|
+
* there.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The block types in `layout`, each once, sorted. `layout` is the page document
|
|
33
|
+
* a `WebsiteBackend` stores (`PageLayout`: `content`, `root`, `zones`); a single
|
|
34
|
+
* node — a section template's — is read the same way. Anything else answers
|
|
35
|
+
* an empty list: it holds no block.
|
|
36
|
+
*/
|
|
37
|
+
declare function blockTypesIn(layout: unknown): string[];
|
|
38
|
+
|
|
39
|
+
export { blockTypesIn };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{blockTypesIn}from"../../../chunk-5ZBY24K7.js";
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
type TreeItem = {
|
|
2
|
+
type: string;
|
|
3
|
+
props: {
|
|
4
|
+
id: string;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
type SlotConfigView = {
|
|
9
|
+
components?: Record<string, unknown>;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Which of a component type's props are SLOTS — the prop names that hold child
|
|
13
|
+
* Blocks, read off the config's field map.
|
|
14
|
+
*
|
|
15
|
+
* Puck 0.20 stores slot children INLINE on the parent's props
|
|
16
|
+
* (`props.<slotName> = [{type,props}, …]`), NOT in `data.zones` — so a walker
|
|
17
|
+
* that wants a section's children has to know which prop names to look under.
|
|
18
|
+
* That set is per-component and lives in exactly one place, `config.components`:
|
|
19
|
+
* `Grid`/`Flex` call theirs `content`, but `Hero` calls it `slides`,
|
|
20
|
+
* `Collections` `cards`, `GalleryB` `items`, `ProductGrid` `products` and
|
|
21
|
+
* `Footer`/`FooterGroup` `blocks`.
|
|
22
|
+
*
|
|
23
|
+
* This is the ONE reader of that set. Hard-coding `"content"` instead is how the
|
|
24
|
+
* heading/SEO audit came to be blind to every heading nested in a Hero slide
|
|
25
|
+
* (card 66067): the walker recursed on a prop name only two of the eight slots
|
|
26
|
+
* happen to use, so a page with two H1s reported as fine. A type the config does
|
|
27
|
+
* not know has no slots — and cannot render either, so there is nothing to walk.
|
|
28
|
+
*/
|
|
29
|
+
declare function slotFieldsOf(config: SlotConfigView, type: string): string[];
|
|
30
|
+
/**
|
|
31
|
+
* A slot child, addressed the way the Layers tree selects it: the node, the
|
|
32
|
+
* compound zone key "<parentId>:<slotName>" Puck's ops take, and its index in
|
|
33
|
+
* that slot.
|
|
34
|
+
*/
|
|
35
|
+
type SlotChild = {
|
|
36
|
+
child: TreeItem;
|
|
37
|
+
zone: string;
|
|
38
|
+
index: number;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Every slot child of `item`, across EVERY slot field its type declares — so a
|
|
42
|
+
* type with two slots reports both, and nesting is general: the result's `child`
|
|
43
|
+
* is itself an item this function accepts.
|
|
44
|
+
*
|
|
45
|
+
* Puck 0.20 stores slot children INLINE on the parent's props, so this reads the
|
|
46
|
+
* arrays rather than `data.zones` (which stays empty for slots).
|
|
47
|
+
*/
|
|
48
|
+
declare function childSlotsOf(config: SlotConfigView, item: TreeItem): SlotChild[];
|
|
49
|
+
/**
|
|
50
|
+
* WHERE a node sits in the document — the node itself, the zone key its own
|
|
51
|
+
* array is addressed by, and its index in that array. Exactly the three
|
|
52
|
+
* arguments a Puck `replace` / `remove` / `reorder` op takes.
|
|
53
|
+
*/
|
|
54
|
+
type NodeLocation = {
|
|
55
|
+
item: TreeItem;
|
|
56
|
+
zone: string;
|
|
57
|
+
index: number;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Find a node by id and say WHERE IT IS, anywhere in the document — the root
|
|
61
|
+
* list or any slot at any depth.
|
|
62
|
+
*
|
|
63
|
+
* ── WHY A PANEL NEEDS THIS ──────────────────────────────────────────────────
|
|
64
|
+
* `useEasel((s) => s)` hands a field the SELECTED node and, in `ui.itemSelector`, the
|
|
65
|
+
* zone and index of that node. A control that has to rewrite the node's PARENT
|
|
66
|
+
* — "Apply to all cards" writes the whole Collections node once, so one press is
|
|
67
|
+
* one undo step — gets only half of what it needs: the selector's zone is the
|
|
68
|
+
* compound `"<parentId>:cards"`, which names the parent but says nothing about
|
|
69
|
+
* where the PARENT itself lives. Without that, the write has nowhere to go.
|
|
70
|
+
*
|
|
71
|
+
* ⚠️ IT IS NOT `enclosingSectionProps`, AND THE DIFFERENCE IS NOT COSMETIC.
|
|
72
|
+
* That one answers "which TOP-LEVEL section is this inside", returns props, and
|
|
73
|
+
* deliberately returns `null` for the immediate parent when the parent is not a
|
|
74
|
+
* root section. This one answers "where is THIS node", returns an address, and
|
|
75
|
+
* is happy to name a node nested inside a Box inside a Box. Its own docblock
|
|
76
|
+
* asks for a third question to be a third function rather than a third shape
|
|
77
|
+
* returned by the same walker; this is that function.
|
|
78
|
+
*
|
|
79
|
+
* ⚠️ AND IT IS NOT `childSlotsOf` WITH A FILTER. That lists one node's children;
|
|
80
|
+
* this searches a whole document. It is BUILT on `childSlotsOf` so the set of
|
|
81
|
+
* slot prop names stays read in exactly one place — hard-coding `"content"`
|
|
82
|
+
* instead is how the heading audit went blind to every heading nested in a Hero
|
|
83
|
+
* slide (card 66067), and the reason is written out on `slotFieldsOf`.
|
|
84
|
+
*
|
|
85
|
+
* ⚠️ THE CHROME ALREADY ANSWERS THIS, AND THAT IS NOT A DUPLICATE OF THIS.
|
|
86
|
+
* `ScreenChrome` memoises a Map of EVERY node's address (plus each
|
|
87
|
+
* zone's whole sibling list) and hands the lookup to the context menu as
|
|
88
|
+
* `locate`. That map is built once per document for a surface that needs all of
|
|
89
|
+
* it; this finds ONE node and is reachable from a Puck field, which the map is
|
|
90
|
+
* not — it lives in a component's closure and rides no context. What must not
|
|
91
|
+
* be two things is the set of SLOT PROP NAMES, and it is not: both walk through
|
|
92
|
+
* `childSlotsOf`, so an address here and an address there cannot disagree.
|
|
93
|
+
* Puck's own `getSelectorForId` is a third reader of the same fact, and the one
|
|
94
|
+
* a live store already offers — it is a hook-bound function, so a guard cannot
|
|
95
|
+
* call it, which is the whole reason this one is written pure.
|
|
96
|
+
*
|
|
97
|
+
* PURE, and takes the config as an argument, so a guard can assert against it
|
|
98
|
+
* without a Puck store, a React tree or a hook.
|
|
99
|
+
*
|
|
100
|
+
* `null` when no node carries the id — the honest answer for a stale selection,
|
|
101
|
+
* and every caller treats it as "there is nothing to write".
|
|
102
|
+
*/
|
|
103
|
+
declare function locateNode(config: SlotConfigView, content: ReadonlyArray<TreeItem>, id: string): NodeLocation | null;
|
|
104
|
+
/**
|
|
105
|
+
* How many levels of slot children the Layers tree draws below a top-level row.
|
|
106
|
+
*
|
|
107
|
+
* The tree is a ~288px panel that already scrolls and each level costs 10px of
|
|
108
|
+
* indent (`.sf-subtree`'s `padding-left`, storefront-editor.css — it was 25px
|
|
109
|
+
* until card 66199 took the drag grip out of the flow and moved the caret to the
|
|
110
|
+
* row's right end), so the depth is capped rather than unbounded: `Grid.content`
|
|
111
|
+
* is an open slot that accepts a Grid, so a document CAN nest without limit and a
|
|
112
|
+
* tree that followed it would run out of width.
|
|
113
|
+
*
|
|
114
|
+
* ⚠️ 3 SINCE CARD 66273, and the level it buys is the one a merchant was stuck
|
|
115
|
+
* on. A hero group's blocks are the THIRD level — Hero → slide → group → blocks
|
|
116
|
+
* — and at 2 a group row was a LEAF: no `.sf-subtree` was rendered under it, so
|
|
117
|
+
* the "Add block" row that lives inside that subtree had nowhere to go, and a
|
|
118
|
+
* merchant who made a group in the tree could not put anything into it. The
|
|
119
|
+
* number was 2 because the Footer's chain (Footer → blocks → Group → blocks) was
|
|
120
|
+
* the only one that existed when the cap was named; the hero's is one level
|
|
121
|
+
* deeper.
|
|
122
|
+
*
|
|
123
|
+
* The Footer is unaffected, measured rather than hoped: `FooterGroup.blocks`
|
|
124
|
+
* allows FooterText / FooterEmailSignup / FooterMenu / FooterDivider and none of
|
|
125
|
+
* those owns a slot, so no footer row grows a third level. What DOES gain one is
|
|
126
|
+
* a container nested inside a container (a Box in a Box) —
|
|
127
|
+
* blocks a merchant can already build and could not see.
|
|
128
|
+
*/
|
|
129
|
+
declare const TREE_MAX_DEPTH = 6;
|
|
130
|
+
/**
|
|
131
|
+
* Does the Layers tree draw a subtree under a node of `type` sitting at `depth`?
|
|
132
|
+
* True only when the type owns at least one slot AND the level is inside the cap.
|
|
133
|
+
* `depth` is 1 for a section's own children (the first `.sf-subtree`).
|
|
134
|
+
*
|
|
135
|
+
* The ONE place the cap is decided — both tree renderers and the "collapse all"
|
|
136
|
+
* gather read it here, so a row that folds and a row that draws children can
|
|
137
|
+
* never disagree about which rows those are.
|
|
138
|
+
*/
|
|
139
|
+
declare function nestsInTree(config: SlotConfigView, type: string, depth: number): boolean;
|
|
140
|
+
declare const newNodeId: (type: string) => string;
|
|
141
|
+
declare const HEADER_TYPE = "Header";
|
|
142
|
+
declare const FOOTER_TYPE = "Footer";
|
|
143
|
+
declare const ROOT_ZONE = "root:default-zone";
|
|
144
|
+
/**
|
|
145
|
+
* Indices of the DUPLICATE pinned chrome sections in a top-level content array —
|
|
146
|
+
* every Header/Footer node PAST the first of its type, in ascending order. Empty
|
|
147
|
+
* when the array already holds at most one of each (the healthy case), so a caller
|
|
148
|
+
* can skip the rewrite. Keeping the FIRST of each type matches exactly what the
|
|
149
|
+
* Sections tree shows (footerIndex/findIndex), so healing never surprises the
|
|
150
|
+
* author by dropping the copy they were looking at. Accepts a loose node shape so
|
|
151
|
+
* both the editor's `TreeItem[]` and the published render's untyped content pass.
|
|
152
|
+
*/
|
|
153
|
+
declare function pinnedDuplicateIndices(content: ReadonlyArray<{
|
|
154
|
+
type?: string;
|
|
155
|
+
}>): number[];
|
|
156
|
+
/**
|
|
157
|
+
* Ids of the DUPLICATE pinned chrome sections — the id-anchored counterpart of
|
|
158
|
+
* pinnedDuplicateIndices, derived FROM it so the two can never disagree about
|
|
159
|
+
* which copy is the keeper (the first of each type).
|
|
160
|
+
*
|
|
161
|
+
* A LIVE store must be edited by identity, never by position: an index computed
|
|
162
|
+
* from a render snapshot addresses whatever has since shifted into that slot,
|
|
163
|
+
* which is how the old editor heal deleted real sections. Ids survive that skew
|
|
164
|
+
* — the worst a stale read can do is name a node that is no longer there. A
|
|
165
|
+
* duplicate carrying no id is skipped (it cannot be named in a remove); the
|
|
166
|
+
* published render's index-based dedupe still drops it.
|
|
167
|
+
*/
|
|
168
|
+
declare function pinnedDuplicateIds(content: ReadonlyArray<{
|
|
169
|
+
type?: string;
|
|
170
|
+
props?: {
|
|
171
|
+
id?: unknown;
|
|
172
|
+
};
|
|
173
|
+
}>): string[];
|
|
174
|
+
/**
|
|
175
|
+
* Which pinned chrome types a document is MISSING, and a load-time seed must
|
|
176
|
+
* therefore create. A type counts as missing only when it is absent from BOTH:
|
|
177
|
+
*
|
|
178
|
+
* - `live` — the editor's Puck store, read at the moment of the write; and
|
|
179
|
+
* - `persisted` — the document exactly as it was LOADED from the backend.
|
|
180
|
+
*
|
|
181
|
+
* Requiring both is what makes seeding idempotent, and neither check can be
|
|
182
|
+
* dropped. Trusting `live` alone was the duplicate-Header bug: a remount re-armed
|
|
183
|
+
* the seed's per-mount guard while a snapshot that lagged the store reported "no
|
|
184
|
+
* Header", so a second one was appended next to the first. Trusting `persisted`
|
|
185
|
+
* alone would re-seed a node this session has already inserted but not yet saved.
|
|
186
|
+
*
|
|
187
|
+
* Returned in no particular order — the CALLER owns the insert order, because
|
|
188
|
+
* only it knows that the Footer is pinned last and the Header first.
|
|
189
|
+
*/
|
|
190
|
+
declare function missingPinnedTypes(live: ReadonlyArray<{
|
|
191
|
+
type?: string;
|
|
192
|
+
}>, persisted: ReadonlyArray<{
|
|
193
|
+
type?: string;
|
|
194
|
+
}>): string[];
|
|
195
|
+
|
|
196
|
+
export { FOOTER_TYPE, HEADER_TYPE, type NodeLocation, ROOT_ZONE, type SlotChild, type SlotConfigView, TREE_MAX_DEPTH, type TreeItem, childSlotsOf, locateNode, missingPinnedTypes, nestsInTree, newNodeId, pinnedDuplicateIds, pinnedDuplicateIndices, slotFieldsOf };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{FOOTER_TYPE,HEADER_TYPE,ROOT_ZONE,TREE_MAX_DEPTH,childSlotsOf,locateNode,missingPinnedTypes,nestsInTree,newNodeId,pinnedDuplicateIds,pinnedDuplicateIndices,slotFieldsOf}from"../../../chunk-FUDHI5I4.js";
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { PreviewDevice } from '../../components/PreviewDeviceContext.js';
|
|
3
|
+
import '../content/view-tiers.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* lib/puck/device-fields.tsx — show the setting for the device the merchant is
|
|
7
|
+
* currently looking at, and only that one.
|
|
8
|
+
*
|
|
9
|
+
* THE PROBLEM. A section that can be sized differently on a phone stores TWO
|
|
10
|
+
* props and the panel drew BOTH, side by side, told apart only by a "(desktop)"
|
|
11
|
+
* / "(mobile)" suffix on the label. The canvas already knows which device is on
|
|
12
|
+
* screen; the panel ignored it, so the merchant read labels to find the control
|
|
13
|
+
* that matched what they were looking at.
|
|
14
|
+
*
|
|
15
|
+
* THE MECHANISM, and why this one. A Puck `resolveFields` cannot do it: in this
|
|
16
|
+
* Puck version the fields slice re-resolves only when the selected node's DATA
|
|
17
|
+
* changes (`useRegisterFieldsSlice` subscribes to `state.indexes.nodes[id]`), and
|
|
18
|
+
* switching device changes no data — the panel would keep whatever field set the
|
|
19
|
+
* last edit produced. So the decision is made where it can re-render freely: in
|
|
20
|
+
* the FIELD ITSELF, off the React context the editor chrome already publishes
|
|
21
|
+
* (`components/PreviewDeviceContext`, which the per-view Footer controls read
|
|
22
|
+
* for the same reason). One context, no prop threaded anywhere, and every house
|
|
23
|
+
* control is already a `type: "custom"` render, so wrapping one costs nothing.
|
|
24
|
+
*
|
|
25
|
+
* ⚠️ HIDDEN IS NOT DELETED. {@link deviceField} returns the SAME field object
|
|
26
|
+
* with the same markers (`__media`, `__text`, …) and the same key; only its
|
|
27
|
+
* paint is gated. Both props keep existing, keep their keys, keep their values
|
|
28
|
+
* and keep their `defaultProps`. Switch to Phone, type a size, switch back — the
|
|
29
|
+
* desktop size is exactly where it was, because nothing ever wrote to it.
|
|
30
|
+
* `scripts/test-device-fields.tsx` pins that round trip.
|
|
31
|
+
*
|
|
32
|
+
* TABLET (owner ruling, card 66066). There are no tablet-specific stored values
|
|
33
|
+
* today, and inventing them would mean a new stored prop on every section — a
|
|
34
|
+
* different card. So tablet shows the DESKTOP values and the panel SAYS SO
|
|
35
|
+
* ({@link DEVICE_NOTE}); it never presents desktop values as if they were
|
|
36
|
+
* tablet's. {@link shownTier} is the single place that ruling is written down.
|
|
37
|
+
*
|
|
38
|
+
* WHY THE HIDDEN FIELD LEAVES NO GAP. Puck wraps every top-level field in its
|
|
39
|
+
* own padded `_PuckFields-field_` box before it calls `render`, so a field that
|
|
40
|
+
* renders nothing would still cost ~37px of empty panel. The gate instead paints
|
|
41
|
+
* a zero-size marker and `components/storefront-editor.css` collapses the
|
|
42
|
+
* wrapper that contains one — the same "reach the wrapper Puck owns" trick the
|
|
43
|
+
* fold reflow in `controls.tsx` already relies on, expressed as one CSS rule
|
|
44
|
+
* instead of a second DOM pass (so it cannot race the fold's).
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
/** The two tiers a stored value can belong to. Tablet is not one — see
|
|
48
|
+
* {@link shownTier}. */
|
|
49
|
+
type DeviceTier = "desktop" | "mobile";
|
|
50
|
+
/**
|
|
51
|
+
* Which tier's stored values the panel shows for a given preview device.
|
|
52
|
+
*
|
|
53
|
+
* The owner ruling in one expression: phone shows the phone values, everything
|
|
54
|
+
* else — desktop AND tablet — shows the desktop values.
|
|
55
|
+
*/
|
|
56
|
+
declare function shownTier(device: PreviewDevice): DeviceTier;
|
|
57
|
+
/**
|
|
58
|
+
* The quiet line the panel puts above a section's settings, so a merchant can
|
|
59
|
+
* always tell WHICH device's value they are editing without reading the canvas.
|
|
60
|
+
*
|
|
61
|
+
* Desktop says nothing: it is the resting state, and a banner that is always
|
|
62
|
+
* there is a banner nobody reads. Tablet says the ruling out loud rather than
|
|
63
|
+
* letting the desktop values pass for tablet's own.
|
|
64
|
+
*/
|
|
65
|
+
declare const DEVICE_NOTE: Readonly<Record<PreviewDevice, string | null>>;
|
|
66
|
+
/** The attribute the stylesheet looks for to collapse a gated-off field's Puck
|
|
67
|
+
* wrapper. Declared here, matched once in `components/storefront-editor.css`. */
|
|
68
|
+
declare const DEVICE_HIDDEN_ATTR = "data-sf-device-hidden";
|
|
69
|
+
/** A house control's render, seen from outside: the builders in `controls.tsx`
|
|
70
|
+
* each type their own props, so the gate takes the widest shape that can be
|
|
71
|
+
* passed straight back through. */
|
|
72
|
+
type FieldRender = (props: Record<string, unknown>) => ReactElement;
|
|
73
|
+
/** Any house control — every one of them is a `type: "custom"` field whose
|
|
74
|
+
* `render` is a plain function of its props. */
|
|
75
|
+
type AnyCustomField = {
|
|
76
|
+
type: "custom";
|
|
77
|
+
render: FieldRender;
|
|
78
|
+
};
|
|
79
|
+
/** Marker carried by every gated field, in the same style as
|
|
80
|
+
* {@link import("./controls").FOLD_FIELD_MARKER}: the tier and the field it
|
|
81
|
+
* wraps live ON the field object, never only inside the render closure. Without
|
|
82
|
+
* it a gated control is opaque to every static walk — and the fold guard in
|
|
83
|
+
* `scripts/test-section-groups.ts` genuinely needs to see the header underneath
|
|
84
|
+
* to check its label against what it draws. Puck ignores extra keys. */
|
|
85
|
+
declare const DEVICE_FIELD_MARKER: "__device";
|
|
86
|
+
/** The payload on {@link DEVICE_FIELD_MARKER}. */
|
|
87
|
+
type DeviceFieldMeta = {
|
|
88
|
+
tier: DeviceTier;
|
|
89
|
+
inner: unknown;
|
|
90
|
+
};
|
|
91
|
+
/** Read a field's device payload, or null when it is not gated. The ONE place
|
|
92
|
+
* that knows the marker's shape. */
|
|
93
|
+
declare function deviceMetaOf(field: unknown): DeviceFieldMeta | null;
|
|
94
|
+
/** The field a gate wraps, or the field itself when it wraps nothing — what a
|
|
95
|
+
* static walk wants to look at. */
|
|
96
|
+
declare function withoutDeviceGate(field: unknown): unknown;
|
|
97
|
+
/**
|
|
98
|
+
* Paint `field` only while the canvas is showing `tier`.
|
|
99
|
+
*
|
|
100
|
+
* Everything else about the field is preserved by identity-spread — its `type`,
|
|
101
|
+
* its manifest markers, its data keys — so the media and neutralization walks,
|
|
102
|
+
* the field-key census and every stored prop see exactly what they saw before.
|
|
103
|
+
*/
|
|
104
|
+
declare function deviceField<F extends {
|
|
105
|
+
type: "custom";
|
|
106
|
+
render: (p: never) => ReactElement;
|
|
107
|
+
}>(tier: DeviceTier, field: F): F;
|
|
108
|
+
/**
|
|
109
|
+
* The panel's device indicator — one quiet line, and only when there is
|
|
110
|
+
* something to say (see {@link DEVICE_NOTE}).
|
|
111
|
+
*
|
|
112
|
+
* Declared as a FIELD rather than painted by the chrome so it sits inside the
|
|
113
|
+
* settings panel it describes, above the first group, and so a section that has
|
|
114
|
+
* no device-varying control never shows it. It edits nothing: like `group()` /
|
|
115
|
+
* `section()` it is a header, with no prop behind it.
|
|
116
|
+
*
|
|
117
|
+
* …WHICH IS WHY IT SAYS SO ON THE FIELD (card 66201). A note is not a control, so
|
|
118
|
+
* a heading with nothing but this under it is a heading over nothing — and it is
|
|
119
|
+
* the whole reason the Hero's Content tab was empty: `_dDevice` is the section's
|
|
120
|
+
* first field, so it opened the implicit leading Content run and gave the panel a
|
|
121
|
+
* Content tab with only a banner in it, while the hero's actual copy is edited in
|
|
122
|
+
* the Text sub-panel.
|
|
123
|
+
*/
|
|
124
|
+
declare function deviceNote(): AnyCustomField;
|
|
125
|
+
|
|
126
|
+
export { DEVICE_FIELD_MARKER, DEVICE_HIDDEN_ATTR, DEVICE_NOTE, type DeviceFieldMeta, type DeviceTier, deviceField, deviceMetaOf, deviceNote, shownTier, withoutDeviceGate };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{DEVICE_FIELD_MARKER,DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceMetaOf,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-PWZOS45R.js";import"../../../chunk-7F52SZOI.js";import"../../../chunk-BSPCSC45.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { S as SettingsBucket } from '../../../buckets-CuLM47h9.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* lib/puck/field-buckets.ts — the four settings buckets a section's fields are
|
|
5
|
+
* sorted into, and the field key each bucket's header is emitted under.
|
|
6
|
+
*
|
|
7
|
+
* Moved out of lib/puck/field-groups (which re-exports both) so the editor's
|
|
8
|
+
* screen can read a bucket header's key — the style clipboard copies a look by
|
|
9
|
+
* the buckets it sits in — without importing the field builders that sort a
|
|
10
|
+
* section's fields (doc/adr/0004). The reasoning behind the buckets themselves
|
|
11
|
+
* stays in field-groups, beside the pass that applies them.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
type Bucket = SettingsBucket;
|
|
15
|
+
/**
|
|
16
|
+
* The field key each bucket's header is emitted under. `_s*` because these are
|
|
17
|
+
* level-1 headers (`section()`), matching the `_s*` convention the sections that
|
|
18
|
+
* already carry level-1 headers use (`_sText`, `_sImage`, `_sSetup`, …).
|
|
19
|
+
*/
|
|
20
|
+
declare const BUCKET_KEY: Record<Bucket, string>;
|
|
21
|
+
|
|
22
|
+
export { BUCKET_KEY, type Bucket };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{BUCKET_KEY}from"../../../chunk-R2HLPNQF.js";
|