efficient-easel 2.2.0 → 3.2.1
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 +20 -5
- package/dist/blocks/index.d.ts +2 -2
- package/dist/chrome/index.d.ts +2 -2
- package/dist/chrome/index.js +1 -1
- package/dist/{chunk-ZNNATBDC.js → chunk-2T3ED73A.js} +1 -1
- package/dist/chunk-2WVZ3CK3.js +5 -0
- package/dist/{chunk-2JIWFFXA.js → chunk-42TMLDSQ.js} +1 -1
- package/dist/chunk-4WEGYBTV.js +7 -0
- package/dist/chunk-55IKQFBW.js +5 -0
- package/dist/chunk-5SOSVTVI.js +5 -0
- package/dist/{chunk-7SQF6LZL.js → chunk-66LWADFP.js} +1 -1
- package/dist/{chunk-AAT3O7PK.js → chunk-6QSPOILR.js} +1 -1
- package/dist/chunk-7VP5RXNO.js +64 -0
- package/dist/{chunk-ZV6OYSZ7.js → chunk-AVYFZZAP.js} +1 -1
- package/dist/chunk-BF3PIXZD.js +1 -0
- package/dist/chunk-CRPJGCSO.js +20 -0
- package/dist/chunk-FFYXVAAL.js +1 -0
- package/dist/{chunk-UAVNI3BU.js → chunk-FRGCTHDB.js} +1 -1
- package/dist/{chunk-OXYGFK2B.js → chunk-GTDLBUOC.js} +6 -6
- package/dist/chunk-IMRJHRQ2.js +1 -0
- package/dist/{chunk-PT6V53OO.js → chunk-J2JBETVO.js} +1 -1
- package/dist/chunk-JZDEIRH4.js +1 -0
- package/dist/{chunk-35Q5HMJZ.js → chunk-KNUFI3WV.js} +1 -1
- package/dist/chunk-LMHGVI5R.js +4 -0
- package/dist/{chunk-VB5LRSGJ.js → chunk-OFNXIZEP.js} +1 -1
- package/dist/{chunk-FOBGSFFS.js → chunk-OZ72A6MY.js} +7 -7
- package/dist/chunk-PDZXAFNX.js +9 -0
- package/dist/{chunk-ONRYLR2D.js → chunk-PRSTFWUY.js} +2 -2
- package/dist/chunk-QASZFO4S.js +1 -0
- package/dist/chunk-U2DVXW2H.js +2 -0
- package/dist/chunk-Y2G7CU6A.js +1 -0
- package/dist/{chunk-6OY2THZH.js → chunk-ZN752E2O.js} +1 -1
- package/dist/copy/copy.css +79 -82
- package/dist/copy/index.d.ts +9 -7
- package/dist/copy/index.js +21 -31
- package/dist/easel/index.d.ts +5 -5
- package/dist/easel/index.js +1 -1
- package/dist/fields/fields.css +0 -28
- package/dist/fields/index.d.ts +2 -2
- package/dist/fields/index.js +1 -1
- package/dist/node-ops/index.d.ts +2 -2
- package/dist/node-ops/index.js +1 -1
- package/dist/panel/index.d.ts +4 -222
- package/dist/panel/index.js +12 -15
- package/dist/panel/panel.css +0 -165
- package/dist/{plan-DChbUXdS.d.ts → plan-BdQ9mLIf.d.ts} +20 -1
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/MediaSidePanel.d.ts +3 -3
- package/dist/screen/components/MediaSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.d.ts +19 -17
- 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.d.ts +3 -3
- package/dist/screen/components/ScreenDocumentContext.js +1 -1
- package/dist/screen/components/ScreenMount.d.ts +3 -3
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.d.ts +3 -3
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +16 -16
- package/dist/screen/components/SidePanelHead.js +1 -1
- package/dist/screen/components/UiIcon.js +1 -1
- package/dist/screen/components/panel-widths.js +1 -1
- package/dist/screen/components/usePartBridge.d.ts +3 -3
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.d.ts +3 -3
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/admin-bridge.d.ts +3 -3
- package/dist/screen/lib/document-addressing.d.ts +3 -3
- package/dist/screen/lib/document-hooks.d.ts +2 -2
- package/dist/screen/lib/host-chrome.d.ts +1 -1
- package/dist/screen/lib/host.d.ts +3 -3
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/links/link-filters.d.ts +1 -2
- package/dist/screen/lib/media-panel.d.ts +3 -3
- package/dist/screen/lib/media-picker.d.ts +3 -3
- package/dist/screen/lib/page-lock.d.ts +3 -3
- package/dist/screen/lib/puck/device-fields.js +1 -1
- package/dist/screen/lib/puck/palette-sections.d.ts +2 -2
- package/dist/screen/lib/puck/section-doc.d.ts +2 -2
- package/dist/screen/lib/puck/style-clipboard.d.ts +10 -6
- package/dist/screen/lib/puck/style-clipboard.js +1 -1
- package/dist/screen/lib/puck/use-section-ops.d.ts +2 -2
- package/dist/screen/lib/puck/use-section-ops.js +1 -1
- package/dist/screen/lib/screen-parts.d.ts +5 -5
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/lib/section-templates.d.ts +3 -3
- package/dist/screen/lib/session-context.d.ts +3 -3
- package/dist/screen/lib/session.d.ts +3 -3
- package/dist/screen/words.d.ts +123 -1
- package/dist/screen/words.js +1 -1
- package/dist/strings/catalogue.d.ts +3 -3
- package/dist/strings/catalogue.js +1 -1
- package/dist/strings/index.d.ts +3 -3
- package/dist/strings/index.js +1 -1
- package/dist/text-styles/index.js +11 -11
- package/dist/{types-E3HrTPg2.d.ts → types-CGFykP7c.d.ts} +1 -1
- package/dist/{useNodeOps-BF0fQsif.d.ts → useNodeOps-B3e4b8a2.d.ts} +1 -1
- package/dist/{words-AHHfiaRY.d.ts → words-C1U_dLBh.d.ts} +7 -0
- package/dist/{words-XH0TvZPg.d.ts → words-lpvYzf5U.d.ts} +4 -19
- package/dist/{words-D8kf071T.d.ts → words-vhnV8sM7.d.ts} +4 -26
- package/package.json +3 -3
- package/dist/LinkPicker-hPEr1MJx.d.ts +0 -113
- package/dist/chunk-4TMMEBAG.js +0 -4
- package/dist/chunk-5TRBCPRB.js +0 -5
- package/dist/chunk-BSSKAEFF.js +0 -5
- package/dist/chunk-D2BCHTQR.js +0 -1
- package/dist/chunk-E2O2MRZR.js +0 -1
- package/dist/chunk-FPOKPNO4.js +0 -1
- package/dist/chunk-HGTPLCTQ.js +0 -1
- package/dist/chunk-PWZOS45R.js +0 -2
- package/dist/chunk-PYCLHOSA.js +0 -9
- package/dist/chunk-RC6DD4XP.js +0 -7
- package/dist/chunk-TSQUEJZB.js +0 -5
- package/dist/chunk-UEM66O42.js +0 -64
- package/dist/chunk-UH7IGZKF.js +0 -1
- package/dist/chunk-VETFIYQR.js +0 -23
- package/dist/chunk-ZJEBF4NB.js +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { StyleRow } from '../../../style-clipboard/index.js';
|
|
2
|
+
import { S as StyleClipboardWords } from '../../../words-CnnHb9jo.js';
|
|
2
3
|
import { ScreenStyleDocument, ScreenNode, ScreenStylePastePlan, ScreenStyleClipboard } from '../screen-parts.js';
|
|
3
4
|
import { panelFieldsOf } from './panel-fields.js';
|
|
4
5
|
import '../../../types-BsyPh6EW.js';
|
|
5
6
|
import 'react';
|
|
6
|
-
import '../../../words-CnnHb9jo.js';
|
|
7
7
|
import '../../../blocks/index.js';
|
|
8
|
-
import '../../../types-
|
|
8
|
+
import '../../../types-CGFykP7c.js';
|
|
9
9
|
import '../../../data/index.js';
|
|
10
10
|
import '../../../types-41704JE4.js';
|
|
11
11
|
import '../../../resolve-D68pb3Bx.js';
|
|
12
|
-
import '../../../plan-
|
|
12
|
+
import '../../../plan-BdQ9mLIf.js';
|
|
13
13
|
import '../../../watch-BTYOJpQU.js';
|
|
14
14
|
import '../../../types-Dt1CFR1S.js';
|
|
15
15
|
import '../../../types-CsgMwHHa.js';
|
|
@@ -31,7 +31,7 @@ import '../session.js';
|
|
|
31
31
|
import '../backend-error.js';
|
|
32
32
|
import '../host-chrome.js';
|
|
33
33
|
import '../links/link-filters.js';
|
|
34
|
-
import '
|
|
34
|
+
import 'efficient-shell/ui';
|
|
35
35
|
import '../document-hooks.js';
|
|
36
36
|
import '../document-switch.js';
|
|
37
37
|
import '../../../engine-DBxp_v6B.js';
|
|
@@ -103,7 +103,7 @@ declare function copyNodeStyle(config: ConfigLike, scope: string, node: NodeLike
|
|
|
103
103
|
* `props` through its one replace op only when `changed`, and always shows
|
|
104
104
|
* `message` — "nothing matched" is an answer, not a silence.
|
|
105
105
|
*/
|
|
106
|
-
declare function planNodePaste(config: ConfigLike, scope: string, node: NodeLike, label: string): {
|
|
106
|
+
declare function planNodePaste(config: ConfigLike, scope: string, node: NodeLike, label: string, words?: StyleClipboardWords): {
|
|
107
107
|
props: Props;
|
|
108
108
|
changed: boolean;
|
|
109
109
|
pasted: number;
|
|
@@ -125,6 +125,10 @@ interface ResolvedStyleClipboard {
|
|
|
125
125
|
* else still copies and pastes. With no layer's: exactly the website's —
|
|
126
126
|
* `siteStyleScope(siteId)`, `nodeStyleRows`, `copyNodeStyle`, `planNodePaste`.
|
|
127
127
|
*/
|
|
128
|
-
declare function styleClipboardOf(part: ScreenStyleClipboard | null | undefined
|
|
128
|
+
declare function styleClipboardOf(part: ScreenStyleClipboard | null | undefined,
|
|
129
|
+
/** What the screen's own `plan` says after a paste, in the host's language
|
|
130
|
+
* (`EaselStrings.styleClipboard`, 3.1.0). A layer's own `plan` says its own
|
|
131
|
+
* words. Left out: English. */
|
|
132
|
+
words?: StyleClipboardWords): ResolvedStyleClipboard;
|
|
129
133
|
|
|
130
134
|
export { type ResolvedStyleClipboard, copyNodeStyle, nodeStyleRows, planNodePaste, shopFieldKind, siteStyleScope, styleClipboardOf };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-
|
|
1
|
+
export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-AVYFZZAP.js";import"../../../chunk-ZE7I3PLX.js";import"../../../chunk-U2DVXW2H.js";import"../../../chunk-7F52SZOI.js";import"../../../chunk-R2HLPNQF.js";import"../../../chunk-DUVRZ456.js";import"../../../chunk-BSPCSC45.js";import"../../../chunk-V7U33NF2.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-BF3PIXZD.js";import"../../../chunk-MFIRYGHW.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { N as NodeSelection } from '../../../plan-
|
|
1
|
+
import { N as NodeSelection } from '../../../plan-BdQ9mLIf.js';
|
|
2
2
|
import { Data } from '../../../blocks/index.js';
|
|
3
3
|
import { TreeItem } from './content-tree.js';
|
|
4
4
|
import '../../../types-41704JE4.js';
|
|
5
5
|
import 'react';
|
|
6
|
-
import '../../../types-
|
|
6
|
+
import '../../../types-CGFykP7c.js';
|
|
7
7
|
import '../../../data/index.js';
|
|
8
8
|
import '../../../resolve-D68pb3Bx.js';
|
|
9
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useSectionOps}from"../../../chunk-
|
|
1
|
+
export{useSectionOps}from"../../../chunk-FRGCTHDB.js";import"../../../chunk-55IKQFBW.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-R6WTQWAC.js";import"../../../chunk-U3JP4VGF.js";import"../../../chunk-PDZXAFNX.js";import"../../../chunk-AELNNAFM.js";import"../../../chunk-CRPJGCSO.js";import"../../../chunk-OZ72A6MY.js";import"../../../chunk-UFY6RNMT.js";import"../../../chunk-YNOZ5NXW.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-QTLAVDJE.js";import"../../../chunk-YRLPFZW3.js";import"../../../chunk-EA2HTX37.js";import"../../../chunk-QASZFO4S.js";import"../../../chunk-66LWADFP.js";import"../../../chunk-QLD57GBB.js";import"../../../chunk-FFYXVAAL.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-67GNT6PF.js";import"../../../chunk-ZNCEOSXO.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-KRXQM65X.js";import"../../../chunk-NKB3KVAB.js";
|
|
@@ -15,10 +15,10 @@ import { HostProduct } from './host-chrome.js';
|
|
|
15
15
|
import { EaselSession } from './session.js';
|
|
16
16
|
import { AddTarget } from './puck/add-target-types.js';
|
|
17
17
|
import { SlotConfigView } from './puck/content-tree.js';
|
|
18
|
-
import '../../types-
|
|
18
|
+
import '../../types-CGFykP7c.js';
|
|
19
19
|
import '../../data/index.js';
|
|
20
20
|
import '../../resolve-D68pb3Bx.js';
|
|
21
|
-
import '../../plan-
|
|
21
|
+
import '../../plan-BdQ9mLIf.js';
|
|
22
22
|
import '../../edit-lock/index.js';
|
|
23
23
|
import '../../panelWidths-D9hTLR25.js';
|
|
24
24
|
import '../../session-DSQFmIvx.js';
|
|
@@ -34,7 +34,7 @@ import '../../engine-DBxp_v6B.js';
|
|
|
34
34
|
import './admin-bridge.js';
|
|
35
35
|
import './backend-error.js';
|
|
36
36
|
import './links/link-filters.js';
|
|
37
|
-
import '
|
|
37
|
+
import 'efficient-shell/ui';
|
|
38
38
|
import './document-hooks.js';
|
|
39
39
|
import './puck/slot-section-spec.js';
|
|
40
40
|
|
|
@@ -1013,8 +1013,8 @@ interface ScreenPinnedNodes {
|
|
|
1013
1013
|
*/
|
|
1014
1014
|
interface ScreenPinnedBand {
|
|
1015
1015
|
/** What the band is called. Absent: the screen's words, `screen.pageSections`
|
|
1016
|
-
* ("
|
|
1017
|
-
* `screen.templateSections` ("Template
|
|
1016
|
+
* ("Page") on a document with the edit guard and
|
|
1017
|
+
* `screen.templateSections` ("Template") on one without. */
|
|
1018
1018
|
label?: string;
|
|
1019
1019
|
/** The band is a ROW that folds, its sections under it — the campaign
|
|
1020
1020
|
* designer's Body. Absent or false: a group label over the sections, which
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,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,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-55IKQFBW.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PDZXAFNX.js";import"../../chunk-AELNNAFM.js";import"../../chunk-CRPJGCSO.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-UFY6RNMT.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-QASZFO4S.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -3,16 +3,16 @@ import { EaselSession } from './session.js';
|
|
|
3
3
|
import './puck/content-tree.js';
|
|
4
4
|
import '../../blocks/index.js';
|
|
5
5
|
import 'react';
|
|
6
|
-
import '../../types-
|
|
6
|
+
import '../../types-CGFykP7c.js';
|
|
7
7
|
import '../../data/index.js';
|
|
8
8
|
import '../../types-41704JE4.js';
|
|
9
9
|
import '../../resolve-D68pb3Bx.js';
|
|
10
|
-
import '../../plan-
|
|
10
|
+
import '../../plan-BdQ9mLIf.js';
|
|
11
11
|
import './backend-error.js';
|
|
12
12
|
import '../../edit-lock/index.js';
|
|
13
13
|
import './host-chrome.js';
|
|
14
14
|
import './links/link-filters.js';
|
|
15
|
-
import '
|
|
15
|
+
import 'efficient-shell/ui';
|
|
16
16
|
import './document-contract.js';
|
|
17
17
|
import './document-hooks.js';
|
|
18
18
|
|
|
@@ -2,16 +2,16 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { EaselSession } from './session.js';
|
|
4
4
|
import '../../blocks/index.js';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-CGFykP7c.js';
|
|
6
6
|
import '../../data/index.js';
|
|
7
7
|
import '../../types-41704JE4.js';
|
|
8
8
|
import '../../resolve-D68pb3Bx.js';
|
|
9
|
-
import '../../plan-
|
|
9
|
+
import '../../plan-BdQ9mLIf.js';
|
|
10
10
|
import './backend-error.js';
|
|
11
11
|
import '../../edit-lock/index.js';
|
|
12
12
|
import './host-chrome.js';
|
|
13
13
|
import './links/link-filters.js';
|
|
14
|
-
import '
|
|
14
|
+
import 'efficient-shell/ui';
|
|
15
15
|
import './document-contract.js';
|
|
16
16
|
import './document-hooks.js';
|
|
17
17
|
import './section-template-types.js';
|
|
@@ -5,14 +5,14 @@ import { WebsiteEditLock } from './document-contract.js';
|
|
|
5
5
|
import { EaselDocumentHooks } from './document-hooks.js';
|
|
6
6
|
import { SectionTemplateStore } from './section-template-types.js';
|
|
7
7
|
import 'react';
|
|
8
|
-
import '../../types-
|
|
8
|
+
import '../../types-CGFykP7c.js';
|
|
9
9
|
import '../../data/index.js';
|
|
10
10
|
import '../../types-41704JE4.js';
|
|
11
11
|
import '../../resolve-D68pb3Bx.js';
|
|
12
|
-
import '../../plan-
|
|
12
|
+
import '../../plan-BdQ9mLIf.js';
|
|
13
13
|
import '../../edit-lock/index.js';
|
|
14
14
|
import './links/link-filters.js';
|
|
15
|
-
import '
|
|
15
|
+
import 'efficient-shell/ui';
|
|
16
16
|
import './puck/content-tree.js';
|
|
17
17
|
|
|
18
18
|
/**
|
package/dist/screen/words.d.ts
CHANGED
|
@@ -74,6 +74,66 @@ type ScreenAddWords = {
|
|
|
74
74
|
addingHere: string;
|
|
75
75
|
};
|
|
76
76
|
declare const DEFAULT_SCREEN_ADD_WORDS: ScreenAddWords;
|
|
77
|
+
/**
|
|
78
|
+
* THE PROMPT BEFORE A SWITCH OF DOCUMENT WOULD LOSE AN EDIT (3.1.0). It was
|
|
79
|
+
* written into components/ScreenMount; the words are its English, word for
|
|
80
|
+
* word.
|
|
81
|
+
*/
|
|
82
|
+
type ScreenLeaveWords = {
|
|
83
|
+
/** The dialog's title. */
|
|
84
|
+
title: string;
|
|
85
|
+
/** What it says. */
|
|
86
|
+
body: string;
|
|
87
|
+
/** Keep editing. */
|
|
88
|
+
cancel: string;
|
|
89
|
+
/** Leave without the edits that are still settling. */
|
|
90
|
+
discard: string;
|
|
91
|
+
/** Save them, then leave… */
|
|
92
|
+
save: string;
|
|
93
|
+
/** …and that button while the save runs. */
|
|
94
|
+
saving: string;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* THE TOP BAR'S OWN WORDS (3.1.0): Undo and Redo, Refresh, and what the save
|
|
98
|
+
* pill says where it is not `saveIndicator`'s (`EaselStrings.save`) to say.
|
|
99
|
+
* They were written into components/ScreenChrome; the words are its English,
|
|
100
|
+
* word for word.
|
|
101
|
+
*/
|
|
102
|
+
type ScreenBarWords = {
|
|
103
|
+
undo: string;
|
|
104
|
+
redo: string;
|
|
105
|
+
/** The button that reloads the canvas alone, and its tooltip. */
|
|
106
|
+
refresh: string;
|
|
107
|
+
refreshTip: string;
|
|
108
|
+
/** The pill while nothing may be saved and the notice under the bar says why. */
|
|
109
|
+
notSaving: string;
|
|
110
|
+
/** Beside a failed save, which retries by itself: try now. */
|
|
111
|
+
retry: string;
|
|
112
|
+
/** The pill's switch: its tooltip while autosave is paused, and while it runs. */
|
|
113
|
+
autoSaveOff: string;
|
|
114
|
+
autoSaveOn: string;
|
|
115
|
+
/** The rail's accessible name: the left panel's views. */
|
|
116
|
+
views: string;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* THE RIGHT-CLICK MENU'S OWN ROWS BESIDES A NODE'S (3.1.0): the page's (Undo,
|
|
120
|
+
* Redo, Add section, Collapse all layers), a text box's Select all, the line a
|
|
121
|
+
* pinned node shows instead of rows, and what Paste says when the browser
|
|
122
|
+
* will not let it read the clipboard. A node's rows are `EaselStrings.menu`.
|
|
123
|
+
* They were written into components/NodeContextMenu and ScreenChrome; the
|
|
124
|
+
* words are their English, word for word.
|
|
125
|
+
*/
|
|
126
|
+
type ScreenMenuWords = {
|
|
127
|
+
undo: string;
|
|
128
|
+
redo: string;
|
|
129
|
+
addSection: string;
|
|
130
|
+
collapseAll: string;
|
|
131
|
+
selectAll: string;
|
|
132
|
+
/** In place of rows on the pinned Header and Footer. */
|
|
133
|
+
pinned: string;
|
|
134
|
+
/** Paste in a text box, refused the clipboard by the browser. */
|
|
135
|
+
clipboardRefused: string;
|
|
136
|
+
};
|
|
77
137
|
type ScreenWords = {
|
|
78
138
|
/** While the document is on its way, and while an entry may still bounce. */
|
|
79
139
|
loading: string;
|
|
@@ -146,7 +206,69 @@ type ScreenWords = {
|
|
|
146
206
|
/** The left panel's resize grip's accessible name (0.106.0). It said
|
|
147
207
|
* "Resize Sections panel", from when the tree was the panel's one view. */
|
|
148
208
|
resizeLeftPanel: string;
|
|
209
|
+
/** The prompt before a switch of document would lose an edit. */
|
|
210
|
+
leave: ScreenLeaveWords;
|
|
211
|
+
/** The top bar's own words. */
|
|
212
|
+
bar: ScreenBarWords;
|
|
213
|
+
/** The right-click menu's rows besides a node's. */
|
|
214
|
+
menu: ScreenMenuWords;
|
|
215
|
+
/** The Layers tree: the rail's item and the panel's title. */
|
|
216
|
+
layers: string;
|
|
217
|
+
/** The Layers head's button, while every section is folded, and while not. */
|
|
218
|
+
expandAll: string;
|
|
219
|
+
collapseAll: string;
|
|
220
|
+
/** The pinned Footer's row where the page has no footer of its own: its tooltip. */
|
|
221
|
+
editFooter: string;
|
|
222
|
+
/** The box a row's name is typed in: its accessible name. */
|
|
223
|
+
rename: string;
|
|
224
|
+
/** A row's trash and eye, naming the row. */
|
|
225
|
+
deleteNamed: (v: {
|
|
226
|
+
name: string;
|
|
227
|
+
}) => string;
|
|
228
|
+
hideNamed: (v: {
|
|
229
|
+
name: string;
|
|
230
|
+
}) => string;
|
|
231
|
+
showNamed: (v: {
|
|
232
|
+
name: string;
|
|
233
|
+
}) => string;
|
|
234
|
+
/** The "+" in a gap between two blocks. */
|
|
235
|
+
addBlockHere: string;
|
|
236
|
+
/** ⌥↑ / ⌥↓ on a section that cannot go further: it is first… */
|
|
237
|
+
sectionFirst: (v: {
|
|
238
|
+
name: string;
|
|
239
|
+
}) => string;
|
|
240
|
+
/** …or last. */
|
|
241
|
+
sectionLast: (v: {
|
|
242
|
+
name: string;
|
|
243
|
+
}) => string;
|
|
244
|
+
/** ⌥↑ / ⌥↓ moved a section: where it is now, counted from 1. */
|
|
245
|
+
sectionMoved: (v: {
|
|
246
|
+
name: string;
|
|
247
|
+
n: number;
|
|
248
|
+
total: number;
|
|
249
|
+
}) => string;
|
|
250
|
+
/** A section was added. */
|
|
251
|
+
sectionAdded: (v: {
|
|
252
|
+
name: string;
|
|
253
|
+
}) => string;
|
|
254
|
+
/** The right panel's resize grip's accessible name. */
|
|
255
|
+
resizeSettingsPanel: string;
|
|
256
|
+
/** A section opened on its own (`SectionScreenShell`): the head's tooltip,
|
|
257
|
+
* naming the section… */
|
|
258
|
+
sectionSettings: (v: {
|
|
259
|
+
name: string;
|
|
260
|
+
}) => string;
|
|
261
|
+
/** …and the Header's, which is also its one row. */
|
|
262
|
+
headerSettings: string;
|
|
263
|
+
/** The section screen's menu of blocks to add (`AddBlockRow`). */
|
|
264
|
+
addBlockMenu: string;
|
|
265
|
+
/** The quiet line over a section's settings on a device that is not the
|
|
266
|
+
* desktop: the tablet's, then the phone's. */
|
|
267
|
+
deviceNote: {
|
|
268
|
+
tablet: string;
|
|
269
|
+
mobile: string;
|
|
270
|
+
};
|
|
149
271
|
};
|
|
150
272
|
declare const DEFAULT_SCREEN_WORDS: ScreenWords;
|
|
151
273
|
|
|
152
|
-
export { DEFAULT_SCREEN_ADD_WORDS, DEFAULT_SCREEN_WORDS, type ScreenAddWords, type ScreenWords };
|
|
274
|
+
export { DEFAULT_SCREEN_ADD_WORDS, DEFAULT_SCREEN_WORDS, type ScreenAddWords, type ScreenBarWords, type ScreenLeaveWords, type ScreenMenuWords, type ScreenWords };
|
package/dist/screen/words.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-
|
|
1
|
+
export{DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-BF3PIXZD.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { S as SaveWords } from '../words-CvFnwGSr.js';
|
|
2
|
-
import { N as NoticeWords, C as ChromeWords } from '../words-
|
|
3
|
-
import { C as CopyWords } from '../words-
|
|
2
|
+
import { N as NoticeWords, C as ChromeWords } from '../words-C1U_dLBh.js';
|
|
3
|
+
import { C as CopyWords } from '../words-lpvYzf5U.js';
|
|
4
4
|
import { D as DragWords } from '../words-BDignMl_.js';
|
|
5
5
|
import { LockWords } from '../edit-lock/index.js';
|
|
6
|
-
import { F as FieldsWords } from '../words-
|
|
6
|
+
import { F as FieldsWords } from '../words-vhnV8sM7.js';
|
|
7
7
|
import { N as NodeMenuWords } from '../words-DMG4dYq2.js';
|
|
8
8
|
import { P as PanelWords } from '../words-BGrHZAJJ.js';
|
|
9
9
|
import { P as PickWords } from '../words-is_Vy6hn.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-
|
|
1
|
+
export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-2T3ED73A.js";import"../chunk-M6F6LS3H.js";import"../chunk-ZAOM6PFH.js";import"../chunk-6WY6ZXJG.js";import"../chunk-BF3PIXZD.js";import"../chunk-AELNNAFM.js";import"../chunk-K56YDHYQ.js";import"../chunk-QTLAVDJE.js";import"../chunk-WK3AFPXY.js";import"../chunk-H6DDIBQ4.js";import"../chunk-Y2G7CU6A.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-JZDEIRH4.js";import"../chunk-FFYXVAAL.js";import"../chunk-546BBOPE.js";import"../chunk-O2NLQBFX.js";
|
package/dist/strings/index.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import { DeepPartial, EaselStrings } from './catalogue.js';
|
|
|
2
2
|
export { CanvasWords, DEFAULT_EASEL_STRINGS, RailWords, mergeEaselStrings } from './catalogue.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
|
-
export { C as ChromeWords, N as NoticeWords } from '../words-
|
|
6
|
-
export { C as CopyWords } from '../words-
|
|
5
|
+
export { C as ChromeWords, N as NoticeWords } from '../words-C1U_dLBh.js';
|
|
6
|
+
export { C as CopyWords } from '../words-lpvYzf5U.js';
|
|
7
7
|
export { D as DragWords } from '../words-BDignMl_.js';
|
|
8
|
-
export { F as FieldsWords } from '../words-
|
|
8
|
+
export { F as FieldsWords } from '../words-vhnV8sM7.js';
|
|
9
9
|
export { LockWords } from '../edit-lock/index.js';
|
|
10
10
|
export { N as NodeMenuWords } from '../words-DMG4dYq2.js';
|
|
11
11
|
export { P as PanelWords } from '../words-BGrHZAJJ.js';
|
package/dist/strings/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{DEFAULT_EASEL_STRINGS as r,mergeEaselStrings as n}from"../chunk-
|
|
1
|
+
import{DEFAULT_EASEL_STRINGS as r,mergeEaselStrings as n}from"../chunk-2T3ED73A.js";export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-2T3ED73A.js";import"../chunk-M6F6LS3H.js";import"../chunk-ZAOM6PFH.js";import"../chunk-6WY6ZXJG.js";import"../chunk-BF3PIXZD.js";import"../chunk-AELNNAFM.js";import"../chunk-K56YDHYQ.js";import"../chunk-QTLAVDJE.js";import"../chunk-WK3AFPXY.js";import"../chunk-H6DDIBQ4.js";import"../chunk-Y2G7CU6A.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-JZDEIRH4.js";import"../chunk-FFYXVAAL.js";import"../chunk-546BBOPE.js";import{stringsContext as o}from"../chunk-MFIRYGHW.js";import"../chunk-O2NLQBFX.js";import{useContext as t,useMemo as c}from"react";import{jsx as i}from"react/jsx-runtime";function s({value:s,locale:u,children:m}){const e=o(),p=t(e),h=p?.strings??r,j=u??p?.locale??"en",k=c(()=>({strings:n(h,s),locale:j}),[h,s,j]);/* @__PURE__ */
|
|
2
2
|
return i(e.Provider,{value:k,children:m})}function u(){return t(o())?.strings??r}function m(){return t(o())?.locale??"en"}export{s as EaselStringsProvider,m as useEaselLocale,u as useEaselStrings};
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import{hexReadout as e,ColourWindow as n,typedHex as t}from"../chunk-FPAVNX3Y.js";import{DEFAULT_TEXT_STYLES_WORDS as s}from"../chunk-M6F6LS3H.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-M6F6LS3H.js";import"../chunk-ZAOM6PFH.js";import{FieldSelect as i,FieldSlider as a}from"../chunk-
|
|
1
|
+
import{hexReadout as e,ColourWindow as n,typedHex as t}from"../chunk-FPAVNX3Y.js";import{DEFAULT_TEXT_STYLES_WORDS as s}from"../chunk-M6F6LS3H.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-M6F6LS3H.js";import"../chunk-ZAOM6PFH.js";import{FieldSelect as i,FieldSlider as a}from"../chunk-OZ72A6MY.js";import"../chunk-FFYXVAAL.js";import{useWords as l}from"../chunk-MFIRYGHW.js";import{withTip as r}from"../chunk-P2VEMZH5.js";import{hsvToHex as o,Tooltip as d,ColorSwatch as c,IconButton as u}from"efficient-shell/ui";import{useState as m,useRef as f,useId as h,useEffect as p,Fragment as v}from"react";import{ChevronIcon as g,TrashIcon as k,BoldIcon as y,ItalicIcon as b,CaseLowerIcon as x,CaseUpperIcon as w,CaseNormalIcon as S}from"efficient-shell/icons/efficient";import{jsxs as N,jsx as C,Fragment as M}from"react/jsx-runtime";var z=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],$=["font","color","size","weight","lineSpacing","letterSpacing","paragraphSpacing","letterCase"],O=["heading","body"],A=7,j={heading:3,body:5},F={min:5,max:void 0,sliderMin:12,sliderMax:72,step:1,shiftStep:10,unit:"px"},L={size:F,weight:{min:100,max:900,sliderMin:300,sliderMax:900,step:100,shiftStep:100,unit:""},lineSpacing:{min:50,max:250,sliderMin:50,sliderMax:250,step:1,shiftStep:10,unit:"%"},letterSpacing:{min:-10,max:void 0,sliderMin:-5,sliderMax:10,step:.1,shiftStep:1,unit:"px"},paragraphSpacing:{min:0,max:void 0,sliderMin:0,sliderMax:48,step:1,shiftStep:10,unit:"px"},largestSize:F},E=(e,n)=>`${"heading"===e?"Heading":"Body"} ${n}`;function W(e=({kind:e,n:n})=>E(e,n)){return O.flatMap(n=>Array.from({length:j[n]},(t,s)=>({id:`${n}-${s+1}`,kind:n,name:e({kind:n,n:s+1}),values:{}})))}function H(e,n,t=A){return e.filter(e=>e.kind===n).length<t}function B(e,n){const t=new RegExp(`^${n}-([1-9]\\d*)$`).exec(e);return t?Number(t[1]):void 0}function D(e){const n=B(e.id,e.kind);return void 0!==n&&n<=j[e.kind]}function I(e,n,t={}){const{max:s=A,name:i=({kind:e,n:n})=>E(e,n),make:a}=t;if(!H(e,n,s))return null;const l=e.filter(e=>e.kind===n);let r=l.length+1;const o=new Set(e.map(e=>e.name));for(;o.has(i({kind:n,n:r}));)r+=1;const d=new Set(e.map(e=>e.id));let c=Math.max(r,...l.map(e=>(B(e.id,n)??0)+1));for(;d.has(`${n}-${c}`);)c+=1;const u=l.at(-1),m=a?a(n,r):{id:`${n}-${c}`,kind:n,name:i({kind:n,n:r}),values:{...u?.values??{}}},f=u?e.indexOf(u)+1:"heading"===n?0:e.length;return{styles:[...e.slice(0,f),m,...e.slice(f)],added:m}}function R(e,n,t={}){const{name:s=({kind:e,n:n})=>E(e,n)}=t,i=e.find(e=>e.id===n);if(!i||D(i))return null;const a=e.filter(e=>e.kind===i.kind),l=a.indexOf(i),r=/* @__PURE__ */new Map;return a.forEach((e,n)=>{n>l&&e.name===s({kind:e.kind,n:n+1})&&r.set(e,s({kind:e.kind,n:n}))}),{styles:e.filter(e=>e!==i).map(e=>r.has(e)?{...e,name:r.get(e)}:e),removed:i}}function T(e,n){const t=e.find(e=>e.id===n);if(t)return t;for(const t of O){const s=B(n,t);if(void 0===s)continue;let i;for(const n of e){const e=n.kind===t?B(n.id,t):void 0;void 0!==e&&e<s&&(!i||e>i.n)&&(i={n:e,style:n})}return i?.style}}function Y(e,n,t){return e.map(e=>{if(e.id!==n)return e;const s={...e.values};for(const[e,n]of Object.entries(t))void 0===n?delete s[e]:s[e]=n;return{...e,values:s}})}function V(e){return Math.min(20,Math.max(12,Math.round(.5*e+6)))}function q(e,n){const t=n.weights;return[t.thin,t.extraLight,t.light,t.regular,t.medium,t.semibold,t.bold,t.extraBold,t.black][Math.min(8,Math.max(0,Math.round(e/100)-1))]}function P(e,n,t,s={}){const i=n.find(n=>n.value===e.font)?.label??e.font??"",a=void 0===e.size?s.autoSize?t.auto:"":t.px({n:e.size});return t.summary({font:i,size:a,weight:q(e.weight??400,t)})}var X=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>o({h:e,s:1,v:1})).join(", ")})`;function Z({value:t,hex:s,colours:i,label:a,followsWord:l,anyWord:r,onChange:o,readOnly:u=!1}){const[v,g]=m(!1),k=f(null),y=f(null),b=h(),x=void 0!==t&&i.some(e=>e.key===t),w=void 0!==t&&!x;return p(()=>{if(!v)return;const e=k.current?.ownerDocument;if(!e)return;const n=e=>{k.current&&!k.current.contains(e.target)&&g(!1)};return e.addEventListener("click",n,!0),()=>e.removeEventListener("click",n,!0)},[v]),/* @__PURE__ */N("div",{ref:k,className:"es-ts-set","data-ts-setting":"color",children:[
|
|
2
2
|
/* @__PURE__ */N("div",{className:"es-ts-top",children:[
|
|
3
3
|
/* @__PURE__ */C("span",{className:"es-ts-sub",children:a}),
|
|
4
4
|
/* @__PURE__ */C("span",{className:"es-ts-colour-read",children:s?e(s):l})]}),
|
|
5
5
|
/* @__PURE__ */N("div",{className:"es-ts-swatches",role:"group","aria-label":a,children:[i.map(n=>/* @__PURE__ */C(d,{content:`${n.name} · ${e(n.value)}`,children:/* @__PURE__ */C(c,{color:n.value,size:"sm",className:"es-ts-swatch","aria-label":n.name,selected:t===n.key,disabled:u,onClick:()=>o(n.key)})},n.key)),
|
|
6
|
-
/* @__PURE__ */C(d,{content:r,children:/* @__PURE__ */C(c,{ref:y,color:
|
|
7
|
-
return C("div",{className:"es-ts",ref:
|
|
6
|
+
/* @__PURE__ */C(d,{content:r,children:/* @__PURE__ */C(c,{ref:y,color:X,size:"sm",className:"es-ts-swatch es-ts-swatch--any","aria-label":r,selected:w,"aria-expanded":v,"aria-controls":v?b:void 0,disabled:u,onClick:()=>g(e=>!e)})})]}),v?/* @__PURE__ */C(n,{id:b,value:s??"",onChange:e=>o(e),label:a,readOnly:u,onClose:()=>{g(!1),y.current?.focus()}}):null]})}function _({styles:e,onChange:n,fonts:t,colours:i=[],settings:a=$,auto:o=[],fallback:d,sample:c,openId:u,defaultOpenId:y=null,onOpenChange:b,onAdd:x,rowActions:w,onRemove:S,max:M=A,readOnly:j=!1}){const F=l("textStyles",s),L=h(),[E,W]=m(y),B=void 0!==u?u:E,T=e=>{void 0===u&&W(e),b?.(e)},q=new Set(o),X=z.filter(e=>a.includes(e)),Z=f(null),[_,U]=m(null);p(()=>{if(!_||!Z.current)return;const e=[...Z.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===_.id),n=e?e.querySelector(".es-ts-row"):Z.current.querySelector(`.es-ts-add[data-ts-kind="${_.kind}"]`);n?.focus(),U(null)},[_]);/* @__PURE__ */
|
|
7
|
+
return C("div",{className:"es-ts",ref:Z,children:O.map(s=>{const a=e.filter(e=>e.kind===s),l=`${L}-${s}`,o=!H(e,s,M),u=!j&&!o;/* @__PURE__ */
|
|
8
8
|
return N("section",{className:"es-ts-section","aria-labelledby":l,children:[
|
|
9
|
-
/* @__PURE__ */C("div",{className:"es-ts-group",id:l,children:
|
|
9
|
+
/* @__PURE__ */C("div",{className:"es-ts-group",id:l,children:F.groups[s]}),a.map(s=>{const a=B===s.id,l={...d?.(s)??{},...s.values},o=t.find(e=>e.value===l.font),u=`${L}-open-${s.id}`,m=w?.(s),f=null!=m&&!1!==m,h=Boolean(S)&&!j&&!D(s),p={fontFamily:o?.family,fontSize:`${V(l.size??16)}px`,fontWeight:l.weight,fontStyle:l.italic?"italic":void 0};/* @__PURE__ */
|
|
10
10
|
return N(v,{children:[
|
|
11
11
|
/* @__PURE__ */N("div",{className:"es-ts-item","data-ts-id":s.id,children:[
|
|
12
12
|
/* @__PURE__ */N("button",{type:"button",className:"es-ts-row","aria-expanded":a,"aria-controls":a?u:void 0,onClick:()=>T(a?null:s.id),children:[
|
|
13
13
|
/* @__PURE__ */C("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */C(g,{size:12})}),
|
|
14
14
|
/* @__PURE__ */C("span",{className:"es-ts-name",style:p,children:s.name}),
|
|
15
|
-
/* @__PURE__ */C("span",{className:"es-ts-meta",children:
|
|
16
|
-
/* @__PURE__ */C("span",{className:"es-ts-add-word",children:
|
|
17
|
-
/* @__PURE__ */C("span",{className:"es-ts-count",children:
|
|
15
|
+
/* @__PURE__ */C("span",{className:"es-ts-meta",children:P(l,t,F,{autoSize:q.has("size")&&void 0===s.values.size})})]}),h||f?/* @__PURE__ */N("div",{className:"es-ts-actions",children:[h?r(F.remove,/* @__PURE__ */C("button",{type:"button",className:"es-ts-del","aria-label":F.removeNamed({name:s.name}),onClick:()=>(t=>{if(j||!S)return;const s=R(e,t.id,{name:F.styleName});if(!s)return;const i=e.filter(e=>e.kind===t.kind),a=i[i.indexOf(t)+1];B===t.id&&T(null),n(s.styles),S(s.removed),U({id:a?.id??null,kind:t.kind})})(s),children:/* @__PURE__ */C(k,{size:14,"aria-hidden":"true"})})):null,f?m:null]}):null]}),a?/* @__PURE__ */C("div",{className:"es-ts-open",id:u,children:/* @__PURE__ */C(K,{style:s,values:l,fonts:t,colours:i,settings:X,autoSet:q,sample:c??F.sample,words:F,readOnly:j,set:t=>n(Y(e,s.id,t))})}):null]},s.id)}),r(!j&&o?F.full({kind:s,max:M}):void 0,/* @__PURE__ */N("button",{type:"button",className:"es-ts-add","data-ts-kind":s,disabled:j,"aria-disabled":!(j||!o)||void 0,"aria-describedby":!j&&o?`${L}-full-${s}`:void 0,onClick:()=>{u&&(t=>{if(j)return;const s=I(e,t,{max:M,name:F.styleName,make:x});s&&n(s.styles)})(s)},children:[
|
|
16
|
+
/* @__PURE__ */C("span",{className:"es-ts-add-word",children:F.add[s]}),
|
|
17
|
+
/* @__PURE__ */C("span",{className:"es-ts-count",children:F.count({n:a.length,max:M})})]})),j||!o?null:/* @__PURE__ */C("span",{id:`${L}-full-${s}`,className:"es-vh",children:F.full({kind:s,max:M})})]},s)})})}var U={none:S,upper:w,lower:x},G={none:"none",upper:"uppercase",lower:"lowercase"};function K({style:e,values:n,fonts:s,colours:i,settings:l,autoSet:o,sample:d,words:c,readOnly:m,set:f}){const h=e.values,p=s.find(e=>e.value===n.font),v=function(e,n){return e?n.find(n=>n.key===e)?.value??t(e)??void 0:void 0}(n.color,i),g=e=>"largestSize"===e||o.has(e),k=e=>g(e)?h[e]:n[e],x=k("size"),w=k("lineSpacing"),S=k("letterSpacing"),z=g("letterCase")?h.letterCase:n.letterCase,$={fontFamily:p?.family,fontSize:void 0===x?void 0:`${x}px`,fontWeight:n.weight,fontStyle:n.italic?"italic":void 0,lineHeight:void 0===w?void 0:String(w/100),letterSpacing:void 0===S?void 0:`${S}px`,color:v,textTransform:z?G[z]:void 0},O=e=>{const t=L[e],s=g(e);/* @__PURE__ */
|
|
18
18
|
return C("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */C(a,{label:c.settings[e],value:h[e],onChange:n=>f({[e]:n}),min:t.min,max:t.max,step:t.step,shiftStep:t.shiftStep,sliderMin:t.sliderMin,sliderMax:t.sliderMax,unit:t.unit||void 0,styleValue:s?void 0:n[e],auto:s?c.auto:void 0,readOnly:m})},e)};/* @__PURE__ */
|
|
19
19
|
return N(M,{children:[
|
|
20
|
-
/* @__PURE__ */C("div",{className:"es-ts-preview",style
|
|
20
|
+
/* @__PURE__ */C("div",{className:"es-ts-preview",style:$,"aria-label":c.preview,children:d}),l.map(t=>{switch(t){case"font":/* @__PURE__ */
|
|
21
21
|
return C(J,{value:h.font,fonts:s,words:c,readOnly:m,set:f},t);case"color":/* @__PURE__ */
|
|
22
22
|
return C(Q,{value:h.color,hex:v,colours:i,words:c,readOnly:m,set:f},t);case"emphasis":{const e=(n.weight??400)>=600,s=!1!==p?.italic;/* @__PURE__ */
|
|
23
23
|
return N("div",{className:"es-ts-set","data-ts-setting":t,children:[
|
|
24
24
|
/* @__PURE__ */C("span",{className:"es-ts-sub",children:c.settings.emphasis}),
|
|
25
25
|
/* @__PURE__ */N("div",{className:"es-ts-icons",children:[r(c.bold,/* @__PURE__ */C(u,{className:"es-ts-icon","aria-label":c.bold,"aria-pressed":e,disabled:m,onClick:()=>f({weight:e?400:700}),children:/* @__PURE__ */C(y,{size:16})})),m||s?r(c.italic,/* @__PURE__ */C(u,{className:"es-ts-icon","aria-label":c.italic,"aria-pressed":Boolean(n.italic),disabled:m,onClick:()=>f({italic:!n.italic||void 0}),children:/* @__PURE__ */C(b,{size:16})})):/* @__PURE__ */C(u,{className:"es-ts-icon","aria-label":c.italic,"aria-pressed":Boolean(n.italic),"aria-disabled":!0,disabledReason:c.italicMissing,children:/* @__PURE__ */C(b,{size:16})})]})]},t)}case"letterCase":/* @__PURE__ */
|
|
26
|
-
return C(ee,{value:h.letterCase??n.letterCase,auto:g("letterCase"),words:c,readOnly:m,set:f},t);case"largestSize":return"heading"===e.kind
|
|
26
|
+
return C(ee,{value:h.letterCase??n.letterCase,auto:g("letterCase"),words:c,readOnly:m,set:f},t);case"largestSize":return"heading"===e.kind?O(t):null;default:return O(t)}})]})}function J({value:e,fonts:n,words:t,readOnly:s,set:a}){const l=h();/* @__PURE__ */
|
|
27
27
|
return N("div",{className:"es-ts-set","data-ts-setting":"font",children:[
|
|
28
28
|
/* @__PURE__ */C("span",{className:"es-ts-sub",id:l,children:t.settings.font}),
|
|
29
29
|
/* @__PURE__ */C(i,{value:e,options:n.map(e=>({label:e.label,value:e.value})),onChange:e=>a({font:e}),ariaLabelledBy:l,readOnly:s})]})}function Q({value:e,hex:n,colours:t,words:s,readOnly:i,set:a}){/* @__PURE__ */
|
|
30
|
-
return C(
|
|
30
|
+
return C(Z,{value:e,hex:n,colours:t,label:s.settings.color,followsWord:s.colour.follows,anyWord:s.colour.any,readOnly:i,onChange:e=>a({color:e})})}function ee({value:e,auto:n,words:t,readOnly:s,set:i}){const a=n?["auto","none","upper","lower"]:["none","upper","lower"],l=e??(n?"auto":"none"),o=f([]),d=e=>i({letterCase:"auto"===e?void 0:e});/* @__PURE__ */
|
|
31
31
|
return N("div",{className:"es-ts-set","data-ts-setting":"letterCase",children:[
|
|
32
32
|
/* @__PURE__ */C("span",{className:"es-ts-sub",children:t.settings.letterCase}),
|
|
33
|
-
/* @__PURE__ */C("div",{className:"es-ts-icons",role:"radiogroup","aria-label":t.settings.letterCase,onKeyDown:e=>{const n="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!n||s)return;e.preventDefault();const t=(a.indexOf(l)+n+a.length)%a.length;d(a[t]),o.current[t]?.focus()},children:a.map((e,n)=>{const i=e===l;if("auto"===e)return r(t.case.autoTitle,/* @__PURE__ */C(u,{ref:e=>{o.current[n]=e},role:"radio",pressed:i,className:"es-ts-icon es-ts-icon--word","aria-checked":i,"aria-label":t.case.auto,tabIndex:i?0:-1,disabled:s,onClick:()=>d(e),children:t.case.auto},e));const a=U[e];return r(t.case[e],/* @__PURE__ */C(u,{ref:e=>{o.current[n]=e},role:"radio",pressed:i,className:"es-ts-icon","aria-checked":i,"aria-label":t.case[e],tabIndex:i?0:-1,disabled:s,onClick:()=>d(e),children:/* @__PURE__ */C(a,{size:16})},e))})})]})}export{
|
|
33
|
+
/* @__PURE__ */C("div",{className:"es-ts-icons",role:"radiogroup","aria-label":t.settings.letterCase,onKeyDown:e=>{const n="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!n||s)return;e.preventDefault();const t=(a.indexOf(l)+n+a.length)%a.length;d(a[t]),o.current[t]?.focus()},children:a.map((e,n)=>{const i=e===l;if("auto"===e)return r(t.case.autoTitle,/* @__PURE__ */C(u,{ref:e=>{o.current[n]=e},role:"radio",pressed:i,className:"es-ts-icon es-ts-icon--word","aria-checked":i,"aria-label":t.case.auto,tabIndex:i?0:-1,disabled:s,onClick:()=>d(e),children:t.case.auto},e));const a=U[e];return r(t.case[e],/* @__PURE__ */C(u,{ref:e=>{o.current[n]=e},role:"radio",pressed:i,className:"es-ts-icon","aria-checked":i,"aria-label":t.case[e],tabIndex:i?0:-1,disabled:s,onClick:()=>d(e),children:/* @__PURE__ */C(a,{size:16})},e))})})]})}export{$ as CAMPAIGN_TEXT_STYLE_SETTINGS,Z as ColourSwatchRow,j as TEXT_STYLE_DEFAULT_COUNT,O as TEXT_STYLE_KINDS,A as TEXT_STYLE_MAX,L as TEXT_STYLE_RANGES,z as TEXT_STYLE_SETTINGS,_ as TextStylesList,I as addTextStyle,H as canAddTextStyle,W as defaultTextStyles,P as describeTextStyle,D as isDefaultTextStyle,R as removeTextStyle,T as resolveTextStyle,V as textStyleRowSize,Y as updateTextStyle,q as weightWord};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataInput } from './data/index.js';
|
|
2
|
-
import { I as ItemSelector, N as NodeSelection } from './plan-
|
|
2
|
+
import { I as ItemSelector, N as NodeSelection } from './plan-BdQ9mLIf.js';
|
|
3
3
|
import { D as Data, S as SlotAddress, a as DataConfig, N as Node } from './types-41704JE4.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { N as Node, S as SlotAddress, D as Data, a as DataConfig, P as Place } from './types-41704JE4.js';
|
|
2
|
-
import { N as NodeSelection, A as AfterRemove, S as StepBounds } from './plan-
|
|
2
|
+
import { N as NodeSelection, A as AfterRemove, S as StepBounds } from './plan-BdQ9mLIf.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The node clipboard — what Copy and Cut hold, and Paste reads.
|
|
@@ -102,6 +102,13 @@ type ChromeWords = {
|
|
|
102
102
|
hidePanelLabel: (v: {
|
|
103
103
|
side: 'left' | 'right';
|
|
104
104
|
}) => string;
|
|
105
|
+
/** What a hidden panel leaves at its edge, the one way back (3.1.0): its
|
|
106
|
+
* tooltip… */
|
|
107
|
+
showPanel: string;
|
|
108
|
+
/** …and its accessible name. */
|
|
109
|
+
showPanelLabel: (v: {
|
|
110
|
+
side: 'left' | 'right';
|
|
111
|
+
}) => string;
|
|
105
112
|
};
|
|
106
113
|
|
|
107
114
|
export type { ChromeWords as C, NoticeWords as N };
|
|
@@ -94,9 +94,10 @@ declare function copyAlignOptions(allow: readonly CopyAlign[], labels?: Record<C
|
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
96
|
* The copy box's own words (`efficient-easel/strings`, 0.95.0): the bar's and
|
|
97
|
-
* the alignment strip's names, the four directions,
|
|
98
|
-
*
|
|
99
|
-
*
|
|
97
|
+
* the alignment strip's names, the four directions, each mark button's name
|
|
98
|
+
* and tooltip, and the words a mark writes when nothing is selected. The link
|
|
99
|
+
* window is efficient-shell's `LinkPicker`: its words are the shell
|
|
100
|
+
* catalogue's (`ShellStringsProvider`, `link`).
|
|
100
101
|
*
|
|
101
102
|
* NO REACT here, and no import but the grammar: the marks' names, tooltips and
|
|
102
103
|
* placeholders are READ from `efficient-easel/markup` (`MARKUP_TOOLS`,
|
|
@@ -111,22 +112,6 @@ type CopyWords = {
|
|
|
111
112
|
alignment: string;
|
|
112
113
|
/** The word each direction is called. */
|
|
113
114
|
align: Record<CopyAlign, string>;
|
|
114
|
-
/** The link button's window. */
|
|
115
|
-
link: {
|
|
116
|
-
/** Its accessible name. */
|
|
117
|
-
title: string;
|
|
118
|
-
/** The label over the address box. */
|
|
119
|
-
label: string;
|
|
120
|
-
/** The address box's placeholder. */
|
|
121
|
-
placeholder: string;
|
|
122
|
-
/** Why an address was refused. */
|
|
123
|
-
refused: string;
|
|
124
|
-
remove: string;
|
|
125
|
-
/** E5b: the window's Cancel. Optional, so a host's words from before still
|
|
126
|
-
* type; English when left out. */
|
|
127
|
-
cancel?: string;
|
|
128
|
-
apply: string;
|
|
129
|
-
};
|
|
130
115
|
/**
|
|
131
116
|
* Each mark button, for a bar handed STYLES (`tools={['bold', 'link']}`).
|
|
132
117
|
* `name` is what the button is called; `title` its tooltip, which also says
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The settings rows' own words (`efficient-easel/strings`, 0.95.0): the number
|
|
3
|
-
* box's two buttons, the dropdown's empty state
|
|
4
|
-
* says
|
|
5
|
-
*
|
|
3
|
+
* box's two buttons, the dropdown's empty state and everything a list field
|
|
4
|
+
* says. A row's label, its options and its hint are the block's. The link
|
|
5
|
+
* picker is efficient-shell's `LinkPicker`: its words are the shell catalogue's
|
|
6
|
+
* (`ShellStringsProvider`, `link`), and its kinds, targets and filters its
|
|
6
7
|
* host's.
|
|
7
8
|
*
|
|
8
9
|
* A plain module with no import. `noun` is one item's word, lower case — the
|
|
@@ -65,29 +66,6 @@ type FieldsWords = {
|
|
|
65
66
|
total: number;
|
|
66
67
|
}) => string;
|
|
67
68
|
};
|
|
68
|
-
/** `LinkPicker`. Optional: a host's older catalogue falls back to the English. */
|
|
69
|
-
link?: {
|
|
70
|
-
/** The Link type list's accessible name. */
|
|
71
|
-
linkType: string;
|
|
72
|
-
/** The typed address box's accessible name. */
|
|
73
|
-
address: string;
|
|
74
|
-
/** What the empty address box says. */
|
|
75
|
-
addressPlaceholder: string;
|
|
76
|
-
/** Under the address box when what was typed cannot be saved. */
|
|
77
|
-
unsafe: string;
|
|
78
|
-
/** A saved target, filter or value the host no longer offers. */
|
|
79
|
-
unavailable: (v: {
|
|
80
|
-
value: string;
|
|
81
|
-
}) => string;
|
|
82
|
-
/** The Filter box's accessible name. */
|
|
83
|
-
filter: string;
|
|
84
|
-
/** The Filter box's first option: the listing with no filter. */
|
|
85
|
-
noFilter: string;
|
|
86
|
-
/** The Value box's accessible name. */
|
|
87
|
-
value: string;
|
|
88
|
-
/** Under the boxes while a Filter is offered. */
|
|
89
|
-
filterHint: string;
|
|
90
|
-
};
|
|
91
69
|
};
|
|
92
70
|
|
|
93
71
|
export type { FieldsWords as F };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-easel",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.2.1",
|
|
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",
|
|
@@ -517,7 +517,7 @@
|
|
|
517
517
|
"dist"
|
|
518
518
|
],
|
|
519
519
|
"peerDependencies": {
|
|
520
|
-
"efficient-shell": "^
|
|
520
|
+
"efficient-shell": "^5.6.0 || ^6.4.0 || ^7.7.0",
|
|
521
521
|
"react": ">=18",
|
|
522
522
|
"react-dom": ">=18"
|
|
523
523
|
},
|
|
@@ -527,7 +527,7 @@
|
|
|
527
527
|
"@types/node": "^22.0.0",
|
|
528
528
|
"@types/react": "^18.2.0",
|
|
529
529
|
"@types/react-dom": "^18.2.0",
|
|
530
|
-
"efficient-shell": "^
|
|
530
|
+
"efficient-shell": "^7.7.0",
|
|
531
531
|
"esbuild": "^0.27.0",
|
|
532
532
|
"jsdom": "^26.1.0",
|
|
533
533
|
"react": "^18.2.0",
|