@jbpark/live-editor 0.2.0 → 1.0.3
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.ko.md +1 -1
- package/README.md +1 -1
- package/dist/{ast-6PhUZ232.mjs → ast-UXy9dqvD.mjs} +65 -18
- package/dist/ast-UXy9dqvD.mjs.map +1 -0
- package/dist/index.d.mts +84 -77
- package/dist/index.mjs +369 -6751
- package/dist/index.mjs.map +1 -1
- package/dist/utils/ast/index.d.mts +13 -2
- package/dist/utils/ast/index.mjs +2 -2
- package/package.json +4 -2
- package/dist/ast-6PhUZ232.mjs.map +0 -1
|
@@ -29,7 +29,7 @@ interface BindingOption {
|
|
|
29
29
|
label: string;
|
|
30
30
|
value: string;
|
|
31
31
|
}
|
|
32
|
-
type BindingType = 'array' | 'object' | 'string' | 'number' | 'boolean' | 'color' | 'jsx' | 'richtext';
|
|
32
|
+
type BindingType = 'array' | 'object' | 'string' | 'number' | 'boolean' | 'color' | 'jsx' | 'richtext' | 'date' | 'url' | 'icon-picker' | 'asset-picker';
|
|
33
33
|
interface BindingRenderLeaf {
|
|
34
34
|
type: BindingType;
|
|
35
35
|
property?: string;
|
|
@@ -44,6 +44,10 @@ interface BindingItem {
|
|
|
44
44
|
type?: BindingType;
|
|
45
45
|
options?: BindingOption[];
|
|
46
46
|
render?: BindingRenderMap;
|
|
47
|
+
min?: number;
|
|
48
|
+
max?: number;
|
|
49
|
+
pattern?: string;
|
|
50
|
+
required?: boolean;
|
|
47
51
|
}
|
|
48
52
|
type NodeValueType = 'boolean' | 'number' | 'string' | 'null' | 'array' | 'object' | 'unknown';
|
|
49
53
|
type EditableNodeValueType = 'boolean' | 'number' | 'string' | 'null';
|
|
@@ -1617,5 +1621,12 @@ declare const replaceIds: (code: string, generateId?: () => string) => string;
|
|
|
1617
1621
|
declare const fillIds: (code: string, generateId?: () => string) => string;
|
|
1618
1622
|
declare const clone: (element: Node, generateId?: () => string) => ParseResult<Expression>;
|
|
1619
1623
|
//#endregion
|
|
1620
|
-
|
|
1624
|
+
//#region src/utils/ast/validate.d.ts
|
|
1625
|
+
interface ValidationResult {
|
|
1626
|
+
valid: boolean;
|
|
1627
|
+
message?: string;
|
|
1628
|
+
}
|
|
1629
|
+
declare const validateBindingValue: (binding: BindingItem, value: unknown) => ValidationResult;
|
|
1630
|
+
//#endregion
|
|
1631
|
+
export { type BindingItem, type BindingOption, type BindingRenderLeaf, type BindingRenderMap, type BindingType, type DataAttrNode, type EditableNodeValueType, type ExtractedNodeValue, type NodeValueType, type ValidationResult, arrayExpressionToCode, bulkUpdate, clearExtractCache, clone, createNodeFromValue, extract, extractNodeValue, extractObjectProperties, fillIds, findEditableChildren, generateCode, getCurrentValue, parseArrayExpression, parseBinding, parseValue, replaceIds, update, validateBindingValue };
|
|
1621
1632
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/utils/ast/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as findEditableChildren, a as bulkUpdate, c as extract, d as createNodeFromValue, f as extractNodeValue, g as generateCode, h as parseValue, i as replaceIds, m as parseArrayExpression, n as clone, o as update, p as extractObjectProperties, r as fillIds, s as clearExtractCache, t as validateBindingValue, u as arrayExpressionToCode, v as getCurrentValue, y as parseBinding } from "../../ast-UXy9dqvD.mjs";
|
|
2
2
|
|
|
3
|
-
export { arrayExpressionToCode, bulkUpdate, clearExtractCache, clone, createNodeFromValue, extract, extractNodeValue, extractObjectProperties, fillIds, findEditableChildren, generateCode, getCurrentValue, parseArrayExpression, parseBinding, parseValue, replaceIds, update };
|
|
3
|
+
export { arrayExpressionToCode, bulkUpdate, clearExtractCache, clone, createNodeFromValue, extract, extractNodeValue, extractObjectProperties, fillIds, findEditableChildren, generateCode, getCurrentValue, parseArrayExpression, parseBinding, parseValue, replaceIds, update, validateBindingValue };
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "1.0.3",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"module": "./dist/index.js",
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"scripts": {
|
|
66
66
|
"dev": "vite",
|
|
67
67
|
"build": "pnpm check-types && tsdown",
|
|
68
|
+
"build:demo": "vite build --outDir dist-demo",
|
|
68
69
|
"check-types": "tsc -b",
|
|
69
70
|
"lint": "eslint .",
|
|
70
71
|
"test": "vitest run",
|
|
@@ -82,7 +83,8 @@
|
|
|
82
83
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
83
84
|
"@dnd-kit/sortable": "^10.0.0",
|
|
84
85
|
"@dnd-kit/utilities": "^3.2.2",
|
|
85
|
-
"@jbpark/ui-kit": "^2.
|
|
86
|
+
"@jbpark/ui-kit": "^3.2.0",
|
|
87
|
+
"@jbpark/use-hooks": "^2.4.0",
|
|
86
88
|
"@tailwindcss/vite": "^4.1.13",
|
|
87
89
|
"@tiptap/core": "^3.22.5",
|
|
88
90
|
"@tiptap/extension-placeholder": "^3.22.5",
|