@valbuild/language-server 0.119.0 → 0.120.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # @valbuild/language-server
2
2
 
3
+ ## 0.120.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#589](https://github.com/valbuild/val/pull/589) [`c2d3c0e`](https://github.com/valbuild/val/commit/c2d3c0e6c2010c0a94c725d9dbaa618998773e8a) Thanks [@freekh](https://github.com/freekh)! - **Breaking:** `s.richtext()` options are flat.
8
+
9
+ The `style`, `block` and `inline` groups are gone — every option is a key of its
10
+ own. The names are unchanged, so updating a schema is only a matter of removing
11
+ the wrappers:
12
+
13
+ ```ts
14
+ // before
15
+ s.richtext({
16
+ style: { bold: true, italic: true },
17
+ block: { h1: true, ul: true },
18
+ inline: { a: true, img: s.image() },
19
+ });
20
+
21
+ // after
22
+ s.richtext({
23
+ bold: true,
24
+ italic: true,
25
+ h1: true,
26
+ ul: true,
27
+ a: true,
28
+ img: s.image(),
29
+ });
30
+ ```
31
+
32
+ The groups never carried any meaning the option names did not already have, and
33
+ they cost something real: an option name and its `ValRichText` theme key were
34
+ spelled differently (`block.h1` vs `theme.h1`), so the type that keeps a theme
35
+ exhaustive had to restate all thirteen options by hand. It is now a mapped type
36
+ over the options themselves — which also fixes an inconsistency in it: enabling
37
+ links with a schema (`a: s.route()`) rather than `a: true` now requires an `a`
38
+ key in the theme, the way `img` always has.
39
+
40
+ `ValRichText` themes were already flat and are unchanged. The serialized schema
41
+ that the server sends the Studio is flat too, so a project must not mix
42
+ `@valbuild/*` versions across this release.
43
+
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies [[`c2d3c0e`](https://github.com/valbuild/val/commit/c2d3c0e6c2010c0a94c725d9dbaa618998773e8a)]:
47
+ - @valbuild/core@0.120.0
48
+ - @valbuild/shared@0.120.0
49
+ - @valbuild/server@0.120.0
50
+
3
51
  ## 0.119.0
4
52
 
5
53
  ### Patch Changes
@@ -3232,9 +3232,9 @@ function permitsInlineLinks(richtext) {
3232
3232
  return false;
3233
3233
  }
3234
3234
  const options = richtext.options;
3235
- // `inline.a` is either `true` or the schema the href must satisfy; both mean
3236
- // links are allowed.
3237
- return Boolean(options?.inline?.a);
3235
+ // `a` is either `true` or the schema the href must satisfy; both mean links
3236
+ // are allowed.
3237
+ return Boolean(options?.a);
3238
3238
  }
3239
3239
 
3240
3240
  /** Schema at a module path, or undefined when it cannot be resolved. */
@@ -3232,9 +3232,9 @@ function permitsInlineLinks(richtext) {
3232
3232
  return false;
3233
3233
  }
3234
3234
  const options = richtext.options;
3235
- // `inline.a` is either `true` or the schema the href must satisfy; both mean
3236
- // links are allowed.
3237
- return Boolean(options?.inline?.a);
3235
+ // `a` is either `true` or the schema the href must satisfy; both mean links
3236
+ // are allowed.
3237
+ return Boolean(options?.a);
3238
3238
  }
3239
3239
 
3240
3240
  /** Schema at a module path, or undefined when it cannot be resolved. */
@@ -3221,9 +3221,9 @@ function permitsInlineLinks(richtext) {
3221
3221
  return false;
3222
3222
  }
3223
3223
  const options = richtext.options;
3224
- // `inline.a` is either `true` or the schema the href must satisfy; both mean
3225
- // links are allowed.
3226
- return Boolean(options?.inline?.a);
3224
+ // `a` is either `true` or the schema the href must satisfy; both mean links
3225
+ // are allowed.
3226
+ return Boolean(options?.a);
3227
3227
  }
3228
3228
 
3229
3229
  /** Schema at a module path, or undefined when it cannot be resolved. */
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "lsp",
12
12
  "language-server"
13
13
  ],
14
- "version": "0.119.0",
14
+ "version": "0.120.0",
15
15
  "bin": {
16
16
  "val-language-server": "./bin.js"
17
17
  },
@@ -29,9 +29,9 @@
29
29
  "typescript": "^6.0.3",
30
30
  "vscode-languageserver": "^10.1.0",
31
31
  "vscode-languageserver-textdocument": "^1.0.14",
32
- "@valbuild/core": "0.117.0",
33
- "@valbuild/server": "0.119.0",
34
- "@valbuild/shared": "0.118.0"
32
+ "@valbuild/core": "0.120.0",
33
+ "@valbuild/server": "0.120.0",
34
+ "@valbuild/shared": "0.120.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/jest": "^30.0.0",