@haklex/rich-ext-tldraw 0.0.11 → 0.0.12
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.
- package/dist/index.mjs +1 -15
- package/dist/transformer.d.ts +1 -9
- package/dist/transformer.d.ts.map +1 -1
- package/package.json +5 -4
package/dist/index.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { usePortalTheme } from "@haklex/rich-style-token";
|
|
|
9
9
|
import { Pencil, Upload, Download, Clipboard, X, PenTool, ZoomIn, ZoomOut, ScanSearch, Maximize2 } from "lucide-react";
|
|
10
10
|
import { DecoratorNode, $insertNodes, $getNodeByKey, createCommand, COMMAND_PRIORITY_EDITOR } from "lexical";
|
|
11
11
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
12
|
+
import { TLDRAW_BLOCK_TRANSFORMER } from "@haklex/rich-headless/transformers";
|
|
12
13
|
const TldrawConfigContext = createContext({});
|
|
13
14
|
function TldrawConfigProvider({
|
|
14
15
|
apiUrl,
|
|
@@ -823,21 +824,6 @@ const TldrawStaticRenderer$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Obj
|
|
|
823
824
|
__proto__: null,
|
|
824
825
|
TldrawStaticRenderer
|
|
825
826
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
826
|
-
const NEVER_MATCH = /a^/;
|
|
827
|
-
const TLDRAW_BLOCK_TRANSFORMER = {
|
|
828
|
-
dependencies: [TldrawNode],
|
|
829
|
-
export: (node) => {
|
|
830
|
-
if (!$isTldrawNode(node)) return null;
|
|
831
|
-
const tldraw = node.exportJSON();
|
|
832
|
-
return `<tldraw>
|
|
833
|
-
${tldraw.snapshot}
|
|
834
|
-
</tldraw>`;
|
|
835
|
-
},
|
|
836
|
-
regExp: NEVER_MATCH,
|
|
837
|
-
replace: () => {
|
|
838
|
-
},
|
|
839
|
-
type: "element"
|
|
840
|
-
};
|
|
841
827
|
export {
|
|
842
828
|
$createTldrawNode,
|
|
843
829
|
$isTldrawNode,
|
package/dist/transformer.d.ts
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { TldrawNode } from './TldrawNode';
|
|
3
|
-
export declare const TLDRAW_BLOCK_TRANSFORMER: {
|
|
4
|
-
dependencies: (typeof TldrawNode)[];
|
|
5
|
-
export: (node: LexicalNode) => string | null;
|
|
6
|
-
regExp: RegExp;
|
|
7
|
-
replace: () => void;
|
|
8
|
-
type: "element";
|
|
9
|
-
};
|
|
1
|
+
export { TLDRAW_BLOCK_TRANSFORMER } from '@haklex/rich-headless/transformers';
|
|
10
2
|
//# sourceMappingURL=transformer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../src/transformer.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../src/transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-ext-tldraw",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "Tldraw whiteboard extension",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -17,9 +17,10 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"tldraw": "^3.12.0",
|
|
20
|
-
"@haklex/rich-editor": "0.0.
|
|
21
|
-
"@haklex/rich-
|
|
22
|
-
"@haklex/rich-style-token": "0.0.
|
|
20
|
+
"@haklex/rich-editor-ui": "0.0.12",
|
|
21
|
+
"@haklex/rich-headless": "0.0.12",
|
|
22
|
+
"@haklex/rich-style-token": "0.0.12",
|
|
23
|
+
"@haklex/rich-editor": "0.0.12"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"@lexical/react": "^0.40.0",
|