@jbpark/live-editor 4.5.0 → 4.6.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 (70) hide show
  1. package/README.ko.md +4 -1
  2. package/README.md +5 -1
  3. package/dist/{boundary-DnjGgsK6.js → boundary-BLB80tyw.js} +2 -2
  4. package/dist/boundary-BLB80tyw.js.map +1 -0
  5. package/dist/cache-B0-XcIxJ.js.map +1 -1
  6. package/dist/{compile-DDfk5P25.js → compile-Dxas-D05.js} +3 -3
  7. package/dist/compile-Dxas-D05.js.map +1 -0
  8. package/dist/{constants-h1JAgOeW.js → constants-DU17Tdwo.js} +3 -3
  9. package/dist/constants-DU17Tdwo.js.map +1 -0
  10. package/dist/{context-DsEXJl4h.js → context-B8MzP7_p.js} +3 -3
  11. package/dist/context-B8MzP7_p.js.map +1 -0
  12. package/dist/{core-CRsAGpei.js → core-Bgfek364.js} +2 -2
  13. package/dist/core-Bgfek364.js.map +1 -0
  14. package/dist/{detect-typescript-CCj9ALXc.js → detect-typescript-Dr_oLniM.js} +2 -2
  15. package/dist/detect-typescript-Dr_oLniM.js.map +1 -0
  16. package/dist/dnd/index.d.ts +1 -1
  17. package/dist/dnd/index.js +1 -1
  18. package/dist/{dnd-DGNp20Nk.js → dnd-UoJILA75.js} +431 -408
  19. package/dist/dnd-UoJILA75.js.map +1 -0
  20. package/dist/{document-DGHTfrda.js → document-CGbe6bSV.js} +2 -2
  21. package/dist/{document-DGHTfrda.js.map → document-CGbe6bSV.js.map} +1 -1
  22. package/dist/editor/index.js +2 -2
  23. package/dist/{editor-DQ8Q--qR.js → editor-CMElfHer.js} +2 -2
  24. package/dist/editor-CMElfHer.js.map +1 -0
  25. package/dist/editor-caches-ClMvdcQF.js.map +1 -1
  26. package/dist/error/index.d.ts +1 -1
  27. package/dist/error/index.js +2 -2
  28. package/dist/{error-DwqwjJ2C.js → error-CN_GCnXB.js} +3 -3
  29. package/dist/{error-DwqwjJ2C.js.map → error-CN_GCnXB.js.map} +1 -1
  30. package/dist/{index-P9Aifaui.d.ts → index-C69Lv-jR.d.ts} +71 -69
  31. package/dist/{index-vtyggWy0.d.ts → index-CRwEhJ7w.d.ts} +2 -2
  32. package/dist/{index-CHknA6k1.d.ts → index-DKYUxi-E.d.ts} +10 -4
  33. package/dist/{index-WQgFy510.d.ts → index-DrWtSKXu.d.ts} +2 -2
  34. package/dist/index.d.ts +4 -4
  35. package/dist/index.js +6 -6
  36. package/dist/{items-DdrwGxJw.js → items-B6OXxcLG.js} +178 -259
  37. package/dist/items-B6OXxcLG.js.map +1 -0
  38. package/dist/{messages-CzUPVnzH.js → messages-CSrMI4Rm.js} +2 -1
  39. package/dist/messages-CSrMI4Rm.js.map +1 -0
  40. package/dist/{messages-Cp3g1mn1.d.ts → messages-IBPs4TkZ.d.ts} +2 -1
  41. package/dist/preview/index.js +2 -2
  42. package/dist/{preview-BKFgq_5u.js → preview-CtyG5UbH.js} +4 -4
  43. package/dist/{preview-BKFgq_5u.js.map → preview-CtyG5UbH.js.map} +1 -1
  44. package/dist/provider/index.d.ts +2 -2
  45. package/dist/provider/index.js +2 -2
  46. package/dist/{sections-BRH3KHYc.js → sections-BYWOBISr.js} +3 -3
  47. package/dist/sections-BYWOBISr.js.map +1 -0
  48. package/dist/states-Ci1AvoQ9.js.map +1 -1
  49. package/dist/{use-dynamic-tailwind-T9r9ExbR.js → use-dynamic-tailwind-BP1toJkW.js} +59 -39
  50. package/dist/use-dynamic-tailwind-BP1toJkW.js.map +1 -0
  51. package/dist/utils/ast/index.d.ts +1 -1
  52. package/dist/utils/ast/index.js +86 -2
  53. package/dist/utils/ast/index.js.map +1 -1
  54. package/dist/utils/index.js +4 -4
  55. package/dist/utils/index.js.map +1 -1
  56. package/dist/utils/tailwind/index.js.map +1 -1
  57. package/dist/validate-iLo8IONY.js.map +1 -1
  58. package/package.json +1 -1
  59. package/dist/boundary-DnjGgsK6.js.map +0 -1
  60. package/dist/compile-DDfk5P25.js.map +0 -1
  61. package/dist/constants-h1JAgOeW.js.map +0 -1
  62. package/dist/context-DsEXJl4h.js.map +0 -1
  63. package/dist/core-CRsAGpei.js.map +0 -1
  64. package/dist/detect-typescript-CCj9ALXc.js.map +0 -1
  65. package/dist/dnd-DGNp20Nk.js.map +0 -1
  66. package/dist/editor-DQ8Q--qR.js.map +0 -1
  67. package/dist/items-DdrwGxJw.js.map +0 -1
  68. package/dist/messages-CzUPVnzH.js.map +0 -1
  69. package/dist/sections-BRH3KHYc.js.map +0 -1
  70. package/dist/use-dynamic-tailwind-T9r9ExbR.js.map +0 -1
@@ -1,3 +1,3 @@
1
- import { t as Core } from "../core-CRsAGpei.js";
2
- import { t as Editor } from "../editor-DQ8Q--qR.js";
1
+ import { t as Core } from "../core-Bgfek364.js";
2
+ import { t as Editor } from "../editor-CMElfHer.js";
3
3
  export { Core, Editor as default };
@@ -1,5 +1,5 @@
1
1
  import { i as usePreview, r as useError } from "./states-Ci1AvoQ9.js";
2
- import { n as useFormatCode, t as Core } from "./core-CRsAGpei.js";
2
+ import { n as useFormatCode, t as Core } from "./core-Bgfek364.js";
3
3
  import { useCallback, useState } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import { useDebouncedCallback } from "@jbpark/use-hooks";
@@ -63,4 +63,4 @@ Editor.Core = Core;
63
63
  //#endregion
64
64
  export { Editor as t };
65
65
 
66
- //# sourceMappingURL=editor-DQ8Q--qR.js.map
66
+ //# sourceMappingURL=editor-CMElfHer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-CMElfHer.js","names":["Editor","EditorImpl"],"sources":["../src/components/editor/editor.tsx","../src/components/editor/index.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\n\nimport { useDebouncedCallback } from '@jbpark/use-hooks';\n\nimport { useError, usePreview } from '~/components/context/states';\n\nimport Core, { type Props as CoreProps } from './core';\nimport { useFormatCode } from './use-format-code';\n\nexport interface EditorRenderData {\n value: string;\n onChange: (value: string) => void;\n // The same Prettier formatting the built-in editor uses on Cmd+S, for a\n // custom editor's own format-on-save.\n formatCode: (code: string) => Promise<string>;\n}\n\nexport interface Props extends Omit<CoreProps, 'value' | 'onSave' | 'onError'> {\n value?: string;\n defaultValue?: string;\n debounce?: number;\n // Replaces the built-in CodeMirror editor. `Live.Editor` still sends the\n // value to the provider, debounced; only the editing surface changes.\n renderEditor?: (data: EditorRenderData) => React.ReactNode;\n}\n\nconst Editor = ({\n defaultValue,\n value: _value,\n debounce = 1000,\n onChange: _onChange,\n renderEditor,\n fragment,\n prettierOptions,\n ...props\n}: Props) => {\n const { code, setCode } = usePreview();\n const { setError } = useError();\n\n // Controlled, the host owns the document; uncontrolled, the provider does\n // (#341). `draft` shows each keystroke at once, while the provider hears\n // about it after `debounce`.\n const controlled = _value !== undefined;\n const [draft, setDraft] = useState(() => defaultValue ?? code);\n\n // The last code this editor pushed, and the provider code it has already\n // seen. A provider change that isn't this editor's own push came from\n // somewhere else sharing the provider — an uncontrolled DnD, say — and the\n // draft follows it. Adjusted during render so no frame shows the old one.\n const [pushed, setPushed] = useState<string | null>(null);\n const [seenCode, setSeenCode] = useState(code);\n\n if (code !== seenCode) {\n setSeenCode(code);\n\n if (!controlled && code !== pushed) {\n setDraft(code);\n }\n }\n\n const value = controlled ? _value : draft;\n\n const pushCode = useCallback(\n (next: string) => {\n setPushed(next);\n setCode(next);\n },\n [setCode],\n );\n\n const onChange = useCallback(\n (next: string) => {\n if (!controlled) {\n setDraft(next);\n }\n\n _onChange?.(next);\n },\n [_onChange, controlled],\n );\n\n // Formatting on save reaches the provider at once, ahead of the debounce.\n const onSave = useCallback(\n (formattedCode: string) => {\n pushCode(formattedCode);\n },\n [pushCode],\n );\n\n const onError = useCallback(\n (error: string | null) => {\n setError(error);\n },\n [setError],\n );\n\n const formatCode = useFormatCode({ fragment, prettierOptions });\n\n // Pushes `value` to the provider `debounce` ms after it stops changing,\n // and at once on mount. A pending push is never dropped: it runs when the\n // editor unmounts, and when focus leaves it — so clicking into another\n // surface right after typing edits a document that includes the typing.\n const push = useDebouncedCallback(\n () => pushCode(value),\n { delay: debounce, flushOnUnmount: true },\n [value],\n );\n\n // `display: contents` so the wrapper adds a blur listener without adding a\n // box: the editor lays out against this element's parent, as before.\n return (\n <div style={{ display: 'contents' }} onBlur={push.flush}>\n {renderEditor ? (\n renderEditor({ value, onChange, formatCode })\n ) : (\n <Core\n value={value}\n onChange={onChange}\n onSave={onSave}\n onError={onError}\n fragment={fragment}\n prettierOptions={prettierOptions}\n {...props}\n />\n )}\n </div>\n );\n};\n\nexport default Editor;\n","import Core, { type Props as CoreProps } from './core';\nimport EditorImpl, { type EditorRenderData, type Props } from './editor';\n\ntype EditorComponent = typeof EditorImpl & { Core: typeof Core };\n\nconst Editor = EditorImpl as EditorComponent;\n\nEditor.Core = Core;\n\nexport { Core };\nexport type { Props, CoreProps, EditorRenderData };\nexport default Editor;\n"],"mappings":";;;;;;AA0BA,MAAMA,YAAU,EACd,cACA,OAAO,QACP,WAAW,KACX,UAAU,WACV,cACA,UACA,iBACA,GAAG,YACQ;CACX,MAAM,EAAE,MAAM,YAAY,WAAW;CACrC,MAAM,EAAE,aAAa,SAAS;CAK9B,MAAM,aAAa,WAAW,KAAA;CAC9B,MAAM,CAAC,OAAO,YAAY,eAAe,gBAAgB,IAAI;CAM7D,MAAM,CAAC,QAAQ,aAAa,SAAwB,IAAI;CACxD,MAAM,CAAC,UAAU,eAAe,SAAS,IAAI;CAE7C,IAAI,SAAS,UAAU;EACrB,YAAY,IAAI;EAEhB,IAAI,CAAC,cAAc,SAAS,QAC1B,SAAS,IAAI;CAEjB;CAEA,MAAM,QAAQ,aAAa,SAAS;CAEpC,MAAM,WAAW,aACd,SAAiB;EAChB,UAAU,IAAI;EACd,QAAQ,IAAI;CACd,GACA,CAAC,OAAO,CACV;CAEA,MAAM,WAAW,aACd,SAAiB;EAChB,IAAI,CAAC,YACH,SAAS,IAAI;EAGf,YAAY,IAAI;CAClB,GACA,CAAC,WAAW,UAAU,CACxB;CAGA,MAAM,SAAS,aACZ,kBAA0B;EACzB,SAAS,aAAa;CACxB,GACA,CAAC,QAAQ,CACX;CAEA,MAAM,UAAU,aACb,UAAyB;EACxB,SAAS,KAAK;CAChB,GACA,CAAC,QAAQ,CACX;CAEA,MAAM,aAAa,cAAc;EAAE;EAAU;CAAgB,CAAC;CAM9D,MAAM,OAAO,2BACL,SAAS,KAAK,GACpB;EAAE,OAAO;EAAU,gBAAgB;CAAK,GACxC,CAAC,KAAK,CACR;CAIA,OACE,oBAAC,OAAD;EAAK,OAAO,EAAE,SAAS,WAAW;EAAG,QAAQ,KAAK;EAC/C,UAAA,eACC,aAAa;GAAE;GAAO;GAAU;EAAW,CAAC,IAE5C,oBAAC,MAAD;GACS;GACG;GACF;GACC;GACC;GACO;GACjB,GAAI;EACL,CAAA;CAEA,CAAA;AAET;;;AC1HA,MAAM,SAASC;AAEf,OAAO,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"editor-caches-ClMvdcQF.js","names":[],"sources":["../src/utils/editor-caches.ts"],"sourcesContent":["// Every editor-owned cache that lives for the whole page: the compilation\n// cache, the script blob cache, and the AST parse caches. Each registers its\n// own `clear` here when its module loads, so this module imports none of\n// them. The provider only needs `registerEditorSession`, and importing the\n// caches directly would pull `@babel/standalone` and Babel's AST packages\n// into every bundle that mounts `Live`, whether or not it compiles or edits\n// a document (#407). A cache whose module never loaded is empty anyway.\n//\n// Deliberately not exhaustive of every cache in the library: an instance\n// from `createSectionPreviewCache` is owned by the component that holds it\n// (`useState(() => createSectionPreviewCache())`), so it is already released\n// with that component and there is nothing global to clear.\nconst editorCaches = new Set<() => void>();\n\nexport const registerEditorCache = (clear: () => void) => {\n editorCaches.add(clear);\n};\n\nexport const clearEditorCaches = () => {\n editorCaches.forEach(clear => clear());\n};\n\n// These caches are shared across every editor session in the page, so they\n// can only be released once the *last* one is gone. Clearing on any single\n// unmount would reach into siblings that are still mounted — harmless when\n// the only casualty was a compilation cache (a cache miss costs time, not\n// correctness), but not once revoking blob URLs is part of it: a sibling\n// could be handed a URL that is dead before its iframe loads it.\nlet activeEditorSessions = 0;\n\n// Returns the release function rather than exposing the counter, so a caller\n// cannot release a session it never acquired. Idempotent, so React calling\n// an effect's cleanup twice cannot drive the count negative.\nexport const registerEditorSession = (): (() => void) => {\n activeEditorSessions += 1;\n\n let released = false;\n\n return () => {\n if (released) {\n return;\n }\n\n released = true;\n activeEditorSessions -= 1;\n\n if (activeEditorSessions === 0) {\n clearEditorCaches();\n }\n };\n};\n"],"mappings":";AAYA,MAAM,+BAAe,IAAI,IAAgB;AAEzC,MAAa,uBAAuB,UAAsB;CACxD,aAAa,IAAI,KAAK;AACxB;AAEA,MAAa,0BAA0B;CACrC,aAAa,SAAQ,UAAS,MAAM,CAAC;AACvC;AAQA,IAAI,uBAAuB;AAK3B,MAAa,8BAA4C;CACvD,wBAAwB;CAExB,IAAI,WAAW;CAEf,aAAa;EACX,IAAI,UACF;EAGF,WAAW;EACX,wBAAwB;EAExB,IAAI,yBAAyB,GAC3B,kBAAkB;CAEtB;AACF"}
1
+ {"version":3,"file":"editor-caches-ClMvdcQF.js","names":[],"sources":["../src/utils/editor-caches.ts"],"sourcesContent":["// The page-wide caches the editor owns: compiled modules, script blobs and\n// the AST parse caches. Each registers its own `clear` here when its module\n// loads, so this module imports none of them, and the provider doesn't pull\n// Babel into every bundle that mounts `Live` (#407). A section preview cache\n// belongs to its component and isn't listed here.\nconst editorCaches = new Set<() => void>();\n\nexport const registerEditorCache = (clear: () => void) => {\n editorCaches.add(clear);\n};\n\nexport const clearEditorCaches = () => {\n editorCaches.forEach(clear => clear());\n};\n\n// Shared by every editor on the page, so they're cleared only when the last\n// one unmounts. Clearing earlier could revoke a blob URL another editor is\n// about to load.\nlet activeEditorSessions = 0;\n\n// Returns the release function, so a caller can only release what it\n// acquired. Calling it twice is harmless, as React may in development.\nexport const registerEditorSession = (): (() => void) => {\n activeEditorSessions += 1;\n\n let released = false;\n\n return () => {\n if (released) {\n return;\n }\n\n released = true;\n activeEditorSessions -= 1;\n\n if (activeEditorSessions === 0) {\n clearEditorCaches();\n }\n };\n};\n"],"mappings":";AAKA,MAAM,+BAAe,IAAI,IAAgB;AAEzC,MAAa,uBAAuB,UAAsB;CACxD,aAAa,IAAI,KAAK;AACxB;AAEA,MAAa,0BAA0B;CACrC,aAAa,SAAQ,UAAS,MAAM,CAAC;AACvC;AAKA,IAAI,uBAAuB;AAI3B,MAAa,8BAA4C;CACvD,wBAAwB;CAExB,IAAI,WAAW;CAEf,aAAa;EACX,IAAI,UACF;EAGF,WAAW;EACX,wBAAwB;EAExB,IAAI,yBAAyB,GAC3B,kBAAkB;CAEtB;AACF"}
@@ -1,2 +1,2 @@
1
- import { i as Guard, o as Props, r as Runtime, s as ErrorBoundary, t as Error } from "../index-vtyggWy0.js";
1
+ import { i as Guard, o as Props, r as Runtime, s as ErrorBoundary, t as Error } from "../index-CRwEhJ7w.js";
2
2
  export { ErrorBoundary, Guard as ErrorGuard, Runtime as ErrorRuntime, type Props, Error as default };
@@ -1,3 +1,3 @@
1
- import { t as ErrorBoundary } from "../boundary-DnjGgsK6.js";
2
- import { n as Runtime, r as Guard, t as Error } from "../error-DwqwjJ2C.js";
1
+ import { t as ErrorBoundary } from "../boundary-BLB80tyw.js";
2
+ import { n as Runtime, r as Guard, t as Error } from "../error-CN_GCnXB.js";
3
3
  export { ErrorBoundary, Guard as ErrorGuard, Runtime as ErrorRuntime, Error as default };
@@ -1,6 +1,6 @@
1
- import { i as useLiveMessages } from "./messages-CzUPVnzH.js";
1
+ import { i as useLiveMessages } from "./messages-CSrMI4Rm.js";
2
2
  import { r as useError } from "./states-Ci1AvoQ9.js";
3
- import { n as Error$1, t as ErrorBoundary } from "./boundary-DnjGgsK6.js";
3
+ import { n as Error$1, t as ErrorBoundary } from "./boundary-BLB80tyw.js";
4
4
  import { useEffect, useRef, useState } from "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { useEventListener } from "@jbpark/use-hooks";
@@ -86,4 +86,4 @@ Error.Guard = Guard;
86
86
  //#endregion
87
87
  export { Runtime as n, Guard as r, Error as t };
88
88
 
89
- //# sourceMappingURL=error-DwqwjJ2C.js.map
89
+ //# sourceMappingURL=error-CN_GCnXB.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-DwqwjJ2C.js","names":["ErrorComponent","Error","ErrorImpl","ErrorRuntime","ErrorGuard"],"sources":["../src/components/error/guard.tsx","../src/components/error/runtime.tsx","../src/components/error/index.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nimport { useEventListener } from '@jbpark/use-hooks';\n\nimport { useLiveMessages } from '~/components/context/messages';\n\nimport ErrorComponent from './error';\n\nexport interface Props {\n children: React.ReactNode;\n onError?: (error: Error) => void;\n}\n\nconst Guard = ({ children, onError }: Props) => {\n const [error, setError] = useState<string | null>(null);\n const messages = useLiveMessages();\n\n const containerRef = useRef<HTMLDivElement>(null);\n const errorHandled = useRef(false);\n // Read by the listeners, so new messages don't subscribe them again.\n const messagesRef = useRef(messages);\n\n useEffect(() => {\n messagesRef.current = messages;\n });\n\n useEventListener(\n 'error',\n event => {\n if (errorHandled.current) {\n return;\n }\n\n errorHandled.current = true;\n\n const errorMessage =\n event.error?.message ||\n event.message ||\n messagesRef.current.errors.unknown;\n\n console.error('⚡ [Guard] Event handler error:', errorMessage);\n\n event.preventDefault();\n\n setError(errorMessage);\n onError?.(event.error || new window.Error(errorMessage));\n\n setTimeout(() => {\n errorHandled.current = false;\n }, 100);\n },\n { capture: true },\n );\n\n useEffect(() => {\n const container = containerRef.current;\n\n if (!container) {\n return;\n }\n\n const handleUnhandledRejection = (event: PromiseRejectionEvent) => {\n if (errorHandled.current) {\n return;\n }\n\n errorHandled.current = true;\n\n const errorMessage =\n event.reason?.message || messagesRef.current.errors.unhandledRejection;\n\n event.preventDefault();\n setError(errorMessage);\n onError?.(event.reason || new window.Error(errorMessage));\n\n setTimeout(() => {\n errorHandled.current = false;\n }, 100);\n };\n\n window.addEventListener(\n 'unhandledrejection',\n handleUnhandledRejection,\n true,\n );\n\n return () => {\n window.removeEventListener(\n 'unhandledrejection',\n handleUnhandledRejection,\n true,\n );\n };\n }, [onError]);\n\n if (error) {\n return (\n <ErrorComponent\n title={messages.errors.runtime}\n message={error}\n className=\"m-4\"\n onReset={() => {\n setError(null);\n errorHandled.current = false;\n }}\n />\n );\n }\n\n return <div ref={containerRef}>{children}</div>;\n};\n\nexport default Guard;\n","import { useEffect } from 'react';\n\nimport { useEventListener } from '@jbpark/use-hooks';\n\nimport { useLiveMessages } from '~/components/context/messages';\nimport { useError } from '~/components/context/states';\n\nimport Error from './error';\n\nexport interface Props extends React.ComponentPropsWithRef<'div'> {\n open?: boolean;\n reset?: () => void;\n}\n\nconst Runtime = ({ open = true, reset }: Props) => {\n const { error: message, setError } = useError();\n const messages = useLiveMessages();\n\n useEventListener('error', e => {\n setError(e.message);\n e.preventDefault();\n });\n\n useEffect(() => {\n return () => setError(null);\n }, [setError]);\n\n if (!open) {\n return null;\n }\n\n return (\n <Error message={message} onReset={reset} title={messages.errors.runtime} />\n );\n};\n\nexport default Runtime;\n","import ErrorBoundary from './boundary';\nimport ErrorImpl, { type Props } from './error';\nimport ErrorGuard from './guard';\nimport ErrorRuntime from './runtime';\n\ntype ErrorComponent = typeof ErrorImpl & {\n Boundary: typeof ErrorBoundary;\n Runtime: typeof ErrorRuntime;\n Guard: typeof ErrorGuard;\n};\n\nconst Error = ErrorImpl as ErrorComponent;\n\nError.Boundary = ErrorBoundary;\nError.Runtime = ErrorRuntime;\nError.Guard = ErrorGuard;\n\nexport { ErrorBoundary, ErrorRuntime, ErrorGuard };\nexport type { Props };\nexport default Error;\n"],"mappings":";;;;;;;AAaA,MAAM,SAAS,EAAE,UAAU,cAAqB;CAC9C,MAAM,CAAC,OAAO,YAAY,SAAwB,IAAI;CACtD,MAAM,WAAW,gBAAgB;CAEjC,MAAM,eAAe,OAAuB,IAAI;CAChD,MAAM,eAAe,OAAO,KAAK;CAEjC,MAAM,cAAc,OAAO,QAAQ;CAEnC,gBAAgB;EACd,YAAY,UAAU;CACxB,CAAC;CAED,iBACE,UACA,UAAS;EACP,IAAI,aAAa,SACf;EAGF,aAAa,UAAU;EAEvB,MAAM,eACJ,MAAM,OAAO,WACb,MAAM,WACN,YAAY,QAAQ,OAAO;EAE7B,QAAQ,MAAM,kCAAkC,YAAY;EAE5D,MAAM,eAAe;EAErB,SAAS,YAAY;EACrB,UAAU,MAAM,SAAS,IAAI,OAAO,MAAM,YAAY,CAAC;EAEvD,iBAAiB;GACf,aAAa,UAAU;EACzB,GAAG,GAAG;CACR,GACA,EAAE,SAAS,KAAK,CAClB;CAEA,gBAAgB;EAGd,IAAI,CAFc,aAAa,SAG7B;EAGF,MAAM,4BAA4B,UAAiC;GACjE,IAAI,aAAa,SACf;GAGF,aAAa,UAAU;GAEvB,MAAM,eACJ,MAAM,QAAQ,WAAW,YAAY,QAAQ,OAAO;GAEtD,MAAM,eAAe;GACrB,SAAS,YAAY;GACrB,UAAU,MAAM,UAAU,IAAI,OAAO,MAAM,YAAY,CAAC;GAExD,iBAAiB;IACf,aAAa,UAAU;GACzB,GAAG,GAAG;EACR;EAEA,OAAO,iBACL,sBACA,0BACA,IACF;EAEA,aAAa;GACX,OAAO,oBACL,sBACA,0BACA,IACF;EACF;CACF,GAAG,CAAC,OAAO,CAAC;CAEZ,IAAI,OACF,OACE,oBAACA,SAAD;EACE,OAAO,SAAS,OAAO;EACvB,SAAS;EACT,WAAU;EACV,eAAe;GACb,SAAS,IAAI;GACb,aAAa,UAAU;EACzB;CACD,CAAA;CAIL,OAAO,oBAAC,OAAD;EAAK,KAAK;EAAe;CAAc,CAAA;AAChD;;;AChGA,MAAM,WAAW,EAAE,OAAO,MAAM,YAAmB;CACjD,MAAM,EAAE,OAAO,SAAS,aAAa,SAAS;CAC9C,MAAM,WAAW,gBAAgB;CAEjC,iBAAiB,UAAS,MAAK;EAC7B,SAAS,EAAE,OAAO;EAClB,EAAE,eAAe;CACnB,CAAC;CAED,gBAAgB;EACd,aAAa,SAAS,IAAI;CAC5B,GAAG,CAAC,QAAQ,CAAC;CAEb,IAAI,CAAC,MACH,OAAO;CAGT,OACE,oBAACC,SAAD;EAAgB;EAAS,SAAS;EAAO,OAAO,SAAS,OAAO;CAAU,CAAA;AAE9E;;;ACvBA,MAAM,QAAQC;AAEd,MAAM,WAAW;AACjB,MAAM,UAAUC;AAChB,MAAM,QAAQC"}
1
+ {"version":3,"file":"error-CN_GCnXB.js","names":["ErrorComponent","Error","ErrorImpl","ErrorRuntime","ErrorGuard"],"sources":["../src/components/error/guard.tsx","../src/components/error/runtime.tsx","../src/components/error/index.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nimport { useEventListener } from '@jbpark/use-hooks';\n\nimport { useLiveMessages } from '~/components/context/messages';\n\nimport ErrorComponent from './error';\n\nexport interface Props {\n children: React.ReactNode;\n onError?: (error: Error) => void;\n}\n\nconst Guard = ({ children, onError }: Props) => {\n const [error, setError] = useState<string | null>(null);\n const messages = useLiveMessages();\n\n const containerRef = useRef<HTMLDivElement>(null);\n const errorHandled = useRef(false);\n // Read by the listeners, so new messages don't subscribe them again.\n const messagesRef = useRef(messages);\n\n useEffect(() => {\n messagesRef.current = messages;\n });\n\n useEventListener(\n 'error',\n event => {\n if (errorHandled.current) {\n return;\n }\n\n errorHandled.current = true;\n\n const errorMessage =\n event.error?.message ||\n event.message ||\n messagesRef.current.errors.unknown;\n\n console.error('⚡ [Guard] Event handler error:', errorMessage);\n\n event.preventDefault();\n\n setError(errorMessage);\n onError?.(event.error || new window.Error(errorMessage));\n\n setTimeout(() => {\n errorHandled.current = false;\n }, 100);\n },\n { capture: true },\n );\n\n useEffect(() => {\n const container = containerRef.current;\n\n if (!container) {\n return;\n }\n\n const handleUnhandledRejection = (event: PromiseRejectionEvent) => {\n if (errorHandled.current) {\n return;\n }\n\n errorHandled.current = true;\n\n const errorMessage =\n event.reason?.message || messagesRef.current.errors.unhandledRejection;\n\n event.preventDefault();\n setError(errorMessage);\n onError?.(event.reason || new window.Error(errorMessage));\n\n setTimeout(() => {\n errorHandled.current = false;\n }, 100);\n };\n\n window.addEventListener(\n 'unhandledrejection',\n handleUnhandledRejection,\n true,\n );\n\n return () => {\n window.removeEventListener(\n 'unhandledrejection',\n handleUnhandledRejection,\n true,\n );\n };\n }, [onError]);\n\n if (error) {\n return (\n <ErrorComponent\n title={messages.errors.runtime}\n message={error}\n className=\"m-4\"\n onReset={() => {\n setError(null);\n errorHandled.current = false;\n }}\n />\n );\n }\n\n return <div ref={containerRef}>{children}</div>;\n};\n\nexport default Guard;\n","import { useEffect } from 'react';\n\nimport { useEventListener } from '@jbpark/use-hooks';\n\nimport { useLiveMessages } from '~/components/context/messages';\nimport { useError } from '~/components/context/states';\n\nimport Error from './error';\n\nexport interface Props extends React.ComponentPropsWithRef<'div'> {\n open?: boolean;\n reset?: () => void;\n}\n\nconst Runtime = ({ open = true, reset }: Props) => {\n const { error: message, setError } = useError();\n const messages = useLiveMessages();\n\n useEventListener('error', e => {\n setError(e.message);\n e.preventDefault();\n });\n\n useEffect(() => {\n return () => setError(null);\n }, [setError]);\n\n if (!open) {\n return null;\n }\n\n return (\n <Error message={message} onReset={reset} title={messages.errors.runtime} />\n );\n};\n\nexport default Runtime;\n","import ErrorBoundary from './boundary';\nimport ErrorImpl, { type Props } from './error';\nimport ErrorGuard from './guard';\nimport ErrorRuntime from './runtime';\n\ntype ErrorComponent = typeof ErrorImpl & {\n Boundary: typeof ErrorBoundary;\n Runtime: typeof ErrorRuntime;\n Guard: typeof ErrorGuard;\n};\n\nconst Error = ErrorImpl as ErrorComponent;\n\nError.Boundary = ErrorBoundary;\nError.Runtime = ErrorRuntime;\nError.Guard = ErrorGuard;\n\nexport { ErrorBoundary, ErrorRuntime, ErrorGuard };\nexport type { Props };\nexport default Error;\n"],"mappings":";;;;;;;AAaA,MAAM,SAAS,EAAE,UAAU,cAAqB;CAC9C,MAAM,CAAC,OAAO,YAAY,SAAwB,IAAI;CACtD,MAAM,WAAW,gBAAgB;CAEjC,MAAM,eAAe,OAAuB,IAAI;CAChD,MAAM,eAAe,OAAO,KAAK;CAEjC,MAAM,cAAc,OAAO,QAAQ;CAEnC,gBAAgB;EACd,YAAY,UAAU;CACxB,CAAC;CAED,iBACE,UACA,UAAS;EACP,IAAI,aAAa,SACf;EAGF,aAAa,UAAU;EAEvB,MAAM,eACJ,MAAM,OAAO,WACb,MAAM,WACN,YAAY,QAAQ,OAAO;EAE7B,QAAQ,MAAM,kCAAkC,YAAY;EAE5D,MAAM,eAAe;EAErB,SAAS,YAAY;EACrB,UAAU,MAAM,SAAS,IAAI,OAAO,MAAM,YAAY,CAAC;EAEvD,iBAAiB;GACf,aAAa,UAAU;EACzB,GAAG,GAAG;CACR,GACA,EAAE,SAAS,KAAK,CAClB;CAEA,gBAAgB;EAGd,IAAI,CAFc,aAAa,SAG7B;EAGF,MAAM,4BAA4B,UAAiC;GACjE,IAAI,aAAa,SACf;GAGF,aAAa,UAAU;GAEvB,MAAM,eACJ,MAAM,QAAQ,WAAW,YAAY,QAAQ,OAAO;GAEtD,MAAM,eAAe;GACrB,SAAS,YAAY;GACrB,UAAU,MAAM,UAAU,IAAI,OAAO,MAAM,YAAY,CAAC;GAExD,iBAAiB;IACf,aAAa,UAAU;GACzB,GAAG,GAAG;EACR;EAEA,OAAO,iBACL,sBACA,0BACA,IACF;EAEA,aAAa;GACX,OAAO,oBACL,sBACA,0BACA,IACF;EACF;CACF,GAAG,CAAC,OAAO,CAAC;CAEZ,IAAI,OACF,OACE,oBAACA,SAAD;EACE,OAAO,SAAS,OAAO;EACvB,SAAS;EACT,WAAU;EACV,eAAe;GACb,SAAS,IAAI;GACb,aAAa,UAAU;EACzB;CACD,CAAA;CAIL,OAAO,oBAAC,OAAD;EAAK,KAAK;EAAe;CAAc,CAAA;AAChD;;;AChGA,MAAM,WAAW,EAAE,OAAO,MAAM,YAAmB;CACjD,MAAM,EAAE,OAAO,SAAS,aAAa,SAAS;CAC9C,MAAM,WAAW,gBAAgB;CAEjC,iBAAiB,UAAS,MAAK;EAC7B,SAAS,EAAE,OAAO;EAClB,EAAE,eAAe;CACnB,CAAC;CAED,gBAAgB;EACd,aAAa,SAAS,IAAI;CAC5B,GAAG,CAAC,QAAQ,CAAC;CAEb,IAAI,CAAC,MACH,OAAO;CAGT,OACE,oBAACC,SAAD;EAAgB;EAAS,SAAS;EAAO,OAAO,SAAS,OAAO;CAAU,CAAA;AAE9E;;;ACvBA,MAAM,QAAQC;AAEd,MAAM,WAAW;AACjB,MAAM,UAAUC;AAChB,MAAM,QAAQC"}
@@ -1,8 +1,61 @@
1
1
  import { _ as BindingWidget, d as BindingOptions, f as BindingRegistry, g as BindingType, l as BindingKeyMap, m as BindingRenderMap, u as BindingOption, v as DataAttrNode } from "./validate-DB59Z_Nx.js";
2
2
  import { v as Section } from "./document-Ct4jW78J.js";
3
- import { B as UpdateFailure } from "./index-CHknA6k1.js";
3
+ import { B as UpdateFailure } from "./index-DKYUxi-E.js";
4
4
  import { t as FrameProps } from "./index-DpDU1IAw.js";
5
5
  import { useMultiSelect } from "@jbpark/use-hooks";
6
+ //#region src/components/dnd/canvas/section-fallback-context.d.ts
7
+ interface DndSectionFallbackArgs {
8
+ section: Section;
9
+ reason: 'compile' | 'runtime' | 'forced';
10
+ message?: string;
11
+ }
12
+ type DndRenderSectionFallback = (args: DndSectionFallbackArgs) => React.ReactNode | undefined;
13
+ //#endregion
14
+ //#region src/components/dnd/panel-binding.d.ts
15
+ interface PanelNodeChange {
16
+ (params: {
17
+ id: string;
18
+ label: string;
19
+ property: string;
20
+ value: unknown;
21
+ }): void;
22
+ }
23
+ interface PanelNodesChange {
24
+ (changes: Parameters<PanelNodeChange>[0][]): void;
25
+ }
26
+ interface PanelBinding {
27
+ id: string;
28
+ label: string;
29
+ property: string;
30
+ type?: BindingType;
31
+ widget?: BindingWidget;
32
+ options?: BindingOption[];
33
+ render?: BindingRenderMap;
34
+ min?: number;
35
+ max?: number;
36
+ pattern?: string;
37
+ required?: boolean;
38
+ meta?: Record<string, unknown>;
39
+ value: unknown;
40
+ rawValue: string;
41
+ canEditValue?: boolean;
42
+ present?: boolean;
43
+ element?: PanelBindingElement;
44
+ onChange: (value: unknown) => void;
45
+ }
46
+ interface PanelBindingElement {
47
+ tagName: string;
48
+ text: string;
49
+ }
50
+ type PanelBindingData = Omit<PanelBinding, 'onChange'>;
51
+ interface PanelBindingSource {
52
+ id: string;
53
+ tagName: string;
54
+ bindings: PanelBindingData[];
55
+ }
56
+ declare const resolvePanelBindings: (node: DataAttrNode) => PanelBindingSource | null;
57
+ declare const withPanelCommit: (bindings: PanelBindingData[], commit: PanelNodeChange | undefined) => PanelBinding[];
58
+ //#endregion
6
59
  //#region src/components/dnd/panel/field.d.ts
7
60
  interface FieldProps {
8
61
  binding: PanelBinding;
@@ -61,60 +114,7 @@ interface DndInspector {
61
114
  }
62
115
  declare const useDndInspector: () => DndInspector;
63
116
  //#endregion
64
- //#region src/components/dnd/panel-binding.d.ts
65
- interface PanelNodeChange {
66
- (params: {
67
- id: string;
68
- label: string;
69
- property: string;
70
- value: unknown;
71
- }): void;
72
- }
73
- interface PanelNodesChange {
74
- (changes: Parameters<PanelNodeChange>[0][]): void;
75
- }
76
- interface PanelBinding {
77
- id: string;
78
- label: string;
79
- property: string;
80
- type?: BindingType;
81
- widget?: BindingWidget;
82
- options?: BindingOption[];
83
- render?: BindingRenderMap;
84
- min?: number;
85
- max?: number;
86
- pattern?: string;
87
- required?: boolean;
88
- meta?: Record<string, unknown>;
89
- value: unknown;
90
- rawValue: string;
91
- canEditValue?: boolean;
92
- present?: boolean;
93
- element?: PanelBindingElement;
94
- onChange: (value: unknown) => void;
95
- }
96
- interface PanelBindingElement {
97
- tagName: string;
98
- text: string;
99
- }
100
- type PanelBindingData = Omit<PanelBinding, 'onChange'>;
101
- interface PanelBindingSource {
102
- id: string;
103
- tagName: string;
104
- bindings: PanelBindingData[];
105
- }
106
- declare const resolvePanelBindings: (node: DataAttrNode) => PanelBindingSource | null;
107
- declare const withPanelCommit: (bindings: PanelBindingData[], commit: PanelNodeChange | undefined) => PanelBinding[];
108
- //#endregion
109
- //#region src/components/dnd/section-fallback-context.d.ts
110
- interface DndSectionFallbackArgs {
111
- section: Section;
112
- reason: 'compile' | 'runtime' | 'forced';
113
- message?: string;
114
- }
115
- type DndRenderSectionFallback = (args: DndSectionFallbackArgs) => React.ReactNode | undefined;
116
- //#endregion
117
- //#region src/components/dnd/dnd.d.ts
117
+ //#region src/components/dnd/types.d.ts
118
118
  interface DndPalette {
119
119
  items: Section[];
120
120
  onAdd: (item: Section) => void;
@@ -154,19 +154,9 @@ interface Props extends Omit<React.ComponentPropsWithRef<'div'>, 'onChange'> {
154
154
  onNodePick?: (pick: DndNodePick) => void;
155
155
  children?: React.ReactNode;
156
156
  }
157
- declare const Dnd$1: ({ value: _value, props, modules: _modules, onChange: _onChange, className, items, frame, dynamicTailwind, provider, renderField, onEditError, renderSectionFallback, shouldForceSectionFallback, onBeforeDelete, sectionNameFallback, containerId, bindings: bindingRegistry, bindingKeys, onNodePick, children, ...restProps }: Props) => import("react").JSX.Element;
158
157
  //#endregion
159
- //#region src/components/dnd/draggable.d.ts
160
- interface DraggableItemDragState {
161
- ref: (node: HTMLElement | null) => void;
162
- dragProps: React.HTMLAttributes<HTMLElement>;
163
- isDragging: boolean;
164
- }
165
- interface DraggableItemProps {
166
- item: Section;
167
- children: (drag: DraggableItemDragState) => React.ReactNode;
168
- }
169
- declare const DraggableItem: ({ item, children }: DraggableItemProps) => import("react").ReactNode;
158
+ //#region src/components/dnd/dnd.d.ts
159
+ declare const Dnd$1: ({ value: _value, props, modules: _modules, onChange: _onChange, className, items, frame, dynamicTailwind, provider, renderField, onEditError, renderSectionFallback, shouldForceSectionFallback, onBeforeDelete, sectionNameFallback, containerId, bindings: bindingRegistry, bindingKeys, onNodePick, children, ...restProps }: Props) => import("react").JSX.Element;
170
160
  //#endregion
171
161
  //#region src/components/dnd/layout.d.ts
172
162
  type DndRegionProps = Omit<React.ComponentPropsWithRef<'div'>, 'children'>;
@@ -192,6 +182,18 @@ declare const useDndPalette: () => DndPalette;
192
182
  declare const useDndPanel: () => DndPanel;
193
183
  declare const useDndLayout: () => DndLayout;
194
184
  //#endregion
185
+ //#region src/components/dnd/palette/draggable.d.ts
186
+ interface DraggableItemDragState {
187
+ ref: (node: HTMLElement | null) => void;
188
+ dragProps: React.HTMLAttributes<HTMLElement>;
189
+ isDragging: boolean;
190
+ }
191
+ interface DraggableItemProps {
192
+ item: Section;
193
+ children: (drag: DraggableItemDragState) => React.ReactNode;
194
+ }
195
+ declare const DraggableItem: ({ item, children }: DraggableItemProps) => import("react").ReactNode;
196
+ //#endregion
195
197
  //#region src/components/dnd/panel/use-dnd-children.d.ts
196
198
  interface DndChildrenOptions {
197
199
  onChange?: (value: string) => void;
@@ -319,5 +321,5 @@ type ChildrenEditor = DndChildren;
319
321
  /** @deprecated Renamed to `DndChildrenOptions`. */
320
322
  type ChildrenEditorOptions = DndChildrenOptions;
321
323
  //#endregion
322
- export { DndInspector as $, useDndPanel as A, DndPalette as B, useDndItems as C, DndLayout as D, useDndChildren as E, Palette as F, PanelBinding as G, Props as H, Panel as I, PanelBindingSource as J, PanelBindingData as K, DraggableItem as L, DndLayoutProps as M, DndRegionProps as N, useDndLayout as O, Layout as P, withPanelCommit as Q, DraggableItemDragState as R, DndItemsOptions as S, DndChildrenOptions as T, DndRenderSectionFallback as U, DndPanel as V, DndSectionFallbackArgs as W, PanelNodesChange as X, PanelNodeChange as Y, resolvePanelBindings as Z, DndItemsActions as _, ItemsEditorActions as a, FieldProps as at, DndItemsNestedElement as b, ItemsEditorNestedGroup as c, useItemsEditor as d, DndNodePick as et, FieldKind as f, DndItems as g, isStructuralFieldKind as h, ItemsEditor as i, Field as it, Canvas as j, useDndPalette as k, ItemsEditorOptions as l, getFieldKind as m, ChildrenEditorOptions as n, DndEditError as nt, ItemsEditorItem as o, FieldKindBinding as p, PanelBindingElement as q, Dnd as r, DndRenderField as rt, ItemsEditorNestedElement as s, ChildrenEditor as t, useDndInspector as tt, useChildrenEditor as u, DndItemsExpansion as v, DndChildren as w, DndItemsNestedGroup as x, DndItemsItem as y, DraggableItemProps as z };
323
- //# sourceMappingURL=index-P9Aifaui.d.ts.map
324
+ export { PanelBindingSource as $, DndLayout as A, DndPalette as B, useDndItems as C, DraggableItem as D, useDndChildren as E, DndLayoutProps as F, useDndInspector as G, Props as H, DndRegionProps as I, Field as J, DndEditError as K, Layout as L, useDndPalette as M, useDndPanel as N, DraggableItemDragState as O, Canvas as P, PanelBindingElement as Q, Palette as R, DndItemsOptions as S, DndChildrenOptions as T, DndInspector as U, DndPanel as V, DndNodePick as W, PanelBinding as X, FieldProps as Y, PanelBindingData as Z, DndItemsActions as _, ItemsEditorActions as a, DndSectionFallbackArgs as at, DndItemsNestedElement as b, ItemsEditorNestedGroup as c, useItemsEditor as d, PanelNodeChange as et, FieldKind as f, DndItems as g, isStructuralFieldKind as h, ItemsEditor as i, DndRenderSectionFallback as it, useDndLayout as j, DraggableItemProps as k, ItemsEditorOptions as l, getFieldKind as m, ChildrenEditorOptions as n, resolvePanelBindings as nt, ItemsEditorItem as o, FieldKindBinding as p, DndRenderField as q, Dnd as r, withPanelCommit as rt, ItemsEditorNestedElement as s, ChildrenEditor as t, PanelNodesChange as tt, useChildrenEditor as u, DndItemsExpansion as v, DndChildren as w, DndItemsNestedGroup as x, DndItemsItem as y, Panel as z };
325
+ //# sourceMappingURL=index-C69Lv-jR.d.ts.map
@@ -1,4 +1,4 @@
1
- import { t as LiveMessages } from "./messages-Cp3g1mn1.js";
1
+ import { t as LiveMessages } from "./messages-IBPs4TkZ.js";
2
2
  import React$1 from "react";
3
3
  //#region src/components/error/boundary.d.ts
4
4
  interface Props$3 {
@@ -54,4 +54,4 @@ type ErrorComponent = typeof Error$2 & {
54
54
  declare const Error$1: ErrorComponent;
55
55
  //#endregion
56
56
  export { Props$1 as a, Guard as i, Props as n, Props$2 as o, Runtime as r, ErrorBoundary as s, Error$1 as t };
57
- //# sourceMappingURL=index-vtyggWy0.d.ts.map
57
+ //# sourceMappingURL=index-CRwEhJ7w.d.ts.map
@@ -41,8 +41,7 @@ interface ArrayItem$1 {
41
41
  //#region src/utils/ast/binding.d.ts
42
42
  declare const findEditableChildren: (node: DataAttrNode) => DataAttrNode[];
43
43
  //#endregion
44
- //#region src/utils/ast/value.d.ts
45
- declare const parseValue: (value: unknown) => unknown;
44
+ //#region src/utils/ast/editable-value.d.ts
46
45
  type EditablePathSegment = string | number;
47
46
  type EditablePrimitive = string | number | boolean;
48
47
  interface EditableValueEntry {
@@ -52,6 +51,9 @@ interface EditableValueEntry {
52
51
  declare const flattenEditableValue: (value: string) => EditableValueEntry[] | null;
53
52
  declare const setEditableValue: (value: string, path: EditablePathSegment[], next: EditablePrimitive) => string;
54
53
  //#endregion
54
+ //#region src/utils/ast/value.d.ts
55
+ declare const parseValue: (value: unknown) => unknown;
56
+ //#endregion
55
57
  //#region src/utils/ast/update.d.ts
56
58
  type UpdateFailure = {
57
59
  reason: 'element-not-found';
@@ -82,6 +84,10 @@ type UpdateFailure = {
82
84
  reason: 'attribute-not-found';
83
85
  dataId: string;
84
86
  property: string;
87
+ } | {
88
+ reason: 'self-closing';
89
+ dataId: string;
90
+ property: string;
85
91
  } | {
86
92
  reason: 'unsupported-syntax';
87
93
  dataId: string;
@@ -217,5 +223,5 @@ declare const generateCode: (node: Node) => string;
217
223
  /** @deprecated Internal. Use `clearEditorCaches` from `./utils`. Removed in the next major. */
218
224
  declare const clearExtractCache: typeof clearExtractCache$1;
219
225
  //#endregion
220
- export { removeArrayItems as A, UpdateFailure as B, moveArrayItem as C, parseBindingExpression as D, parseBinding as E, ChildrenAction as F, EditablePathSegment as G, bulkUpdate as H, ChildrenEdit as I, flattenEditableValue as J, EditablePrimitive as K, getChildrenSignatures as L, resolveBindings as M, updateArrayItemProperty as N, parseItems as O, updateArrayItemValue as P, extract as Q, UpdateAllResult as R, isComponentTagName as S, parseArrayExpression as T, update as U, UpdateResult as V, updateAll as W, setEditableValue as X, parseValue as Y, findEditableChildren as Z, generateCode as _, NodeValueType as a, getRegistryBindings as b, canLosslesslyEvaluateSource as c, clone as d, createNodeFromValue as f, fillIds as g, extractObjectProperties as h, ItemKind as i, replaceIds as j, readNodeBindings as k, canStructurallyEditArray as l, extractNodeValue as m, EditableNodeValueType as n, appendArrayItem as o, duplicateArrayItems as p, EditableValueEntry as q, ExtractedNodeValue as r, arrayExpressionToCode as s, ArrayItem as t, clearExtractCache as u, getCurrentValue as v, moveArrayItems as w, getStructuredValue as x, getKeyBindings as y, UpdateEntry as z };
221
- //# sourceMappingURL=index-CHknA6k1.d.ts.map
226
+ export { removeArrayItems as A, UpdateFailure as B, moveArrayItem as C, parseBindingExpression as D, parseBinding as E, ChildrenAction as F, parseValue as G, bulkUpdate as H, ChildrenEdit as I, EditableValueEntry as J, EditablePathSegment as K, getChildrenSignatures as L, resolveBindings as M, updateArrayItemProperty as N, parseItems as O, updateArrayItemValue as P, extract as Q, UpdateAllResult as R, isComponentTagName as S, parseArrayExpression as T, update as U, UpdateResult as V, updateAll as W, setEditableValue as X, flattenEditableValue as Y, findEditableChildren as Z, generateCode as _, NodeValueType as a, getRegistryBindings as b, canLosslesslyEvaluateSource as c, clone as d, createNodeFromValue as f, fillIds as g, extractObjectProperties as h, ItemKind as i, replaceIds as j, readNodeBindings as k, canStructurallyEditArray as l, extractNodeValue as m, EditableNodeValueType as n, appendArrayItem as o, duplicateArrayItems as p, EditablePrimitive as q, ExtractedNodeValue as r, arrayExpressionToCode as s, ArrayItem as t, clearExtractCache as u, getCurrentValue as v, moveArrayItems as w, getStructuredValue as x, getKeyBindings as y, UpdateEntry as z };
227
+ //# sourceMappingURL=index-DKYUxi-E.d.ts.map
@@ -1,4 +1,4 @@
1
- import { n as LiveMessagesInput } from "./messages-Cp3g1mn1.js";
1
+ import { n as LiveMessagesInput } from "./messages-IBPs4TkZ.js";
2
2
  import React from "react";
3
3
  //#region src/components/context/context.d.ts
4
4
  interface Props {
@@ -8,4 +8,4 @@ interface Props {
8
8
  declare const ContextProvider: ({ children, messages }: Props) => React.JSX.Element;
9
9
  //#endregion
10
10
  export { Props as n, ContextProvider as t };
11
- //# sourceMappingURL=index-WQgFy510.d.ts.map
11
+ //# sourceMappingURL=index-DrWtSKXu.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import { d as BindingOptions, f as BindingRegistry, h as BindingSchema, l as BindingKeyMap } from "./validate-DB59Z_Nx.js";
2
- import { i as useLiveMessages, n as LiveMessagesInput, r as defaultMessages, t as LiveMessages } from "./messages-Cp3g1mn1.js";
3
- import { n as Props } from "./index-WQgFy510.js";
2
+ import { i as useLiveMessages, n as LiveMessagesInput, r as defaultMessages, t as LiveMessages } from "./messages-IBPs4TkZ.js";
3
+ import { n as Props } from "./index-DrWtSKXu.js";
4
4
  import { v as Section } from "./document-Ct4jW78J.js";
5
+ import { A as DndLayout, B as DndPalette, H as Props$1, K as DndEditError, L as Layout, P as Canvas, R as Palette, S as DndItemsOptions, U as DndInspector, V as DndPanel, W as DndNodePick, X as PanelBinding, Y as FieldProps, at as DndSectionFallbackArgs, et as PanelNodeChange, g as DndItems, i as ItemsEditor, it as DndRenderSectionFallback, k as DraggableItemProps, l as ItemsEditorOptions, o as ItemsEditorItem, q as DndRenderField, r as Dnd, tt as PanelNodesChange, y as DndItemsItem, z as Panel } from "./index-C69Lv-jR.js";
5
6
  import { t as FrameProps } from "./index-DpDU1IAw.js";
6
- import { $ as DndInspector, B as DndPalette, D as DndLayout, F as Palette, G as PanelBinding, H as Props$1, I as Panel, P as Layout, S as DndItemsOptions, U as DndRenderSectionFallback, V as DndPanel, W as DndSectionFallbackArgs, X as PanelNodesChange, Y as PanelNodeChange, at as FieldProps, et as DndNodePick, g as DndItems, i as ItemsEditor, j as Canvas, l as ItemsEditorOptions, nt as DndEditError, o as ItemsEditorItem, r as Dnd, rt as DndRenderField, y as DndItemsItem, z as DraggableItemProps } from "./index-P9Aifaui.js";
7
7
  import { a as Props$3, n as EditorRenderData, r as Props$2, t as Editor } from "./index-13BDSrQc.js";
8
- import { a as Props$6, n as Props$5, o as Props$4, s as ErrorBoundary, t as Error } from "./index-vtyggWy0.js";
8
+ import { a as Props$6, n as Props$5, o as Props$4, s as ErrorBoundary, t as Error } from "./index-CRwEhJ7w.js";
9
9
  import { n as Preview, r as Props$7 } from "./index-DQkL37eL.js";
10
10
  //#region src/index.d.ts
11
11
  declare const App: {
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { i as useLiveMessages, n as defaultMessages } from "./messages-CzUPVnzH.js";
2
- import { t as ContextProvider } from "./context-DsEXJl4h.js";
3
- import { t as Dnd } from "./dnd-DGNp20Nk.js";
4
- import { t as Editor } from "./editor-DQ8Q--qR.js";
5
- import { t as Error } from "./error-DwqwjJ2C.js";
6
- import { t as Preview } from "./preview-BKFgq_5u.js";
1
+ import { i as useLiveMessages, n as defaultMessages } from "./messages-CSrMI4Rm.js";
2
+ import { t as ContextProvider } from "./context-B8MzP7_p.js";
3
+ import { t as Dnd } from "./dnd-UoJILA75.js";
4
+ import { t as Editor } from "./editor-CMElfHer.js";
5
+ import { t as Error } from "./error-CN_GCnXB.js";
6
+ import { t as Preview } from "./preview-CtyG5UbH.js";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/index.tsx
9
9
  const App = ({ children, messages }) => {