@seorii/tiptap 0.3.0-next.5 → 0.3.0-next.6
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.
|
@@ -104,12 +104,14 @@
|
|
|
104
104
|
});
|
|
105
105
|
|
|
106
106
|
$effect(() => {
|
|
107
|
-
|
|
107
|
+
const r = untrack(() => san(body));
|
|
108
|
+
body = r;
|
|
109
|
+
last = r;
|
|
108
110
|
mounted = true;
|
|
109
111
|
Promise.all([import('./tiptap'), import('@justinribeiro/lite-youtube')]).then(
|
|
110
112
|
([{ default: tt }]) => {
|
|
111
|
-
if (!mounted) return;
|
|
112
|
-
tiptap.v = ref = tt(element,
|
|
113
|
+
if (!untrack(() => mounted)) return;
|
|
114
|
+
tiptap.v = ref = tt(element, r, {
|
|
113
115
|
placeholder,
|
|
114
116
|
editable,
|
|
115
117
|
onTransaction: () => (tiptap.v = ref = tiptap.v),
|
|
@@ -133,13 +135,15 @@
|
|
|
133
135
|
);
|
|
134
136
|
return () => {
|
|
135
137
|
mounted = false;
|
|
136
|
-
tiptap.v?.destroy?.();
|
|
138
|
+
untrack(() => tiptap.v?.destroy?.());
|
|
137
139
|
};
|
|
138
140
|
});
|
|
139
141
|
|
|
140
142
|
$effect.pre(() => {
|
|
141
143
|
if (last === body) return;
|
|
142
|
-
|
|
144
|
+
const r = san(body);
|
|
145
|
+
body = r;
|
|
146
|
+
last = r;
|
|
143
147
|
tiptap.v?.commands?.setContent?.(body);
|
|
144
148
|
});
|
|
145
149
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seorii/tiptap",
|
|
3
|
-
"version": "0.3.0-next.
|
|
3
|
+
"version": "0.3.0-next.6",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "svelte-kit sync && svelte-package",
|
|
@@ -30,11 +30,16 @@
|
|
|
30
30
|
"prettier": "^3.4.2",
|
|
31
31
|
"prettier-plugin-svelte": "^3.3.3",
|
|
32
32
|
"publint": "^0.2.12",
|
|
33
|
+
"sass-embedded": "^1.83.4",
|
|
34
|
+
"svelte": "^5.19.3",
|
|
33
35
|
"svelte-check": "^4.0.5",
|
|
34
36
|
"tslib": "^2.8.1",
|
|
35
37
|
"typescript": "^5.7.3",
|
|
36
38
|
"vite": "^5.4.10"
|
|
37
39
|
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"svelte": "^5.0.0"
|
|
42
|
+
},
|
|
38
43
|
"type": "module",
|
|
39
44
|
"dependencies": {
|
|
40
45
|
"@justinribeiro/lite-youtube": "^1.6.0",
|
|
@@ -65,7 +70,6 @@
|
|
|
65
70
|
"@tiptap/suggestion": "^2.11.3",
|
|
66
71
|
"emojis-keywords": "2.0.0",
|
|
67
72
|
"emojis-list": "3.0.0",
|
|
68
|
-
"flourite": "^1.3.0",
|
|
69
73
|
"lowlight": "^3.3.0",
|
|
70
74
|
"nunui": "2.0.0-next.30",
|
|
71
75
|
"prosemirror-commands": "^1.6.2",
|
|
@@ -75,9 +79,6 @@
|
|
|
75
79
|
"prosemirror-transform": "^1.10.2",
|
|
76
80
|
"prosemirror-view": "^1.37.2",
|
|
77
81
|
"sanitize-html": "^2.14.0",
|
|
78
|
-
"sass-embedded": "^1.83.4",
|
|
79
|
-
"shiki": "^2.1.0",
|
|
80
|
-
"svelte": "^5.19.3",
|
|
81
82
|
"svelte-awesome-color-picker": "^3.1.4",
|
|
82
83
|
"svelte-tiptap": "^2.1.0",
|
|
83
84
|
"tippy.js": "^6.3.7"
|