pmx-canvas 0.10.0 → 0.12.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/.github/extensions/pmx-canvas/extension.mjs +3 -1
- package/.github/extensions/pmx-canvas/runtime.json +1 -1
- package/.github/extensions/pmx-canvas/tools.json +688 -128
- package/CHANGELOG.md +69 -0
- package/dist/amp-plugin/pmx-canvas/LICENSE +21 -0
- package/dist/amp-plugin/pmx-canvas/THIRD_PARTY_LICENSES.txt +331 -0
- package/dist/amp-plugin/pmx-canvas/index.js +5445 -0
- package/dist/amp-plugin/pmx-canvas/runtime.json +3 -0
- package/dist/amp-plugin/pmx-canvas/shared-runtime.mjs +194 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/SKILL.md +251 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/evals.json +1086 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/auth/jwt.ts +17 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/auth/login.ts +12 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/auth/middleware.ts +13 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/routes/auth.ts +13 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/investigation-board/src/handlers/users.ts +27 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/mcp.json +36 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/ax-html-control-surface.md +101 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/codex-app-adapter.md +151 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/excalidraw-diagram-authoring.md +150 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/full-reference.md +1785 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/github-copilot-app-adapter.md +223 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/html-primitives.md +139 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/importing-context.md +132 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/installing-pmx-canvas.md +251 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/tours-and-recording.md +111 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/workbench-workflows.md +900 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas-orchestration/SKILL.md +141 -0
- package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas-testing/SKILL.md +266 -0
- package/dist/amp-plugin/pmx-canvas/start-mcp.mjs +14857 -0
- package/dist/amp-plugin/pmx-canvas/tools.json +10963 -0
- package/dist/canvas/chunks/abnfDiagram-N423BO3Z-cwtsds5d.js +1 -0
- package/dist/canvas/chunks/architecture-TIHT7OUA-x63cwejs.js +1 -0
- package/dist/canvas/chunks/architectureDiagram-T3A2C74G-b4xc9tpz.js +36 -0
- package/dist/canvas/chunks/blockDiagram-VBNYF7ZC-ahp3yxxs.js +132 -0
- package/dist/canvas/chunks/c4Diagram-5PPSVZJV-nappnay7.js +10 -0
- package/dist/canvas/chunks/classDiagram-JCYQIIEL-k1j2xc1t.js +1 -0
- package/dist/canvas/chunks/classDiagram-v2-OCEON4UE-33x08xf2.js +1 -0
- package/dist/canvas/chunks/cose-bilkent-JH36ORCC-a428syda.js +1 -0
- package/dist/canvas/chunks/cynefin-VYW2F7L2-8v6jxfz8.js +1 -0
- package/dist/canvas/chunks/cynefinDiagram-MW4NZA55-nspsqebj.js +62 -0
- package/dist/canvas/chunks/dagre-VZM6K2ZE-8y6177fh.js +4 -0
- package/dist/canvas/chunks/diagram-7IWD3JNH-vym028wn.js +30 -0
- package/dist/canvas/chunks/diagram-B4RE2ZJO-jddqb8sy.js +3 -0
- package/dist/canvas/chunks/diagram-LBJQPF4R-bjwbpkrn.js +24 -0
- package/dist/canvas/chunks/diagram-Q27KOJAE-j6ph6hcx.js +24 -0
- package/dist/canvas/chunks/diagram-UB23O5K3-p09w8jej.js +41 -0
- package/dist/canvas/chunks/ebnfDiagram-BXEA7PRR-j975ycq5.js +1 -0
- package/dist/canvas/chunks/erDiagram-JOGREHBK-sxp6hjn8.js +85 -0
- package/dist/canvas/chunks/eventmodeling-45OFAUF4-xzfgn6xg.js +1 -0
- package/dist/canvas/chunks/flowDiagram-UKHOOZJN-2nsmkskb.js +1 -0
- package/dist/canvas/chunks/ganttDiagram-PKOTCBZU-4tv230y2.js +292 -0
- package/dist/canvas/chunks/gitGraph-TEB2WS4Q-macbhand.js +1 -0
- package/dist/canvas/chunks/gitGraphDiagram-DS77QQ5N-mqgmnw9g.js +106 -0
- package/dist/canvas/chunks/index-037z5dz2.js +232 -0
- package/dist/canvas/chunks/index-081n3har.js +207 -0
- package/dist/canvas/chunks/index-5n03dmb9.js +2 -0
- package/dist/canvas/chunks/index-5tv8v1hk.js +1 -0
- package/dist/canvas/chunks/index-60pgzdqe.js +157 -0
- package/dist/canvas/chunks/index-6ceya556.js +332 -0
- package/dist/canvas/chunks/index-8g1vb57n.js +2 -0
- package/dist/canvas/chunks/index-8rjes9r6.js +2 -0
- package/dist/canvas/chunks/index-9022d1n9.js +16 -0
- package/dist/canvas/chunks/index-9b02042t.js +2 -0
- package/dist/canvas/chunks/index-ap4q4vez.js +2 -0
- package/dist/canvas/chunks/index-dyp2nhd3.js +2 -0
- package/dist/canvas/chunks/index-frvta4tm.js +2 -0
- package/dist/canvas/chunks/index-gf4e0et4.js +2 -0
- package/dist/canvas/chunks/index-h9ycj8n2.js +2 -0
- package/dist/canvas/chunks/index-hj99nz1f.js +1 -0
- package/dist/canvas/chunks/index-mergmj97.js +2 -0
- package/dist/canvas/chunks/index-nwsya6dj.js +301 -0
- package/dist/canvas/chunks/index-nz8qbd1p.js +2 -0
- package/dist/canvas/chunks/index-qhfrazv3.js +2 -0
- package/dist/canvas/chunks/index-v119nznk.js +4 -0
- package/dist/canvas/chunks/index-vpt37m3d.js +89 -0
- package/dist/canvas/chunks/index-y9ma6azy.js +2 -0
- package/dist/canvas/chunks/index-zx0j3a2z.js +179 -0
- package/dist/canvas/chunks/info-DKCQHKI2-a0ykzs9z.js +1 -0
- package/dist/canvas/chunks/infoDiagram-6WML65LV-qv97qq6a.js +2 -0
- package/dist/canvas/chunks/ishikawaDiagram-WSZJBQD7-p9306gh0.js +70 -0
- package/dist/canvas/chunks/journeyDiagram-NVQOT4AX-sv67zats.js +139 -0
- package/dist/canvas/chunks/kanban-definition-27J2QSJJ-k2pfam6p.js +89 -0
- package/dist/canvas/chunks/katex-dmg8k4zm.js +257 -0
- package/dist/canvas/chunks/mermaid.core-83r0fdce.js +12 -0
- package/dist/canvas/chunks/mindmap-definition-FAOFIHXS-vg2newm1.js +96 -0
- package/dist/canvas/chunks/packet-7NZHBO7P-tqnabcdv.js +1 -0
- package/dist/canvas/chunks/pegDiagram-VL7TDLO6-k2h7zc5n.js +1 -0
- package/dist/canvas/chunks/pie-RZYD4A2V-wke6gyhe.js +1 -0
- package/dist/canvas/chunks/pieDiagram-7S7Q4E2Y-hg169p1v.js +39 -0
- package/dist/canvas/chunks/quadrantDiagram-CIZ2JOQS-bxtvsq0b.js +7 -0
- package/dist/canvas/chunks/radar-I7S5WNFK-w7ka0drw.js +1 -0
- package/dist/canvas/chunks/railroad-3IZDKUUU-y3vg318x.js +1 -0
- package/dist/canvas/chunks/railroad-abnf-AHOZXSZD-6hqvcz3c.js +1 -0
- package/dist/canvas/chunks/railroad-ebnf-EBAXGLYW-vcae260m.js +1 -0
- package/dist/canvas/chunks/railroad-peg-LSFZ7HO6-0dbyme23.js +1 -0
- package/dist/canvas/chunks/railroadDiagram-AXF67PYL-njyhcp4p.js +1 -0
- package/dist/canvas/chunks/requirementDiagram-LRYGKXZP-2z6v09gm.js +84 -0
- package/dist/canvas/chunks/sankeyDiagram-W5VNT64P-15mzam0e.js +40 -0
- package/dist/canvas/chunks/sequenceDiagram-SI44F4Z6-rbshyd2c.js +162 -0
- package/dist/canvas/chunks/sizeCapture-X5ZJPWSS-sg26xwts.js +1 -0
- package/dist/canvas/chunks/stateDiagram-OKZ733FA-6eahp98e.js +1 -0
- package/dist/canvas/chunks/stateDiagram-v2-UEYNNEHI-tty0ggn5.js +1 -0
- package/dist/canvas/chunks/swimlanes-SLNWSIFB-ze5db10t.js +1 -0
- package/dist/canvas/chunks/swimlanesDiagram-ULZ7WXOC-thze75gq.js +8 -0
- package/dist/canvas/chunks/timeline-definition-Z64GVDOM-vnp7jyy8.js +120 -0
- package/dist/canvas/chunks/treeView-QDETBFTQ-6ysffnm6.js +1 -0
- package/dist/canvas/chunks/treemap-6X3UGDF4-m3h9p066.js +1 -0
- package/dist/canvas/chunks/vennDiagram-T6HMQDX7-0qrnb7mj.js +34 -0
- package/dist/canvas/chunks/wardley-OPB4EBWU-dp37drwx.js +1 -0
- package/dist/canvas/chunks/wardleyDiagram-T6FBY63Y-8nxg8wqt.js +78 -0
- package/dist/canvas/chunks/xychartDiagram-ELKLHX3M-nj921e7s.js +7 -0
- package/dist/canvas/global.css +483 -230
- package/dist/canvas/index.js +158 -219
- package/dist/canvas/mcp-app.html +4301 -548
- package/dist/canvas/mermaid-entry.js +338 -338
- package/dist/canvas/surface-theme.css +6 -6
- package/dist/json-render/index.css +1 -1
- package/dist/json-render/index.js +49 -49
- package/dist/types/client/canvas/BarHint.d.ts +5 -3
- package/dist/types/client/canvas/BoardMoveDialog.d.ts +2 -0
- package/dist/types/client/canvas/CanvasNode.d.ts +0 -11
- package/dist/types/client/canvas/EdgeEditor.d.ts +19 -0
- package/dist/types/client/canvas/EdgeLayer.d.ts +1 -2
- package/dist/types/client/canvas/GroupNavigation.d.ts +2 -0
- package/dist/types/client/canvas/TextPrompt.d.ts +4 -0
- package/dist/types/client/canvas/auto-fit.d.ts +4 -5
- package/dist/types/client/mermaid-entry.d.ts +1 -2
- package/dist/types/client/mermaid-render.d.ts +1 -0
- package/dist/types/client/nodes/BoardNode.d.ts +1 -1
- package/dist/types/client/nodes/ExtAppFrame.d.ts +7 -90
- package/dist/types/client/nodes/McpAppNode.d.ts +1 -25
- package/dist/types/client/nodes/MermaidNode.d.ts +1 -8
- package/dist/types/client/nodes/PromptNode.d.ts +1 -0
- package/dist/types/client/nodes/ViewerFrame.d.ts +29 -0
- package/dist/types/client/nodes/ViewerHost.d.ts +6 -0
- package/dist/types/client/nodes/WorkCard.d.ts +7 -0
- package/dist/types/client/nodes/iframe-document-url.d.ts +3 -9
- package/dist/types/client/nodes/primitive-copy.d.ts +5 -0
- package/dist/types/client/nodes/use-ax-surface-bridge.d.ts +1 -0
- package/dist/types/client/nodes/use-iframe-content-height.d.ts +1 -1
- package/dist/types/client/nodes/use-surface-frame.d.ts +4 -6
- package/dist/types/client/nodes/viewer-runtime-state.d.ts +2 -1
- package/dist/types/client/state/canvas-store.d.ts +18 -1
- package/dist/types/client/state/human-store.d.ts +2 -0
- package/dist/types/client/state/intent-bridge.d.ts +5 -2
- package/dist/types/client/state/presentation.d.ts +17 -6
- package/dist/types/client/state/relation-store.d.ts +11 -0
- package/dist/types/client/types.d.ts +1 -1
- package/dist/types/json-render/catalog.d.ts +2 -2
- package/dist/types/json-render/server.d.ts +2 -1
- package/dist/types/server/agent-presence.d.ts +1 -0
- package/dist/types/server/ax-interaction.d.ts +1 -0
- package/dist/types/server/ax-state-manager.d.ts +10 -2
- package/dist/types/server/board-local.d.ts +4 -0
- package/dist/types/server/board-move.d.ts +38 -0
- package/dist/types/server/canvas-db.d.ts +12 -2
- package/dist/types/server/canvas-operations.d.ts +5 -6
- package/dist/types/server/canvas-provenance.d.ts +1 -1
- package/dist/types/server/canvas-serialization.d.ts +1 -0
- package/dist/types/server/canvas-state.d.ts +86 -20
- package/dist/types/server/card-relocation.d.ts +6 -0
- package/dist/types/server/context-reads.d.ts +3 -1
- package/dist/types/server/human-presence.d.ts +1 -1
- package/dist/types/server/index.d.ts +26 -10
- package/dist/types/server/intent-registry.d.ts +8 -4
- package/dist/types/server/knowledge-lifecycle.d.ts +4 -2
- package/dist/types/server/mutation-history.d.ts +7 -5
- package/dist/types/server/operations/ops/boards.d.ts +0 -1
- package/dist/types/server/operations/registry.d.ts +2 -0
- package/dist/types/server/tour-control.d.ts +13 -3
- package/dist/types/server/trace-manager.d.ts +1 -0
- package/dist/types/shared/ax-kinds.d.ts +6 -0
- package/dist/types/shared/ax-surface-protocol.d.ts +8 -9
- package/dist/types/shared/human-presence.d.ts +1 -0
- package/dist/types/shared/lifecycle-status.d.ts +2 -0
- package/dist/types/shared/tour.d.ts +8 -0
- package/docs/RELEASE.md +21 -14
- package/docs/agent-plugin.md +16 -2
- package/docs/amp-plugin.md +271 -0
- package/docs/cli.md +42 -3
- package/docs/design/Chrome.dc.html +32 -6
- package/docs/design/GuestName.dc.html +50 -0
- package/docs/design/PluginLogo.svg +7 -0
- package/docs/design/Types1.dc.html +3 -2
- package/docs/design/Types2.dc.html +1 -1
- package/docs/design/Types3.dc.html +1 -1
- package/docs/design/WorkCards.dc.html +39 -0
- package/docs/design/Zoom.dc.html +37 -60
- package/docs/design/canvas.json +17 -1
- package/docs/design/plugin-logo.png +0 -0
- package/docs/design.md +280 -12
- package/docs/evals/agents-md-sections.md +38 -0
- package/docs/http-api.md +179 -11
- package/docs/mcp.md +69 -9
- package/docs/node-types.md +109 -4
- package/docs/plans/plan-009-tech-debt-backlog.md +3 -3
- package/docs/plans/plan-019-post-0.9-roadmap.md +327 -31
- package/docs/plans/plan-020-wave-5-work-planning.md +553 -0
- package/docs/product-vision-2026-09.md +42 -17
- package/docs/sdk.md +18 -0
- package/package.json +7 -4
- package/plugins/pmx-canvas/assets/preview.png +0 -0
- package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/extension.mjs +3 -1
- package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/runtime.json +1 -1
- package/plugins/pmx-canvas/plugin.json +2 -2
- package/plugins/pmx-canvas/runtime.json +1 -1
- package/plugins/pmx-canvas/tools.json +688 -128
- package/skills/data-analysis/SKILL.md +13 -26
- package/skills/frontend-design/LICENSE.txt +177 -0
- package/skills/frontend-design/SKILL.md +3 -0
- package/skills/pmx-canvas/SKILL.md +232 -849
- package/skills/pmx-canvas/evals/evals.json +26 -3
- package/skills/pmx-canvas/references/full-reference.md +89 -24
- package/skills/pmx-canvas/references/html-primitives.md +7 -0
- package/skills/pmx-canvas/references/installing-pmx-canvas.md +6 -6
- package/skills/pmx-canvas/references/tours-and-recording.md +29 -2
- package/skills/pmx-canvas/references/workbench-workflows.md +900 -0
- package/skills/pmx-canvas-testing/SKILL.md +7 -5
- package/skills/published-consumer-e2e/SKILL.md +25 -8
- package/skills/published-consumer-e2e/scripts/run-published-consumer-e2e.sh +51 -77
- package/skills/web-artifacts-builder/LICENSE.txt +202 -0
- package/skills/web-artifacts-builder/SKILL.md +6 -0
- package/skills/web-artifacts-builder/scripts/init-artifact.sh +2 -2
- package/src/cli/commands/apps.ts +1 -0
- package/src/cli/commands/boards.ts +30 -0
- package/src/client/App.tsx +20 -4
- package/src/client/canvas/AttentionHistory.tsx +10 -2
- package/src/client/canvas/BarHint.tsx +6 -3
- package/src/client/canvas/BoardMoveDialog.tsx +225 -0
- package/src/client/canvas/CanvasNode.tsx +79 -49
- package/src/client/canvas/CanvasViewport.tsx +42 -14
- package/src/client/canvas/ContextMenu.tsx +97 -15
- package/src/client/canvas/EdgeEditor.tsx +149 -0
- package/src/client/canvas/EdgeLayer.tsx +441 -174
- package/src/client/canvas/ExpandedNodeOverlay.tsx +5 -2
- package/src/client/canvas/GroupNavigation.tsx +85 -0
- package/src/client/canvas/Presentation.tsx +53 -3
- package/src/client/canvas/RelationsPanel.tsx +9 -0
- package/src/client/canvas/SelectionBar.tsx +21 -0
- package/src/client/canvas/SessionPanel.tsx +35 -1
- package/src/client/canvas/TextPrompt.tsx +18 -1
- package/src/client/canvas/TopBar.tsx +54 -9
- package/src/client/canvas/auto-fit.ts +9 -11
- package/src/client/canvas/canvas-area.ts +2 -2
- package/src/client/canvas/use-focus-trap.ts +6 -1
- package/src/client/mermaid-entry.ts +6 -20
- package/src/client/mermaid-render.ts +39 -0
- package/src/client/nodes/AxStepControls.tsx +45 -69
- package/src/client/nodes/BoardNode.tsx +65 -9
- package/src/client/nodes/ContextNode.tsx +88 -396
- package/src/client/nodes/ExtAppFrame.tsx +302 -1465
- package/src/client/nodes/FileNode.tsx +92 -81
- package/src/client/nodes/HtmlNode.tsx +8 -36
- package/src/client/nodes/LedgerNode.tsx +31 -17
- package/src/client/nodes/MarkdownNode.tsx +14 -24
- package/src/client/nodes/McpAppNode.tsx +48 -154
- package/src/client/nodes/MermaidNode.tsx +80 -69
- package/src/client/nodes/PromptNode.tsx +44 -17
- package/src/client/nodes/ResponseNode.tsx +8 -6
- package/src/client/nodes/StatusNode.tsx +34 -7
- package/src/client/nodes/StatusSummary.tsx +16 -3
- package/src/client/nodes/TraceNode.tsx +8 -8
- package/src/client/nodes/ViewerFrame.tsx +273 -0
- package/src/client/nodes/ViewerHost.tsx +41 -0
- package/src/client/nodes/WebpageNode.tsx +22 -24
- package/src/client/nodes/WorkCard.tsx +175 -0
- package/src/client/nodes/iframe-document-url.ts +20 -27
- package/src/client/nodes/primitive-copy.ts +97 -0
- package/src/client/nodes/use-ax-surface-bridge.ts +18 -14
- package/src/client/nodes/use-iframe-content-height.ts +34 -10
- package/src/client/nodes/use-surface-frame.ts +22 -11
- package/src/client/nodes/viewer-runtime-state.ts +41 -35
- package/src/client/state/attention-bridge.ts +5 -0
- package/src/client/state/attention-store.ts +1 -0
- package/src/client/state/canvas-store.ts +202 -26
- package/src/client/state/human-store.ts +22 -2
- package/src/client/state/intent-bridge.ts +20 -5
- package/src/client/state/presentation.ts +135 -15
- package/src/client/state/relation-store.ts +127 -1
- package/src/client/state/sse-bridge.ts +18 -19
- package/src/client/theme/global.css +483 -230
- package/src/client/theme/surface-theme.css +6 -6
- package/src/client/types.ts +1 -0
- package/src/json-render/charts/tufte-components.tsx +44 -2
- package/src/json-render/renderer/index.css +62 -2
- package/src/json-render/renderer/index.tsx +31 -7
- package/src/json-render/server.ts +3 -2
- package/src/mcp/server.ts +13 -3
- package/src/server/agent-presence.ts +43 -23
- package/src/server/ax-flow-loop.ts +6 -0
- package/src/server/ax-gate-ttl.ts +8 -1
- package/src/server/ax-interaction.ts +16 -10
- package/src/server/ax-state-manager.ts +17 -4
- package/src/server/ax-wait.ts +20 -6
- package/src/server/board-export.ts +54 -30
- package/src/server/board-local.ts +20 -0
- package/src/server/board-move.ts +297 -0
- package/src/server/canvas-db.ts +249 -158
- package/src/server/canvas-geometry.ts +1 -0
- package/src/server/canvas-operations.ts +139 -109
- package/src/server/canvas-schema.ts +21 -0
- package/src/server/canvas-serialization.ts +2 -0
- package/src/server/canvas-state.ts +797 -159
- package/src/server/card-relocation.ts +53 -0
- package/src/server/code-graph.ts +4 -3
- package/src/server/context-reads.ts +83 -55
- package/src/server/demo-state.json +140 -114
- package/src/server/file-watcher.ts +30 -10
- package/src/server/html-primitives.ts +3 -9
- package/src/server/html-surface.ts +8 -0
- package/src/server/human-presence.ts +18 -5
- package/src/server/index.ts +54 -24
- package/src/server/intent-registry.ts +43 -5
- package/src/server/knowledge-lifecycle.ts +32 -9
- package/src/server/lifecycle-status.ts +29 -1
- package/src/server/mcp-app-runtime.ts +26 -7
- package/src/server/mutation-history.ts +37 -8
- package/src/server/operations/composites.ts +6 -3
- package/src/server/operations/mcp-contracts.ts +32 -2
- package/src/server/operations/mcp.ts +36 -9
- package/src/server/operations/ops/annotation.ts +22 -1
- package/src/server/operations/ops/ax-await.ts +1 -0
- package/src/server/operations/ops/ax-timeline.ts +28 -2
- package/src/server/operations/ops/batch.ts +25 -11
- package/src/server/operations/ops/boards.ts +45 -6
- package/src/server/operations/ops/nodes.ts +70 -0
- package/src/server/operations/ops/query.ts +32 -3
- package/src/server/operations/ops/snapshots.ts +1 -0
- package/src/server/operations/ops/viewport.ts +11 -9
- package/src/server/operations/registry.ts +49 -4
- package/src/server/server.ts +69 -75
- package/src/server/tour-control.ts +97 -12
- package/src/server/trace-manager.ts +4 -0
- package/src/server/web-artifacts/scripts/init-artifact.sh +2 -2
- package/src/shared/agent-context.ts +7 -1
- package/src/shared/auto-arrange.ts +5 -4
- package/src/shared/ax-kinds.ts +13 -0
- package/src/shared/ax-surface-protocol.ts +20 -9
- package/src/shared/content-height-reporter.ts +4 -3
- package/src/shared/human-presence.ts +1 -0
- package/src/shared/lifecycle-status.ts +2 -0
- package/src/shared/tour.ts +8 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import{vt}from"./index-8rjes9r6.js";import{R}from"./index-5n03dmb9.js";import{e,t,x,u,l,d,f,p,m,g,b,v,r,yr,n,Ci,E,h}from"./index-nwsya6dj.js";import"./index-v119nznk.js";import{D}from"./index-zx0j3a2z.js";var G={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Ce=x.gitGraph,J=e(()=>E({...Ce,...u().gitGraph}),"getConfig"),C=new vt(()=>{let a=J(),{mainBranchName:o,mainBranchOrder:s}=a;return{mainBranchName:o,commits:new Map,head:null,branchConfig:new Map([[o,{name:o,order:s}]]),branches:new Map([[o,null]]),currBranch:o,direction:"LR",seq:0,options:{}}});function ne(){return Ci({length:7})}e(ne,"getID");function pe(a,o){let s=Object.create(null);return a.reduce((y,w)=>{let k=o(w);if(!s[k])s[k]=!0,y.push(w);return y},[])}e(pe,"uniqBy");var ve=e(function(a){C.records.direction=a},"setDirection"),Ee=e(function(a){t.debug("options str",a),a=a?.trim(),a=a||"{}";try{C.records.options=JSON.parse(a)}catch(o){t.error("error while parsing gitGraph options",o.message)}},"setOptions"),Te=e(function(){return C.records.options},"getOptions"),Le=e(function(a){let{msg:o,id:s,type:y,tags:w}=a;t.info("commit",o,s,y,w),t.debug("Entering commit:",o,s,y,w);let k=J();s=l.sanitizeText(s,k),o=l.sanitizeText(o,k),w=w?.map((c)=>l.sanitizeText(c,k));let i={id:s?s:C.records.seq+"-"+ne(),message:o,seq:C.records.seq++,type:y??G.NORMAL,tags:w??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};if(C.records.head=i,t.info("main branch",k.mainBranchName),C.records.commits.has(i.id))t.warn(`Commit ID ${i.id} already exists`);C.records.commits.set(i.id,i),C.records.branches.set(C.records.currBranch,i.id),t.debug("in pushCommit "+i.id)},"commit"),Me=e(function(a){let{name:o,order:s}=a;if(o=l.sanitizeText(o,J()),C.records.branches.has(o))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${o}")`);C.records.branches.set(o,C.records.head!=null?C.records.head.id:null),C.records.branchConfig.set(o,{name:o,order:s}),ye(o),t.debug("in createBranch")},"branch"),Pe=e((a)=>{let{branch:o,id:s,type:y,tags:w}=a,k=J();if(o=l.sanitizeText(o,k),s)s=l.sanitizeText(s,k);let i=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(o),T=i?C.records.commits.get(i):void 0,M=c?C.records.commits.get(c):void 0;if(T&&M&&T.branch===o)throw Error(`Cannot merge branch '${o}' into itself.`);if(C.records.currBranch===o){let B=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw B.hash={text:`merge ${o}`,token:`merge ${o}`,expected:["branch abc"]},B}if(T===void 0||!T){let B=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw B.hash={text:`merge ${o}`,token:`merge ${o}`,expected:["commit"]},B}if(!C.records.branches.has(o)){let B=Error('Incorrect usage of "merge". Branch to be merged ('+o+") does not exist");throw B.hash={text:`merge ${o}`,token:`merge ${o}`,expected:[`branch ${o}`]},B}if(M===void 0||!M){let B=Error('Incorrect usage of "merge". Branch to be merged ('+o+") has no commits");throw B.hash={text:`merge ${o}`,token:`merge ${o}`,expected:['"commit"']},B}if(T===M){let B=Error('Incorrect usage of "merge". Both branches have same head');throw B.hash={text:`merge ${o}`,token:`merge ${o}`,expected:["branch abc"]},B}if(s&&C.records.commits.has(s)){let B=Error('Incorrect usage of "merge". Commit with id:'+s+" already exists, use different custom id");throw B.hash={text:`merge ${o} ${s} ${y} ${w?.join(" ")}`,token:`merge ${o} ${s} ${y} ${w?.join(" ")}`,expected:[`merge ${o} ${s}_UNIQUE ${y} ${w?.join(" ")}`]},B}let P=c?c:"",L={id:s||`${C.records.seq}-${ne()}`,message:`merged branch ${o} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,P],branch:C.records.currBranch,type:G.MERGE,customType:y,customId:s?!0:!1,tags:w??[]};C.records.head=L,C.records.commits.set(L.id,L),C.records.branches.set(C.records.currBranch,L.id),t.debug(C.records.branches),t.debug("in mergeBranch")},"merge"),Re=e(function(a){let{id:o,targetId:s,tags:y,parent:w}=a;t.debug("Entering cherryPick:",o,s,y);let k=J();if(o=l.sanitizeText(o,k),s=l.sanitizeText(s,k),y=y?.map((T)=>l.sanitizeText(T,k)),w=l.sanitizeText(w,k),!o||!C.records.commits.has(o)){let T=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw T.hash={text:`cherryPick ${o} ${s}`,token:`cherryPick ${o} ${s}`,expected:["cherry-pick abc"]},T}let i=C.records.commits.get(o);if(i===void 0||!i)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(w&&!(Array.isArray(i.parents)&&i.parents.includes(w)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let c=i.branch;if(i.type===G.MERGE&&!w)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!s||!C.records.commits.has(s)){if(c===C.records.currBranch){let L=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw L.hash={text:`cherryPick ${o} ${s}`,token:`cherryPick ${o} ${s}`,expected:["cherry-pick abc"]},L}let T=C.records.branches.get(C.records.currBranch);if(T===void 0||!T){let L=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw L.hash={text:`cherryPick ${o} ${s}`,token:`cherryPick ${o} ${s}`,expected:["cherry-pick abc"]},L}let M=C.records.commits.get(T);if(M===void 0||!M){let L=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw L.hash={text:`cherryPick ${o} ${s}`,token:`cherryPick ${o} ${s}`,expected:["cherry-pick abc"]},L}let P={id:C.records.seq+"-"+ne(),message:`cherry-picked ${i?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,i.id],branch:C.records.currBranch,type:G.CHERRY_PICK,tags:y?y.filter(Boolean):[`cherry-pick:${i.id}${i.type===G.MERGE?`|parent:${w}`:""}`]};C.records.head=P,C.records.commits.set(P.id,P),C.records.branches.set(C.records.currBranch,P.id),t.debug(C.records.branches),t.debug("in cherryPick")}},"cherryPick"),ye=e(function(a){if(a=l.sanitizeText(a,J()),!C.records.branches.has(a)){let o=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${a}")`);throw o.hash={text:`checkout ${a}`,token:`checkout ${a}`,expected:[`branch ${a}`]},o}else{C.records.currBranch=a;let o=C.records.branches.get(C.records.currBranch);if(o===void 0||!o)C.records.head=null;else C.records.head=C.records.commits.get(o)??null}},"checkout");function he(a,o,s){let y=a.indexOf(o);if(y===-1)a.push(s);else a.splice(y,1,s)}e(he,"upsert");function me(a){let o=a.reduce((w,k)=>{if(w.seq>k.seq)return w;return k},a[0]),s="";a.forEach(function(w){if(w===o)s+="\t*";else s+="\t|"});let y=[s,o.id,o.seq];for(let w in C.records.branches)if(C.records.branches.get(w)===o.id)y.push(w);if(t.debug(y.join(" ")),o.parents&&o.parents.length==2&&o.parents[0]&&o.parents[1]){let w=C.records.commits.get(o.parents[0]);if(he(a,o,w),o.parents[1])a.push(C.records.commits.get(o.parents[1]))}else if(o.parents.length==0)return;else if(o.parents[0]){let w=C.records.commits.get(o.parents[0]);he(a,o,w)}a=pe(a,(w)=>w.id),me(a)}e(me,"prettyPrintCommitHistory");var Oe=e(function(){t.debug(C.records.commits);let a=xe()[0];me([a])},"prettyPrint"),Ie=e(function(){C.reset(),d()},"clear"),_e=e(function(){return[...C.records.branchConfig.values()].map((o,s)=>{if(o.order!==null&&o.order!==void 0)return o;return{...o,order:parseFloat(`0.${s}`)}}).sort((o,s)=>(o.order??0)-(s.order??0)).map(({name:o})=>({name:o}))},"getBranchesAsObjArray"),Ge=e(function(){return C.records.branches},"getBranches"),De=e(function(){return C.records.commits},"getCommits"),xe=e(function(){let a=[...C.records.commits.values()];return a.forEach(function(o){t.debug(o.id)}),a.sort((o,s)=>o.seq-s.seq),a},"getCommitsArray"),We=e(function(){return C.records.currBranch},"getCurrentBranch"),qe=e(function(){return C.records.direction},"getDirection"),Ae=e(function(){return C.records.head},"getHead"),ue={commitType:G,getConfig:J,setDirection:ve,setOptions:Ee,getOptions:Te,commit:Le,branch:Me,merge:Pe,cherryPick:Re,checkout:ye,prettyPrint:Oe,clear:Ie,getBranchesAsObjArray:_e,getBranches:Ge,getCommits:De,getCommitsArray:xe,getCurrentBranch:We,getDirection:qe,getHead:Ae,setAccTitle:f,getAccTitle:p,getAccDescription:g,setAccDescription:m,setDiagramTitle:b,getDiagramTitle:v},He=e((a,o)=>{if(R(a,o),a.dir)o.setDirection(a.dir);for(let s of a.statements)Se(s,o)},"populate"),Se=e((a,o)=>{let y={Commit:e((w)=>o.commit(Ne(w)),"Commit"),Branch:e((w)=>o.branch(Fe(w)),"Branch"),Merge:e((w)=>o.merge(ze(w)),"Merge"),Checkout:e((w)=>o.checkout(Ye(w)),"Checkout"),CherryPicking:e((w)=>o.cherryPick(je(w)),"CherryPicking")}[a.$type];if(y)y(a);else t.error(`Unknown statement type: ${a.$type}`)},"parseStatement"),Ne=e((a)=>({id:a.id,msg:a.message??"",type:a.type!==void 0?G[a.type]:G.NORMAL,tags:a.tags??void 0}),"parseCommit"),Fe=e((a)=>({name:a.name,order:a.order??0}),"parseBranch"),ze=e((a)=>({branch:a.branch,id:a.id??"",type:a.type!==void 0?G[a.type]:void 0,tags:a.tags??void 0}),"parseMerge"),Ye=e((a)=>a.branch,"parseCheckout"),je=e((a)=>({id:a.id,targetId:"",tags:a.tags?.length===0?void 0:a.tags,parent:a.parent}),"parseCherryPicking"),Ke={parse:e(async(a)=>{let o=await D("gitGraph",a);t.debug(o),He(o,ue)},"parse")},U=10,V=40,z=4,j=2,Z=8,ce=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),le=12,ge=new Set(["redux-color","redux-dark-color"]),Ue=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),X=e((a,o,s=!1)=>{if(s&&a>0)return(a-1)%(o-1)+1;return a%o},"calcColorIndex"),S=new Map,N=new Map,oe=30,te=new Map,se=[],K=0,I="LR",Ve=e(()=>{S.clear(),N.clear(),te.clear(),K=0,se=[],I="LR"},"clear"),be=e((a)=>{let o=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof a==="string"?a.split(/\\n|\n|<br\s*\/?>/gi):a).forEach((y)=>{let w=document.createElementNS("http://www.w3.org/2000/svg","tspan");w.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),w.setAttribute("dy","1em"),w.setAttribute("x","0"),w.setAttribute("class","row"),w.textContent=y.trim(),o.appendChild(w)}),o},"drawText"),we=e((a)=>{let o,s,y;if(I==="BT")s=e((w,k)=>w<=k,"comparisonFunc"),y=1/0;else s=e((w,k)=>w>=k,"comparisonFunc"),y=0;return a.forEach((w)=>{let k=I==="TB"||I=="BT"?N.get(w)?.y:N.get(w)?.x;if(k!==void 0&&s(k,y))o=w,y=k}),o},"findClosestParent"),Ze=e((a)=>{let o="",s=1/0;return a.forEach((y)=>{let w=N.get(y).y;if(w<=s)o=y,s=w}),o||void 0},"findClosestParentBT"),Xe=e((a,o,s)=>{let y=s,w=s,k=[];a.forEach((i)=>{let c=o.get(i);if(!c)throw Error(`Commit not found for key ${i}`);if(c.parents.length)y=Qe(c),w=Math.max(y,w);else k.push(c);et(c,y)}),y=w,k.forEach((i)=>{tt(i,y,s)}),a.forEach((i)=>{let c=o.get(i);if(c?.parents.length){let T=Ze(c.parents);if(y=N.get(T).y-V,y<=w)w=y;let M=S.get(c.branch).pos,P=y-U;N.set(c.id,{x:M,y:P})}})},"setParallelBTPos"),Je=e((a)=>{let o=we(a.parents.filter((y)=>y!==null));if(!o)throw Error(`Closest parent not found for commit ${a.id}`);let s=N.get(o)?.y;if(s===void 0)throw Error(`Closest parent position not found for commit ${a.id}`);return s},"findClosestParentPos"),Qe=e((a)=>Je(a)+V,"calculateCommitPosition"),et=e((a,o)=>{let s=S.get(a.branch);if(!s)throw Error(`Branch not found for commit ${a.id}`);let y=s.pos,w=o+U;return N.set(a.id,{x:y,y:w}),{x:y,y:w}},"setCommitPosition"),tt=e((a,o,s)=>{let y=S.get(a.branch);if(!y)throw Error(`Branch not found for commit ${a.id}`);let w=o+s,k=y.pos;N.set(a.id,{x:k,y:w})},"setRootPosition"),rt=e((a,o,s,y,w,k)=>{let{theme:i}=r(),c=ce.has(i??""),T=ge.has(i??""),M=Ue.has(i??"");if(k===G.HIGHLIGHT)a.append("rect").attr("x",s.x-10+(c?3:0)).attr("y",s.y-10+(c?3:0)).attr("width",c?14:20).attr("height",c?14:20).attr("class",`commit ${o.id} commit-highlight${X(w,Z,T)} ${y}-outer`),a.append("rect").attr("x",s.x-6+(c?2:0)).attr("y",s.y-6+(c?2:0)).attr("width",c?8:12).attr("height",c?8:12).attr("class",`commit ${o.id} commit${X(w,Z,T)} ${y}-inner`);else if(k===G.CHERRY_PICK)a.append("circle").attr("cx",s.x).attr("cy",s.y).attr("r",c?7:10).attr("class",`commit ${o.id} ${y}`),a.append("circle").attr("cx",s.x-3).attr("cy",s.y+2).attr("r",c?2.5:2.75).attr("fill",M?"#000000":"#fff").attr("class",`commit ${o.id} ${y}`),a.append("circle").attr("cx",s.x+3).attr("cy",s.y+2).attr("r",c?2.5:2.75).attr("fill",M?"#000000":"#fff").attr("class",`commit ${o.id} ${y}`),a.append("line").attr("x1",s.x+3).attr("y1",s.y+1).attr("x2",s.x).attr("y2",s.y-5).attr("stroke",M?"#000000":"#fff").attr("class",`commit ${o.id} ${y}`),a.append("line").attr("x1",s.x-3).attr("y1",s.y+1).attr("x2",s.x).attr("y2",s.y-5).attr("stroke",M?"#000000":"#fff").attr("class",`commit ${o.id} ${y}`);else{let P=a.append("circle");if(P.attr("cx",s.x),P.attr("cy",s.y),P.attr("r",c?7:10),P.attr("class",`commit ${o.id} commit${X(w,Z,T)}`),k===G.MERGE){let L=a.append("circle");L.attr("cx",s.x),L.attr("cy",s.y),L.attr("r",c?5:6),L.attr("class",`commit ${y} ${o.id} commit${X(w,Z,T)}`)}if(k===G.REVERSE){let L=a.append("path"),B=c?4:5;L.attr("d",`M ${s.x-B},${s.y-B}L${s.x+B},${s.y+B}M${s.x-B},${s.y+B}L${s.x+B},${s.y-B}`).attr("class",`commit ${y} ${o.id} commit${X(w,Z,T)}`)}}},"drawCommitBullet"),at=e((a,o,s,y,w)=>{if(o.type!==G.CHERRY_PICK&&(o.customId&&o.type===G.MERGE||o.type!==G.MERGE)&&w.showCommitLabel){let k=a.append("g"),i=k.insert("rect").attr("class","commit-label-bkg"),c=k.append("text").attr("x",y).attr("y",s.y+25).attr("class","commit-label").text(o.id),T=c.node()?.getBBox();if(T){if(i.attr("x",s.posWithOffset-T.width/2-j).attr("y",s.y+13.5).attr("width",T.width+2*j).attr("height",T.height+2*j),I==="TB"||I==="BT")i.attr("x",s.x-(T.width+4*z+5)).attr("y",s.y-12),c.attr("x",s.x-(T.width+4*z)).attr("y",s.y+T.height-12);else c.attr("x",s.posWithOffset-T.width/2);if(w.rotateCommitLabel)if(I==="TB"||I==="BT")c.attr("transform","rotate(-45, "+s.x+", "+s.y+")"),i.attr("transform","rotate(-45, "+s.x+", "+s.y+")");else{let M=-7.5-(T.width+10)/25*9.5,P=10+T.width/25*8.5;k.attr("transform","translate("+M+", "+P+") rotate(-45, "+y+", "+s.y+")")}}}},"drawCommitLabel"),ot=e((a,o,s,y)=>{if(o.tags.length>0){let w=0,k=0,i=0,c=[];for(let T of o.tags.reverse()){let M=a.insert("polygon"),P=a.append("circle"),L=a.append("text").attr("y",s.y-16-w).attr("class","tag-label").text(T),B=L.node()?.getBBox();if(!B)throw Error("Tag bbox not found");k=Math.max(k,B.width),i=Math.max(i,B.height),L.attr("x",s.posWithOffset-B.width/2),c.push({tag:L,hole:P,rect:M,yOffset:w}),w+=20}for(let{tag:T,hole:M,rect:P,yOffset:L}of c){let B=i/2,_=s.y-19.2-L;if(P.attr("class","tag-label-bkg").attr("points",`
|
|
2
|
+
${y-k/2-z/2},${_+j}
|
|
3
|
+
${y-k/2-z/2},${_-j}
|
|
4
|
+
${s.posWithOffset-k/2-z},${_-B-j}
|
|
5
|
+
${s.posWithOffset+k/2+z},${_-B-j}
|
|
6
|
+
${s.posWithOffset+k/2+z},${_+B+j}
|
|
7
|
+
${s.posWithOffset-k/2-z},${_+B+j}`),M.attr("cy",_).attr("cx",y-k/2+z/2).attr("r",1.5).attr("class","tag-hole"),I==="TB"||I==="BT"){let O=y+L;P.attr("class","tag-label-bkg").attr("points",`
|
|
8
|
+
${s.x},${O+2}
|
|
9
|
+
${s.x},${O-2}
|
|
10
|
+
${s.x+U},${O-B-2}
|
|
11
|
+
${s.x+U+k+4},${O-B-2}
|
|
12
|
+
${s.x+U+k+4},${O+B+2}
|
|
13
|
+
${s.x+U},${O+B+2}`).attr("transform","translate(12,12) rotate(45, "+s.x+","+y+")"),M.attr("cx",s.x+z/2).attr("cy",O).attr("transform","translate(12,12) rotate(45, "+s.x+","+y+")"),T.attr("x",s.x+5).attr("y",O+3).attr("transform","translate(14,14) rotate(45, "+s.x+","+y+")")}}}},"drawCommitTags"),st=e((a)=>{switch(a.customType??a.type){case G.NORMAL:return"commit-normal";case G.REVERSE:return"commit-reverse";case G.HIGHLIGHT:return"commit-highlight";case G.MERGE:return"commit-merge";case G.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),nt=e((a,o,s,y)=>{let w={x:0,y:0};if(a.parents.length>0){let k=we(a.parents);if(k){let i=y.get(k)??w;if(o==="TB")return i.y+V;else if(o==="BT")return(y.get(a.id)??w).y-V;else return i.x+V}}else if(o==="TB")return oe;else if(o==="BT")return(y.get(a.id)??w).y-V;else return 0;return 0},"calculatePosition"),ct=e((a,o,s)=>{let y=I==="BT"&&s?o:o+U,w=S.get(a.branch)?.pos,k=I==="TB"||I==="BT"?S.get(a.branch)?.pos:y;if(k===void 0||w===void 0)throw Error(`Position were undefined for commit ${a.id}`);let i=ce.has(r().theme??""),c=I==="TB"||I==="BT"?y:w+(i?le/2+1:-2);return{x:k,y:c,posWithOffset:y}},"getCommitPosition"),$e=e((a,o,s,y)=>{let w=a.append("g").attr("class","commit-bullets"),k=a.append("g").attr("class","commit-labels"),i=I==="TB"||I==="BT"?oe:0,c=[...o.keys()],T=y.parallelCommits??!1,M=e((L,B)=>{let _=o.get(L)?.seq,O=o.get(B)?.seq;return _!==void 0&&O!==void 0?_-O:0},"sortKeys"),P=c.sort(M);if(I==="BT"){if(T)Xe(P,o,i);P=P.reverse()}P.forEach((L)=>{let B=o.get(L);if(!B)throw Error(`Commit not found for key ${L}`);if(T)i=nt(B,I,i,N);let _=ct(B,i,T);if(s){let O=st(B),W=B.customType??B.type,q=S.get(B.branch)?.index??0;rt(w,B,_,O,q,W),at(k,B,_,i,y),ot(k,B,_,i)}if(I==="TB"||I==="BT")N.set(B.id,{x:_.x,y:_.posWithOffset});else N.set(B.id,{x:_.posWithOffset,y:_.y});if(i=I==="BT"&&T?i+V:i+V+U,i>K)K=i})},"drawCommits"),it=e((a,o,s,y,w)=>{let i=(I==="TB"||I==="BT"?s.x<y.x:s.y<y.y)?o.branch:a.branch,c=e((M)=>M.branch===i,"isOnBranchToGetCurve"),T=e((M)=>M.seq>a.seq&&M.seq<o.seq,"isBetweenCommits");return[...w.values()].some((M)=>T(M)&&c(M))},"shouldRerouteArrow"),re=e((a,o,s=0)=>{let y=a+Math.abs(a-o)/2;if(s>5)return y;if(se.every((i)=>Math.abs(i-y)>=10))return se.push(y),y;let k=Math.abs(a-o);return re(a,o-k/5,s+1)},"findLane"),dt=e((a,o,s,y)=>{let{theme:w}=r(),k=ge.has(w??""),i=N.get(o.id),c=N.get(s.id);if(i===void 0||c===void 0)throw Error(`Commit positions not found for commits ${o.id} and ${s.id}`);let T=it(o,s,i,c,y),M="",P="",L=0,B=0,_=S.get(s.branch)?.index;if(s.type===G.MERGE&&o.id!==s.parents[0])_=S.get(o.branch)?.index;let O;if(T){M="A 10 10, 0, 0, 0,",P="A 10 10, 0, 0, 1,",L=10,B=10;let W=i.y<c.y?re(i.y,c.y):re(c.y,i.y),q=i.x<c.x?re(i.x,c.x):re(c.x,i.x);if(I==="TB")if(i.x<c.x)O=`M ${i.x} ${i.y} L ${q-L} ${i.y} ${P} ${q} ${i.y+B} L ${q} ${c.y-L} ${M} ${q+B} ${c.y} L ${c.x} ${c.y}`;else _=S.get(o.branch)?.index,O=`M ${i.x} ${i.y} L ${q+L} ${i.y} ${M} ${q} ${i.y+B} L ${q} ${c.y-L} ${P} ${q-B} ${c.y} L ${c.x} ${c.y}`;else if(I==="BT")if(i.x<c.x)O=`M ${i.x} ${i.y} L ${q-L} ${i.y} ${M} ${q} ${i.y-B} L ${q} ${c.y+L} ${P} ${q+B} ${c.y} L ${c.x} ${c.y}`;else _=S.get(o.branch)?.index,O=`M ${i.x} ${i.y} L ${q+L} ${i.y} ${P} ${q} ${i.y-B} L ${q} ${c.y+L} ${M} ${q-B} ${c.y} L ${c.x} ${c.y}`;else if(i.y<c.y)O=`M ${i.x} ${i.y} L ${i.x} ${W-L} ${M} ${i.x+B} ${W} L ${c.x-L} ${W} ${P} ${c.x} ${W+B} L ${c.x} ${c.y}`;else _=S.get(o.branch)?.index,O=`M ${i.x} ${i.y} L ${i.x} ${W+L} ${P} ${i.x+B} ${W} L ${c.x-L} ${W} ${M} ${c.x} ${W-B} L ${c.x} ${c.y}`}else if(M="A 20 20, 0, 0, 0,",P="A 20 20, 0, 0, 1,",L=20,B=20,I==="TB"){if(i.x<c.x)if(s.type===G.MERGE&&o.id!==s.parents[0])O=`M ${i.x} ${i.y} L ${i.x} ${c.y-L} ${M} ${i.x+B} ${c.y} L ${c.x} ${c.y}`;else O=`M ${i.x} ${i.y} L ${c.x-L} ${i.y} ${P} ${c.x} ${i.y+B} L ${c.x} ${c.y}`;if(i.x>c.x)if(M="A 20 20, 0, 0, 0,",P="A 20 20, 0, 0, 1,",L=20,B=20,s.type===G.MERGE&&o.id!==s.parents[0])O=`M ${i.x} ${i.y} L ${i.x} ${c.y-L} ${P} ${i.x-B} ${c.y} L ${c.x} ${c.y}`;else O=`M ${i.x} ${i.y} L ${c.x+L} ${i.y} ${M} ${c.x} ${i.y+B} L ${c.x} ${c.y}`;if(i.x===c.x)O=`M ${i.x} ${i.y} L ${c.x} ${c.y}`}else if(I==="BT"){if(i.x<c.x)if(s.type===G.MERGE&&o.id!==s.parents[0])O=`M ${i.x} ${i.y} L ${i.x} ${c.y+L} ${P} ${i.x+B} ${c.y} L ${c.x} ${c.y}`;else O=`M ${i.x} ${i.y} L ${c.x-L} ${i.y} ${M} ${c.x} ${i.y-B} L ${c.x} ${c.y}`;if(i.x>c.x)if(M="A 20 20, 0, 0, 0,",P="A 20 20, 0, 0, 1,",L=20,B=20,s.type===G.MERGE&&o.id!==s.parents[0])O=`M ${i.x} ${i.y} L ${i.x} ${c.y+L} ${M} ${i.x-B} ${c.y} L ${c.x} ${c.y}`;else O=`M ${i.x} ${i.y} L ${c.x+L} ${i.y} ${P} ${c.x} ${i.y-B} L ${c.x} ${c.y}`;if(i.x===c.x)O=`M ${i.x} ${i.y} L ${c.x} ${c.y}`}else{if(i.y<c.y)if(s.type===G.MERGE&&o.id!==s.parents[0])O=`M ${i.x} ${i.y} L ${c.x-L} ${i.y} ${P} ${c.x} ${i.y+B} L ${c.x} ${c.y}`;else O=`M ${i.x} ${i.y} L ${i.x} ${c.y-L} ${M} ${i.x+B} ${c.y} L ${c.x} ${c.y}`;if(i.y>c.y)if(s.type===G.MERGE&&o.id!==s.parents[0])O=`M ${i.x} ${i.y} L ${c.x-L} ${i.y} ${M} ${c.x} ${i.y-B} L ${c.x} ${c.y}`;else O=`M ${i.x} ${i.y} L ${i.x} ${c.y+L} ${P} ${i.x+B} ${c.y} L ${c.x} ${c.y}`;if(i.y===c.y)O=`M ${i.x} ${i.y} L ${c.x} ${c.y}`}if(O===void 0)throw Error("Line definition not found");a.append("path").attr("d",O).attr("class","arrow arrow"+X(_,Z,k))},"drawArrow"),ht=e((a,o)=>{let s=a.append("g").attr("class","commit-arrows");[...o.keys()].forEach((y)=>{let w=o.get(y);if(w.parents&&w.parents.length>0)w.parents.forEach((k)=>{dt(s,o.get(k),w,o)})})},"drawArrows"),lt=e((a,o,s,y)=>{let{look:w,theme:k,themeVariables:i}=r(),{dropShadow:c,THEME_COLOR_LIMIT:T}=i,M=ce.has(k??""),P=ge.has(k??""),L=a.append("g");o.forEach((B,_)=>{let O=X(_,M?T:Z,P),W=S.get(B.name)?.pos;if(W===void 0)throw Error(`Position not found for branch ${B.name}`);let q=I==="TB"||I==="BT"?W:M?W+le/2+1:W-2,A=L.append("line");if(A.attr("x1",0),A.attr("y1",q),A.attr("x2",K),A.attr("y2",q),A.attr("class","branch branch"+O),I==="TB")A.attr("y1",oe),A.attr("x1",W),A.attr("y2",K),A.attr("x2",W);else if(I==="BT")A.attr("y1",K),A.attr("x1",W),A.attr("y2",oe),A.attr("x2",W);se.push(q);let ie=B.name,ee=be(ie),F=L.insert("rect"),Y=L.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+O);Y.node().appendChild(ee);let H=ee.getBBox(),fe=M?0:4,ae=M?16:0,Q=M?le:0;if(w==="neo")F.attr("data-look","neo");if(F.attr("class","branchLabelBkg label"+O).attr("style",w==="neo"?`filter:${M?`url(#${y}-drop-shadow)`:c}`:"").attr("rx",fe).attr("ry",fe).attr("x",-H.width-4-(s.rotateCommitLabel===!0?30:0)).attr("y",-H.height/2+10).attr("width",H.width+18+ae).attr("height",H.height+4+Q),Y.attr("transform","translate("+(-H.width-14-(s.rotateCommitLabel===!0?30:0)+ae/2)+", "+(q-H.height/2-2)+")"),I==="TB"){if(F.attr("x",W-H.width/2-10).attr("y",0),Y.attr("transform","translate("+(W-H.width/2-5)+", 0)"),M)F.attr("transform",`translate(${-ae/2-3}, ${-Q-10})`),Y.attr("transform","translate("+(W-H.width/2-5)+", "+(-Q*2+7)+")")}else if(I==="BT"){if(F.attr("x",W-H.width/2-10).attr("y",K),Y.attr("transform","translate("+(W-H.width/2-5)+", "+K+")"),M)F.attr("transform",`translate(${-ae/2-3}, ${Q+10})`),Y.attr("transform","translate("+(W-H.width/2-5)+", "+(K+Q*2+4)+")")}else F.attr("transform","translate(-19, "+(q-12-Q/2)+")")})},"drawBranches"),mt=e(function(a,o,s,y,w){return S.set(a,{pos:o,index:s}),o+=50+(w?40:0)+(I==="TB"||I==="BT"?y.width/2:0),o},"setBranchPosition"),gt=e(function(a,o,s,y){Ve(),t.debug("in gitgraph renderer",a+`
|
|
14
|
+
`,"id:",o,s);let w=y.db;if(!w.getConfig){t.error("getConfig method is not available on db");return}let k=w.getConfig(),i=k.rotateCommitLabel??!1;te=w.getCommits();let c=w.getBranchesAsObjArray();I=w.getDirection();let T=n(`[id="${o}"]`),{look:M,theme:P,themeVariables:L}=r(),{useGradient:B,gradientStart:_,gradientStop:O,filterColor:W}=L;if(B){let A=T.append("defs").append("linearGradient").attr("id",o+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");A.append("stop").attr("offset","0%").attr("stop-color",_).attr("stop-opacity",1),A.append("stop").attr("offset","100%").attr("stop-color",O).attr("stop-opacity",1)}if(M==="neo"&&ce.has(P??""))T.append("defs").append("filter").attr("id",o+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",W);let q=0;if(c.forEach((A,ie)=>{let ee=be(A.name),F=T.append("g"),de=F.insert("g").attr("class","branchLabel"),Y=de.insert("g").attr("class","label branch-label");Y.node()?.appendChild(ee);let H=ee.getBBox();q=mt(A.name,q,ie,H,i),Y.remove(),de.remove(),F.remove()}),$e(T,te,!1,k),k.showBranches)lt(T,c,k,o);ht(T,te),$e(T,te,!0,k),h.insertTitle(T,"gitTitleText",k.titleTopMargin??0,w.getDiagramTitle()),yr(void 0,T,k.diagramPadding,k.useMaxWidth)},"draw"),ft={draw:gt},Be=8,ke=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),$t=new Set(["redux-color","redux-dark-color"]),pt=new Set(["neo","neo-dark"]),yt=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),xt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),ut=e((a)=>{let{svgId:o}=a,s="";if(a.useGradient&&o)for(let y=0;y<a.THEME_COLOR_LIMIT;y++)s+=`
|
|
15
|
+
.label${y} { fill: ${a.mainBkg}; stroke: url(${o}-gradient); stroke-width: ${a.strokeWidth};}
|
|
16
|
+
`;return s},"genGitGraphGradient"),bt=e((a)=>{let o=u(),{theme:s,themeVariables:y}=o,{borderColorArray:w}=y,k=ke.has(s);if(pt.has(s)){let i="";for(let c=0;c<a.THEME_COLOR_LIMIT;c++)if(c===0)i+=`
|
|
17
|
+
.branch-label${c} { fill: ${a.nodeBorder};}
|
|
18
|
+
.commit${c} { stroke: ${a.nodeBorder}; }
|
|
19
|
+
.commit-highlight${c} { stroke: ${a.nodeBorder}; fill: ${a.nodeBorder}; }
|
|
20
|
+
.arrow${c} { stroke: ${a.nodeBorder}; }
|
|
21
|
+
.commit-bullets { fill: ${a.nodeBorder}; }
|
|
22
|
+
.commit-cherry-pick${c} { stroke: ${a.nodeBorder}; }
|
|
23
|
+
${ut(a)}`;else{let T=c%Be;i+=`
|
|
24
|
+
.branch-label${c} { fill: ${a["gitBranchLabel"+T]}; }
|
|
25
|
+
.commit${c} { stroke: ${a["git"+T]}; fill: ${a["git"+T]}; }
|
|
26
|
+
.commit-highlight${c} { stroke: ${a["gitInv"+T]}; fill: ${a["gitInv"+T]}; }
|
|
27
|
+
.arrow${c} { stroke: ${a["git"+T]}; }
|
|
28
|
+
`}return i}else if(!$t.has(s)){let i="";for(let c=0;c<a.THEME_COLOR_LIMIT;c++)i+=`
|
|
29
|
+
.branch-label${c} { fill: ${a.nodeBorder}; ${k?`font-weight:${a.noteFontWeight}`:""} }
|
|
30
|
+
.commit${c} { stroke: ${a.nodeBorder}; }
|
|
31
|
+
.commit-highlight${c} { stroke: ${a.nodeBorder}; fill: ${a.nodeBorder}; }
|
|
32
|
+
.label${c} { fill: ${a.mainBkg}; stroke: ${a.nodeBorder}; stroke-width: ${a.strokeWidth}; ${k?`font-weight:${a.noteFontWeight}`:""}}
|
|
33
|
+
.arrow${c} { stroke: ${a.nodeBorder}; }
|
|
34
|
+
.commit-bullets { fill: ${a.nodeBorder}; }
|
|
35
|
+
.commit-cherry-pick${c} { stroke: ${a.nodeBorder}; }
|
|
36
|
+
`;return i}else{let i="";for(let c=0;c<a.THEME_COLOR_LIMIT;c++)if(c===0)i+=`
|
|
37
|
+
.branch-label${c} { fill: ${a.nodeBorder}; ${k?`font-weight:${a.noteFontWeight}`:""} }
|
|
38
|
+
.commit${c} { stroke: ${a.nodeBorder}; }
|
|
39
|
+
.commit-highlight${c} { stroke: ${a.nodeBorder}; fill: ${a.mainBkg}; }
|
|
40
|
+
.label${c} { fill: ${a.mainBkg}; stroke: ${a.nodeBorder}; stroke-width: ${a.strokeWidth}; ${k?`font-weight:${a.noteFontWeight}`:""} }
|
|
41
|
+
.arrow${c} { stroke: ${a.nodeBorder}; }
|
|
42
|
+
.commit-bullets { fill: ${a.nodeBorder}; }
|
|
43
|
+
`;else{let T=c%w.length;i+=`
|
|
44
|
+
.branch-label${c} { fill: ${a.nodeBorder}; ${k?`font-weight:${a.noteFontWeight}`:""} }
|
|
45
|
+
.commit${c} { stroke: ${w[T]}; fill: ${w[T]}; }
|
|
46
|
+
.commit-highlight${c} { stroke: ${w[T]}; fill: ${w[T]}; }
|
|
47
|
+
.label${c} { fill: ${yt.has(s)?a.mainBkg:w[T]}; stroke: ${w[T]}; stroke-width: ${a.strokeWidth}; }
|
|
48
|
+
.arrow${c} { stroke: ${w[T]}; }
|
|
49
|
+
`}return i}},"genColor"),wt=e((a)=>`${Array.from({length:a.THEME_COLOR_LIMIT},(o,s)=>s).map((o)=>{let s=o%Be;return`
|
|
50
|
+
.branch-label${o} { fill: ${a["gitBranchLabel"+s]}; }
|
|
51
|
+
.commit${o} { stroke: ${a["git"+s]}; fill: ${a["git"+s]}; }
|
|
52
|
+
.commit-highlight${o} { stroke: ${a["gitInv"+s]}; fill: ${a["gitInv"+s]}; }
|
|
53
|
+
.label${o} { fill: ${a["git"+s]}; }
|
|
54
|
+
.arrow${o} { stroke: ${a["git"+s]}; }
|
|
55
|
+
`}).join(`
|
|
56
|
+
`)}`,"normalTheme"),Bt=e((a)=>{let o=u(),{theme:s}=o,y=xt.has(s);return`
|
|
57
|
+
.commit-id,
|
|
58
|
+
.commit-msg,
|
|
59
|
+
.branch-label {
|
|
60
|
+
fill: lightgrey;
|
|
61
|
+
color: lightgrey;
|
|
62
|
+
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
63
|
+
font-family: var(--mermaid-font-family);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
${y?bt(a):wt(a)}
|
|
67
|
+
|
|
68
|
+
.branch {
|
|
69
|
+
stroke-width: ${a.strokeWidth};
|
|
70
|
+
stroke: ${a.commitLineColor??a.lineColor};
|
|
71
|
+
stroke-dasharray: ${y?"4 2":"2"};
|
|
72
|
+
}
|
|
73
|
+
.commit-label { font-size: ${a.commitLabelFontSize}; fill: ${y?a.nodeBorder:a.commitLabelColor}; ${y?`font-weight:${a.noteFontWeight};`:""}}
|
|
74
|
+
.commit-label-bkg { font-size: ${a.commitLabelFontSize}; fill: ${y?"transparent":a.commitLabelBackground}; opacity: ${y?"":0.5}; }
|
|
75
|
+
.tag-label { font-size: ${a.tagLabelFontSize}; fill: ${a.tagLabelColor};}
|
|
76
|
+
.tag-label-bkg { fill: ${y?a.mainBkg:a.tagLabelBackground}; stroke: ${y?a.nodeBorder:a.tagLabelBorder}; ${y?`filter:${a.dropShadow}`:""} }
|
|
77
|
+
.tag-hole { fill: ${a.textColor}; }
|
|
78
|
+
|
|
79
|
+
.commit-merge {
|
|
80
|
+
stroke: ${y?a.mainBkg:a.primaryColor};
|
|
81
|
+
fill: ${y?a.mainBkg:a.primaryColor};
|
|
82
|
+
}
|
|
83
|
+
.commit-reverse {
|
|
84
|
+
stroke: ${y?a.mainBkg:a.primaryColor};
|
|
85
|
+
fill: ${y?a.mainBkg:a.primaryColor};
|
|
86
|
+
stroke-width: ${y?a.strokeWidth:3};
|
|
87
|
+
}
|
|
88
|
+
.commit-highlight-outer {
|
|
89
|
+
}
|
|
90
|
+
.commit-highlight-inner {
|
|
91
|
+
stroke: ${y?a.mainBkg:a.primaryColor};
|
|
92
|
+
fill: ${y?a.mainBkg:a.primaryColor};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.arrow {
|
|
96
|
+
/* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */
|
|
97
|
+
stroke-width: ${ke.has(s)?a.strokeWidth:8};
|
|
98
|
+
stroke-linecap: round;
|
|
99
|
+
fill: none
|
|
100
|
+
}
|
|
101
|
+
.gitTitleText {
|
|
102
|
+
text-anchor: middle;
|
|
103
|
+
font-size: 18px;
|
|
104
|
+
fill: ${a.textColor};
|
|
105
|
+
}
|
|
106
|
+
`},"getStyles"),kt=Bt,It={parser:Ke,db:ue,renderer:ft,styles:kt};export{It as diagram};
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import{e,t,l,d,f,p,m,g,b,v,r,n,Ti,h,fe}from"./index-nwsya6dj.js";import{V}from"./index-v119nznk.js";import{It}from"./index-y9ma6azy.js";import{le}from"./index-h9ycj8n2.js";import{J}from"./index-nz8qbd1p.js";var Yt=function(){var s=e(function(tt,u,D,c){for(D=D||{},c=tt.length;c--;D[tt[c]]=u);return D},"o"),i=[1,2],T=[1,3],a=[1,4],E=[2,4],k=[1,9],C=[1,11],x=[1,16],y=[1,17],I=[1,18],O=[1,19],j=[1,33],G=[1,20],R=[1,21],_=[1,22],M=[1,23],U=[1,24],B=[1,26],K=[1,27],Y=[1,28],X=[1,29],W=[1,30],at=[1,31],yt=[1,32],gt=[1,35],Tt=[1,36],bt=[1,37],Et=[1,38],nt=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],mt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Mt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],wt={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(u,D,c,L,w,o,ot){var S=o.length-1;switch(w){case 3:return L.setRootDoc(o[S]),o[S];break;case 4:this.$=[];break;case 5:if(o[S]!="nl")o[S-1].push(o[S]),this.$=o[S-1];break;case 6:case 7:this.$=o[S];break;case 8:this.$="nl";break;case 12:this.$=o[S];break;case 13:let _t=o[S-1];_t.description=L.trimColon(o[S]),this.$=_t;break;case 14:this.$={stmt:"relation",state1:o[S-2],state2:o[S]};break;case 15:let Dt=L.trimColon(o[S]);this.$={stmt:"relation",state1:o[S-3],state2:o[S-1],description:Dt};break;case 19:this.$={stmt:"state",id:o[S-3],type:"default",description:"",doc:o[S-1]};break;case 20:var q=o[S],Q=o[S-2].trim();if(o[S].match(":")){var ut=o[S].split(":");q=ut[0],Q=[Q,ut[1]]}this.$={stmt:"state",id:q,type:"default",description:Q};break;case 21:this.$={stmt:"state",id:o[S-3],type:"default",description:o[S-5],doc:o[S-1]};break;case 22:this.$={stmt:"state",id:o[S],type:"fork"};break;case 23:this.$={stmt:"state",id:o[S],type:"join"};break;case 24:this.$={stmt:"state",id:o[S],type:"choice"};break;case 25:this.$={stmt:"state",id:L.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:o[S-1].trim(),note:{position:o[S-2].trim(),text:o[S].trim()}};break;case 29:this.$=o[S].trim(),L.setAccTitle(this.$);break;case 30:case 31:this.$=o[S].trim(),L.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:o[S-3],url:o[S-2],tooltip:o[S-1]};break;case 33:this.$={stmt:"click",id:o[S-3],url:o[S-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:o[S-1].trim(),classes:o[S].trim()};break;case 36:this.$={stmt:"style",id:o[S-1].trim(),styleClass:o[S].trim()};break;case 37:this.$={stmt:"applyClass",id:o[S-1].trim(),styleClass:o[S].trim()};break;case 38:L.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:L.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:L.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:L.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:o[S].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:o[S-2].trim(),classes:[o[S].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:o[S-2].trim(),classes:[o[S].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:i,5:T,6:a},{1:[3]},{3:5,4:i,5:T,6:a},{3:6,4:i,5:T,6:a},s([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],E,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:k,5:C,8:8,9:10,10:12,11:13,12:14,13:15,16:x,17:y,19:I,22:O,24:j,25:G,26:R,27:_,28:M,29:U,32:25,33:B,35:K,37:Y,38:X,41:W,45:at,48:yt,51:gt,52:Tt,53:bt,54:Et,57:nt},s(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:x,17:y,19:I,22:O,24:j,25:G,26:R,27:_,28:M,29:U,32:25,33:B,35:K,37:Y,38:X,41:W,45:at,48:yt,51:gt,52:Tt,53:bt,54:Et,57:nt},s(A,[2,7]),s(A,[2,8]),s(A,[2,9]),s(A,[2,10]),s(A,[2,11]),s(A,[2,12],{14:[1,40],15:[1,41]}),s(A,[2,16]),{18:[1,42]},s(A,[2,18],{20:[1,43]}),{23:[1,44]},s(A,[2,22]),s(A,[2,23]),s(A,[2,24]),s(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},s(A,[2,28]),{34:[1,49]},{36:[1,50]},s(A,[2,31]),{13:51,24:j,57:nt},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},s(mt,[2,44],{58:[1,56]}),s(mt,[2,45],{58:[1,57]}),s(A,[2,38]),s(A,[2,39]),s(A,[2,40]),s(A,[2,41]),s(A,[2,6]),s(A,[2,13]),{13:58,24:j,57:nt},s(A,[2,17]),s(Mt,E,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},s(A,[2,29]),s(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},s(A,[2,14],{14:[1,71]}),{4:k,5:C,8:8,9:10,10:12,11:13,12:14,13:15,16:x,17:y,19:I,21:[1,72],22:O,24:j,25:G,26:R,27:_,28:M,29:U,32:25,33:B,35:K,37:Y,38:X,41:W,45:at,48:yt,51:gt,52:Tt,53:bt,54:Et,57:nt},s(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},s(A,[2,34]),s(A,[2,35]),s(A,[2,36]),s(A,[2,37]),s(mt,[2,46]),s(mt,[2,47]),s(A,[2,15]),s(A,[2,19]),s(Mt,E,{7:78}),s(A,[2,26]),s(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:k,5:C,8:8,9:10,10:12,11:13,12:14,13:15,16:x,17:y,19:I,21:[1,81],22:O,24:j,25:G,26:R,27:_,28:M,29:U,32:25,33:B,35:K,37:Y,38:X,41:W,45:at,48:yt,51:gt,52:Tt,53:bt,54:Et,57:nt},s(A,[2,32]),s(A,[2,33]),s(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(u,D){if(D.recoverable)this.trace(u);else{var c=Error(u);throw c.hash=D,c}},"parseError"),parse:e(function(u){var D=this,c=[0],L=[],w=[null],o=[],ot=this.table,S="",q=0,Q=0,ut=0,_t=2,Dt=1,pe=o.slice.call(arguments,1),N=Object.create(this.lexer),it={yy:{}};for(var Ot in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Ot))it.yy[Ot]=this.yy[Ot];if(N.setInput(u,it.yy),it.yy.lexer=N,it.yy.parser=this,typeof N.yylloc>"u")N.yylloc={};var Nt=N.yylloc;o.push(Nt);var Se=N.options&&N.options.ranges;if(typeof it.yy.parseError==="function")this.parseError=it.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ye(z){c.length=c.length-2*z,w.length=w.length-z,o.length=o.length-z}e(ye,"popStack");function Ut(){var z=L.pop()||N.lex()||Dt;if(typeof z!=="number"){if(z instanceof Array)L=z,z=L.pop();z=D.symbols_[z]||z}return z}e(Ut,"lex");var F,Rt,rt,H,Me,$t,lt={},vt,Z,Wt,Ct;while(!0){if(rt=c[c.length-1],this.defaultActions[rt])H=this.defaultActions[rt];else{if(F===null||typeof F>"u")F=Ut();H=ot[rt]&&ot[rt][F]}if(typeof H>"u"||!H.length||!H[0]){var Ft="";Ct=[];for(vt in ot[rt])if(this.terminals_[vt]&&vt>_t)Ct.push("'"+this.terminals_[vt]+"'");if(N.showPosition)Ft="Parse error on line "+(q+1)+`:
|
|
2
|
+
`+N.showPosition()+`
|
|
3
|
+
Expecting `+Ct.join(", ")+", got '"+(this.terminals_[F]||F)+"'";else Ft="Parse error on line "+(q+1)+": Unexpected "+(F==Dt?"end of input":"'"+(this.terminals_[F]||F)+"'");this.parseError(Ft,{text:N.match,token:this.terminals_[F]||F,line:N.yylineno,loc:Nt,expected:Ct})}if(H[0]instanceof Array&&H.length>1)throw Error("Parse Error: multiple actions possible at state: "+rt+", token: "+F);switch(H[0]){case 1:if(c.push(F),w.push(N.yytext),o.push(N.yylloc),c.push(H[1]),F=null,!Rt){if(Q=N.yyleng,S=N.yytext,q=N.yylineno,Nt=N.yylloc,ut>0)ut--}else F=Rt,Rt=null;break;case 2:if(Z=this.productions_[H[1]][1],lt.$=w[w.length-Z],lt._$={first_line:o[o.length-(Z||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(Z||1)].first_column,last_column:o[o.length-1].last_column},Se)lt._$.range=[o[o.length-(Z||1)].range[0],o[o.length-1].range[1]];if($t=this.performAction.apply(lt,[S,Q,q,it.yy,H[1],w,o].concat(pe)),typeof $t<"u")return $t;if(Z)c=c.slice(0,-1*Z*2),w=w.slice(0,-1*Z),o=o.slice(0,-1*Z);c.push(this.productions_[H[1]][0]),w.push(lt.$),o.push(lt._$),Wt=ot[c[c.length-2]][c[c.length-1]],c.push(Wt);break;case 3:return!0}}return!0},"parse")},de=function(){var tt={EOF:1,parseError:e(function(D,c){if(this.yy.parser)this.yy.parser.parseError(D,c);else throw Error(D)},"parseError"),setInput:e(function(u,D){if(this.yy=D||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:e(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var D=u.match(/(?:\r\n?|\n).*/g);if(D)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),u},"input"),unput:e(function(u){var D=u.length,c=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-D),this.offset-=D;var L=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1)this.yylineno-=c.length-1;var w=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===L.length?this.yylloc.first_column:0)+L[L.length-c.length].length-c[0].length:this.yylloc.first_column-D},this.options.ranges)this.yylloc.range=[w[0],w[0]+this.yyleng-D];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(u){this.unput(this.match.slice(u))},"less"),pastInput:e(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var u=this.match;if(u.length<20)u+=this._input.substr(0,20-u.length);return(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var u=this.pastInput(),D=Array(u.length+1).join("-");return u+this.upcomingInput()+`
|
|
5
|
+
`+D+"^"},"showPosition"),test_match:e(function(u,D){var c,L,w;if(this.options.backtrack_lexer){if(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)w.yylloc.range=this.yylloc.range.slice(0)}if(L=u[0].match(/(?:\r\n?|\n).*/g),L)this.yylineno+=L.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],c=this.performAction.call(this,this.yy,this,D,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(c)return c;else if(this._backtrack){for(var o in w)this[o]=w[o];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var u,D,c,L;if(!this._more)this.yytext="",this.match="";var w=this._currentRules();for(var o=0;o<w.length;o++)if(c=this._input.match(this.rules[w[o]]),c&&(!D||c[0].length>D[0].length)){if(D=c,L=o,this.options.backtrack_lexer)if(u=this.test_match(c,w[o]),u!==!1)return u;else if(this._backtrack){D=!1;continue}else return!1;else if(!this.options.flex)break}if(D){if(u=this.test_match(D,w[L]),u!==!1)return u;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var D=this.next();if(D)return D;else return this.lex()},"lex"),begin:e(function(D){this.conditionStack.push(D)},"begin"),popState:e(function(){var D=this.conditionStack.length-1;if(D>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(D){if(D=this.conditionStack.length-1-Math.abs(D||0),D>=0)return this.conditionStack[D];else return"INITIAL"},"topState"),pushState:e(function(D){this.begin(D)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(D,c,L,w){function o(){let S=c.yytext.indexOf("%%");if(S===0)return!1;if(S>0){let q=c.yytext.slice(0,S),Q=c.yytext.slice(S);if(Q)D.lexer.unput(Q);c.yytext=q}return!0}e(o,"processId");var ot=w;switch(L){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),c.yytext=c.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),c.yytext=c.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!o())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+c.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!o())return;return this.popState(),"ID";break;case 66:if(!o())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),c.yytext=c.yytext.substr(2).trim(),31;break;case 68:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!o())return;return 24;case 74:return c.yytext=c.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return tt}();wt.lexer=de;function kt(){this.yy={}}return e(kt,"Parser"),kt.prototype=wt,wt.Parser=kt,new kt}();Yt.parser=Yt;var Rr=Yt,ge="TB",Qt="TB",jt="dir",ht="state",ct="root",Gt="relation",Te="classDef",be="style",Ee="applyClass",pt="default",Zt="divider",te="fill:none",ee="fill: #333",se="c",ie="markdown",re="normal",Pt="rect",Bt="rectWithTitle",me="stateStart",ke="stateEnd",Ht="divider",zt="roundedWithTitle",_e="note",De="noteGroup",St="statediagram",ve="state",Ce=`${St}-${ve}`,ae="transition",Ae="note",xe="note-edge",Le=`${ae} ${xe}`,Ie=`${St}-${Ae}`,we="cluster",Oe=`${St}-${we}`,Ne="cluster-alt",Re=`${St}-${Ne}`,ne="parent",oe="note",$e="state",Vt="----",Fe=`${Vt}${oe}`,Kt=`${Vt}${ne}`,ce=e((s,i=Qt)=>{if(!s.doc)return i;let T=i;for(let a of s.doc)if(a.stmt==="dir")T=a.value;return T},"getDir"),Pe=e(function(s,i){return i.db.getClasses()},"getClasses"),Be=e(async function(s,i,T,a){t.info("REF0:"),t.info("Drawing state diagram (v2)",i);let{securityLevel:E,state:k,layout:C}=r();a.db.extract(a.db.getRootDocV2());let x=a.db.getData(),y=le(i,E);if(x.type=a.type,x.layoutAlgorithm=C,x.nodeSpacing=k?.nodeSpacing||50,x.rankSpacing=k?.rankSpacing||50,r().look==="neo")x.markers=["barbNeo"];else x.markers=["barb"];x.diagramId=i,await fe(x,y);let O=8;try{(typeof a.db.getLinks==="function"?a.db.getLinks():new Map).forEach((G,R)=>{let _=typeof R==="string"?R:typeof R?.id==="string"?R.id:"",M=x.nodes.find((W)=>W.id===_);if(!_){t.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(R));return}let U=y.node()?.querySelectorAll("g.node, g.rough-node"),B;if(U?.forEach((W)=>{let at=W.textContent?.trim();if(W.id===M?.domId||at===_)B=W}),!B){t.warn("⚠️ Could not find node matching text:",_);return}let K=B.parentNode;if(!K){t.warn("⚠️ Node has no parent, cannot wrap:",_);return}let Y=document.createElementNS("http://www.w3.org/2000/svg","a"),X=G.url.replace(/^"+|"+$/g,"");if(Y.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",X),Y.setAttribute("target","_blank"),G.tooltip){let W=G.tooltip.replace(/^"+|"+$/g,"");Y.setAttribute("title",W),B.setAttribute("title",W)}K.replaceChild(Y,B),Y.appendChild(B),t.info("\uD83D\uDD17 Wrapped node in <a> tag for:",_,G.url)})}catch(j){t.error("❌ Error injecting clickable links:",j)}h.insertTitle(y,"statediagramTitleText",k?.titleTopMargin??25,a.db.getDiagramTitle()),J(y,O,St,k?.useMaxWidth??!0)},"draw"),Ri={getClasses:Pe,draw:Be,getDir:ce},xt=new Map,st=0;function Lt(s="",i=0,T="",a=Vt){let E=T!==null&&T.length>0?`${a}${T}`:"";return`${$e}-${s}${E}-${i}`}e(Lt,"stateDomId");var Ye=e((s,i,T,a,E,k,C,x)=>{t.trace("items",i),i.forEach((y)=>{switch(y.stmt){case ht:ft(s,y,T,a,E,k,C,x);break;case pt:ft(s,y,T,a,E,k,C,x);break;case Gt:{ft(s,y.state1,T,a,E,k,C,x),ft(s,y.state2,T,a,E,k,C,x);let I=C==="neo",O={id:"edge"+st,start:y.state1.id,end:y.state2.id,arrowhead:"normal",arrowTypeEnd:I?"arrow_barb_neo":"arrow_barb",style:te,labelStyle:"",label:l.sanitizeText(y.description??"",r()),arrowheadStyle:ee,labelpos:se,labelType:ie,thickness:re,classes:ae,look:C};E.push(O),st++}break}})},"setupDoc"),Xt=e((s,i=Qt)=>{let T=i;if(s.doc){for(let a of s.doc)if(a.stmt==="dir")T=a.value}return T},"getDir");function dt(s,i,T){if(!i.id||i.id==="</join></fork>"||i.id==="</choice>")return;if(i.cssClasses){if(!Array.isArray(i.cssCompiledStyles))i.cssCompiledStyles=[];i.cssClasses.split(" ").forEach((E)=>{let k=T.get(E);if(k)i.cssCompiledStyles=[...i.cssCompiledStyles??[],...k.styles]})}let a=s.find((E)=>E.id===i.id);if(a)Object.assign(a,i);else s.push(i)}e(dt,"insertOrUpdateNode");function he(s){return s?.classes?.join(" ")??""}e(he,"getClassesFromDbInfo");function ue(s){return s?.styles??[]}e(ue,"getStylesFromDbInfo");var ft=e((s,i,T,a,E,k,C,x)=>{let y=i.id,I=T.get(y),O=he(I),j=ue(I),G=r();if(t.info("dataFetcher parsedItem",i,I,j),y!=="root"){let R=Pt;if(i.start===!0)R=me;else if(i.start===!1)R=ke;if(i.type!==pt)R=i.type;if(!xt.get(y))xt.set(y,{id:y,shape:R,description:l.sanitizeText(y,G),cssClasses:`${O} ${Ce}`,cssStyles:j});let _=xt.get(y);if(i.description){if(Array.isArray(_.description))_.shape=Bt,_.description.push(i.description);else if(_.description?.length&&_.description.length>0)if(_.shape=Bt,_.description===y)_.description=[i.description];else _.description=[_.description,i.description];else _.shape=Pt,_.description=i.description;_.description=l.sanitizeTextOrArray(_.description,G)}if(_.description?.length===1&&_.shape===Bt)if(_.type==="group")_.shape=zt;else _.shape=Pt;if(!_.type&&i.doc)t.info("Setting cluster for XCX",y,Xt(i)),_.type="group",_.isGroup=!0,_.dir=Xt(i),_.explicitDir=i.doc.some((U)=>U.stmt==="dir"),_.shape=i.type===Zt?Ht:zt,_.cssClasses=`${_.cssClasses} ${Oe} ${k?Re:""}`;let M={labelStyle:"",shape:_.shape,label:_.description,cssClasses:_.cssClasses,cssCompiledStyles:[],cssStyles:_.cssStyles,id:y,dir:_.dir,domId:Lt(y,st),type:_.type,isGroup:_.type==="group",padding:8,rx:10,ry:10,look:C,labelType:"markdown"};if(M.shape===Ht)M.label="";if(s&&s.id!=="root")t.trace("Setting node ",y," to be child of its parent ",s.id),M.parentId=s.id;if(M.centerLabel=!0,i.note){let U={labelStyle:"",shape:_e,label:i.note.text,labelType:"markdown",cssClasses:Ie,cssStyles:[],cssCompiledStyles:[],id:y+Fe+"-"+st,domId:Lt(y,st,oe),type:_.type,isGroup:_.type==="group",padding:G.flowchart?.padding,look:C,position:i.note.position},B=y+Kt,K={labelStyle:"",shape:De,label:i.note.text,cssClasses:_.cssClasses,cssStyles:[],id:y+Kt,domId:Lt(y,st,ne),type:"group",isGroup:!0,padding:16,look:C,position:i.note.position};st++,K.id=B,U.parentId=B,dt(a,K,x),dt(a,U,x),dt(a,M,x);let Y=y,X=U.id;if(i.note.position==="left of")Y=U.id,X=y;E.push({id:Y+"-"+X,start:Y,end:X,arrowhead:"none",arrowTypeEnd:"",style:te,labelStyle:"",classes:Le,arrowheadStyle:ee,labelpos:se,labelType:ie,thickness:re,look:C})}else dt(a,M,x)}if(i.doc)t.trace("Adding nodes children "),Ye(i,i.doc,T,a,E,!k,C,x)},"dataFetcher"),Ge=e(()=>{xt.clear(),st=0},"reset"),P={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Jt=e(()=>new Map,"newClassesList"),qt=e(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),At=e((s)=>JSON.parse(JSON.stringify(s)),"clone"),et=class{constructor(s){this.version=s,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Jt(),this.documents={root:qt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=p,this.setAccTitle=f,this.getAccDescription=g,this.setAccDescription=m,this.setDiagramTitle=b,this.getDiagramTitle=v,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{e(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(s){this.clear(!0);for(let a of Array.isArray(s)?s:s.doc)switch(a.stmt){case ht:this.addState(a.id.trim(),a.type,a.doc,a.description,a.note);break;case Gt:this.addRelation(a.state1,a.state2,a.description);break;case Te:this.addStyleClass(a.id.trim(),a.classes);break;case be:this.handleStyleDef(a);break;case Ee:this.setCssClass(a.id.trim(),a.styleClass);break;case"click":this.addLink(a.id,a.url,a.tooltip);break}let i=this.getStates(),T=r();Ge(),ft(void 0,this.getRootDocV2(),i,this.nodes,this.edges,!0,T.look,this.classes);for(let a of this.nodes){if(!Array.isArray(a.label))continue;if(a.description=a.label.slice(1),a.isGroup&&a.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${a.id}]`);a.label=a.label[0]}}handleStyleDef(s){let i=s.id.trim().split(","),T=s.styleClass.split(",");for(let a of i){let E=this.getState(a);if(!E){let k=a.trim();this.addState(k),E=this.getState(k)}if(E)E.styles=T.map((k)=>k.replace(/;/g,"")?.trim())}}setRootDoc(s){if(t.info("Setting root doc",s),this.rootDoc=s,this.version===1)this.extract(s);else this.extract(this.getRootDocV2())}docTranslator(s,i,T){if(i.stmt===Gt){this.docTranslator(s,i.state1,!0),this.docTranslator(s,i.state2,!1);return}if(i.stmt===ht)if(i.id===P.START_NODE)i.id=s.id+(T?"_start":"_end"),i.start=T;else i.id=i.id.trim();if(i.stmt!==ct&&i.stmt!==ht||!i.doc)return;let a=[],E=[];for(let k of i.doc)if(k.type===Zt){let C=At(k);C.doc=At(E),a.push(C),E=[]}else E.push(k);if(a.length>0&&E.length>0){let k={stmt:ht,id:Ti(),type:"divider",doc:At(E)};a.push(At(k)),i.doc=a}i.doc.forEach((k)=>this.docTranslator(i,k,!0))}getRootDocV2(){return this.docTranslator({id:ct,stmt:ct},{id:ct,stmt:ct,doc:this.rootDoc},!0),{id:ct,doc:this.rootDoc}}addState(s,i=pt,T=void 0,a=void 0,E=void 0,k=void 0,C=void 0,x=void 0){let y=s?.trim();if(!this.currentDocument.states.has(y))t.info("Adding state ",y,a),this.currentDocument.states.set(y,{stmt:ht,id:y,descriptions:[],type:i,doc:T,note:E,classes:[],styles:[],textStyles:[]});else{let I=this.currentDocument.states.get(y);if(!I)throw Error(`State not found: ${y}`);if(!I.doc)I.doc=T;if(!I.type)I.type=i}if(a)t.info("Setting state description",y,a),(Array.isArray(a)?a:[a]).forEach((O)=>this.addDescription(y,O.trim()));if(E){let I=this.currentDocument.states.get(y);if(!I)throw Error(`State not found: ${y}`);I.note=E,I.note.text=l.sanitizeText(I.note.text,r())}if(k)t.info("Setting state classes",y,k),(Array.isArray(k)?k:[k]).forEach((O)=>this.setCssClass(y,O.trim()));if(C)t.info("Setting state styles",y,C),(Array.isArray(C)?C:[C]).forEach((O)=>this.setStyle(y,O.trim()));if(x)t.info("Setting state styles",y,C),(Array.isArray(x)?x:[x]).forEach((O)=>this.setTextStyle(y,O.trim()))}clear(s){if(this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:qt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Jt(),!s)this.links=new Map,d()}getState(s){return this.currentDocument.states.get(s)}getStates(){return this.currentDocument.states}logDocuments(){t.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(s,i,T){this.links.set(s,{url:i,tooltip:T}),t.warn("Adding link",s,i,T)}getLinks(){return this.links}startIdIfNeeded(s=""){if(s===P.START_NODE)return this.startEndCount++,`${P.START_TYPE}${this.startEndCount}`;return s}startTypeIfNeeded(s="",i=pt){return s===P.START_NODE?P.START_TYPE:i}endIdIfNeeded(s=""){if(s===P.END_NODE)return this.startEndCount++,`${P.END_TYPE}${this.startEndCount}`;return s}endTypeIfNeeded(s="",i=pt){return s===P.END_NODE?P.END_TYPE:i}addRelationObjs(s,i,T=""){let a=this.startIdIfNeeded(s.id.trim()),E=this.startTypeIfNeeded(s.id.trim(),s.type),k=this.startIdIfNeeded(i.id.trim()),C=this.startTypeIfNeeded(i.id.trim(),i.type);this.addState(a,E,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.addState(k,C,i.doc,i.description,i.note,i.classes,i.styles,i.textStyles),this.currentDocument.relations.push({id1:a,id2:k,relationTitle:l.sanitizeText(T,r())})}addRelation(s,i,T){if(typeof s==="object"&&typeof i==="object")this.addRelationObjs(s,i,T);else if(typeof s==="string"&&typeof i==="string"){let a=this.startIdIfNeeded(s.trim()),E=this.startTypeIfNeeded(s),k=this.endIdIfNeeded(i.trim()),C=this.endTypeIfNeeded(i);this.addState(a,E),this.addState(k,C),this.currentDocument.relations.push({id1:a,id2:k,relationTitle:T?l.sanitizeText(T,r()):void 0})}}addDescription(s,i){let T=this.currentDocument.states.get(s),a=i.startsWith(":")?i.replace(":","").trim():i;T?.descriptions?.push(l.sanitizeText(a,r()))}cleanupLabel(s){return s.startsWith(":")?s.slice(2).trim():s.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(s,i=""){if(!this.classes.has(s))this.classes.set(s,{id:s,styles:[],textStyles:[]});let T=this.classes.get(s);if(i&&T)i.split(P.STYLECLASS_SEP).forEach((a)=>{let E=a.replace(/([^;]*);/,"$1").trim();if(RegExp(P.COLOR_KEYWORD).exec(a)){let C=E.replace(P.FILL_KEYWORD,P.BG_FILL).replace(P.COLOR_KEYWORD,P.FILL_KEYWORD);T.textStyles.push(C)}T.styles.push(E)})}getClasses(){return this.classes}setupToolTips(s){let i=It();n(s).select("svg").selectAll("g.node, g.rough-node").on("mouseover",(E)=>{let k=n(E.currentTarget),C=k.attr("title");if(C===null)return;let x=E.currentTarget?.getBoundingClientRect();i.transition().duration(200).style("opacity",".9"),i.style("left",window.scrollX+x.left+(x.right-x.left)/2+"px").style("top",window.scrollY+x.bottom+"px"),i.html(V.sanitize(C)),k.classed("hover",!0)}).on("mouseout",(E)=>{i.transition().duration(500).style("opacity",0),n(E.currentTarget).classed("hover",!1)})}setCssClass(s,i){s.split(",").forEach((T)=>{let a=this.getState(T);if(!a){let E=T.trim();this.addState(E),a=this.getState(E)}a?.classes?.push(i)})}setStyle(s,i){this.getState(s)?.styles?.push(i)}setTextStyle(s,i){this.getState(s)?.textStyles?.push(i)}bindFunctions(s){this.funs.forEach((i)=>{i(s)})}getDirectionStatement(){return this.rootDoc.find((s)=>s.stmt===jt)}getDirection(){return this.getDirectionStatement()?.value??ge}setDirection(s){let i=this.getDirectionStatement();if(i)i.value=s;else this.rootDoc.unshift({stmt:jt,value:s})}trimColon(s){return s.startsWith(":")?s.slice(1).trim():s.trim()}getData(){let s=r();return{nodes:this.nodes,edges:this.edges,other:{},config:s,direction:ce(this.getRootDocV2())}}getConfig(){return r().state}},Ve=e((s)=>`
|
|
7
|
+
defs [id$="-barbEnd"] {
|
|
8
|
+
fill: ${s.transitionColor};
|
|
9
|
+
stroke: ${s.transitionColor};
|
|
10
|
+
}
|
|
11
|
+
g.stateGroup text {
|
|
12
|
+
fill: ${s.nodeBorder};
|
|
13
|
+
stroke: none;
|
|
14
|
+
font-size: 10px;
|
|
15
|
+
}
|
|
16
|
+
g.stateGroup text {
|
|
17
|
+
fill: ${s.textColor};
|
|
18
|
+
stroke: none;
|
|
19
|
+
font-size: 10px;
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
g.stateGroup .state-title {
|
|
23
|
+
font-weight: bolder;
|
|
24
|
+
fill: ${s.stateLabelColor};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
g.stateGroup rect {
|
|
28
|
+
fill: ${s.mainBkg};
|
|
29
|
+
stroke: ${s.nodeBorder};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
g.stateGroup line {
|
|
33
|
+
stroke: ${s.lineColor};
|
|
34
|
+
stroke-width: ${s.strokeWidth||1};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.transition {
|
|
38
|
+
stroke: ${s.transitionColor};
|
|
39
|
+
stroke-width: ${s.strokeWidth||1};
|
|
40
|
+
fill: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.stateGroup .composit {
|
|
44
|
+
fill: ${s.background};
|
|
45
|
+
border-bottom: 1px
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.stateGroup .alt-composit {
|
|
49
|
+
fill: #e0e0e0;
|
|
50
|
+
border-bottom: 1px
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.state-note {
|
|
54
|
+
stroke: ${s.noteBorderColor};
|
|
55
|
+
fill: ${s.noteBkgColor};
|
|
56
|
+
|
|
57
|
+
text {
|
|
58
|
+
fill: ${s.noteTextColor};
|
|
59
|
+
stroke: none;
|
|
60
|
+
font-size: 10px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.stateLabel .box {
|
|
65
|
+
stroke: none;
|
|
66
|
+
stroke-width: 0;
|
|
67
|
+
fill: ${s.mainBkg};
|
|
68
|
+
opacity: 0.5;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.edgeLabel .label rect {
|
|
72
|
+
fill: ${s.labelBackgroundColor};
|
|
73
|
+
opacity: 0.5;
|
|
74
|
+
}
|
|
75
|
+
.edgeLabel {
|
|
76
|
+
background-color: ${s.edgeLabelBackground};
|
|
77
|
+
p {
|
|
78
|
+
background-color: ${s.edgeLabelBackground};
|
|
79
|
+
}
|
|
80
|
+
rect {
|
|
81
|
+
opacity: 0.5;
|
|
82
|
+
background-color: ${s.edgeLabelBackground};
|
|
83
|
+
fill: ${s.edgeLabelBackground};
|
|
84
|
+
}
|
|
85
|
+
text-align: center;
|
|
86
|
+
}
|
|
87
|
+
.edgeLabel .label text {
|
|
88
|
+
fill: ${s.transitionLabelColor||s.tertiaryTextColor};
|
|
89
|
+
}
|
|
90
|
+
.label div .edgeLabel {
|
|
91
|
+
color: ${s.transitionLabelColor||s.tertiaryTextColor};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.stateLabel text {
|
|
95
|
+
fill: ${s.stateLabelColor};
|
|
96
|
+
font-size: 10px;
|
|
97
|
+
font-weight: bold;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.node circle.state-start {
|
|
101
|
+
fill: ${s.specialStateColor};
|
|
102
|
+
stroke: ${s.specialStateColor};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.node .fork-join {
|
|
106
|
+
fill: ${s.specialStateColor};
|
|
107
|
+
stroke: ${s.specialStateColor};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.node circle.state-end {
|
|
111
|
+
fill: ${s.innerEndBackground};
|
|
112
|
+
stroke: ${s.background};
|
|
113
|
+
stroke-width: 1.5
|
|
114
|
+
}
|
|
115
|
+
.end-state-inner {
|
|
116
|
+
fill: ${s.compositeBackground||s.background};
|
|
117
|
+
// stroke: ${s.background};
|
|
118
|
+
stroke-width: 1.5
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.node rect {
|
|
122
|
+
fill: ${s.stateBkg||s.mainBkg};
|
|
123
|
+
stroke: ${s.stateBorder||s.nodeBorder};
|
|
124
|
+
stroke-width: ${s.strokeWidth||1}px;
|
|
125
|
+
}
|
|
126
|
+
.node polygon {
|
|
127
|
+
fill: ${s.mainBkg};
|
|
128
|
+
stroke: ${s.stateBorder||s.nodeBorder};;
|
|
129
|
+
stroke-width: ${s.strokeWidth||1}px;
|
|
130
|
+
}
|
|
131
|
+
[id$="-barbEnd"] {
|
|
132
|
+
fill: ${s.lineColor};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.statediagram-cluster rect {
|
|
136
|
+
fill: ${s.compositeTitleBackground};
|
|
137
|
+
stroke: ${s.stateBorder||s.nodeBorder};
|
|
138
|
+
stroke-width: ${s.strokeWidth||1}px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.cluster-label, .nodeLabel {
|
|
142
|
+
color: ${s.stateLabelColor};
|
|
143
|
+
// line-height: 1;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.statediagram-cluster rect.outer {
|
|
147
|
+
rx: 5px;
|
|
148
|
+
ry: 5px;
|
|
149
|
+
}
|
|
150
|
+
.statediagram-state .divider {
|
|
151
|
+
stroke: ${s.stateBorder||s.nodeBorder};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.statediagram-state .title-state {
|
|
155
|
+
rx: 5px;
|
|
156
|
+
ry: 5px;
|
|
157
|
+
}
|
|
158
|
+
.statediagram-cluster.statediagram-cluster .inner {
|
|
159
|
+
fill: ${s.compositeBackground||s.background};
|
|
160
|
+
}
|
|
161
|
+
.statediagram-cluster.statediagram-cluster-alt .inner {
|
|
162
|
+
fill: ${s.altBackground?s.altBackground:"#efefef"};
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.statediagram-cluster .inner {
|
|
166
|
+
rx:0;
|
|
167
|
+
ry:0;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.statediagram-state rect.basic {
|
|
171
|
+
rx: 5px;
|
|
172
|
+
ry: 5px;
|
|
173
|
+
}
|
|
174
|
+
.statediagram-state rect.divider {
|
|
175
|
+
stroke-dasharray: 10,10;
|
|
176
|
+
fill: ${s.altBackground?s.altBackground:"#efefef"};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.note-edge {
|
|
180
|
+
stroke-dasharray: 5;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.statediagram-note rect {
|
|
184
|
+
fill: ${s.noteBkgColor};
|
|
185
|
+
stroke: ${s.noteBorderColor};
|
|
186
|
+
stroke-width: 1px;
|
|
187
|
+
rx: 0;
|
|
188
|
+
ry: 0;
|
|
189
|
+
}
|
|
190
|
+
.statediagram-note rect {
|
|
191
|
+
fill: ${s.noteBkgColor};
|
|
192
|
+
stroke: ${s.noteBorderColor};
|
|
193
|
+
stroke-width: 1px;
|
|
194
|
+
rx: 0;
|
|
195
|
+
ry: 0;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.statediagram-note text {
|
|
199
|
+
fill: ${s.noteTextColor};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.statediagram-note .nodeLabel {
|
|
203
|
+
color: ${s.noteTextColor};
|
|
204
|
+
}
|
|
205
|
+
.statediagram .edgeLabel {
|
|
206
|
+
color: red; // ${s.noteTextColor};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
[id$="-dependencyStart"], [id$="-dependencyEnd"] {
|
|
210
|
+
fill: ${s.lineColor};
|
|
211
|
+
stroke: ${s.lineColor};
|
|
212
|
+
stroke-width: ${s.strokeWidth||1};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.statediagramTitleText {
|
|
216
|
+
text-anchor: middle;
|
|
217
|
+
font-size: 18px;
|
|
218
|
+
fill: ${s.textColor};
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
[data-look="neo"].statediagram-cluster rect {
|
|
222
|
+
fill: ${s.mainBkg};
|
|
223
|
+
stroke: ${s.useGradient?"url("+s.svgId+"-gradient)":s.stateBorder||s.nodeBorder};
|
|
224
|
+
stroke-width: ${s.strokeWidth??1};
|
|
225
|
+
}
|
|
226
|
+
[data-look="neo"].statediagram-cluster rect.outer {
|
|
227
|
+
rx: ${s.radius}px;
|
|
228
|
+
ry: ${s.radius}px;
|
|
229
|
+
filter: ${s.dropShadow?s.dropShadow.replace("url(#drop-shadow)",`url(${s.svgId}-drop-shadow)`):"none"}
|
|
230
|
+
}
|
|
231
|
+
`,"getStyles"),Ir=Ve;
|
|
232
|
+
export{Rr,Ri,et,Ir};
|