efficient-easel 0.99.1 → 0.99.2
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 +55 -26
- package/dist/autosave/index.d.ts +5 -5
- package/dist/blocks/index.d.ts +2 -2
- package/dist/canvas/index.d.ts +3 -3
- package/dist/chrome/index.d.ts +13 -9
- package/dist/chrome/index.js +9 -9
- package/dist/chunk-672FAEKU.js +1 -0
- package/dist/chunk-7JTL3P6P.js +1 -0
- package/dist/chunk-F2PIG3AA.js +10 -0
- package/dist/chunk-XUE5O62R.js +3 -0
- package/dist/copy/index.d.ts +5 -5
- package/dist/data/index.d.ts +4 -4
- package/dist/drag/index.d.ts +4 -4
- package/dist/{editor/editor.css → easel/easel.css} +1 -1
- package/dist/easel/index.d.ts +385 -0
- package/dist/easel/index.js +1 -0
- package/dist/edit-lock/index.d.ts +5 -3
- package/dist/edit-lock/index.js +1 -1
- package/dist/editor/index.d.ts +9 -360
- package/dist/editor/index.js +1 -9
- package/dist/fields/index.d.ts +4 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/menu/index.d.ts +8 -6
- package/dist/menu/index.js +4 -4
- package/dist/node-ops/index.d.ts +9 -9
- package/dist/panel/index.d.ts +1 -1
- package/dist/pick/index.d.ts +3 -3
- package/dist/rail/index.d.ts +10 -6
- package/dist/rail/index.js +1 -1
- package/dist/rail/rail.css +1 -1
- package/dist/strings/catalogue.d.ts +23 -17
- package/dist/strings/catalogue.js +1 -1
- package/dist/strings/index.d.ts +28 -20
- package/dist/strings/index.js +2 -2
- package/dist/style-clipboard/index.d.ts +5 -5
- package/dist/tree/index.d.ts +2 -2
- package/dist/{types-Dy6oR6Z2.d.ts → types-BOSGNvil.d.ts} +26 -14
- package/dist/{types-DNrn_w4V.d.ts → types-Bs_gVkVI.d.ts} +18 -10
- package/dist/{types-pGBXevBU.d.ts → types-DO-b0LNj.d.ts} +13 -7
- package/dist/{types-CnRzp9oc.d.ts → types-p9j2Fac7.d.ts} +11 -9
- package/dist/{watch-DmasQA61.d.ts → watch-B5RTR-WX.d.ts} +1 -1
- package/dist/{wordFit-9B9nqyf3.d.ts → wordFit-D4S36PvB.d.ts} +1 -1
- package/dist/{words-D9ChvbNC.d.ts → words-BDignMl_.d.ts} +1 -1
- package/dist/{words-bOMsUJk9.d.ts → words-C74EUpFr.d.ts} +2 -2
- package/dist/{words-B2YLaKEr.d.ts → words-CnnHb9jo.d.ts} +1 -1
- package/dist/{words-DOhF-4D4.d.ts → words-DMG4dYq2.d.ts} +1 -1
- package/dist/{words-BK-npta-.d.ts → words-N4ebT88_.d.ts} +1 -1
- package/dist/{words-Cqmyey0s.d.ts → words-c-3h9xQQ.d.ts} +2 -2
- package/dist/{words-B87GIFWH.d.ts → words-is_Vy6hn.d.ts} +1 -1
- package/package.json +9 -3
- package/dist/chunk-IBOFSS56.js +0 -3
- package/dist/chunk-JE63JHKO.js +0 -1
- package/dist/chunk-TDA4HH54.js +0 -1
- /package/dist/{chunk-OWBO4WKA.js → chunk-2PHD4L6A.js} +0 -0
- /package/dist/{chunk-GGTPNGFJ.js → chunk-AELNNAFM.js} +0 -0
package/dist/pick/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { P as PickWords } from '../words-
|
|
2
|
+
import { P as PickWords } from '../words-is_Vy6hn.js';
|
|
3
3
|
|
|
4
4
|
/** One colour the site's theme names — offered first, by name. */
|
|
5
5
|
type ThemeColour = {
|
|
@@ -29,7 +29,7 @@ type ColourPickerProps = {
|
|
|
29
29
|
readOnly?: boolean;
|
|
30
30
|
/**
|
|
31
31
|
* The picker's own words in the host's language:
|
|
32
|
-
* `
|
|
32
|
+
* `useEaselStrings().pick.colour` (0.95.0). Left out, English. A prop, not
|
|
33
33
|
* the strings provider: the pickers import nothing outside their folder.
|
|
34
34
|
*/
|
|
35
35
|
words?: PickWords['colour'];
|
|
@@ -75,7 +75,7 @@ type ImageBoxProps = {
|
|
|
75
75
|
readOnly?: boolean;
|
|
76
76
|
/**
|
|
77
77
|
* The box's own words in the host's language:
|
|
78
|
-
* `
|
|
78
|
+
* `useEaselStrings().pick.image` (0.95.0). Left out, English. A prop, not
|
|
79
79
|
* the strings provider: the pickers import nothing outside their folder.
|
|
80
80
|
*/
|
|
81
81
|
words?: PickWords['image'];
|
package/dist/rail/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { c as
|
|
3
|
-
export { a as
|
|
2
|
+
import { c as EaselRailProps, E as EaselRailButtonProps } from '../types-Bs_gVkVI.js';
|
|
3
|
+
export { a as EaselRailItem, b as EaselRailOrientation, d as EditorRailButtonProps, e as EditorRailItem, f as EditorRailOrientation, g as EditorRailProps } from '../types-Bs_gVkVI.js';
|
|
4
4
|
export { AddIcon, LayersIcon, MediaIcon, PageIcon as PagesIcon, IconProps as RailIconProps, SitemapIcon, StylesIcon } from '../icons/index.js';
|
|
5
|
-
export { W as WordFit } from '../wordFit-
|
|
5
|
+
export { W as WordFit } from '../wordFit-D4S36PvB.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* The shared icon-rail — one slim strip of icon buttons that every EFFICIENT
|
|
@@ -43,7 +43,9 @@ export { W as WordFit } from '../wordFit-9B9nqyf3.js';
|
|
|
43
43
|
* strings provider — that would be a hook — so a host in another language
|
|
44
44
|
* passes `ariaLabel`; `TopBarRail` does it from the provider.
|
|
45
45
|
*/
|
|
46
|
-
declare function
|
|
46
|
+
declare function EaselRail({ items, ariaLabel, className, orientation, wordFit, }: EaselRailProps): react.JSX.Element;
|
|
47
|
+
/** @deprecated The name before the Easel rename: `EaselRail`. */
|
|
48
|
+
declare const EditorRail: typeof EaselRail;
|
|
47
49
|
|
|
48
50
|
/**
|
|
49
51
|
* A single rail button: an icon in a 34×34 square that hovers, highlights when
|
|
@@ -53,7 +55,9 @@ declare function EditorRail({ items, ariaLabel, className, orientation, wordFit,
|
|
|
53
55
|
* toggle announces its pressed state while an action button (the quick-add "+",
|
|
54
56
|
* whose item omits `active`) stays a plain button rather than a stuck toggle.
|
|
55
57
|
*/
|
|
56
|
-
declare function
|
|
58
|
+
declare function EaselRailButton({ label, worded, icon, active, disabled, onSelect, className, }: EaselRailButtonProps): react.JSX.Element;
|
|
59
|
+
/** @deprecated The name before the Easel rename: `EaselRailButton`. */
|
|
60
|
+
declare const EditorRailButton: typeof EaselRailButton;
|
|
57
61
|
|
|
58
62
|
/**
|
|
59
63
|
* Rail design tokens — the ONE source both apps' rails converge on.
|
|
@@ -142,4 +146,4 @@ declare const railCssVars: {
|
|
|
142
146
|
readonly accentTint: "--es-rail-accent-tint";
|
|
143
147
|
};
|
|
144
148
|
|
|
145
|
-
export {
|
|
149
|
+
export { EaselRail, EaselRailButton, EaselRailButtonProps, EaselRailProps, EditorRail, EditorRailButton, type RailTokens, railCssVars, railTokens };
|
package/dist/rail/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-
|
|
1
|
+
import"../chunk-2PHD4L6A.js";export{EaselRail,EaselRailButton,EditorRail,EditorRailButton,railCssVars,railTokens}from"../chunk-XUE5O62R.js";import"../chunk-2OAZYSWJ.js";import"../chunk-BZ5ASXOL.js";export{AddIcon,LayersIcon,MediaIcon,PageIcon as PagesIcon,SitemapIcon,StylesIcon}from"../chunk-PI26YXYD.js";
|
package/dist/rail/rail.css
CHANGED
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
sheet only names the rail's chrome for it — the four inputs below — so a
|
|
136
136
|
re-padded rail button moves its thresholds with it.
|
|
137
137
|
|
|
138
|
-
`is-measured` is set by `
|
|
138
|
+
`is-measured` is set by `EaselRail` when it was handed the words' widths
|
|
139
139
|
(`TopBarRail` measures them). Without it, and without `panel.css`, the word
|
|
140
140
|
stays clipped to nothing: an icon-only rail always fits. */
|
|
141
141
|
.es-rail.es-rail-row.is-measured {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { S as SaveWords } from '../words-
|
|
1
|
+
import { S as SaveWords } from '../words-c-3h9xQQ.js';
|
|
2
2
|
import { N as NoticeWords, C as ChromeWords } from '../words-DagJdwIA.js';
|
|
3
|
-
import { C as CopyWords } from '../words-
|
|
4
|
-
import { D as DragWords } from '../words-
|
|
3
|
+
import { C as CopyWords } from '../words-C74EUpFr.js';
|
|
4
|
+
import { D as DragWords } from '../words-BDignMl_.js';
|
|
5
5
|
import { LockWords } from '../edit-lock/index.js';
|
|
6
6
|
import { F as FieldsWords } from '../words-CD3WADyb.js';
|
|
7
|
-
import { N as NodeMenuWords } from '../words-
|
|
7
|
+
import { N as NodeMenuWords } from '../words-DMG4dYq2.js';
|
|
8
8
|
import { S as SettingsBucket } from '../buckets-CuLM47h9.js';
|
|
9
|
-
import { P as PickWords } from '../words-
|
|
10
|
-
import { S as StyleClipboardWords } from '../words-
|
|
11
|
-
import { T as TreeWords } from '../words-
|
|
12
|
-
import '../types-
|
|
13
|
-
import '../types-
|
|
14
|
-
import '../wordFit-
|
|
9
|
+
import { P as PickWords } from '../words-is_Vy6hn.js';
|
|
10
|
+
import { S as StyleClipboardWords } from '../words-CnnHb9jo.js';
|
|
11
|
+
import { T as TreeWords } from '../words-N4ebT88_.js';
|
|
12
|
+
import '../types-p9j2Fac7.js';
|
|
13
|
+
import '../types-Bs_gVkVI.js';
|
|
14
|
+
import '../wordFit-D4S36PvB.js';
|
|
15
15
|
import 'react';
|
|
16
16
|
import '../markup/index.js';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* The
|
|
19
|
+
* The easel canvas's own words (`efficient-easel/strings`, 0.95.0). There is
|
|
20
20
|
* one: what the frame is called when the host does not name it (`title`).
|
|
21
21
|
*
|
|
22
22
|
* A plain module with no import.
|
|
@@ -79,7 +79,7 @@ type RailWords = {
|
|
|
79
79
|
* lane (`tests/*-leaf-safety`), and several are held to a bundle that never
|
|
80
80
|
* spells a browser global — while one sentence below does ("another tab or
|
|
81
81
|
* window"). So a module owns its group and its defaults, and this file only
|
|
82
|
-
* puts the groups side by side. `
|
|
82
|
+
* puts the groups side by side. `DEFAULT_EASEL_STRINGS.pick` IS the pickers'
|
|
83
83
|
* own default object, not a copy of it.
|
|
84
84
|
*
|
|
85
85
|
* ── Framework-free ────────────────────────────────────────────────────────
|
|
@@ -91,7 +91,7 @@ type RailWords = {
|
|
|
91
91
|
*/
|
|
92
92
|
|
|
93
93
|
/** Every word the engine says, by the module that says it. */
|
|
94
|
-
interface
|
|
94
|
+
interface EaselStrings {
|
|
95
95
|
/** `efficient-easel/chrome` — `EditNotice`: who holds the document, a refused save. */
|
|
96
96
|
notice: NoticeWords;
|
|
97
97
|
/** `efficient-easel/edit-lock` — "2 minutes ago", "Someone else". */
|
|
@@ -118,11 +118,11 @@ interface EditorStrings {
|
|
|
118
118
|
styleClipboard: StyleClipboardWords;
|
|
119
119
|
/** `efficient-easel/copy` — the formatting bar, alignment, the link window, each mark. */
|
|
120
120
|
copy: CopyWords;
|
|
121
|
-
/** `efficient-easel/
|
|
121
|
+
/** `efficient-easel/easel` — the canvas frame's name. */
|
|
122
122
|
canvas: CanvasWords;
|
|
123
123
|
}
|
|
124
124
|
/** Today's English, word for word. */
|
|
125
|
-
declare const
|
|
125
|
+
declare const DEFAULT_EASEL_STRINGS: EaselStrings;
|
|
126
126
|
/**
|
|
127
127
|
* A catalogue with any part left out. A function entry is taken whole or not
|
|
128
128
|
* at all: it has no "part" to leave out.
|
|
@@ -136,6 +136,12 @@ type DeepPartial<T> = T extends (...args: never[]) => unknown ? T : T extends ob
|
|
|
136
136
|
* that has translated half the catalogue shows the other half in English
|
|
137
137
|
* rather than as nothing. Neither argument is changed.
|
|
138
138
|
*/
|
|
139
|
-
declare function
|
|
139
|
+
declare function mergeEaselStrings(defaults: EaselStrings, partial?: DeepPartial<EaselStrings> | null): EaselStrings;
|
|
140
|
+
/** @deprecated The name before the Easel rename: `EaselStrings`. */
|
|
141
|
+
type EditorStrings = EaselStrings;
|
|
142
|
+
/** @deprecated The name before the Easel rename: `DEFAULT_EASEL_STRINGS`. */
|
|
143
|
+
declare const DEFAULT_EDITOR_STRINGS: EaselStrings;
|
|
144
|
+
/** @deprecated The name before the Easel rename: `mergeEaselStrings`. */
|
|
145
|
+
declare const mergeEditorStrings: typeof mergeEaselStrings;
|
|
140
146
|
|
|
141
|
-
export { type CanvasWords, ChromeWords, CopyWords, DEFAULT_EDITOR_STRINGS, type DeepPartial, DragWords, type EditorStrings, FieldsWords, LockWords, NodeMenuWords, NoticeWords, type PanelWords, PickWords, type RailWords, SaveWords, StyleClipboardWords, TreeWords, mergeEditorStrings };
|
|
147
|
+
export { type CanvasWords, ChromeWords, CopyWords, DEFAULT_EASEL_STRINGS, DEFAULT_EDITOR_STRINGS, type DeepPartial, DragWords, type EaselStrings, type EditorStrings, FieldsWords, LockWords, NodeMenuWords, NoticeWords, type PanelWords, PickWords, type RailWords, SaveWords, StyleClipboardWords, TreeWords, mergeEaselStrings, mergeEditorStrings };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DEFAULT_EDITOR_STRINGS,mergeEditorStrings}from"../chunk-
|
|
1
|
+
export{DEFAULT_EASEL_STRINGS,DEFAULT_EDITOR_STRINGS,mergeEaselStrings,mergeEditorStrings}from"../chunk-7JTL3P6P.js";import"../chunk-6WY6ZXJG.js";import"../chunk-WK3AFPXY.js";import"../chunk-ZAOM6PFH.js";import"../chunk-AELNNAFM.js";import"../chunk-SUO5627P.js";import"../chunk-H4B72XCJ.js";import"../chunk-7A7O2JWQ.js";import"../chunk-H6DDIBQ4.js";import"../chunk-KDIVA6WD.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-ZT7M24XD.js";import"../chunk-SJQG5ENJ.js";import"../chunk-O2NLQBFX.js";
|
package/dist/strings/index.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { DeepPartial,
|
|
2
|
-
export { CanvasWords, DEFAULT_EDITOR_STRINGS, PanelWords, RailWords, mergeEditorStrings } from './catalogue.js';
|
|
1
|
+
import { DeepPartial, EaselStrings } from './catalogue.js';
|
|
2
|
+
export { CanvasWords, DEFAULT_EASEL_STRINGS, DEFAULT_EDITOR_STRINGS, EditorStrings, PanelWords, RailWords, mergeEaselStrings, mergeEditorStrings } from './catalogue.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
export { C as ChromeWords, N as NoticeWords } from '../words-DagJdwIA.js';
|
|
6
|
-
export { C as CopyWords } from '../words-
|
|
7
|
-
export { D as DragWords } from '../words-
|
|
6
|
+
export { C as CopyWords } from '../words-C74EUpFr.js';
|
|
7
|
+
export { D as DragWords } from '../words-BDignMl_.js';
|
|
8
8
|
export { F as FieldsWords } from '../words-CD3WADyb.js';
|
|
9
9
|
export { LockWords } from '../edit-lock/index.js';
|
|
10
|
-
export { N as NodeMenuWords } from '../words-
|
|
11
|
-
export { P as PickWords } from '../words-
|
|
12
|
-
export { S as SaveWords } from '../words-
|
|
13
|
-
export { S as StyleClipboardWords } from '../words-
|
|
14
|
-
export { T as TreeWords } from '../words-
|
|
10
|
+
export { N as NodeMenuWords } from '../words-DMG4dYq2.js';
|
|
11
|
+
export { P as PickWords } from '../words-is_Vy6hn.js';
|
|
12
|
+
export { S as SaveWords } from '../words-c-3h9xQQ.js';
|
|
13
|
+
export { S as StyleClipboardWords } from '../words-CnnHb9jo.js';
|
|
14
|
+
export { T as TreeWords } from '../words-N4ebT88_.js';
|
|
15
15
|
import '../buckets-CuLM47h9.js';
|
|
16
16
|
import '../markup/index.js';
|
|
17
|
-
import '../types-
|
|
18
|
-
import '../types-
|
|
19
|
-
import '../wordFit-
|
|
17
|
+
import '../types-p9j2Fac7.js';
|
|
18
|
+
import '../types-Bs_gVkVI.js';
|
|
19
|
+
import '../wordFit-D4S36PvB.js';
|
|
20
20
|
|
|
21
|
-
interface
|
|
21
|
+
interface EaselStringsProviderProps {
|
|
22
22
|
/**
|
|
23
23
|
* The host's words, laid over the ones in reach — the engine's English, or an
|
|
24
24
|
* outer provider's. Anything left out keeps what was there.
|
|
@@ -27,10 +27,10 @@ interface EditorStringsProviderProps {
|
|
|
27
27
|
* a `useMemo`): a new object every render is a new catalogue every render,
|
|
28
28
|
* and everything that reads it draws again.
|
|
29
29
|
*/
|
|
30
|
-
value?: DeepPartial<
|
|
30
|
+
value?: DeepPartial<EaselStrings>;
|
|
31
31
|
/**
|
|
32
32
|
* The language those words are in, as a BCP 47 tag (`'de'`, `'zh-Hant'`). The
|
|
33
|
-
* engine does not read it; `
|
|
33
|
+
* engine does not read it; `useEaselLocale()` hands it to a host's blocks and
|
|
34
34
|
* fields, so a number or a date drawn in the editor follows the same language.
|
|
35
35
|
* Left out: an outer provider's, else `'en'`.
|
|
36
36
|
*/
|
|
@@ -45,12 +45,20 @@ interface EditorStringsProviderProps {
|
|
|
45
45
|
* primitives, the Layers tree, the pickers, the Add panel, the canvas layer —
|
|
46
46
|
* and neither do the plain functions (`editNotice`, `saveIndicator`,
|
|
47
47
|
* `nodeMenuItems`, …). Each takes its group as a prop or an argument instead;
|
|
48
|
-
* a host hands it `
|
|
48
|
+
* a host hands it `useEaselStrings()`'s.
|
|
49
49
|
*/
|
|
50
|
-
declare function
|
|
50
|
+
declare function EaselStringsProvider({ value, locale, children }: EaselStringsProviderProps): react.JSX.Element;
|
|
51
51
|
/** The whole catalogue: the nearest provider's, or the engine's English. */
|
|
52
|
-
declare function
|
|
52
|
+
declare function useEaselStrings(): EaselStrings;
|
|
53
53
|
/** The nearest provider's locale, or `'en'`. */
|
|
54
|
-
declare function
|
|
54
|
+
declare function useEaselLocale(): string;
|
|
55
|
+
/** @deprecated The name before the Easel rename: `EaselStringsProviderProps`. */
|
|
56
|
+
type EditorStringsProviderProps = EaselStringsProviderProps;
|
|
57
|
+
/** @deprecated The name before the Easel rename: `EaselStringsProvider`. */
|
|
58
|
+
declare const EditorStringsProvider: typeof EaselStringsProvider;
|
|
59
|
+
/** @deprecated The name before the Easel rename: `useEaselStrings`. */
|
|
60
|
+
declare const useEditorStrings: typeof useEaselStrings;
|
|
61
|
+
/** @deprecated The name before the Easel rename: `useEaselLocale`. */
|
|
62
|
+
declare const useEditorLocale: typeof useEaselLocale;
|
|
55
63
|
|
|
56
|
-
export { DeepPartial,
|
|
64
|
+
export { DeepPartial, EaselStrings, EaselStringsProvider, type EaselStringsProviderProps, EditorStringsProvider, type EditorStringsProviderProps, useEaselLocale, useEaselStrings, useEditorLocale, useEditorStrings };
|
package/dist/strings/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return c(e.Provider,{value:k,children:
|
|
1
|
+
import{DEFAULT_EASEL_STRINGS as r,mergeEaselStrings as n}from"../chunk-7JTL3P6P.js";export{DEFAULT_EASEL_STRINGS,DEFAULT_EDITOR_STRINGS,mergeEaselStrings,mergeEditorStrings}from"../chunk-7JTL3P6P.js";import"../chunk-6WY6ZXJG.js";import"../chunk-WK3AFPXY.js";import"../chunk-ZAOM6PFH.js";import"../chunk-AELNNAFM.js";import"../chunk-SUO5627P.js";import"../chunk-H4B72XCJ.js";import"../chunk-7A7O2JWQ.js";import"../chunk-H6DDIBQ4.js";import"../chunk-KDIVA6WD.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-ZT7M24XD.js";import"../chunk-SJQG5ENJ.js";import{stringsContext as t}from"../chunk-MFIRYGHW.js";import"../chunk-O2NLQBFX.js";import{useContext as o,useMemo as i}from"react";import{jsx as c}from"react/jsx-runtime";function s({value:s,locale:m,children:u}){const e=t(),p=o(e),h=p?.strings??r,j=m??p?.locale??"en",k=i(()=>({strings:n(h,s),locale:j}),[h,s,j]);/* @__PURE__ */
|
|
2
|
+
return c(e.Provider,{value:k,children:u})}function m(){return o(t())?.strings??r}function u(){return o(t())?.locale??"en"}var e=s,p=m,h=u;export{s as EaselStringsProvider,e as EditorStringsProvider,u as useEaselLocale,m as useEaselStrings,h as useEditorLocale,p as useEditorStrings};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as
|
|
2
|
-
import { S as StyleClipboardWords } from '../words-
|
|
1
|
+
import { E as EaselContextMenuItem } from '../types-DO-b0LNj.js';
|
|
2
|
+
import { S as StyleClipboardWords } from '../words-CnnHb9jo.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -143,7 +143,7 @@ declare function planPaste(snapshot: StyleSnapshot, target: {
|
|
|
143
143
|
}): PastePlan;
|
|
144
144
|
/** The words a merchant reads after a paste. One copy, so both editors say the
|
|
145
145
|
* same thing — including, plainly, when nothing matched. `words` is the host's
|
|
146
|
-
* language (`
|
|
146
|
+
* language (`useEaselStrings().styleClipboard`, 0.95.0); left out, English. */
|
|
147
147
|
declare function pasteMessage(plan: Pick<PastePlan, 'pasted'>, sourceLabel: string, targetLabel: string, words?: StyleClipboardWords): string;
|
|
148
148
|
/** The two shortcuts, as a menu draws them. */
|
|
149
149
|
declare const COPY_STYLE_SHORTCUT = "\u2325\u2318C";
|
|
@@ -161,9 +161,9 @@ declare function styleMenuItems(opts: {
|
|
|
161
161
|
canCopy: boolean;
|
|
162
162
|
onCopy: () => void;
|
|
163
163
|
onPaste: () => void;
|
|
164
|
-
/** The rows' words in the host's language (`
|
|
164
|
+
/** The rows' words in the host's language (`useEaselStrings().styleClipboard`, 0.95.0). Left out, English. */
|
|
165
165
|
words?: StyleClipboardWords;
|
|
166
|
-
}):
|
|
166
|
+
}): EaselContextMenuItem[];
|
|
167
167
|
/**
|
|
168
168
|
* Is this key press Copy style or Paste style?
|
|
169
169
|
*
|
package/dist/tree/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, HTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
3
|
-
import { T as TreeWords } from '../words-
|
|
3
|
+
import { T as TreeWords } from '../words-N4ebT88_.js';
|
|
4
4
|
|
|
5
5
|
type LayersTreeProps = {
|
|
6
6
|
/** Extra classes — a host's scroll-bar class, for instance. */
|
|
@@ -86,7 +86,7 @@ type TreeRowProps = {
|
|
|
86
86
|
rowProps?: HTMLAttributes<HTMLDivElement> & Record<`data-${string}`, string | number | undefined>;
|
|
87
87
|
/**
|
|
88
88
|
* The row's own words — the drag hint and the caret's — in the host's
|
|
89
|
-
* language: `
|
|
89
|
+
* language: `useEaselStrings().tree` (0.95.0). Left out, English. `dragHint`
|
|
90
90
|
* above still wins for its one line.
|
|
91
91
|
*/
|
|
92
92
|
words?: TreeWords;
|
|
@@ -3,12 +3,12 @@ import { I as ItemSelector, N as NodeSelection } from './plan-DChbUXdS.js';
|
|
|
3
3
|
import { D as Data, S as SlotAddress, a as DataConfig, N as Node } from './types-41704JE4.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* The
|
|
6
|
+
* The easel's UI state, in Puck's shape so the apps' `appState.ui` reads move
|
|
7
7
|
* over unchanged. `itemSelector` and `selectedSlot` are DERIVED from the
|
|
8
8
|
* selection the store holds by id; every other key is the host's own and is
|
|
9
9
|
* kept as written.
|
|
10
10
|
*/
|
|
11
|
-
type
|
|
11
|
+
type EaselUi = Record<string, unknown> & {
|
|
12
12
|
itemSelector: ItemSelector | null;
|
|
13
13
|
/** The selected slot (a column), when a slot rather than a node is selected. */
|
|
14
14
|
selectedSlot: SlotAddress | null;
|
|
@@ -22,7 +22,7 @@ type EditorUi = Record<string, unknown> & {
|
|
|
22
22
|
/** Puck's public `appState`. */
|
|
23
23
|
interface AppState {
|
|
24
24
|
data: Data;
|
|
25
|
-
ui:
|
|
25
|
+
ui: EaselUi;
|
|
26
26
|
}
|
|
27
27
|
type Recordable = {
|
|
28
28
|
recordHistory?: boolean;
|
|
@@ -35,12 +35,12 @@ type SetDataPatch = Partial<Data> | DataInput;
|
|
|
35
35
|
* The actions the apps dispatch today — Puck 0.20's, with Puck's meaning. Zone
|
|
36
36
|
* keys are `"<parentId>:<slot>"`; `root:default-zone` is the page's own list.
|
|
37
37
|
*/
|
|
38
|
-
type
|
|
38
|
+
type EaselAction = ({
|
|
39
39
|
type: 'setData';
|
|
40
40
|
data: SetDataPatch | ((prev: Data) => SetDataPatch);
|
|
41
41
|
} & Recordable) | ({
|
|
42
42
|
type: 'setUi';
|
|
43
|
-
ui: Partial<
|
|
43
|
+
ui: Partial<EaselUi> | ((prev: EaselUi) => Partial<EaselUi>);
|
|
44
44
|
} & Recordable) | ({
|
|
45
45
|
type: 'set';
|
|
46
46
|
state: Partial<AppState> | ((prev: AppState) => Partial<AppState>);
|
|
@@ -81,7 +81,7 @@ type EditorAction = ({
|
|
|
81
81
|
index: number;
|
|
82
82
|
zone: string;
|
|
83
83
|
} & Recordable);
|
|
84
|
-
/** What a block, the root or the whole
|
|
84
|
+
/** What a block, the root or the whole easel allows. Puck's five. */
|
|
85
85
|
interface Permissions {
|
|
86
86
|
drag: boolean;
|
|
87
87
|
duplicate: boolean;
|
|
@@ -93,7 +93,7 @@ interface Permissions {
|
|
|
93
93
|
/** The config the store needs: the data layer's shape, plus each block's own
|
|
94
94
|
* `permissions` (Puck's per-component permissions). Rendering keys are the
|
|
95
95
|
* renderer's business and pass through untouched. */
|
|
96
|
-
interface
|
|
96
|
+
interface EaselConfig extends DataConfig {
|
|
97
97
|
root?: DataConfig['root'] & {
|
|
98
98
|
permissions?: Partial<Permissions>;
|
|
99
99
|
};
|
|
@@ -102,7 +102,7 @@ interface EditorConfig extends DataConfig {
|
|
|
102
102
|
}) | undefined>;
|
|
103
103
|
}
|
|
104
104
|
/** The state the store holds. The selection is BY ID. */
|
|
105
|
-
interface
|
|
105
|
+
interface EaselCore {
|
|
106
106
|
data: Data;
|
|
107
107
|
selection: NodeSelection;
|
|
108
108
|
/** The host's own UI keys — everything but `itemSelector` / `selectedSlot`. */
|
|
@@ -115,7 +115,7 @@ interface HistoryEntry {
|
|
|
115
115
|
}
|
|
116
116
|
/** Puck's PUBLIC `history` (what `usePuck` hands out): `hasPast` and
|
|
117
117
|
* `hasFuture` are booleans there, read at the state they came with. */
|
|
118
|
-
interface
|
|
118
|
+
interface EaselHistory {
|
|
119
119
|
back: () => void;
|
|
120
120
|
forward: () => void;
|
|
121
121
|
hasPast: boolean;
|
|
@@ -126,18 +126,18 @@ interface EditorHistory {
|
|
|
126
126
|
setHistoryIndex: (index: number) => void;
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
129
|
-
* What `
|
|
129
|
+
* What `useEasel` reads — Puck's `usePuck` state, so the apps' selectors move
|
|
130
130
|
* over by renaming the hook: `appState`, `selectedItem`, `dispatch`, `config`,
|
|
131
131
|
* `history`, `getPermissions`, `getItemById`, `getSelectorForId`. Plus the
|
|
132
132
|
* selection by id (`selection`), which Puck never had.
|
|
133
133
|
*/
|
|
134
|
-
interface
|
|
134
|
+
interface EaselView<C extends EaselConfig = EaselConfig> {
|
|
135
135
|
appState: AppState;
|
|
136
136
|
selection: NodeSelection;
|
|
137
137
|
selectedItem: Node | null;
|
|
138
138
|
config: C;
|
|
139
|
-
dispatch: (action:
|
|
140
|
-
history:
|
|
139
|
+
dispatch: (action: EaselAction) => void;
|
|
140
|
+
history: EaselHistory;
|
|
141
141
|
getPermissions: (params?: {
|
|
142
142
|
item?: Node | null;
|
|
143
143
|
type?: string;
|
|
@@ -149,5 +149,17 @@ interface EditorView<C extends EditorConfig = EditorConfig> {
|
|
|
149
149
|
* did, across a data swap, which the website editor wrapped. */
|
|
150
150
|
getSelectorForId: (id: string) => Required<ItemSelector> | undefined;
|
|
151
151
|
}
|
|
152
|
+
/** @deprecated The name before the Easel rename: `EaselUi`. */
|
|
153
|
+
type EditorUi = EaselUi;
|
|
154
|
+
/** @deprecated The name before the Easel rename: `EaselAction`. */
|
|
155
|
+
type EditorAction = EaselAction;
|
|
156
|
+
/** @deprecated The name before the Easel rename: `EaselConfig`. */
|
|
157
|
+
type EditorConfig = EaselConfig;
|
|
158
|
+
/** @deprecated The name before the Easel rename: `EaselCore`. */
|
|
159
|
+
type EditorCore = EaselCore;
|
|
160
|
+
/** @deprecated The name before the Easel rename: `EaselHistory`. */
|
|
161
|
+
type EditorHistory = EaselHistory;
|
|
162
|
+
/** @deprecated The name before the Easel rename: `EaselView`. */
|
|
163
|
+
type EditorView<C extends EaselConfig = EaselConfig> = EaselView<C>;
|
|
152
164
|
|
|
153
|
-
export type { AppState as A,
|
|
165
|
+
export type { AppState as A, EaselConfig as E, HistoryEntry as H, Permissions as P, SetDataPatch as S, EaselView as a, EaselAction as b, EaselCore as c, EaselUi as d, EaselHistory as e, EditorAction as f, EditorConfig as g, EditorCore as h, EditorHistory as i, EditorUi as j, EditorView as k };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WordFit } from './wordFit-
|
|
1
|
+
import { W as WordFit } from './wordFit-D4S36PvB.js';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -14,7 +14,7 @@ import { ReactNode } from 'react';
|
|
|
14
14
|
* The rail is purely presentational: it owns the LOOK, never the app state. The
|
|
15
15
|
* host decides which item is `active` and what each `onSelect` does.
|
|
16
16
|
*/
|
|
17
|
-
interface
|
|
17
|
+
interface EaselRailItem {
|
|
18
18
|
/** Stable identity — used as the React key and to correlate selection. */
|
|
19
19
|
id: string;
|
|
20
20
|
/** Accessible name; becomes both the `aria-label` and the hover `title`. */
|
|
@@ -48,11 +48,11 @@ interface EditorRailItem {
|
|
|
48
48
|
* and active look are the same in both directions — the row re-points three
|
|
49
49
|
* existing `--es-rail-*` custom properties and touches nothing else.
|
|
50
50
|
*/
|
|
51
|
-
type
|
|
52
|
-
interface
|
|
51
|
+
type EaselRailOrientation = 'column' | 'row';
|
|
52
|
+
interface EaselRailProps {
|
|
53
53
|
/** The buttons, top to bottom, in render order (place the "+" where you want it). */
|
|
54
|
-
items:
|
|
55
|
-
/** Names the toolbar for assistive tech. Defaults to `"Editor"` (`
|
|
54
|
+
items: EaselRailItem[];
|
|
55
|
+
/** Names the toolbar for assistive tech. Defaults to `"Editor"` (`EaselStrings.rail.label`). */
|
|
56
56
|
ariaLabel?: string;
|
|
57
57
|
/** Extra class(es) merged onto the rail container. */
|
|
58
58
|
className?: string;
|
|
@@ -61,7 +61,7 @@ interface EditorRailProps {
|
|
|
61
61
|
* what every editor draws today — adding this prop changed no existing
|
|
62
62
|
* output. Pass `'row'` to lay the rail into a top bar.
|
|
63
63
|
*/
|
|
64
|
-
orientation?:
|
|
64
|
+
orientation?: EaselRailOrientation;
|
|
65
65
|
/**
|
|
66
66
|
* A ROW rail's words, measured: the sum of every label's width and the widest
|
|
67
67
|
* one, in the rail's own type (`WordFit`). Given, every button carries its
|
|
@@ -74,9 +74,9 @@ interface EditorRailProps {
|
|
|
74
74
|
*/
|
|
75
75
|
wordFit?: WordFit;
|
|
76
76
|
}
|
|
77
|
-
interface
|
|
77
|
+
interface EaselRailButtonProps {
|
|
78
78
|
label: string;
|
|
79
|
-
/** Put the label beside the icon, for the stylesheet to show or clip (see `
|
|
79
|
+
/** Put the label beside the icon, for the stylesheet to show or clip (see `EaselRail`). */
|
|
80
80
|
worded?: boolean;
|
|
81
81
|
icon: ReactNode;
|
|
82
82
|
active?: boolean;
|
|
@@ -84,5 +84,13 @@ interface EditorRailButtonProps {
|
|
|
84
84
|
onSelect?: () => void;
|
|
85
85
|
className?: string;
|
|
86
86
|
}
|
|
87
|
+
/** @deprecated The name before the Easel rename: `EaselRailItem`. */
|
|
88
|
+
type EditorRailItem = EaselRailItem;
|
|
89
|
+
/** @deprecated The name before the Easel rename: `EaselRailOrientation`. */
|
|
90
|
+
type EditorRailOrientation = EaselRailOrientation;
|
|
91
|
+
/** @deprecated The name before the Easel rename: `EaselRailProps`. */
|
|
92
|
+
type EditorRailProps = EaselRailProps;
|
|
93
|
+
/** @deprecated The name before the Easel rename: `EaselRailButtonProps`. */
|
|
94
|
+
type EditorRailButtonProps = EaselRailButtonProps;
|
|
87
95
|
|
|
88
|
-
export type {
|
|
96
|
+
export type { EaselRailButtonProps as E, EaselRailItem as a, EaselRailOrientation as b, EaselRailProps as c, EditorRailButtonProps as d, EditorRailItem as e, EditorRailOrientation as f, EditorRailProps as g };
|
|
@@ -7,7 +7,7 @@ import { CSSProperties, ReactNode } from 'react';
|
|
|
7
7
|
* what the menus OFFER is not this card's to move. A `label` of `'—'` renders a
|
|
8
8
|
* separator; `header: true` renders a caption, and the FIRST such caption names
|
|
9
9
|
* the menu for assistive tech. */
|
|
10
|
-
interface
|
|
10
|
+
interface EaselContextMenuItem {
|
|
11
11
|
label: string;
|
|
12
12
|
onClick: () => void;
|
|
13
13
|
danger?: boolean;
|
|
@@ -16,7 +16,7 @@ interface EditorContextMenuItem {
|
|
|
16
16
|
* One level only — a child carrying its own `children` is drawn as a plain
|
|
17
17
|
* item, which is all any caller has needed and keeps the flyout from becoming
|
|
18
18
|
* a tree nobody can navigate with a mouse. */
|
|
19
|
-
children?:
|
|
19
|
+
children?: EaselContextMenuItem[];
|
|
20
20
|
/** Draw a tick beside this item — for a submenu whose entries are STATES
|
|
21
21
|
* rather than actions, so it can say which one you are already on. */
|
|
22
22
|
checked?: boolean;
|
|
@@ -65,7 +65,7 @@ interface EditorContextMenuItem {
|
|
|
65
65
|
*
|
|
66
66
|
* A slot left empty is left empty. The default fills all of them.
|
|
67
67
|
*/
|
|
68
|
-
interface
|
|
68
|
+
interface EaselContextMenuSkin {
|
|
69
69
|
/** The box. */
|
|
70
70
|
menu?: string;
|
|
71
71
|
/** The FLYOUT box. Falls back to {@link menu} when a skin gives only one —
|
|
@@ -106,17 +106,17 @@ interface EditorContextMenuSkin {
|
|
|
106
106
|
/** Merged into each row's inline style. */
|
|
107
107
|
itemStyle?: CSSProperties;
|
|
108
108
|
}
|
|
109
|
-
interface
|
|
109
|
+
interface EaselContextMenuProps {
|
|
110
110
|
/** Where the pointer was. The box is placed from here and then kept on
|
|
111
111
|
* screen — see the note on the component. */
|
|
112
112
|
x: number;
|
|
113
113
|
y: number;
|
|
114
|
-
items:
|
|
114
|
+
items: EaselContextMenuItem[];
|
|
115
115
|
onClose: () => void;
|
|
116
116
|
/** Cap the box's height; it scrolls past that. */
|
|
117
117
|
maxHeight?: number;
|
|
118
118
|
/** Defaults to {@link ES_MENU_SKIN}, the storefront editor's approved look. */
|
|
119
|
-
skin?:
|
|
119
|
+
skin?: EaselContextMenuSkin;
|
|
120
120
|
/**
|
|
121
121
|
* Where to portal to. Defaults to `document.body`.
|
|
122
122
|
*
|
|
@@ -127,5 +127,11 @@ interface EditorContextMenuProps {
|
|
|
127
127
|
*/
|
|
128
128
|
portalTo?: HTMLElement | null;
|
|
129
129
|
}
|
|
130
|
+
/** @deprecated The name before the Easel rename: `EaselContextMenuItem`. */
|
|
131
|
+
type EditorContextMenuItem = EaselContextMenuItem;
|
|
132
|
+
/** @deprecated The name before the Easel rename: `EaselContextMenuSkin`. */
|
|
133
|
+
type EditorContextMenuSkin = EaselContextMenuSkin;
|
|
134
|
+
/** @deprecated The name before the Easel rename: `EaselContextMenuProps`. */
|
|
135
|
+
type EditorContextMenuProps = EaselContextMenuProps;
|
|
130
136
|
|
|
131
|
-
export type {
|
|
137
|
+
export type { EaselContextMenuItem as E, EaselContextMenuProps as a, EaselContextMenuSkin as b, EditorContextMenuItem as c, EditorContextMenuProps as d, EditorContextMenuSkin as e };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as EaselRailItem } from './types-Bs_gVkVI.js';
|
|
2
2
|
import { CSSProperties, ReactNode, Ref } from 'react';
|
|
3
3
|
import { EditAccess, SaveConflict } from './edit-lock/index.js';
|
|
4
4
|
|
|
@@ -51,7 +51,7 @@ type TopBarClusterProps = {
|
|
|
51
51
|
/**
|
|
52
52
|
* `rail` — the LEFT column: exactly the left panel's width (`--es-left-w`),
|
|
53
53
|
* carrying the panel's hairline up through the bar. Holds the
|
|
54
|
-
* `
|
|
54
|
+
* `EaselRail` in `orientation="row"` and nothing else.
|
|
55
55
|
* `right` — the actions a person takes: save state, ghost buttons, the one
|
|
56
56
|
* primary button.
|
|
57
57
|
* omitted — the centre: undo / redo, a divider, the device switch, the panel
|
|
@@ -61,7 +61,7 @@ type TopBarClusterProps = {
|
|
|
61
61
|
style?: CSSProperties;
|
|
62
62
|
children?: ReactNode;
|
|
63
63
|
};
|
|
64
|
-
type
|
|
64
|
+
type EaselIconButtonProps = {
|
|
65
65
|
/** Tooltip AND accessible name. An icon-only button has no other. */
|
|
66
66
|
label: string;
|
|
67
67
|
onClick?: () => void;
|
|
@@ -87,7 +87,7 @@ type DeviceSwitchProps<Id extends string = string> = {
|
|
|
87
87
|
value: Id;
|
|
88
88
|
/** Asked for a different device. Never called for the current one. */
|
|
89
89
|
onChange: (next: Id) => void;
|
|
90
|
-
/** The strip's own name. Defaults to "Preview device" (`
|
|
90
|
+
/** The strip's own name. Defaults to "Preview device" (`EaselStrings.chrome.device`). */
|
|
91
91
|
ariaLabel?: string;
|
|
92
92
|
};
|
|
93
93
|
/**
|
|
@@ -155,8 +155,8 @@ type InspectorUpLevelProps = {
|
|
|
155
155
|
icon?: ReactNode;
|
|
156
156
|
/**
|
|
157
157
|
* The tooltip, and the start of the accessible name ("… to ‹name›"). Default
|
|
158
|
-
* "Go up one level" (`
|
|
159
|
-
* is `
|
|
158
|
+
* "Go up one level" (`EaselStrings.chrome.upLevel`); how the two are joined
|
|
159
|
+
* is `EaselStrings.chrome.upLevelTo`.
|
|
160
160
|
*/
|
|
161
161
|
label?: string;
|
|
162
162
|
};
|
|
@@ -181,8 +181,8 @@ type InspectorIconButtonProps = {
|
|
|
181
181
|
children: ReactNode;
|
|
182
182
|
};
|
|
183
183
|
type TopBarRailProps = {
|
|
184
|
-
/** The rail's buttons (`
|
|
185
|
-
items:
|
|
184
|
+
/** The rail's buttons (`EaselRail` items). */
|
|
185
|
+
items: EaselRailItem[];
|
|
186
186
|
/** The toolbar's own name, e.g. "Left panel views". */
|
|
187
187
|
ariaLabel?: string;
|
|
188
188
|
};
|
|
@@ -200,5 +200,7 @@ type EditNoticeProps = {
|
|
|
200
200
|
/** Throw this screen away and load what is saved — the only action that discards work. */
|
|
201
201
|
onReload: () => void;
|
|
202
202
|
};
|
|
203
|
+
/** @deprecated The name before the Easel rename: `EaselIconButtonProps`. */
|
|
204
|
+
type EditorIconButtonProps = EaselIconButtonProps;
|
|
203
205
|
|
|
204
|
-
export { type DeviceSwitchProps as D, type
|
|
206
|
+
export { type DeviceSwitchProps as D, type EaselIconButtonProps as E, type InspectorHeadProps as I, MAX_PANEL_W as M, type PanelResizeHandleProps as P, type SaveTone as S, type TopBarProps as T, type TopBarClusterProps as a, type TopBarRailProps as b, type SaveStateProps as c, type SaveStateToggleProps as d, type InspectorIconButtonProps as e, type InspectorUpLevelProps as f, type EditNoticeProps as g, DEFAULT_PANEL_W as h, type DeviceOption as i, type EditorIconButtonProps as j, MIN_PANEL_W as k, type PanelSide as l, type PanelWidths as m, clampPanelWidth as n, panelWidthVars as p };
|
|
@@ -37,7 +37,7 @@ interface WatchOptions {
|
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Every block the canvas draws carries this attribute. The markup is the one
|
|
40
|
-
* Puck 0.20 drew, kept by the engine's own canvas (`efficient-easel/
|
|
40
|
+
* Puck 0.20 drew, kept by the engine's own canvas (`efficient-easel/easel`)
|
|
41
41
|
* because both apps' canvas CSS and checks read it.
|
|
42
42
|
*/
|
|
43
43
|
declare const BLOCK_SELECTOR = "[data-puck-component]";
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* `SettingsSegmented` the host passes its measured `fit`;
|
|
9
9
|
* the top-bar rail `TopBarRail` measures the words in the browser and
|
|
10
|
-
* hands `
|
|
10
|
+
* hands `EaselRail` the result.
|
|
11
11
|
*
|
|
12
12
|
* Both numbers are the width of TEXT ONLY, in the strip's own type, and neither
|
|
13
13
|
* includes any padding, glyph or gap: those are the strip's, and the sheet adds
|