@haklex/rich-plugin-link-edit 0.0.8 → 0.0.10
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,10 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
export
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
export interface FloatingLinkEditorPluginProps {
|
|
3
|
+
renderExtraActions?: (props: {
|
|
4
|
+
url: string;
|
|
5
|
+
linkKey: string;
|
|
6
|
+
actionButtonClassName: string;
|
|
7
|
+
}) => ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare function FloatingLinkEditorPlugin({ renderExtraActions, }?: FloatingLinkEditorPluginProps): ReactElement | null;
|
|
3
10
|
//# sourceMappingURL=FloatingLinkEditorPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingLinkEditorPlugin.d.ts","sourceRoot":"","sources":["../src/FloatingLinkEditorPlugin.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"FloatingLinkEditorPlugin.d.ts","sourceRoot":"","sources":["../src/FloatingLinkEditorPlugin.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAoBnE,MAAM,WAAW,6BAA6B;IAC5C,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE;QAC3B,GAAG,EAAE,MAAM,CAAA;QACX,OAAO,EAAE,MAAM,CAAA;QACf,qBAAqB,EAAE,MAAM,CAAA;KAC9B,KAAK,SAAS,CAAA;CAChB;AAED,wBAAgB,wBAAwB,CAAC,EACvC,kBAAkB,GACnB,GAAE,6BAAkC,GAAG,YAAY,GAAG,IAAI,CAqO1D"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { FloatingLinkEditorPlugin } from './FloatingLinkEditorPlugin';
|
|
1
|
+
export { FloatingLinkEditorPlugin, type FloatingLinkEditorPluginProps, } from './FloatingLinkEditorPlugin';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,KAAK,6BAA6B,GACnC,MAAM,4BAA4B,CAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -22,7 +22,9 @@ function $findLinkNode(node) {
|
|
|
22
22
|
}
|
|
23
23
|
return null;
|
|
24
24
|
}
|
|
25
|
-
function FloatingLinkEditorPlugin(
|
|
25
|
+
function FloatingLinkEditorPlugin({
|
|
26
|
+
renderExtraActions
|
|
27
|
+
} = {}) {
|
|
26
28
|
const [editor] = useLexicalComposerContext();
|
|
27
29
|
const inputRef = useRef(null);
|
|
28
30
|
const panelFocusedRef = useRef(false);
|
|
@@ -227,6 +229,11 @@ function FloatingLinkEditorPlugin() {
|
|
|
227
229
|
]
|
|
228
230
|
}
|
|
229
231
|
),
|
|
232
|
+
renderExtraActions?.({
|
|
233
|
+
url: linkState.url,
|
|
234
|
+
linkKey: linkState.linkKey,
|
|
235
|
+
actionButtonClassName: `${actionButton} ${semanticClassNames.actionButton}`
|
|
236
|
+
}),
|
|
230
237
|
/* @__PURE__ */ jsxs(
|
|
231
238
|
"button",
|
|
232
239
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-plugin-link-edit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "Link editing plugin",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@haklex/rich-editor-ui": "0.0.
|
|
20
|
-
"@haklex/rich-style-token": "0.0.
|
|
19
|
+
"@haklex/rich-editor-ui": "0.0.10",
|
|
20
|
+
"@haklex/rich-style-token": "0.0.10"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@lexical/link": "^0.40.0",
|