efficient-easel 0.97.0 → 0.99.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.
Files changed (60) hide show
  1. package/README.md +13 -5
  2. package/dist/autosave/index.d.ts +4 -4
  3. package/dist/{buckets-1vRlQceY.d.ts → buckets-CuLM47h9.d.ts} +1 -1
  4. package/dist/chrome/chrome.css +25 -16
  5. package/dist/chrome/index.d.ts +6 -6
  6. package/dist/chrome/index.js +6 -6
  7. package/dist/chunk-2UX75JDP.js +1 -0
  8. package/dist/{chunk-STFMZJKU.js → chunk-66CKSTXP.js} +6 -6
  9. package/dist/{chunk-YIMRTIBN.js → chunk-IBOFSS56.js} +1 -1
  10. package/dist/{chunk-OGZFDJ6G.js → chunk-JE63JHKO.js} +1 -1
  11. package/dist/{chunk-CERTFXCV.js → chunk-JYPOOHII.js} +3 -3
  12. package/dist/chunk-PI26YXYD.js +462 -0
  13. package/dist/chunk-SJQG5ENJ.js +1 -0
  14. package/dist/{chunk-2LUSK32B.js → chunk-ZT7M24XD.js} +1 -1
  15. package/dist/copy/copy.css +5 -5
  16. package/dist/copy/index.d.ts +5 -5
  17. package/dist/copy/index.js +10 -10
  18. package/dist/drag/drag.css +15 -15
  19. package/dist/drag/index.js +5 -5
  20. package/dist/edit-lock/index.d.ts +1 -1
  21. package/dist/editor/index.d.ts +2 -2
  22. package/dist/fields/fields.css +126 -12
  23. package/dist/fields/index.d.ts +59 -11
  24. package/dist/fields/index.js +40 -33
  25. package/dist/gold/index.d.ts +1 -1
  26. package/dist/gold/index.js +1 -1
  27. package/dist/icons/index.d.ts +26 -5
  28. package/dist/icons/index.js +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/markup/index.d.ts +97 -21
  32. package/dist/markup/index.js +1 -1
  33. package/dist/menu/menu.css +4 -4
  34. package/dist/node-ops/index.js +1 -1
  35. package/dist/panel/index.d.ts +10 -10
  36. package/dist/panel/panel.css +34 -25
  37. package/dist/pick/pick.css +8 -8
  38. package/dist/rail/index.d.ts +2 -2
  39. package/dist/rail/index.js +1 -1
  40. package/dist/rail/rail.css +1 -1
  41. package/dist/render/index.d.ts +1 -1
  42. package/dist/shell/index.d.ts +24 -4
  43. package/dist/shell/index.js +1 -1
  44. package/dist/shell/shell.css +12 -2
  45. package/dist/strings/catalogue.d.ts +4 -4
  46. package/dist/strings/catalogue.js +1 -1
  47. package/dist/strings/index.d.ts +4 -4
  48. package/dist/strings/index.js +1 -1
  49. package/dist/style-clipboard/index.js +1 -1
  50. package/dist/tree/index.d.ts +1 -1
  51. package/dist/tree/index.js +1 -1
  52. package/dist/tree/tree.css +11 -11
  53. package/dist/{types-CEqUFH2j.d.ts → types-C7HFvdtk.d.ts} +26 -4
  54. package/dist/{types-CuNiSnX6.d.ts → types-CnRzp9oc.d.ts} +1 -1
  55. package/dist/{words-CsRWXkY4.d.ts → words-Cqmyey0s.d.ts} +2 -2
  56. package/dist/{words-DfxEp_RH.d.ts → words-bOMsUJk9.d.ts} +1 -1
  57. package/package.json +1 -1
  58. package/dist/chunk-6OPSJGAI.js +0 -1
  59. package/dist/chunk-FI23ALVJ.js +0 -1
  60. package/dist/chunk-YNZZYHA4.js +0 -450
package/README.md CHANGED
@@ -5,7 +5,7 @@ the canvas and has no say in what is painted on it: the engine never learns
5
5
  what a section is, and each editor brings its own blocks and its own data.
6
6
 
7
7
  The EFFICIENT editors' shared engine and chrome — the campaign designer
8
- (`efficient-admin-portal`) and the website editor (`efficient-shop`) draw from
8
+ (`efficient-admin-portal`) and the website editor (`efficient-storefront`) draw from
9
9
  one source instead of hand-rolling and drifting — and the engine both run on,
10
10
  which replaced Puck (`@measured/puck`) layer by layer and has carried none of
11
11
  it since 0.93.0.
@@ -18,7 +18,7 @@ it since 0.93.0.
18
18
 
19
19
  ## Why
20
20
 
21
- The storefront editor (`efficient-shop`, Next 16 + Puck) and the campaign
21
+ The storefront editor (`efficient-storefront`, Next 16 + Puck) and the campaign
22
22
  designer (`efficient-admin-portal`, Vite/React) each hand-rolled their own narrow
23
23
  left icon-rail. They had already drifted — button 34px vs 36px, icon 18px vs
24
24
  20px, radius 9 vs 8, a CSS-var accent vs a Tailwind one. `EditorRail` is the one
@@ -214,20 +214,28 @@ email. Framework-free: no React, no DOM, no imports.
214
214
  | `~~x~~` | strikethrough | yes |
215
215
  | `[words](href)` | a link — `http`, `https`, `mailto`, `tel` or no scheme only | yes |
216
216
  | `- ` at the start of a line | a bullet line, one level | yes |
217
+ | `1. ` at the start of a line | a numbered line, one level: 1-3 digits, `. `, words; the number is kept as typed | yes |
218
+ | `[x]{underline}`, `[x]{sup}`, `[x]{sub}` | underline, superscript, subscript (tree only) | not yet — `applyMark` writes them; the buttons come with the final text box |
219
+ | `[x]{color=name}` | a theme colour, by name only (`isColorName`; never a hex) (tree only) | not yet — `applyColor` writes it |
217
220
  | `@@x@@`, `++x++` | Emphasis, Strong (the storefront's old word styles) | no — read only |
218
221
  | `*x*`, `#x#`, `[x]` | legacy accent, bold, italic (per product set) | no — read only |
219
222
 
220
223
  The three names a merchant sees are in `MARK_NAMES`. A run never crosses a line
221
- break, and a run may hold one more run or link (`**bold _with italic_**`); a third
222
- level stays as typed.
224
+ break, and runs, spans and links nest up to four levels
225
+ (`[**_[x]{sup}_**]{color=accent}`); a fifth stays as typed. Any block after `]`
226
+ that is not exactly one of the four (`[x]{foo}`, `[x]{color=#f00}`,
227
+ `[x]{{first_name}}`) is plain text. The spans and the numbered line are read by
228
+ `parseMarkup` only: `tokenizeInline` keeps them as text, so a renderer that has
229
+ not learned them prints the delimiters.
223
230
 
224
231
  | Export | Notes |
225
232
  |---|---|
226
233
  | `parseMarkup(value, rules)` → `MarkupLine[]` | The whole grammar as a tree. Each run keeps the delimiters that were saved. |
227
- | `serializeMarkup(lines)` | The inverse: `serializeMarkup(parseMarkup(s, rules)) === s`, for every string. Pinned by `tests/markup-round-trip.test.ts` (made-up strings in the shape of saved copy). All 917 saved production strings were checked once, off-repo, on 2026-09-29 (editor-shell #89). |
234
+ | `serializeMarkup(lines)` | The inverse: `serializeMarkup(parseMarkup(s, rules)) === s`, for every string. Pinned by `tests/markup-round-trip.test.ts` (made-up strings in the shape of saved copy). All 917 saved production strings were checked off-repo on 2026-09-29 (editor-shell #89), and again for the spans and numbered lines on 2026-10-06 (E1). |
228
235
  | `isSafeLinkHref(href)` | The link rule. Call it before writing any `href`. |
229
236
  | `tokenizeInline(value, rules)`, `stripInline` | The flat reading older renderers use: runs only, no links, no nesting. |
230
237
  | `applyMark(text, start, end, style)`, `MARKUP_TOOLS`, `markupTools`, `COPY_FIELD_TOOLS` | The writer behind a toolbar button, and the button descriptors. |
238
+ | `applyColor(text, start, end, name)`, `isColorName`, `spanFor` | A colour carries a name, so it has its own writer: it writes, renames and (`null`) takes off `[x]{color=name}`, and changes nothing for a name `isColorName` refuses. |
231
239
  | `STANDARD_MARKUP`, `STOREFRONT_MARKUP`, `CAMPAIGN_MARKUP` | The rule sets. The last two add each product's legacy runs. |
232
240
 
233
241
  ## The edit lock — two operators, one document
@@ -1,6 +1,6 @@
1
- import { A as Autosave, a as AutosaveSnapshot, b as SaveIndicator, c as AutosaveOptions } from '../words-CsRWXkY4.js';
2
- export { d as AutosaveClock, S as SaveWords, e as createAutosave, s as saveIndicator } from '../words-CsRWXkY4.js';
3
- import '../types-CuNiSnX6.js';
1
+ import { A as Autosave, a as AutosaveSnapshot, b as SaveIndicator, c as AutosaveOptions } from '../words-Cqmyey0s.js';
2
+ export { d as AutosaveClock, S as SaveWords, e as createAutosave, s as saveIndicator } from '../words-Cqmyey0s.js';
3
+ import '../types-CnRzp9oc.js';
4
4
  import '../types-DNrn_w4V.js';
5
5
  import '../wordFit-9B9nqyf3.js';
6
6
  import 'react';
@@ -29,7 +29,7 @@ declare function useAutosave<T>(options: UseAutosaveOptions<T>): UseAutosave<T>;
29
29
  * async save cannot be finished during unload, which is why the close-tab
30
30
  * handler only warns. Both editors had these same two listeners of their own
31
31
  * (efficient-admin-portal `src/components/email/autosaveTabAway.ts`,
32
- * efficient-shop `components/StorefrontDocumentContext.tsx`).
32
+ * efficient-storefront `components/StorefrontDocumentContext.tsx`).
33
33
  *
34
34
  * - `visibilitychange` to `hidden` is the one that matters, and an ordinary
35
35
  * save: the page is alive, so it completes. Guarded on `hidden` because the
@@ -3,7 +3,7 @@
3
3
  * Layout, Animation. A panel shows only the tabs that hold a setting — an empty
4
4
  * tab is hidden, never drawn (same day).
5
5
  *
6
- * The website editor wrote this list in `efficient-shop/lib/puck/field-groups.ts`
6
+ * The website editor wrote this list in `efficient-storefront/lib/puck/field-groups.ts`
7
7
  * (`BUCKETS`). From 0.43.0 it lives here, so the campaign editor spells its panel
8
8
  * the same four words in the same order instead of keeping a second list.
9
9
  */
@@ -2,7 +2,7 @@
2
2
  * efficient-easel/chrome.css — the editor frame: top bar, device switch, save pill,
3
3
  * flat side panels, resize grips, inspector head.
4
4
  *
5
- * EVERY VALUE HERE WAS READ OFF `efficient-shop/components/storefront-editor.css`
5
+ * EVERY VALUE HERE WAS READ OFF `efficient-storefront/components/storefront-editor.css`
6
6
  * on origin/main (release 14.24.0, 2026-09-17), where the website editor drew
7
7
  * these parts as `.sf-*`. Each `--sf-*` token it spent is an alias of the
8
8
  * `--es-*` token spent here (`--sf-muted: var(--es-muted)` and so on), so the
@@ -35,7 +35,7 @@
35
35
  .es-cluster {
36
36
  display: flex;
37
37
  align-items: center;
38
- gap: 6px;
38
+ gap: 8px;
39
39
  }
40
40
  .es-cluster--right {
41
41
  gap: 8px;
@@ -125,7 +125,7 @@
125
125
  gap: 2px;
126
126
  background: var(--es-track-bg);
127
127
  border-radius: 9px;
128
- padding: 3px;
128
+ padding: 2px;
129
129
  }
130
130
  .es-devseg button {
131
131
  width: 30px;
@@ -155,8 +155,8 @@
155
155
  .es-btn-ghost {
156
156
  display: flex;
157
157
  align-items: center;
158
- gap: 6px;
159
- padding: 7px 12px;
158
+ gap: 8px;
159
+ padding: 8px 12px;
160
160
  border: 1px solid var(--es-btn-border);
161
161
  background: var(--es-panel);
162
162
  border-radius: 8px;
@@ -184,7 +184,7 @@
184
184
  }
185
185
  /* The ONE primary button in the bar (Publish on the website). */
186
186
  .es-btn-primary {
187
- padding: 7px 16px;
187
+ padding: 8px 16px;
188
188
  border: none;
189
189
  background: var(--es-accent);
190
190
  border-radius: 8px;
@@ -205,8 +205,8 @@
205
205
  .es-savestate {
206
206
  display: inline-flex;
207
207
  align-items: center;
208
- gap: 6px;
209
- padding: 5px 10px;
208
+ gap: 8px;
209
+ padding: 4px 12px;
210
210
  border-radius: 8px;
211
211
  font-size: 12px;
212
212
  font-weight: 500;
@@ -331,7 +331,7 @@
331
331
  display: flex;
332
332
  align-items: center;
333
333
  justify-content: space-between;
334
- padding: 13px 14px 11px;
334
+ padding: 12px 16px;
335
335
  flex: none;
336
336
  }
337
337
  /* A panel's own name. States the margin an h2 would otherwise bring. */
@@ -399,16 +399,16 @@ body.es-col-resizing iframe {
399
399
  display: flex;
400
400
  align-items: center;
401
401
  flex: none;
402
- padding: 6px 8px;
402
+ padding: 8px;
403
403
  border-bottom: 1px solid var(--es-divider);
404
404
  }
405
405
  .es-insp-up-btn {
406
406
  display: flex;
407
407
  align-items: center;
408
- gap: 6px;
408
+ gap: 8px;
409
409
  flex: 1;
410
410
  min-width: 0;
411
- padding: 4px 6px;
411
+ padding: 4px 8px;
412
412
  border: 0;
413
413
  border-radius: 6px;
414
414
  background: transparent;
@@ -439,10 +439,19 @@ body.es-col-resizing iframe {
439
439
  .es-insp-head {
440
440
  display: flex;
441
441
  align-items: center;
442
- gap: 10px;
443
- padding: 12px 14px;
442
+ gap: 12px;
443
+ padding: 12px 16px;
444
444
  flex: none;
445
445
  }
446
+ /* THE PANEL'S OWN PADDING IS 16, AND 12 UNDER 260px (one spacing scale, owner
447
+ ruling 2026-10-02). The side panel is the size container (above), so this
448
+ asks the panel's width — a panel is dragged between 220 and 560 — and never
449
+ the screen's. Only the heads are padded here: the settings body's padding
450
+ is the host's. */
451
+ @container (width < 260px) {
452
+ .es-panel-head,
453
+ .es-insp-head { padding-inline: 12px; }
454
+ }
446
455
  .es-insp-chip {
447
456
  width: 26px;
448
457
  height: 26px;
@@ -545,7 +554,7 @@ body.es-col-resizing iframe {
545
554
  .es-notice-actions {
546
555
  display: flex;
547
556
  flex-wrap: wrap;
548
- gap: 6px;
557
+ gap: 8px;
549
558
  }
550
559
  .es-notice-btn {
551
560
  appearance: none;
@@ -553,7 +562,7 @@ body.es-col-resizing iframe {
553
562
  font: inherit;
554
563
  font-size: 12px;
555
564
  font-weight: 500;
556
- padding: 4px 10px;
565
+ padding: 4px 12px;
557
566
  border: 1px solid var(--es-btn-border);
558
567
  border-radius: var(--es-field-radius);
559
568
  background: var(--es-raised);
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
- import { T as TopBarProps, a as TopBarClusterProps, b as TopBarRailProps, E as EditorIconButtonProps, D as DeviceSwitchProps, c as SaveStateProps, d as SaveStateToggleProps, P as PanelResizeHandleProps, I as InspectorHeadProps, e as InspectorIconButtonProps, f as InspectorUpLevelProps, g as EditNoticeProps } from '../types-CuNiSnX6.js';
3
- export { h as DEFAULT_PANEL_W, i as DeviceOption, M as MAX_PANEL_W, j as MIN_PANEL_W, k as PanelSide, l as PanelWidths, S as SaveTone, m as clampPanelWidth, p as panelWidthVars } from '../types-CuNiSnX6.js';
2
+ import { T as TopBarProps, a as TopBarClusterProps, b as TopBarRailProps, E as EditorIconButtonProps, D as DeviceSwitchProps, c as SaveStateProps, d as SaveStateToggleProps, P as PanelResizeHandleProps, I as InspectorHeadProps, e as InspectorIconButtonProps, f as InspectorUpLevelProps, g as EditNoticeProps } from '../types-CnRzp9oc.js';
3
+ export { h as DEFAULT_PANEL_W, i as DeviceOption, M as MAX_PANEL_W, j as MIN_PANEL_W, k as PanelSide, l as PanelWidths, S as SaveTone, m as clampPanelWidth, p as panelWidthVars } from '../types-CnRzp9oc.js';
4
4
  import { LockWords, EditAccess, SaveConflict } from '../edit-lock/index.js';
5
5
  import { N as NoticeWords } from '../words-DagJdwIA.js';
6
6
  export { C as ChromeWords } from '../words-DagJdwIA.js';
@@ -10,7 +10,7 @@ import '../wordFit-9B9nqyf3.js';
10
10
  /**
11
11
  * The editor's top bar — 52px, white, a soft shadow, three clusters.
12
12
  *
13
- * Lifted from the website editor's `.sf-topbar` (efficient-shop). Its order is a
13
+ * Lifted from the website editor's `.sf-topbar` (efficient-storefront). Its order is a
14
14
  * decision, not a layout accident, so it is written here once:
15
15
  *
16
16
  * rail what the LEFT panel contains (Add, Layers, styles…). Exactly the left
@@ -67,7 +67,7 @@ declare function EditorIconButton({ label, onClick, disabled, state, buttonRef,
67
67
  /**
68
68
  * Which device the canvas previews — icon-only, one button held down.
69
69
  *
70
- * Lifted from `efficient-shop/components/DeviceSwitch.tsx`. It takes its devices
70
+ * Lifted from `efficient-storefront/components/DeviceSwitch.tsx`. It takes its devices
71
71
  * as a list because the two editors do not preview the same set: the website
72
72
  * has Desktop / Tablet / Mobile, an email has Desktop / Phone. The drawing, the
73
73
  * size and the pressed state are what must match, and those live here.
@@ -105,7 +105,7 @@ declare function SaveStateToggle({ pressed, title, onToggle, children }: SaveSta
105
105
  /**
106
106
  * A drag grip on a side panel's inner edge.
107
107
  *
108
- * Lifted from `efficient-shop/components/PanelResizeHandle.tsx`; the campaign
108
+ * Lifted from `efficient-storefront/components/PanelResizeHandle.tsx`; the campaign
109
109
  * designer carried its own copy of the same idea. It owns NO width: the editor
110
110
  * holds and persists it, and the grip only reports a new clamped width through
111
111
  * `onResize`. The host renders it as an absolute child of the panel row, pinned
@@ -168,7 +168,7 @@ declare function EditNotice({ access, conflict, noun, onTakeOver, onViewReadOnly
168
168
  * The two editors said this differently: the campaign designer in a strip under
169
169
  * its top bar (`EditLockBanner`, efficient-admin-portal
170
170
  * `src/components/email/CampaignDesigner.tsx`), the website editor in modal
171
- * dialogs over the canvas (`PageEditGuardNotices`, efficient-shop
171
+ * dialogs over the canvas (`PageEditGuardNotices`, efficient-storefront
172
172
  * `components/PageEditGuardNotices.tsx`), which said "choosing one for both is a
173
173
  * design ruling nobody has made". The blueprint made it: a bar, never a dialog,
174
174
  * the save conflict included. A dialog stops the operator reading the very
@@ -1,21 +1,21 @@
1
- import{DEFAULT_NOTICE_WORDS as e,DEFAULT_CHROME_WORDS as n}from"../chunk-KDIVA6WD.js";import{holderOf as t,describeAge as i,nameOrSomeone as a}from"../chunk-TDA4HH54.js";import{DEFAULT_LOCK_WORDS as r}from"../chunk-RE4LP46F.js";import{railTokens as o,EditorRail as s}from"../chunk-YIMRTIBN.js";import{DEFAULT_RAIL_WORDS as l}from"../chunk-2OAZYSWJ.js";import{useWords as c}from"../chunk-MFIRYGHW.js";import"../chunk-BZ5ASXOL.js";import{jsx as d,jsxs as u}from"react/jsx-runtime";import{useRef as m,useState as p,useCallback as v,useEffect as h,useLayoutEffect as b}from"react";function f({children:e}){/* @__PURE__ */
1
+ import{DEFAULT_NOTICE_WORDS as e,DEFAULT_CHROME_WORDS as n}from"../chunk-KDIVA6WD.js";import{holderOf as t,describeAge as i,nameOrSomeone as a}from"../chunk-TDA4HH54.js";import{DEFAULT_LOCK_WORDS as r}from"../chunk-RE4LP46F.js";import{railTokens as o,EditorRail as s}from"../chunk-IBOFSS56.js";import{DEFAULT_RAIL_WORDS as l}from"../chunk-2OAZYSWJ.js";import{useWords as c}from"../chunk-MFIRYGHW.js";import"../chunk-BZ5ASXOL.js";import{jsx as d,jsxs as u}from"react/jsx-runtime";import{useRef as m,useState as p,useCallback as v,useEffect as h,useLayoutEffect as b}from"react";function f({children:e}){/* @__PURE__ */
2
2
  return d("div",{className:"es-topbar",children:e})}function k({kind:e,style:n,children:t}){/* @__PURE__ */
3
3
  return d("div",{className:e?`es-cluster es-cluster--${e}`:"es-cluster",style:n,children:t})}function g(){/* @__PURE__ */
4
4
  return d("div",{className:"es-divider-v","aria-hidden":"true"})}var y="undefined"==typeof window?h:b;function w({items:e,ariaLabel:n}){const t=c("rail",l),i=m(null),[a,r]=p(void 0),u=JSON.stringify(e.map(e=>e.label));return y(()=>{const n=i.current?.querySelector(".es-rail");if(!n)return;const t=document.createElement("canvas").getContext?.("2d")??null,a=()=>{if(!t)return r(void 0);const i=function(e,n,t){const i=parseFloat(getComputedStyle(e).getPropertyValue(n));return Number.isFinite(i)?i:t}(n,"--es-rail-word-size",o.wordFontSize),a=getComputedStyle(n).getPropertyValue("--es-rail-word-weight").trim()||String(o.wordFontWeight),s=getComputedStyle(n.querySelector(".es-rail-btn")??n).fontFamily;t.font=`${a} ${i}px ${s}`;const l=e.map(e=>t.measureText(e.label).width),c=e=>Math.ceil(4*e)/4;r({labelsPx:c(l.reduce((e,n)=>e+n,0)),widestLabelPx:c(Math.max(0,...l))})};a();let s=!0;return document.fonts?.ready.then(()=>s&&a()),()=>{s=!1}},[u]),/* @__PURE__ */d("div",{ref:i,className:"es-cluster es-cluster--rail es-rail-fit",children:/* @__PURE__ */d(s,{items:e,ariaLabel:n??t.label,orientation:"row",wordFit:a})})}function N({label:e,onClick:n,disabled:t,state:i,buttonRef:a,children:r}){/* @__PURE__ */
5
5
  return d("button",{ref:a,type:"button",className:i?`es-iconbtn es-iconbtn--${i}`:"es-iconbtn",title:e,"aria-label":e,disabled:t,onClick:n,children:r})}function x({devices:e,value:t,onChange:i,ariaLabel:a}){const r=c("chrome",n);/* @__PURE__ */
6
6
  return d("div",{className:"es-devseg",role:"group","aria-label":a??r.device,children:e.map(e=>{const n=e.id===t;/* @__PURE__ */
7
7
  return d("button",{type:"button",title:e.label,"aria-label":e.label,"aria-pressed":n,className:n?"is-active":void 0,onClick:()=>{n||i(e.id)},children:e.icon},e.id)})})}var C={idle:"is-quiet",saved:"is-quiet is-saved",saving:"is-saving",error:"is-error",off:"is-off","off-unsaved":"is-off is-unsaved"};function O({tone:e,label:n,counting:t,waitMs:i,ringRef:a,role:r}){/* @__PURE__ */
8
- return u("span",{className:`es-savestate ${C[e]}`,role:r,"aria-live":"polite",children:[/* @__PURE__ */d("span",t?{ref:a,className:"es-savestate-ring is-counting",style:void 0!==i?{"--es-savewait":`${i}ms`}:void 0,"aria-hidden":"true"}:{className:"es-savestate-dot","aria-hidden":"true"}),n]})}function P({pressed:e,title:n,onToggle:t,children:i}){/* @__PURE__ */
9
- return d("button",{type:"button",className:"es-savestate-toggle","aria-pressed":e,title:n,onClick:t,children:i})}var S="es-col-resizing";function L({side:e,width:t,min:i,max:a,defaultWidth:r,label:o,onResize:s}){const l=c("chrome",n),u=m(null),p=v((n,t)=>{const r="left"===e?n+t:n-t;return Math.round(Math.min(a,Math.max(i,r)))},[e,i,a]),b=v(e=>{u.current&&(u.current=null,document.body.classList.remove(S),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))},[]),f=v(e=>{0===e.button&&(u.current={x:e.clientX,w:t,moved:!1},e.currentTarget.setPointerCapture(e.pointerId),document.body.classList.add(S))},[t]),k=v(e=>{const n=u.current;if(!n)return;if(0===e.buttons)return void b(e);const t=e.clientX-n.x;if(!n.moved){if(Math.abs(t)<3)return;n.moved=!0}s(p(n.w,t))},[s,p,b]),g=v(e=>{"ArrowLeft"===e.key?(e.preventDefault(),s(e=>p(e,-16))):"ArrowRight"===e.key?(e.preventDefault(),s(e=>p(e,16))):"Home"===e.key&&(e.preventDefault(),s(r))},[s,p,r]);return h(()=>()=>document.body.classList.remove(S),[]),/* @__PURE__ */d("div",{className:`es-resizer es-resizer--${e}`,role:"separator",tabIndex:0,"aria-orientation":"vertical","aria-label":o,"aria-valuenow":t,"aria-valuemin":i,"aria-valuemax":a,title:l.resize,onPointerDown:f,onPointerMove:k,onPointerUp:b,onPointerCancel:b,onLostPointerCapture:b,onDoubleClick:()=>s(r),onKeyDown:g,children:/* @__PURE__ */d("span",{className:"es-resizer-bar","aria-hidden":"true"})})}function M({icon:e,name:n,kind:t,actions:i}){/* @__PURE__ */
8
+ return u("span",{className:`es-savestate ${C[e]}`,role:r,"aria-live":"polite",children:[/* @__PURE__ */d("span",t?{ref:a,className:"es-savestate-ring is-counting",style:void 0!==i?{"--es-savewait":`${i}ms`}:void 0,"aria-hidden":"true"}:{className:"es-savestate-dot","aria-hidden":"true"}),n]})}function S({pressed:e,title:n,onToggle:t,children:i}){/* @__PURE__ */
9
+ return d("button",{type:"button",className:"es-savestate-toggle","aria-pressed":e,title:n,onClick:t,children:i})}var P="es-col-resizing";function L({side:e,width:t,min:i,max:a,defaultWidth:r,label:o,onResize:s}){const l=c("chrome",n),u=m(null),p=v((n,t)=>{const r="left"===e?n+t:n-t;return Math.round(Math.min(a,Math.max(i,r)))},[e,i,a]),b=v(e=>{u.current&&(u.current=null,document.body.classList.remove(P),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))},[]),f=v(e=>{0===e.button&&(u.current={x:e.clientX,w:t,moved:!1},e.currentTarget.setPointerCapture(e.pointerId),document.body.classList.add(P))},[t]),k=v(e=>{const n=u.current;if(!n)return;if(0===e.buttons)return void b(e);const t=e.clientX-n.x;if(!n.moved){if(Math.abs(t)<3)return;n.moved=!0}s(p(n.w,t))},[s,p,b]),g=v(e=>{"ArrowLeft"===e.key?(e.preventDefault(),s(e=>p(e,-16))):"ArrowRight"===e.key?(e.preventDefault(),s(e=>p(e,16))):"Home"===e.key&&(e.preventDefault(),s(r))},[s,p,r]);return h(()=>()=>document.body.classList.remove(P),[]),/* @__PURE__ */d("div",{className:`es-resizer es-resizer--${e}`,role:"separator",tabIndex:0,"aria-orientation":"vertical","aria-label":o,"aria-valuenow":t,"aria-valuemin":i,"aria-valuemax":a,title:l.resize,onPointerDown:f,onPointerMove:k,onPointerUp:b,onPointerCancel:b,onLostPointerCapture:b,onDoubleClick:()=>s(r),onKeyDown:g,children:/* @__PURE__ */d("span",{className:"es-resizer-bar","aria-hidden":"true"})})}function M({icon:e,name:n,kind:t,actions:i}){/* @__PURE__ */
10
10
  return u("div",{className:"es-insp-head",children:[
11
11
  /* @__PURE__ */d("span",{className:"es-insp-chip","aria-hidden":"true",children:e}),
12
12
  /* @__PURE__ */u("div",{className:"es-insp-titles",children:[
13
13
  /* @__PURE__ */d("h2",{className:"es-insp-name",children:n}),
14
14
  /* @__PURE__ */d("div",{className:"es-insp-kind",children:t})]}),i?/* @__PURE__ */d("div",{className:"es-insp-actions",children:i}):null]})}function B({label:e,title:n,hasPopup:t,onClick:i,disabled:a,danger:r,expanded:o,buttonRef:s,children:l}){/* @__PURE__ */
15
- return d("button",{ref:s,type:"button",className:r?"es-insp-iconbtn es-insp-iconbtn--danger":"es-insp-iconbtn",title:n??e,"aria-label":e,"aria-haspopup":t,"aria-expanded":o,disabled:a,onClick:i,children:l})}function R({name:e,onSelect:t,icon:i,label:a}){const r=c("chrome",n),o=a??r.upLevel;/* @__PURE__ */
15
+ return d("button",{ref:s,type:"button",className:r?"es-insp-iconbtn es-insp-iconbtn--danger":"es-insp-iconbtn",title:n??e,"aria-label":e,"aria-haspopup":t,"aria-expanded":o,disabled:a,onClick:i,children:l})}function $({name:e,onSelect:t,icon:i,label:a}){const r=c("chrome",n),o=a??r.upLevel;/* @__PURE__ */
16
16
  return d("div",{className:"es-insp-up",children:/* @__PURE__ */u("button",{type:"button",className:"es-insp-up-btn",title:o,"aria-label":r.upLevelTo({label:o,name:e}),onClick:t,children:[i?/* @__PURE__ */d("span",{className:"es-insp-up-icon","aria-hidden":"true",children:i}):null,
17
- /* @__PURE__ */d("span",{className:"es-insp-up-name",children:e})]})})}var $={notice:e,lock:r};function D(e,n,r,o=$){const s=o.notice,l=t(e),c={kind:"reload",label:s.reload};if(n){const e=i(n.secondsAgo,o.lock);return{tone:"warning",urgent:!0,lead:n.savedByYou?s.savedByYou({noun:r,when:e}):s.savedByOther({name:a(n.savedBy,o.lock),noun:r,when:e}),body:s.conflictBody,actions:l?[c,{kind:"take-over",label:s.takeOver,title:s.takeOverWhileDeciding}]:[c]}}if(!l)return null;const d=a(l.name,o.lock),u=i(l.secondsSinceSeen,o.lock);switch(e.kind){case"takenover":return{tone:"warning",urgent:!0,lead:s.tookOver({name:d,noun:r,when:i(l.secondsSinceHeld,o.lock)}),body:s.tookOverBody,actions:[{kind:"take-back",label:s.takeBack},c]};case"readonly":return{tone:"neutral",urgent:!1,lead:s.viewingOnly,body:s.viewingOnlyBody({name:d,noun:r,seen:u}),actions:[{kind:"take-over",label:s.takeOver}]};default:return{tone:"warning",urgent:!1,lead:s.editing({name:d,noun:r}),body:s.editingBody({seen:u}),actions:[{kind:"view-read-only",label:s.viewReadOnly},{kind:"take-over",label:s.takeOver,title:s.takeOverTold}]}}}function T({access:n,conflict:t,noun:i,onTakeOver:a,onViewReadOnly:o,onReload:s}){const l=D(n,t,i,{notice:c("notice",e),lock:c("lock",r)});if(!l)return null;const m={reload:s,"take-over":a,"take-back":a,"view-read-only":o};/* @__PURE__ */
17
+ /* @__PURE__ */d("span",{className:"es-insp-up-name",children:e})]})})}var D={notice:e,lock:r};function R(e,n,r,o=D){const s=o.notice,l=t(e),c={kind:"reload",label:s.reload};if(n){const e=i(n.secondsAgo,o.lock);return{tone:"warning",urgent:!0,lead:n.savedByYou?s.savedByYou({noun:r,when:e}):s.savedByOther({name:a(n.savedBy,o.lock),noun:r,when:e}),body:s.conflictBody,actions:l?[c,{kind:"take-over",label:s.takeOver,title:s.takeOverWhileDeciding}]:[c]}}if(!l)return null;const d=a(l.name,o.lock),u=i(l.secondsSinceSeen,o.lock);switch(e.kind){case"takenover":return{tone:"warning",urgent:!0,lead:s.tookOver({name:d,noun:r,when:i(l.secondsSinceHeld,o.lock)}),body:s.tookOverBody,actions:[{kind:"take-back",label:s.takeBack},c]};case"readonly":return{tone:"neutral",urgent:!1,lead:s.viewingOnly,body:s.viewingOnlyBody({name:d,noun:r,seen:u}),actions:[{kind:"take-over",label:s.takeOver}]};default:return{tone:"warning",urgent:!1,lead:s.editing({name:d,noun:r}),body:s.editingBody({seen:u}),actions:[{kind:"view-read-only",label:s.viewReadOnly},{kind:"take-over",label:s.takeOver,title:s.takeOverTold}]}}}function F({access:n,conflict:t,noun:i,onTakeOver:a,onViewReadOnly:o,onReload:s}){const l=R(n,t,i,{notice:c("notice",e),lock:c("lock",r)});if(!l)return null;const m={reload:s,"take-over":a,"take-back":a,"view-read-only":o};/* @__PURE__ */
18
18
  return u("div",{className:`es-notice is-${l.tone}`,role:l.urgent?"alert":"status",children:[
19
19
  /* @__PURE__ */u("span",{className:"es-notice-text",children:[
20
20
  /* @__PURE__ */d("strong",{children:l.lead})," ",l.body]}),
21
- /* @__PURE__ */d("span",{className:"es-notice-actions",children:l.actions.map(e=>/* @__PURE__ */d("button",{type:"button",className:"es-notice-btn",title:e.title,onClick:m[e.kind],children:e.label},e.kind))})]})}var j={left:288,right:320},z=220,F=560;function I(e){return Math.min(560,Math.max(220,Math.round(e)))}function A(e){return{"--es-left-w":`${e.left}px`,"--es-right-w":`${e.right}px`}}export{j as DEFAULT_PANEL_W,x as DeviceSwitch,T as EditNotice,N as EditorIconButton,f as EditorTopBar,M as InspectorHead,B as InspectorIconButton,R as InspectorUpLevel,F as MAX_PANEL_W,z as MIN_PANEL_W,L as PanelResizeHandle,O as SaveState,P as SaveStateToggle,k as TopBarCluster,g as TopBarDivider,w as TopBarRail,I as clampPanelWidth,D as editNotice,A as panelWidthVars};
21
+ /* @__PURE__ */d("span",{className:"es-notice-actions",children:l.actions.map(e=>/* @__PURE__ */d("button",{type:"button",className:"es-notice-btn",title:e.title,onClick:m[e.kind],children:e.label},e.kind))})]})}var T={left:288,right:320},j=220,z=560;function A(e){return Math.min(560,Math.max(220,Math.round(e)))}function I(e){return{"--es-left-w":`${e.left}px`,"--es-right-w":`${e.right}px`}}export{T as DEFAULT_PANEL_W,x as DeviceSwitch,F as EditNotice,N as EditorIconButton,f as EditorTopBar,M as InspectorHead,B as InspectorIconButton,$ as InspectorUpLevel,z as MAX_PANEL_W,j as MIN_PANEL_W,L as PanelResizeHandle,O as SaveState,S as SaveStateToggle,k as TopBarCluster,g as TopBarDivider,w as TopBarRail,A as clampPanelWidth,R as editNotice,I as panelWidthVars};
@@ -0,0 +1 @@
1
+ var e={accent:"#2563eb",accentTint:"#eff6ff",accentTintStrong:"#dbeafe",accentLine:"#bfdbfe",accentText:"#1d4ed8",accentRing:"rgba(37, 99, 235, 0.25)",accentShadow:"rgba(37, 99, 235, 0.35)",onAccent:"#ffffff",appBg:"#f9fafb",previewBg:"#f3f4f6",panel:"#ffffff",raised:"#ffffff",topbarBg:"#ffffff",frameBg:"#ffffff",hover:"#f3f4f6",hatch:"rgba(0, 0, 0, 0.018)",addcardVeil:"rgba(248, 249, 250, 0.66)",fieldBg:"#ffffff",trackBg:"#f3f4f6",inputBorder:"#d1d5db",fieldText:"#1f2937",fieldPlaceholder:"#9ca3af",knob:"#ffffff",text:"#111827",textStrong:"#030712",textSecondary:"#374151",muted:"#6b7280",icon:"#6b7280",disabled:"#9ca3af",divider:"#e5e7eb",line:"#e5e7eb",btnBorder:"#d1d5db",btnText:"#374151",chipBg:"#f3f4f6",chipFg:"#6b7280",brandSquare:"#111827",deviceBorder:"#e5e7eb",toastBg:"#111827",toggleOff:"#d1d5db",scrollbar:"#d1d5db",scrollbarHover:"#9ca3af",danger:"#dc2626",dangerStrong:"#b91c1c",dangerTint:"#fef2f2",warning:"#b45309",previewTint:"#fef3c7",success:"#15803d",panelRadius:12,rowRadius:8,fieldRadius:6,panelGap:12,space2:2,space4:4,space8:8,space12:12,space16:16,space32:32,panelShadow:"0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.06)",topbarShadow:"0 1px 3px rgba(0, 0, 0, 0.06)",raisedShadow:"0 1px 2px rgba(16, 24, 40, 0.1)",font:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif'},a=[e.space2,e.space4,e.space8,e.space12,e.space16,e.space32],s={accent:"--es-accent",accentTint:"--es-accent-tint",accentTintStrong:"--es-accent-tint-strong",accentLine:"--es-accent-line",accentText:"--es-accent-text",accentRing:"--es-accent-ring",accentShadow:"--es-accent-shadow",onAccent:"--es-on-accent",appBg:"--es-app-bg",previewBg:"--es-preview-bg",panel:"--es-panel",raised:"--es-raised",topbarBg:"--es-topbar-bg",frameBg:"--es-frame-bg",hover:"--es-hover",hatch:"--es-hatch",addcardVeil:"--es-addcard-veil",fieldBg:"--es-field-bg",trackBg:"--es-track-bg",inputBorder:"--es-input-border",fieldText:"--es-field-text",fieldPlaceholder:"--es-field-placeholder",knob:"--es-knob",text:"--es-text",textStrong:"--es-text-strong",textSecondary:"--es-text-secondary",muted:"--es-muted",icon:"--es-icon",disabled:"--es-disabled",divider:"--es-divider",line:"--es-line",btnBorder:"--es-btn-border",btnText:"--es-btn-text",chipBg:"--es-chip-bg",chipFg:"--es-chip-fg",brandSquare:"--es-brand-square",deviceBorder:"--es-device-border",toastBg:"--es-toast-bg",toggleOff:"--es-toggle-off",scrollbar:"--es-scrollbar",scrollbarHover:"--es-scrollbar-hover",danger:"--es-danger",dangerStrong:"--es-danger-strong",dangerTint:"--es-danger-tint",warning:"--es-warning",previewTint:"--es-preview-tint",success:"--es-success",panelRadius:"--es-panel-radius",rowRadius:"--es-row-radius",fieldRadius:"--es-field-radius",panelGap:"--es-panel-gap",space2:"--es-space-2",space4:"--es-space-4",space8:"--es-space-8",space12:"--es-space-12",space16:"--es-space-16",space32:"--es-space-32",panelShadow:"--es-panel-shadow",topbarShadow:"--es-topbar-shadow",raisedShadow:"--es-raised-shadow",font:"--es-font"};export{a as SPACING_SCALE,s as shellCssVars,e as shellTokens};
@@ -1,14 +1,14 @@
1
- import{DEFAULT_TREE_WORDS as e}from"./chunk-H4B72XCJ.js";import{ChevronIcon as a}from"./chunk-YNZZYHA4.js";import{jsx as r,jsxs as l,Fragment as n}from"react/jsx-runtime";function s({className:e,children:a,rootProps:l}){/* @__PURE__ */
1
+ import{DEFAULT_TREE_WORDS as e}from"./chunk-H4B72XCJ.js";import{ChevronIcon as a}from"./chunk-PI26YXYD.js";import{jsx as r,jsxs as l,Fragment as n}from"react/jsx-runtime";function s({className:e,children:a,rootProps:l}){/* @__PURE__ */
2
2
  return r("div",{...l,className:e?`es-tree ${e}`:"es-tree",children:a})}function t({children:e}){/* @__PURE__ */
3
3
  return r("div",{className:"es-tree-group",children:e})}function i({children:e}){/* @__PURE__ */
4
- return r("div",{className:"es-subtree",children:e})}var d=e.dragHint;function c({icon:s,name:t,preview:i,selected:d,hidden:c,draggable:o,dragHint:p,dragging:h,drop:m,fold:u,handle:b,actions:N,nameSlot:g,onSelect:k,marks:f,badge:v,trailing:y,children:w,rowProps:x,words:A=e}){const C=["es-tree-row",d?"is-selected":"",c?"is-hidden":"",o?"is-draggable":"",h?"is-dragging":"",m?`is-drop-${m}`:""].filter(Boolean).join(" "),j=/* @__PURE__ */l(n,{children:[
4
+ return r("div",{className:"es-subtree",children:e})}var d=e.dragHint;function c({icon:s,name:t,preview:i,selected:d,hidden:c,draggable:o,dragHint:p,dragging:h,drop:m,fold:u,handle:b,actions:g,nameSlot:N,onSelect:k,marks:f,badge:v,trailing:y,children:w,rowProps:x,words:C=e}){const P=["es-tree-row",d?"is-selected":"",c?"is-hidden":"",o?"is-draggable":"",h?"is-dragging":"",m?`is-drop-${m}`:""].filter(Boolean).join(" "),j=/* @__PURE__ */l(n,{children:[
5
5
  /* @__PURE__ */l("span",{className:"es-tree-name",children:[t,i?/* @__PURE__ */r("span",{className:"es-tree-preview",children:i}):null]}),f?.map(e=>/* @__PURE__ */r("span",{className:"es-tree-mark",title:e.label,"aria-label":e.label,role:"img",children:e.icon},e.key)),null!=v&&!1!==v?/* @__PURE__ */r("span",{className:"es-tree-badge",children:v}):null]});/* @__PURE__ */
6
- return l("div",{...x,className:C,children:[o?
6
+ return l("div",{...x,className:P,children:[o?
7
7
  /* @__PURE__ */l(n,{children:[
8
8
  /* @__PURE__ */r("span",{className:"es-tree-grip","aria-hidden":"true",children:"⋮"}),
9
- /* @__PURE__ */r("span",{className:"es-tree-hint","aria-hidden":"true",children:p??A.dragHint})]}):b?/* @__PURE__ */r("button",{type:"button",className:"es-tree-handle",...b,children:"⋮⋮"}):null,u?/* @__PURE__ */r("button",{type:"button",className:"es-tree-caret","aria-label":u.open?A.collapseNamed({label:u.label}):A.expandNamed({label:u.label}),"aria-expanded":u.open,title:u.open?A.collapse:A.expand,onClick:e=>{e.stopPropagation(),u.onToggle()},children:/* @__PURE__ */r(a,{size:11,strokeWidth:2.6,className:u.open?"es-tree-chev is-open":"es-tree-chev"})}):/* @__PURE__ */r("span",{className:"es-tree-caret-spacer","aria-hidden":"true"}),
9
+ /* @__PURE__ */r("span",{className:"es-tree-hint","aria-hidden":"true",children:p??C.dragHint})]}):b?/* @__PURE__ */r("button",{type:"button",className:"es-tree-handle",...b,children:"⋮⋮"}):null,u?/* @__PURE__ */r("button",{type:"button",className:"es-tree-caret","aria-label":u.open?C.collapseNamed({label:u.label}):C.expandNamed({label:u.label}),"aria-expanded":u.open,title:u.open?C.collapse:C.expand,onClick:e=>{e.stopPropagation(),u.onToggle()},children:/* @__PURE__ */r(a,{size:11,strokeWidth:2.6,className:u.open?"es-tree-chev is-open":"es-tree-chev"})}):/* @__PURE__ */r("span",{className:"es-tree-caret-spacer","aria-hidden":"true"}),
10
10
  /* @__PURE__ */r("span",{className:"es-tree-chip","aria-hidden":"true",children:s}),
11
- /* @__PURE__ */l("span",{className:"es-tree-name-box",children:[g??(k?
12
- /* @__PURE__ */r("button",{type:"button",className:"es-tree-select","aria-current":d?"true":void 0,"aria-keyshortcuts":o?"Alt+ArrowUp Alt+ArrowDown":void 0,onClick:k,children:j}):j),N?/* @__PURE__ */r("span",{className:"es-tree-actions",children:N}):null]}),y?/* @__PURE__ */r("span",{className:"es-tree-trailing",title:y.label,"aria-label":y.label,role:"img",children:y.icon}):null,w]})}function o({kind:e,label:a,onClick:l,pressed:n,disabled:s,children:t}){/* @__PURE__ */
11
+ /* @__PURE__ */l("span",{className:"es-tree-name-box",children:[N??(k?
12
+ /* @__PURE__ */r("button",{type:"button",className:"es-tree-select","aria-current":d?"true":void 0,"aria-keyshortcuts":o?"Alt+ArrowUp Alt+ArrowDown":void 0,onClick:k,children:j}):j),g?/* @__PURE__ */r("span",{className:"es-tree-actions",children:g}):null]}),y?/* @__PURE__ */r("span",{className:"es-tree-trailing",title:y.label,"aria-label":y.label,role:"img",children:y.icon}):null,w]})}function o({kind:e,label:a,onClick:l,pressed:n,disabled:s,children:t}){/* @__PURE__ */
13
13
  return r("button",{type:"button",className:"delete"===e?"es-tree-del":"eye"===e?"es-tree-eye":"es-tree-act",title:a,"aria-label":a,"aria-pressed":n,disabled:s,onClick:e=>{e.stopPropagation(),l()},children:t})}function p({drop:e,onAdd:a,label:l,seamProps:n}){const s=["es-tree-seam",e?"is-drop":"",a?"has-add":""].filter(Boolean).join(" ");/* @__PURE__ */
14
14
  return r("div",{...n,className:s,children:a?/* @__PURE__ */r("button",{type:"button",className:"es-tree-seam-add","aria-label":l,title:l,onClick:a,children:"+"}):null})}export{s as LayersTree,i as Subtree,d as TREE_DRAG_HINT,t as TreeGroupLabel,c as TreeRow,o as TreeRowAction,p as TreeSeam};
@@ -1,3 +1,3 @@
1
1
  import{DEFAULT_RAIL_WORDS as a}from"./chunk-2OAZYSWJ.js";import{wordFitVars as i}from"./chunk-BZ5ASXOL.js";import{jsxs as e,jsx as r}from"react/jsx-runtime";function o({label:a,worded:i,icon:o,active:l,disabled:t,onSelect:n,className:d}){const s=["es-rail-btn",l?"is-active":"",d??""].filter(Boolean).join(" ");/* @__PURE__ */
2
2
  return e("button",{type:"button",className:s,title:a,"aria-label":a,"aria-pressed":"boolean"==typeof l?l:void 0,disabled:t,onClick:t?void 0:n,children:[o,i?/* @__PURE__ */r("span",{className:"es-rail-word","aria-hidden":"true",children:a}):null]})}function l({items:e,ariaLabel:l=a.label,className:t,orientation:n="column",wordFit:d}){const s="row"===n,c=s&&d?d:void 0;/* @__PURE__ */
3
- return r("div",{className:["es-rail",s?"es-rail-row":"",c?"is-measured":"",t??""].filter(Boolean).join(" "),role:"toolbar","aria-orientation":s?"horizontal":"vertical","aria-label":l,style:c&&i(e.length,c),children:e.map(a=>/* @__PURE__ */r(o,{label:a.label,worded:Boolean(c),icon:a.icon,active:a.active,disabled:a.disabled,onSelect:a.onSelect},a.id))})}var t={railWidth:46,railPaddingY:8,railGap:4,railRadius:12,buttonSize:34,buttonRadius:9,iconSize:18,wordPaddingX:8,wordGap:6,wordFontSize:12,wordFontWeight:500,transition:"background 0.12s, color 0.12s",disabledOpacity:.35,color:{background:"#ffffff",shadow:"0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.06)",idle:"#6b7280",hoverBg:"#f3f4f6",hoverFg:"#111827",accent:"#2563eb",accentTint:"#eff6ff"}},n={railWidth:"--es-rail-w",railPaddingY:"--es-rail-pad-y",railGap:"--es-rail-gap",railRadius:"--es-rail-radius",buttonSize:"--es-rail-btn-size",buttonRadius:"--es-rail-btn-radius",iconSize:"--es-rail-icon-size",wordPaddingX:"--es-rail-word-pad-x",wordGap:"--es-rail-word-gap",wordFontSize:"--es-rail-word-size",wordFontWeight:"--es-rail-word-weight",background:"--es-rail-bg",shadow:"--es-rail-shadow",idle:"--es-rail-fg",hoverBg:"--es-rail-hover-bg",hoverFg:"--es-rail-hover-fg",accent:"--es-rail-accent",accentTint:"--es-rail-accent-tint"};export{l as EditorRail,o as EditorRailButton,n as railCssVars,t as railTokens};
3
+ return r("div",{className:["es-rail",s?"es-rail-row":"",c?"is-measured":"",t??""].filter(Boolean).join(" "),role:"toolbar","aria-orientation":s?"horizontal":"vertical","aria-label":l,style:c&&i(e.length,c),children:e.map(a=>/* @__PURE__ */r(o,{label:a.label,worded:Boolean(c),icon:a.icon,active:a.active,disabled:a.disabled,onSelect:a.onSelect},a.id))})}var t={railWidth:46,railPaddingY:8,railGap:4,railRadius:12,buttonSize:34,buttonRadius:9,iconSize:18,wordPaddingX:8,wordGap:8,wordFontSize:12,wordFontWeight:500,transition:"background 0.12s, color 0.12s",disabledOpacity:.35,color:{background:"#ffffff",shadow:"0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.06)",idle:"#6b7280",hoverBg:"#f3f4f6",hoverFg:"#111827",accent:"#2563eb",accentTint:"#eff6ff"}},n={railWidth:"--es-rail-w",railPaddingY:"--es-rail-pad-y",railGap:"--es-rail-gap",railRadius:"--es-rail-radius",buttonSize:"--es-rail-btn-size",buttonRadius:"--es-rail-btn-radius",iconSize:"--es-rail-icon-size",wordPaddingX:"--es-rail-word-pad-x",wordGap:"--es-rail-word-gap",wordFontSize:"--es-rail-word-size",wordFontWeight:"--es-rail-word-weight",background:"--es-rail-bg",shadow:"--es-rail-shadow",idle:"--es-rail-fg",hoverBg:"--es-rail-hover-bg",hoverFg:"--es-rail-hover-fg",accent:"--es-rail-accent",accentTint:"--es-rail-accent-tint"};export{l as EditorRail,o as EditorRailButton,n as railCssVars,t as railTokens};
@@ -1 +1 @@
1
- import{DEFAULT_PICK_WORDS as o}from"./chunk-ZAOM6PFH.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as r}from"./chunk-6WY6ZXJG.js";import{DEFAULT_CANVAS_WORDS as t}from"./chunk-GGTPNGFJ.js";import{DEFAULT_FIELDS_WORDS as m}from"./chunk-SUO5627P.js";import{DEFAULT_TREE_WORDS as n}from"./chunk-H4B72XCJ.js";import{DEFAULT_PANEL_WORDS as c}from"./chunk-7A7O2JWQ.js";import{DEFAULT_NODE_MENU_WORDS as f}from"./chunk-WK3AFPXY.js";import{DEFAULT_SAVE_WORDS as p}from"./chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as s,DEFAULT_NOTICE_WORDS as i}from"./chunk-KDIVA6WD.js";import{DEFAULT_LOCK_WORDS as u}from"./chunk-RE4LP46F.js";import{DEFAULT_RAIL_WORDS as e}from"./chunk-2OAZYSWJ.js";import{DEFAULT_COPY_WORDS as k}from"./chunk-2LUSK32B.js";import{DEFAULT_DRAG_WORDS as j}from"./chunk-O2NLQBFX.js";var h={notice:i,lock:u,save:p,chrome:s,rail:e,tree:n,panel:c,fields:m,pick:o,drag:j,menu:f,styleClipboard:r,copy:k,canvas:t},l=o=>"object"==typeof o&&null!==o;function a(o,r){const t={};for(const m of Object.keys(o)){const n=o[m],c=r[m];null==c?t[m]=n:l(n)?t[m]=l(c)?a(n,c):n:t[m]=typeof c==typeof n?c:n}return t}function y(o,r){return r?a(o,r):o}export{h as DEFAULT_EDITOR_STRINGS,y as mergeEditorStrings};
1
+ import{DEFAULT_PICK_WORDS as o}from"./chunk-ZAOM6PFH.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as r}from"./chunk-6WY6ZXJG.js";import{DEFAULT_CANVAS_WORDS as t}from"./chunk-GGTPNGFJ.js";import{DEFAULT_FIELDS_WORDS as m}from"./chunk-SUO5627P.js";import{DEFAULT_TREE_WORDS as n}from"./chunk-H4B72XCJ.js";import{DEFAULT_PANEL_WORDS as c}from"./chunk-7A7O2JWQ.js";import{DEFAULT_NODE_MENU_WORDS as f}from"./chunk-WK3AFPXY.js";import{DEFAULT_SAVE_WORDS as p}from"./chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as s,DEFAULT_NOTICE_WORDS as i}from"./chunk-KDIVA6WD.js";import{DEFAULT_LOCK_WORDS as u}from"./chunk-RE4LP46F.js";import{DEFAULT_RAIL_WORDS as e}from"./chunk-2OAZYSWJ.js";import{DEFAULT_COPY_WORDS as k}from"./chunk-ZT7M24XD.js";import{DEFAULT_DRAG_WORDS as j}from"./chunk-O2NLQBFX.js";var h={notice:i,lock:u,save:p,chrome:s,rail:e,tree:n,panel:c,fields:m,pick:o,drag:j,menu:f,styleClipboard:r,copy:k,canvas:t},l=o=>"object"==typeof o&&null!==o;function a(o,r){const t={};for(const m of Object.keys(o)){const n=o[m],c=r[m];null==c?t[m]=n:l(n)?t[m]=l(c)?a(n,c):n:t[m]=typeof c==typeof n?c:n}return t}function y(o,r){return r?a(o,r):o}export{h as DEFAULT_EDITOR_STRINGS,y as mergeEditorStrings};
@@ -1,4 +1,4 @@
1
- import{tokenizeInline as e,STANDARD_MARKUP as t}from"./chunk-6OPSJGAI.js";import{jsx as n,jsxs as l}from"react/jsx-runtime";import{useRef as r}from"react";function s(t,n){const l=[];let r=0;for(const s of e(t,n)){if("text"===s.kind){s.text.length>0&&(l.push({kind:"text",text:t.slice(r,r+s.text.length)}),r+=s.text.length);continue}const e=i(t,r,s.kind,s.text,n);if(!e)return[{kind:"text",text:t}];const o=r+e.open.length,c=o+s.text.length,a=c+e.close.length;l.push({kind:"delimiter",text:t.slice(r,o)}),l.push({kind:s.kind,text:t.slice(o,c)}),l.push({kind:"delimiter",text:t.slice(c,a)}),r=a}return l.map(e=>e.text).join("")!==t?[{kind:"text",text:t}]:l}function i(e,t,n,l,r){for(const s of r){if(s.kind!==n)continue;if(!e.startsWith(s.open,t))continue;const r=t+s.open.length;if(e.startsWith(l,r)&&e.startsWith(s.close,r+l.length))return s}return null}function o({value:e,rules:l=t,className:r,layerRef:i}){const o=s(e,l);/* @__PURE__ */
1
+ import{tokenizeInline as e,STANDARD_MARKUP as t}from"./chunk-SJQG5ENJ.js";import{jsx as n,jsxs as l}from"react/jsx-runtime";import{useRef as r}from"react";function s(t,n){const l=[];let r=0;for(const s of e(t,n)){if("text"===s.kind){s.text.length>0&&(l.push({kind:"text",text:t.slice(r,r+s.text.length)}),r+=s.text.length);continue}const e=i(t,r,s.kind,s.text,n);if(!e)return[{kind:"text",text:t}];const o=r+e.open.length,c=o+s.text.length,a=c+e.close.length;l.push({kind:"delimiter",text:t.slice(r,o)}),l.push({kind:s.kind,text:t.slice(o,c)}),l.push({kind:"delimiter",text:t.slice(c,a)}),r=a}return l.map(e=>e.text).join("")!==t?[{kind:"text",text:t}]:l}function i(e,t,n,l,r){for(const s of r){if(s.kind!==n)continue;if(!e.startsWith(s.open,t))continue;const r=t+s.open.length;if(e.startsWith(l,r)&&e.startsWith(s.close,r+l.length))return s}return null}function o({value:e,rules:l=t,className:r,layerRef:i}){const o=s(e,l);/* @__PURE__ */
2
2
  return n("div",{ref:i,className:["es-gold-layer",r??""].filter(Boolean).join(" "),"aria-hidden":"true",children:o.map((e,t)=>function(e,t){const{kind:l,text:r}=e;switch(l){case"delimiter":/* @__PURE__ */
3
3
  return n("span",{className:"es-gold-delim",children:r},t);case"accent":case"highlight":/* @__PURE__ */
4
4
  return n("em",{className:"es-gold-mark es-gold-accent",children:r},t);case"bold":/* @__PURE__ */
@@ -6,8 +6,8 @@ return n("strong",{className:"es-gold-mark es-gold-bold",children:r},t);case"ita
6
6
  return n("em",{className:"es-gold-mark es-gold-italic",children:r},t);case"strike":/* @__PURE__ */
7
7
  return n("s",{className:"es-gold-mark es-gold-strike",children:r},t);case"quiet":/* @__PURE__ */
8
8
  return n("span",{className:"es-gold-mark es-gold-quiet",children:r},t);default:/* @__PURE__ */
9
- return n("span",{className:"es-gold-text",children:r},t)}}(e,t))})}function c({value:e,onInput:s,onCommit:i,onCancel:c,multiline:a=!1,placeholder:u,className:d,rules:f=t,ariaLabel:m,disabled:h=!1,inputRef:g}){const p=r(null),k=r(e),x=r(!1);function v(e){x.current&&(x.current=!1,i?.(e))}/* @__PURE__ */
9
+ return n("span",{className:"es-gold-text",children:r},t)}}(e,t))})}function c({value:e,onInput:s,onCommit:i,onCancel:c,multiline:a=!1,placeholder:u,className:d,rules:f=t,ariaLabel:m,disabled:h=!1,inputRef:g}){const p=r(null),k=r(e),x=r(!1);function N(e){x.current&&(x.current=!1,i?.(e))}/* @__PURE__ */
10
10
  return l("div",{className:["es-gold",a?"es-gold-is-multiline":"es-gold-is-single",h?"es-gold-is-off":"",d??""].filter(Boolean).join(" "),children:[
11
11
  /* @__PURE__ */n(o,{value:e,rules:f,layerRef:p}),u&&""===e?
12
12
  /* @__PURE__ */n("div",{className:"es-gold-placeholder","aria-hidden":"true",children:u}):null,
13
- /* @__PURE__ */n("textarea",{ref:g,className:"es-gold-input",disabled:h,value:e,placeholder:u,"aria-label":m,onChange:function(e){x.current=!0,s(e.currentTarget.value)},onFocus:function(){k.current=e,x.current=!1},onBlur:function(){v(e)},onKeyDown:function(t){return"Escape"===t.key?(t.preventDefault(),x.current=!1,void c?.(k.current)):"Enter"!==t.key||a?void 0:(t.preventDefault(),void v(e))},onScroll:function(e){const t=p.current;t&&(t.scrollTop=e.currentTarget.scrollTop,t.scrollLeft=e.currentTarget.scrollLeft)}})]})}export{o as GoldLayer,c as GoldTextInput,s as goldSegments};
13
+ /* @__PURE__ */n("textarea",{ref:g,className:"es-gold-input",disabled:h,value:e,placeholder:u,"aria-label":m,onChange:function(e){x.current=!0,s(e.currentTarget.value)},onFocus:function(){k.current=e,x.current=!1},onBlur:function(){N(e)},onKeyDown:function(t){return"Escape"===t.key?(t.preventDefault(),x.current=!1,void c?.(k.current)):"Enter"!==t.key||a?void 0:(t.preventDefault(),void N(e))},onScroll:function(e){const t=p.current;t&&(t.scrollTop=e.currentTarget.scrollTop,t.scrollLeft=e.currentTarget.scrollLeft)}})]})}export{o as GoldLayer,c as GoldTextInput,s as goldSegments};