@jbpark/live-editor 4.4.0 → 4.5.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.
Files changed (55) hide show
  1. package/README.md +2 -2
  2. package/dist/{boundary-B17cepvm.js → boundary-DnjGgsK6.js} +8 -5
  3. package/dist/boundary-DnjGgsK6.js.map +1 -0
  4. package/dist/{context-DB5kW3qe.js → context-DsEXJl4h.js} +10 -4
  5. package/dist/context-DsEXJl4h.js.map +1 -0
  6. package/dist/dnd/index.d.ts +1 -1
  7. package/dist/dnd/index.js +1 -1
  8. package/dist/{dnd-BE5ZizqX.js → dnd-DGNp20Nk.js} +370 -305
  9. package/dist/dnd-DGNp20Nk.js.map +1 -0
  10. package/dist/{document-BDn_f08_.js → document-DGHTfrda.js} +7738 -7735
  11. package/dist/document-DGHTfrda.js.map +1 -0
  12. package/dist/error/index.d.ts +1 -1
  13. package/dist/error/index.js +2 -2
  14. package/dist/{error-DWhxQEom.js → error-DwqwjJ2C.js} +13 -6
  15. package/dist/error-DwqwjJ2C.js.map +1 -0
  16. package/dist/{index-f7ijuNTa.d.ts → index-CHknA6k1.d.ts} +108 -154
  17. package/dist/{index-Dgh1JTX3.d.ts → index-P9Aifaui.d.ts} +3 -2
  18. package/dist/index-WQgFy510.d.ts +11 -0
  19. package/dist/{index-C4SGQ3Ci.d.ts → index-vtyggWy0.d.ts} +4 -1
  20. package/dist/index.d.ts +18 -18
  21. package/dist/index.js +11 -7
  22. package/dist/index.js.map +1 -1
  23. package/dist/{ast-dYb78955.js → items-DdrwGxJw.js} +324 -373
  24. package/dist/items-DdrwGxJw.js.map +1 -0
  25. package/dist/messages-Cp3g1mn1.d.ts +129 -0
  26. package/dist/messages-CzUPVnzH.js +132 -0
  27. package/dist/messages-CzUPVnzH.js.map +1 -0
  28. package/dist/preview/index.js +2 -2
  29. package/dist/{preview-BnaCEFsF.js → preview-BKFgq_5u.js} +6 -4
  30. package/dist/preview-BKFgq_5u.js.map +1 -0
  31. package/dist/provider/index.d.ts +3 -8
  32. package/dist/provider/index.js +3 -2
  33. package/dist/{sections-CBVMO8Jl.js → sections-BRH3KHYc.js} +8 -3
  34. package/dist/sections-BRH3KHYc.js.map +1 -0
  35. package/dist/style.css +505 -21
  36. package/dist/{use-dynamic-tailwind-Bcipc1hL.js → use-dynamic-tailwind-T9r9ExbR.js} +9 -3
  37. package/dist/{use-dynamic-tailwind-Bcipc1hL.js.map → use-dynamic-tailwind-T9r9ExbR.js.map} +1 -1
  38. package/dist/utils/ast/index.d.ts +3 -2
  39. package/dist/utils/ast/index.js +66 -3
  40. package/dist/utils/ast/index.js.map +1 -0
  41. package/dist/utils/index.d.ts +30 -13
  42. package/dist/utils/index.js +26 -6
  43. package/dist/utils/index.js.map +1 -0
  44. package/dist/validate-DB59Z_Nx.d.ts +100 -0
  45. package/dist/validate-iLo8IONY.js +64 -0
  46. package/dist/validate-iLo8IONY.js.map +1 -0
  47. package/package.json +3 -3
  48. package/dist/ast-dYb78955.js.map +0 -1
  49. package/dist/boundary-B17cepvm.js.map +0 -1
  50. package/dist/context-DB5kW3qe.js.map +0 -1
  51. package/dist/dnd-BE5ZizqX.js.map +0 -1
  52. package/dist/document-BDn_f08_.js.map +0 -1
  53. package/dist/error-DWhxQEom.js.map +0 -1
  54. package/dist/preview-BnaCEFsF.js.map +0 -1
  55. package/dist/sections-CBVMO8Jl.js.map +0 -1
@@ -1,4 +1,15 @@
1
- import { _ as Module, a as SectionOptions, c as createSectionPreviewCache, n as DocumentOptions, o as SectionPreviewCache, v as Section } from "../document-Ct4jW78J.js";
1
+ import { _ as Module, a as SectionOptions, n as DocumentOptions, o as SectionPreviewCache$1, r as DocumentProblem, v as Section } from "../document-Ct4jW78J.js";
2
+ //#region src/utils/sections.d.ts
3
+ declare const extractSections: (code: string, options?: SectionOptions) => Section[];
4
+ declare const replaceSections: (code: string, sections: string[], options?: DocumentOptions) => string;
5
+ declare const createDocument: ({ containerId }?: DocumentOptions) => string;
6
+ type DocumentCheck = {
7
+ ok: true;
8
+ } | ({
9
+ ok: false;
10
+ } & DocumentProblem);
11
+ declare const checkDocument: (code: string, options?: DocumentOptions) => DocumentCheck;
12
+ //#endregion
2
13
  //#region node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/clsx.d.mts
3
14
  type ClassValue = ClassArray | ClassDictionary | string | number | bigint | null | boolean | undefined;
4
15
  type ClassDictionary = Record<string, any>;
@@ -10,26 +21,32 @@ declare function cn(...inputs: ClassValue[]): string;
10
21
  //#region src/utils/compile.d.ts
11
22
  declare const compile: (code: string, modules: Record<string, unknown>) => Module;
12
23
  declare const clearCompilationCache: () => void;
13
- declare const transformCode: (code: string, isTypeScript?: boolean) => string;
14
- //#endregion
15
- //#region src/utils/detect-typescript.d.ts
16
- declare const detectTypeScript: (code: string) => boolean;
17
24
  //#endregion
18
25
  //#region src/utils/editor-caches.d.ts
19
26
  declare const clearEditorCaches: () => void;
20
- declare const registerEditorSession: () => (() => void);
21
27
  //#endregion
22
28
  //#region src/utils/scripts.d.ts
23
- declare const getCachedScriptBlob: (src: string) => Promise<string>;
24
29
  declare const preloadScripts: (scripts: string[]) => void;
25
- declare const clearScriptCache: () => void;
26
30
  //#endregion
27
- //#region src/utils/sections.d.ts
28
- declare const extractSections: (code: string, options?: SectionOptions) => Section[];
29
- declare const replaceSections: (code: string, sections: string[], options?: DocumentOptions) => string;
31
+ //#region src/utils/index.d.ts
32
+ /** @deprecated Internal. Use `compile`. Removed in the next major. */
33
+ declare const transformCode: (code: string, isTypeScript?: boolean) => string;
34
+ /** @deprecated Internal. Removed in the next major. */
35
+ declare const detectTypeScript: (code: string) => boolean;
36
+ /** @deprecated Internal. `Live` registers its own session. Removed in the next major. */
37
+ declare const registerEditorSession: () => (() => void);
38
+ /** @deprecated Internal. Use `preloadScripts`. Removed in the next major. */
39
+ declare const getCachedScriptBlob: (src: string) => Promise<string>;
40
+ /** @deprecated Internal. Use `clearEditorCaches`. Removed in the next major. */
41
+ declare const clearScriptCache: () => void;
42
+ /** @deprecated Internal. `Live.Dnd` renders section previews itself. Removed in the next major. */
30
43
  declare const generateSection: (code: string, fullCode: string, options?: DocumentOptions) => string;
44
+ /** @deprecated Internal. `Live.Dnd` renders section previews itself. Removed in the next major. */
31
45
  declare const generateSections: (codes: string[], fullCode: string, options?: DocumentOptions) => string[];
32
- declare const createDocument: ({ containerId }?: DocumentOptions) => string;
46
+ /** @deprecated Internal. `Live.Dnd` renders section previews itself. Removed in the next major. */
47
+ declare const createSectionPreviewCache: () => SectionPreviewCache$1;
48
+ /** @deprecated Internal. Removed in the next major. */
49
+ type SectionPreviewCache = SectionPreviewCache$1;
33
50
  //#endregion
34
- export { type DocumentOptions, type SectionOptions, type SectionPreviewCache, clearCompilationCache, clearEditorCaches, clearScriptCache, cn, compile, createDocument, createSectionPreviewCache, detectTypeScript, extractSections, generateSection, generateSections, getCachedScriptBlob, preloadScripts, registerEditorSession, replaceSections, transformCode };
51
+ export { type DocumentCheck, type DocumentOptions, type DocumentProblem, type SectionOptions, SectionPreviewCache, checkDocument, clearCompilationCache, clearEditorCaches, clearScriptCache, cn, compile, createDocument, createSectionPreviewCache, detectTypeScript, extractSections, generateSection, generateSections, getCachedScriptBlob, preloadScripts, registerEditorSession, replaceSections, transformCode };
35
52
  //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,27 @@
1
- import { n as createSectionPreviewCache } from "../document-BDn_f08_.js";
2
- import { r as registerEditorSession, t as clearEditorCaches } from "../editor-caches-ClMvdcQF.js";
1
+ import { n as createSectionPreviewCache$1 } from "../document-DGHTfrda.js";
2
+ import { r as registerEditorSession$1, t as clearEditorCaches } from "../editor-caches-ClMvdcQF.js";
3
3
  import { t as cn } from "../cn-CAnad2vL.js";
4
- import { a as getCachedScriptBlob, i as clearScriptCache, n as compile, o as preloadScripts, r as transformCode, t as clearCompilationCache } from "../compile-DDfk5P25.js";
5
- import { t as detectTypeScript } from "../detect-typescript-CCj9ALXc.js";
6
- import { a as replaceSections, i as generateSections, n as extractSections, r as generateSection, t as createDocument } from "../sections-CBVMO8Jl.js";
7
- export { clearCompilationCache, clearEditorCaches, clearScriptCache, cn, compile, createDocument, createSectionPreviewCache, detectTypeScript, extractSections, generateSection, generateSections, getCachedScriptBlob, preloadScripts, registerEditorSession, replaceSections, transformCode };
4
+ import { a as getCachedScriptBlob$1, i as clearScriptCache$1, n as compile, o as preloadScripts, r as transformCode$1, t as clearCompilationCache } from "../compile-DDfk5P25.js";
5
+ import { t as detectTypeScript$1 } from "../detect-typescript-CCj9ALXc.js";
6
+ import { a as generateSections$1, i as generateSection$1, n as createDocument, o as replaceSections, r as extractSections, t as checkDocument } from "../sections-BRH3KHYc.js";
7
+ //#region src/utils/index.ts
8
+ /** @deprecated Internal. Use `compile`. Removed in the next major. */
9
+ const transformCode = transformCode$1;
10
+ /** @deprecated Internal. Removed in the next major. */
11
+ const detectTypeScript = detectTypeScript$1;
12
+ /** @deprecated Internal. `Live` registers its own session. Removed in the next major. */
13
+ const registerEditorSession = registerEditorSession$1;
14
+ /** @deprecated Internal. Use `preloadScripts`. Removed in the next major. */
15
+ const getCachedScriptBlob = getCachedScriptBlob$1;
16
+ /** @deprecated Internal. Use `clearEditorCaches`. Removed in the next major. */
17
+ const clearScriptCache = clearScriptCache$1;
18
+ /** @deprecated Internal. `Live.Dnd` renders section previews itself. Removed in the next major. */
19
+ const generateSection = generateSection$1;
20
+ /** @deprecated Internal. `Live.Dnd` renders section previews itself. Removed in the next major. */
21
+ const generateSections = generateSections$1;
22
+ /** @deprecated Internal. `Live.Dnd` renders section previews itself. Removed in the next major. */
23
+ const createSectionPreviewCache = createSectionPreviewCache$1;
24
+ //#endregion
25
+ export { checkDocument, clearCompilationCache, clearEditorCaches, clearScriptCache, cn, compile, createDocument, createSectionPreviewCache, detectTypeScript, extractSections, generateSection, generateSections, getCachedScriptBlob, preloadScripts, registerEditorSession, replaceSections, transformCode };
26
+
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_transformCode","_detectTypeScript","_registerEditorSession","_getCachedScriptBlob","_clearScriptCache","_generateSection","_generateSections","_createSectionPreviewCache"],"sources":["../../src/utils/index.ts"],"sourcesContent":["// The public `./utils` entry. Each concern lives in its own module so that\n// library code imports only what it uses: `Live.Preview` needs `compile`,\n// not the AST layer behind the section helpers, and the provider needs\n// neither (#407). Import from those modules inside the library, not here.\nimport { transformCode as _transformCode } from './compile';\nimport { detectTypeScript as _detectTypeScript } from './detect-typescript';\nimport { registerEditorSession as _registerEditorSession } from './editor-caches';\nimport { getCachedScriptBlob as _getCachedScriptBlob } from './scripts';\nimport { clearScriptCache as _clearScriptCache } from './scripts';\nimport { generateSection as _generateSection } from './sections';\nimport { generateSections as _generateSections } from './sections';\nimport { createSectionPreviewCache as _createSectionPreviewCache } from './sections';\nimport type { SectionPreviewCache as _SectionPreviewCache } from './sections';\n\nexport { cn } from './cn';\nexport { clearCompilationCache, compile } from './compile';\nexport { clearEditorCaches } from './editor-caches';\nexport { preloadScripts } from './scripts';\nexport {\n checkDocument,\n createDocument,\n extractSections,\n replaceSections,\n} from './sections';\nexport type {\n DocumentCheck,\n DocumentOptions,\n DocumentProblem,\n SectionOptions,\n} from './sections';\n\n// Internal helpers this entry used to export. Each still works, and leaves\n// the entry in the next major (#522). Re-exports only: a declaration here,\n// such as `export const x = _x`, moves the entry's types into the shared\n// declaration chunk that also pulls in React.\n/** @deprecated Internal. Use `compile`. Removed in the next major. */\nexport const transformCode = _transformCode;\n/** @deprecated Internal. Removed in the next major. */\nexport const detectTypeScript = _detectTypeScript;\n/** @deprecated Internal. `Live` registers its own session. Removed in the next major. */\nexport const registerEditorSession = _registerEditorSession;\n/** @deprecated Internal. Use `preloadScripts`. Removed in the next major. */\nexport const getCachedScriptBlob = _getCachedScriptBlob;\n/** @deprecated Internal. Use `clearEditorCaches`. Removed in the next major. */\nexport const clearScriptCache = _clearScriptCache;\n/** @deprecated Internal. `Live.Dnd` renders section previews itself. Removed in the next major. */\nexport const generateSection = _generateSection;\n/** @deprecated Internal. `Live.Dnd` renders section previews itself. Removed in the next major. */\nexport const generateSections = _generateSections;\n/** @deprecated Internal. `Live.Dnd` renders section previews itself. Removed in the next major. */\nexport const createSectionPreviewCache = _createSectionPreviewCache;\n/** @deprecated Internal. Removed in the next major. */\nexport type SectionPreviewCache = _SectionPreviewCache;\n"],"mappings":";;;;;;;;AAoCA,MAAa,gBAAgBA;;AAE7B,MAAa,mBAAmBC;;AAEhC,MAAa,wBAAwBC;;AAErC,MAAa,sBAAsBC;;AAEnC,MAAa,mBAAmBC;;AAEhC,MAAa,kBAAkBC;;AAE/B,MAAa,mBAAmBC;;AAEhC,MAAa,4BAA4BC"}
@@ -0,0 +1,100 @@
1
+ //#region src/utils/ast/types.d.ts
2
+ interface Attribute {
3
+ name: string;
4
+ value: string | null;
5
+ isStringLiteral?: boolean;
6
+ }
7
+ interface DataAttrNode {
8
+ id?: string;
9
+ tagName: string;
10
+ attributes: Attribute[];
11
+ dataAttributes: Attribute[];
12
+ textContent: string;
13
+ rawChildren?: string;
14
+ source?: string;
15
+ loc?: {
16
+ start: {
17
+ line: number;
18
+ column: number;
19
+ };
20
+ end: {
21
+ line: number;
22
+ column: number;
23
+ };
24
+ };
25
+ children?: DataAttrNode[];
26
+ isFragment?: boolean;
27
+ bindings?: BindingItem[];
28
+ }
29
+ interface BindingOption {
30
+ label: string;
31
+ value: string;
32
+ }
33
+ declare const BINDING_TYPES: readonly ["array", "object", "string", "number", "boolean", "color", "jsx", "richtext", "date", "url"];
34
+ type BindingType = (typeof BINDING_TYPES)[number];
35
+ interface BindingWidget {
36
+ type: string;
37
+ step?: number;
38
+ unit?: string;
39
+ [key: string]: unknown;
40
+ }
41
+ interface BindingFieldSpec {
42
+ type?: BindingType;
43
+ widget?: BindingWidget;
44
+ options?: BindingOption[];
45
+ render?: BindingRenderMap;
46
+ min?: number;
47
+ max?: number;
48
+ pattern?: string;
49
+ required?: boolean;
50
+ meta?: Record<string, unknown>;
51
+ }
52
+ interface BindingRenderLeaf extends BindingFieldSpec {
53
+ label?: string;
54
+ property?: string;
55
+ }
56
+ interface BindingRenderMap {
57
+ [key: string]: BindingRenderLeaf | BindingRenderMap;
58
+ }
59
+ interface BindingItem extends BindingFieldSpec {
60
+ label: string;
61
+ property: string;
62
+ }
63
+ type BindingComponentName = `${string}.${string}` | Capitalize<string>;
64
+ interface BindingSchema extends Omit<BindingItem, 'meta'> {
65
+ [key: string]: unknown;
66
+ }
67
+ type BindingRegistry = Partial<Record<BindingComponentName, BindingSchema[]>>;
68
+ type BindingKeyMap = Record<string, BindingSchema[]>;
69
+ interface BindingOptions {
70
+ bindings?: BindingRegistry;
71
+ bindingKeys?: BindingKeyMap;
72
+ }
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
+ //#endregion
99
+ export { BindingWidget as _, validateBindingValue as a, ExtractedNodeValue as b, BindingItem as c, BindingOptions as d, BindingRegistry as f, BindingType as g, BindingSchema as h, defaultValidationMessages as i, BindingKeyMap as l, BindingRenderMap as m, ValidationOptions as n, BindingComponentName as o, BindingRenderLeaf as p, ValidationResult as r, BindingFieldSpec as s, ValidationMessages as t, BindingOption as u, DataAttrNode as v, NodeValueType as x, EditableNodeValueType as y };
100
+ //# sourceMappingURL=validate-DB59Z_Nx.d.ts.map
@@ -0,0 +1,64 @@
1
+ //#region src/utils/ast/validate.ts
2
+ const defaultValidationMessages = {
3
+ required: "This field is required.",
4
+ min: (min) => `Must be at least ${min}.`,
5
+ max: (max) => `Must be at most ${max}.`,
6
+ pattern: "Value does not match the required format.",
7
+ url: "Must be a valid URL.",
8
+ date: "Must be a valid date."
9
+ };
10
+ const VALID = { valid: true };
11
+ const validateBindingValue = (binding, value, options = {}) => {
12
+ const messages = {
13
+ ...defaultValidationMessages,
14
+ ...options.messages
15
+ };
16
+ if (value === "" || value === null || value === void 0) {
17
+ if (binding.required) return {
18
+ valid: false,
19
+ message: messages.required
20
+ };
21
+ return VALID;
22
+ }
23
+ if (typeof value === "number") {
24
+ if (binding.min !== void 0 && value < binding.min) return {
25
+ valid: false,
26
+ message: messages.min(binding.min)
27
+ };
28
+ if (binding.max !== void 0 && value > binding.max) return {
29
+ valid: false,
30
+ message: messages.max(binding.max)
31
+ };
32
+ }
33
+ if (typeof value === "string" && binding.pattern) {
34
+ let regex;
35
+ try {
36
+ regex = new RegExp(binding.pattern);
37
+ } catch {
38
+ return VALID;
39
+ }
40
+ if (!regex.test(value)) return {
41
+ valid: false,
42
+ message: messages.pattern
43
+ };
44
+ }
45
+ if (typeof value === "string" && binding.type === "url") try {
46
+ new URL(value);
47
+ } catch {
48
+ return {
49
+ valid: false,
50
+ message: messages.url
51
+ };
52
+ }
53
+ if (typeof value === "string" && binding.type === "date") {
54
+ if (Number.isNaN(Date.parse(value))) return {
55
+ valid: false,
56
+ message: messages.date
57
+ };
58
+ }
59
+ return VALID;
60
+ };
61
+ //#endregion
62
+ export { validateBindingValue as n, defaultValidationMessages as t };
63
+
64
+ //# sourceMappingURL=validate-iLo8IONY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-iLo8IONY.js","names":[],"sources":["../src/utils/ast/validate.ts"],"sourcesContent":["import type { BindingItem } from './types';\n\nexport interface ValidationResult {\n valid: boolean;\n message?: string;\n}\n\n// The messages a failed check returns. Pass your own through `options` to\n// translate them; the built-in panel passes the provider's `validation`\n// messages (#524).\nexport interface ValidationMessages {\n required: string;\n min: (min: number) => string;\n max: (max: number) => string;\n pattern: string;\n url: string;\n date: string;\n}\n\nexport const defaultValidationMessages: ValidationMessages = {\n required: 'This field is required.',\n min: min => `Must be at least ${min}.`,\n max: max => `Must be at most ${max}.`,\n pattern: 'Value does not match the required format.',\n url: 'Must be a valid URL.',\n date: 'Must be a valid date.',\n};\n\nexport interface ValidationOptions {\n messages?: Partial<ValidationMessages>;\n}\n\nconst VALID: ValidationResult = { valid: true };\n\nexport const validateBindingValue = (\n binding: BindingItem,\n value: unknown,\n options: ValidationOptions = {},\n): ValidationResult => {\n const messages = { ...defaultValidationMessages, ...options.messages };\n const isEmpty = value === '' || value === null || value === undefined;\n\n if (isEmpty) {\n if (binding.required) {\n return { valid: false, message: messages.required };\n }\n return VALID;\n }\n\n // `min`/`max` compare against a real number. Since #238, a `type:\n // 'number'` binding delivers an actual number across the panel boundary,\n // so callers pass one here directly — no string coercion to re-derive the\n // type. A non-number value simply isn't range-checked.\n if (typeof value === 'number') {\n if (binding.min !== undefined && value < binding.min) {\n return { valid: false, message: messages.min(binding.min) };\n }\n if (binding.max !== undefined && value > binding.max) {\n return { valid: false, message: messages.max(binding.max) };\n }\n }\n\n if (typeof value === 'string' && binding.pattern) {\n let regex: RegExp;\n\n try {\n regex = new RegExp(binding.pattern);\n } catch {\n // Malformed pattern authored on the binding itself — don't block the\n // user's input for an authoring mistake that isn't theirs to fix.\n return VALID;\n }\n\n if (!regex.test(value)) {\n return {\n valid: false,\n message: messages.pattern,\n };\n }\n }\n\n if (typeof value === 'string' && binding.type === 'url') {\n try {\n new URL(value);\n } catch {\n return { valid: false, message: messages.url };\n }\n }\n\n if (typeof value === 'string' && binding.type === 'date') {\n if (Number.isNaN(Date.parse(value))) {\n return { valid: false, message: messages.date };\n }\n }\n\n return VALID;\n};\n"],"mappings":";AAmBA,MAAa,4BAAgD;CAC3D,UAAU;CACV,MAAK,QAAO,oBAAoB,IAAI;CACpC,MAAK,QAAO,mBAAmB,IAAI;CACnC,SAAS;CACT,KAAK;CACL,MAAM;AACR;AAMA,MAAM,QAA0B,EAAE,OAAO,KAAK;AAE9C,MAAa,wBACX,SACA,OACA,UAA6B,CAAC,MACT;CACrB,MAAM,WAAW;EAAE,GAAG;EAA2B,GAAG,QAAQ;CAAS;CAGrE,IAFgB,UAAU,MAAM,UAAU,QAAQ,UAAU,KAAA,GAE/C;EACX,IAAI,QAAQ,UACV,OAAO;GAAE,OAAO;GAAO,SAAS,SAAS;EAAS;EAEpD,OAAO;CACT;CAMA,IAAI,OAAO,UAAU,UAAU;EAC7B,IAAI,QAAQ,QAAQ,KAAA,KAAa,QAAQ,QAAQ,KAC/C,OAAO;GAAE,OAAO;GAAO,SAAS,SAAS,IAAI,QAAQ,GAAG;EAAE;EAE5D,IAAI,QAAQ,QAAQ,KAAA,KAAa,QAAQ,QAAQ,KAC/C,OAAO;GAAE,OAAO;GAAO,SAAS,SAAS,IAAI,QAAQ,GAAG;EAAE;CAE9D;CAEA,IAAI,OAAO,UAAU,YAAY,QAAQ,SAAS;EAChD,IAAI;EAEJ,IAAI;GACF,QAAQ,IAAI,OAAO,QAAQ,OAAO;EACpC,QAAQ;GAGN,OAAO;EACT;EAEA,IAAI,CAAC,MAAM,KAAK,KAAK,GACnB,OAAO;GACL,OAAO;GACP,SAAS,SAAS;EACpB;CAEJ;CAEA,IAAI,OAAO,UAAU,YAAY,QAAQ,SAAS,OAChD,IAAI;EACF,IAAI,IAAI,KAAK;CACf,QAAQ;EACN,OAAO;GAAE,OAAO;GAAO,SAAS,SAAS;EAAI;CAC/C;CAGF,IAAI,OAAO,UAAU,YAAY,QAAQ,SAAS,QAC5C;MAAA,OAAO,MAAM,KAAK,MAAM,KAAK,CAAC,GAChC,OAAO;GAAE,OAAO;GAAO,SAAS,SAAS;EAAK;CAAA;CAIlD,OAAO;AACT"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "4.4.0",
7
+ "version": "4.5.0",
8
8
  "type": "module",
9
9
  "module": "./dist/index.js",
10
10
  "types": "./dist/index.d.ts",
@@ -38,8 +38,7 @@
38
38
  "url": "https://github.com/pjb0811/live-editor/issues"
39
39
  },
40
40
  "engines": {
41
- "node": ">=20",
42
- "pnpm": ">=10"
41
+ "node": ">=20"
43
42
  },
44
43
  "packageManager": "pnpm@12.8.1",
45
44
  "exports": {
@@ -90,6 +89,7 @@
90
89
  "build:demo": "vite build --outDir dist-demo",
91
90
  "build:demos": "vite build --config demos/vite.config.ts",
92
91
  "check-types": "tsc -b",
92
+ "check-api-surface": "node .github/scripts/check-api-surface.mjs",
93
93
  "check-package-types": "pnpm build && node .github/scripts/check-package-types.mjs",
94
94
  "lint": "eslint .",
95
95
  "depcheck": "depcheck --ignores=\"~,@changesets/cli,@jbpark/live-editor,@trivago/prettier-plugin-sort-imports,prettier-plugin-classnames,prettier-plugin-merge,prettier-plugin-tailwindcss,baseline-browser-mapping,vite-plugin-dts,depcheck\" --ignore-dirs=\"dist,dist-demo,website,.history\"",