efficient-easel 26.12.0 → 26.13.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 (57) hide show
  1. package/README.md +12 -0
  2. package/dist/{chunk-P4XLNW3E.js → chunk-6FOXOYXW.js} +1 -1
  3. package/dist/{chunk-7GGNFLHT.js → chunk-BLE3U2GS.js} +1 -1
  4. package/dist/{chunk-Q3VAJMXS.js → chunk-C4TJN6GR.js} +1 -1
  5. package/dist/chunk-CLJ3KXYF.js +5 -0
  6. package/dist/{chunk-BYONFJVQ.js → chunk-CPIWSFGR.js} +2 -2
  7. package/dist/{chunk-IVSPOIOU.js → chunk-DTVOOBD4.js} +1 -1
  8. package/dist/chunk-DX7UGNIP.js +17 -0
  9. package/dist/{chunk-KWGABNNM.js → chunk-FDIGXBUW.js} +1 -1
  10. package/dist/{chunk-STQDOTHF.js → chunk-H4TUOPI7.js} +1 -1
  11. package/dist/chunk-ITRBDUAM.js +19 -0
  12. package/dist/{chunk-CVS3RPO6.js → chunk-JREIRJVH.js} +1 -1
  13. package/dist/{chunk-W2UMJ7WO.js → chunk-KR2JYQLM.js} +8 -8
  14. package/dist/{chunk-TOEJCZUO.js → chunk-MGEXTIZH.js} +1 -1
  15. package/dist/{chunk-QVQ7764L.js → chunk-QPZQFWS6.js} +4 -4
  16. package/dist/chunk-QYQG36CI.js +1 -0
  17. package/dist/{chunk-JYVQ62TL.js → chunk-U4TG43PD.js} +1 -1
  18. package/dist/chunk-XE5LSM3G.js +64 -0
  19. package/dist/chunk-YIZIW6GJ.js +1 -0
  20. package/dist/{chunk-I7NHUVP6.js → chunk-ZWQKRSOI.js} +4 -4
  21. package/dist/easel/index.d.ts +45 -7
  22. package/dist/easel/index.js +1 -1
  23. package/dist/screen/components/AddBlockRow.js +1 -1
  24. package/dist/screen/components/AddSidePanel.js +1 -1
  25. package/dist/screen/components/NodeContextMenu.js +1 -1
  26. package/dist/screen/components/PageEditGuardNotices.js +1 -1
  27. package/dist/screen/components/ScreenChrome.js +1 -1
  28. package/dist/screen/components/ScreenDocumentContext.js +1 -1
  29. package/dist/screen/components/ScreenMount.js +1 -1
  30. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  31. package/dist/screen/components/SectionScreenShell.js +17 -17
  32. package/dist/screen/components/usePartBridge.js +1 -1
  33. package/dist/screen/index.js +1 -1
  34. package/dist/screen/lib/document/block-set-host.js +1 -1
  35. package/dist/screen/lib/document/block-size-fields.js +1 -1
  36. package/dist/screen/lib/document/box-fields.d.ts +13 -6
  37. package/dist/screen/lib/document/box-fields.js +1 -1
  38. package/dist/screen/lib/document/button-fields.js +1 -1
  39. package/dist/screen/lib/document/device-fields.js +1 -1
  40. package/dist/screen/lib/document/image-fields.d.ts +1 -2
  41. package/dist/screen/lib/document/image-fields.js +4 -4
  42. package/dist/screen/lib/document/shadow-fields.js +1 -1
  43. package/dist/screen/lib/document/style-clipboard.js +1 -1
  44. package/dist/screen/lib/document/style-fields.js +1 -1
  45. package/dist/screen/lib/document/use-section-ops.js +1 -1
  46. package/dist/screen/lib/key-scope.js +1 -1
  47. package/dist/screen/lib/screen-parts.js +1 -1
  48. package/dist/screen/words.d.ts +2 -0
  49. package/dist/screen/words.js +1 -1
  50. package/dist/strings/index.js +2 -2
  51. package/package.json +1 -1
  52. package/dist/chunk-4SYDN43N.js +0 -1
  53. package/dist/chunk-CQVSWONH.js +0 -1
  54. package/dist/chunk-EVYIDHCK.js +0 -19
  55. package/dist/chunk-UMRYCN7L.js +0 -16
  56. package/dist/chunk-UR7YBZJR.js +0 -5
  57. package/dist/chunk-YQXHRQXH.js +0 -64
@@ -1 +1 @@
1
- import{buttonFieldSet as e}from"../../../chunk-4SYDN43N.js";import"../../../chunk-I7NHUVP6.js";import{boxFieldSet as o}from"../../../chunk-UMRYCN7L.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-PLTTPHK5.js";import{phoneKey as t}from"../../../chunk-E52W3M5I.js";import{foldMetaOf as n}from"../../../chunk-ANPOR6EY.js";import"../../../chunk-EVYIDHCK.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";function s(e){return Object.keys(e).filter(o=>{return t=e[o],!(null!==n(t));var t})}function r(e,o){const t=o.off??{},s=o.keys??{};for(const[e,o]of Object.entries(t))if(!o.trim())throw new Error(`blockSetFor: off row "${e}" needs a reason.`);for(const o of[...Object.keys(t),...Object.keys(s)]){if(!Object.hasOwn(e,o))throw new Error(`blockSetFor: the set has no row "${o}".`);if(Object.hasOwn(t,o)&&Object.hasOwn(s,o))throw new Error(`blockSetFor: row "${o}" is both off and renamed.`)}const r={};let i=[];for(const[o,c]of Object.entries(e)){const a=n(c);if(a){i=i.filter(([,e])=>n(e).level<a.level),i.push([o,c]);continue}if(Object.hasOwn(t,o))continue;for(const[e,o]of i)r[e]=o;i=[];const u=Object.hasOwn(s,o)?s[o]:o;if(Object.hasOwn(r,u)||u!==o&&Object.hasOwn(e,u))throw new Error(`blockSetFor: renamed key "${u}" is already a row.`);r[u]=c}return r}function i(e){const o=e.build();r(o,e.email),r(o,e.website);const t=s(o),n=e=>new Set(Object.keys(e.off??{})),i=n(e.email),c=n(e.website),a=[];for(const o of t)i.has(o)&&!c.has(o)&&a.push({row:o,only:"website",reason:e.email.off[o]}),c.has(o)&&!i.has(o)&&a.push({row:o,only:"email",reason:e.website.off[o]});return a}var c=["button","image","box","divider","logo","text","section","social"],a={useFill:()=>"",useText:()=>"",useBorder:()=>({width:0,color:""}),useCorners:()=>0},u={button:{build:()=>e({follows:a,padding:{fallback:{}}}),email:{editor:"email"},website:{editor:"website"}},box:{build:()=>o(),email:{editor:"email",keys:{gap:"itemGap"},off:Object.fromEntries(["sectionPaddingTop","sectionPaddingRight","sectionPaddingBottom","sectionPaddingLeft"].map(e=>[t(e),"email: a Banner Box draws in the desktop view only (admin inBannerFields)"]))},website:{editor:"website"}}},h={button:"the set is in easel; admin (A-B) and web-builder (W-B) still build their own rows (plan group 1)",image:"no easel set yet (plan group 2)",box:"the set is in easel and the email Banner Box imports it; the website Flex builds its own rows (plan group 3)",divider:"no easel set yet (plan group 4)",logo:"no easel set yet (plan group 5)",text:"no easel set yet (plan group 6)",section:"no easel set yet (plan group 7)",social:"no easel set yet (plan group 7)"};export{c as BLOCK_KINDS,h as BLOCK_SETS_STILL_TWO_COPIES,u as BLOCK_SET_PAIRS,i as blockSetDifferences,r as blockSetFor,s as blockSetRowKeys};
1
+ import{buttonFieldSet as e}from"../../../chunk-YIZIW6GJ.js";import"../../../chunk-ZWQKRSOI.js";import{boxFieldSet as o}from"../../../chunk-DX7UGNIP.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-BLE3U2GS.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-C4TJN6GR.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-PLTTPHK5.js";import{phoneKey as t}from"../../../chunk-E52W3M5I.js";import{foldMetaOf as n}from"../../../chunk-ANPOR6EY.js";import"../../../chunk-ITRBDUAM.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";function s(e){return Object.keys(e).filter(o=>{return t=e[o],!(null!==n(t));var t})}function r(e,o){const t=o.off??{},s=o.keys??{};for(const[e,o]of Object.entries(t))if(!o.trim())throw new Error(`blockSetFor: off row "${e}" needs a reason.`);for(const o of[...Object.keys(t),...Object.keys(s)]){if(!Object.hasOwn(e,o))throw new Error(`blockSetFor: the set has no row "${o}".`);if(Object.hasOwn(t,o)&&Object.hasOwn(s,o))throw new Error(`blockSetFor: row "${o}" is both off and renamed.`)}const r={};let i=[];for(const[o,c]of Object.entries(e)){const a=n(c);if(a){i=i.filter(([,e])=>n(e).level<a.level),i.push([o,c]);continue}if(Object.hasOwn(t,o))continue;for(const[e,o]of i)r[e]=o;i=[];const u=Object.hasOwn(s,o)?s[o]:o;if(Object.hasOwn(r,u)||u!==o&&Object.hasOwn(e,u))throw new Error(`blockSetFor: renamed key "${u}" is already a row.`);r[u]=c}return r}function i(e){const o=e.build();r(o,e.email),r(o,e.website);const t=s(o),n=e=>new Set(Object.keys(e.off??{})),i=n(e.email),c=n(e.website),a=[];for(const o of t)i.has(o)&&!c.has(o)&&a.push({row:o,only:"website",reason:e.email.off[o]}),c.has(o)&&!i.has(o)&&a.push({row:o,only:"email",reason:e.website.off[o]});return a}var c=["button","image","box","divider","logo","text","section","social"],a={useFill:()=>"",useText:()=>"",useBorder:()=>({width:0,color:""}),useCorners:()=>0},u={button:{build:()=>e({follows:a,padding:{fallback:{}}}),email:{editor:"email"},website:{editor:"website"}},box:{build:()=>o(),email:{editor:"email",keys:{gap:"itemGap"},off:Object.fromEntries(["sectionPaddingTop","sectionPaddingRight","sectionPaddingBottom","sectionPaddingLeft"].map(e=>[t(e),"email: a Banner Box draws in the desktop view only (admin inBannerFields)"]))},website:{editor:"website"}}},h={button:"the set is in easel; admin (A-B) and web-builder (W-B) still build their own rows (plan group 1)",image:"no easel set yet (plan group 2)",box:"the set is in easel and the email Banner Box imports it; the website Flex builds its own rows (plan group 3)",divider:"no easel set yet (plan group 4)",logo:"no easel set yet (plan group 5)",text:"no easel set yet (plan group 6)",section:"no easel set yet (plan group 7)",social:"no easel set yet (plan group 7)"};export{c as BLOCK_KINDS,h as BLOCK_SETS_STILL_TWO_COPIES,u as BLOCK_SET_PAIRS,i as blockSetDifferences,r as blockSetFor,s as blockSetRowKeys};
@@ -1 +1 @@
1
- import{noGlyph as t,boxFieldBuilders as i,PHONE_KEY_ACCESS as n,group as o,phoneTwinFields as r}from"../../../chunk-UMRYCN7L.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import{BLOCK_WIDTH_LIMIT as h,BLOCK_FIXED_WIDTH as m,BLOCK_WIDTH_FIT_POINTS as e,BLOCK_WIDTH_FIT_DEFAULT as s,TEXT_FIT_MIN_FONT as c,TEXT_FIT_POINTS as p}from"../../../chunk-XH4BP64C.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-EVYIDHCK.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";import{WidthIcon as u,TextLinesIcon as k}from"efficient-shell/icons/efficient";import{jsx as j}from"react/jsx-runtime";var d=t("a value or limit row under the Width and text-fit choices; drawn bare in the approved design (owner 2026-10-29, c25 row 4); no shell glyph names a min, max or fixed width");function a(t={}){const a=i(t.say),F=t.phone??n,x=(t,i)=>r(t,i,F),f=(t,i,n,o,r)=>x(t,a.slider(i,d,n.min,n.max,n.step,o,"px",{clear:r?{hint:o,emptyLabel:r}:{hint:o}}));return{size:{_gBlockSize:o("Size"),...x("widthFit",a.segmented("Width",/* @__PURE__ */j(u,{}),[...e],s)),...f("width","Fixed width",m,m.fallback),...f("minWidth","Min width",h,h.min,"None"),...f("maxWidth","Content width",h,h.min,"None")},text:t.textFit?{_gText:o("Text"),...x("textFit",a.segmented("When the text does not fit",/* @__PURE__ */j(k,{}),[...p],t.textFit)),...f("minFont","Min font size",c,c.fallback)}:{}}}export{a as blockSizeFieldSet};
1
+ import{noGlyph as t,boxFieldBuilders as i,PHONE_KEY_ACCESS as n,group as o,phoneTwinFields as r}from"../../../chunk-DX7UGNIP.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-BLE3U2GS.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-C4TJN6GR.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import{BLOCK_WIDTH_LIMIT as h,BLOCK_FIXED_WIDTH as m,BLOCK_WIDTH_FIT_POINTS as e,BLOCK_WIDTH_FIT_DEFAULT as s,TEXT_FIT_MIN_FONT as c,TEXT_FIT_POINTS as p}from"../../../chunk-XH4BP64C.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-ITRBDUAM.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";import{WidthIcon as u,TextLinesIcon as k}from"efficient-shell/icons/efficient";import{jsx as j}from"react/jsx-runtime";var d=t("a value or limit row under the Width and text-fit choices; drawn bare in the approved design (owner 2026-10-29, c25 row 4); no shell glyph names a min, max or fixed width");function a(t={}){const a=i(t.say),F=t.phone??n,x=(t,i)=>r(t,i,F),f=(t,i,n,o,r)=>x(t,a.slider(i,d,n.min,n.max,n.step,o,"px",{clear:r?{hint:o,emptyLabel:r}:{hint:o}}));return{size:{_gBlockSize:o("Size"),...x("widthFit",a.segmented("Width",/* @__PURE__ */j(u,{}),[...e],s)),...f("width","Fixed width",m,m.fallback),...f("minWidth","Min width",h,h.min,"None"),...f("maxWidth","Content width",h,h.min,"None")},text:t.textFit?{_gText:o("Text"),...x("textFit",a.segmented("When the text does not fit",/* @__PURE__ */j(k,{}),[...p],t.textFit)),...f("minFont","Min font size",c,c.fallback)}:{}}}export{a as blockSizeFieldSet};
@@ -255,9 +255,9 @@ declare function useAccessValue(access: ValueAccess, key: string, own?: {
255
255
  /**
256
256
  * ONE write of several values through `access` on the selected node: one
257
257
  * merged patch, one `onChangeMany`. A click that changes two values (a Reset
258
- * that clears a colour and its opacity) must use this, never two writes: a
259
- * write awaits the node's resolver before it lands, so a second write built
260
- * on the node from before the first puts back what the first changed.
258
+ * that clears a colour and its opacity) must use this, so it is one write and
259
+ * one undo step. The patch is built from the latest node when the write runs, so
260
+ * a row that shares a stored object with another row does not put back its value.
261
261
  * Without an editor above it writes nothing.
262
262
  */
263
263
  declare function useAccessPatch(access: ValueAccess): (changes: readonly (readonly [string, unknown])[]) => void;
@@ -393,6 +393,13 @@ interface SliderControlProps {
393
393
  /** The ↺'s words (`useEaselStrings().panel`). English when left out. */
394
394
  resetWords?: SettingsDefaultResetProps['words'];
395
395
  }
396
+ /** What {@link boxFieldBuilders}' `select` is told past its fallback (a bare
397
+ * string is the `note`). */
398
+ interface SelectOptions {
399
+ note?: string;
400
+ /** As {@link SegmentedOptions.phoneRest}. */
401
+ phoneRest?: (desktop: unknown) => string | undefined;
402
+ }
396
403
  /** What {@link boxFieldBuilders}' `segmented` is told past its options. */
397
404
  interface SegmentedOptions<V> {
398
405
  /**
@@ -618,7 +625,7 @@ declare function SliderControl({ caption, label, value, hint, emptyLabel, ...res
618
625
  */
619
626
  declare function boxFieldBuilders(say?: BoxFieldSay): {
620
627
  slider: (label: string, icon: ReactElement, min: number, max: number, step: number, fallback: number, suffix?: string, actionOrOptions?: SliderAction | SliderOptions) => BoxField<number>;
621
- select: (label: string, icon: ReactElement, options: readonly SelectOption[], fallback: string, note?: string) => SelectField;
628
+ select: (label: string, icon: ReactElement, options: readonly SelectOption[], fallback: string, more?: string | SelectOptions) => SelectField;
622
629
  Segmented: <V = string>(props: Parameters<typeof segmentedStrip<V>>[1]) => react.JSX.Element;
623
630
  segmented: {
624
631
  (label: string, icon: ReactElement, options: (string | {
@@ -673,7 +680,7 @@ declare function boxFieldBuilders(say?: BoxFieldSay): {
673
680
  };
674
681
  /** The builders in English (no host's `say`). */
675
682
  declare const slider: (label: string, icon: ReactElement, min: number, max: number, step: number, fallback: number, suffix?: string, actionOrOptions?: SliderAction | SliderOptions) => BoxField<number>;
676
- declare const select: (label: string, icon: ReactElement, options: readonly SelectOption[], fallback: string, note?: string) => SelectField;
683
+ declare const select: (label: string, icon: ReactElement, options: readonly SelectOption[], fallback: string, more?: string | SelectOptions) => SelectField;
677
684
  declare const Segmented: <V = string>(props: Parameters<typeof segmentedStrip<V>>[1]) => react.JSX.Element;
678
685
  declare const segmented: {
679
686
  (label: string, icon: ReactElement, options: (string | {
@@ -726,4 +733,4 @@ declare const boxFieldSet: (opts?: BoxFieldSetOptions) => {
726
733
  _gNudge: BoxField<undefined>;
727
734
  };
728
735
 
729
- export { ANCHOR_LABELS, type AlignmentOptions, AlignmentStrip, BOX_ALIGN_POINTS, BOX_DIRECTIONS, BOX_DIRECTION_LABEL, BOX_GAP, BOX_JUSTIFY_POINTS, BOX_NUDGE_LIMIT, BOX_PLACEMENTS, BOX_PLACEMENT_DEFAULT, BOX_WIDTH, BOX_WRAP_LABEL, BOX_WRAP_POINTS, type BlockAlignmentOptions, BlockAlignmentStrip, type BoxAlign, type BoxField, type BoxFieldRenderProps, type BoxFieldSay, type BoxFieldSetOptions, type BoxFlexRowOptions, type BoxJustify, type BoxPlacement, type BoxWrap, type DirectionFieldOptions, FLAT_ACCESS, type GapFieldOptions, OPEN_PLACEMENT_POINTS, PHONE_KEY_ACCESS, type PhoneTwinOptions, type PhoneValueAccess, type PlacementFieldOptions, PlacementGridView, type PlacementPoint, type PositionOptions, type RowRead, SIDE_PAD_KEYS, Segmented, type SegmentedOptions, type SelectField, type SelectOption, type SidesPaddingOptions, type SliderAction, type SliderClear, SliderControl, type SliderControlProps, type SliderOptions, type ValueAccess, alignmentField, alignmentFields, blockAlignmentField, blockAlignmentFields, boxAlignField, boxFieldBuilders, boxFieldSet, boxJustifyField, boxWrapField, directionField, gapField, group, iconOf, isNoGlyph, noGlyph, normaliseBoxPlacement, objectAccess, onDesktopWords, phoneObjectAccess, phoneTwinFields, placementField, positionFields, positionPatch, section, segmented, select, sharedStyleKinds, sidesFromObject, sidesPaddingFields, sidesPaddingPatch, sidesToObject, slider, useAccessPatch, useAccessValue };
736
+ export { ANCHOR_LABELS, type AlignmentOptions, AlignmentStrip, BOX_ALIGN_POINTS, BOX_DIRECTIONS, BOX_DIRECTION_LABEL, BOX_GAP, BOX_JUSTIFY_POINTS, BOX_NUDGE_LIMIT, BOX_PLACEMENTS, BOX_PLACEMENT_DEFAULT, BOX_WIDTH, BOX_WRAP_LABEL, BOX_WRAP_POINTS, type BlockAlignmentOptions, BlockAlignmentStrip, type BoxAlign, type BoxField, type BoxFieldRenderProps, type BoxFieldSay, type BoxFieldSetOptions, type BoxFlexRowOptions, type BoxJustify, type BoxPlacement, type BoxWrap, type DirectionFieldOptions, FLAT_ACCESS, type GapFieldOptions, OPEN_PLACEMENT_POINTS, PHONE_KEY_ACCESS, type PhoneTwinOptions, type PhoneValueAccess, type PlacementFieldOptions, PlacementGridView, type PlacementPoint, type PositionOptions, type RowRead, SIDE_PAD_KEYS, Segmented, type SegmentedOptions, type SelectField, type SelectOption, type SelectOptions, type SidesPaddingOptions, type SliderAction, type SliderClear, SliderControl, type SliderControlProps, type SliderOptions, type ValueAccess, alignmentField, alignmentFields, blockAlignmentField, blockAlignmentFields, boxAlignField, boxFieldBuilders, boxFieldSet, boxJustifyField, boxWrapField, directionField, gapField, group, iconOf, isNoGlyph, noGlyph, normaliseBoxPlacement, objectAccess, onDesktopWords, phoneObjectAccess, phoneTwinFields, placementField, positionFields, positionPatch, section, segmented, select, sharedStyleKinds, sidesFromObject, sidesPaddingFields, sidesPaddingPatch, sidesToObject, slider, useAccessPatch, useAccessValue };
@@ -1 +1 @@
1
- export{ANCHOR_LABELS,AlignmentStrip,BOX_ALIGN_POINTS,BOX_DIRECTIONS,BOX_DIRECTION_LABEL,BOX_GAP,BOX_JUSTIFY_POINTS,BOX_NUDGE_LIMIT,BOX_PLACEMENTS,BOX_PLACEMENT_DEFAULT,BOX_WIDTH,BOX_WRAP_LABEL,BOX_WRAP_POINTS,BlockAlignmentStrip,FLAT_ACCESS,OPEN_PLACEMENT_POINTS,PHONE_KEY_ACCESS,PlacementGridView,SIDE_PAD_KEYS,Segmented,SliderControl,alignmentField,alignmentFields,blockAlignmentField,blockAlignmentFields,boxAlignField,boxFieldBuilders,boxFieldSet,boxJustifyField,boxWrapField,directionField,gapField,group,iconOf,isNoGlyph,noGlyph,normaliseBoxPlacement,objectAccess,onDesktopWords,phoneObjectAccess,phoneTwinFields,placementField,positionFields,positionPatch,section,segmented,select,sharedStyleKinds,sidesFromObject,sidesPaddingFields,sidesPaddingPatch,sidesToObject,slider,useAccessPatch,useAccessValue}from"../../../chunk-UMRYCN7L.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";export{FIELD_DESCRIPTION_MARKER,describedAs}from"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-EVYIDHCK.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
1
+ export{ANCHOR_LABELS,AlignmentStrip,BOX_ALIGN_POINTS,BOX_DIRECTIONS,BOX_DIRECTION_LABEL,BOX_GAP,BOX_JUSTIFY_POINTS,BOX_NUDGE_LIMIT,BOX_PLACEMENTS,BOX_PLACEMENT_DEFAULT,BOX_WIDTH,BOX_WRAP_LABEL,BOX_WRAP_POINTS,BlockAlignmentStrip,FLAT_ACCESS,OPEN_PLACEMENT_POINTS,PHONE_KEY_ACCESS,PlacementGridView,SIDE_PAD_KEYS,Segmented,SliderControl,alignmentField,alignmentFields,blockAlignmentField,blockAlignmentFields,boxAlignField,boxFieldBuilders,boxFieldSet,boxJustifyField,boxWrapField,directionField,gapField,group,iconOf,isNoGlyph,noGlyph,normaliseBoxPlacement,objectAccess,onDesktopWords,phoneObjectAccess,phoneTwinFields,placementField,positionFields,positionPatch,section,segmented,select,sharedStyleKinds,sidesFromObject,sidesPaddingFields,sidesPaddingPatch,sidesToObject,slider,useAccessPatch,useAccessValue}from"../../../chunk-DX7UGNIP.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-BLE3U2GS.js";import"../../../chunk-22I55W37.js";export{FIELD_DESCRIPTION_MARKER,describedAs}from"../../../chunk-LX23TCTP.js";import"../../../chunk-C4TJN6GR.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-ITRBDUAM.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
@@ -1 +1 @@
1
- export{buttonFieldSet}from"../../../chunk-4SYDN43N.js";import"../../../chunk-I7NHUVP6.js";import"../../../chunk-UMRYCN7L.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";export{BUTTON_PAD_KEYS,BUTTON_STYLE_KEYS}from"../../../chunk-PLTTPHK5.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-EVYIDHCK.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
1
+ export{buttonFieldSet}from"../../../chunk-YIZIW6GJ.js";import"../../../chunk-ZWQKRSOI.js";import"../../../chunk-DX7UGNIP.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-BLE3U2GS.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-C4TJN6GR.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";export{BUTTON_PAD_KEYS,BUTTON_STYLE_KEYS}from"../../../chunk-PLTTPHK5.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-ITRBDUAM.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
@@ -1 +1 @@
1
- export{DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-Q3VAJMXS.js";export{DEVICE_FIELD_MARKER,deviceMetaOf}from"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";
1
+ export{DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-BLE3U2GS.js";import"../../../chunk-22I55W37.js";import"../../../chunk-C4TJN6GR.js";export{DEVICE_FIELD_MARKER,deviceMetaOf}from"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";
@@ -48,8 +48,7 @@ import './text-control-kinds.js';
48
48
  * key of the view it is dragged in — the desktop key, or in the phone view
49
49
  * its phone twin (`phoneKey`), which ↺ clears back to the desktop point.
50
50
  * - `frameKey`: a picked video's own still. The video and its still go in ONE
51
- * change: two writes race, and the second is built on the node from before
52
- * the first, which is then lost.
51
+ * change, so they are one write and one undo step.
53
52
  * - The template note: a document that cannot hold media
54
53
  * (`capabilities.mediaEditing` false, a website template) draws a note in
55
54
  * place of the box, so no media can be chosen against a template.
@@ -1,5 +1,5 @@
1
- import{SettingsDefaultReset as e}from"../../../chunk-2T22IY3J.js";import{ScreenDocumentContext as n}from"../../../chunk-BYONFJVQ.js";import"../../../chunk-QZJKWKGH.js";import"../../../chunk-ERR437B5.js";import{requestMediaPick as o}from"../../../chunk-JIP5JNRB.js";import"../../../chunk-GR3XRILS.js";import"../../../chunk-RLBXE4EU.js";import"../../../chunk-6ATIYLUL.js";import"../../../chunk-KO47WAWR.js";import"../../../chunk-NQW6XCAY.js";import"../../../chunk-LOMEH6DG.js";import"../../../chunk-KCOBHPN6.js";import"../../../chunk-NCXYC7WI.js";import"../../../chunk-YM4UEGBV.js";import"../../../chunk-SNF5764Q.js";import{useEaselHost as t}from"../../../chunk-LX23TCTP.js";import{DEFAULT_IMAGE_ROW_WORDS as r}from"../../../chunk-Q3VAJMXS.js";import{phoneKey as i}from"../../../chunk-E52W3M5I.js";import{MEDIA_FIELD_MARKER as c}from"../../../chunk-ANPOR6EY.js";import{useSelectedHost as s}from"../../../chunk-EVYIDHCK.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import{DEFAULT_PANEL_WORDS as a}from"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-NDRZP6YR.js";import"../../../chunk-H6DDIBQ4.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import{SettingsField as m}from"../../../chunk-MIX7EGRG.js";import"../../../chunk-YYD257TD.js";import"../../../chunk-RE4LP46F.js";import{useWords as l}from"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import{usePreviewDevice as u}from"../../../chunk-BSPCSC45.js";import{useContext as p,useState as h}from"react";import{FOCAL_DEFAULT as f}from"efficient-shell/format";import{MediaUploadField as k,Button as d,Input as j}from"efficient-shell/ui";import{jsx as g,jsxs as v}from"react/jsx-runtime";function C(e){return"string"==typeof e?e:e&&"object"==typeof e&&"string"==typeof e.src?e.src:""}function y({src:e,onChange:n,tidy:o,name:t}){const[r,i]=h(null),c=!r||e!==r.text&&e!==r.from?e:r.text;/* @__PURE__ */
2
- return g(j,{size:"md",type:"url",inputMode:"url",autoComplete:"off",spellCheck:!1,value:c,placeholder:"https://…","aria-label":t,onChange:o=>{const t=o.target.value;i(n=>({text:t,from:!n||e!==n.text&&e!==n.from?e:n.from})),n(t)},onBlur:e=>{const t=e.target.value,r=o?o(t):t;r!==t&&n(r),i(null)},onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur()}})}function R({label:c,icon:j,hint:R,value:E,onChange:B,name:K,readOnly:b,canPick:P=!0,kind:F="image",accept:M,acceptHint:Y,pickOptions:D,maxSizeBytes:L,height:N,placeholder:Q,removeLabel:I,paste:O,focusKey:S,focusWhen:T,frameKey:H,note:w}){const W=l("imageRow",r),X=l("panel",a),x=t(),G=s(),J=p(n),Z="video"===F,A=function(e,n){const o=s(),t="mobile"===u();if(!e||!o)return null;const r=o.values??{};if(n&&!n(r))return null;const c="string"==typeof r[e]&&r[e]?String(r[e]):f,a=i(e),m="string"==typeof r[a]&&r[a]?String(r[a]):void 0;return{phone:t,desktop:c,own:m,focus:t?m??c:c,set:n=>o.onChange(t?a:e,n),clear:()=>o.onChange(a,void 0)}}(Z?void 0:S,T),[U,V]=h(!1),z=!0===b||!0===G?.readOnly,q=P&&!z;if(J&&!J.capabilities.mediaEditing)/* @__PURE__ */
3
- return g(m,{label:c,icon:j,hint:R,children:/* @__PURE__ */g("div",{className:"es-image-row-note",children:Z?W.templateVideo:W.template})});const $=H&&K?{video:K,frame:H}:null,_=$?e=>e?B(e):G?.onChangeMany({[$.video]:"",[$.frame]:""}):B,ee=$?e=>G?.onChangeMany({[$.video]:e,[$.frame]:""}):B,ne=C(E),oe=A?.phone&&ne?/* @__PURE__ */g(e,{words:X,label:W.focus,changed:Boolean(A.own),detail:W.onDesktop(A.desktop),onReset:A.clear,disabled:z}):void 0,te=O&&!z&&(O.open||U);/* @__PURE__ */
1
+ import{SettingsDefaultReset as e}from"../../../chunk-2T22IY3J.js";import{ScreenDocumentContext as n}from"../../../chunk-CPIWSFGR.js";import"../../../chunk-QZJKWKGH.js";import"../../../chunk-ERR437B5.js";import{requestMediaPick as o}from"../../../chunk-JIP5JNRB.js";import"../../../chunk-GR3XRILS.js";import"../../../chunk-RLBXE4EU.js";import"../../../chunk-6ATIYLUL.js";import"../../../chunk-KO47WAWR.js";import"../../../chunk-NQW6XCAY.js";import"../../../chunk-LOMEH6DG.js";import"../../../chunk-KCOBHPN6.js";import"../../../chunk-NCXYC7WI.js";import"../../../chunk-YM4UEGBV.js";import"../../../chunk-SNF5764Q.js";import{useEaselHost as t}from"../../../chunk-LX23TCTP.js";import{DEFAULT_IMAGE_ROW_WORDS as r}from"../../../chunk-C4TJN6GR.js";import{phoneKey as i}from"../../../chunk-E52W3M5I.js";import{MEDIA_FIELD_MARKER as c}from"../../../chunk-ANPOR6EY.js";import{useSelectedHost as s}from"../../../chunk-ITRBDUAM.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import{DEFAULT_PANEL_WORDS as a}from"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-NDRZP6YR.js";import"../../../chunk-H6DDIBQ4.js";import"../../../chunk-YYD257TD.js";import"../../../chunk-RE4LP46F.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import{SettingsField as m}from"../../../chunk-MIX7EGRG.js";import{useWords as l}from"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import{usePreviewDevice as u}from"../../../chunk-BSPCSC45.js";import{useContext as p,useState as h}from"react";import{FOCAL_DEFAULT as f}from"efficient-shell/format";import{MediaUploadField as k,Button as d,Input as j}from"efficient-shell/ui";import{jsx as g,jsxs as v}from"react/jsx-runtime";function C(e){return"string"==typeof e?e:e&&"object"==typeof e&&"string"==typeof e.src?e.src:""}function y({src:e,onChange:n,tidy:o,name:t}){const[r,i]=h(null),c=!r||e!==r.text&&e!==r.from?e:r.text;/* @__PURE__ */
2
+ return g(j,{size:"md",type:"url",inputMode:"url",autoComplete:"off",spellCheck:!1,value:c,placeholder:"https://…","aria-label":t,onChange:o=>{const t=o.target.value;i(n=>({text:t,from:!n||e!==n.text&&e!==n.from?e:n.from})),n(t)},onBlur:e=>{const t=e.target.value,r=o?o(t):t;r!==t&&n(r),i(null)},onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur()}})}function R({label:c,icon:j,hint:R,value:E,onChange:B,name:P,readOnly:b,canPick:K=!0,kind:F="image",accept:M,acceptHint:T,pickOptions:D,maxSizeBytes:I,height:L,placeholder:N,removeLabel:Y,paste:S,focusKey:G,focusWhen:O,frameKey:Q,note:W}){const w=l("imageRow",r),H=l("panel",a),x=t(),X=s(),Z=p(n),A="video"===F,J=function(e,n){const o=s(),t="mobile"===u();if(!e||!o)return null;const r=o.values??{};if(n&&!n(r))return null;const c="string"==typeof r[e]&&r[e]?String(r[e]):f,a=i(e),m="string"==typeof r[a]&&r[a]?String(r[a]):void 0;return{phone:t,desktop:c,own:m,focus:t?m??c:c,set:n=>o.onChange(t?a:e,n),clear:()=>o.onChange(a,void 0)}}(A?void 0:G,O),[U,z]=h(!1),V=!0===b||!0===X?.readOnly,q=K&&!V;if(Z&&!Z.capabilities.mediaEditing)/* @__PURE__ */
3
+ return g(m,{label:c,icon:j,hint:R,children:/* @__PURE__ */g("div",{className:"es-image-row-note",children:A?w.templateVideo:w.template})});const $=Q&&P?{video:P,frame:Q}:null,_=$?e=>e?B(e):X?.onChangeMany({[$.video]:"",[$.frame]:""}):B,ee=$?e=>X?.onChangeMany({[$.video]:e,[$.frame]:""}):B,ne=C(E),oe=J?.phone&&ne?/* @__PURE__ */g(e,{words:H,label:w.focus,changed:Boolean(J.own),detail:w.onDesktop(J.desktop),onReset:J.clear,disabled:V}):void 0,te=S&&!V&&(S.open||U);/* @__PURE__ */
4
4
  return g(m,{label:c,icon:j,hint:R,action:oe,children:/* @__PURE__ */v("div",{className:"es-image-row",children:[
5
- /* @__PURE__ */g(k,{value:ne,onChange:_,onPick:e=>{if(q)return $&&!G?Promise.resolve(null):o(x,{accept:M??(Z?"video/*":"image/*"),title:c,...e?{file:e}:{},...D?{options:D}:{}}).then(e=>e&&$?(G?.onChangeMany({[$.video]:e.url,[$.frame]:e.posterUrl??""}),null):e?.url??null)},accept:M??(Z?"video/*":"image/*"),acceptHint:Y,kind:F,maxSizeBytes:L,height:N,placeholder:Q,removeLabel:I,allowReplace:q,allowRemove:!z,disabled:z||!q&&!ne,focusLabel:W.focus,...A&&!z?{focus:A.focus,onFocusChange:A.set}:A?{focus:A.focus}:{}}),w?.(ne),O&&!z?te?/* @__PURE__ */g(y,{src:ne,onChange:ee,tidy:O.tidy,name:W.pasteName}):/* @__PURE__ */g(d,{variant:"link",size:"sm",onClick:()=>V(!0),children:W.pasteLink}):null]})})}function E(e,n,o={}){return{type:"custom",[c]:!0,render:t=>/* @__PURE__ */g(R,{...o,label:e,icon:n,value:t.value,onChange:e=>t.onChange(e),name:t.name,readOnly:t.readOnly})}}export{R as ImageRow,E as imageField,C as imageValueSrc};
5
+ /* @__PURE__ */g(k,{value:ne,onChange:_,onPick:e=>{if(q)return $&&!X?Promise.resolve(null):o(x,{accept:M??(A?"video/*":"image/*"),title:c,...e?{file:e}:{},...D?{options:D}:{}}).then(e=>e&&$?(X?.onChangeMany({[$.video]:e.url,[$.frame]:e.posterUrl??""}),null):e?.url??null)},accept:M??(A?"video/*":"image/*"),acceptHint:T,kind:F,maxSizeBytes:I,height:L,placeholder:N,removeLabel:Y,allowReplace:q,allowRemove:!V,disabled:V||!q&&!ne,focusLabel:w.focus,...J&&!V?{focus:J.focus,onFocusChange:J.set}:J?{focus:J.focus}:{}}),W?.(ne),S&&!V?te?/* @__PURE__ */g(y,{src:ne,onChange:ee,tidy:S.tidy,name:w.pasteName}):/* @__PURE__ */g(d,{variant:"link",size:"sm",onClick:()=>z(!0),children:w.pasteLink}):null]})})}function E(e,n,o={}){return{type:"custom",[c]:!0,render:t=>/* @__PURE__ */g(R,{...o,label:e,icon:n,value:t.value,onChange:e=>t.onChange(e),name:t.name,readOnly:t.readOnly})}}export{R as ImageRow,E as imageField,C as imageValueSrc};
@@ -1,2 +1,2 @@
1
- import{DEFAULT_SHADOW_COLOR as o,DEFAULT_SHADOW as n,shadowValue as r,SHADOWS as i}from"../../../chunk-CRITA6CA.js";export{DEFAULT_SHADOW,DEFAULT_SHADOW_COLOR,SHADOWS,shadowValue}from"../../../chunk-CRITA6CA.js";import{styleFieldBuilders as t}from"../../../chunk-I7NHUVP6.js";import"../../../chunk-UMRYCN7L.js";import"../../../chunk-CLAADE4J.js";import{SettingsDefaultReset as s}from"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-PLTTPHK5.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-EVYIDHCK.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-D4TH4QQR.js";import{DEFAULT_PANEL_WORDS as e}from"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import{SettingsField as p}from"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import{useWords as c}from"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";import{ShadowIcon as h}from"efficient-shell/icons/efficient";import{IconPicker as u}from"efficient-shell/ui";import{jsx as l}from"react/jsx-runtime";var m={none:"None",soft:"Soft",lifted:"Lifted"},a={none:"none",soft:"0 1px 1px rgba(20, 20, 22, 0.10), 0 2px 4px -1px rgba(20, 20, 22, 0.14)",lifted:"0 1px 2px rgba(20, 20, 22, 0.10), 0 4px 7px -2px rgba(20, 20, 22, 0.30)"},k={display:"block",flex:"none",boxSizing:"border-box",width:16,height:11};function j({o:o,say:t,props:j}){const d=c("panel",e),f=o.builtIn??n,b=r(j.value),C=b??f,F=t(o.label);/* @__PURE__ */
1
+ import{DEFAULT_SHADOW_COLOR as o,DEFAULT_SHADOW as n,shadowValue as r,SHADOWS as i}from"../../../chunk-CRITA6CA.js";export{DEFAULT_SHADOW,DEFAULT_SHADOW_COLOR,SHADOWS,shadowValue}from"../../../chunk-CRITA6CA.js";import{styleFieldBuilders as t}from"../../../chunk-ZWQKRSOI.js";import"../../../chunk-DX7UGNIP.js";import"../../../chunk-CLAADE4J.js";import{SettingsDefaultReset as s}from"../../../chunk-2T22IY3J.js";import"../../../chunk-BLE3U2GS.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-C4TJN6GR.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-PLTTPHK5.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-ITRBDUAM.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-D4TH4QQR.js";import{DEFAULT_PANEL_WORDS as e}from"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import{SettingsField as p}from"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import{useWords as c}from"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";import{ShadowIcon as h}from"efficient-shell/icons/efficient";import{IconPicker as u}from"efficient-shell/ui";import{jsx as l}from"react/jsx-runtime";var m={none:"None",soft:"Soft",lifted:"Lifted"},a={none:"none",soft:"0 1px 1px rgba(20, 20, 22, 0.10), 0 2px 4px -1px rgba(20, 20, 22, 0.14)",lifted:"0 1px 2px rgba(20, 20, 22, 0.10), 0 4px 7px -2px rgba(20, 20, 22, 0.30)"},k={display:"block",flex:"none",boxSizing:"border-box",width:16,height:11};function j({o:o,say:t,props:j}){const d=c("panel",e),f=o.builtIn??n,b=r(j.value),C=b??f,F=t(o.label);/* @__PURE__ */
2
2
  return l(p,{label:F,icon:o.icon??/* @__PURE__ */l(h,{}),value:t(m[C]),changed:null!==b,hint:o.hint,action:/* @__PURE__ */l(s,{words:d,label:F,changed:null!==b,detail:t(m[f]),onReset:()=>j.onChange(void 0),disabled:j.readOnly}),children:/* @__PURE__ */l(u,{label:F,value:C,options:i.map(o=>({value:o,label:t(m[o]),icon:/* @__PURE__ */l("span",{"data-shadow-chip":"",className:"border border-line bg-surface",style:{...k,boxShadow:a[o]}})})),onChange:o=>j.onChange(o),disabled:j.readOnly})})}function d(n=o=>o){const{colourField:r}=t(n);return{shadowField:o=>({type:"custom",render:r=>/* @__PURE__ */l(j,{o:o,say:n,props:r})}),shadowColourField:n=>{const i=n.follows??o;return r({key:n.key??"shadowColor",label:n.label,icon:/* @__PURE__ */l(h,{}),hint:n.hint,useFollows:()=>i})}}}var{shadowField:f,shadowColourField:b}=d();export{b as shadowColourField,f as shadowField,d as shadowFieldBuilders};
@@ -1 +1 @@
1
- export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-JYVQ62TL.js";import"../../../chunk-5XL2RXFU.js";import"../../../chunk-3QB2ZQXK.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
1
+ export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-U4TG43PD.js";import"../../../chunk-5XL2RXFU.js";import"../../../chunk-3QB2ZQXK.js";import"../../../chunk-BLE3U2GS.js";import"../../../chunk-22I55W37.js";import"../../../chunk-C4TJN6GR.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
@@ -1 +1 @@
1
- export{BORDER_WIDTH_MAX,CORNER_RADIUS_MAX,borderField,colourField,cornersField,keptByRow,styleFieldBuilders}from"../../../chunk-I7NHUVP6.js";import"../../../chunk-UMRYCN7L.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";export{CORNER_SIDES}from"../../../chunk-PLTTPHK5.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-EVYIDHCK.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
1
+ export{BORDER_WIDTH_MAX,CORNER_RADIUS_MAX,borderField,colourField,cornersField,keptByRow,styleFieldBuilders}from"../../../chunk-ZWQKRSOI.js";import"../../../chunk-DX7UGNIP.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-BLE3U2GS.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-C4TJN6GR.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";export{CORNER_SIDES}from"../../../chunk-PLTTPHK5.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-ITRBDUAM.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
@@ -1 +1 @@
1
- export{useSectionOps}from"../../../chunk-IVSPOIOU.js";import"../../../chunk-UR7YBZJR.js";import"../../../chunk-NCXYC7WI.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-TCAAOYQY.js";import"../../../chunk-EVYIDHCK.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-WMC6FE3G.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-ZEH6QLBH.js";import"../../../chunk-WHS6Y55E.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-Y2T3JX7K.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-3XECMGXX.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";
1
+ export{useSectionOps}from"../../../chunk-DTVOOBD4.js";import"../../../chunk-CLJ3KXYF.js";import"../../../chunk-NCXYC7WI.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-TCAAOYQY.js";import"../../../chunk-ITRBDUAM.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-WMC6FE3G.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-ZEH6QLBH.js";import"../../../chunk-WHS6Y55E.js";import"../../../chunk-D4TH4QQR.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-Y2T3JX7K.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-3XECMGXX.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";
@@ -1 +1 @@
1
- export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-CVS3RPO6.js";import"../../chunk-LX23TCTP.js";import"../../chunk-EVYIDHCK.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-K53PQAMP.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-JREIRJVH.js";import"../../chunk-LX23TCTP.js";import"../../chunk-ITRBDUAM.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-K53PQAMP.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
@@ -1 +1 @@
1
- export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSelectionMode,isSlotMode,sameInspectorMode,screenSlotsOf,shownChildSlotsOf,shownSlotFieldsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-UR7YBZJR.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-EVYIDHCK.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-WMC6FE3G.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
1
+ export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSelectionMode,isSlotMode,sameInspectorMode,screenSlotsOf,shownChildSlotsOf,shownSlotFieldsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-CLJ3KXYF.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-ITRBDUAM.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-WMC6FE3G.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
@@ -303,6 +303,8 @@ type ScreenWords = {
303
303
  pasteRefused: (v: {
304
304
  name: string;
305
305
  }) => string;
306
+ /** A write landed without its resolver's answer (`WRITE_WAIT_MS`). */
307
+ writeLate: string;
306
308
  /** The Add panel's words (0.105.0). */
307
309
  add: ScreenAddWords;
308
310
  /** A shared section's words: Add's group, the menu rows and the dialogs. */
@@ -1 +1 @@
1
- export{DEFAULT_IMAGE_ROW_WORDS,DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_SAVE_STATUS_WORDS,DEFAULT_SCREEN_SHARED_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-Q3VAJMXS.js";
1
+ export{DEFAULT_IMAGE_ROW_WORDS,DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_SAVE_STATUS_WORDS,DEFAULT_SCREEN_SHARED_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-C4TJN6GR.js";
@@ -1,2 +1,2 @@
1
- import{DEFAULT_TEXT_STYLES_WORDS as o}from"../chunk-OGH6CC3E.js";import{DEFAULT_SCREEN_WORDS as r,DEFAULT_IMAGE_ROW_WORDS as n}from"../chunk-Q3VAJMXS.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as t}from"../chunk-6WY6ZXJG.js";import{DEFAULT_CANVAS_WORDS as c}from"../chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as e}from"../chunk-K56YDHYQ.js";import{DEFAULT_COLOUR_ROW_WORDS as m,DEFAULT_PANEL_WORDS as i}from"../chunk-56ID6FKZ.js";import{DEFAULT_NODE_MENU_WORDS as s}from"../chunk-WK3AFPXY.js";import{DEFAULT_PAGE_COPY_WORDS as u}from"../chunk-CEC5XLN4.js";import{DEFAULT_SAVE_WORDS as f}from"../chunk-H6DDIBQ4.js";import{DEFAULT_COPY_WORDS as p}from"../chunk-PMRN5Z3T.js";import{DEFAULT_FIELDS_WORDS as l}from"../chunk-JACEEVVF.js";import{DEFAULT_CHROME_WORDS as h,DEFAULT_NOTICE_WORDS as j}from"../chunk-AJSDWWJW.js";import{DEFAULT_RAIL_WORDS as a}from"../chunk-2OAZYSWJ.js";import{DEFAULT_LOCK_WORDS as k}from"../chunk-RE4LP46F.js";import{stringsContext as y}from"../chunk-MFIRYGHW.js";import{DEFAULT_DRAG_WORDS as Y}from"../chunk-TQ5Y6S2X.js";import{useContext as C,useMemo as W}from"react";import{jsx as d}from"react/jsx-runtime";var g={notice:j,lock:k,save:f,chrome:h,rail:a,tree:e,panel:i,fields:l,colourRow:m,imageRow:n,drag:Y,menu:s,styleClipboard:t,copy:p,canvas:c,textStyles:o,screen:r,pageCopy:u},v=o=>"object"==typeof o&&null!==o;function D(o,r){const n={};for(const t of Object.keys(o)){const c=o[t],e=r[t];null==e?n[t]=c:v(c)?n[t]=v(e)?D(c,e):c:n[t]=typeof e==typeof c?e:c}return n}function F(o,r){return r?D(o,r):o}function J({value:o,locale:r,children:n}){const t=y(),c=C(t),e=c?.strings??g,m=r??c?.locale??"en",i=W(()=>({strings:F(e,o),locale:m}),[e,o,m]);/* @__PURE__ */
2
- return d(t.Provider,{value:i,children:n})}function S(){return C(y())?.strings??g}function A(){return C(y())?.locale??"en"}export{g as DEFAULT_EASEL_STRINGS,J as EaselStringsProvider,F as mergeEaselStrings,A as useEaselLocale,S as useEaselStrings};
1
+ import{DEFAULT_TEXT_STYLES_WORDS as o}from"../chunk-OGH6CC3E.js";import{DEFAULT_SCREEN_WORDS as r,DEFAULT_IMAGE_ROW_WORDS as n}from"../chunk-C4TJN6GR.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as t}from"../chunk-6WY6ZXJG.js";import{DEFAULT_CANVAS_WORDS as c}from"../chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as e}from"../chunk-K56YDHYQ.js";import{DEFAULT_COLOUR_ROW_WORDS as m,DEFAULT_PANEL_WORDS as i}from"../chunk-56ID6FKZ.js";import{DEFAULT_NODE_MENU_WORDS as s}from"../chunk-WK3AFPXY.js";import{DEFAULT_PAGE_COPY_WORDS as u}from"../chunk-CEC5XLN4.js";import{DEFAULT_SAVE_WORDS as f}from"../chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as p,DEFAULT_NOTICE_WORDS as l}from"../chunk-AJSDWWJW.js";import{DEFAULT_RAIL_WORDS as h}from"../chunk-2OAZYSWJ.js";import{DEFAULT_LOCK_WORDS as j}from"../chunk-RE4LP46F.js";import{DEFAULT_COPY_WORDS as a}from"../chunk-PMRN5Z3T.js";import{DEFAULT_FIELDS_WORDS as k}from"../chunk-JACEEVVF.js";import{stringsContext as y}from"../chunk-MFIRYGHW.js";import{DEFAULT_DRAG_WORDS as C}from"../chunk-TQ5Y6S2X.js";import{useContext as Y,useMemo as W}from"react";import{jsx as d}from"react/jsx-runtime";var g={notice:l,lock:j,save:f,chrome:p,rail:h,tree:e,panel:i,fields:k,colourRow:m,imageRow:n,drag:C,menu:s,styleClipboard:t,copy:a,canvas:c,textStyles:o,screen:r,pageCopy:u},v=o=>"object"==typeof o&&null!==o;function D(o,r){const n={};for(const t of Object.keys(o)){const c=o[t],e=r[t];null==e?n[t]=c:v(c)?n[t]=v(e)?D(c,e):c:n[t]=typeof e==typeof c?e:c}return n}function F(o,r){return r?D(o,r):o}function J({value:o,locale:r,children:n}){const t=y(),c=Y(t),e=c?.strings??g,m=r??c?.locale??"en",i=W(()=>({strings:F(e,o),locale:m}),[e,o,m]);/* @__PURE__ */
2
+ return d(t.Provider,{value:i,children:n})}function R(){return Y(y())?.strings??g}function E(){return Y(y())?.locale??"en"}export{g as DEFAULT_EASEL_STRINGS,J as EaselStringsProvider,F as mergeEaselStrings,E as useEaselLocale,R as useEaselStrings};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-easel",
3
- "version": "26.12.0",
3
+ "version": "26.13.0",
4
4
  "description": "Efficient Easel: the EFFICIENT editors' shared engine and chrome: the saved document as pure functions, the published renderer, and the editor frame, panels, Layers tree, text grammar and type-in-place box. Published as editor-shell up to 0.66.0 and as efficient-editor up to 0.95.0.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -1 +0,0 @@
1
- import{styleFieldBuilders as e,keptByRow as s}from"./chunk-I7NHUVP6.js";import{boxFieldBuilders as o,PHONE_KEY_ACCESS as l,phoneTwinFields as r,section as i}from"./chunk-UMRYCN7L.js";import{deviceField as t}from"./chunk-7GGNFLHT.js";import{BUTTON_STYLE_KEYS as c,BUTTON_PAD_KEYS as n}from"./chunk-PLTTPHK5.js";import{TextColorIcon as u,GroundIcon as d}from"efficient-shell/icons/efficient";import{jsx as f}from"react/jsx-runtime";function a(a){const p=o(a.say),y=e(a.say),F=c,m=a.style,k=a.phone??l;return{...a.padding&&{_dSize:i("Size"),...p.sidesPaddingFields({keys:n,group:!1,...a.padding})},_dDesign:i("Design"),[F.fill]:y.colourField({key:F.fill,access:m,label:"Fill color",icon:/* @__PURE__ */f(d,{}),useFollows:a.follows.useFill,usePresets:a.usePresets,resetTo:a.resetTo,opacity:{key:F.fillOpacity,useUnset:a.follows.useFillOpacity}}),[F.fillOpacity]:s(F.fill),[F.border]:y.borderField({key:F.border,access:m,useFollows:a.follows.useBorder}),[F.text]:y.colourField({key:F.text,access:m,label:"Text color",icon:/* @__PURE__ */f(u,{}),useFollows:a.follows.useText,usePresets:a.usePresets,resetTo:a.resetTo}),[F.corners]:y.cornersField({key:F.corners,access:m,sidesKey:F.cornerSides,useFollows:a.follows.useCorners,useFollowsSides:a.follows.useCornerSides}),[F.cornerSides]:s(F.corners),_dLayout:i("Layout"),...r("align",p.blockAlignmentField({phone:!0},""),k),align:t("desktop",p.blockAlignmentField())}}export{a as buttonFieldSet};
@@ -1 +0,0 @@
1
- import{useSectionOps as o}from"./chunk-IVSPOIOU.js";import{SELECTION_MODE as e}from"./chunk-UR7YBZJR.js";import{decodePartId as r,encodePartId as t}from"./chunk-R4AUZVA3.js";import{useEasel as n}from"./chunk-EVYIDHCK.js";import{usePreviewParts as p}from"./chunk-467WWV4I.js";import{useCallback as d,useEffect as c}from"react";var s=o=>"part"===o.kind;function m({mode:m,setMode:i,onOpenPart:I}){const{getSelectorForId:a}=n(o=>o),u=o(),{setSelectedPartId:f,setSelectHandler:k}=p(),l=d(o=>{const t=r(o);if(!t)return;const{nodeId:n,propKey:p}=t;p?(i(o=>s(o)&&o.nodeId===n&&o.propKey===p?o:{kind:"part",nodeId:n,propKey:p}),I?.(n)):i(o=>"part"===o.kind?e:o)},[i,I]);c(()=>{k(l)},[k,l]);const h=s(m)?t(m.nodeId,m.propKey):null;c(()=>{f(h)},[h,f]);return{selectNode:d(o=>{i(()=>e);const r=a(o);r&&u.select(r)},[i,a,u]),openPartId:h}}export{m as usePartBridge};
@@ -1,19 +0,0 @@
1
- import{findCopy as e,repeatCopyWithWrapper as t}from"./chunk-JQQFB7EZ.js";import{DEFAULT_CANVAS_WORDS as n}from"./chunk-TBY3DFKS.js";import{useResolvedFields as o}from"./chunk-K53PQAMP.js";import{toItemSelector as r,fromItemSelector as l,useNodeOps as i,parentStep as s,clickPickPart as a,clickPick as c}from"./chunk-QTHQPJWA.js";import{selectionBox as u,placeWindow as d,offsetOrigin as p,colorRunOf as f,ColorWindow as h,startCanvasTyping as m,textMap as g,richLayout as v}from"./chunk-HZSZT3BE.js";import{DEFAULT_COPY_WORDS as y}from"./chunk-PMRN5Z3T.js";import{useWords as w}from"./chunk-MFIRYGHW.js";import{CANVAS_TYPABLE_EVENT as b,CANVAS_TYPING_EVENT as k}from"./chunk-TOKMFZPB.js";import{setCanvasNonce as S,related as x,isTypingTarget as C,upsertCanvasStyle as E,removeCanvasStyle as I,WORDS_CLEAR as D,frameRectToHost as A,drawnBox as M}from"./chunk-FR7EEKFF.js";import{queryAllCopies as $}from"./chunk-7UFKEX72.js";import{find as O,ROOT_ID as P,getList as z,remove as R,parseZoneKey as j,move as N,duplicate as V,replaceNode as L,createNode as B,insert as K,normalizeData as Z,createResolveCache as F,slotsOf as T,resolveNodeData as H,ROOT_SLOT as q}from"./chunk-EUFDQ4KL.js";import{topLevelSlotKeys as W,fieldsFrom as Q,drawnBlockCount as Y,defaultsFrom as U}from"./chunk-KXM6YRG2.js";import{createContext as X,useEffect as G,useContext as J,useRef as _,useSyncExternalStore as ee,useState as te,useReducer as ne,createElement as oe,useMemo as re,useCallback as le,useLayoutEffect as ie}from"react";import{jsx as se,jsxs as ae,Fragment as ce}from"react/jsx-runtime";import{createPortal as ue}from"react-dom";import{registerModalEscapeInterceptor as de,FloatingBar as pe,TextToolbar as fe,LinkPicker as he}from"efficient-shell/ui";function me(e){return!["setData","setUi","set"].includes(e.type)}var ge=(e,t,n,o)=>{const r=z(e,t,j(n));return r?.[o]??null},ve=(e,t,n,o,r)=>{const l=ge(e,t,n,o);if(!l)throw new Error(`${r}: nothing at ${n}[${o}]`);return l};function ye(e,t){const{selection:n}=e;return{...e.ui,itemSelector:r(e.data,t,n),selectedSlot:n&&"slot"===n.kind?{parentId:n.parentId,slot:n.slot}:null}}function we(e,t,n){return n?"node"===n.kind?O(e,t,n.id)?n:null:n.parentId===P?z(e,t,n)?n:null:O(e,t,n.parentId)&&z(e,t,n)?n:null:null}function be(e,t,n,o=!1){const{itemSelector:r,selectedSlot:i,...s}=n;let a=e.selection;var c;return"itemSelector"in n&&(a=l(e.data,t,r??null)),"selectedSlot"in n&&(i?a=(c=i)?{kind:"slot",parentId:c.parentId,slot:c.slot}:null:"slot"===a?.kind&&(a=null)),{...e,selection:a,ui:o?s:{...e.ui,...s}}}function ke(e,t,n){const o=Se(e,t,n);if(o===e)return e;const r=we(o.data,n,o.selection);return r===o.selection?o:{...o,selection:r}}function Se(e,t,n){const{data:o}=e;switch(t.type){case"setData":{const n="function"==typeof t.data?t.data(o):t.data;return{...e,data:{...o,...n}}}case"setUi":return be(e,n,"function"==typeof t.ui?t.ui(ye(e,n)):t.ui);case"set":{const r={data:o,ui:ye(e,n)},l="function"==typeof t.state?t.state(r):t.state;let i=l.data?{...e,data:l.data}:e;return l.ui&&(i=be(i,n,l.ui,!0)),i}case"insert":{const r={...j(t.destinationZone),index:t.destinationIndex},l=B(n,t.componentType,{},t.id?{id:t.id}:{});return{...e,data:K(o,n,r,l)}}case"replace":{const r=ve(o,n,t.destinationZone,t.destinationIndex,"replace");if(r.props.id!==t.data.props.id)throw new Error("Can't change the id during a replace action. Use remove and insert for a new node.");return{...e,data:L(o,n,r.props.id,t.data)}}case"replaceRoot":{const n={...o.root,props:{...o.root.props,...t.root.props},readOnly:t.root.readOnly};return{...e,data:{...o,root:n}}}case"duplicate":{const r=ve(o,n,t.sourceZone,t.sourceIndex,"duplicate"),l=V(o,n,r.props.id),i=ge(l,n,t.sourceZone,t.sourceIndex+1);return{...e,data:l,selection:i?{kind:"node",id:i.props.id}:e.selection}}case"reorder":return Se(e,{...t,type:"move",sourceZone:t.destinationZone},n);case"move":{if(t.sourceZone===t.destinationZone&&t.sourceIndex===t.destinationIndex)return e;const r=ge(o,n,t.sourceZone,t.sourceIndex);if(!r)return e;const l={...j(t.destinationZone),index:t.destinationIndex};return{...e,data:N(o,n,r.props.id,l)}}case"remove":{const r=ve(o,n,t.zone,t.index,"remove");return{...e,data:R(o,n,r.props.id)}}default:return e}}var xe={drag:!0,duplicate:!0,delete:!0,edit:!0,insert:!0},Ce={leftSideBarVisible:!0,rightSideBarVisible:!0,arrayState:{},componentList:{},isDragging:!1,previewMode:"edit",viewports:{current:{width:360,height:"auto"},options:[],controlsVisible:!0},field:{focus:null}},Ee=0,Ie=()=>`history-${Ee+=1}`;function De(e){let t=e.config;const n=e.now??(()=>Date.now()),o=e.historyCoalesceMs??250;let i=e.permissions??{};const s=Z(e.data,t);let a=s,c={data:s,selection:null,ui:{...Ce}};if(e.ui){const{itemSelector:n,selectedSlot:o,...r}=e.ui;c={data:s,selection:o?{kind:"slot",...o}:l(s,t,n??null),ui:{...Ce,...r}}}let u=[{core:c,at:-1/0,sealed:!0,id:Ie()}],d=0;const p=e=>{const t=u[d],r=n();!e&&d===u.length-1&&d>0&&!t.sealed&&r-t.at<o?u=[...u.slice(0,d),{...t,core:c,at:r}]:(u=[...u.slice(0,d+1),{core:c,at:r,sealed:e,id:Ie()}],d=u.length-1)},f=/* @__PURE__ */new Set;let h=null,m=null,g=0,v=null,y=!1;const w=()=>{for(const e of[...f])e()},b=()=>{u=[...u.slice(0,d),{...u[d],core:c},...u.slice(d+1)]},k=(t,n)=>{g>0?y=y||n:(n?p(!1):c!==t&&b(),c.data!==t.data&&e.onChange?.(c.data),c!==t&&w())},S=e=>{const n=c;if(c=ke(c,e,t),c===n)return;const o=e.recordHistory??me(e);k(n,o&&c.data!==n.data)},x=t=>{0===g&&(v=c,y=!1),g+=1;try{t()}catch(e){throw g-=1,0===g&&v&&(c=v,v=null),e}if(g-=1,g>0||!v)return;const n=v;v=null,y&&c.data!==n.data?p(!0):c!==n&&b(),c.data!==n.data&&e.onChange?.(c.data),c!==n&&w()},C=e=>{const n=c,o=we(c.data,t,e);var r,l;(r=o,l=c.selection,r===l||r&&l&&r.kind===l.kind&&("node"===r.kind&&"node"===l.kind?r.id===l.id:"slot"===r.kind&&"slot"===l.kind&&r.parentId===l.parentId&&r.slot===l.slot))||(c={...c,selection:o},k(n,!1))},E=t=>{const n=c;d=t,c=u[d].core,c.data!==n.data&&e.onChange?.(c.data),c!==n&&w()},I=()=>(e={})=>{const n=e.root?t.root?.permissions:t.components[e.item?.type??e.type??""]?.permissions;return{...xe,...i,...n}};let D=I();const A=F(),M={resolveCache:A,async resolveAll({trigger:e="load",metadata:n}={}){const o=c.data,r={type:"root",props:{...o.root.props??{}}},l=[...o.content,...Object.values(o.zones??{}).flat()],[i,...s]=await Promise.all([H(r,t,{cache:A,trigger:e,metadata:n}),...l.map(o=>H(o,t,{cache:A,trigger:e,metadata:n}))]);x(()=>{const n=c;let r=c.data;s.forEach((e,n)=>{if(!e.didChange)return;const i=l[n].props.id,s=O(r,t,i)?.node;s&&s===O(o,t,i)?.node&&(r=L(r,t,i,e.node))}),i.didChange&&r.root===o.root&&(r={...r,root:{...r.root,props:i.node.props,readOnly:i.node.readOnly??r.root.readOnly}}),r!==c.data&&("load"===e&&c.data===a&&(a=r),c={...c,data:r,selection:we(r,t,c.selection)},k(n,!1))})},async resolveNode(e,{trigger:n="replace",metadata:o}={}){const r=O(c.data,t,e)?.node;if(!r)return!1;const l=await H(r,t,{cache:A,trigger:n,metadata:o});if(!l.didChange)return!1;let i=!1;return x(()=>{const n=c;if(O(c.data,t,e)?.node!==r)return;const o=L(c.data,t,e,l.node);o!==c.data&&(c={...c,data:o,selection:we(o,t,c.selection)},k(n,!1),i=!0)}),i},get config(){return t},get loaded(){return a},getState(){if(h&&m===c)return h;const e=c,n={data:e.data,ui:ye(e,t)},o="node"===e.selection?.kind?O(e.data,t,e.selection.id)?.node??null:null;return h={appState:n,selection:e.selection,selectedItem:o,config:t,dispatch:S,history:{back:()=>M.undo(),forward:()=>M.redo(),hasPast:d>0,hasFuture:d<u.length-1,histories:u.map(e=>({id:e.id,state:{data:e.core.data,ui:ye(e.core,t)}})),index:d,setHistoryIndex:e=>{e>=0&&e<u.length&&e!==d&&E(e)}},getPermissions:D,getItemById:n=>O(e.data,t,n)?.node,getItemBySelector:n=>function(e,t,n){const[o,r]=(n.zone??"root:default-zone").split(/:(.*)/s);return z(e,t,{parentId:o,slot:r})?.[n.index]}(e.data,t,n),getSelectorForId:n=>{const o=r(e.data,t,{kind:"node",id:n});return o?{index:o.index,zone:o.zone??"root:default-zone"}:void 0}},m=e,h},subscribe:e=>(f.add(e),()=>{f.delete(e)}),dispatch:S,batch:x,group:()=>{const e=d,t=u[e].id;let n=!0;return{close:()=>{if(!n)return;if(n=!1,u[e]?.id!==t)return;if(d<=e+1)return void(d===e+1&&(u=[...u.slice(0,d),{...u[d],sealed:!0},...u.slice(d+1)]));const o=u[d];u=[...u.slice(0,e+1),{...o,sealed:!0},...u.slice(d+1)],d=e+1}}},select:e=>C(e?{kind:"node",id:e}:null),selectSlot:e=>C(e?{kind:"slot",parentId:e.parentId,slot:e.slot}:null),run(e){x(()=>{const n=c,o=void 0===e.select?c.selection:e.select;c={...c,data:e.data,selection:we(e.data,t,o)},k(n,e.data!==n.data)})},load(e,n={}){const o=c,r=Z(e,t);c={...c,data:r,selection:we(r,t,n.selection??c.selection)},a=r,n.keepHistory||(u=[{core:c,at:-1/0,sealed:!0,id:Ie()}],d=0),c!==o&&w()},undo(){d>0&&E(d-1)},redo(){d<u.length-1&&E(d+1)},setPermissions(e){(function(e,t){if(e===t)return!0;const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])})(e,i)||(i=e,D=I(),h=null,w())},setConfig(e){e!==t&&(t=e,D=I(),h=null,w())}};return M}function Ae(e,t,n={}){const o=e=>{if(e.altKey)return;if(!(e.metaKey!==e.ctrlKey))return;const o="KeyZ"===e.code,r="KeyY"===e.code&&!e.shiftKey;(o||r)&&(n.leaveTyping&&C(e.target)||!1!==t.getState?.().getPermissions().edit&&(e.preventDefault(),r||e.shiftKey?t.redo():t.undo()))};return e.addEventListener("keydown",o),()=>e.removeEventListener("keydown",o)}var Me=X(null),$e=X(!0);function Oe({easel:e,hotkeys:t=!0,resolveOnMount:n=!0,children:o}){return G(()=>{n&&e.resolveAll()},[e,n]),G(()=>{if(t&&"undefined"!=typeof document)return Ae(document,e)},[e,t]),/* @__PURE__ */se(Me.Provider,{value:e,children:/* @__PURE__ */se($e.Provider,{value:t,children:o})})}function Pe(){const e=J(Me);if(!e)throw new Error("useEasel: no <EaselProvider> above this component");return e}function ze(e){const t=Pe(),n=_({view:null,selector:null,value:void 0,has:!1}),o=()=>{const o=t.getState(),r=n.current;if(r.has&&r.view===o&&r.selector===e)return r.value;const l=e(o);return r.has&&Object.is(r.value,l)?(n.current={view:o,selector:e,value:r.value,has:!0},r.value):(n.current={view:o,selector:e,value:l,has:!0},l)};return ee(t.subscribe,o,o)}function Re(){return function(e){return ze(e)}}var je=["--es-accent","--es-accent-tint","--es-accent-tint-strong","--es-accent-line","--es-accent-text","--es-accent-ring","--es-accent-shadow","--es-on-accent","--status-success-solid","--elevation-panel"],Ne="host-tokens";function Ve(e,t){const n=function(e){const t=e.ownerDocument.defaultView;if(!t)return"";const n=t.getComputedStyle(e),o=[];for(const e of je){const t=n.getPropertyValue(e).trim();t&&o.push(`${e}: ${t};`)}return o.length?`:root { ${o.join(" ")} }`:""}(e);n?E(t,Ne,n):I(t,Ne)}var Le="data-easel-block",Be="data-easel-dropzone",Ke={},Ze="data-es-mirror",Fe="undefined"==typeof window?G:ie;function Te(e,t,n){for(const e of Array.from(t.head.querySelectorAll(`[${Ze}]`)))e.remove();for(const o of Array.from(e.head.querySelectorAll('style, link[rel="stylesheet"]'))){const e=o.cloneNode(!0);e.setAttribute(Ze,""),n&&e.setAttribute("nonce",n),t.head.appendChild(e)}}function He({children:e,id:t="preview-frame",title:o,className:r,style:l,mirrorStyles:i=!0,onDocument:s,height:a="auto",nonce:c}){const u=w("canvas",n),d=_(null),[p,f]=te(null);return Fe(()=>{const e=d.current,t=p?.ownerDocument.defaultView;if("auto"!==a||!e||!p||!t)return;const n=()=>{e.style.height=`${Math.ceil(p.getBoundingClientRect().height)}px`};n();const o=t.ResizeObserver,r=o?new o(n):null;return r?.observe(p),()=>r?.disconnect()},[p,a]),Fe(()=>{let e=d.current?.contentDocument;if(!e)return;"CSS1Compat"!==e.compatMode&&(e.open(),e.write("<!DOCTYPE html><html><head></head><body></body></html>"),e.close(),e=d.current?.contentDocument??e),e.body||e.documentElement.appendChild(e.createElement("body")),e.body.style.margin="0";const t=e.createElement("div");t.setAttribute("data-easel-entry",""),t.id="frame-root","fill"===a&&t.classList.add("es-frame-fill"),e.body.appendChild(t),S(e,c),f(t),s?.(e);let n=null;const o=d.current?.ownerDocument;if(i&&o){Te(o,e,c);const t=o.defaultView;t&&"MutationObserver"in t&&(n=new t.MutationObserver(()=>Te(o,e,c)),n.observe(o.head,{childList:!0,subtree:!0,characterData:!0}))}let r=null;const l=d.current;if(l&&o){Ve(l,e);const t=o.defaultView;if(t&&"MutationObserver"in t){r=new t.MutationObserver(()=>Ve(l,e)),r.observe(o.head,{childList:!0,subtree:!0,characterData:!0});const n={attributes:!0,attributeFilter:["class","style","data-theme"]};for(const e of[o.documentElement,o.body,l.closest(".es-editor")])e&&r.observe(e,n)}}return()=>{n?.disconnect(),r?.disconnect(),t.remove(),f(null),s?.(null)}},[]),/* @__PURE__ */se("iframe",{ref:d,id:t,title:o??u.frame,className:["es-canvas-frame","fill"===a?"is-fill":"",r??""].filter(Boolean).join(" "),style:l,children:p?ue(e,p):null})}var qe=X(null),We=X(Ke),Qe=[];function Ye({parentId:e,slot:t,className:n,style:o,minEmptyHeight:r=128,minEmptyWidth:l=120}){const i=Pe(),s=ze(n=>z(n.appState.data,i.config,{parentId:e,slot:t})??Qe),a=ze(t=>"node"===t.selection?.kind&&t.selection.id===e&&e!==P),c=ze(n=>"slot"===n.selection?.kind&&n.selection.parentId===e&&n.selection.slot===t),u=J(qe),d=["es-zone"];return s.length&&d.push("has-children"),e===P&&d.push("is-root"),(a||c)&&d.push("is-area-selected"),null!==u&&u===e&&e!==P&&d.push("is-hovering-area"),n&&d.push(n),/* @__PURE__ */se("div",{className:d.join(" "),[Be]:`${e}:${t}`,style:{...o,"--min-empty-height":`${r}px`,"--min-empty-width":`${l}px`},children:s.map(e=>/* @__PURE__ */se(nt,{node:e},e.props.id))})}function Ue(e,t,n,o){const r=re(()=>{const n={};for(const o of W(Q(e)))n[o]=Object.assign(function(e={}){/* @__PURE__ */
2
- return se(Ye,{parentId:t,slot:o,...e})},{blockCount:0});return n},[e,t]);for(const e of Object.keys(r))r[e].blockCount=Y(n[e],o);return r}function Xe(e){return re(()=>function({zone:t,...n}){/* @__PURE__ */
3
- return se(Ye,{parentId:e,slot:t,...n})},[e])}var Ge=["top","bottom","zIndex"];function Je(e,t,n){e.style[t]!==n&&(e.style[t]=n)}function _e(e){const t=function(e){const t=e?.ownerDocument.defaultView?.getComputedStyle(e);if(!t||"sticky"!==t.position)return null;const n=e=>"auto"===e?"":e;return{top:n(t.top),bottom:n(t.bottom),zIndex:n(t.zIndex)}}(function(e){const t=e.ownerDocument.defaultView;let n=null;for(const o of Array.from(e.children))if("none"!==t?.getComputedStyle(o).display){if(n)return null;n=o}return n}(e));Je(e,"position",t?"sticky":"relative");for(const n of Ge)Je(e,n,t?.[n]??"");return!!t}var et="data-es-canvas-relative";function tt(e){e.hasAttribute(et)&&("relative"===e.style.position&&(e.style.position=""),e.removeAttribute(et));const t=e.ownerDocument.defaultView?.getComputedStyle(e).position;return t&&"static"!==t?"sticky"===t:(e.style.position||(e.style.position="relative",e.setAttribute(et,"")),!1)}function nt({node:e}){const t=Pe().config,n=t.components[e.type],o=e.props.id,r=_(null),l=function(e,t){return re(()=>n=>{const o=t.current;o&&o!==n&&(o.removeAttribute(Le),o.removeAttribute("data-easel-dnd")),t.current=n,n&&(n.setAttribute(Le,e),n.setAttribute("data-easel-dnd",e),tt(n))},[e,t])}(o,r),i=_(null),s=!!n?.inline;!function(e,t){const n=_(!1),o=_(()=>{});o.current=()=>{const o=e(),l=n.current;n.current=!!o&&t(o),l!==n.current&&r.current()};const r=_(()=>{});Fe(()=>o.current()),Fe(()=>{const t=e(),l=t?.ownerDocument.defaultView;if(!t||!l)return;const i=()=>o.current();l.addEventListener("resize",i);const s=l.ResizeObserver,a=s?new s(i):null;a?.observe(t);let c=null;return r.current=()=>{c?.disconnect(),c=null;const e=t.ownerDocument.documentElement;n.current&&e&&l.MutationObserver&&(c=new l.MutationObserver(i),c.observe(e,{attributes:!0}))},r.current(),()=>{l.removeEventListener("resize",i),a?.disconnect(),c?.disconnect(),r.current=()=>{}}},[])}(()=>s?r.current:i.current,e=>s?tt(e):_e(e));const a=J(We),c=Ue(n,o,e.props,t.components),u=Xe(o);if(!n?.render)return null;const d=n.render,p={...U(n),...e.props,...c},f={renderDropZone:u,isEditing:!0,dragRef:n.inline?l:null,metadata:{...a,...n.metadata}};return n.inline?/* @__PURE__ */se(d,{...p,editor:f,editMode:!0}):
4
- /* @__PURE__ */se("div",{ref:i,[Le]:o,"data-easel-dnd":o,style:{position:"relative"},children:/* @__PURE__ */se(d,{...p,editor:f,editMode:!0})})}function ot({metadata:e}){const t=ze(e=>e.config),n=ze(e=>e.appState.data.root).props??{},o=t.root?.render,r=Ue(t.root,P,n,t.components),l=Xe(P),i=/* @__PURE__ */se(Ye,{parentId:P,slot:q}),s=o?/* @__PURE__ */se(o,{id:"page-root",...n,...r,editor:{renderDropZone:l,isEditing:!0,dragRef:null,metadata:e??{}},editMode:!0,children:i}):i;/* @__PURE__ */
5
- return se(We.Provider,{value:e??Ke,children:s})}var rt=X(void 0),lt=X(void 0);function it(e,t,n,o){const r=O(e,t,n);return!!r&&(T(r.node,t).length>0||!1===o.whole)}var st=X(void 0),at="data-es-chrome",ct=X(void 0);function ut(e){const t=e?.closest?.(`[${at}]`)??null,n=t?.getAttribute(at);return t&&n?{id:n,element:t}:null}function dt({element:e,clip:t=!1}){const n=_(null),o=ht(n,e?()=>e:null,e),r=J(kt);/* @__PURE__ */
6
- return se("div",{ref:n,"aria-hidden":"true",className:"es-canvas-outline is-hover is-hover-part",style:o?{position:"absolute",top:o.top,left:o.left,width:o.width,height:o.height,clipPath:t?bt(o,r):void 0}:{display:"none"}})}var pt={"--es-words-clear":`${D}px`};function ft({element:e,words:t=!1,clip:n=!1}){const o=_(null),r=ht(o,e?()=>e:null,e),l=J(kt);/* @__PURE__ */
7
- return se("div",{ref:o,"aria-hidden":"true",className:"es-canvas-outline is-selected is-selected-part"+(t?" is-words":""),style:r?{position:"absolute",top:r.top,left:r.left,width:r.width,height:r.height,clipPath:n?bt(r,l):void 0,...pt}:{display:"none"}})}function ht(e,t,n){return gt(e,t?e=>{const n=t(e);return n?[n]:[]}:null,n)[0]??null}var mt=[];function gt(e,t,n){const[o,r]=te(mt),l=_(t);return l.current=t,Fe(()=>{const t=e.current?.ownerDocument,n=t?.defaultView;if(!t||!n||!l.current)return void r(mt);let o=0;const i=()=>{o=0;const n=e.current?.parentElement??null,i=(l.current?l.current(t):[]).map(e=>function(e,t){if(!e||!t)return null;const n=M(e),o=t.getBoundingClientRect();return{top:n.top-o.top,left:n.left-o.left,width:n.width,height:n.height}}(e,n)).filter(e=>null!==e);r(e=>{return(t=e)===(n=i)||t.length===n.length&&t.every((e,t)=>function(e,t){return e===t||!!e&&!!t&&e.top===t.top&&e.left===t.left&&e.width===t.width&&e.height===t.height}(e,n[t]))?e:i.length?i:mt;var t,n})},s=()=>{o||(o=(n.requestAnimationFrame??(e=>n.setTimeout(e,16)))(i))};i();const a="MutationObserver"in n?new n.MutationObserver(s):null;a?.observe(t.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0});const c="ResizeObserver"in n?new n.ResizeObserver(s):null;return c?.observe(t.documentElement),n.addEventListener("resize",s),n.addEventListener("scroll",s,{capture:!0,passive:!0}),()=>{a?.disconnect(),c?.disconnect(),n.removeEventListener("resize",s),n.removeEventListener("scroll",s,{capture:!0}),o&&(n.cancelAnimationFrame??n.clearTimeout)(o)}},[n]),o}var vt=D+2,yt=vt+2,wt=1;function bt(e,t){const n=e.left+e.width,o=e.top+e.height,r=t.map(t=>{const r=t.left+t.width,l=t.top+t.height;if(!(r>e.left-vt&&t.left<n+vt&&l>e.top-vt&&t.top<o+vt))return null;const i=Math.max(t.left<=e.left&&r>e.left?Math.min(t.left,e.left-wt):t.left,e.left-yt)-e.left,s=Math.max(t.top<=e.top&&l>e.top?Math.min(t.top,e.top-wt):t.top,e.top-yt)-e.top,a=Math.min(r>=n&&t.left<n?Math.max(r,n+wt):r,n+yt)-e.left,c=Math.min(l>=o&&t.top<o?Math.max(l,o+wt):l,o+yt)-e.top;return a>i&&c>s?{x:i,y:s,w:a-i,h:c-s}:null}).filter(e=>null!==e);if(!r.length)return;const l=function(e){if(e.length<2)return e;const t=Array.from(new Set(e.flatMap(e=>[e.x,e.x+e.w]))).sort((e,t)=>e-t),n=Array.from(new Set(e.flatMap(e=>[e.y,e.y+e.h]))).sort((e,t)=>e-t),o=[];for(let r=0;r<n.length-1;r++){const l=o=>e.some(e=>e.x<=t[o]&&t[o+1]<=e.x+e.w&&e.y<=n[r]&&n[r+1]<=e.y+e.h);for(let e=0;e<t.length-1;e++){if(!l(e))continue;let i=e+1;for(;i<t.length-1&&l(i);)i++;const s={x:t[e],y:n[r],w:t[i]-t[e],h:n[r+1]-n[r]},a=o.find(e=>e.x===s.x&&e.w===s.w&&e.y+e.h===s.y);a?a.h+=s.h:o.push(s),e=i-1}}return o}(r);return`path(evenodd, "${`M${-yt} ${-yt}h${e.width+2*yt}v${e.height+2*yt}h${-(e.width+2*yt)}z`}${l.map(e=>`M${e.x} ${e.y}h${e.w}v${e.h}h${-e.w}z`).join("")}")`}var kt=X([]);function St({children:e}){const t=_(null),n=J(ct),o=gt(t,n?e=>Array.from(e.querySelectorAll(`[${at}]`)):null,n?1:0);/* @__PURE__ */
8
- return ae("div",{className:"es-canvas-outlines",style:{position:"absolute",top:0,left:0,pointerEvents:"none"},children:[
9
- /* @__PURE__ */se("span",{ref:t,hidden:!0,"aria-hidden":"true"}),
10
- /* @__PURE__ */se(kt.Provider,{value:o,children:e})]})}function xt({id:e,kind:t,overlay:n}){const o=_(null),r=J(lt),l=null!==e&&!0===r?.(e),i=gt(o,e?t=>$(t,`[${Le}="${t.defaultView?.CSS?.escape?t.defaultView.CSS.escape(e):e}"]`):null,e),[s,...a]=i,c=J(kt),u=`es-canvas-outline is-${t}${l?" is-shared":""}`,d=e=>({position:"absolute",top:e.top,left:e.left,width:e.width,height:e.height,clipPath:bt(e,c)}),p=/* @__PURE__ */ae(ce,{children:[
11
- /* @__PURE__ */se("div",{ref:o,"aria-hidden":"true",className:u,style:s?d(s):{display:"none"}}),a.map((e,t)=>/* @__PURE__ */se("div",{"aria-hidden":"true",className:u,style:d(e)},t))]});return n&&e?/* @__PURE__ */se(n,{componentId:e,kind:t,children:p}):p}function Ct(e,n){return Array.from(e.querySelectorAll(`[${Le}]`)).find(o=>o.getAttribute(Le)===n&&t(o)?.wrapper===e)??null}function Et(e,t,n){const o=g(e,n),r=o.text.length,l=e.ownerDocument;if(!t)return[r,r];let i=null;const s=l.caretPositionFromPoint?.(t.x,t.y);if(s&&e.contains(s.offsetNode))i=o.at(s.offsetNode,s.offset);else{const n=l.caretRangeFromPoint?.(t.x,t.y);n&&e.contains(n.startContainer)&&(i=o.at(n.startContainer,n.startOffset))}if(null===i)return[r,r];const a=o.text;let c=i,u=i;for(;c>0&&!/\s/.test(a[c-1]);)c-=1;for(;u<a.length&&!/\s/.test(a[u]);)u+=1;return[c,u]}function It({s:e,element:t,toolbar:n,label:o,keys:r}){const l=w("copy",y),i=e.pressed(),s=new Set(n.offered),a=n.colors&&n.colors.length>0?n.colors:null,c=_(null),[m,g]=te(!1),[v,b]=te(null),k=m||null!==v,S=()=>{e.hold(),g(!1),b({href:e.pressed().href})},x=()=>{g(!1),b(null),e.resume()};ie(()=>{r.current={escape:()=>!!k&&(x(),!0),link:()=>!!s.has("link")&&(S(),!0)}}),ie(()=>()=>{r.current=null},[r]);const C=_(x);C.current=x,G(()=>{if(m)return de(e=>{const t=c.current;return!!("Escape"===e.key&&t&&e.target instanceof Node&&t.contains(e.target))&&(C.current(),!0)},()=>c.current?.querySelector(".es-copy-colors"))},[m]),G(()=>{const n=c.current;if(!k||!n)return;const o=/* @__PURE__ */new Set([n.ownerDocument]),r=t();r&&o.add(r.ownerDocument);const l=o=>{const r=o.target;if(r&&n.contains(r))return;g(!1),b(null);const l=t();r&&l&&l.contains(r)?e.release():e.stop("outside")};for(const e of o)e.addEventListener("pointerdown",l,!0);return()=>{for(const e of o)e.removeEventListener("pointerdown",l,!0)}},[k,e,t]),ie(()=>{const e=c.current,n=e?.querySelector(".rosh-tb-wrap > .es-copy-pop"),o=t();if(!(k&&e&&n&&o))return;const r=o.ownerDocument.defaultView?.getSelection()??null,l=r&&r.rangeCount>0&&o.contains(r.getRangeAt(0).startContainer)?r.getRangeAt(0):null,i=(l?u(l,o):null)??(()=>{const e=o.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}})(),s=o.ownerDocument.defaultView?.frameElement,a=s?A(s,{left:i.left,top:i.top,width:i.right-i.left,height:i.bottom-i.top}):{left:i.left,top:i.top,width:i.right-i.left,height:i.bottom-i.top},f=o.getBoundingClientRect(),h=s?A(s,{left:f.left,top:f.top,width:f.width,height:f.height}):{left:f.left,top:f.top,width:f.width,height:f.height},m=(e.closest("[data-floating-bar]")??e).getBoundingClientRect(),g={left:a.left,right:a.left+a.width,top:Math.min(a.top,h.top-6,m.top),bottom:Math.max(a.top+a.height,h.top+h.height+6,m.bottom)},v=e.ownerDocument.documentElement,y=(s??o.closest(".es-canvas")??o).getBoundingClientRect(),w={left:Math.max(0,y.left),top:Math.max(0,y.top),right:Math.min(v.clientWidth||y.right,y.right),bottom:Math.min(v.clientHeight||y.bottom,y.bottom)};if(w.right<=w.left||w.bottom<=w.top||0===n.offsetWidth)return;const b=d({anchor:g,size:{width:n.offsetWidth,height:n.offsetHeight},within:{left:y.left,top:y.top,right:y.right,bottom:y.bottom},clip:w,parent:p(n)});n.style.top=`${b.top}px`,n.style.left=`${b.left}px`,n.style.setProperty("--es-pop-point",`${b.point}px`),n.dataset.side=b.above?"above":"below"});const E=a?{run:f(i.color,a),open:m,onToggle:()=>{b(null),m?x():(e.hold(),g(!0))}}:void 0;/* @__PURE__ */
12
- return se(pe,{anchor:()=>{const e=t();if(!e)return null;const n=e.getBoundingClientRect(),o=e.ownerDocument.defaultView?.frameElement,r=o?A(o,{left:n.left,top:n.top,width:n.width,height:n.height}):{left:n.left,top:n.top,width:n.width,height:n.height};return{left:r.left-6,top:r.top-6,right:r.left+r.width+6,bottom:r.top+r.height+6}},bounds:()=>{const e=t(),n=e?.ownerDocument.defaultView?.frameElement,o=(n??e?.closest(".es-canvas")??e)?.getBoundingClientRect();return o?{left:o.left,top:o.top,right:o.right,bottom:o.bottom}:{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}},"aria-label":o,children:/* @__PURE__ */se("div",{ref:c,children:/* @__PURE__ */se(fe,{layout:"row",offered:s,pressed:i.marks,onMark:t=>{"link"===t?S():e.press(t)},color:E,linkOpen:null!==v,list:{pressed:i.list,onList:t=>e.list(t)},clear:i.clearable?{onClear:()=>e.clear()}:void 0,alignment:n.alignment,letterCase:n.letterCase,last:n.lastTool?.({className:"rosh-tb-btn",disabled:!1,selected:i.selected,keepCaret:t=>{t.preventDefault(),e.hold()},insert:t=>e.insert(t)}),windows:/* @__PURE__ */ae(ce,{children:[m&&a?/* @__PURE__ */se(h,{colors:a,current:i.color,words:l.colors??y.colors,onPick:t=>e.color(t)}):null,v?
13
- /* @__PURE__ */se(he,{className:"es-copy-link es-copy-pop",value:v.href??"",onApply:t=>{b(null),e.link(t)},onRemove:null!==v.href?()=>{b(null),e.link(null)}:void 0,onCancel:x}):null]})})})})}function Dt({element:e,which:t}){const n=_(null),o=ht(n,()=>e(),t),r=J(kt);/* @__PURE__ */
14
- return se("div",{ref:n,"aria-hidden":"true",className:"es-canvas-outline is-typing",style:o?{position:"absolute",top:o.top,left:o.left,width:o.width,height:o.height,clipPath:bt(o,r),...pt}:{display:"none"}})}function At({frame:o=!0,className:r,style:l,metadata:i,mirrorStyles:u,onDocument:d,height:p,title:f,nonce:h,hotkeys:y,frameWrapper:S,overlay:C,children:E,typing:I,passThrough:D}){const A=Pe(),M=J(rt),$=D??M,P=J($e),z=w("canvas",n),R=y??P,[j,N]=te(void 0),V=ze(e=>"node"===e.selection?.kind?e.selection.id:null),[L,B]=te(null),[K,Z]=te(null),F=J(st),H=J(ct),[q,W]=te(null),[,Q]=ne(e=>e+1,0),[,Y]=ne(e=>e+1,0),U=e=>{F?.select(e),Y()},[X,ee]=te(null),oe=_(null),re=_(null),[,le]=te(0),ie=_(I);ie.current=I;const ce=_(null),ue=_(null),de=()=>{if(!V)return null;const e=ie.current?.atSelection?.()?.element()??null;if(!e)return null;const t=ue.current?.ownerDocument;if(F){const n=F.selected()&&t?F.selectedPart?.(t)??null:null;return n&&x(n.element,e)?n.element:null}const n=O(A.getState().appState.data,A.config,V);return n&&0===T(n.node,A.config).length?e:null},pe=ze(e=>e.appState.data),fe=F?.selected()??null;G(()=>{const e=ue.current?.ownerDocument,t=e?.defaultView?.CustomEvent;if(!e||!t)return;const n=V&&!X&&ie.current?.atSelection?.()?V:null,o=n?de():null;e.dispatchEvent(new t(b,{detail:o?{id:n,words:o}:{id:n}}))},[V,X,pe,fe]);const he=e=>{const t=ue.current?.ownerDocument,n=t?.defaultView?.CustomEvent;t&&n&&t.dispatchEvent(new n(k,{detail:{typing:e}}))},me=(e,t)=>{oe.current?.s.stop("stop");const n=e.element();if(!n)return!1;const o=ge(e,n),r=A.group(),l=e.element,i=m({element:l,value:o?.value??e.value,rules:e.rules,multiline:e.multiline,skip:e.skip,caret:Et(n,t,e.skip),write:o?.write??e.write,remount:e.remount,onSelect:()=>le(e=>e+1),onEscape:()=>ce.current?.escape()??!1,onLinkKey:()=>ce.current?.link()??!1,end:e=>{r.close(),oe.current?.element===l&&(oe.current=null),ee(null),he(!1),ie.current?.onChange?.({typing:!1,why:e})}});if(!i)return r.close(),!1;const s=n.closest?.(`[${Le}]`)?.getAttribute(Le);return s&&A.select(s),oe.current={s:i,element:l,target:e},ee(()=>l),B(null),he(!0),ie.current?.onChange?.({typing:!0,element:n}),!0},ge=(e,n)=>{const o=e.key;if(!o||!ie.current?.onCopyText)return null;const r=t(n),l=n.closest?.(`[${Le}]`),i=l?.getAttribute(Le);if(!r||!i||!r.wrapper.contains(l))return null;const{copy:s}=r,a=ie.current.copyValue?.({...s,nodeId:i,key:o}),c=g(n,e.skip).text,u=a??(v(e.value,e.rules).text===c?e.value:c),d={ownerId:s.ownerId,slot:s.slot,index:s.index,...s.outer?{outer:s.outer}:{},nodeId:i,key:o};return{value:u,write:t=>{const n=ie.current?.onCopyText;n&&!1!==n({...d,text:t})||e.write(t)}}};G(()=>()=>oe.current?.s.stop("stop"),[]);const ve=e=>{const t=oe.current?.element();return Boolean(t&&t.contains(e))},ye=(e,t)=>it(A.getState().appState.data,A.config,e,t),we=e=>{const t=e.closest?.(`[${Le}]`)?.getAttribute(Le);if(!t)return;const n=A.getState(),o="node"===n.selection?.kind?n.selection.id:null,r=F?.partAt(e,t)??null;if(r){const e=a(n.appState.data,A.config,t,r.id,o,F?.selected()??null,$);if(e)return{node:e.node,part:e.part?r:null}}return{node:c(n.appState.data,A.config,t,o,$)??t,part:null}},be=e=>{if("Enter"!==e.key||e.defaultPrevented||e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return;if(oe.current)return;const t=e.target;if(t?.isContentEditable||t?.closest?.("input, textarea, select, button"))return;const n=ke(),o=void 0===n?ie.current?.atSelection?.():n;o&&me(o,null)&&e.preventDefault()},ke=()=>{const t=ie.current,n=re.current;if(!t?.onCopyText||!n?.copy||n.node!==V)return;const o=ue.current,r=o?e(o,n.copy):null,l=r?Ct(r,n.node):null;if(!l)return null;const i=t.atSelection?.()??null,s=i?.element()??null;if(!i||!s)return null;if(l.contains(s))return i;const a=function(e,t){const n=e.closest(`[${Le}]`);if(!n||n.getAttribute(Le)!==t.getAttribute(Le))return null;const o=[];for(let t=e;t!==n;t=t.parentElement)o.unshift(Array.prototype.indexOf.call(t.parentElement.children,t));let r=t;for(const e of o)r=r?.children[e];return r&&r.tagName===e.tagName?r:null}(s,l);return a?t.at(a):null},Se=(e,n)=>{if(!ie.current?.onCopyText)return null;const o=t(e);return o&&Ct(o.wrapper,n)?o.copy:null},xe=ue.current?.ownerDocument??null,Ce=F?.selected()&&xe&&V?F.selectedPart?.(xe)??null:null,Ee=Ce&&V&&ye(V,Ce)?Ce.element:null,Ie=H?.selected()??null,De=Ie&&xe?Array.from(xe.querySelectorAll(`[${at}]`)).find(e=>e.getAttribute(at)===Ie)??null:null,Me=X?null:de(),Oe=/* @__PURE__ */ae("div",{ref:ue,className:"es-canvas-content",style:{position:"relative"},onClick:e=>{const t=e.target;if(t.closest?.("a[href]")&&e.preventDefault(),oe.current){if(ve(t))return;oe.current.s.stop("outside")}const n=t.ownerDocument?.getSelection?.();n&&n.rangeCount>0&&n.isCollapsed&&n.removeAllRanges();const o=H?ut(t):null;if(H&&o)return H.select(o.id),W(null),void Q();const r=we(t);if(re.current=void 0!==r?{node:r.node,copy:Se(t,r.node)}:null,void 0!==r)return A.select(r.node),void(F&&(r.part?.id??null)!==F.selected()&&U(r.part?.id??null));t.hasAttribute?.(Be)||(A.select(null),F?.selected()&&U(null))},onDoubleClick:e=>{const t=ie.current;if(!t||ve(e.target))return;const n=t.at(e.target);n&&me(n,{x:e.clientX,y:e.clientY})&&e.preventDefault()},onKeyDown:e=>be(e),onMouseOver:e=>{if(oe.current)return;const t=H?ut(e.target):null;if(t?.element!==q?.element&&W(t),t)return null!==L&&B(null),void(null!==K&&Z(null));const n=we(e.target),o=!!n?.part&&ye(n.node,n.part),r=n?.part&&o&&n.part.id!==F?.selected()?n.part:null,l=!n||n.part&&o?null:n.node;l!==L&&B(l),r?.id===K?.id&&r?.element===K?.element||Z(r)},onMouseLeave:()=>{B(null),Z(null),W(null)},children:[
15
- /* @__PURE__ */se(qe.Provider,{value:L,children:/* @__PURE__ */se(ot,{metadata:i})}),
16
- /* @__PURE__ */ae(St,{children:[
17
- /* @__PURE__ */se(xt,{id:!X&&L&&L!==V?L:null,kind:"hover",overlay:C}),F?/* @__PURE__ */se(dt,{clip:!0,element:X||!K||K.id===F.selected()?null:K.element}):null,Me||Ee?/* @__PURE__ */se(ft,{clip:!0,element:X?null:Me??Ee,words:null!==Me}):null,H?/* @__PURE__ */se(dt,{element:X||!q||q.element===De?null:q.element}):null,De?/* @__PURE__ */se(ft,{element:X?null:De}):null,
18
- /* @__PURE__ */se(xt,{id:X||Ee||Me||De?null:V,kind:"selected",overlay:C}),X?/* @__PURE__ */se(Dt,{element:()=>{const e=X?.()??null;return e?Ce&&x(Ce.element,e)?Ce.element:e:null},which:Ce?.element??X}):null]}),E]}),Re=S?/* @__PURE__ */se(S,{document:j,children:Oe}):Oe;G(()=>{if(j&&R)return Ae(j,A)},[j,R,A]),G(()=>{if(!j)return;const e=e=>{if("Enter"===e.key)return void be(e);if("Escape"!==e.key||e.defaultPrevented)return;const t=e.target;if(t?.isContentEditable||t?.closest?.("input, textarea, select"))return;const n=A.getState();if("node"!==n.selection?.kind)return;if(F?.selected())return void U(null);const o=s(n.appState.data,A.config,n.selection);"node"===o?.kind&&A.select(o.id)};return j.addEventListener("keydown",e),()=>j.removeEventListener("keydown",e)},[j,A,F]);/* @__PURE__ */
19
- return ae("div",{className:"es-canvas"+(r?` ${r}`:""),style:l,"data-easel-preview":"","data-es-typing":X?"":void 0,children:[X&&oe.current?.target.toolbar?/* @__PURE__ */se(It,{s:oe.current.s,element:oe.current.element,toolbar:oe.current.target.toolbar,label:z.textTools,keys:ce}):null,o?/* @__PURE__ */se(He,{mirrorStyles:u,onDocument:e=>{N(e??void 0),d?.(e)},height:p,title:f,nonce:h,children:Re}):/* @__PURE__ */se("div",{id:"preview-frame","data-easel-entry":"",children:Re})]})}function Mt(e={}){const t=Pe(),n=ze(e=>e.appState.data);return i({...e,data:n,config:t.config,commit:(e,{select:n})=>t.run({data:e,select:n})})}function $t(){return jt(ze(e=>e.selectedItem))}function Ot(){const e=J(Pt);try{return function(e){const t=ze(e=>e.selectedItem);return jt("root"===e?null:t)}(e)}catch{return null}}var Pt=X("selected");function zt({children:e}){return oe(Pt.Provider,{value:"root"},e)}function Rt(){return jt(null)}function jt(e){const t=Pe(),n=ze(e=>e.config),r=t.resolveCache,l=ze(e=>e.appState.data.root),i=e?e.props.id:"root",s=l.props??{},a=re(()=>e||{type:"root",props:s},[e,s]),c=e?n.components[e.type]:n.root,u=t.getState(),d=e?O(u.appState.data,n,i):null,p=d&&"root"!==d.place.parentId?d.place.parentId:null,f=p?u.getItemById(p)??null:null,{fields:h}=o({id:i,node:a,block:c,parent:f,appState:u.appState}),m=ze(t=>!1===t.getPermissions(e?{item:e}:{root:!0}).edit),g=le(e=>{(async()=>{const o=t.getState();if("root"!==i){const l=o.getItemById(i),s=o.getSelectorForId(i);if(!l||!s)return;const a={...l,props:{...l.props,...e}},{node:c}=await H(a,n,{cache:r,trigger:"replace"}),u=t.getState().getSelectorForId(i);if(!u)return;return void t.dispatch({type:"replace",destinationZone:u.zone??"root:default-zone",destinationIndex:u.index,data:c})}const l=o.appState.data.root.props??{},{node:s}=await H({type:"root",props:{...l,...e}},n,{cache:r,trigger:"replace"});t.dispatch({type:"replaceRoot",root:{props:s.props,readOnly:s.readOnly},recordHistory:!0})})()},[t,n,r,i]),v=le((e,t)=>g({[e]:t}),[g]);return{id:i,node:a,fields:h,values:a.props,readOnly:m,onChange:v,onChangeMany:g}}export{at as CHROME_ATTR,ct as CanvasChromeContext,He as CanvasFrame,st as CanvasPartsContext,rt as CanvasPassThroughContext,lt as CanvasSharedContext,Ce as DEFAULT_UI,At as EaselCanvas,Oe as EaselProvider,ot as EditDocument,zt as RootHostScope,Ae as bindUndoKeys,De as createEasel,Re as createUseEasel,it as partHasOwnBox,me as recordsByDefault,ke as reduce,ye as uiView,ze as useEasel,Pe as useEaselApi,Mt as useEaselNodeOps,Rt as useRootFields,$t as useSelectedFields,Ot as useSelectedHost,we as validSelection};
@@ -1,16 +0,0 @@
1
- import{sidesStartEach as e,SidesInput as n,SidesEachToggle as t}from"./chunk-CLAADE4J.js";import{SettingsDefaultReset as l}from"./chunk-2T22IY3J.js";import{deviceField as o}from"./chunk-7GGNFLHT.js";import{noControlField as a,NoControlMark as i}from"./chunk-22I55W37.js";import{describedAs as r}from"./chunk-LX23TCTP.js";import{withStyleKind as s}from"./chunk-CWELHADJ.js";import{phoneKey as u}from"./chunk-E52W3M5I.js";import{foldMetaOf as c,FOLD_FIELD_MARKER as d}from"./chunk-ANPOR6EY.js";import{useSelectedHost as p,useEaselApi as f,useEasel as b}from"./chunk-EVYIDHCK.js";import{DEFAULT_PANEL_WORDS as m}from"./chunk-56ID6FKZ.js";import{SettingsSwitch as h}from"./chunk-OECWLNKJ.js";import{FieldSelect as v}from"./chunk-KFWNGPW3.js";import{SettingsField as g}from"./chunk-MIX7EGRG.js";import{SettingsSegmented as y}from"./chunk-DX3VILZ3.js";import{useWords as k}from"./chunk-MFIRYGHW.js";import{useState as w}from"react";import{AlignmentIcon as x,BoxJustifyIcon as C,WrapIcon as j,GapIcon as F,WidthIcon as L,PlacementIcon as O,NudgeIcon as S,DesktopIcon as E,BoxXEndIcon as P,BoxXCenterIcon as I,BoxXStartIcon as R,PaddingAllIcon as A,BoxYBetweenIcon as M,BoxYStretchIcon as K,BoxYEndIcon as W,BoxYCenterIcon as B,BoxYStartIcon as G,BoxXBetweenIcon as N,BoxXStretchIcon as T,BoxItemAlignmentIcon as V}from"efficient-shell/icons/efficient";import{textAlignOptions as $,AlignmentGrid as D,PositionInput as H,Slider as J}from"efficient-shell/ui";import{jsx as Y,Fragment as _,jsxs as z}from"react/jsx-runtime";var X=e=>e;function Z(e,n){return e("{value} on desktop").replace("{value}",n)}var U=()=>{};function q(){return null}function Q(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");/* @__PURE__ */
2
- return Y(q,{},e)}function ee(e){return e.type===q}function ne(e){return ee(e)?void 0:e}function te(e){for(const[n,t]of Object.entries(e))t&&"object"==typeof t&&!c(t)&&s(t,`section:${n}`);return e}function le(e,n){return{type:"custom",[d]:{label:e,level:n},marker:!0,fold:e,render:()=>/* @__PURE__ */Y(_,{})}}function oe(e){return le(e,2)}function ae(e){return le(e,1)}var ie=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],re=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"End",value:"end"},{label:"Stretch",value:"stretch"}],se="Wrap",ue=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],ce="Direction",de=[{label:"Stacked",value:"column"},{label:"One row",value:"row"}],pe={min:-32,max:64,step:2,builtIn:0},fe={min:30,max:100,step:5,fallback:60},be=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],me="bottom-left",he={"top-left":"Top left","top-center":"Top center","top-right":"Top right",left:"Left",center:"Center",right:"Right","bottom-left":"Bottom left","bottom-center":"Bottom center","bottom-right":"Bottom right"},ve=be.map(e=>({value:e,label:he[e]}));function ge(e,n=me){return be.includes(e)?e:n}var ye=40,ke=e=>"number"==typeof e?e:null;function we(e,n,t){const l={};for(const o of["x","y"])t[o]!==n[o]&&(l[e[o]]=t[o]??void 0);return l}var xe=["top","right","bottom","left"],Ce={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},je=e=>"number"==typeof e?e:null;function Fe(e,n,t){const l={};for(const o of xe)t[o]!==n[o]&&(l[e[o]]=t[o]??void 0);return l}function Le(e){if("number"==typeof e)return{top:e,right:e,bottom:e,left:e};const n=e&&"object"==typeof e?e:{};return Object.fromEntries(xe.map(e=>[e,je(n[e])]))}function Oe(e){const n={};for(const t of xe)"number"==typeof e[t]&&(n[t]=e[t]);return Object.keys(n).length?n:void 0}function Se(e,n={}){const t=n=>{const t=n[e];return t&&"object"==typeof t?t:{}},l=e=>Object.hasOwn(n,e)?n[e]:e;return{read:(e,n)=>t(e)[l(n)],write:(n,o,a)=>{const i={...t(n)};return void 0===a?delete i[l(o)]:i[l(o)]=a,{[e]:Object.keys(i).length?i:void 0}}}}function Ee(e,n,t){const l=Pe(e),o=p();if(t)return[t.value,t.onChange];const a=o?.values??{};return[e.read(a,n),e=>l([[n,e]])]}function Pe(e){const n=p(),t=function(){try{return f()}catch{return null}}();return l=>{if(!n)return;const o=t?.getState(),a=(o?"root"===n.id?o.appState.data.root.props:o.getItemById(n.id)?.props:void 0)??n.values??{};let i={};for(const[n,t]of l)i={...i,...e.write({...a,...i},n,t)};n.onChangeMany(i)}}var Ie={read:(e,n)=>e[n],write:(e,n,t)=>({[n]:t})},Re={fieldKey:u,ownField:!0,read:(e,n)=>e[u(n)],write:(e,n,t)=>({[u(n)]:t})};function Ae(e){return{...Se(e),fieldKey:n=>`_${e}_${n}`}}function Me({row:e,desktopKey:n,access:t,props:l}){const o=p(),a=o?.values?.[n],[i,r]=Ee(t,n);return t.ownField?e.render({...l,follows:a,twinAccess:t}):e.render({...l,value:i,storedValue:i,follows:a,twinAccess:t,onChange:r})}function Ke(e,n,t=Re,l={}){const a=l.phoneRow??n,i={...a,render:n=>/* @__PURE__ */Y(Me,{row:a,desktopKey:e,access:t,props:n})};return{[e]:o("desktop",n),[t.fieldKey(e)]:o("mobile",i)}}var We=["left","center","right"];function Be(e,{options:n,value:t,onChange:l,ariaLabel:o,disabled:a=!1}){/* @__PURE__ */
3
- return Y(y,{options:n.map(n=>n.picture?{id:n.value,label:n.picture,title:e(n.title??n.label)}:{id:n.value,label:e(n.label),title:void 0===n.title?void 0:e(n.title)}),value:t,onChange:l,ariaLabel:e(o),disabled:a})}function Ge(e,{label:n,value:t,onChange:l,points:o}){const a=o.find(e=>e.disabled),i=o.map(n=>({...n,label:e(n.label),...n.title?{title:e(n.title)}:null}));/* @__PURE__ */
4
- return Y(g,{label:e(n),icon:/* @__PURE__ */Y(O,{}),hint:a?.title?e(a.title):void 0,children:/* @__PURE__ */Y(D,{label:e(n),value:t,points:i,onChange:l})})}function Ne({say:e,label:n,value:t,onChange:l,pointsFor:o}){const{appState:a,selectedItem:i}=b(e=>e),r=i?.props?.id?String(i.props.id):void 0;return Ge(e,{label:n,value:t,onChange:l,points:o(a?.data,r)})}function Te({say:e,o:n}){const t=p(),o=k("panel",m),a=t?.values??{},i={x:ke(a[n.keys.x]),y:ke(a[n.keys.y])},r=e(n.label??"Position"),s=Boolean(i.x||i.y),u=e=>{const l=we(n.keys,i,e);Object.keys(l).length&&t?.onChangeMany(l)},c=/* @__PURE__ */Y(H,{label:r,value:i,onChange:u,words:{x:e("Left and right"),y:e("Up and down"),unit:"px"},placeholder:{x:"0",y:"0"},min:n.min,max:n.max,step:n.step??1}),d=/* @__PURE__ */Y(l,{words:o,label:r,changed:s,detail:"0 px, 0 px",onReset:()=>u({x:null,y:null})});return null===n.label?/* @__PURE__ */z("div",{className:"sf-position-line",children:[c,d]}):/* @__PURE__ */Y(g,{label:r,icon:/* @__PURE__ */Y(S,{}),changed:s,action:d,children:c})}var Ve={x:{start:/* @__PURE__ */Y(R,{}),center:/* @__PURE__ */Y(I,{}),end:/* @__PURE__ */Y(P,{}),stretch:/* @__PURE__ */Y(T,{}),between:/* @__PURE__ */Y(N,{})},y:{start:/* @__PURE__ */Y(G,{}),center:/* @__PURE__ */Y(B,{}),end:/* @__PURE__ */Y(W,{}),stretch:/* @__PURE__ */Y(K,{}),between:/* @__PURE__ */Y(M,{})}},$e=e=>"row"===e?"row":"column";function De({say:e,kind:n,label:t,options:l,value:o,onChange:a,o:i}){const r=p(),s="justify"===n==("row"===(i.runs??$e)(r?.values?.[i.directionKey??"direction"]))?"x":"y";return Be(e,{options:l.map(e=>({label:e.label,value:e.value,picture:Ve[s][e.value]})),value:o,onChange:a,ariaLabel:t})}function He(e,n){const t=(e.useFallback??U)(n);return Object.fromEntries(xe.map(n=>[n,t?.[n]??e.fallback[n]]))}function Je({say:e,tier:n,o:t,props:l}){const o=He(t,l),a=p(),i=a?.values??{},r="mobile"===n?t.phoneKeys:t.keys,s=Object.fromEntries(xe.map(e=>[e,je(i[r[e]])])),u="mobile"===n?Object.fromEntries(xe.map(e=>[e,je(i[t.keys[e]])])):null;/* @__PURE__ */
5
- return Y(_e,{say:e,o:t,fallback:o,value:s,follows:u,readOnly:l.readOnly,onChange:e=>{const n=Fe(r,s,e);Object.keys(n).length&&a?.onChangeMany(n)}})}function Ye({say:e,o:n,props:t}){const l=He(n,t);/* @__PURE__ */
6
- return Y(_e,{say:e,o:n,fallback:l,value:Le(t.value),follows:"follows"in t?Le(t.follows):null,readOnly:t.readOnly,onChange:e=>t.onChange(Oe(e))})}function _e({say:o,o:a,fallback:i,value:r,follows:s,readOnly:u,onChange:c}){const d=Object.fromEntries(xe.map(e=>[e,String(s?.[e]??i[e])])),[p,f]=w(()=>e(r,d)),b=k("panel",m),h=xe.map(e=>d[e]),v=`${1===new Set(h).size?h[0]:h.join(" / ")}px`;/* @__PURE__ */
7
- return Y(g,{label:o(a.label),icon:a.icon??/* @__PURE__ */Y(A,{}),action:/* @__PURE__ */z(_,{children:[
8
- /* @__PURE__ */Y(t,{each:p,label:o("Each side"),onChange:f,disabled:u}),
9
- /* @__PURE__ */Y(l,{words:b,label:o(a.label),changed:xe.some(e=>"number"==typeof r[e]),detail:s?Z(o,v):v,disabled:u,onReset:()=>c({top:null,right:null,bottom:null,left:null})})]}),children:/* @__PURE__ */Y(n,{label:o(a.label),each:p,value:r,placeholder:d,min:a.min,max:a.max,step:a.step,readOnly:u,onChange:c,words:{sides:{top:o("Padding top"),right:o("Padding right"),bottom:o("Padding bottom"),left:o("Padding left")},vertical:o("Top and bottom"),horizontal:o("Left and right"),unit:"px"}})})}var ze=e=>""===e||"px"===e?e:` ${e}`;function Xe({label:e,value:n,onChange:t,min:o,max:a,step:i=1,unit:r="",hint:s,emptyLabel:u,inputMax:c,readOnly:d=!1,clears:p,detail:f,resetWords:b}){const m="number"==typeof n,h=p?/* @__PURE__ */Y(l,{label:e,changed:m,detail:f??u??(void 0===s?void 0:`${s}${ze(r)}`),disabled:d,onReset:()=>t(void 0),...b?{words:b}:{}}):void 0;return{track:/* @__PURE__ */Y("div",{className:"sf-slider",children:/* @__PURE__ */Y(J,{min:o,max:a,step:i,value:n,suffix:r||void 0,showInput:!0,label:e,disabled:d,...p&&void 0!==s?{placeholderValue:s}:{},...u?{emptyLabel:u}:{},...void 0!==c?{inputMax:c}:{},size:"sm",boxSize:"md",className:"sf-slider-track",onChange:e=>{null===e?p&&m&&t(void 0):e!==n&&t(e)}})}),reset:h}}function Ze({caption:e,label:n,value:t,hint:l,emptyLabel:o,...a}){const i=void 0!==l||void 0!==o,r="number"==typeof t,{track:s,reset:u}=Xe({...a,label:n,value:r?t:i?null:a.min,hint:l,emptyLabel:o,clears:i});/* @__PURE__ */
10
- return Y(g,{label:e??n,action:u,children:s})}function Ue({draw:e,props:n,useMax:t,useHint:l}){return e(n,{max:(t??U)(n),hint:(l??U)(n)})}function qe(e=X){function n(n,t,l,o,a,i,s="",u){const c="function"==typeof u?{action:u}:u??{},{action:d,clear:p}=c,f=(r,u)=>{const f="storedValue"in r?r.storedValue:r.value,b="follows"in r,m=b&&!1!==p?.phoneFollows,h=b||void 0!==p,v="number"==typeof r.value,y=void 0===p?i:u.hint??("function"==typeof p.hint?p.hint(r):p.hint)??i,k=m&&"number"==typeof r.follows?r.follows:y,w=ze(s),x=!p?.emptyLabel||m&&"number"==typeof r.follows?void 0:p.emptyLabel,C=x??`${k}${w}`,j="function"==typeof c.hint?c.hint(r):c.hint,{track:F,reset:L}=Xe({label:e(n),value:v?r.value:h?null:i,onChange:e=>r.onChange(e),min:l,max:u.max??o,step:a,unit:s,hint:h?k:void 0,emptyLabel:x,inputMax:c.inputMax,readOnly:!0===r.readOnly,clears:h,detail:m?Z(e,C):C});/* @__PURE__ */
11
- return Y(g,{label:e(n),icon:ne(t),hint:void 0===j?void 0:e(j),action:h?L:d?d(f,r.onChange):void 0,children:F})},b=c.useMax,m=p?.useHint;return{type:"custom",...r({},{type:"number",label:n}),render:b||m?e=>/* @__PURE__ */Y(Ue,{draw:f,props:e,useMax:b,useHint:m}):e=>f(e,{})}}function t(n){return Be(e,n)}function s(n,o,a,i,s={}){const u=a.map(e=>"string"==typeof e?{label:e,value:e}:e);return{type:"custom",...r({},{type:"radio",label:n,options:u.map(e=>({value:e.value,label:e.label}))}),render:a=>{const{value:r,onChange:c,field:d}=a,p=u.some(e=>e.value===r),f=!0===a.readOnly;if("follows"in a&&!u.some(e=>""===e.value)){const d=s.phoneRest?s.phoneRest(a.follows):a.follows,b=u.find(e=>e.value===d)??u.find(e=>e.value===i);/* @__PURE__ */
12
- return Y(g,{label:e(n),icon:ne(o),action:/* @__PURE__ */Y(l,{label:e(n),changed:p,detail:Z(e,e(b?.label??"")),disabled:f,onReset:()=>c(void 0)}),children:t({options:u,value:p?r:b?.value??i,onChange:c,ariaLabel:n,disabled:f})})}const b="follows"in a&&s.followsLabel?s.followsLabel(a.follows):void 0;/* @__PURE__ */
13
- return Y(g,{label:e(n),icon:ne(o),action:"follows"in a&&s.followsLabel?/* @__PURE__ */Y(l,{label:e(n),changed:null!=r&&""!==r,detail:void 0===b?void 0:Z(e,e(b)),disabled:f,onReset:()=>c(void 0)}):void 0,children:t({options:u,value:p?r:r||d?.currentValue||i,onChange:c,ariaLabel:n,disabled:f})})}}}function c(e,n){return n.phone?e.unshift({label:"Match desktop",value:"",picture:/* @__PURE__ */Y(E,{})}):n.inherit&&e.unshift({label:n.inherit,value:""}),e}function d(e,n){return n.inherit||n.phone?{...e,render:n=>e.render({...n,onChange:e=>n.onChange(""===e?void 0:e)})}:e}function p(e,n,t,l){if(l.access){const o=l.inherit?"":l.fallback??"left",a=t({...l,phone:!1}),i=e=>{const n="string"==typeof e&&""!==e&&a.some(n=>n.value===e)?e:o;return a.find(e=>e.value===n)?.label};return Ke(e,n(l,o),l.access,{phoneRow:n({...l,phone:!0},"",i)})}return{[e]:o("desktop",n(l)),[u(e)]:o("mobile",n({...l,phone:!0},""))}}function f(e){return c($(e.allow??We).map(e=>({label:e.label,value:e.value,picture:e.icon})),e)}function b(e,n=e.fallback??"left",t){return d(s(e.label??"Text alignment",/* @__PURE__ */Y(x,{}),f(e),n,t?{followsLabel:t}:{}),e)}function m(e){const n={left:Ve.x.start,center:Ve.x.center,right:Ve.x.end};return c($((e.allow??We).filter(e=>e in n)).map(e=>({label:e.label,value:e.value,picture:n[e.value]})),e)}function y(e,n=e.fallback??"left",t){return d(s(e.label??"Block alignment",/* @__PURE__ */Y(C,{}),m(e),n,t?{followsLabel:t}:{}),e)}function k(n,t,l,o,a,i){return{type:"custom",options:o,fallback:a,...r({},{type:"radio",label:t,options:o.map(e=>({value:e.value,label:e.label}))}),render:({value:r,onChange:s,field:u})=>{const c=u.options??o,d=u.fallback??a,p=c.some(e=>e.value===r)?r:d;/* @__PURE__ */
14
- return Y(g,{label:e(t),icon:ne(l),children:/* @__PURE__ */Y(De,{say:e,kind:n,label:t,options:c,value:p,onChange:s,o:i})})}}}function w(e={}){return k("justify","Justify",/* @__PURE__ */Y(C,{}),ie,ie[0].value,e)}function O(e={}){return k("align","Item alignment",/* @__PURE__ */Y(V,{}),re,"stretch",e)}function S(){const n=se;return{type:"custom",options:ue,fallback:ue[1].value,...r({},{type:"radio",label:n,options:ue.map(e=>({value:e.value,label:e.label}))}),render:({value:t,onChange:l,id:o,name:a})=>{const i=`${o??a??n}-label`;/* @__PURE__ */
15
- return Y(g,{label:e(n),labelId:i,icon:/* @__PURE__ */Y(j,{}),action:/* @__PURE__ */Y(h,{checked:(r=t,!0===r||"wrap"===r),onChange:e=>l(e?ue[0].value:ue[1].value),ariaLabelledBy:i})});var r}}}function P({offered:e,fallback:n,resolve:t}){const l=t??(t=>e.some(e=>e.value===t)?t:n),o=s(ce,Q("`Direction` names how a container’s children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; the shell’s own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),e.map(e=>({label:e.label,value:e.value})),l(void 0));return{type:"custom",render:e=>o.render({...e,value:l(e.value),onChange:n=>e.onChange(n)})}}function I({min:e,max:t,step:l,builtIn:o,resolve:a,action:i,mark:r}){const s=n("Gap",/* @__PURE__ */Y(F,{}),e,t,l,o,"px",i),u=a??(e=>"number"==typeof e?e:o);return{...r,type:"custom",render:e=>s.render({...e,value:u(e.value,e.field),storedValue:e.value,onChange:n=>e.onChange(n)})}}function R(n,{fallback:t=me,pointsFor:l}={}){return{type:"custom",render:({value:o,onChange:a})=>{const i=ge(o,t);return l?/* @__PURE__ */Y(Ne,{say:e,label:n,value:i,onChange:a,pointsFor:l}):Ge(e,{label:n,value:i,onChange:a,points:ve})}}}function A(n){return{[n.keys.x]:{type:"custom",render:()=>/* @__PURE__ */Y(Te,{say:e,o:n})},[n.keys.y]:{...a({type:"custom",render:()=>/* @__PURE__ */Y(i,{})},"always"),reachedBy:n.keys.x}}}function M(n={}){const t={...Ce,...n.keys},l={keys:t,phoneKeys:Object.fromEntries(xe.map(e=>[e,u(t[e])])),fallback:{top:0,right:0,bottom:0,left:0,...n.fallback},useFallback:n.useFallback,label:n.label??"Padding",icon:n.icon,min:n.min??0,max:n.max??200,step:n.step??4},r=!1!==n.phone,s=!1===n.group?{}:{_gSpacing:oe("Padding")};if(n.object){const t={type:"custom",render:n=>/* @__PURE__ */Y(Ye,{say:e,o:l,props:n})};return te({...s,...r?Ke(n.object.key,t,n.object.phone):{[n.object.key]:t}})}const c=n=>{const t={type:"custom",render:t=>/* @__PURE__ */Y(Je,{say:e,tier:n,o:l,props:t})};return r?o(n,t):t},d=()=>a({type:"custom",render:()=>/* @__PURE__ */Y(i,{})},"always"),p=xe.filter(e=>"top"!==e);return te({...s,[l.keys.top]:c("desktop"),...r?{[l.phoneKeys.top]:c("mobile")}:{},...Object.fromEntries(p.map(e=>[l.keys[e],{...d(),reachedBy:l.keys.top}])),...r?Object.fromEntries(p.map(e=>[l.phoneKeys[e],o("mobile",d())])):{}})}return{slider:n,select:function(n,t,o,a,i){return{type:"custom",options:o,fallback:a,...i?{note:i}:{},...r({},{type:"select",label:n}),render:r=>{const{value:s,onChange:u,field:c}=r,d=c.options??o,p=c.fallback??a,f=d.some(e=>e.value===s),b="follows"in r,m=b?d.find(e=>e.value===r.follows)??d.find(e=>e.value===p):void 0,h=f?s:m?.value??p,y=!0===r.readOnly;/* @__PURE__ */
16
- return Y(g,{label:e(n),icon:ne(t),action:b?/* @__PURE__ */Y(l,{label:e(n),changed:null!=s&&""!==s,detail:m?Z(e,e(m.label)):void 0,disabled:y,onReset:()=>u(void 0)}):void 0,children:/* @__PURE__ */Y(v,{value:h,ariaLabel:e(n),readOnly:y,onChange:u,options:[...i?[{label:e(i),value:"\0note",disabled:!0}]:[],...d.map(n=>({label:e(n.label),value:n.value}))]})})}}},Segmented:t,segmented:s,boxJustifyField:w,boxAlignField:O,boxWrapField:S,directionField:P,gapField:I,placementField:R,PlacementGridView:function(n){return Ge(e,n)},positionFields:A,sidesPaddingFields:M,alignmentField:function(e={},n=e.fallback??"left"){return b(e,n)},alignmentFields:function(e="align",n={}){return p(e,b,f,n)},AlignmentStrip:function({opts:e={},value:n,onChange:l,ariaLabel:o,disabled:a=!1}){return t({options:f(e),value:n,onChange:l,ariaLabel:o,disabled:a})},blockAlignmentField:function(e={},n=e.fallback??"left"){return y(e,n)},blockAlignmentFields:function(e="align",n={}){return p(e,y,m,n)},BlockAlignmentStrip:function({opts:e={},value:n,onChange:l,ariaLabel:o,disabled:a=!1}){return t({options:m(e),value:n,onChange:l,ariaLabel:o,disabled:a})},boxFieldSet:function(e={}){const t=e.width??fe,l=e.nudge?.limit??40,o=e.direction??{offered:de,fallback:"column"},a=o.resolve??(e=>o.offered.some(n=>n.value===e)?e:o.fallback),i={runs:e=>"row"===a(e)?"row":"column"};return{_gLayout:oe("Layout"),placement:R("Placement",e.placement),width:n("Width",/* @__PURE__ */Y(L,{}),t.min,t.max,t.step,t.fallback,"%"),direction:P(o),gap:I(e.gap??pe),justify:w(i),align:O(i),wrap:S(),_gNudge:oe("Nudge"),...A({keys:e.nudge?.keys??{x:"nudgeX",y:"nudgeY"},min:-l,max:l,label:null}),...M(e.padding)}}}}var{slider:Qe,select:en,Segmented:nn,segmented:tn,boxJustifyField:ln,boxAlignField:on,boxWrapField:an,directionField:rn,gapField:sn,placementField:un,PlacementGridView:cn,positionFields:dn,sidesPaddingFields:pn,alignmentField:fn,alignmentFields:bn,AlignmentStrip:mn,blockAlignmentField:hn,blockAlignmentFields:vn,BlockAlignmentStrip:gn,boxFieldSet:yn}=qe();export{he as ANCHOR_LABELS,mn as AlignmentStrip,re as BOX_ALIGN_POINTS,de as BOX_DIRECTIONS,ce as BOX_DIRECTION_LABEL,pe as BOX_GAP,ie as BOX_JUSTIFY_POINTS,ye as BOX_NUDGE_LIMIT,be as BOX_PLACEMENTS,me as BOX_PLACEMENT_DEFAULT,fe as BOX_WIDTH,se as BOX_WRAP_LABEL,ue as BOX_WRAP_POINTS,gn as BlockAlignmentStrip,Ie as FLAT_ACCESS,ve as OPEN_PLACEMENT_POINTS,Re as PHONE_KEY_ACCESS,cn as PlacementGridView,Ce as SIDE_PAD_KEYS,nn as Segmented,Ze as SliderControl,fn as alignmentField,bn as alignmentFields,hn as blockAlignmentField,vn as blockAlignmentFields,on as boxAlignField,qe as boxFieldBuilders,yn as boxFieldSet,ln as boxJustifyField,an as boxWrapField,rn as directionField,sn as gapField,oe as group,ne as iconOf,ee as isNoGlyph,Q as noGlyph,ge as normaliseBoxPlacement,Se as objectAccess,Z as onDesktopWords,Ae as phoneObjectAccess,Ke as phoneTwinFields,un as placementField,dn as positionFields,we as positionPatch,ae as section,tn as segmented,en as select,te as sharedStyleKinds,Le as sidesFromObject,pn as sidesPaddingFields,Fe as sidesPaddingPatch,Oe as sidesToObject,Qe as slider,Pe as useAccessPatch,Ee as useAccessValue};
@@ -1,5 +0,0 @@
1
- import{usePickFollowsSelection as n}from"./chunk-NCXYC7WI.js";import{slotFieldsOf as e,slotChildrenIn as t}from"./chunk-TCAAOYQY.js";import{EaselCanvas as r,useSelectedFields as o}from"./chunk-EVYIDHCK.js";import{Inspector as i}from"./chunk-WMC6FE3G.js";import{fieldIsShown as u}from"./chunk-BPXEFVSQ.js";import{createContext as l,useContext as s}from"react";import{DesktopIcon as c}from"efficient-shell/icons/efficient";import{jsx as f}from"react/jsx-runtime";var a={kind:"selection"};function d(n){return"selection"===n.kind}function p(n,e){if(d(n)&&d(e))return!0;const t=n,r=e,o=Object.keys(t);return o.length===Object.keys(r).length&&o.every(n=>Object.is(t[n],r[n]))}function m(n){const e=n;return"string"==typeof e.nodeId&&"string"==typeof e.slot}function k(n,t){const r=n.components?.[t.type]?.fields??{};return e(n,t.type).filter(n=>u(r[n],{values:t.props}))}function h(n,e){return k(n,e).flatMap(n=>t(e,n))}function v(n,e,t){const r=n.slotsOf?.(t);return r||k(e,t).map(n=>({slot:n,label:n,rung:!1}))}function y(n,e){return n.isFirst?n.isFirst(e):e.type===n.first}function g(n,e){return n.isLast?n.isLast(e):e.type===n.last}var b={},C=()=>b,O=()=>"",j=()=>null,w=()=>{},S={isLockedBlock:()=>!1,duplicateBlocked:()=>null,nestDepth:()=>0,newSectionNode:()=>null,canAddTo:()=>null,blockIsOffered:()=>!0},L={labelAtLevel:(n,e,t)=>t,descriptions:{},categoryLabel:()=>{},firstSection:null,blockRowName:(n,e)=>e(n.type),plainText:n=>n,Icon:()=>null,Thumbnail:()=>null,useProducts:()=>null},D={options:[{id:"desktop",label:"Desktop",icon:/* @__PURE__ */f(c,{})}],initial:"desktop",fluid:"desktop",widths:{desktop:2e3}},I={read:()=>"sections",write:()=>{},forSelection:(n,e)=>n?"sections":e},N={first:null,last:null,firstGroup:null,lastGroup:null,isSectionGroup:()=>!1,sectionGroupZone:()=>"",panelOf:()=>null};function P(){/* @__PURE__ */
2
- return f(r,{height:"fill"})}function B(){const{id:n,fields:e,values:t,readOnly:r,onChange:u}=o();/* @__PURE__ */
3
- return f("div",{className:"es-sidepanel es-sidepanel--right",children:/* @__PURE__ */f(i,{fields:e,values:t,onChange:u,readOnly:r,idPrefix:n})})}var F=l({});function G({parts:n,children:e}){/* @__PURE__ */
4
- return f(F.Provider,{value:n,children:e})}function x(){return s(F)}function A(){return(x().useOwnerName??O)()}function T(){return(x().useDocumentLabel??j)()}function Y(n,e,t,r){return(x().useBridges??C)(n,e,t,r)}function E(n){return(x().useStandaloneBridges??C)(n)}function V(n,e){(x().useDocumentPass??w)(n,e)}function H(){return x().blockRules??S}function K(){return x().blockLook??L}function M(){return x().devices??D}function Q(){return x().leftView??I}function R(){return x().pinned??N}function W(){return x().saveSwitch??!0}function X(e){n(!0===x().pickFollowsSelection,e)}function Z(){return x().storageNamespace||void 0}function q(){return x().styleClipboard??null}function z(){return x().nodeKeys??!0}function J(){return x().notify??null}function U(){return x().Canvas??P}function $(){return x().CanvasHead??null}function _(){return x().canvasDrag??null}var nn=l(null);function en({target:n,children:e}){/* @__PURE__ */
5
- return f(nn.Provider,{value:n,children:e})}function tn(){return s(nn)}function rn(){return x().Inspector??B}export{a as SELECTION_MODE,en as ScreenCanvasTargetProvider,G as ScreenPartsProvider,y as isPinnedFirst,g as isPinnedLast,d as isSelectionMode,m as isSlotMode,p as sameInspectorMode,v as screenSlotsOf,h as shownChildSlotsOf,k as shownSlotFieldsOf,K as useScreenBlockLook,H as useScreenBlockRules,Y as useScreenBridges,_ as useScreenCanvasDrag,U as useScreenCanvasFrame,$ as useScreenCanvasHead,tn as useScreenCanvasTarget,M as useScreenDevices,T as useScreenDocumentLabel,V as useScreenDocumentPass,rn as useScreenInspectorPanel,Q as useScreenLeftView,z as useScreenNodeKeys,J as useScreenNotify,A as useScreenOwnerName,x as useScreenParts,X as useScreenPickFollowsSelection,R as useScreenPinned,W as useScreenSaveSwitch,Z as useScreenStorageNamespace,q as useScreenStyleClipboard,E as useStandaloneScreenBridges};