@burger-editor/client 4.0.0-alpha.7 → 4.0.0-alpha.71

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 (93) hide show
  1. package/README.md +153 -2
  2. package/dist/animate-insertion.d.ts +17 -0
  3. package/dist/animate-insertion.d.ts.map +1 -0
  4. package/dist/burger-editor-root.d.ts +11 -0
  5. package/dist/burger-editor-root.d.ts.map +1 -0
  6. package/dist/client.css +851 -577
  7. package/dist/client.js +32941 -13779
  8. package/dist/client.js.map +1 -1
  9. package/dist/commands/register-engine-commands.d.ts +17 -0
  10. package/dist/commands/register-engine-commands.d.ts.map +1 -0
  11. package/dist/components/block-catalog.d.ts +20 -0
  12. package/dist/components/block-catalog.d.ts.map +1 -0
  13. package/dist/components/block-menu-button.d.ts +28 -0
  14. package/dist/components/block-menu-button.d.ts.map +1 -0
  15. package/dist/components/block-menu.d.ts +23 -0
  16. package/dist/components/block-menu.d.ts.map +1 -0
  17. package/dist/components/block-options.d.ts +25 -0
  18. package/dist/components/block-options.d.ts.map +1 -0
  19. package/dist/components/draft-switcher.d.ts +23 -0
  20. package/dist/components/draft-switcher.d.ts.map +1 -0
  21. package/dist/components/editable-area-view.d.ts +44 -0
  22. package/dist/components/editable-area-view.d.ts.map +1 -0
  23. package/dist/components/file-list.d.ts +19 -0
  24. package/dist/components/file-list.d.ts.map +1 -0
  25. package/dist/components/file-uploader.d.ts +18 -0
  26. package/dist/components/file-uploader.d.ts.map +1 -0
  27. package/dist/components/index.d.ts +16 -0
  28. package/dist/components/index.d.ts.map +1 -0
  29. package/dist/components/initial-insertion-button.d.ts +10 -0
  30. package/dist/components/initial-insertion-button.d.ts.map +1 -0
  31. package/dist/components/item-editor-host.d.ts +23 -0
  32. package/dist/components/item-editor-host.d.ts.map +1 -0
  33. package/dist/components/preview.d.ts +18 -0
  34. package/dist/components/preview.d.ts.map +1 -0
  35. package/dist/components/table-editor.d.ts +28 -0
  36. package/dist/components/table-editor.d.ts.map +1 -0
  37. package/dist/components/tabs.d.ts +27 -0
  38. package/dist/components/tabs.d.ts.map +1 -0
  39. package/dist/components/thumbnail.d.ts +17 -0
  40. package/dist/components/thumbnail.d.ts.map +1 -0
  41. package/dist/components/wysiwyg-field.d.ts +40 -0
  42. package/dist/components/wysiwyg-field.d.ts.map +1 -0
  43. package/dist/editor-dialog.d.ts +41 -0
  44. package/dist/editor-dialog.d.ts.map +1 -0
  45. package/dist/form/checkbox.d.ts +34 -0
  46. package/dist/form/checkbox.d.ts.map +1 -0
  47. package/dist/form/fieldset.d.ts +31 -0
  48. package/dist/form/fieldset.d.ts.map +1 -0
  49. package/dist/form/index.d.ts +8 -0
  50. package/dist/form/index.d.ts.map +1 -0
  51. package/dist/form/number-field.d.ts +37 -0
  52. package/dist/form/number-field.d.ts.map +1 -0
  53. package/dist/form/radio-group.d.ts +38 -0
  54. package/dist/form/radio-group.d.ts.map +1 -0
  55. package/dist/form/select-field.d.ts +38 -0
  56. package/dist/form/select-field.d.ts.map +1 -0
  57. package/dist/form/text-area.d.ts +33 -0
  58. package/dist/form/text-area.d.ts.map +1 -0
  59. package/dist/form/text-field.d.ts +35 -0
  60. package/dist/form/text-field.d.ts.map +1 -0
  61. package/dist/index.d.ts +34 -3
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/initial-insertion-button-DMGBvuDE.js +9147 -0
  64. package/dist/initial-insertion-button-DMGBvuDE.js.map +1 -0
  65. package/dist/invoker-commands.d.ts +24 -0
  66. package/dist/invoker-commands.d.ts.map +1 -0
  67. package/dist/mount.d.ts +18 -0
  68. package/dist/mount.d.ts.map +1 -0
  69. package/dist/replace-element.d.ts.map +1 -1
  70. package/dist/ui.d.ts +10 -0
  71. package/dist/ui.d.ts.map +1 -0
  72. package/dist/ui.js +989 -0
  73. package/dist/ui.js.map +1 -0
  74. package/dist/use-command.d.ts +29 -0
  75. package/dist/use-command.d.ts.map +1 -0
  76. package/dist/use-engine.d.ts +53 -0
  77. package/dist/use-engine.d.ts.map +1 -0
  78. package/dist/view/create-react-view.d.ts +17 -0
  79. package/dist/view/create-react-view.d.ts.map +1 -0
  80. package/package.json +29 -15
  81. package/dist/block-catalog.svelte.d.ts +0 -1
  82. package/dist/block-menu-button.svelte.d.ts +0 -1
  83. package/dist/block-menu.svelte.d.ts +0 -1
  84. package/dist/block-options.svelte.d.ts +0 -1
  85. package/dist/draft-switcher.svelte.d.ts +0 -1
  86. package/dist/file-list.svelte.d.ts +0 -1
  87. package/dist/file-uploader.svelte.d.ts +0 -1
  88. package/dist/preview.svelte.d.ts +0 -1
  89. package/dist/svelte-mount.d.ts +0 -10
  90. package/dist/svelte-mount.d.ts.map +0 -1
  91. package/dist/table-editor.svelte.d.ts +0 -1
  92. package/dist/tabs.svelte.d.ts +0 -1
  93. package/dist/thumbnail.svelte.d.ts +0 -1
@@ -0,0 +1,17 @@
1
+ import { BlockCatalog, BurgerEditorEngine } from '@burger-editor/core';
2
+ /**
3
+ * Register the engine's central command dispatch table.
4
+ *
5
+ * This is the single place where engine-mutating UI commands are
6
+ * implemented; buttons anywhere (main document or EditableArea iframes)
7
+ * declare them with `commandfor={COMMAND_BUS_ID}`. Call once per engine.
8
+ * @param engine - The engine instance
9
+ * @param catalog - The block catalog used by `--add-block`
10
+ * @example
11
+ * ```ts
12
+ * const engine = await BurgerEditorEngine.new(options);
13
+ * registerEngineCommands(engine, options.catalog);
14
+ * ```
15
+ */
16
+ export declare function registerEngineCommands(engine: BurgerEditorEngine, catalog: BlockCatalog): void;
17
+ //# sourceMappingURL=register-engine-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-engine-commands.d.ts","sourceRoot":"","sources":["../../src/commands/register-engine-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAM5E;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CACrC,MAAM,EAAE,kBAAkB,EAC1B,OAAO,EAAE,YAAY,QA+LrB"}
@@ -0,0 +1,20 @@
1
+ import { BlockCatalog as BlockCatalogData, BurgerEditorEngine } from '@burger-editor/core';
2
+ /**
3
+ * Block catalog dialog content. Adding and pasting blocks are declared
4
+ * as engine commands; the catalog entry is identified by
5
+ * `data-category` / `data-index` on the invoker button.
6
+ * @param root0
7
+ * @param root0.engine
8
+ * @param root0.catalog
9
+ * @example
10
+ * ```tsx
11
+ * <EditorDialog name="catalog" open={open} onClose={close} buttons={{ close: 'キャンセル' }}>
12
+ * <BlockCatalog engine={engine} catalog={engine.catalog} />
13
+ * </EditorDialog>
14
+ * ```
15
+ */
16
+ export declare function BlockCatalog({ engine, catalog, }: {
17
+ readonly engine: BurgerEditorEngine;
18
+ readonly catalog: BlockCatalogData;
19
+ }): import("react").JSX.Element;
20
+ //# sourceMappingURL=block-catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block-catalog.d.ts","sourceRoot":"","sources":["../../src/components/block-catalog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,YAAY,IAAI,gBAAgB,EAChC,kBAAkB,EAClB,MAAM,qBAAqB,CAAC;AAQ7B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,EAC5B,MAAM,EACN,OAAO,GACP,EAAE;IACF,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;CACnC,+BA6DA"}
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Icon button of the block menu with an anchored tooltip. The action is
4
+ * declared with the Invoker Commands API instead of a click handler.
5
+ * @param root0
6
+ * @param root0.label
7
+ * @param root0.command
8
+ * @param root0.commandfor
9
+ * @param root0.value
10
+ * @param root0.children
11
+ * @example
12
+ * ```tsx
13
+ * <BlockMenuButton
14
+ * label="ブロックを削除"
15
+ * command={BGE_COMMAND.removeBlock}
16
+ * commandfor={COMMAND_BUS_ID}>
17
+ * <IconTrash />
18
+ * </BlockMenuButton>
19
+ * ```
20
+ */
21
+ export declare function BlockMenuButton({ label, command, commandfor, value, children, }: {
22
+ readonly label: string;
23
+ readonly command: string;
24
+ readonly commandfor: string;
25
+ readonly value?: string;
26
+ readonly children: ReactNode;
27
+ }): import("react").JSX.Element;
28
+ //# sourceMappingURL=block-menu-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block-menu-button.d.ts","sourceRoot":"","sources":["../../src/components/block-menu-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAMtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,EAC/B,KAAK,EACL,OAAO,EACP,UAAU,EACV,KAAK,EACL,QAAQ,GACR,EAAE;IACF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC7B,+BAiBA"}
@@ -0,0 +1,23 @@
1
+ import { BurgerEditorEngine } from '@burger-editor/core';
2
+ /**
3
+ * Hover menu over the selected block inside the editable area iframe.
4
+ * Block operations are declared as engine commands; positioning and
5
+ * visibility are React state owned entirely by this component — the
6
+ * single source of truth. While `engine.uiState.processing` is true the
7
+ * menu hides itself by subscribing to the store; nothing outside React
8
+ * ever writes this component's `hidden` attribute (a direct DOM write
9
+ * would leave React's `visible` state out of sync and a later same-value
10
+ * `setVisible(true)` would be skipped, leaving the menu stuck hidden).
11
+ * @param root0
12
+ * @param root0.engine
13
+ * @param root0.container
14
+ * @example
15
+ * ```tsx
16
+ * <BlockMenu engine={engine} container={frameBody} />
17
+ * ```
18
+ */
19
+ export declare function BlockMenu({ engine, container, }: {
20
+ readonly engine: BurgerEditorEngine;
21
+ readonly container: HTMLElement;
22
+ }): import("react").JSX.Element;
23
+ //# sourceMappingURL=block-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block-menu.d.ts","sourceRoot":"","sources":["../../src/components/block-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,kBAAkB,EAAY,MAAM,qBAAqB,CAAC;AA2CrF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,EACzB,MAAM,EACN,SAAS,GACT,EAAE;IACF,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;CAChC,+BAgSA"}
@@ -0,0 +1,25 @@
1
+ import { BurgerBlock, BurgerEditorEngine } from '@burger-editor/core';
2
+ /**
3
+ * Block options dialog content. Values are read out of the dialog form
4
+ * on submit (uncontrolled, `name="bge-options-*"`); only the fields that
5
+ * drive conditional rendering are controlled.
6
+ * @param root0
7
+ * @param root0.engine
8
+ * @param root0.block
9
+ * @example
10
+ * ```tsx
11
+ * <EditorDialog
12
+ * name="options"
13
+ * open={block !== null}
14
+ * onClose={close}
15
+ * onComplete={(formData) => applyBlockOptions(block, formData)}
16
+ * buttons={{ close: 'キャンセル', complete: '決定' }}>
17
+ * {block ? <BlockOptions engine={engine} block={block} /> : null}
18
+ * </EditorDialog>
19
+ * ```
20
+ */
21
+ export declare function BlockOptions({ engine, block, }: {
22
+ readonly engine: BurgerEditorEngine;
23
+ readonly block: BurgerBlock;
24
+ }): import("react").JSX.Element;
25
+ //# sourceMappingURL=block-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block-options.d.ts","sourceRoot":"","sources":["../../src/components/block-options.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAU3E;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAAC,EAC5B,MAAM,EACN,KAAK,GACL,EAAE;IACF,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC5B,+BA8RA"}
@@ -0,0 +1,23 @@
1
+ import { BurgerEditorEngine } from '@burger-editor/core';
2
+ /**
3
+ * Main/draft content switcher. Switching and copying are declared as
4
+ * engine commands; the pressed state follows the engine's
5
+ * `bge:switch-content` event and the source-view indicator follows
6
+ * `engine.uiState.sourceMode` — no state is duplicated locally.
7
+ *
8
+ * The alt+double-click source-view toggle is kept as a DOM event —
9
+ * double-click has no Invoker Commands equivalent (the no-click rule
10
+ * targets single-click activation).
11
+ * @param root0
12
+ * @param root0.engine
13
+ * @example
14
+ * ```tsx
15
+ * const container = document.createElement('div');
16
+ * engine.viewArea.insertAdjacentElement('beforebegin', container);
17
+ * reactMount(<DraftSwitcher engine={engine} />, container);
18
+ * ```
19
+ */
20
+ export declare function DraftSwitcher({ engine }: {
21
+ readonly engine: BurgerEditorEngine;
22
+ }): import("react").JSX.Element;
23
+ //# sourceMappingURL=draft-switcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft-switcher.d.ts","sourceRoot":"","sources":["../../src/components/draft-switcher.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAS9D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAA;CAAE,+BA+EhF"}
@@ -0,0 +1,44 @@
1
+ import { BurgerEditorEngine, EditableAreaHost, EditableAreaType } from '@burger-editor/core';
2
+ /**
3
+ * The React shell of one editable area: the iframe hosting the edited
4
+ * content, the HTML source textarea, and the in-frame UI islands
5
+ * (block menu, initial insertion button) rendered through a portal.
6
+ *
7
+ * All presentation state is React state derived from `engine.uiState`
8
+ * and engine events — the engine never touches this component's DOM.
9
+ * The iframe is rendered unconditionally at a fixed position in the
10
+ * tree (visibility is `hidden` only) because unmounting an iframe
11
+ * destroys its document, and the engine owns the content inside it.
12
+ * @param root0
13
+ * @param root0.engine
14
+ * @param root0.type
15
+ * @param root0.initialContent
16
+ * @param root0.stylesheets
17
+ * @param root0.classList
18
+ * @param root0.onReady
19
+ * @example
20
+ * ```tsx
21
+ * root.render(
22
+ * <EditableAreaView
23
+ * engine={engine}
24
+ * type="main"
25
+ * initialContent={html}
26
+ * stylesheets={stylesheets}
27
+ * classList={classList}
28
+ * onReady={(host) => resolve(host)}
29
+ * />,
30
+ * );
31
+ * ```
32
+ */
33
+ export declare function EditableAreaView({ engine, type, initialContent, stylesheets, classList, onReady, }: {
34
+ readonly engine: BurgerEditorEngine;
35
+ readonly type: EditableAreaType;
36
+ readonly initialContent: string;
37
+ readonly stylesheets: readonly {
38
+ readonly path: string;
39
+ readonly id: string;
40
+ }[];
41
+ readonly classList: readonly string[];
42
+ readonly onReady: (host: EditableAreaHost) => void;
43
+ }): import("react").JSX.Element;
44
+ //# sourceMappingURL=editable-area-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editable-area-view.d.ts","sourceRoot":"","sources":["../../src/components/editable-area-view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,qBAAqB,CAAC;AAgB7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,gBAAgB,CAAC,EAChC,MAAM,EACN,IAAI,EACJ,cAAc,EACd,WAAW,EACX,SAAS,EACT,OAAO,GACP,EAAE;IACF,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAChF,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACnD,+BAoMA"}
@@ -0,0 +1,19 @@
1
+ import { BurgerEditorEngine, FileType } from '@burger-editor/core';
2
+ /**
3
+ * Paginated, searchable file list. Selection is broadcast on the
4
+ * engine-level component observer (`file-select`); buttons declare local
5
+ * commands instead of click handlers.
6
+ * @param root0
7
+ * @param root0.engine
8
+ * @param root0.fileType
9
+ * @example
10
+ * ```tsx
11
+ * <FileUploader engine={engine} fileType="image" />
12
+ * <FileList engine={engine} fileType="image" />
13
+ * ```
14
+ */
15
+ export declare function FileList({ engine, fileType, }: {
16
+ readonly engine: BurgerEditorEngine;
17
+ readonly fileType: FileType;
18
+ }): import("react").JSX.Element;
19
+ //# sourceMappingURL=file-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-list.d.ts","sourceRoot":"","sources":["../../src/components/file-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAgB,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAYtF;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,EACxB,MAAM,EACN,QAAQ,GACR,EAAE;IACF,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC5B,+BA6OA"}
@@ -0,0 +1,18 @@
1
+ import { BurgerEditorEngine, FileType } from '@burger-editor/core';
2
+ /**
3
+ * File upload control. The trigger button declares a local command and
4
+ * the handler opens the picker via `showPicker()` — no click handlers,
5
+ * no programmatic `click()`.
6
+ * @param root0
7
+ * @param root0.engine
8
+ * @param root0.fileType
9
+ * @example
10
+ * ```tsx
11
+ * <FileUploader engine={engine} fileType="image" />
12
+ * ```
13
+ */
14
+ export declare function FileUploader({ engine, fileType, }: {
15
+ readonly engine: BurgerEditorEngine;
16
+ readonly fileType: FileType;
17
+ }): import("react").JSX.Element;
18
+ //# sourceMappingURL=file-uploader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-uploader.d.ts","sourceRoot":"","sources":["../../src/components/file-uploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAQxE;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,EAC5B,MAAM,EACN,QAAQ,GACR,EAAE;IACF,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC5B,+BAsEA"}
@@ -0,0 +1,16 @@
1
+ export { BlockCatalog } from './block-catalog.js';
2
+ export { BlockMenu } from './block-menu.js';
3
+ export { BlockMenuButton } from './block-menu-button.js';
4
+ export { BlockOptions } from './block-options.js';
5
+ export { DraftSwitcher } from './draft-switcher.js';
6
+ export { FileList } from './file-list.js';
7
+ export { FileUploader } from './file-uploader.js';
8
+ export { InitialInsertionButton } from './initial-insertion-button.js';
9
+ export { ItemEditorHost } from './item-editor-host.js';
10
+ export { Preview } from './preview.js';
11
+ export { TableEditor } from './table-editor.js';
12
+ export type { TableEditorData } from './table-editor.js';
13
+ export { Tabs } from './tabs.js';
14
+ export { Thumbnail } from './thumbnail.js';
15
+ export { WysiwygField } from './wysiwyg-field.js';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Button shown in an empty editable area to insert the first block.
3
+ * Declares the engine command instead of taking a callback.
4
+ * @example
5
+ * ```tsx
6
+ * reactMount(<InitialInsertionButton />, container);
7
+ * ```
8
+ */
9
+ export declare function InitialInsertionButton(): import("react").JSX.Element;
10
+ //# sourceMappingURL=initial-insertion-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initial-insertion-button.d.ts","sourceRoot":"","sources":["../../src/components/initial-insertion-button.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,gCAUrC"}
@@ -0,0 +1,23 @@
1
+ import { BurgerEditorEngine, Item, ItemData } from '@burger-editor/core';
2
+ type AnyItem = Item<ItemData, {}>;
3
+ /**
4
+ * Declarative item editor dialog. Renders the item's `Editor` component
5
+ * with editor state derived via `toEditorState`; on submit the state is
6
+ * converted back with `toItemData` and imported into the item.
7
+ * @param root0
8
+ * @param root0.engine
9
+ * @param root0.item
10
+ * @example
11
+ * ```tsx
12
+ * <ItemEditorHost
13
+ * engine={engine}
14
+ * item={open?.type === 'item-editor' ? open.item : null}
15
+ * />
16
+ * ```
17
+ */
18
+ export declare function ItemEditorHost({ engine, item, }: {
19
+ readonly engine: BurgerEditorEngine;
20
+ readonly item: AnyItem | null;
21
+ }): import("react").JSX.Element;
22
+ export {};
23
+ //# sourceMappingURL=item-editor-host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-editor-host.d.ts","sourceRoot":"","sources":["../../src/components/item-editor-host.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAClB,IAAI,EACJ,QAAQ,EAER,MAAM,qBAAqB,CAAC;AAQ7B,KAAK,OAAO,GAAG,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAGlC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,EAC9B,MAAM,EACN,IAAI,GACJ,EAAE;IACF,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;CAC9B,+BAqBA"}
@@ -0,0 +1,18 @@
1
+ import { BurgerEditorEngine } from '@burger-editor/core';
2
+ /**
3
+ * File preview pane. The previewed path comes from the parent (lifted
4
+ * from the old `file-select` observer event); upload progress stays on
5
+ * the engine-level component observer.
6
+ * @param root0
7
+ * @param root0.engine
8
+ * @param root0.path
9
+ * @example
10
+ * ```tsx
11
+ * <Preview engine={engine} path={state.path ?? ''} />
12
+ * ```
13
+ */
14
+ export declare function Preview({ engine, path, }: {
15
+ readonly engine: BurgerEditorEngine;
16
+ readonly path: string;
17
+ }): import("react").JSX.Element;
18
+ //# sourceMappingURL=preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../src/components/preview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAS9D;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,EACvB,MAAM,EACN,IAAI,GACJ,EAAE;IACF,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB,+BAmHA"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Row-aligned table cell text: `th[i]` and `td[i]` form one row. In the
3
+ * table item the `td` cells hold Markdown while editing (converted
4
+ * to/from HTML via `toEditorState`/`toItemData`); `th` cells stay plain.
5
+ */
6
+ export interface TableEditorData {
7
+ readonly th: readonly string[];
8
+ readonly td: readonly string[];
9
+ }
10
+ /**
11
+ * Table row editor as a fully controlled component. The table item's
12
+ * editor owns the state; row operations are declared as local commands.
13
+ * @param root0
14
+ * @param root0.value
15
+ * @param root0.onChange
16
+ * @example
17
+ * ```tsx
18
+ * <TableEditor
19
+ * value={{ th: state.th ?? [], td: state.td ?? [] }}
20
+ * onChange={({ th, td }) => setState({ ...state, th: [...th], td: [...td] })}
21
+ * />
22
+ * ```
23
+ */
24
+ export declare function TableEditor({ value, onChange, }: {
25
+ readonly value: TableEditorData;
26
+ readonly onChange: (value: TableEditorData) => void;
27
+ }): import("react").JSX.Element;
28
+ //# sourceMappingURL=table-editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-editor.d.ts","sourceRoot":"","sources":["../../src/components/table-editor.tsx"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,EAAE,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,EAC3B,KAAK,EACL,QAAQ,GACR,EAAE;IACF,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;CACpD,+BAkGA"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Controlled tab list. Selection is lifted to the parent via
3
+ * `current`/`onChange`; tab buttons declare a local command instead of a
4
+ * click handler. Arrow keys move the selection. The tab panel itself is
5
+ * rendered by the parent, which also owns its `aria-label`.
6
+ * @param root0
7
+ * @param root0.current
8
+ * @param root0.onChange
9
+ * @param root0.contentId
10
+ * @param root0.length
11
+ * @param root0.createLabel
12
+ * @example
13
+ * ```tsx
14
+ * <Tabs current={currentIndex} onChange={setCurrentIndex} contentId="tab-content" />
15
+ * <div id="tab-content" role="tabpanel" aria-label={`画像${currentIndex + 1}`}>
16
+ * {currentIndex === 0 ? <PcForm /> : <SpForm />}
17
+ * </div>
18
+ * ```
19
+ */
20
+ export declare function Tabs({ current, onChange, contentId, length, createLabel, }: {
21
+ readonly current: number;
22
+ readonly onChange: (index: number) => void;
23
+ readonly contentId: string;
24
+ readonly length?: number;
25
+ readonly createLabel?: (index: number) => string;
26
+ }): import("react").JSX.Element;
27
+ //# sourceMappingURL=tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/components/tabs.tsx"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,IAAI,CAAC,EACpB,OAAO,EACP,QAAQ,EACR,SAAS,EACT,MAAU,EACV,WAAyC,GACzC,EAAE;IACF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACjD,+BA8CA"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * File thumbnail. Renders an image/video preview or a file-type icon.
3
+ *
4
+ * The file type is inferred from the URL's extension (`getExt`) — the
5
+ * URL is the only information available here, so the extension decides
6
+ * whether the file can be previewed inline or needs a type icon.
7
+ * @param root0
8
+ * @param root0.src
9
+ * @example
10
+ * ```tsx
11
+ * <Thumbnail src={file.url} />
12
+ * ```
13
+ */
14
+ export declare function Thumbnail({ src }: {
15
+ readonly src: string;
16
+ }): import("react").JSX.Element;
17
+ //# sourceMappingURL=thumbnail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thumbnail.d.ts","sourceRoot":"","sources":["../../src/components/thumbnail.tsx"],"names":[],"mappings":"AAeA;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,EAAE,GAAG,EAAE,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,+BAsC1D"}
@@ -0,0 +1,40 @@
1
+ declare module 'react' {
2
+ namespace JSX {
3
+ interface IntrinsicElements {
4
+ 'bge-wysiwyg-editor': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
5
+ 'item-name'?: string;
6
+ commands?: string;
7
+ label?: string;
8
+ name?: string;
9
+ };
10
+ }
11
+ }
12
+ }
13
+ /**
14
+ * Rich text field backed by the `<bge-wysiwyg-editor>` custom element
15
+ * (TipTap). The element manages its own DOM; this wrapper feeds the
16
+ * initial value and lifts edits into the editor state via the
17
+ * `transaction` event.
18
+ * @param root0
19
+ * @param root0.value
20
+ * @param root0.onChange
21
+ * @param root0.itemName
22
+ * @param root0.commands
23
+ * @param root0.label
24
+ * @example
25
+ * ```tsx
26
+ * <WysiwygField
27
+ * itemName="wysiwyg"
28
+ * value={state.wysiwyg ?? ''}
29
+ * onChange={(wysiwyg) => setState({ ...state, wysiwyg })}
30
+ * />
31
+ * ```
32
+ */
33
+ export declare function WysiwygField({ value, onChange, itemName, commands, label, }: {
34
+ readonly value: string;
35
+ readonly onChange: (value: string) => void;
36
+ readonly itemName?: string;
37
+ readonly commands?: string;
38
+ readonly label?: string;
39
+ }): import("react").JSX.Element;
40
+ //# sourceMappingURL=wysiwyg-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wysiwyg-field.d.ts","sourceRoot":"","sources":["../../src/components/wysiwyg-field.tsx"],"names":[],"mappings":"AAIA,OAAO,QAAQ,OAAO,CAAC;IACtB,UAAU,GAAG,CAAC;QACb,UAAU,iBAAiB;YAC1B,oBAAoB,EAAE,KAAK,CAAC,iBAAiB,CAC5C,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,WAAW,CACX,GAAG;gBACH,WAAW,CAAC,EAAE,MAAM,CAAC;gBACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,KAAK,CAAC,EAAE,MAAM,CAAC;gBACf,IAAI,CAAC,EAAE,MAAM,CAAC;aACd,CAAC;SACF;KACD;CACD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,YAAY,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,GACL,EAAE;IACF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACxB,+BAsCA"}
@@ -0,0 +1,41 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Declarative `<dialog>` shell.
4
+ *
5
+ * The markup follows the `dialog.bge-dialog > div > form > div` + `footer`
6
+ * structure that `ui.css` styles. Opening/closing is driven by the `open`
7
+ * prop; the close button uses the built-in `close` command — no click
8
+ * handlers.
9
+ * @param root0
10
+ * @param root0.name
11
+ * @param root0.open
12
+ * @param root0.onClose
13
+ * @param root0.onComplete
14
+ * @param root0.buttons
15
+ * @param root0.buttons.close
16
+ * @param root0.buttons.complete
17
+ * @param root0.children
18
+ * @example
19
+ * ```tsx
20
+ * <EditorDialog
21
+ * name="options"
22
+ * open={block !== null}
23
+ * onClose={() => engine.uiState.closeDialog()}
24
+ * onComplete={(formData) => applyBlockOptions(block, formData)}
25
+ * buttons={{ close: 'キャンセル', complete: '決定' }}>
26
+ * {block ? <BlockOptions engine={engine} block={block} /> : null}
27
+ * </EditorDialog>
28
+ * ```
29
+ */
30
+ export declare function EditorDialog({ name, open, onClose, onComplete, buttons, children, }: {
31
+ readonly name: string;
32
+ readonly open: boolean;
33
+ readonly onClose: () => void;
34
+ readonly onComplete?: (formData: FormData) => void;
35
+ readonly buttons?: {
36
+ readonly close?: string;
37
+ readonly complete?: string;
38
+ };
39
+ readonly children: ReactNode;
40
+ }): import("react").JSX.Element;
41
+ //# sourceMappingURL=editor-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-dialog.d.ts","sourceRoot":"","sources":["../src/editor-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,uBAAuB,CAAC;AAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,YAAY,CAAC,EAC5B,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,UAAU,EACV,OAAO,EACP,QAAQ,GACR,EAAE;IACF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,OAAO,CAAC,EAAE;QAClB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;KAC3B,CAAC;IACF,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC7B,+BAoDA"}
@@ -0,0 +1,34 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Controlled checkbox following the editor form markup convention
4
+ * (`label > input + text`).
5
+ *
6
+ * The structure is a styling contract: `ui.css` turns
7
+ * `label:not([for]):has(input[type='checkbox'])` into a flex row, so it
8
+ * must be preserved.
9
+ * @param root0
10
+ * @param root0.label
11
+ * @param root0.checked
12
+ * @param root0.onChange
13
+ * @param root0.name
14
+ * @param root0.disabled
15
+ * @param root0.describedBy
16
+ * @example
17
+ * ```tsx
18
+ * <Checkbox
19
+ * label={<span>横スクロール可能</span>}
20
+ * name="bge-scrollable"
21
+ * checked={state.scrollable ?? false}
22
+ * onChange={(scrollable) => setState({ ...state, scrollable })}
23
+ * />
24
+ * ```
25
+ */
26
+ export declare function Checkbox({ label, checked, onChange, name, disabled, describedBy, }: {
27
+ readonly label: ReactNode;
28
+ readonly checked: boolean;
29
+ readonly onChange: (checked: boolean) => void;
30
+ readonly name?: string;
31
+ readonly disabled?: boolean;
32
+ readonly describedBy?: string;
33
+ }): import("react").JSX.Element;
34
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/form/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,QAAQ,CAAC,EACxB,KAAK,EACL,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,WAAW,GACX,EAAE;IACF,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC9B,+BAcA"}
@@ -0,0 +1,31 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Grouping fieldset following the editor form markup convention
4
+ * (`fieldset > legend`).
5
+ *
6
+ * The structure is a styling contract: `ui.css` draws the group border
7
+ * and spacing on the `fieldset` element itself, so it must be preserved.
8
+ * @param root0
9
+ * @param root0.legend
10
+ * @param root0.id
11
+ * @param root0.disabled
12
+ * @param root0.children
13
+ * @example
14
+ * ```tsx
15
+ * <Fieldset legend="リンク設定" disabled={!state.useLink}>
16
+ * <TextField
17
+ * label="URL"
18
+ * name="bge-href"
19
+ * value={state.href ?? ''}
20
+ * onChange={(href) => setState({ ...state, href })}
21
+ * />
22
+ * </Fieldset>
23
+ * ```
24
+ */
25
+ export declare function Fieldset({ legend, id, disabled, children, }: {
26
+ readonly legend: string;
27
+ readonly id?: string;
28
+ readonly disabled?: boolean;
29
+ readonly children: ReactNode;
30
+ }): import("react").JSX.Element;
31
+ //# sourceMappingURL=fieldset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fieldset.d.ts","sourceRoot":"","sources":["../../src/form/fieldset.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,QAAQ,CAAC,EACxB,MAAM,EACN,EAAE,EACF,QAAQ,EACR,QAAQ,GACR,EAAE;IACF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC7B,+BAOA"}
@@ -0,0 +1,8 @@
1
+ export { Checkbox } from './checkbox.js';
2
+ export { Fieldset } from './fieldset.js';
3
+ export { NumberField } from './number-field.js';
4
+ export { RadioGroup } from './radio-group.js';
5
+ export { SelectField } from './select-field.js';
6
+ export { TextArea } from './text-area.js';
7
+ export { TextField } from './text-field.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}