@haklex/rich-kit-shiro 0.0.38 → 0.0.39

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.
@@ -3,6 +3,7 @@ import { RichEditor } from "@haklex/rich-editor";
3
3
  import { BlockHandlePlugin } from "@haklex/rich-plugin-block-handle";
4
4
  import { FloatingToolbarPlugin } from "@haklex/rich-plugin-floating-toolbar";
5
5
  import { FloatingLinkEditorPlugin } from "@haklex/rich-plugin-link-edit";
6
+ import { MentionMenuPlugin } from "@haklex/rich-plugin-mention";
6
7
  import { SlashMenuPlugin } from "@haklex/rich-plugin-slash-menu";
7
8
  import { TableRowColumnHandlesPlugin, TableCellResizerPlugin } from "@haklex/rich-plugin-table";
8
9
  import { TldrawEditNode, galleryEditNodes } from "@haklex/rich-renderers";
@@ -21,6 +22,7 @@ function ShiroEditor({
21
22
  actions,
22
23
  children,
23
24
  selfHostnames,
25
+ extraMentionPlatforms,
24
26
  ...props
25
27
  }) {
26
28
  const mergedNodes = useMemo(
@@ -50,6 +52,7 @@ function ShiroEditor({
50
52
  rendererConfig: enhancedEditRendererConfig,
51
53
  actions: /* @__PURE__ */ jsxs(Fragment, { children: [
52
54
  /* @__PURE__ */ jsx(SlashMenuPlugin, {}),
55
+ /* @__PURE__ */ jsx(MentionMenuPlugin, { extraPlatforms: extraMentionPlatforms }),
53
56
  actions
54
57
  ] }),
55
58
  children: [
@@ -1,10 +1,12 @@
1
1
  import { RichEditorProps } from '@haklex/rich-editor';
2
+ import { MentionPlatformDef } from '@haklex/rich-plugin-mention';
2
3
  import { Klass, LexicalNode } from 'lexical';
3
4
  import { ReactNode } from 'react';
4
5
  export interface ShiroEditorProps extends Omit<RichEditorProps, 'rendererConfig' | 'extraNodes' | 'actions'> {
5
6
  extraNodes?: Array<Klass<LexicalNode>>;
6
7
  actions?: ReactNode;
7
8
  selfHostnames?: string[];
9
+ extraMentionPlatforms?: MentionPlatformDef[];
8
10
  }
9
- export declare function ShiroEditor({ extraNodes, actions, children, selfHostnames, ...props }: ShiroEditorProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function ShiroEditor({ extraNodes, actions, children, selfHostnames, extraMentionPlatforms, ...props }: ShiroEditorProps): import("react/jsx-runtime").JSX.Element;
10
12
  //# sourceMappingURL=ShiroEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ShiroEditor.d.ts","sourceRoot":"","sources":["../src/ShiroEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAsB1D,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAYtC,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAC5C,eAAe,EACf,gBAAgB,GAAG,YAAY,GAAG,SAAS,CAC5C;IACC,UAAU,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAA;IACtC,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CACzB;AAED,wBAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,OAAO,EACP,QAAQ,EACR,aAAa,EACb,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAiDlB"}
1
+ {"version":3,"file":"ShiroEditor.d.ts","sourceRoot":"","sources":["../src/ShiroEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAK1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAmBrE,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAYtC,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAC5C,eAAe,EACf,gBAAgB,GAAG,YAAY,GAAG,SAAS,CAC5C;IACC,UAAU,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAA;IACtC,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,qBAAqB,CAAC,EAAE,kBAAkB,EAAE,CAAA;CAC7C;AAED,wBAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,OAAO,EACP,QAAQ,EACR,aAAa,EACb,qBAAqB,EACrB,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAkDlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ShiroRenderer.d.ts","sourceRoot":"","sources":["../src/ShiroRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AASrE,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAUjD,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAC9C,iBAAiB,EACjB,gBAAgB,GAAG,YAAY,CAChC;IACC,UAAU,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAA;CACvC;AAED,wBAAgB,aAAa,CAAC,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAczE"}
1
+ {"version":3,"file":"ShiroRenderer.d.ts","sourceRoot":"","sources":["../src/ShiroRenderer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAErE,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAUjD,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAC9C,iBAAiB,EACjB,gBAAgB,GAAG,YAAY,CAChC;IACC,UAAU,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAA;CACvC;AAED,wBAAgB,aAAa,CAAC,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAczE"}
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-B2kgB1Pc.js";
4
- import { c as cssText } from "./style-gKoE-Yd9.js";
3
+ import { S as ShiroEditor } from "./ShiroEditor-LjcpTAuy.js";
4
+ import { c as cssText } from "./style-DD5swxME.js";
5
5
  const resolvedCss = cssText.replaceAll(":root {", ":root, :host {");
6
6
  function IsolateEditor({
7
7
  theme = "light",