efficient-easel 24.1.0 → 25.0.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 +43 -2
- package/dist/{CanvasDragLayer-NZpaX6aq.d.ts → CanvasDragLayer-DXeQGrwJ.d.ts} +42 -3
- package/dist/canvas/index.d.ts +2 -139
- package/dist/canvas/index.js +1 -1
- package/dist/chrome/index.js +1 -1
- package/dist/{chunk-6NJHYXJM.js → chunk-3XECMGXX.js} +1 -1
- package/dist/chunk-4OMAA45Q.js +5 -0
- package/dist/{chunk-G67G63O5.js → chunk-4Y3TK65H.js} +1 -1
- package/dist/chunk-53ME3GAI.js +16 -0
- package/dist/{chunk-FRAIEWRC.js → chunk-62UGN7VM.js} +1 -1
- package/dist/{chunk-HNKB2ZYR.js → chunk-6ATIYLUL.js} +1 -1
- package/dist/{chunk-Y53EKN35.js → chunk-6EDVZBUO.js} +1 -1
- package/dist/chunk-7UFKEX72.js +1 -0
- package/dist/chunk-CEC5XLN4.js +1 -0
- package/dist/chunk-CWELHADJ.js +1 -0
- package/dist/chunk-DX3VILZ3.js +6 -0
- package/dist/chunk-ERB6FAZT.js +2 -0
- package/dist/{chunk-TGZCD6IP.js → chunk-EUFDQ4KL.js} +1 -1
- package/dist/chunk-FR7EEKFF.js +1 -0
- package/dist/{chunk-75C6WFNF.js → chunk-FYV6GZXP.js} +1 -1
- package/dist/chunk-GDO4QJ4G.js +1 -0
- package/dist/chunk-GEPSJJWW.js +1 -0
- package/dist/{chunk-GMCZXMOV.js → chunk-GR3XRILS.js} +1 -1
- package/dist/chunk-H6BER2EU.js +1 -0
- package/dist/chunk-JIP5JNRB.js +1 -0
- package/dist/{chunk-AGWKB77Q.js → chunk-K53PQAMP.js} +1 -1
- package/dist/{chunk-CLOS6SSX.js → chunk-KO47WAWR.js} +1 -1
- package/dist/chunk-KTV7ORWF.js +64 -0
- package/dist/chunk-LUG22U5L.js +1 -0
- package/dist/{chunk-DDH2DYQP.js → chunk-LUOY3A3Q.js} +1 -1
- package/dist/{chunk-OITNWE52.js → chunk-M4THI4OO.js} +1 -1
- package/dist/chunk-MBEUSPIN.js +18 -0
- package/dist/chunk-MIX7EGRG.js +2 -0
- package/dist/{chunk-2FYFAAAK.js → chunk-OXOUGEAT.js} +1 -1
- package/dist/chunk-PMRN5Z3T.js +1 -0
- package/dist/{chunk-55KKGABA.js → chunk-PVBDKBJB.js} +1 -1
- package/dist/{chunk-RPMSET77.js → chunk-QTHQPJWA.js} +1 -1
- package/dist/{chunk-ISS72IKO.js → chunk-QZJKWKGH.js} +1 -1
- package/dist/{chunk-IYHO4XQX.js → chunk-S6YOIRXQ.js} +1 -1
- package/dist/{chunk-5PXVT7JY.js → chunk-SBVIW3KJ.js} +1 -1
- package/dist/chunk-SC6E3UUS.js +13 -0
- package/dist/chunk-SSDKT4AY.js +9 -0
- package/dist/chunk-TOKMFZPB.js +1 -0
- package/dist/chunk-U3LTJSBU.js +20 -0
- package/dist/{chunk-WYTPBF3Q.js → chunk-VBEVZZTV.js} +11 -11
- package/dist/chunk-VIUES5R6.js +8 -0
- package/dist/{chunk-4ESG53BH.js → chunk-YFHKE54W.js} +1 -1
- package/dist/chunk-YYD257TD.js +1 -0
- package/dist/chunk-ZLOMH2PD.js +1 -0
- package/dist/{chunk-CE5SGCN2.js → chunk-ZYOQXBJF.js} +3 -3
- package/dist/copy/index.js +13 -13
- package/dist/copy-place-CQIemdtU.d.ts +25 -0
- package/dist/data/index.d.ts +4 -1
- package/dist/data/index.js +1 -1
- package/dist/dom-BpxMcHFP.d.ts +200 -0
- package/dist/drag/index.d.ts +2 -3
- package/dist/drag/index.js +1 -1
- package/dist/draw/index.d.ts +1 -1
- package/dist/draw/index.js +1 -1
- package/dist/easel/index.d.ts +67 -1
- package/dist/easel/index.js +1 -1
- package/dist/edit-lock/index.d.ts +0 -46
- package/dist/edit-lock/index.js +1 -1
- package/dist/fields/fields.css +6 -40
- package/dist/fields/index.d.ts +1 -6
- package/dist/fields/index.js +1 -1
- package/dist/node-ops/index.js +1 -1
- package/dist/page-copy/index.d.ts +110 -0
- package/dist/page-copy/index.js +5 -0
- package/dist/panel/index.d.ts +29 -34
- package/dist/panel/index.js +1 -1
- package/dist/panel/panel.css +0 -78
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.d.ts +37 -57
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.d.ts +19 -11
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/SaveControls.d.ts +10 -11
- package/dist/screen/components/SaveControls.js +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenDocumentContext.js +1 -1
- package/dist/screen/components/ScreenMount.d.ts +5 -6
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.d.ts +8 -9
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +17 -17
- package/dist/screen/components/SidePanelHead.js +1 -1
- package/dist/screen/components/panel-widths.js +1 -1
- package/dist/screen/components/usePartBridge.d.ts +10 -11
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.d.ts +9 -10
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/document/block-set-host.d.ts +55 -0
- package/dist/screen/lib/document/block-set-host.js +1 -0
- package/dist/screen/lib/document/block-types-in.js +1 -1
- package/dist/screen/lib/document/box-fields.d.ts +70 -3
- package/dist/screen/lib/document/box-fields.js +1 -9
- package/dist/screen/lib/document/device-fields.js +1 -1
- package/dist/screen/lib/document/palette-sections.d.ts +33 -97
- package/dist/screen/lib/document/palette-sections.js +1 -1
- package/dist/screen/lib/document/preview-dom.js +1 -1
- package/dist/screen/lib/document/section-doc.js +1 -1
- package/dist/screen/lib/document/style-clipboard.d.ts +10 -11
- package/dist/screen/lib/document/style-clipboard.js +1 -1
- package/dist/screen/lib/document/use-section-ops.js +1 -1
- package/dist/screen/lib/document-switch.js +1 -1
- package/dist/screen/lib/failure.js +1 -1
- package/dist/screen/lib/host-inbound.js +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/media-picker.js +1 -1
- package/dist/screen/lib/page-lock.js +1 -1
- package/dist/screen/lib/screen-parts.d.ts +265 -13
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/screen.css +6 -0
- package/dist/screen/words.d.ts +9 -0
- package/dist/screen/words.js +1 -1
- package/dist/strings/index.d.ts +4 -1
- package/dist/strings/index.js +2 -2
- package/dist/style-clipboard/index.d.ts +0 -32
- package/dist/style-clipboard/index.js +1 -1
- package/dist/text-styles/index.d.ts +7 -6
- package/dist/text-styles/index.js +37 -36
- package/dist/text-styles/text-styles.css +5 -53
- package/dist/tree/index.d.ts +2 -2
- package/dist/{types-DBy3L69b.d.ts → types-CoUTWUwB.d.ts} +1 -1
- package/dist/words-Dl8Qja4K.d.ts +32 -0
- package/package.json +15 -3
- package/dist/chunk-3FIS2FRS.js +0 -1
- package/dist/chunk-7RSE6KKY.js +0 -1
- package/dist/chunk-AAAZ2CQR.js +0 -1
- package/dist/chunk-CMPFUJ26.js +0 -8
- package/dist/chunk-CZAAGBVL.js +0 -7
- package/dist/chunk-DSKNJXB4.js +0 -1
- package/dist/chunk-FJTCSQWK.js +0 -16
- package/dist/chunk-H4Z2V56N.js +0 -21
- package/dist/chunk-K7MMLCTT.js +0 -2
- package/dist/chunk-KRL3IUV3.js +0 -1
- package/dist/chunk-LF3FUSCQ.js +0 -1
- package/dist/chunk-LN43DP2A.js +0 -18
- package/dist/chunk-MRWVYSU5.js +0 -64
- package/dist/chunk-QORC32JO.js +0 -5
- package/dist/chunk-THWO5YVZ.js +0 -1
- package/dist/chunk-TOHOGVAE.js +0 -15
- package/dist/chunk-V7U33NF2.js +0 -1
- package/dist/chunk-VKPOH6MK.js +0 -1
- package/dist/chunk-YU3WHLGI.js +0 -1
- package/dist/repeat-D65bJS8d.d.ts +0 -49
- package/dist/session-EsjORLQ0.d.ts +0 -43
package/dist/screen/words.d.ts
CHANGED
|
@@ -236,6 +236,15 @@ type ScreenMenuWords = {
|
|
|
236
236
|
pinned: string;
|
|
237
237
|
/** Paste in a text box, refused the clipboard by the browser. */
|
|
238
238
|
clipboardRefused: string;
|
|
239
|
+
/** A drawn copy's row actions (`ScreenBridges.onCopyItem`): a new row
|
|
240
|
+
* after this one… Optional (added after 24.2.0, so a host's own words
|
|
241
|
+
* still compile): left out, the English. */
|
|
242
|
+
itemAddAfter?: string;
|
|
243
|
+
/** …this row one place earlier, one place later… */
|
|
244
|
+
itemMoveEarlier?: string;
|
|
245
|
+
itemMoveLater?: string;
|
|
246
|
+
/** …and this row gone. */
|
|
247
|
+
itemDelete?: string;
|
|
239
248
|
};
|
|
240
249
|
type ScreenWords = {
|
|
241
250
|
/** An "Add block" run heading's count, in words: its Tooltip and screen-reader text. */
|
package/dist/screen/words.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_SAVE_STATUS_WORDS,DEFAULT_SCREEN_SHARED_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-
|
|
1
|
+
export{DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_SAVE_STATUS_WORDS,DEFAULT_SCREEN_SHARED_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-S6YOIRXQ.js";
|
package/dist/strings/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { D as DragWords } from '../words-SD4neL0n.js';
|
|
|
5
5
|
import { LockWords } from '../edit-lock/index.js';
|
|
6
6
|
import { F as FieldsWords } from '../words-CFkb8XtN.js';
|
|
7
7
|
import { N as NodeMenuWords } from '../words-DMG4dYq2.js';
|
|
8
|
+
import { P as PageCopyWords } from '../words-Dl8Qja4K.js';
|
|
8
9
|
import { P as PanelWords } from '../words-fbR9IwxH.js';
|
|
9
10
|
import { P as PickWords } from '../words-DWvCJXwR.js';
|
|
10
11
|
import { ScreenWords } from '../screen/words.js';
|
|
@@ -119,6 +120,8 @@ interface EaselStrings {
|
|
|
119
120
|
* notice's word for the document, the Layers tree's frame, the Add panel,
|
|
120
121
|
* the main button and the block keys. */
|
|
121
122
|
screen: ScreenWords;
|
|
123
|
+
/** `efficient-easel/page-copy` — the Duplicate page dialog. */
|
|
124
|
+
pageCopy: PageCopyWords;
|
|
122
125
|
}
|
|
123
126
|
/** Today's English, word for word. */
|
|
124
127
|
declare const DEFAULT_EASEL_STRINGS: EaselStrings;
|
|
@@ -172,4 +175,4 @@ declare function useEaselStrings(): EaselStrings;
|
|
|
172
175
|
/** The nearest provider's locale, or `'en'`. */
|
|
173
176
|
declare function useEaselLocale(): string;
|
|
174
177
|
|
|
175
|
-
export { type CanvasWords, ChromeWords, CopyWords, DEFAULT_EASEL_STRINGS, type DeepPartial, DragWords, type EaselStrings, EaselStringsProvider, type EaselStringsProviderProps, FieldsWords, LockWords, NodeMenuWords, NoticeWords, PanelWords, PickWords, type RailWords, SaveWords, ScreenWords, StyleClipboardWords, TextStylesWords, TreeWords, mergeEaselStrings, useEaselLocale, useEaselStrings };
|
|
178
|
+
export { type CanvasWords, ChromeWords, CopyWords, DEFAULT_EASEL_STRINGS, type DeepPartial, DragWords, type EaselStrings, EaselStringsProvider, type EaselStringsProviderProps, FieldsWords, LockWords, NodeMenuWords, NoticeWords, PageCopyWords, PanelWords, PickWords, type RailWords, SaveWords, ScreenWords, StyleClipboardWords, TextStylesWords, TreeWords, mergeEaselStrings, useEaselLocale, useEaselStrings };
|
package/dist/strings/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return
|
|
1
|
+
import{DEFAULT_TEXT_STYLES_WORDS as r}from"../chunk-OGH6CC3E.js";import{DEFAULT_PICK_WORDS as o}from"../chunk-OFBZOI6W.js";import{DEFAULT_SCREEN_WORDS as n}from"../chunk-S6YOIRXQ.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as t}from"../chunk-6WY6ZXJG.js";import{DEFAULT_CANVAS_WORDS as c}from"../chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as m}from"../chunk-K56YDHYQ.js";import{DEFAULT_PANEL_WORDS as e}from"../chunk-KFV7N2DJ.js";import{DEFAULT_NODE_MENU_WORDS as i}from"../chunk-WK3AFPXY.js";import{DEFAULT_PAGE_COPY_WORDS as s}from"../chunk-CEC5XLN4.js";import{DEFAULT_SAVE_WORDS as u}from"../chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as f,DEFAULT_NOTICE_WORDS as p}from"../chunk-AJSDWWJW.js";import{DEFAULT_RAIL_WORDS as l}from"../chunk-2OAZYSWJ.js";import{DEFAULT_LOCK_WORDS as h}from"../chunk-RE4LP46F.js";import{DEFAULT_COPY_WORDS as j}from"../chunk-PMRN5Z3T.js";import{DEFAULT_FIELDS_WORDS as k}from"../chunk-JACEEVVF.js";import{stringsContext as a}from"../chunk-MFIRYGHW.js";import{DEFAULT_DRAG_WORDS as Y}from"../chunk-TQ5Y6S2X.js";import{useContext as y,useMemo as W}from"react";import{jsx as C}from"react/jsx-runtime";var F={notice:p,lock:h,save:u,chrome:f,rail:l,tree:m,panel:e,fields:k,pick:o,drag:Y,menu:i,styleClipboard:t,copy:j,canvas:c,textStyles:r,screen:n,pageCopy:s},d=r=>"object"==typeof r&&null!==r;function v(r,o){const n={};for(const t of Object.keys(r)){const c=r[t],m=o[t];null==m?n[t]=c:d(c)?n[t]=d(m)?v(c,m):c:n[t]=typeof m==typeof c?m:c}return n}function D(r,o){return o?v(r,o):r}function J({value:r,locale:o,children:n}){const t=a(),c=y(t),m=c?.strings??F,e=o??c?.locale??"en",i=W(()=>({strings:D(m,r),locale:e}),[m,r,e]);/* @__PURE__ */
|
|
2
|
+
return C(t.Provider,{value:i,children:n})}function O(){return y(a())?.strings??F}function S(){return y(a())?.locale??"en"}export{F as DEFAULT_EASEL_STRINGS,J as EaselStringsProvider,D as mergeEaselStrings,S as useEaselLocale,O as useEaselStrings};
|
|
@@ -2,38 +2,6 @@ import { E as EaselContextMenuItem } from '../types-BbOBWXMP.js';
|
|
|
2
2
|
import { S as StyleClipboardWords } from '../words-CnnHb9jo.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* `efficient-easel/style-clipboard` — COPY STYLE and PASTE STYLE, for both editors.
|
|
7
|
-
*
|
|
8
|
-
* Owner, 2026-09-19 (card [ADD] Copy Style And Paste Style): copy a component's
|
|
9
|
-
* look, paste it onto another component, in the campaign designer AND the
|
|
10
|
-
* website editor, written once. His three answers are the three rules here:
|
|
11
|
-
*
|
|
12
|
-
* 1. ONE copy. Everything that is the same in both editors lives in this file:
|
|
13
|
-
* the held style, the matching rule, the menu rows, the words a merchant
|
|
14
|
-
* reads after a paste, and the shortcut test. A host only says which of its
|
|
15
|
-
* rows are Style or Layout, and saves the new props through the one op it
|
|
16
|
-
* already has — so a paste is one undo step, and the shell dispatches
|
|
17
|
-
* nothing.
|
|
18
|
-
* 2. Paste onto ANY component, but only the settings the target also has. A
|
|
19
|
-
* setting is the same setting when the KEY and the KIND are the same — see
|
|
20
|
-
* {@link planPaste}. When we cannot tell, it is skipped.
|
|
21
|
-
* 3. Style and Layout, never Content. Which rows those are is the host's
|
|
22
|
-
* answer (its tabs are its own); this file never sees a Content row.
|
|
23
|
-
*
|
|
24
|
-
* WHAT IS HELD. One style at a time, tagged with the SCOPE it came from (a site,
|
|
25
|
-
* a campaign). In another scope nothing is held, so a look never crosses from
|
|
26
|
-
* one site to another or from the email editor to the website editor. It is
|
|
27
|
-
* kept in memory and in `sessionStorage`, so it lasts for the editor session
|
|
28
|
-
* and survives a page load inside the same tab. Storage can be missing or throw
|
|
29
|
-
* (a private window, blocked site data); every touch is in a try/catch and the
|
|
30
|
-
* memory copy still works.
|
|
31
|
-
*
|
|
32
|
-
* A LEAF. Nothing here runs at import: no `window`, no `document`, no storage.
|
|
33
|
-
* It imports React only for the two menu glyphs, and nothing outside `src/`
|
|
34
|
-
* (`tests/style-clipboard-leaf-safety.test.ts`).
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
5
|
/** Where a value is stored on a node's props: `['size']`, or `['mobile', 'size']`
|
|
38
6
|
* for the campaign editor's phone value of `size`. */
|
|
39
7
|
type StylePath = readonly string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{COPY_STYLE_SHORTCUT,PASTE_STYLE_SHORTCUT,STYLE_KIND,choiceKind,clearStyle,copyStyle,fieldKind,heldStyle,pasteMessage,planPaste,styleMenuItems,styleShortcut,subscribeStyle,withStyleKind}from"../chunk-
|
|
1
|
+
export{COPY_STYLE_SHORTCUT,PASTE_STYLE_SHORTCUT,STYLE_KIND,choiceKind,clearStyle,copyStyle,fieldKind,heldStyle,pasteMessage,planPaste,styleMenuItems,styleShortcut,subscribeStyle,withStyleKind}from"../chunk-CWELHADJ.js";import"../chunk-6WY6ZXJG.js";import"../chunk-EUFDQ4KL.js";import"../chunk-KXM6YRG2.js";
|
|
@@ -137,12 +137,13 @@ interface ColourSwatchRowProps {
|
|
|
137
137
|
* draws it through this export, unchanged.
|
|
138
138
|
*
|
|
139
139
|
* The swatches are the shell's `ColorSwatch`, named on hover by its `Tooltip`
|
|
140
|
-
* (easel#199 step 4, harness UI-24). Any color
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* The row's name, the readout and the swatch group
|
|
140
|
+
* (easel#199 step 4, harness UI-24). Any color is the shell's `Popover`
|
|
141
|
+
* (duplicate audit 2026-10-29, U21): its trigger wears the swatch's look
|
|
142
|
+
* (`colorSwatchClasses`, painted with the hue wheel, ringed while the colour
|
|
143
|
+
* is a hex), and the window under it is placed, closed by Escape or a press
|
|
144
|
+
* outside, and hands focus back as every kit popup is — the colour picker's
|
|
145
|
+
* (`ColourPicker`) included. The row's name, the readout and the swatch group
|
|
146
|
+
* stay this row's.
|
|
146
147
|
*
|
|
147
148
|
* What a press means is the host's: a swatch writes its key, the window a
|
|
148
149
|
* hex. Clearing, and what "nothing chosen" reads, are the host's too.
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import{hexReadout as e,ColourWindow as s,typedHex as t}from"../chunk-U6LJ5UKD.js";import{DEFAULT_TEXT_STYLES_WORDS as a}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import"../chunk-OFBZOI6W.js";import{FieldSlider as
|
|
2
|
-
|
|
3
|
-
/* @__PURE__ */
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
|
|
8
|
-
return
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
return
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
/* @__PURE__ */
|
|
1
|
+
import{hexReadout as e,ColourWindow as s,typedHex as t}from"../chunk-U6LJ5UKD.js";import{DEFAULT_TEXT_STYLES_WORDS as a}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import"../chunk-OFBZOI6W.js";import{FieldSlider as l}from"../chunk-ZEH6QLBH.js";import{TEXT_STYLE_KINDS as i,canAddTextStyle as n,TEXT_STYLE_MAX as r,isDefaultTextStyle as o,CAMPAIGN_TEXT_STYLE_SETTINGS as d,TEXT_STYLE_SETTINGS as c,textStyleRowSize as u,describeTextStyle as m,updateTextStyle as h,textStyleCaseCss as p,TEXT_STYLE_CASES as v,addTextStyle as f,removeTextStyle as y,TEXT_STYLE_RANGES as g}from"../chunk-YHZSBL2N.js";export{CAMPAIGN_TEXT_STYLE_SETTINGS,TEXT_STYLE_CASES,TEXT_STYLE_CASE_CSS,TEXT_STYLE_DEFAULT_COUNT,TEXT_STYLE_KINDS,TEXT_STYLE_MAX,TEXT_STYLE_RANGES,TEXT_STYLE_SETTINGS,addTextStyle,canAddTextStyle,defaultTextStyles,describeTextStyle,isDefaultTextStyle,isTextStyleCase,removeTextStyle,resolveTextStyle,textStyleCaseCss,textStyleCaseOfCss,textStyleRowSize,updateTextStyle,weightWord}from"../chunk-YHZSBL2N.js";import{FieldSelect as S}from"../chunk-KFWNGPW3.js";import{SettingsSegmented as b}from"../chunk-DX3VILZ3.js";import"../chunk-JACEEVVF.js";import{useWords as N}from"../chunk-MFIRYGHW.js";import{withTip as C}from"../chunk-P2VEMZH5.js";import{hsvToHex as T,Tooltip as k,ColorSwatch as x,Popover as z,colorSwatchClasses as E,IconButton as w,Button as O}from"efficient-shell/ui";import{useId as _,useState as L,useRef as j,useEffect as A,Fragment as M}from"react";import{TrashIcon as $,ChevronIcon as W,BoldIcon as Y,ItalicIcon as X,CaseLowerIcon as I,CaseCapitalizedIcon as F,CaseUpperIcon as H,CaseNormalIcon as P}from"efficient-shell/icons/efficient";import{jsxs as B,jsx as G,Fragment as D}from"react/jsx-runtime";var R=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>T({h:e,s:1,v:1})).join(", ")})`;function V({value:t,hex:a,colours:l,label:i,followsWord:n,anyWord:r,onChange:o,readOnly:d=!1}){const c=void 0!==t&&l.some(e=>e.key===t),u=void 0!==t&&!c;/* @__PURE__ */
|
|
2
|
+
return B("div",{className:"es-ts-set","data-ts-setting":"color",children:[
|
|
3
|
+
/* @__PURE__ */B("div",{className:"es-ts-top",children:[
|
|
4
|
+
/* @__PURE__ */G("span",{className:"es-ts-sub",children:i}),
|
|
5
|
+
/* @__PURE__ */G("span",{className:"es-ts-colour-read",children:a?e(a):n})]}),
|
|
6
|
+
/* @__PURE__ */B("div",{className:"es-ts-swatches",role:"group","aria-label":i,children:[l.map(s=>/* @__PURE__ */G(k,{content:`${s.name} · ${e(s.value)}`,children:/* @__PURE__ */G(x,{color:s.value,size:"sm",className:"es-ts-swatch","aria-label":s.name,selected:t===s.key,disabled:d,onClick:()=>o(s.key)})},s.key)),
|
|
7
|
+
/* @__PURE__ */G(k,{content:r,children:/* @__PURE__ */G(z,{trigger:/* @__PURE__ */G("span",{"aria-hidden":"true",className:"absolute inset-0",style:{background:R}}),triggerLabel:r,triggerClassName:E({size:"sm",selected:u,className:"es-ts-swatch es-ts-swatch--any"}),"aria-label":i,disabled:d,children:/* @__PURE__ */G(s,{value:a??"",onChange:e=>o(e),label:i,readOnly:d})})})]})]})}function Z({styles:e,onChange:s,fonts:t,colours:l=[],settings:c=d,auto:u=[],fallback:m,sample:h,openId:p,defaultOpenId:v=null,onOpenChange:g,onAdd:S,rowActions:b,onRemove:T,max:k=r,device:x="desktop",readOnly:z=!1}){const E=N("textStyles",a),M=_(),[W,Y]=L(v),X=void 0!==p?p:W,I=e=>{void 0===p&&Y(e),g?.(e)},F=j(null),[H,P]=L(null);A(()=>{if(!H||!F.current)return;const e=[...F.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===H.id),s=e?e.querySelector(".es-ts-row"):F.current.querySelector(`.es-ts-add[data-ts-kind="${H.kind}"]`);s?.focus(),P(null)},[H]);/* @__PURE__ */
|
|
8
|
+
return G("div",{className:"es-ts",ref:F,children:i.map(a=>{const i=e.filter(e=>e.kind===a),r=!n(e,a,k),d=!z&&!r;/* @__PURE__ */
|
|
9
|
+
return B(U,{label:E.groups[a],children:[i.map(a=>{const i=b?.(a),n=null!=i&&!1!==i,r=Boolean(T)&&!z&&!o(a);/* @__PURE__ */
|
|
10
|
+
return G(q,{style:a,fonts:t,colours:l,settings:c,auto:u,fallback:m,sample:h,device:x,readOnly:z,open:X===a.id,onOpenChange:e=>I(e?a.id:null),onChange:t=>s(e.map(e=>e.id===t.id?t:e)),actions:r||n?/* @__PURE__ */B(D,{children:[r?C(E.remove,/* @__PURE__ */G(w,{variant:"ghost-danger",size:"sm",className:"es-ts-del","aria-label":E.removeNamed({name:a.name}),onClick:()=>(t=>{if(z||!T)return;const a=y(e,t.id,{name:E.styleName});if(!a)return;const l=e.filter(e=>e.kind===t.kind),i=l[l.indexOf(t)+1];X===t.id&&I(null),s(a.styles),T(a.removed),P({id:i?.id??null,kind:t.kind})})(a),children:/* @__PURE__ */G($,{size:14,"aria-hidden":"true"})})):null,n?i:null]}):null},a.id)}),C(!z&&r?E.full({kind:a,max:k}):void 0,/* @__PURE__ */B(O,{variant:"link",className:"es-ts-add","data-ts-kind":a,disabled:z,"aria-disabled":!(z||!r)||void 0,"aria-describedby":!z&&r?`${M}-full-${a}`:void 0,onClick:()=>{d&&(t=>{if(z)return;const a=f(e,t,{max:k,name:E.styleName,make:S});a&&s(a.styles)})(a)},children:[
|
|
11
|
+
/* @__PURE__ */G("span",{className:"es-ts-add-word",children:E.add[a]}),
|
|
12
|
+
/* @__PURE__ */G("span",{className:"es-ts-count",children:E.count({n:i.length,max:k})})]})),z||!r?null:/* @__PURE__ */G("span",{id:`${M}-full-${a}`,className:"es-vh",children:E.full({kind:a,max:k})})]},a)})})}function U({label:e,children:s}){const t=_();/* @__PURE__ */
|
|
13
|
+
return B("section",{className:"es-ts-section","aria-labelledby":t,children:[
|
|
14
|
+
/* @__PURE__ */G("div",{className:"es-ts-group",id:t,children:e}),s]})}function q({style:e,fonts:s,colours:t=[],settings:l=d,auto:i=[],fallback:n,sample:r,open:o,onOpenChange:p,onChange:v,actions:f,device:y="desktop",readOnly:g=!1}){const S=N("textStyles",a),b=`${_()}-open-${e.id}`,C=new Set(i),T=c.filter(e=>l.includes(e)),k={...n?.(e)??{},...e.values},x="phone"===y,z=x&&void 0!==e.values.sizePhone?{...k,size:e.values.sizePhone}:k,E=s.find(e=>e.value===k.font),w={fontFamily:E?.family,fontSize:`${u(z.size??16)}px`,fontWeight:k.weight,fontStyle:k.italic?"italic":void 0};/* @__PURE__ */
|
|
15
|
+
return B(M,{children:[
|
|
16
|
+
/* @__PURE__ */B("div",{className:"es-ts-item","data-ts-id":e.id,children:[
|
|
17
|
+
/* @__PURE__ */B("button",{type:"button",className:"es-ts-row","aria-expanded":o,"aria-controls":o?b:void 0,onClick:()=>p(!o),children:[
|
|
18
|
+
/* @__PURE__ */G("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */G(W,{size:12})}),
|
|
19
|
+
/* @__PURE__ */G("span",{className:"es-ts-name",style:w,children:e.name}),
|
|
20
|
+
/* @__PURE__ */G("span",{className:"es-ts-meta",children:m(z,s,S,{autoSize:C.has("size")&&z===k&&void 0===e.values.size})})]}),f?/* @__PURE__ */G("div",{className:"es-ts-actions",children:f}):null]}),o?/* @__PURE__ */G("div",{className:"es-ts-open",id:b,children:/* @__PURE__ */G(J,{style:e,values:k,fonts:s,colours:t,settings:T,autoSet:C,sample:r??S.sample,words:S,phone:x,readOnly:g,set:s=>v(h([e],e.id,s)[0])})}):null]})}var K={none:P,upper:H,capitalize:F,lower:I};function J({style:e,values:s,fonts:a,colours:i,settings:n,autoSet:r,sample:o,words:d,phone:c,readOnly:u,set:m}){const h=e.values,v=a.find(e=>e.value===s.font),f=function(e,s){return e?s.find(s=>s.key===e)?.value??t(e)??void 0:void 0}(s.color,i),y=e=>"largestSize"===e||r.has(e),S=e=>y(e)?h[e]:s[e],b=S("size"),N=c&&void 0!==h.sizePhone?h.sizePhone:b,T=S("lineSpacing"),k=S("letterSpacing"),x=y("letterCase")?h.letterCase:s.letterCase,z={fontFamily:v?.family,fontSize:void 0===N?void 0:`${N}px`,fontWeight:s.weight,fontStyle:s.italic?"italic":void 0,lineHeight:void 0===T?void 0:String(T/100),letterSpacing:void 0===k?void 0:`${k}px`,color:f,textTransform:p(x)},E=e=>{const t=g[e],a=y(e);/* @__PURE__ */
|
|
21
|
+
return G("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */G(l,{label:d.settings[e],value:h[e],onChange:s=>m({[e]:s}),min:t.min,max:t.max,step:t.step,shiftStep:t.shiftStep,sliderMin:t.sliderMin,sliderMax:t.sliderMax,unit:t.unit||void 0,styleValue:a?void 0:s[e],auto:a?d.auto:void 0,readOnly:u})},e)};/* @__PURE__ */
|
|
22
|
+
return B(D,{children:[
|
|
23
|
+
/* @__PURE__ */G("div",{className:"es-ts-preview",style:z,"aria-label":d.preview,children:o}),n.map(t=>{switch(t){case"font":/* @__PURE__ */
|
|
24
|
+
return G(Q,{value:h.font,fonts:a,words:d,readOnly:u,set:m},t);case"color":/* @__PURE__ */
|
|
25
|
+
return G(ee,{value:h.color,hex:f,colours:i,words:d,readOnly:u,set:m},t);case"emphasis":{const e=(s.weight??400)>=600,a=!1!==v?.italic;/* @__PURE__ */
|
|
26
|
+
return B("div",{className:"es-ts-set","data-ts-setting":t,children:[
|
|
27
|
+
/* @__PURE__ */G("span",{className:"es-ts-sub",children:d.settings.emphasis}),
|
|
28
|
+
/* @__PURE__ */B("div",{className:"es-ts-icons",children:[C(d.bold,/* @__PURE__ */G(w,{className:"es-ts-icon","aria-label":d.bold,"aria-pressed":e,disabled:u,onClick:()=>m({weight:e?400:700}),children:/* @__PURE__ */G(Y,{size:16})})),u||a?C(d.italic,/* @__PURE__ */G(w,{className:"es-ts-icon","aria-label":d.italic,"aria-pressed":Boolean(s.italic),disabled:u,onClick:()=>m({italic:!s.italic||void 0}),children:/* @__PURE__ */G(X,{size:16})})):/* @__PURE__ */G(w,{className:"es-ts-icon","aria-label":d.italic,"aria-pressed":Boolean(s.italic),"aria-disabled":!0,disabledReason:d.italicMissing,children:/* @__PURE__ */G(X,{size:16})})]})]},t)}case"letterCase":/* @__PURE__ */
|
|
29
|
+
return G(se,{value:h.letterCase??s.letterCase,auto:y("letterCase"),words:d,readOnly:u,set:m},t);case"largestSize":return"heading"===e.kind?E(t):null;case"size":return c?(()=>{const e=g.size;/* @__PURE__ */
|
|
30
|
+
return G("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */G(l,{label:d.settings.size,value:h.sizePhone,onChange:e=>m({sizePhone:e}),min:e.min,max:e.max,step:e.step,shiftStep:e.shiftStep,sliderMin:e.sliderMin,sliderMax:e.sliderMax,unit:e.unit||void 0,styleValue:b,readOnly:u})},"size")})():E(t);default:return E(t)}})]})}function Q({value:e,fonts:s,words:t,readOnly:a,set:l}){const i=_();/* @__PURE__ */
|
|
31
|
+
return B("div",{className:"es-ts-set","data-ts-setting":"font",children:[
|
|
32
|
+
/* @__PURE__ */G("span",{className:"es-ts-sub",id:i,children:t.settings.font}),
|
|
33
|
+
/* @__PURE__ */G(S,{value:e,options:s.map(e=>({label:e.label,value:e.value})),onChange:e=>l({font:e}),ariaLabelledBy:i,readOnly:a})]})}function ee({value:e,hex:s,colours:t,words:a,readOnly:l,set:i}){/* @__PURE__ */
|
|
34
|
+
return G(V,{value:e,hex:s,colours:t,label:a.settings.color,followsWord:a.colour.follows,anyWord:a.colour.any,readOnly:l,onChange:e=>i({color:e})})}function se({value:e,auto:s,words:t,readOnly:a,set:l}){const i=v.map(e=>{const s=K[e];return{id:e,label:/* @__PURE__ */G(s,{size:16}),title:t.case[e]}}),n=s?[{id:"auto",label:/* @__PURE__ */G("span",{children:t.case.auto}),title:t.case.autoTitle},...i]:i;/* @__PURE__ */
|
|
35
|
+
return B("div",{className:"es-ts-set","data-ts-setting":"letterCase",children:[
|
|
36
|
+
/* @__PURE__ */G("span",{className:"es-ts-sub",children:t.settings.letterCase}),
|
|
37
|
+
/* @__PURE__ */G(b,{options:n,value:e??(s?"auto":"none"),ariaLabel:t.settings.letterCase,disabled:a,onChange:e=>l({letterCase:"auto"===e?void 0:e})})]})}export{V as ColourSwatchRow,q as TextStyleItem,U as TextStylesGroup,Z as TextStylesList};
|
|
@@ -83,32 +83,6 @@
|
|
|
83
83
|
}
|
|
84
84
|
@media (prefers-reduced-motion: reduce) { .es-ts-actions { transition: none; } }
|
|
85
85
|
|
|
86
|
-
/* Delete: the Layers trash (tree.css `.es-tree-del`) — 22 px, the glyph 14,
|
|
87
|
-
red at 0.7, full with a red tint under the pointer. */
|
|
88
|
-
.es-ts-del {
|
|
89
|
-
all: unset;
|
|
90
|
-
box-sizing: border-box;
|
|
91
|
-
display: flex;
|
|
92
|
-
align-items: center;
|
|
93
|
-
justify-content: center;
|
|
94
|
-
width: 22px;
|
|
95
|
-
height: 22px;
|
|
96
|
-
border-radius: var(--radius-md);
|
|
97
|
-
color: var(--es-danger, var(--status-danger-soft-ink));
|
|
98
|
-
opacity: 0.7;
|
|
99
|
-
cursor: pointer;
|
|
100
|
-
transition: opacity 0.12s, background 0.12s, color 0.12s;
|
|
101
|
-
}
|
|
102
|
-
.es-ts-del svg { width: 14px; height: 14px; }
|
|
103
|
-
.es-ts-del:hover,
|
|
104
|
-
.es-ts-del:focus-visible {
|
|
105
|
-
opacity: 1;
|
|
106
|
-
background: var(--es-danger-tint, var(--status-danger-soft));
|
|
107
|
-
color: var(--es-danger-strong, var(--status-danger-soft-ink));
|
|
108
|
-
}
|
|
109
|
-
.es-ts-del:focus-visible { outline: 2px solid var(--es-accent, var(--accent-600, var(--submit-bg))); outline-offset: 0; }
|
|
110
|
-
@media (prefers-reduced-motion: reduce) { .es-ts-del { transition: none; } }
|
|
111
|
-
|
|
112
86
|
.es-ts-row {
|
|
113
87
|
all: unset;
|
|
114
88
|
box-sizing: border-box;
|
|
@@ -227,49 +201,27 @@
|
|
|
227
201
|
.es-ts-swatches { gap: var(--es-space-4, 4px); }
|
|
228
202
|
}
|
|
229
203
|
|
|
230
|
-
/* B · I
|
|
204
|
+
/* B · I: the text box's 32 px buttons (react-os-shell
|
|
231
205
|
IconButton md); pressed = the light blue the toolbar's pressed marks wear. */
|
|
232
206
|
.es-ts-icons {
|
|
233
207
|
display: flex;
|
|
234
208
|
flex-wrap: wrap;
|
|
235
209
|
gap: var(--es-space-2, 2px);
|
|
236
210
|
}
|
|
237
|
-
/* An icon is efficient-shell's IconButton (harness UI-24): a toggle lit from
|
|
238
|
-
`aria-pressed`, a case radio from `pressed` (it says `aria-checked`). What
|
|
239
|
-
stays is the word button's width. */
|
|
240
|
-
.es-ts-icon--word {
|
|
241
|
-
width: auto;
|
|
242
|
-
padding: 0 var(--es-space-8, 8px);
|
|
243
|
-
font-size: var(--text-sm, 14px);
|
|
244
|
-
font-weight: 500;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/* The window Any color opens (the shell's ColorPickerPanel): under the row, in
|
|
248
|
-
the panel's flow, as wide as the row — not the panel's own popover width,
|
|
249
|
-
which is wider than a 220 px panel's row. */
|
|
250
|
-
.es-ts-set > .es-pick-window {
|
|
251
|
-
width: auto;
|
|
252
|
-
margin-top: var(--es-space-4, 4px);
|
|
253
|
-
}
|
|
254
211
|
|
|
255
212
|
/* ── "+ Add heading" · 3 / 7 ──────────────────────────────────────────────── */
|
|
256
213
|
|
|
214
|
+
/* The shell's Button (`link`, harness UI-6): its ink, focus ring and off look
|
|
215
|
+
are the kit's. What stays here is the line's layout — the words at the
|
|
216
|
+
start, the count at the end. */
|
|
257
217
|
.es-ts-add {
|
|
258
|
-
all: unset;
|
|
259
|
-
box-sizing: border-box;
|
|
260
218
|
display: flex;
|
|
261
|
-
|
|
219
|
+
width: 100%;
|
|
262
220
|
justify-content: space-between;
|
|
263
221
|
gap: var(--es-space-8, 8px);
|
|
264
222
|
padding: var(--es-space-12, 12px) 0 0;
|
|
265
223
|
font-size: var(--text-sm, 14px);
|
|
266
|
-
font-weight: 500;
|
|
267
|
-
color: var(--es-accent, var(--accent-600, var(--submit-bg)));
|
|
268
|
-
cursor: pointer;
|
|
269
224
|
}
|
|
270
|
-
.es-ts-add:focus-visible { outline: 2px solid var(--es-accent, var(--accent-600, var(--submit-bg))); outline-offset: 2px; border-radius: var(--radius-sm); }
|
|
271
|
-
.es-ts-add:disabled,
|
|
272
|
-
.es-ts-add[aria-disabled='true'] { color: var(--es-disabled, var(--ink-faintest)); cursor: not-allowed; }
|
|
273
225
|
.es-ts-count {
|
|
274
226
|
font-size: var(--text-xs, 12px);
|
|
275
227
|
font-weight: 400;
|
package/dist/tree/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { L as LayersTreeProps, S as SubtreeProps,
|
|
3
|
-
export {
|
|
2
|
+
import { L as LayersTreeProps, S as SubtreeProps, T as TreeGroupLabelProps, a as TreeEmptySlotProps, b as TreeRowProps, c as TreeRowActionProps, d as TreeSeamProps } from '../types-CoUTWUwB.js';
|
|
3
|
+
export { e as TreeRowFold, f as TreeRowMark } from '../types-CoUTWUwB.js';
|
|
4
4
|
export { T as TreeWords } from '../words-Cl9xMUYY.js';
|
|
5
5
|
import 'efficient-shell/ui';
|
|
6
6
|
|
|
@@ -168,4 +168,4 @@ type TreeSeamProps = {
|
|
|
168
168
|
seamProps?: HTMLAttributes<HTMLDivElement>;
|
|
169
169
|
};
|
|
170
170
|
|
|
171
|
-
export type { LayersTreeProps as L, SubtreeProps as S,
|
|
171
|
+
export type { LayersTreeProps as L, SubtreeProps as S, TreeGroupLabelProps as T, TreeEmptySlotProps as a, TreeRowProps as b, TreeRowActionProps as c, TreeSeamProps as d, TreeRowFold as e, TreeRowMark as f };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Duplicate page dialog's own words (`efficient-easel/strings`): what it
|
|
3
|
+
* says and what it asks. Plain TypeScript with no import, like the module it
|
|
4
|
+
* belongs to. A sentence with a name in it is a function, so a host puts the
|
|
5
|
+
* name where its language wants it.
|
|
6
|
+
*/
|
|
7
|
+
type PageCopyWords = {
|
|
8
|
+
/** The window's title; `name` is the page being copied. */
|
|
9
|
+
title: (v: {
|
|
10
|
+
name: string;
|
|
11
|
+
}) => string;
|
|
12
|
+
/** The primary button. */
|
|
13
|
+
submit: string;
|
|
14
|
+
/** The Title field's label. */
|
|
15
|
+
titleLabel: string;
|
|
16
|
+
/** The URL handle field's label. */
|
|
17
|
+
slugLabel: string;
|
|
18
|
+
/** Under Title: what a copy is. */
|
|
19
|
+
hint: string;
|
|
20
|
+
/** Under URL handle: the address the copy will have. */
|
|
21
|
+
address: (v: {
|
|
22
|
+
host: string;
|
|
23
|
+
slug: string;
|
|
24
|
+
}) => string;
|
|
25
|
+
/** Another page already uses the handle. */
|
|
26
|
+
clash: string;
|
|
27
|
+
/** The backend refused or the call failed. */
|
|
28
|
+
failed: string;
|
|
29
|
+
};
|
|
30
|
+
declare const DEFAULT_PAGE_COPY_WORDS: PageCopyWords;
|
|
31
|
+
|
|
32
|
+
export { DEFAULT_PAGE_COPY_WORDS as D, type PageCopyWords as P };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-easel",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0",
|
|
4
4
|
"description": "Efficient Easel: the EFFICIENT editors' shared engine and chrome: the saved document as pure functions, the published renderer, and the editor frame, panels, Layers tree, text grammar and type-in-place box. Published as editor-shell up to 0.66.0 and as efficient-editor up to 0.95.0.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"./copy",
|
|
55
55
|
"./style-clipboard",
|
|
56
56
|
"./strings",
|
|
57
|
+
"./page-copy",
|
|
57
58
|
"./screen/components/AddBlockRow",
|
|
58
59
|
"./screen/components/AddChildRow",
|
|
59
60
|
"./screen/components/AddSidePanel",
|
|
@@ -94,6 +95,7 @@
|
|
|
94
95
|
"./screen/lib/document/add-target-types",
|
|
95
96
|
"./screen/lib/document/block-choice",
|
|
96
97
|
"./screen/lib/document/block-types-in",
|
|
98
|
+
"./screen/lib/document/block-set-host",
|
|
97
99
|
"./screen/lib/document/box-fields",
|
|
98
100
|
"./screen/lib/document/device-fields",
|
|
99
101
|
"./screen/lib/document/field-buckets",
|
|
@@ -236,6 +238,11 @@
|
|
|
236
238
|
"import": "./dist/draw/client.js",
|
|
237
239
|
"default": "./dist/draw/client.js"
|
|
238
240
|
},
|
|
241
|
+
"./page-copy": {
|
|
242
|
+
"types": "./dist/page-copy/index.d.ts",
|
|
243
|
+
"import": "./dist/page-copy/index.js",
|
|
244
|
+
"default": "./dist/page-copy/index.js"
|
|
245
|
+
},
|
|
239
246
|
"./edit-lock": {
|
|
240
247
|
"types": "./dist/edit-lock/index.d.ts",
|
|
241
248
|
"import": "./dist/edit-lock/index.js",
|
|
@@ -428,6 +435,11 @@
|
|
|
428
435
|
"import": "./dist/screen/lib/document/content-tree.js",
|
|
429
436
|
"default": "./dist/screen/lib/document/content-tree.js"
|
|
430
437
|
},
|
|
438
|
+
"./screen/lib/document/block-set-host": {
|
|
439
|
+
"types": "./dist/screen/lib/document/block-set-host.d.ts",
|
|
440
|
+
"import": "./dist/screen/lib/document/block-set-host.js",
|
|
441
|
+
"default": "./dist/screen/lib/document/block-set-host.js"
|
|
442
|
+
},
|
|
431
443
|
"./screen/lib/document/box-fields": {
|
|
432
444
|
"types": "./dist/screen/lib/document/box-fields.d.ts",
|
|
433
445
|
"import": "./dist/screen/lib/document/box-fields.js",
|
|
@@ -633,7 +645,7 @@
|
|
|
633
645
|
"dist"
|
|
634
646
|
],
|
|
635
647
|
"peerDependencies": {
|
|
636
|
-
"efficient-shell": "^
|
|
648
|
+
"efficient-shell": "^11.1.0",
|
|
637
649
|
"react": ">=18",
|
|
638
650
|
"react-dom": ">=18"
|
|
639
651
|
},
|
|
@@ -643,7 +655,7 @@
|
|
|
643
655
|
"@types/node": "^22.0.0",
|
|
644
656
|
"@types/react": "^18.2.0",
|
|
645
657
|
"@types/react-dom": "^18.2.0",
|
|
646
|
-
"efficient-shell": "^
|
|
658
|
+
"efficient-shell": "^11.1.0",
|
|
647
659
|
"esbuild": "^0.27.0",
|
|
648
660
|
"jsdom": "^26.1.0",
|
|
649
661
|
"react": "^18.2.0",
|
package/dist/chunk-3FIS2FRS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{mediaPickStoreFor as e}from"./chunk-NCXYC7WI.js";var t=/* @__PURE__ */new Map,n=0;function o(o,i){if(!o.connected)return Promise.resolve(null);const r=(n+=1,`mp-${"undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():String(n)}`),c=e(o);return c?c.request({requestId:r,accept:i.accept,title:i.title,file:i.file??null,...i.options?{options:i.options}:{}}):new Promise(e=>{t.set(r,e),o.send("storefront-editor:open-media-picker",{requestId:r,accept:i.accept,title:i.title,...i.file?{file:i.file}:{}})})}function i(e,n){const o=t.get(e);o&&(t.delete(e),o(n))}export{o as requestMediaPick,i as resolveMediaPick};
|
package/dist/chunk-7RSE6KKY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useSectionOps as o}from"./chunk-OITNWE52.js";import{SELECTION_MODE as e}from"./chunk-QORC32JO.js";import{decodePartId as r,encodePartId as t}from"./chunk-R4AUZVA3.js";import{useEasel as n}from"./chunk-FJTCSQWK.js";import{usePreviewParts as p}from"./chunk-467WWV4I.js";import{useCallback as d,useEffect as c}from"react";var s=o=>"part"===o.kind;function m({mode:m,setMode:i,onOpenPart:a}){const{getSelectorForId:u}=n(o=>o),I=o(),{setSelectedPartId:f,setSelectHandler:k}=p(),l=d(o=>{const t=r(o);if(!t)return;const{nodeId:n,propKey:p}=t;p?(i(o=>s(o)&&o.nodeId===n&&o.propKey===p?o:{kind:"part",nodeId:n,propKey:p}),a?.(n)):i(o=>"part"===o.kind?e:o)},[i,a]);c(()=>{k(l)},[k,l]);const h=s(m)?t(m.nodeId,m.propKey):null;c(()=>{f(h)},[h,f]);return{selectNode:d(o=>{i(()=>e);const r=u(o);r&&I.select(r)},[i,u,I]),openPartId:h}}export{m as usePartBridge};
|
package/dist/chunk-AAAZ2CQR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useEaselSession as e}from"./chunk-YM4UEGBV.js";import{useHostEscape as n}from"./chunk-LX23TCTP.js";import{styleMenuItems as t}from"./chunk-V7U33NF2.js";import{DEFAULT_SCREEN_WORDS as o}from"./chunk-IYHO4XQX.js";import{ROOT_ZONE as l}from"./chunk-TCAAOYQY.js";import{easelMenuEntries as r,menuLabel as i}from"./chunk-FIVU2COQ.js";import{createNodeClipboard as c,nodeMenuItems as s}from"./chunk-P5VYGWYO.js";import{DEFAULT_NODE_MENU_WORDS as a}from"./chunk-WK3AFPXY.js";import{isTypingTarget as u,useCanvasEvent as d,framePointToHost as p}from"./chunk-YU3WHLGI.js";import{zoneKey as f,ROOT_SLOT as m,ROOT_ID as y}from"./chunk-TGZCD6IP.js";import{useState as h,useCallback as k,useRef as b,useEffect as v}from"react";import{ContextMenu as g}from"efficient-shell/ui";import{UndoIcon as w,RedoIcon as x,PasteIcon as C,StylesIcon as O,LayersIcon as z,CopyIcon as P}from"efficient-shell/icons/efficient";import{jsx as A}from"react/jsx-runtime";function T(e,n){const t=[],o=/* @__PURE__ */new Set;let r={zone:n.zone,index:n.index};for(;r;){const n=e.nodeAt(r.zone,r.index);if(!n||o.has(n.props.id))break;if(o.add(n.props.id),t.push({zone:r.zone,index:r.index,node:n,parentType:null}),r.zone===l)break;const i=r.zone.lastIndexOf(":");if(i<=0)break;r=e.locate(r.zone.slice(0,i))}for(let e=0;e<t.length-1;e+=1)t[e].parentType=t[e+1].node.type;return t}var Y=c(),j=/* @__PURE__ */new WeakMap;function D(e){if(e.claimsPage)return Y;const n=e.registry;if(!n)return e.cache("easel:node-clipboard",c);let t=j.get(n);return t||(t=c(),j.set(n,t)),t}function I(){return D(e())}function K(e,n,t){if(n===l){const{floor:n,cap:o}=e.sectionBand();return{parentId:y,slot:m,index:Math.min(Math.max(t,n),o)}}const o=n.lastIndexOf(":");return{parentId:n.slice(0,o),slot:n.slice(o+1),index:t}}function M(e,n,t){const o=e.isPinned(n,t),l=!o&&!e.isLocked(n)&&!e.duplicateBlocked(n),r=e.permits?.(n)??{duplicate:!0,delete:!0};return{copy:!o&&r.duplicate,cut:l&&r.duplicate&&r.delete,delete:l&&r.delete}}function X(e,n,t){const o=e.canPasteAt;if(!o)return f(n.from)===t.zone?K(e,t.zone,t.index+1):null;for(const l of T(e,t)){const t=K(e,l.zone,l.index+1);if(o(n,t))return t}return null}function S(e){if(e.defaultPrevented||e.altKey||e.shiftKey)return null;if(u(e.target))return null;const n=e.target,t=n&&"ownerDocument"in n?n.ownerDocument??n:null,o=t?.getSelection?.();if(o&&!o.isCollapsed&&o.toString().trim())return null;if(!e.metaKey&&!e.ctrlKey)return"Delete"===e.key?"delete":null;const l=e.code||(1===e.key.length?`Key${e.key.toUpperCase()}`:"");return"KeyC"===l?"copy":"KeyX"===l?"cut":"KeyV"===l?"paste":null}function L(e,n,t,o){const l=e.nodeAt(t.zone,t.index);if(!l)return null;const r=l.props.id,i=e.labelOf(l.type,t.zone),c=M(e,l,t.zone);if("copy"===n)return c.copy?(e.nodeOps.copy(r,i),{done:"copied",name:i}):null;if(o.readOnly)return null;if("cut"===n)return c.cut?(e.nodeOps.cut(r,i),{done:"cut",name:i}):null;if("delete"===n)return c.delete?(e.nodeOps.remove(r),{done:"deleted",name:i}):null;const s=o.held;if(!s)return null;const a=e.isPinned(l,t.zone)?null:X(e,s,t);return a?(e.nodeOps.paste(a),{done:"pasted",name:s.label}):(e.onPasteRefused(s),{done:"refused",name:s.label})}function E(e,n){const{zone:o,index:r}=n,i=e.nodeAt(o,r);if(!i)return[];const c=i.props.id,a=e.labelOf(i.type,o),u=Boolean(i.props._hidden),d=e.nodeOps,p=e.isPinned(i,o),f=e.isLocked(i),m=!p&&!f&&!e.duplicateBlocked(i),y=e.permits?.(i)??{duplicate:!0,delete:!0},h=M(e,i,o),k=T(e,n),b=d.held,v=b&&!p?X(e,b,n):null,g=!e.readOnly,w=e.style?t({held:g?e.style.held():null,canCopy:e.style.canCopy(i,o),onCopy:()=>e.style?.copy(i,o),onPaste:()=>e.style?.paste(o,r,i),words:e.words?.styleClipboard}):[];return s({title:a,words:e.words?.menu,layer:{group:"pick",items:k.flatMap((n,t)=>{const o={label:e.rowNameOf(n.node,n.zone),checked:0===t,onClick:()=>e.selectAt(n.zone,n.index,n.node.props.id,n.parentType)},r=n.zone===l?null:e.slotRung?.(n.zone)??null;return r?[o,{label:r.label,checked:!1,onClick:r.select}]:[o]})},actions:{duplicate:g&&m&&y.duplicate?()=>d.duplicate(c):void 0,...U(g&&!p,e=>d.canStep(c,e),e=>d.step(c,e)),copy:h.copy?()=>d.copy(c,a):void 0,cut:g&&h.cut?()=>d.cut(c,a):void 0,paste:g&&b&&v?{label:b.label,run:()=>d.paste(v)}:void 0,rename:g&&e.renamePropOf(i,o)?()=>e.beginRename(o,r):void 0,hide:!g||f||p?void 0:{hidden:u,run:()=>d.setProps(c,{_hidden:!u})},delete:g&&m&&y.delete?()=>d.remove(c):void 0},style:w,extras:e.menuRows?.(i,o,r)??void 0,pinnedLine:p?V(e).pinned:void 0})}function U(e,n,t){return e?{moveUp:n(-1)?()=>t(-1):null,moveDown:n(1)?()=>t(1):null}:{}}var V=e=>e.words?.screen??o.menu;function B(e){const n=V(e),t=!e.readOnly,r=[];t&&e.history.hasPast&&r.push({label:n.undo,icon:/* @__PURE__ */A(w,{}),shortcut:"⌘Z",onClick:e.history.back}),t&&e.history.hasFuture&&r.push({label:n.redo,icon:/* @__PURE__ */A(x,{}),shortcut:"⇧⌘Z",onClick:e.history.forward});const i=[],c=e.nodeOps.held,s=K(e,l,e.sectionBand().cap);if(t&&c&&(e.canPasteAt?e.canPasteAt(c,s):f(c.from)===l)){const n=s,t=e.words?.menu??a;i.push({label:t.pasteNamed({paste:t.paste,label:c.label}),icon:/* @__PURE__ */A(C,{}),shortcut:"⌘V",onClick:()=>e.nodeOps.paste(n)})}const u=[r,i,[...e.openPageStyles?[{label:e.pageStylesLabel??o.pageStyles,icon:/* @__PURE__ */A(O,{}),onClick:e.openPageStyles}]:[],{label:n.collapseAll,icon:/* @__PURE__ */A(z,{}),onClick:e.collapseAll}]].filter(e=>e.length>0),d={label:"—",onClick:()=>{}};return u.flatMap((e,n)=>n?[d,...e]:e)}function R(e,n){const t=n.selectionStart??0,o=n.selectionEnd??0,l=n.value.slice(t,o),r=e=>{n.focus(),n.setRangeText(e,t,o,"end"),n.dispatchEvent(new Event("input",{bubbles:!0}))},i=e.words?.menu??a,c=V(e),s=[];l&&(s.push({label:i.copy,icon:/* @__PURE__ */A(P,{}),shortcut:"⌘C",onClick:()=>navigator.clipboard?.writeText(l)}),s.push({label:i.cut,icon:/* @__PURE__ */A(P,{}),shortcut:"⌘X",onClick:()=>{navigator.clipboard?.writeText(l),r("")}})),s.push({label:i.paste,icon:/* @__PURE__ */A(C,{}),shortcut:"⌘V",onClick:()=>{navigator.clipboard?.readText().then(e=>{e&&r(e)}).catch(()=>e.onPasteRefused())}});const u=[s,n.value?[{label:c.selectAll,shortcut:"⌘A",onClick:()=>{n.focus(),n.select()}}]:[]].filter(e=>e.length>0),d={label:"—",onClick:()=>{}};return u.flatMap((e,n)=>n?[d,...e]:e)}function N(e){return e.shiftKey}function F(e,t){const[o,l]=h(null),r=k(()=>l(null),[]);n(null!==o,r);const i=b(e);i.current=e;const c=k(e=>{const n=i.current,t=n.keys;if(!t)return;const o=S(e);if(!o)return;const l=t.selected();if(!l)return;const r=L(n,o,l,{readOnly:t.readOnly,held:t.held()});r&&(e.preventDefault(),t.onDone?.(r))},[]),s=e.keys?.target??null;v(()=>{if(!s)return;const e=e=>c(e);return s.addEventListener("keydown",e),()=>s.removeEventListener("keydown",e)},[s,c]),d(t,"keydown",c);const a=k(n=>{if(N(n))return;const t=n.target;if(t?.closest?.("[data-slot-zone]"))return n.preventDefault(),void l(null);const o=function(e){const n=e?.closest?.("input, textarea");return n&&("INPUT"!==n.tagName||["text","search","url","email","tel","number",""].includes(n.type))?n:null}(t);if(o)return n.preventDefault(),void l({kind:"input",x:n.clientX,y:n.clientY,el:o,owner:t});const r=t?.closest?.("[data-node-id]")?.getAttribute("data-node-id"),i=r?e.locate(r):null;n.preventDefault(),l(i?{kind:"node",x:n.clientX,y:n.clientY,...i,owner:t}:{kind:"empty",x:n.clientX,y:n.clientY,owner:t})},[e]);d(t,"contextmenu",n=>{if(N(n)||!t)return;const o=n.target?.closest?.("[data-easel-block]")??null,r=o?.getAttribute("data-easel-block"),i=r?e.locate(r):null;n.preventDefault();const c=p(t.frame,n.clientX,n.clientY),s=t.frame;l(i?{kind:"node",...c,...i,owner:s}:{kind:"empty",...c,owner:s})}),d(t,"mousedown",r),d(t,"scroll",r,{on:"window"});return{onEditorContextMenu:a,menu:o?/* @__PURE__ */A(G,{host:e,target:o,onClose:r}):null,closeMenu:r}}function G({host:e,target:n,onClose:t}){const o="node"===n.kind?E(e,n):"input"===n.kind?R(e,n.el):B(e);return 0===o.length?null:/* @__PURE__ */A(g,{at:{x:n.x,y:n.y},owner:n.owner??null,onClose:t,"aria-label":i(o),items:r(o)})}export{Y as EASEL_NODE_CLIPBOARD,T as ancestorChain,D as nodeClipboardOf,M as nodeClipboardRules,E as nodeMenuItems,S as nodeShortcut,B as pageMenuItems,X as pastePlace,L as runNodeShortcut,R as textMenuItems,I as useNodeClipboard,F as useNodeContextMenu};
|
package/dist/chunk-CMPFUJ26.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{buildPaletteSections as e,pinnedSection as t,categoryLabel as n}from"./chunk-VKPOH6MK.js";import{blockTypesIn as o}from"./chunk-IZGFJWH4.js";import{sectionTemplatesOf as l}from"./chunk-N7E6264U.js";import{sharedSectionsOf as r}from"./chunk-N3MJOHAG.js";import{SidePanelHead as i,PanelModeExit as s}from"./chunk-5PXVT7JY.js";import{blockRuns as c}from"./chunk-RUQOIQWI.js";import{useScreenBlockLook as a,useScreenBlockRules as d,useScreenPinned as p}from"./chunk-QORC32JO.js";import{useEaselSession as m}from"./chunk-YM4UEGBV.js";import{DEFAULT_SCREEN_WORDS as f}from"./chunk-IYHO4XQX.js";import{useEasel as u}from"./chunk-FJTCSQWK.js";import{easelMenuEntries as y}from"./chunk-FIVU2COQ.js";import{useWords as h}from"./chunk-MFIRYGHW.js";import{AddPanel as k}from"./chunk-LN43DP2A.js";import{DEFAULT_DRAG_WORDS as g}from"./chunk-TQ5Y6S2X.js";import{useState as b,useEffect as v,useMemo as j,useRef as C}from"react";import{SharedIcon as O,AddIcon as w}from"efficient-shell/icons/efficient";import{ContextMenu as I,toast as F,Dialog as T,Button as $}from"efficient-shell/ui";import{jsx as x,jsxs as E,Fragment as H}from"react/jsx-runtime";function M({name:e,pages:t,onDelete:n,onCancel:o}){const l=h("screen",f).shared,[r,i]=b(!1),s=C(null);/* @__PURE__ */
|
|
2
|
-
return x(T,{open:!0,role:"alertdialog",size:"sm",title:l.deleteTitle({name:e}),onClose:o,initialFocus:s,footer:/* @__PURE__ */E(H,{children:[
|
|
3
|
-
/* @__PURE__ */x($,{ref:s,variant:"secondary",onClick:o,children:l.cancel}),
|
|
4
|
-
/* @__PURE__ */x($,{variant:"danger",loading:r,onClick:()=>{(async()=>{i(!0);try{await n()}finally{i(!1)}})()},children:l.deleteShared})]}),children:l.deleteMessage({count:t})})}var Q=e=>`section:${e}`,S=e=>`block:${e}`,W=e=>`template:${e}`,A=e=>`shared:${e}`;function J({at:C,placeBlocks:T,canTake:$,onPick:J,itemFor:L,session:N,siteWide:P,onClose:Y,onHide:z,readOnly:B}){const D=u(e=>e.config),G=a(),{labelAtLevel:R,categoryLabel:U,firstSection:V,Icon:X,Thumbnail:K}=G,{blockIsOffered:_,canAddTo:Z}=d(),q=h("screen",f).add,ee=h("drag",g).add,te=m(),[ne,oe]=b([]);v(()=>{let e=!1;const t=e=>_(e,te);return l(te).list().then(n=>{if(e)return;const l=D.components;oe(n.filter(e=>e.node?.type&&l[e.node.type]&&o(e.node).every(t)))}).catch(()=>{}),()=>{e=!0}},[D,te]);const le=p().shared,re=h("screen",f).shared,[ie,se]=b([]),[ce,ae]=b(0);v(()=>{if(!le)return;let e=!1;const t=e=>_(e,te);return r(te).list().then(n=>{if(e)return;const l=D.components;se(n.filter(e=>e.node?.type&&l[e.node.type]&&o(e.node).every(t)))}).catch(()=>{}),()=>{e=!0}},[D,te,ce]);const[de,pe]=b(null),[me,fe]=b(null),ue=j(()=>e(D,G),[D]),ye=e=>R(e,"section",D.components[e]?.label??e),he=e=>({type:Q(e.type),label:e.name,cover:/* @__PURE__ */x(K,{type:e.type}),title:e.desc?`${e.name} — ${e.desc}`:q.tile({name:e.name}),keywords:[e.alias??"",e.desc,e.type,e.catLabel].filter(Boolean)}),ke=e=>{const t=e.indexOf(":"),n=e.slice(0,t),o=e.slice(t+1);if("section"===n)return{kind:"section",type:o};if("block"===n)return{kind:"block",type:o};if("template"===n){const e=ne.find(e=>e.id===o);return e?{kind:"template",template:e}:null}if("shared"===n){const e=ie.find(e=>e.id===o);return e?{kind:"shared",section:e}:null}return null},ge=e=>/* @__PURE__ */x("span",{className:"es-add-glyph-cover",children:/* @__PURE__ */x(X,{type:e,size:26})}),be=j(()=>{const e=t(ue,V),o=/* @__PURE__ */new Map,l=e=>{e.retired||o.has(e.type)||!_(e.type,te)||o.set(e.type,e)};for(const t of e?[e]:ue){const e=Z(t.type)?.choices??[];e.forEach(l),e.forEach(e=>Z(e.type,1)?.choices?.forEach(l))}T?.forEach(l);const r=new Set(ue.map(e=>e.type)),i=[...o.values()].filter(e=>!r.has(e.type)),s=e=>({type:S(e.type),label:e.label,cover:ge(e.type),title:q.tile({name:e.label}),keywords:[e.group??"",e.type].filter(Boolean)}),a=e=>o.has(e.type)?{...he(e),cover:ge(e.type)}:he(e),d=[];ie.length>0&&d.push({key:"shared",title:re.group,tiles:ie.map(e=>({type:A(e.id),label:e.title,cover:/* @__PURE__ */x(K,{type:e.node.type}),mark:/* @__PURE__ */x(O,{size:12}),title:re.onPages({count:e.used_on.length}),keywords:[ye(e.node.type),e.node.type]}))}),ne.length>0&&d.push({key:"templates",title:q.templates,tiles:ne.map(e=>({type:W(e.id),label:e.name,cover:/* @__PURE__ */x(K,{type:e.node.type}),keywords:[ye(e.node.type),e.node.type]}))});const p=i.filter(e=>!e.group);let m=!1;for(const t of Object.keys(D.categories??{})){const o=ue.filter(e=>e.cat===t);if(0===o.length)continue;const l=e&&o.some(t=>t.type===e.type)?e:null,r=(l?[l,...o.filter(e=>e.type!==l.type)]:o).map(a);l&&!m&&(r.splice(1,0,...p.map(s)),m=!0),d.push({key:`category:${t}`,title:n(D,t,U),tiles:r})}const f=d.find(e=>e.key?.startsWith("category:"));if(!m&&f&&p.length>0&&(f.tiles=[...f.tiles,...p.map(s)],m=!0),c(i.filter(e=>e.group||!m)).forEach((e,t)=>{d.push({key:`blocks:${t}`,title:e.group??"",tiles:e.items.map(s)})}),!$)return d;const u=d.map(e=>({...e,tiles:e.tiles.map(e=>{const t=ke(e.type),n=t?$(t):null;return n?{...e,disabled:!0,disabledReason:n}:e})})),y=e=>e.tiles.some(e=>!e.disabled);return[...u.filter(y),...u.filter(e=>!y(e))]},[ne,ie,re,ue,D,q,$,T,te]);/* @__PURE__ */
|
|
5
|
-
return E(H,{children:[
|
|
6
|
-
/* @__PURE__ */x(i,{icon:/* @__PURE__ */x(w,{size:15}),title:q.title,context:q.contextAll,actions:/* @__PURE__ */x(s,{label:q.done,description:q.doneDescription,onClick:Y}),onHide:z}),
|
|
7
|
-
/* @__PURE__ */E("div",{className:"sf-addside sf-scroll",children:[
|
|
8
|
-
/* @__PURE__ */x(k,{groups:be,session:N,itemFor:e=>L(ke(e)??{kind:"section",type:e}),onInsert:J?e=>{const t=ke(e);t&&J(t)}:void 0,onTileMenu:(e,t)=>{const n=ke(e);return"shared"===n?.kind&&!B&&(pe({section:n.section,...t}),!0)},at:C,hint:q.hint,searchLabel:q.search,readOnly:B,words:ee}),P??null]}),de?/* @__PURE__ */x(I,{at:{x:de.x,y:de.y},owner:de.owner,onClose:()=>pe(null),"aria-label":de.section.title,items:y([{label:re.deleteShared,danger:!0,onClick:()=>{fe(de.section),pe(null)}}])}):null,me?/* @__PURE__ */x(M,{name:me.title,pages:me.used_on.length,onDelete:()=>(async e=>{try{await r(te).remove(e.id)}catch{return void F.error(re.deleteFailed)}fe(null),le?.removed?.(e),se(t=>t.filter(t=>t.id!==e.id)),ae(e=>e+1)})(me),onCancel:()=>fe(null)}):null]})}export{J as AddSidePanel,S as blockKey,Q as sectionKey,A as sharedKey,W as templateKey};
|
package/dist/chunk-CZAAGBVL.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{SettingRow as e,Segmented as a,Tooltip as s}from"efficient-shell/ui";import{jsx as i,jsxs as l}from"react/jsx-runtime";function n({label:a,labelId:s,icon:l,value:n,hint:t,changed:c,htmlFor:d,action:r,children:o,className:m}){/* @__PURE__ */
|
|
2
|
-
return i(e,{size:"compact",label:a,labelId:s,icon:l,readout:n,description:t,changed:c,controlId:d,action:r,value:o,className:m})}function t({options:e,value:n,onChange:t,ariaLabel:c,fit:d,disabled:r=!1,className:o}){const m=d&&function(e,a){return{"--es-fit-count":e,"--es-fit-labels":`${a.labelsPx}px`,"--es-fit-widest":`${a.widestLabelPx}px`}}(e.length,d),b=e.findIndex(e=>e.id===n);
|
|
3
|
-
/* @__PURE__ */
|
|
4
|
-
return i("div",{className:"es-segs-fit","data-disabled":r||void 0,style:m,children:/* @__PURE__ */i(a,{size:"sm",label:c,className:`es-segs${m?" is-measured":""}${o?` ${o}`:""}`,value:b<0?"":String(b),onChange:a=>t(e[Number(a)].id),options:e.map((e,a)=>{const n=e.title??("string"==typeof e.label?e.label:void 0),t="string"!=typeof e.label,c=a=>n&&(e.icon||t)?/* @__PURE__ */i(s,{content:n,children:a}):a;return{value:String(a),disabled:r||!0===e.disabled,icon:e.icon?c(
|
|
5
|
-
/* @__PURE__ */i("span",{className:"es-seg-icon","aria-hidden":"true",children:e.icon})):void 0,label:t?/* @__PURE__ */l("span",{className:"es-seg-word es-seg-drawn",children:[c(
|
|
6
|
-
/* @__PURE__ */i("span",{className:"es-seg-mark","aria-hidden":"true",children:e.label})),
|
|
7
|
-
/* @__PURE__ */i("span",{className:"es-vh",children:n})]}):/* @__PURE__ */i("span",{className:"es-seg-word",children:e.label})}})})})}export{n as SettingsField,t as SettingsSegmented};
|
package/dist/chunk-DSKNJXB4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{panelFieldsOf as t}from"./chunk-5XL2RXFU.js";import{withoutDeviceGate as o}from"./chunk-2FYFAAAK.js";import{DESIGN_GROUP_KEY as n,BUCKET_KEY as e}from"./chunk-3QB2ZQXK.js";import{STYLE_KIND as r,fieldKind as s,copyStyle as c,heldStyle as i,planPaste as p,pasteMessage as u}from"./chunk-V7U33NF2.js";import{ANCHOR_FIELD_KEYS as f,foldMetaOf as a,MEDIA_FIELD_MARKER as l,TEXT_FIELD_MARKER as m,LINK_FIELD_MARKER as h}from"./chunk-ANPOR6EY.js";import{deviceMetaOf as y}from"./chunk-YCSZAP7T.js";var j=/* @__PURE__ */new Set([n.Size,n.Design,n.Layout,n.Position]),w=new Set(Object.values(n)),b=new Set(Object.values(e)),S=new Set(f),k=/* @__PURE__ */new Set(["focal","imageFocal"]),A=[l,m,h];function g(t){return`site:${t??""}`}function v(t){if(!t||"object"!=typeof t)return null;const n=t,e=o(t)??t,c=n[r]??e[r];if("string"==typeof c)return c;const i=n.options??e.options;if(Array.isArray(i)){return`choice:${i.map(t=>String(t?.value)).sort().join("|")}`}return s(e)}function F(t){const n=t,e=o(t);return A.some(t=>t in n||e&&t in e)}function O(o,n){const r=t(o,n)??{},s=[];let c=!0,i=!1;for(const[t,o]of Object.entries(r))b.has(t)?(c=t===e.Design,i=!1):w.has(t)?c&&(i=j.has(t)):i&&o&&"object"==typeof o&&!t.startsWith("_")&&(a(o)||S.has(t)||k.has(t)||F(o)||"slot"!==o.type&&s.push({path:[t],kind:v(o),counted:"mobile"!==y(o)?.tier}));return s}function d(t,o,n,e,r){c({scope:n,type:e.type,label:r,rows:t(o,e),props:e.props})}function L(t,o,n,e,r,s){const c=i(n);if(!c)return null;const f=p(c,{type:e.type,rows:t(o,e),props:e.props});return{...f,message:u(f,c.sourceLabel,r,s)}}function P(t,o,n,e){d(O,t,o,n,e)}function X(t,o,n,e,r){return L(O,t,o,n,e,r)}var Y={scope:t=>g(t.siteId),rows:(t,o)=>O(t,o),copy:(t,o,n,e)=>P(e,t,o,n),plan:(t,o,n,e)=>X(e,t,o,n)};function D(t,o){if(!t&&!o)return Y;const n=t?.rows,e=n?(t,o)=>n(t,o):O;return{scope:t?.scope??Y.scope,rows:(t,o)=>e(t,o),copy:t?.copy??((t,o,n,r)=>d(e,r,t,o,n)),plan:t?.plan??((t,n,r,s)=>L(e,s,t,n,r,o))}}export{P as copyNodeStyle,O as nodeStyleRows,X as planNodePaste,v as shopFieldKind,g as siteStyleScope,D as styleClipboardOf};
|