@janbox/storefront-builder 2.0.9 → 2.0.11

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/README.md +59 -4
  2. package/dist/{dataset-DQ21hyBo.js → countdown-timer.node-d0EtGQ4_.js} +2592 -3029
  3. package/dist/editor/components/color-picker-popover.d.ts +2 -1
  4. package/dist/editor/constants/index.d.ts +2 -3
  5. package/dist/editor/hooks/use-editor.d.ts +1 -0
  6. package/dist/editor/lib/sidebar/theme-action.d.ts +1 -0
  7. package/dist/editor/toolbars/color-variant/color-variant.d.ts +2 -2
  8. package/dist/editor/toolbars/index.d.ts +1 -1
  9. package/dist/editor/toolbars/visibility/index.d.ts +1 -0
  10. package/dist/editor/toolbars/visibility/visibility.d.ts +1 -0
  11. package/dist/editor.js +9888 -1241
  12. package/dist/hooks/use-first-mount-state.d.ts +1 -0
  13. package/dist/hooks/use-node-props.d.ts +0 -1
  14. package/dist/hooks/use-update-effect.d.ts +2 -0
  15. package/dist/index-fErSlbD2.js +206 -0
  16. package/dist/index-tISPdvwn.js +4 -0
  17. package/dist/index.js +92 -212
  18. package/dist/lib/accordion-group/index.d.ts +0 -1
  19. package/dist/lib/box/README.md +3 -10
  20. package/dist/lib/box/index.d.ts +0 -1
  21. package/dist/lib/button/README.md +2 -2
  22. package/dist/lib/button/index.d.ts +0 -1
  23. package/dist/lib/cell/index.d.ts +0 -1
  24. package/dist/lib/container/README.md +86 -0
  25. package/dist/lib/container/index.d.ts +0 -1
  26. package/dist/lib/countdown-timer/index.d.ts +0 -1
  27. package/dist/lib/flex-item/README.md +1 -0
  28. package/dist/lib/flex-item/index.d.ts +0 -1
  29. package/dist/lib/flexbox/README.md +0 -6
  30. package/dist/lib/flexbox/index.d.ts +0 -1
  31. package/dist/lib/grid/README.md +5 -4
  32. package/dist/lib/grid/index.d.ts +0 -1
  33. package/dist/lib/heading/README.md +38 -8
  34. package/dist/lib/heading/index.d.ts +0 -2
  35. package/dist/lib/icon/index.d.ts +0 -1
  36. package/dist/lib/image/index.d.ts +0 -1
  37. package/dist/lib/index.d.ts +0 -1
  38. package/dist/lib/link/index.d.ts +0 -1
  39. package/dist/lib/marquee/index.d.ts +0 -1
  40. package/dist/lib/paragraph/README.md +9 -5
  41. package/dist/lib/paragraph/index.d.ts +0 -2
  42. package/dist/lib/paragraph/paragraph.node/types.d.ts +2 -2
  43. package/dist/lib/swiper/index.d.ts +0 -1
  44. package/dist/lib/tabs/index.d.ts +0 -1
  45. package/dist/lib/unordered-list/index.d.ts +0 -1
  46. package/dist/lib/video/index.d.ts +0 -1
  47. package/dist/minus-BrRnjbhB.js +4 -0
  48. package/dist/templates.js +17 -33
  49. package/dist/{tooltip-Bi1eNiUc.js → tooltip-5WmNiI2z.js} +1 -1
  50. package/dist/types/index.d.ts +2 -3
  51. package/package.json +2 -3
  52. package/dist/countdown-timer.inspector-EFXiJ973.js +0 -8192
  53. package/dist/editor/toolbars/display-on/display-on.d.ts +0 -5
  54. package/dist/editor/toolbars/display-on/index.d.ts +0 -1
  55. package/dist/index-Cx5nImHp.js +0 -4
  56. package/dist/lib/paragraph/paragraph/paragraph.d.ts +0 -2
  57. package/dist/lib/paragraph/paragraph/types.d.ts +0 -2
  58. package/dist/lib/text/README.md +0 -90
  59. package/dist/lib/text/index.d.ts +0 -1
  60. package/dist/lib/text/text.inspector/index.d.ts +0 -1
  61. package/dist/lib/text/text.inspector/text.inspector.d.ts +0 -6
@@ -1,5 +0,0 @@
1
- interface DisplayOnToolbarProps {
2
- propertyPath?: string;
3
- }
4
- export declare const DisplayOnToolbar: ({ propertyPath }: DisplayOnToolbarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1 +0,0 @@
1
- export * from './display-on';
@@ -1,4 +0,0 @@
1
- import { W as p } from "./tooltip-Bi1eNiUc.js";
2
- export {
3
- p as WbTooltip
4
- };
@@ -1,2 +0,0 @@
1
- import { ParagraphProps } from './types';
2
- export declare const Paragraph: (props: ParagraphProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { TextProps } from '@janbox/storefront-ui';
2
- export type ParagraphProps = Omit<TextProps, 'element'>;
@@ -1,90 +0,0 @@
1
- # TextNode
2
-
3
- Inline/block text node có thể chỉnh typography. Render ra bất kỳ HTML tag nào qua prop `as`. Hỗ trợ inline editing trong canvas.
4
-
5
- ## Resolved name
6
-
7
- `Text`
8
-
9
- ## Configurable props
10
-
11
- ### Top-level props
12
-
13
- | Prop | Type | Description |
14
- | --- | --- | --- |
15
- | `as` | `HTMLElementType` | HTML tag render ra (mặc định `p`) |
16
- | `sizeVariant` | `TypographySizeVariant` | Preset typography size từ theme |
17
-
18
- `sizeVariant` hỗ trợ responsive: `sizeVariant="base"` xs, `md={{ sizeVariant: 'lg' }}` desktop.
19
-
20
- **`TypographySizeVariant`:** `'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl'`
21
-
22
- ### `sx` props
23
-
24
- ```ts
25
- sx?: {
26
- // typography (áp dụng toàn breakpoint — không responsive)
27
- color?: string
28
- fontStyle?: 'normal' | 'italic'
29
- fontWeight?: number | string
30
- textDecorationLine?: 'none' | 'underline' | 'line-through'
31
- textAlign?: 'left' | 'center' | 'right' | 'justify'
32
- textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize'
33
-
34
- // size
35
- width?: number | string
36
-
37
- // spacing
38
- paddingTop?: number
39
- paddingRight?: number
40
- paddingBottom?: number
41
- paddingLeft?: number
42
- marginTop?: number
43
- marginRight?: number
44
- marginBottom?: number
45
- marginLeft?: number
46
-
47
- // responsive overrides
48
- sm?: { /* same keys above */ }
49
- md?: { /* same keys above */ }
50
- lg?: { /* same keys above */ }
51
- }
52
- ```
53
-
54
- > `color`, `fontStyle`, `textDecorationLine`, `textAlign`, `textTransform` được editor set ở breakpoint `xs` (áp dụng toàn bộ). `fontWeight` và `sizeVariant` hỗ trợ responsive.
55
-
56
- ## Usage
57
-
58
- ```tsx
59
- import { TextNode } from '@janbox/storefront-builder';
60
-
61
- // Text đơn giản
62
- <TextNode>Hello world</TextNode>
63
-
64
- // Đổi tag, size variant
65
- <TextNode as="span" sizeVariant="sm">
66
- Small label
67
- </TextNode>
68
-
69
- // sizeVariant responsive
70
- <TextNode sizeVariant="base" md={{ sizeVariant: 'lg' }}>
71
- Body text
72
- </TextNode>
73
-
74
- // Màu, căn giữa, font weight responsive
75
- <TextNode
76
- sx={{
77
- color: '#333333',
78
- textAlign: 'center',
79
- fontWeight: 400,
80
- md: { fontWeight: 600 },
81
- }}
82
- >
83
- Styled text
84
- </TextNode>
85
- ```
86
-
87
- ## Rules
88
-
89
- - **Canvas**: no — không chứa node con.
90
- - **Inline editing**: có thể double-click để chỉnh nội dung trực tiếp trong canvas.
@@ -1 +0,0 @@
1
- export * from './text.inspector';
@@ -1 +0,0 @@
1
- export * from './text.inspector';
@@ -1,6 +0,0 @@
1
- import { HTMLElementType } from 'react';
2
- interface TextToolbarProps {
3
- availableTags?: HTMLElementType[];
4
- }
5
- export declare const TextInspector: ({ availableTags }: TextToolbarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
- export {};