@janbox/storefront-builder 1.0.5 → 1.0.7

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 (48) hide show
  1. package/README.md +47 -44
  2. package/dist/countdown-timer.node-CGKz1DZI.js +8252 -0
  3. package/dist/editor/hooks/use-editor-state.d.ts +13 -1
  4. package/dist/editor/lib/index.d.ts +4 -1
  5. package/dist/editor.js +461 -418
  6. package/dist/index-Bvy64nrI.js +4 -0
  7. package/dist/index-Du5uN6Rq.js +6015 -0
  8. package/dist/index.js +110 -5732
  9. package/dist/style.css +1 -1
  10. package/dist/templates.js +95 -71
  11. package/dist/{tooltip-CqfT80iK.js → tooltip-Coblboaw.js} +6 -6
  12. package/package.json +2 -7
  13. package/dist/countdown-timer.node-CAsCNVin.js +0 -2718
  14. package/dist/editor/lib/events.d.ts +0 -5
  15. package/dist/index-BxuniYfy.js +0 -4
  16. package/dist/index-DrJkOkbq.js +0 -5610
  17. package/dist/minus-C82LyzQP.js +0 -6
  18. package/lib/accordion/README.md +0 -39
  19. package/lib/accordion-content/README.md +0 -36
  20. package/lib/accordion-group/README.md +0 -106
  21. package/lib/accordion-summary/README.md +0 -37
  22. package/lib/box/README.md +0 -107
  23. package/lib/button/README.md +0 -94
  24. package/lib/cell/README.md +0 -119
  25. package/lib/countdown-timer/README.md +0 -157
  26. package/lib/flex-item/README.md +0 -111
  27. package/lib/flexbox/README.md +0 -120
  28. package/lib/grid/README.md +0 -133
  29. package/lib/heading/README.md +0 -53
  30. package/lib/icon/README.md +0 -98
  31. package/lib/image/README.md +0 -107
  32. package/lib/link/README.md +0 -111
  33. package/lib/list-item/README.md +0 -31
  34. package/lib/marquee/README.md +0 -111
  35. package/lib/marquee-item/README.md +0 -31
  36. package/lib/paragraph/README.md +0 -82
  37. package/lib/root/README.md +0 -33
  38. package/lib/swiper/README.md +0 -108
  39. package/lib/swiper-slide/README.md +0 -32
  40. package/lib/tab/README.md +0 -35
  41. package/lib/tab-content/README.md +0 -35
  42. package/lib/tab-list/README.md +0 -35
  43. package/lib/tab-panel/README.md +0 -35
  44. package/lib/tabs/README.md +0 -90
  45. package/lib/text/README.md +0 -90
  46. package/lib/unknown/README.md +0 -48
  47. package/lib/unordered-list/README.md +0 -82
  48. package/lib/video/README.md +0 -91
package/README.md CHANGED
@@ -61,6 +61,11 @@ export default function BuilderPage() {
61
61
  return (
62
62
  <Editor
63
63
  theme={myTheme}
64
+ handlers={{
65
+ upload: async () => '',
66
+ submit: (_data) => {},
67
+ close: () => {},
68
+ }}
64
69
  insert={{
65
70
  elements: [LAYOUT_ELEMENT_GROUP, TEXT_ELEMENT_GROUP, MEDIA_ELEMENT_GROUP, INTERACTIVE_ELEMENT_GROUP],
66
71
  sections: [HERO_SECTION_GROUP],
@@ -190,6 +195,11 @@ Pass them to `Editor` via the `insert` prop:
190
195
  ```tsx
191
196
  <Editor
192
197
  theme={myTheme}
198
+ handlers={{
199
+ upload: async () => '',
200
+ submit: () => {},
201
+ close: () => {},
202
+ }}
193
203
  insert={{
194
204
  elements: [LAYOUT_ELEMENT_GROUP, TEXT_ELEMENT_GROUP],
195
205
  sections: [HERO_SECTION_GROUP],
@@ -238,6 +248,11 @@ import { MyBadge } from './my-badge.node';
238
248
 
239
249
  <Editor
240
250
  theme={myTheme}
251
+ handlers={{
252
+ upload: async () => '',
253
+ submit: () => {},
254
+ close: () => {},
255
+ }}
241
256
  resolver={{ MyBadge }}
242
257
  insert={{ elements: [/* ... */], sections: [] }}
243
258
  />
@@ -323,19 +338,7 @@ const { id, connectors, actions } = useNode();
323
338
 
324
339
  ## TailwindCSS Integration
325
340
 
326
- The library uses TailwindCSS v4 internally with a `tw:` prefix. To extend it in your app:
327
-
328
- ```ts
329
- // tailwind.config.ts
330
- import builderConfig from '@janbox/storefront-builder/tailwind.config';
331
-
332
- export default {
333
- presets: [builderConfig],
334
- // your overrides
335
- };
336
- ```
337
-
338
- Import the stylesheet once at your app entry:
341
+ The library uses TailwindCSS v4 internally with a `tw:` prefix. Import the stylesheet once at your app entry:
339
342
 
340
343
  ```ts
341
344
  import '@janbox/storefront-builder/style.css';
@@ -394,67 +397,67 @@ Chi tiết props, usage và rules cho từng node:
394
397
 
395
398
  ### Layout
396
399
 
397
- - [RootNode](lib/root/README.md) — top-level canvas container
398
- - [BoxNode](lib/box/README.md) — block container
399
- - [FlexboxNode](lib/flexbox/README.md) — flex container
400
- - [FlexItemNode](lib/flex-item/README.md) — flex item
401
- - [GridNode](lib/grid/README.md) — CSS grid container
402
- - [CellNode](lib/cell/README.md) — grid cell
400
+ - [RootNode](dist/lib/root/README.md) — top-level canvas container
401
+ - [BoxNode](dist/lib/box/README.md) — block container
402
+ - [FlexboxNode](dist/lib/flexbox/README.md) — flex container
403
+ - [FlexItemNode](dist/lib/flex-item/README.md) — flex item
404
+ - [GridNode](dist/lib/grid/README.md) — CSS grid container
405
+ - [CellNode](dist/lib/cell/README.md) — grid cell
403
406
 
404
407
  ### Typography
405
408
 
406
- - [TextNode](lib/text/README.md) — inline/block text
407
- - [HeadingNode](lib/heading/README.md) — h1–h6 heading
408
- - [ParagraphNode](lib/paragraph/README.md) — paragraph
409
+ - [TextNode](dist/lib/text/README.md) — inline/block text
410
+ - [HeadingNode](dist/lib/heading/README.md) — h1–h6 heading
411
+ - [ParagraphNode](dist/lib/paragraph/README.md) — paragraph
409
412
 
410
413
  ### Media
411
414
 
412
- - [ImageNode](lib/image/README.md) — image
413
- - [VideoNode](lib/video/README.md) — video player
414
- - [IconNode](lib/icon/README.md) — inline SVG icon
415
+ - [ImageNode](dist/lib/image/README.md) — image
416
+ - [VideoNode](dist/lib/video/README.md) — video player
417
+ - [IconNode](dist/lib/icon/README.md) — inline SVG icon
415
418
 
416
419
  ### Navigation
417
420
 
418
- - [LinkNode](lib/link/README.md) — anchor link
419
- - [ButtonNode](lib/button/README.md) — CTA button
421
+ - [LinkNode](dist/lib/link/README.md) — anchor link
422
+ - [ButtonNode](dist/lib/button/README.md) — CTA button
420
423
 
421
424
  ### Lists
422
425
 
423
- - [UnorderedListNode](lib/unordered-list/README.md) — list container
424
- - [ListItemNode](lib/list-item/README.md) — list item
426
+ - [UnorderedListNode](dist/lib/unordered-list/README.md) — list container
427
+ - [ListItemNode](dist/lib/list-item/README.md) — list item
425
428
 
426
429
  ### Accordion
427
430
 
428
- - [AccordionGroupNode](lib/accordion-group/README.md) — accordion container
429
- - [AccordionNode](lib/accordion/README.md) — accordion item
430
- - [AccordionSummaryNode](lib/accordion-summary/README.md) — accordion header
431
- - [AccordionContentNode](lib/accordion-content/README.md) — accordion content
431
+ - [AccordionGroupNode](dist/lib/accordion-group/README.md) — accordion container
432
+ - [AccordionNode](dist/lib/accordion/README.md) — accordion item
433
+ - [AccordionSummaryNode](dist/lib/accordion-summary/README.md) — accordion header
434
+ - [AccordionContentNode](dist/lib/accordion-content/README.md) — accordion content
432
435
 
433
436
  ### Tabs
434
437
 
435
- - [TabsNode](lib/tabs/README.md) — tabs container
436
- - [TabListNode](lib/tab-list/README.md) — tab headers container
437
- - [TabNode](lib/tab/README.md) — tab header button
438
- - [TabContentNode](lib/tab-content/README.md) — tab panels container
439
- - [TabPanelNode](lib/tab-panel/README.md) — tab panel content
438
+ - [TabsNode](dist/lib/tabs/README.md) — tabs container
439
+ - [TabListNode](dist/lib/tab-list/README.md) — tab headers container
440
+ - [TabNode](dist/lib/tab/README.md) — tab header button
441
+ - [TabContentNode](dist/lib/tab-content/README.md) — tab panels container
442
+ - [TabPanelNode](dist/lib/tab-panel/README.md) — tab panel content
440
443
 
441
444
  ### Carousel
442
445
 
443
- - [SwiperNode](lib/swiper/README.md) — carousel container
444
- - [SwiperSlideNode](lib/swiper-slide/README.md) — carousel slide
446
+ - [SwiperNode](dist/lib/swiper/README.md) — carousel container
447
+ - [SwiperSlideNode](dist/lib/swiper-slide/README.md) — carousel slide
445
448
 
446
449
  ### Marquee
447
450
 
448
- - [MarqueeNode](lib/marquee/README.md) — auto-scrolling ticker
449
- - [MarqueeItemNode](lib/marquee-item/README.md) — ticker item
451
+ - [MarqueeNode](dist/lib/marquee/README.md) — auto-scrolling ticker
452
+ - [MarqueeItemNode](dist/lib/marquee-item/README.md) — ticker item
450
453
 
451
454
  ### Utilities
452
455
 
453
- - [CountdownTimerNode](lib/countdown-timer/README.md) — countdown timer
456
+ - [CountdownTimerNode](dist/lib/countdown-timer/README.md) — countdown timer
454
457
 
455
458
  ### Internal
456
459
 
457
- - [UnknownNode](lib/unknown/README.md) — fallback for unresolved nodes
460
+ - [UnknownNode](dist/lib/unknown/README.md) — fallback for unresolved nodes
458
461
 
459
462
  ---
460
463