@jbpark/live-editor 4.6.0 → 5.0.0
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 +2 -2
- package/README.md +2 -2
- package/dist/{boundary-BLB80tyw.js → boundary-6_nTsWxP.js} +2 -2
- package/dist/{boundary-BLB80tyw.js.map → boundary-6_nTsWxP.js.map} +1 -1
- package/dist/{compile-Dxas-D05.js → compile-DwOyWrmI.js} +8 -7
- package/dist/compile-DwOyWrmI.js.map +1 -0
- package/dist/constants-D-XKuEY2.js +58 -0
- package/dist/constants-D-XKuEY2.js.map +1 -0
- package/dist/{context-B8MzP7_p.js → context-DDR1xVKo.js} +3 -3
- package/dist/{context-B8MzP7_p.js.map → context-DDR1xVKo.js.map} +1 -1
- package/dist/{core-Bgfek364.js → core-CKazr4tT.js} +2 -2
- package/dist/core-CKazr4tT.js.map +1 -0
- package/dist/{detect-typescript-Dr_oLniM.js → detect-typescript-CoAO-QUJ.js} +2 -2
- package/dist/{detect-typescript-Dr_oLniM.js.map → detect-typescript-CoAO-QUJ.js.map} +1 -1
- package/dist/dnd/index.d.ts +2 -2
- package/dist/dnd/index.js +2 -2
- package/dist/dnd-BlC1gqUy.js +4446 -0
- package/dist/dnd-BlC1gqUy.js.map +1 -0
- package/dist/document-BQhb7YR8.d.ts +17 -0
- package/dist/document-DcwIEHRV.js +34077 -0
- package/dist/document-DcwIEHRV.js.map +1 -0
- package/dist/editor/index.js +2 -2
- package/dist/{editor-CMElfHer.js → editor-Bty5XzpV.js} +2 -2
- package/dist/{editor-CMElfHer.js.map → editor-Bty5XzpV.js.map} +1 -1
- package/dist/error/index.d.ts +1 -1
- package/dist/error/index.js +2 -2
- package/dist/{error-CN_GCnXB.js → error-DyYx2NQ2.js} +17 -31
- package/dist/error-DyYx2NQ2.js.map +1 -0
- package/dist/{index-C69Lv-jR.d.ts → index-0VB5C3Jk.d.ts} +28 -50
- package/dist/{index-DpDU1IAw.d.ts → index-92L7F440.d.ts} +2 -2
- package/dist/index-C8h8TcIl.d.ts +15 -0
- package/dist/{index-DQkL37eL.d.ts → index-Cl79M7ZJ.d.ts} +6 -4
- package/dist/{index-CRwEhJ7w.d.ts → index-kKUjo9lr.d.ts} +2 -2
- package/dist/{index-DrWtSKXu.d.ts → index-tAiuHZsC.d.ts} +2 -2
- package/dist/index.d.ts +9 -9
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/{messages-CSrMI4Rm.js → messages-Bt5WXKTE.js} +5 -2
- package/dist/messages-Bt5WXKTE.js.map +1 -0
- package/dist/{messages-IBPs4TkZ.d.ts → messages-Yb3b7YJt.d.ts} +5 -2
- package/dist/preview/index.d.ts +1 -1
- package/dist/preview/index.js +2 -2
- package/dist/{preview-CtyG5UbH.js → preview-DC0pyOdu.js} +4 -4
- package/dist/preview-DC0pyOdu.js.map +1 -0
- package/dist/provider/index.d.ts +2 -2
- package/dist/provider/index.js +2 -2
- package/dist/{sections-BYWOBISr.js → sections-4uirsXRU.js} +4 -7
- package/dist/sections-4uirsXRU.js.map +1 -0
- package/dist/style.css +776 -346
- package/dist/{validate-DB59Z_Nx.d.ts → types-Czps1Txy.d.ts} +12 -28
- package/dist/update-2PJbwoS8.d.ts +68 -0
- package/dist/{items-B6OXxcLG.js → update-DNInQSM7.js} +261 -512
- package/dist/update-DNInQSM7.js.map +1 -0
- package/dist/{use-dynamic-tailwind-BP1toJkW.js → use-dynamic-tailwind-CSYKXDmX.js} +301 -273
- package/dist/use-dynamic-tailwind-CSYKXDmX.js.map +1 -0
- package/dist/utils/ast/index.d.ts +47 -4
- package/dist/utils/ast/index.js +15 -77
- package/dist/utils/ast/index.js.map +1 -1
- package/dist/utils/index.d.ts +13 -32
- package/dist/utils/index.js +4 -26
- package/dist/validate-CZz30Pnb.js +122 -0
- package/dist/validate-CZz30Pnb.js.map +1 -0
- package/dist/validate-CiA1LF6S.d.ts +33 -0
- package/package.json +13 -15
- package/dist/compile-Dxas-D05.js.map +0 -1
- package/dist/constants-DU17Tdwo.js +0 -1459
- package/dist/constants-DU17Tdwo.js.map +0 -1
- package/dist/core-Bgfek364.js.map +0 -1
- package/dist/dnd-UoJILA75.js +0 -2756
- package/dist/dnd-UoJILA75.js.map +0 -1
- package/dist/document-CGbe6bSV.js +0 -38667
- package/dist/document-CGbe6bSV.js.map +0 -1
- package/dist/document-Ct4jW78J.d.ts +0 -1553
- package/dist/error-CN_GCnXB.js.map +0 -1
- package/dist/index-DKYUxi-E.d.ts +0 -227
- package/dist/items-B6OXxcLG.js.map +0 -1
- package/dist/messages-CSrMI4Rm.js.map +0 -1
- package/dist/preview-CtyG5UbH.js.map +0 -1
- package/dist/sections-BYWOBISr.js.map +0 -1
- package/dist/use-dynamic-tailwind-BP1toJkW.js.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/dist/validate-iLo8IONY.js +0 -64
- package/dist/validate-iLo8IONY.js.map +0 -1
|
@@ -30,7 +30,7 @@ interface BindingOption {
|
|
|
30
30
|
label: string;
|
|
31
31
|
value: string;
|
|
32
32
|
}
|
|
33
|
-
declare const BINDING_TYPES: readonly ["array", "object", "string", "number", "boolean", "color", "jsx", "richtext", "date", "url"];
|
|
33
|
+
declare const BINDING_TYPES: readonly ["array", "object", "string", "number", "boolean", "color", "jsx", "richtext", "date", "url", "email", "tel", "time", "datetime"];
|
|
34
34
|
type BindingType = (typeof BINDING_TYPES)[number];
|
|
35
35
|
interface BindingWidget {
|
|
36
36
|
type: string;
|
|
@@ -46,7 +46,16 @@ interface BindingFieldSpec {
|
|
|
46
46
|
min?: number;
|
|
47
47
|
max?: number;
|
|
48
48
|
pattern?: string;
|
|
49
|
+
patternMessage?: string;
|
|
49
50
|
required?: boolean;
|
|
51
|
+
minLength?: number;
|
|
52
|
+
maxLength?: number;
|
|
53
|
+
step?: number;
|
|
54
|
+
minItems?: number;
|
|
55
|
+
maxItems?: number;
|
|
56
|
+
minDate?: string;
|
|
57
|
+
maxDate?: string;
|
|
58
|
+
protocols?: string[];
|
|
50
59
|
meta?: Record<string, unknown>;
|
|
51
60
|
}
|
|
52
61
|
interface BindingRenderLeaf extends BindingFieldSpec {
|
|
@@ -70,31 +79,6 @@ interface BindingOptions {
|
|
|
70
79
|
bindings?: BindingRegistry;
|
|
71
80
|
bindingKeys?: BindingKeyMap;
|
|
72
81
|
}
|
|
73
|
-
type NodeValueType = 'boolean' | 'number' | 'string' | 'null' | 'array' | 'object' | 'unknown';
|
|
74
|
-
type EditableNodeValueType = 'boolean' | 'number' | 'string' | 'null';
|
|
75
|
-
interface ExtractedNodeValue {
|
|
76
|
-
type: NodeValueType;
|
|
77
|
-
value: string | number | boolean | null;
|
|
78
|
-
}
|
|
79
|
-
//#endregion
|
|
80
|
-
//#region src/utils/ast/validate.d.ts
|
|
81
|
-
interface ValidationResult {
|
|
82
|
-
valid: boolean;
|
|
83
|
-
message?: string;
|
|
84
|
-
}
|
|
85
|
-
interface ValidationMessages {
|
|
86
|
-
required: string;
|
|
87
|
-
min: (min: number) => string;
|
|
88
|
-
max: (max: number) => string;
|
|
89
|
-
pattern: string;
|
|
90
|
-
url: string;
|
|
91
|
-
date: string;
|
|
92
|
-
}
|
|
93
|
-
declare const defaultValidationMessages: ValidationMessages;
|
|
94
|
-
interface ValidationOptions {
|
|
95
|
-
messages?: Partial<ValidationMessages>;
|
|
96
|
-
}
|
|
97
|
-
declare const validateBindingValue: (binding: BindingItem, value: unknown, options?: ValidationOptions) => ValidationResult;
|
|
98
82
|
//#endregion
|
|
99
|
-
export {
|
|
100
|
-
//# sourceMappingURL=
|
|
83
|
+
export { BindingOption as a, BindingRenderLeaf as c, BindingType as d, BindingWidget as f, BindingKeyMap as i, BindingRenderMap as l, BindingFieldSpec as n, BindingOptions as o, DataAttrNode as p, BindingItem as r, BindingRegistry as s, BindingComponentName as t, BindingSchema as u };
|
|
84
|
+
//# sourceMappingURL=types-Czps1Txy.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { o as BindingOptions } from "./types-Czps1Txy.js";
|
|
2
|
+
//#region src/utils/ast/update.d.ts
|
|
3
|
+
type UpdateFailure = {
|
|
4
|
+
reason: 'element-not-found';
|
|
5
|
+
dataId: string;
|
|
6
|
+
} | {
|
|
7
|
+
reason: 'no-binding';
|
|
8
|
+
dataId: string;
|
|
9
|
+
} | {
|
|
10
|
+
reason: 'reserved-property';
|
|
11
|
+
dataId: string;
|
|
12
|
+
property: string;
|
|
13
|
+
} | {
|
|
14
|
+
reason: 'required-property';
|
|
15
|
+
dataId: string;
|
|
16
|
+
property: string;
|
|
17
|
+
} | {
|
|
18
|
+
reason: 'binding-not-declared';
|
|
19
|
+
dataId: string;
|
|
20
|
+
label: string;
|
|
21
|
+
property?: string;
|
|
22
|
+
} | {
|
|
23
|
+
reason: 'duplicate-binding';
|
|
24
|
+
dataId: string;
|
|
25
|
+
label: string;
|
|
26
|
+
property?: string;
|
|
27
|
+
count: number;
|
|
28
|
+
} | {
|
|
29
|
+
reason: 'attribute-not-found';
|
|
30
|
+
dataId: string;
|
|
31
|
+
property: string;
|
|
32
|
+
} | {
|
|
33
|
+
reason: 'self-closing';
|
|
34
|
+
dataId: string;
|
|
35
|
+
property: string;
|
|
36
|
+
} | {
|
|
37
|
+
reason: 'unsupported-syntax';
|
|
38
|
+
dataId: string;
|
|
39
|
+
property: string;
|
|
40
|
+
} | {
|
|
41
|
+
reason: 'parse-error';
|
|
42
|
+
error: unknown;
|
|
43
|
+
};
|
|
44
|
+
interface UpdateResult {
|
|
45
|
+
code: string;
|
|
46
|
+
success: boolean;
|
|
47
|
+
failure?: UpdateFailure;
|
|
48
|
+
}
|
|
49
|
+
declare const update: (code: string, dataId: string, label: string, value: unknown, property?: string, options?: BindingOptions) => UpdateResult;
|
|
50
|
+
interface UpdateEntry {
|
|
51
|
+
dataId: string;
|
|
52
|
+
label: string;
|
|
53
|
+
value: unknown;
|
|
54
|
+
property?: string;
|
|
55
|
+
}
|
|
56
|
+
type UpdateAllResult = {
|
|
57
|
+
success: true;
|
|
58
|
+
code: string;
|
|
59
|
+
} | {
|
|
60
|
+
success: false;
|
|
61
|
+
code: string;
|
|
62
|
+
failure: UpdateFailure;
|
|
63
|
+
index: number;
|
|
64
|
+
};
|
|
65
|
+
declare const updateAll: (raw: string, entries: UpdateEntry[], options?: BindingOptions) => UpdateAllResult;
|
|
66
|
+
//#endregion
|
|
67
|
+
export { update as a, UpdateResult as i, UpdateEntry as n, updateAll as o, UpdateFailure as r, UpdateAllResult as t };
|
|
68
|
+
//# sourceMappingURL=update-2PJbwoS8.d.ts.map
|