efficient-easel 19.2.0 → 19.3.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/dist/{chunk-3Z2MVLCD.js → chunk-4ES5JGGX.js} +1 -1
- package/dist/chunk-7OKL7HDV.js +1 -0
- package/dist/{chunk-BQMZ2YAF.js → chunk-A6CY3TQ5.js} +1 -1
- package/dist/chunk-CNKVVHDA.js +63 -0
- package/dist/chunk-FIVU2COQ.js +2 -0
- package/dist/{chunk-RTCNJRF6.js → chunk-FMZGR7EG.js} +1 -1
- package/dist/chunk-H5YLVKGA.js +1 -0
- package/dist/{chunk-UZXGXMNO.js → chunk-KOVJODTY.js} +11 -11
- package/dist/{chunk-45NZSAND.js → chunk-KWE5U6CE.js} +1 -1
- package/dist/{chunk-6U6AISPX.js → chunk-ME4V6PML.js} +4 -4
- package/dist/chunk-OGBYHQE6.js +5 -0
- package/dist/chunk-P5VYGWYO.js +1 -0
- package/dist/{chunk-G3GWAP5R.js → chunk-QAJAEWCZ.js} +1 -1
- package/dist/chunk-U6LF5YVK.js +8 -0
- package/dist/chunk-VULUDKA3.js +21 -0
- package/dist/chunk-YOXKBOZX.js +1 -0
- package/dist/{chunk-WXFZD7WC.js → chunk-ZKY45F5G.js} +1 -1
- package/dist/chunk-ZO3UUK45.js +18 -0
- package/dist/{chunk-2XMHLXMA.js → chunk-ZOBSIXRD.js} +1 -1
- package/dist/copy/index.js +14 -14
- package/dist/drag/index.js +1 -1
- package/dist/easel/index.js +1 -1
- package/dist/fields/index.js +1 -1
- package/dist/menu/index.d.ts +3 -3
- package/dist/menu/index.js +1 -1
- package/dist/node-ops/index.d.ts +11 -7
- package/dist/node-ops/index.js +1 -1
- package/dist/panel/index.js +6 -6
- package/dist/panel/panel.css +21 -12
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.d.ts +1 -1
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/SaveControls.d.ts +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenMount.d.ts +1 -1
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.d.ts +1 -1
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +17 -17
- package/dist/screen/components/usePartBridge.d.ts +1 -1
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.d.ts +1 -1
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/puck/preview-dom.js +1 -1
- package/dist/screen/lib/puck/style-clipboard.d.ts +1 -1
- package/dist/screen/lib/puck/style-clipboard.js +1 -1
- package/dist/screen/lib/puck/use-section-ops.js +1 -1
- package/dist/screen/lib/screen-parts.d.ts +1 -1
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/strings/index.js +2 -2
- package/dist/style-clipboard/index.d.ts +1 -1
- package/dist/text-styles/index.js +22 -22
- package/dist/{types-BsyPh6EW.d.ts → types-BbOBWXMP.d.ts} +3 -0
- package/package.json +1 -1
- package/dist/chunk-BALFHI3G.js +0 -2
- package/dist/chunk-EFQCH7CO.js +0 -1
- package/dist/chunk-I2BCNLLV.js +0 -5
- package/dist/chunk-LFHMDGLE.js +0 -8
- package/dist/chunk-LOXB5OVK.js +0 -63
- package/dist/chunk-OD4WIIER.js +0 -1
- package/dist/chunk-OSPUG6S6.js +0 -1
- package/dist/chunk-UAS2LEW2.js +0 -1
- package/dist/chunk-Z2V3TTAR.js +0 -18
- package/dist/chunk-ZFFWO2AF.js +0 -21
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useEaselSession as e}from"./chunk-O7Q4DDJT.js";import{useHostEscape as n}from"./chunk-U3JP4VGF.js";import{DEFAULT_SCREEN_WORDS as t}from"./chunk-23DYNW6S.js";import{styleMenuItems as o}from"./chunk-V7U33NF2.js";import{ROOT_ZONE as l}from"./chunk-PLVEGYK6.js";import{easelMenuEntries as r,menuLabel as i}from"./chunk-FIVU2COQ.js";import{createNodeClipboard as c,nodeMenuItems as s}from"./chunk-P5VYGWYO.js";import{DEFAULT_NODE_MENU_WORDS as u}from"./chunk-WK3AFPXY.js";import{isTypingTarget as a,useCanvasEvent as d,framePointToHost as p}from"./chunk-X4T6JT3M.js";import{zoneKey as f,ROOT_SLOT as m,ROOT_ID as h}from"./chunk-KRXQM65X.js";import{useState as y,useCallback as k,useRef as b,useEffect as g}from"react";import{ContextMenu as v}from"efficient-shell/ui";import{UndoIcon as w,RedoIcon as x,PasteIcon as C,SettingsIcon as z,LayersIcon as O,CopyIcon as P}from"efficient-shell/icons/efficient";import{jsx as A}from"react/jsx-runtime";function D(e,n){const t=[],o=/* @__PURE__ */new Set;let r={zone:n.zone,index:n.index};for(;r;){const n=e.nodeAt(r.zone,r.index);if(!n||o.has(n.props.id))break;if(o.add(n.props.id),t.push({zone:r.zone,index:r.index,node:n,parentType:null}),r.zone===l)break;const i=r.zone.lastIndexOf(":");if(i<=0)break;r=e.locate(r.zone.slice(0,i))}for(let e=0;e<t.length-1;e+=1)t[e].parentType=t[e+1].node.type;return t}var K=c(),j=/* @__PURE__ */new WeakMap;function M(e){if(e.claimsPage)return K;const n=e.registry;if(!n)return e.cache("easel:node-clipboard",c);let t=j.get(n);return t||(t=c(),j.set(n,t)),t}function T(){return M(e())}function X(e,n,t){if(n===l){const{floor:n,cap:o}=e.sectionBand();return{parentId:h,slot:m,index:Math.min(Math.max(t,n),o)}}const o=n.lastIndexOf(":");return{parentId:n.slice(0,o),slot:n.slice(o+1),index:t}}function S(e,n,t){const o=e.isPinned(n,t),l=!o&&!e.isLocked(n)&&!e.duplicateBlocked(n),r=e.permits?.(n)??{duplicate:!0,delete:!0};return{copy:!o&&r.duplicate,cut:l&&r.duplicate&&r.delete,delete:l&&r.delete}}function Y(e,n,t){const o=e.canPasteAt;if(!o)return f(n.from)===t.zone?X(e,t.zone,t.index+1):null;for(const l of D(e,t)){const t=X(e,l.zone,l.index+1);if(o(n,t))return t}return null}function V(e){if(e.defaultPrevented||e.altKey||e.shiftKey)return null;if(a(e.target))return null;const n=e.target,t=n&&"ownerDocument"in n?n.ownerDocument??n:null,o=t?.getSelection?.();if(o&&!o.isCollapsed&&o.toString().trim())return null;if(!e.metaKey&&!e.ctrlKey)return"Delete"===e.key?"delete":null;const l=e.code||(1===e.key.length?`Key${e.key.toUpperCase()}`:"");return"KeyC"===l?"copy":"KeyX"===l?"cut":"KeyV"===l?"paste":null}function E(e,n,t,o){const l=e.nodeAt(t.zone,t.index);if(!l)return null;const r=l.props.id,i=e.labelOf(l.type,t.zone),c=S(e,l,t.zone);if("copy"===n)return c.copy?(e.nodeOps.copy(r,i),{done:"copied",name:i}):null;if(o.readOnly)return null;if("cut"===n)return c.cut?(e.nodeOps.cut(r,i),{done:"cut",name:i}):null;if("delete"===n)return c.delete?(e.nodeOps.remove(r),{done:"deleted",name:i}):null;const s=o.held;if(!s)return null;const u=e.isPinned(l,t.zone)?null:Y(e,s,t);return u?(e.nodeOps.paste(u),{done:"pasted",name:s.label}):(e.onPasteRefused(s),{done:"refused",name:s.label})}function I(e,n){const{zone:t,index:r}=n,i=e.nodeAt(t,r);if(!i)return[];const c=i.props.id,u=e.labelOf(i.type,t),a=Boolean(i.props._hidden),d=e.nodeOps,p=e.isPinned(i,t),f=e.isLocked(i),m=!p&&!f&&!e.duplicateBlocked(i),h=e.permits?.(i)??{duplicate:!0,delete:!0},y=S(e,i,t),k=D(e,n),b=d.held,g=b&&!p?Y(e,b,n):null,v=!e.readOnly,w=e.style?o({held:v?e.style.held():null,canCopy:e.style.canCopy(i,t),onCopy:()=>e.style?.copy(i,t),onPaste:()=>e.style?.paste(t,r,i),words:e.words?.styleClipboard}):[];return s({title:u,words:e.words?.menu,layer:{group:"pick",items:k.flatMap((n,t)=>{const o={label:e.rowNameOf(n.node,n.zone),checked:0===t,onClick:()=>e.selectAt(n.zone,n.index,n.node.props.id,n.parentType)},r=n.zone===l?null:e.slotRung?.(n.zone)??null;return r?[o,{label:r.label,checked:!1,onClick:r.select}]:[o]})},actions:{duplicate:v&&m&&h.duplicate?()=>d.duplicate(c):void 0,...L(v&&!p,e=>d.canStep(c,e),e=>d.step(c,e)),copy:y.copy?()=>d.copy(c,u):void 0,cut:v&&y.cut?()=>d.cut(c,u):void 0,paste:v&&b&&g?{label:b.label,run:()=>d.paste(g)}:void 0,rename:v&&e.renamePropOf(i,t)?()=>e.beginRename(t,r):void 0,hide:!v||f||p?void 0:{hidden:a,run:()=>d.setProps(c,{_hidden:!a})},delete:v&&m&&h.delete?()=>d.remove(c):void 0},style:w,extras:e.menuRows?.(i,t,r)??void 0,pinnedLine:p?R(e).pinned:void 0})}function L(e,n,t){return e?{moveUp:n(-1)?()=>t(-1):null,moveDown:n(1)?()=>t(1):null}:{}}var R=e=>e.words?.screen??t.menu;function N(e){const n=R(e),o=!e.readOnly,r=[];o&&e.history.hasPast&&r.push({label:n.undo,icon:/* @__PURE__ */A(w,{}),shortcut:"⌘Z",onClick:e.history.back}),o&&e.history.hasFuture&&r.push({label:n.redo,icon:/* @__PURE__ */A(x,{}),shortcut:"⇧⌘Z",onClick:e.history.forward});const i=[],c=e.nodeOps.held,s=X(e,l,e.sectionBand().cap);if(o&&c&&(e.canPasteAt?e.canPasteAt(c,s):f(c.from)===l)){const n=s,t=e.words?.menu??u;i.push({label:t.pasteNamed({paste:t.paste,label:c.label}),icon:/* @__PURE__ */A(C,{}),shortcut:"⌘V",onClick:()=>e.nodeOps.paste(n)})}const a=[r,i,[{label:e.pageSettingsLabel??t.pageSettings,icon:/* @__PURE__ */A(z,{}),onClick:e.openPageSettings},{label:n.collapseAll,icon:/* @__PURE__ */A(O,{}),onClick:e.collapseAll}]].filter(e=>e.length>0),d={label:"—",onClick:()=>{}};return a.flatMap((e,n)=>n?[d,...e]:e)}function U(e,n){const t=n.selectionStart??0,o=n.selectionEnd??0,l=n.value.slice(t,o),r=e=>{n.focus(),n.setRangeText(e,t,o,"end"),n.dispatchEvent(new Event("input",{bubbles:!0}))},i=e.words?.menu??u,c=R(e),s=[];l&&(s.push({label:i.copy,icon:/* @__PURE__ */A(P,{}),shortcut:"⌘C",onClick:()=>navigator.clipboard?.writeText(l)}),s.push({label:i.cut,icon:/* @__PURE__ */A(P,{}),shortcut:"⌘X",onClick:()=>{navigator.clipboard?.writeText(l),r("")}})),s.push({label:i.paste,icon:/* @__PURE__ */A(C,{}),shortcut:"⌘V",onClick:()=>{navigator.clipboard?.readText().then(e=>{e&&r(e)}).catch(()=>e.onPasteRefused())}});const a=[s,n.value?[{label:c.selectAll,shortcut:"⌘A",onClick:()=>{n.focus(),n.select()}}]:[]].filter(e=>e.length>0),d={label:"—",onClick:()=>{}};return a.flatMap((e,n)=>n?[d,...e]:e)}function B(e){return e.shiftKey}function F(e,t){const[o,l]=y(null),r=k(()=>l(null),[]);n(null!==o,r);const i=b(e);i.current=e;const c=k(e=>{const n=i.current,t=n.keys;if(!t)return;const o=V(e);if(!o)return;const l=t.selected();if(!l)return;const r=E(n,o,l,{readOnly:t.readOnly,held:t.held()});r&&(e.preventDefault(),t.onDone?.(r))},[]),s=e.keys?.target??null;g(()=>{if(!s)return;const e=e=>c(e);return s.addEventListener("keydown",e),()=>s.removeEventListener("keydown",e)},[s,c]),d(t,"keydown",c);const u=k(n=>{if(B(n))return;const t=n.target;if(t?.closest?.("[data-slot-zone]"))return n.preventDefault(),void l(null);const o=function(e){const n=e?.closest?.("input, textarea");return n&&("INPUT"!==n.tagName||["text","search","url","email","tel","number",""].includes(n.type))?n:null}(t);if(o)return n.preventDefault(),void l({kind:"input",x:n.clientX,y:n.clientY,el:o,owner:t});const r=t?.closest?.("[data-node-id]")?.getAttribute("data-node-id"),i=r?e.locate(r):null;n.preventDefault(),l(i?{kind:"node",x:n.clientX,y:n.clientY,...i,owner:t}:{kind:"empty",x:n.clientX,y:n.clientY,owner:t})},[e]);d(t,"contextmenu",n=>{if(B(n)||!t)return;const o=n.target?.closest?.("[data-puck-component]")??null,r=o?.getAttribute("data-puck-component"),i=r?e.locate(r):null;n.preventDefault();const c=p(t.frame,n.clientX,n.clientY),s=t.frame;l(i?{kind:"node",...c,...i,owner:s}:{kind:"empty",...c,owner:s})}),d(t,"mousedown",r),d(t,"scroll",r,{on:"window"});return{onEditorContextMenu:u,menu:o?/* @__PURE__ */A(W,{host:e,target:o,onClose:r}):null,closeMenu:r}}function W({host:e,target:n,onClose:t}){const o="node"===n.kind?I(e,n):"input"===n.kind?U(e,n.el):N(e);return 0===o.length?null:/* @__PURE__ */A(v,{at:{x:n.x,y:n.y},owner:n.owner??null,onClose:t,"aria-label":i(o),items:r(o)})}export{K as EASEL_NODE_CLIPBOARD,D as ancestorChain,M as nodeClipboardOf,S as nodeClipboardRules,I as nodeMenuItems,V as nodeShortcut,N as pageMenuItems,Y as pastePlace,E as runNodeShortcut,U as textMenuItems,T as useNodeClipboard,F as useNodeContextMenu};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{easelMenuEntries as o,menuLabel as e}from"./chunk-
|
|
1
|
+
import{easelMenuEntries as o,menuLabel as e}from"./chunk-FIVU2COQ.js";import{ContextMenu as r}from"efficient-shell/ui";import{jsx as t}from"react/jsx-runtime";function n({x:n,y:l,items:i,onClose:m,owner:s,portalTo:u}){return 0===i.length?null:/* @__PURE__ */t(r,{at:{x:n,y:l},owner:s??u??null,onClose:m,"aria-label":e(i),items:o(i)})}export{n as EaselContextMenu};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import{DEFAULT_DRAG_WORDS as e}from"./chunk-KAML3KQH.js";import{dropEffectFor as t,scrollBoxOf as n,frameScrollBox as l,startAutoScroll as a,isNoOpDrop as r}from"./chunk-67GNT6PF.js";import{withTip as o}from"./chunk-P2VEMZH5.js";import{useCanvasLayout as s,useCanvasTyping as i,useCanvasEvent as c,CANVAS_TYPABLE_EVENT as d,framePointToHost as u,elementScale as h,frameRectToLayer as f,clientPointToLayer as p}from"./chunk-X4T6JT3M.js";import{parseZoneKey as m,ROOT_ID as g}from"./chunk-KRXQM65X.js";import{useRef as x,useEffect as b,useState as y,useCallback as v,useMemo as w,useSyncExternalStore as k,useId as N,useLayoutEffect as A}from"react";import{Tooltip as D,IconButton as T,solidSurfaceStyle as z,Input as M}from"efficient-shell/ui";import{AddIcon as $,CloseIcon as C,SearchIcon as E}from"efficient-shell/icons/efficient";import{jsxs as S,jsx as j}from"react/jsx-runtime";function L({label:e,onInsert:t,style:n,axis:l="y",className:a,index:r}){const o=["es-canvas-insert","x"===l?"is-x":"",a??""].filter(Boolean).join(" ");/* @__PURE__ */
|
|
2
|
+
return S("div",{className:o,style:n,"data-index":r,children:[
|
|
3
|
+
/* @__PURE__ */j("span",{className:"es-canvas-insert-line","aria-hidden":"true"}),
|
|
4
|
+
/* @__PURE__ */j("span",{className:"es-canvas-insert-chip",children:/* @__PURE__ */j(D,{content:e,children:/* @__PURE__ */j(T,{variant:"ghost",size:"sm","aria-label":e,onClick:t,children:/* @__PURE__ */j($,{})})})})]})}var B=(e,t,n)=>t>=e.left&&t<=e.left+e.width&&n>=e.top&&n<=e.top+e.height,K=e=>e.width*e.height;function O(e,t,n){return e.map((e,t)=>({s:e,at:t})).filter(({s:e})=>B(e.box,t,n)).sort((e,t)=>K(t.s.box)-K(e.s.box)||e.at-t.at).map(({s:e})=>e)}function X(e,t,n){return O(e,t,n).at(-1)??null}function I(e,t,n){const l="x"===e.axis?t:n;let a=0;for(const t of e.children){l>("x"===e.axis?t.left+t.width/2:t.top+t.height/2)&&(a+=1)}return a}function q(e,t){const n=e.children;if("x"===e.axis){const l=n[t-1],a=n[t],r=l&&a?(l.left+l.width+a.left)/2:l?l.left+l.width:a?a.left:e.box.left,o=a??l??e.box;return{left:r-1,top:o.top,width:2,height:o.height}}const l=n[t-1],a=n[t],r=l&&a?(l.top+l.height+a.top)/2:l?l.top+l.height:a?a.top:e.box.top;return{left:e.box.left,top:r-1,width:e.box.width,height:2}}function P(e,t,n,l,a=()=>!1,r=()=>!0){const o=e.filter(e=>B(e.box,t,n)).sort((e,t)=>K(e.box)-K(t.box));for(const e of o){const o=I(e,t,n),s={...e.list,index:o};if(a(s))return null;if(l(s))return{zone:e,to:s,line:q(e,o)};if(!r(s))return null}return null}function Y(e,t,n=12){const l=e.children;if(0===l.length)return[];const a=e.box,r="x"===e.axis,o=r?a.left:a.top,s=o+(r?a.width:a.height),i=e=>r?e.left:e.top,c=e=>r?e.left+e.width:e.top+e.height,d=[];for(let a=0;a<=l.length;a++){const u=l[a-1],h=l[a];let f,p;if(u&&h)f=c(u),p=Math.max(i(h)-f,0);else{const e=u?(c(u)+s)/2:(o+i(h))/2,t=Math.min(Math.max(e,o+n),s-n);f=u?Math.max(t,c(u)):Math.min(t,i(h)),p=0}const m=[u,h].filter(e=>Boolean(e)),g=Math.min(...m.map(e=>r?e.top:e.left)),x=Math.max(...m.map(e=>r?e.top+e.height:e.left+e.width)),b=r?{left:f,top:g,width:p,height:x-g}:{left:g,top:f,width:x-g,height:p};d.push({key:`${e.key}:+${a}`,place:{...e.list,index:a},box:b,axis:e.axis,label:t})}return d}function H(e,t=e.key){const n=[];for(let l=1;l<e.children.length;l++){const a=e.children[l-1],r=e.children[l],o=a.top+a.height;n.push({key:`${t}:${l}`,place:{...e.list,index:l},box:{left:e.box.left,top:o,width:e.box.width,height:Math.max(r.top-o,0)}})}return n}var R={nodes:[],zones:[]},Z="data-puck-dropzone",F="data-puck-component";function Q(e,t){if(e.length>=2){const[t,n]=e;return Math.abs(n.top-t.top)<Math.min(t.height,n.height)/2&&n.left>t.left?"x":"y"}const n=t.ownerDocument.defaultView?.getComputedStyle(t);return n&&n.display.includes("flex")&&n.flexDirection.startsWith("row")?"x":"y"}function V(e,t){const{frame:n,document:l}=e,a=e=>f(n,function(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top,width:t.width,height:t.height}}(e),t),r=[],o=[];for(const e of l.querySelectorAll(`[${Z}]`)){const t=e.getAttribute(Z)??"";let n;try{n=m(t)}catch{continue}const l=[...e.querySelectorAll(`[${F}]`)].filter(t=>t.parentElement?.closest(`[${Z}]`)===e),s=l.map(a);o.push({key:t,list:n,box:a(e),axis:Q(s,e),children:s}),l.forEach((e,t)=>{const l=e.getAttribute(F);l&&r.push({id:l,place:{...n,index:t},box:s[t]})})}return{nodes:r,zones:o}}var G="data-es-empty-cell",J="data-puck-dropzone",W=140;var U=e=>({left:e.left,top:e.top,width:e.width,height:e.height});function _(o){const{canvas:f,session:m,readOnly:N,words:T=e.canvas}=o,M=x(o);b(()=>{M.current=o});const $=x(null),C=s(f),[E,B]=y(0),K=v(()=>B(e=>e+1),[]),[X,I]=y(R);b(()=>{const e=$.current;f&&e&&I((M.current.measure??V)(f,e))},[f,C,o.revision,E]);const q=o.model,Y=w(()=>q(X),[q,X]),H=k(m.subscribe,m.shown,m.shown),Z=o.choose,F=(e,t)=>{const n=O(Y.sources,e,t);return 0===n.length?null:Z?Z(n):n[n.length-1]},[Q,W]=y(null),[_,ee]=y(null),[te,ne]=y(null),le=x(null),ae=()=>{le.current&&clearTimeout(le.current),le.current=null},re=()=>{ae(),le.current=setTimeout(()=>{m.get()||W(null)},140)};b(()=>ae,[]);const oe=x(null),se=i(f),ie=x(!1);ie.current=se,b(()=>{se&&(ae(),W(null))},[se]);const[ce,de]=y(null);c(f,d,e=>de(e.detail?.id??null));const ue=!ce||se||N||H?null:X.nodes.find(e=>e.id===ce)?.box??null;c(f,"mousemove",e=>{const t=$.current;if(!f||!t)return;const n=u(f.frame,e.clientX,e.clientY,t),l=h(t),a={x:n.x/l,y:n.y/l};if(oe.current=a,M.current.readOnly||m.get()||ie.current)return;ae();const r=F(a.x,a.y);W(e=>e?.key===r?.key&&e?.box===r?.box?e:r)}),c(f,"mouseout",e=>{e.relatedTarget||(oe.current=null,re())}),c(f,"mouseover",e=>{e.relatedTarget||K()});const he=x(null),fe=v(()=>{he.current?.(),he.current=null,ee(null),ne(null)},[]);b(()=>m.subscribe(()=>{m.get()?K():fe()}),[m,fe,K]),b(()=>fe,[fe]),("undefined"==typeof document?b:A)(()=>{if(m.get())return;const e=oe.current;W(t=>N||ie.current?null:e?F(e.x,e.y):t?Y.sources.find(e=>e.key===t.key)??null:null)},[Y,H,m,N,Z]);const pe=e=>{const t=m.get(),n=$.current,l=M.current.dropOn;if(!t||!n||!l)return null;const a=p(n,e.clientX,e.clientY);oe.current=a;const r=O(Y.sources,a.x,a.y);for(let e=r.length-1;e>=0;e-=1)if(l.accepts(t.item,r[e]))return{h:t,source:r[e]};return null},me=e=>{const t=m.get(),n=$.current;if(!t||!n)return null;const l=p(n,e.clientX,e.clientY);oe.current=l;const a=P(Y.zones,l.x,l.y,e=>M.current.canDrop(t.item,e),e=>!!t.from&&r(t.from,e),e=>M.current.fallThrough?.(t.item,e,t.from)??!0);return a?{h:t,t:a}:null},ge={onDragEnter:e=>{if(he.current)return;const t=n(e.currentTarget.parentElement?.parentElement??null),r=f?l(f.document):null,o=[];t&&o.push(a(t)),r&&f&&o.push(a(r,f.frame)),he.current=o.length?()=>o.forEach(e=>e()):null},onDragOver:e=>{const n=pe(e);if(n)return e.preventDefault(),e.dataTransfer.dropEffect=t(e.dataTransfer.effectAllowed),ee(null),void ne(e=>e&&e.key===n.source.key&&e.box===n.source.box?e:n.source);ne(null);const l=me(e);if(!l)return void ee(null);e.preventDefault(),e.dataTransfer.dropEffect=t(e.dataTransfer.effectAllowed);const a={zoneKey:l.t.zone.key,line:l.t.line,axis:l.t.zone.axis};ee(e=>e&&e.zoneKey===a.zoneKey&&e.line.left===a.line.left&&e.line.top===a.line.top?e:a)},onDragLeave:e=>{const t=e.relatedTarget;t&&e.currentTarget.contains(t)||(oe.current=null,ee(null),ne(null))},onDrop:e=>{const t=pe(e);if(t)return e.preventDefault(),m.end(),fe(),void M.current.dropOn.onDrop(t.h.item,t.source);const n=me(e);n&&(e.preventDefault(),m.end(),fe(),M.current.onDrop(n.h.item,n.t.to))}},xe={draggable:!N&&!!Q,onMouseEnter:ae,onMouseLeave:()=>!m.get()&&re(),onDragStart:e=>{if(Q&&!N){m.start({key:Q.key,item:Q.item,from:Q.from}),e.dataTransfer.effectAllowed="move";try{e.dataTransfer.setData("text/plain",Q.key)}catch{}}else e.preventDefault()},onDragEnd:()=>{m.end(),fe()},onClick:()=>{Q&&!N&&M.current.onPick?.(Q.item)}},{seams:be=[]}=Y,ye=Y.zones.filter(e=>0===e.children.length),ve=!o.onZoneAdd||N||se?[]:ye,we=ve.map(e=>e.key).join("\n");return b(()=>{const e=f?.document;if(!e)return;const t=new Set(we?we.split("\n"):[]);for(const n of e.querySelectorAll(`[${J}]`))n.toggleAttribute(G,t.has(n.getAttribute(J)??""));return()=>{for(const t of e.querySelectorAll(`[${G}]`))t.removeAttribute(G)}},[f,we,X,C,E]),/* @__PURE__ */S("div",{ref:$,className:"es-canvas-layer",children:[H||!o.onSeamAdd||N||se?null:be.map(e=>
|
|
5
|
+
/* @__PURE__ */j(L,{className:"es-canvas-seam",axis:e.axis,index:e.place.index,label:e.label??o.seamLabel??T.addSection,onInsert:()=>o.onSeamAdd?.(e.place),style:"x"===e.axis?{left:e.box.left+e.box.width/2-12,top:e.box.top,width:24,height:e.box.height}:{left:e.box.left,top:e.box.top+e.box.height/2-12,width:e.box.width,height:24}},e.key)),ve.length?ve.map(e=>/* @__PURE__ */j("button",{type:"button",className:["es-canvas-empty",e.addAlways?"is-always":"",_?.zoneKey===e.key?"is-over":""].filter(Boolean).join(" "),style:U(e.box),"data-node-id":e.list.parentId===g?void 0:e.list.parentId,onClick:()=>o.onZoneAdd?.({...e.list,index:0}),children:/* @__PURE__ */j("span",{className:"es-canvas-empty-add",children:T.addButton({label:e.addLabel??o.zoneAddLabel??T.addBlock})})},e.key)):null,H?/* @__PURE__ */j("div",{className:"es-canvas-catch",...ge}):null,te&&H?/* @__PURE__ */j("div",{className:"es-canvas-target",style:U(te.box),children:o.dropOn?.label?/* @__PURE__ */j("span",{className:"es-canvas-target-label",style:z(),children:o.dropOn.label(H.item,te)}):null}):null,_&&!ye.some(e=>e.key===_.zoneKey)?/* @__PURE__ */j("div",{className:`es-canvas-line is-${_.axis}`,style:U(_.line)}):null,ue?/* @__PURE__ */j("span",{className:"es-canvas-hint"+(ue.width<200?" is-below":""),style:{...z(),left:ue.left+ue.width,top:ue.width<200?ue.top+ue.height:ue.top},children:T.typeHint}):null,
|
|
6
|
+
/* @__PURE__ */j("div",{className:"es-canvas-handle-spot",style:Q?{"--es-handle-x":`${Q.box.left+2}px`,"--es-handle-y":`${Math.max(Q.box.top-11,0)}px`}:void 0,children:/* @__PURE__ */j(D,{className:"es-canvas-handle-tip",side:"top",content:!Q||N||H?null:Q.title??T.handle({label:Q.label}),children:/* @__PURE__ */S("div",{className:["es-canvas-handle",Q&&!N?"is-shown":"",H?"is-dragging":""].filter(Boolean).join(" "),...xe,children:[
|
|
7
|
+
/* @__PURE__ */j("span",{className:"es-canvas-grip","aria-hidden":"true",children:"⋮⋮"}),Q?.label]})})})]})}var ee=e=>e.tiles.length>0&&e.tiles.every(e=>null!=e.cover);function te({groups:t,session:n,itemFor:l,onInsert:a,onTileMenu:r,at:s,hint:i,searchLabel:c,readOnly:d,words:u=e.add}){const h=i??u.hint,f=c??u.search,[p,m]=y(""),g=N(),x=p.trim().toLowerCase(),b=function(e){const t=/* @__PURE__ */new Map;return e.map(e=>{const n=e.key??e.title,l=t.get(n)??0;return t.set(n,l+1),0===l?n:`${n}\0${l}`})}(t),v=t.map((e,t)=>({...e,key:b[t],tiles:x?e.tiles.filter(e=>((e,t)=>e.label.toLowerCase().includes(t)||(e.keywords??[]).some(e=>e.toLowerCase().includes(t)))(e,x)):e.tiles})).filter(e=>e.tiles.length>0),w=(e,t)=>a=>{if(t)a.preventDefault();else{n.start({key:`new:${e}`,item:l(e)}),a.dataTransfer.effectAllowed="copy";try{a.dataTransfer.setData("text/plain",e)}catch{}}};/* @__PURE__ */
|
|
8
|
+
return S("div",{className:"es-add",children:[s?/* @__PURE__ */S("div",{className:"es-add-at",role:"status",children:[
|
|
9
|
+
/* @__PURE__ */j("span",{children:s.label}),o(u.stop,/* @__PURE__ */j("button",{type:"button",className:"es-add-at-clear","aria-label":u.stop,onClick:s.onClear,children:/* @__PURE__ */j(C,{size:12,"aria-hidden":"true"})}))]}):null,
|
|
10
|
+
/* @__PURE__ */j("p",{className:"es-add-hint",children:h}),
|
|
11
|
+
/* @__PURE__ */j("div",{className:"es-add-find",children:/* @__PURE__ */j(M,{id:g,type:"search","aria-label":f,placeholder:u.searchPlaceholder({label:f}),value:p,onChange:e=>m(e.target.value),leftIcon:/* @__PURE__ */j(E,{size:16,"aria-hidden":"true"}),rightAdornment:p?/* @__PURE__ */j(T,{size:"sm","aria-label":u.clearSearch,onClick:()=>m(""),children:/* @__PURE__ */j(C,{size:12,"aria-hidden":"true"})}):void 0})}),0===v.length?/* @__PURE__ */S("div",{className:"es-add-empty",role:"status",children:[
|
|
12
|
+
/* @__PURE__ */j("div",{className:"es-add-empty-title",children:u.nothing({query:p.trim()})}),
|
|
13
|
+
/* @__PURE__ */j("div",{className:"es-add-empty-sub",children:u.tryAnother})]}):v.map(e=>/* @__PURE__ */S("section",{className:"es-add-group","aria-label":e.title,children:[
|
|
14
|
+
/* @__PURE__ */S("div",{className:"es-add-group-head",children:[
|
|
15
|
+
/* @__PURE__ */j("span",{className:"es-add-group-title",children:e.title}),
|
|
16
|
+
/* @__PURE__ */j("span",{className:"es-add-group-count",children:e.tiles.length})]}),
|
|
17
|
+
/* @__PURE__ */j("div",{className:ee(e)?"es-add-grid is-cards":"es-add-grid",children:e.tiles.map(e=>{const t=Boolean(d||e.disabled),l=d?void 0:e.disabled?e.disabledReason:e.title??u.tile({label:e.label});return o(l,/* @__PURE__ */S("button",{type:"button",className:null!=e.cover?"es-add-tile has-cover":"es-add-tile",draggable:!t,"aria-disabled":t||void 0,"aria-label":u.tile({label:e.label}),onDragStart:w(e.type,t),onDragEnd:()=>n.end(),onClick:()=>!t&&a?.(e.type),onContextMenu:r?t=>{r(e.type,{x:t.clientX,y:t.clientY,owner:t.currentTarget})&&t.preventDefault()}:void 0,children:[null!=e.cover?/* @__PURE__ */j("span",{className:"es-add-tile-cover","aria-hidden":"true",children:e.cover}):e.icon?/* @__PURE__ */j("span",{className:"es-add-tile-glyph","aria-hidden":"true",children:e.icon}):null,
|
|
18
|
+
/* @__PURE__ */S("span",{className:"es-add-tile-label",children:[e.label,null!=e.mark?/* @__PURE__ */j("span",{className:"es-add-tile-mark","aria-hidden":"true",children:e.mark}):null]})]},e.type))})})]},e.key))]})}export{te as AddPanel,_ as CanvasDragLayer,L as CanvasInsert,R as EMPTY_MEASURE,W as HANDLE_GRACE_MS,P as canvasTarget,B as contains,I as gapInZone,q as gapLine,Y as insertSeams,V as measureCanvas,X as pickSource,H as seamsBetween,O as sourcesAt};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_FIELDS_WORDS as e}from"./chunk-WRFD4EXD.js";import{useWords as i}from"./chunk-MFIRYGHW.js";import{ShellStringsProvider as n,InputNumber as s,Tooltip as a}from"efficient-shell/ui";import{jsx as l}from"react/jsx-runtime";function r({id:r,value:t,onChange:m,min:o,max:c,step:u=1,shiftStep:d,styleValue:p,icon:f,unit:h,steppers:b=!1,placeholder:v,readOnly:x=!1,ariaLabel:y,ariaLabelledBy:N,title:g}){const j=i("fields",e),F="number"==typeof t&&Number.isFinite(t)?t:null,S=/* @__PURE__ */l("div",{className:`es-fnum${f?" es-fnum--icon":""}${null===F&&void 0!==p?" is-style":""}`,children:/* @__PURE__ */l(n,{value:{number:{increase:j.more,decrease:j.less}},children:/* @__PURE__ */l(s,{id:r,size:"
|
|
1
|
+
import{DEFAULT_FIELDS_WORDS as e}from"./chunk-WRFD4EXD.js";import{useWords as i}from"./chunk-MFIRYGHW.js";import{ShellStringsProvider as n,InputNumber as s,Tooltip as a}from"efficient-shell/ui";import{jsx as l}from"react/jsx-runtime";function r({id:r,value:t,onChange:m,min:o,max:c,step:u=1,shiftStep:d,styleValue:p,icon:f,unit:h,steppers:b=!1,placeholder:v,readOnly:x=!1,ariaLabel:y,ariaLabelledBy:N,title:g}){const j=i("fields",e),F="number"==typeof t&&Number.isFinite(t)?t:null,S=/* @__PURE__ */l("div",{className:`es-fnum${f?" es-fnum--icon":""}${null===F&&void 0!==p?" is-style":""}`,children:/* @__PURE__ */l(n,{value:{number:{increase:j.more,decrease:j.less}},children:/* @__PURE__ */l(s,{id:r,size:"md",className:"es-fnum-box",value:F,onChange:e=>m(e??void 0),min:o,max:c,step:u,shiftStep:d,readOnly:x,steppers:b,snap:!0,placeholder:void 0!==p?String(p):v,prefix:f?/* @__PURE__ */l("span",{className:"es-fnum-icon",children:f}):void 0,suffix:h?/* @__PURE__ */l("span",{className:"es-fnum-unit",children:h}):void 0,"aria-label":y,"aria-labelledby":N})})});return g?/* @__PURE__ */l(a,{content:g,children:S}):S}export{r as FieldNumber};
|
package/dist/copy/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{selectionToVisible as
|
|
1
|
+
import{TEXT_STYLE_CASES as e}from"../chunk-YHZSBL2N.js";import{selectionToVisible as t,selectionToSource as n,richLayout as r,createHistory as l,colorRunOf as o,textRange as a,selectionBox as s,placeWindow as c,offsetOrigin as i,visibleArea as u,ColorWindow as d,markPress as p,pasteToMarkup as h,richInput as m,editVisible as f,MARKUP_CLIPBOARD_TYPE as g,markupOfRange as y}from"../chunk-23VM4PMV.js";export{ColorWindow,MARKUP_CLIPBOARD_TYPE,TYPING_BURST_MS,colorRunOf,createHistory,editVisible,markupOfRange,newLine,pasteToMarkup,richInput,richLayout,selectionToSource,selectionToVisible,setBullet,startCanvasTyping,textMap,toSource,toSourceStart,toVisible}from"../chunk-23VM4PMV.js";import{DEFAULT_COPY_WORDS as v}from"../chunk-KRL3IUV3.js";import{FieldNumber as b}from"../chunk-ZOBSIXRD.js";import{FieldSelect as k}from"../chunk-QAJAEWCZ.js";import"../chunk-WRFD4EXD.js";import{SettingsSwitch as x,SettingsField as S,SettingsSegmented as w}from"../chunk-36LVP5WD.js";import{useWords as E}from"../chunk-MFIRYGHW.js";import{registerModalEscapeInterceptor as C,textToolbarRows as D,TextToolbar as N,textAlignWords as T,useShellStrings as L,textAlignOptions as O,TEXT_ALIGNS as R,LinkPicker as K,Tooltip as V,IconButton as B}from"efficient-shell/ui";export{TextToolbar}from"efficient-shell/ui";import{useRef as M,useState as j,useLayoutEffect as F,useEffect as H,useId as P}from"react";import{RETIRED_MARKS as W,applyMark as $,marksIn as z,STANDARD_MARKUP as I,listIn as q,colorIn as A,spanFor as U,findLink as Y,tokenizeInline as Z,colorOver as _,setList as G,unlinkAt as X,removeLink as J,linkOver as Q,writeLink as ee}from"efficient-shell/markup";import{jsxs as te,jsx as ne,Fragment as re}from"react/jsx-runtime";import{ParagraphSpacingIcon as le,LetterSpacingIcon as oe,LineSpacingIcon as ae,TextSizeIcon as se,StylesIcon as ce,TypeIcon as ie,AlignmentIcon as ue,ListFormatIcon as de,CaseIcon as pe,ItalicIcon as he,NumberedListIcon as me,ListIcon as fe,ListNoneIcon as ge,CaseLowerIcon as ye,CaseCapitalizedIcon as ve,CaseUpperIcon as be,CaseNormalIcon as ke}from"efficient-shell/icons/efficient";function xe(e,t,n,r,l){for(const o of l){if(o.kind!==n)continue;if(!e.startsWith(o.open,t))continue;const l=t+o.open.length;if(e.startsWith(r,l)&&e.startsWith(o.close,l+r.length))return o}return null}function Se({value:e,rules:t=I,className:n,layerRef:r}){const l=function(e,t){const n=[];let r=0;for(const l of Z(e,t)){if("text"===l.kind){l.text.length>0&&(n.push({kind:"text",text:e.slice(r,r+l.text.length)}),r+=l.text.length);continue}const o=xe(e,r,l.kind,l.text,t);if(!o)return[{kind:"text",text:e}];const a=r+o.open.length,s=a+l.text.length,c=s+o.close.length;n.push({kind:"delimiter",text:e.slice(r,a)}),n.push({kind:l.kind,text:e.slice(a,s)}),n.push({kind:"delimiter",text:e.slice(s,c)}),r=c}return n.map(e=>e.text).join("")!==e?[{kind:"text",text:e}]:n}(e,t);/* @__PURE__ */
|
|
2
2
|
return ne("div",{ref:r,className:["es-gold-layer",n??""].filter(Boolean).join(" "),"aria-hidden":"true",children:l.map((e,t)=>function(e,t){const{kind:n,text:r}=e;switch(n){case"delimiter":/* @__PURE__ */
|
|
3
3
|
return ne("span",{className:"es-gold-delim",children:r},t);case"accent":case"highlight":/* @__PURE__ */
|
|
4
4
|
return ne("em",{className:"es-gold-mark es-gold-accent",children:r},t);case"bold":/* @__PURE__ */
|
|
@@ -6,24 +6,24 @@ return ne("strong",{className:"es-gold-mark es-gold-bold",children:r},t);case"it
|
|
|
6
6
|
return ne("em",{className:"es-gold-mark es-gold-italic",children:r},t);case"strike":/* @__PURE__ */
|
|
7
7
|
return ne("s",{className:"es-gold-mark es-gold-strike",children:r},t);case"quiet":/* @__PURE__ */
|
|
8
8
|
return ne("span",{className:"es-gold-mark es-gold-quiet",children:r},t);default:/* @__PURE__ */
|
|
9
|
-
return ne("span",{className:"es-gold-text",children:r},t)}}(e,t))})}function we({value:e,onInput:t,onCommit:n,onCancel:r,multiline:l=!1,placeholder:o,className:a,rules:s=I,ariaLabel:c,disabled:i=!1,inputRef:u}){const d=
|
|
9
|
+
return ne("span",{className:"es-gold-text",children:r},t)}}(e,t))})}function we({value:e,onInput:t,onCommit:n,onCancel:r,multiline:l=!1,placeholder:o,className:a,rules:s=I,ariaLabel:c,disabled:i=!1,inputRef:u}){const d=M(null),p=M(e),h=M(!1);function m(e){h.current&&(h.current=!1,n?.(e))}/* @__PURE__ */
|
|
10
10
|
return te("div",{className:["es-gold",l?"es-gold-is-multiline":"es-gold-is-single",i?"es-gold-is-off":"",a??""].filter(Boolean).join(" "),children:[
|
|
11
11
|
/* @__PURE__ */ne(Se,{value:e,rules:s,layerRef:d}),o&&""===e?
|
|
12
12
|
/* @__PURE__ */ne("div",{className:"es-gold-placeholder","aria-hidden":"true",children:o}):null,
|
|
13
|
-
/* @__PURE__ */ne("textarea",{ref:u,className:"es-gold-input",disabled:i,value:e,placeholder:o,"aria-label":c,onChange:function(e){h.current=!0,t(e.currentTarget.value)},onFocus:function(){p.current=e,h.current=!1},onBlur:function(){m(e)},onKeyDown:function(t){return"Escape"===t.key?(t.preventDefault(),h.current=!1,void r?.(p.current)):"Enter"!==t.key||l?void 0:(t.preventDefault(),void m(e))},onScroll:function(e){const t=d.current;t&&(t.scrollTop=e.currentTarget.scrollTop,t.scrollLeft=e.currentTarget.scrollLeft)}})]})}function Ee(e,t){const n=t?.selectionStart??e.length;return{start:n,end:t?.selectionEnd??n}}function Ce(e,t,n,r=$){const{start:l,end:o}=Ee(e,n);return r(e,l,o,t)}function De(e,t,n){const{start:r,end:l}=Ee(e,n),o=r+t.length;return{text:e.slice(0,r)+t+e.slice(l),selectionStart:o,selectionEnd:o}}function Ne(e,t,n,r){switch(t){case"bold":return e.createElement("strong");case"italic":return e.createElement("em");case"strike":return e.createElement("s");case"underline":return e.createElement("u");case"sup":return e.createElement("sup");case"sub":return e.createElement("sub");case"color":{const t=e.createElement("span");return t.className="es-rich-color",r&&(t.dataset.color=r,t.title=r.startsWith("#")?r.toUpperCase():r,t.style.color=r.startsWith("#")?r:`var(--es-color-${r}, inherit)`),t}case"link":{const t=e.createElement("a");return t.className="es-rich-link",n&&(t.title=n),t}default:{const n=e.createElement("span");return n.className="highlight"===t||"accent"===t?"es-rich-emphasis":`es-rich-${t}`,n}}}function Te(e,t,n,r){const l=e.layout.lines;if(n===t)return r>=e.lines.length?e.layout.text.length:l[r].vis;const o=e.lines.findIndex(e=>e===n||e.contains(n));if(-1===o)return 0;const a=t.ownerDocument.createRange();a.setStart(e.lines[o],0);try{a.setEnd(n,r)}catch{return l[o].vis}return l[o].vis+Math.min(a.toString().length,l[o].text.length)}function Le(e,t){const n=e.layout.lines;let r=n.length-1;for(let e=0;e<n.length;e+=1)if(t<=n[e].vis+n[e].text.length){r=e;break}let l=Math.max(0,t-n[r].vis);const o=e.lines[r].ownerDocument.createTreeWalker(e.lines[r],4);let a=o.nextNode(),s=null;for(;a;){if(l<=a.data.length)return[a,l];l-=a.data.length,s=a,a=o.nextNode()}return s?[s,s.data.length]:[e.lines[r],0]}function Oe({value:
|
|
14
|
-
return te("div",{className:"es-rich-wrap",children:[s&&""===
|
|
15
|
-
/* @__PURE__ */ne("div",{ref:S,className:`es-rich${o?" is-multiline":" is-single"}${a?" is-off":""}`,contentEditable:!a,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":o,"aria-label":c,"aria-readonly":a||void 0,"aria-placeholder":s,tabIndex:a?-1:0,spellCheck:!0,onFocus:()=>{N.current=
|
|
13
|
+
/* @__PURE__ */ne("textarea",{ref:u,className:"es-gold-input",disabled:i,value:e,placeholder:o,"aria-label":c,onChange:function(e){h.current=!0,t(e.currentTarget.value)},onFocus:function(){p.current=e,h.current=!1},onBlur:function(){m(e)},onKeyDown:function(t){return"Escape"===t.key?(t.preventDefault(),h.current=!1,void r?.(p.current)):"Enter"!==t.key||l?void 0:(t.preventDefault(),void m(e))},onScroll:function(e){const t=d.current;t&&(t.scrollTop=e.currentTarget.scrollTop,t.scrollLeft=e.currentTarget.scrollLeft)}})]})}function Ee(e,t){const n=t?.selectionStart??e.length;return{start:n,end:t?.selectionEnd??n}}function Ce(e,t,n,r=$){const{start:l,end:o}=Ee(e,n);return r(e,l,o,t)}function De(e,t,n){const{start:r,end:l}=Ee(e,n),o=r+t.length;return{text:e.slice(0,r)+t+e.slice(l),selectionStart:o,selectionEnd:o}}function Ne(e,t,n,r){switch(t){case"bold":return e.createElement("strong");case"italic":return e.createElement("em");case"strike":return e.createElement("s");case"underline":return e.createElement("u");case"sup":return e.createElement("sup");case"sub":return e.createElement("sub");case"color":{const t=e.createElement("span");return t.className="es-rich-color",r&&(t.dataset.color=r,t.title=r.startsWith("#")?r.toUpperCase():r,t.style.color=r.startsWith("#")?r:`var(--es-color-${r}, inherit)`),t}case"link":{const t=e.createElement("a");return t.className="es-rich-link",n&&(t.title=n),t}default:{const n=e.createElement("span");return n.className="highlight"===t||"accent"===t?"es-rich-emphasis":`es-rich-${t}`,n}}}function Te(e,t,n,r){const l=e.layout.lines;if(n===t)return r>=e.lines.length?e.layout.text.length:l[r].vis;const o=e.lines.findIndex(e=>e===n||e.contains(n));if(-1===o)return 0;const a=t.ownerDocument.createRange();a.setStart(e.lines[o],0);try{a.setEnd(n,r)}catch{return l[o].vis}return l[o].vis+Math.min(a.toString().length,l[o].text.length)}function Le(e,t){const n=e.layout.lines;let r=n.length-1;for(let e=0;e<n.length;e+=1)if(t<=n[e].vis+n[e].text.length){r=e;break}let l=Math.max(0,t-n[r].vis);const o=e.lines[r].ownerDocument.createTreeWalker(e.lines[r],4);let a=o.nextNode(),s=null;for(;a;){if(l<=a.data.length)return[a,l];l-=a.data.length,s=a,a=o.nextNode()}return s?[s,s.data.length]:[e.lines[r],0]}function Oe({value:e,rules:l,multiline:o,readOnly:a=!1,placeholder:s,ariaLabel:c,handle:i,onEdit:u,onSelect:d,onHistory:p,onFormat:v,pending:b,onCommit:k,onCancel:x}){const S=M(null),w=M(null),E=M(null),C=M(null),D=M(null),N=M(e),[T,L]=j(0),O=M({value:e,rules:l,multiline:o,readOnly:a,pending:b,onEdit:u,onHistory:p,onFormat:v});O.current={value:e,rules:l,multiline:o,readOnly:a,pending:b,onEdit:u,onHistory:p,onFormat:v};const R=()=>{const e=S.current,t=w.current,n=e?.ownerDocument.getSelection();if(!(e&&t&&n&&0!==n.rangeCount&&n.anchorNode&&e.contains(n.anchorNode)))return null;const r=Te(t,e,n.anchorNode,n.anchorOffset),l=n.focusNode&&e.contains(n.focusNode)?Te(t,e,n.focusNode,n.focusOffset):r;return r<=l?[r,l]:[l,r]},K=(e,t)=>{const n=S.current,r=w.current;if(!n||!r)return;const[l,o]=Le(r,e),[a,s]=Le(r,t);n.ownerDocument.getSelection()?.setBaseAndExtent(l,o,a,s)};i.current={getSource(){const e=R(),t=w.current;if(!e||!t)return null;const[r,l]=n(t.layout,e[0],e[1]);return{start:r,end:l}},setSource(e,t,n){C.current={text:n,src:[e,t]},L(e=>e+1)},focus(){S.current?.focus()},rangeOf(e,n){const r=S.current,l=w.current;if(!r||!l)return null;const[o,a]=t(l.layout,e,n),[s,c]=Le(l,o),[i,u]=Le(l,a),d=r.ownerDocument.createRange();return d.setStart(s,c),d.setEnd(i,u),d}},F(()=>{const n=S.current;if(!n||D.current)return;const o=C.current?null:R();w.current=function(e,t){const n=e.ownerDocument;e.replaceChildren();const r=t.lines.map(t=>{const r=n.createElement("div");r.className=null!=t.number?"es-rich-line is-numbered":t.bullet?"es-rich-line is-bullet":"es-rich-line",null!=t.number&&(r.dataset.number=t.number);const l=[],o=()=>l.length?l[l.length-1].el:r;let a=null;for(const e of t.chars){let t=0;for(;t<l.length&&t<e.marks.length&&l[t].id===e.marks[t].id;)t+=1;(l.length>t||e.marks.length>t)&&(a=null),l.length=t;for(let r=t;r<e.marks.length;r+=1){const t=Ne(n,e.marks[r].kind,e.marks[r].href,e.marks[r].color);o().appendChild(t),l.push({id:e.marks[r].id,el:t})}a||(a=n.createTextNode(""),o().appendChild(a)),a.data+=e.ch}return 0===t.chars.length&&r.appendChild(n.createElement("br")),e.appendChild(r),r});return{layout:t,lines:r}}(n,r(e,l)),E.current=e;const a=C.current;if(!a||a.text!==e)return void(o&&n.ownerDocument.activeElement===n&&K(o[0],Math.min(o[1],w.current.layout.text.length)));C.current=null;const s=w.current.layout,[c,i]=a.vis??t(s,a.src[0],a.src[1]);n.ownerDocument.activeElement!==n&&n.focus(),K(c,i)},[e,l,T]);const V=(e,t,r)=>{const l=w.current,[o,a]=n(l.layout,t[0],t[1]);C.current={text:e.text,vis:[e.caret,e.caret]},e.text!==O.current.value?O.current.onEdit(e.text,{start:o,end:a},r):L(e=>e+1)};H(()=>{const e=S.current;if(!e)return;const t=t=>{const{value:n,rules:r,multiline:l,readOnly:o,pending:a}=O.current;if("insertCompositionText"===t.inputType)return;if(t.preventDefault(),o)return;const s=w.current,c=R();if(!s||!c)return;const i="function"==typeof t.getTargetRanges?t.getTargetRanges()[0]:void 0,u=i&&!i.collapsed?[Te(s,e,i.startContainer,i.startOffset),Te(s,e,i.endContainer,i.endOffset)]:null,d=m({value:n,rules:r,multiline:l,inputType:t.inputType,data:t.data??t.dataTransfer?.getData("text/plain")??"",html:t.dataTransfer?.getData("text/html"),doc:e.ownerDocument,sel:c,target:u,pending:a});d&&("history"!==d.kind?"format"!==d.kind?V(d.edit,d.range,d.kind):O.current.onFormat(d.style):O.current.onHistory(d.dir))},n=()=>{D.current||L(e=>e+1)};return e.addEventListener("beforeinput",t),e.addEventListener("input",n),()=>{e.removeEventListener("beforeinput",t),e.removeEventListener("input",n)}},[]),H(()=>{const e=S.current;if(!e)return;const t=e.ownerDocument,n=()=>{const e=i.current?.getSource();e&&d(e)};return t.addEventListener("selectionchange",n),()=>t.removeEventListener("selectionchange",n)});const B=(t,n=!1)=>{const r=R();if(!r||r[0]===r[1])return;t.preventDefault();const o=w.current;t.clipboardData.setData("text/plain",o.layout.text.slice(r[0],r[1])),t.clipboardData.setData(g,y(e,l,r[0],r[1])),n&&!a&&V(f(e,l,r[0],r[1],{text:""}),r,"edit")};/* @__PURE__ */
|
|
14
|
+
return te("div",{className:"es-rich-wrap",children:[s&&""===e?/* @__PURE__ */ne("div",{className:"es-rich-placeholder","aria-hidden":"true",children:s}):null,
|
|
15
|
+
/* @__PURE__ */ne("div",{ref:S,className:`es-rich${o?" is-multiline":" is-single"}${a?" is-off":""}`,contentEditable:!a,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":o,"aria-label":c,"aria-readonly":a||void 0,"aria-placeholder":s,tabIndex:a?-1:0,spellCheck:!0,onFocus:()=>{N.current=e},onBlur:()=>{e!==N.current&&k?.(e),N.current=e},onKeyDown:t=>{if("Escape"===t.key)return t.preventDefault(),x?.(N.current),void(N.current=e);"Enter"!==t.key||o||(t.preventDefault(),e!==N.current&&k?.(e),N.current=e)},onCompositionStart:()=>{const e=R()??[0,0];D.current={from:e[0],to:e[1]}},onCompositionEnd:e=>{const t=D.current;if(D.current=null,!t)return;const{value:n,rules:r,pending:l}=O.current;e.data?V(f(n,r,t.from,t.to,{text:e.data,add:l?.add,drop:l?.drop,color:l?.color}),[t.from,t.to],"type"):L(e=>e+1)},onCopy:e=>B(e),onCut:e=>B(e,!0),onPaste:t=>{if(t.preventDefault(),a)return;const n=R();if(!n)return;const r=t.clipboardData.getData(g),s=r?o?r:r.replace(/\s*\r?\n\s*/g," "):h({html:t.clipboardData.getData("text/html"),text:t.clipboardData.getData("text/plain")},{doc:t.currentTarget.ownerDocument,multiline:o,rules:l});V(f(e,l,n[0],n[1],{markup:s}),n,"edit")}})]})}var Re={fontSize:{key:"fontSize",nameKey:"fontSize",icon:/* @__PURE__ */ne(se,{}),unit:"px",step:1,shiftStep:10,min:5},lineHeight:{key:"lineHeight",nameKey:"lineHeight",icon:/* @__PURE__ */ne(ae,{}),unit:"%",step:1,shiftStep:10,min:50,max:250,scale:100},letterSpacing:{key:"letterSpacing",nameKey:"letterSpacing",icon:/* @__PURE__ */ne(oe,{}),unit:"px",step:.1,shiftStep:1,min:-10},paragraphSpacing:{key:"paragraphSpacing",nameKey:"paragraphSpacing",icon:/* @__PURE__ */ne(le,{}),unit:"px",step:1,shiftStep:10,min:0}};function Ke(e,t){return void 0===e?void 0:Number((e*t).toFixed(6))}function Ve({cells:e,words:t,readOnly:n=!1}){const r=t??v.cells,l=P();/* @__PURE__ */
|
|
16
16
|
return ne("div",{className:"es-copy-cells-fit",children:/* @__PURE__ */ne("div",{className:"es-copy-cells",children:e.map(e=>{const t=e.scale??1,o=e.name??(e.nameKey?r[e.nameKey]:e.key),a=e.unit??"",s=e.step??1,c=`${l}-${e.key}`;/* @__PURE__ */
|
|
17
17
|
return te("div",{className:"es-copy-cell",children:[
|
|
18
18
|
/* @__PURE__ */ne("label",{className:"es-field-label es-copy-cell-name",htmlFor:c,children:o}),
|
|
19
|
-
/* @__PURE__ */ne(
|
|
20
|
-
return te("div",{ref:lt,className:"es-copy"+(
|
|
21
|
-
/* @__PURE__ */ne(N,{className:"es-copy-toolbar","aria-label":R??ie.formatting,offered:dt,pressed:Ye,onMark:e=>_e(e),color:it,linkOpen:null!==Ie,last:ut,alignment:pt,list:ht,letterCase:se,disabled:b,windows:/* @__PURE__ */te(re,{children:[Re&&oe&&oe.length>0?/* @__PURE__ */ne(
|
|
19
|
+
/* @__PURE__ */ne(b,{id:c,value:Ke(e.value,t),styleValue:Ke(e.styleValue,t),onChange:n=>e.onChange(void 0===n?void 0:Number((n/t).toFixed(6))),min:e.min,max:e.max,step:s,shiftStep:e.shiftStep,icon:e.icon,unit:a||void 0,steppers:"compact",readOnly:n,ariaLabel:o,title:r.tip({name:o,step:s,unit:a})})]},e.key)})})})}function Be({target:e,onChange:t}){const n=M(null);return F(()=>{const t=n.current,r=e.current;t&&r&&r.value===t.text&&(n.current=null,r.focus(),r.setSelectionRange(t.start,t.end))}),r=>{const l=r(e.current);t(l.text),n.current={start:l.selectionStart,end:l.selectionEnd,text:l.text}}}var Me=/* @__PURE__ */new Set([...W,"clear"]);function je({value:e,onChange:t,onCommit:n,onCancel:r,multiline:m=!1,placeholder:f,ariaLabel:g,className:y,readOnly:b=!1,rules:k,tools:S=[],writeMark:w,align:T,actions:L,toolbar:O,barLabel:R,renderFooter:V,inputRef:B,barShows:W="always",richText:Z=!0,defaultShowMarks:le=!1,colors:oe,cells:ae,letterCase:se,lastTool:ce}){const ie=E("copy",v),ue=M(null),de=B??ue,[pe,he]=j(!1),[me,fe]=j(null),ge=M(l()).current,ye=M(null);H(()=>{const t=ye.current;t&&e===t.to?ye.current=null:t&&e===t.from||(ye.current=null,ge.reset())},[e,ge]);const ve=n=>{ye.current={from:ye.current?.from??e,to:n},t(n)},be=t=>({text:e,start:t?.selectionStart??me?.start??e.length,end:t?.selectionEnd??me?.end??e.length}),[ke,xe]=j(le),Se=Z&&!(m&&ke),Ee=M(null),Ne=P(),[Te,Le]=j(null),[Re,Ke]=j(!1),je=()=>{if(!Se)return de.current;const e=Ee.current?.getSource()??me;return e?{selectionStart:e.start,selectionEnd:e.end}:null},Fe=Be({target:de,onChange:ve}),He=e=>(fe({start:e.selectionStart,end:e.selectionEnd}),e),Pe=(t,n)=>{if(!Se)return void Fe(e=>(n&&ge.record(be(e),"edit",Date.now()),He(t(e))));const r=je(),l=He(t(r));n&&ge.record(be(r),"edit",Date.now()),Le(null),l.text!==e&&ve(l.text),Ee.current?.setSource(l.selectionStart,l.selectionEnd,l.text)},We=e=>Pe(e,!0),$e=e=>Pe(t=>{const n=be(t),r=ge[e](n);return r?{text:r.text,selectionStart:r.start,selectionEnd:r.end}:{text:n.text,selectionStart:n.start,selectionEnd:n.end}},!1),ze=M(null);F(()=>{const t=ze.current;t&&(ze.current=null,Se?Ee.current?.setSource(t.start,t.end,e):(de.current?.focus(),de.current?.setSelectionRange(t.start,t.end),fe(t)))},[Se]);const[Ie,qe]=j(null),Ae=k??I,Ue=("string"==typeof S[0]?S:S.map(e=>e.style)).filter(e=>!Me.has(e)),Ye={};if(me){const t=z(e,me.start,me.end,Ae);for(const e of Ue){const n=t.has(e)||"highlight"===e&&t.has("accent");Ye[e]=!!Te?.add.includes(e)||!Te?.drop.includes(e)&&n}Ye.link=t.has("link")}const Ze=()=>{const t=je(),n=t?.selectionStart??e.length;return{start:n,end:t?.selectionEnd??n}},_e=t=>{if("link"!==t&&U(0,t)){const{start:n,end:r}=Ze();if(n===r&&!Se)return void We(n=>Ce(e,t,n,(e,t,n,r)=>$(e,t,n,r,Ae,ie.placeholders)));const l=p({value:e,rules:Ae,start:n,end:r,style:t,pending:Te});return void("pending"===l.kind?Le(l.pending):We(()=>l.result))}if("link"!==t){const n=w??((e,t,n,r)=>$(e,t,n,r,I,ie.placeholders));return void We(r=>Ce(e,t,r,n))}const n=je(),r=n?.selectionStart??e.length,l=n?.selectionEnd??r;Ke(!1),qe({start:r,end:l,link:Y(e,r,l)})},Ge=Boolean(me&&me.start!==me.end),Xe=me?q(e,me.start,me.end,Ae):null,Je=me?Te&&void 0!==Te.color&&Te.at===me.start?Te.color:A(e,me.start,me.end,Ae):null,Qe=o(Je,oe),et=t=>{Se?t?Ee.current?.setSource(t.start,t.end,e):Ee.current?.focus():(de.current?.focus(),t&&de.current?.setSelectionRange(t.start,t.end))},tt=()=>{const e=Ie;qe(null),et(e?{start:e.start,end:e.end}:me)},nt=()=>{const e=lt.current,t=Boolean(e&&e.querySelector(".es-copy-colors")?.contains(e.ownerDocument.activeElement));Ke(!1),t&&et(me)},rt=M(nt);rt.current=nt,H(()=>{if(Re)return C(e=>{const t=lt.current;return!!("Escape"===e.key&&t&&e.target instanceof Node&&t.contains(e.target))&&(rt.current(),!0)},()=>lt.current?.querySelector(".es-copy-colors"))},[Re]);const lt=M(null),ot=Re||null!==Ie;H(()=>{const e=lt.current;if(!ot||!e)return;const t=e.ownerDocument,n=()=>{Ke(!1),qe(null)},r=t=>{e.contains(t.target)||n()};let l;const o=r=>{const o=r.relatedTarget;o?e.contains(o)||n():(clearTimeout(l),l=setTimeout(()=>{const r=t.activeElement;t.hasFocus()&&r&&r!==t.body&&!e.contains(r)&&n()},0))};return t.addEventListener("pointerdown",r,!0),e.addEventListener("focusout",o),()=>{clearTimeout(l),t.removeEventListener("pointerdown",r,!0),e.removeEventListener("focusout",o)}},[ot]);const at=Ie??(Re?me??{start:e.length,end:e.length}:null),st=M(()=>{});st.current=()=>{const e=lt.current,t=e?.querySelector(".rosh-tb-wrap > .es-copy-pop");if(!e||!t||!at)return;const n=Se?null:e.querySelector(".es-gold-layer"),r=Se?Ee.current?.rangeOf(at.start,at.end)??null:n?a(n,at.start,at.end):null,l=r?.endContainer,o=l?1===l.nodeType?l:l.parentElement:null,d=r?s(r,o?.closest(".es-rich-line, .es-gold-layer")??null):null;if(!d)return;const p=c({anchor:d,size:{width:t.offsetWidth,height:t.offsetHeight},within:e.getBoundingClientRect(),clip:u(e),parent:i(t)});t.style.top=`${p.top}px`,t.style.left=`${p.left}px`,t.style.setProperty("--es-pop-point",`${p.point}px`),t.dataset.side=p.above?"above":"below"},F(()=>{const e=lt.current;if(!ot||!e)return;const t=()=>st.current();t();const n=e.ownerDocument.defaultView;n?.addEventListener("resize",t);const r=e.querySelector(".rosh-tb-wrap > .es-copy-pop"),l=n?.ResizeObserver,o=l&&r?new l(t):null;return o&&r&&o.observe(r),()=>{n?.removeEventListener("resize",t),o?.disconnect()}},[ot,Re,Ie,at?.start,at?.end,Se]);const ct="always"===W||pe||null!==Ie||Re,it=oe&&oe.length>0?{run:Qe,open:Re,onToggle:()=>{qe(null),Re?nt():Ke(!0)}}:void 0,ut=ct?ce?ce({className:"rosh-tb-btn",disabled:b,selected:Ge,keepCaret:e=>e.preventDefault(),insert:t=>We(n=>De(e,t,n))}):"classic"===O?L:void 0:void 0,dt=new Set(Ue),pt=T?{value:T.value,allow:T.allow,onChange:T.onChange,disabled:T.disabled}:void 0,ht={pressed:Xe,onList:t=>{const{start:n,end:r}=Ze(),l=q(e,n,r,Ae);We(()=>G(e,n,r,l===t?null:t,Ae))}},mt=D({offered:dt,color:it,last:ut,alignment:pt,list:ht,letterCase:se});/* @__PURE__ */
|
|
20
|
+
return te("div",{ref:lt,className:"es-copy"+(y?` ${y}`:""),onFocus:()=>he(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||he(!1)},onKeyDown:e=>{const t=e.target===de.current||Boolean(e.target.closest?.(".es-rich"));if(b||!t)return;if(e.altKey||e.metaKey===e.ctrlKey)return;const n=e.key.toLowerCase(),r="KeyZ"===e.code||"z"===n,l=("KeyY"===e.code||"y"===n)&&!e.shiftKey;if(r||l)return e.preventDefault(),e.stopPropagation(),void $e(l||e.shiftKey?"redo":"undo");const o={b:"bold",i:"italic",u:"underline",k:"link"}[`${e.shiftKey?"shift+":""}${n}`];o&&Ue.includes(o)&&(e.preventDefault(),e.stopPropagation(),_e(o))},onPaste:t=>{const n=de.current;if(b||!n||t.target!==n)return;t.preventDefault();const r=h({html:t.clipboardData.getData("text/html"),text:t.clipboardData.getData("text/plain")},{doc:n.ownerDocument,multiline:m,rules:Ae});We(t=>De(e,r,t))},style:oe&&oe.length>0?Object.fromEntries(oe.map(e=>[`--es-color-${e.name}`,e.value])):void 0,onSelect:()=>{const t=de.current;t&&t.ownerDocument.activeElement===t&&fe({start:t.selectionStart??e.length,end:t.selectionEnd??e.length})},children:[ct&&(mt.words||mt.paragraph)?
|
|
21
|
+
/* @__PURE__ */ne(N,{className:"es-copy-toolbar","aria-label":R??ie.formatting,offered:dt,pressed:Ye,onMark:e=>_e(e),color:it,linkOpen:null!==Ie,last:ut,alignment:pt,list:ht,letterCase:se,disabled:b,windows:/* @__PURE__ */te(re,{children:[Re&&oe&&oe.length>0?/* @__PURE__ */ne(d,{colors:oe,current:Je,words:ie.colors??v.colors,onPick:t=>{const{start:n,end:r}=Ze();if(n!==r)We(()=>_(e,n,r,t,Ae));else{if(!Se)return;Le({add:Te?.add??[],drop:Te?.drop??[],color:t,at:n})}}}):null,Ie?Ie&&/* @__PURE__ */ne(K,{className:"es-copy-link es-copy-pop",value:Ie.link?.href??"",onApply:t=>{const n=Ie;qe(null),We(()=>Se?Q(e,n.start,n.end,t,Ae):ee(e,n.start,n.end,t))},onRemove:Ie.link?()=>{const t=Ie.link,n=Ie;qe(null),t&&We(()=>Se?X(e,n.start,n.end,Ae):J(e,t))}:void 0,onCancel:tt}):null]})}):null,ae&&ae.length>0?/* @__PURE__ */ne(Ve,{cells:ae,words:ie.cells??v.cells,readOnly:b}):null,Se?/* @__PURE__ */ne(Oe,{value:e,rules:Ae,multiline:m,readOnly:b,placeholder:f,ariaLabel:g,handle:Ee,pending:Te??void 0,onEdit:(t,n,r)=>{ge.record({text:e,start:n.start,end:n.end},r,Date.now()),Le(null),ve(t)},onSelect:e=>{fe(t=>t&&t.start===e.start&&t.end===e.end?t:e),!Te||e.start===Te.at&&e.end===Te.at||Le(null)},onHistory:$e,onFormat:e=>{Ue.includes(e)&&_e(e)},onCommit:n,onCancel:r}):/* @__PURE__ */ne(we,{value:e,onInput:e=>{ge.record(be(null),"type",Date.now()),ve(e)},onCommit:n,onCancel:r,multiline:m,placeholder:f,ariaLabel:g,rules:k,disabled:b,inputRef:de,className:"es-copy-box"}),V?V({focused:pe,insert:t=>We(n=>De(e,t,n))}):null,Z&&m?
|
|
22
22
|
/* @__PURE__ */te("div",{className:"es-copy-marks",children:[
|
|
23
|
-
/* @__PURE__ */ne(
|
|
24
|
-
/* @__PURE__ */ne("span",{id:Ne,className:"es-copy-marks-label",children:ie.showMarks??"Show marks"})]}):null]})}var Fe=["none","bullet","number"],He=
|
|
25
|
-
return ne(
|
|
23
|
+
/* @__PURE__ */ne(x,{checked:ke,onChange:()=>{const e=je();ze.current=e&&null!==e.selectionStart&&null!==e.selectionEnd?{start:e.selectionStart,end:e.selectionEnd}:me,Le(null),xe(e=>!e)},ariaLabelledBy:Ne,disabled:b}),
|
|
24
|
+
/* @__PURE__ */ne("span",{id:Ne,className:"es-copy-marks-label",children:ie.showMarks??"Show marks"})]}):null]})}var Fe=["none","bullet","number"],He=e,Pe={none:/* @__PURE__ */ne(ge,{}),bullet:/* @__PURE__ */ne(fe,{}),number:/* @__PURE__ */ne(me,{})},We={none:/* @__PURE__ */ne(ke,{}),upper:/* @__PURE__ */ne(be,{}),capitalize:/* @__PURE__ */ne(ve,{}),lower:/* @__PURE__ */ne(ye,{})};function $e({label:e,icon:t,answers:n,names:r,glyphs:l,row:o,readOnly:a}){const s=o.value||o.styleValue||"";/* @__PURE__ */
|
|
25
|
+
return ne(S,{label:e,icon:t,children:/* @__PURE__ */ne(w,{ariaLabel:e,value:s,disabled:a,onChange:e=>{a||o.onChange(function(e,t){return t===e.value||""===e.value&&t===e.styleValue?"":t}(o,e))},options:n.map(e=>({id:e,label:l[e],title:r[e]}))})})}function ze({kept:e,keptHint:t,readOnly:n=!1,style:r,font:l,italic:o,cells:a,align:s,list:c,letterCase:i}){const u=E("copy",v),d=T(L().textToolbar),p=Object.fromEntries(O(R).map(e=>[e.value,e.icon])),h={...v.panel,...u.panel},m=r&&!n?[r.onEditStyles&&{label:h.editStyles,onSelect:r.onEditStyles},r.onUpdateStyle&&{label:h.updateStyle,onSelect:r.onUpdateStyle}].filter(e=>!!e):[],f=!!o&&(o.value??o.styleValue??!1),g=o?/* @__PURE__ */ne(V,{content:h.italic,children:/* @__PURE__ */ne(B,{size:"md",variant:"ghost","aria-label":h.italic,"aria-pressed":f,disabled:n,onClick:()=>{if(n)return;const e=!f;o.onChange(e===(o.styleValue??!1)?void 0:e)},children:/* @__PURE__ */ne(he,{})})}):null;/* @__PURE__ */
|
|
26
26
|
return te("div",{className:"es-tpp",children:[e?/* @__PURE__ */te("div",{className:"es-tpp-kept",children:[
|
|
27
|
-
/* @__PURE__ */ne(
|
|
28
|
-
/* @__PURE__ */ne("div",{className:"es-tpp-font-select",children:/* @__PURE__ */ne(
|
|
29
|
-
/* @__PURE__ */ne(
|
|
27
|
+
/* @__PURE__ */ne(je,{...e,readOnly:n||e.readOnly}),t?/* @__PURE__ */ne("p",{className:"es-field-hint",children:t}):null]}):null,r?/* @__PURE__ */ne(S,{label:h.style,icon:/* @__PURE__ */ne(ce,{}),children:/* @__PURE__ */ne(k,{ariaLabel:h.style,value:r.value,options:r.options,onChange:r.onChange,changed:r.changed,footer:m,readOnly:n})}):null,l?/* @__PURE__ */ne(S,{label:h.font,icon:/* @__PURE__ */ne(ie,{}),children:/* @__PURE__ */te("div",{className:"es-tpp-font",children:[
|
|
28
|
+
/* @__PURE__ */ne("div",{className:"es-tpp-font-select",children:/* @__PURE__ */ne(k,{ariaLabel:h.font,value:l.value||void 0,placeholder:l.styleValue,options:l.options,onChange:l.onChange,searchable:l.searchable,readOnly:n})}),g]})}):g?
|
|
29
|
+
/* @__PURE__ */ne(S,{label:h.italic,icon:/* @__PURE__ */ne(ie,{}),children:/* @__PURE__ */ne("div",{className:"es-tpp-font",children:g})}):null,a?.length?/* @__PURE__ */ne(Ve,{cells:a,words:u.cells,readOnly:n}):null,s?/* @__PURE__ */ne($e,{label:u.alignment,icon:/* @__PURE__ */ne(ue,{}),answers:R.filter(e=>!s.allow||s.allow.includes(e)),names:d,glyphs:p,row:s,readOnly:n}):null,c?/* @__PURE__ */ne($e,{label:h.list,icon:/* @__PURE__ */ne(de,{}),answers:Fe,names:h.lists,glyphs:Pe,row:c,readOnly:n}):null,i?/* @__PURE__ */ne($e,{label:h.capitalization,icon:/* @__PURE__ */ne(pe,{}),answers:He,names:h.cases,glyphs:We,row:i,readOnly:n}):null]})}export{Re as COPY_CELLS,je as CopyBox,Ve as CopyCells,Oe as RichBox,ze as TextPartPanel,De as insertSelection,Ce as markSelection,Be as useCaretEdit};
|
package/dist/drag/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AddPanel,CanvasDragLayer,CanvasInsert,EMPTY_MEASURE,HANDLE_GRACE_MS,canvasTarget,contains,gapInZone,gapLine,insertSeams,measureCanvas,pickSource,seamsBetween,sourcesAt}from"../chunk-
|
|
1
|
+
export{AddPanel,CanvasDragLayer,CanvasInsert,EMPTY_MEASURE,HANDLE_GRACE_MS,canvasTarget,contains,gapInZone,gapLine,insertSeams,measureCanvas,pickSource,seamsBetween,sourcesAt}from"../chunk-ZO3UUK45.js";import"../chunk-KAML3KQH.js";export{AUTO_SCROLL_EDGE,AUTO_SCROLL_MAX_SPEED,autoScrollDelta,autoScrollSpeed,createDragSession,dropEffectFor,dropOnRow,frameScrollBox,gapToMoveIndex,isNoOpDrop,scrollBoxOf,scrollParent,startAutoScroll,stepGap,useTreeDrag}from"../chunk-67GNT6PF.js";import"../chunk-P2VEMZH5.js";import"../chunk-X4T6JT3M.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
|
package/dist/easel/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CanvasFrame,CanvasPartsContext,CanvasPassThroughContext,CanvasSharedContext,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,bindUndoKeys,createEasel,createUseEasel,recordsByDefault,reduce,uiView,useEasel,useEaselApi,useEaselNodeOps,useSelectedFields,validSelection}from"../chunk-
|
|
1
|
+
export{CanvasFrame,CanvasPartsContext,CanvasPassThroughContext,CanvasSharedContext,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,bindUndoKeys,createEasel,createUseEasel,recordsByDefault,reduce,uiView,useEasel,useEaselApi,useEaselNodeOps,useSelectedFields,validSelection}from"../chunk-KOVJODTY.js";import"../chunk-TBY3DFKS.js";import"../chunk-YRLPFZW3.js";import"../chunk-X3TYRF5V.js";import"../chunk-23VM4PMV.js";import"../chunk-KRL3IUV3.js";import"../chunk-MFIRYGHW.js";import"../chunk-X4T6JT3M.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
|
package/dist/fields/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{FieldText,Inspector,InspectorField,LinkPicker,ListField,bucketsOf,copyItem,insertAt,labelOf,moveTo,planFields,removeAt}from"../chunk-
|
|
1
|
+
export{FieldText,Inspector,InspectorField,LinkPicker,ListField,bucketsOf,copyItem,insertAt,labelOf,moveTo,planFields,removeAt}from"../chunk-VULUDKA3.js";export{fieldIsShown,showWhenOf,shownFields,withShowWhen}from"../chunk-BPXEFVSQ.js";import"../chunk-A6Z4SD3I.js";import"../chunk-K56YDHYQ.js";export{FieldSlider}from"../chunk-XWFH2NHZ.js";export{useResolvedFields}from"../chunk-YRLPFZW3.js";import"../chunk-FIVU2COQ.js";import"../chunk-RC25EGHD.js";import"../chunk-KFV7N2DJ.js";export{FieldNumber}from"../chunk-ZOBSIXRD.js";export{FieldSelect,optionFor}from"../chunk-QAJAEWCZ.js";import"../chunk-WRFD4EXD.js";import"../chunk-36LVP5WD.js";import"../chunk-MFIRYGHW.js";import"../chunk-67GNT6PF.js";import"../chunk-P2VEMZH5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
|
package/dist/menu/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { a as EaselContextMenuProps, E as EaselContextMenuItem } from '../types-
|
|
3
|
-
export { b as EaselContextMenuSkin } from '../types-
|
|
2
|
+
import { a as EaselContextMenuProps, E as EaselContextMenuItem } from '../types-BbOBWXMP.js';
|
|
3
|
+
export { b as EaselContextMenuSkin } from '../types-BbOBWXMP.js';
|
|
4
4
|
import { DropdownMenuEntry } from 'efficient-shell/ui';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -41,7 +41,7 @@ declare function EaselContextMenu({ x, y, items, onClose, owner, portalTo }: Eas
|
|
|
41
41
|
* are not offered. A flyout whose entries carry `checked` is a
|
|
42
42
|
* set of states (the layer a "Select layer" ladder is on), so
|
|
43
43
|
* its entries are `radio`s;
|
|
44
|
-
* otherwise an `item`, `danger` kept.
|
|
44
|
+
* otherwise an `item`, `danger` and `disabled` kept.
|
|
45
45
|
*
|
|
46
46
|
* Choosing an entry closes the menu, then runs its `onClick` (the shell's
|
|
47
47
|
* order). Easel draws no row: only the glyph and the shortcut, which the
|
package/dist/menu/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{EaselContextMenu}from"../chunk-
|
|
1
|
+
export{EaselContextMenu}from"../chunk-ZKY45F5G.js";export{easelMenuEntries,menuLabel}from"../chunk-FIVU2COQ.js";
|
package/dist/node-ops/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { A as AfterRemove, I as ItemSelector, N as NodeSelection, P as PassThrough, a as Planned, S as StepBounds, c as canStep, b as clickPick, d as clickPickPart, f as fromItemSelector, n as nextInChain, e as nodeChain, p as parentStep, g as planDuplicate, h as planMove, i as planPaste, j as planRemove, k as planRestore, l as planSetProps, m as planStep, o as planSwap, t as toItemSelector } from '../plan-CZS902DV.js';
|
|
2
2
|
export { C as ClipboardEntry, N as NodeClipboard, a as NodeOps, b as NodeOpsHost, c as createNodeClipboard, u as useNodeOps } from '../useNodeOps-fIDWzftn.js';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { E as EaselContextMenuItem } from '../types-
|
|
4
|
+
import { E as EaselContextMenuItem } from '../types-BbOBWXMP.js';
|
|
5
5
|
import { N as NodeMenuWords } from '../words-DMG4dYq2.js';
|
|
6
6
|
import '../types-41704JE4.js';
|
|
7
7
|
|
|
@@ -23,10 +23,12 @@ import '../types-41704JE4.js';
|
|
|
23
23
|
* remove : Delete
|
|
24
24
|
*
|
|
25
25
|
* WHAT IS OFFERED IS THE HOST'S CALL, BY PRESENCE. A row appears when the host
|
|
26
|
-
* passes its action and is omitted when it does not
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
26
|
+
* passes its action and is omitted when it does not, the rule both editors
|
|
27
|
+
* already follow. So the pinned Header and Footer, a locked block, a read-only
|
|
28
|
+
* campaign are all answered upstream, where the host knows why; a pinned block
|
|
29
|
+
* with nothing to offer gets `pinnedLine`. ONE exception, the MOVE pair (Lewis
|
|
30
|
+
* 2026-10-23): a host passes `null` for the way a node cannot go (Move up on
|
|
31
|
+
* the first), and that row is drawn greyed, so the pair reads as a pair.
|
|
30
32
|
*
|
|
31
33
|
* Every row's label, icon and shortcut can be overridden (`rows`), so each
|
|
32
34
|
* editor keeps its own words ("Hide from email", "Delete section") until the
|
|
@@ -50,8 +52,10 @@ interface NodeMenuOptions {
|
|
|
50
52
|
actions: {
|
|
51
53
|
addInside?: () => void;
|
|
52
54
|
duplicate?: () => void;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
/** `null`: offered, greyed — the node can move, but not this way. */
|
|
56
|
+
moveUp?: (() => void) | null;
|
|
57
|
+
/** `null`: offered, greyed — the node can move, but not this way. */
|
|
58
|
+
moveDown?: (() => void) | null;
|
|
55
59
|
copy?: () => void;
|
|
56
60
|
cut?: () => void;
|
|
57
61
|
/** `label` names what is held: "Paste ‹label›". */
|
package/dist/node-ops/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{createNodeClipboard,nodeMenuItems}from"../chunk-
|
|
1
|
+
export{createNodeClipboard,nodeMenuItems}from"../chunk-P5VYGWYO.js";import"../chunk-WK3AFPXY.js";export{canStep,clickPick,clickPickPart,fromItemSelector,nextInChain,nodeChain,parentStep,planDuplicate,planMove,planPaste,planRemove,planRestore,planSetProps,planStep,planSwap,toItemSelector,useNodeOps}from"../chunk-X3TYRF5V.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
|
package/dist/panel/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export{DESIGN_GROUPS,SETTINGS_BUCKETS,SettingsGroup}from"../chunk-RC25EGHD.js";import{DEFAULT_PANEL_WORDS as e}from"../chunk-KFV7N2DJ.js";import{
|
|
1
|
+
export{DESIGN_GROUPS,SETTINGS_BUCKETS,SettingsGroup}from"../chunk-RC25EGHD.js";import{DEFAULT_PANEL_WORDS as e}from"../chunk-KFV7N2DJ.js";import{SettingsField as l,SettingsSegmented as n}from"../chunk-36LVP5WD.js";export{SettingsField,SettingsSegmented,SettingsSwitch}from"../chunk-36LVP5WD.js";import{withTip as t}from"../chunk-P2VEMZH5.js";import{jsx as a,jsxs as i,Fragment as s}from"react/jsx-runtime";import{RevertIcon as d,BackgroundIcon as o,WidthIcon as r}from"efficient-shell/icons/efficient";import{Tooltip as c}from"efficient-shell/ui";export{BorderInput as SettingsBorder,CornersInput as SettingsCorners,AlignmentGrid as SettingsPlacement,SidesInput as SettingsSides,SidesEachToggle as SettingsSidesEach,borderSides,borderStartEach,sidesStartEach}from"efficient-shell/ui";function u({title:e,level:l=3,id:n,className:t}){/* @__PURE__ */
|
|
2
2
|
return a(`h${l}`,{id:n,className:t?`es-group-head ${t}`:"es-group-head",children:e})}function h({title:e,level:l=4,id:n,className:t}){/* @__PURE__ */
|
|
3
|
-
return a(`h${l}`,{id:n,className:t?`es-group-sub ${t}`:"es-group-sub",children:e})}function b({label:
|
|
4
|
-
return a("span",{className:b.join(" "),"aria-hidden":"true"});const g=h.resetName({label:
|
|
3
|
+
return a(`h${l}`,{id:n,className:t?`es-group-sub ${t}`:"es-group-sub",children:e})}function b({label:l,changed:n,onReset:i,detail:s,disabled:o,defaultAction:r,words:c,className:u}){const h={...e,...c},b=["es-default-reset"];if(n&&b.push("is-changed"),u&&b.push(u),!n&&r)return b.push("is-pressable"),t(r.title,/* @__PURE__ */a("button",{type:"button",className:b.join(" "),"aria-label":r.title,disabled:o,onClick:r.onPress,children:r.icon}));if(!n)/* @__PURE__ */
|
|
4
|
+
return a("span",{className:b.join(" "),"aria-hidden":"true"});const g=h.resetName({label:l});return t(s?h.resetTitle({label:l,detail:s}):g,/* @__PURE__ */a("button",{type:"button",className:b.join(" "),"aria-label":g,"aria-description":s||void 0,disabled:o,onClick:e=>{i(),function(e){const l=e.currentTarget,n=l.closest(".es-field");let t=n?.querySelector(m(".es-field-ctl"))??n?.querySelector(m(".es-field-head"))??null,a=n?null:l.parentElement;for(let e=0;!t&&a&&e<f;e+=1,a=a.parentElement)t=[...a.querySelectorAll(p)].find(e=>e!==l)??null;t?.focus()}(e)},children:/* @__PURE__ */a(d,{size:15})}))}var p=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),m=e=>p.split(", ").map(l=>`${e} ${l}`).join(", "),f=4;function g({name:e,preview:l,offPage:n,status:t,onOpen:d,id:o,className:r}){const u=null!=l;/* @__PURE__ */
|
|
5
5
|
return i("button",{type:"button",id:o,className:r?`es-drill ${r}`:"es-drill",onClick:d,children:[
|
|
6
6
|
/* @__PURE__ */i(c,{content:u?/* @__PURE__ */i(s,{children:[e,
|
|
7
7
|
/* @__PURE__ */a("br",{}),l]}):e,describe:!1,className:"es-drill-text",children:[
|
|
@@ -10,6 +10,6 @@ return i("button",{type:"button",id:o,className:r?`es-drill ${r}`:"es-drill",onC
|
|
|
10
10
|
return i("div",{className:c?`es-action-wrap ${c}`:"es-action-wrap",children:[
|
|
11
11
|
/* @__PURE__ */i("button",{type:"button",id:r,className:s?"es-action is-done":"es-action",disabled:n,"aria-describedby":p,onClick:l,children:[o?/* @__PURE__ */a("span",{className:"es-action-icon","aria-hidden":"true",children:o}):null,
|
|
12
12
|
/* @__PURE__ */a("span",{className:"es-action-label",children:h})]}),b?/* @__PURE__ */a("p",{id:p,className:"es-action-note",children:t}):null,
|
|
13
|
-
/* @__PURE__ */a("span",{className:"es-action-live",role:"status","aria-live":"polite",children:s?u:null})]})}var S=["full","content"],v={label:"Background",full:"Full width",content:"Content width"};function w({value:e,changed:
|
|
14
|
-
return a(
|
|
15
|
-
return a(
|
|
13
|
+
/* @__PURE__ */a("span",{className:"es-action-live",role:"status","aria-live":"polite",children:s?u:null})]})}var S=["full","content"],v={label:"Background",full:"Full width",content:"Content width"};function w({value:e,changed:t,detail:i,onChange:s,onReset:d,disabled:r=!1,hint:c,labelId:u,words:h,resetWords:p}){const m={...v,...h};/* @__PURE__ */
|
|
14
|
+
return a(l,{label:m.label,labelId:u,icon:/* @__PURE__ */a(o,{}),changed:t,hint:c,action:/* @__PURE__ */a(b,{words:p,label:m.label,changed:t,detail:i,onReset:d}),children:/* @__PURE__ */a(n,{options:S.map(e=>({id:e,label:"full"===e?m.full:m.content})),value:e,onChange:s,ariaLabel:m.label,disabled:r})})}var C={label:"Content",full:"Full width",content:"Content width"};function j({mode:e,onMode:t,number:s,changed:d,detail:o,onReset:c,fullClosed:u=!1,disabled:h=!1,hint:p,labelId:m,words:f,resetWords:g}){const N={...C,...f},v=void 0!==e&&t?/* @__PURE__ */a(n,{options:S.map(e=>({id:e,label:"full"===e?N.full:N.content,disabled:"full"===e&&u})),value:e,onChange:t,ariaLabel:N.label,disabled:h}):null;/* @__PURE__ */
|
|
15
|
+
return a(l,{label:N.label,labelId:m,icon:/* @__PURE__ */a(r,{}),changed:d,hint:p,action:/* @__PURE__ */a(b,{words:g,label:N.label,changed:d,detail:o,onReset:c}),children:v&&s?/* @__PURE__ */i("div",{className:"es-width-stack",children:[v,s]}):v??s??null})}export{S as BACKGROUND_WIDTHS,v as DEFAULT_BACKGROUND_WIDTH_WORDS,C as DEFAULT_CONTENT_WIDTH_WORDS,N as SettingsAction,w as SettingsBackgroundWidth,j as SettingsContentWidth,b as SettingsDefaultReset,g as SettingsDrill,u as SettingsGroupHead,h as SettingsGroupSub};
|
package/dist/panel/panel.css
CHANGED
|
@@ -240,16 +240,19 @@
|
|
|
240
240
|
|
|
241
241
|
FULL WIDTH, ONE ROW. A track is a filled row, and every other filled row
|
|
242
242
|
here runs the full width of the body's content box; a segmented control is
|
|
243
|
-
one row by definition, so it never wraps.
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
one row by definition, so it never wraps. EVERY SEGMENT IS AN EQUAL SHARE
|
|
244
|
+
(`1 1 0`; Lewis 2026-10-23, "like Show on", replacing his earlier natural
|
|
245
|
+
width). An equal share may be narrower than its word, so `min-width: 0`, and
|
|
246
|
+
the word drops before that happens ("word fit" below: the widest word times
|
|
247
|
+
the count, not the sum). */
|
|
246
248
|
.es-segs {
|
|
247
249
|
display: flex;
|
|
248
250
|
flex-wrap: nowrap;
|
|
249
251
|
width: 100%;
|
|
250
252
|
}
|
|
251
253
|
.es-segs > button {
|
|
252
|
-
flex: 1 1
|
|
254
|
+
flex: 1 1 0;
|
|
255
|
+
min-width: 0;
|
|
253
256
|
white-space: nowrap;
|
|
254
257
|
}
|
|
255
258
|
/* The glyph in the chip: 16px of drawing, the same size a field's icon takes,
|
|
@@ -387,16 +390,19 @@
|
|
|
387
390
|
.es-segs.is-measured {
|
|
388
391
|
--es-fit-strip: calc(2 * var(--es-fit-ends) + (var(--es-fit-count) - 1) * var(--es-fit-gap));
|
|
389
392
|
|
|
393
|
+
/* EQUAL SHARES (Lewis 2026-10-23): each chip gets the same share of the
|
|
394
|
+
track, so a word fits only when the WIDEST word fits in one share. Every
|
|
395
|
+
word therefore needs `count × widest`, never less than the sum; and the
|
|
396
|
+
chosen chip is no wider than the others, so its word needs the same room.
|
|
397
|
+
The two tiers meet: the words go together. */
|
|
390
398
|
--es-fit-words-from: calc(
|
|
391
399
|
var(--es-fit-strip) +
|
|
392
400
|
var(--es-fit-count) * (var(--es-fit-chip) + var(--es-fit-word-gap)) +
|
|
393
|
-
var(--es-fit-labels)
|
|
401
|
+
max(var(--es-fit-labels), var(--es-fit-count) * var(--es-fit-widest))
|
|
394
402
|
);
|
|
395
403
|
--es-fit-chosen-from: calc(
|
|
396
404
|
var(--es-fit-strip) +
|
|
397
|
-
var(--es-fit-count) * var(--es-fit-chip) +
|
|
398
|
-
var(--es-fit-word-gap) +
|
|
399
|
-
var(--es-fit-widest)
|
|
405
|
+
var(--es-fit-count) * (var(--es-fit-chip) + var(--es-fit-word-gap) + var(--es-fit-widest))
|
|
400
406
|
);
|
|
401
407
|
}
|
|
402
408
|
|
|
@@ -508,13 +514,16 @@
|
|
|
508
514
|
/* SQUARE (Lewis 2026-10-14, again 2026-10-23): a band, not a pill.
|
|
509
515
|
`tests/panel-group-band-full-bleed.test.ts` fails on any radius here. */
|
|
510
516
|
border-radius: 0;
|
|
511
|
-
/*
|
|
512
|
-
|
|
513
|
-
|
|
517
|
+
/* 32 TALL, ONE STEP UNDER THE 36 MENU ROW (Lewis 2026-10-23: the full-bleed
|
|
518
|
+
band was too tall). The shell's medium control height. The 4 above and
|
|
519
|
+
below keeps the words and a 16px icon inside 32, so the padding never
|
|
520
|
+
makes the band taller; the words and the − / + stay centred
|
|
521
|
+
(`align-items`). `tests/panel-group-band-full-bleed.test.ts` (d). */
|
|
522
|
+
min-height: var(--control-height-md, 32px);
|
|
514
523
|
/* Its words start where a tree row's do: the shell's `TreeRow` pads `px-2`,
|
|
515
524
|
two of the shell's `--spacing` steps, and so does this (the Layers panel
|
|
516
525
|
drew a heading at 12px over rows at 8px: two text columns). */
|
|
517
|
-
padding:
|
|
526
|
+
padding: 4px calc(2 * var(--spacing));
|
|
518
527
|
/* A heading needs more air above it than the settings it heads have between
|
|
519
528
|
them (38px), or it reads as one more row. Floored on `--es-row-gap` so it
|
|
520
529
|
rises with the rest of the panel (card 66203). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AddBlockRow as default}from"../../chunk-
|
|
1
|
+
export{AddBlockRow as default}from"../../chunk-FMZGR7EG.js";import"../../chunk-M2Z775ZC.js";import"../../chunk-OGBYHQE6.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-23DYNW6S.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-KOVJODTY.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-VULUDKA3.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{blockKey,AddSidePanel as default,sectionKey,sharedKey,templateKey}from"../../chunk-
|
|
1
|
+
export{blockKey,AddSidePanel as default,sectionKey,sharedKey,templateKey}from"../../chunk-U6LF5YVK.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-43AEUUNQ.js";import"../../chunk-SINAM2IT.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-M2Z775ZC.js";import"../../chunk-OGBYHQE6.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-23DYNW6S.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-KOVJODTY.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-VULUDKA3.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-ZKY45F5G.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-ZG6PVMC3.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-ZO3UUK45.js";import"../../chunk-KAML3KQH.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { E as EaselContextMenuItem } from '../../types-
|
|
2
|
+
import { E as EaselContextMenuItem } from '../../types-BbOBWXMP.js';
|
|
3
3
|
import { P as Place } from '../../types-41704JE4.js';
|
|
4
4
|
import { N as NodeClipboard, C as ClipboardEntry, a as NodeOps } from '../../useNodeOps-fIDWzftn.js';
|
|
5
5
|
import { N as NodeMenuWords } from '../../words-DMG4dYq2.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{EASEL_NODE_CLIPBOARD,ancestorChain,nodeClipboardOf,nodeClipboardRules,nodeMenuItems,nodeShortcut,pageMenuItems,pastePlace,runNodeShortcut,textMenuItems,useNodeClipboard,useNodeContextMenu}from"../../chunk-
|
|
1
|
+
export{EASEL_NODE_CLIPBOARD,ancestorChain,nodeClipboardOf,nodeClipboardRules,nodeMenuItems,nodeShortcut,pageMenuItems,pastePlace,runNodeShortcut,textMenuItems,useNodeClipboard,useNodeContextMenu}from"../../chunk-YOXKBOZX.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-23DYNW6S.js";import"../../chunk-V7U33NF2.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-ZKY45F5G.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-P5VYGWYO.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -18,7 +18,7 @@ import '../../watch-BTYOJpQU.js';
|
|
|
18
18
|
import '../../CanvasDragLayer-ARfaivCu.js';
|
|
19
19
|
import '../../session-DSQFmIvx.js';
|
|
20
20
|
import '../../words-CvwYvkJm.js';
|
|
21
|
-
import '../../types-
|
|
21
|
+
import '../../types-BbOBWXMP.js';
|
|
22
22
|
import '../../style-clipboard/index.js';
|
|
23
23
|
import '../../words-CnnHb9jo.js';
|
|
24
24
|
import '../../types-Bqq6ya0y.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenChrome as default}from"../../chunk-
|
|
1
|
+
export{ScreenChrome as default}from"../../chunk-CNKVVHDA.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-JBOSEHIX.js";import"../../chunk-FGNR22NY.js";import"../../chunk-LER7RKTO.js";import"../../chunk-FGYJ5DJY.js";import"../../chunk-7F52SZOI.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-A6CY3TQ5.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-C56MPJBH.js";import"../../chunk-H5YLVKGA.js";import"../../chunk-7OKL7HDV.js";import"../../chunk-PY7OOQEZ.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-5545A3PC.js";import"../../chunk-U6LF5YVK.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-43AEUUNQ.js";import"../../chunk-SINAM2IT.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-M2Z775ZC.js";import"../../chunk-OGBYHQE6.js";import"../../chunk-MS2U6MV5.js";import"../../chunk-YOXKBOZX.js";import"../../chunk-5DPIGWUL.js";import"../../chunk-M62P4IQK.js";import"../../chunk-EZG3TGQ7.js";import"../../chunk-ERR437B5.js";import"../../chunk-RYNBSKE7.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-4VJATVVR.js";import"../../chunk-23DYNW6S.js";import"../../chunk-V7U33NF2.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-KOVJODTY.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-VULUDKA3.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-ZKY45F5G.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-P5VYGWYO.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-ZG6PVMC3.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-ZO3UUK45.js";import"../../chunk-KAML3KQH.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";
|
|
@@ -30,7 +30,7 @@ import '../../panelWidths-DgQXiPXU.js';
|
|
|
30
30
|
import '../../CanvasDragLayer-ARfaivCu.js';
|
|
31
31
|
import '../../session-DSQFmIvx.js';
|
|
32
32
|
import '../../words-CvwYvkJm.js';
|
|
33
|
-
import '../../types-
|
|
33
|
+
import '../../types-BbOBWXMP.js';
|
|
34
34
|
import '../../style-clipboard/index.js';
|
|
35
35
|
import '../../words-CnnHb9jo.js';
|
|
36
36
|
import '../../types-Bqq6ya0y.js';
|