@loopstack/loopstack-studio 0.25.1 → 0.25.2
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 +20 -0
- package/dist/api/auth.js +2 -4
- package/dist/api/client.js +7 -9
- package/dist/api/config.js +2 -4
- package/dist/api/dashboard.js +2 -4
- package/dist/api/documents.js +2 -4
- package/dist/api/index.js +19 -21
- package/dist/api/processor.js +2 -4
- package/dist/api/secrets.js +2 -4
- package/dist/api/workflows.js +2 -4
- package/dist/api/workspaces.js +2 -4
- package/dist/app/EnvironmentEmbedRoot.js +31 -24
- package/dist/components/ai-elements/code-block.js +71 -53
- package/dist/components/ai-elements/message.js +82 -41
- package/dist/components/ai-elements/prompt-input.js +253 -162
- package/dist/components/ai-elements/reasoning.js +116 -78
- package/dist/components/ai-elements/shimmer.js +35 -23
- package/dist/components/ai-elements/sources.js +58 -29
- package/dist/components/data-table/ConfirmDialog.js +30 -14
- package/dist/components/data-table/DataList.js +198 -138
- package/dist/components/data-table/DataTable.js +234 -168
- package/dist/components/data-table/DataTableBatchAction.js +27 -18
- package/dist/components/data-table/DataTableFilters.js +78 -53
- package/dist/components/data-table/DataTablePagination.js +104 -72
- package/dist/components/data-table/DataTableToolbar.js +65 -53
- package/dist/components/dynamic-form/ArrayController.js +103 -85
- package/dist/components/dynamic-form/CodeContent.js +36 -28
- package/dist/components/dynamic-form/Form.js +56 -43
- package/dist/components/dynamic-form/FormBody.js +10 -12
- package/dist/components/dynamic-form/FormElement.js +41 -31
- package/dist/components/dynamic-form/FormElementHeader.js +20 -12
- package/dist/components/dynamic-form/InputController.js +38 -36
- package/dist/components/dynamic-form/MarkdownContent.js +74 -53
- package/dist/components/dynamic-form/MermaidDiagram.js +24 -22
- package/dist/components/dynamic-form/ObjectController.js +32 -24
- package/dist/components/dynamic-form/fields/BaseFieldWrapper.js +47 -35
- package/dist/components/dynamic-form/fields/CheckboxField.js +48 -39
- package/dist/components/dynamic-form/fields/CodeViewField.js +50 -42
- package/dist/components/dynamic-form/fields/InputField.js +90 -62
- package/dist/components/dynamic-form/fields/MarkdownViewField.js +19 -16
- package/dist/components/dynamic-form/fields/RadioField.js +62 -46
- package/dist/components/dynamic-form/fields/SelectField.js +58 -40
- package/dist/components/dynamic-form/fields/SliderField.js +100 -94
- package/dist/components/dynamic-form/fields/SwitchField.js +61 -42
- package/dist/components/dynamic-form/fields/TextareaField.js +72 -53
- package/dist/components/dynamic-form/fields/utils/text-validation-utils.js +2 -4
- package/dist/components/dynamic-form/hooks/useArrayDefaultValue.js +5 -6
- package/dist/components/dynamic-form/hooks/useFieldConfig.js +20 -19
- package/dist/components/dynamic-form/hooks/useMergeParentKey.js +2 -4
- package/dist/components/dynamic-form/hooks/useSortPropertyNames.js +2 -4
- package/dist/components/feedback/ErrorAlert.js +17 -11
- package/dist/components/feedback/ErrorBoundary.js +14 -16
- package/dist/components/feedback/ErrorSnackbar.js +30 -13
- package/dist/components/feedback/LoadingCentered.js +28 -15
- package/dist/components/feedback/Snackbar.js +44 -43
- package/dist/components/feedback/index.js +5 -5
- package/dist/components/index.js +47 -47
- package/dist/components/layout/MainLayout.js +25 -17
- package/dist/components/layout/StudioSidebar.js +202 -132
- package/dist/components/lists/CustomListView.js +74 -49
- package/dist/components/lists/ListView.js +102 -66
- package/dist/components/loopstack-elements/link.js +104 -65
- package/dist/components/loopstack-elements/tool.js +142 -70
- package/dist/components/messages/CompletionMessagePaper.js +85 -53
- package/dist/components/page/PageBreadcrumbs.js +83 -64
- package/dist/components/ui/DiscordLogo.js +22 -16
- package/dist/components/ui/GoogleLogo.js +44 -40
- package/dist/components/ui/accordion.js +52 -31
- package/dist/components/ui/alert-dialog.js +109 -59
- package/dist/components/ui/alert.js +36 -22
- package/dist/components/ui/avatar.js +35 -21
- package/dist/components/ui/badge.js +17 -13
- package/dist/components/ui/breadcrumb.js +82 -46
- package/dist/components/ui/button-group.js +5 -5
- package/dist/components/ui/button.js +21 -17
- package/dist/components/ui/card.js +74 -40
- package/dist/components/ui/checkbox.js +23 -17
- package/dist/components/ui/collapsible.js +25 -17
- package/dist/components/ui/command.js +2 -1
- package/dist/components/ui/context-menu.js +52 -32
- package/dist/components/ui/dialog.js +107 -62
- package/dist/components/ui/drawer.js +99 -54
- package/dist/components/ui/dropdown-menu.js +159 -91
- package/dist/components/ui/hover-card.js +2 -1
- package/dist/components/ui/input-group.js +56 -36
- package/dist/components/ui/input.js +15 -11
- package/dist/components/ui/label.js +15 -11
- package/dist/components/ui/popover.js +38 -25
- package/dist/components/ui/radio-group.js +33 -22
- package/dist/components/ui/scroll-area.js +43 -28
- package/dist/components/ui/select.js +134 -73
- package/dist/components/ui/separator.js +17 -13
- package/dist/components/ui/sheet.js +105 -60
- package/dist/components/ui/sidebar.js +451 -269
- package/dist/components/ui/skeleton.js +14 -10
- package/dist/components/ui/slider.js +15 -17
- package/dist/components/ui/switch.js +21 -15
- package/dist/components/ui/table.js +85 -46
- package/dist/components/ui/tabs.js +45 -26
- package/dist/components/ui/textarea.js +14 -10
- package/dist/components/ui/tooltip.js +41 -26
- package/dist/components/ui-widgets/UiActions.js +37 -30
- package/dist/components/ui-widgets/UiWidget.js +46 -34
- package/dist/components/ui-widgets/widgets/AiPromptInput.js +42 -28
- package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +21 -16
- package/dist/components/ui-widgets/widgets/SandboxRun.js +26 -19
- package/dist/components/ui-widgets/widgets/SubmitButton.js +20 -15
- package/dist/events/api-client-events.js +2 -4
- package/dist/events/sse-client-events.js +2 -4
- package/dist/features/code-explorer/CodeExplorer.js +2 -1
- package/dist/features/code-explorer/components/CodeExplorerTree.js +2 -2
- package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +29 -31
- package/dist/features/code-explorer/components/FileContentViewer.js +148 -108
- package/dist/features/code-explorer/components/FileTabsBar.js +2 -1
- package/dist/features/code-explorer/components/FileTabsBarBase.js +169 -134
- package/dist/features/code-explorer/index.js +1 -1
- package/dist/features/code-explorer/providers/CodeExplorerProvider.js +4 -4
- package/dist/features/code-explorer/utils/fileIcons.js +39 -41
- package/dist/features/dashboard/Dashboard.js +121 -79
- package/dist/features/dashboard/RunItem.js +68 -50
- package/dist/features/dashboard/RunList.js +28 -17
- package/dist/features/debug/components/ConfigFlowViewer.js +67 -49
- package/dist/features/debug/components/WorkflowDebugHeader.js +46 -30
- package/dist/features/debug/components/WorkflowDebugLegend.js +68 -56
- package/dist/features/debug/components/WorkflowFlowViewer.js +96 -76
- package/dist/features/debug/components/workflow-flow/StateNode.js +102 -73
- package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +40 -35
- package/dist/features/debug/components/workflow-flow/WorkflowTransitionEdge.js +94 -61
- package/dist/features/debug/index.js +3 -3
- package/dist/features/debug/lib/edge-paths.js +31 -33
- package/dist/features/debug/lib/flow-utils.js +145 -147
- package/dist/features/documents/DocumentRenderer.js +77 -73
- package/dist/features/documents/components/DocumentItem.js +24 -21
- package/dist/features/documents/components/DocumentList.js +45 -39
- package/dist/features/documents/components/DocumentMetadataPills.js +59 -44
- package/dist/features/documents/document-details/DocumentDetails.js +413 -298
- package/dist/features/documents/document-details/PromptDetails.js +142 -105
- package/dist/features/documents/index.js +4 -4
- package/dist/features/documents/renderers/AiMessage.js +48 -39
- package/dist/features/documents/renderers/AiMessageContent.js +164 -108
- package/dist/features/documents/renderers/ChoicesRenderer.js +89 -77
- package/dist/features/documents/renderers/ClaudeMessage.js +91 -74
- package/dist/features/documents/renderers/ConfirmPromptRenderer.js +53 -44
- package/dist/features/documents/renderers/DocumentDebugRenderer.js +30 -26
- package/dist/features/documents/renderers/DocumentFormRenderer.js +85 -69
- package/dist/features/documents/renderers/DocumentMessageRenderer.js +9 -10
- package/dist/features/documents/renderers/ErrorMessageRenderer.js +13 -11
- package/dist/features/documents/renderers/LinkMessageRenderer.js +14 -15
- package/dist/features/documents/renderers/MarkdownMessageRenderer.js +10 -8
- package/dist/features/documents/renderers/PlainMessageRenderer.js +9 -7
- package/dist/features/documents/renderers/SecretInputRenderer.js +35 -37
- package/dist/features/documents/renderers/TextPromptRenderer.js +54 -45
- package/dist/features/documents/renderers/useDocumentTransition.js +7 -9
- package/dist/features/health/LocalHealthCheck.js +53 -54
- package/dist/features/health/index.js +1 -1
- package/dist/features/oauth/OAuthCallbackPage.js +2 -2
- package/dist/features/oauth/OAuthPromptRenderer.js +197 -148
- package/dist/features/oauth/index.js +2 -2
- package/dist/features/oauth/useOAuthPopup.js +71 -52
- package/dist/features/runs/Runs.js +187 -145
- package/dist/features/workbench/Workbench.js +98 -72
- package/dist/features/workbench/WorkflowItem.js +68 -49
- package/dist/features/workbench/WorkflowList.js +66 -51
- package/dist/features/workbench/components/NewRunDialog.js +309 -212
- package/dist/features/workbench/components/RemoteFileTabsBar.js +17 -18
- package/dist/features/workbench/components/RemoteFileTree.js +85 -54
- package/dist/features/workbench/components/WorkbenchFilesPanel.js +63 -52
- package/dist/features/workbench/components/WorkbenchFloatingPanel.js +51 -34
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +44 -35
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +68 -50
- package/dist/features/workbench/components/WorkbenchPreviewPanel.js +49 -51
- package/dist/features/workbench/components/WorkbenchSecretsPanel.js +172 -143
- package/dist/features/workbench/components/WorkbenchSettingsModal.js +60 -49
- package/dist/features/workbench/components/WorkflowForms.js +23 -17
- package/dist/features/workbench/components/WorkflowHistoryItem.js +122 -96
- package/dist/features/workbench/components/WorkflowHistoryList.js +54 -31
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +99 -70
- package/dist/features/workbench/hooks/useAutoScrollBottom.js +25 -21
- package/dist/features/workbench/hooks/useScrollToListItem.js +21 -20
- package/dist/features/workbench/hooks/useWorkflowData.js +44 -31
- package/dist/features/workbench/hooks/useWorkflowListState.js +12 -13
- package/dist/features/workbench/index.js +7 -7
- package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +138 -123
- package/dist/features/workbench/providers/ScrollProvider.js +19 -15
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +75 -76
- package/dist/features/workspaces/Workspaces.js +226 -161
- package/dist/features/workspaces/components/CreateWorkspace.js +194 -137
- package/dist/features/workspaces/components/EnvironmentSlotSelector.js +25 -27
- package/dist/features/workspaces/components/ExecutionTimeline.js +185 -143
- package/dist/features/workspaces/components/NewWorkflowRunDialog.js +26 -18
- package/dist/features/workspaces/components/WorkflowRunForm.js +133 -85
- package/dist/features/workspaces/components/WorkspaceHomePage.js +80 -59
- package/dist/features/workspaces/components/workflow-form/ArgumentsView.js +69 -52
- package/dist/features/workspaces/components/workflow-form/HeaderSection.js +41 -27
- package/dist/features/workspaces/components/workflow-form/SelectionView.js +103 -64
- package/dist/features/workspaces/index.js +3 -3
- package/dist/hooks/index.js +6 -6
- package/dist/hooks/query-keys.js +31 -33
- package/dist/hooks/use-mobile.js +11 -12
- package/dist/hooks/useApi.js +14 -16
- package/dist/hooks/useAuth.js +53 -38
- package/dist/hooks/useConfig.js +37 -26
- package/dist/hooks/useDashboard.js +15 -12
- package/dist/hooks/useDebounce.js +11 -12
- package/dist/hooks/useDocuments.js +35 -23
- package/dist/hooks/useFiles.js +2 -1
- package/dist/hooks/useProcessor.js +17 -14
- package/dist/hooks/useSecrets.js +64 -45
- package/dist/hooks/useWorkflows.js +161 -109
- package/dist/hooks/useWorkspaces.js +123 -83
- package/dist/index.d.ts +1304 -0
- package/dist/index.js +80 -80
- package/dist/lib/requireParam.js +2 -4
- package/dist/lib/utils.js +5 -7
- package/dist/node_modules/@braintree/sanitize-url/dist/constants.js +4 -6
- package/dist/node_modules/@braintree/sanitize-url/dist/index.js +6 -8
- package/dist/node_modules/@chevrotain/gast/lib/src/helpers.js +17 -19
- package/dist/node_modules/@chevrotain/gast/lib/src/model.js +71 -73
- package/dist/node_modules/@chevrotain/gast/lib/src/visitor.js +13 -16
- package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js +2 -2
- package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js +2 -4
- package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js +34 -36
- package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js +110 -138
- package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js +11 -13
- package/dist/node_modules/@chevrotain/utils/lib/src/print.js +3 -5
- package/dist/node_modules/@chevrotain/utils/lib/src/timer.js +2 -4
- package/dist/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js +2 -4
- package/dist/node_modules/@dagrejs/dagre/dist/dagre.esm.js +1913 -1812
- package/dist/node_modules/@iconify/utils/lib/customisations/defaults.js +6 -8
- package/dist/node_modules/@iconify/utils/lib/icon/defaults.js +8 -10
- package/dist/node_modules/@iconify/utils/lib/icon/merge.js +6 -8
- package/dist/node_modules/@iconify/utils/lib/icon/name.js +6 -8
- package/dist/node_modules/@iconify/utils/lib/icon/transformations.js +2 -4
- package/dist/node_modules/@iconify/utils/lib/icon-set/get-icon.js +10 -12
- package/dist/node_modules/@iconify/utils/lib/icon-set/tree.js +2 -4
- package/dist/node_modules/@iconify/utils/lib/svg/build.js +18 -20
- package/dist/node_modules/@iconify/utils/lib/svg/defs.js +6 -8
- package/dist/node_modules/@iconify/utils/lib/svg/html.js +2 -4
- package/dist/node_modules/@iconify/utils/lib/svg/id.js +8 -10
- package/dist/node_modules/@iconify/utils/lib/svg/size.js +5 -7
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-YZFGNWBL.js +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-2KRD3SAO.js +17 -20
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-67CJDMHE.js +17 -20
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-7N4EOEYR.js +23 -28
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-AA7GKIK3.js +21 -26
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js +17 -20
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOC6F5B3.js +17 -20
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js +425 -436
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KGLVRYIC.js +17 -20
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LIHQZDEY.js +38 -45
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js +22 -27
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-7Q5UKJZL.js +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-OMHHGYJF.js +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-4T2RLAQJ.js +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-ZZUOXDRM.js +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-PYXPWWZC.js +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-SZITEDCU.js +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-W4RFUUIX.js +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-RL74JXVD.js +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +52 -56
- package/dist/node_modules/@shikijs/core/dist/index.js +1119 -583
- package/dist/node_modules/@shikijs/engine-oniguruma/dist/index.js +148 -163
- package/dist/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.js +2 -4
- package/dist/node_modules/@shikijs/langs/dist/abap.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/actionscript-3.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/ada.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/angular-expression.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/angular-html.js +13 -15
- package/dist/node_modules/@shikijs/langs/dist/angular-inline-style.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/angular-inline-template.js +7 -9
- package/dist/node_modules/@shikijs/langs/dist/angular-let-declaration.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/angular-template-blocks.js +7 -9
- package/dist/node_modules/@shikijs/langs/dist/angular-template.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/angular-ts.js +15 -17
- package/dist/node_modules/@shikijs/langs/dist/apache.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/apex.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/apl.js +13 -15
- package/dist/node_modules/@shikijs/langs/dist/applescript.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/ara.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/asciidoc.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/asm.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/astro.js +15 -17
- package/dist/node_modules/@shikijs/langs/dist/awk.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/ballerina.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/bat.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/beancount.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/berry.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/bibtex.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/bicep.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/bird2.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/blade.js +17 -19
- package/dist/node_modules/@shikijs/langs/dist/bsl.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/c.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/c3.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/cadence.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/cairo.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/clarity.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/clojure.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/cmake.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/cobol.js +7 -9
- package/dist/node_modules/@shikijs/langs/dist/codeowners.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/codeql.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/coffee.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/common-lisp.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/coq.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/cpp-macro.js +9 -11
- package/dist/node_modules/@shikijs/langs/dist/cpp.js +11 -13
- package/dist/node_modules/@shikijs/langs/dist/crystal.js +15 -17
- package/dist/node_modules/@shikijs/langs/dist/csharp.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/css.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/csv.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/cue.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/cypher.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/d.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/dart.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/dax.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/desktop.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/diff.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/docker.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/dotenv.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/dream-maker.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/edge.js +9 -11
- package/dist/node_modules/@shikijs/langs/dist/elixir.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/elm.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/emacs-lisp.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/erb.js +7 -9
- package/dist/node_modules/@shikijs/langs/dist/erlang.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/es-tag-css.js +9 -11
- package/dist/node_modules/@shikijs/langs/dist/es-tag-glsl.js +9 -11
- package/dist/node_modules/@shikijs/langs/dist/es-tag-html.js +9 -11
- package/dist/node_modules/@shikijs/langs/dist/es-tag-sql.js +7 -9
- package/dist/node_modules/@shikijs/langs/dist/es-tag-xml.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/fennel.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/fish.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/fluent.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/fortran-fixed-form.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/fortran-free-form.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/fsharp.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/gdresource.js +7 -9
- package/dist/node_modules/@shikijs/langs/dist/gdscript.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/gdshader.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/genie.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/gherkin.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/git-commit.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/git-rebase.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/gleam.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/glimmer-js.js +11 -13
- package/dist/node_modules/@shikijs/langs/dist/glimmer-ts.js +11 -13
- package/dist/node_modules/@shikijs/langs/dist/glsl.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/gn.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/gnuplot.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/go.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/graphql.js +11 -13
- package/dist/node_modules/@shikijs/langs/dist/groovy.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/hack.js +7 -9
- package/dist/node_modules/@shikijs/langs/dist/haml.js +7 -9
- package/dist/node_modules/@shikijs/langs/dist/handlebars.js +11 -13
- package/dist/node_modules/@shikijs/langs/dist/haskell.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/haxe.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/hcl.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/hjson.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/hlsl.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/html-derivative.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/html.js +7 -9
- package/dist/node_modules/@shikijs/langs/dist/http.js +11 -13
- package/dist/node_modules/@shikijs/langs/dist/hurl.js +9 -11
- package/dist/node_modules/@shikijs/langs/dist/hxml.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/hy.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/imba.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/ini.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/java.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/javascript.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/jinja-html.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/jinja.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/jison.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/json.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/json5.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/jsonc.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/jsonl.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/jsonnet.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/jssm.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/jsx.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/julia.js +13 -15
- package/dist/node_modules/@shikijs/langs/dist/just.js +15 -17
- package/dist/node_modules/@shikijs/langs/dist/kdl.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/kotlin.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/kusto.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/latex.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/lean.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/less.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/liquid.js +11 -13
- package/dist/node_modules/@shikijs/langs/dist/llvm.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/log.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/logo.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/lua.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/luau.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/make.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/markdown-nix.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/markdown-vue.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/markdown.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/marko.js +11 -13
- package/dist/node_modules/@shikijs/langs/dist/matlab.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/mdc.js +9 -11
- package/dist/node_modules/@shikijs/langs/dist/mdx.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/mermaid.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/mipsasm.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/mojo.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/moonbit.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/move.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/narrat.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/nextflow-groovy.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/nextflow.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/nginx.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/nim.js +17 -19
- package/dist/node_modules/@shikijs/langs/dist/nix.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/nushell.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/objective-c.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/objective-cpp.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/ocaml.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/odin.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/openscad.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/pascal.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/perl.js +13 -15
- package/dist/node_modules/@shikijs/langs/dist/php.js +15 -17
- package/dist/node_modules/@shikijs/langs/dist/pkl.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/plsql.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/po.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/polar.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/postcss.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/powerquery.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/powershell.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/prisma.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/prolog.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/proto.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/pug.js +9 -11
- package/dist/node_modules/@shikijs/langs/dist/puppet.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/purescript.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/python.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/qml.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/qmldir.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/qss.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/r.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/racket.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/raku.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/razor.js +7 -9
- package/dist/node_modules/@shikijs/langs/dist/reg.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/regexp.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/rel.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/riscv.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/ron.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/rosmsg.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/rst.js +19 -21
- package/dist/node_modules/@shikijs/langs/dist/ruby.js +27 -29
- package/dist/node_modules/@shikijs/langs/dist/rust.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/sas.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/sass.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/scala.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/scheme.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/scss.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/sdbl.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/shaderlab.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/shellscript.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/shellsession.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/smalltalk.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/solidity.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/soy.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/sparql.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/splunk.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/sql.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/ssh-config.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/stata.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/stylus.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/surrealql.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/svelte.js +11 -13
- package/dist/node_modules/@shikijs/langs/dist/swift.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/system-verilog.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/systemd.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/talonscript.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/tasl.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/tcl.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/templ.js +9 -11
- package/dist/node_modules/@shikijs/langs/dist/terraform.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/tex.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/toml.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/ts-tags.js +15 -17
- package/dist/node_modules/@shikijs/langs/dist/tsv.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/tsx.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/turtle.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/twig.js +15 -17
- package/dist/node_modules/@shikijs/langs/dist/typescript.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/typespec.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/typst.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/v.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/vala.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/vb.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/verilog.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/vhdl.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/viml.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/vue-directives.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/vue-html.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/vue-interpolations.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/vue-vine.js +15 -17
- package/dist/node_modules/@shikijs/langs/dist/vue.js +23 -25
- package/dist/node_modules/@shikijs/langs/dist/vyper.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/wasm.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/wenyan.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/wgsl.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/wikitext.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/wit.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/wolfram.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/xml.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/xsl.js +3 -5
- package/dist/node_modules/@shikijs/langs/dist/yaml.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/zenscript.js +2 -3
- package/dist/node_modules/@shikijs/langs/dist/zig.js +2 -3
- package/dist/node_modules/@shikijs/themes/dist/andromeeda.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/aurora-x.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/ayu-dark.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/ayu-light.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/ayu-mirage.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/catppuccin-frappe.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/catppuccin-latte.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/catppuccin-macchiato.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/catppuccin-mocha.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/dark-plus.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/dracula-soft.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/dracula.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/everforest-dark.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/everforest-light.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/github-dark-default.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/github-dark-dimmed.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/github-dark-high-contrast.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/github-dark.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/github-light-default.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/github-light-high-contrast.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/github-light.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-hard.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-medium.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-soft.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/horizon-bright.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/horizon.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/houston.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/kanagawa-dragon.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/kanagawa-lotus.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/kanagawa-wave.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/laserwave.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/light-plus.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/material-theme-darker.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/material-theme-lighter.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/material-theme-ocean.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/material-theme-palenight.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/material-theme.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/min-dark.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/min-light.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/monokai.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/night-owl-light.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/night-owl.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/nord.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/one-dark-pro.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/one-light.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/plastic.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/poimandres.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/red.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/rose-pine-dawn.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/rose-pine-moon.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/rose-pine.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/slack-dark.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/slack-ochin.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/snazzy-light.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/solarized-dark.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/solarized-light.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/synthwave-84.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/tokyo-night.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/vesper.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/vitesse-black.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/vitesse-dark.js +2 -4
- package/dist/node_modules/@shikijs/themes/dist/vitesse-light.js +2 -4
- package/dist/node_modules/@shikijs/types/dist/index.js +2 -4
- package/dist/node_modules/@shikijs/vscode-textmate/dist/index.js +947 -949
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +30 -30
- package/dist/node_modules/@ungap/structured-clone/esm/index.js +4 -6
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +64 -64
- package/dist/node_modules/@ungap/structured-clone/esm/types.js +2 -0
- package/dist/node_modules/@upsetjs/venn.js/build/venn.esm.js +693 -695
- package/dist/node_modules/@xyflow/react/dist/esm/index.js +881 -883
- package/dist/node_modules/@xyflow/system/dist/esm/index.js +1221 -1223
- package/dist/node_modules/bail/index.js +2 -4
- package/dist/node_modules/ccount/index.js +2 -4
- package/dist/node_modules/character-entities-html4/index.js +2 -4
- package/dist/node_modules/character-entities-legacy/index.js +2 -4
- package/dist/node_modules/chevrotain/lib/src/api.js +10 -10
- package/dist/node_modules/chevrotain/lib/src/lang/lang_extensions.js +4 -6
- package/dist/node_modules/chevrotain/lib/src/parse/constants.js +2 -4
- package/dist/node_modules/chevrotain/lib/src/parse/cst/cst.js +9 -11
- package/dist/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +15 -17
- package/dist/node_modules/chevrotain/lib/src/parse/errors_public.js +17 -19
- package/dist/node_modules/chevrotain/lib/src/parse/exceptions_public.js +24 -26
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/checks.js +201 -203
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/first.js +16 -18
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/follow.js +17 -19
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +12 -14
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +140 -142
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/keys.js +4 -5
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js +25 -27
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +149 -151
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +14 -16
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/rest.js +38 -40
- package/dist/node_modules/chevrotain/lib/src/parse/parser/parser.js +64 -65
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +11 -13
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +101 -103
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +5 -7
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +45 -47
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +6 -8
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +73 -75
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +180 -182
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +23 -24
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +26 -28
- package/dist/node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js +2 -4
- package/dist/node_modules/chevrotain/lib/src/scan/lexer.js +246 -246
- package/dist/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js +2 -4
- package/dist/node_modules/chevrotain/lib/src/scan/lexer_public.js +31 -33
- package/dist/node_modules/chevrotain/lib/src/scan/reg_exp.js +64 -67
- package/dist/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js +10 -12
- package/dist/node_modules/chevrotain/lib/src/scan/tokens.js +35 -36
- package/dist/node_modules/chevrotain/lib/src/scan/tokens_public.js +26 -28
- package/dist/node_modules/chevrotain-allstar/lib/all-star-lookahead.js +240 -242
- package/dist/node_modules/chevrotain-allstar/lib/atn.js +133 -134
- package/dist/node_modules/chevrotain-allstar/lib/dfa.js +10 -11
- package/dist/node_modules/chevrotain-allstar/lib/index.js +1 -1
- package/dist/node_modules/classcat/index.js +3 -5
- package/dist/node_modules/comma-separated-tokens/index.js +3 -5
- package/dist/node_modules/cose-base/cose-base.js +21 -21
- package/dist/node_modules/cytoscape/dist/cytoscape.esm.js +7940 -7937
- package/dist/node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.js +6 -8
- package/dist/node_modules/cytoscape-fcose/cytoscape-fcose.js +6 -8
- package/dist/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.js +20 -20
- package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.js +4 -6
- package/dist/node_modules/d3/src/index.js +95 -95
- package/dist/node_modules/d3-array/src/ascending.js +2 -4
- package/dist/node_modules/d3-array/src/bisect.js +8 -8
- package/dist/node_modules/d3-array/src/bisector.js +6 -8
- package/dist/node_modules/d3-array/src/descending.js +2 -4
- package/dist/node_modules/d3-array/src/max.js +2 -4
- package/dist/node_modules/d3-array/src/min.js +2 -4
- package/dist/node_modules/d3-array/src/number.js +2 -4
- package/dist/node_modules/d3-array/src/range.js +2 -4
- package/dist/node_modules/d3-array/src/ticks.js +11 -13
- package/dist/node_modules/d3-axis/src/axis.js +46 -48
- package/dist/node_modules/d3-axis/src/identity.js +2 -4
- package/dist/node_modules/d3-brush/src/brush.js +4 -6
- package/dist/node_modules/d3-color/src/color.js +84 -86
- package/dist/node_modules/d3-color/src/define.js +3 -5
- package/dist/node_modules/d3-color/src/lab.js +43 -45
- package/dist/node_modules/d3-color/src/math.js +2 -4
- package/dist/node_modules/d3-dispatch/src/dispatch.js +17 -18
- package/dist/node_modules/d3-drag/src/constant.js +2 -4
- package/dist/node_modules/d3-drag/src/drag.js +75 -77
- package/dist/node_modules/d3-drag/src/event.js +3 -5
- package/dist/node_modules/d3-drag/src/nodrag.js +9 -11
- package/dist/node_modules/d3-drag/src/noevent.js +4 -6
- package/dist/node_modules/d3-ease/src/cubic.js +2 -4
- package/dist/node_modules/d3-format/src/defaultLocale.js +6 -8
- package/dist/node_modules/d3-format/src/exponent.js +4 -6
- package/dist/node_modules/d3-format/src/formatDecimal.js +3 -5
- package/dist/node_modules/d3-format/src/formatGroup.js +2 -4
- package/dist/node_modules/d3-format/src/formatNumerals.js +2 -4
- package/dist/node_modules/d3-format/src/formatPrefixAuto.js +8 -10
- package/dist/node_modules/d3-format/src/formatRounded.js +4 -6
- package/dist/node_modules/d3-format/src/formatSpecifier.js +8 -10
- package/dist/node_modules/d3-format/src/formatTrim.js +2 -4
- package/dist/node_modules/d3-format/src/formatTypes.js +13 -15
- package/dist/node_modules/d3-format/src/identity.js +2 -4
- package/dist/node_modules/d3-format/src/locale.js +31 -33
- package/dist/node_modules/d3-format/src/precisionFixed.js +4 -6
- package/dist/node_modules/d3-format/src/precisionPrefix.js +4 -6
- package/dist/node_modules/d3-format/src/precisionRound.js +4 -6
- package/dist/node_modules/d3-hierarchy/src/accessors.js +2 -4
- package/dist/node_modules/d3-hierarchy/src/constant.js +3 -5
- package/dist/node_modules/d3-hierarchy/src/hierarchy/ancestors.js +2 -4
- package/dist/node_modules/d3-hierarchy/src/hierarchy/count.js +4 -6
- package/dist/node_modules/d3-hierarchy/src/hierarchy/descendants.js +2 -4
- package/dist/node_modules/d3-hierarchy/src/hierarchy/each.js +2 -4
- package/dist/node_modules/d3-hierarchy/src/hierarchy/eachAfter.js +2 -4
- package/dist/node_modules/d3-hierarchy/src/hierarchy/eachBefore.js +2 -4
- package/dist/node_modules/d3-hierarchy/src/hierarchy/find.js +2 -4
- package/dist/node_modules/d3-hierarchy/src/hierarchy/index.js +44 -46
- package/dist/node_modules/d3-hierarchy/src/hierarchy/iterator.js +2 -4
- package/dist/node_modules/d3-hierarchy/src/hierarchy/leaves.js +2 -4
- package/dist/node_modules/d3-hierarchy/src/hierarchy/links.js +2 -4
- package/dist/node_modules/d3-hierarchy/src/hierarchy/path.js +4 -6
- package/dist/node_modules/d3-hierarchy/src/hierarchy/sort.js +2 -4
- package/dist/node_modules/d3-hierarchy/src/hierarchy/sum.js +2 -4
- package/dist/node_modules/d3-hierarchy/src/treemap/dice.js +2 -4
- package/dist/node_modules/d3-hierarchy/src/treemap/index.js +14 -16
- package/dist/node_modules/d3-hierarchy/src/treemap/round.js +2 -4
- package/dist/node_modules/d3-hierarchy/src/treemap/slice.js +2 -4
- package/dist/node_modules/d3-hierarchy/src/treemap/squarify.js +9 -11
- package/dist/node_modules/d3-interpolate/src/array.js +4 -6
- package/dist/node_modules/d3-interpolate/src/basis.js +4 -6
- package/dist/node_modules/d3-interpolate/src/basisClosed.js +4 -6
- package/dist/node_modules/d3-interpolate/src/color.js +17 -19
- package/dist/node_modules/d3-interpolate/src/constant.js +2 -4
- package/dist/node_modules/d3-interpolate/src/date.js +2 -4
- package/dist/node_modules/d3-interpolate/src/hcl.js +6 -8
- package/dist/node_modules/d3-interpolate/src/number.js +2 -4
- package/dist/node_modules/d3-interpolate/src/numberArray.js +3 -5
- package/dist/node_modules/d3-interpolate/src/object.js +4 -6
- package/dist/node_modules/d3-interpolate/src/rgb.js +9 -11
- package/dist/node_modules/d3-interpolate/src/round.js +2 -4
- package/dist/node_modules/d3-interpolate/src/string.js +14 -16
- package/dist/node_modules/d3-interpolate/src/transform/decompose.js +5 -7
- package/dist/node_modules/d3-interpolate/src/transform/index.js +11 -13
- package/dist/node_modules/d3-interpolate/src/transform/parse.js +8 -10
- package/dist/node_modules/d3-interpolate/src/value.js +12 -14
- package/dist/node_modules/d3-interpolate/src/zoom.js +11 -13
- package/dist/node_modules/d3-path/src/path.js +14 -16
- package/dist/node_modules/d3-sankey/node_modules/d3-array/src/max.js +2 -4
- package/dist/node_modules/d3-sankey/node_modules/d3-array/src/min.js +2 -4
- package/dist/node_modules/d3-sankey/node_modules/d3-array/src/sum.js +2 -4
- package/dist/node_modules/d3-sankey/node_modules/d3-path/src/path.js +12 -13
- package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/array.js +2 -4
- package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/constant.js +2 -4
- package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/link/index.js +17 -19
- package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/point.js +3 -5
- package/dist/node_modules/d3-sankey/src/align.js +10 -12
- package/dist/node_modules/d3-sankey/src/constant.js +2 -4
- package/dist/node_modules/d3-sankey/src/sankey.js +168 -170
- package/dist/node_modules/d3-sankey/src/sankeyLinkHorizontal.js +6 -8
- package/dist/node_modules/d3-scale/src/band.js +9 -11
- package/dist/node_modules/d3-scale/src/constant.js +2 -4
- package/dist/node_modules/d3-scale/src/continuous.js +47 -49
- package/dist/node_modules/d3-scale/src/init.js +2 -4
- package/dist/node_modules/d3-scale/src/linear.js +13 -15
- package/dist/node_modules/d3-scale/src/nice.js +2 -4
- package/dist/node_modules/d3-scale/src/number.js +2 -4
- package/dist/node_modules/d3-scale/src/ordinal.js +16 -18
- package/dist/node_modules/d3-scale/src/tickFormat.js +14 -16
- package/dist/node_modules/d3-scale/src/time.js +34 -36
- package/dist/node_modules/d3-scale-chromatic/src/categorical/Tableau10.js +3 -5
- package/dist/node_modules/d3-scale-chromatic/src/colors.js +2 -4
- package/dist/node_modules/d3-selection/src/array.js +2 -4
- package/dist/node_modules/d3-selection/src/constant.js +2 -4
- package/dist/node_modules/d3-selection/src/creator.js +10 -12
- package/dist/node_modules/d3-selection/src/matcher.js +3 -5
- package/dist/node_modules/d3-selection/src/namespace.js +5 -7
- package/dist/node_modules/d3-selection/src/namespaces.js +3 -5
- package/dist/node_modules/d3-selection/src/pointer.js +4 -6
- package/dist/node_modules/d3-selection/src/select.js +4 -6
- package/dist/node_modules/d3-selection/src/selection/append.js +4 -6
- package/dist/node_modules/d3-selection/src/selection/attr.js +17 -19
- package/dist/node_modules/d3-selection/src/selection/call.js +2 -4
- package/dist/node_modules/d3-selection/src/selection/classed.js +23 -25
- package/dist/node_modules/d3-selection/src/selection/clone.js +5 -7
- package/dist/node_modules/d3-selection/src/selection/data.js +16 -18
- package/dist/node_modules/d3-selection/src/selection/datum.js +2 -4
- package/dist/node_modules/d3-selection/src/selection/dispatch.js +10 -12
- package/dist/node_modules/d3-selection/src/selection/each.js +2 -4
- package/dist/node_modules/d3-selection/src/selection/empty.js +2 -4
- package/dist/node_modules/d3-selection/src/selection/enter.js +11 -13
- package/dist/node_modules/d3-selection/src/selection/exit.js +5 -7
- package/dist/node_modules/d3-selection/src/selection/filter.js +6 -8
- package/dist/node_modules/d3-selection/src/selection/html.js +6 -8
- package/dist/node_modules/d3-selection/src/selection/index.js +79 -80
- package/dist/node_modules/d3-selection/src/selection/insert.js +6 -8
- package/dist/node_modules/d3-selection/src/selection/iterator.js +2 -4
- package/dist/node_modules/d3-selection/src/selection/join.js +2 -4
- package/dist/node_modules/d3-selection/src/selection/lower.js +4 -6
- package/dist/node_modules/d3-selection/src/selection/merge.js +4 -6
- package/dist/node_modules/d3-selection/src/selection/node.js +2 -4
- package/dist/node_modules/d3-selection/src/selection/nodes.js +2 -4
- package/dist/node_modules/d3-selection/src/selection/on.js +9 -11
- package/dist/node_modules/d3-selection/src/selection/order.js +2 -4
- package/dist/node_modules/d3-selection/src/selection/property.js +6 -8
- package/dist/node_modules/d3-selection/src/selection/raise.js +4 -6
- package/dist/node_modules/d3-selection/src/selection/remove.js +4 -6
- package/dist/node_modules/d3-selection/src/selection/select.js +6 -8
- package/dist/node_modules/d3-selection/src/selection/selectAll.js +9 -11
- package/dist/node_modules/d3-selection/src/selection/selectChild.js +8 -10
- package/dist/node_modules/d3-selection/src/selection/selectChildren.js +8 -10
- package/dist/node_modules/d3-selection/src/selection/size.js +2 -4
- package/dist/node_modules/d3-selection/src/selection/sort.js +6 -8
- package/dist/node_modules/d3-selection/src/selection/sparse.js +2 -4
- package/dist/node_modules/d3-selection/src/selection/style.js +12 -14
- package/dist/node_modules/d3-selection/src/selection/text.js +6 -8
- package/dist/node_modules/d3-selection/src/selector.js +4 -6
- package/dist/node_modules/d3-selection/src/selectorAll.js +4 -6
- package/dist/node_modules/d3-selection/src/sourceEvent.js +2 -4
- package/dist/node_modules/d3-selection/src/window.js +2 -4
- package/dist/node_modules/d3-shape/src/arc.js +36 -38
- package/dist/node_modules/d3-shape/src/array.js +2 -3
- package/dist/node_modules/d3-shape/src/constant.js +2 -4
- package/dist/node_modules/d3-shape/src/curve/basis.js +8 -10
- package/dist/node_modules/d3-shape/src/curve/basisClosed.js +16 -18
- package/dist/node_modules/d3-shape/src/curve/basisOpen.js +7 -9
- package/dist/node_modules/d3-shape/src/curve/bump.js +13 -15
- package/dist/node_modules/d3-shape/src/curve/bundle.js +7 -9
- package/dist/node_modules/d3-shape/src/curve/cardinal.js +8 -10
- package/dist/node_modules/d3-shape/src/curve/cardinalClosed.js +10 -12
- package/dist/node_modules/d3-shape/src/curve/cardinalOpen.js +7 -9
- package/dist/node_modules/d3-shape/src/curve/catmullRom.js +17 -19
- package/dist/node_modules/d3-shape/src/curve/catmullRomClosed.js +11 -13
- package/dist/node_modules/d3-shape/src/curve/catmullRomOpen.js +8 -10
- package/dist/node_modules/d3-shape/src/curve/linear.js +5 -7
- package/dist/node_modules/d3-shape/src/curve/linearClosed.js +10 -12
- package/dist/node_modules/d3-shape/src/curve/monotone.js +21 -23
- package/dist/node_modules/d3-shape/src/curve/natural.js +7 -9
- package/dist/node_modules/d3-shape/src/curve/step.js +17 -19
- package/dist/node_modules/d3-shape/src/descending.js +2 -4
- package/dist/node_modules/d3-shape/src/identity.js +2 -4
- package/dist/node_modules/d3-shape/src/line.js +17 -19
- package/dist/node_modules/d3-shape/src/math.js +6 -8
- package/dist/node_modules/d3-shape/src/noop.js +2 -4
- package/dist/node_modules/d3-shape/src/path.js +4 -6
- package/dist/node_modules/d3-shape/src/pie.js +13 -15
- package/dist/node_modules/d3-shape/src/point.js +3 -5
- package/dist/node_modules/d3-time/src/day.js +15 -17
- package/dist/node_modules/d3-time/src/duration.js +2 -4
- package/dist/node_modules/d3-time/src/hour.js +14 -16
- package/dist/node_modules/d3-time/src/interval.js +5 -7
- package/dist/node_modules/d3-time/src/millisecond.js +5 -7
- package/dist/node_modules/d3-time/src/minute.js +14 -16
- package/dist/node_modules/d3-time/src/month.js +12 -14
- package/dist/node_modules/d3-time/src/second.js +7 -9
- package/dist/node_modules/d3-time/src/ticks.js +64 -66
- package/dist/node_modules/d3-time/src/week.js +19 -21
- package/dist/node_modules/d3-time/src/year.js +8 -10
- package/dist/node_modules/d3-time-format/src/defaultLocale.js +6 -8
- package/dist/node_modules/d3-time-format/src/locale.js +344 -346
- package/dist/node_modules/d3-timer/src/timeout.js +4 -6
- package/dist/node_modules/d3-timer/src/timer.js +31 -33
- package/dist/node_modules/d3-transition/src/index.js +2 -2
- package/dist/node_modules/d3-transition/src/interrupt.js +3 -4
- package/dist/node_modules/d3-transition/src/selection/index.js +4 -5
- package/dist/node_modules/d3-transition/src/selection/interrupt.js +4 -6
- package/dist/node_modules/d3-transition/src/selection/transition.js +14 -16
- package/dist/node_modules/d3-transition/src/transition/attr.js +26 -28
- package/dist/node_modules/d3-transition/src/transition/attrTween.js +11 -13
- package/dist/node_modules/d3-transition/src/transition/delay.js +9 -11
- package/dist/node_modules/d3-transition/src/transition/duration.js +9 -11
- package/dist/node_modules/d3-transition/src/transition/ease.js +6 -8
- package/dist/node_modules/d3-transition/src/transition/easeVarying.js +6 -8
- package/dist/node_modules/d3-transition/src/transition/end.js +4 -6
- package/dist/node_modules/d3-transition/src/transition/filter.js +6 -8
- package/dist/node_modules/d3-transition/src/transition/index.js +61 -63
- package/dist/node_modules/d3-transition/src/transition/interpolate.js +7 -9
- package/dist/node_modules/d3-transition/src/transition/merge.js +4 -6
- package/dist/node_modules/d3-transition/src/transition/on.js +7 -9
- package/dist/node_modules/d3-transition/src/transition/remove.js +4 -6
- package/dist/node_modules/d3-transition/src/transition/schedule.js +18 -20
- package/dist/node_modules/d3-transition/src/transition/select.js +8 -10
- package/dist/node_modules/d3-transition/src/transition/selectAll.js +8 -10
- package/dist/node_modules/d3-transition/src/transition/selection.js +5 -7
- package/dist/node_modules/d3-transition/src/transition/style.js +19 -21
- package/dist/node_modules/d3-transition/src/transition/styleTween.js +6 -8
- package/dist/node_modules/d3-transition/src/transition/text.js +6 -8
- package/dist/node_modules/d3-transition/src/transition/textTween.js +6 -8
- package/dist/node_modules/d3-transition/src/transition/transition.js +8 -10
- package/dist/node_modules/d3-transition/src/transition/tween.js +12 -14
- package/dist/node_modules/d3-zoom/src/constant.js +2 -4
- package/dist/node_modules/d3-zoom/src/event.js +2 -4
- package/dist/node_modules/d3-zoom/src/index.js +2 -2
- package/dist/node_modules/d3-zoom/src/noevent.js +3 -5
- package/dist/node_modules/d3-zoom/src/transform.js +10 -12
- package/dist/node_modules/d3-zoom/src/zoom.js +114 -116
- package/dist/node_modules/dagre-d3-es/src/dagre/acyclic.js +12 -14
- package/dist/node_modules/dagre-d3-es/src/dagre/add-border-segments.js +9 -11
- package/dist/node_modules/dagre-d3-es/src/dagre/coordinate-system.js +34 -36
- package/dist/node_modules/dagre-d3-es/src/dagre/data/list.js +7 -9
- package/dist/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +49 -51
- package/dist/node_modules/dagre-d3-es/src/dagre/index.js +2 -2
- package/dist/node_modules/dagre-d3-es/src/dagre/layout.js +163 -165
- package/dist/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +43 -45
- package/dist/node_modules/dagre-d3-es/src/dagre/normalize.js +10 -12
- package/dist/node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js +4 -6
- package/dist/node_modules/dagre-d3-es/src/dagre/order/barycenter.js +6 -8
- package/dist/node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js +12 -14
- package/dist/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +20 -22
- package/dist/node_modules/dagre-d3-es/src/dagre/order/index.js +34 -36
- package/dist/node_modules/dagre-d3-es/src/dagre/order/init-order.js +13 -15
- package/dist/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +30 -32
- package/dist/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +28 -30
- package/dist/node_modules/dagre-d3-es/src/dagre/order/sort.js +18 -20
- package/dist/node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js +10 -12
- package/dist/node_modules/dagre-d3-es/src/dagre/position/bk.js +148 -150
- package/dist/node_modules/dagre-d3-es/src/dagre/position/index.js +18 -20
- package/dist/node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js +17 -19
- package/dist/node_modules/dagre-d3-es/src/dagre/rank/index.js +14 -16
- package/dist/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +63 -64
- package/dist/node_modules/dagre-d3-es/src/dagre/rank/util.js +8 -10
- package/dist/node_modules/dagre-d3-es/src/dagre/util.js +82 -84
- package/dist/node_modules/dagre-d3-es/src/graphlib/alg/dfs.js +13 -15
- package/dist/node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js +2 -3
- package/dist/node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js +2 -3
- package/dist/node_modules/dagre-d3-es/src/graphlib/alg/index.js +3 -3
- package/dist/node_modules/dagre-d3-es/src/graphlib/alg/postorder.js +4 -6
- package/dist/node_modules/dagre-d3-es/src/graphlib/alg/preorder.js +4 -6
- package/dist/node_modules/dagre-d3-es/src/graphlib/alg/topsort.js +11 -13
- package/dist/node_modules/dagre-d3-es/src/graphlib/graph.js +129 -131
- package/dist/node_modules/dagre-d3-es/src/graphlib/index.js +1 -1
- package/dist/node_modules/dagre-d3-es/src/graphlib/json.js +16 -18
- package/dist/node_modules/dayjs/dayjs.min.js +4 -6
- package/dist/node_modules/dayjs/plugin/advancedFormat.js +4 -6
- package/dist/node_modules/dayjs/plugin/customParseFormat.js +4 -6
- package/dist/node_modules/dayjs/plugin/duration.js +4 -6
- package/dist/node_modules/dayjs/plugin/isoWeek.js +4 -6
- package/dist/node_modules/decode-named-character-reference/index.dom.js +5 -7
- package/dist/node_modules/devlop/lib/default.js +2 -4
- package/dist/node_modules/dompurify/dist/purify.es.js +180 -182
- package/dist/node_modules/entities/dist/esm/decode-codepoint.js +4 -6
- package/dist/node_modules/entities/dist/esm/decode.js +85 -87
- package/dist/node_modules/entities/dist/esm/generated/decode-data-html.js +2 -4
- package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +4 -6
- package/dist/node_modules/extend/index.js +6 -9
- package/dist/node_modules/hast-util-from-dom/lib/index.js +30 -32
- package/dist/node_modules/hast-util-from-html-isomorphic/lib/browser.js +8 -10
- package/dist/node_modules/hast-util-from-parse5/lib/index.js +80 -82
- package/dist/node_modules/hast-util-is-element/lib/index.js +15 -17
- package/dist/node_modules/hast-util-parse-selector/lib/index.js +5 -7
- package/dist/node_modules/hast-util-raw/lib/index.js +134 -136
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.js +21 -23
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.js +3 -5
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.js +89 -89
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.js +249 -250
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.js +4 -6
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.js +14 -14
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/index.js +4 -4
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.js +15 -17
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.js +1495 -1497
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.js +146 -148
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.js +19 -20
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.js +798 -800
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.js +31 -33
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.js +8 -10
- package/dist/node_modules/hast-util-sanitize/lib/index.js +104 -106
- package/dist/node_modules/hast-util-sanitize/lib/schema.js +11 -12
- package/dist/node_modules/hast-util-to-html/lib/handle/comment.js +7 -9
- package/dist/node_modules/hast-util-to-html/lib/handle/doctype.js +2 -4
- package/dist/node_modules/hast-util-to-html/lib/handle/element.js +23 -25
- package/dist/node_modules/hast-util-to-html/lib/handle/index.js +21 -22
- package/dist/node_modules/hast-util-to-html/lib/handle/raw.js +4 -6
- package/dist/node_modules/hast-util-to-html/lib/handle/root.js +2 -4
- package/dist/node_modules/hast-util-to-html/lib/handle/text.js +5 -7
- package/dist/node_modules/hast-util-to-html/lib/index.js +36 -38
- package/dist/node_modules/hast-util-to-html/lib/omission/closing.js +68 -70
- package/dist/node_modules/hast-util-to-html/lib/omission/omission.js +4 -6
- package/dist/node_modules/hast-util-to-html/lib/omission/opening.js +30 -32
- package/dist/node_modules/hast-util-to-html/lib/omission/util/siblings.js +9 -10
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +190 -192
- package/dist/node_modules/hast-util-to-parse5/lib/index.js +69 -71
- package/dist/node_modules/hast-util-to-text/lib/index.js +59 -61
- package/dist/node_modules/hast-util-whitespace/lib/index.js +6 -8
- package/dist/node_modules/hastscript/lib/create-h.js +24 -26
- package/dist/node_modules/hastscript/lib/index.js +5 -7
- package/dist/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +2 -4
- package/dist/node_modules/html-url-attributes/lib/index.js +2 -4
- package/dist/node_modules/html-void-elements/index.js +2 -4
- package/dist/node_modules/inline-style-parser/cjs/index.js +4 -6
- package/dist/node_modules/internmap/src/index.js +20 -22
- package/dist/node_modules/katex/dist/katex.js +2307 -2301
- package/dist/node_modules/khroma/dist/channels/index.js +21 -23
- package/dist/node_modules/khroma/dist/channels/reusable.js +3 -5
- package/dist/node_modules/khroma/dist/channels/type.js +5 -7
- package/dist/node_modules/khroma/dist/color/hex.js +8 -10
- package/dist/node_modules/khroma/dist/color/hsl.js +17 -19
- package/dist/node_modules/khroma/dist/color/index.js +15 -17
- package/dist/node_modules/khroma/dist/color/keyword.js +8 -10
- package/dist/node_modules/khroma/dist/color/rgb.js +12 -14
- package/dist/node_modules/khroma/dist/constants.js +5 -7
- package/dist/node_modules/khroma/dist/methods/adjust.js +6 -8
- package/dist/node_modules/khroma/dist/methods/adjust_channel.js +6 -8
- package/dist/node_modules/khroma/dist/methods/change.js +7 -9
- package/dist/node_modules/khroma/dist/methods/channel.js +4 -6
- package/dist/node_modules/khroma/dist/methods/darken.js +3 -5
- package/dist/node_modules/khroma/dist/methods/invert.js +6 -8
- package/dist/node_modules/khroma/dist/methods/is_dark.js +3 -5
- package/dist/node_modules/khroma/dist/methods/is_light.js +3 -5
- package/dist/node_modules/khroma/dist/methods/lighten.js +3 -5
- package/dist/node_modules/khroma/dist/methods/luminance.js +6 -8
- package/dist/node_modules/khroma/dist/methods/mix.js +6 -8
- package/dist/node_modules/khroma/dist/methods/rgba.js +13 -15
- package/dist/node_modules/khroma/dist/methods/transparentize.js +3 -5
- package/dist/node_modules/khroma/dist/utils/channel.js +6 -8
- package/dist/node_modules/khroma/dist/utils/index.js +8 -10
- package/dist/node_modules/khroma/dist/utils/lang.js +2 -4
- package/dist/node_modules/khroma/dist/utils/unit.js +2 -4
- package/dist/node_modules/langium/lib/default-module.js +64 -66
- package/dist/node_modules/langium/lib/dependency-injection.js +39 -37
- package/dist/node_modules/langium/lib/documentation/comment-provider.js +5 -7
- package/dist/node_modules/langium/lib/documentation/documentation-provider.js +6 -8
- package/dist/node_modules/langium/lib/documentation/jsdoc.js +202 -204
- package/dist/node_modules/langium/lib/index.js +182 -0
- package/dist/node_modules/langium/lib/languages/generated/ast.js +534 -343
- package/dist/node_modules/langium/lib/languages/grammar-config.js +8 -10
- package/dist/node_modules/langium/lib/parser/async-parser.js +76 -4
- package/dist/node_modules/langium/lib/parser/completion-parser-builder.js +6 -8
- package/dist/node_modules/langium/lib/parser/cst-node-builder.js +54 -56
- package/dist/node_modules/langium/lib/parser/indentation-aware.js +141 -0
- package/dist/node_modules/langium/lib/parser/langium-parser-builder.js +7 -9
- package/dist/node_modules/langium/lib/parser/langium-parser.js +188 -190
- package/dist/node_modules/langium/lib/parser/lexer.js +25 -25
- package/dist/node_modules/langium/lib/parser/parser-builder-base.js +203 -204
- package/dist/node_modules/langium/lib/parser/token-builder.js +30 -32
- package/dist/node_modules/langium/lib/parser/value-converter.js +15 -17
- package/dist/node_modules/langium/lib/references/linker.js +103 -104
- package/dist/node_modules/langium/lib/references/name-provider.js +7 -9
- package/dist/node_modules/langium/lib/references/references.js +51 -53
- package/dist/node_modules/langium/lib/references/scope-computation.js +12 -14
- package/dist/node_modules/langium/lib/references/scope-provider.js +11 -13
- package/dist/node_modules/langium/lib/references/scope.js +56 -27
- package/dist/node_modules/langium/lib/serializer/hydrator.js +69 -71
- package/dist/node_modules/langium/lib/serializer/json-serializer.js +21 -23
- package/dist/node_modules/langium/lib/service-registry.js +5 -7
- package/dist/node_modules/langium/lib/syntax-tree.js +31 -33
- package/dist/node_modules/langium/lib/utils/ast-utils.js +112 -77
- package/dist/node_modules/langium/lib/utils/caching.js +42 -33
- package/dist/node_modules/langium/lib/utils/cancellation.js +5 -7
- package/dist/node_modules/langium/lib/utils/collections.js +33 -35
- package/dist/node_modules/langium/lib/utils/cst-utils.js +161 -46
- package/dist/node_modules/langium/lib/utils/disposable.js +3 -5
- package/dist/node_modules/langium/lib/utils/errors.js +9 -8
- package/dist/node_modules/langium/lib/utils/event.js +5 -7
- package/dist/node_modules/langium/lib/utils/grammar-loader.js +14 -16
- package/dist/node_modules/langium/lib/utils/grammar-utils.js +249 -172
- package/dist/node_modules/langium/lib/utils/index.js +53 -0
- package/dist/node_modules/langium/lib/utils/promise-utils.js +19 -18
- package/dist/node_modules/langium/lib/utils/regexp-utils.js +76 -53
- package/dist/node_modules/langium/lib/utils/stream.js +153 -155
- package/dist/node_modules/langium/lib/utils/uri-utils.js +12 -14
- package/dist/node_modules/langium/lib/validation/document-validator.js +103 -104
- package/dist/node_modules/langium/lib/validation/validation-registry.js +14 -15
- package/dist/node_modules/langium/lib/workspace/ast-descriptions.js +17 -19
- package/dist/node_modules/langium/lib/workspace/ast-node-locator.js +2 -4
- package/dist/node_modules/langium/lib/workspace/configuration.js +5 -7
- package/dist/node_modules/langium/lib/workspace/document-builder.js +134 -131
- package/dist/node_modules/langium/lib/workspace/documents.js +83 -85
- package/dist/node_modules/langium/lib/workspace/file-system-provider.js +4 -5
- package/dist/node_modules/langium/lib/workspace/index-manager.js +14 -16
- package/dist/node_modules/langium/lib/workspace/profiler.js +89 -0
- package/dist/node_modules/langium/lib/workspace/workspace-lock.js +9 -11
- package/dist/node_modules/langium/lib/workspace/workspace-manager.js +33 -35
- package/dist/node_modules/layout-base/layout-base.js +4 -6
- package/dist/node_modules/lodash/_Symbol.js +7 -0
- package/dist/node_modules/lodash/_baseGetTag.js +13 -0
- package/dist/node_modules/lodash/_baseTrim.js +11 -0
- package/dist/node_modules/lodash/_freeGlobal.js +6 -0
- package/dist/node_modules/lodash/_getRawTag.js +17 -0
- package/dist/node_modules/lodash/_objectToString.js +10 -0
- package/dist/node_modules/lodash/_root.js +8 -0
- package/dist/node_modules/lodash/_trimmedEndIndex.js +11 -0
- package/dist/{frontend/studio/node_modules → node_modules}/lodash/debounce.js +8 -10
- package/dist/node_modules/lodash/isObject.js +10 -0
- package/dist/node_modules/lodash/isObjectLike.js +9 -0
- package/dist/node_modules/lodash/isSymbol.js +12 -0
- package/dist/node_modules/lodash/now.js +10 -0
- package/dist/node_modules/lodash/toNumber.js +22 -0
- package/dist/node_modules/lodash-es/_DataView.js +4 -6
- package/dist/node_modules/lodash-es/_Hash.js +13 -14
- package/dist/node_modules/lodash-es/_ListCache.js +13 -14
- package/dist/node_modules/lodash-es/_Map.js +4 -6
- package/dist/node_modules/lodash-es/_MapCache.js +13 -14
- package/dist/node_modules/lodash-es/_Promise.js +4 -6
- package/dist/node_modules/lodash-es/_Set.js +4 -6
- package/dist/node_modules/lodash-es/_SetCache.js +9 -10
- package/dist/node_modules/lodash-es/_Stack.js +11 -12
- package/dist/node_modules/lodash-es/_Symbol.js +3 -5
- package/dist/node_modules/lodash-es/_Uint8Array.js +3 -5
- package/dist/node_modules/lodash-es/_WeakMap.js +4 -6
- package/dist/node_modules/lodash-es/_apply.js +3 -4
- package/dist/node_modules/lodash-es/_arrayEach.js +3 -4
- package/dist/node_modules/lodash-es/_arrayFilter.js +3 -4
- package/dist/node_modules/lodash-es/_arrayIncludes.js +5 -6
- package/dist/node_modules/lodash-es/_arrayIncludesWith.js +3 -4
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +12 -13
- package/dist/node_modules/lodash-es/_arrayMap.js +3 -4
- package/dist/node_modules/lodash-es/_arrayPush.js +3 -4
- package/dist/node_modules/lodash-es/_arrayReduce.js +3 -4
- package/dist/node_modules/lodash-es/_arraySome.js +3 -4
- package/dist/node_modules/lodash-es/_asciiSize.js +3 -5
- package/dist/node_modules/lodash-es/_assignMergeValue.js +6 -7
- package/dist/node_modules/lodash-es/_assignValue.js +7 -8
- package/dist/node_modules/lodash-es/_assocIndexOf.js +5 -6
- package/dist/node_modules/lodash-es/_baseAssign.js +6 -7
- package/dist/node_modules/lodash-es/_baseAssignIn.js +6 -7
- package/dist/node_modules/lodash-es/_baseAssignValue.js +5 -6
- package/dist/node_modules/lodash-es/_baseClone.js +50 -51
- package/dist/node_modules/lodash-es/_baseCreate.js +5 -7
- package/dist/node_modules/lodash-es/_baseEach.js +4 -6
- package/dist/node_modules/lodash-es/_baseExtremum.js +5 -6
- package/dist/node_modules/lodash-es/_baseFilter.js +5 -6
- package/dist/node_modules/lodash-es/_baseFindIndex.js +3 -4
- package/dist/node_modules/lodash-es/_baseFlatten.js +7 -8
- package/dist/node_modules/lodash-es/_baseFor.js +3 -5
- package/dist/node_modules/lodash-es/_baseForOwn.js +6 -7
- package/dist/node_modules/lodash-es/_baseGet.js +7 -8
- package/dist/node_modules/lodash-es/_baseGetAllKeys.js +6 -7
- package/dist/node_modules/lodash-es/_baseGetTag.js +8 -9
- package/dist/node_modules/lodash-es/_baseGt.js +3 -4
- package/dist/node_modules/lodash-es/_baseHas.js +5 -6
- package/dist/node_modules/lodash-es/_baseHasIn.js +3 -4
- package/dist/node_modules/lodash-es/_baseIndexOf.js +7 -8
- package/dist/node_modules/lodash-es/_baseIsArguments.js +7 -8
- package/dist/node_modules/lodash-es/_baseIsEqual.js +6 -7
- package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +22 -23
- package/dist/node_modules/lodash-es/_baseIsMap.js +7 -8
- package/dist/node_modules/lodash-es/_baseIsMatch.js +8 -9
- package/dist/node_modules/lodash-es/_baseIsNaN.js +3 -4
- package/dist/node_modules/lodash-es/_baseIsNative.js +9 -10
- package/dist/node_modules/lodash-es/_baseIsSet.js +7 -8
- package/dist/node_modules/lodash-es/_baseIsTypedArray.js +9 -10
- package/dist/node_modules/lodash-es/_baseIteratee.js +9 -10
- package/dist/node_modules/lodash-es/_baseKeys.js +8 -9
- package/dist/node_modules/lodash-es/_baseKeysIn.js +10 -11
- package/dist/node_modules/lodash-es/_baseLt.js +3 -4
- package/dist/node_modules/lodash-es/_baseMap.js +7 -8
- package/dist/node_modules/lodash-es/_baseMatches.js +9 -10
- package/dist/node_modules/lodash-es/_baseMatchesProperty.js +14 -15
- package/dist/node_modules/lodash-es/_baseMerge.js +15 -16
- package/dist/node_modules/lodash-es/_baseMergeDeep.js +23 -24
- package/dist/node_modules/lodash-es/_baseOrderBy.js +22 -23
- package/dist/node_modules/lodash-es/_basePick.js +7 -8
- package/dist/node_modules/lodash-es/_basePickBy.js +8 -9
- package/dist/node_modules/lodash-es/_baseProperty.js +3 -4
- package/dist/node_modules/lodash-es/_basePropertyDeep.js +5 -6
- package/dist/node_modules/lodash-es/_baseRange.js +5 -6
- package/dist/node_modules/lodash-es/_baseReduce.js +3 -4
- package/dist/node_modules/lodash-es/_baseRest.js +7 -8
- package/dist/node_modules/lodash-es/_baseSet.js +13 -14
- package/dist/node_modules/lodash-es/_baseSetToString.js +8 -10
- package/dist/node_modules/lodash-es/_baseSortBy.js +3 -4
- package/dist/node_modules/lodash-es/_baseTimes.js +3 -4
- package/dist/node_modules/lodash-es/_baseToString.js +12 -13
- package/dist/node_modules/lodash-es/_baseTrim.js +6 -7
- package/dist/node_modules/lodash-es/_baseUnary.js +3 -4
- package/dist/node_modules/lodash-es/_baseUniq.js +16 -17
- package/dist/node_modules/lodash-es/_baseValues.js +5 -6
- package/dist/node_modules/lodash-es/_baseZipObject.js +3 -4
- package/dist/node_modules/lodash-es/_cacheHas.js +3 -4
- package/dist/node_modules/lodash-es/_castFunction.js +5 -6
- package/dist/node_modules/lodash-es/_castPath.js +8 -9
- package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +5 -6
- package/dist/node_modules/lodash-es/_cloneBuffer.js +8 -9
- package/dist/node_modules/lodash-es/_cloneDataView.js +5 -6
- package/dist/node_modules/lodash-es/_cloneRegExp.js +5 -6
- package/dist/node_modules/lodash-es/_cloneSymbol.js +6 -7
- package/dist/node_modules/lodash-es/_cloneTypedArray.js +5 -6
- package/dist/node_modules/lodash-es/_compareAscending.js +5 -6
- package/dist/node_modules/lodash-es/_compareMultiple.js +5 -6
- package/dist/node_modules/lodash-es/_copyArray.js +3 -4
- package/dist/node_modules/lodash-es/_copyObject.js +6 -7
- package/dist/node_modules/lodash-es/_copySymbols.js +6 -7
- package/dist/node_modules/lodash-es/_copySymbolsIn.js +6 -7
- package/dist/node_modules/lodash-es/_coreJsData.js +3 -5
- package/dist/node_modules/lodash-es/_createAssigner.js +7 -8
- package/dist/node_modules/lodash-es/_createBaseEach.js +5 -6
- package/dist/node_modules/lodash-es/_createBaseFor.js +3 -4
- package/dist/node_modules/lodash-es/_createFind.js +9 -10
- package/dist/node_modules/lodash-es/_createRange.js +7 -8
- package/dist/node_modules/lodash-es/_createSet.js +7 -9
- package/dist/node_modules/lodash-es/_defineProperty.js +4 -6
- package/dist/node_modules/lodash-es/_equalArrays.js +11 -12
- package/dist/node_modules/lodash-es/_equalByTag.js +28 -29
- package/dist/node_modules/lodash-es/_equalObjects.js +8 -9
- package/dist/node_modules/lodash-es/_flatRest.js +7 -8
- package/dist/node_modules/lodash-es/_freeGlobal.js +2 -4
- package/dist/node_modules/lodash-es/_getAllKeys.js +7 -8
- package/dist/node_modules/lodash-es/_getAllKeysIn.js +7 -8
- package/dist/node_modules/lodash-es/_getMapData.js +5 -6
- package/dist/node_modules/lodash-es/_getMatchData.js +7 -8
- package/dist/node_modules/lodash-es/_getNative.js +7 -8
- package/dist/node_modules/lodash-es/_getPrototype.js +3 -5
- package/dist/node_modules/lodash-es/_getRawTag.js +9 -10
- package/dist/node_modules/lodash-es/_getSymbols.js +7 -9
- package/dist/node_modules/lodash-es/_getSymbolsIn.js +8 -10
- package/dist/node_modules/lodash-es/_getTag.js +19 -21
- package/dist/node_modules/lodash-es/_getValue.js +3 -4
- package/dist/node_modules/lodash-es/_hasPath.js +12 -13
- package/dist/node_modules/lodash-es/_hasUnicode.js +5 -6
- package/dist/node_modules/lodash-es/_hashClear.js +5 -6
- package/dist/node_modules/lodash-es/_hashDelete.js +4 -5
- package/dist/node_modules/lodash-es/_hashGet.js +8 -9
- package/dist/node_modules/lodash-es/_hashHas.js +6 -7
- package/dist/node_modules/lodash-es/_hashSet.js +6 -7
- package/dist/node_modules/lodash-es/_initCloneArray.js +5 -6
- package/dist/node_modules/lodash-es/_initCloneByTag.js +28 -29
- package/dist/node_modules/lodash-es/_initCloneObject.js +7 -8
- package/dist/node_modules/lodash-es/_isFlattenable.js +8 -9
- package/dist/node_modules/lodash-es/_isIndex.js +5 -6
- package/dist/node_modules/lodash-es/_isIterateeCall.js +9 -10
- package/dist/node_modules/lodash-es/_isKey.js +8 -9
- package/dist/node_modules/lodash-es/_isKeyable.js +3 -4
- package/dist/node_modules/lodash-es/_isMasked.js +8 -9
- package/dist/node_modules/lodash-es/_isPrototype.js +5 -6
- package/dist/node_modules/lodash-es/_isStrictComparable.js +5 -6
- package/dist/node_modules/lodash-es/_listCacheClear.js +3 -4
- package/dist/node_modules/lodash-es/_listCacheDelete.js +7 -8
- package/dist/node_modules/lodash-es/_listCacheGet.js +5 -6
- package/dist/node_modules/lodash-es/_listCacheHas.js +5 -6
- package/dist/node_modules/lodash-es/_listCacheSet.js +5 -6
- package/dist/node_modules/lodash-es/_mapCacheClear.js +9 -10
- package/dist/node_modules/lodash-es/_mapCacheDelete.js +6 -7
- package/dist/node_modules/lodash-es/_mapCacheGet.js +5 -6
- package/dist/node_modules/lodash-es/_mapCacheHas.js +5 -6
- package/dist/node_modules/lodash-es/_mapCacheSet.js +5 -6
- package/dist/node_modules/lodash-es/_mapToArray.js +3 -4
- package/dist/node_modules/lodash-es/_matchesStrictComparable.js +3 -4
- package/dist/node_modules/lodash-es/_memoizeCapped.js +7 -8
- package/dist/node_modules/lodash-es/_nativeCreate.js +3 -5
- package/dist/node_modules/lodash-es/_nativeKeys.js +3 -5
- package/dist/node_modules/lodash-es/_nativeKeysIn.js +3 -4
- package/dist/node_modules/lodash-es/_nodeUtil.js +4 -6
- package/dist/node_modules/lodash-es/_objectToString.js +5 -6
- package/dist/node_modules/lodash-es/_overArg.js +3 -4
- package/dist/node_modules/lodash-es/_overRest.js +8 -9
- package/dist/node_modules/lodash-es/_root.js +3 -5
- package/dist/node_modules/lodash-es/_safeGet.js +3 -4
- package/dist/node_modules/lodash-es/_setCacheAdd.js +5 -6
- package/dist/node_modules/lodash-es/_setCacheHas.js +3 -4
- package/dist/node_modules/lodash-es/_setToArray.js +3 -4
- package/dist/node_modules/lodash-es/_setToString.js +4 -6
- package/dist/node_modules/lodash-es/_shortOut.js +6 -7
- package/dist/node_modules/lodash-es/_stackClear.js +5 -6
- package/dist/node_modules/lodash-es/_stackDelete.js +3 -4
- package/dist/node_modules/lodash-es/_stackGet.js +3 -4
- package/dist/node_modules/lodash-es/_stackHas.js +3 -4
- package/dist/node_modules/lodash-es/_stackSet.js +10 -11
- package/dist/node_modules/lodash-es/_strictIndexOf.js +3 -4
- package/dist/node_modules/lodash-es/_stringSize.js +7 -8
- package/dist/node_modules/lodash-es/_stringToPath.js +5 -7
- package/dist/node_modules/lodash-es/_toKey.js +7 -8
- package/dist/node_modules/lodash-es/_toSource.js +7 -8
- package/dist/node_modules/lodash-es/_trimmedEndIndex.js +5 -6
- package/dist/node_modules/lodash-es/_unicodeSize.js +16 -17
- package/dist/node_modules/lodash-es/clone.js +6 -7
- package/dist/node_modules/lodash-es/cloneDeep.js +6 -7
- package/dist/node_modules/lodash-es/constant.js +3 -4
- package/dist/node_modules/lodash-es/defaults.js +11 -13
- package/dist/node_modules/lodash-es/eq.js +3 -4
- package/dist/node_modules/lodash-es/filter.js +8 -9
- package/dist/node_modules/lodash-es/find.js +4 -6
- package/dist/node_modules/lodash-es/findIndex.js +9 -10
- package/dist/node_modules/lodash-es/flatMap.js +6 -7
- package/dist/node_modules/lodash-es/flatten.js +5 -6
- package/dist/node_modules/lodash-es/forEach.js +8 -9
- package/dist/node_modules/lodash-es/forIn.js +7 -8
- package/dist/node_modules/lodash-es/forOwn.js +6 -7
- package/dist/node_modules/lodash-es/get.js +5 -6
- package/dist/node_modules/lodash-es/has.js +6 -7
- package/dist/node_modules/lodash-es/hasIn.js +6 -7
- package/dist/node_modules/lodash-es/identity.js +3 -4
- package/dist/node_modules/lodash-es/isArguments.js +6 -8
- package/dist/node_modules/lodash-es/isArray.js +2 -4
- package/dist/node_modules/lodash-es/isArrayLike.js +6 -7
- package/dist/node_modules/lodash-es/isArrayLikeObject.js +6 -7
- package/dist/node_modules/lodash-es/isBuffer.js +4 -6
- package/dist/node_modules/lodash-es/isEmpty.js +17 -18
- package/dist/node_modules/lodash-es/isFunction.js +9 -10
- package/dist/node_modules/lodash-es/isLength.js +5 -6
- package/dist/node_modules/lodash-es/isMap.js +5 -7
- package/dist/node_modules/lodash-es/isObject.js +3 -4
- package/dist/node_modules/lodash-es/isObjectLike.js +3 -4
- package/dist/node_modules/lodash-es/isPlainObject.js +12 -13
- package/dist/node_modules/lodash-es/isSet.js +5 -7
- package/dist/node_modules/lodash-es/isString.js +8 -9
- package/dist/node_modules/lodash-es/isSymbol.js +7 -8
- package/dist/node_modules/lodash-es/isTypedArray.js +5 -7
- package/dist/node_modules/lodash-es/isUndefined.js +3 -4
- package/dist/node_modules/lodash-es/keys.js +7 -8
- package/dist/node_modules/lodash-es/keysIn.js +7 -8
- package/dist/node_modules/lodash-es/last.js +3 -4
- package/dist/node_modules/lodash-es/map.js +8 -9
- package/dist/node_modules/lodash-es/mapValues.js +8 -9
- package/dist/node_modules/lodash-es/max.js +7 -8
- package/dist/node_modules/lodash-es/memoize.js +8 -9
- package/dist/node_modules/lodash-es/merge.js +5 -7
- package/dist/node_modules/lodash-es/min.js +7 -8
- package/dist/node_modules/lodash-es/minBy.js +7 -8
- package/dist/node_modules/lodash-es/noop.js +3 -4
- package/dist/node_modules/lodash-es/now.js +4 -6
- package/dist/node_modules/lodash-es/pick.js +5 -7
- package/dist/node_modules/lodash-es/property.js +8 -9
- package/dist/node_modules/lodash-es/range.js +3 -5
- package/dist/node_modules/lodash-es/reduce.js +10 -11
- package/dist/node_modules/lodash-es/size.js +12 -13
- package/dist/node_modules/lodash-es/sortBy.js +7 -9
- package/dist/node_modules/lodash-es/stubArray.js +3 -4
- package/dist/node_modules/lodash-es/stubFalse.js +3 -4
- package/dist/node_modules/lodash-es/toFinite.js +6 -7
- package/dist/node_modules/lodash-es/toInteger.js +5 -6
- package/dist/node_modules/lodash-es/toNumber.js +13 -14
- package/dist/node_modules/lodash-es/toPlainObject.js +6 -7
- package/dist/node_modules/lodash-es/toString.js +5 -6
- package/dist/node_modules/lodash-es/union.js +7 -9
- package/dist/node_modules/lodash-es/uniqBy.js +6 -7
- package/dist/node_modules/lodash-es/uniqueId.js +7 -8
- package/dist/node_modules/lodash-es/values.js +6 -7
- package/dist/node_modules/lodash-es/zipObject.js +6 -7
- package/dist/node_modules/longest-streak/index.js +2 -4
- package/dist/node_modules/markdown-table/index.js +9 -11
- package/dist/node_modules/marked/lib/marked.esm.js +685 -687
- package/dist/node_modules/mdast-util-find-and-replace/lib/index.js +12 -14
- package/dist/node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js +2 -4
- package/dist/node_modules/mdast-util-from-markdown/lib/index.js +180 -182
- package/dist/node_modules/mdast-util-gfm/lib/index.js +18 -20
- package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +67 -69
- package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js +45 -47
- package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js +13 -15
- package/dist/node_modules/mdast-util-gfm-table/lib/index.js +28 -30
- package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js +14 -16
- package/dist/node_modules/mdast-util-math/lib/index.js +13 -15
- package/dist/node_modules/mdast-util-phrasing/lib/index.js +3 -5
- package/dist/node_modules/mdast-util-to-hast/lib/footer.js +9 -11
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +2 -4
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +2 -4
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +2 -4
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +2 -4
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +2 -4
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +4 -6
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +2 -4
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +2 -4
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +6 -8
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +4 -6
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +53 -55
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +2 -4
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +6 -8
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +4 -6
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +13 -15
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +2 -4
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +2 -4
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +2 -4
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +2 -4
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +2 -4
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +2 -4
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +4 -6
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +4 -6
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +2 -4
- package/dist/node_modules/mdast-util-to-hast/lib/index.js +6 -8
- package/dist/node_modules/mdast-util-to-hast/lib/revert.js +2 -4
- package/dist/node_modules/mdast-util-to-hast/lib/state.js +59 -61
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +4 -6
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.js +4 -6
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.js +16 -18
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/definition.js +4 -6
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +12 -14
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.js +6 -8
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/html.js +4 -6
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +4 -6
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image.js +6 -8
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/index.js +41 -43
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +5 -7
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +4 -6
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.js +9 -11
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +5 -7
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list.js +10 -12
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +2 -4
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.js +4 -6
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.js +12 -14
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.js +2 -4
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +5 -7
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +2 -4
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +4 -6
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +2 -4
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +2 -4
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +2 -4
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +2 -4
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +2 -4
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +2 -4
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +2 -4
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +2 -4
- package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js +2 -4
- package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +4 -6
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +2 -4
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +7 -8
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +4 -6
- package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +4 -6
- package/dist/node_modules/mdast-util-to-string/lib/index.js +12 -14
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-Q4EWVU46.js +374 -378
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-DXYQGD6D.js +1347 -1349
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AHTNJAMY.js +549 -555
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-336JU56O.js +38 -40
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-426QAEUC.js +7 -9
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.js +4 -6
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-4TB4RGXK.js +198 -204
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js +5 -7
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5FUZZQ4R.js +2345 -2347
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5PVQY5BW.js +253 -257
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.js +20 -22
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-BSJP7CBP.js +35 -37
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-EDXVE4YY.js +15 -17
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ENJZ2VHE.js +344 -346
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-FMBD7UC4.js +3 -5
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICPOFSXX.js +718 -746
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-OYMX7WX6.js +588 -594
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.js +4 -8
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U2HBQHQK.js +204 -206
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-X2U36JSP.js +37 -39
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-XPW4576I.js +891 -893
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-YZCP3GAM.js +37 -39
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ZZ45TVLE.js +13 -15
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-6PBFFD2Q.js +9 -11
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-HSJHXN6E.js +9 -11
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +114 -116
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/dagre-KV5264BT.js +188 -190
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5BDNPKRD.js +70 -72
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-G4DWMVQ6.js +185 -189
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-MMDJMWI5.js +154 -156
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-TYMM5635.js +72 -76
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-SMLLAGMA.js +75 -79
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-DWJPFMVM.js +896 -900
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-T4ZO3ILL.js +685 -687
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-UUTBAWPF.js +569 -571
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-42DDH7IO.js +15 -17
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ishikawaDiagram-UXIWVN3A.js +304 -308
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-VCZTEJTY.js +377 -379
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/kanban-definition-6JOO6SKY.js +114 -116
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-QFDTVHPH.js +87 -91
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-DEJITSTG.js +94 -96
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-34T5L4WZ.js +273 -279
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/requirementDiagram-MS252O5E.js +59 -63
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-XADWPNL6.js +202 -212
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-FGHM5R23.js +564 -568
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-FHFEXIEX.js +155 -157
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-QKLJ7IA2.js +9 -11
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-GMOUNBTQ.js +559 -561
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-DHZGUBPP.js +370 -372
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-NUSXRM2D.js +450 -454
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-5P7HB3ND.js +658 -680
- package/dist/node_modules/mermaid/dist/mermaid.core.js +430 -434
- package/dist/node_modules/micromark/lib/constructs.js +79 -80
- package/dist/node_modules/micromark/lib/create-tokenizer.js +12 -14
- package/dist/node_modules/micromark/lib/initialize/content.js +7 -9
- package/dist/node_modules/micromark/lib/initialize/document.js +14 -15
- package/dist/node_modules/micromark/lib/initialize/flow.js +7 -9
- package/dist/node_modules/micromark/lib/initialize/text.js +6 -8
- package/dist/node_modules/micromark/lib/parse.js +18 -20
- package/dist/node_modules/micromark/lib/postprocess.js +4 -6
- package/dist/node_modules/micromark/lib/preprocess.js +4 -6
- package/dist/node_modules/micromark-core-commonmark/lib/attention.js +18 -20
- package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +15 -17
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +9 -11
- package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +13 -15
- package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +6 -8
- package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +14 -16
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +21 -22
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +15 -16
- package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +11 -13
- package/dist/node_modules/micromark-core-commonmark/lib/content.js +17 -18
- package/dist/node_modules/micromark-core-commonmark/lib/definition.js +29 -30
- package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +6 -8
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +13 -15
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +67 -68
- package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +64 -66
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +111 -112
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +6 -8
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +6 -8
- package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +6 -8
- package/dist/node_modules/micromark-core-commonmark/lib/list.js +31 -32
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +10 -12
- package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +9 -11
- package/dist/node_modules/micromark-extension-gfm/index.js +14 -16
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +120 -122
- package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +31 -33
- package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +9 -11
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js +4 -6
- package/dist/node_modules/micromark-extension-gfm-table/lib/infer.js +2 -4
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js +34 -36
- package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +18 -20
- package/dist/node_modules/micromark-extension-math/lib/math-flow.js +20 -21
- package/dist/node_modules/micromark-extension-math/lib/math-text.js +9 -11
- package/dist/node_modules/micromark-extension-math/lib/syntax.js +6 -8
- package/dist/node_modules/micromark-factory-destination/index.js +8 -10
- package/dist/node_modules/micromark-factory-label/index.js +5 -7
- package/dist/node_modules/micromark-factory-space/index.js +5 -7
- package/dist/node_modules/micromark-factory-title/index.js +6 -8
- package/dist/node_modules/micromark-factory-whitespace/index.js +5 -7
- package/dist/node_modules/micromark-util-character/index.js +12 -14
- package/dist/node_modules/micromark-util-chunked/index.js +4 -6
- package/dist/node_modules/micromark-util-classify-character/index.js +5 -7
- package/dist/node_modules/micromark-util-combine-extensions/index.js +11 -13
- package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +2 -4
- package/dist/node_modules/micromark-util-decode-string/index.js +9 -11
- package/dist/node_modules/micromark-util-html-tag-name/index.js +2 -4
- package/dist/node_modules/micromark-util-normalize-identifier/index.js +2 -4
- package/dist/node_modules/micromark-util-resolve-all/index.js +2 -4
- package/dist/node_modules/micromark-util-sanitize-uri/index.js +4 -6
- package/dist/node_modules/micromark-util-subtokenize/index.js +8 -10
- package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +8 -10
- package/dist/node_modules/motion/dist/es/react.js +2 -2
- package/dist/node_modules/nanoid/index.browser.js +4 -6
- package/dist/node_modules/nanoid/url-alphabet/index.js +2 -4
- package/dist/node_modules/property-information/index.js +23 -25
- package/dist/node_modules/property-information/lib/aria.js +39 -41
- package/dist/node_modules/property-information/lib/find.js +16 -18
- package/dist/node_modules/property-information/lib/hast-to-react.js +2 -4
- package/dist/node_modules/property-information/lib/html.js +94 -96
- package/dist/node_modules/property-information/lib/normalize.js +2 -4
- package/dist/node_modules/property-information/lib/svg.js +77 -79
- package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js +4 -6
- package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js +2 -4
- package/dist/node_modules/property-information/lib/util/create.js +8 -10
- package/dist/node_modules/property-information/lib/util/defined-info.js +11 -13
- package/dist/node_modules/property-information/lib/util/info.js +3 -5
- package/dist/node_modules/property-information/lib/util/merge.js +4 -6
- package/dist/node_modules/property-information/lib/util/schema.js +3 -5
- package/dist/node_modules/property-information/lib/util/types.js +14 -15
- package/dist/node_modules/property-information/lib/xlink.js +3 -5
- package/dist/node_modules/property-information/lib/xml.js +3 -5
- package/dist/node_modules/property-information/lib/xmlns.js +5 -7
- package/dist/node_modules/rehype-harden/dist/index.js +45 -47
- package/dist/node_modules/rehype-katex/lib/index.js +23 -25
- package/dist/node_modules/rehype-raw/lib/index.js +4 -6
- package/dist/node_modules/rehype-sanitize/lib/index.js +4 -6
- package/dist/node_modules/remark-gfm/lib/index.js +7 -9
- package/dist/node_modules/remark-math/lib/index.js +7 -9
- package/dist/node_modules/remark-parse/lib/index.js +4 -6
- package/dist/node_modules/remark-rehype/lib/index.js +5 -7
- package/dist/node_modules/remend/dist/index.js +324 -326
- package/dist/node_modules/roughjs/bundled/rough.esm.js +875 -877
- package/dist/node_modules/shiki/dist/bundle-full.js +11 -13
- package/dist/node_modules/shiki/dist/{langs-bundle-full-DfKZStlK.js → langs.js} +6 -8
- package/dist/node_modules/shiki/dist/themes.js +4 -6
- package/dist/node_modules/shiki/dist/wasm.js +2 -2
- package/dist/node_modules/space-separated-tokens/index.js +3 -5
- package/dist/node_modules/streamdown/dist/chunk-BO2N2NFS.js +699 -701
- package/dist/node_modules/streamdown/dist/highlighted-body-OFNGDK62.js +8 -10
- package/dist/node_modules/streamdown/dist/index.js +1 -1
- package/dist/node_modules/streamdown/dist/mermaid-GHXKKRXX.js +2 -2
- package/dist/node_modules/streamdown/node_modules/marked/lib/marked.esm.js +712 -709
- package/dist/node_modules/stringify-entities/lib/constant/dangerous.js +2 -4
- package/dist/node_modules/stringify-entities/lib/core.js +16 -18
- package/dist/node_modules/stringify-entities/lib/index.js +5 -7
- package/dist/node_modules/stringify-entities/lib/util/format-smart.js +8 -10
- package/dist/node_modules/stringify-entities/lib/util/to-decimal.js +4 -6
- package/dist/node_modules/stringify-entities/lib/util/to-hexadecimal.js +4 -6
- package/dist/node_modules/stringify-entities/lib/util/to-named.js +12 -14
- package/dist/node_modules/style-to-js/cjs/index.js +7 -9
- package/dist/node_modules/style-to-js/cjs/utilities.js +4 -6
- package/dist/node_modules/style-to-object/cjs/index.js +6 -8
- package/dist/node_modules/stylis/src/Enum.js +2 -4
- package/dist/node_modules/stylis/src/Parser.js +36 -38
- package/dist/node_modules/stylis/src/Serializer.js +15 -17
- package/dist/node_modules/stylis/src/Tokenizer.js +51 -53
- package/dist/node_modules/stylis/src/Utility.js +15 -17
- package/dist/node_modules/trim-lines/index.js +8 -10
- package/dist/node_modules/trough/lib/index.js +4 -6
- package/dist/node_modules/ts-dedent/esm/index.js +2 -4
- package/dist/node_modules/unified/lib/callable-instance.js +2 -4
- package/dist/node_modules/unified/lib/index.js +101 -102
- package/dist/node_modules/unified/node_modules/is-plain-obj/index.js +2 -4
- package/dist/node_modules/unist-util-find-after/lib/index.js +4 -6
- package/dist/node_modules/unist-util-is/lib/index.js +29 -31
- package/dist/node_modules/unist-util-position/lib/index.js +5 -7
- package/dist/node_modules/unist-util-stringify-position/lib/index.js +8 -10
- package/dist/node_modules/unist-util-visit/lib/index.js +4 -6
- package/dist/node_modules/unist-util-visit-parents/lib/color.js +2 -4
- package/dist/node_modules/unist-util-visit-parents/lib/index.js +20 -21
- package/dist/node_modules/uuid/dist/esm-browser/native.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +6 -8
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +5 -7
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -10
- package/dist/node_modules/vaul/dist/index.js +274 -276
- package/dist/node_modules/vfile/lib/index.js +42 -44
- package/dist/node_modules/vfile/lib/minpath.browser.js +20 -22
- package/dist/node_modules/vfile/lib/minproc.browser.js +3 -5
- package/dist/node_modules/vfile/lib/minurl.browser.js +6 -8
- package/dist/node_modules/vfile/lib/minurl.shared.js +2 -4
- package/dist/node_modules/vfile-location/lib/index.js +5 -7
- package/dist/node_modules/vfile-message/lib/index.js +5 -7
- package/dist/node_modules/vscode-jsonrpc/browser.js +6 -8
- package/dist/node_modules/vscode-jsonrpc/lib/browser/main.js +9 -11
- package/dist/node_modules/vscode-jsonrpc/lib/browser/ril.js +6 -8
- package/dist/node_modules/vscode-jsonrpc/lib/common/api.js +26 -28
- package/dist/node_modules/vscode-jsonrpc/lib/common/cancellation.js +15 -17
- package/dist/node_modules/vscode-jsonrpc/lib/common/connection.js +11 -13
- package/dist/node_modules/vscode-jsonrpc/lib/common/disposable.js +4 -6
- package/dist/node_modules/vscode-jsonrpc/lib/common/events.js +6 -8
- package/dist/node_modules/vscode-jsonrpc/lib/common/is.js +4 -6
- package/dist/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +4 -6
- package/dist/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +4 -6
- package/dist/node_modules/vscode-jsonrpc/lib/common/messageReader.js +9 -11
- package/dist/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +29 -31
- package/dist/node_modules/vscode-jsonrpc/lib/common/messages.js +6 -8
- package/dist/node_modules/vscode-jsonrpc/lib/common/ral.js +4 -6
- package/dist/node_modules/vscode-jsonrpc/lib/common/semaphore.js +6 -8
- package/dist/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/browser/main.js +8 -10
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/api.js +21 -23
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/connection.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/messages.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +12 -14
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +53 -55
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +8 -10
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +10 -12
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +6 -8
- package/dist/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +4 -6
- package/dist/node_modules/vscode-languageserver-textdocument/lib/esm/main.js +19 -21
- package/dist/node_modules/vscode-languageserver-types/lib/esm/main.js +847 -849
- package/dist/node_modules/vscode-uri/lib/esm/index.js +4 -6
- package/dist/node_modules/web-namespaces/index.js +2 -4
- package/dist/node_modules/zwitch/index.js +5 -7
- package/dist/packages/contracts/dist/enums/index.js +12 -14
- package/dist/packages/contracts/dist/enums/registry.enum.js +4 -6
- package/dist/packages/contracts/dist/enums/sort-order.enum.js +4 -6
- package/dist/packages/contracts/dist/enums/user-type.enum.js +4 -6
- package/dist/packages/contracts/dist/enums/workflow-state.enum.js +4 -6
- package/dist/pages/DashboardPage.js +99 -55
- package/dist/pages/DebugPage.js +17 -12
- package/dist/pages/DebugWorkflowDetailsPage.js +119 -91
- package/dist/pages/DebugWorkflowsPage.js +37 -39
- package/dist/pages/EmbedWorkbenchPage.js +62 -48
- package/dist/pages/PreviewWorkbenchPage.js +324 -243
- package/dist/pages/RunsListPage.js +61 -44
- package/dist/pages/RunsPage.js +48 -31
- package/dist/pages/StudioLandingPage.js +132 -97
- package/dist/pages/WorkbenchPage.js +86 -56
- package/dist/pages/WorkflowDebugPage.js +110 -74
- package/dist/pages/WorkspacePage.js +115 -72
- package/dist/pages/WorkspaceRunsPage.js +70 -43
- package/dist/pages/WorkspacesPage.js +35 -24
- package/dist/providers/ComponentOverridesProvider.js +12 -9
- package/dist/providers/InvalidationEventsProvider.js +35 -33
- package/dist/providers/QueryProvider.js +18 -14
- package/dist/providers/SseProvider.js +29 -28
- package/dist/providers/StudioProvider.js +19 -14
- package/dist/routing/LocalRouter.js +9 -6
- package/dist/services/createApiClient.js +5 -7
- package/dist/services/eventEmitter.js +2 -3
- package/dist/services/index.js +2 -2
- package/dist/types/ai.types.js +5 -7
- package/package.json +33 -33
- package/dist/_virtual/_rolldown/runtime.js +0 -20
- package/dist/frontend/studio/node_modules/lodash/_Symbol.js +0 -9
- package/dist/frontend/studio/node_modules/lodash/_baseGetTag.js +0 -15
- package/dist/frontend/studio/node_modules/lodash/_baseTrim.js +0 -13
- package/dist/frontend/studio/node_modules/lodash/_freeGlobal.js +0 -8
- package/dist/frontend/studio/node_modules/lodash/_getRawTag.js +0 -19
- package/dist/frontend/studio/node_modules/lodash/_objectToString.js +0 -12
- package/dist/frontend/studio/node_modules/lodash/_root.js +0 -10
- package/dist/frontend/studio/node_modules/lodash/_trimmedEndIndex.js +0 -13
- package/dist/frontend/studio/node_modules/lodash/isObject.js +0 -12
- package/dist/frontend/studio/node_modules/lodash/isObjectLike.js +0 -11
- package/dist/frontend/studio/node_modules/lodash/isSymbol.js +0 -14
- package/dist/frontend/studio/node_modules/lodash/now.js +0 -12
- package/dist/frontend/studio/node_modules/lodash/toNumber.js +0 -24
- package/dist/node_modules/@shikijs/primitive/dist/index.js +0 -540
- package/dist/node_modules/shiki/dist/chunk-CtajNgzt.js +0 -17
- package/dist/node_modules/shiki/dist/engine-oniguruma.js +0 -7
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import { ConnectionLineType
|
|
4
|
-
import { createContext
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { createPortal
|
|
7
|
-
import { createWithEqualityFn
|
|
8
|
-
import { shallow
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return K(() => ({
|
|
2
|
+
import cc from "../../../../classcat/index.js";
|
|
3
|
+
import { ConnectionLineType, ConnectionMode, MarkerType, PanOnScrollMode, Position, ResizeControlVariant, SelectionMode, XYDrag, XYHandle, XYMinimap, XYPanZoom, XYResizer, addEdge, adoptUserNodes, areSetsEqual, calculateNodePosition, createMarkerIds, defaultAriaLabelConfig, devWarn, elementSelectionKeys, errorMessages, evaluateAbsolutePosition, fitViewport, getBezierEdgeCenter, getBezierPath, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getDimensions, getEdgeCenter, getEdgePosition, getElementsToRemove, getElevatedEdgeZIndex, getEventPosition, getHandlePosition, getHostForElement, getInternalNodesBounds, getMarkerId, getNodeDimensions, getNodesBounds, getNodesInside, getOverlappingArea, getSmoothStepPath, getStraightPath, getViewportForBounds, handleExpandParent, infiniteExtent, initialConnection, isEdgeBase, isEdgeVisible, isInputDOMNode, isMacOs, isMouseEvent, isNodeBase, isNumeric, isRectObject, mergeAriaLabelConfig, nodeHasDimensions, nodeToRect, panBy, pointToRendererPoint, rendererPointToPoint, snapPosition, updateAbsolutePositions, updateConnectionLookup, updateNodeInternals, withResolvers } from "../../../system/dist/esm/index.js";
|
|
4
|
+
import { createContext, forwardRef, memo, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
5
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { createPortal } from "react-dom";
|
|
7
|
+
import { createWithEqualityFn, useStoreWithEqualityFn } from "zustand/traditional";
|
|
8
|
+
import { shallow } from "zustand/shallow";
|
|
9
|
+
var StoreContext = createContext(null), Provider$1 = StoreContext.Provider, zustandErrorMessage = errorMessages.error001();
|
|
10
|
+
function useStore(e, t) {
|
|
11
|
+
let n = useContext(StoreContext);
|
|
12
|
+
if (n === null) throw Error(zustandErrorMessage);
|
|
13
|
+
return useStoreWithEqualityFn(n, e, t);
|
|
14
|
+
}
|
|
15
|
+
function useStoreApi() {
|
|
16
|
+
let e = useContext(StoreContext);
|
|
17
|
+
if (e === null) throw Error(zustandErrorMessage);
|
|
18
|
+
return useMemo(() => ({
|
|
20
19
|
getState: e.getState,
|
|
21
20
|
setState: e.setState,
|
|
22
21
|
subscribe: e.subscribe
|
|
23
22
|
}), [e]);
|
|
24
23
|
}
|
|
25
|
-
var
|
|
24
|
+
var style = { display: "none" }, ariaLiveStyle = {
|
|
26
25
|
position: "absolute",
|
|
27
26
|
width: 1,
|
|
28
27
|
height: 1,
|
|
@@ -32,35 +31,35 @@ var Pe = { display: "none" }, Fe = {
|
|
|
32
31
|
overflow: "hidden",
|
|
33
32
|
clip: "rect(0px, 0px, 0px, 0px)",
|
|
34
33
|
clipPath: "inset(100%)"
|
|
35
|
-
},
|
|
36
|
-
function
|
|
37
|
-
let t =
|
|
38
|
-
return
|
|
39
|
-
id: `${
|
|
34
|
+
}, ARIA_NODE_DESC_KEY = "react-flow__node-desc", ARIA_EDGE_DESC_KEY = "react-flow__edge-desc", ARIA_LIVE_MESSAGE = "react-flow__aria-live", ariaLiveSelector = (e) => e.ariaLiveMessage, ariaLabelConfigSelector = (e) => e.ariaLabelConfig;
|
|
35
|
+
function AriaLiveMessage({ rfId: e }) {
|
|
36
|
+
let t = useStore(ariaLiveSelector);
|
|
37
|
+
return jsx("div", {
|
|
38
|
+
id: `${ARIA_LIVE_MESSAGE}-${e}`,
|
|
40
39
|
"aria-live": "assertive",
|
|
41
40
|
"aria-atomic": "true",
|
|
42
|
-
style:
|
|
41
|
+
style: ariaLiveStyle,
|
|
43
42
|
children: t
|
|
44
43
|
});
|
|
45
44
|
}
|
|
46
|
-
function
|
|
47
|
-
let n =
|
|
48
|
-
return
|
|
49
|
-
|
|
50
|
-
id: `${
|
|
51
|
-
style
|
|
45
|
+
function A11yDescriptions({ rfId: e, disableKeyboardA11y: t }) {
|
|
46
|
+
let n = useStore(ariaLabelConfigSelector);
|
|
47
|
+
return jsxs(Fragment$1, { children: [
|
|
48
|
+
jsx("div", {
|
|
49
|
+
id: `${ARIA_NODE_DESC_KEY}-${e}`,
|
|
50
|
+
style,
|
|
52
51
|
children: t ? n["node.a11yDescription.default"] : n["node.a11yDescription.keyboardDisabled"]
|
|
53
52
|
}),
|
|
54
|
-
|
|
55
|
-
id: `${
|
|
56
|
-
style
|
|
53
|
+
jsx("div", {
|
|
54
|
+
id: `${ARIA_EDGE_DESC_KEY}-${e}`,
|
|
55
|
+
style,
|
|
57
56
|
children: n["edge.a11yDescription.default"]
|
|
58
57
|
}),
|
|
59
|
-
!t &&
|
|
58
|
+
!t && jsx(AriaLiveMessage, { rfId: e })
|
|
60
59
|
] });
|
|
61
60
|
}
|
|
62
|
-
var
|
|
63
|
-
className:
|
|
61
|
+
var Panel = forwardRef(({ position: t = "top-left", children: n, className: r, style: i, ...a }, o) => jsx("div", {
|
|
62
|
+
className: cc([
|
|
64
63
|
"react-flow__panel",
|
|
65
64
|
r,
|
|
66
65
|
...`${t}`.split("-")
|
|
@@ -70,13 +69,13 @@ var Ue = we(({ position: t = "top-left", children: n, className: r, style: i, ..
|
|
|
70
69
|
...a,
|
|
71
70
|
children: n
|
|
72
71
|
}));
|
|
73
|
-
|
|
74
|
-
function
|
|
75
|
-
return e?.hideAttribution ? null :
|
|
72
|
+
Panel.displayName = "Panel";
|
|
73
|
+
function Attribution({ proOptions: e, position: t = "bottom-right" }) {
|
|
74
|
+
return e?.hideAttribution ? null : jsx(Panel, {
|
|
76
75
|
position: t,
|
|
77
76
|
className: "react-flow__attribution",
|
|
78
77
|
"data-message": "Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",
|
|
79
|
-
children:
|
|
78
|
+
children: jsx("a", {
|
|
80
79
|
href: "https://reactflow.dev",
|
|
81
80
|
target: "_blank",
|
|
82
81
|
rel: "noopener noreferrer",
|
|
@@ -85,7 +84,7 @@ function We({ proOptions: e, position: t = "bottom-right" }) {
|
|
|
85
84
|
})
|
|
86
85
|
});
|
|
87
86
|
}
|
|
88
|
-
var
|
|
87
|
+
var selector$m = (e) => {
|
|
89
88
|
let t = [], n = [];
|
|
90
89
|
for (let [, n] of e.nodeLookup) n.selected && t.push(n.internals.userNode);
|
|
91
90
|
for (let [, t] of e.edgeLookup) t.selected && n.push(t);
|
|
@@ -93,13 +92,13 @@ var Ge = (e) => {
|
|
|
93
92
|
selectedNodes: t,
|
|
94
93
|
selectedEdges: n
|
|
95
94
|
};
|
|
96
|
-
},
|
|
97
|
-
function
|
|
98
|
-
return
|
|
95
|
+
}, selectId = (e) => e.id;
|
|
96
|
+
function areEqual(e, t) {
|
|
97
|
+
return shallow(e.selectedNodes.map(selectId), t.selectedNodes.map(selectId)) && shallow(e.selectedEdges.map(selectId), t.selectedEdges.map(selectId));
|
|
99
98
|
}
|
|
100
|
-
function
|
|
101
|
-
let t =
|
|
102
|
-
return
|
|
99
|
+
function SelectionListenerInner({ onSelectionChange: e }) {
|
|
100
|
+
let t = useStoreApi(), { selectedNodes: n, selectedEdges: r } = useStore(selector$m, areEqual);
|
|
101
|
+
return useEffect(() => {
|
|
103
102
|
let i = {
|
|
104
103
|
nodes: n,
|
|
105
104
|
edges: r
|
|
@@ -111,16 +110,16 @@ function Je({ onSelectionChange: e }) {
|
|
|
111
110
|
e
|
|
112
111
|
]), null;
|
|
113
112
|
}
|
|
114
|
-
var
|
|
115
|
-
function
|
|
116
|
-
let t =
|
|
117
|
-
return e || t ?
|
|
113
|
+
var changeSelector = (e) => !!e.onSelectionChangeHandlers;
|
|
114
|
+
function SelectionListener({ onSelectionChange: e }) {
|
|
115
|
+
let t = useStore(changeSelector);
|
|
116
|
+
return e || t ? jsx(SelectionListenerInner, { onSelectionChange: e }) : null;
|
|
118
117
|
}
|
|
119
|
-
var
|
|
118
|
+
var useIsomorphicLayoutEffect = typeof window < "u" ? useLayoutEffect : useEffect, defaultNodeOrigin = [0, 0], defaultViewport = {
|
|
120
119
|
x: 0,
|
|
121
120
|
y: 0,
|
|
122
121
|
zoom: 1
|
|
123
|
-
},
|
|
122
|
+
}, fieldsToTrack = [.../* @__PURE__ */ "nodes.edges.defaultNodes.defaultEdges.onConnect.onConnectStart.onConnectEnd.onClickConnectStart.onClickConnectEnd.nodesDraggable.autoPanOnNodeFocus.nodesConnectable.nodesFocusable.edgesFocusable.edgesReconnectable.elevateNodesOnSelect.elevateEdgesOnSelect.minZoom.maxZoom.nodeExtent.onNodesChange.onEdgesChange.elementsSelectable.connectionMode.snapGrid.snapToGrid.translateExtent.connectOnClick.defaultEdgeOptions.fitView.fitViewOptions.onNodesDelete.onEdgesDelete.onDelete.onNodeDrag.onNodeDragStart.onNodeDragStop.onSelectionDrag.onSelectionDragStart.onSelectionDragStop.onMoveStart.onMove.onMoveEnd.noPanClassName.nodeOrigin.autoPanOnConnect.autoPanOnNodeDrag.onError.connectionRadius.isValidConnection.selectNodesOnDrag.nodeDragThreshold.connectionDragThreshold.onBeforeDelete.debug.autoPanSpeed.ariaLabelConfig.zIndexMode".split("."), "rfId"], selector$l = (e) => ({
|
|
124
123
|
setNodes: e.setNodes,
|
|
125
124
|
setEdges: e.setEdges,
|
|
126
125
|
setMinZoom: e.setMinZoom,
|
|
@@ -129,70 +128,70 @@ var Ze = typeof window < "u" ? Ee : G, Qe = [0, 0], $e = {
|
|
|
129
128
|
setNodeExtent: e.setNodeExtent,
|
|
130
129
|
reset: e.reset,
|
|
131
130
|
setDefaultNodesAndEdges: e.setDefaultNodesAndEdges
|
|
132
|
-
}),
|
|
133
|
-
translateExtent:
|
|
134
|
-
nodeOrigin:
|
|
131
|
+
}), initPrevValues = {
|
|
132
|
+
translateExtent: infiniteExtent,
|
|
133
|
+
nodeOrigin: defaultNodeOrigin,
|
|
135
134
|
minZoom: .5,
|
|
136
135
|
maxZoom: 2,
|
|
137
136
|
elementsSelectable: !0,
|
|
138
137
|
noPanClassName: "nopan",
|
|
139
138
|
rfId: "1"
|
|
140
139
|
};
|
|
141
|
-
function
|
|
142
|
-
let { setNodes: t, setEdges: n, setMinZoom: r, setMaxZoom: i, setTranslateExtent: a, setNodeExtent: o, reset: s, setDefaultNodesAndEdges: c } =
|
|
143
|
-
|
|
144
|
-
u.current =
|
|
140
|
+
function StoreUpdater(e) {
|
|
141
|
+
let { setNodes: t, setEdges: n, setMinZoom: r, setMaxZoom: i, setTranslateExtent: a, setNodeExtent: o, reset: s, setDefaultNodesAndEdges: c } = useStore(selector$l, shallow), l = useStoreApi();
|
|
142
|
+
useIsomorphicLayoutEffect(() => (c(e.defaultNodes, e.defaultEdges), () => {
|
|
143
|
+
u.current = initPrevValues, s();
|
|
145
144
|
}), []);
|
|
146
|
-
let u =
|
|
147
|
-
return
|
|
148
|
-
for (let s of
|
|
145
|
+
let u = useRef(initPrevValues);
|
|
146
|
+
return useIsomorphicLayoutEffect(() => {
|
|
147
|
+
for (let s of fieldsToTrack) {
|
|
149
148
|
let c = e[s];
|
|
150
|
-
c !== u.current[s] && e[s] !== void 0 && (s === "nodes" ? t(c) : s === "edges" ? n(c) : s === "minZoom" ? r(c) : s === "maxZoom" ? i(c) : s === "translateExtent" ? a(c) : s === "nodeExtent" ? o(c) : s === "ariaLabelConfig" ? l.setState({ ariaLabelConfig:
|
|
149
|
+
c !== u.current[s] && e[s] !== void 0 && (s === "nodes" ? t(c) : s === "edges" ? n(c) : s === "minZoom" ? r(c) : s === "maxZoom" ? i(c) : s === "translateExtent" ? a(c) : s === "nodeExtent" ? o(c) : s === "ariaLabelConfig" ? l.setState({ ariaLabelConfig: mergeAriaLabelConfig(c) }) : s === "fitView" ? l.setState({ fitViewQueued: c }) : s === "fitViewOptions" ? l.setState({ fitViewOptions: c }) : l.setState({ [s]: c }));
|
|
151
150
|
}
|
|
152
151
|
u.current = e;
|
|
153
|
-
},
|
|
152
|
+
}, fieldsToTrack.map((t) => e[t])), null;
|
|
154
153
|
}
|
|
155
|
-
function
|
|
154
|
+
function getMediaQuery() {
|
|
156
155
|
return typeof window > "u" || !window.matchMedia ? null : window.matchMedia("(prefers-color-scheme: dark)");
|
|
157
156
|
}
|
|
158
|
-
function
|
|
159
|
-
let [t, n] =
|
|
160
|
-
return
|
|
157
|
+
function useColorModeClass(e) {
|
|
158
|
+
let [t, n] = useState(e === "system" ? null : e);
|
|
159
|
+
return useEffect(() => {
|
|
161
160
|
if (e !== "system") {
|
|
162
161
|
n(e);
|
|
163
162
|
return;
|
|
164
163
|
}
|
|
165
|
-
let t =
|
|
164
|
+
let t = getMediaQuery(), r = () => n(t?.matches ? "dark" : "light");
|
|
166
165
|
return r(), t?.addEventListener("change", r), () => {
|
|
167
166
|
t?.removeEventListener("change", r);
|
|
168
167
|
};
|
|
169
|
-
}, [e]), t === null ?
|
|
168
|
+
}, [e]), t === null ? getMediaQuery()?.matches ? "dark" : "light" : t;
|
|
170
169
|
}
|
|
171
|
-
var
|
|
172
|
-
function
|
|
173
|
-
target:
|
|
170
|
+
var defaultDoc = typeof document < "u" ? document : null;
|
|
171
|
+
function useKeyPress(e = null, t = {
|
|
172
|
+
target: defaultDoc,
|
|
174
173
|
actInsideInputWithModifier: !0
|
|
175
174
|
}) {
|
|
176
|
-
let [n, r] =
|
|
175
|
+
let [n, r] = useState(!1), i = useRef(!1), a = useRef(/* @__PURE__ */ new Set([])), [o, s] = useMemo(() => {
|
|
177
176
|
if (e !== null) {
|
|
178
177
|
let t = (Array.isArray(e) ? e : [e]).filter((e) => typeof e == "string").map((e) => e.replace("+", "\n").replace("\n\n", "\n+").split("\n"));
|
|
179
178
|
return [t, t.reduce((e, t) => e.concat(...t), [])];
|
|
180
179
|
}
|
|
181
180
|
return [[], []];
|
|
182
181
|
}, [e]);
|
|
183
|
-
return
|
|
184
|
-
let n = t?.target ??
|
|
182
|
+
return useEffect(() => {
|
|
183
|
+
let n = t?.target ?? defaultDoc, c = t?.actInsideInputWithModifier ?? !0;
|
|
185
184
|
if (e !== null) {
|
|
186
185
|
let e = (e) => {
|
|
187
|
-
if (i.current = e.ctrlKey || e.metaKey || e.shiftKey || e.altKey, (!i.current || i.current && !c) &&
|
|
188
|
-
let n =
|
|
189
|
-
if (a.current.add(e[n]),
|
|
186
|
+
if (i.current = e.ctrlKey || e.metaKey || e.shiftKey || e.altKey, (!i.current || i.current && !c) && isInputDOMNode(e)) return !1;
|
|
187
|
+
let n = useKeyOrCode(e.code, s);
|
|
188
|
+
if (a.current.add(e[n]), isMatchingKey(o, a.current, !1)) {
|
|
190
189
|
let n = e.composedPath?.()?.[0] || e.target, a = n?.nodeName === "BUTTON" || n?.nodeName === "A";
|
|
191
190
|
t.preventDefault !== !1 && (i.current || !a) && e.preventDefault(), r(!0);
|
|
192
191
|
}
|
|
193
192
|
}, l = (e) => {
|
|
194
|
-
let t =
|
|
195
|
-
|
|
193
|
+
let t = useKeyOrCode(e.code, s);
|
|
194
|
+
isMatchingKey(o, a.current, !0) ? (r(!1), a.current.clear()) : a.current.delete(e[t]), e.key === "Meta" && a.current.clear(), i.current = !1;
|
|
196
195
|
}, u = () => {
|
|
197
196
|
a.current.clear(), r(!1);
|
|
198
197
|
};
|
|
@@ -202,15 +201,15 @@ function st(e = null, t = {
|
|
|
202
201
|
}
|
|
203
202
|
}, [e, r]), n;
|
|
204
203
|
}
|
|
205
|
-
function
|
|
204
|
+
function isMatchingKey(e, t, n) {
|
|
206
205
|
return e.filter((e) => n || e.length === t.size).some((e) => e.every((e) => t.has(e)));
|
|
207
206
|
}
|
|
208
|
-
function
|
|
207
|
+
function useKeyOrCode(e, t) {
|
|
209
208
|
return t.includes(e) ? "code" : "key";
|
|
210
209
|
}
|
|
211
|
-
var
|
|
212
|
-
let e =
|
|
213
|
-
return
|
|
210
|
+
var useViewportHelper = () => {
|
|
211
|
+
let e = useStoreApi();
|
|
212
|
+
return useMemo(() => ({
|
|
214
213
|
zoomIn: (t) => {
|
|
215
214
|
let { panZoom: n } = e.getState();
|
|
216
215
|
return n ? n.scaleBy(1.2, t) : Promise.resolve(!1);
|
|
@@ -242,7 +241,7 @@ var ut = () => {
|
|
|
242
241
|
},
|
|
243
242
|
setCenter: async (t, n, r) => e.getState().setCenter(t, n, r),
|
|
244
243
|
fitBounds: async (t, n) => {
|
|
245
|
-
let { width: r, height: i, minZoom: a, maxZoom: o, panZoom: s } = e.getState(), c =
|
|
244
|
+
let { width: r, height: i, minZoom: a, maxZoom: o, panZoom: s } = e.getState(), c = getViewportForBounds(t, r, i, a, o, n?.padding ?? .1);
|
|
246
245
|
return s ? (await s.setViewport(c, {
|
|
247
246
|
duration: n?.duration,
|
|
248
247
|
ease: n?.ease,
|
|
@@ -256,12 +255,12 @@ var ut = () => {
|
|
|
256
255
|
x: t.x - s,
|
|
257
256
|
y: t.y - c
|
|
258
257
|
}, u = n.snapGrid ?? i;
|
|
259
|
-
return
|
|
258
|
+
return pointToRendererPoint(l, r, n.snapToGrid ?? a, u);
|
|
260
259
|
},
|
|
261
260
|
flowToScreenPosition: (t) => {
|
|
262
261
|
let { transform: n, domNode: r } = e.getState();
|
|
263
262
|
if (!r) return t;
|
|
264
|
-
let { x: i, y: a } = r.getBoundingClientRect(), o =
|
|
263
|
+
let { x: i, y: a } = r.getBoundingClientRect(), o = rendererPointToPoint(t, n);
|
|
265
264
|
return {
|
|
266
265
|
x: o.x + i,
|
|
267
266
|
y: o.y + a
|
|
@@ -269,7 +268,7 @@ var ut = () => {
|
|
|
269
268
|
}
|
|
270
269
|
}), []);
|
|
271
270
|
};
|
|
272
|
-
function
|
|
271
|
+
function applyChanges(e, t) {
|
|
273
272
|
let n = [], r = /* @__PURE__ */ new Map(), i = [];
|
|
274
273
|
for (let t of e) if (t.type === "add") {
|
|
275
274
|
i.push(t);
|
|
@@ -291,14 +290,14 @@ function dt(e, t) {
|
|
|
291
290
|
continue;
|
|
292
291
|
}
|
|
293
292
|
let i = { ...e };
|
|
294
|
-
for (let e of t)
|
|
293
|
+
for (let e of t) applyChange(e, i);
|
|
295
294
|
n.push(i);
|
|
296
295
|
}
|
|
297
296
|
return i.length && i.forEach((e) => {
|
|
298
297
|
e.index === void 0 ? n.push({ ...e.item }) : n.splice(e.index, 0, { ...e.item });
|
|
299
298
|
}), n;
|
|
300
299
|
}
|
|
301
|
-
function
|
|
300
|
+
function applyChange(e, t) {
|
|
302
301
|
switch (e.type) {
|
|
303
302
|
case "select":
|
|
304
303
|
t.selected = e.selected;
|
|
@@ -311,28 +310,28 @@ function ft(e, t) {
|
|
|
311
310
|
break;
|
|
312
311
|
}
|
|
313
312
|
}
|
|
314
|
-
function
|
|
315
|
-
return
|
|
313
|
+
function applyNodeChanges(e, t) {
|
|
314
|
+
return applyChanges(e, t);
|
|
316
315
|
}
|
|
317
|
-
function
|
|
318
|
-
return
|
|
316
|
+
function applyEdgeChanges(e, t) {
|
|
317
|
+
return applyChanges(e, t);
|
|
319
318
|
}
|
|
320
|
-
function
|
|
319
|
+
function createSelectionChange(e, t) {
|
|
321
320
|
return {
|
|
322
321
|
id: e,
|
|
323
322
|
type: "select",
|
|
324
323
|
selected: t
|
|
325
324
|
};
|
|
326
325
|
}
|
|
327
|
-
function
|
|
326
|
+
function getSelectionChanges(e, t = /* @__PURE__ */ new Set(), n = !1) {
|
|
328
327
|
let r = [];
|
|
329
328
|
for (let [i, a] of e) {
|
|
330
329
|
let e = t.has(i);
|
|
331
|
-
!(a.selected === void 0 && !e) && a.selected !== e && (n && (a.selected = e), r.push(
|
|
330
|
+
!(a.selected === void 0 && !e) && a.selected !== e && (n && (a.selected = e), r.push(createSelectionChange(a.id, e)));
|
|
332
331
|
}
|
|
333
332
|
return r;
|
|
334
333
|
}
|
|
335
|
-
function
|
|
334
|
+
function getElementsDiffChanges({ items: e = [], lookup: t }) {
|
|
336
335
|
let n = [], r = new Map(e.map((e) => [e.id, e]));
|
|
337
336
|
for (let [r, i] of e.entries()) {
|
|
338
337
|
let e = t.get(i.id), a = e?.internals?.userNode ?? e;
|
|
@@ -352,24 +351,24 @@ function _t({ items: e = [], lookup: t }) {
|
|
|
352
351
|
});
|
|
353
352
|
return n;
|
|
354
353
|
}
|
|
355
|
-
function
|
|
354
|
+
function elementToRemoveChange(e) {
|
|
356
355
|
return {
|
|
357
356
|
id: e.id,
|
|
358
357
|
type: "remove"
|
|
359
358
|
};
|
|
360
359
|
}
|
|
361
|
-
var
|
|
362
|
-
function
|
|
363
|
-
return
|
|
360
|
+
var isNode = (e) => isNodeBase(e), isEdge = (e) => isEdgeBase(e);
|
|
361
|
+
function fixedForwardRef(e) {
|
|
362
|
+
return forwardRef(e);
|
|
364
363
|
}
|
|
365
|
-
function
|
|
366
|
-
let [t, n] =
|
|
367
|
-
return
|
|
364
|
+
function useQueue(e) {
|
|
365
|
+
let [t, n] = useState(BigInt(0)), [r] = useState(() => createQueue(() => n((e) => e + BigInt(1))));
|
|
366
|
+
return useIsomorphicLayoutEffect(() => {
|
|
368
367
|
let t = r.get();
|
|
369
368
|
t.length && (e(t), r.reset());
|
|
370
369
|
}, [t]), r;
|
|
371
370
|
}
|
|
372
|
-
function
|
|
371
|
+
function createQueue(e) {
|
|
373
372
|
let t = [];
|
|
374
373
|
return {
|
|
375
374
|
get: () => t,
|
|
@@ -381,12 +380,12 @@ function Ct(e) {
|
|
|
381
380
|
}
|
|
382
381
|
};
|
|
383
382
|
}
|
|
384
|
-
var
|
|
385
|
-
function
|
|
386
|
-
let t =
|
|
383
|
+
var BatchContext = createContext(null);
|
|
384
|
+
function BatchProvider({ children: e }) {
|
|
385
|
+
let t = useStoreApi(), n = useQueue(useCallback((e) => {
|
|
387
386
|
let { nodes: n = [], setNodes: r, hasDefaultNodes: i, onNodesChange: a, nodeLookup: o, fitViewQueued: s, onNodesChangeMiddlewareMap: c } = t.getState(), l = n;
|
|
388
387
|
for (let t of e) l = typeof t == "function" ? t(l) : t;
|
|
389
|
-
let u =
|
|
388
|
+
let u = getElementsDiffChanges({
|
|
390
389
|
items: l,
|
|
391
390
|
lookup: o
|
|
392
391
|
});
|
|
@@ -395,37 +394,37 @@ function Tt({ children: e }) {
|
|
|
395
394
|
let { fitViewQueued: e, nodes: n, setNodes: r } = t.getState();
|
|
396
395
|
e && r(n);
|
|
397
396
|
});
|
|
398
|
-
}, [])), r =
|
|
397
|
+
}, [])), r = useQueue(useCallback((e) => {
|
|
399
398
|
let { edges: n = [], setEdges: r, hasDefaultEdges: i, onEdgesChange: a, edgeLookup: o } = t.getState(), s = n;
|
|
400
399
|
for (let t of e) s = typeof t == "function" ? t(s) : t;
|
|
401
|
-
i ? r(s) : a && a(
|
|
400
|
+
i ? r(s) : a && a(getElementsDiffChanges({
|
|
402
401
|
items: s,
|
|
403
402
|
lookup: o
|
|
404
403
|
}));
|
|
405
|
-
}, [])), i =
|
|
404
|
+
}, [])), i = useMemo(() => ({
|
|
406
405
|
nodeQueue: n,
|
|
407
406
|
edgeQueue: r
|
|
408
407
|
}), []);
|
|
409
|
-
return
|
|
408
|
+
return jsx(BatchContext.Provider, {
|
|
410
409
|
value: i,
|
|
411
410
|
children: e
|
|
412
411
|
});
|
|
413
412
|
}
|
|
414
|
-
function
|
|
415
|
-
let e =
|
|
413
|
+
function useBatchContext() {
|
|
414
|
+
let e = useContext(BatchContext);
|
|
416
415
|
if (!e) throw Error("useBatchContext must be used within a BatchProvider");
|
|
417
416
|
return e;
|
|
418
417
|
}
|
|
419
|
-
var
|
|
420
|
-
function
|
|
421
|
-
let e =
|
|
418
|
+
var selector$k = (e) => !!e.panZoom;
|
|
419
|
+
function useReactFlow() {
|
|
420
|
+
let e = useViewportHelper(), t = useStoreApi(), n = useBatchContext(), r = useStore(selector$k), i = useMemo(() => {
|
|
422
421
|
let e = (e) => t.getState().nodeLookup.get(e), r = (e) => {
|
|
423
422
|
n.nodeQueue.push(e);
|
|
424
423
|
}, i = (e) => {
|
|
425
424
|
n.edgeQueue.push(e);
|
|
426
425
|
}, a = (e) => {
|
|
427
|
-
let { nodeLookup: n, nodeOrigin: r } = t.getState(), i =
|
|
428
|
-
return
|
|
426
|
+
let { nodeLookup: n, nodeOrigin: r } = t.getState(), i = isNode(e) ? e : n.get(e.id), a = i.parentId ? evaluateAbsolutePosition(i.position, i.measured, i.parentId, n, r) : i.position;
|
|
427
|
+
return nodeToRect({
|
|
429
428
|
...i,
|
|
430
429
|
position: a,
|
|
431
430
|
width: i.measured?.width ?? i.width,
|
|
@@ -435,7 +434,7 @@ function Ot() {
|
|
|
435
434
|
r((r) => r.map((r) => {
|
|
436
435
|
if (r.id === e) {
|
|
437
436
|
let e = typeof t == "function" ? t(r) : t;
|
|
438
|
-
return n.replace &&
|
|
437
|
+
return n.replace && isNode(e) ? e : {
|
|
439
438
|
...r,
|
|
440
439
|
...e
|
|
441
440
|
};
|
|
@@ -446,7 +445,7 @@ function Ot() {
|
|
|
446
445
|
i((r) => r.map((r) => {
|
|
447
446
|
if (r.id === e) {
|
|
448
447
|
let e = typeof t == "function" ? t(r) : t;
|
|
449
|
-
return n.replace &&
|
|
448
|
+
return n.replace && isEdge(e) ? e : {
|
|
450
449
|
...r,
|
|
451
450
|
...e
|
|
452
451
|
};
|
|
@@ -486,7 +485,7 @@ function Ot() {
|
|
|
486
485
|
};
|
|
487
486
|
},
|
|
488
487
|
deleteElements: async ({ nodes: e = [], edges: n = [] }) => {
|
|
489
|
-
let { nodes: r, edges: i, onNodesDelete: a, onEdgesDelete: o, triggerNodeChanges: s, triggerEdgeChanges: c, onDelete: l, onBeforeDelete: u } = t.getState(), { nodes: d, edges: f } = await
|
|
488
|
+
let { nodes: r, edges: i, onNodesDelete: a, onEdgesDelete: o, triggerNodeChanges: s, triggerEdgeChanges: c, onDelete: l, onBeforeDelete: u } = t.getState(), { nodes: d, edges: f } = await getElementsToRemove({
|
|
490
489
|
nodesToRemove: e,
|
|
491
490
|
edgesToRemove: n,
|
|
492
491
|
nodes: r,
|
|
@@ -494,11 +493,11 @@ function Ot() {
|
|
|
494
493
|
onBeforeDelete: u
|
|
495
494
|
}), p = f.length > 0, m = d.length > 0;
|
|
496
495
|
if (p) {
|
|
497
|
-
let e = f.map(
|
|
496
|
+
let e = f.map(elementToRemoveChange);
|
|
498
497
|
o?.(f), c(e);
|
|
499
498
|
}
|
|
500
499
|
if (m) {
|
|
501
|
-
let e = d.map(
|
|
500
|
+
let e = d.map(elementToRemoveChange);
|
|
502
501
|
a?.(d), s(e);
|
|
503
502
|
}
|
|
504
503
|
return (m || p) && l?.({
|
|
@@ -510,18 +509,18 @@ function Ot() {
|
|
|
510
509
|
};
|
|
511
510
|
},
|
|
512
511
|
getIntersectingNodes: (e, n = !0, r) => {
|
|
513
|
-
let i =
|
|
512
|
+
let i = isRectObject(e), o = i ? e : a(e), s = r !== void 0;
|
|
514
513
|
return o ? (r || t.getState().nodes).filter((r) => {
|
|
515
514
|
let a = t.getState().nodeLookup.get(r.id);
|
|
516
515
|
if (a && !i && (r.id === e.id || !a.internals.positionAbsolute)) return !1;
|
|
517
|
-
let c =
|
|
516
|
+
let c = nodeToRect(s ? r : a), l = getOverlappingArea(c, o);
|
|
518
517
|
return n && l > 0 || l >= c.width * c.height || l >= o.width * o.height;
|
|
519
518
|
}) : [];
|
|
520
519
|
},
|
|
521
520
|
isNodeIntersecting: (e, t, n = !0) => {
|
|
522
|
-
let r =
|
|
521
|
+
let r = isRectObject(e) ? e : a(e);
|
|
523
522
|
if (!r) return !1;
|
|
524
|
-
let i =
|
|
523
|
+
let i = getOverlappingArea(r, t);
|
|
525
524
|
return n && i > 0 || i >= t.width * t.height || i >= r.width * r.height;
|
|
526
525
|
},
|
|
527
526
|
updateNode: o,
|
|
@@ -558,7 +557,7 @@ function Ot() {
|
|
|
558
557
|
},
|
|
559
558
|
getNodesBounds: (e) => {
|
|
560
559
|
let { nodeLookup: n, nodeOrigin: r } = t.getState();
|
|
561
|
-
return
|
|
560
|
+
return getNodesBounds(e, {
|
|
562
561
|
nodeLookup: n,
|
|
563
562
|
nodeOrigin: r
|
|
564
563
|
});
|
|
@@ -566,7 +565,7 @@ function Ot() {
|
|
|
566
565
|
getHandleConnections: ({ type: e, id: n, nodeId: r }) => Array.from(t.getState().connectionLookup.get(`${r}-${e}${n ? `-${n}` : ""}`)?.values() ?? []),
|
|
567
566
|
getNodeConnections: ({ type: e, handleId: n, nodeId: r }) => Array.from(t.getState().connectionLookup.get(`${r}${e ? n ? `-${e}-${n}` : `-${e}` : ""}`)?.values() ?? []),
|
|
568
567
|
fitView: async (e) => {
|
|
569
|
-
let r = t.getState().fitViewResolver ??
|
|
568
|
+
let r = t.getState().fitViewResolver ?? withResolvers();
|
|
570
569
|
return t.setState({
|
|
571
570
|
fitViewQueued: !0,
|
|
572
571
|
fitViewOptions: e,
|
|
@@ -575,34 +574,34 @@ function Ot() {
|
|
|
575
574
|
}
|
|
576
575
|
};
|
|
577
576
|
}, []);
|
|
578
|
-
return
|
|
577
|
+
return useMemo(() => ({
|
|
579
578
|
...i,
|
|
580
579
|
...e,
|
|
581
580
|
viewportInitialized: r
|
|
582
581
|
}), [r]);
|
|
583
582
|
}
|
|
584
|
-
var
|
|
585
|
-
function
|
|
586
|
-
let n =
|
|
587
|
-
|
|
583
|
+
var selected = (e) => e.selected, win$1 = typeof window < "u" ? window : void 0;
|
|
584
|
+
function useGlobalKeyHandler({ deleteKeyCode: e, multiSelectionKeyCode: t }) {
|
|
585
|
+
let n = useStoreApi(), { deleteElements: r } = useReactFlow(), i = useKeyPress(e, { actInsideInputWithModifier: !1 }), a = useKeyPress(t, { target: win$1 });
|
|
586
|
+
useEffect(() => {
|
|
588
587
|
if (i) {
|
|
589
588
|
let { edges: e, nodes: t } = n.getState();
|
|
590
589
|
r({
|
|
591
|
-
nodes: t.filter(
|
|
592
|
-
edges: e.filter(
|
|
590
|
+
nodes: t.filter(selected),
|
|
591
|
+
edges: e.filter(selected)
|
|
593
592
|
}), n.setState({ nodesSelectionActive: !1 });
|
|
594
593
|
}
|
|
595
|
-
}, [i]),
|
|
594
|
+
}, [i]), useEffect(() => {
|
|
596
595
|
n.setState({ multiSelectionActive: a });
|
|
597
596
|
}, [a]);
|
|
598
597
|
}
|
|
599
|
-
function
|
|
600
|
-
let t =
|
|
601
|
-
|
|
598
|
+
function useResizeHandler(e) {
|
|
599
|
+
let t = useStoreApi();
|
|
600
|
+
useEffect(() => {
|
|
602
601
|
let n = () => {
|
|
603
602
|
if (!e.current || !(e.current.checkVisibility?.() ?? !0)) return !1;
|
|
604
|
-
let n =
|
|
605
|
-
(n.height === 0 || n.width === 0) && t.getState().onError?.("004",
|
|
603
|
+
let n = getDimensions(e.current);
|
|
604
|
+
(n.height === 0 || n.width === 0) && t.getState().onError?.("004", errorMessages.error004()), t.setState({
|
|
606
605
|
width: n.width || 500,
|
|
607
606
|
height: n.height || 500
|
|
608
607
|
});
|
|
@@ -616,30 +615,30 @@ function Mt(e) {
|
|
|
616
615
|
}
|
|
617
616
|
}, []);
|
|
618
617
|
}
|
|
619
|
-
var
|
|
618
|
+
var containerStyle = {
|
|
620
619
|
position: "absolute",
|
|
621
620
|
width: "100%",
|
|
622
621
|
height: "100%",
|
|
623
622
|
top: 0,
|
|
624
623
|
left: 0
|
|
625
|
-
},
|
|
624
|
+
}, selector$j = (e) => ({
|
|
626
625
|
userSelectionActive: e.userSelectionActive,
|
|
627
626
|
lib: e.lib,
|
|
628
627
|
connectionInProgress: e.connection.inProgress
|
|
629
628
|
});
|
|
630
|
-
function
|
|
631
|
-
let C =
|
|
632
|
-
|
|
633
|
-
let A =
|
|
629
|
+
function ZoomPane({ onPaneContextMenu: e, zoomOnScroll: t = !0, zoomOnPinch: n = !0, panOnScroll: r = !1, panOnScrollSpeed: a = .5, panOnScrollMode: o = PanOnScrollMode.Free, zoomOnDoubleClick: s = !0, panOnDrag: c = !0, defaultViewport: l, translateExtent: u, minZoom: f, maxZoom: p, zoomActivationKeyCode: m, preventScrolling: h = !0, children: g, noWheelClassName: _, noPanClassName: v, onViewportChange: y, isControlledViewport: b, paneClickDistance: x, selectionOnDrag: S }) {
|
|
630
|
+
let C = useStoreApi(), w = useRef(null), { userSelectionActive: T, lib: E, connectionInProgress: D } = useStore(selector$j, shallow), O = useKeyPress(m), k = useRef();
|
|
631
|
+
useResizeHandler(w);
|
|
632
|
+
let A = useCallback((e) => {
|
|
634
633
|
y?.({
|
|
635
634
|
x: e[0],
|
|
636
635
|
y: e[1],
|
|
637
636
|
zoom: e[2]
|
|
638
637
|
}), b || C.setState({ transform: e });
|
|
639
638
|
}, [y, b]);
|
|
640
|
-
return
|
|
639
|
+
return useEffect(() => {
|
|
641
640
|
if (w.current) {
|
|
642
|
-
k.current =
|
|
641
|
+
k.current = XYPanZoom({
|
|
643
642
|
domNode: w.current,
|
|
644
643
|
minZoom: f,
|
|
645
644
|
maxZoom: p,
|
|
@@ -672,7 +671,7 @@ function Ft({ onPaneContextMenu: e, zoomOnScroll: t = !0, zoomOnPinch: n = !0, p
|
|
|
672
671
|
k.current?.destroy();
|
|
673
672
|
};
|
|
674
673
|
}
|
|
675
|
-
}, []),
|
|
674
|
+
}, []), useEffect(() => {
|
|
676
675
|
k.current?.update({
|
|
677
676
|
onPaneContextMenu: e,
|
|
678
677
|
zoomOnScroll: t,
|
|
@@ -712,20 +711,20 @@ function Ft({ onPaneContextMenu: e, zoomOnScroll: t = !0, zoomOnPinch: n = !0, p
|
|
|
712
711
|
D,
|
|
713
712
|
S,
|
|
714
713
|
x
|
|
715
|
-
]),
|
|
714
|
+
]), jsx("div", {
|
|
716
715
|
className: "react-flow__renderer",
|
|
717
716
|
ref: w,
|
|
718
|
-
style:
|
|
717
|
+
style: containerStyle,
|
|
719
718
|
children: g
|
|
720
719
|
});
|
|
721
720
|
}
|
|
722
|
-
var
|
|
721
|
+
var selector$i = (e) => ({
|
|
723
722
|
userSelectionActive: e.userSelectionActive,
|
|
724
723
|
userSelectionRect: e.userSelectionRect
|
|
725
724
|
});
|
|
726
|
-
function
|
|
727
|
-
let { userSelectionActive: e, userSelectionRect: t } =
|
|
728
|
-
return e && t ?
|
|
725
|
+
function UserSelection() {
|
|
726
|
+
let { userSelectionActive: e, userSelectionRect: t } = useStore(selector$i, shallow);
|
|
727
|
+
return e && t ? jsx("div", {
|
|
729
728
|
className: "react-flow__selection react-flow__container",
|
|
730
729
|
style: {
|
|
731
730
|
width: t.width,
|
|
@@ -734,16 +733,16 @@ function Lt() {
|
|
|
734
733
|
}
|
|
735
734
|
}) : null;
|
|
736
735
|
}
|
|
737
|
-
var
|
|
736
|
+
var wrapHandler = (e, t) => (n) => {
|
|
738
737
|
n.target === t.current && e?.(n);
|
|
739
|
-
},
|
|
738
|
+
}, selector$h = (e) => ({
|
|
740
739
|
userSelectionActive: e.userSelectionActive,
|
|
741
740
|
elementsSelectable: e.elementsSelectable,
|
|
742
741
|
connectionInProgress: e.connection.inProgress,
|
|
743
742
|
dragging: e.paneDragging
|
|
744
743
|
});
|
|
745
|
-
function
|
|
746
|
-
let v =
|
|
744
|
+
function Pane({ isSelecting: t, selectionKeyPressed: n, selectionMode: r = SelectionMode.Full, panOnDrag: i, paneClickDistance: a, selectionOnDrag: o, onSelectionStart: c, onSelectionEnd: l, onPaneClick: u, onPaneContextMenu: d, onPaneScroll: f, onPaneMouseEnter: p, onPaneMouseMove: m, onPaneMouseLeave: g, children: _ }) {
|
|
745
|
+
let v = useStoreApi(), { userSelectionActive: y, elementsSelectable: b, dragging: x, connectionInProgress: S } = useStore(selector$h, shallow), C = b && (t || y), w = useRef(null), T = useRef(), E = useRef(/* @__PURE__ */ new Set()), D = useRef(/* @__PURE__ */ new Set()), O = useRef(!1), k = (e) => {
|
|
747
746
|
if (O.current || S) {
|
|
748
747
|
O.current = !1;
|
|
749
748
|
return;
|
|
@@ -756,20 +755,20 @@ function Bt({ isSelecting: t, selectionKeyPressed: n, selectionMode: r = s.Full,
|
|
|
756
755
|
}
|
|
757
756
|
d?.(e);
|
|
758
757
|
}, j = f ? (e) => f(e) : void 0;
|
|
759
|
-
return
|
|
760
|
-
className:
|
|
758
|
+
return jsxs("div", {
|
|
759
|
+
className: cc(["react-flow__pane", {
|
|
761
760
|
draggable: i === !0 || Array.isArray(i) && i.includes(0),
|
|
762
761
|
dragging: x,
|
|
763
762
|
selection: t
|
|
764
763
|
}]),
|
|
765
|
-
onClick: C ? void 0 :
|
|
766
|
-
onContextMenu:
|
|
767
|
-
onWheel:
|
|
764
|
+
onClick: C ? void 0 : wrapHandler(k, w),
|
|
765
|
+
onContextMenu: wrapHandler(A, w),
|
|
766
|
+
onWheel: wrapHandler(j, w),
|
|
768
767
|
onPointerEnter: C ? void 0 : p,
|
|
769
768
|
onPointerMove: C ? (e) => {
|
|
770
769
|
let { userSelectionRect: t, transform: i, nodeLookup: o, edgeLookup: l, connectionLookup: u, triggerNodeChanges: d, triggerEdgeChanges: f, defaultEdgeOptions: p, resetSelectedElements: m } = v.getState();
|
|
771
770
|
if (!T.current || !t) return;
|
|
772
|
-
let { x: g, y: _ } =
|
|
771
|
+
let { x: g, y: _ } = getEventPosition(e.nativeEvent, T.current), { startX: y, startY: b } = t;
|
|
773
772
|
if (!O.current) {
|
|
774
773
|
let t = n ? 0 : a;
|
|
775
774
|
if (Math.hypot(g - y, _ - b) <= t) return;
|
|
@@ -784,7 +783,7 @@ function Bt({ isSelecting: t, selectionKeyPressed: n, selectionMode: r = s.Full,
|
|
|
784
783
|
width: Math.abs(g - y),
|
|
785
784
|
height: Math.abs(_ - b)
|
|
786
785
|
}, S = E.current, C = D.current;
|
|
787
|
-
E.current = new Set(
|
|
786
|
+
E.current = new Set(getNodesInside(o, x, i, r === SelectionMode.Partial, !0).map((e) => e.id)), D.current = /* @__PURE__ */ new Set();
|
|
788
787
|
let w = p?.selectable ?? !0;
|
|
789
788
|
for (let e of E.current) {
|
|
790
789
|
let t = u.get(e);
|
|
@@ -793,7 +792,7 @@ function Bt({ isSelecting: t, selectionKeyPressed: n, selectionMode: r = s.Full,
|
|
|
793
792
|
t && (t.selectable ?? w) && D.current.add(e);
|
|
794
793
|
}
|
|
795
794
|
}
|
|
796
|
-
|
|
795
|
+
areSetsEqual(S, E.current) || d(getSelectionChanges(o, E.current, !0)), areSetsEqual(C, D.current) || f(getSelectionChanges(l, D.current)), v.setState({
|
|
797
796
|
userSelectionRect: x,
|
|
798
797
|
userSelectionActive: !0,
|
|
799
798
|
nodesSelectionActive: !1
|
|
@@ -811,7 +810,7 @@ function Bt({ isSelecting: t, selectionKeyPressed: n, selectionMode: r = s.Full,
|
|
|
811
810
|
let i = e.target === w.current;
|
|
812
811
|
if (!i && e.target.closest(".nokey") || !t || !(o && i || n) || e.button !== 0 || !e.isPrimary) return;
|
|
813
812
|
e.target?.setPointerCapture?.(e.pointerId), O.current = !1;
|
|
814
|
-
let { x: a, y: s } =
|
|
813
|
+
let { x: a, y: s } = getEventPosition(e.nativeEvent, T.current);
|
|
815
814
|
v.setState({ userSelectionRect: {
|
|
816
815
|
width: 0,
|
|
817
816
|
height: 0,
|
|
@@ -826,14 +825,14 @@ function Bt({ isSelecting: t, selectionKeyPressed: n, selectionMode: r = s.Full,
|
|
|
826
825
|
} : void 0,
|
|
827
826
|
onPointerLeave: g,
|
|
828
827
|
ref: w,
|
|
829
|
-
style:
|
|
830
|
-
children: [_,
|
|
828
|
+
style: containerStyle,
|
|
829
|
+
children: [_, jsx(UserSelection, {})]
|
|
831
830
|
});
|
|
832
831
|
}
|
|
833
|
-
function
|
|
832
|
+
function handleNodeClick({ id: e, store: t, unselect: n = !1, nodeRef: r }) {
|
|
834
833
|
let { addSelectedNodes: i, unselectNodesAndEdges: a, multiSelectionActive: o, nodeLookup: s, onError: c } = t.getState(), l = s.get(e);
|
|
835
834
|
if (!l) {
|
|
836
|
-
c?.("012",
|
|
835
|
+
c?.("012", errorMessages.error012(e));
|
|
837
836
|
return;
|
|
838
837
|
}
|
|
839
838
|
t.setState({ nodesSelectionActive: !1 }), l.selected ? (n || l.selected && o) && (a({
|
|
@@ -841,13 +840,13 @@ function Vt({ id: e, store: t, unselect: n = !1, nodeRef: r }) {
|
|
|
841
840
|
edges: []
|
|
842
841
|
}), requestAnimationFrame(() => r?.current?.blur())) : i([e]);
|
|
843
842
|
}
|
|
844
|
-
function
|
|
845
|
-
let s =
|
|
846
|
-
return
|
|
847
|
-
d.current =
|
|
843
|
+
function useDrag({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector: r, nodeId: i, isSelectable: a, nodeClickDistance: o }) {
|
|
844
|
+
let s = useStoreApi(), [l, u] = useState(!1), d = useRef();
|
|
845
|
+
return useEffect(() => {
|
|
846
|
+
d.current = XYDrag({
|
|
848
847
|
getStoreItems: () => s.getState(),
|
|
849
848
|
onNodeMouseDown: (t) => {
|
|
850
|
-
|
|
849
|
+
handleNodeClick({
|
|
851
850
|
id: t,
|
|
852
851
|
store: s,
|
|
853
852
|
nodeRef: e
|
|
@@ -860,7 +859,7 @@ function Ht({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
|
|
|
860
859
|
u(!1);
|
|
861
860
|
}
|
|
862
861
|
});
|
|
863
|
-
}, []),
|
|
862
|
+
}, []), useEffect(() => {
|
|
864
863
|
if (!(t || !e.current || !d.current)) return d.current.update({
|
|
865
864
|
noDragClassName: n,
|
|
866
865
|
handleSelector: r,
|
|
@@ -881,19 +880,19 @@ function Ht({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
|
|
|
881
880
|
o
|
|
882
881
|
]), l;
|
|
883
882
|
}
|
|
884
|
-
var
|
|
885
|
-
function
|
|
886
|
-
let e =
|
|
887
|
-
return
|
|
888
|
-
let { nodeExtent: n, snapToGrid: r, snapGrid: i, nodesDraggable: a, onError: o, updateNodePositions: s, nodeLookup: c, nodeOrigin: l } = e.getState(), u = /* @__PURE__ */ new Map(), d =
|
|
883
|
+
var selectedAndDraggable = (e) => (t) => t.selected && (t.draggable || e && t.draggable === void 0);
|
|
884
|
+
function useMoveSelectedNodes() {
|
|
885
|
+
let e = useStoreApi();
|
|
886
|
+
return useCallback((t) => {
|
|
887
|
+
let { nodeExtent: n, snapToGrid: r, snapGrid: i, nodesDraggable: a, onError: o, updateNodePositions: s, nodeLookup: c, nodeOrigin: l } = e.getState(), u = /* @__PURE__ */ new Map(), d = selectedAndDraggable(a), f = r ? i[0] : 5, p = r ? i[1] : 5, m = t.direction.x * f * t.factor, h = t.direction.y * p * t.factor;
|
|
889
888
|
for (let [, e] of c) {
|
|
890
889
|
if (!d(e)) continue;
|
|
891
890
|
let t = {
|
|
892
891
|
x: e.internals.positionAbsolute.x + m,
|
|
893
892
|
y: e.internals.positionAbsolute.y + h
|
|
894
893
|
};
|
|
895
|
-
r && (t =
|
|
896
|
-
let { position: a, positionAbsolute: s } =
|
|
894
|
+
r && (t = snapPosition(t, i));
|
|
895
|
+
let { position: a, positionAbsolute: s } = calculateNodePosition({
|
|
897
896
|
nodeId: e.id,
|
|
898
897
|
nextPosition: t,
|
|
899
898
|
nodeLookup: c,
|
|
@@ -906,27 +905,27 @@ function Wt() {
|
|
|
906
905
|
s(u);
|
|
907
906
|
}, []);
|
|
908
907
|
}
|
|
909
|
-
var
|
|
910
|
-
|
|
911
|
-
var
|
|
908
|
+
var NodeIdContext = createContext(null), Provider = NodeIdContext.Provider;
|
|
909
|
+
NodeIdContext.Consumer;
|
|
910
|
+
var useNodeId = () => useContext(NodeIdContext), selector$g = (e) => ({
|
|
912
911
|
connectOnClick: e.connectOnClick,
|
|
913
912
|
noPanClassName: e.noPanClassName,
|
|
914
913
|
rfId: e.rfId
|
|
915
|
-
}),
|
|
914
|
+
}), connectingSelector = (e, t, r) => (i) => {
|
|
916
915
|
let { connectionClickStartHandle: a, connectionMode: o, connection: s } = i, { fromHandle: c, toHandle: l, isValid: u } = s, d = l?.nodeId === e && l?.id === t && l?.type === r;
|
|
917
916
|
return {
|
|
918
917
|
connectingFrom: c?.nodeId === e && c?.id === t && c?.type === r,
|
|
919
918
|
connectingTo: d,
|
|
920
919
|
clickConnecting: a?.nodeId === e && a?.id === t && a?.type === r,
|
|
921
|
-
isPossibleEndHandle: o ===
|
|
920
|
+
isPossibleEndHandle: o === ConnectionMode.Strict ? c?.type !== r : e !== c?.nodeId || t !== c?.id,
|
|
922
921
|
connectionInProcess: !!c,
|
|
923
922
|
clickConnectionInProcess: !!a,
|
|
924
923
|
valid: d && u
|
|
925
924
|
};
|
|
926
925
|
};
|
|
927
|
-
function
|
|
928
|
-
let v = c || null, y = t === "target", b =
|
|
929
|
-
S || b.getState().onError?.("010",
|
|
926
|
+
function HandleComponent({ type: t = "source", position: n = Position.Top, isValidConnection: r, isConnectable: i = !0, isConnectableStart: o = !0, isConnectableEnd: s = !0, id: c, onConnect: u, children: d, className: f, onMouseDown: m, onTouchStart: h, ...g }, _) {
|
|
927
|
+
let v = c || null, y = t === "target", b = useStoreApi(), S = useNodeId(), { connectOnClick: C, noPanClassName: w, rfId: T } = useStore(selector$g, shallow), { connectingFrom: E, connectingTo: D, clickConnecting: O, isPossibleEndHandle: k, connectionInProcess: A, clickConnectionInProcess: j, valid: M } = useStore(connectingSelector(S, v, t), shallow);
|
|
928
|
+
S || b.getState().onError?.("010", errorMessages.error010());
|
|
930
929
|
let N = (e) => {
|
|
931
930
|
let { defaultEdgeOptions: t, onConnect: n, hasDefaultEdges: r } = b.getState(), i = {
|
|
932
931
|
...t,
|
|
@@ -934,15 +933,15 @@ function Xt({ type: t = "source", position: n = a.Top, isValidConnection: r, isC
|
|
|
934
933
|
};
|
|
935
934
|
if (r) {
|
|
936
935
|
let { edges: e, setEdges: t } = b.getState();
|
|
937
|
-
t(
|
|
936
|
+
t(addEdge(i, e));
|
|
938
937
|
}
|
|
939
938
|
n?.(i), u?.(i);
|
|
940
|
-
},
|
|
939
|
+
}, P = (e) => {
|
|
941
940
|
if (!S) return;
|
|
942
|
-
let t =
|
|
941
|
+
let t = isMouseEvent(e.nativeEvent);
|
|
943
942
|
if (o && (t && e.button === 0 || !t)) {
|
|
944
943
|
let t = b.getState();
|
|
945
|
-
|
|
944
|
+
XYHandle.onPointerDown(e.nativeEvent, {
|
|
946
945
|
handleDomNode: e.currentTarget,
|
|
947
946
|
autoPanOnConnect: t.autoPanOnConnect,
|
|
948
947
|
connectionMode: t.connectionMode,
|
|
@@ -968,13 +967,47 @@ function Xt({ type: t = "source", position: n = a.Top, isValidConnection: r, isC
|
|
|
968
967
|
});
|
|
969
968
|
}
|
|
970
969
|
t ? m?.(e) : h?.(e);
|
|
970
|
+
}, F = (e) => {
|
|
971
|
+
let { onClickConnectStart: n, onClickConnectEnd: i, connectionClickStartHandle: a, connectionMode: s, isValidConnection: c, lib: u, rfId: d, nodeLookup: f, connection: p } = b.getState();
|
|
972
|
+
if (!S || !a && !o) return;
|
|
973
|
+
if (!a) {
|
|
974
|
+
n?.(e.nativeEvent, {
|
|
975
|
+
nodeId: S,
|
|
976
|
+
handleId: v,
|
|
977
|
+
handleType: t
|
|
978
|
+
}), b.setState({ connectionClickStartHandle: {
|
|
979
|
+
nodeId: S,
|
|
980
|
+
type: t,
|
|
981
|
+
id: v
|
|
982
|
+
} });
|
|
983
|
+
return;
|
|
984
|
+
}
|
|
985
|
+
let m = getHostForElement(e.target), h = r || c, { connection: g, isValid: _ } = XYHandle.isValid(e.nativeEvent, {
|
|
986
|
+
handle: {
|
|
987
|
+
nodeId: S,
|
|
988
|
+
id: v,
|
|
989
|
+
type: t
|
|
990
|
+
},
|
|
991
|
+
connectionMode: s,
|
|
992
|
+
fromNodeId: a.nodeId,
|
|
993
|
+
fromHandleId: a.id || null,
|
|
994
|
+
fromType: a.type,
|
|
995
|
+
isValidConnection: h,
|
|
996
|
+
flowId: d,
|
|
997
|
+
doc: m,
|
|
998
|
+
lib: u,
|
|
999
|
+
nodeLookup: f
|
|
1000
|
+
});
|
|
1001
|
+
_ && g && N(g);
|
|
1002
|
+
let y = structuredClone(p);
|
|
1003
|
+
delete y.inProgress, y.toPosition = y.toHandle ? y.toHandle.position : null, i?.(e, y), b.setState({ connectionClickStartHandle: null });
|
|
971
1004
|
};
|
|
972
|
-
return
|
|
1005
|
+
return jsx("div", {
|
|
973
1006
|
"data-handleid": v,
|
|
974
1007
|
"data-nodeid": S,
|
|
975
1008
|
"data-handlepos": n,
|
|
976
1009
|
"data-id": `${T}-${S}-${v}-${t}`,
|
|
977
|
-
className:
|
|
1010
|
+
className: cc([
|
|
978
1011
|
"react-flow__handle",
|
|
979
1012
|
`react-flow__handle-${n}`,
|
|
980
1013
|
"nodrag",
|
|
@@ -993,82 +1026,48 @@ function Xt({ type: t = "source", position: n = a.Top, isValidConnection: r, isC
|
|
|
993
1026
|
connectionindicator: i && (!A || k) && (A || j ? s : o)
|
|
994
1027
|
}
|
|
995
1028
|
]),
|
|
996
|
-
onMouseDown:
|
|
997
|
-
onTouchStart:
|
|
998
|
-
onClick: C ?
|
|
999
|
-
let { onClickConnectStart: n, onClickConnectEnd: i, connectionClickStartHandle: a, connectionMode: s, isValidConnection: c, lib: u, rfId: d, nodeLookup: f, connection: p } = b.getState();
|
|
1000
|
-
if (!S || !a && !o) return;
|
|
1001
|
-
if (!a) {
|
|
1002
|
-
n?.(e.nativeEvent, {
|
|
1003
|
-
nodeId: S,
|
|
1004
|
-
handleId: v,
|
|
1005
|
-
handleType: t
|
|
1006
|
-
}), b.setState({ connectionClickStartHandle: {
|
|
1007
|
-
nodeId: S,
|
|
1008
|
-
type: t,
|
|
1009
|
-
id: v
|
|
1010
|
-
} });
|
|
1011
|
-
return;
|
|
1012
|
-
}
|
|
1013
|
-
let m = P(e.target), h = r || c, { connection: g, isValid: _ } = l.isValid(e.nativeEvent, {
|
|
1014
|
-
handle: {
|
|
1015
|
-
nodeId: S,
|
|
1016
|
-
id: v,
|
|
1017
|
-
type: t
|
|
1018
|
-
},
|
|
1019
|
-
connectionMode: s,
|
|
1020
|
-
fromNodeId: a.nodeId,
|
|
1021
|
-
fromHandleId: a.id || null,
|
|
1022
|
-
fromType: a.type,
|
|
1023
|
-
isValidConnection: h,
|
|
1024
|
-
flowId: d,
|
|
1025
|
-
doc: m,
|
|
1026
|
-
lib: u,
|
|
1027
|
-
nodeLookup: f
|
|
1028
|
-
});
|
|
1029
|
-
_ && g && N(g);
|
|
1030
|
-
let y = structuredClone(p);
|
|
1031
|
-
delete y.inProgress, y.toPosition = y.toHandle ? y.toHandle.position : null, i?.(e, y), b.setState({ connectionClickStartHandle: null });
|
|
1032
|
-
} : void 0,
|
|
1029
|
+
onMouseDown: P,
|
|
1030
|
+
onTouchStart: P,
|
|
1031
|
+
onClick: C ? F : void 0,
|
|
1033
1032
|
ref: _,
|
|
1034
1033
|
...g,
|
|
1035
1034
|
children: d
|
|
1036
1035
|
});
|
|
1037
1036
|
}
|
|
1038
|
-
var
|
|
1039
|
-
function
|
|
1040
|
-
return
|
|
1037
|
+
var Handle = memo(fixedForwardRef(HandleComponent));
|
|
1038
|
+
function InputNode({ data: e, isConnectable: t, sourcePosition: n = Position.Bottom }) {
|
|
1039
|
+
return jsxs(Fragment$1, { children: [e?.label, jsx(Handle, {
|
|
1041
1040
|
type: "source",
|
|
1042
1041
|
position: n,
|
|
1043
1042
|
isConnectable: t
|
|
1044
1043
|
})] });
|
|
1045
1044
|
}
|
|
1046
|
-
function
|
|
1047
|
-
return
|
|
1048
|
-
|
|
1045
|
+
function DefaultNode({ data: e, isConnectable: t, targetPosition: n = Position.Top, sourcePosition: r = Position.Bottom }) {
|
|
1046
|
+
return jsxs(Fragment$1, { children: [
|
|
1047
|
+
jsx(Handle, {
|
|
1049
1048
|
type: "target",
|
|
1050
1049
|
position: n,
|
|
1051
1050
|
isConnectable: t
|
|
1052
1051
|
}),
|
|
1053
1052
|
e?.label,
|
|
1054
|
-
|
|
1053
|
+
jsx(Handle, {
|
|
1055
1054
|
type: "source",
|
|
1056
1055
|
position: r,
|
|
1057
1056
|
isConnectable: t
|
|
1058
1057
|
})
|
|
1059
1058
|
] });
|
|
1060
1059
|
}
|
|
1061
|
-
function
|
|
1060
|
+
function GroupNode() {
|
|
1062
1061
|
return null;
|
|
1063
1062
|
}
|
|
1064
|
-
function
|
|
1065
|
-
return
|
|
1063
|
+
function OutputNode({ data: e, isConnectable: t, targetPosition: n = Position.Top }) {
|
|
1064
|
+
return jsxs(Fragment$1, { children: [jsx(Handle, {
|
|
1066
1065
|
type: "target",
|
|
1067
1066
|
position: n,
|
|
1068
1067
|
isConnectable: t
|
|
1069
1068
|
}), e?.label] });
|
|
1070
1069
|
}
|
|
1071
|
-
var
|
|
1070
|
+
var arrowKeyDiffs = {
|
|
1072
1071
|
ArrowUp: {
|
|
1073
1072
|
x: 0,
|
|
1074
1073
|
y: -1
|
|
@@ -1085,13 +1084,13 @@ var nn = {
|
|
|
1085
1084
|
x: 1,
|
|
1086
1085
|
y: 0
|
|
1087
1086
|
}
|
|
1088
|
-
},
|
|
1089
|
-
input:
|
|
1090
|
-
default:
|
|
1091
|
-
output:
|
|
1092
|
-
group:
|
|
1087
|
+
}, builtinNodeTypes = {
|
|
1088
|
+
input: InputNode,
|
|
1089
|
+
default: DefaultNode,
|
|
1090
|
+
output: OutputNode,
|
|
1091
|
+
group: GroupNode
|
|
1093
1092
|
};
|
|
1094
|
-
function
|
|
1093
|
+
function getNodeInlineStyleDimensions(e) {
|
|
1095
1094
|
return e.internals.handleBounds === void 0 ? {
|
|
1096
1095
|
width: e.width ?? e.initialWidth ?? e.style?.width,
|
|
1097
1096
|
height: e.height ?? e.initialHeight ?? e.style?.height
|
|
@@ -1100,43 +1099,43 @@ function an(e) {
|
|
|
1100
1099
|
height: e.height ?? e.style?.height
|
|
1101
1100
|
};
|
|
1102
1101
|
}
|
|
1103
|
-
var
|
|
1104
|
-
let { width: t, height: n, x: r, y: i } =
|
|
1102
|
+
var selector$f = (e) => {
|
|
1103
|
+
let { width: t, height: n, x: r, y: i } = getInternalNodesBounds(e.nodeLookup, { filter: (e) => !!e.selected });
|
|
1105
1104
|
return {
|
|
1106
|
-
width:
|
|
1107
|
-
height:
|
|
1105
|
+
width: isNumeric(t) ? t : null,
|
|
1106
|
+
height: isNumeric(n) ? n : null,
|
|
1108
1107
|
userSelectionActive: e.userSelectionActive,
|
|
1109
1108
|
transformString: `translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`
|
|
1110
1109
|
};
|
|
1111
1110
|
};
|
|
1112
|
-
function
|
|
1113
|
-
let i =
|
|
1114
|
-
|
|
1111
|
+
function NodesSelection({ onSelectionContextMenu: t, noPanClassName: n, disableKeyboardA11y: r }) {
|
|
1112
|
+
let i = useStoreApi(), { width: a, height: o, transformString: s, userSelectionActive: c } = useStore(selector$f, shallow), l = useMoveSelectedNodes(), u = useRef(null);
|
|
1113
|
+
useEffect(() => {
|
|
1115
1114
|
r || u.current?.focus({ preventScroll: !0 });
|
|
1116
1115
|
}, [r]);
|
|
1117
1116
|
let d = !c && a !== null && o !== null;
|
|
1118
|
-
if (
|
|
1117
|
+
if (useDrag({
|
|
1119
1118
|
nodeRef: u,
|
|
1120
1119
|
disabled: !d
|
|
1121
1120
|
}), !d) return null;
|
|
1122
1121
|
let f = t ? (e) => {
|
|
1123
1122
|
t(e, i.getState().nodes.filter((e) => e.selected));
|
|
1124
1123
|
} : void 0;
|
|
1125
|
-
return
|
|
1126
|
-
className:
|
|
1124
|
+
return jsx("div", {
|
|
1125
|
+
className: cc([
|
|
1127
1126
|
"react-flow__nodesselection",
|
|
1128
1127
|
"react-flow__container",
|
|
1129
1128
|
n
|
|
1130
1129
|
]),
|
|
1131
1130
|
style: { transform: s },
|
|
1132
|
-
children:
|
|
1131
|
+
children: jsx("div", {
|
|
1133
1132
|
ref: u,
|
|
1134
1133
|
className: "react-flow__nodesselection-rect",
|
|
1135
1134
|
onContextMenu: f,
|
|
1136
1135
|
tabIndex: r ? void 0 : -1,
|
|
1137
1136
|
onKeyDown: r ? void 0 : (e) => {
|
|
1138
|
-
Object.prototype.hasOwnProperty.call(
|
|
1139
|
-
direction:
|
|
1137
|
+
Object.prototype.hasOwnProperty.call(arrowKeyDiffs, e.key) && (e.preventDefault(), l({
|
|
1138
|
+
direction: arrowKeyDiffs[e.key],
|
|
1140
1139
|
factor: e.shiftKey ? 4 : 1
|
|
1141
1140
|
}));
|
|
1142
1141
|
},
|
|
@@ -1147,25 +1146,25 @@ function sn({ onSelectionContextMenu: t, noPanClassName: n, disableKeyboardA11y:
|
|
|
1147
1146
|
})
|
|
1148
1147
|
});
|
|
1149
1148
|
}
|
|
1150
|
-
var
|
|
1149
|
+
var win = typeof window < "u" ? window : void 0, selector$e = (e) => ({
|
|
1151
1150
|
nodesSelectionActive: e.nodesSelectionActive,
|
|
1152
1151
|
userSelectionActive: e.userSelectionActive
|
|
1153
1152
|
});
|
|
1154
|
-
function
|
|
1155
|
-
let { nodesSelectionActive:
|
|
1156
|
-
return
|
|
1153
|
+
function FlowRendererComponent({ children: e, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove: r, onPaneMouseLeave: i, onPaneContextMenu: a, onPaneScroll: o, paneClickDistance: s, deleteKeyCode: c, selectionKeyCode: l, selectionOnDrag: u, selectionMode: d, onSelectionStart: f, onSelectionEnd: p, multiSelectionKeyCode: m, panActivationKeyCode: h, zoomActivationKeyCode: g, elementsSelectable: _, zoomOnScroll: v, zoomOnPinch: y, panOnScroll: b, panOnScrollSpeed: x, panOnScrollMode: S, zoomOnDoubleClick: C, panOnDrag: w, defaultViewport: T, translateExtent: E, minZoom: D, maxZoom: O, preventScrolling: k, onSelectionContextMenu: A, noWheelClassName: j, noPanClassName: M, disableKeyboardA11y: N, onViewportChange: P, isControlledViewport: F }) {
|
|
1154
|
+
let { nodesSelectionActive: I, userSelectionActive: L } = useStore(selector$e, shallow), R = useKeyPress(l, { target: win }), z = useKeyPress(h, { target: win }), B = z || w, V = z || b, H = u && B !== !0, U = R || L || H;
|
|
1155
|
+
return useGlobalKeyHandler({
|
|
1157
1156
|
deleteKeyCode: c,
|
|
1158
1157
|
multiSelectionKeyCode: m
|
|
1159
|
-
}),
|
|
1158
|
+
}), jsx(ZoomPane, {
|
|
1160
1159
|
onPaneContextMenu: a,
|
|
1161
1160
|
elementsSelectable: _,
|
|
1162
1161
|
zoomOnScroll: v,
|
|
1163
1162
|
zoomOnPinch: y,
|
|
1164
|
-
panOnScroll:
|
|
1163
|
+
panOnScroll: V,
|
|
1165
1164
|
panOnScrollSpeed: x,
|
|
1166
1165
|
panOnScrollMode: S,
|
|
1167
1166
|
zoomOnDoubleClick: C,
|
|
1168
|
-
panOnDrag: !
|
|
1167
|
+
panOnDrag: !R && B,
|
|
1169
1168
|
defaultViewport: T,
|
|
1170
1169
|
translateExtent: E,
|
|
1171
1170
|
minZoom: D,
|
|
@@ -1177,8 +1176,8 @@ function un({ children: e, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove:
|
|
|
1177
1176
|
onViewportChange: P,
|
|
1178
1177
|
isControlledViewport: F,
|
|
1179
1178
|
paneClickDistance: s,
|
|
1180
|
-
selectionOnDrag:
|
|
1181
|
-
children:
|
|
1179
|
+
selectionOnDrag: H,
|
|
1180
|
+
children: jsxs(Pane, {
|
|
1182
1181
|
onSelectionStart: f,
|
|
1183
1182
|
onSelectionEnd: p,
|
|
1184
1183
|
onPaneClick: t,
|
|
@@ -1187,13 +1186,13 @@ function un({ children: e, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove:
|
|
|
1187
1186
|
onPaneMouseLeave: i,
|
|
1188
1187
|
onPaneContextMenu: a,
|
|
1189
1188
|
onPaneScroll: o,
|
|
1190
|
-
panOnDrag:
|
|
1191
|
-
isSelecting: !!
|
|
1189
|
+
panOnDrag: B,
|
|
1190
|
+
isSelecting: !!U,
|
|
1192
1191
|
selectionMode: d,
|
|
1193
|
-
selectionKeyPressed:
|
|
1192
|
+
selectionKeyPressed: R,
|
|
1194
1193
|
paneClickDistance: s,
|
|
1195
|
-
selectionOnDrag:
|
|
1196
|
-
children: [e,
|
|
1194
|
+
selectionOnDrag: H,
|
|
1195
|
+
children: [e, I && jsx(NodesSelection, {
|
|
1197
1196
|
onSelectionContextMenu: A,
|
|
1198
1197
|
noPanClassName: M,
|
|
1199
1198
|
disableKeyboardA11y: N
|
|
@@ -1201,19 +1200,19 @@ function un({ children: e, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove:
|
|
|
1201
1200
|
})
|
|
1202
1201
|
});
|
|
1203
1202
|
}
|
|
1204
|
-
|
|
1205
|
-
var
|
|
1203
|
+
FlowRendererComponent.displayName = "FlowRenderer";
|
|
1204
|
+
var FlowRenderer = memo(FlowRendererComponent), selector$d = (e) => (t) => e ? getNodesInside(t.nodeLookup, {
|
|
1206
1205
|
x: 0,
|
|
1207
1206
|
y: 0,
|
|
1208
1207
|
width: t.width,
|
|
1209
1208
|
height: t.height
|
|
1210
1209
|
}, t.transform, !0).map((e) => e.id) : Array.from(t.nodeLookup.keys());
|
|
1211
|
-
function
|
|
1212
|
-
return
|
|
1210
|
+
function useVisibleNodeIds(e) {
|
|
1211
|
+
return useStore(useCallback(selector$d(e), [e]), shallow);
|
|
1213
1212
|
}
|
|
1214
|
-
var
|
|
1215
|
-
function
|
|
1216
|
-
let e =
|
|
1213
|
+
var selector$c = (e) => e.updateNodeInternals;
|
|
1214
|
+
function useResizeObserver() {
|
|
1215
|
+
let e = useStore(selector$c), [t] = useState(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((t) => {
|
|
1217
1216
|
let n = /* @__PURE__ */ new Map();
|
|
1218
1217
|
t.forEach((e) => {
|
|
1219
1218
|
let t = e.target.getAttribute("data-id");
|
|
@@ -1224,17 +1223,17 @@ function hn() {
|
|
|
1224
1223
|
});
|
|
1225
1224
|
}), e(n);
|
|
1226
1225
|
}));
|
|
1227
|
-
return
|
|
1226
|
+
return useEffect(() => () => {
|
|
1228
1227
|
t?.disconnect();
|
|
1229
1228
|
}, [t]), t;
|
|
1230
1229
|
}
|
|
1231
|
-
function
|
|
1232
|
-
let i =
|
|
1233
|
-
return
|
|
1230
|
+
function useNodeObserver({ node: e, nodeType: t, hasDimensions: n, resizeObserver: r }) {
|
|
1231
|
+
let i = useStoreApi(), a = useRef(null), o = useRef(null), s = useRef(e.sourcePosition), c = useRef(e.targetPosition), l = useRef(t), u = n && !!e.internals.handleBounds;
|
|
1232
|
+
return useEffect(() => {
|
|
1234
1233
|
a.current && !e.hidden && (!u || o.current !== a.current) && (o.current && r?.unobserve(o.current), r?.observe(a.current), o.current = a.current);
|
|
1235
|
-
}, [u, e.hidden]),
|
|
1234
|
+
}, [u, e.hidden]), useEffect(() => () => {
|
|
1236
1235
|
o.current &&= (r?.unobserve(o.current), null);
|
|
1237
|
-
}, []),
|
|
1236
|
+
}, []), useEffect(() => {
|
|
1238
1237
|
if (a.current) {
|
|
1239
1238
|
let n = l.current !== t, r = s.current !== e.sourcePosition, o = c.current !== e.targetPosition;
|
|
1240
1239
|
(n || r || o) && (l.current = t, s.current = e.sourcePosition, c.current = e.targetPosition, i.getState().updateNodeInternals(new Map([[e.id, {
|
|
@@ -1250,22 +1249,22 @@ function gn({ node: e, nodeType: t, hasDimensions: n, resizeObserver: r }) {
|
|
|
1250
1249
|
e.targetPosition
|
|
1251
1250
|
]), a;
|
|
1252
1251
|
}
|
|
1253
|
-
function
|
|
1254
|
-
let { node: S, internals: C, isParent: w } =
|
|
1252
|
+
function NodeWrapper({ id: t, onClick: n, onMouseEnter: r, onMouseMove: i, onMouseLeave: a, onContextMenu: o, onDoubleClick: s, nodesDraggable: c, elementsSelectable: l, nodesConnectable: u, nodesFocusable: d, resizeObserver: f, noDragClassName: p, noPanClassName: m, disableKeyboardA11y: h, rfId: g, nodeTypes: _, nodeClickDistance: v, onError: y }) {
|
|
1253
|
+
let { node: S, internals: C, isParent: w } = useStore((e) => {
|
|
1255
1254
|
let n = e.nodeLookup.get(t), r = e.parentLookup.has(t);
|
|
1256
1255
|
return {
|
|
1257
1256
|
node: n,
|
|
1258
1257
|
internals: n.internals,
|
|
1259
1258
|
isParent: r
|
|
1260
1259
|
};
|
|
1261
|
-
},
|
|
1262
|
-
E === void 0 && (y?.("003",
|
|
1263
|
-
let D = !!(S.draggable || c && S.draggable === void 0), O = !!(S.selectable || l && S.selectable === void 0), k = !!(S.connectable || u && S.connectable === void 0), A = !!(S.focusable || d && S.focusable === void 0), j =
|
|
1260
|
+
}, shallow), T = S.type || "default", E = _?.[T] || builtinNodeTypes[T];
|
|
1261
|
+
E === void 0 && (y?.("003", errorMessages.error003(T)), T = "default", E = _?.default || builtinNodeTypes.default);
|
|
1262
|
+
let D = !!(S.draggable || c && S.draggable === void 0), O = !!(S.selectable || l && S.selectable === void 0), k = !!(S.connectable || u && S.connectable === void 0), A = !!(S.focusable || d && S.focusable === void 0), j = useStoreApi(), M = nodeHasDimensions(S), N = useNodeObserver({
|
|
1264
1263
|
node: S,
|
|
1265
1264
|
nodeType: T,
|
|
1266
1265
|
hasDimensions: M,
|
|
1267
1266
|
resizeObserver: f
|
|
1268
|
-
}), P =
|
|
1267
|
+
}), P = useDrag({
|
|
1269
1268
|
nodeRef: N,
|
|
1270
1269
|
disabled: S.hidden || !D,
|
|
1271
1270
|
noDragClassName: p,
|
|
@@ -1273,24 +1272,24 @@ function _n({ id: t, onClick: n, onMouseEnter: r, onMouseMove: i, onMouseLeave:
|
|
|
1273
1272
|
nodeId: t,
|
|
1274
1273
|
isSelectable: O,
|
|
1275
1274
|
nodeClickDistance: v
|
|
1276
|
-
}), F =
|
|
1275
|
+
}), F = useMoveSelectedNodes();
|
|
1277
1276
|
if (S.hidden) return null;
|
|
1278
|
-
let
|
|
1277
|
+
let I = getNodeDimensions(S), L = getNodeInlineStyleDimensions(S), R = O || D || n || r || i || a, B = r ? (e) => r(e, { ...C.userNode }) : void 0, H = i ? (e) => i(e, { ...C.userNode }) : void 0, U = a ? (e) => a(e, { ...C.userNode }) : void 0, W = o ? (e) => o(e, { ...C.userNode }) : void 0, G = s ? (e) => s(e, { ...C.userNode }) : void 0, K = (e) => {
|
|
1279
1278
|
let { selectNodesOnDrag: r, nodeDragThreshold: i } = j.getState();
|
|
1280
|
-
O && (!r || !D || i > 0) &&
|
|
1279
|
+
O && (!r || !D || i > 0) && handleNodeClick({
|
|
1281
1280
|
id: t,
|
|
1282
1281
|
store: j,
|
|
1283
1282
|
nodeRef: N
|
|
1284
1283
|
}), n && n(e, { ...C.userNode });
|
|
1285
|
-
},
|
|
1286
|
-
if (!(
|
|
1287
|
-
if (
|
|
1284
|
+
}, q = (e) => {
|
|
1285
|
+
if (!(isInputDOMNode(e.nativeEvent) || h)) {
|
|
1286
|
+
if (elementSelectionKeys.includes(e.key) && O) handleNodeClick({
|
|
1288
1287
|
id: t,
|
|
1289
1288
|
store: j,
|
|
1290
1289
|
unselect: e.key === "Escape",
|
|
1291
1290
|
nodeRef: N
|
|
1292
1291
|
});
|
|
1293
|
-
else if (D && S.selected && Object.prototype.hasOwnProperty.call(
|
|
1292
|
+
else if (D && S.selected && Object.prototype.hasOwnProperty.call(arrowKeyDiffs, e.key)) {
|
|
1294
1293
|
e.preventDefault();
|
|
1295
1294
|
let { ariaLabelConfig: t } = j.getState();
|
|
1296
1295
|
j.setState({ ariaLiveMessage: t["node.a11yDescription.ariaLiveMessage"]({
|
|
@@ -1298,23 +1297,23 @@ function _n({ id: t, onClick: n, onMouseEnter: r, onMouseMove: i, onMouseLeave:
|
|
|
1298
1297
|
x: ~~C.positionAbsolute.x,
|
|
1299
1298
|
y: ~~C.positionAbsolute.y
|
|
1300
1299
|
}) }), F({
|
|
1301
|
-
direction:
|
|
1300
|
+
direction: arrowKeyDiffs[e.key],
|
|
1302
1301
|
factor: e.shiftKey ? 4 : 1
|
|
1303
1302
|
});
|
|
1304
1303
|
}
|
|
1305
1304
|
}
|
|
1306
|
-
},
|
|
1305
|
+
}, J = () => {
|
|
1307
1306
|
if (h || !N.current?.matches(":focus-visible")) return;
|
|
1308
1307
|
let { transform: e, width: n, height: r, autoPanOnNodeFocus: i, setCenter: a } = j.getState();
|
|
1309
|
-
i && (
|
|
1308
|
+
i && (getNodesInside(new Map([[t, S]]), {
|
|
1310
1309
|
x: 0,
|
|
1311
1310
|
y: 0,
|
|
1312
1311
|
width: n,
|
|
1313
1312
|
height: r
|
|
1314
|
-
}, e, !0).length > 0 || a(S.position.x +
|
|
1313
|
+
}, e, !0).length > 0 || a(S.position.x + I.width / 2, S.position.y + I.height / 2, { zoom: e[2] }));
|
|
1315
1314
|
};
|
|
1316
|
-
return
|
|
1317
|
-
className:
|
|
1315
|
+
return jsx("div", {
|
|
1316
|
+
className: cc([
|
|
1318
1317
|
"react-flow__node",
|
|
1319
1318
|
`react-flow__node-${T}`,
|
|
1320
1319
|
{ [m]: D },
|
|
@@ -1331,7 +1330,7 @@ function _n({ id: t, onClick: n, onMouseEnter: r, onMouseMove: i, onMouseLeave:
|
|
|
1331
1330
|
style: {
|
|
1332
1331
|
zIndex: C.z,
|
|
1333
1332
|
transform: `translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,
|
|
1334
|
-
pointerEvents:
|
|
1333
|
+
pointerEvents: R ? "all" : "none",
|
|
1335
1334
|
visibility: M ? "visible" : "hidden",
|
|
1336
1335
|
...S.style,
|
|
1337
1336
|
...L
|
|
@@ -1339,22 +1338,22 @@ function _n({ id: t, onClick: n, onMouseEnter: r, onMouseMove: i, onMouseLeave:
|
|
|
1339
1338
|
"data-id": t,
|
|
1340
1339
|
"data-testid": `rf__node-${t}`,
|
|
1341
1340
|
onMouseEnter: B,
|
|
1342
|
-
onMouseMove:
|
|
1343
|
-
onMouseLeave:
|
|
1344
|
-
onContextMenu:
|
|
1345
|
-
onClick:
|
|
1346
|
-
onDoubleClick:
|
|
1347
|
-
onKeyDown: A ?
|
|
1341
|
+
onMouseMove: H,
|
|
1342
|
+
onMouseLeave: U,
|
|
1343
|
+
onContextMenu: W,
|
|
1344
|
+
onClick: K,
|
|
1345
|
+
onDoubleClick: G,
|
|
1346
|
+
onKeyDown: A ? q : void 0,
|
|
1348
1347
|
tabIndex: A ? 0 : void 0,
|
|
1349
|
-
onFocus: A ?
|
|
1348
|
+
onFocus: A ? J : void 0,
|
|
1350
1349
|
role: S.ariaRole ?? (A ? "group" : void 0),
|
|
1351
1350
|
"aria-roledescription": "node",
|
|
1352
|
-
"aria-describedby": h ? void 0 : `${
|
|
1351
|
+
"aria-describedby": h ? void 0 : `${ARIA_NODE_DESC_KEY}-${g}`,
|
|
1353
1352
|
"aria-label": S.ariaLabel,
|
|
1354
1353
|
...S.domAttributes,
|
|
1355
|
-
children:
|
|
1354
|
+
children: jsx(Provider, {
|
|
1356
1355
|
value: t,
|
|
1357
|
-
children:
|
|
1356
|
+
children: jsx(E, {
|
|
1358
1357
|
id: t,
|
|
1359
1358
|
data: S.data,
|
|
1360
1359
|
type: T,
|
|
@@ -1371,24 +1370,24 @@ function _n({ id: t, onClick: n, onMouseEnter: r, onMouseMove: i, onMouseLeave:
|
|
|
1371
1370
|
dragHandle: S.dragHandle,
|
|
1372
1371
|
zIndex: C.z,
|
|
1373
1372
|
parentId: S.parentId,
|
|
1374
|
-
...
|
|
1373
|
+
...I
|
|
1375
1374
|
})
|
|
1376
1375
|
})
|
|
1377
1376
|
});
|
|
1378
1377
|
}
|
|
1379
|
-
var
|
|
1378
|
+
var NodeWrapper$1 = memo(NodeWrapper), selector$b = (e) => ({
|
|
1380
1379
|
nodesDraggable: e.nodesDraggable,
|
|
1381
1380
|
nodesConnectable: e.nodesConnectable,
|
|
1382
1381
|
nodesFocusable: e.nodesFocusable,
|
|
1383
1382
|
elementsSelectable: e.elementsSelectable,
|
|
1384
1383
|
onError: e.onError
|
|
1385
1384
|
});
|
|
1386
|
-
function
|
|
1387
|
-
let { nodesDraggable: t, nodesConnectable: n, nodesFocusable: r, elementsSelectable: i, onError: a } =
|
|
1388
|
-
return
|
|
1385
|
+
function NodeRendererComponent(e) {
|
|
1386
|
+
let { nodesDraggable: t, nodesConnectable: n, nodesFocusable: r, elementsSelectable: i, onError: a } = useStore(selector$b, shallow), o = useVisibleNodeIds(e.onlyRenderVisibleElements), s = useResizeObserver();
|
|
1387
|
+
return jsx("div", {
|
|
1389
1388
|
className: "react-flow__nodes",
|
|
1390
|
-
style:
|
|
1391
|
-
children: o.map((o) =>
|
|
1389
|
+
style: containerStyle,
|
|
1390
|
+
children: o.map((o) => jsx(NodeWrapper$1, {
|
|
1392
1391
|
id: o,
|
|
1393
1392
|
nodeTypes: e.nodeTypes,
|
|
1394
1393
|
nodeExtent: e.nodeExtent,
|
|
@@ -1412,15 +1411,15 @@ function bn(e) {
|
|
|
1412
1411
|
}, o))
|
|
1413
1412
|
});
|
|
1414
1413
|
}
|
|
1415
|
-
|
|
1416
|
-
var
|
|
1417
|
-
function
|
|
1418
|
-
return
|
|
1414
|
+
NodeRendererComponent.displayName = "NodeRenderer";
|
|
1415
|
+
var NodeRenderer = memo(NodeRendererComponent);
|
|
1416
|
+
function useVisibleEdgeIds(e) {
|
|
1417
|
+
return useStore(useCallback((t) => {
|
|
1419
1418
|
if (!e) return t.edges.map((e) => e.id);
|
|
1420
1419
|
let n = [];
|
|
1421
1420
|
if (t.width && t.height) for (let e of t.edges) {
|
|
1422
1421
|
let r = t.nodeLookup.get(e.source), i = t.nodeLookup.get(e.target);
|
|
1423
|
-
r && i &&
|
|
1422
|
+
r && i && isEdgeVisible({
|
|
1424
1423
|
sourceNode: r,
|
|
1425
1424
|
targetNode: i,
|
|
1426
1425
|
width: t.width,
|
|
@@ -1429,9 +1428,9 @@ function Sn(e) {
|
|
|
1429
1428
|
}) && n.push(e.id);
|
|
1430
1429
|
}
|
|
1431
1430
|
return n;
|
|
1432
|
-
}, [e]),
|
|
1431
|
+
}, [e]), shallow);
|
|
1433
1432
|
}
|
|
1434
|
-
var
|
|
1433
|
+
var ArrowSymbol = ({ color: e = "none", strokeWidth: t = 1 }) => jsx("polyline", {
|
|
1435
1434
|
className: "arrow",
|
|
1436
1435
|
style: {
|
|
1437
1436
|
strokeWidth: t,
|
|
@@ -1441,7 +1440,7 @@ var Cn = ({ color: e = "none", strokeWidth: t = 1 }) => Y("polyline", {
|
|
|
1441
1440
|
fill: "none",
|
|
1442
1441
|
strokeLinejoin: "round",
|
|
1443
1442
|
points: "-5,-4 0,0 -5,4"
|
|
1444
|
-
}),
|
|
1443
|
+
}), ArrowClosedSymbol = ({ color: e = "none", strokeWidth: t = 1 }) => jsx("polyline", {
|
|
1445
1444
|
className: "arrowclosed",
|
|
1446
1445
|
style: {
|
|
1447
1446
|
strokeWidth: t,
|
|
@@ -1453,17 +1452,17 @@ var Cn = ({ color: e = "none", strokeWidth: t = 1 }) => Y("polyline", {
|
|
|
1453
1452
|
strokeLinecap: "round",
|
|
1454
1453
|
strokeLinejoin: "round",
|
|
1455
1454
|
points: "-5,-4 0,0 -5,4 -5,-4"
|
|
1456
|
-
}),
|
|
1457
|
-
[
|
|
1458
|
-
[
|
|
1455
|
+
}), MarkerSymbols = {
|
|
1456
|
+
[MarkerType.Arrow]: ArrowSymbol,
|
|
1457
|
+
[MarkerType.ArrowClosed]: ArrowClosedSymbol
|
|
1459
1458
|
};
|
|
1460
|
-
function
|
|
1461
|
-
let t =
|
|
1462
|
-
return
|
|
1459
|
+
function useMarkerSymbol(e) {
|
|
1460
|
+
let t = useStoreApi();
|
|
1461
|
+
return useMemo(() => Object.prototype.hasOwnProperty.call(MarkerSymbols, e) ? MarkerSymbols[e] : (t.getState().onError?.("009", errorMessages.error009(e)), null), [e]);
|
|
1463
1462
|
}
|
|
1464
|
-
var
|
|
1465
|
-
let c =
|
|
1466
|
-
return c ?
|
|
1463
|
+
var Marker = ({ id: e, type: t, color: n, width: r = 12.5, height: i = 12.5, markerUnits: a = "strokeWidth", strokeWidth: o, orient: s = "auto-start-reverse" }) => {
|
|
1464
|
+
let c = useMarkerSymbol(t);
|
|
1465
|
+
return c ? jsx("marker", {
|
|
1467
1466
|
className: "react-flow__arrowhead",
|
|
1468
1467
|
id: e,
|
|
1469
1468
|
markerWidth: `${r}`,
|
|
@@ -1473,13 +1472,13 @@ var Dn = ({ id: e, type: t, color: n, width: r = 12.5, height: i = 12.5, markerU
|
|
|
1473
1472
|
orient: s,
|
|
1474
1473
|
refX: "0",
|
|
1475
1474
|
refY: "0",
|
|
1476
|
-
children:
|
|
1475
|
+
children: jsx(c, {
|
|
1477
1476
|
color: n,
|
|
1478
1477
|
strokeWidth: o
|
|
1479
1478
|
})
|
|
1480
1479
|
}) : null;
|
|
1481
|
-
},
|
|
1482
|
-
let n =
|
|
1480
|
+
}, MarkerDefinitions = ({ defaultColor: e, rfId: t }) => {
|
|
1481
|
+
let n = useStore((e) => e.edges), r = useStore((e) => e.defaultEdgeOptions), i = useMemo(() => createMarkerIds(n, {
|
|
1483
1482
|
id: t,
|
|
1484
1483
|
defaultColor: e,
|
|
1485
1484
|
defaultMarkerStart: r?.markerStart,
|
|
@@ -1490,10 +1489,10 @@ var Dn = ({ id: e, type: t, color: n, width: r = 12.5, height: i = 12.5, markerU
|
|
|
1490
1489
|
t,
|
|
1491
1490
|
e
|
|
1492
1491
|
]);
|
|
1493
|
-
return i.length ?
|
|
1492
|
+
return i.length ? jsx("svg", {
|
|
1494
1493
|
className: "react-flow__marker",
|
|
1495
1494
|
"aria-hidden": "true",
|
|
1496
|
-
children:
|
|
1495
|
+
children: jsx("defs", { children: i.map((e) => jsx(Marker, {
|
|
1497
1496
|
id: e.id,
|
|
1498
1497
|
type: e.type,
|
|
1499
1498
|
color: e.color,
|
|
@@ -1505,16 +1504,16 @@ var Dn = ({ id: e, type: t, color: n, width: r = 12.5, height: i = 12.5, markerU
|
|
|
1505
1504
|
}, e.id)) })
|
|
1506
1505
|
}) : null;
|
|
1507
1506
|
};
|
|
1508
|
-
|
|
1509
|
-
var
|
|
1510
|
-
function
|
|
1511
|
-
let [f, p] =
|
|
1507
|
+
MarkerDefinitions.displayName = "MarkerDefinitions";
|
|
1508
|
+
var MarkerDefinitions$1 = memo(MarkerDefinitions);
|
|
1509
|
+
function EdgeTextComponent({ x: t, y: n, label: r, labelStyle: i, labelShowBg: a = !0, labelBgStyle: o, labelBgPadding: s = [2, 4], labelBgBorderRadius: c = 2, children: l, className: u, ...d }) {
|
|
1510
|
+
let [f, p] = useState({
|
|
1512
1511
|
x: 1,
|
|
1513
1512
|
y: 0,
|
|
1514
1513
|
width: 0,
|
|
1515
1514
|
height: 0
|
|
1516
|
-
}), m =
|
|
1517
|
-
return
|
|
1515
|
+
}), m = cc(["react-flow__edge-textwrapper", u]), h = useRef(null);
|
|
1516
|
+
return useEffect(() => {
|
|
1518
1517
|
if (h.current) {
|
|
1519
1518
|
let e = h.current.getBBox();
|
|
1520
1519
|
p({
|
|
@@ -1524,13 +1523,13 @@ function An({ x: t, y: n, label: r, labelStyle: i, labelShowBg: a = !0, labelBgS
|
|
|
1524
1523
|
height: e.height
|
|
1525
1524
|
});
|
|
1526
1525
|
}
|
|
1527
|
-
}, [r]), r ?
|
|
1526
|
+
}, [r]), r ? jsxs("g", {
|
|
1528
1527
|
transform: `translate(${t - f.width / 2} ${n - f.height / 2})`,
|
|
1529
1528
|
className: m,
|
|
1530
1529
|
visibility: f.width ? "visible" : "hidden",
|
|
1531
1530
|
...d,
|
|
1532
1531
|
children: [
|
|
1533
|
-
a &&
|
|
1532
|
+
a && jsx("rect", {
|
|
1534
1533
|
width: f.width + 2 * s[0],
|
|
1535
1534
|
x: -s[0],
|
|
1536
1535
|
y: -s[1],
|
|
@@ -1540,7 +1539,7 @@ function An({ x: t, y: n, label: r, labelStyle: i, labelShowBg: a = !0, labelBgS
|
|
|
1540
1539
|
rx: c,
|
|
1541
1540
|
ry: c
|
|
1542
1541
|
}),
|
|
1543
|
-
|
|
1542
|
+
jsx("text", {
|
|
1544
1543
|
className: "react-flow__edge-text",
|
|
1545
1544
|
y: f.height / 2,
|
|
1546
1545
|
dy: "0.3em",
|
|
@@ -1552,24 +1551,24 @@ function An({ x: t, y: n, label: r, labelStyle: i, labelShowBg: a = !0, labelBgS
|
|
|
1552
1551
|
]
|
|
1553
1552
|
}) : null;
|
|
1554
1553
|
}
|
|
1555
|
-
|
|
1556
|
-
var
|
|
1557
|
-
function
|
|
1558
|
-
return
|
|
1559
|
-
|
|
1554
|
+
EdgeTextComponent.displayName = "EdgeText";
|
|
1555
|
+
var EdgeText = memo(EdgeTextComponent);
|
|
1556
|
+
function BaseEdge({ path: t, labelX: n, labelY: r, label: i, labelStyle: a, labelShowBg: o, labelBgStyle: s, labelBgPadding: c, labelBgBorderRadius: l, interactionWidth: u = 20, ...d }) {
|
|
1557
|
+
return jsxs(Fragment$1, { children: [
|
|
1558
|
+
jsx("path", {
|
|
1560
1559
|
...d,
|
|
1561
1560
|
d: t,
|
|
1562
1561
|
fill: "none",
|
|
1563
|
-
className:
|
|
1562
|
+
className: cc(["react-flow__edge-path", d.className])
|
|
1564
1563
|
}),
|
|
1565
|
-
u ?
|
|
1564
|
+
u ? jsx("path", {
|
|
1566
1565
|
d: t,
|
|
1567
1566
|
fill: "none",
|
|
1568
1567
|
strokeOpacity: 0,
|
|
1569
1568
|
strokeWidth: u,
|
|
1570
1569
|
className: "react-flow__edge-interaction"
|
|
1571
1570
|
}) : null,
|
|
1572
|
-
i &&
|
|
1571
|
+
i && isNumeric(n) && isNumeric(r) ? jsx(EdgeText, {
|
|
1573
1572
|
x: n,
|
|
1574
1573
|
y: r,
|
|
1575
1574
|
label: i,
|
|
@@ -1581,23 +1580,23 @@ function Mn({ path: t, labelX: n, labelY: r, label: i, labelStyle: a, labelShowB
|
|
|
1581
1580
|
}) : null
|
|
1582
1581
|
] });
|
|
1583
1582
|
}
|
|
1584
|
-
function
|
|
1585
|
-
return e ===
|
|
1583
|
+
function getControl({ pos: e, x1: t, y1: n, x2: r, y2: i }) {
|
|
1584
|
+
return e === Position.Left || e === Position.Right ? [.5 * (t + r), n] : [t, .5 * (n + i)];
|
|
1586
1585
|
}
|
|
1587
|
-
function
|
|
1588
|
-
let [s, c] =
|
|
1586
|
+
function getSimpleBezierPath({ sourceX: e, sourceY: t, sourcePosition: n = Position.Bottom, targetX: r, targetY: i, targetPosition: o = Position.Top }) {
|
|
1587
|
+
let [s, c] = getControl({
|
|
1589
1588
|
pos: n,
|
|
1590
1589
|
x1: e,
|
|
1591
1590
|
y1: t,
|
|
1592
1591
|
x2: r,
|
|
1593
1592
|
y2: i
|
|
1594
|
-
}), [l, u] =
|
|
1593
|
+
}), [l, u] = getControl({
|
|
1595
1594
|
pos: o,
|
|
1596
1595
|
x1: r,
|
|
1597
1596
|
y1: i,
|
|
1598
1597
|
x2: e,
|
|
1599
1598
|
y2: t
|
|
1600
|
-
}), [d, f, p, m] =
|
|
1599
|
+
}), [d, f, p, m] = getBezierEdgeCenter({
|
|
1601
1600
|
sourceX: e,
|
|
1602
1601
|
sourceY: t,
|
|
1603
1602
|
targetX: r,
|
|
@@ -1615,9 +1614,9 @@ function Pn({ sourceX: e, sourceY: t, sourcePosition: n = a.Bottom, targetX: r,
|
|
|
1615
1614
|
m
|
|
1616
1615
|
];
|
|
1617
1616
|
}
|
|
1618
|
-
function
|
|
1619
|
-
return
|
|
1620
|
-
let [v, y, b] =
|
|
1617
|
+
function createSimpleBezierEdge(e) {
|
|
1618
|
+
return memo(({ id: t, sourceX: n, sourceY: r, targetX: i, targetY: a, sourcePosition: o, targetPosition: s, label: c, labelStyle: l, labelShowBg: u, labelBgStyle: d, labelBgPadding: f, labelBgBorderRadius: p, style: m, markerEnd: h, markerStart: g, interactionWidth: _ }) => {
|
|
1619
|
+
let [v, y, b] = getSimpleBezierPath({
|
|
1621
1620
|
sourceX: n,
|
|
1622
1621
|
sourceY: r,
|
|
1623
1622
|
sourcePosition: o,
|
|
@@ -1625,7 +1624,7 @@ function Fn(e) {
|
|
|
1625
1624
|
targetY: a,
|
|
1626
1625
|
targetPosition: s
|
|
1627
1626
|
});
|
|
1628
|
-
return
|
|
1627
|
+
return jsx(BaseEdge, {
|
|
1629
1628
|
id: e.isInternal ? void 0 : t,
|
|
1630
1629
|
path: v,
|
|
1631
1630
|
labelX: y,
|
|
@@ -1643,11 +1642,11 @@ function Fn(e) {
|
|
|
1643
1642
|
});
|
|
1644
1643
|
});
|
|
1645
1644
|
}
|
|
1646
|
-
var
|
|
1647
|
-
|
|
1648
|
-
function
|
|
1649
|
-
return
|
|
1650
|
-
let [b, x, S] =
|
|
1645
|
+
var SimpleBezierEdge = createSimpleBezierEdge({ isInternal: !1 }), SimpleBezierEdgeInternal = createSimpleBezierEdge({ isInternal: !0 });
|
|
1646
|
+
SimpleBezierEdge.displayName = "SimpleBezierEdge", SimpleBezierEdgeInternal.displayName = "SimpleBezierEdgeInternal";
|
|
1647
|
+
function createSmoothStepEdge(e) {
|
|
1648
|
+
return memo(({ id: t, sourceX: n, sourceY: r, targetX: i, targetY: o, label: s, labelStyle: c, labelShowBg: l, labelBgStyle: u, labelBgPadding: d, labelBgBorderRadius: f, style: p, sourcePosition: m = Position.Bottom, targetPosition: h = Position.Top, markerEnd: g, markerStart: _, pathOptions: v, interactionWidth: y }) => {
|
|
1649
|
+
let [b, x, S] = getSmoothStepPath({
|
|
1651
1650
|
sourceX: n,
|
|
1652
1651
|
sourceY: r,
|
|
1653
1652
|
sourcePosition: m,
|
|
@@ -1658,7 +1657,7 @@ function Rn(e) {
|
|
|
1658
1657
|
offset: v?.offset,
|
|
1659
1658
|
stepPosition: v?.stepPosition
|
|
1660
1659
|
});
|
|
1661
|
-
return
|
|
1660
|
+
return jsx(BaseEdge, {
|
|
1662
1661
|
id: e.isInternal ? void 0 : t,
|
|
1663
1662
|
path: b,
|
|
1664
1663
|
labelX: x,
|
|
@@ -1676,32 +1675,32 @@ function Rn(e) {
|
|
|
1676
1675
|
});
|
|
1677
1676
|
});
|
|
1678
1677
|
}
|
|
1679
|
-
var
|
|
1680
|
-
|
|
1681
|
-
function
|
|
1682
|
-
return
|
|
1678
|
+
var SmoothStepEdge = createSmoothStepEdge({ isInternal: !1 }), SmoothStepEdgeInternal = createSmoothStepEdge({ isInternal: !0 });
|
|
1679
|
+
SmoothStepEdge.displayName = "SmoothStepEdge", SmoothStepEdgeInternal.displayName = "SmoothStepEdgeInternal";
|
|
1680
|
+
function createStepEdge(e) {
|
|
1681
|
+
return memo(({ id: t, ...n }) => {
|
|
1683
1682
|
let r = e.isInternal ? void 0 : t;
|
|
1684
|
-
return
|
|
1683
|
+
return jsx(SmoothStepEdge, {
|
|
1685
1684
|
...n,
|
|
1686
1685
|
id: r,
|
|
1687
|
-
pathOptions:
|
|
1686
|
+
pathOptions: useMemo(() => ({
|
|
1688
1687
|
borderRadius: 0,
|
|
1689
1688
|
offset: n.pathOptions?.offset
|
|
1690
1689
|
}), [n.pathOptions?.offset])
|
|
1691
1690
|
});
|
|
1692
1691
|
});
|
|
1693
1692
|
}
|
|
1694
|
-
var
|
|
1695
|
-
|
|
1696
|
-
function
|
|
1697
|
-
return
|
|
1698
|
-
let [g, _, v] =
|
|
1693
|
+
var StepEdge = createStepEdge({ isInternal: !1 }), StepEdgeInternal = createStepEdge({ isInternal: !0 });
|
|
1694
|
+
StepEdge.displayName = "StepEdge", StepEdgeInternal.displayName = "StepEdgeInternal";
|
|
1695
|
+
function createStraightEdge(e) {
|
|
1696
|
+
return memo(({ id: t, sourceX: n, sourceY: r, targetX: i, targetY: a, label: o, labelStyle: s, labelShowBg: c, labelBgStyle: l, labelBgPadding: u, labelBgBorderRadius: d, style: f, markerEnd: p, markerStart: m, interactionWidth: h }) => {
|
|
1697
|
+
let [g, _, v] = getStraightPath({
|
|
1699
1698
|
sourceX: n,
|
|
1700
1699
|
sourceY: r,
|
|
1701
1700
|
targetX: i,
|
|
1702
1701
|
targetY: a
|
|
1703
1702
|
});
|
|
1704
|
-
return
|
|
1703
|
+
return jsx(BaseEdge, {
|
|
1705
1704
|
id: e.isInternal ? void 0 : t,
|
|
1706
1705
|
path: g,
|
|
1707
1706
|
labelX: _,
|
|
@@ -1719,11 +1718,11 @@ function Wn(e) {
|
|
|
1719
1718
|
});
|
|
1720
1719
|
});
|
|
1721
1720
|
}
|
|
1722
|
-
var
|
|
1723
|
-
|
|
1724
|
-
function
|
|
1725
|
-
return
|
|
1726
|
-
let [b, x, S] =
|
|
1721
|
+
var StraightEdge = createStraightEdge({ isInternal: !1 }), StraightEdgeInternal = createStraightEdge({ isInternal: !0 });
|
|
1722
|
+
StraightEdge.displayName = "StraightEdge", StraightEdgeInternal.displayName = "StraightEdgeInternal";
|
|
1723
|
+
function createBezierEdge(e) {
|
|
1724
|
+
return memo(({ id: t, sourceX: n, sourceY: r, targetX: i, targetY: o, sourcePosition: s = Position.Bottom, targetPosition: c = Position.Top, label: l, labelStyle: u, labelShowBg: d, labelBgStyle: f, labelBgPadding: p, labelBgBorderRadius: m, style: h, markerEnd: g, markerStart: _, pathOptions: v, interactionWidth: y }) => {
|
|
1725
|
+
let [b, x, S] = getBezierPath({
|
|
1727
1726
|
sourceX: n,
|
|
1728
1727
|
sourceY: r,
|
|
1729
1728
|
sourcePosition: s,
|
|
@@ -1732,7 +1731,7 @@ function qn(e) {
|
|
|
1732
1731
|
targetPosition: c,
|
|
1733
1732
|
curvature: v?.curvature
|
|
1734
1733
|
});
|
|
1735
|
-
return
|
|
1734
|
+
return jsx(BaseEdge, {
|
|
1736
1735
|
id: e.isInternal ? void 0 : t,
|
|
1737
1736
|
path: b,
|
|
1738
1737
|
labelX: x,
|
|
@@ -1750,40 +1749,40 @@ function qn(e) {
|
|
|
1750
1749
|
});
|
|
1751
1750
|
});
|
|
1752
1751
|
}
|
|
1753
|
-
var
|
|
1754
|
-
|
|
1755
|
-
var
|
|
1756
|
-
default:
|
|
1757
|
-
straight:
|
|
1758
|
-
step:
|
|
1759
|
-
smoothstep:
|
|
1760
|
-
simplebezier:
|
|
1761
|
-
},
|
|
1752
|
+
var BezierEdge = createBezierEdge({ isInternal: !1 }), BezierEdgeInternal = createBezierEdge({ isInternal: !0 });
|
|
1753
|
+
BezierEdge.displayName = "BezierEdge", BezierEdgeInternal.displayName = "BezierEdgeInternal";
|
|
1754
|
+
var builtinEdgeTypes = {
|
|
1755
|
+
default: BezierEdgeInternal,
|
|
1756
|
+
straight: StraightEdgeInternal,
|
|
1757
|
+
step: StepEdgeInternal,
|
|
1758
|
+
smoothstep: SmoothStepEdgeInternal,
|
|
1759
|
+
simplebezier: SimpleBezierEdgeInternal
|
|
1760
|
+
}, nullPosition = {
|
|
1762
1761
|
sourceX: null,
|
|
1763
1762
|
sourceY: null,
|
|
1764
1763
|
targetX: null,
|
|
1765
1764
|
targetY: null,
|
|
1766
1765
|
sourcePosition: null,
|
|
1767
1766
|
targetPosition: null
|
|
1768
|
-
},
|
|
1769
|
-
function
|
|
1770
|
-
return
|
|
1767
|
+
}, shiftX = (e, t, n) => n === Position.Left ? e - t : n === Position.Right ? e + t : e, shiftY = (e, t, n) => n === Position.Top ? e - t : n === Position.Bottom ? e + t : e, EdgeUpdaterClassName = "react-flow__edgeupdater";
|
|
1768
|
+
function EdgeAnchor({ position: t, centerX: n, centerY: r, radius: i = 10, onMouseDown: a, onMouseEnter: o, onMouseOut: s, type: c }) {
|
|
1769
|
+
return jsx("circle", {
|
|
1771
1770
|
onMouseDown: a,
|
|
1772
1771
|
onMouseEnter: o,
|
|
1773
1772
|
onMouseOut: s,
|
|
1774
|
-
className:
|
|
1775
|
-
cx:
|
|
1776
|
-
cy:
|
|
1773
|
+
className: cc([EdgeUpdaterClassName, `${EdgeUpdaterClassName}-${c}`]),
|
|
1774
|
+
cx: shiftX(n, i, t),
|
|
1775
|
+
cy: shiftY(r, i, t),
|
|
1777
1776
|
r: i,
|
|
1778
1777
|
stroke: "transparent",
|
|
1779
1778
|
fill: "transparent"
|
|
1780
1779
|
});
|
|
1781
1780
|
}
|
|
1782
|
-
function
|
|
1783
|
-
let h =
|
|
1781
|
+
function EdgeUpdateAnchors({ isReconnectable: e, reconnectRadius: t, edge: n, sourceX: r, sourceY: i, targetX: a, targetY: o, sourcePosition: s, targetPosition: c, onReconnect: u, onReconnectStart: d, onReconnectEnd: f, setReconnecting: p, setUpdateHover: m }) {
|
|
1782
|
+
let h = useStoreApi(), g = (e, t) => {
|
|
1784
1783
|
if (e.button !== 0) return;
|
|
1785
1784
|
let { autoPanOnConnect: r, domNode: i, connectionMode: a, connectionRadius: o, lib: s, onConnectStart: c, cancelConnection: m, nodeLookup: g, rfId: _, panBy: v, updateConnection: y } = h.getState(), b = t.type === "target";
|
|
1786
|
-
|
|
1785
|
+
XYHandle.onPointerDown(e.nativeEvent, {
|
|
1787
1786
|
autoPanOnConnect: r,
|
|
1788
1787
|
connectionMode: a,
|
|
1789
1788
|
connectionRadius: o,
|
|
@@ -1821,7 +1820,7 @@ function nr({ isReconnectable: e, reconnectRadius: t, edge: n, sourceX: r, sourc
|
|
|
1821
1820
|
id: n.sourceHandle ?? null,
|
|
1822
1821
|
type: "source"
|
|
1823
1822
|
}), y = () => m(!0), b = () => m(!1);
|
|
1824
|
-
return
|
|
1823
|
+
return jsxs(Fragment$1, { children: [(e === !0 || e === "source") && jsx(EdgeAnchor, {
|
|
1825
1824
|
position: s,
|
|
1826
1825
|
centerX: r,
|
|
1827
1826
|
centerY: i,
|
|
@@ -1830,7 +1829,7 @@ function nr({ isReconnectable: e, reconnectRadius: t, edge: n, sourceX: r, sourc
|
|
|
1830
1829
|
onMouseEnter: y,
|
|
1831
1830
|
onMouseOut: b,
|
|
1832
1831
|
type: "source"
|
|
1833
|
-
}), (e === !0 || e === "target") &&
|
|
1832
|
+
}), (e === !0 || e === "target") && jsx(EdgeAnchor, {
|
|
1834
1833
|
position: c,
|
|
1835
1834
|
centerX: a,
|
|
1836
1835
|
centerY: o,
|
|
@@ -1841,21 +1840,21 @@ function nr({ isReconnectable: e, reconnectRadius: t, edge: n, sourceX: r, sourc
|
|
|
1841
1840
|
type: "target"
|
|
1842
1841
|
})] });
|
|
1843
1842
|
}
|
|
1844
|
-
function
|
|
1845
|
-
let S =
|
|
1843
|
+
function EdgeWrapper({ id: t, edgesFocusable: n, edgesReconnectable: r, elementsSelectable: i, onClick: a, onDoubleClick: o, onContextMenu: s, onMouseEnter: c, onMouseMove: l, onMouseLeave: u, reconnectRadius: d, onReconnect: f, onReconnectStart: p, onReconnectEnd: m, rfId: h, edgeTypes: g, noPanClassName: _, onError: v, disableKeyboardA11y: y }) {
|
|
1844
|
+
let S = useStore((e) => e.edgeLookup.get(t)), C = useStore((e) => e.defaultEdgeOptions);
|
|
1846
1845
|
S = C ? {
|
|
1847
1846
|
...C,
|
|
1848
1847
|
...S
|
|
1849
1848
|
} : S;
|
|
1850
|
-
let w = S.type || "default", T = g?.[w] ||
|
|
1851
|
-
T === void 0 && (v?.("011",
|
|
1852
|
-
let E = !!(S.focusable || n && S.focusable === void 0), D = f !== void 0 && (S.reconnectable || r && S.reconnectable === void 0), O = !!(S.selectable || i && S.selectable === void 0),
|
|
1849
|
+
let w = S.type || "default", T = g?.[w] || builtinEdgeTypes[w];
|
|
1850
|
+
T === void 0 && (v?.("011", errorMessages.error011(w)), w = "default", T = g?.default || builtinEdgeTypes.default);
|
|
1851
|
+
let E = !!(S.focusable || n && S.focusable === void 0), D = f !== void 0 && (S.reconnectable || r && S.reconnectable === void 0), O = !!(S.selectable || i && S.selectable === void 0), k = useRef(null), [A, M] = useState(!1), [P, F] = useState(!1), I = useStoreApi(), { zIndex: L, sourceX: z, sourceY: B, targetX: V, targetY: H, sourcePosition: U, targetPosition: W } = useStore(useCallback((e) => {
|
|
1853
1852
|
let n = e.nodeLookup.get(S.source), r = e.nodeLookup.get(S.target);
|
|
1854
1853
|
if (!n || !r) return {
|
|
1855
1854
|
zIndex: S.zIndex,
|
|
1856
|
-
...
|
|
1855
|
+
...nullPosition
|
|
1857
1856
|
};
|
|
1858
|
-
let i =
|
|
1857
|
+
let i = getEdgePosition({
|
|
1859
1858
|
id: t,
|
|
1860
1859
|
sourceNode: n,
|
|
1861
1860
|
targetNode: r,
|
|
@@ -1865,7 +1864,7 @@ function rr({ id: t, edgesFocusable: n, edgesReconnectable: r, elementsSelectabl
|
|
|
1865
1864
|
onError: v
|
|
1866
1865
|
});
|
|
1867
1866
|
return {
|
|
1868
|
-
zIndex:
|
|
1867
|
+
zIndex: getElevatedEdgeZIndex({
|
|
1869
1868
|
selected: S.selected,
|
|
1870
1869
|
zIndex: S.zIndex,
|
|
1871
1870
|
sourceNode: n,
|
|
@@ -1873,7 +1872,7 @@ function rr({ id: t, edgesFocusable: n, edgesReconnectable: r, elementsSelectabl
|
|
|
1873
1872
|
elevateOnSelect: e.elevateEdgesOnSelect,
|
|
1874
1873
|
zIndexMode: e.zIndexMode
|
|
1875
1874
|
}),
|
|
1876
|
-
...i ||
|
|
1875
|
+
...i || nullPosition
|
|
1877
1876
|
};
|
|
1878
1877
|
}, [
|
|
1879
1878
|
S.source,
|
|
@@ -1882,29 +1881,29 @@ function rr({ id: t, edgesFocusable: n, edgesReconnectable: r, elementsSelectabl
|
|
|
1882
1881
|
S.targetHandle,
|
|
1883
1882
|
S.selected,
|
|
1884
1883
|
S.zIndex
|
|
1885
|
-
]),
|
|
1886
|
-
if (S.hidden ||
|
|
1887
|
-
let
|
|
1884
|
+
]), shallow), G = useMemo(() => S.markerStart ? `url('#${getMarkerId(S.markerStart, h)}')` : void 0, [S.markerStart, h]), K = useMemo(() => S.markerEnd ? `url('#${getMarkerId(S.markerEnd, h)}')` : void 0, [S.markerEnd, h]);
|
|
1885
|
+
if (S.hidden || z === null || B === null || V === null || H === null) return null;
|
|
1886
|
+
let q = (e) => {
|
|
1888
1887
|
let { addSelectedEdges: n, unselectNodesAndEdges: r, multiSelectionActive: i } = I.getState();
|
|
1889
1888
|
O && (I.setState({ nodesSelectionActive: !1 }), S.selected && i ? (r({
|
|
1890
1889
|
nodes: [],
|
|
1891
1890
|
edges: [S]
|
|
1892
|
-
}),
|
|
1893
|
-
},
|
|
1891
|
+
}), k.current?.blur()) : n([t])), a && a(e, S);
|
|
1892
|
+
}, J = o ? (e) => {
|
|
1894
1893
|
o(e, { ...S });
|
|
1895
|
-
} : void 0,
|
|
1894
|
+
} : void 0, Y = s ? (e) => {
|
|
1896
1895
|
s(e, { ...S });
|
|
1897
|
-
} : void 0,
|
|
1896
|
+
} : void 0, X = c ? (e) => {
|
|
1898
1897
|
c(e, { ...S });
|
|
1899
|
-
} : void 0,
|
|
1898
|
+
} : void 0, Z = l ? (e) => {
|
|
1900
1899
|
l(e, { ...S });
|
|
1901
|
-
} : void 0,
|
|
1900
|
+
} : void 0, Vn = u ? (e) => {
|
|
1902
1901
|
u(e, { ...S });
|
|
1903
1902
|
} : void 0;
|
|
1904
|
-
return
|
|
1903
|
+
return jsx("svg", {
|
|
1905
1904
|
style: { zIndex: L },
|
|
1906
|
-
children:
|
|
1907
|
-
className:
|
|
1905
|
+
children: jsxs("g", {
|
|
1906
|
+
className: cc([
|
|
1908
1907
|
"react-flow__edge",
|
|
1909
1908
|
`react-flow__edge-${w}`,
|
|
1910
1909
|
S.className,
|
|
@@ -1913,20 +1912,20 @@ function rr({ id: t, edgesFocusable: n, edgesReconnectable: r, elementsSelectabl
|
|
|
1913
1912
|
selected: S.selected,
|
|
1914
1913
|
animated: S.animated,
|
|
1915
1914
|
inactive: !O && !a,
|
|
1916
|
-
updating:
|
|
1915
|
+
updating: A,
|
|
1917
1916
|
selectable: O
|
|
1918
1917
|
}
|
|
1919
1918
|
]),
|
|
1920
|
-
onClick:
|
|
1921
|
-
onDoubleClick:
|
|
1922
|
-
onContextMenu:
|
|
1923
|
-
onMouseEnter:
|
|
1924
|
-
onMouseMove:
|
|
1925
|
-
onMouseLeave:
|
|
1919
|
+
onClick: q,
|
|
1920
|
+
onDoubleClick: J,
|
|
1921
|
+
onContextMenu: Y,
|
|
1922
|
+
onMouseEnter: X,
|
|
1923
|
+
onMouseMove: Z,
|
|
1924
|
+
onMouseLeave: Vn,
|
|
1926
1925
|
onKeyDown: E ? (e) => {
|
|
1927
|
-
if (!y &&
|
|
1926
|
+
if (!y && elementSelectionKeys.includes(e.key) && O) {
|
|
1928
1927
|
let { unselectNodesAndEdges: n, addSelectedEdges: r } = I.getState();
|
|
1929
|
-
e.key === "Escape" ? (
|
|
1928
|
+
e.key === "Escape" ? (k.current?.blur(), n({ edges: [S] })) : r([t]);
|
|
1930
1929
|
}
|
|
1931
1930
|
} : void 0,
|
|
1932
1931
|
tabIndex: E ? 0 : void 0,
|
|
@@ -1935,10 +1934,10 @@ function rr({ id: t, edgesFocusable: n, edgesReconnectable: r, elementsSelectabl
|
|
|
1935
1934
|
"data-id": t,
|
|
1936
1935
|
"data-testid": `rf__edge-${t}`,
|
|
1937
1936
|
"aria-label": S.ariaLabel === null ? void 0 : S.ariaLabel || `Edge from ${S.source} to ${S.target}`,
|
|
1938
|
-
"aria-describedby": E ? `${
|
|
1939
|
-
ref:
|
|
1937
|
+
"aria-describedby": E ? `${ARIA_EDGE_DESC_KEY}-${h}` : void 0,
|
|
1938
|
+
ref: k,
|
|
1940
1939
|
...S.domAttributes,
|
|
1941
|
-
children: [!P &&
|
|
1940
|
+
children: [!P && jsx(T, {
|
|
1942
1941
|
id: t,
|
|
1943
1942
|
source: S.source,
|
|
1944
1943
|
target: S.target,
|
|
@@ -1953,54 +1952,54 @@ function rr({ id: t, edgesFocusable: n, edgesReconnectable: r, elementsSelectabl
|
|
|
1953
1952
|
labelBgStyle: S.labelBgStyle,
|
|
1954
1953
|
labelBgPadding: S.labelBgPadding,
|
|
1955
1954
|
labelBgBorderRadius: S.labelBgBorderRadius,
|
|
1956
|
-
sourceX:
|
|
1957
|
-
sourceY:
|
|
1958
|
-
targetX:
|
|
1959
|
-
targetY:
|
|
1960
|
-
sourcePosition:
|
|
1961
|
-
targetPosition:
|
|
1955
|
+
sourceX: z,
|
|
1956
|
+
sourceY: B,
|
|
1957
|
+
targetX: V,
|
|
1958
|
+
targetY: H,
|
|
1959
|
+
sourcePosition: U,
|
|
1960
|
+
targetPosition: W,
|
|
1962
1961
|
data: S.data,
|
|
1963
1962
|
style: S.style,
|
|
1964
1963
|
sourceHandleId: S.sourceHandle,
|
|
1965
1964
|
targetHandleId: S.targetHandle,
|
|
1966
|
-
markerStart:
|
|
1967
|
-
markerEnd:
|
|
1965
|
+
markerStart: G,
|
|
1966
|
+
markerEnd: K,
|
|
1968
1967
|
pathOptions: "pathOptions" in S ? S.pathOptions : void 0,
|
|
1969
1968
|
interactionWidth: S.interactionWidth
|
|
1970
|
-
}), D &&
|
|
1969
|
+
}), D && jsx(EdgeUpdateAnchors, {
|
|
1971
1970
|
edge: S,
|
|
1972
1971
|
isReconnectable: D,
|
|
1973
1972
|
reconnectRadius: d,
|
|
1974
1973
|
onReconnect: f,
|
|
1975
1974
|
onReconnectStart: p,
|
|
1976
1975
|
onReconnectEnd: m,
|
|
1977
|
-
sourceX:
|
|
1978
|
-
sourceY:
|
|
1979
|
-
targetX:
|
|
1980
|
-
targetY:
|
|
1981
|
-
sourcePosition:
|
|
1982
|
-
targetPosition:
|
|
1983
|
-
setUpdateHover:
|
|
1976
|
+
sourceX: z,
|
|
1977
|
+
sourceY: B,
|
|
1978
|
+
targetX: V,
|
|
1979
|
+
targetY: H,
|
|
1980
|
+
sourcePosition: U,
|
|
1981
|
+
targetPosition: W,
|
|
1982
|
+
setUpdateHover: M,
|
|
1984
1983
|
setReconnecting: F
|
|
1985
1984
|
})]
|
|
1986
1985
|
})
|
|
1987
1986
|
});
|
|
1988
1987
|
}
|
|
1989
|
-
var
|
|
1988
|
+
var EdgeWrapper$1 = memo(EdgeWrapper), selector$a = (e) => ({
|
|
1990
1989
|
edgesFocusable: e.edgesFocusable,
|
|
1991
1990
|
edgesReconnectable: e.edgesReconnectable,
|
|
1992
1991
|
elementsSelectable: e.elementsSelectable,
|
|
1993
1992
|
connectionMode: e.connectionMode,
|
|
1994
1993
|
onError: e.onError
|
|
1995
1994
|
});
|
|
1996
|
-
function
|
|
1997
|
-
let { edgesFocusable: g, edgesReconnectable: _, elementsSelectable: v, onError: y } =
|
|
1998
|
-
return
|
|
1995
|
+
function EdgeRendererComponent({ defaultMarkerColor: e, onlyRenderVisibleElements: t, rfId: n, edgeTypes: r, noPanClassName: i, onReconnect: a, onEdgeContextMenu: o, onEdgeMouseEnter: s, onEdgeMouseMove: c, onEdgeMouseLeave: l, onEdgeClick: u, reconnectRadius: d, onEdgeDoubleClick: f, onReconnectStart: p, onReconnectEnd: m, disableKeyboardA11y: h }) {
|
|
1996
|
+
let { edgesFocusable: g, edgesReconnectable: _, elementsSelectable: v, onError: y } = useStore(selector$a, shallow), b = useVisibleEdgeIds(t);
|
|
1997
|
+
return jsxs("div", {
|
|
1999
1998
|
className: "react-flow__edges",
|
|
2000
|
-
children: [
|
|
1999
|
+
children: [jsx(MarkerDefinitions$1, {
|
|
2001
2000
|
defaultColor: e,
|
|
2002
2001
|
rfId: n
|
|
2003
|
-
}), b.map((e) =>
|
|
2002
|
+
}), b.map((e) => jsx(EdgeWrapper$1, {
|
|
2004
2003
|
id: e,
|
|
2005
2004
|
edgesFocusable: g,
|
|
2006
2005
|
edgesReconnectable: _,
|
|
@@ -2023,25 +2022,25 @@ function or({ defaultMarkerColor: e, onlyRenderVisibleElements: t, rfId: n, edge
|
|
|
2023
2022
|
}, e))]
|
|
2024
2023
|
});
|
|
2025
2024
|
}
|
|
2026
|
-
|
|
2027
|
-
var
|
|
2028
|
-
function
|
|
2029
|
-
return
|
|
2025
|
+
EdgeRendererComponent.displayName = "EdgeRenderer";
|
|
2026
|
+
var EdgeRenderer = memo(EdgeRendererComponent), selector$9 = (e) => `translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;
|
|
2027
|
+
function Viewport({ children: e }) {
|
|
2028
|
+
return jsx("div", {
|
|
2030
2029
|
className: "react-flow__viewport xyflow__viewport react-flow__container",
|
|
2031
|
-
style: { transform:
|
|
2030
|
+
style: { transform: useStore(selector$9) },
|
|
2032
2031
|
children: e
|
|
2033
2032
|
});
|
|
2034
2033
|
}
|
|
2035
|
-
function
|
|
2036
|
-
let t =
|
|
2037
|
-
|
|
2034
|
+
function useOnInitHandler(e) {
|
|
2035
|
+
let t = useReactFlow(), n = useRef(!1);
|
|
2036
|
+
useEffect(() => {
|
|
2038
2037
|
!n.current && t.viewportInitialized && e && (setTimeout(() => e(t), 1), n.current = !0);
|
|
2039
2038
|
}, [e, t.viewportInitialized]);
|
|
2040
2039
|
}
|
|
2041
|
-
var
|
|
2042
|
-
function
|
|
2043
|
-
let t =
|
|
2044
|
-
return
|
|
2040
|
+
var selector$8 = (e) => e.panZoom?.syncViewport;
|
|
2041
|
+
function useViewportSync(e) {
|
|
2042
|
+
let t = useStore(selector$8), n = useStoreApi();
|
|
2043
|
+
return useEffect(() => {
|
|
2045
2044
|
e && (t?.(e), n.setState({ transform: [
|
|
2046
2045
|
e.x,
|
|
2047
2046
|
e.y,
|
|
@@ -2049,35 +2048,35 @@ function fr(e) {
|
|
|
2049
2048
|
] }));
|
|
2050
2049
|
}, [e, t]), null;
|
|
2051
2050
|
}
|
|
2052
|
-
function
|
|
2051
|
+
function storeSelector$1(e) {
|
|
2053
2052
|
return e.connection.inProgress ? {
|
|
2054
2053
|
...e.connection,
|
|
2055
|
-
to:
|
|
2054
|
+
to: pointToRendererPoint(e.connection.to, e.transform)
|
|
2056
2055
|
} : { ...e.connection };
|
|
2057
2056
|
}
|
|
2058
|
-
function
|
|
2059
|
-
return e ? (t) => e(
|
|
2057
|
+
function getSelector(e) {
|
|
2058
|
+
return e ? (t) => e(storeSelector$1(t)) : storeSelector$1;
|
|
2060
2059
|
}
|
|
2061
|
-
function
|
|
2062
|
-
return
|
|
2060
|
+
function useConnection(e) {
|
|
2061
|
+
return useStore(getSelector(e), shallow);
|
|
2063
2062
|
}
|
|
2064
|
-
var
|
|
2063
|
+
var selector$7 = (e) => ({
|
|
2065
2064
|
nodesConnectable: e.nodesConnectable,
|
|
2066
2065
|
isValid: e.connection.isValid,
|
|
2067
2066
|
inProgress: e.connection.inProgress,
|
|
2068
2067
|
width: e.width,
|
|
2069
2068
|
height: e.height
|
|
2070
2069
|
});
|
|
2071
|
-
function
|
|
2072
|
-
let { nodesConnectable: a, width: o, height: s, isValid: c, inProgress: l } =
|
|
2073
|
-
return o && a && l ?
|
|
2070
|
+
function ConnectionLineWrapper({ containerStyle: t, style: n, type: r, component: i }) {
|
|
2071
|
+
let { nodesConnectable: a, width: o, height: s, isValid: c, inProgress: l } = useStore(selector$7, shallow);
|
|
2072
|
+
return o && a && l ? jsx("svg", {
|
|
2074
2073
|
style: t,
|
|
2075
2074
|
width: o,
|
|
2076
2075
|
height: s,
|
|
2077
2076
|
className: "react-flow__connectionline react-flow__container",
|
|
2078
|
-
children:
|
|
2079
|
-
className:
|
|
2080
|
-
children:
|
|
2077
|
+
children: jsx("g", {
|
|
2078
|
+
className: cc(["react-flow__connection", getConnectionStatus(c)]),
|
|
2079
|
+
children: jsx(ConnectionLine, {
|
|
2081
2080
|
style: n,
|
|
2082
2081
|
type: r,
|
|
2083
2082
|
CustomComponent: i,
|
|
@@ -2086,10 +2085,10 @@ function _r({ containerStyle: t, style: n, type: r, component: i }) {
|
|
|
2086
2085
|
})
|
|
2087
2086
|
}) : null;
|
|
2088
2087
|
}
|
|
2089
|
-
var
|
|
2090
|
-
let { inProgress: a, from: o, fromNode: s, fromHandle: c, fromPosition: l, to: u, toNode: d, toHandle: f, toPosition: p, pointer: m } =
|
|
2088
|
+
var ConnectionLine = ({ style: e, type: n = ConnectionLineType.Bezier, CustomComponent: r, isValid: i }) => {
|
|
2089
|
+
let { inProgress: a, from: o, fromNode: s, fromHandle: c, fromPosition: l, to: u, toNode: d, toHandle: f, toPosition: p, pointer: m } = useConnection();
|
|
2091
2090
|
if (!a) return;
|
|
2092
|
-
if (r) return
|
|
2091
|
+
if (r) return jsx(r, {
|
|
2093
2092
|
connectionLineType: n,
|
|
2094
2093
|
connectionLineStyle: e,
|
|
2095
2094
|
fromNode: s,
|
|
@@ -2100,7 +2099,7 @@ var vr = ({ style: e, type: n = t.Bezier, CustomComponent: r, isValid: i }) => {
|
|
|
2100
2099
|
toY: u.y,
|
|
2101
2100
|
fromPosition: l,
|
|
2102
2101
|
toPosition: p,
|
|
2103
|
-
connectionStatus:
|
|
2102
|
+
connectionStatus: getConnectionStatus(i),
|
|
2104
2103
|
toNode: d,
|
|
2105
2104
|
toHandle: f,
|
|
2106
2105
|
pointer: m
|
|
@@ -2114,63 +2113,63 @@ var vr = ({ style: e, type: n = t.Bezier, CustomComponent: r, isValid: i }) => {
|
|
|
2114
2113
|
targetPosition: p
|
|
2115
2114
|
};
|
|
2116
2115
|
switch (n) {
|
|
2117
|
-
case
|
|
2118
|
-
[h] =
|
|
2116
|
+
case ConnectionLineType.Bezier:
|
|
2117
|
+
[h] = getBezierPath(g);
|
|
2119
2118
|
break;
|
|
2120
|
-
case
|
|
2121
|
-
[h] =
|
|
2119
|
+
case ConnectionLineType.SimpleBezier:
|
|
2120
|
+
[h] = getSimpleBezierPath(g);
|
|
2122
2121
|
break;
|
|
2123
|
-
case
|
|
2124
|
-
[h] =
|
|
2122
|
+
case ConnectionLineType.Step:
|
|
2123
|
+
[h] = getSmoothStepPath({
|
|
2125
2124
|
...g,
|
|
2126
2125
|
borderRadius: 0
|
|
2127
2126
|
});
|
|
2128
2127
|
break;
|
|
2129
|
-
case
|
|
2130
|
-
[h] =
|
|
2128
|
+
case ConnectionLineType.SmoothStep:
|
|
2129
|
+
[h] = getSmoothStepPath(g);
|
|
2131
2130
|
break;
|
|
2132
|
-
default: [h] =
|
|
2131
|
+
default: [h] = getStraightPath(g);
|
|
2133
2132
|
}
|
|
2134
|
-
return
|
|
2133
|
+
return jsx("path", {
|
|
2135
2134
|
d: h,
|
|
2136
2135
|
fill: "none",
|
|
2137
2136
|
className: "react-flow__connection-path",
|
|
2138
2137
|
style: e
|
|
2139
2138
|
});
|
|
2140
2139
|
};
|
|
2141
|
-
|
|
2142
|
-
var
|
|
2143
|
-
function
|
|
2144
|
-
let t =
|
|
2145
|
-
|
|
2140
|
+
ConnectionLine.displayName = "ConnectionLine";
|
|
2141
|
+
var emptyTypes = {};
|
|
2142
|
+
function useNodeOrEdgeTypesWarning(e = emptyTypes) {
|
|
2143
|
+
let t = useRef(e), n = useStoreApi();
|
|
2144
|
+
useEffect(() => {
|
|
2146
2145
|
if (process.env.NODE_ENV === "development") {
|
|
2147
2146
|
let r = new Set([...Object.keys(t.current), ...Object.keys(e)]);
|
|
2148
2147
|
for (let i of r) if (t.current[i] !== e[i]) {
|
|
2149
|
-
n.getState().onError?.("002",
|
|
2148
|
+
n.getState().onError?.("002", errorMessages.error002());
|
|
2150
2149
|
break;
|
|
2151
2150
|
}
|
|
2152
2151
|
t.current = e;
|
|
2153
2152
|
}
|
|
2154
2153
|
}, [e]);
|
|
2155
2154
|
}
|
|
2156
|
-
function
|
|
2157
|
-
let e =
|
|
2158
|
-
|
|
2155
|
+
function useStylesLoadedWarning() {
|
|
2156
|
+
let e = useStoreApi(), t = useRef(!1);
|
|
2157
|
+
useEffect(() => {
|
|
2159
2158
|
if (process.env.NODE_ENV === "development" && !t.current) {
|
|
2160
2159
|
let n = document.querySelector(".react-flow__pane");
|
|
2161
|
-
n && window.getComputedStyle(n).zIndex !== "1" && e.getState().onError?.("013",
|
|
2160
|
+
n && window.getComputedStyle(n).zIndex !== "1" && e.getState().onError?.("013", errorMessages.error013("react")), t.current = !0;
|
|
2162
2161
|
}
|
|
2163
2162
|
}, []);
|
|
2164
2163
|
}
|
|
2165
|
-
function
|
|
2166
|
-
return
|
|
2167
|
-
onPaneClick:
|
|
2168
|
-
onPaneMouseEnter:
|
|
2169
|
-
onPaneMouseMove:
|
|
2170
|
-
onPaneMouseLeave:
|
|
2171
|
-
onPaneContextMenu:
|
|
2172
|
-
onPaneScroll:
|
|
2173
|
-
paneClickDistance:
|
|
2164
|
+
function GraphViewComponent({ nodeTypes: e, edgeTypes: t, onInit: n, onNodeClick: r, onEdgeClick: i, onNodeDoubleClick: a, onEdgeDoubleClick: o, onNodeMouseEnter: s, onNodeMouseMove: c, onNodeMouseLeave: l, onNodeContextMenu: u, onSelectionContextMenu: d, onSelectionStart: f, onSelectionEnd: p, connectionLineType: m, connectionLineStyle: h, connectionLineComponent: g, connectionLineContainerStyle: _, selectionKeyCode: v, selectionOnDrag: y, selectionMode: b, multiSelectionKeyCode: x, panActivationKeyCode: S, zoomActivationKeyCode: C, deleteKeyCode: w, onlyRenderVisibleElements: T, elementsSelectable: E, defaultViewport: D, translateExtent: O, minZoom: k, maxZoom: A, preventScrolling: j, defaultMarkerColor: M, zoomOnScroll: N, zoomOnPinch: P, panOnScroll: F, panOnScrollSpeed: I, panOnScrollMode: L, zoomOnDoubleClick: R, panOnDrag: z, onPaneClick: B, onPaneMouseEnter: V, onPaneMouseMove: H, onPaneMouseLeave: U, onPaneScroll: W, onPaneContextMenu: G, paneClickDistance: K, nodeClickDistance: q, onEdgeContextMenu: J, onEdgeMouseEnter: Y, onEdgeMouseMove: X, onEdgeMouseLeave: Z, reconnectRadius: Vn, onReconnect: Hn, onReconnectStart: Un, onReconnectEnd: Wn, noDragClassName: Gn, noWheelClassName: Kn, noPanClassName: Q, disableKeyboardA11y: $, nodeExtent: qn, rfId: Jn, viewport: Yn, onViewportChange: Xn }) {
|
|
2165
|
+
return useNodeOrEdgeTypesWarning(e), useNodeOrEdgeTypesWarning(t), useStylesLoadedWarning(), useOnInitHandler(n), useViewportSync(Yn), jsx(FlowRenderer, {
|
|
2166
|
+
onPaneClick: B,
|
|
2167
|
+
onPaneMouseEnter: V,
|
|
2168
|
+
onPaneMouseMove: H,
|
|
2169
|
+
onPaneMouseLeave: U,
|
|
2170
|
+
onPaneContextMenu: G,
|
|
2171
|
+
onPaneScroll: W,
|
|
2172
|
+
paneClickDistance: K,
|
|
2174
2173
|
deleteKeyCode: w,
|
|
2175
2174
|
selectionKeyCode: v,
|
|
2176
2175
|
selectionOnDrag: y,
|
|
@@ -2183,50 +2182,50 @@ function Sr({ nodeTypes: e, edgeTypes: t, onInit: n, onNodeClick: r, onEdgeClick
|
|
|
2183
2182
|
elementsSelectable: E,
|
|
2184
2183
|
zoomOnScroll: N,
|
|
2185
2184
|
zoomOnPinch: P,
|
|
2186
|
-
zoomOnDoubleClick:
|
|
2185
|
+
zoomOnDoubleClick: R,
|
|
2187
2186
|
panOnScroll: F,
|
|
2188
|
-
panOnScrollSpeed:
|
|
2189
|
-
panOnScrollMode:
|
|
2190
|
-
panOnDrag:
|
|
2187
|
+
panOnScrollSpeed: I,
|
|
2188
|
+
panOnScrollMode: L,
|
|
2189
|
+
panOnDrag: z,
|
|
2191
2190
|
defaultViewport: D,
|
|
2192
2191
|
translateExtent: O,
|
|
2193
2192
|
minZoom: k,
|
|
2194
2193
|
maxZoom: A,
|
|
2195
2194
|
onSelectionContextMenu: d,
|
|
2196
2195
|
preventScrolling: j,
|
|
2197
|
-
noDragClassName:
|
|
2198
|
-
noWheelClassName:
|
|
2199
|
-
noPanClassName:
|
|
2200
|
-
disableKeyboardA11y:
|
|
2201
|
-
onViewportChange:
|
|
2202
|
-
isControlledViewport: !!
|
|
2203
|
-
children:
|
|
2204
|
-
|
|
2196
|
+
noDragClassName: Gn,
|
|
2197
|
+
noWheelClassName: Kn,
|
|
2198
|
+
noPanClassName: Q,
|
|
2199
|
+
disableKeyboardA11y: $,
|
|
2200
|
+
onViewportChange: Xn,
|
|
2201
|
+
isControlledViewport: !!Yn,
|
|
2202
|
+
children: jsxs(Viewport, { children: [
|
|
2203
|
+
jsx(EdgeRenderer, {
|
|
2205
2204
|
edgeTypes: t,
|
|
2206
2205
|
onEdgeClick: i,
|
|
2207
2206
|
onEdgeDoubleClick: o,
|
|
2208
|
-
onReconnect:
|
|
2209
|
-
onReconnectStart:
|
|
2210
|
-
onReconnectEnd:
|
|
2207
|
+
onReconnect: Hn,
|
|
2208
|
+
onReconnectStart: Un,
|
|
2209
|
+
onReconnectEnd: Wn,
|
|
2211
2210
|
onlyRenderVisibleElements: T,
|
|
2212
|
-
onEdgeContextMenu:
|
|
2213
|
-
onEdgeMouseEnter:
|
|
2214
|
-
onEdgeMouseMove:
|
|
2215
|
-
onEdgeMouseLeave:
|
|
2216
|
-
reconnectRadius:
|
|
2211
|
+
onEdgeContextMenu: J,
|
|
2212
|
+
onEdgeMouseEnter: Y,
|
|
2213
|
+
onEdgeMouseMove: X,
|
|
2214
|
+
onEdgeMouseLeave: Z,
|
|
2215
|
+
reconnectRadius: Vn,
|
|
2217
2216
|
defaultMarkerColor: M,
|
|
2218
|
-
noPanClassName:
|
|
2219
|
-
disableKeyboardA11y:
|
|
2220
|
-
rfId:
|
|
2217
|
+
noPanClassName: Q,
|
|
2218
|
+
disableKeyboardA11y: $,
|
|
2219
|
+
rfId: Jn
|
|
2221
2220
|
}),
|
|
2222
|
-
|
|
2221
|
+
jsx(ConnectionLineWrapper, {
|
|
2223
2222
|
style: h,
|
|
2224
2223
|
type: m,
|
|
2225
2224
|
component: g,
|
|
2226
2225
|
containerStyle: _
|
|
2227
2226
|
}),
|
|
2228
|
-
|
|
2229
|
-
|
|
2227
|
+
jsx("div", { className: "react-flow__edgelabel-renderer" }),
|
|
2228
|
+
jsx(NodeRenderer, {
|
|
2230
2229
|
nodeTypes: e,
|
|
2231
2230
|
onNodeClick: r,
|
|
2232
2231
|
onNodeDoubleClick: a,
|
|
@@ -2234,23 +2233,23 @@ function Sr({ nodeTypes: e, edgeTypes: t, onInit: n, onNodeClick: r, onEdgeClick
|
|
|
2234
2233
|
onNodeMouseMove: c,
|
|
2235
2234
|
onNodeMouseLeave: l,
|
|
2236
2235
|
onNodeContextMenu: u,
|
|
2237
|
-
nodeClickDistance:
|
|
2236
|
+
nodeClickDistance: q,
|
|
2238
2237
|
onlyRenderVisibleElements: T,
|
|
2239
|
-
noPanClassName:
|
|
2240
|
-
noDragClassName:
|
|
2241
|
-
disableKeyboardA11y:
|
|
2242
|
-
nodeExtent:
|
|
2243
|
-
rfId:
|
|
2238
|
+
noPanClassName: Q,
|
|
2239
|
+
noDragClassName: Gn,
|
|
2240
|
+
disableKeyboardA11y: $,
|
|
2241
|
+
nodeExtent: qn,
|
|
2242
|
+
rfId: Jn
|
|
2244
2243
|
}),
|
|
2245
|
-
|
|
2244
|
+
jsx("div", { className: "react-flow__viewport-portal" })
|
|
2246
2245
|
] })
|
|
2247
2246
|
});
|
|
2248
2247
|
}
|
|
2249
|
-
|
|
2250
|
-
var
|
|
2251
|
-
let h = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), x = i ?? t ?? [], S = r ?? e ?? [], C = d ?? [0, 0], w = f ??
|
|
2252
|
-
|
|
2253
|
-
let { nodesInitialized: T } =
|
|
2248
|
+
GraphViewComponent.displayName = "GraphView";
|
|
2249
|
+
var GraphView = memo(GraphViewComponent), getInitialState = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, width: a, height: o, fitView: s, fitViewOptions: c, minZoom: l = .5, maxZoom: u = 2, nodeOrigin: d, nodeExtent: f, zIndexMode: p = "basic" } = {}) => {
|
|
2250
|
+
let h = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), x = i ?? t ?? [], S = r ?? e ?? [], C = d ?? [0, 0], w = f ?? infiniteExtent;
|
|
2251
|
+
updateConnectionLookup(_, b, x);
|
|
2252
|
+
let { nodesInitialized: T } = adoptUserNodes(S, h, g, {
|
|
2254
2253
|
nodeOrigin: C,
|
|
2255
2254
|
nodeExtent: w,
|
|
2256
2255
|
zIndexMode: p
|
|
@@ -2260,7 +2259,7 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
|
|
|
2260
2259
|
1
|
|
2261
2260
|
];
|
|
2262
2261
|
if (s && a && o) {
|
|
2263
|
-
let { x: e, y: t, zoom: n } =
|
|
2262
|
+
let { x: e, y: t, zoom: n } = getViewportForBounds(getInternalNodesBounds(h, { filter: (e) => !!((e.width || e.initialWidth) && (e.height || e.initialHeight)) }), a, o, l, u, c?.padding ?? .1);
|
|
2264
2263
|
E = [
|
|
2265
2264
|
e,
|
|
2266
2265
|
t,
|
|
@@ -2286,12 +2285,12 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
|
|
|
2286
2285
|
panZoom: null,
|
|
2287
2286
|
minZoom: l,
|
|
2288
2287
|
maxZoom: u,
|
|
2289
|
-
translateExtent:
|
|
2288
|
+
translateExtent: infiniteExtent,
|
|
2290
2289
|
nodeExtent: w,
|
|
2291
2290
|
nodesSelectionActive: !1,
|
|
2292
2291
|
userSelectionActive: !1,
|
|
2293
2292
|
userSelectionRect: null,
|
|
2294
|
-
connectionMode:
|
|
2293
|
+
connectionMode: ConnectionMode.Strict,
|
|
2295
2294
|
domNode: null,
|
|
2296
2295
|
paneDragging: !1,
|
|
2297
2296
|
noPanClassName: "nopan",
|
|
@@ -2313,7 +2312,7 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
|
|
|
2313
2312
|
fitViewQueued: s ?? !1,
|
|
2314
2313
|
fitViewOptions: c,
|
|
2315
2314
|
fitViewResolver: null,
|
|
2316
|
-
connection: { ...
|
|
2315
|
+
connection: { ...initialConnection },
|
|
2317
2316
|
connectionClickStartHandle: null,
|
|
2318
2317
|
connectOnClick: !0,
|
|
2319
2318
|
ariaLiveMessage: "",
|
|
@@ -2322,20 +2321,20 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
|
|
|
2322
2321
|
autoPanOnNodeFocus: !0,
|
|
2323
2322
|
autoPanSpeed: 15,
|
|
2324
2323
|
connectionRadius: 20,
|
|
2325
|
-
onError:
|
|
2324
|
+
onError: devWarn,
|
|
2326
2325
|
isValidConnection: void 0,
|
|
2327
2326
|
onSelectionChangeHandlers: [],
|
|
2328
2327
|
lib: "react",
|
|
2329
2328
|
debug: !1,
|
|
2330
|
-
ariaLabelConfig:
|
|
2329
|
+
ariaLabelConfig: defaultAriaLabelConfig,
|
|
2331
2330
|
zIndexMode: p,
|
|
2332
2331
|
onNodesChangeMiddlewareMap: /* @__PURE__ */ new Map(),
|
|
2333
2332
|
onEdgesChangeMiddlewareMap: /* @__PURE__ */ new Map()
|
|
2334
2333
|
};
|
|
2335
|
-
},
|
|
2334
|
+
}, createStore = ({ nodes: e, edges: t, defaultNodes: n, defaultEdges: r, width: i, height: o, fitView: s, fitViewOptions: c, minZoom: l, maxZoom: u, nodeOrigin: d, nodeExtent: f, zIndexMode: p }) => createWithEqualityFn((h, g) => {
|
|
2336
2335
|
async function _() {
|
|
2337
2336
|
let { nodeLookup: e, panZoom: t, fitViewOptions: n, fitViewResolver: r, width: i, height: a, minZoom: o, maxZoom: s } = g();
|
|
2338
|
-
t && (await
|
|
2337
|
+
t && (await fitViewport({
|
|
2339
2338
|
nodes: e,
|
|
2340
2339
|
width: i,
|
|
2341
2340
|
height: a,
|
|
@@ -2345,7 +2344,7 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
|
|
|
2345
2344
|
}, n), r?.resolve(!0), h({ fitViewResolver: null }));
|
|
2346
2345
|
}
|
|
2347
2346
|
return {
|
|
2348
|
-
...
|
|
2347
|
+
...getInitialState({
|
|
2349
2348
|
nodes: e,
|
|
2350
2349
|
edges: t,
|
|
2351
2350
|
width: i,
|
|
@@ -2361,7 +2360,7 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
|
|
|
2361
2360
|
zIndexMode: p
|
|
2362
2361
|
}),
|
|
2363
2362
|
setNodes: (e) => {
|
|
2364
|
-
let { nodeLookup: t, parentLookup: n, nodeOrigin: r, elevateNodesOnSelect: i, fitViewQueued: a, zIndexMode: o, nodesSelectionActive: s } = g(), { nodesInitialized: c, hasSelectedNodes: l } =
|
|
2363
|
+
let { nodeLookup: t, parentLookup: n, nodeOrigin: r, elevateNodesOnSelect: i, fitViewQueued: a, zIndexMode: o, nodesSelectionActive: s } = g(), { nodesInitialized: c, hasSelectedNodes: l } = adoptUserNodes(e, t, n, {
|
|
2365
2364
|
nodeOrigin: r,
|
|
2366
2365
|
nodeExtent: f,
|
|
2367
2366
|
elevateNodesOnSelect: i,
|
|
@@ -2382,7 +2381,7 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
|
|
|
2382
2381
|
},
|
|
2383
2382
|
setEdges: (e) => {
|
|
2384
2383
|
let { connectionLookup: t, edgeLookup: n } = g();
|
|
2385
|
-
|
|
2384
|
+
updateConnectionLookup(t, n, e), h({ edges: e });
|
|
2386
2385
|
},
|
|
2387
2386
|
setDefaultNodesAndEdges: (e, t) => {
|
|
2388
2387
|
if (e) {
|
|
@@ -2395,8 +2394,8 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
|
|
|
2395
2394
|
}
|
|
2396
2395
|
},
|
|
2397
2396
|
updateNodeInternals: (e) => {
|
|
2398
|
-
let { triggerNodeChanges: t, nodeLookup: n, parentLookup: r, domNode: i, nodeOrigin: a, nodeExtent: o, debug: s, fitViewQueued: c, zIndexMode: l } = g(), { changes: u, updatedInternals: d } =
|
|
2399
|
-
d && (
|
|
2397
|
+
let { triggerNodeChanges: t, nodeLookup: n, parentLookup: r, domNode: i, nodeOrigin: a, nodeExtent: o, debug: s, fitViewQueued: c, zIndexMode: l } = g(), { changes: u, updatedInternals: d } = updateNodeInternals(e, n, r, i, a, o, l);
|
|
2398
|
+
d && (updateAbsolutePositions(n, r, {
|
|
2400
2399
|
nodeOrigin: a,
|
|
2401
2400
|
nodeExtent: o,
|
|
2402
2401
|
zIndexMode: l
|
|
@@ -2418,7 +2417,7 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
|
|
|
2418
2417
|
dragging: t
|
|
2419
2418
|
};
|
|
2420
2419
|
if (e && s.inProgress && s.fromNode.id === e.id) {
|
|
2421
|
-
let t =
|
|
2420
|
+
let t = getHandlePosition(e, s.fromHandle, Position.Left, !0);
|
|
2422
2421
|
c({
|
|
2423
2422
|
...s,
|
|
2424
2423
|
from: t
|
|
@@ -2435,7 +2434,7 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
|
|
|
2435
2434
|
}), r.push(d);
|
|
2436
2435
|
}
|
|
2437
2436
|
if (n.length > 0) {
|
|
2438
|
-
let { parentLookup: e, nodeOrigin: t } = g(), a =
|
|
2437
|
+
let { parentLookup: e, nodeOrigin: t } = g(), a = handleExpandParent(n, i, e, t);
|
|
2439
2438
|
r.push(...a);
|
|
2440
2439
|
}
|
|
2441
2440
|
for (let e of l.values()) r = e(r);
|
|
@@ -2443,37 +2442,37 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
|
|
|
2443
2442
|
},
|
|
2444
2443
|
triggerNodeChanges: (e) => {
|
|
2445
2444
|
let { onNodesChange: t, setNodes: n, nodes: r, hasDefaultNodes: i, debug: a } = g();
|
|
2446
|
-
e?.length && (i && n(
|
|
2445
|
+
e?.length && (i && n(applyNodeChanges(e, r)), a && console.log("React Flow: trigger node changes", e), t?.(e));
|
|
2447
2446
|
},
|
|
2448
2447
|
triggerEdgeChanges: (e) => {
|
|
2449
2448
|
let { onEdgesChange: t, setEdges: n, edges: r, hasDefaultEdges: i, debug: a } = g();
|
|
2450
|
-
e?.length && (i && n(
|
|
2449
|
+
e?.length && (i && n(applyEdgeChanges(e, r)), a && console.log("React Flow: trigger edge changes", e), t?.(e));
|
|
2451
2450
|
},
|
|
2452
2451
|
addSelectedNodes: (e) => {
|
|
2453
2452
|
let { multiSelectionActive: t, edgeLookup: n, nodeLookup: r, triggerNodeChanges: i, triggerEdgeChanges: a } = g();
|
|
2454
2453
|
if (t) {
|
|
2455
|
-
i(e.map((e) =>
|
|
2454
|
+
i(e.map((e) => createSelectionChange(e, !0)));
|
|
2456
2455
|
return;
|
|
2457
2456
|
}
|
|
2458
|
-
i(
|
|
2457
|
+
i(getSelectionChanges(r, new Set([...e]), !0)), a(getSelectionChanges(n));
|
|
2459
2458
|
},
|
|
2460
2459
|
addSelectedEdges: (e) => {
|
|
2461
2460
|
let { multiSelectionActive: t, edgeLookup: n, nodeLookup: r, triggerNodeChanges: i, triggerEdgeChanges: a } = g();
|
|
2462
2461
|
if (t) {
|
|
2463
|
-
a(e.map((e) =>
|
|
2462
|
+
a(e.map((e) => createSelectionChange(e, !0)));
|
|
2464
2463
|
return;
|
|
2465
2464
|
}
|
|
2466
|
-
a(
|
|
2465
|
+
a(getSelectionChanges(n, new Set([...e]))), i(getSelectionChanges(r, /* @__PURE__ */ new Set(), !0));
|
|
2467
2466
|
},
|
|
2468
2467
|
unselectNodesAndEdges: ({ nodes: e, edges: t } = {}) => {
|
|
2469
2468
|
let { edges: n, nodes: r, nodeLookup: i, triggerNodeChanges: a, triggerEdgeChanges: o } = g(), s = e || r, c = t || n, l = [];
|
|
2470
2469
|
for (let e of s) {
|
|
2471
2470
|
if (!e.selected) continue;
|
|
2472
2471
|
let t = i.get(e.id);
|
|
2473
|
-
t && (t.selected = !1), l.push(
|
|
2472
|
+
t && (t.selected = !1), l.push(createSelectionChange(e.id, !1));
|
|
2474
2473
|
}
|
|
2475
2474
|
let u = [];
|
|
2476
|
-
for (let e of c) e.selected && u.push(
|
|
2475
|
+
for (let e of c) e.selected && u.push(createSelectionChange(e.id, !1));
|
|
2477
2476
|
a(l), o(u);
|
|
2478
2477
|
},
|
|
2479
2478
|
setMinZoom: (e) => {
|
|
@@ -2490,12 +2489,12 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
|
|
|
2490
2489
|
resetSelectedElements: () => {
|
|
2491
2490
|
let { edges: e, nodes: t, triggerNodeChanges: n, triggerEdgeChanges: r, elementsSelectable: i } = g();
|
|
2492
2491
|
if (!i) return;
|
|
2493
|
-
let a = t.reduce((e, t) => t.selected ? [...e,
|
|
2492
|
+
let a = t.reduce((e, t) => t.selected ? [...e, createSelectionChange(t.id, !1)] : e, []), o = e.reduce((e, t) => t.selected ? [...e, createSelectionChange(t.id, !1)] : e, []);
|
|
2494
2493
|
n(a), r(o);
|
|
2495
2494
|
},
|
|
2496
2495
|
setNodeExtent: (e) => {
|
|
2497
2496
|
let { nodes: t, nodeLookup: n, parentLookup: r, nodeOrigin: i, elevateNodesOnSelect: a, nodeExtent: o, zIndexMode: s } = g();
|
|
2498
|
-
e[0][0] === o[0][0] && e[0][1] === o[0][1] && e[1][0] === o[1][0] && e[1][1] === o[1][1] || (
|
|
2497
|
+
e[0][0] === o[0][0] && e[0][1] === o[0][1] && e[1][0] === o[1][0] && e[1][1] === o[1][1] || (adoptUserNodes(t, n, r, {
|
|
2499
2498
|
nodeOrigin: i,
|
|
2500
2499
|
nodeExtent: e,
|
|
2501
2500
|
elevateNodesOnSelect: a,
|
|
@@ -2505,7 +2504,7 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
|
|
|
2505
2504
|
},
|
|
2506
2505
|
panBy: (e) => {
|
|
2507
2506
|
let { transform: t, width: n, height: r, panZoom: i, translateExtent: a } = g();
|
|
2508
|
-
return
|
|
2507
|
+
return panBy({
|
|
2509
2508
|
delta: e,
|
|
2510
2509
|
panZoom: i,
|
|
2511
2510
|
transform: t,
|
|
@@ -2529,16 +2528,16 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
|
|
|
2529
2528
|
}), Promise.resolve(!0);
|
|
2530
2529
|
},
|
|
2531
2530
|
cancelConnection: () => {
|
|
2532
|
-
h({ connection: { ...
|
|
2531
|
+
h({ connection: { ...initialConnection } });
|
|
2533
2532
|
},
|
|
2534
2533
|
updateConnection: (e) => {
|
|
2535
2534
|
h({ connection: e });
|
|
2536
2535
|
},
|
|
2537
|
-
reset: () => h({ ...
|
|
2536
|
+
reset: () => h({ ...getInitialState() })
|
|
2538
2537
|
};
|
|
2539
2538
|
}, Object.is);
|
|
2540
|
-
function
|
|
2541
|
-
let [m] =
|
|
2539
|
+
function ReactFlowProvider({ initialNodes: e, initialEdges: t, defaultNodes: n, defaultEdges: r, initialWidth: i, initialHeight: a, initialMinZoom: o, initialMaxZoom: s, initialFitViewOptions: c, fitView: l, nodeOrigin: u, nodeExtent: d, zIndexMode: f, children: p }) {
|
|
2540
|
+
let [m] = useState(() => createStore({
|
|
2542
2541
|
nodes: e,
|
|
2543
2542
|
edges: t,
|
|
2544
2543
|
defaultNodes: n,
|
|
@@ -2553,13 +2552,13 @@ function Er({ initialNodes: e, initialEdges: t, defaultNodes: n, defaultEdges: r
|
|
|
2553
2552
|
nodeExtent: d,
|
|
2554
2553
|
zIndexMode: f
|
|
2555
2554
|
}));
|
|
2556
|
-
return
|
|
2555
|
+
return jsx(Provider$1, {
|
|
2557
2556
|
value: m,
|
|
2558
|
-
children:
|
|
2557
|
+
children: jsx(BatchProvider, { children: p })
|
|
2559
2558
|
});
|
|
2560
2559
|
}
|
|
2561
|
-
function
|
|
2562
|
-
return
|
|
2560
|
+
function Wrapper({ children: e, nodes: t, edges: n, defaultNodes: r, defaultEdges: i, width: a, height: o, fitView: s, fitViewOptions: c, minZoom: l, maxZoom: u, nodeOrigin: d, nodeExtent: f, zIndexMode: p }) {
|
|
2561
|
+
return useContext(StoreContext) ? jsx(Fragment$1, { children: e }) : jsx(ReactFlowProvider, {
|
|
2563
2562
|
initialNodes: t,
|
|
2564
2563
|
initialEdges: n,
|
|
2565
2564
|
defaultNodes: r,
|
|
@@ -2576,51 +2575,51 @@ function Dr({ children: e, nodes: t, edges: n, defaultNodes: r, defaultEdges: i,
|
|
|
2576
2575
|
children: e
|
|
2577
2576
|
});
|
|
2578
2577
|
}
|
|
2579
|
-
var
|
|
2578
|
+
var wrapperStyle = {
|
|
2580
2579
|
width: "100%",
|
|
2581
2580
|
height: "100%",
|
|
2582
2581
|
overflow: "hidden",
|
|
2583
2582
|
position: "relative",
|
|
2584
2583
|
zIndex: 0
|
|
2585
2584
|
};
|
|
2586
|
-
function
|
|
2587
|
-
let
|
|
2585
|
+
function ReactFlow({ nodes: n, edges: r, defaultNodes: a, defaultEdges: o, className: c, nodeTypes: l, edgeTypes: u, onNodeClick: d, onEdgeClick: f, onInit: p, onMove: m, onMoveStart: h, onMoveEnd: g, onConnect: _, onConnectStart: v, onConnectEnd: y, onClickConnectStart: b, onClickConnectEnd: x, onNodeMouseEnter: S, onNodeMouseMove: C, onNodeMouseLeave: w, onNodeContextMenu: T, onNodeDoubleClick: E, onNodeDragStart: D, onNodeDrag: O, onNodeDragStop: k, onNodesDelete: A, onEdgesDelete: j, onDelete: M, onSelectionChange: N, onSelectionDragStart: P, onSelectionDrag: F, onSelectionDragStop: I, onSelectionContextMenu: L, onSelectionStart: R, onSelectionEnd: z, onBeforeDelete: B, connectionMode: V, connectionLineType: H = ConnectionLineType.Bezier, connectionLineStyle: U, connectionLineComponent: W, connectionLineContainerStyle: G, deleteKeyCode: K = "Backspace", selectionKeyCode: J = "Shift", selectionOnDrag: Y = !1, selectionMode: X = SelectionMode.Full, panActivationKeyCode: Z = "Space", multiSelectionKeyCode: Hn = isMacOs() ? "Meta" : "Control", zoomActivationKeyCode: Un = isMacOs() ? "Meta" : "Control", snapToGrid: Wn, snapGrid: Gn, onlyRenderVisibleElements: Kn = !1, selectNodesOnDrag: Q, nodesDraggable: $, autoPanOnNodeFocus: qn, nodesConnectable: Jn, nodesFocusable: Yn, nodeOrigin: Xn = defaultNodeOrigin, edgesFocusable: Zn, edgesReconnectable: Qn, elementsSelectable: $n = !0, defaultViewport: er = defaultViewport, minZoom: tr = .5, maxZoom: nr = 2, translateExtent: rr = infiniteExtent, preventScrolling: ir = !0, nodeExtent: ar, defaultMarkerColor: or = "#b1b1b7", zoomOnScroll: sr = !0, zoomOnPinch: cr = !0, panOnScroll: lr = !1, panOnScrollSpeed: ur = .5, panOnScrollMode: dr = PanOnScrollMode.Free, zoomOnDoubleClick: fr = !0, panOnDrag: pr = !0, onPaneClick: mr, onPaneMouseEnter: hr, onPaneMouseMove: gr, onPaneMouseLeave: _r, onPaneScroll: vr, onPaneContextMenu: yr, paneClickDistance: br = 1, nodeClickDistance: xr = 0, children: Sr, onReconnect: Cr, onReconnectStart: wr, onReconnectEnd: Tr, onEdgeContextMenu: Er, onEdgeDoubleClick: Dr, onEdgeMouseEnter: Or, onEdgeMouseMove: kr, onEdgeMouseLeave: Ar, reconnectRadius: jr = 10, onNodesChange: Mr, onEdgesChange: Nr, noDragClassName: Pr = "nodrag", noWheelClassName: Fr = "nowheel", noPanClassName: Ir = "nopan", fitView: Lr, fitViewOptions: Rr, connectOnClick: zr, attributionPosition: Br, proOptions: Vr, defaultEdgeOptions: Hr, elevateNodesOnSelect: Ur = !0, elevateEdgesOnSelect: Wr = !1, disableKeyboardA11y: Gr = !1, autoPanOnConnect: Kr, autoPanOnNodeDrag: qr, autoPanSpeed: Jr, connectionRadius: Yr, isValidConnection: Xr, onError: Zr, style: Qr, id: $r, nodeDragThreshold: ei, connectionDragThreshold: ti, viewport: ni, onViewportChange: ri, width: ii, height: ai, colorMode: oi = "light", debug: si, onScroll: ci, ariaLabelConfig: li, zIndexMode: ui = "basic", ...di }, fi) {
|
|
2586
|
+
let pi = $r || "1", mi = useColorModeClass(oi), hi = useCallback((e) => {
|
|
2588
2587
|
e.currentTarget.scrollTo({
|
|
2589
2588
|
top: 0,
|
|
2590
2589
|
left: 0,
|
|
2591
2590
|
behavior: "instant"
|
|
2592
|
-
}),
|
|
2593
|
-
}, [
|
|
2594
|
-
return
|
|
2591
|
+
}), ci?.(e);
|
|
2592
|
+
}, [ci]);
|
|
2593
|
+
return jsx("div", {
|
|
2595
2594
|
"data-testid": "rf__wrapper",
|
|
2596
|
-
...
|
|
2597
|
-
onScroll:
|
|
2595
|
+
...di,
|
|
2596
|
+
onScroll: hi,
|
|
2598
2597
|
style: {
|
|
2599
|
-
...
|
|
2600
|
-
...
|
|
2598
|
+
...Qr,
|
|
2599
|
+
...wrapperStyle
|
|
2601
2600
|
},
|
|
2602
|
-
ref:
|
|
2603
|
-
className:
|
|
2601
|
+
ref: fi,
|
|
2602
|
+
className: cc([
|
|
2604
2603
|
"react-flow",
|
|
2605
2604
|
c,
|
|
2606
|
-
|
|
2605
|
+
mi
|
|
2607
2606
|
]),
|
|
2608
|
-
id:
|
|
2607
|
+
id: $r,
|
|
2609
2608
|
role: "application",
|
|
2610
|
-
children:
|
|
2609
|
+
children: jsxs(Wrapper, {
|
|
2611
2610
|
nodes: n,
|
|
2612
2611
|
edges: r,
|
|
2613
|
-
width:
|
|
2614
|
-
height:
|
|
2615
|
-
fitView:
|
|
2616
|
-
fitViewOptions:
|
|
2617
|
-
minZoom:
|
|
2618
|
-
maxZoom:
|
|
2619
|
-
nodeOrigin:
|
|
2620
|
-
nodeExtent:
|
|
2621
|
-
zIndexMode:
|
|
2612
|
+
width: ii,
|
|
2613
|
+
height: ai,
|
|
2614
|
+
fitView: Lr,
|
|
2615
|
+
fitViewOptions: Rr,
|
|
2616
|
+
minZoom: tr,
|
|
2617
|
+
maxZoom: nr,
|
|
2618
|
+
nodeOrigin: Xn,
|
|
2619
|
+
nodeExtent: ar,
|
|
2620
|
+
zIndexMode: ui,
|
|
2622
2621
|
children: [
|
|
2623
|
-
|
|
2622
|
+
jsx(StoreUpdater, {
|
|
2624
2623
|
nodes: n,
|
|
2625
2624
|
edges: r,
|
|
2626
2625
|
defaultNodes: a,
|
|
@@ -2630,28 +2629,28 @@ function kr({ nodes: n, edges: r, defaultNodes: a, defaultEdges: o, className: c
|
|
|
2630
2629
|
onConnectEnd: y,
|
|
2631
2630
|
onClickConnectStart: b,
|
|
2632
2631
|
onClickConnectEnd: x,
|
|
2633
|
-
nodesDraggable:
|
|
2634
|
-
autoPanOnNodeFocus:
|
|
2635
|
-
nodesConnectable:
|
|
2636
|
-
nodesFocusable:
|
|
2637
|
-
edgesFocusable:
|
|
2638
|
-
edgesReconnectable:
|
|
2639
|
-
elementsSelectable:
|
|
2640
|
-
elevateNodesOnSelect:
|
|
2641
|
-
elevateEdgesOnSelect:
|
|
2642
|
-
minZoom:
|
|
2643
|
-
maxZoom:
|
|
2644
|
-
nodeExtent:
|
|
2645
|
-
onNodesChange:
|
|
2646
|
-
onEdgesChange:
|
|
2647
|
-
snapToGrid:
|
|
2648
|
-
snapGrid:
|
|
2649
|
-
connectionMode:
|
|
2650
|
-
translateExtent:
|
|
2651
|
-
connectOnClick:
|
|
2652
|
-
defaultEdgeOptions:
|
|
2653
|
-
fitView:
|
|
2654
|
-
fitViewOptions:
|
|
2632
|
+
nodesDraggable: $,
|
|
2633
|
+
autoPanOnNodeFocus: qn,
|
|
2634
|
+
nodesConnectable: Jn,
|
|
2635
|
+
nodesFocusable: Yn,
|
|
2636
|
+
edgesFocusable: Zn,
|
|
2637
|
+
edgesReconnectable: Qn,
|
|
2638
|
+
elementsSelectable: $n,
|
|
2639
|
+
elevateNodesOnSelect: Ur,
|
|
2640
|
+
elevateEdgesOnSelect: Wr,
|
|
2641
|
+
minZoom: tr,
|
|
2642
|
+
maxZoom: nr,
|
|
2643
|
+
nodeExtent: ar,
|
|
2644
|
+
onNodesChange: Mr,
|
|
2645
|
+
onEdgesChange: Nr,
|
|
2646
|
+
snapToGrid: Wn,
|
|
2647
|
+
snapGrid: Gn,
|
|
2648
|
+
connectionMode: V,
|
|
2649
|
+
translateExtent: rr,
|
|
2650
|
+
connectOnClick: zr,
|
|
2651
|
+
defaultEdgeOptions: Hr,
|
|
2652
|
+
fitView: Lr,
|
|
2653
|
+
fitViewOptions: Rr,
|
|
2655
2654
|
onNodesDelete: A,
|
|
2656
2655
|
onEdgesDelete: j,
|
|
2657
2656
|
onDelete: M,
|
|
@@ -2660,28 +2659,28 @@ function kr({ nodes: n, edges: r, defaultNodes: a, defaultEdges: o, className: c
|
|
|
2660
2659
|
onNodeDragStop: k,
|
|
2661
2660
|
onSelectionDrag: F,
|
|
2662
2661
|
onSelectionDragStart: P,
|
|
2663
|
-
onSelectionDragStop:
|
|
2662
|
+
onSelectionDragStop: I,
|
|
2664
2663
|
onMove: m,
|
|
2665
2664
|
onMoveStart: h,
|
|
2666
2665
|
onMoveEnd: g,
|
|
2667
|
-
noPanClassName:
|
|
2668
|
-
nodeOrigin:
|
|
2669
|
-
rfId:
|
|
2670
|
-
autoPanOnConnect:
|
|
2671
|
-
autoPanOnNodeDrag:
|
|
2672
|
-
autoPanSpeed:
|
|
2673
|
-
onError:
|
|
2674
|
-
connectionRadius:
|
|
2675
|
-
isValidConnection:
|
|
2676
|
-
selectNodesOnDrag:
|
|
2677
|
-
nodeDragThreshold:
|
|
2678
|
-
connectionDragThreshold:
|
|
2679
|
-
onBeforeDelete:
|
|
2680
|
-
debug:
|
|
2681
|
-
ariaLabelConfig:
|
|
2682
|
-
zIndexMode:
|
|
2666
|
+
noPanClassName: Ir,
|
|
2667
|
+
nodeOrigin: Xn,
|
|
2668
|
+
rfId: pi,
|
|
2669
|
+
autoPanOnConnect: Kr,
|
|
2670
|
+
autoPanOnNodeDrag: qr,
|
|
2671
|
+
autoPanSpeed: Jr,
|
|
2672
|
+
onError: Zr,
|
|
2673
|
+
connectionRadius: Yr,
|
|
2674
|
+
isValidConnection: Xr,
|
|
2675
|
+
selectNodesOnDrag: Q,
|
|
2676
|
+
nodeDragThreshold: ei,
|
|
2677
|
+
connectionDragThreshold: ti,
|
|
2678
|
+
onBeforeDelete: B,
|
|
2679
|
+
debug: si,
|
|
2680
|
+
ariaLabelConfig: li,
|
|
2681
|
+
zIndexMode: ui
|
|
2683
2682
|
}),
|
|
2684
|
-
|
|
2683
|
+
jsx(GraphView, {
|
|
2685
2684
|
onInit: p,
|
|
2686
2685
|
onNodeClick: d,
|
|
2687
2686
|
onEdgeClick: f,
|
|
@@ -2692,144 +2691,144 @@ function kr({ nodes: n, edges: r, defaultNodes: a, defaultEdges: o, className: c
|
|
|
2692
2691
|
onNodeDoubleClick: E,
|
|
2693
2692
|
nodeTypes: l,
|
|
2694
2693
|
edgeTypes: u,
|
|
2695
|
-
connectionLineType:
|
|
2696
|
-
connectionLineStyle:
|
|
2697
|
-
connectionLineComponent:
|
|
2698
|
-
connectionLineContainerStyle:
|
|
2699
|
-
selectionKeyCode:
|
|
2700
|
-
selectionOnDrag:
|
|
2701
|
-
selectionMode:
|
|
2702
|
-
deleteKeyCode:
|
|
2703
|
-
multiSelectionKeyCode:
|
|
2704
|
-
panActivationKeyCode:
|
|
2705
|
-
zoomActivationKeyCode:
|
|
2706
|
-
onlyRenderVisibleElements:
|
|
2707
|
-
defaultViewport:
|
|
2708
|
-
translateExtent:
|
|
2709
|
-
minZoom:
|
|
2710
|
-
maxZoom:
|
|
2711
|
-
preventScrolling:
|
|
2712
|
-
zoomOnScroll:
|
|
2713
|
-
zoomOnPinch:
|
|
2714
|
-
zoomOnDoubleClick:
|
|
2715
|
-
panOnScroll:
|
|
2716
|
-
panOnScrollSpeed:
|
|
2717
|
-
panOnScrollMode:
|
|
2718
|
-
panOnDrag:
|
|
2719
|
-
onPaneClick:
|
|
2720
|
-
onPaneMouseEnter:
|
|
2721
|
-
onPaneMouseMove:
|
|
2722
|
-
onPaneMouseLeave:
|
|
2723
|
-
onPaneScroll:
|
|
2724
|
-
onPaneContextMenu:
|
|
2725
|
-
paneClickDistance:
|
|
2726
|
-
nodeClickDistance:
|
|
2727
|
-
onSelectionContextMenu:
|
|
2728
|
-
onSelectionStart:
|
|
2729
|
-
onSelectionEnd:
|
|
2730
|
-
onReconnect:
|
|
2731
|
-
onReconnectStart:
|
|
2732
|
-
onReconnectEnd:
|
|
2733
|
-
onEdgeContextMenu:
|
|
2734
|
-
onEdgeDoubleClick:
|
|
2735
|
-
onEdgeMouseEnter:
|
|
2736
|
-
onEdgeMouseMove:
|
|
2737
|
-
onEdgeMouseLeave:
|
|
2738
|
-
reconnectRadius:
|
|
2739
|
-
defaultMarkerColor:
|
|
2740
|
-
noDragClassName:
|
|
2741
|
-
noWheelClassName:
|
|
2742
|
-
noPanClassName:
|
|
2743
|
-
rfId:
|
|
2744
|
-
disableKeyboardA11y:
|
|
2745
|
-
nodeExtent:
|
|
2746
|
-
viewport:
|
|
2747
|
-
onViewportChange:
|
|
2694
|
+
connectionLineType: H,
|
|
2695
|
+
connectionLineStyle: U,
|
|
2696
|
+
connectionLineComponent: W,
|
|
2697
|
+
connectionLineContainerStyle: G,
|
|
2698
|
+
selectionKeyCode: J,
|
|
2699
|
+
selectionOnDrag: Y,
|
|
2700
|
+
selectionMode: X,
|
|
2701
|
+
deleteKeyCode: K,
|
|
2702
|
+
multiSelectionKeyCode: Hn,
|
|
2703
|
+
panActivationKeyCode: Z,
|
|
2704
|
+
zoomActivationKeyCode: Un,
|
|
2705
|
+
onlyRenderVisibleElements: Kn,
|
|
2706
|
+
defaultViewport: er,
|
|
2707
|
+
translateExtent: rr,
|
|
2708
|
+
minZoom: tr,
|
|
2709
|
+
maxZoom: nr,
|
|
2710
|
+
preventScrolling: ir,
|
|
2711
|
+
zoomOnScroll: sr,
|
|
2712
|
+
zoomOnPinch: cr,
|
|
2713
|
+
zoomOnDoubleClick: fr,
|
|
2714
|
+
panOnScroll: lr,
|
|
2715
|
+
panOnScrollSpeed: ur,
|
|
2716
|
+
panOnScrollMode: dr,
|
|
2717
|
+
panOnDrag: pr,
|
|
2718
|
+
onPaneClick: mr,
|
|
2719
|
+
onPaneMouseEnter: hr,
|
|
2720
|
+
onPaneMouseMove: gr,
|
|
2721
|
+
onPaneMouseLeave: _r,
|
|
2722
|
+
onPaneScroll: vr,
|
|
2723
|
+
onPaneContextMenu: yr,
|
|
2724
|
+
paneClickDistance: br,
|
|
2725
|
+
nodeClickDistance: xr,
|
|
2726
|
+
onSelectionContextMenu: L,
|
|
2727
|
+
onSelectionStart: R,
|
|
2728
|
+
onSelectionEnd: z,
|
|
2729
|
+
onReconnect: Cr,
|
|
2730
|
+
onReconnectStart: wr,
|
|
2731
|
+
onReconnectEnd: Tr,
|
|
2732
|
+
onEdgeContextMenu: Er,
|
|
2733
|
+
onEdgeDoubleClick: Dr,
|
|
2734
|
+
onEdgeMouseEnter: Or,
|
|
2735
|
+
onEdgeMouseMove: kr,
|
|
2736
|
+
onEdgeMouseLeave: Ar,
|
|
2737
|
+
reconnectRadius: jr,
|
|
2738
|
+
defaultMarkerColor: or,
|
|
2739
|
+
noDragClassName: Pr,
|
|
2740
|
+
noWheelClassName: Fr,
|
|
2741
|
+
noPanClassName: Ir,
|
|
2742
|
+
rfId: pi,
|
|
2743
|
+
disableKeyboardA11y: Gr,
|
|
2744
|
+
nodeExtent: ar,
|
|
2745
|
+
viewport: ni,
|
|
2746
|
+
onViewportChange: ri
|
|
2748
2747
|
}),
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
proOptions:
|
|
2753
|
-
position:
|
|
2748
|
+
jsx(SelectionListener, { onSelectionChange: N }),
|
|
2749
|
+
Sr,
|
|
2750
|
+
jsx(Attribution, {
|
|
2751
|
+
proOptions: Vr,
|
|
2752
|
+
position: Br
|
|
2754
2753
|
}),
|
|
2755
|
-
|
|
2756
|
-
rfId:
|
|
2757
|
-
disableKeyboardA11y:
|
|
2754
|
+
jsx(A11yDescriptions, {
|
|
2755
|
+
rfId: pi,
|
|
2756
|
+
disableKeyboardA11y: Gr
|
|
2758
2757
|
})
|
|
2759
2758
|
]
|
|
2760
2759
|
})
|
|
2761
2760
|
});
|
|
2762
2761
|
}
|
|
2763
|
-
var
|
|
2764
|
-
function
|
|
2765
|
-
let t =
|
|
2766
|
-
return t ?
|
|
2762
|
+
var index = fixedForwardRef(ReactFlow), selector$6 = (e) => e.domNode?.querySelector(".react-flow__edgelabel-renderer");
|
|
2763
|
+
function EdgeLabelRenderer({ children: e }) {
|
|
2764
|
+
let t = useStore(selector$6);
|
|
2765
|
+
return t ? createPortal(e, t) : null;
|
|
2767
2766
|
}
|
|
2768
|
-
function
|
|
2769
|
-
let [t, n] =
|
|
2767
|
+
function useNodesState(e) {
|
|
2768
|
+
let [t, n] = useState(e);
|
|
2770
2769
|
return [
|
|
2771
2770
|
t,
|
|
2772
2771
|
n,
|
|
2773
|
-
|
|
2772
|
+
useCallback((e) => n((t) => applyNodeChanges(e, t)), [])
|
|
2774
2773
|
];
|
|
2775
2774
|
}
|
|
2776
|
-
function
|
|
2777
|
-
let [t, n] =
|
|
2775
|
+
function useEdgesState(e) {
|
|
2776
|
+
let [t, n] = useState(e);
|
|
2778
2777
|
return [
|
|
2779
2778
|
t,
|
|
2780
2779
|
n,
|
|
2781
|
-
|
|
2780
|
+
useCallback((e) => n((t) => applyEdgeChanges(e, t)), [])
|
|
2782
2781
|
];
|
|
2783
2782
|
}
|
|
2784
|
-
|
|
2785
|
-
function
|
|
2786
|
-
return
|
|
2783
|
+
errorMessages.error014();
|
|
2784
|
+
function LinePattern({ dimensions: t, lineWidth: n, variant: r, className: i }) {
|
|
2785
|
+
return jsx("path", {
|
|
2787
2786
|
strokeWidth: n,
|
|
2788
2787
|
d: `M${t[0] / 2} 0 V${t[1]} M0 ${t[1] / 2} H${t[0]}`,
|
|
2789
|
-
className:
|
|
2788
|
+
className: cc([
|
|
2790
2789
|
"react-flow__background-pattern",
|
|
2791
2790
|
r,
|
|
2792
2791
|
i
|
|
2793
2792
|
])
|
|
2794
2793
|
});
|
|
2795
2794
|
}
|
|
2796
|
-
function
|
|
2797
|
-
return
|
|
2795
|
+
function DotPattern({ radius: t, className: n }) {
|
|
2796
|
+
return jsx("circle", {
|
|
2798
2797
|
cx: t,
|
|
2799
2798
|
cy: t,
|
|
2800
2799
|
r: t,
|
|
2801
|
-
className:
|
|
2800
|
+
className: cc([
|
|
2802
2801
|
"react-flow__background-pattern",
|
|
2803
2802
|
"dots",
|
|
2804
2803
|
n
|
|
2805
2804
|
])
|
|
2806
2805
|
});
|
|
2807
2806
|
}
|
|
2808
|
-
var
|
|
2807
|
+
var BackgroundVariant;
|
|
2809
2808
|
(function(e) {
|
|
2810
2809
|
e.Lines = "lines", e.Dots = "dots", e.Cross = "cross";
|
|
2811
|
-
})(
|
|
2812
|
-
var
|
|
2813
|
-
[
|
|
2814
|
-
[
|
|
2815
|
-
[
|
|
2816
|
-
},
|
|
2810
|
+
})(BackgroundVariant ||= {});
|
|
2811
|
+
var defaultSize = {
|
|
2812
|
+
[BackgroundVariant.Dots]: 1,
|
|
2813
|
+
[BackgroundVariant.Lines]: 1,
|
|
2814
|
+
[BackgroundVariant.Cross]: 6
|
|
2815
|
+
}, selector$3 = (e) => ({
|
|
2817
2816
|
transform: e.transform,
|
|
2818
2817
|
patternId: `pattern-${e.rfId}`
|
|
2819
2818
|
});
|
|
2820
|
-
function
|
|
2821
|
-
let f =
|
|
2822
|
-
return
|
|
2823
|
-
className:
|
|
2819
|
+
function BackgroundComponent({ id: t, variant: n = BackgroundVariant.Dots, gap: r = 20, size: i, lineWidth: a = 1, offset: o = 0, color: s, bgColor: c, style: l, className: u, patternClassName: d }) {
|
|
2820
|
+
let f = useRef(null), { transform: p, patternId: m } = useStore(selector$3, shallow), h = i || defaultSize[n], g = n === BackgroundVariant.Dots, _ = n === BackgroundVariant.Cross, v = Array.isArray(r) ? r : [r, r], y = [v[0] * p[2] || 1, v[1] * p[2] || 1], b = h * p[2], x = Array.isArray(o) ? o : [o, o], S = _ ? [b, b] : y, C = [x[0] * p[2] || 1 + S[0] / 2, x[1] * p[2] || 1 + S[1] / 2], w = `${m}${t || ""}`;
|
|
2821
|
+
return jsxs("svg", {
|
|
2822
|
+
className: cc(["react-flow__background", u]),
|
|
2824
2823
|
style: {
|
|
2825
2824
|
...l,
|
|
2826
|
-
...
|
|
2825
|
+
...containerStyle,
|
|
2827
2826
|
"--xy-background-color-props": c,
|
|
2828
2827
|
"--xy-background-pattern-color-props": s
|
|
2829
2828
|
},
|
|
2830
2829
|
ref: f,
|
|
2831
2830
|
"data-testid": "rf__background",
|
|
2832
|
-
children: [
|
|
2831
|
+
children: [jsx("pattern", {
|
|
2833
2832
|
id: w,
|
|
2834
2833
|
x: p[0] % y[0],
|
|
2835
2834
|
y: p[1] % y[1],
|
|
@@ -2837,16 +2836,16 @@ function Br({ id: t, variant: n = Lr.Dots, gap: r = 20, size: i, lineWidth: a =
|
|
|
2837
2836
|
height: y[1],
|
|
2838
2837
|
patternUnits: "userSpaceOnUse",
|
|
2839
2838
|
patternTransform: `translate(-${C[0]},-${C[1]})`,
|
|
2840
|
-
children: g ?
|
|
2839
|
+
children: g ? jsx(DotPattern, {
|
|
2841
2840
|
radius: b / 2,
|
|
2842
2841
|
className: d
|
|
2843
|
-
}) :
|
|
2842
|
+
}) : jsx(LinePattern, {
|
|
2844
2843
|
dimensions: S,
|
|
2845
2844
|
lineWidth: a,
|
|
2846
2845
|
variant: n,
|
|
2847
2846
|
className: d
|
|
2848
2847
|
})
|
|
2849
|
-
}),
|
|
2848
|
+
}), jsx("rect", {
|
|
2850
2849
|
x: "0",
|
|
2851
2850
|
y: "0",
|
|
2852
2851
|
width: "100%",
|
|
@@ -2855,61 +2854,73 @@ function Br({ id: t, variant: n = Lr.Dots, gap: r = 20, size: i, lineWidth: a =
|
|
|
2855
2854
|
})]
|
|
2856
2855
|
});
|
|
2857
2856
|
}
|
|
2858
|
-
|
|
2859
|
-
var
|
|
2860
|
-
function
|
|
2861
|
-
return
|
|
2857
|
+
BackgroundComponent.displayName = "Background";
|
|
2858
|
+
var Background = memo(BackgroundComponent);
|
|
2859
|
+
function PlusIcon() {
|
|
2860
|
+
return jsx("svg", {
|
|
2862
2861
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2863
2862
|
viewBox: "0 0 32 32",
|
|
2864
|
-
children:
|
|
2863
|
+
children: jsx("path", { d: "M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z" })
|
|
2865
2864
|
});
|
|
2866
2865
|
}
|
|
2867
|
-
function
|
|
2868
|
-
return
|
|
2866
|
+
function MinusIcon() {
|
|
2867
|
+
return jsx("svg", {
|
|
2869
2868
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2870
2869
|
viewBox: "0 0 32 5",
|
|
2871
|
-
children:
|
|
2870
|
+
children: jsx("path", { d: "M0 0h32v4.2H0z" })
|
|
2872
2871
|
});
|
|
2873
2872
|
}
|
|
2874
|
-
function
|
|
2875
|
-
return
|
|
2873
|
+
function FitViewIcon() {
|
|
2874
|
+
return jsx("svg", {
|
|
2876
2875
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2877
2876
|
viewBox: "0 0 32 30",
|
|
2878
|
-
children:
|
|
2877
|
+
children: jsx("path", { d: "M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z" })
|
|
2879
2878
|
});
|
|
2880
2879
|
}
|
|
2881
|
-
function
|
|
2882
|
-
return
|
|
2880
|
+
function LockIcon() {
|
|
2881
|
+
return jsx("svg", {
|
|
2883
2882
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2884
2883
|
viewBox: "0 0 25 32",
|
|
2885
|
-
children:
|
|
2884
|
+
children: jsx("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z" })
|
|
2886
2885
|
});
|
|
2887
2886
|
}
|
|
2888
|
-
function
|
|
2889
|
-
return
|
|
2887
|
+
function UnlockIcon() {
|
|
2888
|
+
return jsx("svg", {
|
|
2890
2889
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2891
2890
|
viewBox: "0 0 25 32",
|
|
2892
|
-
children:
|
|
2891
|
+
children: jsx("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z" })
|
|
2893
2892
|
});
|
|
2894
2893
|
}
|
|
2895
|
-
function
|
|
2896
|
-
return
|
|
2894
|
+
function ControlButton({ children: t, className: n, ...r }) {
|
|
2895
|
+
return jsx("button", {
|
|
2897
2896
|
type: "button",
|
|
2898
|
-
className:
|
|
2897
|
+
className: cc(["react-flow__controls-button", n]),
|
|
2899
2898
|
...r,
|
|
2900
2899
|
children: t
|
|
2901
2900
|
});
|
|
2902
2901
|
}
|
|
2903
|
-
var
|
|
2902
|
+
var selector$2 = (e) => ({
|
|
2904
2903
|
isInteractive: e.nodesDraggable || e.nodesConnectable || e.elementsSelectable,
|
|
2905
2904
|
minZoomReached: e.transform[2] <= e.minZoom,
|
|
2906
2905
|
maxZoomReached: e.transform[2] >= e.maxZoom,
|
|
2907
2906
|
ariaLabelConfig: e.ariaLabelConfig
|
|
2908
2907
|
});
|
|
2909
|
-
function
|
|
2910
|
-
let h =
|
|
2911
|
-
|
|
2912
|
-
|
|
2908
|
+
function ControlsComponent({ style: t, showZoom: n = !0, showFitView: r = !0, showInteractive: i = !0, fitViewOptions: a, onZoomIn: o, onZoomOut: s, onFitView: c, onInteractiveChange: l, className: u, children: d, position: f = "bottom-left", orientation: p = "vertical", "aria-label": m }) {
|
|
2909
|
+
let h = useStoreApi(), { isInteractive: g, minZoomReached: _, maxZoomReached: v, ariaLabelConfig: y } = useStore(selector$2, shallow), { zoomIn: b, zoomOut: x, fitView: S } = useReactFlow(), C = () => {
|
|
2910
|
+
b(), o?.();
|
|
2911
|
+
}, w = () => {
|
|
2912
|
+
x(), s?.();
|
|
2913
|
+
}, T = () => {
|
|
2914
|
+
S(a), c?.();
|
|
2915
|
+
}, E = () => {
|
|
2916
|
+
h.setState({
|
|
2917
|
+
nodesDraggable: !g,
|
|
2918
|
+
nodesConnectable: !g,
|
|
2919
|
+
elementsSelectable: !g
|
|
2920
|
+
}), l?.(!g);
|
|
2921
|
+
};
|
|
2922
|
+
return jsxs(Panel, {
|
|
2923
|
+
className: cc([
|
|
2913
2924
|
"react-flow__controls",
|
|
2914
2925
|
p === "horizontal" ? "horizontal" : "vertical",
|
|
2915
2926
|
u
|
|
@@ -2919,57 +2930,45 @@ function Yr({ style: t, showZoom: n = !0, showFitView: r = !0, showInteractive:
|
|
|
2919
2930
|
"data-testid": "rf__controls",
|
|
2920
2931
|
"aria-label": m ?? y["controls.ariaLabel"],
|
|
2921
2932
|
children: [
|
|
2922
|
-
n &&
|
|
2923
|
-
onClick:
|
|
2924
|
-
b(), o?.();
|
|
2925
|
-
},
|
|
2933
|
+
n && jsxs(Fragment$1, { children: [jsx(ControlButton, {
|
|
2934
|
+
onClick: C,
|
|
2926
2935
|
className: "react-flow__controls-zoomin",
|
|
2927
2936
|
title: y["controls.zoomIn.ariaLabel"],
|
|
2928
2937
|
"aria-label": y["controls.zoomIn.ariaLabel"],
|
|
2929
2938
|
disabled: v,
|
|
2930
|
-
children:
|
|
2931
|
-
}),
|
|
2932
|
-
onClick:
|
|
2933
|
-
x(), s?.();
|
|
2934
|
-
},
|
|
2939
|
+
children: jsx(PlusIcon, {})
|
|
2940
|
+
}), jsx(ControlButton, {
|
|
2941
|
+
onClick: w,
|
|
2935
2942
|
className: "react-flow__controls-zoomout",
|
|
2936
2943
|
title: y["controls.zoomOut.ariaLabel"],
|
|
2937
2944
|
"aria-label": y["controls.zoomOut.ariaLabel"],
|
|
2938
2945
|
disabled: _,
|
|
2939
|
-
children:
|
|
2946
|
+
children: jsx(MinusIcon, {})
|
|
2940
2947
|
})] }),
|
|
2941
|
-
r &&
|
|
2948
|
+
r && jsx(ControlButton, {
|
|
2942
2949
|
className: "react-flow__controls-fitview",
|
|
2943
|
-
onClick:
|
|
2944
|
-
S(a), c?.();
|
|
2945
|
-
},
|
|
2950
|
+
onClick: T,
|
|
2946
2951
|
title: y["controls.fitView.ariaLabel"],
|
|
2947
2952
|
"aria-label": y["controls.fitView.ariaLabel"],
|
|
2948
|
-
children:
|
|
2953
|
+
children: jsx(FitViewIcon, {})
|
|
2949
2954
|
}),
|
|
2950
|
-
i &&
|
|
2955
|
+
i && jsx(ControlButton, {
|
|
2951
2956
|
className: "react-flow__controls-interactive",
|
|
2952
|
-
onClick:
|
|
2953
|
-
h.setState({
|
|
2954
|
-
nodesDraggable: !g,
|
|
2955
|
-
nodesConnectable: !g,
|
|
2956
|
-
elementsSelectable: !g
|
|
2957
|
-
}), l?.(!g);
|
|
2958
|
-
},
|
|
2957
|
+
onClick: E,
|
|
2959
2958
|
title: y["controls.interactive.ariaLabel"],
|
|
2960
2959
|
"aria-label": y["controls.interactive.ariaLabel"],
|
|
2961
|
-
children:
|
|
2960
|
+
children: jsx(g ? UnlockIcon : LockIcon, {})
|
|
2962
2961
|
}),
|
|
2963
2962
|
d
|
|
2964
2963
|
]
|
|
2965
2964
|
});
|
|
2966
2965
|
}
|
|
2967
|
-
|
|
2968
|
-
var
|
|
2969
|
-
function
|
|
2966
|
+
ControlsComponent.displayName = "Controls";
|
|
2967
|
+
var Controls = memo(ControlsComponent);
|
|
2968
|
+
function MiniMapNodeComponent({ id: t, x: n, y: r, width: i, height: a, style: o, color: s, strokeColor: c, strokeWidth: l, className: u, borderRadius: d, shapeRendering: f, selected: p, onClick: m }) {
|
|
2970
2969
|
let { background: h, backgroundColor: g } = o || {}, _ = s || h || g;
|
|
2971
|
-
return
|
|
2972
|
-
className:
|
|
2970
|
+
return jsx("rect", {
|
|
2971
|
+
className: cc([
|
|
2973
2972
|
"react-flow__minimap-node",
|
|
2974
2973
|
{ selected: p },
|
|
2975
2974
|
u
|
|
@@ -2989,10 +2988,10 @@ function Zr({ id: t, x: n, y: r, width: i, height: a, style: o, color: s, stroke
|
|
|
2989
2988
|
onClick: m ? (e) => m(e, t) : void 0
|
|
2990
2989
|
});
|
|
2991
2990
|
}
|
|
2992
|
-
var
|
|
2993
|
-
function
|
|
2994
|
-
let s =
|
|
2995
|
-
return
|
|
2991
|
+
var MiniMapNode = memo(MiniMapNodeComponent), selectorNodeIds = (e) => e.nodes.map((e) => e.id), getAttrFunction = (e) => e instanceof Function ? e : () => e;
|
|
2992
|
+
function MiniMapNodes({ nodeStrokeColor: e, nodeColor: t, nodeClassName: n = "", nodeBorderRadius: r = 5, nodeStrokeWidth: i, nodeComponent: a = MiniMapNode, onClick: o }) {
|
|
2993
|
+
let s = useStore(selectorNodeIds, shallow), c = getAttrFunction(t), l = getAttrFunction(e), u = getAttrFunction(n), d = typeof window > "u" || window.chrome ? "crispEdges" : "geometricPrecision";
|
|
2994
|
+
return jsx(Fragment$1, { children: s.map((e) => jsx(NodeComponentWrapper, {
|
|
2996
2995
|
id: e,
|
|
2997
2996
|
nodeColorFunc: c,
|
|
2998
2997
|
nodeStrokeColorFunc: l,
|
|
@@ -3004,8 +3003,8 @@ function ti({ nodeStrokeColor: e, nodeColor: t, nodeClassName: n = "", nodeBorde
|
|
|
3004
3003
|
shapeRendering: d
|
|
3005
3004
|
}, e)) });
|
|
3006
3005
|
}
|
|
3007
|
-
function
|
|
3008
|
-
let { node: l, x: u, y: d, width: f, height: p } =
|
|
3006
|
+
function NodeComponentWrapperInner({ id: e, nodeColorFunc: t, nodeStrokeColorFunc: n, nodeClassNameFunc: r, nodeBorderRadius: i, nodeStrokeWidth: a, shapeRendering: o, NodeComponent: s, onClick: c }) {
|
|
3007
|
+
let { node: l, x: u, y: d, width: f, height: p } = useStore((t) => {
|
|
3009
3008
|
let n = t.nodeLookup.get(e);
|
|
3010
3009
|
if (!n) return {
|
|
3011
3010
|
node: void 0,
|
|
@@ -3014,7 +3013,7 @@ function ni({ id: e, nodeColorFunc: t, nodeStrokeColorFunc: n, nodeClassNameFunc
|
|
|
3014
3013
|
width: 0,
|
|
3015
3014
|
height: 0
|
|
3016
3015
|
};
|
|
3017
|
-
let r = n.internals.userNode, { x: i, y: a } = n.internals.positionAbsolute, { width: o, height: s } =
|
|
3016
|
+
let r = n.internals.userNode, { x: i, y: a } = n.internals.positionAbsolute, { width: o, height: s } = getNodeDimensions(r);
|
|
3018
3017
|
return {
|
|
3019
3018
|
node: r,
|
|
3020
3019
|
x: i,
|
|
@@ -3022,8 +3021,8 @@ function ni({ id: e, nodeColorFunc: t, nodeStrokeColorFunc: n, nodeClassNameFunc
|
|
|
3022
3021
|
width: o,
|
|
3023
3022
|
height: s
|
|
3024
3023
|
};
|
|
3025
|
-
},
|
|
3026
|
-
return !l || l.hidden || !
|
|
3024
|
+
}, shallow);
|
|
3025
|
+
return !l || l.hidden || !nodeHasDimensions(l) ? null : jsx(s, {
|
|
3027
3026
|
x: u,
|
|
3028
3027
|
y: d,
|
|
3029
3028
|
width: f,
|
|
@@ -3040,7 +3039,7 @@ function ni({ id: e, nodeColorFunc: t, nodeStrokeColorFunc: n, nodeClassNameFunc
|
|
|
3040
3039
|
id: l.id
|
|
3041
3040
|
});
|
|
3042
3041
|
}
|
|
3043
|
-
var
|
|
3042
|
+
var NodeComponentWrapper = memo(NodeComponentWrapperInner), MiniMapNodes$1 = memo(MiniMapNodes), defaultWidth = 200, defaultHeight = 150, filterHidden = (e) => !e.hidden, selector$1 = (e) => {
|
|
3044
3043
|
let t = {
|
|
3045
3044
|
x: -e.transform[0] / e.transform[2],
|
|
3046
3045
|
y: -e.transform[1] / e.transform[2],
|
|
@@ -3049,7 +3048,7 @@ var ri = U(ni), ii = U(ti), ai = 200, oi = 150, si = (e) => !e.hidden, ci = (e)
|
|
|
3049
3048
|
};
|
|
3050
3049
|
return {
|
|
3051
3050
|
viewBB: t,
|
|
3052
|
-
boundingRect: e.nodeLookup.size > 0 ?
|
|
3051
|
+
boundingRect: e.nodeLookup.size > 0 ? getBoundsOfRects(getInternalNodesBounds(e.nodeLookup, { filter: filterHidden }), t) : t,
|
|
3053
3052
|
rfId: e.rfId,
|
|
3054
3053
|
panZoom: e.panZoom,
|
|
3055
3054
|
translateExtent: e.translateExtent,
|
|
@@ -3057,20 +3056,20 @@ var ri = U(ni), ii = U(ti), ai = 200, oi = 150, si = (e) => !e.hidden, ci = (e)
|
|
|
3057
3056
|
flowHeight: e.height,
|
|
3058
3057
|
ariaLabelConfig: e.ariaLabelConfig
|
|
3059
3058
|
};
|
|
3060
|
-
},
|
|
3061
|
-
function
|
|
3062
|
-
let C =
|
|
3063
|
-
|
|
3064
|
-
if (w.current && O) return
|
|
3059
|
+
}, ARIA_LABEL_KEY = "react-flow__minimap-desc";
|
|
3060
|
+
function MiniMapComponent({ style: t, className: n, nodeStrokeColor: r, nodeColor: i, nodeClassName: a = "", nodeBorderRadius: o = 5, nodeStrokeWidth: s, nodeComponent: c, bgColor: l, maskColor: d, maskStrokeColor: f, maskStrokeWidth: p, position: m = "bottom-right", onClick: h, onNodeClick: g, pannable: _ = !1, zoomable: v = !1, ariaLabel: y, inversePan: b, zoomStep: x = 1, offsetScale: S = 5 }) {
|
|
3061
|
+
let C = useStoreApi(), w = useRef(null), { boundingRect: T, viewBB: E, rfId: D, panZoom: O, translateExtent: k, flowWidth: A, flowHeight: j, ariaLabelConfig: M } = useStore(selector$1, shallow), N = t?.width ?? defaultWidth, P = t?.height ?? defaultHeight, F = T.width / N, I = T.height / P, L = Math.max(F, I), R = L * N, z = L * P, B = S * L, V = T.x - (R - T.width) / 2 - B, H = T.y - (z - T.height) / 2 - B, U = R + B * 2, W = z + B * 2, G = `${ARIA_LABEL_KEY}-${D}`, K = useRef(0), q = useRef();
|
|
3062
|
+
K.current = L, useEffect(() => {
|
|
3063
|
+
if (w.current && O) return q.current = XYMinimap({
|
|
3065
3064
|
domNode: w.current,
|
|
3066
3065
|
panZoom: O,
|
|
3067
3066
|
getTransform: () => C.getState().transform,
|
|
3068
|
-
getViewScale: () =>
|
|
3067
|
+
getViewScale: () => K.current
|
|
3069
3068
|
}), () => {
|
|
3070
|
-
|
|
3069
|
+
q.current?.destroy();
|
|
3071
3070
|
};
|
|
3072
|
-
}, [O]),
|
|
3073
|
-
|
|
3071
|
+
}, [O]), useEffect(() => {
|
|
3072
|
+
q.current?.update({
|
|
3074
3073
|
translateExtent: k,
|
|
3075
3074
|
width: A,
|
|
3076
3075
|
height: j,
|
|
@@ -3088,46 +3087,46 @@ function ui({ style: t, className: n, nodeStrokeColor: r, nodeColor: i, nodeClas
|
|
|
3088
3087
|
A,
|
|
3089
3088
|
j
|
|
3090
3089
|
]);
|
|
3091
|
-
let
|
|
3092
|
-
let [t, n] =
|
|
3090
|
+
let J = h ? (e) => {
|
|
3091
|
+
let [t, n] = q.current?.pointer(e) || [0, 0];
|
|
3093
3092
|
h(e, {
|
|
3094
3093
|
x: t,
|
|
3095
3094
|
y: n
|
|
3096
3095
|
});
|
|
3097
|
-
} : void 0,
|
|
3096
|
+
} : void 0, Y = g ? useCallback((e, t) => {
|
|
3098
3097
|
let n = C.getState().nodeLookup.get(t).internals.userNode;
|
|
3099
3098
|
g(e, n);
|
|
3100
|
-
}, []) : void 0,
|
|
3101
|
-
return
|
|
3099
|
+
}, []) : void 0, X = y ?? M["minimap.ariaLabel"];
|
|
3100
|
+
return jsx(Panel, {
|
|
3102
3101
|
position: m,
|
|
3103
3102
|
style: {
|
|
3104
3103
|
...t,
|
|
3105
3104
|
"--xy-minimap-background-color-props": typeof l == "string" ? l : void 0,
|
|
3106
3105
|
"--xy-minimap-mask-background-color-props": typeof d == "string" ? d : void 0,
|
|
3107
3106
|
"--xy-minimap-mask-stroke-color-props": typeof f == "string" ? f : void 0,
|
|
3108
|
-
"--xy-minimap-mask-stroke-width-props": typeof p == "number" ? p *
|
|
3107
|
+
"--xy-minimap-mask-stroke-width-props": typeof p == "number" ? p * L : void 0,
|
|
3109
3108
|
"--xy-minimap-node-background-color-props": typeof i == "string" ? i : void 0,
|
|
3110
3109
|
"--xy-minimap-node-stroke-color-props": typeof r == "string" ? r : void 0,
|
|
3111
3110
|
"--xy-minimap-node-stroke-width-props": typeof s == "number" ? s : void 0
|
|
3112
3111
|
},
|
|
3113
|
-
className:
|
|
3112
|
+
className: cc(["react-flow__minimap", n]),
|
|
3114
3113
|
"data-testid": "rf__minimap",
|
|
3115
|
-
children:
|
|
3114
|
+
children: jsxs("svg", {
|
|
3116
3115
|
width: N,
|
|
3117
3116
|
height: P,
|
|
3118
|
-
viewBox: `${
|
|
3117
|
+
viewBox: `${V} ${H} ${U} ${W}`,
|
|
3119
3118
|
className: "react-flow__minimap-svg",
|
|
3120
3119
|
role: "img",
|
|
3121
|
-
"aria-labelledby":
|
|
3120
|
+
"aria-labelledby": G,
|
|
3122
3121
|
ref: w,
|
|
3123
|
-
onClick:
|
|
3122
|
+
onClick: J,
|
|
3124
3123
|
children: [
|
|
3125
|
-
|
|
3126
|
-
id:
|
|
3127
|
-
children:
|
|
3124
|
+
X && jsx("title", {
|
|
3125
|
+
id: G,
|
|
3126
|
+
children: X
|
|
3128
3127
|
}),
|
|
3129
|
-
|
|
3130
|
-
onClick:
|
|
3128
|
+
jsx(MiniMapNodes$1, {
|
|
3129
|
+
onClick: Y,
|
|
3131
3130
|
nodeColor: i,
|
|
3132
3131
|
nodeStrokeColor: r,
|
|
3133
3132
|
nodeBorderRadius: o,
|
|
@@ -3135,9 +3134,9 @@ function ui({ style: t, className: n, nodeStrokeColor: r, nodeColor: i, nodeClas
|
|
|
3135
3134
|
nodeStrokeWidth: s,
|
|
3136
3135
|
nodeComponent: c
|
|
3137
3136
|
}),
|
|
3138
|
-
|
|
3137
|
+
jsx("path", {
|
|
3139
3138
|
className: "react-flow__minimap-mask",
|
|
3140
|
-
d: `M${
|
|
3139
|
+
d: `M${V - B},${H - B}h${U + B * 2}v${W + B * 2}h${-U - B * 2}z
|
|
3141
3140
|
M${E.x},${E.y}h${E.width}v${E.height}h${-E.width}z`,
|
|
3142
3141
|
fillRule: "evenodd",
|
|
3143
3142
|
pointerEvents: "none"
|
|
@@ -3146,15 +3145,15 @@ function ui({ style: t, className: n, nodeStrokeColor: r, nodeColor: i, nodeClas
|
|
|
3146
3145
|
})
|
|
3147
3146
|
});
|
|
3148
3147
|
}
|
|
3149
|
-
|
|
3150
|
-
var
|
|
3151
|
-
[
|
|
3152
|
-
[
|
|
3148
|
+
MiniMapComponent.displayName = "MiniMap", memo(MiniMapComponent);
|
|
3149
|
+
var scaleSelector = (e) => (t) => e ? `${Math.max(1 / t.transform[2], 1)}` : void 0, defaultPositions = {
|
|
3150
|
+
[ResizeControlVariant.Line]: "right",
|
|
3151
|
+
[ResizeControlVariant.Handle]: "bottom-right"
|
|
3153
3152
|
};
|
|
3154
|
-
function
|
|
3155
|
-
let x =
|
|
3156
|
-
return
|
|
3157
|
-
if (!(!T.current || !C)) return O.current ||=
|
|
3153
|
+
function ResizeControl({ nodeId: t, position: n, variant: r = ResizeControlVariant.Handle, className: i, style: a = void 0, children: s, color: c, minWidth: l = 10, minHeight: u = 10, maxWidth: d = Number.MAX_VALUE, maxHeight: p = Number.MAX_VALUE, keepAspectRatio: m = !1, resizeDirection: h, autoScale: g = !0, shouldResize: _, onResizeStart: v, onResize: y, onResizeEnd: b }) {
|
|
3154
|
+
let x = useNodeId(), C = typeof t == "string" ? t : x, w = useStoreApi(), T = useRef(null), E = r === ResizeControlVariant.Handle, D = useStore(useCallback(scaleSelector(E && g), [E, g]), shallow), O = useRef(null), k = n ?? defaultPositions[r];
|
|
3155
|
+
return useEffect(() => {
|
|
3156
|
+
if (!(!T.current || !C)) return O.current ||= XYResizer({
|
|
3158
3157
|
domNode: T.current,
|
|
3159
3158
|
nodeId: C,
|
|
3160
3159
|
getStoreItems: () => {
|
|
@@ -3174,13 +3173,13 @@ function pi({ nodeId: t, position: n, variant: r = o.Handle, className: i, style
|
|
|
3174
3173
|
y: e.y
|
|
3175
3174
|
}, c = r.get(C);
|
|
3176
3175
|
if (c && c.expandParent && c.parentId) {
|
|
3177
|
-
let t = c.origin ?? a, n = e.width ?? c.measured.width ?? 0, l = e.height ?? c.measured.height ?? 0, u =
|
|
3176
|
+
let t = c.origin ?? a, n = e.width ?? c.measured.width ?? 0, l = e.height ?? c.measured.height ?? 0, u = handleExpandParent([{
|
|
3178
3177
|
id: c.id,
|
|
3179
3178
|
parentId: c.parentId,
|
|
3180
3179
|
rect: {
|
|
3181
3180
|
width: n,
|
|
3182
3181
|
height: l,
|
|
3183
|
-
...
|
|
3182
|
+
...evaluateAbsolutePosition({
|
|
3184
3183
|
x: e.x ?? c.position.x,
|
|
3185
3184
|
y: e.y ?? c.position.y
|
|
3186
3185
|
}, {
|
|
@@ -3261,8 +3260,8 @@ function pi({ nodeId: t, position: n, variant: r = o.Handle, className: i, style
|
|
|
3261
3260
|
y,
|
|
3262
3261
|
b,
|
|
3263
3262
|
_
|
|
3264
|
-
]),
|
|
3265
|
-
className:
|
|
3263
|
+
]), jsx("div", {
|
|
3264
|
+
className: cc([
|
|
3266
3265
|
"react-flow__resize-control",
|
|
3267
3266
|
"nodrag",
|
|
3268
3267
|
...k.split("-"),
|
|
@@ -3278,6 +3277,5 @@ function pi({ nodeId: t, position: n, variant: r = o.Handle, className: i, style
|
|
|
3278
3277
|
children: s
|
|
3279
3278
|
});
|
|
3280
3279
|
}
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
export { Vr as Background, Lr as BackgroundVariant, Mn as BaseEdge, Xr as Controls, Mr as EdgeLabelRenderer, Zt as Handle, Er as ReactFlowProvider, Ar as index, Pr as useEdgesState, Nr as useNodesState, Ot as useReactFlow };
|
|
3280
|
+
memo(ResizeControl);
|
|
3281
|
+
export { Background, BackgroundVariant, BaseEdge, Controls, EdgeLabelRenderer, Handle, ReactFlowProvider, index, useEdgesState, useNodesState, useReactFlow };
|