@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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __toESM } from "../../../../../_virtual/rolldown_runtime.js";
|
|
2
2
|
import { __name, log } from "./chunk-AGHRB4JF.js";
|
|
3
|
-
import { clear, defaultConfig_default, getAccDescription, getAccTitle, getConfig, getConfig2, getDiagramTitle, sanitizeText, setAccDescription, setAccTitle, setDiagramTitle, setupGraphViewbox } from "./chunk-
|
|
3
|
+
import { clear, defaultConfig_default, getAccDescription, getAccTitle, getConfig, getConfig2, getDiagramTitle, sanitizeText, setAccDescription, setAccTitle, setDiagramTitle, setupGraphViewbox } from "./chunk-CSCIHK7Q.js";
|
|
4
4
|
import select_default from "../../../../d3-selection/src/select.js";
|
|
5
5
|
import "../../../../d3/src/index.js";
|
|
6
|
-
import { selectSvgElement } from "./chunk-
|
|
7
|
-
import { cleanAndMerge, getEdgeId } from "./chunk-
|
|
8
|
-
import { createText, getIconSVG, registerIconPacks, unknownIcon } from "./chunk-
|
|
6
|
+
import { selectSvgElement } from "./chunk-WU5MYG2G.js";
|
|
7
|
+
import { cleanAndMerge, getEdgeId } from "./chunk-5ZQYHXKU.js";
|
|
8
|
+
import { createText, getIconSVG, registerIconPacks, unknownIcon } from "./chunk-O5CBEL6O.js";
|
|
9
9
|
import { populateCommonDb } from "./chunk-4BX2VUAB.js";
|
|
10
10
|
import { parse } from "../../../../@mermaid-js/parser/dist/mermaid-parser.core.js";
|
|
11
11
|
import { cytoscape } from "../../../../cytoscape/dist/cytoscape.esm.js";
|
|
@@ -21,39 +21,39 @@ var import_cytoscape_fcose = /* @__PURE__ */ __toESM(require_cytoscape_fcose(),
|
|
|
21
21
|
T: /* @__PURE__ */ __name((e) => `0,0 ${e},0 ${e / 2},${e}`, "T"),
|
|
22
22
|
B: /* @__PURE__ */ __name((e) => `${e / 2},0 ${e},${e} 0,${e}`, "B")
|
|
23
23
|
}, ArchitectureDirectionArrowShift = {
|
|
24
|
-
L: /* @__PURE__ */ __name((e,
|
|
25
|
-
R: /* @__PURE__ */ __name((e,
|
|
26
|
-
T: /* @__PURE__ */ __name((e,
|
|
27
|
-
B: /* @__PURE__ */ __name((e,
|
|
24
|
+
L: /* @__PURE__ */ __name((e, O) => e - O + 2, "L"),
|
|
25
|
+
R: /* @__PURE__ */ __name((e, O) => e - 2, "R"),
|
|
26
|
+
T: /* @__PURE__ */ __name((e, O) => e - O + 2, "T"),
|
|
27
|
+
B: /* @__PURE__ */ __name((e, O) => e - 2, "B")
|
|
28
28
|
}, getOppositeArchitectureDirection = /* @__PURE__ */ __name(function(e) {
|
|
29
29
|
return isArchitectureDirectionX(e) ? e === "L" ? "R" : "L" : e === "T" ? "B" : "T";
|
|
30
30
|
}, "getOppositeArchitectureDirection"), isArchitectureDirection = /* @__PURE__ */ __name(function(e) {
|
|
31
|
-
let
|
|
32
|
-
return
|
|
31
|
+
let O = e;
|
|
32
|
+
return O === "L" || O === "R" || O === "T" || O === "B";
|
|
33
33
|
}, "isArchitectureDirection"), isArchitectureDirectionX = /* @__PURE__ */ __name(function(e) {
|
|
34
|
-
let
|
|
35
|
-
return
|
|
34
|
+
let O = e;
|
|
35
|
+
return O === "L" || O === "R";
|
|
36
36
|
}, "isArchitectureDirectionX"), isArchitectureDirectionY = /* @__PURE__ */ __name(function(e) {
|
|
37
|
-
let
|
|
38
|
-
return
|
|
39
|
-
}, "isArchitectureDirectionY"), isArchitectureDirectionXY = /* @__PURE__ */ __name(function(e,
|
|
40
|
-
let
|
|
41
|
-
return
|
|
37
|
+
let O = e;
|
|
38
|
+
return O === "T" || O === "B";
|
|
39
|
+
}, "isArchitectureDirectionY"), isArchitectureDirectionXY = /* @__PURE__ */ __name(function(e, O) {
|
|
40
|
+
let k = isArchitectureDirectionX(e) && isArchitectureDirectionY(O), A = isArchitectureDirectionY(e) && isArchitectureDirectionX(O);
|
|
41
|
+
return k || A;
|
|
42
42
|
}, "isArchitectureDirectionXY"), isArchitecturePairXY = /* @__PURE__ */ __name(function(e) {
|
|
43
|
-
let
|
|
44
|
-
return
|
|
43
|
+
let O = e[0], k = e[1], A = isArchitectureDirectionX(O) && isArchitectureDirectionY(k), j = isArchitectureDirectionY(O) && isArchitectureDirectionX(k);
|
|
44
|
+
return A || j;
|
|
45
45
|
}, "isArchitecturePairXY"), isValidArchitectureDirectionPair = /* @__PURE__ */ __name(function(e) {
|
|
46
46
|
return e !== "LL" && e !== "RR" && e !== "TT" && e !== "BB";
|
|
47
|
-
}, "isValidArchitectureDirectionPair"), getArchitectureDirectionPair = /* @__PURE__ */ __name(function(e,
|
|
48
|
-
let
|
|
49
|
-
return isValidArchitectureDirectionPair(
|
|
50
|
-
}, "getArchitectureDirectionPair"), shiftPositionByArchitectureDirectionPair = /* @__PURE__ */ __name(function([e,
|
|
51
|
-
let
|
|
52
|
-
return isArchitectureDirectionX(
|
|
47
|
+
}, "isValidArchitectureDirectionPair"), getArchitectureDirectionPair = /* @__PURE__ */ __name(function(e, O) {
|
|
48
|
+
let k = `${e}${O}`;
|
|
49
|
+
return isValidArchitectureDirectionPair(k) ? k : void 0;
|
|
50
|
+
}, "getArchitectureDirectionPair"), shiftPositionByArchitectureDirectionPair = /* @__PURE__ */ __name(function([e, O], k) {
|
|
51
|
+
let A = k[0], j = k[1];
|
|
52
|
+
return isArchitectureDirectionX(A) ? isArchitectureDirectionY(j) ? [e + (A === "L" ? -1 : 1), O + (j === "T" ? 1 : -1)] : [e + (A === "L" ? -1 : 1), O] : isArchitectureDirectionX(j) ? [e + (j === "L" ? 1 : -1), O + (A === "T" ? 1 : -1)] : [e, O + (A === "T" ? 1 : -1)];
|
|
53
53
|
}, "shiftPositionByArchitectureDirectionPair"), getArchitectureDirectionXYFactors = /* @__PURE__ */ __name(function(e) {
|
|
54
54
|
return e === "LT" || e === "TL" ? [1, 1] : e === "BL" || e === "LB" ? [1, -1] : e === "BR" || e === "RB" ? [-1, -1] : [-1, 1];
|
|
55
|
-
}, "getArchitectureDirectionXYFactors"), getArchitectureDirectionAlignment = /* @__PURE__ */ __name(function(e,
|
|
56
|
-
return isArchitectureDirectionXY(e,
|
|
55
|
+
}, "getArchitectureDirectionXYFactors"), getArchitectureDirectionAlignment = /* @__PURE__ */ __name(function(e, O) {
|
|
56
|
+
return isArchitectureDirectionXY(e, O) ? "bend" : isArchitectureDirectionX(e) ? "horizontal" : "vertical";
|
|
57
57
|
}, "getArchitectureDirectionAlignment"), isArchitectureService = /* @__PURE__ */ __name(function(e) {
|
|
58
58
|
return e.type === "service";
|
|
59
59
|
}, "isArchitectureService"), isArchitectureJunction = /* @__PURE__ */ __name(function(e) {
|
|
@@ -72,38 +72,38 @@ var import_cytoscape_fcose = /* @__PURE__ */ __toESM(require_cytoscape_fcose(),
|
|
|
72
72
|
clear() {
|
|
73
73
|
this.nodes = {}, this.groups = {}, this.edges = [], this.registeredIds = {}, this.dataStructures = void 0, this.elements = {}, this.diagramId = "", clear();
|
|
74
74
|
}
|
|
75
|
-
addService({ id: e, icon:
|
|
75
|
+
addService({ id: e, icon: O, in: k, title: A, iconText: j }) {
|
|
76
76
|
if (this.registeredIds[e] !== void 0) throw Error(`The service id [${e}] is already in use by another ${this.registeredIds[e]}`);
|
|
77
|
-
if (
|
|
78
|
-
if (e ===
|
|
79
|
-
if (this.registeredIds[
|
|
80
|
-
if (this.registeredIds[
|
|
77
|
+
if (k !== void 0) {
|
|
78
|
+
if (e === k) throw Error(`The service [${e}] cannot be placed within itself`);
|
|
79
|
+
if (this.registeredIds[k] === void 0) throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);
|
|
80
|
+
if (this.registeredIds[k] === "node") throw Error(`The service [${e}]'s parent is not a group`);
|
|
81
81
|
}
|
|
82
82
|
this.registeredIds[e] = "node", this.nodes[e] = {
|
|
83
83
|
id: e,
|
|
84
84
|
type: "service",
|
|
85
|
-
icon:
|
|
86
|
-
iconText:
|
|
87
|
-
title:
|
|
85
|
+
icon: O,
|
|
86
|
+
iconText: j,
|
|
87
|
+
title: A,
|
|
88
88
|
edges: [],
|
|
89
|
-
in:
|
|
89
|
+
in: k
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
getServices() {
|
|
93
93
|
return Object.values(this.nodes).filter(isArchitectureService);
|
|
94
94
|
}
|
|
95
|
-
addJunction({ id: e, in:
|
|
95
|
+
addJunction({ id: e, in: O }) {
|
|
96
96
|
if (this.registeredIds[e] !== void 0) throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds[e]}`);
|
|
97
|
-
if (
|
|
98
|
-
if (e ===
|
|
99
|
-
if (this.registeredIds[
|
|
100
|
-
if (this.registeredIds[
|
|
97
|
+
if (O !== void 0) {
|
|
98
|
+
if (e === O) throw Error(`The junction [${e}] cannot be placed within itself`);
|
|
99
|
+
if (this.registeredIds[O] === void 0) throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);
|
|
100
|
+
if (this.registeredIds[O] === "node") throw Error(`The junction [${e}]'s parent is not a group`);
|
|
101
101
|
}
|
|
102
102
|
this.registeredIds[e] = "node", this.nodes[e] = {
|
|
103
103
|
id: e,
|
|
104
104
|
type: "junction",
|
|
105
105
|
edges: [],
|
|
106
|
-
in:
|
|
106
|
+
in: O
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
getJunctions() {
|
|
@@ -115,91 +115,91 @@ var import_cytoscape_fcose = /* @__PURE__ */ __toESM(require_cytoscape_fcose(),
|
|
|
115
115
|
getNode(e) {
|
|
116
116
|
return this.nodes[e] ?? null;
|
|
117
117
|
}
|
|
118
|
-
addGroup({ id: e, icon:
|
|
118
|
+
addGroup({ id: e, icon: O, in: k, title: A }) {
|
|
119
119
|
if (this.registeredIds?.[e] !== void 0) throw Error(`The group id [${e}] is already in use by another ${this.registeredIds[e]}`);
|
|
120
|
-
if (
|
|
121
|
-
if (e ===
|
|
122
|
-
if (this.registeredIds?.[
|
|
123
|
-
if (this.registeredIds?.[
|
|
120
|
+
if (k !== void 0) {
|
|
121
|
+
if (e === k) throw Error(`The group [${e}] cannot be placed within itself`);
|
|
122
|
+
if (this.registeredIds?.[k] === void 0) throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);
|
|
123
|
+
if (this.registeredIds?.[k] === "node") throw Error(`The group [${e}]'s parent is not a group`);
|
|
124
124
|
}
|
|
125
125
|
this.registeredIds[e] = "group", this.groups[e] = {
|
|
126
126
|
id: e,
|
|
127
|
-
icon:
|
|
128
|
-
title:
|
|
129
|
-
in:
|
|
127
|
+
icon: O,
|
|
128
|
+
title: A,
|
|
129
|
+
in: k
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
132
|
getGroups() {
|
|
133
133
|
return Object.values(this.groups);
|
|
134
134
|
}
|
|
135
|
-
addEdge({ lhsId: e, rhsId:
|
|
136
|
-
if (!isArchitectureDirection(
|
|
137
|
-
if (!isArchitectureDirection(
|
|
135
|
+
addEdge({ lhsId: e, rhsId: O, lhsDir: k, rhsDir: A, lhsInto: j, rhsInto: M, lhsGroup: N, rhsGroup: P, title: F }) {
|
|
136
|
+
if (!isArchitectureDirection(k)) throw Error(`Invalid direction given for left hand side of edge ${e}--${O}. Expected (L,R,T,B) got ${String(k)}`);
|
|
137
|
+
if (!isArchitectureDirection(A)) throw Error(`Invalid direction given for right hand side of edge ${e}--${O}. Expected (L,R,T,B) got ${String(A)}`);
|
|
138
138
|
if (this.nodes[e] === void 0 && this.groups[e] === void 0) throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);
|
|
139
|
-
if (this.nodes[
|
|
140
|
-
let
|
|
141
|
-
if (
|
|
142
|
-
if (
|
|
143
|
-
let
|
|
139
|
+
if (this.nodes[O] === void 0 && this.groups[O] === void 0) throw Error(`The right-hand id [${O}] does not yet exist. Please create the service/group before declaring an edge to it.`);
|
|
140
|
+
let I = this.nodes[e].in, L = this.nodes[O].in;
|
|
141
|
+
if (N && I && L && I == L) throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);
|
|
142
|
+
if (P && I && L && I == L) throw Error(`The right-hand id [${O}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);
|
|
143
|
+
let R = {
|
|
144
144
|
lhsId: e,
|
|
145
|
-
lhsDir:
|
|
146
|
-
lhsInto:
|
|
147
|
-
lhsGroup:
|
|
148
|
-
rhsId:
|
|
149
|
-
rhsDir:
|
|
150
|
-
rhsInto:
|
|
151
|
-
rhsGroup:
|
|
152
|
-
title:
|
|
145
|
+
lhsDir: k,
|
|
146
|
+
lhsInto: j,
|
|
147
|
+
lhsGroup: N,
|
|
148
|
+
rhsId: O,
|
|
149
|
+
rhsDir: A,
|
|
150
|
+
rhsInto: M,
|
|
151
|
+
rhsGroup: P,
|
|
152
|
+
title: F
|
|
153
153
|
};
|
|
154
|
-
this.edges.push(
|
|
154
|
+
this.edges.push(R), this.nodes[e] && this.nodes[O] && (this.nodes[e].edges.push(this.edges[this.edges.length - 1]), this.nodes[O].edges.push(this.edges[this.edges.length - 1]));
|
|
155
155
|
}
|
|
156
156
|
getEdges() {
|
|
157
157
|
return this.edges;
|
|
158
158
|
}
|
|
159
159
|
getDataStructures() {
|
|
160
160
|
if (this.dataStructures === void 0) {
|
|
161
|
-
let e = {},
|
|
162
|
-
let
|
|
163
|
-
if (
|
|
164
|
-
let
|
|
165
|
-
|
|
161
|
+
let e = {}, k = Object.entries(this.nodes).reduce((O, [k, A]) => (O[k] = A.edges.reduce((O, A) => {
|
|
162
|
+
let j = this.getNode(A.lhsId)?.in, M = this.getNode(A.rhsId)?.in;
|
|
163
|
+
if (j && M && j !== M) {
|
|
164
|
+
let O = getArchitectureDirectionAlignment(A.lhsDir, A.rhsDir);
|
|
165
|
+
O !== "bend" && (e[j] ??= {}, e[j][M] = O, e[M] ??= {}, e[M][j] = O);
|
|
166
166
|
}
|
|
167
|
-
if (
|
|
168
|
-
let e = getArchitectureDirectionPair(
|
|
169
|
-
e && (
|
|
167
|
+
if (A.lhsId === k) {
|
|
168
|
+
let e = getArchitectureDirectionPair(A.lhsDir, A.rhsDir);
|
|
169
|
+
e && (O[e] = A.rhsId);
|
|
170
170
|
} else {
|
|
171
|
-
let e = getArchitectureDirectionPair(
|
|
172
|
-
e && (
|
|
171
|
+
let e = getArchitectureDirectionPair(A.rhsDir, A.lhsDir);
|
|
172
|
+
e && (O[e] = A.lhsId);
|
|
173
173
|
}
|
|
174
|
-
return
|
|
175
|
-
}, {}),
|
|
174
|
+
return O;
|
|
175
|
+
}, {}), O), {}), A = Object.keys(k)[0], j = { [A]: 1 }, M = Object.keys(k).reduce((e, O) => O === A ? e : {
|
|
176
176
|
...e,
|
|
177
|
-
[
|
|
178
|
-
}, {}),
|
|
179
|
-
let
|
|
180
|
-
for (;
|
|
181
|
-
let e =
|
|
177
|
+
[O]: 1
|
|
178
|
+
}, {}), N = /* @__PURE__ */ __name((e) => {
|
|
179
|
+
let O = { [e]: [0, 0] }, A = [e];
|
|
180
|
+
for (; A.length > 0;) {
|
|
181
|
+
let e = A.shift();
|
|
182
182
|
if (e) {
|
|
183
|
-
|
|
184
|
-
let
|
|
185
|
-
Object.entries(
|
|
186
|
-
|
|
183
|
+
j[e] = 1, delete M[e];
|
|
184
|
+
let N = k[e], [P, F] = O[e];
|
|
185
|
+
Object.entries(N).forEach(([e, k]) => {
|
|
186
|
+
j[k] || (O[k] = shiftPositionByArchitectureDirectionPair([P, F], e), A.push(k));
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
return
|
|
191
|
-
}, "BFS"),
|
|
192
|
-
for (; Object.keys(
|
|
190
|
+
return O;
|
|
191
|
+
}, "BFS"), P = [N(A)];
|
|
192
|
+
for (; Object.keys(M).length > 0;) P.push(N(Object.keys(M)[0]));
|
|
193
193
|
this.dataStructures = {
|
|
194
|
-
adjList:
|
|
195
|
-
spatialMaps:
|
|
194
|
+
adjList: k,
|
|
195
|
+
spatialMaps: P,
|
|
196
196
|
groupAlignments: e
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
199
|
return this.dataStructures;
|
|
200
200
|
}
|
|
201
|
-
setElementForId(e,
|
|
202
|
-
this.elements[e] =
|
|
201
|
+
setElementForId(e, O) {
|
|
202
|
+
this.elements[e] = O;
|
|
203
203
|
}
|
|
204
204
|
getElementById(e) {
|
|
205
205
|
return this.elements[e];
|
|
@@ -213,22 +213,22 @@ var import_cytoscape_fcose = /* @__PURE__ */ __toESM(require_cytoscape_fcose(),
|
|
|
213
213
|
getConfigField(e) {
|
|
214
214
|
return this.getConfig()[e];
|
|
215
215
|
}
|
|
216
|
-
}, populateDb = /* @__PURE__ */ __name((e,
|
|
217
|
-
populateCommonDb(e,
|
|
216
|
+
}, populateDb = /* @__PURE__ */ __name((e, O) => {
|
|
217
|
+
populateCommonDb(e, O), e.groups.map((e) => O.addGroup(e)), e.services.map((e) => O.addService({
|
|
218
218
|
...e,
|
|
219
219
|
type: "service"
|
|
220
|
-
})), e.junctions.map((e) =>
|
|
220
|
+
})), e.junctions.map((e) => O.addJunction({
|
|
221
221
|
...e,
|
|
222
222
|
type: "junction"
|
|
223
|
-
})), e.edges.map((e) =>
|
|
223
|
+
})), e.edges.map((e) => O.addEdge(e));
|
|
224
224
|
}, "populateDb"), parser = {
|
|
225
225
|
parser: { yy: void 0 },
|
|
226
226
|
parse: /* @__PURE__ */ __name(async (e) => {
|
|
227
|
-
let
|
|
228
|
-
log.debug(
|
|
229
|
-
let
|
|
230
|
-
if (!(
|
|
231
|
-
populateDb(
|
|
227
|
+
let O = await parse("architecture", e);
|
|
228
|
+
log.debug(O);
|
|
229
|
+
let A = parser.parser?.yy;
|
|
230
|
+
if (!(A instanceof ArchitectureDB)) throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
|
|
231
|
+
populateDb(O, A);
|
|
232
232
|
}, "parse")
|
|
233
233
|
}, architectureStyles_default = /* @__PURE__ */ __name((e) => `
|
|
234
234
|
.edge {
|
|
@@ -274,120 +274,120 @@ var import_cytoscape_fcose = /* @__PURE__ */ __toESM(require_cytoscape_fcose(),
|
|
|
274
274
|
unknown: unknownIcon,
|
|
275
275
|
blank: { body: wrapIcon("") }
|
|
276
276
|
}
|
|
277
|
-
}, drawEdges = /* @__PURE__ */ __name(async function(e,
|
|
278
|
-
let
|
|
279
|
-
await Promise.all(
|
|
280
|
-
let { source:
|
|
281
|
-
if (
|
|
282
|
-
let
|
|
283
|
-
if (
|
|
284
|
-
let e = isArchitectureDirectionX(
|
|
285
|
-
|
|
277
|
+
}, drawEdges = /* @__PURE__ */ __name(async function(e, O, k, A) {
|
|
278
|
+
let j = k.getConfigField("padding"), M = k.getConfigField("iconSize"), N = M / 2, P = M / 6, I = P / 2;
|
|
279
|
+
await Promise.all(O.edges().map(async (O) => {
|
|
280
|
+
let { source: M, sourceDir: L, sourceArrow: R, sourceGroup: z, target: B, targetDir: V, targetArrow: H, targetGroup: U, label: W } = edgeData(O), { x: q, y: J } = O[0].sourceEndpoint(), { x: Y, y: X } = O[0].midpoint(), { x: Z, y: Q } = O[0].targetEndpoint(), $ = j + 4;
|
|
281
|
+
if (z && (isArchitectureDirectionX(L) ? q += L === "L" ? -$ : $ : J += L === "T" ? -$ : $ + 18), U && (isArchitectureDirectionX(V) ? Z += V === "L" ? -$ : $ : Q += V === "T" ? -$ : $ + 18), !z && k.getNode(M)?.type === "junction" && (isArchitectureDirectionX(L) ? q += L === "L" ? N : -N : J += L === "T" ? N : -N), !U && k.getNode(B)?.type === "junction" && (isArchitectureDirectionX(V) ? Z += V === "L" ? N : -N : Q += V === "T" ? N : -N), O[0]._private.rscratch) {
|
|
282
|
+
let O = e.insert("g");
|
|
283
|
+
if (O.insert("path").attr("d", `M ${q},${J} L ${Y},${X} L${Z},${Q} `).attr("class", "edge").attr("id", `${A}-${getEdgeId(M, B, { prefix: "L" })}`), R) {
|
|
284
|
+
let e = isArchitectureDirectionX(L) ? ArchitectureDirectionArrowShift[L](q, P) : q - I, k = isArchitectureDirectionY(L) ? ArchitectureDirectionArrowShift[L](J, P) : J - I;
|
|
285
|
+
O.insert("polygon").attr("points", ArchitectureDirectionArrow[L](P)).attr("transform", `translate(${e},${k})`).attr("class", "arrow");
|
|
286
286
|
}
|
|
287
|
-
if (
|
|
288
|
-
let e = isArchitectureDirectionX(
|
|
289
|
-
|
|
287
|
+
if (H) {
|
|
288
|
+
let e = isArchitectureDirectionX(V) ? ArchitectureDirectionArrowShift[V](Z, P) : Z - I, k = isArchitectureDirectionY(V) ? ArchitectureDirectionArrowShift[V](Q, P) : Q - I;
|
|
289
|
+
O.insert("polygon").attr("points", ArchitectureDirectionArrow[V](P)).attr("transform", `translate(${e},${k})`).attr("class", "arrow");
|
|
290
290
|
}
|
|
291
|
-
if (
|
|
292
|
-
let e = isArchitectureDirectionXY(
|
|
293
|
-
|
|
294
|
-
let
|
|
295
|
-
if (await createText(
|
|
291
|
+
if (W) {
|
|
292
|
+
let e = isArchitectureDirectionXY(L, V) ? "XY" : isArchitectureDirectionX(L) ? "X" : "Y", k = 0;
|
|
293
|
+
k = e === "X" ? Math.abs(q - Z) : e === "Y" ? Math.abs(J - Q) / 1.5 : Math.abs(q - Z) / 2;
|
|
294
|
+
let A = O.append("g");
|
|
295
|
+
if (await createText(A, W, {
|
|
296
296
|
useHtmlLabels: !1,
|
|
297
|
-
width:
|
|
297
|
+
width: k,
|
|
298
298
|
classes: "architecture-service-label"
|
|
299
|
-
}, getConfig2()),
|
|
300
|
-
else if (e === "Y")
|
|
299
|
+
}, getConfig2()), A.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e === "X") A.attr("transform", "translate(" + Y + ", " + X + ")");
|
|
300
|
+
else if (e === "Y") A.attr("transform", "translate(" + Y + ", " + X + ") rotate(-90)");
|
|
301
301
|
else if (e === "XY") {
|
|
302
|
-
let e = getArchitectureDirectionPair(
|
|
302
|
+
let e = getArchitectureDirectionPair(L, V);
|
|
303
303
|
if (e && isArchitecturePairXY(e)) {
|
|
304
|
-
let
|
|
305
|
-
|
|
306
|
-
let
|
|
307
|
-
|
|
308
|
-
translate(${Y}, ${X -
|
|
309
|
-
translate(${
|
|
310
|
-
rotate(${-1 *
|
|
304
|
+
let O = A.node().getBoundingClientRect(), [k, j] = getArchitectureDirectionXYFactors(e);
|
|
305
|
+
A.attr("dominant-baseline", "auto").attr("transform", `rotate(${-1 * k * j * 45})`);
|
|
306
|
+
let M = A.node().getBoundingClientRect();
|
|
307
|
+
A.attr("transform", `
|
|
308
|
+
translate(${Y}, ${X - O.height / 2})
|
|
309
|
+
translate(${k * M.width / 2}, ${j * M.height / 2})
|
|
310
|
+
rotate(${-1 * k * j * 45}, 0, ${O.height / 2})
|
|
311
311
|
`);
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
}));
|
|
317
|
-
}, "drawEdges"), drawGroups = /* @__PURE__ */ __name(async function(e,
|
|
318
|
-
let
|
|
319
|
-
await Promise.all(
|
|
320
|
-
let
|
|
321
|
-
if (
|
|
322
|
-
let { h:
|
|
323
|
-
|
|
324
|
-
let
|
|
325
|
-
if (
|
|
326
|
-
let e =
|
|
327
|
-
e.html(`<g>${await getIconSVG(
|
|
328
|
-
height:
|
|
329
|
-
width:
|
|
317
|
+
}, "drawEdges"), drawGroups = /* @__PURE__ */ __name(async function(e, O, k, A) {
|
|
318
|
+
let j = k.getConfigField("padding") * .75, M = k.getConfigField("fontSize"), N = k.getConfigField("iconSize") / 2;
|
|
319
|
+
await Promise.all(O.nodes().map(async (O) => {
|
|
320
|
+
let P = nodeData(O);
|
|
321
|
+
if (P.type === "group") {
|
|
322
|
+
let { h: I, w: L, x1: R, y1: z } = O.boundingBox(), B = e.append("rect");
|
|
323
|
+
B.attr("id", `${A}-group-${P.id}`).attr("x", R + N).attr("y", z + N).attr("width", L).attr("height", I).attr("class", "node-bkg");
|
|
324
|
+
let V = e.append("g"), H = R, U = z;
|
|
325
|
+
if (P.icon) {
|
|
326
|
+
let e = V.append("g");
|
|
327
|
+
e.html(`<g>${await getIconSVG(P.icon, {
|
|
328
|
+
height: j,
|
|
329
|
+
width: j,
|
|
330
330
|
fallbackPrefix: architectureIcons.prefix
|
|
331
|
-
})}</g>`), e.attr("transform", "translate(" + (
|
|
331
|
+
})}</g>`), e.attr("transform", "translate(" + (H + N + 1) + ", " + (U + N + 1) + ")"), H += j, U += M / 2 - 1 - 2;
|
|
332
332
|
}
|
|
333
|
-
if (
|
|
334
|
-
let e =
|
|
335
|
-
await createText(e,
|
|
333
|
+
if (P.label) {
|
|
334
|
+
let e = V.append("g");
|
|
335
|
+
await createText(e, P.label, {
|
|
336
336
|
useHtmlLabels: !1,
|
|
337
|
-
width:
|
|
337
|
+
width: L,
|
|
338
338
|
classes: "architecture-service-label"
|
|
339
|
-
}, getConfig2()), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "start").attr("text-anchor", "start"), e.attr("transform", "translate(" + (
|
|
339
|
+
}, getConfig2()), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "start").attr("text-anchor", "start"), e.attr("transform", "translate(" + (H + N + 4) + ", " + (U + N + 2) + ")");
|
|
340
340
|
}
|
|
341
|
-
|
|
341
|
+
k.setElementForId(P.id, B);
|
|
342
342
|
}
|
|
343
343
|
}));
|
|
344
|
-
}, "drawGroups"), drawServices = /* @__PURE__ */ __name(async function(e,
|
|
345
|
-
let
|
|
346
|
-
for (let
|
|
347
|
-
let
|
|
348
|
-
if (
|
|
349
|
-
let e =
|
|
350
|
-
await createText(e,
|
|
344
|
+
}, "drawGroups"), drawServices = /* @__PURE__ */ __name(async function(e, O, k, A) {
|
|
345
|
+
let j = getConfig2();
|
|
346
|
+
for (let M of k) {
|
|
347
|
+
let k = O.append("g"), N = e.getConfigField("iconSize");
|
|
348
|
+
if (M.title) {
|
|
349
|
+
let e = k.append("g");
|
|
350
|
+
await createText(e, M.title, {
|
|
351
351
|
useHtmlLabels: !1,
|
|
352
|
-
width:
|
|
352
|
+
width: N * 1.5,
|
|
353
353
|
classes: "architecture-service-label"
|
|
354
|
-
},
|
|
354
|
+
}, j), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e.attr("transform", "translate(" + N / 2 + ", " + N + ")");
|
|
355
355
|
}
|
|
356
|
-
let
|
|
357
|
-
if (
|
|
358
|
-
height:
|
|
359
|
-
width:
|
|
356
|
+
let P = k.append("g");
|
|
357
|
+
if (M.icon) P.html(`<g>${await getIconSVG(M.icon, {
|
|
358
|
+
height: N,
|
|
359
|
+
width: N,
|
|
360
360
|
fallbackPrefix: architectureIcons.prefix
|
|
361
361
|
})}</g>`);
|
|
362
|
-
else if (
|
|
363
|
-
|
|
364
|
-
height:
|
|
365
|
-
width:
|
|
362
|
+
else if (M.iconText) {
|
|
363
|
+
P.html(`<g>${await getIconSVG("blank", {
|
|
364
|
+
height: N,
|
|
365
|
+
width: N,
|
|
366
366
|
fallbackPrefix: architectureIcons.prefix
|
|
367
367
|
})}</g>`);
|
|
368
|
-
let e =
|
|
369
|
-
e.attr("style", `-webkit-line-clamp: ${Math.floor((
|
|
370
|
-
} else
|
|
371
|
-
|
|
372
|
-
let { width:
|
|
373
|
-
|
|
368
|
+
let e = P.append("g").append("foreignObject").attr("width", N).attr("height", N).append("div").attr("class", "node-icon-text").attr("style", `height: ${N}px;`).append("div").html(sanitizeText(M.iconText, j)), O = parseInt(window.getComputedStyle(e.node(), null).getPropertyValue("font-size").replace(/\D/g, "")) ?? 16;
|
|
369
|
+
e.attr("style", `-webkit-line-clamp: ${Math.floor((N - 2) / O)};`);
|
|
370
|
+
} else P.append("path").attr("class", "node-bkg").attr("id", `${A}-node-${M.id}`).attr("d", `M0,${N} V5 Q0,0 5,0 H${N - 5} Q${N},0 ${N},5 V${N} Z`);
|
|
371
|
+
k.attr("id", `${A}-service-${M.id}`).attr("class", "architecture-service");
|
|
372
|
+
let { width: F, height: I } = k.node().getBBox();
|
|
373
|
+
M.width = F, M.height = I, e.setElementForId(M.id, k);
|
|
374
374
|
}
|
|
375
375
|
return 0;
|
|
376
|
-
}, "drawServices"), drawJunctions = /* @__PURE__ */ __name(function(e,
|
|
377
|
-
|
|
378
|
-
let
|
|
379
|
-
|
|
380
|
-
let { width:
|
|
381
|
-
|
|
376
|
+
}, "drawServices"), drawJunctions = /* @__PURE__ */ __name(function(e, O, k, A) {
|
|
377
|
+
k.forEach((k) => {
|
|
378
|
+
let j = O.append("g"), M = e.getConfigField("iconSize");
|
|
379
|
+
j.append("g").append("rect").attr("id", `${A}-node-${k.id}`).attr("fill-opacity", "0").attr("width", M).attr("height", M), j.attr("class", "architecture-junction");
|
|
380
|
+
let { width: N, height: P } = j._groups[0][0].getBBox();
|
|
381
|
+
j.width = N, j.height = P, e.setElementForId(k.id, j);
|
|
382
382
|
});
|
|
383
383
|
}, "drawJunctions");
|
|
384
384
|
registerIconPacks([{
|
|
385
385
|
name: architectureIcons.prefix,
|
|
386
386
|
icons: architectureIcons
|
|
387
387
|
}]), cytoscape.use(import_cytoscape_fcose.default);
|
|
388
|
-
function addServices(e,
|
|
388
|
+
function addServices(e, O, k) {
|
|
389
389
|
e.forEach((e) => {
|
|
390
|
-
|
|
390
|
+
O.add({
|
|
391
391
|
group: "nodes",
|
|
392
392
|
data: {
|
|
393
393
|
type: "service",
|
|
@@ -395,40 +395,40 @@ function addServices(e, A, j) {
|
|
|
395
395
|
icon: e.icon,
|
|
396
396
|
label: e.title,
|
|
397
397
|
parent: e.in,
|
|
398
|
-
width:
|
|
399
|
-
height:
|
|
398
|
+
width: k.getConfigField("iconSize"),
|
|
399
|
+
height: k.getConfigField("iconSize")
|
|
400
400
|
},
|
|
401
401
|
classes: "node-service"
|
|
402
402
|
});
|
|
403
403
|
});
|
|
404
404
|
}
|
|
405
405
|
__name(addServices, "addServices");
|
|
406
|
-
function addJunctions(e,
|
|
406
|
+
function addJunctions(e, O, k) {
|
|
407
407
|
e.forEach((e) => {
|
|
408
|
-
|
|
408
|
+
O.add({
|
|
409
409
|
group: "nodes",
|
|
410
410
|
data: {
|
|
411
411
|
type: "junction",
|
|
412
412
|
id: e.id,
|
|
413
413
|
parent: e.in,
|
|
414
|
-
width:
|
|
415
|
-
height:
|
|
414
|
+
width: k.getConfigField("iconSize"),
|
|
415
|
+
height: k.getConfigField("iconSize")
|
|
416
416
|
},
|
|
417
417
|
classes: "node-junction"
|
|
418
418
|
});
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
__name(addJunctions, "addJunctions");
|
|
422
|
-
function positionNodes(e,
|
|
423
|
-
|
|
424
|
-
let
|
|
425
|
-
|
|
422
|
+
function positionNodes(e, O) {
|
|
423
|
+
O.nodes().map((O) => {
|
|
424
|
+
let k = nodeData(O);
|
|
425
|
+
k.type !== "group" && (k.x = O.position().x, k.y = O.position().y, e.getElementById(k.id).attr("transform", "translate(" + (k.x || 0) + "," + (k.y || 0) + ")"));
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
428
|
__name(positionNodes, "positionNodes");
|
|
429
|
-
function addGroups(e,
|
|
429
|
+
function addGroups(e, O) {
|
|
430
430
|
e.forEach((e) => {
|
|
431
|
-
|
|
431
|
+
O.add({
|
|
432
432
|
group: "nodes",
|
|
433
433
|
data: {
|
|
434
434
|
type: "group",
|
|
@@ -442,103 +442,103 @@ function addGroups(e, A) {
|
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
444
|
__name(addGroups, "addGroups");
|
|
445
|
-
function addEdges(e,
|
|
445
|
+
function addEdges(e, O) {
|
|
446
446
|
e.forEach((e) => {
|
|
447
|
-
let { lhsId:
|
|
448
|
-
id: `${
|
|
449
|
-
label:
|
|
450
|
-
source:
|
|
451
|
-
sourceDir:
|
|
452
|
-
sourceArrow:
|
|
453
|
-
sourceGroup:
|
|
454
|
-
sourceEndpoint:
|
|
455
|
-
target:
|
|
456
|
-
targetDir:
|
|
457
|
-
targetArrow:
|
|
458
|
-
targetGroup:
|
|
459
|
-
targetEndpoint:
|
|
447
|
+
let { lhsId: k, rhsId: A, lhsInto: j, lhsGroup: M, rhsInto: N, lhsDir: P, rhsDir: F, rhsGroup: I, title: L } = e, R = isArchitectureDirectionXY(e.lhsDir, e.rhsDir) ? "segments" : "straight", z = {
|
|
448
|
+
id: `${k}-${A}`,
|
|
449
|
+
label: L,
|
|
450
|
+
source: k,
|
|
451
|
+
sourceDir: P,
|
|
452
|
+
sourceArrow: j,
|
|
453
|
+
sourceGroup: M,
|
|
454
|
+
sourceEndpoint: P === "L" ? "0 50%" : P === "R" ? "100% 50%" : P === "T" ? "50% 0" : "50% 100%",
|
|
455
|
+
target: A,
|
|
456
|
+
targetDir: F,
|
|
457
|
+
targetArrow: N,
|
|
458
|
+
targetGroup: I,
|
|
459
|
+
targetEndpoint: F === "L" ? "0 50%" : F === "R" ? "100% 50%" : F === "T" ? "50% 0" : "50% 100%"
|
|
460
460
|
};
|
|
461
|
-
|
|
461
|
+
O.add({
|
|
462
462
|
group: "edges",
|
|
463
|
-
data:
|
|
464
|
-
classes:
|
|
463
|
+
data: z,
|
|
464
|
+
classes: R
|
|
465
465
|
});
|
|
466
466
|
});
|
|
467
467
|
}
|
|
468
468
|
__name(addEdges, "addEdges");
|
|
469
|
-
function getAlignments(e,
|
|
470
|
-
let
|
|
471
|
-
let
|
|
472
|
-
if (
|
|
473
|
-
for (let
|
|
474
|
-
let [
|
|
475
|
-
if (
|
|
476
|
-
...e[
|
|
477
|
-
...
|
|
478
|
-
...
|
|
469
|
+
function getAlignments(e, k, A) {
|
|
470
|
+
let j = /* @__PURE__ */ __name((e, O) => Object.entries(e).reduce((e, [k, j]) => {
|
|
471
|
+
let M = 0, N = Object.entries(j);
|
|
472
|
+
if (N.length === 1) return e[k] = N[0][1], e;
|
|
473
|
+
for (let j = 0; j < N.length - 1; j++) for (let P = j + 1; P < N.length; P++) {
|
|
474
|
+
let [F, I] = N[j], [L, R] = N[P];
|
|
475
|
+
if (A[F]?.[L] === O) e[k] ??= [], e[k] = [
|
|
476
|
+
...e[k],
|
|
477
|
+
...I,
|
|
478
|
+
...R
|
|
479
479
|
];
|
|
480
|
-
else if (
|
|
481
|
-
...e[
|
|
482
|
-
...
|
|
483
|
-
...
|
|
480
|
+
else if (F === "default" || L === "default") e[k] ??= [], e[k] = [
|
|
481
|
+
...e[k],
|
|
482
|
+
...I,
|
|
483
|
+
...R
|
|
484
484
|
];
|
|
485
485
|
else {
|
|
486
|
-
let
|
|
486
|
+
let O = `${k}-${M++}`;
|
|
487
|
+
e[O] = I;
|
|
488
|
+
let A = `${k}-${M++}`;
|
|
487
489
|
e[A] = R;
|
|
488
|
-
let M = `${j}-${P++}`;
|
|
489
|
-
e[M] = B;
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
return e;
|
|
493
|
-
}, {}), "flattenAlignments"), [
|
|
494
|
-
let
|
|
495
|
-
return Object.entries(
|
|
496
|
-
let
|
|
497
|
-
|
|
493
|
+
}, {}), "flattenAlignments"), [M, N] = k.map((O) => {
|
|
494
|
+
let k = {}, A = {};
|
|
495
|
+
return Object.entries(O).forEach(([O, [j, M]]) => {
|
|
496
|
+
let N = e.getNode(O)?.in ?? "default";
|
|
497
|
+
k[M] ??= {}, k[M][N] ??= [], k[M][N].push(O), A[j] ??= {}, A[j][N] ??= [], A[j][N].push(O);
|
|
498
498
|
}), {
|
|
499
|
-
horiz: Object.values(
|
|
500
|
-
vert: Object.values(
|
|
499
|
+
horiz: Object.values(j(k, "horizontal")).filter((e) => e.length > 1),
|
|
500
|
+
vert: Object.values(j(A, "vertical")).filter((e) => e.length > 1)
|
|
501
501
|
};
|
|
502
|
-
}).reduce(([e,
|
|
502
|
+
}).reduce(([e, O], { horiz: k, vert: A }) => [[...e, ...k], [...O, ...A]], [[], []]);
|
|
503
503
|
return {
|
|
504
|
-
horizontal:
|
|
505
|
-
vertical:
|
|
504
|
+
horizontal: M,
|
|
505
|
+
vertical: N
|
|
506
506
|
};
|
|
507
507
|
}
|
|
508
508
|
__name(getAlignments, "getAlignments");
|
|
509
|
-
function getRelativeConstraints(e,
|
|
510
|
-
let
|
|
509
|
+
function getRelativeConstraints(e, k) {
|
|
510
|
+
let A = [], j = /* @__PURE__ */ __name((e) => `${e[0]},${e[1]}`, "posToStr"), M = /* @__PURE__ */ __name((e) => e.split(",").map((e) => parseInt(e)), "strToPos");
|
|
511
511
|
return e.forEach((e) => {
|
|
512
|
-
let
|
|
512
|
+
let O = Object.fromEntries(Object.entries(e).map(([e, O]) => [j(O), e])), N = [j([0, 0])], P = {}, F = {
|
|
513
513
|
L: [-1, 0],
|
|
514
514
|
R: [1, 0],
|
|
515
515
|
T: [0, 1],
|
|
516
516
|
B: [0, -1]
|
|
517
517
|
};
|
|
518
|
-
for (;
|
|
519
|
-
let e =
|
|
518
|
+
for (; N.length > 0;) {
|
|
519
|
+
let e = N.shift();
|
|
520
520
|
if (e) {
|
|
521
|
-
|
|
522
|
-
let
|
|
523
|
-
if (
|
|
524
|
-
let
|
|
525
|
-
Object.entries(
|
|
526
|
-
let
|
|
527
|
-
|
|
528
|
-
[ArchitectureDirectionName[e]]:
|
|
529
|
-
[ArchitectureDirectionName[getOppositeArchitectureDirection(e)]]:
|
|
530
|
-
gap: 1.5 *
|
|
521
|
+
P[e] = 1;
|
|
522
|
+
let I = O[e];
|
|
523
|
+
if (I) {
|
|
524
|
+
let L = M(e);
|
|
525
|
+
Object.entries(F).forEach(([e, M]) => {
|
|
526
|
+
let F = j([L[0] + M[0], L[1] + M[1]]), R = O[F];
|
|
527
|
+
R && !P[F] && (N.push(F), A.push({
|
|
528
|
+
[ArchitectureDirectionName[e]]: R,
|
|
529
|
+
[ArchitectureDirectionName[getOppositeArchitectureDirection(e)]]: I,
|
|
530
|
+
gap: 1.5 * k.getConfigField("iconSize")
|
|
531
531
|
}));
|
|
532
532
|
});
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
}),
|
|
536
|
+
}), A;
|
|
537
537
|
}
|
|
538
538
|
__name(getRelativeConstraints, "getRelativeConstraints");
|
|
539
|
-
function layoutArchitecture(e,
|
|
540
|
-
return new Promise((
|
|
541
|
-
let
|
|
539
|
+
function layoutArchitecture(e, A, j, M, N, { spatialMaps: P, groupAlignments: F }) {
|
|
540
|
+
return new Promise((I) => {
|
|
541
|
+
let L = select_default("body").append("div").attr("id", "cy").attr("style", "display:none"), R = cytoscape({
|
|
542
542
|
container: document.getElementById("cy"),
|
|
543
543
|
style: [
|
|
544
544
|
{
|
|
@@ -573,7 +573,7 @@ function layoutArchitecture(e, M, N, P, F, { spatialMaps: I, groupAlignments: L
|
|
|
573
573
|
style: {
|
|
574
574
|
"text-valign": "bottom",
|
|
575
575
|
"text-halign": "center",
|
|
576
|
-
"font-size": `${
|
|
576
|
+
"font-size": `${N.getConfigField("fontSize")}px`
|
|
577
577
|
}
|
|
578
578
|
},
|
|
579
579
|
{
|
|
@@ -593,7 +593,7 @@ function layoutArchitecture(e, M, N, P, F, { spatialMaps: I, groupAlignments: L
|
|
|
593
593
|
},
|
|
594
594
|
{
|
|
595
595
|
selector: ".node-group",
|
|
596
|
-
style: { padding: `${
|
|
596
|
+
style: { padding: `${N.getConfigField("padding")}px` }
|
|
597
597
|
}
|
|
598
598
|
],
|
|
599
599
|
layout: {
|
|
@@ -606,65 +606,67 @@ function layoutArchitecture(e, M, N, P, F, { spatialMaps: I, groupAlignments: L
|
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
608
|
});
|
|
609
|
-
|
|
610
|
-
let
|
|
609
|
+
L.remove(), addGroups(j, R), addServices(e, R, N), addJunctions(A, R, N), addEdges(M, R);
|
|
610
|
+
let z = getAlignments(N, P, F), B = getRelativeConstraints(P, N), V = N.getConfigField("iconSize"), U = N.getConfigField("idealEdgeLengthMultiplier") * V, W = .5 * V, G = N.getConfigField("edgeElasticity"), K = R.layout({
|
|
611
611
|
name: "fcose",
|
|
612
612
|
quality: "proof",
|
|
613
|
-
randomize:
|
|
613
|
+
randomize: N.getConfigField("randomize"),
|
|
614
|
+
nodeSeparation: N.getConfigField("nodeSeparation"),
|
|
615
|
+
numIter: N.getConfigField("numIter"),
|
|
614
616
|
styleEnabled: !1,
|
|
615
617
|
animate: !1,
|
|
616
618
|
nodeDimensionsIncludeLabels: !1,
|
|
617
619
|
idealEdgeLength(e) {
|
|
618
|
-
let [
|
|
619
|
-
return
|
|
620
|
+
let [O, k] = e.connectedNodes(), { parent: A } = nodeData(O), { parent: j } = nodeData(k);
|
|
621
|
+
return A === j ? U : W;
|
|
620
622
|
},
|
|
621
623
|
edgeElasticity(e) {
|
|
622
|
-
let [
|
|
623
|
-
return
|
|
624
|
+
let [O, k] = e.connectedNodes(), { parent: A } = nodeData(O), { parent: j } = nodeData(k);
|
|
625
|
+
return A === j ? G : .001;
|
|
624
626
|
},
|
|
625
|
-
alignmentConstraint:
|
|
626
|
-
relativePlacementConstraint:
|
|
627
|
+
alignmentConstraint: z,
|
|
628
|
+
relativePlacementConstraint: B
|
|
627
629
|
});
|
|
628
|
-
|
|
629
|
-
function e(e,
|
|
630
|
-
let
|
|
631
|
-
|
|
632
|
-
let
|
|
633
|
-
|
|
634
|
-
let
|
|
630
|
+
K.one("layoutstop", () => {
|
|
631
|
+
function e(e, O, k, A) {
|
|
632
|
+
let j, M, { x: N, y: P } = e, { x: F, y: I } = O;
|
|
633
|
+
M = (A - P + (N - k) * (P - I) / (N - F)) / Math.sqrt(1 + ((P - I) / (N - F)) ** 2), j = Math.sqrt((A - P) ** 2 + (k - N) ** 2 - M ** 2);
|
|
634
|
+
let L = Math.sqrt((F - N) ** 2 + (I - P) ** 2);
|
|
635
|
+
j /= L;
|
|
636
|
+
let R = (F - N) * (A - P) - (I - P) * (k - N);
|
|
635
637
|
switch (!0) {
|
|
636
|
-
case
|
|
637
|
-
|
|
638
|
+
case R >= 0:
|
|
639
|
+
R = 1;
|
|
638
640
|
break;
|
|
639
|
-
case
|
|
640
|
-
|
|
641
|
+
case R < 0:
|
|
642
|
+
R = -1;
|
|
641
643
|
break;
|
|
642
644
|
}
|
|
643
|
-
let
|
|
645
|
+
let z = (F - N) * (k - N) + (I - P) * (A - P);
|
|
644
646
|
switch (!0) {
|
|
645
|
-
case
|
|
646
|
-
|
|
647
|
+
case z >= 0:
|
|
648
|
+
z = 1;
|
|
647
649
|
break;
|
|
648
|
-
case
|
|
649
|
-
|
|
650
|
+
case z < 0:
|
|
651
|
+
z = -1;
|
|
650
652
|
break;
|
|
651
653
|
}
|
|
652
|
-
return
|
|
653
|
-
distances:
|
|
654
|
-
weights:
|
|
654
|
+
return M = Math.abs(M) * R, j *= z, {
|
|
655
|
+
distances: M,
|
|
656
|
+
weights: j
|
|
655
657
|
};
|
|
656
658
|
}
|
|
657
|
-
__name(e, "getSegmentWeights"),
|
|
658
|
-
for (let
|
|
659
|
-
let { x:
|
|
660
|
-
if (
|
|
661
|
-
let
|
|
662
|
-
|
|
659
|
+
__name(e, "getSegmentWeights"), R.startBatch();
|
|
660
|
+
for (let O of Object.values(R.edges())) if (O.data?.()) {
|
|
661
|
+
let { x: k, y: A } = O.source().position(), { x: j, y: M } = O.target().position();
|
|
662
|
+
if (k !== j && A !== M) {
|
|
663
|
+
let k = O.sourceEndpoint(), A = O.targetEndpoint(), { sourceDir: j } = edgeData(O), [M, N] = isArchitectureDirectionY(j) ? [k.x, A.y] : [A.x, k.y], { weights: P, distances: F } = e(k, A, M, N);
|
|
664
|
+
O.style("segment-distances", F), O.style("segment-weights", P);
|
|
663
665
|
}
|
|
664
666
|
}
|
|
665
|
-
|
|
666
|
-
}),
|
|
667
|
-
log.info("Ready", e), R
|
|
667
|
+
R.endBatch(), K.run();
|
|
668
|
+
}), K.run(), R.ready((e) => {
|
|
669
|
+
log.info("Ready", e), I(R);
|
|
668
670
|
});
|
|
669
671
|
});
|
|
670
672
|
}
|
|
@@ -674,17 +676,17 @@ var diagram = {
|
|
|
674
676
|
get db() {
|
|
675
677
|
return new ArchitectureDB();
|
|
676
678
|
},
|
|
677
|
-
renderer: { draw: /* @__PURE__ */ __name(async (e,
|
|
678
|
-
let
|
|
679
|
-
|
|
680
|
-
let
|
|
681
|
-
|
|
682
|
-
let
|
|
683
|
-
|
|
684
|
-
let
|
|
685
|
-
|
|
686
|
-
let
|
|
687
|
-
await drawEdges(
|
|
679
|
+
renderer: { draw: /* @__PURE__ */ __name(async (e, O, k, A) => {
|
|
680
|
+
let j = A.db;
|
|
681
|
+
j.setDiagramId(O);
|
|
682
|
+
let M = j.getServices(), N = j.getJunctions(), P = j.getGroups(), F = j.getEdges(), I = j.getDataStructures(), L = selectSvgElement(O), R = L.append("g");
|
|
683
|
+
R.attr("class", "architecture-edges");
|
|
684
|
+
let z = L.append("g");
|
|
685
|
+
z.attr("class", "architecture-services");
|
|
686
|
+
let B = L.append("g");
|
|
687
|
+
B.attr("class", "architecture-groups"), await drawServices(j, z, M, O), drawJunctions(j, z, N, O);
|
|
688
|
+
let H = await layoutArchitecture(M, N, P, F, j, I);
|
|
689
|
+
await drawEdges(R, H, j, O), await drawGroups(B, H, j, O), positionNodes(j, H), setupGraphViewbox(void 0, L, j.getConfigField("padding"), j.getConfigField("useMaxWidth"));
|
|
688
690
|
}, "draw") },
|
|
689
691
|
styles: architectureStyles_default
|
|
690
692
|
};
|