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/fields/fields.css
CHANGED
|
@@ -35,8 +35,13 @@
|
|
|
35
35
|
border-color: var(--es-accent);
|
|
36
36
|
box-shadow: 0 0 0 3px var(--es-accent-ring);
|
|
37
37
|
}
|
|
38
|
+
/* A value nobody may change is still a value somebody has to READ: the grey
|
|
39
|
+
ground says the state, and the ink stays legible on it. It was `--es-muted`,
|
|
40
|
+
4.39:1 on this ground at 12px — a hair under the 4.5:1 WCAG AA asks (second
|
|
41
|
+
host, axe-core, 2026-10-07). The number cell's read-only state below is the
|
|
42
|
+
same rule. Held by ratio in tests/contrast-small-text.test.ts. */
|
|
38
43
|
.es-fin[readonly],
|
|
39
|
-
.es-fin:disabled { background: var(--es-track-bg); color: var(--es-
|
|
44
|
+
.es-fin:disabled { background: var(--es-track-bg); color: var(--es-text-secondary); }
|
|
40
45
|
|
|
41
46
|
.es-fin--area {
|
|
42
47
|
height: auto;
|
|
@@ -75,7 +80,7 @@
|
|
|
75
80
|
border-color: var(--es-focus-line, #60a5fa);
|
|
76
81
|
box-shadow: 0 0 0 2px var(--es-focus-ring, rgba(96, 165, 250, 0.3));
|
|
77
82
|
}
|
|
78
|
-
.es-fnum.is-readonly { background: var(--es-track-bg); color: var(--es-
|
|
83
|
+
.es-fnum.is-readonly { background: var(--es-track-bg); color: var(--es-text-secondary); }
|
|
79
84
|
|
|
80
85
|
.es-fnum-icon { display: flex; align-items: center; flex: none; color: var(--es-field-placeholder); }
|
|
81
86
|
.es-fnum-icon svg { width: 14px; height: 14px; }
|
|
@@ -239,6 +244,90 @@
|
|
|
239
244
|
.es-fsel-option.is-active { background: var(--es-hover); }
|
|
240
245
|
.es-fsel-option.is-chosen { color: var(--es-accent-text); font-weight: 600; }
|
|
241
246
|
.es-fsel-option[aria-disabled='true'] { color: var(--es-disabled); cursor: default; }
|
|
247
|
+
/* A heading over a run of options (`FieldOption.group`): a quiet label above
|
|
248
|
+
its options, and not an option itself — no hover, no pointer. */
|
|
249
|
+
.es-fsel-group-list { margin: 0; padding: 0; list-style: none; }
|
|
250
|
+
.es-fsel-group + .es-fsel-group,
|
|
251
|
+
.es-fsel-option + .es-fsel-group { margin-top: 4px; }
|
|
252
|
+
.es-fsel-group-head {
|
|
253
|
+
padding: 8px 8px 4px;
|
|
254
|
+
font-size: 11px;
|
|
255
|
+
font-weight: 600;
|
|
256
|
+
color: var(--es-muted);
|
|
257
|
+
cursor: default;
|
|
258
|
+
}
|
|
259
|
+
.es-fsel-group-count { margin-left: 4px; font-weight: 400; }
|
|
260
|
+
|
|
261
|
+
/* The editor's one pop-up list (card [MERGE] One Pop-up List For Editor And
|
|
262
|
+
One For Shoppers): what the website editor's own lists drew, here once.
|
|
263
|
+
A row with more than its label lays its parts out in a line. */
|
|
264
|
+
.es-fsel-option--rich { display: flex; align-items: center; gap: 8px; }
|
|
265
|
+
.es-fsel-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
266
|
+
.es-fsel-meta { flex: none; font-size: 11px; font-weight: 400; color: var(--es-muted); }
|
|
267
|
+
.es-fsel-thumb {
|
|
268
|
+
flex: none;
|
|
269
|
+
width: 26px;
|
|
270
|
+
height: 26px;
|
|
271
|
+
overflow: hidden;
|
|
272
|
+
border-radius: var(--es-field-radius);
|
|
273
|
+
background: var(--es-track-bg);
|
|
274
|
+
}
|
|
275
|
+
.es-fsel-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
|
|
276
|
+
/* `multiple`: a tick box per row, drawn (the row is the option, not an <input>). */
|
|
277
|
+
.es-fsel-tick {
|
|
278
|
+
flex: none;
|
|
279
|
+
position: relative;
|
|
280
|
+
box-sizing: border-box;
|
|
281
|
+
width: 14px;
|
|
282
|
+
height: 14px;
|
|
283
|
+
border: 1.5px solid var(--es-input-border);
|
|
284
|
+
border-radius: 3px;
|
|
285
|
+
background: var(--es-field-bg);
|
|
286
|
+
}
|
|
287
|
+
.es-fsel-tick.is-on { border-color: var(--es-accent); background: var(--es-accent); }
|
|
288
|
+
.es-fsel-tick.is-on::after {
|
|
289
|
+
content: '';
|
|
290
|
+
position: absolute;
|
|
291
|
+
left: 3.5px;
|
|
292
|
+
top: 0.5px;
|
|
293
|
+
width: 3.5px;
|
|
294
|
+
height: 7px;
|
|
295
|
+
border-right: 1.6px solid var(--es-on-accent);
|
|
296
|
+
border-bottom: 1.6px solid var(--es-on-accent);
|
|
297
|
+
transform: rotate(45deg);
|
|
298
|
+
}
|
|
299
|
+
/* A tick box says "on" itself, so a ticked row keeps the ordinary ink. */
|
|
300
|
+
.es-fsel-option--rich.is-chosen:has(.es-fsel-tick) { color: var(--es-text); font-weight: 400; }
|
|
301
|
+
/* `searchable`: the box and the list float together; the list inside is plain. */
|
|
302
|
+
.es-fsel-pop {
|
|
303
|
+
position: absolute;
|
|
304
|
+
z-index: 20;
|
|
305
|
+
top: calc(100% + 4px);
|
|
306
|
+
left: 0;
|
|
307
|
+
right: 0;
|
|
308
|
+
display: flex;
|
|
309
|
+
flex-direction: column;
|
|
310
|
+
gap: 4px;
|
|
311
|
+
padding: 4px;
|
|
312
|
+
border: 1px solid var(--es-line);
|
|
313
|
+
border-radius: var(--es-row-radius);
|
|
314
|
+
background: var(--es-raised);
|
|
315
|
+
box-shadow: var(--es-panel-shadow);
|
|
316
|
+
}
|
|
317
|
+
.es-fsel-pop .es-fsel-list {
|
|
318
|
+
position: static;
|
|
319
|
+
padding: 0;
|
|
320
|
+
border: 0;
|
|
321
|
+
border-radius: 0;
|
|
322
|
+
background: none;
|
|
323
|
+
box-shadow: none;
|
|
324
|
+
}
|
|
325
|
+
.es-fsel-empty { padding: 8px; font-size: 12px; color: var(--es-muted); }
|
|
326
|
+
/* `inline`: the list opens in flow and pushes the rows below it down, so a
|
|
327
|
+
panel that scrolls never clips it. */
|
|
328
|
+
.es-fsel--inline .es-fsel-list { position: static; margin-top: 4px; }
|
|
329
|
+
.es-fsel--inline .es-fsel-pop { position: static; margin-top: 4px; }
|
|
330
|
+
.es-fsel--inline .es-fsel-pop .es-fsel-list { margin-top: 0; }
|
|
242
331
|
|
|
243
332
|
/* ── the panel body: the tab strip and the rows (Inspector) ───────────────── */
|
|
244
333
|
|
|
@@ -274,6 +363,16 @@
|
|
|
274
363
|
/* The rows are Layers' rows (tree.css); the list lets them reach the panel's
|
|
275
364
|
edges the way Layers' do, so a row's hover reads as the same row. */
|
|
276
365
|
.es-list-tree { margin: 0 -8px; }
|
|
366
|
+
/* …but the list is NOT a scroll box, as Layers is (`.es-tree { overflow-y:
|
|
367
|
+
auto }`): the panel around it scrolls. A row's drag hint hangs 4px under the
|
|
368
|
+
row, 22px tall, and under the LAST row the tree has less room than that: it
|
|
369
|
+
clipped the hint to 8px (second host, 2026-10-07). What overflowed also
|
|
370
|
+
made the list a scroller of its own inside the panel: a wheel over it moved
|
|
371
|
+
the rows 14px, and it was the nearest box that scrolled, so a drag in the
|
|
372
|
+
list scrolled IT at its edges, not the panel. Measured in Chrome
|
|
373
|
+
(scripts/second-host-clickthrough.mjs). Two classes, so it wins whichever
|
|
374
|
+
sheet loads last. */
|
|
375
|
+
.es-tree.es-list-tree { overflow: visible; }
|
|
277
376
|
|
|
278
377
|
.es-list-add {
|
|
279
378
|
height: 32px;
|
|
@@ -289,31 +388,9 @@
|
|
|
289
388
|
.es-list-add:disabled { color: var(--es-disabled); cursor: default; }
|
|
290
389
|
.es-list-add:focus-visible { outline: 2px solid var(--es-accent); outline-offset: 1px; }
|
|
291
390
|
|
|
292
|
-
/* An item opened: the way back
|
|
391
|
+
/* An item opened: the way back (chrome's InspectorUpLevel, inline), its name,
|
|
392
|
+
its own settings, its two actions. */
|
|
293
393
|
.es-list.is-open { gap: 12px; }
|
|
294
|
-
.es-list-back {
|
|
295
|
-
align-self: flex-start;
|
|
296
|
-
display: inline-flex;
|
|
297
|
-
align-items: center;
|
|
298
|
-
gap: 8px;
|
|
299
|
-
height: 28px;
|
|
300
|
-
padding: 0 8px;
|
|
301
|
-
border: 0;
|
|
302
|
-
border-radius: var(--es-field-radius);
|
|
303
|
-
background: var(--es-hover);
|
|
304
|
-
color: var(--es-text-secondary);
|
|
305
|
-
font: inherit;
|
|
306
|
-
font-size: 12px;
|
|
307
|
-
cursor: pointer;
|
|
308
|
-
}
|
|
309
|
-
.es-list-back:focus-visible { outline: 2px solid var(--es-accent); outline-offset: 1px; }
|
|
310
|
-
.es-list-back-chev {
|
|
311
|
-
width: 6px;
|
|
312
|
-
height: 6px;
|
|
313
|
-
border-left: 1.6px solid currentColor;
|
|
314
|
-
border-bottom: 1.6px solid currentColor;
|
|
315
|
-
transform: rotate(45deg);
|
|
316
|
-
}
|
|
317
394
|
.es-list-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
|
|
318
395
|
.es-list-name { font-size: 14px; font-weight: 600; color: var(--es-text); }
|
|
319
396
|
.es-list-item { min-width: 0; }
|
package/dist/fields/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, KeyboardEvent } from 'react';
|
|
3
3
|
import { S as SettingsBucket } from '../buckets-CuLM47h9.js';
|
|
4
|
-
import { I as InspectorFields, a as InspectorFieldDef, F as FieldRenderer, b as FieldTextProps, c as FieldNumberProps, d as FieldSliderProps, e as
|
|
5
|
-
export { A as ArrayFieldDef, C as CustomFieldDef,
|
|
4
|
+
import { I as InspectorFields, a as InspectorFieldDef, F as FieldRenderer, b as FieldTextProps, c as FieldNumberProps, d as FieldSliderProps, e as FieldSelectManyProps, f as FieldSelectOneProps, g as FieldOption } from '../types-VqL6t5HH.js';
|
|
5
|
+
export { A as ArrayFieldDef, C as CustomFieldDef, h as CustomFieldRenderProps, i as FieldSelectProps, N as NumberFieldDef, O as ObjectFieldDef, R as RadioFieldDef, S as SelectFieldDef, j as SlotFieldDef, T as TextFieldDef, k as TextareaFieldDef } from '../types-VqL6t5HH.js';
|
|
6
6
|
import { R as ResolvableItem } from '../resolve-D68pb3Bx.js';
|
|
7
|
-
export { F as FieldsWords } from '../words-
|
|
7
|
+
export { F as FieldsWords } from '../words-CzoyDNHm.js';
|
|
8
8
|
import '../types-41704JE4.js';
|
|
9
9
|
|
|
10
10
|
interface InspectorProps {
|
|
@@ -98,7 +98,14 @@ interface PlannedRow {
|
|
|
98
98
|
bucket: SettingsBucket;
|
|
99
99
|
}
|
|
100
100
|
interface FieldPlan {
|
|
101
|
-
/**
|
|
101
|
+
/**
|
|
102
|
+
* Every field that is not a marker and not hidden, in the order declared.
|
|
103
|
+
*
|
|
104
|
+
* ⚠️ A `slot` field is among them and draws NOTHING: it is here so its name
|
|
105
|
+
* has a bucket (`bucketsOf`), and `Inspector` leaves it mounted but empty.
|
|
106
|
+
* A host that draws rows of its own, or counts them ("3 settings"), filters
|
|
107
|
+
* `row.field.type !== 'slot'` first. `buckets` already leaves slots out.
|
|
108
|
+
*/
|
|
102
109
|
rows: PlannedRow[];
|
|
103
110
|
/** The tabs to offer: the buckets that hold a row, in the owner's order. */
|
|
104
111
|
buckets: SettingsBucket[];
|
|
@@ -190,7 +197,7 @@ declare function useResolvedFields({ id, node, block, parent, appState }: Resolv
|
|
|
190
197
|
* provider's — `EaselStrings.fields.list` and `.tree` — English with none.
|
|
191
198
|
*/
|
|
192
199
|
interface ListFieldProps<T> {
|
|
193
|
-
/** The list's name, e.g. "Slides". Also the back
|
|
200
|
+
/** The list's name, e.g. "Slides". Also the way back's word: "← Slides" (`InspectorUpLevel`). */
|
|
194
201
|
label: string;
|
|
195
202
|
/** A glyph before the name, as a settings row wears one. */
|
|
196
203
|
icon?: ReactNode;
|
|
@@ -290,7 +297,7 @@ declare function useNumberEntry({ value, onChange, min, max, step, shiftStep, st
|
|
|
290
297
|
* small stacked arrows. What the typing, the keys and the arrows do is
|
|
291
298
|
* {@link useNumberEntry}'s.
|
|
292
299
|
*/
|
|
293
|
-
declare function FieldNumber({ id, value, onChange, min, max, step, shiftStep, styleValue, icon, unit, steppers, placeholder, readOnly, ariaLabel, ariaLabelledBy, }: FieldNumberProps): react.JSX.Element;
|
|
300
|
+
declare function FieldNumber({ id, value, onChange, min, max, step, shiftStep, styleValue, icon, unit, steppers, placeholder, readOnly, ariaLabel, ariaLabelledBy, title, }: FieldNumberProps): react.JSX.Element;
|
|
294
301
|
|
|
295
302
|
/**
|
|
296
303
|
* A slider row (plan step E4), for Site styles and Email styles: the name on
|
|
@@ -300,8 +307,14 @@ declare function FieldNumber({ id, value, onChange, min, max, step, shiftStep, s
|
|
|
300
307
|
* cell does — it is the same {@link useNumberEntry} — and may go past the
|
|
301
308
|
* slider's own travel (`sliderMin` / `sliderMax`); only `min` / `max` hold it.
|
|
302
309
|
* The slider then rests at its end. A grey value follows the style.
|
|
310
|
+
*
|
|
311
|
+
* `auto` (plan step E6, Site styles) is the word for "no number: each section
|
|
312
|
+
* draws its own". The design puts it ON the slider: one spot left of its
|
|
313
|
+
* travel is Auto, and the value reads the word, grey, with no unit. Dragged there, the row
|
|
314
|
+
* writes `undefined`; ↑ from Auto starts at `sliderMin` (one more than Auto is
|
|
315
|
+
* the slider's first number, not `min`), ↓ stays; an emptied box is Auto too.
|
|
303
316
|
*/
|
|
304
|
-
declare function FieldSlider({ id, label, value, onChange, min, max, step, shiftStep, styleValue, unit, sliderMin, sliderMax, readOnly, }: FieldSliderProps): react.JSX.Element;
|
|
317
|
+
declare function FieldSlider({ id, label, value, onChange, min, max, step, shiftStep, styleValue, unit, sliderMin, sliderMax, auto, readOnly, }: FieldSliderProps): react.JSX.Element;
|
|
305
318
|
|
|
306
319
|
/** The option a stored value names: equal by `Object.is`, so `0`, `false` and `''` are values too. */
|
|
307
320
|
declare function optionFor<V>(options: readonly FieldOption<V>[], value: V | undefined): FieldOption<V> | undefined;
|
|
@@ -315,7 +328,32 @@ declare function optionFor<V>(options: readonly FieldOption<V>[], value: V | und
|
|
|
315
328
|
* button its focus back, a letter jumps to the next option that starts with it.
|
|
316
329
|
* A click outside closes it (a CLICK, not a pointerdown: closing early moves the
|
|
317
330
|
* row and loses the press — the colour row learned that in 4.6).
|
|
331
|
+
*
|
|
332
|
+
* Options may sit under headings (`FieldOption.group`, `<optgroup>`'s job): a
|
|
333
|
+
* heading is a `role="group"`'s name, never an option, so the keys and a click
|
|
334
|
+
* pass it by. Without groups the list is exactly the flat one it always was.
|
|
335
|
+
*
|
|
336
|
+
* THE EDITOR'S ONE POP-UP LIST (card [MERGE] One Pop-up List For Editor And One
|
|
337
|
+
* For Shoppers, 2026-10-06). What the website editor's own lists did is here,
|
|
338
|
+
* each optional, and a list that asks for none draws what it always drew:
|
|
339
|
+
*
|
|
340
|
+
* searchable a search box at the top of the open list. It has the focus;
|
|
341
|
+
* letters go into it (no letter jump), ↓ ↑ walk what is left,
|
|
342
|
+
* Enter chooses, Escape closes. Home and End stay the box's.
|
|
343
|
+
* multiple several values. Enter, Space or a click ticks one and the list
|
|
344
|
+
* STAYS open; the save is in the options' order.
|
|
345
|
+
* thumb, meta a picture column and a quiet fact on the option.
|
|
346
|
+
* groupCount a heading says how many of its options are showing.
|
|
347
|
+
* renderOption / renderValue the host draws a row's or the button's content.
|
|
348
|
+
* inline the list opens in flow, for a panel that scrolls.
|
|
349
|
+
*
|
|
350
|
+
* THE OPEN LIST ALWAYS HAS A NAME (second host, 2026-10-07): the host's
|
|
351
|
+
* `ariaLabelledBy`, else its `ariaLabel`, else the BUTTON that opened it —
|
|
352
|
+
* which the row's `<label for>` names. Until then a list given neither was a
|
|
353
|
+
* `role="listbox"` with no accessible name (axe `aria-input-field-name`), and
|
|
354
|
+
* the engine's own settings row gave neither.
|
|
318
355
|
*/
|
|
319
|
-
declare function FieldSelect<V>(
|
|
356
|
+
declare function FieldSelect<V>(props: FieldSelectManyProps<V>): ReactNode;
|
|
357
|
+
declare function FieldSelect<V>(props: FieldSelectOneProps<V>): ReactNode;
|
|
320
358
|
|
|
321
|
-
export { FieldNumber, FieldNumberProps, FieldOption, type FieldPlan, FieldRenderer, FieldSelect,
|
|
359
|
+
export { FieldNumber, FieldNumberProps, FieldOption, type FieldPlan, FieldRenderer, FieldSelect, FieldSelectManyProps, FieldSelectOneProps, FieldSlider, FieldSliderProps, FieldText, FieldTextProps, type FieldsBlock, Inspector, InspectorField, InspectorFieldDef, type InspectorFieldProps, InspectorFields, type InspectorProps, ListField, type ListFieldProps, type NumberEntryOptions, type PlannedRow, type ResolvedFieldsInput, SettingsBucket, bucketsOf, clampNumber, copyItem, insertAt, labelOf, moveTo, optionFor, parseTyped, planFields, removeAt, useNumberEntry, useResolvedFields };
|
package/dist/fields/index.js
CHANGED
|
@@ -1,53 +1,37 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return
|
|
3
|
-
return g("div",{className:`es-fnum${u?" es-fnum--arrows":""}${w?" is-style":""}${h?" is-readonly":""}`,children:[c?/* @__PURE__ */k("span",{className:"es-fnum-icon","aria-hidden":"true",children:c}):null,
|
|
4
|
-
/* @__PURE__ */k("input",{id:e,type:"text",inputMode:"decimal",className:"es-fnum-box","aria-label":f,"aria-labelledby":b,...y,placeholder:y.placeholder??p}),d?/* @__PURE__ */k("span",{className:"es-fnum-unit",children:d}):null,u?/* @__PURE__ */g("span",{className:"es-fnum-arrows",children:[
|
|
5
|
-
/* @__PURE__ */k(S,{dir:1,label:v.more,disabled:h,nudge:x}),
|
|
6
|
-
/* @__PURE__ */k(S,{dir:-1,label:v.less,disabled:h,nudge:x})]}):null]})}function I(e,n){return e.find(e=>Object.is(e.value,n))}function L({id:e,value:n,options:t,onChange:r,placeholder:l,readOnly:a=!1,ariaLabel:i,ariaLabelledBy:s}){const c=m("fields",o),d=y(),[u,p]=f(!1),[h,x]=f(0),w=b(null),N=b(null),C=b(null),O=I(t,n),S=O?t.indexOf(O):-1,$=()=>{a||0===t.length||(x(S>=0?S:0),p(!0))},L=e=>{p(!1),e&&N.current?.focus()},j=e=>{const l=t[e];l&&!l.disabled&&(Object.is(l.value,n)||r(l.value),L(!0))};v(()=>{if(!u)return;C.current?.focus();const e=w.current?.ownerDocument;if(!e)return;const n=e=>{w.current&&!w.current.contains(e.target)&&p(!1)};return e.addEventListener("click",n,!0),()=>e.removeEventListener("click",n,!0)},[u]);const D=e=>{const n=t.length;if(0===n)return;let r=(e%n+n)%n;for(let l=0;l<n&&t[r]?.disabled;l++)r=(r+(e>=h?1:-1)+n)%n;x(r)};/* @__PURE__ */
|
|
7
|
-
return g("div",{className:"es-fsel",ref:w,children:[
|
|
8
|
-
/* @__PURE__ */g("button",{ref:N,id:e,type:"button",className:"es-fin es-fsel-button","aria-haspopup":"listbox","aria-expanded":u,"aria-controls":u?d:void 0,"aria-label":i,"aria-labelledby":s,disabled:a,onClick:()=>u?L(!1):$(),onKeyDown:e=>{"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),$())},children:[
|
|
9
|
-
/* @__PURE__ */k("span",{className:O?"es-fsel-value":"es-fsel-value is-empty",children:O?O.label:l??c.choose}),
|
|
10
|
-
/* @__PURE__ */k("span",{className:"es-fsel-chev","aria-hidden":"true"})]}),u?/* @__PURE__ */k("ul",{ref:C,id:d,role:"listbox",tabIndex:-1,className:"es-fsel-list","aria-activedescendant":`${d}-${h}`,"aria-labelledby":s,"aria-label":s?void 0:i,onKeyDown:e=>{switch(e.key){case"ArrowDown":return e.preventDefault(),void D(h+1);case"ArrowUp":return e.preventDefault(),void D(h-1);case"Home":return e.preventDefault(),void D(0);case"End":return e.preventDefault(),void D(t.length-1);case"Enter":case" ":return e.preventDefault(),void j(h);case"Escape":return e.preventDefault(),e.stopPropagation(),void L(!0);case"Tab":return void L(!1);default:if(1===e.key.length&&/\S/.test(e.key)){const n=e.key.toLowerCase(),r=t.length;for(let e=1;e<=r;e++){const l=(h+e)%r;if(!t[l]?.disabled&&t[l]?.label.toLowerCase().startsWith(n))return void x(l)}}}},children:t.map((e,n)=>/* @__PURE__ */k("li",{id:`${d}-${n}`,role:"option","aria-selected":n===S,"aria-disabled":e.disabled||void 0,className:`es-fsel-option${n===h?" is-active":""}${n===S?" is-chosen":""}`,onMouseEnter:()=>x(n),onClick:()=>j(n),children:e.label},`${n}-${String(e.value)}`))}):null]})}function j({id:e,value:n,onChange:t,placeholder:r,multiline:l=!1,rows:a=3,readOnly:i=!1,ariaLabel:s,ariaLabelledBy:o}){const c=n??"";return l?/* @__PURE__ */k("textarea",{id:e,className:"es-fin es-fin--area",value:c,rows:a,placeholder:r,readOnly:i,"aria-label":s,"aria-labelledby":o,onChange:e=>t(e.target.value)}):/* @__PURE__ */k("input",{id:e,type:"text",className:"es-fin",value:c,placeholder:r,readOnly:i,"aria-label":s,"aria-labelledby":o,onChange:e=>t(e.target.value)})}function D(e,n,t){const r=e.slice();return r.splice(Math.max(0,Math.min(n,r.length)),0,t),r}function M(e,n,t){const r=e.slice(),[l]=r.splice(n,1);return r.splice(Math.max(0,Math.min(t,r.length)),0,l),r}function P(e,n){return e.filter((e,t)=>t!==n)}function A(e){return null===e||"object"!=typeof e?e:JSON.parse(JSON.stringify(e))}function B(){/* @__PURE__ */
|
|
11
|
-
return g("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[
|
|
1
|
+
import{FieldSelect as e}from"../chunk-LGKQXSKO.js";export{FieldSelect,FieldSlider,optionFor}from"../chunk-LGKQXSKO.js";import{LayersTree as n,TreeSeam as l,TreeRow as t,TreeRowAction as r}from"../chunk-V7GIIXFB.js";import{SettingsField as i,SETTINGS_BUCKETS as a,SettingsTabs as o,SettingsGroup as s}from"../chunk-DICUMYMG.js";import{DEFAULT_TREE_WORDS as c}from"../chunk-3EDSDPIP.js";import{DEFAULT_PANEL_WORDS as d}from"../chunk-TRVZ7C23.js";export{useResolvedFields}from"../chunk-YRLPFZW3.js";import{InspectorUpLevel as u}from"../chunk-MH5GUZFQ.js";import"../chunk-ZJEBF4NB.js";import{FieldNumber as m}from"../chunk-A5UK76FC.js";export{FieldNumber,clampNumber,parseTyped,useNumberEntry}from"../chunk-A5UK76FC.js";import{SettingsSegmented as h}from"../chunk-P6O363EE.js";import{DEFAULT_FIELDS_WORDS as p}from"../chunk-LA54QLP5.js";import{useWords as b}from"../chunk-MFIRYGHW.js";import"../chunk-BZ5ASXOL.js";import{useTreeDrag as f,gapToMoveIndex as g}from"../chunk-67GNT6PF.js";import"../chunk-6EIVTKZZ.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";import{useId as v,useState as y}from"react";import{jsx as k,jsxs as x,Fragment as N}from"react/jsx-runtime";function O({id:e,value:n,onChange:l,placeholder:t,multiline:r=!1,rows:i=3,readOnly:a=!1,ariaLabel:o,ariaLabelledBy:s}){const c=n??"";return r?/* @__PURE__ */k("textarea",{id:e,className:"es-fin es-fin--area",value:c,rows:i,placeholder:t,readOnly:a,"aria-label":o,"aria-labelledby":s,onChange:e=>l(e.target.value)}):/* @__PURE__ */k("input",{id:e,type:"text",className:"es-fin",value:c,placeholder:t,readOnly:a,"aria-label":o,"aria-labelledby":s,onChange:e=>l(e.target.value)})}function C(e,n,l){const t=e.slice();return t.splice(Math.max(0,Math.min(n,t.length)),0,l),t}function j(e,n,l){const t=e.slice(),[r]=t.splice(n,1);return t.splice(Math.max(0,Math.min(l,t.length)),0,r),t}function w(e,n){return e.filter((e,l)=>l!==n)}function I(e){return null===e||"object"!=typeof e?e:JSON.parse(JSON.stringify(e))}function F(){/* @__PURE__ */
|
|
2
|
+
return x("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[
|
|
12
3
|
/* @__PURE__ */k("circle",{cx:"9",cy:"6",r:"1.6"}),
|
|
13
4
|
/* @__PURE__ */k("circle",{cx:"15",cy:"6",r:"1.6"}),
|
|
14
5
|
/* @__PURE__ */k("circle",{cx:"9",cy:"12",r:"1.6"}),
|
|
15
6
|
/* @__PURE__ */k("circle",{cx:"15",cy:"12",r:"1.6"}),
|
|
16
7
|
/* @__PURE__ */k("circle",{cx:"9",cy:"18",r:"1.6"}),
|
|
17
|
-
/* @__PURE__ */k("circle",{cx:"15",cy:"18",r:"1.6"})]})}var
|
|
18
|
-
return
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */k("span",{className:"es-list-
|
|
23
|
-
/* @__PURE__ */k("
|
|
24
|
-
/* @__PURE__ */k("
|
|
25
|
-
/* @__PURE__ */k("button",{type:"button",className:"es-fbtn",disabled:!
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/* @__PURE__ */k(
|
|
33
|
-
/* @__PURE__ */k(r,{kind:"plain",label:$.duplicateItem({noun:L}),disabled:!j,onClick:()=>R(l),children:/* @__PURE__ */g("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[
|
|
8
|
+
/* @__PURE__ */k("circle",{cx:"15",cy:"18",r:"1.6"})]})}var $={parentId:"list",slot:"items"};function S({label:e,icon:i,noun:a,items:o,onChange:s,newItem:d,summary:m,itemName:h,thumb:v,min:y=0,max:O,readOnly:S=!1,open:L,onOpen:M,renderItem:P}){const B=b("fields",p).list,K=b("tree",c),A=a??B.item,G=!S&&("number"!=typeof O||o.length<O),Z=!S&&o.length>y,E=(e,n)=>h?h(e,n):B.itemName({noun:A,n:n+1}),T=f({keyOf:e=>String(e),canDrop:(e,n)=>n.parentId===$.parentId&&n.slot===$.slot,onDrop:(e,n)=>{const l=g({...$,index:e},n);l!==e&&s(j(o,e,l))},onStep:(e,n)=>s(j(o,e,e+n)),canStep:(e,n)=>e+n>=0&&e+n<o.length,readOnly:S}),V=e=>{G&&s(C(o,e,d()))},X=e=>{G&&s(C(o,e+1,I(o[e])))},D=e=>{Z&&(s(w(o,e)),null!==L&&M(null))};if(null!==L&&L>=0&&L<o.length){const n=o[L];/* @__PURE__ */
|
|
9
|
+
return x("div",{className:"es-list is-open",children:[
|
|
10
|
+
/* @__PURE__ */k(u,{inline:!0,name:e,onSelect:()=>M(null)}),
|
|
11
|
+
/* @__PURE__ */x("div",{className:"es-list-title",children:[
|
|
12
|
+
/* @__PURE__ */k("span",{className:"es-list-name",children:E(n,L)}),
|
|
13
|
+
/* @__PURE__ */k("span",{className:"es-list-count",children:B.position({n:L+1,total:o.length})})]}),
|
|
14
|
+
/* @__PURE__ */k("div",{className:"es-list-item",children:P(n,L,e=>{const n=o.slice();n[L]=e,s(n)})}),S?null:/* @__PURE__ */x("div",{className:"es-list-item-actions",children:[
|
|
15
|
+
/* @__PURE__ */k("button",{type:"button",className:"es-fbtn",disabled:!G,onClick:()=>X(L),children:B.duplicate}),
|
|
16
|
+
/* @__PURE__ */k("button",{type:"button",className:"es-fbtn es-fbtn--danger",disabled:!Z,onClick:()=>D(L),children:B.deleteItem({noun:A})})]})]})}/* @__PURE__ */
|
|
17
|
+
return x("div",{className:"es-list",children:[
|
|
18
|
+
/* @__PURE__ */x("div",{className:"es-list-head",children:[
|
|
19
|
+
/* @__PURE__ */x("span",{className:"es-list-label",children:[i?/* @__PURE__ */k("span",{className:"es-field-icon","aria-hidden":"true",children:i}):null,e]}),
|
|
20
|
+
/* @__PURE__ */k("span",{className:"es-list-count",children:o.length})]}),o.length?/* @__PURE__ */x(n,{className:"es-list-tree",rootProps:T.rootProps(),children:[o.map((e,n)=>{const i={...$,index:n},a=T.row({item:n,place:i});/* @__PURE__ */
|
|
21
|
+
return x("div",{className:"es-list-entry",children:[n>0?/* @__PURE__ */k(l,{...T.seam({place:i}),onAdd:G?()=>V(n):void 0,label:B.addHere({noun:A})}):null,
|
|
22
|
+
/* @__PURE__ */k(t,{icon:v?v(e,n):/* @__PURE__ */k(F,{}),name:E(e,n),preview:m?m(e,n):void 0,draggable:a.draggable,dragging:a.dragging,drop:a.drop,rowProps:a.rowProps,words:K,onSelect:()=>M(n),actions:S?void 0:/* @__PURE__ */x(N,{children:[
|
|
23
|
+
/* @__PURE__ */k(r,{kind:"plain",label:B.duplicateItem({noun:A}),disabled:!G,onClick:()=>X(n),children:/* @__PURE__ */x("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[
|
|
34
24
|
/* @__PURE__ */k("rect",{x:"9",y:"9",width:"11",height:"11",rx:"2"}),
|
|
35
25
|
/* @__PURE__ */k("path",{d:"M5 15V6a2 2 0 0 1 2-2h9"})]})}),
|
|
36
|
-
/* @__PURE__ */k(r,{kind:"delete",label
|
|
37
|
-
/* @__PURE__ */k(
|
|
38
|
-
return k(s,{id:`${
|
|
39
|
-
return k(
|
|
40
|
-
return k(
|
|
41
|
-
return k(
|
|
42
|
-
return k(
|
|
43
|
-
return k(
|
|
44
|
-
return k(
|
|
45
|
-
return k(
|
|
46
|
-
return
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
return g("div",{className:"es-fslider"+(v?" is-style":""),children:[
|
|
49
|
-
/* @__PURE__ */g("div",{className:"es-fslider-top",children:[
|
|
50
|
-
/* @__PURE__ */k("label",{className:"es-fslider-name",htmlFor:h,children:n}),
|
|
51
|
-
/* @__PURE__ */g("span",{className:"es-fslider-read",children:[
|
|
52
|
-
/* @__PURE__ */k("input",{id:h,type:"text",inputMode:"decimal",className:"es-fslider-value",...f}),c?/* @__PURE__ */k("span",{className:"es-fslider-unit",children:c}):null]})]}),
|
|
53
|
-
/* @__PURE__ */k("input",{type:"range",className:"es-fslider-range",min:d,max:u,step:i,value:w(x,d,u),disabled:m,"aria-label":n,onChange:e=>b(Number(e.target.value))})]})}export{$ as FieldNumber,L as FieldSelect,J as FieldSlider,j as FieldText,H as Inspector,R as InspectorField,F as ListField,U as bucketsOf,w as clampNumber,A as copyItem,D as insertAt,K as labelOf,M as moveTo,I as optionFor,N as parseTyped,X as planFields,P as removeAt,O as useNumberEntry};
|
|
26
|
+
/* @__PURE__ */k(r,{kind:"delete",label:B.deleteItem({noun:A}),disabled:!Z,onClick:()=>D(n),children:/* @__PURE__ */k("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round","aria-hidden":"true",children:/* @__PURE__ */k("path",{d:"M4 7h16M10 11v6M14 11v6M6 7l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-12M9 7V4h6v3"})})})]})})]},n)}),
|
|
27
|
+
/* @__PURE__ */k(l,{...T.seam({place:{...$,index:o.length}})})]}):null,S?null:/* @__PURE__ */k("button",{type:"button",className:"es-list-add",disabled:!G,onClick:()=>V(o.length),children:B.add({noun:A})})]})}var L=(e,n)=>"string"==typeof e.label&&e.label?e.label:n;function M({field:e,name:n,id:l,value:t,onChange:r,readOnly:i,context:a,renderers:o}){const[c,d]=y(!0),u=t&&"object"==typeof t?t:{};/* @__PURE__ */
|
|
28
|
+
return k(s,{id:`${l}-group`,title:L(e,n),open:c,onToggle:d,children:Object.entries(e.objectFields).map(([e,t])=>/* @__PURE__ */k(B,{field:t,name:`${n}.${e}`,id:`${l}-${e}`,value:u[e],onChange:n=>r({...u,[e]:n}),readOnly:i,context:a,renderers:o},e))})}function P({field:e,name:n,id:l,value:t,onChange:r,readOnly:i,context:a,renderers:o,openItem:s,onOpenItem:c}){const[d,u]=y(null),m=c?s??null:d,h=c??u,p=Array.isArray(t)?t:[],b=e.getItemSummary;/* @__PURE__ */
|
|
29
|
+
return k(S,{label:L(e,n),icon:e.icon,noun:"string"==typeof e.noun?e.noun:void 0,items:p,onChange:r,newItem:()=>I({...e.defaultItemProps??{}}),summary:b?(e,n)=>b(e,n):void 0,min:e.min,max:e.max,readOnly:i,open:m,onOpen:h,renderItem:(t,r,s)=>Object.entries(e.arrayFields).map(([e,c])=>/* @__PURE__ */k(B,{field:c,name:`${n}[${r}].${e}`,id:`${l}-${r}-${e}`,value:t?.[e],onChange:n=>s({...t,[e]:n}),readOnly:i,context:a,renderers:o},e))})}function B(n){const{field:l,name:t,id:r,value:a,onChange:o,readOnly:s,context:c,renderers:d}=n;if(!l||l.marker||!1===l.visible)return null;const u=d?.[l.type];if(u)return u({field:l,name:t,id:r,value:a,onChange:o,readOnly:s});switch(l.type){case"custom":{const e={...c,field:l,name:t,id:r,value:a,onChange:o,readOnly:s};return l.render(e)}case"text":case"textarea":/* @__PURE__ */
|
|
30
|
+
return k(i,{label:L(l,t),htmlFor:r,icon:l.icon,hint:l.hint,children:/* @__PURE__ */k(O,{id:r,value:"string"==typeof a?a:null==a?"":String(a),onChange:o,placeholder:l.placeholder,multiline:"textarea"===l.type,readOnly:s})});case"number":/* @__PURE__ */
|
|
31
|
+
return k(i,{label:L(l,t),htmlFor:r,icon:l.icon,hint:l.hint,children:/* @__PURE__ */k(m,{id:r,value:"number"==typeof a?a:void 0,onChange:o,min:l.min,max:l.max,step:l.step,placeholder:l.placeholder,readOnly:s})});case"select":{const n=`${r}-label`;/* @__PURE__ */
|
|
32
|
+
return k(i,{label:L(l,t),labelId:n,htmlFor:r,icon:l.icon,hint:l.hint,children:/* @__PURE__ */k(e,{id:r,value:a,options:l.options,onChange:o,readOnly:s,ariaLabelledBy:n})})}case"radio":/* @__PURE__ */
|
|
33
|
+
return k(i,{label:L(l,t),icon:l.icon,hint:l.hint,children:/* @__PURE__ */k(h,{ariaLabel:L(l,t),value:a,options:l.options.map(e=>({id:e.value,label:e.label,icon:e.icon,disabled:e.disabled||s})),onChange:e=>{s||o(e)}})});case"object":/* @__PURE__ */
|
|
34
|
+
return k(M,{...n,field:l});case"array":/* @__PURE__ */
|
|
35
|
+
return k(P,{...n,field:l});case"slot":return null}}var K=e=>a.includes(e);function A(e){let n=a[0];const l=[],t=/* @__PURE__ */new Set;for(const[r,i]of Object.entries(e))i&&(K(i.bucket)&&(n=i.bucket),i.marker||!1===i.visible||(l.push({name:r,field:i,bucket:n}),"slot"!==i.type&&t.add(n)));return{rows:l,buckets:a.filter(e=>t.has(e))}}function G(e){return new Map(A(e).rows.map(e=>[e.name,e.bucket]))}function Z({fields:e,values:n,onChange:l,readOnly:t=!1,context:r,tab:i,onTab:a,tabs:s=!0,tabIcons:c,renderers:u,idPrefix:m,ariaLabel:h,children:p}){const f=b("panel",d),g=v(),N=m??`es-insp${g.replace(/:/g,"")}`,O=A(e),[C,j]=y(void 0),w=i??C,I=w&&O.buckets.includes(w)?w:O.buckets[0],[F,$]=y(null),S=F&&F.panel===N&&O.rows.some(e=>e.name===F.name)?F:null,L=s&&O.buckets.length>1&&!S,M=`${N}-rows`,P=e=>`${N}-tab-${e.toLowerCase()}`;/* @__PURE__ */
|
|
36
|
+
return x("div",{className:"es-insp",children:[L?/* @__PURE__ */k("div",{className:"es-insp-tabs",children:/* @__PURE__ */k(o,{ariaLabel:h??f.settings,activeId:I,onSelect:e=>{const n=e;void 0===i&&j(n),a?.(n)},items:O.buckets.map(e=>({id:e,label:f.buckets[e],icon:c?.[e],htmlId:P(e),panelId:M}))})}):null,
|
|
37
|
+
/* @__PURE__ */x("div",{className:"es-insp-rows",id:M,role:L?"tabpanel":void 0,"aria-labelledby":L&&I?P(I):void 0,children:[O.rows.map(({name:e,field:i,bucket:a})=>/* @__PURE__ */k("div",{className:"es-insp-row","data-field":e,"data-bucket":a,hidden:!!(S?S.name!==e:L&&a!==I)||void 0,children:/* @__PURE__ */k(B,{field:i,name:e,id:`${N}-${e}`,value:n[e],onChange:n=>l(e,n),readOnly:t,context:r,renderers:u,openItem:S&&S.name===e?S.index:null,onOpenItem:n=>$(null===n?null:{panel:N,name:e,index:n})})},e)),S?null:p]})]})}export{O as FieldText,Z as Inspector,B as InspectorField,S as ListField,G as bucketsOf,I as copyItem,C as insertAt,L as labelOf,j as moveTo,A as planFields,w as removeAt};
|
package/dist/gold/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{GoldLayer,GoldTextInput,goldSegments}from"../chunk-
|
|
1
|
+
export{GoldLayer,GoldTextInput,goldSegments}from"../chunk-QKVR3K73.js";import"../chunk-HDVD27VB.js";var e={accent:"var(--gold, #c9a461)",quiet:"var(--es-muted, #6b7280)",caret:"var(--es-text, #111827)",placeholder:"var(--es-field-placeholder, #9ca3af)",delimiterOpacity:"0.35",delimiterRestingOpacity:"0.25",boldShadow:"0 0 0.4px currentColor",italicDecoration:"underline dotted",strikeDecoration:"line-through",pad:"0"},t={accent:"--es-gold-accent",quiet:"--es-gold-quiet",caret:"--es-gold-caret",placeholder:"--es-gold-placeholder",delimiterOpacity:"--es-gold-delim-opacity",delimiterRestingOpacity:"--es-gold-delim-resting-opacity",boldShadow:"--es-gold-bold-shadow",italicDecoration:"--es-gold-italic-decoration",strikeDecoration:"--es-gold-strike-decoration",pad:"--es-gold-pad"};export{t as goldCssVars,e as goldTokens};
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -167,6 +167,9 @@ declare const iconMeanings: {
|
|
|
167
167
|
readonly "case-normal": "letter case LEFT AS TYPED — `Aa`, the `Normal` option of the Letter case buttons (Normal / Uppercase / Lowercase) on the campaign editor's Text block, and of the storefront part panel's Case strip. The plan calls it sentence case; it changes nothing the merchant typed. A capital A beside a one-storey a. Decided 2026-10-06.";
|
|
168
168
|
readonly "case-upper": "letter case ALL CAPITALS — `AA`, the `Uppercase` option of the Letter case buttons on the campaign editor's Text block, and of the storefront part panel's Case strip. Two capital A's. Decided 2026-10-06.";
|
|
169
169
|
readonly "case-lower": "letter case ALL SMALL LETTERS — `aa`, the `Lowercase` option of the Letter case buttons on the campaign editor's Text block, and of the storefront part panel's Case strip. Two one-storey a's. Decided 2026-10-06.";
|
|
170
|
+
readonly "align-justify": "JUSTIFY — text whose rows run edge to edge. Worn by the Justify button on the final text box's second toolbar row, beside Left, Center and Right, and by the Justify chip of the alignment strip. Three full-width rows on the same three heights the other alignment glyphs use. Decided 2026-10-06 (the design was made final that day).";
|
|
171
|
+
readonly "panel-left": "the LEFT SIDE PANEL itself — worn by the Hide panel button at the end of a left panel's head (`MediaPanelHead`, both editors' SidePanelHeads) and by the Show panel button in the strip a hidden left panel leaves. One control, so one drawing: hiding and showing the panel wear the same glyph. A frame with its left column ruled off. ⛔ NOT an ✕: an ✕ closes a dialog, and a panel head has none (owner, 2026-10-04).";
|
|
172
|
+
readonly "panel-right": "the RIGHT SIDE PANEL itself — the twin of `panel-left` for the settings panel: its head's Hide panel button and the strip a hidden right panel leaves. A frame with its right column ruled off.";
|
|
170
173
|
};
|
|
171
174
|
type IconName = keyof typeof iconMeanings;
|
|
172
175
|
/** Delete · keep · efficient-shop · components/UiIcon.tsx:99 */
|
|
@@ -491,5 +494,11 @@ declare function CaseNormalIcon({ size, ...rest }: IconProps): react.JSX.Element
|
|
|
491
494
|
declare function CaseUpperIcon({ size, ...rest }: IconProps): react.JSX.Element;
|
|
492
495
|
/** letter case ALL SMALL LETTERS — `aa`, the `Lowercase` option of the Letter case buttons on the campaign editor's Text block, and of the storefront part panel's Case strip. Two one-storey a's. Decided 2026-10-06. · picked · efficient-easel · [ADD] Text Box Icons For The Final Design, 2026-10-06 (step E2 of the campaign-editor plan Lewis approved that day). Final design: https://claude.ai/artifact/Mpzgvi2sZmTCmciZW36w5H. The Text block's toolbar is two rows of 32px glyph buttons with the names only in the tooltip and the aria-label; the number row is Font size · Line spacing · Letter spacing · Paragraph spacing. Checked at 16px beside every neighbour named here before it was committed. MOVED FROM THE STOREFRONT: efficient-storefront `components/PartGlyphs.tsx` `CaseGlyph` (`aa`, live text); the set is the one source now. ⛔ NOT `case-normal`, a capital A beside the a. ⛔ NOT `quiet`, ONE small a drawn under the set's box, which is the quiet mark on a phrase. ⛔ NOT `case`, the row's T + a. A 3-unit channel between the first stem and the second bowl keeps them two letters at 16px. */
|
|
493
496
|
declare function CaseLowerIcon({ size, ...rest }: IconProps): react.JSX.Element;
|
|
497
|
+
/** JUSTIFY — text whose rows run edge to edge. Worn by the Justify button on the final text box's second toolbar row, beside Left, Center and Right, and by the Justify chip of the alignment strip. Three full-width rows on the same three heights the other alignment glyphs use. Decided 2026-10-06 (the design was made final that day). · new · efficient-easel · E5b, the final text box, design final 2026-10-06: https://claude.ai/artifact/Mpzgvi2sZmTCmciZW36w5H — its toolbar draws Justify as `M4 6.5h16M4 12h16M4 17.5h16`, and this is that drawing. ⛔ NOT `align-separate`, whose own entry says "NOT `justify`": it opens a channel down the middle of each row, which is where rows SIT, not how text runs. The package drew Justify with it until now; that was a borrowed meaning. ⛔ NOT `text-lines`, three rules with a short last one, which is a paragraph of body copy. ⛔ NOT `align-left`, whose rows are of three lengths. */
|
|
498
|
+
declare function AlignJustifyIcon({ size, ...rest }: IconProps): react.JSX.Element;
|
|
499
|
+
/** the LEFT SIDE PANEL itself — worn by the Hide panel button at the end of a left panel's head (`MediaPanelHead`, both editors' SidePanelHeads) and by the Show panel button in the strip a hidden left panel leaves. One control, so one drawing: hiding and showing the panel wear the same glyph. A frame with its left column ruled off. ⛔ NOT an ✕: an ✕ closes a dialog, and a panel head has none (owner, 2026-10-04). · new · efficient-easel · card [MERGE] One Media Panel Head For Both Editors, 2026-10-06 — the drawing both editors already carried twice: efficient-storefront components/PanelToggleIcon.tsx and efficient-admin-portal src/components/email/CampaignTopBar.tsx `PanelToggleGlyph`. */
|
|
500
|
+
declare function PanelLeftIcon({ size, ...rest }: IconProps): react.JSX.Element;
|
|
501
|
+
/** the RIGHT SIDE PANEL itself — the twin of `panel-left` for the settings panel: its head's Hide panel button and the strip a hidden right panel leaves. A frame with its right column ruled off. · new · efficient-easel · card [MERGE] One Media Panel Head For Both Editors, 2026-10-06 — the drawing both editors already carried twice: efficient-storefront components/PanelToggleIcon.tsx and efficient-admin-portal src/components/email/CampaignTopBar.tsx `PanelToggleGlyph`. */
|
|
502
|
+
declare function PanelRightIcon({ size, ...rest }: IconProps): react.JSX.Element;
|
|
494
503
|
|
|
495
|
-
export { AccentIcon, AccountIcon, AddIcon, AlignCenterIcon, AlignLeftIcon, AlignRightIcon, AlignSeparateIcon, AnchorIcon, AnimationIcon, BackgroundIcon, BellIcon, BlackAndWhiteIcon, BlockBadgeIcon, BlockBannerIcon, BlockBoxIcon, BlockButtonIcon, BlockColumnIcon, BlockCouponIcon, BlockDividerIcon, BlockFooterIcon, BlockHeadingIcon, BlockIncludedListIcon, BlockLayeredImagesIcon, BlockProductIcon, BlockSectionIcon, BlockSocialIcon, BlockSpacerIcon, BlockTextIcon, BlockVideoIcon, BlogPostIcon, BoldIcon, BreadcrumbIcon, ButtonArrowIcon, ButtonIcon, CarIcon, CartIcon, CaseIcon, CaseLowerIcon, CaseNormalIcon, CaseUpperIcon, CategoryIcon, ChatIcon, CheckIcon, ChevronIcon, ClearMarksIcon, ClockIcon, CloseIcon, ColumnGapIcon, ColumnWidthsIcon, ColumnsIcon, ContrastIcon, CopyIcon, CopyStyleIcon, CopyToPageIcon, CornerIcon, DesktopIcon, DiagramIcon, DirectionDownIcon, DirectionIcon, DirectionLeftIcon, DirectionRightIcon, DirectionUpIcon, DollarIcon, DragIcon, DropIcon, DuplicateIcon, EmphasisIcon, ExternalIcon, EyeIcon, EyeOffIcon, FinishIcon, FullWidthIcon, GapIcon, GlobeIcon, GridIcon, GroundIcon, HashIcon, HeadquartersIcon, HeightIcon, HoverIcon, type IconName, type IconProps, ImageIcon, ItalicIcon, LayersIcon, LayoutIcon, LetterSpacingIcon, LineBetweenIcon, LineStyleIcon, LinkIcon, ListIcon, LocationIcon, LockIcon, LogoIcon, MediaIcon, MenuIcon, MetaIcon, MoveDownIcon, MoveUpIcon, NoteIcon, NudgeIcon, NumberedListIcon, OpacityIcon, OwnTextIcon, PaddingBottomIcon, PaddingLeftIcon, PaddingRightIcon, PaddingTopIcon, PaddingXIcon, PaddingYIcon, PageIcon, ParagraphSpacingIcon, PasteIcon, PasteStyleIcon, PhoneIcon, PlacementIcon, PlayIcon, PlusMinusIcon, ProductFieldIcon, ProductSizeIcon, QuietIcon, RadiusIcon, RedoIcon, RenameIcon, RevertIcon, RotateIcon, ScrollPointIcon, SearchIcon, SendIcon, SettingsIcon, ShadowIcon, SitemapIcon, SortIcon, SpecTableIcon, SquareIcon, StateIcon, StickyIcon, StrikeIcon, StylesIcon, SubscriptIcon, SuperscriptIcon, TabletIcon, TabsIcon, TagIcon, TemplateIcon, TextColorIcon, TextLinesIcon, TextSizeIcon, TextSmallIcon, ThemeIcon, TitleIcon, TrashIcon, TriggerIcon, TypeIcon, UnderlineIcon, UndoIcon, VAlignIcon, WarningIcon, WeightIcon, WheelIcon, WidthIcon, WordsFromIcon, WrapIcon, iconMeanings };
|
|
504
|
+
export { AccentIcon, AccountIcon, AddIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, AlignSeparateIcon, AnchorIcon, AnimationIcon, BackgroundIcon, BellIcon, BlackAndWhiteIcon, BlockBadgeIcon, BlockBannerIcon, BlockBoxIcon, BlockButtonIcon, BlockColumnIcon, BlockCouponIcon, BlockDividerIcon, BlockFooterIcon, BlockHeadingIcon, BlockIncludedListIcon, BlockLayeredImagesIcon, BlockProductIcon, BlockSectionIcon, BlockSocialIcon, BlockSpacerIcon, BlockTextIcon, BlockVideoIcon, BlogPostIcon, BoldIcon, BreadcrumbIcon, ButtonArrowIcon, ButtonIcon, CarIcon, CartIcon, CaseIcon, CaseLowerIcon, CaseNormalIcon, CaseUpperIcon, CategoryIcon, ChatIcon, CheckIcon, ChevronIcon, ClearMarksIcon, ClockIcon, CloseIcon, ColumnGapIcon, ColumnWidthsIcon, ColumnsIcon, ContrastIcon, CopyIcon, CopyStyleIcon, CopyToPageIcon, CornerIcon, DesktopIcon, DiagramIcon, DirectionDownIcon, DirectionIcon, DirectionLeftIcon, DirectionRightIcon, DirectionUpIcon, DollarIcon, DragIcon, DropIcon, DuplicateIcon, EmphasisIcon, ExternalIcon, EyeIcon, EyeOffIcon, FinishIcon, FullWidthIcon, GapIcon, GlobeIcon, GridIcon, GroundIcon, HashIcon, HeadquartersIcon, HeightIcon, HoverIcon, type IconName, type IconProps, ImageIcon, ItalicIcon, LayersIcon, LayoutIcon, LetterSpacingIcon, LineBetweenIcon, LineStyleIcon, LinkIcon, ListIcon, LocationIcon, LockIcon, LogoIcon, MediaIcon, MenuIcon, MetaIcon, MoveDownIcon, MoveUpIcon, NoteIcon, NudgeIcon, NumberedListIcon, OpacityIcon, OwnTextIcon, PaddingBottomIcon, PaddingLeftIcon, PaddingRightIcon, PaddingTopIcon, PaddingXIcon, PaddingYIcon, PageIcon, PanelLeftIcon, PanelRightIcon, ParagraphSpacingIcon, PasteIcon, PasteStyleIcon, PhoneIcon, PlacementIcon, PlayIcon, PlusMinusIcon, ProductFieldIcon, ProductSizeIcon, QuietIcon, RadiusIcon, RedoIcon, RenameIcon, RevertIcon, RotateIcon, ScrollPointIcon, SearchIcon, SendIcon, SettingsIcon, ShadowIcon, SitemapIcon, SortIcon, SpecTableIcon, SquareIcon, StateIcon, StickyIcon, StrikeIcon, StylesIcon, SubscriptIcon, SuperscriptIcon, TabletIcon, TabsIcon, TagIcon, TemplateIcon, TextColorIcon, TextLinesIcon, TextSizeIcon, TextSmallIcon, ThemeIcon, TitleIcon, TrashIcon, TriggerIcon, TypeIcon, UnderlineIcon, UndoIcon, VAlignIcon, WarningIcon, WeightIcon, WheelIcon, WidthIcon, WordsFromIcon, WrapIcon, iconMeanings };
|
package/dist/icons/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AccentIcon,AccountIcon,AddIcon,AlignCenterIcon,AlignLeftIcon,AlignRightIcon,AlignSeparateIcon,AnchorIcon,AnimationIcon,BackgroundIcon,BellIcon,BlackAndWhiteIcon,BlockBadgeIcon,BlockBannerIcon,BlockBoxIcon,BlockButtonIcon,BlockColumnIcon,BlockCouponIcon,BlockDividerIcon,BlockFooterIcon,BlockHeadingIcon,BlockIncludedListIcon,BlockLayeredImagesIcon,BlockProductIcon,BlockSectionIcon,BlockSocialIcon,BlockSpacerIcon,BlockTextIcon,BlockVideoIcon,BlogPostIcon,BoldIcon,BreadcrumbIcon,ButtonArrowIcon,ButtonIcon,CarIcon,CartIcon,CaseIcon,CaseLowerIcon,CaseNormalIcon,CaseUpperIcon,CategoryIcon,ChatIcon,CheckIcon,ChevronIcon,ClearMarksIcon,ClockIcon,CloseIcon,ColumnGapIcon,ColumnWidthsIcon,ColumnsIcon,ContrastIcon,CopyIcon,CopyStyleIcon,CopyToPageIcon,CornerIcon,DesktopIcon,DiagramIcon,DirectionDownIcon,DirectionIcon,DirectionLeftIcon,DirectionRightIcon,DirectionUpIcon,DollarIcon,DragIcon,DropIcon,DuplicateIcon,EmphasisIcon,ExternalIcon,EyeIcon,EyeOffIcon,FinishIcon,FullWidthIcon,GapIcon,GlobeIcon,GridIcon,GroundIcon,HashIcon,HeadquartersIcon,HeightIcon,HoverIcon,ImageIcon,ItalicIcon,LayersIcon,LayoutIcon,LetterSpacingIcon,LineBetweenIcon,LineStyleIcon,LinkIcon,ListIcon,LocationIcon,LockIcon,LogoIcon,MediaIcon,MenuIcon,MetaIcon,MoveDownIcon,MoveUpIcon,NoteIcon,NudgeIcon,NumberedListIcon,OpacityIcon,OwnTextIcon,PaddingBottomIcon,PaddingLeftIcon,PaddingRightIcon,PaddingTopIcon,PaddingXIcon,PaddingYIcon,PageIcon,ParagraphSpacingIcon,PasteIcon,PasteStyleIcon,PhoneIcon,PlacementIcon,PlayIcon,PlusMinusIcon,ProductFieldIcon,ProductSizeIcon,QuietIcon,RadiusIcon,RedoIcon,RenameIcon,RevertIcon,RotateIcon,ScrollPointIcon,SearchIcon,SendIcon,SettingsIcon,ShadowIcon,SitemapIcon,SortIcon,SpecTableIcon,SquareIcon,StateIcon,StickyIcon,StrikeIcon,StylesIcon,SubscriptIcon,SuperscriptIcon,TabletIcon,TabsIcon,TagIcon,TemplateIcon,TextColorIcon,TextLinesIcon,TextSizeIcon,TextSmallIcon,ThemeIcon,TitleIcon,TrashIcon,TriggerIcon,TypeIcon,UnderlineIcon,UndoIcon,VAlignIcon,WarningIcon,WeightIcon,WheelIcon,WidthIcon,WordsFromIcon,WrapIcon,iconMeanings}from"../chunk-
|
|
1
|
+
export{AccentIcon,AccountIcon,AddIcon,AlignCenterIcon,AlignJustifyIcon,AlignLeftIcon,AlignRightIcon,AlignSeparateIcon,AnchorIcon,AnimationIcon,BackgroundIcon,BellIcon,BlackAndWhiteIcon,BlockBadgeIcon,BlockBannerIcon,BlockBoxIcon,BlockButtonIcon,BlockColumnIcon,BlockCouponIcon,BlockDividerIcon,BlockFooterIcon,BlockHeadingIcon,BlockIncludedListIcon,BlockLayeredImagesIcon,BlockProductIcon,BlockSectionIcon,BlockSocialIcon,BlockSpacerIcon,BlockTextIcon,BlockVideoIcon,BlogPostIcon,BoldIcon,BreadcrumbIcon,ButtonArrowIcon,ButtonIcon,CarIcon,CartIcon,CaseIcon,CaseLowerIcon,CaseNormalIcon,CaseUpperIcon,CategoryIcon,ChatIcon,CheckIcon,ChevronIcon,ClearMarksIcon,ClockIcon,CloseIcon,ColumnGapIcon,ColumnWidthsIcon,ColumnsIcon,ContrastIcon,CopyIcon,CopyStyleIcon,CopyToPageIcon,CornerIcon,DesktopIcon,DiagramIcon,DirectionDownIcon,DirectionIcon,DirectionLeftIcon,DirectionRightIcon,DirectionUpIcon,DollarIcon,DragIcon,DropIcon,DuplicateIcon,EmphasisIcon,ExternalIcon,EyeIcon,EyeOffIcon,FinishIcon,FullWidthIcon,GapIcon,GlobeIcon,GridIcon,GroundIcon,HashIcon,HeadquartersIcon,HeightIcon,HoverIcon,ImageIcon,ItalicIcon,LayersIcon,LayoutIcon,LetterSpacingIcon,LineBetweenIcon,LineStyleIcon,LinkIcon,ListIcon,LocationIcon,LockIcon,LogoIcon,MediaIcon,MenuIcon,MetaIcon,MoveDownIcon,MoveUpIcon,NoteIcon,NudgeIcon,NumberedListIcon,OpacityIcon,OwnTextIcon,PaddingBottomIcon,PaddingLeftIcon,PaddingRightIcon,PaddingTopIcon,PaddingXIcon,PaddingYIcon,PageIcon,PanelLeftIcon,PanelRightIcon,ParagraphSpacingIcon,PasteIcon,PasteStyleIcon,PhoneIcon,PlacementIcon,PlayIcon,PlusMinusIcon,ProductFieldIcon,ProductSizeIcon,QuietIcon,RadiusIcon,RedoIcon,RenameIcon,RevertIcon,RotateIcon,ScrollPointIcon,SearchIcon,SendIcon,SettingsIcon,ShadowIcon,SitemapIcon,SortIcon,SpecTableIcon,SquareIcon,StateIcon,StickyIcon,StrikeIcon,StylesIcon,SubscriptIcon,SuperscriptIcon,TabletIcon,TabsIcon,TagIcon,TemplateIcon,TextColorIcon,TextLinesIcon,TextSizeIcon,TextSmallIcon,ThemeIcon,TitleIcon,TrashIcon,TriggerIcon,TypeIcon,UnderlineIcon,UndoIcon,VAlignIcon,WarningIcon,WeightIcon,WheelIcon,WidthIcon,WordsFromIcon,WrapIcon,iconMeanings}from"../chunk-6EIVTKZZ.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { EaselRail, EaselRailButton,
|
|
1
|
+
export { EaselRail, EaselRailButton, RailTokens, railCssVars, railTokens } from './rail/index.js';
|
|
2
2
|
export { AddIcon, LayersIcon, MediaIcon, PageIcon as PagesIcon, IconProps as RailIconProps, SitemapIcon, StylesIcon } from './icons/index.js';
|
|
3
3
|
export { W as WordFit } from './wordFit-D4S36PvB.js';
|
|
4
|
-
export { E as EaselRailButtonProps, a as EaselRailItem, b as EaselRailOrientation, c as EaselRailProps
|
|
4
|
+
export { E as EaselRailButtonProps, a as EaselRailItem, b as EaselRailOrientation, c as EaselRailProps } from './types-DWS-s9z-.js';
|
|
5
5
|
export { SPACING_SCALE, ShellTokens, shellCssVars, shellTokens } from './shell/index.js';
|
|
6
6
|
import 'react';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-OWBO4WKA.js";export{SPACING_SCALE,shellCssVars,shellTokens}from"./chunk-2UX75JDP.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";
|