@janbox/storefront-builder 1.0.2 → 1.0.4

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.
@@ -7,8 +7,8 @@ import { u as St, x as oi, J as ue, D as C, c as L, W as ur, i as Bn, b as In, t
7
7
  import { isFunction as Or, merge as ri, set as Ur, isNil as Wt, isString as Ne, isUndefined as Fe, get as ai } from "lodash-es";
8
8
  import { OverlayScrollbarsComponent as _r } from "overlayscrollbars-react";
9
9
  import { jsxs as Wr, jsx as li } from "react/jsx-runtime";
10
- import { useMergeRefs as de, useFloating as ci, autoUpdate as ui, offset as di, flip as hi, size as $r, useClick as Kr, useHover as Hr, safePolygon as zr, useDismiss as Gr, useRole as qr, useInteractions as Xr, useFloatingParentNodeId as Yr, FloatingTree as Zr, FloatingPortal as fi } from "@floating-ui/react";
11
- import { useNode as tt, ROOT_NODE as Jr, Frame as Qr, Editor as ta, DefaultEventHandlers as ea } from "@craftjs/core";
10
+ import { useNode as tt, ROOT_NODE as $r, Frame as Kr, Editor as Hr, DefaultEventHandlers as zr } from "@craftjs/core";
11
+ import { useMergeRefs as de, useFloating as ci, autoUpdate as ui, offset as di, flip as hi, size as Gr, useClick as qr, useHover as Xr, safePolygon as Yr, useDismiss as Zr, useRole as Jr, useInteractions as Qr, useFloatingParentNodeId as ta, FloatingTree as ea, FloatingPortal as fi } from "@floating-ui/react";
12
12
  import { useUpdateEffect as na } from "react-use";
13
13
  import { useFrame as sa } from "react-frame-component";
14
14
  import { Button as ia, UnorderedList as oa, ListItem as ra } from "@janbox/storefront-ui";
@@ -424,7 +424,7 @@ const bh = (t) => {
424
424
  middleware: [
425
425
  di(a),
426
426
  hi(),
427
- $r({
427
+ Gr({
428
428
  apply({ elements: S }) {
429
429
  const b = {
430
430
  zIndex: `${lr}`,
@@ -435,12 +435,12 @@ const bh = (t) => {
435
435
  })
436
436
  ],
437
437
  whileElementsMounted: ui
438
- }), { context: h, refs: f } = d, m = Kr(h, {
438
+ }), { context: h, refs: f } = d, m = qr(h, {
439
439
  enabled: o === "click"
440
- }), y = Hr(h, {
440
+ }), y = Xr(h, {
441
441
  enabled: o === "hover",
442
- handleClose: zr()
443
- }), g = Gr(
442
+ handleClose: Yr()
443
+ }), g = Zr(
444
444
  h,
445
445
  ri(
446
446
  {
@@ -448,7 +448,7 @@ const bh = (t) => {
448
448
  },
449
449
  s
450
450
  )
451
- ), p = qr(h), v = Xr([m, g, p, y]), w = Y(
451
+ ), p = Jr(h), v = Qr([m, g, p, y]), w = Y(
452
452
  () => ({
453
453
  ...d,
454
454
  ...v
@@ -458,7 +458,7 @@ const bh = (t) => {
458
458
  return na(() => {
459
459
  Fe(r) || (f.setReference?.(r), h.onOpenChange(!Wt(r)));
460
460
  }, [r]), /* @__PURE__ */ x(gi.Provider, { value: w, children: i });
461
- }, va = (t) => Yr() ? /* @__PURE__ */ x(Un, { ...t }) : /* @__PURE__ */ x(Zr, { children: /* @__PURE__ */ x(Un, { ...t }) }), wa = ft(({ children: t, ...e }, n) => {
461
+ }, va = (t) => ta() ? /* @__PURE__ */ x(Un, { ...t }) : /* @__PURE__ */ x(ea, { children: /* @__PURE__ */ x(Un, { ...t }) }), wa = ft(({ children: t, ...e }, n) => {
462
462
  const { getReferenceProps: s, context: i } = yi(), r = de([i.refs.setReference, ai(t, "ref"), n]);
463
463
  return _t(t) ? Je(
464
464
  t,
@@ -5339,7 +5339,7 @@ const Yd = (t, e) => ln(t) ? new Xd(e) : new qd(e, {
5339
5339
  } = tt((g) => {
5340
5340
  let p = g.data.parent ? n.node(g.data.parent).get() : null;
5341
5341
  for (; p && !Bn(p); )
5342
- p = p.data.parent && p.data.parent !== Jr ? n.node(p.data.parent).get() : null;
5342
+ p = p.data.parent && p.data.parent !== $r ? n.node(p.data.parent).get() : null;
5343
5343
  return {
5344
5344
  dom: g.dom,
5345
5345
  name: In(g),
@@ -5487,7 +5487,7 @@ const Bh = ({ children: t, data: e }) => {
5487
5487
  });
5488
5488
  }), i;
5489
5489
  }, [e, n]);
5490
- return /* @__PURE__ */ x(Qr, { data: s, children: t });
5490
+ return /* @__PURE__ */ x(Kr, { data: s, children: t });
5491
5491
  }, eh = {
5492
5492
  // Root
5493
5493
  [C.Root]: pi,
@@ -5532,7 +5532,7 @@ const Bh = ({ children: t, data: e }) => {
5532
5532
  // Timer
5533
5533
  [C.CountdownTimer]: dr
5534
5534
  }, Ih = ({ resolver: t, children: e, ...n }) => /* @__PURE__ */ x(
5535
- ta,
5535
+ Hr,
5536
5536
  {
5537
5537
  enabled: !1,
5538
5538
  onRender: nh,
@@ -5555,7 +5555,7 @@ const Bh = ({ children: t, data: e }) => {
5555
5555
  );
5556
5556
  }, [e, n]), t;
5557
5557
  };
5558
- class sh extends ea {
5558
+ class sh extends zr {
5559
5559
  handlers() {
5560
5560
  const e = super.handlers();
5561
5561
  return {
package/dist/index.js CHANGED
@@ -7,8 +7,8 @@ import { Draggable as vt, DragDropContext as bt, Droppable as Nt } from "@hello-
7
7
  import { getGridProps as so, getCellProps as ao, GRID_MINIMUM_COLS as Yt, GRID_MAXIMUM_COLS as io, getLinkProps as lo, getButtonProps as co, getFlexboxProps as uo, getFlexItemProps as ho, getTextProps as go, getImageProps as po, getMarqueeProps as wo, MarqueeDataAttributes as wt, getTabsProps as mo, getTabPanelProps as Co, getSwiperProps as xo, getUnorderedListProps as fo, getListItemProps as vo, getIconProps as bo, getAccordionProps as No, getAccordionGroupProps as ko, getAccordionDataAttributes as $e, AccordionDataAttributes as mt, getVideoProps as Ro, getBoxProps as Lo } from "@janbox/storefront-ui";
8
8
  import { isNumber as nt, isNil as z, isFunction as To, assign as So, isUndefined as kt, get as ze, parseInt as yo, trimStart as Rt, isString as me, set as Bo } from "lodash-es";
9
9
  import { useDebounceCallback as dn, useToggle as cn } from "usehooks-ts";
10
- import { v as W, h as Y, W as T, d as f, n as Po, q as Io, A as ve, L as Mo, b as Lt, w as Se, x as ye, f as Ct, y as Be, z as Pe, a as Tt, B as Ao, e as U, r as ee, g as Q, o as Re, i as j, j as F, k as S, l as Z, m as y, E as St, T as yt, F as Wo, t as I, D as un, c as hn, G as Vo } from "./index-DrJkOkbq.js";
11
- import { p as pi, C as wi, R as mi, U as Ci, H as xi } from "./index-DrJkOkbq.js";
10
+ import { v as W, h as Y, W as T, d as f, n as Po, q as Io, A as ve, L as Mo, b as Lt, w as Se, x as ye, f as Ct, y as Be, z as Pe, a as Tt, B as Ao, e as U, r as ee, g as Q, o as Re, i as j, j as F, k as S, l as Z, m as y, E as St, T as yt, F as Wo, t as I, D as un, c as hn, G as Vo } from "./index-CBDllFpx.js";
11
+ import { p as pi, C as wi, R as mi, U as Ci, H as xi } from "./index-CBDllFpx.js";
12
12
  import { useNode as re } from "@craftjs/core";
13
13
  import { useNode as vi } from "@craftjs/core";
14
14
  import { W as Ho } from "./tooltip-CqfT80iK.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@janbox/storefront-builder",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Standalone storefront builder library extracted from craft-layers-portal",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -28,6 +28,7 @@
28
28
  "./style.css": "./dist/style.css"
29
29
  },
30
30
  "peerDependencies": {
31
+ "@janbox/storefront-ui": ">=2",
31
32
  "react": "^19.1.0",
32
33
  "react-dom": "^19.1.0"
33
34
  },
@@ -37,7 +38,6 @@
37
38
  "@emotion/react": "^11.14.0",
38
39
  "@floating-ui/react": "^0.27.13",
39
40
  "@hello-pangea/dnd": "^18.0.1",
40
- "@janbox/storefront-ui": "^2.0.25",
41
41
  "@tanstack/react-virtual": "^3.10.9",
42
42
  "@tiptap/extension-text-style": "^3.22.2",
43
43
  "@tiptap/react": "^3.22.2",