@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.
- package/README.md +59 -4
- package/dist/{dataset-DQ21hyBo.js → countdown-timer.node-d0EtGQ4_.js} +2592 -3029
- package/dist/editor/components/color-picker-popover.d.ts +2 -1
- package/dist/editor/constants/index.d.ts +2 -3
- package/dist/editor/hooks/use-editor.d.ts +1 -0
- package/dist/editor/lib/sidebar/theme-action.d.ts +1 -0
- package/dist/editor/toolbars/color-variant/color-variant.d.ts +2 -2
- package/dist/editor/toolbars/index.d.ts +1 -1
- package/dist/editor/toolbars/visibility/index.d.ts +1 -0
- package/dist/editor/toolbars/visibility/visibility.d.ts +1 -0
- package/dist/editor.js +9888 -1241
- package/dist/hooks/use-first-mount-state.d.ts +1 -0
- package/dist/hooks/use-node-props.d.ts +0 -1
- package/dist/hooks/use-update-effect.d.ts +2 -0
- package/dist/index-fErSlbD2.js +206 -0
- package/dist/index-tISPdvwn.js +4 -0
- package/dist/index.js +92 -212
- package/dist/lib/accordion-group/index.d.ts +0 -1
- package/dist/lib/box/README.md +3 -10
- package/dist/lib/box/index.d.ts +0 -1
- package/dist/lib/button/README.md +2 -2
- package/dist/lib/button/index.d.ts +0 -1
- package/dist/lib/cell/index.d.ts +0 -1
- package/dist/lib/container/README.md +86 -0
- package/dist/lib/container/index.d.ts +0 -1
- package/dist/lib/countdown-timer/index.d.ts +0 -1
- package/dist/lib/flex-item/README.md +1 -0
- package/dist/lib/flex-item/index.d.ts +0 -1
- package/dist/lib/flexbox/README.md +0 -6
- package/dist/lib/flexbox/index.d.ts +0 -1
- package/dist/lib/grid/README.md +5 -4
- package/dist/lib/grid/index.d.ts +0 -1
- package/dist/lib/heading/README.md +38 -8
- package/dist/lib/heading/index.d.ts +0 -2
- package/dist/lib/icon/index.d.ts +0 -1
- package/dist/lib/image/index.d.ts +0 -1
- package/dist/lib/index.d.ts +0 -1
- package/dist/lib/link/index.d.ts +0 -1
- package/dist/lib/marquee/index.d.ts +0 -1
- package/dist/lib/paragraph/README.md +9 -5
- package/dist/lib/paragraph/index.d.ts +0 -2
- package/dist/lib/paragraph/paragraph.node/types.d.ts +2 -2
- package/dist/lib/swiper/index.d.ts +0 -1
- package/dist/lib/tabs/index.d.ts +0 -1
- package/dist/lib/unordered-list/index.d.ts +0 -1
- package/dist/lib/video/index.d.ts +0 -1
- package/dist/minus-BrRnjbhB.js +4 -0
- package/dist/templates.js +17 -33
- package/dist/{tooltip-Bi1eNiUc.js → tooltip-5WmNiI2z.js} +1 -1
- package/dist/types/index.d.ts +2 -3
- package/package.json +2 -3
- package/dist/countdown-timer.inspector-EFXiJ973.js +0 -8192
- package/dist/editor/toolbars/display-on/display-on.d.ts +0 -5
- package/dist/editor/toolbars/display-on/index.d.ts +0 -1
- package/dist/index-Cx5nImHp.js +0 -4
- package/dist/lib/paragraph/paragraph/paragraph.d.ts +0 -2
- package/dist/lib/paragraph/paragraph/types.d.ts +0 -2
- package/dist/lib/text/README.md +0 -90
- package/dist/lib/text/index.d.ts +0 -1
- package/dist/lib/text/text.inspector/index.d.ts +0 -1
- package/dist/lib/text/text.inspector/text.inspector.d.ts +0 -6
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './display-on';
|
package/dist/index-Cx5nImHp.js
DELETED
package/dist/lib/text/README.md
DELETED
|
@@ -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.
|
package/dist/lib/text/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './text.inspector';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './text.inspector';
|