@burger-editor/client 4.0.0-alpha.76 → 4.0.0-alpha.77

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 (44) hide show
  1. package/dist/burger-editor-root.d.ts +1 -1
  2. package/dist/client.js +10554 -10286
  3. package/dist/client.js.map +1 -1
  4. package/dist/components/block-catalog.d.ts +1 -1
  5. package/dist/components/block-menu-button.d.ts +1 -1
  6. package/dist/components/block-menu-view.d.ts +1 -1
  7. package/dist/components/block-menu.d.ts +1 -1
  8. package/dist/components/block-menu.d.ts.map +1 -1
  9. package/dist/components/block-options.d.ts +1 -1
  10. package/dist/components/draft-switcher.d.ts +1 -1
  11. package/dist/components/editable-area-view.d.ts +1 -1
  12. package/dist/components/editable-area-view.d.ts.map +1 -1
  13. package/dist/components/file-list.d.ts +1 -1
  14. package/dist/components/file-uploader.d.ts +1 -1
  15. package/dist/components/front-matter-editor.d.ts +1 -1
  16. package/dist/components/initial-insertion-button.d.ts +1 -1
  17. package/dist/components/item-editor-host.d.ts +1 -1
  18. package/dist/components/preview.d.ts +1 -1
  19. package/dist/components/table-editor.d.ts +1 -1
  20. package/dist/components/tabs.d.ts +1 -1
  21. package/dist/components/thumbnail.d.ts +1 -1
  22. package/dist/components/wysiwyg-field.d.ts +1 -1
  23. package/dist/{editable-area-view-S2Uz7pl8.js → editable-area-view-BRYT222Y.js} +174 -159
  24. package/dist/editable-area-view-BRYT222Y.js.map +1 -0
  25. package/dist/editor-dialog.d.ts +1 -1
  26. package/dist/{engine-context-D0zt6fhJ.js → engine-context-j4-LLPEh.js} +201 -74
  27. package/dist/engine-context-j4-LLPEh.js.map +1 -0
  28. package/dist/engine-context.d.ts +9 -6
  29. package/dist/engine-context.d.ts.map +1 -1
  30. package/dist/form/checkbox.d.ts +1 -1
  31. package/dist/form/fieldset.d.ts +1 -1
  32. package/dist/form/number-field.d.ts +1 -1
  33. package/dist/form/radio-group.d.ts +1 -1
  34. package/dist/form/select-field.d.ts +1 -1
  35. package/dist/form/text-area.d.ts +1 -1
  36. package/dist/form/text-field.d.ts +1 -1
  37. package/dist/root-error-boundary.d.ts +1 -1
  38. package/dist/testing/render-with-engine.d.ts +1 -1
  39. package/dist/testing.js +1 -1
  40. package/dist/ui.js +10 -10
  41. package/dist/ui.js.map +1 -1
  42. package/package.json +11 -11
  43. package/dist/editable-area-view-S2Uz7pl8.js.map +0 -1
  44. package/dist/engine-context-D0zt6fhJ.js.map +0 -1
@@ -5,9 +5,9 @@ import { ReactNode } from 'react';
5
5
  * rendered under a `BurgerEditorRoot` / editable-area tree reads the engine
6
6
  * through {@link useEngine} instead of taking it as a prop — this is the
7
7
  * single dependency-injection point for the whole client UI.
8
- * @param root0
9
- * @param root0.engine
10
- * @param root0.children
8
+ * @param root0 - Provider props
9
+ * @param root0.engine - The engine instance to expose to the subtree
10
+ * @param root0.children - The subtree that reads the engine
11
11
  * @example
12
12
  * ```tsx
13
13
  * <EngineProvider engine={engine}>
@@ -30,9 +30,12 @@ export declare function EngineProvider({ engine, children, }: {
30
30
  * @throws {Error} When called outside an `EngineProvider`
31
31
  * @example
32
32
  * ```tsx
33
- * function MyField() {
34
- * const engine = useEngine();
35
- * return <button onClick={() => engine.save()}>Save</button>;
33
+ * function SamplePreview() {
34
+ * const { config } = useEngine();
35
+ * if (!config.sampleImagePath) {
36
+ * return null;
37
+ * }
38
+ * return <img src={config.sampleImagePath} alt="" />;
36
39
  * }
37
40
  * ```
38
41
  */
@@ -1 +1 @@
1
- {"version":3,"file":"engine-context.d.ts","sourceRoot":"","sources":["../src/engine-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,EAC9B,MAAM,EACN,QAAQ,GACR,EAAE;IACF,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC7B,sGAEA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,IAAI,kBAAkB,CAM9C"}
1
+ {"version":3,"file":"engine-context.d.ts","sourceRoot":"","sources":["../src/engine-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,EAC9B,MAAM,EACN,QAAQ,GACR,EAAE;IACF,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC7B,sGAEA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,SAAS,IAAI,kBAAkB,CAM9C"}
@@ -30,5 +30,5 @@ export declare function Checkbox({ label, checked, onChange, name, disabled, des
30
30
  readonly name?: string;
31
31
  readonly disabled?: boolean;
32
32
  readonly describedBy?: string;
33
- }): import("react").JSX.Element;
33
+ }): import('react').JSX.Element;
34
34
  //# sourceMappingURL=checkbox.d.ts.map
@@ -27,5 +27,5 @@ export declare function Fieldset({ legend, id, disabled, children, }: {
27
27
  readonly id?: string;
28
28
  readonly disabled?: boolean;
29
29
  readonly children: ReactNode;
30
- }): import("react").JSX.Element;
30
+ }): import('react').JSX.Element;
31
31
  //# sourceMappingURL=fieldset.d.ts.map
@@ -33,5 +33,5 @@ export declare function NumberField({ label, value, onChange, name, min, max, st
33
33
  readonly max?: number;
34
34
  readonly step?: number;
35
35
  readonly disabled?: boolean;
36
- }): import("react").JSX.Element;
36
+ }): import('react').JSX.Element;
37
37
  //# sourceMappingURL=number-field.d.ts.map
@@ -34,5 +34,5 @@ export declare function RadioGroup({ label, value, onChange, options, name, disa
34
34
  readonly options: readonly SelectableValue[];
35
35
  readonly name?: string;
36
36
  readonly disabled?: boolean;
37
- }): import("react").JSX.Element;
37
+ }): import('react').JSX.Element;
38
38
  //# sourceMappingURL=radio-group.d.ts.map
@@ -34,5 +34,5 @@ export declare function SelectField({ label, value, onChange, options, name, dis
34
34
  readonly options: readonly SelectableValue[];
35
35
  readonly name?: string;
36
36
  readonly disabled?: boolean;
37
- }): import("react").JSX.Element;
37
+ }): import('react').JSX.Element;
38
38
  //# sourceMappingURL=select-field.d.ts.map
@@ -29,5 +29,5 @@ export declare function TextArea({ label, value, onChange, name, rows, disabled,
29
29
  readonly name?: string;
30
30
  readonly rows?: number;
31
31
  readonly disabled?: boolean;
32
- }): import("react").JSX.Element;
32
+ }): import('react').JSX.Element;
33
33
  //# sourceMappingURL=text-area.d.ts.map
@@ -33,5 +33,5 @@ export declare function TextField({ label, value, onChange, type, name, disabled
33
33
  readonly disabled?: boolean;
34
34
  readonly placeholder?: string;
35
35
  readonly describedBy?: string;
36
- }): import("react").JSX.Element;
36
+ }): import('react').JSX.Element;
37
37
  //# sourceMappingURL=text-field.d.ts.map
@@ -30,5 +30,5 @@ export declare function reportRenderError(engine: BurgerEditorEngine, error: unk
30
30
  */
31
31
  export declare function RootErrorBoundary({ children }: {
32
32
  readonly children: ReactNode;
33
- }): import("react").JSX.Element;
33
+ }): import('react').JSX.Element;
34
34
  //# sourceMappingURL=root-error-boundary.d.ts.map
@@ -16,5 +16,5 @@ import { ReactElement } from 'react';
16
16
  * renderWithEngine(engine, <FileList fileType="image" />);
17
17
  * ```
18
18
  */
19
- export declare function renderWithEngine(engine: BurgerEditorEngine, ui: ReactElement, options?: RenderOptions): import('@testing-library/react').RenderResult<typeof import("@testing-library/dom/types/queries.js"), HTMLElement, HTMLElement>;
19
+ export declare function renderWithEngine(engine: BurgerEditorEngine, ui: ReactElement, options?: RenderOptions): import('@testing-library/react').RenderResult<typeof import('@testing-library/dom/types/queries.js'), HTMLElement, HTMLElement>;
20
20
  //# sourceMappingURL=render-with-engine.d.ts.map
package/dist/testing.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as UIStateStore, c as CommandBus, t as EngineProvider } from "./engine-context-D0zt6fhJ.js";
1
+ import { a as UIStateStore, c as CommandBus, t as EngineProvider } from "./engine-context-j4-LLPEh.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { render } from "@testing-library/react";
4
4
  import { afterEach, beforeEach, vi } from "vitest";
package/dist/ui.js CHANGED
@@ -1,11 +1,11 @@
1
- import { d as formatDate, n as useEngine, t as EngineProvider, u as formatByteSize } from "./engine-context-D0zt6fhJ.js";
2
- import { _ as IconTrash, a as BlockMenuButton, c as reportRenderError, d as registerEngineCommands, f as useUIState, g as BlockCatalog, h as BlockOptions, i as BlockMenuView, l as reactMount, m as EditorDialog, n as InitialInsertionButton, o as useCommand, p as ItemEditorHost, r as BlockMenu, s as RootErrorBoundary, t as EditableAreaView, u as DraftSwitcher, v as IconRowInsertBottom, y as createReactComponent } from "./editable-area-view-S2Uz7pl8.js";
1
+ import { d as formatDate, n as useEngine, t as EngineProvider, u as formatByteSize } from "./engine-context-j4-LLPEh.js";
2
+ import { _ as IconTrash, a as BlockMenuButton, c as reportRenderError, d as registerEngineCommands, f as useUIState, g as BlockCatalog, h as BlockOptions, i as BlockMenuView, l as reactMount, m as EditorDialog, n as InitialInsertionButton, o as useCommand, p as ItemEditorHost, r as BlockMenu, s as RootErrorBoundary, t as EditableAreaView, u as DraftSwitcher, v as IconRowInsertBottom, y as createReactComponent } from "./editable-area-view-BRYT222Y.js";
3
3
  import { c } from "react/compiler-runtime";
4
4
  import { Fragment, use, useDeferredValue, useEffect, useEffectEvent, useId, useRef, useState, useSyncExternalStore, useTransition } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { createRoot } from "react-dom/client";
7
7
  /**
8
- * @license @tabler/icons-react v3.46.0 - MIT
8
+ * @license @tabler/icons-react v3.48.0 - MIT
9
9
  *
10
10
  * This source code is licensed under the MIT license.
11
11
  * See the LICENSE file in the root directory of this source tree.
@@ -37,7 +37,7 @@ var IconArrowsTransferDown = createReactComponent("outline", "arrows-transfer-do
37
37
  }]
38
38
  ]);
39
39
  /**
40
- * @license @tabler/icons-react v3.46.0 - MIT
40
+ * @license @tabler/icons-react v3.48.0 - MIT
41
41
  *
42
42
  * This source code is licensed under the MIT license.
43
43
  * See the LICENSE file in the root directory of this source tree.
@@ -65,7 +65,7 @@ var IconFileTypeDoc = createReactComponent("outline", "file-type-doc", "FileType
65
65
  }]
66
66
  ]);
67
67
  /**
68
- * @license @tabler/icons-react v3.46.0 - MIT
68
+ * @license @tabler/icons-react v3.48.0 - MIT
69
69
  *
70
70
  * This source code is licensed under the MIT license.
71
71
  * See the LICENSE file in the root directory of this source tree.
@@ -97,7 +97,7 @@ var IconFileTypePdf = createReactComponent("outline", "file-type-pdf", "FileType
97
97
  }]
98
98
  ]);
99
99
  /**
100
- * @license @tabler/icons-react v3.46.0 - MIT
100
+ * @license @tabler/icons-react v3.48.0 - MIT
101
101
  *
102
102
  * This source code is licensed under the MIT license.
103
103
  * See the LICENSE file in the root directory of this source tree.
@@ -133,7 +133,7 @@ var IconFileTypePpt = createReactComponent("outline", "file-type-ppt", "FileType
133
133
  }]
134
134
  ]);
135
135
  /**
136
- * @license @tabler/icons-react v3.46.0 - MIT
136
+ * @license @tabler/icons-react v3.48.0 - MIT
137
137
  *
138
138
  * This source code is licensed under the MIT license.
139
139
  * See the LICENSE file in the root directory of this source tree.
@@ -165,7 +165,7 @@ var IconFileTypeXls = createReactComponent("outline", "file-type-xls", "FileType
165
165
  }]
166
166
  ]);
167
167
  /**
168
- * @license @tabler/icons-react v3.46.0 - MIT
168
+ * @license @tabler/icons-react v3.48.0 - MIT
169
169
  *
170
170
  * This source code is licensed under the MIT license.
171
171
  * See the LICENSE file in the root directory of this source tree.
@@ -178,7 +178,7 @@ var IconFile = createReactComponent("outline", "file", "File", [["path", {
178
178
  "key": "svg-1"
179
179
  }]]);
180
180
  /**
181
- * @license @tabler/icons-react v3.46.0 - MIT
181
+ * @license @tabler/icons-react v3.48.0 - MIT
182
182
  *
183
183
  * This source code is licensed under the MIT license.
184
184
  * See the LICENSE file in the root directory of this source tree.
@@ -198,7 +198,7 @@ var IconHeadphones = createReactComponent("outline", "headphones", "Headphones",
198
198
  }]
199
199
  ]);
200
200
  /**
201
- * @license @tabler/icons-react v3.46.0 - MIT
201
+ * @license @tabler/icons-react v3.48.0 - MIT
202
202
  *
203
203
  * This source code is licensed under the MIT license.
204
204
  * See the LICENSE file in the root directory of this source tree.