@websline/system-components 1.3.13 → 1.3.15
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.
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
/** @type {import("@tiptap/core").Editor} */
|
|
48
48
|
let editor = $state.raw();
|
|
49
49
|
let htmlInputValue = $state();
|
|
50
|
+
let isContentPropUpdate = false;
|
|
50
51
|
|
|
51
52
|
let styles = $derived(richTextEditorVariants({ hideToolbar, size }));
|
|
52
53
|
|
|
@@ -97,7 +98,14 @@
|
|
|
97
98
|
},
|
|
98
99
|
onUpdate: () => {
|
|
99
100
|
htmlInputValue = editor.getHTML();
|
|
100
|
-
|
|
101
|
+
|
|
102
|
+
if (!isContentPropUpdate) {
|
|
103
|
+
// inform parent about editor input
|
|
104
|
+
// skip prop update
|
|
105
|
+
oninput?.(htmlInputValue);
|
|
106
|
+
} else {
|
|
107
|
+
isContentPropUpdate = false;
|
|
108
|
+
}
|
|
101
109
|
},
|
|
102
110
|
});
|
|
103
111
|
|
|
@@ -118,6 +126,7 @@
|
|
|
118
126
|
content;
|
|
119
127
|
if (editor) {
|
|
120
128
|
const sanitized = untrack(() => sanitizeContent(content));
|
|
129
|
+
isContentPropUpdate = true;
|
|
121
130
|
editor.commands.setContent(sanitized ?? "");
|
|
122
131
|
}
|
|
123
132
|
});
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
class: className = "",
|
|
33
33
|
disabled = false,
|
|
34
34
|
name,
|
|
35
|
+
onChange,
|
|
35
36
|
size = "medium",
|
|
36
37
|
value = $bindable(),
|
|
37
38
|
variant = "default",
|
|
@@ -47,6 +48,10 @@
|
|
|
47
48
|
receive,
|
|
48
49
|
size,
|
|
49
50
|
update: (newValue) => {
|
|
51
|
+
if (onChange) {
|
|
52
|
+
onChange(newValue);
|
|
53
|
+
}
|
|
54
|
+
|
|
50
55
|
value = newValue;
|
|
51
56
|
},
|
|
52
57
|
value,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@websline/system-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.15",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@tiptap/core": "^3.20.
|
|
30
|
-
"@tiptap/extension-color": "^3.20.
|
|
31
|
-
"@tiptap/extension-highlight": "^3.20.
|
|
32
|
-
"@tiptap/extension-placeholder": "^3.20.
|
|
33
|
-
"@tiptap/extension-text-align": "^3.20.
|
|
34
|
-
"@tiptap/extension-text-style": "^3.20.
|
|
35
|
-
"@tiptap/pm": "^3.20.
|
|
36
|
-
"@tiptap/starter-kit": "^3.20.
|
|
29
|
+
"@tiptap/core": "^3.20.1",
|
|
30
|
+
"@tiptap/extension-color": "^3.20.1",
|
|
31
|
+
"@tiptap/extension-highlight": "^3.20.1",
|
|
32
|
+
"@tiptap/extension-placeholder": "^3.20.1",
|
|
33
|
+
"@tiptap/extension-text-align": "^3.20.1",
|
|
34
|
+
"@tiptap/extension-text-style": "^3.20.1",
|
|
35
|
+
"@tiptap/pm": "^3.20.1",
|
|
36
|
+
"@tiptap/starter-kit": "^3.20.1",
|
|
37
37
|
"bits-ui": "^2.16.3",
|
|
38
|
-
"dompurify": "^3.3.
|
|
38
|
+
"dompurify": "^3.3.2",
|
|
39
39
|
"tailwind-variants": "^3.2.2",
|
|
40
40
|
"uuid": "^13.0.0"
|
|
41
41
|
},
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"svelte": "^5.38.7"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@eslint/compat": "^2.0.
|
|
47
|
-
"@eslint/js": "^9.39.
|
|
48
|
-
"@storybook/addon-a11y": "^10.2.
|
|
49
|
-
"@storybook/addon-docs": "^10.2.
|
|
46
|
+
"@eslint/compat": "^2.0.3",
|
|
47
|
+
"@eslint/js": "^9.39.4",
|
|
48
|
+
"@storybook/addon-a11y": "^10.2.17",
|
|
49
|
+
"@storybook/addon-docs": "^10.2.17",
|
|
50
50
|
"@storybook/addon-svelte-csf": "^5.0.11",
|
|
51
|
-
"@storybook/sveltekit": "^10.2.
|
|
51
|
+
"@storybook/sveltekit": "^10.2.17",
|
|
52
52
|
"@sveltejs/adapter-auto": "^7.0.1",
|
|
53
53
|
"@sveltejs/kit": "^2.53.4",
|
|
54
54
|
"@sveltejs/package": "^2.5.7",
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
"@tailwindcss/forms": "^0.5.11",
|
|
57
57
|
"@tailwindcss/typography": "^0.5.19",
|
|
58
58
|
"@tailwindcss/vite": "^4.2.1",
|
|
59
|
-
"@types/node": "^25.
|
|
59
|
+
"@types/node": "^25.4.0",
|
|
60
60
|
"@vitest/browser": "^4.0.18",
|
|
61
|
-
"eslint": "^9.39.
|
|
61
|
+
"eslint": "^9.39.4",
|
|
62
62
|
"eslint-config-prettier": "^10.1.8",
|
|
63
|
-
"eslint-plugin-storybook": "^10.2.
|
|
64
|
-
"eslint-plugin-svelte": "^3.15.
|
|
63
|
+
"eslint-plugin-storybook": "^10.2.17",
|
|
64
|
+
"eslint-plugin-svelte": "^3.15.2",
|
|
65
65
|
"globals": "^17.4.0",
|
|
66
66
|
"playwright": "^1.58.2",
|
|
67
67
|
"postcss-url": "^10.1.3",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"prettier-plugin-svelte": "^3.5.1",
|
|
70
70
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
71
71
|
"publint": "^0.3.18",
|
|
72
|
-
"storybook": "^10.2.
|
|
73
|
-
"svelte": "^5.53.
|
|
72
|
+
"storybook": "^10.2.17",
|
|
73
|
+
"svelte": "^5.53.9",
|
|
74
74
|
"tailwindcss": "^4.2.1",
|
|
75
75
|
"typescript": "^5.9.3",
|
|
76
76
|
"vite": "^7.3.1",
|