@nowline/embed 0.0.0-dev.20261026035511.g8612a42 → 0.0.0-dev.20261031003627.g538fca0

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/dist/meta.json CHANGED
@@ -5103,7 +5103,7 @@
5103
5103
  "format": "esm"
5104
5104
  },
5105
5105
  "../core/dist/diagnostics/index.js": {
5106
- "bytes": 4615,
5106
+ "bytes": 6188,
5107
5107
  "imports": [],
5108
5108
  "format": "esm"
5109
5109
  },
@@ -5845,7 +5845,7 @@
5845
5845
  "format": "esm"
5846
5846
  },
5847
5847
  "../core/dist/index.js": {
5848
- "bytes": 1371,
5848
+ "bytes": 1400,
5849
5849
  "imports": [
5850
5850
  {
5851
5851
  "path": "../core/dist/convert/parse-json.js",
@@ -10040,7 +10040,7 @@
10040
10040
  "format": "esm"
10041
10041
  },
10042
10042
  "../browser/dist/diagnostic-row.js": {
10043
- "bytes": 4103,
10043
+ "bytes": 4226,
10044
10044
  "imports": [
10045
10045
  {
10046
10046
  "path": "../core/dist/index.js",
@@ -10671,7 +10671,7 @@
10671
10671
  "imports": [],
10672
10672
  "exports": [],
10673
10673
  "inputs": {},
10674
- "bytes": 3725877
10674
+ "bytes": 3728512
10675
10675
  },
10676
10676
  "dist/nowline.min.js": {
10677
10677
  "imports": [],
@@ -11528,7 +11528,7 @@
11528
11528
  "bytesInOutput": 309
11529
11529
  },
11530
11530
  "../core/dist/diagnostics/index.js": {
11531
- "bytesInOutput": 1168
11531
+ "bytesInOutput": 1378
11532
11532
  },
11533
11533
  "../core/dist/index.js": {
11534
11534
  "bytesInOutput": 0
@@ -11798,7 +11798,7 @@
11798
11798
  "bytesInOutput": 2184
11799
11799
  },
11800
11800
  "../browser/dist/diagnostic-row.js": {
11801
- "bytesInOutput": 1204
11801
+ "bytesInOutput": 1264
11802
11802
  },
11803
11803
  "../browser/dist/no-op-include-resolver.js": {
11804
11804
  "bytesInOutput": 189
@@ -11891,7 +11891,7 @@
11891
11891
  "bytesInOutput": 257
11892
11892
  }
11893
11893
  },
11894
- "bytes": 679047
11894
+ "bytes": 679317
11895
11895
  }
11896
11896
  }
11897
11897
  }
@@ -1,4 +1,4 @@
1
- /*! @nowline/embed 0.0.0-dev.20261026035511.g8612a42 sha=8612a42 built=2026-10-26T03:49:20Z */
1
+ /*! @nowline/embed 0.0.0-dev.20261031003627.g538fca0 sha=538fca0 built=2026-10-31T00:31:13Z */
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -23468,6 +23468,20 @@ function extractSuggestion(message) {
23468
23468
  const match = message.match(DID_YOU_MEAN_RE);
23469
23469
  return match ? match[1].trim() : void 0;
23470
23470
  }
23471
+ var SUGGESTION_FROM_ARGS = {
23472
+ "NL.W0700": (a) => a.suggested || void 0,
23473
+ "NL.E1101": (a) => "suggestion" in a ? a.suggestion?.id : void 0
23474
+ };
23475
+ function suggestionFromArgs(code, args) {
23476
+ const pick = SUGGESTION_FROM_ARGS[code];
23477
+ return pick?.(...args);
23478
+ }
23479
+ function resolveDiagnosticSuggestion(message, data) {
23480
+ const code = stableValidatorCode(data);
23481
+ if (code === void 0)
23482
+ return extractSuggestion(message);
23483
+ return suggestionFromArgs(code, data.args);
23484
+ }
23471
23485
  function inferCodeFromMessage(message) {
23472
23486
  const lower = message.toLowerCase();
23473
23487
  if (lower.includes("duplicate identifier"))
@@ -37417,7 +37431,7 @@ function fromLangiumDiagnostic(diag, file) {
37417
37431
  // panel, then falls back to Langium's `code`, then a message heuristic.
37418
37432
  code: resolveDiagnosticCode(diag),
37419
37433
  message: diag.message,
37420
- suggestion: extractSuggestion(diag.message),
37434
+ suggestion: resolveDiagnosticSuggestion(diag.message, diag.data),
37421
37435
  file,
37422
37436
  line: (diag.range?.start.line ?? 0) + 1,
37423
37437
  column: (diag.range?.start.character ?? 0) + 1
@@ -37462,7 +37476,7 @@ function fromResolveDiagnostic(diag, locale) {
37462
37476
  };
37463
37477
  }
37464
37478
  const message = locale ? localizeResolveDiagnostic(locale, diag) : diag.message;
37465
- const suggestion = extractSuggestion(message);
37479
+ const suggestion = resolveDiagnosticSuggestion(message, diag.code === void 0 ? void 0 : { code: diag.code, args: diag.args ?? [] });
37466
37480
  return {
37467
37481
  severity: diag.severity,
37468
37482
  code: diag.code ?? inferCodeFromMessage(diag.message),
@@ -41023,8 +41037,8 @@ function effectiveTheme(theme, systemTheme) {
41023
41037
  }
41024
41038
 
41025
41039
  // src/index.ts
41026
- var version = true ? "0.0.0-dev.20261026035511.g8612a42" : "0.0.0";
41027
- var sha = true ? "8612a42" : "unknown";
41040
+ var version = true ? "0.0.0-dev.20261031003627.g538fca0" : "0.0.0";
41041
+ var sha = true ? "538fca0" : "unknown";
41028
41042
  var DEFAULT_SELECTOR = "pre code.language-nowline, code.language-nowline";
41029
41043
  var initialConfig = {
41030
41044
  theme: "auto",