@edifice.io/tiptap-extensions 1.5.16-develop-rc.2
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/.turbo/turbo-build.log +58 -0
- package/.turbo/turbo-format.log +142 -0
- package/.turbo/turbo-lint.log +5 -0
- package/LICENSE +661 -0
- package/dist/abbr/abbr.cjs +33 -0
- package/dist/abbr/abbr.cjs.map +1 -0
- package/dist/abbr/abbr.d.ts +16 -0
- package/dist/abbr/abbr.js +37 -0
- package/dist/abbr/abbr.js.map +1 -0
- package/dist/abbr/index.d.ts +3 -0
- package/dist/alert/alert.cjs +33 -0
- package/dist/alert/alert.cjs.map +1 -0
- package/dist/alert/alert.d.ts +2 -0
- package/dist/alert/alert.js +43 -0
- package/dist/alert/alert.js.map +1 -0
- package/dist/alert/index.d.ts +3 -0
- package/dist/attachment/attachment.cjs +74 -0
- package/dist/attachment/attachment.cjs.map +1 -0
- package/dist/attachment/attachment.d.ts +12 -0
- package/dist/attachment/attachment.js +86 -0
- package/dist/attachment/attachment.js.map +1 -0
- package/dist/attachment/index.d.ts +3 -0
- package/dist/audio/audio.cjs +55 -0
- package/dist/audio/audio.cjs.map +1 -0
- package/dist/audio/audio.d.ts +23 -0
- package/dist/audio/audio.js +55 -0
- package/dist/audio/audio.js.map +1 -0
- package/dist/audio/index.d.ts +3 -0
- package/dist/font-size/font-size.cjs +49 -0
- package/dist/font-size/font-size.cjs.map +1 -0
- package/dist/font-size/font-size.d.ts +19 -0
- package/dist/font-size/font-size.js +51 -0
- package/dist/font-size/font-size.js.map +1 -0
- package/dist/font-size/index.d.ts +3 -0
- package/dist/heading/heading.cjs +62 -0
- package/dist/heading/heading.cjs.map +1 -0
- package/dist/heading/heading.d.ts +17 -0
- package/dist/heading/heading.js +60 -0
- package/dist/heading/heading.js.map +1 -0
- package/dist/heading/index.d.ts +3 -0
- package/dist/highlight/highlight.cjs +26 -0
- package/dist/highlight/highlight.cjs.map +1 -0
- package/dist/highlight/highlight.d.ts +4 -0
- package/dist/highlight/highlight.js +26 -0
- package/dist/highlight/highlight.js.map +1 -0
- package/dist/highlight/index.d.ts +3 -0
- package/dist/hyperlink/hyperlink.cjs +48 -0
- package/dist/hyperlink/hyperlink.cjs.map +1 -0
- package/dist/hyperlink/hyperlink.d.ts +38 -0
- package/dist/hyperlink/hyperlink.js +55 -0
- package/dist/hyperlink/hyperlink.js.map +1 -0
- package/dist/hyperlink/index.d.ts +3 -0
- package/dist/iframe/iframe.cjs +70 -0
- package/dist/iframe/iframe.cjs.map +1 -0
- package/dist/iframe/iframe.d.ts +18 -0
- package/dist/iframe/iframe.js +85 -0
- package/dist/iframe/iframe.js.map +1 -0
- package/dist/iframe/index.d.ts +3 -0
- package/dist/image/custom-image.cjs +163 -0
- package/dist/image/custom-image.cjs.map +1 -0
- package/dist/image/custom-image.d.ts +27 -0
- package/dist/image/custom-image.js +181 -0
- package/dist/image/custom-image.js.map +1 -0
- package/dist/image/index.d.ts +3 -0
- package/dist/index.cjs +44 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/line-height/index.d.ts +3 -0
- package/dist/line-height/line-height.cjs +34 -0
- package/dist/line-height/line-height.cjs.map +1 -0
- package/dist/line-height/line-height.d.ts +2 -0
- package/dist/line-height/line-height.js +36 -0
- package/dist/line-height/line-height.js.map +1 -0
- package/dist/linker/index.d.ts +3 -0
- package/dist/linker/linker.cjs +96 -0
- package/dist/linker/linker.cjs.map +1 -0
- package/dist/linker/linker.d.ts +30 -0
- package/dist/linker/linker.js +104 -0
- package/dist/linker/linker.js.map +1 -0
- package/dist/mathjax/index.d.ts +3 -0
- package/dist/mathjax/mathjax.cjs +48 -0
- package/dist/mathjax/mathjax.cjs.map +1 -0
- package/dist/mathjax/mathjax.d.ts +2 -0
- package/dist/mathjax/mathjax.js +50 -0
- package/dist/mathjax/mathjax.js.map +1 -0
- package/dist/paragraph/index.d.ts +3 -0
- package/dist/paragraph/paragraph.cjs +14 -0
- package/dist/paragraph/paragraph.cjs.map +1 -0
- package/dist/paragraph/paragraph.d.ts +16 -0
- package/dist/paragraph/paragraph.js +14 -0
- package/dist/paragraph/paragraph.js.map +1 -0
- package/dist/speech-recognition/index.d.ts +3 -0
- package/dist/speech-recognition/speech-recognition.cjs +77 -0
- package/dist/speech-recognition/speech-recognition.cjs.map +1 -0
- package/dist/speech-recognition/speech-recognition.d.ts +21 -0
- package/dist/speech-recognition/speech-recognition.js +77 -0
- package/dist/speech-recognition/speech-recognition.js.map +1 -0
- package/dist/speech-synthesis/index.d.ts +3 -0
- package/dist/speech-synthesis/speech-synthesis.cjs +33 -0
- package/dist/speech-synthesis/speech-synthesis.cjs.map +1 -0
- package/dist/speech-synthesis/speech-synthesis.d.ts +18 -0
- package/dist/speech-synthesis/speech-synthesis.js +34 -0
- package/dist/speech-synthesis/speech-synthesis.js.map +1 -0
- package/dist/table-cell/index.d.ts +3 -0
- package/dist/table-cell/table-cell.cjs +28 -0
- package/dist/table-cell/table-cell.cjs.map +1 -0
- package/dist/table-cell/table-cell.d.ts +8 -0
- package/dist/table-cell/table-cell.js +28 -0
- package/dist/table-cell/table-cell.js.map +1 -0
- package/dist/transform/html-to-json/html-to-json.cjs +5 -0
- package/dist/transform/html-to-json/html-to-json.cjs.map +1 -0
- package/dist/transform/html-to-json/html-to-json.d.ts +6 -0
- package/dist/transform/html-to-json/html-to-json.js +4 -0
- package/dist/transform/html-to-json/html-to-json.js.map +1 -0
- package/dist/transform/index.d.ts +3 -0
- package/dist/transform/json-to-html/json-to-html.cjs +5 -0
- package/dist/transform/json-to-html/json-to-html.cjs.map +1 -0
- package/dist/transform/json-to-html/json-to-html.d.ts +3 -0
- package/dist/transform/json-to-html/json-to-html.js +4 -0
- package/dist/transform/json-to-html/json-to-html.js.map +1 -0
- package/dist/video/index.d.ts +3 -0
- package/dist/video/video.cjs +119 -0
- package/dist/video/video.cjs.map +1 -0
- package/dist/video/video.d.ts +34 -0
- package/dist/video/video.js +123 -0
- package/dist/video/video.js.map +1 -0
- package/package.json +133 -0
- package/src/abbr/abbr.ts +57 -0
- package/src/abbr/index.ts +5 -0
- package/src/alert/alert.ts +46 -0
- package/src/alert/index.ts +5 -0
- package/src/attachment/attachment.ts +113 -0
- package/src/attachment/index.ts +5 -0
- package/src/audio/audio.ts +81 -0
- package/src/audio/index.ts +5 -0
- package/src/font-size/font-size.ts +74 -0
- package/src/font-size/index.ts +5 -0
- package/src/heading/heading.ts +90 -0
- package/src/heading/index.ts +5 -0
- package/src/highlight/highlight.ts +27 -0
- package/src/highlight/index.ts +5 -0
- package/src/hyperlink/hyperlink.ts +92 -0
- package/src/hyperlink/index.ts +5 -0
- package/src/iframe/iframe.ts +112 -0
- package/src/iframe/index.ts +5 -0
- package/src/image/custom-image.ts +226 -0
- package/src/image/index.ts +5 -0
- package/src/index.ts +19 -0
- package/src/line-height/index.ts +5 -0
- package/src/line-height/line-height.ts +37 -0
- package/src/linker/index.ts +5 -0
- package/src/linker/linker.ts +153 -0
- package/src/mathjax/index.ts +5 -0
- package/src/mathjax/mathjax.ts +55 -0
- package/src/paragraph/index.ts +5 -0
- package/src/paragraph/paragraph.ts +25 -0
- package/src/speech-recognition/index.ts +5 -0
- package/src/speech-recognition/speech-recognition.ts +123 -0
- package/src/speech-synthesis/index.ts +5 -0
- package/src/speech-synthesis/speech-synthesis.ts +52 -0
- package/src/table-cell/index.ts +5 -0
- package/src/table-cell/table-cell.ts +28 -0
- package/src/transform/html-to-json/html-to-json.ts +5 -0
- package/src/transform/index.ts +4 -0
- package/src/transform/json-to-html/json-to-html.ts +5 -0
- package/src/video/index.ts +5 -0
- package/src/video/video.ts +173 -0
- package/tsconfig.json +20 -0
- package/vite.config.ts +46 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3
|
+
const core = require('@tiptap/core'),
|
|
4
|
+
Linker = core.Node.create({
|
|
5
|
+
name: 'linker',
|
|
6
|
+
content: 'text*',
|
|
7
|
+
marks: '',
|
|
8
|
+
group: 'inline',
|
|
9
|
+
inline: !0,
|
|
10
|
+
selectable: !0,
|
|
11
|
+
atom: !0,
|
|
12
|
+
draggable: !0,
|
|
13
|
+
isolating: !0,
|
|
14
|
+
allowGapCursor: !1,
|
|
15
|
+
priority: 1100,
|
|
16
|
+
keepOnSplit: !1,
|
|
17
|
+
addOptions() {
|
|
18
|
+
return {
|
|
19
|
+
openOnClick: !0,
|
|
20
|
+
HTMLAttributes: {
|
|
21
|
+
target: null,
|
|
22
|
+
title: null,
|
|
23
|
+
class: null,
|
|
24
|
+
'data-id': null,
|
|
25
|
+
'data-app-prefix': null,
|
|
26
|
+
},
|
|
27
|
+
validate: void 0,
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
addAttributes() {
|
|
31
|
+
return {
|
|
32
|
+
href: { default: null },
|
|
33
|
+
class: { default: this.options.HTMLAttributes.class },
|
|
34
|
+
target: {
|
|
35
|
+
default: this.options.HTMLAttributes.target,
|
|
36
|
+
parseHTML: (element) =>
|
|
37
|
+
element.getAttribute('target') !== '_blank' ? null : '_blank',
|
|
38
|
+
},
|
|
39
|
+
title: { default: this.options.HTMLAttributes.title },
|
|
40
|
+
'data-id': { default: this.options.HTMLAttributes['data-id'] },
|
|
41
|
+
'data-app-prefix': {
|
|
42
|
+
default: this.options.HTMLAttributes['data-app-prefix'],
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
parseHTML() {
|
|
47
|
+
return [
|
|
48
|
+
{
|
|
49
|
+
tag: 'a[href]:not([href *= "javascript:" i])[data-id][data-app-prefix]',
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
},
|
|
53
|
+
renderHTML({ HTMLAttributes }) {
|
|
54
|
+
var _a;
|
|
55
|
+
return (_a = HTMLAttributes.href) != null && _a.startsWith('javascript:')
|
|
56
|
+
? [
|
|
57
|
+
'a',
|
|
58
|
+
core.mergeAttributes(this.options.HTMLAttributes, {
|
|
59
|
+
...HTMLAttributes,
|
|
60
|
+
href: '',
|
|
61
|
+
}),
|
|
62
|
+
0,
|
|
63
|
+
]
|
|
64
|
+
: [
|
|
65
|
+
'a',
|
|
66
|
+
core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),
|
|
67
|
+
0,
|
|
68
|
+
];
|
|
69
|
+
},
|
|
70
|
+
addCommands() {
|
|
71
|
+
return {
|
|
72
|
+
setLinker:
|
|
73
|
+
(attrs) =>
|
|
74
|
+
({ commands }) => (
|
|
75
|
+
commands.insertContent({
|
|
76
|
+
type: this.name,
|
|
77
|
+
attrs,
|
|
78
|
+
content: [{ type: 'text', text: attrs.title }],
|
|
79
|
+
}),
|
|
80
|
+
!0
|
|
81
|
+
),
|
|
82
|
+
unsetLinker:
|
|
83
|
+
() =>
|
|
84
|
+
({ state, tr }) => {
|
|
85
|
+
const { node, from, to } = state.selection;
|
|
86
|
+
return (
|
|
87
|
+
(node == null ? void 0 : node.type.name) === 'linker' &&
|
|
88
|
+
tr.delete(from, to).scrollIntoView(),
|
|
89
|
+
!0
|
|
90
|
+
);
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
exports.Linker = Linker;
|
|
96
|
+
//# sourceMappingURL=linker.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linker.cjs","sources":["../../src/linker/linker.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core';\nimport { NodeSelection } from '@tiptap/pm/state';\n\n/* Our own model of a link in a rich document. */\nexport type LinkerAttributes = {\n href: string | null;\n target: '_blank' | null;\n title: string | null;\n 'data-id': string | null;\n 'data-app-prefix': string | null;\n};\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n linker: {\n /**\n * Set a linker node\n */\n setLinker: (attributes: LinkerAttributes) => ReturnType;\n /**\n * Unset a linker node\n */\n unsetLinker: () => ReturnType;\n };\n }\n}\n\n/**\n * Internal links extension.\n * Reproduces the legacy angularJs \"linker\" directive.\n *\n * Links to internal resources MAY have a `title` and MUST HAVE `data-id` and `data-app-prefix` attributes :\n * `<a href=\"/blog#/view/35fa4198-blog_id/5e654c71-article_id\" data-app-prefix=\"blog\" data-id=\"35fa4198-blog_id\" target=\"_blank\" title=\"Voir ce billet de blog\" class=\"ng-scope\">/blog#/view/35fa4198-57fe-45eb-94f4-a5e4defff305/5e654c71-1e61-4f84-86dc-6fcfaf33f513</a>`\n */\nexport const Linker = Node.create({\n name: 'linker',\n content: 'text*',\n marks: '',\n group: 'inline',\n\n inline: true,\n selectable: true,\n atom: true,\n draggable: true,\n isolating: true,\n allowGapCursor: false,\n\n priority: 1100,\n keepOnSplit: false,\n\n addOptions() {\n return {\n openOnClick: true,\n HTMLAttributes: {\n target: null,\n title: null,\n class: null,\n 'data-id': null,\n 'data-app-prefix': null,\n },\n validate: undefined,\n };\n },\n\n addAttributes() {\n return {\n href: {\n default: null,\n },\n class: {\n default: this.options.HTMLAttributes.class,\n },\n target: {\n default: this.options.HTMLAttributes.target,\n // Sanitize target value\n parseHTML: (element) =>\n element.getAttribute('target') !== '_blank' ? null : '_blank',\n },\n title: {\n default: this.options.HTMLAttributes.title,\n },\n 'data-id': {\n default: this.options.HTMLAttributes['data-id'],\n },\n 'data-app-prefix': {\n default: this.options.HTMLAttributes['data-app-prefix'],\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: 'a[href]:not([href *= \"javascript:\" i])[data-id][data-app-prefix]',\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n if (HTMLAttributes.href?.startsWith('javascript:')) {\n return [\n 'a',\n mergeAttributes(this.options.HTMLAttributes, {\n ...HTMLAttributes,\n href: '',\n }),\n 0,\n ];\n }\n return [\n 'a',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n 0,\n ];\n },\n\n addCommands() {\n return {\n setLinker:\n (attrs) =>\n ({ commands }) => {\n // Insert a Linker node with inner text node\n commands.insertContent({\n type: this.name,\n attrs,\n content: [\n {\n type: 'text',\n text: attrs.title,\n },\n ],\n });\n return true;\n },\n\n unsetLinker:\n () =>\n ({ state, tr }) => {\n // Which Linker node is actually selected ?\n const { node, from, to } = state.selection as NodeSelection;\n // Delete any selected Linker node\n if (node?.type.name === 'linker') {\n /* The following does not work as one would expected.\n commands.deleteNode(this.name);\n commands.deleteCurrentNode();\n * Replaced by : */\n tr.delete(from, to).scrollIntoView();\n }\n return true;\n },\n };\n },\n});\n"],"names":["Node","mergeAttributes"],"mappings":"mHAkCa,OAASA,UAAK,OAAO,CAChC,KAAM,SACN,QAAS,QACT,MAAO,GACP,MAAO,SAEP,OAAQ,GACR,WAAY,GACZ,KAAM,GACN,UAAW,GACX,UAAW,GACX,eAAgB,GAEhB,SAAU,KACV,YAAa,GAEb,YAAa,CACJ,MAAA,CACL,YAAa,GACb,eAAgB,CACd,OAAQ,KACR,MAAO,KACP,MAAO,KACP,UAAW,KACX,kBAAmB,IACrB,EACA,SAAU,MAAA,CAEd,EAEA,eAAgB,CACP,MAAA,CACL,KAAM,CACJ,QAAS,IACX,EACA,MAAO,CACL,QAAS,KAAK,QAAQ,eAAe,KACvC,EACA,OAAQ,CACN,QAAS,KAAK,QAAQ,eAAe,OAErC,UAAY,SACV,QAAQ,aAAa,QAAQ,IAAM,SAAW,KAAO,QACzD,EACA,MAAO,CACL,QAAS,KAAK,QAAQ,eAAe,KACvC,EACA,UAAW,CACT,QAAS,KAAK,QAAQ,eAAe,SAAS,CAChD,EACA,kBAAmB,CACjB,QAAS,KAAK,QAAQ,eAAe,iBAAiB,CACxD,CAAA,CAEJ,EAEA,WAAY,CACH,MAAA,CACL,CACE,IAAK,kEACP,CAAA,CAEJ,EAEA,WAAW,CAAE,gBAAkB,QAC7B,OAAI,kBAAe,OAAf,SAAqB,WAAW,eAC3B,CACL,IACAC,qBAAgB,KAAK,QAAQ,eAAgB,CAC3C,GAAG,eACH,KAAM,EAAA,CACP,EACD,CAAA,EAGG,CACL,IACAA,KAAAA,gBAAgB,KAAK,QAAQ,eAAgB,cAAc,EAC3D,CAAA,CAEJ,EAEA,aAAc,CACL,MAAA,CACL,UACG,OACD,CAAC,CAAE,aAED,SAAS,cAAc,CACrB,KAAM,KAAK,KACX,MACA,QAAS,CACP,CACE,KAAM,OACN,KAAM,MAAM,KACd,CACF,CAAA,CACD,EACM,IAGX,YACE,IACA,CAAC,CAAE,MAAO,MAAS,CAEjB,KAAM,CAAE,KAAM,KAAM,EAAA,EAAO,MAAM,UAE7B,OAAA,uBAAM,KAAK,QAAS,UAKtB,GAAG,OAAO,KAAM,EAAE,EAAE,eAAe,EAE9B,EACT,CAAA,CAEN,CACF,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
export type LinkerAttributes = {
|
|
3
|
+
href: string | null;
|
|
4
|
+
target: '_blank' | null;
|
|
5
|
+
title: string | null;
|
|
6
|
+
'data-id': string | null;
|
|
7
|
+
'data-app-prefix': string | null;
|
|
8
|
+
};
|
|
9
|
+
declare module '@tiptap/core' {
|
|
10
|
+
interface Commands<ReturnType> {
|
|
11
|
+
linker: {
|
|
12
|
+
/**
|
|
13
|
+
* Set a linker node
|
|
14
|
+
*/
|
|
15
|
+
setLinker: (attributes: LinkerAttributes) => ReturnType;
|
|
16
|
+
/**
|
|
17
|
+
* Unset a linker node
|
|
18
|
+
*/
|
|
19
|
+
unsetLinker: () => ReturnType;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Internal links extension.
|
|
25
|
+
* Reproduces the legacy angularJs "linker" directive.
|
|
26
|
+
*
|
|
27
|
+
* Links to internal resources MAY have a `title` and MUST HAVE `data-id` and `data-app-prefix` attributes :
|
|
28
|
+
* `<a href="/blog#/view/35fa4198-blog_id/5e654c71-article_id" data-app-prefix="blog" data-id="35fa4198-blog_id" target="_blank" title="Voir ce billet de blog" class="ng-scope">/blog#/view/35fa4198-57fe-45eb-94f4-a5e4defff305/5e654c71-1e61-4f84-86dc-6fcfaf33f513</a>`
|
|
29
|
+
*/
|
|
30
|
+
export declare const Linker: Node<any, any>;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Node, mergeAttributes } from '@tiptap/core';
|
|
2
|
+
const Linker = Node.create({
|
|
3
|
+
name: 'linker',
|
|
4
|
+
content: 'text*',
|
|
5
|
+
marks: '',
|
|
6
|
+
group: 'inline',
|
|
7
|
+
inline: !0,
|
|
8
|
+
selectable: !0,
|
|
9
|
+
atom: !0,
|
|
10
|
+
draggable: !0,
|
|
11
|
+
isolating: !0,
|
|
12
|
+
allowGapCursor: !1,
|
|
13
|
+
priority: 1100,
|
|
14
|
+
keepOnSplit: !1,
|
|
15
|
+
addOptions() {
|
|
16
|
+
return {
|
|
17
|
+
openOnClick: !0,
|
|
18
|
+
HTMLAttributes: {
|
|
19
|
+
target: null,
|
|
20
|
+
title: null,
|
|
21
|
+
class: null,
|
|
22
|
+
'data-id': null,
|
|
23
|
+
'data-app-prefix': null,
|
|
24
|
+
},
|
|
25
|
+
validate: void 0,
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
addAttributes() {
|
|
29
|
+
return {
|
|
30
|
+
href: {
|
|
31
|
+
default: null,
|
|
32
|
+
},
|
|
33
|
+
class: {
|
|
34
|
+
default: this.options.HTMLAttributes.class,
|
|
35
|
+
},
|
|
36
|
+
target: {
|
|
37
|
+
default: this.options.HTMLAttributes.target,
|
|
38
|
+
// Sanitize target value
|
|
39
|
+
parseHTML: (element) =>
|
|
40
|
+
element.getAttribute('target') !== '_blank' ? null : '_blank',
|
|
41
|
+
},
|
|
42
|
+
title: {
|
|
43
|
+
default: this.options.HTMLAttributes.title,
|
|
44
|
+
},
|
|
45
|
+
'data-id': {
|
|
46
|
+
default: this.options.HTMLAttributes['data-id'],
|
|
47
|
+
},
|
|
48
|
+
'data-app-prefix': {
|
|
49
|
+
default: this.options.HTMLAttributes['data-app-prefix'],
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
parseHTML() {
|
|
54
|
+
return [
|
|
55
|
+
{
|
|
56
|
+
tag: 'a[href]:not([href *= "javascript:" i])[data-id][data-app-prefix]',
|
|
57
|
+
},
|
|
58
|
+
];
|
|
59
|
+
},
|
|
60
|
+
renderHTML({ HTMLAttributes }) {
|
|
61
|
+
var _a;
|
|
62
|
+
return (_a = HTMLAttributes.href) != null && _a.startsWith('javascript:')
|
|
63
|
+
? [
|
|
64
|
+
'a',
|
|
65
|
+
mergeAttributes(this.options.HTMLAttributes, {
|
|
66
|
+
...HTMLAttributes,
|
|
67
|
+
href: '',
|
|
68
|
+
}),
|
|
69
|
+
0,
|
|
70
|
+
]
|
|
71
|
+
: ['a', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
72
|
+
},
|
|
73
|
+
addCommands() {
|
|
74
|
+
return {
|
|
75
|
+
setLinker:
|
|
76
|
+
(attrs) =>
|
|
77
|
+
({ commands }) => (
|
|
78
|
+
commands.insertContent({
|
|
79
|
+
type: this.name,
|
|
80
|
+
attrs,
|
|
81
|
+
content: [
|
|
82
|
+
{
|
|
83
|
+
type: 'text',
|
|
84
|
+
text: attrs.title,
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
}),
|
|
88
|
+
!0
|
|
89
|
+
),
|
|
90
|
+
unsetLinker:
|
|
91
|
+
() =>
|
|
92
|
+
({ state, tr }) => {
|
|
93
|
+
const { node, from, to } = state.selection;
|
|
94
|
+
return (
|
|
95
|
+
(node == null ? void 0 : node.type.name) === 'linker' &&
|
|
96
|
+
tr.delete(from, to).scrollIntoView(),
|
|
97
|
+
!0
|
|
98
|
+
);
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
export { Linker };
|
|
104
|
+
//# sourceMappingURL=linker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linker.js","sources":["../../src/linker/linker.ts"],"sourcesContent":["import { Node, mergeAttributes } from '@tiptap/core';\nimport { NodeSelection } from '@tiptap/pm/state';\n\n/* Our own model of a link in a rich document. */\nexport type LinkerAttributes = {\n href: string | null;\n target: '_blank' | null;\n title: string | null;\n 'data-id': string | null;\n 'data-app-prefix': string | null;\n};\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n linker: {\n /**\n * Set a linker node\n */\n setLinker: (attributes: LinkerAttributes) => ReturnType;\n /**\n * Unset a linker node\n */\n unsetLinker: () => ReturnType;\n };\n }\n}\n\n/**\n * Internal links extension.\n * Reproduces the legacy angularJs \"linker\" directive.\n *\n * Links to internal resources MAY have a `title` and MUST HAVE `data-id` and `data-app-prefix` attributes :\n * `<a href=\"/blog#/view/35fa4198-blog_id/5e654c71-article_id\" data-app-prefix=\"blog\" data-id=\"35fa4198-blog_id\" target=\"_blank\" title=\"Voir ce billet de blog\" class=\"ng-scope\">/blog#/view/35fa4198-57fe-45eb-94f4-a5e4defff305/5e654c71-1e61-4f84-86dc-6fcfaf33f513</a>`\n */\nexport const Linker = Node.create({\n name: 'linker',\n content: 'text*',\n marks: '',\n group: 'inline',\n\n inline: true,\n selectable: true,\n atom: true,\n draggable: true,\n isolating: true,\n allowGapCursor: false,\n\n priority: 1100,\n keepOnSplit: false,\n\n addOptions() {\n return {\n openOnClick: true,\n HTMLAttributes: {\n target: null,\n title: null,\n class: null,\n 'data-id': null,\n 'data-app-prefix': null,\n },\n validate: undefined,\n };\n },\n\n addAttributes() {\n return {\n href: {\n default: null,\n },\n class: {\n default: this.options.HTMLAttributes.class,\n },\n target: {\n default: this.options.HTMLAttributes.target,\n // Sanitize target value\n parseHTML: (element) =>\n element.getAttribute('target') !== '_blank' ? null : '_blank',\n },\n title: {\n default: this.options.HTMLAttributes.title,\n },\n 'data-id': {\n default: this.options.HTMLAttributes['data-id'],\n },\n 'data-app-prefix': {\n default: this.options.HTMLAttributes['data-app-prefix'],\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: 'a[href]:not([href *= \"javascript:\" i])[data-id][data-app-prefix]',\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n if (HTMLAttributes.href?.startsWith('javascript:')) {\n return [\n 'a',\n mergeAttributes(this.options.HTMLAttributes, {\n ...HTMLAttributes,\n href: '',\n }),\n 0,\n ];\n }\n return [\n 'a',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n 0,\n ];\n },\n\n addCommands() {\n return {\n setLinker:\n (attrs) =>\n ({ commands }) => {\n // Insert a Linker node with inner text node\n commands.insertContent({\n type: this.name,\n attrs,\n content: [\n {\n type: 'text',\n text: attrs.title,\n },\n ],\n });\n return true;\n },\n\n unsetLinker:\n () =>\n ({ state, tr }) => {\n // Which Linker node is actually selected ?\n const { node, from, to } = state.selection as NodeSelection;\n // Delete any selected Linker node\n if (node?.type.name === 'linker') {\n /* The following does not work as one would expected.\n commands.deleteNode(this.name);\n commands.deleteCurrentNode();\n * Replaced by : */\n tr.delete(from, to).scrollIntoView();\n }\n return true;\n },\n };\n },\n});\n"],"names":[],"mappings":";AAkCa,MAAA,SAAS,KAAK,OAAO;AAAA,EAChC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AAAA,EAEP,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,WAAW;AAAA,EACX,WAAW;AAAA,EACX,gBAAgB;AAAA,EAEhB,UAAU;AAAA,EACV,aAAa;AAAA,EAEb,aAAa;AACJ,WAAA;AAAA,MACL,aAAa;AAAA,MACb,gBAAgB;AAAA,QACd,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,OAAO;AAAA,QACP,WAAW;AAAA,QACX,mBAAmB;AAAA,MACrB;AAAA,MACA,UAAU;AAAA,IAAA;AAAA,EAEd;AAAA,EAEA,gBAAgB;AACP,WAAA;AAAA,MACL,MAAM;AAAA,QACJ,SAAS;AAAA,MACX;AAAA,MACA,OAAO;AAAA,QACL,SAAS,KAAK,QAAQ,eAAe;AAAA,MACvC;AAAA,MACA,QAAQ;AAAA,QACN,SAAS,KAAK,QAAQ,eAAe;AAAA;AAAA,QAErC,WAAW,CAAC,YACV,QAAQ,aAAa,QAAQ,MAAM,WAAW,OAAO;AAAA,MACzD;AAAA,MACA,OAAO;AAAA,QACL,SAAS,KAAK,QAAQ,eAAe;AAAA,MACvC;AAAA,MACA,WAAW;AAAA,QACT,SAAS,KAAK,QAAQ,eAAe,SAAS;AAAA,MAChD;AAAA,MACA,mBAAmB;AAAA,QACjB,SAAS,KAAK,QAAQ,eAAe,iBAAiB;AAAA,MACxD;AAAA,IAAA;AAAA,EAEJ;AAAA,EAEA,YAAY;AACH,WAAA;AAAA,MACL;AAAA,QACE,KAAK;AAAA,MACP;AAAA,IAAA;AAAA,EAEJ;AAAA,EAEA,WAAW,EAAE,kBAAkB;;AAC7B,YAAI,oBAAe,SAAf,WAAqB,WAAW,iBAC3B;AAAA,MACL;AAAA,MACA,gBAAgB,KAAK,QAAQ,gBAAgB;AAAA,QAC3C,GAAG;AAAA,QACH,MAAM;AAAA,MAAA,CACP;AAAA,MACD;AAAA,IAAA,IAGG;AAAA,MACL;AAAA,MACA,gBAAgB,KAAK,QAAQ,gBAAgB,cAAc;AAAA,MAC3D;AAAA,IAAA;AAAA,EAEJ;AAAA,EAEA,cAAc;AACL,WAAA;AAAA,MACL,WACE,CAAC,UACD,CAAC,EAAE,gBAED,SAAS,cAAc;AAAA,QACrB,MAAM,KAAK;AAAA,QACX;AAAA,QACA,SAAS;AAAA,UACP;AAAA,YACE,MAAM;AAAA,YACN,MAAM,MAAM;AAAA,UACd;AAAA,QACF;AAAA,MAAA,CACD,GACM;AAAA,MAGX,aACE,MACA,CAAC,EAAE,OAAO,SAAS;AAEjB,cAAM,EAAE,MAAM,MAAM,GAAA,IAAO,MAAM;AAE7B,gBAAA,6BAAM,KAAK,UAAS,YAKtB,GAAG,OAAO,MAAM,EAAE,EAAE,eAAe,GAE9B;AAAA,MACT;AAAA,IAAA;AAAA,EAEN;AACF,CAAC;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3
|
+
const core = require('@tiptap/core'),
|
|
4
|
+
MathJax = core.Node.create({
|
|
5
|
+
name: 'mathjaxnode',
|
|
6
|
+
group: 'inline',
|
|
7
|
+
inline: !0,
|
|
8
|
+
atom: !1,
|
|
9
|
+
selectable: !0,
|
|
10
|
+
parseHTML() {
|
|
11
|
+
return [{ tag: 'mathjax' }];
|
|
12
|
+
},
|
|
13
|
+
addAttributes() {
|
|
14
|
+
return {
|
|
15
|
+
equation: {
|
|
16
|
+
default: null,
|
|
17
|
+
parseHTML: (element) => {
|
|
18
|
+
const textNodes = [...element.childNodes].filter(
|
|
19
|
+
(child) => child.nodeType === 3,
|
|
20
|
+
);
|
|
21
|
+
return textNodes.length > 0
|
|
22
|
+
? textNodes[textNodes.length - 1].nodeValue
|
|
23
|
+
: null;
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
renderHTML({ HTMLAttributes }) {
|
|
29
|
+
let equation = (HTMLAttributes.equation || '')
|
|
30
|
+
.replaceAll(
|
|
31
|
+
/(?:\\)?begin{equation}\s*\n?\s*{(.+?)}\n?\s*?(?:\\)?end{equation}/gm,
|
|
32
|
+
'$$$1$$',
|
|
33
|
+
)
|
|
34
|
+
.replaceAll(
|
|
35
|
+
/(?:\\)?begin{equation}\s*\n?\s*(.+?)\n?\s*?(?:\\)?end{equation}/gm,
|
|
36
|
+
'$$$1$$',
|
|
37
|
+
);
|
|
38
|
+
return (
|
|
39
|
+
equation.length > 0 &&
|
|
40
|
+
(equation.charAt(0) !== '$' && (equation = `$${equation}`),
|
|
41
|
+
equation.charAt(equation.length - 1) !== '$' &&
|
|
42
|
+
(equation = `${equation}$`)),
|
|
43
|
+
['span', {}, equation]
|
|
44
|
+
);
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
exports.MathJax = MathJax;
|
|
48
|
+
//# sourceMappingURL=mathjax.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mathjax.cjs","sources":["../../src/mathjax/mathjax.ts"],"sourcesContent":["import { Node } from '@tiptap/core';\n\nexport const MathJax = Node.create({\n name: 'mathjaxnode',\n group: 'inline',\n inline: true,\n atom: false,\n selectable: true,\n\n parseHTML() {\n return [\n {\n tag: 'mathjax',\n },\n ];\n },\n\n addAttributes() {\n return {\n equation: {\n default: null,\n parseHTML: (element: any) => {\n const children = [...element.childNodes];\n const textNodes = children.filter((child) => child.nodeType === 3);\n return textNodes.length > 0\n ? textNodes[textNodes.length - 1].nodeValue\n : null;\n },\n },\n };\n },\n\n renderHTML({ HTMLAttributes }) {\n let equation = (HTMLAttributes.equation || '')\n // Get what is between \\begin{equation}{... ...}\\end{equation}\n // Or between \\begin{equation}... ...\\end{equation} without enclosing brackets\n .replaceAll(\n /(?:\\\\)?begin{equation}\\s*\\n?\\s*{(.+?)}\\n?\\s*?(?:\\\\)?end{equation}/gm,\n '$$$1$$',\n )\n .replaceAll(\n /(?:\\\\)?begin{equation}\\s*\\n?\\s*(.+?)\\n?\\s*?(?:\\\\)?end{equation}/gm,\n '$$$1$$',\n );\n if (equation.length > 0) {\n if (equation.charAt(0) !== '$') {\n equation = `$${equation}`;\n }\n if (equation.charAt(equation.length - 1) !== '$') {\n equation = `${equation}$`;\n }\n }\n return ['span', {}, equation];\n },\n});\n"],"names":["Node"],"mappings":"mHAEa,QAAUA,UAAK,OAAO,CACjC,KAAM,cACN,MAAO,SACP,OAAQ,GACR,KAAM,GACN,WAAY,GAEZ,WAAY,CACH,MAAA,CACL,CACE,IAAK,SACP,CAAA,CAEJ,EAEA,eAAgB,CACP,MAAA,CACL,SAAU,CACR,QAAS,KACT,UAAY,SAAiB,CAE3B,MAAM,UADW,CAAC,GAAG,QAAQ,UAAU,EACZ,OAAQ,OAAU,MAAM,WAAa,CAAC,EAC1D,OAAA,UAAU,OAAS,EACtB,UAAU,UAAU,OAAS,CAAC,EAAE,UAChC,IACN,CACF,CAAA,CAEJ,EAEA,WAAW,CAAE,gBAAkB,CACzB,IAAA,UAAY,eAAe,UAAY,IAGxC,WACC,sEACA,QAAA,EAED,WACC,oEACA,QAAA,EAEA,OAAA,SAAS,OAAS,IAChB,SAAS,OAAO,CAAC,IAAM,MACzB,SAAW,IAAI,QAAQ,IAErB,SAAS,OAAO,SAAS,OAAS,CAAC,IAAM,MAC3C,SAAW,GAAG,QAAQ,MAGnB,CAAC,OAAQ,GAAI,QAAQ,CAC9B,CACF,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
const MathJax = Node.create({
|
|
3
|
+
name: 'mathjaxnode',
|
|
4
|
+
group: 'inline',
|
|
5
|
+
inline: !0,
|
|
6
|
+
atom: !1,
|
|
7
|
+
selectable: !0,
|
|
8
|
+
parseHTML() {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
tag: 'mathjax',
|
|
12
|
+
},
|
|
13
|
+
];
|
|
14
|
+
},
|
|
15
|
+
addAttributes() {
|
|
16
|
+
return {
|
|
17
|
+
equation: {
|
|
18
|
+
default: null,
|
|
19
|
+
parseHTML: (element) => {
|
|
20
|
+
const textNodes = [...element.childNodes].filter(
|
|
21
|
+
(child) => child.nodeType === 3,
|
|
22
|
+
);
|
|
23
|
+
return textNodes.length > 0
|
|
24
|
+
? textNodes[textNodes.length - 1].nodeValue
|
|
25
|
+
: null;
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
renderHTML({ HTMLAttributes }) {
|
|
31
|
+
let equation = (HTMLAttributes.equation || '')
|
|
32
|
+
.replaceAll(
|
|
33
|
+
/(?:\\)?begin{equation}\s*\n?\s*{(.+?)}\n?\s*?(?:\\)?end{equation}/gm,
|
|
34
|
+
'$$$1$$',
|
|
35
|
+
)
|
|
36
|
+
.replaceAll(
|
|
37
|
+
/(?:\\)?begin{equation}\s*\n?\s*(.+?)\n?\s*?(?:\\)?end{equation}/gm,
|
|
38
|
+
'$$$1$$',
|
|
39
|
+
);
|
|
40
|
+
return (
|
|
41
|
+
equation.length > 0 &&
|
|
42
|
+
(equation.charAt(0) !== '$' && (equation = `$${equation}`),
|
|
43
|
+
equation.charAt(equation.length - 1) !== '$' &&
|
|
44
|
+
(equation = `${equation}$`)),
|
|
45
|
+
['span', {}, equation]
|
|
46
|
+
);
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
export { MathJax };
|
|
50
|
+
//# sourceMappingURL=mathjax.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mathjax.js","sources":["../../src/mathjax/mathjax.ts"],"sourcesContent":["import { Node } from '@tiptap/core';\n\nexport const MathJax = Node.create({\n name: 'mathjaxnode',\n group: 'inline',\n inline: true,\n atom: false,\n selectable: true,\n\n parseHTML() {\n return [\n {\n tag: 'mathjax',\n },\n ];\n },\n\n addAttributes() {\n return {\n equation: {\n default: null,\n parseHTML: (element: any) => {\n const children = [...element.childNodes];\n const textNodes = children.filter((child) => child.nodeType === 3);\n return textNodes.length > 0\n ? textNodes[textNodes.length - 1].nodeValue\n : null;\n },\n },\n };\n },\n\n renderHTML({ HTMLAttributes }) {\n let equation = (HTMLAttributes.equation || '')\n // Get what is between \\begin{equation}{... ...}\\end{equation}\n // Or between \\begin{equation}... ...\\end{equation} without enclosing brackets\n .replaceAll(\n /(?:\\\\)?begin{equation}\\s*\\n?\\s*{(.+?)}\\n?\\s*?(?:\\\\)?end{equation}/gm,\n '$$$1$$',\n )\n .replaceAll(\n /(?:\\\\)?begin{equation}\\s*\\n?\\s*(.+?)\\n?\\s*?(?:\\\\)?end{equation}/gm,\n '$$$1$$',\n );\n if (equation.length > 0) {\n if (equation.charAt(0) !== '$') {\n equation = `$${equation}`;\n }\n if (equation.charAt(equation.length - 1) !== '$') {\n equation = `${equation}$`;\n }\n }\n return ['span', {}, equation];\n },\n});\n"],"names":[],"mappings":";AAEa,MAAA,UAAU,KAAK,OAAO;AAAA,EACjC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,YAAY;AAAA,EAEZ,YAAY;AACH,WAAA;AAAA,MACL;AAAA,QACE,KAAK;AAAA,MACP;AAAA,IAAA;AAAA,EAEJ;AAAA,EAEA,gBAAgB;AACP,WAAA;AAAA,MACL,UAAU;AAAA,QACR,SAAS;AAAA,QACT,WAAW,CAAC,YAAiB;AAE3B,gBAAM,YADW,CAAC,GAAG,QAAQ,UAAU,EACZ,OAAO,CAAC,UAAU,MAAM,aAAa,CAAC;AAC1D,iBAAA,UAAU,SAAS,IACtB,UAAU,UAAU,SAAS,CAAC,EAAE,YAChC;AAAA,QACN;AAAA,MACF;AAAA,IAAA;AAAA,EAEJ;AAAA,EAEA,WAAW,EAAE,kBAAkB;AACzB,QAAA,YAAY,eAAe,YAAY,IAGxC;AAAA,MACC;AAAA,MACA;AAAA,IAAA,EAED;AAAA,MACC;AAAA,MACA;AAAA,IAAA;AAEA,WAAA,SAAS,SAAS,MAChB,SAAS,OAAO,CAAC,MAAM,QACzB,WAAW,IAAI,QAAQ,KAErB,SAAS,OAAO,SAAS,SAAS,CAAC,MAAM,QAC3C,WAAW,GAAG,QAAQ,OAGnB,CAAC,QAAQ,IAAI,QAAQ;AAAA,EAC9B;AACF,CAAC;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3
|
+
const extensionParagraph = require('@tiptap/extension-paragraph'),
|
|
4
|
+
Paragraph = extensionParagraph.Paragraph.extend({
|
|
5
|
+
parseHTML() {
|
|
6
|
+
var _a;
|
|
7
|
+
return [
|
|
8
|
+
...(((_a = this.parent) == null ? void 0 : _a.call(this)) ?? []),
|
|
9
|
+
{ tag: 'div[style]:has(> span)' },
|
|
10
|
+
];
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
exports.Paragraph = Paragraph;
|
|
14
|
+
//# sourceMappingURL=paragraph.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paragraph.cjs","sources":["../../src/paragraph/paragraph.ts"],"sourcesContent":["import { Paragraph as TiptapParagraph } from '@tiptap/extension-paragraph';\n\n/**\n * Extends `Paragraph` extension from TipTap.\n *\n * This extension is used to parse documents in old-format (version 0),\n * where text alignments were applied on a <div> wrapping a <span>.\n * The new format is a <p> with style attributes.\n *\n * For example :\n * `<div style=\"text-align: right;\"><span style=\"font-size: 20pt;\">A right-aligned text</span></div>`\n * is now parsed and rendered as\n * `<p style=\"text-align: right;\"><span style=\"font-size: 20pt;\">A right-aligned text</span></p>`\n */\nexport const Paragraph = TiptapParagraph.extend({\n parseHTML() {\n const parentRules = this.parent?.() ?? [];\n return [\n ...parentRules,\n {\n tag: 'div[style]:has(> span)',\n },\n ];\n },\n});\n"],"names":["TiptapParagraph"],"mappings":"gJAca,UAAYA,6BAAgB,OAAO,CAC9C,WAAY,QAEH,MAAA,CACL,KAFkB,QAAK,SAAL,4BAAmB,CAAA,EAGrC,CACE,IAAK,wBACP,CAAA,CAEJ,CACF,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extends `Paragraph` extension from TipTap.
|
|
3
|
+
*
|
|
4
|
+
* This extension is used to parse documents in old-format (version 0),
|
|
5
|
+
* where text alignments were applied on a <div> wrapping a <span>.
|
|
6
|
+
* The new format is a <p> with style attributes.
|
|
7
|
+
*
|
|
8
|
+
* For example :
|
|
9
|
+
* `<div style="text-align: right;"><span style="font-size: 20pt;">A right-aligned text</span></div>`
|
|
10
|
+
* is now parsed and rendered as
|
|
11
|
+
* `<p style="text-align: right;"><span style="font-size: 20pt;">A right-aligned text</span></p>`
|
|
12
|
+
*/
|
|
13
|
+
export declare const Paragraph: import('@tiptap/core').Node<
|
|
14
|
+
import('@tiptap/extension-paragraph').ParagraphOptions,
|
|
15
|
+
any
|
|
16
|
+
>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Paragraph as Paragraph$1 } from '@tiptap/extension-paragraph';
|
|
2
|
+
const Paragraph = Paragraph$1.extend({
|
|
3
|
+
parseHTML() {
|
|
4
|
+
var _a;
|
|
5
|
+
return [
|
|
6
|
+
...(((_a = this.parent) == null ? void 0 : _a.call(this)) ?? []),
|
|
7
|
+
{
|
|
8
|
+
tag: 'div[style]:has(> span)',
|
|
9
|
+
},
|
|
10
|
+
];
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
export { Paragraph };
|
|
14
|
+
//# sourceMappingURL=paragraph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paragraph.js","sources":["../../src/paragraph/paragraph.ts"],"sourcesContent":["import { Paragraph as TiptapParagraph } from '@tiptap/extension-paragraph';\n\n/**\n * Extends `Paragraph` extension from TipTap.\n *\n * This extension is used to parse documents in old-format (version 0),\n * where text alignments were applied on a <div> wrapping a <span>.\n * The new format is a <p> with style attributes.\n *\n * For example :\n * `<div style=\"text-align: right;\"><span style=\"font-size: 20pt;\">A right-aligned text</span></div>`\n * is now parsed and rendered as\n * `<p style=\"text-align: right;\"><span style=\"font-size: 20pt;\">A right-aligned text</span></p>`\n */\nexport const Paragraph = TiptapParagraph.extend({\n parseHTML() {\n const parentRules = this.parent?.() ?? [];\n return [\n ...parentRules,\n {\n tag: 'div[style]:has(> span)',\n },\n ];\n },\n});\n"],"names":["TiptapParagraph"],"mappings":";AAca,MAAA,YAAYA,YAAgB,OAAO;AAAA,EAC9C,YAAY;;AAEH,WAAA;AAAA,MACL,KAFkB,UAAK,WAAL,kCAAmB,CAAA;AAAA,MAGrC;AAAA,QACE,KAAK;AAAA,MACP;AAAA,IAAA;AAAA,EAEJ;AACF,CAAC;"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
3
|
+
const core = require('@tiptap/core');
|
|
4
|
+
class SR_Node extends core.Node {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(), (this.isStarted = !1);
|
|
7
|
+
}
|
|
8
|
+
static create(config) {
|
|
9
|
+
return core.Node.create(config);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
const SpeechRecognition = SR_Node.create({
|
|
13
|
+
name: 'SpeechRecognition',
|
|
14
|
+
addOptions() {
|
|
15
|
+
return { lang: 'fr-FR' };
|
|
16
|
+
},
|
|
17
|
+
onCreate() {
|
|
18
|
+
'SpeechRecognition' in window ||
|
|
19
|
+
'webkitSpeechRecognition' in window ||
|
|
20
|
+
console.warn(
|
|
21
|
+
'"speechrecognition extension from @edifice.io/tiptap-extensions" requires a browser supporting the SpeechRecognition API".',
|
|
22
|
+
);
|
|
23
|
+
},
|
|
24
|
+
addCommands() {
|
|
25
|
+
return {
|
|
26
|
+
startSpeechRecognition:
|
|
27
|
+
() =>
|
|
28
|
+
({ commands }) => {
|
|
29
|
+
const SpeechRecognition2 =
|
|
30
|
+
window.SpeechRecognition || window.webkitSpeechRecognition;
|
|
31
|
+
(this.recognition = new SpeechRecognition2()),
|
|
32
|
+
(this.recognition.lang = this.options.lang),
|
|
33
|
+
(this.recognition.interimResults = !0),
|
|
34
|
+
(this.recognition.maxAlternatives = 1),
|
|
35
|
+
(this.recognition.continuous = !0),
|
|
36
|
+
this.recognition.start();
|
|
37
|
+
let { from, to } = this.editor.state.selection;
|
|
38
|
+
return (
|
|
39
|
+
(this.recognition.onresult = (event) => {
|
|
40
|
+
let currentResult = '';
|
|
41
|
+
for (let i = event.resultIndex; i < event.results.length; i++)
|
|
42
|
+
currentResult += event.results[i][0].transcript;
|
|
43
|
+
const isFinal = event.results[event.results.length - 1].isFinal;
|
|
44
|
+
this.editor.commands.deleteRange({ from, to }),
|
|
45
|
+
this.editor.commands.insertContentAt(
|
|
46
|
+
from,
|
|
47
|
+
isFinal ? currentResult : `<code>${currentResult}</code>`,
|
|
48
|
+
{ updateSelection: !isFinal },
|
|
49
|
+
),
|
|
50
|
+
(to = this.editor.state.selection.to),
|
|
51
|
+
isFinal && (from = to);
|
|
52
|
+
}),
|
|
53
|
+
(this.recognition.onerror = (event) => {
|
|
54
|
+
console.log(
|
|
55
|
+
`[speechrecognition from @edifice.io/tiptap-extensions][error][${event.error}]: ${event.message}`,
|
|
56
|
+
);
|
|
57
|
+
}),
|
|
58
|
+
(this.recognition.onstart = () => {
|
|
59
|
+
this.isStarted = !0;
|
|
60
|
+
}),
|
|
61
|
+
(this.recognition.onend = () => {
|
|
62
|
+
this.isStarted = !1;
|
|
63
|
+
}),
|
|
64
|
+
commands
|
|
65
|
+
);
|
|
66
|
+
},
|
|
67
|
+
stopSpeechRecognition:
|
|
68
|
+
() =>
|
|
69
|
+
({ commands }) => (
|
|
70
|
+
this.recognition.stop(), this.editor.commands.focus(), commands
|
|
71
|
+
),
|
|
72
|
+
isSpeechRecognitionStarted: () => () => this.isStarted,
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
exports.SpeechRecognition = SpeechRecognition;
|
|
77
|
+
//# sourceMappingURL=speech-recognition.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"speech-recognition.cjs","sources":["../../src/speech-recognition/speech-recognition.ts"],"sourcesContent":["import { Node } from '@tiptap/core';\n\nexport interface SpeechRecognitionOptions {\n lang: string;\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n SpeechRecognition: {\n startSpeechRecognition: () => ReturnType;\n stopSpeechRecognition: () => ReturnType;\n isSpeechRecognitionStarted: () => boolean;\n };\n }\n}\n\nclass SR_Node<O = any, S = any> extends Node<O, S> {\n protected constructor() {\n super();\n }\n\n recognition: SpeechRecognition | undefined;\n readonly isStarted: boolean = false;\n\n static create<O = any, S = any>(config?: any) {\n return Node.create(config) as SR_Node<O, S>;\n }\n}\n\nexport const SpeechRecognition = SR_Node.create<SpeechRecognitionOptions>({\n name: 'SpeechRecognition',\n\n addOptions() {\n return {\n lang: 'fr-FR',\n };\n },\n\n onCreate() {\n if (\n !('SpeechRecognition' in window || 'webkitSpeechRecognition' in window)\n ) {\n console.warn(\n '\"speechrecognition extension from @edifice.io/tiptap-extensions\" requires a browser supporting the SpeechRecognition API\".',\n );\n }\n },\n\n addCommands() {\n return {\n startSpeechRecognition:\n () =>\n ({ commands }) => {\n const SpeechRecognition =\n window.SpeechRecognition || window.webkitSpeechRecognition;\n this.recognition = new SpeechRecognition();\n\n this.recognition.lang = this.options.lang;\n this.recognition.interimResults = true;\n this.recognition.maxAlternatives = 1;\n this.recognition.continuous = true;\n\n this.recognition.start();\n\n // Memoize initial caret positions\n let { from, to } = this.editor.state.selection;\n\n this.recognition.onresult = (event: SpeechRecognitionEvent) => {\n let currentResult = '';\n\n // Add to the currentResult variable the content of the last recognized sentence\n for (let i = event.resultIndex; i < event.results.length; i++) {\n currentResult += event.results[i][0].transcript;\n }\n\n // Is this the final recognition ?\n const isFinal = event.results[event.results.length - 1].isFinal;\n\n // Replace selection by the last recognized sentence (+ style and select, if not final)\n this.editor.commands.deleteRange({ from, to });\n this.editor.commands.insertContentAt(\n from,\n isFinal ? currentResult : `<code>${currentResult}</code>`,\n { updateSelection: !isFinal },\n );\n to = this.editor.state.selection.to;\n\n if (isFinal) {\n // Next content will go after last insertion\n from = to;\n }\n };\n\n this.recognition.onerror = (event: SpeechRecognitionErrorEvent) => {\n // TODO create a \"feedback\" tiptap extension, to display user friendly error messages ?\n console.log(\n `[speechrecognition from @edifice.io/tiptap-extensions][error][${event.error}]: ${event.message}`,\n );\n };\n\n this.recognition.onstart = () => {\n this.isStarted = true;\n };\n\n this.recognition.onend = () => {\n this.isStarted = false;\n };\n\n return commands;\n },\n\n stopSpeechRecognition:\n () =>\n ({ commands }) => {\n this.recognition.stop();\n this.editor.commands.focus();\n return commands;\n },\n\n isSpeechRecognitionStarted: () => () => this.isStarted,\n };\n },\n});\n"],"names":["Node","SpeechRecognition"],"mappings":"mHAgBA,MAAM,gBAAkCA,KAAAA,IAAW,CACvC,aAAc,CAChB,QAIR,KAAS,UAAqB,EAH9B,CAKA,OAAO,OAAyB,OAAc,CACrC,OAAAA,KAAA,KAAK,OAAO,MAAM,CAC3B,CACF,CAEa,MAAA,kBAAoB,QAAQ,OAAiC,CACxE,KAAM,oBAEN,YAAa,CACJ,MAAA,CACL,KAAM,OAAA,CAEV,EAEA,UAAW,CAEL,sBAAuB,QAAU,4BAA6B,QAExD,QAAA,KACN,4HAAA,CAGN,EAEA,aAAc,CACL,MAAA,CACL,uBACE,IACA,CAAC,CAAE,YAAe,CACVC,MAAAA,mBACJ,OAAO,mBAAqB,OAAO,wBAChC,KAAA,YAAc,IAAIA,mBAElB,KAAA,YAAY,KAAO,KAAK,QAAQ,KACrC,KAAK,YAAY,eAAiB,GAClC,KAAK,YAAY,gBAAkB,EACnC,KAAK,YAAY,WAAa,GAE9B,KAAK,YAAY,QAGjB,GAAI,CAAE,KAAM,EAAO,EAAA,KAAK,OAAO,MAAM,UAEhC,YAAA,YAAY,SAAY,OAAkC,CAC7D,IAAI,cAAgB,GAGpB,QAAS,EAAI,MAAM,YAAa,EAAI,MAAM,QAAQ,OAAQ,IACxD,eAAiB,MAAM,QAAQ,CAAC,EAAE,CAAC,EAAE,WAIvC,MAAM,QAAU,MAAM,QAAQ,MAAM,QAAQ,OAAS,CAAC,EAAE,QAGxD,KAAK,OAAO,SAAS,YAAY,CAAE,KAAM,GAAI,EAC7C,KAAK,OAAO,SAAS,gBACnB,KACA,QAAU,cAAgB,SAAS,aAAa,UAChD,CAAE,gBAAiB,CAAC,OAAQ,CAAA,EAEzB,GAAA,KAAK,OAAO,MAAM,UAAU,GAE7B,UAEK,KAAA,GACT,EAGG,KAAA,YAAY,QAAW,OAAuC,CAEzD,QAAA,IACN,iEAAiE,MAAM,KAAK,MAAM,MAAM,OAAO,EAAA,CACjG,EAGG,KAAA,YAAY,QAAU,IAAM,CAC/B,KAAK,UAAY,EAAA,EAGd,KAAA,YAAY,MAAQ,IAAM,CAC7B,KAAK,UAAY,EAAA,EAGZ,QACT,EAEF,sBACE,IACA,CAAC,CAAE,aACD,KAAK,YAAY,OACZ,KAAA,OAAO,SAAS,QACd,UAGX,2BAA4B,IAAM,IAAM,KAAK,SAAA,CAEjD,CACF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
export interface SpeechRecognitionOptions {
|
|
3
|
+
lang: string;
|
|
4
|
+
}
|
|
5
|
+
declare module '@tiptap/core' {
|
|
6
|
+
interface Commands<ReturnType> {
|
|
7
|
+
SpeechRecognition: {
|
|
8
|
+
startSpeechRecognition: () => ReturnType;
|
|
9
|
+
stopSpeechRecognition: () => ReturnType;
|
|
10
|
+
isSpeechRecognitionStarted: () => boolean;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
declare class SR_Node<O = any, S = any> extends Node<O, S> {
|
|
15
|
+
protected constructor();
|
|
16
|
+
recognition: SpeechRecognition | undefined;
|
|
17
|
+
readonly isStarted: boolean;
|
|
18
|
+
static create<O = any, S = any>(config?: any): SR_Node<O, S>;
|
|
19
|
+
}
|
|
20
|
+
export declare const SpeechRecognition: SR_Node<SpeechRecognitionOptions, any>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
class SR_Node extends Node {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(), (this.isStarted = !1);
|
|
5
|
+
}
|
|
6
|
+
static create(config) {
|
|
7
|
+
return Node.create(config);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
const SpeechRecognition = SR_Node.create({
|
|
11
|
+
name: 'SpeechRecognition',
|
|
12
|
+
addOptions() {
|
|
13
|
+
return {
|
|
14
|
+
lang: 'fr-FR',
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
onCreate() {
|
|
18
|
+
'SpeechRecognition' in window ||
|
|
19
|
+
'webkitSpeechRecognition' in window ||
|
|
20
|
+
console.warn(
|
|
21
|
+
'"speechrecognition extension from @edifice.io/tiptap-extensions" requires a browser supporting the SpeechRecognition API".',
|
|
22
|
+
);
|
|
23
|
+
},
|
|
24
|
+
addCommands() {
|
|
25
|
+
return {
|
|
26
|
+
startSpeechRecognition:
|
|
27
|
+
() =>
|
|
28
|
+
({ commands }) => {
|
|
29
|
+
const SpeechRecognition2 =
|
|
30
|
+
window.SpeechRecognition || window.webkitSpeechRecognition;
|
|
31
|
+
(this.recognition = new SpeechRecognition2()),
|
|
32
|
+
(this.recognition.lang = this.options.lang),
|
|
33
|
+
(this.recognition.interimResults = !0),
|
|
34
|
+
(this.recognition.maxAlternatives = 1),
|
|
35
|
+
(this.recognition.continuous = !0),
|
|
36
|
+
this.recognition.start();
|
|
37
|
+
let { from, to } = this.editor.state.selection;
|
|
38
|
+
return (
|
|
39
|
+
(this.recognition.onresult = (event) => {
|
|
40
|
+
let currentResult = '';
|
|
41
|
+
for (let i = event.resultIndex; i < event.results.length; i++)
|
|
42
|
+
currentResult += event.results[i][0].transcript;
|
|
43
|
+
const isFinal = event.results[event.results.length - 1].isFinal;
|
|
44
|
+
this.editor.commands.deleteRange({ from, to }),
|
|
45
|
+
this.editor.commands.insertContentAt(
|
|
46
|
+
from,
|
|
47
|
+
isFinal ? currentResult : `<code>${currentResult}</code>`,
|
|
48
|
+
{ updateSelection: !isFinal },
|
|
49
|
+
),
|
|
50
|
+
(to = this.editor.state.selection.to),
|
|
51
|
+
isFinal && (from = to);
|
|
52
|
+
}),
|
|
53
|
+
(this.recognition.onerror = (event) => {
|
|
54
|
+
console.log(
|
|
55
|
+
`[speechrecognition from @edifice.io/tiptap-extensions][error][${event.error}]: ${event.message}`,
|
|
56
|
+
);
|
|
57
|
+
}),
|
|
58
|
+
(this.recognition.onstart = () => {
|
|
59
|
+
this.isStarted = !0;
|
|
60
|
+
}),
|
|
61
|
+
(this.recognition.onend = () => {
|
|
62
|
+
this.isStarted = !1;
|
|
63
|
+
}),
|
|
64
|
+
commands
|
|
65
|
+
);
|
|
66
|
+
},
|
|
67
|
+
stopSpeechRecognition:
|
|
68
|
+
() =>
|
|
69
|
+
({ commands }) => (
|
|
70
|
+
this.recognition.stop(), this.editor.commands.focus(), commands
|
|
71
|
+
),
|
|
72
|
+
isSpeechRecognitionStarted: () => () => this.isStarted,
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
export { SpeechRecognition };
|
|
77
|
+
//# sourceMappingURL=speech-recognition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"speech-recognition.js","sources":["../../src/speech-recognition/speech-recognition.ts"],"sourcesContent":["import { Node } from '@tiptap/core';\n\nexport interface SpeechRecognitionOptions {\n lang: string;\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n SpeechRecognition: {\n startSpeechRecognition: () => ReturnType;\n stopSpeechRecognition: () => ReturnType;\n isSpeechRecognitionStarted: () => boolean;\n };\n }\n}\n\nclass SR_Node<O = any, S = any> extends Node<O, S> {\n protected constructor() {\n super();\n }\n\n recognition: SpeechRecognition | undefined;\n readonly isStarted: boolean = false;\n\n static create<O = any, S = any>(config?: any) {\n return Node.create(config) as SR_Node<O, S>;\n }\n}\n\nexport const SpeechRecognition = SR_Node.create<SpeechRecognitionOptions>({\n name: 'SpeechRecognition',\n\n addOptions() {\n return {\n lang: 'fr-FR',\n };\n },\n\n onCreate() {\n if (\n !('SpeechRecognition' in window || 'webkitSpeechRecognition' in window)\n ) {\n console.warn(\n '\"speechrecognition extension from @edifice.io/tiptap-extensions\" requires a browser supporting the SpeechRecognition API\".',\n );\n }\n },\n\n addCommands() {\n return {\n startSpeechRecognition:\n () =>\n ({ commands }) => {\n const SpeechRecognition =\n window.SpeechRecognition || window.webkitSpeechRecognition;\n this.recognition = new SpeechRecognition();\n\n this.recognition.lang = this.options.lang;\n this.recognition.interimResults = true;\n this.recognition.maxAlternatives = 1;\n this.recognition.continuous = true;\n\n this.recognition.start();\n\n // Memoize initial caret positions\n let { from, to } = this.editor.state.selection;\n\n this.recognition.onresult = (event: SpeechRecognitionEvent) => {\n let currentResult = '';\n\n // Add to the currentResult variable the content of the last recognized sentence\n for (let i = event.resultIndex; i < event.results.length; i++) {\n currentResult += event.results[i][0].transcript;\n }\n\n // Is this the final recognition ?\n const isFinal = event.results[event.results.length - 1].isFinal;\n\n // Replace selection by the last recognized sentence (+ style and select, if not final)\n this.editor.commands.deleteRange({ from, to });\n this.editor.commands.insertContentAt(\n from,\n isFinal ? currentResult : `<code>${currentResult}</code>`,\n { updateSelection: !isFinal },\n );\n to = this.editor.state.selection.to;\n\n if (isFinal) {\n // Next content will go after last insertion\n from = to;\n }\n };\n\n this.recognition.onerror = (event: SpeechRecognitionErrorEvent) => {\n // TODO create a \"feedback\" tiptap extension, to display user friendly error messages ?\n console.log(\n `[speechrecognition from @edifice.io/tiptap-extensions][error][${event.error}]: ${event.message}`,\n );\n };\n\n this.recognition.onstart = () => {\n this.isStarted = true;\n };\n\n this.recognition.onend = () => {\n this.isStarted = false;\n };\n\n return commands;\n },\n\n stopSpeechRecognition:\n () =>\n ({ commands }) => {\n this.recognition.stop();\n this.editor.commands.focus();\n return commands;\n },\n\n isSpeechRecognitionStarted: () => () => this.isStarted,\n };\n },\n});\n"],"names":["SpeechRecognition"],"mappings":";AAgBA,MAAM,gBAAkC,KAAW;AAAA,EACvC,cAAc;AAChB,aAIR,KAAS,YAAqB;AAAA,EAH9B;AAAA,EAKA,OAAO,OAAyB,QAAc;AACrC,WAAA,KAAK,OAAO,MAAM;AAAA,EAC3B;AACF;AAEa,MAAA,oBAAoB,QAAQ,OAAiC;AAAA,EACxE,MAAM;AAAA,EAEN,aAAa;AACJ,WAAA;AAAA,MACL,MAAM;AAAA,IAAA;AAAA,EAEV;AAAA,EAEA,WAAW;AACT,IACI,uBAAuB,UAAU,6BAA6B,UAExD,QAAA;AAAA,MACN;AAAA,IAAA;AAAA,EAGN;AAAA,EAEA,cAAc;AACL,WAAA;AAAA,MACL,wBACE,MACA,CAAC,EAAE,eAAe;AACVA,cAAAA,qBACJ,OAAO,qBAAqB,OAAO;AAChC,aAAA,cAAc,IAAIA,sBAElB,KAAA,YAAY,OAAO,KAAK,QAAQ,MACrC,KAAK,YAAY,iBAAiB,IAClC,KAAK,YAAY,kBAAkB,GACnC,KAAK,YAAY,aAAa,IAE9B,KAAK,YAAY;AAGjB,YAAI,EAAE,MAAM,GAAO,IAAA,KAAK,OAAO,MAAM;AAEhC,oBAAA,YAAY,WAAW,CAAC,UAAkC;AAC7D,cAAI,gBAAgB;AAGpB,mBAAS,IAAI,MAAM,aAAa,IAAI,MAAM,QAAQ,QAAQ;AACxD,6BAAiB,MAAM,QAAQ,CAAC,EAAE,CAAC,EAAE;AAIvC,gBAAM,UAAU,MAAM,QAAQ,MAAM,QAAQ,SAAS,CAAC,EAAE;AAGxD,eAAK,OAAO,SAAS,YAAY,EAAE,MAAM,IAAI,GAC7C,KAAK,OAAO,SAAS;AAAA,YACnB;AAAA,YACA,UAAU,gBAAgB,SAAS,aAAa;AAAA,YAChD,EAAE,iBAAiB,CAAC,QAAQ;AAAA,UAAA,GAEzB,KAAA,KAAK,OAAO,MAAM,UAAU,IAE7B,YAEK,OAAA;AAAA,QACT,GAGG,KAAA,YAAY,UAAU,CAAC,UAAuC;AAEzD,kBAAA;AAAA,YACN,iEAAiE,MAAM,KAAK,MAAM,MAAM,OAAO;AAAA,UAAA;AAAA,QACjG,GAGG,KAAA,YAAY,UAAU,MAAM;AAC/B,eAAK,YAAY;AAAA,QAAA,GAGd,KAAA,YAAY,QAAQ,MAAM;AAC7B,eAAK,YAAY;AAAA,QAAA,GAGZ;AAAA,MACT;AAAA,MAEF,uBACE,MACA,CAAC,EAAE,gBACD,KAAK,YAAY,QACZ,KAAA,OAAO,SAAS,SACd;AAAA,MAGX,4BAA4B,MAAM,MAAM,KAAK;AAAA,IAAA;AAAA,EAEjD;AACF,CAAC;"}
|