@sveltia/ui 0.31.6 → 0.31.8

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.
@@ -228,7 +228,7 @@ button.link .label {
228
228
  text-underline-offset: 2px;
229
229
  white-space: normal;
230
230
  }
231
- :global(:is(:root, :host)[data-underline-links="true"]) button.link .label {
231
+ :global(:is(:root, :host)[data-underline-links='true']) button.link .label {
232
232
  text-decoration: underline;
233
233
  }
234
234
  button.link:is(:hover, :focus, :active) .label {
@@ -409,6 +409,24 @@ export const convertMarkdownToLexical = async (editor, value) => {
409
409
  ),
410
410
  );
411
411
 
412
+ // Split multiline formatting into separate lines to prevent Markdown parsing issues
413
+ // @see https://github.com/sveltia/sveltia-cms/issues/548
414
+ value = value
415
+ .replace(/_([^_\n]+?)\n([^_\n]+?)_/gm, '_$1_\n_$2_')
416
+ .replace(/\*\*([^*\n]+?)\n([^*\n]+?)\*\*/gm, '**$1**\n**$2**')
417
+ .replace(/~~([^~\n]+?)\n([^~\n]+?)~~/gm, '~~$1~~\n~~$2~~')
418
+ .replace(/`([^`\n]+?)\n([^`\n]+?)`/gm, '`$1`\n`$2`');
419
+
420
+ // Increase list indentation levels to prevent Markdown parsing issues: Slate uses 2 spaces for
421
+ // each indentation level, whereas Lexical uses 4 spaces
422
+ // @see https://github.com/sveltia/sveltia-cms/issues/549
423
+ if (value.match(/^\s{2}(?:-|\+|\*|\d+\.)\s/m)) {
424
+ value = value.replace(
425
+ /^(\s+)(-|\+|\*|\d+\.)/gm,
426
+ (_match, p1, p2) => `${' '.repeat(p1.length * 2)}${p2}`,
427
+ );
428
+ }
429
+
412
430
  return new Promise((resolve, reject) => {
413
431
  editor.update(() => {
414
432
  try {
@@ -40,7 +40,7 @@
40
40
  .wrapper :global([role=toolbar]) {
41
41
  position: sticky;
42
42
  top: 0;
43
- z-index: 1;
43
+ z-index: 100;
44
44
  display: flex;
45
45
  gap: 4px;
46
46
  border-width: 1px 1px 0;
@@ -70,7 +70,15 @@
70
70
  @see https://stackoverflow.com/q/2989263
71
71
  -->
72
72
  <svelte:head>
73
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
73
+ <meta
74
+ name="viewport"
75
+ content={[
76
+ 'width=device-width',
77
+ 'initial-scale=1',
78
+ 'maximum-scale=1',
79
+ 'interactive-widget=resizes-content',
80
+ ].join(', ')}
81
+ />
74
82
  <meta name="google" content="notranslate" />
75
83
  <link rel="preconnect" href="https://fonts.googleapis.com" />
76
84
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltia/ui",
3
- "version": "0.31.6",
3
+ "version": "0.31.8",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
@@ -28,31 +28,31 @@
28
28
  },
29
29
  "devDependencies": {
30
30
  "@sveltejs/adapter-auto": "^7.0.0",
31
- "@sveltejs/kit": "^2.48.4",
32
- "@sveltejs/package": "^2.5.4",
31
+ "@sveltejs/kit": "^2.49.0",
32
+ "@sveltejs/package": "^2.5.7",
33
33
  "@sveltejs/vite-plugin-svelte": "^6.2.1",
34
- "cspell": "^9.2.2",
34
+ "cspell": "^9.3.2",
35
35
  "eslint": "^8.57.1",
36
36
  "eslint-config-airbnb-base": "^15.0.0",
37
37
  "eslint-config-prettier": "^10.1.8",
38
38
  "eslint-plugin-import": "^2.32.0",
39
- "eslint-plugin-jsdoc": "^61.1.11",
39
+ "eslint-plugin-jsdoc": "^61.4.1",
40
40
  "eslint-plugin-svelte": "^2.46.1",
41
- "oxlint": "^1.25.0",
41
+ "oxlint": "^1.30.0",
42
42
  "postcss": "^8.5.6",
43
43
  "postcss-html": "^1.8.0",
44
- "prettier": "^3.6.2",
44
+ "prettier": "^3.7.3",
45
45
  "prettier-plugin-svelte": "^3.4.0",
46
- "sass": "^1.93.3",
47
- "stylelint": "^16.25.0",
46
+ "sass": "^1.94.2",
47
+ "stylelint": "^16.26.1",
48
48
  "stylelint-config-recommended-scss": "^16.0.2",
49
49
  "stylelint-scss": "^6.12.1",
50
- "svelte": "^5.43.2",
51
- "svelte-check": "^4.3.3",
50
+ "svelte": "^5.45.2",
51
+ "svelte-check": "^4.3.4",
52
52
  "svelte-preprocess": "^6.0.3",
53
53
  "tslib": "^2.8.1",
54
- "vite": "^7.1.12",
55
- "vitest": "^4.0.6"
54
+ "vite": "^7.2.4",
55
+ "vitest": "^4.0.14"
56
56
  },
57
57
  "exports": {
58
58
  ".": {