efficient-easel 0.99.2 → 0.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/README.md +233 -17
  2. package/dist/autosave/index.d.ts +11 -5
  3. package/dist/blocks/index.d.ts +1 -1
  4. package/dist/canvas/index.d.ts +2 -2
  5. package/dist/canvas/index.js +1 -1
  6. package/dist/chrome/chrome.css +96 -29
  7. package/dist/chrome/index.d.ts +67 -18
  8. package/dist/chrome/index.js +17 -21
  9. package/dist/chunk-3EDSDPIP.js +1 -0
  10. package/dist/chunk-67GNT6PF.js +1 -0
  11. package/dist/{chunk-PI26YXYD.js → chunk-6EIVTKZZ.js} +21 -14
  12. package/dist/chunk-A5UK76FC.js +6 -0
  13. package/dist/chunk-AZT7V4UM.js +10 -0
  14. package/dist/chunk-DICUMYMG.js +12 -0
  15. package/dist/chunk-HDVD27VB.js +1 -0
  16. package/dist/chunk-JQM3V7XQ.js +1 -0
  17. package/dist/chunk-JUQ6YJCG.js +1 -0
  18. package/dist/chunk-LA54QLP5.js +1 -0
  19. package/dist/chunk-LGKQXSKO.js +16 -0
  20. package/dist/chunk-M6F6LS3H.js +1 -0
  21. package/dist/chunk-MH5GUZFQ.js +9 -0
  22. package/dist/chunk-P6O363EE.js +6 -0
  23. package/dist/chunk-PAELDYYS.js +1 -0
  24. package/dist/{chunk-JYPOOHII.js → chunk-QKVR3K73.js} +3 -3
  25. package/dist/chunk-SAJUCHOX.js +1 -0
  26. package/dist/chunk-TRVZ7C23.js +1 -0
  27. package/dist/chunk-V7GIIXFB.js +16 -0
  28. package/dist/chunk-WZ7TGAAT.js +3 -0
  29. package/dist/chunk-ZJEBF4NB.js +1 -0
  30. package/dist/copy/copy.css +388 -5
  31. package/dist/copy/index.d.ts +268 -5
  32. package/dist/copy/index.js +31 -10
  33. package/dist/drag/drag.css +10 -1
  34. package/dist/drag/index.d.ts +99 -8
  35. package/dist/drag/index.js +18 -17
  36. package/dist/easel/easel.css +15 -0
  37. package/dist/easel/index.d.ts +104 -33
  38. package/dist/easel/index.js +9 -1
  39. package/dist/edit-lock/index.d.ts +1 -3
  40. package/dist/edit-lock/index.js +1 -1
  41. package/dist/fields/fields.css +103 -26
  42. package/dist/fields/index.d.ts +47 -9
  43. package/dist/fields/index.js +30 -46
  44. package/dist/gold/index.js +1 -1
  45. package/dist/icons/index.d.ts +10 -1
  46. package/dist/icons/index.js +1 -1
  47. package/dist/index.d.ts +2 -2
  48. package/dist/index.js +1 -1
  49. package/dist/markup/index.d.ts +94 -10
  50. package/dist/markup/index.js +1 -1
  51. package/dist/menu/index.d.ts +58 -5
  52. package/dist/menu/index.js +15 -15
  53. package/dist/menu/menu.css +17 -6
  54. package/dist/node-ops/index.d.ts +1 -1
  55. package/dist/node-ops/index.js +1 -1
  56. package/dist/panel/index.d.ts +72 -4
  57. package/dist/panel/index.js +18 -16
  58. package/dist/panel/panel.css +56 -1
  59. package/dist/pick/index.d.ts +39 -1
  60. package/dist/pick/index.js +7 -14
  61. package/dist/pick/pick.css +14 -0
  62. package/dist/rail/index.d.ts +3 -7
  63. package/dist/rail/index.js +1 -1
  64. package/dist/strings/catalogue.d.ts +13 -35
  65. package/dist/strings/catalogue.js +1 -1
  66. package/dist/strings/index.d.ts +12 -18
  67. package/dist/strings/index.js +2 -2
  68. package/dist/style-clipboard/index.d.ts +1 -1
  69. package/dist/style-clipboard/index.js +1 -1
  70. package/dist/text-styles/index.d.ts +328 -0
  71. package/dist/text-styles/index.js +38 -0
  72. package/dist/text-styles/text-styles.css +309 -0
  73. package/dist/tree/index.d.ts +43 -2
  74. package/dist/tree/index.js +1 -1
  75. package/dist/tree/tree.css +71 -0
  76. package/dist/{types-p9j2Fac7.d.ts → types-DGcCsxs8.d.ts} +72 -7
  77. package/dist/{types-Bs_gVkVI.d.ts → types-DWS-s9z-.d.ts} +1 -9
  78. package/dist/{types-DO-b0LNj.d.ts → types-Djdq6Xkd.d.ts} +9 -8
  79. package/dist/{types-BOSGNvil.d.ts → types-E3HrTPg2.d.ts} +7 -13
  80. package/dist/{types-C7HFvdtk.d.ts → types-VqL6t5HH.d.ts} +82 -5
  81. package/dist/{watch-B5RTR-WX.d.ts → watch-BTYOJpQU.d.ts} +18 -1
  82. package/dist/{words-DagJdwIA.d.ts → words-AHHfiaRY.d.ts} +31 -2
  83. package/dist/{words-c-3h9xQQ.d.ts → words-BMzV04b1.d.ts} +1 -1
  84. package/dist/words-CJjUKcV5.d.ts +37 -0
  85. package/dist/words-CRYvAiHX.d.ts +105 -0
  86. package/dist/{words-CD3WADyb.d.ts → words-CzoyDNHm.d.ts} +4 -0
  87. package/dist/{words-C74EUpFr.d.ts → words-DBq7vfHy.d.ts} +57 -4
  88. package/dist/{words-N4ebT88_.d.ts → words-DgHcY5qB.d.ts} +9 -3
  89. package/package.json +8 -8
  90. package/dist/chunk-66CKSTXP.js +0 -14
  91. package/dist/chunk-672FAEKU.js +0 -1
  92. package/dist/chunk-67VZRQLG.js +0 -13
  93. package/dist/chunk-6PS6STGA.js +0 -1
  94. package/dist/chunk-7A7O2JWQ.js +0 -1
  95. package/dist/chunk-7JTL3P6P.js +0 -1
  96. package/dist/chunk-F2PIG3AA.js +0 -10
  97. package/dist/chunk-H4B72XCJ.js +0 -1
  98. package/dist/chunk-KDIVA6WD.js +0 -1
  99. package/dist/chunk-MCLBHENY.js +0 -1
  100. package/dist/chunk-QB3BZIRA.js +0 -5
  101. package/dist/chunk-SJQG5ENJ.js +0 -1
  102. package/dist/chunk-SUO5627P.js +0 -1
  103. package/dist/chunk-XUE5O62R.js +0 -3
  104. package/dist/chunk-ZT7M24XD.js +0 -1
  105. package/dist/editor/index.d.ts +0 -10
  106. package/dist/editor/index.js +0 -1
  107. /package/dist/{chunk-2PHD4L6A.js → chunk-OWBO4WKA.js} +0 -0
@@ -54,6 +54,44 @@ type ColourPickerProps = {
54
54
  * to what is stored on Enter, Escape or leaving it.
55
55
  */
56
56
  declare function ColourPicker({ value, onChange, label, theme, caption, id: swatchId, readOnly, words, }: ColourPickerProps): react.JSX.Element;
57
+ type ColourWindowProps = {
58
+ /** The colour, `#rrggbb`, or `''` while there is none. */
59
+ value: string;
60
+ /** Live, as the colour moves: one `#rrggbb` from every way in. */
61
+ onChange: (next: string) => void;
62
+ /** The colour's name: the window is "<label> colour", its hex box "<label> hex code". */
63
+ label: string;
64
+ /** The theme's colours, offered first. */
65
+ theme?: readonly ThemeColour[];
66
+ /** Escape in the window. The opener closes it and takes the focus back. */
67
+ onClose?: () => void;
68
+ /** The window's DOM id, for the opener's `aria-controls`. */
69
+ id?: string;
70
+ readOnly?: boolean;
71
+ words?: PickWords['colour'];
72
+ /**
73
+ * Start the hex row with a swatch of the colour, as the text box's colour
74
+ * window draws it (E5b). Off by default: `ColourPicker`'s row already has its
75
+ * swatch beside the hex.
76
+ */
77
+ swatch?: boolean;
78
+ /**
79
+ * When a drag on the square or the hue bar writes. `'live'` (the default,
80
+ * as `ColourPicker` always has): every move. `'end'`: once, where the
81
+ * pointer comes up — one undo step for a host whose every write is one,
82
+ * like the text box (E5b). The thumbs, the hex and the swatch follow the
83
+ * drag live either way. An arrow key writes each press in both.
84
+ */
85
+ dragWrites?: 'live' | 'end';
86
+ };
87
+ /**
88
+ * THE COLOUR WINDOW on its own: the theme's colours, the saturation and
89
+ * brightness square, the hue strip and the hex. `ColourPicker` opens it under
90
+ * its swatch; a row that draws its own swatches (the text-styles list's Any
91
+ * color, plan step E6) opens the same one, so there is one window, not two.
92
+ * The opener owns when it is open and puts it in the panel's own flow.
93
+ */
94
+ declare function ColourWindow({ value, onChange, label, theme, onClose, id, readOnly, words, swatch, dragWrites, }: ColourWindowProps): react.JSX.Element;
57
95
 
58
96
  type ImageBoxProps = {
59
97
  /** The file's URL, or `''` while the setting has none. */
@@ -150,4 +188,4 @@ declare function hueFromPoint(x: number, box: {
150
188
  * name, so it reads as none rather than as its own bytes. */
151
189
  declare function mediaName(url: string): string;
152
190
 
153
- export { ColourPicker, type ColourPickerProps, HEX_MAX_LENGTH, type Hsv, ImageBox, type ImageBoxProps, PickWords, type ThemeColour, hexReadout, hexToHsv, hsvToHex, hueFromPoint, mediaName, svFromPoint, typedHex };
191
+ export { ColourPicker, type ColourPickerProps, ColourWindow, type ColourWindowProps, HEX_MAX_LENGTH, type Hsv, ImageBox, type ImageBoxProps, PickWords, type ThemeColour, hexReadout, hexToHsv, hsvToHex, hueFromPoint, mediaName, svFromPoint, typedHex };
@@ -1,14 +1,7 @@
1
- import{DEFAULT_PICK_WORDS as e}from"../chunk-ZAOM6PFH.js";import{useId as a,useState as t,useRef as n,useEffect as l}from"react";import{jsxs as r,jsx as i}from"react/jsx-runtime";var s=/^(?:[0-9a-f]{3}|[0-9a-f]{6})$/i,o=7;function c(e){const a=e.trim().replace(/^#/,"");if(!s.test(a))return null;return`#${(3===a.length?[...a].map(e=>e+e).join(""):a).toLowerCase()}`}var u=e=>e.toUpperCase(),h=(e,a,t)=>Math.min(t,Math.max(a,e));function m(e){const a=c(e)??"#000000",t=parseInt(a.slice(1,3),16)/255,n=parseInt(a.slice(3,5),16)/255,l=parseInt(a.slice(5,7),16)/255,r=Math.max(t,n,l),i=r-Math.min(t,n,l);let s=0;return 0!==i&&(s=r===t?(n-l)/i%6*60:r===n?60*((l-t)/i+2):60*((t-n)/i+4)),{h:(s+360)%360,s:0===r?0:i/r,v:r}}function d({h:e,s:a,v:t}){const n=(e%360+360)%360,l=h(a,0,1),r=h(t,0,1),i=r*l,s=i*(1-Math.abs(n/60%2-1)),o=r-i,[c,u,m]=n<60?[i,s,0]:n<120?[s,i,0]:n<180?[0,i,s]:n<240?[0,s,i]:n<300?[s,0,i]:[i,0,s],d=e=>Math.round(255*(e+o)).toString(16).padStart(2,"0");return`#${d(c)}${d(u)}${d(m)}`}function p(e,a,t){return{s:t.width>0?h((e-t.left)/t.width,0,1):0,v:t.height>0?1-h((a-t.top)/t.height,0,1):0}}function v(e,a){return a.width>0?360*h((e-a.left)/a.width,0,1):0}function g(e){if(/^(data|blob):/i.test(e))return"";const a=(e.split(/[?#]/)[0]??"").split("/").filter(Boolean).pop()??"";try{return decodeURIComponent(a)}catch{return a}}function b({value:s,onChange:o,label:h,theme:g,caption:b,id:f,readOnly:y,words:w=e.colour}){const N=a(),[x,C]=t(!1),M=n(null),D=n(null),[A,I]=t(()=>m(s||"#000000")),$=n(s);l(()=>{s!==$.current&&($.current=s,s&&I(m(s)))},[s]);const L=e=>{y||e===s||($.current=e,o(e))},O=e=>{I(m(e)),L(e)},E=e=>{I(e),L(d(e))};l(()=>{if(!x)return;const e=M.current?.ownerDocument;if(!e)return;const a=e=>{M.current&&!M.current.contains(e.target)&&C(!1)};return e.addEventListener("click",a,!0),()=>e.removeEventListener("click",a,!0)},[x]);const K=e=>({onPointerDown:a=>{y||(a.currentTarget.setPointerCapture?.(a.pointerId),e(a))},onPointerMove:a=>{1&a.buttons&&e(a)}}),P=K(e=>E({...A,...p(e.clientX,e.clientY,e.currentTarget.getBoundingClientRect())})),T=K(e=>E({...A,h:v(e.clientX,e.currentTarget.getBoundingClientRect())})),B=e=>`${Math.round(100*e)}%`,R=void 0===b||s&&c(b)===c(s)?null:b,S=R??(s?u(s):w.notSet);/* @__PURE__ */
2
- return r("div",{ref:M,className:"es-pick-colour",children:[
3
- /* @__PURE__ */r("div",{className:"es-pick-colour-row",children:[
4
- /* @__PURE__ */i("button",{ref:D,id:f,type:"button",className:s?"es-pick-swatch":"es-pick-swatch is-unset",style:s?{background:s}:void 0,"aria-label":w.swatch({label:h,shown:S}),"aria-expanded":x,"aria-controls":x?N:void 0,disabled:y,onClick:()=>C(e=>!e)}),null===R?/* @__PURE__ */i(k,{value:s,onChange:O,name:w.hex({label:h}),readOnly:y}):/* @__PURE__ */i("span",{className:"es-pick-caption",children:R})]}),x?/* @__PURE__ */r("div",{id:N,role:"dialog","aria-label":w.dialog({label:h}),className:"es-pick-window",onKeyDown:e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),C(!1),D.current?.focus())},children:[g&&g.length>0?/* @__PURE__ */i("div",{role:"group","aria-label":w.theme,className:"es-pick-theme",children:g.map(e=>/* @__PURE__ */i("button",{type:"button",className:"es-pick-theme-swatch",style:{background:e.value},title:w.themeSwatchTitle({name:e.name,hex:u(e.value)}),"aria-label":w.themeSwatch({name:e.name,hex:u(e.value)}),"aria-pressed":c(e.value)===s,onClick:()=>O(c(e.value)??e.value)},`${e.name}:${e.value}`))}):null,
5
- /* @__PURE__ */i("div",{className:"es-pick-sv",role:"slider",tabIndex:0,"aria-label":w.square,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(100*A.v),"aria-valuetext":w.squareValue({saturation:B(A.s),brightness:B(A.v)}),style:{backgroundColor:d({h:A.h,s:1,v:1})},onKeyDown:e=>{const a=e.shiftKey?.1:.01,t={ArrowLeft:[-a,0],ArrowRight:[a,0],ArrowDown:[0,-a],ArrowUp:[0,a]}[e.key];t&&(e.preventDefault(),E({...A,s:Math.min(1,Math.max(0,A.s+t[0])),v:Math.min(1,Math.max(0,A.v+t[1]))}))},...P,children:/* @__PURE__ */i("span",{className:"es-pick-sv-thumb",style:{left:B(A.s),top:B(1-A.v)}})}),
6
- /* @__PURE__ */i("div",{className:"es-pick-hue",role:"slider",tabIndex:0,"aria-label":w.hue,"aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":Math.round(A.h),onKeyDown:e=>{const a=e.shiftKey?10:1,t="ArrowLeft"===e.key||"ArrowDown"===e.key?-a:"ArrowRight"===e.key||"ArrowUp"===e.key?a:null,n="Home"===e.key?0:"End"===e.key?359:null===t?null:Math.min(359,Math.max(0,A.h+t));null!==n&&(e.preventDefault(),E({...A,h:n}))},...T,children:/* @__PURE__ */i("span",{className:"es-pick-hue-thumb",style:{left:A.h/360*100+"%"}})}),
7
- /* @__PURE__ */i(k,{value:s,onChange:O,name:w.hex({label:h}),readOnly:y})]}):null]})}function k({value:e,onChange:a,name:n,readOnly:l}){const[r,s]=t(null);/* @__PURE__ */
8
- return i("input",{type:"text",className:"es-pick-hex",value:r??(e?u(e):""),"aria-label":n,maxLength:7,spellCheck:!1,autoComplete:"off",readOnly:l,onChange:t=>{s(t.target.value);const n=c(t.target.value);null!==n&&n!==e&&a(n)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"!==e.key&&"Escape"!==e.key||(e.preventDefault(),e.stopPropagation(),s(null),e.currentTarget.blur())},onBlur:()=>s(null)})}function f({value:a,onChange:n,label:l,openLibrary:s,kind:o="image",placeholder:c,readOnly:u,words:h=e.image}){const[m,d]=t(!1),[p,v]=t(!1),b=Boolean(s)&&!u,k=async()=>{if(s&&!m&&!u){d(!0),v(!1);try{const e=await s();e&&n(e)}catch{v(!0)}finally{d(!1)}}},f=m?/* @__PURE__ */i("p",{className:"es-pick-image-status",role:"status",children:h.choosing}):p?/* @__PURE__ */i("p",{className:"es-pick-image-status is-error",role:"alert",children:h.failed}):null;if(!a)/* @__PURE__ */
9
- return r("div",{className:"es-pick-image",children:[
10
- /* @__PURE__ */r("button",{type:"button",className:"es-pick-image-slot",onClick:k,disabled:!b||m,"aria-label":h.empty({label:l,kind:o,placeholder:c}),children:[
11
- /* @__PURE__ */i("span",{className:"es-pick-image-slot-name",children:c??("video"===o?h.chooseVideo:h.chooseImage)}),b?/* @__PURE__ */i("span",{className:"es-pick-image-slot-hint",children:h.hint}):null]}),f]});const y=g(a),w=y?h.named({label:l,name:y}):l;/* @__PURE__ */
12
- return r("div",{className:"es-pick-image",children:[
13
- /* @__PURE__ */r("figure",{className:"es-pick-image-figure",children:[
14
- /* @__PURE__ */i("div",{className:"es-pick-image-frame",children:"video"===o?/* @__PURE__ */i("video",{src:a,muted:!0,playsInline:!0,preload:"metadata","aria-label":w}):/* @__PURE__ */i("img",{src:a,alt:w})}),y?/* @__PURE__ */i("figcaption",{className:"es-pick-image-name",title:y,children:y}):null]}),b||!u?/* @__PURE__ */r("div",{className:"es-pick-image-actions",children:[b?/* @__PURE__ */i("button",{type:"button",className:"es-pick-image-btn",onClick:k,disabled:m,"aria-label":h.replaceNamed({label:l}),children:h.replace}):null,u?null:/* @__PURE__ */i("button",{type:"button",className:"es-pick-image-btn is-bare",onClick:()=>n(""),disabled:m,"aria-label":h.removeNamed({label:l}),children:h.remove})]}):null,f]})}export{b as ColourPicker,o as HEX_MAX_LENGTH,f as ImageBox,u as hexReadout,m as hexToHsv,d as hsvToHex,v as hueFromPoint,g as mediaName,p as svFromPoint,c as typedHex};
1
+ import{mediaName as e}from"../chunk-AZT7V4UM.js";export{ColourPicker,ColourWindow,HEX_MAX_LENGTH,hexReadout,hexToHsv,hsvToHex,hueFromPoint,mediaName,svFromPoint,typedHex}from"../chunk-AZT7V4UM.js";import{DEFAULT_PICK_WORDS as a}from"../chunk-ZAOM6PFH.js";import{useState as i}from"react";import{jsx as l,jsxs as s}from"react/jsx-runtime";function c({value:c,onChange:n,label:o,openLibrary:r,kind:t="image",placeholder:m,readOnly:d,words:p=a.image}){const[u,h]=i(!1),[b,g]=i(!1),k=Boolean(r)&&!d,N=async()=>{if(r&&!u&&!d){h(!0),g(!1);try{const e=await r();e&&n(e)}catch{g(!0)}finally{h(!1)}}},f=u?/* @__PURE__ */l("p",{className:"es-pick-image-status",role:"status",children:p.choosing}):b?/* @__PURE__ */l("p",{className:"es-pick-image-status is-error",role:"alert",children:p.failed}):null;if(!c)/* @__PURE__ */
2
+ return s("div",{className:"es-pick-image",children:[
3
+ /* @__PURE__ */s("button",{type:"button",className:"es-pick-image-slot",onClick:N,disabled:!k||u,"aria-label":p.empty({label:o,kind:t,placeholder:m}),children:[
4
+ /* @__PURE__ */l("span",{className:"es-pick-image-slot-name",children:m??("video"===t?p.chooseVideo:p.chooseImage)}),k?/* @__PURE__ */l("span",{className:"es-pick-image-slot-hint",children:p.hint}):null]}),f]});const v=e(c),y=v?p.named({label:o,name:v}):o;/* @__PURE__ */
5
+ return s("div",{className:"es-pick-image",children:[
6
+ /* @__PURE__ */s("figure",{className:"es-pick-image-figure",children:[
7
+ /* @__PURE__ */l("div",{className:"es-pick-image-frame",children:"video"===t?/* @__PURE__ */l("video",{src:c,muted:!0,playsInline:!0,preload:"metadata","aria-label":y}):/* @__PURE__ */l("img",{src:c,alt:y})}),v?/* @__PURE__ */l("figcaption",{className:"es-pick-image-name",title:v,children:v}):null]}),k||!d?/* @__PURE__ */s("div",{className:"es-pick-image-actions",children:[k?/* @__PURE__ */l("button",{type:"button",className:"es-pick-image-btn",onClick:N,disabled:u,"aria-label":p.replaceNamed({label:o}),children:p.replace}):null,d?null:/* @__PURE__ */l("button",{type:"button",className:"es-pick-image-btn is-bare",onClick:()=>n(""),disabled:u,"aria-label":p.removeNamed({label:o}),children:p.remove})]}):null,f]})}export{c as ImageBox};
@@ -138,6 +138,20 @@
138
138
  .es-pick-hue-thumb {
139
139
  top: 50%;
140
140
  }
141
+ /* The hex row with its swatch (ColourWindow `swatch`, the text box's colour
142
+ window): the colour, then the hex. */
143
+ .es-pick-hex-row {
144
+ display: flex;
145
+ align-items: center;
146
+ gap: 8px;
147
+ }
148
+ .es-pick-hex-swatch {
149
+ width: 26px;
150
+ height: 26px;
151
+ flex: none;
152
+ border-radius: 6px;
153
+ box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.1);
154
+ }
141
155
 
142
156
  /* ── The image box ──────────────────────────────────────────────────────── */
143
157
  .es-pick-image {
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
- import { c as EaselRailProps, E as EaselRailButtonProps } from '../types-Bs_gVkVI.js';
3
- export { a as EaselRailItem, b as EaselRailOrientation, d as EditorRailButtonProps, e as EditorRailItem, f as EditorRailOrientation, g as EditorRailProps } from '../types-Bs_gVkVI.js';
2
+ import { c as EaselRailProps, E as EaselRailButtonProps } from '../types-DWS-s9z-.js';
3
+ export { a as EaselRailItem, b as EaselRailOrientation } from '../types-DWS-s9z-.js';
4
4
  export { AddIcon, LayersIcon, MediaIcon, PageIcon as PagesIcon, IconProps as RailIconProps, SitemapIcon, StylesIcon } from '../icons/index.js';
5
5
  export { W as WordFit } from '../wordFit-D4S36PvB.js';
6
6
 
@@ -44,8 +44,6 @@ export { W as WordFit } from '../wordFit-D4S36PvB.js';
44
44
  * passes `ariaLabel`; `TopBarRail` does it from the provider.
45
45
  */
46
46
  declare function EaselRail({ items, ariaLabel, className, orientation, wordFit, }: EaselRailProps): react.JSX.Element;
47
- /** @deprecated The name before the Easel rename: `EaselRail`. */
48
- declare const EditorRail: typeof EaselRail;
49
47
 
50
48
  /**
51
49
  * A single rail button: an icon in a 34×34 square that hovers, highlights when
@@ -56,8 +54,6 @@ declare const EditorRail: typeof EaselRail;
56
54
  * whose item omits `active`) stays a plain button rather than a stuck toggle.
57
55
  */
58
56
  declare function EaselRailButton({ label, worded, icon, active, disabled, onSelect, className, }: EaselRailButtonProps): react.JSX.Element;
59
- /** @deprecated The name before the Easel rename: `EaselRailButton`. */
60
- declare const EditorRailButton: typeof EaselRailButton;
61
57
 
62
58
  /**
63
59
  * Rail design tokens — the ONE source both apps' rails converge on.
@@ -146,4 +142,4 @@ declare const railCssVars: {
146
142
  readonly accentTint: "--es-rail-accent-tint";
147
143
  };
148
144
 
149
- export { EaselRail, EaselRailButton, EaselRailButtonProps, EaselRailProps, EditorRail, EditorRailButton, type RailTokens, railCssVars, railTokens };
145
+ export { EaselRail, EaselRailButton, EaselRailButtonProps, EaselRailProps, type RailTokens, railCssVars, railTokens };
@@ -1 +1 @@
1
- import"../chunk-2PHD4L6A.js";export{EaselRail,EaselRailButton,EditorRail,EditorRailButton,railCssVars,railTokens}from"../chunk-XUE5O62R.js";import"../chunk-2OAZYSWJ.js";import"../chunk-BZ5ASXOL.js";export{AddIcon,LayersIcon,MediaIcon,PageIcon as PagesIcon,SitemapIcon,StylesIcon}from"../chunk-PI26YXYD.js";
1
+ import"../chunk-OWBO4WKA.js";export{EaselRail,EaselRailButton,railCssVars,railTokens}from"../chunk-WZ7TGAAT.js";import"../chunk-2OAZYSWJ.js";import"../chunk-BZ5ASXOL.js";export{AddIcon,LayersIcon,MediaIcon,PageIcon as PagesIcon,SitemapIcon,StylesIcon}from"../chunk-6EIVTKZZ.js";
@@ -1,19 +1,21 @@
1
- import { S as SaveWords } from '../words-c-3h9xQQ.js';
2
- import { N as NoticeWords, C as ChromeWords } from '../words-DagJdwIA.js';
3
- import { C as CopyWords } from '../words-C74EUpFr.js';
1
+ import { S as SaveWords } from '../words-BMzV04b1.js';
2
+ import { N as NoticeWords, C as ChromeWords } from '../words-AHHfiaRY.js';
3
+ import { C as CopyWords } from '../words-DBq7vfHy.js';
4
4
  import { D as DragWords } from '../words-BDignMl_.js';
5
5
  import { LockWords } from '../edit-lock/index.js';
6
- import { F as FieldsWords } from '../words-CD3WADyb.js';
6
+ import { F as FieldsWords } from '../words-CzoyDNHm.js';
7
7
  import { N as NodeMenuWords } from '../words-DMG4dYq2.js';
8
- import { S as SettingsBucket } from '../buckets-CuLM47h9.js';
8
+ import { P as PanelWords } from '../words-CJjUKcV5.js';
9
9
  import { P as PickWords } from '../words-is_Vy6hn.js';
10
10
  import { S as StyleClipboardWords } from '../words-CnnHb9jo.js';
11
- import { T as TreeWords } from '../words-N4ebT88_.js';
12
- import '../types-p9j2Fac7.js';
13
- import '../types-Bs_gVkVI.js';
11
+ import { T as TextStylesWords } from '../words-CRYvAiHX.js';
12
+ import { T as TreeWords } from '../words-DgHcY5qB.js';
13
+ import '../types-DGcCsxs8.js';
14
+ import '../types-DWS-s9z-.js';
14
15
  import '../wordFit-D4S36PvB.js';
15
16
  import 'react';
16
17
  import '../markup/index.js';
18
+ import '../buckets-CuLM47h9.js';
17
19
 
18
20
  /**
19
21
  * The easel canvas's own words (`efficient-easel/strings`, 0.95.0). There is
@@ -26,26 +28,6 @@ type CanvasWords = {
26
28
  frame: string;
27
29
  };
28
30
 
29
- /**
30
- * The settings panel's own words (`efficient-easel/strings`, 0.95.0): what
31
- * the tab strip is called, and what each tab SAYS.
32
- *
33
- * A bucket's key (`'Content'`, `'Style'`, …) is an identifier — fields name
34
- * their tab with it and `SETTINGS_BUCKETS` orders them — so it never changes
35
- * with the language. `buckets` is the word drawn for each key.
36
- *
37
- * The panel is hook-free, so nothing here is read from the strings provider:
38
- * `SettingsTabs` takes its name as `ariaLabel` and each tab's word as the
39
- * item's `label`, and `Inspector` (which has hooks) passes both.
40
- */
41
-
42
- type PanelWords = {
43
- /** The tab strip's accessible name. */
44
- settings: string;
45
- /** The word each tab shows, by its key. */
46
- buckets: Record<SettingsBucket, string>;
47
- };
48
-
49
31
  /**
50
32
  * The rail's own words. There is one: what the toolbar is called when the host
51
33
  * does not name it (`ariaLabel`). Every other word on the rail is an item's
@@ -120,6 +102,8 @@ interface EaselStrings {
120
102
  copy: CopyWords;
121
103
  /** `efficient-easel/easel` — the canvas frame's name. */
122
104
  canvas: CanvasWords;
105
+ /** `efficient-easel/text-styles` — the Email styles / Site styles list (E6). */
106
+ textStyles: TextStylesWords;
123
107
  }
124
108
  /** Today's English, word for word. */
125
109
  declare const DEFAULT_EASEL_STRINGS: EaselStrings;
@@ -137,11 +121,5 @@ type DeepPartial<T> = T extends (...args: never[]) => unknown ? T : T extends ob
137
121
  * rather than as nothing. Neither argument is changed.
138
122
  */
139
123
  declare function mergeEaselStrings(defaults: EaselStrings, partial?: DeepPartial<EaselStrings> | null): EaselStrings;
140
- /** @deprecated The name before the Easel rename: `EaselStrings`. */
141
- type EditorStrings = EaselStrings;
142
- /** @deprecated The name before the Easel rename: `DEFAULT_EASEL_STRINGS`. */
143
- declare const DEFAULT_EDITOR_STRINGS: EaselStrings;
144
- /** @deprecated The name before the Easel rename: `mergeEaselStrings`. */
145
- declare const mergeEditorStrings: typeof mergeEaselStrings;
146
124
 
147
- export { type CanvasWords, ChromeWords, CopyWords, DEFAULT_EASEL_STRINGS, DEFAULT_EDITOR_STRINGS, type DeepPartial, DragWords, type EaselStrings, type EditorStrings, FieldsWords, LockWords, NodeMenuWords, NoticeWords, type PanelWords, PickWords, type RailWords, SaveWords, StyleClipboardWords, TreeWords, mergeEaselStrings, mergeEditorStrings };
125
+ export { type CanvasWords, ChromeWords, CopyWords, DEFAULT_EASEL_STRINGS, type DeepPartial, DragWords, type EaselStrings, FieldsWords, LockWords, NodeMenuWords, NoticeWords, PanelWords, PickWords, type RailWords, SaveWords, StyleClipboardWords, TextStylesWords, TreeWords, mergeEaselStrings };
@@ -1 +1 @@
1
- export{DEFAULT_EASEL_STRINGS,DEFAULT_EDITOR_STRINGS,mergeEaselStrings,mergeEditorStrings}from"../chunk-7JTL3P6P.js";import"../chunk-6WY6ZXJG.js";import"../chunk-WK3AFPXY.js";import"../chunk-ZAOM6PFH.js";import"../chunk-AELNNAFM.js";import"../chunk-SUO5627P.js";import"../chunk-H4B72XCJ.js";import"../chunk-7A7O2JWQ.js";import"../chunk-H6DDIBQ4.js";import"../chunk-KDIVA6WD.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-ZT7M24XD.js";import"../chunk-SJQG5ENJ.js";import"../chunk-O2NLQBFX.js";
1
+ export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-SAJUCHOX.js";import"../chunk-M6F6LS3H.js";import"../chunk-6WY6ZXJG.js";import"../chunk-AELNNAFM.js";import"../chunk-3EDSDPIP.js";import"../chunk-TRVZ7C23.js";import"../chunk-WK3AFPXY.js";import"../chunk-H6DDIBQ4.js";import"../chunk-RE4LP46F.js";import"../chunk-ZJEBF4NB.js";import"../chunk-2OAZYSWJ.js";import"../chunk-JQM3V7XQ.js";import"../chunk-ZAOM6PFH.js";import"../chunk-LA54QLP5.js";import"../chunk-HDVD27VB.js";import"../chunk-O2NLQBFX.js";
@@ -1,21 +1,23 @@
1
1
  import { DeepPartial, EaselStrings } from './catalogue.js';
2
- export { CanvasWords, DEFAULT_EASEL_STRINGS, DEFAULT_EDITOR_STRINGS, EditorStrings, PanelWords, RailWords, mergeEaselStrings, mergeEditorStrings } from './catalogue.js';
2
+ export { CanvasWords, DEFAULT_EASEL_STRINGS, RailWords, mergeEaselStrings } from './catalogue.js';
3
3
  import * as react from 'react';
4
4
  import { ReactNode } from 'react';
5
- export { C as ChromeWords, N as NoticeWords } from '../words-DagJdwIA.js';
6
- export { C as CopyWords } from '../words-C74EUpFr.js';
5
+ export { C as ChromeWords, N as NoticeWords } from '../words-AHHfiaRY.js';
6
+ export { C as CopyWords } from '../words-DBq7vfHy.js';
7
7
  export { D as DragWords } from '../words-BDignMl_.js';
8
- export { F as FieldsWords } from '../words-CD3WADyb.js';
8
+ export { F as FieldsWords } from '../words-CzoyDNHm.js';
9
9
  export { LockWords } from '../edit-lock/index.js';
10
10
  export { N as NodeMenuWords } from '../words-DMG4dYq2.js';
11
+ export { P as PanelWords } from '../words-CJjUKcV5.js';
11
12
  export { P as PickWords } from '../words-is_Vy6hn.js';
12
- export { S as SaveWords } from '../words-c-3h9xQQ.js';
13
+ export { S as SaveWords } from '../words-BMzV04b1.js';
13
14
  export { S as StyleClipboardWords } from '../words-CnnHb9jo.js';
14
- export { T as TreeWords } from '../words-N4ebT88_.js';
15
- import '../buckets-CuLM47h9.js';
15
+ export { T as TextStylesWords } from '../words-CRYvAiHX.js';
16
+ export { T as TreeWords } from '../words-DgHcY5qB.js';
16
17
  import '../markup/index.js';
17
- import '../types-p9j2Fac7.js';
18
- import '../types-Bs_gVkVI.js';
18
+ import '../buckets-CuLM47h9.js';
19
+ import '../types-DGcCsxs8.js';
20
+ import '../types-DWS-s9z-.js';
19
21
  import '../wordFit-D4S36PvB.js';
20
22
 
21
23
  interface EaselStringsProviderProps {
@@ -52,13 +54,5 @@ declare function EaselStringsProvider({ value, locale, children }: EaselStringsP
52
54
  declare function useEaselStrings(): EaselStrings;
53
55
  /** The nearest provider's locale, or `'en'`. */
54
56
  declare function useEaselLocale(): string;
55
- /** @deprecated The name before the Easel rename: `EaselStringsProviderProps`. */
56
- type EditorStringsProviderProps = EaselStringsProviderProps;
57
- /** @deprecated The name before the Easel rename: `EaselStringsProvider`. */
58
- declare const EditorStringsProvider: typeof EaselStringsProvider;
59
- /** @deprecated The name before the Easel rename: `useEaselStrings`. */
60
- declare const useEditorStrings: typeof useEaselStrings;
61
- /** @deprecated The name before the Easel rename: `useEaselLocale`. */
62
- declare const useEditorLocale: typeof useEaselLocale;
63
57
 
64
- export { DeepPartial, EaselStrings, EaselStringsProvider, type EaselStringsProviderProps, EditorStringsProvider, type EditorStringsProviderProps, useEaselLocale, useEaselStrings, useEditorLocale, useEditorStrings };
58
+ export { DeepPartial, EaselStrings, EaselStringsProvider, type EaselStringsProviderProps, useEaselLocale, useEaselStrings };
@@ -1,2 +1,2 @@
1
- import{DEFAULT_EASEL_STRINGS as r,mergeEaselStrings as n}from"../chunk-7JTL3P6P.js";export{DEFAULT_EASEL_STRINGS,DEFAULT_EDITOR_STRINGS,mergeEaselStrings,mergeEditorStrings}from"../chunk-7JTL3P6P.js";import"../chunk-6WY6ZXJG.js";import"../chunk-WK3AFPXY.js";import"../chunk-ZAOM6PFH.js";import"../chunk-AELNNAFM.js";import"../chunk-SUO5627P.js";import"../chunk-H4B72XCJ.js";import"../chunk-7A7O2JWQ.js";import"../chunk-H6DDIBQ4.js";import"../chunk-KDIVA6WD.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-ZT7M24XD.js";import"../chunk-SJQG5ENJ.js";import{stringsContext as t}from"../chunk-MFIRYGHW.js";import"../chunk-O2NLQBFX.js";import{useContext as o,useMemo as i}from"react";import{jsx as c}from"react/jsx-runtime";function s({value:s,locale:m,children:u}){const e=t(),p=o(e),h=p?.strings??r,j=m??p?.locale??"en",k=i(()=>({strings:n(h,s),locale:j}),[h,s,j]);/* @__PURE__ */
2
- return c(e.Provider,{value:k,children:u})}function m(){return o(t())?.strings??r}function u(){return o(t())?.locale??"en"}var e=s,p=m,h=u;export{s as EaselStringsProvider,e as EditorStringsProvider,u as useEaselLocale,m as useEaselStrings,h as useEditorLocale,p as useEditorStrings};
1
+ import{DEFAULT_EASEL_STRINGS as r,mergeEaselStrings as n}from"../chunk-SAJUCHOX.js";export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-SAJUCHOX.js";import"../chunk-M6F6LS3H.js";import"../chunk-6WY6ZXJG.js";import"../chunk-AELNNAFM.js";import"../chunk-3EDSDPIP.js";import"../chunk-TRVZ7C23.js";import"../chunk-WK3AFPXY.js";import"../chunk-H6DDIBQ4.js";import"../chunk-RE4LP46F.js";import"../chunk-ZJEBF4NB.js";import"../chunk-2OAZYSWJ.js";import"../chunk-JQM3V7XQ.js";import"../chunk-ZAOM6PFH.js";import"../chunk-LA54QLP5.js";import"../chunk-HDVD27VB.js";import{stringsContext as o}from"../chunk-MFIRYGHW.js";import"../chunk-O2NLQBFX.js";import{useContext as t,useMemo as c}from"react";import{jsx as i}from"react/jsx-runtime";function s({value:s,locale:u,children:m}){const e=o(),p=t(e),h=p?.strings??r,j=u??p?.locale??"en",k=c(()=>({strings:n(h,s),locale:j}),[h,s,j]);/* @__PURE__ */
2
+ return i(e.Provider,{value:k,children:m})}function u(){return t(o())?.strings??r}function m(){return t(o())?.locale??"en"}export{s as EaselStringsProvider,m as useEaselLocale,u as useEaselStrings};
@@ -1,4 +1,4 @@
1
- import { E as EaselContextMenuItem } from '../types-DO-b0LNj.js';
1
+ import { E as EaselContextMenuItem } from '../types-Djdq6Xkd.js';
2
2
  import { S as StyleClipboardWords } from '../words-CnnHb9jo.js';
3
3
  import 'react';
4
4
 
@@ -1 +1 @@
1
- import{DEFAULT_STYLE_CLIPBOARD_WORDS as t}from"../chunk-6WY6ZXJG.js";import{CopyStyleIcon as e,PasteStyleIcon as n}from"../chunk-PI26YXYD.js";import{jsx as o}from"react/jsx-runtime";var r="__styleKind";function u(t,e){return t[r]=e,t}function c(t,e){return`${t}:${e.map(t=>String(t)).sort().join("|")}`}function i(t){if(!t)return null;const e=t.indexOf(":");if(e<0)return null;const n=t.slice(0,e);return s.has(n)?{control:n,values:t.slice(e+1).split("|")}:null}var s=/* @__PURE__ */new Set(["choice","select","radio"]);function l(t){if(!t||"object"!=typeof t)return null;const e=t;return"string"==typeof e[r]?e[r]:"text"===e.type||"textarea"===e.type||"number"===e.type?e.type:"select"!==e.type&&"radio"!==e.type||!Array.isArray(e.options)?null:c(e.type,e.options.map(t=>t?.value))}function a(t){return null!=t&&""!==t}function p(t,e){let n=t;for(const t of e){if(!n||"object"!=typeof n)return;n=n[t]}return n}function f(t){return void 0===t?t:JSON.parse(JSON.stringify(t))}function d(t,e,n){const[o,...r]=e,u={...t};if(0===r.length)return void 0===n?delete u[o]:u[o]=n,u;const c=u[o],i=d(c&&"object"==typeof c?c:{},r,n);return 0===Object.keys(i).length?delete u[o]:u[o]=i,u}var y=t=>t.join("."),h="editor-shell:style-clipboard",g=null,m=!1,v=/* @__PURE__ */new Set;function S(){try{return"undefined"==typeof sessionStorage?null:sessionStorage}catch{return null}}function b(){if(!m){m=!0;try{const t=S()?.getItem(h);t&&(g=JSON.parse(t))}catch{g=null}}}function k(t){b(),g={scope:t.scope,sourceType:t.type,sourceLabel:t.label,rows:t.rows.map(e=>{const n=p(t.props,e.path);return{path:[...e.path],kind:e.kind,counted:!1!==e.counted,value:a(n)?f(n):void 0}})};try{S()?.setItem(h,JSON.stringify(g))}catch{}return v.forEach(t=>t()),g}function N(t){return b(),g&&g.scope===t?g:null}function j(t){return v.add(t),()=>{v.delete(t)}}function C(){g=null,m=!0;try{S()?.removeItem(h)}catch{}v.forEach(t=>t())}function w(t,e,n){if(t.kind===e.kind)return null!==e.kind||n;const o=i(t.kind),r=i(e.kind);return!(!o||!r||o.control!==r.control)&&(!a(t.value)||r.values.includes(String(t.value)))}function O(t,e){const n=t.sourceType===e.type,o=new Map(t.rows.map(t=>[y(t.path),t]));let r=e.props,u=0,c=!1;for(const t of e.rows){const e=o.get(y(t.path));if(!e)continue;if(!w(e,t,n))continue;const i=p(r,t.path),s=void 0===e.value?void 0:f(e.value);JSON.stringify(a(i)?i:void 0)!==JSON.stringify(s)&&(r=d(r,t.path,s),c=!0),!1!==t.counted&&(u+=1)}return{props:r,pasted:u,changed:c}}function E(e,n,o,r=t){return 0===e.pasted?r.nothing({source:n,target:o}):r.pasted({count:e.pasted,source:n})}var J="⌥⌘C",K="⌥⌘V";function T(r){const u=r.words??t,c=[];return r.canCopy&&c.push({label:u.copy,icon:/* @__PURE__ */o(e,{}),shortcut:"⌥⌘C",onClick:r.onCopy}),r.held&&c.push({label:u.paste({source:r.held.sourceLabel}),icon:/* @__PURE__ */o(n,{}),shortcut:"⌥⌘V",onClick:r.onPaste}),c}function x(t){if(!t.altKey||t.shiftKey||!t.metaKey&&!t.ctrlKey)return null;const e=t.target;return e&&(e.isContentEditable||"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName)?null:"KeyC"===t.code?"copy":"KeyV"===t.code?"paste":null}export{J as COPY_STYLE_SHORTCUT,K as PASTE_STYLE_SHORTCUT,r as STYLE_KIND,c as choiceKind,C as clearStyle,k as copyStyle,l as fieldKind,N as heldStyle,E as pasteMessage,O as planPaste,T as styleMenuItems,x as styleShortcut,j as subscribeStyle,u as withStyleKind};
1
+ import{DEFAULT_STYLE_CLIPBOARD_WORDS as t}from"../chunk-6WY6ZXJG.js";import{CopyStyleIcon as e,PasteStyleIcon as n}from"../chunk-6EIVTKZZ.js";import{jsx as o}from"react/jsx-runtime";var r="__styleKind";function u(t,e){return t[r]=e,t}function c(t,e){return`${t}:${e.map(t=>String(t)).sort().join("|")}`}function i(t){if(!t)return null;const e=t.indexOf(":");if(e<0)return null;const n=t.slice(0,e);return s.has(n)?{control:n,values:t.slice(e+1).split("|")}:null}var s=/* @__PURE__ */new Set(["choice","select","radio"]);function l(t){if(!t||"object"!=typeof t)return null;const e=t;return"string"==typeof e[r]?e[r]:"text"===e.type||"textarea"===e.type||"number"===e.type?e.type:"select"!==e.type&&"radio"!==e.type||!Array.isArray(e.options)?null:c(e.type,e.options.map(t=>t?.value))}function a(t){return null!=t&&""!==t}function p(t,e){let n=t;for(const t of e){if(!n||"object"!=typeof n)return;n=n[t]}return n}function f(t){return void 0===t?t:JSON.parse(JSON.stringify(t))}function d(t,e,n){const[o,...r]=e,u={...t};if(0===r.length)return void 0===n?delete u[o]:u[o]=n,u;const c=u[o],i=d(c&&"object"==typeof c?c:{},r,n);return 0===Object.keys(i).length?delete u[o]:u[o]=i,u}var y=t=>t.join("."),h="editor-shell:style-clipboard",g=null,m=!1,v=/* @__PURE__ */new Set;function S(){try{return"undefined"==typeof sessionStorage?null:sessionStorage}catch{return null}}function b(){if(!m){m=!0;try{const t=S()?.getItem(h);t&&(g=JSON.parse(t))}catch{g=null}}}function k(t){b(),g={scope:t.scope,sourceType:t.type,sourceLabel:t.label,rows:t.rows.map(e=>{const n=p(t.props,e.path);return{path:[...e.path],kind:e.kind,counted:!1!==e.counted,value:a(n)?f(n):void 0}})};try{S()?.setItem(h,JSON.stringify(g))}catch{}return v.forEach(t=>t()),g}function N(t){return b(),g&&g.scope===t?g:null}function j(t){return v.add(t),()=>{v.delete(t)}}function C(){g=null,m=!0;try{S()?.removeItem(h)}catch{}v.forEach(t=>t())}function w(t,e,n){if(t.kind===e.kind)return null!==e.kind||n;const o=i(t.kind),r=i(e.kind);return!(!o||!r||o.control!==r.control)&&(!a(t.value)||r.values.includes(String(t.value)))}function E(t,e){const n=t.sourceType===e.type,o=new Map(t.rows.map(t=>[y(t.path),t]));let r=e.props,u=0,c=!1;for(const t of e.rows){const e=o.get(y(t.path));if(!e)continue;if(!w(e,t,n))continue;const i=p(r,t.path),s=void 0===e.value?void 0:f(e.value);JSON.stringify(a(i)?i:void 0)!==JSON.stringify(s)&&(r=d(r,t.path,s),c=!0),!1!==t.counted&&(u+=1)}return{props:r,pasted:u,changed:c}}function K(e,n,o,r=t){return 0===e.pasted?r.nothing({source:n,target:o}):r.pasted({count:e.pasted,source:n})}var O="⌥⌘C",J="⌥⌘V";function T(r){const u=r.words??t,c=[];return r.canCopy&&c.push({label:u.copy,icon:/* @__PURE__ */o(e,{}),shortcut:"⌥⌘C",onClick:r.onCopy}),r.held&&c.push({label:u.paste({source:r.held.sourceLabel}),icon:/* @__PURE__ */o(n,{}),shortcut:"⌥⌘V",onClick:r.onPaste}),c}function x(t){if(!t.altKey||t.shiftKey||!t.metaKey&&!t.ctrlKey)return null;const e=t.target;return e&&(e.isContentEditable||"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName)?null:"KeyC"===t.code?"copy":"KeyV"===t.code?"paste":null}export{O as COPY_STYLE_SHORTCUT,J as PASTE_STYLE_SHORTCUT,r as STYLE_KIND,c as choiceKind,C as clearStyle,k as copyStyle,l as fieldKind,N as heldStyle,K as pasteMessage,E as planPaste,T as styleMenuItems,x as styleShortcut,j as subscribeStyle,u as withStyleKind};