@loopstack/loopstack-studio 0.28.0 → 0.29.1
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/api/config.js +2 -2
- 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/NewRunDialog.js +2 -2
- 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/Workspaces.js +2 -2
- package/dist/features/workspaces/components/ExecutionTimeline.js +9 -8
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/query-keys.js +3 -3
- package/dist/hooks/useConfig.js +15 -15
- package/dist/index.d.ts +12 -12
- package/dist/index.js +3 -3
- 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/DebugWorkflowDetailsPage.js +2 -2
- package/dist/pages/DebugWorkflowsPage.js +12 -12
- package/dist/pages/EmbedWorkbenchPage.js +4 -3
- package/dist/pages/PreviewWorkbenchPage.js +126 -124
- package/dist/pages/StudioLandingPage.js +28 -72
- package/dist/pages/WorkspacePage.js +2 -2
- 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
|
@@ -1,574 +0,0 @@
|
|
|
1
|
-
import { __name, log } from "./chunk-AGHRB4JF.js";
|
|
2
|
-
import { clear, configureSvgSize, getAccDescription, getAccTitle, getConfig2, getDiagramTitle, sanitizeText, setAccDescription, setAccTitle, setDiagramTitle } from "./chunk-ICPOFSXX.js";
|
|
3
|
-
import { selectSvgElement } from "./chunk-426QAEUC.js";
|
|
4
|
-
import { populateCommonDb } from "./chunk-4BX2VUAB.js";
|
|
5
|
-
import { parse } from "../../../../@mermaid-js/parser/dist/mermaid-parser.core.js";
|
|
6
|
-
var toPercent = /* @__PURE__ */ __name((r, c) => {
|
|
7
|
-
let l = r <= 1 ? r * 100 : r;
|
|
8
|
-
if (l < 0 || l > 100) throw Error(`${c} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${r}`);
|
|
9
|
-
return l;
|
|
10
|
-
}, "toPercent"), toCoordinates = /* @__PURE__ */ __name((r, c, l) => ({
|
|
11
|
-
x: toPercent(c, `${l} evolution`),
|
|
12
|
-
y: toPercent(r, `${l} visibility`)
|
|
13
|
-
}), "toCoordinates"), getFlowFromPort = /* @__PURE__ */ __name((r) => {
|
|
14
|
-
if (r) {
|
|
15
|
-
if (r === "+<>") return "bidirectional";
|
|
16
|
-
if (r === "+<") return "backward";
|
|
17
|
-
if (r === "+>") return "forward";
|
|
18
|
-
}
|
|
19
|
-
}, "getFlowFromPort"), extractFlowFromArrow = /* @__PURE__ */ __name((r) => {
|
|
20
|
-
if (!r?.startsWith("+")) return {};
|
|
21
|
-
let c = /^\+'([^']*)'/.exec(r)?.[1];
|
|
22
|
-
return r.includes("<>") ? {
|
|
23
|
-
flow: "bidirectional",
|
|
24
|
-
label: c
|
|
25
|
-
} : r.includes("<") ? {
|
|
26
|
-
flow: "backward",
|
|
27
|
-
label: c
|
|
28
|
-
} : r.includes(">") ? {
|
|
29
|
-
flow: "forward",
|
|
30
|
-
label: c
|
|
31
|
-
} : { label: c };
|
|
32
|
-
}, "extractFlowFromArrow"), populateDb = /* @__PURE__ */ __name((r, c) => {
|
|
33
|
-
if (populateCommonDb(r, c), r.size && c.setSize(r.size.width, r.size.height), r.evolution) {
|
|
34
|
-
let l = r.evolution.stages.map((r) => r.secondName ? `${r.name.trim()} / ${r.secondName.trim()}` : r.name.trim()), u = r.evolution.stages.filter((r) => r.boundary !== void 0).map((r) => r.boundary);
|
|
35
|
-
c.updateAxes({
|
|
36
|
-
stages: l,
|
|
37
|
-
stageBoundaries: u
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
if (r.anchors.forEach((r) => {
|
|
41
|
-
let l = toCoordinates(r.visibility, r.evolution, `Anchor "${r.name}"`);
|
|
42
|
-
c.addNode(r.name, r.name, l.x, l.y, "anchor");
|
|
43
|
-
}), r.components.forEach((r) => {
|
|
44
|
-
let l = toCoordinates(r.visibility, r.evolution, `Component "${r.name}"`), u = r.label ? (r.label.negX ? -1 : 1) * r.label.offsetX : void 0, d = r.label ? (r.label.negY ? -1 : 1) * r.label.offsetY : void 0, f = r.decorator?.strategy;
|
|
45
|
-
c.addNode(r.name, r.name, l.x, l.y, "component", u, d, r.inertia, f);
|
|
46
|
-
}), r.notes.forEach((r) => {
|
|
47
|
-
let l = toCoordinates(r.visibility, r.evolution, `Note "${r.text}"`);
|
|
48
|
-
c.addNote(r.text, l.x, l.y);
|
|
49
|
-
}), r.pipelines.forEach((r) => {
|
|
50
|
-
let l = c.getNode(r.parent);
|
|
51
|
-
if (!l || typeof l.y != "number") throw Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);
|
|
52
|
-
let u = l.y;
|
|
53
|
-
c.startPipeline(r.parent), r.components.forEach((l) => {
|
|
54
|
-
let d = `${r.parent}_${l.name}`, f = l.label ? (l.label.negX ? -1 : 1) * l.label.offsetX : void 0, p = l.label ? (l.label.negY ? -1 : 1) * l.label.offsetY : void 0, m = toPercent(l.evolution, `Pipeline component "${l.name}" evolution`);
|
|
55
|
-
c.addNode(d, l.name, m, u, "pipeline-component", f, p), c.addPipelineComponent(r.parent, d);
|
|
56
|
-
});
|
|
57
|
-
}), r.links.forEach((r) => {
|
|
58
|
-
let l = !!r.arrow && (r.arrow.includes("-.->") || r.arrow.includes(".-.")), u = getFlowFromPort(r.fromPort) ?? getFlowFromPort(r.toPort), { flow: d, label: f } = extractFlowFromArrow(r.arrow);
|
|
59
|
-
!u && d && (u = d);
|
|
60
|
-
let p = r.linkLabel, m = f ?? p;
|
|
61
|
-
c.addLink(r.from, r.to, l, m, u);
|
|
62
|
-
}), r.evolves.forEach((r) => {
|
|
63
|
-
let l = c.getNode(r.component);
|
|
64
|
-
if (l?.y !== void 0) {
|
|
65
|
-
let u = toPercent(r.target, `Evolve target for "${r.component}"`);
|
|
66
|
-
c.addTrend(r.component, u, l.y);
|
|
67
|
-
}
|
|
68
|
-
}), r.annotations.length > 0) {
|
|
69
|
-
let l = r.annotations[0], u = toCoordinates(l.x, l.y, "Annotations box");
|
|
70
|
-
c.setAnnotationsBox(u.x, u.y);
|
|
71
|
-
}
|
|
72
|
-
r.annotation.forEach((r) => {
|
|
73
|
-
let l = toCoordinates(r.x, r.y, `Annotation ${r.number}`);
|
|
74
|
-
c.addAnnotation(r.number, [{
|
|
75
|
-
x: l.x,
|
|
76
|
-
y: l.y
|
|
77
|
-
}], r.text);
|
|
78
|
-
}), r.accelerators.forEach((r) => {
|
|
79
|
-
let l = toCoordinates(r.x, r.y, `Accelerator "${r.name}"`);
|
|
80
|
-
c.addAccelerator(r.name, l.x, l.y);
|
|
81
|
-
}), r.deaccelerators.forEach((r) => {
|
|
82
|
-
let l = toCoordinates(r.x, r.y, `Deaccelerator "${r.name}"`);
|
|
83
|
-
c.addDeaccelerator(r.name, l.x, l.y);
|
|
84
|
-
});
|
|
85
|
-
}, "populateDb"), parser = {
|
|
86
|
-
parser: { yy: void 0 },
|
|
87
|
-
parse: /* @__PURE__ */ __name(async (r) => {
|
|
88
|
-
let l = await parse("wardley", r);
|
|
89
|
-
log.debug(l);
|
|
90
|
-
let u = parser.parser?.yy;
|
|
91
|
-
if (!u || typeof u.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.");
|
|
92
|
-
populateDb(l, u);
|
|
93
|
-
}, "parse")
|
|
94
|
-
}, builder = new class {
|
|
95
|
-
constructor() {
|
|
96
|
-
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 = {};
|
|
97
|
-
}
|
|
98
|
-
static #e = __name(this, "WardleyBuilder");
|
|
99
|
-
addNode(r) {
|
|
100
|
-
let c = this.nodes.get(r.id) ?? {
|
|
101
|
-
id: r.id,
|
|
102
|
-
label: r.label
|
|
103
|
-
}, l = {
|
|
104
|
-
...c,
|
|
105
|
-
...r,
|
|
106
|
-
className: r.className ?? c.className,
|
|
107
|
-
labelOffsetX: r.labelOffsetX ?? c.labelOffsetX,
|
|
108
|
-
labelOffsetY: r.labelOffsetY ?? c.labelOffsetY
|
|
109
|
-
};
|
|
110
|
-
this.nodes.set(r.id, l);
|
|
111
|
-
}
|
|
112
|
-
addLink(r) {
|
|
113
|
-
this.links.push(r);
|
|
114
|
-
}
|
|
115
|
-
addTrend(r) {
|
|
116
|
-
this.trends.set(r.nodeId, r);
|
|
117
|
-
}
|
|
118
|
-
startPipeline(r) {
|
|
119
|
-
this.pipelines.set(r, {
|
|
120
|
-
nodeId: r,
|
|
121
|
-
componentIds: []
|
|
122
|
-
});
|
|
123
|
-
let c = this.nodes.get(r);
|
|
124
|
-
c && (c.isPipelineParent = !0);
|
|
125
|
-
}
|
|
126
|
-
addPipelineComponent(r, c) {
|
|
127
|
-
let l = this.pipelines.get(r);
|
|
128
|
-
l && l.componentIds.push(c);
|
|
129
|
-
let u = this.nodes.get(c);
|
|
130
|
-
u && (u.inPipeline = !0);
|
|
131
|
-
}
|
|
132
|
-
addAnnotation(r) {
|
|
133
|
-
this.annotations.push(r);
|
|
134
|
-
}
|
|
135
|
-
addNote(r) {
|
|
136
|
-
this.notes.push(r);
|
|
137
|
-
}
|
|
138
|
-
addAccelerator(r) {
|
|
139
|
-
this.accelerators.push(r);
|
|
140
|
-
}
|
|
141
|
-
addDeaccelerator(r) {
|
|
142
|
-
this.deaccelerators.push(r);
|
|
143
|
-
}
|
|
144
|
-
setAnnotationsBox(r, c) {
|
|
145
|
-
this.annotationsBox = {
|
|
146
|
-
x: r,
|
|
147
|
-
y: c
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
setAxes(r) {
|
|
151
|
-
this.axes = {
|
|
152
|
-
...this.axes,
|
|
153
|
-
...r
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
setSize(r, c) {
|
|
157
|
-
this.size = {
|
|
158
|
-
width: r,
|
|
159
|
-
height: c
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
getNode(r) {
|
|
163
|
-
return this.nodes.get(r);
|
|
164
|
-
}
|
|
165
|
-
build() {
|
|
166
|
-
let r = [];
|
|
167
|
-
for (let c of this.nodes.values()) {
|
|
168
|
-
if (typeof c.x != "number" || typeof c.y != "number") throw Error(`Node "${c.label}" is missing coordinates`);
|
|
169
|
-
r.push(c);
|
|
170
|
-
}
|
|
171
|
-
return {
|
|
172
|
-
nodes: r,
|
|
173
|
-
links: [...this.links],
|
|
174
|
-
trends: [...this.trends.values()],
|
|
175
|
-
pipelines: [...this.pipelines.values()],
|
|
176
|
-
annotations: [...this.annotations],
|
|
177
|
-
notes: [...this.notes],
|
|
178
|
-
accelerators: [...this.accelerators],
|
|
179
|
-
deaccelerators: [...this.deaccelerators],
|
|
180
|
-
annotationsBox: this.annotationsBox,
|
|
181
|
-
axes: { ...this.axes },
|
|
182
|
-
size: this.size
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
clear() {
|
|
186
|
-
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;
|
|
187
|
-
}
|
|
188
|
-
}();
|
|
189
|
-
function textSanitizer(r) {
|
|
190
|
-
let c = getConfig2();
|
|
191
|
-
return sanitizeText(r.trim(), c);
|
|
192
|
-
}
|
|
193
|
-
__name(textSanitizer, "textSanitizer");
|
|
194
|
-
function getConfig2$1() {
|
|
195
|
-
return getConfig2()["wardley-beta"];
|
|
196
|
-
}
|
|
197
|
-
__name(getConfig2$1, "getConfig");
|
|
198
|
-
function addNode(r, c, l, u, d, f, p, m, h) {
|
|
199
|
-
builder.addNode({
|
|
200
|
-
id: r,
|
|
201
|
-
label: textSanitizer(c),
|
|
202
|
-
x: l,
|
|
203
|
-
y: u,
|
|
204
|
-
className: d,
|
|
205
|
-
labelOffsetX: f,
|
|
206
|
-
labelOffsetY: p,
|
|
207
|
-
inertia: m,
|
|
208
|
-
sourceStrategy: h
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
__name(addNode, "addNode");
|
|
212
|
-
function addLink(r, c, l = !1, u, d) {
|
|
213
|
-
builder.addLink({
|
|
214
|
-
source: r,
|
|
215
|
-
target: c,
|
|
216
|
-
dashed: l,
|
|
217
|
-
label: u,
|
|
218
|
-
flow: d
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
__name(addLink, "addLink");
|
|
222
|
-
function addTrend(r, c, l) {
|
|
223
|
-
builder.addTrend({
|
|
224
|
-
nodeId: r,
|
|
225
|
-
targetX: c,
|
|
226
|
-
targetY: l
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
__name(addTrend, "addTrend");
|
|
230
|
-
function addAnnotation(r, c, l) {
|
|
231
|
-
builder.addAnnotation({
|
|
232
|
-
number: r,
|
|
233
|
-
coordinates: c,
|
|
234
|
-
text: l ? textSanitizer(l) : void 0
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
__name(addAnnotation, "addAnnotation");
|
|
238
|
-
function addNote(r, c, l) {
|
|
239
|
-
builder.addNote({
|
|
240
|
-
text: textSanitizer(r),
|
|
241
|
-
x: c,
|
|
242
|
-
y: l
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
__name(addNote, "addNote");
|
|
246
|
-
function addAccelerator(r, c, l) {
|
|
247
|
-
builder.addAccelerator({
|
|
248
|
-
name: textSanitizer(r),
|
|
249
|
-
x: c,
|
|
250
|
-
y: l
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
__name(addAccelerator, "addAccelerator");
|
|
254
|
-
function addDeaccelerator(r, c, l) {
|
|
255
|
-
builder.addDeaccelerator({
|
|
256
|
-
name: textSanitizer(r),
|
|
257
|
-
x: c,
|
|
258
|
-
y: l
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
__name(addDeaccelerator, "addDeaccelerator");
|
|
262
|
-
function setAnnotationsBox(r, c) {
|
|
263
|
-
builder.setAnnotationsBox(r, c);
|
|
264
|
-
}
|
|
265
|
-
__name(setAnnotationsBox, "setAnnotationsBox");
|
|
266
|
-
function setSize(r, c) {
|
|
267
|
-
builder.setSize(r, c);
|
|
268
|
-
}
|
|
269
|
-
__name(setSize, "setSize");
|
|
270
|
-
function startPipeline(r) {
|
|
271
|
-
builder.startPipeline(r);
|
|
272
|
-
}
|
|
273
|
-
__name(startPipeline, "startPipeline");
|
|
274
|
-
function addPipelineComponent(r, c) {
|
|
275
|
-
builder.addPipelineComponent(r, c);
|
|
276
|
-
}
|
|
277
|
-
__name(addPipelineComponent, "addPipelineComponent");
|
|
278
|
-
function updateAxes(r) {
|
|
279
|
-
let c = {};
|
|
280
|
-
r.xLabel && (c.xLabel = textSanitizer(r.xLabel)), r.yLabel && (c.yLabel = textSanitizer(r.yLabel)), r.stages && (c.stages = r.stages.map((r) => textSanitizer(r))), r.stageBoundaries && (c.stageBoundaries = r.stageBoundaries), builder.setAxes(c);
|
|
281
|
-
}
|
|
282
|
-
__name(updateAxes, "updateAxes");
|
|
283
|
-
function getNode(r) {
|
|
284
|
-
return builder.getNode(r);
|
|
285
|
-
}
|
|
286
|
-
__name(getNode, "getNode");
|
|
287
|
-
function getWardleyData() {
|
|
288
|
-
return builder.build();
|
|
289
|
-
}
|
|
290
|
-
__name(getWardleyData, "getWardleyData");
|
|
291
|
-
function clear2() {
|
|
292
|
-
builder.clear(), clear();
|
|
293
|
-
}
|
|
294
|
-
__name(clear2, "clear");
|
|
295
|
-
var wardleyDb_default = {
|
|
296
|
-
getConfig: getConfig2$1,
|
|
297
|
-
addNode,
|
|
298
|
-
addLink,
|
|
299
|
-
addTrend,
|
|
300
|
-
addAnnotation,
|
|
301
|
-
addNote,
|
|
302
|
-
addAccelerator,
|
|
303
|
-
addDeaccelerator,
|
|
304
|
-
setAnnotationsBox,
|
|
305
|
-
setSize,
|
|
306
|
-
startPipeline,
|
|
307
|
-
addPipelineComponent,
|
|
308
|
-
updateAxes,
|
|
309
|
-
getNode,
|
|
310
|
-
getWardleyData,
|
|
311
|
-
clear: clear2,
|
|
312
|
-
setAccTitle,
|
|
313
|
-
getAccTitle,
|
|
314
|
-
setDiagramTitle,
|
|
315
|
-
getDiagramTitle,
|
|
316
|
-
getAccDescription,
|
|
317
|
-
setAccDescription
|
|
318
|
-
}, DEFAULT_STAGES = [
|
|
319
|
-
"Genesis",
|
|
320
|
-
"Custom Built",
|
|
321
|
-
"Product",
|
|
322
|
-
"Commodity"
|
|
323
|
-
], getTheme = /* @__PURE__ */ __name(() => {
|
|
324
|
-
let { themeVariables: r } = getConfig2();
|
|
325
|
-
return {
|
|
326
|
-
backgroundColor: r.wardley?.backgroundColor ?? r.background ?? "#fff",
|
|
327
|
-
axisColor: r.wardley?.axisColor ?? "#000",
|
|
328
|
-
axisTextColor: r.wardley?.axisTextColor ?? r.primaryTextColor ?? "#222",
|
|
329
|
-
gridColor: r.wardley?.gridColor ?? "rgba(100, 100, 100, 0.2)",
|
|
330
|
-
componentFill: r.wardley?.componentFill ?? "#fff",
|
|
331
|
-
componentStroke: r.wardley?.componentStroke ?? "#000",
|
|
332
|
-
componentLabelColor: r.wardley?.componentLabelColor ?? r.primaryTextColor ?? "#222",
|
|
333
|
-
linkStroke: r.wardley?.linkStroke ?? "#000",
|
|
334
|
-
evolutionStroke: r.wardley?.evolutionStroke ?? "#dc3545",
|
|
335
|
-
annotationStroke: r.wardley?.annotationStroke ?? "#000",
|
|
336
|
-
annotationTextColor: r.wardley?.annotationTextColor ?? r.primaryTextColor ?? "#222",
|
|
337
|
-
annotationFill: r.wardley?.annotationFill ?? r.background ?? "#fff"
|
|
338
|
-
};
|
|
339
|
-
}, "getTheme"), getConfigValues = /* @__PURE__ */ __name(() => {
|
|
340
|
-
let r = getConfig2()["wardley-beta"];
|
|
341
|
-
return {
|
|
342
|
-
width: r?.width ?? 900,
|
|
343
|
-
height: r?.height ?? 600,
|
|
344
|
-
padding: r?.padding ?? 48,
|
|
345
|
-
nodeRadius: r?.nodeRadius ?? 6,
|
|
346
|
-
nodeLabelOffset: r?.nodeLabelOffset ?? 8,
|
|
347
|
-
axisFontSize: r?.axisFontSize ?? 12,
|
|
348
|
-
labelFontSize: r?.labelFontSize ?? 10,
|
|
349
|
-
showGrid: r?.showGrid ?? !1,
|
|
350
|
-
useMaxWidth: r?.useMaxWidth ?? !0
|
|
351
|
-
};
|
|
352
|
-
}, "getConfigValues"), diagram = {
|
|
353
|
-
parser,
|
|
354
|
-
db: wardleyDb_default,
|
|
355
|
-
renderer: { draw: /* @__PURE__ */ __name((l, d, f, p) => {
|
|
356
|
-
log.debug("Rendering Wardley map\n" + l);
|
|
357
|
-
let m = getConfigValues(), h = getTheme(), g = m.nodeRadius * 1.6, _ = p.db, v = _.getWardleyData(), b = _.getDiagramTitle(), x = v.size?.width ?? m.width, S = v.size?.height ?? m.height, C = selectSvgElement(d);
|
|
358
|
-
C.selectAll("*").remove(), configureSvgSize(C, S, x, m.useMaxWidth), C.attr("viewBox", `0 0 ${x} ${S}`);
|
|
359
|
-
let w = C.append("g").attr("class", "wardley-map"), T = C.append("defs");
|
|
360
|
-
T.append("marker").attr("id", `arrow-${d}`).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", h.evolutionStroke).attr("stroke", "none"), T.append("marker").attr("id", `link-arrow-end-${d}`).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", h.linkStroke).attr("stroke", "none"), T.append("marker").attr("id", `link-arrow-start-${d}`).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", h.linkStroke).attr("stroke", "none"), w.append("rect").attr("class", "wardley-background").attr("width", x).attr("height", S).attr("fill", h.backgroundColor);
|
|
361
|
-
let E = x - m.padding * 2, D = S - m.padding * 2;
|
|
362
|
-
b && w.append("text").attr("class", "wardley-title").attr("x", x / 2).attr("y", m.padding / 2).attr("fill", h.axisTextColor).attr("font-size", m.axisFontSize * 1.05).attr("font-weight", "bold").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(b);
|
|
363
|
-
let O = /* @__PURE__ */ __name((r) => m.padding + r / 100 * E, "projectX"), k = /* @__PURE__ */ __name((r) => S - m.padding - r / 100 * D, "projectY"), A = w.append("g").attr("class", "wardley-axes");
|
|
364
|
-
A.append("line").attr("x1", m.padding).attr("x2", x - m.padding).attr("y1", S - m.padding).attr("y2", S - m.padding).attr("stroke", h.axisColor).attr("stroke-width", 1), A.append("line").attr("x1", m.padding).attr("x2", m.padding).attr("y1", m.padding).attr("y2", S - m.padding).attr("stroke", h.axisColor).attr("stroke-width", 1);
|
|
365
|
-
let j = v.axes.xLabel ?? "Evolution", M = v.axes.yLabel ?? "Visibility";
|
|
366
|
-
A.append("text").attr("class", "wardley-axis-label wardley-axis-label-x").attr("x", m.padding + E / 2).attr("y", S - m.padding / 4).attr("fill", h.axisTextColor).attr("font-size", m.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").text(j), A.append("text").attr("class", "wardley-axis-label wardley-axis-label-y").attr("x", m.padding / 3).attr("y", m.padding + D / 2).attr("fill", h.axisTextColor).attr("font-size", m.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").attr("transform", `rotate(-90 ${m.padding / 3} ${m.padding + D / 2})`).text(M);
|
|
367
|
-
let N = v.axes.stages && v.axes.stages.length > 0 ? v.axes.stages : DEFAULT_STAGES;
|
|
368
|
-
if (N.length > 0) {
|
|
369
|
-
let r = w.append("g").attr("class", "wardley-stages"), c = v.axes.stageBoundaries, l = [];
|
|
370
|
-
if (c && c.length === N.length) {
|
|
371
|
-
let r = 0;
|
|
372
|
-
c.forEach((c) => {
|
|
373
|
-
l.push({
|
|
374
|
-
start: r,
|
|
375
|
-
end: c
|
|
376
|
-
}), r = c;
|
|
377
|
-
});
|
|
378
|
-
} else {
|
|
379
|
-
let r = 1 / N.length;
|
|
380
|
-
N.forEach((c, u) => {
|
|
381
|
-
l.push({
|
|
382
|
-
start: u * r,
|
|
383
|
-
end: (u + 1) * r
|
|
384
|
-
});
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
N.forEach((c, u) => {
|
|
388
|
-
let d = l[u], f = m.padding + d.start * E, p = (f + (m.padding + d.end * E)) / 2;
|
|
389
|
-
u > 0 && r.append("line").attr("x1", f).attr("x2", f).attr("y1", m.padding).attr("y2", S - m.padding).attr("stroke", "#000").attr("stroke-width", 1).attr("stroke-dasharray", "5 5").attr("opacity", .8), r.append("text").attr("class", "wardley-stage-label").attr("x", p).attr("y", S - m.padding / 1.5).attr("fill", h.axisTextColor).attr("font-size", m.axisFontSize - 2).attr("text-anchor", "middle").text(c);
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
if (m.showGrid) {
|
|
393
|
-
let r = w.append("g").attr("class", "wardley-grid");
|
|
394
|
-
for (let c = 1; c < 4; c++) {
|
|
395
|
-
let l = c / 4, u = m.padding + E * l;
|
|
396
|
-
r.append("line").attr("x1", u).attr("x2", u).attr("y1", m.padding).attr("y2", S - m.padding).attr("stroke", h.gridColor).attr("stroke-dasharray", "2 6"), r.append("line").attr("x1", m.padding).attr("x2", x - m.padding).attr("y1", S - m.padding - D * l).attr("y2", S - m.padding - D * l).attr("stroke", h.gridColor).attr("stroke-dasharray", "2 6");
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
let P = /* @__PURE__ */ new Map();
|
|
400
|
-
if (v.nodes.forEach((r) => {
|
|
401
|
-
P.set(r.id, {
|
|
402
|
-
x: O(r.x),
|
|
403
|
-
y: k(r.y),
|
|
404
|
-
node: r
|
|
405
|
-
});
|
|
406
|
-
}), v.pipelines.length > 0) {
|
|
407
|
-
let r = w.append("g").attr("class", "wardley-pipelines"), c = w.append("g").attr("class", "wardley-pipeline-links");
|
|
408
|
-
v.pipelines.forEach((l) => {
|
|
409
|
-
if (l.componentIds.length === 0) return;
|
|
410
|
-
let u = l.componentIds.map((r) => ({
|
|
411
|
-
id: r,
|
|
412
|
-
pos: P.get(r),
|
|
413
|
-
node: v.nodes.find((c) => c.id === r)
|
|
414
|
-
})).filter((r) => r.pos && r.node).sort((r, c) => r.node.x - c.node.x);
|
|
415
|
-
for (let r = 0; r < u.length - 1; r++) {
|
|
416
|
-
let l = u[r], d = u[r + 1];
|
|
417
|
-
c.append("line").attr("class", "wardley-pipeline-evolution-link").attr("x1", l.pos.x).attr("y1", l.pos.y).attr("x2", d.pos.x).attr("y2", d.pos.y).attr("stroke", h.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4");
|
|
418
|
-
}
|
|
419
|
-
let d = Infinity, f = -Infinity, p = 0;
|
|
420
|
-
if (l.componentIds.forEach((r) => {
|
|
421
|
-
let c = P.get(r);
|
|
422
|
-
c && (d = Math.min(d, c.x), f = Math.max(f, c.x), p = c.y);
|
|
423
|
-
}), d !== Infinity && f !== -Infinity) {
|
|
424
|
-
let c = m.nodeRadius * 4, u = p - c / 2, _ = P.get(l.nodeId);
|
|
425
|
-
_ && (_.x = (d + f) / 2, _.y = u - g / 6), r.append("rect").attr("class", "wardley-pipeline-box").attr("x", d - 15).attr("y", u).attr("width", f - d + 30).attr("height", c).attr("fill", "none").attr("stroke", h.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
|
|
426
|
-
}
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
let F = w.append("g").attr("class", "wardley-links"), I = /* @__PURE__ */ new Map();
|
|
430
|
-
v.pipelines.forEach((r) => {
|
|
431
|
-
I.set(r.nodeId, new Set(r.componentIds));
|
|
432
|
-
});
|
|
433
|
-
let L = v.links.filter((r) => !(!P.has(r.source) || !P.has(r.target) || I.get(r.target)?.has(r.source)));
|
|
434
|
-
F.selectAll("line").data(L).enter().append("line").attr("class", (r) => `wardley-link${r.dashed ? " wardley-link--dashed" : ""}`).attr("x1", (r) => {
|
|
435
|
-
let c = P.get(r.source), l = P.get(r.target), u = v.nodes.find((c) => c.id === r.source).isPipelineParent ? g / Math.sqrt(2) : m.nodeRadius, d = l.x - c.x, f = l.y - c.y, p = Math.sqrt(d * d + f * f);
|
|
436
|
-
return c.x + d / p * u;
|
|
437
|
-
}).attr("y1", (r) => {
|
|
438
|
-
let c = P.get(r.source), l = P.get(r.target), u = v.nodes.find((c) => c.id === r.source).isPipelineParent ? g / Math.sqrt(2) : m.nodeRadius, d = l.x - c.x, f = l.y - c.y, p = Math.sqrt(d * d + f * f);
|
|
439
|
-
return c.y + f / p * u;
|
|
440
|
-
}).attr("x2", (r) => {
|
|
441
|
-
let c = P.get(r.source), l = P.get(r.target), u = v.nodes.find((c) => c.id === r.target).isPipelineParent ? g / Math.sqrt(2) : m.nodeRadius, d = c.x - l.x, f = c.y - l.y, p = Math.sqrt(d * d + f * f);
|
|
442
|
-
return l.x + d / p * u;
|
|
443
|
-
}).attr("y2", (r) => {
|
|
444
|
-
let c = P.get(r.source), l = P.get(r.target), u = v.nodes.find((c) => c.id === r.target).isPipelineParent ? g / Math.sqrt(2) : m.nodeRadius, d = c.x - l.x, f = c.y - l.y, p = Math.sqrt(d * d + f * f);
|
|
445
|
-
return l.y + f / p * u;
|
|
446
|
-
}).attr("stroke", h.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", (r) => r.dashed ? "6 6" : null).attr("marker-end", (r) => r.flow === "forward" || r.flow === "bidirectional" ? `url(#link-arrow-end-${d})` : null).attr("marker-start", (r) => r.flow === "backward" || r.flow === "bidirectional" ? `url(#link-arrow-start-${d})` : null), F.selectAll("text").data(L.filter((r) => r.label)).enter().append("text").attr("class", "wardley-link-label").attr("x", (r) => {
|
|
447
|
-
let c = P.get(r.source), l = P.get(r.target), u = (c.x + l.x) / 2, d = l.y - c.y, f = l.x - c.x;
|
|
448
|
-
return u + d / Math.sqrt(f * f + d * d) * 8;
|
|
449
|
-
}).attr("y", (r) => {
|
|
450
|
-
let c = P.get(r.source), l = P.get(r.target), u = (c.y + l.y) / 2, d = l.x - c.x, f = l.y - c.y, p = Math.sqrt(d * d + f * f);
|
|
451
|
-
return u + -d / p * 8;
|
|
452
|
-
}).attr("fill", h.axisTextColor).attr("font-size", m.labelFontSize).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("transform", (r) => {
|
|
453
|
-
let c = P.get(r.source), l = P.get(r.target), u = (c.x + l.x) / 2, d = (c.y + l.y) / 2, f = l.x - c.x, p = l.y - c.y, m = Math.sqrt(f * f + p * p), h = p / m, g = -f / m, _ = u + h * 8, v = d + g * 8, y = Math.atan2(p, f) * 180 / Math.PI;
|
|
454
|
-
return (y > 90 || y < -90) && (y += 180), `rotate(${y} ${_} ${v})`;
|
|
455
|
-
}).text((r) => r.label);
|
|
456
|
-
let R = w.append("g").attr("class", "wardley-trends"), z = v.trends.map((r) => {
|
|
457
|
-
let c = P.get(r.nodeId);
|
|
458
|
-
if (!c) return null;
|
|
459
|
-
let l = O(r.targetX), u = k(r.targetY), d = l - c.x, f = u - c.y, p = Math.sqrt(d * d + f * f), h = m.nodeRadius + 2;
|
|
460
|
-
return {
|
|
461
|
-
origin: c,
|
|
462
|
-
targetX: l,
|
|
463
|
-
targetY: u,
|
|
464
|
-
adjustedX2: p > h ? l - d / p * h : l,
|
|
465
|
-
adjustedY2: p > h ? u - f / p * h : u
|
|
466
|
-
};
|
|
467
|
-
}).filter((r) => r !== null);
|
|
468
|
-
R.selectAll("line").data(z).enter().append("line").attr("class", "wardley-trend").attr("x1", (r) => r.origin.x).attr("y1", (r) => r.origin.y).attr("x2", (r) => r.adjustedX2).attr("y2", (r) => r.adjustedY2).attr("stroke", h.evolutionStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4").attr("marker-end", `url(#arrow-${d})`);
|
|
469
|
-
let B = w.append("g").attr("class", "wardley-nodes").selectAll("g").data(v.nodes).enter().append("g").attr("class", (r) => ["wardley-node", r.className ? `wardley-node--${r.className}` : ""].filter(Boolean).join(" "));
|
|
470
|
-
B.filter((r) => r.sourceStrategy === "outsource").append("circle").attr("class", "wardley-outsource-overlay").attr("cx", (r) => P.get(r.id).x).attr("cy", (r) => P.get(r.id).y).attr("r", m.nodeRadius * 2).attr("fill", "#666").attr("stroke", h.componentStroke).attr("stroke-width", 1), B.filter((r) => r.sourceStrategy === "buy").append("circle").attr("class", "wardley-buy-overlay").attr("cx", (r) => P.get(r.id).x).attr("cy", (r) => P.get(r.id).y).attr("r", m.nodeRadius * 2).attr("fill", "#ccc").attr("stroke", h.componentStroke).attr("stroke-width", 1), B.filter((r) => r.sourceStrategy === "build").append("circle").attr("class", "wardley-build-overlay").attr("cx", (r) => P.get(r.id).x).attr("cy", (r) => P.get(r.id).y).attr("r", m.nodeRadius * 2).attr("fill", "#eee").attr("stroke", "#000").attr("stroke-width", 1);
|
|
471
|
-
let V = B.filter((r) => r.sourceStrategy === "market");
|
|
472
|
-
V.append("circle").attr("class", "wardley-market-overlay").attr("cx", (r) => P.get(r.id).x).attr("cy", (r) => P.get(r.id).y).attr("r", m.nodeRadius * 2).attr("fill", "white").attr("stroke", h.componentStroke).attr("stroke-width", 1), B.filter((r) => !r.isPipelineParent && r.sourceStrategy !== "market" && r.className !== "anchor").append("circle").attr("cx", (r) => P.get(r.id).x).attr("cy", (r) => P.get(r.id).y).attr("r", m.nodeRadius).attr("fill", h.componentFill).attr("stroke", h.componentStroke).attr("stroke-width", 1);
|
|
473
|
-
let H = m.nodeRadius * .7, U = m.nodeRadius * 1.2;
|
|
474
|
-
if (V.append("line").attr("class", "wardley-market-line").attr("x1", (r) => P.get(r.id).x).attr("y1", (r) => P.get(r.id).y - U).attr("x2", (r) => P.get(r.id).x - U * Math.cos(Math.PI / 6)).attr("y2", (r) => P.get(r.id).y + U * Math.sin(Math.PI / 6)).attr("stroke", h.componentStroke).attr("stroke-width", 1), V.append("line").attr("class", "wardley-market-line").attr("x1", (r) => P.get(r.id).x - U * Math.cos(Math.PI / 6)).attr("y1", (r) => P.get(r.id).y + U * Math.sin(Math.PI / 6)).attr("x2", (r) => P.get(r.id).x + U * Math.cos(Math.PI / 6)).attr("y2", (r) => P.get(r.id).y + U * Math.sin(Math.PI / 6)).attr("stroke", h.componentStroke).attr("stroke-width", 1), V.append("line").attr("class", "wardley-market-line").attr("x1", (r) => P.get(r.id).x + U * Math.cos(Math.PI / 6)).attr("y1", (r) => P.get(r.id).y + U * Math.sin(Math.PI / 6)).attr("x2", (r) => P.get(r.id).x).attr("y2", (r) => P.get(r.id).y - U).attr("stroke", h.componentStroke).attr("stroke-width", 1), V.append("circle").attr("class", "wardley-market-dot").attr("cx", (r) => P.get(r.id).x).attr("cy", (r) => P.get(r.id).y - U).attr("r", H).attr("fill", "white").attr("stroke", h.componentStroke).attr("stroke-width", 2), V.append("circle").attr("class", "wardley-market-dot").attr("cx", (r) => P.get(r.id).x - U * Math.cos(Math.PI / 6)).attr("cy", (r) => P.get(r.id).y + U * Math.sin(Math.PI / 6)).attr("r", H).attr("fill", "white").attr("stroke", h.componentStroke).attr("stroke-width", 2), V.append("circle").attr("class", "wardley-market-dot").attr("cx", (r) => P.get(r.id).x + U * Math.cos(Math.PI / 6)).attr("cy", (r) => P.get(r.id).y + U * Math.sin(Math.PI / 6)).attr("r", H).attr("fill", "white").attr("stroke", h.componentStroke).attr("stroke-width", 2), B.filter((r) => r.isPipelineParent === !0).append("rect").attr("x", (r) => P.get(r.id).x - g / 2).attr("y", (r) => P.get(r.id).y - g / 2).attr("width", g).attr("height", g).attr("fill", h.componentFill).attr("stroke", h.componentStroke).attr("stroke-width", 1), B.filter((r) => r.inertia === !0).append("line").attr("class", "wardley-inertia").attr("x1", (r) => {
|
|
475
|
-
let c = P.get(r.id), l = r.isPipelineParent ? g / 2 + 15 : m.nodeRadius + 15;
|
|
476
|
-
return r.sourceStrategy && (l += m.nodeRadius + 10), c.x + l;
|
|
477
|
-
}).attr("y1", (r) => {
|
|
478
|
-
let c = P.get(r.id), l = r.isPipelineParent ? g : m.nodeRadius * 2;
|
|
479
|
-
return c.y - l / 2;
|
|
480
|
-
}).attr("x2", (r) => {
|
|
481
|
-
let c = P.get(r.id), l = r.isPipelineParent ? g / 2 + 15 : m.nodeRadius + 15;
|
|
482
|
-
return r.sourceStrategy && (l += m.nodeRadius + 10), c.x + l;
|
|
483
|
-
}).attr("y2", (r) => {
|
|
484
|
-
let c = P.get(r.id), l = r.isPipelineParent ? g : m.nodeRadius * 2;
|
|
485
|
-
return c.y + l / 2;
|
|
486
|
-
}).attr("stroke", h.componentStroke).attr("stroke-width", 6), B.append("text").attr("x", (r) => {
|
|
487
|
-
let c = P.get(r.id);
|
|
488
|
-
if (r.className === "anchor") return r.labelOffsetX === void 0 ? c.x : c.x + r.labelOffsetX;
|
|
489
|
-
let l = m.nodeLabelOffset;
|
|
490
|
-
r.sourceStrategy && r.labelOffsetX === void 0 && (l += 10);
|
|
491
|
-
let u = r.labelOffsetX ?? l;
|
|
492
|
-
return c.x + u;
|
|
493
|
-
}).attr("y", (r) => {
|
|
494
|
-
let c = P.get(r.id);
|
|
495
|
-
if (r.className === "anchor") return r.labelOffsetY === void 0 ? c.y - 3 : c.y + r.labelOffsetY;
|
|
496
|
-
let l = -m.nodeLabelOffset;
|
|
497
|
-
r.sourceStrategy && r.labelOffsetY === void 0 && (l -= 10);
|
|
498
|
-
let u = r.labelOffsetY ?? l;
|
|
499
|
-
return c.y + u;
|
|
500
|
-
}).attr("class", "wardley-node-label").attr("fill", (r) => r.className === "evolved" ? h.evolutionStroke : r.className === "anchor" ? "#000" : h.componentLabelColor).attr("font-size", m.labelFontSize).attr("font-weight", (r) => r.className === "anchor" ? "bold" : "normal").attr("text-anchor", (r) => r.className === "anchor" ? "middle" : "start").attr("dominant-baseline", (r) => r.className === "anchor" ? "middle" : "auto").text((r) => r.label), v.annotations.length > 0) {
|
|
501
|
-
let r = w.append("g").attr("class", "wardley-annotations");
|
|
502
|
-
if (v.annotations.forEach((c) => {
|
|
503
|
-
let l = c.coordinates.map((r) => ({
|
|
504
|
-
x: O(r.x),
|
|
505
|
-
y: k(r.y)
|
|
506
|
-
}));
|
|
507
|
-
if (l.length > 1) for (let c = 0; c < l.length - 1; c++) r.append("line").attr("class", "wardley-annotation-line").attr("x1", l[c].x).attr("y1", l[c].y).attr("x2", l[c + 1].x).attr("y2", l[c + 1].y).attr("stroke", h.axisColor).attr("stroke-width", 1.5).attr("stroke-dasharray", "4 4");
|
|
508
|
-
l.forEach((l) => {
|
|
509
|
-
let u = r.append("g").attr("class", "wardley-annotation");
|
|
510
|
-
u.append("circle").attr("cx", l.x).attr("cy", l.y).attr("r", 10).attr("fill", "white").attr("stroke", h.axisColor).attr("stroke-width", 1.5), u.append("text").attr("x", l.x).attr("y", l.y).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", 10).attr("fill", h.axisTextColor).attr("font-weight", "bold").text(c.number);
|
|
511
|
-
});
|
|
512
|
-
}), v.annotationsBox) {
|
|
513
|
-
let c = O(v.annotationsBox.x), l = k(v.annotationsBox.y), u = r.append("g").attr("class", "wardley-annotations-box"), d = [...v.annotations].filter((r) => r.text).sort((r, c) => r.number - c.number), f = [];
|
|
514
|
-
if (d.forEach((r, d) => {
|
|
515
|
-
let p = u.append("text").attr("x", c + 10).attr("y", l + 10 + (d + 1) * 16).attr("font-size", 11).attr("fill", h.axisTextColor).attr("text-anchor", "start").attr("dominant-baseline", "middle").text(`${r.number}. ${r.text}`);
|
|
516
|
-
f.push(p);
|
|
517
|
-
}), f.length > 0) {
|
|
518
|
-
let r = 0, p = 0;
|
|
519
|
-
f.forEach((c) => {
|
|
520
|
-
let l = c.node(), u = l.getComputedTextLength();
|
|
521
|
-
r = Math.max(r, u);
|
|
522
|
-
let d = l.getBBox();
|
|
523
|
-
p = Math.max(p, d.height);
|
|
524
|
-
});
|
|
525
|
-
let g = r + 20 + 105, _ = d.length * 16 + 20 + p / 2, v = m.padding, y = x - m.padding - g, b = m.padding, C = S - m.padding - _;
|
|
526
|
-
c = Math.max(v, Math.min(c, y)), l = Math.max(b, Math.min(l, C)), f.forEach((r, u) => {
|
|
527
|
-
r.attr("x", c + 10).attr("y", l + 10 + (u + 1) * 16);
|
|
528
|
-
}), u.insert("rect", "text").attr("x", c).attr("y", l).attr("width", g).attr("height", _).attr("fill", "white").attr("stroke", h.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
if (v.notes.length > 0) {
|
|
533
|
-
let r = w.append("g").attr("class", "wardley-notes");
|
|
534
|
-
v.notes.forEach((c) => {
|
|
535
|
-
let l = O(c.x), u = k(c.y);
|
|
536
|
-
r.append("text").attr("x", l).attr("y", u).attr("text-anchor", "start").attr("font-size", 11).attr("fill", h.axisTextColor).attr("font-weight", "bold").text(c.text);
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
|
-
if (v.accelerators.length > 0) {
|
|
540
|
-
let r = w.append("g").attr("class", "wardley-accelerators");
|
|
541
|
-
v.accelerators.forEach((c) => {
|
|
542
|
-
let l = O(c.x), u = k(c.y), d = `
|
|
543
|
-
M ${l} ${u - 30 / 2}
|
|
544
|
-
L ${l + 60 - 20} ${u - 30 / 2}
|
|
545
|
-
L ${l + 60 - 20} ${u - 30 / 2 - 8}
|
|
546
|
-
L ${l + 60} ${u}
|
|
547
|
-
L ${l + 60 - 20} ${u + 30 / 2 + 8}
|
|
548
|
-
L ${l + 60 - 20} ${u + 30 / 2}
|
|
549
|
-
L ${l} ${u + 30 / 2}
|
|
550
|
-
Z
|
|
551
|
-
`;
|
|
552
|
-
r.append("path").attr("d", d).attr("fill", "white").attr("stroke", h.componentStroke).attr("stroke-width", 1), r.append("text").attr("x", l + 60 / 2).attr("y", u + 30 / 2 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", h.axisTextColor).attr("font-weight", "bold").text(c.name);
|
|
553
|
-
});
|
|
554
|
-
}
|
|
555
|
-
if (v.deaccelerators.length > 0) {
|
|
556
|
-
let r = w.append("g").attr("class", "wardley-deaccelerators");
|
|
557
|
-
v.deaccelerators.forEach((c) => {
|
|
558
|
-
let l = O(c.x), u = k(c.y), d = `
|
|
559
|
-
M ${l + 60} ${u - 30 / 2}
|
|
560
|
-
L ${l + 20} ${u - 30 / 2}
|
|
561
|
-
L ${l + 20} ${u - 30 / 2 - 8}
|
|
562
|
-
L ${l} ${u}
|
|
563
|
-
L ${l + 20} ${u + 30 / 2 + 8}
|
|
564
|
-
L ${l + 20} ${u + 30 / 2}
|
|
565
|
-
L ${l + 60} ${u + 30 / 2}
|
|
566
|
-
Z
|
|
567
|
-
`;
|
|
568
|
-
r.append("path").attr("d", d).attr("fill", "white").attr("stroke", h.componentStroke).attr("stroke-width", 1), r.append("text").attr("x", l + 60 / 2).attr("y", u + 30 / 2 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", h.axisTextColor).attr("font-weight", "bold").text(c.name);
|
|
569
|
-
});
|
|
570
|
-
}
|
|
571
|
-
}, "draw") },
|
|
572
|
-
styles: /* @__PURE__ */ __name(() => "", "styles")
|
|
573
|
-
};
|
|
574
|
-
export { diagram };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { require_main } from "./lib/browser/main.js";
|
|
3
|
-
var require_browser = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
4
|
-
n.exports = require_main();
|
|
5
|
-
}));
|
|
6
|
-
export default require_browser();
|
|
7
|
-
export { require_browser };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { require_api } from "../common/api.js";
|
|
3
|
-
import { require_ril } from "./ril.js";
|
|
4
|
-
var require_main = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
5
|
-
var r = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
|
|
6
|
-
r === void 0 && (r = n);
|
|
7
|
-
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
8
|
-
(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
|
|
9
|
-
enumerable: !0,
|
|
10
|
-
get: function() {
|
|
11
|
-
return t[n];
|
|
12
|
-
}
|
|
13
|
-
}), Object.defineProperty(e, r, i);
|
|
14
|
-
}) : (function(e, t, n, r) {
|
|
15
|
-
r === void 0 && (r = n), e[r] = t[n];
|
|
16
|
-
})), i = e && e.__exportStar || function(e, t) {
|
|
17
|
-
for (var n in e) n !== "default" && !Object.prototype.hasOwnProperty.call(t, n) && r(t, e, n);
|
|
18
|
-
};
|
|
19
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.createMessageConnection = e.BrowserMessageWriter = e.BrowserMessageReader = void 0, require_ril().default.install();
|
|
20
|
-
var a = require_api();
|
|
21
|
-
i(require_api(), e), e.BrowserMessageReader = class extends a.AbstractMessageReader {
|
|
22
|
-
constructor(e) {
|
|
23
|
-
super(), this._onData = new a.Emitter(), this._messageListener = (e) => {
|
|
24
|
-
this._onData.fire(e.data);
|
|
25
|
-
}, e.addEventListener("error", (e) => this.fireError(e)), e.onmessage = this._messageListener;
|
|
26
|
-
}
|
|
27
|
-
listen(e) {
|
|
28
|
-
return this._onData.event(e);
|
|
29
|
-
}
|
|
30
|
-
}, e.BrowserMessageWriter = class extends a.AbstractMessageWriter {
|
|
31
|
-
constructor(e) {
|
|
32
|
-
super(), this.port = e, this.errorCount = 0, e.addEventListener("error", (e) => this.fireError(e));
|
|
33
|
-
}
|
|
34
|
-
write(e) {
|
|
35
|
-
try {
|
|
36
|
-
return this.port.postMessage(e), Promise.resolve();
|
|
37
|
-
} catch (t) {
|
|
38
|
-
return this.handleError(t, e), Promise.reject(t);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
handleError(e, t) {
|
|
42
|
-
this.errorCount++, this.fireError(e, t, this.errorCount);
|
|
43
|
-
}
|
|
44
|
-
end() {}
|
|
45
|
-
};
|
|
46
|
-
function o(e, t, n, r) {
|
|
47
|
-
return n === void 0 && (n = a.NullLogger), a.ConnectionStrategy.is(r) && (r = { connectionStrategy: r }), (0, a.createMessageConnection)(e, t, n, r);
|
|
48
|
-
}
|
|
49
|
-
e.createMessageConnection = o;
|
|
50
|
-
}));
|
|
51
|
-
export default require_main();
|
|
52
|
-
export { require_main };
|