@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,132 @@
1
+ import { BurgerEditorEngine, FileListResult, FileType } from '@burger-editor/core';
2
+ /**
3
+ * A file currently selected for a given `FileType` inside a dialog — the
4
+ * path the item editor should apply, plus the byte size the old
5
+ * `file-select` component-observer payload used to carry.
6
+ */
7
+ export interface SelectedFile {
8
+ readonly path: string;
9
+ readonly fileSize: number;
10
+ }
11
+ /**
12
+ * One upload in flight. Kept in the store (not local component state) so
13
+ * `FileList` and `Preview` — siblings under the same item editor — both
14
+ * see the same synthetic "uploading…" row / progress bar without a
15
+ * broadcast bus.
16
+ */
17
+ export interface UploadProgress {
18
+ readonly fileType: FileType;
19
+ readonly blob: string;
20
+ readonly uploaded: number;
21
+ readonly total: number;
22
+ }
23
+ export interface FileBrowserQuery {
24
+ readonly fileType: FileType;
25
+ readonly page: number;
26
+ readonly filter: string;
27
+ }
28
+ interface FileBrowserState {
29
+ readonly selected: {
30
+ readonly [K in FileType]?: SelectedFile;
31
+ };
32
+ readonly uploads: readonly UploadProgress[];
33
+ }
34
+ type Listener = () => void;
35
+ /**
36
+ * Per-engine file-browser state: paginated/filtered `getFileList` query
37
+ * results (cached by query, read through `use()`), the file currently
38
+ * selected per `FileType`, and in-flight upload progress.
39
+ *
40
+ * React-independent so it can be constructed once per engine and shared
41
+ * by every component that opens onto the same file browser (`FileList`,
42
+ * `FileUploader`, `Preview`, and the item's own `Editor`) without a
43
+ * window-level broadcast bus — see {@link getFileBrowserStore}.
44
+ * @example
45
+ * ```tsx
46
+ * const store = getFileBrowserStore(engine);
47
+ * const result = use(store.read({ fileType: 'image', page: 0, filter: '' }));
48
+ * const selected = useSyncExternalStore(store.subscribe, store.getSnapshot);
49
+ * ```
50
+ */
51
+ export declare class FileBrowserStore {
52
+ #private;
53
+ readonly getSnapshot: () => FileBrowserState;
54
+ readonly subscribe: (listener: Listener) => (() => void);
55
+ /** Whether the engine's `serverAPI` supports deleting files. */
56
+ get canDelete(): boolean;
57
+ constructor(engine: BurgerEditorEngine);
58
+ /**
59
+ * Delete a file from the server and invalidate `fileType`'s cached
60
+ * pages so the list reflects the deletion on next read.
61
+ * @param fileType - The file type the file belongs to
62
+ * @param url - The file's URL
63
+ * @throws {Error} When the server reports the deletion failed
64
+ */
65
+ deleteFile(fileType: FileType, url: string): Promise<void>;
66
+ /**
67
+ * Drop every cached page for `fileType` and notify subscribers, so the
68
+ * next `read()` for that type issues a fresh request (after an upload
69
+ * or a delete changes the underlying list).
70
+ * @param fileType - The file type whose cached pages should be dropped
71
+ */
72
+ invalidate(fileType: FileType): void;
73
+ /**
74
+ * Read (and cache) one page of the file list. The returned promise is
75
+ * stable per `{fileType, page, filter}` plus whether this particular
76
+ * read sent `selected` (see below) — safe to pass to `use()` directly
77
+ * from render, repeated calls with the same query return the same
78
+ * promise instead of re-suspending.
79
+ *
80
+ * The very first read for a given `fileType` also sends the currently
81
+ * selected file's path as `selected`, so the server can jump straight
82
+ * to the page that already contains it (e.g. re-opening an image item
83
+ * whose file isn't on page 0) instead of always starting at `page`.
84
+ * Later reads for that `fileType` (explicit pagination, search, or a
85
+ * post-upload/-delete refetch via {@link invalidate}) omit it — always
86
+ * including it would silently override the page the caller asked for.
87
+ *
88
+ * Because that jump means the response's actual page can differ from
89
+ * the requested one, `selected` is folded into the cache key (see
90
+ * {@link queryKey}): a later item opening the same `fileType` and
91
+ * nominal page never transparently receives the first item's
92
+ * page-jumped response — it misses the cache and gets a real page.
93
+ * @param query - The file type, page and filter to query
94
+ * @returns The (possibly still-pending, cached) file list page
95
+ */
96
+ read(query: FileBrowserQuery): Promise<FileListResult>;
97
+ /**
98
+ * Record the file currently selected for `fileType` — a no-op when the
99
+ * path is unchanged, so callers can call this unconditionally (e.g.
100
+ * every render) without causing redundant notifications.
101
+ * @param fileType - The file type being selected for
102
+ * @param path - The selected file's path, or `''` for "nothing selected"
103
+ * @param fileSize - The selected file's byte size, when known
104
+ */
105
+ select(fileType: FileType, path: string, fileSize?: number): void;
106
+ /**
107
+ * Upload a file, tracking progress in `uploads` (so `FileList` and
108
+ * `Preview` can both show it) and selecting the resulting URL once the
109
+ * server responds — a blob URL is selected immediately so the UI has
110
+ * something to show while the upload is in flight.
111
+ *
112
+ * The blob URL is revoked once the upload settles. On failure the
113
+ * selection is restored to what it was before the upload (empty path if
114
+ * nothing was selected), so a revoked blob URL is never left selected
115
+ * for the dialog to confirm.
116
+ * @param fileType - The file type to upload into
117
+ * @param file - The file to upload
118
+ * @throws {Error} When no `postFile` API is configured, or the server
119
+ * reports the upload failed
120
+ */
121
+ upload(fileType: FileType, file: File): Promise<void>;
122
+ }
123
+ /**
124
+ * Get (creating on first access) the `FileBrowserStore` for `engine`. One
125
+ * store per engine, shared by every component under it — see
126
+ * {@link FileBrowserStore}.
127
+ * @param engine - The engine to get the store for
128
+ * @returns That engine's file-browser store
129
+ */
130
+ export declare function getFileBrowserStore(engine: BurgerEditorEngine): FileBrowserStore;
131
+ export {};
132
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/file-browser/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAClB,cAAc,EACd,QAAQ,EAER,MAAM,qBAAqB,CAAC;AAE7B;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,gBAAgB;IACzB,QAAQ,CAAC,QAAQ,EAAE;QAAE,QAAQ,EAAE,CAAC,IAAI,QAAQ,CAAC,CAAC,EAAE,YAAY;KAAE,CAAC;IAC/D,QAAQ,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;CAC5C;AAQD,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAC;AAwB3B;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,gBAAgB;;IAC5B,QAAQ,CAAC,WAAW,QAAO,gBAAgB,CAAgB;IAE3D,QAAQ,CAAC,SAAS,GAAI,UAAU,QAAQ,KAAG,CAAC,MAAM,IAAI,CAAC,CAKrD;IAYF,gEAAgE;IAChE,IAAI,SAAS,IAAI,OAAO,CAEvB;gBAEW,MAAM,EAAE,kBAAkB;IAItC;;;;;;OAMG;IACG,UAAU,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAYhE;;;;;OAKG;IACH,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAUpC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,IAAI,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC;IA4BtD;;;;;;;OAOG;IACH,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,SAAI,GAAG,IAAI;IAU5D;;;;;;;;;;;;;;OAcG;IACG,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAkD3D;AAID;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,kBAAkB,GAAG,gBAAgB,CAOhF"}
@@ -0,0 +1,39 @@
1
+ import { SelectedFile } from './store.js';
2
+ /**
3
+ * React to a file becoming selected from outside the item's own `Editor`
4
+ * (i.e. via `FileList`, in the same `FileBrowserStore` the item's own
5
+ * `fileType` uses) — `onExternalChange` is called with the new selection.
6
+ *
7
+ * `selected` is shared per-engine across every item that opens onto the
8
+ * same `fileType`, so it can still hold a *previous* item's selection at
9
+ * the moment a new `Editor` instance mounts. This hook's first effect run
10
+ * is always skipped for that reason — reacting to it would load that
11
+ * stale, unrelated selection into the freshly-mounted item's own state,
12
+ * racing the item's own mount-time `fileBrowser.select(fileType, ownPath)`
13
+ * call (whichever one's async work — if any — finishes last wins,
14
+ * corrupting the item with a different item's file). Callers still need
15
+ * their own mount effect to register their own current path with the
16
+ * store; this hook only covers reacting to *later* external changes.
17
+ * @param selected - The `fileType`'s current selection (from
18
+ * `useSyncExternalStore(fileBrowser.subscribe, () =>
19
+ * fileBrowser.getSnapshot().selected[fileType])`)
20
+ * @param getCurrentPath - Returns the item's own current path at call
21
+ * time (a function, not a plain value, so the effect doesn't need it in
22
+ * its dependency array and can stay `[selected]`-only)
23
+ * @param onExternalChange - Called when `selected` changes to a path
24
+ * different from `getCurrentPath()`, after the initial mount is skipped
25
+ * @example
26
+ * ```tsx
27
+ * const selected = useSyncExternalStore(
28
+ * fileBrowser.subscribe,
29
+ * () => fileBrowser.getSnapshot().selected.image,
30
+ * );
31
+ * useExternalFileSelection(
32
+ * selected,
33
+ * () => state.path ?? '',
34
+ * (next) => setState((prev) => ({ ...prev, path: next.path })),
35
+ * );
36
+ * ```
37
+ */
38
+ export declare function useExternalFileSelection(selected: SelectedFile | undefined, getCurrentPath: () => string, onExternalChange: (selected: SelectedFile) => void): void;
39
+ //# sourceMappingURL=use-external-file-selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-external-file-selection.d.ts","sourceRoot":"","sources":["../../src/file-browser/use-external-file-selection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,wBAAwB,CACvC,QAAQ,EAAE,YAAY,GAAG,SAAS,EAClC,cAAc,EAAE,MAAM,MAAM,EAC5B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,GAChD,IAAI,CAmBN"}
@@ -0,0 +1,17 @@
1
+ import { FileBrowserStore } from './store.js';
2
+ /**
3
+ * Get the current engine's `FileBrowserStore` — file-list query cache,
4
+ * current selection and upload progress shared by `FileList`,
5
+ * `FileUploader`, `Preview` and the item's own `Editor`.
6
+ * @returns The engine's file-browser store
7
+ * @example
8
+ * ```tsx
9
+ * const fileBrowser = useFileBrowser();
10
+ * const selected = useSyncExternalStore(
11
+ * fileBrowser.subscribe,
12
+ * () => fileBrowser.getSnapshot().selected.image,
13
+ * );
14
+ * ```
15
+ */
16
+ export declare function useFileBrowser(): FileBrowserStore;
17
+ //# sourceMappingURL=use-file-browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-file-browser.d.ts","sourceRoot":"","sources":["../../src/file-browser/use-file-browser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAMnD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,IAAI,gBAAgB,CAGjD"}
@@ -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"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Controlled numeric input following the editor form markup convention.
3
+ *
4
+ * The `label > span + input` structure is a styling contract: `ui.css`
5
+ * lays out fields with structural selectors
6
+ * (`label:not([for]) > span:has(+ input)`), so it must be preserved.
7
+ * @param root0
8
+ * @param root0.label
9
+ * @param root0.value
10
+ * @param root0.onChange
11
+ * @param root0.name
12
+ * @param root0.min
13
+ * @param root0.max
14
+ * @param root0.step
15
+ * @param root0.disabled
16
+ * @example
17
+ * ```tsx
18
+ * <NumberField
19
+ * label="表示件数"
20
+ * name="bge-count"
21
+ * value={state.count ?? 1}
22
+ * min={1}
23
+ * onChange={(count) => setState({ ...state, count })}
24
+ * />
25
+ * ```
26
+ */
27
+ export declare function NumberField({ label, value, onChange, name, min, max, step, disabled, }: {
28
+ readonly label: string;
29
+ readonly value: number;
30
+ readonly onChange: (value: number) => void;
31
+ readonly name?: string;
32
+ readonly min?: number;
33
+ readonly max?: number;
34
+ readonly step?: number;
35
+ readonly disabled?: boolean;
36
+ }): import('react').JSX.Element;
37
+ //# sourceMappingURL=number-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-field.d.ts","sourceRoot":"","sources":["../../src/form/number-field.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,WAAW,CAAC,EAC3B,KAAK,EACL,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,GAAG,EACH,GAAG,EACH,IAAI,EACJ,QAAQ,GACR,EAAE;IACF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC5B,+BAgBA"}
@@ -0,0 +1,38 @@
1
+ import { SelectableValue } from '@burger-editor/core';
2
+ /**
3
+ * Controlled radio group following the editor form markup convention
4
+ * (`div[role=radiogroup] > label > input + text`).
5
+ *
6
+ * The structure is a styling contract: `ui.css` lays out the group via
7
+ * `[role='radiogroup'] > label` (and appends `:` to the group label), so
8
+ * it must be preserved.
9
+ * @param root0
10
+ * @param root0.label
11
+ * @param root0.value
12
+ * @param root0.onChange
13
+ * @param root0.options
14
+ * @param root0.name
15
+ * @param root0.disabled
16
+ * @example
17
+ * ```tsx
18
+ * <RadioGroup
19
+ * label="配置"
20
+ * name="bge-align"
21
+ * value={state.align ?? 'start'}
22
+ * options={[
23
+ * { value: 'start', label: '左寄せ' },
24
+ * { value: 'end', label: '右寄せ' },
25
+ * ]}
26
+ * onChange={(align) => setState({ ...state, align })}
27
+ * />
28
+ * ```
29
+ */
30
+ export declare function RadioGroup({ label, value, onChange, options, name, disabled, }: {
31
+ readonly label: string;
32
+ readonly value: string;
33
+ readonly onChange: (value: string) => void;
34
+ readonly options: readonly SelectableValue[];
35
+ readonly name?: string;
36
+ readonly disabled?: boolean;
37
+ }): import('react').JSX.Element;
38
+ //# sourceMappingURL=radio-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/form/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAI3D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,UAAU,CAAC,EAC1B,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,QAAQ,GACR,EAAE;IACF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;IAC7C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC5B,+BAwBA"}
@@ -0,0 +1,41 @@
1
+ import { SelectableValue } from '@burger-editor/core';
2
+ /**
3
+ * Controlled select following the editor form markup convention
4
+ * (`label > span + select`).
5
+ *
6
+ * The structure is a styling contract: `ui.css` lays out fields with
7
+ * structural selectors (`label:not([for]) > span:has(+ select)`), so it
8
+ * must be preserved.
9
+ * @param root0
10
+ * @param root0.label
11
+ * @param root0.value
12
+ * @param root0.onChange
13
+ * @param root0.options
14
+ * @param root0.name
15
+ * @param root0.disabled
16
+ * @param root0.describedBy - The ID of the element that describes the select
17
+ * (for example, why it is disabled), wired through `aria-describedby`.
18
+ * @example
19
+ * ```tsx
20
+ * <SelectField
21
+ * label="種類"
22
+ * name="bge-kind"
23
+ * value={state.kind ?? 'normal'}
24
+ * options={[
25
+ * { value: 'normal', label: '通常' },
26
+ * { value: 'wide', label: 'ワイド' },
27
+ * ]}
28
+ * onChange={(kind) => setState({ ...state, kind })}
29
+ * />
30
+ * ```
31
+ */
32
+ export declare function SelectField({ label, value, onChange, options, name, disabled, describedBy, }: {
33
+ readonly label: string;
34
+ readonly value: string;
35
+ readonly onChange: (value: string) => void;
36
+ readonly options: readonly SelectableValue[];
37
+ readonly name?: string;
38
+ readonly disabled?: boolean;
39
+ readonly describedBy?: string;
40
+ }): import('react').JSX.Element;
41
+ //# sourceMappingURL=select-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-field.d.ts","sourceRoot":"","sources":["../../src/form/select-field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,WAAW,CAAC,EAC3B,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,WAAW,GACX,EAAE;IACF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;IAC7C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC9B,+BAkBA"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Controlled multi-line text input following the editor form markup
3
+ * convention.
4
+ *
5
+ * The `label > span + textarea` structure is a styling contract: `ui.css`
6
+ * lays out fields with structural selectors
7
+ * (`label:not([for]) > span:has(+ textarea)`), so it must be preserved.
8
+ * @param root0
9
+ * @param root0.label
10
+ * @param root0.value
11
+ * @param root0.onChange
12
+ * @param root0.name
13
+ * @param root0.rows
14
+ * @param root0.disabled
15
+ * @example
16
+ * ```tsx
17
+ * <TextArea
18
+ * label="説明文"
19
+ * name="bge-text"
20
+ * value={state.text ?? ''}
21
+ * onChange={(text) => setState({ ...state, text })}
22
+ * />
23
+ * ```
24
+ */
25
+ export declare function TextArea({ label, value, onChange, name, rows, disabled, }: {
26
+ readonly label: string;
27
+ readonly value: string;
28
+ readonly onChange: (value: string) => void;
29
+ readonly name?: string;
30
+ readonly rows?: number;
31
+ readonly disabled?: boolean;
32
+ }): import('react').JSX.Element;
33
+ //# sourceMappingURL=text-area.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-area.d.ts","sourceRoot":"","sources":["../../src/form/text-area.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,QAAQ,CAAC,EACxB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,QAAQ,GACR,EAAE;IACF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC5B,+BAaA"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Controlled single-line text input following the editor form markup
3
+ * convention (`label > span + input`).
4
+ *
5
+ * The structure is a styling contract: `ui.css` lays out fields with
6
+ * structural selectors (`label:not([for]) > span:has(+ input)`) instead
7
+ * of `for`/`id` wiring, so it must be preserved.
8
+ * @param root0
9
+ * @param root0.label
10
+ * @param root0.value
11
+ * @param root0.onChange
12
+ * @param root0.type
13
+ * @param root0.name
14
+ * @param root0.disabled
15
+ * @param root0.placeholder
16
+ * @param root0.describedBy
17
+ * @param root0.required - Marks the field as required for assistive
18
+ * technology via `aria-required`. The native `required` attribute is not
19
+ * used: `type` is dynamic here, so markup linting cannot tell it is valid.
20
+ * The dialog form is `noValidate`, so the browser never blocks submission;
21
+ * the item's `toItemData` is what rejects an empty value.
22
+ * @param root0.onBlur - Called when focus leaves the input. Use it to
23
+ * normalize a value (for example, to restore a default when the field was
24
+ * left empty) once the user has finished typing, not on every keystroke.
25
+ * @example
26
+ * ```tsx
27
+ * <TextField
28
+ * label="URL"
29
+ * name="bge-link"
30
+ * value={state.href ?? ''}
31
+ * onChange={(href) => setState({ ...state, href })}
32
+ * />
33
+ * ```
34
+ */
35
+ export declare function TextField({ label, value, onChange, type, name, disabled, placeholder, describedBy, required, onBlur, }: {
36
+ readonly label: string;
37
+ readonly value: string;
38
+ readonly onChange: (value: string) => void;
39
+ readonly type?: 'text' | 'url' | 'email';
40
+ readonly name?: string;
41
+ readonly disabled?: boolean;
42
+ readonly placeholder?: string;
43
+ readonly describedBy?: string;
44
+ readonly required?: boolean;
45
+ readonly onBlur?: () => void;
46
+ }): import('react').JSX.Element;
47
+ //# sourceMappingURL=text-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../src/form/text-field.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,SAAS,CAAC,EACzB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,IAAa,EACb,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,WAAW,EACX,QAAQ,EACR,MAAM,GACN,EAAE;IACF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;IACzC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,+BAiBA"}
package/dist/index.d.ts CHANGED
@@ -1,17 +1,53 @@
1
1
  import { BurgerEditorEngineOptions, BurgerEditorEngine } from '@burger-editor/core';
2
2
  export declare const version: string;
3
3
  /**
4
+ * 本稿⇄下書き切替UIをビューエリアの直前にマウントする
4
5
  *
5
- * @param engine
6
+ * `createBurgerEditorClient` に含めず分離しているのは、配置位置
7
+ * (エディタの外側のどこに置くか)がアプリケーション側の判断のため。
8
+ * 単一rootの対象外(`engine.viewArea`の外側、任意のDOM位置に置かれる
9
+ * ため): `createReactView()`が持つ単一rootとは別の独立したReact root
10
+ * を持つが、`EngineProvider`で包むため`DraftSwitcher`自体は
11
+ * `useEngine()`で取得する(propsは受け取らない)。
12
+ * @param engine - 対象エンジン。下書きが無い構成では何もしない
13
+ * @returns マウントハンドル(`cleanUp`でアンマウント)。下書きが無い場合はnull
14
+ * @example
15
+ * ```ts
16
+ * const { engine } = await createBurgerEditorClient(options);
17
+ * attachDraftSwitcher(engine);
18
+ * ```
6
19
  */
7
- export declare function attachDraftSwitcher(engine: BurgerEditorEngine): {
8
- cleanUp: () => void;
9
- } | null;
20
+ export declare function attachDraftSwitcher(engine: BurgerEditorEngine): (Disposable & {
21
+ cleanUp(): void;
22
+ }) | null;
10
23
  /**
24
+ * BurgerEditorのクライアントUIを組み立てるメインエントリ
11
25
  *
12
- * @param options
26
+ * headlessなエンジンを生成し、React製のUI(編集エリア・ブロックメニュー・
27
+ * 初期挿入ボタン・ダイアログ群)とエンジン操作コマンドのディスパッチ
28
+ * テーブルを配線する。エンジンへのUI注入点は `view` ひとつで、この関数が
29
+ * React実装を供給するためオプションから除外している。
30
+ * @param options - エンジンオプション(UI供給分を除く)
31
+ * @returns 生成済みエンジンを含むハンドル
32
+ * @example
33
+ * ```ts
34
+ * import { createBurgerEditorClient, attachDraftSwitcher } from '@burger-editor/client';
35
+ * import { generalCSS } from '@burger-editor/blocks';
36
+ * import { items } from '@burger-editor/blocks/editor';
37
+ *
38
+ * const { engine } = await createBurgerEditorClient({
39
+ * root: '#editor',
40
+ * config,
41
+ * catalog,
42
+ * items,
43
+ * initialContents: { main, draft },
44
+ * generalCSS,
45
+ * fileIO: serverAPI,
46
+ * });
47
+ * attachDraftSwitcher(engine);
48
+ * ```
13
49
  */
14
- export declare function createBurgerEditorClient(options: Omit<BurgerEditorEngineOptions, 'ui' | 'blockMenu'>): Promise<{
50
+ export declare function createBurgerEditorClient(options: Omit<BurgerEditorEngineOptions, 'view'>): Promise<{
15
51
  engine: BurgerEditorEngine;
16
52
  }>;
17
53
  export { Migrator } from '@burger-editor/migrator';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAazD,OAAO,iBAAiB,CAAC;AAEzB,eAAO,MAAM,OAAO,QAAc,CAAC;AAEnC;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,kBAAkB;;SAc7D;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAC7C,OAAO,EAAE,IAAI,CAAC,yBAAyB,EAAE,IAAI,GAAG,WAAW,CAAC;;GAqG5D;AAED,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAWzD,OAAO,gBAAgB,CAAC;AAExB,eAAO,MAAM,OAAO,QAAc,CAAC;AAEnC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,kBAAkB;;UAgB7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,wBAAwB,CAC7C,OAAO,EAAE,IAAI,CAAC,yBAAyB,EAAE,MAAM,CAAC;;GAsChD;AAED,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,21 @@
1
+ declare module 'react' {
2
+ interface ButtonHTMLAttributes<T> {
3
+ /**
4
+ * Id of the element shown as an interest-triggered hint popover when
5
+ * the button is hovered or focused.
6
+ */
7
+ interestfor?: string;
8
+ }
9
+ interface HTMLAttributes<T> {
10
+ /** Popover state; `hint` is dismissed with Esc without moving focus. */
11
+ popover?: '' | 'auto' | 'manual' | 'hint';
12
+ }
13
+ }
14
+ /**
15
+ * Re-exported so module augmentation survives d.ts bundling.
16
+ */
17
+ export interface InterestHintAttributes {
18
+ readonly interestfor?: string;
19
+ readonly popover?: '' | 'auto' | 'manual' | 'hint';
20
+ }
21
+ //# sourceMappingURL=interest-hints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interest-hints.d.ts","sourceRoot":"","sources":["../src/interest-hints.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,OAAO,CAAC;AAEf,OAAO,QAAQ,OAAO,CAAC;IAEtB,UAAU,oBAAoB,CAAC,CAAC;QAC/B;;;WAGG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;KACrB;IAGD,UAAU,cAAc,CAAC,CAAC;QACzB,wEAAwE;QACxE,OAAO,CAAC,EAAE,EAAE,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;KAC1C;CACD;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;CACnD"}
@@ -0,0 +1,24 @@
1
+ declare module 'react' {
2
+ interface ButtonHTMLAttributes<T> {
3
+ /**
4
+ * Built-in (`show-modal`, `close`, …) or custom (`--`-prefixed)
5
+ * command to invoke on the `commandfor` target.
6
+ */
7
+ command?: string;
8
+ /**
9
+ * The id of the element the command is dispatched on. Must be in
10
+ * the same document as the button.
11
+ */
12
+ commandfor?: string;
13
+ }
14
+ }
15
+ /**
16
+ * Invoker Commands API attributes for buttons. Re-exported (rather than
17
+ * imported for side effects only) so that the module augmentation above
18
+ * survives d.ts bundling and reaches consumers.
19
+ */
20
+ export interface InvokerCommandAttributes {
21
+ readonly command?: string;
22
+ readonly commandfor?: string;
23
+ }
24
+ //# sourceMappingURL=invoker-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invoker-commands.d.ts","sourceRoot":"","sources":["../src/invoker-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,OAAO,CAAC;AAEf,OAAO,QAAQ,OAAO,CAAC;IAEtB,UAAU,oBAAoB,CAAC,CAAC;QAC/B;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB;;;WAGG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;KACpB;CACD;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACxC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC7B"}