efficient-easel 26.7.0 → 26.8.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/dist/{chunk-3PN3MAKW.js → chunk-2QXMDK67.js} +7 -7
- package/dist/chunk-A2B6FLZP.js +1 -0
- package/dist/{chunk-XJ2EEEAU.js → chunk-AVTC2WMN.js} +3 -3
- package/dist/{chunk-RZ54L6EW.js → chunk-C7IFWSUA.js} +10 -10
- package/dist/chunk-CRITA6CA.js +1 -0
- package/dist/{chunk-LP2SVO74.js → chunk-CVS3RPO6.js} +1 -1
- package/dist/chunk-EEIDFHOG.js +14 -0
- package/dist/chunk-ETNX2ASF.js +4 -0
- package/dist/{chunk-OB5JP6PR.js → chunk-EVYIDHCK.js} +5 -5
- package/dist/{chunk-PLHMOQXY.js → chunk-GQXH7DQV.js} +1 -1
- package/dist/chunk-N7TLQQ3R.js +1 -0
- package/dist/chunk-ODHJRBJV.js +5 -0
- package/dist/{chunk-MLGEQMZA.js → chunk-PL2L6G3B.js} +41 -41
- package/dist/{chunk-PSMO25EV.js → chunk-QYSNJDMW.js} +1 -1
- package/dist/{chunk-ZCMNFB3Y.js → chunk-STQDOTHF.js} +1 -1
- package/dist/{chunk-X73RVMHK.js → chunk-YBDSG4BV.js} +1 -1
- package/dist/copy/index.js +11 -11
- package/dist/easel/index.js +1 -1
- package/dist/fields/index.js +1 -1
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.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 +15 -15
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/document/block-set-host.js +1 -1
- package/dist/screen/lib/document/block-size-fields.js +1 -1
- package/dist/screen/lib/document/box-fields.js +1 -1
- package/dist/screen/lib/document/button-fields.js +1 -1
- package/dist/screen/lib/document/image-fields.js +5 -5
- package/dist/screen/lib/document/shadow-fields.d.ts +74 -0
- package/dist/screen/lib/document/shadow-fields.js +2 -0
- package/dist/screen/lib/document/shadow-values.d.ts +17 -0
- package/dist/screen/lib/document/shadow-values.js +1 -0
- package/dist/screen/lib/document/style-fields.d.ts +3 -1
- package/dist/screen/lib/document/style-fields.js +1 -1
- package/dist/screen/lib/document/use-section-ops.js +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/strings/index.js +1 -1
- package/dist/text-styles/index.js +1 -1
- package/package.json +14 -2
- package/dist/chunk-AYYPU7YZ.js +0 -14
- package/dist/chunk-KCTFS4KB.js +0 -1
- package/dist/chunk-OXKGD2K7.js +0 -5
- package/dist/chunk-QPXMKAQT.js +0 -1
- package/dist/chunk-QYEZMQSD.js +0 -4
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BoxField, BoxFieldSay } from './box-fields.js';
|
|
3
|
+
import { Shadow } from './shadow-values.js';
|
|
4
|
+
export { DEFAULT_SHADOW, DEFAULT_SHADOW_COLOR, SHADOWS, shadowValue } from './shadow-values.js';
|
|
5
|
+
import 'efficient-shell/format';
|
|
6
|
+
import 'efficient-shell/ui';
|
|
7
|
+
import '../../../types-BusXrvDU.js';
|
|
8
|
+
import '../../../wordFit-7XpmhcaW.js';
|
|
9
|
+
import '../../../words-BrN08Fup.js';
|
|
10
|
+
import '../../../buckets-_MGDYJlb.js';
|
|
11
|
+
import '../../../ScreenDocumentContext-DPW_6gOC.js';
|
|
12
|
+
import '../../../blocks/index.js';
|
|
13
|
+
import '../../../types-BljCVdzR.js';
|
|
14
|
+
import '../../../data/index.js';
|
|
15
|
+
import '../../../types-Dq180WRV.js';
|
|
16
|
+
import '../../../resolve-Bz4mszpL.js';
|
|
17
|
+
import '../../../plan-D0DgSLnY.js';
|
|
18
|
+
import '../document-contract.js';
|
|
19
|
+
import '../document-switch.js';
|
|
20
|
+
import '../../../engine-CvXpFE86.js';
|
|
21
|
+
import '../../../edit-lock/index.js';
|
|
22
|
+
import '../admin-bridge.js';
|
|
23
|
+
import '../session.js';
|
|
24
|
+
import '../backend-error.js';
|
|
25
|
+
import '../host-chrome.js';
|
|
26
|
+
import '../links/link-filters.js';
|
|
27
|
+
import '../document-hooks.js';
|
|
28
|
+
import '../section-template-types.js';
|
|
29
|
+
import './content-tree.js';
|
|
30
|
+
import '../shared-section-types.js';
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* THE ONE SHADOW ROW of both editors, and the colour row under it.
|
|
34
|
+
*
|
|
35
|
+
* The website's Card shadow (web-builder `CardShadowField`,
|
|
36
|
+
* `ShadowColourField`) and the email Image's Shadow drew the same choice in
|
|
37
|
+
* two copies: None, Soft, Lifted, and the colour the shadow is cast in. The
|
|
38
|
+
* rows are easel's: the shell's `IconPicker` with a miniature of each rung
|
|
39
|
+
* (the website's look, Lewis 2026-10-29: the IconPicker is the one control
|
|
40
|
+
* for a choice of a shape), and easel's colour row under it.
|
|
41
|
+
*
|
|
42
|
+
* What is stored does not change: a rung word, and a `#rrggbb`. An unset row
|
|
43
|
+
* stores nothing and shows the rung the host draws while unset (`builtIn`:
|
|
44
|
+
* `none` in an email, `soft` on the website) in grey, with "Default".
|
|
45
|
+
*
|
|
46
|
+
* The rungs' real sizes are each host's (the shop's CSS, the email bake's
|
|
47
|
+
* `overlay_layout.SHADOWS`); the miniatures here only keep their order and
|
|
48
|
+
* their distance apart at chip scale.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
interface ShadowFieldOptions {
|
|
52
|
+
label: string;
|
|
53
|
+
icon?: ReactNode;
|
|
54
|
+
/** The rung the host draws while the row is unset. Default `none`. */
|
|
55
|
+
builtIn?: Shadow;
|
|
56
|
+
hint?: ReactNode;
|
|
57
|
+
}
|
|
58
|
+
interface ShadowColourFieldOptions {
|
|
59
|
+
label: string;
|
|
60
|
+
/** The row's own key. Default `shadowColor`. */
|
|
61
|
+
key?: string;
|
|
62
|
+
/** The colour an unset row follows. Default {@link DEFAULT_SHADOW_COLOR}. */
|
|
63
|
+
follows?: string;
|
|
64
|
+
hint?: ReactNode;
|
|
65
|
+
}
|
|
66
|
+
/** The two shadow rows, in the host's words. */
|
|
67
|
+
declare function shadowFieldBuilders(say?: BoxFieldSay): {
|
|
68
|
+
shadowField: (o: ShadowFieldOptions) => BoxField<unknown>;
|
|
69
|
+
shadowColourField: (o: ShadowColourFieldOptions) => BoxField<unknown>;
|
|
70
|
+
};
|
|
71
|
+
declare const shadowField: (o: ShadowFieldOptions) => BoxField<unknown>;
|
|
72
|
+
declare const shadowColourField: (o: ShadowColourFieldOptions) => BoxField<unknown>;
|
|
73
|
+
|
|
74
|
+
export { Shadow, type ShadowColourFieldOptions, type ShadowFieldOptions, shadowColourField, shadowField, shadowFieldBuilders };
|
|
@@ -0,0 +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-ETNX2ASF.js";import"../../../chunk-EEIDFHOG.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-FM6JO4WF.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,F=r(j.value),b=F??f,C=t(o.label);/* @__PURE__ */
|
|
2
|
+
return l(p,{label:C,icon:o.icon??/* @__PURE__ */l(h,{}),value:t(m[b]),changed:null!==F,hint:o.hint,action:/* @__PURE__ */l(s,{words:d,label:C,changed:null!==F,detail:t(m[f]),onReset:()=>j.onChange(void 0),disabled:j.readOnly}),children:/* @__PURE__ */l(u,{label:C,value:b,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:F}=d();export{F as shadowColourField,f as shadowField,d as shadowFieldBuilders};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shadow choice's VALUES, for both editors and any page that draws a
|
|
3
|
+
* shadow (no React, no import: the `render` entry group): the rungs and the
|
|
4
|
+
* one default colour. The rows are `./shadow-fields`.
|
|
5
|
+
*/
|
|
6
|
+
/** The rungs, flattest first, so the row reads as one axis. */
|
|
7
|
+
declare const SHADOWS: readonly ["none", "soft", "lifted"];
|
|
8
|
+
type Shadow = (typeof SHADOWS)[number];
|
|
9
|
+
/** The rung an unset row is in, unless the host says otherwise. */
|
|
10
|
+
declare const DEFAULT_SHADOW: Shadow;
|
|
11
|
+
/** The colour a shadow is cast in while its row is unset: one value for both
|
|
12
|
+
* editors and the email bake (efficient-backend `overlay_layout`). */
|
|
13
|
+
declare const DEFAULT_SHADOW_COLOR = "#141416";
|
|
14
|
+
/** A stored rung, or `null` for anything else (unset, or a word it does not know). */
|
|
15
|
+
declare function shadowValue(value: unknown): Shadow | null;
|
|
16
|
+
|
|
17
|
+
export { DEFAULT_SHADOW, DEFAULT_SHADOW_COLOR, SHADOWS, type Shadow, shadowValue };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{DEFAULT_SHADOW,DEFAULT_SHADOW_COLOR,SHADOWS,shadowValue}from"../../../chunk-CRITA6CA.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { ColorPreset } from 'efficient-shell/ui';
|
|
3
3
|
import { CornerSide } from '../content/style-keys.js';
|
|
4
4
|
export { CORNER_SIDES } from '../content/style-keys.js';
|
|
@@ -78,6 +78,8 @@ interface ColourFieldOptions extends Stored {
|
|
|
78
78
|
/** What Reset's tooltip says it goes back to, in the host's words
|
|
79
79
|
* (`#2E2E2E from Styles`). The bare hex when left out. */
|
|
80
80
|
resetTo?: (hex: string) => string;
|
|
81
|
+
/** Drawn under the control line. */
|
|
82
|
+
hint?: ReactNode;
|
|
81
83
|
}
|
|
82
84
|
/** The widest border a row offers, px (the website's answer 4). */
|
|
83
85
|
declare const BORDER_WIDTH_MAX = 20;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{BORDER_WIDTH_MAX,CORNER_RADIUS_MAX,borderField,colourField,cornersField,keptByRow,styleFieldBuilders}from"../../../chunk-
|
|
1
|
+
export{BORDER_WIDTH_MAX,CORNER_RADIUS_MAX,borderField,colourField,cornersField,keptByRow,styleFieldBuilders}from"../../../chunk-ETNX2ASF.js";import"../../../chunk-EEIDFHOG.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-FM6JO4WF.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-
|
|
1
|
+
export{useSectionOps}from"../../../chunk-YBDSG4BV.js";import"../../../chunk-ODHJRBJV.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-C7IFWSUA.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-ZEH6QLBH.js";import"../../../chunk-WHS6Y55E.js";import"../../../chunk-FM6JO4WF.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-
|
|
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 +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-
|
|
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-ODHJRBJV.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-C7IFWSUA.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-FM6JO4WF.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";
|
package/dist/strings/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{DEFAULT_TEXT_STYLES_WORDS as o}from"../chunk-OGH6CC3E.js";import{
|
|
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_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 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:l,lock:j,save:f,chrome:p,rail:h,tree:e,panel:i,fields:k,colourRow:m,imageRow:n,drag:Y,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=C(t),e=c?.strings??g,m=r??c?.locale??"en",i=W(()=>({strings:F(e,o),locale:m}),[e,o,m]);/* @__PURE__ */
|
|
2
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,4 +1,4 @@
|
|
|
1
|
-
import{hexReadout as e,typedHex as s}from"../chunk-4FFDGEWA.js";import{DEFAULT_TEXT_STYLES_WORDS as t}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import{FieldSlider as a}from"../chunk-ZEH6QLBH.js";import{TEXT_STYLE_KINDS as l,canAddTextStyle as i,TEXT_STYLE_MAX as n,isDefaultTextStyle as r,CAMPAIGN_TEXT_STYLE_SETTINGS as o,TEXT_STYLE_SETTINGS as d,textStyleRowSize as c,describeTextStyle as u,updateTextStyle as m,textStyleCaseCss as h,TEXT_STYLE_CASES as p,addTextStyle as v,removeTextStyle as f,TEXT_STYLE_RANGES as y}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 g}from"../chunk-KFWNGPW3.js";import
|
|
1
|
+
import{hexReadout as e,typedHex as s}from"../chunk-4FFDGEWA.js";import{DEFAULT_TEXT_STYLES_WORDS as t}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import{FieldSlider as a}from"../chunk-ZEH6QLBH.js";import{TEXT_STYLE_KINDS as l,canAddTextStyle as i,TEXT_STYLE_MAX as n,isDefaultTextStyle as r,CAMPAIGN_TEXT_STYLE_SETTINGS as o,TEXT_STYLE_SETTINGS as d,textStyleRowSize as c,describeTextStyle as u,updateTextStyle as m,textStyleCaseCss as h,TEXT_STYLE_CASES as p,addTextStyle as v,removeTextStyle as f,TEXT_STYLE_RANGES as y}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 g}from"../chunk-KFWNGPW3.js";import{SettingsSegmented as S}from"../chunk-DX3VILZ3.js";import"../chunk-JACEEVVF.js";import{useWords as b}from"../chunk-MFIRYGHW.js";import{withTip as N}from"../chunk-P2VEMZH5.js";import{hsvToHex as C,Tooltip as T,ColorSwatch as k,Popover as x,ColorPickerPanel as w,colorSwatchClasses as z,IconButton as E,Button as O}from"efficient-shell/ui";import{useId as _,useState as L,useRef as A,useEffect as j,Fragment as M}from"react";import{TrashIcon as $,ChevronIcon as W,BoldIcon as Y,ItalicIcon as X,CaseLowerIcon as F,CaseCapitalizedIcon as G,CaseUpperIcon as H,CaseNormalIcon as I}from"efficient-shell/icons/efficient";import{jsxs as P,jsx as B,Fragment as D}from"react/jsx-runtime";var R=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>C({h:e,s:1,v:1})).join(", ")})`;function V({value:s,hex:t,colours:a,label:l,followsWord:i,anyWord:n,onChange:r,readOnly:o=!1}){const d=void 0!==s&&a.some(e=>e.key===s),c=void 0!==s&&!d;/* @__PURE__ */
|
|
2
2
|
return P("div",{className:"es-ts-set","data-ts-setting":"color",children:[
|
|
3
3
|
/* @__PURE__ */P("div",{className:"es-ts-top",children:[
|
|
4
4
|
/* @__PURE__ */B("span",{className:"es-ts-sub",children:l}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-easel",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.8.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",
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
"./screen/lib/content/style-keys",
|
|
36
36
|
"./screen/lib/document/content-tree",
|
|
37
37
|
"./screen/lib/document/hidable",
|
|
38
|
-
"./screen/lib/document/slot-child-name"
|
|
38
|
+
"./screen/lib/document/slot-child-name",
|
|
39
|
+
"./screen/lib/document/shadow-values"
|
|
39
40
|
],
|
|
40
41
|
"editor": [
|
|
41
42
|
"./rail",
|
|
@@ -106,6 +107,7 @@
|
|
|
106
107
|
"./screen/lib/document/field-buckets",
|
|
107
108
|
"./screen/lib/document/field-markers",
|
|
108
109
|
"./screen/lib/document/image-fields",
|
|
110
|
+
"./screen/lib/document/shadow-fields",
|
|
109
111
|
"./screen/lib/document/palette-sections",
|
|
110
112
|
"./screen/lib/document/panel-fields",
|
|
111
113
|
"./screen/lib/document/panel-no-control-mark",
|
|
@@ -481,6 +483,16 @@
|
|
|
481
483
|
"import": "./dist/screen/lib/document/image-fields.js",
|
|
482
484
|
"default": "./dist/screen/lib/document/image-fields.js"
|
|
483
485
|
},
|
|
486
|
+
"./screen/lib/document/shadow-fields": {
|
|
487
|
+
"types": "./dist/screen/lib/document/shadow-fields.d.ts",
|
|
488
|
+
"import": "./dist/screen/lib/document/shadow-fields.js",
|
|
489
|
+
"default": "./dist/screen/lib/document/shadow-fields.js"
|
|
490
|
+
},
|
|
491
|
+
"./screen/lib/document/shadow-values": {
|
|
492
|
+
"types": "./dist/screen/lib/document/shadow-values.d.ts",
|
|
493
|
+
"import": "./dist/screen/lib/document/shadow-values.js",
|
|
494
|
+
"default": "./dist/screen/lib/document/shadow-values.js"
|
|
495
|
+
},
|
|
484
496
|
"./screen/lib/document/device-fields": {
|
|
485
497
|
"types": "./dist/screen/lib/document/device-fields.d.ts",
|
|
486
498
|
"import": "./dist/screen/lib/document/device-fields.js",
|
package/dist/chunk-AYYPU7YZ.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{deviceField as e}from"./chunk-7GGNFLHT.js";import{noControlField as n,NoControlMark as t}from"./chunk-22I55W37.js";import{describedAs as l}from"./chunk-LX23TCTP.js";import{withStyleKind as o}from"./chunk-CWELHADJ.js";import{phoneKey as a}from"./chunk-E52W3M5I.js";import{foldMetaOf as i,FOLD_FIELD_MARKER as r}from"./chunk-ANPOR6EY.js";import{useSelectedHost as s,useEaselApi as u,useEasel as c}from"./chunk-OB5JP6PR.js";import{sidesStartEach as d,SidesInput as p,SidesEachToggle as f}from"./chunk-CLAADE4J.js";import{SettingsDefaultReset as b}from"./chunk-2T22IY3J.js";import{DEFAULT_PANEL_WORDS as m}from"./chunk-56ID6FKZ.js";import{FieldSelect as h}from"./chunk-KFWNGPW3.js";import{SettingsSwitch as v}from"./chunk-OECWLNKJ.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 P,BoxXEndIcon as E,BoxXCenterIcon as R,BoxXStartIcon as I,PaddingAllIcon as A,BoxYBetweenIcon as M,BoxYStretchIcon as B,BoxYEndIcon as K,BoxYCenterIcon as W,BoxYStartIcon as G,BoxXBetweenIcon as N,BoxXStretchIcon as T,BoxItemAlignmentIcon as V}from"efficient-shell/icons/efficient";import{textAlignOptions as $,AlignmentGrid as J,PositionInput as D,Slider as H}from"efficient-shell/ui";import{jsx as _,Fragment as X,jsxs as Y}from"react/jsx-runtime";var z=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 _(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&&!i(t)&&o(t,`section:${n}`);return e}function le(e,n){return{type:"custom",[r]:{label:e,level:n},marker:!0,fold:e,render:()=>/* @__PURE__ */_(X,{})}}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 Pe(e,n,t){const l=Ee(e),o=s();if(t)return[t.value,t.onChange];const a=o?.values??{};return[e.read(a,n),e=>l([[n,e]])]}function Ee(e){const n=s(),t=function(){try{return u()}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 Re={read:(e,n)=>e[n],write:(e,n,t)=>({[n]:t})},Ie={fieldKey:a,ownField:!0,read:(e,n)=>e[a(n)],write:(e,n,t)=>({[a(n)]:t})};function Ae(e){return{...Se(e),fieldKey:n=>`_${e}_${n}`}}function Me({row:e,desktopKey:n,access:t,props:l}){const o=s(),a=o?.values?.[n],[i,r]=Pe(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 Be(n,t,l=Ie,o={}){const a=o.phoneRow??t,i={...a,render:e=>/* @__PURE__ */_(Me,{row:a,desktopKey:n,access:l,props:e})};return{[n]:e("desktop",t),[l.fieldKey(n)]:e("mobile",i)}}var Ke=["left","center","right"];function We(e,{options:n,value:t,onChange:l,ariaLabel:o,disabled:a=!1}){/* @__PURE__ */
|
|
3
|
-
return _(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 _(g,{label:e(n),icon:/* @__PURE__ */_(O,{}),hint:a?.title?e(a.title):void 0,children:/* @__PURE__ */_(J,{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}=c(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=s(),l=k("panel",m),o=t?.values??{},a={x:ke(o[n.keys.x]),y:ke(o[n.keys.y])},i=e(n.label??"Position"),r=Boolean(a.x||a.y),u=e=>{const l=we(n.keys,a,e);Object.keys(l).length&&t?.onChangeMany(l)},c=/* @__PURE__ */_(D,{label:i,value:a,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__ */_(b,{words:l,label:i,changed:r,detail:"0 px, 0 px",onReset:()=>u({x:null,y:null})});return null===n.label?/* @__PURE__ */Y("div",{className:"sf-position-line",children:[c,d]}):/* @__PURE__ */_(g,{label:i,icon:/* @__PURE__ */_(S,{}),changed:r,action:d,children:c})}var Ve={x:{start:/* @__PURE__ */_(I,{}),center:/* @__PURE__ */_(R,{}),end:/* @__PURE__ */_(E,{}),stretch:/* @__PURE__ */_(T,{}),between:/* @__PURE__ */_(N,{})},y:{start:/* @__PURE__ */_(G,{}),center:/* @__PURE__ */_(W,{}),end:/* @__PURE__ */_(K,{}),stretch:/* @__PURE__ */_(B,{}),between:/* @__PURE__ */_(M,{})}},$e=e=>"row"===e?"row":"column";function Je({say:e,kind:n,label:t,options:l,value:o,onChange:a,o:i}){const r=s(),u="justify"===n==("row"===(i.runs??$e)(r?.values?.[i.directionKey??"direction"]))?"x":"y";return We(e,{options:l.map(e=>({label:e.label,value:e.value,picture:Ve[u][e.value]})),value:o,onChange:a,ariaLabel:t})}function De(e,n){const t=(e.useFallback??U)(n);return Object.fromEntries(xe.map(n=>[n,t?.[n]??e.fallback[n]]))}function He({say:e,tier:n,o:t,props:l}){const o=De(t,l),a=s(),i=a?.values??{},r="mobile"===n?t.phoneKeys:t.keys,u=Object.fromEntries(xe.map(e=>[e,je(i[r[e]])])),c="mobile"===n?Object.fromEntries(xe.map(e=>[e,je(i[t.keys[e]])])):null;/* @__PURE__ */
|
|
5
|
-
return _(Xe,{say:e,o:t,fallback:o,value:u,follows:c,readOnly:l.readOnly,onChange:e=>{const n=Fe(r,u,e);Object.keys(n).length&&a?.onChangeMany(n)}})}function _e({say:e,o:n,props:t}){const l=De(n,t);/* @__PURE__ */
|
|
6
|
-
return _(Xe,{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 Xe({say:e,o:n,fallback:t,value:l,follows:o,readOnly:a,onChange:i}){const r=Object.fromEntries(xe.map(e=>[e,String(o?.[e]??t[e])])),[s,u]=w(()=>d(l,r));/* @__PURE__ */
|
|
7
|
-
return _(g,{label:e(n.label),icon:n.icon??/* @__PURE__ */_(A,{}),action:/* @__PURE__ */_(f,{each:s,label:e("Each side"),onChange:u,disabled:a}),children:/* @__PURE__ */_(p,{label:e(n.label),each:s,value:l,placeholder:r,min:n.min,max:n.max,step:n.step,readOnly:a,onChange:i,words:{sides:{top:e("Padding top"),right:e("Padding right"),bottom:e("Padding bottom"),left:e("Padding left")},vertical:e("Top and bottom"),horizontal:e("Left and right"),unit:"px"}})})}var Ye=e=>""===e||"px"===e?e:` ${e}`;function ze({label:e,value:n,onChange:t,min:l,max:o,step:a=1,unit:i="",hint:r,emptyLabel:s,inputMax:u,readOnly:c=!1,clears:d,detail:p,resetWords:f}){const m="number"==typeof n,h=d?/* @__PURE__ */_(b,{label:e,changed:m,detail:p??s??(void 0===r?void 0:`${r}${Ye(i)}`),disabled:c,onReset:()=>t(void 0),...f?{words:f}:{}}):void 0;return{track:/* @__PURE__ */_("div",{className:"sf-slider",children:/* @__PURE__ */_(H,{min:l,max:o,step:a,value:n,suffix:i||void 0,showInput:!0,label:e,disabled:c,...d&&void 0!==r?{placeholderValue:r}:{},...s?{emptyLabel:s}:{},...void 0!==u?{inputMax:u}:{},size:"sm",boxSize:"md",className:"sf-slider-track",onChange:e=>{null===e?d&&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}=ze({...a,label:n,value:r?t:i?null:a.min,hint:l,emptyLabel:o,clears:i});/* @__PURE__ */
|
|
8
|
-
return _(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(o=z){function i(e,n,t,a,i,r,s="",u){const c="function"==typeof u?{action:u}:u??{},{action:d,clear:p}=c,f=(l,u)=>{const f="storedValue"in l?l.storedValue:l.value,b="follows"in l,m=b&&!1!==p?.phoneFollows,h=b||void 0!==p,v="number"==typeof l.value,y=void 0===p?r:u.hint??("function"==typeof p.hint?p.hint(l):p.hint)??r,k=m&&"number"==typeof l.follows?l.follows:y,w=Ye(s),x=!p?.emptyLabel||m&&"number"==typeof l.follows?void 0:p.emptyLabel,C=x??`${k}${w}`,j="function"==typeof c.hint?c.hint(l):c.hint,{track:F,reset:L}=ze({label:o(e),value:v?l.value:h?null:r,onChange:e=>l.onChange(e),min:t,max:u.max??a,step:i,unit:s,hint:h?k:void 0,emptyLabel:x,inputMax:c.inputMax,readOnly:!0===l.readOnly,clears:h,detail:m?Z(o,C):C});/* @__PURE__ */
|
|
9
|
-
return _(g,{label:o(e),icon:ne(n),hint:void 0===j?void 0:o(j),action:h?L:d?d(f,l.onChange):void 0,children:F})},b=c.useMax,m=p?.useHint;return{type:"custom",...l({},{type:"number",label:e}),render:b||m?e=>/* @__PURE__ */_(Ue,{draw:f,props:e,useMax:b,useHint:m}):e=>f(e,{})}}function r(e){return We(o,e)}function s(e,n,t,a,i={}){const s=t.map(e=>"string"==typeof e?{label:e,value:e}:e);return{type:"custom",...l({},{type:"radio",label:e,options:s.map(e=>({value:e.value,label:e.label}))}),render:t=>{const{value:l,onChange:u,field:c}=t,d=s.some(e=>e.value===l),p=!0===t.readOnly;if("follows"in t&&!s.some(e=>""===e.value)){const c=i.phoneRest?i.phoneRest(t.follows):t.follows,f=s.find(e=>e.value===c)??s.find(e=>e.value===a);/* @__PURE__ */
|
|
10
|
-
return _(g,{label:o(e),icon:ne(n),action:/* @__PURE__ */_(b,{label:o(e),changed:d,detail:Z(o,o(f?.label??"")),disabled:p,onReset:()=>u(void 0)}),children:r({options:s,value:d?l:f?.value??a,onChange:u,ariaLabel:e,disabled:p})})}const f="follows"in t&&i.followsLabel?i.followsLabel(t.follows):void 0;/* @__PURE__ */
|
|
11
|
-
return _(g,{label:o(e),icon:ne(n),action:"follows"in t&&i.followsLabel?/* @__PURE__ */_(b,{label:o(e),changed:null!=l&&""!==l,detail:void 0===f?void 0:Z(o,o(f)),disabled:p,onReset:()=>u(void 0)}):void 0,children:r({options:s,value:d?l:l||c?.currentValue||a,onChange:u,ariaLabel:e,disabled:p})})}}}function u(e,n){return n.phone?e.unshift({label:"Match desktop",value:"",picture:/* @__PURE__ */_(P,{})}):n.inherit&&e.unshift({label:n.inherit,value:""}),e}function c(e,n){return n.inherit||n.phone?{...e,render:n=>e.render({...n,onChange:e=>n.onChange(""===e?void 0:e)})}:e}function d(n,t,l,o){if(o.access){const e=o.inherit?"":o.fallback??"left",a=l({...o,phone:!1}),i=n=>{const t="string"==typeof n&&""!==n&&a.some(e=>e.value===n)?n:e;return a.find(e=>e.value===t)?.label};return Be(n,t(o,e),o.access,{phoneRow:t({...o,phone:!0},"",i)})}return{[n]:e("desktop",t(o)),[a(n)]:e("mobile",t({...o,phone:!0},""))}}function p(e){return u($(e.allow??Ke).map(e=>({label:e.label,value:e.value,picture:e.icon})),e)}function f(e,n=e.fallback??"left",t){return c(s(e.label??"Text alignment",/* @__PURE__ */_(x,{}),p(e),n,t?{followsLabel:t}:{}),e)}function m(e){const n={left:Ve.x.start,center:Ve.x.center,right:Ve.x.end};return u($((e.allow??Ke).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 c(s(e.label??"Block alignment",/* @__PURE__ */_(C,{}),m(e),n,t?{followsLabel:t}:{}),e)}function k(e,n,t,a,i,r){return{type:"custom",options:a,fallback:i,...l({},{type:"radio",label:n,options:a.map(e=>({value:e.value,label:e.label}))}),render:({value:l,onChange:s,field:u})=>{const c=u.options??a,d=u.fallback??i,p=c.some(e=>e.value===l)?l:d;/* @__PURE__ */
|
|
12
|
-
return _(g,{label:o(n),icon:ne(t),children:/* @__PURE__ */_(Je,{say:o,kind:e,label:n,options:c,value:p,onChange:s,o:r})})}}}function w(e={}){return k("justify","Justify",/* @__PURE__ */_(C,{}),ie,ie[0].value,e)}function O(e={}){return k("align","Item alignment",/* @__PURE__ */_(V,{}),re,"stretch",e)}function S(){const e=se;return{type:"custom",options:ue,fallback:ue[1].value,...l({},{type:"radio",label:e,options:ue.map(e=>({value:e.value,label:e.label}))}),render:({value:n,onChange:t,id:l,name:a})=>{const i=`${l??a??e}-label`;/* @__PURE__ */
|
|
13
|
-
return _(g,{label:o(e),labelId:i,icon:/* @__PURE__ */_(j,{}),action:/* @__PURE__ */_(v,{checked:(r=n,!0===r||"wrap"===r),onChange:e=>t(e?ue[0].value:ue[1].value),ariaLabelledBy:i})});var r}}}function E({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 R({min:e,max:n,step:t,builtIn:l,resolve:o,action:a,mark:r}){const s=i("Gap",/* @__PURE__ */_(F,{}),e,n,t,l,"px",a),u=o??(e=>"number"==typeof e?e:l);return{...r,type:"custom",render:e=>s.render({...e,value:u(e.value,e.field),storedValue:e.value,onChange:n=>e.onChange(n)})}}function I(e,{fallback:n=me,pointsFor:t}={}){return{type:"custom",render:({value:l,onChange:a})=>{const i=ge(l,n);return t?/* @__PURE__ */_(Ne,{say:o,label:e,value:i,onChange:a,pointsFor:t}):Ge(o,{label:e,value:i,onChange:a,points:ve})}}}function A(e){return{[e.keys.x]:{type:"custom",render:()=>/* @__PURE__ */_(Te,{say:o,o:e})},[e.keys.y]:{...n({type:"custom",render:()=>/* @__PURE__ */_(t,{})},"always"),reachedBy:e.keys.x}}}function M(l={}){const i={...Ce,...l.keys},r={keys:i,phoneKeys:Object.fromEntries(xe.map(e=>[e,a(i[e])])),fallback:{top:0,right:0,bottom:0,left:0,...l.fallback},useFallback:l.useFallback,label:l.label??"Padding",icon:l.icon,min:l.min??0,max:l.max??200,step:l.step??4},s=!1!==l.phone,u=!1===l.group?{}:{_gSpacing:oe("Padding")};if(l.object){const e={type:"custom",render:e=>/* @__PURE__ */_(_e,{say:o,o:r,props:e})};return te({...u,...s?Be(l.object.key,e,l.object.phone):{[l.object.key]:e}})}const c=n=>{const t={type:"custom",render:e=>/* @__PURE__ */_(He,{say:o,tier:n,o:r,props:e})};return s?e(n,t):t},d=()=>n({type:"custom",render:()=>/* @__PURE__ */_(t,{})},"always"),p=xe.filter(e=>"top"!==e);return te({...u,[r.keys.top]:c("desktop"),...s?{[r.phoneKeys.top]:c("mobile")}:{},...Object.fromEntries(p.map(e=>[r.keys[e],{...d(),reachedBy:r.keys.top}])),...s?Object.fromEntries(p.map(n=>[r.phoneKeys[n],e("mobile",d())])):{}})}return{slider:i,select:function(e,n,t,a,i){return{type:"custom",options:t,fallback:a,...i?{note:i}:{},...l({},{type:"select",label:e}),render:l=>{const{value:r,onChange:s,field:u}=l,c=u.options??t,d=u.fallback??a,p=c.some(e=>e.value===r),f="follows"in l,m=f?c.find(e=>e.value===l.follows)??c.find(e=>e.value===d):void 0,v=p?r:m?.value??d,y=!0===l.readOnly;/* @__PURE__ */
|
|
14
|
-
return _(g,{label:o(e),icon:ne(n),action:f?/* @__PURE__ */_(b,{label:o(e),changed:null!=r&&""!==r,detail:m?Z(o,o(m.label)):void 0,disabled:y,onReset:()=>s(void 0)}):void 0,children:/* @__PURE__ */_(h,{value:v,ariaLabel:o(e),readOnly:y,onChange:s,options:[...i?[{label:o(i),value:"\0note",disabled:!0}]:[],...c.map(e=>({label:o(e.label),value:e.value}))]})})}}},Segmented:r,segmented:s,boxJustifyField:w,boxAlignField:O,boxWrapField:S,directionField:E,gapField:R,placementField:I,PlacementGridView:function(e){return Ge(o,e)},positionFields:A,sidesPaddingFields:M,alignmentField:function(e={},n=e.fallback??"left"){return f(e,n)},alignmentFields:function(e="align",n={}){return d(e,f,p,n)},AlignmentStrip:function({opts:e={},value:n,onChange:t,ariaLabel:l,disabled:o=!1}){return r({options:p(e),value:n,onChange:t,ariaLabel:l,disabled:o})},blockAlignmentField:function(e={},n=e.fallback??"left"){return y(e,n)},blockAlignmentFields:function(e="align",n={}){return d(e,y,m,n)},BlockAlignmentStrip:function({opts:e={},value:n,onChange:t,ariaLabel:l,disabled:o=!1}){return r({options:m(e),value:n,onChange:t,ariaLabel:l,disabled:o})},boxFieldSet:function(e={}){const n=e.width??fe,t=e.nudge?.limit??40,l=e.direction??{offered:de,fallback:"column"},o=l.resolve??(e=>l.offered.some(n=>n.value===e)?e:l.fallback),a={runs:e=>"row"===o(e)?"row":"column"};return{_gLayout:oe("Layout"),placement:I("Placement",e.placement),width:i("Width",/* @__PURE__ */_(L,{}),n.min,n.max,n.step,n.fallback,"%"),direction:E(l),gap:R(e.gap??pe),justify:w(a),align:O(a),wrap:S(),_gNudge:oe("Nudge"),...A({keys:e.nudge?.keys??{x:"nudgeX",y:"nudgeY"},min:-t,max:t,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,Re as FLAT_ACCESS,ve as OPEN_PLACEMENT_POINTS,Ie 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,Be 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,Ee as useAccessPatch,Pe as useAccessValue};
|
package/dist/chunk-KCTFS4KB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useSectionOps as o}from"./chunk-X73RVMHK.js";import{SELECTION_MODE as e}from"./chunk-OXKGD2K7.js";import{decodePartId as r,encodePartId as t}from"./chunk-R4AUZVA3.js";import{useEasel as n}from"./chunk-OB5JP6PR.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:a}){const{getSelectorForId:u}=n(o=>o),f=o(),{setSelectedPartId:k,setSelectHandler:l}=p(),I=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}),a?.(n)):i(o=>"part"===o.kind?e:o)},[i,a]);c(()=>{l(I)},[l,I]);const K=s(m)?t(m.nodeId,m.propKey):null;c(()=>{k(K)},[K,k]);return{selectNode:d(o=>{i(()=>e);const r=u(o);r&&f.select(r)},[i,u,f]),openPartId:K}}export{m as usePartBridge};
|
package/dist/chunk-OXKGD2K7.js
DELETED
|
@@ -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-OB5JP6PR.js";import{Inspector as i}from"./chunk-RZ54L6EW.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={},O=()=>b,j=()=>"",w=()=>null,C=()=>{},L={isLockedBlock:()=>!1,duplicateBlocked:()=>null,nestDepth:()=>0,newSectionNode:()=>null,canAddTo:()=>null,blockIsOffered:()=>!0},P={labelAtLevel:(n,e,t)=>t,descriptions:{},categoryLabel:()=>{},firstSection:null,blockRowName:(n,e)=>e(n.type),plainText:n=>n,Icon:()=>null,Thumbnail:()=>null,useProducts:()=>null},S={options:[{id:"desktop",label:"Desktop",icon:/* @__PURE__ */f(c,{})}],initial:"desktop",fluid:"desktop",widths:{desktop:2e3}},B={read:()=>"sections",write:()=>{},forSelection:(n,e)=>n?"sections":e},N={first:null,last:null,firstGroup:null,lastGroup:null,isSectionGroup:()=>!1,sectionGroupZone:()=>"",panelOf:()=>null};function D(){/* @__PURE__ */
|
|
2
|
-
return f(r,{height:"fill"})}function I(){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 x=l({});function A({parts:n,children:e}){/* @__PURE__ */
|
|
4
|
-
return f(x.Provider,{value:n,children:e})}function F(){return s(x)}function G(){return(F().useOwnerName??j)()}function R(){return(F().useDocumentLabel??w)()}function T(n,e,t,r){return(F().useBridges??O)(n,e,t,r)}function Y(n){return(F().useStandaloneBridges??O)(n)}function E(n,e){(F().useDocumentPass??C)(n,e)}function Q(){return F().blockRules??L}function V(){return F().blockLook??P}function W(){return F().devices??S}function X(){return F().leftView??B}function Z(){return F().pinned??N}function H(){return F().saveSwitch??!0}function J(e){n(!0===F().pickFollowsSelection,e)}function K(){return F().storageNamespace||void 0}function M(){return F().styleClipboard??null}function q(){return F().nodeKeys??!0}function z(){return F().notify??null}function U(){return F().Canvas??D}function $(){return F().CanvasHead??null}function _(){return F().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 F().Inspector??I}export{a as SELECTION_MODE,en as ScreenCanvasTargetProvider,A 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,V as useScreenBlockLook,Q as useScreenBlockRules,T as useScreenBridges,_ as useScreenCanvasDrag,U as useScreenCanvasFrame,$ as useScreenCanvasHead,tn as useScreenCanvasTarget,W as useScreenDevices,R as useScreenDocumentLabel,E as useScreenDocumentPass,rn as useScreenInspectorPanel,X as useScreenLeftView,q as useScreenNodeKeys,z as useScreenNotify,G as useScreenOwnerName,F as useScreenParts,J as useScreenPickFollowsSelection,Z as useScreenPinned,H as useScreenSaveSwitch,K as useScreenStorageNamespace,M as useScreenStyleClipboard,Y as useStandaloneScreenBridges};
|
package/dist/chunk-QPXMKAQT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{styleFieldBuilders as e,keptByRow as s}from"./chunk-QYEZMQSD.js";import{boxFieldBuilders as o,PHONE_KEY_ACCESS as l,phoneTwinFields as r,section as i}from"./chunk-AYYPU7YZ.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{_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};
|
package/dist/chunk-QYEZMQSD.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{useAccessPatch as e,FLAT_ACCESS as o,onDesktopWords as r,useAccessValue as t}from"./chunk-AYYPU7YZ.js";import{noControlField as s,NoControlMark as l}from"./chunk-22I55W37.js";import{normalizeCornerSides as n,CORNER_SIDES as i}from"./chunk-PLTTPHK5.js";import{CornersInput as c,BorderInput as a,SettingsColour as d}from"./chunk-CLAADE4J.js";import{SettingsDefaultReset as u}from"./chunk-2T22IY3J.js";import{DEFAULT_PANEL_WORDS as p,DEFAULT_COLOUR_ROW_WORDS as y}from"./chunk-56ID6FKZ.js";import{SettingsField as f}from"./chunk-MIX7EGRG.js";import{useWords as h}from"./chunk-MFIRYGHW.js";import{CornerIcon as m,BorderAllIcon as b}from"efficient-shell/icons/efficient";import{jsx as w}from"react/jsx-runtime";var g=e=>e;function v(e,o){const r=o.twinAccess;return r?{key:e.key,access:r,ownField:r.ownField}:e}function k(e,r){const s=!e.access||e.ownField?{value:r.value,onChange:r.onChange}:void 0;return t(e.access??o,e.key,s)}function F(e,r){return t(e.access??o,r??"")}function j(e){return{...s({type:"custom",render:()=>/* @__PURE__ */w(l,{})},"always"),reachedBy:e}}function C({o:t,say:s,props:l}){const n=h("colourRow",y),i=h("panel",p),c=t.useFollows(),a=t.usePresets?.(),u=t.opacity?.useUnset?.()??100,f=v(t,l),[m,b]=k(f,l),[g,j]=F(f,t.opacity?.key),C=e(f.access??o),B="string"==typeof m?m:"",O="number"==typeof g,A="follows"in l,T=(A&&"string"==typeof l.follows&&""!==l.follows?l.follows:void 0)??c,x=t.access||A?void 0:"";/* @__PURE__ */
|
|
2
|
-
return w(d,{label:s(t.label),icon:t.icon,value:B,onChange:e=>b(""===e?x:e),inherited:T,presets:a,changed:""!==B||O,onReset:()=>{O&&t.opacity?C([[t.key,x],[t.opacity.key,void 0]]):b(x)},resetTo:A?r(s,T.toUpperCase()):t.resetTo?t.resetTo(c.toUpperCase()):c.toUpperCase(),...t.opacity?{opacity:O?g:u,onOpacityChange:e=>j(e)}:{},readOnly:l.readOnly,words:n,resetWords:i})}var B=20;function O({o:e,say:o,props:t}){const s=e.useFollows(),[l,n]=k(v(e,t),t),i=l&&"object"==typeof l?l:{},c="follows"in t,d=c&&t.follows&&"object"==typeof t.follows?t.follows:{},p="number"==typeof d.width?d.width:s.width,y="string"==typeof d.color&&""!==d.color?d.color:s.color,h=Object.keys(i).length>0,m={width:o("Border width"),sides:{top:o("Border top"),right:o("Border right"),bottom:o("Border bottom"),left:o("Border left")},style:o("Border style"),styles:{solid:o("Solid"),dashed:o("Dashed"),dotted:o("Dotted")},color:o("Border color"),unit:"px"};/* @__PURE__ */
|
|
3
|
-
return w(f,{label:o("Border"),icon:/* @__PURE__ */w(b,{}),action:c?/* @__PURE__ */w(u,{label:o("Border"),changed:h,detail:r(o,`${p}px`),disabled:t.readOnly,onReset:()=>n(void 0)}):void 0,children:/* @__PURE__ */w(a,{label:o("Border"),value:i,each:!1,onChange:o=>n(function(e){const o=Object.fromEntries(Object.entries(e).filter(([,e])=>null!=e&&""!==e));return Object.keys(o).length?o:void 0}(e.styles?{width:o.width,color:o.color,style:o.style}:{width:o.width,color:o.color})),placeholder:{sides:{top:p,right:p,bottom:p,left:p},style:d.style??"solid",color:y},presets:[y],words:m,styles:e.styles??!1,max:20,readOnly:t.readOnly})})}var A=40,T=()=>null;function x({o:r,say:t,props:s}){const l=h("panel",p),a=r.useFollows(),[d,y]=k(r,s),[b,g]=F(r,r.sidesKey),v=e(r.access??o),j=r.access?void 0:null,C="number"==typeof d&&Number.isFinite(d)?d:null,B=n((r.useFollowsSides??T)())??[...i],O=n(b)??B,A=[{value:"tl",label:t("Top left")},{value:"tr",label:t("Top right")},{value:"bl",label:t("Bottom left")},{value:"br",label:t("Bottom right")}];/* @__PURE__ */
|
|
4
|
-
return w(f,{label:t("Corners"),icon:/* @__PURE__ */w(m,{}),changed:null!==C||Array.isArray(b),action:/* @__PURE__ */w(u,{label:t("Corners"),changed:null!==C||Array.isArray(b),detail:`${a}px`,onReset:()=>Array.isArray(b)?v([[r.key,j],[r.sidesKey,j]]):y(j),words:l}),children:/* @__PURE__ */w(c,{label:t("Corners"),value:O,corners:A,onChange:e=>{const o=i.filter(o=>e.includes(o)),r=o.length===B.length&&o.every(e=>B.includes(e));g(r?j:o)},radius:C,onRadiusChange:e=>y(e??j),radiusMin:0,radiusMax:40,radiusStep:r.step??1,radiusPlaceholder:String(a),disabled:s.readOnly})})}function R(e=g){return{colourField:o=>({type:"custom",render:r=>/* @__PURE__ */w(C,{o:o,say:e,props:r})}),borderField:o=>({type:"custom",render:r=>/* @__PURE__ */w(O,{o:o,say:e,props:r})}),cornersField:o=>({type:"custom",render:r=>/* @__PURE__ */w(x,{o:o,say:e,props:r})})}}var{colourField:I,borderField:P,cornersField:U}=R();export{B as BORDER_WIDTH_MAX,A as CORNER_RADIUS_MAX,P as borderField,I as colourField,U as cornersField,j as keptByRow,R as styleFieldBuilders};
|