efficient-easel 6.1.0 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas/index.d.ts +14 -2
- package/dist/canvas/index.js +1 -1
- package/dist/canvas-typing-Dec_zyuM.d.ts +49 -0
- package/dist/chunk-AWJUYMX7.js +1 -0
- package/dist/chunk-AYNU4FYF.js +14 -0
- package/dist/chunk-B4ZNYLZX.js +5 -0
- package/dist/{chunk-MTG37BOC.js → chunk-CJBU4E4L.js} +1 -1
- package/dist/{chunk-O7IPFJGX.js → chunk-DQLK3QQ2.js} +1 -1
- package/dist/chunk-DSUMM2WF.js +10 -0
- package/dist/chunk-EXCKAZKN.js +5 -0
- package/dist/{chunk-IH2O5CZO.js → chunk-H3WBX7FN.js} +1 -1
- package/dist/chunk-HAUTMX4H.js +65 -0
- package/dist/{chunk-B6WEYEMH.js → chunk-I6U2G7L4.js} +1 -1
- package/dist/chunk-JIWPANGM.js +1 -0
- package/dist/chunk-LVUDUQNL.js +1 -0
- package/dist/{chunk-U32MAI4R.js → chunk-PRRFBVJ2.js} +3 -3
- package/dist/{chunk-7WAC3IXR.js → chunk-QPQXKKSC.js} +1 -1
- package/dist/chunk-T5HFGW57.js +1 -0
- package/dist/{chunk-CRWFB7MU.js → chunk-X4OF36J2.js} +11 -11
- package/dist/copy/index.d.ts +73 -16
- package/dist/copy/index.js +18 -18
- package/dist/drag/index.js +1 -1
- package/dist/easel/easel.css +17 -0
- package/dist/easel/index.d.ts +47 -2
- package/dist/easel/index.js +1 -1
- package/dist/fields/index.js +1 -1
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/MediaSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +16 -16
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/puck/use-section-ops.js +1 -1
- package/dist/screen/lib/screen-parts.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-7XFNHML2.js +0 -1
- package/dist/chunk-BVKNVCGX.js +0 -9
- package/dist/chunk-LSBQ74U4.js +0 -65
- package/dist/chunk-MOCX5MQ7.js +0 -14
- package/dist/chunk-MTRFMGBO.js +0 -1
- package/dist/chunk-PAELDYYS.js +0 -1
- package/dist/chunk-TNV2BVL2.js +0 -5
- package/dist/chunk-VOKBME2Y.js +0 -5
- package/dist/chunk-ZNCEOSXO.js +0 -1
package/dist/chunk-VOKBME2Y.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-BVKNVCGX.js";import{Inspector as i}from"./chunk-CRWFB7MU.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},j={labelAtLevel:(n,e,t)=>t,descriptions:{},categoryLabel:()=>{},firstSection:null,blockRowName:(n,e)=>e(n.type),plainText:n=>n,Icon:()=>null,Thumbnail:()=>null,useProducts:()=>null},w={options:[{id:"desktop",label:"Desktop",icon:/* @__PURE__ */s(l,{})}],initial:"desktop",fluid:"desktop",widths:{desktop:2e3}},C={read:()=>"sections",write:()=>{},forSelection:(n,e)=>n?"sections":e},L={first:null,last:null,firstGroup:null,lastGroup:null,isSectionGroup:()=>!1,sectionGroupZone:()=>"",panelOf:()=>null};function S(){/* @__PURE__ */
|
|
2
|
-
return s(t,{height:"fill"})}function B(){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 N({parts:n,children:e}){/* @__PURE__ */
|
|
4
|
-
return s(G.Provider,{value:n,children:e})}function P(){return u(G)}function D(){return(P().useOwnerName??g)()}function x(){return(P().useDocumentLabel??y)()}function F(n,e,t,r){return(P().useBridges??v)(n,e,t,r)}function I(n){return(P().useStandaloneBridges??v)(n)}function R(n,e){(P().useDocumentPass??b)(n,e)}function T(){return P().blockRules??O}function V(){return P().blockLook??j}function A(){return P().devices??w}function K(){return P().leftView??C}function W(){return P().pinned??L}function E(){return P().saveSwitch??!0}function H(n){e(!0===P().pickFollowsSelection,n)}function M(){return P().add??h}function Q(){return P().storageNamespace||void 0}function U(){return P().styleClipboard??null}function X(){return P().nodeKeys??!0}function Y(){return P().notify??null}function Z(){return P().Canvas??S}function q(){return P().CanvasHead??null}function z(){return P().canvasDrag??null}var J=o(null);function $({target:n,children:e}){/* @__PURE__ */
|
|
5
|
-
return s(J.Provider,{value:n,children:e})}function _(){return u(J)}function nn(){return P().Inspector??B}export{c as SELECTION_MODE,$ as ScreenCanvasTargetProvider,N as ScreenPartsProvider,p as isPinnedFirst,m as isPinnedLast,a as isSlotMode,f as sameInspectorMode,d as screenSlotsOf,M as useScreenAdd,V as useScreenBlockLook,T as useScreenBlockRules,F as useScreenBridges,z as useScreenCanvasDrag,Z as useScreenCanvasFrame,q as useScreenCanvasHead,_ as useScreenCanvasTarget,A as useScreenDevices,x as useScreenDocumentLabel,R as useScreenDocumentPass,nn as useScreenInspectorPanel,K as useScreenLeftView,X as useScreenNodeKeys,Y as useScreenNotify,D as useScreenOwnerName,P as useScreenParts,H as useScreenPickFollowsSelection,W as useScreenPinned,E as useScreenSaveSwitch,Q as useScreenStorageNamespace,U as useScreenStyleClipboard,I as useStandaloneScreenBridges};
|
package/dist/chunk-ZNCEOSXO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=/* @__PURE__ */new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]);function e(e){const n=e;if(!n||"string"!=typeof n.tagName)return!1;const o=n.tagName.toUpperCase();if("TEXTAREA"===o||"SELECT"===o)return!0;if("INPUT"===o)return!t.has(String(n.type??"text").toLowerCase());if(n.isContentEditable)return!0;const i=n.closest?.("[contenteditable]");return!(!i||"false"===i.getAttribute("contenteditable"))||null!=n.closest?.('[role="textbox"]')}var n="data-puck-component";function o(t,e=n){const o=t;return o&&"function"==typeof o.closest?o.closest(`[${e}]`)?.getAttribute(e)??null:null}function i(t){const e=t.offsetWidth;if(!e)return 1;const n=t.getBoundingClientRect().width;return n>0?n/e:1}function r(t,e,n){const o=t.getBoundingClientRect(),r=n?.getBoundingClientRect()??{left:0,top:0},c=i(t);return{left:o.left-r.left+e.left*c,top:o.top-r.top+e.top*c,width:e.width*c,height:e.height*c}}function c(t){const e=t.offsetWidth;if(!e)return 1;const n=t.getBoundingClientRect().width;return n>0?n/e:1}function u(t,e,n){const o=r(t,e,n),i=c(n);return{left:o.left/i,top:o.top/i,width:o.width/i,height:o.height/i}}function l(t,e,n){const o=t.getBoundingClientRect(),i=c(t);return{x:(e-o.left)/i,y:(n-o.top)/i}}function s(t,e,n,o){const{left:i,top:c}=r(t,{left:e,top:n,width:0,height:0},o);return{x:i,y:c}}function f({available:t,width:e,maxScale:n=1}){const o=Math.max(0,t);if(!e||e<=0)return{width:o,scale:1,shownWidth:o};const i=o>0?Math.min(o/e,n):1;return{width:e,scale:i,shownWidth:e*i}}var a="data-es-canvas-style",h=/* @__PURE__ */new WeakMap;function d(t,e){e?h.set(t,e):h.delete(t)}function g(t,e,n){const o=t.head??t.documentElement;let i=w(t,e);if(!i){i=t.createElement("style"),i.setAttribute(a,e);const n=h.get(t);n&&i.setAttribute("nonce",n),o.appendChild(i)}return i.textContent!==n&&(i.textContent=n),i}function p(t,e){w(t,e)?.remove()}function w(t,e){for(const n of Array.from(t.querySelectorAll(`style[${a}]`)))if(n.getAttribute(a)===e)return n;return null}export{n as BLOCK_ATTRIBUTE,l as clientPointToLayer,c as elementScale,f as fitCanvas,s as framePointToHost,r as frameRectToHost,u as frameRectToLayer,i as frameScale,e as isTypingTarget,o as nodeIdAt,p as removeCanvasStyle,d as setCanvasNonce,g as upsertCanvasStyle};
|