oasis-editor 0.0.34 → 0.0.35
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/dist/{OasisEditorApp-D6NxTc6l.js → OasisEditorApp-s0BpEyzt.js} +1 -1
- package/dist/{index-CDi9hs5T.js → index-BOYdiFMb.js} +45 -46
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +2 -2
- package/dist/ui/components/Toolbar/renderers/ToolbarItemRenderer.d.ts +1 -13
- package/dist/ui/components/Toolbar/renderers/renderers.d.ts +16 -1
- package/package.json +1 -1
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { ToolbarActionApi, ToolbarItem } from '../schema/items.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Renders a single toolbar item by dispatching on its `type` to the renderer
|
|
6
|
-
* map. Wraps each item so contextual visibility toggles `display` instead of
|
|
7
|
-
* unmounting — required by the imperative OverflowManager (DOM moves break if
|
|
8
|
-
* the child count changes).
|
|
9
|
-
*/
|
|
10
|
-
export declare function ToolbarItemRenderer(props: {
|
|
11
|
-
item: ToolbarItem;
|
|
12
|
-
api: ToolbarActionApi;
|
|
13
|
-
}): JSX.Element;
|
|
1
|
+
export { ToolbarItemRenderer } from './renderers.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component } from 'solid-js';
|
|
1
|
+
import { Component, JSX } from 'solid-js';
|
|
2
2
|
import { ToolbarActionApi, ToolbarItem, ToolbarItemType } from '../schema/items.js';
|
|
3
3
|
|
|
4
4
|
export interface RendererProps<I extends ToolbarItem = ToolbarItem> {
|
|
@@ -12,3 +12,18 @@ export declare const TOOLBAR_RENDERERS: Record<ToolbarItemType, Component<Render
|
|
|
12
12
|
*/
|
|
13
13
|
export declare function registerToolbarRenderer(type: string, component: Component<RendererProps>): void;
|
|
14
14
|
export declare function resolveRenderer(type: string): Component<RendererProps> | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Renders a single toolbar item by dispatching on its `type` to the renderer
|
|
17
|
+
* map. Wraps each item so contextual visibility toggles `display` instead of
|
|
18
|
+
* unmounting — required by the imperative OverflowManager (DOM moves break if
|
|
19
|
+
* the child count changes).
|
|
20
|
+
*
|
|
21
|
+
* Defined here (alongside the renderers it dispatches to) because the two are
|
|
22
|
+
* mutually recursive: menu/group renderers render child items through this
|
|
23
|
+
* component, which in turn resolves them back to those renderers. Keeping the
|
|
24
|
+
* recursion intra-module avoids an import cycle.
|
|
25
|
+
*/
|
|
26
|
+
export declare function ToolbarItemRenderer(props: {
|
|
27
|
+
item: ToolbarItem;
|
|
28
|
+
api: ToolbarActionApi;
|
|
29
|
+
}): JSX.Element;
|