@burger-editor/client 4.0.0-alpha.8 → 4.0.0-alpha.80

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 (137) hide show
  1. package/README.md +169 -2
  2. package/dist/__tests__/setup.d.ts +2 -0
  3. package/dist/__tests__/setup.d.ts.map +1 -0
  4. package/dist/animate-insertion.d.ts +17 -0
  5. package/dist/animate-insertion.d.ts.map +1 -0
  6. package/dist/block-swap-view-transition-css.d.ts +7 -0
  7. package/dist/block-swap-view-transition-css.d.ts.map +1 -0
  8. package/dist/burger-editor-root.d.ts +7 -0
  9. package/dist/burger-editor-root.d.ts.map +1 -0
  10. package/dist/client.css +981 -573
  11. package/dist/client.js +28193 -14074
  12. package/dist/client.js.map +1 -1
  13. package/dist/commands/register-engine-commands.d.ts +18 -0
  14. package/dist/commands/register-engine-commands.d.ts.map +1 -0
  15. package/dist/components/block-catalog.d.ts +18 -0
  16. package/dist/components/block-catalog.d.ts.map +1 -0
  17. package/dist/components/block-menu-anchors.d.ts +25 -0
  18. package/dist/components/block-menu-anchors.d.ts.map +1 -0
  19. package/dist/components/block-menu-button.d.ts +33 -0
  20. package/dist/components/block-menu-button.d.ts.map +1 -0
  21. package/dist/components/block-menu-view.d.ts +88 -0
  22. package/dist/components/block-menu-view.d.ts.map +1 -0
  23. package/dist/components/block-menu.d.ts +25 -0
  24. package/dist/components/block-menu.d.ts.map +1 -0
  25. package/dist/components/block-options.d.ts +23 -0
  26. package/dist/components/block-options.d.ts.map +1 -0
  27. package/dist/components/draft-switcher.d.ts +24 -0
  28. package/dist/components/draft-switcher.d.ts.map +1 -0
  29. package/dist/components/editable-area-view.d.ts +41 -0
  30. package/dist/components/editable-area-view.d.ts.map +1 -0
  31. package/dist/components/file-list.d.ts +19 -0
  32. package/dist/components/file-list.d.ts.map +1 -0
  33. package/dist/components/file-uploader.d.ts +18 -0
  34. package/dist/components/file-uploader.d.ts.map +1 -0
  35. package/dist/components/front-matter-editor.d.ts +115 -0
  36. package/dist/components/front-matter-editor.d.ts.map +1 -0
  37. package/dist/components/index.d.ts +23 -0
  38. package/dist/components/index.d.ts.map +1 -0
  39. package/dist/components/initial-insertion-button.d.ts +15 -0
  40. package/dist/components/initial-insertion-button.d.ts.map +1 -0
  41. package/dist/components/item-editor-host.d.ts +24 -0
  42. package/dist/components/item-editor-host.d.ts.map +1 -0
  43. package/dist/components/preview.d.ts +15 -0
  44. package/dist/components/preview.d.ts.map +1 -0
  45. package/dist/components/table-editor.d.ts +28 -0
  46. package/dist/components/table-editor.d.ts.map +1 -0
  47. package/dist/components/tabs.d.ts +27 -0
  48. package/dist/components/tabs.d.ts.map +1 -0
  49. package/dist/components/thumbnail-button.d.ts +39 -0
  50. package/dist/components/thumbnail-button.d.ts.map +1 -0
  51. package/dist/components/thumbnail.d.ts +17 -0
  52. package/dist/components/thumbnail.d.ts.map +1 -0
  53. package/dist/components/wysiwyg-field.d.ts +50 -0
  54. package/dist/components/wysiwyg-field.d.ts.map +1 -0
  55. package/dist/create-mock-engine-BloCpuEu.js +87 -0
  56. package/dist/create-mock-engine-BloCpuEu.js.map +1 -0
  57. package/dist/dist-DYydjVsL.js +16188 -0
  58. package/dist/dist-DYydjVsL.js.map +1 -0
  59. package/dist/editable-area-view-DhEipEQV.js +2962 -0
  60. package/dist/editable-area-view-DhEipEQV.js.map +1 -0
  61. package/dist/editor-dialog.d.ts +50 -0
  62. package/dist/editor-dialog.d.ts.map +1 -0
  63. package/dist/engine-context-oEEsvNSx.js +49 -0
  64. package/dist/engine-context-oEEsvNSx.js.map +1 -0
  65. package/dist/engine-context.d.ts +43 -0
  66. package/dist/engine-context.d.ts.map +1 -0
  67. package/dist/file-browser/store.d.ts +132 -0
  68. package/dist/file-browser/store.d.ts.map +1 -0
  69. package/dist/file-browser/use-external-file-selection.d.ts +39 -0
  70. package/dist/file-browser/use-external-file-selection.d.ts.map +1 -0
  71. package/dist/file-browser/use-file-browser.d.ts +17 -0
  72. package/dist/file-browser/use-file-browser.d.ts.map +1 -0
  73. package/dist/form/checkbox.d.ts +34 -0
  74. package/dist/form/checkbox.d.ts.map +1 -0
  75. package/dist/form/fieldset.d.ts +31 -0
  76. package/dist/form/fieldset.d.ts.map +1 -0
  77. package/dist/form/index.d.ts +8 -0
  78. package/dist/form/index.d.ts.map +1 -0
  79. package/dist/form/number-field.d.ts +37 -0
  80. package/dist/form/number-field.d.ts.map +1 -0
  81. package/dist/form/radio-group.d.ts +38 -0
  82. package/dist/form/radio-group.d.ts.map +1 -0
  83. package/dist/form/select-field.d.ts +41 -0
  84. package/dist/form/select-field.d.ts.map +1 -0
  85. package/dist/form/text-area.d.ts +33 -0
  86. package/dist/form/text-area.d.ts.map +1 -0
  87. package/dist/form/text-field.d.ts +47 -0
  88. package/dist/form/text-field.d.ts.map +1 -0
  89. package/dist/index.d.ts +42 -6
  90. package/dist/index.d.ts.map +1 -1
  91. package/dist/interest-hints.d.ts +21 -0
  92. package/dist/interest-hints.d.ts.map +1 -0
  93. package/dist/invoker-commands.d.ts +24 -0
  94. package/dist/invoker-commands.d.ts.map +1 -0
  95. package/dist/mount.d.ts +24 -0
  96. package/dist/mount.d.ts.map +1 -0
  97. package/dist/replace-element.d.ts +12 -4
  98. package/dist/replace-element.d.ts.map +1 -1
  99. package/dist/root-error-boundary.d.ts +34 -0
  100. package/dist/root-error-boundary.d.ts.map +1 -0
  101. package/dist/testing/create-mock-engine.d.ts +33 -0
  102. package/dist/testing/create-mock-engine.d.ts.map +1 -0
  103. package/dist/testing/index.d.ts +4 -0
  104. package/dist/testing/index.d.ts.map +1 -0
  105. package/dist/testing/render-with-engine.d.ts +20 -0
  106. package/dist/testing/render-with-engine.d.ts.map +1 -0
  107. package/dist/testing/suppress-console-error.d.ts +24 -0
  108. package/dist/testing/suppress-console-error.d.ts.map +1 -0
  109. package/dist/testing-mock-engine.js +1 -0
  110. package/dist/testing.js +68 -0
  111. package/dist/testing.js.map +1 -0
  112. package/dist/ui.d.ts +17 -0
  113. package/dist/ui.d.ts.map +1 -0
  114. package/dist/ui.js +2830 -0
  115. package/dist/ui.js.map +1 -0
  116. package/dist/use-command.d.ts +38 -0
  117. package/dist/use-command.d.ts.map +1 -0
  118. package/dist/use-engine.d.ts +37 -0
  119. package/dist/use-engine.d.ts.map +1 -0
  120. package/dist/use-mount-effect.d.ts +20 -0
  121. package/dist/use-mount-effect.d.ts.map +1 -0
  122. package/dist/view/create-react-view.d.ts +41 -0
  123. package/dist/view/create-react-view.d.ts.map +1 -0
  124. package/package.json +61 -16
  125. package/dist/block-catalog.svelte.d.ts +0 -1
  126. package/dist/block-menu-button.svelte.d.ts +0 -1
  127. package/dist/block-menu.svelte.d.ts +0 -1
  128. package/dist/block-options.svelte.d.ts +0 -1
  129. package/dist/draft-switcher.svelte.d.ts +0 -1
  130. package/dist/file-list.svelte.d.ts +0 -1
  131. package/dist/file-uploader.svelte.d.ts +0 -1
  132. package/dist/preview.svelte.d.ts +0 -1
  133. package/dist/svelte-mount.d.ts +0 -10
  134. package/dist/svelte-mount.d.ts.map +0 -1
  135. package/dist/table-editor.svelte.d.ts +0 -1
  136. package/dist/tabs.svelte.d.ts +0 -1
  137. package/dist/thumbnail.svelte.d.ts +0 -1
@@ -0,0 +1,18 @@
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={engine.commandBus.receiverId}`. Call once
8
+ * per engine.
9
+ * @param engine - The engine instance
10
+ * @param catalog - The block catalog used by `--add-block`
11
+ * @example
12
+ * ```ts
13
+ * const engine = await BurgerEditorEngine.new(options);
14
+ * registerEngineCommands(engine, options.catalog);
15
+ * ```
16
+ */
17
+ export declare function registerEngineCommands(engine: BurgerEditorEngine, catalog: BlockCatalog): void;
18
+ //# 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;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACrC,MAAM,EAAE,kBAAkB,EAC1B,OAAO,EAAE,YAAY,QA6LrB"}
@@ -0,0 +1,18 @@
1
+ import { BlockCatalog as BlockCatalogData } 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.catalog
8
+ * @example
9
+ * ```tsx
10
+ * <EditorDialog name="catalog" open={open} onClose={close} buttons={{ close: 'キャンセル' }}>
11
+ * <BlockCatalog catalog={engine.catalog} />
12
+ * </EditorDialog>
13
+ * ```
14
+ */
15
+ export declare function BlockCatalog({ catalog }: {
16
+ readonly catalog: BlockCatalogData;
17
+ }): import('react').JSX.Element;
18
+ //# 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,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAU5E;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAA;CAAE,+BA+D/E"}
@@ -0,0 +1,25 @@
1
+ /** ホバー中ブロックの CSS アンカー名(`position-anchor` の参照先) */
2
+ export declare const BGE_BLOCK_MENU_BLOCK_ANCHOR = "--bge-current-block";
3
+ /**
4
+ * ブロック内アイテム(`[data-bgi]`)の CSS アンカー名を返す。
5
+ * @param index - ブロック内の出現順(0 始まり)
6
+ * @example
7
+ * ```ts
8
+ * bgeBlockMenuItemAnchorName(0); // '--bge-block-menu-item-0'
9
+ * ```
10
+ */
11
+ export declare function bgeBlockMenuItemAnchorName(index: number): `--bge-block-menu-item-${number}`;
12
+ /**
13
+ * @param blockEl - `[data-bge-container]` のブロック要素
14
+ */
15
+ export declare function clearBlockMenuAnchors(blockEl: HTMLElement): void;
16
+ /**
17
+ * メニューとアイテムオーバーレイが参照するアンカーをブロック DOM に付与する。
18
+ * `itemEls` は `Item.getInstance` で解決済みの `[data-bgi]` だけを渡す(オーバーレイの
19
+ * `value` インデックスと `itemsRef` が同じ並びになる)。
20
+ * @param blockEl - `[data-bge-container]` のブロック要素
21
+ * @param itemEls - アンカーを付与するアイテム要素(出現順)
22
+ * @returns 付与したアイテムアンカー名の一覧(オーバーレイの `position-anchor` 用)
23
+ */
24
+ export declare function applyBlockMenuAnchors(blockEl: HTMLElement, itemEls: readonly HTMLElement[]): readonly string[];
25
+ //# sourceMappingURL=block-menu-anchors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block-menu-anchors.d.ts","sourceRoot":"","sources":["../../src/components/block-menu-anchors.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,eAAO,MAAM,2BAA2B,wBAAwB,CAAC;AAEjE;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACzC,KAAK,EAAE,MAAM,GACX,yBAAyB,MAAM,EAAE,CAEnC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAKhE;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,SAAS,WAAW,EAAE,GAC7B,SAAS,MAAM,EAAE,CASnB"}
@@ -0,0 +1,33 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Icon button of the block menu with an anchored hint tooltip (`interestfor`
4
+ * + `popover="hint"`). Esc dismisses the tooltip without moving pointer or
5
+ * focus (WCAG 1.4.13). The admin UI targets the latest stable Chrome, which
6
+ * implements Interest Invokers; without `HTMLButtonElement.prototype
7
+ * .interestForElement`, hints do not open (there is no CSS-only fallback).
8
+ * The action is declared with the Invoker Commands API instead of a click
9
+ * handler.
10
+ * @param root0
11
+ * @param root0.label
12
+ * @param root0.command
13
+ * @param root0.commandfor
14
+ * @param root0.value
15
+ * @param root0.children
16
+ * @example
17
+ * ```tsx
18
+ * <BlockMenuButton
19
+ * label="ブロックを削除"
20
+ * command={BGE_COMMAND.removeBlock}
21
+ * commandfor={engine.commandBus.receiverId}>
22
+ * <IconTrash />
23
+ * </BlockMenuButton>
24
+ * ```
25
+ */
26
+ export declare function BlockMenuButton({ label, command, commandfor, value, children, }: {
27
+ readonly label: string;
28
+ readonly command: string;
29
+ readonly commandfor: string;
30
+ readonly value?: string;
31
+ readonly children: ReactNode;
32
+ }): import('react').JSX.Element;
33
+ //# 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;AAItD,OAAO,sBAAsB,CAAC;AAG9B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;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,+BAoBA"}
@@ -0,0 +1,88 @@
1
+ import { Ref } from 'react';
2
+ /**
3
+ * 選択中ブロックの下マージン表示用。`BlockMenu` がブロック要素の
4
+ * 算出スタイルから読み取り、余白インジケータ(`.bgeMenuMargin`)に渡す。
5
+ * 位置とサイズは CSS アンカー配置(`--bge-current-block`)で追従する。
6
+ * @example
7
+ * ```ts
8
+ * const margin: BlockMenuMargin = {
9
+ * marginBlockEnd: 16,
10
+ * marginBlockEndValue: '1em',
11
+ * };
12
+ * ```
13
+ */
14
+ export interface BlockMenuMargin {
15
+ /** ブロック要素の `margin-block-end` 算出値(px) */
16
+ readonly marginBlockEnd: number;
17
+ /** `margin-block-end` のCSS値そのまま(例: `'1em'`) */
18
+ readonly marginBlockEndValue: string;
19
+ }
20
+ /**
21
+ * ブロック内の各アイテム(`[data-bgi]`)に付与した CSS アンカー名。
22
+ * 対応する DOM 要素の `anchor-name` と一致し、オーバーレイの
23
+ * `position-anchor` が参照する。
24
+ * @example
25
+ * ```ts
26
+ * const anchor: ItemOverlayAnchor = { anchorName: '--bge-block-menu-item-0' };
27
+ * ```
28
+ */
29
+ export interface ItemOverlayAnchor {
30
+ readonly anchorName: string;
31
+ }
32
+ /**
33
+ * @deprecated {@link BlockMenuMargin} に置き換え。位置・サイズはアンカー配置で決まる。
34
+ */
35
+ export type MenuGeometry = BlockMenuMargin & {
36
+ readonly width: number;
37
+ readonly height: number;
38
+ readonly x: number;
39
+ readonly y: number;
40
+ };
41
+ /**
42
+ * @deprecated {@link ItemOverlayAnchor} に置き換え。
43
+ */
44
+ export type ItemOverlayRect = ItemOverlayAnchor & {
45
+ readonly x: number;
46
+ readonly y: number;
47
+ readonly width: number;
48
+ readonly height: number;
49
+ };
50
+ /**
51
+ * `BlockMenu` の描画専用の中身。マウス追跡・`BurgerBlock` 解決・
52
+ * `engine` 接続は一切持たず、マージンとアイテムアンカーを props で
53
+ * 受け取って並べるだけの純粋なプレゼンテーションコンポーネント。
54
+ *
55
+ * `BurgerBlock` の実インスタンス生成なしに見た目だけ確認したい用途
56
+ * (Storybook)のために `BlockMenu` から切り出されている。
57
+ * @param root0
58
+ * @param root0.rootRef
59
+ * @param root0.menuId
60
+ * @param root0.commandBusId
61
+ * @param root0.visible
62
+ * @param root0.margin
63
+ * @param root0.itemAnchors
64
+ * @param root0.isMutable
65
+ * @example
66
+ * ```tsx
67
+ * <BlockMenuView
68
+ * rootRef={rootRef}
69
+ * menuId="bge-block-menu"
70
+ * commandBusId={engine.commandBus.receiverId}
71
+ * visible
72
+ * margin={{ marginBlockEnd: 0, marginBlockEndValue: '0px' }}
73
+ * itemAnchors={[{ anchorName: '--bge-block-menu-item-0' }]}
74
+ * isMutable
75
+ * />
76
+ * ```
77
+ */
78
+ export declare function BlockMenuView({ rootRef, menuId, commandBusId, visible, margin, itemAnchors, isMutable, }: {
79
+ readonly rootRef: Ref<HTMLDivElement>;
80
+ readonly menuId: string;
81
+ /** 同一documentに複数エンジンが存在する場合の配送先。`engine.commandBus.receiverId` */
82
+ readonly commandBusId: string;
83
+ readonly visible: boolean;
84
+ readonly margin: BlockMenuMargin;
85
+ readonly itemAnchors: readonly ItemOverlayAnchor[];
86
+ readonly isMutable: boolean;
87
+ }): import('react').JSX.Element;
88
+ //# sourceMappingURL=block-menu-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block-menu-view.d.ts","sourceRoot":"","sources":["../../src/components/block-menu-view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAiB,MAAM,OAAO,CAAC;AAkBhD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,eAAe;IAC/B,yCAAyC;IACzC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,+CAA+C;IAC/C,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;CACrC;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,eAAe,GAAG;IAC5C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAAG;IACjD,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,aAAa,CAAC,EAC7B,OAAO,EACP,MAAM,EACN,YAAY,EACZ,OAAO,EACP,MAAM,EACN,WAAW,EACX,SAAS,GACT,EAAE;IACF,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACnD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC5B,+BAwGA"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Hover menu over the selected block inside the editable area iframe.
3
+ * Block operations are declared as engine commands; positioning and
4
+ * visibility are React state owned entirely by this component — the
5
+ * single source of truth. While `engine.uiState.processing` is true the
6
+ * menu hides itself by subscribing to the store; nothing outside React
7
+ * ever writes this component's `hidden` attribute (a direct DOM write
8
+ * would leave React's `visible` state out of sync and a later same-value
9
+ * `setVisible(true)` would be skipped, leaving the menu stuck hidden).
10
+ *
11
+ * マウス追跡・`BurgerBlock` 解決・`engine` 接続を担うコンテナで、
12
+ * 実際の描画は {@link BlockMenuView} に委譲する。`BlockMenuView` は
13
+ * `BurgerBlock` の実インスタンスなしに見た目だけ確認できるため、
14
+ * Storybook 等では `BlockMenuView` を直接使う。
15
+ * @param root0
16
+ * @param root0.container
17
+ * @example
18
+ * ```tsx
19
+ * <BlockMenu container={frameBody} />
20
+ * ```
21
+ */
22
+ export declare function BlockMenu({ container }: {
23
+ readonly container: HTMLElement;
24
+ }): import('react').JSX.Element;
25
+ //# 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":"AAcA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAA;CAAE,+BAiK3E"}
@@ -0,0 +1,23 @@
1
+ import { BurgerBlock } 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.block
8
+ * @example
9
+ * ```tsx
10
+ * <EditorDialog
11
+ * name="options"
12
+ * open={block !== null}
13
+ * onClose={close}
14
+ * action={(formData) => applyBlockOptions(block, formData)}
15
+ * buttons={{ close: 'キャンセル', complete: '決定' }}>
16
+ * {block ? <BlockOptions block={block} /> : null}
17
+ * </EditorDialog>
18
+ * ```
19
+ */
20
+ export declare function BlockOptions({ block }: {
21
+ readonly block: BurgerBlock;
22
+ }): import('react').JSX.Element;
23
+ //# 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,MAAM,qBAAqB,CAAC;AAYvD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAA;CAAE,+BAsStE"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Main/draft content switcher. Switching and copying are declared as
3
+ * engine commands; the pressed state follows `engine.uiState.activeArea`
4
+ * and the source-view indicator follows `engine.uiState.sourceMode` — no
5
+ * state is duplicated locally. Reads the engine via {@link useEngine} —
6
+ * the caller wraps this in an `EngineProvider`.
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
+ * @example
12
+ * ```tsx
13
+ * const container = document.createElement('div');
14
+ * engine.viewArea.insertAdjacentElement('beforebegin', container);
15
+ * reactMount(
16
+ * <EngineProvider engine={engine}>
17
+ * <DraftSwitcher />
18
+ * </EngineProvider>,
19
+ * container,
20
+ * );
21
+ * ```
22
+ */
23
+ export declare function DraftSwitcher(): import('react').JSX.Element;
24
+ //# 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":"AAOA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,gCAsE5B"}
@@ -0,0 +1,41 @@
1
+ import { 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
+ * Reads the engine via {@link useEngine}, wired up by the view that
13
+ * portals this component in (`createReactView`).
14
+ * @param root0
15
+ * @param root0.type
16
+ * @param root0.initialContent
17
+ * @param root0.stylesheets
18
+ * @param root0.classList
19
+ * @param root0.onReady
20
+ * @example
21
+ * ```tsx
22
+ * <EditableAreaView
23
+ * type="main"
24
+ * initialContent={html}
25
+ * stylesheets={stylesheets}
26
+ * classList={classList}
27
+ * onReady={(host) => resolve(host)}
28
+ * />
29
+ * ```
30
+ */
31
+ export declare function EditableAreaView({ type, initialContent, stylesheets, classList, onReady, }: {
32
+ readonly type: EditableAreaType;
33
+ readonly initialContent: string;
34
+ readonly stylesheets: readonly {
35
+ readonly path: string;
36
+ readonly id: string;
37
+ }[];
38
+ readonly classList: readonly string[];
39
+ readonly onReady: (host: EditableAreaHost) => void;
40
+ }): import('react').JSX.Element;
41
+ //# 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,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAkB9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,gBAAgB,CAAC,EAChC,IAAI,EACJ,cAAc,EACd,WAAW,EACX,SAAS,EACT,OAAO,GACP,EAAE;IACF,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,+BAwOA"}
@@ -0,0 +1,19 @@
1
+ import { FileType } from '@burger-editor/core';
2
+ /**
3
+ * Paginated, searchable file list. Reads its page through `use()` against
4
+ * the engine's `FileBrowserStore` (suspends into the dialog's Suspense
5
+ * boundary while loading); selection and in-flight uploads come from the
6
+ * same store, shared with `FileUploader` and the item's own `Editor`
7
+ * instead of a broadcast bus.
8
+ * @param root0
9
+ * @param root0.fileType
10
+ * @example
11
+ * ```tsx
12
+ * <FileUploader fileType="image" />
13
+ * <FileList fileType="image" />
14
+ * ```
15
+ */
16
+ export declare function FileList({ fileType }: {
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,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAoBpD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,+BAmMrE"}
@@ -0,0 +1,18 @@
1
+ import { 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()`. The upload itself goes through the engine's
6
+ * `FileBrowserStore`, shared with `FileList`/`Preview` so they see the
7
+ * same progress without a broadcast bus.
8
+ * @param root0
9
+ * @param root0.fileType
10
+ * @example
11
+ * ```tsx
12
+ * <FileUploader fileType="image" />
13
+ * ```
14
+ */
15
+ export declare function FileUploader({ fileType }: {
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,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AASpD;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,+BAwCzE"}
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Supported field types for Front Matter editor
3
+ */
4
+ type FieldType = 'text' | 'number' | 'boolean' | 'date' | 'json';
5
+ /**
6
+ * Field definition for Front Matter
7
+ */
8
+ export interface FieldDefinition {
9
+ readonly key: string;
10
+ readonly type: FieldType;
11
+ readonly value: unknown;
12
+ }
13
+ /**
14
+ * Owns the Front Matter field list — the actual data, as opposed to the
15
+ * view's own UI-only state (add-dialog-open, in-progress JSON drafts).
16
+ * Whether the panel is open is not part of this store.
17
+ * `createFrontMatterEditor`'s handle reads `getData()`/
18
+ * `getSnapshot()` directly and subscribes to be notified of changes,
19
+ * instead of a mutable closure variable updated from inside a React
20
+ * callback — the handle has no other way to read React state from
21
+ * outside React.
22
+ * @example
23
+ * ```ts
24
+ * const store = new FrontMatterStore({ title: 'A' });
25
+ * store.subscribe(() => console.log(store.getData()));
26
+ * store.setFields([{ key: 'title', type: 'text', value: 'B' }]);
27
+ * ```
28
+ */
29
+ export declare class FrontMatterStore {
30
+ #private;
31
+ readonly getSnapshot: () => readonly FieldDefinition[];
32
+ readonly subscribe: (listener: () => void) => (() => void);
33
+ constructor(initialData: Record<string, unknown>);
34
+ getData(): Record<string, unknown>;
35
+ setFields(next: readonly FieldDefinition[]): void;
36
+ }
37
+ /**
38
+ * Options for the Front Matter editor
39
+ */
40
+ export interface FrontMatterEditorOptions {
41
+ /** Container element to render the editor */
42
+ readonly container: HTMLElement;
43
+ /** Initial Front Matter data */
44
+ readonly initialData: Record<string, unknown>;
45
+ /** Whether Front Matter originally existed */
46
+ readonly hasFrontMatter: boolean;
47
+ /** Callback when data changes */
48
+ readonly onUpdated?: (data: Record<string, unknown>) => void;
49
+ }
50
+ /**
51
+ * Handle returned by {@link createFrontMatterEditor}.
52
+ */
53
+ export interface FrontMatterEditorHandle extends Disposable {
54
+ /**
55
+ * Get current Front Matter data
56
+ */
57
+ getData(): Record<string, unknown>;
58
+ /**
59
+ * Get original Front Matter string for format preservation
60
+ */
61
+ getOriginalFrontMatter(): string | undefined;
62
+ /**
63
+ * Unmount the editor UI.
64
+ * @deprecated Use a `using` declaration (`[Symbol.dispose]`) instead.
65
+ */
66
+ unmount(): void;
67
+ }
68
+ /**
69
+ * Mount the Front Matter editor (a React component) into the given
70
+ * container.
71
+ *
72
+ * The field list is rendered declaratively from React state, so
73
+ * toggling the panel or editing other fields never rebuilds the inputs
74
+ * — focus, caret position and IME composition survive re-renders.
75
+ * @param options - Mount target and initial data
76
+ * @returns A handle exposing the latest data and an unmount function
77
+ * @example
78
+ * ```ts
79
+ * const editor = createFrontMatterEditor({
80
+ * container: document.querySelector('.front-matter-editor')!,
81
+ * initialData: { title: 'ページ' },
82
+ * hasFrontMatter: true,
83
+ * onUpdated: (data) => debouncedSave(data),
84
+ * });
85
+ * editor.getData(); // => { title: 'ページ' }
86
+ * ```
87
+ */
88
+ export declare function createFrontMatterEditor(options: FrontMatterEditorOptions): FrontMatterEditorHandle;
89
+ /**
90
+ * Front Matterの動的フォーム本体。フィールド一覧は`store`(唯一の
91
+ * データソース)から読み、追加ダイアログとJSON下書きはこの見た目だけの
92
+ * UI状態としてローカルに持つ。フィールドの追加と削除は Invoker Commands
93
+ * (`--fm-add-field` / `--fm-delete-field`)で受ける。
94
+ *
95
+ * 開閉は `<details>` の `open` に任せる。Invoker Command と React の
96
+ * state には戻さない。同じ状態をコマンドのハンドラと DOM の属性の両方に
97
+ * 持つと、再レンダーのたびにどちらかがもう一方を上書きする。
98
+ *
99
+ * 「+ 追加」は `summary` の外に置く。`summary` の内容モデルはフレーズ内容
100
+ * で、ボタンを入れると対話要素の入れ子になり、押すとパネルも開閉する。
101
+ * 閉じた `details` の中に置くと、閉じている間はボタンが押せなくなる。
102
+ * 見た目は見出し行の右端だが、DOM 順ではフィールドの後なので、キーボードの
103
+ * 移動順は見出し、フィールド、追加ボタンになる。
104
+ * @param root0
105
+ * @param root0.store
106
+ * @example
107
+ * ```tsx
108
+ * <FrontMatterEditorView store={new FrontMatterStore({ title: 'ページ' })} />
109
+ * ```
110
+ */
111
+ export declare function FrontMatterEditorView({ store }: {
112
+ readonly store: FrontMatterStore;
113
+ }): import('react').JSX.Element;
114
+ export {};
115
+ //# sourceMappingURL=front-matter-editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"front-matter-editor.d.ts","sourceRoot":"","sources":["../../src/components/front-matter-editor.tsx"],"names":[],"mappings":"AAQA;;GAEG;AACH,KAAK,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,gBAAgB;;IAC5B,QAAQ,CAAC,WAAW,QAAO,SAAS,eAAe,EAAE,CAAiB;IACtE,QAAQ,CAAC,SAAS,GAAI,UAAU,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,CAKvD;gBAIU,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAIhD,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAIlC,SAAS,CAAC,IAAI,EAAE,SAAS,eAAe,EAAE,GAAG,IAAI;CAMjD;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC,6CAA6C;IAC7C,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;IAChC,gCAAgC;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9C,8CAA8C;IAC9C,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,iCAAiC;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAC7D;AAED;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,UAAU;IAC1D;;OAEG;IACH,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC;;OAEG;IACH,sBAAsB,IAAI,MAAM,GAAG,SAAS,CAAC;IAC7C;;;OAGG;IACH,OAAO,IAAI,IAAI,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,CACtC,OAAO,EAAE,wBAAwB,GAC/B,uBAAuB,CA8BzB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,+BA6GpF"}
@@ -0,0 +1,23 @@
1
+ export { BlockCatalog } from './block-catalog.js';
2
+ export { BGE_BLOCK_MENU_BLOCK_ANCHOR } from './block-menu-anchors.js';
3
+ export { BlockMenu } from './block-menu.js';
4
+ export { BlockMenuButton } from './block-menu-button.js';
5
+ export { BlockMenuView } from './block-menu-view.js';
6
+ export type { BlockMenuMargin, ItemOverlayAnchor, MenuGeometry, ItemOverlayRect, } from './block-menu-view.js';
7
+ export { BlockOptions } from './block-options.js';
8
+ export { DraftSwitcher } from './draft-switcher.js';
9
+ export { EditableAreaView } from './editable-area-view.js';
10
+ export { FileList } from './file-list.js';
11
+ export { FileUploader } from './file-uploader.js';
12
+ export { createFrontMatterEditor, FrontMatterEditorView, FrontMatterStore, } from './front-matter-editor.js';
13
+ export type { FrontMatterEditorOptions, FrontMatterEditorHandle, FieldDefinition as FrontMatterFieldDefinition, } from './front-matter-editor.js';
14
+ export { InitialInsertionButton } from './initial-insertion-button.js';
15
+ export { ItemEditorHost } from './item-editor-host.js';
16
+ export { Preview } from './preview.js';
17
+ export { TableEditor } from './table-editor.js';
18
+ export type { TableEditorData } from './table-editor.js';
19
+ export { Tabs } from './tabs.js';
20
+ export { Thumbnail } from './thumbnail.js';
21
+ export { ThumbnailButton } from './thumbnail-button.js';
22
+ export { WysiwygField } from './wysiwyg-field.js';
23
+ //# 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,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,YAAY,EACX,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,eAAe,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACN,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,GAChB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACX,wBAAwB,EACxB,uBAAuB,EACvB,eAAe,IAAI,0BAA0B,GAC7C,MAAM,0BAA0B,CAAC;AAClC,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,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,15 @@
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
+ * @param root0
5
+ * @param root0.commandBusId
6
+ * @example
7
+ * ```tsx
8
+ * reactMount(<InitialInsertionButton commandBusId={engine.commandBus.receiverId} />, container);
9
+ * ```
10
+ */
11
+ export declare function InitialInsertionButton({ commandBusId, }: {
12
+ /** 配送先のコマンドバス受信要素ID。`engine.commandBus.receiverId` */
13
+ readonly commandBusId: string;
14
+ }): import('react').JSX.Element;
15
+ //# 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;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,EACtC,YAAY,GACZ,EAAE;IACF,sDAAsD;IACtD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC9B,+BAUA"}
@@ -0,0 +1,24 @@
1
+ import { 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. Reads the
7
+ * engine via {@link useEngine}.
8
+ * @param root0
9
+ * @param root0.item
10
+ * @param root0.containerType
11
+ * @example
12
+ * ```tsx
13
+ * <ItemEditorHost
14
+ * item={open?.type === 'item-editor' ? open.item : null}
15
+ * containerType={open?.type === 'item-editor' ? open.containerType : undefined}
16
+ * />
17
+ * ```
18
+ */
19
+ export declare function ItemEditorHost({ item, containerType, }: {
20
+ readonly item: AnyItem | null;
21
+ readonly containerType?: string;
22
+ }): import('react').JSX.Element;
23
+ export {};
24
+ //# 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,EAAE,IAAI,EAAE,QAAQ,EAAmB,MAAM,qBAAqB,CAAC;AAQ3E,KAAK,OAAO,GAAG,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAGlC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,EAC9B,IAAI,EACJ,aAAa,GACb,EAAE;IACF,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CAChC,+BA2BA"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * File preview pane. The previewed path comes from the parent (lifted
3
+ * from the item's own state); upload progress is read from the engine's
4
+ * `FileBrowserStore`, shared with `FileList`/`FileUploader`.
5
+ * @param root0
6
+ * @param root0.path
7
+ * @example
8
+ * ```tsx
9
+ * <Preview path={state.path ?? ''} />
10
+ * ```
11
+ */
12
+ export declare function Preview({ path }: {
13
+ readonly path: string;
14
+ }): import('react').JSX.Element;
15
+ //# sourceMappingURL=preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../src/components/preview.tsx"],"names":[],"mappings":"AAOA;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,+BAmH1D"}
@@ -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,+BA+GA"}