efficient-easel 0.99.2 → 0.100.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 +233 -17
- package/dist/autosave/index.d.ts +11 -5
- package/dist/blocks/index.d.ts +1 -1
- package/dist/canvas/index.d.ts +2 -2
- package/dist/canvas/index.js +1 -1
- package/dist/chrome/chrome.css +96 -29
- package/dist/chrome/index.d.ts +67 -18
- package/dist/chrome/index.js +17 -21
- package/dist/chunk-3EDSDPIP.js +1 -0
- package/dist/chunk-67GNT6PF.js +1 -0
- package/dist/{chunk-PI26YXYD.js → chunk-6EIVTKZZ.js} +21 -14
- package/dist/chunk-A5UK76FC.js +6 -0
- package/dist/chunk-AZT7V4UM.js +10 -0
- package/dist/chunk-DICUMYMG.js +12 -0
- package/dist/chunk-HDVD27VB.js +1 -0
- package/dist/chunk-JQM3V7XQ.js +1 -0
- package/dist/chunk-JUQ6YJCG.js +1 -0
- package/dist/chunk-LA54QLP5.js +1 -0
- package/dist/chunk-LGKQXSKO.js +16 -0
- package/dist/chunk-M6F6LS3H.js +1 -0
- package/dist/chunk-MH5GUZFQ.js +9 -0
- package/dist/chunk-P6O363EE.js +6 -0
- package/dist/chunk-PAELDYYS.js +1 -0
- package/dist/{chunk-JYPOOHII.js → chunk-QKVR3K73.js} +3 -3
- package/dist/chunk-SAJUCHOX.js +1 -0
- package/dist/chunk-TRVZ7C23.js +1 -0
- package/dist/chunk-V7GIIXFB.js +16 -0
- package/dist/chunk-WZ7TGAAT.js +3 -0
- package/dist/chunk-ZJEBF4NB.js +1 -0
- package/dist/copy/copy.css +388 -5
- package/dist/copy/index.d.ts +268 -5
- package/dist/copy/index.js +31 -10
- package/dist/drag/drag.css +10 -1
- package/dist/drag/index.d.ts +99 -8
- package/dist/drag/index.js +18 -17
- package/dist/easel/easel.css +15 -0
- package/dist/easel/index.d.ts +104 -33
- package/dist/easel/index.js +9 -1
- package/dist/edit-lock/index.d.ts +1 -3
- package/dist/edit-lock/index.js +1 -1
- package/dist/fields/fields.css +103 -26
- package/dist/fields/index.d.ts +47 -9
- package/dist/fields/index.js +30 -46
- package/dist/gold/index.js +1 -1
- package/dist/icons/index.d.ts +10 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/markup/index.d.ts +94 -10
- package/dist/markup/index.js +1 -1
- package/dist/menu/index.d.ts +58 -5
- package/dist/menu/index.js +15 -15
- package/dist/menu/menu.css +17 -6
- package/dist/node-ops/index.d.ts +1 -1
- package/dist/node-ops/index.js +1 -1
- package/dist/panel/index.d.ts +72 -4
- package/dist/panel/index.js +18 -16
- package/dist/panel/panel.css +56 -1
- package/dist/pick/index.d.ts +39 -1
- package/dist/pick/index.js +7 -14
- package/dist/pick/pick.css +14 -0
- package/dist/rail/index.d.ts +3 -7
- package/dist/rail/index.js +1 -1
- package/dist/strings/catalogue.d.ts +13 -35
- package/dist/strings/catalogue.js +1 -1
- package/dist/strings/index.d.ts +12 -18
- package/dist/strings/index.js +2 -2
- package/dist/style-clipboard/index.d.ts +1 -1
- package/dist/style-clipboard/index.js +1 -1
- package/dist/text-styles/index.d.ts +328 -0
- package/dist/text-styles/index.js +38 -0
- package/dist/text-styles/text-styles.css +309 -0
- package/dist/tree/index.d.ts +43 -2
- package/dist/tree/index.js +1 -1
- package/dist/tree/tree.css +71 -0
- package/dist/{types-p9j2Fac7.d.ts → types-DGcCsxs8.d.ts} +72 -7
- package/dist/{types-Bs_gVkVI.d.ts → types-DWS-s9z-.d.ts} +1 -9
- package/dist/{types-DO-b0LNj.d.ts → types-Djdq6Xkd.d.ts} +9 -8
- package/dist/{types-BOSGNvil.d.ts → types-E3HrTPg2.d.ts} +7 -13
- package/dist/{types-C7HFvdtk.d.ts → types-VqL6t5HH.d.ts} +82 -5
- package/dist/{watch-B5RTR-WX.d.ts → watch-BTYOJpQU.d.ts} +18 -1
- package/dist/{words-DagJdwIA.d.ts → words-AHHfiaRY.d.ts} +31 -2
- package/dist/{words-c-3h9xQQ.d.ts → words-BMzV04b1.d.ts} +1 -1
- package/dist/words-CJjUKcV5.d.ts +37 -0
- package/dist/words-CRYvAiHX.d.ts +105 -0
- package/dist/{words-CD3WADyb.d.ts → words-CzoyDNHm.d.ts} +4 -0
- package/dist/{words-C74EUpFr.d.ts → words-DBq7vfHy.d.ts} +57 -4
- package/dist/{words-N4ebT88_.d.ts → words-DgHcY5qB.d.ts} +9 -3
- package/package.json +8 -8
- package/dist/chunk-66CKSTXP.js +0 -14
- package/dist/chunk-672FAEKU.js +0 -1
- package/dist/chunk-67VZRQLG.js +0 -13
- package/dist/chunk-6PS6STGA.js +0 -1
- package/dist/chunk-7A7O2JWQ.js +0 -1
- package/dist/chunk-7JTL3P6P.js +0 -1
- package/dist/chunk-F2PIG3AA.js +0 -10
- package/dist/chunk-H4B72XCJ.js +0 -1
- package/dist/chunk-KDIVA6WD.js +0 -1
- package/dist/chunk-MCLBHENY.js +0 -1
- package/dist/chunk-QB3BZIRA.js +0 -5
- package/dist/chunk-SJQG5ENJ.js +0 -1
- package/dist/chunk-SUO5627P.js +0 -1
- package/dist/chunk-XUE5O62R.js +0 -3
- package/dist/chunk-ZT7M24XD.js +0 -1
- package/dist/editor/index.d.ts +0 -10
- package/dist/editor/index.js +0 -1
- /package/dist/{chunk-2PHD4L6A.js → chunk-OWBO4WKA.js} +0 -0
package/dist/pick/index.d.ts
CHANGED
|
@@ -54,6 +54,44 @@ type ColourPickerProps = {
|
|
|
54
54
|
* to what is stored on Enter, Escape or leaving it.
|
|
55
55
|
*/
|
|
56
56
|
declare function ColourPicker({ value, onChange, label, theme, caption, id: swatchId, readOnly, words, }: ColourPickerProps): react.JSX.Element;
|
|
57
|
+
type ColourWindowProps = {
|
|
58
|
+
/** The colour, `#rrggbb`, or `''` while there is none. */
|
|
59
|
+
value: string;
|
|
60
|
+
/** Live, as the colour moves: one `#rrggbb` from every way in. */
|
|
61
|
+
onChange: (next: string) => void;
|
|
62
|
+
/** The colour's name: the window is "<label> colour", its hex box "<label> hex code". */
|
|
63
|
+
label: string;
|
|
64
|
+
/** The theme's colours, offered first. */
|
|
65
|
+
theme?: readonly ThemeColour[];
|
|
66
|
+
/** Escape in the window. The opener closes it and takes the focus back. */
|
|
67
|
+
onClose?: () => void;
|
|
68
|
+
/** The window's DOM id, for the opener's `aria-controls`. */
|
|
69
|
+
id?: string;
|
|
70
|
+
readOnly?: boolean;
|
|
71
|
+
words?: PickWords['colour'];
|
|
72
|
+
/**
|
|
73
|
+
* Start the hex row with a swatch of the colour, as the text box's colour
|
|
74
|
+
* window draws it (E5b). Off by default: `ColourPicker`'s row already has its
|
|
75
|
+
* swatch beside the hex.
|
|
76
|
+
*/
|
|
77
|
+
swatch?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* When a drag on the square or the hue bar writes. `'live'` (the default,
|
|
80
|
+
* as `ColourPicker` always has): every move. `'end'`: once, where the
|
|
81
|
+
* pointer comes up — one undo step for a host whose every write is one,
|
|
82
|
+
* like the text box (E5b). The thumbs, the hex and the swatch follow the
|
|
83
|
+
* drag live either way. An arrow key writes each press in both.
|
|
84
|
+
*/
|
|
85
|
+
dragWrites?: 'live' | 'end';
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* THE COLOUR WINDOW on its own: the theme's colours, the saturation and
|
|
89
|
+
* brightness square, the hue strip and the hex. `ColourPicker` opens it under
|
|
90
|
+
* its swatch; a row that draws its own swatches (the text-styles list's Any
|
|
91
|
+
* color, plan step E6) opens the same one, so there is one window, not two.
|
|
92
|
+
* The opener owns when it is open and puts it in the panel's own flow.
|
|
93
|
+
*/
|
|
94
|
+
declare function ColourWindow({ value, onChange, label, theme, onClose, id, readOnly, words, swatch, dragWrites, }: ColourWindowProps): react.JSX.Element;
|
|
57
95
|
|
|
58
96
|
type ImageBoxProps = {
|
|
59
97
|
/** The file's URL, or `''` while the setting has none. */
|
|
@@ -150,4 +188,4 @@ declare function hueFromPoint(x: number, box: {
|
|
|
150
188
|
* name, so it reads as none rather than as its own bytes. */
|
|
151
189
|
declare function mediaName(url: string): string;
|
|
152
190
|
|
|
153
|
-
export { ColourPicker, type ColourPickerProps, HEX_MAX_LENGTH, type Hsv, ImageBox, type ImageBoxProps, PickWords, type ThemeColour, hexReadout, hexToHsv, hsvToHex, hueFromPoint, mediaName, svFromPoint, typedHex };
|
|
191
|
+
export { ColourPicker, type ColourPickerProps, ColourWindow, type ColourWindowProps, HEX_MAX_LENGTH, type Hsv, ImageBox, type ImageBoxProps, PickWords, type ThemeColour, hexReadout, hexToHsv, hsvToHex, hueFromPoint, mediaName, svFromPoint, typedHex };
|
package/dist/pick/index.js
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return
|
|
3
|
-
/* @__PURE__ */
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
return i("input",{type:"text",className:"es-pick-hex",value:r??(e?u(e):""),"aria-label":n,maxLength:7,spellCheck:!1,autoComplete:"off",readOnly:l,onChange:t=>{s(t.target.value);const n=c(t.target.value);null!==n&&n!==e&&a(n)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"!==e.key&&"Escape"!==e.key||(e.preventDefault(),e.stopPropagation(),s(null),e.currentTarget.blur())},onBlur:()=>s(null)})}function f({value:a,onChange:n,label:l,openLibrary:s,kind:o="image",placeholder:c,readOnly:u,words:h=e.image}){const[m,d]=t(!1),[p,v]=t(!1),b=Boolean(s)&&!u,k=async()=>{if(s&&!m&&!u){d(!0),v(!1);try{const e=await s();e&&n(e)}catch{v(!0)}finally{d(!1)}}},f=m?/* @__PURE__ */i("p",{className:"es-pick-image-status",role:"status",children:h.choosing}):p?/* @__PURE__ */i("p",{className:"es-pick-image-status is-error",role:"alert",children:h.failed}):null;if(!a)/* @__PURE__ */
|
|
9
|
-
return r("div",{className:"es-pick-image",children:[
|
|
10
|
-
/* @__PURE__ */r("button",{type:"button",className:"es-pick-image-slot",onClick:k,disabled:!b||m,"aria-label":h.empty({label:l,kind:o,placeholder:c}),children:[
|
|
11
|
-
/* @__PURE__ */i("span",{className:"es-pick-image-slot-name",children:c??("video"===o?h.chooseVideo:h.chooseImage)}),b?/* @__PURE__ */i("span",{className:"es-pick-image-slot-hint",children:h.hint}):null]}),f]});const y=g(a),w=y?h.named({label:l,name:y}):l;/* @__PURE__ */
|
|
12
|
-
return r("div",{className:"es-pick-image",children:[
|
|
13
|
-
/* @__PURE__ */r("figure",{className:"es-pick-image-figure",children:[
|
|
14
|
-
/* @__PURE__ */i("div",{className:"es-pick-image-frame",children:"video"===o?/* @__PURE__ */i("video",{src:a,muted:!0,playsInline:!0,preload:"metadata","aria-label":w}):/* @__PURE__ */i("img",{src:a,alt:w})}),y?/* @__PURE__ */i("figcaption",{className:"es-pick-image-name",title:y,children:y}):null]}),b||!u?/* @__PURE__ */r("div",{className:"es-pick-image-actions",children:[b?/* @__PURE__ */i("button",{type:"button",className:"es-pick-image-btn",onClick:k,disabled:m,"aria-label":h.replaceNamed({label:l}),children:h.replace}):null,u?null:/* @__PURE__ */i("button",{type:"button",className:"es-pick-image-btn is-bare",onClick:()=>n(""),disabled:m,"aria-label":h.removeNamed({label:l}),children:h.remove})]}):null,f]})}export{b as ColourPicker,o as HEX_MAX_LENGTH,f as ImageBox,u as hexReadout,m as hexToHsv,d as hsvToHex,v as hueFromPoint,g as mediaName,p as svFromPoint,c as typedHex};
|
|
1
|
+
import{mediaName as e}from"../chunk-AZT7V4UM.js";export{ColourPicker,ColourWindow,HEX_MAX_LENGTH,hexReadout,hexToHsv,hsvToHex,hueFromPoint,mediaName,svFromPoint,typedHex}from"../chunk-AZT7V4UM.js";import{DEFAULT_PICK_WORDS as a}from"../chunk-ZAOM6PFH.js";import{useState as i}from"react";import{jsx as l,jsxs as s}from"react/jsx-runtime";function c({value:c,onChange:n,label:o,openLibrary:r,kind:t="image",placeholder:m,readOnly:d,words:p=a.image}){const[u,h]=i(!1),[b,g]=i(!1),k=Boolean(r)&&!d,N=async()=>{if(r&&!u&&!d){h(!0),g(!1);try{const e=await r();e&&n(e)}catch{g(!0)}finally{h(!1)}}},f=u?/* @__PURE__ */l("p",{className:"es-pick-image-status",role:"status",children:p.choosing}):b?/* @__PURE__ */l("p",{className:"es-pick-image-status is-error",role:"alert",children:p.failed}):null;if(!c)/* @__PURE__ */
|
|
2
|
+
return s("div",{className:"es-pick-image",children:[
|
|
3
|
+
/* @__PURE__ */s("button",{type:"button",className:"es-pick-image-slot",onClick:N,disabled:!k||u,"aria-label":p.empty({label:o,kind:t,placeholder:m}),children:[
|
|
4
|
+
/* @__PURE__ */l("span",{className:"es-pick-image-slot-name",children:m??("video"===t?p.chooseVideo:p.chooseImage)}),k?/* @__PURE__ */l("span",{className:"es-pick-image-slot-hint",children:p.hint}):null]}),f]});const v=e(c),y=v?p.named({label:o,name:v}):o;/* @__PURE__ */
|
|
5
|
+
return s("div",{className:"es-pick-image",children:[
|
|
6
|
+
/* @__PURE__ */s("figure",{className:"es-pick-image-figure",children:[
|
|
7
|
+
/* @__PURE__ */l("div",{className:"es-pick-image-frame",children:"video"===t?/* @__PURE__ */l("video",{src:c,muted:!0,playsInline:!0,preload:"metadata","aria-label":y}):/* @__PURE__ */l("img",{src:c,alt:y})}),v?/* @__PURE__ */l("figcaption",{className:"es-pick-image-name",title:v,children:v}):null]}),k||!d?/* @__PURE__ */s("div",{className:"es-pick-image-actions",children:[k?/* @__PURE__ */l("button",{type:"button",className:"es-pick-image-btn",onClick:N,disabled:u,"aria-label":p.replaceNamed({label:o}),children:p.replace}):null,d?null:/* @__PURE__ */l("button",{type:"button",className:"es-pick-image-btn is-bare",onClick:()=>n(""),disabled:u,"aria-label":p.removeNamed({label:o}),children:p.remove})]}):null,f]})}export{c as ImageBox};
|
package/dist/pick/pick.css
CHANGED
|
@@ -138,6 +138,20 @@
|
|
|
138
138
|
.es-pick-hue-thumb {
|
|
139
139
|
top: 50%;
|
|
140
140
|
}
|
|
141
|
+
/* The hex row with its swatch (ColourWindow `swatch`, the text box's colour
|
|
142
|
+
window): the colour, then the hex. */
|
|
143
|
+
.es-pick-hex-row {
|
|
144
|
+
display: flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
gap: 8px;
|
|
147
|
+
}
|
|
148
|
+
.es-pick-hex-swatch {
|
|
149
|
+
width: 26px;
|
|
150
|
+
height: 26px;
|
|
151
|
+
flex: none;
|
|
152
|
+
border-radius: 6px;
|
|
153
|
+
box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.1);
|
|
154
|
+
}
|
|
141
155
|
|
|
142
156
|
/* ── The image box ──────────────────────────────────────────────────────── */
|
|
143
157
|
.es-pick-image {
|
package/dist/rail/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { c as EaselRailProps, E as EaselRailButtonProps } from '../types-
|
|
3
|
-
export { a as EaselRailItem, b as EaselRailOrientation
|
|
2
|
+
import { c as EaselRailProps, E as EaselRailButtonProps } from '../types-DWS-s9z-.js';
|
|
3
|
+
export { a as EaselRailItem, b as EaselRailOrientation } from '../types-DWS-s9z-.js';
|
|
4
4
|
export { AddIcon, LayersIcon, MediaIcon, PageIcon as PagesIcon, IconProps as RailIconProps, SitemapIcon, StylesIcon } from '../icons/index.js';
|
|
5
5
|
export { W as WordFit } from '../wordFit-D4S36PvB.js';
|
|
6
6
|
|
|
@@ -44,8 +44,6 @@ export { W as WordFit } from '../wordFit-D4S36PvB.js';
|
|
|
44
44
|
* passes `ariaLabel`; `TopBarRail` does it from the provider.
|
|
45
45
|
*/
|
|
46
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;
|
|
49
47
|
|
|
50
48
|
/**
|
|
51
49
|
* A single rail button: an icon in a 34×34 square that hovers, highlights when
|
|
@@ -56,8 +54,6 @@ declare const EditorRail: typeof EaselRail;
|
|
|
56
54
|
* whose item omits `active`) stays a plain button rather than a stuck toggle.
|
|
57
55
|
*/
|
|
58
56
|
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;
|
|
61
57
|
|
|
62
58
|
/**
|
|
63
59
|
* Rail design tokens — the ONE source both apps' rails converge on.
|
|
@@ -146,4 +142,4 @@ declare const railCssVars: {
|
|
|
146
142
|
readonly accentTint: "--es-rail-accent-tint";
|
|
147
143
|
};
|
|
148
144
|
|
|
149
|
-
export { EaselRail, EaselRailButton, EaselRailButtonProps, EaselRailProps,
|
|
145
|
+
export { EaselRail, EaselRailButton, EaselRailButtonProps, EaselRailProps, type RailTokens, railCssVars, railTokens };
|
package/dist/rail/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-
|
|
1
|
+
import"../chunk-OWBO4WKA.js";export{EaselRail,EaselRailButton,railCssVars,railTokens}from"../chunk-WZ7TGAAT.js";import"../chunk-2OAZYSWJ.js";import"../chunk-BZ5ASXOL.js";export{AddIcon,LayersIcon,MediaIcon,PageIcon as PagesIcon,SitemapIcon,StylesIcon}from"../chunk-6EIVTKZZ.js";
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { S as SaveWords } from '../words-
|
|
2
|
-
import { N as NoticeWords, C as ChromeWords } from '../words-
|
|
3
|
-
import { C as CopyWords } from '../words-
|
|
1
|
+
import { S as SaveWords } from '../words-BMzV04b1.js';
|
|
2
|
+
import { N as NoticeWords, C as ChromeWords } from '../words-AHHfiaRY.js';
|
|
3
|
+
import { C as CopyWords } from '../words-DBq7vfHy.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-CzoyDNHm.js';
|
|
7
7
|
import { N as NodeMenuWords } from '../words-DMG4dYq2.js';
|
|
8
|
-
import {
|
|
8
|
+
import { P as PanelWords } from '../words-CJjUKcV5.js';
|
|
9
9
|
import { P as PickWords } from '../words-is_Vy6hn.js';
|
|
10
10
|
import { S as StyleClipboardWords } from '../words-CnnHb9jo.js';
|
|
11
|
-
import { T as
|
|
12
|
-
import '../
|
|
13
|
-
import '../types-
|
|
11
|
+
import { T as TextStylesWords } from '../words-CRYvAiHX.js';
|
|
12
|
+
import { T as TreeWords } from '../words-DgHcY5qB.js';
|
|
13
|
+
import '../types-DGcCsxs8.js';
|
|
14
|
+
import '../types-DWS-s9z-.js';
|
|
14
15
|
import '../wordFit-D4S36PvB.js';
|
|
15
16
|
import 'react';
|
|
16
17
|
import '../markup/index.js';
|
|
18
|
+
import '../buckets-CuLM47h9.js';
|
|
17
19
|
|
|
18
20
|
/**
|
|
19
21
|
* The easel canvas's own words (`efficient-easel/strings`, 0.95.0). There is
|
|
@@ -26,26 +28,6 @@ type CanvasWords = {
|
|
|
26
28
|
frame: string;
|
|
27
29
|
};
|
|
28
30
|
|
|
29
|
-
/**
|
|
30
|
-
* The settings panel's own words (`efficient-easel/strings`, 0.95.0): what
|
|
31
|
-
* the tab strip is called, and what each tab SAYS.
|
|
32
|
-
*
|
|
33
|
-
* A bucket's key (`'Content'`, `'Style'`, …) is an identifier — fields name
|
|
34
|
-
* their tab with it and `SETTINGS_BUCKETS` orders them — so it never changes
|
|
35
|
-
* with the language. `buckets` is the word drawn for each key.
|
|
36
|
-
*
|
|
37
|
-
* The panel is hook-free, so nothing here is read from the strings provider:
|
|
38
|
-
* `SettingsTabs` takes its name as `ariaLabel` and each tab's word as the
|
|
39
|
-
* item's `label`, and `Inspector` (which has hooks) passes both.
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
type PanelWords = {
|
|
43
|
-
/** The tab strip's accessible name. */
|
|
44
|
-
settings: string;
|
|
45
|
-
/** The word each tab shows, by its key. */
|
|
46
|
-
buckets: Record<SettingsBucket, string>;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
31
|
/**
|
|
50
32
|
* The rail's own words. There is one: what the toolbar is called when the host
|
|
51
33
|
* does not name it (`ariaLabel`). Every other word on the rail is an item's
|
|
@@ -120,6 +102,8 @@ interface EaselStrings {
|
|
|
120
102
|
copy: CopyWords;
|
|
121
103
|
/** `efficient-easel/easel` — the canvas frame's name. */
|
|
122
104
|
canvas: CanvasWords;
|
|
105
|
+
/** `efficient-easel/text-styles` — the Email styles / Site styles list (E6). */
|
|
106
|
+
textStyles: TextStylesWords;
|
|
123
107
|
}
|
|
124
108
|
/** Today's English, word for word. */
|
|
125
109
|
declare const DEFAULT_EASEL_STRINGS: EaselStrings;
|
|
@@ -137,11 +121,5 @@ type DeepPartial<T> = T extends (...args: never[]) => unknown ? T : T extends ob
|
|
|
137
121
|
* rather than as nothing. Neither argument is changed.
|
|
138
122
|
*/
|
|
139
123
|
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;
|
|
146
124
|
|
|
147
|
-
export { type CanvasWords, ChromeWords, CopyWords, DEFAULT_EASEL_STRINGS,
|
|
125
|
+
export { type CanvasWords, ChromeWords, CopyWords, DEFAULT_EASEL_STRINGS, type DeepPartial, DragWords, type EaselStrings, FieldsWords, LockWords, NodeMenuWords, NoticeWords, PanelWords, PickWords, type RailWords, SaveWords, StyleClipboardWords, TextStylesWords, TreeWords, mergeEaselStrings };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DEFAULT_EASEL_STRINGS,
|
|
1
|
+
export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-SAJUCHOX.js";import"../chunk-M6F6LS3H.js";import"../chunk-6WY6ZXJG.js";import"../chunk-AELNNAFM.js";import"../chunk-3EDSDPIP.js";import"../chunk-TRVZ7C23.js";import"../chunk-WK3AFPXY.js";import"../chunk-H6DDIBQ4.js";import"../chunk-RE4LP46F.js";import"../chunk-ZJEBF4NB.js";import"../chunk-2OAZYSWJ.js";import"../chunk-JQM3V7XQ.js";import"../chunk-ZAOM6PFH.js";import"../chunk-LA54QLP5.js";import"../chunk-HDVD27VB.js";import"../chunk-O2NLQBFX.js";
|
package/dist/strings/index.d.ts
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { DeepPartial, EaselStrings } from './catalogue.js';
|
|
2
|
-
export { CanvasWords, DEFAULT_EASEL_STRINGS,
|
|
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-AHHfiaRY.js';
|
|
6
|
+
export { C as CopyWords } from '../words-DBq7vfHy.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-CzoyDNHm.js';
|
|
9
9
|
export { LockWords } from '../edit-lock/index.js';
|
|
10
10
|
export { N as NodeMenuWords } from '../words-DMG4dYq2.js';
|
|
11
|
+
export { P as PanelWords } from '../words-CJjUKcV5.js';
|
|
11
12
|
export { P as PickWords } from '../words-is_Vy6hn.js';
|
|
12
|
-
export { S as SaveWords } from '../words-
|
|
13
|
+
export { S as SaveWords } from '../words-BMzV04b1.js';
|
|
13
14
|
export { S as StyleClipboardWords } from '../words-CnnHb9jo.js';
|
|
14
|
-
export { T as
|
|
15
|
-
|
|
15
|
+
export { T as TextStylesWords } from '../words-CRYvAiHX.js';
|
|
16
|
+
export { T as TreeWords } from '../words-DgHcY5qB.js';
|
|
16
17
|
import '../markup/index.js';
|
|
17
|
-
import '../
|
|
18
|
-
import '../types-
|
|
18
|
+
import '../buckets-CuLM47h9.js';
|
|
19
|
+
import '../types-DGcCsxs8.js';
|
|
20
|
+
import '../types-DWS-s9z-.js';
|
|
19
21
|
import '../wordFit-D4S36PvB.js';
|
|
20
22
|
|
|
21
23
|
interface EaselStringsProviderProps {
|
|
@@ -52,13 +54,5 @@ declare function EaselStringsProvider({ value, locale, children }: EaselStringsP
|
|
|
52
54
|
declare function useEaselStrings(): EaselStrings;
|
|
53
55
|
/** The nearest provider's locale, or `'en'`. */
|
|
54
56
|
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;
|
|
63
57
|
|
|
64
|
-
export { DeepPartial, EaselStrings, EaselStringsProvider, type EaselStringsProviderProps,
|
|
58
|
+
export { DeepPartial, EaselStrings, EaselStringsProvider, type EaselStringsProviderProps, useEaselLocale, useEaselStrings };
|
package/dist/strings/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{DEFAULT_EASEL_STRINGS as r,mergeEaselStrings as n}from"../chunk-
|
|
2
|
-
return
|
|
1
|
+
import{DEFAULT_EASEL_STRINGS as r,mergeEaselStrings as n}from"../chunk-SAJUCHOX.js";export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-SAJUCHOX.js";import"../chunk-M6F6LS3H.js";import"../chunk-6WY6ZXJG.js";import"../chunk-AELNNAFM.js";import"../chunk-3EDSDPIP.js";import"../chunk-TRVZ7C23.js";import"../chunk-WK3AFPXY.js";import"../chunk-H6DDIBQ4.js";import"../chunk-RE4LP46F.js";import"../chunk-ZJEBF4NB.js";import"../chunk-2OAZYSWJ.js";import"../chunk-JQM3V7XQ.js";import"../chunk-ZAOM6PFH.js";import"../chunk-LA54QLP5.js";import"../chunk-HDVD27VB.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
|
+
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 +1 @@
|
|
|
1
|
-
import{DEFAULT_STYLE_CLIPBOARD_WORDS as t}from"../chunk-6WY6ZXJG.js";import{CopyStyleIcon as e,PasteStyleIcon as n}from"../chunk-
|
|
1
|
+
import{DEFAULT_STYLE_CLIPBOARD_WORDS as t}from"../chunk-6WY6ZXJG.js";import{CopyStyleIcon as e,PasteStyleIcon as n}from"../chunk-6EIVTKZZ.js";import{jsx as o}from"react/jsx-runtime";var r="__styleKind";function u(t,e){return t[r]=e,t}function c(t,e){return`${t}:${e.map(t=>String(t)).sort().join("|")}`}function i(t){if(!t)return null;const e=t.indexOf(":");if(e<0)return null;const n=t.slice(0,e);return s.has(n)?{control:n,values:t.slice(e+1).split("|")}:null}var s=/* @__PURE__ */new Set(["choice","select","radio"]);function l(t){if(!t||"object"!=typeof t)return null;const e=t;return"string"==typeof e[r]?e[r]:"text"===e.type||"textarea"===e.type||"number"===e.type?e.type:"select"!==e.type&&"radio"!==e.type||!Array.isArray(e.options)?null:c(e.type,e.options.map(t=>t?.value))}function a(t){return null!=t&&""!==t}function p(t,e){let n=t;for(const t of e){if(!n||"object"!=typeof n)return;n=n[t]}return n}function f(t){return void 0===t?t:JSON.parse(JSON.stringify(t))}function d(t,e,n){const[o,...r]=e,u={...t};if(0===r.length)return void 0===n?delete u[o]:u[o]=n,u;const c=u[o],i=d(c&&"object"==typeof c?c:{},r,n);return 0===Object.keys(i).length?delete u[o]:u[o]=i,u}var y=t=>t.join("."),h="editor-shell:style-clipboard",g=null,m=!1,v=/* @__PURE__ */new Set;function S(){try{return"undefined"==typeof sessionStorage?null:sessionStorage}catch{return null}}function b(){if(!m){m=!0;try{const t=S()?.getItem(h);t&&(g=JSON.parse(t))}catch{g=null}}}function k(t){b(),g={scope:t.scope,sourceType:t.type,sourceLabel:t.label,rows:t.rows.map(e=>{const n=p(t.props,e.path);return{path:[...e.path],kind:e.kind,counted:!1!==e.counted,value:a(n)?f(n):void 0}})};try{S()?.setItem(h,JSON.stringify(g))}catch{}return v.forEach(t=>t()),g}function N(t){return b(),g&&g.scope===t?g:null}function j(t){return v.add(t),()=>{v.delete(t)}}function C(){g=null,m=!0;try{S()?.removeItem(h)}catch{}v.forEach(t=>t())}function w(t,e,n){if(t.kind===e.kind)return null!==e.kind||n;const o=i(t.kind),r=i(e.kind);return!(!o||!r||o.control!==r.control)&&(!a(t.value)||r.values.includes(String(t.value)))}function E(t,e){const n=t.sourceType===e.type,o=new Map(t.rows.map(t=>[y(t.path),t]));let r=e.props,u=0,c=!1;for(const t of e.rows){const e=o.get(y(t.path));if(!e)continue;if(!w(e,t,n))continue;const i=p(r,t.path),s=void 0===e.value?void 0:f(e.value);JSON.stringify(a(i)?i:void 0)!==JSON.stringify(s)&&(r=d(r,t.path,s),c=!0),!1!==t.counted&&(u+=1)}return{props:r,pasted:u,changed:c}}function K(e,n,o,r=t){return 0===e.pasted?r.nothing({source:n,target:o}):r.pasted({count:e.pasted,source:n})}var O="⌥⌘C",J="⌥⌘V";function T(r){const u=r.words??t,c=[];return r.canCopy&&c.push({label:u.copy,icon:/* @__PURE__ */o(e,{}),shortcut:"⌥⌘C",onClick:r.onCopy}),r.held&&c.push({label:u.paste({source:r.held.sourceLabel}),icon:/* @__PURE__ */o(n,{}),shortcut:"⌥⌘V",onClick:r.onPaste}),c}function x(t){if(!t.altKey||t.shiftKey||!t.metaKey&&!t.ctrlKey)return null;const e=t.target;return e&&(e.isContentEditable||"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName)?null:"KeyC"===t.code?"copy":"KeyV"===t.code?"paste":null}export{O as COPY_STYLE_SHORTCUT,J as PASTE_STYLE_SHORTCUT,r as STYLE_KIND,c as choiceKind,C as clearStyle,k as copyStyle,l as fieldKind,N as heldStyle,K as pasteMessage,E as planPaste,T as styleMenuItems,x as styleShortcut,j as subscribeStyle,u as withStyleKind};
|