efficient-easel 13.1.0 → 13.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/chunk-27CDEFBE.js +1 -0
- package/dist/chunk-2MGZTBPF.js +5 -0
- package/dist/{chunk-WBQTAVPN.js → chunk-2QX2VB2C.js} +17 -17
- package/dist/{chunk-3Z2MVLCD.js → chunk-4ES5JGGX.js} +1 -1
- package/dist/{chunk-PVAIOBBE.js → chunk-6LYK3NGW.js} +8 -8
- package/dist/chunk-AKZ4QYHO.js +1 -0
- package/dist/chunk-BPXEFVSQ.js +1 -0
- package/dist/chunk-CHXJDSUC.js +57 -0
- package/dist/chunk-E7EIYXXM.js +5 -0
- package/dist/{chunk-4EI6UGGH.js → chunk-ET6FNSRA.js} +1 -1
- package/dist/{chunk-NBDMTIU2.js → chunk-HV56SLR2.js} +2 -2
- package/dist/{chunk-3NFPN36B.js → chunk-L25TTU2F.js} +1 -1
- package/dist/chunk-L3GSW4XI.js +1 -0
- package/dist/{chunk-RLNKDNDW.js → chunk-L7PSXVI3.js} +4 -4
- package/dist/{chunk-UY7OJPYJ.js → chunk-LER7RKTO.js} +1 -1
- package/dist/{chunk-CLH24KFA.js → chunk-QHSYHB4W.js} +1 -1
- package/dist/{chunk-3WDI2OE5.js → chunk-SMP54RNN.js} +1 -1
- package/dist/{chunk-LOMSP2JS.js → chunk-W26HUPPC.js} +1 -1
- package/dist/draw/index.d.ts +2 -0
- package/dist/draw/index.js +1 -1
- package/dist/easel/index.js +1 -1
- package/dist/fields/index.d.ts +4 -10
- package/dist/fields/index.js +1 -1
- package/dist/panel/index.js +1 -1
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/MediaSidePanel.js +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +16 -16
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/puck/device-fields.js +1 -1
- package/dist/screen/lib/puck/panel-fields.js +1 -1
- package/dist/screen/lib/puck/preview-dom.js +1 -1
- package/dist/screen/lib/puck/style-clipboard.js +1 -1
- package/dist/screen/lib/puck/use-section-ops.js +1 -1
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/strings/catalogue.js +1 -1
- package/dist/strings/index.js +1 -1
- package/dist/text-styles/index.js +20 -20
- package/package.json +111 -3
- package/dist/chunk-6AIWFUNY.js +0 -1
- package/dist/chunk-IKLK6Y34.js +0 -5
- package/dist/chunk-P6YFPSUO.js +0 -1
- package/dist/chunk-Q7SJFJN3.js +0 -1
- package/dist/chunk-QCDABW3O.js +0 -57
- package/dist/chunk-UHMRPY3R.js +0 -5
- package/dist/chunk-YAFVODLX.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{blockRuns as e}from"./chunk-HQ4VVRIC.js";import{useScreenBlockLook as r}from"./chunk-
|
|
1
|
+
import{blockRuns as e}from"./chunk-HQ4VVRIC.js";import{useScreenBlockLook as r}from"./chunk-E7EIYXXM.js";import{DEFAULT_SCREEN_WORDS as s}from"./chunk-VVPZMWJE.js";import{useWords as t}from"./chunk-MFIRYGHW.js";import{DropdownMenu as n}from"efficient-shell/ui";import{jsxs as c,Fragment as i,jsx as o}from"react/jsx-runtime";function l({choices:l,onPick:p}){const{Icon:a}=r(),m=t("screen",s),u=e(l).flatMap(e=>[...e.group?[{type:"label",key:`group:${e.group}`,label:/* @__PURE__ */c(i,{children:[e.group," ",
|
|
2
2
|
/* @__PURE__ */o("span",{className:"sf-menugroup-count",children:e.items.length})]})}]:[],...e.items.map(e=>({key:e.type,label:e.label,icon:/* @__PURE__ */o("span",{className:"sf-chip",children:/* @__PURE__ */o(a,{type:e.type,size:13})}),onSelect:()=>p(e.type)}))]);/* @__PURE__ */
|
|
3
3
|
return o(n,{align:"start",triggerClassName:"sf-add-card",items:u,trigger:/* @__PURE__ */c(i,{children:[
|
|
4
4
|
/* @__PURE__ */o("span",{className:"sf-plus sf-plus--sm",children:"+"}),m.addBlockMenu]})})}export{l as AddBlockRow};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useScreenOwnerName as e}from"./chunk-
|
|
1
|
+
import{useScreenOwnerName as e}from"./chunk-E7EIYXXM.js";import{settlePanelPick as n}from"./chunk-R6WTQWAC.js";import{MediaPanelHead as i,mediaPickKind as c}from"./chunk-IE55HNMA.js";import{jsxs as o,Fragment as r,jsx as t}from"react/jsx-runtime";function l({panel:l,pick:d,onHide:m}){const p=e();/* @__PURE__ */
|
|
2
2
|
return o(r,{children:[
|
|
3
3
|
/* @__PURE__ */t(i,{context:p,pick:d?{kind:c(d.accept),field:d.title||void 0}:null,onCancel:()=>d&&n(d.requestId,null),onHide:m}),
|
|
4
4
|
/* @__PURE__ */t("div",{className:"sf-media-panel",children:/* @__PURE__ */t(l,{pick:d,onPick:e=>d&&n(d.requestId,e)})})]})}export{l as MediaSidePanel};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ScreenPartsProvider as t}from"./chunk-
|
|
1
|
+
import{ScreenPartsProvider as t}from"./chunk-E7EIYXXM.js";import{useEaselHost as r}from"./chunk-U3JP4VGF.js";import{createEasel as e,EaselProvider as n}from"./chunk-6LYK3NGW.js";import{useState as o,useEffect as s}from"react";import{jsx as i}from"react/jsx-runtime";function a({config:a,data:c,onChange:m,permissions:p,parts:f,children:u}){const[h]=o(()=>e({config:a,data:c,permissions:p}));s(()=>{h.setConfig(a)},[h,a]),s(()=>{if(!m)return;let t=h.getState().appState.data;return h.subscribe(()=>{const r=h.getState().appState.data;r!==t&&(t=r,m(r))})},[h,m]),s(()=>{p&&h.setPermissions(p)},[h,p]);const d=r();/* @__PURE__ */
|
|
2
2
|
return i(n,{easel:h,hotkeys:d.ownsDocument,children:/* @__PURE__ */i(t,{parts:f,children:u})})}export{a as ScreenStoreProvider};
|
package/dist/draw/index.d.ts
CHANGED
|
@@ -6,3 +6,5 @@ export { RowNameRule, rootRowName, sectionRenameProp, slotChildName, slotChildRe
|
|
|
6
6
|
export { FOOTER_TYPE, HEADER_TYPE, NodeLocation, ROOT_ZONE, SlotConfigView, TREE_MAX_DEPTH, TreeItem, blockNodeActions, childSlotsOf, locateNode, missingPinnedTypes, nestsInTree, newNodeId, pinnedDuplicateIds, pinnedDuplicateIndices, slotChildrenIn, slotFieldsOf } from '../screen/lib/puck/content-tree.js';
|
|
7
7
|
export { VIEW_DESKTOP_MIN, VIEW_TABLET_MIN, VIEW_TIERS, VIEW_TIER_LABEL, ViewTier, viewTierForWidth } from '../screen/lib/content/view-tiers.js';
|
|
8
8
|
export { HERO_SLIDER_GOTO_EVENT, HeroSliderGotoDetail } from '../screen/lib/puck/preview-events.js';
|
|
9
|
+
export { TEXT_STYLE_CASES, TEXT_STYLE_CASE_CSS, TextStyleCase, TextStyleCaseCss, isTextStyleCase, textStyleCaseCss, textStyleCaseOfCss } from '../text-styles/model.js';
|
|
10
|
+
import '../words-gIDCeRv3.js';
|
package/dist/draw/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SCALAR_TEXT_CONTROLS,TEXT_CONTROL_KINDS}from"../chunk-PIND6KE7.js";export{VIEW_DESKTOP_MIN,VIEW_TABLET_MIN,VIEW_TIERS,VIEW_TIER_LABEL,viewTierForWidth}from"../chunk-DWIOHQG7.js";export{HERO_SLIDER_GOTO_EVENT}from"../chunk-IQ5TA7AM.js";export{rootRowName,sectionRenameProp,slotChildName,slotChildRenameProp,slotChildRowName}from"../chunk-TBF5CVPA.js";export{ANCHOR_FIELD_KEYS,FOLD_FIELD_MARKER,LINK_FIELD_MARKER,MEDIA_FIELD_MARKER,SCAFFOLD_FIELD_MARKER,TEXT_FIELD_MARKER,foldMetaOf,textFieldIdentifier}from"../chunk-DUVRZ456.js";export{hidableText,readHidable}from"../chunk-6W7WLPZH.js";export{PART_SEP,decodePartId,encodePartId}from"../chunk-IYT6NN2J.js";export{FOOTER_TYPE,HEADER_TYPE,ROOT_ZONE,TREE_MAX_DEPTH,blockNodeActions,childSlotsOf,locateNode,missingPinnedTypes,nestsInTree,newNodeId,pinnedDuplicateIds,pinnedDuplicateIndices,slotChildrenIn,slotFieldsOf}from"../chunk-PLVEGYK6.js";
|
|
1
|
+
export{SCALAR_TEXT_CONTROLS,TEXT_CONTROL_KINDS}from"../chunk-PIND6KE7.js";export{VIEW_DESKTOP_MIN,VIEW_TABLET_MIN,VIEW_TIERS,VIEW_TIER_LABEL,viewTierForWidth}from"../chunk-DWIOHQG7.js";export{HERO_SLIDER_GOTO_EVENT}from"../chunk-IQ5TA7AM.js";export{rootRowName,sectionRenameProp,slotChildName,slotChildRenameProp,slotChildRowName}from"../chunk-TBF5CVPA.js";export{ANCHOR_FIELD_KEYS,FOLD_FIELD_MARKER,LINK_FIELD_MARKER,MEDIA_FIELD_MARKER,SCAFFOLD_FIELD_MARKER,TEXT_FIELD_MARKER,foldMetaOf,textFieldIdentifier}from"../chunk-DUVRZ456.js";export{hidableText,readHidable}from"../chunk-6W7WLPZH.js";export{PART_SEP,decodePartId,encodePartId}from"../chunk-IYT6NN2J.js";export{FOOTER_TYPE,HEADER_TYPE,ROOT_ZONE,TREE_MAX_DEPTH,blockNodeActions,childSlotsOf,locateNode,missingPinnedTypes,nestsInTree,newNodeId,pinnedDuplicateIds,pinnedDuplicateIndices,slotChildrenIn,slotFieldsOf}from"../chunk-PLVEGYK6.js";export{TEXT_STYLE_CASES,TEXT_STYLE_CASE_CSS,isTextStyleCase,textStyleCaseCss,textStyleCaseOfCss}from"../chunk-YHZSBL2N.js";
|
package/dist/easel/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CanvasFrame,CanvasPassThroughContext,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,bindUndoKeys,createEasel,createUseEasel,recordsByDefault,reduce,uiView,useEasel,useEaselApi,useEaselNodeOps,useSelectedFields,validSelection}from"../chunk-
|
|
1
|
+
export{CanvasFrame,CanvasPassThroughContext,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,bindUndoKeys,createEasel,createUseEasel,recordsByDefault,reduce,uiView,useEasel,useEaselApi,useEaselNodeOps,useSelectedFields,validSelection}from"../chunk-6LYK3NGW.js";import"../chunk-TBY3DFKS.js";import"../chunk-ECM5F6JJ.js";import"../chunk-YRLPFZW3.js";import"../chunk-ILXP5VX5.js";import"../chunk-NY7HHUGB.js";import"../chunk-33C6ALT5.js";import"../chunk-MFIRYGHW.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
|
package/dist/fields/index.d.ts
CHANGED
|
@@ -2,12 +2,13 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { S as SettingsBucket } from '../buckets-Tj-nkBpg.js';
|
|
4
4
|
export { D as DesignGroup } from '../buckets-Tj-nkBpg.js';
|
|
5
|
-
import { ShowWhenContext
|
|
6
|
-
export {
|
|
5
|
+
import { ShowWhenContext } from 'efficient-shell/format';
|
|
6
|
+
export { ShowWhenContext, ShowWhenRule, showWhenOf, withShowWhen } from 'efficient-shell/format';
|
|
7
7
|
import { a as InspectorFieldDef, b as FieldRenderer, I as InspectorFields, c as FieldTextProps, d as FieldNumberProps, e as FieldSliderProps, f as FieldSelectManyProps, g as FieldSelectOneProps, F as FieldOption } from '../types-URH28nku.js';
|
|
8
8
|
export { A as ArrayFieldDef, C as CustomFieldDef, h as CustomFieldRenderProps, i as FieldSelectProps, N as NumberFieldDef, O as ObjectFieldDef, R as RadioFieldDef, S as SelectFieldDef, j as SlotFieldDef, T as TextFieldDef, k as TextareaFieldDef } from '../types-URH28nku.js';
|
|
9
9
|
import { R as ResolvableItem } from '../resolve-D68pb3Bx.js';
|
|
10
10
|
export { F as FieldsWords } from '../words-vhnV8sM7.js';
|
|
11
|
+
export { LinkFilter, LinkFilterField, LinkKindChoice, LinkOption, LinkOptionGroup, LinkPicker, LinkPickerProps, LinkRules, LinkTarget } from 'efficient-shell/ui';
|
|
11
12
|
import '../types-41704JE4.js';
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -42,13 +43,6 @@ interface ShowWhenInput {
|
|
|
42
43
|
/** What `context` checks read: where the row is drawn. */
|
|
43
44
|
context?: ShowWhenContext | null;
|
|
44
45
|
}
|
|
45
|
-
/**
|
|
46
|
-
* The way to give a field its rule: the same field, carrying `showWhen`. Its
|
|
47
|
-
* own type is kept, so it still fits whatever field map it goes into.
|
|
48
|
-
*/
|
|
49
|
-
declare function withShowWhen<F extends object>(field: F, rule: ShowWhenRule): F;
|
|
50
|
-
/** The rule a field carries, if any. */
|
|
51
|
-
declare function showWhenOf(field: unknown): ShowWhenRule | undefined;
|
|
52
46
|
/** Whether one field is drawn, by its rule. No rule: drawn. */
|
|
53
47
|
declare function fieldIsShown(field: unknown, input: ShowWhenInput): boolean;
|
|
54
48
|
/**
|
|
@@ -524,4 +518,4 @@ declare function optionFor<V>(options: readonly FieldOption<V>[], value: V | und
|
|
|
524
518
|
declare function FieldSelect<V>(props: FieldSelectManyProps<V>): ReactNode;
|
|
525
519
|
declare function FieldSelect<V>(props: FieldSelectOneProps<V>): ReactNode;
|
|
526
520
|
|
|
527
|
-
export { FieldNumber, FieldNumberProps, FieldOption, type FieldPlan, FieldRenderer, FieldSelect, FieldSelectManyProps, FieldSelectOneProps, FieldSlider, FieldSliderProps, FieldText, FieldTextProps, type FieldsBlock, Inspector, InspectorField, InspectorFieldDef, type InspectorFieldProps, InspectorFields, type InspectorProps, ListField, type ListFieldProps, type PlannedFold, type PlannedRow, type ResolvedFieldsInput, SettingsBucket, type ShowWhenInput, bucketsOf, copyItem, fieldIsShown, insertAt, labelOf, moveTo, optionFor, planFields, removeAt,
|
|
521
|
+
export { FieldNumber, FieldNumberProps, FieldOption, type FieldPlan, FieldRenderer, FieldSelect, FieldSelectManyProps, FieldSelectOneProps, FieldSlider, FieldSliderProps, FieldText, FieldTextProps, type FieldsBlock, Inspector, InspectorField, InspectorFieldDef, type InspectorFieldProps, InspectorFields, type InspectorProps, ListField, type ListFieldProps, type PlannedFold, type PlannedRow, type ResolvedFieldsInput, SettingsBucket, type ShowWhenInput, bucketsOf, copyItem, fieldIsShown, insertAt, labelOf, moveTo, optionFor, planFields, removeAt, shownFields, useResolvedFields };
|
package/dist/fields/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{FieldText,Inspector,InspectorField,LinkPicker,ListField,bucketsOf,copyItem,insertAt,labelOf,moveTo,planFields,removeAt}from"../chunk-
|
|
1
|
+
export{FieldText,Inspector,InspectorField,LinkPicker,ListField,bucketsOf,copyItem,insertAt,labelOf,moveTo,planFields,removeAt}from"../chunk-2QX2VB2C.js";export{fieldIsShown,showWhenOf,shownFields,withShowWhen}from"../chunk-BPXEFVSQ.js";export{FieldSlider}from"../chunk-XWFH2NHZ.js";import"../chunk-4JSBIW5H.js";import"../chunk-K56YDHYQ.js";import"../chunk-EA2HTX37.js";import"../chunk-RC25EGHD.js";import"../chunk-KFV7N2DJ.js";import"../chunk-67GNT6PF.js";import"../chunk-P2VEMZH5.js";export{useResolvedFields}from"../chunk-YRLPFZW3.js";export{FieldNumber}from"../chunk-2XMHLXMA.js";export{FieldSelect,optionFor}from"../chunk-G3GWAP5R.js";import"../chunk-WRFD4EXD.js";import"../chunk-36LVP5WD.js";import"../chunk-MFIRYGHW.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
|
package/dist/panel/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export{DESIGN_GROUPS,SETTINGS_BUCKETS,SettingsGroup}from"../chunk-RC25EGHD.js";import{DEFAULT_PANEL_WORDS as e}from"../chunk-KFV7N2DJ.js";
|
|
1
|
+
export{DESIGN_GROUPS,SETTINGS_BUCKETS,SettingsGroup}from"../chunk-RC25EGHD.js";import{DEFAULT_PANEL_WORDS as e}from"../chunk-KFV7N2DJ.js";import{withTip as t}from"../chunk-P2VEMZH5.js";export{SettingsField,SettingsSegmented,SettingsSwitch}from"../chunk-36LVP5WD.js";import{Tabs as s,CountBadge as i,Tooltip as n}from"efficient-shell/ui";export{BorderInput as SettingsBorder,CornersInput as SettingsCorners,AlignmentGrid as SettingsPlacement,SidesInput as SettingsSides,SidesEachToggle as SettingsSidesEach,borderSides,borderStartEach,sidesStartEach}from"efficient-shell/ui";import{jsx as a,jsxs as l,Fragment as r}from"react/jsx-runtime";import{RevertIcon as d}from"efficient-shell/icons/efficient";function c(e){const t=e[0];if(!t?.htmlId||!t.htmlId.endsWith(`-tab-${t.id}`))return;const s=t.htmlId.slice(0,-`-tab-${t.id}`.length);return e.every(e=>e.htmlId===`${s}-tab-${e.id}`)?s:void 0}function o({items:t,activeId:n,onSelect:d,ariaLabel:o=e.settings,idPrefix:u,className:m}){
|
|
2
2
|
/* @__PURE__ */
|
|
3
3
|
return a("div",{className:"es-tabs-fit",children:/* @__PURE__ */a(s,{variant:"pill","aria-label":o,idPrefix:u??c(t),className:m?`es-tabs ${m}`:"es-tabs",value:n,onChange:d,items:t.map(e=>{const t="number"==typeof e.badge&&e.badge>0?/* @__PURE__ */a(i,{count:e.badge,tone:"accent"}):null;return e.icon?{id:e.id,tooltip:e.label,label:/* @__PURE__ */l(r,{children:[
|
|
4
4
|
/* @__PURE__ */l("span",{className:"es-tab-tip",children:[
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AddBlockRow as default}from"../../chunk-
|
|
1
|
+
export{AddBlockRow as default}from"../../chunk-QHSYHB4W.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-E7EIYXXM.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-VVPZMWJE.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-6LYK3NGW.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-2QX2VB2C.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-NY7HHUGB.js";import"../../chunk-33C6ALT5.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{blockKey,AddSidePanel as default,sectionKey,templateKey}from"../../chunk-
|
|
1
|
+
export{blockKey,AddSidePanel as default,sectionKey,templateKey}from"../../chunk-2MGZTBPF.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-62VPYC7F.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-E7EIYXXM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-VVPZMWJE.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-QFVRMARS.js";import"../../chunk-AYWN5NRH.js";import"../../chunk-6LYK3NGW.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-2QX2VB2C.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-NY7HHUGB.js";import"../../chunk-33C6ALT5.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{MediaSidePanel as default}from"../../chunk-
|
|
1
|
+
export{MediaSidePanel as default}from"../../chunk-SMP54RNN.js";import"../../chunk-E7EIYXXM.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-6LYK3NGW.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-2QX2VB2C.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-NY7HHUGB.js";import"../../chunk-33C6ALT5.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenChrome as default}from"../../chunk-
|
|
1
|
+
export{ScreenChrome as default}from"../../chunk-CHXJDSUC.js";import"../../chunk-L3GSW4XI.js";import"../../chunk-FGNR22NY.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-HV56SLR2.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-LER7RKTO.js";import"../../chunk-7F52SZOI.js";import"../../chunk-W4U4SHKW.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-ET6FNSRA.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-TZIIRGVY.js";import"../../chunk-27CDEFBE.js";import"../../chunk-L25TTU2F.js";import"../../chunk-5545A3PC.js";import"../../chunk-2MGZTBPF.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-62VPYC7F.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-SMP54RNN.js";import"../../chunk-E7EIYXXM.js";import"../../chunk-NW4LJ4G4.js";import"../../chunk-IWFVVCRN.js";import"../../chunk-FBS75I6E.js";import"../../chunk-ERR437B5.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-VVPZMWJE.js";import"../../chunk-V7U33NF2.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-BXMXTO36.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-TBF5CVPA.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-QFVRMARS.js";import"../../chunk-AYWN5NRH.js";import"../../chunk-6LYK3NGW.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-2QX2VB2C.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-4VJATVVR.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-NY7HHUGB.js";import"../../chunk-33C6ALT5.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-BSPCSC45.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DocumentScreen,ScreenMount as default}from"../../chunk-
|
|
1
|
+
export{DocumentScreen,ScreenMount as default}from"../../chunk-L7PSXVI3.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-CHXJDSUC.js";import"../../chunk-L3GSW4XI.js";import"../../chunk-FGNR22NY.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-HV56SLR2.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-LER7RKTO.js";import"../../chunk-7F52SZOI.js";import"../../chunk-W4U4SHKW.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-W26HUPPC.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-ET6FNSRA.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-TZIIRGVY.js";import"../../chunk-27CDEFBE.js";import"../../chunk-L25TTU2F.js";import"../../chunk-5545A3PC.js";import"../../chunk-2MGZTBPF.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-62VPYC7F.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-SMP54RNN.js";import"../../chunk-E7EIYXXM.js";import"../../chunk-NW4LJ4G4.js";import"../../chunk-IWFVVCRN.js";import"../../chunk-FBS75I6E.js";import"../../chunk-ERR437B5.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-VVPZMWJE.js";import"../../chunk-V7U33NF2.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-BXMXTO36.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-TBF5CVPA.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-QFVRMARS.js";import"../../chunk-AYWN5NRH.js";import"../../chunk-6LYK3NGW.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-2QX2VB2C.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-4VJATVVR.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-NY7HHUGB.js";import"../../chunk-33C6ALT5.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-BSPCSC45.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenStoreProvider as default}from"../../chunk-
|
|
1
|
+
export{ScreenStoreProvider as default}from"../../chunk-W26HUPPC.js";import"../../chunk-E7EIYXXM.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-6LYK3NGW.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-2QX2VB2C.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-NY7HHUGB.js";import"../../chunk-33C6ALT5.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{AddBlockRow as e}from"../../chunk-
|
|
2
|
-
return
|
|
3
|
-
return
|
|
4
|
-
/* @__PURE__
|
|
5
|
-
return
|
|
6
|
-
/* @__PURE__
|
|
7
|
-
/* @__PURE__
|
|
8
|
-
/* @__PURE__
|
|
9
|
-
/* @__PURE__
|
|
10
|
-
/* @__PURE__
|
|
11
|
-
return
|
|
12
|
-
/* @__PURE__
|
|
13
|
-
/* @__PURE__
|
|
14
|
-
/* @__PURE__
|
|
15
|
-
/* @__PURE__
|
|
16
|
-
/* @__PURE__
|
|
1
|
+
import{AddBlockRow as e}from"../../chunk-QHSYHB4W.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-4ES5JGGX.js";import{useEaselUndoKeys as r}from"../../chunk-ET6FNSRA.js";import{SlotChildActionsProvider as t}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as s}from"../../chunk-TZIIRGVY.js";import{usePartBridge as i}from"../../chunk-27CDEFBE.js";import{useSectionOps as c}from"../../chunk-L25TTU2F.js";import"../../chunk-HQ4VVRIC.js";import{MediaSidePanel as p}from"../../chunk-SMP54RNN.js";import{SELECTION_MODE as l,useScreenPinned as m,useScreenCanvasFrame as d,useScreenInspectorPanel as a,useScreenPickFollowsSelection as u,sameInspectorMode as h,useStandaloneScreenBridges as k,useScreenBlockLook as f,useScreenBlockRules as j}from"../../chunk-E7EIYXXM.js";import{useScreenDocument as N}from"../../chunk-FBS75I6E.js";import"../../chunk-ERR437B5.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import{useMediaPanel as S,usePanelPick as y,useCancelPanelPick as R}from"../../chunk-R6WTQWAC.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import{useHostEscape as C}from"../../chunk-U3JP4VGF.js";import{DEFAULT_SCREEN_WORDS as x}from"../../chunk-VVPZMWJE.js";import"../../chunk-IQ5TA7AM.js";import{slotChildRowName as A}from"../../chunk-TBF5CVPA.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IYT6NN2J.js";import{slotFieldsOf as E,nestsInTree as P}from"../../chunk-PLVEGYK6.js";import"../../chunk-QFVRMARS.js";import"../../chunk-AYWN5NRH.js";import{useEasel as v}from"../../chunk-6LYK3NGW.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-2QX2VB2C.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import{LayersTree as B,Subtree as H,TreeRow as M,TreeRowAction as V,TreeSeam as g}from"../../chunk-4JSBIW5H.js";import{DEFAULT_TREE_WORDS as F}from"../../chunk-K56YDHYQ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import{useTreeDrag as W}from"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as w,saveIndicator as z}from"../../chunk-H6DDIBQ4.js";import"../../chunk-ILXP5VX5.js";import{SaveState as X,panelWidthVars as Y}from"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-NY7HHUGB.js";import"../../chunk-33C6ALT5.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import{useWords as b}from"../../chunk-MFIRYGHW.js";import{zoneKey as T,parseZoneKey as D}from"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{useState as L,useRef as I,useEffect as O,useCallback as G,Fragment as J}from"react";import{Tooltip as K}from"efficient-shell/ui";import{TrashIcon as Z}from"efficient-shell/icons/efficient";import{jsxs as Q,jsx as $,Fragment as U}from"react/jsx-runtime";var q=e=>n=>{n.target.closest("button, input")||e()},_={rowClick:q};function ee(){const{saveState:ee,readOnly:ne,readOnlyReason:oe=null}=N(),re=c(),{appState:te,selectedItem:se,config:ie}=v(e=>e),[ce,pe]=L(l),le=b("screen",x),me=b("tree",F),de=b("save",w),{first:ae,last:ue,panelOf:he}=m(),ke=he(ae),fe=d(),je=a(),Ne=te.data.content?.[0]??null,Se=Ne?.props.id??null,ye=Ne?.type===ae,Re=Ne?.type===ue,Ce=I(null),xe=I(null);r(xe);const Ae=S(),Ee=y(),Pe=R();u(se?.props.id),O(()=>{const e=xe.current;if(!Ee||!e)return;const n=e=>{"Escape"===e.key&&Pe()};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[Ee]),C(null!==Ee,()=>Pe()),O(()=>{Se&&Ce.current!==Se&&(Ce.current=Se,ye?pe(ke??l):se||re.select({index:0}))},[Se,se,re,ye]);const ve=G(e=>pe(n=>h(n,e)?n:e),[]),Be=k({kind:ce.kind,mode:ce,open:ve,show:e=>pe(e),reveal:()=>{},select:(e,n)=>{pe(e=>h(e,n)?e:n),re.select(e)}}),{selectNode:He}=i({mode:ce,setMode:pe,onOpenPart:n}),Me=f(),{labelAtLevel:Ve,Icon:ge}=Me,{canAddTo:Fe}=j(),We=e=>Ve(e,"block",ie.components[e]?.label??e),we=e=>Ve(e,"section",We(e)),ze=!ye&&"puck"===ce.kind&&se?.props.id===Se,Xe=Ne?Fe(Ne.type)?.spec??null:null,Ye=Ne&&Xe?`${Ne.props.id}:${Xe.slot}`:null,be=Ne&&Xe&&Array.isArray(Ne.props[Xe.slot])?Ne.props[Xe.slot]:[],Te=e=>A(e,We,Me.plainText),De=(e,r)=>{Ne&&Xe&&Ye&&(pe(l),Xe.slider?(o(String(Ne.props.id),e),re.select({index:e,zone:Ye}),n(String(Ne.props.id))):(re.select({index:e,zone:Ye}),n(r)))},Le=()=>{if(!Ne||!Xe||!Ye)return;const e=be.length;re.insertComponent(Ye,Xe.childType,e),pe(l),Xe.slider?requestAnimationFrame(()=>{o(String(Ne.props.id),e),re.select({index:e,zone:Ye})}):re.select({index:e,zone:Ye})},Ie=e=>E(ie,e),Oe=e=>{const{parentId:n,slot:o}=D(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of Ie(e.type)){const o=Array.isArray(e.props[n])?e.props[n]:[];for(const e of o){const n=r(e);if(n)return n}}return null},t=r(Ne)?.props[o];return Array.isArray(t)?t.length:0},Ge=(e,n,o)=>{const r=Math.min(Math.max(o,0),Oe(e)),t=n<r?r-1:r;t!==n&&(re.reorderComponent(e,n,t),pe(l),re.select({index:t,zone:e}))},Je=W({keyOf:e=>e.id,readOnly:Boolean(ne),canDrop:(e,n)=>T(n)===e.zone&&n.index>=0&&n.index<=Oe(e.zone),onDrop:(e,n)=>Ge(e.zone,e.index,n.index),onStep:(e,n)=>Ge(e.zone,e.index,n<0?e.index-1:e.index+2)}),Ke=(e,n)=>/* @__PURE__ */$(g,{...ne?{}:Je.seam({place:{...D(e),index:n}})},`seam:${e}:${n}`),Ze=e=>Me.blockRowName(e,We),Qe=(e,o,r)=>{pe(l),re.select({index:o,zone:e}),n(r)},$e=(e,n,o)=>{re.insertComponent(e,n,o),pe(l),re.select({index:o,zone:e})},Ue=(n,o,r)=>/* @__PURE__ */$(e,{choices:r,onPick:e=>$e(n,e,o)}),qe=(e,n)=>{const o=Ie((r=e).type).flatMap(e=>(Array.isArray(r.props[e])?r.props[e]:[]).map((n,o)=>({child:n,zone:`${r.props.id}:${e}`,index:o})));var r;const t=Fe(e.type),s=t?.choices??null,i="footer"===t?.source?Ze:Te;/* @__PURE__ */
|
|
2
|
+
return Q(U,{children:[o.map(({child:e,zone:o,index:r})=>{const t=se?.props.id===e.props.id,s=P(ie,e.type,n),c=i(e),p=String(e.props.id),m=()=>Qe(o,r,p),{rowProps:d,...a}=Je.row({item:{id:p,zone:o,index:r},place:{...D(o),index:r}},{onClick:q(m)});/* @__PURE__ */
|
|
3
|
+
return Q(J,{children:[0===r&&Ke(o,0),
|
|
4
|
+
/* @__PURE__ */$(M,{words:me,icon:/* @__PURE__ */$(ge,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...a,actions:/* @__PURE__ */$(V,{kind:"delete",label:le.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,re.removeComponent(e,n),pe(l),void re.select(null);var e,n},children:/* @__PURE__ */$(Z,{size:13})}),rowProps:d}),s&&/* @__PURE__ */$(H,{children:qe(e,n+1)}),Ke(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Ue(`${e.props.id}:${t.slot}`,o.length,s):null]})},_e="HeroSingle"===Ne?.type,en=Boolean(Ne)&&(Boolean(Fe(Ne.type))||Ie(Ne.type).length>0),nn=Boolean(Ne)&&(Boolean(Xe)||Re||ye||_e||en);/* @__PURE__ */
|
|
5
|
+
return Q("div",{ref:xe,className:"sf-editor es-editor",style:Y(s),children:[
|
|
6
|
+
/* @__PURE__ */$("div",{className:"sf-section-bar",children:/* @__PURE__ */$(X,null!==oe?{tone:"off",label:oe,role:"status"}:{...z(ee,de),role:"status"})}),
|
|
7
|
+
/* @__PURE__ */Q("div",{className:"sf-body",children:[Ee&&Ae?/* @__PURE__ */$("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:/* @__PURE__ */$(p,{panel:Ae,pick:Ee})}):nn&&Ne&&/* @__PURE__ */Q("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
|
|
8
|
+
/* @__PURE__ */$("div",{className:"sf-panel-head",children:/* @__PURE__ */$(K,{content:ye?le.headerSettings:le.sectionSettings({name:we(Ne.type)}),side:"bottom",children:/* @__PURE__ */$("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(ze?"is-selected":""),"aria-pressed":ze,onClick:()=>{ye?pe(ke??l):(pe(l),re.select({index:0}))},children:we(Ne.type)})})}),
|
|
9
|
+
/* @__PURE__ */$(B,{className:"sf-tree sf-scroll",rootProps:Je.rootProps(),words:me,children:/* @__PURE__ */$(H,{children:ye?
|
|
10
|
+
/* @__PURE__ */$(M,{words:me,icon:/* @__PURE__ */$(ge,{type:"header",size:13}),name:le.headerSettings,selected:ce.kind===ke?.kind,onSelect:()=>pe(ke??l),rowProps:{onClick:q(()=>pe(ke??l))}}):Xe?/* @__PURE__ */Q(U,{children:[be.map((e,n)=>{const o=se?.props.id===e.props.id,r=Te(e),t=String(e.props.id),s=()=>De(n,t),{rowProps:i,...c}=Je.row({item:{id:t,zone:Ye,index:n},place:{...D(Ye),index:n}},{onClick:q(s)});/* @__PURE__ */
|
|
11
|
+
return Q(J,{children:[0===n&&Ke(Ye,0),
|
|
12
|
+
/* @__PURE__ */$(M,{words:me,icon:/* @__PURE__ */$(ge,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */$(V,{kind:"delete",label:le.deleteNamed({name:r}),onClick:()=>{return e=n,void(Ye&&(re.removeComponent(Ye,e),pe(l),re.select(null)));var e},children:/* @__PURE__ */$(Z,{size:13})}),rowProps:i}),Ke(Ye,n+1)]},String(e.props.id??n))}),
|
|
13
|
+
/* @__PURE__ */Q("button",{type:"button",className:"sf-add-card",onClick:Le,children:[
|
|
14
|
+
/* @__PURE__ */$("span",{className:"sf-plus sf-plus--sm",children:"+"}),Xe.addLabel]}),Se?Be.partRows?.(Ne,_):null]}):qe(Ne,1)})})]}),
|
|
15
|
+
/* @__PURE__ */$("div",{className:"sf-center",children:/* @__PURE__ */$("div",{className:"sf-preview-host",children:/* @__PURE__ */$(fe,{})})}),
|
|
16
|
+
/* @__PURE__ */$(t,{value:{selectChild:(e,n,o,r)=>"section"===Fe(r)?.source?De(n,o):Qe(e,n,o),addChild:(e,n,o,r,t)=>"section"===Fe(t)?.source?Le():$e(`${e}:${n}`,o,r),childRowName:Te,blockRowName:Ze},children:/* @__PURE__ */$(je,{mode:ce,onOpenWebsiteSettings:Be.openSettings??(()=>{}),onSelectNode:He,hideNodeActions:!0})})]})]})}export{ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{usePartBridge}from"../../chunk-
|
|
1
|
+
export{usePartBridge}from"../../chunk-27CDEFBE.js";import"../../chunk-L25TTU2F.js";import"../../chunk-E7EIYXXM.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-6LYK3NGW.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-2QX2VB2C.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-NY7HHUGB.js";import"../../chunk-33C6ALT5.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";
|
package/dist/screen/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-
|
|
1
|
+
import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-L7PSXVI3.js";import"../chunk-GXQCZJOP.js";import"../chunk-CHXJDSUC.js";import"../chunk-L3GSW4XI.js";import"../chunk-FGNR22NY.js";import"../chunk-2GVCAIPX.js";import"../chunk-26OOWIJJ.js";import"../chunk-HV56SLR2.js";import"../chunk-MQNBD6AB.js";import"../chunk-LER7RKTO.js";import"../chunk-7F52SZOI.js";import"../chunk-W4U4SHKW.js";import"../chunk-RKTF5XLP.js";export{ScreenStoreProvider}from"../chunk-W26HUPPC.js";import"../chunk-4ES5JGGX.js";import"../chunk-ET6FNSRA.js";import"../chunk-KCBEE2MC.js";import"../chunk-TZIIRGVY.js";import"../chunk-27CDEFBE.js";import"../chunk-L25TTU2F.js";import"../chunk-5545A3PC.js";import"../chunk-2MGZTBPF.js";import"../chunk-PA3PNTVV.js";import"../chunk-BVN33R76.js";import"../chunk-5ZBY24K7.js";import"../chunk-62VPYC7F.js";import"../chunk-HQ4VVRIC.js";import"../chunk-SMP54RNN.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-E7EIYXXM.js";import"../chunk-NW4LJ4G4.js";import"../chunk-IWFVVCRN.js";import"../chunk-FBS75I6E.js";import"../chunk-ERR437B5.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-S4AWJX4Q.js";import"../chunk-KG7RJWOK.js";import"../chunk-VPFNZ7TB.js";import"../chunk-LOMEH6DG.js";import"../chunk-KCOBHPN6.js";import"../chunk-R6WTQWAC.js";export{EaselSessionProvider,useEaselSession}from"../chunk-O7Q4DDJT.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-RSCMJIWS.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-U3JP4VGF.js";import"../chunk-UMDQ6CLQ.js";import"../chunk-VVPZMWJE.js";import"../chunk-V7U33NF2.js";import"../chunk-6WY6ZXJG.js";import"../chunk-BXMXTO36.js";import"../chunk-OSPUG6S6.js";import"../chunk-WK3AFPXY.js";import"../chunk-IQ5TA7AM.js";import"../chunk-TBF5CVPA.js";import"../chunk-DUVRZ456.js";import"../chunk-6W7WLPZH.js";import"../chunk-IYT6NN2J.js";import"../chunk-PLVEGYK6.js";import"../chunk-QFVRMARS.js";import"../chunk-AYWN5NRH.js";import"../chunk-6LYK3NGW.js";import"../chunk-TBY3DFKS.js";import"../chunk-ECM5F6JJ.js";import"../chunk-2QX2VB2C.js";import"../chunk-BPXEFVSQ.js";import"../chunk-XWFH2NHZ.js";import"../chunk-4JSBIW5H.js";import"../chunk-K56YDHYQ.js";import"../chunk-EA2HTX37.js";import"../chunk-RC25EGHD.js";import"../chunk-KFV7N2DJ.js";import"../chunk-67GNT6PF.js";import"../chunk-P2VEMZH5.js";import"../chunk-YRLPFZW3.js";import"../chunk-4VJATVVR.js";import"../chunk-NDRZP6YR.js";import"../chunk-H6DDIBQ4.js";import"../chunk-ILXP5VX5.js";import"../chunk-IE55HNMA.js";import"../chunk-Z6PVRXVY.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-MJM6SFD3.js";import"../chunk-2OAZYSWJ.js";import"../chunk-NY7HHUGB.js";import"../chunk-33C6ALT5.js";import"../chunk-2XMHLXMA.js";import"../chunk-G3GWAP5R.js";import"../chunk-WRFD4EXD.js";import"../chunk-36LVP5WD.js";import"../chunk-MFIRYGHW.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";import"../chunk-BSPCSC45.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-
|
|
1
|
+
export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-ET6FNSRA.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6LYK3NGW.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-NY7HHUGB.js";import"../../chunk-33C6ALT5.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DEVICE_FIELD_MARKER,DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceMetaOf,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-
|
|
1
|
+
export{DEVICE_FIELD_MARKER,DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceMetaOf,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-HV56SLR2.js";import"../../../chunk-7F52SZOI.js";import"../../../chunk-VVPZMWJE.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{panelFieldsOf}from"../../../chunk-
|
|
1
|
+
export{panelFieldsOf}from"../../../chunk-LER7RKTO.js";import"../../../chunk-BPXEFVSQ.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{gotoPreviewSlide,pinPreviewToBottom,pinPreviewToSection,previewFrame,scrollPreviewToSection,scrollPreviewToTop}from"../../../chunk-
|
|
1
|
+
export{gotoPreviewSlide,pinPreviewToBottom,pinPreviewToSection,previewFrame,scrollPreviewToSection,scrollPreviewToTop}from"../../../chunk-4ES5JGGX.js";import"../../../chunk-IQ5TA7AM.js";import"../../../chunk-R5L2E7JX.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-
|
|
1
|
+
export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-L3GSW4XI.js";import"../../../chunk-HV56SLR2.js";import"../../../chunk-MQNBD6AB.js";import"../../../chunk-LER7RKTO.js";import"../../../chunk-7F52SZOI.js";import"../../../chunk-VVPZMWJE.js";import"../../../chunk-V7U33NF2.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-DUVRZ456.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useSectionOps}from"../../../chunk-
|
|
1
|
+
export{useSectionOps}from"../../../chunk-L25TTU2F.js";import"../../../chunk-E7EIYXXM.js";import"../../../chunk-R6WTQWAC.js";import"../../../chunk-U3JP4VGF.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-6LYK3NGW.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-ECM5F6JJ.js";import"../../../chunk-2QX2VB2C.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-XWFH2NHZ.js";import"../../../chunk-4JSBIW5H.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-EA2HTX37.js";import"../../../chunk-RC25EGHD.js";import"../../../chunk-KFV7N2DJ.js";import"../../../chunk-67GNT6PF.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-YRLPFZW3.js";import"../../../chunk-ILXP5VX5.js";import"../../../chunk-NY7HHUGB.js";import"../../../chunk-33C6ALT5.js";import"../../../chunk-2XMHLXMA.js";import"../../../chunk-G3GWAP5R.js";import"../../../chunk-WRFD4EXD.js";import"../../../chunk-36LVP5WD.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-KRXQM65X.js";import"../../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-
|
|
1
|
+
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-E7EIYXXM.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-6LYK3NGW.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-2QX2VB2C.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-NY7HHUGB.js";import"../../chunk-33C6ALT5.js";import"../../chunk-2XMHLXMA.js";import"../../chunk-G3GWAP5R.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-
|
|
1
|
+
export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-AKZ4QYHO.js";import"../chunk-OGH6CC3E.js";import"../chunk-643PVCEG.js";import"../chunk-VVPZMWJE.js";import"../chunk-6WY6ZXJG.js";import"../chunk-WK3AFPXY.js";import"../chunk-AYWN5NRH.js";import"../chunk-TBY3DFKS.js";import"../chunk-K56YDHYQ.js";import"../chunk-KFV7N2DJ.js";import"../chunk-H6DDIBQ4.js";import"../chunk-Z6PVRXVY.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-33C6ALT5.js";import"../chunk-WRFD4EXD.js";
|
package/dist/strings/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{DEFAULT_EASEL_STRINGS as r,mergeEaselStrings as n}from"../chunk-
|
|
1
|
+
import{DEFAULT_EASEL_STRINGS as r,mergeEaselStrings as n}from"../chunk-AKZ4QYHO.js";export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-AKZ4QYHO.js";import"../chunk-OGH6CC3E.js";import"../chunk-643PVCEG.js";import"../chunk-VVPZMWJE.js";import"../chunk-6WY6ZXJG.js";import"../chunk-WK3AFPXY.js";import"../chunk-AYWN5NRH.js";import"../chunk-TBY3DFKS.js";import"../chunk-K56YDHYQ.js";import"../chunk-KFV7N2DJ.js";import"../chunk-H6DDIBQ4.js";import"../chunk-Z6PVRXVY.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-33C6ALT5.js";import"../chunk-WRFD4EXD.js";import{stringsContext as o}from"../chunk-MFIRYGHW.js";import{useContext as t,useMemo as c}from"react";import{jsx as i}from"react/jsx-runtime";function s({value:s,locale:u,children:m}){const e=o(),p=t(e),h=p?.strings??r,j=u??p?.locale??"en",k=c(()=>({strings:n(h,s),locale:j}),[h,s,j]);/* @__PURE__ */
|
|
2
2
|
return i(e.Provider,{value:k,children:m})}function u(){return t(o())?.strings??r}function m(){return t(o())?.locale??"en"}export{s as EaselStringsProvider,m as useEaselLocale,u as useEaselStrings};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import{DEFAULT_TEXT_STYLES_WORDS as e}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import{hexReadout as s,ColourWindow as t,typedHex as a}from"../chunk-5XUMLKQF.js";import"../chunk-643PVCEG.js";import{FieldSlider as n}from"../chunk-XWFH2NHZ.js";import{TEXT_STYLE_KINDS as
|
|
1
|
+
import{DEFAULT_TEXT_STYLES_WORDS as e}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import{hexReadout as s,ColourWindow as t,typedHex as a}from"../chunk-5XUMLKQF.js";import"../chunk-643PVCEG.js";import{FieldSlider as n}from"../chunk-XWFH2NHZ.js";import{withTip as l}from"../chunk-P2VEMZH5.js";import{TEXT_STYLE_KINDS as i,canAddTextStyle as r,TEXT_STYLE_MAX as o,isDefaultTextStyle as d,CAMPAIGN_TEXT_STYLE_SETTINGS as c,TEXT_STYLE_SETTINGS as u,textStyleRowSize as m,describeTextStyle as h,updateTextStyle as f,textStyleCaseCss as p,TEXT_STYLE_CASES as v,addTextStyle as y,removeTextStyle as S,TEXT_STYLE_RANGES as g}from"../chunk-YHZSBL2N.js";export{CAMPAIGN_TEXT_STYLE_SETTINGS,TEXT_STYLE_CASES,TEXT_STYLE_CASE_CSS,TEXT_STYLE_DEFAULT_COUNT,TEXT_STYLE_KINDS,TEXT_STYLE_MAX,TEXT_STYLE_RANGES,TEXT_STYLE_SETTINGS,addTextStyle,canAddTextStyle,defaultTextStyles,describeTextStyle,isDefaultTextStyle,isTextStyleCase,removeTextStyle,resolveTextStyle,textStyleCaseCss,textStyleCaseOfCss,textStyleRowSize,updateTextStyle,weightWord}from"../chunk-YHZSBL2N.js";import{FieldSelect as b}from"../chunk-G3GWAP5R.js";import"../chunk-WRFD4EXD.js";import{useWords as k}from"../chunk-MFIRYGHW.js";import{hsvToHex as N,Tooltip as C,ColorSwatch as x,IconButton as T}from"efficient-shell/ui";import{useState as w,useRef as E,useId as z,useEffect as O,Fragment as _}from"react";import{TrashIcon as L,ChevronIcon as A,BoldIcon as M,ItalicIcon as j,CaseLowerIcon as X,CaseCapitalizedIcon as $,CaseUpperIcon as W,CaseNormalIcon as Y}from"efficient-shell/icons/efficient";import{jsxs as D,jsx as G,Fragment as I}from"react/jsx-runtime";var P=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>N({h:e,s:1,v:1})).join(", ")})`;function F({value:e,hex:a,colours:n,label:l,followsWord:i,anyWord:r,onChange:o,readOnly:d=!1}){const[c,u]=w(!1),m=E(null),h=E(null),f=z(),p=void 0!==e&&n.some(s=>s.key===e),v=void 0!==e&&!p;return O(()=>{if(!c)return;const e=m.current?.ownerDocument;if(!e)return;const s=e=>{m.current&&!m.current.contains(e.target)&&u(!1)};return e.addEventListener("click",s,!0),()=>e.removeEventListener("click",s,!0)},[c]),/* @__PURE__ */D("div",{ref:m,className:"es-ts-set","data-ts-setting":"color",children:[
|
|
2
2
|
/* @__PURE__ */D("div",{className:"es-ts-top",children:[
|
|
3
3
|
/* @__PURE__ */G("span",{className:"es-ts-sub",children:l}),
|
|
4
4
|
/* @__PURE__ */G("span",{className:"es-ts-colour-read",children:a?s(a):i})]}),
|
|
5
5
|
/* @__PURE__ */D("div",{className:"es-ts-swatches",role:"group","aria-label":l,children:[n.map(t=>/* @__PURE__ */G(C,{content:`${t.name} · ${s(t.value)}`,children:/* @__PURE__ */G(x,{color:t.value,size:"sm",className:"es-ts-swatch","aria-label":t.name,selected:e===t.key,disabled:d,onClick:()=>o(t.key)})},t.key)),
|
|
6
|
-
/* @__PURE__ */G(C,{content:r,children:/* @__PURE__ */G(x,{ref:h,color:P,size:"sm",className:"es-ts-swatch es-ts-swatch--any","aria-label":r,selected:v,"aria-expanded":c,"aria-controls":c?f:void 0,disabled:d,onClick:()=>u(e=>!e)})})]}),c?/* @__PURE__ */G(t,{id:f,value:a??"",onChange:e=>o(e),label:l,readOnly:d,onClose:()=>{u(!1),h.current?.focus()}}):null]})}function H({styles:s,onChange:t,fonts:a,colours:n=[],settings:c
|
|
7
|
-
return G("div",{className:"es-ts",ref:Y,children:
|
|
8
|
-
return D(R,{label:A.groups[e],children:[
|
|
9
|
-
return G(B,{style:e,fonts:a,colours:n,settings:
|
|
6
|
+
/* @__PURE__ */G(C,{content:r,children:/* @__PURE__ */G(x,{ref:h,color:P,size:"sm",className:"es-ts-swatch es-ts-swatch--any","aria-label":r,selected:v,"aria-expanded":c,"aria-controls":c?f:void 0,disabled:d,onClick:()=>u(e=>!e)})})]}),c?/* @__PURE__ */G(t,{id:f,value:a??"",onChange:e=>o(e),label:l,readOnly:d,onClose:()=>{u(!1),h.current?.focus()}}):null]})}function H({styles:s,onChange:t,fonts:a,colours:n=[],settings:u=c,auto:m=[],fallback:h,sample:f,openId:p,defaultOpenId:v=null,onOpenChange:g,onAdd:b,rowActions:N,onRemove:C,max:x=o,device:T="desktop",readOnly:_=!1}){const A=k("textStyles",e),M=z(),[j,X]=w(v),$=void 0!==p?p:j,W=e=>{void 0===p&&X(e),g?.(e)},Y=E(null),[P,F]=w(null);O(()=>{if(!P||!Y.current)return;const e=[...Y.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===P.id),s=e?e.querySelector(".es-ts-row"):Y.current.querySelector(`.es-ts-add[data-ts-kind="${P.kind}"]`);s?.focus(),F(null)},[P]);/* @__PURE__ */
|
|
7
|
+
return G("div",{className:"es-ts",ref:Y,children:i.map(e=>{const i=s.filter(s=>s.kind===e),o=!r(s,e,x),c=!_&&!o;/* @__PURE__ */
|
|
8
|
+
return D(R,{label:A.groups[e],children:[i.map(e=>{const i=N?.(e),r=null!=i&&!1!==i,o=Boolean(C)&&!_&&!d(e);/* @__PURE__ */
|
|
9
|
+
return G(B,{style:e,fonts:a,colours:n,settings:u,auto:m,fallback:h,sample:f,device:T,readOnly:_,open:$===e.id,onOpenChange:s=>W(s?e.id:null),onChange:e=>t(s.map(s=>s.id===e.id?e:s)),actions:o||r?/* @__PURE__ */D(I,{children:[o?l(A.remove,/* @__PURE__ */G("button",{type:"button",className:"es-ts-del","aria-label":A.removeNamed({name:e.name}),onClick:()=>(e=>{if(_||!C)return;const a=S(s,e.id,{name:A.styleName});if(!a)return;const n=s.filter(s=>s.kind===e.kind),l=n[n.indexOf(e)+1];$===e.id&&W(null),t(a.styles),C(a.removed),F({id:l?.id??null,kind:e.kind})})(e),children:/* @__PURE__ */G(L,{size:14,"aria-hidden":"true"})})):null,r?i:null]}):null},e.id)}),l(!_&&o?A.full({kind:e,max:x}):void 0,/* @__PURE__ */D("button",{type:"button",className:"es-ts-add","data-ts-kind":e,disabled:_,"aria-disabled":!(_||!o)||void 0,"aria-describedby":!_&&o?`${M}-full-${e}`:void 0,onClick:()=>{c&&(e=>{if(_)return;const a=y(s,e,{max:x,name:A.styleName,make:b});a&&t(a.styles)})(e)},children:[
|
|
10
10
|
/* @__PURE__ */G("span",{className:"es-ts-add-word",children:A.add[e]}),
|
|
11
|
-
/* @__PURE__ */G("span",{className:"es-ts-count",children:A.count({n:
|
|
11
|
+
/* @__PURE__ */G("span",{className:"es-ts-count",children:A.count({n:i.length,max:x})})]})),_||!o?null:/* @__PURE__ */G("span",{id:`${M}-full-${e}`,className:"es-vh",children:A.full({kind:e,max:x})})]},e)})})}function R({label:e,children:s}){const t=z();/* @__PURE__ */
|
|
12
12
|
return D("section",{className:"es-ts-section","aria-labelledby":t,children:[
|
|
13
|
-
/* @__PURE__ */G("div",{className:"es-ts-group",id:t,children:e}),s]})}function B({style:s,fonts:t,colours:a=[],settings:n=
|
|
13
|
+
/* @__PURE__ */G("div",{className:"es-ts-group",id:t,children:e}),s]})}function B({style:s,fonts:t,colours:a=[],settings:n=c,auto:l=[],fallback:i,sample:r,open:o,onOpenChange:d,onChange:p,actions:v,device:y="desktop",readOnly:S=!1}){const g=k("textStyles",e),b=`${z()}-open-${s.id}`,N=new Set(l),C=u.filter(e=>n.includes(e)),x={...i?.(s)??{},...s.values},T="phone"===y,w=T&&void 0!==s.values.sizePhone?{...x,size:s.values.sizePhone}:x,E=t.find(e=>e.value===x.font),O={fontFamily:E?.family,fontSize:`${m(w.size??16)}px`,fontWeight:x.weight,fontStyle:x.italic?"italic":void 0};/* @__PURE__ */
|
|
14
14
|
return D(_,{children:[
|
|
15
15
|
/* @__PURE__ */D("div",{className:"es-ts-item","data-ts-id":s.id,children:[
|
|
16
|
-
/* @__PURE__ */D("button",{type:"button",className:"es-ts-row","aria-expanded":o,"aria-controls":o?
|
|
16
|
+
/* @__PURE__ */D("button",{type:"button",className:"es-ts-row","aria-expanded":o,"aria-controls":o?b:void 0,onClick:()=>d(!o),children:[
|
|
17
17
|
/* @__PURE__ */G("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */G(A,{size:12})}),
|
|
18
18
|
/* @__PURE__ */G("span",{className:"es-ts-name",style:O,children:s.name}),
|
|
19
|
-
/* @__PURE__ */G("span",{className:"es-ts-meta",children:
|
|
20
|
-
return G("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */G(n,{label:
|
|
19
|
+
/* @__PURE__ */G("span",{className:"es-ts-meta",children:h(w,t,g,{autoSize:N.has("size")&&w===x&&void 0===s.values.size})})]}),v?/* @__PURE__ */G("div",{className:"es-ts-actions",children:v}):null]}),o?/* @__PURE__ */G("div",{className:"es-ts-open",id:b,children:/* @__PURE__ */G(V,{style:s,values:x,fonts:t,colours:a,settings:C,autoSet:N,sample:r??g.sample,words:g,phone:T,readOnly:S,set:e=>p(f([s],s.id,e)[0])})}):null]})}var U={none:Y,upper:W,capitalize:$,lower:X};function V({style:e,values:s,fonts:t,colours:i,settings:r,autoSet:o,sample:d,words:c,phone:u,readOnly:m,set:h}){const f=e.values,v=t.find(e=>e.value===s.font),y=function(e,s){return e?s.find(s=>s.key===e)?.value??a(e)??void 0:void 0}(s.color,i),S=e=>"largestSize"===e||o.has(e),b=e=>S(e)?f[e]:s[e],k=b("size"),N=u&&void 0!==f.sizePhone?f.sizePhone:k,C=b("lineSpacing"),x=b("letterSpacing"),w=S("letterCase")?f.letterCase:s.letterCase,E={fontFamily:v?.family,fontSize:void 0===N?void 0:`${N}px`,fontWeight:s.weight,fontStyle:s.italic?"italic":void 0,lineHeight:void 0===C?void 0:String(C/100),letterSpacing:void 0===x?void 0:`${x}px`,color:y,textTransform:p(w)},z=e=>{const t=g[e],a=S(e);/* @__PURE__ */
|
|
20
|
+
return G("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */G(n,{label:c.settings[e],value:f[e],onChange:s=>h({[e]:s}),min:t.min,max:t.max,step:t.step,shiftStep:t.shiftStep,sliderMin:t.sliderMin,sliderMax:t.sliderMax,unit:t.unit||void 0,styleValue:a?void 0:s[e],auto:a?c.auto:void 0,readOnly:m})},e)};/* @__PURE__ */
|
|
21
21
|
return D(I,{children:[
|
|
22
|
-
/* @__PURE__ */G("div",{className:"es-ts-preview",style:E,"aria-label":
|
|
23
|
-
return G(Z,{value:
|
|
24
|
-
return G(q,{value:
|
|
22
|
+
/* @__PURE__ */G("div",{className:"es-ts-preview",style:E,"aria-label":c.preview,children:d}),r.map(a=>{switch(a){case"font":/* @__PURE__ */
|
|
23
|
+
return G(Z,{value:f.font,fonts:t,words:c,readOnly:m,set:h},a);case"color":/* @__PURE__ */
|
|
24
|
+
return G(q,{value:f.color,hex:y,colours:i,words:c,readOnly:m,set:h},a);case"emphasis":{const e=(s.weight??400)>=600,t=!1!==v?.italic;/* @__PURE__ */
|
|
25
25
|
return D("div",{className:"es-ts-set","data-ts-setting":a,children:[
|
|
26
|
-
/* @__PURE__ */G("span",{className:"es-ts-sub",children:
|
|
27
|
-
/* @__PURE__ */D("div",{className:"es-ts-icons",children:[
|
|
28
|
-
return G(K,{value:
|
|
29
|
-
return G("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */G(n,{label:
|
|
26
|
+
/* @__PURE__ */G("span",{className:"es-ts-sub",children:c.settings.emphasis}),
|
|
27
|
+
/* @__PURE__ */D("div",{className:"es-ts-icons",children:[l(c.bold,/* @__PURE__ */G(T,{className:"es-ts-icon","aria-label":c.bold,"aria-pressed":e,disabled:m,onClick:()=>h({weight:e?400:700}),children:/* @__PURE__ */G(M,{size:16})})),m||t?l(c.italic,/* @__PURE__ */G(T,{className:"es-ts-icon","aria-label":c.italic,"aria-pressed":Boolean(s.italic),disabled:m,onClick:()=>h({italic:!s.italic||void 0}),children:/* @__PURE__ */G(j,{size:16})})):/* @__PURE__ */G(T,{className:"es-ts-icon","aria-label":c.italic,"aria-pressed":Boolean(s.italic),"aria-disabled":!0,disabledReason:c.italicMissing,children:/* @__PURE__ */G(j,{size:16})})]})]},a)}case"letterCase":/* @__PURE__ */
|
|
28
|
+
return G(K,{value:f.letterCase??s.letterCase,auto:S("letterCase"),words:c,readOnly:m,set:h},a);case"largestSize":return"heading"===e.kind?z(a):null;case"size":return u?(()=>{const e=g.size;/* @__PURE__ */
|
|
29
|
+
return G("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */G(n,{label:c.settings.size,value:f.sizePhone,onChange:e=>h({sizePhone:e}),min:e.min,max:e.max,step:e.step,shiftStep:e.shiftStep,sliderMin:e.sliderMin,sliderMax:e.sliderMax,unit:e.unit||void 0,styleValue:k,readOnly:m})},"size")})():z(a);default:return z(a)}})]})}function Z({value:e,fonts:s,words:t,readOnly:a,set:n}){const l=z();/* @__PURE__ */
|
|
30
30
|
return D("div",{className:"es-ts-set","data-ts-setting":"font",children:[
|
|
31
31
|
/* @__PURE__ */G("span",{className:"es-ts-sub",id:l,children:t.settings.font}),
|
|
32
|
-
/* @__PURE__ */G(
|
|
33
|
-
return G(F,{value:e,hex:s,colours:t,label:a.settings.color,followsWord:a.colour.follows,anyWord:a.colour.any,readOnly:n,onChange:e=>l({color:e})})}function K({value:e,auto:s,words:t,readOnly:a,set:n}){const
|
|
32
|
+
/* @__PURE__ */G(b,{value:e,options:s.map(e=>({label:e.label,value:e.value})),onChange:e=>n({font:e}),ariaLabelledBy:l,readOnly:a})]})}function q({value:e,hex:s,colours:t,words:a,readOnly:n,set:l}){/* @__PURE__ */
|
|
33
|
+
return G(F,{value:e,hex:s,colours:t,label:a.settings.color,followsWord:a.colour.follows,anyWord:a.colour.any,readOnly:n,onChange:e=>l({color:e})})}function K({value:e,auto:s,words:t,readOnly:a,set:n}){const i=s?["auto",...v]:v,r=e??(s?"auto":"none"),o=E([]),d=e=>n({letterCase:"auto"===e?void 0:e});/* @__PURE__ */
|
|
34
34
|
return D("div",{className:"es-ts-set","data-ts-setting":"letterCase",children:[
|
|
35
35
|
/* @__PURE__ */G("span",{className:"es-ts-sub",children:t.settings.letterCase}),
|
|
36
|
-
/* @__PURE__ */G("div",{className:"es-ts-icons",role:"radiogroup","aria-label":t.settings.letterCase,onKeyDown:e=>{const s="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!s||a)return;e.preventDefault();const t=(
|
|
36
|
+
/* @__PURE__ */G("div",{className:"es-ts-icons",role:"radiogroup","aria-label":t.settings.letterCase,onKeyDown:e=>{const s="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!s||a)return;e.preventDefault();const t=(i.indexOf(r)+s+i.length)%i.length;d(i[t]),o.current[t]?.focus()},children:i.map((e,s)=>{const n=e===r;if("auto"===e)return l(t.case.autoTitle,/* @__PURE__ */G(T,{ref:e=>{o.current[s]=e},role:"radio",pressed:n,className:"es-ts-icon es-ts-icon--word","aria-checked":n,"aria-label":t.case.auto,tabIndex:n?0:-1,disabled:a,onClick:()=>d(e),children:t.case.auto},e));const i=U[e];return l(t.case[e],/* @__PURE__ */G(T,{ref:e=>{o.current[s]=e},role:"radio",pressed:n,className:"es-ts-icon","aria-checked":n,"aria-label":t.case[e],tabIndex:n?0:-1,disabled:a,onClick:()=>d(e),children:/* @__PURE__ */G(i,{size:16})},e))})})]})}export{F as ColourSwatchRow,B as TextStyleItem,R as TextStylesGroup,H as TextStylesList};
|