efficient-easel 25.0.0 → 26.1.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 +3 -4
- package/dist/chunk-2T22IY3J.js +2 -0
- package/dist/chunk-4FFDGEWA.js +1 -0
- package/dist/{chunk-KFV7N2DJ.js → chunk-56ID6FKZ.js} +1 -1
- package/dist/chunk-5OKOCRXT.js +11 -0
- package/dist/{chunk-4Y3TK65H.js → chunk-5QUIXGQU.js} +1 -1
- package/dist/{chunk-ZYOQXBJF.js → chunk-6BOOYHHK.js} +4 -4
- package/dist/{chunk-OXOUGEAT.js → chunk-7GGNFLHT.js} +1 -1
- package/dist/{chunk-VIUES5R6.js → chunk-7PGO4K5M.js} +7 -7
- package/dist/chunk-BA5X67LQ.js +1 -0
- package/dist/{chunk-53ME3GAI.js → chunk-BBD3FLU3.js} +14 -14
- package/dist/chunk-BYONFJVQ.js +2 -0
- package/dist/chunk-CLAADE4J.js +14 -0
- package/dist/chunk-IMAN6IP5.js +4 -0
- package/dist/chunk-JQQFB7EZ.js +1 -0
- package/dist/chunk-LSGKADNV.js +5 -0
- package/dist/chunk-O4DQ6O6W.js +1 -0
- package/dist/{chunk-S6YOIRXQ.js → chunk-Q3VAJMXS.js} +1 -1
- package/dist/{chunk-YFHKE54W.js → chunk-QAVA4V2C.js} +1 -1
- package/dist/{chunk-U3LTJSBU.js → chunk-R76XMEKT.js} +11 -11
- package/dist/{chunk-MBEUSPIN.js → chunk-SQTVXE5D.js} +4 -4
- package/dist/{chunk-GEPSJJWW.js → chunk-STQDOTHF.js} +1 -1
- package/dist/{chunk-62UGN7VM.js → chunk-TOEJCZUO.js} +1 -1
- package/dist/chunk-TTCUC2Q3.js +1 -0
- package/dist/{chunk-FYV6GZXP.js → chunk-UCZQWQNS.js} +1 -1
- package/dist/{chunk-KTV7ORWF.js → chunk-VXAGXHKI.js} +38 -38
- package/dist/{chunk-M4THI4OO.js → chunk-WOA775T4.js} +1 -1
- package/dist/drag/index.js +1 -1
- package/dist/easel/index.js +1 -1
- package/dist/fields/index.js +1 -1
- package/dist/panel/index.d.ts +63 -2
- package/dist/panel/index.js +1 -1
- package/dist/panel/panel.css +46 -0
- package/dist/pick/index.d.ts +16 -195
- package/dist/pick/index.js +1 -1
- package/dist/pick/pick.css +6 -196
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenDocumentContext.js +1 -1
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +17 -17
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/document/block-set-host.js +1 -1
- package/dist/screen/lib/document/box-fields.d.ts +129 -3
- package/dist/screen/lib/document/box-fields.js +1 -1
- package/dist/screen/lib/document/button-fields.d.ts +97 -0
- package/dist/screen/lib/document/button-fields.js +1 -0
- package/dist/screen/lib/document/device-fields.js +1 -1
- package/dist/screen/lib/document/image-fields.d.ts +118 -0
- package/dist/screen/lib/document/image-fields.js +5 -0
- package/dist/screen/lib/document/style-clipboard.js +1 -1
- package/dist/screen/lib/document/style-fields.d.ts +109 -0
- package/dist/screen/lib/document/style-fields.js +1 -0
- package/dist/screen/lib/document/use-section-ops.js +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/words.d.ts +22 -1
- package/dist/screen/words.js +1 -1
- package/dist/strings/index.d.ts +12 -9
- package/dist/strings/index.js +2 -2
- package/dist/text-styles/index.d.ts +3 -3
- package/dist/text-styles/index.js +37 -37
- package/dist/{words-fbR9IwxH.d.ts → words-BrN08Fup.d.ts} +16 -1
- package/package.json +19 -1
- package/dist/chunk-4OMAA45Q.js +0 -5
- package/dist/chunk-ERB6FAZT.js +0 -2
- package/dist/chunk-H6BER2EU.js +0 -1
- package/dist/chunk-LUG22U5L.js +0 -1
- package/dist/chunk-OFBZOI6W.js +0 -1
- package/dist/chunk-SC6E3UUS.js +0 -13
- package/dist/chunk-SSDKT4AY.js +0 -9
- package/dist/chunk-U6LJ5UKD.js +0 -6
- package/dist/chunk-ZLOMH2PD.js +0 -1
- package/dist/words-DWvCJXwR.d.ts +0 -51
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { ColorPreset } from 'efficient-shell/ui';
|
|
3
|
+
import { ValueAccess, BoxField, BoxFieldSay } from './box-fields.js';
|
|
4
|
+
import 'efficient-shell/format';
|
|
5
|
+
import '../../../ScreenDocumentContext-DPW_6gOC.js';
|
|
6
|
+
import '../../../blocks/index.js';
|
|
7
|
+
import '../../../types-BljCVdzR.js';
|
|
8
|
+
import '../../../data/index.js';
|
|
9
|
+
import '../../../types-Dq180WRV.js';
|
|
10
|
+
import '../../../resolve-Bz4mszpL.js';
|
|
11
|
+
import '../../../plan-D0DgSLnY.js';
|
|
12
|
+
import '../document-contract.js';
|
|
13
|
+
import '../document-switch.js';
|
|
14
|
+
import '../../../engine-CvXpFE86.js';
|
|
15
|
+
import '../../../edit-lock/index.js';
|
|
16
|
+
import '../admin-bridge.js';
|
|
17
|
+
import '../session.js';
|
|
18
|
+
import '../backend-error.js';
|
|
19
|
+
import '../host-chrome.js';
|
|
20
|
+
import '../links/link-filters.js';
|
|
21
|
+
import '../document-hooks.js';
|
|
22
|
+
import '../section-template-types.js';
|
|
23
|
+
import './content-tree.js';
|
|
24
|
+
import '../shared-section-types.js';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* THE STYLE ROWS of both editors: a colour, a border and the corners, as
|
|
28
|
+
* settings rows (plan [PLAN] Fill Editor Gaps Both Ways). The parts were
|
|
29
|
+
* already one (`SettingsColour`, the shell's `BorderInput` and
|
|
30
|
+
* `CornersInput`); each editor still wrapped them in its own row — the
|
|
31
|
+
* website's `ColourRow`, `BorderRow` and `cornersRowField`, the email
|
|
32
|
+
* designer's colour card and radius slider. These are the rows, built once.
|
|
33
|
+
*
|
|
34
|
+
* What differs between the editors is handed in, never decided here:
|
|
35
|
+
*
|
|
36
|
+
* - where the value is stored (`access`, {@link ValueAccess}): the website
|
|
37
|
+
* beside the other props, the email designer in one object. Left out, the
|
|
38
|
+
* row reads and writes its own field;
|
|
39
|
+
* - what an empty row follows (`useFollows`, a hook): the site's button
|
|
40
|
+
* colour, the campaign's accent, the corner in force. The row shows it in
|
|
41
|
+
* grey and stores nothing for it.
|
|
42
|
+
*
|
|
43
|
+
* A cleared value is `""` (a colour) or `null` (corners) on the row's own
|
|
44
|
+
* field, as the website has always stored it, and is REMOVED from an object.
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
/** Where a style row keeps its value. */
|
|
48
|
+
interface Stored {
|
|
49
|
+
/** The row's own key: the field it is declared under. */
|
|
50
|
+
key: string;
|
|
51
|
+
/** Where the value is kept. Left out: the row's own field. */
|
|
52
|
+
access?: ValueAccess;
|
|
53
|
+
}
|
|
54
|
+
/** A field that keeps a value a style row writes beside its own: saved, and
|
|
55
|
+
* drawn by that row (`reachedBy`), never by a row of its own. */
|
|
56
|
+
declare function keptByRow<V>(reachedBy: string): BoxField<V> & {
|
|
57
|
+
reachedBy: string;
|
|
58
|
+
};
|
|
59
|
+
interface ColourFieldOptions extends Stored {
|
|
60
|
+
label: string;
|
|
61
|
+
icon: ReactElement;
|
|
62
|
+
/** The colour an empty row paints, `#rrggbb`. A hook. */
|
|
63
|
+
useFollows: () => string;
|
|
64
|
+
/** The colours the window offers first. A hook. */
|
|
65
|
+
usePresets?: () => readonly ColorPreset[];
|
|
66
|
+
/** The colour's opacity, 0-100, on a sibling key; `useUnset` is what an
|
|
67
|
+
* unset opacity draws (a hook; 100 when left out). */
|
|
68
|
+
opacity?: {
|
|
69
|
+
key: string;
|
|
70
|
+
useUnset?: () => number;
|
|
71
|
+
};
|
|
72
|
+
/** What Reset's tooltip says it goes back to, in the host's words
|
|
73
|
+
* (`#2E2E2E from Styles`). The bare hex when left out. */
|
|
74
|
+
resetTo?: (hex: string) => string;
|
|
75
|
+
}
|
|
76
|
+
/** The widest border a row offers, px (the website's answer 4). */
|
|
77
|
+
declare const BORDER_WIDTH_MAX = 20;
|
|
78
|
+
interface BorderFieldOptions extends Stored {
|
|
79
|
+
/** What an empty border draws: its width and colour, shown in grey. A hook. */
|
|
80
|
+
useFollows: () => {
|
|
81
|
+
width: number;
|
|
82
|
+
color: string;
|
|
83
|
+
};
|
|
84
|
+
/** The Solid / Dashed / Dotted strip. Default false: the line is solid. */
|
|
85
|
+
styles?: boolean;
|
|
86
|
+
}
|
|
87
|
+
/** The corners in the order they are stored. Absence means all four. */
|
|
88
|
+
declare const CORNER_SIDES: readonly ["tl", "tr", "br", "bl"];
|
|
89
|
+
/** The largest corner a row offers, px (the site's own scale). */
|
|
90
|
+
declare const CORNER_RADIUS_MAX = 40;
|
|
91
|
+
interface CornersFieldOptions extends Stored {
|
|
92
|
+
/** The key on the same node (or in the same object) that holds which
|
|
93
|
+
* corners are round. Nothing stored: all four. */
|
|
94
|
+
sidesKey: string;
|
|
95
|
+
/** The radius an unset row draws, px. A hook. */
|
|
96
|
+
useFollows: () => number;
|
|
97
|
+
step?: number;
|
|
98
|
+
}
|
|
99
|
+
/** The three style rows, in the host's words. */
|
|
100
|
+
declare function styleFieldBuilders(say?: BoxFieldSay): {
|
|
101
|
+
colourField: (o: ColourFieldOptions) => BoxField<unknown>;
|
|
102
|
+
borderField: (o: BorderFieldOptions) => BoxField<unknown>;
|
|
103
|
+
cornersField: (o: CornersFieldOptions) => BoxField<unknown>;
|
|
104
|
+
};
|
|
105
|
+
declare const colourField: (o: ColourFieldOptions) => BoxField<unknown>;
|
|
106
|
+
declare const borderField: (o: BorderFieldOptions) => BoxField<unknown>;
|
|
107
|
+
declare const cornersField: (o: CornersFieldOptions) => BoxField<unknown>;
|
|
108
|
+
|
|
109
|
+
export { BORDER_WIDTH_MAX, type BorderFieldOptions, CORNER_RADIUS_MAX, CORNER_SIDES, type ColourFieldOptions, type CornersFieldOptions, borderField, colourField, cornersField, keptByRow, styleFieldBuilders };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{BORDER_WIDTH_MAX,CORNER_RADIUS_MAX,CORNER_SIDES,borderField,colourField,cornersField,keptByRow,styleFieldBuilders}from"../../../chunk-IMAN6IP5.js";import"../../../chunk-5OKOCRXT.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-BBD3FLU3.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useSectionOps}from"../../../chunk-
|
|
1
|
+
export{useSectionOps}from"../../../chunk-WOA775T4.js";import"../../../chunk-LSGKADNV.js";import"../../../chunk-NCXYC7WI.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-TCAAOYQY.js";import"../../../chunk-BBD3FLU3.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-R76XMEKT.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-ZEH6QLBH.js";import"../../../chunk-WHS6Y55E.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-Y2T3JX7K.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-3XECMGXX.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-
|
|
1
|
+
export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-UCZQWQNS.js";import"../../chunk-LX23TCTP.js";import"../../chunk-BBD3FLU3.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-K53PQAMP.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSelectionMode,isSlotMode,sameInspectorMode,screenSlotsOf,shownChildSlotsOf,shownSlotFieldsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-
|
|
1
|
+
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSelectionMode,isSlotMode,sameInspectorMode,screenSlotsOf,shownChildSlotsOf,shownSlotFieldsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-LSGKADNV.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-BBD3FLU3.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-R76XMEKT.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
|
package/dist/screen/words.d.ts
CHANGED
|
@@ -395,5 +395,26 @@ type ScreenWords = {
|
|
|
395
395
|
};
|
|
396
396
|
};
|
|
397
397
|
declare const DEFAULT_SCREEN_WORDS: ScreenWords;
|
|
398
|
+
/**
|
|
399
|
+
* THE IMAGE ROW's own words (`ImageRow`, `screen/lib/document/image-fields`;
|
|
400
|
+
* group `imageRow` of `efficient-easel/strings`). The row reads them with
|
|
401
|
+
* `useWords('imageRow', …)`. Its label, its bin's name and its kind hint are
|
|
402
|
+
* the host's; the box's own words are the shell's `MediaUploadField`'s.
|
|
403
|
+
*/
|
|
404
|
+
type ImageRowWords = {
|
|
405
|
+
/** The focus control's name and the ↺'s label. */
|
|
406
|
+
focus: string;
|
|
407
|
+
/** The ↺'s tooltip detail: where the phone's point goes back to. */
|
|
408
|
+
onDesktop: (value: string) => string;
|
|
409
|
+
/** The link that opens the paste box. */
|
|
410
|
+
pasteLink: string;
|
|
411
|
+
/** The paste box's name. */
|
|
412
|
+
pasteName: string;
|
|
413
|
+
/** The note a template draws in place of the box. */
|
|
414
|
+
template: string;
|
|
415
|
+
/** The same note for a video row. */
|
|
416
|
+
templateVideo: string;
|
|
417
|
+
};
|
|
418
|
+
declare const DEFAULT_IMAGE_ROW_WORDS: ImageRowWords;
|
|
398
419
|
|
|
399
|
-
export { DEFAULT_SCREEN_ADD_WORDS, DEFAULT_SCREEN_SAVE_STATUS_WORDS, DEFAULT_SCREEN_SHARED_WORDS, DEFAULT_SCREEN_WORDS, type ScreenAddWords, type ScreenBarWords, type ScreenLeaveWords, type ScreenMenuWords, type ScreenSaveStatusWords, type ScreenSharedWords, type ScreenWords };
|
|
420
|
+
export { DEFAULT_IMAGE_ROW_WORDS, DEFAULT_SCREEN_ADD_WORDS, DEFAULT_SCREEN_SAVE_STATUS_WORDS, DEFAULT_SCREEN_SHARED_WORDS, DEFAULT_SCREEN_WORDS, type ImageRowWords, type ScreenAddWords, type ScreenBarWords, type ScreenLeaveWords, type ScreenMenuWords, type ScreenSaveStatusWords, type ScreenSharedWords, type ScreenWords };
|
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_IMAGE_ROW_WORDS,DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_SAVE_STATUS_WORDS,DEFAULT_SCREEN_SHARED_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-Q3VAJMXS.js";
|
package/dist/strings/index.d.ts
CHANGED
|
@@ -6,9 +6,8 @@ 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
8
|
import { P as PageCopyWords } from '../words-Dl8Qja4K.js';
|
|
9
|
-
import { P as PanelWords } from '../words-
|
|
10
|
-
import {
|
|
11
|
-
import { ScreenWords } from '../screen/words.js';
|
|
9
|
+
import { P as PanelWords, C as ColourRowWords } from '../words-BrN08Fup.js';
|
|
10
|
+
import { ImageRowWords, ScreenWords } from '../screen/words.js';
|
|
12
11
|
export { ScreenAddWords, ScreenSharedWords } from '../screen/words.js';
|
|
13
12
|
import { S as StyleClipboardWords } from '../words-CnnHb9jo.js';
|
|
14
13
|
import { T as TextStylesWords } from '../words-B5Gb7KFq.js';
|
|
@@ -73,8 +72,8 @@ type RailWords = {
|
|
|
73
72
|
* lane (`tests/*-leaf-safety`), and several are held to a bundle that never
|
|
74
73
|
* spells a browser global — while one sentence below does ("another tab or
|
|
75
74
|
* window"). So a module owns its group and its defaults, and this file only
|
|
76
|
-
* puts the groups side by side. `DEFAULT_EASEL_STRINGS.
|
|
77
|
-
* own default object, not a copy of it.
|
|
75
|
+
* puts the groups side by side. `DEFAULT_EASEL_STRINGS.colourRow` IS the
|
|
76
|
+
* colour row's own default object, not a copy of it.
|
|
78
77
|
*
|
|
79
78
|
* ── Framework-free ────────────────────────────────────────────────────────
|
|
80
79
|
* No React, no browser global, nothing run at import but object literals
|
|
@@ -102,8 +101,12 @@ interface EaselStrings {
|
|
|
102
101
|
panel: PanelWords;
|
|
103
102
|
/** `efficient-easel/fields` — the number box, the dropdown, the list field. */
|
|
104
103
|
fields: FieldsWords;
|
|
105
|
-
/** `efficient-easel/
|
|
106
|
-
|
|
104
|
+
/** `efficient-easel/panel` — the colour row (`SettingsColour`): its hex
|
|
105
|
+
* box's name and its empty word. Hook-free: a host hands it in. */
|
|
106
|
+
colourRow: ColourRowWords;
|
|
107
|
+
/** `efficient-easel/screen/lib/document/image-fields` — the image row
|
|
108
|
+
* (`ImageRow`): focus, the paste box, the template note. */
|
|
109
|
+
imageRow: ImageRowWords;
|
|
107
110
|
/** `efficient-easel/drag` — the Add panel and the canvas layer. */
|
|
108
111
|
drag: DragWords;
|
|
109
112
|
/** `efficient-easel/node-ops` — the right-click rows. */
|
|
@@ -164,7 +167,7 @@ interface EaselStringsProviderProps {
|
|
|
164
167
|
* them. With no provider the engine speaks English, exactly as before 0.95.0.
|
|
165
168
|
*
|
|
166
169
|
* The hook-free leaves do NOT read it — the rail, the settings-panel
|
|
167
|
-
* primitives
|
|
170
|
+
* primitives (the colour row too), the Layers tree, the Add panel, the canvas layer —
|
|
168
171
|
* and neither do the plain functions (`editNotice`, `saveIndicator`,
|
|
169
172
|
* `nodeMenuItems`, …). Each takes its group as a prop or an argument instead;
|
|
170
173
|
* a host hands it `useEaselStrings()`'s.
|
|
@@ -175,4 +178,4 @@ declare function useEaselStrings(): EaselStrings;
|
|
|
175
178
|
/** The nearest provider's locale, or `'en'`. */
|
|
176
179
|
declare function useEaselLocale(): string;
|
|
177
180
|
|
|
178
|
-
export { type CanvasWords, ChromeWords, CopyWords, DEFAULT_EASEL_STRINGS, type DeepPartial, DragWords, type EaselStrings, EaselStringsProvider, type EaselStringsProviderProps, FieldsWords, LockWords, NodeMenuWords, NoticeWords, PageCopyWords, PanelWords,
|
|
181
|
+
export { type CanvasWords, ChromeWords, ColourRowWords, CopyWords, DEFAULT_EASEL_STRINGS, type DeepPartial, DragWords, type EaselStrings, EaselStringsProvider, type EaselStringsProviderProps, FieldsWords, ImageRowWords, LockWords, NodeMenuWords, NoticeWords, PageCopyWords, PanelWords, type RailWords, SaveWords, ScreenWords, StyleClipboardWords, TextStylesWords, TreeWords, mergeEaselStrings, useEaselLocale, useEaselStrings };
|
package/dist/strings/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{DEFAULT_TEXT_STYLES_WORDS as
|
|
2
|
-
return
|
|
1
|
+
import{DEFAULT_TEXT_STYLES_WORDS as o}from"../chunk-OGH6CC3E.js";import{DEFAULT_SCREEN_WORDS as r,DEFAULT_IMAGE_ROW_WORDS as n}from"../chunk-Q3VAJMXS.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 e}from"../chunk-K56YDHYQ.js";import{DEFAULT_COLOUR_ROW_WORDS as m,DEFAULT_PANEL_WORDS as i}from"../chunk-56ID6FKZ.js";import{DEFAULT_NODE_MENU_WORDS as s}from"../chunk-WK3AFPXY.js";import{DEFAULT_PAGE_COPY_WORDS as u}from"../chunk-CEC5XLN4.js";import{DEFAULT_SAVE_WORDS as f}from"../chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as p,DEFAULT_NOTICE_WORDS as l}from"../chunk-AJSDWWJW.js";import{DEFAULT_RAIL_WORDS as h}from"../chunk-2OAZYSWJ.js";import{DEFAULT_LOCK_WORDS as j}from"../chunk-RE4LP46F.js";import{DEFAULT_COPY_WORDS as a}from"../chunk-PMRN5Z3T.js";import{DEFAULT_FIELDS_WORDS as k}from"../chunk-JACEEVVF.js";import{stringsContext as y}from"../chunk-MFIRYGHW.js";import{DEFAULT_DRAG_WORDS as Y}from"../chunk-TQ5Y6S2X.js";import{useContext as C,useMemo as W}from"react";import{jsx as d}from"react/jsx-runtime";var g={notice:l,lock:j,save:f,chrome:p,rail:h,tree:e,panel:i,fields:k,colourRow:m,imageRow:n,drag:Y,menu:s,styleClipboard:t,copy:a,canvas:c,textStyles:o,screen:r,pageCopy:u},v=o=>"object"==typeof o&&null!==o;function D(o,r){const n={};for(const t of Object.keys(o)){const c=o[t],e=r[t];null==e?n[t]=c:v(c)?n[t]=v(e)?D(c,e):c:n[t]=typeof e==typeof c?e:c}return n}function F(o,r){return r?D(o,r):o}function J({value:o,locale:r,children:n}){const t=y(),c=C(t),e=c?.strings??g,m=r??c?.locale??"en",i=W(()=>({strings:F(e,o),locale:m}),[e,o,m]);/* @__PURE__ */
|
|
2
|
+
return d(t.Provider,{value:i,children:n})}function S(){return C(y())?.strings??g}function A(){return C(y())?.locale??"en"}export{g as DEFAULT_EASEL_STRINGS,J as EaselStringsProvider,F as mergeEaselStrings,A as useEaselLocale,S as useEaselStrings};
|
|
@@ -131,7 +131,8 @@ interface ColourSwatchRowProps {
|
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
133
133
|
* THE COLOR ROW — theme's colours in a row, then Any color, which opens
|
|
134
|
-
* the one colour window
|
|
134
|
+
* the one colour window, the shell's `ColorPickerPanel` (`es-pick-window` is
|
|
135
|
+
* this row's hook on it).
|
|
135
136
|
* Exported so a second host draws the same row instead of a copy (plan S2:
|
|
136
137
|
* the website's part panel; design final 2026-10-06). The text-styles list
|
|
137
138
|
* draws it through this export, unchanged.
|
|
@@ -141,8 +142,7 @@ interface ColourSwatchRowProps {
|
|
|
141
142
|
* (duplicate audit 2026-10-29, U21): its trigger wears the swatch's look
|
|
142
143
|
* (`colorSwatchClasses`, painted with the hue wheel, ringed while the colour
|
|
143
144
|
* 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
|
|
145
|
-
* (`ColourPicker`) included. The row's name, the readout and the swatch group
|
|
145
|
+
* outside, and hands focus back as every kit popup is. The row's name, the readout and the swatch group
|
|
146
146
|
* stay this row's.
|
|
147
147
|
*
|
|
148
148
|
* What a press means is the host's: a swatch writes its key, the window a
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import{hexReadout as e,
|
|
2
|
-
return
|
|
3
|
-
/* @__PURE__ */
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
return
|
|
9
|
-
return
|
|
10
|
-
return
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
return
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
return
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
return
|
|
22
|
-
return
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
return
|
|
25
|
-
return
|
|
26
|
-
return
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
return
|
|
30
|
-
return
|
|
31
|
-
return
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
return
|
|
35
|
-
return
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
1
|
+
import{hexReadout as e,typedHex as s}from"../chunk-4FFDGEWA.js";import{DEFAULT_TEXT_STYLES_WORDS as t}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import{FieldSlider as a}from"../chunk-ZEH6QLBH.js";import{TEXT_STYLE_KINDS as l,canAddTextStyle as i,TEXT_STYLE_MAX as n,isDefaultTextStyle as r,CAMPAIGN_TEXT_STYLE_SETTINGS as o,TEXT_STYLE_SETTINGS as d,textStyleRowSize as c,describeTextStyle as u,updateTextStyle as m,textStyleCaseCss as h,TEXT_STYLE_CASES as p,addTextStyle as v,removeTextStyle as f,TEXT_STYLE_RANGES as y}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 g}from"../chunk-KFWNGPW3.js";import{SettingsSegmented as S}from"../chunk-DX3VILZ3.js";import"../chunk-JACEEVVF.js";import{useWords as b}from"../chunk-MFIRYGHW.js";import{withTip as N}from"../chunk-P2VEMZH5.js";import{hsvToHex as C,Tooltip as T,ColorSwatch as k,Popover as x,ColorPickerPanel as w,colorSwatchClasses as z,IconButton as E,Button as O}from"efficient-shell/ui";import{useId as _,useState as L,useRef as A,useEffect as j,Fragment as M}from"react";import{TrashIcon as $,ChevronIcon as W,BoldIcon as Y,ItalicIcon as X,CaseLowerIcon as F,CaseCapitalizedIcon as G,CaseUpperIcon as H,CaseNormalIcon as I}from"efficient-shell/icons/efficient";import{jsxs as P,jsx as B,Fragment as D}from"react/jsx-runtime";var R=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>C({h:e,s:1,v:1})).join(", ")})`;function V({value:s,hex:t,colours:a,label:l,followsWord:i,anyWord:n,onChange:r,readOnly:o=!1}){const d=void 0!==s&&a.some(e=>e.key===s),c=void 0!==s&&!d;/* @__PURE__ */
|
|
2
|
+
return P("div",{className:"es-ts-set","data-ts-setting":"color",children:[
|
|
3
|
+
/* @__PURE__ */P("div",{className:"es-ts-top",children:[
|
|
4
|
+
/* @__PURE__ */B("span",{className:"es-ts-sub",children:l}),
|
|
5
|
+
/* @__PURE__ */B("span",{className:"es-ts-colour-read",children:t?e(t):i})]}),
|
|
6
|
+
/* @__PURE__ */P("div",{className:"es-ts-swatches",role:"group","aria-label":l,children:[a.map(t=>/* @__PURE__ */B(T,{content:`${t.name} · ${e(t.value)}`,children:/* @__PURE__ */B(k,{color:t.value,size:"sm",className:"es-ts-swatch","aria-label":t.name,selected:s===t.key,disabled:o,onClick:()=>r(t.key)})},t.key)),
|
|
7
|
+
/* @__PURE__ */B(T,{content:n,children:/* @__PURE__ */B(x,{trigger:/* @__PURE__ */B("span",{"aria-hidden":"true",className:"absolute inset-0",style:{background:R}}),triggerLabel:n,triggerClassName:z({size:"sm",selected:c,className:"es-ts-swatch es-ts-swatch--any"}),"aria-label":l,disabled:o,children:/* @__PURE__ */B(w,{className:"es-pick-window",value:t??"",onChange:e=>r(e),label:l,disabled:o})})})]})]})}function Z({styles:e,onChange:s,fonts:a,colours:d=[],settings:c=o,auto:u=[],fallback:m,sample:h,openId:p,defaultOpenId:y=null,onOpenChange:g,onAdd:S,rowActions:C,onRemove:T,max:k=n,device:x="desktop",readOnly:w=!1}){const z=b("textStyles",t),M=_(),[W,Y]=L(y),X=void 0!==p?p:W,F=e=>{void 0===p&&Y(e),g?.(e)},G=A(null),[H,I]=L(null);j(()=>{if(!H||!G.current)return;const e=[...G.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===H.id),s=e?e.querySelector(".es-ts-row"):G.current.querySelector(`.es-ts-add[data-ts-kind="${H.kind}"]`);s?.focus(),I(null)},[H]);/* @__PURE__ */
|
|
8
|
+
return B("div",{className:"es-ts",ref:G,children:l.map(t=>{const l=e.filter(e=>e.kind===t),n=!i(e,t,k),o=!w&&!n;/* @__PURE__ */
|
|
9
|
+
return P(q,{label:z.groups[t],children:[l.map(t=>{const l=C?.(t),i=null!=l&&!1!==l,n=Boolean(T)&&!w&&!r(t);/* @__PURE__ */
|
|
10
|
+
return B(U,{style:t,fonts:a,colours:d,settings:c,auto:u,fallback:m,sample:h,device:x,readOnly:w,open:X===t.id,onOpenChange:e=>F(e?t.id:null),onChange:t=>s(e.map(e=>e.id===t.id?t:e)),actions:n||i?/* @__PURE__ */P(D,{children:[n?N(z.remove,/* @__PURE__ */B(E,{variant:"ghost-danger",size:"sm",className:"es-ts-del","aria-label":z.removeNamed({name:t.name}),onClick:()=>(t=>{if(w||!T)return;const a=f(e,t.id,{name:z.styleName});if(!a)return;const l=e.filter(e=>e.kind===t.kind),i=l[l.indexOf(t)+1];X===t.id&&F(null),s(a.styles),T(a.removed),I({id:i?.id??null,kind:t.kind})})(t),children:/* @__PURE__ */B($,{size:14,"aria-hidden":"true"})})):null,i?l:null]}):null},t.id)}),N(!w&&n?z.full({kind:t,max:k}):void 0,/* @__PURE__ */P(O,{variant:"link",className:"es-ts-add","data-ts-kind":t,disabled:w,"aria-disabled":!(w||!n)||void 0,"aria-describedby":!w&&n?`${M}-full-${t}`:void 0,onClick:()=>{o&&(t=>{if(w)return;const a=v(e,t,{max:k,name:z.styleName,make:S});a&&s(a.styles)})(t)},children:[
|
|
11
|
+
/* @__PURE__ */B("span",{className:"es-ts-add-word",children:z.add[t]}),
|
|
12
|
+
/* @__PURE__ */B("span",{className:"es-ts-count",children:z.count({n:l.length,max:k})})]})),w||!n?null:/* @__PURE__ */B("span",{id:`${M}-full-${t}`,className:"es-vh",children:z.full({kind:t,max:k})})]},t)})})}function q({label:e,children:s}){const t=_();/* @__PURE__ */
|
|
13
|
+
return P("section",{className:"es-ts-section","aria-labelledby":t,children:[
|
|
14
|
+
/* @__PURE__ */B("div",{className:"es-ts-group",id:t,children:e}),s]})}function U({style:e,fonts:s,colours:a=[],settings:l=o,auto:i=[],fallback:n,sample:r,open:h,onOpenChange:p,onChange:v,actions:f,device:y="desktop",readOnly:g=!1}){const S=b("textStyles",t),N=`${_()}-open-${e.id}`,C=new Set(i),T=d.filter(e=>l.includes(e)),k={...n?.(e)??{},...e.values},x="phone"===y,w=x&&void 0!==e.values.sizePhone?{...k,size:e.values.sizePhone}:k,z=s.find(e=>e.value===k.font),E={fontFamily:z?.family,fontSize:`${c(w.size??16)}px`,fontWeight:k.weight,fontStyle:k.italic?"italic":void 0};/* @__PURE__ */
|
|
15
|
+
return P(M,{children:[
|
|
16
|
+
/* @__PURE__ */P("div",{className:"es-ts-item","data-ts-id":e.id,children:[
|
|
17
|
+
/* @__PURE__ */P("button",{type:"button",className:"es-ts-row","aria-expanded":h,"aria-controls":h?N:void 0,onClick:()=>p(!h),children:[
|
|
18
|
+
/* @__PURE__ */B("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */B(W,{size:12})}),
|
|
19
|
+
/* @__PURE__ */B("span",{className:"es-ts-name",style:E,children:e.name}),
|
|
20
|
+
/* @__PURE__ */B("span",{className:"es-ts-meta",children:u(w,s,S,{autoSize:C.has("size")&&w===k&&void 0===e.values.size})})]}),f?/* @__PURE__ */B("div",{className:"es-ts-actions",children:f}):null]}),h?/* @__PURE__ */B("div",{className:"es-ts-open",id:N,children:/* @__PURE__ */B(J,{style:e,values:k,fonts:s,colours:a,settings:T,autoSet:C,sample:r??S.sample,words:S,phone:x,readOnly:g,set:s=>v(m([e],e.id,s)[0])})}):null]})}var K={none:I,upper:H,capitalize:G,lower:F};function J({style:e,values:t,fonts:l,colours:i,settings:n,autoSet:r,sample:o,words:d,phone:c,readOnly:u,set:m}){const p=e.values,v=l.find(e=>e.value===t.font),f=function(e,t){return e?t.find(s=>s.key===e)?.value??s(e)??void 0:void 0}(t.color,i),g=e=>"largestSize"===e||r.has(e),S=e=>g(e)?p[e]:t[e],b=S("size"),C=c&&void 0!==p.sizePhone?p.sizePhone:b,T=S("lineSpacing"),k=S("letterSpacing"),x=g("letterCase")?p.letterCase:t.letterCase,w={fontFamily:v?.family,fontSize:void 0===C?void 0:`${C}px`,fontWeight:t.weight,fontStyle:t.italic?"italic":void 0,lineHeight:void 0===T?void 0:String(T/100),letterSpacing:void 0===k?void 0:`${k}px`,color:f,textTransform:h(x)},z=e=>{const s=y[e],l=g(e);/* @__PURE__ */
|
|
21
|
+
return B("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */B(a,{label:d.settings[e],value:p[e],onChange:s=>m({[e]:s}),min:s.min,max:s.max,step:s.step,shiftStep:s.shiftStep,sliderMin:s.sliderMin,sliderMax:s.sliderMax,unit:s.unit||void 0,styleValue:l?void 0:t[e],auto:l?d.auto:void 0,readOnly:u})},e)};/* @__PURE__ */
|
|
22
|
+
return P(D,{children:[
|
|
23
|
+
/* @__PURE__ */B("div",{className:"es-ts-preview",style:w,"aria-label":d.preview,children:o}),n.map(s=>{switch(s){case"font":/* @__PURE__ */
|
|
24
|
+
return B(Q,{value:p.font,fonts:l,words:d,readOnly:u,set:m},s);case"color":/* @__PURE__ */
|
|
25
|
+
return B(ee,{value:p.color,hex:f,colours:i,words:d,readOnly:u,set:m},s);case"emphasis":{const e=(t.weight??400)>=600,a=!1!==v?.italic;/* @__PURE__ */
|
|
26
|
+
return P("div",{className:"es-ts-set","data-ts-setting":s,children:[
|
|
27
|
+
/* @__PURE__ */B("span",{className:"es-ts-sub",children:d.settings.emphasis}),
|
|
28
|
+
/* @__PURE__ */P("div",{className:"es-ts-icons",children:[N(d.bold,/* @__PURE__ */B(E,{className:"es-ts-icon","aria-label":d.bold,"aria-pressed":e,disabled:u,onClick:()=>m({weight:e?400:700}),children:/* @__PURE__ */B(Y,{size:16})})),u||a?N(d.italic,/* @__PURE__ */B(E,{className:"es-ts-icon","aria-label":d.italic,"aria-pressed":Boolean(t.italic),disabled:u,onClick:()=>m({italic:!t.italic||void 0}),children:/* @__PURE__ */B(X,{size:16})})):/* @__PURE__ */B(E,{className:"es-ts-icon","aria-label":d.italic,"aria-pressed":Boolean(t.italic),"aria-disabled":!0,disabledReason:d.italicMissing,children:/* @__PURE__ */B(X,{size:16})})]})]},s)}case"letterCase":/* @__PURE__ */
|
|
29
|
+
return B(se,{value:p.letterCase??t.letterCase,auto:g("letterCase"),words:d,readOnly:u,set:m},s);case"largestSize":return"heading"===e.kind?z(s):null;case"size":return c?(()=>{const e=y.size;/* @__PURE__ */
|
|
30
|
+
return B("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */B(a,{label:d.settings.size,value:p.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")})():z(s);default:return z(s)}})]})}function Q({value:e,fonts:s,words:t,readOnly:a,set:l}){const i=_();/* @__PURE__ */
|
|
31
|
+
return P("div",{className:"es-ts-set","data-ts-setting":"font",children:[
|
|
32
|
+
/* @__PURE__ */B("span",{className:"es-ts-sub",id:i,children:t.settings.font}),
|
|
33
|
+
/* @__PURE__ */B(g,{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 B(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=p.map(e=>{const s=K[e];return{id:e,label:/* @__PURE__ */B(s,{size:16}),title:t.case[e]}}),n=s?[{id:"auto",label:/* @__PURE__ */B("span",{children:t.case.auto}),title:t.case.autoTitle},...i]:i;/* @__PURE__ */
|
|
35
|
+
return P("div",{className:"es-ts-set","data-ts-setting":"letterCase",children:[
|
|
36
|
+
/* @__PURE__ */B("span",{className:"es-ts-sub",children:t.settings.letterCase}),
|
|
37
|
+
/* @__PURE__ */B(S,{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,U as TextStyleItem,q as TextStylesGroup,Z as TextStylesList};
|
|
@@ -47,5 +47,20 @@ type PanelWords = {
|
|
|
47
47
|
detail: string;
|
|
48
48
|
}) => string;
|
|
49
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* THE COLOUR ROW's own words (`SettingsColour`, group `colourRow` of
|
|
52
|
+
* `efficient-easel/strings`). The row is hook-free like the rest of `panel`, so
|
|
53
|
+
* a host hands them in: `words={useEaselStrings().colourRow}`, and the ↺'s as
|
|
54
|
+
* `resetWords={useEaselStrings().panel}`. The row's name (`label`) and a theme
|
|
55
|
+
* colour's name are the host's.
|
|
56
|
+
*/
|
|
57
|
+
type ColourRowWords = {
|
|
58
|
+
/** The hex box's accessible name, from the row's label. */
|
|
59
|
+
hexCode: (p: {
|
|
60
|
+
label: string;
|
|
61
|
+
}) => string;
|
|
62
|
+
/** What the empty hex box says while nothing is set and nothing is followed. */
|
|
63
|
+
notSet: string;
|
|
64
|
+
};
|
|
50
65
|
|
|
51
|
-
export type { PanelWords as P };
|
|
66
|
+
export type { ColourRowWords as C, PanelWords as P };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-easel",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.1.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",
|
|
@@ -96,10 +96,13 @@
|
|
|
96
96
|
"./screen/lib/document/block-choice",
|
|
97
97
|
"./screen/lib/document/block-types-in",
|
|
98
98
|
"./screen/lib/document/block-set-host",
|
|
99
|
+
"./screen/lib/document/button-fields",
|
|
100
|
+
"./screen/lib/document/style-fields",
|
|
99
101
|
"./screen/lib/document/box-fields",
|
|
100
102
|
"./screen/lib/document/device-fields",
|
|
101
103
|
"./screen/lib/document/field-buckets",
|
|
102
104
|
"./screen/lib/document/field-markers",
|
|
105
|
+
"./screen/lib/document/image-fields",
|
|
103
106
|
"./screen/lib/document/palette-sections",
|
|
104
107
|
"./screen/lib/document/panel-fields",
|
|
105
108
|
"./screen/lib/document/panel-no-control-mark",
|
|
@@ -435,6 +438,16 @@
|
|
|
435
438
|
"import": "./dist/screen/lib/document/content-tree.js",
|
|
436
439
|
"default": "./dist/screen/lib/document/content-tree.js"
|
|
437
440
|
},
|
|
441
|
+
"./screen/lib/document/button-fields": {
|
|
442
|
+
"types": "./dist/screen/lib/document/button-fields.d.ts",
|
|
443
|
+
"import": "./dist/screen/lib/document/button-fields.js",
|
|
444
|
+
"default": "./dist/screen/lib/document/button-fields.js"
|
|
445
|
+
},
|
|
446
|
+
"./screen/lib/document/style-fields": {
|
|
447
|
+
"types": "./dist/screen/lib/document/style-fields.d.ts",
|
|
448
|
+
"import": "./dist/screen/lib/document/style-fields.js",
|
|
449
|
+
"default": "./dist/screen/lib/document/style-fields.js"
|
|
450
|
+
},
|
|
438
451
|
"./screen/lib/document/block-set-host": {
|
|
439
452
|
"types": "./dist/screen/lib/document/block-set-host.d.ts",
|
|
440
453
|
"import": "./dist/screen/lib/document/block-set-host.js",
|
|
@@ -445,6 +458,11 @@
|
|
|
445
458
|
"import": "./dist/screen/lib/document/box-fields.js",
|
|
446
459
|
"default": "./dist/screen/lib/document/box-fields.js"
|
|
447
460
|
},
|
|
461
|
+
"./screen/lib/document/image-fields": {
|
|
462
|
+
"types": "./dist/screen/lib/document/image-fields.d.ts",
|
|
463
|
+
"import": "./dist/screen/lib/document/image-fields.js",
|
|
464
|
+
"default": "./dist/screen/lib/document/image-fields.js"
|
|
465
|
+
},
|
|
448
466
|
"./screen/lib/document/device-fields": {
|
|
449
467
|
"types": "./dist/screen/lib/document/device-fields.d.ts",
|
|
450
468
|
"import": "./dist/screen/lib/document/device-fields.js",
|
package/dist/chunk-4OMAA45Q.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{usePickFollowsSelection as n}from"./chunk-NCXYC7WI.js";import{slotFieldsOf as e,slotChildrenIn as t}from"./chunk-TCAAOYQY.js";import{EaselCanvas as r,useSelectedFields as o}from"./chunk-53ME3GAI.js";import{Inspector as i}from"./chunk-U3LTJSBU.js";import{fieldIsShown as u}from"./chunk-BPXEFVSQ.js";import{createContext as l,useContext as s}from"react";import{DesktopIcon as c}from"efficient-shell/icons/efficient";import{jsx as f}from"react/jsx-runtime";var a={kind:"selection"};function d(n){return"selection"===n.kind}function p(n,e){if(d(n)&&d(e))return!0;const t=n,r=e,o=Object.keys(t);return o.length===Object.keys(r).length&&o.every(n=>Object.is(t[n],r[n]))}function m(n){const e=n;return"string"==typeof e.nodeId&&"string"==typeof e.slot}function k(n,t){const r=n.components?.[t.type]?.fields??{};return e(n,t.type).filter(n=>u(r[n],{values:t.props}))}function h(n,e){return k(n,e).flatMap(n=>t(e,n))}function v(n,e,t){const r=n.slotsOf?.(t);return r||k(e,t).map(n=>({slot:n,label:n,rung:!1}))}function y(n,e){return n.isFirst?n.isFirst(e):e.type===n.first}function g(n,e){return n.isLast?n.isLast(e):e.type===n.last}var b={},O=()=>b,j=()=>"",S=()=>null,w=()=>{},C={isLockedBlock:()=>!1,duplicateBlocked:()=>null,nestDepth:()=>0,newSectionNode:()=>null,canAddTo:()=>null,blockIsOffered:()=>!0},L={labelAtLevel:(n,e,t)=>t,descriptions:{},categoryLabel:()=>{},firstSection:null,blockRowName:(n,e)=>e(n.type),plainText:n=>n,Icon:()=>null,Thumbnail:()=>null,useProducts:()=>null},B={options:[{id:"desktop",label:"Desktop",icon:/* @__PURE__ */f(c,{})}],initial:"desktop",fluid:"desktop",widths:{desktop:2e3}},I={read:()=>"sections",write:()=>{},forSelection:(n,e)=>n?"sections":e},N={first:null,last:null,firstGroup:null,lastGroup:null,isSectionGroup:()=>!1,sectionGroupZone:()=>"",panelOf:()=>null};function P(){/* @__PURE__ */
|
|
2
|
-
return f(r,{height:"fill"})}function A(){const{id:n,fields:e,values:t,readOnly:r,onChange:u}=o();/* @__PURE__ */
|
|
3
|
-
return f("div",{className:"es-sidepanel es-sidepanel--right",children:/* @__PURE__ */f(i,{fields:e,values:t,onChange:u,readOnly:r,idPrefix:n})})}var D=l({});function G({parts:n,children:e}){/* @__PURE__ */
|
|
4
|
-
return f(D.Provider,{value:n,children:e})}function T(){return s(D)}function x(){return(T().useOwnerName??j)()}function F(){return(T().useDocumentLabel??S)()}function Y(n,e,t,r){return(T().useBridges??O)(n,e,t,r)}function E(n){return(T().useStandaloneBridges??O)(n)}function M(n,e){(T().useDocumentPass??w)(n,e)}function Q(){return T().blockRules??C}function R(){return T().blockLook??L}function U(){return T().devices??B}function V(){return T().leftView??I}function X(){return T().pinned??N}function H(){return T().saveSwitch??!0}function J(e){n(!0===T().pickFollowsSelection,e)}function K(){return T().storageNamespace||void 0}function W(){return T().styleClipboard??null}function Z(){return T().nodeKeys??!0}function q(){return T().notify??null}function z(){return T().Canvas??P}function $(){return T().CanvasHead??null}function _(){return T().canvasDrag??null}var nn=l(null);function en({target:n,children:e}){/* @__PURE__ */
|
|
5
|
-
return f(nn.Provider,{value:n,children:e})}function tn(){return s(nn)}function rn(){return T().Inspector??A}export{a as SELECTION_MODE,en as ScreenCanvasTargetProvider,G as ScreenPartsProvider,y as isPinnedFirst,g as isPinnedLast,d as isSelectionMode,m as isSlotMode,p as sameInspectorMode,v as screenSlotsOf,h as shownChildSlotsOf,k as shownSlotFieldsOf,R as useScreenBlockLook,Q as useScreenBlockRules,Y as useScreenBridges,_ as useScreenCanvasDrag,z as useScreenCanvasFrame,$ as useScreenCanvasHead,tn as useScreenCanvasTarget,U as useScreenDevices,F as useScreenDocumentLabel,M as useScreenDocumentPass,rn as useScreenInspectorPanel,V as useScreenLeftView,Z as useScreenNodeKeys,q as useScreenNotify,x as useScreenOwnerName,T as useScreenParts,J as useScreenPickFollowsSelection,X as useScreenPinned,H as useScreenSaveSwitch,K as useScreenStorageNamespace,W as useScreenStyleClipboard,E as useStandaloneScreenBridges};
|
package/dist/chunk-ERB6FAZT.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{routeSharedHostMessage as e}from"./chunk-QZJKWKGH.js";import{describeLoadFailure as r,hostLoadRefusal as n}from"./chunk-ERR437B5.js";import{editLockOf as t}from"./chunk-GR3XRILS.js";import{NO_DOCUMENT_ADDRESSING as o}from"./chunk-RLBXE4EU.js";import{saveStatusOf as u,resetForDocumentSwitch as a}from"./chunk-6ATIYLUL.js";import{isExpiredSession as s,readEaselFailure as i}from"./chunk-KO47WAWR.js";import{useAdminBridge as l}from"./chunk-NQW6XCAY.js";import{STATUS_UNREACHABLE as c}from"./chunk-KCOBHPN6.js";import{useEaselSession as d}from"./chunk-YM4UEGBV.js";import{backendOf as f,setSessionDocumentSite as m}from"./chunk-SNF5764Q.js";import{useEaselHost as k}from"./chunk-LX23TCTP.js";import{DEFAULT_SCREEN_WORDS as v}from"./chunk-S6YOIRXQ.js";import{useAutosave as g}from"./chunk-NDRZP6YR.js";import{canWriteDocument as p,newEaselClientId as h,reloadIfVersionMoved as y,openUnansweredClaim as w,FAIL_OPEN_RETRY_MS as b,CLAIM_FAIL_OPEN_MS as S,holderOf as I}from"./chunk-YYD257TD.js";import{useWords as P}from"./chunk-MFIRYGHW.js";import{createContext as j,useContext as R,useState as E,useMemo as B,useCallback as T,useEffect as A,useRef as C}from"react";import{jsx as H}from"react/jsx-runtime";var L={content:[],root:{},zones:{}};var O=j(null);function D(){const e=R(O);if(!e)throw new Error("useStorefrontDocument must be used within StorefrontDocumentProvider");return e}function N({target:j,addressing:R=o,onHostMessage:D,children:N}){const Y=R,{homeSlug:F,entryMayBounce:M,entryBounce:W,onSwitch:K,tellsHost:U,adapterFor:V,migrateRenamedProps:X,describeMissing:G,onLoadFailed:Q}=Y,[x,Z]=E(j),z=k(),J=d(),_=B(()=>f(J),[J]),q=B(()=>t(J),[J]),$="template"===x.kind,ee="template"===x.kind?x.id:null,re="template"===x.kind?x.pageSlug??F??"":"document"===x.kind?x.slug??"":x.slug,ne="page"===x.kind?x.siteId??null:null,te=J.blocks,oe=B(()=>V(x,_,te),[V,_,te,x.kind,"template"===x.kind?x.id:"document"===x.kind?x.record:x.siteId]),ue=oe.capabilities,ae=T(e=>J.documentHooks?.stored?.(e)??e,[J]);A(()=>{m(J,ne)},[J,ne]);const se=C(x);A(()=>{se.current=x},[x]);const{token:ie,tokenRef:le,capabilities:ce}=l({onMessage:r=>{if(D?.(r)||e(r))return;const n=r;if("storefront-editor:navigate"===n?.type){const e=r;e?.target&&Er(e.target)}}}),de=!J.usesBridgedToken||null!==ie,fe=oe.lock,me=Boolean(_.lock),[ke,ve]=E(null),[ge,pe]=E(null),[he,ye]=E(null),[we,be]=E(null),Se=P("screen",v),Ie=we?function(e,r){if(null!==e.sentence)return e.sentence;if(!e.missing)return r.loadFailed({cause:e.cause});switch(e.target.kind){case"template":return r.missingTemplatePage;case"document":return r.missingDocument;default:return r.missingPage({slug:e.slug})}}(we,Se):null,[Pe,je]=E(null),Re=C(null),Ee=C(null),[Be,Te]=E(!1),Ae=C(null),[Ce,He]=E(null),Le=C(null),[Oe,De]=E(null),[Ne,Ye]=E(!1),Fe=C(null);A(()=>{Fe.current=Oe},[Oe]);const[Me,We]=E(ue.hasEditLock?{kind:"checking"}:{kind:"editing"}),Ke=C(Me);A(()=>{Ke.current=Me},[Me]);const Ue=C(()=>Promise.resolve(!1)),Ve=T(e=>{Ee.current=e,Te(!0)},[]),Xe=g({save:async({id:e,data:r})=>{if(p(Ke.current)){if(!await Ue.current(e,r)){if(!p(Ke.current))return void Ve({id:e,data:r});throw new Error("page save did not land")}}else Ve({id:e,data:r})},onFailure:(e,r)=>{0===r&&z.send("storefront-editor:save-failed")}}),{state:Ge,push:Qe,flush:xe,pause:Ze,resume:ze,stop:Je,reset:_e,retryNow:qe,hasPending:$e}=Xe,er=C(Ge);A(()=>{er.current=Ge},[Ge]);const rr=u(Ge),nr=T(()=>{const e=Ee.current;e&&(Ee.current=null,Te(!1),Qe(e))},[Qe]),tr=C("");tr.current||(tr.current=h());const[or,ur]=E(0),ar=C(!1),[sr,ir]=E(M(j)),lr=C(!1);A(()=>{if(lr.current)return;lr.current=!0;const e=z.address.search(),r=W(j,e);r?z.address.load(r):M(j)&&ir(!1)},[j,z]);const cr=z.send;A(()=>{if(!de)return;let e=!1;const t=se.current,o=oe.resolve(re),u=J.documentHooks?.opening?.({slug:re,isTemplate:$,capabilities:ue});return o.then(async r=>{if(e)return;if(!r)return"page"===t.kind&&null!==F&&re!==F?void z.address.load({kind:"page",slug:F,siteId:ne??void 0}):(be({target:t,slug:re,missing:!0,sentence:G?.(t)??null}),void Q?.(t,null));const n=r.readOnlyReason?r.readOnlyReason:null;Re.current=n,je(n),ve(r.id),pe(r.kind??null),Le.current=r.version??null;const o=r.layout,a=o&&Object.keys(o).length?o:L,s=X(a),i=u?await u(s):s;e||ye(i)}).catch(o=>{e||(console.error("[storefront-editor] document load failed",o),be({target:t,slug:re,missing:!1,sentence:n(o,{slug:re},J),cause:r(o,J)}),Q?.(t,o))}),()=>{e=!0}},[de,ie,$,oe,re]);const dr=T(e=>new Promise(r=>{const n=Date.now(),t=setInterval(()=>{const o=le.current;o&&o!==e?(clearInterval(t),r(o)):Date.now()-n>6e3&&(clearInterval(t),r(null))},200)}),[]),fr=T(async e=>{const r=le.current;if(!r&&J.usesBridgedToken)return{ok:!1,error:new Error("no editor token")};try{return{ok:!0,value:await e(r??"")}}catch(n){if(s(n,J)){cr("storefront-editor:auth-expired");const n=r?await dr(r):null;if(n)try{return{ok:!0,value:await e(n)}}catch(e){return{ok:!1,error:e}}}return{ok:!1,error:n}}},[cr,dr,J]),mr=T(async e=>{const r=le.current?await fr(e):{ok:!1};return r.ok||cr("storefront-editor:save-failed"),r.ok},[cr,fr]),kr=T(async(e,r,n=!1)=>{if(null!==Re.current)return!1;if(!p(Ke.current))return!1;if(Fe.current)return!1;const t=await fr(()=>oe.saveLayout(e,r,Le.current,tr.current));if(t.ok)return Le.current=t.value.version??Le.current,Ye(!1),!0;const o=q.readLockTaken(t.error);if(o){const e={kind:"takenover",holder:o};return Ke.current=e,We(e),!1}const u=q.readSaveConflict(t.error);if(u){if(u.savedByYou&&!n&&oe.rereadVersion){const n=await fr(()=>oe.rereadVersion(e));if(n.ok&&n.value)return Le.current=n.value,Ue.current(e,r,!0)}Je(),Fe.current=u,De(u)}return Ye(i(t.error,J)?.status===c),!1},[oe,fr,Je,J]);A(()=>{Ue.current=kr},[kr]);const vr=T(e=>{if(null!==Re.current)return;if(cr("storefront-editor:dirty"),!ke)return;const r=ae(e);Ae.current=r,p(Ke.current)?Qe({id:ke,data:r}):Ve({id:ke,data:r})},[ke,cr,Ve,Qe,ae]),gr=T(async()=>{p(Ke.current)&&nr();return await xe()&&null==Ee.current},[nr,xe]),pr=C(gr);A(()=>{pr.current=gr},[gr]);const hr=C(fr);A(()=>{hr.current=fr},[fr]);const yr=T(()=>{z.address.reload()},[z]),wr=C(()=>Promise.resolve(!1));A(()=>{wr.current=()=>{const e=oe.rereadVersion;return ke&&e?y({ours:Le.current,stored:async()=>{const r=await hr.current(()=>e(ke));return r.ok?r.value:null},hasPending:()=>null!=Ee.current||$e(),reload:yr}):Promise.resolve(!1)}},[oe,ke,$e,yr]);const br=null!==Pe;A(()=>{if(!fe||!ke||!de||br)return;let e=!1,r=null,n=null;const t=tr.current,o={claim:async e=>{const r=await hr.current(()=>fe.claim(ke,t,e));if(r.ok)return{heartbeat_seconds:r.value.heartbeatSeconds};throw r.error},cancelled:()=>e,currentAccess:()=>Ke.current,heldWrite:()=>({pending:null!=Ee.current||$e(),autoSaveEnabled:!er.current.paused,saveConflict:null!=Fe.current}),setAccess:e=>{Ke.current=e,We(e)},releaseHeldWrite:()=>{pr.current()},startHeartbeat:e=>{r&&clearInterval(r),r=setInterval(()=>{u(!1)},e)},stopHeartbeat:()=>{r&&(clearInterval(r),r=null)},reloadIfMoved:()=>{wr.current()}},u=q.makeClaimBeat(o),a=ar.current;return ar.current=!1,a||(We({kind:"checking"}),n=setTimeout(()=>{n=null,w(o)&&o.startHeartbeat(b)},S)),u(a).finally(()=>{n&&clearTimeout(n),n=null}),()=>{e=!0,n&&clearTimeout(n),r&&clearInterval(r),fe.release(ke,t).catch(()=>{})}},[ke,fe,de,ie,or,br]);const Sr=T(()=>{fe&&ke&&(ar.current=!0,ur(e=>e+1))},[ke,fe]),Ir=T(()=>{We(e=>{const r="blocked"===e.kind||"takenover"===e.kind?e.holder:null;return r?{kind:"readonly",holder:r}:e})},[]),Pr=T(()=>{er.current.paused?(p(Ke.current)&&nr(),ze()):Ze()},[nr,Ze,ze]),jr=T(()=>{qe()},[qe]),Rr=T(e=>{Ae.current=null,a("template"!==e.kind&&me,{resetAutosave:()=>{_e(),Ee.current=null,Te(!1)},setVersion:e=>{Le.current=e},setSaveConflict:De,setAccess:We}),K(e),Z(e),Re.current=null,je(null),ve(null),pe(null),ye(null),be(null),z.address.show(e),"document"!==e.kind&&U(e)&&z.send("storefront-editor:navigated",{target:e})},[_e,z,me,K,U]),Er=T(e=>{if(function(e,r,n){if(e.kind!==r.kind)return!1;if("template"===e.kind){const t=r;return e.id===t.id&&(e.pageSlug??n)===(t.pageSlug??n)}if("document"===e.kind){const n=r;return e.record===n.record&&(e.slug??"")===(n.slug??"")}const t=r;return e.slug===t.slug&&e.siteId===t.siteId}(e,se.current,F))return;const r=null!=Ee.current;if(!r&&!$e())return void Rr(e);const n=er.current;r||n.paused||n.failed||n.stopped?He(e):xe().then(r=>{r?Rr(e):He(e)})},[Rr,$e,xe,F]),Br=T(()=>He(null),[]),Tr=T(()=>{He(e=>(e&&Rr(e),null))},[Rr]),Ar=T(async()=>{const e=Ce;if(!e)return;await gr()&&(He(null),Rr(e))},[Ce,gr,Rr]),Cr=T(async e=>{if(null!==Re.current)return;if(!ke)return;if(!p(Ke.current)||Fe.current)return;const r=ae(e);if(!await kr(ke,r))return void(Fe.current||cr("storefront-editor:save-failed"));const n=oe.publish;if(!ue.canPublish||!n)return void cr("storefront-editor:saved");const t=await fr(()=>n(ke,Le.current??void 0));if(!t.ok){const{error:e}=t;return void cr("storefront-editor:publish-failed",{reason:e instanceof Error&&e.message?e.message:null})}Le.current=t.value.version??Le.current,cr("storefront-editor:published")},[ke,oe,ue.canPublish,cr,kr,fr,ae]);/* @__PURE__ */
|
|
2
|
-
return H(O.Provider,{value:{target:x,adapter:oe,capabilities:ue,templateId:ee,currentSlug:re,currentKind:ge,siteId:ne,ready:de,token:ie,tokenRef:le,notifyParent:cr,bridgeCapabilities:ce,runAuthed:mr,docId:ke,data:he,getLiveData:()=>Ae.current??he,error:Ie,redirecting:sr,saveStatus:rr,saveState:Ge,autoSaveEnabled:!Ge.paused,autoSaveStoppedByConflict:Ge.stopped,hasUnsavedEdits:Ge.pending||Be,toggleAutoSave:Pr,retrySave:jr,onChange:vr,flushSave:gr,onPublish:Cr,access:Me,readOnly:null!==I(Me)||null!==Pe||null!==Oe,readOnlyReason:Pe,takeOverEditing:Sr,viewReadOnly:Ir,saveConflict:Oe,saveUnreachable:Ne,reloadFromServer:yr,navigate:Er,pendingNav:Ce,cancelPendingNav:Br,discardAndNavigate:Tr,saveAndNavigate:Ar},children:N})}export{O as ScreenDocumentContext,N as ScreenDocumentProvider,D as useScreenDocument};
|
package/dist/chunk-H6BER2EU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{DESIGN_GROUP_KEY as t,BUCKET_KEY as o}from"./chunk-3QB2ZQXK.js";import{panelFieldsOf as n}from"./chunk-5XL2RXFU.js";import{withoutDeviceGate as e}from"./chunk-OXOUGEAT.js";import{STYLE_KIND as r,fieldKind as s,copyStyle as c,heldStyle as i,planPaste as p,pasteMessage as u}from"./chunk-CWELHADJ.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([t.Size,t.Design,t.Layout,t.Position]),w=new Set(Object.values(t)),b=new Set(Object.values(o)),S=new Set(f),k=/* @__PURE__ */new Set(["focal","imageFocal"]),g=[l,m,h];function A(t){return`site:${t??""}`}function O(t){if(!t||"object"!=typeof t)return null;const o=t,n=e(t)??t,c=o[r]??n[r];if("string"==typeof c)return c;const i=o.options??n.options;if(Array.isArray(i)){return`choice:${i.map(t=>String(t?.value)).sort().join("|")}`}return s(n)}function v(t){const o=t,n=e(t);return g.some(t=>t in o||n&&t in n)}function L(t,e){const r=n(t,e)??{},s=[];let c=!0,i=!1;for(const[t,n]of Object.entries(r))b.has(t)?(c=t===o.Design,i=!1):w.has(t)?c&&(i=j.has(t)):i&&n&&"object"==typeof n&&!t.startsWith("_")&&(a(n)||S.has(t)||k.has(t)||v(n)||"slot"!==n.type&&s.push({path:[t],kind:O(n),counted:"mobile"!==y(n)?.tier}));return s}function X(t,o,n,e,r){c({scope:n,type:e.type,label:r,rows:t(o,e),props:e.props})}function d(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 D(t,o,n,e){X(L,t,o,n,e)}function E(t,o,n,e,r){return d(L,t,o,n,e,r)}var P={scope:t=>A(t.siteId),rows:(t,o)=>L(t,o),copy:(t,o,n,e)=>D(e,t,o,n),plan:(t,o,n,e)=>E(e,t,o,n)};function C(t,o){if(!t&&!o)return P;const n=t?.rows,e=n?(t,o)=>n(t,o):L;return{scope:t?.scope??P.scope,rows:(t,o)=>e(t,o),copy:t?.copy??((t,o,n,r)=>X(e,r,t,o,n)),plan:t?.plan??((t,n,r,s)=>d(e,s,t,n,r,o))}}export{D as copyNodeStyle,L as nodeStyleRows,E as planNodePaste,O as shopFieldKind,A as siteStyleScope,C as styleClipboardOf};
|
package/dist/chunk-LUG22U5L.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{parseZoneKey as t}from"./chunk-EUFDQ4KL.js";import{repeatWrapperAt as e,REPEAT_ATTRIBUTE as r,REPEAT_INDEX_ATTRIBUTE as n}from"./chunk-7UFKEX72.js";var o=`[${r}][${n}]`;function l(l){const c=e(l);if(!c)return null;let i;try{i=t(c.zone)}catch{return null}if(!i.parentId||!i.slot)return null;const{wrapper:a,zone:p,index:f}=c;let s=a.parentElement;for(let t=a.parentElement;t;t=t.parentElement)if(t.getAttribute("data-easel-block")===i.parentId){s=t;break}const d=/* @__PURE__ */new Set;for(const t of Array.from(s?.querySelectorAll(o)??[]))t.getAttribute(r)===p&&d.add(t.getAttribute(n)??"");const m={ownerId:i.parentId,slot:i.slot,index:f,count:Math.max(d.size,f+1)},y=a.parentElement?u(a.parentElement):null;return y&&(m.outer=y),{copy:m,wrapper:a}}function u(t){return l(t)?.copy??null}function c(t,e){return t&&e?t.ownerId===e.ownerId&&t.slot===e.slot&&t.index===e.index&&c(t.outer,e.outer):t===e}function i(t,e){for(const r of Array.from(t.querySelectorAll(o))){if(r.getAttribute(n)!==String(e.index))continue;const t=l(r);if(t?.wrapper===r&&c(t.copy,e))return r}return null}export{i as findCopy,u as repeatCopyAt,l as repeatCopyWithWrapper};
|
package/dist/chunk-OFBZOI6W.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={colour:{notSet:"Not set",swatch:({label:e,shown:t})=>`${e}: ${t}`,dialog:({label:e})=>`${e} colour`,theme:"Theme colours",themeSwatchTitle:({name:e,hex:t})=>`${e} · ${t}`,themeSwatch:({name:e,hex:t})=>`${e} ${t}`,square:"Saturation and brightness",squareValue:({saturation:e,brightness:t})=>`Saturation ${e}, brightness ${t}`,hue:"Hue",hex:({label:e})=>`${e} hex code`}};export{e as DEFAULT_PICK_WORDS};
|
package/dist/chunk-SC6E3UUS.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{DEFAULT_PANEL_WORDS as e}from"./chunk-KFV7N2DJ.js";import{SettingsField as l}from"./chunk-MIX7EGRG.js";import{SettingsSegmented as n}from"./chunk-DX3VILZ3.js";import{AccordionHeading as a,SettingReset as i,Tooltip as t,Button as s,toast as d}from"efficient-shell/ui";export{AlignmentGrid,BorderInput,CornersInput,SidesEachToggle,SidesInput,borderSides,borderStartEach,sidesStartEach}from"efficient-shell/ui";import{jsx as o,jsxs as c,Fragment as r}from"react/jsx-runtime";import{BackgroundIcon as u,WidthIcon as b}from"efficient-shell/icons/efficient";function h({title:e,level:l=3,id:n,className:i}){/* @__PURE__ */
|
|
2
|
-
return o(a,{title:e,level:l,id:n,className:i?`es-panel-band ${i}`:"es-panel-band"})}function m({title:e,level:l=4,id:n,className:i}){/* @__PURE__ */
|
|
3
|
-
return o(a,{tier:"row",title:e,level:l,id:n,className:i})}function f({label:l,changed:n,onReset:a,detail:t,disabled:s,defaultAction:d,words:c,className:r}){const u={...e,...c},b=u.resetName({label:l});/* @__PURE__ */
|
|
4
|
-
return o(i,{label:l,changed:n,onReset:a,detail:t,disabled:s,defaultAction:d,name:b,tip:t?u.resetTitle({label:l,detail:t}):b,className:r})}function p({name:e,preview:l,offPage:n,status:a,onOpen:i,id:s,className:d}){const u=null!=l;/* @__PURE__ */
|
|
5
|
-
return c("button",{type:"button",id:s,className:d?`es-drill ${d}`:"es-drill",onClick:i,children:[
|
|
6
|
-
/* @__PURE__ */c(t,{content:u?/* @__PURE__ */c(r,{children:[e,
|
|
7
|
-
/* @__PURE__ */o("br",{}),l]}):e,describe:!1,className:"es-drill-text",children:[
|
|
8
|
-
/* @__PURE__ */o("span",{className:"es-drill-name",children:e}),u?/* @__PURE__ */o("span",{className:n?"es-drill-preview is-offpage":"es-drill-preview",children:l}):null]}),a?/* @__PURE__ */o("span",{className:"es-drill-status",children:a}):null,
|
|
9
|
-
/* @__PURE__ */o("span",{className:"es-drill-chev","aria-hidden":"true"})]})}function N({label:e,onPress:l,disabled:n,note:a,doneLabel:i,icon:t,id:r,className:u}){const b=null!=a,h=b&&r?`${r}-note`:void 0;/* @__PURE__ */
|
|
10
|
-
return c("div",{className:u?`es-action-wrap ${u}`:"es-action-wrap",children:[
|
|
11
|
-
/* @__PURE__ */o(s,{variant:"secondary",size:"lg",block:!0,id:r,disabled:n,"aria-describedby":h,onClick:()=>{const e=l();e&&"function"==typeof e.then?e.then(()=>{d.success(i)}):d.success(i)},leftIcon:t?/* @__PURE__ */o("span",{className:"es-action-icon","aria-hidden":"true",children:t}):void 0,children:/* @__PURE__ */o("span",{className:"es-action-label",children:e})}),b?/* @__PURE__ */o("p",{id:h,className:"es-action-note",children:a}):null]})}var v=["full","content"],g={label:"Background",full:"Full width",content:"Content width"};function w({value:e,changed:a,detail:i,onChange:t,onReset:s,disabled:d=!1,hint:c,labelId:r,words:b,resetWords:h}){const m={...g,...b};/* @__PURE__ */
|
|
12
|
-
return o(l,{label:m.label,labelId:r,icon:/* @__PURE__ */o(u,{}),changed:a,hint:c,action:/* @__PURE__ */o(f,{words:h,label:m.label,changed:a,detail:i,onReset:s}),children:/* @__PURE__ */o(n,{options:v.map(e=>({id:e,label:"full"===e?m.full:m.content})),value:e,onChange:t,ariaLabel:m.label,disabled:d})})}var C={label:"Content",full:"Full width",content:"Content width"};function I({mode:e,onMode:a,number:i,changed:t,detail:s,onReset:d,fullClosed:r=!1,disabled:u=!1,hint:h,labelId:m,words:p,resetWords:N}){const g={...C,...p},w=void 0!==e&&a?/* @__PURE__ */o(n,{options:v.map(e=>({id:e,label:"full"===e?g.full:g.content,disabled:"full"===e&&r})),value:e,onChange:a,ariaLabel:g.label,disabled:u}):null;/* @__PURE__ */
|
|
13
|
-
return o(l,{label:g.label,labelId:m,icon:/* @__PURE__ */o(b,{}),changed:t,hint:h,action:/* @__PURE__ */o(f,{words:N,label:g.label,changed:t,detail:s,onReset:d}),children:w&&i?/* @__PURE__ */c("div",{className:"es-width-stack",children:[w,i]}):w??i??null})}export{v as BACKGROUND_WIDTHS,g as DEFAULT_BACKGROUND_WIDTH_WORDS,C as DEFAULT_CONTENT_WIDTH_WORDS,N as SettingsAction,w as SettingsBackgroundWidth,I as SettingsContentWidth,f as SettingsDefaultReset,p as SettingsDrill,h as SettingsGroupHead,m as SettingsGroupSub};
|