@loopstack/loopstack-studio 0.27.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/ai-elements/code-block.js +2 -2
- package/dist/components/dynamic-form/Form.js +49 -52
- package/dist/components/loopstack-elements/tool.js +18 -9
- 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/DocumentRenderer.js +2 -2
- package/dist/features/documents/components/DocumentList.js +19 -18
- package/dist/features/documents/renderers/LlmMessage.js +89 -0
- 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 +301 -209
- 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/features/documents/renderers/ClaudeMessage.js +0 -96
- 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,296 +0,0 @@
|
|
|
1
|
-
import { __export } from "../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { isCompositeCstNode } from "../syntax-tree.js";
|
|
3
|
-
import { getContainerOfType, streamAllContents } from "./ast-utils.js";
|
|
4
|
-
import { isAbstractElement, isAbstractParserRule, isAction, isArrayType, isAssignment, isCharacterRange, isCrossReference, isGroup, isInferredType, isInfixRule, isInterface, isKeyword, isNegatedToken, isParserRule, isReferenceType, isRegexToken, isReturnType, isRuleCall, isSimpleType, isTerminalAlternatives, isTerminalGroup, isTerminalRule, isTerminalRuleCall, isType, isUnionType, isUntilToken, isWildcard } from "../languages/generated/ast.js";
|
|
5
|
-
import { streamCst } from "./cst-utils.js";
|
|
6
|
-
import { assertUnreachable } from "./errors.js";
|
|
7
|
-
import { escapeRegExp, isWhitespace } from "./regexp-utils.js";
|
|
8
|
-
var grammar_utils_exports = /* @__PURE__ */ __export({
|
|
9
|
-
findAssignment: () => findAssignment,
|
|
10
|
-
findNameAssignment: () => findNameAssignment,
|
|
11
|
-
findNodeForKeyword: () => findNodeForKeyword,
|
|
12
|
-
findNodeForProperty: () => findNodeForProperty,
|
|
13
|
-
findNodesForKeyword: () => findNodesForKeyword,
|
|
14
|
-
findNodesForKeywordInternal: () => findNodesForKeywordInternal,
|
|
15
|
-
findNodesForProperty: () => findNodesForProperty,
|
|
16
|
-
getActionAtElement: () => getActionAtElement,
|
|
17
|
-
getActionType: () => getActionType,
|
|
18
|
-
getAllReachableRules: () => getAllReachableRules,
|
|
19
|
-
getAllRulesUsedForCrossReferences: () => getAllRulesUsedForCrossReferences,
|
|
20
|
-
getCrossReferenceTerminal: () => getCrossReferenceTerminal,
|
|
21
|
-
getEntryRule: () => getEntryRule,
|
|
22
|
-
getExplicitRuleType: () => getExplicitRuleType,
|
|
23
|
-
getHiddenRules: () => getHiddenRules,
|
|
24
|
-
getRuleType: () => getRuleType,
|
|
25
|
-
getRuleTypeName: () => getRuleTypeName,
|
|
26
|
-
getTypeName: () => getTypeName,
|
|
27
|
-
isArrayCardinality: () => isArrayCardinality,
|
|
28
|
-
isArrayOperator: () => isArrayOperator,
|
|
29
|
-
isCommentTerminal: () => isCommentTerminal,
|
|
30
|
-
isDataType: () => isDataType,
|
|
31
|
-
isDataTypeRule: () => isDataTypeRule,
|
|
32
|
-
isOptionalCardinality: () => isOptionalCardinality,
|
|
33
|
-
terminalRegex: () => terminalRegex
|
|
34
|
-
}, 1);
|
|
35
|
-
function getEntryRule(b) {
|
|
36
|
-
return b.rules.find((b) => isParserRule(b) && b.entry);
|
|
37
|
-
}
|
|
38
|
-
function getHiddenRules(b) {
|
|
39
|
-
return b.rules.filter((b) => isTerminalRule(b) && b.hidden);
|
|
40
|
-
}
|
|
41
|
-
function getAllReachableRules(b, Y) {
|
|
42
|
-
let X = /* @__PURE__ */ new Set(), Z = getEntryRule(b);
|
|
43
|
-
if (!Z) return new Set(b.rules);
|
|
44
|
-
let Q = [Z].concat(getHiddenRules(b));
|
|
45
|
-
for (let b of Q) ruleDfs(b, X, Y);
|
|
46
|
-
let $ = /* @__PURE__ */ new Set();
|
|
47
|
-
for (let Y of b.rules) (X.has(Y.name) || isTerminalRule(Y) && Y.hidden) && $.add(Y);
|
|
48
|
-
return $;
|
|
49
|
-
}
|
|
50
|
-
function ruleDfs(b, Y, X) {
|
|
51
|
-
Y.add(b.name), streamAllContents(b).forEach((b) => {
|
|
52
|
-
if (isRuleCall(b) || X && isTerminalRuleCall(b)) {
|
|
53
|
-
let Z = b.rule.ref;
|
|
54
|
-
Z && !Y.has(Z.name) && ruleDfs(Z, Y, X);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
function getAllRulesUsedForCrossReferences(b) {
|
|
59
|
-
let Y = /* @__PURE__ */ new Set();
|
|
60
|
-
return streamAllContents(b).forEach((b) => {
|
|
61
|
-
isCrossReference(b) && (isParserRule(b.type.ref) && Y.add(b.type.ref), isInferredType(b.type.ref) && isParserRule(b.type.ref.$container) && Y.add(b.type.ref.$container));
|
|
62
|
-
}), Y;
|
|
63
|
-
}
|
|
64
|
-
function getCrossReferenceTerminal(b) {
|
|
65
|
-
if (b.terminal) return b.terminal;
|
|
66
|
-
if (b.type.ref) return findNameAssignment(b.type.ref)?.terminal;
|
|
67
|
-
}
|
|
68
|
-
function isCommentTerminal(b) {
|
|
69
|
-
return b.hidden && !isWhitespace(terminalRegex(b));
|
|
70
|
-
}
|
|
71
|
-
function findNodesForProperty(b, Y) {
|
|
72
|
-
return !b || !Y ? [] : findNodesForPropertyInternal(b, Y, b.astNode, !0);
|
|
73
|
-
}
|
|
74
|
-
function findNodeForProperty(b, Y, X) {
|
|
75
|
-
if (!b || !Y) return;
|
|
76
|
-
let Z = findNodesForPropertyInternal(b, Y, b.astNode, !0);
|
|
77
|
-
if (Z.length !== 0) return X = X === void 0 ? 0 : Math.max(0, Math.min(X, Z.length - 1)), Z[X];
|
|
78
|
-
}
|
|
79
|
-
function findNodesForPropertyInternal(b, Z, Q, $) {
|
|
80
|
-
if (!$) {
|
|
81
|
-
let Y = getContainerOfType(b.grammarSource, isAssignment);
|
|
82
|
-
if (Y && Y.feature === Z) return [b];
|
|
83
|
-
}
|
|
84
|
-
return isCompositeCstNode(b) && b.astNode === Q ? b.content.flatMap((b) => findNodesForPropertyInternal(b, Z, Q, !1)) : [];
|
|
85
|
-
}
|
|
86
|
-
function findNodesForKeyword(b, Y) {
|
|
87
|
-
return b ? findNodesForKeywordInternal(b, Y, b?.astNode) : [];
|
|
88
|
-
}
|
|
89
|
-
function findNodeForKeyword(b, Y, X) {
|
|
90
|
-
if (!b) return;
|
|
91
|
-
let Z = findNodesForKeywordInternal(b, Y, b?.astNode);
|
|
92
|
-
if (Z.length !== 0) return X = X === void 0 ? 0 : Math.max(0, Math.min(X, Z.length - 1)), Z[X];
|
|
93
|
-
}
|
|
94
|
-
function findNodesForKeywordInternal(b, Y, X) {
|
|
95
|
-
if (b.astNode !== X) return [];
|
|
96
|
-
if (isKeyword(b.grammarSource) && b.grammarSource.value === Y) return [b];
|
|
97
|
-
let Z = streamCst(b).iterator(), Q, $ = [];
|
|
98
|
-
do
|
|
99
|
-
if (Q = Z.next(), !Q.done) {
|
|
100
|
-
let b = Q.value;
|
|
101
|
-
b.astNode === X ? isKeyword(b.grammarSource) && b.grammarSource.value === Y && $.push(b) : Z.prune();
|
|
102
|
-
}
|
|
103
|
-
while (!Q.done);
|
|
104
|
-
return $;
|
|
105
|
-
}
|
|
106
|
-
function findAssignment(b) {
|
|
107
|
-
let Y = b.astNode;
|
|
108
|
-
for (; Y === b.container?.astNode;) {
|
|
109
|
-
let Y = getContainerOfType(b.grammarSource, isAssignment);
|
|
110
|
-
if (Y) return Y;
|
|
111
|
-
b = b.container;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
function findNameAssignment(b) {
|
|
115
|
-
let Y = b;
|
|
116
|
-
return isInferredType(Y) && (isAction(Y.$container) ? Y = Y.$container.$container : isAbstractParserRule(Y.$container) ? Y = Y.$container : assertUnreachable(Y.$container)), findNameAssignmentInternal(b, Y, /* @__PURE__ */ new Map());
|
|
117
|
-
}
|
|
118
|
-
function findNameAssignmentInternal(b, Y, Q) {
|
|
119
|
-
function $(Y, Z) {
|
|
120
|
-
let $;
|
|
121
|
-
return getContainerOfType(Y, isAssignment) || ($ = findNameAssignmentInternal(Z, Z, Q)), Q.set(b, $), $;
|
|
122
|
-
}
|
|
123
|
-
if (Q.has(b)) return Q.get(b);
|
|
124
|
-
Q.set(b, void 0);
|
|
125
|
-
for (let X of streamAllContents(Y)) if (isAssignment(X) && X.feature.toLowerCase() === "name") return Q.set(b, X), X;
|
|
126
|
-
else if (isRuleCall(X) && isParserRule(X.rule.ref)) return $(X, X.rule.ref);
|
|
127
|
-
else if (isSimpleType(X) && X.typeRef?.ref) return $(X, X.typeRef.ref);
|
|
128
|
-
}
|
|
129
|
-
function getActionAtElement(b) {
|
|
130
|
-
let Y = b.$container;
|
|
131
|
-
if (isGroup(Y)) {
|
|
132
|
-
let X = Y.elements, Q = X.indexOf(b);
|
|
133
|
-
for (let b = Q - 1; b >= 0; b--) {
|
|
134
|
-
let Y = X[b];
|
|
135
|
-
if (isAction(Y)) return Y;
|
|
136
|
-
{
|
|
137
|
-
let Y = streamAllContents(X[b]).find(isAction);
|
|
138
|
-
if (Y) return Y;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
if (isAbstractElement(Y)) return getActionAtElement(Y);
|
|
143
|
-
}
|
|
144
|
-
function isOptionalCardinality(b, Y) {
|
|
145
|
-
return b === "?" || b === "*" || isGroup(Y) && !!Y.guardCondition;
|
|
146
|
-
}
|
|
147
|
-
function isArrayCardinality(b) {
|
|
148
|
-
return b === "*" || b === "+";
|
|
149
|
-
}
|
|
150
|
-
function isArrayOperator(b) {
|
|
151
|
-
return b === "+=";
|
|
152
|
-
}
|
|
153
|
-
function isDataTypeRule(b) {
|
|
154
|
-
return isDataTypeRuleInternal(b, /* @__PURE__ */ new Set());
|
|
155
|
-
}
|
|
156
|
-
function isDataTypeRuleInternal(b, Y) {
|
|
157
|
-
if (Y.has(b)) return !0;
|
|
158
|
-
Y.add(b);
|
|
159
|
-
for (let X of streamAllContents(b)) if (isRuleCall(X)) {
|
|
160
|
-
if (!X.rule.ref || isParserRule(X.rule.ref) && !isDataTypeRuleInternal(X.rule.ref, Y) || isInfixRule(X.rule.ref)) return !1;
|
|
161
|
-
} else if (isAssignment(X)) return !1;
|
|
162
|
-
else if (isAction(X)) return !1;
|
|
163
|
-
return !!b.definition;
|
|
164
|
-
}
|
|
165
|
-
function isDataType(b) {
|
|
166
|
-
return isDataTypeInternal(b.type, /* @__PURE__ */ new Set());
|
|
167
|
-
}
|
|
168
|
-
function isDataTypeInternal(b, Y) {
|
|
169
|
-
if (Y.has(b)) return !0;
|
|
170
|
-
if (Y.add(b), isArrayType(b) || isReferenceType(b)) return !1;
|
|
171
|
-
if (isUnionType(b)) return b.types.every((b) => isDataTypeInternal(b, Y));
|
|
172
|
-
if (isSimpleType(b)) {
|
|
173
|
-
if (b.primitiveType !== void 0 || b.stringType !== void 0) return !0;
|
|
174
|
-
if (b.typeRef !== void 0) {
|
|
175
|
-
let X = b.typeRef.ref;
|
|
176
|
-
return isType(X) ? isDataTypeInternal(X.type, Y) : !1;
|
|
177
|
-
} else return !1;
|
|
178
|
-
} else return !1;
|
|
179
|
-
}
|
|
180
|
-
function getExplicitRuleType(b) {
|
|
181
|
-
if (!isTerminalRule(b)) {
|
|
182
|
-
if (b.inferredType) return b.inferredType.name;
|
|
183
|
-
if (b.dataType) return b.dataType;
|
|
184
|
-
if (b.returnType) {
|
|
185
|
-
let Y = b.returnType.ref;
|
|
186
|
-
if (Y) return Y.name;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
function getTypeName(b) {
|
|
191
|
-
if (isAbstractParserRule(b)) return isParserRule(b) && isDataTypeRule(b) ? b.name : getExplicitRuleType(b) ?? b.name;
|
|
192
|
-
if (isInterface(b) || isType(b) || isReturnType(b)) return b.name;
|
|
193
|
-
if (isAction(b)) {
|
|
194
|
-
let Y = getActionType(b);
|
|
195
|
-
if (Y) return Y;
|
|
196
|
-
} else if (isInferredType(b)) return b.name;
|
|
197
|
-
throw Error("Cannot get name of Unknown Type");
|
|
198
|
-
}
|
|
199
|
-
function getActionType(b) {
|
|
200
|
-
if (b.inferredType) return b.inferredType.name;
|
|
201
|
-
if (b.type?.ref) return getTypeName(b.type.ref);
|
|
202
|
-
}
|
|
203
|
-
function getRuleTypeName(b) {
|
|
204
|
-
return isTerminalRule(b) ? b.type?.name ?? "string" : isParserRule(b) && isDataTypeRule(b) ? b.name : getExplicitRuleType(b) ?? b.name;
|
|
205
|
-
}
|
|
206
|
-
function getRuleType(b) {
|
|
207
|
-
return isTerminalRule(b) ? b.type?.name ?? "string" : getExplicitRuleType(b) ?? b.name;
|
|
208
|
-
}
|
|
209
|
-
function terminalRegex(b) {
|
|
210
|
-
let Y = {
|
|
211
|
-
s: !1,
|
|
212
|
-
i: !1,
|
|
213
|
-
u: !1
|
|
214
|
-
}, X = abstractElementToRegex(b.definition, Y), Z = Object.entries(Y).filter(([, b]) => b).map(([b]) => b).join("");
|
|
215
|
-
return new RegExp(X, Z);
|
|
216
|
-
}
|
|
217
|
-
var WILDCARD = "[\\s\\S]";
|
|
218
|
-
function abstractElementToRegex(b, Y) {
|
|
219
|
-
if (isTerminalAlternatives(b)) return terminalAlternativesToRegex(b);
|
|
220
|
-
if (isTerminalGroup(b)) return terminalGroupToRegex(b);
|
|
221
|
-
if (isCharacterRange(b)) return characterRangeToRegex(b);
|
|
222
|
-
if (isTerminalRuleCall(b)) {
|
|
223
|
-
let Y = b.rule.ref;
|
|
224
|
-
if (!Y) throw Error("Missing rule reference.");
|
|
225
|
-
return withCardinality(abstractElementToRegex(Y.definition), {
|
|
226
|
-
cardinality: b.cardinality,
|
|
227
|
-
lookahead: b.lookahead,
|
|
228
|
-
parenthesized: b.parenthesized
|
|
229
|
-
});
|
|
230
|
-
} else if (isNegatedToken(b)) return negateTokenToRegex(b);
|
|
231
|
-
else if (isUntilToken(b)) return untilTokenToRegex(b);
|
|
232
|
-
else if (isRegexToken(b)) {
|
|
233
|
-
let X = b.regex.lastIndexOf("/"), Z = b.regex.substring(1, X), Q = b.regex.substring(X + 1);
|
|
234
|
-
return Y && (Y.i = Q.includes("i"), Y.s = Q.includes("s"), Y.u = Q.includes("u")), withCardinality(Z, {
|
|
235
|
-
cardinality: b.cardinality,
|
|
236
|
-
lookahead: b.lookahead,
|
|
237
|
-
parenthesized: b.parenthesized,
|
|
238
|
-
wrap: !1
|
|
239
|
-
});
|
|
240
|
-
} else if (isWildcard(b)) return withCardinality(WILDCARD, {
|
|
241
|
-
cardinality: b.cardinality,
|
|
242
|
-
lookahead: b.lookahead,
|
|
243
|
-
parenthesized: b.parenthesized
|
|
244
|
-
});
|
|
245
|
-
else throw Error(`Invalid terminal element: ${b?.$type}, ${b?.$cstNode?.text}`);
|
|
246
|
-
}
|
|
247
|
-
function terminalAlternativesToRegex(b) {
|
|
248
|
-
return withCardinality(b.elements.map((b) => abstractElementToRegex(b)).join("|"), {
|
|
249
|
-
cardinality: b.cardinality,
|
|
250
|
-
lookahead: b.lookahead,
|
|
251
|
-
parenthesized: b.parenthesized,
|
|
252
|
-
wrap: !1
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
function terminalGroupToRegex(b) {
|
|
256
|
-
return withCardinality(b.elements.map((b) => abstractElementToRegex(b)).join(""), {
|
|
257
|
-
cardinality: b.cardinality,
|
|
258
|
-
lookahead: b.lookahead,
|
|
259
|
-
parenthesized: b.parenthesized,
|
|
260
|
-
wrap: !1
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
function untilTokenToRegex(b) {
|
|
264
|
-
return withCardinality(`${WILDCARD}*?${abstractElementToRegex(b.terminal)}`, {
|
|
265
|
-
cardinality: b.cardinality,
|
|
266
|
-
lookahead: b.lookahead,
|
|
267
|
-
parenthesized: b.parenthesized
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
function negateTokenToRegex(b) {
|
|
271
|
-
return withCardinality(`(?!${abstractElementToRegex(b.terminal)})${WILDCARD}*?`, {
|
|
272
|
-
cardinality: b.cardinality,
|
|
273
|
-
lookahead: b.lookahead,
|
|
274
|
-
parenthesized: b.parenthesized
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
function characterRangeToRegex(b) {
|
|
278
|
-
return b.right ? withCardinality(`[${keywordToRegex(b.left)}-${keywordToRegex(b.right)}]`, {
|
|
279
|
-
cardinality: b.cardinality,
|
|
280
|
-
lookahead: b.lookahead,
|
|
281
|
-
parenthesized: b.parenthesized,
|
|
282
|
-
wrap: !1
|
|
283
|
-
}) : withCardinality(keywordToRegex(b.left), {
|
|
284
|
-
cardinality: b.cardinality,
|
|
285
|
-
lookahead: b.lookahead,
|
|
286
|
-
parenthesized: b.parenthesized,
|
|
287
|
-
wrap: !1
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
function keywordToRegex(b) {
|
|
291
|
-
return escapeRegExp(b.value);
|
|
292
|
-
}
|
|
293
|
-
function withCardinality(b, Y) {
|
|
294
|
-
return (Y.parenthesized || Y.lookahead || Y.wrap !== !1) && (b = `(${Y.lookahead ?? (Y.parenthesized ? "" : "?:")}${b})`), Y.cardinality ? `${b}${Y.cardinality}` : b;
|
|
295
|
-
}
|
|
296
|
-
export { findAssignment, findNameAssignment, findNodeForKeyword, findNodeForProperty, findNodesForProperty, getAllReachableRules, getCrossReferenceTerminal, getRuleType, getTypeName, grammar_utils_exports, isCommentTerminal, isDataTypeRule, terminalRegex };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { __export, __reExport } from "../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { DONE_RESULT, EMPTY_STREAM, Reduction, StreamImpl, TreeStreamImpl, stream } from "./stream.js";
|
|
3
|
-
import { ast_utils_exports } from "./ast-utils.js";
|
|
4
|
-
import { cst_utils_exports } from "./cst-utils.js";
|
|
5
|
-
import { ErrorWithLocation, assertCondition, assertUnreachable } from "./errors.js";
|
|
6
|
-
import { regexp_utils_exports } from "./regexp-utils.js";
|
|
7
|
-
import { grammar_utils_exports } from "./grammar-utils.js";
|
|
8
|
-
import { cancellation_exports } from "./cancellation.js";
|
|
9
|
-
import { Deferred, OperationCancelled, delayNextTick, interruptAndCheck, isOperationCancelled, setInterruptionPeriod, startCancelableOperation } from "./promise-utils.js";
|
|
10
|
-
import { URI } from "../../../vscode-uri/lib/esm/index.js";
|
|
11
|
-
import { UriTrie, UriUtils } from "./uri-utils.js";
|
|
12
|
-
import { BiMap, MultiMap } from "./collections.js";
|
|
13
|
-
import { ContextCache, DisposableCache, DocumentCache, SimpleCache, WorkspaceCache } from "./caching.js";
|
|
14
|
-
import { event_exports } from "./event.js";
|
|
15
|
-
import { Disposable } from "./disposable.js";
|
|
16
|
-
import { loadGrammarFromJson } from "./grammar-loader.js";
|
|
17
|
-
var utils_exports = /* @__PURE__ */ __export({
|
|
18
|
-
AstUtils: () => ast_utils_exports,
|
|
19
|
-
BiMap: () => BiMap,
|
|
20
|
-
Cancellation: () => cancellation_exports,
|
|
21
|
-
ContextCache: () => ContextCache,
|
|
22
|
-
CstUtils: () => cst_utils_exports,
|
|
23
|
-
DONE_RESULT: () => DONE_RESULT,
|
|
24
|
-
Deferred: () => Deferred,
|
|
25
|
-
Disposable: () => Disposable,
|
|
26
|
-
DisposableCache: () => DisposableCache,
|
|
27
|
-
DocumentCache: () => DocumentCache,
|
|
28
|
-
EMPTY_STREAM: () => EMPTY_STREAM,
|
|
29
|
-
ErrorWithLocation: () => ErrorWithLocation,
|
|
30
|
-
GrammarUtils: () => grammar_utils_exports,
|
|
31
|
-
MultiMap: () => MultiMap,
|
|
32
|
-
OperationCancelled: () => OperationCancelled,
|
|
33
|
-
Reduction: () => Reduction,
|
|
34
|
-
RegExpUtils: () => regexp_utils_exports,
|
|
35
|
-
SimpleCache: () => SimpleCache,
|
|
36
|
-
StreamImpl: () => StreamImpl,
|
|
37
|
-
TreeStreamImpl: () => TreeStreamImpl,
|
|
38
|
-
URI: () => URI,
|
|
39
|
-
UriTrie: () => UriTrie,
|
|
40
|
-
UriUtils: () => UriUtils,
|
|
41
|
-
WorkspaceCache: () => WorkspaceCache,
|
|
42
|
-
assertCondition: () => assertCondition,
|
|
43
|
-
assertUnreachable: () => assertUnreachable,
|
|
44
|
-
delayNextTick: () => delayNextTick,
|
|
45
|
-
interruptAndCheck: () => interruptAndCheck,
|
|
46
|
-
isOperationCancelled: () => isOperationCancelled,
|
|
47
|
-
loadGrammarFromJson: () => loadGrammarFromJson,
|
|
48
|
-
setInterruptionPeriod: () => setInterruptionPeriod,
|
|
49
|
-
startCancelableOperation: () => startCancelableOperation,
|
|
50
|
-
stream: () => stream
|
|
51
|
-
}, 1);
|
|
52
|
-
__reExport(utils_exports, event_exports, void 0, 1);
|
|
53
|
-
export { utils_exports };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { cancellation_exports } from "./cancellation.js";
|
|
2
|
-
function delayNextTick() {
|
|
3
|
-
return new Promise((e) => {
|
|
4
|
-
typeof setImmediate > "u" ? setTimeout(e, 0) : setImmediate(e);
|
|
5
|
-
});
|
|
6
|
-
}
|
|
7
|
-
var lastTick = 0, globalInterruptionPeriod = 10;
|
|
8
|
-
function startCancelableOperation() {
|
|
9
|
-
return lastTick = performance.now(), new cancellation_exports.CancellationTokenSource();
|
|
10
|
-
}
|
|
11
|
-
function setInterruptionPeriod(e) {
|
|
12
|
-
globalInterruptionPeriod = e;
|
|
13
|
-
}
|
|
14
|
-
const OperationCancelled = Symbol("OperationCancelled");
|
|
15
|
-
function isOperationCancelled(e) {
|
|
16
|
-
return e === OperationCancelled;
|
|
17
|
-
}
|
|
18
|
-
async function interruptAndCheck(c) {
|
|
19
|
-
if (c === cancellation_exports.CancellationToken.None) return;
|
|
20
|
-
let l = performance.now();
|
|
21
|
-
if (l - lastTick >= globalInterruptionPeriod && (lastTick = l, await delayNextTick(), lastTick = performance.now()), c.isCancellationRequested) throw OperationCancelled;
|
|
22
|
-
}
|
|
23
|
-
var Deferred = class {
|
|
24
|
-
constructor() {
|
|
25
|
-
this.promise = new Promise((e, s) => {
|
|
26
|
-
this.resolve = (s) => (e(s), this), this.reject = (e) => (s(e), this);
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
export { Deferred, OperationCancelled, delayNextTick, interruptAndCheck, isOperationCancelled, setInterruptionPeriod, startCancelableOperation };
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { __export } from "../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { RegExpParser } from "../../../@chevrotain/regexp-to-ast/lib/src/regexp-parser.js";
|
|
3
|
-
import { BaseRegExpVisitor } from "../../../@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js";
|
|
4
|
-
import "../../../@chevrotain/regexp-to-ast/lib/src/api.js";
|
|
5
|
-
var regexp_utils_exports = /* @__PURE__ */ __export({
|
|
6
|
-
NEWLINE_REGEXP: () => NEWLINE_REGEXP,
|
|
7
|
-
escapeRegExp: () => escapeRegExp,
|
|
8
|
-
getTerminalParts: () => getTerminalParts,
|
|
9
|
-
isMultilineComment: () => isMultilineComment,
|
|
10
|
-
isWhitespace: () => isWhitespace,
|
|
11
|
-
partialMatches: () => partialMatches,
|
|
12
|
-
partialRegExp: () => partialRegExp,
|
|
13
|
-
whitespaceCharacters: () => whitespaceCharacters
|
|
14
|
-
}, 1);
|
|
15
|
-
const NEWLINE_REGEXP = /\r?\n/gm;
|
|
16
|
-
var regexpParser = new RegExpParser(), visitor = new class extends BaseRegExpVisitor {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments), this.isStarting = !0, this.endRegexpStack = [], this.multiline = !1;
|
|
19
|
-
}
|
|
20
|
-
get endRegex() {
|
|
21
|
-
return this.endRegexpStack.join("");
|
|
22
|
-
}
|
|
23
|
-
reset(e) {
|
|
24
|
-
this.multiline = !1, this.regex = e, this.startRegexp = "", this.isStarting = !0, this.endRegexpStack = [];
|
|
25
|
-
}
|
|
26
|
-
visitGroup(e) {
|
|
27
|
-
e.quantifier && (this.isStarting = !1, this.endRegexpStack = []);
|
|
28
|
-
}
|
|
29
|
-
visitCharacter(e) {
|
|
30
|
-
let s = String.fromCharCode(e.value);
|
|
31
|
-
if (!this.multiline && s === "\n" && (this.multiline = !0), e.quantifier) this.isStarting = !1, this.endRegexpStack = [];
|
|
32
|
-
else {
|
|
33
|
-
let e = escapeRegExp(s);
|
|
34
|
-
this.endRegexpStack.push(e), this.isStarting && (this.startRegexp += e);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
visitSet(e) {
|
|
38
|
-
if (!this.multiline) {
|
|
39
|
-
let s = this.regex.substring(e.loc.begin, e.loc.end), c = new RegExp(s);
|
|
40
|
-
this.multiline = !!"\n".match(c);
|
|
41
|
-
}
|
|
42
|
-
if (e.quantifier) this.isStarting = !1, this.endRegexpStack = [];
|
|
43
|
-
else {
|
|
44
|
-
let s = this.regex.substring(e.loc.begin, e.loc.end);
|
|
45
|
-
this.endRegexpStack.push(s), this.isStarting && (this.startRegexp += s);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
visitChildren(e) {
|
|
49
|
-
e.type === "Group" && e.quantifier || super.visitChildren(e);
|
|
50
|
-
}
|
|
51
|
-
}();
|
|
52
|
-
function getTerminalParts(e) {
|
|
53
|
-
try {
|
|
54
|
-
typeof e != "string" && (e = e.source), e = `/${e}/`;
|
|
55
|
-
let s = regexpParser.pattern(e), c = [];
|
|
56
|
-
for (let l of s.value.value) visitor.reset(e), visitor.visit(l), c.push({
|
|
57
|
-
start: visitor.startRegexp,
|
|
58
|
-
end: visitor.endRegex
|
|
59
|
-
});
|
|
60
|
-
return c;
|
|
61
|
-
} catch {
|
|
62
|
-
return [];
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function isMultilineComment(e) {
|
|
66
|
-
try {
|
|
67
|
-
return typeof e == "string" && (e = new RegExp(e)), e = e.toString(), visitor.reset(e), visitor.visit(regexpParser.pattern(e)), visitor.multiline;
|
|
68
|
-
} catch {
|
|
69
|
-
return !1;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
const whitespaceCharacters = "\f\n\r \v \xA0 \u2028\u2029 ".split("");
|
|
73
|
-
function isWhitespace(e) {
|
|
74
|
-
let s = typeof e == "string" ? new RegExp(e) : e;
|
|
75
|
-
return whitespaceCharacters.some((e) => s.test(e));
|
|
76
|
-
}
|
|
77
|
-
function escapeRegExp(e) {
|
|
78
|
-
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
79
|
-
}
|
|
80
|
-
function partialMatches(e, s) {
|
|
81
|
-
let c = partialRegExp(e), l = s.match(c);
|
|
82
|
-
return !!l && l[0].length > 0;
|
|
83
|
-
}
|
|
84
|
-
function partialRegExp(e) {
|
|
85
|
-
typeof e == "string" && (e = new RegExp(e));
|
|
86
|
-
let s = e, c = e.source, l = 0;
|
|
87
|
-
function u() {
|
|
88
|
-
let e = "", d;
|
|
89
|
-
function f(s) {
|
|
90
|
-
e += c.substr(l, s), l += s;
|
|
91
|
-
}
|
|
92
|
-
function p(s) {
|
|
93
|
-
e += "(?:" + c.substr(l, s) + "|$)", l += s;
|
|
94
|
-
}
|
|
95
|
-
for (; l < c.length;) switch (c[l]) {
|
|
96
|
-
case "\\":
|
|
97
|
-
switch (c[l + 1]) {
|
|
98
|
-
case "c":
|
|
99
|
-
p(3);
|
|
100
|
-
break;
|
|
101
|
-
case "x":
|
|
102
|
-
p(4);
|
|
103
|
-
break;
|
|
104
|
-
case "u":
|
|
105
|
-
s.unicode ? c[l + 2] === "{" ? p(c.indexOf("}", l) - l + 1) : p(6) : p(2);
|
|
106
|
-
break;
|
|
107
|
-
case "p":
|
|
108
|
-
case "P":
|
|
109
|
-
s.unicode ? p(c.indexOf("}", l) - l + 1) : p(2);
|
|
110
|
-
break;
|
|
111
|
-
case "k":
|
|
112
|
-
p(c.indexOf(">", l) - l + 1);
|
|
113
|
-
break;
|
|
114
|
-
default:
|
|
115
|
-
p(2);
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
break;
|
|
119
|
-
case "[":
|
|
120
|
-
d = /\[(?:\\.|.)*?\]/g, d.lastIndex = l, d = d.exec(c) || [], p(d[0].length);
|
|
121
|
-
break;
|
|
122
|
-
case "|":
|
|
123
|
-
case "^":
|
|
124
|
-
case "$":
|
|
125
|
-
case "*":
|
|
126
|
-
case "+":
|
|
127
|
-
case "?":
|
|
128
|
-
f(1);
|
|
129
|
-
break;
|
|
130
|
-
case "{":
|
|
131
|
-
d = /\{\d+,?\d*\}/g, d.lastIndex = l, d = d.exec(c), d ? f(d[0].length) : p(1);
|
|
132
|
-
break;
|
|
133
|
-
case "(":
|
|
134
|
-
if (c[l + 1] === "?") switch (c[l + 2]) {
|
|
135
|
-
case ":":
|
|
136
|
-
e += "(?:", l += 3, e += u() + "|$)";
|
|
137
|
-
break;
|
|
138
|
-
case "=":
|
|
139
|
-
e += "(?=", l += 3, e += u() + ")";
|
|
140
|
-
break;
|
|
141
|
-
case "!":
|
|
142
|
-
d = l, l += 3, u(), e += c.substr(d, l - d);
|
|
143
|
-
break;
|
|
144
|
-
case "<":
|
|
145
|
-
switch (c[l + 3]) {
|
|
146
|
-
case "=":
|
|
147
|
-
case "!":
|
|
148
|
-
d = l, l += 4, u(), e += c.substr(d, l - d);
|
|
149
|
-
break;
|
|
150
|
-
default:
|
|
151
|
-
f(c.indexOf(">", l) - l + 1), e += u() + "|$)";
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
break;
|
|
155
|
-
}
|
|
156
|
-
else f(1), e += u() + "|$)";
|
|
157
|
-
break;
|
|
158
|
-
case ")": return ++l, e;
|
|
159
|
-
default:
|
|
160
|
-
p(1);
|
|
161
|
-
break;
|
|
162
|
-
}
|
|
163
|
-
return e;
|
|
164
|
-
}
|
|
165
|
-
return new RegExp(u(), e.flags);
|
|
166
|
-
}
|
|
167
|
-
export { NEWLINE_REGEXP, escapeRegExp, isMultilineComment, isWhitespace, partialMatches, regexp_utils_exports };
|