efficient-easel 3.1.0 → 3.2.1
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 +3 -1
- package/dist/blocks/index.d.ts +2 -2
- package/dist/{chunk-QMBB7SU5.js → chunk-2T3ED73A.js} +1 -1
- package/dist/chunk-2WVZ3CK3.js +5 -0
- package/dist/{chunk-JVUGLF5I.js → chunk-4WEGYBTV.js} +3 -3
- package/dist/chunk-55IKQFBW.js +5 -0
- package/dist/{chunk-TGF7KEO7.js → chunk-6QSPOILR.js} +1 -1
- package/dist/{chunk-7HGVGKWU.js → chunk-7VP5RXNO.js} +48 -48
- package/dist/{chunk-MYC3AVG2.js → chunk-AVYFZZAP.js} +1 -1
- package/dist/chunk-BF3PIXZD.js +1 -0
- package/dist/{chunk-LHZIMK3M.js → chunk-FRGCTHDB.js} +1 -1
- package/dist/{chunk-53NZMIRT.js → chunk-IMRJHRQ2.js} +1 -1
- package/dist/{chunk-PT6V53OO.js → chunk-J2JBETVO.js} +1 -1
- package/dist/{chunk-EF3YSWT5.js → chunk-KNUFI3WV.js} +1 -1
- package/dist/{chunk-TCNPQKY6.js → chunk-LMHGVI5R.js} +1 -1
- package/dist/{chunk-BVUPKIM3.js → chunk-OFNXIZEP.js} +1 -1
- package/dist/chunk-PDZXAFNX.js +9 -0
- package/dist/{chunk-VGV5D667.js → chunk-PRSTFWUY.js} +2 -2
- package/dist/chunk-QASZFO4S.js +1 -0
- package/dist/{chunk-VX5GDBRI.js → chunk-U2DVXW2H.js} +1 -1
- package/dist/{chunk-4LD4KA27.js → chunk-ZN752E2O.js} +1 -1
- package/dist/easel/index.d.ts +5 -5
- package/dist/easel/index.js +1 -1
- package/dist/node-ops/index.d.ts +2 -2
- package/dist/node-ops/index.js +1 -1
- package/dist/{plan-DChbUXdS.d.ts → plan-BdQ9mLIf.d.ts} +20 -1
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/MediaSidePanel.d.ts +2 -2
- package/dist/screen/components/MediaSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.d.ts +3 -3
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenDocumentContext.d.ts +2 -2
- package/dist/screen/components/ScreenDocumentContext.js +1 -1
- package/dist/screen/components/ScreenMount.d.ts +2 -2
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.d.ts +2 -2
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +15 -15
- package/dist/screen/components/usePartBridge.d.ts +2 -2
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.d.ts +2 -2
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/admin-bridge.d.ts +2 -2
- package/dist/screen/lib/document-addressing.d.ts +2 -2
- package/dist/screen/lib/document-hooks.d.ts +2 -2
- package/dist/screen/lib/host.d.ts +2 -2
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/media-panel.d.ts +2 -2
- package/dist/screen/lib/media-picker.d.ts +2 -2
- package/dist/screen/lib/page-lock.d.ts +2 -2
- package/dist/screen/lib/puck/device-fields.js +1 -1
- package/dist/screen/lib/puck/palette-sections.d.ts +2 -2
- package/dist/screen/lib/puck/section-doc.d.ts +2 -2
- package/dist/screen/lib/puck/style-clipboard.d.ts +2 -2
- package/dist/screen/lib/puck/style-clipboard.js +1 -1
- package/dist/screen/lib/puck/use-section-ops.d.ts +2 -2
- package/dist/screen/lib/puck/use-section-ops.js +1 -1
- package/dist/screen/lib/screen-parts.d.ts +4 -4
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/lib/section-templates.d.ts +2 -2
- package/dist/screen/lib/session-context.d.ts +2 -2
- package/dist/screen/lib/session.d.ts +2 -2
- package/dist/screen/words.js +1 -1
- package/dist/strings/catalogue.js +1 -1
- package/dist/strings/index.js +1 -1
- package/dist/{types-E3HrTPg2.d.ts → types-CGFykP7c.d.ts} +1 -1
- package/dist/{useNodeOps-BF0fQsif.d.ts → useNodeOps-B3e4b8a2.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-D2BCHTQR.js +0 -1
- package/dist/chunk-EJ6QAWRH.js +0 -5
- package/dist/chunk-LYALMY55.js +0 -1
- package/dist/chunk-PYCLHOSA.js +0 -9
- package/dist/chunk-UV4D7CDX.js +0 -5
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-4WEGYBTV.js";import"../chunk-GXQCZJOP.js";export{ScreenStoreProvider}from"../chunk-6QSPOILR.js";import"../chunk-7VP5RXNO.js";import"../chunk-26OOWIJJ.js";import"../chunk-AVYFZZAP.js";import"../chunk-FGNR22NY.js";import"../chunk-ZE7I3PLX.js";import"../chunk-2GVCAIPX.js";import"../chunk-U2DVXW2H.js";import"../chunk-7F52SZOI.js";import"../chunk-R2HLPNQF.js";import"../chunk-TBF5CVPA.js";import"../chunk-4ES5JGGX.js";import"../chunk-IQ5TA7AM.js";import"../chunk-DUVRZ456.js";import"../chunk-6W7WLPZH.js";import"../chunk-J2JBETVO.js";import"../chunk-KCBEE2MC.js";import"../chunk-42TMLDSQ.js";import"../chunk-OFNXIZEP.js";import"../chunk-FRGCTHDB.js";import"../chunk-IYT6NN2J.js";import"../chunk-IMRJHRQ2.js";import"../chunk-KNUFI3WV.js";import"../chunk-BSPCSC45.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";import"../chunk-PRSTFWUY.js";import"../chunk-S4AWJX4Q.js";import"../chunk-ERR437B5.js";import"../chunk-KG7RJWOK.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-VPFNZ7TB.js";import"../chunk-LOMEH6DG.js";import"../chunk-V7U33NF2.js";import"../chunk-5545A3PC.js";import"../chunk-2WVZ3CK3.js";import"../chunk-5ZBY24K7.js";import"../chunk-PA3PNTVV.js";import"../chunk-BVN33R76.js";import"../chunk-5SOSVTVI.js";import"../chunk-KQMML6JM.js";import"../chunk-KCOBHPN6.js";export{EaselSessionProvider,useEaselSession}from"../chunk-O7Q4DDJT.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-RSCMJIWS.js";import"../chunk-HQ4VVRIC.js";import"../chunk-ZN752E2O.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-55IKQFBW.js";import"../chunk-PLVEGYK6.js";import"../chunk-R6WTQWAC.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-U3JP4VGF.js";import"../chunk-6WY6ZXJG.js";import"../chunk-BF3PIXZD.js";import"../chunk-PDZXAFNX.js";import"../chunk-AELNNAFM.js";import"../chunk-CRPJGCSO.js";import"../chunk-OZ72A6MY.js";import"../chunk-UFY6RNMT.js";import"../chunk-YNOZ5NXW.js";import"../chunk-K56YDHYQ.js";import"../chunk-QTLAVDJE.js";import"../chunk-YRLPFZW3.js";import"../chunk-BXMXTO36.js";import"../chunk-EA2HTX37.js";import"../chunk-OSPUG6S6.js";import"../chunk-WK3AFPXY.js";import"../chunk-QASZFO4S.js";import"../chunk-4VJATVVR.js";import"../chunk-BDTITTMW.js";import"../chunk-H6DDIBQ4.js";import"../chunk-GTDLBUOC.js";import"../chunk-Y2G7CU6A.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-MJM6SFD3.js";import"../chunk-2OAZYSWJ.js";import"../chunk-66LWADFP.js";import"../chunk-QLD57GBB.js";import"../chunk-FFYXVAAL.js";import"../chunk-MFIRYGHW.js";import"../chunk-6HHHBBSY.js";import"../chunk-O2NLQBFX.js";import"../chunk-67GNT6PF.js";import"../chunk-PAELDYYS.js";import"../chunk-ZNCEOSXO.js";import"../chunk-P2VEMZH5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.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-CGFykP7c.js';
|
|
5
5
|
import '../../data/index.js';
|
|
6
6
|
import '../../types-41704JE4.js';
|
|
7
7
|
import '../../resolve-D68pb3Bx.js';
|
|
8
|
-
import '../../plan-
|
|
8
|
+
import '../../plan-BdQ9mLIf.js';
|
|
9
9
|
import './backend-error.js';
|
|
10
10
|
import '../../edit-lock/index.js';
|
|
11
11
|
import './host-chrome.js';
|
|
@@ -3,11 +3,11 @@ import './document-contract.js';
|
|
|
3
3
|
import './session.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '../../blocks/index.js';
|
|
6
|
-
import '../../types-
|
|
6
|
+
import '../../types-CGFykP7c.js';
|
|
7
7
|
import '../../data/index.js';
|
|
8
8
|
import '../../types-41704JE4.js';
|
|
9
9
|
import '../../resolve-D68pb3Bx.js';
|
|
10
|
-
import '../../plan-
|
|
10
|
+
import '../../plan-BdQ9mLIf.js';
|
|
11
11
|
import './document-switch.js';
|
|
12
12
|
import '../../engine-DBxp_v6B.js';
|
|
13
13
|
import '../../edit-lock/index.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Data } from '../../blocks/index.js';
|
|
2
2
|
import { EaselCapabilities } from './document-contract.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import '../../types-
|
|
4
|
+
import '../../types-CGFykP7c.js';
|
|
5
5
|
import '../../data/index.js';
|
|
6
6
|
import '../../types-41704JE4.js';
|
|
7
7
|
import '../../resolve-D68pb3Bx.js';
|
|
8
|
-
import '../../plan-
|
|
8
|
+
import '../../plan-BdQ9mLIf.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* WHAT A HOST DOES TO A DOCUMENT AS IT OPENS AND AS IT IS STORED.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
export { D as DETACHED_EASEL_HOST, E as EaselHost, b as EaselHostAddress, c as EaselHostContext, d as EaselHostProvider, e as EaselMessageType, f as EaselToHostMessage, H as HostPickedMedia, g as HostToEaselMessage, I as InboundHostMessage, S as SectionScreenTarget, h as SendToHost, i as createEaselHost, u as useEaselHost, j as useHostEscape } from '../../host-CiuzZJXj.js';
|
|
3
3
|
import '../../blocks/index.js';
|
|
4
|
-
import '../../types-
|
|
4
|
+
import '../../types-CGFykP7c.js';
|
|
5
5
|
import '../../data/index.js';
|
|
6
6
|
import '../../types-41704JE4.js';
|
|
7
7
|
import '../../resolve-D68pb3Bx.js';
|
|
8
|
-
import '../../plan-
|
|
8
|
+
import '../../plan-BdQ9mLIf.js';
|
|
9
9
|
import './document-contract.js';
|
|
10
10
|
import './session.js';
|
|
11
11
|
import './backend-error.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{editorRootFocus,useEaselKeyTarget,useEaselUndoKeys}from"../../chunk-
|
|
1
|
+
export{editorRootFocus,useEaselKeyTarget,useEaselUndoKeys}from"../../chunk-J2JBETVO.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PDZXAFNX.js";import"../../chunk-AELNNAFM.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-QASZFO4S.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -2,11 +2,11 @@ import * as react from 'react';
|
|
|
2
2
|
import { ComponentType, ReactNode } from 'react';
|
|
3
3
|
import { H as HostPickedMedia, E as EaselHost } from '../../host-CiuzZJXj.js';
|
|
4
4
|
import '../../blocks/index.js';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-CGFykP7c.js';
|
|
6
6
|
import '../../data/index.js';
|
|
7
7
|
import '../../types-41704JE4.js';
|
|
8
8
|
import '../../resolve-D68pb3Bx.js';
|
|
9
|
-
import '../../plan-
|
|
9
|
+
import '../../plan-BdQ9mLIf.js';
|
|
10
10
|
import './document-contract.js';
|
|
11
11
|
import './session.js';
|
|
12
12
|
import './backend-error.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { E as EaselHost } from '../../host-CiuzZJXj.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../../blocks/index.js';
|
|
4
|
-
import '../../types-
|
|
4
|
+
import '../../types-CGFykP7c.js';
|
|
5
5
|
import '../../data/index.js';
|
|
6
6
|
import '../../types-41704JE4.js';
|
|
7
7
|
import '../../resolve-D68pb3Bx.js';
|
|
8
|
-
import '../../plan-
|
|
8
|
+
import '../../plan-BdQ9mLIf.js';
|
|
9
9
|
import './document-contract.js';
|
|
10
10
|
import './session.js';
|
|
11
11
|
import './backend-error.js';
|
|
@@ -2,11 +2,11 @@ import { EditLock } from '../../edit-lock/index.js';
|
|
|
2
2
|
import { EaselSession } from './session.js';
|
|
3
3
|
import '../../blocks/index.js';
|
|
4
4
|
import 'react';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-CGFykP7c.js';
|
|
6
6
|
import '../../data/index.js';
|
|
7
7
|
import '../../types-41704JE4.js';
|
|
8
8
|
import '../../resolve-D68pb3Bx.js';
|
|
9
|
-
import '../../plan-
|
|
9
|
+
import '../../plan-BdQ9mLIf.js';
|
|
10
10
|
import './backend-error.js';
|
|
11
11
|
import './host-chrome.js';
|
|
12
12
|
import './links/link-filters.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DEVICE_FIELD_MARKER,DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceMetaOf,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-
|
|
1
|
+
export{DEVICE_FIELD_MARKER,DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceMetaOf,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-U2DVXW2H.js";import"../../../chunk-7F52SZOI.js";import"../../../chunk-BSPCSC45.js";import"../../../chunk-BF3PIXZD.js";import"../../../chunk-MFIRYGHW.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Config } from '../../../blocks/index.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
import '../../../types-
|
|
3
|
+
import '../../../types-CGFykP7c.js';
|
|
4
4
|
import '../../../data/index.js';
|
|
5
5
|
import '../../../types-41704JE4.js';
|
|
6
6
|
import '../../../resolve-D68pb3Bx.js';
|
|
7
|
-
import '../../../plan-
|
|
7
|
+
import '../../../plan-BdQ9mLIf.js';
|
|
8
8
|
|
|
9
9
|
/** One offerable section, with the category it is grouped under. */
|
|
10
10
|
type PaletteSection = {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Data } from '../../../blocks/index.js';
|
|
2
2
|
import { TreeItem } from './content-tree.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import '../../../types-
|
|
4
|
+
import '../../../types-CGFykP7c.js';
|
|
5
5
|
import '../../../data/index.js';
|
|
6
6
|
import '../../../types-41704JE4.js';
|
|
7
7
|
import '../../../resolve-D68pb3Bx.js';
|
|
8
|
-
import '../../../plan-
|
|
8
|
+
import '../../../plan-BdQ9mLIf.js';
|
|
9
9
|
|
|
10
10
|
declare function nodeToDoc(node: TreeItem): Data;
|
|
11
11
|
declare function docToNode(data: Data): TreeItem | null;
|
|
@@ -5,11 +5,11 @@ import { panelFieldsOf } from './panel-fields.js';
|
|
|
5
5
|
import '../../../types-BsyPh6EW.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import '../../../blocks/index.js';
|
|
8
|
-
import '../../../types-
|
|
8
|
+
import '../../../types-CGFykP7c.js';
|
|
9
9
|
import '../../../data/index.js';
|
|
10
10
|
import '../../../types-41704JE4.js';
|
|
11
11
|
import '../../../resolve-D68pb3Bx.js';
|
|
12
|
-
import '../../../plan-
|
|
12
|
+
import '../../../plan-BdQ9mLIf.js';
|
|
13
13
|
import '../../../watch-BTYOJpQU.js';
|
|
14
14
|
import '../../../types-Dt1CFR1S.js';
|
|
15
15
|
import '../../../types-CsgMwHHa.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-
|
|
1
|
+
export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-AVYFZZAP.js";import"../../../chunk-ZE7I3PLX.js";import"../../../chunk-U2DVXW2H.js";import"../../../chunk-7F52SZOI.js";import"../../../chunk-R2HLPNQF.js";import"../../../chunk-DUVRZ456.js";import"../../../chunk-BSPCSC45.js";import"../../../chunk-V7U33NF2.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-BF3PIXZD.js";import"../../../chunk-MFIRYGHW.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { N as NodeSelection } from '../../../plan-
|
|
1
|
+
import { N as NodeSelection } from '../../../plan-BdQ9mLIf.js';
|
|
2
2
|
import { Data } from '../../../blocks/index.js';
|
|
3
3
|
import { TreeItem } from './content-tree.js';
|
|
4
4
|
import '../../../types-41704JE4.js';
|
|
5
5
|
import 'react';
|
|
6
|
-
import '../../../types-
|
|
6
|
+
import '../../../types-CGFykP7c.js';
|
|
7
7
|
import '../../../data/index.js';
|
|
8
8
|
import '../../../resolve-D68pb3Bx.js';
|
|
9
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useSectionOps}from"../../../chunk-
|
|
1
|
+
export{useSectionOps}from"../../../chunk-FRGCTHDB.js";import"../../../chunk-55IKQFBW.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-R6WTQWAC.js";import"../../../chunk-U3JP4VGF.js";import"../../../chunk-PDZXAFNX.js";import"../../../chunk-AELNNAFM.js";import"../../../chunk-CRPJGCSO.js";import"../../../chunk-OZ72A6MY.js";import"../../../chunk-UFY6RNMT.js";import"../../../chunk-YNOZ5NXW.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-QTLAVDJE.js";import"../../../chunk-YRLPFZW3.js";import"../../../chunk-EA2HTX37.js";import"../../../chunk-QASZFO4S.js";import"../../../chunk-66LWADFP.js";import"../../../chunk-QLD57GBB.js";import"../../../chunk-FFYXVAAL.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-67GNT6PF.js";import"../../../chunk-ZNCEOSXO.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-KRXQM65X.js";import"../../../chunk-NKB3KVAB.js";
|
|
@@ -15,10 +15,10 @@ import { HostProduct } from './host-chrome.js';
|
|
|
15
15
|
import { EaselSession } from './session.js';
|
|
16
16
|
import { AddTarget } from './puck/add-target-types.js';
|
|
17
17
|
import { SlotConfigView } from './puck/content-tree.js';
|
|
18
|
-
import '../../types-
|
|
18
|
+
import '../../types-CGFykP7c.js';
|
|
19
19
|
import '../../data/index.js';
|
|
20
20
|
import '../../resolve-D68pb3Bx.js';
|
|
21
|
-
import '../../plan-
|
|
21
|
+
import '../../plan-BdQ9mLIf.js';
|
|
22
22
|
import '../../edit-lock/index.js';
|
|
23
23
|
import '../../panelWidths-D9hTLR25.js';
|
|
24
24
|
import '../../session-DSQFmIvx.js';
|
|
@@ -1013,8 +1013,8 @@ interface ScreenPinnedNodes {
|
|
|
1013
1013
|
*/
|
|
1014
1014
|
interface ScreenPinnedBand {
|
|
1015
1015
|
/** What the band is called. Absent: the screen's words, `screen.pageSections`
|
|
1016
|
-
* ("
|
|
1017
|
-
* `screen.templateSections` ("Template
|
|
1016
|
+
* ("Page") on a document with the edit guard and
|
|
1017
|
+
* `screen.templateSections` ("Template") on one without. */
|
|
1018
1018
|
label?: string;
|
|
1019
1019
|
/** The band is a ROW that folds, its sections under it — the campaign
|
|
1020
1020
|
* designer's Body. Absent or false: a group label over the sections, which
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-
|
|
1
|
+
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-55IKQFBW.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PDZXAFNX.js";import"../../chunk-AELNNAFM.js";import"../../chunk-CRPJGCSO.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-UFY6RNMT.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-QASZFO4S.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -3,11 +3,11 @@ import { EaselSession } from './session.js';
|
|
|
3
3
|
import './puck/content-tree.js';
|
|
4
4
|
import '../../blocks/index.js';
|
|
5
5
|
import 'react';
|
|
6
|
-
import '../../types-
|
|
6
|
+
import '../../types-CGFykP7c.js';
|
|
7
7
|
import '../../data/index.js';
|
|
8
8
|
import '../../types-41704JE4.js';
|
|
9
9
|
import '../../resolve-D68pb3Bx.js';
|
|
10
|
-
import '../../plan-
|
|
10
|
+
import '../../plan-BdQ9mLIf.js';
|
|
11
11
|
import './backend-error.js';
|
|
12
12
|
import '../../edit-lock/index.js';
|
|
13
13
|
import './host-chrome.js';
|
|
@@ -2,11 +2,11 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { EaselSession } from './session.js';
|
|
4
4
|
import '../../blocks/index.js';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-CGFykP7c.js';
|
|
6
6
|
import '../../data/index.js';
|
|
7
7
|
import '../../types-41704JE4.js';
|
|
8
8
|
import '../../resolve-D68pb3Bx.js';
|
|
9
|
-
import '../../plan-
|
|
9
|
+
import '../../plan-BdQ9mLIf.js';
|
|
10
10
|
import './backend-error.js';
|
|
11
11
|
import '../../edit-lock/index.js';
|
|
12
12
|
import './host-chrome.js';
|
|
@@ -5,11 +5,11 @@ import { WebsiteEditLock } from './document-contract.js';
|
|
|
5
5
|
import { EaselDocumentHooks } from './document-hooks.js';
|
|
6
6
|
import { SectionTemplateStore } from './section-template-types.js';
|
|
7
7
|
import 'react';
|
|
8
|
-
import '../../types-
|
|
8
|
+
import '../../types-CGFykP7c.js';
|
|
9
9
|
import '../../data/index.js';
|
|
10
10
|
import '../../types-41704JE4.js';
|
|
11
11
|
import '../../resolve-D68pb3Bx.js';
|
|
12
|
-
import '../../plan-
|
|
12
|
+
import '../../plan-BdQ9mLIf.js';
|
|
13
13
|
import '../../edit-lock/index.js';
|
|
14
14
|
import './links/link-filters.js';
|
|
15
15
|
import 'efficient-shell/ui';
|
package/dist/screen/words.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-
|
|
1
|
+
export{DEFAULT_SCREEN_ADD_WORDS,DEFAULT_SCREEN_WORDS}from"../chunk-BF3PIXZD.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-
|
|
1
|
+
export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-2T3ED73A.js";import"../chunk-M6F6LS3H.js";import"../chunk-ZAOM6PFH.js";import"../chunk-6WY6ZXJG.js";import"../chunk-BF3PIXZD.js";import"../chunk-AELNNAFM.js";import"../chunk-K56YDHYQ.js";import"../chunk-QTLAVDJE.js";import"../chunk-WK3AFPXY.js";import"../chunk-H6DDIBQ4.js";import"../chunk-Y2G7CU6A.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-JZDEIRH4.js";import"../chunk-FFYXVAAL.js";import"../chunk-546BBOPE.js";import"../chunk-O2NLQBFX.js";
|
package/dist/strings/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{DEFAULT_EASEL_STRINGS as r,mergeEaselStrings as n}from"../chunk-
|
|
1
|
+
import{DEFAULT_EASEL_STRINGS as r,mergeEaselStrings as n}from"../chunk-2T3ED73A.js";export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-2T3ED73A.js";import"../chunk-M6F6LS3H.js";import"../chunk-ZAOM6PFH.js";import"../chunk-6WY6ZXJG.js";import"../chunk-BF3PIXZD.js";import"../chunk-AELNNAFM.js";import"../chunk-K56YDHYQ.js";import"../chunk-QTLAVDJE.js";import"../chunk-WK3AFPXY.js";import"../chunk-H6DDIBQ4.js";import"../chunk-Y2G7CU6A.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-JZDEIRH4.js";import"../chunk-FFYXVAAL.js";import"../chunk-546BBOPE.js";import{stringsContext as o}from"../chunk-MFIRYGHW.js";import"../chunk-O2NLQBFX.js";import{useContext as t,useMemo as c}from"react";import{jsx as i}from"react/jsx-runtime";function s({value:s,locale:u,children:m}){const e=o(),p=t(e),h=p?.strings??r,j=u??p?.locale??"en",k=c(()=>({strings:n(h,s),locale:j}),[h,s,j]);/* @__PURE__ */
|
|
2
2
|
return i(e.Provider,{value:k,children:m})}function u(){return t(o())?.strings??r}function m(){return t(o())?.locale??"en"}export{s as EaselStringsProvider,m as useEaselLocale,u as useEaselStrings};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataInput } from './data/index.js';
|
|
2
|
-
import { I as ItemSelector, N as NodeSelection } from './plan-
|
|
2
|
+
import { I as ItemSelector, N as NodeSelection } from './plan-BdQ9mLIf.js';
|
|
3
3
|
import { D as Data, S as SlotAddress, a as DataConfig, N as Node } from './types-41704JE4.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { N as Node, S as SlotAddress, D as Data, a as DataConfig, P as Place } from './types-41704JE4.js';
|
|
2
|
-
import { N as NodeSelection, A as AfterRemove, S as StepBounds } from './plan-
|
|
2
|
+
import { N as NodeSelection, A as AfterRemove, S as StepBounds } from './plan-BdQ9mLIf.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The node clipboard — what Copy and Cut hold, and Paste reads.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-easel",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
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",
|
package/dist/chunk-D2BCHTQR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{find as t,remove as e,getList as n,newId as r,duplicate as o,move as a,copyNode as c,insert as l,setProps as d}from"./chunk-KRXQM65X.js";import{useRef as s,useSyncExternalStore as i,useCallback as p,useMemo as u}from"react";var f=t=>({kind:"node",id:t});function m(r,o,a,c="none"){const l=t(r,o,a),d=e(r,o,a);if("none"===c||!l)return{data:d,select:null};const s=n(r,o,l.place)??[],i=s[l.place.index+1]??s[l.place.index-1];return i?.props?.id?{data:d,select:f(i.props.id)}:"root"!==l.place.parentId?{data:d,select:f(l.place.parentId)}:{data:d,select:null}}function x(e,n,a,c={}){const l=t(e,n,a)?.node,d=c.id??r(l?.type??"Node");return{data:o(e,n,a,{strip:c.strip,id:d}),select:f(d)}}function I(t,e,n,r){return{data:a(t,e,n,r),select:f(n)}}var v=(t,e)=>({min:0,max:e-1});function b(e,r,o,a,c=v){const l=t(e,r,o);if(!l)return!1;const d=n(e,r,l.place)?.length??0,{min:s,max:i}=c(l.place,d),p=l.place.index+a;return l.place.index>=s&&l.place.index<=i&&p>=s&&p<=i}function g(e,n,r,o,a=v){if(!b(e,n,r,o,a))return null;const c=t(e,n,r);return I(e,n,r,{...c.place,index:c.place.index+o})}function k(t,e,n,r,o={}){const a=c(n,e,{strip:o.strip});return{data:l(t,e,r,a),select:f(a.props.id)}}function y(t,e,n,r){return{data:d(t,e,n,r),select:void 0}}function h(e,n,r,o=()=>!1){if(!r)return null;if("slot"===r.kind)return t(e,n,r.parentId)?f(r.parentId):null;const a=t(e,n,r.id);if(!a||"root"===a.place.parentId)return null;const c=t(e,n,a.place.parentId);return c?o(c.node,a.place.slot)?{kind:"slot",parentId:c.node.props.id,slot:a.place.slot}:f(c.node.props.id):null}function z(e,n,r){if(!r||"node"!==r.kind)return null;const o=t(e,n,r.id);return o?{zone:`${o.place.parentId}:${o.place.slot}`,index:o.place.index}:null}function O(t,e,r){if(!r)return null;const[o,a]=(r.zone??"root:default-zone").split(/:(.*)/s),c={parentId:o,slot:a},l=n(t,e,c)?.[r.index];return l?.props?.id?f(l.props.id):null}var R={get:()=>null,set:()=>{},subscribe:()=>()=>{}};function B(e){const n=s(e);n.current=e;const r=e.clipboard??R,o=i(r.subscribe,r.get,r.get),a=p(t=>{const e=n.current;if(e.readOnly)return!1;const r=t(e.data,e.config);return!!r&&((r.data!==e.data||void 0!==r.select)&&(e.commit(r.data,{select:r.select}),n.current={...e,data:r.data},!0))},[]);return u(()=>{const e=()=>n.current,r=(n,r)=>{const o=t(e().data,e().config,n);return o?{node:o.node,label:r,from:{parentId:o.place.parentId,slot:o.place.slot}}:null};return{held:o,remove:t=>a((n,r)=>m(n,r,t,e().afterRemove)),duplicate:t=>a((n,r)=>x(n,r,t,{strip:e().strip})),move:(t,e)=>a((n,r)=>I(n,r,t,e)),step:(t,n)=>a((r,o)=>g(r,o,t,n,e().stepBounds)),canStep:(t,n)=>b(e().data,e().config,t,n,e().stepBounds),setProps:(t,e)=>a((n,r)=>y(n,r,t,e)),copy:(t,n)=>{const o=r(t,n);return o&&(e().clipboard??R).set(o),!!o},cut:(t,n)=>{if(e().readOnly)return!1;const o=r(t,n);return!!o&&((e().clipboard??R).set(o),a((n,r)=>m(n,r,t,e().afterRemove)))},paste:t=>{const n=(e().clipboard??R).get();return!!n&&a((r,o)=>k(r,o,n.node,t,{strip:e().strip}))},parentOf:t=>h(e().data,e().config,t,e().slotIsLevel)}},[o,a])}export{b as canStep,O as fromItemSelector,h as parentStep,x as planDuplicate,I as planMove,k as planPaste,m as planRemove,y as planSetProps,g as planStep,z as toItemSelector,B as useNodeOps};
|
package/dist/chunk-EJ6QAWRH.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{slotFieldsOf as n}from"./chunk-PLVEGYK6.js";import{usePickFollowsSelection as e}from"./chunk-R6WTQWAC.js";import{EaselCanvas as t,useSelectedFields as r}from"./chunk-PYCLHOSA.js";import{Inspector as i}from"./chunk-CRPJGCSO.js";import{createContext as o,useContext as u}from"react";import{DesktopIcon as l}from"efficient-shell/icons/efficient";import{jsx as s}from"react/jsx-runtime";var c={kind:"puck"};function f(n,e){const t=n,r=e,i=Object.keys(t);return i.length===Object.keys(r).length&&i.every(n=>Object.is(t[n],r[n]))}function a(n){const e=n;return"string"==typeof e.nodeId&&"string"==typeof e.slot}function d(e,t,r){const i=e.slotsOf?.(r);return i||n(t,r.type).map(n=>({slot:n,label:n,rung:!1}))}function p(n,e){return n.isFirst?n.isFirst(e):e.type===n.first}function m(n,e){return n.isLast?n.isLast(e):e.type===n.last}var k={},h={},v=()=>k,g=()=>"",y=()=>null,b=()=>{},O={isLockedBlock:()=>!1,duplicateBlocked:()=>null,nestDepth:()=>0,newSectionNode:()=>null,canAddTo:()=>null,blockIsOffered:()=>!0},C={labelAtLevel:(n,e,t)=>t,descriptions:{},categoryLabel:()=>{},firstSection:null,blockRowName:(n,e)=>e(n.type),plainText:n=>n,Icon:()=>null,Thumbnail:()=>null,useProducts:()=>null},L={options:[{id:"desktop",label:"Desktop",icon:/* @__PURE__ */s(l,{})}],initial:"desktop",fluid:"desktop",widths:{desktop:2e3}},S={read:()=>"sections",write:()=>{},forSelection:(n,e)=>n?"sections":e},j={first:null,last:null,firstGroup:null,lastGroup:null,isSectionGroup:()=>!1,sectionGroupZone:()=>"",panelOf:()=>null};function w(){/* @__PURE__ */
|
|
2
|
-
return s(t,{height:"fill"})}function P(){const{id:n,fields:e,values:t,readOnly:o,onChange:u}=r();/* @__PURE__ */
|
|
3
|
-
return s("div",{className:"es-sidepanel es-sidepanel--right",children:/* @__PURE__ */s(i,{fields:e,values:t,onChange:u,readOnly:o,idPrefix:n})})}var G=o({});function D({parts:n,children:e}){/* @__PURE__ */
|
|
4
|
-
return s(G.Provider,{value:n,children:e})}function N(){return u(G)}function x(){return(N().useOwnerName??g)()}function A(){return(N().useDocumentLabel??y)()}function B(n,e,t,r){return(N().useBridges??v)(n,e,t,r)}function I(n){return(N().useStandaloneBridges??v)(n)}function R(n,e){(N().useDocumentPass??b)(n,e)}function T(){return N().blockRules??O}function F(){return N().blockLook??C}function H(){return N().devices??L}function K(){return N().leftView??S}function V(){return N().pinned??j}function W(){return N().saveSwitch??!0}function Y(n){e(!0===N().pickFollowsSelection,n)}function E(){return N().add??h}function J(){return N().storageNamespace||void 0}function Q(){return N().styleClipboard??null}function Z(){return N().nodeKeys??!0}function q(){return N().notify??null}function z(){return N().Canvas??w}function M(){return N().CanvasHead??null}function U(){return N().canvasDrag??null}var X=o(null);function $({target:n,children:e}){/* @__PURE__ */
|
|
5
|
-
return s(X.Provider,{value:n,children:e})}function _(){return u(X)}function nn(){return N().Inspector??P}export{c as SELECTION_MODE,$ as ScreenCanvasTargetProvider,D as ScreenPartsProvider,p as isPinnedFirst,m as isPinnedLast,a as isSlotMode,f as sameInspectorMode,d as screenSlotsOf,E as useScreenAdd,F as useScreenBlockLook,T as useScreenBlockRules,B as useScreenBridges,U as useScreenCanvasDrag,z as useScreenCanvasFrame,M as useScreenCanvasHead,_ as useScreenCanvasTarget,H as useScreenDevices,A as useScreenDocumentLabel,R as useScreenDocumentPass,nn as useScreenInspectorPanel,K as useScreenLeftView,Z as useScreenNodeKeys,q as useScreenNotify,x as useScreenOwnerName,N as useScreenParts,Y as useScreenPickFollowsSelection,V as useScreenPinned,W as useScreenSaveSwitch,J as useScreenStorageNamespace,Q as useScreenStyleClipboard,I as useStandaloneScreenBridges};
|
package/dist/chunk-LYALMY55.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={title:"Add",contextBlocks:"Blocks for this place",contextAll:"Sections and blocks",done:"Done",doneDescription:"Close Add and go back",startBlank:"Start blank",templates:"Your templates",inside:({name:e})=>`Inside ${e}`,tile:({name:e})=>`Add ${e}`,hintBlocks:"Drag into the page, or click to add.",hint:"Drag onto the page, or click to add.",searchBlocks:"Search blocks",searchSections:"Search sections",addingTo:({name:e})=>`Adding to ${e}`,addingBefore:({name:e})=>`Adding before ${e}`,addingAtEnd:"Adding at the end of the page",addingHere:"Adding here"},t={loading:"Loading…",waitingForAuthorization:"Waiting for editor authorization…",missingTemplatePage:"Couldn’t open a page in this template.",missingPage:({slug:e})=>`No page with slug "${e}".`,missingDocument:"Couldn’t open this document.",loadFailed:({cause:e})=>`Could not load the document — ${e}`,noun:"page",pageSettings:"Page settings",header:"Header",footer:"Footer",pageSections:"Template · Home page",templateSections:"Template · Template",addSection:"Add section",addSectionBefore:({name:e})=>`Add section before ${e}`,addSectionHere:"Add section here",done:"Done",copied:({name:e})=>`Copied ${e}`,pasteRefused:({name:e})=>`${e} can’t be pasted here.`,add:e,canvasAddBlock:"Add block",railMedia:"Media library",leftPanel:"Left panel",resizeLeftPanel:"Resize left panel",leave:{title:"Unsaved changes",body:"Your most recent edits haven’t finished saving yet. Save them before switching, or leave and discard them.",cancel:"Cancel",discard:"Discard & leave",save:"Save & leave",saving:"Saving…"},bar:{undo:"Undo",redo:"Redo",refresh:"Refresh",refreshTip:"Refresh the preview (reloads the canvas, keeps your place)",notSaving:"Not saving — see the notice above",retry:"Retry now",autoSaveOff:"Auto-save is off — click to turn it back on (saves your held edits)",autoSaveOn:"Auto-save is on — click to pause it",views:"Left panel views"},menu:{undo:"Undo",redo:"Redo",addSection:"Add section",collapseAll:"Collapse all layers",selectAll:"Select all",pinned:"Pinned — can’t be moved or deleted",clipboardRefused:"Your browser won’t let us read the clipboard — press ⌘V"},layers:"Layers",expandAll:"Expand all sections",collapseAll:"Collapse all sections",editFooter:"Edit the site footer",rename:"Rename",deleteNamed:({name:e})=>`Delete ${e}`,hideNamed:({name:e})=>`Hide ${e}`,showNamed:({name:e})=>`Show ${e}`,addBlockHere:"Add block here",sectionFirst:({name:e})=>`“${e}” is already first`,sectionLast:({name:e})=>`“${e}” is already last`,sectionMoved:({name:e,n:t,total:a})=>`Moved “${e}” to position ${t} of ${a}`,sectionAdded:({name:e})=>`Added “${e}” section`,resizeSettingsPanel:"Resize settings panel",sectionSettings:({name:e})=>`${e} settings`,headerSettings:"Header settings",addBlockMenu:"Add block",deviceNote:{tablet:"Tablet uses the desktop settings.",mobile:"Showing the phone settings for this section."}};export{e as DEFAULT_SCREEN_ADD_WORDS,t as DEFAULT_SCREEN_WORDS};
|
package/dist/chunk-PYCLHOSA.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{DEFAULT_CANVAS_WORDS as e}from"./chunk-AELNNAFM.js";import{useResolvedFields as t}from"./chunk-YRLPFZW3.js";import{toItemSelector as n,fromItemSelector as o,useNodeOps as r}from"./chunk-D2BCHTQR.js";import{useWords as a}from"./chunk-MFIRYGHW.js";import{setCanvasNonce as i,isTypingTarget as s}from"./chunk-ZNCEOSXO.js";import{find as d,ROOT_ID as l,getList as c,remove as u,parseZoneKey as p,move as f,duplicate as h,replaceNode as m,createNode as v,insert as y,normalizeData as g,createResolveCache as k,resolveNodeData as b,ROOT_SLOT as w}from"./chunk-KRXQM65X.js";import{topLevelSlotKeys as S,fieldsFrom as I,defaultsFrom as C}from"./chunk-NKB3KVAB.js";import{createContext as O,useEffect as x,useContext as E,useRef as A,useSyncExternalStore as D,useState as z,useMemo as M,useCallback as Z,useLayoutEffect as N}from"react";import{jsx as $,jsxs as j}from"react/jsx-runtime";import{createPortal as R}from"react-dom";function B(e){return!["setData","setUi","set"].includes(e.type)}var P=(e,t,n,o)=>{const r=c(e,t,p(n));return r?.[o]??null},L=(e,t,n,o,r)=>{const a=P(e,t,n,o);if(!a)throw new Error(`${r}: nothing at ${n}[${o}]`);return a};function K(e,t){const{selection:o}=e;return{...e.ui,itemSelector:n(e.data,t,o),selectedSlot:o&&"slot"===o.kind?{parentId:o.parentId,slot:o.slot}:null}}function F(e,t,n){return n?"node"===n.kind?d(e,t,n.id)?n:null:n.parentId===l?c(e,t,n)?n:null:d(e,t,n.parentId)&&c(e,t,n)?n:null:null}function H(e,t,n,r=!1){const{itemSelector:a,selectedSlot:i,...s}=n;let d=e.selection;var l;return"itemSelector"in n&&(d=o(e.data,t,a??null)),"selectedSlot"in n&&(i?d=(l=i)?{kind:"slot",parentId:l.parentId,slot:l.slot}:null:"slot"===d?.kind&&(d=null)),{...e,selection:d,ui:r?s:{...e.ui,...s}}}function V(e,t,n){const o=T(e,t,n);if(o===e)return e;const r=F(o.data,n,o.selection);return r===o.selection?o:{...o,selection:r}}function T(e,t,n){const{data:o}=e;switch(t.type){case"setData":{const n="function"==typeof t.data?t.data(o):t.data;return{...e,data:{...o,...n}}}case"setUi":return H(e,n,"function"==typeof t.ui?t.ui(K(e,n)):t.ui);case"set":{const r={data:o,ui:K(e,n)},a="function"==typeof t.state?t.state(r):t.state;let i=a.data?{...e,data:a.data}:e;return a.ui&&(i=H(i,n,a.ui,!0)),i}case"insert":{const r={...p(t.destinationZone),index:t.destinationIndex},a=v(n,t.componentType,{},t.id?{id:t.id}:{});return{...e,data:y(o,n,r,a)}}case"replace":{const r=L(o,n,t.destinationZone,t.destinationIndex,"replace");if(r.props.id!==t.data.props.id)throw new Error("Can't change the id during a replace action. Use remove and insert for a new node.");return{...e,data:m(o,n,r.props.id,t.data)}}case"replaceRoot":{const n={...o.root,props:{...o.root.props,...t.root.props},readOnly:t.root.readOnly};return{...e,data:{...o,root:n}}}case"duplicate":{const r=L(o,n,t.sourceZone,t.sourceIndex,"duplicate"),a=h(o,n,r.props.id),i=P(a,n,t.sourceZone,t.sourceIndex+1);return{...e,data:a,selection:i?{kind:"node",id:i.props.id}:e.selection}}case"reorder":return T(e,{...t,type:"move",sourceZone:t.destinationZone},n);case"move":{if(t.sourceZone===t.destinationZone&&t.sourceIndex===t.destinationIndex)return e;const r=P(o,n,t.sourceZone,t.sourceIndex);if(!r)return e;const a={...p(t.destinationZone),index:t.destinationIndex};return{...e,data:f(o,n,r.props.id,a)}}case"remove":{const r=L(o,n,t.zone,t.index,"remove");return{...e,data:u(o,n,r.props.id)}}default:return e}}var q={drag:!0,duplicate:!0,delete:!0,edit:!0,insert:!0},Y={leftSideBarVisible:!0,rightSideBarVisible:!0,arrayState:{},componentList:{},isDragging:!1,previewMode:"edit",viewports:{current:{width:360,height:"auto"},options:[],controlsVisible:!0},field:{focus:null}},U=0,W=()=>`history-${U+=1}`;function X(e){let t=e.config;const r=e.now??(()=>Date.now()),a=e.historyCoalesceMs??250;let i=e.permissions??{};const s=g(e.data,t);let l={data:s,selection:null,ui:{...Y}};if(e.ui){const{itemSelector:n,selectedSlot:r,...a}=e.ui;l={data:s,selection:r?{kind:"slot",...r}:o(s,t,n??null),ui:{...Y,...a}}}let u=[{core:l,at:-1/0,sealed:!0,id:W()}],p=0;const f=e=>{const t=u[p],n=r();!e&&p===u.length-1&&p>0&&!t.sealed&&n-t.at<a?u=[...u.slice(0,p),{...t,core:l,at:n}]:(u=[...u.slice(0,p+1),{core:l,at:n,sealed:e,id:W()}],p=u.length-1)},h=/* @__PURE__ */new Set;let v=null,y=null,w=0,S=null,I=!1;const C=()=>{for(const e of[...h])e()},O=()=>{u=[...u.slice(0,p),{...u[p],core:l},...u.slice(p+1)]},x=(t,n)=>{w>0?I=I||n:(n?f(!1):l!==t&&O(),l.data!==t.data&&e.onChange?.(l.data),l!==t&&C())},E=e=>{const n=l;if(l=V(l,e,t),l===n)return;const o=e.recordHistory??B(e);x(n,o&&l.data!==n.data)},A=t=>{0===w&&(S=l,I=!1),w+=1;try{t()}catch(e){throw w-=1,0===w&&S&&(l=S,S=null),e}if(w-=1,w>0||!S)return;const n=S;S=null,I&&l.data!==n.data?f(!0):l!==n&&O(),l.data!==n.data&&e.onChange?.(l.data),l!==n&&C()},D=e=>{const n=l,o=F(l.data,t,e);var r,a;(r=o,a=l.selection,r===a||r&&a&&r.kind===a.kind&&("node"===r.kind&&"node"===a.kind?r.id===a.id:"slot"===r.kind&&"slot"===a.kind&&r.parentId===a.parentId&&r.slot===a.slot))||(l={...l,selection:o},x(n,!1))},z=t=>{const n=l;p=t,l=u[p].core,l.data!==n.data&&e.onChange?.(l.data),l!==n&&C()},M=()=>(e={})=>{const n=e.root?t.root?.permissions:t.components[e.item?.type??e.type??""]?.permissions;return{...q,...i,...n}};let Z=M();const N=k(),$={resolveCache:N,async resolveAll({trigger:e="load",metadata:n}={}){const o=l.data,r={type:"root",props:{...o.root.props??{}}},a=[...o.content,...Object.values(o.zones??{}).flat()],[i,...s]=await Promise.all([b(r,t,{cache:N,trigger:e,metadata:n}),...a.map(o=>b(o,t,{cache:N,trigger:e,metadata:n}))]);A(()=>{const e=l;let n=l.data;s.forEach((e,r)=>{if(!e.didChange)return;const i=a[r].props.id,s=d(n,t,i)?.node;s&&s===d(o,t,i)?.node&&(n=m(n,t,i,e.node))}),i.didChange&&n.root===o.root&&(n={...n,root:{...n.root,props:i.node.props,readOnly:i.node.readOnly??n.root.readOnly}}),n!==l.data&&(l={...l,data:n,selection:F(n,t,l.selection)},x(e,!1))})},async resolveNode(e,{trigger:n="replace",metadata:o}={}){const r=d(l.data,t,e)?.node;if(!r)return!1;const a=await b(r,t,{cache:N,trigger:n,metadata:o});if(!a.didChange)return!1;let i=!1;return A(()=>{const n=l;if(d(l.data,t,e)?.node!==r)return;const o=m(l.data,t,e,a.node);o!==l.data&&(l={...l,data:o,selection:F(o,t,l.selection)},x(n,!1),i=!0)}),i},get config(){return t},getState(){if(v&&y===l)return v;const e=l,o={data:e.data,ui:K(e,t)},r="node"===e.selection?.kind?d(e.data,t,e.selection.id)?.node??null:null;return v={appState:o,selection:e.selection,selectedItem:r,config:t,dispatch:E,history:{back:()=>$.undo(),forward:()=>$.redo(),hasPast:p>0,hasFuture:p<u.length-1,histories:u.map(e=>({id:e.id,state:{data:e.core.data,ui:K(e.core,t)}})),index:p,setHistoryIndex:e=>{e>=0&&e<u.length&&e!==p&&z(e)}},getPermissions:Z,getItemById:n=>d(e.data,t,n)?.node,getItemBySelector:n=>function(e,t,n){const[o,r]=(n.zone??"root:default-zone").split(/:(.*)/s);return c(e,t,{parentId:o,slot:r})?.[n.index]}(e.data,t,n),getSelectorForId:o=>{const r=n(e.data,t,{kind:"node",id:o});return r?{index:r.index,zone:r.zone??"root:default-zone"}:void 0}},y=e,v},subscribe:e=>(h.add(e),()=>{h.delete(e)}),dispatch:E,batch:A,select:e=>D(e?{kind:"node",id:e}:null),selectSlot:e=>D(e?{kind:"slot",parentId:e.parentId,slot:e.slot}:null),run(e){A(()=>{const n=l,o=void 0===e.select?l.selection:e.select;l={...l,data:e.data,selection:F(e.data,t,o)},x(n,e.data!==n.data)})},load(e,n={}){const o=l,r=g(e,t);l={...l,data:r,selection:F(r,t,n.selection??l.selection)},n.keepHistory||(u=[{core:l,at:-1/0,sealed:!0,id:W()}],p=0),l!==o&&C()},undo(){p>0&&z(p-1)},redo(){p<u.length-1&&z(p+1)},setPermissions(e){(function(e,t){if(e===t)return!0;const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])})(e,i)||(i=e,Z=M(),v=null,C())},setConfig(e){e!==t&&(t=e,Z=M(),v=null,C())}};return $}function Q(e,t,n={}){const o=e=>{if(e.altKey)return;if(!(e.metaKey!==e.ctrlKey))return;const o="KeyZ"===e.code,r="KeyY"===e.code&&!e.shiftKey;(o||r)&&(n.leaveTyping&&s(e.target)||!1!==t.getState?.().getPermissions().edit&&(e.preventDefault(),r||e.shiftKey?t.redo():t.undo()))};return e.addEventListener("keydown",o),()=>e.removeEventListener("keydown",o)}var G=O(null),J=O(!0);function _({easel:e,hotkeys:t=!0,resolveOnMount:n=!0,children:o}){return x(()=>{n&&e.resolveAll()},[e,n]),x(()=>{if(t&&"undefined"!=typeof document)return Q(document,e)},[e,t]),/* @__PURE__ */$(G.Provider,{value:e,children:/* @__PURE__ */$(J.Provider,{value:t,children:o})})}function ee(){const e=E(G);if(!e)throw new Error("useEasel: no <EaselProvider> above this component");return e}function te(e){const t=ee(),n=A({view:null,selector:null,value:void 0,has:!1}),o=()=>{const o=t.getState(),r=n.current;if(r.has&&r.view===o&&r.selector===e)return r.value;const a=e(o);return r.has&&Object.is(r.value,a)?(n.current={view:o,selector:e,value:r.value,has:!0},r.value):(n.current={view:o,selector:e,value:a,has:!0},a)};return D(t.subscribe,o,o)}function ne(){return function(e){return te(e)}}var oe="data-puck-component",re="data-puck-dropzone",ae={},ie="data-es-mirror",se="undefined"==typeof window?x:N;function de(e,t,n){for(const e of Array.from(t.head.querySelectorAll(`[${ie}]`)))e.remove();for(const o of Array.from(e.head.querySelectorAll('style, link[rel="stylesheet"]'))){const e=o.cloneNode(!0);e.setAttribute(ie,""),n&&e.setAttribute("nonce",n),t.head.appendChild(e)}}function le({children:t,id:n="preview-frame",title:o,className:r,style:s,mirrorStyles:d=!0,onDocument:l,height:c="auto",nonce:u}){const p=a("canvas",e),f=A(null),[h,m]=z(null);return se(()=>{const e=f.current,t=h?.ownerDocument.defaultView;if("auto"!==c||!e||!h||!t)return;const n=()=>{e.style.height=`${Math.ceil(h.getBoundingClientRect().height)}px`};n();const o=t.ResizeObserver,r=o?new o(n):null;return r?.observe(h),()=>r?.disconnect()},[h,c]),se(()=>{let e=f.current?.contentDocument;if(!e)return;"CSS1Compat"!==e.compatMode&&(e.open(),e.write("<!DOCTYPE html><html><head></head><body></body></html>"),e.close(),e=f.current?.contentDocument??e),e.body||e.documentElement.appendChild(e.createElement("body")),e.body.style.margin="0";const t=e.createElement("div");t.setAttribute("data-puck-entry",""),t.id="frame-root","fill"===c&&t.classList.add("es-frame-fill"),e.body.appendChild(t),i(e,u),m(t),l?.(e);let n=null;const o=f.current?.ownerDocument;if(d&&o){de(o,e,u);const t=o.defaultView;t&&"MutationObserver"in t&&(n=new t.MutationObserver(()=>de(o,e,u)),n.observe(o.head,{childList:!0,subtree:!0,characterData:!0}))}return()=>{n?.disconnect(),t.remove(),m(null),l?.(null)}},[]),/* @__PURE__ */$("iframe",{ref:f,id:n,title:o??p.frame,className:["es-canvas-frame","fill"===c?"is-fill":"",r??""].filter(Boolean).join(" "),style:s,children:h?R(t,h):null})}var ce=O(null),ue=O(ae),pe=[];function fe({parentId:e,slot:t,className:n,style:o,minEmptyHeight:r=128}){const a=ee(),i=te(n=>c(n.appState.data,a.config,{parentId:e,slot:t})??pe),s=te(t=>"node"===t.selection?.kind&&t.selection.id===e&&e!==l),d=te(n=>"slot"===n.selection?.kind&&n.selection.parentId===e&&n.selection.slot===t),u=E(ce),p=["es-zone"];return i.length&&p.push("has-children"),e===l&&p.push("is-root"),(s||d)&&p.push("is-area-selected"),null!==u&&u===e&&e!==l&&p.push("is-hovering-area"),n&&p.push(n),/* @__PURE__ */$("div",{className:p.join(" "),[re]:`${e}:${t}`,style:{...o,"--min-empty-height":`${r}px`},children:i.map(e=>/* @__PURE__ */$(ve,{node:e},e.props.id))})}function he(e,t,n,o){const r="root"===t?e.root:e.components[t],a={...o};for(const e of S(I(r)))a[e]=function(t={}){/* @__PURE__ */
|
|
2
|
-
return $(fe,{parentId:n,slot:e,...t})};return a}function me(e){return function({zone:t,...n}){/* @__PURE__ */
|
|
3
|
-
return $(fe,{parentId:e,slot:t,...n})}}function ve({node:e}){const t=ee().config,n=t.components[e.type],o=e.props.id,r=function(e){const t=A(null);return M(()=>n=>{const o=t.current;o&&o!==n&&(o.removeAttribute(oe),o.removeAttribute("data-puck-dnd")),t.current=n,n&&(n.setAttribute(oe,e),n.setAttribute("data-puck-dnd",e),n.style.position="relative")},[e])}(o),a=E(ue);if(!n?.render)return null;const i=n.render,s=he(t,e.type,o,{...C(n),...e.props}),d={renderDropZone:me(o),isEditing:!0,dragRef:n.inline?r:null,metadata:{...a,...n.metadata}};return n.inline?/* @__PURE__ */$(i,{...s,puck:d,editMode:!0}):/* @__PURE__ */$("div",{[oe]:o,"data-puck-dnd":o,style:{position:"relative"},children:/* @__PURE__ */$(i,{...s,puck:d,editMode:!0})})}function ye({metadata:e}){const t=te(e=>e.config),n=te(e=>e.appState.data.root).props??{},o=t.root?.render,r=/* @__PURE__ */$(fe,{parentId:l,slot:w}),a=o?/* @__PURE__ */$(o,{id:"puck-root",...he(t,"root",l,n),puck:{renderDropZone:me(l),isEditing:!0,dragRef:null,metadata:e??{}},editMode:!0,children:r}):r;/* @__PURE__ */
|
|
4
|
-
return $(ue.Provider,{value:e??ae,children:a})}function ge({id:e,kind:t,overlay:n}){const o=A(null),[r,a]=z(null);se(()=>{const t=o.current?.ownerDocument,n=t?.defaultView;if(!t||!n||!e)return void a(null);let r=0;const i=()=>{r=0;const i=function(e,t){if(!e||!t)return null;const n=e.getBoundingClientRect(),o=t.getBoundingClientRect();return{top:n.top-o.top,left:n.left-o.left,width:n.width,height:n.height}}(t.querySelector(`[${oe}="${n.CSS?.escape?n.CSS.escape(e):e}"]`),o.current?.parentElement??null);a(e=>{return(t=e)===(n=i)||t&&n&&t.top===n.top&&t.left===n.left&&t.width===n.width&&t.height===n.height?e:i;var t,n})},s=()=>{r||(r=(n.requestAnimationFrame??(e=>n.setTimeout(e,16)))(i))};i();const d="MutationObserver"in n?new n.MutationObserver(s):null;d?.observe(t.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0});const l="ResizeObserver"in n?new n.ResizeObserver(s):null;return l?.observe(t.documentElement),n.addEventListener("resize",s),()=>{d?.disconnect(),l?.disconnect(),n.removeEventListener("resize",s),r&&(n.cancelAnimationFrame??n.clearTimeout)(r)}},[e]);const i=/* @__PURE__ */$("div",{ref:o,"aria-hidden":"true",className:`es-canvas-outline is-${t}`,style:r?{position:"absolute",top:r.top,left:r.left,width:r.width,height:r.height}:{display:"none"}});return n&&e?/* @__PURE__ */$(n,{componentId:e,kind:t,children:i}):i}function ke({frame:e=!0,className:t,style:n,metadata:o,mirrorStyles:r,onDocument:a,height:i,title:s,nonce:d,hotkeys:l,frameWrapper:c,overlay:u,children:p}){const f=ee(),h=E(J),m=l??h,[v,y]=z(void 0),g=te(e=>"node"===e.selection?.kind?e.selection.id:null),[k,b]=z(null),w=/* @__PURE__ */j("div",{className:"es-canvas-content",style:{position:"relative"},onClick:e=>{const t=e.target;t.closest?.("a[href]")&&e.preventDefault();const n=t.closest?.(`[${oe}]`);n?f.select(n.getAttribute(oe)):t.hasAttribute?.(re)||f.select(null)},onMouseOver:e=>{const t=e.target.closest?.(`[${oe}]`),n=t?.getAttribute(oe)??null;n!==k&&b(n)},onMouseLeave:()=>b(null),children:[
|
|
5
|
-
/* @__PURE__ */$(ce.Provider,{value:k,children:/* @__PURE__ */$(ye,{metadata:o})}),
|
|
6
|
-
/* @__PURE__ */j("div",{className:"es-canvas-outlines",style:{position:"absolute",top:0,left:0,pointerEvents:"none"},children:[
|
|
7
|
-
/* @__PURE__ */$(ge,{id:k&&k!==g?k:null,kind:"hover",overlay:u}),
|
|
8
|
-
/* @__PURE__ */$(ge,{id:g,kind:"selected",overlay:u})]}),p]}),S=c?/* @__PURE__ */$(c,{document:v,children:w}):w;x(()=>{if(v&&m)return Q(v,f)},[v,m,f]);/* @__PURE__ */
|
|
9
|
-
return $("div",{className:"es-canvas"+(t?` ${t}`:""),style:n,"data-puck-preview":"",children:e?/* @__PURE__ */$(le,{mirrorStyles:r,onDocument:e=>{y(e??void 0),a?.(e)},height:i,title:s,nonce:d,children:S}):/* @__PURE__ */$("div",{id:"preview-frame","data-puck-entry":"",children:S})})}function be(e={}){const t=ee(),n=te(e=>e.appState.data);return r({...e,data:n,config:t.config,commit:(e,{select:n})=>t.run({data:e,select:n})})}function we(){const e=ee(),n=te(e=>e.config),o=e.resolveCache,r=te(e=>e.selectedItem),a=te(e=>e.appState.data.root),i=r?r.props.id:"root",s=a.props??{},l=M(()=>r||{type:"root",props:s},[r,s]),c=r?n.components[r.type]:n.root,u=e.getState(),p=r?d(u.appState.data,n,i):null,f=p&&"root"!==p.place.parentId?p.place.parentId:null,h=f?u.getItemById(f)??null:null,{fields:m}=t({id:i,node:l,block:c,parent:h,appState:u.appState}),v=te(e=>!1===e.getPermissions(r?{item:r}:{root:!0}).edit),y=Z((t,r)=>{(async()=>{const a=e.getState();if("root"!==i){const s=a.getItemById(i),d=a.getSelectorForId(i);if(!s||!d)return;const l={...s,props:{...s.props,[t]:r}},{node:c}=await b(l,n,{cache:o,trigger:"replace"}),u=e.getState().getSelectorForId(i);if(!u)return;return void e.dispatch({type:"replace",destinationZone:u.zone??"root:default-zone",destinationIndex:u.index,data:c})}const s=a.appState.data.root.props??{},{node:d}=await b({type:"root",props:{...s,[t]:r}},n,{cache:o,trigger:"replace"});e.dispatch({type:"replaceRoot",root:{props:d.props,readOnly:d.readOnly},recordHistory:!0})})()},[e,n,o,i]);return{id:i,node:l,fields:m,values:l.props,readOnly:v,onChange:y}}export{le as CanvasFrame,Y as DEFAULT_UI,ke as EaselCanvas,_ as EaselProvider,ye as EditDocument,Q as bindUndoKeys,X as createEasel,ne as createUseEasel,B as recordsByDefault,V as reduce,K as uiView,te as useEasel,ee as useEaselApi,be as useEaselNodeOps,we as useSelectedFields,F as validSelection};
|
package/dist/chunk-UV4D7CDX.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{blockTypesIn as e}from"./chunk-5ZBY24K7.js";import{buildPaletteSections as t,pinnedSection as o,paletteWithoutPinned as n,categoryLabel as i}from"./chunk-PA3PNTVV.js";import{sectionTemplatesOf as s}from"./chunk-BVN33R76.js";import{SidePanelHead as r,PanelModeExit as c}from"./chunk-5SOSVTVI.js";import{useEaselSession as l}from"./chunk-O7Q4DDJT.js";import{blockRuns as a}from"./chunk-HQ4VVRIC.js";import{useScreenBlockLook as p,useScreenBlockRules as m}from"./chunk-EJ6QAWRH.js";import{DEFAULT_SCREEN_WORDS as d}from"./chunk-LYALMY55.js";import{useEasel as f}from"./chunk-PYCLHOSA.js";import{useWords as u}from"./chunk-MFIRYGHW.js";import{AddPanel as k}from"./chunk-6HHHBBSY.js";import{DEFAULT_DRAG_WORDS as h}from"./chunk-O2NLQBFX.js";import{useState as y,useEffect as b,useMemo as j}from"react";import{AddIcon as g}from"efficient-shell/icons/efficient";import{jsx as B,jsxs as O,Fragment as $}from"react/jsx-runtime";var H=e=>`section:${e}`,L=e=>`block:${e}`,v=e=>`template:${e}`;function A({blocks:A,blocksOnly:V,at:x,onAdd:I,itemFor:S,session:Y,siteWide:N,onClose:C,onHide:F,readOnly:Q}){const R=f(e=>e.config),T=p(),{labelAtLevel:w,categoryLabel:D,firstSection:P,Icon:W,Thumbnail:z}=T,{blockIsOffered:E}=m(),J=u("screen",d).add,M=u("drag",h).add,G=l(),[K,X]=y([]);b(()=>{let t=!1;const o=e=>E(e,G);return s(G).list().then(n=>{if(t)return;const i=R.components;X(n.filter(t=>t.node?.type&&i[t.node.type]&&e(t.node).every(o)))}).catch(()=>{}),()=>{t=!0}},[R,G]);const Z=j(()=>t(R,T),[R]),q=e=>({type:H(e.type),label:e.name,cover:/* @__PURE__ */B(z,{type:e.type}),title:e.desc?`${e.name} — ${e.desc}`:J.tile({name:e.name}),keywords:[e.alias??"",e.desc,e.type,e.catLabel].filter(Boolean)}),U=j(()=>{const e=[];if(A&&A.choices.length>0&&a(A.choices).forEach((t,o)=>{e.push({key:`blocks:${o}`,title:0===o?`${J.inside({name:A.parentName})}${t.group?` · ${t.group}`:""}`:t.group??"",tiles:t.items.map(e=>({type:L(e.type),label:e.label,icon:/* @__PURE__ */B(W,{type:e.type,size:18}),title:J.tile({name:e.label})}))})}),V)return e;const t=o(Z,P);t&&e.push({key:"start",title:J.startBlank,tiles:[q(t)]}),K.length>0&&e.push({key:"templates",title:J.templates,tiles:K.map(e=>{return{type:v(e.id),label:e.name,cover:/* @__PURE__ */B(z,{type:e.node.type}),keywords:[(t=e.node.type,w(t,"section",R.components[t]?.label??t)),e.node.type]};var t})});const s=n(Z,P);for(const t of Object.keys(R.categories??{})){const o=s.filter(e=>e.cat===t);0!==o.length&&e.push({key:`category:${t}`,title:i(R,t,D),tiles:o.map(q)})}return e},[A,V,K,Z,R,J]),_=e=>{const t=e.indexOf(":"),o=e.slice(0,t),n=e.slice(t+1);if("section"===o)return{kind:"section",type:n};if("block"===o)return{kind:"block",type:n};if("template"===o){const e=K.find(e=>e.id===n);return e?{kind:"template",template:e}:null}return null};/* @__PURE__ */
|
|
2
|
-
return O($,{children:[
|
|
3
|
-
/* @__PURE__ */B(r,{icon:/* @__PURE__ */B(g,{size:15}),title:J.title,context:V?J.contextBlocks:J.contextAll,actions:/* @__PURE__ */B(c,{label:J.done,description:J.doneDescription,onClick:C}),onHide:F}),
|
|
4
|
-
/* @__PURE__ */O("div",{className:"sf-addside sf-scroll",children:[
|
|
5
|
-
/* @__PURE__ */B(k,{groups:U,session:Y,itemFor:e=>S(_(e)??{kind:"section",type:e}),onInsert:e=>{const t=_(e);t&&I(t)},at:x,hint:V?J.hintBlocks:J.hint,searchLabel:V?J.searchBlocks:J.searchSections,readOnly:Q,words:M}),N&&!V?N:null]})]})}export{A as AddSidePanel,L as blockKey,H as sectionKey,v as templateKey};
|