@haklex/rich-kit-shiro 0.0.66 → 0.0.68

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.
@@ -8,7 +8,7 @@ import { SlashMenuPlugin } from "@haklex/rich-plugin-slash-menu";
8
8
  import { TableRowColumnHandlesPlugin, TableCellResizerPlugin } from "@haklex/rich-plugin-table";
9
9
  import { ExcalidrawEditNode, embedEditNodes, linkCardEditNodes, katexEditNodes, galleryEditNodes, codeSnippetEditNodes, ConvertToLinkCardAction, enhancedEditRendererConfig, ExcalidrawPlugin, EmbedPlugin, PasteLinkCardPlugin } from "@haklex/rich-renderers-edit";
10
10
  import { useMemo, useCallback } from "react";
11
- import { S as ShiroRenderer } from "./ShiroRenderer-D8y1KzIM.js";
11
+ import { S as ShiroRenderer } from "./ShiroRenderer-BiO7D9Fq.js";
12
12
  const defaultExtraNodes = [
13
13
  ExcalidrawEditNode,
14
14
  ...embedEditNodes,
@@ -1,4 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
+ import { nestedDocNodes } from "@haklex/rich-ext-nested-doc/static";
2
3
  import { ExcalidrawNode, embedNodes, galleryNodes, codeSnippetNodes, enhancedRendererConfig } from "@haklex/rich-renderers";
3
4
  import { RichRenderer } from "@haklex/rich-static-renderer";
4
5
  import { useMemo } from "react";
@@ -6,13 +7,10 @@ const defaultExtraNodes = [
6
7
  ExcalidrawNode,
7
8
  ...embedNodes,
8
9
  ...galleryNodes,
9
- ...codeSnippetNodes
10
+ ...codeSnippetNodes,
11
+ ...nestedDocNodes
10
12
  ];
11
- function ShiroRenderer({
12
- extraNodes,
13
- rendererConfig,
14
- ...props
15
- }) {
13
+ function ShiroRenderer({ extraNodes, rendererConfig, ...props }) {
16
14
  const mergedNodes = useMemo(
17
15
  () => extraNodes ? [...defaultExtraNodes, ...extraNodes] : defaultExtraNodes,
18
16
  [extraNodes]
@@ -21,14 +19,7 @@ function ShiroRenderer({
21
19
  () => rendererConfig ? { ...enhancedRendererConfig, ...rendererConfig } : enhancedRendererConfig,
22
20
  [rendererConfig]
23
21
  );
24
- return /* @__PURE__ */ jsx(
25
- RichRenderer,
26
- {
27
- ...props,
28
- extraNodes: mergedNodes,
29
- rendererConfig: mergedConfig
30
- }
31
- );
22
+ return /* @__PURE__ */ jsx(RichRenderer, { ...props, extraNodes: mergedNodes, rendererConfig: mergedConfig });
32
23
  }
33
24
  export {
34
25
  ShiroRenderer as S
@@ -1 +1 @@
1
- {"version":3,"file":"ShiroRenderer.d.ts","sourceRoot":"","sources":["../src/ShiroRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAQzD,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;IACtC,cAAc,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;CACzC;AAED,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,cAAc,EACd,GAAG,KAAK,EACT,EAAE,kBAAkB,2CAsBpB"}
1
+ {"version":3,"file":"ShiroRenderer.d.ts","sourceRoot":"","sources":["../src/ShiroRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAS1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEtE,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAWlD,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAC9C,iBAAiB,EACjB,gBAAgB,GAAG,YAAY,CAChC;IACC,UAAU,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;CAC1C;AAED,wBAAgB,aAAa,CAAC,EAAE,UAAU,EAAE,cAAc,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAazF"}
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-DF352TP2.js";
4
- import { c as cssText } from "./style-CwdYBOlE.js";
3
+ import { S as ShiroEditor } from "./ShiroEditor-CQlJFd4n.js";
4
+ import { c as cssText } from "./style-BboVOj9s.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: [
@@ -1,5 +1,5 @@
1
- export type { ColorScheme, FootnoteDefinitionsContextValue, LinkFaviconProps, RendererConfig, RendererMode, RichEditorProps, RichEditorVariant, } from '@haklex/rich-editor';
2
- export { ColorSchemeProvider, getVariantClass, LinkFavicon, RichEditor, useColorScheme, useRendererConfig, useRendererMode, } from '@haklex/rich-editor';
1
+ export type { ColorScheme, FootnoteDefinitionsContextValue, LinkFaviconProps, PresentDialogFn, PresentDialogProps, RendererConfig, RendererMode, RichEditorProps, RichEditorVariant, } from '@haklex/rich-editor';
2
+ export { ColorSchemeProvider, getVariantClass, LinkFavicon, PresentDialogProvider, RichEditor, useColorScheme, useRendererConfig, useRendererMode, } from '@haklex/rich-editor';
3
3
  export { FootnoteDefinitionsProvider, useFootnoteContent, useFootnoteDefinitions, useFootnoteDisplayNumber, } from '@haklex/rich-editor';
4
4
  export type { SlashMenuItemConfig } from '@haklex/rich-editor/commands';
5
5
  export { createRendererDecoration } from '@haklex/rich-editor/renderers';
@@ -1 +1 @@
1
- {"version":3,"file":"editor-core.d.ts","sourceRoot":"","sources":["../../src/exports/editor-core.ts"],"names":[],"mappings":"AACA,YAAY,EACV,WAAW,EACX,+BAA+B,EAC/B,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAG7B,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC"}
1
+ {"version":3,"file":"editor-core.d.ts","sourceRoot":"","sources":["../../src/exports/editor-core.ts"],"names":[],"mappings":"AACA,YAAY,EACV,WAAW,EACX,+BAA+B,EAC/B,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,qBAAqB,EACrB,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAG7B,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -1,9 +1,10 @@
1
- import { ColorSchemeProvider, FootnoteDefinitionsProvider, LinkFavicon, RichEditor, getVariantClass, useColorScheme, useFootnoteContent, useFootnoteDefinitions, useFootnoteDisplayNumber, useRendererConfig, useRendererMode } from "@haklex/rich-editor";
1
+ import { ColorSchemeProvider, FootnoteDefinitionsProvider, LinkFavicon, PresentDialogProvider, RichEditor, getVariantClass, useColorScheme, useFootnoteContent, useFootnoteDefinitions, useFootnoteDisplayNumber, useRendererConfig, useRendererMode } from "@haklex/rich-editor";
2
2
  import { createRendererDecoration } from "@haklex/rich-editor/renderers";
3
3
  export {
4
4
  ColorSchemeProvider,
5
5
  FootnoteDefinitionsProvider,
6
6
  LinkFavicon,
7
+ PresentDialogProvider,
7
8
  RichEditor,
8
9
  createRendererDecoration,
9
10
  getVariantClass,