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 @@
|
|
|
1
|
+
import{ai}from"./index-zx0j3a2z.js";export{ai as createInfoServices};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{e,t,T,A}from"./index-nwsya6dj.js";import"./index-v119nznk.js";import{D}from"./index-zx0j3a2z.js";var i={parse:e(async(r)=>{let a=await D("info",r);t.debug(a)},"parse")},s={version:"11.16.1"},p=e(()=>s.version,"getVersion"),g={getVersion:p},m=e((r,a,n)=>{t.debug(`rendering info diagram
|
|
2
|
+
`+r);let o=A(a);T(o,100,400,!0),o.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),v={draw:m},y={parser:i,db:g,renderer:v};export{y as diagram};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import{e,l,T,d,f,p,m,g,b,v,r,A,he,s}from"./index-nwsya6dj.js";import"./index-v119nznk.js";var dt=function(){var t=e(function(H,i,a,n){for(a=a||{},n=H.length;n--;a[H[n]]=i);return a},"o"),_=[1,4],h=[1,14],c=[1,12],u=[1,13],x=[6,7,8],E=[1,20],w=[1,18],P=[1,19],k=[6,7,11],M=[1,6,13,14],L=[1,23],N=[1,24],D=[1,6,7,11,13,14],Z={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(i,a,n,y,S,o,O){var B=o.length-1;switch(S){case 6:case 7:return y;case 15:y.addNode(o[B-1].length,o[B].trim());break;case 16:y.addNode(0,o[B].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:_},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:_},{6:h,7:[1,10],9:9,12:11,13:c,14:u},t(x,[2,3]),{1:[2,2]},t(x,[2,4]),t(x,[2,5]),{1:[2,6],6:h,12:15,13:c,14:u},{6:h,9:16,12:11,13:c,14:u},{6:E,7:w,10:17,11:P},t(k,[2,18],{14:[1,21]}),t(k,[2,16]),t(k,[2,17]),{6:E,7:w,10:22,11:P},{1:[2,7],6:h,12:15,13:c,14:u},t(M,[2,14],{7:L,11:N}),t(D,[2,8]),t(D,[2,9]),t(D,[2,10]),t(k,[2,15]),t(M,[2,13],{7:L,11:N}),t(D,[2,11]),t(D,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(i,a){if(a.recoverable)this.trace(i);else{var n=Error(i);throw n.hash=a,n}},"parseError"),parse:e(function(i){var a=this,n=[0],y=[],S=[null],o=[],O=this.table,B="",F=0,C=0,W=0,j=2,Y=1,rt=o.slice.call(arguments,1),I=Object.create(this.lexer),V={yy:{}};for(var q in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,q))V.yy[q]=this.yy[q];if(I.setInput(i,V.yy),V.yy.lexer=I,V.yy.parser=this,typeof I.yylloc>"u")I.yylloc={};var Q=I.yylloc;o.push(Q);var lt=I.options&&I.options.ranges;if(typeof V.yy.parseError==="function")this.parseError=V.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function xt(U){n.length=n.length-2*U,S.length=S.length-U,o.length=o.length-U}e(xt,"popStack");function yt(){var U=y.pop()||I.lex()||Y;if(typeof U!=="number"){if(U instanceof Array)y=U,U=y.pop();U=a.symbols_[U]||U}return U}e(yt,"lex");var z,ot,J,G,Vt,ht,tt={},st,K,ft,nt;while(!0){if(J=n[n.length-1],this.defaultActions[J])G=this.defaultActions[J];else{if(z===null||typeof z>"u")z=yt();G=O[J]&&O[J][z]}if(typeof G>"u"||!G.length||!G[0]){var ct="";nt=[];for(st in O[J])if(this.terminals_[st]&&st>j)nt.push("'"+this.terminals_[st]+"'");if(I.showPosition)ct="Parse error on line "+(F+1)+`:
|
|
2
|
+
`+I.showPosition()+`
|
|
3
|
+
Expecting `+nt.join(", ")+", got '"+(this.terminals_[z]||z)+"'";else ct="Parse error on line "+(F+1)+": Unexpected "+(z==Y?"end of input":"'"+(this.terminals_[z]||z)+"'");this.parseError(ct,{text:I.match,token:this.terminals_[z]||z,line:I.yylineno,loc:Q,expected:nt})}if(G[0]instanceof Array&&G.length>1)throw Error("Parse Error: multiple actions possible at state: "+J+", token: "+z);switch(G[0]){case 1:if(n.push(z),S.push(I.yytext),o.push(I.yylloc),n.push(G[1]),z=null,!ot){if(C=I.yyleng,B=I.yytext,F=I.yylineno,Q=I.yylloc,W>0)W--}else z=ot,ot=null;break;case 2:if(K=this.productions_[G[1]][1],tt.$=S[S.length-K],tt._$={first_line:o[o.length-(K||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(K||1)].first_column,last_column:o[o.length-1].last_column},lt)tt._$.range=[o[o.length-(K||1)].range[0],o[o.length-1].range[1]];if(ht=this.performAction.apply(tt,[B,C,F,V.yy,G[1],S,o].concat(rt)),typeof ht<"u")return ht;if(K)n=n.slice(0,-1*K*2),S=S.slice(0,-1*K),o=o.slice(0,-1*K);n.push(this.productions_[G[1]][0]),S.push(tt.$),o.push(tt._$),ft=O[n[n.length-2]][n[n.length-1]],n.push(ft);break;case 3:return!0}}return!0},"parse")},X=function(){var H={EOF:1,parseError:e(function(a,n){if(this.yy.parser)this.yy.parser.parseError(a,n);else throw Error(a)},"parseError"),setInput:e(function(i,a){if(this.yy=a||this.yy||{},this._input=i,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 i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);if(a)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),i},"input"),unput:e(function(i){var a=i.length,n=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var y=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),n.length-1)this.yylineno-=n.length-1;var S=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:n?(n.length===y.length?this.yylloc.first_column:0)+y[y.length-n.length].length-n[0].length:this.yylloc.first_column-a},this.options.ranges)this.yylloc.range=[S[0],S[0]+this.yyleng-a];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(i){this.unput(this.match.slice(i))},"less"),pastInput:e(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var i=this.match;if(i.length<20)i+=this._input.substr(0,20-i.length);return(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var i=this.pastInput(),a=Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
|
+
`+a+"^"},"showPosition"),test_match:e(function(i,a){var n,y,S;if(this.options.backtrack_lexer){if(S={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)S.yylloc.range=this.yylloc.range.slice(0)}if(y=i[0].match(/(?:\r\n?|\n).*/g),y)this.yylineno+=y.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],n=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(n)return n;else if(this._backtrack){for(var o in S)this[o]=S[o];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var i,a,n,y;if(!this._more)this.yytext="",this.match="";var S=this._currentRules();for(var o=0;o<S.length;o++)if(n=this._input.match(this.rules[S[o]]),n&&(!a||n[0].length>a[0].length)){if(a=n,y=o,this.options.backtrack_lexer)if(i=this.test_match(n,S[o]),i!==!1)return i;else if(this._backtrack){a=!1;continue}else return!1;else if(!this.options.flex)break}if(a){if(i=this.test_match(a,S[y]),i!==!1)return i;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 a=this.next();if(a)return a;else return this.lex()},"lex"),begin:e(function(a){this.conditionStack.push(a)},"begin"),popState:e(function(){var a=this.conditionStack.length-1;if(a>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(a){if(a=this.conditionStack.length-1-Math.abs(a||0),a>=0)return this.conditionStack[a];else return"INITIAL"},"topState"),pushState:e(function(a){this.begin(a)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(a,n,y,S){var o=S;switch(y){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return H}();Z.lexer=X;function R(){this.yy={}}return e(R,"Parser"),R.prototype=Z,Z.Parser=R,new R}();dt.parser=dt;var vt=dt,St=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{e(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,d()}getRoot(){return this.root}addNode(t,_){let h=l.sanitizeText(_,r());if(!this.root){this.root={text:h,children:[]},this.stack=[{level:0,node:this.root}],b(h);return}this.baseLevel??=t;let c=t-this.baseLevel+1;if(c<=0)c=1;while(this.stack.length>1&&this.stack[this.stack.length-1].level>=c)this.stack.pop();let u=this.stack[this.stack.length-1].node,x={text:h,children:[]};u.children.push(x),this.stack.push({level:c,node:x})}getAccTitle(){return p()}setAccTitle(t){f(t)}getAccDescription(){return g()}setAccDescription(t){m(t)}getDiagramTitle(){return v()}setDiagramTitle(t){b(t)}},Et=14,et=250,$t=30,At=60,It=5,bt=82*Math.PI/180,pt=Math.cos(bt),gt=Math.sin(bt),kt=e((t,_,h)=>{let c=t.node().getBBox(),u=c.width+_*2,x=c.height+_*2;T(t,x,u,h),t.attr("viewBox",`${c.x-_} ${c.y-_} ${u} ${x}`)},"applyPaddedViewBox"),Lt=e((t,_,h,c)=>{let x=c.db.getRoot();if(!x)return;let E=r(),{look:w,handDrawnSeed:P,themeVariables:k}=E,M=he(E.fontSize)[0]??Et,L=w==="handDrawn",N=x.children??[],D=E.ishikawa?.diagramPadding??20,Z=E.ishikawa?.useMaxWidth??!1,X=A(_),R=X.append("g").attr("class","ishikawa"),H=L?s.svg(X.node()):void 0,i=H?{roughSvg:H,seed:P??0,lineColor:k?.lineColor??"#333",fillColor:k?.mainBkg??"#fff"}:void 0,a=`ishikawa-arrow-${_}`;if(!L)R.append("defs").append("marker").attr("id",a).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let n=0,y=et,S=L?void 0:it(R,n,y,n,y,"ishikawa-spine");if(Tt(R,n,y,x.text,M,i),!N.length){if(L)it(R,n,y,n,y,"ishikawa-spine",i);kt(X,D,Z);return}n-=20;let o=N.filter((I,V)=>V%2===0),O=N.filter((I,V)=>V%2===1),B=mt(o),F=mt(O),C=B.total+F.total,W=et,j=et;if(C>0){let I=et*2,V=et*0.3;W=Math.max(V,I*(B.total/C)),j=Math.max(V,I*(F.total/C))}let Y=M*2;if(W=Math.max(W,B.max*Y),j=Math.max(j,F.max*Y),y=Math.max(W,et),S)S.attr("y1",y).attr("y2",y);R.select(".ishikawa-head-group").attr("transform",`translate(0,${y})`);let rt=Math.ceil(N.length/2);for(let I=0;I<rt;I++){let V=R.append("g").attr("class","ishikawa-pair");for(let[q,Q,lt]of[[N[I*2],-1,W],[N[I*2+1],1,j]])if(q)Bt(V,q,n,y,Q,lt,M,i);n=V.selectAll("text").nodes().reduce((q,Q)=>Math.min(q,Q.getBBox().x),1/0)}if(L)it(R,n,y,0,y,"ishikawa-spine",i);else{S.attr("x1",n);let I=`url(#${a})`;R.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",I)}kt(X,D,Z)},"draw"),mt=e((t)=>{let _=e((h)=>h.children.reduce((c,u)=>c+1+_(u),0),"countDescendants");return t.reduce((h,c)=>{let u=_(c);return h.total+=u,h.max=Math.max(h.max,u),h},{total:0,max:0})},"sideStats"),Tt=e((t,_,h,c,u,x)=>{let E=Math.max(6,Math.floor(110/(u*0.6))),w=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${_},${h})`),P=at(w,_t(c,E),0,0,"ishikawa-head-label","start",u),k=P.node().getBBox(),M=Math.max(60,k.width+6),L=Math.max(40,k.height*2+40),N=`M 0 ${-L/2} L 0 ${L/2} Q ${M*2.4} 0 0 ${-L/2} Z`;if(x){let D=x.roughSvg.path(N,{roughness:1.5,seed:x.seed,fill:x.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:x.lineColor,strokeWidth:2});w.insert(()=>D,":first-child").attr("class","ishikawa-head")}else w.insert("path",":first-child").attr("class","ishikawa-head").attr("d",N);P.attr("transform",`translate(${(M-k.width)/2-k.x+3},${-k.y-k.height/2})`)},"drawHead"),Mt=e((t,_)=>{let h=[],c=[],u=e((x,E,w)=>{let P=_===-1?[...x].reverse():x;for(let k of P){let M=h.length,L=k.children??[];if(h.push({depth:w,text:_t(k.text,15),parentIndex:E,childCount:L.length}),w%2===0){if(c.push(M),L.length)u(L,M,w+1)}else{if(L.length)u(L,M,w+1);c.push(M)}}},"walk");return u(t,-1,2),{entries:h,yOrder:c}},"flattenTree"),Pt=e((t,_,h,c,u,x,E)=>{let w=t.append("g").attr("class","ishikawa-label-group"),k=at(w,_,h,c+11*u,"ishikawa-label cause","middle",x).node().getBBox();if(E){let M=E.roughSvg.rectangle(k.x-20,k.y-2,k.width+40,k.height+4,{roughness:1.5,seed:E.seed,fill:E.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:E.lineColor,strokeWidth:2});w.insert(()=>M,":first-child").attr("class","ishikawa-label-box")}else w.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",k.x-20).attr("y",k.y-2).attr("width",k.width+40).attr("height",k.height+4)},"drawCauseLabel"),ut=e((t,_,h,c,u,x)=>{let E=Math.sqrt(c*c+u*u);if(E===0)return;let w=c/E,P=u/E,k=6,M=-P*k,L=w*k,N=_,D=h,Z=`M ${N} ${D} L ${N-w*k*2+M} ${D-P*k*2+L} L ${N-w*k*2-M} ${D-P*k*2-L} Z`,X=x.roughSvg.path(Z,{roughness:1,seed:x.seed,fill:x.lineColor,fillStyle:"solid",stroke:x.lineColor,strokeWidth:1});t.append(()=>X)},"drawArrowMarker"),Bt=e((t,_,h,c,u,x,E,w)=>{let P=_.children??[],k=x*(P.length?1:0.2),M=-pt*k,L=gt*k*u,N=h+M,D=c+L;if(it(t,h,c,N,D,"ishikawa-branch",w),w)ut(t,h,c,h-N,c-D,w);if(Pt(t,_.text,N,D,u,E,w),!P.length)return;let{entries:Z,yOrder:X}=Mt(P,u),R=Z.length,H=Array(R);for(let[S,o]of X.entries())H[o]=c+L*((S+1)/(R+1));let i=new Map;i.set(-1,{x0:h,y0:c,x1:N,y1:D,childCount:P.length,childrenDrawn:0});let a=-pt,n=gt*u,y=u<0?"ishikawa-label up":"ishikawa-label down";for(let[S,o]of Z.entries()){let O=H[S],B=i.get(o.parentIndex),F=t.append("g").attr("class","ishikawa-sub-group"),C=0,W=0,j=0;if(o.depth%2===0){let Y=B.y1-B.y0;if(C=wt(B.x0,B.x1,Y?(O-B.y0)/Y:0.5),W=O,j=C-(o.childCount>0?At+o.childCount*It:$t),it(F,C,O,j,O,"ishikawa-sub-branch",w),w)ut(F,C,O,1,0,w);at(F,o.text,j,O,"ishikawa-label align","end",E)}else{let Y=B.childrenDrawn++;if(C=wt(B.x0,B.x1,(B.childCount-Y)/(B.childCount+1)),W=B.y0,j=C+a*((O-W)/n),it(F,C,W,j,O,"ishikawa-sub-branch",w),w)ut(F,C,W,C-j,W-O,w);at(F,o.text,j,O,y,"end",E)}if(o.childCount>0)i.set(S,{x0:C,y0:W,x1:j,y1:O,childCount:o.childCount,childrenDrawn:0})}},"drawBranch"),Nt=e((t)=>t.split(/<br\s*\/?>|\n/),"splitLines"),_t=e((t,_)=>{if(t.length<=_)return t;let h=[];for(let c of t.split(/\s+/)){let u=h.length-1;if(u>=0&&h[u].length+1+c.length<=_)h[u]+=" "+c;else h.push(c)}return h.join(`
|
|
7
|
+
`)},"wrapText"),at=e((t,_,h,c,u,x,E)=>{let w=Nt(_),P=E*1.05,k=t.append("text").attr("class",u).attr("text-anchor",x).attr("x",h).attr("y",c-(w.length-1)*P/2);for(let[M,L]of w.entries())k.append("tspan").attr("x",h).attr("dy",M===0?0:P).text(L);return k},"drawMultilineText"),wt=e((t,_,h)=>t+(_-t)*h,"lerp"),it=e((t,_,h,c,u,x,E)=>{if(E){let w=E.roughSvg.line(_,h,c,u,{roughness:1.5,seed:E.seed,stroke:E.lineColor,strokeWidth:2});t.append(()=>w).attr("class",x);return}return t.append("line").attr("class",x).attr("x1",_).attr("y1",h).attr("x2",c).attr("y2",u)},"drawLine"),Dt={draw:Lt},Ot=e((t)=>`
|
|
8
|
+
.ishikawa .ishikawa-spine,
|
|
9
|
+
.ishikawa .ishikawa-branch,
|
|
10
|
+
.ishikawa .ishikawa-sub-branch {
|
|
11
|
+
stroke: ${t.lineColor};
|
|
12
|
+
stroke-width: 2;
|
|
13
|
+
fill: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ishikawa .ishikawa-sub-branch {
|
|
17
|
+
stroke-width: 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ishikawa .ishikawa-arrow {
|
|
21
|
+
fill: ${t.lineColor};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ishikawa .ishikawa-head {
|
|
25
|
+
fill: ${t.mainBkg};
|
|
26
|
+
stroke: ${t.lineColor};
|
|
27
|
+
stroke-width: 2;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ishikawa .ishikawa-label-box {
|
|
31
|
+
fill: ${t.mainBkg};
|
|
32
|
+
stroke: ${t.lineColor};
|
|
33
|
+
stroke-width: 2;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ishikawa text {
|
|
37
|
+
font-family: ${t.fontFamily};
|
|
38
|
+
font-size: ${t.fontSize};
|
|
39
|
+
fill: ${t.textColor};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ishikawa .ishikawa-head-label {
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
text-anchor: middle;
|
|
45
|
+
dominant-baseline: middle;
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ishikawa .ishikawa-label {
|
|
50
|
+
text-anchor: end;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ishikawa .ishikawa-label.cause {
|
|
54
|
+
text-anchor: middle;
|
|
55
|
+
dominant-baseline: middle;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ishikawa .ishikawa-label.align {
|
|
59
|
+
text-anchor: end;
|
|
60
|
+
dominant-baseline: middle;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ishikawa .ishikawa-label.up {
|
|
64
|
+
dominant-baseline: baseline;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ishikawa .ishikawa-label.down {
|
|
68
|
+
dominant-baseline: hanging;
|
|
69
|
+
}
|
|
70
|
+
`,"getStyles"),Ct=Ot,Gt={parser:vt,get db(){return new St},renderer:Dt,styles:Ct};export{Gt as diagram};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import{e,T,d,f,p,m,g,b,v,r,n}from"./index-nwsya6dj.js";import"./index-v119nznk.js";import{dt,Br,Mi,ne}from"./index-y9ma6azy.js";import{De}from"./index-dyp2nhd3.js";import{we}from"./index-9022d1n9.js";var nt=function(){var t=e(function(y,a,l,c){for(l=l||{},c=y.length;c--;l[y[c]]=a);return l},"o"),i=[6,8,10,11,12,14,16,17,18],o=[1,9],w=[1,10],s=[1,11],x=[1,12],S=[1,13],h=[1,14],M={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(a,l,c,k,_,u,A){var P=u.length-1;switch(_){case 1:return u[P-1];case 2:this.$=[];break;case 3:u[P-1].push(u[P]),this.$=u[P-1];break;case 4:case 5:this.$=u[P];break;case 6:case 7:this.$=[];break;case 8:k.setDiagramTitle(u[P].substr(6)),this.$=u[P].substr(6);break;case 9:this.$=u[P].trim(),k.setAccTitle(this.$);break;case 10:case 11:this.$=u[P].trim(),k.setAccDescription(this.$);break;case 12:k.addSection(u[P].substr(8)),this.$=u[P].substr(8);break;case 13:k.addTask(u[P-1],u[P]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:o,12:w,14:s,16:x,17:S,18:h},t(i,[2,7],{1:[2,1]}),t(i,[2,3]),{9:15,11:o,12:w,14:s,16:x,17:S,18:h},t(i,[2,5]),t(i,[2,6]),t(i,[2,8]),{13:[1,16]},{15:[1,17]},t(i,[2,11]),t(i,[2,12]),{19:[1,18]},t(i,[2,4]),t(i,[2,9]),t(i,[2,10]),t(i,[2,13])],defaultActions:{},parseError:e(function(a,l){if(l.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=l,c}},"parseError"),parse:e(function(a){var l=this,c=[0],k=[],_=[null],u=[],A=this.table,P="",z=0,ot=0,ct=0,vt=2,ht=1,wt=u.slice.call(arguments,1),I=Object.create(this.lexer),O={yy:{}};for(var Q in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Q))O.yy[Q]=this.yy[Q];if(I.setInput(a,O.yy),O.yy.lexer=I,O.yy.parser=this,typeof I.yylloc>"u")I.yylloc={};var D=I.yylloc;u.push(D);var Tt=I.options&&I.options.ranges;if(typeof O.yy.parseError==="function")this.parseError=O.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function St(R){c.length=c.length-2*R,_.length=_.length-R,u.length=u.length-R}e(St,"popStack");function ut(){var R=k.pop()||I.lex()||ht;if(typeof R!=="number"){if(R instanceof Array)k=R,R=k.pop();R=l.symbols_[R]||R}return R}e(ut,"lex");var F,tt,Y,V,Gt,et,q={},Z,j,yt,J;while(!0){if(Y=c[c.length-1],this.defaultActions[Y])V=this.defaultActions[Y];else{if(F===null||typeof F>"u")F=ut();V=A[Y]&&A[Y][F]}if(typeof V>"u"||!V.length||!V[0]){var rt="";J=[];for(Z in A[Y])if(this.terminals_[Z]&&Z>vt)J.push("'"+this.terminals_[Z]+"'");if(I.showPosition)rt="Parse error on line "+(z+1)+`:
|
|
2
|
+
`+I.showPosition()+`
|
|
3
|
+
Expecting `+J.join(", ")+", got '"+(this.terminals_[F]||F)+"'";else rt="Parse error on line "+(z+1)+": Unexpected "+(F==ht?"end of input":"'"+(this.terminals_[F]||F)+"'");this.parseError(rt,{text:I.match,token:this.terminals_[F]||F,line:I.yylineno,loc:D,expected:J})}if(V[0]instanceof Array&&V.length>1)throw Error("Parse Error: multiple actions possible at state: "+Y+", token: "+F);switch(V[0]){case 1:if(c.push(F),_.push(I.yytext),u.push(I.yylloc),c.push(V[1]),F=null,!tt){if(ot=I.yyleng,P=I.yytext,z=I.yylineno,D=I.yylloc,ct>0)ct--}else F=tt,tt=null;break;case 2:if(j=this.productions_[V[1]][1],q.$=_[_.length-j],q._$={first_line:u[u.length-(j||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(j||1)].first_column,last_column:u[u.length-1].last_column},Tt)q._$.range=[u[u.length-(j||1)].range[0],u[u.length-1].range[1]];if(et=this.performAction.apply(q,[P,ot,z,O.yy,V[1],_,u].concat(wt)),typeof et<"u")return et;if(j)c=c.slice(0,-1*j*2),_=_.slice(0,-1*j),u=u.slice(0,-1*j);c.push(this.productions_[V[1]][0]),_.push(q.$),u.push(q._$),yt=A[c[c.length-2]][c[c.length-1]],c.push(yt);break;case 3:return!0}}return!0},"parse")},E=function(){var y={EOF:1,parseError:e(function(l,c){if(this.yy.parser)this.yy.parser.parseError(l,c);else throw Error(l)},"parseError"),setInput:e(function(a,l){if(this.yy=l||this.yy||{},this._input=a,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 a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var l=a.match(/(?:\r\n?|\n).*/g);if(l)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),a},"input"),unput:e(function(a){var l=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var k=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 _=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===k.length?this.yylloc.first_column:0)+k[k.length-c.length].length-c[0].length:this.yylloc.first_column-l},this.options.ranges)this.yylloc.range=[_[0],_[0]+this.yyleng-l];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(a){this.unput(this.match.slice(a))},"less"),pastInput:e(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var a=this.match;if(a.length<20)a+=this._input.substr(0,20-a.length);return(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var a=this.pastInput(),l=Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
|
5
|
+
`+l+"^"},"showPosition"),test_match:e(function(a,l){var c,k,_;if(this.options.backtrack_lexer){if(_={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)_.yylloc.range=this.yylloc.range.slice(0)}if(k=a[0].match(/(?:\r\n?|\n).*/g),k)this.yylineno+=k.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(c)return c;else if(this._backtrack){for(var u in _)this[u]=_[u];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var a,l,c,k;if(!this._more)this.yytext="",this.match="";var _=this._currentRules();for(var u=0;u<_.length;u++)if(c=this._input.match(this.rules[_[u]]),c&&(!l||c[0].length>l[0].length)){if(l=c,k=u,this.options.backtrack_lexer)if(a=this.test_match(c,_[u]),a!==!1)return a;else if(this._backtrack){l=!1;continue}else return!1;else if(!this.options.flex)break}if(l){if(a=this.test_match(l,_[k]),a!==!1)return a;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 l=this.next();if(l)return l;else return this.lex()},"lex"),begin:e(function(l){this.conditionStack.push(l)},"begin"),popState:e(function(){var l=this.conditionStack.length-1;if(l>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(l){if(l=this.conditionStack.length-1-Math.abs(l||0),l>=0)return this.conditionStack[l];else return"INITIAL"},"topState"),pushState:e(function(l){this.begin(l)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(l,c,k,_){var u=_;switch(k){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return y}();M.lexer=E;function C(){this.yy={}}return e(C,"Parser"),C.prototype=M,M.Parser=C,new C}();nt.parser=nt;var $t=nt,X="",at=[],G=[],H=[],Mt=e(function(){at.length=0,G.length=0,X="",H.length=0,d()},"clear"),Et=e(function(t){X=t,at.push(t)},"addSection"),Ct=e(function(){return at},"getSections"),Pt=e(function(){let t=ft(),i=100,o=0;while(!t&&o<i)t=ft(),o++;return G.push(...H),G},"getTasks"),It=e(function(){let t=[];return G.forEach((o)=>{if(o.people)t.push(...o.people)}),[...new Set(t)].sort()},"updateActors"),At=e(function(t,i){let o=i.substr(1).split(":"),w=0,s=[];if(o.length===1)w=Number(o[0]),s=[];else w=Number(o[0]),s=o[1].split(",");let x=s.map((h)=>h.trim()),S={section:X,type:X,people:x,task:t,score:w};H.push(S)},"addTask"),Ft=e(function(t){let i={section:X,type:X,description:t,task:t,classes:[]};G.push(i)},"addTaskOrg"),ft=e(function(){let t=e(function(o){return H[o].processed},"compileTask"),i=!0;for(let[o,w]of H.entries())t(o),i=i&&w.processed;return i},"compileTasks"),Vt=e(function(){return It()},"getActors"),pt={getConfig:e(()=>r().journey,"getConfig"),clear:Mt,setDiagramTitle:b,getDiagramTitle:v,setAccTitle:f,getAccTitle:p,setAccDescription:m,getAccDescription:g,addSection:Et,getSections:Ct,getTasks:Pt,addTask:At,addTaskOrg:Ft,getActors:Vt},Rt=e((t)=>`.label {
|
|
7
|
+
font-family: ${t.fontFamily};
|
|
8
|
+
color: ${t.textColor};
|
|
9
|
+
}
|
|
10
|
+
.mouth {
|
|
11
|
+
stroke: #666;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
line {
|
|
15
|
+
stroke: ${t.textColor}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.legend {
|
|
19
|
+
fill: ${t.textColor};
|
|
20
|
+
font-family: ${t.fontFamily};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.label text {
|
|
24
|
+
fill: #333;
|
|
25
|
+
}
|
|
26
|
+
.label {
|
|
27
|
+
color: ${t.textColor}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.face {
|
|
31
|
+
${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
|
|
32
|
+
stroke: #999;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.node rect,
|
|
36
|
+
.node circle,
|
|
37
|
+
.node ellipse,
|
|
38
|
+
.node polygon,
|
|
39
|
+
.node path {
|
|
40
|
+
fill: ${t.mainBkg};
|
|
41
|
+
stroke: ${t.nodeBorder};
|
|
42
|
+
stroke-width: 1px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.node .label {
|
|
46
|
+
text-align: center;
|
|
47
|
+
}
|
|
48
|
+
.node.clickable {
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.arrowheadPath {
|
|
53
|
+
fill: ${t.arrowheadColor};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.edgePath .path {
|
|
57
|
+
stroke: ${t.lineColor};
|
|
58
|
+
stroke-width: 1.5px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.flowchart-link {
|
|
62
|
+
stroke: ${t.lineColor};
|
|
63
|
+
fill: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.edgeLabel {
|
|
67
|
+
background-color: ${t.edgeLabelBackground};
|
|
68
|
+
rect {
|
|
69
|
+
opacity: 0.5;
|
|
70
|
+
}
|
|
71
|
+
text-align: center;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.cluster rect {
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.cluster text {
|
|
78
|
+
fill: ${t.titleColor};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
div.mermaidTooltip {
|
|
82
|
+
position: absolute;
|
|
83
|
+
text-align: center;
|
|
84
|
+
max-width: 200px;
|
|
85
|
+
padding: 2px;
|
|
86
|
+
font-family: ${t.fontFamily};
|
|
87
|
+
font-size: 12px;
|
|
88
|
+
background: ${t.tertiaryColor};
|
|
89
|
+
border: 1px solid ${t.border2};
|
|
90
|
+
border-radius: 2px;
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
z-index: 100;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.task-type-0, .section-type-0 {
|
|
96
|
+
${t.fillType0?`fill: ${t.fillType0}`:""};
|
|
97
|
+
}
|
|
98
|
+
.task-type-1, .section-type-1 {
|
|
99
|
+
${t.fillType0?`fill: ${t.fillType1}`:""};
|
|
100
|
+
}
|
|
101
|
+
.task-type-2, .section-type-2 {
|
|
102
|
+
${t.fillType0?`fill: ${t.fillType2}`:""};
|
|
103
|
+
}
|
|
104
|
+
.task-type-3, .section-type-3 {
|
|
105
|
+
${t.fillType0?`fill: ${t.fillType3}`:""};
|
|
106
|
+
}
|
|
107
|
+
.task-type-4, .section-type-4 {
|
|
108
|
+
${t.fillType0?`fill: ${t.fillType4}`:""};
|
|
109
|
+
}
|
|
110
|
+
.task-type-5, .section-type-5 {
|
|
111
|
+
${t.fillType0?`fill: ${t.fillType5}`:""};
|
|
112
|
+
}
|
|
113
|
+
.task-type-6, .section-type-6 {
|
|
114
|
+
${t.fillType0?`fill: ${t.fillType6}`:""};
|
|
115
|
+
}
|
|
116
|
+
.task-type-7, .section-type-7 {
|
|
117
|
+
${t.fillType0?`fill: ${t.fillType7}`:""};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.actor-0 {
|
|
121
|
+
${t.actor0?`fill: ${t.actor0}`:""};
|
|
122
|
+
}
|
|
123
|
+
.actor-1 {
|
|
124
|
+
${t.actor1?`fill: ${t.actor1}`:""};
|
|
125
|
+
}
|
|
126
|
+
.actor-2 {
|
|
127
|
+
${t.actor2?`fill: ${t.actor2}`:""};
|
|
128
|
+
}
|
|
129
|
+
.actor-3 {
|
|
130
|
+
${t.actor3?`fill: ${t.actor3}`:""};
|
|
131
|
+
}
|
|
132
|
+
.actor-4 {
|
|
133
|
+
${t.actor4?`fill: ${t.actor4}`:""};
|
|
134
|
+
}
|
|
135
|
+
.actor-5 {
|
|
136
|
+
${t.actor5?`fill: ${t.actor5}`:""};
|
|
137
|
+
}
|
|
138
|
+
${we()}
|
|
139
|
+
`,"getStyles"),Lt=Rt,lt=e(function(t,i){return dt(t,i)},"drawRect"),Bt=e(function(t,i){let w=t.append("circle").attr("cx",i.cx).attr("cy",i.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");s.append("circle").attr("cx",i.cx-5).attr("cy",i.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",i.cx+5).attr("cy",i.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function x(M){let E=De().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);M.append("path").attr("class","mouth").attr("d",E).attr("transform","translate("+i.cx+","+(i.cy+2)+")")}e(x,"smile");function S(M){let E=De().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);M.append("path").attr("class","mouth").attr("d",E).attr("transform","translate("+i.cx+","+(i.cy+7)+")")}e(S,"sad");function h(M){M.append("line").attr("class","mouth").attr("stroke",2).attr("x1",i.cx-5).attr("y1",i.cy+7).attr("x2",i.cx+5).attr("y2",i.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}if(e(h,"ambivalent"),i.score>3)x(s);else if(i.score<3)S(s);else h(s);return w},"drawFace"),xt=e(function(t,i){let o=t.append("circle");if(o.attr("cx",i.cx),o.attr("cy",i.cy),o.attr("class","actor-"+i.pos),o.attr("fill",i.fill),o.attr("stroke",i.stroke),o.attr("r",i.r),o.class!==void 0)o.attr("class",o.class);if(i.title!==void 0)o.append("title").text(i.title);return o},"drawCircle"),kt=e(function(t,i){return Mi(t,i)},"drawText"),jt=e(function(t,i){function o(s,x,S,h,M){return s+","+x+" "+(s+S)+","+x+" "+(s+S)+","+(x+h-M)+" "+(s+S-M*1.2)+","+(x+h)+" "+s+","+(x+h)}e(o,"genPoints");let w=t.append("polygon");w.attr("points",o(i.x,i.y,50,20,7)),w.attr("class","labelBox"),i.y=i.y+i.labelMargin,i.x=i.x+0.5*i.labelMargin,kt(t,i)},"drawLabel"),Nt=e(function(t,i,o){let w=t.append("g"),s=ne();s.x=i.x,s.y=i.y,s.fill=i.fill,s.width=o.width*i.taskCount+o.diagramMarginX*(i.taskCount-1),s.height=o.height,s.class="journey-section section-type-"+i.num,s.rx=3,s.ry=3,lt(w,s),bt(o)(i.text,w,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+i.num},o,i.colour)},"drawSection"),st=-1,zt=e(function(t,i,o,w){let s=i.x+o.width/2,x=t.append("g");st++;let S=450;x.append("line").attr("id",w+"-task"+st).attr("x1",s).attr("y1",i.y).attr("x2",s).attr("y2",S).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Bt(x,{cx:s,cy:300+(5-i.score)*30,score:i.score});let h=ne();h.x=i.x,h.y=i.y,h.fill=i.fill,h.width=o.width,h.height=o.height,h.class="task task-type-"+i.num,h.rx=3,h.ry=3,lt(x,h);let M=i.x+14;i.people.forEach((E)=>{let C=i.actors[E].color,y={cx:M,cy:i.y,r:7,fill:C,stroke:"#000",title:E,pos:i.actors[E].position};xt(x,y),M+=10}),bt(o)(i.task,x,h.x,h.y,h.width,h.height,{class:"task"},o,i.colour)},"drawTask"),Wt=e(function(t,i){Br(t,i)},"drawBackgroundRect"),bt=function(){function t(s,x,S,h,M,E,C,y){let a=x.append("text").attr("x",S+M/2).attr("y",h+E/2+5).style("font-color",y).style("text-anchor","middle").text(s);w(a,C)}e(t,"byText");function i(s,x,S,h,M,E,C,y,a){let{taskFontSize:l,taskFontFamily:c}=y,k=s.split(/<br\s*\/?>/gi);for(let _=0;_<k.length;_++){let u=_*l-l*(k.length-1)/2,A=x.append("text").attr("x",S+M/2).attr("y",h).attr("fill",a).style("text-anchor","middle").style("font-size",l).style("font-family",c);A.append("tspan").attr("x",S+M/2).attr("dy",u).text(k[_]),A.attr("y",h+E/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),w(A,C)}}e(i,"byTspan");function o(s,x,S,h,M,E,C,y){let a=x.append("switch"),c=a.append("foreignObject").attr("x",S).attr("y",h).attr("width",M).attr("height",E).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");c.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),i(s,a,S,h,M,E,C,y),w(c,C)}e(o,"byFo");function w(s,x){for(let S in x)if(S in x)s.attr(S,x[S])}return e(w,"_setTextAttrs"),function(s){return s.textPlacement==="fo"?o:s.textPlacement==="old"?t:i}}(),Ot=e(function(t,i){st=-1,t.append("defs").append("marker").attr("id",i+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),U={drawRect:lt,drawCircle:xt,drawSection:Nt,drawText:kt,drawLabel:jt,drawTask:zt,drawBackgroundRect:Wt,initGraphics:Ot},Yt=e(function(t){Object.keys(t).forEach(function(o){B[o]=t[o]})},"setConf"),N={},K=0;function _t(t){let i=r().journey,o=i.maxLabelWidth;K=0;let w=60;Object.keys(N).forEach((s)=>{let x=N[s].color,S={cx:20,cy:w,r:7,fill:x,stroke:"#000",pos:N[s].position};U.drawCircle(t,S);let h=t.append("text").attr("visibility","hidden").text(s),M=h.node().getBoundingClientRect().width;h.remove();let E=[];if(M<=o)E=[s];else{let C=s.split(" "),y="";if(h=t.append("text").attr("visibility","hidden"),C.forEach((a)=>{let l=y?`${y} ${a}`:a;if(h.text(l),h.node().getBoundingClientRect().width>o){if(y)E.push(y);if(y=a,h.text(a),h.node().getBoundingClientRect().width>o){let k="";for(let _ of a)if(k+=_,h.text(k+"-"),h.node().getBoundingClientRect().width>o)E.push(k.slice(0,-1)+"-"),k=_;y=k}}else y=l}),y)E.push(y);h.remove()}E.forEach((C,y)=>{let a={x:40,y:w+7+y*20,fill:"#666",text:C,textMargin:i.boxTextMargin??5},c=U.drawText(t,a).node().getBoundingClientRect().width;if(c>K&&c>i.leftMargin-c)K=c}),w+=Math.max(20,E.length*20)})}e(_t,"drawActorLegend");var B=r().journey,W=0,qt=e(function(t,i,o,w){let s=r(),x=s.journey.titleColor,S=s.journey.titleFontSize,h=s.journey.titleFontFamily,M=s.securityLevel,E;if(M==="sandbox")E=n("#i"+i);let C=M==="sandbox"?n(E.nodes()[0].contentDocument.body):n("body");L.init();let y=C.select("#"+i);U.initGraphics(y,i);let a=w.db.getTasks(),l=w.db.getDiagramTitle(),c=w.db.getActors();for(let z in N)delete N[z];let k=0;c.forEach((z)=>{N[z]={color:B.actorColours[k%B.actorColours.length],position:k},k++}),_t(y),W=B.leftMargin+K,L.insert(0,0,W,Object.keys(N).length*50),Xt(y,a,0,i);let _=L.getBounds();if(l)y.append("text").text(l).attr("x",W).attr("font-size",S).attr("font-weight","bold").attr("y",25).attr("fill",x).attr("font-family",h);let u=_.stopy-_.starty+2*B.diagramMarginY,A=W+_.stopx+2*B.diagramMarginX;T(y,u,A,B.useMaxWidth),y.append("line").attr("x1",W).attr("y1",B.height*4).attr("x2",A-W-4).attr("y2",B.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+i+"-arrowhead)");let P=l?70:0;y.attr("viewBox",`${_.startx} -25 ${A} ${u+P}`),y.attr("preserveAspectRatio","xMinYMin meet"),y.attr("height",u+P+25)},"draw"),L={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:e(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:e(function(t,i,o,w){if(t[i]===void 0)t[i]=o;else t[i]=w(o,t[i])},"updateVal"),updateBounds:e(function(t,i,o,w){let s=r().journey,x=this,S=0;function h(M){return e(function(C){S++;let y=x.sequenceItems.length-S+1;if(x.updateVal(C,"starty",i-y*s.boxMargin,Math.min),x.updateVal(C,"stopy",w+y*s.boxMargin,Math.max),x.updateVal(L.data,"startx",t-y*s.boxMargin,Math.min),x.updateVal(L.data,"stopx",o+y*s.boxMargin,Math.max),M!=="activation")x.updateVal(C,"startx",t-y*s.boxMargin,Math.min),x.updateVal(C,"stopx",o+y*s.boxMargin,Math.max),x.updateVal(L.data,"starty",i-y*s.boxMargin,Math.min),x.updateVal(L.data,"stopy",w+y*s.boxMargin,Math.max)},"updateItemBounds")}e(h,"updateFn"),this.sequenceItems.forEach(h())},"updateBounds"),insert:e(function(t,i,o,w){let s=Math.min(t,o),x=Math.max(t,o),S=Math.min(i,w),h=Math.max(i,w);this.updateVal(L.data,"startx",s,Math.min),this.updateVal(L.data,"starty",S,Math.min),this.updateVal(L.data,"stopx",x,Math.max),this.updateVal(L.data,"stopy",h,Math.max),this.updateBounds(s,S,x,h)},"insert"),bumpVerticalPos:e(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:e(function(){return this.verticalPos},"getVerticalPos"),getBounds:e(function(){return this.data},"getBounds")},{sectionFills:it,sectionColours:gt}=B,Xt=e(function(t,i,o,w){let s=r().journey,x="",S=s.height*2+s.diagramMarginY,h=o+S,M=0,E="#CCC",C="black",y=0;for(let[a,l]of i.entries()){if(x!==l.section){E=it[M%it.length],y=M%it.length,C=gt[M%gt.length];let k=0,_=l.section;for(let A=a;A<i.length;A++)if(i[A].section==_)k=k+1;else break;let u={x:a*s.taskMargin+a*s.width+W,y:50,text:l.section,fill:E,num:y,colour:C,taskCount:k};U.drawSection(t,u,s),x=l.section,M++}let c=l.people.reduce((k,_)=>{if(N[_])k[_]=N[_];return k},{});l.x=a*s.taskMargin+a*s.width+W,l.y=h,l.width=s.diagramMarginX,l.height=s.diagramMarginY,l.colour=C,l.fill=E,l.num=y,l.actors=c,U.drawTask(t,l,s,w),L.insert(l.x,l.y,l.x+l.width+s.taskMargin,450)}},"drawTasks"),mt={setConf:Yt,draw:qt},te={parser:$t,db:pt,renderer:mt,styles:Lt,init:e((t)=>{mt.setConf(t.journey),pt.clear()},"init")};export{te as diagram};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import{e,t,N,i,a,x,w,Ie,r,A,Ze,Je,ct,Qe,yt}from"./index-nwsya6dj.js";import"./index-v119nznk.js";import{we}from"./index-9022d1n9.js";var ae=function(){var n=e(function(V,c,o,h){for(o=o||{},h=V.length;h--;o[V[h]]=c);return o},"o"),f=[1,4],k=[1,13],l=[1,12],y=[1,15],v=[1,16],S=[1,20],d=[1,19],R=[6,7,8],B=[1,26],b=[1,24],F=[1,25],D=[6,7,11],Y=[1,31],O=[6,7,11,24],z=[1,6,13,16,17,20,23],m=[1,35],G=[1,36],P=[1,6,7,11,13,16,17,20,23],J=[1,38],M={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(c,o,h,u,p,s,U){var g=s.length-1;switch(p){case 6:case 7:return u;case 8:u.getLogger().trace("Stop NL ");break;case 9:u.getLogger().trace("Stop EOF ");break;case 11:u.getLogger().trace("Stop NL2 ");break;case 12:u.getLogger().trace("Stop EOF2 ");break;case 15:u.getLogger().info("Node: ",s[g-1].id),u.addNode(s[g-2].length,s[g-1].id,s[g-1].descr,s[g-1].type,s[g]);break;case 16:u.getLogger().info("Node: ",s[g].id),u.addNode(s[g-1].length,s[g].id,s[g].descr,s[g].type);break;case 17:u.getLogger().trace("Icon: ",s[g]),u.decorateNode({icon:s[g]});break;case 18:case 23:u.decorateNode({class:s[g]});break;case 19:u.getLogger().trace("SPACELIST");break;case 20:u.getLogger().trace("Node: ",s[g-1].id),u.addNode(0,s[g-1].id,s[g-1].descr,s[g-1].type,s[g]);break;case 21:u.getLogger().trace("Node: ",s[g].id),u.addNode(0,s[g].id,s[g].descr,s[g].type);break;case 22:u.decorateNode({icon:s[g]});break;case 27:u.getLogger().trace("node found ..",s[g-2]),this.$={id:s[g-1],descr:s[g-1],type:u.getType(s[g-2],s[g])};break;case 28:this.$={id:s[g],descr:s[g],type:0};break;case 29:u.getLogger().trace("node found ..",s[g-3]),this.$={id:s[g-3],descr:s[g-1],type:u.getType(s[g-2],s[g])};break;case 30:this.$=s[g-1]+s[g];break;case 31:this.$=s[g];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:f},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:f},{6:k,7:[1,10],9:9,12:11,13:l,14:14,16:y,17:v,18:17,19:18,20:S,23:d},n(R,[2,3]),{1:[2,2]},n(R,[2,4]),n(R,[2,5]),{1:[2,6],6:k,12:21,13:l,14:14,16:y,17:v,18:17,19:18,20:S,23:d},{6:k,9:22,12:11,13:l,14:14,16:y,17:v,18:17,19:18,20:S,23:d},{6:B,7:b,10:23,11:F},n(D,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:S,23:d}),n(D,[2,19]),n(D,[2,21],{15:30,24:Y}),n(D,[2,22]),n(D,[2,23]),n(O,[2,25]),n(O,[2,26]),n(O,[2,28],{20:[1,32]}),{21:[1,33]},{6:B,7:b,10:34,11:F},{1:[2,7],6:k,12:21,13:l,14:14,16:y,17:v,18:17,19:18,20:S,23:d},n(z,[2,14],{7:m,11:G}),n(P,[2,8]),n(P,[2,9]),n(P,[2,10]),n(D,[2,16],{15:37,24:Y}),n(D,[2,17]),n(D,[2,18]),n(D,[2,20],{24:J}),n(O,[2,31]),{21:[1,39]},{22:[1,40]},n(z,[2,13],{7:m,11:G}),n(P,[2,11]),n(P,[2,12]),n(D,[2,15],{24:J}),n(O,[2,30]),{22:[1,41]},n(O,[2,27]),n(O,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(c,o){if(o.recoverable)this.trace(c);else{var h=Error(c);throw h.hash=o,h}},"parseError"),parse:e(function(c){var o=this,h=[0],u=[],p=[null],s=[],U=this.table,g="",q=0,he=0,ue=0,be=2,ge=1,ye=s.slice.call(arguments,1),_=Object.create(this.lexer),H={yy:{}};for(var te in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,te))H.yy[te]=this.yy[te];if(_.setInput(c,H.yy),H.yy.lexer=_,H.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var ne=_.yylloc;s.push(ne);var ke=_.options&&_.options.ranges;if(typeof H.yy.parseError==="function")this.parseError=H.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function me(C){h.length=h.length-2*C,p.length=p.length-C,s.length=s.length-C}e(me,"popStack");function de(){var C=u.pop()||_.lex()||ge;if(typeof C!=="number"){if(C instanceof Array)u=C,C=u.pop();C=o.symbols_[C]||C}return C}e(de,"lex");var L,ie,W,I,Ge,re,K={},Q,j,pe,Z;while(!0){if(W=h[h.length-1],this.defaultActions[W])I=this.defaultActions[W];else{if(L===null||typeof L>"u")L=de();I=U[W]&&U[W][L]}if(typeof I>"u"||!I.length||!I[0]){var se="";Z=[];for(Q in U[W])if(this.terminals_[Q]&&Q>be)Z.push("'"+this.terminals_[Q]+"'");if(_.showPosition)se="Parse error on line "+(q+1)+`:
|
|
2
|
+
`+_.showPosition()+`
|
|
3
|
+
Expecting `+Z.join(", ")+", got '"+(this.terminals_[L]||L)+"'";else se="Parse error on line "+(q+1)+": Unexpected "+(L==ge?"end of input":"'"+(this.terminals_[L]||L)+"'");this.parseError(se,{text:_.match,token:this.terminals_[L]||L,line:_.yylineno,loc:ne,expected:Z})}if(I[0]instanceof Array&&I.length>1)throw Error("Parse Error: multiple actions possible at state: "+W+", token: "+L);switch(I[0]){case 1:if(h.push(L),p.push(_.yytext),s.push(_.yylloc),h.push(I[1]),L=null,!ie){if(he=_.yyleng,g=_.yytext,q=_.yylineno,ne=_.yylloc,ue>0)ue--}else L=ie,ie=null;break;case 2:if(j=this.productions_[I[1]][1],K.$=p[p.length-j],K._$={first_line:s[s.length-(j||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(j||1)].first_column,last_column:s[s.length-1].last_column},ke)K._$.range=[s[s.length-(j||1)].range[0],s[s.length-1].range[1]];if(re=this.performAction.apply(K,[g,he,q,H.yy,I[1],p,s].concat(ye)),typeof re<"u")return re;if(j)h=h.slice(0,-1*j*2),p=p.slice(0,-1*j),s=s.slice(0,-1*j);h.push(this.productions_[I[1]][0]),p.push(K.$),s.push(K._$),pe=U[h[h.length-2]][h[h.length-1]],h.push(pe);break;case 3:return!0}}return!0},"parse")},ee=function(){var V={EOF:1,parseError:e(function(o,h){if(this.yy.parser)this.yy.parser.parseError(o,h);else throw Error(o)},"parseError"),setInput:e(function(c,o){if(this.yy=o||this.yy||{},this._input=c,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 c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var o=c.match(/(?:\r\n?|\n).*/g);if(o)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),c},"input"),unput:e(function(c){var o=c.length,h=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var u=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),h.length-1)this.yylineno-=h.length-1;var p=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:h?(h.length===u.length?this.yylloc.first_column:0)+u[u.length-h.length].length-h[0].length:this.yylloc.first_column-o},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-o];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(c){this.unput(this.match.slice(c))},"less"),pastInput:e(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var c=this.match;if(c.length<20)c+=this._input.substr(0,20-c.length);return(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var c=this.pastInput(),o=Array(c.length+1).join("-");return c+this.upcomingInput()+`
|
|
5
|
+
`+o+"^"},"showPosition"),test_match:e(function(c,o){var h,u,p;if(this.options.backtrack_lexer){if(p={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)p.yylloc.range=this.yylloc.range.slice(0)}if(u=c[0].match(/(?:\r\n?|\n).*/g),u)this.yylineno+=u.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+c[0].length},this.yytext+=c[0],this.match+=c[0],this.matches=c,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(c[0].length),this.matched+=c[0],h=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(h)return h;else if(this._backtrack){for(var s in p)this[s]=p[s];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var c,o,h,u;if(!this._more)this.yytext="",this.match="";var p=this._currentRules();for(var s=0;s<p.length;s++)if(h=this._input.match(this.rules[p[s]]),h&&(!o||h[0].length>o[0].length)){if(o=h,u=s,this.options.backtrack_lexer)if(c=this.test_match(h,p[s]),c!==!1)return c;else if(this._backtrack){o=!1;continue}else return!1;else if(!this.options.flex)break}if(o){if(c=this.test_match(o,p[u]),c!==!1)return c;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 o=this.next();if(o)return o;else return this.lex()},"lex"),begin:e(function(o){this.conditionStack.push(o)},"begin"),popState:e(function(){var o=this.conditionStack.length-1;if(o>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(o){if(o=this.conditionStack.length-1-Math.abs(o||0),o>=0)return this.conditionStack[o];else return"INITIAL"},"topState"),pushState:e(function(o){this.begin(o)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(o,h,u,p){var s=p;switch(u){case 0:return this.pushState("shapeData"),h.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let U=/\n\s*/g;return h.yytext=h.yytext.replace(U,"<br/>"),24;break;case 4:return 24;case 5:this.popState();break;case 6:return o.getLogger().trace("Found comment",h.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:o.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return o.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:o.getLogger().trace("end icon"),this.popState();break;case 16:return o.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return o.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return o.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return o.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:o.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return o.getLogger().trace("description:",h.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),o.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),o.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),o.getLogger().trace("node end ...",h.yytext),"NODE_DEND";break;case 36:return this.popState(),o.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),o.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),o.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),o.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),o.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return o.getLogger().trace("Long description:",h.yytext),21;break;case 42:return o.getLogger().trace("Long description:",h.yytext),21;break}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return V}();M.lexer=ee;function X(){this.yy={}}return e(X,"Parser"),X.prototype=M,M.Parser=X,new X}();ae.parser=ae;var Ee=ae,T=[],ce=[],oe=0,le={},_e=e(()=>{T=[],ce=[],oe=0,le={}},"clear"),Se=e((n)=>{if(T.length===0)return null;let f=T[0].level,k=null;for(let l=T.length-1;l>=0;l--){if(T[l].level===f&&!k)k=T[l];if(T[l].level<f)throw Error('Items without section detected, found section ("'+T[l].label+'")')}if(n===k?.level)return null;return k},"getSection"),fe=e(function(){return ce},"getSections"),Ne=e(function(){let n=[],f=[],k=fe(),l=r();for(let y of k){let v={id:y.id,label:w(y.label??"",l),labelType:"markdown",isGroup:!0,ticket:y.ticket,shape:"kanbanSection",level:y.level,look:l.look};f.push(v);let S=T.filter((d)=>d.parentId===y.id);for(let d of S){let R={id:d.id,parentId:y.id,label:w(d.label??"",l),labelType:"markdown",isGroup:!1,ticket:d?.ticket,priority:d?.priority,assigned:d?.assigned,icon:d?.icon,shape:"kanbanItem",level:d.level,rx:5,ry:5,cssStyles:["text-align: left"]};f.push(R)}}return{nodes:f,edges:n,other:{},config:r()}},"getData"),xe=e((n,f,k,l,y)=>{let v=r(),S=v.mindmap?.padding??x.mindmap.padding;switch(l){case E.ROUNDED_RECT:case E.RECT:case E.HEXAGON:S*=2}let d={id:w(f,v)||"kbn"+oe++,level:n,label:w(k,v),width:v.mindmap?.maxNodeWidth??x.mindmap.maxNodeWidth,padding:S,isGroup:!1};if(y!==void 0){let B;if(!y.includes(`
|
|
7
|
+
`))B=`{
|
|
8
|
+
`+y+`
|
|
9
|
+
}`;else B=y+`
|
|
10
|
+
`;let b=Je(B,{schema:Ze});if(b.shape&&(b.shape!==b.shape.toLowerCase()||b.shape.includes("_")))throw Error(`No such shape: ${b.shape}. Shape names should be lowercase.`);if(b?.shape&&b.shape==="kanbanItem")d.shape=b?.shape;if(b?.label)d.label=b?.label;if(b?.icon)d.icon=b?.icon.toString();if(b?.assigned)d.assigned=b?.assigned.toString();if(b?.ticket)d.ticket=b?.ticket.toString();if(b?.priority)d.priority=b?.priority}let R=Se(n);if(R)d.parentId=R.id||"kbn"+oe++;else ce.push(d);T.push(d)},"addNode"),E={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},ve=e((n,f)=>{switch(t.debug("In get type",n,f),n){case"[":return E.RECT;case"(":return f===")"?E.ROUNDED_RECT:E.CLOUD;case"((":return E.CIRCLE;case")":return E.CLOUD;case"))":return E.BANG;case"{{":return E.HEXAGON;default:return E.DEFAULT}},"getType"),De=e((n,f)=>{le[n]=f},"setElementForId"),Le=e((n)=>{if(!n)return;let f=r(),k=T[T.length-1];if(n.icon)k.icon=w(n.icon,f);if(n.class)k.cssClasses=w(n.class,f)},"decorateNode"),Oe=e((n)=>{switch(n){case E.DEFAULT:return"no-border";case E.RECT:return"rect";case E.ROUNDED_RECT:return"rounded-rect";case E.CIRCLE:return"circle";case E.CLOUD:return"cloud";case E.BANG:return"bang";case E.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Ce=e(()=>t,"getLogger"),Ae=e((n)=>le[n],"getElementById"),Te={clear:_e,addNode:xe,getSections:fe,getData:Ne,nodeType:E,getType:ve,setElementForId:De,decorateNode:Le,type2Str:Oe,getLogger:Ce,getElementById:Ae},Re=Te,Pe=e(async(n,f,k,l)=>{t.debug(`Rendering kanban diagram
|
|
11
|
+
`+n);let v=l.db.getData(),S=r();S.htmlLabels=!1;let d=A(f);for(let m of v.nodes)m.domId=`${f}-${m.id}`;let R=d.append("g");R.attr("class","sections");let B=d.append("g");B.attr("class","items");let b=v.nodes.filter((m)=>m.isGroup),F=0,D=10,Y=[],O=25;for(let m of b){let G=S?.kanban?.sectionWidth||200;F=F+1,m.x=G*F+(F-1)*D/2,m.width=G,m.y=0,m.height=G*3,m.rx=5,m.ry=5,m.cssClasses=m.cssClasses+" section-"+F;let P=await ct(R,m);O=Math.max(O,P?.labelBBox?.height),Y.push(P)}let z=0;for(let m of b){let G=Y[z];z=z+1;let P=S?.kanban?.sectionWidth||200,J=-P*3/2+O,M=J,ee=v.nodes.filter((c)=>c.parentId===m.id);for(let c of ee){if(c.isGroup)throw Error("Groups within groups are not allowed in Kanban diagrams");c.x=m.x,c.width=P-1.5*D;let h=(await Qe(B,c,{config:S})).node().getBBox();c.y=M+h.height/2,await yt(c),M=c.y+h.height/2+D/2}let X=G.cluster.select("rect"),V=Math.max(M-J+3*D,50)+(O-25);X.attr("height",V)}Ie(void 0,d,S.mindmap?.padding??x.kanban.padding,S.mindmap?.useMaxWidth??x.kanban.useMaxWidth)},"draw"),Ve={draw:Pe},Be=e((n)=>{let f="";for(let l=0;l<n.THEME_COLOR_LIMIT;l++)if(n["lineColor"+l]=n["lineColor"+l]||n["cScaleInv"+l],N(n["lineColor"+l]))n["lineColor"+l]=i(n["lineColor"+l],20);else n["lineColor"+l]=a(n["lineColor"+l],20);let k=e((l,y)=>n.darkMode?a(l,y):i(l,y),"adjuster");for(let l=0;l<n.THEME_COLOR_LIMIT;l++){let y=""+(17-3*l);f+=`
|
|
12
|
+
.section-${l-1} rect, .section-${l-1} path, .section-${l-1} circle, .section-${l-1} polygon, .section-${l-1} path {
|
|
13
|
+
fill: ${k(n["cScale"+l],10)};
|
|
14
|
+
stroke: ${k(n["cScale"+l],10)};
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
.section-${l-1} text {
|
|
18
|
+
fill: ${n["cScaleLabel"+l]};
|
|
19
|
+
}
|
|
20
|
+
.node-icon-${l-1} {
|
|
21
|
+
font-size: 40px;
|
|
22
|
+
color: ${n["cScaleLabel"+l]};
|
|
23
|
+
}
|
|
24
|
+
.section-edge-${l-1}{
|
|
25
|
+
stroke: ${n["cScale"+l]};
|
|
26
|
+
}
|
|
27
|
+
.edge-depth-${l-1}{
|
|
28
|
+
stroke-width: ${y};
|
|
29
|
+
}
|
|
30
|
+
.section-${l-1} line {
|
|
31
|
+
stroke: ${n["cScaleInv"+l]} ;
|
|
32
|
+
stroke-width: 3;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.disabled, .disabled circle, .disabled text {
|
|
36
|
+
fill: lightgray;
|
|
37
|
+
}
|
|
38
|
+
.disabled text {
|
|
39
|
+
fill: #efefef;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.node rect,
|
|
43
|
+
.node circle,
|
|
44
|
+
.node ellipse,
|
|
45
|
+
.node polygon,
|
|
46
|
+
.node path {
|
|
47
|
+
fill: ${n.background};
|
|
48
|
+
stroke: ${n.nodeBorder};
|
|
49
|
+
stroke-width: 1px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.kanban-ticket-link {
|
|
53
|
+
fill: ${n.background};
|
|
54
|
+
stroke: ${n.nodeBorder};
|
|
55
|
+
text-decoration: underline;
|
|
56
|
+
}
|
|
57
|
+
`}return f},"genSections"),je=e((n)=>`
|
|
58
|
+
.edge {
|
|
59
|
+
stroke-width: 3;
|
|
60
|
+
}
|
|
61
|
+
${Be(n)}
|
|
62
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
63
|
+
fill: ${n.git0};
|
|
64
|
+
}
|
|
65
|
+
.section-root text {
|
|
66
|
+
fill: ${n.gitBranchLabel0};
|
|
67
|
+
}
|
|
68
|
+
.icon-container {
|
|
69
|
+
height:100%;
|
|
70
|
+
display: flex;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
align-items: center;
|
|
73
|
+
}
|
|
74
|
+
.edge {
|
|
75
|
+
fill: none;
|
|
76
|
+
}
|
|
77
|
+
.cluster-label, .label {
|
|
78
|
+
color: ${n.textColor};
|
|
79
|
+
fill: ${n.textColor};
|
|
80
|
+
}
|
|
81
|
+
.kanban-label {
|
|
82
|
+
dy: 1em;
|
|
83
|
+
alignment-baseline: middle;
|
|
84
|
+
text-anchor: middle;
|
|
85
|
+
dominant-baseline: middle;
|
|
86
|
+
text-align: center;
|
|
87
|
+
}
|
|
88
|
+
${we()}
|
|
89
|
+
`,"getStyles"),Fe=je,it={db:Re,renderer:Ve,parser:Ee,styles:Fe};export{it as diagram};
|