@sveltia/ui 0.25.8 → 0.25.10

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.
@@ -103,13 +103,7 @@
103
103
  {#if showLanguageSwitcher}
104
104
  <CodeEditorToolbar {disabled} {readonly} />
105
105
  {/if}
106
- <LexicalRoot
107
- hidden={!editorStore.useRichText || hidden}
108
- {disabled}
109
- {readonly}
110
- {required}
111
- {invalid}
112
- />
106
+ <LexicalRoot {hidden} {disabled} {readonly} {required} {invalid} />
113
107
  </div>
114
108
 
115
109
  {#if editorStore.showConverterError}
@@ -65,6 +65,7 @@ import { TABLE } from './transformers/table';
65
65
  */
66
66
 
67
67
  const allTransformers = [...TRANSFORMERS, TABLE];
68
+ const prismBaseURL = `https://unpkg.com/prismjs@1.30.0`;
68
69
 
69
70
  /**
70
71
  * Lexical editor configuration.
@@ -371,10 +372,8 @@ export const loadCodeHighlighter = async (lang) => {
371
372
  }
372
373
 
373
374
  try {
374
- await import(
375
- // eslint-disable-next-line jsdoc/no-bad-blocks
376
- /* @vite-ignore */ `https://unpkg.com/prismjs@1.29.0/components/prism-${canonicalLang}.min.js`
377
- );
375
+ // eslint-disable-next-line jsdoc/no-bad-blocks
376
+ await import(/* @vite-ignore */ `${prismBaseURL}/components/prism-${canonicalLang}.min.js`);
378
377
  } catch {
379
378
  //
380
379
  }
@@ -153,10 +153,10 @@
153
153
  .lexical-root[aria-invalid=true] {
154
154
  border-color: var(--sui-error-border-color);
155
155
  }
156
- .lexical-root > :global(:first-child) {
156
+ .lexical-root :global(:first-child) {
157
157
  margin-top: 0;
158
158
  }
159
- .lexical-root > :global(:last-child) {
159
+ .lexical-root :global(:last-child) {
160
160
  margin-bottom: 0;
161
161
  }
162
162
  .lexical-root :global(strong.italic) {
@@ -73,7 +73,7 @@ export const createEditorStore = () => {
73
73
  },
74
74
  set config(newValue) {
75
75
  config = newValue;
76
- useRichText = newValue.modes[0] === 'rich-text';
76
+ useRichText = newValue.modes[0] === 'rich-text' || newValue.isCodeEditor;
77
77
  },
78
78
  get inputValue() {
79
79
  return inputValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltia/ui",
3
- "version": "0.25.8",
3
+ "version": "0.25.10",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
@@ -28,27 +28,27 @@
28
28
  "test:unit": "vitest"
29
29
  },
30
30
  "dependencies": {
31
- "@lexical/code": "^0.27.2",
32
- "@lexical/dragon": "^0.27.2",
33
- "@lexical/history": "^0.27.2",
34
- "@lexical/link": "^0.27.2",
35
- "@lexical/list": "^0.27.2",
36
- "@lexical/markdown": "^0.27.2",
37
- "@lexical/rich-text": "^0.27.2",
38
- "@lexical/selection": "^0.27.2",
39
- "@lexical/table": "^0.27.2",
40
- "@lexical/utils": "^0.27.2",
31
+ "@lexical/code": "^0.28.0",
32
+ "@lexical/dragon": "^0.28.0",
33
+ "@lexical/history": "^0.28.0",
34
+ "@lexical/link": "^0.28.0",
35
+ "@lexical/list": "^0.28.0",
36
+ "@lexical/markdown": "^0.28.0",
37
+ "@lexical/rich-text": "^0.28.0",
38
+ "@lexical/selection": "^0.28.0",
39
+ "@lexical/table": "^0.28.0",
40
+ "@lexical/utils": "^0.28.0",
41
41
  "@sveltia/utils": "^0.7.0",
42
- "lexical": "^0.27.2",
42
+ "lexical": "^0.28.0",
43
43
  "prismjs": "^1.30.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "svelte": "^5.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@playwright/test": "^1.51.0",
49
+ "@playwright/test": "^1.51.1",
50
50
  "@sveltejs/adapter-auto": "^4.0.0",
51
- "@sveltejs/kit": "^2.19.2",
51
+ "@sveltejs/kit": "^2.20.1",
52
52
  "@sveltejs/package": "^2.3.10",
53
53
  "@sveltejs/vite-plugin-svelte": "5.0.3",
54
54
  "cspell": "^8.17.5",
@@ -56,23 +56,23 @@
56
56
  "eslint-config-airbnb-base": "^15.0.0",
57
57
  "eslint-config-prettier": "^10.1.1",
58
58
  "eslint-plugin-import": "^2.31.0",
59
- "eslint-plugin-jsdoc": "^50.6.6",
59
+ "eslint-plugin-jsdoc": "^50.6.8",
60
60
  "eslint-plugin-svelte": "^2.46.1",
61
61
  "postcss": "^8.5.3",
62
62
  "postcss-html": "^1.8.0",
63
63
  "prettier": "^3.5.3",
64
64
  "prettier-plugin-svelte": "^3.3.3",
65
- "sass": "^1.85.1",
65
+ "sass": "^1.86.0",
66
66
  "stylelint": "^16.16.0",
67
67
  "stylelint-config-recommended-scss": "^14.1.0",
68
68
  "stylelint-scss": "^6.11.1",
69
- "svelte": "5.23.0",
69
+ "svelte": "5.23.2",
70
70
  "svelte-check": "^4.1.5",
71
71
  "svelte-i18n": "^4.0.1",
72
72
  "svelte-preprocess": "^6.0.3",
73
73
  "tslib": "^2.8.1",
74
74
  "vite": "^6.2.2",
75
- "vitest": "^3.0.8"
75
+ "vitest": "^3.0.9"
76
76
  },
77
77
  "exports": {
78
78
  ".": {