@janbox/storefront-builder 2.0.14 → 2.0.16

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/editor.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { jsx as t, jsxs as u, Fragment as Ee } from "@emotion/react/jsx-runtime";
2
- import { t as m, Z as B, _ as k, Q as Ue, $ as Ii, a0 as Bi, a1 as Mi, a2 as Pi, a3 as tr, a4 as Ni, a5 as nr, a6 as Ai, a7 as Wi, a8 as Ei, a9 as ht, aa as pt, ab as gt, ac as ft, ad as Se, ae as Le, af as Vi, D as Fe, ag as jn, X as Wo, Y as Ve, N as te, ah as Q, ai as Qe, aj as Te, b as or, c as rr, P as st, A as ir, ak as Ce, v as at, z as an, al as sr, K as F, F as ln, e as dn, am as Hi, M as Jn, m as Yn, y as lt, W as Pt, o as ar, p as lr, k as Oi, J, i as dr, V as cr, S as Xn, G as ur, h as hr, l as Kn, d as pr, j as gr, I as fr, L as Cr, r as Di, q as mr, B as vr, a as br, g as xr, f as wr, n as zi, T as ji, an as Fi, x as Zi } from "./countdown-timer.node-6xtwT1rv.js";
3
- import { ao as T2, ap as I2, aq as B2, ar as M2 } from "./countdown-timer.node-6xtwT1rv.js";
2
+ import { t as m, _ as B, $ as k, W as Ue, a0 as Ii, a1 as Bi, a2 as Mi, a3 as Pi, a4 as tr, a5 as Ni, a6 as nr, a7 as Ai, a8 as Wi, a9 as Ei, aa as ht, ab as pt, ac as gt, ad as ft, ae as Se, af as Le, ag as Vi, D as Fe, ah as jn, Y as Wo, Z as Ve, N as te, ai as Q, aj as Qe, ak as Te, b as or, c as rr, P as st, A as ir, al as Ce, v as at, z as an, am as sr, K as F, F as ln, e as dn, an as Hi, M as Jn, m as Yn, y as lt, X as Pt, o as ar, p as lr, k as Oi, J, i as dr, V as cr, S as Xn, G as ur, h as hr, l as Kn, d as pr, j as gr, I as fr, L as Cr, r as Di, q as mr, B as vr, a as br, g as xr, f as wr, n as zi, T as ji, ao as Fi, x as Zi } from "./countdown-timer.node-DkkpScmT.js";
3
+ import { ap as T2, aq as I2, ar as B2, as as M2 } from "./countdown-timer.node-DkkpScmT.js";
4
4
  import { useNode as ae, serializeNode as _i, ROOT_NODE as Ke } from "@craftjs/core";
5
5
  import * as w from "react";
6
6
  import { Children as Qn, isValidElement as xn, cloneElement as kr, useRef as ge, useState as E, useEffect as fe, useMemo as Wt, useCallback as Eo, Fragment as me, useImperativeHandle as $i, useSyncExternalStore as Ui, Suspense as Gi, createElement as yr } from "react";
7
7
  import { flatten as Rr } from "flat";
8
8
  import { isUndefined as dt, isNumber as He, isNil as j, isFunction as Fn, assign as qi, merge as Ji, get as cn, parseInt as Yi, trimStart as eo, isString as Re, throttle as Xi, isEqual as Ki, times as Xe } from "lodash-es";
9
9
  import { getAccordionDataAttributes as Jt, AccordionDataAttributes as Zn, GRID_MINIMUM_COLS as Vo, GRID_MAXIMUM_COLS as Qi, MarqueeDataAttributes as Hn } from "@janbox/storefront-ui";
10
- import { b as wn, c as es, N, d as ts, e as kn, f as Sr, g as ns, h as Et, j as Lr, i as to, k as os, u as Tr, l as rs, m as Vt, n as no, o as is, p as yn, q as ss, r as Ir, s as as, t as ls, a as Br, C as Mr } from "./index-CosQvfly.js";
10
+ import { b as wn, c as es, N, d as ts, e as kn, f as Sr, g as ns, h as Et, j as Lr, i as to, k as os, u as Tr, l as rs, m as Vt, n as no, o as is, p as yn, q as ss, r as Ir, s as as, t as ls, a as Br, C as Mr } from "./index-D7fewN0t.js";
11
11
  import { DragDropContext as oo, Droppable as ro, Draggable as io } from "@hello-pangea/dnd";
12
12
  import { useToggle as Ht } from "usehooks-ts";
13
13
  import { getResponsiveProp as ds, getColorShadesByVariant as cs } from "@janbox/storefront-ui/utils";
@@ -20,7 +20,7 @@ import { OverlayScrollbarsComponent as vs } from "overlayscrollbars-react";
20
20
  import { useVirtualizer as bs } from "@tanstack/react-virtual";
21
21
  import xs, { useDropzone as ws } from "react-dropzone";
22
22
  import { DatePicker as ks } from "react-datepicker";
23
- import { W as ys } from "./tooltip-oGi4C1cX.js";
23
+ import { W as ys } from "./tooltip-wtuK4AA6.js";
24
24
  import { TextStyleKit as Rs } from "@tiptap/extension-text-style";
25
25
  import { useEditor as Ss, EditorContent as Ls, useEditorState as Ts } from "@tiptap/react";
26
26
  import { BubbleMenu as Is } from "@tiptap/react/menus";
@@ -2539,11 +2539,14 @@ const Yr = ({ children: e, viewport: n, containerProps: i }) => {
2539
2539
  },
2540
2540
  [`& *[${Wo.DATA_NODE_DROP_TARGET_ERROR}=${Ve.True}]`]: {
2541
2541
  outlineColor: "red"
2542
+ },
2543
+ ':is(button, a, [role="button"]):not([data-node-id])': {
2544
+ pointerEvents: "none"
2542
2545
  }
2543
2546
  }
2544
2547
  }
2545
2548
  ),
2546
- /* @__PURE__ */ t(fs, { theme: n, children: e })
2549
+ /* @__PURE__ */ t(fs, { root: i?.body, theme: n, children: e })
2547
2550
  ] }) }) : null;
2548
2551
  }, Pn = `<svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2549
2552
  <rect width="48" height="48" fill="white" fill-opacity="0.01"/>
@@ -1,4 +1,5 @@
1
1
  export * from './use-node-data-attributes';
2
+ export * from './use-node-content-editable';
2
3
  export * from './use-node-props';
3
4
  export * from './use-composer';
4
5
  export * from './use-node';
@@ -0,0 +1,6 @@
1
+ type UseNodeContentEditableOptions = {
2
+ enabled: boolean;
3
+ onChange: (html: string) => void;
4
+ };
5
+ export declare const useNodeContentEditable: ({ enabled, onChange }: UseNodeContentEditableOptions) => void;
6
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { useNode as g, Element as C, Frame as I, Editor as v, DefaultEventHandlers as A } from "@craftjs/core";
2
2
  import { isFunction as w, merge as x, set as h, isNil as b, isString as P } from "lodash-es";
3
3
  import { useMemo as E, useEffect as L } from "react";
4
- import { N, W as e, g as S, A as k, c as B, b as F, a as y, p as M, T as q, o as G, n as R, q as U, M as D, l as H, m as j, S as O, k as V, r as _, L as $, I as z, V as J, j as W, f as X, B as Y, F as K, h as Q, e as Z, G as ee, i as oe, P as re, d as se, U as te, R as ne, y as ae, X as de, Y as f } from "./countdown-timer.node-6xtwT1rv.js";
4
+ import { N, X as e, g as S, A as k, c as B, b as F, a as y, p as M, T as q, o as G, n as R, q as U, M as D, l as H, m as j, S as O, k as V, r as _, L as $, I as z, V as J, j as X, f as Y, B as Z, F as K, h as Q, e as W, G as ee, i as oe, P as re, d as se, U as te, R as ne, y as ae, Y as de, Z as f } from "./countdown-timer.node-DkkpScmT.js";
5
5
  import { getGridProps as ue, getCellProps as ce, getLinkProps as ie, getButtonProps as pe, getFlexboxProps as Ne, getFlexItemProps as me, getImageProps as le, getMarqueeProps as Pe, getTabsProps as fe, getSwiperProps as ge, getUnorderedListProps as be, getIconProps as Te, getAccordionProps as Ce, getAccordionGroupProps as Ie, getVideoProps as ve, getBoxProps as Ae, getContainerProps as we } from "@janbox/storefront-ui";
6
6
  import { flatten as xe } from "flat";
7
7
  import { jsx as T } from "@emotion/react/jsx-runtime";
@@ -53,18 +53,18 @@ const o = (s = {}) => {
53
53
  transform: ge
54
54
  }), Je = () => o({
55
55
  transform: be
56
- }), We = () => o({
56
+ }), Xe = () => o({
57
57
  transform: Te
58
- }), Xe = (s) => o({
58
+ }), Ye = (s) => o({
59
59
  transform: Ce,
60
60
  nodeId: s
61
- }), Ye = () => o({
61
+ }), Ze = () => o({
62
62
  transform: Ie
63
63
  }), Ke = () => o({
64
64
  transform: ve
65
65
  }), Qe = () => o({
66
66
  transform: Ae
67
- }), Ze = () => o({
67
+ }), We = () => o({
68
68
  transform: we
69
69
  }), eo = () => o(), oo = C, ro = ({ children: s, data: r }) => {
70
70
  const { resolver: t } = N((a) => ({
@@ -92,13 +92,13 @@ const o = (s = {}) => {
92
92
  [e.Heading]: oe,
93
93
  // Layout
94
94
  [e.Grid]: ee,
95
- [e.Cell]: Z,
95
+ [e.Cell]: W,
96
96
  [e.Flexbox]: Q,
97
97
  [e.FlexItem]: K,
98
- [e.Box]: Y,
99
- [e.Container]: X,
98
+ [e.Box]: Z,
99
+ [e.Container]: Y,
100
100
  // Media
101
- [e.Image]: W,
101
+ [e.Image]: X,
102
102
  [e.Video]: J,
103
103
  [e.Icon]: z,
104
104
  // Navigation
@@ -164,17 +164,17 @@ export {
164
164
  ro as C,
165
165
  oo as N,
166
166
  so as a,
167
- Ye as b,
168
- Xe as c,
167
+ Ze as b,
168
+ Ye as c,
169
169
  Qe as d,
170
170
  De as e,
171
171
  Re as f,
172
- Ze as g,
172
+ We as g,
173
173
  eo as h,
174
174
  je as i,
175
175
  He as j,
176
176
  Ge as k,
177
- We as l,
177
+ Xe as l,
178
178
  Oe as m,
179
179
  Ue as n,
180
180
  Ve as o,
@@ -0,0 +1,4 @@
1
+ import { W as p } from "./tooltip-wtuK4AA6.js";
2
+ export {
3
+ p as WbTooltip
4
+ };
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A as c, a as g, b, c as C, B as x, d as f, C as T, e as I, f as L, g as S, F as A, h as v, G as w, H as R, i as h, I as k, j as q, L as B, k as F, M as G, l as H, P as M, R as U, S as y, m as D, T as V, n as j, o as E, p as z, q as J, U as K, r as O, V as Q, s as W, u as X, v as Y, w as Z, x as _, y as $, z as ee, D as oe, E as se, J as ae, K as re, N as de, O as Ne } from "./countdown-timer.node-6xtwT1rv.js";
2
- import { u as e } from "./index-CosQvfly.js";
3
- import { C as ne, a as pe, N as ue, b as ie, c as Pe, d as me, e as le, f as ce, g as ge, h as be, i as Ce, j as xe, k as fe, l as Te, m as Ie, n as Le, o as Se, p as Ae, q as ve, r as we, s as Re, t as he } from "./index-CosQvfly.js";
1
+ import { A as c, a as g, b, c as C, B as x, d as f, C as T, e as I, f as L, g as S, F as A, h as v, G as w, H as R, i as h, I as k, j as q, L as B, k as F, M as G, l as H, P as M, R as U, S as y, m as D, T as E, n as V, o as j, p as z, q as J, U as K, r as O, V as Q, s as W, u as X, v as Y, w as Z, x as _, y as $, z as ee, D as oe, E as se, J as ae, K as re, N as de, O as Ne, Q as te } from "./countdown-timer.node-DkkpScmT.js";
2
+ import { u as e } from "./index-D7fewN0t.js";
3
+ import { C as pe, a as ue, N as ie, b as Pe, c as me, d as le, e as ce, f as ge, g as be, h as Ce, i as xe, j as fe, k as Te, l as Ie, m as Le, n as Se, o as Ae, p as ve, q as we, r as Re, s as he, t as ke } from "./index-D7fewN0t.js";
4
4
  import { getTextProps as s, getTabPanelProps as a, getListItemProps as r } from "@janbox/storefront-ui";
5
- import { useNode as qe } from "@craftjs/core";
5
+ import { useNode as Be } from "@craftjs/core";
6
6
  import "lodash-es";
7
7
  import "react";
8
8
  const p = () => e({
@@ -24,10 +24,10 @@ export {
24
24
  C as AccordionSummaryNode,
25
25
  x as BoxNode,
26
26
  f as ButtonNode,
27
- ne as Canvas,
27
+ pe as Canvas,
28
28
  T as CanvasPlaceholder,
29
29
  I as CellNode,
30
- pe as Composer,
30
+ ue as Composer,
31
31
  L as ContainerNode,
32
32
  S as CountdownTimerNode,
33
33
  A as FlexItemNode,
@@ -41,14 +41,14 @@ export {
41
41
  F as ListItemNode,
42
42
  G as MarqueeItemNode,
43
43
  H as MarqueeNode,
44
- ue as NodeElement,
44
+ ie as NodeElement,
45
45
  M as ParagraphNode,
46
46
  U as RootNode,
47
47
  y as SwiperNode,
48
48
  D as SwiperSlideNode,
49
- V as TabContentNode,
50
- j as TabListNode,
51
- E as TabNode,
49
+ E as TabContentNode,
50
+ V as TabListNode,
51
+ j as TabNode,
52
52
  z as TabPanelNode,
53
53
  J as TabsNode,
54
54
  K as UnknownNode,
@@ -65,31 +65,32 @@ export {
65
65
  se as parseSvgString,
66
66
  ae as registerNodeRelated,
67
67
  re as toResponsiveCss,
68
- ie as useAccordionGroupNodeProps,
69
- Pe as useAccordionNodeProps,
70
- me as useBoxNodeProps,
71
- le as useButtonNodeProps,
72
- ce as useCellNodeProps,
68
+ Pe as useAccordionGroupNodeProps,
69
+ me as useAccordionNodeProps,
70
+ le as useBoxNodeProps,
71
+ ce as useButtonNodeProps,
72
+ ge as useCellNodeProps,
73
73
  de as useComposer,
74
- ge as useContainerNodeProps,
75
- be as useCountdownTimerNodeProps,
76
- Ce as useFlexItemNodeProps,
77
- xe as useFlexboxNodeProps,
78
- fe as useGridNodeProps,
74
+ be as useContainerNodeProps,
75
+ Ce as useCountdownTimerNodeProps,
76
+ xe as useFlexItemNodeProps,
77
+ fe as useFlexboxNodeProps,
78
+ Te as useGridNodeProps,
79
79
  u as useHeadingNodeProps,
80
- Te as useIconNodeProps,
81
- Ie as useImageNodeProps,
82
- Le as useLinkNodeProps,
80
+ Ie as useIconNodeProps,
81
+ Le as useImageNodeProps,
82
+ Se as useLinkNodeProps,
83
83
  P as useListItemNodeProps,
84
- Se as useMarqueeNodeProps,
85
- qe as useNode,
86
- Ne as useNodeDataAttributes,
84
+ Ae as useMarqueeNodeProps,
85
+ Be as useNode,
86
+ Ne as useNodeContentEditable,
87
+ te as useNodeDataAttributes,
87
88
  e as useNodeProps,
88
89
  p as useParagraphNodeProps,
89
- Ae as useSwiperNodeProps,
90
- ve as useTabNodeProps,
90
+ ve as useSwiperNodeProps,
91
+ we as useTabNodeProps,
91
92
  i as useTabPanelNodeProps,
92
- we as useTabsNodeProps,
93
- Re as useUnorderedListNodeProps,
94
- he as useVideoNodeProps
93
+ Re as useTabsNodeProps,
94
+ he as useUnorderedListNodeProps,
95
+ ke as useVideoNodeProps
95
96
  };
package/dist/templates.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, jsxs as o, Fragment as c } from "@emotion/react/jsx-runtime";
2
2
  import { getColorVar as u } from "@janbox/storefront-ui/theme";
3
3
  import { renderToString as p } from "react-dom/server";
4
- import { f as s, G as h, e as a, i as d, P as t, d as x, j as g, a as f, Q as T, b as n, c as r, A as i } from "./countdown-timer.node-6xtwT1rv.js";
4
+ import { f as s, G as h, e as a, i as d, P as t, d as x, j as g, a as f, W as T, b as n, c as r, A as i } from "./countdown-timer.node-DkkpScmT.js";
5
5
  import "@craftjs/core";
6
6
  import "lodash-es";
7
7
  import "react";
@@ -4,7 +4,7 @@ import { useFloating as P, autoUpdate as S, flip as j, offset as V, size as W, a
4
4
  import { get as L } from "lodash-es";
5
5
  import { FLOATING_Z_INDEX as U } from "@janbox/storefront-ui/theme";
6
6
  import { useControllableState as X } from "@janbox/storefront-ui/hooks";
7
- import { t as o } from "./countdown-timer.node-6xtwT1rv.js";
7
+ import { t as o } from "./countdown-timer.node-DkkpScmT.js";
8
8
  const Y = ({ placement: d = "top", open: p, onOpenChange: c, children: e, content: m }) => {
9
9
  const [n, u] = X({
10
10
  defaultValue: !1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@janbox/storefront-builder",
3
- "version": "2.0.14",
3
+ "version": "2.0.16",
4
4
  "description": "Standalone storefront builder library extracted from craft-layers-portal",
5
5
  "type": "module",
6
6
  "files": [
@@ -26,7 +26,7 @@
26
26
  "./style.css": "./dist/style.css"
27
27
  },
28
28
  "peerDependencies": {
29
- "@janbox/storefront-ui": ">=4.0.2",
29
+ "@janbox/storefront-ui": ">=4.0.3",
30
30
  "react": "^19.1.0",
31
31
  "react-dom": "^19.1.0"
32
32
  },
@@ -59,7 +59,7 @@
59
59
  "@types/react-dom": "^19.1.6",
60
60
  "@types/react-frame-component": "^4.1.6",
61
61
  "type-fest": "^5.5.0",
62
- "@janbox/storefront-ui": "^4.0.2"
62
+ "@janbox/storefront-ui": "^4.0.3"
63
63
  },
64
64
  "publishConfig": {
65
65
  "access": "public"
@@ -1,4 +0,0 @@
1
- import { W as p } from "./tooltip-oGi4C1cX.js";
2
- export {
3
- p as WbTooltip
4
- };