@marimo-team/islands 0.14.18-dev9 → 0.15.1-dev10
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/{ConnectedDataExplorerComponent-sKkoI7J_.js → ConnectedDataExplorerComponent-BIDHfFwH.js} +2 -2
- package/dist/{ImageComparisonComponent-TPiJpnLF.js → ImageComparisonComponent-DNmskQsB.js} +1 -1
- package/dist/{_baseUniq-CNdqwfN5.js → _baseUniq-BerGWgvp.js} +54 -54
- package/dist/{any-language-editor-DYK8XIV9.js → any-language-editor-Doic3dKC.js} +1 -1
- package/dist/{architectureDiagram-SUXI7LT5-BiIH4UYX.js → architectureDiagram-KFL7JDKH-DX7Dfxnr.js} +2056 -2033
- package/dist/assets/{worker-CvLTHCt4.js → worker-COGufAQn.js} +701 -694
- package/dist/{blockDiagram-6J76NXCF-BpnWfh2V.js → blockDiagram-ZYB65J3Q-BJOFl2aM.js} +874 -867
- package/dist/{c4Diagram-6F6E4RAY-D29QE7hB.js → c4Diagram-AAMF2YG6-x0qS411O.js} +2 -2
- package/dist/{channel-Bcgertj0.js → channel-C6r9bPk3.js} +1 -1
- package/dist/{chunk-353BL4L5--CiHV6cN.js → chunk-ANTBXLJU-CvP1oYb6.js} +1 -1
- package/dist/{chunk-AACKK3MU-CBPZxRq5.js → chunk-FHKO5MBM-C8Qc-5zQ.js} +1 -1
- package/dist/{chunk-E2GYISFI-m0FySePo.js → chunk-GLLZNHP4-BQrm-sfi.js} +1 -1
- package/dist/{chunk-SZ463SBG-DKPaz0ti.js → chunk-JBRWN2VN-BaXj52HO.js} +101 -100
- package/dist/{chunk-OW32GOEJ-DWr9cx7S.js → chunk-LXBSTHXV-gjraHKLG.js} +3 -3
- package/dist/{chunk-SKB7J2MH-Dmp2cNaO.js → chunk-NRVI72HA-DMBGbqKL.js} +1 -1
- package/dist/{chunk-67H74DCK-BQWB3que.js → chunk-OMD6QJNC-BYhvZR0Q.js} +1 -1
- package/dist/{chunk-BFAMUDN2-Bc32Nopu.js → chunk-WVR4S24B-ZjtqNnTl.js} +1 -1
- package/dist/{classDiagram-v2-YAWTLIQI-GHh_bW8b.js → classDiagram-3BZAVTQC-DWYE4NoQ.js} +2 -2
- package/dist/{classDiagram-M3E45YP4-GHh_bW8b.js → classDiagram-v2-QTMF73CY-DWYE4NoQ.js} +2 -2
- package/dist/{clone-_N6EM6Op.js → clone-dxPIOZ-r.js} +1 -1
- package/dist/common-keywords-BefPf8TA.js +7 -0
- package/dist/{cytoscape.esm-DHKdpbSh.js → cytoscape.esm-BYnVVhJX.js} +4462 -4345
- package/dist/{dagre-JOIXM2OF-D3Ixmsdf.js → dagre-2BBEFEWP-CzHJ4OhK.js} +6 -6
- package/dist/{data-grid-overlay-editor-BZIlBk_2.js → data-grid-overlay-editor-XeDv35OR.js} +2 -2
- package/dist/{diagram-VMROVX33-Bcg30UDf.js → diagram-4IRLE6MV-BClcg9HA.js} +5 -5
- package/dist/diagram-GUPCWM2R-B_6JECpn.js +144 -0
- package/dist/{diagram-ZTM2IBQH-BhmyIBE-.js → diagram-RP2FKANI-B_7Xh4fv.js} +3 -3
- package/dist/duckdb-keywords-WTV2Iln-.js +7 -0
- package/dist/{erDiagram-3M52JZNH-y6YXLXuL.js → erDiagram-HZWUO2LU-DT9UvdxG.js} +4 -4
- package/dist/{flowDiagram-KYDEHFYC-xkSHpgfV.js → flowDiagram-THRYKUMA-mFTSeIk7.js} +61 -61
- package/dist/{ganttDiagram-EK5VF46D-CjlWOxxR.js → ganttDiagram-WV7ZQ7D5-BY3c9UTU.js} +562 -565
- package/dist/{gitGraphDiagram-GW3U2K7C-BOFtN_k5.js → gitGraphDiagram-OJR772UL-zoDq5W94.js} +4 -4
- package/dist/{glide-data-editor-DSqE1MGb.js → glide-data-editor-C_RlTnet.js} +3 -3
- package/dist/{graph-CYaaS8YP.js → graph-CufF5hzB.js} +3 -3
- package/dist/{index-B5bbjNeG.js → index-Bdw9CplZ.js} +1 -1
- package/dist/{index-CpWjEJkV.js → index-CO0vo1K7.js} +144 -144
- package/dist/index-CzG80T92.js +40315 -0
- package/dist/{index-CK3137W-.js → index-V6AHCVvK.js} +1 -1
- package/dist/{index-CGh27NE4.js → index-ezOrnRNU.js} +1 -1
- package/dist/{infoDiagram-LHK5PUON-C9568Giu.js → infoDiagram-6WOFNB3A-ChWW8LLZ.js} +2 -2
- package/dist/{journeyDiagram-EWQZEKCU-BCDjdWlE.js → journeyDiagram-FFXJYRFH-B5tIHsz4.js} +3 -3
- package/dist/{kanban-definition-ZSS6B67P-DJv26ypt.js → kanban-definition-KOZQBZVT-CT4S8AJD.js} +2 -2
- package/dist/{layout-CPN5719K.js → layout-DEnv2D-P.js} +35 -35
- package/dist/{linear-qwYbqeyR.js → linear-Bii2oeTZ.js} +19 -19
- package/dist/{main-BiZBHBEd.js → main-C81Qd2DK.js} +41523 -40156
- package/dist/main.js +1 -1
- package/dist/{mermaid-CLsxmXkQ.js → mermaid-CTBiBoaH.js} +4060 -3954
- package/dist/{min-CL5SEDkT.js → min-DqeIcY6U.js} +14 -14
- package/dist/{mindmap-definition-6CBA2TL7-Bbh3fuli.js → mindmap-definition-LNHGMQRG-BsmOiQJ4.js} +3 -3
- package/dist/{number-overlay-editor-D5mnbuyJ.js → number-overlay-editor-BHC5X-Lb.js} +2 -2
- package/dist/pieDiagram-DBDJKBY4-lxeLW5ty.js +162 -0
- package/dist/{quadrantDiagram-2OG54O6I-Cc8BnfHa.js → quadrantDiagram-YPSRARAO-CI2Xnnw_.js} +2 -2
- package/dist/{react-plotly-D3sBLSao.js → react-plotly-Dc87nM_n.js} +1 -1
- package/dist/{requirementDiagram-QOLK2EJ7-XP3SJztJ.js → requirementDiagram-EGVEC5DT-DnkoJ9T9.js} +3 -3
- package/dist/{sankeyDiagram-4UZDY2LN-CLfl4x5B.js → sankeyDiagram-HRAUVNP4-D_qWNV3j.js} +11 -9
- package/dist/{sequenceDiagram-SKLFT4DO-B6uZ2TLe.js → sequenceDiagram-WFGC7UMF-BWKW7aPY.js} +4 -4
- package/dist/{slides-component-Bb8CIGfJ.js → slides-component--9d0imfh.js} +26 -26
- package/dist/{stateDiagram-MI5ZYTHO-BkZswbX2.js → stateDiagram-UUKSUZ4H-CoPA3raY.js} +4 -4
- package/dist/{stateDiagram-v2-5AN5P6BG-DotZR8CQ.js → stateDiagram-v2-EYPG3UTE-6owwpkmY.js} +2 -2
- package/dist/{time-Bys_HZaY.js → time-B0f3H4v6.js} +2 -2
- package/dist/{timeline-definition-MYPXXCX6-bVR0nW5y.js → timeline-definition-3HZDQTIS-DogrRgC9.js} +1 -1
- package/dist/{treemap-75Q7IDZK-CmZmDu3A.js → treemap-75Q7IDZK-DlQO6GtH.js} +131 -131
- package/dist/{vega-component-DLlF3Y5o.js → vega-component-CyP-TV60.js} +2 -2
- package/dist/{xychartDiagram-H2YORKM3-C9HzjkZl.js → xychartDiagram-FDP5SA34-CRJjfJQa.js} +36 -34
- package/package.json +11 -6
- package/src/README.md +18 -0
- package/src/__mocks__/common.ts +160 -0
- package/src/__mocks__/notebook.ts +76 -0
- package/src/__mocks__/requests.ts +72 -0
- package/src/__mocks__/tracebacks.ts +32 -0
- package/src/__tests__/CellStatus.test.tsx +263 -0
- package/src/__tests__/__snapshots__/CellStatus.test.tsx.snap +523 -0
- package/src/__tests__/chat-utils.test.ts +234 -0
- package/src/__tests__/lru.test.ts +74 -0
- package/src/__tests__/main.test.tsx +174 -0
- package/src/__tests__/setup.ts +17 -0
- package/src/__tests__/test-helpers.ts +24 -0
- package/src/assets/circle-check.ico +0 -0
- package/src/assets/circle-play.ico +0 -0
- package/src/assets/circle-x.ico +0 -0
- package/src/assets/gradient.png +0 -0
- package/src/assets/icon-16x16.png +0 -0
- package/src/assets/icon-32x32.png +0 -0
- package/src/assets/noise.png +0 -0
- package/src/components/ai/ai-model-dropdown.tsx +405 -0
- package/src/components/ai/ai-provider-icon.tsx +54 -0
- package/src/components/app-config/ai-config.tsx +855 -0
- package/src/components/app-config/app-config-button.tsx +100 -0
- package/src/components/app-config/app-config-form.tsx +307 -0
- package/src/components/app-config/common.tsx +48 -0
- package/src/components/app-config/constants.ts +13 -0
- package/src/components/app-config/incorrect-model-id.tsx +43 -0
- package/src/components/app-config/is-overridden.tsx +119 -0
- package/src/components/app-config/optional-features.tsx +251 -0
- package/src/components/app-config/state.ts +18 -0
- package/src/components/app-config/user-config-form.tsx +1361 -0
- package/src/components/audio/audio-recorder.tsx +63 -0
- package/src/components/buttons/clear-button.tsx +23 -0
- package/src/components/buttons/undo-button.tsx +35 -0
- package/src/components/chat/chat-panel.tsx +720 -0
- package/src/components/chat/markdown-renderer.tsx +217 -0
- package/src/components/chat/reasoning-accordion.tsx +50 -0
- package/src/components/chat/tool-call-accordion.tsx +118 -0
- package/src/components/data-table/SearchBar.tsx +66 -0
- package/src/components/data-table/TableActions.tsx +183 -0
- package/src/components/data-table/__tests__/__snapshots__/chart-spec-model.test.ts.snap +1079 -0
- package/src/components/data-table/__tests__/chart-spec-model.test.ts +707 -0
- package/src/components/data-table/__tests__/column_formatting.test.ts +115 -0
- package/src/components/data-table/__tests__/columns.test.tsx +341 -0
- package/src/components/data-table/__tests__/data-table.test.tsx +60 -0
- package/src/components/data-table/__tests__/pagination.test.tsx +152 -0
- package/src/components/data-table/__tests__/types.test.ts +44 -0
- package/src/components/data-table/__tests__/url-detector.test.tsx +169 -0
- package/src/components/data-table/__tests__/useColumnPinning.test.ts +76 -0
- package/src/components/data-table/cell-selection/__tests__/feature.test.ts +187 -0
- package/src/components/data-table/cell-selection/feature.ts +123 -0
- package/src/components/data-table/cell-selection/types.ts +49 -0
- package/src/components/data-table/cell-styling/feature.ts +40 -0
- package/src/components/data-table/cell-styling/types.ts +26 -0
- package/src/components/data-table/charts/README.md +65 -0
- package/src/components/data-table/charts/__tests__/__snapshots__/spec-snapshot.test.ts.snap +47 -0
- package/src/components/data-table/charts/__tests__/altair-generator.test.ts +425 -0
- package/src/components/data-table/charts/__tests__/renderer.test.ts +20 -0
- package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +83 -0
- package/src/components/data-table/charts/__tests__/spec.test.ts +997 -0
- package/src/components/data-table/charts/__tests__/storage.test.ts +103 -0
- package/src/components/data-table/charts/chart-spec/altair-generator.ts +162 -0
- package/src/components/data-table/charts/chart-spec/encodings.ts +173 -0
- package/src/components/data-table/charts/chart-spec/spec.ts +345 -0
- package/src/components/data-table/charts/chart-spec/tooltips.ts +168 -0
- package/src/components/data-table/charts/chart-spec/types.ts +77 -0
- package/src/components/data-table/charts/charts.tsx +492 -0
- package/src/components/data-table/charts/components/chart-items.tsx +369 -0
- package/src/components/data-table/charts/components/chart-states.tsx +37 -0
- package/src/components/data-table/charts/components/form-fields.tsx +872 -0
- package/src/components/data-table/charts/components/layouts.tsx +118 -0
- package/src/components/data-table/charts/constants.ts +159 -0
- package/src/components/data-table/charts/context.ts +20 -0
- package/src/components/data-table/charts/forms/common-chart.tsx +202 -0
- package/src/components/data-table/charts/forms/heatmap.tsx +44 -0
- package/src/components/data-table/charts/forms/pie.tsx +70 -0
- package/src/components/data-table/charts/lazy-chart.tsx +56 -0
- package/src/components/data-table/charts/schemas.ts +140 -0
- package/src/components/data-table/charts/storage.ts +88 -0
- package/src/components/data-table/charts/types.ts +124 -0
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +227 -0
- package/src/components/data-table/column-formatting/feature.ts +247 -0
- package/src/components/data-table/column-formatting/types.ts +54 -0
- package/src/components/data-table/column-header.tsx +672 -0
- package/src/components/data-table/column-summary/chart-skeleton.tsx +57 -0
- package/src/components/data-table/column-summary/chart-spec-model.tsx +916 -0
- package/src/components/data-table/column-summary/column-summary.tsx +166 -0
- package/src/components/data-table/column-summary/legacy-chart-spec.ts +242 -0
- package/src/components/data-table/column-summary/utils.ts +142 -0
- package/src/components/data-table/column-wrapping/feature.ts +62 -0
- package/src/components/data-table/column-wrapping/types.ts +29 -0
- package/src/components/data-table/columns.tsx +528 -0
- package/src/components/data-table/copy-column/feature.ts +27 -0
- package/src/components/data-table/copy-column/types.ts +19 -0
- package/src/components/data-table/data-table.tsx +298 -0
- package/src/components/data-table/date-popover.tsx +146 -0
- package/src/components/data-table/download-actions.tsx +186 -0
- package/src/components/data-table/filter-pills.tsx +120 -0
- package/src/components/data-table/filters.ts +202 -0
- package/src/components/data-table/focus-row/feature.ts +41 -0
- package/src/components/data-table/focus-row/types.ts +32 -0
- package/src/components/data-table/header-items.tsx +295 -0
- package/src/components/data-table/hooks/use-column-pinning.ts +51 -0
- package/src/components/data-table/hooks/use-panel-ownership.ts +98 -0
- package/src/components/data-table/loading-table.tsx +56 -0
- package/src/components/data-table/mime-cell.tsx +68 -0
- package/src/components/data-table/pagination.tsx +329 -0
- package/src/components/data-table/range-focus/__tests__/atoms.test.ts +907 -0
- package/src/components/data-table/range-focus/__tests__/utils.test.ts +316 -0
- package/src/components/data-table/range-focus/atoms.ts +380 -0
- package/src/components/data-table/range-focus/cell-selection-indicator.tsx +37 -0
- package/src/components/data-table/range-focus/provider.tsx +13 -0
- package/src/components/data-table/range-focus/use-cell-range-selection.ts +119 -0
- package/src/components/data-table/range-focus/use-scroll-into-view.ts +46 -0
- package/src/components/data-table/range-focus/utils.ts +105 -0
- package/src/components/data-table/renderers.tsx +247 -0
- package/src/components/data-table/row-viewer-panel/__tests__/filter-rows.test.ts +82 -0
- package/src/components/data-table/row-viewer-panel/__tests__/row-viewer.test.tsx +58 -0
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +371 -0
- package/src/components/data-table/types.ts +81 -0
- package/src/components/data-table/uniformSample.tsx +19 -0
- package/src/components/data-table/url-detector.tsx +111 -0
- package/src/components/data-table/utils.ts +46 -0
- package/src/components/databases/display.tsx +66 -0
- package/src/components/databases/engine-variable.tsx +51 -0
- package/src/components/databases/icon.tsx +91 -0
- package/src/components/databases/icons/clickhouse.svg +1 -0
- package/src/components/databases/icons/databricks.svg +1 -0
- package/src/components/databases/icons/datafusion.png +0 -0
- package/src/components/databases/icons/duckdb.svg +1 -0
- package/src/components/databases/icons/googlebigquery.svg +1 -0
- package/src/components/databases/icons/iceberg.png +0 -0
- package/src/components/databases/icons/motherduck.svg +9 -0
- package/src/components/databases/icons/mysql.svg +1 -0
- package/src/components/databases/icons/postgresql.svg +1 -0
- package/src/components/databases/icons/redshift.svg +1 -0
- package/src/components/databases/icons/snowflake.svg +1 -0
- package/src/components/databases/icons/spark.svg +1 -0
- package/src/components/databases/icons/sqlalchemy.svg +1 -0
- package/src/components/databases/icons/sqlite.svg +1 -0
- package/src/components/databases/icons/timeplus.svg +17 -0
- package/src/components/databases/icons/trino.svg +1 -0
- package/src/components/datasets/icons.tsx +55 -0
- package/src/components/datasources/__tests__/install-package-button.test.tsx +85 -0
- package/src/components/datasources/__tests__/utils.test.ts +171 -0
- package/src/components/datasources/column-preview.tsx +269 -0
- package/src/components/datasources/components.tsx +100 -0
- package/src/components/datasources/datasources.tsx +799 -0
- package/src/components/datasources/install-package-button.tsx +46 -0
- package/src/components/datasources/utils.ts +62 -0
- package/src/components/debug/indicator.tsx +19 -0
- package/src/components/debugger/debugger-code.css +3 -0
- package/src/components/debugger/debugger-code.tsx +222 -0
- package/src/components/dependency-graph/custom-node.tsx +89 -0
- package/src/components/dependency-graph/dependency-graph-minimap.tsx +197 -0
- package/src/components/dependency-graph/dependency-graph-tree.tsx +181 -0
- package/src/components/dependency-graph/dependency-graph.css +17 -0
- package/src/components/dependency-graph/dependency-graph.tsx +66 -0
- package/src/components/dependency-graph/elements.ts +185 -0
- package/src/components/dependency-graph/panels.tsx +279 -0
- package/src/components/dependency-graph/types.ts +21 -0
- package/src/components/dependency-graph/utils/changes.ts +54 -0
- package/src/components/dependency-graph/utils/layout.ts +45 -0
- package/src/components/dependency-graph/utils/useFitToViewOnDimensionChange.ts +25 -0
- package/src/components/editor/Cell.tsx +1175 -0
- package/src/components/editor/Disconnected.tsx +72 -0
- package/src/components/editor/Output.tsx +462 -0
- package/src/components/editor/RecoveryButton.tsx +161 -0
- package/src/components/editor/SortableCell.tsx +161 -0
- package/src/components/editor/__tests__/data-attributes.test.tsx +173 -0
- package/src/components/editor/__tests__/dynamic-favicon.test.tsx +183 -0
- package/src/components/editor/actions/name-cell-input.tsx +137 -0
- package/src/components/editor/actions/types.ts +53 -0
- package/src/components/editor/actions/useCellActionButton.tsx +422 -0
- package/src/components/editor/actions/useConfigActions.tsx +182 -0
- package/src/components/editor/actions/useCopyNotebook.tsx +41 -0
- package/src/components/editor/actions/useHideAllMarkdownCode.ts +53 -0
- package/src/components/editor/actions/useNotebookActions.tsx +556 -0
- package/src/components/editor/actions/useRestartKernel.tsx +36 -0
- package/src/components/editor/ai/__tests__/completion-utils.test.ts +379 -0
- package/src/components/editor/ai/add-cell-with-ai.tsx +428 -0
- package/src/components/editor/ai/ai-completion-editor.tsx +261 -0
- package/src/components/editor/ai/completion-handlers.tsx +91 -0
- package/src/components/editor/ai/completion-utils.ts +95 -0
- package/src/components/editor/ai/merge-editor.css +9 -0
- package/src/components/editor/alerts/connecting-alert.tsx +46 -0
- package/src/components/editor/alerts/floating-alert.tsx +47 -0
- package/src/components/editor/alerts/stdin-blocking-alert.tsx +61 -0
- package/src/components/editor/app-container.tsx +53 -0
- package/src/components/editor/boundary/ErrorBoundary.tsx +41 -0
- package/src/components/editor/cell/CellStatus.tsx +371 -0
- package/src/components/editor/cell/CreateCellButton.tsx +132 -0
- package/src/components/editor/cell/DeleteButton.tsx +58 -0
- package/src/components/editor/cell/PendingDeleteConfirmation.tsx +126 -0
- package/src/components/editor/cell/RunButton.tsx +109 -0
- package/src/components/editor/cell/StopButton.tsx +36 -0
- package/src/components/editor/cell/TinyCode.css +10 -0
- package/src/components/editor/cell/TinyCode.tsx +53 -0
- package/src/components/editor/cell/cell-actions.tsx +185 -0
- package/src/components/editor/cell/cell-context-menu.tsx +243 -0
- package/src/components/editor/cell/cell-status.css +21 -0
- package/src/components/editor/cell/code/cell-editor.tsx +546 -0
- package/src/components/editor/cell/code/icons.tsx +31 -0
- package/src/components/editor/cell/code/language-toggle.tsx +140 -0
- package/src/components/editor/cell/collapse.tsx +100 -0
- package/src/components/editor/cell/toolbar.tsx +89 -0
- package/src/components/editor/cell/useAddCell.ts +29 -0
- package/src/components/editor/cell/useDeleteCell.tsx +89 -0
- package/src/components/editor/cell/useRunCells.ts +86 -0
- package/src/components/editor/cell/useShouldShowInterrupt.ts +26 -0
- package/src/components/editor/cell/useSplitCell.tsx +41 -0
- package/src/components/editor/chrome/components/contribute-snippet-button.tsx +138 -0
- package/src/components/editor/chrome/components/feedback-button.tsx +105 -0
- package/src/components/editor/chrome/panels/__tests__/write-secret-modal.test.ts +43 -0
- package/src/components/editor/chrome/panels/constants.ts +2 -0
- package/src/components/editor/chrome/panels/context-aware-panel/atoms.ts +28 -0
- package/src/components/editor/chrome/panels/context-aware-panel/context-aware-panel.tsx +167 -0
- package/src/components/editor/chrome/panels/datasources-panel.tsx +6 -0
- package/src/components/editor/chrome/panels/dependency-graph-panel.tsx +23 -0
- package/src/components/editor/chrome/panels/documentation-panel.tsx +29 -0
- package/src/components/editor/chrome/panels/empty-state.tsx +28 -0
- package/src/components/editor/chrome/panels/error-panel.tsx +35 -0
- package/src/components/editor/chrome/panels/file-explorer-panel.tsx +33 -0
- package/src/components/editor/chrome/panels/logs-panel.tsx +97 -0
- package/src/components/editor/chrome/panels/outline/floating-outline.tsx +129 -0
- package/src/components/editor/chrome/panels/outline/useActiveOutline.tsx +172 -0
- package/src/components/editor/chrome/panels/outline-panel.css +6 -0
- package/src/components/editor/chrome/panels/outline-panel.tsx +39 -0
- package/src/components/editor/chrome/panels/packages-panel.tsx +635 -0
- package/src/components/editor/chrome/panels/packages-state.ts +5 -0
- package/src/components/editor/chrome/panels/scratchpad-panel.tsx +8 -0
- package/src/components/editor/chrome/panels/secrets-panel.tsx +155 -0
- package/src/components/editor/chrome/panels/snippets-panel.css +11 -0
- package/src/components/editor/chrome/panels/snippets-panel.tsx +230 -0
- package/src/components/editor/chrome/panels/tracing-panel.tsx +28 -0
- package/src/components/editor/chrome/panels/variable-panel.tsx +31 -0
- package/src/components/editor/chrome/panels/write-secret-modal.tsx +190 -0
- package/src/components/editor/chrome/state.ts +102 -0
- package/src/components/editor/chrome/types.ts +133 -0
- package/src/components/editor/chrome/wrapper/__tests__/minimap-state.test.ts +209 -0
- package/src/components/editor/chrome/wrapper/__tests__/storage.test.ts +41 -0
- package/src/components/editor/chrome/wrapper/app-chrome.css +22 -0
- package/src/components/editor/chrome/wrapper/app-chrome.tsx +256 -0
- package/src/components/editor/chrome/wrapper/footer-item.tsx +43 -0
- package/src/components/editor/chrome/wrapper/footer-items/ai-status.tsx +47 -0
- package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +111 -0
- package/src/components/editor/chrome/wrapper/footer-items/copilot-status.tsx +125 -0
- package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +185 -0
- package/src/components/editor/chrome/wrapper/footer-items/minimap-status.tsx +21 -0
- package/src/components/editor/chrome/wrapper/footer-items/rtc-status.tsx +65 -0
- package/src/components/editor/chrome/wrapper/footer-items/runtime-settings.tsx +370 -0
- package/src/components/editor/chrome/wrapper/footer.tsx +90 -0
- package/src/components/editor/chrome/wrapper/minimap-state.ts +164 -0
- package/src/components/editor/chrome/wrapper/minimap.tsx +443 -0
- package/src/components/editor/chrome/wrapper/panels.tsx +10 -0
- package/src/components/editor/chrome/wrapper/sidebar.tsx +100 -0
- package/src/components/editor/chrome/wrapper/storage.ts +56 -0
- package/src/components/editor/chrome/wrapper/utils.ts +8 -0
- package/src/components/editor/code/readonly-python-code.tsx +160 -0
- package/src/components/editor/columns/__tests__/storage.test.ts +104 -0
- package/src/components/editor/columns/cell-column.tsx +105 -0
- package/src/components/editor/columns/sortable-column.tsx +175 -0
- package/src/components/editor/columns/storage.ts +56 -0
- package/src/components/editor/common.ts +20 -0
- package/src/components/editor/controls/Controls.tsx +225 -0
- package/src/components/editor/controls/command-palette-button.tsx +27 -0
- package/src/components/editor/controls/command-palette.tsx +210 -0
- package/src/components/editor/controls/keyboard-shortcuts.tsx +309 -0
- package/src/components/editor/controls/notebook-menu-dropdown.tsx +157 -0
- package/src/components/editor/controls/shutdown-button.tsx +70 -0
- package/src/components/editor/database/__tests__/__snapshots__/as-code.test.ts.snap +659 -0
- package/src/components/editor/database/__tests__/as-code.test.ts +598 -0
- package/src/components/editor/database/__tests__/secrets.test.ts +38 -0
- package/src/components/editor/database/add-database-form.tsx +395 -0
- package/src/components/editor/database/as-code.ts +786 -0
- package/src/components/editor/database/form-renderers.tsx +211 -0
- package/src/components/editor/database/schemas.ts +485 -0
- package/src/components/editor/database/secrets.ts +25 -0
- package/src/components/editor/documentation.css +139 -0
- package/src/components/editor/dynamic-favicon.tsx +126 -0
- package/src/components/editor/errors/auto-fix.tsx +61 -0
- package/src/components/editor/file-tree/__tests__/requesting-tree.test.ts +321 -0
- package/src/components/editor/file-tree/file-explorer.tsx +679 -0
- package/src/components/editor/file-tree/file-viewer.tsx +283 -0
- package/src/components/editor/file-tree/renderers.tsx +83 -0
- package/src/components/editor/file-tree/requesting-tree.tsx +228 -0
- package/src/components/editor/file-tree/state.tsx +26 -0
- package/src/components/editor/file-tree/types.ts +118 -0
- package/src/components/editor/file-tree/upload.tsx +101 -0
- package/src/components/editor/header/app-header.tsx +28 -0
- package/src/components/editor/header/filename-form.tsx +27 -0
- package/src/components/editor/header/filename-input.css +21 -0
- package/src/components/editor/header/filename-input.tsx +244 -0
- package/src/components/editor/header/status.tsx +72 -0
- package/src/components/editor/inputs/Inputs.css +118 -0
- package/src/components/editor/inputs/Inputs.styles.ts +66 -0
- package/src/components/editor/inputs/Inputs.tsx +34 -0
- package/src/components/editor/kiosk-mode.tsx +25 -0
- package/src/components/editor/links/cell-link-list.tsx +74 -0
- package/src/components/editor/links/cell-link.tsx +128 -0
- package/src/components/editor/navigation/__tests__/clipboard.test.ts +466 -0
- package/src/components/editor/navigation/__tests__/navigation.test.ts +1771 -0
- package/src/components/editor/navigation/__tests__/selection.test.ts +194 -0
- package/src/components/editor/navigation/clipboard.ts +205 -0
- package/src/components/editor/navigation/focus-utils.ts +48 -0
- package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +499 -0
- package/src/components/editor/navigation/navigation.ts +704 -0
- package/src/components/editor/navigation/selection.ts +114 -0
- package/src/components/editor/navigation/state.ts +5 -0
- package/src/components/editor/navigation/vim-bindings.test.ts +109 -0
- package/src/components/editor/navigation/vim-bindings.ts +90 -0
- package/src/components/editor/notebook-banner.tsx +75 -0
- package/src/components/editor/output/CalloutOutput.styles.ts +22 -0
- package/src/components/editor/output/CalloutOutput.tsx +19 -0
- package/src/components/editor/output/ConsoleOutput.tsx +276 -0
- package/src/components/editor/output/EmotionCacheProvider.tsx +32 -0
- package/src/components/editor/output/HtmlOutput.tsx +25 -0
- package/src/components/editor/output/ImageOutput.tsx +25 -0
- package/src/components/editor/output/JsonOutput.tsx +424 -0
- package/src/components/editor/output/MarimoErrorOutput.tsx +511 -0
- package/src/components/editor/output/MarimoTracebackOutput.tsx +233 -0
- package/src/components/editor/output/Outputs.css +102 -0
- package/src/components/editor/output/TextOutput.tsx +42 -0
- package/src/components/editor/output/VideoOutput.tsx +11 -0
- package/src/components/editor/output/__tests__/ansi.test.ts +39 -0
- package/src/components/editor/output/__tests__/json-output.test.ts +269 -0
- package/src/components/editor/output/__tests__/traceback.test.tsx +105 -0
- package/src/components/editor/output/useWrapText.ts +14 -0
- package/src/components/editor/package-alert.tsx +596 -0
- package/src/components/editor/renderMimeIcon.tsx +38 -0
- package/src/components/editor/renderers/CellArray.tsx +352 -0
- package/src/components/editor/renderers/cells-renderer.tsx +96 -0
- package/src/components/editor/renderers/grid-layout/grid-layout.tsx +650 -0
- package/src/components/editor/renderers/grid-layout/plugin.tsx +146 -0
- package/src/components/editor/renderers/grid-layout/styles.css +31 -0
- package/src/components/editor/renderers/grid-layout/types.ts +89 -0
- package/src/components/editor/renderers/layout-select.tsx +86 -0
- package/src/components/editor/renderers/plugins.ts +31 -0
- package/src/components/editor/renderers/slides-layout/plugin.tsx +31 -0
- package/src/components/editor/renderers/slides-layout/slides-layout.tsx +74 -0
- package/src/components/editor/renderers/slides-layout/types.ts +12 -0
- package/src/components/editor/renderers/types.ts +75 -0
- package/src/components/editor/renderers/vertical-layout/__tests__/useDelayVisibility.test.ts +87 -0
- package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +123 -0
- package/src/components/editor/renderers/vertical-layout/__tests__/vertical-layout.test.ts +173 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/__tests__/sidebar.test.tsx +56 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/sheet-sidebar.tsx +32 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/sidebar-slot.tsx +10 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/sidebar.css +20 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/sidebar.tsx +30 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/state.ts +46 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/toggle.tsx +25 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/wrapped-with-sidebar.tsx +38 -0
- package/src/components/editor/renderers/vertical-layout/useDelayVisibility.ts +32 -0
- package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +107 -0
- package/src/components/editor/renderers/vertical-layout/vertical-layout-wrapper.tsx +46 -0
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +451 -0
- package/src/components/editor/stdin-blocking-alert.tsx +83 -0
- package/src/components/export/export-output-button.tsx +14 -0
- package/src/components/find-replace/find-replace.tsx +293 -0
- package/src/components/forms/__tests__/form-utils.test.ts +104 -0
- package/src/components/forms/form-utils.ts +90 -0
- package/src/components/forms/form.tsx +817 -0
- package/src/components/forms/options.ts +59 -0
- package/src/components/forms/switchable-multi-select.tsx +134 -0
- package/src/components/home/components.tsx +189 -0
- package/src/components/home/state.ts +30 -0
- package/src/components/icons/copy-icon.tsx +59 -0
- package/src/components/icons/github-copilot.tsx +17 -0
- package/src/components/icons/large-spinner.tsx +39 -0
- package/src/components/icons/loading-ellipsis.tsx +46 -0
- package/src/components/icons/multi-icon.css +9 -0
- package/src/components/icons/multi-icon.tsx +30 -0
- package/src/components/icons/spinner.tsx +38 -0
- package/src/components/layout/toolbar.tsx +26 -0
- package/src/components/modal/ImperativeModal.tsx +187 -0
- package/src/components/pages/edit-page.tsx +37 -0
- package/src/components/pages/home-page.tsx +514 -0
- package/src/components/pages/run-page.tsx +55 -0
- package/src/components/scratchpad/scratchpad-history.ts +28 -0
- package/src/components/scratchpad/scratchpad.tsx +280 -0
- package/src/components/shortcuts/renderShortcut.tsx +208 -0
- package/src/components/slides/slides-component.tsx +132 -0
- package/src/components/slides/slides.css +100 -0
- package/src/components/sort/SortableCellsProvider.tsx +242 -0
- package/src/components/static-html/share-modal.tsx +181 -0
- package/src/components/static-html/static-banner.tsx +164 -0
- package/src/components/terminal/terminal.tsx +110 -0
- package/src/components/terminal/xterm.css +3 -0
- package/src/components/tracing/tracing-spec.ts +118 -0
- package/src/components/tracing/tracing.test.tsx +66 -0
- package/src/components/tracing/tracing.tsx +410 -0
- package/src/components/ui/accordion.tsx +70 -0
- package/src/components/ui/alert-dialog.tsx +176 -0
- package/src/components/ui/alert.tsx +64 -0
- package/src/components/ui/aria-popover.tsx +43 -0
- package/src/components/ui/badge.tsx +41 -0
- package/src/components/ui/button.tsx +156 -0
- package/src/components/ui/calendar.tsx +231 -0
- package/src/components/ui/card.tsx +83 -0
- package/src/components/ui/checkbox.tsx +33 -0
- package/src/components/ui/combobox.tsx +278 -0
- package/src/components/ui/command.tsx +165 -0
- package/src/components/ui/context-menu.tsx +193 -0
- package/src/components/ui/date-input.tsx +127 -0
- package/src/components/ui/date-picker.tsx +188 -0
- package/src/components/ui/dialog.tsx +155 -0
- package/src/components/ui/draggable-popover.tsx +68 -0
- package/src/components/ui/dropdown-menu.tsx +190 -0
- package/src/components/ui/field.tsx +90 -0
- package/src/components/ui/form.tsx +224 -0
- package/src/components/ui/fullscreen.tsx +38 -0
- package/src/components/ui/input.tsx +208 -0
- package/src/components/ui/kbd.tsx +22 -0
- package/src/components/ui/label.tsx +26 -0
- package/src/components/ui/links.tsx +23 -0
- package/src/components/ui/menu-items.tsx +101 -0
- package/src/components/ui/native-select.tsx +39 -0
- package/src/components/ui/navigation.tsx +154 -0
- package/src/components/ui/number-field.tsx +99 -0
- package/src/components/ui/popover.tsx +63 -0
- package/src/components/ui/progress.tsx +28 -0
- package/src/components/ui/radio-group.tsx +44 -0
- package/src/components/ui/range-slider.tsx +102 -0
- package/src/components/ui/scroll-area.tsx +47 -0
- package/src/components/ui/select.tsx +167 -0
- package/src/components/ui/sheet.tsx +143 -0
- package/src/components/ui/skeleton.tsx +16 -0
- package/src/components/ui/slider.tsx +80 -0
- package/src/components/ui/switch.tsx +54 -0
- package/src/components/ui/table.tsx +122 -0
- package/src/components/ui/tabs.tsx +55 -0
- package/src/components/ui/textarea.tsx +104 -0
- package/src/components/ui/toast.tsx +133 -0
- package/src/components/ui/toaster.tsx +30 -0
- package/src/components/ui/toggle.tsx +49 -0
- package/src/components/ui/tooltip.tsx +87 -0
- package/src/components/ui/typography.tsx +207 -0
- package/src/components/ui/use-restore-focus.ts +28 -0
- package/src/components/ui/use-toast.ts +224 -0
- package/src/components/utils/delay-mount.tsx +81 -0
- package/src/components/utils/lazy-mount.tsx +24 -0
- package/src/components/variables/common.tsx +37 -0
- package/src/components/variables/variables-table.tsx +335 -0
- package/src/core/MarimoApp.tsx +103 -0
- package/src/core/ai/__tests__/model-registry.test.ts +357 -0
- package/src/core/ai/chat-utils.ts +71 -0
- package/src/core/ai/config.ts +76 -0
- package/src/core/ai/context/__tests__/registry.test.ts +516 -0
- package/src/core/ai/context/context.ts +16 -0
- package/src/core/ai/context/providers/__tests__/__snapshots__/tables.test.ts.snap +291 -0
- package/src/core/ai/context/providers/__tests__/__snapshots__/variable.test.ts.snap +378 -0
- package/src/core/ai/context/providers/__tests__/tables.test.ts +271 -0
- package/src/core/ai/context/providers/__tests__/variable.test.ts +312 -0
- package/src/core/ai/context/providers/common.ts +7 -0
- package/src/core/ai/context/providers/tables.ts +208 -0
- package/src/core/ai/context/providers/variable.ts +72 -0
- package/src/core/ai/context/registry.ts +180 -0
- package/src/core/ai/ids/__tests__/ids.test.ts +193 -0
- package/src/core/ai/ids/ids.ts +71 -0
- package/src/core/ai/model-registry.ts +158 -0
- package/src/core/ai/state.ts +58 -0
- package/src/core/alerts/state.ts +75 -0
- package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +1312 -0
- package/src/core/cells/__tests__/add-missing-import.test.ts +78 -0
- package/src/core/cells/__tests__/cell.test.ts +193 -0
- package/src/core/cells/__tests__/cells.test.ts +2664 -0
- package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +239 -0
- package/src/core/cells/__tests__/focus.test.ts +271 -0
- package/src/core/cells/__tests__/ids.test.ts +90 -0
- package/src/core/cells/__tests__/names.test.ts +62 -0
- package/src/core/cells/__tests__/pending-delete-service.test.tsx +202 -0
- package/src/core/cells/__tests__/runs.test.ts +453 -0
- package/src/core/cells/__tests__/session.test.ts +757 -0
- package/src/core/cells/__tests__/utils.test.ts +428 -0
- package/src/core/cells/actions.ts +21 -0
- package/src/core/cells/add-missing-import.ts +114 -0
- package/src/core/cells/cell.ts +243 -0
- package/src/core/cells/cells.ts +1751 -0
- package/src/core/cells/collapseConsoleOutputs.tsx +133 -0
- package/src/core/cells/effects.ts +42 -0
- package/src/core/cells/focus.ts +128 -0
- package/src/core/cells/ids.ts +124 -0
- package/src/core/cells/logs.ts +114 -0
- package/src/core/cells/names.ts +107 -0
- package/src/core/cells/outline.ts +30 -0
- package/src/core/cells/outputs.ts +34 -0
- package/src/core/cells/pending-delete-service.ts +183 -0
- package/src/core/cells/runs.ts +196 -0
- package/src/core/cells/scrollCellIntoView.ts +133 -0
- package/src/core/cells/session.ts +281 -0
- package/src/core/cells/types.ts +128 -0
- package/src/core/cells/utils.ts +141 -0
- package/src/core/codemirror/__tests__/__snapshots__/setup.test.ts.snap +216 -0
- package/src/core/codemirror/__tests__/extensions.test.ts +117 -0
- package/src/core/codemirror/__tests__/format.test.ts +227 -0
- package/src/core/codemirror/__tests__/setup.test.ts +178 -0
- package/src/core/codemirror/ai/request.ts +72 -0
- package/src/core/codemirror/ai/resources.ts +90 -0
- package/src/core/codemirror/cells/extensions.ts +387 -0
- package/src/core/codemirror/cells/state.ts +32 -0
- package/src/core/codemirror/cells/traceback-decorations.ts +111 -0
- package/src/core/codemirror/cm.ts +272 -0
- package/src/core/codemirror/compat/__tests__/jupyter.test.ts +136 -0
- package/src/core/codemirror/compat/jupyter.tsx +244 -0
- package/src/core/codemirror/completion/Autocompleter.ts +172 -0
- package/src/core/codemirror/completion/__tests__/hints.test.ts +84 -0
- package/src/core/codemirror/completion/__tests__/keymap.test.ts +44 -0
- package/src/core/codemirror/completion/completer.ts +58 -0
- package/src/core/codemirror/completion/hints.ts +143 -0
- package/src/core/codemirror/completion/keymap.ts +70 -0
- package/src/core/codemirror/completion/utils.ts +18 -0
- package/src/core/codemirror/completion/variable-completions.ts +100 -0
- package/src/core/codemirror/config/extension.ts +63 -0
- package/src/core/codemirror/config/types.ts +10 -0
- package/src/core/codemirror/copilot/__tests__/copilot.test.ts +260 -0
- package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +209 -0
- package/src/core/codemirror/copilot/__tests__/trim-utils.test.ts +291 -0
- package/src/core/codemirror/copilot/client.ts +123 -0
- package/src/core/codemirror/copilot/copilot-config.tsx +285 -0
- package/src/core/codemirror/copilot/extension.ts +285 -0
- package/src/core/codemirror/copilot/getCodes.ts +130 -0
- package/src/core/codemirror/copilot/language-server.ts +255 -0
- package/src/core/codemirror/copilot/state.ts +66 -0
- package/src/core/codemirror/copilot/trim-utils.ts +33 -0
- package/src/core/codemirror/copilot/types.ts +41 -0
- package/src/core/codemirror/editing/__tests__/commands.test.ts +106 -0
- package/src/core/codemirror/editing/__tests__/debugging.test.ts +193 -0
- package/src/core/codemirror/editing/commands.ts +25 -0
- package/src/core/codemirror/editing/debugging.ts +58 -0
- package/src/core/codemirror/editing/extensions.ts +4 -0
- package/src/core/codemirror/extensions.ts +95 -0
- package/src/core/codemirror/facet.ts +19 -0
- package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +695 -0
- package/src/core/codemirror/find-replace/extension.ts +41 -0
- package/src/core/codemirror/find-replace/navigate.ts +221 -0
- package/src/core/codemirror/find-replace/query.ts +31 -0
- package/src/core/codemirror/find-replace/search-highlight.ts +148 -0
- package/src/core/codemirror/find-replace/state.ts +167 -0
- package/src/core/codemirror/format.ts +120 -0
- package/src/core/codemirror/go-to-definition/__tests__/commands.test.ts +205 -0
- package/src/core/codemirror/go-to-definition/commands.ts +80 -0
- package/src/core/codemirror/go-to-definition/extension.ts +23 -0
- package/src/core/codemirror/go-to-definition/underline.ts +223 -0
- package/src/core/codemirror/go-to-definition/utils.ts +126 -0
- package/src/core/codemirror/keymaps/__tests__/keymaps.test.ts +43 -0
- package/src/core/codemirror/keymaps/__tests__/vimrc.test.ts +121 -0
- package/src/core/codemirror/keymaps/keymaps.ts +163 -0
- package/src/core/codemirror/keymaps/vim.ts +360 -0
- package/src/core/codemirror/keymaps/vimrc.ts +149 -0
- package/src/core/codemirror/language/LanguageAdapters.ts +23 -0
- package/src/core/codemirror/language/__tests__/ast.test.ts +124 -0
- package/src/core/codemirror/language/__tests__/extension.test.ts +260 -0
- package/src/core/codemirror/language/__tests__/indentOneTab.test.ts +31 -0
- package/src/core/codemirror/language/__tests__/markdown.test.ts +495 -0
- package/src/core/codemirror/language/__tests__/sql.test.ts +1640 -0
- package/src/core/codemirror/language/__tests__/utils.test.ts +166 -0
- package/src/core/codemirror/language/commands.ts +59 -0
- package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +163 -0
- package/src/core/codemirror/language/embedded/embedded-python.ts +131 -0
- package/src/core/codemirror/language/embedded/latex.ts +257 -0
- package/src/core/codemirror/language/extension.ts +322 -0
- package/src/core/codemirror/language/languages/markdown.ts +261 -0
- package/src/core/codemirror/language/languages/python.ts +329 -0
- package/src/core/codemirror/language/languages/sql/completion-sources.tsx +99 -0
- package/src/core/codemirror/language/languages/sql/completion-store.ts +191 -0
- package/src/core/codemirror/language/languages/sql/sql.ts +545 -0
- package/src/core/codemirror/language/languages/sql/utils.ts +42 -0
- package/src/core/codemirror/language/metadata.ts +71 -0
- package/src/core/codemirror/language/panel/markdown.tsx +63 -0
- package/src/core/codemirror/language/panel/panel.tsx +197 -0
- package/src/core/codemirror/language/panel/sql.tsx +132 -0
- package/src/core/codemirror/language/types.ts +41 -0
- package/src/core/codemirror/language/utils/ast.ts +84 -0
- package/src/core/codemirror/language/utils/indentOneTab.ts +9 -0
- package/src/core/codemirror/language/utils/quotes.ts +18 -0
- package/src/core/codemirror/language/utils.ts +78 -0
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +860 -0
- package/src/core/codemirror/lsp/federated-lsp.ts +235 -0
- package/src/core/codemirror/lsp/lens.ts +130 -0
- package/src/core/codemirror/lsp/notebook-lsp.ts +604 -0
- package/src/core/codemirror/lsp/transports.ts +31 -0
- package/src/core/codemirror/lsp/types.ts +55 -0
- package/src/core/codemirror/lsp/utils.ts +11 -0
- package/src/core/codemirror/markdown/__tests__/commands.test.ts +522 -0
- package/src/core/codemirror/markdown/commands.ts +478 -0
- package/src/core/codemirror/markdown/completions.ts +273 -0
- package/src/core/codemirror/markdown/extension.ts +106 -0
- package/src/core/codemirror/misc/__tests__/dnd.test.ts +111 -0
- package/src/core/codemirror/misc/__tests__/paste.test.ts +239 -0
- package/src/core/codemirror/misc/dnd.ts +48 -0
- package/src/core/codemirror/misc/paste.ts +181 -0
- package/src/core/codemirror/placeholder/__tests__/extensions.test.ts +132 -0
- package/src/core/codemirror/placeholder/extensions.ts +99 -0
- package/src/core/codemirror/react-dom/createPanel.tsx +39 -0
- package/src/core/codemirror/reactive-references/__tests__/analyzer.test.ts +1222 -0
- package/src/core/codemirror/reactive-references/analyzer.ts +608 -0
- package/src/core/codemirror/reactive-references/extension.ts +154 -0
- package/src/core/codemirror/readonly/__tests__/extension.test.ts +55 -0
- package/src/core/codemirror/readonly/extension.ts +187 -0
- package/src/core/codemirror/rtc/extension.ts +450 -0
- package/src/core/codemirror/rtc/loro/awareness.ts +496 -0
- package/src/core/codemirror/rtc/loro/colors.ts +38 -0
- package/src/core/codemirror/rtc/loro/sync.ts +159 -0
- package/src/core/codemirror/theme/__tests__/light.test.ts +136 -0
- package/src/core/codemirror/theme/dark.ts +50 -0
- package/src/core/codemirror/theme/light.ts +58 -0
- package/src/core/codemirror/types.ts +5 -0
- package/src/core/codemirror/utils.ts +103 -0
- package/src/core/codemirror/vim/cursor-visibility.ts +58 -0
- package/src/core/config/__tests__/config-schema.test.ts +232 -0
- package/src/core/config/capabilities.ts +15 -0
- package/src/core/config/config-schema.ts +296 -0
- package/src/core/config/config.ts +113 -0
- package/src/core/config/feature-flag.tsx +58 -0
- package/src/core/config/if-capability.tsx +19 -0
- package/src/core/config/widths.ts +5 -0
- package/src/core/constants.ts +52 -0
- package/src/core/datasets/__tests__/all-tables.test.ts +466 -0
- package/src/core/datasets/__tests__/data-source.test.ts +461 -0
- package/src/core/datasets/data-source-connections.ts +334 -0
- package/src/core/datasets/engines.ts +11 -0
- package/src/core/datasets/request-registry.ts +34 -0
- package/src/core/datasets/state.ts +143 -0
- package/src/core/datasets/types.ts +38 -0
- package/src/core/debugger/state.ts +10 -0
- package/src/core/documentation/state.ts +13 -0
- package/src/core/dom/__tests__/htmlUtils.test.ts +22 -0
- package/src/core/dom/__tests__/outline.test.ts +370 -0
- package/src/core/dom/defineCustomElement.ts +23 -0
- package/src/core/dom/events.ts +94 -0
- package/src/core/dom/htmlUtils.ts +75 -0
- package/src/core/dom/outline.ts +123 -0
- package/src/core/dom/ui-element.css +8 -0
- package/src/core/dom/ui-element.ts +249 -0
- package/src/core/dom/uiregistry.ts +209 -0
- package/src/core/edit-app.tsx +189 -0
- package/src/core/errors/__tests__/errors.test.ts +62 -0
- package/src/core/errors/__tests__/utils.test.ts +108 -0
- package/src/core/errors/errors.ts +96 -0
- package/src/core/errors/state.ts +44 -0
- package/src/core/errors/utils.ts +67 -0
- package/src/core/export/hooks.ts +60 -0
- package/src/core/functions/FunctionRegistry.ts +18 -0
- package/src/core/hotkeys/__tests__/hotkeys.test.ts +74 -0
- package/src/core/hotkeys/__tests__/shortcuts.test.ts +166 -0
- package/src/core/hotkeys/actions.ts +38 -0
- package/src/core/hotkeys/hotkeys.ts +523 -0
- package/src/core/hotkeys/shortcuts.ts +146 -0
- package/src/core/islands/__tests__/parse.test.ts +89 -0
- package/src/core/islands/bridge.ts +196 -0
- package/src/core/islands/components/output-wrapper.tsx +154 -0
- package/src/core/islands/components/web-components.tsx +120 -0
- package/src/core/islands/islands.css +14 -0
- package/src/core/islands/main.ts +200 -0
- package/src/core/islands/parse.ts +161 -0
- package/src/core/islands/state.ts +30 -0
- package/src/core/islands/toast.ts +41 -0
- package/src/core/islands/utils.ts +5 -0
- package/src/core/islands/worker/controller.ts +52 -0
- package/src/core/islands/worker/worker.tsx +178 -0
- package/src/core/kernel/RuntimeState.ts +94 -0
- package/src/core/kernel/__tests__/RuntimeState.test.ts +57 -0
- package/src/core/kernel/__tests__/handlers.test.ts +61 -0
- package/src/core/kernel/__tests__/session.test.ts +10 -0
- package/src/core/kernel/handlers.ts +159 -0
- package/src/core/kernel/messages.ts +54 -0
- package/src/core/kernel/queryParamHandlers.ts +39 -0
- package/src/core/kernel/session.ts +50 -0
- package/src/core/layout/layout.ts +99 -0
- package/src/core/layout/useTogglePresenting.ts +50 -0
- package/src/core/meta/globals.ts +25 -0
- package/src/core/meta/state.ts +25 -0
- package/src/core/mime.ts +9 -0
- package/src/core/mode.ts +80 -0
- package/src/core/network/DeferredRequestRegistry.ts +71 -0
- package/src/core/network/__tests__/DeferredRequestRegistry.test.ts +37 -0
- package/src/core/network/__tests__/api.test.ts +80 -0
- package/src/core/network/api.ts +145 -0
- package/src/core/network/auth.ts +13 -0
- package/src/core/network/connection.ts +33 -0
- package/src/core/network/requests-network.ts +398 -0
- package/src/core/network/requests-static.ts +88 -0
- package/src/core/network/requests-toasting.ts +91 -0
- package/src/core/network/requests.ts +24 -0
- package/src/core/network/resolve.ts +17 -0
- package/src/core/network/types.ts +188 -0
- package/src/core/packages/toast-components.tsx +88 -0
- package/src/core/packages/useInstallPackage.ts +46 -0
- package/src/core/rtc/state.ts +20 -0
- package/src/core/run-app.tsx +69 -0
- package/src/core/runtime/__tests__/config.test.ts +173 -0
- package/src/core/runtime/__tests__/createWsUrl.test.ts +61 -0
- package/src/core/runtime/__tests__/runtime.test.ts +603 -0
- package/src/core/runtime/config.ts +49 -0
- package/src/core/runtime/runtime.ts +277 -0
- package/src/core/runtime/types.ts +7 -0
- package/src/core/runtime/utils.ts +9 -0
- package/src/core/saving/file-state.ts +15 -0
- package/src/core/saving/filename.ts +55 -0
- package/src/core/saving/save-component.tsx +274 -0
- package/src/core/saving/state.ts +51 -0
- package/src/core/saving/useAutoSave.ts +68 -0
- package/src/core/secrets/request-registry.ts +16 -0
- package/src/core/slots/slots.ts +9 -0
- package/src/core/state/__tests__/jotai.test.ts +25 -0
- package/src/core/state/jotai.ts +69 -0
- package/src/core/state/observable.ts +23 -0
- package/src/core/static/__tests__/download-html.test.ts +41 -0
- package/src/core/static/__tests__/files.test.ts +494 -0
- package/src/core/static/__tests__/virtual-file-tracker.test.ts +92 -0
- package/src/core/static/download-html.ts +59 -0
- package/src/core/static/files.ts +150 -0
- package/src/core/static/static-state.ts +19 -0
- package/src/core/static/types.ts +8 -0
- package/src/core/static/virtual-file-tracker.ts +83 -0
- package/src/core/variables/__tests__/state.test.ts +148 -0
- package/src/core/variables/state.ts +81 -0
- package/src/core/variables/types.ts +22 -0
- package/src/core/vscode/vscode-bindings.ts +176 -0
- package/src/core/wasm/PyodideLoader.tsx +72 -0
- package/src/core/wasm/__tests__/router.test.ts +57 -0
- package/src/core/wasm/__tests__/share.test.ts +35 -0
- package/src/core/wasm/__tests__/state.test.ts +124 -0
- package/src/core/wasm/__tests__/store.test.ts +55 -0
- package/src/core/wasm/bridge.ts +622 -0
- package/src/core/wasm/router.ts +39 -0
- package/src/core/wasm/rpc.ts +32 -0
- package/src/core/wasm/share.ts +15 -0
- package/src/core/wasm/state.ts +21 -0
- package/src/core/wasm/store.ts +122 -0
- package/src/core/wasm/utils.ts +12 -0
- package/src/core/wasm/worker/bootstrap.ts +223 -0
- package/src/core/wasm/worker/constants.ts +2 -0
- package/src/core/wasm/worker/fs.ts +90 -0
- package/src/core/wasm/worker/getController.ts +16 -0
- package/src/core/wasm/worker/getFS.ts +9 -0
- package/src/core/wasm/worker/getMarimoWheel.ts +15 -0
- package/src/core/wasm/worker/getPyodideVersion.ts +10 -0
- package/src/core/wasm/worker/message-buffer.ts +32 -0
- package/src/core/wasm/worker/save-worker.ts +107 -0
- package/src/core/wasm/worker/tracer.ts +7 -0
- package/src/core/wasm/worker/types.ts +97 -0
- package/src/core/wasm/worker/worker.ts +375 -0
- package/src/core/websocket/StaticWebsocket.ts +61 -0
- package/src/core/websocket/connection-utils.ts +59 -0
- package/src/core/websocket/types.ts +43 -0
- package/src/core/websocket/useMarimoWebSocket.tsx +386 -0
- package/src/core/websocket/useWebSocket.tsx +88 -0
- package/src/css/admonition.css +127 -0
- package/src/css/app/App.css +77 -0
- package/src/css/app/Cell.css +433 -0
- package/src/css/app/Header.css +25 -0
- package/src/css/app/codemirror-completions.css +308 -0
- package/src/css/app/codemirror.css +136 -0
- package/src/css/app/fonts.css +50 -0
- package/src/css/app/print.css +86 -0
- package/src/css/app/reset.css +18 -0
- package/src/css/codehilite.css +354 -0
- package/src/css/common.css +45 -0
- package/src/css/globals.css +176 -0
- package/src/css/index.css +10 -0
- package/src/css/katex-fonts.css +214 -0
- package/src/css/katex.min.css +1183 -0
- package/src/css/md-tooltip.css +52 -0
- package/src/css/md.css +365 -0
- package/src/css/progress.css +93 -0
- package/src/css/table.css +45 -0
- package/src/custom.d.ts +24 -0
- package/src/fonts/Fira_Mono/FiraMono-Bold.ttf +0 -0
- package/src/fonts/Fira_Mono/FiraMono-Medium.ttf +0 -0
- package/src/fonts/Fira_Mono/FiraMono-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_AMS-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_AMS-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_AMS-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Bold.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Bold.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Bold.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Italic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Italic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Italic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-Italic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-Italic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-Italic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Script-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Script-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Script-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Size1-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Size1-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Size1-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Size2-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Size2-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Size2-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Size3-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Size3-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Size3-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Size4-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Size4-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Size4-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/src/fonts/Lora/Lora-Italic-VariableFont_wght.ttf +0 -0
- package/src/fonts/Lora/Lora-VariableFont_wght.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Bold.ttf +0 -0
- package/src/fonts/Lora/static/Lora-BoldItalic.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Italic.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Medium.ttf +0 -0
- package/src/fonts/Lora/static/Lora-MediumItalic.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Regular.ttf +0 -0
- package/src/fonts/Lora/static/Lora-SemiBold.ttf +0 -0
- package/src/fonts/Lora/static/Lora-SemiBoldItalic.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-Bold.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-BoldItalic.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-Italic.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-Regular.ttf +0 -0
- package/src/hooks/__tests__/useBoolean.test.tsx +33 -0
- package/src/hooks/__tests__/useDebounce.test.tsx +182 -0
- package/src/hooks/__tests__/useEffectSkipFirstRender.test.tsx +42 -0
- package/src/hooks/__tests__/useEventListener.test.tsx +148 -0
- package/src/hooks/__tests__/useInternalStateWithSync.test.tsx +76 -0
- package/src/hooks/__tests__/useInterval.test.tsx +70 -0
- package/src/hooks/__tests__/usePackageMetadata.test.tsx +219 -0
- package/src/hooks/__tests__/useResizeHandle.test.tsx +240 -0
- package/src/hooks/__tests__/useResizeObserver.test.tsx +86 -0
- package/src/hooks/__tests__/useTimer.test.tsx +62 -0
- package/src/hooks/debug.ts +116 -0
- package/src/hooks/useAsyncData.ts +392 -0
- package/src/hooks/useAudioRecorder.ts +89 -0
- package/src/hooks/useAutoGrowInputProps.ts +56 -0
- package/src/hooks/useBoolean.ts +26 -0
- package/src/hooks/useCellRenderCount.ts +15 -0
- package/src/hooks/useDebounce.ts +95 -0
- package/src/hooks/useDeepCompareMemoize.ts +22 -0
- package/src/hooks/useEffectSkipFirstRender.ts +24 -0
- package/src/hooks/useElapsedTime.ts +25 -0
- package/src/hooks/useEvent.ts +2 -0
- package/src/hooks/useEventListener.ts +68 -0
- package/src/hooks/useHotkey.ts +77 -0
- package/src/hooks/useInternalStateWithSync.ts +26 -0
- package/src/hooks/useInterval.ts +49 -0
- package/src/hooks/useIsDragging.tsx +39 -0
- package/src/hooks/useLifecycle.ts +20 -0
- package/src/hooks/useLocalStorage.ts +22 -0
- package/src/hooks/useNonce.ts +9 -0
- package/src/hooks/usePackageMetadata.ts +52 -0
- package/src/hooks/useRecentCommands.ts +25 -0
- package/src/hooks/useResizeHandle.ts +110 -0
- package/src/hooks/useResizeObserver.ts +101 -0
- package/src/hooks/useScript.ts +90 -0
- package/src/hooks/useSelectAllContent.ts +42 -0
- package/src/hooks/useTimer.ts +48 -0
- package/src/main.tsx +20 -0
- package/src/mount.tsx +331 -0
- package/src/plugins/core/BadPlugin.tsx +72 -0
- package/src/plugins/core/RenderHTML.tsx +136 -0
- package/src/plugins/core/__test__/RenderHTML.test.ts +146 -0
- package/src/plugins/core/builder.ts +59 -0
- package/src/plugins/core/registerReactComponent.tsx +535 -0
- package/src/plugins/core/rpc.ts +55 -0
- package/src/plugins/core/sidebar-element.tsx +104 -0
- package/src/plugins/impl/ButtonPlugin.tsx +95 -0
- package/src/plugins/impl/CheckboxPlugin.tsx +56 -0
- package/src/plugins/impl/CodeEditorPlugin.tsx +119 -0
- package/src/plugins/impl/DataEditorPlugin.tsx +181 -0
- package/src/plugins/impl/DataTablePlugin.tsx +948 -0
- package/src/plugins/impl/DatePickerPlugin.tsx +74 -0
- package/src/plugins/impl/DateRangePlugin.tsx +82 -0
- package/src/plugins/impl/DateTimePickerPlugin.tsx +76 -0
- package/src/plugins/impl/DictPlugin.tsx +80 -0
- package/src/plugins/impl/DropdownPlugin.tsx +102 -0
- package/src/plugins/impl/FileBrowserPlugin.tsx +500 -0
- package/src/plugins/impl/FileUploadPlugin.tsx +302 -0
- package/src/plugins/impl/FormPlugin.tsx +294 -0
- package/src/plugins/impl/MicrophonePlugin.tsx +58 -0
- package/src/plugins/impl/MultiselectPlugin.tsx +207 -0
- package/src/plugins/impl/NumberPlugin.tsx +84 -0
- package/src/plugins/impl/RadioPlugin.tsx +77 -0
- package/src/plugins/impl/RangeSliderPlugin.tsx +163 -0
- package/src/plugins/impl/RefreshPlugin.tsx +158 -0
- package/src/plugins/impl/SearchableSelect.tsx +122 -0
- package/src/plugins/impl/SliderPlugin.tsx +166 -0
- package/src/plugins/impl/SwitchPlugin.tsx +48 -0
- package/src/plugins/impl/TabsPlugin.tsx +83 -0
- package/src/plugins/impl/TextAreaPlugin.tsx +131 -0
- package/src/plugins/impl/TextInputPlugin.tsx +169 -0
- package/src/plugins/impl/__tests__/DateTimePickerPlugin.test.tsx +45 -0
- package/src/plugins/impl/__tests__/DropdownPlugin.test.tsx +178 -0
- package/src/plugins/impl/__tests__/MultiSelectPlugin.test.ts +41 -0
- package/src/plugins/impl/__tests__/NumberPlugin.test.tsx +144 -0
- package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +269 -0
- package/src/plugins/impl/anywidget/__tests__/AnyWidgetPlugin.test.tsx +181 -0
- package/src/plugins/impl/anywidget/__tests__/model.test.ts +370 -0
- package/src/plugins/impl/anywidget/model.ts +314 -0
- package/src/plugins/impl/chat/ChatPlugin.tsx +98 -0
- package/src/plugins/impl/chat/chat-ui.tsx +713 -0
- package/src/plugins/impl/chat/types.ts +39 -0
- package/src/plugins/impl/code/LazyAnyLanguageCodeMirror.tsx +6 -0
- package/src/plugins/impl/code/any-language-editor.tsx +68 -0
- package/src/plugins/impl/common/error-banner.tsx +111 -0
- package/src/plugins/impl/common/intent.ts +18 -0
- package/src/plugins/impl/common/labeled.tsx +69 -0
- package/src/plugins/impl/data-editor/__tests__/data-utils.test.ts +876 -0
- package/src/plugins/impl/data-editor/__tests__/glide-utils.test.ts +452 -0
- package/src/plugins/impl/data-editor/components.tsx +179 -0
- package/src/plugins/impl/data-editor/data-utils.ts +123 -0
- package/src/plugins/impl/data-editor/glide-data-editor.tsx +651 -0
- package/src/plugins/impl/data-editor/glide-utils.ts +200 -0
- package/src/plugins/impl/data-editor/themes.ts +49 -0
- package/src/plugins/impl/data-editor/types.ts +44 -0
- package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +268 -0
- package/src/plugins/impl/data-explorer/DataExplorerPlugin.tsx +31 -0
- package/src/plugins/impl/data-explorer/components/column-summary.tsx +174 -0
- package/src/plugins/impl/data-explorer/components/icons.tsx +30 -0
- package/src/plugins/impl/data-explorer/components/query-form.tsx +296 -0
- package/src/plugins/impl/data-explorer/encoding.ts +107 -0
- package/src/plugins/impl/data-explorer/functions/function.ts +83 -0
- package/src/plugins/impl/data-explorer/functions/types.ts +32 -0
- package/src/plugins/impl/data-explorer/marks.ts +21 -0
- package/src/plugins/impl/data-explorer/queries/field-suggestion.ts +65 -0
- package/src/plugins/impl/data-explorer/queries/histograms.ts +41 -0
- package/src/plugins/impl/data-explorer/queries/queries.ts +204 -0
- package/src/plugins/impl/data-explorer/queries/removeUndefined.ts +11 -0
- package/src/plugins/impl/data-explorer/queries/types.ts +54 -0
- package/src/plugins/impl/data-explorer/queries/utils.ts +85 -0
- package/src/plugins/impl/data-explorer/spec.ts +28 -0
- package/src/plugins/impl/data-explorer/state/reducer.ts +92 -0
- package/src/plugins/impl/data-explorer/state/types.ts +28 -0
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +303 -0
- package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +1600 -0
- package/src/plugins/impl/data-frames/forms/__tests__/form.test.tsx +67 -0
- package/src/plugins/impl/data-frames/forms/context.ts +13 -0
- package/src/plugins/impl/data-frames/forms/datatype-icon.tsx +43 -0
- package/src/plugins/impl/data-frames/forms/renderers.tsx +518 -0
- package/src/plugins/impl/data-frames/panel.tsx +308 -0
- package/src/plugins/impl/data-frames/schema.ts +211 -0
- package/src/plugins/impl/data-frames/types.ts +91 -0
- package/src/plugins/impl/data-frames/utils/__tests__/getUpdatedColumnTypes.test.ts +191 -0
- package/src/plugins/impl/data-frames/utils/__tests__/operators.test.ts +116 -0
- package/src/plugins/impl/data-frames/utils/getUpdatedColumnTypes.ts +67 -0
- package/src/plugins/impl/data-frames/utils/operators.ts +202 -0
- package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +39 -0
- package/src/plugins/impl/multiselectFilterFn.tsx +22 -0
- package/src/plugins/impl/panel/PanelPlugin.tsx +266 -0
- package/src/plugins/impl/panel/__tests__/utils.test.ts +119 -0
- package/src/plugins/impl/panel/utils.ts +104 -0
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +300 -0
- package/src/plugins/impl/plotly/__tests__/parse-from-template.test.ts +73 -0
- package/src/plugins/impl/plotly/mapbox.css +359 -0
- package/src/plugins/impl/plotly/parse-from-template.ts +58 -0
- package/src/plugins/impl/plotly/plotly.css +280 -0
- package/src/plugins/impl/vega/VegaPlugin.tsx +40 -0
- package/src/plugins/impl/vega/__tests__/__snapshots__/make-selectable.test.ts.snap +1210 -0
- package/src/plugins/impl/vega/__tests__/encodings.test.ts +172 -0
- package/src/plugins/impl/vega/__tests__/loader.test.ts +73 -0
- package/src/plugins/impl/vega/__tests__/make-selectable.test.ts +575 -0
- package/src/plugins/impl/vega/__tests__/params.test.ts +52 -0
- package/src/plugins/impl/vega/__tests__/resolve-data.test.ts +236 -0
- package/src/plugins/impl/vega/__tests__/vega.test.ts +603 -0
- package/src/plugins/impl/vega/batched.ts +41 -0
- package/src/plugins/impl/vega/encodings.ts +111 -0
- package/src/plugins/impl/vega/fix-relative-url.ts +15 -0
- package/src/plugins/impl/vega/formats.ts +25 -0
- package/src/plugins/impl/vega/loader.ts +320 -0
- package/src/plugins/impl/vega/make-selectable.ts +248 -0
- package/src/plugins/impl/vega/marks.ts +36 -0
- package/src/plugins/impl/vega/params.ts +192 -0
- package/src/plugins/impl/vega/resolve-data.ts +101 -0
- package/src/plugins/impl/vega/types.ts +32 -0
- package/src/plugins/impl/vega/utils.ts +46 -0
- package/src/plugins/impl/vega/vega-component.tsx +271 -0
- package/src/plugins/impl/vega/vega-loader.ts +53 -0
- package/src/plugins/impl/vega/vega.css +31 -0
- package/src/plugins/layout/AccordionPlugin.tsx +63 -0
- package/src/plugins/layout/CalloutPlugin.tsx +34 -0
- package/src/plugins/layout/DownloadPlugin.tsx +136 -0
- package/src/plugins/layout/ImageComparisonPlugin.tsx +35 -0
- package/src/plugins/layout/JsonOutputPlugin.tsx +47 -0
- package/src/plugins/layout/LazyPlugin.tsx +98 -0
- package/src/plugins/layout/MimeRenderPlugin.tsx +45 -0
- package/src/plugins/layout/NavigationMenuPlugin.tsx +219 -0
- package/src/plugins/layout/ProgressPlugin.tsx +175 -0
- package/src/plugins/layout/RoutesPlugin.tsx +81 -0
- package/src/plugins/layout/StatPlugin.tsx +100 -0
- package/src/plugins/layout/TexPlugin.tsx +102 -0
- package/src/plugins/layout/__test__/ProgressPlugin.test.ts +26 -0
- package/src/plugins/layout/carousel/CarouselPlugin.tsx +48 -0
- package/src/plugins/layout/mermaid/MermaidPlugin.tsx +26 -0
- package/src/plugins/layout/mermaid/mermaid.tsx +94 -0
- package/src/plugins/layout/navigation-menu.css +37 -0
- package/src/plugins/plugins.ts +116 -0
- package/src/plugins/stateless-plugin.ts +29 -0
- package/src/plugins/types.ts +82 -0
- package/src/stories/__fixtures__/vega.ts +225 -0
- package/src/stories/accordion.stories.tsx +100 -0
- package/src/stories/alert-dialog.mdx +42 -0
- package/src/stories/app-chrome.stories.tsx +26 -0
- package/src/stories/button.stories.tsx +90 -0
- package/src/stories/callout.stories.tsx +73 -0
- package/src/stories/cell-status.stories.tsx +145 -0
- package/src/stories/cell.stories.tsx +336 -0
- package/src/stories/checkbox.stories.tsx +44 -0
- package/src/stories/colors.stories.tsx +156 -0
- package/src/stories/combobox.stories.tsx +133 -0
- package/src/stories/context-menu.mdx +23 -0
- package/src/stories/data-explorer.stories.tsx +30 -0
- package/src/stories/data-table.stories.tsx +130 -0
- package/src/stories/dataframe.stories.tsx +46 -0
- package/src/stories/debugger.stories.tsx +34 -0
- package/src/stories/dialog.stories.tsx +80 -0
- package/src/stories/dropdown-menu.mdx +159 -0
- package/src/stories/editor-inputs.stories.tsx +47 -0
- package/src/stories/editor.stories.tsx +91 -0
- package/src/stories/file-upload.stories.tsx +103 -0
- package/src/stories/form-wrapper.stories.tsx +147 -0
- package/src/stories/input.stories.tsx +56 -0
- package/src/stories/label.mdx +9 -0
- package/src/stories/log-viewer.stories.tsx +74 -0
- package/src/stories/number-field.mdx +17 -0
- package/src/stories/number-field.stories.tsx +41 -0
- package/src/stories/progress-component.stories.tsx +74 -0
- package/src/stories/progress.stories.tsx +33 -0
- package/src/stories/radio-group.mdx +54 -0
- package/src/stories/select-native.stories.tsx +49 -0
- package/src/stories/select.stories.tsx +92 -0
- package/src/stories/slider.stories.tsx +27 -0
- package/src/stories/stat.stories.tsx +123 -0
- package/src/stories/switch.mdx +20 -0
- package/src/stories/switchable-multi-select.stories.tsx +31 -0
- package/src/stories/tabs.mdx +59 -0
- package/src/stories/textarea.stories.tsx +58 -0
- package/src/stories/theme.stories.tsx +111 -0
- package/src/stories/tooltip.mdx +32 -0
- package/src/stories/typography.stories.tsx +80 -0
- package/src/stories/variables.stories.tsx +58 -0
- package/src/stories/vega.stories.tsx +57 -0
- package/src/theme/ThemeProvider.tsx +32 -0
- package/src/theme/namespace.tsx +23 -0
- package/src/theme/useTheme.ts +89 -0
- package/src/utils/Deferred.ts +20 -0
- package/src/utils/Logger.ts +91 -0
- package/src/utils/__tests__/Deferred.test.ts +38 -0
- package/src/utils/__tests__/arrays.test.ts +130 -0
- package/src/utils/__tests__/batch-requests.test.ts +60 -0
- package/src/utils/__tests__/blob.test.ts +52 -0
- package/src/utils/__tests__/cell-urls.test.ts +92 -0
- package/src/utils/__tests__/createReducer.test.ts +184 -0
- package/src/utils/__tests__/data-views.test.ts +112 -0
- package/src/utils/__tests__/dates.test.ts +188 -0
- package/src/utils/__tests__/edit-distance.test.ts +302 -0
- package/src/utils/__tests__/errors.test.ts +54 -0
- package/src/utils/__tests__/filenames.test.ts +30 -0
- package/src/utils/__tests__/id-tree.test.ts +1994 -0
- package/src/utils/__tests__/json-parser.test.ts +79 -0
- package/src/utils/__tests__/local-storage.test.ts +77 -0
- package/src/utils/__tests__/lru.test.ts +74 -0
- package/src/utils/__tests__/maps.test.ts +91 -0
- package/src/utils/__tests__/math.test.ts +29 -0
- package/src/utils/__tests__/multi-map.test.ts +295 -0
- package/src/utils/__tests__/numbers.test.ts +76 -0
- package/src/utils/__tests__/path.test.ts +170 -0
- package/src/utils/__tests__/pluralize.test.ts +47 -0
- package/src/utils/__tests__/routes.test.ts +134 -0
- package/src/utils/__tests__/sets.test.ts +41 -0
- package/src/utils/__tests__/shallow-compare.test.ts +55 -0
- package/src/utils/__tests__/strings.test.ts +68 -0
- package/src/utils/__tests__/time.test.ts +61 -0
- package/src/utils/__tests__/timed-cache.test.ts +142 -0
- package/src/utils/__tests__/timeout.test.ts +153 -0
- package/src/utils/__tests__/traceback.test.ts +34 -0
- package/src/utils/__tests__/url.test.ts +100 -0
- package/src/utils/__tests__/urls.test.ts +10 -0
- package/src/utils/__tests__/versions.test.ts +63 -0
- package/src/utils/__tests__/waitForWs.test.ts +76 -0
- package/src/utils/arrays.ts +75 -0
- package/src/utils/assertExists.ts +12 -0
- package/src/utils/assertNever.ts +20 -0
- package/src/utils/batch-requests.ts +28 -0
- package/src/utils/blob.ts +45 -0
- package/src/utils/cell-urls.ts +31 -0
- package/src/utils/cn.ts +8 -0
- package/src/utils/copy.ts +17 -0
- package/src/utils/createReducer.ts +137 -0
- package/src/utils/data-views.ts +54 -0
- package/src/utils/dates.ts +145 -0
- package/src/utils/dereference.ts +10 -0
- package/src/utils/download.ts +47 -0
- package/src/utils/edit-distance.ts +141 -0
- package/src/utils/errors.ts +63 -0
- package/src/utils/events.ts +85 -0
- package/src/utils/fileToBase64.ts +30 -0
- package/src/utils/filenames.ts +29 -0
- package/src/utils/functions.ts +24 -0
- package/src/utils/id-tree.tsx +1032 -0
- package/src/utils/idle.ts +19 -0
- package/src/utils/invariant.ts +37 -0
- package/src/utils/json/__tests__/base64.test.ts +100 -0
- package/src/utils/json/base64.ts +51 -0
- package/src/utils/json/json-parser.ts +65 -0
- package/src/utils/lazy.ts +30 -0
- package/src/utils/links.ts +11 -0
- package/src/utils/localStorage.ts +132 -0
- package/src/utils/lru.ts +68 -0
- package/src/utils/maps.ts +65 -0
- package/src/utils/math.ts +6 -0
- package/src/utils/mergeRefs.ts +14 -0
- package/src/utils/multi-map.ts +71 -0
- package/src/utils/numbers.ts +124 -0
- package/src/utils/objects.ts +105 -0
- package/src/utils/once.ts +17 -0
- package/src/utils/pathUtils.test.ts +113 -0
- package/src/utils/pathUtils.ts +76 -0
- package/src/utils/paths.ts +67 -0
- package/src/utils/pluralize.ts +35 -0
- package/src/utils/python-poet/__tests__/poet.test.ts +286 -0
- package/src/utils/python-poet/poet.ts +196 -0
- package/src/utils/reload-safe.ts +15 -0
- package/src/utils/repl.ts +23 -0
- package/src/utils/routes.ts +36 -0
- package/src/utils/scroll.ts +38 -0
- package/src/utils/sets.ts +30 -0
- package/src/utils/shallow-compare.ts +30 -0
- package/src/utils/staticImplements.ts +7 -0
- package/src/utils/strings.ts +64 -0
- package/src/utils/time.ts +39 -0
- package/src/utils/timed-cache.ts +52 -0
- package/src/utils/timeout.ts +42 -0
- package/src/utils/traceback.ts +104 -0
- package/src/utils/tracer.ts +106 -0
- package/src/utils/typed.ts +17 -0
- package/src/utils/url.ts +12 -0
- package/src/utils/urls.ts +33 -0
- package/src/utils/uuid.ts +8 -0
- package/src/utils/versions.ts +66 -0
- package/src/utils/vitals.ts +30 -0
- package/src/utils/waitForWs.ts +31 -0
- package/dist/diagram-5UYTHUR4-CHaQuLxe.js +0 -137
- package/dist/pieDiagram-NIOCPIFQ-B2HPuDbO.js +0 -162
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
var _a, _b;
|
|
2
|
-
import { g as oe } from "./chunk-
|
|
3
|
-
import { _ as d, G as rt, d as O, e as he, l as L, z as de, B as ge, c as R, a3 as ue, Q as pe, a4 as j, a5 as Wt, a6 as fe, u as $, k as xe, a7 as ye, a8 as xt,
|
|
4
|
-
import { c as we } from "./clone-
|
|
5
|
-
import { G as me } from "./graph-
|
|
6
|
-
import { c as Le } from "./channel-
|
|
2
|
+
import { g as oe } from "./chunk-GLLZNHP4-BQrm-sfi.js";
|
|
3
|
+
import { _ as d, G as rt, d as O, e as he, l as L, z as de, B as ge, c as R, a3 as ue, Q as pe, a4 as j, a5 as Wt, a6 as fe, u as $, k as xe, a7 as ye, a8 as xt, i as yt, a9 as be } from "./mermaid-CTBiBoaH.js";
|
|
4
|
+
import { c as we } from "./clone-dxPIOZ-r.js";
|
|
5
|
+
import { G as me } from "./graph-CufF5hzB.js";
|
|
6
|
+
import { c as Le } from "./channel-C6r9bPk3.js";
|
|
7
7
|
import { l as Se, k as ke } from "./timer-BYwnU4DF.js";
|
|
8
|
-
var
|
|
8
|
+
var bt = function() {
|
|
9
9
|
var e = /* @__PURE__ */ d(function(D, y, g, f) {
|
|
10
10
|
for (g = g || {}, f = D.length; f--; g[D[f]] = y) ;
|
|
11
11
|
return g;
|
|
12
|
-
}, "o"), t = [1,
|
|
12
|
+
}, "o"), t = [1, 15], a = [1, 7], i = [1, 13], l = [1, 14], s = [1, 19], r = [1, 16], n = [1, 17], c = [1, 18], u = [8, 30], o = [8, 10, 21, 28, 29, 30, 31, 39, 43, 46], x = [1, 23], w = [1, 24], b = [8, 10, 15, 16, 21, 28, 29, 30, 31, 39, 43, 46], S = [8, 10, 15, 16, 21, 27, 28, 29, 30, 31, 39, 43, 46], v = [1, 49], k = {
|
|
13
13
|
trace: /* @__PURE__ */ d(function() {
|
|
14
14
|
}, "trace"),
|
|
15
15
|
yy: {},
|
|
16
|
-
symbols_: { error: 2, spaceLines: 3, SPACELINE: 4, NL: 5, separator: 6, SPACE: 7, EOF: 8, start: 9, BLOCK_DIAGRAM_KEY: 10, document: 11, stop: 12, statement: 13, link: 14, LINK: 15, START_LINK: 16, LINK_LABEL: 17, STR: 18, nodeStatement: 19, columnsStatement: 20, SPACE_BLOCK: 21, blockStatement: 22, classDefStatement: 23, cssClassStatement: 24, styleStatement: 25, node: 26, SIZE: 27, COLUMNS: 28, "id-block": 29, end: 30,
|
|
17
|
-
terminals_: { 2: "error", 4: "SPACELINE", 5: "NL", 7: "SPACE", 8: "EOF", 10: "BLOCK_DIAGRAM_KEY", 15: "LINK", 16: "START_LINK", 17: "LINK_LABEL", 18: "STR", 21: "SPACE_BLOCK", 27: "SIZE", 28: "COLUMNS", 29: "id-block", 30: "end", 31: "
|
|
18
|
-
productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [
|
|
19
|
-
performAction: /* @__PURE__ */ d(function(y, g, f, m,
|
|
20
|
-
var p =
|
|
21
|
-
switch (
|
|
16
|
+
symbols_: { error: 2, spaceLines: 3, SPACELINE: 4, NL: 5, separator: 6, SPACE: 7, EOF: 8, start: 9, BLOCK_DIAGRAM_KEY: 10, document: 11, stop: 12, statement: 13, link: 14, LINK: 15, START_LINK: 16, LINK_LABEL: 17, STR: 18, nodeStatement: 19, columnsStatement: 20, SPACE_BLOCK: 21, blockStatement: 22, classDefStatement: 23, cssClassStatement: 24, styleStatement: 25, node: 26, SIZE: 27, COLUMNS: 28, "id-block": 29, end: 30, NODE_ID: 31, nodeShapeNLabel: 32, dirList: 33, DIR: 34, NODE_DSTART: 35, NODE_DEND: 36, BLOCK_ARROW_START: 37, BLOCK_ARROW_END: 38, classDef: 39, CLASSDEF_ID: 40, CLASSDEF_STYLEOPTS: 41, DEFAULT: 42, class: 43, CLASSENTITY_IDS: 44, STYLECLASS: 45, style: 46, STYLE_ENTITY_IDS: 47, STYLE_DEFINITION_DATA: 48, $accept: 0, $end: 1 },
|
|
17
|
+
terminals_: { 2: "error", 4: "SPACELINE", 5: "NL", 7: "SPACE", 8: "EOF", 10: "BLOCK_DIAGRAM_KEY", 15: "LINK", 16: "START_LINK", 17: "LINK_LABEL", 18: "STR", 21: "SPACE_BLOCK", 27: "SIZE", 28: "COLUMNS", 29: "id-block", 30: "end", 31: "NODE_ID", 34: "DIR", 35: "NODE_DSTART", 36: "NODE_DEND", 37: "BLOCK_ARROW_START", 38: "BLOCK_ARROW_END", 39: "classDef", 40: "CLASSDEF_ID", 41: "CLASSDEF_STYLEOPTS", 42: "DEFAULT", 43: "class", 44: "CLASSENTITY_IDS", 45: "STYLECLASS", 46: "style", 47: "STYLE_ENTITY_IDS", 48: "STYLE_DEFINITION_DATA" },
|
|
18
|
+
productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [33, 1], [33, 2], [32, 3], [32, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
|
|
19
|
+
performAction: /* @__PURE__ */ d(function(y, g, f, m, E, h, W) {
|
|
20
|
+
var p = h.length - 1;
|
|
21
|
+
switch (E) {
|
|
22
22
|
case 4:
|
|
23
23
|
m.getLogger().debug("Rule: separator (NL) ");
|
|
24
24
|
break;
|
|
@@ -29,7 +29,7 @@ var yt = function() {
|
|
|
29
29
|
m.getLogger().debug("Rule: separator (EOF) ");
|
|
30
30
|
break;
|
|
31
31
|
case 7:
|
|
32
|
-
m.getLogger().debug("Rule: hierarchy: ",
|
|
32
|
+
m.getLogger().debug("Rule: hierarchy: ", h[p - 1]), m.setHierarchy(h[p - 1]);
|
|
33
33
|
break;
|
|
34
34
|
case 8:
|
|
35
35
|
m.getLogger().debug("Stop NL ");
|
|
@@ -44,78 +44,78 @@ var yt = function() {
|
|
|
44
44
|
m.getLogger().debug("Stop EOF2 ");
|
|
45
45
|
break;
|
|
46
46
|
case 12:
|
|
47
|
-
m.getLogger().debug("Rule: statement: ",
|
|
47
|
+
m.getLogger().debug("Rule: statement: ", h[p]), typeof h[p].length == "number" ? this.$ = h[p] : this.$ = [h[p]];
|
|
48
48
|
break;
|
|
49
49
|
case 13:
|
|
50
|
-
m.getLogger().debug("Rule: statement #2: ",
|
|
50
|
+
m.getLogger().debug("Rule: statement #2: ", h[p - 1]), this.$ = [h[p - 1]].concat(h[p]);
|
|
51
51
|
break;
|
|
52
52
|
case 14:
|
|
53
|
-
m.getLogger().debug("Rule: link: ",
|
|
53
|
+
m.getLogger().debug("Rule: link: ", h[p], y), this.$ = { edgeTypeStr: h[p], label: "" };
|
|
54
54
|
break;
|
|
55
55
|
case 15:
|
|
56
|
-
m.getLogger().debug("Rule: LABEL link: ",
|
|
56
|
+
m.getLogger().debug("Rule: LABEL link: ", h[p - 3], h[p - 1], h[p]), this.$ = { edgeTypeStr: h[p], label: h[p - 1] };
|
|
57
57
|
break;
|
|
58
58
|
case 18:
|
|
59
|
-
const I = parseInt(
|
|
59
|
+
const I = parseInt(h[p]), Z = m.generateId();
|
|
60
60
|
this.$ = { id: Z, type: "space", label: "", width: I, children: [] };
|
|
61
61
|
break;
|
|
62
62
|
case 23:
|
|
63
|
-
m.getLogger().debug("Rule: (nodeStatement link node) ",
|
|
64
|
-
const V = m.edgeStrToEdgeData(
|
|
63
|
+
m.getLogger().debug("Rule: (nodeStatement link node) ", h[p - 2], h[p - 1], h[p], " typestr: ", h[p - 1].edgeTypeStr);
|
|
64
|
+
const V = m.edgeStrToEdgeData(h[p - 1].edgeTypeStr);
|
|
65
65
|
this.$ = [
|
|
66
|
-
{ id:
|
|
67
|
-
{ id:
|
|
68
|
-
{ id:
|
|
66
|
+
{ id: h[p - 2].id, label: h[p - 2].label, type: h[p - 2].type, directions: h[p - 2].directions },
|
|
67
|
+
{ id: h[p - 2].id + "-" + h[p].id, start: h[p - 2].id, end: h[p].id, label: h[p - 1].label, type: "edge", directions: h[p].directions, arrowTypeEnd: V, arrowTypeStart: "arrow_open" },
|
|
68
|
+
{ id: h[p].id, label: h[p].label, type: m.typeStr2Type(h[p].typeStr), directions: h[p].directions }
|
|
69
69
|
];
|
|
70
70
|
break;
|
|
71
71
|
case 24:
|
|
72
|
-
m.getLogger().debug("Rule: nodeStatement (abc88 node size) ",
|
|
72
|
+
m.getLogger().debug("Rule: nodeStatement (abc88 node size) ", h[p - 1], h[p]), this.$ = { id: h[p - 1].id, label: h[p - 1].label, type: m.typeStr2Type(h[p - 1].typeStr), directions: h[p - 1].directions, widthInColumns: parseInt(h[p], 10) };
|
|
73
73
|
break;
|
|
74
74
|
case 25:
|
|
75
|
-
m.getLogger().debug("Rule: nodeStatement (node) ",
|
|
75
|
+
m.getLogger().debug("Rule: nodeStatement (node) ", h[p]), this.$ = { id: h[p].id, label: h[p].label, type: m.typeStr2Type(h[p].typeStr), directions: h[p].directions, widthInColumns: 1 };
|
|
76
76
|
break;
|
|
77
77
|
case 26:
|
|
78
|
-
m.getLogger().debug("APA123", this ? this : "na"), m.getLogger().debug("COLUMNS: ",
|
|
78
|
+
m.getLogger().debug("APA123", this ? this : "na"), m.getLogger().debug("COLUMNS: ", h[p]), this.$ = { type: "column-setting", columns: h[p] === "auto" ? -1 : parseInt(h[p]) };
|
|
79
79
|
break;
|
|
80
80
|
case 27:
|
|
81
|
-
m.getLogger().debug("Rule: id-block statement : ",
|
|
81
|
+
m.getLogger().debug("Rule: id-block statement : ", h[p - 2], h[p - 1]), m.generateId(), this.$ = { ...h[p - 2], type: "composite", children: h[p - 1] };
|
|
82
82
|
break;
|
|
83
83
|
case 28:
|
|
84
|
-
m.getLogger().debug("Rule: blockStatement : ",
|
|
84
|
+
m.getLogger().debug("Rule: blockStatement : ", h[p - 2], h[p - 1], h[p]);
|
|
85
85
|
const at = m.generateId();
|
|
86
|
-
this.$ = { id: at, type: "composite", label: "", children:
|
|
86
|
+
this.$ = { id: at, type: "composite", label: "", children: h[p - 1] };
|
|
87
87
|
break;
|
|
88
88
|
case 29:
|
|
89
|
-
m.getLogger().debug("Rule: node (NODE_ID separator): ",
|
|
89
|
+
m.getLogger().debug("Rule: node (NODE_ID separator): ", h[p]), this.$ = { id: h[p] };
|
|
90
90
|
break;
|
|
91
91
|
case 30:
|
|
92
|
-
m.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",
|
|
92
|
+
m.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", h[p - 1], h[p]), this.$ = { id: h[p - 1], label: h[p].label, typeStr: h[p].typeStr, directions: h[p].directions };
|
|
93
93
|
break;
|
|
94
94
|
case 31:
|
|
95
|
-
m.getLogger().debug("Rule: dirList: ",
|
|
95
|
+
m.getLogger().debug("Rule: dirList: ", h[p]), this.$ = [h[p]];
|
|
96
96
|
break;
|
|
97
97
|
case 32:
|
|
98
|
-
m.getLogger().debug("Rule: dirList: ",
|
|
98
|
+
m.getLogger().debug("Rule: dirList: ", h[p - 1], h[p]), this.$ = [h[p - 1]].concat(h[p]);
|
|
99
99
|
break;
|
|
100
100
|
case 33:
|
|
101
|
-
m.getLogger().debug("Rule: nodeShapeNLabel: ",
|
|
101
|
+
m.getLogger().debug("Rule: nodeShapeNLabel: ", h[p - 2], h[p - 1], h[p]), this.$ = { typeStr: h[p - 2] + h[p], label: h[p - 1] };
|
|
102
102
|
break;
|
|
103
103
|
case 34:
|
|
104
|
-
m.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",
|
|
104
|
+
m.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", h[p - 3], h[p - 2], " #3:", h[p - 1], h[p]), this.$ = { typeStr: h[p - 3] + h[p], label: h[p - 2], directions: h[p - 1] };
|
|
105
105
|
break;
|
|
106
106
|
case 35:
|
|
107
107
|
case 36:
|
|
108
|
-
this.$ = { type: "classDef", id:
|
|
108
|
+
this.$ = { type: "classDef", id: h[p - 1].trim(), css: h[p].trim() };
|
|
109
109
|
break;
|
|
110
110
|
case 37:
|
|
111
|
-
this.$ = { type: "applyClass", id:
|
|
111
|
+
this.$ = { type: "applyClass", id: h[p - 1].trim(), styleClass: h[p].trim() };
|
|
112
112
|
break;
|
|
113
113
|
case 38:
|
|
114
|
-
this.$ = { type: "applyStyles", id:
|
|
114
|
+
this.$ = { type: "applyStyles", id: h[p - 1].trim(), stylesStr: h[p].trim() };
|
|
115
115
|
break;
|
|
116
116
|
}
|
|
117
117
|
}, "anonymous"),
|
|
118
|
-
table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21:
|
|
118
|
+
table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: t, 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: c }, { 8: [1, 20] }, e(u, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 10: t, 21: a, 28: i, 29: l, 31: s, 39: r, 43: n, 46: c }), e(o, [2, 16], { 14: 22, 15: x, 16: w }), e(o, [2, 17]), e(o, [2, 18]), e(o, [2, 19]), e(o, [2, 20]), e(o, [2, 21]), e(o, [2, 22]), e(b, [2, 25], { 27: [1, 25] }), e(o, [2, 26]), { 19: 26, 26: 12, 31: s }, { 10: t, 11: 27, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: c }, { 40: [1, 28], 42: [1, 29] }, { 44: [1, 30] }, { 47: [1, 31] }, e(S, [2, 29], { 32: 32, 35: [1, 33], 37: [1, 34] }), { 1: [2, 7] }, e(u, [2, 13]), { 26: 35, 31: s }, { 31: [2, 14] }, { 17: [1, 36] }, e(b, [2, 24]), { 10: t, 11: 37, 13: 4, 14: 22, 15: x, 16: w, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: c }, { 30: [1, 38] }, { 41: [1, 39] }, { 41: [1, 40] }, { 45: [1, 41] }, { 48: [1, 42] }, e(S, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(b, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(o, [2, 28]), e(o, [2, 35]), e(o, [2, 36]), e(o, [2, 37]), e(o, [2, 38]), { 36: [1, 47] }, { 33: 48, 34: v }, { 15: [1, 50] }, e(o, [2, 27]), e(S, [2, 33]), { 38: [1, 51] }, { 33: 52, 34: v, 38: [2, 31] }, { 31: [2, 15] }, e(S, [2, 34]), { 38: [2, 32] }],
|
|
119
119
|
defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
|
|
120
120
|
parseError: /* @__PURE__ */ d(function(y, g) {
|
|
121
121
|
if (g.recoverable)
|
|
@@ -126,25 +126,25 @@ var yt = function() {
|
|
|
126
126
|
}
|
|
127
127
|
}, "parseError"),
|
|
128
128
|
parse: /* @__PURE__ */ d(function(y) {
|
|
129
|
-
var g = this, f = [0], m = [],
|
|
129
|
+
var g = this, f = [0], m = [], E = [null], h = [], W = this.table, p = "", I = 0, Z = 0, V = 2, at = 1, ne = h.slice.call(arguments, 1), z = Object.create(this.lexer), q = { yy: {} };
|
|
130
130
|
for (var gt in this.yy)
|
|
131
131
|
Object.prototype.hasOwnProperty.call(this.yy, gt) && (q.yy[gt] = this.yy[gt]);
|
|
132
132
|
z.setInput(y, q.yy), q.yy.lexer = z, q.yy.parser = this, typeof z.yylloc > "u" && (z.yylloc = {});
|
|
133
133
|
var ut = z.yylloc;
|
|
134
|
-
|
|
134
|
+
h.push(ut);
|
|
135
135
|
var le = z.options && z.options.ranges;
|
|
136
136
|
typeof q.yy.parseError == "function" ? this.parseError = q.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
137
137
|
function ce(P) {
|
|
138
|
-
f.length = f.length - 2 * P,
|
|
138
|
+
f.length = f.length - 2 * P, E.length = E.length - P, h.length = h.length - P;
|
|
139
139
|
}
|
|
140
140
|
d(ce, "popStack");
|
|
141
|
-
function
|
|
141
|
+
function Nt() {
|
|
142
142
|
var P;
|
|
143
143
|
return P = m.pop() || z.lex() || at, typeof P != "number" && (P instanceof Array && (m = P, P = m.pop()), P = g.symbols_[P] || P), P;
|
|
144
144
|
}
|
|
145
|
-
d(
|
|
146
|
-
for (var F, J, H, pt, Q = {}, st, G,
|
|
147
|
-
if (J = f[f.length - 1], this.defaultActions[J] ? H = this.defaultActions[J] : ((F === null || typeof F > "u") && (F =
|
|
145
|
+
d(Nt, "lex");
|
|
146
|
+
for (var F, J, H, pt, Q = {}, st, G, Tt, it; ; ) {
|
|
147
|
+
if (J = f[f.length - 1], this.defaultActions[J] ? H = this.defaultActions[J] : ((F === null || typeof F > "u") && (F = Nt()), H = W[J] && W[J][F]), typeof H > "u" || !H.length || !H[0]) {
|
|
148
148
|
var ft = "";
|
|
149
149
|
it = [];
|
|
150
150
|
for (st in W[J])
|
|
@@ -163,28 +163,28 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
|
|
|
163
163
|
throw new Error("Parse Error: multiple actions possible at state: " + J + ", token: " + F);
|
|
164
164
|
switch (H[0]) {
|
|
165
165
|
case 1:
|
|
166
|
-
f.push(F),
|
|
166
|
+
f.push(F), E.push(z.yytext), h.push(z.yylloc), f.push(H[1]), F = null, Z = z.yyleng, p = z.yytext, I = z.yylineno, ut = z.yylloc;
|
|
167
167
|
break;
|
|
168
168
|
case 2:
|
|
169
|
-
if (G = this.productions_[H[1]][1], Q.$ =
|
|
170
|
-
first_line:
|
|
171
|
-
last_line:
|
|
172
|
-
first_column:
|
|
173
|
-
last_column:
|
|
169
|
+
if (G = this.productions_[H[1]][1], Q.$ = E[E.length - G], Q._$ = {
|
|
170
|
+
first_line: h[h.length - (G || 1)].first_line,
|
|
171
|
+
last_line: h[h.length - 1].last_line,
|
|
172
|
+
first_column: h[h.length - (G || 1)].first_column,
|
|
173
|
+
last_column: h[h.length - 1].last_column
|
|
174
174
|
}, le && (Q._$.range = [
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
h[h.length - (G || 1)].range[0],
|
|
176
|
+
h[h.length - 1].range[1]
|
|
177
177
|
]), pt = this.performAction.apply(Q, [
|
|
178
178
|
p,
|
|
179
179
|
Z,
|
|
180
180
|
I,
|
|
181
181
|
q.yy,
|
|
182
182
|
H[1],
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
E,
|
|
184
|
+
h
|
|
185
185
|
].concat(ne)), typeof pt < "u")
|
|
186
186
|
return pt;
|
|
187
|
-
G && (f = f.slice(0, -1 * G * 2),
|
|
187
|
+
G && (f = f.slice(0, -1 * G * 2), E = E.slice(0, -1 * G), h = h.slice(0, -1 * G)), f.push(this.productions_[H[1]][0]), E.push(Q.$), h.push(Q._$), Tt = W[f[f.length - 2]][f[f.length - 1]], f.push(Tt);
|
|
188
188
|
break;
|
|
189
189
|
case 3:
|
|
190
190
|
return true;
|
|
@@ -223,13 +223,13 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
|
|
|
223
223
|
this._input = y + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - g), this.offset -= g;
|
|
224
224
|
var m = this.match.split(/(?:\r\n?|\n)/g);
|
|
225
225
|
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), f.length - 1 && (this.yylineno -= f.length - 1);
|
|
226
|
-
var
|
|
226
|
+
var E = this.yylloc.range;
|
|
227
227
|
return this.yylloc = {
|
|
228
228
|
first_line: this.yylloc.first_line,
|
|
229
229
|
last_line: this.yylineno + 1,
|
|
230
230
|
first_column: this.yylloc.first_column,
|
|
231
231
|
last_column: f ? (f.length === m.length ? this.yylloc.first_column : 0) + m[m.length - f.length].length - f[0].length : this.yylloc.first_column - g
|
|
232
|
-
}, this.options.ranges && (this.yylloc.range = [
|
|
232
|
+
}, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - g]), this.yyleng = this.yytext.length, this;
|
|
233
233
|
}, "unput"),
|
|
234
234
|
// When called from action, caches matched text and appends it on next action
|
|
235
235
|
more: /* @__PURE__ */ d(function() {
|
|
@@ -270,8 +270,8 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
|
|
|
270
270
|
}, "showPosition"),
|
|
271
271
|
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
272
272
|
test_match: /* @__PURE__ */ d(function(y, g) {
|
|
273
|
-
var f, m,
|
|
274
|
-
if (this.options.backtrack_lexer && (
|
|
273
|
+
var f, m, E;
|
|
274
|
+
if (this.options.backtrack_lexer && (E = {
|
|
275
275
|
yylineno: this.yylineno,
|
|
276
276
|
yylloc: {
|
|
277
277
|
first_line: this.yylloc.first_line,
|
|
@@ -290,7 +290,7 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
|
|
|
290
290
|
yy: this.yy,
|
|
291
291
|
conditionStack: this.conditionStack.slice(0),
|
|
292
292
|
done: this.done
|
|
293
|
-
}, this.options.ranges && (
|
|
293
|
+
}, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), m = y[0].match(/(?:\r\n?|\n).*/g), m && (this.yylineno += m.length), this.yylloc = {
|
|
294
294
|
first_line: this.yylloc.last_line,
|
|
295
295
|
last_line: this.yylineno + 1,
|
|
296
296
|
first_column: this.yylloc.last_column,
|
|
@@ -298,8 +298,8 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
|
|
|
298
298
|
}, this.yytext += y[0], this.match += y[0], this.matches = y, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = false, this._backtrack = false, this._input = this._input.slice(y[0].length), this.matched += y[0], f = this.performAction.call(this, this.yy, this, g, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = false), f)
|
|
299
299
|
return f;
|
|
300
300
|
if (this._backtrack) {
|
|
301
|
-
for (var
|
|
302
|
-
this[
|
|
301
|
+
for (var h in E)
|
|
302
|
+
this[h] = E[h];
|
|
303
303
|
return false;
|
|
304
304
|
}
|
|
305
305
|
return false;
|
|
@@ -311,10 +311,10 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
|
|
|
311
311
|
this._input || (this.done = true);
|
|
312
312
|
var y, g, f, m;
|
|
313
313
|
this._more || (this.yytext = "", this.match = "");
|
|
314
|
-
for (var
|
|
315
|
-
if (f = this._input.match(this.rules[
|
|
316
|
-
if (g = f, m =
|
|
317
|
-
if (y = this.test_match(f,
|
|
314
|
+
for (var E = this._currentRules(), h = 0; h < E.length; h++)
|
|
315
|
+
if (f = this._input.match(this.rules[E[h]]), f && (!g || f[0].length > g[0].length)) {
|
|
316
|
+
if (g = f, m = h, this.options.backtrack_lexer) {
|
|
317
|
+
if (y = this.test_match(f, E[h]), y !== false)
|
|
318
318
|
return y;
|
|
319
319
|
if (this._backtrack) {
|
|
320
320
|
g = false;
|
|
@@ -324,7 +324,7 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
|
|
|
324
324
|
} else if (!this.options.flex)
|
|
325
325
|
break;
|
|
326
326
|
}
|
|
327
|
-
return g ? (y = this.test_match(g,
|
|
327
|
+
return g ? (y = this.test_match(g, E[m]), y !== false ? y : false) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
328
328
|
` + this.showPosition(), {
|
|
329
329
|
text: "",
|
|
330
330
|
token: null,
|
|
@@ -362,240 +362,238 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
|
|
|
362
362
|
return this.conditionStack.length;
|
|
363
363
|
}, "stateStackSize"),
|
|
364
364
|
options: {},
|
|
365
|
-
performAction: /* @__PURE__ */ d(function(g, f, m,
|
|
365
|
+
performAction: /* @__PURE__ */ d(function(g, f, m, E) {
|
|
366
366
|
switch (m) {
|
|
367
367
|
case 0:
|
|
368
|
-
return 10;
|
|
368
|
+
return g.getLogger().debug("Found block-beta"), 10;
|
|
369
369
|
case 1:
|
|
370
|
-
return g.getLogger().debug("Found
|
|
370
|
+
return g.getLogger().debug("Found id-block"), 29;
|
|
371
371
|
case 2:
|
|
372
|
-
return g.getLogger().debug("Found
|
|
372
|
+
return g.getLogger().debug("Found block"), 10;
|
|
373
373
|
case 3:
|
|
374
|
-
return g.getLogger().debug("Found space-block"), 29;
|
|
375
|
-
case 4:
|
|
376
374
|
g.getLogger().debug(".", f.yytext);
|
|
377
375
|
break;
|
|
378
|
-
case
|
|
376
|
+
case 4:
|
|
379
377
|
g.getLogger().debug("_", f.yytext);
|
|
380
378
|
break;
|
|
381
|
-
case
|
|
379
|
+
case 5:
|
|
382
380
|
return 5;
|
|
383
|
-
case
|
|
381
|
+
case 6:
|
|
384
382
|
return f.yytext = -1, 28;
|
|
385
|
-
case
|
|
383
|
+
case 7:
|
|
386
384
|
return f.yytext = f.yytext.replace(/columns\s+/, ""), g.getLogger().debug("COLUMNS (LEX)", f.yytext), 28;
|
|
387
|
-
case
|
|
385
|
+
case 8:
|
|
388
386
|
this.pushState("md_string");
|
|
389
387
|
break;
|
|
390
|
-
case
|
|
388
|
+
case 9:
|
|
391
389
|
return "MD_STR";
|
|
392
|
-
case
|
|
390
|
+
case 10:
|
|
393
391
|
this.popState();
|
|
394
392
|
break;
|
|
395
|
-
case
|
|
393
|
+
case 11:
|
|
396
394
|
this.pushState("string");
|
|
397
395
|
break;
|
|
398
|
-
case
|
|
396
|
+
case 12:
|
|
399
397
|
g.getLogger().debug("LEX: POPPING STR:", f.yytext), this.popState();
|
|
400
398
|
break;
|
|
401
|
-
case
|
|
399
|
+
case 13:
|
|
402
400
|
return g.getLogger().debug("LEX: STR end:", f.yytext), "STR";
|
|
403
|
-
case
|
|
401
|
+
case 14:
|
|
404
402
|
return f.yytext = f.yytext.replace(/space\:/, ""), g.getLogger().debug("SPACE NUM (LEX)", f.yytext), 21;
|
|
405
|
-
case
|
|
403
|
+
case 15:
|
|
406
404
|
return f.yytext = "1", g.getLogger().debug("COLUMNS (LEX)", f.yytext), 21;
|
|
405
|
+
case 16:
|
|
406
|
+
return 42;
|
|
407
407
|
case 17:
|
|
408
|
-
return 43;
|
|
409
|
-
case 18:
|
|
410
408
|
return "LINKSTYLE";
|
|
411
|
-
case
|
|
409
|
+
case 18:
|
|
412
410
|
return "INTERPOLATE";
|
|
411
|
+
case 19:
|
|
412
|
+
return this.pushState("CLASSDEF"), 39;
|
|
413
413
|
case 20:
|
|
414
|
-
return this.pushState("CLASSDEF"), 40;
|
|
415
|
-
case 21:
|
|
416
414
|
return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
|
|
415
|
+
case 21:
|
|
416
|
+
return this.popState(), this.pushState("CLASSDEFID"), 40;
|
|
417
417
|
case 22:
|
|
418
|
-
return this.popState(),
|
|
418
|
+
return this.popState(), 41;
|
|
419
419
|
case 23:
|
|
420
|
-
return this.
|
|
420
|
+
return this.pushState("CLASS"), 43;
|
|
421
421
|
case 24:
|
|
422
|
-
return this.pushState("
|
|
422
|
+
return this.popState(), this.pushState("CLASS_STYLE"), 44;
|
|
423
423
|
case 25:
|
|
424
|
-
return this.popState(),
|
|
424
|
+
return this.popState(), 45;
|
|
425
425
|
case 26:
|
|
426
|
-
return this.
|
|
426
|
+
return this.pushState("STYLE_STMNT"), 46;
|
|
427
427
|
case 27:
|
|
428
|
-
return this.pushState("
|
|
428
|
+
return this.popState(), this.pushState("STYLE_DEFINITION"), 47;
|
|
429
429
|
case 28:
|
|
430
|
-
return this.popState(),
|
|
430
|
+
return this.popState(), 48;
|
|
431
431
|
case 29:
|
|
432
|
-
return this.popState(), 49;
|
|
433
|
-
case 30:
|
|
434
432
|
return this.pushState("acc_title"), "acc_title";
|
|
435
|
-
case
|
|
433
|
+
case 30:
|
|
436
434
|
return this.popState(), "acc_title_value";
|
|
437
|
-
case
|
|
435
|
+
case 31:
|
|
438
436
|
return this.pushState("acc_descr"), "acc_descr";
|
|
439
|
-
case
|
|
437
|
+
case 32:
|
|
440
438
|
return this.popState(), "acc_descr_value";
|
|
441
|
-
case
|
|
439
|
+
case 33:
|
|
442
440
|
this.pushState("acc_descr_multiline");
|
|
443
441
|
break;
|
|
444
|
-
case
|
|
442
|
+
case 34:
|
|
445
443
|
this.popState();
|
|
446
444
|
break;
|
|
447
|
-
case
|
|
445
|
+
case 35:
|
|
448
446
|
return "acc_descr_multiline_value";
|
|
449
|
-
case
|
|
447
|
+
case 36:
|
|
450
448
|
return 30;
|
|
449
|
+
case 37:
|
|
450
|
+
return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
451
451
|
case 38:
|
|
452
452
|
return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
453
453
|
case 39:
|
|
454
|
-
return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
455
|
-
case 40:
|
|
456
454
|
return this.popState(), g.getLogger().debug("Lex: ))"), "NODE_DEND";
|
|
455
|
+
case 40:
|
|
456
|
+
return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
457
457
|
case 41:
|
|
458
458
|
return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
459
459
|
case 42:
|
|
460
|
-
return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
461
|
-
case 43:
|
|
462
460
|
return this.popState(), g.getLogger().debug("Lex: (-"), "NODE_DEND";
|
|
463
|
-
case
|
|
461
|
+
case 43:
|
|
464
462
|
return this.popState(), g.getLogger().debug("Lex: -)"), "NODE_DEND";
|
|
465
|
-
case
|
|
463
|
+
case 44:
|
|
466
464
|
return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
467
|
-
case
|
|
465
|
+
case 45:
|
|
468
466
|
return this.popState(), g.getLogger().debug("Lex: ]]"), "NODE_DEND";
|
|
469
|
-
case
|
|
467
|
+
case 46:
|
|
470
468
|
return this.popState(), g.getLogger().debug("Lex: ("), "NODE_DEND";
|
|
471
|
-
case
|
|
469
|
+
case 47:
|
|
472
470
|
return this.popState(), g.getLogger().debug("Lex: ])"), "NODE_DEND";
|
|
471
|
+
case 48:
|
|
472
|
+
return this.popState(), g.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
473
473
|
case 49:
|
|
474
474
|
return this.popState(), g.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
475
475
|
case 50:
|
|
476
|
-
return this.popState(), g.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
477
|
-
case 51:
|
|
478
476
|
return this.popState(), g.getLogger().debug("Lex: )]"), "NODE_DEND";
|
|
479
|
-
case
|
|
477
|
+
case 51:
|
|
480
478
|
return this.popState(), g.getLogger().debug("Lex: )"), "NODE_DEND";
|
|
481
|
-
case
|
|
479
|
+
case 52:
|
|
482
480
|
return this.popState(), g.getLogger().debug("Lex: ]>"), "NODE_DEND";
|
|
483
|
-
case
|
|
481
|
+
case 53:
|
|
484
482
|
return this.popState(), g.getLogger().debug("Lex: ]"), "NODE_DEND";
|
|
483
|
+
case 54:
|
|
484
|
+
return g.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
|
|
485
485
|
case 55:
|
|
486
|
-
return g.getLogger().debug("Lexa: -
|
|
486
|
+
return g.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
|
|
487
487
|
case 56:
|
|
488
|
-
return g.getLogger().debug("Lexa:
|
|
488
|
+
return g.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
|
|
489
489
|
case 57:
|
|
490
|
-
return g.getLogger().debug("Lexa: )
|
|
490
|
+
return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
491
491
|
case 58:
|
|
492
|
-
return g.getLogger().debug("
|
|
492
|
+
return g.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
|
|
493
493
|
case 59:
|
|
494
|
-
return g.getLogger().debug("
|
|
494
|
+
return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
495
495
|
case 60:
|
|
496
|
-
return g.getLogger().debug("Lexa: )"), this.pushState("NODE"),
|
|
496
|
+
return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
497
497
|
case 61:
|
|
498
|
-
return g.getLogger().debug("Lexa: )"), this.pushState("NODE"),
|
|
498
|
+
return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
499
499
|
case 62:
|
|
500
|
-
return g.getLogger().debug("
|
|
500
|
+
return g.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
|
|
501
501
|
case 63:
|
|
502
|
-
return g.getLogger().debug("
|
|
502
|
+
return g.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
|
|
503
503
|
case 64:
|
|
504
|
-
return g.getLogger().debug("Lexa:
|
|
504
|
+
return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
505
505
|
case 65:
|
|
506
|
-
return
|
|
506
|
+
return this.pushState("NODE"), 35;
|
|
507
507
|
case 66:
|
|
508
|
-
return this.pushState("NODE"),
|
|
508
|
+
return this.pushState("NODE"), 35;
|
|
509
509
|
case 67:
|
|
510
|
-
return this.pushState("NODE"),
|
|
510
|
+
return this.pushState("NODE"), 35;
|
|
511
511
|
case 68:
|
|
512
|
-
return this.pushState("NODE"),
|
|
512
|
+
return this.pushState("NODE"), 35;
|
|
513
513
|
case 69:
|
|
514
|
-
return this.pushState("NODE"),
|
|
514
|
+
return this.pushState("NODE"), 35;
|
|
515
515
|
case 70:
|
|
516
|
-
return this.pushState("NODE"),
|
|
516
|
+
return this.pushState("NODE"), 35;
|
|
517
517
|
case 71:
|
|
518
|
-
return this.pushState("NODE"),
|
|
518
|
+
return this.pushState("NODE"), 35;
|
|
519
519
|
case 72:
|
|
520
|
-
return this.pushState("NODE"),
|
|
520
|
+
return g.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
|
|
521
521
|
case 73:
|
|
522
|
-
return g.getLogger().debug("
|
|
522
|
+
return this.pushState("BLOCK_ARROW"), g.getLogger().debug("LEX ARR START"), 37;
|
|
523
523
|
case 74:
|
|
524
|
-
return
|
|
524
|
+
return g.getLogger().debug("Lex: NODE_ID", f.yytext), 31;
|
|
525
525
|
case 75:
|
|
526
|
-
return g.getLogger().debug("Lex: NODE_ID", f.yytext), 32;
|
|
527
|
-
case 76:
|
|
528
526
|
return g.getLogger().debug("Lex: EOF", f.yytext), 8;
|
|
529
|
-
case
|
|
527
|
+
case 76:
|
|
530
528
|
this.pushState("md_string");
|
|
531
529
|
break;
|
|
532
|
-
case
|
|
530
|
+
case 77:
|
|
533
531
|
this.pushState("md_string");
|
|
534
532
|
break;
|
|
535
|
-
case
|
|
533
|
+
case 78:
|
|
536
534
|
return "NODE_DESCR";
|
|
537
|
-
case
|
|
535
|
+
case 79:
|
|
538
536
|
this.popState();
|
|
539
537
|
break;
|
|
540
|
-
case
|
|
538
|
+
case 80:
|
|
541
539
|
g.getLogger().debug("Lex: Starting string"), this.pushState("string");
|
|
542
540
|
break;
|
|
543
|
-
case
|
|
541
|
+
case 81:
|
|
544
542
|
g.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
|
|
545
543
|
break;
|
|
546
|
-
case
|
|
544
|
+
case 82:
|
|
547
545
|
return g.getLogger().debug("LEX: NODE_DESCR:", f.yytext), "NODE_DESCR";
|
|
548
|
-
case
|
|
546
|
+
case 83:
|
|
549
547
|
g.getLogger().debug("LEX POPPING"), this.popState();
|
|
550
548
|
break;
|
|
551
|
-
case
|
|
549
|
+
case 84:
|
|
552
550
|
g.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
|
|
553
551
|
break;
|
|
554
|
-
case
|
|
552
|
+
case 85:
|
|
555
553
|
return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (right): dir:", f.yytext), "DIR";
|
|
556
|
-
case
|
|
554
|
+
case 86:
|
|
557
555
|
return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (left):", f.yytext), "DIR";
|
|
558
|
-
case
|
|
556
|
+
case 87:
|
|
559
557
|
return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (x):", f.yytext), "DIR";
|
|
560
|
-
case
|
|
558
|
+
case 88:
|
|
561
559
|
return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (y):", f.yytext), "DIR";
|
|
562
|
-
case
|
|
560
|
+
case 89:
|
|
563
561
|
return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (up):", f.yytext), "DIR";
|
|
564
|
-
case
|
|
562
|
+
case 90:
|
|
565
563
|
return f.yytext = f.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (down):", f.yytext), "DIR";
|
|
566
|
-
case
|
|
564
|
+
case 91:
|
|
567
565
|
return f.yytext = "]>", g.getLogger().debug("Lex (ARROW_DIR end):", f.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
|
|
568
|
-
case
|
|
566
|
+
case 92:
|
|
569
567
|
return g.getLogger().debug("Lex: LINK", "#" + f.yytext + "#"), 15;
|
|
568
|
+
case 93:
|
|
569
|
+
return g.getLogger().debug("Lex: LINK", f.yytext), 15;
|
|
570
570
|
case 94:
|
|
571
571
|
return g.getLogger().debug("Lex: LINK", f.yytext), 15;
|
|
572
572
|
case 95:
|
|
573
573
|
return g.getLogger().debug("Lex: LINK", f.yytext), 15;
|
|
574
574
|
case 96:
|
|
575
|
-
return g.getLogger().debug("Lex:
|
|
575
|
+
return g.getLogger().debug("Lex: START_LINK", f.yytext), this.pushState("LLABEL"), 16;
|
|
576
576
|
case 97:
|
|
577
577
|
return g.getLogger().debug("Lex: START_LINK", f.yytext), this.pushState("LLABEL"), 16;
|
|
578
578
|
case 98:
|
|
579
579
|
return g.getLogger().debug("Lex: START_LINK", f.yytext), this.pushState("LLABEL"), 16;
|
|
580
580
|
case 99:
|
|
581
|
-
return g.getLogger().debug("Lex: START_LINK", f.yytext), this.pushState("LLABEL"), 16;
|
|
582
|
-
case 100:
|
|
583
581
|
this.pushState("md_string");
|
|
584
582
|
break;
|
|
585
|
-
case
|
|
583
|
+
case 100:
|
|
586
584
|
return g.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
|
|
587
|
-
case
|
|
585
|
+
case 101:
|
|
588
586
|
return this.popState(), g.getLogger().debug("Lex: LINK", "#" + f.yytext + "#"), 15;
|
|
587
|
+
case 102:
|
|
588
|
+
return this.popState(), g.getLogger().debug("Lex: LINK", f.yytext), 15;
|
|
589
589
|
case 103:
|
|
590
590
|
return this.popState(), g.getLogger().debug("Lex: LINK", f.yytext), 15;
|
|
591
591
|
case 104:
|
|
592
|
-
return this.popState(), g.getLogger().debug("Lex: LINK", f.yytext), 15;
|
|
593
|
-
case 105:
|
|
594
592
|
return g.getLogger().debug("Lex: COLON", f.yytext), f.yytext = f.yytext.slice(1), 27;
|
|
595
593
|
}
|
|
596
594
|
}, "anonymous"),
|
|
597
|
-
rules: [/^(?:block-beta\b)/, /^(?:block
|
|
598
|
-
conditions: { STYLE_DEFINITION: { rules: [
|
|
595
|
+
rules: [/^(?:block-beta\b)/, /^(?:block:)/, /^(?:block\b)/, /^(?:[\s]+)/, /^(?:[\n]+)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:columns\s+auto\b)/, /^(?:columns\s+[\d]+)/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:space[:]\d+)/, /^(?:space\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\s+)/, /^(?:DEFAULT\s+)/, /^(?:\w+\s+)/, /^(?:[^\n]*)/, /^(?:class\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:style\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:end\b\s*)/, /^(?:\(\(\()/, /^(?:\)\)\))/, /^(?:[\)]\))/, /^(?:\}\})/, /^(?:\})/, /^(?:\(-)/, /^(?:-\))/, /^(?:\(\()/, /^(?:\]\])/, /^(?:\()/, /^(?:\]\))/, /^(?:\\\])/, /^(?:\/\])/, /^(?:\)\])/, /^(?:[\)])/, /^(?:\]>)/, /^(?:[\]])/, /^(?:-\))/, /^(?:\(-)/, /^(?:\)\))/, /^(?:\))/, /^(?:\(\(\()/, /^(?:\(\()/, /^(?:\{\{)/, /^(?:\{)/, /^(?:>)/, /^(?:\(\[)/, /^(?:\()/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\[\\)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:\[)/, /^(?:<\[)/, /^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/, /^(?:$)/, /^(?:["][`])/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:\]>\s*\()/, /^(?:,?\s*right\s*)/, /^(?:,?\s*left\s*)/, /^(?:,?\s*x\s*)/, /^(?:,?\s*y\s*)/, /^(?:,?\s*up\s*)/, /^(?:,?\s*down\s*)/, /^(?:\)\s*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*~~[\~]+\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:["][`])/, /^(?:["])/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?::\d+)/],
|
|
596
|
+
conditions: { STYLE_DEFINITION: { rules: [28], inclusive: false }, STYLE_STMNT: { rules: [27], inclusive: false }, CLASSDEFID: { rules: [22], inclusive: false }, CLASSDEF: { rules: [20, 21], inclusive: false }, CLASS_STYLE: { rules: [25], inclusive: false }, CLASS: { rules: [24], inclusive: false }, LLABEL: { rules: [99, 100, 101, 102, 103], inclusive: false }, ARROW_DIR: { rules: [85, 86, 87, 88, 89, 90, 91], inclusive: false }, BLOCK_ARROW: { rules: [76, 81, 84], inclusive: false }, NODE: { rules: [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 77, 80], inclusive: false }, md_string: { rules: [9, 10, 78, 79], inclusive: false }, space: { rules: [], inclusive: false }, string: { rules: [12, 13, 82, 83], inclusive: false }, acc_descr_multiline: { rules: [34, 35], inclusive: false }, acc_descr: { rules: [32], inclusive: false }, acc_title: { rules: [30], inclusive: false }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 16, 17, 18, 19, 23, 26, 29, 31, 33, 36, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 92, 93, 94, 95, 96, 97, 98, 104], inclusive: true } }
|
|
599
597
|
};
|
|
600
598
|
return D;
|
|
601
599
|
}();
|
|
@@ -605,64 +603,67 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
|
|
|
605
603
|
}
|
|
606
604
|
return d(_, "Parser"), _.prototype = k, k.Parser = _, new _();
|
|
607
605
|
}();
|
|
608
|
-
|
|
609
|
-
var ve =
|
|
610
|
-
let
|
|
611
|
-
|
|
612
|
-
const
|
|
613
|
-
if (RegExp(Bt).exec(
|
|
614
|
-
const r =
|
|
615
|
-
|
|
606
|
+
bt.parser = bt;
|
|
607
|
+
var ve = bt, X = /* @__PURE__ */ new Map(), kt = [], wt = /* @__PURE__ */ new Map(), Bt = "color", Ct = "fill", Ee = "bgFill", Pt = ",", _e = R(), ct = /* @__PURE__ */ new Map(), De = /* @__PURE__ */ d((e) => xe.sanitizeText(e, _e), "sanitizeText"), Ne = /* @__PURE__ */ d(function(e, t = "") {
|
|
608
|
+
let a = ct.get(e);
|
|
609
|
+
a || (a = { id: e, styles: [], textStyles: [] }, ct.set(e, a)), t == null ? void 0 : t.split(Pt).forEach((i) => {
|
|
610
|
+
const l = i.replace(/([^;]*);/, "$1").trim();
|
|
611
|
+
if (RegExp(Bt).exec(i)) {
|
|
612
|
+
const r = l.replace(Ct, Ee).replace(Bt, Ct);
|
|
613
|
+
a.textStyles.push(r);
|
|
616
614
|
}
|
|
617
|
-
|
|
615
|
+
a.styles.push(l);
|
|
618
616
|
});
|
|
619
617
|
}, "addStyleClass"), Te = /* @__PURE__ */ d(function(e, t = "") {
|
|
620
|
-
const
|
|
621
|
-
t != null && (
|
|
618
|
+
const a = X.get(e);
|
|
619
|
+
t != null && (a.styles = t.split(Pt));
|
|
622
620
|
}, "addStyle2Node"), Be = /* @__PURE__ */ d(function(e, t) {
|
|
623
|
-
e.split(",").forEach(function(
|
|
624
|
-
let
|
|
625
|
-
if (
|
|
626
|
-
const
|
|
627
|
-
|
|
621
|
+
e.split(",").forEach(function(a) {
|
|
622
|
+
let i = X.get(a);
|
|
623
|
+
if (i === void 0) {
|
|
624
|
+
const l = a.trim();
|
|
625
|
+
i = { id: l, type: "na", children: [] }, X.set(l, i);
|
|
628
626
|
}
|
|
629
|
-
|
|
627
|
+
i.classes || (i.classes = []), i.classes.push(t);
|
|
630
628
|
});
|
|
631
629
|
}, "setCssClass"), Yt = /* @__PURE__ */ d((e, t) => {
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
630
|
+
var _a2;
|
|
631
|
+
const a = e.flat(), i = [], s = ((_a2 = a.find((r) => (r == null ? void 0 : r.type) === "column-setting")) == null ? void 0 : _a2.columns) ?? -1;
|
|
632
|
+
for (const r of a) {
|
|
633
|
+
if (typeof s == "number" && s > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > s && L.warn(
|
|
634
|
+
`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${s}`
|
|
635
|
+
), r.label && (r.label = De(r.label)), r.type === "classDef") {
|
|
636
|
+
Ne(r.id, r.css);
|
|
636
637
|
continue;
|
|
637
638
|
}
|
|
638
|
-
if (
|
|
639
|
-
Be(
|
|
639
|
+
if (r.type === "applyClass") {
|
|
640
|
+
Be(r.id, (r == null ? void 0 : r.styleClass) ?? "");
|
|
640
641
|
continue;
|
|
641
642
|
}
|
|
642
|
-
if (
|
|
643
|
-
(
|
|
643
|
+
if (r.type === "applyStyles") {
|
|
644
|
+
(r == null ? void 0 : r.stylesStr) && Te(r.id, r == null ? void 0 : r.stylesStr);
|
|
644
645
|
continue;
|
|
645
646
|
}
|
|
646
|
-
if (
|
|
647
|
-
t.columns =
|
|
648
|
-
else if (
|
|
649
|
-
const
|
|
650
|
-
|
|
647
|
+
if (r.type === "column-setting")
|
|
648
|
+
t.columns = r.columns ?? -1;
|
|
649
|
+
else if (r.type === "edge") {
|
|
650
|
+
const n = (wt.get(r.id) ?? 0) + 1;
|
|
651
|
+
wt.set(r.id, n), r.id = n + "-" + r.id, kt.push(r);
|
|
651
652
|
} else {
|
|
652
|
-
|
|
653
|
-
const
|
|
654
|
-
if (
|
|
655
|
-
const
|
|
656
|
-
for (let
|
|
657
|
-
const
|
|
658
|
-
|
|
653
|
+
r.label || (r.type === "composite" ? r.label = "" : r.label = r.id);
|
|
654
|
+
const n = X.get(r.id);
|
|
655
|
+
if (n === void 0 ? X.set(r.id, r) : (r.type !== "na" && (n.type = r.type), r.label !== r.id && (n.label = r.label)), r.children && Yt(r.children, r), r.type === "space") {
|
|
656
|
+
const c = r.width ?? 1;
|
|
657
|
+
for (let u = 0; u < c; u++) {
|
|
658
|
+
const o = we(r);
|
|
659
|
+
o.id = o.id + "-" + u, X.set(o.id, o), i.push(o);
|
|
659
660
|
}
|
|
660
|
-
} else
|
|
661
|
+
} else n === void 0 && i.push(r);
|
|
661
662
|
}
|
|
662
663
|
}
|
|
663
|
-
t.children =
|
|
664
|
-
}, "populateBlockDatabase"),
|
|
665
|
-
L.debug("Clear called"), de(), et = { id: "root", type: "composite", children: [], columns: -1 }, X = /* @__PURE__ */ new Map([["root", et]]),
|
|
664
|
+
t.children = i;
|
|
665
|
+
}, "populateBlockDatabase"), vt = [], et = { id: "root", type: "composite", children: [], columns: -1 }, Ce = /* @__PURE__ */ d(() => {
|
|
666
|
+
L.debug("Clear called"), de(), et = { id: "root", type: "composite", children: [], columns: -1 }, X = /* @__PURE__ */ new Map([["root", et]]), vt = [], ct = /* @__PURE__ */ new Map(), kt = [], wt = /* @__PURE__ */ new Map();
|
|
666
667
|
}, "clear");
|
|
667
668
|
function Ht(e) {
|
|
668
669
|
switch (L.debug("typeStr2Type", e), e) {
|
|
@@ -711,22 +712,24 @@ function Kt(e) {
|
|
|
711
712
|
}
|
|
712
713
|
d(Kt, "edgeTypeStr2Type");
|
|
713
714
|
function Xt(e) {
|
|
714
|
-
switch (e.
|
|
715
|
-
case "
|
|
715
|
+
switch (e.replace(/^[\s-]+|[\s-]+$/g, "")) {
|
|
716
|
+
case "x":
|
|
716
717
|
return "arrow_cross";
|
|
717
|
-
case "
|
|
718
|
+
case "o":
|
|
718
719
|
return "arrow_circle";
|
|
719
|
-
|
|
720
|
+
case ">":
|
|
720
721
|
return "arrow_point";
|
|
722
|
+
default:
|
|
723
|
+
return "";
|
|
721
724
|
}
|
|
722
725
|
}
|
|
723
726
|
d(Xt, "edgeStrToEdgeData");
|
|
724
727
|
var It = 0, Ie = /* @__PURE__ */ d(() => (It++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + It), "generateId"), Oe = /* @__PURE__ */ d((e) => {
|
|
725
|
-
et.children = e, Yt(e, et),
|
|
728
|
+
et.children = e, Yt(e, et), vt = et.children;
|
|
726
729
|
}, "setHierarchy"), Re = /* @__PURE__ */ d((e) => {
|
|
727
730
|
const t = X.get(e);
|
|
728
731
|
return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
|
|
729
|
-
}, "getColumns"), ze = /* @__PURE__ */ d(() => [...X.values()], "getBlocksFlat"), Ae = /* @__PURE__ */ d(() =>
|
|
732
|
+
}, "getColumns"), ze = /* @__PURE__ */ d(() => [...X.values()], "getBlocksFlat"), Ae = /* @__PURE__ */ d(() => vt || [], "getBlocks"), Me = /* @__PURE__ */ d(() => kt, "getEdges"), Fe = /* @__PURE__ */ d((e) => X.get(e), "getBlock"), We = /* @__PURE__ */ d((e) => {
|
|
730
733
|
X.set(e.id, e);
|
|
731
734
|
}, "setBlock"), Pe = /* @__PURE__ */ d(() => L, "getLogger"), Ye = /* @__PURE__ */ d(function() {
|
|
732
735
|
return ct;
|
|
@@ -747,8 +750,8 @@ var It = 0, Ie = /* @__PURE__ */ d(() => (It++, "id-" + Math.random().toString(3
|
|
|
747
750
|
clear: Ce,
|
|
748
751
|
generateId: Ie
|
|
749
752
|
}, Ke = He, nt = /* @__PURE__ */ d((e, t) => {
|
|
750
|
-
const
|
|
751
|
-
return ge(
|
|
753
|
+
const a = Le, i = a(e, "r"), l = a(e, "g"), s = a(e, "b");
|
|
754
|
+
return ge(i, l, s, t);
|
|
752
755
|
}, "fade"), Xe = /* @__PURE__ */ d((e) => `.label {
|
|
753
756
|
font-family: ${e.fontFamily};
|
|
754
757
|
color: ${e.nodeTextColor || e.textColor};
|
|
@@ -862,28 +865,28 @@ var It = 0, Ie = /* @__PURE__ */ d(() => (It++, "id-" + Math.random().toString(3
|
|
|
862
865
|
fill: ${e.textColor};
|
|
863
866
|
}
|
|
864
867
|
${oe()}
|
|
865
|
-
`, "getStyles"), Ue = Xe, je = /* @__PURE__ */ d((e, t,
|
|
866
|
-
t.forEach((
|
|
867
|
-
rr[
|
|
868
|
+
`, "getStyles"), Ue = Xe, je = /* @__PURE__ */ d((e, t, a, i) => {
|
|
869
|
+
t.forEach((l) => {
|
|
870
|
+
rr[l](e, a, i);
|
|
868
871
|
});
|
|
869
|
-
}, "insertMarkers"), Ve = /* @__PURE__ */ d((e, t,
|
|
870
|
-
L.trace("Making markers for ",
|
|
871
|
-
}, "extension"), Ge = /* @__PURE__ */ d((e, t,
|
|
872
|
-
e.append("defs").append("marker").attr("id",
|
|
873
|
-
}, "composition"), Ze = /* @__PURE__ */ d((e, t,
|
|
874
|
-
e.append("defs").append("marker").attr("id",
|
|
875
|
-
}, "aggregation"), qe = /* @__PURE__ */ d((e, t,
|
|
876
|
-
e.append("defs").append("marker").attr("id",
|
|
877
|
-
}, "dependency"), Je = /* @__PURE__ */ d((e, t,
|
|
878
|
-
e.append("defs").append("marker").attr("id",
|
|
879
|
-
}, "lollipop"), Qe = /* @__PURE__ */ d((e, t,
|
|
880
|
-
e.append("marker").attr("id",
|
|
881
|
-
}, "point"), $e = /* @__PURE__ */ d((e, t,
|
|
882
|
-
e.append("marker").attr("id",
|
|
883
|
-
}, "circle"), tr = /* @__PURE__ */ d((e, t,
|
|
884
|
-
e.append("marker").attr("id",
|
|
885
|
-
}, "cross"), er = /* @__PURE__ */ d((e, t,
|
|
886
|
-
e.append("defs").append("marker").attr("id",
|
|
872
|
+
}, "insertMarkers"), Ve = /* @__PURE__ */ d((e, t, a) => {
|
|
873
|
+
L.trace("Making markers for ", a), e.append("defs").append("marker").attr("id", a + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
|
|
874
|
+
}, "extension"), Ge = /* @__PURE__ */ d((e, t, a) => {
|
|
875
|
+
e.append("defs").append("marker").attr("id", a + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
876
|
+
}, "composition"), Ze = /* @__PURE__ */ d((e, t, a) => {
|
|
877
|
+
e.append("defs").append("marker").attr("id", a + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
878
|
+
}, "aggregation"), qe = /* @__PURE__ */ d((e, t, a) => {
|
|
879
|
+
e.append("defs").append("marker").attr("id", a + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
880
|
+
}, "dependency"), Je = /* @__PURE__ */ d((e, t, a) => {
|
|
881
|
+
e.append("defs").append("marker").attr("id", a + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", a + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
|
|
882
|
+
}, "lollipop"), Qe = /* @__PURE__ */ d((e, t, a) => {
|
|
883
|
+
e.append("marker").attr("id", a + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
884
|
+
}, "point"), $e = /* @__PURE__ */ d((e, t, a) => {
|
|
885
|
+
e.append("marker").attr("id", a + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
886
|
+
}, "circle"), tr = /* @__PURE__ */ d((e, t, a) => {
|
|
887
|
+
e.append("marker").attr("id", a + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
888
|
+
}, "cross"), er = /* @__PURE__ */ d((e, t, a) => {
|
|
889
|
+
e.append("defs").append("marker").attr("id", a + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
887
890
|
}, "barb"), rr = {
|
|
888
891
|
extension: Ve,
|
|
889
892
|
composition: Ge,
|
|
@@ -904,31 +907,31 @@ function Ut(e, t) {
|
|
|
904
907
|
return { px: t, py: 0 };
|
|
905
908
|
if (e === 1)
|
|
906
909
|
return { px: 0, py: t };
|
|
907
|
-
const
|
|
908
|
-
return { px:
|
|
910
|
+
const a = t % e, i = Math.floor(t / e);
|
|
911
|
+
return { px: a, py: i };
|
|
909
912
|
}
|
|
910
913
|
d(Ut, "calculateBlockPosition");
|
|
911
914
|
var sr = /* @__PURE__ */ d((e) => {
|
|
912
|
-
let t = 0,
|
|
913
|
-
for (const
|
|
914
|
-
const { width:
|
|
915
|
+
let t = 0, a = 0;
|
|
916
|
+
for (const i of e.children) {
|
|
917
|
+
const { width: l, height: s, x: r, y: n } = i.size ?? { width: 0, height: 0, x: 0, y: 0 };
|
|
915
918
|
L.debug(
|
|
916
919
|
"getMaxChildSize abc95 child:",
|
|
917
|
-
|
|
920
|
+
i.id,
|
|
918
921
|
"width:",
|
|
919
|
-
|
|
922
|
+
l,
|
|
920
923
|
"height:",
|
|
921
|
-
|
|
924
|
+
s,
|
|
922
925
|
"x:",
|
|
923
926
|
r,
|
|
924
927
|
"y:",
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
),
|
|
928
|
+
n,
|
|
929
|
+
i.type
|
|
930
|
+
), i.type !== "space" && (l > t && (t = l / (e.widthInColumns ?? 1)), s > a && (a = s));
|
|
928
931
|
}
|
|
929
|
-
return { width: t, height:
|
|
932
|
+
return { width: t, height: a };
|
|
930
933
|
}, "getMaxChildSize");
|
|
931
|
-
function ot(e, t,
|
|
934
|
+
function ot(e, t, a = 0, i = 0) {
|
|
932
935
|
var _a2, _b2, _c, _d, _e2, _f, _g, _h, _i, _j, _k;
|
|
933
936
|
L.debug(
|
|
934
937
|
"setBlockSizes abc95 (start)",
|
|
@@ -937,54 +940,54 @@ function ot(e, t, s = 0, n = 0) {
|
|
|
937
940
|
"block width =",
|
|
938
941
|
e == null ? void 0 : e.size,
|
|
939
942
|
"siblingWidth",
|
|
940
|
-
|
|
943
|
+
a
|
|
941
944
|
), ((_b2 = e == null ? void 0 : e.size) == null ? void 0 : _b2.width) || (e.size = {
|
|
942
|
-
width:
|
|
943
|
-
height:
|
|
945
|
+
width: a,
|
|
946
|
+
height: i,
|
|
944
947
|
x: 0,
|
|
945
948
|
y: 0
|
|
946
949
|
});
|
|
947
|
-
let
|
|
950
|
+
let l = 0, s = 0;
|
|
948
951
|
if (((_c = e.children) == null ? void 0 : _c.length) > 0) {
|
|
949
952
|
for (const b of e.children)
|
|
950
953
|
ot(b, t);
|
|
951
954
|
const r = sr(e);
|
|
952
|
-
|
|
955
|
+
l = r.width, s = r.height, L.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", l, s);
|
|
953
956
|
for (const b of e.children)
|
|
954
957
|
b.size && (L.debug(
|
|
955
|
-
`abc95 Setting size of children of ${e.id} id=${b.id} ${
|
|
956
|
-
), b.size.width =
|
|
957
|
-
`abc95 updating size of ${e.id} children child:${b.id} maxWidth:${
|
|
958
|
+
`abc95 Setting size of children of ${e.id} id=${b.id} ${l} ${s} ${JSON.stringify(b.size)}`
|
|
959
|
+
), b.size.width = l * (b.widthInColumns ?? 1) + C * ((b.widthInColumns ?? 1) - 1), b.size.height = s, b.size.x = 0, b.size.y = 0, L.debug(
|
|
960
|
+
`abc95 updating size of ${e.id} children child:${b.id} maxWidth:${l} maxHeight:${s}`
|
|
958
961
|
));
|
|
959
962
|
for (const b of e.children)
|
|
960
|
-
ot(b, t,
|
|
961
|
-
const
|
|
963
|
+
ot(b, t, l, s);
|
|
964
|
+
const n = e.columns ?? -1;
|
|
962
965
|
let c = 0;
|
|
963
966
|
for (const b of e.children)
|
|
964
967
|
c += b.widthInColumns ?? 1;
|
|
965
968
|
let u = e.children.length;
|
|
966
|
-
|
|
967
|
-
const
|
|
968
|
-
let x = u * (
|
|
969
|
-
if (x <
|
|
969
|
+
n > 0 && n < c && (u = n);
|
|
970
|
+
const o = Math.ceil(c / u);
|
|
971
|
+
let x = u * (l + C) + C, w = o * (s + C) + C;
|
|
972
|
+
if (x < a) {
|
|
970
973
|
L.debug(
|
|
971
|
-
`Detected to small sibling: abc95 ${e.id} siblingWidth ${
|
|
972
|
-
), x =
|
|
973
|
-
const b = (
|
|
974
|
-
L.debug("Size indata abc88", e.id, "childWidth", b, "maxWidth",
|
|
975
|
-
for (const
|
|
976
|
-
|
|
974
|
+
`Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${i} width ${x}`
|
|
975
|
+
), x = a, w = i;
|
|
976
|
+
const b = (a - u * C - C) / u, S = (i - o * C - C) / o;
|
|
977
|
+
L.debug("Size indata abc88", e.id, "childWidth", b, "maxWidth", l), L.debug("Size indata abc88", e.id, "childHeight", S, "maxHeight", s), L.debug("Size indata abc88 xSize", u, "padding", C);
|
|
978
|
+
for (const v of e.children)
|
|
979
|
+
v.size && (v.size.width = b, v.size.height = S, v.size.x = 0, v.size.y = 0);
|
|
977
980
|
}
|
|
978
981
|
if (L.debug(
|
|
979
|
-
`abc95 (finale calc) ${e.id} xSize ${u} ySize ${
|
|
982
|
+
`abc95 (finale calc) ${e.id} xSize ${u} ySize ${o} columns ${n}${e.children.length} width=${Math.max(x, ((_d = e.size) == null ? void 0 : _d.width) || 0)}`
|
|
980
983
|
), x < (((_e2 = e == null ? void 0 : e.size) == null ? void 0 : _e2.width) || 0)) {
|
|
981
984
|
x = ((_f = e == null ? void 0 : e.size) == null ? void 0 : _f.width) || 0;
|
|
982
|
-
const b =
|
|
985
|
+
const b = n > 0 ? Math.min(e.children.length, n) : e.children.length;
|
|
983
986
|
if (b > 0) {
|
|
984
987
|
const S = (x - b * C - C) / b;
|
|
985
988
|
L.debug("abc95 (growing to fit) width", e.id, x, (_g = e.size) == null ? void 0 : _g.width, S);
|
|
986
|
-
for (const
|
|
987
|
-
|
|
989
|
+
for (const v of e.children)
|
|
990
|
+
v.size && (v.size.width = S);
|
|
988
991
|
}
|
|
989
992
|
}
|
|
990
993
|
e.size = {
|
|
@@ -1004,94 +1007,98 @@ function ot(e, t, s = 0, n = 0) {
|
|
|
1004
1007
|
);
|
|
1005
1008
|
}
|
|
1006
1009
|
d(ot, "setBlockSizes");
|
|
1007
|
-
function
|
|
1010
|
+
function Et(e, t) {
|
|
1008
1011
|
var _a2, _b2, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
1009
1012
|
L.debug(
|
|
1010
1013
|
`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(_a2 = e == null ? void 0 : e.size) == null ? void 0 : _a2.x} y: ${(_b2 = e == null ? void 0 : e.size) == null ? void 0 : _b2.y} width: ${(_c = e == null ? void 0 : e.size) == null ? void 0 : _c.width}`
|
|
1011
1014
|
);
|
|
1012
|
-
const
|
|
1013
|
-
if (L.debug("layoutBlocks columns abc95", e.id, "=>",
|
|
1015
|
+
const a = e.columns ?? -1;
|
|
1016
|
+
if (L.debug("layoutBlocks columns abc95", e.id, "=>", a, e), e.children && // find max width of children
|
|
1014
1017
|
e.children.length > 0) {
|
|
1015
|
-
const
|
|
1016
|
-
L.debug("widthOfChildren 88",
|
|
1017
|
-
let
|
|
1018
|
+
const i = ((_e2 = (_d = e == null ? void 0 : e.children[0]) == null ? void 0 : _d.size) == null ? void 0 : _e2.width) ?? 0, l = e.children.length * i + (e.children.length - 1) * C;
|
|
1019
|
+
L.debug("widthOfChildren 88", l, "posX");
|
|
1020
|
+
let s = 0;
|
|
1018
1021
|
L.debug("abc91 block?.size?.x", e.id, (_f = e == null ? void 0 : e.size) == null ? void 0 : _f.x);
|
|
1019
|
-
let r = ((_g = e == null ? void 0 : e.size) == null ? void 0 : _g.x) ? ((_h = e == null ? void 0 : e.size) == null ? void 0 : _h.x) + (-((_i = e == null ? void 0 : e.size) == null ? void 0 : _i.width) / 2 || 0) : -C,
|
|
1022
|
+
let r = ((_g = e == null ? void 0 : e.size) == null ? void 0 : _g.x) ? ((_h = e == null ? void 0 : e.size) == null ? void 0 : _h.x) + (-((_i = e == null ? void 0 : e.size) == null ? void 0 : _i.width) / 2 || 0) : -C, n = 0;
|
|
1020
1023
|
for (const c of e.children) {
|
|
1021
1024
|
const u = e;
|
|
1022
1025
|
if (!c.size)
|
|
1023
1026
|
continue;
|
|
1024
|
-
const { width:
|
|
1025
|
-
if (b !=
|
|
1026
|
-
`abc89 layout blocks (child) id: ${c.id} Pos: ${
|
|
1027
|
+
const { width: o, height: x } = c.size, { px: w, py: b } = Ut(a, s);
|
|
1028
|
+
if (b != n && (n = b, r = ((_j = e == null ? void 0 : e.size) == null ? void 0 : _j.x) ? ((_k = e == null ? void 0 : e.size) == null ? void 0 : _k.x) + (-((_l = e == null ? void 0 : e.size) == null ? void 0 : _l.width) / 2 || 0) : -C, L.debug("New row in layout for block", e.id, " and child ", c.id, n)), L.debug(
|
|
1029
|
+
`abc89 layout blocks (child) id: ${c.id} Pos: ${s} (px, py) ${w},${b} (${(_m = u == null ? void 0 : u.size) == null ? void 0 : _m.x},${(_n = u == null ? void 0 : u.size) == null ? void 0 : _n.y}) parent: ${u.id} width: ${o}${C}`
|
|
1027
1030
|
), u.size) {
|
|
1028
|
-
const
|
|
1029
|
-
c.size.x = r + C +
|
|
1030
|
-
`abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${r} new startingPosX${c.size.x} ${
|
|
1031
|
-
), r = c.size.x +
|
|
1032
|
-
`abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${r}${C}${
|
|
1031
|
+
const v = o / 2;
|
|
1032
|
+
c.size.x = r + C + v, L.debug(
|
|
1033
|
+
`abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${r} new startingPosX${c.size.x} ${v} padding=${C} width=${o} halfWidth=${v} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${o * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
|
|
1034
|
+
), r = c.size.x + v, c.size.y = u.size.y - u.size.height / 2 + b * (x + C) + x / 2 + C, L.debug(
|
|
1035
|
+
`abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${r}${C}${v}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${o * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
|
|
1033
1036
|
);
|
|
1034
1037
|
}
|
|
1035
|
-
c.children &&
|
|
1038
|
+
c.children && Et(c);
|
|
1039
|
+
let S = (c == null ? void 0 : c.widthInColumns) ?? 1;
|
|
1040
|
+
a > 0 && (S = Math.min(S, a - s % a)), s += S, L.debug("abc88 columnsPos", c, s);
|
|
1036
1041
|
}
|
|
1037
1042
|
}
|
|
1038
1043
|
L.debug(
|
|
1039
1044
|
`layout blocks (<==layoutBlocks) ${e.id} x: ${(_o = e == null ? void 0 : e.size) == null ? void 0 : _o.x} y: ${(_p = e == null ? void 0 : e.size) == null ? void 0 : _p.y} width: ${(_q = e == null ? void 0 : e.size) == null ? void 0 : _q.width}`
|
|
1040
1045
|
);
|
|
1041
1046
|
}
|
|
1042
|
-
d(
|
|
1043
|
-
function
|
|
1047
|
+
d(Et, "layoutBlocks");
|
|
1048
|
+
function _t(e, { minX: t, minY: a, maxX: i, maxY: l } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
|
|
1044
1049
|
if (e.size && e.id !== "root") {
|
|
1045
|
-
const { x:
|
|
1046
|
-
|
|
1050
|
+
const { x: s, y: r, width: n, height: c } = e.size;
|
|
1051
|
+
s - n / 2 < t && (t = s - n / 2), r - c / 2 < a && (a = r - c / 2), s + n / 2 > i && (i = s + n / 2), r + c / 2 > l && (l = r + c / 2);
|
|
1047
1052
|
}
|
|
1048
1053
|
if (e.children)
|
|
1049
|
-
for (const
|
|
1050
|
-
({ minX: t, minY:
|
|
1051
|
-
return { minX: t, minY:
|
|
1054
|
+
for (const s of e.children)
|
|
1055
|
+
({ minX: t, minY: a, maxX: i, maxY: l } = _t(s, { minX: t, minY: a, maxX: i, maxY: l }));
|
|
1056
|
+
return { minX: t, minY: a, maxX: i, maxY: l };
|
|
1052
1057
|
}
|
|
1053
|
-
d(
|
|
1058
|
+
d(_t, "findBounds");
|
|
1054
1059
|
function jt(e) {
|
|
1055
1060
|
const t = e.getBlock("root");
|
|
1056
1061
|
if (!t)
|
|
1057
1062
|
return;
|
|
1058
|
-
ot(t, e, 0, 0),
|
|
1059
|
-
const { minX:
|
|
1060
|
-
return { x:
|
|
1063
|
+
ot(t, e, 0, 0), Et(t), L.debug("getBlocks", JSON.stringify(t, null, 2));
|
|
1064
|
+
const { minX: a, minY: i, maxX: l, maxY: s } = _t(t), r = s - i, n = l - a;
|
|
1065
|
+
return { x: a, y: i, width: n, height: r };
|
|
1061
1066
|
}
|
|
1062
1067
|
d(jt, "layout");
|
|
1063
|
-
function
|
|
1068
|
+
function mt(e, t) {
|
|
1064
1069
|
t && e.attr("style", t);
|
|
1065
1070
|
}
|
|
1066
|
-
d(
|
|
1067
|
-
function Vt(e) {
|
|
1068
|
-
const
|
|
1069
|
-
return
|
|
1071
|
+
d(mt, "applyStyle");
|
|
1072
|
+
function Vt(e, t) {
|
|
1073
|
+
const a = O(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), i = a.append("xhtml:div"), l = e.label, s = e.isNode ? "nodeLabel" : "edgeLabel", r = i.append("span");
|
|
1074
|
+
return r.html(yt(l, t)), mt(r, e.labelStyle), r.attr("class", s), mt(i, e.labelStyle), i.style("display", "inline-block"), i.style("white-space", "nowrap"), i.attr("xmlns", "http://www.w3.org/1999/xhtml"), a.node();
|
|
1070
1075
|
}
|
|
1071
1076
|
d(Vt, "addHtmlLabel");
|
|
1072
|
-
var ir = /* @__PURE__ */ d(async (e, t,
|
|
1073
|
-
let
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1077
|
+
var ir = /* @__PURE__ */ d(async (e, t, a, i) => {
|
|
1078
|
+
let l = e || "";
|
|
1079
|
+
typeof l == "object" && (l = l[0]);
|
|
1080
|
+
const s = R();
|
|
1081
|
+
if (j(s.flowchart.htmlLabels)) {
|
|
1082
|
+
l = l.replace(/\\n|\n/g, "<br />"), L.debug("vertexText" + l);
|
|
1083
|
+
const r = await ye(xt(l)), n = {
|
|
1084
|
+
isNode: i,
|
|
1085
|
+
label: r,
|
|
1079
1086
|
labelStyle: t.replace("fill:", "color:")
|
|
1080
1087
|
};
|
|
1081
|
-
return Vt(
|
|
1088
|
+
return Vt(n, s);
|
|
1082
1089
|
} else {
|
|
1083
|
-
const
|
|
1084
|
-
|
|
1085
|
-
let
|
|
1086
|
-
typeof
|
|
1087
|
-
for (const
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1090
|
+
const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1091
|
+
r.setAttribute("style", t.replace("color:", "fill:"));
|
|
1092
|
+
let n = [];
|
|
1093
|
+
typeof l == "string" ? n = l.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(l) ? n = l : n = [];
|
|
1094
|
+
for (const c of n) {
|
|
1095
|
+
const u = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
1096
|
+
u.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), u.setAttribute("dy", "1em"), u.setAttribute("x", "0"), a ? u.setAttribute("class", "title-row") : u.setAttribute("class", "row"), u.textContent = c.trim(), r.appendChild(u);
|
|
1090
1097
|
}
|
|
1091
|
-
return
|
|
1098
|
+
return r;
|
|
1092
1099
|
}
|
|
1093
|
-
}, "createLabel"), K = ir, nr = /* @__PURE__ */ d((e, t,
|
|
1094
|
-
t.arrowTypeStart && Ot(e, "start", t.arrowTypeStart,
|
|
1100
|
+
}, "createLabel"), K = ir, nr = /* @__PURE__ */ d((e, t, a, i, l) => {
|
|
1101
|
+
t.arrowTypeStart && Ot(e, "start", t.arrowTypeStart, a, i, l), t.arrowTypeEnd && Ot(e, "end", t.arrowTypeEnd, a, i, l);
|
|
1095
1102
|
}, "addEdgeMarkers"), lr = {
|
|
1096
1103
|
arrow_cross: "cross",
|
|
1097
1104
|
arrow_point: "point",
|
|
@@ -1102,176 +1109,176 @@ var ir = /* @__PURE__ */ d(async (e, t, s, n) => {
|
|
|
1102
1109
|
composition: "composition",
|
|
1103
1110
|
dependency: "dependency",
|
|
1104
1111
|
lollipop: "lollipop"
|
|
1105
|
-
}, Ot = /* @__PURE__ */ d((e, t,
|
|
1106
|
-
const r = lr[
|
|
1112
|
+
}, Ot = /* @__PURE__ */ d((e, t, a, i, l, s) => {
|
|
1113
|
+
const r = lr[a];
|
|
1107
1114
|
if (!r) {
|
|
1108
|
-
L.warn(`Unknown arrow type: ${
|
|
1115
|
+
L.warn(`Unknown arrow type: ${a}`);
|
|
1109
1116
|
return;
|
|
1110
1117
|
}
|
|
1111
|
-
const
|
|
1112
|
-
e.attr(`marker-${t}`, `url(${
|
|
1113
|
-
}, "addEdgeMarker"),
|
|
1114
|
-
const
|
|
1118
|
+
const n = t === "start" ? "Start" : "End";
|
|
1119
|
+
e.attr(`marker-${t}`, `url(${i}#${l}_${s}-${r}${n})`);
|
|
1120
|
+
}, "addEdgeMarker"), Lt = {}, M = {}, cr = /* @__PURE__ */ d(async (e, t) => {
|
|
1121
|
+
const a = R(), i = j(a.flowchart.htmlLabels), l = t.labelType === "markdown" ? Wt(
|
|
1115
1122
|
e,
|
|
1116
1123
|
t.label,
|
|
1117
1124
|
{
|
|
1118
1125
|
style: t.labelStyle,
|
|
1119
|
-
useHtmlLabels:
|
|
1126
|
+
useHtmlLabels: i,
|
|
1120
1127
|
addSvgBackground: true
|
|
1121
1128
|
},
|
|
1122
|
-
|
|
1123
|
-
) : await K(t.label, t.labelStyle),
|
|
1124
|
-
r.node().appendChild(
|
|
1125
|
-
let
|
|
1126
|
-
if (
|
|
1127
|
-
const u =
|
|
1128
|
-
|
|
1129
|
+
a
|
|
1130
|
+
) : await K(t.label, t.labelStyle), s = e.insert("g").attr("class", "edgeLabel"), r = s.insert("g").attr("class", "label");
|
|
1131
|
+
r.node().appendChild(l);
|
|
1132
|
+
let n = l.getBBox();
|
|
1133
|
+
if (i) {
|
|
1134
|
+
const u = l.children[0], o = O(l);
|
|
1135
|
+
n = u.getBoundingClientRect(), o.attr("width", n.width), o.attr("height", n.height);
|
|
1129
1136
|
}
|
|
1130
|
-
r.attr("transform", "translate(" + -
|
|
1137
|
+
r.attr("transform", "translate(" + -n.width / 2 + ", " + -n.height / 2 + ")"), Lt[t.id] = s, t.width = n.width, t.height = n.height;
|
|
1131
1138
|
let c;
|
|
1132
1139
|
if (t.startLabelLeft) {
|
|
1133
|
-
const u = await K(t.startLabelLeft, t.labelStyle),
|
|
1140
|
+
const u = await K(t.startLabelLeft, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), x = o.insert("g").attr("class", "inner");
|
|
1134
1141
|
c = x.node().appendChild(u);
|
|
1135
1142
|
const w = u.getBBox();
|
|
1136
|
-
x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), M[t.id] || (M[t.id] = {}), M[t.id].startLeft =
|
|
1143
|
+
x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), M[t.id] || (M[t.id] = {}), M[t.id].startLeft = o, tt(c, t.startLabelLeft);
|
|
1137
1144
|
}
|
|
1138
1145
|
if (t.startLabelRight) {
|
|
1139
|
-
const u = await K(t.startLabelRight, t.labelStyle),
|
|
1140
|
-
c =
|
|
1146
|
+
const u = await K(t.startLabelRight, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), x = o.insert("g").attr("class", "inner");
|
|
1147
|
+
c = o.node().appendChild(u), x.node().appendChild(u);
|
|
1141
1148
|
const w = u.getBBox();
|
|
1142
|
-
x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), M[t.id] || (M[t.id] = {}), M[t.id].startRight =
|
|
1149
|
+
x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), M[t.id] || (M[t.id] = {}), M[t.id].startRight = o, tt(c, t.startLabelRight);
|
|
1143
1150
|
}
|
|
1144
1151
|
if (t.endLabelLeft) {
|
|
1145
|
-
const u = await K(t.endLabelLeft, t.labelStyle),
|
|
1152
|
+
const u = await K(t.endLabelLeft, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), x = o.insert("g").attr("class", "inner");
|
|
1146
1153
|
c = x.node().appendChild(u);
|
|
1147
1154
|
const w = u.getBBox();
|
|
1148
|
-
x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"),
|
|
1155
|
+
x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), o.node().appendChild(u), M[t.id] || (M[t.id] = {}), M[t.id].endLeft = o, tt(c, t.endLabelLeft);
|
|
1149
1156
|
}
|
|
1150
1157
|
if (t.endLabelRight) {
|
|
1151
|
-
const u = await K(t.endLabelRight, t.labelStyle),
|
|
1158
|
+
const u = await K(t.endLabelRight, t.labelStyle), o = e.insert("g").attr("class", "edgeTerminals"), x = o.insert("g").attr("class", "inner");
|
|
1152
1159
|
c = x.node().appendChild(u);
|
|
1153
1160
|
const w = u.getBBox();
|
|
1154
|
-
x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"),
|
|
1161
|
+
x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), o.node().appendChild(u), M[t.id] || (M[t.id] = {}), M[t.id].endRight = o, tt(c, t.endLabelRight);
|
|
1155
1162
|
}
|
|
1156
|
-
return
|
|
1163
|
+
return l;
|
|
1157
1164
|
}, "insertEdgeLabel");
|
|
1158
1165
|
function tt(e, t) {
|
|
1159
1166
|
R().flowchart.htmlLabels && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
|
|
1160
1167
|
}
|
|
1161
1168
|
d(tt, "setTerminalWidth");
|
|
1162
1169
|
var or = /* @__PURE__ */ d((e, t) => {
|
|
1163
|
-
L.debug("Moving label abc88 ", e.id, e.label,
|
|
1164
|
-
let
|
|
1165
|
-
const
|
|
1170
|
+
L.debug("Moving label abc88 ", e.id, e.label, Lt[e.id], t);
|
|
1171
|
+
let a = t.updatedPath ? t.updatedPath : t.originalPath;
|
|
1172
|
+
const i = R(), { subGraphTitleTotalMargin: l } = fe(i);
|
|
1166
1173
|
if (e.label) {
|
|
1167
|
-
const
|
|
1168
|
-
let r = e.x,
|
|
1169
|
-
if (
|
|
1170
|
-
const c = $.calcLabelPosition(
|
|
1174
|
+
const s = Lt[e.id];
|
|
1175
|
+
let r = e.x, n = e.y;
|
|
1176
|
+
if (a) {
|
|
1177
|
+
const c = $.calcLabelPosition(a);
|
|
1171
1178
|
L.debug(
|
|
1172
1179
|
"Moving label " + e.label + " from (",
|
|
1173
1180
|
r,
|
|
1174
1181
|
",",
|
|
1175
|
-
|
|
1182
|
+
n,
|
|
1176
1183
|
") to (",
|
|
1177
1184
|
c.x,
|
|
1178
1185
|
",",
|
|
1179
1186
|
c.y,
|
|
1180
1187
|
") abc88"
|
|
1181
|
-
), t.updatedPath && (r = c.x,
|
|
1188
|
+
), t.updatedPath && (r = c.x, n = c.y);
|
|
1182
1189
|
}
|
|
1183
|
-
|
|
1190
|
+
s.attr("transform", `translate(${r}, ${n + l / 2})`);
|
|
1184
1191
|
}
|
|
1185
1192
|
if (e.startLabelLeft) {
|
|
1186
|
-
const
|
|
1187
|
-
let r = e.x,
|
|
1188
|
-
if (
|
|
1189
|
-
const c = $.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left",
|
|
1190
|
-
r = c.x,
|
|
1193
|
+
const s = M[e.id].startLeft;
|
|
1194
|
+
let r = e.x, n = e.y;
|
|
1195
|
+
if (a) {
|
|
1196
|
+
const c = $.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
|
|
1197
|
+
r = c.x, n = c.y;
|
|
1191
1198
|
}
|
|
1192
|
-
|
|
1199
|
+
s.attr("transform", `translate(${r}, ${n})`);
|
|
1193
1200
|
}
|
|
1194
1201
|
if (e.startLabelRight) {
|
|
1195
|
-
const
|
|
1196
|
-
let r = e.x,
|
|
1197
|
-
if (
|
|
1202
|
+
const s = M[e.id].startRight;
|
|
1203
|
+
let r = e.x, n = e.y;
|
|
1204
|
+
if (a) {
|
|
1198
1205
|
const c = $.calcTerminalLabelPosition(
|
|
1199
1206
|
e.arrowTypeStart ? 10 : 0,
|
|
1200
1207
|
"start_right",
|
|
1201
|
-
|
|
1208
|
+
a
|
|
1202
1209
|
);
|
|
1203
|
-
r = c.x,
|
|
1210
|
+
r = c.x, n = c.y;
|
|
1204
1211
|
}
|
|
1205
|
-
|
|
1212
|
+
s.attr("transform", `translate(${r}, ${n})`);
|
|
1206
1213
|
}
|
|
1207
1214
|
if (e.endLabelLeft) {
|
|
1208
|
-
const
|
|
1209
|
-
let r = e.x,
|
|
1210
|
-
if (
|
|
1211
|
-
const c = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left",
|
|
1212
|
-
r = c.x,
|
|
1215
|
+
const s = M[e.id].endLeft;
|
|
1216
|
+
let r = e.x, n = e.y;
|
|
1217
|
+
if (a) {
|
|
1218
|
+
const c = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
|
|
1219
|
+
r = c.x, n = c.y;
|
|
1213
1220
|
}
|
|
1214
|
-
|
|
1221
|
+
s.attr("transform", `translate(${r}, ${n})`);
|
|
1215
1222
|
}
|
|
1216
1223
|
if (e.endLabelRight) {
|
|
1217
|
-
const
|
|
1218
|
-
let r = e.x,
|
|
1219
|
-
if (
|
|
1220
|
-
const c = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right",
|
|
1221
|
-
r = c.x,
|
|
1224
|
+
const s = M[e.id].endRight;
|
|
1225
|
+
let r = e.x, n = e.y;
|
|
1226
|
+
if (a) {
|
|
1227
|
+
const c = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
|
|
1228
|
+
r = c.x, n = c.y;
|
|
1222
1229
|
}
|
|
1223
|
-
|
|
1230
|
+
s.attr("transform", `translate(${r}, ${n})`);
|
|
1224
1231
|
}
|
|
1225
1232
|
}, "positionEdgeLabel"), hr = /* @__PURE__ */ d((e, t) => {
|
|
1226
|
-
const
|
|
1227
|
-
return
|
|
1228
|
-
}, "outsideNode"), dr = /* @__PURE__ */ d((e, t,
|
|
1233
|
+
const a = e.x, i = e.y, l = Math.abs(t.x - a), s = Math.abs(t.y - i), r = e.width / 2, n = e.height / 2;
|
|
1234
|
+
return l >= r || s >= n;
|
|
1235
|
+
}, "outsideNode"), dr = /* @__PURE__ */ d((e, t, a) => {
|
|
1229
1236
|
L.debug(`intersection calc abc89:
|
|
1230
1237
|
outsidePoint: ${JSON.stringify(t)}
|
|
1231
|
-
insidePoint : ${JSON.stringify(
|
|
1238
|
+
insidePoint : ${JSON.stringify(a)}
|
|
1232
1239
|
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
|
|
1233
|
-
const
|
|
1234
|
-
let
|
|
1235
|
-
const c = e.height / 2, u = Math.abs(t.y -
|
|
1236
|
-
if (Math.abs(
|
|
1237
|
-
let x =
|
|
1238
|
-
|
|
1240
|
+
const i = e.x, l = e.y, s = Math.abs(i - a.x), r = e.width / 2;
|
|
1241
|
+
let n = a.x < t.x ? r - s : r + s;
|
|
1242
|
+
const c = e.height / 2, u = Math.abs(t.y - a.y), o = Math.abs(t.x - a.x);
|
|
1243
|
+
if (Math.abs(l - t.y) * r > Math.abs(i - t.x) * c) {
|
|
1244
|
+
let x = a.y < t.y ? t.y - c - l : l - c - t.y;
|
|
1245
|
+
n = o * x / u;
|
|
1239
1246
|
const w = {
|
|
1240
|
-
x:
|
|
1241
|
-
y:
|
|
1247
|
+
x: a.x < t.x ? a.x + n : a.x - o + n,
|
|
1248
|
+
y: a.y < t.y ? a.y + u - x : a.y - u + x
|
|
1242
1249
|
};
|
|
1243
|
-
return
|
|
1250
|
+
return n === 0 && (w.x = t.x, w.y = t.y), o === 0 && (w.x = t.x), u === 0 && (w.y = t.y), L.debug(`abc89 topp/bott calc, Q ${u}, q ${x}, R ${o}, r ${n}`, w), w;
|
|
1244
1251
|
} else {
|
|
1245
|
-
|
|
1246
|
-
let x = u *
|
|
1247
|
-
return L.debug(`sides calc abc89, Q ${u}, q ${x}, R ${
|
|
1252
|
+
a.x < t.x ? n = t.x - r - i : n = i - r - t.x;
|
|
1253
|
+
let x = u * n / o, w = a.x < t.x ? a.x + o - n : a.x - o + n, b = a.y < t.y ? a.y + x : a.y - x;
|
|
1254
|
+
return L.debug(`sides calc abc89, Q ${u}, q ${x}, R ${o}, r ${n}`, { _x: w, _y: b }), n === 0 && (w = t.x, b = t.y), o === 0 && (w = t.x), u === 0 && (b = t.y), { x: w, y: b };
|
|
1248
1255
|
}
|
|
1249
1256
|
}, "intersection"), Rt = /* @__PURE__ */ d((e, t) => {
|
|
1250
1257
|
L.debug("abc88 cutPathAtIntersect", e, t);
|
|
1251
|
-
let
|
|
1252
|
-
return e.forEach((
|
|
1253
|
-
if (!hr(t,
|
|
1254
|
-
const r = dr(t,
|
|
1255
|
-
let
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
}),
|
|
1258
|
+
let a = [], i = e[0], l = false;
|
|
1259
|
+
return e.forEach((s) => {
|
|
1260
|
+
if (!hr(t, s) && !l) {
|
|
1261
|
+
const r = dr(t, i, s);
|
|
1262
|
+
let n = false;
|
|
1263
|
+
a.forEach((c) => {
|
|
1264
|
+
n = n || c.x === r.x && c.y === r.y;
|
|
1265
|
+
}), a.some((c) => c.x === r.x && c.y === r.y) || a.push(r), l = true;
|
|
1259
1266
|
} else
|
|
1260
|
-
|
|
1261
|
-
}),
|
|
1262
|
-
}, "cutPathAtIntersect"), gr = /* @__PURE__ */ d(function(e, t,
|
|
1263
|
-
let
|
|
1264
|
-
L.debug("abc88 InsertEdge: edge=",
|
|
1267
|
+
i = s, l || a.push(s);
|
|
1268
|
+
}), a;
|
|
1269
|
+
}, "cutPathAtIntersect"), gr = /* @__PURE__ */ d(function(e, t, a, i, l, s, r) {
|
|
1270
|
+
let n = a.points;
|
|
1271
|
+
L.debug("abc88 InsertEdge: edge=", a, "e=", t);
|
|
1265
1272
|
let c = false;
|
|
1266
|
-
const u =
|
|
1267
|
-
var
|
|
1268
|
-
(
|
|
1269
|
-
const x =
|
|
1273
|
+
const u = s.node(t.v);
|
|
1274
|
+
var o = s.node(t.w);
|
|
1275
|
+
(o == null ? void 0 : o.intersect) && (u == null ? void 0 : u.intersect) && (n = n.slice(1, a.points.length - 1), n.unshift(u.intersect(n[0])), n.push(o.intersect(n[n.length - 1]))), a.toCluster && (L.debug("to cluster abc88", i[a.toCluster]), n = Rt(a.points, i[a.toCluster].node), c = true), a.fromCluster && (L.debug("from cluster abc88", i[a.fromCluster]), n = Rt(n.reverse(), i[a.fromCluster].node).reverse(), c = true);
|
|
1276
|
+
const x = n.filter((y) => !Number.isNaN(y.y));
|
|
1270
1277
|
let w = ke;
|
|
1271
|
-
|
|
1272
|
-
const { x: b, y: S } = ue(
|
|
1278
|
+
a.curve && (l === "graph" || l === "flowchart") && (w = a.curve);
|
|
1279
|
+
const { x: b, y: S } = ue(a), v = Se().x(b).y(S).curve(w);
|
|
1273
1280
|
let k;
|
|
1274
|
-
switch (
|
|
1281
|
+
switch (a.thickness) {
|
|
1275
1282
|
case "normal":
|
|
1276
1283
|
k = "edge-thickness-normal";
|
|
1277
1284
|
break;
|
|
@@ -1284,7 +1291,7 @@ var or = /* @__PURE__ */ d((e, t) => {
|
|
|
1284
1291
|
default:
|
|
1285
1292
|
k = "";
|
|
1286
1293
|
}
|
|
1287
|
-
switch (
|
|
1294
|
+
switch (a.pattern) {
|
|
1288
1295
|
case "solid":
|
|
1289
1296
|
k += " edge-pattern-solid";
|
|
1290
1297
|
break;
|
|
@@ -1295,15 +1302,15 @@ var or = /* @__PURE__ */ d((e, t) => {
|
|
|
1295
1302
|
k += " edge-pattern-dashed";
|
|
1296
1303
|
break;
|
|
1297
1304
|
}
|
|
1298
|
-
const B = e.append("path").attr("d",
|
|
1305
|
+
const B = e.append("path").attr("d", v(x)).attr("id", a.id).attr("class", " " + k + (a.classes ? " " + a.classes : "")).attr("style", a.style);
|
|
1299
1306
|
let _ = "";
|
|
1300
|
-
(R().flowchart.arrowMarkerAbsolute || R().state.arrowMarkerAbsolute) && (_ = pe(true)), nr(B,
|
|
1307
|
+
(R().flowchart.arrowMarkerAbsolute || R().state.arrowMarkerAbsolute) && (_ = pe(true)), nr(B, a, _, r, l);
|
|
1301
1308
|
let D = {};
|
|
1302
|
-
return c && (D.updatedPath =
|
|
1309
|
+
return c && (D.updatedPath = n), D.originalPath = a.points, D;
|
|
1303
1310
|
}, "insertEdge"), ur = /* @__PURE__ */ d((e) => {
|
|
1304
1311
|
const t = /* @__PURE__ */ new Set();
|
|
1305
|
-
for (const
|
|
1306
|
-
switch (
|
|
1312
|
+
for (const a of e)
|
|
1313
|
+
switch (a) {
|
|
1307
1314
|
case "x":
|
|
1308
1315
|
t.add("right"), t.add("left");
|
|
1309
1316
|
break;
|
|
@@ -1311,141 +1318,141 @@ var or = /* @__PURE__ */ d((e, t) => {
|
|
|
1311
1318
|
t.add("up"), t.add("down");
|
|
1312
1319
|
break;
|
|
1313
1320
|
default:
|
|
1314
|
-
t.add(
|
|
1321
|
+
t.add(a);
|
|
1315
1322
|
break;
|
|
1316
1323
|
}
|
|
1317
1324
|
return t;
|
|
1318
|
-
}, "expandAndDeduplicateDirections"), pr = /* @__PURE__ */ d((e, t,
|
|
1319
|
-
const
|
|
1320
|
-
return
|
|
1325
|
+
}, "expandAndDeduplicateDirections"), pr = /* @__PURE__ */ d((e, t, a) => {
|
|
1326
|
+
const i = ur(e), l = 2, s = t.height + 2 * a.padding, r = s / l, n = t.width + 2 * r + a.padding, c = a.padding / 2;
|
|
1327
|
+
return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
|
|
1321
1328
|
// Bottom
|
|
1322
1329
|
{ x: 0, y: 0 },
|
|
1323
1330
|
{ x: r, y: 0 },
|
|
1324
|
-
{ x:
|
|
1325
|
-
{ x:
|
|
1326
|
-
{ x:
|
|
1331
|
+
{ x: n / 2, y: 2 * c },
|
|
1332
|
+
{ x: n - r, y: 0 },
|
|
1333
|
+
{ x: n, y: 0 },
|
|
1327
1334
|
// Right
|
|
1328
|
-
{ x:
|
|
1329
|
-
{ x:
|
|
1330
|
-
{ x:
|
|
1331
|
-
{ x:
|
|
1335
|
+
{ x: n, y: -s / 3 },
|
|
1336
|
+
{ x: n + 2 * c, y: -s / 2 },
|
|
1337
|
+
{ x: n, y: -2 * s / 3 },
|
|
1338
|
+
{ x: n, y: -s },
|
|
1332
1339
|
// Top
|
|
1333
|
-
{ x:
|
|
1334
|
-
{ x:
|
|
1335
|
-
{ x: r, y: -
|
|
1340
|
+
{ x: n - r, y: -s },
|
|
1341
|
+
{ x: n / 2, y: -s - 2 * c },
|
|
1342
|
+
{ x: r, y: -s },
|
|
1336
1343
|
// Left
|
|
1337
|
-
{ x: 0, y: -
|
|
1338
|
-
{ x: 0, y: -2 *
|
|
1339
|
-
{ x: -2 * c, y: -
|
|
1340
|
-
{ x: 0, y: -
|
|
1341
|
-
] :
|
|
1344
|
+
{ x: 0, y: -s },
|
|
1345
|
+
{ x: 0, y: -2 * s / 3 },
|
|
1346
|
+
{ x: -2 * c, y: -s / 2 },
|
|
1347
|
+
{ x: 0, y: -s / 3 }
|
|
1348
|
+
] : i.has("right") && i.has("left") && i.has("up") ? [
|
|
1342
1349
|
{ x: r, y: 0 },
|
|
1343
|
-
{ x:
|
|
1344
|
-
{ x:
|
|
1345
|
-
{ x:
|
|
1346
|
-
{ x: r, y: -
|
|
1347
|
-
{ x: 0, y: -
|
|
1348
|
-
] :
|
|
1350
|
+
{ x: n - r, y: 0 },
|
|
1351
|
+
{ x: n, y: -s / 2 },
|
|
1352
|
+
{ x: n - r, y: -s },
|
|
1353
|
+
{ x: r, y: -s },
|
|
1354
|
+
{ x: 0, y: -s / 2 }
|
|
1355
|
+
] : i.has("right") && i.has("left") && i.has("down") ? [
|
|
1349
1356
|
{ x: 0, y: 0 },
|
|
1350
|
-
{ x: r, y: -
|
|
1351
|
-
{ x:
|
|
1352
|
-
{ x:
|
|
1353
|
-
] :
|
|
1357
|
+
{ x: r, y: -s },
|
|
1358
|
+
{ x: n - r, y: -s },
|
|
1359
|
+
{ x: n, y: 0 }
|
|
1360
|
+
] : i.has("right") && i.has("up") && i.has("down") ? [
|
|
1354
1361
|
{ x: 0, y: 0 },
|
|
1355
|
-
{ x:
|
|
1356
|
-
{ x:
|
|
1357
|
-
{ x: 0, y: -
|
|
1358
|
-
] :
|
|
1359
|
-
{ x:
|
|
1362
|
+
{ x: n, y: -r },
|
|
1363
|
+
{ x: n, y: -s + r },
|
|
1364
|
+
{ x: 0, y: -s }
|
|
1365
|
+
] : i.has("left") && i.has("up") && i.has("down") ? [
|
|
1366
|
+
{ x: n, y: 0 },
|
|
1360
1367
|
{ x: 0, y: -r },
|
|
1361
|
-
{ x: 0, y: -
|
|
1362
|
-
{ x:
|
|
1363
|
-
] :
|
|
1368
|
+
{ x: 0, y: -s + r },
|
|
1369
|
+
{ x: n, y: -s }
|
|
1370
|
+
] : i.has("right") && i.has("left") ? [
|
|
1364
1371
|
{ x: r, y: 0 },
|
|
1365
1372
|
{ x: r, y: -c },
|
|
1366
|
-
{ x:
|
|
1367
|
-
{ x:
|
|
1368
|
-
{ x:
|
|
1369
|
-
{ x:
|
|
1370
|
-
{ x:
|
|
1371
|
-
{ x: r, y: -
|
|
1372
|
-
{ x: r, y: -
|
|
1373
|
-
{ x: 0, y: -
|
|
1374
|
-
] :
|
|
1373
|
+
{ x: n - r, y: -c },
|
|
1374
|
+
{ x: n - r, y: 0 },
|
|
1375
|
+
{ x: n, y: -s / 2 },
|
|
1376
|
+
{ x: n - r, y: -s },
|
|
1377
|
+
{ x: n - r, y: -s + c },
|
|
1378
|
+
{ x: r, y: -s + c },
|
|
1379
|
+
{ x: r, y: -s },
|
|
1380
|
+
{ x: 0, y: -s / 2 }
|
|
1381
|
+
] : i.has("up") && i.has("down") ? [
|
|
1375
1382
|
// Bottom center
|
|
1376
|
-
{ x:
|
|
1383
|
+
{ x: n / 2, y: 0 },
|
|
1377
1384
|
// Left pont of bottom arrow
|
|
1378
1385
|
{ x: 0, y: -c },
|
|
1379
1386
|
{ x: r, y: -c },
|
|
1380
1387
|
// Left top over vertical section
|
|
1381
|
-
{ x: r, y: -
|
|
1382
|
-
{ x: 0, y: -
|
|
1388
|
+
{ x: r, y: -s + c },
|
|
1389
|
+
{ x: 0, y: -s + c },
|
|
1383
1390
|
// Top of arrow
|
|
1384
|
-
{ x:
|
|
1385
|
-
{ x:
|
|
1391
|
+
{ x: n / 2, y: -s },
|
|
1392
|
+
{ x: n, y: -s + c },
|
|
1386
1393
|
// Top of right vertical bar
|
|
1387
|
-
{ x:
|
|
1388
|
-
{ x:
|
|
1389
|
-
{ x:
|
|
1390
|
-
] :
|
|
1394
|
+
{ x: n - r, y: -s + c },
|
|
1395
|
+
{ x: n - r, y: -c },
|
|
1396
|
+
{ x: n, y: -c }
|
|
1397
|
+
] : i.has("right") && i.has("up") ? [
|
|
1391
1398
|
{ x: 0, y: 0 },
|
|
1392
|
-
{ x:
|
|
1393
|
-
{ x: 0, y: -
|
|
1394
|
-
] :
|
|
1399
|
+
{ x: n, y: -r },
|
|
1400
|
+
{ x: 0, y: -s }
|
|
1401
|
+
] : i.has("right") && i.has("down") ? [
|
|
1395
1402
|
{ x: 0, y: 0 },
|
|
1396
|
-
{ x:
|
|
1397
|
-
{ x: 0, y: -
|
|
1398
|
-
] :
|
|
1399
|
-
{ x:
|
|
1403
|
+
{ x: n, y: 0 },
|
|
1404
|
+
{ x: 0, y: -s }
|
|
1405
|
+
] : i.has("left") && i.has("up") ? [
|
|
1406
|
+
{ x: n, y: 0 },
|
|
1400
1407
|
{ x: 0, y: -r },
|
|
1401
|
-
{ x:
|
|
1402
|
-
] :
|
|
1403
|
-
{ x:
|
|
1408
|
+
{ x: n, y: -s }
|
|
1409
|
+
] : i.has("left") && i.has("down") ? [
|
|
1410
|
+
{ x: n, y: 0 },
|
|
1404
1411
|
{ x: 0, y: 0 },
|
|
1405
|
-
{ x:
|
|
1406
|
-
] :
|
|
1412
|
+
{ x: n, y: -s }
|
|
1413
|
+
] : i.has("right") ? [
|
|
1407
1414
|
{ x: r, y: -c },
|
|
1408
1415
|
{ x: r, y: -c },
|
|
1409
|
-
{ x:
|
|
1410
|
-
{ x:
|
|
1411
|
-
{ x:
|
|
1412
|
-
{ x:
|
|
1413
|
-
{ x:
|
|
1416
|
+
{ x: n - r, y: -c },
|
|
1417
|
+
{ x: n - r, y: 0 },
|
|
1418
|
+
{ x: n, y: -s / 2 },
|
|
1419
|
+
{ x: n - r, y: -s },
|
|
1420
|
+
{ x: n - r, y: -s + c },
|
|
1414
1421
|
// top left corner of arrow
|
|
1415
|
-
{ x: r, y: -
|
|
1416
|
-
{ x: r, y: -
|
|
1417
|
-
] :
|
|
1422
|
+
{ x: r, y: -s + c },
|
|
1423
|
+
{ x: r, y: -s + c }
|
|
1424
|
+
] : i.has("left") ? [
|
|
1418
1425
|
{ x: r, y: 0 },
|
|
1419
1426
|
{ x: r, y: -c },
|
|
1420
1427
|
// Two points, the right corners
|
|
1421
|
-
{ x:
|
|
1422
|
-
{ x:
|
|
1423
|
-
{ x: r, y: -
|
|
1424
|
-
{ x: r, y: -
|
|
1425
|
-
{ x: 0, y: -
|
|
1426
|
-
] :
|
|
1428
|
+
{ x: n - r, y: -c },
|
|
1429
|
+
{ x: n - r, y: -s + c },
|
|
1430
|
+
{ x: r, y: -s + c },
|
|
1431
|
+
{ x: r, y: -s },
|
|
1432
|
+
{ x: 0, y: -s / 2 }
|
|
1433
|
+
] : i.has("up") ? [
|
|
1427
1434
|
// Bottom center
|
|
1428
1435
|
{ x: r, y: -c },
|
|
1429
1436
|
// Left top over vertical section
|
|
1430
|
-
{ x: r, y: -
|
|
1431
|
-
{ x: 0, y: -
|
|
1437
|
+
{ x: r, y: -s + c },
|
|
1438
|
+
{ x: 0, y: -s + c },
|
|
1432
1439
|
// Top of arrow
|
|
1433
|
-
{ x:
|
|
1434
|
-
{ x:
|
|
1440
|
+
{ x: n / 2, y: -s },
|
|
1441
|
+
{ x: n, y: -s + c },
|
|
1435
1442
|
// Top of right vertical bar
|
|
1436
|
-
{ x:
|
|
1437
|
-
{ x:
|
|
1438
|
-
] :
|
|
1443
|
+
{ x: n - r, y: -s + c },
|
|
1444
|
+
{ x: n - r, y: -c }
|
|
1445
|
+
] : i.has("down") ? [
|
|
1439
1446
|
// Bottom center
|
|
1440
|
-
{ x:
|
|
1447
|
+
{ x: n / 2, y: 0 },
|
|
1441
1448
|
// Left pont of bottom arrow
|
|
1442
1449
|
{ x: 0, y: -c },
|
|
1443
1450
|
{ x: r, y: -c },
|
|
1444
1451
|
// Left top over vertical section
|
|
1445
|
-
{ x: r, y: -
|
|
1446
|
-
{ x:
|
|
1447
|
-
{ x:
|
|
1448
|
-
{ x:
|
|
1452
|
+
{ x: r, y: -s + c },
|
|
1453
|
+
{ x: n - r, y: -s + c },
|
|
1454
|
+
{ x: n - r, y: -c },
|
|
1455
|
+
{ x: n, y: -c }
|
|
1449
1456
|
] : [{ x: 0, y: 0 }];
|
|
1450
1457
|
}, "getArrowPoints");
|
|
1451
1458
|
function Gt(e, t) {
|
|
@@ -1453,90 +1460,90 @@ function Gt(e, t) {
|
|
|
1453
1460
|
}
|
|
1454
1461
|
d(Gt, "intersectNode");
|
|
1455
1462
|
var fr = Gt;
|
|
1456
|
-
function Zt(e, t,
|
|
1457
|
-
var
|
|
1458
|
-
|
|
1459
|
-
var
|
|
1460
|
-
return
|
|
1463
|
+
function Zt(e, t, a, i) {
|
|
1464
|
+
var l = e.x, s = e.y, r = l - i.x, n = s - i.y, c = Math.sqrt(t * t * n * n + a * a * r * r), u = Math.abs(t * a * r / c);
|
|
1465
|
+
i.x < l && (u = -u);
|
|
1466
|
+
var o = Math.abs(t * a * n / c);
|
|
1467
|
+
return i.y < s && (o = -o), { x: l + u, y: s + o };
|
|
1461
1468
|
}
|
|
1462
1469
|
d(Zt, "intersectEllipse");
|
|
1463
1470
|
var qt = Zt;
|
|
1464
|
-
function Jt(e, t,
|
|
1465
|
-
return qt(e, t, t,
|
|
1471
|
+
function Jt(e, t, a) {
|
|
1472
|
+
return qt(e, t, t, a);
|
|
1466
1473
|
}
|
|
1467
1474
|
d(Jt, "intersectCircle");
|
|
1468
1475
|
var xr = Jt;
|
|
1469
|
-
function Qt(e, t,
|
|
1470
|
-
var
|
|
1471
|
-
if (
|
|
1472
|
-
return
|
|
1476
|
+
function Qt(e, t, a, i) {
|
|
1477
|
+
var l, s, r, n, c, u, o, x, w, b, S, v, k, B, _;
|
|
1478
|
+
if (l = t.y - e.y, r = e.x - t.x, c = t.x * e.y - e.x * t.y, w = l * a.x + r * a.y + c, b = l * i.x + r * i.y + c, !(w !== 0 && b !== 0 && St(w, b)) && (s = i.y - a.y, n = a.x - i.x, u = i.x * a.y - a.x * i.y, o = s * e.x + n * e.y + u, x = s * t.x + n * t.y + u, !(o !== 0 && x !== 0 && St(o, x)) && (S = l * n - s * r, S !== 0)))
|
|
1479
|
+
return v = Math.abs(S / 2), k = r * u - n * c, B = k < 0 ? (k - v) / S : (k + v) / S, k = s * c - l * u, _ = k < 0 ? (k - v) / S : (k + v) / S, { x: B, y: _ };
|
|
1473
1480
|
}
|
|
1474
1481
|
d(Qt, "intersectLine");
|
|
1475
|
-
function
|
|
1482
|
+
function St(e, t) {
|
|
1476
1483
|
return e * t > 0;
|
|
1477
1484
|
}
|
|
1478
|
-
d(
|
|
1485
|
+
d(St, "sameSign");
|
|
1479
1486
|
var yr = Qt, br = $t;
|
|
1480
|
-
function $t(e, t,
|
|
1481
|
-
var
|
|
1487
|
+
function $t(e, t, a) {
|
|
1488
|
+
var i = e.x, l = e.y, s = [], r = Number.POSITIVE_INFINITY, n = Number.POSITIVE_INFINITY;
|
|
1482
1489
|
typeof t.forEach == "function" ? t.forEach(function(S) {
|
|
1483
|
-
r = Math.min(r, S.x),
|
|
1484
|
-
}) : (r = Math.min(r, t.x),
|
|
1485
|
-
for (var c =
|
|
1486
|
-
var x = t[
|
|
1490
|
+
r = Math.min(r, S.x), n = Math.min(n, S.y);
|
|
1491
|
+
}) : (r = Math.min(r, t.x), n = Math.min(n, t.y));
|
|
1492
|
+
for (var c = i - e.width / 2 - r, u = l - e.height / 2 - n, o = 0; o < t.length; o++) {
|
|
1493
|
+
var x = t[o], w = t[o < t.length - 1 ? o + 1 : 0], b = yr(
|
|
1487
1494
|
e,
|
|
1488
|
-
|
|
1495
|
+
a,
|
|
1489
1496
|
{ x: c + x.x, y: u + x.y },
|
|
1490
1497
|
{ x: c + w.x, y: u + w.y }
|
|
1491
1498
|
);
|
|
1492
|
-
b &&
|
|
1499
|
+
b && s.push(b);
|
|
1493
1500
|
}
|
|
1494
|
-
return
|
|
1495
|
-
var k = S.x -
|
|
1501
|
+
return s.length ? (s.length > 1 && s.sort(function(S, v) {
|
|
1502
|
+
var k = S.x - a.x, B = S.y - a.y, _ = Math.sqrt(k * k + B * B), D = v.x - a.x, y = v.y - a.y, g = Math.sqrt(D * D + y * y);
|
|
1496
1503
|
return _ < g ? -1 : _ === g ? 0 : 1;
|
|
1497
|
-
}),
|
|
1504
|
+
}), s[0]) : e;
|
|
1498
1505
|
}
|
|
1499
1506
|
d($t, "intersectPolygon");
|
|
1500
1507
|
var wr = /* @__PURE__ */ d((e, t) => {
|
|
1501
|
-
var
|
|
1502
|
-
return Math.abs(
|
|
1508
|
+
var a = e.x, i = e.y, l = t.x - a, s = t.y - i, r = e.width / 2, n = e.height / 2, c, u;
|
|
1509
|
+
return Math.abs(s) * r > Math.abs(l) * n ? (s < 0 && (n = -n), c = s === 0 ? 0 : n * l / s, u = n) : (l < 0 && (r = -r), c = r, u = l === 0 ? 0 : r * s / l), { x: a + c, y: i + u };
|
|
1503
1510
|
}, "intersectRect"), mr = wr, N = {
|
|
1504
1511
|
node: fr,
|
|
1505
1512
|
circle: xr,
|
|
1506
1513
|
ellipse: qt,
|
|
1507
1514
|
polygon: br,
|
|
1508
1515
|
rect: mr
|
|
1509
|
-
}, A = /* @__PURE__ */ d(async (e, t,
|
|
1510
|
-
const
|
|
1511
|
-
let
|
|
1512
|
-
const r = t.useHtmlLabels || j(
|
|
1513
|
-
|
|
1514
|
-
const
|
|
1516
|
+
}, A = /* @__PURE__ */ d(async (e, t, a, i) => {
|
|
1517
|
+
const l = R();
|
|
1518
|
+
let s;
|
|
1519
|
+
const r = t.useHtmlLabels || j(l.flowchart.htmlLabels);
|
|
1520
|
+
a ? s = a : s = "node default";
|
|
1521
|
+
const n = e.insert("g").attr("class", s).attr("id", t.domId || t.id), c = n.insert("g").attr("class", "label").attr("style", t.labelStyle);
|
|
1515
1522
|
let u;
|
|
1516
1523
|
t.labelText === void 0 ? u = "" : u = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
|
|
1517
|
-
const
|
|
1524
|
+
const o = c.node();
|
|
1518
1525
|
let x;
|
|
1519
1526
|
t.labelType === "markdown" ? x = Wt(
|
|
1520
1527
|
c,
|
|
1521
|
-
|
|
1528
|
+
yt(xt(u), l),
|
|
1522
1529
|
{
|
|
1523
1530
|
useHtmlLabels: r,
|
|
1524
|
-
width: t.width ||
|
|
1531
|
+
width: t.width || l.flowchart.wrappingWidth,
|
|
1525
1532
|
classes: "markdown-node-label"
|
|
1526
1533
|
},
|
|
1527
|
-
|
|
1528
|
-
) : x =
|
|
1534
|
+
l
|
|
1535
|
+
) : x = o.appendChild(
|
|
1529
1536
|
await K(
|
|
1530
|
-
|
|
1537
|
+
yt(xt(u), l),
|
|
1531
1538
|
t.labelStyle,
|
|
1532
1539
|
false,
|
|
1533
|
-
|
|
1540
|
+
i
|
|
1534
1541
|
)
|
|
1535
1542
|
);
|
|
1536
1543
|
let w = x.getBBox();
|
|
1537
1544
|
const b = t.padding / 2;
|
|
1538
|
-
if (j(
|
|
1539
|
-
const S = x.children[0],
|
|
1545
|
+
if (j(l.flowchart.htmlLabels)) {
|
|
1546
|
+
const S = x.children[0], v = O(x), k = S.getElementsByTagName("img");
|
|
1540
1547
|
if (k) {
|
|
1541
1548
|
const B = u.replace(/<img[^>]*>/g, "").trim() === "";
|
|
1542
1549
|
await Promise.all(
|
|
@@ -1544,7 +1551,7 @@ var wr = /* @__PURE__ */ d((e, t) => {
|
|
|
1544
1551
|
(_) => new Promise((D) => {
|
|
1545
1552
|
function y() {
|
|
1546
1553
|
if (_.style.display = "flex", _.style.flexDirection = "column", B) {
|
|
1547
|
-
const g =
|
|
1554
|
+
const g = l.fontSize ? l.fontSize : window.getComputedStyle(document.body).fontSize, m = parseInt(g, 10) * 5 + "px";
|
|
1548
1555
|
_.style.minWidth = m, _.style.maxWidth = m;
|
|
1549
1556
|
} else
|
|
1550
1557
|
_.style.width = "100%";
|
|
@@ -1557,262 +1564,262 @@ var wr = /* @__PURE__ */ d((e, t) => {
|
|
|
1557
1564
|
)
|
|
1558
1565
|
);
|
|
1559
1566
|
}
|
|
1560
|
-
w = S.getBoundingClientRect(),
|
|
1567
|
+
w = S.getBoundingClientRect(), v.attr("width", w.width), v.attr("height", w.height);
|
|
1561
1568
|
}
|
|
1562
|
-
return r ? c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")") : c.attr("transform", "translate(0, " + -w.height / 2 + ")"), t.centerLabel && c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), c.insert("rect", ":first-child"), { shapeSvg:
|
|
1569
|
+
return r ? c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")") : c.attr("transform", "translate(0, " + -w.height / 2 + ")"), t.centerLabel && c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), c.insert("rect", ":first-child"), { shapeSvg: n, bbox: w, halfPadding: b, label: c };
|
|
1563
1570
|
}, "labelHelper"), T = /* @__PURE__ */ d((e, t) => {
|
|
1564
|
-
const
|
|
1565
|
-
e.width =
|
|
1571
|
+
const a = t.node().getBBox();
|
|
1572
|
+
e.width = a.width, e.height = a.height;
|
|
1566
1573
|
}, "updateNodeBounds");
|
|
1567
|
-
function U(e, t,
|
|
1574
|
+
function U(e, t, a, i) {
|
|
1568
1575
|
return e.insert("polygon", ":first-child").attr(
|
|
1569
1576
|
"points",
|
|
1570
|
-
|
|
1571
|
-
return
|
|
1577
|
+
i.map(function(l) {
|
|
1578
|
+
return l.x + "," + l.y;
|
|
1572
1579
|
}).join(" ")
|
|
1573
|
-
).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," +
|
|
1580
|
+
).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + a / 2 + ")");
|
|
1574
1581
|
}
|
|
1575
1582
|
d(U, "insertPolygonShape");
|
|
1576
1583
|
var Lr = /* @__PURE__ */ d(async (e, t) => {
|
|
1577
1584
|
t.useHtmlLabels || R().flowchart.htmlLabels || (t.centerLabel = true);
|
|
1578
|
-
const { shapeSvg:
|
|
1585
|
+
const { shapeSvg: i, bbox: l, halfPadding: s } = await A(
|
|
1579
1586
|
e,
|
|
1580
1587
|
t,
|
|
1581
1588
|
"node " + t.classes,
|
|
1582
1589
|
true
|
|
1583
1590
|
);
|
|
1584
1591
|
L.info("Classes = ", t.classes);
|
|
1585
|
-
const r =
|
|
1586
|
-
return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -
|
|
1587
|
-
return N.rect(t,
|
|
1588
|
-
},
|
|
1592
|
+
const r = i.insert("rect", ":first-child");
|
|
1593
|
+
return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -l.width / 2 - s).attr("y", -l.height / 2 - s).attr("width", l.width + t.padding).attr("height", l.height + t.padding), T(t, r), t.intersect = function(n) {
|
|
1594
|
+
return N.rect(t, n);
|
|
1595
|
+
}, i;
|
|
1589
1596
|
}, "note"), Sr = Lr, zt = /* @__PURE__ */ d((e) => e ? " " + e : "", "formatClass"), Y = /* @__PURE__ */ d((e, t) => `${t || "node default"}${zt(e.classes)} ${zt(
|
|
1590
1597
|
e.class
|
|
1591
1598
|
)}`, "getClassesFromNode"), At = /* @__PURE__ */ d(async (e, t) => {
|
|
1592
|
-
const { shapeSvg:
|
|
1599
|
+
const { shapeSvg: a, bbox: i } = await A(
|
|
1593
1600
|
e,
|
|
1594
1601
|
t,
|
|
1595
1602
|
Y(t, void 0),
|
|
1596
1603
|
true
|
|
1597
|
-
),
|
|
1604
|
+
), l = i.width + t.padding, s = i.height + t.padding, r = l + s, n = [
|
|
1598
1605
|
{ x: r / 2, y: 0 },
|
|
1599
1606
|
{ x: r, y: -r / 2 },
|
|
1600
1607
|
{ x: r / 2, y: -r },
|
|
1601
1608
|
{ x: 0, y: -r / 2 }
|
|
1602
1609
|
];
|
|
1603
1610
|
L.info("Question main (Circle)");
|
|
1604
|
-
const c = U(
|
|
1611
|
+
const c = U(a, r, r, n);
|
|
1605
1612
|
return c.attr("style", t.style), T(t, c), t.intersect = function(u) {
|
|
1606
|
-
return L.warn("Intersect called"), N.polygon(t,
|
|
1607
|
-
},
|
|
1613
|
+
return L.warn("Intersect called"), N.polygon(t, n, u);
|
|
1614
|
+
}, a;
|
|
1608
1615
|
}, "question"), kr = /* @__PURE__ */ d((e, t) => {
|
|
1609
|
-
const
|
|
1610
|
-
{ x: 0, y:
|
|
1611
|
-
{ x:
|
|
1612
|
-
{ x: 0, y: -
|
|
1613
|
-
{ x: -
|
|
1616
|
+
const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 28, l = [
|
|
1617
|
+
{ x: 0, y: i / 2 },
|
|
1618
|
+
{ x: i / 2, y: 0 },
|
|
1619
|
+
{ x: 0, y: -i / 2 },
|
|
1620
|
+
{ x: -i / 2, y: 0 }
|
|
1614
1621
|
];
|
|
1615
|
-
return
|
|
1622
|
+
return a.insert("polygon", ":first-child").attr(
|
|
1616
1623
|
"points",
|
|
1617
|
-
|
|
1624
|
+
l.map(function(r) {
|
|
1618
1625
|
return r.x + "," + r.y;
|
|
1619
1626
|
}).join(" ")
|
|
1620
1627
|
).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(r) {
|
|
1621
1628
|
return N.circle(t, 14, r);
|
|
1622
|
-
},
|
|
1629
|
+
}, a;
|
|
1623
1630
|
}, "choice"), vr = /* @__PURE__ */ d(async (e, t) => {
|
|
1624
|
-
const { shapeSvg:
|
|
1631
|
+
const { shapeSvg: a, bbox: i } = await A(
|
|
1625
1632
|
e,
|
|
1626
1633
|
t,
|
|
1627
1634
|
Y(t, void 0),
|
|
1628
1635
|
true
|
|
1629
|
-
),
|
|
1636
|
+
), l = 4, s = i.height + t.padding, r = s / l, n = i.width + 2 * r + t.padding, c = [
|
|
1630
1637
|
{ x: r, y: 0 },
|
|
1631
|
-
{ x:
|
|
1632
|
-
{ x:
|
|
1633
|
-
{ x:
|
|
1634
|
-
{ x: r, y: -
|
|
1635
|
-
{ x: 0, y: -
|
|
1636
|
-
], u = U(
|
|
1637
|
-
return u.attr("style", t.style), T(t, u), t.intersect = function(
|
|
1638
|
-
return N.polygon(t, c,
|
|
1639
|
-
},
|
|
1638
|
+
{ x: n - r, y: 0 },
|
|
1639
|
+
{ x: n, y: -s / 2 },
|
|
1640
|
+
{ x: n - r, y: -s },
|
|
1641
|
+
{ x: r, y: -s },
|
|
1642
|
+
{ x: 0, y: -s / 2 }
|
|
1643
|
+
], u = U(a, n, s, c);
|
|
1644
|
+
return u.attr("style", t.style), T(t, u), t.intersect = function(o) {
|
|
1645
|
+
return N.polygon(t, c, o);
|
|
1646
|
+
}, a;
|
|
1640
1647
|
}, "hexagon"), Er = /* @__PURE__ */ d(async (e, t) => {
|
|
1641
|
-
const { shapeSvg:
|
|
1642
|
-
return u.attr("style", t.style), T(t, u), t.intersect = function(
|
|
1643
|
-
return N.polygon(t, c,
|
|
1644
|
-
},
|
|
1648
|
+
const { shapeSvg: a, bbox: i } = await A(e, t, void 0, true), l = 2, s = i.height + 2 * t.padding, r = s / l, n = i.width + 2 * r + t.padding, c = pr(t.directions, i, t), u = U(a, n, s, c);
|
|
1649
|
+
return u.attr("style", t.style), T(t, u), t.intersect = function(o) {
|
|
1650
|
+
return N.polygon(t, c, o);
|
|
1651
|
+
}, a;
|
|
1645
1652
|
}, "block_arrow"), _r = /* @__PURE__ */ d(async (e, t) => {
|
|
1646
|
-
const { shapeSvg:
|
|
1653
|
+
const { shapeSvg: a, bbox: i } = await A(
|
|
1647
1654
|
e,
|
|
1648
1655
|
t,
|
|
1649
1656
|
Y(t, void 0),
|
|
1650
1657
|
true
|
|
1651
|
-
),
|
|
1652
|
-
{ x: -
|
|
1653
|
-
{ x:
|
|
1654
|
-
{ x:
|
|
1655
|
-
{ x: -
|
|
1656
|
-
{ x: 0, y: -
|
|
1658
|
+
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1659
|
+
{ x: -s / 2, y: 0 },
|
|
1660
|
+
{ x: l, y: 0 },
|
|
1661
|
+
{ x: l, y: -s },
|
|
1662
|
+
{ x: -s / 2, y: -s },
|
|
1663
|
+
{ x: 0, y: -s / 2 }
|
|
1657
1664
|
];
|
|
1658
|
-
return U(
|
|
1665
|
+
return U(a, l, s, r).attr("style", t.style), t.width = l + s, t.height = s, t.intersect = function(c) {
|
|
1659
1666
|
return N.polygon(t, r, c);
|
|
1660
|
-
},
|
|
1667
|
+
}, a;
|
|
1661
1668
|
}, "rect_left_inv_arrow"), Dr = /* @__PURE__ */ d(async (e, t) => {
|
|
1662
|
-
const { shapeSvg:
|
|
1663
|
-
{ x: -2 *
|
|
1664
|
-
{ x:
|
|
1665
|
-
{ x:
|
|
1666
|
-
{ x:
|
|
1667
|
-
],
|
|
1668
|
-
return
|
|
1669
|
+
const { shapeSvg: a, bbox: i } = await A(e, t, Y(t), true), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1670
|
+
{ x: -2 * s / 6, y: 0 },
|
|
1671
|
+
{ x: l - s / 6, y: 0 },
|
|
1672
|
+
{ x: l + 2 * s / 6, y: -s },
|
|
1673
|
+
{ x: s / 6, y: -s }
|
|
1674
|
+
], n = U(a, l, s, r);
|
|
1675
|
+
return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
|
|
1669
1676
|
return N.polygon(t, r, c);
|
|
1670
|
-
},
|
|
1677
|
+
}, a;
|
|
1671
1678
|
}, "lean_right"), Nr = /* @__PURE__ */ d(async (e, t) => {
|
|
1672
|
-
const { shapeSvg:
|
|
1679
|
+
const { shapeSvg: a, bbox: i } = await A(
|
|
1673
1680
|
e,
|
|
1674
1681
|
t,
|
|
1675
1682
|
Y(t, void 0),
|
|
1676
1683
|
true
|
|
1677
|
-
),
|
|
1678
|
-
{ x: 2 *
|
|
1679
|
-
{ x:
|
|
1680
|
-
{ x:
|
|
1681
|
-
{ x: -
|
|
1682
|
-
],
|
|
1683
|
-
return
|
|
1684
|
+
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1685
|
+
{ x: 2 * s / 6, y: 0 },
|
|
1686
|
+
{ x: l + s / 6, y: 0 },
|
|
1687
|
+
{ x: l - 2 * s / 6, y: -s },
|
|
1688
|
+
{ x: -s / 6, y: -s }
|
|
1689
|
+
], n = U(a, l, s, r);
|
|
1690
|
+
return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
|
|
1684
1691
|
return N.polygon(t, r, c);
|
|
1685
|
-
},
|
|
1692
|
+
}, a;
|
|
1686
1693
|
}, "lean_left"), Tr = /* @__PURE__ */ d(async (e, t) => {
|
|
1687
|
-
const { shapeSvg:
|
|
1694
|
+
const { shapeSvg: a, bbox: i } = await A(
|
|
1688
1695
|
e,
|
|
1689
1696
|
t,
|
|
1690
1697
|
Y(t, void 0),
|
|
1691
1698
|
true
|
|
1692
|
-
),
|
|
1693
|
-
{ x: -2 *
|
|
1694
|
-
{ x:
|
|
1695
|
-
{ x:
|
|
1696
|
-
{ x:
|
|
1697
|
-
],
|
|
1698
|
-
return
|
|
1699
|
+
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1700
|
+
{ x: -2 * s / 6, y: 0 },
|
|
1701
|
+
{ x: l + 2 * s / 6, y: 0 },
|
|
1702
|
+
{ x: l - s / 6, y: -s },
|
|
1703
|
+
{ x: s / 6, y: -s }
|
|
1704
|
+
], n = U(a, l, s, r);
|
|
1705
|
+
return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
|
|
1699
1706
|
return N.polygon(t, r, c);
|
|
1700
|
-
},
|
|
1707
|
+
}, a;
|
|
1701
1708
|
}, "trapezoid"), Br = /* @__PURE__ */ d(async (e, t) => {
|
|
1702
|
-
const { shapeSvg:
|
|
1709
|
+
const { shapeSvg: a, bbox: i } = await A(
|
|
1703
1710
|
e,
|
|
1704
1711
|
t,
|
|
1705
1712
|
Y(t, void 0),
|
|
1706
1713
|
true
|
|
1707
|
-
),
|
|
1708
|
-
{ x:
|
|
1709
|
-
{ x:
|
|
1710
|
-
{ x:
|
|
1711
|
-
{ x: -2 *
|
|
1712
|
-
],
|
|
1713
|
-
return
|
|
1714
|
+
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1715
|
+
{ x: s / 6, y: 0 },
|
|
1716
|
+
{ x: l - s / 6, y: 0 },
|
|
1717
|
+
{ x: l + 2 * s / 6, y: -s },
|
|
1718
|
+
{ x: -2 * s / 6, y: -s }
|
|
1719
|
+
], n = U(a, l, s, r);
|
|
1720
|
+
return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
|
|
1714
1721
|
return N.polygon(t, r, c);
|
|
1715
|
-
},
|
|
1722
|
+
}, a;
|
|
1716
1723
|
}, "inv_trapezoid"), Cr = /* @__PURE__ */ d(async (e, t) => {
|
|
1717
|
-
const { shapeSvg:
|
|
1724
|
+
const { shapeSvg: a, bbox: i } = await A(
|
|
1718
1725
|
e,
|
|
1719
1726
|
t,
|
|
1720
1727
|
Y(t, void 0),
|
|
1721
1728
|
true
|
|
1722
|
-
),
|
|
1729
|
+
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1723
1730
|
{ x: 0, y: 0 },
|
|
1724
|
-
{ x:
|
|
1725
|
-
{ x:
|
|
1726
|
-
{ x:
|
|
1727
|
-
{ x: 0, y: -
|
|
1728
|
-
],
|
|
1729
|
-
return
|
|
1731
|
+
{ x: l + s / 2, y: 0 },
|
|
1732
|
+
{ x: l, y: -s / 2 },
|
|
1733
|
+
{ x: l + s / 2, y: -s },
|
|
1734
|
+
{ x: 0, y: -s }
|
|
1735
|
+
], n = U(a, l, s, r);
|
|
1736
|
+
return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
|
|
1730
1737
|
return N.polygon(t, r, c);
|
|
1731
|
-
},
|
|
1738
|
+
}, a;
|
|
1732
1739
|
}, "rect_right_inv_arrow"), Ir = /* @__PURE__ */ d(async (e, t) => {
|
|
1733
|
-
const { shapeSvg:
|
|
1740
|
+
const { shapeSvg: a, bbox: i } = await A(
|
|
1734
1741
|
e,
|
|
1735
1742
|
t,
|
|
1736
1743
|
Y(t, void 0),
|
|
1737
1744
|
true
|
|
1738
|
-
),
|
|
1739
|
-
return T(t, u), t.intersect = function(
|
|
1740
|
-
const x = N.rect(t,
|
|
1741
|
-
if (
|
|
1742
|
-
let b = r * r * (1 - w * w / (
|
|
1743
|
-
b != 0 && (b = Math.sqrt(b)), b = r - b,
|
|
1745
|
+
), l = i.width + t.padding, s = l / 2, r = s / (2.5 + l / 50), n = i.height + r + t.padding, c = "M 0," + r + " a " + s + "," + r + " 0,0,0 " + l + " 0 a " + s + "," + r + " 0,0,0 " + -l + " 0 l 0," + n + " a " + s + "," + r + " 0,0,0 " + l + " 0 l 0," + -n, u = a.attr("label-offset-y", r).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -l / 2 + "," + -(n / 2 + r) + ")");
|
|
1746
|
+
return T(t, u), t.intersect = function(o) {
|
|
1747
|
+
const x = N.rect(t, o), w = x.x - t.x;
|
|
1748
|
+
if (s != 0 && (Math.abs(w) < t.width / 2 || Math.abs(w) == t.width / 2 && Math.abs(x.y - t.y) > t.height / 2 - r)) {
|
|
1749
|
+
let b = r * r * (1 - w * w / (s * s));
|
|
1750
|
+
b != 0 && (b = Math.sqrt(b)), b = r - b, o.y - t.y > 0 && (b = -b), x.y += b;
|
|
1744
1751
|
}
|
|
1745
1752
|
return x;
|
|
1746
|
-
},
|
|
1753
|
+
}, a;
|
|
1747
1754
|
}, "cylinder"), Or = /* @__PURE__ */ d(async (e, t) => {
|
|
1748
|
-
const { shapeSvg:
|
|
1755
|
+
const { shapeSvg: a, bbox: i, halfPadding: l } = await A(
|
|
1749
1756
|
e,
|
|
1750
1757
|
t,
|
|
1751
1758
|
"node " + t.classes + " " + t.class,
|
|
1752
1759
|
true
|
|
1753
|
-
),
|
|
1754
|
-
if (
|
|
1755
|
-
const
|
|
1756
|
-
t.props.borders && (ht(
|
|
1760
|
+
), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, c = t.positioned ? -r / 2 : -i.width / 2 - l, u = t.positioned ? -n / 2 : -i.height / 2 - l;
|
|
1761
|
+
if (s.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", r).attr("height", n), t.props) {
|
|
1762
|
+
const o = new Set(Object.keys(t.props));
|
|
1763
|
+
t.props.borders && (ht(s, t.props.borders, r, n), o.delete("borders")), o.forEach((x) => {
|
|
1757
1764
|
L.warn(`Unknown node property ${x}`);
|
|
1758
1765
|
});
|
|
1759
1766
|
}
|
|
1760
|
-
return T(t,
|
|
1761
|
-
return N.rect(t,
|
|
1762
|
-
},
|
|
1767
|
+
return T(t, s), t.intersect = function(o) {
|
|
1768
|
+
return N.rect(t, o);
|
|
1769
|
+
}, a;
|
|
1763
1770
|
}, "rect"), Rr = /* @__PURE__ */ d(async (e, t) => {
|
|
1764
|
-
const { shapeSvg:
|
|
1771
|
+
const { shapeSvg: a, bbox: i, halfPadding: l } = await A(
|
|
1765
1772
|
e,
|
|
1766
1773
|
t,
|
|
1767
1774
|
"node " + t.classes,
|
|
1768
1775
|
true
|
|
1769
|
-
),
|
|
1770
|
-
if (
|
|
1771
|
-
const
|
|
1772
|
-
t.props.borders && (ht(
|
|
1776
|
+
), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, c = t.positioned ? -r / 2 : -i.width / 2 - l, u = t.positioned ? -n / 2 : -i.height / 2 - l;
|
|
1777
|
+
if (s.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", r).attr("height", n), t.props) {
|
|
1778
|
+
const o = new Set(Object.keys(t.props));
|
|
1779
|
+
t.props.borders && (ht(s, t.props.borders, r, n), o.delete("borders")), o.forEach((x) => {
|
|
1773
1780
|
L.warn(`Unknown node property ${x}`);
|
|
1774
1781
|
});
|
|
1775
1782
|
}
|
|
1776
|
-
return T(t,
|
|
1777
|
-
return N.rect(t,
|
|
1778
|
-
},
|
|
1783
|
+
return T(t, s), t.intersect = function(o) {
|
|
1784
|
+
return N.rect(t, o);
|
|
1785
|
+
}, a;
|
|
1779
1786
|
}, "composite"), zr = /* @__PURE__ */ d(async (e, t) => {
|
|
1780
|
-
const { shapeSvg:
|
|
1787
|
+
const { shapeSvg: a } = await A(e, t, "label", true);
|
|
1781
1788
|
L.trace("Classes = ", t.class);
|
|
1782
|
-
const
|
|
1783
|
-
if (
|
|
1789
|
+
const i = a.insert("rect", ":first-child"), l = 0, s = 0;
|
|
1790
|
+
if (i.attr("width", l).attr("height", s), a.attr("class", "label edgeLabel"), t.props) {
|
|
1784
1791
|
const r = new Set(Object.keys(t.props));
|
|
1785
|
-
t.props.borders && (ht(
|
|
1786
|
-
L.warn(`Unknown node property ${
|
|
1792
|
+
t.props.borders && (ht(i, t.props.borders, l, s), r.delete("borders")), r.forEach((n) => {
|
|
1793
|
+
L.warn(`Unknown node property ${n}`);
|
|
1787
1794
|
});
|
|
1788
1795
|
}
|
|
1789
|
-
return T(t,
|
|
1796
|
+
return T(t, i), t.intersect = function(r) {
|
|
1790
1797
|
return N.rect(t, r);
|
|
1791
|
-
},
|
|
1798
|
+
}, a;
|
|
1792
1799
|
}, "labelRect");
|
|
1793
|
-
function ht(e, t,
|
|
1794
|
-
const
|
|
1795
|
-
|
|
1796
|
-
}, "addBorder"), r = /* @__PURE__ */ d((
|
|
1797
|
-
|
|
1800
|
+
function ht(e, t, a, i) {
|
|
1801
|
+
const l = [], s = /* @__PURE__ */ d((n) => {
|
|
1802
|
+
l.push(n, 0);
|
|
1803
|
+
}, "addBorder"), r = /* @__PURE__ */ d((n) => {
|
|
1804
|
+
l.push(0, n);
|
|
1798
1805
|
}, "skipBorder");
|
|
1799
|
-
t.includes("t") ? (L.debug("add top border"), a
|
|
1806
|
+
t.includes("t") ? (L.debug("add top border"), s(a)) : r(a), t.includes("r") ? (L.debug("add right border"), s(i)) : r(i), t.includes("b") ? (L.debug("add bottom border"), s(a)) : r(a), t.includes("l") ? (L.debug("add left border"), s(i)) : r(i), e.attr("stroke-dasharray", l.join(" "));
|
|
1800
1807
|
}
|
|
1801
1808
|
d(ht, "applyNodePropertyBorders");
|
|
1802
1809
|
var Ar = /* @__PURE__ */ d(async (e, t) => {
|
|
1803
|
-
let
|
|
1804
|
-
t.classes ?
|
|
1805
|
-
const
|
|
1810
|
+
let a;
|
|
1811
|
+
t.classes ? a = "node " + t.classes : a = "node default";
|
|
1812
|
+
const i = e.insert("g").attr("class", a).attr("id", t.domId || t.id), l = i.insert("rect", ":first-child"), s = i.insert("line"), r = i.insert("g").attr("class", "label"), n = t.labelText.flat ? t.labelText.flat() : t.labelText;
|
|
1806
1813
|
let c = "";
|
|
1807
|
-
typeof
|
|
1814
|
+
typeof n == "object" ? c = n[0] : c = n, L.info("Label text abc79", c, n, typeof n == "object");
|
|
1808
1815
|
const u = r.node().appendChild(await K(c, t.labelStyle, true, true));
|
|
1809
|
-
let
|
|
1816
|
+
let o = { width: 0, height: 0 };
|
|
1810
1817
|
if (j(R().flowchart.htmlLabels)) {
|
|
1811
|
-
const
|
|
1812
|
-
|
|
1818
|
+
const v = u.children[0], k = O(u);
|
|
1819
|
+
o = v.getBoundingClientRect(), k.attr("width", o.width), k.attr("height", o.height);
|
|
1813
1820
|
}
|
|
1814
|
-
L.info("Text 2",
|
|
1815
|
-
const x =
|
|
1821
|
+
L.info("Text 2", n);
|
|
1822
|
+
const x = n.slice(1, n.length);
|
|
1816
1823
|
let w = u.getBBox();
|
|
1817
1824
|
const b = r.node().appendChild(
|
|
1818
1825
|
await K(
|
|
@@ -1823,128 +1830,128 @@ var Ar = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1823
1830
|
)
|
|
1824
1831
|
);
|
|
1825
1832
|
if (j(R().flowchart.htmlLabels)) {
|
|
1826
|
-
const
|
|
1827
|
-
|
|
1833
|
+
const v = b.children[0], k = O(b);
|
|
1834
|
+
o = v.getBoundingClientRect(), k.attr("width", o.width), k.attr("height", o.height);
|
|
1828
1835
|
}
|
|
1829
1836
|
const S = t.padding / 2;
|
|
1830
1837
|
return O(b).attr(
|
|
1831
1838
|
"transform",
|
|
1832
1839
|
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
1833
|
-
(
|
|
1840
|
+
(o.width > w.width ? 0 : (w.width - o.width) / 2) + ", " + (w.height + S + 5) + ")"
|
|
1834
1841
|
), O(u).attr(
|
|
1835
1842
|
"transform",
|
|
1836
1843
|
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
1837
|
-
(
|
|
1838
|
-
),
|
|
1844
|
+
(o.width < w.width ? 0 : -(w.width - o.width) / 2) + ", 0)"
|
|
1845
|
+
), o = r.node().getBBox(), r.attr(
|
|
1839
1846
|
"transform",
|
|
1840
|
-
"translate(" + -
|
|
1841
|
-
),
|
|
1842
|
-
return N.rect(t,
|
|
1843
|
-
},
|
|
1847
|
+
"translate(" + -o.width / 2 + ", " + (-o.height / 2 - S + 3) + ")"
|
|
1848
|
+
), l.attr("class", "outer title-state").attr("x", -o.width / 2 - S).attr("y", -o.height / 2 - S).attr("width", o.width + t.padding).attr("height", o.height + t.padding), s.attr("class", "divider").attr("x1", -o.width / 2 - S).attr("x2", o.width / 2 + S).attr("y1", -o.height / 2 - S + w.height + S).attr("y2", -o.height / 2 - S + w.height + S), T(t, l), t.intersect = function(v) {
|
|
1849
|
+
return N.rect(t, v);
|
|
1850
|
+
}, i;
|
|
1844
1851
|
}, "rectWithTitle"), Mr = /* @__PURE__ */ d(async (e, t) => {
|
|
1845
|
-
const { shapeSvg:
|
|
1852
|
+
const { shapeSvg: a, bbox: i } = await A(
|
|
1846
1853
|
e,
|
|
1847
1854
|
t,
|
|
1848
1855
|
Y(t, void 0),
|
|
1849
1856
|
true
|
|
1850
|
-
),
|
|
1851
|
-
return T(t, r), t.intersect = function(
|
|
1852
|
-
return N.rect(t,
|
|
1853
|
-
},
|
|
1857
|
+
), l = i.height + t.padding, s = i.width + l / 4 + t.padding, r = a.insert("rect", ":first-child").attr("style", t.style).attr("rx", l / 2).attr("ry", l / 2).attr("x", -s / 2).attr("y", -l / 2).attr("width", s).attr("height", l);
|
|
1858
|
+
return T(t, r), t.intersect = function(n) {
|
|
1859
|
+
return N.rect(t, n);
|
|
1860
|
+
}, a;
|
|
1854
1861
|
}, "stadium"), Fr = /* @__PURE__ */ d(async (e, t) => {
|
|
1855
|
-
const { shapeSvg:
|
|
1862
|
+
const { shapeSvg: a, bbox: i, halfPadding: l } = await A(
|
|
1856
1863
|
e,
|
|
1857
1864
|
t,
|
|
1858
1865
|
Y(t, void 0),
|
|
1859
1866
|
true
|
|
1860
|
-
),
|
|
1861
|
-
return
|
|
1862
|
-
return L.info("Circle intersect", t,
|
|
1863
|
-
},
|
|
1867
|
+
), s = a.insert("circle", ":first-child");
|
|
1868
|
+
return s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), L.info("Circle main"), T(t, s), t.intersect = function(r) {
|
|
1869
|
+
return L.info("Circle intersect", t, i.width / 2 + l, r), N.circle(t, i.width / 2 + l, r);
|
|
1870
|
+
}, a;
|
|
1864
1871
|
}, "circle"), Wr = /* @__PURE__ */ d(async (e, t) => {
|
|
1865
|
-
const { shapeSvg:
|
|
1872
|
+
const { shapeSvg: a, bbox: i, halfPadding: l } = await A(
|
|
1866
1873
|
e,
|
|
1867
1874
|
t,
|
|
1868
1875
|
Y(t, void 0),
|
|
1869
1876
|
true
|
|
1870
|
-
),
|
|
1871
|
-
return r.attr("class", t.class),
|
|
1872
|
-
return L.info("DoubleCircle intersect", t,
|
|
1873
|
-
},
|
|
1877
|
+
), s = 5, r = a.insert("g", ":first-child"), n = r.insert("circle"), c = r.insert("circle");
|
|
1878
|
+
return r.attr("class", t.class), n.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l + s).attr("width", i.width + t.padding + s * 2).attr("height", i.height + t.padding + s * 2), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), L.info("DoubleCircle main"), T(t, n), t.intersect = function(u) {
|
|
1879
|
+
return L.info("DoubleCircle intersect", t, i.width / 2 + l + s, u), N.circle(t, i.width / 2 + l + s, u);
|
|
1880
|
+
}, a;
|
|
1874
1881
|
}, "doublecircle"), Pr = /* @__PURE__ */ d(async (e, t) => {
|
|
1875
|
-
const { shapeSvg:
|
|
1882
|
+
const { shapeSvg: a, bbox: i } = await A(
|
|
1876
1883
|
e,
|
|
1877
1884
|
t,
|
|
1878
1885
|
Y(t, void 0),
|
|
1879
1886
|
true
|
|
1880
|
-
),
|
|
1887
|
+
), l = i.width + t.padding, s = i.height + t.padding, r = [
|
|
1881
1888
|
{ x: 0, y: 0 },
|
|
1882
|
-
{ x:
|
|
1883
|
-
{ x:
|
|
1884
|
-
{ x: 0, y: -
|
|
1889
|
+
{ x: l, y: 0 },
|
|
1890
|
+
{ x: l, y: -s },
|
|
1891
|
+
{ x: 0, y: -s },
|
|
1885
1892
|
{ x: 0, y: 0 },
|
|
1886
1893
|
{ x: -8, y: 0 },
|
|
1887
|
-
{ x:
|
|
1888
|
-
{ x:
|
|
1889
|
-
{ x: -8, y: -
|
|
1894
|
+
{ x: l + 8, y: 0 },
|
|
1895
|
+
{ x: l + 8, y: -s },
|
|
1896
|
+
{ x: -8, y: -s },
|
|
1890
1897
|
{ x: -8, y: 0 }
|
|
1891
|
-
],
|
|
1892
|
-
return
|
|
1898
|
+
], n = U(a, l, s, r);
|
|
1899
|
+
return n.attr("style", t.style), T(t, n), t.intersect = function(c) {
|
|
1893
1900
|
return N.polygon(t, r, c);
|
|
1894
|
-
},
|
|
1901
|
+
}, a;
|
|
1895
1902
|
}, "subroutine"), Yr = /* @__PURE__ */ d((e, t) => {
|
|
1896
|
-
const
|
|
1897
|
-
return
|
|
1898
|
-
return N.circle(t, 7,
|
|
1899
|
-
},
|
|
1900
|
-
}, "start"), Mt = /* @__PURE__ */ d((e, t,
|
|
1901
|
-
const
|
|
1902
|
-
let
|
|
1903
|
-
|
|
1904
|
-
const r =
|
|
1905
|
-
return T(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(
|
|
1906
|
-
return N.rect(t,
|
|
1907
|
-
},
|
|
1903
|
+
const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = a.insert("circle", ":first-child");
|
|
1904
|
+
return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), T(t, i), t.intersect = function(l) {
|
|
1905
|
+
return N.circle(t, 7, l);
|
|
1906
|
+
}, a;
|
|
1907
|
+
}, "start"), Mt = /* @__PURE__ */ d((e, t, a) => {
|
|
1908
|
+
const i = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
|
|
1909
|
+
let l = 70, s = 10;
|
|
1910
|
+
a === "LR" && (l = 10, s = 70);
|
|
1911
|
+
const r = i.append("rect").attr("x", -1 * l / 2).attr("y", -1 * s / 2).attr("width", l).attr("height", s).attr("class", "fork-join");
|
|
1912
|
+
return T(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(n) {
|
|
1913
|
+
return N.rect(t, n);
|
|
1914
|
+
}, i;
|
|
1908
1915
|
}, "forkJoin"), Hr = /* @__PURE__ */ d((e, t) => {
|
|
1909
|
-
const
|
|
1910
|
-
return
|
|
1911
|
-
return N.circle(t, 7,
|
|
1912
|
-
},
|
|
1916
|
+
const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = a.insert("circle", ":first-child"), l = a.insert("circle", ":first-child");
|
|
1917
|
+
return l.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), i.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), T(t, l), t.intersect = function(s) {
|
|
1918
|
+
return N.circle(t, 7, s);
|
|
1919
|
+
}, a;
|
|
1913
1920
|
}, "end"), Kr = /* @__PURE__ */ d(async (e, t) => {
|
|
1914
1921
|
var _a2;
|
|
1915
|
-
const
|
|
1916
|
-
let
|
|
1917
|
-
t.classes ?
|
|
1918
|
-
const r = e.insert("g").attr("class",
|
|
1919
|
-
let
|
|
1922
|
+
const a = t.padding / 2, i = 4, l = 8;
|
|
1923
|
+
let s;
|
|
1924
|
+
t.classes ? s = "node " + t.classes : s = "node default";
|
|
1925
|
+
const r = e.insert("g").attr("class", s).attr("id", t.domId || t.id), n = r.insert("rect", ":first-child"), c = r.insert("line"), u = r.insert("line");
|
|
1926
|
+
let o = 0, x = i;
|
|
1920
1927
|
const w = r.insert("g").attr("class", "label");
|
|
1921
1928
|
let b = 0;
|
|
1922
|
-
const S = (_a2 = t.classData.annotations) == null ? void 0 : _a2[0],
|
|
1929
|
+
const S = (_a2 = t.classData.annotations) == null ? void 0 : _a2[0], v = t.classData.annotations[0] ? "\xAB" + t.classData.annotations[0] + "\xBB" : "", k = w.node().appendChild(await K(v, t.labelStyle, true, true));
|
|
1923
1930
|
let B = k.getBBox();
|
|
1924
1931
|
if (j(R().flowchart.htmlLabels)) {
|
|
1925
|
-
const
|
|
1926
|
-
B =
|
|
1932
|
+
const E = k.children[0], h = O(k);
|
|
1933
|
+
B = E.getBoundingClientRect(), h.attr("width", B.width), h.attr("height", B.height);
|
|
1927
1934
|
}
|
|
1928
|
-
t.classData.annotations[0] && (x += B.height +
|
|
1935
|
+
t.classData.annotations[0] && (x += B.height + i, o += B.width);
|
|
1929
1936
|
let _ = t.classData.label;
|
|
1930
1937
|
t.classData.type !== void 0 && t.classData.type !== "" && (R().flowchart.htmlLabels ? _ += "<" + t.classData.type + ">" : _ += "<" + t.classData.type + ">");
|
|
1931
1938
|
const D = w.node().appendChild(await K(_, t.labelStyle, true, true));
|
|
1932
1939
|
O(D).attr("class", "classTitle");
|
|
1933
1940
|
let y = D.getBBox();
|
|
1934
1941
|
if (j(R().flowchart.htmlLabels)) {
|
|
1935
|
-
const
|
|
1936
|
-
y =
|
|
1942
|
+
const E = D.children[0], h = O(D);
|
|
1943
|
+
y = E.getBoundingClientRect(), h.attr("width", y.width), h.attr("height", y.height);
|
|
1937
1944
|
}
|
|
1938
|
-
x += y.height +
|
|
1945
|
+
x += y.height + i, y.width > o && (o = y.width);
|
|
1939
1946
|
const g = [];
|
|
1940
|
-
t.classData.members.forEach(async (
|
|
1941
|
-
const
|
|
1942
|
-
let W =
|
|
1947
|
+
t.classData.members.forEach(async (E) => {
|
|
1948
|
+
const h = E.getDisplayDetails();
|
|
1949
|
+
let W = h.displayText;
|
|
1943
1950
|
R().flowchart.htmlLabels && (W = W.replace(/</g, "<").replace(/>/g, ">"));
|
|
1944
1951
|
const p = w.node().appendChild(
|
|
1945
1952
|
await K(
|
|
1946
1953
|
W,
|
|
1947
|
-
|
|
1954
|
+
h.cssStyle ? h.cssStyle : t.labelStyle,
|
|
1948
1955
|
true,
|
|
1949
1956
|
true
|
|
1950
1957
|
)
|
|
@@ -1954,17 +1961,17 @@ var Ar = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1954
1961
|
const Z = p.children[0], V = O(p);
|
|
1955
1962
|
I = Z.getBoundingClientRect(), V.attr("width", I.width), V.attr("height", I.height);
|
|
1956
1963
|
}
|
|
1957
|
-
I.width >
|
|
1958
|
-
}), x +=
|
|
1964
|
+
I.width > o && (o = I.width), x += I.height + i, g.push(p);
|
|
1965
|
+
}), x += l;
|
|
1959
1966
|
const f = [];
|
|
1960
|
-
if (t.classData.methods.forEach(async (
|
|
1961
|
-
const
|
|
1962
|
-
let W =
|
|
1967
|
+
if (t.classData.methods.forEach(async (E) => {
|
|
1968
|
+
const h = E.getDisplayDetails();
|
|
1969
|
+
let W = h.displayText;
|
|
1963
1970
|
R().flowchart.htmlLabels && (W = W.replace(/</g, "<").replace(/>/g, ">"));
|
|
1964
1971
|
const p = w.node().appendChild(
|
|
1965
1972
|
await K(
|
|
1966
1973
|
W,
|
|
1967
|
-
|
|
1974
|
+
h.cssStyle ? h.cssStyle : t.labelStyle,
|
|
1968
1975
|
true,
|
|
1969
1976
|
true
|
|
1970
1977
|
)
|
|
@@ -1974,34 +1981,34 @@ var Ar = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1974
1981
|
const Z = p.children[0], V = O(p);
|
|
1975
1982
|
I = Z.getBoundingClientRect(), V.attr("width", I.width), V.attr("height", I.height);
|
|
1976
1983
|
}
|
|
1977
|
-
I.width >
|
|
1978
|
-
}), x +=
|
|
1979
|
-
let
|
|
1984
|
+
I.width > o && (o = I.width), x += I.height + i, f.push(p);
|
|
1985
|
+
}), x += l, S) {
|
|
1986
|
+
let E = (o - B.width) / 2;
|
|
1980
1987
|
O(k).attr(
|
|
1981
1988
|
"transform",
|
|
1982
|
-
"translate( " + (-1 *
|
|
1983
|
-
), b = B.height +
|
|
1989
|
+
"translate( " + (-1 * o / 2 + E) + ", " + -1 * x / 2 + ")"
|
|
1990
|
+
), b = B.height + i;
|
|
1984
1991
|
}
|
|
1985
|
-
let m = (
|
|
1992
|
+
let m = (o - y.width) / 2;
|
|
1986
1993
|
return O(D).attr(
|
|
1987
1994
|
"transform",
|
|
1988
|
-
"translate( " + (-1 *
|
|
1989
|
-
), b += y.height +
|
|
1990
|
-
O(
|
|
1995
|
+
"translate( " + (-1 * o / 2 + m) + ", " + (-1 * x / 2 + b) + ")"
|
|
1996
|
+
), b += y.height + i, c.attr("class", "divider").attr("x1", -o / 2 - a).attr("x2", o / 2 + a).attr("y1", -x / 2 - a + l + b).attr("y2", -x / 2 - a + l + b), b += l, g.forEach((E) => {
|
|
1997
|
+
O(E).attr(
|
|
1991
1998
|
"transform",
|
|
1992
|
-
"translate( " + -
|
|
1999
|
+
"translate( " + -o / 2 + ", " + (-1 * x / 2 + b + l / 2) + ")"
|
|
1993
2000
|
);
|
|
1994
|
-
const
|
|
1995
|
-
b += ((
|
|
1996
|
-
}), b +=
|
|
1997
|
-
O(
|
|
2001
|
+
const h = E == null ? void 0 : E.getBBox();
|
|
2002
|
+
b += ((h == null ? void 0 : h.height) ?? 0) + i;
|
|
2003
|
+
}), b += l, u.attr("class", "divider").attr("x1", -o / 2 - a).attr("x2", o / 2 + a).attr("y1", -x / 2 - a + l + b).attr("y2", -x / 2 - a + l + b), b += l, f.forEach((E) => {
|
|
2004
|
+
O(E).attr(
|
|
1998
2005
|
"transform",
|
|
1999
|
-
"translate( " + -
|
|
2006
|
+
"translate( " + -o / 2 + ", " + (-1 * x / 2 + b) + ")"
|
|
2000
2007
|
);
|
|
2001
|
-
const
|
|
2002
|
-
b += ((
|
|
2003
|
-
}),
|
|
2004
|
-
return N.rect(t,
|
|
2008
|
+
const h = E == null ? void 0 : E.getBBox();
|
|
2009
|
+
b += ((h == null ? void 0 : h.height) ?? 0) + i;
|
|
2010
|
+
}), n.attr("style", t.style).attr("class", "outer title-state").attr("x", -o / 2 - a).attr("y", -(x / 2) - a).attr("width", o + t.padding).attr("height", x + t.padding), T(t, n), t.intersect = function(E) {
|
|
2011
|
+
return N.rect(t, E);
|
|
2005
2012
|
}, r;
|
|
2006
2013
|
}, "class_box"), Ft = {
|
|
2007
2014
|
rhombus: At,
|
|
@@ -2030,14 +2037,14 @@ var Ar = /* @__PURE__ */ d(async (e, t) => {
|
|
|
2030
2037
|
fork: Mt,
|
|
2031
2038
|
join: Mt,
|
|
2032
2039
|
class_box: Kr
|
|
2033
|
-
}, lt = {}, te = /* @__PURE__ */ d(async (e, t,
|
|
2034
|
-
let
|
|
2040
|
+
}, lt = {}, te = /* @__PURE__ */ d(async (e, t, a) => {
|
|
2041
|
+
let i, l;
|
|
2035
2042
|
if (t.link) {
|
|
2036
|
-
let
|
|
2037
|
-
R().securityLevel === "sandbox" ?
|
|
2043
|
+
let s;
|
|
2044
|
+
R().securityLevel === "sandbox" ? s = "_top" : t.linkTarget && (s = t.linkTarget || "_blank"), i = e.insert("svg:a").attr("xlink:href", t.link).attr("target", s), l = await Ft[t.shape](i, t, a);
|
|
2038
2045
|
} else
|
|
2039
|
-
|
|
2040
|
-
return t.tooltip &&
|
|
2046
|
+
l = await Ft[t.shape](e, t, a), i = l;
|
|
2047
|
+
return t.tooltip && l.attr("title", t.tooltip), t.class && l.attr("class", "node default " + t.class), lt[t.id] = i, t.haveCallback && lt[t.id].attr("class", lt[t.id].attr("class") + " clickable"), i;
|
|
2041
2048
|
}, "insertNode"), Xr = /* @__PURE__ */ d((e) => {
|
|
2042
2049
|
const t = lt[e.id];
|
|
2043
2050
|
L.trace(
|
|
@@ -2046,24 +2053,24 @@ var Ar = /* @__PURE__ */ d(async (e, t) => {
|
|
|
2046
2053
|
e,
|
|
2047
2054
|
"translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")"
|
|
2048
2055
|
);
|
|
2049
|
-
const
|
|
2056
|
+
const a = 8, i = e.diff || 0;
|
|
2050
2057
|
return e.clusterNode ? t.attr(
|
|
2051
2058
|
"transform",
|
|
2052
|
-
"translate(" + (e.x +
|
|
2053
|
-
) : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"),
|
|
2059
|
+
"translate(" + (e.x + i - e.width / 2) + ", " + (e.y - e.height / 2 - a) + ")"
|
|
2060
|
+
) : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), i;
|
|
2054
2061
|
}, "positionNode");
|
|
2055
|
-
function
|
|
2062
|
+
function Dt(e, t, a = false) {
|
|
2056
2063
|
var _a2, _b2, _c;
|
|
2057
|
-
const
|
|
2058
|
-
let
|
|
2059
|
-
(((_a2 =
|
|
2060
|
-
let
|
|
2061
|
-
switch (
|
|
2064
|
+
const i = e;
|
|
2065
|
+
let l = "default";
|
|
2066
|
+
(((_a2 = i == null ? void 0 : i.classes) == null ? void 0 : _a2.length) || 0) > 0 && (l = ((i == null ? void 0 : i.classes) ?? []).join(" ")), l = l + " flowchart-label";
|
|
2067
|
+
let s = 0, r = "", n;
|
|
2068
|
+
switch (i.type) {
|
|
2062
2069
|
case "round":
|
|
2063
|
-
|
|
2070
|
+
s = 5, r = "rect";
|
|
2064
2071
|
break;
|
|
2065
2072
|
case "composite":
|
|
2066
|
-
|
|
2073
|
+
s = 0, r = "composite", n = 0;
|
|
2067
2074
|
break;
|
|
2068
2075
|
case "square":
|
|
2069
2076
|
r = "rect";
|
|
@@ -2119,83 +2126,83 @@ function _t(e, t, s = false) {
|
|
|
2119
2126
|
default:
|
|
2120
2127
|
r = "rect";
|
|
2121
2128
|
}
|
|
2122
|
-
const c = be((
|
|
2129
|
+
const c = be((i == null ? void 0 : i.styles) ?? []), u = i.label, o = i.size ?? { width: 0, height: 0, x: 0, y: 0 };
|
|
2123
2130
|
return {
|
|
2124
2131
|
labelStyle: c.labelStyle,
|
|
2125
2132
|
shape: r,
|
|
2126
2133
|
labelText: u,
|
|
2127
|
-
rx:
|
|
2128
|
-
ry:
|
|
2129
|
-
class:
|
|
2134
|
+
rx: s,
|
|
2135
|
+
ry: s,
|
|
2136
|
+
class: l,
|
|
2130
2137
|
style: c.style,
|
|
2131
|
-
id:
|
|
2132
|
-
directions:
|
|
2133
|
-
width:
|
|
2134
|
-
height:
|
|
2135
|
-
x:
|
|
2136
|
-
y:
|
|
2137
|
-
positioned:
|
|
2138
|
+
id: i.id,
|
|
2139
|
+
directions: i.directions,
|
|
2140
|
+
width: o.width,
|
|
2141
|
+
height: o.height,
|
|
2142
|
+
x: o.x,
|
|
2143
|
+
y: o.y,
|
|
2144
|
+
positioned: a,
|
|
2138
2145
|
intersect: void 0,
|
|
2139
|
-
type:
|
|
2140
|
-
padding:
|
|
2146
|
+
type: i.type,
|
|
2147
|
+
padding: n ?? ((_c = (_b2 = rt()) == null ? void 0 : _b2.block) == null ? void 0 : _c.padding) ?? 0
|
|
2141
2148
|
};
|
|
2142
2149
|
}
|
|
2143
|
-
d(
|
|
2144
|
-
async function ee(e, t,
|
|
2145
|
-
const
|
|
2146
|
-
if (
|
|
2150
|
+
d(Dt, "getNodeFromBlock");
|
|
2151
|
+
async function ee(e, t, a) {
|
|
2152
|
+
const i = Dt(t, a, false);
|
|
2153
|
+
if (i.type === "group")
|
|
2147
2154
|
return;
|
|
2148
|
-
const
|
|
2149
|
-
|
|
2155
|
+
const l = rt(), s = await te(e, i, { config: l }), r = s.node().getBBox(), n = a.getBlock(i.id);
|
|
2156
|
+
n.size = { width: r.width, height: r.height, x: 0, y: 0, node: s }, a.setBlock(n), s.remove();
|
|
2150
2157
|
}
|
|
2151
2158
|
d(ee, "calculateBlockSize");
|
|
2152
|
-
async function re(e, t,
|
|
2153
|
-
const
|
|
2154
|
-
if (
|
|
2155
|
-
const
|
|
2156
|
-
await te(e,
|
|
2159
|
+
async function re(e, t, a) {
|
|
2160
|
+
const i = Dt(t, a, true);
|
|
2161
|
+
if (a.getBlock(i.id).type !== "space") {
|
|
2162
|
+
const s = rt();
|
|
2163
|
+
await te(e, i, { config: s }), t.intersect = i == null ? void 0 : i.intersect, Xr(i);
|
|
2157
2164
|
}
|
|
2158
2165
|
}
|
|
2159
2166
|
d(re, "insertBlockPositioned");
|
|
2160
|
-
async function dt(e, t,
|
|
2161
|
-
for (const
|
|
2162
|
-
await
|
|
2167
|
+
async function dt(e, t, a, i) {
|
|
2168
|
+
for (const l of t)
|
|
2169
|
+
await i(e, l, a), l.children && await dt(e, l.children, a, i);
|
|
2163
2170
|
}
|
|
2164
2171
|
d(dt, "performOperations");
|
|
2165
|
-
async function ae(e, t,
|
|
2166
|
-
await dt(e, t,
|
|
2172
|
+
async function ae(e, t, a) {
|
|
2173
|
+
await dt(e, t, a, ee);
|
|
2167
2174
|
}
|
|
2168
2175
|
d(ae, "calculateBlockSizes");
|
|
2169
|
-
async function se(e, t,
|
|
2170
|
-
await dt(e, t,
|
|
2176
|
+
async function se(e, t, a) {
|
|
2177
|
+
await dt(e, t, a, re);
|
|
2171
2178
|
}
|
|
2172
2179
|
d(se, "insertBlocks");
|
|
2173
|
-
async function ie(e, t,
|
|
2174
|
-
const
|
|
2180
|
+
async function ie(e, t, a, i, l) {
|
|
2181
|
+
const s = new me({
|
|
2175
2182
|
multigraph: true,
|
|
2176
2183
|
compound: true
|
|
2177
2184
|
});
|
|
2178
|
-
|
|
2185
|
+
s.setGraph({
|
|
2179
2186
|
rankdir: "TB",
|
|
2180
2187
|
nodesep: 10,
|
|
2181
2188
|
ranksep: 10,
|
|
2182
2189
|
marginx: 8,
|
|
2183
2190
|
marginy: 8
|
|
2184
2191
|
});
|
|
2185
|
-
for (const r of
|
|
2186
|
-
r.size &&
|
|
2192
|
+
for (const r of a)
|
|
2193
|
+
r.size && s.setNode(r.id, {
|
|
2187
2194
|
width: r.size.width,
|
|
2188
2195
|
height: r.size.height,
|
|
2189
2196
|
intersect: r.intersect
|
|
2190
2197
|
});
|
|
2191
2198
|
for (const r of t)
|
|
2192
2199
|
if (r.start && r.end) {
|
|
2193
|
-
const
|
|
2194
|
-
if ((
|
|
2195
|
-
const u =
|
|
2200
|
+
const n = i.getBlock(r.start), c = i.getBlock(r.end);
|
|
2201
|
+
if ((n == null ? void 0 : n.size) && (c == null ? void 0 : c.size)) {
|
|
2202
|
+
const u = n.size, o = c.size, x = [
|
|
2196
2203
|
{ x: u.x, y: u.y },
|
|
2197
|
-
{ x: u.x + (
|
|
2198
|
-
{ x:
|
|
2204
|
+
{ x: u.x + (o.x - u.x) / 2, y: u.y + (o.y - u.y) / 2 },
|
|
2205
|
+
{ x: o.x, y: o.y }
|
|
2199
2206
|
];
|
|
2200
2207
|
gr(
|
|
2201
2208
|
e,
|
|
@@ -2209,8 +2216,8 @@ async function ie(e, t, s, n, i) {
|
|
|
2209
2216
|
},
|
|
2210
2217
|
void 0,
|
|
2211
2218
|
"block",
|
|
2212
|
-
|
|
2213
|
-
|
|
2219
|
+
s,
|
|
2220
|
+
l
|
|
2214
2221
|
), r.label && (await cr(e, {
|
|
2215
2222
|
...r,
|
|
2216
2223
|
label: r.label,
|
|
@@ -2231,18 +2238,18 @@ async function ie(e, t, s, n, i) {
|
|
|
2231
2238
|
d(ie, "insertEdges");
|
|
2232
2239
|
var Ur = /* @__PURE__ */ d(function(e, t) {
|
|
2233
2240
|
return t.db.getClasses();
|
|
2234
|
-
}, "getClasses"), jr = /* @__PURE__ */ d(async function(e, t,
|
|
2235
|
-
const { securityLevel:
|
|
2236
|
-
let
|
|
2237
|
-
|
|
2238
|
-
const c =
|
|
2239
|
-
ar(u, ["point", "circle", "cross"],
|
|
2241
|
+
}, "getClasses"), jr = /* @__PURE__ */ d(async function(e, t, a, i) {
|
|
2242
|
+
const { securityLevel: l, block: s } = rt(), r = i.db;
|
|
2243
|
+
let n;
|
|
2244
|
+
l === "sandbox" && (n = O("#i" + t));
|
|
2245
|
+
const c = l === "sandbox" ? O(n.nodes()[0].contentDocument.body) : O("body"), u = l === "sandbox" ? c.select(`[id="${t}"]`) : O(`[id="${t}"]`);
|
|
2246
|
+
ar(u, ["point", "circle", "cross"], i.type, t);
|
|
2240
2247
|
const x = r.getBlocks(), w = r.getBlocksFlat(), b = r.getEdges(), S = u.insert("g").attr("class", "block");
|
|
2241
2248
|
await ae(S, x, r);
|
|
2242
|
-
const
|
|
2243
|
-
if (await se(S, x, r), await ie(S, b, w, r, t),
|
|
2244
|
-
const k =
|
|
2245
|
-
he(u, _, D, !!y), L.debug("Here Bounds",
|
|
2249
|
+
const v = jt(r);
|
|
2250
|
+
if (await se(S, x, r), await ie(S, b, w, r, t), v) {
|
|
2251
|
+
const k = v, B = Math.max(1, Math.round(0.125 * (k.width / k.height))), _ = k.height + B + 10, D = k.width + 10, { useMaxWidth: y } = s;
|
|
2252
|
+
he(u, _, D, !!y), L.debug("Here Bounds", v, k), u.attr(
|
|
2246
2253
|
"viewBox",
|
|
2247
2254
|
`${k.x - 5} ${k.y - 5} ${k.width + 10} ${k.height + 10}`
|
|
2248
2255
|
);
|