efficient-easel 21.1.0 → 23.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 +45 -37
- package/dist/{CanvasDragLayer-CFUcBbgc.d.ts → CanvasDragLayer-NZpaX6aq.d.ts} +15 -4
- package/dist/{ScreenDocumentContext-1RgtGKWR.d.ts → ScreenDocumentContext-BDLUYzlM.d.ts} +4 -4
- package/dist/blocks/index.d.ts +16 -18
- package/dist/{buckets-Sw94ll9I.d.ts → buckets-_MGDYJlb.d.ts} +1 -1
- package/dist/canvas/index.d.ts +22 -12
- package/dist/canvas/index.js +1 -1
- package/dist/{canvas-typing-Be4FO4q7.d.ts → canvas-typing-DOBx8dD3.d.ts} +12 -2
- package/dist/{chunk-I67UW5UG.js → chunk-3P735WOM.js} +4 -4
- package/dist/{chunk-KWLHKKZO.js → chunk-4YUC7B7E.js} +1 -1
- package/dist/chunk-6F5GO337.js +1 -0
- package/dist/{chunk-3S5N4HLJ.js → chunk-6NJHYXJM.js} +1 -1
- package/dist/{chunk-BTDI7JAA.js → chunk-A6ZP5II4.js} +2 -2
- package/dist/{chunk-IWCKVZHS.js → chunk-AGWKB77Q.js} +1 -1
- package/dist/chunk-AT4DDMJS.js +1 -0
- package/dist/chunk-FF54HWSE.js +8 -0
- package/dist/{chunk-MLQKNED6.js → chunk-FOOK54T2.js} +1 -1
- package/dist/{chunk-SWBADIQT.js → chunk-G3HAKQUF.js} +1 -1
- package/dist/{chunk-ZOSEBPAI.js → chunk-GKG3M5QK.js} +1 -1
- package/dist/chunk-GXRS52JD.js +5 -0
- package/dist/{chunk-U7TFWHST.js → chunk-HLMQ34GP.js} +1 -1
- package/dist/chunk-HZSZT3BE.js +7 -0
- package/dist/{chunk-EB6NI2VK.js → chunk-IYHO4XQX.js} +1 -1
- package/dist/chunk-IZGFJWH4.js +1 -0
- package/dist/chunk-KXM6YRG2.js +1 -0
- package/dist/chunk-KXTXYINN.js +16 -0
- package/dist/chunk-LN43DP2A.js +18 -0
- package/dist/{chunk-PFFH7ASD.js → chunk-MXECWHRJ.js} +17 -17
- package/dist/chunk-OXZDSOZV.js +1 -0
- package/dist/{chunk-BSHIQIZC.js → chunk-RPMSET77.js} +1 -1
- package/dist/{chunk-K7BTCBWD.js → chunk-TGZCD6IP.js} +1 -1
- package/dist/{chunk-U5DNBT63.js → chunk-UMBNBCL4.js} +1 -1
- package/dist/chunk-VZUXOZGP.js +64 -0
- package/dist/{chunk-GWYNMSIP.js → chunk-XJ23ULBP.js} +1 -1
- package/dist/{chunk-DNQ7AF6K.js → chunk-YHEYJKQL.js} +1 -1
- package/dist/chunk-YU3WHLGI.js +1 -0
- package/dist/copy/index.d.ts +21 -7
- package/dist/copy/index.js +29 -29
- package/dist/data/index.d.ts +30 -22
- package/dist/data/index.js +1 -1
- package/dist/drag/drag.css +10 -1
- package/dist/drag/index.d.ts +5 -5
- package/dist/drag/index.js +1 -1
- package/dist/draw/index.d.ts +2 -2
- package/dist/easel/easel.css +15 -10
- package/dist/easel/index.d.ts +97 -60
- package/dist/easel/index.js +1 -1
- package/dist/edit-lock/index.d.ts +5 -5
- package/dist/fields/fields.css +1 -1
- package/dist/fields/index.d.ts +17 -17
- package/dist/fields/index.js +1 -1
- package/dist/node-ops/index.d.ts +3 -3
- package/dist/node-ops/index.js +1 -1
- package/dist/panel/index.d.ts +4 -4
- package/dist/panel/panel.css +6 -1
- package/dist/pick/index.d.ts +5 -5
- package/dist/{plan-CZS902DV.d.ts → plan-D0DgSLnY.d.ts} +5 -5
- package/dist/render/index.d.ts +19 -19
- package/dist/render/index.js +5 -5
- package/dist/{repeat-BNgSq2Nw.d.ts → repeat-D65bJS8d.d.ts} +1 -1
- package/dist/{resolve-D68pb3Bx.d.ts → resolve-Bz4mszpL.d.ts} +5 -5
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.d.ts +2 -2
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.d.ts +17 -20
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/PreviewDeviceContext.d.ts +1 -1
- package/dist/screen/components/PreviewPartsContext.d.ts +2 -2
- package/dist/screen/components/SaveControls.d.ts +8 -8
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenDocumentContext.d.ts +5 -5
- package/dist/screen/components/ScreenDocumentContext.js +1 -1
- package/dist/screen/components/ScreenMount.d.ts +8 -8
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.d.ts +12 -12
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +17 -17
- package/dist/screen/components/usePartBridge.d.ts +10 -10
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.d.ts +8 -8
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/admin-bridge.d.ts +4 -4
- package/dist/screen/lib/document/add-target-types.js +0 -1
- package/dist/screen/lib/document/block-types-in.d.ts +2 -1
- package/dist/screen/lib/document/block-types-in.js +1 -1
- package/dist/screen/lib/document/content-tree.d.ts +8 -8
- package/dist/screen/lib/document/device-fields.d.ts +7 -7
- package/dist/screen/lib/document/device-fields.js +1 -1
- package/dist/screen/lib/document/field-buckets.d.ts +1 -1
- package/dist/screen/lib/document/field-markers.d.ts +5 -5
- package/dist/screen/lib/document/palette-sections.d.ts +5 -5
- package/dist/screen/lib/document/panel-fields.d.ts +6 -6
- package/dist/screen/lib/document/panel-no-control-mark.d.ts +4 -5
- package/dist/screen/lib/document/part-id.d.ts +1 -1
- package/dist/screen/lib/document/preview-events.d.ts +2 -2
- package/dist/screen/lib/document/preview-selection-context.d.ts +2 -2
- package/dist/screen/lib/document/section-doc.d.ts +5 -5
- package/dist/screen/lib/document/section-doc.js +1 -1
- package/dist/screen/lib/document/slot-child-name.d.ts +1 -1
- package/dist/screen/lib/document/slot-section-spec.d.ts +1 -1
- package/dist/screen/lib/document/slot-section-spec.js +0 -1
- package/dist/screen/lib/document/style-clipboard.d.ts +8 -8
- package/dist/screen/lib/document/style-clipboard.js +1 -1
- package/dist/screen/lib/document/tree-reveal.d.ts +6 -6
- package/dist/screen/lib/document/tree-reveal.js +1 -1
- package/dist/screen/lib/document/use-section-ops.d.ts +6 -6
- package/dist/screen/lib/document/use-section-ops.js +1 -1
- package/dist/screen/lib/document-addressing.d.ts +5 -5
- package/dist/screen/lib/document-hooks.d.ts +4 -4
- package/dist/screen/lib/host.d.ts +5 -5
- package/dist/screen/lib/key-scope.d.ts +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/media-panel.d.ts +5 -5
- package/dist/screen/lib/media-picker.d.ts +6 -6
- package/dist/screen/lib/page-lock.d.ts +4 -4
- package/dist/screen/lib/screen-parts.d.ts +25 -16
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/lib/section-templates.d.ts +4 -4
- package/dist/screen/lib/session-context.d.ts +4 -4
- package/dist/screen/lib/session.d.ts +5 -5
- package/dist/screen/lib/shared-sections.d.ts +4 -4
- package/dist/screen/screen.css +15 -15
- package/dist/screen/words.d.ts +4 -3
- package/dist/screen/words.js +1 -1
- package/dist/{session-DSQFmIvx.d.ts → session-EsjORLQ0.d.ts} +1 -1
- package/dist/shell/shell.css +2 -2
- package/dist/strings/index.d.ts +4 -4
- package/dist/strings/index.js +2 -2
- package/dist/style-clipboard/index.d.ts +2 -2
- package/dist/text-styles/index.d.ts +3 -3
- package/dist/text-styles/index.js +21 -21
- package/dist/text-styles/model.d.ts +1 -1
- package/dist/{types-B8NwXKlE.d.ts → types-BIytwvvH.d.ts} +3 -3
- package/dist/{types-Cq53lL8d.d.ts → types-BljCVdzR.d.ts} +18 -18
- package/dist/{types-41704JE4.d.ts → types-Dq180WRV.d.ts} +8 -8
- package/dist/{useNodeOps-fIDWzftn.d.ts → useNodeOps-igxrnEhq.d.ts} +2 -2
- package/dist/{watch-D8xZow3y.d.ts → watch-Unf6SfUf.d.ts} +3 -3
- package/dist/{words-gIDCeRv3.d.ts → words-B5Gb7KFq.d.ts} +1 -1
- package/dist/{words-BpTjCfqO.d.ts → words-Cf5VT2Ic.d.ts} +2 -2
- package/dist/{words-CmEnDoOe.d.ts → words-fbR9IwxH.d.ts} +1 -1
- package/package.json +3 -147
- package/dist/chunk-2C7W64S5.js +0 -8
- package/dist/chunk-2L6KWUBC.js +0 -1
- package/dist/chunk-4FD7TAOE.js +0 -1
- package/dist/chunk-67HCYOW4.js +0 -1
- package/dist/chunk-A2VVB4RH.js +0 -0
- package/dist/chunk-BDSLF5BR.js +0 -1
- package/dist/chunk-CPL43ZLJ.js +0 -1
- package/dist/chunk-L55YIXDC.js +0 -1
- package/dist/chunk-MZ5GSSZ3.js +0 -7
- package/dist/chunk-OHZHYROJ.js +0 -5
- package/dist/chunk-PRHBWA5V.js +0 -0
- package/dist/chunk-TUXLORVR.js +0 -15
- package/dist/chunk-WJJ7H42G.js +0 -18
- package/dist/chunk-YIUE4US7.js +0 -0
- package/dist/chunk-YVFYWAYU.js +0 -65
- package/dist/screen/lib/puck/add-target-types.d.ts +0 -3
- package/dist/screen/lib/puck/add-target-types.js +0 -1
- package/dist/screen/lib/puck/block-choice.d.ts +0 -1
- package/dist/screen/lib/puck/block-choice.js +0 -1
- package/dist/screen/lib/puck/block-types-in.d.ts +0 -1
- package/dist/screen/lib/puck/block-types-in.js +0 -1
- package/dist/screen/lib/puck/content-tree.d.ts +0 -1
- package/dist/screen/lib/puck/content-tree.js +0 -1
- package/dist/screen/lib/puck/device-fields.d.ts +0 -4
- package/dist/screen/lib/puck/device-fields.js +0 -1
- package/dist/screen/lib/puck/field-buckets.d.ts +0 -2
- package/dist/screen/lib/puck/field-buckets.js +0 -1
- package/dist/screen/lib/puck/field-markers.d.ts +0 -2
- package/dist/screen/lib/puck/field-markers.js +0 -1
- package/dist/screen/lib/puck/hidable.d.ts +0 -1
- package/dist/screen/lib/puck/hidable.js +0 -1
- package/dist/screen/lib/puck/palette-sections.d.ts +0 -8
- package/dist/screen/lib/puck/palette-sections.js +0 -1
- package/dist/screen/lib/puck/panel-fields.d.ts +0 -1
- package/dist/screen/lib/puck/panel-fields.js +0 -1
- package/dist/screen/lib/puck/panel-no-control-mark.d.ts +0 -2
- package/dist/screen/lib/puck/panel-no-control-mark.js +0 -1
- package/dist/screen/lib/puck/part-id.d.ts +0 -1
- package/dist/screen/lib/puck/part-id.js +0 -1
- package/dist/screen/lib/puck/preview-click.d.ts +0 -1
- package/dist/screen/lib/puck/preview-click.js +0 -1
- package/dist/screen/lib/puck/preview-dom.d.ts +0 -1
- package/dist/screen/lib/puck/preview-dom.js +0 -1
- package/dist/screen/lib/puck/preview-events.d.ts +0 -1
- package/dist/screen/lib/puck/preview-events.js +0 -1
- package/dist/screen/lib/puck/preview-selection-context.d.ts +0 -2
- package/dist/screen/lib/puck/preview-selection-context.js +0 -1
- package/dist/screen/lib/puck/section-doc.d.ts +0 -9
- package/dist/screen/lib/puck/section-doc.js +0 -1
- package/dist/screen/lib/puck/slot-child-name.d.ts +0 -1
- package/dist/screen/lib/puck/slot-child-name.js +0 -1
- package/dist/screen/lib/puck/slot-heal.d.ts +0 -2
- package/dist/screen/lib/puck/slot-heal.js +0 -1
- package/dist/screen/lib/puck/slot-section-spec.d.ts +0 -1
- package/dist/screen/lib/puck/slot-section-spec.js +0 -1
- package/dist/screen/lib/puck/style-clipboard.d.ts +0 -42
- package/dist/screen/lib/puck/style-clipboard.js +0 -1
- package/dist/screen/lib/puck/text-control-kinds.d.ts +0 -1
- package/dist/screen/lib/puck/text-control-kinds.js +0 -1
- package/dist/screen/lib/puck/tree-reveal.d.ts +0 -1
- package/dist/screen/lib/puck/tree-reveal.js +0 -1
- package/dist/screen/lib/puck/use-section-ops.d.ts +0 -9
- package/dist/screen/lib/puck/use-section-ops.js +0 -1
package/dist/copy/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return
|
|
3
|
-
return
|
|
4
|
-
return
|
|
5
|
-
return
|
|
6
|
-
return
|
|
7
|
-
return
|
|
8
|
-
return
|
|
9
|
-
return
|
|
10
|
-
return
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
return
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
return
|
|
17
|
-
return
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
return
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
return
|
|
26
|
-
return
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
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,clearRangeOf as d,ColorWindow as p,markPress as h,pasteToMarkup as m,richInput as f,editVisible as g,MARKUP_CLIPBOARD_TYPE as y,markupOfRange as v}from"../chunk-HZSZT3BE.js";export{ColorWindow,MARKUP_CLIPBOARD_TYPE,TYPING_BURST_MS,clearRangeOf,colorRunOf,createHistory,editVisible,markupOfRange,newLine,pasteToMarkup,richInput,richLayout,selectionToSource,selectionToVisible,setBullet,startCanvasTyping,textMap,toSource,toSourceStart,toVisible}from"../chunk-HZSZT3BE.js";import{DEFAULT_COPY_WORDS as b}from"../chunk-KRL3IUV3.js";import{FieldNumber as k}from"../chunk-Y2T3JX7K.js";import{FieldSelect as x}from"../chunk-KFWNGPW3.js";import"../chunk-JACEEVVF.js";import{SettingsSwitch as S}from"../chunk-OECWLNKJ.js";import{SettingsField as E,SettingsSegmented as w}from"../chunk-S3DUFDQ6.js";import{useWords as C}from"../chunk-MFIRYGHW.js";import{registerModalEscapeInterceptor as N,textToolbarRows as D,TextToolbar as T,textAlignWords as O,useShellStrings as L,textAlignOptions as R,TEXT_ALIGNS as K,LinkPicker as B,Tooltip as F,IconButton as j}from"efficient-shell/ui";export{TextToolbar}from"efficient-shell/ui";import{useRef as H,useState as V,useLayoutEffect as W,useEffect as $,useId as M}from"react";import{RETIRED_MARKS as z,applyMark as P,marksIn as I,STANDARD_MARKUP as q,listIn as U,colorIn as Y,clearStyle as Z,spanFor as A,findLink as _,tokenizeInline as G,colorOver as J,setList as Q,unlinkAt as X,removeLink as ee,linkOver as te,writeLink as ne}from"efficient-shell/markup";import{jsxs as re,jsx as le,Fragment as oe}from"react/jsx-runtime";import{ParagraphSpacingIcon as ae,LetterSpacingIcon as se,LineSpacingIcon as ce,TextSizeIcon as ie,StylesIcon as ue,TypeIcon as de,AlignmentIcon as pe,ListFormatIcon as he,CaseIcon as me,ItalicIcon as fe,NumberedListIcon as ge,ListIcon as ye,ListNoneIcon as ve,CaseLowerIcon as be,CaseCapitalizedIcon as ke,CaseUpperIcon as xe,CaseNormalIcon as Se}from"efficient-shell/icons/efficient";function Ee(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 we({value:e,rules:t=q,className:n,layerRef:r}){const l=function(e,t){const n=[];let r=0;for(const l of G(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=Ee(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
|
+
return le("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
|
+
return le("span",{className:"es-gold-delim",children:r},t);case"accent":case"highlight":/* @__PURE__ */
|
|
4
|
+
return le("em",{className:"es-gold-mark es-gold-accent",children:r},t);case"bold":/* @__PURE__ */
|
|
5
|
+
return le("strong",{className:"es-gold-mark es-gold-bold",children:r},t);case"italic":/* @__PURE__ */
|
|
6
|
+
return le("em",{className:"es-gold-mark es-gold-italic",children:r},t);case"strike":/* @__PURE__ */
|
|
7
|
+
return le("s",{className:"es-gold-mark es-gold-strike",children:r},t);case"quiet":/* @__PURE__ */
|
|
8
|
+
return le("span",{className:"es-gold-mark es-gold-quiet",children:r},t);default:/* @__PURE__ */
|
|
9
|
+
return le("span",{className:"es-gold-text",children:r},t)}}(e,t))})}function Ce({value:e,onInput:t,onCommit:n,onCancel:r,multiline:l=!1,placeholder:o,className:a,rules:s=q,ariaLabel:c,disabled:i=!1,inputRef:u}){const d=H(null),p=H(e),h=H(!1);function m(e){h.current&&(h.current=!1,n?.(e))}/* @__PURE__ */
|
|
10
|
+
return re("div",{className:["es-gold",l?"es-gold-is-multiline":"es-gold-is-single",i?"es-gold-is-off":"",a??""].filter(Boolean).join(" "),children:[
|
|
11
|
+
/* @__PURE__ */le(we,{value:e,rules:s,layerRef:d}),o&&""===e?
|
|
12
|
+
/* @__PURE__ */le("div",{className:"es-gold-placeholder","aria-hidden":"true",children:o}):null,
|
|
13
|
+
/* @__PURE__ */le("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 Ne(e,t){const n=t?.selectionStart??e.length;return{start:n,end:t?.selectionEnd??n}}function De(e,t,n,r=P){const{start:l,end:o}=Ne(e,n);return r(e,l,o,t)}function Te(e,t,n){const{start:r,end:l}=Ne(e,n),o=r+t.length;return{text:e.slice(0,r)+t+e.slice(l),selectionStart:o,selectionEnd:o}}function Oe(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 Le(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 Re(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 Ke({value:e,rules:l,multiline:o,readOnly:a=!1,placeholder:s,ariaLabel:c,handle:i,onEdit:u,onSelect:d,onHistory:p,onFormat:h,pending:b,onCommit:k,onCancel:x}){const S=H(null),E=H(null),w=H(null),C=H(null),N=H(null),D=H(e),[T,O]=V(0),L=H({value:e,rules:l,multiline:o,readOnly:a,pending:b,onEdit:u,onHistory:p,onFormat:h});L.current={value:e,rules:l,multiline:o,readOnly:a,pending:b,onEdit:u,onHistory:p,onFormat:h};const R=()=>{const e=S.current,t=E.current,n=e?.ownerDocument.getSelection();if(!(e&&t&&n&&0!==n.rangeCount&&n.anchorNode&&e.contains(n.anchorNode)))return null;const r=Le(t,e,n.anchorNode,n.anchorOffset),l=n.focusNode&&e.contains(n.focusNode)?Le(t,e,n.focusNode,n.focusOffset):r;return r<=l?[r,l]:[l,r]},K=(e,t)=>{const n=S.current,r=E.current;if(!n||!r)return;const[l,o]=Re(r,e),[a,s]=Re(r,t);n.ownerDocument.getSelection()?.setBaseAndExtent(l,o,a,s)};i.current={getSource(){const e=R(),t=E.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]},O(e=>e+1)},focus(){S.current?.focus()},rangeOf(e,n){const r=S.current,l=E.current;if(!r||!l)return null;const[o,a]=t(l.layout,e,n),[s,c]=Re(l,o),[i,u]=Re(l,a),d=r.ownerDocument.createRange();return d.setStart(s,c),d.setEnd(i,u),d}},W(()=>{const n=S.current;if(!n||N.current)return;const o=C.current?null:R();E.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=Oe(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)),w.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],E.current.layout.text.length)));C.current=null;const s=E.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 B=(e,t,r)=>{const l=E.current,[o,a]=n(l.layout,t[0],t[1]);C.current={text:e.text,vis:[e.caret,e.caret]},e.text!==L.current.value?L.current.onEdit(e.text,{start:o,end:a},r):O(e=>e+1)};$(()=>{const e=S.current;if(!e)return;const t=t=>{const{value:n,rules:r,multiline:l,readOnly:o,pending:a}=L.current;if("insertCompositionText"===t.inputType)return;if(t.preventDefault(),o)return;const s=E.current,c=R();if(!s||!c)return;const i="function"==typeof t.getTargetRanges?t.getTargetRanges()[0]:void 0,u=i&&!i.collapsed?[Le(s,e,i.startContainer,i.startOffset),Le(s,e,i.endContainer,i.endOffset)]:null,d=f({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?B(d.edit,d.range,d.kind):L.current.onFormat(d.style):L.current.onHistory(d.dir))},n=()=>{N.current||O(e=>e+1)};return e.addEventListener("beforeinput",t),e.addEventListener("input",n),()=>{e.removeEventListener("beforeinput",t),e.removeEventListener("input",n)}},[]),$(()=>{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 F=(t,n=!1)=>{const r=R();if(!r||r[0]===r[1])return;t.preventDefault();const o=E.current;t.clipboardData.setData("text/plain",o.layout.text.slice(r[0],r[1])),t.clipboardData.setData(y,v(e,l,r[0],r[1])),n&&!a&&B(g(e,l,r[0],r[1],{text:""}),r,"edit")};/* @__PURE__ */
|
|
14
|
+
return re("div",{className:"es-rich-wrap",children:[s&&""===e?/* @__PURE__ */le("div",{className:"es-rich-placeholder","aria-hidden":"true",children:s}):null,
|
|
15
|
+
/* @__PURE__ */le("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:()=>{D.current=e},onBlur:()=>{e!==D.current&&k?.(e),D.current=e},onKeyDown:t=>{if("Escape"===t.key)return t.preventDefault(),x?.(D.current),void(D.current=e);"Enter"!==t.key||o||(t.preventDefault(),e!==D.current&&k?.(e),D.current=e)},onCompositionStart:()=>{const e=R()??[0,0];N.current={from:e[0],to:e[1]}},onCompositionEnd:e=>{const t=N.current;if(N.current=null,!t)return;const{value:n,rules:r,pending:l}=L.current;e.data?B(g(n,r,t.from,t.to,{text:e.data,add:l?.add,drop:l?.drop,color:l?.color}),[t.from,t.to],"type"):O(e=>e+1)},onCopy:e=>F(e),onCut:e=>F(e,!0),onPaste:t=>{if(t.preventDefault(),a)return;const n=R();if(!n)return;const r=t.clipboardData.getData(y),s=r?o?r:r.replace(/\s*\r?\n\s*/g," "):m({html:t.clipboardData.getData("text/html"),text:t.clipboardData.getData("text/plain")},{doc:t.currentTarget.ownerDocument,multiline:o,rules:l});B(g(e,l,n[0],n[1],{markup:s}),n,"edit")}})]})}var Be={fontSize:{key:"fontSize",nameKey:"fontSize",icon:/* @__PURE__ */le(ie,{}),unit:"px",step:1,shiftStep:10,min:5},lineHeight:{key:"lineHeight",nameKey:"lineHeight",icon:/* @__PURE__ */le(ce,{}),unit:"%",step:1,shiftStep:10,min:50,max:250,scale:100},letterSpacing:{key:"letterSpacing",nameKey:"letterSpacing",icon:/* @__PURE__ */le(se,{}),unit:"px",step:.1,shiftStep:1,min:-10},paragraphSpacing:{key:"paragraphSpacing",nameKey:"paragraphSpacing",icon:/* @__PURE__ */le(ae,{}),unit:"px",step:1,shiftStep:10,min:0}};function Fe(e,t){return void 0===e?void 0:Number((e*t).toFixed(6))}function je({cells:e,words:t,readOnly:n=!1}){const r=t??b.cells,l=M();/* @__PURE__ */
|
|
16
|
+
return le("div",{className:"es-copy-cells-fit",children:/* @__PURE__ */le("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
|
+
return re("div",{className:"es-copy-cell",children:[
|
|
18
|
+
/* @__PURE__ */le("label",{className:"es-field-label es-copy-cell-name",htmlFor:c,children:o}),
|
|
19
|
+
/* @__PURE__ */le(k,{id:c,value:Fe(e.value,t),styleValue:Fe(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 He({target:e,onChange:t}){const n=H(null);return W(()=>{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 Ve=/* @__PURE__ */new Set([...z,"clear"]);function We({value:e,onChange:t,onCommit:n,onCancel:r,multiline:f=!1,placeholder:g,ariaLabel:y,className:v,readOnly:k=!1,rules:x,tools:E=[],writeMark:w,align:O,actions:L,toolbar:R,barLabel:K,renderFooter:F,inputRef:j,barShows:z="always",richText:G=!0,defaultShowMarks:ae=!1,colors:se,cells:ce,letterCase:ie,lastTool:ue}){const de=C("copy",b),pe=H(null),he=j??pe,[me,fe]=V(!1),[ge,ye]=V(null),ve=H(l()).current,be=H(null);$(()=>{const t=be.current;t&&e===t.to?be.current=null:t&&e===t.from||(be.current=null,ve.reset())},[e,ve]);const ke=n=>{be.current={from:be.current?.from??e,to:n},t(n)},xe=t=>({text:e,start:t?.selectionStart??ge?.start??e.length,end:t?.selectionEnd??ge?.end??e.length}),[Se,Ee]=V(ae),we=G&&!(f&&Se),Ne=H(null),Oe=M(),[Le,Re]=V(null),[Be,Fe]=V(!1),We=()=>{if(!we)return he.current;const e=Ne.current?.getSource()??ge;return e?{selectionStart:e.start,selectionEnd:e.end}:null},$e=He({target:he,onChange:ke}),Me=e=>(ye({start:e.selectionStart,end:e.selectionEnd}),e),ze=(t,n)=>{if(!we)return void $e(e=>(n&&ve.record(xe(e),"edit",Date.now()),Me(t(e))));const r=We(),l=Me(t(r));n&&ve.record(xe(r),"edit",Date.now()),Re(null),l.text!==e&&ke(l.text),Ne.current?.setSource(l.selectionStart,l.selectionEnd,l.text)},Pe=e=>ze(e,!0),Ie=e=>ze(t=>{const n=xe(t),r=ve[e](n);return r?{text:r.text,selectionStart:r.start,selectionEnd:r.end}:{text:n.text,selectionStart:n.start,selectionEnd:n.end}},!1),qe=H(null);W(()=>{const t=qe.current;t&&(qe.current=null,we?Ne.current?.setSource(t.start,t.end,e):(he.current?.focus(),he.current?.setSelectionRange(t.start,t.end),ye(t)))},[we]);const[Ue,Ye]=V(null),Ze=x??q,Ae=("string"==typeof E[0]?E:E.map(e=>e.style)).filter(e=>!Ve.has(e)),_e={};if(ge){const t=I(e,ge.start,ge.end,Ze);for(const e of Ae){const n=t.has(e)||"highlight"===e&&t.has("accent");_e[e]=!!Le?.add.includes(e)||!Le?.drop.includes(e)&&n}_e.link=t.has("link")}const Ge=()=>{const t=We(),n=t?.selectionStart??e.length;return{start:n,end:t?.selectionEnd??n}},Je=t=>{if("link"!==t&&A(0,t)){const{start:n,end:r}=Ge();if(n===r&&!we)return void Pe(n=>De(e,t,n,(e,t,n,r)=>P(e,t,n,r,Ze,de.placeholders)));const l=h({value:e,rules:Ze,start:n,end:r,style:t,pending:Le});return void("pending"===l.kind?Re(l.pending):Pe(()=>l.result))}if("link"!==t){const n=w??((e,t,n,r)=>P(e,t,n,r,q,de.placeholders));return void Pe(r=>De(e,t,r,n))}const n=We(),r=n?.selectionStart??e.length,l=n?.selectionEnd??r;Fe(!1),Ye({start:r,end:l,link:_(e,r,l)})},Qe=Boolean(ge&&ge.start!==ge.end),Xe=ge?U(e,ge.start,ge.end,Ze):null,et=ge?Le&&void 0!==Le.color&&Le.at===ge.start?Le.color:Y(e,ge.start,ge.end,Ze):null,tt=o(et,se),nt=t=>{we?t?Ne.current?.setSource(t.start,t.end,e):Ne.current?.focus():(he.current?.focus(),t&&he.current?.setSelectionRange(t.start,t.end))},rt=()=>{const e=Ue;Ye(null),nt(e?{start:e.start,end:e.end}:ge)},lt=()=>{const e=at.current,t=Boolean(e&&e.querySelector(".es-copy-colors")?.contains(e.ownerDocument.activeElement));Fe(!1),t&&nt(ge)},ot=H(lt);ot.current=lt,$(()=>{if(Be)return N(e=>{const t=at.current;return!!("Escape"===e.key&&t&&e.target instanceof Node&&t.contains(e.target))&&(ot.current(),!0)},()=>at.current?.querySelector(".es-copy-colors"))},[Be]);const at=H(null),st=Be||null!==Ue;$(()=>{const e=at.current;if(!st||!e)return;const t=e.ownerDocument,n=()=>{Fe(!1),Ye(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)}},[st]);const ct=Ue??(Be?ge??{start:e.length,end:e.length}:null),it=H(()=>{});it.current=()=>{const e=at.current,t=e?.querySelector(".rosh-tb-wrap > .es-copy-pop");if(!e||!t||!ct)return;const n=we?null:e.querySelector(".es-gold-layer"),r=we?Ne.current?.rangeOf(ct.start,ct.end)??null:n?a(n,ct.start,ct.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"},W(()=>{const e=at.current;if(!st||!e)return;const t=()=>it.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()}},[st,Be,Ue,ct?.start,ct?.end,we]);const ut="always"===z||me||null!==Ue||Be,dt=se&&se.length>0?{run:tt,open:Be,onToggle:()=>{Ye(null),Be?lt():Fe(!0)}}:void 0,pt=ut?ue?ue({className:"rosh-tb-btn",disabled:k,selected:Qe,keepCaret:e=>e.preventDefault(),insert:t=>Pe(n=>Te(e,t,n))}):"classic"===R?L:void 0:void 0,ht=new Set(Ae),mt=O?{value:O.value,allow:O.allow,onChange:O.onChange,disabled:O.disabled}:void 0,ft={pressed:Xe,onList:t=>{const{start:n,end:r}=Ge(),l=U(e,n,r,Ze);Pe(()=>Q(e,n,r,l===t?null:t,Ze))}},gt=d(ge,e.length),yt=k||Z(e,gt.start,gt.end,Ze).text===e?void 0:{onClear:()=>{const{start:t,end:n}=d(Ge(),e.length);Pe(()=>Z(e,t,n,Ze))}},vt=D({offered:ht,color:dt,last:pt,alignment:mt,list:ft,letterCase:ie,clear:yt});/* @__PURE__ */
|
|
20
|
+
return re("div",{ref:at,className:"es-copy"+(v?` ${v}`:""),onFocus:()=>fe(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||fe(!1)},onKeyDown:e=>{const t=e.target===he.current||Boolean(e.target.closest?.(".es-rich"));if(k||!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 Ie(l||e.shiftKey?"redo":"undo");const o={b:"bold",i:"italic",u:"underline",k:"link"}[`${e.shiftKey?"shift+":""}${n}`];o&&Ae.includes(o)&&(e.preventDefault(),e.stopPropagation(),Je(o))},onPaste:t=>{const n=he.current;if(k||!n||t.target!==n)return;t.preventDefault();const r=m({html:t.clipboardData.getData("text/html"),text:t.clipboardData.getData("text/plain")},{doc:n.ownerDocument,multiline:f,rules:Ze});Pe(t=>Te(e,r,t))},style:se&&se.length>0?Object.fromEntries(se.map(e=>[`--es-color-${e.name}`,e.value])):void 0,onSelect:()=>{const t=he.current;t&&t.ownerDocument.activeElement===t&&ye({start:t.selectionStart??e.length,end:t.selectionEnd??e.length})},children:[ut&&(vt.words||vt.paragraph)?
|
|
21
|
+
/* @__PURE__ */le(T,{className:"es-copy-toolbar","aria-label":K??de.formatting,offered:ht,pressed:_e,onMark:e=>Je(e),color:dt,linkOpen:null!==Ue,last:pt,alignment:mt,list:ft,letterCase:ie,clear:yt,disabled:k,windows:/* @__PURE__ */re(oe,{children:[Be&&se&&se.length>0?/* @__PURE__ */le(p,{colors:se,current:et,words:de.colors??b.colors,onPick:t=>{const{start:n,end:r}=Ge();if(n!==r)Pe(()=>J(e,n,r,t,Ze));else{if(!we)return;Re({add:Le?.add??[],drop:Le?.drop??[],color:t,at:n})}}}):null,Ue?Ue&&/* @__PURE__ */le(B,{className:"es-copy-link es-copy-pop",value:Ue.link?.href??"",onApply:t=>{const n=Ue;Ye(null),Pe(()=>we?te(e,n.start,n.end,t,Ze):ne(e,n.start,n.end,t))},onRemove:Ue.link?()=>{const t=Ue.link,n=Ue;Ye(null),t&&Pe(()=>we?X(e,n.start,n.end,Ze):ee(e,t))}:void 0,onCancel:rt}):null]})}):null,ce&&ce.length>0?/* @__PURE__ */le(je,{cells:ce,words:de.cells??b.cells,readOnly:k}):null,we?/* @__PURE__ */le(Ke,{value:e,rules:Ze,multiline:f,readOnly:k,placeholder:g,ariaLabel:y,handle:Ne,pending:Le??void 0,onEdit:(t,n,r)=>{ve.record({text:e,start:n.start,end:n.end},r,Date.now()),Re(null),ke(t)},onSelect:e=>{ye(t=>t&&t.start===e.start&&t.end===e.end?t:e),!Le||e.start===Le.at&&e.end===Le.at||Re(null)},onHistory:Ie,onFormat:e=>{Ae.includes(e)&&Je(e)},onCommit:n,onCancel:r}):/* @__PURE__ */le(Ce,{value:e,onInput:e=>{ve.record(xe(null),"type",Date.now()),ke(e)},onCommit:n,onCancel:r,multiline:f,placeholder:g,ariaLabel:y,rules:x,disabled:k,inputRef:he,className:"es-copy-box"}),F?F({focused:me,insert:t=>Pe(n=>Te(e,t,n))}):null,G&&f?
|
|
22
|
+
/* @__PURE__ */re("div",{className:"es-copy-marks",children:[
|
|
23
|
+
/* @__PURE__ */le(S,{checked:Se,onChange:()=>{const e=We();qe.current=e&&null!==e.selectionStart&&null!==e.selectionEnd?{start:e.selectionStart,end:e.selectionEnd}:ge,Re(null),Ee(e=>!e)},ariaLabelledBy:Oe,disabled:k}),
|
|
24
|
+
/* @__PURE__ */le("span",{id:Oe,className:"es-copy-marks-label",children:de.showMarks??"Show marks"})]}):null]})}var $e=["none","bullet","number"],Me=e,ze={none:/* @__PURE__ */le(ve,{}),bullet:/* @__PURE__ */le(ye,{}),number:/* @__PURE__ */le(ge,{})},Pe={none:/* @__PURE__ */le(Se,{}),upper:/* @__PURE__ */le(xe,{}),capitalize:/* @__PURE__ */le(ke,{}),lower:/* @__PURE__ */le(be,{})};function Ie({label:e,icon:t,answers:n,names:r,glyphs:l,row:o,readOnly:a}){const s=o.value||o.styleValue||"";/* @__PURE__ */
|
|
25
|
+
return le(E,{label:e,icon:t,children:/* @__PURE__ */le(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 qe({kept:e,keptHint:t,readOnly:n=!1,style:r,font:l,italic:o,cells:a,align:s,list:c,letterCase:i}){const u=C("copy",b),d=O(L().textToolbar),p=Object.fromEntries(R(K).map(e=>[e.value,e.icon])),h={...b.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__ */le(F,{content:h.italic,children:/* @__PURE__ */le(j,{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__ */le(fe,{})})}):null;/* @__PURE__ */
|
|
26
|
+
return re("div",{className:"es-tpp",children:[e?/* @__PURE__ */re("div",{className:"es-tpp-kept",children:[
|
|
27
|
+
/* @__PURE__ */le(We,{...e,readOnly:n||e.readOnly}),t?/* @__PURE__ */le("p",{className:"es-field-hint",children:t}):null]}):null,r?/* @__PURE__ */le(E,{label:h.style,icon:/* @__PURE__ */le(ue,{}),children:/* @__PURE__ */le(x,{ariaLabel:h.style,value:r.value,options:r.options,onChange:r.onChange,changed:r.changed,footer:m,readOnly:n})}):null,l?/* @__PURE__ */le(E,{label:h.font,icon:/* @__PURE__ */le(de,{}),children:/* @__PURE__ */re("div",{className:"es-tpp-font",children:[
|
|
28
|
+
/* @__PURE__ */le("div",{className:"es-tpp-font-select",children:/* @__PURE__ */le(x,{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__ */le(E,{label:h.italic,icon:/* @__PURE__ */le(de,{}),children:/* @__PURE__ */le("div",{className:"es-tpp-font",children:g})}):null,a?.length?/* @__PURE__ */le(je,{cells:a,words:u.cells,readOnly:n}):null,s?/* @__PURE__ */le(Ie,{label:u.alignment,icon:/* @__PURE__ */le(pe,{}),answers:K.filter(e=>!s.allow||s.allow.includes(e)),names:d,glyphs:p,row:s,readOnly:n}):null,c?/* @__PURE__ */le(Ie,{label:h.list,icon:/* @__PURE__ */le(he,{}),answers:$e,names:h.lists,glyphs:ze,row:c,readOnly:n}):null,i?/* @__PURE__ */le(Ie,{label:h.capitalization,icon:/* @__PURE__ */le(me,{}),answers:Me,names:h.cases,glyphs:Pe,row:i,readOnly:n}):null]})}export{Be as COPY_CELLS,We as CopyBox,je as CopyCells,Ke as RichBox,qe as TextPartPanel,Te as insertSelection,De as markSelection,He as useCaretEdit};
|
package/dist/data/index.d.ts
CHANGED
|
@@ -1,29 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { B as BlockShape, c as FieldShape, d as FieldsShape, e as NodeProps, R as RootData } from '../types-
|
|
3
|
-
export { R as ResolvableItem, a as ResolveCache, b as ResolveOptions, c as ResolveTrigger, d as changedProps, e as createResolveCache, f as deepEqual, r as resolveNodeData } from '../resolve-
|
|
1
|
+
import { N as Node, D as Data, a as DataConfig, S as SlotAddress, F as Found, P as Place, b as SlotEntry, W as WalkInfo } from '../types-Dq180WRV.js';
|
|
2
|
+
export { B as BlockShape, c as FieldShape, d as FieldsShape, e as NodeProps, R as RootData } from '../types-Dq180WRV.js';
|
|
3
|
+
export { R as ResolvableItem, a as ResolveCache, b as ResolveOptions, c as ResolveTrigger, d as changedProps, e as createResolveCache, f as deepEqual, r as resolveNodeData } from '../resolve-Bz4mszpL.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Finding a node's slots, and reading or writing a value at a prop path.
|
|
7
7
|
*
|
|
8
|
-
* A slot is found the way
|
|
8
|
+
* A slot is found the way the old library finds one: by the FIELDS, not by the value. A
|
|
9
9
|
* prop is a slot when its field says `type: 'slot'`; a slot can also sit inside
|
|
10
10
|
* an `object` field or inside each item of an `array` field, and its name is
|
|
11
|
-
* then the prop path
|
|
11
|
+
* then the prop path the old library gives it — `items[0].content`, `box.content`.
|
|
12
12
|
*
|
|
13
|
-
* One deliberate difference from
|
|
13
|
+
* One deliberate difference from the old library: the old library also walks an object whose field is
|
|
14
14
|
* NOT an `object` field using the PARENT's field map, so a key there that
|
|
15
15
|
* happens to share a slot's name is treated as a slot. No document relies on
|
|
16
|
-
* that (a non-array value there crashes
|
|
16
|
+
* that (a non-array value there crashes the old library's own walk), and a rule that
|
|
17
17
|
* depends on a coincidence of names is not one to copy.
|
|
18
18
|
*
|
|
19
19
|
* Order is DECLARATION order — the order the fields are written in the config,
|
|
20
|
-
* which is the order a person reads the block in (`col1` before `col2`).
|
|
20
|
+
* which is the order a person reads the block in (`col1` before `col2`). The old library
|
|
21
21
|
* visits slots in reverse, as a side effect of how it fills empty ones; nothing
|
|
22
22
|
* in either app depends on that.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
/** One step of a prop path: a key, or an index into an array. */
|
|
26
26
|
type Segment = string | number;
|
|
27
|
+
/** One document node: a string `type` and a `props` object. */
|
|
28
|
+
declare const isNode: (value: unknown) => value is Node;
|
|
29
|
+
/**
|
|
30
|
+
* A slot's array, read by its SHAPE: non-empty, every item a node. A list field
|
|
31
|
+
* (stats rows, ticker items) fails and is left alone. The one answer for the
|
|
32
|
+
* easel and its hosts, so no walk keeps a private copy that drifts.
|
|
33
|
+
*/
|
|
34
|
+
declare const isNodeList: (value: unknown) => value is Node[];
|
|
27
35
|
declare function getIn(value: unknown, segments: readonly Segment[]): unknown;
|
|
28
36
|
|
|
29
37
|
/** One translated value, and the fingerprint of the base value it was made from. */
|
|
@@ -195,7 +203,7 @@ declare function copyTranslation(overlay: TranslationOverlay | null | undefined,
|
|
|
195
203
|
/**
|
|
196
204
|
* efficient-easel/data — the document, as pure functions.
|
|
197
205
|
*
|
|
198
|
-
* The bottom layer of the engine that replaces
|
|
206
|
+
* The bottom layer of the engine that replaces the old library (the blueprint "From
|
|
199
207
|
* The Ground Up For Efficient Editor", 2026-09-29, step 1.1). Every function
|
|
200
208
|
* takes a document and returns a new one; nothing here holds state, knows
|
|
201
209
|
* about React, or touches a browser global, so a server component, a Node
|
|
@@ -213,17 +221,17 @@ declare function copyTranslation(overlay: TranslationOverlay | null | undefined,
|
|
|
213
221
|
* round-trip spec pins each one:
|
|
214
222
|
*
|
|
215
223
|
* 1. An empty slot is written as `[]`, and `zones` is written as `{}`.
|
|
216
|
-
* 2. Default props follow
|
|
224
|
+
* 2. Default props follow the old library: a new block is created WITH its
|
|
217
225
|
* `defaultProps`; the root's `defaultProps` are filled in on open; an
|
|
218
226
|
* existing block is never back-filled.
|
|
219
227
|
* 3. A root prop that no field declares (a site's `theme`, `fonts`, `scales`)
|
|
220
228
|
* is kept exactly as it is. Nothing here drops a key it doesn't know.
|
|
221
229
|
* 4. The two older formats are READ — root props written directly on `root`,
|
|
222
|
-
* and children parked in `zones` — and converted on open, the way
|
|
230
|
+
* and children parked in `zones` — and converted on open, the way the old library's
|
|
223
231
|
* `migrate()` converts them. They are never written back.
|
|
224
232
|
*
|
|
225
233
|
* KEY ORDER. The backend stores these documents in Postgres `jsonb`, which does
|
|
226
|
-
* not keep key order, so "the same document as
|
|
234
|
+
* not keep key order, so "the same document as the old library" means the same keys and
|
|
227
235
|
* values. What this layer does promise is stronger for its own round trip: a
|
|
228
236
|
* document that is already in shape comes back as THE SAME OBJECT (so
|
|
229
237
|
* `normalizeData(doc) === doc`), and every edit copies only the nodes on the
|
|
@@ -239,7 +247,7 @@ declare function copyTranslation(overlay: TranslationOverlay | null | undefined,
|
|
|
239
247
|
*/
|
|
240
248
|
|
|
241
249
|
/**
|
|
242
|
-
* What `normalizeData` accepts: any saved document, as loosely as
|
|
250
|
+
* What `normalizeData` accepts: any saved document, as loosely as the old library's own
|
|
243
251
|
* `Data` type describes one (`root.props` optional). Converting the older
|
|
244
252
|
* shapes is its job, so it must take them without a cast. Every OTHER function
|
|
245
253
|
* here takes the normalised `Data` it returns.
|
|
@@ -259,9 +267,9 @@ declare const ROOT_ID = "root";
|
|
|
259
267
|
declare const ROOT_SLOT = "default-zone";
|
|
260
268
|
/** The top-level list, as an address. */
|
|
261
269
|
declare const ROOT_LIST: SlotAddress;
|
|
262
|
-
/** `{ parentId, slot }` →
|
|
270
|
+
/** `{ parentId, slot }` → the old library's zone key `"<parentId>:<slot>"`. */
|
|
263
271
|
declare const zoneKey: ({ parentId, slot }: SlotAddress) => string;
|
|
264
|
-
/**
|
|
272
|
+
/** The old library's zone key → `{ parentId, slot }`. Ids and prop paths hold no colon. */
|
|
265
273
|
declare function parseZoneKey(key: string): SlotAddress;
|
|
266
274
|
type DataErrorCode = 'not-found' | 'no-slot' | 'bad-index' | 'duplicate-id' | 'cycle' | 'id-change' | 'unknown-type';
|
|
267
275
|
declare class DataError extends Error {
|
|
@@ -294,7 +302,7 @@ declare function find(data: Data, config: DataConfig, id: string): Found | null;
|
|
|
294
302
|
/** The list at an address, or `null` when no such slot exists. */
|
|
295
303
|
declare function getList(data: Data, config: DataConfig, address: SlotAddress): Node[] | null;
|
|
296
304
|
/**
|
|
297
|
-
* What the easel does to a document when it opens it — the same result
|
|
305
|
+
* What the easel does to a document when it opens it — the same result the old library
|
|
298
306
|
* reaches on load, with the older formats converted (rule 4):
|
|
299
307
|
*
|
|
300
308
|
* - `root` holding its props directly becomes `{ props: { …those keys } }`;
|
|
@@ -309,7 +317,7 @@ declare function getList(data: Data, config: DataConfig, address: SlotAddress):
|
|
|
309
317
|
*/
|
|
310
318
|
declare function normalizeData(data: DataInput | Data, config: DataConfig): Data;
|
|
311
319
|
/**
|
|
312
|
-
* A new block, the way the Add panel makes one —
|
|
320
|
+
* A new block, the way the Add panel makes one — the old library's `insert` recipe:
|
|
313
321
|
* `{ ...defaultProps, id }`, plus any `props` the caller starts it with. The
|
|
314
322
|
* defaults are copied, so two blocks never share an array or object, and every
|
|
315
323
|
* child a default slot seeds gets its own id.
|
|
@@ -328,7 +336,7 @@ declare function insert(data: Data, config: DataConfig, place: Place, node: Node
|
|
|
328
336
|
declare function remove(data: Data, config: DataConfig, id: string): Data;
|
|
329
337
|
/**
|
|
330
338
|
* Move a node to `to`. Within one list, `to.index` is the node's index AFTER
|
|
331
|
-
* the move (
|
|
339
|
+
* the move (the old library's rule), so `0 … length-1`; into another list it is the index
|
|
332
340
|
* to insert at, `0 … length`. A move into the node's own subtree is refused.
|
|
333
341
|
*/
|
|
334
342
|
declare function move(data: Data, config: DataConfig, id: string, to: Place): Data;
|
|
@@ -336,7 +344,7 @@ declare function move(data: Data, config: DataConfig, id: string, to: Place): Da
|
|
|
336
344
|
* Copy a node, and everything under it, to the place just after it. Every
|
|
337
345
|
* copied node gets a fresh id. `strip` sees each copied node (with its new id)
|
|
338
346
|
* and returns what to keep — the hook for "a copy must not claim the
|
|
339
|
-
* original's baked image" (`bakedId`), which
|
|
347
|
+
* original's baked image" (`bakedId`), which the old library's own duplicate copied
|
|
340
348
|
* verbatim.
|
|
341
349
|
*/
|
|
342
350
|
declare function duplicate(data: Data, config: DataConfig, id: string, options?: {
|
|
@@ -354,7 +362,7 @@ declare function copyNode(node: Node, config: DataConfig, options?: {
|
|
|
354
362
|
strip?: (node: Node) => Node;
|
|
355
363
|
}): Node;
|
|
356
364
|
/**
|
|
357
|
-
* Merge `patch` into a node's props —
|
|
365
|
+
* Merge `patch` into a node's props — the old library's `replace`, for the common case of
|
|
358
366
|
* changing some props. A key keeps its place; a new key goes on the end;
|
|
359
367
|
* `undefined` clears a key (JSON drops it on save). New children in a patched
|
|
360
368
|
* slot are brought into shape. Changing `id` is refused. A patch that changes
|
|
@@ -362,7 +370,7 @@ declare function copyNode(node: Node, config: DataConfig, options?: {
|
|
|
362
370
|
*/
|
|
363
371
|
declare function setProps(data: Data, config: DataConfig, id: string, patch: Record<string, unknown>): Data;
|
|
364
372
|
/**
|
|
365
|
-
* Replace a node wholesale —
|
|
373
|
+
* Replace a node wholesale — the old library's `replace` action: the node keeps its place
|
|
366
374
|
* and its id, and every prop is the new node's (a key it does not carry is
|
|
367
375
|
* gone, which `setProps` cannot do). Children in its slots that arrive without
|
|
368
376
|
* an id get one, and an id another node already holds is refused, as `insert`
|
|
@@ -372,4 +380,4 @@ declare function replaceNode(data: Data, config: DataConfig, id: string, node: N
|
|
|
372
380
|
/** Merge `patch` into the root's props, the same way `setProps` does. */
|
|
373
381
|
declare function setRoot(data: Data, config: DataConfig, patch: Record<string, unknown>): Data;
|
|
374
382
|
|
|
375
|
-
export { Data, DataConfig, DataError, type DataErrorCode, type DataInput, Found, Node, Place, ROOT_ID, ROOT_LIST, ROOT_SLOT, type Segment, SlotAddress, SlotEntry, type TranslatableItem, type TranslatablePath, type TranslatedValue, type TranslationEntries, type TranslationOverlay, type TranslationRef, type TranslationStatus, WalkInfo, applyTranslation, copyNode, copyTranslation, createNode, duplicate, extractTranslation, find, getIn, getList, insert, mapIds, move, newId, normalizeData, parseZoneKey, pruneTranslation, rebaseTranslation, remove, replaceNode, setProps, setRoot, slotsOf, translatablePaths, translationFingerprint, translationStatus, walk, zoneKey };
|
|
383
|
+
export { Data, DataConfig, DataError, type DataErrorCode, type DataInput, Found, Node, Place, ROOT_ID, ROOT_LIST, ROOT_SLOT, type Segment, SlotAddress, SlotEntry, type TranslatableItem, type TranslatablePath, type TranslatedValue, type TranslationEntries, type TranslationOverlay, type TranslationRef, type TranslationStatus, WalkInfo, applyTranslation, copyNode, copyTranslation, createNode, duplicate, extractTranslation, find, getIn, getList, insert, isNode, isNodeList, mapIds, move, newId, normalizeData, parseZoneKey, pruneTranslation, rebaseTranslation, remove, replaceNode, setProps, setRoot, slotsOf, translatablePaths, translationFingerprint, translationStatus, walk, zoneKey };
|
package/dist/data/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DataError,ROOT_ID,ROOT_LIST,ROOT_SLOT,applyTranslation,changedProps,copyNode,copyTranslation,createNode,createResolveCache,deepEqual,duplicate,extractTranslation,find,getList,insert,mapIds,move,newId,normalizeData,parseZoneKey,pruneTranslation,rebaseTranslation,remove,replaceNode,resolveNodeData,setProps,setRoot,slotsOf,translatablePaths,translationFingerprint,translationStatus,walk,zoneKey}from"../chunk-
|
|
1
|
+
export{DataError,ROOT_ID,ROOT_LIST,ROOT_SLOT,applyTranslation,changedProps,copyNode,copyTranslation,createNode,createResolveCache,deepEqual,duplicate,extractTranslation,find,getList,insert,mapIds,move,newId,normalizeData,parseZoneKey,pruneTranslation,rebaseTranslation,remove,replaceNode,resolveNodeData,setProps,setRoot,slotsOf,translatablePaths,translationFingerprint,translationStatus,walk,zoneKey}from"../chunk-TGZCD6IP.js";export{getIn,isNode,isNodeList}from"../chunk-KXM6YRG2.js";
|
package/dist/drag/drag.css
CHANGED
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
display: inline-flex;
|
|
34
34
|
pointer-events: none;
|
|
35
35
|
}
|
|
36
|
-
.es-canvas-handle
|
|
36
|
+
.es-canvas-handle,
|
|
37
|
+
.es-canvas-tag {
|
|
37
38
|
position: relative;
|
|
38
39
|
display: inline-flex;
|
|
39
40
|
align-items: center;
|
|
@@ -51,6 +52,14 @@
|
|
|
51
52
|
pointer-events: none;
|
|
52
53
|
transition: opacity 0.12s;
|
|
53
54
|
}
|
|
55
|
+
/* The selected part's name tag (`tag`, Lewis 2026-10-26): the handle's look
|
|
56
|
+
(above), placed where it is drawn, never taking the pointer. After the
|
|
57
|
+
shared rule, so its place and opacity win. */
|
|
58
|
+
.es-canvas-tag {
|
|
59
|
+
position: absolute;
|
|
60
|
+
cursor: default;
|
|
61
|
+
opacity: 1;
|
|
62
|
+
}
|
|
54
63
|
.es-canvas-handle.is-shown {
|
|
55
64
|
opacity: 1;
|
|
56
65
|
pointer-events: auto;
|
package/dist/drag/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { HTMLAttributes, CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import { P as Place } from '../types-
|
|
4
|
-
import { D as DragSession } from '../session-
|
|
5
|
-
export { a as DragHeld, c as createDragSession } from '../session-
|
|
6
|
-
export { B as Box, a as CanvasDragLayer, b as CanvasDragLayerProps, C as CanvasDragModel, c as CanvasDropTarget, d as CanvasSeam, e as CanvasSource, f as CanvasZone, E as EMPTY_MEASURE, H as HANDLE_GRACE_MS, M as MeasuredCanvas, g as MeasuredNode, h as canvasTarget, i as contains, j as gapInZone, k as gapLine, l as insertSeams, m as measureCanvas, p as pickSource, s as seamsBetween, n as sourcesAt } from '../CanvasDragLayer-
|
|
3
|
+
import { P as Place } from '../types-Dq180WRV.js';
|
|
4
|
+
import { D as DragSession } from '../session-EsjORLQ0.js';
|
|
5
|
+
export { a as DragHeld, c as createDragSession } from '../session-EsjORLQ0.js';
|
|
6
|
+
export { B as Box, a as CanvasDragLayer, b as CanvasDragLayerProps, C as CanvasDragModel, c as CanvasDropTarget, d as CanvasSeam, e as CanvasSource, f as CanvasZone, E as EMPTY_MEASURE, H as HANDLE_GRACE_MS, M as MeasuredCanvas, g as MeasuredNode, h as canvasTarget, i as contains, j as gapInZone, k as gapLine, l as insertSeams, m as measureCanvas, p as pickSource, s as seamsBetween, n as sourcesAt } from '../CanvasDragLayer-NZpaX6aq.js';
|
|
7
7
|
import { D as DragWords } from '../words-SD4neL0n.js';
|
|
8
|
-
import '../watch-
|
|
8
|
+
import '../watch-Unf6SfUf.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Where a drop lands — the engine's one hit rule, as pure functions (blueprint
|
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-LN43DP2A.js";import"../chunk-TQ5Y6S2X.js";export{AUTO_SCROLL_EDGE,AUTO_SCROLL_MAX_SPEED,autoScrollDelta,autoScrollSpeed,createDragSession,dropEffectFor,dropOnRow,frameScrollBox,gapToMoveIndex,isNoOpDrop,scrollBoxOf,scrollParent,startAutoScroll,stepGap,useTreeDrag}from"../chunk-6NJHYXJM.js";import"../chunk-P2VEMZH5.js";import"../chunk-YU3WHLGI.js";import"../chunk-LF3FUSCQ.js";import"../chunk-TGZCD6IP.js";import"../chunk-KXM6YRG2.js";
|
package/dist/draw/index.d.ts
CHANGED
|
@@ -6,6 +6,6 @@ export { RowNameRule, rootRowName, sectionRenameProp, slotChildName, slotChildRe
|
|
|
6
6
|
export { FOOTER_TYPE, HEADER_TYPE, NodeLocation, ROOT_ZONE, SlotConfigView, TREE_MAX_DEPTH, TreeItem, blockNodeActions, childSlotsOf, locateNode, missingPinnedTypes, nestsInTree, newNodeId, pinnedDuplicateIds, pinnedDuplicateIndices, slotChildrenIn, slotFieldsOf } from '../screen/lib/document/content-tree.js';
|
|
7
7
|
export { AUTO_RULES, AutoRule, FOLLOW_RULES, VIEW_DESKTOP_MIN, VIEW_TABLET_MIN, VIEW_TIERS, VIEW_TIER_LABEL, ViewTier, ViewValueKind, ViewValues, isAuto, phoneKey, resolveViewValue, tabletKey, viewTierForWidth } from '../screen/lib/content/view-tiers.js';
|
|
8
8
|
export { HERO_SLIDER_GOTO_EVENT, HeroSliderGotoDetail } from '../screen/lib/document/preview-events.js';
|
|
9
|
-
export { R as REPEAT_ATTRIBUTE, a as REPEAT_INDEX_ATTRIBUTE } from '../repeat-
|
|
9
|
+
export { R as REPEAT_ATTRIBUTE, a as REPEAT_INDEX_ATTRIBUTE } from '../repeat-D65bJS8d.js';
|
|
10
10
|
export { TEXT_STYLE_CASES, TEXT_STYLE_CASE_CSS, TextStyleCase, TextStyleCaseCss, isTextStyleCase, textStyleCaseCss, textStyleCaseOfCss } from '../text-styles/model.js';
|
|
11
|
-
import '../words-
|
|
11
|
+
import '../words-B5Gb7KFq.js';
|
package/dist/easel/easel.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* efficient-easel/easel — the canvas's own marks (blueprint 5.1): the
|
|
3
3
|
* lists' empty and selected states, and the outlines over the selected and
|
|
4
|
-
* hovered block.
|
|
4
|
+
* hovered block. The old library's stylesheet drew these until now; the rules follow it.
|
|
5
5
|
*
|
|
6
6
|
* The canvas is an iframe of its own, so this sheet must reach it: import it
|
|
7
7
|
* once in the host, and `CanvasFrame` copies the host's stylesheets into the
|
|
@@ -44,16 +44,14 @@
|
|
|
44
44
|
box-shadow: var(--elevation-panel);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
/* The frame's root (CanvasFrame)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
[data-easel-entry],
|
|
51
|
-
[data-puck-entry] {
|
|
47
|
+
/* The frame's root (CanvasFrame): a stacking context of its own, so a block's
|
|
48
|
+
z-index stays inside the page. */
|
|
49
|
+
[data-easel-entry] {
|
|
52
50
|
position: relative;
|
|
53
51
|
z-index: 0;
|
|
54
52
|
}
|
|
55
53
|
/* A frame that FILLS its parent (`height="fill"`): the page is at least as tall
|
|
56
|
-
as the frame, as
|
|
54
|
+
as the frame, as the old library's `#frame-root` was, so a short page's background and
|
|
57
55
|
its top list reach the bottom of the canvas. `height: 1px` gives the root a
|
|
58
56
|
height of its own for a list's `height: 100%` to resolve against. Not on an
|
|
59
57
|
`auto` frame, whose height comes FROM the page: there `100vh` is the frame
|
|
@@ -128,10 +126,17 @@
|
|
|
128
126
|
is measured from the words' bounding box, so words on three lines get one
|
|
129
127
|
rectangle, not a line round each. Its colour is the one outline colour
|
|
130
128
|
above: without its fallback the outline is not drawn in the canvas. */
|
|
131
|
-
.es-canvas-outline.is-typing
|
|
129
|
+
.es-canvas-outline.is-typing,
|
|
130
|
+
.es-canvas-outline.is-selected.is-words {
|
|
132
131
|
outline: 2px solid var(--es-canvas-outline-colour);
|
|
133
|
-
outline-offset:
|
|
134
|
-
}
|
|
132
|
+
outline-offset: var(--es-words-clear);
|
|
133
|
+
}
|
|
134
|
+
/* The 4px is WORDS_CLEAR in canvas/dom, the one home: the canvas sets
|
|
135
|
+
`--es-words-clear` from it on both boxes; no literal here. Selected words
|
|
136
|
+
wear that same box from the click on (Lewis 2026-10-26, option B): a
|
|
137
|
+
double-click puts the caret in it and moves nothing. The drag layer keeps
|
|
138
|
+
the handle, the name and the hint on its corners, measured from the same
|
|
139
|
+
constant. */
|
|
135
140
|
/* THE POINTER (Lewis 2026-10-20, mockup v4 decision c): on the canvas it is
|
|
136
141
|
the arrow — over words, and over the links and buttons the page drew, which
|
|
137
142
|
the canvas never follows — and the I-beam only inside the words being
|