sysml-diagram 0.31.2 → 0.32.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/out/main.js CHANGED
@@ -164945,6 +164945,7 @@ function expressionKindOf(node) {
164945
164945
  }
164946
164946
  var ConformanceModel = class {
164947
164947
  resolve;
164948
+ implicitBases;
164948
164949
  closures = /* @__PURE__ */ new Map();
164949
164950
  /**
164950
164951
  * @param resolve A written type name → its declaration, or `undefined` when
@@ -164952,9 +164953,24 @@ var ConformanceModel = class {
164952
164953
  * validator supplies its `resolveUnique`, so an ambiguous name is treated
164953
164954
  * exactly as an unreadable one: it makes the walk incomplete rather than
164954
164955
  * resolving to an arbitrary same-named element.
164956
+ * @param implicitBases REQ-411 — issue #161: the standard-library names a
164957
+ * declaration's KEYWORD contributes, which the source never writes. A
164958
+ * `part def Vehicle;` is a `Parts::Part`, and without this the closure said
164959
+ * it was unrelated to one.
164960
+ *
164961
+ * The contribution is the WHOLE chain above the base, not the base alone,
164962
+ * and it reports whether that chain could be read. Both halves matter:
164963
+ * `Parts::Part :> Items::Item` in the vendored library is what makes a
164964
+ * `part def` a legitimate narrowing of an `Items::Item` feature, and a
164965
+ * contribution that named only `Part` while still calling the closure
164966
+ * COMPLETE would let SSM017 reject that narrowing on a picture it knew was
164967
+ * partial. An unreadable chain therefore makes the closure incomplete, and
164968
+ * every caller stays silent on `unknown` — the same rule the rest of this
164969
+ * file follows, applied to the edge the source does not write.
164955
164970
  */
164956
- constructor(resolve8) {
164971
+ constructor(resolve8, implicitBases) {
164957
164972
  this.resolve = resolve8;
164973
+ this.implicitBases = implicitBases;
164958
164974
  }
164959
164975
  /** The transitive supertype names of the type written as `name`. */
164960
164976
  closureOf(name) {
@@ -164987,6 +165003,12 @@ var ConformanceModel = class {
164987
165003
  for (const supertype of [...declaredTypesOf(node).map((t) => t.text), ...specializedNamesOf(node)]) {
164988
165004
  absorb(this.walk(supertype, visiting));
164989
165005
  }
165006
+ const implicit = this.implicitBases?.(node);
165007
+ if (implicit) {
165008
+ for (const base of implicit.names)
165009
+ names.add(simpleTypeName(base));
165010
+ complete &&= implicit.complete;
165011
+ }
164990
165012
  for (const group of compositionGroupsOf(node)) {
164991
165013
  if (group.kind === "intersects") {
164992
165014
  for (const operand of group.targets)
@@ -174359,7 +174381,6 @@ var sysmlInlayHintSettings = {
174359
174381
  dimension: false,
174360
174382
  visibility: false,
174361
174383
  modifiers: false,
174362
- specialization: false,
174363
174384
  redefinition: false,
174364
174385
  effectiveNames: false,
174365
174386
  importedNames: false,
@@ -175025,6 +175046,547 @@ function resolveEffectiveSubject(node) {
175025
175046
  return void 0;
175026
175047
  }
175027
175048
 
175049
+ // ../language-server/out/src/services/implicit-specialization.js
175050
+ var EXPLICIT_SPECIALIZATION_KINDS = /* @__PURE__ */ new Set([
175051
+ ":>",
175052
+ ":>>",
175053
+ "::>",
175054
+ "=>",
175055
+ "specializes",
175056
+ "subsets",
175057
+ "redefines",
175058
+ "references",
175059
+ "crosses",
175060
+ "conjugates"
175061
+ ]);
175062
+ var IMPLICIT_BASES = Object.freeze({
175063
+ PartDecl: { def: "Parts::Part", usage: "Parts::parts" },
175064
+ ItemDecl: { def: "Items::Item", usage: "Items::items" },
175065
+ PortDecl: { def: "Ports::Port", usage: "Ports::ports" },
175066
+ ActionDecl: { def: "Actions::Action", usage: "Actions::actions" },
175067
+ StateDecl: { def: "States::StateAction", usage: "States::stateActions" },
175068
+ ConnectionDecl: { def: "Connections::Connection", usage: "Connections::connections" },
175069
+ InterfaceDecl: { def: "Interfaces::Interface", usage: "Interfaces::interfaces" },
175070
+ CaseDecl: { def: "Cases::Case", usage: "Cases::cases" },
175071
+ UseCaseDecl: { def: "UseCases::UseCase", usage: "UseCases::useCases" },
175072
+ AnalysisCaseDecl: { def: "AnalysisCases::AnalysisCase", usage: "AnalysisCases::analysisCases" },
175073
+ VerificationCaseDecl: { def: "VerificationCases::VerificationCase", usage: "VerificationCases::verificationCases" },
175074
+ ViewDecl: { def: "Views::View", usage: "Views::views" },
175075
+ ViewpointDecl: { def: "Views::ViewpointCheck", usage: "Views::viewpointChecks" },
175076
+ RenderingDecl: { def: "Views::Rendering", usage: "Views::renderings" },
175077
+ RequirementDecl: { def: "Requirements::RequirementCheck", usage: "Requirements::requirementChecks" },
175078
+ ConcernDecl: { def: "Requirements::ConcernCheck", usage: "Requirements::concernChecks" },
175079
+ ConstraintDecl: { def: "Constraints::ConstraintCheck", usage: "Constraints::constraintChecks" },
175080
+ CalcDecl: { def: "Calculations::Calculation", usage: "Calculations::calculations" },
175081
+ AllocationDecl: { def: "Allocations::Allocation", usage: "Allocations::allocations" },
175082
+ AttributeDecl: { def: "Attributes::AttributeValue", usage: "Attributes::attributeValues" },
175083
+ OccurrenceDecl: { def: "Occurrences::Occurrence", usage: "Occurrences::occurrences" },
175084
+ MetadataDecl: { def: "Metadata::MetadataItem", usage: "Metadata::metadataItems" }
175085
+ });
175086
+ var KERML_CLASSIFIER_BASES = Object.freeze({
175087
+ ClassDecl: "Occurrences::Occurrence",
175088
+ StructDecl: "Objects::Object",
175089
+ MetaclassDecl: "Metaobjects::Metaobject",
175090
+ BehaviorDecl: "Performances::Performance",
175091
+ DatatypeDecl: "Base::DataValue"
175092
+ });
175093
+ var KERML_FEATURE_BASES = Object.freeze({
175094
+ StepDecl: "Performances::performances"
175095
+ });
175096
+ var ASSOCIATION_BASES = Object.freeze({ link: "Links::Link", linkObject: "Objects::LinkObject" });
175097
+ var LIBRARY_BASE_CHAINS = Object.freeze({
175098
+ "Actions::Action": ["Performance", "Occurrence", "Anything"],
175099
+ "Actions::actions": ["Action", "Performance", "Occurrence", "Anything", "performances", "occurrences", "things"],
175100
+ "Allocations::Allocation": [
175101
+ "BinaryConnection",
175102
+ "BinaryLinkObject",
175103
+ "BinaryLink",
175104
+ "Link",
175105
+ "Anything",
175106
+ "LinkObject",
175107
+ "Object",
175108
+ "Occurrence",
175109
+ "Connection",
175110
+ "Part",
175111
+ "Item"
175112
+ ],
175113
+ "Allocations::allocations": [
175114
+ "Allocation",
175115
+ "BinaryConnection",
175116
+ "BinaryLinkObject",
175117
+ "BinaryLink",
175118
+ "Link",
175119
+ "Anything",
175120
+ "LinkObject",
175121
+ "Object",
175122
+ "Occurrence",
175123
+ "Connection",
175124
+ "Part",
175125
+ "Item",
175126
+ "binaryConnections",
175127
+ "connections",
175128
+ "linkObjects",
175129
+ "links",
175130
+ "things",
175131
+ "objects",
175132
+ "occurrences",
175133
+ "parts",
175134
+ "items",
175135
+ "binaryLinkObjects",
175136
+ "binaryLinks"
175137
+ ],
175138
+ "AnalysisCases::AnalysisCase": [
175139
+ "Case",
175140
+ "Calculation",
175141
+ "Action",
175142
+ "Performance",
175143
+ "Occurrence",
175144
+ "Anything",
175145
+ "Evaluation"
175146
+ ],
175147
+ "AnalysisCases::analysisCases": [
175148
+ "AnalysisCase",
175149
+ "Case",
175150
+ "Calculation",
175151
+ "Action",
175152
+ "Performance",
175153
+ "Occurrence",
175154
+ "Anything",
175155
+ "Evaluation",
175156
+ "cases",
175157
+ "calculations",
175158
+ "actions",
175159
+ "performances",
175160
+ "occurrences",
175161
+ "things",
175162
+ "evaluations"
175163
+ ],
175164
+ "Attributes::AttributeValue": ["DataValue", "Anything"],
175165
+ "Attributes::attributeValues": ["dataValues", "DataValue", "Anything", "things"],
175166
+ "Base::DataValue": ["Anything"],
175167
+ "Calculations::Calculation": ["Action", "Performance", "Occurrence", "Anything", "Evaluation"],
175168
+ "Calculations::calculations": [
175169
+ "Calculation",
175170
+ "Action",
175171
+ "Performance",
175172
+ "Occurrence",
175173
+ "Anything",
175174
+ "Evaluation",
175175
+ "actions",
175176
+ "performances",
175177
+ "occurrences",
175178
+ "things",
175179
+ "evaluations"
175180
+ ],
175181
+ "Cases::Case": ["Calculation", "Action", "Performance", "Occurrence", "Anything", "Evaluation"],
175182
+ "Cases::cases": [
175183
+ "Case",
175184
+ "Calculation",
175185
+ "Action",
175186
+ "Performance",
175187
+ "Occurrence",
175188
+ "Anything",
175189
+ "Evaluation",
175190
+ "calculations",
175191
+ "actions",
175192
+ "performances",
175193
+ "occurrences",
175194
+ "things",
175195
+ "evaluations"
175196
+ ],
175197
+ "Connections::Connection": ["LinkObject", "Link", "Anything", "Object", "Occurrence", "Part", "Item"],
175198
+ "Connections::connections": [
175199
+ "Connection",
175200
+ "LinkObject",
175201
+ "Link",
175202
+ "Anything",
175203
+ "Object",
175204
+ "Occurrence",
175205
+ "Part",
175206
+ "Item",
175207
+ "linkObjects",
175208
+ "links",
175209
+ "things",
175210
+ "objects",
175211
+ "occurrences",
175212
+ "parts",
175213
+ "items"
175214
+ ],
175215
+ "Constraints::ConstraintCheck": ["BooleanEvaluation", "Evaluation", "Performance", "Occurrence", "Anything"],
175216
+ "Constraints::constraintChecks": [
175217
+ "ConstraintCheck",
175218
+ "BooleanEvaluation",
175219
+ "Evaluation",
175220
+ "Performance",
175221
+ "Occurrence",
175222
+ "Anything",
175223
+ "booleanEvaluations",
175224
+ "evaluations",
175225
+ "performances",
175226
+ "occurrences",
175227
+ "things"
175228
+ ],
175229
+ "Interfaces::Interface": ["Connection", "LinkObject", "Link", "Anything", "Object", "Occurrence", "Part", "Item"],
175230
+ "Interfaces::interfaces": [
175231
+ "Interface",
175232
+ "Connection",
175233
+ "LinkObject",
175234
+ "Link",
175235
+ "Anything",
175236
+ "Object",
175237
+ "Occurrence",
175238
+ "Part",
175239
+ "Item",
175240
+ "connections",
175241
+ "linkObjects",
175242
+ "links",
175243
+ "things",
175244
+ "objects",
175245
+ "occurrences",
175246
+ "parts",
175247
+ "items"
175248
+ ],
175249
+ "Items::Item": ["Object", "Occurrence", "Anything"],
175250
+ "Items::items": ["Item", "Object", "Occurrence", "Anything", "objects", "occurrences", "things"],
175251
+ "Links::Link": ["Anything"],
175252
+ "Metadata::MetadataItem": ["Metaobject", "Object", "Occurrence", "Anything", "Item"],
175253
+ "Metadata::metadataItems": [
175254
+ "MetadataItem",
175255
+ "Metaobject",
175256
+ "Object",
175257
+ "Occurrence",
175258
+ "Anything",
175259
+ "Item",
175260
+ "metaobjects",
175261
+ "objects",
175262
+ "occurrences",
175263
+ "things",
175264
+ "items"
175265
+ ],
175266
+ "Metaobjects::Metaobject": ["Object", "Occurrence", "Anything"],
175267
+ "Objects::LinkObject": ["Link", "Anything", "Object", "Occurrence"],
175268
+ "Objects::Object": ["Occurrence", "Anything"],
175269
+ "Occurrences::Occurrence": ["Anything"],
175270
+ "Occurrences::occurrences": ["Occurrence", "Anything", "things"],
175271
+ "Parts::Part": ["Item", "Object", "Occurrence", "Anything"],
175272
+ "Parts::parts": ["Part", "Item", "Object", "Occurrence", "Anything", "items", "objects", "occurrences", "things"],
175273
+ "Performances::Performance": ["Occurrence", "Anything"],
175274
+ "Performances::performances": ["Performance", "Occurrence", "Anything", "occurrences", "things"],
175275
+ "Ports::Port": ["Object", "Occurrence", "Anything"],
175276
+ "Ports::ports": ["Port", "Object", "Occurrence", "Anything", "objects", "occurrences", "things"],
175277
+ "Requirements::ConcernCheck": [
175278
+ "RequirementCheck",
175279
+ "RequirementConstraintCheck",
175280
+ "ConstraintCheck",
175281
+ "BooleanEvaluation",
175282
+ "Evaluation",
175283
+ "Performance",
175284
+ "Occurrence",
175285
+ "Anything"
175286
+ ],
175287
+ "Requirements::RequirementCheck": [
175288
+ "RequirementConstraintCheck",
175289
+ "ConstraintCheck",
175290
+ "BooleanEvaluation",
175291
+ "Evaluation",
175292
+ "Performance",
175293
+ "Occurrence",
175294
+ "Anything"
175295
+ ],
175296
+ "Requirements::concernChecks": [
175297
+ "ConcernCheck",
175298
+ "RequirementCheck",
175299
+ "RequirementConstraintCheck",
175300
+ "ConstraintCheck",
175301
+ "BooleanEvaluation",
175302
+ "Evaluation",
175303
+ "Performance",
175304
+ "Occurrence",
175305
+ "Anything",
175306
+ "requirementChecks",
175307
+ "constraintChecks",
175308
+ "booleanEvaluations",
175309
+ "evaluations",
175310
+ "performances",
175311
+ "occurrences",
175312
+ "things"
175313
+ ],
175314
+ "Requirements::requirementChecks": [
175315
+ "RequirementCheck",
175316
+ "RequirementConstraintCheck",
175317
+ "ConstraintCheck",
175318
+ "BooleanEvaluation",
175319
+ "Evaluation",
175320
+ "Performance",
175321
+ "Occurrence",
175322
+ "Anything",
175323
+ "constraintChecks",
175324
+ "booleanEvaluations",
175325
+ "evaluations",
175326
+ "performances",
175327
+ "occurrences",
175328
+ "things"
175329
+ ],
175330
+ "States::StateAction": [
175331
+ "Action",
175332
+ "Performance",
175333
+ "Occurrence",
175334
+ "Anything",
175335
+ "StatePerformance",
175336
+ "DecisionPerformance"
175337
+ ],
175338
+ "States::stateActions": [
175339
+ "StateAction",
175340
+ "Action",
175341
+ "Performance",
175342
+ "Occurrence",
175343
+ "Anything",
175344
+ "StatePerformance",
175345
+ "DecisionPerformance",
175346
+ "actions",
175347
+ "performances",
175348
+ "occurrences",
175349
+ "things"
175350
+ ],
175351
+ "UseCases::UseCase": ["Case", "Calculation", "Action", "Performance", "Occurrence", "Anything", "Evaluation"],
175352
+ "UseCases::useCases": [
175353
+ "UseCase",
175354
+ "Case",
175355
+ "Calculation",
175356
+ "Action",
175357
+ "Performance",
175358
+ "Occurrence",
175359
+ "Anything",
175360
+ "Evaluation",
175361
+ "cases",
175362
+ "calculations",
175363
+ "actions",
175364
+ "performances",
175365
+ "occurrences",
175366
+ "things",
175367
+ "evaluations"
175368
+ ],
175369
+ "VerificationCases::VerificationCase": [
175370
+ "Case",
175371
+ "Calculation",
175372
+ "Action",
175373
+ "Performance",
175374
+ "Occurrence",
175375
+ "Anything",
175376
+ "Evaluation"
175377
+ ],
175378
+ "VerificationCases::verificationCases": [
175379
+ "VerificationCase",
175380
+ "Case",
175381
+ "Calculation",
175382
+ "Action",
175383
+ "Performance",
175384
+ "Occurrence",
175385
+ "Anything",
175386
+ "Evaluation",
175387
+ "cases",
175388
+ "calculations",
175389
+ "actions",
175390
+ "performances",
175391
+ "occurrences",
175392
+ "things",
175393
+ "evaluations"
175394
+ ],
175395
+ "Views::Rendering": ["Part", "Item", "Object", "Occurrence", "Anything"],
175396
+ "Views::View": ["Part", "Item", "Object", "Occurrence", "Anything"],
175397
+ "Views::ViewpointCheck": [
175398
+ "RequirementCheck",
175399
+ "RequirementConstraintCheck",
175400
+ "ConstraintCheck",
175401
+ "BooleanEvaluation",
175402
+ "Evaluation",
175403
+ "Performance",
175404
+ "Occurrence",
175405
+ "Anything"
175406
+ ],
175407
+ "Views::renderings": [
175408
+ "Rendering",
175409
+ "Part",
175410
+ "Item",
175411
+ "Object",
175412
+ "Occurrence",
175413
+ "Anything",
175414
+ "parts",
175415
+ "items",
175416
+ "objects",
175417
+ "occurrences",
175418
+ "things"
175419
+ ],
175420
+ "Views::viewpointChecks": [
175421
+ "ViewpointCheck",
175422
+ "RequirementCheck",
175423
+ "RequirementConstraintCheck",
175424
+ "ConstraintCheck",
175425
+ "BooleanEvaluation",
175426
+ "Evaluation",
175427
+ "Performance",
175428
+ "Occurrence",
175429
+ "Anything",
175430
+ "requirementChecks",
175431
+ "constraintChecks",
175432
+ "booleanEvaluations",
175433
+ "evaluations",
175434
+ "performances",
175435
+ "occurrences",
175436
+ "things"
175437
+ ],
175438
+ "Views::views": [
175439
+ "View",
175440
+ "Part",
175441
+ "Item",
175442
+ "Object",
175443
+ "Occurrence",
175444
+ "Anything",
175445
+ "parts",
175446
+ "items",
175447
+ "objects",
175448
+ "occurrences",
175449
+ "things"
175450
+ ]
175451
+ });
175452
+ function allRelationships(node) {
175453
+ return [...node.preRelationships ?? [], ...node.relationships ?? []];
175454
+ }
175455
+ function statesExplicitSpecialization(node) {
175456
+ const decl = node;
175457
+ if (decl.typing?.type?.$refText)
175458
+ return true;
175459
+ return allRelationships(decl).some((rel2) => (
175460
+ // The SYMBOLIC conjugation has no keyword: `port def In ~ Out;` parses as
175461
+ // a relationship with `conjugate: true` and NO `kind` at all (the
175462
+ // grammar's `conjugate?='~' targets+=RelationPath` alternative). Reading
175463
+ // `kind` alone therefore missed it and offered `Ports::Port` beside a
175464
+ // relationship that already says what the declaration is.
175465
+ rel2.conjugate === true || rel2.kind !== void 0 && EXPLICIT_SPECIALIZATION_KINDS.has(rel2.kind)
175466
+ ));
175467
+ }
175468
+ function implicitBaseOf(node) {
175469
+ const decl = node;
175470
+ const found = qualifiedBaseOf(decl);
175471
+ if (!found)
175472
+ return void 0;
175473
+ const [qualified, isUsage2] = found;
175474
+ return {
175475
+ qualified,
175476
+ simple: simpleTypeName(qualified),
175477
+ isUsage: isUsage2,
175478
+ metaclass: isUsage2 ? "Subsetting" : "Specialization"
175479
+ };
175480
+ }
175481
+ function qualifiedBaseOf(decl) {
175482
+ const classifier = decl.$type === "AssociationDecl" ? decl.isStruct === true ? ASSOCIATION_BASES.linkObject : ASSOCIATION_BASES.link : KERML_CLASSIFIER_BASES[decl.$type];
175483
+ if (classifier)
175484
+ return [classifier, false];
175485
+ const feature = KERML_FEATURE_BASES[decl.$type];
175486
+ if (feature)
175487
+ return [feature, true];
175488
+ const entry = IMPLICIT_BASES[decl.$type];
175489
+ if (!entry)
175490
+ return void 0;
175491
+ const isUsage2 = decl.isDef !== true;
175492
+ return [isUsage2 ? entry.usage : entry.def, isUsage2];
175493
+ }
175494
+ function impliedBaseOf(node) {
175495
+ if (statesExplicitSpecialization(node))
175496
+ return void 0;
175497
+ return implicitBaseOf(node);
175498
+ }
175499
+ var ImplicitSpecializationModel = class {
175500
+ lookup;
175501
+ /** Resolved bases, keyed by qualified name. A MISS is never cached: the
175502
+ * library index may still be loading, and a cached miss would outlive it. */
175503
+ bases = /* @__PURE__ */ new Map();
175504
+ constructor(lookup) {
175505
+ this.lookup = lookup;
175506
+ }
175507
+ /** Drop everything a rebuilt index could change. The chain table is a
175508
+ * constant and survives; only a resolved description can go stale. */
175509
+ invalidate() {
175510
+ this.bases.clear();
175511
+ }
175512
+ /** The implied base of one declaration, or `undefined` when there is none. */
175513
+ baseOf(node) {
175514
+ return impliedBaseOf(node);
175515
+ }
175516
+ /**
175517
+ * The index description of a base, so a consumer can link to it.
175518
+ *
175519
+ * The full qualified spelling must resolve inside the standard library.
175520
+ * A workspace namesake or an unrelated library element with the same simple
175521
+ * name cannot supply this relationship.
175522
+ */
175523
+ descriptionOf(base) {
175524
+ const cached = this.bases.get(base.qualified);
175525
+ if (cached)
175526
+ return cached;
175527
+ if (!this.lookup)
175528
+ return void 0;
175529
+ const exact = this.lookup.descriptions(base.qualified).find((description) => {
175530
+ const uri = description.documentUri instanceof URI2 ? description.documentUri : URI2.parse(String(description.documentUri));
175531
+ return isStandardLibraryUri(uri);
175532
+ });
175533
+ if (exact)
175534
+ this.bases.set(base.qualified, exact);
175535
+ return exact;
175536
+ }
175537
+ /**
175538
+ * The implied base of `node` and every library name above it.
175539
+ *
175540
+ * Answered from {@link LIBRARY_BASE_CHAINS}, so it needs no index, no parse
175541
+ * and no network of loaded documents: the desktop host, the web worker and
175542
+ * the headless CLIs all give the same answer, and a workspace with no
175543
+ * library loaded still gets the real hierarchy rather than a shrug. A
175544
+ * declaration with no implicit base has an empty closure, which is complete
175545
+ * in the only sense that matters: there is nothing missing from it.
175546
+ *
175547
+ * A base the table does not cover is reported INCOMPLETE rather than as a
175548
+ * bare name, because a caller may conclude nothing from a name's absence
175549
+ * when the hierarchy above it was never known.
175550
+ */
175551
+ closureOf(node) {
175552
+ const base = this.baseOf(node);
175553
+ if (!base)
175554
+ return { names: /* @__PURE__ */ new Set(), complete: true };
175555
+ const chain = LIBRARY_BASE_CHAINS[base.qualified];
175556
+ return {
175557
+ names: /* @__PURE__ */ new Set([base.simple, ...(chain ?? []).map(simpleTypeName)]),
175558
+ complete: chain !== void 0
175559
+ };
175560
+ }
175561
+ /**
175562
+ * The chain the library puts above one base, for a caller that wants to
175563
+ * check the table against the library it was read from.
175564
+ */
175565
+ static libraryChainOf(qualified) {
175566
+ return LIBRARY_BASE_CHAINS[qualified];
175567
+ }
175568
+ /** Every base the chain table covers, for the same reason. */
175569
+ static coveredBases() {
175570
+ return Object.keys(LIBRARY_BASE_CHAINS);
175571
+ }
175572
+ };
175573
+ var models = /* @__PURE__ */ new WeakMap();
175574
+ function implicitSpecializationsFor(shared) {
175575
+ if (!shared)
175576
+ return void 0;
175577
+ const existing = models.get(shared);
175578
+ if (existing)
175579
+ return existing;
175580
+ const created = new ImplicitSpecializationModel(nameLookupFor(shared));
175581
+ models.set(shared, created);
175582
+ shared.workspace.DocumentBuilder.onBuildPhase(
175583
+ // Indexing is the only phase that can change what a base resolves to.
175584
+ DocumentState.IndexedContent,
175585
+ () => created.invalidate()
175586
+ );
175587
+ return created;
175588
+ }
175589
+
175028
175590
  // ../language-server/out/src/messages.js
175029
175591
  var DIAGNOSTIC_MESSAGES = {
175030
175592
  // REQ-006 - a broad diagram anchor cannot prove which typed occurrence owns
@@ -175379,6 +175941,12 @@ var OPERATOR_TOOLTIPS = {
175379
175941
  "@": { desc: "**Metadata application** shorthand - applies a metadata definition to the next element.", precedence: 0, example: "@Safety\npart def Engine;", cite: "OMG SysML v2.0 Part 1 \xA78.2.2.27 (Metadata)" },
175380
175942
  "@@": { desc: "**Metaclass application** - applies a metaclass annotation.", precedence: 0, example: "@@StandardProfile", cite: "OMG SysML v2.0 Part 1 \xA78.2.2.27 (Metadata)" }
175381
175943
  };
175944
+ var IMPLICIT_SPECIALIZATION_MESSAGES = {
175945
+ makeExplicit: (base) => `Make implicit specialization explicit (':> ${base}')`,
175946
+ specializes: "implicitly specializes",
175947
+ subsets: "implicitly subsets",
175948
+ source: " Source: the standard library, through the declaration keyword (OMG SysML v2 Part 1 section 7.6.8)."
175949
+ };
175382
175950
 
175383
175951
  // ../language-server/out/src/services/hover-provider.js
175384
175952
  var MAX_HOVER_LINES = 30;
@@ -175473,7 +176041,7 @@ function directionLabel(node) {
175473
176041
  const dir = modifiers2.find((m) => m === "in" || m === "out" || m === "inout");
175474
176042
  return dir ? `${dir} ` : "";
175475
176043
  }
175476
- function allRelationships(node) {
176044
+ function allRelationships2(node) {
175477
176045
  return [...node.preRelationships ?? [], ...node.relationships ?? []];
175478
176046
  }
175479
176047
  function relationshipTargets(rel2) {
@@ -175537,7 +176105,7 @@ function declarationLine(node, resolver, enumResolver) {
175537
176105
  const name = externalVariantName(node) ?? identificationLabel(named2) ?? effectiveIdentificationLabel(named2) ?? "(anonymous)";
175538
176106
  let typing = typingLabel(named2.typing);
175539
176107
  const mult = multiplicityLabel(node, resolver);
175540
- let rels = relationshipLabel(allRelationships(named2));
176108
+ let rels = relationshipLabel(allRelationships2(named2));
175541
176109
  const implicitVariant = implicitVariantSpecialization(node);
175542
176110
  if (!typing && !implicitVariant && enumResolver && isEnumerationUsage(node)) {
175543
176111
  const types = effectiveEnumerationTypes(node, enumResolver);
@@ -175607,7 +176175,7 @@ function memberSummary(node, resolver) {
175607
176175
  const kind = kindLabel(node);
175608
176176
  const typing = typingLabel(named2.typing);
175609
176177
  const mult = multiplicityLabel(node, resolver);
175610
- const rels = relationshipLabel(allRelationships(named2));
176178
+ const rels = relationshipLabel(allRelationships2(named2));
175611
176179
  return `${dir}${kind} ${name}${typing}${mult}${rels}`;
175612
176180
  }
175613
176181
  function memberList(node, resolver) {
@@ -175780,7 +176348,7 @@ function supertypeCandidates(node) {
175780
176348
  if (more.$refText)
175781
176349
  out.push({ refText: more.$refText, ref: more.ref });
175782
176350
  }
175783
- for (const rel2 of allRelationships(named2)) {
176351
+ for (const rel2 of allRelationships2(named2)) {
175784
176352
  if (!rel2.kind || !DOC_SPECIALIZATION_KINDS.has(rel2.kind))
175785
176353
  continue;
175786
176354
  for (const target of rel2.targets ?? [])
@@ -176162,12 +176730,15 @@ var SysmlHoverProvider = class {
176162
176730
  enumerations;
176163
176731
  /** REQ-394 — the linker's lazy standard-library load, reused rather than duplicated. */
176164
176732
  linker;
176733
+ /** REQ-411 — issue #161: the shared implicit-specialization model. */
176734
+ implicit;
176165
176735
  constructor(services) {
176166
176736
  this.references = services.references.References;
176167
176737
  this.astNodeLocator = services.workspace.AstNodeLocator;
176168
176738
  this.documents = services.shared.workspace.LangiumDocuments;
176169
176739
  this.indexManager = services.shared.workspace.IndexManager;
176170
176740
  this.linker = services.references.Linker;
176741
+ this.implicit = implicitSpecializationsFor(services.shared);
176171
176742
  const paths = new FeaturePathResolver(services);
176172
176743
  this.featureProperties = featurePropertyResolver(paths);
176173
176744
  this.enumerations = enumerationResolver(paths);
@@ -176311,8 +176882,10 @@ var SysmlHoverProvider = class {
176311
176882
  // target kind, and target declaration line instead of only echoing `:>`/`:>>`.
176312
176883
  async relationshipDetailSection(node) {
176313
176884
  const named2 = node;
176314
- const rels = allRelationships(named2);
176315
- if (rels.length === 0)
176885
+ const rels = allRelationships2(named2);
176886
+ const implied = this.implicit?.baseOf(node);
176887
+ const impliedBase = implied && this.implicit?.descriptionOf(implied) ? implied : void 0;
176888
+ if (rels.length === 0 && !impliedBase)
176316
176889
  return void 0;
176317
176890
  const sourceKind = kindLabel(node);
176318
176891
  const sourceName = identificationLabel(named2) ?? "(anonymous)";
@@ -176334,6 +176907,10 @@ var SysmlHoverProvider = class {
176334
176907
  }
176335
176908
  }
176336
176909
  }
176910
+ if (impliedBase) {
176911
+ const phrase = impliedBase.isUsage ? IMPLICIT_SPECIALIZATION_MESSAGES.subsets : IMPLICIT_SPECIALIZATION_MESSAGES.specializes;
176912
+ lines.push(`- ${sourceKind} \`${sourceName}\` ${phrase} \`${impliedBase.qualified}\``, IMPLICIT_SPECIALIZATION_MESSAGES.source);
176913
+ }
176337
176914
  return lines.length > 0 ? `*Relationships:*
176338
176915
  ${lines.join("\n")}` : void 0;
176339
176916
  }
@@ -178897,12 +179474,18 @@ var SysmlValidator = class _SysmlValidator {
178897
179474
  // captured here. The two share one grammar today; this keeps that from becoming
178898
179475
  // load-bearing.
178899
179476
  serviceRegistry;
179477
+ // REQ-411 — issue #161: the shared implicit-specialization model. The walk
179478
+ // above a base needs a PARSED library declaration, so it goes through the
179479
+ // linker's own lazy single-file load rather than pulling the library into
179480
+ // the workspace; the model memoizes each chain for the whole session.
179481
+ implicit;
178900
179482
  constructor(services) {
178901
179483
  this.serviceRegistry = services.shared.ServiceRegistry;
178902
179484
  this.indexManager = services.shared.workspace.IndexManager;
178903
179485
  this.langiumDocuments = services.shared.workspace.LangiumDocuments;
178904
179486
  this.astNodeLocator = services.workspace.AstNodeLocator;
178905
179487
  this.featurePaths = new FeaturePathResolver(services);
179488
+ this.implicit = implicitSpecializationsFor(services.shared);
178906
179489
  this.featureProperties = featurePropertyResolver(this.featurePaths);
178907
179490
  this.compositionTypes = compositionTypeResolver(this.featurePaths);
178908
179491
  this.enumerations = enumerationResolver(this.featurePaths);
@@ -180628,7 +181211,7 @@ ${baseIndent}}`;
180628
181211
  // `unknown` and no diagnostic. That is what keeps the OMG corpus clean while
180629
181212
  // still catching the workspace-local mistakes these codes exist for.
180630
181213
  checkTypeConformance(decls, index2, accept) {
180631
- const model = new ConformanceModel((name) => this.resolveUnique(name, index2));
181214
+ const model = new ConformanceModel((name) => this.resolveUnique(name, index2), (node) => this.implicit?.closureOf(node) ?? { names: /* @__PURE__ */ new Set(), complete: true });
180632
181215
  for (const decl of decls) {
180633
181216
  this.checkRedefinitionTypeConformance(decl, model, index2, accept);
180634
181217
  this.checkValueAssignability(decl, model, accept);
@@ -183402,6 +183985,21 @@ function nearestDefAware(node) {
183402
183985
  }
183403
183986
  return void 0;
183404
183987
  }
183988
+ function nearestImplicitBaseOwner(node) {
183989
+ for (let cur = node; cur; cur = cur.$container) {
183990
+ if (implicitBaseOf(cur))
183991
+ return cur;
183992
+ }
183993
+ return void 0;
183994
+ }
183995
+ var DECLARATION_HEAD_ENDS = /* @__PURE__ */ new Set(["{", ";", "=", ":=", "default"]);
183996
+ function declarationTailPosition(node) {
183997
+ const leaves = cst_utils_exports.flattenCst(node).toArray().filter((leaf) => !leaf.hidden);
183998
+ const stop = leaves.findIndex((leaf) => DECLARATION_HEAD_ENDS.has(leaf.text));
183999
+ if (stop > 0)
184000
+ return leaves[stop - 1].range.end;
184001
+ return node.range.end;
184002
+ }
183405
184003
  function isSubjectBearing(node) {
183406
184004
  return !!node && (isRequirementDecl(node) || isCaseDecl(node) || isUseCaseDecl(node) || isVerificationCaseDecl(node) || isAnalysisCaseDecl(node) || isConcernDecl(node));
183407
184005
  }
@@ -183447,8 +184045,12 @@ function astNodeAtRange(document2, diagnostic) {
183447
184045
  }
183448
184046
  var SysmlCodeActionProvider = class {
183449
184047
  documents;
184048
+ /** REQ-411 — issue #161: the shared implicit-specialization model, so the
184049
+ * action offers only a base the loaded library actually holds. */
184050
+ implicit;
183450
184051
  constructor(services) {
183451
184052
  this.documents = services.shared.workspace.LangiumDocuments;
184053
+ this.implicit = implicitSpecializationsFor(services.shared);
183452
184054
  }
183453
184055
  getCodeActions(document2, params) {
183454
184056
  const actions = [];
@@ -183750,6 +184352,19 @@ ${indent}}`)]
183750
184352
  });
183751
184353
  }
183752
184354
  }
184355
+ const implicitOwner = nearestImplicitBaseOwner(rangeNode);
184356
+ const implicitBase = implicitOwner ? impliedBaseOf(implicitOwner) : void 0;
184357
+ if (implicitOwner?.$cstNode && implicitBase && this.implicit?.descriptionOf(implicitBase)) {
184358
+ actions.push({
184359
+ title: IMPLICIT_SPECIALIZATION_MESSAGES.makeExplicit(implicitBase.qualified),
184360
+ kind: import_vscode_languageserver18.CodeActionKind.RefactorRewrite,
184361
+ edit: {
184362
+ changes: {
184363
+ [uri]: [import_vscode_languageserver18.TextEdit.insert(declarationTailPosition(implicitOwner.$cstNode), ` :> ${implicitBase.qualified}`)]
184364
+ }
184365
+ }
184366
+ });
184367
+ }
183753
184368
  const importNode = nearestAncestor2(rangeNode, isImport);
183754
184369
  if (importNode?.$cstNode && importNode.alias && importNode.segs.every((s) => !s.star && s.name)) {
183755
184370
  const path10 = [importNode.head, ...importNode.segs.map((s) => s.name)].join("::");
@@ -185027,18 +185642,6 @@ function typeAnchor(node, refText) {
185027
185642
  }
185028
185643
  return void 0;
185029
185644
  }
185030
- var EXPLICIT_SPECIALIZATION_KINDS = /* @__PURE__ */ new Set([
185031
- ":>",
185032
- ":>>",
185033
- "::>",
185034
- "=>",
185035
- "specializes",
185036
- "subsets",
185037
- "redefines",
185038
- "references",
185039
- "crosses",
185040
- "conjugates"
185041
- ]);
185042
185645
  var REDEFINITION_KINDS4 = /* @__PURE__ */ new Set([":>>", "redefines"]);
185043
185646
  var CONSTANT_CARRYING_KINDS = /* @__PURE__ */ new Set([
185044
185647
  ":>",
@@ -185083,30 +185686,6 @@ var ACTION_KIND_USAGES = /* @__PURE__ */ new Set([
185083
185686
  "VerificationCaseDecl"
185084
185687
  ]);
185085
185688
  var KERML_FEATURE_DECLS = /* @__PURE__ */ new Set(["FeatureDecl", "StepDecl", "ExpressionDecl"]);
185086
- var IMPLICIT_BASES = Object.freeze({
185087
- PartDecl: { def: "Parts::Part", usage: "Parts::parts" },
185088
- ItemDecl: { def: "Items::Item", usage: "Items::items" },
185089
- PortDecl: { def: "Ports::Port", usage: "Ports::ports" },
185090
- ActionDecl: { def: "Actions::Action", usage: "Actions::actions" },
185091
- StateDecl: { def: "States::StateAction", usage: "States::stateActions" },
185092
- ConnectionDecl: { def: "Connections::Connection", usage: "Connections::connections" },
185093
- InterfaceDecl: { def: "Interfaces::Interface", usage: "Interfaces::interfaces" },
185094
- CaseDecl: { def: "Cases::Case", usage: "Cases::cases" },
185095
- UseCaseDecl: { def: "UseCases::UseCase", usage: "UseCases::useCases" },
185096
- AnalysisCaseDecl: { def: "AnalysisCases::AnalysisCase", usage: "AnalysisCases::analysisCases" },
185097
- VerificationCaseDecl: { def: "VerificationCases::VerificationCase", usage: "VerificationCases::verificationCases" },
185098
- ViewDecl: { def: "Views::View", usage: "Views::views" },
185099
- ViewpointDecl: { def: "Views::ViewpointCheck", usage: "Views::viewpointChecks" },
185100
- RenderingDecl: { def: "Views::Rendering", usage: "Views::renderings" },
185101
- RequirementDecl: { def: "Requirements::RequirementCheck", usage: "Requirements::requirementChecks" },
185102
- ConcernDecl: { def: "Requirements::ConcernCheck", usage: "Requirements::concernChecks" },
185103
- ConstraintDecl: { def: "Constraints::ConstraintCheck", usage: "Constraints::constraintChecks" },
185104
- CalcDecl: { def: "Calculations::Calculation", usage: "Calculations::calculations" },
185105
- AllocationDecl: { def: "Allocations::Allocation", usage: "Allocations::allocations" },
185106
- AttributeDecl: { def: "Attributes::AttributeValue", usage: "Attributes::attributeValues" },
185107
- OccurrenceDecl: { def: "Occurrences::Occurrence", usage: "Occurrences::occurrences" },
185108
- MetadataDecl: { def: "Metadata::MetadataItem", usage: "Metadata::metadataItems" }
185109
- });
185110
185689
  var OCCURRENCE_KIND_OWNERS = /* @__PURE__ */ new Set([
185111
185690
  ...Object.keys(IMPLICIT_BASES).filter((kind) => kind !== "AttributeDecl"),
185112
185691
  // KerML fixes a library base per classifier kind too, in the same way and in
@@ -185141,14 +185720,9 @@ var NON_VARYING_LIBRARY_TYPES = /* @__PURE__ */ new Set(["SelfLink", "HappensLin
185141
185720
  function markdown(value) {
185142
185721
  return { kind: import_vscode_languageserver20.MarkupKind.Markdown, value };
185143
185722
  }
185144
- function allRelationships2(node) {
185723
+ function allRelationships3(node) {
185145
185724
  return [...node.preRelationships ?? [], ...node.relationships ?? []];
185146
185725
  }
185147
- function hasExplicitSpecialization(node) {
185148
- if (node.typing?.type?.$refText)
185149
- return true;
185150
- return allRelationships2(node).some((rel2) => rel2.kind && EXPLICIT_SPECIALIZATION_KINDS.has(rel2.kind));
185151
- }
185152
185726
  function keywordLeaf(node, keyword) {
185153
185727
  const cst = node.$cstNode;
185154
185728
  if (!cst)
@@ -185172,7 +185746,7 @@ function specializesNonVaryingLibraryType(node) {
185172
185746
  const typing = node.typing?.type?.$refText;
185173
185747
  if (typing && NON_VARYING_LIBRARY_TYPES.has(lastSegment3(typing)))
185174
185748
  return true;
185175
- return allRelationships2(node).flatMap((rel2) => rel2.targets ?? []).some((target) => NON_VARYING_LIBRARY_TYPES.has(lastSegment3(target)));
185749
+ return allRelationships3(node).flatMap((rel2) => rel2.targets ?? []).some((target) => NON_VARYING_LIBRARY_TYPES.has(lastSegment3(target)));
185176
185750
  }
185177
185751
  function constantAnchor(node) {
185178
185752
  const cst = node.$cstNode;
@@ -185236,16 +185810,6 @@ function callArguments(node) {
185236
185810
  }
185237
185811
  var SysmlInlayHintProvider = class {
185238
185812
  services;
185239
- /**
185240
- * Resolved implicit bases, keyed by the qualified name in
185241
- * {@link IMPLICIT_BASES}. A base the index does not hold is NOT cached — the
185242
- * library may still be loading — and issue #240 made that miss cheap: two
185243
- * lookups in the shared name index rather than the full index scan it used
185244
- * to be, on a request VS Code re-issues on every scroll. A HIT is cached
185245
- * until the index is rebuilt, so the description a label links to always
185246
- * carries the ranges of the generation it was read from.
185247
- */
185248
- baseCache = /* @__PURE__ */ new Map();
185249
185813
  /**
185250
185814
  * REQ-395 — issue #240: the shared name lookup, built once per index
185251
185815
  * generation. Every category that resolves a WRITTEN name goes through it,
@@ -185290,7 +185854,6 @@ var SysmlInlayHintProvider = class {
185290
185854
  this.linker = services?.references.Linker;
185291
185855
  this.featureProperties = featurePropertyResolver(new FeaturePathResolver(services));
185292
185856
  services?.shared.workspace.DocumentBuilder.onBuildPhase(DocumentState.IndexedContent, () => {
185293
- this.baseCache.clear();
185294
185857
  this.constantCache.clear();
185295
185858
  this.declaredNameCache.clear();
185296
185859
  this.effectiveNameResolvers = /* @__PURE__ */ new WeakMap();
@@ -185398,26 +185961,6 @@ var SysmlInlayHintProvider = class {
185398
185961
  ...node.$type === "VariantReference" || isOwnedEnumerationValue(node) ? {} : { textEdits: [{ range: { start: at, end: at }, newText: "ref " }] }
185399
185962
  });
185400
185963
  }
185401
- if (settings.specialization && node.$cstNode && decl.name && !hasExplicitSpecialization(decl)) {
185402
- const entry = IMPLICIT_BASES[node.$type];
185403
- const qualified = entry ? decl.isDef ? entry.def : entry.usage : void 0;
185404
- const description = qualified ? this.resolveImplicitBase(qualified, decl.isDef !== true) : void 0;
185405
- if (qualified && description) {
185406
- hints.push({
185407
- position: multiplicityAnchor(node.$cstNode),
185408
- label: [{
185409
- value: ` :> ${qualified}`,
185410
- location: {
185411
- uri: description.documentUri.toString(),
185412
- range: descriptionRange(description)
185413
- }
185414
- }],
185415
- kind: import_vscode_languageserver20.InlayHintKind.Type,
185416
- paddingLeft: true,
185417
- tooltip: markdown(`Implicitly specializes \`${qualified}\` from the standard library.`)
185418
- });
185419
- }
185420
- }
185421
185964
  if (settings.redefinition)
185422
185965
  hints.push(...this.parameterRedefinitionHints(decl));
185423
185966
  if (settings.effectiveNames) {
@@ -185488,7 +186031,7 @@ var SysmlInlayHintProvider = class {
185488
186031
  const parameter = mine[index2].node;
185489
186032
  if (!parameter.name || !parameter.$cstNode)
185490
186033
  continue;
185491
- if (allRelationships2(parameter).some((rel2) => rel2.kind && REDEFINITION_KINDS4.has(rel2.kind)))
186034
+ if (allRelationships3(parameter).some((rel2) => rel2.kind && REDEFINITION_KINDS4.has(rel2.kind)))
185492
186035
  continue;
185493
186036
  const target = theirs[index2].node;
185494
186037
  if (!target.name || target.name === parameter.name)
@@ -185683,7 +186226,7 @@ var SysmlInlayHintProvider = class {
185683
186226
  return void 0;
185684
186227
  if (specializesNonVaryingLibraryType(node))
185685
186228
  return void 0;
185686
- const carrier = allRelationships2(node).filter((rel2) => rel2.kind && CONSTANT_CARRYING_KINDS.has(rel2.kind)).flatMap((rel2) => rel2.targets ?? []).find((target) => this.isConstantFeature(target));
186229
+ const carrier = allRelationships3(node).filter((rel2) => rel2.kind && CONSTANT_CARRYING_KINDS.has(rel2.kind)).flatMap((rel2) => rel2.targets ?? []).find((target) => this.isConstantFeature(target));
185687
186230
  if (!carrier)
185688
186231
  return void 0;
185689
186232
  const anchor = constantAnchor(node);
@@ -185727,41 +186270,11 @@ var SysmlInlayHintProvider = class {
185727
186270
  this.constantCache.set(key2, answer);
185728
186271
  return answer;
185729
186272
  }
185730
- /**
185731
- * REQ-395 — Find one implicit base in the index.
185732
- *
185733
- * A description whose name is the full qualified spelling wins outright. The
185734
- * index otherwise keys library symbols by their simple name, so the fallback
185735
- * requires BOTH a standard-library document and the right side of the
185736
- * definition/usage split, which the precomputed index records — that is what
185737
- * keeps `Parts::Part` from matching a `part Part` somewhere else.
185738
- */
185739
- resolveImplicitBase(qualified, wantUsage) {
185740
- const cached = this.baseCache.get(qualified);
185741
- if (cached)
185742
- return cached;
185743
- if (!this.lookup)
185744
- return void 0;
185745
- const exact = this.lookup.descriptions(qualified).at(0);
185746
- if (exact) {
185747
- this.baseCache.set(qualified, exact);
185748
- return exact;
185749
- }
185750
- const fallback = this.lookup.descriptions(lastSegment3(qualified)).find((description) => {
185751
- const uri = description.documentUri instanceof URI2 ? description.documentUri : URI2.parse(String(description.documentUri));
185752
- if (!isStandardLibraryUri(uri))
185753
- return false;
185754
- return description.isUsage === true === wantUsage;
185755
- });
185756
- if (fallback)
185757
- this.baseCache.set(qualified, fallback);
185758
- return fallback;
185759
- }
185760
186273
  };
185761
186274
  function effectiveNameHint(node, resolver) {
185762
186275
  if (node.name || node.shortName?.name || !node.$cstNode)
185763
186276
  return void 0;
185764
- const redefinition = allRelationships2(node).find((rel2) => rel2.kind && REDEFINITION_KINDS4.has(rel2.kind) && (rel2.targets?.length ?? 0) > 0);
186277
+ const redefinition = allRelationships3(node).find((rel2) => rel2.kind && REDEFINITION_KINDS4.has(rel2.kind) && (rel2.targets?.length ?? 0) > 0);
185765
186278
  if (!redefinition?.targets?.[0])
185766
186279
  return void 0;
185767
186280
  const names = effectiveNamesOf(node, resolver);
@@ -187094,6 +187607,8 @@ function ownedRelationshipTargets(element, typePattern) {
187094
187607
  for (const relationship of toArray(element.ownedRelationship)) {
187095
187608
  if (!isObject3(relationship))
187096
187609
  continue;
187610
+ if (relationship.isImplied === true)
187611
+ continue;
187097
187612
  const type = stringValue(relationship["@type"]) ?? "";
187098
187613
  if (!typePattern.test(type))
187099
187614
  continue;
@@ -209722,7 +210237,7 @@ async function runExport(command) {
209722
210237
  }
209723
210238
 
209724
210239
  // src/main.ts
209725
- var VERSION2 = true ? "0.31.2" : "dev";
210240
+ var VERSION2 = true ? "0.32.0" : "dev";
209726
210241
  function display(file) {
209727
210242
  const rel2 = path9.relative(process.cwd(), file);
209728
210243
  return rel2 && !rel2.startsWith("..") ? rel2.split(path9.sep).join("/") : file;