@widgetic/design-system 0.5.44 → 0.5.45

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.
@@ -163,9 +163,15 @@
163
163
  ],
164
164
  autofocus: true,
165
165
  onUpdate: ({ editor }) => {
166
- const html = editor.getHTML();
167
- content = html;
168
- dispatch('update', { html });
166
+ const html = editor.isEmpty ? '' : editor.getHTML();
167
+ const emptyMarkup =
168
+ html === '<p></p>' ||
169
+ html === '<p><br></p>' ||
170
+ html === '<p><br/></p>' ||
171
+ html === '<p><br /></p>';
172
+ const next = emptyMarkup ? '' : html;
173
+ content = next;
174
+ dispatch('update', { html: next });
169
175
  }
170
176
  });
171
177
 
@@ -48,6 +48,7 @@
48
48
  --card-foreground: var(--color-dark);
49
49
  --popover: var(--color-white);
50
50
  --popover-foreground: var(--color-dark);
51
+ /* Whole colour (`#314f2f`), not HSL channels. `hsl(var(--primary))` is invalid here — use `var(--primary)`. */
51
52
  --primary: var(--color-deep-forest-green);
52
53
  --primary-foreground: var(--color-white);
53
54
  --secondary: var(--color-neutral-100);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widgetic/design-system",
3
- "version": "0.5.44",
3
+ "version": "0.5.45",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "type": "module",
6
6
  "svelte": "./dist/index.js",