@edifice.io/tiptap-extensions 1.5.16-develop-rc.2 → 2.0.0-develop-rc.0
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/README.md +63 -0
- package/package.json +5 -2
- package/.turbo/turbo-build.log +0 -58
- package/.turbo/turbo-format.log +0 -142
- package/.turbo/turbo-lint.log +0 -5
- package/src/abbr/abbr.ts +0 -57
- package/src/abbr/index.ts +0 -5
- package/src/alert/alert.ts +0 -46
- package/src/alert/index.ts +0 -5
- package/src/attachment/attachment.ts +0 -113
- package/src/attachment/index.ts +0 -5
- package/src/audio/audio.ts +0 -81
- package/src/audio/index.ts +0 -5
- package/src/font-size/font-size.ts +0 -74
- package/src/font-size/index.ts +0 -5
- package/src/heading/heading.ts +0 -90
- package/src/heading/index.ts +0 -5
- package/src/highlight/highlight.ts +0 -27
- package/src/highlight/index.ts +0 -5
- package/src/hyperlink/hyperlink.ts +0 -92
- package/src/hyperlink/index.ts +0 -5
- package/src/iframe/iframe.ts +0 -112
- package/src/iframe/index.ts +0 -5
- package/src/image/custom-image.ts +0 -226
- package/src/image/index.ts +0 -5
- package/src/index.ts +0 -19
- package/src/line-height/index.ts +0 -5
- package/src/line-height/line-height.ts +0 -37
- package/src/linker/index.ts +0 -5
- package/src/linker/linker.ts +0 -153
- package/src/mathjax/index.ts +0 -5
- package/src/mathjax/mathjax.ts +0 -55
- package/src/paragraph/index.ts +0 -5
- package/src/paragraph/paragraph.ts +0 -25
- package/src/speech-recognition/index.ts +0 -5
- package/src/speech-recognition/speech-recognition.ts +0 -123
- package/src/speech-synthesis/index.ts +0 -5
- package/src/speech-synthesis/speech-synthesis.ts +0 -52
- package/src/table-cell/index.ts +0 -5
- package/src/table-cell/table-cell.ts +0 -28
- package/src/transform/html-to-json/html-to-json.ts +0 -5
- package/src/transform/index.ts +0 -4
- package/src/transform/json-to-html/json-to-html.ts +0 -5
- package/src/video/index.ts +0 -5
- package/src/video/video.ts +0 -173
- package/tsconfig.json +0 -20
- package/vite.config.ts +0 -46
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Edifice Rich Text Editor Extensions
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+
|
|
6
|
+
Extensions based on Tiptap Editor
|
|
7
|
+
|
|
8
|
+
## Getting Started
|
|
9
|
+
|
|
10
|
+
### Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pnpm add @edifice.io/tiptap-extensions
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Imports
|
|
17
|
+
|
|
18
|
+
#### Global
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
import { Alert, Video } from "@edifice.io/tiptap-extensions"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
#### Sub-imports
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
import { Alert } from "@edifice.io/tiptap-extensions/alert"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## New extension
|
|
31
|
+
|
|
32
|
+
To create a new extension, please do as follow :
|
|
33
|
+
|
|
34
|
+
- Create a subfolder in `src` with the name of the extension (e.g: `my-extension`)
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
my-extension
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
- Create two files inside the new folder:
|
|
41
|
+
- `index.ts`
|
|
42
|
+
- `my-extension.ts`
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
my-extension
|
|
46
|
+
└── my-extension.ts
|
|
47
|
+
└── index.ts
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- Check one existing extension or refer to this documentation to develop the extension -> [Tiptap](https://tiptap.dev/docs/editor/extensions/custom-extensionsv)
|
|
51
|
+
|
|
52
|
+
- Then, add your extension in the `package.json` sub-exports in alphabetical order
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
"./my-extension": {
|
|
56
|
+
"import": "./dist/my-extension/my-extension.js",
|
|
57
|
+
"require": "./dist/my-extension/my-extension.cjs"
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- Run `pnpm run build` to generate a bundle
|
|
62
|
+
|
|
63
|
+
- Test your extension before committing and pushing to remote
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/tiptap-extensions",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-develop-rc.0",
|
|
4
4
|
"description": "Edifice Rich Text Editor Extensions",
|
|
5
5
|
"homepage": "https://github.com/edificeio/edifice-ui/tree/main/packages/tiptap/extensions#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -99,6 +99,9 @@
|
|
|
99
99
|
"main": "dist/index.cjs",
|
|
100
100
|
"module": "dist/index.js",
|
|
101
101
|
"typings": "dist/index.d.ts",
|
|
102
|
+
"files": [
|
|
103
|
+
"dist"
|
|
104
|
+
],
|
|
102
105
|
"scripts": {
|
|
103
106
|
"build": "vite build",
|
|
104
107
|
"fix": "eslint . --ext ts --report-unused-disable-directives --max-warnings 0",
|
|
@@ -129,5 +132,5 @@
|
|
|
129
132
|
"publishConfig": {
|
|
130
133
|
"access": "public"
|
|
131
134
|
},
|
|
132
|
-
"gitHead": "
|
|
135
|
+
"gitHead": "6f136eacef86c18be3da824cbf7b9b6bea784457"
|
|
133
136
|
}
|
package/.turbo/turbo-build.log
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
WARN Issue while reading "/home/runner/work/edifice-ui/edifice-ui/.npmrc". Failed to replace env in config: ${NPM_TOKEN}
|
|
2
|
-
|
|
3
|
-
> @edifice.io/tiptap-extensions@0.0.1 build /home/runner/work/edifice-ui/edifice-ui/packages/tiptap/extensions
|
|
4
|
-
> vite build
|
|
5
|
-
|
|
6
|
-
[36mvite v5.4.2 [32mbuilding for production...[36m[39m
|
|
7
|
-
[33m"build.lib.formats" will be ignored because "build.rollupOptions.output" is already an array format.[39m
|
|
8
|
-
transforming...
|
|
9
|
-
[32m✓[39m 40 modules transformed.
|
|
10
|
-
rendering chunks...
|
|
11
|
-
|
|
12
|
-
[vite:dts] Start generate declaration files...
|
|
13
|
-
computing gzip size...
|
|
14
|
-
[2mdist/[22m[36mtransform/html-to-json/html-to-json.js [39m[1m[2m0.20 kB[22m[1m[22m[2m │ gzip: 0.16 kB[22m[2m │ map: 0.38 kB[22m
|
|
15
|
-
[2mdist/[22m[36mtransform/json-to-html/json-to-html.js [39m[1m[2m0.20 kB[22m[1m[22m[2m │ gzip: 0.16 kB[22m[2m │ map: 0.38 kB[22m
|
|
16
|
-
[2mdist/[22m[36mparagraph/paragraph.js [39m[1m[2m0.35 kB[22m[1m[22m[2m │ gzip: 0.25 kB[22m[2m │ map: 1.14 kB[22m
|
|
17
|
-
[2mdist/[22m[36mhighlight/highlight.js [39m[1m[2m0.59 kB[22m[1m[22m[2m │ gzip: 0.32 kB[22m[2m │ map: 0.95 kB[22m
|
|
18
|
-
[2mdist/[22m[36mabbr/abbr.js [39m[1m[2m0.63 kB[22m[1m[22m[2m │ gzip: 0.31 kB[22m[2m │ map: 1.61 kB[22m
|
|
19
|
-
[2mdist/[22m[36mtable-cell/table-cell.js [39m[1m[2m0.70 kB[22m[1m[22m[2m │ gzip: 0.37 kB[22m[2m │ map: 1.38 kB[22m
|
|
20
|
-
[2mdist/[22m[36malert/alert.js [39m[1m[2m0.77 kB[22m[1m[22m[2m │ gzip: 0.36 kB[22m[2m │ map: 1.52 kB[22m
|
|
21
|
-
[2mdist/[22m[36mline-height/line-height.js [39m[1m[2m0.79 kB[22m[1m[22m[2m │ gzip: 0.39 kB[22m[2m │ map: 1.38 kB[22m
|
|
22
|
-
[2mdist/[22m[36mspeech-synthesis/speech-synthesis.js [39m[1m[2m0.81 kB[22m[1m[22m[2m │ gzip: 0.36 kB[22m[2m │ map: 1.98 kB[22m
|
|
23
|
-
[2mdist/[22m[36mfont-size/font-size.js [39m[1m[2m1.04 kB[22m[1m[22m[2m │ gzip: 0.47 kB[22m[2m │ map: 2.34 kB[22m
|
|
24
|
-
[2mdist/[22m[36mmathjax/mathjax.js [39m[1m[2m1.12 kB[22m[1m[22m[2m │ gzip: 0.52 kB[22m[2m │ map: 2.33 kB[22m
|
|
25
|
-
[2mdist/[22m[36maudio/audio.js [39m[1m[2m1.23 kB[22m[1m[22m[2m │ gzip: 0.52 kB[22m[2m │ map: 2.84 kB[22m
|
|
26
|
-
[2mdist/[22m[36mhyperlink/hyperlink.js [39m[1m[2m1.49 kB[22m[1m[22m[2m │ gzip: 0.64 kB[22m[2m │ map: 3.34 kB[22m
|
|
27
|
-
[2mdist/[22m[36mindex.js [39m[1m[2m1.49 kB[22m[1m[22m[2m │ gzip: 0.51 kB[22m[2m │ map: 0.11 kB[22m
|
|
28
|
-
[2mdist/[22m[36mheading/heading.js [39m[1m[2m1.55 kB[22m[1m[22m[2m │ gzip: 0.66 kB[22m[2m │ map: 3.71 kB[22m
|
|
29
|
-
[2mdist/[22m[36miframe/iframe.js [39m[1m[2m1.70 kB[22m[1m[22m[2m │ gzip: 0.59 kB[22m[2m │ map: 3.81 kB[22m
|
|
30
|
-
[2mdist/[22m[36mattachment/attachment.js [39m[1m[2m2.00 kB[22m[1m[22m[2m │ gzip: 0.76 kB[22m[2m │ map: 4.23 kB[22m
|
|
31
|
-
[2mdist/[22m[36mlinker/linker.js [39m[1m[2m2.22 kB[22m[1m[22m[2m │ gzip: 0.83 kB[22m[2m │ map: 5.62 kB[22m
|
|
32
|
-
[2mdist/[22m[36mspeech-recognition/speech-recognition.js [39m[1m[2m2.29 kB[22m[1m[22m[2m │ gzip: 0.82 kB[22m[2m │ map: 5.24 kB[22m
|
|
33
|
-
[2mdist/[22m[36mvideo/video.js [39m[1m[2m3.04 kB[22m[1m[22m[2m │ gzip: 0.95 kB[22m[2m │ map: 6.73 kB[22m
|
|
34
|
-
[2mdist/[22m[36mimage/custom-image.js [39m[1m[2m4.13 kB[22m[1m[22m[2m │ gzip: 1.28 kB[22m[2m │ map: 8.50 kB[22m
|
|
35
|
-
[vite:dts] Declaration files built in 3362ms.
|
|
36
|
-
|
|
37
|
-
[2mdist/[22m[36mtransform/html-to-json/html-to-json.cjs [39m[1m[2m0.18 kB[22m[1m[22m[2m │ gzip: 0.16 kB[22m[2m │ map: 0.40 kB[22m
|
|
38
|
-
[2mdist/[22m[36mtransform/json-to-html/json-to-html.cjs [39m[1m[2m0.18 kB[22m[1m[22m[2m │ gzip: 0.16 kB[22m[2m │ map: 0.40 kB[22m
|
|
39
|
-
[2mdist/[22m[36mparagraph/paragraph.cjs [39m[1m[2m0.37 kB[22m[1m[22m[2m │ gzip: 0.27 kB[22m[2m │ map: 1.10 kB[22m
|
|
40
|
-
[2mdist/[22m[36mhighlight/highlight.cjs [39m[1m[2m0.52 kB[22m[1m[22m[2m │ gzip: 0.33 kB[22m[2m │ map: 0.86 kB[22m
|
|
41
|
-
[2mdist/[22m[36mabbr/abbr.cjs [39m[1m[2m0.53 kB[22m[1m[22m[2m │ gzip: 0.32 kB[22m[2m │ map: 1.53 kB[22m
|
|
42
|
-
[2mdist/[22m[36malert/alert.cjs [39m[1m[2m0.59 kB[22m[1m[22m[2m │ gzip: 0.37 kB[22m[2m │ map: 1.34 kB[22m
|
|
43
|
-
[2mdist/[22m[36mline-height/line-height.cjs [39m[1m[2m0.62 kB[22m[1m[22m[2m │ gzip: 0.39 kB[22m[2m │ map: 1.27 kB[22m
|
|
44
|
-
[2mdist/[22m[36mtable-cell/table-cell.cjs [39m[1m[2m0.62 kB[22m[1m[22m[2m │ gzip: 0.37 kB[22m[2m │ map: 1.30 kB[22m
|
|
45
|
-
[2mdist/[22m[36mspeech-synthesis/speech-synthesis.cjs [39m[1m[2m0.79 kB[22m[1m[22m[2m │ gzip: 0.38 kB[22m[2m │ map: 1.93 kB[22m
|
|
46
|
-
[2mdist/[22m[36mfont-size/font-size.cjs [39m[1m[2m0.80 kB[22m[1m[22m[2m │ gzip: 0.46 kB[22m[2m │ map: 2.22 kB[22m
|
|
47
|
-
[2mdist/[22m[36mhyperlink/hyperlink.cjs [39m[1m[2m0.92 kB[22m[1m[22m[2m │ gzip: 0.48 kB[22m[2m │ map: 3.13 kB[22m
|
|
48
|
-
[2mdist/[22m[36mmathjax/mathjax.cjs [39m[1m[2m0.95 kB[22m[1m[22m[2m │ gzip: 0.51 kB[22m[2m │ map: 2.18 kB[22m
|
|
49
|
-
[2mdist/[22m[36maudio/audio.cjs [39m[1m[2m0.96 kB[22m[1m[22m[2m │ gzip: 0.51 kB[22m[2m │ map: 2.65 kB[22m
|
|
50
|
-
[2mdist/[22m[36miframe/iframe.cjs [39m[1m[2m1.25 kB[22m[1m[22m[2m │ gzip: 0.57 kB[22m[2m │ map: 3.52 kB[22m
|
|
51
|
-
[2mdist/[22m[36mheading/heading.cjs [39m[1m[2m1.28 kB[22m[1m[22m[2m │ gzip: 0.64 kB[22m[2m │ map: 3.58 kB[22m
|
|
52
|
-
[2mdist/[22m[36mattachment/attachment.cjs [39m[1m[2m1.45 kB[22m[1m[22m[2m │ gzip: 0.69 kB[22m[2m │ map: 3.92 kB[22m
|
|
53
|
-
[2mdist/[22m[36mlinker/linker.cjs [39m[1m[2m1.57 kB[22m[1m[22m[2m │ gzip: 0.75 kB[22m[2m │ map: 5.23 kB[22m
|
|
54
|
-
[2mdist/[22m[36mindex.cjs [39m[1m[2m1.87 kB[22m[1m[22m[2m │ gzip: 0.60 kB[22m[2m │ map: 0.09 kB[22m
|
|
55
|
-
[2mdist/[22m[36mspeech-recognition/speech-recognition.cjs [39m[1m[2m1.90 kB[22m[1m[22m[2m │ gzip: 0.79 kB[22m[2m │ map: 5.09 kB[22m
|
|
56
|
-
[2mdist/[22m[36mvideo/video.cjs [39m[1m[2m2.31 kB[22m[1m[22m[2m │ gzip: 0.90 kB[22m[2m │ map: 6.32 kB[22m
|
|
57
|
-
[2mdist/[22m[36mimage/custom-image.cjs [39m[1m[2m2.90 kB[22m[1m[22m[2m │ gzip: 1.17 kB[22m[2m │ map: 7.95 kB[22m
|
|
58
|
-
[32m✓ built in 4.09s[39m
|
package/.turbo/turbo-format.log
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
WARN Issue while reading "/home/runner/work/edifice-ui/edifice-ui/.npmrc". Failed to replace env in config: ${NPM_TOKEN}
|
|
2
|
-
|
|
3
|
-
> @edifice.io/tiptap-extensions@1.5.16-develop-rc.2 format /home/runner/work/edifice-ui/edifice-ui/packages/tiptap/extensions
|
|
4
|
-
> pnpm run format:write && pnpm run format:check
|
|
5
|
-
|
|
6
|
-
WARN Issue while reading "/home/runner/work/edifice-ui/edifice-ui/.npmrc". Failed to replace env in config: ${NPM_TOKEN}
|
|
7
|
-
|
|
8
|
-
> @edifice.io/tiptap-extensions@1.5.16-develop-rc.2 format:write /home/runner/work/edifice-ui/edifice-ui/packages/tiptap/extensions
|
|
9
|
-
> npx prettier --write .
|
|
10
|
-
|
|
11
|
-
dist/abbr/abbr.cjs 178ms
|
|
12
|
-
dist/abbr/abbr.d.ts 596ms
|
|
13
|
-
dist/abbr/abbr.js 29ms
|
|
14
|
-
dist/abbr/index.d.ts 9ms (unchanged)
|
|
15
|
-
dist/alert/alert.cjs 23ms
|
|
16
|
-
dist/alert/alert.d.ts 29ms (unchanged)
|
|
17
|
-
dist/alert/alert.js 35ms
|
|
18
|
-
dist/alert/index.d.ts 3ms (unchanged)
|
|
19
|
-
dist/attachment/attachment.cjs 79ms
|
|
20
|
-
dist/attachment/attachment.d.ts 47ms
|
|
21
|
-
dist/attachment/attachment.js 70ms
|
|
22
|
-
dist/attachment/index.d.ts 2ms (unchanged)
|
|
23
|
-
dist/audio/audio.cjs 45ms
|
|
24
|
-
dist/audio/audio.d.ts 74ms
|
|
25
|
-
dist/audio/audio.js 35ms
|
|
26
|
-
dist/audio/index.d.ts 17ms (unchanged)
|
|
27
|
-
dist/font-size/font-size.cjs 56ms
|
|
28
|
-
dist/font-size/font-size.d.ts 21ms
|
|
29
|
-
dist/font-size/font-size.js 22ms
|
|
30
|
-
dist/font-size/index.d.ts 3ms (unchanged)
|
|
31
|
-
dist/heading/heading.cjs 21ms
|
|
32
|
-
dist/heading/heading.d.ts 41ms
|
|
33
|
-
dist/heading/heading.js 18ms
|
|
34
|
-
dist/heading/index.d.ts 2ms (unchanged)
|
|
35
|
-
dist/highlight/highlight.cjs 5ms
|
|
36
|
-
dist/highlight/highlight.d.ts 4ms
|
|
37
|
-
dist/highlight/highlight.js 5ms
|
|
38
|
-
dist/highlight/index.d.ts 2ms (unchanged)
|
|
39
|
-
dist/hyperlink/hyperlink.cjs 11ms
|
|
40
|
-
dist/hyperlink/hyperlink.d.ts 9ms
|
|
41
|
-
dist/hyperlink/hyperlink.js 12ms
|
|
42
|
-
dist/hyperlink/index.d.ts 2ms (unchanged)
|
|
43
|
-
dist/iframe/iframe.cjs 52ms
|
|
44
|
-
dist/iframe/iframe.d.ts 5ms
|
|
45
|
-
dist/iframe/iframe.js 21ms
|
|
46
|
-
dist/iframe/index.d.ts 2ms (unchanged)
|
|
47
|
-
dist/image/custom-image.cjs 39ms
|
|
48
|
-
dist/image/custom-image.d.ts 6ms
|
|
49
|
-
dist/image/custom-image.js 35ms
|
|
50
|
-
dist/image/index.d.ts 2ms (unchanged)
|
|
51
|
-
dist/index.cjs 9ms
|
|
52
|
-
dist/index.d.ts 3ms (unchanged)
|
|
53
|
-
dist/index.js 4ms
|
|
54
|
-
dist/line-height/index.d.ts 2ms (unchanged)
|
|
55
|
-
dist/line-height/line-height.cjs 4ms
|
|
56
|
-
dist/line-height/line-height.d.ts 3ms (unchanged)
|
|
57
|
-
dist/line-height/line-height.js 9ms
|
|
58
|
-
dist/linker/index.d.ts 5ms (unchanged)
|
|
59
|
-
dist/linker/linker.cjs 20ms
|
|
60
|
-
dist/linker/linker.d.ts 10ms
|
|
61
|
-
dist/linker/linker.js 9ms
|
|
62
|
-
dist/mathjax/index.d.ts 2ms (unchanged)
|
|
63
|
-
dist/mathjax/mathjax.cjs 8ms
|
|
64
|
-
dist/mathjax/mathjax.d.ts 4ms (unchanged)
|
|
65
|
-
dist/mathjax/mathjax.js 6ms
|
|
66
|
-
dist/paragraph/index.d.ts 2ms (unchanged)
|
|
67
|
-
dist/paragraph/paragraph.cjs 3ms
|
|
68
|
-
dist/paragraph/paragraph.d.ts 3ms
|
|
69
|
-
dist/paragraph/paragraph.js 3ms
|
|
70
|
-
dist/speech-recognition/index.d.ts 1ms (unchanged)
|
|
71
|
-
dist/speech-recognition/speech-recognition.cjs 24ms
|
|
72
|
-
dist/speech-recognition/speech-recognition.d.ts 18ms
|
|
73
|
-
dist/speech-recognition/speech-recognition.js 24ms
|
|
74
|
-
dist/speech-synthesis/index.d.ts 1ms (unchanged)
|
|
75
|
-
dist/speech-synthesis/speech-synthesis.cjs 6ms
|
|
76
|
-
dist/speech-synthesis/speech-synthesis.d.ts 5ms
|
|
77
|
-
dist/speech-synthesis/speech-synthesis.js 5ms
|
|
78
|
-
dist/table-cell/index.d.ts 2ms (unchanged)
|
|
79
|
-
dist/table-cell/table-cell.cjs 5ms
|
|
80
|
-
dist/table-cell/table-cell.d.ts 7ms
|
|
81
|
-
dist/table-cell/table-cell.js 4ms
|
|
82
|
-
dist/transform/html-to-json/html-to-json.cjs 2ms
|
|
83
|
-
dist/transform/html-to-json/html-to-json.d.ts 2ms
|
|
84
|
-
dist/transform/html-to-json/html-to-json.js 2ms
|
|
85
|
-
dist/transform/index.d.ts 1ms (unchanged)
|
|
86
|
-
dist/transform/json-to-html/json-to-html.cjs 2ms
|
|
87
|
-
dist/transform/json-to-html/json-to-html.d.ts 7ms (unchanged)
|
|
88
|
-
dist/transform/json-to-html/json-to-html.js 2ms
|
|
89
|
-
dist/video/index.d.ts 9ms (unchanged)
|
|
90
|
-
dist/video/video.cjs 19ms
|
|
91
|
-
dist/video/video.d.ts 5ms
|
|
92
|
-
dist/video/video.js 21ms
|
|
93
|
-
package.json 10ms (unchanged)
|
|
94
|
-
src/abbr/abbr.ts 38ms (unchanged)
|
|
95
|
-
src/abbr/index.ts 3ms (unchanged)
|
|
96
|
-
src/alert/alert.ts 7ms (unchanged)
|
|
97
|
-
src/alert/index.ts 1ms (unchanged)
|
|
98
|
-
src/attachment/attachment.ts 61ms (unchanged)
|
|
99
|
-
src/attachment/index.ts 2ms (unchanged)
|
|
100
|
-
src/audio/audio.ts 26ms (unchanged)
|
|
101
|
-
src/audio/index.ts 13ms (unchanged)
|
|
102
|
-
src/font-size/font-size.ts 22ms (unchanged)
|
|
103
|
-
src/font-size/index.ts 11ms (unchanged)
|
|
104
|
-
src/heading/heading.ts 43ms (unchanged)
|
|
105
|
-
src/heading/index.ts 1ms (unchanged)
|
|
106
|
-
src/highlight/highlight.ts 4ms (unchanged)
|
|
107
|
-
src/highlight/index.ts 2ms (unchanged)
|
|
108
|
-
src/hyperlink/hyperlink.ts 13ms (unchanged)
|
|
109
|
-
src/hyperlink/index.ts 2ms (unchanged)
|
|
110
|
-
src/iframe/iframe.ts 37ms (unchanged)
|
|
111
|
-
src/iframe/index.ts 7ms (unchanged)
|
|
112
|
-
src/image/custom-image.ts 99ms (unchanged)
|
|
113
|
-
src/image/index.ts 2ms (unchanged)
|
|
114
|
-
src/index.ts 6ms (unchanged)
|
|
115
|
-
src/line-height/index.ts 2ms (unchanged)
|
|
116
|
-
src/line-height/line-height.ts 5ms (unchanged)
|
|
117
|
-
src/linker/index.ts 1ms (unchanged)
|
|
118
|
-
src/linker/linker.ts 22ms (unchanged)
|
|
119
|
-
src/mathjax/index.ts 1ms (unchanged)
|
|
120
|
-
src/mathjax/mathjax.ts 25ms (unchanged)
|
|
121
|
-
src/paragraph/index.ts 1ms (unchanged)
|
|
122
|
-
src/paragraph/paragraph.ts 4ms (unchanged)
|
|
123
|
-
src/speech-recognition/index.ts 2ms (unchanged)
|
|
124
|
-
src/speech-recognition/speech-recognition.ts 38ms (unchanged)
|
|
125
|
-
src/speech-synthesis/index.ts 1ms (unchanged)
|
|
126
|
-
src/speech-synthesis/speech-synthesis.ts 16ms (unchanged)
|
|
127
|
-
src/table-cell/index.ts 2ms (unchanged)
|
|
128
|
-
src/table-cell/table-cell.ts 7ms (unchanged)
|
|
129
|
-
src/transform/html-to-json/html-to-json.ts 2ms (unchanged)
|
|
130
|
-
src/transform/index.ts 1ms (unchanged)
|
|
131
|
-
src/transform/json-to-html/json-to-html.ts 2ms (unchanged)
|
|
132
|
-
src/video/index.ts 1ms (unchanged)
|
|
133
|
-
src/video/video.ts 41ms (unchanged)
|
|
134
|
-
tsconfig.json 4ms (unchanged)
|
|
135
|
-
vite.config.ts 46ms (unchanged)
|
|
136
|
-
WARN Issue while reading "/home/runner/work/edifice-ui/edifice-ui/.npmrc". Failed to replace env in config: ${NPM_TOKEN}
|
|
137
|
-
|
|
138
|
-
> @edifice.io/tiptap-extensions@1.5.16-develop-rc.2 format:check /home/runner/work/edifice-ui/edifice-ui/packages/tiptap/extensions
|
|
139
|
-
> npx prettier --check .
|
|
140
|
-
|
|
141
|
-
Checking formatting...
|
|
142
|
-
All matched files use Prettier code style!
|
package/.turbo/turbo-lint.log
DELETED
package/src/abbr/abbr.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Mark, mergeAttributes } from '@tiptap/core';
|
|
2
|
-
|
|
3
|
-
declare module '@tiptap/core' {
|
|
4
|
-
interface Commands<ReturnType> {
|
|
5
|
-
abbr: {
|
|
6
|
-
/**
|
|
7
|
-
* Set an abbr mark
|
|
8
|
-
*/
|
|
9
|
-
setAbbr: (src: string) => ReturnType;
|
|
10
|
-
/**
|
|
11
|
-
* Toggle an abbr mark
|
|
12
|
-
*/
|
|
13
|
-
toggleAbbr: (src: string) => ReturnType;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const Abbr = Mark.create({
|
|
19
|
-
name: 'abbr',
|
|
20
|
-
|
|
21
|
-
addOptions() {
|
|
22
|
-
return {
|
|
23
|
-
HTMLAttributes: {},
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
parseHTML() {
|
|
28
|
-
return [
|
|
29
|
-
{
|
|
30
|
-
tag: 'abbr',
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
renderHTML({ HTMLAttributes }) {
|
|
36
|
-
return [
|
|
37
|
-
'abbr',
|
|
38
|
-
mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),
|
|
39
|
-
0,
|
|
40
|
-
];
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
addCommands() {
|
|
44
|
-
return {
|
|
45
|
-
setAbbr:
|
|
46
|
-
() =>
|
|
47
|
-
({ commands }) => {
|
|
48
|
-
return commands.setMark(this.name);
|
|
49
|
-
},
|
|
50
|
-
toggleAbbr:
|
|
51
|
-
() =>
|
|
52
|
-
({ commands }) => {
|
|
53
|
-
return commands.toggleMark(this.name);
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
},
|
|
57
|
-
});
|
package/src/abbr/index.ts
DELETED
package/src/alert/alert.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Node } from '@tiptap/core';
|
|
2
|
-
|
|
3
|
-
export const Alert = Node.create({
|
|
4
|
-
name: 'alert',
|
|
5
|
-
content: 'inline+',
|
|
6
|
-
marks: '',
|
|
7
|
-
group: 'block',
|
|
8
|
-
|
|
9
|
-
inline: false,
|
|
10
|
-
selectable: true,
|
|
11
|
-
draggable: true,
|
|
12
|
-
|
|
13
|
-
parseHTML() {
|
|
14
|
-
return [
|
|
15
|
-
{
|
|
16
|
-
tag: 'p.info',
|
|
17
|
-
priority: 60,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
tag: 'p.warning',
|
|
21
|
-
priority: 60,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
tag: 'div.info',
|
|
25
|
-
priority: 60,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
tag: 'div.warning',
|
|
29
|
-
priority: 60,
|
|
30
|
-
},
|
|
31
|
-
];
|
|
32
|
-
},
|
|
33
|
-
addAttributes() {
|
|
34
|
-
return {
|
|
35
|
-
class: {
|
|
36
|
-
default: 'info',
|
|
37
|
-
parseHTML: (element) => {
|
|
38
|
-
return element.getAttribute('class');
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
renderHTML({ HTMLAttributes }) {
|
|
44
|
-
return ['div', HTMLAttributes, 0];
|
|
45
|
-
},
|
|
46
|
-
});
|
package/src/alert/index.ts
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { Node } from '@tiptap/core';
|
|
2
|
-
|
|
3
|
-
export interface AttachmentOptions {
|
|
4
|
-
HTMLAttributes: Record<string, string>;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
declare module '@tiptap/core' {
|
|
8
|
-
interface Commands<ReturnType> {
|
|
9
|
-
attachment: {
|
|
10
|
-
setAttachment: (attachment) => ReturnType;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const Attachment = Node.create<AttachmentOptions>({
|
|
16
|
-
name: 'attachments',
|
|
17
|
-
content: '',
|
|
18
|
-
marks: '',
|
|
19
|
-
group: 'block',
|
|
20
|
-
selectable: true,
|
|
21
|
-
atom: true,
|
|
22
|
-
draggable: true,
|
|
23
|
-
|
|
24
|
-
addOptions() {
|
|
25
|
-
return {
|
|
26
|
-
HTMLAttributes: {
|
|
27
|
-
class: 'attachments',
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
parseHTML() {
|
|
33
|
-
return [{ tag: 'div[class=attachments]' }];
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
renderHTML({ HTMLAttributes }) {
|
|
37
|
-
const links = HTMLAttributes.links;
|
|
38
|
-
|
|
39
|
-
const renderedLinks = links.map((el) => {
|
|
40
|
-
return [
|
|
41
|
-
'a',
|
|
42
|
-
{
|
|
43
|
-
name: el.name,
|
|
44
|
-
href: el.href,
|
|
45
|
-
documentId: el.documentId,
|
|
46
|
-
dataContentType: el.dataContentType,
|
|
47
|
-
},
|
|
48
|
-
el.name,
|
|
49
|
-
];
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
return ['div', this.options.HTMLAttributes, ...renderedLinks];
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
addAttributes() {
|
|
56
|
-
return {
|
|
57
|
-
links: {
|
|
58
|
-
default: [],
|
|
59
|
-
parseHTML: (element) => {
|
|
60
|
-
const links = element.getElementsByTagName('a');
|
|
61
|
-
const parsedLinks = [];
|
|
62
|
-
|
|
63
|
-
for (let i = 0; i < links.length; i++) {
|
|
64
|
-
const link = links[i];
|
|
65
|
-
const href = link.getAttribute('href');
|
|
66
|
-
const name = link.textContent;
|
|
67
|
-
const regexResult = href.match(/([^/]+$)/);
|
|
68
|
-
const documentId =
|
|
69
|
-
link.getAttribute('data-document-id') ||
|
|
70
|
-
(regexResult && regexResult[0]);
|
|
71
|
-
const dataContentType = link.getAttribute('data-content-type');
|
|
72
|
-
|
|
73
|
-
parsedLinks.push({
|
|
74
|
-
href,
|
|
75
|
-
name,
|
|
76
|
-
documentId,
|
|
77
|
-
dataContentType,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return parsedLinks;
|
|
82
|
-
},
|
|
83
|
-
renderHTML: (attributes) => {
|
|
84
|
-
return {
|
|
85
|
-
links: attributes.links.map((link) => ({
|
|
86
|
-
href: link.href,
|
|
87
|
-
name: link.name,
|
|
88
|
-
documentId: link.documentId,
|
|
89
|
-
dataContentType: link.dataContentType,
|
|
90
|
-
})),
|
|
91
|
-
};
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
};
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
addCommands() {
|
|
98
|
-
return {
|
|
99
|
-
setAttachment:
|
|
100
|
-
(
|
|
101
|
-
attrs = {
|
|
102
|
-
dataContentType: '',
|
|
103
|
-
name: '',
|
|
104
|
-
documentId: '',
|
|
105
|
-
href: '',
|
|
106
|
-
},
|
|
107
|
-
) =>
|
|
108
|
-
({ chain }) => {
|
|
109
|
-
return chain().insertContent({ type: this.name, attrs }).run();
|
|
110
|
-
},
|
|
111
|
-
};
|
|
112
|
-
},
|
|
113
|
-
});
|
package/src/attachment/index.ts
DELETED
package/src/audio/audio.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { mergeAttributes, Node } from '@tiptap/core';
|
|
2
|
-
|
|
3
|
-
export interface AudioOptions {
|
|
4
|
-
url: string;
|
|
5
|
-
HTMLAttributes: Record<string, any>;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
declare module '@tiptap/core' {
|
|
9
|
-
interface Commands<ReturnType> {
|
|
10
|
-
audio: {
|
|
11
|
-
/**
|
|
12
|
-
* Set a audio node
|
|
13
|
-
* @param options.updateSelection set to true will select the newly inserted content
|
|
14
|
-
*/
|
|
15
|
-
setAudio: (
|
|
16
|
-
id: string,
|
|
17
|
-
src: string,
|
|
18
|
-
options?: { updateSelection: boolean },
|
|
19
|
-
) => ReturnType;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const Audio = Node.create({
|
|
25
|
-
name: 'audio',
|
|
26
|
-
|
|
27
|
-
group: 'block',
|
|
28
|
-
|
|
29
|
-
addAttributes() {
|
|
30
|
-
return {
|
|
31
|
-
src: {
|
|
32
|
-
default: null,
|
|
33
|
-
parseHTML: (el: any) => (el as HTMLSpanElement).getAttribute('src'),
|
|
34
|
-
renderHTML: (attrs: any) => ({ src: attrs.src }),
|
|
35
|
-
},
|
|
36
|
-
documentId: {
|
|
37
|
-
default: '',
|
|
38
|
-
renderHTML: (attributes: any) => {
|
|
39
|
-
return { 'data-document-id': attributes.documentId };
|
|
40
|
-
},
|
|
41
|
-
parseHTML: (element: any) => element.getAttribute('data-document-id'),
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
parseHTML() {
|
|
47
|
-
return [
|
|
48
|
-
{
|
|
49
|
-
tag: 'div.audio-wrapper>audio,audio',
|
|
50
|
-
getAttrs: (el: any) => ({
|
|
51
|
-
src: (el as HTMLAudioElement).getAttribute('src'),
|
|
52
|
-
}),
|
|
53
|
-
},
|
|
54
|
-
];
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
renderHTML({ HTMLAttributes }) {
|
|
58
|
-
return [
|
|
59
|
-
'div',
|
|
60
|
-
{ class: 'audio-wrapper' },
|
|
61
|
-
['audio', mergeAttributes(HTMLAttributes)],
|
|
62
|
-
];
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
addCommands() {
|
|
66
|
-
return {
|
|
67
|
-
setAudio:
|
|
68
|
-
(id, src, options) =>
|
|
69
|
-
({ commands, state }) => {
|
|
70
|
-
return commands.insertContentAt(
|
|
71
|
-
state.selection,
|
|
72
|
-
`<audio
|
|
73
|
-
src="${src}"
|
|
74
|
-
controls preload="none"
|
|
75
|
-
data-document-id="${id}"></audio>`,
|
|
76
|
-
options,
|
|
77
|
-
);
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
},
|
|
81
|
-
});
|