@edifice.io/tiptap-extensions 2.0.0-develop-rc.7 → 2.0.0-develop-rc.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.
- package/dist/abbr/abbr.cjs +1 -1
- package/dist/abbr/abbr.cjs.map +1 -1
- package/dist/abbr/abbr.js +7 -7
- package/dist/abbr/abbr.js.map +1 -1
- package/dist/alert/alert.cjs +1 -1
- package/dist/alert/alert.cjs.map +1 -1
- package/dist/alert/alert.js +6 -6
- package/dist/alert/alert.js.map +1 -1
- package/dist/attachment/attachment.cjs +1 -1
- package/dist/attachment/attachment.cjs.map +1 -1
- package/dist/attachment/attachment.js +29 -29
- package/dist/attachment/attachment.js.map +1 -1
- package/dist/audio/audio.cjs +3 -3
- package/dist/audio/audio.cjs.map +1 -1
- package/dist/audio/audio.js +16 -16
- package/dist/audio/audio.js.map +1 -1
- package/dist/font-size/font-size.cjs +1 -1
- package/dist/font-size/font-size.cjs.map +1 -1
- package/dist/font-size/font-size.js +10 -10
- package/dist/font-size/font-size.js.map +1 -1
- package/dist/heading/heading.cjs +1 -1
- package/dist/heading/heading.cjs.map +1 -1
- package/dist/heading/heading.js +20 -20
- package/dist/heading/heading.js.map +1 -1
- package/dist/highlight/highlight.cjs +1 -1
- package/dist/highlight/highlight.cjs.map +1 -1
- package/dist/highlight/highlight.js +9 -9
- package/dist/highlight/highlight.js.map +1 -1
- package/dist/hyperlink/hyperlink.cjs +1 -1
- package/dist/hyperlink/hyperlink.cjs.map +1 -1
- package/dist/hyperlink/hyperlink.js +13 -13
- package/dist/hyperlink/hyperlink.js.map +1 -1
- package/dist/iframe/iframe.cjs +1 -1
- package/dist/iframe/iframe.cjs.map +1 -1
- package/dist/iframe/iframe.js +17 -17
- package/dist/iframe/iframe.js.map +1 -1
- package/dist/image/custom-image.cjs +1 -1
- package/dist/image/custom-image.cjs.map +1 -1
- package/dist/image/custom-image.js +51 -51
- package/dist/image/custom-image.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +41 -41
- package/dist/line-height/line-height.cjs +1 -1
- package/dist/line-height/line-height.cjs.map +1 -1
- package/dist/line-height/line-height.js +8 -8
- package/dist/line-height/line-height.js.map +1 -1
- package/dist/linker/linker.cjs +1 -1
- package/dist/linker/linker.cjs.map +1 -1
- package/dist/linker/linker.js +16 -16
- package/dist/linker/linker.js.map +1 -1
- package/dist/mathjax/mathjax.cjs +1 -1
- package/dist/mathjax/mathjax.cjs.map +1 -1
- package/dist/mathjax/mathjax.js +9 -9
- package/dist/mathjax/mathjax.js.map +1 -1
- package/dist/paragraph/paragraph.cjs +1 -1
- package/dist/paragraph/paragraph.cjs.map +1 -1
- package/dist/paragraph/paragraph.js +5 -5
- package/dist/paragraph/paragraph.js.map +1 -1
- package/dist/speech-recognition/speech-recognition.cjs +1 -1
- package/dist/speech-recognition/speech-recognition.cjs.map +1 -1
- package/dist/speech-recognition/speech-recognition.js +29 -29
- package/dist/speech-recognition/speech-recognition.js.map +1 -1
- package/dist/speech-synthesis/speech-synthesis.cjs +1 -1
- package/dist/speech-synthesis/speech-synthesis.cjs.map +1 -1
- package/dist/speech-synthesis/speech-synthesis.js +8 -8
- package/dist/speech-synthesis/speech-synthesis.js.map +1 -1
- package/dist/table-cell/table-cell.cjs +1 -1
- package/dist/table-cell/table-cell.cjs.map +1 -1
- package/dist/table-cell/table-cell.js +10 -10
- package/dist/table-cell/table-cell.js.map +1 -1
- package/dist/transform/html-to-json/html-to-json.cjs +1 -1
- package/dist/transform/html-to-json/html-to-json.cjs.map +1 -1
- package/dist/transform/html-to-json/html-to-json.js +3 -3
- package/dist/transform/html-to-json/html-to-json.js.map +1 -1
- package/dist/transform/json-to-html/json-to-html.cjs +1 -1
- package/dist/transform/json-to-html/json-to-html.cjs.map +1 -1
- package/dist/transform/json-to-html/json-to-html.js +3 -3
- package/dist/transform/json-to-html/json-to-html.js.map +1 -1
- package/dist/video/video.cjs +9 -9
- package/dist/video/video.cjs.map +1 -1
- package/dist/video/video.js +40 -40
- package/dist/video/video.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-image.js","sources":["../../src/image/custom-image.ts"],"sourcesContent":["import { mergeAttributes, nodeInputRule } from '@tiptap/core';\nimport Image from '@tiptap/extension-image';\n\nexport const IMAGE_INPUT_REGEX =\n /(?:^|\\s)(!\\[(.+|:?)]\\((\\S+)(?:(?:\\s+)[\"'](\\S+)[\"'])?\\))$/;\n\nexport interface CustomImageOptions {\n HTMLAttributes: Record<string, string>;\n sizes: string[];\n}\n\ninterface AttributesProps {\n width: number | string;\n height: number | string;\n size: string;\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n customImage: {\n setAttributes: (options: AttributesProps) => ReturnType;\n setNewImage: (options: {\n src: string;\n alt?: string;\n title?: string;\n }) => ReturnType;\n };\n }\n}\n\nexport const CustomImage = Image.extend<CustomImageOptions>({\n name: 'custom-image',\n draggable: true,\n selectable: true,\n\n addOptions() {\n return {\n ...this.parent?.(),\n inline: true,\n content: 'inline*',\n sizes: ['small', 'medium', 'large'],\n HTMLAttributes: {\n class: 'custom-image',\n },\n };\n },\n\n addAttributes() {\n return {\n ...this.parent?.(),\n size: {\n default: 'medium',\n rendered: false,\n },\n alt: {\n renderHTML: (attributes) => {\n return {\n alt: attributes.alt,\n };\n },\n parseHTML: (element) => element.getAttribute('alt'),\n },\n title: {\n renderHTML: (attributes) => {\n return {\n title: attributes.title,\n };\n },\n parseHTML: (element) => element.getAttribute('title'),\n },\n width: {\n default: '350',\n renderHTML: (attributes) => {\n if (\n attributes.width !== null &&\n attributes.width !== undefined &&\n !Number.isNaN(attributes.width)\n ) {\n return {\n width: parseInt(attributes.width),\n };\n }\n return {};\n },\n parseHTML: (element) => element.getAttribute('width'),\n },\n height: {\n renderHTML: (attributes) => {\n if (\n attributes.height !== null &&\n attributes.height !== undefined &&\n !Number.isNaN(attributes.height)\n ) {\n return {\n height: parseInt(attributes.height),\n };\n }\n return {};\n },\n parseHTML: (element) => element.getAttribute('height'),\n },\n style: {\n renderHTML: (attributes) => {\n return attributes.style\n ? {\n style: attributes.style,\n }\n : {};\n },\n parseHTML: (element) => {\n const style = element.getAttribute('style');\n return style && typeof style === 'string' && style.length > 0\n ? {}\n : null;\n },\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: 'img[src]:not([src^=\"data:\"])',\n getAttrs: (el: HTMLImageElement) => {\n const attr = { src: el.getAttribute('src') };\n // Check old content format and get the width from the parent element\n if (el.parentElement?.className.includes('image-container')) {\n if (el.parentElement.style?.width) {\n attr['width'] = el.parentElement.style.width;\n }\n }\n if (el.style?.width) {\n attr['width'] = el.style.width;\n }\n\n // Check old content smiley\n const oldSmileyList = [\n 'happy',\n 'proud',\n 'dreamy',\n 'love',\n 'tired',\n 'angry',\n 'worried',\n 'sick',\n 'joker',\n 'sad',\n ];\n if (\n oldSmileyList.filter((smiley) => attr.src.includes(smiley + '.png'))\n .length > 0\n ) {\n attr['style'] = {\n width: '1.5em',\n height: '1.5em',\n fontSize: el.parentElement?.style?.fontSize,\n };\n attr['width'] = 'null';\n attr['height'] = 'null';\n }\n return attr;\n },\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n 'img',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n ];\n },\n\n addInputRules() {\n return [\n nodeInputRule({\n find: IMAGE_INPUT_REGEX,\n type: this.type,\n getAttributes: (match) => {\n const [, , alt, src, title] = match;\n\n return {\n src,\n alt,\n title,\n };\n },\n }),\n ];\n },\n\n addCommands() {\n return {\n setNewImage:\n (attrs) =>\n ({ tr, dispatch }) => {\n const { selection } = tr;\n const node = this.type.create(attrs);\n\n if (dispatch) {\n tr.replaceRangeWith(selection.from, selection.to, node);\n }\n\n return true;\n },\n setAttributes:\n (attributes) =>\n ({ tr, dispatch }) => {\n const { selection } = tr;\n\n const nodeAttrs = tr.doc.nodeAt(tr.selection.from);\n const options = {\n ...nodeAttrs.attrs,\n ...attributes,\n };\n const node = this.type.create(options);\n\n if (dispatch) {\n tr.replaceRangeWith(selection.from, selection.to, node);\n }\n\n return true;\n },\n };\n },\n});\n"],"names":[],"mappings":";;AAGO,
|
|
1
|
+
{"version":3,"file":"custom-image.js","sources":["../../src/image/custom-image.ts"],"sourcesContent":["import { mergeAttributes, nodeInputRule } from '@tiptap/core';\nimport Image from '@tiptap/extension-image';\n\nexport const IMAGE_INPUT_REGEX =\n /(?:^|\\s)(!\\[(.+|:?)]\\((\\S+)(?:(?:\\s+)[\"'](\\S+)[\"'])?\\))$/;\n\nexport interface CustomImageOptions {\n HTMLAttributes: Record<string, string>;\n sizes: string[];\n}\n\ninterface AttributesProps {\n width: number | string;\n height: number | string;\n size: string;\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n customImage: {\n setAttributes: (options: AttributesProps) => ReturnType;\n setNewImage: (options: {\n src: string;\n alt?: string;\n title?: string;\n }) => ReturnType;\n };\n }\n}\n\nexport const CustomImage = Image.extend<CustomImageOptions>({\n name: 'custom-image',\n draggable: true,\n selectable: true,\n\n addOptions() {\n return {\n ...this.parent?.(),\n inline: true,\n content: 'inline*',\n sizes: ['small', 'medium', 'large'],\n HTMLAttributes: {\n class: 'custom-image',\n },\n };\n },\n\n addAttributes() {\n return {\n ...this.parent?.(),\n size: {\n default: 'medium',\n rendered: false,\n },\n alt: {\n renderHTML: (attributes) => {\n return {\n alt: attributes.alt,\n };\n },\n parseHTML: (element) => element.getAttribute('alt'),\n },\n title: {\n renderHTML: (attributes) => {\n return {\n title: attributes.title,\n };\n },\n parseHTML: (element) => element.getAttribute('title'),\n },\n width: {\n default: '350',\n renderHTML: (attributes) => {\n if (\n attributes.width !== null &&\n attributes.width !== undefined &&\n !Number.isNaN(attributes.width)\n ) {\n return {\n width: parseInt(attributes.width),\n };\n }\n return {};\n },\n parseHTML: (element) => element.getAttribute('width'),\n },\n height: {\n renderHTML: (attributes) => {\n if (\n attributes.height !== null &&\n attributes.height !== undefined &&\n !Number.isNaN(attributes.height)\n ) {\n return {\n height: parseInt(attributes.height),\n };\n }\n return {};\n },\n parseHTML: (element) => element.getAttribute('height'),\n },\n style: {\n renderHTML: (attributes) => {\n return attributes.style\n ? {\n style: attributes.style,\n }\n : {};\n },\n parseHTML: (element) => {\n const style = element.getAttribute('style');\n return style && typeof style === 'string' && style.length > 0\n ? {}\n : null;\n },\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: 'img[src]:not([src^=\"data:\"])',\n getAttrs: (el: HTMLImageElement) => {\n const attr = { src: el.getAttribute('src') };\n // Check old content format and get the width from the parent element\n if (el.parentElement?.className.includes('image-container')) {\n if (el.parentElement.style?.width) {\n attr['width'] = el.parentElement.style.width;\n }\n }\n if (el.style?.width) {\n attr['width'] = el.style.width;\n }\n\n // Check old content smiley\n const oldSmileyList = [\n 'happy',\n 'proud',\n 'dreamy',\n 'love',\n 'tired',\n 'angry',\n 'worried',\n 'sick',\n 'joker',\n 'sad',\n ];\n if (\n oldSmileyList.filter((smiley) => attr.src.includes(smiley + '.png'))\n .length > 0\n ) {\n attr['style'] = {\n width: '1.5em',\n height: '1.5em',\n fontSize: el.parentElement?.style?.fontSize,\n };\n attr['width'] = 'null';\n attr['height'] = 'null';\n }\n return attr;\n },\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n 'img',\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n ];\n },\n\n addInputRules() {\n return [\n nodeInputRule({\n find: IMAGE_INPUT_REGEX,\n type: this.type,\n getAttributes: (match) => {\n const [, , alt, src, title] = match;\n\n return {\n src,\n alt,\n title,\n };\n },\n }),\n ];\n },\n\n addCommands() {\n return {\n setNewImage:\n (attrs) =>\n ({ tr, dispatch }) => {\n const { selection } = tr;\n const node = this.type.create(attrs);\n\n if (dispatch) {\n tr.replaceRangeWith(selection.from, selection.to, node);\n }\n\n return true;\n },\n setAttributes:\n (attributes) =>\n ({ tr, dispatch }) => {\n const { selection } = tr;\n\n const nodeAttrs = tr.doc.nodeAt(tr.selection.from);\n const options = {\n ...nodeAttrs.attrs,\n ...attributes,\n };\n const node = this.type.create(options);\n\n if (dispatch) {\n tr.replaceRangeWith(selection.from, selection.to, node);\n }\n\n return true;\n },\n };\n },\n});\n"],"names":["IMAGE_INPUT_REGEX","CustomImage","Image","_a","attributes","element","style","el","attr","_b","_c","smiley","_e","_d","HTMLAttributes","mergeAttributes","nodeInputRule","match","alt","src","title","attrs","tr","dispatch","selection","node","options"],"mappings":"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"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./abbr/abbr.cjs"),r=require("./alert/alert.cjs"),i=require("./attachment/attachment.cjs"),o=require("./audio/audio.cjs"),n=require("./font-size/font-size.cjs"),s=require("./heading/heading.cjs"),a=require("./highlight/highlight.cjs"),c=require("./hyperlink/hyperlink.cjs"),u=require("./iframe/iframe.cjs"),e=require("./image/custom-image.cjs"),h=require("./line-height/line-height.cjs"),l=require("./linker/linker.cjs"),g=require("./mathjax/mathjax.cjs"),m=require("./paragraph/paragraph.cjs"),q=require("./speech-recognition/speech-recognition.cjs"),p=require("./speech-synthesis/speech-synthesis.cjs"),S=require("./table-cell/table-cell.cjs"),b=require("./transform/html-to-json/html-to-json.cjs"),d=require("./transform/json-to-html/json-to-html.cjs"),H=require("./video/video.cjs");exports.Abbr=t.Abbr;exports.Alert=r.Alert;exports.Attachment=i.Attachment;exports.Audio=o.Audio;exports.FontSize=n.FontSize;exports.CustomHeading=s.CustomHeading;exports.CustomHighlight=a.CustomHighlight;exports.Hyperlink=c.Hyperlink;exports.Iframe=u.Iframe;exports.CustomImage=e.CustomImage;exports.IMAGE_INPUT_REGEX=e.IMAGE_INPUT_REGEX;exports.LineHeight=h.LineHeight;exports.Linker=l.Linker;exports.MathJax=g.MathJax;exports.Paragraph=m.Paragraph;exports.SpeechRecognition=q.SpeechRecognition;exports.SpeechSynthesis=p.SpeechSynthesis;exports.TableCell=S.TableCell;exports.htmlToJson=b;exports.jsonToHtml=d;exports.Video=H.Video;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { Abbr } from "./abbr/abbr.js";
|
|
2
|
-
import { Alert } from "./alert/alert.js";
|
|
3
|
-
import { Attachment } from "./attachment/attachment.js";
|
|
4
|
-
import { Audio } from "./audio/audio.js";
|
|
5
|
-
import { FontSize } from "./font-size/font-size.js";
|
|
6
|
-
import { CustomHeading } from "./heading/heading.js";
|
|
7
|
-
import { CustomHighlight } from "./highlight/highlight.js";
|
|
8
|
-
import { Hyperlink } from "./hyperlink/hyperlink.js";
|
|
9
|
-
import { Iframe } from "./iframe/iframe.js";
|
|
10
|
-
import { CustomImage, IMAGE_INPUT_REGEX } from "./image/custom-image.js";
|
|
11
|
-
import { LineHeight } from "./line-height/line-height.js";
|
|
12
|
-
import { Linker } from "./linker/linker.js";
|
|
13
|
-
import { MathJax } from "./mathjax/mathjax.js";
|
|
14
|
-
import { Paragraph } from "./paragraph/paragraph.js";
|
|
15
|
-
import { SpeechRecognition } from "./speech-recognition/speech-recognition.js";
|
|
16
|
-
import { SpeechSynthesis } from "./speech-synthesis/speech-synthesis.js";
|
|
17
|
-
import { TableCell } from "./table-cell/table-cell.js";
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { Video } from "./video/video.js";
|
|
1
|
+
import { Abbr as e } from "./abbr/abbr.js";
|
|
2
|
+
import { Alert as m } from "./alert/alert.js";
|
|
3
|
+
import { Attachment as f } from "./attachment/attachment.js";
|
|
4
|
+
import { Audio as a } from "./audio/audio.js";
|
|
5
|
+
import { FontSize as n } from "./font-size/font-size.js";
|
|
6
|
+
import { CustomHeading as l } from "./heading/heading.js";
|
|
7
|
+
import { CustomHighlight as g } from "./highlight/highlight.js";
|
|
8
|
+
import { Hyperlink as d } from "./hyperlink/hyperlink.js";
|
|
9
|
+
import { Iframe as H } from "./iframe/iframe.js";
|
|
10
|
+
import { CustomImage as C, IMAGE_INPUT_REGEX as I } from "./image/custom-image.js";
|
|
11
|
+
import { LineHeight as T } from "./line-height/line-height.js";
|
|
12
|
+
import { Linker as E } from "./linker/linker.js";
|
|
13
|
+
import { MathJax as y } from "./mathjax/mathjax.js";
|
|
14
|
+
import { Paragraph as J } from "./paragraph/paragraph.js";
|
|
15
|
+
import { SpeechRecognition as M } from "./speech-recognition/speech-recognition.js";
|
|
16
|
+
import { SpeechSynthesis as R } from "./speech-synthesis/speech-synthesis.js";
|
|
17
|
+
import { TableCell as j } from "./table-cell/table-cell.js";
|
|
18
|
+
import { default as F } from "./transform/html-to-json/html-to-json.js";
|
|
19
|
+
import { default as U } from "./transform/json-to-html/json-to-html.js";
|
|
20
|
+
import { Video as X } from "./video/video.js";
|
|
21
21
|
export {
|
|
22
|
-
Abbr,
|
|
23
|
-
Alert,
|
|
24
|
-
Attachment,
|
|
25
|
-
Audio,
|
|
26
|
-
CustomHeading,
|
|
27
|
-
CustomHighlight,
|
|
28
|
-
CustomImage,
|
|
29
|
-
FontSize,
|
|
30
|
-
Hyperlink,
|
|
31
|
-
IMAGE_INPUT_REGEX,
|
|
32
|
-
Iframe,
|
|
33
|
-
LineHeight,
|
|
34
|
-
Linker,
|
|
35
|
-
MathJax,
|
|
36
|
-
Paragraph,
|
|
37
|
-
SpeechRecognition,
|
|
38
|
-
SpeechSynthesis,
|
|
39
|
-
TableCell,
|
|
40
|
-
Video,
|
|
41
|
-
|
|
42
|
-
|
|
22
|
+
e as Abbr,
|
|
23
|
+
m as Alert,
|
|
24
|
+
f as Attachment,
|
|
25
|
+
a as Audio,
|
|
26
|
+
l as CustomHeading,
|
|
27
|
+
g as CustomHighlight,
|
|
28
|
+
C as CustomImage,
|
|
29
|
+
n as FontSize,
|
|
30
|
+
d as Hyperlink,
|
|
31
|
+
I as IMAGE_INPUT_REGEX,
|
|
32
|
+
H as Iframe,
|
|
33
|
+
T as LineHeight,
|
|
34
|
+
E as Linker,
|
|
35
|
+
y as MathJax,
|
|
36
|
+
J as Paragraph,
|
|
37
|
+
M as SpeechRecognition,
|
|
38
|
+
R as SpeechSynthesis,
|
|
39
|
+
j as TableCell,
|
|
40
|
+
X as Video,
|
|
41
|
+
F as htmlToJson,
|
|
42
|
+
U as jsonToHtml
|
|
43
43
|
};
|
|
44
44
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@tiptap/extension-text-style");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@tiptap/extension-text-style");const i=require("@tiptap/core"),n=i.Extension.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:e=>{var t;return(t=e.style.lineHeight)==null?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.lineHeight?{style:`line-height: ${e.lineHeight}`}:{}}}}]}});exports.LineHeight=n;
|
|
2
2
|
//# sourceMappingURL=line-height.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-height.cjs","sources":["../../src/line-height/line-height.ts"],"sourcesContent":["import '@tiptap/extension-text-style';\n\nimport { Extension } from '@tiptap/core';\n\nexport const LineHeight = Extension.create({\n name: 'lineHeight',\n\n addOptions() {\n return {\n types: ['textStyle'],\n };\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n lineHeight: {\n default: null,\n parseHTML: (element) =>\n element.style.lineHeight?.replace(/['\"]+/g, ''),\n renderHTML: (attributes) => {\n if (!attributes.lineHeight) {\n return {};\n }\n\n return {\n style: `line-height: ${attributes.lineHeight}`,\n };\n },\n },\n },\n },\n ];\n },\n});\n"],"names":["Extension"],"mappings":"
|
|
1
|
+
{"version":3,"file":"line-height.cjs","sources":["../../src/line-height/line-height.ts"],"sourcesContent":["import '@tiptap/extension-text-style';\n\nimport { Extension } from '@tiptap/core';\n\nexport const LineHeight = Extension.create({\n name: 'lineHeight',\n\n addOptions() {\n return {\n types: ['textStyle'],\n };\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n lineHeight: {\n default: null,\n parseHTML: (element) =>\n element.style.lineHeight?.replace(/['\"]+/g, ''),\n renderHTML: (attributes) => {\n if (!attributes.lineHeight) {\n return {};\n }\n\n return {\n style: `line-height: ${attributes.lineHeight}`,\n };\n },\n },\n },\n },\n ];\n },\n});\n"],"names":["LineHeight","Extension","element","_a","attributes"],"mappings":"wJAIaA,EAAaC,YAAU,OAAO,CACzC,KAAM,aAEN,YAAa,CACJ,MAAA,CACL,MAAO,CAAC,WAAW,CAAA,CAEvB,EAEA,qBAAsB,CACb,MAAA,CACL,CACE,MAAO,KAAK,QAAQ,MACpB,WAAY,CACV,WAAY,CACV,QAAS,KACT,UAAYC,GACV,OAAA,OAAAC,EAAAD,EAAQ,MAAM,aAAd,YAAAC,EAA0B,QAAQ,SAAU,KAC9C,WAAaC,GACNA,EAAW,WAIT,CACL,MAAO,gBAAgBA,EAAW,UAAU,EAAA,EAJrC,EAOb,CACF,CACF,CAAA,CAEJ,CACF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@tiptap/extension-text-style";
|
|
2
|
-
import { Extension } from "@tiptap/core";
|
|
3
|
-
const
|
|
2
|
+
import { Extension as i } from "@tiptap/core";
|
|
3
|
+
const l = i.create({
|
|
4
4
|
name: "lineHeight",
|
|
5
5
|
addOptions() {
|
|
6
6
|
return {
|
|
@@ -14,12 +14,12 @@ const LineHeight = Extension.create({
|
|
|
14
14
|
attributes: {
|
|
15
15
|
lineHeight: {
|
|
16
16
|
default: null,
|
|
17
|
-
parseHTML: (
|
|
18
|
-
var
|
|
19
|
-
return (
|
|
17
|
+
parseHTML: (e) => {
|
|
18
|
+
var t;
|
|
19
|
+
return (t = e.style.lineHeight) == null ? void 0 : t.replace(/['"]+/g, "");
|
|
20
20
|
},
|
|
21
|
-
renderHTML: (
|
|
22
|
-
style: `line-height: ${
|
|
21
|
+
renderHTML: (e) => e.lineHeight ? {
|
|
22
|
+
style: `line-height: ${e.lineHeight}`
|
|
23
23
|
} : {}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -28,6 +28,6 @@ const LineHeight = Extension.create({
|
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
export {
|
|
31
|
-
LineHeight
|
|
31
|
+
l as LineHeight
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=line-height.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-height.js","sources":["../../src/line-height/line-height.ts"],"sourcesContent":["import '@tiptap/extension-text-style';\n\nimport { Extension } from '@tiptap/core';\n\nexport const LineHeight = Extension.create({\n name: 'lineHeight',\n\n addOptions() {\n return {\n types: ['textStyle'],\n };\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n lineHeight: {\n default: null,\n parseHTML: (element) =>\n element.style.lineHeight?.replace(/['\"]+/g, ''),\n renderHTML: (attributes) => {\n if (!attributes.lineHeight) {\n return {};\n }\n\n return {\n style: `line-height: ${attributes.lineHeight}`,\n };\n },\n },\n },\n },\n ];\n },\n});\n"],"names":[],"mappings":";;AAIa,
|
|
1
|
+
{"version":3,"file":"line-height.js","sources":["../../src/line-height/line-height.ts"],"sourcesContent":["import '@tiptap/extension-text-style';\n\nimport { Extension } from '@tiptap/core';\n\nexport const LineHeight = Extension.create({\n name: 'lineHeight',\n\n addOptions() {\n return {\n types: ['textStyle'],\n };\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n lineHeight: {\n default: null,\n parseHTML: (element) =>\n element.style.lineHeight?.replace(/['\"]+/g, ''),\n renderHTML: (attributes) => {\n if (!attributes.lineHeight) {\n return {};\n }\n\n return {\n style: `line-height: ${attributes.lineHeight}`,\n };\n },\n },\n },\n },\n ];\n },\n});\n"],"names":["LineHeight","Extension","element","_a","attributes"],"mappings":";;AAIa,MAAAA,IAAaC,EAAU,OAAO;AAAA,EACzC,MAAM;AAAA,EAEN,aAAa;AACJ,WAAA;AAAA,MACL,OAAO,CAAC,WAAW;AAAA,IAAA;AAAA,EAEvB;AAAA,EAEA,sBAAsB;AACb,WAAA;AAAA,MACL;AAAA,QACE,OAAO,KAAK,QAAQ;AAAA,QACpB,YAAY;AAAA,UACV,YAAY;AAAA,YACV,SAAS;AAAA,YACT,WAAW,CAACC,MACV;;AAAA,sBAAAC,IAAAD,EAAQ,MAAM,eAAd,gBAAAC,EAA0B,QAAQ,UAAU;AAAA;AAAA,YAC9C,YAAY,CAACC,MACNA,EAAW,aAIT;AAAA,cACL,OAAO,gBAAgBA,EAAW,UAAU;AAAA,YAAA,IAJrC;UAOb;AAAA,QACF;AAAA,MACF;AAAA,IAAA;AAAA,EAEJ;AACF,CAAC;"}
|
package/dist/linker/linker.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@tiptap/core"),s=i.Node.create({name:"linker",content:"text*",marks:"",group:"inline",inline:!0,selectable:!0,atom:!0,draggable:!0,isolating:!0,allowGapCursor:!1,priority:1100,keepOnSplit:!1,addOptions(){return{openOnClick:!0,HTMLAttributes:{target:null,title:null,class:null,"data-id":null,"data-app-prefix":null},validate:void 0}},addAttributes(){return{href:{default:null},class:{default:this.options.HTMLAttributes.class},target:{default:this.options.HTMLAttributes.target,parseHTML:t=>t.getAttribute("target")!=="_blank"?null:"_blank"},title:{default:this.options.HTMLAttributes.title},"data-id":{default:this.options.HTMLAttributes["data-id"]},"data-app-prefix":{default:this.options.HTMLAttributes["data-app-prefix"]}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])[data-id][data-app-prefix]'}]},renderHTML({HTMLAttributes:t}){var e;return(e=t.href)!=null&&e.startsWith("javascript:")?["a",i.mergeAttributes(this.options.HTMLAttributes,{...t,href:""}),0]:["a",i.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{setLinker:t=>({commands:e})=>(e.insertContent({type:this.name,attrs:t,content:[{type:"text",text:t.title}]}),!0),unsetLinker:()=>({state:t,tr:e})=>{const{node:r,from:a,to:n}=t.selection;return(r==null?void 0:r.type.name)==="linker"&&e.delete(a,n).scrollIntoView(),!0}}}});exports.Linker=s;
|
|
2
2
|
//# sourceMappingURL=linker.cjs.map
|
|
@@ -1 +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":"
|
|
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":["Linker","Node","element","HTMLAttributes","_a","mergeAttributes","attrs","commands","state","tr","node","from","to"],"mappings":"gHAkCaA,EAASC,OAAK,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,UAAYC,GACVA,EAAQ,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,eAAAC,GAAkB,OAC7B,OAAIC,EAAAD,EAAe,OAAf,MAAAC,EAAqB,WAAW,eAC3B,CACL,IACAC,kBAAgB,KAAK,QAAQ,eAAgB,CAC3C,GAAGF,EACH,KAAM,EAAA,CACP,EACD,CAAA,EAGG,CACL,IACAE,EAAAA,gBAAgB,KAAK,QAAQ,eAAgBF,CAAc,EAC3D,CAAA,CAEJ,EAEA,aAAc,CACL,MAAA,CACL,UACGG,GACD,CAAC,CAAE,SAAAC,MAEDA,EAAS,cAAc,CACrB,KAAM,KAAK,KACX,MAAAD,EACA,QAAS,CACP,CACE,KAAM,OACN,KAAMA,EAAM,KACd,CACF,CAAA,CACD,EACM,IAGX,YACE,IACA,CAAC,CAAE,MAAAE,EAAO,GAAAC,KAAS,CAEjB,KAAM,CAAE,KAAAC,EAAM,KAAAC,EAAM,GAAAC,CAAA,EAAOJ,EAAM,UAE7B,OAAAE,GAAA,YAAAA,EAAM,KAAK,QAAS,UAKtBD,EAAG,OAAOE,EAAMC,CAAE,EAAE,eAAe,EAE9B,EACT,CAAA,CAEN,CACF,CAAC"}
|
package/dist/linker/linker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Node, mergeAttributes } from "@tiptap/core";
|
|
2
|
-
const
|
|
1
|
+
import { Node as s, mergeAttributes as a } from "@tiptap/core";
|
|
2
|
+
const u = s.create({
|
|
3
3
|
name: "linker",
|
|
4
4
|
content: "text*",
|
|
5
5
|
marks: "",
|
|
@@ -36,7 +36,7 @@ const Linker = Node.create({
|
|
|
36
36
|
target: {
|
|
37
37
|
default: this.options.HTMLAttributes.target,
|
|
38
38
|
// Sanitize target value
|
|
39
|
-
parseHTML: (
|
|
39
|
+
parseHTML: (t) => t.getAttribute("target") !== "_blank" ? null : "_blank"
|
|
40
40
|
},
|
|
41
41
|
title: {
|
|
42
42
|
default: this.options.HTMLAttributes.title
|
|
@@ -56,41 +56,41 @@ const Linker = Node.create({
|
|
|
56
56
|
}
|
|
57
57
|
];
|
|
58
58
|
},
|
|
59
|
-
renderHTML({ HTMLAttributes }) {
|
|
60
|
-
var
|
|
61
|
-
return (
|
|
59
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
60
|
+
var e;
|
|
61
|
+
return (e = t.href) != null && e.startsWith("javascript:") ? [
|
|
62
62
|
"a",
|
|
63
|
-
|
|
64
|
-
...
|
|
63
|
+
a(this.options.HTMLAttributes, {
|
|
64
|
+
...t,
|
|
65
65
|
href: ""
|
|
66
66
|
}),
|
|
67
67
|
0
|
|
68
68
|
] : [
|
|
69
69
|
"a",
|
|
70
|
-
|
|
70
|
+
a(this.options.HTMLAttributes, t),
|
|
71
71
|
0
|
|
72
72
|
];
|
|
73
73
|
},
|
|
74
74
|
addCommands() {
|
|
75
75
|
return {
|
|
76
|
-
setLinker: (
|
|
76
|
+
setLinker: (t) => ({ commands: e }) => (e.insertContent({
|
|
77
77
|
type: this.name,
|
|
78
|
-
attrs,
|
|
78
|
+
attrs: t,
|
|
79
79
|
content: [
|
|
80
80
|
{
|
|
81
81
|
type: "text",
|
|
82
|
-
text:
|
|
82
|
+
text: t.title
|
|
83
83
|
}
|
|
84
84
|
]
|
|
85
85
|
}), !0),
|
|
86
|
-
unsetLinker: () => ({ state, tr }) => {
|
|
87
|
-
const { node, from, to } =
|
|
88
|
-
return (
|
|
86
|
+
unsetLinker: () => ({ state: t, tr: e }) => {
|
|
87
|
+
const { node: r, from: i, to: n } = t.selection;
|
|
88
|
+
return (r == null ? void 0 : r.type.name) === "linker" && e.delete(i, n).scrollIntoView(), !0;
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
export {
|
|
94
|
-
Linker
|
|
94
|
+
u as Linker
|
|
95
95
|
};
|
|
96
96
|
//# sourceMappingURL=linker.js.map
|
|
@@ -1 +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,
|
|
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":["Linker","Node","element","HTMLAttributes","_a","mergeAttributes","attrs","commands","state","tr","node","from","to"],"mappings":";AAkCa,MAAAA,IAASC,EAAK,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,CAACC,MACVA,EAAQ,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,gBAAAC,KAAkB;;AAC7B,YAAIC,IAAAD,EAAe,SAAf,QAAAC,EAAqB,WAAW,iBAC3B;AAAA,MACL;AAAA,MACAC,EAAgB,KAAK,QAAQ,gBAAgB;AAAA,QAC3C,GAAGF;AAAA,QACH,MAAM;AAAA,MAAA,CACP;AAAA,MACD;AAAA,IAAA,IAGG;AAAA,MACL;AAAA,MACAE,EAAgB,KAAK,QAAQ,gBAAgBF,CAAc;AAAA,MAC3D;AAAA,IAAA;AAAA,EAEJ;AAAA,EAEA,cAAc;AACL,WAAA;AAAA,MACL,WACE,CAACG,MACD,CAAC,EAAE,UAAAC,SAEDA,EAAS,cAAc;AAAA,QACrB,MAAM,KAAK;AAAA,QACX,OAAAD;AAAA,QACA,SAAS;AAAA,UACP;AAAA,YACE,MAAM;AAAA,YACN,MAAMA,EAAM;AAAA,UACd;AAAA,QACF;AAAA,MAAA,CACD,GACM;AAAA,MAGX,aACE,MACA,CAAC,EAAE,OAAAE,GAAO,IAAAC,QAAS;AAEjB,cAAM,EAAE,MAAAC,GAAM,MAAAC,GAAM,IAAAC,EAAA,IAAOJ,EAAM;AAE7B,gBAAAE,KAAA,gBAAAA,EAAM,KAAK,UAAS,YAKtBD,EAAG,OAAOE,GAAMC,CAAE,EAAE,eAAe,GAE9B;AAAA,MACT;AAAA,IAAA;AAAA,EAEN;AACF,CAAC;"}
|
package/dist/mathjax/mathjax.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@tiptap/core"),l=r.Node.create({name:"mathjaxnode",group:"inline",inline:!0,atom:!1,selectable:!0,parseHTML(){return[{tag:"mathjax"}]},addAttributes(){return{equation:{default:null,parseHTML:t=>{const n=[...t.childNodes].filter(a=>a.nodeType===3);return n.length>0?n[n.length-1].nodeValue:null}}}},renderHTML({HTMLAttributes:t}){let e=(t.equation||"").replaceAll(/(?:\\)?begin{equation}\s*\n?\s*{(.+?)}\n?\s*?(?:\\)?end{equation}/gm,"$$$1$$").replaceAll(/(?:\\)?begin{equation}\s*\n?\s*(.+?)\n?\s*?(?:\\)?end{equation}/gm,"$$$1$$");return e.length>0&&(e.charAt(0)!=="$"&&(e=`$${e}`),e.charAt(e.length-1)!=="$"&&(e=`${e}$`)),["span",{},e]}});exports.MathJax=l;
|
|
2
2
|
//# sourceMappingURL=mathjax.cjs.map
|
|
@@ -1 +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":"
|
|
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":["MathJax","Node","element","textNodes","child","HTMLAttributes","equation"],"mappings":"gHAEaA,EAAUC,OAAK,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,UAAYC,GAAiB,CAE3B,MAAMC,EADW,CAAC,GAAGD,EAAQ,UAAU,EACZ,OAAQE,GAAUA,EAAM,WAAa,CAAC,EAC1D,OAAAD,EAAU,OAAS,EACtBA,EAAUA,EAAU,OAAS,CAAC,EAAE,UAChC,IACN,CACF,CAAA,CAEJ,EAEA,WAAW,CAAE,eAAAE,GAAkB,CACzB,IAAAC,GAAYD,EAAe,UAAY,IAGxC,WACC,sEACA,QAAA,EAED,WACC,oEACA,QAAA,EAEA,OAAAC,EAAS,OAAS,IAChBA,EAAS,OAAO,CAAC,IAAM,MACzBA,EAAW,IAAIA,CAAQ,IAErBA,EAAS,OAAOA,EAAS,OAAS,CAAC,IAAM,MAC3CA,EAAW,GAAGA,CAAQ,MAGnB,CAAC,OAAQ,GAAIA,CAAQ,CAC9B,CACF,CAAC"}
|
package/dist/mathjax/mathjax.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Node } from "@tiptap/core";
|
|
2
|
-
const
|
|
1
|
+
import { Node as r } from "@tiptap/core";
|
|
2
|
+
const i = r.create({
|
|
3
3
|
name: "mathjaxnode",
|
|
4
4
|
group: "inline",
|
|
5
5
|
inline: !0,
|
|
@@ -16,25 +16,25 @@ const MathJax = Node.create({
|
|
|
16
16
|
return {
|
|
17
17
|
equation: {
|
|
18
18
|
default: null,
|
|
19
|
-
parseHTML: (
|
|
20
|
-
const
|
|
21
|
-
return
|
|
19
|
+
parseHTML: (n) => {
|
|
20
|
+
const t = [...n.childNodes].filter((a) => a.nodeType === 3);
|
|
21
|
+
return t.length > 0 ? t[t.length - 1].nodeValue : null;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
},
|
|
26
|
-
renderHTML({ HTMLAttributes }) {
|
|
27
|
-
let
|
|
26
|
+
renderHTML({ HTMLAttributes: n }) {
|
|
27
|
+
let e = (n.equation || "").replaceAll(
|
|
28
28
|
/(?:\\)?begin{equation}\s*\n?\s*{(.+?)}\n?\s*?(?:\\)?end{equation}/gm,
|
|
29
29
|
"$$$1$$"
|
|
30
30
|
).replaceAll(
|
|
31
31
|
/(?:\\)?begin{equation}\s*\n?\s*(.+?)\n?\s*?(?:\\)?end{equation}/gm,
|
|
32
32
|
"$$$1$$"
|
|
33
33
|
);
|
|
34
|
-
return
|
|
34
|
+
return e.length > 0 && (e.charAt(0) !== "$" && (e = `$${e}`), e.charAt(e.length - 1) !== "$" && (e = `${e}$`)), ["span", {}, e];
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
export {
|
|
38
|
-
MathJax
|
|
38
|
+
i as MathJax
|
|
39
39
|
};
|
|
40
40
|
//# sourceMappingURL=mathjax.js.map
|
|
@@ -1 +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,
|
|
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":["MathJax","Node","element","textNodes","child","HTMLAttributes","equation"],"mappings":";AAEa,MAAAA,IAAUC,EAAK,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,CAACC,MAAiB;AAE3B,gBAAMC,IADW,CAAC,GAAGD,EAAQ,UAAU,EACZ,OAAO,CAACE,MAAUA,EAAM,aAAa,CAAC;AAC1D,iBAAAD,EAAU,SAAS,IACtBA,EAAUA,EAAU,SAAS,CAAC,EAAE,YAChC;AAAA,QACN;AAAA,MACF;AAAA,IAAA;AAAA,EAEJ;AAAA,EAEA,WAAW,EAAE,gBAAAE,KAAkB;AACzB,QAAAC,KAAYD,EAAe,YAAY,IAGxC;AAAA,MACC;AAAA,MACA;AAAA,IAAA,EAED;AAAA,MACC;AAAA,MACA;AAAA,IAAA;AAEA,WAAAC,EAAS,SAAS,MAChBA,EAAS,OAAO,CAAC,MAAM,QACzBA,IAAW,IAAIA,CAAQ,KAErBA,EAAS,OAAOA,EAAS,SAAS,CAAC,MAAM,QAC3CA,IAAW,GAAGA,CAAQ,OAGnB,CAAC,QAAQ,IAAIA,CAAQ;AAAA,EAC9B;AACF,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tiptap/extension-paragraph"),r=e.Paragraph.extend({parseHTML(){var a;return[...((a=this.parent)==null?void 0:a.call(this))??[],{tag:"div[style]:has(> span)"}]}});exports.Paragraph=r;
|
|
2
2
|
//# sourceMappingURL=paragraph.cjs.map
|
|
@@ -1 +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":"
|
|
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":["Paragraph","TiptapParagraph","_a"],"mappings":"+HAcaA,EAAYC,YAAgB,OAAO,CAC9C,WAAY,OAEH,MAAA,CACL,KAFkBC,EAAA,KAAK,SAAL,YAAAA,EAAA,aAAmB,CAAA,EAGrC,CACE,IAAK,wBACP,CAAA,CAEJ,CACF,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Paragraph as
|
|
2
|
-
const
|
|
1
|
+
import { Paragraph as r } from "@tiptap/extension-paragraph";
|
|
2
|
+
const p = r.extend({
|
|
3
3
|
parseHTML() {
|
|
4
|
-
var
|
|
4
|
+
var a;
|
|
5
5
|
return [
|
|
6
|
-
...((
|
|
6
|
+
...((a = this.parent) == null ? void 0 : a.call(this)) ?? [],
|
|
7
7
|
{
|
|
8
8
|
tag: "div[style]:has(> span)"
|
|
9
9
|
}
|
|
@@ -11,6 +11,6 @@ const Paragraph = Paragraph$1.extend({
|
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
export {
|
|
14
|
-
Paragraph
|
|
14
|
+
p as Paragraph
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=paragraph.js.map
|
|
@@ -1 +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,
|
|
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":["Paragraph","TiptapParagraph","_a"],"mappings":";AAca,MAAAA,IAAYC,EAAgB,OAAO;AAAA,EAC9C,YAAY;;AAEH,WAAA;AAAA,MACL,KAFkBC,IAAA,KAAK,WAAL,gBAAAA,EAAA,eAAmB,CAAA;AAAA,MAGrC;AAAA,QACE,KAAK;AAAA,MACP;AAAA,IAAA;AAAA,EAEJ;AACF,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var h=Object.defineProperty;var d=(e,t,i)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var a=(e,t,i)=>d(e,typeof t!="symbol"?t+"":t,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("@tiptap/core");class l extends g.Node{constructor(){super();a(this,"recognition");a(this,"isStarted",!1)}static create(i){return g.Node.create(i)}}const u=l.create({name:"SpeechRecognition",addOptions(){return{lang:"fr-FR"}},onCreate(){"SpeechRecognition"in window||"webkitSpeechRecognition"in window||console.warn('"speechrecognition extension from @edifice.io/tiptap-extensions" requires a browser supporting the SpeechRecognition API".')},addCommands(){return{startSpeechRecognition:()=>({commands:e})=>{const t=window.SpeechRecognition||window.webkitSpeechRecognition;this.recognition=new t,this.recognition.lang=this.options.lang,this.recognition.interimResults=!0,this.recognition.maxAlternatives=1,this.recognition.continuous=!0,this.recognition.start();let{from:i,to:n}=this.editor.state.selection;return this.recognition.onresult=o=>{let s="";for(let c=o.resultIndex;c<o.results.length;c++)s+=o.results[c][0].transcript;const r=o.results[o.results.length-1].isFinal;this.editor.commands.deleteRange({from:i,to:n}),this.editor.commands.insertContentAt(i,r?s:`<code>${s}</code>`,{updateSelection:!r}),n=this.editor.state.selection.to,r&&(i=n)},this.recognition.onerror=o=>{console.log(`[speechrecognition from @edifice.io/tiptap-extensions][error][${o.error}]: ${o.message}`)},this.recognition.onstart=()=>{this.isStarted=!0},this.recognition.onend=()=>{this.isStarted=!1},e},stopSpeechRecognition:()=>({commands:e})=>(this.recognition.stop(),this.editor.commands.focus(),e),isSpeechRecognitionStarted:()=>()=>this.isStarted}}});exports.SpeechRecognition=u;
|
|
2
2
|
//# sourceMappingURL=speech-recognition.cjs.map
|
|
@@ -1 +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":"
|
|
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":["SR_Node","Node","__publicField","config","SpeechRecognition","commands","from","to","event","currentResult","i","isFinal"],"mappings":"oRAgBA,MAAMA,UAAkCC,EAAAA,IAAW,CACvC,aAAc,CAChB,QAGRC,EAAA,oBACSA,EAAA,iBAAqB,GAH9B,CAKA,OAAO,OAAyBC,EAAc,CACrC,OAAAF,EAAA,KAAK,OAAOE,CAAM,CAC3B,CACF,CAEa,MAAAC,EAAoBJ,EAAQ,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,SAAAK,KAAe,CACVD,MAAAA,EACJ,OAAO,mBAAqB,OAAO,wBAChC,KAAA,YAAc,IAAIA,EAElB,KAAA,YAAY,KAAO,KAAK,QAAQ,KACrC,KAAK,YAAY,eAAiB,GAClC,KAAK,YAAY,gBAAkB,EACnC,KAAK,YAAY,WAAa,GAE9B,KAAK,YAAY,QAGjB,GAAI,CAAE,KAAAE,EAAM,GAAAC,CAAO,EAAA,KAAK,OAAO,MAAM,UAEhC,YAAA,YAAY,SAAYC,GAAkC,CAC7D,IAAIC,EAAgB,GAGpB,QAASC,EAAIF,EAAM,YAAaE,EAAIF,EAAM,QAAQ,OAAQE,IACxDD,GAAiBD,EAAM,QAAQE,CAAC,EAAE,CAAC,EAAE,WAIvC,MAAMC,EAAUH,EAAM,QAAQA,EAAM,QAAQ,OAAS,CAAC,EAAE,QAGxD,KAAK,OAAO,SAAS,YAAY,CAAE,KAAAF,EAAM,GAAAC,EAAI,EAC7C,KAAK,OAAO,SAAS,gBACnBD,EACAK,EAAUF,EAAgB,SAASA,CAAa,UAChD,CAAE,gBAAiB,CAACE,CAAQ,CAAA,EAEzBJ,EAAA,KAAK,OAAO,MAAM,UAAU,GAE7BI,IAEKL,EAAAC,EACT,EAGG,KAAA,YAAY,QAAWC,GAAuC,CAEzD,QAAA,IACN,iEAAiEA,EAAM,KAAK,MAAMA,EAAM,OAAO,EAAA,CACjG,EAGG,KAAA,YAAY,QAAU,IAAM,CAC/B,KAAK,UAAY,EAAA,EAGd,KAAA,YAAY,MAAQ,IAAM,CAC7B,KAAK,UAAY,EAAA,EAGZH,CACT,EAEF,sBACE,IACA,CAAC,CAAE,SAAAA,MACD,KAAK,YAAY,OACZ,KAAA,OAAO,SAAS,QACdA,GAGX,2BAA4B,IAAM,IAAM,KAAK,SAAA,CAEjD,CACF,CAAC"}
|