@janbox/storefront-builder 2.0.2 → 2.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.
Files changed (61) hide show
  1. package/dist/{dialog-header-Bh3Dkw2q.js → countdown-timer.node-CZA-i5xq.js} +3303 -2187
  2. package/dist/editor/components/index.d.ts +0 -1
  3. package/dist/editor/hooks/index.d.ts +0 -12
  4. package/dist/editor/hooks/use-editor.d.ts +6 -2
  5. package/dist/editor/index.d.ts +4 -0
  6. package/dist/editor/lib/index.d.ts +6 -4
  7. package/dist/editor/toolbars/css-font-weight/index.d.ts +9 -0
  8. package/dist/editor/toolbars/{width/width.d.ts → css-width/index.d.ts} +5 -5
  9. package/dist/editor/toolbars/html-anchor-target/index.d.ts +7 -0
  10. package/dist/editor/toolbars/index.d.ts +3 -3
  11. package/dist/editor/toolbars/text-align/index.d.ts +9 -1
  12. package/dist/editor/ui/floating/wb-floating/types.d.ts +2 -2
  13. package/dist/editor/ui/floating/wb-floating/wb-floating.d.ts +2 -0
  14. package/dist/editor.js +1209 -673
  15. package/dist/hooks/use-composer.d.ts +464 -0
  16. package/dist/index-B58cYfCo.js +4 -0
  17. package/dist/index-ekIAycpt.js +8326 -0
  18. package/dist/index.js +173 -371
  19. package/dist/lib/accordion/accordion.node/helpers.d.ts +3 -0
  20. package/dist/lib/accordion-group/accordion-group.node/helpers.d.ts +3 -0
  21. package/dist/lib/box/box.node/helpers.d.ts +3 -0
  22. package/dist/lib/button/button.node/helpers.d.ts +3 -0
  23. package/dist/lib/cell/cell.node/helpers.d.ts +3 -0
  24. package/dist/lib/container/container.node/helpers.d.ts +3 -0
  25. package/dist/lib/countdown-timer/countdown-timer.node/helpers.d.ts +3 -0
  26. package/dist/lib/flex-item/flex-item.node/helpers.d.ts +3 -0
  27. package/dist/lib/flexbox/flexbox.node/helpers.d.ts +3 -0
  28. package/dist/lib/grid/grid.node/helpers.d.ts +3 -0
  29. package/dist/lib/heading/heading.node/helpers.d.ts +3 -0
  30. package/dist/lib/icon/icon.node/helpers.d.ts +3 -0
  31. package/dist/lib/image/image.node/helpers.d.ts +3 -0
  32. package/dist/lib/link/link.node/helpers.d.ts +3 -0
  33. package/dist/lib/list-item/list-item.node/helpers.d.ts +3 -0
  34. package/dist/lib/marquee/marquee.node/helpers.d.ts +3 -0
  35. package/dist/lib/paragraph/paragraph.node/helpers.d.ts +3 -0
  36. package/dist/lib/swiper/swiper.node/helpers.d.ts +3 -0
  37. package/dist/lib/tab/tab.node/helpers.d.ts +3 -0
  38. package/dist/lib/tab-panel/tab-panel.node/helpers.d.ts +3 -0
  39. package/dist/lib/tabs/tabs.node/helpers.d.ts +3 -0
  40. package/dist/lib/unordered-list/unordered-list.node/helpers.d.ts +3 -0
  41. package/dist/lib/video/video.node/helpers.d.ts +3 -0
  42. package/dist/templates.js +26 -28
  43. package/dist/{tooltip-CXOlTkGg.js → tooltip-BFrdgixm.js} +1 -1
  44. package/package.json +2 -10
  45. package/dist/anchor-target-CtXzdkBu.js +0 -2918
  46. package/dist/color-picker-popover-XeaVfYS8.js +0 -225
  47. package/dist/countdown-timer.node-Bh5fTSJ8.js +0 -913
  48. package/dist/date-picker-D9K6HWl-.js +0 -157
  49. package/dist/dropzone-CF4CWXth.js +0 -546
  50. package/dist/editor/components/toolbar-container.d.ts +0 -1
  51. package/dist/editor/toolbars/anchor-target/anchor-target.d.ts +0 -7
  52. package/dist/editor/toolbars/anchor-target/index.d.ts +0 -1
  53. package/dist/editor/toolbars/font-weight/dataset.d.ts +0 -5
  54. package/dist/editor/toolbars/font-weight/font-weight.d.ts +0 -9
  55. package/dist/editor/toolbars/font-weight/index.d.ts +0 -1
  56. package/dist/editor/toolbars/text-align/text-align.d.ts +0 -8
  57. package/dist/editor/toolbars/width/index.d.ts +0 -1
  58. package/dist/editor/toolbars.js +0 -346
  59. package/dist/editor/ui.js +0 -120
  60. package/dist/index-800HnUOi.js +0 -4
  61. package/dist/index-CXyljfMv.js +0 -4593
@@ -0,0 +1,3 @@
1
+ import { LinkNodeProps } from './types';
2
+ import { useNodeProps } from '../../../hooks';
3
+ export declare const useLinkNodeProps: () => ReturnType<typeof useNodeProps<LinkNodeProps>>;
@@ -0,0 +1,3 @@
1
+ import { ListItemNodeProps } from './types';
2
+ import { useNodeProps } from '../../../hooks';
3
+ export declare const useListItemNodeProps: () => ReturnType<typeof useNodeProps<ListItemNodeProps>>;
@@ -0,0 +1,3 @@
1
+ import { MarqueeNodeProps } from './types';
2
+ import { useNodeProps } from '../../../hooks';
3
+ export declare const useMarqueeNodeProps: () => ReturnType<typeof useNodeProps<MarqueeNodeProps>>;
@@ -0,0 +1,3 @@
1
+ import { ParagraphNodeProps } from './types';
2
+ import { useNodeProps } from '../../../hooks';
3
+ export declare const useParagraphNodeProps: () => ReturnType<typeof useNodeProps<ParagraphNodeProps>>;
@@ -0,0 +1,3 @@
1
+ import { SwiperNodeProps } from './types';
2
+ import { useNodeProps } from '../../../hooks';
3
+ export declare const useSwiperNodeProps: () => ReturnType<typeof useNodeProps<SwiperNodeProps>>;
@@ -0,0 +1,3 @@
1
+ import { TabNodeProps } from './types';
2
+ import { useNodeProps } from '../../../hooks';
3
+ export declare const useTabNodeProps: (nodeId?: string) => ReturnType<typeof useNodeProps<TabNodeProps>>;
@@ -0,0 +1,3 @@
1
+ import { TabPanelNodeProps } from './types';
2
+ import { useNodeProps } from '../../../hooks';
3
+ export declare const useTabPanelNodeProps: () => ReturnType<typeof useNodeProps<TabPanelNodeProps>>;
@@ -0,0 +1,3 @@
1
+ import { TabsNodeProps } from './types';
2
+ import { useNodeProps } from '../../../hooks';
3
+ export declare const useTabsNodeProps: (nodeId?: string) => ReturnType<typeof useNodeProps<TabsNodeProps>>;
@@ -0,0 +1,3 @@
1
+ import { UnorderedListNodeProps } from './types';
2
+ import { useNodeProps } from '../../../hooks';
3
+ export declare const useUnorderedListNodeProps: () => ReturnType<typeof useNodeProps<UnorderedListNodeProps>>;
@@ -0,0 +1,3 @@
1
+ import { VideoNodeProps } from './types';
2
+ import { useNodeProps } from '../../../hooks';
3
+ export declare const useVideoNodeProps: () => ReturnType<typeof useNodeProps<VideoNodeProps>>;
package/dist/templates.js CHANGED
@@ -1,15 +1,14 @@
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 { C as s, G as h, a, H as d, P as t, B as x, I as g, A as f, b as r, c as i, d as n } from "./countdown-timer.node-Bh5fTSJ8.js";
4
+ import { C as s, G as h, a, H as d, P as t, B as x, I as g, A as f, M as T, b as y, c as n, d as r, e as i } from "./countdown-timer.node-CZA-i5xq.js";
5
5
  import "@craftjs/core";
6
6
  import "lodash-es";
7
7
  import "react";
8
- import { M as T, P as y } from "./dialog-header-Bh3Dkw2q.js";
9
8
  import "flat";
10
9
  import "@janbox/storefront-ui";
11
- import "@janbox/storefront-ui/hooks";
12
10
  import "@janbox/storefront-ui/utils";
11
+ import "@janbox/storefront-ui/hooks";
13
12
  import "@emotion/react";
14
13
  import "@floating-ui/react";
15
14
  import "react-use";
@@ -19,7 +18,6 @@ import "@tanstack/react-virtual";
19
18
  import "react-dropzone";
20
19
  import "react-datepicker/dist/react-datepicker.css";
21
20
  import "react-datepicker";
22
- import "./color-picker-popover-XeaVfYS8.js";
23
21
  import "@tiptap/extension-text-style";
24
22
  import "@tiptap/react";
25
23
  import "@tiptap/react/menus";
@@ -35,7 +33,7 @@ const m = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="ht
35
33
  <path d="M19.0029 8.97259C20.3915 10.3612 20.3915 12.6121 19.0029 14.0007C17.6143 15.3893 15.3634 15.3893 13.9748 14.0007C12.5862 12.6121 12.5862 10.3612 13.9748 8.97259C15.3634 7.58401 17.6143 7.58401 19.0029 8.97259" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
36
34
  <path fill-rule="evenodd" clip-rule="evenodd" d="M21.0037 16.0018L19.0029 14.001L21.0037 16.0018Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
37
35
  </svg>
38
- `, K = {
36
+ `, $ = {
39
37
  name: "Hero",
40
38
  icon: { source: m },
41
39
  templates: [
@@ -135,7 +133,7 @@ const m = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="ht
135
133
  ) })
136
134
  }
137
135
  ]
138
- }, X = {
136
+ }, J = {
139
137
  name: "FAQs",
140
138
  icon: { source: m },
141
139
  templates: [
@@ -192,8 +190,8 @@ const m = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="ht
192
190
  }
193
191
  },
194
192
  children: [
195
- /* @__PURE__ */ o(r, { defaultOpen: !0, children: [
196
- /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
193
+ /* @__PURE__ */ o(n, { defaultOpen: !0, children: [
194
+ /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e(
197
195
  t,
198
196
  {
199
197
  sizeVariant: "base",
@@ -202,7 +200,7 @@ const m = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="ht
202
200
  }
203
201
  }
204
202
  ) }),
205
- /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(
203
+ /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
206
204
  t,
207
205
  {
208
206
  dangerouslySetInnerHTML: {
@@ -211,8 +209,8 @@ const m = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="ht
211
209
  }
212
210
  ) })
213
211
  ] }),
214
- /* @__PURE__ */ o(r, { children: [
215
- /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
212
+ /* @__PURE__ */ o(n, { children: [
213
+ /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e(
216
214
  t,
217
215
  {
218
216
  sizeVariant: "base",
@@ -221,7 +219,7 @@ const m = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="ht
221
219
  }
222
220
  }
223
221
  ) }),
224
- /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(
222
+ /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
225
223
  t,
226
224
  {
227
225
  dangerouslySetInnerHTML: {
@@ -230,8 +228,8 @@ const m = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="ht
230
228
  }
231
229
  ) })
232
230
  ] }),
233
- /* @__PURE__ */ o(r, { children: [
234
- /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
231
+ /* @__PURE__ */ o(n, { children: [
232
+ /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e(
235
233
  t,
236
234
  {
237
235
  sizeVariant: "base",
@@ -240,7 +238,7 @@ const m = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="ht
240
238
  }
241
239
  }
242
240
  ) }),
243
- /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(
241
+ /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
244
242
  t,
245
243
  {
246
244
  dangerouslySetInnerHTML: {
@@ -249,8 +247,8 @@ const m = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="ht
249
247
  }
250
248
  ) })
251
249
  ] }),
252
- /* @__PURE__ */ o(r, { children: [
253
- /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
250
+ /* @__PURE__ */ o(n, { children: [
251
+ /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e(
254
252
  t,
255
253
  {
256
254
  sizeVariant: "base",
@@ -259,7 +257,7 @@ const m = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="ht
259
257
  }
260
258
  }
261
259
  ) }),
262
- /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(
260
+ /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
263
261
  t,
264
262
  {
265
263
  dangerouslySetInnerHTML: {
@@ -268,8 +266,8 @@ const m = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="ht
268
266
  }
269
267
  ) })
270
268
  ] }),
271
- /* @__PURE__ */ o(r, { children: [
272
- /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
269
+ /* @__PURE__ */ o(n, { children: [
270
+ /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e(
273
271
  t,
274
272
  {
275
273
  sizeVariant: "base",
@@ -278,7 +276,7 @@ const m = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="ht
278
276
  }
279
277
  }
280
278
  ) }),
281
- /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(
279
+ /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
282
280
  t,
283
281
  {
284
282
  dangerouslySetInnerHTML: {
@@ -287,8 +285,8 @@ const m = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="ht
287
285
  }
288
286
  ) })
289
287
  ] }),
290
- /* @__PURE__ */ o(r, { children: [
291
- /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
288
+ /* @__PURE__ */ o(n, { children: [
289
+ /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e(
292
290
  t,
293
291
  {
294
292
  sizeVariant: "base",
@@ -297,7 +295,7 @@ const m = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="ht
297
295
  }
298
296
  }
299
297
  ) }),
300
- /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(
298
+ /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
301
299
  t,
302
300
  {
303
301
  dangerouslySetInnerHTML: {
@@ -329,7 +327,7 @@ const m = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="ht
329
327
  image: "https://ucarecdn.com/8a7a086c-1ef5-43a9-a036-daaf1f15a9f1/-/format/auto/",
330
328
  title: "Secure Online Payment"
331
329
  }
332
- ], Y = {
330
+ ], K = {
333
331
  name: "Guarantee",
334
332
  icon: { source: m },
335
333
  templates: [
@@ -425,7 +423,7 @@ const m = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="ht
425
423
  ]
426
424
  };
427
425
  export {
428
- X as FAQS_SECTION_GROUP,
429
- Y as GUARANTEE_SECTION_GROUP,
430
- K as HERO_SECTION_GROUP
426
+ J as FAQS_SECTION_GROUP,
427
+ K as GUARANTEE_SECTION_GROUP,
428
+ $ as HERO_SECTION_GROUP
431
429
  };
@@ -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 "./dialog-header-Bh3Dkw2q.js";
7
+ import { t as o } from "./countdown-timer.node-CZA-i5xq.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.2",
3
+ "version": "2.0.4",
4
4
  "description": "Standalone storefront builder library extracted from craft-layers-portal",
5
5
  "type": "module",
6
6
  "files": [
@@ -19,14 +19,6 @@
19
19
  "types": "./dist/editor/index.d.ts",
20
20
  "import": "./dist/editor.js"
21
21
  },
22
- "./editor/ui": {
23
- "types": "./dist/editor/ui/index.d.ts",
24
- "import": "./dist/editor/ui.js"
25
- },
26
- "./editor/toolbars": {
27
- "types": "./dist/editor/toolbars/index.d.ts",
28
- "import": "./dist/editor/toolbars.js"
29
- },
30
22
  "./templates": {
31
23
  "types": "./dist/templates/index.d.ts",
32
24
  "import": "./dist/templates.js"
@@ -41,6 +33,7 @@
41
33
  "dependencies": {
42
34
  "@craftjs/core": "^0.2.12",
43
35
  "@craftjs/layers": "^0.2.7",
36
+ "@craftjs/utils": "^0.2.5",
44
37
  "@emotion/react": "^11.14.0",
45
38
  "@floating-ui/react": "^0.27.13",
46
39
  "@hello-pangea/dnd": "^18.0.1",
@@ -48,7 +41,6 @@
48
41
  "@tiptap/extension-text-style": "^3.22.2",
49
42
  "@tiptap/react": "^3.22.2",
50
43
  "@tiptap/starter-kit": "^3.22.2",
51
- "clsx": "^2.1.1",
52
44
  "color": "^5.0.0",
53
45
  "dayjs": "^1.11.13",
54
46
  "flat": "^6.0.1",