@haklex/rich-plugin-floating-toolbar 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.
@@ -1,3 +1,6 @@
1
- import { ReactElement } from 'react';
2
- export declare function FloatingToolbarPlugin(): ReactElement | null;
1
+ import { ReactElement, ReactNode } from 'react';
2
+ export interface FloatingToolbarPluginProps {
3
+ actions?: ReactNode;
4
+ }
5
+ export declare function FloatingToolbarPlugin({ actions, }?: FloatingToolbarPluginProps): ReactElement | null;
3
6
  //# sourceMappingURL=FloatingToolbarPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FloatingToolbarPlugin.d.ts","sourceRoot":"","sources":["../src/FloatingToolbarPlugin.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAgM1C,wBAAgB,qBAAqB,IAAI,YAAY,GAAG,IAAI,CAogB3D"}
1
+ {"version":3,"file":"FloatingToolbarPlugin.d.ts","sourceRoot":"","sources":["../src/FloatingToolbarPlugin.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAgMrD,MAAM,WAAW,0BAA0B;IACzC,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,OAAO,GACR,GAAE,0BAA+B,GAAG,YAAY,GAAG,IAAI,CA2gBvD"}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ export type { FloatingToolbarPluginProps } from './FloatingToolbarPlugin';
1
2
  export { FloatingToolbarPlugin } from './FloatingToolbarPlugin';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
package/dist/index.mjs CHANGED
@@ -156,7 +156,9 @@ function collectThemeVarNames(contract, output) {
156
156
  return output;
157
157
  }
158
158
  const THEME_VAR_NAMES = Array.from(collectThemeVarNames(vars, /* @__PURE__ */ new Set()));
159
- function FloatingToolbarPlugin() {
159
+ function FloatingToolbarPlugin({
160
+ actions
161
+ } = {}) {
160
162
  const [editor] = useLexicalComposerContext();
161
163
  const { className: portalClassName } = usePortalTheme();
162
164
  const portalContainer = usePortalContainer();
@@ -529,7 +531,11 @@ function FloatingToolbarPlugin() {
529
531
  /* @__PURE__ */ jsx(ToolbarButton, { active: state.isLink, ariaLabel: "Link", onClick: handleLink, children: /* @__PURE__ */ jsx(Link, { size: ICON_SIZE, strokeWidth: ICON_STROKE }) }),
530
532
  /* @__PURE__ */ jsx(ToolbarButton, { active: state.isRuby, ariaLabel: "Ruby annotation", onClick: handleRuby, children: /* @__PURE__ */ jsx(Languages, { size: ICON_SIZE, strokeWidth: ICON_STROKE }) }),
531
533
  /* @__PURE__ */ jsx("span", { className: separator }),
532
- /* @__PURE__ */ jsx(ColorPicker, { currentColor: state.fontColor || "inherit", onSelect: handleColor })
534
+ /* @__PURE__ */ jsx(ColorPicker, { currentColor: state.fontColor || "inherit", onSelect: handleColor }),
535
+ actions && /* @__PURE__ */ jsxs(Fragment, { children: [
536
+ /* @__PURE__ */ jsx("span", { className: separator }),
537
+ actions
538
+ ] })
533
539
  ]
534
540
  }
535
541
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-plugin-floating-toolbar",
3
- "version": "0.0.100",
3
+ "version": "0.0.102",
4
4
  "description": "Floating toolbar plugin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,9 +21,9 @@
21
21
  "dist"
22
22
  ],
23
23
  "dependencies": {
24
- "@haklex/rich-editor": "0.0.100",
25
- "@haklex/rich-style-token": "0.0.100",
26
- "@haklex/rich-editor-ui": "0.0.100"
24
+ "@haklex/rich-editor-ui": "0.0.102",
25
+ "@haklex/rich-style-token": "0.0.102",
26
+ "@haklex/rich-editor": "0.0.102"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@lexical/link": "^0.42.0",