efficient-easel 16.1.0 → 18.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -65
- package/dist/autosave/index.d.ts +4 -4
- package/dist/blocks/index.d.ts +2 -2
- package/dist/chrome/index.d.ts +3 -3
- package/dist/chrome/index.js +1 -1
- package/dist/chunk-43AEUUNQ.js +1 -0
- package/dist/{chunk-K6EM4F5N.js → chunk-5VD2LGIZ.js} +18 -18
- package/dist/{chunk-ATOXCKEE.js → chunk-7TOQCTHV.js} +3 -3
- package/dist/chunk-A6Z4SD3I.js +10 -0
- package/dist/{chunk-V6VKM2QX.js → chunk-A7FF65FL.js} +1 -1
- package/dist/chunk-BHRC3ASL.js +1 -0
- package/dist/chunk-BRMYJBMB.js +8 -0
- package/dist/chunk-C2RHV42O.js +1 -0
- package/dist/chunk-F7FDF6NS.js +4 -0
- package/dist/{chunk-IE55HNMA.js → chunk-GWIVPLOX.js} +11 -11
- package/dist/{chunk-2H3W5OLQ.js → chunk-HGV3FWOB.js} +1 -1
- package/dist/chunk-LLDHIBYG.js +18 -0
- package/dist/chunk-M2Z775ZC.js +1 -0
- package/dist/{chunk-2L2L7G5L.js → chunk-MPF5QZJ7.js} +1 -1
- package/dist/chunk-N3VPBHR6.js +62 -0
- package/dist/chunk-QEAUF632.js +14 -0
- package/dist/{chunk-UVQR7W6I.js → chunk-RFE7ZG3Y.js} +1 -1
- package/dist/chunk-STWSCR25.js +2 -0
- package/dist/{chunk-TZIIRGVY.js → chunk-U277UX5I.js} +1 -1
- package/dist/chunk-VEZPDGDQ.js +1 -0
- package/dist/{chunk-JQOYUH4A.js → chunk-W2GEGVUY.js} +4 -4
- package/dist/{chunk-GPLMNRHR.js → chunk-WOETW3H6.js} +1 -1
- package/dist/chunk-X3TYRF5V.js +1 -0
- package/dist/{chunk-62VPYC7F.js → chunk-XDZHKYQX.js} +1 -1
- package/dist/{chunk-HV56SLR2.js → chunk-XHHVMAGM.js} +1 -1
- package/dist/chunk-XHSGRH42.js +5 -0
- package/dist/{chunk-XQGV2XAK.js → chunk-YI4QXOVJ.js} +1 -1
- package/dist/{chunk-RFSLDGDA.js → chunk-YLQYEDUQ.js} +1 -1
- package/dist/copy/index.js +23 -11
- package/dist/drag/drag.css +8 -0
- package/dist/drag/index.d.ts +15 -1
- package/dist/drag/index.js +1 -1
- package/dist/draw/client.js +1 -1
- package/dist/draw/index.js +1 -1
- package/dist/easel/easel.css +8 -0
- package/dist/easel/index.d.ts +45 -6
- package/dist/easel/index.js +1 -1
- package/dist/fields/index.js +1 -1
- package/dist/gold/gold.css +1 -1
- package/dist/{host-DGmdCaNL.d.ts → host-epHo7r8P.d.ts} +12 -5
- package/dist/icons/index.d.ts +0 -2
- package/dist/node-ops/index.d.ts +2 -2
- package/dist/node-ops/index.js +1 -1
- package/dist/panel/index.js +1 -1
- package/dist/{plan-CGREINRO.d.ts → plan-CZS902DV.d.ts} +27 -1
- package/dist/rail/index.d.ts +2 -2
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.d.ts +6 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/MediaSidePanel.d.ts +4 -3
- package/dist/screen/components/MediaSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.d.ts +8 -7
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/SaveControls.d.ts +7 -6
- package/dist/screen/components/SaveControls.js +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenDocumentContext.d.ts +4 -3
- package/dist/screen/components/ScreenDocumentContext.js +1 -1
- package/dist/screen/components/ScreenMount.d.ts +7 -6
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.d.ts +7 -6
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +15 -15
- package/dist/screen/components/SidePanelHead.js +1 -1
- package/dist/screen/components/panel-widths.js +1 -1
- package/dist/screen/components/usePartBridge.d.ts +7 -6
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.d.ts +8 -7
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/admin-bridge.d.ts +3 -2
- package/dist/screen/lib/document-addressing.d.ts +4 -3
- package/dist/screen/lib/document-hooks.d.ts +2 -2
- package/dist/screen/lib/host-chrome.d.ts +0 -10
- package/dist/screen/lib/host.d.ts +4 -3
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/media-panel.d.ts +4 -3
- package/dist/screen/lib/media-picker.d.ts +7 -9
- package/dist/screen/lib/page-lock.d.ts +3 -2
- package/dist/screen/lib/puck/block-choice.d.ts +13 -1
- package/dist/screen/lib/puck/block-choice.js +1 -1
- 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/slot-child-name.js +1 -1
- package/dist/screen/lib/puck/style-clipboard.d.ts +7 -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/save-status.d.ts +2 -2
- package/dist/screen/lib/screen-parts.d.ts +71 -29
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/lib/section-templates.d.ts +3 -2
- package/dist/screen/lib/session-context.d.ts +3 -2
- package/dist/screen/lib/session.d.ts +6 -2
- package/dist/screen/lib/shared-section-types.d.ts +71 -0
- package/dist/screen/lib/shared-section-types.js +1 -0
- package/dist/screen/lib/shared-sections.d.ts +34 -0
- package/dist/screen/lib/shared-sections.js +1 -0
- package/dist/screen/screen.css +7 -0
- package/dist/screen/words.d.ts +49 -3
- package/dist/screen/words.js +1 -1
- package/dist/shell/shell.css +6 -1
- package/dist/strings/index.d.ts +134 -20
- package/dist/strings/index.js +2 -2
- package/dist/text-styles/index.js +23 -23
- package/dist/tree/index.d.ts +3 -3
- package/dist/tree/index.js +1 -1
- package/dist/tree/tree.css +17 -0
- package/dist/{types-D8P9q-BG.d.ts → types-Bqq6ya0y.d.ts} +9 -0
- package/dist/{types-NQozKWEz.d.ts → types-Cq53lL8d.d.ts} +1 -1
- package/dist/{types-CsgMwHHa.d.ts → types-Cy7rdmXt.d.ts} +1 -1
- package/dist/{types-DGyDHiJV.d.ts → types-DT8ywrFQ.d.ts} +1 -1
- package/dist/{useNodeOps-BHRkUFfG.d.ts → useNodeOps-fIDWzftn.d.ts} +3 -1
- package/dist/{words-pgIK0I6g.d.ts → words-DkWcK1rh.d.ts} +2 -2
- package/package.json +16 -43
- package/dist/chunk-44COUKXO.js +0 -5
- package/dist/chunk-4BGYVIDQ.js +0 -57
- package/dist/chunk-4JSBIW5H.js +0 -9
- package/dist/chunk-ECM5F6JJ.js +0 -1
- package/dist/chunk-H4UMY7QF.js +0 -13
- package/dist/chunk-HMXIAMCU.js +0 -1
- package/dist/chunk-HQ4VVRIC.js +0 -1
- package/dist/chunk-IN22IYOM.js +0 -1
- package/dist/chunk-L2VGRQ4R.js +0 -4
- package/dist/chunk-L3GSW4XI.js +0 -1
- package/dist/chunk-POSLNRTO.js +0 -18
- package/dist/chunk-QX7GVECM.js +0 -13
- package/dist/chunk-TBF5CVPA.js +0 -1
- package/dist/chunk-U25CP5VX.js +0 -5
- package/dist/chunk-VVPZMWJE.js +0 -1
- package/dist/chunk-ZZ64CEC2.js +0 -2
- package/dist/gold/index.d.ts +0 -283
- package/dist/gold/index.js +0 -1
- package/dist/icons/meanings.d.ts +0 -1
- package/dist/icons/meanings.js +0 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.js +0 -1
- package/dist/markup/index.d.ts +0 -1
- package/dist/markup/index.js +0 -1
- package/dist/shell/index.d.ts +0 -195
- package/dist/shell/index.js +0 -1
- package/dist/strings/catalogue.d.ts +0 -139
- package/dist/strings/catalogue.js +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SharedSectionStore } from './shared-section-types.js';
|
|
2
|
+
import { EaselSession } from './session.js';
|
|
3
|
+
import './puck/content-tree.js';
|
|
4
|
+
import '../../blocks/index.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '../../types-Cq53lL8d.js';
|
|
7
|
+
import '../../data/index.js';
|
|
8
|
+
import '../../types-41704JE4.js';
|
|
9
|
+
import '../../resolve-D68pb3Bx.js';
|
|
10
|
+
import '../../plan-CZS902DV.js';
|
|
11
|
+
import './backend-error.js';
|
|
12
|
+
import '../../edit-lock/index.js';
|
|
13
|
+
import './host-chrome.js';
|
|
14
|
+
import './links/link-filters.js';
|
|
15
|
+
import 'efficient-shell/ui';
|
|
16
|
+
import './document-contract.js';
|
|
17
|
+
import './document-hooks.js';
|
|
18
|
+
import './section-template-types.js';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The shared sections of the editor's website — whichever store its backend
|
|
22
|
+
* offers (`SessionBackend.sharedSections`). The same arrangement as the section
|
|
23
|
+
* templates (lib/section-templates): read per call, never captured, and a
|
|
24
|
+
* backend with none is an EMPTY store, so Add draws no "Shared sections" group
|
|
25
|
+
* and the menus offer no Make shared. No caller asks "is there a store?".
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/** Whether `session`'s backend keeps shared sections at all: the screen offers
|
|
29
|
+
* Make shared only where one can be made. */
|
|
30
|
+
declare function keepsSharedSections(session: EaselSession): boolean;
|
|
31
|
+
/** The shared sections of ONE editor's session (its own backend's). */
|
|
32
|
+
declare function sharedSectionsOf(session: EaselSession): SharedSectionStore;
|
|
33
|
+
|
|
34
|
+
export { keepsSharedSections, sharedSectionsOf };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{keepsSharedSections,sharedSectionsOf}from"../../chunk-43AEUUNQ.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-RSCMJIWS.js";
|
package/dist/screen/screen.css
CHANGED
|
@@ -834,6 +834,13 @@
|
|
|
834
834
|
pointer-events: auto;
|
|
835
835
|
cursor: pointer;
|
|
836
836
|
}
|
|
837
|
+
/* A SHARED node's tab (Shared section design v4, Lewis 2026-10-21): the
|
|
838
|
+
shell's `shared` mark before the name, inside the badge's line. */
|
|
839
|
+
.es-band-tab-mark {
|
|
840
|
+
display: inline-flex;
|
|
841
|
+
align-items: center;
|
|
842
|
+
margin-right: 4px;
|
|
843
|
+
}
|
|
837
844
|
/* THE LAYERS BADGE ("Every page") gives way below a 240px panel: the row's
|
|
838
845
|
name needs the room (owner 2026-10-15). The side panel is the size
|
|
839
846
|
container (chrome.css). */
|
package/dist/screen/words.d.ts
CHANGED
|
@@ -72,6 +72,52 @@ type ScreenAddWords = {
|
|
|
72
72
|
addingHere: string;
|
|
73
73
|
};
|
|
74
74
|
declare const DEFAULT_SCREEN_ADD_WORDS: ScreenAddWords;
|
|
75
|
+
/**
|
|
76
|
+
* A SHARED SECTION'S WORDS (Shared section design v4, Lewis 2026-10-21): one
|
|
77
|
+
* section that many pages use live. Lewis's words for the menu are "Make
|
|
78
|
+
* shared", "On 3 pages", "Detach from shared" and "Remove from this page" — not
|
|
79
|
+
* "Delete" on a page, so nobody thinks it went from every page.
|
|
80
|
+
*/
|
|
81
|
+
type ScreenSharedWords = {
|
|
82
|
+
/** Add's group of them, above the saved sections. */
|
|
83
|
+
group: string;
|
|
84
|
+
/** How far one reaches: a card's Tooltip, and the menu's row that lists
|
|
85
|
+
* the pages. */
|
|
86
|
+
onPages: (v: {
|
|
87
|
+
count: number;
|
|
88
|
+
}) => string;
|
|
89
|
+
/** The menu row on a page's own section, and the dialog's title and button. */
|
|
90
|
+
makeShared: string;
|
|
91
|
+
/** The dialog's line under its title. */
|
|
92
|
+
makeSharedHint: string;
|
|
93
|
+
/** The name box's label. */
|
|
94
|
+
name: string;
|
|
95
|
+
/** The dialog's way out. */
|
|
96
|
+
cancel: string;
|
|
97
|
+
/** The store refused to make it. */
|
|
98
|
+
makeFailed: string;
|
|
99
|
+
/** The menu row that gives this page its own copy. */
|
|
100
|
+
detach: string;
|
|
101
|
+
/** The menu row, and the Layers trash, that take it off this page only. */
|
|
102
|
+
removeFromPage: string;
|
|
103
|
+
/** …and what is said then, with how many pages still use it. */
|
|
104
|
+
removed: (v: {
|
|
105
|
+
count: number;
|
|
106
|
+
}) => string;
|
|
107
|
+
/** A card's menu row, and the dialog's title and button. */
|
|
108
|
+
deleteShared: string;
|
|
109
|
+
deleteTitle: (v: {
|
|
110
|
+
name: string;
|
|
111
|
+
}) => string;
|
|
112
|
+
deleteMessage: (v: {
|
|
113
|
+
count: number;
|
|
114
|
+
}) => string;
|
|
115
|
+
/** The store refused to delete it. */
|
|
116
|
+
deleteFailed: string;
|
|
117
|
+
/** Why a card is dimmed: it is on this page already (once per page). */
|
|
118
|
+
alreadyHere: string;
|
|
119
|
+
};
|
|
120
|
+
declare const DEFAULT_SCREEN_SHARED_WORDS: ScreenSharedWords;
|
|
75
121
|
/**
|
|
76
122
|
* THE PROMPT BEFORE A SWITCH OF DOCUMENT WOULD LOSE AN EDIT (3.1.0). It was
|
|
77
123
|
* written into components/ScreenMount; the words are its English, word for
|
|
@@ -245,6 +291,8 @@ type ScreenWords = {
|
|
|
245
291
|
}) => string;
|
|
246
292
|
/** The Add panel's words (0.105.0). */
|
|
247
293
|
add: ScreenAddWords;
|
|
294
|
+
/** A shared section's words: Add's group, the menu rows and the dialogs. */
|
|
295
|
+
shared: ScreenSharedWords;
|
|
248
296
|
/** The cell over an EMPTY slot on the canvas, after its "+" (0.106.0): the
|
|
249
297
|
* campaign designer's "Add a block". */
|
|
250
298
|
canvasAddBlock: string;
|
|
@@ -274,8 +322,6 @@ type ScreenWords = {
|
|
|
274
322
|
collapseAll: string;
|
|
275
323
|
/** …its tooltip while the page has nothing to fold, and the button is off. */
|
|
276
324
|
nothingToFold: string;
|
|
277
|
-
/** The pinned Footer's row where the page has no footer of its own: its tooltip. */
|
|
278
|
-
editFooter: string;
|
|
279
325
|
/** The box a row's name is typed in: its accessible name. */
|
|
280
326
|
rename: string;
|
|
281
327
|
/** A row's trash and eye, naming the row. */
|
|
@@ -333,4 +379,4 @@ type ScreenWords = {
|
|
|
333
379
|
};
|
|
334
380
|
declare const DEFAULT_SCREEN_WORDS: ScreenWords;
|
|
335
381
|
|
|
336
|
-
export { DEFAULT_SCREEN_ADD_WORDS, DEFAULT_SCREEN_SAVE_STATUS_WORDS, DEFAULT_SCREEN_WORDS, type ScreenAddWords, type ScreenBarWords, type ScreenLeaveWords, type ScreenMenuWords, type ScreenSaveStatusWords, type ScreenWords };
|
|
382
|
+
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 };
|
package/dist/screen/words.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_SAVE_STATUS_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-
|
|
1
|
+
export{DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_SAVE_STATUS_WORDS,DEFAULT_SCREEN_SHARED_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-C2RHV42O.js";
|
package/dist/shell/shell.css
CHANGED
|
@@ -60,7 +60,12 @@
|
|
|
60
60
|
*/
|
|
61
61
|
|
|
62
62
|
.es-editor {
|
|
63
|
-
/* — accent: the shell's (custom accent, else the themed primary fill) —
|
|
63
|
+
/* — accent: the shell's (custom accent, else the themed primary fill) —
|
|
64
|
+
SHELL GAP (#199): the shell has no token yet for an accent wash
|
|
65
|
+
(tint, tint-strong), an accent hairline (line), accent words (text), an
|
|
66
|
+
accent shadow, or ink on a solid fill (on-accent: its nearest is the status
|
|
67
|
+
tier's `--status-on-solid`). Each is MIXED from shell tokens until the
|
|
68
|
+
shell has one; none is a value of our own. */
|
|
64
69
|
--es-accent: var(--accent-600, var(--submit-bg));
|
|
65
70
|
--es-accent-tint: color-mix(in srgb, var(--es-accent) 10%, var(--surface));
|
|
66
71
|
--es-accent-tint-strong: color-mix(in srgb, var(--es-accent) 18%, var(--surface));
|
package/dist/strings/index.d.ts
CHANGED
|
@@ -1,27 +1,141 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { a as SaveWords } from '../words-DkWcK1rh.js';
|
|
2
|
+
import { N as NoticeWords, C as ChromeWords } from '../words-BpiVrsW5.js';
|
|
3
|
+
import { C as CopyWords } from '../words-D-yhjdOg.js';
|
|
4
|
+
import { D as DragWords } from '../words-CvwYvkJm.js';
|
|
5
|
+
import { LockWords } from '../edit-lock/index.js';
|
|
6
|
+
import { F as FieldsWords } from '../words-vhnV8sM7.js';
|
|
7
|
+
import { N as NodeMenuWords } from '../words-DMG4dYq2.js';
|
|
8
|
+
import { P as PanelWords } from '../words-zH1H0WFw.js';
|
|
9
|
+
import { P as PickWords } from '../words-DWvCJXwR.js';
|
|
10
|
+
import { ScreenWords } from '../screen/words.js';
|
|
11
|
+
export { ScreenAddWords, ScreenSharedWords } from '../screen/words.js';
|
|
12
|
+
import { S as StyleClipboardWords } from '../words-CnnHb9jo.js';
|
|
13
|
+
import { T as TextStylesWords } from '../words-gIDCeRv3.js';
|
|
14
|
+
import { T as TreeWords } from '../words-Cl9xMUYY.js';
|
|
3
15
|
import * as react from 'react';
|
|
4
16
|
import { ReactNode } from 'react';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export { D as DragWords } from '../words-CvwYvkJm.js';
|
|
8
|
-
export { F as FieldsWords } from '../words-vhnV8sM7.js';
|
|
9
|
-
export { LockWords } from '../edit-lock/index.js';
|
|
10
|
-
export { N as NodeMenuWords } from '../words-DMG4dYq2.js';
|
|
11
|
-
export { P as PanelWords } from '../words-zH1H0WFw.js';
|
|
12
|
-
export { P as PickWords } from '../words-DWvCJXwR.js';
|
|
13
|
-
export { S as SaveWords } from '../words-pgIK0I6g.js';
|
|
14
|
-
export { ScreenAddWords, ScreenWords } from '../screen/words.js';
|
|
15
|
-
export { S as StyleClipboardWords } from '../words-CnnHb9jo.js';
|
|
16
|
-
export { T as TextStylesWords } from '../words-gIDCeRv3.js';
|
|
17
|
-
export { T as TreeWords } from '../words-Cl9xMUYY.js';
|
|
18
|
-
import 'efficient-shell/markup';
|
|
19
|
-
import '../buckets-Tj-nkBpg.js';
|
|
20
|
-
import '../types-DGyDHiJV.js';
|
|
21
|
-
import '../types-CsgMwHHa.js';
|
|
17
|
+
import '../types-DT8ywrFQ.js';
|
|
18
|
+
import '../types-Cy7rdmXt.js';
|
|
22
19
|
import '../wordFit-7XpmhcaW.js';
|
|
23
20
|
import '../panelWidths-D9hTLR25.js';
|
|
24
21
|
import '../engine-CvXpFE86.js';
|
|
22
|
+
import 'efficient-shell/markup';
|
|
23
|
+
import '../buckets-Tj-nkBpg.js';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The easel canvas's own words (`efficient-easel/strings`, 0.95.0): what the
|
|
27
|
+
* frame is called when the host does not name it (`title`), and the name of
|
|
28
|
+
* the bar of text tools that floats above words typed on the canvas.
|
|
29
|
+
*
|
|
30
|
+
* A plain module with no import.
|
|
31
|
+
*/
|
|
32
|
+
type CanvasWords = {
|
|
33
|
+
/** The canvas frame's accessible name. */
|
|
34
|
+
frame: string;
|
|
35
|
+
/** The floating bar of text tools over the words being typed (its group's name). */
|
|
36
|
+
textTools: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The rail's own words. There is one: what the toolbar is called when the host
|
|
41
|
+
* does not name it (`ariaLabel`). Every other word on the rail is an item's
|
|
42
|
+
* `label`, and those are the host's.
|
|
43
|
+
*
|
|
44
|
+
* A plain module with no import, so the rail stays the leaf it is
|
|
45
|
+
* (`tests/rail-leaf-safety.test.tsx`). It is NOT exported from `./index`: the
|
|
46
|
+
* rail's runtime exports are pinned (`tests/rail-public-shape.test.tsx`), and a
|
|
47
|
+
* host reads these through `efficient-easel/strings`.
|
|
48
|
+
*/
|
|
49
|
+
type RailWords = {
|
|
50
|
+
/** The toolbar's accessible name. */
|
|
51
|
+
label: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* THE ENGINE'S OWN WORDS, as one catalogue a host can translate (0.95.0).
|
|
56
|
+
*
|
|
57
|
+
* Every word and sentence this package itself draws or returns — visible text,
|
|
58
|
+
* `aria-label`s, tooltips, placeholders — is an entry here, grouped by the
|
|
59
|
+
* module that says it. What a HOST supplies (a block's name, a field's label, a
|
|
60
|
+
* tile's caption, the document's noun) was never the engine's and is not here —
|
|
61
|
+
* with one exception: the assembled screen (`efficient-easel/screen`) draws the
|
|
62
|
+
* edit notice itself, so the noun it says it with is a word of its own group,
|
|
63
|
+
* the website's "page" until a host says another.
|
|
64
|
+
*
|
|
65
|
+
* - A plain word is a `string`.
|
|
66
|
+
* - Anything with a value in it, or a count that can be one or many, is a
|
|
67
|
+
* function: the host puts the value where its language wants it and does
|
|
68
|
+
* its own plural.
|
|
69
|
+
*
|
|
70
|
+
* ── Where the English lives ───────────────────────────────────────────────
|
|
71
|
+
* In each module's own `words.ts`, NOT here. A leaf may only import its own
|
|
72
|
+
* lane (`tests/*-leaf-safety`), and several are held to a bundle that never
|
|
73
|
+
* spells a browser global — while one sentence below does ("another tab or
|
|
74
|
+
* window"). So a module owns its group and its defaults, and this file only
|
|
75
|
+
* puts the groups side by side. `DEFAULT_EASEL_STRINGS.pick` IS the pickers'
|
|
76
|
+
* own default object, not a copy of it.
|
|
77
|
+
*
|
|
78
|
+
* ── Framework-free ────────────────────────────────────────────────────────
|
|
79
|
+
* No React, no browser global, nothing run at import but object literals
|
|
80
|
+
* (`tests/strings-leaf-safety.test.ts`), so `efficient-easel/strings`, which
|
|
81
|
+
* re-exports it beside the provider, creates nothing at import. A host's
|
|
82
|
+
* server-side test reads `DEFAULT_EASEL_STRINGS` from there. The provider and
|
|
83
|
+
* the hooks are in ./provider.
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
/** Every word the engine says, by the module that says it. */
|
|
87
|
+
interface EaselStrings {
|
|
88
|
+
/** `efficient-easel/chrome` — `EditNotice`: who holds the document, a refused save. */
|
|
89
|
+
notice: NoticeWords;
|
|
90
|
+
/** `efficient-easel/edit-lock` — "2 minutes ago", "Someone else". */
|
|
91
|
+
lock: LockWords;
|
|
92
|
+
/** `efficient-easel/autosave` — the save pill. */
|
|
93
|
+
save: SaveWords;
|
|
94
|
+
/** `efficient-easel/chrome` — the device switch, "up one level", the panel grip. */
|
|
95
|
+
chrome: ChromeWords;
|
|
96
|
+
/** `efficient-easel/rail` — the toolbar's name. */
|
|
97
|
+
rail: RailWords;
|
|
98
|
+
/** `efficient-easel/tree` — the drag hint and the caret. */
|
|
99
|
+
tree: TreeWords;
|
|
100
|
+
/** `efficient-easel/panel` — the tab strip's name and each tab's word. */
|
|
101
|
+
panel: PanelWords;
|
|
102
|
+
/** `efficient-easel/fields` — the number box, the dropdown, the list field. */
|
|
103
|
+
fields: FieldsWords;
|
|
104
|
+
/** `efficient-easel/pick` — the colour row and the image box. */
|
|
105
|
+
pick: PickWords;
|
|
106
|
+
/** `efficient-easel/drag` — the Add panel and the canvas layer. */
|
|
107
|
+
drag: DragWords;
|
|
108
|
+
/** `efficient-easel/node-ops` — the right-click rows. */
|
|
109
|
+
menu: NodeMenuWords;
|
|
110
|
+
/** `efficient-easel/style-clipboard` — Copy style, Paste style and what a paste says. */
|
|
111
|
+
styleClipboard: StyleClipboardWords;
|
|
112
|
+
/** `efficient-easel/copy` — the formatting bar, alignment, the link window, each mark. */
|
|
113
|
+
copy: CopyWords;
|
|
114
|
+
/** `efficient-easel/easel` — the canvas frame's name. */
|
|
115
|
+
canvas: CanvasWords;
|
|
116
|
+
/** `efficient-easel/text-styles` — the Email styles / Site styles list (E6). */
|
|
117
|
+
textStyles: TextStylesWords;
|
|
118
|
+
/** `efficient-easel/screen` — a document opening, one that will not, the
|
|
119
|
+
* notice's word for the document, the Layers tree's frame, the Add panel,
|
|
120
|
+
* the main button and the block keys. */
|
|
121
|
+
screen: ScreenWords;
|
|
122
|
+
}
|
|
123
|
+
/** Today's English, word for word. */
|
|
124
|
+
declare const DEFAULT_EASEL_STRINGS: EaselStrings;
|
|
125
|
+
/**
|
|
126
|
+
* A catalogue with any part left out. A function entry is taken whole or not
|
|
127
|
+
* at all: it has no "part" to leave out.
|
|
128
|
+
*/
|
|
129
|
+
type DeepPartial<T> = T extends (...args: never[]) => unknown ? T : T extends object ? {
|
|
130
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
131
|
+
} : T;
|
|
132
|
+
/**
|
|
133
|
+
* `defaults` with every entry `partial` gives laid over it. Whatever `partial`
|
|
134
|
+
* leaves out (or gives as `undefined` / `null`) keeps the default, so a host
|
|
135
|
+
* that has translated half the catalogue shows the other half in English
|
|
136
|
+
* rather than as nothing. Neither argument is changed.
|
|
137
|
+
*/
|
|
138
|
+
declare function mergeEaselStrings(defaults: EaselStrings, partial?: DeepPartial<EaselStrings> | null): EaselStrings;
|
|
25
139
|
|
|
26
140
|
interface EaselStringsProviderProps {
|
|
27
141
|
/**
|
|
@@ -58,4 +172,4 @@ declare function useEaselStrings(): EaselStrings;
|
|
|
58
172
|
/** The nearest provider's locale, or `'en'`. */
|
|
59
173
|
declare function useEaselLocale(): string;
|
|
60
174
|
|
|
61
|
-
export { DeepPartial, EaselStrings, EaselStringsProvider, type EaselStringsProviderProps, useEaselLocale, useEaselStrings };
|
|
175
|
+
export { type CanvasWords, ChromeWords, CopyWords, DEFAULT_EASEL_STRINGS, type DeepPartial, DragWords, type EaselStrings, EaselStringsProvider, type EaselStringsProviderProps, FieldsWords, LockWords, NodeMenuWords, NoticeWords, PanelWords, PickWords, type RailWords, SaveWords, ScreenWords, StyleClipboardWords, TextStylesWords, TreeWords, mergeEaselStrings, useEaselLocale, useEaselStrings };
|
package/dist/strings/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return
|
|
1
|
+
import{DEFAULT_SCREEN_WORDS as r}from"../chunk-C2RHV42O.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as o}from"../chunk-6WY6ZXJG.js";import{DEFAULT_TEXT_STYLES_WORDS as n}from"../chunk-OGH6CC3E.js";import{DEFAULT_CANVAS_WORDS as t}from"../chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as c}from"../chunk-K56YDHYQ.js";import{DEFAULT_PANEL_WORDS as e}from"../chunk-KFV7N2DJ.js";import{DEFAULT_PICK_WORDS as m}from"../chunk-OFBZOI6W.js";import{DEFAULT_NODE_MENU_WORDS as i}from"../chunk-WK3AFPXY.js";import{DEFAULT_SAVE_WORDS as s}from"../chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as u,DEFAULT_NOTICE_WORDS as f}from"../chunk-Z6PVRXVY.js";import{DEFAULT_RAIL_WORDS as p}from"../chunk-2OAZYSWJ.js";import{DEFAULT_LOCK_WORDS as l}from"../chunk-RE4LP46F.js";import{DEFAULT_COPY_WORDS as h}from"../chunk-B4JN227A.js";import{DEFAULT_FIELDS_WORDS as j}from"../chunk-WRFD4EXD.js";import{stringsContext as k}from"../chunk-MFIRYGHW.js";import{DEFAULT_DRAG_WORDS as a}from"../chunk-KAML3KQH.js";import{useContext as Y,useMemo as y}from"react";import{jsx as D}from"react/jsx-runtime";var F={notice:f,lock:l,save:s,chrome:u,rail:p,tree:c,panel:e,fields:j,pick:m,drag:a,menu:i,styleClipboard:o,copy:h,canvas:t,textStyles:n,screen:r},d=r=>"object"==typeof r&&null!==r;function v(r,o){const n={};for(const t of Object.keys(r)){const c=r[t],e=o[t];null==e?n[t]=c:d(c)?n[t]=d(e)?v(c,e):c:n[t]=typeof e==typeof c?e:c}return n}function H(r,o){return o?v(r,o):r}function K({value:r,locale:o,children:n}){const t=k(),c=Y(t),e=c?.strings??F,m=o??c?.locale??"en",i=y(()=>({strings:H(e,r),locale:m}),[e,r,m]);/* @__PURE__ */
|
|
2
|
+
return D(t.Provider,{value:i,children:n})}function O(){return Y(k())?.strings??F}function W(){return Y(k())?.locale??"en"}export{F as DEFAULT_EASEL_STRINGS,K as EaselStringsProvider,H as mergeEaselStrings,W as useEaselLocale,O as useEaselStrings};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import{DEFAULT_TEXT_STYLES_WORDS as e}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import{
|
|
1
|
+
import{DEFAULT_TEXT_STYLES_WORDS as e}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import{FieldSlider as s}from"../chunk-XWFH2NHZ.js";import{hexReadout as t,ColourWindow as a,typedHex as n}from"../chunk-U6LJ5UKD.js";import"../chunk-OFBZOI6W.js";import{TEXT_STYLE_KINDS as l,canAddTextStyle as i,TEXT_STYLE_MAX as r,isDefaultTextStyle as o,CAMPAIGN_TEXT_STYLE_SETTINGS as d,TEXT_STYLE_SETTINGS as c,textStyleRowSize as u,describeTextStyle as m,updateTextStyle as h,textStyleCaseCss as f,TEXT_STYLE_CASES as p,addTextStyle as v,removeTextStyle as y,TEXT_STYLE_RANGES as S}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-G3GWAP5R.js";import"../chunk-WRFD4EXD.js";import{useWords as b}from"../chunk-MFIRYGHW.js";import{withTip as k}from"../chunk-P2VEMZH5.js";import{hsvToHex as N,Tooltip as C,ColorSwatch as x,IconButton as T}from"efficient-shell/ui";import{useState as w,useRef as z,useId as E,useEffect as O,Fragment as _}from"react";import{TrashIcon as L,ChevronIcon as A,BoldIcon as j,ItalicIcon as M,CaseLowerIcon as W,CaseCapitalizedIcon as $,CaseUpperIcon as D,CaseNormalIcon as X}from"efficient-shell/icons/efficient";import{jsxs as Y,jsx as I,Fragment as F}from"react/jsx-runtime";var G=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>N({h:e,s:1,v:1})).join(", ")})`;function H({value:e,hex:s,colours:n,label:l,followsWord:i,anyWord:r,onChange:o,readOnly:d=!1}){const[c,u]=w(!1),m=z(null),h=z(null),f=E(),p=void 0!==e&&n.some(s=>s.key===e),v=void 0!==e&&!p;return O(()=>{if(!c)return;const e=m.current?.ownerDocument;if(!e)return;const s=e=>{m.current&&!m.current.contains(e.target)&&u(!1)};return e.addEventListener("click",s,!0),()=>e.removeEventListener("click",s,!0)},[c]),/* @__PURE__ */Y("div",{ref:m,className:"es-ts-set","data-ts-setting":"color",children:[
|
|
2
2
|
/* @__PURE__ */Y("div",{className:"es-ts-top",children:[
|
|
3
3
|
/* @__PURE__ */I("span",{className:"es-ts-sub",children:l}),
|
|
4
|
-
/* @__PURE__ */I("span",{className:"es-ts-colour-read",children:
|
|
5
|
-
/* @__PURE__ */Y("div",{className:"es-ts-swatches",role:"group","aria-label":l,children:[n.map(
|
|
6
|
-
/* @__PURE__ */I(C,{content:r,children:/* @__PURE__ */I(x,{ref:h,color:G,size:"sm",className:"es-ts-swatch es-ts-swatch--any","aria-label":r,selected:v,"aria-expanded":c,"aria-controls":c?f:void 0,disabled:d,onClick:()=>u(e=>!e)})})]}),c?/* @__PURE__ */I(
|
|
7
|
-
return I("div",{className:"es-ts",ref:X,children:
|
|
8
|
-
return Y(R,{label:A.groups[e],children:[
|
|
9
|
-
return I(B,{style:e,fonts:a,colours:n,settings:
|
|
4
|
+
/* @__PURE__ */I("span",{className:"es-ts-colour-read",children:s?t(s):i})]}),
|
|
5
|
+
/* @__PURE__ */Y("div",{className:"es-ts-swatches",role:"group","aria-label":l,children:[n.map(s=>/* @__PURE__ */I(C,{content:`${s.name} · ${t(s.value)}`,children:/* @__PURE__ */I(x,{color:s.value,size:"sm",className:"es-ts-swatch","aria-label":s.name,selected:e===s.key,disabled:d,onClick:()=>o(s.key)})},s.key)),
|
|
6
|
+
/* @__PURE__ */I(C,{content:r,children:/* @__PURE__ */I(x,{ref:h,color:G,size:"sm",className:"es-ts-swatch es-ts-swatch--any","aria-label":r,selected:v,"aria-expanded":c,"aria-controls":c?f:void 0,disabled:d,onClick:()=>u(e=>!e)})})]}),c?/* @__PURE__ */I(a,{id:f,value:s??"",onChange:e=>o(e),label:l,readOnly:d,onClose:()=>{u(!1),h.current?.focus()}}):null]})}function P({styles:s,onChange:t,fonts:a,colours:n=[],settings:c=d,auto:u=[],fallback:m,sample:h,openId:f,defaultOpenId:p=null,onOpenChange:S,onAdd:g,rowActions:N,onRemove:C,max:x=r,device:T="desktop",readOnly:_=!1}){const A=b("textStyles",e),j=E(),[M,W]=w(p),$=void 0!==f?f:M,D=e=>{void 0===f&&W(e),S?.(e)},X=z(null),[G,H]=w(null);O(()=>{if(!G||!X.current)return;const e=[...X.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===G.id),s=e?e.querySelector(".es-ts-row"):X.current.querySelector(`.es-ts-add[data-ts-kind="${G.kind}"]`);s?.focus(),H(null)},[G]);/* @__PURE__ */
|
|
7
|
+
return I("div",{className:"es-ts",ref:X,children:l.map(e=>{const l=s.filter(s=>s.kind===e),r=!i(s,e,x),d=!_&&!r;/* @__PURE__ */
|
|
8
|
+
return Y(R,{label:A.groups[e],children:[l.map(e=>{const l=N?.(e),i=null!=l&&!1!==l,r=Boolean(C)&&!_&&!o(e);/* @__PURE__ */
|
|
9
|
+
return I(B,{style:e,fonts:a,colours:n,settings:c,auto:u,fallback:m,sample:h,device:T,readOnly:_,open:$===e.id,onOpenChange:s=>D(s?e.id:null),onChange:e=>t(s.map(s=>s.id===e.id?e:s)),actions:r||i?/* @__PURE__ */Y(F,{children:[r?k(A.remove,/* @__PURE__ */I("button",{type:"button",className:"es-ts-del","aria-label":A.removeNamed({name:e.name}),onClick:()=>(e=>{if(_||!C)return;const a=y(s,e.id,{name:A.styleName});if(!a)return;const n=s.filter(s=>s.kind===e.kind),l=n[n.indexOf(e)+1];$===e.id&&D(null),t(a.styles),C(a.removed),H({id:l?.id??null,kind:e.kind})})(e),children:/* @__PURE__ */I(L,{size:14,"aria-hidden":"true"})})):null,i?l:null]}):null},e.id)}),k(!_&&r?A.full({kind:e,max:x}):void 0,/* @__PURE__ */Y("button",{type:"button",className:"es-ts-add","data-ts-kind":e,disabled:_,"aria-disabled":!(_||!r)||void 0,"aria-describedby":!_&&r?`${j}-full-${e}`:void 0,onClick:()=>{d&&(e=>{if(_)return;const a=v(s,e,{max:x,name:A.styleName,make:g});a&&t(a.styles)})(e)},children:[
|
|
10
10
|
/* @__PURE__ */I("span",{className:"es-ts-add-word",children:A.add[e]}),
|
|
11
|
-
/* @__PURE__ */I("span",{className:"es-ts-count",children:A.count({n:
|
|
11
|
+
/* @__PURE__ */I("span",{className:"es-ts-count",children:A.count({n:l.length,max:x})})]})),_||!r?null:/* @__PURE__ */I("span",{id:`${j}-full-${e}`,className:"es-vh",children:A.full({kind:e,max:x})})]},e)})})}function R({label:e,children:s}){const t=E();/* @__PURE__ */
|
|
12
12
|
return Y("section",{className:"es-ts-section","aria-labelledby":t,children:[
|
|
13
|
-
/* @__PURE__ */I("div",{className:"es-ts-group",id:t,children:e}),s]})}function B({style:s,fonts:t,colours:a=[],settings:n=
|
|
13
|
+
/* @__PURE__ */I("div",{className:"es-ts-group",id:t,children:e}),s]})}function B({style:s,fonts:t,colours:a=[],settings:n=d,auto:l=[],fallback:i,sample:r,open:o,onOpenChange:f,onChange:p,actions:v,device:y="desktop",readOnly:S=!1}){const g=b("textStyles",e),k=`${E()}-open-${s.id}`,N=new Set(l),C=c.filter(e=>n.includes(e)),x={...i?.(s)??{},...s.values},T="phone"===y,w=T&&void 0!==s.values.sizePhone?{...x,size:s.values.sizePhone}:x,z=t.find(e=>e.value===x.font),O={fontFamily:z?.family,fontSize:`${u(w.size??16)}px`,fontWeight:x.weight,fontStyle:x.italic?"italic":void 0};/* @__PURE__ */
|
|
14
14
|
return Y(_,{children:[
|
|
15
15
|
/* @__PURE__ */Y("div",{className:"es-ts-item","data-ts-id":s.id,children:[
|
|
16
|
-
/* @__PURE__ */Y("button",{type:"button",className:"es-ts-row","aria-expanded":o,"aria-controls":o?
|
|
16
|
+
/* @__PURE__ */Y("button",{type:"button",className:"es-ts-row","aria-expanded":o,"aria-controls":o?k:void 0,onClick:()=>f(!o),children:[
|
|
17
17
|
/* @__PURE__ */I("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */I(A,{size:12})}),
|
|
18
18
|
/* @__PURE__ */I("span",{className:"es-ts-name",style:O,children:s.name}),
|
|
19
|
-
/* @__PURE__ */I("span",{className:"es-ts-meta",children:
|
|
20
|
-
return I("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */I(
|
|
19
|
+
/* @__PURE__ */I("span",{className:"es-ts-meta",children:m(w,t,g,{autoSize:N.has("size")&&w===x&&void 0===s.values.size})})]}),v?/* @__PURE__ */I("div",{className:"es-ts-actions",children:v}):null]}),o?/* @__PURE__ */I("div",{className:"es-ts-open",id:k,children:/* @__PURE__ */I(Z,{style:s,values:x,fonts:t,colours:a,settings:C,autoSet:N,sample:r??g.sample,words:g,phone:T,readOnly:S,set:e=>p(h([s],s.id,e)[0])})}):null]})}var U={none:X,upper:D,capitalize:$,lower:W};function Z({style:e,values:t,fonts:a,colours:l,settings:i,autoSet:r,sample:o,words:d,phone:c,readOnly:u,set:m}){const h=e.values,p=a.find(e=>e.value===t.font),v=function(e,s){return e?s.find(s=>s.key===e)?.value??n(e)??void 0:void 0}(t.color,l),y=e=>"largestSize"===e||r.has(e),g=e=>y(e)?h[e]:t[e],b=g("size"),N=c&&void 0!==h.sizePhone?h.sizePhone:b,C=g("lineSpacing"),x=g("letterSpacing"),w=y("letterCase")?h.letterCase:t.letterCase,z={fontFamily:p?.family,fontSize:void 0===N?void 0:`${N}px`,fontWeight:t.weight,fontStyle:t.italic?"italic":void 0,lineHeight:void 0===C?void 0:String(C/100),letterSpacing:void 0===x?void 0:`${x}px`,color:v,textTransform:f(w)},E=e=>{const a=S[e],n=y(e);/* @__PURE__ */
|
|
20
|
+
return I("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */I(s,{label:d.settings[e],value:h[e],onChange:s=>m({[e]:s}),min:a.min,max:a.max,step:a.step,shiftStep:a.shiftStep,sliderMin:a.sliderMin,sliderMax:a.sliderMax,unit:a.unit||void 0,styleValue:n?void 0:t[e],auto:n?d.auto:void 0,readOnly:u})},e)};/* @__PURE__ */
|
|
21
21
|
return Y(F,{children:[
|
|
22
|
-
/* @__PURE__ */I("div",{className:"es-ts-preview",style:z,"aria-label":
|
|
23
|
-
return I(q,{value:
|
|
24
|
-
return I(K,{value:
|
|
25
|
-
return Y("div",{className:"es-ts-set","data-ts-setting":
|
|
26
|
-
/* @__PURE__ */I("span",{className:"es-ts-sub",children:
|
|
27
|
-
/* @__PURE__ */Y("div",{className:"es-ts-icons",children:[
|
|
28
|
-
return I(V,{value:
|
|
29
|
-
return I("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */I(
|
|
22
|
+
/* @__PURE__ */I("div",{className:"es-ts-preview",style:z,"aria-label":d.preview,children:o}),i.map(n=>{switch(n){case"font":/* @__PURE__ */
|
|
23
|
+
return I(q,{value:h.font,fonts:a,words:d,readOnly:u,set:m},n);case"color":/* @__PURE__ */
|
|
24
|
+
return I(K,{value:h.color,hex:v,colours:l,words:d,readOnly:u,set:m},n);case"emphasis":{const e=(t.weight??400)>=600,s=!1!==p?.italic;/* @__PURE__ */
|
|
25
|
+
return Y("div",{className:"es-ts-set","data-ts-setting":n,children:[
|
|
26
|
+
/* @__PURE__ */I("span",{className:"es-ts-sub",children:d.settings.emphasis}),
|
|
27
|
+
/* @__PURE__ */Y("div",{className:"es-ts-icons",children:[k(d.bold,/* @__PURE__ */I(T,{className:"es-ts-icon","aria-label":d.bold,"aria-pressed":e,disabled:u,onClick:()=>m({weight:e?400:700}),children:/* @__PURE__ */I(j,{size:16})})),u||s?k(d.italic,/* @__PURE__ */I(T,{className:"es-ts-icon","aria-label":d.italic,"aria-pressed":Boolean(t.italic),disabled:u,onClick:()=>m({italic:!t.italic||void 0}),children:/* @__PURE__ */I(M,{size:16})})):/* @__PURE__ */I(T,{className:"es-ts-icon","aria-label":d.italic,"aria-pressed":Boolean(t.italic),"aria-disabled":!0,disabledReason:d.italicMissing,children:/* @__PURE__ */I(M,{size:16})})]})]},n)}case"letterCase":/* @__PURE__ */
|
|
28
|
+
return I(V,{value:h.letterCase??t.letterCase,auto:y("letterCase"),words:d,readOnly:u,set:m},n);case"largestSize":return"heading"===e.kind?E(n):null;case"size":return c?(()=>{const e=S.size;/* @__PURE__ */
|
|
29
|
+
return I("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */I(s,{label:d.settings.size,value:h.sizePhone,onChange:e=>m({sizePhone:e}),min:e.min,max:e.max,step:e.step,shiftStep:e.shiftStep,sliderMin:e.sliderMin,sliderMax:e.sliderMax,unit:e.unit||void 0,styleValue:b,readOnly:u})},"size")})():E(n);default:return E(n)}})]})}function q({value:e,fonts:s,words:t,readOnly:a,set:n}){const l=E();/* @__PURE__ */
|
|
30
30
|
return Y("div",{className:"es-ts-set","data-ts-setting":"font",children:[
|
|
31
31
|
/* @__PURE__ */I("span",{className:"es-ts-sub",id:l,children:t.settings.font}),
|
|
32
|
-
/* @__PURE__ */I(
|
|
33
|
-
return I(H,{value:e,hex:s,colours:t,label:a.settings.color,followsWord:a.colour.follows,anyWord:a.colour.any,readOnly:n,onChange:e=>l({color:e})})}function V({value:e,auto:s,words:t,readOnly:a,set:n}){const
|
|
32
|
+
/* @__PURE__ */I(g,{value:e,options:s.map(e=>({label:e.label,value:e.value})),onChange:e=>n({font:e}),ariaLabelledBy:l,readOnly:a})]})}function K({value:e,hex:s,colours:t,words:a,readOnly:n,set:l}){/* @__PURE__ */
|
|
33
|
+
return I(H,{value:e,hex:s,colours:t,label:a.settings.color,followsWord:a.colour.follows,anyWord:a.colour.any,readOnly:n,onChange:e=>l({color:e})})}function V({value:e,auto:s,words:t,readOnly:a,set:n}){const l=s?["auto",...p]:p,i=e??(s?"auto":"none"),r=z([]),o=e=>n({letterCase:"auto"===e?void 0:e});/* @__PURE__ */
|
|
34
34
|
return Y("div",{className:"es-ts-set","data-ts-setting":"letterCase",children:[
|
|
35
35
|
/* @__PURE__ */I("span",{className:"es-ts-sub",children:t.settings.letterCase}),
|
|
36
|
-
/* @__PURE__ */I("div",{className:"es-ts-icons",role:"radiogroup","aria-label":t.settings.letterCase,onKeyDown:e=>{const s="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!s||a)return;e.preventDefault();const t=(
|
|
36
|
+
/* @__PURE__ */I("div",{className:"es-ts-icons",role:"radiogroup","aria-label":t.settings.letterCase,onKeyDown:e=>{const s="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!s||a)return;e.preventDefault();const t=(l.indexOf(i)+s+l.length)%l.length;o(l[t]),r.current[t]?.focus()},children:l.map((e,s)=>{const n=e===i;if("auto"===e)return k(t.case.autoTitle,/* @__PURE__ */I(T,{ref:e=>{r.current[s]=e},role:"radio",pressed:n,className:"es-ts-icon es-ts-icon--word","aria-checked":n,"aria-label":t.case.auto,tabIndex:n?0:-1,disabled:a,onClick:()=>o(e),children:t.case.auto},e));const l=U[e];return k(t.case[e],/* @__PURE__ */I(T,{ref:e=>{r.current[s]=e},role:"radio",pressed:n,className:"es-ts-icon","aria-checked":n,"aria-label":t.case[e],tabIndex:n?0:-1,disabled:a,onClick:()=>o(e),children:/* @__PURE__ */I(l,{size:16})},e))})})]})}export{H as ColourSwatchRow,B as TextStyleItem,R as TextStylesGroup,P as TextStylesList};
|
package/dist/tree/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { L as LayersTreeProps, S as SubtreeProps, a as TreeGroupLabelProps, b as TreeEmptySlotProps, c as TreeRowProps, d as TreeRowActionProps, e as TreeSeamProps } from '../types-
|
|
3
|
-
export { f as TreeRowFold, T as TreeRowMark } from '../types-
|
|
2
|
+
import { L as LayersTreeProps, S as SubtreeProps, a as TreeGroupLabelProps, b as TreeEmptySlotProps, c as TreeRowProps, d as TreeRowActionProps, e as TreeSeamProps } from '../types-Bqq6ya0y.js';
|
|
3
|
+
export { f as TreeRowFold, T as TreeRowMark } from '../types-Bqq6ya0y.js';
|
|
4
4
|
export { T as TreeWords } from '../words-Cl9xMUYY.js';
|
|
5
5
|
import 'efficient-shell/ui';
|
|
6
6
|
|
|
@@ -53,7 +53,7 @@ declare const TREE_DRAG_HINT: string;
|
|
|
53
53
|
* selected wherever the old name button did not) is selected by that onClick
|
|
54
54
|
* alone on a click, and by `onSelect` from the keyboard (Enter, Space).
|
|
55
55
|
*/
|
|
56
|
-
declare function TreeRow({ icon, name, preview, selected, hidden, draggable, dragHint, dragging, drop, fold, actions, nameSlot, onSelect, marks, badge, trailing, children, rowProps, level, words, }: TreeRowProps): react.JSX.Element;
|
|
56
|
+
declare function TreeRow({ icon, name, preview, selected, hidden, draggable, dragHint, dragging, drop, fold, actions, nameSlot, onSelect, marks, badge, trailing, shared, children, rowProps, level, words, }: TreeRowProps): react.JSX.Element;
|
|
57
57
|
/**
|
|
58
58
|
* An action over the end of a row's name — delete (the danger tone) or show /
|
|
59
59
|
* hide, or any other: the shell's `IconButton` with its `Tooltip`. Pressing it
|
package/dist/tree/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{LayersTree,Subtree,TREE_DRAG_HINT,TreeEmptySlot,TreeGroupLabel,TreeRow,TreeRowAction,TreeSeam}from"../chunk-
|
|
1
|
+
export{LayersTree,Subtree,TREE_DRAG_HINT,TreeEmptySlot,TreeGroupLabel,TreeRow,TreeRowAction,TreeSeam}from"../chunk-A6Z4SD3I.js";import"../chunk-K56YDHYQ.js";
|
package/dist/tree/tree.css
CHANGED
|
@@ -55,6 +55,23 @@
|
|
|
55
55
|
height: 13px;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
/* ── A shared row (Shared section design v4, Lewis 2026-10-21) ──────────────
|
|
59
|
+
Its mark holds the row's end; the row's own actions show before it only on
|
|
60
|
+
hover, focus or a hidden row — at rest, selected or not, the mark alone (the
|
|
61
|
+
design's selected row; at 220px they would cut the name to a letter). The
|
|
62
|
+
tone and the mark are the shell's (TreeRow `tone`, `SharedIcon`). */
|
|
63
|
+
.es-tree-row:not(:hover):not(:focus-within):not(.is-hidden) .es-tree-shared-acts {
|
|
64
|
+
display: none;
|
|
65
|
+
}
|
|
66
|
+
.es-tree-shared-acts,
|
|
67
|
+
.es-tree-shared-mark {
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
}
|
|
71
|
+
.es-tree-shared-mark {
|
|
72
|
+
padding: 0 4px;
|
|
73
|
+
}
|
|
74
|
+
|
|
58
75
|
/* A rename box stands in for the name. It must not move the row by a pixel:
|
|
59
76
|
the name's own font, no border, no padding of its own. */
|
|
60
77
|
.es-tree-rename {
|
|
@@ -88,6 +88,15 @@ type TreeRowProps = {
|
|
|
88
88
|
label: string;
|
|
89
89
|
icon: ReactNode;
|
|
90
90
|
};
|
|
91
|
+
/**
|
|
92
|
+
* SHARED (Shared section design v4, Lewis 2026-10-21): the row's thing is
|
|
93
|
+
* used live on many pages, and these are the words for how far — "On every
|
|
94
|
+
* page", "On 3 pages". The row is drawn in the shell's shared tone (green),
|
|
95
|
+
* with the shell's `shared` mark held at its end, these words its Tooltip and
|
|
96
|
+
* accessible name. The row's `actions` stay, shown before the mark on hover
|
|
97
|
+
* or focus. Absent: the row is drawn as before.
|
|
98
|
+
*/
|
|
99
|
+
shared?: string;
|
|
91
100
|
/** Drawn after the name, the marks and `trailing` — a count, say. The drop line is the row's own (`drop`). */
|
|
92
101
|
children?: ReactNode;
|
|
93
102
|
/** The depth, from 1 (`aria-level`). Left out: the nearest `Subtree`'s, counted. */
|
|
@@ -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-CZS902DV.js';
|
|
3
3
|
import { D as Data, S as SlotAddress, a as DataConfig, N as Node } from './types-41704JE4.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -88,4 +88,4 @@ interface EaselRailButtonProps {
|
|
|
88
88
|
tooltipSide?: 'top' | 'bottom' | 'left' | 'right';
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
export type {
|
|
91
|
+
export type { EaselRailItem as E, EaselRailProps as a, EaselRailButtonProps as b, EaselRailOrientation as c };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as EaselRailItem } from './types-Cy7rdmXt.js';
|
|
2
2
|
import { ReactNode, Ref, CSSProperties } from 'react';
|
|
3
3
|
import { EditAccess, SaveConflict } from './edit-lock/index.js';
|
|
4
4
|
import { P as PanelSide } from './panelWidths-D9hTLR25.js';
|
|
@@ -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-CZS902DV.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The node clipboard — what Copy and Cut hold, and Paste reads.
|
|
@@ -62,6 +62,8 @@ declare function useNodeOps(host: NodeOpsHost): {
|
|
|
62
62
|
paste: (at: Place) => boolean;
|
|
63
63
|
/** Put back exactly what a delete took, at its place, selected (`planRestore`). */
|
|
64
64
|
restore: (node: Node, at: Place) => boolean;
|
|
65
|
+
/** Put `node` where `id` stands, selected, in one step (`planSwap`). */
|
|
66
|
+
swap: (id: string, node: Node) => boolean;
|
|
65
67
|
/** Where "up one level" goes from `selection`, or null when there is nothing above. */
|
|
66
68
|
parentOf: (selection: NodeSelection) => NodeSelection;
|
|
67
69
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as SaveTone } from './types-
|
|
1
|
+
import { S as SaveTone } from './types-DT8ywrFQ.js';
|
|
2
2
|
import { A as AutosaveSnapshot } from './engine-CvXpFE86.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -56,4 +56,4 @@ type SaveWords = {
|
|
|
56
56
|
*/
|
|
57
57
|
declare function saveIndicator(state: AutosaveSnapshot, words?: SaveWords): SaveIndicator;
|
|
58
58
|
|
|
59
|
-
export { type
|
|
59
|
+
export { type SaveIndicator as S, type SaveWords as a, saveIndicator as s };
|