efficient-easel 22.0.0 → 23.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -23
- package/dist/{CanvasDragLayer-B6Yn9S8T.d.ts → CanvasDragLayer-NZpaX6aq.d.ts} +15 -4
- package/dist/{ScreenDocumentContext-BIK3uWtF.d.ts → ScreenDocumentContext-BDLUYzlM.d.ts} +4 -4
- package/dist/blocks/index.d.ts +11 -11
- package/dist/canvas/index.d.ts +21 -9
- package/dist/canvas/index.js +1 -1
- package/dist/{canvas-typing-Be4FO4q7.d.ts → canvas-typing-DOBx8dD3.d.ts} +12 -2
- package/dist/chunk-22I55W37.js +2 -0
- package/dist/chunk-2FYFAAAK.js +2 -0
- package/dist/{chunk-3S5N4HLJ.js → chunk-6NJHYXJM.js} +1 -1
- package/dist/chunk-6QSFJCJT.js +21 -0
- package/dist/{chunk-BTDI7JAA.js → chunk-A6ZP5II4.js} +2 -2
- package/dist/{chunk-IWCKVZHS.js → chunk-AGWKB77Q.js} +1 -1
- package/dist/chunk-AT4DDMJS.js +1 -0
- package/dist/chunk-DSKNJXB4.js +1 -0
- package/dist/{chunk-ZOSEBPAI.js → chunk-GKG3M5QK.js} +1 -1
- package/dist/{chunk-XWKQP6AE.js → chunk-HNV6HUSQ.js} +4 -4
- package/dist/chunk-HZSZT3BE.js +7 -0
- package/dist/{chunk-EB6NI2VK.js → chunk-IYHO4XQX.js} +1 -1
- package/dist/chunk-IZGFJWH4.js +1 -0
- package/dist/{chunk-KN2TIXUT.js → chunk-JPCOBNYW.js} +1 -1
- package/dist/{chunk-YC6KLSW3.js → chunk-JWOBAEBH.js} +1 -1
- package/dist/chunk-KXM6YRG2.js +1 -0
- package/dist/chunk-LN43DP2A.js +18 -0
- package/dist/{chunk-IROEWITG.js → chunk-LSTOOYG7.js} +1 -1
- package/dist/{chunk-TXR7GC5A.js → chunk-NQ7NRYTK.js} +8 -8
- package/dist/chunk-OXZDSOZV.js +1 -0
- package/dist/{chunk-BSHIQIZC.js → chunk-RPMSET77.js} +1 -1
- package/dist/{chunk-TLN5ZT76.js → chunk-T3LAGI43.js} +1 -1
- package/dist/chunk-TGSK5VII.js +5 -0
- package/dist/{chunk-K7BTCBWD.js → chunk-TGZCD6IP.js} +1 -1
- package/dist/chunk-VBOSOH5M.js +16 -0
- package/dist/{chunk-RY5AWQ63.js → chunk-VHFLOHGQ.js} +1 -1
- package/dist/chunk-YCSZAP7T.js +1 -0
- package/dist/chunk-YU3WHLGI.js +1 -0
- package/dist/chunk-Z6V22QRZ.js +64 -0
- package/dist/copy/index.d.ts +20 -6
- package/dist/copy/index.js +29 -29
- package/dist/data/index.d.ts +30 -22
- package/dist/data/index.js +1 -1
- package/dist/drag/drag.css +10 -1
- package/dist/drag/index.d.ts +5 -5
- package/dist/drag/index.js +1 -1
- package/dist/draw/index.d.ts +1 -1
- package/dist/easel/easel.css +24 -14
- package/dist/easel/index.d.ts +90 -53
- package/dist/easel/index.js +1 -1
- package/dist/edit-lock/index.d.ts +5 -5
- package/dist/fields/fields.css +1 -1
- package/dist/fields/index.d.ts +50 -16
- package/dist/fields/index.js +1 -1
- package/dist/node-ops/index.d.ts +3 -3
- package/dist/node-ops/index.js +1 -1
- package/dist/panel/index.d.ts +1 -1
- package/dist/panel/panel.css +6 -1
- package/dist/pick/index.d.ts +5 -5
- package/dist/{plan-CRUh2kVK.d.ts → plan-D0DgSLnY.d.ts} +5 -5
- package/dist/render/index.d.ts +13 -13
- package/dist/render/index.js +1 -1
- package/dist/{resolve-AJ6WF4EL.d.ts → resolve-Bz4mszpL.d.ts} +5 -5
- package/dist/rowMarks-CO5TpfLY.d.ts +44 -0
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.d.ts +2 -2
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.d.ts +17 -20
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/PreviewDeviceContext.d.ts +1 -1
- package/dist/screen/components/PreviewPartsContext.d.ts +2 -2
- package/dist/screen/components/SaveControls.d.ts +8 -8
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenDocumentContext.d.ts +5 -5
- package/dist/screen/components/ScreenDocumentContext.js +1 -1
- package/dist/screen/components/ScreenMount.d.ts +9 -9
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.d.ts +12 -12
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +17 -17
- package/dist/screen/components/usePartBridge.d.ts +10 -10
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.d.ts +8 -8
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/admin-bridge.d.ts +4 -4
- package/dist/screen/lib/document/block-types-in.d.ts +2 -1
- package/dist/screen/lib/document/block-types-in.js +1 -1
- package/dist/screen/lib/document/content-tree.d.ts +8 -8
- package/dist/screen/lib/document/device-fields.d.ts +13 -27
- package/dist/screen/lib/document/device-fields.js +1 -1
- package/dist/screen/lib/document/field-markers.d.ts +4 -4
- package/dist/screen/lib/document/palette-sections.d.ts +5 -5
- package/dist/screen/lib/document/panel-fields.d.ts +5 -5
- package/dist/screen/lib/document/panel-no-control-mark.d.ts +6 -10
- package/dist/screen/lib/document/panel-no-control-mark.js +1 -1
- package/dist/screen/lib/document/part-id.d.ts +1 -1
- package/dist/screen/lib/document/preview-events.d.ts +2 -2
- package/dist/screen/lib/document/preview-selection-context.d.ts +2 -2
- package/dist/screen/lib/document/section-doc.d.ts +5 -5
- package/dist/screen/lib/document/section-doc.js +1 -1
- package/dist/screen/lib/document/slot-child-name.d.ts +1 -1
- package/dist/screen/lib/document/slot-section-spec.d.ts +1 -1
- package/dist/screen/lib/document/style-clipboard.d.ts +8 -8
- package/dist/screen/lib/document/style-clipboard.js +1 -1
- package/dist/screen/lib/document/tree-reveal.d.ts +4 -4
- package/dist/screen/lib/document/use-section-ops.d.ts +6 -6
- package/dist/screen/lib/document/use-section-ops.js +1 -1
- package/dist/screen/lib/document-addressing.d.ts +5 -5
- package/dist/screen/lib/document-hooks.d.ts +4 -4
- package/dist/screen/lib/host.d.ts +5 -5
- package/dist/screen/lib/key-scope.d.ts +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/media-panel.d.ts +5 -5
- package/dist/screen/lib/media-picker.d.ts +6 -6
- package/dist/screen/lib/page-lock.d.ts +4 -4
- package/dist/screen/lib/screen-parts.d.ts +22 -10
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/lib/section-templates.d.ts +4 -4
- package/dist/screen/lib/session-context.d.ts +4 -4
- package/dist/screen/lib/session.d.ts +5 -5
- package/dist/screen/lib/shared-sections.d.ts +4 -4
- package/dist/screen/screen.css +14 -14
- package/dist/screen/words.d.ts +4 -3
- package/dist/screen/words.js +1 -1
- package/dist/{session-CrWwDt7Z.d.ts → session-EsjORLQ0.d.ts} +1 -1
- package/dist/shell/shell.css +2 -2
- package/dist/strings/index.d.ts +2 -2
- package/dist/strings/index.js +2 -2
- package/dist/style-clipboard/index.d.ts +2 -2
- package/dist/text-styles/index.d.ts +3 -3
- package/dist/text-styles/model.d.ts +1 -1
- package/dist/{types-BFd8FqQw.d.ts → types-BIytwvvH.d.ts} +2 -2
- package/dist/{types-DFxBChE3.d.ts → types-BljCVdzR.d.ts} +17 -17
- package/dist/{types-DlQIM1YO.d.ts → types-Dq180WRV.d.ts} +8 -8
- package/dist/{useNodeOps-C_nisDHh.d.ts → useNodeOps-igxrnEhq.d.ts} +2 -2
- package/dist/{watch-D0bNZRtU.d.ts → watch-Unf6SfUf.d.ts} +3 -3
- package/dist/{words-gIDCeRv3.d.ts → words-B5Gb7KFq.d.ts} +1 -1
- package/dist/{words-BpTjCfqO.d.ts → words-Cf5VT2Ic.d.ts} +2 -2
- package/package.json +2 -2
- package/dist/chunk-4LGROS5L.js +0 -1
- package/dist/chunk-BDSLF5BR.js +0 -1
- package/dist/chunk-CPL43ZLJ.js +0 -1
- package/dist/chunk-CUZQ2HMA.js +0 -18
- package/dist/chunk-GHBK7BKL.js +0 -1
- package/dist/chunk-INRERJU4.js +0 -2
- package/dist/chunk-IYYE7VJN.js +0 -65
- package/dist/chunk-KWLHKKZO.js +0 -2
- package/dist/chunk-L55YIXDC.js +0 -1
- package/dist/chunk-MZ5GSSZ3.js +0 -7
- package/dist/chunk-SJMS247S.js +0 -5
- package/dist/chunk-SWBADIQT.js +0 -1
- package/dist/chunk-WJSEWAWK.js +0 -15
- package/dist/chunk-YHFKWV7H.js +0 -21
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { Data } from '../../blocks/index.js';
|
|
4
|
-
import { P as Permissions } from '../../types-
|
|
4
|
+
import { P as Permissions } from '../../types-BljCVdzR.js';
|
|
5
5
|
import { ScreenParts } from '../lib/screen-parts.js';
|
|
6
6
|
import '../../data/index.js';
|
|
7
|
-
import '../../types-
|
|
8
|
-
import '../../resolve-
|
|
9
|
-
import '../../plan-
|
|
10
|
-
import '../../watch-
|
|
7
|
+
import '../../types-Dq180WRV.js';
|
|
8
|
+
import '../../resolve-Bz4mszpL.js';
|
|
9
|
+
import '../../plan-D0DgSLnY.js';
|
|
10
|
+
import '../../watch-Unf6SfUf.js';
|
|
11
11
|
import '../../types-B3iSHX-w.js';
|
|
12
12
|
import '../../types-Cy7rdmXt.js';
|
|
13
13
|
import '../../wordFit-7XpmhcaW.js';
|
|
14
14
|
import '../../edit-lock/index.js';
|
|
15
15
|
import '../../panelWidths-DgQXiPXU.js';
|
|
16
|
-
import '../../CanvasDragLayer-
|
|
17
|
-
import '../../session-
|
|
16
|
+
import '../../CanvasDragLayer-NZpaX6aq.js';
|
|
17
|
+
import '../../session-EsjORLQ0.js';
|
|
18
18
|
import '../../words-SD4neL0n.js';
|
|
19
19
|
import '../../types-BbOBWXMP.js';
|
|
20
20
|
import '../../style-clipboard/index.js';
|
|
@@ -27,7 +27,7 @@ import '../lib/section-template-types.js';
|
|
|
27
27
|
import '../lib/document/content-tree.js';
|
|
28
28
|
import '../lib/shared-section-types.js';
|
|
29
29
|
import '../lib/document/block-choice.js';
|
|
30
|
-
import '../../ScreenDocumentContext-
|
|
30
|
+
import '../../ScreenDocumentContext-BDLUYzlM.js';
|
|
31
31
|
import '../lib/document-contract.js';
|
|
32
32
|
import '../lib/document-switch.js';
|
|
33
33
|
import '../../engine-CvXpFE86.js';
|
|
@@ -49,10 +49,10 @@ import '../lib/document/slot-section-spec.js';
|
|
|
49
49
|
*
|
|
50
50
|
* What follows is the store's own reasoning, from where it was written:
|
|
51
51
|
*
|
|
52
|
-
* THE WEBSITE EDITOR'S STORE — efficient-easel's engine in place of
|
|
53
|
-
* (blueprint step 5.5), taking the props
|
|
52
|
+
* THE WEBSITE EDITOR'S STORE — efficient-easel's engine in place of the old library's root component
|
|
53
|
+
* (blueprint step 5.5), taking the props the old library's root component took here:
|
|
54
54
|
*
|
|
55
|
-
* - `data` is read ONCE, when the editor mounts — as
|
|
55
|
+
* - `data` is read ONCE, when the editor mounts — as the old library's root component read it. A
|
|
56
56
|
* different page is a new mount: the document context drops to "Loading…"
|
|
57
57
|
* on a retarget, and the standalone Section editor keys this by section.
|
|
58
58
|
* - `config` is followed LIVE (`setConfig`): the Site styles gap row rebuilds
|
|
@@ -65,7 +65,7 @@ import '../lib/document/slot-section-spec.js';
|
|
|
65
65
|
* - `permissions` follow the edit lock (`documentPermissions`, every key
|
|
66
66
|
* named).
|
|
67
67
|
*
|
|
68
|
-
*
|
|
68
|
+
* the old library's root component `overrides` are the canvas's business now — see `SiteCanvas`.
|
|
69
69
|
*/
|
|
70
70
|
declare function ScreenStoreProvider({ config, data, onChange, permissions, parts, children, }: {
|
|
71
71
|
/** The screen's parts, from the layer that owns the document (the website's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenStoreProvider as default}from"../../chunk-
|
|
1
|
+
export{ScreenStoreProvider as default}from"../../chunk-VHFLOHGQ.js";import"../../chunk-TGSK5VII.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-VBOSOH5M.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-6QSFJCJT.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-AGWKB77Q.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-RPMSET77.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-S3DUFDQ6.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-6NJHYXJM.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YU3WHLGI.js";import"../../chunk-LF3FUSCQ.js";import"../../chunk-TGZCD6IP.js";import"../../chunk-KXM6YRG2.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
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__ */
|
|
17
|
-
/* @__PURE__ */
|
|
1
|
+
import{AddBlockRow as e}from"../../chunk-JWOBAEBH.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-DDH2DYQP.js";import{useEaselUndoKeys as r}from"../../chunk-T3LAGI43.js";import{SlotChildActionsProvider as t}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as s}from"../../chunk-C56MPJBH.js";import{usePartBridge as i}from"../../chunk-JPCOBNYW.js";import{useSectionOps as c}from"../../chunk-LSTOOYG7.js";import"../../chunk-RUQOIQWI.js";import{SELECTION_MODE as p,useScreenPinned as l,useScreenCanvasFrame as m,useScreenInspectorPanel as d,useScreenPickFollowsSelection as a,sameInspectorMode as u,useStandaloneScreenBridges as h,useScreenBlockLook as k,useScreenBlockRules as j,isSelectionMode as f}from"../../chunk-TGSK5VII.js";import{MediaPopup as S}from"../../chunk-2G6MAXPY.js";import{useScreenDocument as y}from"../../chunk-A6ZP5II4.js";import"../../chunk-77IWWW6X.js";import"../../chunk-ERR437B5.js";import"../../chunk-UNVKPVZW.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-BIK3AO2V.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-MQA7OFRA.js";import{DEFAULT_SCREEN_WORDS as A}from"../../chunk-IYHO4XQX.js";import{slotChildRowName as C}from"../../chunk-SSRYU3YG.js";import"../../chunk-AJ2SUSET.js";import"../../chunk-ANPOR6EY.js";import"../../chunk-6UAEFOJ4.js";import"../../chunk-R4AUZVA3.js";import{slotFieldsOf as N,nestsInTree as O}from"../../chunk-TCAAOYQY.js";import{useEasel as x}from"../../chunk-VBOSOH5M.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-6QSFJCJT.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import{LayersTree as P,Subtree as Y,TreeRow as B,TreeRowAction as I,TreeSeam as M}from"../../chunk-WHS6Y55E.js";import{DEFAULT_TREE_WORDS as W}from"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-AGWKB77Q.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-RPMSET77.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as F,saveIndicator as g}from"../../chunk-H6DDIBQ4.js";import{SaveState as H,panelWidthVars as R}from"../../chunk-ZG6PVMC3.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-S3DUFDQ6.js";import{useWords as v}from"../../chunk-MFIRYGHW.js";import"../../chunk-LN43DP2A.js";import"../../chunk-TQ5Y6S2X.js";import{useTreeDrag as z}from"../../chunk-6NJHYXJM.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YU3WHLGI.js";import"../../chunk-LF3FUSCQ.js";import{zoneKey as D,parseZoneKey as E}from"../../chunk-TGZCD6IP.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";import{useState as V,useRef as b,useEffect as w,useCallback as Q,Fragment as T}from"react";import{Tooltip as G}from"efficient-shell/ui";import{TrashIcon as J}from"efficient-shell/icons/efficient";import{jsxs as K,jsx as Z,Fragment as L}from"react/jsx-runtime";var U=e=>n=>{n.target.closest("button, input")||e()},X={rowClick:U};function $(){const{saveState:$,readOnly:q,readOnlyReason:_=null}=y(),ee=c(),{appState:ne,selectedItem:oe,config:re}=x(e=>e),[te,se]=V(p),ie=v("screen",A),ce=v("tree",W),pe=v("save",F),{first:le,last:me,panelOf:de}=l(),ae=de(le),ue=m(),he=d(),ke=ne.data.content?.[0]??null,je=ke?.props.id??null,fe=ke?.type===le,Se=ke?.type===me,ye=b(null),Ae=b(null);r(Ae),a(oe?.props.id),w(()=>{je&&ye.current!==je&&(ye.current=je,fe?se(ae??p):oe||ee.select({index:0}))},[je,oe,ee,fe]);const Ce=Q(e=>se(n=>u(n,e)?n:e),[]),Ne=h({kind:te.kind,mode:te,open:Ce,show:e=>se(e),reveal:()=>{},select:(e,n)=>{se(e=>u(e,n)?e:n),ee.select(e)}}),{selectNode:Oe}=i({mode:te,setMode:se,onOpenPart:n}),xe=k(),{labelAtLevel:Pe,Icon:Ye}=xe,{canAddTo:Be}=j(),Ie=e=>Pe(e,"block",re.components[e]?.label??e),Me=e=>Pe(e,"section",Ie(e)),We=!fe&&f(te)&&oe?.props.id===je,Fe=ke?Be(ke.type)?.spec??null:null,ge=ke&&Fe?`${ke.props.id}:${Fe.slot}`:null,He=ke&&Fe&&Array.isArray(ke.props[Fe.slot])?ke.props[Fe.slot]:[],Re=e=>C(e,Ie,xe.plainText),ve=(e,r)=>{ke&&Fe&&ge&&(se(p),Fe.slider?(o(String(ke.props.id),e),ee.select({index:e,zone:ge}),n(String(ke.props.id))):(ee.select({index:e,zone:ge}),n(r)))},ze=()=>{if(!ke||!Fe||!ge)return;const e=He.length;ee.insertComponent(ge,Fe.childType,e),se(p),Fe.slider?requestAnimationFrame(()=>{o(String(ke.props.id),e),ee.select({index:e,zone:ge})}):ee.select({index:e,zone:ge})},De=e=>N(re,e),Ee=e=>{const{parentId:n,slot:o}=E(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of De(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(ke)?.props[o];return Array.isArray(t)?t.length:0},Ve=(e,n,o)=>{const r=Math.min(Math.max(o,0),Ee(e)),t=n<r?r-1:r;t!==n&&(ee.reorderComponent(e,n,t),se(p),ee.select({index:t,zone:e}))},be=z({keyOf:e=>e.id,readOnly:Boolean(q),canDrop:(e,n)=>D(n)===e.zone&&n.index>=0&&n.index<=Ee(e.zone),onDrop:(e,n)=>Ve(e.zone,e.index,n.index),onStep:(e,n)=>Ve(e.zone,e.index,n<0?e.index-1:e.index+2)}),we=(e,n)=>/* @__PURE__ */Z(M,{...q?{}:be.seam({place:{...E(e),index:n}})},`seam:${e}:${n}`),Qe=e=>xe.blockRowName(e,Ie),Te=(e,o,r)=>{se(p),ee.select({index:o,zone:e}),n(r)},Ge=(e,n,o)=>{ee.insertComponent(e,n,o),se(p),ee.select({index:o,zone:e})},Je=(n,o,r)=>/* @__PURE__ */Z(e,{choices:r,onPick:e=>Ge(n,e,o)}),Ke=(e,n)=>{const o=De((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=Be(e.type),s=t?.choices??null,i="footer"===t?.source?Qe:Re;/* @__PURE__ */
|
|
2
|
+
return K(L,{children:[o.map(({child:e,zone:o,index:r})=>{const t=oe?.props.id===e.props.id,s=O(re,e.type,n),c=i(e),l=String(e.props.id),m=()=>Te(o,r,l),{rowProps:d,...a}=be.row({item:{id:l,zone:o,index:r},place:{...E(o),index:r}},{onClick:U(m)});/* @__PURE__ */
|
|
3
|
+
return K(T,{children:[0===r&&we(o,0),
|
|
4
|
+
/* @__PURE__ */Z(B,{words:ce,icon:/* @__PURE__ */Z(Ye,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...a,actions:/* @__PURE__ */Z(I,{kind:"delete",label:ie.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,ee.removeComponent(e,n),se(p),void ee.select(null);var e,n},children:/* @__PURE__ */Z(J,{size:13})}),rowProps:d}),s&&/* @__PURE__ */Z(Y,{children:Ke(e,n+1)}),we(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Je(`${e.props.id}:${t.slot}`,o.length,s):null]})},Ze="HeroSingle"===ke?.type,Le=Boolean(ke)&&(Boolean(Be(ke.type))||De(ke.type).length>0),Ue=Boolean(ke)&&(Boolean(Fe)||Se||fe||Ze||Le);/* @__PURE__ */
|
|
5
|
+
return K("div",{ref:Ae,className:"sf-editor es-editor",style:R(s),children:[
|
|
6
|
+
/* @__PURE__ */Z("div",{className:"sf-section-bar",children:/* @__PURE__ */Z(H,null!==_?{tone:"off",label:_,role:"status"}:{...g($,pe),role:"status"})}),
|
|
7
|
+
/* @__PURE__ */K("div",{className:"sf-body",children:[Ue&&ke&&/* @__PURE__ */K("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
|
|
8
|
+
/* @__PURE__ */Z("div",{className:"sf-panel-head",children:/* @__PURE__ */Z(G,{content:fe?ie.headerSettings:ie.sectionSettings({name:Me(ke.type)}),side:"bottom",children:/* @__PURE__ */Z("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(We?"is-selected":""),"aria-pressed":We,onClick:()=>{fe?se(ae??p):(se(p),ee.select({index:0}))},children:Me(ke.type)})})}),
|
|
9
|
+
/* @__PURE__ */Z(P,{className:"sf-tree sf-scroll",rootProps:be.rootProps(),words:ce,children:/* @__PURE__ */Z(Y,{children:fe?
|
|
10
|
+
/* @__PURE__ */Z(B,{words:ce,icon:/* @__PURE__ */Z(Ye,{type:"header",size:13}),name:ie.headerSettings,selected:te.kind===ae?.kind,onSelect:()=>se(ae??p),rowProps:{onClick:U(()=>se(ae??p))}}):Fe?/* @__PURE__ */K(L,{children:[He.map((e,n)=>{const o=oe?.props.id===e.props.id,r=Re(e),t=String(e.props.id),s=()=>ve(n,t),{rowProps:i,...c}=be.row({item:{id:t,zone:ge,index:n},place:{...E(ge),index:n}},{onClick:U(s)});/* @__PURE__ */
|
|
11
|
+
return K(T,{children:[0===n&&we(ge,0),
|
|
12
|
+
/* @__PURE__ */Z(B,{words:ce,icon:/* @__PURE__ */Z(Ye,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */Z(I,{kind:"delete",label:ie.deleteNamed({name:r}),onClick:()=>{return e=n,void(ge&&(ee.removeComponent(ge,e),se(p),ee.select(null)));var e},children:/* @__PURE__ */Z(J,{size:13})}),rowProps:i}),we(ge,n+1)]},String(e.props.id??n))}),
|
|
13
|
+
/* @__PURE__ */K("button",{type:"button",className:"sf-add-card",onClick:ze,children:[
|
|
14
|
+
/* @__PURE__ */Z("span",{className:"sf-plus sf-plus--sm",children:"+"}),Fe.addLabel]}),je?Ne.partRows?.(ke,X):null]}):Ke(ke,1)})})]}),
|
|
15
|
+
/* @__PURE__ */Z("div",{className:"sf-center",children:/* @__PURE__ */Z("div",{className:"sf-preview-host",children:/* @__PURE__ */Z(ue,{})})}),
|
|
16
|
+
/* @__PURE__ */Z(t,{value:{selectChild:(e,n,o,r)=>"section"===Be(r)?.source?ve(n,o):Te(e,n,o),addChild:(e,n,o,r,t)=>"section"===Be(t)?.source?ze():Ge(`${e}:${n}`,o,r),childRowName:Re,blockRowName:Qe},children:/* @__PURE__ */Z(he,{mode:te,onOpenWebsiteSettings:Ne.openSettings??(()=>{}),onSelectNode:Oe,hideNodeActions:!0})})]}),
|
|
17
|
+
/* @__PURE__ */Z(S,{})]})}export{$ as default};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ScreenInspectorMode } from '../lib/screen-parts.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../../blocks/index.js';
|
|
4
|
-
import '../../types-
|
|
4
|
+
import '../../types-BljCVdzR.js';
|
|
5
5
|
import '../../data/index.js';
|
|
6
|
-
import '../../types-
|
|
7
|
-
import '../../resolve-
|
|
8
|
-
import '../../plan-
|
|
9
|
-
import '../../watch-
|
|
6
|
+
import '../../types-Dq180WRV.js';
|
|
7
|
+
import '../../resolve-Bz4mszpL.js';
|
|
8
|
+
import '../../plan-D0DgSLnY.js';
|
|
9
|
+
import '../../watch-Unf6SfUf.js';
|
|
10
10
|
import '../../types-B3iSHX-w.js';
|
|
11
11
|
import '../../types-Cy7rdmXt.js';
|
|
12
12
|
import '../../wordFit-7XpmhcaW.js';
|
|
13
13
|
import '../../edit-lock/index.js';
|
|
14
14
|
import '../../panelWidths-DgQXiPXU.js';
|
|
15
|
-
import '../../CanvasDragLayer-
|
|
16
|
-
import '../../session-
|
|
15
|
+
import '../../CanvasDragLayer-NZpaX6aq.js';
|
|
16
|
+
import '../../session-EsjORLQ0.js';
|
|
17
17
|
import '../../words-SD4neL0n.js';
|
|
18
18
|
import '../../types-BbOBWXMP.js';
|
|
19
19
|
import '../../style-clipboard/index.js';
|
|
@@ -26,7 +26,7 @@ import '../lib/section-template-types.js';
|
|
|
26
26
|
import '../lib/document/content-tree.js';
|
|
27
27
|
import '../lib/shared-section-types.js';
|
|
28
28
|
import '../lib/document/block-choice.js';
|
|
29
|
-
import '../../ScreenDocumentContext-
|
|
29
|
+
import '../../ScreenDocumentContext-BDLUYzlM.js';
|
|
30
30
|
import '../lib/document-contract.js';
|
|
31
31
|
import '../lib/document-switch.js';
|
|
32
32
|
import '../../engine-CvXpFE86.js';
|
|
@@ -50,13 +50,13 @@ import '../lib/document/slot-section-spec.js';
|
|
|
50
50
|
*
|
|
51
51
|
* - a click in the preview on an anchored part opens that part's panel;
|
|
52
52
|
* - a click in the preview on anything ELSE inside a section reports the
|
|
53
|
-
* SECTION, which closes an open part panel. That matters because the old
|
|
53
|
+
* SECTION, which closes an open part panel. That matters because the old library's own
|
|
54
54
|
* selection may not change on such a click (the section was already
|
|
55
55
|
* selected), so nothing else would tell the chrome to drop back;
|
|
56
56
|
* - the open panel is mirrored back into the preview, so the part it is editing
|
|
57
57
|
* draws its selected outline.
|
|
58
58
|
*
|
|
59
|
-
* It deliberately does NOT move the old
|
|
59
|
+
* It deliberately does NOT move the old library's selection when a part opens — exactly
|
|
60
60
|
* like the ticker / Background / Text bridges it joins. The Layers tree, undo,
|
|
61
61
|
* redo and autosave therefore see nothing at all, which is the cheapest possible
|
|
62
62
|
* proof that they behave as they did before.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{usePartBridge}from"../../chunk-
|
|
1
|
+
export{usePartBridge}from"../../chunk-JPCOBNYW.js";import"../../chunk-LSTOOYG7.js";import"../../chunk-TGSK5VII.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-R4AUZVA3.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-VBOSOH5M.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-6QSFJCJT.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-AGWKB77Q.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-RPMSET77.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-S3DUFDQ6.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-6NJHYXJM.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-YU3WHLGI.js";import"../../chunk-LF3FUSCQ.js";import"../../chunk-TGZCD6IP.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";
|
package/dist/screen/index.d.ts
CHANGED
|
@@ -3,23 +3,23 @@ export { default as ScreenStoreProvider } from './components/ScreenStoreProvider
|
|
|
3
3
|
export { NodeDefaults, SELECTION_MODE, ScreenBlockLook, ScreenBlockRules, ScreenBridges, ScreenCanvas, ScreenCanvasDrag, ScreenCanvasDragContext, ScreenCanvasHeadProps, ScreenCanvasTargetProvider, ScreenDevices, ScreenDocumentOps, ScreenDragItem, ScreenInspector, ScreenInspectorMode, ScreenInspectorPanelProps, ScreenLeftPanel, ScreenLeftView, ScreenLeftViewFrame, ScreenLeftViewRules, ScreenMainAction, ScreenMediaDrop, ScreenMediaFile, ScreenMenuItem, ScreenMenuRows, ScreenNewNode, ScreenNode, ScreenNodeActions, ScreenNodeLevel, ScreenNodeMaker, ScreenPartMode, ScreenParts, ScreenPartsProvider, ScreenPinnedBand, ScreenPinnedNodes, ScreenRailItem, ScreenSelector, ScreenSharedSections, ScreenSlot, ScreenSlotAction, ScreenSlotMode, ScreenStyleClipboard, ScreenStyleDocument, ScreenStylePastePlan, ScreenToastExtra, ScreenTree, ScreenTreeFolds, ScreenTreeRows, isPinnedFirst, isPinnedLast, isSelectionMode, 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 './lib/screen-parts.js';
|
|
4
4
|
export { DefaultBackend, EFFICIENT_BACKEND, EaselSession, SessionBackend, SessionBlocks, activateEaselSession, backendOf, createEaselSession, currentEaselSession, deactivateEaselSession, efficientClientOpen, isEfficientBackend, provideDefaultBackend, resetAmbientEaselSession, sessionRegistry, setSessionBridgedSite, setSessionDocumentSite } from './lib/session.js';
|
|
5
5
|
export { EaselSessionProvider, useEaselSession } from './lib/session-context.js';
|
|
6
|
-
export { A as AnyDocumentAddressing, D as DETACHED_EASEL_HOST, a as DocumentAddressing, E as EaselBlockType, b as EaselFieldDescription, c as EaselHost, d as EaselHostAddress, e as EaselHostContext, f as EaselHostPanels, g as EaselHostProvider, h as EaselMessageType, i as EaselSelection, j as EaselToHostMessage, H as HostPickedMedia, k as HostToEaselMessage, I as InboundHostMessage, N as NO_DOCUMENT_ADDRESSING, P as PageEditOp, l as PickedMediaSource, S as SectionScreenTarget, m as SendToHost, n as createEaselHost, u as useEaselHost, o as useHostEscape } from '../ScreenDocumentContext-
|
|
6
|
+
export { A as AnyDocumentAddressing, D as DETACHED_EASEL_HOST, a as DocumentAddressing, E as EaselBlockType, b as EaselFieldDescription, c as EaselHost, d as EaselHostAddress, e as EaselHostContext, f as EaselHostPanels, g as EaselHostProvider, h as EaselMessageType, i as EaselSelection, j as EaselToHostMessage, H as HostPickedMedia, k as HostToEaselMessage, I as InboundHostMessage, N as NO_DOCUMENT_ADDRESSING, P as PageEditOp, l as PickedMediaSource, S as SectionScreenTarget, m as SendToHost, n as createEaselHost, u as useEaselHost, o as useHostEscape } from '../ScreenDocumentContext-BDLUYzlM.js';
|
|
7
7
|
export { EaselCapabilities, EaselDocument, EaselDocumentAdapter, EaselPageRow, SiteRecord, SiteRecordPatch, WebsiteEditLock } from './lib/document-contract.js';
|
|
8
8
|
import 'react';
|
|
9
9
|
import '../blocks/index.js';
|
|
10
|
-
import '../types-
|
|
10
|
+
import '../types-BljCVdzR.js';
|
|
11
11
|
import '../data/index.js';
|
|
12
|
-
import '../types-
|
|
13
|
-
import '../resolve-
|
|
14
|
-
import '../plan-
|
|
15
|
-
import '../watch-
|
|
12
|
+
import '../types-Dq180WRV.js';
|
|
13
|
+
import '../resolve-Bz4mszpL.js';
|
|
14
|
+
import '../plan-D0DgSLnY.js';
|
|
15
|
+
import '../watch-Unf6SfUf.js';
|
|
16
16
|
import '../types-B3iSHX-w.js';
|
|
17
17
|
import '../types-Cy7rdmXt.js';
|
|
18
18
|
import '../wordFit-7XpmhcaW.js';
|
|
19
19
|
import '../edit-lock/index.js';
|
|
20
20
|
import '../panelWidths-DgQXiPXU.js';
|
|
21
|
-
import '../CanvasDragLayer-
|
|
22
|
-
import '../session-
|
|
21
|
+
import '../CanvasDragLayer-NZpaX6aq.js';
|
|
22
|
+
import '../session-EsjORLQ0.js';
|
|
23
23
|
import '../words-SD4neL0n.js';
|
|
24
24
|
import '../types-BbOBWXMP.js';
|
|
25
25
|
import '../style-clipboard/index.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-HNV6HUSQ.js";import"../chunk-GXQCZJOP.js";import"../chunk-Z6V22QRZ.js";import"../chunk-OXZDSOZV.js";import"../chunk-7OCEPOEJ.js";import"../chunk-DSKNJXB4.js";import"../chunk-UMBNBCL4.js";import"../chunk-5XL2RXFU.js";import"../chunk-2FYFAAAK.js";import"../chunk-22I55W37.js";import"../chunk-3QB2ZQXK.js";import"../chunk-DDH2DYQP.js";import"../chunk-T3LAGI43.js";import"../chunk-KCBEE2MC.js";import"../chunk-C56MPJBH.js";import"../chunk-JPCOBNYW.js";import"../chunk-LSTOOYG7.js";import"../chunk-PY7OOQEZ.js";import"../chunk-RKTF5XLP.js";export{ScreenStoreProvider}from"../chunk-VHFLOHGQ.js";import"../chunk-5545A3PC.js";import"../chunk-NQ7NRYTK.js";import"../chunk-VKPOH6MK.js";import"../chunk-IZGFJWH4.js";import"../chunk-N7E6264U.js";import"../chunk-N3MJOHAG.js";import"../chunk-SINAM2IT.js";import"../chunk-UMDQ6CLQ.js";import"../chunk-RUQOIQWI.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSelectionMode,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-TGSK5VII.js";import"../chunk-2G6MAXPY.js";import"../chunk-AT4DDMJS.js";import"../chunk-GKG3M5QK.js";import"../chunk-A6ZP5II4.js";import"../chunk-77IWWW6X.js";import"../chunk-ERR437B5.js";import"../chunk-UNVKPVZW.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-BIK3AO2V.js";import"../chunk-LOMEH6DG.js";import"../chunk-KCOBHPN6.js";import"../chunk-FHCKFOCD.js";export{EaselSessionProvider,useEaselSession}from"../chunk-YM4UEGBV.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-SNF5764Q.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-MQA7OFRA.js";import"../chunk-XFYFKITX.js";import"../chunk-IYHO4XQX.js";import"../chunk-V7U33NF2.js";import"../chunk-6WY6ZXJG.js";import"../chunk-SSRYU3YG.js";import"../chunk-AJ2SUSET.js";import"../chunk-ANPOR6EY.js";import"../chunk-6UAEFOJ4.js";import"../chunk-R4AUZVA3.js";import"../chunk-TCAAOYQY.js";import"../chunk-VBOSOH5M.js";import"../chunk-TBY3DFKS.js";import"../chunk-6QSFJCJT.js";import"../chunk-BPXEFVSQ.js";import"../chunk-YCSZAP7T.js";import"../chunk-WHS6Y55E.js";import"../chunk-K56YDHYQ.js";import"../chunk-ZEH6QLBH.js";import"../chunk-AGWKB77Q.js";import"../chunk-ZKY45F5G.js";import"../chunk-FIVU2COQ.js";import"../chunk-P5VYGWYO.js";import"../chunk-WK3AFPXY.js";import"../chunk-RPMSET77.js";import"../chunk-FM6JO4WF.js";import"../chunk-KFV7N2DJ.js";import"../chunk-NDRZP6YR.js";import"../chunk-H6DDIBQ4.js";import"../chunk-ZG6PVMC3.js";import"../chunk-MJM6SFD3.js";import"../chunk-AJSDWWJW.js";import"../chunk-2OAZYSWJ.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-HZSZT3BE.js";import"../chunk-KRL3IUV3.js";import"../chunk-Y2T3JX7K.js";import"../chunk-KFWNGPW3.js";import"../chunk-JACEEVVF.js";import"../chunk-S3DUFDQ6.js";import"../chunk-MFIRYGHW.js";import"../chunk-LN43DP2A.js";import"../chunk-TQ5Y6S2X.js";import"../chunk-6NJHYXJM.js";import"../chunk-P2VEMZH5.js";import"../chunk-YU3WHLGI.js";import"../chunk-LF3FUSCQ.js";import"../chunk-TGZCD6IP.js";import"../chunk-KXM6YRG2.js";import"../chunk-BSPCSC45.js";import"../chunk-467WWV4I.js";import"../chunk-TIAWIOGD.js";import"../chunk-MGVI67QV.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { EaselSession } from './session.js';
|
|
3
3
|
import '../../blocks/index.js';
|
|
4
|
-
import '../../types-
|
|
4
|
+
import '../../types-BljCVdzR.js';
|
|
5
5
|
import '../../data/index.js';
|
|
6
|
-
import '../../types-
|
|
7
|
-
import '../../resolve-
|
|
8
|
-
import '../../plan-
|
|
6
|
+
import '../../types-Dq180WRV.js';
|
|
7
|
+
import '../../resolve-Bz4mszpL.js';
|
|
8
|
+
import '../../plan-D0DgSLnY.js';
|
|
9
9
|
import './backend-error.js';
|
|
10
10
|
import '../../edit-lock/index.js';
|
|
11
11
|
import './host-chrome.js';
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* inside an object or a list item. This walks every value under `props` and
|
|
15
15
|
* takes each array item of that shape as a node. It asks no block registry which
|
|
16
16
|
* props are slots, because the caller is a server that must not have to load
|
|
17
|
-
* one: this module imports
|
|
17
|
+
* one: this module imports only the pure `data` leaf (`isNode`), which itself
|
|
18
|
+
* imports nothing.
|
|
18
19
|
*
|
|
19
20
|
* That makes it wider than the editor's own walk in one direction only: a prop
|
|
20
21
|
* that merely LOOKS like a node (an object with a string `type` and an object
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{blockTypesIn}from"../../../chunk-
|
|
1
|
+
export{blockTypesIn}from"../../../chunk-IZGFJWH4.js";import"../../../chunk-TGZCD6IP.js";import"../../../chunk-KXM6YRG2.js";
|
|
@@ -31,7 +31,7 @@ declare function slotFieldsOf(config: SlotConfigView, type: string): string[];
|
|
|
31
31
|
* What a component type's config ALLOWS of the two actions that make another
|
|
32
32
|
* node or take one away (0.103.0): its `permissions.duplicate` and
|
|
33
33
|
* `permissions.delete`, each true unless the config says false — the reading
|
|
34
|
-
* The old
|
|
34
|
+
* The old library gave a config that carried none. The campaign designer's Product keeps
|
|
35
35
|
* its Price line this way (`{ delete: false, duplicate: false }`).
|
|
36
36
|
*
|
|
37
37
|
* The screen's tree rows, its menu and the inspector head it hands this to
|
|
@@ -48,7 +48,7 @@ declare function blockNodeActions(config: SlotConfigView, type: string): {
|
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
50
|
* A slot child, addressed the way the Layers tree selects it: the node, the
|
|
51
|
-
* compound zone key "<parentId>:<slotName>" the old
|
|
51
|
+
* compound zone key "<parentId>:<slotName>" the old library's ops take, and its index in
|
|
52
52
|
* that slot.
|
|
53
53
|
*/
|
|
54
54
|
type SlotChild = {
|
|
@@ -75,7 +75,7 @@ declare function slotChildrenIn(item: TreeItem, slot: string): SlotChild[];
|
|
|
75
75
|
/**
|
|
76
76
|
* WHERE a node sits in the document — the node itself, the zone key its own
|
|
77
77
|
* array is addressed by, and its index in that array. Exactly the three
|
|
78
|
-
* arguments an old-
|
|
78
|
+
* arguments an old-library `replace` / `remove` / `reorder` op takes.
|
|
79
79
|
*/
|
|
80
80
|
type NodeLocation = {
|
|
81
81
|
item: TreeItem;
|
|
@@ -112,16 +112,16 @@ type NodeLocation = {
|
|
|
112
112
|
* `ScreenChrome` memoises a Map of EVERY node's address (plus each
|
|
113
113
|
* zone's whole sibling list) and hands the lookup to the context menu as
|
|
114
114
|
* `locate`. That map is built once per document for a surface that needs all of
|
|
115
|
-
* it; this finds ONE node and is reachable from an old-
|
|
115
|
+
* it; this finds ONE node and is reachable from an old-library field, which the map is
|
|
116
116
|
* not — it lives in a component's closure and rides no context. What must not
|
|
117
117
|
* be two things is the set of SLOT PROP NAMES, and it is not: both walk through
|
|
118
118
|
* `childSlotsOf`, so an address here and an address there cannot disagree.
|
|
119
|
-
* The old
|
|
119
|
+
* The old library's own `getSelectorForId` is a third reader of the same fact, and the one
|
|
120
120
|
* a live store already offers — it is a hook-bound function, so a guard cannot
|
|
121
121
|
* call it, which is the whole reason this one is written pure.
|
|
122
122
|
*
|
|
123
123
|
* PURE, and takes the config as an argument, so a guard can assert against it
|
|
124
|
-
* without an old-
|
|
124
|
+
* without an old-library store, a React tree or a hook.
|
|
125
125
|
*
|
|
126
126
|
* `null` when no node carries the id — the honest answer for a stale selection,
|
|
127
127
|
* and every caller treats it as "there is nothing to write".
|
|
@@ -186,7 +186,7 @@ declare function pinnedDuplicateIndices(content: ReadonlyArray<{
|
|
|
186
186
|
*
|
|
187
187
|
* A LIVE store must be edited by identity, never by position: an index computed
|
|
188
188
|
* from a render snapshot addresses whatever has since shifted into that slot,
|
|
189
|
-
* which is how the old
|
|
189
|
+
* which is how the old library's heal deleted real sections. Ids survive that skew
|
|
190
190
|
* — the worst a stale read can do is name a node that is no longer there. A
|
|
191
191
|
* duplicate carrying no id is skipped (it cannot be named in a remove); the
|
|
192
192
|
* published render's index-based dedupe still drops it.
|
|
@@ -201,7 +201,7 @@ declare function pinnedDuplicateIds(content: ReadonlyArray<{
|
|
|
201
201
|
* Which pinned chrome types a document is MISSING, and a load-time seed must
|
|
202
202
|
* therefore create. A type counts as missing only when it is absent from BOTH:
|
|
203
203
|
*
|
|
204
|
-
* - `live` — the
|
|
204
|
+
* - `live` — the old library's store, read at the moment of the write; and
|
|
205
205
|
* - `persisted` — the document exactly as it was LOADED from the backend.
|
|
206
206
|
*
|
|
207
207
|
* Requiring both is what makes seeding idempotent, and neither check can be
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { PreviewDevice } from '../../components/PreviewDeviceContext.js';
|
|
3
|
+
import { D as DeviceFieldTier, a as DeviceTier } from '../../../rowMarks-CO5TpfLY.js';
|
|
4
|
+
export { b as DEVICE_FIELD_MARKER, c as DeviceFieldMeta, d as deviceMetaOf } from '../../../rowMarks-CO5TpfLY.js';
|
|
3
5
|
import '../content/view-tiers.js';
|
|
4
6
|
|
|
5
7
|
/**
|
|
@@ -12,8 +14,8 @@ import '../content/view-tiers.js';
|
|
|
12
14
|
* screen; the panel ignored it, so the merchant read labels to find the control
|
|
13
15
|
* that matched what they were looking at.
|
|
14
16
|
*
|
|
15
|
-
* THE MECHANISM, and why this one.
|
|
16
|
-
* The old
|
|
17
|
+
* THE MECHANISM, and why this one. An old-library `resolveFields` cannot do it: in this
|
|
18
|
+
* The old library version the fields slice re-resolves only when the selected node's DATA
|
|
17
19
|
* changes (`useRegisterFieldsSlice` subscribes to `state.indexes.nodes[id]`), and
|
|
18
20
|
* switching device changes no data — the panel would keep whatever field set the
|
|
19
21
|
* last edit produced. So the decision is made where it can re-render freely: in
|
|
@@ -35,18 +37,15 @@ import '../content/view-tiers.js';
|
|
|
35
37
|
* ({@link DEVICE_NOTE}); it never presents desktop values as if they were
|
|
36
38
|
* tablet's. {@link shownTier} is the single place that ruling is written down.
|
|
37
39
|
*
|
|
38
|
-
* WHY THE HIDDEN FIELD LEAVES NO GAP. The old
|
|
39
|
-
* own padded old
|
|
40
|
+
* WHY THE HIDDEN FIELD LEAVES NO GAP. The old library wraps every top-level field in its
|
|
41
|
+
* own padded old library's padded field box before it calls `render`, so a field that
|
|
40
42
|
* renders nothing would still cost ~37px of empty panel. The gate instead paints
|
|
41
43
|
* a zero-size marker and this package's `screen.css` collapses the
|
|
42
|
-
* wrapper that contains one — the same "reach the wrapper the old
|
|
44
|
+
* wrapper that contains one — the same "reach the wrapper the old library owns" trick the
|
|
43
45
|
* fold reflow in `controls.tsx` already relies on, expressed as one CSS rule
|
|
44
46
|
* instead of a second DOM pass (so it cannot race the fold's).
|
|
45
47
|
*/
|
|
46
48
|
|
|
47
|
-
/** The two tiers a stored value can belong to. Tablet is not one — see
|
|
48
|
-
* {@link shownTier}. */
|
|
49
|
-
type DeviceTier = "desktop" | "mobile";
|
|
50
49
|
/**
|
|
51
50
|
* Which tier's stored values the panel shows for a given preview device.
|
|
52
51
|
*
|
|
@@ -63,7 +62,7 @@ declare function shownTier(device: PreviewDevice): DeviceTier;
|
|
|
63
62
|
* letting the desktop values pass for tablet's own.
|
|
64
63
|
*/
|
|
65
64
|
declare const DEVICE_NOTE: Readonly<Record<PreviewDevice, string | null>>;
|
|
66
|
-
/** The attribute the stylesheet looks for to collapse a gated-off field's the old
|
|
65
|
+
/** The attribute the stylesheet looks for to collapse a gated-off field's the old library
|
|
67
66
|
* wrapper. Declared here, matched once in this package's `screen.css`, which
|
|
68
67
|
* every host that mounts the screen loads (it sat in the website's sheet until
|
|
69
68
|
* 0.103.0, so a second host's hidden rows kept their space). */
|
|
@@ -78,26 +77,13 @@ type AnyCustomField = {
|
|
|
78
77
|
type: "custom";
|
|
79
78
|
render: FieldRender;
|
|
80
79
|
};
|
|
81
|
-
/** Marker carried by every gated field, in the same style as
|
|
82
|
-
* {@link import("./controls").FOLD_FIELD_MARKER}: the tier and the field it
|
|
83
|
-
* wraps live ON the field object, never only inside the render closure. Without
|
|
84
|
-
* it a gated control is opaque to every static walk — and the fold guard in
|
|
85
|
-
* `scripts/test-section-groups.ts` genuinely needs to see the header underneath
|
|
86
|
-
* to check its label against what it draws. The old editor ignores extra keys. */
|
|
87
|
-
declare const DEVICE_FIELD_MARKER: "__device";
|
|
88
|
-
/** The payload on {@link DEVICE_FIELD_MARKER}. */
|
|
89
|
-
type DeviceFieldMeta = {
|
|
90
|
-
tier: DeviceTier;
|
|
91
|
-
inner: unknown;
|
|
92
|
-
};
|
|
93
|
-
/** Read a field's device payload, or null when it is not gated. The ONE place
|
|
94
|
-
* that knows the marker's shape. */
|
|
95
|
-
declare function deviceMetaOf(field: unknown): DeviceFieldMeta | null;
|
|
96
80
|
/** The field a gate wraps, or the field itself when it wraps nothing — what a
|
|
97
81
|
* static walk wants to look at. */
|
|
98
82
|
declare function withoutDeviceGate(field: unknown): unknown;
|
|
99
83
|
/**
|
|
100
|
-
* Paint `field` only while the canvas is showing `tier
|
|
84
|
+
* Paint `field` only while the canvas is showing `tier` — or, with `"each"`, in
|
|
85
|
+
* every view, handing the control the tier it writes there (`tier` prop:
|
|
86
|
+
* `"mobile"` in the phone view, `"desktop"` otherwise). See `DeviceFieldTier`.
|
|
101
87
|
*
|
|
102
88
|
* Everything else about the field is preserved by identity-spread — its `type`,
|
|
103
89
|
* its manifest markers, its data keys — so the media and neutralization walks,
|
|
@@ -106,7 +92,7 @@ declare function withoutDeviceGate(field: unknown): unknown;
|
|
|
106
92
|
declare function deviceField<F extends {
|
|
107
93
|
type: "custom";
|
|
108
94
|
render: (p: never) => ReactElement;
|
|
109
|
-
}>(tier:
|
|
95
|
+
}>(tier: DeviceFieldTier, field: F): F;
|
|
110
96
|
/**
|
|
111
97
|
* The panel's device indicator — one quiet line, and only when there is
|
|
112
98
|
* something to say (see {@link DEVICE_NOTE}).
|
|
@@ -125,4 +111,4 @@ declare function deviceField<F extends {
|
|
|
125
111
|
*/
|
|
126
112
|
declare function deviceNote(): AnyCustomField;
|
|
127
113
|
|
|
128
|
-
export {
|
|
114
|
+
export { DEVICE_HIDDEN_ATTR, DEVICE_NOTE, DeviceFieldTier, DeviceTier, deviceField, deviceNote, shownTier, withoutDeviceGate };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-2FYFAAAK.js";import"../../../chunk-22I55W37.js";import"../../../chunk-IYHO4XQX.js";export{DEVICE_FIELD_MARKER,deviceMetaOf}from"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";
|
|
@@ -33,7 +33,7 @@ import { TextControlKind } from './text-control-kinds.js';
|
|
|
33
33
|
* GENERATOR (`scripts/gen-neutralization-manifest.ts`) walks the built config
|
|
34
34
|
* looking for it, so the text factories are the single source of truth for
|
|
35
35
|
* "this prop holds customer-authored copy" — a new text field is covered the
|
|
36
|
-
* moment it is declared, with no list to maintain anywhere (the old
|
|
36
|
+
* moment it is declared, with no list to maintain anywhere (the old library ignores extra
|
|
37
37
|
* keys).
|
|
38
38
|
*
|
|
39
39
|
* Unlike the media marker this carries a PAYLOAD, because the neutralizer needs
|
|
@@ -66,7 +66,7 @@ declare const LINK_FIELD_MARKER: "__link";
|
|
|
66
66
|
*
|
|
67
67
|
* It is the SAME constant the render passes — `withScaffold` (in
|
|
68
68
|
* `lib/document/controls`) takes it as an argument rather than copying it — so the
|
|
69
|
-
* preview and the walk cannot drift. The old
|
|
69
|
+
* preview and the walk cannot drift. The old library ignores extra keys on a field, exactly
|
|
70
70
|
* as it does for the two markers above.
|
|
71
71
|
*/
|
|
72
72
|
declare const SCAFFOLD_FIELD_MARKER: "__scaffold";
|
|
@@ -165,7 +165,7 @@ type EdgeCell = "top" | "right" | "bottom" | "left";
|
|
|
165
165
|
/** Marker carried by every media field object. The manifest GENERATOR walks the
|
|
166
166
|
* built config looking for it, so the factory below is the single source of
|
|
167
167
|
* truth for "this prop holds media" — a new media field is covered the moment
|
|
168
|
-
* it is declared, with no list to maintain anywhere (the old
|
|
168
|
+
* it is declared, with no list to maintain anywhere (the old library ignores extra keys). */
|
|
169
169
|
declare const MEDIA_FIELD_MARKER: "__media";
|
|
170
170
|
/** Marker carried by every heading {@link group} / {@link section} builds — and
|
|
171
171
|
* by every bucket header {@link bucketHeader} builds, whose "heading" a
|
|
@@ -174,7 +174,7 @@ declare const MEDIA_FIELD_MARKER: "__media";
|
|
|
174
174
|
* closure. Without it a header's label is unreadable at runtime — the closure
|
|
175
175
|
* is all there is — and the four-bucket pass (`lib/document/field-groups.ts`) would
|
|
176
176
|
* have to re-derive it by parsing `config.tsx`, i.e. a second source of truth
|
|
177
|
-
* for something the field already knows. The old
|
|
177
|
+
* for something the field already knows. The old library ignores extra keys, and the
|
|
178
178
|
* neutralization walk classifies by its own markers / `type` / prop name, so a
|
|
179
179
|
* header stays exactly as invisible to it as it was (see
|
|
180
180
|
* `scripts/gen-neutralization-manifest.ts`). */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Config } from '../../../blocks/index.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
import '../../../types-
|
|
3
|
+
import '../../../types-BljCVdzR.js';
|
|
4
4
|
import '../../../data/index.js';
|
|
5
|
-
import '../../../types-
|
|
6
|
-
import '../../../resolve-
|
|
7
|
-
import '../../../plan-
|
|
5
|
+
import '../../../types-Dq180WRV.js';
|
|
6
|
+
import '../../../resolve-Bz4mszpL.js';
|
|
7
|
+
import '../../../plan-D0DgSLnY.js';
|
|
8
8
|
|
|
9
9
|
/** One offerable section, with the category it is grouped under. */
|
|
10
10
|
type PaletteSection = {
|
|
@@ -73,7 +73,7 @@ interface PaletteLook {
|
|
|
73
73
|
* E9): it is a registry's way of keeping blocks it has out of the picker — the
|
|
74
74
|
* campaign designer's Product parts, its retired blocks, its Sections — and a
|
|
75
75
|
* palette that listed them would offer things that may not be put on a page.
|
|
76
|
-
* The old
|
|
76
|
+
* The old library's own palette read the flag the same way. No website category carries
|
|
77
77
|
* it, so the website's palette is the list it was.
|
|
78
78
|
*/
|
|
79
79
|
declare function buildPaletteSections(config: Config, look: PaletteLook): PaletteSection[];
|
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
* array on a linked product, Image & Text Columns takes its text-position row
|
|
8
8
|
* away once it has Boxes.
|
|
9
9
|
*
|
|
10
|
-
* `the old
|
|
10
|
+
* `the old library's fields panel` honours all of that. Every list built beside it from the raw
|
|
11
11
|
* declaration does not — and one of them is the copy list in
|
|
12
12
|
* `components/SectionEditor`. So a merchant met the SAME heading twice: once in
|
|
13
|
-
* the panel the old
|
|
13
|
+
* the panel the old library drew, and once in a list drawn from rows the resolver had
|
|
14
14
|
* already dropped (owner, 2026-09-10, on a Booking Form's Head box).
|
|
15
15
|
*
|
|
16
|
-
* ⚠️ THE OLD
|
|
16
|
+
* ⚠️ THE OLD LIBRARY DOES NOT EXPOSE ITS RESOLVED SET. The store slice that holds it is
|
|
17
17
|
* internal — `useEasel((s) => s)` and `the old selector hook` both hand back `the old store API`, which
|
|
18
18
|
* has no `fields` on it (checked against 0.20.2's own types, not remembered). So
|
|
19
|
-
* the resolver is asked here, the same way the old
|
|
19
|
+
* the resolver is asked here, the same way the old library asks it.
|
|
20
20
|
*
|
|
21
21
|
* ⚠️ AND AN ASYNC RESOLVER IS ANSWERED WITH THE DECLARATION. A promise cannot be
|
|
22
22
|
* read during a render, and a list that waited would flicker rows in and out.
|
|
@@ -35,7 +35,7 @@ interface PanelComponent {
|
|
|
35
35
|
* `parent` is passed as null and `appState` as an empty object because the ONE
|
|
36
36
|
* caller uses the result for authored-copy rows, which no resolver decides from
|
|
37
37
|
* either. A caller that needs the width rows — which DO read `parent` — must ask
|
|
38
|
-
* The old
|
|
38
|
+
* The old library rather than this.
|
|
39
39
|
*/
|
|
40
40
|
declare function panelFieldsOf(config: {
|
|
41
41
|
components?: Record<string, PanelComponent>;
|