@nowline/embed 0.6.0 → 0.8.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/dist/meta.json +107 -17
- package/dist/nowline.esm.js +152 -8
- package/dist/nowline.esm.js.map +4 -4
- package/dist/nowline.min.js +70 -70
- package/dist/nowline.min.js.map +4 -4
- package/dist/share.d.ts +1 -44
- package/dist/share.d.ts.map +1 -1
- package/dist/share.js +6 -74
- package/dist/share.js.map +1 -1
- package/package.json +6 -6
- package/src/share.ts +13 -108
package/dist/meta.json
CHANGED
|
@@ -25,6 +25,33 @@
|
|
|
25
25
|
"imports": [],
|
|
26
26
|
"format": "esm"
|
|
27
27
|
},
|
|
28
|
+
"../core/dist/convert/schema.js": {
|
|
29
|
+
"bytes": 2490,
|
|
30
|
+
"imports": [],
|
|
31
|
+
"format": "esm"
|
|
32
|
+
},
|
|
33
|
+
"../core/dist/convert/parse-json.js": {
|
|
34
|
+
"bytes": 1339,
|
|
35
|
+
"imports": [
|
|
36
|
+
{
|
|
37
|
+
"path": "../core/dist/convert/schema.js",
|
|
38
|
+
"kind": "import-statement",
|
|
39
|
+
"original": "./schema.js"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"format": "esm"
|
|
43
|
+
},
|
|
44
|
+
"../core/dist/convert/printer.js": {
|
|
45
|
+
"bytes": 11197,
|
|
46
|
+
"imports": [
|
|
47
|
+
{
|
|
48
|
+
"path": "<runtime>",
|
|
49
|
+
"kind": "import-statement",
|
|
50
|
+
"external": true
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"format": "esm"
|
|
54
|
+
},
|
|
28
55
|
"../core/dist/diagnostics/index.js": {
|
|
29
56
|
"bytes": 4615,
|
|
30
57
|
"imports": [],
|
|
@@ -5582,12 +5609,12 @@
|
|
|
5582
5609
|
"format": "esm"
|
|
5583
5610
|
},
|
|
5584
5611
|
"../core/dist/i18n/codes.js": {
|
|
5585
|
-
"bytes":
|
|
5612
|
+
"bytes": 1915,
|
|
5586
5613
|
"imports": [],
|
|
5587
5614
|
"format": "esm"
|
|
5588
5615
|
},
|
|
5589
5616
|
"../core/dist/i18n/messages.en.js": {
|
|
5590
|
-
"bytes":
|
|
5617
|
+
"bytes": 5669,
|
|
5591
5618
|
"imports": [],
|
|
5592
5619
|
"format": "esm"
|
|
5593
5620
|
},
|
|
@@ -5669,7 +5696,7 @@
|
|
|
5669
5696
|
"format": "esm"
|
|
5670
5697
|
},
|
|
5671
5698
|
"../core/dist/language/nowline-validator.js": {
|
|
5672
|
-
"bytes":
|
|
5699
|
+
"bytes": 78549,
|
|
5673
5700
|
"imports": [
|
|
5674
5701
|
{
|
|
5675
5702
|
"path": "../../node_modules/.pnpm/langium@4.2.4/node_modules/langium/lib/index.js",
|
|
@@ -5710,9 +5737,29 @@
|
|
|
5710
5737
|
],
|
|
5711
5738
|
"format": "esm"
|
|
5712
5739
|
},
|
|
5740
|
+
"../core/dist/templates.js": {
|
|
5741
|
+
"bytes": 112,
|
|
5742
|
+
"imports": [],
|
|
5743
|
+
"format": "esm"
|
|
5744
|
+
},
|
|
5713
5745
|
"../core/dist/index.js": {
|
|
5714
|
-
"bytes":
|
|
5746
|
+
"bytes": 926,
|
|
5715
5747
|
"imports": [
|
|
5748
|
+
{
|
|
5749
|
+
"path": "../core/dist/convert/parse-json.js",
|
|
5750
|
+
"kind": "import-statement",
|
|
5751
|
+
"original": "./convert/parse-json.js"
|
|
5752
|
+
},
|
|
5753
|
+
{
|
|
5754
|
+
"path": "../core/dist/convert/printer.js",
|
|
5755
|
+
"kind": "import-statement",
|
|
5756
|
+
"original": "./convert/printer.js"
|
|
5757
|
+
},
|
|
5758
|
+
{
|
|
5759
|
+
"path": "../core/dist/convert/schema.js",
|
|
5760
|
+
"kind": "import-statement",
|
|
5761
|
+
"original": "./convert/schema.js"
|
|
5762
|
+
},
|
|
5716
5763
|
{
|
|
5717
5764
|
"path": "../core/dist/diagnostics/index.js",
|
|
5718
5765
|
"kind": "import-statement",
|
|
@@ -5752,6 +5799,11 @@
|
|
|
5752
5799
|
"path": "../core/dist/language/nowline-validator.js",
|
|
5753
5800
|
"kind": "import-statement",
|
|
5754
5801
|
"original": "./language/nowline-validator.js"
|
|
5802
|
+
},
|
|
5803
|
+
{
|
|
5804
|
+
"path": "../core/dist/templates.js",
|
|
5805
|
+
"kind": "import-statement",
|
|
5806
|
+
"original": "./templates.js"
|
|
5755
5807
|
}
|
|
5756
5808
|
],
|
|
5757
5809
|
"format": "esm"
|
|
@@ -8865,6 +8917,22 @@
|
|
|
8865
8917
|
],
|
|
8866
8918
|
"format": "esm"
|
|
8867
8919
|
},
|
|
8920
|
+
"../layout/dist/layout-insights.js": {
|
|
8921
|
+
"bytes": 3662,
|
|
8922
|
+
"imports": [
|
|
8923
|
+
{
|
|
8924
|
+
"path": "../core/dist/index.js",
|
|
8925
|
+
"kind": "import-statement",
|
|
8926
|
+
"original": "@nowline/core"
|
|
8927
|
+
},
|
|
8928
|
+
{
|
|
8929
|
+
"path": "../layout/dist/item-bar-geometry.js",
|
|
8930
|
+
"kind": "import-statement",
|
|
8931
|
+
"original": "./item-bar-geometry.js"
|
|
8932
|
+
}
|
|
8933
|
+
],
|
|
8934
|
+
"format": "esm"
|
|
8935
|
+
},
|
|
8868
8936
|
"../layout/dist/resolve-today.js": {
|
|
8869
8937
|
"bytes": 9571,
|
|
8870
8938
|
"imports": [],
|
|
@@ -8897,7 +8965,7 @@
|
|
|
8897
8965
|
"format": "esm"
|
|
8898
8966
|
},
|
|
8899
8967
|
"../layout/dist/index.js": {
|
|
8900
|
-
"bytes":
|
|
8968
|
+
"bytes": 3242,
|
|
8901
8969
|
"imports": [
|
|
8902
8970
|
{
|
|
8903
8971
|
"path": "../layout/dist/capacity.js",
|
|
@@ -8929,6 +8997,11 @@
|
|
|
8929
8997
|
"kind": "import-statement",
|
|
8930
8998
|
"original": "./layout.js"
|
|
8931
8999
|
},
|
|
9000
|
+
{
|
|
9001
|
+
"path": "../layout/dist/layout-insights.js",
|
|
9002
|
+
"kind": "import-statement",
|
|
9003
|
+
"original": "./layout-insights.js"
|
|
9004
|
+
},
|
|
8932
9005
|
{
|
|
8933
9006
|
"path": "../layout/dist/resolve-today.js",
|
|
8934
9007
|
"kind": "import-statement",
|
|
@@ -8958,7 +9031,7 @@
|
|
|
8958
9031
|
"format": "esm"
|
|
8959
9032
|
},
|
|
8960
9033
|
"../browser/dist/diagnostic-row.js": {
|
|
8961
|
-
"bytes":
|
|
9034
|
+
"bytes": 2731,
|
|
8962
9035
|
"imports": [
|
|
8963
9036
|
{
|
|
8964
9037
|
"path": "../core/dist/index.js",
|
|
@@ -9068,7 +9141,7 @@
|
|
|
9068
9141
|
"format": "esm"
|
|
9069
9142
|
},
|
|
9070
9143
|
"../browser/dist/pipeline.js": {
|
|
9071
|
-
"bytes":
|
|
9144
|
+
"bytes": 7936,
|
|
9072
9145
|
"imports": [
|
|
9073
9146
|
{
|
|
9074
9147
|
"path": "../core/dist/index.js",
|
|
@@ -9104,7 +9177,7 @@
|
|
|
9104
9177
|
"format": "esm"
|
|
9105
9178
|
},
|
|
9106
9179
|
"../browser/dist/index.js": {
|
|
9107
|
-
"bytes":
|
|
9180
|
+
"bytes": 1267,
|
|
9108
9181
|
"imports": [
|
|
9109
9182
|
{
|
|
9110
9183
|
"path": "../layout/dist/index.js",
|
|
@@ -9155,8 +9228,8 @@
|
|
|
9155
9228
|
"imports": [],
|
|
9156
9229
|
"format": "esm"
|
|
9157
9230
|
},
|
|
9158
|
-
"
|
|
9159
|
-
"bytes":
|
|
9231
|
+
"../share-link/dist/index.js": {
|
|
9232
|
+
"bytes": 2935,
|
|
9160
9233
|
"imports": [
|
|
9161
9234
|
{
|
|
9162
9235
|
"path": "../../node_modules/.pnpm/fflate@0.8.3/node_modules/fflate/esm/browser.js",
|
|
@@ -9166,6 +9239,17 @@
|
|
|
9166
9239
|
],
|
|
9167
9240
|
"format": "esm"
|
|
9168
9241
|
},
|
|
9242
|
+
"src/share.ts": {
|
|
9243
|
+
"bytes": 479,
|
|
9244
|
+
"imports": [
|
|
9245
|
+
{
|
|
9246
|
+
"path": "../share-link/dist/index.js",
|
|
9247
|
+
"kind": "import-statement",
|
|
9248
|
+
"original": "@nowline/share-link"
|
|
9249
|
+
}
|
|
9250
|
+
],
|
|
9251
|
+
"format": "esm"
|
|
9252
|
+
},
|
|
9169
9253
|
"src/auto-scan.ts": {
|
|
9170
9254
|
"bytes": 5754,
|
|
9171
9255
|
"imports": [
|
|
@@ -9220,7 +9304,7 @@
|
|
|
9220
9304
|
"imports": [],
|
|
9221
9305
|
"exports": [],
|
|
9222
9306
|
"inputs": {},
|
|
9223
|
-
"bytes":
|
|
9307
|
+
"bytes": 3370631
|
|
9224
9308
|
},
|
|
9225
9309
|
"dist/nowline.min.js": {
|
|
9226
9310
|
"imports": [],
|
|
@@ -10179,7 +10263,7 @@
|
|
|
10179
10263
|
"bytesInOutput": 182
|
|
10180
10264
|
},
|
|
10181
10265
|
"../core/dist/i18n/messages.en.js": {
|
|
10182
|
-
"bytesInOutput":
|
|
10266
|
+
"bytesInOutput": 4034
|
|
10183
10267
|
},
|
|
10184
10268
|
"../core/dist/i18n/messages.fr.js": {
|
|
10185
10269
|
"bytesInOutput": 4425
|
|
@@ -10200,7 +10284,7 @@
|
|
|
10200
10284
|
"bytesInOutput": 5776
|
|
10201
10285
|
},
|
|
10202
10286
|
"../core/dist/language/nowline-validator.js": {
|
|
10203
|
-
"bytesInOutput":
|
|
10287
|
+
"bytesInOutput": 26827
|
|
10204
10288
|
},
|
|
10205
10289
|
"../core/dist/language/nowline-module.js": {
|
|
10206
10290
|
"bytesInOutput": 831
|
|
@@ -10436,11 +10520,14 @@
|
|
|
10436
10520
|
"../layout/dist/layout.js": {
|
|
10437
10521
|
"bytesInOutput": 12623
|
|
10438
10522
|
},
|
|
10523
|
+
"../layout/dist/layout-insights.js": {
|
|
10524
|
+
"bytesInOutput": 1202
|
|
10525
|
+
},
|
|
10439
10526
|
"../layout/dist/resolve-today.js": {
|
|
10440
10527
|
"bytesInOutput": 2264
|
|
10441
10528
|
},
|
|
10442
10529
|
"../browser/dist/diagnostic-row.js": {
|
|
10443
|
-
"bytesInOutput":
|
|
10530
|
+
"bytesInOutput": 838
|
|
10444
10531
|
},
|
|
10445
10532
|
"../browser/dist/no-op-include-resolver.js": {
|
|
10446
10533
|
"bytesInOutput": 189
|
|
@@ -10467,7 +10554,7 @@
|
|
|
10467
10554
|
"bytesInOutput": 0
|
|
10468
10555
|
},
|
|
10469
10556
|
"../browser/dist/pipeline.js": {
|
|
10470
|
-
"bytesInOutput":
|
|
10557
|
+
"bytesInOutput": 1904
|
|
10471
10558
|
},
|
|
10472
10559
|
"../browser/dist/index.js": {
|
|
10473
10560
|
"bytesInOutput": 0
|
|
@@ -10478,9 +10565,12 @@
|
|
|
10478
10565
|
"../../node_modules/.pnpm/fflate@0.8.3/node_modules/fflate/esm/browser.js": {
|
|
10479
10566
|
"bytesInOutput": 6591
|
|
10480
10567
|
},
|
|
10481
|
-
"
|
|
10568
|
+
"../share-link/dist/index.js": {
|
|
10482
10569
|
"bytesInOutput": 665
|
|
10483
10570
|
},
|
|
10571
|
+
"src/share.ts": {
|
|
10572
|
+
"bytesInOutput": 0
|
|
10573
|
+
},
|
|
10484
10574
|
"src/auto-scan.ts": {
|
|
10485
10575
|
"bytesInOutput": 1001
|
|
10486
10576
|
},
|
|
@@ -10488,7 +10578,7 @@
|
|
|
10488
10578
|
"bytesInOutput": 257
|
|
10489
10579
|
}
|
|
10490
10580
|
},
|
|
10491
|
-
"bytes":
|
|
10581
|
+
"bytes": 668684
|
|
10492
10582
|
}
|
|
10493
10583
|
}
|
|
10494
10584
|
}
|
package/dist/nowline.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @nowline/embed 0.
|
|
1
|
+
/*! @nowline/embed 0.8.0 sha=871752d built=2026-06-17T05:01:14Z */
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -29018,7 +29018,16 @@ var messages = {
|
|
|
29018
29018
|
// Item
|
|
29019
29019
|
"NL.E0600": (a) => `Item "${a.name}" requires a "size:" or "duration:" property.`,
|
|
29020
29020
|
// Warnings
|
|
29021
|
-
"NL.W0700": (a) => `Unknown property "${a.key}" on ${a.entity}. The renderer ignores it.${a.suggested ? ` Did you mean "${a.suggested}"?` : ""}
|
|
29021
|
+
"NL.W0700": (a) => `Unknown property "${a.key}" on ${a.entity}. The renderer ignores it.${a.suggested ? ` Did you mean "${a.suggested}"?` : ""}`,
|
|
29022
|
+
// Layout warnings
|
|
29023
|
+
"NL.W1000": (a) => `Now-line date ${a.date} is outside the roadmap window (${a.start} \u2013 ${a.end}); it will not be drawn.`,
|
|
29024
|
+
// Layout insights (informational)
|
|
29025
|
+
"NL.I1000": (a) => `Title on item "${a.name}" is wider than its bar at this scale; it rendered to the right of the bar.`,
|
|
29026
|
+
"NL.I1001": (a) => `Label chips on item "${a.name}" did not fit inside the bar; they rendered in a spill column to the right.`,
|
|
29027
|
+
"NL.I1002": (a) => `Item "${a.name}" is too narrow to show its marker at this scale; decorations spilled beside the bar.`,
|
|
29028
|
+
"NL.I1003": (a) => a.anchor ? `Item "${a.name}" extends past its "before:" anchor "${a.anchor}".` : `Item "${a.name}" extends past its "before:" anchor.`,
|
|
29029
|
+
"NL.I1004": (a) => `Swimlane "${a.lane}" packed into ${a.rows} rows to avoid overlap.`,
|
|
29030
|
+
"NL.I1005": (a) => `Swimlane "${a.lane}" is over capacity in one or more periods (red utilization band).`
|
|
29022
29031
|
};
|
|
29023
29032
|
|
|
29024
29033
|
// ../core/dist/i18n/messages.fr.js
|
|
@@ -29752,6 +29761,21 @@ function suggestKey(key, candidates, cap = 2) {
|
|
|
29752
29761
|
}
|
|
29753
29762
|
return best;
|
|
29754
29763
|
}
|
|
29764
|
+
var CONCEPT_ALIASES = [
|
|
29765
|
+
{
|
|
29766
|
+
keys: /* @__PURE__ */ new Set(["progress", "percent", "percentage", "pct", "complete", "completion"]),
|
|
29767
|
+
requires: "remaining",
|
|
29768
|
+
suggest: "status: + remaining:"
|
|
29769
|
+
}
|
|
29770
|
+
];
|
|
29771
|
+
function suggestConcept(key, known) {
|
|
29772
|
+
const lower = key.toLowerCase();
|
|
29773
|
+
for (const alias of CONCEPT_ALIASES) {
|
|
29774
|
+
if (alias.keys.has(lower) && known.has(alias.requires))
|
|
29775
|
+
return alias.suggest;
|
|
29776
|
+
}
|
|
29777
|
+
return void 0;
|
|
29778
|
+
}
|
|
29755
29779
|
function propKey2(prop) {
|
|
29756
29780
|
return prop.key.endsWith(":") ? prop.key.slice(0, -1) : prop.key;
|
|
29757
29781
|
}
|
|
@@ -30409,7 +30433,7 @@ var NowlineValidator = class {
|
|
|
30409
30433
|
if (computedBanned?.has(key))
|
|
30410
30434
|
continue;
|
|
30411
30435
|
const candidates = [...known, ...UNIVERSAL_ENTITY_PROPS];
|
|
30412
|
-
const suggested = suggestKey(key, candidates) ?? "";
|
|
30436
|
+
const suggested = suggestConcept(key, known) ?? suggestKey(key, candidates) ?? "";
|
|
30413
30437
|
acceptTr(accept, "warning", { node: prop, property: "key" }, "NL.W0700", {
|
|
30414
30438
|
key,
|
|
30415
30439
|
entity: describeNode(node),
|
|
@@ -37270,6 +37294,88 @@ function layoutRoadmap(file, resolved, options = {}) {
|
|
|
37270
37294
|
});
|
|
37271
37295
|
}
|
|
37272
37296
|
|
|
37297
|
+
// ../layout/dist/layout-insights.js
|
|
37298
|
+
function formatIsoDate(d) {
|
|
37299
|
+
return d.toISOString().slice(0, 10);
|
|
37300
|
+
}
|
|
37301
|
+
function itemLabel(item) {
|
|
37302
|
+
return item.id ?? item.title;
|
|
37303
|
+
}
|
|
37304
|
+
function walkTrackChildren(children, visit) {
|
|
37305
|
+
for (const child of children) {
|
|
37306
|
+
if (child.kind === "item") {
|
|
37307
|
+
visit(child);
|
|
37308
|
+
} else {
|
|
37309
|
+
walkTrackChildren(child.children, visit);
|
|
37310
|
+
}
|
|
37311
|
+
}
|
|
37312
|
+
}
|
|
37313
|
+
function collectItemInsights(item, locale2, out) {
|
|
37314
|
+
const name = itemLabel(item);
|
|
37315
|
+
if (item.textSpills) {
|
|
37316
|
+
out.push(makeInsight(locale2, "NL.I1000", "info", { name }, name));
|
|
37317
|
+
}
|
|
37318
|
+
if (item.chipsOutside) {
|
|
37319
|
+
out.push(makeInsight(locale2, "NL.I1001", "info", { name }, name));
|
|
37320
|
+
}
|
|
37321
|
+
const tooNarrow = item.box.width < MIN_BAR_WIDTH_FOR_DOT_PX || item.dotSpills || item.iconSpills || item.footnoteSpills;
|
|
37322
|
+
if (tooNarrow) {
|
|
37323
|
+
out.push(makeInsight(locale2, "NL.I1002", "info", { name }, name));
|
|
37324
|
+
}
|
|
37325
|
+
if (item.hasOverflow) {
|
|
37326
|
+
out.push(makeInsight(locale2, "NL.I1003", "info", { name, anchor: item.overflowAnchorId }, name));
|
|
37327
|
+
}
|
|
37328
|
+
}
|
|
37329
|
+
function makeInsight(locale2, code, severity, args, entityId) {
|
|
37330
|
+
return {
|
|
37331
|
+
message: tr(locale2, code, args),
|
|
37332
|
+
severity,
|
|
37333
|
+
code,
|
|
37334
|
+
entityId,
|
|
37335
|
+
lspSeverity: severity === "warning" ? 2 : 3,
|
|
37336
|
+
data: { code, args }
|
|
37337
|
+
};
|
|
37338
|
+
}
|
|
37339
|
+
function collectSwimlaneInsights(lane, locale2, out) {
|
|
37340
|
+
const laneName = lane.id ?? lane.title;
|
|
37341
|
+
const items = [];
|
|
37342
|
+
walkTrackChildren(lane.children, (item) => items.push(item));
|
|
37343
|
+
for (const item of items) {
|
|
37344
|
+
collectItemInsights(item, locale2, out);
|
|
37345
|
+
}
|
|
37346
|
+
const rowYs = new Set(items.map((i) => i.box.y));
|
|
37347
|
+
if (rowYs.size > 1) {
|
|
37348
|
+
out.push(makeInsight(locale2, "NL.I1004", "info", { lane: laneName, rows: rowYs.size }, laneName));
|
|
37349
|
+
}
|
|
37350
|
+
const hasRed = lane.utilization?.segments.some((s) => s.classification === "red") ?? false;
|
|
37351
|
+
if (hasRed) {
|
|
37352
|
+
out.push(makeInsight(locale2, "NL.I1005", "info", { lane: laneName }, laneName));
|
|
37353
|
+
}
|
|
37354
|
+
for (const nested of lane.nested) {
|
|
37355
|
+
collectSwimlaneInsights(nested, locale2, out);
|
|
37356
|
+
}
|
|
37357
|
+
}
|
|
37358
|
+
function collectLayoutInsights(layout, context = {}) {
|
|
37359
|
+
const locale2 = context.locale ?? "en-US";
|
|
37360
|
+
const out = [];
|
|
37361
|
+
for (const lane of layout.swimlanes) {
|
|
37362
|
+
collectSwimlaneInsights(lane, locale2, out);
|
|
37363
|
+
}
|
|
37364
|
+
if (context.today) {
|
|
37365
|
+
const today = context.today;
|
|
37366
|
+
const start = layout.timeline.startDate;
|
|
37367
|
+
const end = layout.timeline.endDate;
|
|
37368
|
+
if (today < start || today > end) {
|
|
37369
|
+
out.push(makeInsight(locale2, "NL.W1000", "warning", {
|
|
37370
|
+
date: formatIsoDate(today),
|
|
37371
|
+
start: formatIsoDate(start),
|
|
37372
|
+
end: formatIsoDate(end)
|
|
37373
|
+
}));
|
|
37374
|
+
}
|
|
37375
|
+
}
|
|
37376
|
+
return out;
|
|
37377
|
+
}
|
|
37378
|
+
|
|
37273
37379
|
// ../layout/dist/resolve-today.js
|
|
37274
37380
|
var TimezoneError = class extends Error {
|
|
37275
37381
|
constructor(message) {
|
|
@@ -37376,9 +37482,16 @@ function resolveToday(opts = {}) {
|
|
|
37376
37482
|
}
|
|
37377
37483
|
|
|
37378
37484
|
// ../browser/dist/diagnostic-row.js
|
|
37485
|
+
function mapLangiumSeverity(severity) {
|
|
37486
|
+
if (severity === 2)
|
|
37487
|
+
return "warning";
|
|
37488
|
+
if (severity === 3)
|
|
37489
|
+
return "info";
|
|
37490
|
+
return "error";
|
|
37491
|
+
}
|
|
37379
37492
|
function fromLangiumDiagnostic(diag, file) {
|
|
37380
37493
|
return {
|
|
37381
|
-
severity: diag.severity
|
|
37494
|
+
severity: mapLangiumSeverity(diag.severity),
|
|
37382
37495
|
// resolveDiagnosticCode prefers the stable validator code (NL.Exxxx)
|
|
37383
37496
|
// carried in `data` so the preview table matches the CLI / Problems
|
|
37384
37497
|
// panel, then falls back to Langium's `code`, then a message heuristic.
|
|
@@ -37430,6 +37543,16 @@ function fromRenderWarning(message, file, severity = "warning") {
|
|
|
37430
37543
|
column: 1
|
|
37431
37544
|
};
|
|
37432
37545
|
}
|
|
37546
|
+
function fromLayoutInsight(insight, file) {
|
|
37547
|
+
return {
|
|
37548
|
+
severity: insight.severity,
|
|
37549
|
+
code: insight.code,
|
|
37550
|
+
message: insight.message,
|
|
37551
|
+
file,
|
|
37552
|
+
line: 1,
|
|
37553
|
+
column: 1
|
|
37554
|
+
};
|
|
37555
|
+
}
|
|
37433
37556
|
|
|
37434
37557
|
// ../browser/dist/no-op-include-resolver.js
|
|
37435
37558
|
var NOWLINE_BROWSER_NOOP_INCLUDE_TAG = "__nowline_browser_noop_include__";
|
|
@@ -39193,6 +39316,19 @@ async function renderSvg(model, options = {}) {
|
|
|
39193
39316
|
|
|
39194
39317
|
// ../browser/dist/pipeline.js
|
|
39195
39318
|
var DEFAULT_SYNTHETIC_PATH = "/browser-source.nowline";
|
|
39319
|
+
var SEVERITY_RANK = {
|
|
39320
|
+
error: 3,
|
|
39321
|
+
warning: 2,
|
|
39322
|
+
info: 1
|
|
39323
|
+
};
|
|
39324
|
+
var LEVEL_RANK = {
|
|
39325
|
+
error: 3,
|
|
39326
|
+
warning: 2,
|
|
39327
|
+
info: 1
|
|
39328
|
+
};
|
|
39329
|
+
function severityMeetsDiagnosticLevel(severity, level) {
|
|
39330
|
+
return SEVERITY_RANK[severity] >= LEVEL_RANK[level];
|
|
39331
|
+
}
|
|
39196
39332
|
var cachedServices;
|
|
39197
39333
|
var docCounter = 0;
|
|
39198
39334
|
function getServices() {
|
|
@@ -39277,6 +39413,11 @@ async function renderSource(source, options = {}) {
|
|
|
39277
39413
|
locale: options.locale,
|
|
39278
39414
|
width: options.width
|
|
39279
39415
|
});
|
|
39416
|
+
const diagnosticLevel = options.diagnosticLevel ?? "error";
|
|
39417
|
+
const layoutInsightRows = collectLayoutInsights(model, {
|
|
39418
|
+
today: today ?? void 0,
|
|
39419
|
+
locale: options.locale ?? "en-US"
|
|
39420
|
+
}).map((insight) => fromLayoutInsight(insight, filePath));
|
|
39280
39421
|
const showLinks = options.showLinks !== false;
|
|
39281
39422
|
const strict = options.strict === true;
|
|
39282
39423
|
const warnMessages = [];
|
|
@@ -39288,7 +39429,10 @@ async function renderSource(source, options = {}) {
|
|
|
39288
39429
|
warn: (msg) => warnMessages.push(msg),
|
|
39289
39430
|
fontFamilies: options.fontFamilies
|
|
39290
39431
|
});
|
|
39291
|
-
const warnings =
|
|
39432
|
+
const warnings = [
|
|
39433
|
+
...layoutInsightRows,
|
|
39434
|
+
...warnMessages.map((m) => fromRenderWarning(m, filePath, strict ? "error" : "warning"))
|
|
39435
|
+
].filter((row) => severityMeetsDiagnosticLevel(row.severity, diagnosticLevel));
|
|
39292
39436
|
if (strict && warnings.length > 0) {
|
|
39293
39437
|
return { kind: "diagnostics", diagnostics: [...rows, ...warnings] };
|
|
39294
39438
|
}
|
|
@@ -39881,7 +40025,7 @@ try {
|
|
|
39881
40025
|
} catch (e) {
|
|
39882
40026
|
}
|
|
39883
40027
|
|
|
39884
|
-
//
|
|
40028
|
+
// ../share-link/dist/index.js
|
|
39885
40029
|
var DEFAULT_SHARE_BASE = "https://free.nowline.io/open";
|
|
39886
40030
|
function _encodePayload(source) {
|
|
39887
40031
|
const bytes = new TextEncoder().encode(source);
|
|
@@ -40019,8 +40163,8 @@ function effectiveTheme(theme, systemTheme) {
|
|
|
40019
40163
|
}
|
|
40020
40164
|
|
|
40021
40165
|
// src/index.ts
|
|
40022
|
-
var version = true ? "0.
|
|
40023
|
-
var sha = true ? "
|
|
40166
|
+
var version = true ? "0.8.0" : "0.0.0";
|
|
40167
|
+
var sha = true ? "871752d" : "unknown";
|
|
40024
40168
|
var DEFAULT_SELECTOR = "pre code.language-nowline, code.language-nowline";
|
|
40025
40169
|
var initialConfig = {
|
|
40026
40170
|
theme: "auto",
|