efficient-easel 0.97.0 → 0.98.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 +2 -2
- package/dist/autosave/index.d.ts +4 -4
- package/dist/{buckets-1vRlQceY.d.ts → buckets-CuLM47h9.d.ts} +1 -1
- package/dist/chrome/chrome.css +25 -16
- package/dist/chrome/index.d.ts +6 -6
- package/dist/chrome/index.js +6 -6
- package/dist/chunk-2UX75JDP.js +1 -0
- package/dist/{chunk-STFMZJKU.js → chunk-66CKSTXP.js} +6 -6
- package/dist/{chunk-YIMRTIBN.js → chunk-IBOFSS56.js} +1 -1
- package/dist/chunk-PI26YXYD.js +462 -0
- package/dist/copy/copy.css +5 -5
- package/dist/copy/index.d.ts +5 -5
- package/dist/copy/index.js +10 -10
- package/dist/drag/drag.css +15 -15
- package/dist/drag/index.js +5 -5
- package/dist/edit-lock/index.d.ts +1 -1
- package/dist/editor/index.d.ts +2 -2
- package/dist/fields/fields.css +126 -12
- package/dist/fields/index.d.ts +59 -11
- package/dist/fields/index.js +40 -33
- package/dist/gold/index.d.ts +1 -1
- package/dist/icons/index.d.ts +26 -5
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/menu/menu.css +4 -4
- package/dist/node-ops/index.js +1 -1
- package/dist/panel/index.d.ts +10 -10
- package/dist/panel/panel.css +34 -25
- package/dist/pick/pick.css +8 -8
- package/dist/rail/index.d.ts +2 -2
- package/dist/rail/index.js +1 -1
- package/dist/rail/rail.css +1 -1
- package/dist/render/index.d.ts +1 -1
- package/dist/shell/index.d.ts +24 -4
- package/dist/shell/index.js +1 -1
- package/dist/shell/shell.css +12 -2
- package/dist/strings/catalogue.d.ts +4 -4
- package/dist/strings/index.d.ts +4 -4
- package/dist/style-clipboard/index.js +1 -1
- package/dist/tree/index.d.ts +1 -1
- package/dist/tree/index.js +1 -1
- package/dist/tree/tree.css +11 -11
- package/dist/{types-CEqUFH2j.d.ts → types-C7HFvdtk.d.ts} +26 -4
- package/dist/{types-CuNiSnX6.d.ts → types-CnRzp9oc.d.ts} +1 -1
- package/dist/{words-CsRWXkY4.d.ts → words-Cqmyey0s.d.ts} +2 -2
- package/dist/{words-DfxEp_RH.d.ts → words-bOMsUJk9.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-FI23ALVJ.js +0 -1
- 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-
|
|
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-
|
|
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
|
package/dist/autosave/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as Autosave, a as AutosaveSnapshot, b as SaveIndicator, c as AutosaveOptions } from '../words-
|
|
2
|
-
export { d as AutosaveClock, S as SaveWords, e as createAutosave, s as saveIndicator } from '../words-
|
|
3
|
-
import '../types-
|
|
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-
|
|
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-
|
|
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
|
*/
|
package/dist/chrome/chrome.css
CHANGED
|
@@ -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-
|
|
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:
|
|
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:
|
|
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:
|
|
159
|
-
padding:
|
|
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:
|
|
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:
|
|
209
|
-
padding:
|
|
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:
|
|
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:
|
|
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:
|
|
408
|
+
gap: 8px;
|
|
409
409
|
flex: 1;
|
|
410
410
|
min-width: 0;
|
|
411
|
-
padding: 4px
|
|
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:
|
|
443
|
-
padding: 12px
|
|
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:
|
|
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
|
|
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);
|
package/dist/chrome/index.d.ts
CHANGED
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
package/dist/chrome/index.js
CHANGED
|
@@ -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-
|
|
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
|
|
9
|
-
return d("button",{type:"button",className:"es-savestate-toggle","aria-pressed":e,title:n,onClick:t,children:i})}var
|
|
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
|
|
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
|
|
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
|
|
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-
|
|
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:
|
|
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:
|
|
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??
|
|
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:[
|
|
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),
|
|
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:
|
|
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};
|