efficient-easel 8.3.0 → 10.0.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 +43 -0
- package/dist/chrome/chrome.css +18 -0
- package/dist/chrome/index.d.ts +26 -3
- package/dist/chrome/index.js +1 -1
- package/dist/chunk-26GHWMNN.js +21 -0
- package/dist/{chunk-NOD4ATKF.js → chunk-2AKW6UXX.js} +1 -1
- package/dist/{chunk-IEKQTWQG.js → chunk-4CE7XFCE.js} +1 -1
- package/dist/chunk-65Z5FSAW.js +6 -0
- package/dist/{chunk-7CIFWFP2.js → chunk-BPLCMQ6S.js} +39 -39
- package/dist/{chunk-DQZYXC3V.js → chunk-GKGBKSZ7.js} +1 -1
- package/dist/{chunk-QVUVDBGA.js → chunk-IE55HNMA.js} +18 -18
- package/dist/{chunk-VF6TCI62.js → chunk-K2YSFVOJ.js} +1 -1
- package/dist/chunk-LGDQLTJW.js +5 -0
- package/dist/{chunk-NCQSBU3O.js → chunk-P4CL4YQI.js} +1 -1
- package/dist/{chunk-XTJCKV6Z.js → chunk-PPL7GB7D.js} +1 -1
- package/dist/chunk-Q6AM43CA.js +1 -0
- package/dist/chunk-RC25EGHD.js +5 -0
- package/dist/{chunk-DPKWJTNX.js → chunk-TZIIRGVY.js} +1 -1
- package/dist/{chunk-ZG5T7RSV.js → chunk-U5RF4USK.js} +1 -1
- package/dist/{chunk-HDUAODXJ.js → chunk-W4U4SHKW.js} +3 -3
- package/dist/{chunk-SQMUAXUS.js → chunk-XF2AIO46.js} +1 -1
- package/dist/chunk-XJCMEEBH.js +9 -0
- package/dist/chunk-XO7OUCZV.js +1 -0
- package/dist/chunk-XTDBTCVO.js +5 -0
- package/dist/chunk-XWFH2NHZ.js +4 -0
- package/dist/chunk-Z6PVRXVY.js +1 -0
- package/dist/copy/copy.css +55 -15
- package/dist/copy/index.d.ts +55 -3
- package/dist/copy/index.js +23 -18
- package/dist/easel/index.d.ts +1 -1
- package/dist/fields/index.d.ts +2 -2
- package/dist/fields/index.js +1 -1
- package/dist/panel/index.d.ts +1 -1
- package/dist/panel/index.js +18 -18
- package/dist/panel/panel.css +7 -4
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/MediaSidePanel.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/SaveControls.js +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +16 -16
- package/dist/screen/components/SidePanelHead.js +1 -1
- package/dist/screen/components/panel-widths.js +1 -1
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/puck/use-section-ops.js +1 -1
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/strings/catalogue.d.ts +2 -2
- package/dist/strings/catalogue.js +1 -1
- package/dist/strings/index.d.ts +2 -2
- package/dist/strings/index.js +1 -1
- package/dist/text-styles/index.js +13 -13
- package/dist/{types-OUl0mK1k.d.ts → types-C97TAUKi.d.ts} +16 -0
- package/dist/{words-C1U_dLBh.d.ts → words-BpiVrsW5.d.ts} +8 -0
- package/dist/{words-BAnsDT16.d.ts → words-dsex49Jh.d.ts} +27 -2
- package/package.json +3 -3
- package/dist/chunk-AUT242JK.js +0 -1
- package/dist/chunk-CWTAS5R6.js +0 -5
- package/dist/chunk-GZH4UVDH.js +0 -8
- package/dist/chunk-HA33IXEU.js +0 -1
- package/dist/chunk-KIA6EKAM.js +0 -5
- package/dist/chunk-OZ72A6MY.js +0 -9
- package/dist/chunk-QLD57GBB.js +0 -6
- package/dist/chunk-UCLVWF5E.js +0 -21
- package/dist/chunk-Y2G7CU6A.js +0 -1
package/dist/copy/index.js
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import{DEFAULT_COPY_WORDS as e}from"../chunk-
|
|
2
|
-
return
|
|
3
|
-
/* @__PURE__ */
|
|
4
|
-
return
|
|
5
|
-
return
|
|
6
|
-
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
1
|
+
import{DEFAULT_COPY_WORDS as e}from"../chunk-Q6AM43CA.js";import{selectionToVisible as t,selectionToSource as n,richLayout as r,createHistory as l,markPress as o,pasteToMarkup as a,richInput as s,editVisible as i,MARKUP_CLIPBOARD_TYPE as c,markupOfRange as u}from"../chunk-WQASXLXS.js";export{MARKUP_CLIPBOARD_TYPE,TYPING_BURST_MS,createHistory,editVisible,markupOfRange,newLine,pasteToMarkup,richInput,richLayout,selectionToSource,selectionToVisible,setBullet,startCanvasTyping,textMap,toSource,toSourceStart,toVisible}from"../chunk-WQASXLXS.js";import{FieldNumber as d}from"../chunk-66LWADFP.js";import{FieldSelect as p}from"../chunk-65Z5FSAW.js";import{SettingsSegmented as h,SettingsSwitch as f,SettingsField as m}from"../chunk-XJCMEEBH.js";import"../chunk-FFYXVAAL.js";import{GoldTextInput as g}from"../chunk-2FZJWH24.js";import{RETIRED_MARKS as y,applyMark as v,markupTools as b,marksIn as w,STANDARD_MARKUP as k,findLink as S,markedAt as x,listIn as C,colorIn as E,spanFor as D,clearStyle as N,toggleMark as L,colorOver as T,setList as M,unlinkAt as R,removeLink as z,linkOver as P,writeLink as B}from"../chunk-546BBOPE.js";import{useWords as O}from"../chunk-MFIRYGHW.js";import{withTip as F}from"../chunk-P2VEMZH5.js";import{Tooltip as $,ColorSwatch as K,ColorPickerPanel as W,Button as j,IconButton as H,registerModalEscapeInterceptor as V,textToolbarRows as A,TextToolbar as U,LinkPicker as I}from"efficient-shell/ui";export{TextToolbar}from"efficient-shell/ui";import{useRef as X,useState as q,useLayoutEffect as Y,useEffect as Z,useId as _}from"react";import{AlignJustifyIcon as Q,AlignRightIcon as G,AlignCenterIcon as J,AlignLeftIcon as ee,ParagraphSpacingIcon as te,LetterSpacingIcon as ne,LineSpacingIcon as re,TextSizeIcon as le,ClearMarksIcon as oe,StylesIcon as ae,ItalicIcon as se,TypeIcon as ie,AlignmentIcon as ce,ListFormatIcon as ue,CaseIcon as de,LinkIcon as pe,QuietIcon as he,EmphasisIcon as fe,StrikeIcon as me,BoldIcon as ge,NumberedListIcon as ye,ListIcon as ve,ListNoneIcon as be,CaseLowerIcon as we,CaseCapitalizedIcon as ke,CaseUpperIcon as Se,CaseNormalIcon as xe}from"efficient-shell/icons/efficient";import{jsx as Ce,jsxs as Ee,Fragment as De}from"react/jsx-runtime";var Ne=["left","center","right","justify"],Le=e.align,Te={left:/* @__PURE__ */Ce(ee,{}),center:/* @__PURE__ */Ce(J,{}),right:/* @__PURE__ */Ce(G,{}),justify:/* @__PURE__ */Ce(Q,{})},Me={three:{labelsPx:94.5,widestLabelPx:39.94},four:{labelsPx:140,widestLabelPx:44}};function Re(e,t=Le){return Ne.filter(t=>e.includes(t)).map(e=>({id:e,label:t[e],icon:Te[e],title:t[e]}))}var ze=/[\u1100-\u11ff\u2e80-\u9fff\uac00-\ud7af\uf900-\ufaff\uff00-\uffef]/;function Pe(e){if(e.every(e=>e.label===Le[e.id]))return e.length>3?Me.four:Me.three;const t=e.map(e=>[...e.label].reduce((e,t)=>e+(ze.test(t)?13:8),0));return{labelsPx:t.reduce((e,t)=>e+t,0),widestLabelPx:Math.max(0,...t)}}function Be(e,t){const n=t?.selectionStart??e.length;return{start:n,end:t?.selectionEnd??n}}function Oe(e,t,n,r=v){const{start:l,end:o}=Be(e,n);return r(e,l,o,t)}function Fe(e,t,n){const{start:r,end:l}=Be(e,n),o=r+t.length;return{text:e.slice(0,r)+t+e.slice(l),selectionStart:o,selectionEnd:o}}function $e(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 Ke(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 We(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 je({value:e,rules:l,multiline:o,readOnly:d=!1,placeholder:p,ariaLabel:h,handle:f,onEdit:m,onSelect:g,onHistory:y,onFormat:v,pending:b,onCommit:w,onCancel:k}){const S=X(null),x=X(null),C=X(null),E=X(null),D=X(null),N=X(e),[L,T]=q(0),M=X({value:e,rules:l,multiline:o,readOnly:d,pending:b,onEdit:m,onHistory:y,onFormat:v});M.current={value:e,rules:l,multiline:o,readOnly:d,pending:b,onEdit:m,onHistory:y,onFormat:v};const R=()=>{const e=S.current,t=x.current,n=e?.ownerDocument.getSelection();if(!(e&&t&&n&&0!==n.rangeCount&&n.anchorNode&&e.contains(n.anchorNode)))return null;const r=Ke(t,e,n.anchorNode,n.anchorOffset),l=n.focusNode&&e.contains(n.focusNode)?Ke(t,e,n.focusNode,n.focusOffset):r;return r<=l?[r,l]:[l,r]},z=(e,t)=>{const n=S.current,r=x.current;if(!n||!r)return;const[l,o]=We(r,e),[a,s]=We(r,t);n.ownerDocument.getSelection()?.setBaseAndExtent(l,o,a,s)};f.current={getSource(){const e=R(),t=x.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){E.current={text:n,src:[e,t]},T(e=>e+1)},focus(){S.current?.focus()},rangeOf(e,n){const r=S.current,l=x.current;if(!r||!l)return null;const[o,a]=t(l.layout,e,n),[s,i]=We(l,o),[c,u]=We(l,a),d=r.ownerDocument.createRange();return d.setStart(s,i),d.setEnd(c,u),d}},Y(()=>{const n=S.current;if(!n||D.current)return;const o=E.current?null:R();x.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=$e(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)),C.current=e;const a=E.current;if(!a||a.text!==e)return void(o&&n.ownerDocument.activeElement===n&&z(o[0],Math.min(o[1],x.current.layout.text.length)));E.current=null;const s=x.current.layout,[i,c]=a.vis??t(s,a.src[0],a.src[1]);n.ownerDocument.activeElement!==n&&n.focus(),z(i,c)},[e,l,L]);const P=(e,t,r)=>{const l=x.current,[o,a]=n(l.layout,t[0],t[1]);E.current={text:e.text,vis:[e.caret,e.caret]},e.text!==M.current.value?M.current.onEdit(e.text,{start:o,end:a},r):T(e=>e+1)};Z(()=>{const e=S.current;if(!e)return;const t=t=>{const{value:n,rules:r,multiline:l,readOnly:o,pending:a}=M.current;if("insertCompositionText"===t.inputType)return;if(t.preventDefault(),o)return;const i=x.current,c=R();if(!i||!c)return;const u="function"==typeof t.getTargetRanges?t.getTargetRanges()[0]:void 0,d=u&&!u.collapsed?[Ke(i,e,u.startContainer,u.startOffset),Ke(i,e,u.endContainer,u.endOffset)]:null,p=s({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:d,pending:a});p&&("history"!==p.kind?"format"!==p.kind?P(p.edit,p.range,p.kind):M.current.onFormat(p.style):M.current.onHistory(p.dir))},n=()=>{D.current||T(e=>e+1)};return e.addEventListener("beforeinput",t),e.addEventListener("input",n),()=>{e.removeEventListener("beforeinput",t),e.removeEventListener("input",n)}},[]),Z(()=>{const e=S.current;if(!e)return;const t=e.ownerDocument,n=()=>{const e=f.current?.getSource();e&&g(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=x.current;t.clipboardData.setData("text/plain",o.layout.text.slice(r[0],r[1])),t.clipboardData.setData(c,u(e,l,r[0],r[1])),n&&!d&&P(i(e,l,r[0],r[1],{text:""}),r,"edit")};/* @__PURE__ */
|
|
2
|
+
return Ee("div",{className:"es-rich-wrap",children:[p&&""===e?/* @__PURE__ */Ce("div",{className:"es-rich-placeholder","aria-hidden":"true",children:p}):null,
|
|
3
|
+
/* @__PURE__ */Ce("div",{ref:S,className:`es-rich${o?" is-multiline":" is-single"}${d?" is-off":""}`,contentEditable:!d,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":o,"aria-label":h,"aria-readonly":d||void 0,"aria-placeholder":p,tabIndex:d?-1:0,spellCheck:!0,onFocus:()=>{N.current=e},onBlur:()=>{e!==N.current&&w?.(e),N.current=e},onKeyDown:t=>{if("Escape"===t.key)return t.preventDefault(),k?.(N.current),void(N.current=e);"Enter"!==t.key||o||(t.preventDefault(),e!==N.current&&w?.(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}=M.current;e.data?P(i(n,r,t.from,t.to,{text:e.data,add:l?.add,drop:l?.drop,color:l?.color}),[t.from,t.to],"type"):T(e=>e+1)},onCopy:e=>B(e),onCut:e=>B(e,!0),onPaste:t=>{if(t.preventDefault(),d)return;const n=R();if(!n)return;const r=t.clipboardData.getData(c),s=r?o?r:r.replace(/\s*\r?\n\s*/g," "):a({html:t.clipboardData.getData("text/html"),text:t.clipboardData.getData("text/plain")},{doc:t.currentTarget.ownerDocument,multiline:o,rules:l});P(i(e,l,n[0],n[1],{markup:s}),n,"edit")}})]})}var He={fontSize:{key:"fontSize",nameKey:"fontSize",icon:/* @__PURE__ */Ce(le,{}),unit:"px",step:1,shiftStep:10,min:5},lineHeight:{key:"lineHeight",nameKey:"lineHeight",icon:/* @__PURE__ */Ce(re,{}),unit:"%",step:1,shiftStep:10,min:50,max:250,scale:100},letterSpacing:{key:"letterSpacing",nameKey:"letterSpacing",icon:/* @__PURE__ */Ce(ne,{}),unit:"px",step:.1,shiftStep:1,min:-10},paragraphSpacing:{key:"paragraphSpacing",nameKey:"paragraphSpacing",icon:/* @__PURE__ */Ce(te,{}),unit:"px",step:1,shiftStep:10,min:0}};function Ve(e,t){return void 0===e?void 0:Number((e*t).toFixed(6))}function Ae({cells:t,words:n,readOnly:r=!1}){const l=n??e.cells,o=_();/* @__PURE__ */
|
|
4
|
+
return Ce("div",{className:"es-copy-cells-fit",children:/* @__PURE__ */Ce("div",{className:"es-copy-cells",children:t.map(e=>{const t=e.scale??1,n=e.name??(e.nameKey?l[e.nameKey]:e.key),a=e.unit??"",s=e.step??1,i=`${o}-${e.key}`;/* @__PURE__ */
|
|
5
|
+
return Ee("div",{className:"es-copy-cell",children:[
|
|
6
|
+
/* @__PURE__ */Ce("label",{className:"es-field-label es-copy-cell-name",htmlFor:i,children:n}),
|
|
7
|
+
/* @__PURE__ */Ce(d,{id:i,value:Ve(e.value,t),styleValue:Ve(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:r,ariaLabel:n,title:l.tip({name:n,step:s,unit:a})})]},e.key)})})})}var Ue=e=>e.preventDefault();function Ie({colors:e,current:t,words:n,onPick:r}){const l=null===t?null:t.startsWith("#")?t.toLowerCase():e.find(e=>e.name===t)?.value.toLowerCase()??null;/* @__PURE__ */
|
|
8
|
+
return Ee("div",{className:"es-copy-pop es-copy-colors",role:"dialog","aria-label":n.title,onMouseDown:e=>{"INPUT"!==e.target.tagName&&e.preventDefault()},children:[
|
|
9
|
+
/* @__PURE__ */Ce("span",{className:"es-copy-pop-label",children:n.theme}),
|
|
10
|
+
/* @__PURE__ */Ce("div",{className:"es-copy-theme",role:"group","aria-label":n.theme,children:e.map(e=>/* @__PURE__ */Ce($,{content:`${e.label} · ${e.value.toUpperCase()}`,children:/* @__PURE__ */Ce(K,{color:e.value,size:"sm",className:"es-copy-theme-swatch","data-color":e.name,"aria-label":e.label,selected:t===e.name,onMouseDown:Ue,onClick:()=>r(e.name)})},e.name))}),
|
|
11
|
+
/* @__PURE__ */Ce("span",{className:"es-copy-pop-label",children:n.any}),
|
|
12
|
+
/* @__PURE__ */Ce(W,{className:"es-copy-any",value:l??"",onChange:e=>{e!==t&&r(e)},label:n.title,dragWrites:"end"}),
|
|
13
|
+
/* @__PURE__ */Ce("div",{className:"es-copy-pop-foot",children:/* @__PURE__ */Ce(j,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onMouseDown:Ue,onClick:()=>r(null),children:n.remove})})]})}var Xe=(e,t,n)=>Math.min(Math.max(e,t),Math.max(t,n));var qe=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom});function Ye(e){const t=e.ownerDocument,n=t.documentElement,r={left:0,top:0,right:n.clientWidth,bottom:n.clientHeight},l=t.defaultView?.getComputedStyle.bind(t.defaultView);for(let o=e.parentElement;o&&o!==n&&o!==t.body;o=o.parentElement){const e=l?.(o);if(!e||"visible"===e.overflowX&&"visible"===e.overflowY)continue;const t=o.getBoundingClientRect();if(0===t.width&&0===t.height)continue;const n=t.left+o.clientLeft,a=t.top+o.clientTop;r.left=Math.max(r.left,n),r.top=Math.max(r.top,a),r.right=Math.min(r.right,n+(o.clientWidth||t.width)),r.bottom=Math.min(r.bottom,a+(o.clientHeight||t.height))}return r}function Ze(e){const t=e.offsetParent??e.parentElement;if(!t)return{left:0,top:0};const n=t.getBoundingClientRect();return{left:n.left+t.clientLeft-t.scrollLeft,top:n.top+t.clientTop-t.scrollTop}}var _e=/* @__PURE__ */new Set([...y,"clear"]),Qe={bold:/* @__PURE__ */Ce(ge,{size:16}),italic:/* @__PURE__ */Ce(se,{size:16}),strike:/* @__PURE__ */Ce(me,{size:16}),highlight:/* @__PURE__ */Ce(fe,{size:16}),quiet:/* @__PURE__ */Ce(he,{size:16}),link:/* @__PURE__ */Ce(pe,{size:16}),clear:/* @__PURE__ */Ce(oe,{size:16})};function Ge(e){if(!e)return;const t=e.split("+"),n=t.pop().toUpperCase();return["Meta",...t.map(e=>e[0].toUpperCase()+e.slice(1)),n].join("+")}var Je={bold:"is-bold",italic:"is-italic",strike:"is-strike"};function et({tools:t,onApply:n,disabled:r=!1,actions:l,align:o,glyphs:a,ariaLabel:s,pressed:i,open:c=null}){const u=O("copy",e),d=("string"==typeof t[0]?b(t).map(e=>({...e,...u.marks[e.style]})):t).filter(e=>!_e.has(e.style));return 0!==d.length||l||o?/* @__PURE__ */Ee("div",{className:"es-copy-bar",role:"group","aria-label":s??u.formatting,children:[d.map(e=>{const t=a?.[e.style]??Qe[e.style],l=c===e.style||Boolean(i?.[e.style]),o="link"===e.style&&Boolean(i);return F(e.title,/* @__PURE__ */Ce(H,{onMouseDown:e=>e.preventDefault(),onClick:()=>n(e.style),disabled:r,"aria-label":e.name??e.title,"aria-keyshortcuts":Ge(e.shortcut),"aria-pressed":o||!i&&!c?void 0:l,pressed:o?l:void 0,"aria-haspopup":o?"dialog":void 0,"aria-expanded":o?"link"===c:void 0,className:`es-copy-mark${t?" has-glyph":Je[e.style]?` ${Je[e.style]}`:""}${l?" is-active":""}`,children:t??e.label},e.style))}),l?/* @__PURE__ */Ee(De,{children:[
|
|
14
|
+
/* @__PURE__ */Ce("span",{className:"es-copy-bar-split","aria-hidden":"true"}),l]}):null,o?/* @__PURE__ */Ce("span",{className:"es-copy-bar-end",children:o}):null]}):null}function tt({target:e,onChange:t}){const n=X(null);return Y(()=>{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 nt=["bold","italic","underline","strike","sup","sub"];function rt({value:t,onChange:n,onCommit:r,onCancel:s,multiline:i=!1,placeholder:c,ariaLabel:u,className:d,readOnly:p=!1,rules:m,tools:y=[],writeMark:$,actions:K,align:W,glyphs:H,barLabel:Q,renderFooter:G,inputRef:J,barShows:ee="always",richText:te=!0,defaultShowMarks:ne=!1,toolbar:re="final",colors:le,cells:ae,letterCase:se,lastTool:ie}){const ce="final"===re,ue=O("copy",e),de=X(null),pe=J??de,[he,fe]=q(!1),[me,ge]=q(null),ye=X(l()).current,ve=X(null);Z(()=>{const e=ve.current;e&&t===e.to?ve.current=null:e&&t===e.from||(ve.current=null,ye.reset())},[t,ye]);const be=e=>{ve.current={from:ve.current?.from??t,to:e},n(e)},we=e=>({text:t,start:e?.selectionStart??me?.start??t.length,end:e?.selectionEnd??me?.end??t.length}),[ke,Se]=q(ne),xe=te&&!(i&&ke),Ne=X(null),Le=_(),[Te,Me]=q(null),[ze,Be]=q(!1),$e=()=>{if(!xe)return pe.current;const e=Ne.current?.getSource()??me;return e?{selectionStart:e.start,selectionEnd:e.end}:null},Ke=tt({target:pe,onChange:be}),We=e=>(ge({start:e.selectionStart,end:e.selectionEnd}),e),He=(e,n)=>{if(!xe)return void Ke(t=>(n&&ye.record(we(t),"edit",Date.now()),We(e(t))));const r=$e(),l=We(e(r));n&&ye.record(we(r),"edit",Date.now()),Me(null),l.text!==t&&be(l.text),Ne.current?.setSource(l.selectionStart,l.selectionEnd,l.text)},Ve=e=>He(e,!0),Ue=e=>He(t=>{const n=we(t),r=ye[e](n);return r?{text:r.text,selectionStart:r.start,selectionEnd:r.end}:{text:n.text,selectionStart:n.start,selectionEnd:n.end}},!1),Qe=X(null);Y(()=>{const e=Qe.current;e&&(Qe.current=null,xe?Ne.current?.setSource(e.start,e.end,t):(pe.current?.focus(),pe.current?.setSelectionRange(e.start,e.end),ge(e)))},[xe]);const[Ge,Je]=q(null),rt=m??k,lt=("string"==typeof y[0]?b(y):y).filter(e=>!_e.has(e.style)),ot=ce?("string"==typeof y[0]?y:y.map(e=>e.style)).filter(e=>!_e.has(e)):lt.map(e=>e.style),at={};if(me&&(xe||ce)){const e=w(t,me.start,me.end,rt);for(const t of ot){const n=e.has(t)||"highlight"===t&&e.has("accent");at[t]=!!Te?.add.includes(t)||!Te?.drop.includes(t)&&n}ce&&(at.link=e.has("link"))}else if(me)for(const e of ot)at[e]="link"===e?null!==S(t,me.start,me.end):x(t,me.start,me.end,e);const st=()=>{const e=$e(),n=e?.selectionStart??t.length;return{start:n,end:e?.selectionEnd??n}},it=e=>{if(ce&&"link"!==e&&D(0,e)){const{start:n,end:r}=st();if(n===r&&!xe)return void Ve(n=>Oe(t,e,n,(e,t,n,r)=>v(e,t,n,r,rt,ue.placeholders)));const l=o({value:t,rules:rt,start:n,end:r,style:e,pending:Te});return void("pending"===l.kind?Me(l.pending):Ve(()=>l.result))}if("clear"===e)return void Ve(n=>Oe(t,e,n,(e,t,n)=>v(e,t,n,"clear",rt)));if("link"!==e&&xe&&D(0,e)){const n=$e(),r=n?.selectionStart??t.length,l=n?.selectionEnd??r;if(r===l){const n=w(t,r,l,rt),o=n.has(e)||"highlight"===e&&n.has("accent"),a=Te&&Te.at===r?Te:null,s=!!a?.add.includes(e)||!a?.drop.includes(e)&&o,i=(a?.add??[]).filter(t=>t!==e),c=(a?.drop??[]).filter(t=>t!==e);return s&&o?c.push(e):s||o||i.push(e),void Me(i.length||c.length?{add:i,drop:c,at:r}:null)}return void Ve(n=>L(t,n?.selectionStart??r,n?.selectionEnd??l,e,rt))}if("link"!==e){const n=$??((e,t,n,r)=>v(e,t,n,r,k,ue.placeholders));return void Ve(r=>Oe(t,e,r,n))}const n=$e(),r=n?.selectionStart??t.length,l=n?.selectionEnd??r;Be(!1),Je({start:r,end:l,link:S(t,r,l)})},ct=Boolean(me&&me.start!==me.end),ut=me?C(t,me.start,me.end,rt):null,dt=me?Te&&void 0!==Te.color&&Te.at===me.start?Te.color:E(t,me.start,me.end,rt):null,pt=dt?dt.startsWith("#")?dt:le?.find(e=>e.name===dt)?.value:void 0,ht=e=>{xe?e?Ne.current?.setSource(e.start,e.end,t):Ne.current?.focus():(pe.current?.focus(),e&&pe.current?.setSelectionRange(e.start,e.end))},ft=()=>{const e=Ge;Je(null),ht(e?{start:e.start,end:e.end}:me)},mt=()=>{const e=yt.current,t=Boolean(e&&e.querySelector(".es-copy-colors")?.contains(e.ownerDocument.activeElement));Be(!1),t&&ht(me)},gt=X(mt);gt.current=mt,Z(()=>{if(ze)return V(e=>{const t=yt.current;return!!("Escape"===e.key&&t&&e.target instanceof Node&&t.contains(e.target))&&(gt.current(),!0)},()=>yt.current?.querySelector(".es-copy-colors"))},[ze]);const yt=X(null),vt=ze||null!==Ge;Z(()=>{const e=yt.current;if(!vt||!e)return;const t=e.ownerDocument,n=()=>{Be(!1),Je(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)}},[vt]);const bt=Ge??(ze?me??{start:t.length,end:t.length}:null),wt=X(()=>{});wt.current=()=>{const e=yt.current,t=e?.querySelector(".rosh-tb-wrap > .es-copy-pop");if(!e||!t||!bt)return;const n=xe?null:e.querySelector(".es-gold-layer"),r=xe?Ne.current?.rangeOf(bt.start,bt.end)??null:n?function(e,t,n){const r=e.ownerDocument,l=r.createTreeWalker(e,4),o=e=>{let t=e,n=null;for(let e=l.nextNode();e;e=l.nextNode()){if(t<=e.data.length)return[e,t];t-=e.data.length,n=e}return n?[n,n.data.length]:null},a=o(t);l.currentNode=e;const s=o(n);if(!a||!s)return null;const i=r.createRange();return i.setStart(a[0],a[1]),i.setEnd(s[0],s[1]),i}(n,bt.start,bt.end):null,l=r?.endContainer,o=l?1===l.nodeType?l:l.parentElement:null,a=r?function(e,t){const n=("function"==typeof e.getClientRects?[...e.getClientRects()]:[]).filter(e=>e.height>0);if(n.length>0){const t="function"==typeof e.getBoundingClientRect?e.getBoundingClientRect():n[0];return t.height>0?qe(t):qe(n[0])}if(!t)return null;const r=t.getBoundingClientRect();return{left:r.left,top:r.top,right:r.left,bottom:r.bottom}}(r,o?.closest(".es-rich-line, .es-gold-layer")??null):null;if(!a)return;const s=function({anchor:e,size:t,within:n,clip:r,parent:l,gap:o=8}){const a=Math.max(n.left,r.left),s=Math.min(n.right,r.right)-t.width,i=Xe(e.left,a,s),c=r.bottom-(e.bottom+o),u=e.top-o-r.top,d=t.height>c&&(t.height<=u||u>c),p=d?e.top-o-t.height:e.bottom+o,h=e.left+Math.min((e.right-e.left)/2,10),f=Xe(h-5-i,10,t.width-10-10);return{top:p-l.top,left:i-l.left,above:d,point:f}}({anchor:a,size:{width:t.offsetWidth,height:t.offsetHeight},within:e.getBoundingClientRect(),clip:Ye(e),parent:Ze(t)});t.style.top=`${s.top}px`,t.style.left=`${s.left}px`,t.style.setProperty("--es-pop-point",`${s.point}px`),t.dataset.side=s.above?"above":"below"},Y(()=>{const e=yt.current;if(!vt||!e)return;const t=()=>wt.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()}},[vt,ze,Ge,bt?.start,bt?.end,xe]);const kt=e=>Ge&&/* @__PURE__ */Ce(I,{className:e?"es-copy-link es-copy-pop":"es-copy-link",value:Ge.link?.href??"",onApply:e=>{const n=Ge;Je(null),Ve(()=>xe?P(t,n.start,n.end,e,rt):B(t,n.start,n.end,e))},onRemove:Ge.link?()=>{const e=Ge.link,n=Ge;Je(null),e&&Ve(()=>xe?R(t,n.start,n.end,rt):z(t,e))}:void 0,onCancel:ft}),St=W?Re(W.allow,ue.align):[],xt="always"===ee||he||null!==Ge||ze,Ct=le&&le.length>0?{run:pt,open:ze,onToggle:()=>{Je(null),ze?mt():Be(!0)}}:void 0,Et=xt&&ce&&ie?ie({className:"rosh-tb-btn",disabled:p,selected:ct,keepCaret:e=>e.preventDefault(),insert:e=>Ve(n=>Fe(t,e,n))}):void 0,Dt=new Set(ot),Nt=W?{value:W.value,allow:W.allow,onChange:W.onChange,disabled:W.disabled}:void 0,Lt={pressed:ut,onList:e=>{const{start:n,end:r}=st(),l=C(t,n,r,rt);Ve(()=>M(t,n,r,l===e?null:e,rt))}},Tt=A({offered:Dt,color:Ct,last:Et,alignment:Nt,list:Lt,letterCase:se}),Mt=ce&&xt&&(nt.some(e=>Dt.has(e))||Boolean(Ct));/* @__PURE__ */
|
|
15
|
+
return Ee("div",{ref:yt,className:"es-copy"+(d?` ${d}`:""),onFocus:()=>fe(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||fe(!1)},onKeyDown:e=>{const t=e.target===pe.current||Boolean(e.target.closest?.(".es-rich"));if(p||!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 Ue(l||e.shiftKey?"redo":"undo");const o=`${e.shiftKey?"shift+":""}${n}`;if(ce){const t={b:"bold",i:"italic",u:"underline",k:"link"}[o];if(!t||!ot.includes(t))return;return e.preventDefault(),e.stopPropagation(),void it(t)}const a=lt.find(e=>e.shortcut===o);a&&(e.preventDefault(),e.stopPropagation(),it(a.style))},onPaste:e=>{const n=pe.current;if(p||!n||e.target!==n)return;e.preventDefault();const r=a({html:e.clipboardData.getData("text/html"),text:e.clipboardData.getData("text/plain")},{doc:n.ownerDocument,multiline:i,rules:rt});Ve(e=>Fe(t,r,e))},style:le&&le.length>0?Object.fromEntries(le.map(e=>[`--es-color-${e.name}`,e.value])):void 0,onSelect:()=>{const e=pe.current;e&&e.ownerDocument.activeElement===e&&ge({start:e.selectionStart??t.length,end:e.selectionEnd??t.length})},children:[xt&&ce&&(Tt.words||Tt.paragraph)?
|
|
16
|
+
/* @__PURE__ */Ce(U,{className:"es-copy-toolbar","aria-label":Q??ue.formatting,offered:Dt,pressed:at,onMark:e=>it(e),color:Ct,linkOpen:null!==Ge,last:Et,alignment:Nt,list:Lt,letterCase:se,disabled:p,windows:/* @__PURE__ */Ee(De,{children:[ze&&le&&le.length>0?/* @__PURE__ */Ce(Ie,{colors:le,current:dt,words:ue.colors??e.colors,onPick:e=>{const{start:n,end:r}=st();if(n!==r)Ve(()=>T(t,n,r,e,rt));else{if(!xe)return;Me({add:Te?.add??[],drop:Te?.drop??[],color:e,at:n})}}}):null,Ge?kt(!0):null]})}):null,ce&&ae&&ae.length>0?/* @__PURE__ */Ce(Ae,{cells:ae,words:ue.cells??e.cells,readOnly:p}):null,xt&&!ce?/* @__PURE__ */Ce(et,{tools:y,disabled:p,actions:K,glyphs:H,ariaLabel:Q,pressed:at,open:Ge?"link":null,onApply:it,align:W?/* @__PURE__ */Ce(h,{options:St,value:W.value,onChange:W.onChange,ariaLabel:ue.alignment,disabled:p||W.disabled,fit:Pe(St)}):null}):null,xe?/* @__PURE__ */Ce(je,{value:t,rules:rt,multiline:i,readOnly:p,placeholder:c,ariaLabel:u,handle:Ne,pending:Te??void 0,onEdit:(e,n,r)=>{ye.record({text:t,start:n.start,end:n.end},r,Date.now()),Me(null),be(e)},onSelect:e=>{ge(t=>t&&t.start===e.start&&t.end===e.end?t:e),!Te||e.start===Te.at&&e.end===Te.at||Me(null)},onHistory:Ue,onFormat:e=>{ot.includes(e)&&it(e)},onCommit:r,onCancel:s}):/* @__PURE__ */Ce(g,{value:t,onInput:e=>{ye.record(we(null),"type",Date.now()),be(e)},onCommit:r,onCancel:s,multiline:i,placeholder:c,ariaLabel:u,rules:m,disabled:p,inputRef:pe,className:"es-copy-box"}),Ge&&!ce?kt(!1):null,G?G({focused:he,insert:e=>Ve(n=>Fe(t,e,n))}):null,te&&i||Mt?
|
|
17
|
+
/* @__PURE__ */Ee("div",{className:"es-copy-marks",children:[te&&i?/* @__PURE__ */Ee(De,{children:[
|
|
18
|
+
/* @__PURE__ */Ce(f,{checked:ke,onChange:()=>{const e=$e();Qe.current=e&&null!==e.selectionStart&&null!==e.selectionEnd?{start:e.selectionStart,end:e.selectionEnd}:me,Me(null),Se(e=>!e)},ariaLabelledBy:Le,disabled:p}),
|
|
19
|
+
/* @__PURE__ */Ce("span",{id:Le,className:"es-copy-marks-label",children:ue.showMarks??"Show marks"})]}):null,Mt?F(ct?void 0:ue.clearStyleEmpty??"Select words first",/* @__PURE__ */Ee(j,{variant:"secondary",size:"sm",className:"es-copy-clear",disabled:p||!ct,onMouseDown:e=>e.preventDefault(),onClick:()=>{const{start:e,end:n}=st();if(e===n)return;const r=N(t,e,n,rt);r.text!==t&&Ve(()=>r)},children:[
|
|
20
|
+
/* @__PURE__ */Ce(oe,{size:16}),ue.clearStyle??e.clearStyle]})):null]}):null]})}var lt=["none","bullet","number"],ot=["none","upper","capitalize","lower"],at={none:/* @__PURE__ */Ce(be,{}),bullet:/* @__PURE__ */Ce(ve,{}),number:/* @__PURE__ */Ce(ye,{})},st={none:/* @__PURE__ */Ce(xe,{}),upper:/* @__PURE__ */Ce(Se,{}),capitalize:/* @__PURE__ */Ce(ke,{}),lower:/* @__PURE__ */Ce(we,{})};function it({label:e,icon:t,answers:n,names:r,glyphs:l,row:o}){const a=o.value||o.styleValue||"";/* @__PURE__ */
|
|
21
|
+
return Ce(m,{label:e,icon:t,children:/* @__PURE__ */Ce(h,{ariaLabel:e,value:a,onChange:e=>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 ct({kept:t,style:n,font:r,italic:l,cells:o,align:a,list:s,letterCase:i}){const c=O("copy",e),u={...e.panel,...c.panel},d=c.clearStyle??e.clearStyle,h=n?[n.onClearChanges&&{label:d,onSelect:n.onClearChanges},n.onEditStyles&&{label:u.editStyles,onSelect:n.onEditStyles},n.onUpdateStyle&&{label:u.updateStyle,onSelect:n.onUpdateStyle}].filter(e=>!!e):[],f=!!l&&(l.value??l.styleValue??!1);/* @__PURE__ */
|
|
22
|
+
return Ee("div",{className:"es-tpp",children:[t?/* @__PURE__ */Ce("div",{className:"es-tpp-kept",children:/* @__PURE__ */Ce(rt,{...t})}):null,n?/* @__PURE__ */Ce(m,{label:u.style,icon:/* @__PURE__ */Ce(ae,{}),children:/* @__PURE__ */Ce(p,{ariaLabel:u.style,value:n.value,options:n.options,onChange:n.onChange,changed:n.changed,footer:h})}):null,r?/* @__PURE__ */Ce(m,{label:u.font,icon:/* @__PURE__ */Ce(ie,{}),children:/* @__PURE__ */Ee("div",{className:"es-tpp-font",children:[
|
|
23
|
+
/* @__PURE__ */Ce("div",{className:"es-tpp-font-select",children:/* @__PURE__ */Ce(p,{ariaLabel:u.font,value:r.value||void 0,placeholder:r.styleValue,options:r.options,onChange:r.onChange,searchable:r.searchable})}),l?/* @__PURE__ */Ce($,{content:u.italic,children:/* @__PURE__ */Ce(H,{size:"sm",variant:"ghost","aria-label":u.italic,"aria-pressed":f,onClick:()=>{const e=!f;l.onChange(e===(l.styleValue??!1)?void 0:e)},children:/* @__PURE__ */Ce(se,{})})}):null]})}):null,o?.length?/* @__PURE__ */Ce(Ae,{cells:o,words:c.cells}):null,a?/* @__PURE__ */Ce(it,{label:c.alignment,icon:/* @__PURE__ */Ce(ce,{}),answers:Ne.filter(e=>!a.allow||a.allow.includes(e)),names:c.align,glyphs:Te,row:a}):null,s?/* @__PURE__ */Ce(it,{label:u.list,icon:/* @__PURE__ */Ce(ue,{}),answers:lt,names:u.lists,glyphs:at,row:s}):null,i?/* @__PURE__ */Ce(it,{label:u.capitalization,icon:/* @__PURE__ */Ce(de,{}),answers:ot,names:u.cases,glyphs:st,row:i}):null]})}export{Ne as COPY_ALIGNS,Me as COPY_ALIGN_FIT,Te as COPY_ALIGN_GLYPHS,Le as COPY_ALIGN_LABELS,He as COPY_CELLS,Ie as ColorWindow,rt as CopyBox,Ae as CopyCells,et as MarkBar,je as RichBox,ct as TextPartPanel,Ge as ariaShortcut,Re as copyAlignOptions,Fe as insertSelection,Oe as markSelection,tt as useCaretEdit};
|
package/dist/easel/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { TextToolbarProps } from 'efficient-shell/ui';
|
|
|
11
11
|
import { C as CanvasTypingEnd } from '../canvas-typing-Cnvlsh_V.js';
|
|
12
12
|
import { InlineRule } from '../markup/index.js';
|
|
13
13
|
import { b as NodeOpsHost, C as ClipboardEntry } from '../useNodeOps-BHRkUFfG.js';
|
|
14
|
-
import { I as InspectorFields } from '../types-
|
|
14
|
+
import { I as InspectorFields } from '../types-C97TAUKi.js';
|
|
15
15
|
import '../buckets-Tj-nkBpg.js';
|
|
16
16
|
|
|
17
17
|
interface EaselOptions<C extends EaselConfig = EaselConfig> {
|
package/dist/fields/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { S as SettingsBucket } from '../buckets-Tj-nkBpg.js';
|
|
4
4
|
export { D as DesignGroup } from '../buckets-Tj-nkBpg.js';
|
|
5
|
-
import { a as InspectorFieldDef, F as FieldRenderer, I as InspectorFields, b as FieldTextProps, c as FieldNumberProps, d as FieldSliderProps, e as FieldSelectManyProps, f as FieldSelectOneProps, g as FieldOption } from '../types-
|
|
6
|
-
export { A as ArrayFieldDef, C as CustomFieldDef, h as CustomFieldRenderProps, i as FieldSelectProps, N as NumberFieldDef, O as ObjectFieldDef, R as RadioFieldDef, S as SelectFieldDef, j as SlotFieldDef, T as TextFieldDef, k as TextareaFieldDef } from '../types-
|
|
5
|
+
import { a as InspectorFieldDef, F as FieldRenderer, I as InspectorFields, b as FieldTextProps, c as FieldNumberProps, d as FieldSliderProps, e as FieldSelectManyProps, f as FieldSelectOneProps, g as FieldOption } from '../types-C97TAUKi.js';
|
|
6
|
+
export { A as ArrayFieldDef, C as CustomFieldDef, h as CustomFieldRenderProps, i as FieldSelectProps, N as NumberFieldDef, O as ObjectFieldDef, R as RadioFieldDef, S as SelectFieldDef, j as SlotFieldDef, T as TextFieldDef, k as TextareaFieldDef } from '../types-C97TAUKi.js';
|
|
7
7
|
import { R as ResolvableItem } from '../resolve-D68pb3Bx.js';
|
|
8
8
|
export { F as FieldsWords } from '../words-vhnV8sM7.js';
|
|
9
9
|
export { LinkFilter, LinkFilterField, LinkKindChoice, LinkOption, LinkOptionGroup, LinkPicker, LinkPickerProps, LinkRules, LinkTarget } from 'efficient-shell/ui';
|
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-26GHWMNN.js";export{FieldSlider}from"../chunk-XWFH2NHZ.js";import"../chunk-4JSBIW5H.js";import"../chunk-RC25EGHD.js";import"../chunk-K56YDHYQ.js";import"../chunk-KFV7N2DJ.js";export{useResolvedFields}from"../chunk-YRLPFZW3.js";import"../chunk-EA2HTX37.js";export{FieldNumber}from"../chunk-66LWADFP.js";export{FieldSelect,optionFor}from"../chunk-65Z5FSAW.js";import"../chunk-XJCMEEBH.js";import"../chunk-FFYXVAAL.js";import"../chunk-MFIRYGHW.js";import"../chunk-67GNT6PF.js";import"../chunk-P2VEMZH5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
|
package/dist/panel/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { W as WordFit } from '../wordFit-7XpmhcaW.js';
|
|
4
4
|
import { P as PanelWords } from '../words-zH1H0WFw.js';
|
|
5
|
-
export { CornerOption as SettingsCornerPoint, CornersInput as SettingsCorners, CornersInputProps as SettingsCornersProps, AlignmentGrid as SettingsPlacement, AlignmentPoint as SettingsPlacementPoint, AlignmentGridProps as SettingsPlacementProps } from 'efficient-shell/ui';
|
|
5
|
+
export { BorderInput as SettingsBorder, BorderLineStyle as SettingsBorderLineStyle, BorderInputProps as SettingsBorderProps, BorderValue as SettingsBorderValue, CornerOption as SettingsCornerPoint, CornersInput as SettingsCorners, CornersInputProps as SettingsCornersProps, AlignmentGrid as SettingsPlacement, AlignmentPoint as SettingsPlacementPoint, AlignmentGridProps as SettingsPlacementProps, SidesInput as SettingsSides, SidesEachToggle as SettingsSidesEach, SidesInputProps as SettingsSidesProps, SidesValue as SettingsSidesValue, borderSides, borderStartEach, sidesStartEach } from 'efficient-shell/ui';
|
|
6
6
|
export { a as DESIGN_GROUPS, D as DesignGroup, b as SETTINGS_BUCKETS, S as SettingsBucket } from '../buckets-Tj-nkBpg.js';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/panel/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export{DESIGN_GROUPS,SETTINGS_BUCKETS,
|
|
1
|
+
export{DESIGN_GROUPS,SETTINGS_BUCKETS,SettingsGroup}from"../chunk-RC25EGHD.js";import{DEFAULT_PANEL_WORDS as e}from"../chunk-KFV7N2DJ.js";export{SettingsField,SettingsSegmented,SettingsSwitch}from"../chunk-XJCMEEBH.js";import{withTip as t}from"../chunk-P2VEMZH5.js";import{Tabs as s,CountBadge as i,Tooltip as n}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";import{jsx as a,jsxs as l,Fragment as r}from"react/jsx-runtime";import{RevertIcon as d}from"efficient-shell/icons/efficient";function c(e){const t=e[0];if(!t?.htmlId||!t.htmlId.endsWith(`-tab-${t.id}`))return;const s=t.htmlId.slice(0,-`-tab-${t.id}`.length);return e.every(e=>e.htmlId===`${s}-tab-${e.id}`)?s:void 0}function o({items:t,activeId:n,onSelect:d,ariaLabel:o=e.settings,idPrefix:u,className:m}){
|
|
2
2
|
/* @__PURE__ */
|
|
3
|
-
return
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
return
|
|
9
|
-
return
|
|
10
|
-
return
|
|
11
|
-
return
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
return
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
3
|
+
return a("div",{className:"es-tabs-fit",children:/* @__PURE__ */a(s,{variant:"pill","aria-label":o,idPrefix:u??c(t),className:m?`es-tabs ${m}`:"es-tabs",value:n,onChange:d,items:t.map(e=>{const t="number"==typeof e.badge&&e.badge>0?/* @__PURE__ */a(i,{count:e.badge,tone:"accent"}):null;return e.icon?{id:e.id,tooltip:e.label,label:/* @__PURE__ */l(r,{children:[
|
|
4
|
+
/* @__PURE__ */l("span",{className:"es-tab-tip",children:[
|
|
5
|
+
/* @__PURE__ */a("span",{className:"es-tab-icon","aria-hidden":"true",children:e.icon}),
|
|
6
|
+
/* @__PURE__ */a("span",{className:"es-tab-word has-icon",children:e.label})]}),t]})}:{id:e.id,label:/* @__PURE__ */l(r,{children:[
|
|
7
|
+
/* @__PURE__ */a("span",{className:"es-tab-word",children:e.label}),t]})}})})})}function u({title:e,level:t=3,id:s,className:i}){/* @__PURE__ */
|
|
8
|
+
return a(`h${t}`,{id:s,className:i?`es-group-head ${i}`:"es-group-head",children:e})}function m({title:e,level:t=4,id:s,className:i}){/* @__PURE__ */
|
|
9
|
+
return a(`h${t}`,{id:s,className:i?`es-group-sub ${i}`:"es-group-sub",children:e})}function h({label:s,changed:i,onReset:n,detail:l,disabled:r,defaultAction:c,words:o,className:u}){const m={...e,...o},h=["es-default-reset"];if(i&&h.push("is-changed"),u&&h.push(u),!i&&c)return h.push("is-pressable"),t(c.title,/* @__PURE__ */a("button",{type:"button",className:h.join(" "),"aria-label":c.title,disabled:r,onClick:c.onPress,children:c.icon}));if(!i)/* @__PURE__ */
|
|
10
|
+
return a("span",{className:h.join(" "),"aria-hidden":"true"});const N=m.resetName({label:s});return t(l?m.resetTitle({label:s,detail:l}):N,/* @__PURE__ */a("button",{type:"button",className:h.join(" "),"aria-label":N,"aria-description":l||void 0,disabled:r,onClick:e=>{n(),function(e){const t=e.currentTarget,s=t.closest(".es-field");let i=s?.querySelector(p(".es-field-ctl"))??s?.querySelector(p(".es-field-head"))??null,n=s?null:t.parentElement;for(let e=0;!i&&n&&e<f;e+=1,n=n.parentElement)i=[...n.querySelectorAll(b)].find(e=>e!==t)??null;i?.focus()}(e)},children:/* @__PURE__ */a(d,{size:15})}))}var b=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),p=e=>b.split(", ").map(t=>`${e} ${t}`).join(", "),f=4;function N({name:e,preview:t,offPage:s,status:i,onOpen:d,id:c,className:o}){const u=null!=t;/* @__PURE__ */
|
|
11
|
+
return l("button",{type:"button",id:c,className:o?`es-drill ${o}`:"es-drill",onClick:d,children:[
|
|
12
|
+
/* @__PURE__ */l(n,{content:u?/* @__PURE__ */l(r,{children:[e,
|
|
13
|
+
/* @__PURE__ */a("br",{}),t]}):e,describe:!1,className:"es-drill-text",children:[
|
|
14
|
+
/* @__PURE__ */a("span",{className:"es-drill-name",children:e}),u?/* @__PURE__ */a("span",{className:s?"es-drill-preview is-offpage":"es-drill-preview",children:t}):null]}),i?/* @__PURE__ */a("span",{className:"es-drill-status",children:i}):null,
|
|
15
|
+
/* @__PURE__ */a("span",{className:"es-drill-chev","aria-hidden":"true"})]})}function g({label:e,onPress:t,disabled:s,note:i,done:n,doneLabel:r,icon:d,id:c,className:o}){const u=void 0===r?e:r,m=n?u:e,h=null!=i,b=h&&c?`${c}-note`:void 0;/* @__PURE__ */
|
|
16
|
+
return l("div",{className:o?`es-action-wrap ${o}`:"es-action-wrap",children:[
|
|
17
|
+
/* @__PURE__ */l("button",{type:"button",id:c,className:n?"es-action is-done":"es-action",disabled:s,"aria-describedby":b,onClick:t,children:[d?/* @__PURE__ */a("span",{className:"es-action-icon","aria-hidden":"true",children:d}):null,
|
|
18
|
+
/* @__PURE__ */a("span",{className:"es-action-label",children:m})]}),h?/* @__PURE__ */a("p",{id:b,className:"es-action-note",children:i}):null,
|
|
19
|
+
/* @__PURE__ */a("span",{className:"es-action-live",role:"status","aria-live":"polite",children:n?u:null})]})}export{g as SettingsAction,h as SettingsDefaultReset,N as SettingsDrill,u as SettingsGroupHead,m as SettingsGroupSub,o as SettingsTabs};
|
package/dist/panel/panel.css
CHANGED
|
@@ -889,10 +889,13 @@ button.es-group-head:hover { background: var(--es-chip-bg); }
|
|
|
889
889
|
outline-offset: 1px;
|
|
890
890
|
}
|
|
891
891
|
|
|
892
|
-
/* A
|
|
893
|
-
|
|
894
|
-
.
|
|
895
|
-
|
|
892
|
+
/* WHATEVER A HOST PUTS IN `action` SITS AT THE ROW'S RIGHT END: the Default /
|
|
893
|
+
Reset part (or the shell Tooltip wrapper round it), a switch, the `Each side`
|
|
894
|
+
toggle of the Padding and Border rows. ONE rule for all of them (plan E-P,
|
|
895
|
+
2026-10-16), where the Default / Reset part had two of its own. A value, when
|
|
896
|
+
drawn, already takes the free space (`.es-field-value`), and the action
|
|
897
|
+
follows it. */
|
|
898
|
+
.es-field-name + :not(.es-field-value) { margin-left: auto; }
|
|
896
899
|
|
|
897
900
|
/* THE GREY VALUE IS THE "DEFAULT" WORD NOW (option E): a row whose slot is
|
|
898
901
|
empty draws its value grey, and the value takes the text colour once the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AddBlockRow as default}from"../../chunk-
|
|
1
|
+
export{AddBlockRow as default}from"../../chunk-4CE7XFCE.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-LGDQLTJW.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-JTUUIVBZ.js";import"../../chunk-K5744MTM.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-26GHWMNN.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-RC25EGHD.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-WQASXLXS.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{blockKey,AddSidePanel as default,sectionKey,templateKey}from"../../chunk-
|
|
1
|
+
export{blockKey,AddSidePanel as default,sectionKey,templateKey}from"../../chunk-XTDBTCVO.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-PPL7GB7D.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-LGDQLTJW.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-JTUUIVBZ.js";import"../../chunk-K5744MTM.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-26GHWMNN.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-RC25EGHD.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-WQASXLXS.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-FCLW4LEN.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{MediaSidePanel as default}from"../../chunk-
|
|
1
|
+
export{MediaSidePanel as default}from"../../chunk-2AKW6UXX.js";import"../../chunk-LGDQLTJW.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-K5744MTM.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-26GHWMNN.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-RC25EGHD.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-WQASXLXS.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{PageEditGuardNotices as default}from"../../chunk-
|
|
1
|
+
export{PageEditGuardNotices as default}from"../../chunk-P4CL4YQI.js";import"../../chunk-THZ46DC5.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-JTUUIVBZ.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-MFIRYGHW.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenMainButton,ScreenSaveIcon}from"../../chunk-
|
|
1
|
+
export{ScreenMainButton,ScreenSaveIcon}from"../../chunk-W4U4SHKW.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-MFIRYGHW.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenChrome as default}from"../../chunk-
|
|
1
|
+
export{ScreenChrome as default}from"../../chunk-BPLCMQ6S.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-BRDCD4LK.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-OGCROOTI.js";import"../../chunk-7F52SZOI.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-OWW44DVK.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-TZIIRGVY.js";import"../../chunk-XO7OUCZV.js";import"../../chunk-K2YSFVOJ.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-D6N77AOS.js";import"../../chunk-P4CL4YQI.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-W4U4SHKW.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-THZ46DC5.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-V7U33NF2.js";import"../../chunk-5545A3PC.js";import"../../chunk-XTDBTCVO.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-PPL7GB7D.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-2AKW6UXX.js";import"../../chunk-LGDQLTJW.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-JTUUIVBZ.js";import"../../chunk-K5744MTM.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-26GHWMNN.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-RC25EGHD.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-4VJATVVR.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-WQASXLXS.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-FCLW4LEN.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DocumentScreen,ScreenMount as default}from"../../chunk-
|
|
1
|
+
export{DocumentScreen,ScreenMount as default}from"../../chunk-U5RF4USK.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-GKGBKSZ7.js";import"../../chunk-BPLCMQ6S.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-BRDCD4LK.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-OGCROOTI.js";import"../../chunk-7F52SZOI.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-OWW44DVK.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-TZIIRGVY.js";import"../../chunk-XO7OUCZV.js";import"../../chunk-K2YSFVOJ.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-D6N77AOS.js";import"../../chunk-P4CL4YQI.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-W4U4SHKW.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-THZ46DC5.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-V7U33NF2.js";import"../../chunk-5545A3PC.js";import"../../chunk-XTDBTCVO.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-PPL7GB7D.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-2AKW6UXX.js";import"../../chunk-LGDQLTJW.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-JTUUIVBZ.js";import"../../chunk-K5744MTM.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-26GHWMNN.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-RC25EGHD.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-4VJATVVR.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-WQASXLXS.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-FCLW4LEN.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenStoreProvider as default}from"../../chunk-
|
|
1
|
+
export{ScreenStoreProvider as default}from"../../chunk-GKGBKSZ7.js";import"../../chunk-LGDQLTJW.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-K5744MTM.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-26GHWMNN.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-RC25EGHD.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-WQASXLXS.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{AddBlockRow as e}from"../../chunk-
|
|
2
|
-
return
|
|
3
|
-
return Z
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
return
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
return Z
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
/* @__PURE__
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
1
|
+
import{AddBlockRow as e}from"../../chunk-4CE7XFCE.js";import{slotChildRowName as n}from"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import{scrollPreviewToSection as o,gotoPreviewSlide as r}from"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import{useEaselUndoKeys as t}from"../../chunk-OWW44DVK.js";import{SlotChildActionsProvider as s}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as i}from"../../chunk-TZIIRGVY.js";import{usePartBridge as c}from"../../chunk-XO7OUCZV.js";import{useSectionOps as p}from"../../chunk-K2YSFVOJ.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{useScreenDocument as l}from"../../chunk-THZ46DC5.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import{MediaSidePanel as m}from"../../chunk-2AKW6UXX.js";import{SELECTION_MODE as d,useScreenPinned as a,useScreenCanvasFrame as u,useScreenInspectorPanel as h,useScreenPickFollowsSelection as k,sameInspectorMode as f,useStandaloneScreenBridges as j,useScreenBlockLook as y,useScreenBlockRules as S}from"../../chunk-LGDQLTJW.js";import{slotFieldsOf as N,nestsInTree as C}from"../../chunk-PLVEGYK6.js";import{useMediaPanel as x,usePanelPick as A,useCancelPanelPick as R}from"../../chunk-R6WTQWAC.js";import{useHostEscape as E}from"../../chunk-U3JP4VGF.js";import{DEFAULT_SCREEN_WORDS as v}from"../../chunk-JTUUIVBZ.js";import{useEasel as O}from"../../chunk-K5744MTM.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-26GHWMNN.js";import"../../chunk-XWFH2NHZ.js";import{LayersTree as P,Subtree as W,TreeRow as B,TreeRowAction as L,TreeSeam as X}from"../../chunk-4JSBIW5H.js";import"../../chunk-RC25EGHD.js";import{DEFAULT_TREE_WORDS as g}from"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as F,saveIndicator as H}from"../../chunk-H6DDIBQ4.js";import{SaveState as M,panelWidthVars as w}from"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-WQASXLXS.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import{useWords as z}from"../../chunk-MFIRYGHW.js";import"../../chunk-FCLW4LEN.js";import"../../chunk-O2NLQBFX.js";import{useTreeDrag as V}from"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import{zoneKey as b,parseZoneKey as D}from"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import{useState as J,useRef as T,useEffect as K,useCallback as Y,Fragment as Z}from"react";import{Tooltip as I}from"efficient-shell/ui";import{TrashIcon as G}from"efficient-shell/icons/efficient";import{jsxs as $,jsx as Q,Fragment as U}from"react/jsx-runtime";var q=e=>n=>{n.target.closest("button, input")||e()},_={rowClick:q};function ee(){const{saveState:ee,readOnly:ne,readOnlyReason:oe=null}=l(),re=p(),{appState:te,selectedItem:se,config:ie}=O(e=>e),[ce,pe]=J(d),le=z("screen",v),me=z("tree",g),de=z("save",F),{first:ae,last:ue,panelOf:he}=a(),ke=he(ae),fe=u(),je=h(),ye=te.data.content?.[0]??null,Se=ye?.props.id??null,Ne=ye?.type===ae,Ce=ye?.type===ue,xe=T(null),Ae=T(null);t(Ae);const Re=x(),Ee=A(),ve=R();k(se?.props.id),K(()=>{const e=Ae.current;if(!Ee||!e)return;const n=e=>{"Escape"===e.key&&ve()};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[Ee]),E(null!==Ee,()=>ve()),K(()=>{Se&&xe.current!==Se&&(xe.current=Se,Ne?pe(ke??d):se||re.select({index:0}))},[Se,se,re,Ne]);const Oe=Y(e=>pe(n=>f(n,e)?n:e),[]),Pe=j({kind:ce.kind,mode:ce,open:Oe,show:e=>pe(e),reveal:()=>{},select:(e,n)=>{pe(e=>f(e,n)?e:n),re.select(e)}}),{selectNode:We}=c({mode:ce,setMode:pe,onOpenPart:o}),Be=y(),{labelAtLevel:Le,Icon:Xe}=Be,{canAddTo:ge}=S(),Fe=e=>Le(e,"block",ie.components[e]?.label??e),He=e=>Le(e,"section",Fe(e)),Me=!Ne&&"puck"===ce.kind&&se?.props.id===Se,we=ye?ge(ye.type)?.spec??null:null,ze=ye&&we?`${ye.props.id}:${we.slot}`:null,Ve=ye&&we&&Array.isArray(ye.props[we.slot])?ye.props[we.slot]:[],be=e=>n(e,Fe,Be.plainText),De=(e,n)=>{ye&&we&&ze&&(pe(d),we.slider?(r(String(ye.props.id),e),re.select({index:e,zone:ze}),o(String(ye.props.id))):(re.select({index:e,zone:ze}),o(n)))},Je=()=>{if(!ye||!we||!ze)return;const e=Ve.length;re.insertComponent(ze,we.childType,e),pe(d),we.slider?requestAnimationFrame(()=>{r(String(ye.props.id),e),re.select({index:e,zone:ze})}):re.select({index:e,zone:ze})},Te=e=>N(ie,e),Ke=e=>{const{parentId:n,slot:o}=D(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of Te(e.type)){const o=Array.isArray(e.props[n])?e.props[n]:[];for(const e of o){const n=r(e);if(n)return n}}return null},t=r(ye)?.props[o];return Array.isArray(t)?t.length:0},Ye=(e,n,o)=>{const r=Math.min(Math.max(o,0),Ke(e)),t=n<r?r-1:r;t!==n&&(re.reorderComponent(e,n,t),pe(d),re.select({index:t,zone:e}))},Ze=V({keyOf:e=>e.id,readOnly:Boolean(ne),canDrop:(e,n)=>b(n)===e.zone&&n.index>=0&&n.index<=Ke(e.zone),onDrop:(e,n)=>Ye(e.zone,e.index,n.index),onStep:(e,n)=>Ye(e.zone,e.index,n<0?e.index-1:e.index+2)}),Ie=(e,n)=>/* @__PURE__ */Q(X,{...ne?{}:Ze.seam({place:{...D(e),index:n}})},`seam:${e}:${n}`),Ge=e=>Be.blockRowName(e,Fe),$e=(e,n,r)=>{pe(d),re.select({index:n,zone:e}),o(r)},Qe=(e,n,o)=>{re.insertComponent(e,n,o),pe(d),re.select({index:o,zone:e})},Ue=(n,o,r)=>/* @__PURE__ */Q(e,{choices:r,onPick:e=>Qe(n,e,o)}),qe=(e,n)=>{const o=Te((r=e).type).flatMap(e=>(Array.isArray(r.props[e])?r.props[e]:[]).map((n,o)=>({child:n,zone:`${r.props.id}:${e}`,index:o})));var r;const t=ge(e.type),s=t?.choices??null,i="footer"===t?.source?Ge:be;/* @__PURE__ */
|
|
2
|
+
return $(U,{children:[o.map(({child:e,zone:o,index:r})=>{const t=se?.props.id===e.props.id,s=C(ie,e.type,n),c=i(e),p=String(e.props.id),l=()=>$e(o,r,p),{rowProps:m,...a}=Ze.row({item:{id:p,zone:o,index:r},place:{...D(o),index:r}},{onClick:q(l)});/* @__PURE__ */
|
|
3
|
+
return $(Z,{children:[0===r&&Ie(o,0),
|
|
4
|
+
/* @__PURE__ */Q(B,{words:me,icon:/* @__PURE__ */Q(Xe,{type:e.type,size:13}),name:c,selected:t,onSelect:l,...a,actions:/* @__PURE__ */Q(L,{kind:"delete",label:le.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,re.removeComponent(e,n),pe(d),void re.select(null);var e,n},children:/* @__PURE__ */Q(G,{size:13})}),rowProps:m}),s&&/* @__PURE__ */Q(W,{children:qe(e,n+1)}),Ie(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Ue(`${e.props.id}:${t.slot}`,o.length,s):null]})},_e="HeroSingle"===ye?.type,en=Boolean(ye)&&(Boolean(ge(ye.type))||Te(ye.type).length>0),nn=Boolean(ye)&&(Boolean(we)||Ce||Ne||_e||en);/* @__PURE__ */
|
|
5
|
+
return $("div",{ref:Ae,className:"sf-editor es-editor",style:w(i),children:[
|
|
6
|
+
/* @__PURE__ */Q("div",{className:"sf-section-bar",children:/* @__PURE__ */Q(M,null!==oe?{tone:"off",label:oe,role:"status"}:{...H(ee,de),role:"status"})}),
|
|
7
|
+
/* @__PURE__ */$("div",{className:"sf-body",children:[Ee&&Re?/* @__PURE__ */Q("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:/* @__PURE__ */Q(m,{panel:Re,pick:Ee})}):nn&&ye&&/* @__PURE__ */$("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
|
|
8
|
+
/* @__PURE__ */Q("div",{className:"sf-panel-head",children:/* @__PURE__ */Q(I,{content:Ne?le.headerSettings:le.sectionSettings({name:He(ye.type)}),side:"bottom",children:/* @__PURE__ */Q("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(Me?"is-selected":""),"aria-pressed":Me,onClick:()=>{Ne?pe(ke??d):(pe(d),re.select({index:0}))},children:He(ye.type)})})}),
|
|
9
|
+
/* @__PURE__ */Q(P,{className:"sf-tree sf-scroll",rootProps:Ze.rootProps(),words:me,children:/* @__PURE__ */Q(W,{children:Ne?
|
|
10
|
+
/* @__PURE__ */Q(B,{words:me,icon:/* @__PURE__ */Q(Xe,{type:"header",size:13}),name:le.headerSettings,selected:ce.kind===ke?.kind,onSelect:()=>pe(ke??d),rowProps:{onClick:q(()=>pe(ke??d))}}):we?/* @__PURE__ */$(U,{children:[Ve.map((e,n)=>{const o=se?.props.id===e.props.id,r=be(e),t=String(e.props.id),s=()=>De(n,t),{rowProps:i,...c}=Ze.row({item:{id:t,zone:ze,index:n},place:{...D(ze),index:n}},{onClick:q(s)});/* @__PURE__ */
|
|
11
|
+
return $(Z,{children:[0===n&&Ie(ze,0),
|
|
12
|
+
/* @__PURE__ */Q(B,{words:me,icon:/* @__PURE__ */Q(Xe,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */Q(L,{kind:"delete",label:le.deleteNamed({name:r}),onClick:()=>{return e=n,void(ze&&(re.removeComponent(ze,e),pe(d),re.select(null)));var e},children:/* @__PURE__ */Q(G,{size:13})}),rowProps:i}),Ie(ze,n+1)]},String(e.props.id??n))}),
|
|
13
|
+
/* @__PURE__ */$("button",{type:"button",className:"sf-add-card",onClick:Je,children:[
|
|
14
|
+
/* @__PURE__ */Q("span",{className:"sf-plus sf-plus--sm",children:"+"}),we.addLabel]}),Se?Pe.partRows?.(ye,_):null]}):qe(ye,1)})})]}),
|
|
15
|
+
/* @__PURE__ */Q("div",{className:"sf-center",children:/* @__PURE__ */Q("div",{className:"sf-preview-host",children:/* @__PURE__ */Q(fe,{})})}),
|
|
16
|
+
/* @__PURE__ */Q(s,{value:{selectChild:(e,n,o,r)=>"section"===ge(r)?.source?De(n,o):$e(e,n,o),addChild:(e,n,o,r,t)=>"section"===ge(t)?.source?Je():Qe(`${e}:${n}`,o,r),childRowName:be,blockRowName:Ge},children:/* @__PURE__ */Q(je,{mode:ce,onOpenWebsiteSettings:Pe.openSettings??(()=>{}),onSelectNode:We,hideNodeActions:!0})})]})]})}export{ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{PanelHideButton,PanelModeExit,PanelShowStrip,SidePanelHead as default}from"../../chunk-
|
|
1
|
+
export{PanelHideButton,PanelModeExit,PanelShowStrip,SidePanelHead as default}from"../../chunk-PPL7GB7D.js";import"../../chunk-KQMML6JM.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-MFIRYGHW.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{COLLAPSED_SECTIONS_KEY,DEFAULT_PANEL_W,PANEL_WIDTHS_KEY,clampPanelWidth,screenStorageKeys}from"../../chunk-
|
|
1
|
+
export{COLLAPSED_SECTIONS_KEY,DEFAULT_PANEL_W,PANEL_WIDTHS_KEY,clampPanelWidth,screenStorageKeys}from"../../chunk-TZIIRGVY.js";export{MAX_PANEL_W,MIN_PANEL_W,panelWidthVars}from"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-MFIRYGHW.js";
|