sysml-diagram 0.15.7 → 0.15.8
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 +109 -4
- package/out/main.js.map +2 -2
- package/package.json +1 -1
- package/resources/sysml.dimension-table.json +1 -1
package/out/main.js
CHANGED
|
@@ -167246,7 +167246,7 @@ var SysmlDiagramModelProvider = class _SysmlDiagramModelProvider {
|
|
|
167246
167246
|
transitionLabel(t) {
|
|
167247
167247
|
const tn = t;
|
|
167248
167248
|
const acc = tn.accept;
|
|
167249
|
-
const trigger = acc ? acc.type?.$refText ?? acc.varName : void 0;
|
|
167249
|
+
const trigger = acc ? acc.type?.$refText ?? acc.varName ?? this.triggerExpressionLabel(acc) : void 0;
|
|
167250
167250
|
const guard = tn.guard?.$cstNode?.text?.replace(/\s+/g, " ").trim();
|
|
167251
167251
|
const effect = this.effectLabel(tn.effect);
|
|
167252
167252
|
const parts = [];
|
|
@@ -167258,6 +167258,19 @@ var SysmlDiagramModelProvider = class _SysmlDiagramModelProvider {
|
|
|
167258
167258
|
parts.push(`/ ${effect}`);
|
|
167259
167259
|
return parts.length ? parts.join(" ") : void 0;
|
|
167260
167260
|
}
|
|
167261
|
+
/** The `at` / `after` / `when` trigger of a transition, as written. */
|
|
167262
|
+
triggerExpressionLabel(acc) {
|
|
167263
|
+
for (const [keyword, expr] of [
|
|
167264
|
+
["at", acc.atTime],
|
|
167265
|
+
["after", acc.afterDelay],
|
|
167266
|
+
["when", acc.changeCondition]
|
|
167267
|
+
]) {
|
|
167268
|
+
const text = expr?.$cstNode?.text?.replace(/\s+/g, " ").trim();
|
|
167269
|
+
if (text)
|
|
167270
|
+
return `${keyword} ${text}`;
|
|
167271
|
+
}
|
|
167272
|
+
return void 0;
|
|
167273
|
+
}
|
|
167261
167274
|
effectLabel(ef) {
|
|
167262
167275
|
if (!ef || typeof ef !== "object")
|
|
167263
167276
|
return void 0;
|
|
@@ -173342,10 +173355,22 @@ ${baseIndent}}`;
|
|
|
173342
173355
|
// target feature, so each end must be able to hold it (OMG SysML v2 Part 1
|
|
173343
173356
|
// §7.12 ItemFlow / PayloadFeature). Reported per end, and only when the end
|
|
173344
173357
|
// resolves unambiguously and carries exactly one written type.
|
|
173358
|
+
//
|
|
173359
|
+
// A MESSAGE is deliberately exempt, though the grammar folds it into the same
|
|
173360
|
+
// statement. OMG SysML 8.2.2.16 gives `flow` FlowEndMembers — a FlowEnd is a
|
|
173361
|
+
// FlowFeature, the feature that holds the payload — while a message's `from`
|
|
173362
|
+
// and `to` are MessageEventMembers: `message m of i : I from evt1 to evt2` is
|
|
173363
|
+
// "parsed as an abstract FlowUsage, but without any flowEnds", its two ends
|
|
173364
|
+
// redefining Message::sourceEvent and Message::targetEvent (8.4.12.2). The
|
|
173365
|
+
// ends of a message are the two OCCURRENCES that exchange the payload, so
|
|
173366
|
+
// demanding that they be able to hold it reports every sequence-diagram
|
|
173367
|
+
// message as an error.
|
|
173345
173368
|
checkFlowPayload(decl, model, index2, accept) {
|
|
173346
173369
|
if (decl.$type !== "FlowStmt")
|
|
173347
173370
|
return;
|
|
173348
173371
|
const flow = decl;
|
|
173372
|
+
if (flow.flowKind === "message")
|
|
173373
|
+
return;
|
|
173349
173374
|
const payload = flowPayloadType(flow.payload);
|
|
173350
173375
|
if (!payload || payload.conjugated)
|
|
173351
173376
|
return;
|
|
@@ -192601,6 +192626,38 @@ body {
|
|
|
192601
192626
|
#root { display: flex; flex-direction: column; height: 100%; min-height: 0; }
|
|
192602
192627
|
.right-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; }
|
|
192603
192628
|
|
|
192629
|
+
/* issue 225 \u2014 ONE scrollbar in the whole webview. The canvas draws its own bars
|
|
192630
|
+
* (.rf-scrollbar) because it scrolls a transform rather than a box; every other
|
|
192631
|
+
* surface scrolls natively - the Browser View tree, the Grid View table, the
|
|
192632
|
+
* Properties panel, a long context menu - and the host's default bar is a fat
|
|
192633
|
+
* one with arrow buttons, which reads as a second, heavier design beside them.
|
|
192634
|
+
*
|
|
192635
|
+
* These MUST be the standard properties, not the WebKit pseudo-elements. The VS
|
|
192636
|
+
* Code webview host injects an @layer vscode-default block that sets
|
|
192637
|
+
* scrollbar-color on html; scrollbar-color INHERITS, and Chromium ignores the
|
|
192638
|
+
* ::-webkit-scrollbar pseudo-elements for any element that has it - so a WebKit
|
|
192639
|
+
* rule here is dead on arrival on every surface (which is also why the host's
|
|
192640
|
+
* own ::-webkit-scrollbar block in that same style element does nothing). What
|
|
192641
|
+
* beats it is the cascade: an UNLAYERED declaration outranks any layered one
|
|
192642
|
+
* whatever its specificity, so one rule on the root re-colours and thins every
|
|
192643
|
+
* scrolling box in the document, and 'thin' is what drops the arrow buttons.
|
|
192644
|
+
*
|
|
192645
|
+
* Nothing here is a scroll BEHAVIOUR: an element scrolls exactly as much as its
|
|
192646
|
+
* own overflow says. The toolbar is the one deliberate exception - it hides its
|
|
192647
|
+
* bar and overlays .dbar-track, because a laid-out bar there pushes the icons
|
|
192648
|
+
* upward - and an element's own scrollbar-width beats this inherited one. */
|
|
192649
|
+
:root { scrollbar-color: color-mix(in srgb, var(--fg-3) 40%, transparent) transparent; }
|
|
192650
|
+
/* The two halves are split because only ONE of them inherits. scrollbar-color
|
|
192651
|
+
* does, so the root carries it for the whole document; scrollbar-width does NOT,
|
|
192652
|
+
* so a rule on the root would thin the page's own bar and leave every inner
|
|
192653
|
+
* scrolling box - which is all of them here - at the host default. Hence the
|
|
192654
|
+
* universal selector, still at zero specificity so .dtoolbar keeps winning. */
|
|
192655
|
+
* { scrollbar-width: thin; }
|
|
192656
|
+
/* Quiet at rest, readable under the pointer - the same pair the canvas bars use. */
|
|
192657
|
+
.doutline-tree:hover, .grv-wrap:hover, .dinspector:hover, .rp-body:hover, .dctx-menu:hover {
|
|
192658
|
+
scrollbar-color: color-mix(in srgb, var(--fg-3) 65%, transparent) transparent;
|
|
192659
|
+
}
|
|
192660
|
+
|
|
192604
192661
|
/* issue 165 \u2014 the docked (side) mode renders the same .dtoolbar as tab mode;
|
|
192605
192662
|
* the old dedicated .rp-header row (with its "Diagram <view>" text) is gone. */
|
|
192606
192663
|
.dtoolbar-shell {
|
|
@@ -193349,7 +193406,53 @@ body {
|
|
|
193349
193406
|
/* Plain canvas background. AdaptiveGrid paints two fixed CSS grid layers and
|
|
193350
193407
|
* updates only their screen-space size/offset; it avoids the two live SVG
|
|
193351
193408
|
* pattern trees that React Flow otherwise reconciles for every transform tick. */
|
|
193352
|
-
.react-flow { width: 100%; height: 100%; background: var(--vscode-editor-background, var(--bg-1)); }
|
|
193409
|
+
.react-flow { position: relative; width: 100%; height: 100%; background: var(--vscode-editor-background, var(--bg-1)); }
|
|
193410
|
+
/* issue 225 \u2014 the HAND tool is navigation only. React Flow's own flags stop node
|
|
193411
|
+
* dragging and connecting; these rules stop the hand-drawn editing affordances
|
|
193412
|
+
* (port move strips, connector waypoints, the message reorder grip, resize grips,
|
|
193413
|
+
* the frame hover band that reveals connect points) from taking the pointer, so a
|
|
193414
|
+
* drag anywhere is a pan. Clicks, hover cards and the right-click menus keep
|
|
193415
|
+
* working \u2014 placing a connector through the context menu still does. */
|
|
193416
|
+
.react-flow.rf-tool-hand .port-drag-hit,
|
|
193417
|
+
.react-flow.rf-tool-hand .dedge-waypoints,
|
|
193418
|
+
.react-flow.rf-tool-hand .dedge-midpoint,
|
|
193419
|
+
.react-flow.rf-tool-hand .dedge-waypoint,
|
|
193420
|
+
.react-flow.rf-tool-hand .dedge-handle,
|
|
193421
|
+
.react-flow.rf-tool-hand .danchor-pt,
|
|
193422
|
+
.react-flow.rf-tool-hand .dport-endpoint-handle,
|
|
193423
|
+
.react-flow.rf-tool-hand .message-reorder-grip,
|
|
193424
|
+
.react-flow.rf-tool-hand .dframe-hover-band,
|
|
193425
|
+
.react-flow.rf-tool-hand .react-flow__handle,
|
|
193426
|
+
/* React Flow's own endpoint anchors. The edge array is locked as well (a
|
|
193427
|
+
* per-edge reconnectable outranks the canvas-wide flag), so these normally do
|
|
193428
|
+
* not exist under the hand tool at all; the rule is what makes the guarantee
|
|
193429
|
+
* hold for the frame in which selection and the tool switch disagree. */
|
|
193430
|
+
.react-flow.rf-tool-hand .react-flow__edgeupdater,
|
|
193431
|
+
.react-flow.rf-tool-hand .react-flow__resize-control { pointer-events: none; }
|
|
193432
|
+
/* One cursor everywhere: the pane already gets React Flow's grab/grabbing pair,
|
|
193433
|
+
* so the node surfaces that otherwise advertise a move or a resize must follow it
|
|
193434
|
+
* rather than promise an edit the hand tool will not perform. */
|
|
193435
|
+
.react-flow.rf-tool-hand .react-flow__node,
|
|
193436
|
+
.react-flow.rf-tool-hand .rf-frame-header,
|
|
193437
|
+
.react-flow.rf-tool-hand .rf-node-header,
|
|
193438
|
+
.react-flow.rf-tool-hand .rf-lane-header,
|
|
193439
|
+
.react-flow.rf-tool-hand .dnode-hit,
|
|
193440
|
+
.react-flow.rf-tool-hand .dframe-drag { cursor: grab; }
|
|
193441
|
+
.react-flow.rf-tool-hand .react-flow__pane.dragging,
|
|
193442
|
+
.react-flow.rf-tool-hand .react-flow__node:active,
|
|
193443
|
+
.react-flow.rf-tool-hand .dnode-hit:active { cursor: grabbing; }
|
|
193444
|
+
/* issue 225 \u2014 plain scrollbars along the canvas edges. Thin, quiet, and only as
|
|
193445
|
+
* present as the toolbar chrome; the thumb spans the whole track ("full") when
|
|
193446
|
+
* the diagram already fits, which reads as "nothing to scroll". */
|
|
193447
|
+
.rf-scrollbar { position: absolute; z-index: 4; background: transparent; }
|
|
193448
|
+
.rf-scrollbar-y { top: 0; right: 0; bottom: 10px; width: 10px; }
|
|
193449
|
+
.rf-scrollbar-x { left: 0; right: 10px; bottom: 0; height: 10px; }
|
|
193450
|
+
.rf-scrollbar:hover { background: var(--bg-1); }
|
|
193451
|
+
.rf-scrollbar-thumb { position: absolute; border-radius: 5px; background: var(--fg-3); opacity: 0.34; }
|
|
193452
|
+
.rf-scrollbar-y .rf-scrollbar-thumb { left: 2px; right: 2px; }
|
|
193453
|
+
.rf-scrollbar-x .rf-scrollbar-thumb { top: 2px; bottom: 2px; }
|
|
193454
|
+
.rf-scrollbar:hover .rf-scrollbar-thumb { opacity: 0.6; }
|
|
193455
|
+
.rf-scrollbar-thumb.full { opacity: 0.14; }
|
|
193353
193456
|
.rf-grid-layer { pointer-events: none; }
|
|
193354
193457
|
svg.react-flow__connectionline { z-index: 1; }
|
|
193355
193458
|
/* REQ-224 \u2014 bottom control bar (grid toggle, zoom out / live % / zoom in, fit) */
|
|
@@ -193361,7 +193464,9 @@ svg.react-flow__connectionline { z-index: 1; }
|
|
|
193361
193464
|
border-radius: 5px; cursor: pointer; }
|
|
193362
193465
|
.rf-ctl-btn:hover { background: var(--bg-hover); color: var(--fg-0); }
|
|
193363
193466
|
.rf-ctl-btn.on { color: var(--accent); }
|
|
193364
|
-
|
|
193467
|
+
/* issue 225 \u2014 the live zoom readout IS the reset-to-100% button, so it keeps the
|
|
193468
|
+
* readout's width and typeface while taking the control bar's hover affordance. */
|
|
193469
|
+
.rf-ctl-zoom { width: auto; min-width: 42px; padding: 0 4px; text-align: center; font: 600 11px var(--font-mono); color: var(--fg-2); }
|
|
193365
193470
|
.rf-ctl-sep { width: 1px; height: 16px; background: var(--line); margin: 0 3px; }
|
|
193366
193471
|
.react-flow__node { font-family: var(--font-mono); font-size: 11px; color: var(--fg-0); }
|
|
193367
193472
|
.react-flow__node-sysml, .react-flow__node-frame { background: transparent; border: none; padding: 0; border-radius: 0; box-shadow: none; }
|
|
@@ -196365,7 +196470,7 @@ async function runExport(command) {
|
|
|
196365
196470
|
}
|
|
196366
196471
|
|
|
196367
196472
|
// src/main.ts
|
|
196368
|
-
var VERSION2 = true ? "0.15.
|
|
196473
|
+
var VERSION2 = true ? "0.15.8" : "dev";
|
|
196369
196474
|
function display(file) {
|
|
196370
196475
|
const rel2 = path9.relative(process.cwd(), file);
|
|
196371
196476
|
return rel2 && !rel2.startsWith("..") ? rel2.split(path9.sep).join("/") : file;
|