@loopstack/loopstack-studio 0.28.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/rolldown_runtime.js +13 -15
- package/dist/components/dynamic-form/Form.js +49 -52
- package/dist/config.js +6 -0
- package/dist/features/debug/components/WorkflowFlowViewer.js +94 -81
- package/dist/features/debug/components/workflow-flow/StateNode.js +154 -79
- package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +43 -31
- package/dist/features/debug/components/workflow-flow/WorkflowTransitionEdge.js +52 -51
- package/dist/features/debug/lib/edge-paths.js +45 -30
- package/dist/features/debug/lib/flow-types.js +2 -0
- package/dist/features/debug/lib/flow-utils.js +66 -64
- package/dist/features/documents/components/DocumentList.js +19 -18
- package/dist/features/workbench/WorkflowItem.js +4 -3
- package/dist/features/workbench/components/EmbedLogsContent.js +5 -0
- package/dist/features/workbench/components/PreviewEmptyState.js +10 -0
- package/dist/features/workbench/components/PreviewWorkbench.js +14 -0
- package/dist/features/workbench/components/RecentRunItem.js +48 -0
- package/dist/features/workbench/components/WorkflowForms.js +4 -3
- package/dist/features/workbench/hooks/useEmbedBridge.js +3 -0
- package/dist/features/workbench/hooks/useWorkflowData.js +9 -9
- package/dist/features/workbench/index.js +4 -0
- package/dist/features/workspaces/components/ExecutionTimeline.js +9 -8
- package/dist/loopstack-studio.css +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{architecture-YZFGNWBL.js → architecture-7EHR7CIX.js} +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-7N4EOEYR.js → chunk-4EGX6M5U.js} +9 -13
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-KGLVRYIC.js → chunk-5DO6E6H7.js} +3 -7
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-BR22UD5L.js +56 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-2KRD3SAO.js → chunk-FHYWG6QK.js} +3 -7
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-FOC6F5B3.js → chunk-MPE355IW.js} +3 -7
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MZUSXYTE.js +24 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-N66VUXT2.js +48 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-NNHCCRGN.js +20219 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-PUPMXCY4.js +19 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-67CJDMHE.js → chunk-UIBZB4QT.js} +3 -7
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WCWK7LTN.js +25 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/eventmodeling-FCH6USID.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{gitGraph-7Q5UKJZL.js → gitGraph-WXDBUCRP.js} +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-J43DQDTF.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-YPE3B663.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-LRSECV5Y.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-GUYGQ44K.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{treeView-SZITEDCU.js → treeView-BLDUP644.js} +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-LRROVOQU.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-L42UT6IY.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +24 -19
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +36 -26
- package/dist/node_modules/@xyflow/react/dist/esm/index.js +1 -1
- package/dist/node_modules/cytoscape/dist/cytoscape.esm.js +257 -254
- package/dist/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +19 -19
- package/dist/node_modules/dagre-d3-es/src/dagre/layout.js +48 -48
- package/dist/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +9 -9
- package/dist/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +3 -3
- package/dist/node_modules/dagre-d3-es/src/dagre/order/index.js +11 -11
- package/dist/node_modules/dagre-d3-es/src/dagre/order/init-order.js +4 -4
- package/dist/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +4 -4
- package/dist/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +8 -8
- package/dist/node_modules/dagre-d3-es/src/dagre/order/sort.js +5 -5
- package/dist/node_modules/dagre-d3-es/src/dagre/position/bk.js +72 -72
- package/dist/node_modules/dagre-d3-es/src/dagre/position/index.js +1 -1
- package/dist/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +25 -25
- package/dist/node_modules/dagre-d3-es/src/dagre/rank/util.js +8 -8
- package/dist/node_modules/dagre-d3-es/src/dagre/util.js +48 -48
- package/dist/node_modules/dagre-d3-es/src/graphlib/graph.js +109 -109
- package/dist/node_modules/dagre-d3-es/src/graphlib/json.js +17 -17
- package/dist/node_modules/dompurify/dist/purify.es.js +293 -205
- package/dist/node_modules/es-toolkit/dist/_internal/globalThis.js +4 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.js +4 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js +4 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getTag.js +4 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js +5 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/tags.js +2 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/memoize.js +12 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/clone.js +97 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +5 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js +29 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/merge.js +6 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mergeWith.js +49 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArguments.js +5 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArray.js +4 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js +5 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.js +6 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js +16 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js +4 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js +12 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js +5 -0
- package/dist/node_modules/es-toolkit/dist/function/noop.js +2 -0
- package/dist/node_modules/es-toolkit/dist/object/clone.js +29 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeepWith.js +114 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isBuffer.js +5 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isLength.js +4 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPrimitive.js +4 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isTypedArray.js +4 -0
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.js +2 -2
- package/dist/node_modules/internmap/src/index.js +1 -1
- package/dist/node_modules/katex/dist/katex.js +379 -417
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +3 -3
- package/dist/node_modules/lodash-es/_assignMergeValue.js +1 -1
- package/dist/node_modules/lodash-es/_assignValue.js +1 -1
- package/dist/node_modules/lodash-es/_baseClone.js +9 -9
- package/dist/node_modules/lodash-es/_baseForOwn.js +1 -1
- package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +1 -1
- package/dist/node_modules/lodash-es/_baseMatchesProperty.js +6 -6
- package/dist/node_modules/lodash-es/_baseMerge.js +2 -2
- package/dist/node_modules/lodash-es/_baseMergeDeep.js +7 -7
- package/dist/node_modules/lodash-es/_baseOrderBy.js +12 -12
- package/dist/node_modules/lodash-es/_baseRest.js +1 -1
- package/dist/node_modules/lodash-es/_baseSet.js +1 -1
- package/dist/node_modules/lodash-es/_baseSetToString.js +3 -3
- package/dist/node_modules/lodash-es/_baseToString.js +2 -2
- package/dist/node_modules/lodash-es/_baseUniq.js +1 -1
- package/dist/node_modules/lodash-es/_createRange.js +1 -1
- package/dist/node_modules/lodash-es/_createSet.js +3 -3
- package/dist/node_modules/lodash-es/_flatRest.js +1 -1
- package/dist/node_modules/lodash-es/_getAllKeys.js +2 -2
- package/dist/node_modules/lodash-es/_getAllKeysIn.js +1 -1
- package/dist/node_modules/lodash-es/_getSymbolsIn.js +1 -1
- package/dist/node_modules/lodash-es/_getTag.js +1 -1
- package/dist/node_modules/lodash-es/_hasPath.js +2 -2
- package/dist/node_modules/lodash-es/_initCloneByTag.js +1 -1
- package/dist/node_modules/lodash-es/_initCloneObject.js +1 -1
- package/dist/node_modules/lodash-es/_isFlattenable.js +1 -1
- package/dist/node_modules/lodash-es/_isIterateeCall.js +1 -1
- package/dist/node_modules/lodash-es/_isKey.js +1 -1
- package/dist/node_modules/lodash-es/_setToString.js +1 -1
- package/dist/node_modules/lodash-es/defaults.js +1 -1
- package/dist/node_modules/lodash-es/findIndex.js +2 -2
- package/dist/node_modules/lodash-es/forEach.js +1 -1
- package/dist/node_modules/lodash-es/forIn.js +1 -1
- package/dist/node_modules/lodash-es/isEmpty.js +2 -2
- package/dist/node_modules/lodash-es/isPlainObject.js +1 -1
- package/dist/node_modules/lodash-es/map.js +1 -1
- package/dist/node_modules/lodash-es/max.js +1 -1
- package/dist/node_modules/lodash-es/merge.js +3 -3
- package/dist/node_modules/lodash-es/min.js +1 -1
- package/dist/node_modules/lodash-es/minBy.js +1 -1
- package/dist/node_modules/lodash-es/reduce.js +1 -1
- package/dist/node_modules/lodash-es/toNumber.js +1 -1
- package/dist/node_modules/lodash-es/union.js +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{architectureDiagram-Q4EWVU46.js → architectureDiagram-3BPJPVTR.js} +310 -308
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{blockDiagram-DXYQGD6D.js → blockDiagram-GPEHLZMM.js} +215 -190
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{c4Diagram-AHTNJAMY.js → c4Diagram-AAUBKEIU.js} +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-EDXVE4YY.js → chunk-2J33WTMH.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-5FUZZQ4R.js → chunk-3OPIFGDE.js} +48 -20
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-5PVQY5BW.js → chunk-5ZQYHXKU.js} +8 -8
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-4TB4RGXK.js → chunk-727SXJPM.js} +555 -459
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-OYMX7WX6.js → chunk-AQP2D5EJ.js} +155 -145
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-ICPOFSXX.js → chunk-CSCIHK7Q.js} +106 -12
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-ENJZ2VHE.js → chunk-KSCS5N6A.js} +12 -12
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-ZZ45TVLE.js → chunk-L5ZTLDWV.js} +2 -2
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-336JU56O.js → chunk-LZXEDZCA.js} +5 -5
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-YZCP3GAM.js → chunk-ND2GUHAM.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-X2U36JSP.js → chunk-NZK2D7GU.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-U2HBQHQK.js → chunk-O5CBEL6O.js} +2 -2
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-426QAEUC.js → chunk-WU5MYG2G.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{classDiagram-6PBFFD2Q.js → classDiagram-4FO5ZUOK.js} +11 -11
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{classDiagram-v2-HSJHXN6E.js → classDiagram-v2-Q7XG4LA2.js} +11 -11
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{dagre-KV5264BT.js → dagre-BM42HDAG.js} +8 -8
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-MMDJMWI5.js → diagram-2AECGRRQ.js} +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-5BDNPKRD.js → diagram-5GNKFQAL.js} +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-KO2AKTUF.js +433 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-TYMM5635.js → diagram-LMA3HP47.js} +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-G4DWMVQ6.js → diagram-OG6HWLK6.js} +5 -5
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{erDiagram-SMLLAGMA.js → erDiagram-TEJ5UH35.js} +9 -9
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{flowDiagram-DWJPFMVM.js → flowDiagram-I6XJVG4X.js} +10 -10
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{ganttDiagram-T4ZO3ILL.js → ganttDiagram-6RSMTGT7.js} +7 -4
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{gitGraphDiagram-UUTBAWPF.js → gitGraphDiagram-PVQCEYII.js} +2 -2
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{infoDiagram-42DDH7IO.js → infoDiagram-5YYISTIA.js} +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{ishikawaDiagram-UXIWVN3A.js → ishikawaDiagram-YF4QCWOH.js} +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{journeyDiagram-VCZTEJTY.js → journeyDiagram-JHISSGLW.js} +2 -2
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{kanban-definition-6JOO6SKY.js → kanban-definition-UN3LZRKU.js} +7 -7
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{mindmap-definition-QFDTVHPH.js → mindmap-definition-RKZ34NQL.js} +9 -9
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{pieDiagram-DEJITSTG.js → pieDiagram-4H26LBE5.js} +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{quadrantDiagram-34T5L4WZ.js → quadrantDiagram-W4KKPZXB.js} +364 -337
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{requirementDiagram-MS252O5E.js → requirementDiagram-4Y6WPE33.js} +9 -9
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{sankeyDiagram-XADWPNL6.js → sankeyDiagram-5OEKKPKP.js} +187 -138
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{sequenceDiagram-FGHM5R23.js → sequenceDiagram-3UESZ5HK.js} +15 -8
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{stateDiagram-FHFEXIEX.js → stateDiagram-AJRCARHV.js} +10 -10
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{stateDiagram-v2-QKLJ7IA2.js → stateDiagram-v2-BHNVJYJU.js} +10 -10
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{timeline-definition-GMOUNBTQ.js → timeline-definition-PNZ67QCA.js} +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{vennDiagram-DHZGUBPP.js → vennDiagram-CIIHVFJN.js} +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-YWT4CUSO.js +640 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{xychartDiagram-5P7HB3ND.js → xychartDiagram-2RQKCTM6.js} +4 -4
- package/dist/node_modules/mermaid/dist/mermaid.core.js +96 -70
- package/dist/node_modules/stylis/src/Enum.js +2 -2
- package/dist/node_modules/stylis/src/Middleware.js +9 -0
- package/dist/node_modules/stylis/src/Parser.js +55 -44
- package/dist/node_modules/stylis/src/Utility.js +9 -12
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/packages/contracts/dist/enums/index.js +4 -24
- package/dist/packages/contracts/dist/enums/registry.enum.js +9 -20
- package/dist/packages/contracts/dist/enums/sort-order.enum.js +5 -10
- package/dist/packages/contracts/dist/enums/user-type.enum.js +5 -10
- package/dist/packages/contracts/dist/enums/workflow-state.enum.js +5 -10
- package/dist/pages/EmbedWorkbenchPage.js +4 -3
- package/dist/pages/PreviewWorkbenchPage.js +126 -124
- package/dist/pages/StudioLandingPage.js +28 -72
- package/package.json +2 -2
- package/dist/node_modules/@chevrotain/gast/lib/src/helpers.js +0 -23
- package/dist/node_modules/@chevrotain/gast/lib/src/model.js +0 -151
- package/dist/node_modules/@chevrotain/gast/lib/src/visitor.js +0 -40
- package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js +0 -2
- package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js +0 -85
- package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js +0 -35
- package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js +0 -570
- package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js +0 -25
- package/dist/node_modules/@chevrotain/utils/lib/src/print.js +0 -9
- package/dist/node_modules/@chevrotain/utils/lib/src/timer.js +0 -8
- package/dist/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js +0 -10
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-AA7GKIK3.js +0 -28
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js +0 -23
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js +0 -1197
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LIHQZDEY.js +0 -60
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js +0 -29
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-OMHHGYJF.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-4T2RLAQJ.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-ZZUOXDRM.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-PYXPWWZC.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-W4RFUUIX.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-RL74JXVD.js +0 -3
- package/dist/node_modules/chevrotain/lib/src/api.js +0 -10
- package/dist/node_modules/chevrotain/lib/src/lang/lang_extensions.js +0 -10
- package/dist/node_modules/chevrotain/lib/src/parse/constants.js +0 -2
- package/dist/node_modules/chevrotain/lib/src/parse/cst/cst.js +0 -13
- package/dist/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +0 -49
- package/dist/node_modules/chevrotain/lib/src/parse/errors_public.js +0 -77
- package/dist/node_modules/chevrotain/lib/src/parse/exceptions_public.js +0 -33
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/checks.js +0 -275
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/first.js +0 -23
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/follow.js +0 -28
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +0 -14
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +0 -262
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/keys.js +0 -5
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js +0 -41
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +0 -241
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +0 -30
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/rest.js +0 -56
- package/dist/node_modules/chevrotain/lib/src/parse/parser/parser.js +0 -114
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +0 -46
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +0 -166
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +0 -43
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +0 -107
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +0 -21
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +0 -312
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +0 -285
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +0 -144
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +0 -92
- package/dist/node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js +0 -11
- package/dist/node_modules/chevrotain/lib/src/scan/lexer.js +0 -437
- package/dist/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js +0 -9
- package/dist/node_modules/chevrotain/lib/src/scan/lexer_public.js +0 -253
- package/dist/node_modules/chevrotain/lib/src/scan/reg_exp.js +0 -152
- package/dist/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js +0 -15
- package/dist/node_modules/chevrotain/lib/src/scan/tokens.js +0 -65
- package/dist/node_modules/chevrotain/lib/src/scan/tokens_public.js +0 -39
- package/dist/node_modules/chevrotain-allstar/lib/all-star-lookahead.js +0 -346
- package/dist/node_modules/chevrotain-allstar/lib/atn.js +0 -194
- package/dist/node_modules/chevrotain-allstar/lib/dfa.js +0 -32
- package/dist/node_modules/chevrotain-allstar/lib/index.js +0 -1
- package/dist/node_modules/langium/lib/default-module.js +0 -85
- package/dist/node_modules/langium/lib/dependency-injection.js +0 -62
- package/dist/node_modules/langium/lib/documentation/comment-provider.js +0 -11
- package/dist/node_modules/langium/lib/documentation/documentation-provider.js +0 -36
- package/dist/node_modules/langium/lib/documentation/jsdoc.js +0 -303
- package/dist/node_modules/langium/lib/index.js +0 -182
- package/dist/node_modules/langium/lib/languages/generated/ast.js +0 -1089
- package/dist/node_modules/langium/lib/languages/grammar-config.js +0 -13
- package/dist/node_modules/langium/lib/parser/async-parser.js +0 -83
- package/dist/node_modules/langium/lib/parser/completion-parser-builder.js +0 -7
- package/dist/node_modules/langium/lib/parser/cst-node-builder.js +0 -160
- package/dist/node_modules/langium/lib/parser/indentation-aware.js +0 -141
- package/dist/node_modules/langium/lib/parser/langium-parser-builder.js +0 -11
- package/dist/node_modules/langium/lib/parser/langium-parser.js +0 -388
- package/dist/node_modules/langium/lib/parser/lexer.js +0 -50
- package/dist/node_modules/langium/lib/parser/parser-builder-base.js +0 -275
- package/dist/node_modules/langium/lib/parser/token-builder.js +0 -61
- package/dist/node_modules/langium/lib/parser/value-converter.js +0 -78
- package/dist/node_modules/langium/lib/references/linker.js +0 -190
- package/dist/node_modules/langium/lib/references/name-provider.js +0 -13
- package/dist/node_modules/langium/lib/references/references.js +0 -76
- package/dist/node_modules/langium/lib/references/scope-computation.js +0 -35
- package/dist/node_modules/langium/lib/references/scope-provider.js +0 -34
- package/dist/node_modules/langium/lib/references/scope.js +0 -73
- package/dist/node_modules/langium/lib/serializer/hydrator.js +0 -125
- package/dist/node_modules/langium/lib/serializer/json-serializer.js +0 -145
- package/dist/node_modules/langium/lib/service-registry.js +0 -37
- package/dist/node_modules/langium/lib/syntax-tree.js +0 -70
- package/dist/node_modules/langium/lib/utils/ast-utils.js +0 -157
- package/dist/node_modules/langium/lib/utils/caching.js +0 -91
- package/dist/node_modules/langium/lib/utils/cancellation.js +0 -5
- package/dist/node_modules/langium/lib/utils/collections.js +0 -85
- package/dist/node_modules/langium/lib/utils/cst-utils.js +0 -190
- package/dist/node_modules/langium/lib/utils/disposable.js +0 -8
- package/dist/node_modules/langium/lib/utils/errors.js +0 -12
- package/dist/node_modules/langium/lib/utils/event.js +0 -5
- package/dist/node_modules/langium/lib/utils/grammar-loader.js +0 -22
- package/dist/node_modules/langium/lib/utils/grammar-utils.js +0 -296
- package/dist/node_modules/langium/lib/utils/index.js +0 -53
- package/dist/node_modules/langium/lib/utils/promise-utils.js +0 -30
- package/dist/node_modules/langium/lib/utils/regexp-utils.js +0 -167
- package/dist/node_modules/langium/lib/utils/stream.js +0 -327
- package/dist/node_modules/langium/lib/utils/uri-utils.js +0 -107
- package/dist/node_modules/langium/lib/validation/document-validator.js +0 -210
- package/dist/node_modules/langium/lib/validation/validation-registry.js +0 -87
- package/dist/node_modules/langium/lib/workspace/ast-descriptions.js +0 -57
- package/dist/node_modules/langium/lib/workspace/ast-node-locator.js +0 -28
- package/dist/node_modules/langium/lib/workspace/configuration.js +0 -51
- package/dist/node_modules/langium/lib/workspace/document-builder.js +0 -201
- package/dist/node_modules/langium/lib/workspace/documents.js +0 -142
- package/dist/node_modules/langium/lib/workspace/file-system-provider.js +0 -34
- package/dist/node_modules/langium/lib/workspace/index-manager.js +0 -49
- package/dist/node_modules/langium/lib/workspace/profiler.js +0 -89
- package/dist/node_modules/langium/lib/workspace/workspace-lock.js +0 -42
- package/dist/node_modules/langium/lib/workspace/workspace-manager.js +0 -66
- package/dist/node_modules/lodash-es/flatMap.js +0 -7
- package/dist/node_modules/lodash-es/uniqBy.js +0 -7
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-NUSXRM2D.js +0 -574
- package/dist/node_modules/vscode-jsonrpc/browser.js +0 -7
- package/dist/node_modules/vscode-jsonrpc/lib/browser/main.js +0 -52
- package/dist/node_modules/vscode-jsonrpc/lib/browser/ril.js +0 -120
- package/dist/node_modules/vscode-jsonrpc/lib/common/api.js +0 -337
- package/dist/node_modules/vscode-jsonrpc/lib/common/cancellation.js +0 -57
- package/dist/node_modules/vscode-jsonrpc/lib/common/connection.js +0 -647
- package/dist/node_modules/vscode-jsonrpc/lib/common/disposable.js +0 -13
- package/dist/node_modules/vscode-jsonrpc/lib/common/events.js +0 -64
- package/dist/node_modules/vscode-jsonrpc/lib/common/is.js +0 -34
- package/dist/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +0 -235
- package/dist/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +0 -93
- package/dist/node_modules/vscode-jsonrpc/lib/common/messageReader.js +0 -129
- package/dist/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +0 -85
- package/dist/node_modules/vscode-jsonrpc/lib/common/messages.js +0 -161
- package/dist/node_modules/vscode-jsonrpc/lib/common/ral.js +0 -18
- package/dist/node_modules/vscode-jsonrpc/lib/common/semaphore.js +0 -44
- package/dist/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +0 -58
- package/dist/node_modules/vscode-languageserver-protocol/lib/browser/main.js +0 -28
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/api.js +0 -36
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/connection.js +0 -12
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/messages.js +0 -31
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +0 -19
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +0 -15
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +0 -11
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +0 -11
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +0 -33
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +0 -35
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +0 -15
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +0 -11
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +0 -19
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js +0 -11
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +0 -15
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +0 -674
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +0 -11
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +0 -19
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +0 -126
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +0 -24
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +0 -11
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +0 -31
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +0 -11
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +0 -11
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +0 -19
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +0 -15
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +0 -42
- package/dist/node_modules/vscode-languageserver-textdocument/lib/esm/main.js +0 -138
- package/dist/node_modules/vscode-languageserver-types/lib/esm/main.js +0 -1084
- package/dist/node_modules/vscode-uri/lib/esm/index.js +0 -373
- /package/dist/node_modules/{entities → hast-util-raw/node_modules/entities}/dist/esm/decode-codepoint.js +0 -0
- /package/dist/node_modules/{entities → hast-util-raw/node_modules/entities}/dist/esm/decode.js +0 -0
- /package/dist/node_modules/{entities → hast-util-raw/node_modules/entities}/dist/esm/generated/decode-data-html.js +0 -0
- /package/dist/node_modules/{unified/node_modules/is-plain-obj → is-plain-obj}/index.js +0 -0
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
import { __name, log } from "./chunk-AGHRB4JF.js";
|
|
2
|
+
import { clear, configureSvgSize, getAccDescription, getAccTitle, getConfig, getConfig2, getDiagramTitle, getThemeVariables3, setAccDescription, setAccTitle, setDiagramTitle } from "./chunk-CSCIHK7Q.js";
|
|
3
|
+
import { selectSvgElement } from "./chunk-WU5MYG2G.js";
|
|
4
|
+
import { cleanAndMerge } from "./chunk-5ZQYHXKU.js";
|
|
5
|
+
import { populateCommonDb } from "./chunk-4BX2VUAB.js";
|
|
6
|
+
import { parse } from "../../../../@mermaid-js/parser/dist/mermaid-parser.core.js";
|
|
7
|
+
var toPercent = /* @__PURE__ */ __name((t, u) => {
|
|
8
|
+
let d = t <= 1 ? t * 100 : t;
|
|
9
|
+
if (d < 0 || d > 100) throw Error(`${u} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${t}`);
|
|
10
|
+
return d;
|
|
11
|
+
}, "toPercent"), toCoordinates = /* @__PURE__ */ __name((t, u, d) => ({
|
|
12
|
+
x: toPercent(u, `${d} evolution`),
|
|
13
|
+
y: toPercent(t, `${d} visibility`)
|
|
14
|
+
}), "toCoordinates"), getFlowFromPort = /* @__PURE__ */ __name((t) => {
|
|
15
|
+
if (t) {
|
|
16
|
+
if (t === "+<>") return "bidirectional";
|
|
17
|
+
if (t === "+<") return "backward";
|
|
18
|
+
if (t === "+>") return "forward";
|
|
19
|
+
}
|
|
20
|
+
}, "getFlowFromPort"), extractFlowFromArrow = /* @__PURE__ */ __name((t) => {
|
|
21
|
+
if (!t?.startsWith("+")) return {};
|
|
22
|
+
let u = /^\+'([^']*)'/.exec(t)?.[1];
|
|
23
|
+
return t.includes("<>") ? {
|
|
24
|
+
flow: "bidirectional",
|
|
25
|
+
label: u
|
|
26
|
+
} : t.includes("<") ? {
|
|
27
|
+
flow: "backward",
|
|
28
|
+
label: u
|
|
29
|
+
} : t.includes(">") ? {
|
|
30
|
+
flow: "forward",
|
|
31
|
+
label: u
|
|
32
|
+
} : { label: u };
|
|
33
|
+
}, "extractFlowFromArrow"), populateDb = /* @__PURE__ */ __name((t, u) => {
|
|
34
|
+
if (populateCommonDb(t, u), t.size && u.setSize(t.size.width, t.size.height), t.evolution) {
|
|
35
|
+
let d = t.evolution.stages.map((t) => t.secondName ? `${t.name.trim()} / ${t.secondName.trim()}` : t.name.trim()), f = t.evolution.stages.filter((t) => t.boundary !== void 0).map((t) => t.boundary);
|
|
36
|
+
u.updateAxes({
|
|
37
|
+
stages: d,
|
|
38
|
+
stageBoundaries: f
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
if (t.anchors.forEach((t) => {
|
|
42
|
+
let d = toCoordinates(t.visibility, t.evolution, `Anchor "${t.name}"`);
|
|
43
|
+
u.addNode(t.name, t.name, d.x, d.y, "anchor");
|
|
44
|
+
}), t.components.forEach((t) => {
|
|
45
|
+
let d = toCoordinates(t.visibility, t.evolution, `Component "${t.name}"`), f = t.label ? (t.label.negX ? -1 : 1) * t.label.offsetX : void 0, p = t.label ? (t.label.negY ? -1 : 1) * t.label.offsetY : void 0, m = t.decorator?.strategy;
|
|
46
|
+
u.addNode(t.name, t.name, d.x, d.y, "component", f, p, t.inertia, m);
|
|
47
|
+
}), t.notes.forEach((t) => {
|
|
48
|
+
let d = toCoordinates(t.visibility, t.evolution, `Note "${t.text}"`);
|
|
49
|
+
u.addNote(t.text, d.x, d.y);
|
|
50
|
+
}), t.pipelines.forEach((t) => {
|
|
51
|
+
let d = u.getNode(t.parent);
|
|
52
|
+
if (!d || typeof d.y != "number") throw Error(`Pipeline "${t.parent}" must reference an existing component with coordinates.`);
|
|
53
|
+
let f = d.y;
|
|
54
|
+
u.startPipeline(t.parent), t.components.forEach((d) => {
|
|
55
|
+
let p = `${t.parent}_${d.name}`, m = d.label ? (d.label.negX ? -1 : 1) * d.label.offsetX : void 0, h = d.label ? (d.label.negY ? -1 : 1) * d.label.offsetY : void 0, g = toPercent(d.evolution, `Pipeline component "${d.name}" evolution`);
|
|
56
|
+
u.addNode(p, d.name, g, f, "pipeline-component", m, h), u.addPipelineComponent(t.parent, p);
|
|
57
|
+
});
|
|
58
|
+
}), t.links.forEach((t) => {
|
|
59
|
+
let d = !!t.arrow && (t.arrow.includes("-.->") || t.arrow.includes(".-.")), f = getFlowFromPort(t.fromPort) ?? getFlowFromPort(t.toPort), { flow: p, label: m } = extractFlowFromArrow(t.arrow);
|
|
60
|
+
!f && p && (f = p);
|
|
61
|
+
let h = t.linkLabel, g = m ?? h;
|
|
62
|
+
u.addLink(u.resolveNodeId(t.from), u.resolveNodeId(t.to), d, g, f);
|
|
63
|
+
}), t.evolves.forEach((t) => {
|
|
64
|
+
let d = u.getNode(t.component);
|
|
65
|
+
if (d?.y !== void 0) {
|
|
66
|
+
let f = toPercent(t.target, `Evolve target for "${t.component}"`);
|
|
67
|
+
u.addTrend(t.component, f, d.y);
|
|
68
|
+
}
|
|
69
|
+
}), t.annotations.length > 0) {
|
|
70
|
+
let d = t.annotations[0], f = toCoordinates(d.x, d.y, "Annotations box");
|
|
71
|
+
u.setAnnotationsBox(f.x, f.y);
|
|
72
|
+
}
|
|
73
|
+
t.annotation.forEach((t) => {
|
|
74
|
+
let d = toCoordinates(t.x, t.y, `Annotation ${t.number}`);
|
|
75
|
+
u.addAnnotation(t.number, [{
|
|
76
|
+
x: d.x,
|
|
77
|
+
y: d.y
|
|
78
|
+
}], t.text);
|
|
79
|
+
}), t.accelerators.forEach((t) => {
|
|
80
|
+
let d = toCoordinates(t.x, t.y, `Accelerator "${t.name}"`);
|
|
81
|
+
u.addAccelerator(t.name, d.x, d.y);
|
|
82
|
+
}), t.deaccelerators.forEach((t) => {
|
|
83
|
+
let d = toCoordinates(t.x, t.y, `Deaccelerator "${t.name}"`);
|
|
84
|
+
u.addDeaccelerator(t.name, d.x, d.y);
|
|
85
|
+
});
|
|
86
|
+
}, "populateDb"), parser = {
|
|
87
|
+
parser: { yy: void 0 },
|
|
88
|
+
parse: /* @__PURE__ */ __name(async (t) => {
|
|
89
|
+
let d = await parse("wardley", t);
|
|
90
|
+
log.debug(d);
|
|
91
|
+
let f = parser.parser?.yy;
|
|
92
|
+
if (!f || typeof f.addNode != "function") throw Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
|
|
93
|
+
populateDb(d, f);
|
|
94
|
+
}, "parse")
|
|
95
|
+
}, builder = new class {
|
|
96
|
+
constructor() {
|
|
97
|
+
this.nodes = /* @__PURE__ */ new Map(), this.links = [], this.trends = /* @__PURE__ */ new Map(), this.pipelines = /* @__PURE__ */ new Map(), this.annotations = [], this.notes = [], this.accelerators = [], this.deaccelerators = [], this.axes = {};
|
|
98
|
+
}
|
|
99
|
+
static #e = __name(this, "WardleyBuilder");
|
|
100
|
+
addNode(t) {
|
|
101
|
+
let u = this.nodes.get(t.id) ?? {
|
|
102
|
+
id: t.id,
|
|
103
|
+
label: t.label
|
|
104
|
+
}, d = {
|
|
105
|
+
...u,
|
|
106
|
+
...t,
|
|
107
|
+
className: t.className ?? u.className,
|
|
108
|
+
labelOffsetX: t.labelOffsetX ?? u.labelOffsetX,
|
|
109
|
+
labelOffsetY: t.labelOffsetY ?? u.labelOffsetY
|
|
110
|
+
};
|
|
111
|
+
this.nodes.set(t.id, d);
|
|
112
|
+
}
|
|
113
|
+
addLink(t) {
|
|
114
|
+
this.links.push(t);
|
|
115
|
+
}
|
|
116
|
+
addTrend(t) {
|
|
117
|
+
this.trends.set(t.nodeId, t);
|
|
118
|
+
}
|
|
119
|
+
startPipeline(t) {
|
|
120
|
+
this.pipelines.set(t, {
|
|
121
|
+
nodeId: t,
|
|
122
|
+
componentIds: []
|
|
123
|
+
});
|
|
124
|
+
let u = this.nodes.get(t);
|
|
125
|
+
u && (u.isPipelineParent = !0);
|
|
126
|
+
}
|
|
127
|
+
addPipelineComponent(t, u) {
|
|
128
|
+
let d = this.pipelines.get(t);
|
|
129
|
+
d && d.componentIds.push(u);
|
|
130
|
+
let f = this.nodes.get(u);
|
|
131
|
+
f && (f.inPipeline = !0);
|
|
132
|
+
}
|
|
133
|
+
addAnnotation(t) {
|
|
134
|
+
this.annotations.push(t);
|
|
135
|
+
}
|
|
136
|
+
addNote(t) {
|
|
137
|
+
this.notes.push(t);
|
|
138
|
+
}
|
|
139
|
+
addAccelerator(t) {
|
|
140
|
+
this.accelerators.push(t);
|
|
141
|
+
}
|
|
142
|
+
addDeaccelerator(t) {
|
|
143
|
+
this.deaccelerators.push(t);
|
|
144
|
+
}
|
|
145
|
+
setAnnotationsBox(t, u) {
|
|
146
|
+
this.annotationsBox = {
|
|
147
|
+
x: t,
|
|
148
|
+
y: u
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
setAxes(t) {
|
|
152
|
+
this.axes = {
|
|
153
|
+
...this.axes,
|
|
154
|
+
...t
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
setSize(t, u) {
|
|
158
|
+
this.size = {
|
|
159
|
+
width: t,
|
|
160
|
+
height: u
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
getNode(t) {
|
|
164
|
+
return this.nodes.get(t);
|
|
165
|
+
}
|
|
166
|
+
resolveNodeId(t) {
|
|
167
|
+
if (this.nodes.has(t)) return t;
|
|
168
|
+
for (let [u, d] of this.nodes) if (d.label === t) return u;
|
|
169
|
+
return t;
|
|
170
|
+
}
|
|
171
|
+
build() {
|
|
172
|
+
let t = [];
|
|
173
|
+
for (let u of this.nodes.values()) {
|
|
174
|
+
if (typeof u.x != "number" || typeof u.y != "number") throw Error(`Node "${u.label}" is missing coordinates`);
|
|
175
|
+
t.push(u);
|
|
176
|
+
}
|
|
177
|
+
return {
|
|
178
|
+
nodes: t,
|
|
179
|
+
links: [...this.links],
|
|
180
|
+
trends: [...this.trends.values()],
|
|
181
|
+
pipelines: [...this.pipelines.values()],
|
|
182
|
+
annotations: [...this.annotations],
|
|
183
|
+
notes: [...this.notes],
|
|
184
|
+
accelerators: [...this.accelerators],
|
|
185
|
+
deaccelerators: [...this.deaccelerators],
|
|
186
|
+
annotationsBox: this.annotationsBox,
|
|
187
|
+
axes: { ...this.axes },
|
|
188
|
+
size: this.size
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
clear() {
|
|
192
|
+
this.nodes.clear(), this.links = [], this.trends.clear(), this.pipelines.clear(), this.annotations = [], this.notes = [], this.accelerators = [], this.deaccelerators = [], this.annotationsBox = void 0, this.axes = {}, this.size = void 0;
|
|
193
|
+
}
|
|
194
|
+
}();
|
|
195
|
+
function getConfig3() {
|
|
196
|
+
return getConfig2()["wardley-beta"];
|
|
197
|
+
}
|
|
198
|
+
__name(getConfig3, "getConfig");
|
|
199
|
+
function addNode(t, u, d, f, p, m, h, g, _) {
|
|
200
|
+
builder.addNode({
|
|
201
|
+
id: t,
|
|
202
|
+
label: u,
|
|
203
|
+
x: d,
|
|
204
|
+
y: f,
|
|
205
|
+
className: p,
|
|
206
|
+
labelOffsetX: m,
|
|
207
|
+
labelOffsetY: h,
|
|
208
|
+
inertia: g,
|
|
209
|
+
sourceStrategy: _
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
__name(addNode, "addNode");
|
|
213
|
+
function addLink(t, u, d = !1, f, p) {
|
|
214
|
+
builder.addLink({
|
|
215
|
+
source: t,
|
|
216
|
+
target: u,
|
|
217
|
+
dashed: d,
|
|
218
|
+
label: f,
|
|
219
|
+
flow: p
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
__name(addLink, "addLink");
|
|
223
|
+
function addTrend(t, u, d) {
|
|
224
|
+
builder.addTrend({
|
|
225
|
+
nodeId: t,
|
|
226
|
+
targetX: u,
|
|
227
|
+
targetY: d
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
__name(addTrend, "addTrend");
|
|
231
|
+
function addAnnotation(t, u, d) {
|
|
232
|
+
builder.addAnnotation({
|
|
233
|
+
number: t,
|
|
234
|
+
coordinates: u,
|
|
235
|
+
text: d
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
__name(addAnnotation, "addAnnotation");
|
|
239
|
+
function addNote(t, u, d) {
|
|
240
|
+
builder.addNote({
|
|
241
|
+
text: t,
|
|
242
|
+
x: u,
|
|
243
|
+
y: d
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
__name(addNote, "addNote");
|
|
247
|
+
function addAccelerator(t, u, d) {
|
|
248
|
+
builder.addAccelerator({
|
|
249
|
+
name: t,
|
|
250
|
+
x: u,
|
|
251
|
+
y: d
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
__name(addAccelerator, "addAccelerator");
|
|
255
|
+
function addDeaccelerator(t, u, d) {
|
|
256
|
+
builder.addDeaccelerator({
|
|
257
|
+
name: t,
|
|
258
|
+
x: u,
|
|
259
|
+
y: d
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
__name(addDeaccelerator, "addDeaccelerator");
|
|
263
|
+
function setAnnotationsBox(t, u) {
|
|
264
|
+
builder.setAnnotationsBox(t, u);
|
|
265
|
+
}
|
|
266
|
+
__name(setAnnotationsBox, "setAnnotationsBox");
|
|
267
|
+
function setSize(t, u) {
|
|
268
|
+
builder.setSize(t, u);
|
|
269
|
+
}
|
|
270
|
+
__name(setSize, "setSize");
|
|
271
|
+
function startPipeline(t) {
|
|
272
|
+
builder.startPipeline(t);
|
|
273
|
+
}
|
|
274
|
+
__name(startPipeline, "startPipeline");
|
|
275
|
+
function addPipelineComponent(t, u) {
|
|
276
|
+
builder.addPipelineComponent(t, u);
|
|
277
|
+
}
|
|
278
|
+
__name(addPipelineComponent, "addPipelineComponent");
|
|
279
|
+
function updateAxes(t) {
|
|
280
|
+
builder.setAxes(t);
|
|
281
|
+
}
|
|
282
|
+
__name(updateAxes, "updateAxes");
|
|
283
|
+
function getNode(t) {
|
|
284
|
+
return builder.getNode(t);
|
|
285
|
+
}
|
|
286
|
+
__name(getNode, "getNode");
|
|
287
|
+
function resolveNodeId(t) {
|
|
288
|
+
return builder.resolveNodeId(t);
|
|
289
|
+
}
|
|
290
|
+
__name(resolveNodeId, "resolveNodeId");
|
|
291
|
+
function getWardleyData() {
|
|
292
|
+
return builder.build();
|
|
293
|
+
}
|
|
294
|
+
__name(getWardleyData, "getWardleyData");
|
|
295
|
+
function clear2() {
|
|
296
|
+
builder.clear(), clear();
|
|
297
|
+
}
|
|
298
|
+
__name(clear2, "clear");
|
|
299
|
+
var wardleyDb_default = {
|
|
300
|
+
getConfig: getConfig3,
|
|
301
|
+
addNode,
|
|
302
|
+
addLink,
|
|
303
|
+
addTrend,
|
|
304
|
+
addAnnotation,
|
|
305
|
+
addNote,
|
|
306
|
+
addAccelerator,
|
|
307
|
+
addDeaccelerator,
|
|
308
|
+
setAnnotationsBox,
|
|
309
|
+
setSize,
|
|
310
|
+
startPipeline,
|
|
311
|
+
addPipelineComponent,
|
|
312
|
+
updateAxes,
|
|
313
|
+
getNode,
|
|
314
|
+
resolveNodeId,
|
|
315
|
+
getWardleyData,
|
|
316
|
+
clear: clear2,
|
|
317
|
+
setAccTitle,
|
|
318
|
+
getAccTitle,
|
|
319
|
+
setDiagramTitle,
|
|
320
|
+
getDiagramTitle,
|
|
321
|
+
getAccDescription,
|
|
322
|
+
setAccDescription
|
|
323
|
+
}, DEFAULT_STAGES = [
|
|
324
|
+
"Genesis",
|
|
325
|
+
"Custom Built",
|
|
326
|
+
"Product",
|
|
327
|
+
"Commodity"
|
|
328
|
+
], getTheme = /* @__PURE__ */ __name(() => {
|
|
329
|
+
let { themeVariables: t } = getConfig2();
|
|
330
|
+
return {
|
|
331
|
+
backgroundColor: t.wardley?.backgroundColor ?? t.background ?? "#fff",
|
|
332
|
+
axisColor: t.wardley?.axisColor ?? "#000",
|
|
333
|
+
axisTextColor: t.wardley?.axisTextColor ?? t.primaryTextColor ?? "#222",
|
|
334
|
+
gridColor: t.wardley?.gridColor ?? "rgba(100, 100, 100, 0.2)",
|
|
335
|
+
componentFill: t.wardley?.componentFill ?? "#fff",
|
|
336
|
+
componentStroke: t.wardley?.componentStroke ?? "#000",
|
|
337
|
+
componentLabelColor: t.wardley?.componentLabelColor ?? t.primaryTextColor ?? "#222",
|
|
338
|
+
linkStroke: t.wardley?.linkStroke ?? "#000",
|
|
339
|
+
evolutionStroke: t.wardley?.evolutionStroke ?? "#dc3545",
|
|
340
|
+
annotationStroke: t.wardley?.annotationStroke ?? "#000",
|
|
341
|
+
annotationTextColor: t.wardley?.annotationTextColor ?? t.primaryTextColor ?? "#222",
|
|
342
|
+
annotationFill: t.wardley?.annotationFill ?? t.background ?? "#fff"
|
|
343
|
+
};
|
|
344
|
+
}, "getTheme"), getConfigValues = /* @__PURE__ */ __name(() => {
|
|
345
|
+
let t = getConfig2()["wardley-beta"];
|
|
346
|
+
return {
|
|
347
|
+
width: t?.width ?? 900,
|
|
348
|
+
height: t?.height ?? 600,
|
|
349
|
+
padding: t?.padding ?? 48,
|
|
350
|
+
nodeRadius: t?.nodeRadius ?? 6,
|
|
351
|
+
nodeLabelOffset: t?.nodeLabelOffset ?? 8,
|
|
352
|
+
axisFontSize: t?.axisFontSize ?? 12,
|
|
353
|
+
labelFontSize: t?.labelFontSize ?? 10,
|
|
354
|
+
showGrid: t?.showGrid ?? !1,
|
|
355
|
+
useMaxWidth: t?.useMaxWidth ?? !0
|
|
356
|
+
};
|
|
357
|
+
}, "getConfigValues"), diagram = {
|
|
358
|
+
parser,
|
|
359
|
+
db: wardleyDb_default,
|
|
360
|
+
renderer: { draw: /* @__PURE__ */ __name((d, p, m, h) => {
|
|
361
|
+
log.debug("Rendering Wardley map\n" + d);
|
|
362
|
+
let g = getConfigValues(), _ = getTheme(), v = g.nodeRadius * 1.6, y = h.db, b = y.getWardleyData(), x = y.getDiagramTitle(), C = b.size?.width ?? g.width, w = b.size?.height ?? g.height, T = selectSvgElement(p);
|
|
363
|
+
T.selectAll("*").remove(), configureSvgSize(T, w, C, g.useMaxWidth), T.attr("viewBox", `0 0 ${C} ${w}`);
|
|
364
|
+
let E = T.append("g").attr("class", "wardley-map"), D = T.append("defs");
|
|
365
|
+
D.append("marker").attr("id", `arrow-${p}`).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerWidth", 6).attr("markerHeight", 6).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("fill", _.evolutionStroke).attr("stroke", "none"), D.append("marker").attr("id", `link-arrow-end-${p}`).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerWidth", 5).attr("markerHeight", 5).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("fill", _.linkStroke).attr("stroke", "none"), D.append("marker").attr("id", `link-arrow-start-${p}`).attr("viewBox", "0 0 10 10").attr("refX", 1).attr("refY", 5).attr("markerWidth", 5).attr("markerHeight", 5).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z").attr("fill", _.linkStroke).attr("stroke", "none"), E.append("rect").attr("class", "wardley-background").attr("width", C).attr("height", w).attr("fill", _.backgroundColor);
|
|
366
|
+
let O = C - g.padding * 2, k = w - g.padding * 2;
|
|
367
|
+
x && E.append("text").attr("class", "wardley-title").attr("x", C / 2).attr("y", g.padding / 2).attr("fill", _.axisTextColor).attr("font-size", g.axisFontSize * 1.05).attr("font-weight", "bold").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(x);
|
|
368
|
+
let A = /* @__PURE__ */ __name((t) => g.padding + t / 100 * O, "projectX"), j = /* @__PURE__ */ __name((t) => w - g.padding - t / 100 * k, "projectY"), M = E.append("g").attr("class", "wardley-axes");
|
|
369
|
+
M.append("line").attr("x1", g.padding).attr("x2", C - g.padding).attr("y1", w - g.padding).attr("y2", w - g.padding).attr("stroke", _.axisColor).attr("stroke-width", 1), M.append("line").attr("x1", g.padding).attr("x2", g.padding).attr("y1", g.padding).attr("y2", w - g.padding).attr("stroke", _.axisColor).attr("stroke-width", 1);
|
|
370
|
+
let N = b.axes.xLabel ?? "Evolution", P = b.axes.yLabel ?? "Visibility";
|
|
371
|
+
M.append("text").attr("class", "wardley-axis-label wardley-axis-label-x").attr("x", g.padding + O / 2).attr("y", w - g.padding / 4).attr("fill", _.axisTextColor).attr("font-size", g.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").text(N), M.append("text").attr("class", "wardley-axis-label wardley-axis-label-y").attr("x", g.padding / 3).attr("y", g.padding + k / 2).attr("fill", _.axisTextColor).attr("font-size", g.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").attr("transform", `rotate(-90 ${g.padding / 3} ${g.padding + k / 2})`).text(P);
|
|
372
|
+
let F = b.axes.stages && b.axes.stages.length > 0 ? b.axes.stages : DEFAULT_STAGES;
|
|
373
|
+
if (F.length > 0) {
|
|
374
|
+
let t = E.append("g").attr("class", "wardley-stages"), u = b.axes.stageBoundaries, d = [];
|
|
375
|
+
if (u && u.length === F.length) {
|
|
376
|
+
let t = 0;
|
|
377
|
+
u.forEach((u) => {
|
|
378
|
+
d.push({
|
|
379
|
+
start: t,
|
|
380
|
+
end: u
|
|
381
|
+
}), t = u;
|
|
382
|
+
});
|
|
383
|
+
} else {
|
|
384
|
+
let t = 1 / F.length;
|
|
385
|
+
F.forEach((u, f) => {
|
|
386
|
+
d.push({
|
|
387
|
+
start: f * t,
|
|
388
|
+
end: (f + 1) * t
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
F.forEach((u, f) => {
|
|
393
|
+
let p = d[f], m = g.padding + p.start * O, h = (m + (g.padding + p.end * O)) / 2;
|
|
394
|
+
f > 0 && t.append("line").attr("x1", m).attr("x2", m).attr("y1", g.padding).attr("y2", w - g.padding).attr("stroke", "#000").attr("stroke-width", 1).attr("stroke-dasharray", "5 5").attr("opacity", .8), t.append("text").attr("class", "wardley-stage-label").attr("x", h).attr("y", w - g.padding / 1.5).attr("fill", _.axisTextColor).attr("font-size", g.axisFontSize - 2).attr("text-anchor", "middle").text(u);
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
if (g.showGrid) {
|
|
398
|
+
let t = E.append("g").attr("class", "wardley-grid");
|
|
399
|
+
for (let u = 1; u < 4; u++) {
|
|
400
|
+
let d = u / 4, f = g.padding + O * d;
|
|
401
|
+
t.append("line").attr("x1", f).attr("x2", f).attr("y1", g.padding).attr("y2", w - g.padding).attr("stroke", _.gridColor).attr("stroke-dasharray", "2 6"), t.append("line").attr("x1", g.padding).attr("x2", C - g.padding).attr("y1", w - g.padding - k * d).attr("y2", w - g.padding - k * d).attr("stroke", _.gridColor).attr("stroke-dasharray", "2 6");
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
let I = /* @__PURE__ */ new Map();
|
|
405
|
+
if (b.nodes.forEach((t) => {
|
|
406
|
+
I.set(t.id, {
|
|
407
|
+
x: A(t.x),
|
|
408
|
+
y: j(t.y),
|
|
409
|
+
node: t
|
|
410
|
+
});
|
|
411
|
+
}), b.pipelines.length > 0) {
|
|
412
|
+
let t = E.append("g").attr("class", "wardley-pipelines"), u = E.append("g").attr("class", "wardley-pipeline-links");
|
|
413
|
+
b.pipelines.forEach((d) => {
|
|
414
|
+
if (d.componentIds.length === 0) return;
|
|
415
|
+
let f = d.componentIds.map((t) => ({
|
|
416
|
+
id: t,
|
|
417
|
+
pos: I.get(t),
|
|
418
|
+
node: b.nodes.find((u) => u.id === t)
|
|
419
|
+
})).filter((t) => t.pos && t.node).sort((t, u) => t.node.x - u.node.x);
|
|
420
|
+
for (let t = 0; t < f.length - 1; t++) {
|
|
421
|
+
let d = f[t], p = f[t + 1];
|
|
422
|
+
u.append("line").attr("class", "wardley-pipeline-evolution-link").attr("x1", d.pos.x).attr("y1", d.pos.y).attr("x2", p.pos.x).attr("y2", p.pos.y).attr("stroke", _.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4");
|
|
423
|
+
}
|
|
424
|
+
let p = Infinity, m = -Infinity, h = 0;
|
|
425
|
+
if (d.componentIds.forEach((t) => {
|
|
426
|
+
let u = I.get(t);
|
|
427
|
+
u && (p = Math.min(p, u.x), m = Math.max(m, u.x), h = u.y);
|
|
428
|
+
}), p !== Infinity && m !== -Infinity) {
|
|
429
|
+
let u = g.nodeRadius * 4, f = h - u / 2, y = I.get(d.nodeId);
|
|
430
|
+
y && (y.x = (p + m) / 2, y.y = f - v / 6), t.append("rect").attr("class", "wardley-pipeline-box").attr("x", p - 15).attr("y", f).attr("width", m - p + 30).attr("height", u).attr("fill", "none").attr("stroke", _.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
let L = E.append("g").attr("class", "wardley-links"), R = /* @__PURE__ */ new Map();
|
|
435
|
+
b.pipelines.forEach((t) => {
|
|
436
|
+
R.set(t.nodeId, new Set(t.componentIds));
|
|
437
|
+
});
|
|
438
|
+
let z = b.links.filter((t) => !(!I.has(t.source) || !I.has(t.target) || R.get(t.target)?.has(t.source)));
|
|
439
|
+
L.selectAll("line").data(z).enter().append("line").attr("class", (t) => `wardley-link${t.dashed ? " wardley-link--dashed" : ""}`).attr("x1", (t) => {
|
|
440
|
+
let u = I.get(t.source), d = I.get(t.target), f = b.nodes.find((u) => u.id === t.source).isPipelineParent ? v / Math.sqrt(2) : g.nodeRadius, p = d.x - u.x, m = d.y - u.y, h = Math.sqrt(p * p + m * m);
|
|
441
|
+
return u.x + p / h * f;
|
|
442
|
+
}).attr("y1", (t) => {
|
|
443
|
+
let u = I.get(t.source), d = I.get(t.target), f = b.nodes.find((u) => u.id === t.source).isPipelineParent ? v / Math.sqrt(2) : g.nodeRadius, p = d.x - u.x, m = d.y - u.y, h = Math.sqrt(p * p + m * m);
|
|
444
|
+
return u.y + m / h * f;
|
|
445
|
+
}).attr("x2", (t) => {
|
|
446
|
+
let u = I.get(t.source), d = I.get(t.target), f = b.nodes.find((u) => u.id === t.target).isPipelineParent ? v / Math.sqrt(2) : g.nodeRadius, p = u.x - d.x, m = u.y - d.y, h = Math.sqrt(p * p + m * m);
|
|
447
|
+
return d.x + p / h * f;
|
|
448
|
+
}).attr("y2", (t) => {
|
|
449
|
+
let u = I.get(t.source), d = I.get(t.target), f = b.nodes.find((u) => u.id === t.target).isPipelineParent ? v / Math.sqrt(2) : g.nodeRadius, p = u.x - d.x, m = u.y - d.y, h = Math.sqrt(p * p + m * m);
|
|
450
|
+
return d.y + m / h * f;
|
|
451
|
+
}).attr("stroke", _.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", (t) => t.dashed ? "6 6" : null).attr("marker-end", (t) => t.flow === "forward" || t.flow === "bidirectional" ? `url(#link-arrow-end-${p})` : null).attr("marker-start", (t) => t.flow === "backward" || t.flow === "bidirectional" ? `url(#link-arrow-start-${p})` : null), L.selectAll("text").data(z.filter((t) => t.label)).enter().append("text").attr("class", "wardley-link-label").attr("x", (t) => {
|
|
452
|
+
let u = I.get(t.source), d = I.get(t.target), f = (u.x + d.x) / 2, p = d.y - u.y, m = d.x - u.x;
|
|
453
|
+
return f + p / Math.sqrt(m * m + p * p) * 8;
|
|
454
|
+
}).attr("y", (t) => {
|
|
455
|
+
let u = I.get(t.source), d = I.get(t.target), f = (u.y + d.y) / 2, p = d.x - u.x, m = d.y - u.y, h = Math.sqrt(p * p + m * m);
|
|
456
|
+
return f + -p / h * 8;
|
|
457
|
+
}).attr("fill", _.axisTextColor).attr("font-size", g.labelFontSize).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("transform", (t) => {
|
|
458
|
+
let u = I.get(t.source), d = I.get(t.target), f = (u.x + d.x) / 2, p = (u.y + d.y) / 2, m = d.x - u.x, h = d.y - u.y, g = Math.sqrt(m * m + h * h), _ = h / g, v = -m / g, y = f + _ * 8, b = p + v * 8, x = Math.atan2(h, m) * 180 / Math.PI;
|
|
459
|
+
return (x > 90 || x < -90) && (x += 180), `rotate(${x} ${y} ${b})`;
|
|
460
|
+
}).text((t) => t.label);
|
|
461
|
+
let B = E.append("g").attr("class", "wardley-trends"), V = b.trends.map((t) => {
|
|
462
|
+
let u = I.get(t.nodeId);
|
|
463
|
+
if (!u) return null;
|
|
464
|
+
let d = A(t.targetX), f = j(t.targetY), p = d - u.x, m = f - u.y, h = Math.sqrt(p * p + m * m), _ = g.nodeRadius + 2;
|
|
465
|
+
return {
|
|
466
|
+
origin: u,
|
|
467
|
+
targetX: d,
|
|
468
|
+
targetY: f,
|
|
469
|
+
adjustedX2: h > _ ? d - p / h * _ : d,
|
|
470
|
+
adjustedY2: h > _ ? f - m / h * _ : f
|
|
471
|
+
};
|
|
472
|
+
}).filter((t) => t !== null);
|
|
473
|
+
B.selectAll("line").data(V).enter().append("line").attr("class", "wardley-trend").attr("x1", (t) => t.origin.x).attr("y1", (t) => t.origin.y).attr("x2", (t) => t.adjustedX2).attr("y2", (t) => t.adjustedY2).attr("stroke", _.evolutionStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4").attr("marker-end", `url(#arrow-${p})`);
|
|
474
|
+
let H = E.append("g").attr("class", "wardley-nodes").selectAll("g").data(b.nodes).enter().append("g").attr("class", (t) => ["wardley-node", t.className ? `wardley-node--${t.className}` : ""].filter(Boolean).join(" "));
|
|
475
|
+
H.filter((t) => t.sourceStrategy === "outsource").append("circle").attr("class", "wardley-outsource-overlay").attr("cx", (t) => I.get(t.id).x).attr("cy", (t) => I.get(t.id).y).attr("r", g.nodeRadius * 2).attr("fill", "#666").attr("stroke", _.componentStroke).attr("stroke-width", 1), H.filter((t) => t.sourceStrategy === "buy").append("circle").attr("class", "wardley-buy-overlay").attr("cx", (t) => I.get(t.id).x).attr("cy", (t) => I.get(t.id).y).attr("r", g.nodeRadius * 2).attr("fill", "#ccc").attr("stroke", _.componentStroke).attr("stroke-width", 1), H.filter((t) => t.sourceStrategy === "build").append("circle").attr("class", "wardley-build-overlay").attr("cx", (t) => I.get(t.id).x).attr("cy", (t) => I.get(t.id).y).attr("r", g.nodeRadius * 2).attr("fill", "#eee").attr("stroke", "#000").attr("stroke-width", 1);
|
|
476
|
+
let U = H.filter((t) => t.sourceStrategy === "market");
|
|
477
|
+
U.append("circle").attr("class", "wardley-market-overlay").attr("cx", (t) => I.get(t.id).x).attr("cy", (t) => I.get(t.id).y).attr("r", g.nodeRadius * 2).attr("fill", "white").attr("stroke", _.componentStroke).attr("stroke-width", 1), H.filter((t) => !t.isPipelineParent && t.sourceStrategy !== "market" && t.className !== "anchor").append("circle").attr("cx", (t) => I.get(t.id).x).attr("cy", (t) => I.get(t.id).y).attr("r", g.nodeRadius).attr("fill", _.componentFill).attr("stroke", _.componentStroke).attr("stroke-width", 1);
|
|
478
|
+
let W = g.nodeRadius * .7, G = g.nodeRadius * 1.2;
|
|
479
|
+
if (U.append("line").attr("class", "wardley-market-line").attr("x1", (t) => I.get(t.id).x).attr("y1", (t) => I.get(t.id).y - G).attr("x2", (t) => I.get(t.id).x - G * Math.cos(Math.PI / 6)).attr("y2", (t) => I.get(t.id).y + G * Math.sin(Math.PI / 6)).attr("stroke", _.componentStroke).attr("stroke-width", 1), U.append("line").attr("class", "wardley-market-line").attr("x1", (t) => I.get(t.id).x - G * Math.cos(Math.PI / 6)).attr("y1", (t) => I.get(t.id).y + G * Math.sin(Math.PI / 6)).attr("x2", (t) => I.get(t.id).x + G * Math.cos(Math.PI / 6)).attr("y2", (t) => I.get(t.id).y + G * Math.sin(Math.PI / 6)).attr("stroke", _.componentStroke).attr("stroke-width", 1), U.append("line").attr("class", "wardley-market-line").attr("x1", (t) => I.get(t.id).x + G * Math.cos(Math.PI / 6)).attr("y1", (t) => I.get(t.id).y + G * Math.sin(Math.PI / 6)).attr("x2", (t) => I.get(t.id).x).attr("y2", (t) => I.get(t.id).y - G).attr("stroke", _.componentStroke).attr("stroke-width", 1), U.append("circle").attr("class", "wardley-market-dot").attr("cx", (t) => I.get(t.id).x).attr("cy", (t) => I.get(t.id).y - G).attr("r", W).attr("fill", "white").attr("stroke", _.componentStroke).attr("stroke-width", 2), U.append("circle").attr("class", "wardley-market-dot").attr("cx", (t) => I.get(t.id).x - G * Math.cos(Math.PI / 6)).attr("cy", (t) => I.get(t.id).y + G * Math.sin(Math.PI / 6)).attr("r", W).attr("fill", "white").attr("stroke", _.componentStroke).attr("stroke-width", 2), U.append("circle").attr("class", "wardley-market-dot").attr("cx", (t) => I.get(t.id).x + G * Math.cos(Math.PI / 6)).attr("cy", (t) => I.get(t.id).y + G * Math.sin(Math.PI / 6)).attr("r", W).attr("fill", "white").attr("stroke", _.componentStroke).attr("stroke-width", 2), H.filter((t) => t.isPipelineParent === !0).append("rect").attr("x", (t) => I.get(t.id).x - v / 2).attr("y", (t) => I.get(t.id).y - v / 2).attr("width", v).attr("height", v).attr("fill", _.componentFill).attr("stroke", _.componentStroke).attr("stroke-width", 1), H.filter((t) => t.inertia === !0).append("line").attr("class", "wardley-inertia").attr("x1", (t) => {
|
|
480
|
+
let u = I.get(t.id), d = t.isPipelineParent ? v / 2 + 15 : g.nodeRadius + 15;
|
|
481
|
+
return t.sourceStrategy && (d += g.nodeRadius + 10), u.x + d;
|
|
482
|
+
}).attr("y1", (t) => {
|
|
483
|
+
let u = I.get(t.id), d = t.isPipelineParent ? v : g.nodeRadius * 2;
|
|
484
|
+
return u.y - d / 2;
|
|
485
|
+
}).attr("x2", (t) => {
|
|
486
|
+
let u = I.get(t.id), d = t.isPipelineParent ? v / 2 + 15 : g.nodeRadius + 15;
|
|
487
|
+
return t.sourceStrategy && (d += g.nodeRadius + 10), u.x + d;
|
|
488
|
+
}).attr("y2", (t) => {
|
|
489
|
+
let u = I.get(t.id), d = t.isPipelineParent ? v : g.nodeRadius * 2;
|
|
490
|
+
return u.y + d / 2;
|
|
491
|
+
}).attr("stroke", _.componentStroke).attr("stroke-width", 6), H.append("text").attr("x", (t) => {
|
|
492
|
+
let u = I.get(t.id);
|
|
493
|
+
if (t.className === "anchor") return t.labelOffsetX === void 0 ? u.x : u.x + t.labelOffsetX;
|
|
494
|
+
let d = g.nodeLabelOffset;
|
|
495
|
+
t.sourceStrategy && t.labelOffsetX === void 0 && (d += 10);
|
|
496
|
+
let f = t.labelOffsetX ?? d;
|
|
497
|
+
return u.x + f;
|
|
498
|
+
}).attr("y", (t) => {
|
|
499
|
+
let u = I.get(t.id);
|
|
500
|
+
if (t.className === "anchor") return t.labelOffsetY === void 0 ? u.y - 3 : u.y + t.labelOffsetY;
|
|
501
|
+
let d = -g.nodeLabelOffset;
|
|
502
|
+
t.sourceStrategy && t.labelOffsetY === void 0 && (d -= 10);
|
|
503
|
+
let f = t.labelOffsetY ?? d;
|
|
504
|
+
return u.y + f;
|
|
505
|
+
}).attr("class", "wardley-node-label").attr("fill", (t) => t.className === "evolved" ? _.evolutionStroke : t.className === "anchor" ? "#000" : _.componentLabelColor).attr("font-size", g.labelFontSize).attr("font-weight", (t) => t.className === "anchor" ? "bold" : "normal").attr("text-anchor", (t) => t.className === "anchor" ? "middle" : "start").attr("dominant-baseline", (t) => t.className === "anchor" ? "middle" : "auto").text((t) => t.label), b.annotations.length > 0) {
|
|
506
|
+
let t = E.append("g").attr("class", "wardley-annotations");
|
|
507
|
+
if (b.annotations.forEach((u) => {
|
|
508
|
+
let d = u.coordinates.map((t) => ({
|
|
509
|
+
x: A(t.x),
|
|
510
|
+
y: j(t.y)
|
|
511
|
+
}));
|
|
512
|
+
if (d.length > 1) for (let u = 0; u < d.length - 1; u++) t.append("line").attr("class", "wardley-annotation-line").attr("x1", d[u].x).attr("y1", d[u].y).attr("x2", d[u + 1].x).attr("y2", d[u + 1].y).attr("stroke", _.axisColor).attr("stroke-width", 1.5).attr("stroke-dasharray", "4 4");
|
|
513
|
+
d.forEach((d) => {
|
|
514
|
+
let f = t.append("g").attr("class", "wardley-annotation");
|
|
515
|
+
f.append("circle").attr("cx", d.x).attr("cy", d.y).attr("r", 10).attr("fill", "white").attr("stroke", _.axisColor).attr("stroke-width", 1.5), f.append("text").attr("x", d.x).attr("y", d.y).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", 10).attr("fill", _.axisTextColor).attr("font-weight", "bold").text(u.number);
|
|
516
|
+
});
|
|
517
|
+
}), b.annotationsBox) {
|
|
518
|
+
let u = A(b.annotationsBox.x), d = j(b.annotationsBox.y), f = t.append("g").attr("class", "wardley-annotations-box"), p = [...b.annotations].filter((t) => t.text).sort((t, u) => t.number - u.number), m = [];
|
|
519
|
+
if (p.forEach((t, p) => {
|
|
520
|
+
let h = f.append("text").attr("x", u + 10).attr("y", d + 10 + (p + 1) * 16).attr("font-size", 11).attr("fill", _.axisTextColor).attr("text-anchor", "start").attr("dominant-baseline", "middle").text(`${t.number}. ${t.text}`);
|
|
521
|
+
m.push(h);
|
|
522
|
+
}), m.length > 0) {
|
|
523
|
+
let t = 0, h = 0;
|
|
524
|
+
m.forEach((u) => {
|
|
525
|
+
let d = u.node(), f = d.getComputedTextLength();
|
|
526
|
+
t = Math.max(t, f);
|
|
527
|
+
let p = d.getBBox();
|
|
528
|
+
h = Math.max(h, p.height);
|
|
529
|
+
});
|
|
530
|
+
let v = t + 20 + 105, y = p.length * 16 + 20 + h / 2, b = g.padding, x = C - g.padding - v, S = g.padding, T = w - g.padding - y;
|
|
531
|
+
u = Math.max(b, Math.min(u, x)), d = Math.max(S, Math.min(d, T)), m.forEach((t, f) => {
|
|
532
|
+
t.attr("x", u + 10).attr("y", d + 10 + (f + 1) * 16);
|
|
533
|
+
}), f.insert("rect", "text").attr("x", u).attr("y", d).attr("width", v).attr("height", y).attr("fill", "white").attr("stroke", _.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
if (b.notes.length > 0) {
|
|
538
|
+
let t = E.append("g").attr("class", "wardley-notes");
|
|
539
|
+
b.notes.forEach((u) => {
|
|
540
|
+
let d = A(u.x), f = j(u.y);
|
|
541
|
+
t.append("text").attr("x", d).attr("y", f).attr("text-anchor", "start").attr("font-size", 11).attr("fill", _.axisTextColor).attr("font-weight", "bold").text(u.text);
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
if (b.accelerators.length > 0) {
|
|
545
|
+
let t = E.append("g").attr("class", "wardley-accelerators");
|
|
546
|
+
b.accelerators.forEach((u) => {
|
|
547
|
+
let d = A(u.x), f = j(u.y), p = `
|
|
548
|
+
M ${d} ${f - 30 / 2}
|
|
549
|
+
L ${d + 60 - 20} ${f - 30 / 2}
|
|
550
|
+
L ${d + 60 - 20} ${f - 30 / 2 - 8}
|
|
551
|
+
L ${d + 60} ${f}
|
|
552
|
+
L ${d + 60 - 20} ${f + 30 / 2 + 8}
|
|
553
|
+
L ${d + 60 - 20} ${f + 30 / 2}
|
|
554
|
+
L ${d} ${f + 30 / 2}
|
|
555
|
+
Z
|
|
556
|
+
`;
|
|
557
|
+
t.append("path").attr("d", p).attr("fill", "white").attr("stroke", _.componentStroke).attr("stroke-width", 1), t.append("text").attr("x", d + 60 / 2).attr("y", f + 30 / 2 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", _.axisTextColor).attr("font-weight", "bold").text(u.name);
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
if (b.deaccelerators.length > 0) {
|
|
561
|
+
let t = E.append("g").attr("class", "wardley-deaccelerators");
|
|
562
|
+
b.deaccelerators.forEach((u) => {
|
|
563
|
+
let d = A(u.x), f = j(u.y), p = `
|
|
564
|
+
M ${d + 60} ${f - 30 / 2}
|
|
565
|
+
L ${d + 20} ${f - 30 / 2}
|
|
566
|
+
L ${d + 20} ${f - 30 / 2 - 8}
|
|
567
|
+
L ${d} ${f}
|
|
568
|
+
L ${d + 20} ${f + 30 / 2 + 8}
|
|
569
|
+
L ${d + 20} ${f + 30 / 2}
|
|
570
|
+
L ${d + 60} ${f + 30 / 2}
|
|
571
|
+
Z
|
|
572
|
+
`;
|
|
573
|
+
t.append("path").attr("d", p).attr("fill", "white").attr("stroke", _.componentStroke).attr("stroke-width", 1), t.append("text").attr("x", d + 60 / 2).attr("y", f + 30 / 2 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", _.axisTextColor).attr("font-weight", "bold").text(u.name);
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
}, "draw") },
|
|
577
|
+
styles: /* @__PURE__ */ __name(({ wardley: t } = {}) => {
|
|
578
|
+
let u = cleanAndMerge(cleanAndMerge(getThemeVariables3(), getConfig().themeVariables).wardley, t);
|
|
579
|
+
return `
|
|
580
|
+
.wardley-background {
|
|
581
|
+
fill: ${u.backgroundColor};
|
|
582
|
+
}
|
|
583
|
+
.wardley-axes line, .wardley-axes path {
|
|
584
|
+
stroke: ${u.axisColor};
|
|
585
|
+
}
|
|
586
|
+
.wardley-axis-label {
|
|
587
|
+
fill: ${u.axisTextColor};
|
|
588
|
+
}
|
|
589
|
+
.wardley-stage-label {
|
|
590
|
+
fill: ${u.axisTextColor};
|
|
591
|
+
}
|
|
592
|
+
.wardley-grid line {
|
|
593
|
+
stroke: ${u.gridColor};
|
|
594
|
+
}
|
|
595
|
+
.wardley-node circle {
|
|
596
|
+
fill: ${u.componentFill};
|
|
597
|
+
stroke: ${u.componentStroke};
|
|
598
|
+
}
|
|
599
|
+
.wardley-node-label {
|
|
600
|
+
fill: ${u.componentLabelColor};
|
|
601
|
+
}
|
|
602
|
+
.wardley-link {
|
|
603
|
+
stroke: ${u.linkStroke};
|
|
604
|
+
}
|
|
605
|
+
.wardley-link--dashed {
|
|
606
|
+
stroke-dasharray: 4 4;
|
|
607
|
+
}
|
|
608
|
+
.wardley-link-label {
|
|
609
|
+
fill: ${u.axisTextColor};
|
|
610
|
+
}
|
|
611
|
+
.wardley-trend line {
|
|
612
|
+
stroke: ${u.evolutionStroke};
|
|
613
|
+
}
|
|
614
|
+
.wardley-annotation-line {
|
|
615
|
+
stroke: ${u.annotationStroke};
|
|
616
|
+
}
|
|
617
|
+
.wardley-annotation circle {
|
|
618
|
+
fill: ${u.annotationFill};
|
|
619
|
+
stroke: ${u.annotationStroke};
|
|
620
|
+
}
|
|
621
|
+
.wardley-annotation text {
|
|
622
|
+
fill: ${u.annotationTextColor};
|
|
623
|
+
}
|
|
624
|
+
.wardley-annotations-box rect {
|
|
625
|
+
fill: ${u.annotationFill};
|
|
626
|
+
stroke: ${u.annotationStroke};
|
|
627
|
+
}
|
|
628
|
+
.wardley-annotations-box text {
|
|
629
|
+
fill: ${u.annotationTextColor};
|
|
630
|
+
}
|
|
631
|
+
.wardley-pipeline-box {
|
|
632
|
+
stroke: ${u.componentStroke};
|
|
633
|
+
}
|
|
634
|
+
.wardley-notes text {
|
|
635
|
+
fill: ${u.axisTextColor};
|
|
636
|
+
}
|
|
637
|
+
`;
|
|
638
|
+
}, "styles")
|
|
639
|
+
};
|
|
640
|
+
export { diagram };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __name, log } from "./chunk-AGHRB4JF.js";
|
|
2
|
-
import { clear, configureSvgSize, defaultConfig_default, getAccDescription, getAccTitle, getConfig, getDiagramTitle, getThemeVariables3, sanitizeText, setAccDescription, setAccTitle, setDiagramTitle } from "./chunk-
|
|
2
|
+
import { clear, configureSvgSize, defaultConfig_default, getAccDescription, getAccTitle, getConfig, getDiagramTitle, getThemeVariables3, sanitizeText, setAccDescription, setAccTitle, setDiagramTitle } from "./chunk-CSCIHK7Q.js";
|
|
3
3
|
import band from "../../../../d3-scale/src/band.js";
|
|
4
4
|
import linear from "../../../../d3-scale/src/linear.js";
|
|
5
5
|
import line_default from "../../../../d3-shape/src/line.js";
|
|
6
6
|
import "../../../../d3/src/index.js";
|
|
7
|
-
import { selectSvgElement } from "./chunk-
|
|
8
|
-
import { cleanAndMerge } from "./chunk-
|
|
9
|
-
import { computeDimensionOfText } from "./chunk-
|
|
7
|
+
import { selectSvgElement } from "./chunk-WU5MYG2G.js";
|
|
8
|
+
import { cleanAndMerge } from "./chunk-5ZQYHXKU.js";
|
|
9
|
+
import { computeDimensionOfText } from "./chunk-O5CBEL6O.js";
|
|
10
10
|
var parser = (function() {
|
|
11
11
|
var S = /* @__PURE__ */ __name(function(e, S, C, w) {
|
|
12
12
|
for (C ||= {}, w = e.length; w--; C[e[w]] = S);
|