@burger-editor/client 4.0.0-alpha.72 → 4.0.0-alpha.73
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.
- package/README.md +22 -9
- package/dist/__tests__/setup.d.ts +2 -0
- package/dist/__tests__/setup.d.ts.map +1 -0
- package/dist/burger-editor-root.d.ts +3 -7
- package/dist/burger-editor-root.d.ts.map +1 -1
- package/dist/client.js +323 -133
- package/dist/client.js.map +1 -1
- package/dist/commands/register-engine-commands.d.ts +2 -1
- package/dist/commands/register-engine-commands.d.ts.map +1 -1
- package/dist/components/block-catalog.d.ts +3 -5
- package/dist/components/block-catalog.d.ts.map +1 -1
- package/dist/components/block-menu-button.d.ts +1 -1
- package/dist/components/block-menu-view.d.ts +7 -3
- package/dist/components/block-menu-view.d.ts.map +1 -1
- package/dist/components/block-menu.d.ts +2 -5
- package/dist/components/block-menu.d.ts.map +1 -1
- package/dist/components/block-options.d.ts +4 -6
- package/dist/components/block-options.d.ts.map +1 -1
- package/dist/components/draft-switcher.d.ts +11 -10
- package/dist/components/draft-switcher.d.ts.map +1 -1
- package/dist/components/editable-area-view.d.ts +11 -14
- package/dist/components/editable-area-view.d.ts.map +1 -1
- package/dist/components/file-list.d.ts +9 -9
- package/dist/components/file-list.d.ts.map +1 -1
- package/dist/components/file-uploader.d.ts +6 -6
- package/dist/components/file-uploader.d.ts.map +1 -1
- package/dist/components/front-matter-editor.d.ts +43 -11
- package/dist/components/front-matter-editor.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/initial-insertion-button.d.ts +7 -2
- package/dist/components/initial-insertion-button.d.ts.map +1 -1
- package/dist/components/item-editor-host.d.ts +7 -6
- package/dist/components/item-editor-host.d.ts.map +1 -1
- package/dist/components/preview.d.ts +4 -7
- package/dist/components/preview.d.ts.map +1 -1
- package/dist/components/table-editor.d.ts.map +1 -1
- package/dist/components/wysiwyg-field.d.ts +11 -1
- package/dist/components/wysiwyg-field.d.ts.map +1 -1
- package/dist/editable-area-view-DssYcTqQ.js +2941 -0
- package/dist/editable-area-view-DssYcTqQ.js.map +1 -0
- package/dist/editor-dialog.d.ts +16 -7
- package/dist/editor-dialog.d.ts.map +1 -1
- package/dist/{editable-area-view-C00DSDVk.js → engine-context-gX6mWHke.js} +199 -1951
- package/dist/engine-context-gX6mWHke.js.map +1 -0
- package/dist/engine-context.d.ts +40 -0
- package/dist/engine-context.d.ts.map +1 -0
- package/dist/file-browser/store.d.ts +127 -0
- package/dist/file-browser/store.d.ts.map +1 -0
- package/dist/file-browser/use-external-file-selection.d.ts +39 -0
- package/dist/file-browser/use-external-file-selection.d.ts.map +1 -0
- package/dist/file-browser/use-file-browser.d.ts +17 -0
- package/dist/file-browser/use-file-browser.d.ts.map +1 -0
- package/dist/form/text-field.d.ts +3 -1
- package/dist/form/text-field.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/mount.d.ts +6 -1
- package/dist/mount.d.ts.map +1 -1
- package/dist/root-error-boundary.d.ts +34 -0
- package/dist/root-error-boundary.d.ts.map +1 -0
- package/dist/testing/create-mock-engine.d.ts +30 -0
- package/dist/testing/create-mock-engine.d.ts.map +1 -0
- package/dist/testing/index.d.ts +4 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/render-with-engine.d.ts +20 -0
- package/dist/testing/render-with-engine.d.ts.map +1 -0
- package/dist/testing/suppress-console-error.d.ts +24 -0
- package/dist/testing/suppress-console-error.d.ts.map +1 -0
- package/dist/testing.js +119 -0
- package/dist/testing.js.map +1 -0
- package/dist/ui.d.ts +7 -1
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +1618 -537
- package/dist/ui.js.map +1 -1
- package/dist/use-command.d.ts +13 -4
- package/dist/use-command.d.ts.map +1 -1
- package/dist/use-engine.d.ts +16 -32
- package/dist/use-engine.d.ts.map +1 -1
- package/dist/use-mount-effect.d.ts +20 -0
- package/dist/use-mount-effect.d.ts.map +1 -0
- package/dist/view/create-react-view.d.ts +33 -9
- package/dist/view/create-react-view.d.ts.map +1 -1
- package/package.json +44 -17
- package/dist/editable-area-view-C00DSDVk.js.map +0 -1
|
@@ -4,7 +4,8 @@ import { BlockCatalog, BurgerEditorEngine } from '@burger-editor/core';
|
|
|
4
4
|
*
|
|
5
5
|
* This is the single place where engine-mutating UI commands are
|
|
6
6
|
* implemented; buttons anywhere (main document or EditableArea iframes)
|
|
7
|
-
* declare them with `commandfor={
|
|
7
|
+
* declare them with `commandfor={engine.commandBus.receiverId}`. Call once
|
|
8
|
+
* per engine.
|
|
8
9
|
* @param engine - The engine instance
|
|
9
10
|
* @param catalog - The block catalog used by `--add-block`
|
|
10
11
|
* @example
|
|
@@ -1 +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
|
|
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"}
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import { BlockCatalog as BlockCatalogData
|
|
1
|
+
import { BlockCatalog as BlockCatalogData } from '@burger-editor/core';
|
|
2
2
|
/**
|
|
3
3
|
* Block catalog dialog content. Adding and pasting blocks are declared
|
|
4
4
|
* as engine commands; the catalog entry is identified by
|
|
5
5
|
* `data-category` / `data-index` on the invoker button.
|
|
6
6
|
* @param root0
|
|
7
|
-
* @param root0.engine
|
|
8
7
|
* @param root0.catalog
|
|
9
8
|
* @example
|
|
10
9
|
* ```tsx
|
|
11
10
|
* <EditorDialog name="catalog" open={open} onClose={close} buttons={{ close: 'キャンセル' }}>
|
|
12
|
-
* <BlockCatalog
|
|
11
|
+
* <BlockCatalog catalog={engine.catalog} />
|
|
13
12
|
* </EditorDialog>
|
|
14
13
|
* ```
|
|
15
14
|
*/
|
|
16
|
-
export declare function BlockCatalog({
|
|
17
|
-
readonly engine: BurgerEditorEngine;
|
|
15
|
+
export declare function BlockCatalog({ catalog }: {
|
|
18
16
|
readonly catalog: BlockCatalogData;
|
|
19
17
|
}): import("react").JSX.Element;
|
|
20
18
|
//# sourceMappingURL=block-catalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-catalog.d.ts","sourceRoot":"","sources":["../../src/components/block-catalog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
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,+BA8D/E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ref } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* 選択中ブロックの位置・サイズ・下マージン。座標とサイズはドキュメント
|
|
4
4
|
* 座標系のpx。`BlockMenu` が `getBlockAtPosition` の戻り値から算出し、
|
|
@@ -51,6 +51,7 @@ export interface ItemOverlayRect {
|
|
|
51
51
|
* @param root0
|
|
52
52
|
* @param root0.rootRef
|
|
53
53
|
* @param root0.menuId
|
|
54
|
+
* @param root0.commandBusId
|
|
54
55
|
* @param root0.visible
|
|
55
56
|
* @param root0.geometry
|
|
56
57
|
* @param root0.itemRects
|
|
@@ -60,6 +61,7 @@ export interface ItemOverlayRect {
|
|
|
60
61
|
* <BlockMenuView
|
|
61
62
|
* rootRef={rootRef}
|
|
62
63
|
* menuId="bge-block-menu"
|
|
64
|
+
* commandBusId={engine.commandBus.receiverId}
|
|
63
65
|
* visible
|
|
64
66
|
* geometry={{ width: 100, height: 40, x: 0, y: 0, marginBlockEnd: 0, marginBlockEndValue: '0px' }}
|
|
65
67
|
* itemRects={[]}
|
|
@@ -67,9 +69,11 @@ export interface ItemOverlayRect {
|
|
|
67
69
|
* />
|
|
68
70
|
* ```
|
|
69
71
|
*/
|
|
70
|
-
export declare function BlockMenuView({ rootRef, menuId, visible, geometry, itemRects, isMutable, }: {
|
|
71
|
-
readonly rootRef:
|
|
72
|
+
export declare function BlockMenuView({ rootRef, menuId, commandBusId, visible, geometry, itemRects, isMutable, }: {
|
|
73
|
+
readonly rootRef: Ref<HTMLDivElement>;
|
|
72
74
|
readonly menuId: string;
|
|
75
|
+
/** 同一documentに複数エンジンが存在する場合の配送先。`engine.commandBus.receiverId` */
|
|
76
|
+
readonly commandBusId: string;
|
|
73
77
|
readonly visible: boolean;
|
|
74
78
|
readonly geometry: MenuGeometry;
|
|
75
79
|
readonly itemRects: readonly ItemOverlayRect[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-menu-view.d.ts","sourceRoot":"","sources":["../../src/components/block-menu-view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
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;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,YAAY;IAC5B,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;IACnB,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,eAAe;IAC/B,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;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,aAAa,CAAC,EAC7B,OAAO,EACP,MAAM,EACN,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,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,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,SAAS,eAAe,EAAE,CAAC;IAC/C,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC5B,+BA6GA"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { BurgerEditorEngine } from '@burger-editor/core';
|
|
2
1
|
/**
|
|
3
2
|
* Hover menu over the selected block inside the editable area iframe.
|
|
4
3
|
* Block operations are declared as engine commands; positioning and
|
|
@@ -14,15 +13,13 @@ import { BurgerEditorEngine } from '@burger-editor/core';
|
|
|
14
13
|
* `BurgerBlock` の実インスタンスなしに見た目だけ確認できるため、
|
|
15
14
|
* Storybook 等では `BlockMenuView` を直接使う。
|
|
16
15
|
* @param root0
|
|
17
|
-
* @param root0.engine
|
|
18
16
|
* @param root0.container
|
|
19
17
|
* @example
|
|
20
18
|
* ```tsx
|
|
21
|
-
* <BlockMenu
|
|
19
|
+
* <BlockMenu container={frameBody} />
|
|
22
20
|
* ```
|
|
23
21
|
*/
|
|
24
|
-
export declare function BlockMenu({
|
|
25
|
-
readonly engine: BurgerEditorEngine;
|
|
22
|
+
export declare function BlockMenu({ container }: {
|
|
26
23
|
readonly container: HTMLElement;
|
|
27
24
|
}): import("react").JSX.Element;
|
|
28
25
|
//# sourceMappingURL=block-menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-menu.d.ts","sourceRoot":"","sources":["../../src/components/block-menu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"block-menu.d.ts","sourceRoot":"","sources":["../../src/components/block-menu.tsx"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAA;CAAE,+BAkL3E"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { BurgerBlock
|
|
1
|
+
import { BurgerBlock } from '@burger-editor/core';
|
|
2
2
|
/**
|
|
3
3
|
* Block options dialog content. Values are read out of the dialog form
|
|
4
4
|
* on submit (uncontrolled, `name="bge-options-*"`); only the fields that
|
|
5
5
|
* drive conditional rendering are controlled.
|
|
6
6
|
* @param root0
|
|
7
|
-
* @param root0.engine
|
|
8
7
|
* @param root0.block
|
|
9
8
|
* @example
|
|
10
9
|
* ```tsx
|
|
@@ -12,14 +11,13 @@ import { BurgerBlock, BurgerEditorEngine } from '@burger-editor/core';
|
|
|
12
11
|
* name="options"
|
|
13
12
|
* open={block !== null}
|
|
14
13
|
* onClose={close}
|
|
15
|
-
*
|
|
14
|
+
* action={(formData) => applyBlockOptions(block, formData)}
|
|
16
15
|
* buttons={{ close: 'キャンセル', complete: '決定' }}>
|
|
17
|
-
* {block ? <BlockOptions
|
|
16
|
+
* {block ? <BlockOptions block={block} /> : null}
|
|
18
17
|
* </EditorDialog>
|
|
19
18
|
* ```
|
|
20
19
|
*/
|
|
21
|
-
export declare function BlockOptions({
|
|
22
|
-
readonly engine: BurgerEditorEngine;
|
|
20
|
+
export declare function BlockOptions({ block }: {
|
|
23
21
|
readonly block: BurgerBlock;
|
|
24
22
|
}): import("react").JSX.Element;
|
|
25
23
|
//# sourceMappingURL=block-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-options.d.ts","sourceRoot":"","sources":["../../src/components/block-options.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,
|
|
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,+BAkStE"}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { BurgerEditorEngine } from '@burger-editor/core';
|
|
2
1
|
/**
|
|
3
2
|
* Main/draft content switcher. Switching and copying are declared as
|
|
4
|
-
* engine commands; the pressed state follows
|
|
5
|
-
*
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
8
|
* The alt+double-click source-view toggle is kept as a DOM event —
|
|
9
9
|
* double-click has no Invoker Commands equivalent (the no-click rule
|
|
10
10
|
* targets single-click activation).
|
|
11
|
-
* @param root0
|
|
12
|
-
* @param root0.engine
|
|
13
11
|
* @example
|
|
14
12
|
* ```tsx
|
|
15
13
|
* const container = document.createElement('div');
|
|
16
14
|
* engine.viewArea.insertAdjacentElement('beforebegin', container);
|
|
17
|
-
* reactMount(
|
|
15
|
+
* reactMount(
|
|
16
|
+
* <EngineProvider engine={engine}>
|
|
17
|
+
* <DraftSwitcher />
|
|
18
|
+
* </EngineProvider>,
|
|
19
|
+
* container,
|
|
20
|
+
* );
|
|
18
21
|
* ```
|
|
19
22
|
*/
|
|
20
|
-
export declare function DraftSwitcher(
|
|
21
|
-
readonly engine: BurgerEditorEngine;
|
|
22
|
-
}): import("react").JSX.Element;
|
|
23
|
+
export declare function DraftSwitcher(): import("react").JSX.Element;
|
|
23
24
|
//# sourceMappingURL=draft-switcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draft-switcher.d.ts","sourceRoot":"","sources":["../../src/components/draft-switcher.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"draft-switcher.d.ts","sourceRoot":"","sources":["../../src/components/draft-switcher.tsx"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,gCAsE5B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EditableAreaHost, EditableAreaType } from '@burger-editor/core';
|
|
2
2
|
/**
|
|
3
3
|
* The React shell of one editable area: the iframe hosting the edited
|
|
4
4
|
* content, the HTML source textarea, and the in-frame UI islands
|
|
@@ -9,8 +9,9 @@ import { BurgerEditorEngine, EditableAreaHost, EditableAreaType } from '@burger-
|
|
|
9
9
|
* The iframe is rendered unconditionally at a fixed position in the
|
|
10
10
|
* tree (visibility is `hidden` only) because unmounting an iframe
|
|
11
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`).
|
|
12
14
|
* @param root0
|
|
13
|
-
* @param root0.engine
|
|
14
15
|
* @param root0.type
|
|
15
16
|
* @param root0.initialContent
|
|
16
17
|
* @param root0.stylesheets
|
|
@@ -18,20 +19,16 @@ import { BurgerEditorEngine, EditableAreaHost, EditableAreaType } from '@burger-
|
|
|
18
19
|
* @param root0.onReady
|
|
19
20
|
* @example
|
|
20
21
|
* ```tsx
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* onReady={(host) => resolve(host)}
|
|
29
|
-
* />,
|
|
30
|
-
* );
|
|
22
|
+
* <EditableAreaView
|
|
23
|
+
* type="main"
|
|
24
|
+
* initialContent={html}
|
|
25
|
+
* stylesheets={stylesheets}
|
|
26
|
+
* classList={classList}
|
|
27
|
+
* onReady={(host) => resolve(host)}
|
|
28
|
+
* />
|
|
31
29
|
* ```
|
|
32
30
|
*/
|
|
33
|
-
export declare function EditableAreaView({
|
|
34
|
-
readonly engine: BurgerEditorEngine;
|
|
31
|
+
export declare function EditableAreaView({ type, initialContent, stylesheets, classList, onReady, }: {
|
|
35
32
|
readonly type: EditableAreaType;
|
|
36
33
|
readonly initialContent: string;
|
|
37
34
|
readonly stylesheets: readonly {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editable-area-view.d.ts","sourceRoot":"","sources":["../../src/components/editable-area-view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
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;AAiB9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,+BAmOA"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FileType } from '@burger-editor/core';
|
|
2
2
|
/**
|
|
3
|
-
* Paginated, searchable file list.
|
|
4
|
-
* engine
|
|
5
|
-
*
|
|
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.
|
|
6
8
|
* @param root0
|
|
7
|
-
* @param root0.engine
|
|
8
9
|
* @param root0.fileType
|
|
9
10
|
* @example
|
|
10
11
|
* ```tsx
|
|
11
|
-
* <FileUploader
|
|
12
|
-
* <FileList
|
|
12
|
+
* <FileUploader fileType="image" />
|
|
13
|
+
* <FileList fileType="image" />
|
|
13
14
|
* ```
|
|
14
15
|
*/
|
|
15
|
-
export declare function FileList({
|
|
16
|
-
readonly engine: BurgerEditorEngine;
|
|
16
|
+
export declare function FileList({ fileType }: {
|
|
17
17
|
readonly fileType: FileType;
|
|
18
18
|
}): import("react").JSX.Element;
|
|
19
19
|
//# sourceMappingURL=file-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-list.d.ts","sourceRoot":"","sources":["../../src/components/file-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
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"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FileType } from '@burger-editor/core';
|
|
2
2
|
/**
|
|
3
3
|
* File upload control. The trigger button declares a local command and
|
|
4
4
|
* the handler opens the picker via `showPicker()` — no click handlers,
|
|
5
|
-
* no programmatic `click()`.
|
|
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.
|
|
6
8
|
* @param root0
|
|
7
|
-
* @param root0.engine
|
|
8
9
|
* @param root0.fileType
|
|
9
10
|
* @example
|
|
10
11
|
* ```tsx
|
|
11
|
-
* <FileUploader
|
|
12
|
+
* <FileUploader fileType="image" />
|
|
12
13
|
* ```
|
|
13
14
|
*/
|
|
14
|
-
export declare function FileUploader({
|
|
15
|
-
readonly engine: BurgerEditorEngine;
|
|
15
|
+
export declare function FileUploader({ fileType }: {
|
|
16
16
|
readonly fileType: FileType;
|
|
17
17
|
}): import("react").JSX.Element;
|
|
18
18
|
//# sourceMappingURL=file-uploader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-uploader.d.ts","sourceRoot":"","sources":["../../src/components/file-uploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
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"}
|
|
@@ -1,3 +1,38 @@
|
|
|
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 (collapsed, add-dialog-open, in-progress JSON
|
|
16
|
+
* drafts). `createFrontMatterEditor`'s handle reads `getData()`/
|
|
17
|
+
* `getSnapshot()` directly and subscribes to be notified of changes,
|
|
18
|
+
* instead of a mutable closure variable updated from inside a React
|
|
19
|
+
* callback — the handle has no other way to read React state from
|
|
20
|
+
* outside React.
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const store = new FrontMatterStore({ title: 'A' });
|
|
24
|
+
* store.subscribe(() => console.log(store.getData()));
|
|
25
|
+
* store.setFields([{ key: 'title', type: 'text', value: 'B' }]);
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare class FrontMatterStore {
|
|
29
|
+
#private;
|
|
30
|
+
readonly getSnapshot: () => readonly FieldDefinition[];
|
|
31
|
+
readonly subscribe: (listener: () => void) => (() => void);
|
|
32
|
+
constructor(initialData: Record<string, unknown>);
|
|
33
|
+
getData(): Record<string, unknown>;
|
|
34
|
+
setFields(next: readonly FieldDefinition[]): void;
|
|
35
|
+
}
|
|
1
36
|
/**
|
|
2
37
|
* Options for the Front Matter editor
|
|
3
38
|
*/
|
|
@@ -51,22 +86,19 @@ export interface FrontMatterEditorHandle extends Disposable {
|
|
|
51
86
|
*/
|
|
52
87
|
export declare function createFrontMatterEditor(options: FrontMatterEditorOptions): FrontMatterEditorHandle;
|
|
53
88
|
/**
|
|
54
|
-
* Front Matter
|
|
55
|
-
*
|
|
89
|
+
* Front Matterの動的フォーム本体。フィールド一覧は`store`(唯一の
|
|
90
|
+
* データソース)から読み、折りたたみ・追加ダイアログ・JSON下書きは
|
|
91
|
+
* この見た目だけのUI状態としてローカルに持つ。操作は Invoker Commands
|
|
56
92
|
* (`--fm-toggle` / `--fm-add-field` / `--fm-delete-field`)で受ける
|
|
57
93
|
* @param root0
|
|
58
|
-
* @param root0.
|
|
59
|
-
* @param root0.onDataChange
|
|
94
|
+
* @param root0.store
|
|
60
95
|
* @example
|
|
61
96
|
* ```tsx
|
|
62
|
-
* <FrontMatterEditorView
|
|
63
|
-
* initialData={{ title: 'ページ' }}
|
|
64
|
-
* onDataChange={(data) => console.log(data)}
|
|
65
|
-
* />
|
|
97
|
+
* <FrontMatterEditorView store={new FrontMatterStore({ title: 'ページ' })} />
|
|
66
98
|
* ```
|
|
67
99
|
*/
|
|
68
|
-
export declare function FrontMatterEditorView({
|
|
69
|
-
readonly
|
|
70
|
-
readonly onDataChange: (data: Record<string, unknown>) => void;
|
|
100
|
+
export declare function FrontMatterEditorView({ store }: {
|
|
101
|
+
readonly store: FrontMatterStore;
|
|
71
102
|
}): import("react").JSX.Element;
|
|
103
|
+
export {};
|
|
72
104
|
//# sourceMappingURL=front-matter-editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"front-matter-editor.d.ts","sourceRoot":"","sources":["../../src/components/front-matter-editor.tsx"],"names":[],"mappings":"
|
|
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;;;;;;;;;;;;;;GAcG;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;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,+BA2HpF"}
|
|
@@ -8,8 +8,8 @@ export { DraftSwitcher } from './draft-switcher.js';
|
|
|
8
8
|
export { EditableAreaView } from './editable-area-view.js';
|
|
9
9
|
export { FileList } from './file-list.js';
|
|
10
10
|
export { FileUploader } from './file-uploader.js';
|
|
11
|
-
export { createFrontMatterEditor, FrontMatterEditorView } from './front-matter-editor.js';
|
|
12
|
-
export type { FrontMatterEditorOptions, FrontMatterEditorHandle, } from './front-matter-editor.js';
|
|
11
|
+
export { createFrontMatterEditor, FrontMatterEditorView, FrontMatterStore, } from './front-matter-editor.js';
|
|
12
|
+
export type { FrontMatterEditorOptions, FrontMatterEditorHandle, FieldDefinition as FrontMatterFieldDefinition, } from './front-matter-editor.js';
|
|
13
13
|
export { InitialInsertionButton } from './initial-insertion-button.js';
|
|
14
14
|
export { ItemEditorHost } from './item-editor-host.js';
|
|
15
15
|
export { Preview } from './preview.js';
|
|
@@ -1 +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,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC1E,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,
|
|
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,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC1E,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,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Button shown in an empty editable area to insert the first block.
|
|
3
3
|
* Declares the engine command instead of taking a callback.
|
|
4
|
+
* @param root0
|
|
5
|
+
* @param root0.commandBusId
|
|
4
6
|
* @example
|
|
5
7
|
* ```tsx
|
|
6
|
-
* reactMount(<InitialInsertionButton />, container);
|
|
8
|
+
* reactMount(<InitialInsertionButton commandBusId={engine.commandBus.receiverId} />, container);
|
|
7
9
|
* ```
|
|
8
10
|
*/
|
|
9
|
-
export declare function InitialInsertionButton(
|
|
11
|
+
export declare function InitialInsertionButton({ commandBusId, }: {
|
|
12
|
+
/** 配送先のコマンドバス受信要素ID。`engine.commandBus.receiverId` */
|
|
13
|
+
readonly commandBusId: string;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
10
15
|
//# sourceMappingURL=initial-insertion-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initial-insertion-button.d.ts","sourceRoot":"","sources":["../../src/components/initial-insertion-button.tsx"],"names":[],"mappings":"AAEA
|
|
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"}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Item, ItemData } from '@burger-editor/core';
|
|
2
2
|
type AnyItem = Item<ItemData, {}>;
|
|
3
3
|
/**
|
|
4
4
|
* Declarative item editor dialog. Renders the item's `Editor` component
|
|
5
5
|
* with editor state derived via `toEditorState`; on submit the state is
|
|
6
|
-
* converted back with `toItemData` and imported into the item.
|
|
6
|
+
* converted back with `toItemData` and imported into the item. Reads the
|
|
7
|
+
* engine via {@link useEngine}.
|
|
7
8
|
* @param root0
|
|
8
|
-
* @param root0.engine
|
|
9
9
|
* @param root0.item
|
|
10
|
+
* @param root0.containerType
|
|
10
11
|
* @example
|
|
11
12
|
* ```tsx
|
|
12
13
|
* <ItemEditorHost
|
|
13
|
-
* engine={engine}
|
|
14
14
|
* item={open?.type === 'item-editor' ? open.item : null}
|
|
15
|
+
* containerType={open?.type === 'item-editor' ? open.containerType : undefined}
|
|
15
16
|
* />
|
|
16
17
|
* ```
|
|
17
18
|
*/
|
|
18
|
-
export declare function ItemEditorHost({
|
|
19
|
-
readonly engine: BurgerEditorEngine;
|
|
19
|
+
export declare function ItemEditorHost({ item, containerType, }: {
|
|
20
20
|
readonly item: AnyItem | null;
|
|
21
|
+
readonly containerType?: string;
|
|
21
22
|
}): import("react").JSX.Element;
|
|
22
23
|
export {};
|
|
23
24
|
//# sourceMappingURL=item-editor-host.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item-editor-host.d.ts","sourceRoot":"","sources":["../../src/components/item-editor-host.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
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"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import { BurgerEditorEngine } from '@burger-editor/core';
|
|
2
1
|
/**
|
|
3
2
|
* File preview pane. The previewed path comes from the parent (lifted
|
|
4
|
-
* from the
|
|
5
|
-
*
|
|
3
|
+
* from the item's own state); upload progress is read from the engine's
|
|
4
|
+
* `FileBrowserStore`, shared with `FileList`/`FileUploader`.
|
|
6
5
|
* @param root0
|
|
7
|
-
* @param root0.engine
|
|
8
6
|
* @param root0.path
|
|
9
7
|
* @example
|
|
10
8
|
* ```tsx
|
|
11
|
-
* <Preview
|
|
9
|
+
* <Preview path={state.path ?? ''} />
|
|
12
10
|
* ```
|
|
13
11
|
*/
|
|
14
|
-
export declare function Preview({
|
|
15
|
-
readonly engine: BurgerEditorEngine;
|
|
12
|
+
export declare function Preview({ path }: {
|
|
16
13
|
readonly path: string;
|
|
17
14
|
}): import("react").JSX.Element;
|
|
18
15
|
//# sourceMappingURL=preview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../src/components/preview.tsx"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -1 +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,+
|
|
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"}
|
|
@@ -6,6 +6,7 @@ declare module 'react' {
|
|
|
6
6
|
commands?: string;
|
|
7
7
|
label?: string;
|
|
8
8
|
name?: string;
|
|
9
|
+
contentCss?: string;
|
|
9
10
|
};
|
|
10
11
|
}
|
|
11
12
|
}
|
|
@@ -14,7 +15,16 @@ declare module 'react' {
|
|
|
14
15
|
* Rich text field backed by the `<bge-wysiwyg-editor>` custom element
|
|
15
16
|
* (TipTap). The element manages its own DOM; this wrapper feeds the
|
|
16
17
|
* initial value and lifts edits into the editor state via the
|
|
17
|
-
* `transaction` event
|
|
18
|
+
* `transaction` event — subscribed directly on the host element (the
|
|
19
|
+
* event is dispatched with `bubbles: true` on the inner `<bge-wysiwyg>`,
|
|
20
|
+
* so it reaches here without needing to query into it).
|
|
21
|
+
*
|
|
22
|
+
* Content CSS (so the WYSIWYG surface matches the published page's
|
|
23
|
+
* styling) is fetched once per engine via `use()` — only an item whose
|
|
24
|
+
* `Editor` actually renders `WysiwygField` pays for this fetch/suspend,
|
|
25
|
+
* unlike hoisting it to the item-editor host for every item — and
|
|
26
|
+
* passed as the `contentCss` property (React 19 sets it directly on the
|
|
27
|
+
* element, replacing an imperative `el.setStyle()` call).
|
|
18
28
|
* @param root0
|
|
19
29
|
* @param root0.value
|
|
20
30
|
* @param root0.onChange
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wysiwyg-field.d.ts","sourceRoot":"","sources":["../../src/components/wysiwyg-field.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wysiwyg-field.d.ts","sourceRoot":"","sources":["../../src/components/wysiwyg-field.tsx"],"names":[],"mappings":"AAMA,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;gBAId,UAAU,CAAC,EAAE,MAAM,CAAC;aACpB,CAAC;SACF;KACD;CACD;AAoCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;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,+BAuDA"}
|