@haklex/rich-kit-shiro 0.0.100 → 0.0.102

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.
@@ -20,6 +20,7 @@ const defaultExtraNodes = [
20
20
  function ShiroEditor({
21
21
  extraNodes,
22
22
  actions,
23
+ floatingToolbarActions,
23
24
  children,
24
25
  selfHostnames,
25
26
  extraMentionPlatforms,
@@ -58,7 +59,7 @@ function ShiroEditor({
58
59
  ] }),
59
60
  children: [
60
61
  /* @__PURE__ */ jsx(BlockHandlePlugin, {}),
61
- /* @__PURE__ */ jsx(FloatingToolbarPlugin, {}),
62
+ /* @__PURE__ */ jsx(FloatingToolbarPlugin, { actions: floatingToolbarActions }),
62
63
  /* @__PURE__ */ jsx(FloatingLinkEditorPlugin, { renderExtraActions: renderLinkExtraActions }),
63
64
  /* @__PURE__ */ jsx(ExcalidrawPlugin, {}),
64
65
  /* @__PURE__ */ jsx(EmbedPlugin, { selfHostnames }),
@@ -6,7 +6,9 @@ export interface ShiroEditorProps extends Omit<RichEditorProps, 'rendererConfig'
6
6
  actions?: ReactNode;
7
7
  extraMentionPlatforms?: MentionPlatformDef[];
8
8
  extraNodes?: Array<Klass<LexicalNode>>;
9
+ /** Extra controls rendered in the floating selection toolbar (e.g. Ask AI). */
10
+ floatingToolbarActions?: ReactNode;
9
11
  selfHostnames?: string[];
10
12
  }
11
- export declare function ShiroEditor({ extraNodes, actions, children, selfHostnames, extraMentionPlatforms, variant, theme, ...props }: ShiroEditorProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function ShiroEditor({ extraNodes, actions, floatingToolbarActions, children, selfHostnames, extraMentionPlatforms, variant, theme, ...props }: ShiroEditorProps): import("react/jsx-runtime").JSX.Element;
12
14
  //# sourceMappingURL=ShiroEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ShiroEditor.d.ts","sourceRoot":"","sources":["../src/ShiroEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KA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,CAAC,WAAW,CAAC,CAAC,CAAC;IACvC,+EAA+E;IAC/E,sBAAsB,CAAC,EAAE,SAAS,CAAC;IACnC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,wBAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,OAAO,EACP,sBAAsB,EACtB,QAAQ,EACR,aAAa,EACb,qBAAqB,EACrB,OAAmB,EACnB,KAAe,EACf,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAsDlB"}
package/dist/editor.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import root from "react-shadow";
3
- import { S as ShiroEditor } from "./ShiroEditor-BYO8MHFq.js";
4
- import { c as cssText } from "./style-NAFUqJSd.js";
3
+ import { S as ShiroEditor } from "./ShiroEditor-CehZVqb3.js";
4
+ import { c as cssText } from "./style-lLzghQY3.js";
5
5
  const resolvedCss = cssText.replaceAll(":root {", ":root, :host {");
6
6
  function IsolateEditor({ theme = "light", className, ...props }) {
7
7
  return /* @__PURE__ */ jsx(root.div, { className, children: /* @__PURE__ */ jsxs("div", { suppressHydrationWarning: true, "data-theme": theme, id: "shadow-html", children: [
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ import "@haklex/rich-ext-embed/style.css";
14
14
  import "@haklex/rich-ext-excalidraw/style.css";
15
15
  import "@haklex/rich-ext-nested-doc/style.css";
16
16
  import "katex/dist/katex.min.css";
17
- import { S } from "./ShiroEditor-BYO8MHFq.js";
17
+ import { S } from "./ShiroEditor-CehZVqb3.js";
18
18
  import { S as S2 } from "./ShiroRenderer-lHgA6aH9.js";
19
19
  import { ColorSchemeProvider, FootnoteDefinitionsProvider, LinkFavicon, PresentDialogProvider, RichEditor, getVariantClass, useColorScheme, useFootnoteContent, useFootnoteDefinitions, useFootnoteDisplayNumber, useRendererConfig, useRendererMode } from "@haklex/rich-editor";
20
20
  import { createRendererDecoration } from "@haklex/rich-editor/renderers";
package/dist/renderer.mjs CHANGED
@@ -8,7 +8,7 @@ import "katex/dist/katex.min.css";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import root from "react-shadow";
10
10
  import { S as ShiroRenderer } from "./ShiroRenderer-lHgA6aH9.js";
11
- import { c as cssText } from "./style-NAFUqJSd.js";
11
+ import { c as cssText } from "./style-lLzghQY3.js";
12
12
  const resolvedCss = cssText.replaceAll(":root {", ":root, :host {");
13
13
  function IsolateRenderer({
14
14
  theme = "light",