@pstdio/ui 0.26.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EquationComponent-DDd5UoIP.js +65 -0
- package/dist/EquationComponent-DDd5UoIP.js.map +1 -0
- package/dist/MermaidComponent-Cxg7NtjX.js +90 -0
- package/dist/MermaidComponent-Cxg7NtjX.js.map +1 -0
- package/dist/browser-storage-C_ipoNwP.js +37 -0
- package/dist/browser-storage-C_ipoNwP.js.map +1 -0
- package/dist/chat-ui.d.ts +688 -2
- package/dist/chat-ui.js +3271 -2848
- package/dist/chat-ui.js.map +1 -1
- package/dist/data-table-stats-row-UuTinYfL.js +415 -0
- package/dist/data-table-stats-row-UuTinYfL.js.map +1 -0
- package/dist/data-table.d.ts +174 -2
- package/dist/data-table.js +1349 -1187
- package/dist/data-table.js.map +1 -1
- package/dist/diff-bubble-DZsarmSG.js +61 -0
- package/dist/diff-bubble-DZsarmSG.js.map +1 -0
- package/dist/diff-drawer-45rpk3aq.js +776 -0
- package/dist/diff-drawer-45rpk3aq.js.map +1 -0
- package/dist/diff-editor-CGpeyoCE.js +124 -0
- package/dist/diff-editor-CGpeyoCE.js.map +1 -0
- package/dist/diff-size-Dydn_Uw5.js +61 -0
- package/dist/diff-size-Dydn_Uw5.js.map +1 -0
- package/dist/diff-viewer-hGkaF_zW.js +558 -0
- package/dist/diff-viewer-hGkaF_zW.js.map +1 -0
- package/dist/diff.d.ts +128 -2
- package/dist/diff.js +163 -1302
- package/dist/diff.js.map +1 -1
- package/dist/empty-state-3mVV_pV-.js +38 -0
- package/dist/empty-state-3mVV_pV-.js.map +1 -0
- package/dist/file-change-badge-0QFNv82B.js +64 -0
- package/dist/file-change-badge-0QFNv82B.js.map +1 -0
- package/dist/index-BfFLdci8.d.ts +189 -0
- package/dist/index-Dd6e8lU_.d.ts +61 -0
- package/dist/index-DlmvvQ6x.d.ts +143 -0
- package/dist/index.d.ts +1504 -40
- package/dist/index.js +3121 -2707
- package/dist/index.js.map +1 -1
- package/dist/kanban-renderer.d.ts +339 -2
- package/dist/kanban-renderer.js +1413 -1085
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/list-row-De9R2zKU.js +1008 -0
- package/dist/list-row-De9R2zKU.js.map +1 -0
- package/dist/mermaid-renderer-DImi0fDp.js +553 -0
- package/dist/mermaid-renderer-DImi0fDp.js.map +1 -0
- package/dist/mermaid.d.ts +12 -2
- package/dist/mermaid.js +2 -5
- package/dist/monaco-browser-CLRPSE4-.js +14 -0
- package/dist/monaco-browser-CLRPSE4-.js.map +1 -0
- package/dist/param-editor-I0dKQeeZ.js +225 -0
- package/dist/param-editor-I0dKQeeZ.js.map +1 -0
- package/dist/param-editor-field-CBguLs_b.js +2368 -0
- package/dist/param-editor-field-CBguLs_b.js.map +1 -0
- package/dist/param-editor.d.ts +407 -2
- package/dist/param-editor.js +3 -47
- package/dist/prism-pSHJejZx.js +646 -0
- package/dist/prism-pSHJejZx.js.map +1 -0
- package/dist/radio-CiFrDN6O.js +54 -0
- package/dist/radio-CiFrDN6O.js.map +1 -0
- package/dist/resource-badge-95WPVlZf.d.ts +76 -0
- package/dist/rich-text-BgDvOEGH.js +7021 -0
- package/dist/rich-text-BgDvOEGH.js.map +1 -0
- package/dist/rich-text.d.ts +3 -2
- package/dist/rich-text.js +2 -429
- package/dist/rolldown-runtime-Dy4uBu1J.js +11 -0
- package/dist/scroll-area-Cr1lNXAr.js +100 -0
- package/dist/scroll-area-Cr1lNXAr.js.map +1 -0
- package/dist/slider-hwHYe98I.js +423 -0
- package/dist/slider-hwHYe98I.js.map +1 -0
- package/dist/style.css +2 -1
- package/dist/terminal.d.ts +203 -2
- package/dist/terminal.js +324 -360
- package/dist/terminal.js.map +1 -1
- package/dist/theme-0cbWICbg.js +2936 -0
- package/dist/theme-0cbWICbg.js.map +1 -0
- package/dist/theme-preference-pzfuK5cH.js +101 -0
- package/dist/theme-preference-pzfuK5cH.js.map +1 -0
- package/dist/theme.d.ts +3 -2
- package/dist/theme.js +2 -15
- package/dist/tree-list-BUfDQz3v.js +1449 -0
- package/dist/tree-list-BUfDQz3v.js.map +1 -0
- package/dist/types-yjKBk07w.d.ts +161 -0
- package/dist/workspace-badge-Brm3Xr3m.d.ts +75 -0
- package/dist/workspace-badge-DrvH8WKV.js +241 -0
- package/dist/workspace-badge-DrvH8WKV.js.map +1 -0
- package/dist-monaco/assets/codicon-ngg6Pgfi.ttf +0 -0
- package/dist-monaco/assets/css.worker-DFdt6_zu.js +89 -0
- package/dist-monaco/assets/editor.worker-O-CH8JUO.js +26 -0
- package/dist-monaco/assets/html.worker-JUzsMP-j.js +502 -0
- package/dist-monaco/assets/json.worker-B4dEhy0e.js +58 -0
- package/dist-monaco/assets/ts.worker-CmEKzkmF.js +67734 -0
- package/dist-monaco/monaco.css +1 -0
- package/dist-monaco/monaco.js +1201 -0
- package/package.json +26 -13
- package/dist/EquationComponent-DeDYHvqY.js +0 -62
- package/dist/EquationComponent-DeDYHvqY.js.map +0 -1
- package/dist/MermaidComponent-X__B6qib.js +0 -60
- package/dist/MermaidComponent-X__B6qib.js.map +0 -1
- package/dist/activity-timeline-BynMjXSB.js +0 -283
- package/dist/activity-timeline-BynMjXSB.js.map +0 -1
- package/dist/alert-ubcrW24X.js +0 -33
- package/dist/alert-ubcrW24X.js.map +0 -1
- package/dist/browser-storage-BinyFNJX.js +0 -40
- package/dist/browser-storage-BinyFNJX.js.map +0 -1
- package/dist/components/activity/activity-avatar.d.ts +0 -9
- package/dist/components/activity/activity-comment.d.ts +0 -27
- package/dist/components/activity/activity-composer.d.ts +0 -18
- package/dist/components/activity/activity-event.d.ts +0 -12
- package/dist/components/activity/activity-root.d.ts +0 -15
- package/dist/components/activity/activity-timeline.d.ts +0 -6
- package/dist/components/activity/activity.types.d.ts +0 -5
- package/dist/components/activity/index.d.ts +0 -25
- package/dist/components/chat-ui/components/ai-conversation.d.ts +0 -603
- package/dist/components/chat-ui/components/ai-message.d.ts +0 -91
- package/dist/components/chat-ui/components/ai-response.d.ts +0 -5
- package/dist/components/chat-ui/components/approval-prompt.d.ts +0 -8
- package/dist/components/chat-ui/components/attachment-list.d.ts +0 -23
- package/dist/components/chat-ui/components/auto-scroll.d.ts +0 -37
- package/dist/components/chat-ui/components/chat-history-story.d.ts +0 -14
- package/dist/components/chat-ui/components/chat-input-actions.d.ts +0 -13
- package/dist/components/chat-ui/components/chat-input-attachments.d.ts +0 -12
- package/dist/components/chat-ui/components/chat-input-history.d.ts +0 -6
- package/dist/components/chat-ui/components/chat-input-question-prompt.d.ts +0 -36
- package/dist/components/chat-ui/components/chat-input.d.ts +0 -33
- package/dist/components/chat-ui/components/chat-message-animation.d.ts +0 -22
- package/dist/components/chat-ui/components/chat-message-list-items.d.ts +0 -17
- package/dist/components/chat-ui/components/chat-message-list.d.ts +0 -12
- package/dist/components/chat-ui/components/chat-panel-composer.d.ts +0 -49
- package/dist/components/chat-ui/components/chat-panel-sticky-user-message.d.ts +0 -13
- package/dist/components/chat-ui/components/chat-panel.d.ts +0 -45
- package/dist/components/chat-ui/components/chat-skeleton.d.ts +0 -1
- package/dist/components/chat-ui/components/composer-constants.d.ts +0 -1
- package/dist/components/chat-ui/components/conversation-browse.d.ts +0 -22
- package/dist/components/chat-ui/components/message-action-panel.d.ts +0 -10
- package/dist/components/chat-ui/components/message-parts-renderer.d.ts +0 -13
- package/dist/components/chat-ui/components/message-types.d.ts +0 -116
- package/dist/components/chat-ui/components/model-swap-separator.d.ts +0 -5
- package/dist/components/chat-ui/components/queued-follow-up-list-state.d.ts +0 -4
- package/dist/components/chat-ui/components/queued-follow-up-list.d.ts +0 -11
- package/dist/components/chat-ui/components/send-button.d.ts +0 -7
- package/dist/components/chat-ui/components/timeline-title.d.ts +0 -6
- package/dist/components/chat-ui/components/timeline-tool-blocks.d.ts +0 -14
- package/dist/components/chat-ui/components/timeline.d.ts +0 -113
- package/dist/components/chat-ui/components/tool-invocation-timeline.d.ts +0 -8
- package/dist/components/chat-ui/components/use-chat-input-history.d.ts +0 -16
- package/dist/components/chat-ui/components/working-indicator.d.ts +0 -9
- package/dist/components/chat-ui/components/workspace-hub.d.ts +0 -19
- package/dist/components/chat-ui/index.d.ts +0 -19
- package/dist/components/chat-ui/mocks/library/index.d.ts +0 -10
- package/dist/components/chat-ui/performance/chat-mount-metrics.d.ts +0 -37
- package/dist/components/chat-ui/performance/chat-panel.perf.d.ts +0 -18
- package/dist/components/chat-ui/performance/chat-performance-fixtures.d.ts +0 -28
- package/dist/components/chat-ui/performance/chat-performance-panel.d.ts +0 -23
- package/dist/components/chat-ui/performance/chat-performance-story-utils.d.ts +0 -30
- package/dist/components/chat-ui/tool-rendering/apply-patch-renderer.d.ts +0 -2
- package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +0 -13
- package/dist/components/chat-ui/tool-rendering/default-renderers.d.ts +0 -13
- package/dist/components/chat-ui/tool-rendering/edit-renderer.d.ts +0 -2
- package/dist/components/chat-ui/tool-rendering/index.d.ts +0 -3
- package/dist/components/chat-ui/tool-rendering/question-prompt.d.ts +0 -9
- package/dist/components/chat-ui/tool-rendering/question-renderer.d.ts +0 -10
- package/dist/components/chat-ui/tool-rendering/shared.d.ts +0 -53
- package/dist/components/chat-ui/tool-rendering/standard-renderers.d.ts +0 -7
- package/dist/components/chat-ui/tool-rendering/todowrite-renderer.d.ts +0 -10
- package/dist/components/chat-ui/tool-rendering/types.d.ts +0 -12
- package/dist/components/chat-ui/utils/diff.d.ts +0 -21
- package/dist/components/chat-ui/utils/editor-state.d.ts +0 -1
- package/dist/components/chat-ui/utils/get-icon.d.ts +0 -36
- package/dist/components/chat-ui/utils/tool-name.d.ts +0 -2
- package/dist/components/command-palette/index.d.ts +0 -4
- package/dist/components/command-palette/palette-filter.d.ts +0 -23
- package/dist/components/command-palette/palette-list.d.ts +0 -11
- package/dist/components/command-palette/palette-shortcut.d.ts +0 -12
- package/dist/components/command-palette/palette.d.ts +0 -48
- package/dist/components/data-table/build-columns.d.ts +0 -16
- package/dist/components/data-table/categorical-color-cell.d.ts +0 -8
- package/dist/components/data-table/color-cell-style.d.ts +0 -13
- package/dist/components/data-table/color-scale-cell.d.ts +0 -7
- package/dist/components/data-table/data-table-column-menu.d.ts +0 -17
- package/dist/components/data-table/data-table-header.d.ts +0 -12
- package/dist/components/data-table/data-table-row-display.d.ts +0 -11
- package/dist/components/data-table/data-table-skeleton.d.ts +0 -13
- package/dist/components/data-table/data-table-stat-chart.d.ts +0 -21
- package/dist/components/data-table/data-table-state.d.ts +0 -27
- package/dist/components/data-table/data-table-stats-row.d.ts +0 -11
- package/dist/components/data-table/data-table-stats.d.ts +0 -19
- package/dist/components/data-table/data-table-table-parts.d.ts +0 -22
- package/dist/components/data-table/data-table.d.ts +0 -2
- package/dist/components/data-table/data-table.story-descriptions.d.ts +0 -6
- package/dist/components/data-table/data-table.story-fixtures.d.ts +0 -6
- package/dist/components/data-table/edit-mode-data-table-body.d.ts +0 -30
- package/dist/components/data-table/edit-mode-data-table-cell.d.ts +0 -16
- package/dist/components/data-table/edit-mode-data-table-editors.d.ts +0 -19
- package/dist/components/data-table/edit-mode-data-table-header.d.ts +0 -24
- package/dist/components/data-table/edit-mode-data-table-selection.d.ts +0 -12
- package/dist/components/data-table/edit-mode-data-table.d.ts +0 -2
- package/dist/components/data-table/edit-mode-story.d.ts +0 -5
- package/dist/components/data-table/friendly-json-display.d.ts +0 -31
- package/dist/components/data-table/helpers.d.ts +0 -10
- package/dist/components/data-table/index.d.ts +0 -7
- package/dist/components/data-table/json-cell.d.ts +0 -6
- package/dist/components/data-table/pagination-footer.d.ts +0 -11
- package/dist/components/data-table/selection-toolbar.d.ts +0 -11
- package/dist/components/data-table/types.d.ts +0 -117
- package/dist/components/diff-viewer/build-changed-files-tree.d.ts +0 -4
- package/dist/components/diff-viewer/code-editor.d.ts +0 -45
- package/dist/components/diff-viewer/diff-bubble.d.ts +0 -14
- package/dist/components/diff-viewer/diff-card-body.d.ts +0 -60
- package/dist/components/diff-viewer/diff-card-content.d.ts +0 -23
- package/dist/components/diff-viewer/diff-card-load-state.d.ts +0 -9
- package/dist/components/diff-viewer/diff-card.d.ts +0 -46
- package/dist/components/diff-viewer/diff-drawer-empty-state.d.ts +0 -1
- package/dist/components/diff-viewer/diff-drawer-height.d.ts +0 -10
- package/dist/components/diff-viewer/diff-drawer-scroll.d.ts +0 -28
- package/dist/components/diff-viewer/diff-drawer.d.ts +0 -29
- package/dist/components/diff-viewer/diff-editor.d.ts +0 -20
- package/dist/components/diff-viewer/diff-size.d.ts +0 -16
- package/dist/components/diff-viewer/diff-view-adapter.d.ts +0 -27
- package/dist/components/diff-viewer/diff-viewer-options-menu.d.ts +0 -16
- package/dist/components/diff-viewer/diff-viewer.d.ts +0 -14
- package/dist/components/diff-viewer/diff-viewer.store.d.ts +0 -21
- package/dist/components/diff-viewer/file-change-badge.d.ts +0 -3
- package/dist/components/diff-viewer/file-list-panel.d.ts +0 -18
- package/dist/components/diff-viewer/index.d.ts +0 -9
- package/dist/components/diff-viewer/monaco-browser.d.ts +0 -1
- package/dist/components/diff-viewer/types.d.ts +0 -13
- package/dist/components/diff-viewer/use-selected-diff-scroll.d.ts +0 -23
- package/dist/components/file-browser/column-file-browser.d.ts +0 -20
- package/dist/components/internal/performance-panel.d.ts +0 -40
- package/dist/components/internal/style-guide.d.ts +0 -14
- package/dist/components/internal/token-editor-controls.d.ts +0 -8
- package/dist/components/internal/token-editor-data.d.ts +0 -40
- package/dist/components/internal/token-editor-state.d.ts +0 -22
- package/dist/components/kanban-renderer/collection-badge.d.ts +0 -7
- package/dist/components/kanban-renderer/display-menu.d.ts +0 -16
- package/dist/components/kanban-renderer/filter-menu.d.ts +0 -12
- package/dist/components/kanban-renderer/index.d.ts +0 -19
- package/dist/components/kanban-renderer/kanban-renderer-attribute-badge.d.ts +0 -7
- package/dist/components/kanban-renderer/kanban-renderer-badge-helpers.d.ts +0 -46
- package/dist/components/kanban-renderer/kanban-renderer-board-column-header.d.ts +0 -8
- package/dist/components/kanban-renderer/kanban-renderer-board-group-section.d.ts +0 -17
- package/dist/components/kanban-renderer/kanban-renderer-board-move.d.ts +0 -21
- package/dist/components/kanban-renderer/kanban-renderer-board.d.ts +0 -49
- package/dist/components/kanban-renderer/kanban-renderer-card.d.ts +0 -17
- package/dist/components/kanban-renderer/kanban-renderer-content.d.ts +0 -27
- package/dist/components/kanban-renderer/kanban-renderer-create-dialog.d.ts +0 -12
- package/dist/components/kanban-renderer/kanban-renderer-create-field.d.ts +0 -10
- package/dist/components/kanban-renderer/kanban-renderer-enum-helpers.d.ts +0 -10
- package/dist/components/kanban-renderer/kanban-renderer-grouping.d.ts +0 -23
- package/dist/components/kanban-renderer/kanban-renderer-helpers.d.ts +0 -58
- package/dist/components/kanban-renderer/kanban-renderer-list-items.d.ts +0 -25
- package/dist/components/kanban-renderer/kanban-renderer-list.d.ts +0 -43
- package/dist/components/kanban-renderer/kanban-renderer-story-fixtures.d.ts +0 -14
- package/dist/components/kanban-renderer/kanban-renderer-toolbar.d.ts +0 -15
- package/dist/components/kanban-renderer/kanban-renderer-view-bar.d.ts +0 -14
- package/dist/components/kanban-renderer/kanban-renderer-views.d.ts +0 -12
- package/dist/components/kanban-renderer/kanban-renderer.d.ts +0 -43
- package/dist/components/kanban-renderer/types.d.ts +0 -159
- package/dist/components/kanban-renderer/use-kanban-renderer-store.d.ts +0 -78
- package/dist/components/kanban-renderer/use-resolved-attributes.d.ts +0 -14
- package/dist/components/layout/header.d.ts +0 -7
- package/dist/components/layout/horizontal-menu-stack.d.ts +0 -6
- package/dist/components/layout/index.d.ts +0 -8
- package/dist/components/layout/item-section.d.ts +0 -11
- package/dist/components/layout/panel-header.constants.d.ts +0 -3
- package/dist/components/layout/resizable-split-layout.d.ts +0 -22
- package/dist/components/layout/resizable-split-layout.geometry.d.ts +0 -56
- package/dist/components/layout/resizable-split-layout.handle.d.ts +0 -25
- package/dist/components/layout/resizable-split-layout.panels.d.ts +0 -29
- package/dist/components/layout/resizable-split-layout.root-size.d.ts +0 -3
- package/dist/components/list-row/list-row-actions.d.ts +0 -11
- package/dist/components/list-row/list-row-chrome.d.ts +0 -11
- package/dist/components/list-row/list-row-content.d.ts +0 -17
- package/dist/components/list-row/list-row-menu.d.ts +0 -12
- package/dist/components/list-row/list-row-root-props.d.ts +0 -34
- package/dist/components/list-row/list-row.d.ts +0 -2
- package/dist/components/list-row/list-row.types.d.ts +0 -109
- package/dist/components/list-row/searchable-action-menu.d.ts +0 -6
- package/dist/components/mermaid-renderer/download-png.d.ts +0 -7
- package/dist/components/mermaid-renderer/index.d.ts +0 -2
- package/dist/components/mermaid-renderer/mermaid-error-state.d.ts +0 -6
- package/dist/components/mermaid-renderer/mermaid-fixtures.d.ts +0 -9
- package/dist/components/mermaid-renderer/mermaid-fullscreen.d.ts +0 -10
- package/dist/components/mermaid-renderer/mermaid-renderer.d.ts +0 -8
- package/dist/components/mermaid-renderer/mermaid-svg-view.d.ts +0 -12
- package/dist/components/mermaid-renderer/mermaid-toolbar.d.ts +0 -12
- package/dist/components/mermaid-renderer/mermaid-zoom.d.ts +0 -6
- package/dist/components/mermaid-renderer/svg-data-url.d.ts +0 -6
- package/dist/components/mermaid-renderer/use-mermaid-render.d.ts +0 -5
- package/dist/components/notification-center/index.d.ts +0 -2
- package/dist/components/notification-center/notification-center.d.ts +0 -2
- package/dist/components/notification-center/notification-center.types.d.ts +0 -37
- package/dist/components/overlays/attached-menu.d.ts +0 -6
- package/dist/components/overlays/attached-panel.d.ts +0 -9
- package/dist/components/overlays/attachment-chip.d.ts +0 -13
- package/dist/components/overlays/bubble-button.d.ts +0 -10
- package/dist/components/overlays/bubble-panel.d.ts +0 -18
- package/dist/components/overlays/delete-confirmation-modal.d.ts +0 -13
- package/dist/components/overlays/dialog-accept-shortcut.d.ts +0 -12
- package/dist/components/overlays/index.d.ts +0 -17
- package/dist/components/overlays/repo-picker-dialog.d.ts +0 -25
- package/dist/components/overlays/resource-context-menu.d.ts +0 -35
- package/dist/components/overlays/search-modal-content.d.ts +0 -20
- package/dist/components/overlays/searchable-menu-input.d.ts +0 -9
- package/dist/components/overlays/searchable-menu.d.ts +0 -65
- package/dist/components/param-editor/index.d.ts +0 -31
- package/dist/components/param-editor/inputs/action-input.d.ts +0 -14
- package/dist/components/param-editor/inputs/anchor-grid-input.d.ts +0 -12
- package/dist/components/param-editor/inputs/anchor-grid.d.ts +0 -4
- package/dist/components/param-editor/inputs/boolean-input.d.ts +0 -13
- package/dist/components/param-editor/inputs/color-input.d.ts +0 -14
- package/dist/components/param-editor/inputs/date-input.d.ts +0 -16
- package/dist/components/param-editor/inputs/file-upload-input.d.ts +0 -15
- package/dist/components/param-editor/inputs/file-upload-value.d.ts +0 -7
- package/dist/components/param-editor/inputs/horizontal-text-input.d.ts +0 -13
- package/dist/components/param-editor/inputs/markdown-input.d.ts +0 -13
- package/dist/components/param-editor/inputs/number-input.d.ts +0 -18
- package/dist/components/param-editor/inputs/numeric-value.d.ts +0 -6
- package/dist/components/param-editor/inputs/range-input.d.ts +0 -18
- package/dist/components/param-editor/inputs/range-value.d.ts +0 -5
- package/dist/components/param-editor/inputs/resource-input-chips.d.ts +0 -15
- package/dist/components/param-editor/inputs/resource-input.d.ts +0 -20
- package/dist/components/param-editor/inputs/segmented-input.d.ts +0 -15
- package/dist/components/param-editor/inputs/selection-input.d.ts +0 -27
- package/dist/components/param-editor/inputs/selection-menu.d.ts +0 -39
- package/dist/components/param-editor/inputs/slider-marks.d.ts +0 -5
- package/dist/components/param-editor/inputs/text-input.d.ts +0 -14
- package/dist/components/param-editor/inputs/vector-input.d.ts +0 -17
- package/dist/components/param-editor/inputs/vector-value.d.ts +0 -7
- package/dist/components/param-editor/param-editor-advanced-field.d.ts +0 -14
- package/dist/components/param-editor/param-editor-control-fixtures.d.ts +0 -24
- package/dist/components/param-editor/param-editor-control-item.d.ts +0 -15
- package/dist/components/param-editor/param-editor-control-list.d.ts +0 -5
- package/dist/components/param-editor/param-editor-field-label.d.ts +0 -1
- package/dist/components/param-editor/param-editor-field.d.ts +0 -13
- package/dist/components/param-editor/param-editor-horizontal.d.ts +0 -11
- package/dist/components/param-editor/param-editor-inline-group.d.ts +0 -5
- package/dist/components/param-editor/param-editor-label.d.ts +0 -7
- package/dist/components/param-editor/param-editor-presentation.d.ts +0 -3
- package/dist/components/param-editor/param-editor-read-only-field.d.ts +0 -9
- package/dist/components/param-editor/param-editor-read-only-value.d.ts +0 -8
- package/dist/components/param-editor/param-editor-row.d.ts +0 -17
- package/dist/components/param-editor/param-editor-section.d.ts +0 -17
- package/dist/components/param-editor/param-editor.d.ts +0 -12
- package/dist/components/param-editor/param-editor.types.d.ts +0 -31
- package/dist/components/param-editor/resolve-param-value.d.ts +0 -2
- package/dist/components/primitives/alert.d.ts +0 -9
- package/dist/components/primitives/breadcrumb.d.ts +0 -20
- package/dist/components/primitives/checkbox.d.ts +0 -8
- package/dist/components/primitives/chip.d.ts +0 -4
- package/dist/components/primitives/content-placeholder.d.ts +0 -6
- package/dist/components/primitives/empty-state.d.ts +0 -12
- package/dist/components/primitives/error-boundary.d.ts +0 -26
- package/dist/components/primitives/glyph-icon.d.ts +0 -16
- package/dist/components/primitives/icon-color-picker.d.ts +0 -15
- package/dist/components/primitives/icon-options.d.ts +0 -301
- package/dist/components/primitives/index.d.ts +0 -39
- package/dist/components/primitives/info-card.d.ts +0 -12
- package/dist/components/primitives/integration-card.d.ts +0 -12
- package/dist/components/primitives/number-input.d.ts +0 -6
- package/dist/components/primitives/radio.d.ts +0 -8
- package/dist/components/primitives/resource-badge.d.ts +0 -64
- package/dist/components/primitives/scroll-area.d.ts +0 -17
- package/dist/components/primitives/segmented-control.d.ts +0 -20
- package/dist/components/primitives/session-indicator.d.ts +0 -15
- package/dist/components/primitives/simple-card.d.ts +0 -5
- package/dist/components/primitives/slider.d.ts +0 -5
- package/dist/components/primitives/switch.d.ts +0 -15
- package/dist/components/primitives/tag-swatch.d.ts +0 -10
- package/dist/components/primitives/toaster.d.ts +0 -3
- package/dist/components/primitives/tooltip.d.ts +0 -11
- package/dist/components/primitives/workspace-badge.d.ts +0 -23
- package/dist/components/rich-text/collaborative-markdown-editor/awareness-cursors.d.ts +0 -5
- package/dist/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.d.ts +0 -9
- package/dist/components/rich-text/index.d.ts +0 -19
- package/dist/components/rich-text/lazy-markdown-editor.d.ts +0 -2
- package/dist/components/rich-text/markdown-editor/markdown-editor-scrolling.play.d.ts +0 -4
- package/dist/components/rich-text/markdown-editor/markdown-editor.d.ts +0 -17
- package/dist/components/rich-text/markdown-editor/markdown-table.story-fixture.d.ts +0 -3
- package/dist/components/rich-text/markdown-editor/plugins/MarkdownSectionNavigationPlugin.d.ts +0 -8
- package/dist/components/rich-text/markdown-editor/plugins/MarkdownSlashCommandPlugin.d.ts +0 -1
- package/dist/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +0 -21
- package/dist/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +0 -2
- package/dist/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/index.d.ts +0 -2
- package/dist/components/rich-text/markdown-editor/plugins/markdown-history-plugin.d.ts +0 -1
- package/dist/components/rich-text/markdown-editor/plugins/markdown-section-navigation.d.ts +0 -20
- package/dist/components/rich-text/prompt-input/commands.d.ts +0 -2
- package/dist/components/rich-text/prompt-input/events.d.ts +0 -2
- package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.d.ts +0 -1
- package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.d.ts +0 -3
- package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.d.ts +0 -1
- package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.d.ts +0 -16
- package/dist/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.d.ts +0 -7
- package/dist/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.d.ts +0 -6
- package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuOption.d.ts +0 -12
- package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.d.ts +0 -11
- package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenu.d.ts +0 -9
- package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenuItem.d.ts +0 -12
- package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/constants.d.ts +0 -2
- package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.d.ts +0 -14
- package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/checkForTriggers.d.ts +0 -9
- package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/getSortedMenuOptions.d.ts +0 -2
- package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.d.ts +0 -7
- package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +0 -25
- package/dist/components/rich-text/prompt-input/plugins/keyboard-shortcuts.d.ts +0 -11
- package/dist/components/rich-text/prompt-input/prompt-input.d.ts +0 -27
- package/dist/components/rich-text/prompt-input/theme/prompt-input-theme.d.ts +0 -3
- package/dist/components/rich-text/prompt-input/utils.d.ts +0 -22
- package/dist/components/rich-text/resource-activity-feed/resource-activity-feed.d.ts +0 -58
- package/dist/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +0 -21
- package/dist/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +0 -2
- package/dist/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/index.d.ts +0 -2
- package/dist/components/rich-text/rich-message/rich-message.d.ts +0 -10
- package/dist/components/rich-text/shared/components/content-editable.d.ts +0 -9
- package/dist/components/rich-text/shared/components/default-rich-text-components.d.ts +0 -3
- package/dist/components/rich-text/shared/editor-config.d.ts +0 -5
- package/dist/components/rich-text/shared/lexical-code.d.ts +0 -2
- package/dist/components/rich-text/shared/markdown-ast.d.ts +0 -7
- package/dist/components/rich-text/shared/markdown-codec.d.ts +0 -3
- package/dist/components/rich-text/shared/markdown-export.d.ts +0 -2
- package/dist/components/rich-text/shared/markdown-import.d.ts +0 -2
- package/dist/components/rich-text/shared/markdown-inline.d.ts +0 -5
- package/dist/components/rich-text/shared/markdown-source-document.d.ts +0 -7
- package/dist/components/rich-text/shared/markdown-source-links.d.ts +0 -11
- package/dist/components/rich-text/shared/markdown-source-map.d.ts +0 -10
- package/dist/components/rich-text/shared/markdown-table.d.ts +0 -41
- package/dist/components/rich-text/shared/markdown-url-context.d.ts +0 -9
- package/dist/components/rich-text/shared/markdown-url.d.ts +0 -3
- package/dist/components/rich-text/shared/nodes/DataTableNode.d.ts +0 -24
- package/dist/components/rich-text/shared/nodes/MarkdownImageNode.d.ts +0 -35
- package/dist/components/rich-text/shared/nodes/MarkdownLinkNode.d.ts +0 -18
- package/dist/components/rich-text/shared/nodes/RawHtmlNode.d.ts +0 -31
- package/dist/components/rich-text/shared/plugins/CodePlugin/CodeBlockActionsPlugin.d.ts +0 -4
- package/dist/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.d.ts +0 -3
- package/dist/components/rich-text/shared/plugins/CodePlugin/CodeHighlightingPlugin.d.ts +0 -1
- package/dist/components/rich-text/shared/plugins/EquationPlugin/EquationComponent.d.ts +0 -6
- package/dist/components/rich-text/shared/plugins/EquationPlugin/EquationNode.d.ts +0 -26
- package/dist/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.d.ts +0 -4
- package/dist/components/rich-text/shared/plugins/EquationPlugin/KatexRenderer.d.ts +0 -4
- package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.d.ts +0 -4
- package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/floating-toolbar-buttons.d.ts +0 -18
- package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +0 -1
- package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/resolve-block-type.d.ts +0 -17
- package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/should-show-floating-toolbar.d.ts +0 -12
- package/dist/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.d.ts +0 -13
- package/dist/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.d.ts +0 -2
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.d.ts +0 -4
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.d.ts +0 -1
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/commands.d.ts +0 -2
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/index.d.ts +0 -3
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/link-editor-content.d.ts +0 -18
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.d.ts +0 -2
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/link-edit-state.d.ts +0 -1
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/selection-link-url.d.ts +0 -2
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.d.ts +0 -1
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.d.ts +0 -2
- package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidComponent.d.ts +0 -6
- package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidNode.d.ts +0 -23
- package/dist/components/rich-text/shared/plugins/StateUpdatePlugin.d.ts +0 -6
- package/dist/components/rich-text/shared/plugins/ToggleEditablePlugin.d.ts +0 -3
- package/dist/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +0 -1
- package/dist/components/rich-text/shared/prism-global.d.ts +0 -2
- package/dist/components/rich-text/shared/transformers/markdown-transformers-test-utils.d.ts +0 -3
- package/dist/components/rich-text/shared/transformers/markdown-transformers.d.ts +0 -16
- package/dist/components/rich-text/shared/types/rich-text-components.d.ts +0 -15
- package/dist/components/rich-text/theme/rich-text-theme.d.ts +0 -3
- package/dist/components/rich-text/types.d.ts +0 -8
- package/dist/components/rich-text/utils/inferResourceType.d.ts +0 -1
- package/dist/components/rich-text/utils/markdown.d.ts +0 -5
- package/dist/components/rich-text/utils/mediaType.d.ts +0 -1
- package/dist/components/sidenav/sidenav-footer.d.ts +0 -6
- package/dist/components/sidenav/sidenav-header.d.ts +0 -6
- package/dist/components/sidenav/sidenav.d.ts +0 -2
- package/dist/components/sidenav/sidenav.store.d.ts +0 -49
- package/dist/components/sidenav/sidenav.types.d.ts +0 -31
- package/dist/components/tab-strip/tab-visibility-filter.d.ts +0 -22
- package/dist/components/tab-strip/tab-visibility.store.d.ts +0 -41
- package/dist/components/tab-strip/window-tabs.d.ts +0 -15
- package/dist/components/tab-strip/window-title-bar.d.ts +0 -6
- package/dist/components/tag-editor/index.d.ts +0 -8
- package/dist/components/tag-editor/tag-editor-heading.d.ts +0 -11
- package/dist/components/tag-editor/tag-editor-row.d.ts +0 -20
- package/dist/components/tag-editor/tag-editor-save-bar.d.ts +0 -13
- package/dist/components/tag-editor/tag-editor.d.ts +0 -2
- package/dist/components/tag-editor/tag-editor.types.d.ts +0 -57
- package/dist/components/tag-editor/tag-settings-panel.d.ts +0 -30
- package/dist/components/terminal/bind-session.d.ts +0 -33
- package/dist/components/terminal/index.d.ts +0 -6
- package/dist/components/terminal/scripted-bridge.d.ts +0 -35
- package/dist/components/terminal/terminal-contract.d.ts +0 -22
- package/dist/components/terminal/terminal-theme.d.ts +0 -12
- package/dist/components/terminal/terminal.d.ts +0 -56
- package/dist/components/terminal/types.d.ts +0 -35
- package/dist/components/terminal/use-terminal-session.d.ts +0 -21
- package/dist/components/tree-list/tree-list-background.d.ts +0 -8
- package/dist/components/tree-list/tree-list-drag-provider.d.ts +0 -13
- package/dist/components/tree-list/tree-list-drag.d.ts +0 -7
- package/dist/components/tree-list/tree-list-inline-creation-story.d.ts +0 -3
- package/dist/components/tree-list/tree-list-inline-input.d.ts +0 -9
- package/dist/components/tree-list/tree-list-model.d.ts +0 -58
- package/dist/components/tree-list/tree-list-move-surface.d.ts +0 -7
- package/dist/components/tree-list/tree-list-node-row.d.ts +0 -21
- package/dist/components/tree-list/tree-list-order-filter.d.ts +0 -2
- package/dist/components/tree-list/tree-list-order.store.d.ts +0 -45
- package/dist/components/tree-list/tree-list-reorder.d.ts +0 -24
- package/dist/components/tree-list/tree-list-section-header.d.ts +0 -14
- package/dist/components/tree-list/tree-list-sortable.d.ts +0 -24
- package/dist/components/tree-list/tree-list-visibility-filter.d.ts +0 -24
- package/dist/components/tree-list/tree-list-visibility.store.d.ts +0 -45
- package/dist/components/tree-list/tree-list.d.ts +0 -41
- package/dist/components/tree-list/tree-list.types.d.ts +0 -63
- package/dist/components/tree-list/use-tree-list-keyboard-navigation.d.ts +0 -15
- package/dist/diff-bubble-DvUPRnfB.js +0 -183
- package/dist/diff-bubble-DvUPRnfB.js.map +0 -1
- package/dist/edit-mode-data-table-Nfmfi7bz.js +0 -847
- package/dist/edit-mode-data-table-Nfmfi7bz.js.map +0 -1
- package/dist/empty-state-Bo4HVrgr.js +0 -34
- package/dist/empty-state-Bo4HVrgr.js.map +0 -1
- package/dist/foundations/gallery/gallery-frame.d.ts +0 -21
- package/dist/foundations/gallery/sections/badges-section.d.ts +0 -1
- package/dist/foundations/gallery/sections/buttons-section.d.ts +0 -1
- package/dist/foundations/gallery/sections/composite-chat-section.d.ts +0 -1
- package/dist/foundations/gallery/sections/composites-section.d.ts +0 -1
- package/dist/foundations/gallery/sections/feedback-section.d.ts +0 -1
- package/dist/foundations/gallery/sections/input-authoring-card.d.ts +0 -1
- package/dist/foundations/gallery/sections/inputs-section.d.ts +0 -1
- package/dist/foundations/gallery/sections/layout-section.d.ts +0 -1
- package/dist/foundations/gallery/sections/navigation-identity-section.d.ts +0 -1
- package/dist/foundations/gallery/sections/overlays-section.d.ts +0 -1
- package/dist/foundations/gallery/sections/panels-section.d.ts +0 -1
- package/dist/foundations/gallery/sections/param-editor-composite-card.d.ts +0 -1
- package/dist/foundations/gallery/sections/settings-composite-cards.d.ts +0 -1
- package/dist/kanban-renderer-toolbar-Buek4icz.js +0 -1375
- package/dist/kanban-renderer-toolbar-Buek4icz.js.map +0 -1
- package/dist/lazy-markdown-editor-PzIBc9-l.js +0 -42
- package/dist/lazy-markdown-editor-PzIBc9-l.js.map +0 -1
- package/dist/list-row-DHzRa9-O.js +0 -815
- package/dist/list-row-DHzRa9-O.js.map +0 -1
- package/dist/markdown-BCfPxNpb.js +0 -1663
- package/dist/markdown-BCfPxNpb.js.map +0 -1
- package/dist/markdown-editor-CsJ4KNGu.js +0 -1034
- package/dist/markdown-editor-CsJ4KNGu.js.map +0 -1
- package/dist/mermaid-renderer-D0YP0FmJ.js +0 -425
- package/dist/mermaid-renderer-D0YP0FmJ.js.map +0 -1
- package/dist/mermaid.js.map +0 -1
- package/dist/monaco-browser-l82HnffN.js +0 -22
- package/dist/monaco-browser-l82HnffN.js.map +0 -1
- package/dist/param-editor-CFM2Nf3l.js +0 -161
- package/dist/param-editor-CFM2Nf3l.js.map +0 -1
- package/dist/param-editor-field-Bj-AGUY6.js +0 -1728
- package/dist/param-editor-field-Bj-AGUY6.js.map +0 -1
- package/dist/param-editor.js.map +0 -1
- package/dist/prism-n5gcERyD.js +0 -202
- package/dist/prism-n5gcERyD.js.map +0 -1
- package/dist/radio-BfjibByI.js +0 -51
- package/dist/radio-BfjibByI.js.map +0 -1
- package/dist/rich-message-q6Y6QJOq.js +0 -633
- package/dist/rich-message-q6Y6QJOq.js.map +0 -1
- package/dist/rich-text.js.map +0 -1
- package/dist/scroll-area-BMbg1WcD.js +0 -91
- package/dist/scroll-area-BMbg1WcD.js.map +0 -1
- package/dist/slider-DBHjdxsU.js +0 -1092
- package/dist/slider-DBHjdxsU.js.map +0 -1
- package/dist/test-utils/local-storage.d.ts +0 -1
- package/dist/theme/custom/index.d.ts +0 -2
- package/dist/theme/custom/vscode-theme.d.ts +0 -32
- package/dist/theme/global.d.ts +0 -62
- package/dist/theme/index.d.ts +0 -3
- package/dist/theme/primitives/colors.d.ts +0 -1081
- package/dist/theme/primitives/fonts.d.ts +0 -84
- package/dist/theme/primitives/sizes.d.ts +0 -207
- package/dist/theme/recipes/activity-comment.d.ts +0 -36
- package/dist/theme/recipes/alert.d.ts +0 -1
- package/dist/theme/recipes/badge.d.ts +0 -58
- package/dist/theme/recipes/button.d.ts +0 -188
- package/dist/theme/recipes/color-picker.d.ts +0 -18
- package/dist/theme/recipes/dialog.d.ts +0 -1
- package/dist/theme/recipes/divider.d.ts +0 -1
- package/dist/theme/recipes/drawer.d.ts +0 -1
- package/dist/theme/recipes/editable.d.ts +0 -46
- package/dist/theme/recipes/form.d.ts +0 -1
- package/dist/theme/recipes/input.d.ts +0 -94
- package/dist/theme/recipes/kbd.d.ts +0 -41
- package/dist/theme/recipes/menu.d.ts +0 -1
- package/dist/theme/recipes/number-input.d.ts +0 -98
- package/dist/theme/recipes/popover.d.ts +0 -16
- package/dist/theme/recipes/progress-circle.d.ts +0 -28
- package/dist/theme/recipes/resizable-split-layout.d.ts +0 -106
- package/dist/theme/recipes/segmented-control.d.ts +0 -22
- package/dist/theme/recipes/skeleton.d.ts +0 -1
- package/dist/theme/recipes/switch.d.ts +0 -18
- package/dist/theme/recipes/tabs.d.ts +0 -80
- package/dist/theme/recipes/textarea.d.ts +0 -62
- package/dist/theme/recipes/timeline.d.ts +0 -83
- package/dist/theme/recipes/tooltip.d.ts +0 -1
- package/dist/theme/recipes/window-title-bar.d.ts +0 -19
- package/dist/theme/shadowless-default-config.d.ts +0 -2
- package/dist/theme/theme.d.ts +0 -2
- package/dist/theme/tokens/borders.d.ts +0 -17
- package/dist/theme/tokens/colors-background.d.ts +0 -260
- package/dist/theme/tokens/colors-visualization.d.ts +0 -162
- package/dist/theme/tokens/colors.d.ts +0 -878
- package/dist/theme/tokens/layer-styles.d.ts +0 -1
- package/dist/theme/tokens/text.d.ts +0 -1
- package/dist/theme-AzJH4Om3.js +0 -3999
- package/dist/theme-AzJH4Om3.js.map +0 -1
- package/dist/theme-preference-DxGW1qg-.js +0 -114
- package/dist/theme-preference-DxGW1qg-.js.map +0 -1
- package/dist/theme.js.map +0 -1
- package/dist/tree-list-CPjbGTvs.js +0 -1348
- package/dist/tree-list-CPjbGTvs.js.map +0 -1
- package/dist/utils/apply-file-icon-theme-preference.d.ts +0 -35
- package/dist/utils/apply-theme-preference.d.ts +0 -22
- package/dist/utils/browser-storage.d.ts +0 -7
- package/dist/utils/file-icon-theme-preference.d.ts +0 -15
- package/dist/utils/get-file-type-icon.d.ts +0 -2
- package/dist/utils/prism.d.ts +0 -1
- package/dist/utils/resolve-file-icon-element.d.ts +0 -8
- package/dist/utils/theme-preference.d.ts +0 -20
- package/dist/workspace-badge-CuOcmnZc.js +0 -175
- package/dist/workspace-badge-CuOcmnZc.js.map +0 -1
|
@@ -1,1663 +0,0 @@
|
|
|
1
|
-
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
-
import { c as x } from "react/compiler-runtime";
|
|
3
|
-
import { chakra as St, Box as $, Text as je, Image as vt, Code as Ie, Link as Ot } from "@chakra-ui/react";
|
|
4
|
-
import { ContentEditable as Mt } from "@lexical/react/LexicalContentEditable";
|
|
5
|
-
import { S as Lt } from "./scroll-area-BMbg1WcD.js";
|
|
6
|
-
import { LinkNode as Ee, AutoLinkNode as We, $createLinkNode as Rt, $isLinkNode as Ve, $isAutoLinkNode as Ge, $createAutoLinkNode as It } from "@lexical/link";
|
|
7
|
-
import { ListNode as At, ListItemNode as Dt, $isListNode as Qe, $isListItemNode as Bt, $createListNode as Ft, $createListItemNode as qt } from "@lexical/list";
|
|
8
|
-
import { CHECK_LIST as Pt, TRANSFORMERS as zt, LINK as Ut } from "@lexical/markdown";
|
|
9
|
-
import { QuoteNode as Ht, HeadingNode as Jt, $isHeadingNode as Kt, $isQuoteNode as jt, $createQuoteNode as Wt, $createHeadingNode as Vt } from "@lexical/rich-text";
|
|
10
|
-
import { CodeNode as Xe, CodeHighlightNode as Gt, registerCodeHighlighting as Qt, $isCodeNode as Xt, $createCodeNode as Yt } from "@lexical/code";
|
|
11
|
-
import { DecoratorNode as F, $getSelection as Zt, $getNodeByKey as ke, $isRangeSelection as en, $applyNodeReplacement as q, HISTORY_PUSH_TAG as Ae, $createParagraphNode as re, REDO_COMMAND as tn, UNDO_COMMAND as nn, ElementNode as rn, TextNode as ye, $createTextNode as N, $nodesOfType as sn, $isParagraphNode as Ye, $isElementNode as Ze, $isTextNode as et, $isLineBreakNode as tt, $isInlineElementOrDecoratorNode as ln, $getRoot as nt, $createLineBreakNode as on } from "lexical";
|
|
12
|
-
import { useLexicalComposerContext as le } from "@lexical/react/LexicalComposerContext";
|
|
13
|
-
import * as an from "react";
|
|
14
|
-
import { createContext as cn, useContext as un, useRef as rt, useEffect as oe, Fragment as dn, useState as pn, Suspense as it, lazy as hn } from "react";
|
|
15
|
-
import { diffChars as te } from "diff";
|
|
16
|
-
import { fromMarkdown as st } from "mdast-util-from-markdown";
|
|
17
|
-
import { gfmToMarkdown as fn, gfmFromMarkdown as mn } from "mdast-util-gfm";
|
|
18
|
-
import { mathToMarkdown as _n, mathFromMarkdown as gn } from "mdast-util-math";
|
|
19
|
-
import { toMarkdown as kn } from "mdast-util-to-markdown";
|
|
20
|
-
import { gfm as yn } from "micromark-extension-gfm";
|
|
21
|
-
import { math as bn } from "micromark-extension-math";
|
|
22
|
-
import { R as xn } from "./prism-n5gcERyD.js";
|
|
23
|
-
import { E as Cn } from "./edit-mode-data-table-Nfmfi7bz.js";
|
|
24
|
-
import { L as Nn } from "./lazy-markdown-editor-PzIBc9-l.js";
|
|
25
|
-
import wn from "dompurify";
|
|
26
|
-
import En from "katex";
|
|
27
|
-
import { TreeView as Tn } from "@lexical/react/LexicalTreeView";
|
|
28
|
-
const $n = St(Mt);
|
|
29
|
-
function ai(t) {
|
|
30
|
-
const e = x(11), {
|
|
31
|
-
onRef: n,
|
|
32
|
-
fullWidth: r,
|
|
33
|
-
padding: i,
|
|
34
|
-
isRichMessage: s,
|
|
35
|
-
scrollable: l
|
|
36
|
-
} = t, a = r === void 0 ? !1 : r, o = s === void 0 ? !1 : s, c = l === void 0 ? !0 : l, u = a ? "100%" : "45rem", d = a ? "0" : "auto";
|
|
37
|
-
let p;
|
|
38
|
-
e[0] !== u || e[1] !== d ? (p = /* @__PURE__ */ h($n, { "data-testid": "content-editable", height: "fit-content", minH: "100%", width: "100%", maxWidth: u, marginInline: d, textStyle: "paragraph/M/regular", fontSize: "calc(var(--chakra-font-sizes-md) * var(--rich-text-font-scale))", position: "relative", outline: "none" }), e[0] = u, e[1] = d, e[2] = p) : p = e[2];
|
|
39
|
-
let _;
|
|
40
|
-
e[3] !== n || e[4] !== i || e[5] !== p ? (_ = /* @__PURE__ */ h($, { ref: n, width: "100%", minH: "100%", padding: i, children: p }), e[3] = n, e[4] = i, e[5] = p, e[6] = _) : _ = e[6];
|
|
41
|
-
const g = _;
|
|
42
|
-
if (!c)
|
|
43
|
-
return g;
|
|
44
|
-
const m = o ? "true" : void 0;
|
|
45
|
-
let k;
|
|
46
|
-
e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = {
|
|
47
|
-
width: "100%",
|
|
48
|
-
minH: "100%"
|
|
49
|
-
}, e[7] = k) : k = e[7];
|
|
50
|
-
let y;
|
|
51
|
-
return e[8] !== g || e[9] !== m ? (y = /* @__PURE__ */ h(Lt, { className: "rich-text", "data-rich-message": m, height: "100%", minH: "0", position: "relative", contentProps: k, children: g }), e[8] = g, e[9] = m, e[10] = y) : y = e[10], y;
|
|
52
|
-
}
|
|
53
|
-
class S extends F {
|
|
54
|
-
__href;
|
|
55
|
-
__label;
|
|
56
|
-
static getType() {
|
|
57
|
-
return "reference-link";
|
|
58
|
-
}
|
|
59
|
-
static clone(e) {
|
|
60
|
-
return new S(e.__href, e.__label, e.__key);
|
|
61
|
-
}
|
|
62
|
-
constructor(e, n, r) {
|
|
63
|
-
super(r), this.__href = e, this.__label = n;
|
|
64
|
-
}
|
|
65
|
-
createDOM(e, n) {
|
|
66
|
-
return document.createElement("span");
|
|
67
|
-
}
|
|
68
|
-
updateDOM(e, n, r) {
|
|
69
|
-
return !1;
|
|
70
|
-
}
|
|
71
|
-
getTextContent() {
|
|
72
|
-
return `{{link('${this.__label ?? this.__href}')}}`;
|
|
73
|
-
}
|
|
74
|
-
exportJSON() {
|
|
75
|
-
return {
|
|
76
|
-
type: S.getType(),
|
|
77
|
-
version: 1,
|
|
78
|
-
href: this.__href,
|
|
79
|
-
label: this.__label
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
static importJSON(e) {
|
|
83
|
-
return Te(e.href, e.label);
|
|
84
|
-
}
|
|
85
|
-
decorate(e, n) {
|
|
86
|
-
const r = this.__href, s = r.split("/").pop() || "unknown", l = /^https?:\/\//i.test(r), a = /^#?\$PROJECT\//i.test(r);
|
|
87
|
-
return /* @__PURE__ */ h($, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ h(xn, { fileName: s, onSelect: () => {
|
|
88
|
-
if (l)
|
|
89
|
-
window.open(r, "_blank", "noopener,noreferrer");
|
|
90
|
-
else if (a) {
|
|
91
|
-
const o = r.replace(/^#?\$PROJECT\//i, ""), c = new CustomEvent("ui:open-project-file", {
|
|
92
|
-
detail: o
|
|
93
|
-
});
|
|
94
|
-
window.dispatchEvent(c);
|
|
95
|
-
} else
|
|
96
|
-
window.location.assign(r);
|
|
97
|
-
} }) });
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
function Te(t, e) {
|
|
101
|
-
return new S(t, e);
|
|
102
|
-
}
|
|
103
|
-
function lt(t) {
|
|
104
|
-
return t instanceof S;
|
|
105
|
-
}
|
|
106
|
-
const De = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, Sn = {
|
|
107
|
-
dependencies: [S],
|
|
108
|
-
export: (t) => {
|
|
109
|
-
if (lt(t)) {
|
|
110
|
-
const e = t.__href, n = t.__label ?? e;
|
|
111
|
-
return n ? `{{link('${n}')}}` : `{{link('${e}')}}`;
|
|
112
|
-
}
|
|
113
|
-
return null;
|
|
114
|
-
},
|
|
115
|
-
regExp: De,
|
|
116
|
-
importRegExp: De,
|
|
117
|
-
replace: (t, e) => {
|
|
118
|
-
const n = e[2], i = /^(https?:\/\/|\/)/i.test(n) ? n : `#${n}`, s = n;
|
|
119
|
-
t.replace(Te(i, s));
|
|
120
|
-
},
|
|
121
|
-
type: "text-match"
|
|
122
|
-
}, vn = {
|
|
123
|
-
code: "rich-text__code",
|
|
124
|
-
codeHighlight: {
|
|
125
|
-
atrule: "rich-text__tokenAttr",
|
|
126
|
-
attr: "rich-text__tokenAttr",
|
|
127
|
-
boolean: "rich-text__tokenProperty",
|
|
128
|
-
builtin: "rich-text__tokenSelector",
|
|
129
|
-
cdata: "rich-text__tokenComment",
|
|
130
|
-
char: "rich-text__tokenSelector",
|
|
131
|
-
class: "rich-text__tokenFunction",
|
|
132
|
-
"class-name": "rich-text__tokenFunction",
|
|
133
|
-
comment: "rich-text__tokenComment",
|
|
134
|
-
constant: "rich-text__tokenProperty",
|
|
135
|
-
deleted: "rich-text__tokenProperty",
|
|
136
|
-
doctype: "rich-text__tokenComment",
|
|
137
|
-
entity: "rich-text__tokenOperator",
|
|
138
|
-
function: "rich-text__tokenFunction",
|
|
139
|
-
important: "rich-text__tokenVariable",
|
|
140
|
-
inserted: "rich-text__tokenSelector",
|
|
141
|
-
keyword: "rich-text__tokenAttr",
|
|
142
|
-
namespace: "rich-text__tokenVariable",
|
|
143
|
-
number: "rich-text__tokenProperty",
|
|
144
|
-
operator: "rich-text__tokenOperator",
|
|
145
|
-
prolog: "rich-text__tokenComment",
|
|
146
|
-
property: "rich-text__tokenProperty",
|
|
147
|
-
punctuation: "rich-text__tokenPunctuation",
|
|
148
|
-
regex: "rich-text__tokenVariable",
|
|
149
|
-
selector: "rich-text__tokenSelector",
|
|
150
|
-
string: "rich-text__tokenSelector",
|
|
151
|
-
symbol: "rich-text__tokenProperty",
|
|
152
|
-
tag: "rich-text__tokenProperty",
|
|
153
|
-
url: "rich-text__tokenOperator",
|
|
154
|
-
variable: "rich-text__tokenVariable"
|
|
155
|
-
},
|
|
156
|
-
embedBlock: {
|
|
157
|
-
base: "rich-text__embedBlock",
|
|
158
|
-
focus: "rich-text__embedBlockFocus"
|
|
159
|
-
},
|
|
160
|
-
list: {
|
|
161
|
-
checklist: "rich-text__checklist",
|
|
162
|
-
listitem: "rich-text__listItem",
|
|
163
|
-
listitemChecked: "rich-text__listItemChecked",
|
|
164
|
-
listitemUnchecked: "rich-text__listItemUnchecked",
|
|
165
|
-
nested: {
|
|
166
|
-
listitem: "rich-text__nestedListItem"
|
|
167
|
-
},
|
|
168
|
-
olDepth: ["rich-text__ol1", "rich-text__ol2", "rich-text__ol3", "rich-text__ol4", "rich-text__ol5"],
|
|
169
|
-
ol: "rich-text__ol",
|
|
170
|
-
ul: "rich-text__ul"
|
|
171
|
-
},
|
|
172
|
-
heading: {
|
|
173
|
-
h1: "rich-text__h1",
|
|
174
|
-
h2: "rich-text__h2",
|
|
175
|
-
h3: "rich-text__h3"
|
|
176
|
-
},
|
|
177
|
-
paragraph: "rich-text__p",
|
|
178
|
-
text: {
|
|
179
|
-
underline: "rich-text__textUnderline",
|
|
180
|
-
italic: "rich-text__textItalic",
|
|
181
|
-
code: "rich-text__textCode"
|
|
182
|
-
},
|
|
183
|
-
link: "rich-text__link",
|
|
184
|
-
quote: "rich-text__quote",
|
|
185
|
-
reference: "rich-text__reference",
|
|
186
|
-
table: "rich-text__table",
|
|
187
|
-
tableCell: "rich-text__tableCell",
|
|
188
|
-
tableRow: "rich-text__tableRow",
|
|
189
|
-
tableCellHeader: "rich-text__tableCellHeader",
|
|
190
|
-
layoutContainer: "rich-text__layoutContainer",
|
|
191
|
-
layoutItem: "rich-text__layoutItem",
|
|
192
|
-
draggableBlockDemo: {
|
|
193
|
-
row: "rich-text__row",
|
|
194
|
-
content: "rich-text__content"
|
|
195
|
-
}
|
|
196
|
-
}, ot = {
|
|
197
|
-
extensions: [yn(), bn()],
|
|
198
|
-
mdastExtensions: [mn(), gn()]
|
|
199
|
-
}, On = {
|
|
200
|
-
bullet: "-",
|
|
201
|
-
emphasis: "*",
|
|
202
|
-
extensions: [fn(), _n()],
|
|
203
|
-
fence: "`",
|
|
204
|
-
fences: !0,
|
|
205
|
-
listItemIndent: "one",
|
|
206
|
-
rule: "-",
|
|
207
|
-
strong: "*"
|
|
208
|
-
}, Mn = (t) => t.match(/^ {0,3}(`{3,}|~{3,})/), Ln = (t) => {
|
|
209
|
-
let e = null, n = "";
|
|
210
|
-
for (let r = 0; r < t.length; ) {
|
|
211
|
-
if (t[r] === "`") {
|
|
212
|
-
let s = r;
|
|
213
|
-
for (; t[s] === "`"; ) s += 1;
|
|
214
|
-
const l = s - r;
|
|
215
|
-
e === null ? e = l : e === l && (e = null), n += t.slice(r, s), r = s;
|
|
216
|
-
continue;
|
|
217
|
-
}
|
|
218
|
-
const i = t.slice(r, r + 2);
|
|
219
|
-
if (e === null && (i === "\\(" || i === "\\)")) {
|
|
220
|
-
n += "$", r += 2;
|
|
221
|
-
continue;
|
|
222
|
-
}
|
|
223
|
-
if (e === null && (i === "\\[" || i === "\\]")) {
|
|
224
|
-
n += "$$", r += 2;
|
|
225
|
-
continue;
|
|
226
|
-
}
|
|
227
|
-
n += t[r], r += 1;
|
|
228
|
-
}
|
|
229
|
-
return n;
|
|
230
|
-
}, Rn = (t) => {
|
|
231
|
-
let e = null;
|
|
232
|
-
const n = [];
|
|
233
|
-
for (const r of t.split(`
|
|
234
|
-
`)) {
|
|
235
|
-
if (e) {
|
|
236
|
-
n.push(r);
|
|
237
|
-
const l = r.match(/^ {0,3}(`+|~+)[ \t]*$/)?.[1];
|
|
238
|
-
l?.[0] === e.character && l.length >= e.length && (e = null);
|
|
239
|
-
continue;
|
|
240
|
-
}
|
|
241
|
-
const i = Mn(r)?.[1];
|
|
242
|
-
if (i) {
|
|
243
|
-
e = {
|
|
244
|
-
character: i[0] ?? "`",
|
|
245
|
-
length: i.length
|
|
246
|
-
}, n.push(r);
|
|
247
|
-
continue;
|
|
248
|
-
}
|
|
249
|
-
const s = r.match(/^( {0,3})\\\[\s*(.*?)\s*\\\][ \t]*$/);
|
|
250
|
-
if (s) {
|
|
251
|
-
const l = s[1] ?? "";
|
|
252
|
-
n.push(`${l}$$`, s[2] ?? "", `${l}$$`);
|
|
253
|
-
continue;
|
|
254
|
-
}
|
|
255
|
-
if (/^ {0,3}\\\[[ \t]*$/.test(r)) {
|
|
256
|
-
n.push(r.replace("\\[", () => "$$"));
|
|
257
|
-
continue;
|
|
258
|
-
}
|
|
259
|
-
if (/^ {0,3}\\\][ \t]*$/.test(r)) {
|
|
260
|
-
n.push(r.replace("\\]", () => "$$"));
|
|
261
|
-
continue;
|
|
262
|
-
}
|
|
263
|
-
n.push(Ln(r));
|
|
264
|
-
}
|
|
265
|
-
return n.join(`
|
|
266
|
-
`);
|
|
267
|
-
}, at = (t) => st(Rn(t), ot), B = (t) => st(t, ot), ct = (t) => kn(t, On).trimEnd(), $e = (t) => ct({
|
|
268
|
-
type: "root",
|
|
269
|
-
children: [t]
|
|
270
|
-
}), U = (t) => $e({
|
|
271
|
-
type: "paragraph",
|
|
272
|
-
children: t
|
|
273
|
-
}), ut = (t) => {
|
|
274
|
-
const n = at(t).children[0];
|
|
275
|
-
return n?.type === "paragraph" || n?.type === "heading" ? n.children : [];
|
|
276
|
-
}, In = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "sms:", "tel:"]), An = /^data:image\/(?:png|gif|jpeg|webp);base64,[a-z0-9+/=]+$/i, dt = /^[a-z][a-z\d+.-]*:/i, Dn = (t) => {
|
|
277
|
-
if (t.startsWith("#") || t.startsWith("/") || t.startsWith("./") || t.startsWith("../") || !dt.test(t)) return !0;
|
|
278
|
-
try {
|
|
279
|
-
return In.has(new URL(t).protocol);
|
|
280
|
-
} catch {
|
|
281
|
-
return !1;
|
|
282
|
-
}
|
|
283
|
-
}, Bn = (t) => t.startsWith("https://") ? !0 : An.test(t), ae = (t, e, n) => {
|
|
284
|
-
const r = n ? n(t, e) : t;
|
|
285
|
-
return r === null ? null : e === "image" ? !dt.test(t) && !n ? null : Bn(r) ? r : null : Dn(r) ? r : null;
|
|
286
|
-
}, pt = cn(void 0), ci = (t) => {
|
|
287
|
-
const e = x(3), {
|
|
288
|
-
children: n,
|
|
289
|
-
resolver: r
|
|
290
|
-
} = t;
|
|
291
|
-
let i;
|
|
292
|
-
return e[0] !== n || e[1] !== r ? (i = /* @__PURE__ */ h(pt.Provider, { value: r, children: n }), e[0] = n, e[1] = r, e[2] = i) : i = e[2], i;
|
|
293
|
-
}, Se = () => un(pt), ht = (t) => {
|
|
294
|
-
const e = x(10), {
|
|
295
|
-
source: n,
|
|
296
|
-
alt: r,
|
|
297
|
-
title: i,
|
|
298
|
-
onLoad: s
|
|
299
|
-
} = t, l = Se();
|
|
300
|
-
let a;
|
|
301
|
-
e[0] !== l || e[1] !== n ? (a = ae(n, "image", l), e[0] = l, e[1] = n, e[2] = a) : a = e[2];
|
|
302
|
-
const o = a;
|
|
303
|
-
if (!o) {
|
|
304
|
-
const d = r || "Image";
|
|
305
|
-
let p;
|
|
306
|
-
return e[3] !== d ? (p = /* @__PURE__ */ h($, { as: "span", display: "inline-block", paddingX: "xs", paddingY: "2xs", background: "bg.muted", borderRadius: "sm", children: /* @__PURE__ */ h(je, { as: "span", textStyle: "label/S/regular", color: "fg.muted", children: d }) }), e[3] = d, e[4] = p) : p = e[4], p;
|
|
307
|
-
}
|
|
308
|
-
const c = i ?? void 0;
|
|
309
|
-
let u;
|
|
310
|
-
return e[5] !== r || e[6] !== s || e[7] !== o || e[8] !== c ? (u = /* @__PURE__ */ h(vt, { src: o, alt: r, title: c, loading: "lazy", referrerPolicy: "no-referrer", onLoad: s }), e[5] = r, e[6] = s, e[7] = o, e[8] = c, e[9] = u) : u = e[9], u;
|
|
311
|
-
};
|
|
312
|
-
class K extends F {
|
|
313
|
-
__source;
|
|
314
|
-
__alt;
|
|
315
|
-
__title;
|
|
316
|
-
static getType() {
|
|
317
|
-
return "markdown-image";
|
|
318
|
-
}
|
|
319
|
-
static clone(e) {
|
|
320
|
-
return new K(e.__source, e.__alt, e.__title, e.__key);
|
|
321
|
-
}
|
|
322
|
-
constructor(e, n, r = null, i) {
|
|
323
|
-
super(i), this.__source = e, this.__alt = n, this.__title = r;
|
|
324
|
-
}
|
|
325
|
-
createDOM() {
|
|
326
|
-
return document.createElement("span");
|
|
327
|
-
}
|
|
328
|
-
updateDOM() {
|
|
329
|
-
return !1;
|
|
330
|
-
}
|
|
331
|
-
isInline() {
|
|
332
|
-
return !0;
|
|
333
|
-
}
|
|
334
|
-
getSource() {
|
|
335
|
-
return this.__source;
|
|
336
|
-
}
|
|
337
|
-
getAlt() {
|
|
338
|
-
return this.__alt;
|
|
339
|
-
}
|
|
340
|
-
getTitle() {
|
|
341
|
-
return this.__title;
|
|
342
|
-
}
|
|
343
|
-
getTextContent() {
|
|
344
|
-
return this.__alt;
|
|
345
|
-
}
|
|
346
|
-
exportJSON() {
|
|
347
|
-
return {
|
|
348
|
-
type: "markdown-image",
|
|
349
|
-
version: 1,
|
|
350
|
-
source: this.__source,
|
|
351
|
-
alt: this.__alt,
|
|
352
|
-
title: this.__title
|
|
353
|
-
};
|
|
354
|
-
}
|
|
355
|
-
static importJSON(e) {
|
|
356
|
-
return be(e.source, e.alt, e.title);
|
|
357
|
-
}
|
|
358
|
-
decorate(e) {
|
|
359
|
-
const n = () => {
|
|
360
|
-
if (!e.isEditable()) return;
|
|
361
|
-
let r = null;
|
|
362
|
-
e.getEditorState().read(() => {
|
|
363
|
-
const s = Zt(), l = ke(this.getKey());
|
|
364
|
-
if (!en(s) || !s.isCollapsed() || !l) return;
|
|
365
|
-
const c = l.getTopLevelElement()?.getNextSibling()?.getKey(), u = s.anchor.getNode().getTopLevelElement();
|
|
366
|
-
c && c === u?.getKey() && (r = c);
|
|
367
|
-
});
|
|
368
|
-
const i = r;
|
|
369
|
-
i && requestAnimationFrame(() => {
|
|
370
|
-
e.getElementByKey(i)?.scrollIntoView({
|
|
371
|
-
block: "end"
|
|
372
|
-
});
|
|
373
|
-
});
|
|
374
|
-
};
|
|
375
|
-
return /* @__PURE__ */ h(ht, { source: this.__source, alt: this.__alt, title: this.__title, onLoad: n });
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
const be = (t, e, n = null) => q(new K(t, e, n)), Fn = (t) => t instanceof K, ft = (t) => /^<!--[\s\S]*-->$/.test(t.trim()), qn = (t, e) => {
|
|
379
|
-
if (typeof document > "u") return null;
|
|
380
|
-
const n = wn.sanitize(t, {
|
|
381
|
-
FORBID_TAGS: ["script", "style", "iframe", "object", "embed", "form", "input", "button", "textarea", "select"]
|
|
382
|
-
}), r = document.createElement("template");
|
|
383
|
-
r.innerHTML = n;
|
|
384
|
-
for (const i of r.content.querySelectorAll("[href], [src]")) {
|
|
385
|
-
const s = i.hasAttribute("href") ? "href" : "src", l = s === "href" ? "link" : "image", a = i.getAttribute(s) ?? "", o = ae(a, l, e);
|
|
386
|
-
o ? i.setAttribute(s, o) : i.removeAttribute(s);
|
|
387
|
-
}
|
|
388
|
-
return r.content;
|
|
389
|
-
}, mt = (t) => {
|
|
390
|
-
const e = x(7), {
|
|
391
|
-
source: n,
|
|
392
|
-
display: r
|
|
393
|
-
} = t, i = Se(), s = rt(null);
|
|
394
|
-
let l;
|
|
395
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = (d) => {
|
|
396
|
-
s.current = d;
|
|
397
|
-
}, e[0] = l) : l = e[0];
|
|
398
|
-
const a = l;
|
|
399
|
-
let o, c;
|
|
400
|
-
if (e[1] !== i || e[2] !== n ? (o = () => {
|
|
401
|
-
const d = qn(n, i), p = s.current;
|
|
402
|
-
p && p.replaceChildren(d ? d.cloneNode(!0) : document.createTextNode(""));
|
|
403
|
-
}, c = [i, n], e[1] = i, e[2] = n, e[3] = o, e[4] = c) : (o = e[3], c = e[4]), oe(o, c), ft(n))
|
|
404
|
-
return null;
|
|
405
|
-
if (r === "inline") {
|
|
406
|
-
let d;
|
|
407
|
-
return e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ h("span", { ref: a }), e[5] = d) : d = e[5], d;
|
|
408
|
-
}
|
|
409
|
-
let u;
|
|
410
|
-
return e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ h("div", { ref: a }), e[6] = u) : u = e[6], u;
|
|
411
|
-
};
|
|
412
|
-
class j extends F {
|
|
413
|
-
__source;
|
|
414
|
-
__display;
|
|
415
|
-
static getType() {
|
|
416
|
-
return "raw-html";
|
|
417
|
-
}
|
|
418
|
-
static clone(e) {
|
|
419
|
-
return new j(e.__source, e.__display, e.__key);
|
|
420
|
-
}
|
|
421
|
-
constructor(e, n, r) {
|
|
422
|
-
super(r), this.__source = e, this.__display = n;
|
|
423
|
-
}
|
|
424
|
-
createDOM() {
|
|
425
|
-
return document.createElement(this.__display === "inline" ? "span" : "div");
|
|
426
|
-
}
|
|
427
|
-
updateDOM(e) {
|
|
428
|
-
return e.__display !== this.__display;
|
|
429
|
-
}
|
|
430
|
-
isInline() {
|
|
431
|
-
return this.__display === "inline";
|
|
432
|
-
}
|
|
433
|
-
getSource() {
|
|
434
|
-
return this.__source;
|
|
435
|
-
}
|
|
436
|
-
getDisplay() {
|
|
437
|
-
return this.__display;
|
|
438
|
-
}
|
|
439
|
-
getTextContent() {
|
|
440
|
-
return ft(this.__source) ? "" : this.__source;
|
|
441
|
-
}
|
|
442
|
-
exportJSON() {
|
|
443
|
-
return {
|
|
444
|
-
type: "raw-html",
|
|
445
|
-
version: 1,
|
|
446
|
-
source: this.__source,
|
|
447
|
-
display: this.__display
|
|
448
|
-
};
|
|
449
|
-
}
|
|
450
|
-
static importJSON(e) {
|
|
451
|
-
return ve(e.source, e.display);
|
|
452
|
-
}
|
|
453
|
-
decorate() {
|
|
454
|
-
return /* @__PURE__ */ h(mt, { source: this.__source, display: this.__display });
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
const ve = (t, e) => q(new j(t, e)), _t = (t) => t instanceof j, D = (t) => {
|
|
458
|
-
const e = x(5), {
|
|
459
|
-
nodes: n
|
|
460
|
-
} = t, r = Se();
|
|
461
|
-
let i;
|
|
462
|
-
if (e[0] !== n || e[1] !== r) {
|
|
463
|
-
let s;
|
|
464
|
-
e[3] !== r ? (s = (l, a) => {
|
|
465
|
-
const o = `${l.type}-${a}`;
|
|
466
|
-
switch (l.type) {
|
|
467
|
-
case "text":
|
|
468
|
-
return /* @__PURE__ */ h(dn, { children: l.value }, o);
|
|
469
|
-
case "strong":
|
|
470
|
-
return /* @__PURE__ */ h(je, { as: "strong", fontWeight: "semibold", children: /* @__PURE__ */ h(D, { nodes: l.children }) }, o);
|
|
471
|
-
case "emphasis":
|
|
472
|
-
return /* @__PURE__ */ h($, { as: "em", children: /* @__PURE__ */ h(D, { nodes: l.children }) }, o);
|
|
473
|
-
case "delete":
|
|
474
|
-
return /* @__PURE__ */ h($, { as: "del", children: /* @__PURE__ */ h(D, { nodes: l.children }) }, o);
|
|
475
|
-
case "inlineCode":
|
|
476
|
-
return /* @__PURE__ */ h(Ie, { children: l.value }, o);
|
|
477
|
-
case "break":
|
|
478
|
-
return /* @__PURE__ */ h("br", {}, o);
|
|
479
|
-
case "link": {
|
|
480
|
-
const c = ae(l.url, "link", r);
|
|
481
|
-
return c ? /* @__PURE__ */ h(Ot, { href: c, title: l.title ?? void 0, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ h(D, { nodes: l.children }) }, o) : /* @__PURE__ */ h(D, { nodes: l.children }, o);
|
|
482
|
-
}
|
|
483
|
-
case "image":
|
|
484
|
-
return /* @__PURE__ */ h(ht, { source: l.url, alt: l.alt ?? "", title: l.title ?? null }, o);
|
|
485
|
-
case "html":
|
|
486
|
-
return /* @__PURE__ */ h(mt, { source: l.value, display: "inline" }, o);
|
|
487
|
-
case "inlineMath":
|
|
488
|
-
return /* @__PURE__ */ h(Ie, { children: l.value }, o);
|
|
489
|
-
default:
|
|
490
|
-
return null;
|
|
491
|
-
}
|
|
492
|
-
}, e[3] = r, e[4] = s) : s = e[4], i = n.map(s), e[0] = n, e[1] = r, e[2] = i;
|
|
493
|
-
} else
|
|
494
|
-
i = e[2];
|
|
495
|
-
return i;
|
|
496
|
-
}, gt = (t) => {
|
|
497
|
-
const e = x(4), {
|
|
498
|
-
value: n
|
|
499
|
-
} = t;
|
|
500
|
-
let r;
|
|
501
|
-
e[0] !== n ? (r = ut(n), e[0] = n, e[1] = r) : r = e[1];
|
|
502
|
-
let i;
|
|
503
|
-
return e[2] !== r ? (i = /* @__PURE__ */ h(D, { nodes: r }), e[2] = r, e[3] = i) : i = e[3], i;
|
|
504
|
-
}, Pn = (t) => t.rows.map((e) => ({
|
|
505
|
-
id: e.id,
|
|
506
|
-
...e.cells
|
|
507
|
-
})), zn = (t) => t.columns, Un = (t) => {
|
|
508
|
-
const e = x(38), {
|
|
509
|
-
editor: n,
|
|
510
|
-
nodeKey: r,
|
|
511
|
-
table: i
|
|
512
|
-
} = t, [s, l] = pn(!1), a = rt(null);
|
|
513
|
-
let o;
|
|
514
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = () => {
|
|
515
|
-
setTimeout(() => a.current?.focus(), 0);
|
|
516
|
-
}, e[0] = o) : o = e[0];
|
|
517
|
-
const c = o;
|
|
518
|
-
let u;
|
|
519
|
-
e[1] !== n || e[2] !== r ? (u = (f) => {
|
|
520
|
-
n.update(() => {
|
|
521
|
-
const b = ke(r);
|
|
522
|
-
xe(b) && b.setTable(f(b.getTable()));
|
|
523
|
-
}, {
|
|
524
|
-
tag: Ae
|
|
525
|
-
}), c();
|
|
526
|
-
}, e[1] = n, e[2] = r, e[3] = u) : u = e[3];
|
|
527
|
-
const d = u;
|
|
528
|
-
let p;
|
|
529
|
-
e[4] !== d ? (p = (f) => {
|
|
530
|
-
d((b) => ({
|
|
531
|
-
columns: f,
|
|
532
|
-
rows: b.rows.map((E) => ({
|
|
533
|
-
...E,
|
|
534
|
-
cells: Object.fromEntries(f.map((A) => [A.id, E.cells[A.id] ?? ""]))
|
|
535
|
-
}))
|
|
536
|
-
}));
|
|
537
|
-
}, e[4] = d, e[5] = p) : p = e[5];
|
|
538
|
-
const _ = p;
|
|
539
|
-
let g;
|
|
540
|
-
e[6] !== d ? (g = (f) => {
|
|
541
|
-
d((b) => ({
|
|
542
|
-
...b,
|
|
543
|
-
rows: f.map((E, A) => ({
|
|
544
|
-
id: String(E.id ?? b.rows[A]?.id ?? `row-${A + 1}`),
|
|
545
|
-
cells: Object.fromEntries(b.columns.map((Re) => [Re.id, String(E[Re.id] ?? "")]))
|
|
546
|
-
}))
|
|
547
|
-
}));
|
|
548
|
-
}, e[6] = d, e[7] = g) : g = e[7];
|
|
549
|
-
const m = g;
|
|
550
|
-
let k;
|
|
551
|
-
e[8] !== n || e[9] !== r ? (k = () => {
|
|
552
|
-
n.update(() => {
|
|
553
|
-
const f = ke(r);
|
|
554
|
-
if (xe(f)) {
|
|
555
|
-
const b = re();
|
|
556
|
-
f.replace(b), b.select();
|
|
557
|
-
}
|
|
558
|
-
}, {
|
|
559
|
-
tag: Ae
|
|
560
|
-
}), setTimeout(() => n.focus(), 0);
|
|
561
|
-
}, e[8] = n, e[9] = r, e[10] = k) : k = e[10];
|
|
562
|
-
const y = k;
|
|
563
|
-
let w;
|
|
564
|
-
e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = (f) => {
|
|
565
|
-
f.target.closest("button, input, textarea, [contenteditable='true'], [role='menuitem']") || (f.preventDefault(), a.current?.focus());
|
|
566
|
-
}, e[11] = w) : w = e[11];
|
|
567
|
-
const Tt = w;
|
|
568
|
-
let G;
|
|
569
|
-
e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (G = (f) => {
|
|
570
|
-
f.currentTarget.contains(f.relatedTarget) || l(!1);
|
|
571
|
-
}, e[12] = G) : G = e[12];
|
|
572
|
-
const $t = G;
|
|
573
|
-
let Q;
|
|
574
|
-
e[13] !== y || e[14] !== n || e[15] !== s ? (Q = (f) => {
|
|
575
|
-
const b = f.target, E = b.matches("input, textarea") || b.isContentEditable;
|
|
576
|
-
if ((f.ctrlKey || f.metaKey) && f.key.toLowerCase() === "z" && !E) {
|
|
577
|
-
f.preventDefault(), f.stopPropagation(), n.dispatchCommand(f.shiftKey ? tn : nn, void 0);
|
|
578
|
-
return;
|
|
579
|
-
}
|
|
580
|
-
E || s && (f.key === "Delete" || f.key === "Backspace") && (f.preventDefault(), f.stopPropagation(), y());
|
|
581
|
-
}, e[13] = y, e[14] = n, e[15] = s, e[16] = Q) : Q = e[16];
|
|
582
|
-
const de = Q, pe = String(s), he = s ? "2px solid" : "none";
|
|
583
|
-
let X;
|
|
584
|
-
e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (X = () => l(!0), e[17] = X) : X = e[17];
|
|
585
|
-
let M;
|
|
586
|
-
e[18] !== i ? (M = Pn(i), e[18] = i, e[19] = M) : M = e[19];
|
|
587
|
-
let L;
|
|
588
|
-
e[20] !== i ? (L = zn(i), e[20] = i, e[21] = L) : L = e[21];
|
|
589
|
-
let R;
|
|
590
|
-
e[22] !== _ || e[23] !== m || e[24] !== L ? (R = {
|
|
591
|
-
columns: L,
|
|
592
|
-
onColumnsChange: _,
|
|
593
|
-
onDataChange: m,
|
|
594
|
-
renderHeader: Hn,
|
|
595
|
-
renderCell: Jn,
|
|
596
|
-
renderCellEditor: Kn
|
|
597
|
-
}, e[22] = _, e[23] = m, e[24] = L, e[25] = R) : R = e[25];
|
|
598
|
-
let Y;
|
|
599
|
-
e[26] !== n ? (Y = n.isEditable(), e[26] = n, e[27] = Y) : Y = e[27];
|
|
600
|
-
const fe = !Y;
|
|
601
|
-
let I;
|
|
602
|
-
e[28] !== M || e[29] !== R || e[30] !== fe ? (I = /* @__PURE__ */ h(Cn, { data: M, editMode: R, fullWidth: !0, getRowId: jn, initialPageSize: 30, isReadOnly: fe }), e[28] = M, e[29] = R, e[30] = fe, e[31] = I) : I = e[31];
|
|
603
|
-
let Z;
|
|
604
|
-
return e[32] !== de || e[33] !== s || e[34] !== I || e[35] !== pe || e[36] !== he ? (Z = /* @__PURE__ */ h($, { ref: a, "data-testid": "markdown-table-node", "data-selected": pe, "aria-label": "Markdown table", "aria-selected": s, tabIndex: 0, outline: he, outlineColor: "border.accent-light", outlineOffset: "2px", borderRadius: "sm", onFocus: X, onBlur: $t, onClick: Tt, onKeyDownCapture: de, children: I }), e[32] = de, e[33] = s, e[34] = I, e[35] = pe, e[36] = he, e[37] = Z) : Z = e[37], Z;
|
|
605
|
-
};
|
|
606
|
-
class W extends F {
|
|
607
|
-
__table;
|
|
608
|
-
static getType() {
|
|
609
|
-
return "data_table";
|
|
610
|
-
}
|
|
611
|
-
static clone(e) {
|
|
612
|
-
return new W(e.__table, e.__key);
|
|
613
|
-
}
|
|
614
|
-
constructor(e, n) {
|
|
615
|
-
super(n), this.__table = e;
|
|
616
|
-
}
|
|
617
|
-
getTable() {
|
|
618
|
-
return this.getLatest().__table;
|
|
619
|
-
}
|
|
620
|
-
setTable(e) {
|
|
621
|
-
const n = this.getWritable();
|
|
622
|
-
n.__table = e;
|
|
623
|
-
}
|
|
624
|
-
createDOM() {
|
|
625
|
-
return document.createElement("div");
|
|
626
|
-
}
|
|
627
|
-
updateDOM() {
|
|
628
|
-
return !1;
|
|
629
|
-
}
|
|
630
|
-
decorate(e) {
|
|
631
|
-
return /* @__PURE__ */ h(Un, { editor: e, nodeKey: this.__key, table: this.__table });
|
|
632
|
-
}
|
|
633
|
-
exportJSON() {
|
|
634
|
-
return {
|
|
635
|
-
type: "data_table",
|
|
636
|
-
version: 2,
|
|
637
|
-
table: this.__table
|
|
638
|
-
};
|
|
639
|
-
}
|
|
640
|
-
static importJSON(e) {
|
|
641
|
-
return kt(e.table);
|
|
642
|
-
}
|
|
643
|
-
getTextContent() {
|
|
644
|
-
const e = this.__table.columns.map((i) => i.label).join(" | "), n = this.__table.columns.map(() => "---").join(" | "), r = this.__table.rows.map((i) => this.__table.columns.map((s) => i.cells[s.id] ?? "").join(" | "));
|
|
645
|
-
return [e, n, ...r].join(`
|
|
646
|
-
`);
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
const kt = (t) => q(new W(t)), xe = (t) => t instanceof W;
|
|
650
|
-
function Hn(t) {
|
|
651
|
-
return /* @__PURE__ */ h(gt, { value: t.label });
|
|
652
|
-
}
|
|
653
|
-
function Jn(t) {
|
|
654
|
-
return /* @__PURE__ */ h(gt, { value: String(t.value ?? "") });
|
|
655
|
-
}
|
|
656
|
-
function Kn(t) {
|
|
657
|
-
const {
|
|
658
|
-
value: e,
|
|
659
|
-
onChange: n
|
|
660
|
-
} = t;
|
|
661
|
-
return /* @__PURE__ */ h(Nn, { autoFocus: !0, defaultState: e, fullWidth: !0, isEditable: !0, padding: "xs", scrollable: !1, onChange: n });
|
|
662
|
-
}
|
|
663
|
-
function jn(t) {
|
|
664
|
-
return String(t.id);
|
|
665
|
-
}
|
|
666
|
-
const Ce = (t, e) => ae(t, "link", e) ?? "about:blank";
|
|
667
|
-
class V extends Ee {
|
|
668
|
-
__source;
|
|
669
|
-
static getType() {
|
|
670
|
-
return "markdown-link";
|
|
671
|
-
}
|
|
672
|
-
static clone(e) {
|
|
673
|
-
return new V(e.__source, e.__url, {
|
|
674
|
-
rel: e.__rel,
|
|
675
|
-
target: e.__target,
|
|
676
|
-
title: e.__title
|
|
677
|
-
}, e.__key);
|
|
678
|
-
}
|
|
679
|
-
constructor(e = "", n, r, i) {
|
|
680
|
-
super(n ?? Ce(e), r, i), this.__source = e;
|
|
681
|
-
}
|
|
682
|
-
getSource() {
|
|
683
|
-
return this.__source;
|
|
684
|
-
}
|
|
685
|
-
setURL(e) {
|
|
686
|
-
const n = this.getWritable();
|
|
687
|
-
return n.__source = e, n.__url = Ce(e), n;
|
|
688
|
-
}
|
|
689
|
-
exportJSON() {
|
|
690
|
-
return {
|
|
691
|
-
...super.exportJSON(),
|
|
692
|
-
source: this.__source,
|
|
693
|
-
type: "markdown-link",
|
|
694
|
-
version: 1
|
|
695
|
-
};
|
|
696
|
-
}
|
|
697
|
-
static importJSON(e) {
|
|
698
|
-
return Ne(e.source, void 0, {
|
|
699
|
-
rel: e.rel,
|
|
700
|
-
target: e.target,
|
|
701
|
-
title: e.title
|
|
702
|
-
});
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
const Ne = (t, e, n) => q(new V(t, Ce(t, e), n)), Wn = (t) => t instanceof V, Vn = an.lazy(() => import("./EquationComponent-DeDYHvqY.js"));
|
|
706
|
-
function Be(t) {
|
|
707
|
-
let e = t.getAttribute("data-lexical-equation");
|
|
708
|
-
const n = t.getAttribute("data-lexical-inline") === "true";
|
|
709
|
-
return e = atob(e || ""), e ? {
|
|
710
|
-
node: P(e, n)
|
|
711
|
-
} : null;
|
|
712
|
-
}
|
|
713
|
-
class O extends F {
|
|
714
|
-
__equation;
|
|
715
|
-
__inline;
|
|
716
|
-
static getType() {
|
|
717
|
-
return "equation";
|
|
718
|
-
}
|
|
719
|
-
static clone(e) {
|
|
720
|
-
return new O(e.__equation, e.__inline, e.__key);
|
|
721
|
-
}
|
|
722
|
-
constructor(e, n, r) {
|
|
723
|
-
super(r), this.__equation = e, this.__inline = n ?? !1;
|
|
724
|
-
}
|
|
725
|
-
static importJSON(e) {
|
|
726
|
-
return P(e.equation, e.inline);
|
|
727
|
-
}
|
|
728
|
-
exportJSON() {
|
|
729
|
-
return {
|
|
730
|
-
equation: this.getEquation(),
|
|
731
|
-
inline: this.__inline,
|
|
732
|
-
type: "equation",
|
|
733
|
-
version: 1
|
|
734
|
-
};
|
|
735
|
-
}
|
|
736
|
-
createDOM(e) {
|
|
737
|
-
const n = document.createElement(this.__inline ? "span" : "div");
|
|
738
|
-
return n.className = "editor-equation", n;
|
|
739
|
-
}
|
|
740
|
-
exportDOM() {
|
|
741
|
-
const e = document.createElement(this.__inline ? "span" : "div"), n = btoa(this.__equation);
|
|
742
|
-
return e.setAttribute("data-lexical-equation", n), e.setAttribute("data-lexical-inline", `${this.__inline}`), En.render(this.__equation, e, {
|
|
743
|
-
displayMode: !this.__inline,
|
|
744
|
-
// true === block display //
|
|
745
|
-
errorColor: "#cc0000",
|
|
746
|
-
output: "html",
|
|
747
|
-
strict: "warn",
|
|
748
|
-
throwOnError: !1,
|
|
749
|
-
trust: !1
|
|
750
|
-
}), {
|
|
751
|
-
element: e
|
|
752
|
-
};
|
|
753
|
-
}
|
|
754
|
-
static importDOM() {
|
|
755
|
-
return {
|
|
756
|
-
div: (e) => e.hasAttribute("data-lexical-equation") ? {
|
|
757
|
-
conversion: Be,
|
|
758
|
-
priority: 2
|
|
759
|
-
} : null,
|
|
760
|
-
span: (e) => e.hasAttribute("data-lexical-equation") ? {
|
|
761
|
-
conversion: Be,
|
|
762
|
-
priority: 1
|
|
763
|
-
} : null
|
|
764
|
-
};
|
|
765
|
-
}
|
|
766
|
-
updateDOM(e) {
|
|
767
|
-
return this.__inline !== e.__inline;
|
|
768
|
-
}
|
|
769
|
-
getTextContent() {
|
|
770
|
-
return this.__equation;
|
|
771
|
-
}
|
|
772
|
-
getEquation() {
|
|
773
|
-
return this.__equation;
|
|
774
|
-
}
|
|
775
|
-
setEquation(e) {
|
|
776
|
-
const n = this.getWritable();
|
|
777
|
-
n.__equation = e;
|
|
778
|
-
}
|
|
779
|
-
isInline() {
|
|
780
|
-
return this.__inline;
|
|
781
|
-
}
|
|
782
|
-
decorate() {
|
|
783
|
-
return /* @__PURE__ */ h(it, { fallback: null, children: /* @__PURE__ */ h(Vn, { equation: this.__equation, inline: this.__inline }) });
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
function P(t = "", e = !1) {
|
|
787
|
-
const n = new O(t, e);
|
|
788
|
-
return q(n);
|
|
789
|
-
}
|
|
790
|
-
function ce(t) {
|
|
791
|
-
return t instanceof O;
|
|
792
|
-
}
|
|
793
|
-
const Gn = {
|
|
794
|
-
dependencies: [O],
|
|
795
|
-
export: (t) => ce(t) && t.isInline() ? `\\( ${t.getEquation().trim()} \\)` : null,
|
|
796
|
-
importRegExp: /\\\((.*?)\\\)/,
|
|
797
|
-
regExp: /\\\((.*?)\\\)/,
|
|
798
|
-
replace: (t, e) => {
|
|
799
|
-
const n = P(e[1].trim(), !0);
|
|
800
|
-
t.replace(n);
|
|
801
|
-
},
|
|
802
|
-
type: "text-match"
|
|
803
|
-
}, Qn = {
|
|
804
|
-
dependencies: [O],
|
|
805
|
-
regExpStart: /\\\[/,
|
|
806
|
-
regExpEnd: /\\]/,
|
|
807
|
-
export: (t) => ce(t) && !t.isInline() ? `\\[ ${t.getEquation().trim()} \\]` : null,
|
|
808
|
-
replace: (t, e, n, r, i) => i ? (t.append(P(i.join(" "), !1)), !0) : !1,
|
|
809
|
-
type: "multiline-element"
|
|
810
|
-
};
|
|
811
|
-
function ui() {
|
|
812
|
-
return null;
|
|
813
|
-
}
|
|
814
|
-
class z extends rn {
|
|
815
|
-
static getType() {
|
|
816
|
-
return "hr";
|
|
817
|
-
}
|
|
818
|
-
static clone(e) {
|
|
819
|
-
return new z(e?.__key);
|
|
820
|
-
}
|
|
821
|
-
static importJSON(e) {
|
|
822
|
-
return Oe();
|
|
823
|
-
}
|
|
824
|
-
exportJSON() {
|
|
825
|
-
return {
|
|
826
|
-
...super.exportJSON()
|
|
827
|
-
};
|
|
828
|
-
}
|
|
829
|
-
createDOM(e, n) {
|
|
830
|
-
const r = document.createElement("hr");
|
|
831
|
-
return r.style = "margin: 2rem 0;", r;
|
|
832
|
-
}
|
|
833
|
-
updateDOM(e, n, r) {
|
|
834
|
-
return !1;
|
|
835
|
-
}
|
|
836
|
-
decorate(e) {
|
|
837
|
-
return null;
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
function Oe() {
|
|
841
|
-
return new z();
|
|
842
|
-
}
|
|
843
|
-
function yt(t) {
|
|
844
|
-
return t instanceof z;
|
|
845
|
-
}
|
|
846
|
-
const Xn = hn(() => import("./MermaidComponent-X__B6qib.js"));
|
|
847
|
-
class v extends F {
|
|
848
|
-
__code;
|
|
849
|
-
static getType() {
|
|
850
|
-
return "mermaid";
|
|
851
|
-
}
|
|
852
|
-
static clone(e) {
|
|
853
|
-
return new v(e.__code, e.__key);
|
|
854
|
-
}
|
|
855
|
-
constructor(e, n) {
|
|
856
|
-
super(n), this.__code = e;
|
|
857
|
-
}
|
|
858
|
-
createDOM() {
|
|
859
|
-
return document.createElement("div");
|
|
860
|
-
}
|
|
861
|
-
updateDOM() {
|
|
862
|
-
return !1;
|
|
863
|
-
}
|
|
864
|
-
static importJSON(e) {
|
|
865
|
-
return new v(e.code);
|
|
866
|
-
}
|
|
867
|
-
exportJSON() {
|
|
868
|
-
return {
|
|
869
|
-
type: "mermaid",
|
|
870
|
-
code: this.__code,
|
|
871
|
-
version: 1
|
|
872
|
-
};
|
|
873
|
-
}
|
|
874
|
-
getTextContent() {
|
|
875
|
-
return `\`\`\`mermaid
|
|
876
|
-
${this.__code}
|
|
877
|
-
\`\`\``;
|
|
878
|
-
}
|
|
879
|
-
getCode() {
|
|
880
|
-
return this.__code;
|
|
881
|
-
}
|
|
882
|
-
setCode(e) {
|
|
883
|
-
const n = this.getWritable();
|
|
884
|
-
n.__code = e;
|
|
885
|
-
}
|
|
886
|
-
decorate() {
|
|
887
|
-
return /* @__PURE__ */ h(it, { fallback: null, children: /* @__PURE__ */ h(Xn, { code: this.__code, nodeKey: this.__key }) });
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
function Yn(t) {
|
|
891
|
-
return t instanceof v;
|
|
892
|
-
}
|
|
893
|
-
function Zn(t) {
|
|
894
|
-
return q(new v(t));
|
|
895
|
-
}
|
|
896
|
-
const er = {
|
|
897
|
-
dependencies: [z],
|
|
898
|
-
export: (t) => yt(t) ? "***" : null,
|
|
899
|
-
regExp: /^(---|\*\*\*|___)\s?$/,
|
|
900
|
-
replace: (t) => {
|
|
901
|
-
const e = Oe();
|
|
902
|
-
t.replace(e);
|
|
903
|
-
},
|
|
904
|
-
type: "element"
|
|
905
|
-
}, tr = {
|
|
906
|
-
dependencies: [ye],
|
|
907
|
-
export: (t, e) => {
|
|
908
|
-
if (t instanceof ye) {
|
|
909
|
-
let n = t.getTextContent();
|
|
910
|
-
if (t.hasFormat("bold"))
|
|
911
|
-
n = `**${n}**`;
|
|
912
|
-
else if (t.hasFormat("italic"))
|
|
913
|
-
n = `*${n}*`;
|
|
914
|
-
else if (t.hasFormat("underline"))
|
|
915
|
-
n = `<ins>${n}</ins>`;
|
|
916
|
-
else
|
|
917
|
-
return null;
|
|
918
|
-
return n;
|
|
919
|
-
}
|
|
920
|
-
return null;
|
|
921
|
-
},
|
|
922
|
-
regExp: /<ins>(.*)<\/ins>/,
|
|
923
|
-
importRegExp: /<ins>(.*)<\/ins>/,
|
|
924
|
-
replace: (t, e) => {
|
|
925
|
-
const n = N(e[1]);
|
|
926
|
-
n.toggleFormat("underline"), t.replace(n);
|
|
927
|
-
},
|
|
928
|
-
type: "text-match"
|
|
929
|
-
}, nr = {
|
|
930
|
-
dependencies: [ye],
|
|
931
|
-
export: (t, e) => null,
|
|
932
|
-
regExp: /<u>(.*)<\/u>/,
|
|
933
|
-
importRegExp: /<u>(.*)<\/u>/,
|
|
934
|
-
replace: (t, e) => {
|
|
935
|
-
const n = N(e[1]);
|
|
936
|
-
n.toggleFormat("underline"), t.replace(n);
|
|
937
|
-
},
|
|
938
|
-
type: "text-match"
|
|
939
|
-
}, Fe = /https?:\/\/[^\s<>"']*[^\s<>"'.,:;"')\]}]/, H = (t) => t.replace(/\\([*_`~\\])/g, "$1"), rr = (t) => t.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), ir = (t) => t?.replace(/\\(["\\])/g, "$1"), bt = (t, e, n) => {
|
|
940
|
-
if (t !== e)
|
|
941
|
-
return n;
|
|
942
|
-
const r = e.replace(/([*_`~\\])/g, "\\$1");
|
|
943
|
-
return n.replace(r, e);
|
|
944
|
-
}, sr = {
|
|
945
|
-
dependencies: [Ee],
|
|
946
|
-
export: (t, e) => {
|
|
947
|
-
if (!Ve(t) || Ge(t))
|
|
948
|
-
return null;
|
|
949
|
-
const n = t.getTitle(), r = H(t.getURL()), i = bt(t.getTextContent(), r, e(t));
|
|
950
|
-
return n != null ? `[${i}](${r} "${rr(n)}")` : `[${i}](${r})`;
|
|
951
|
-
},
|
|
952
|
-
importRegExp: /(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,
|
|
953
|
-
regExp: /(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,
|
|
954
|
-
replace: (t, e) => {
|
|
955
|
-
const [, n, r, i] = e, s = H(r), l = Rt(s, {
|
|
956
|
-
title: ir(i)
|
|
957
|
-
}), a = n.split("[").length - 1, o = n.split("]").length - 1;
|
|
958
|
-
let c = n, u = "";
|
|
959
|
-
if (a < o)
|
|
960
|
-
return;
|
|
961
|
-
if (a > o) {
|
|
962
|
-
const _ = n.split("[");
|
|
963
|
-
u = `[${_[0]}`, c = _.slice(1).join("[");
|
|
964
|
-
}
|
|
965
|
-
const d = H(c), p = N(d === s ? s : d);
|
|
966
|
-
return p.setFormat(t.getFormat()), l.append(p), t.replace(l), u && l.insertBefore(N(u)), p;
|
|
967
|
-
},
|
|
968
|
-
trigger: ")",
|
|
969
|
-
type: "text-match"
|
|
970
|
-
}, lr = {
|
|
971
|
-
dependencies: [We],
|
|
972
|
-
export: (t, e) => {
|
|
973
|
-
if (!Ge(t))
|
|
974
|
-
return null;
|
|
975
|
-
const n = H(t.getURL());
|
|
976
|
-
return bt(t.getTextContent(), n, e(t));
|
|
977
|
-
},
|
|
978
|
-
regExp: Fe,
|
|
979
|
-
importRegExp: Fe,
|
|
980
|
-
replace: (t, e) => {
|
|
981
|
-
const n = H(e[0]), r = It(n), i = N(n);
|
|
982
|
-
i.setFormat(t.getFormat()), r.append(i), t.replace(r);
|
|
983
|
-
},
|
|
984
|
-
type: "text-match"
|
|
985
|
-
}, or = [er, tr, nr, sr, lr], di = [Ht, Ee, We, V, K, j, W, Jt, At, Dt, Xe, Gt, v, O, z, S], ar = [Pt, ...zt.filter((t) => t !== Ut), ...or, Gn, Qn], pi = [...ar, Sn], hi = vn;
|
|
986
|
-
function cr(t) {
|
|
987
|
-
return t.trim().toLowerCase() === "mermaid";
|
|
988
|
-
}
|
|
989
|
-
function ur(t) {
|
|
990
|
-
const e = t.getLanguage() ?? "plaintext";
|
|
991
|
-
return cr(e) ? (t.replace(new v(t.getTextContent())), !0) : !1;
|
|
992
|
-
}
|
|
993
|
-
function fi() {
|
|
994
|
-
const t = x(3), [e] = le();
|
|
995
|
-
let n, r;
|
|
996
|
-
return t[0] !== e ? (n = () => {
|
|
997
|
-
e.update(dr);
|
|
998
|
-
}, r = [e], t[0] = e, t[1] = n, t[2] = r) : (n = t[1], r = t[2]), oe(n, r), null;
|
|
999
|
-
}
|
|
1000
|
-
function dr() {
|
|
1001
|
-
const t = sn(Xe);
|
|
1002
|
-
for (const e of t)
|
|
1003
|
-
ur(e);
|
|
1004
|
-
}
|
|
1005
|
-
function mi() {
|
|
1006
|
-
const t = x(3), [e] = le();
|
|
1007
|
-
let n, r;
|
|
1008
|
-
return t[0] !== e ? (n = () => Qt(e), r = [e], t[0] = e, t[1] = n, t[2] = r) : (n = t[1], r = t[2]), oe(n, r), null;
|
|
1009
|
-
}
|
|
1010
|
-
const pr = (t) => {
|
|
1011
|
-
let e = t.hasFormat("code") ? {
|
|
1012
|
-
type: "inlineCode",
|
|
1013
|
-
value: t.getTextContent()
|
|
1014
|
-
} : {
|
|
1015
|
-
type: "text",
|
|
1016
|
-
value: t.getTextContent()
|
|
1017
|
-
};
|
|
1018
|
-
return t.hasFormat("code") || (t.hasFormat("bold") && (e = {
|
|
1019
|
-
type: "strong",
|
|
1020
|
-
children: [e]
|
|
1021
|
-
}), t.hasFormat("italic") && (e = {
|
|
1022
|
-
type: "emphasis",
|
|
1023
|
-
children: [e]
|
|
1024
|
-
}), t.hasFormat("strikethrough") && (e = {
|
|
1025
|
-
type: "delete",
|
|
1026
|
-
children: [e]
|
|
1027
|
-
})), t.hasFormat("underline") ? [{
|
|
1028
|
-
type: "html",
|
|
1029
|
-
value: "<ins>"
|
|
1030
|
-
}, e, {
|
|
1031
|
-
type: "html",
|
|
1032
|
-
value: "</ins>"
|
|
1033
|
-
}] : [e];
|
|
1034
|
-
}, Me = (t) => {
|
|
1035
|
-
if (et(t)) return pr(t);
|
|
1036
|
-
if (tt(t)) return [{
|
|
1037
|
-
type: "break"
|
|
1038
|
-
}];
|
|
1039
|
-
if (Fn(t))
|
|
1040
|
-
return [{
|
|
1041
|
-
type: "image",
|
|
1042
|
-
url: t.getSource(),
|
|
1043
|
-
alt: t.getAlt(),
|
|
1044
|
-
title: t.getTitle()
|
|
1045
|
-
}];
|
|
1046
|
-
if (ce(t) && t.isInline()) return [{
|
|
1047
|
-
type: "inlineMath",
|
|
1048
|
-
value: t.getEquation()
|
|
1049
|
-
}];
|
|
1050
|
-
if (_t(t)) return [{
|
|
1051
|
-
type: "html",
|
|
1052
|
-
value: t.getSource()
|
|
1053
|
-
}];
|
|
1054
|
-
if (lt(t)) return [{
|
|
1055
|
-
type: "text",
|
|
1056
|
-
value: t.getTextContent()
|
|
1057
|
-
}];
|
|
1058
|
-
if (Ve(t))
|
|
1059
|
-
return [{
|
|
1060
|
-
type: "link",
|
|
1061
|
-
url: Wn(t) ? t.getSource() : t.getURL(),
|
|
1062
|
-
title: t.getTitle(),
|
|
1063
|
-
children: ie(t)
|
|
1064
|
-
}];
|
|
1065
|
-
if (Ze(t)) return ie(t);
|
|
1066
|
-
const e = t.getTextContent();
|
|
1067
|
-
return e ? [{
|
|
1068
|
-
type: "text",
|
|
1069
|
-
value: e
|
|
1070
|
-
}] : [];
|
|
1071
|
-
}, ie = (t) => t.getChildren().flatMap(Me), hr = (t) => {
|
|
1072
|
-
const e = [], n = [], r = () => {
|
|
1073
|
-
n.length && e.push({
|
|
1074
|
-
type: "paragraph",
|
|
1075
|
-
children: n.splice(0)
|
|
1076
|
-
});
|
|
1077
|
-
};
|
|
1078
|
-
for (const i of t.getChildren())
|
|
1079
|
-
if (et(i) || tt(i) || ln(i))
|
|
1080
|
-
n.push(...Me(i));
|
|
1081
|
-
else {
|
|
1082
|
-
r();
|
|
1083
|
-
const s = Ct(i);
|
|
1084
|
-
s && e.push(s);
|
|
1085
|
-
}
|
|
1086
|
-
return r(), e;
|
|
1087
|
-
}, we = (t) => ({
|
|
1088
|
-
type: "paragraph",
|
|
1089
|
-
children: ie(t)
|
|
1090
|
-
}), fr = (t) => {
|
|
1091
|
-
const e = [], n = [];
|
|
1092
|
-
for (const r of t.getChildren())
|
|
1093
|
-
Qe(r) ? (n.length && e.push({
|
|
1094
|
-
type: "paragraph",
|
|
1095
|
-
children: n.splice(0)
|
|
1096
|
-
}), e.push(xt(r))) : Ye(r) ? (n.length && e.push({
|
|
1097
|
-
type: "paragraph",
|
|
1098
|
-
children: n.splice(0)
|
|
1099
|
-
}), e.push(we(r))) : n.push(...Me(r));
|
|
1100
|
-
return (n.length || e.length === 0) && e.unshift({
|
|
1101
|
-
type: "paragraph",
|
|
1102
|
-
children: n
|
|
1103
|
-
}), {
|
|
1104
|
-
type: "listItem",
|
|
1105
|
-
checked: t.getChecked(),
|
|
1106
|
-
spread: !1,
|
|
1107
|
-
children: e
|
|
1108
|
-
};
|
|
1109
|
-
}, xt = (t) => ({
|
|
1110
|
-
type: "list",
|
|
1111
|
-
ordered: t.getListType() === "number",
|
|
1112
|
-
start: t.getListType() === "number" ? t.getStart() : null,
|
|
1113
|
-
spread: !1,
|
|
1114
|
-
children: t.getChildren().filter(Bt).map(fr)
|
|
1115
|
-
}), qe = (t) => ({
|
|
1116
|
-
type: "tableCell",
|
|
1117
|
-
children: ut(t)
|
|
1118
|
-
}), mr = (t) => {
|
|
1119
|
-
const e = t.getTable();
|
|
1120
|
-
return {
|
|
1121
|
-
type: "table",
|
|
1122
|
-
align: e.columns.map((n) => n.alignment),
|
|
1123
|
-
children: [{
|
|
1124
|
-
type: "tableRow",
|
|
1125
|
-
children: e.columns.map((n) => qe(n.label))
|
|
1126
|
-
}, ...e.rows.map((n) => ({
|
|
1127
|
-
type: "tableRow",
|
|
1128
|
-
children: e.columns.map((r) => qe(n.cells[r.id] ?? ""))
|
|
1129
|
-
}))]
|
|
1130
|
-
};
|
|
1131
|
-
}, Ct = (t) => {
|
|
1132
|
-
if (Ye(t)) return we(t);
|
|
1133
|
-
if (Kt(t))
|
|
1134
|
-
return {
|
|
1135
|
-
type: "heading",
|
|
1136
|
-
depth: Number(t.getTag().slice(1)),
|
|
1137
|
-
children: ie(t)
|
|
1138
|
-
};
|
|
1139
|
-
if (jt(t))
|
|
1140
|
-
return {
|
|
1141
|
-
type: "blockquote",
|
|
1142
|
-
children: hr(t)
|
|
1143
|
-
};
|
|
1144
|
-
if (Qe(t)) return xt(t);
|
|
1145
|
-
if (Xt(t))
|
|
1146
|
-
return {
|
|
1147
|
-
type: "code",
|
|
1148
|
-
lang: t.getLanguage() || null,
|
|
1149
|
-
meta: null,
|
|
1150
|
-
value: t.getTextContent()
|
|
1151
|
-
};
|
|
1152
|
-
if (Yn(t)) return {
|
|
1153
|
-
type: "code",
|
|
1154
|
-
lang: "mermaid",
|
|
1155
|
-
meta: null,
|
|
1156
|
-
value: t.getCode()
|
|
1157
|
-
};
|
|
1158
|
-
if (ce(t)) return {
|
|
1159
|
-
type: "math",
|
|
1160
|
-
meta: null,
|
|
1161
|
-
value: t.getEquation()
|
|
1162
|
-
};
|
|
1163
|
-
if (yt(t)) return {
|
|
1164
|
-
type: "thematicBreak"
|
|
1165
|
-
};
|
|
1166
|
-
if (xe(t)) return mr(t);
|
|
1167
|
-
if (_t(t)) return {
|
|
1168
|
-
type: "html",
|
|
1169
|
-
value: t.getSource()
|
|
1170
|
-
};
|
|
1171
|
-
if (Ze(t)) return we(t);
|
|
1172
|
-
const e = t.getTextContent();
|
|
1173
|
-
return e ? {
|
|
1174
|
-
type: "paragraph",
|
|
1175
|
-
children: [{
|
|
1176
|
-
type: "text",
|
|
1177
|
-
value: e
|
|
1178
|
-
}]
|
|
1179
|
-
} : null;
|
|
1180
|
-
}, Pe = (t) => {
|
|
1181
|
-
const e = {
|
|
1182
|
-
type: "root",
|
|
1183
|
-
children: t.getChildren().map(Ct).filter((n) => n !== null)
|
|
1184
|
-
};
|
|
1185
|
-
return ct(e);
|
|
1186
|
-
}, _r = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/g, T = (t, e) => {
|
|
1187
|
-
const n = N(t);
|
|
1188
|
-
for (const r of e) n.toggleFormat(r);
|
|
1189
|
-
return n;
|
|
1190
|
-
}, gr = (t, e) => {
|
|
1191
|
-
const n = [];
|
|
1192
|
-
let r = 0;
|
|
1193
|
-
for (const i of t.matchAll(_r)) {
|
|
1194
|
-
const s = i.index ?? 0;
|
|
1195
|
-
s > r && n.push(T(t.slice(r, s), e));
|
|
1196
|
-
const l = i[2] ?? "", a = /^(?:https?:\/\/|\/)/i.test(l) ? l : `#${l}`;
|
|
1197
|
-
n.push(Te(a, l)), r = s + i[0].length;
|
|
1198
|
-
}
|
|
1199
|
-
return r < t.length && n.push(T(t.slice(r), e)), n;
|
|
1200
|
-
}, ze = (t, e) => e.definitions.get(t.identifier.toLowerCase());
|
|
1201
|
-
function kr(t, e, n) {
|
|
1202
|
-
switch (t.type) {
|
|
1203
|
-
case "text":
|
|
1204
|
-
return gr(t.value, n);
|
|
1205
|
-
case "strong":
|
|
1206
|
-
return C(t.children, e, /* @__PURE__ */ new Set([...n, "bold"]));
|
|
1207
|
-
case "emphasis":
|
|
1208
|
-
return C(t.children, e, /* @__PURE__ */ new Set([...n, "italic"]));
|
|
1209
|
-
case "delete":
|
|
1210
|
-
return C(t.children, e, /* @__PURE__ */ new Set([...n, "strikethrough"]));
|
|
1211
|
-
case "inlineCode":
|
|
1212
|
-
return [T(t.value, /* @__PURE__ */ new Set([...n, "code"]))];
|
|
1213
|
-
case "break":
|
|
1214
|
-
return [on()];
|
|
1215
|
-
case "link": {
|
|
1216
|
-
const r = Ne(t.url, e.resolver, {
|
|
1217
|
-
title: t.title
|
|
1218
|
-
});
|
|
1219
|
-
return r.append(...C(t.children, e, n)), [r];
|
|
1220
|
-
}
|
|
1221
|
-
case "linkReference": {
|
|
1222
|
-
const r = ze(t, e);
|
|
1223
|
-
if (!r) return [T(U([t]), n)];
|
|
1224
|
-
const i = Ne(r.url, e.resolver, {
|
|
1225
|
-
title: r.title
|
|
1226
|
-
});
|
|
1227
|
-
return i.append(...C(t.children, e, n)), [i];
|
|
1228
|
-
}
|
|
1229
|
-
case "image":
|
|
1230
|
-
return [be(t.url, t.alt ?? "", t.title ?? null)];
|
|
1231
|
-
case "imageReference": {
|
|
1232
|
-
const r = ze(t, e);
|
|
1233
|
-
return r ? [be(r.url, t.alt ?? "", r.title ?? null)] : [T(U([t]), n)];
|
|
1234
|
-
}
|
|
1235
|
-
case "inlineMath":
|
|
1236
|
-
return [P(t.value, !0)];
|
|
1237
|
-
case "html":
|
|
1238
|
-
return [ve(t.value, "inline")];
|
|
1239
|
-
default:
|
|
1240
|
-
return [T(U([t]), n)];
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
function C(t, e, n = /* @__PURE__ */ new Set()) {
|
|
1244
|
-
const r = [];
|
|
1245
|
-
let i = 0;
|
|
1246
|
-
for (const s of t) {
|
|
1247
|
-
if (s.type === "html" && /^<(?:ins|u)>$/i.test(s.value.trim())) {
|
|
1248
|
-
i += 1;
|
|
1249
|
-
continue;
|
|
1250
|
-
}
|
|
1251
|
-
if (s.type === "html" && /^<\/(?:ins|u)>$/i.test(s.value.trim())) {
|
|
1252
|
-
i = Math.max(i - 1, 0);
|
|
1253
|
-
continue;
|
|
1254
|
-
}
|
|
1255
|
-
const l = new Set(n);
|
|
1256
|
-
i > 0 && l.add("underline"), r.push(...kr(s, e, l));
|
|
1257
|
-
}
|
|
1258
|
-
return r;
|
|
1259
|
-
}
|
|
1260
|
-
const yr = (t, e) => {
|
|
1261
|
-
e.tableIndex += 1;
|
|
1262
|
-
const n = `table-${e.tableIndex}`, r = t.children[0], i = Math.max(r?.children.length ?? 0, 1), s = Array.from({
|
|
1263
|
-
length: i
|
|
1264
|
-
}, (a, o) => ({
|
|
1265
|
-
id: `${n}-column-${o + 1}`,
|
|
1266
|
-
label: r?.children[o] ? U(r.children[o].children) : "",
|
|
1267
|
-
alignment: t.align?.[o] ?? null
|
|
1268
|
-
})), l = t.children.slice(1).map((a, o) => ({
|
|
1269
|
-
id: `${n}-row-${o + 1}`,
|
|
1270
|
-
cells: Object.fromEntries(s.map((c, u) => [c.id, a.children[u] ? U(a.children[u].children) : ""]))
|
|
1271
|
-
}));
|
|
1272
|
-
return {
|
|
1273
|
-
columns: s,
|
|
1274
|
-
rows: l
|
|
1275
|
-
};
|
|
1276
|
-
}, br = (t, e, n) => {
|
|
1277
|
-
if (e.type !== "listItem") return;
|
|
1278
|
-
const r = qt(e.checked ?? void 0);
|
|
1279
|
-
t.append(r);
|
|
1280
|
-
for (const i of e.children)
|
|
1281
|
-
i.type === "paragraph" ? r.append(...C(i.children, n)) : i.type === "list" ? Le(r, i, n) : r.append(T($e(i), /* @__PURE__ */ new Set()));
|
|
1282
|
-
}, Le = (t, e, n) => {
|
|
1283
|
-
switch (e.type) {
|
|
1284
|
-
case "paragraph": {
|
|
1285
|
-
const r = re();
|
|
1286
|
-
r.append(...C(e.children, n)), t.append(r);
|
|
1287
|
-
break;
|
|
1288
|
-
}
|
|
1289
|
-
case "heading": {
|
|
1290
|
-
const r = Vt(`h${e.depth}`);
|
|
1291
|
-
r.append(...C(e.children, n)), t.append(r);
|
|
1292
|
-
break;
|
|
1293
|
-
}
|
|
1294
|
-
case "blockquote": {
|
|
1295
|
-
const r = Wt();
|
|
1296
|
-
t.append(r);
|
|
1297
|
-
for (const [i, s] of e.children.entries())
|
|
1298
|
-
s.type === "paragraph" ? (e.children[i - 1]?.type === "paragraph" && r.append(N(`
|
|
1299
|
-
|
|
1300
|
-
`)), r.append(...C(s.children, n))) : Le(r, s, n);
|
|
1301
|
-
break;
|
|
1302
|
-
}
|
|
1303
|
-
case "list": {
|
|
1304
|
-
const r = e.children.some((l) => l.checked !== null && l.checked !== void 0);
|
|
1305
|
-
let i = "bullet";
|
|
1306
|
-
e.ordered ? i = "number" : r && (i = "check");
|
|
1307
|
-
const s = Ft(i, e.start ?? 1);
|
|
1308
|
-
t.append(s);
|
|
1309
|
-
for (const l of e.children) br(s, l, n);
|
|
1310
|
-
break;
|
|
1311
|
-
}
|
|
1312
|
-
case "code":
|
|
1313
|
-
t.append(e.lang === "mermaid" ? Zn(e.value) : Yt(e.lang ?? void 0).append(N(e.value)));
|
|
1314
|
-
break;
|
|
1315
|
-
case "math":
|
|
1316
|
-
t.append(P(e.value, !1));
|
|
1317
|
-
break;
|
|
1318
|
-
case "thematicBreak":
|
|
1319
|
-
t.append(Oe());
|
|
1320
|
-
break;
|
|
1321
|
-
case "table":
|
|
1322
|
-
t.append(kt(yr(e, n)));
|
|
1323
|
-
break;
|
|
1324
|
-
case "html":
|
|
1325
|
-
t.append(ve(e.value, "block"));
|
|
1326
|
-
break;
|
|
1327
|
-
case "definition":
|
|
1328
|
-
break;
|
|
1329
|
-
default: {
|
|
1330
|
-
const r = re();
|
|
1331
|
-
r.append(N($e(e))), t.append(r);
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
}, xr = (t, e) => {
|
|
1335
|
-
const n = at(t), i = {
|
|
1336
|
-
definitions: new Map(n.children.filter((l) => l.type === "definition").map((l) => [l.identifier.toLowerCase(), l])),
|
|
1337
|
-
resolver: e,
|
|
1338
|
-
tableIndex: 0
|
|
1339
|
-
}, s = nt();
|
|
1340
|
-
s.clear();
|
|
1341
|
-
for (const l of n.children) Le(s, l, i);
|
|
1342
|
-
s.isEmpty() && s.append(re());
|
|
1343
|
-
}, ee = (t) => {
|
|
1344
|
-
const e = t.position?.start.offset, n = t.position?.end.offset;
|
|
1345
|
-
return e === void 0 || n === void 0 ? null : {
|
|
1346
|
-
end: n,
|
|
1347
|
-
start: e
|
|
1348
|
-
};
|
|
1349
|
-
}, Ue = (t) => typeof t == "object" && t !== null && "children" in t && Array.isArray(t.children), Cr = (t) => typeof t == "object" && t !== null && "type" in t && (t.type === "link" || t.type === "linkReference"), ue = (t) => {
|
|
1350
|
-
const e = [];
|
|
1351
|
-
if (!Ue(t)) return e;
|
|
1352
|
-
for (const n of t.children)
|
|
1353
|
-
Cr(n) && e.push(n), Ue(n) && e.push(...ue(n));
|
|
1354
|
-
return e;
|
|
1355
|
-
}, ne = (t) => B(t).children.flatMap((e) => e.type === "table" ? [] : ue(e).map((n) => ({
|
|
1356
|
-
block: e,
|
|
1357
|
-
node: n
|
|
1358
|
-
}))), Nr = (t, e, n, r, i, s) => {
|
|
1359
|
-
const l = ee(r), a = ee(s);
|
|
1360
|
-
if (!l || !a) return [];
|
|
1361
|
-
const o = i.map(ee);
|
|
1362
|
-
if (o.some((m) => !m)) return [];
|
|
1363
|
-
const c = [];
|
|
1364
|
-
let u = l.start;
|
|
1365
|
-
for (const m of o) {
|
|
1366
|
-
if (!m) return [];
|
|
1367
|
-
c.push(t.slice(u, m.start)), u = m.end;
|
|
1368
|
-
}
|
|
1369
|
-
c.push(t.slice(u, l.end));
|
|
1370
|
-
const d = e.slice(a.start, a.end), p = c[0] ?? "";
|
|
1371
|
-
if (!d.startsWith(p)) return [];
|
|
1372
|
-
const _ = [];
|
|
1373
|
-
let g = p.length;
|
|
1374
|
-
for (let m = 0; m < i.length; m += 1) {
|
|
1375
|
-
const k = c[m + 1] ?? "", y = m === i.length - 1 ? d.length - k.length : d.indexOf(k, g);
|
|
1376
|
-
if (y < g) return [];
|
|
1377
|
-
_.push({
|
|
1378
|
-
start: g,
|
|
1379
|
-
end: y,
|
|
1380
|
-
value: d.slice(g, y)
|
|
1381
|
-
}), g = y + k.length;
|
|
1382
|
-
}
|
|
1383
|
-
return g !== d.length ? [] : _.flatMap((m, k) => {
|
|
1384
|
-
if (ne(m.value).length > 0) return [];
|
|
1385
|
-
const y = ee(n[k]?.node ?? {}), w = o[k];
|
|
1386
|
-
return !y || !w ? [] : [{
|
|
1387
|
-
edit: {
|
|
1388
|
-
...y,
|
|
1389
|
-
replacement: m.value
|
|
1390
|
-
},
|
|
1391
|
-
normalization: {
|
|
1392
|
-
start: a.start + m.start,
|
|
1393
|
-
end: a.start + m.end,
|
|
1394
|
-
replacement: t.slice(w.start, w.end)
|
|
1395
|
-
}
|
|
1396
|
-
}];
|
|
1397
|
-
});
|
|
1398
|
-
}, wr = (t, e, n, r, i, s, l, a) => {
|
|
1399
|
-
const o = s.map((c, u) => u);
|
|
1400
|
-
o.sort((c, u) => +(u === l) - +(c === l));
|
|
1401
|
-
for (const c of o) {
|
|
1402
|
-
if (a.has(c)) continue;
|
|
1403
|
-
const u = s[c];
|
|
1404
|
-
if (!u) continue;
|
|
1405
|
-
const d = ue(u);
|
|
1406
|
-
if (i.length <= d.length) continue;
|
|
1407
|
-
const p = Nr(e, n, t, r, i, u);
|
|
1408
|
-
if (p.length === i.length - d.length)
|
|
1409
|
-
return {
|
|
1410
|
-
currentBlockIndex: c,
|
|
1411
|
-
replacements: p
|
|
1412
|
-
};
|
|
1413
|
-
}
|
|
1414
|
-
return null;
|
|
1415
|
-
}, Er = (t, e, n) => {
|
|
1416
|
-
const r = ne(t);
|
|
1417
|
-
if (ne(n).length >= ne(e).length)
|
|
1418
|
-
return {
|
|
1419
|
-
edits: [],
|
|
1420
|
-
normalizedCurrent: n
|
|
1421
|
-
};
|
|
1422
|
-
const i = B(e), s = B(n), l = [], a = [], o = /* @__PURE__ */ new Set();
|
|
1423
|
-
let c = 0;
|
|
1424
|
-
for (let d = 0; d < i.children.length; d += 1) {
|
|
1425
|
-
const p = i.children[d];
|
|
1426
|
-
if (!p || p.type === "table") continue;
|
|
1427
|
-
const _ = ue(p), g = wr(r.slice(c, c + _.length), e, n, p, _, s.children, d, o);
|
|
1428
|
-
if (g) {
|
|
1429
|
-
for (const m of g.replacements)
|
|
1430
|
-
l.push(m.edit), a.push(m.normalization);
|
|
1431
|
-
o.add(g.currentBlockIndex);
|
|
1432
|
-
}
|
|
1433
|
-
c += _.length;
|
|
1434
|
-
}
|
|
1435
|
-
let u = n;
|
|
1436
|
-
for (const d of a.sort((p, _) => _.start - p.start))
|
|
1437
|
-
u = u.slice(0, d.start) + d.replacement + u.slice(d.end);
|
|
1438
|
-
return {
|
|
1439
|
-
edits: l,
|
|
1440
|
-
normalizedCurrent: u
|
|
1441
|
-
};
|
|
1442
|
-
};
|
|
1443
|
-
function* Tr(t, e) {
|
|
1444
|
-
const n = B(t).children, r = B(e).children;
|
|
1445
|
-
if (!(n.length === r.length && n.every((a, o) => a.type === r[o]?.type && a.position?.end.offset !== void 0 && r[o]?.position?.end.offset !== void 0))) {
|
|
1446
|
-
yield* te(t, e);
|
|
1447
|
-
return;
|
|
1448
|
-
}
|
|
1449
|
-
let s = 0, l = 0;
|
|
1450
|
-
for (let a = 0; a < n.length; a += 1) {
|
|
1451
|
-
const o = n[a].position.end.offset, c = r[a].position.end.offset;
|
|
1452
|
-
yield* te(t.slice(s, o), e.slice(l, c)), s = o, l = c;
|
|
1453
|
-
}
|
|
1454
|
-
yield* te(t.slice(s), e.slice(l));
|
|
1455
|
-
}
|
|
1456
|
-
const He = (t, e) => {
|
|
1457
|
-
const n = Array.from({
|
|
1458
|
-
length: t.length + 1
|
|
1459
|
-
}).fill(-1), r = Array.from({
|
|
1460
|
-
length: t.length + 1
|
|
1461
|
-
}).fill(-1);
|
|
1462
|
-
let i = 0, s = 0, l = !1;
|
|
1463
|
-
n[0] = 0, r[0] = 0;
|
|
1464
|
-
for (const a of Tr(t, e)) {
|
|
1465
|
-
const o = a.value.length;
|
|
1466
|
-
if (a.added) {
|
|
1467
|
-
r[i] = s, s += o, n[i] = s, l && (r[i] = s), l = !1;
|
|
1468
|
-
continue;
|
|
1469
|
-
}
|
|
1470
|
-
if (a.removed) {
|
|
1471
|
-
for (let c = 0; c <= o; c += 1)
|
|
1472
|
-
n[i + c] = s, r[i + c] = s;
|
|
1473
|
-
i += o, l = !0;
|
|
1474
|
-
continue;
|
|
1475
|
-
}
|
|
1476
|
-
for (let c = 0; c <= o; c += 1) {
|
|
1477
|
-
const u = i + c;
|
|
1478
|
-
n[u] = s + c, (r[u] === void 0 || r[u] < 0) && (r[u] = s + c);
|
|
1479
|
-
}
|
|
1480
|
-
i += o, s += o, l = !1;
|
|
1481
|
-
}
|
|
1482
|
-
return {
|
|
1483
|
-
end: r,
|
|
1484
|
-
start: n
|
|
1485
|
-
};
|
|
1486
|
-
}, Nt = (t, e, n) => {
|
|
1487
|
-
for (let r = e; r >= 0 && r < t.length; r += n) {
|
|
1488
|
-
const i = t[r];
|
|
1489
|
-
if (i !== void 0 && i >= 0) return i;
|
|
1490
|
-
}
|
|
1491
|
-
return n === -1 ? 0 : t.at(-1) ?? 0;
|
|
1492
|
-
}, $r = (t, e) => {
|
|
1493
|
-
const n = t.start[e];
|
|
1494
|
-
return n !== void 0 && n >= 0 ? n : Nt(t.start, e, -1);
|
|
1495
|
-
}, Je = (t, e) => {
|
|
1496
|
-
const n = t.end[e];
|
|
1497
|
-
return n !== void 0 && n >= 0 ? n : Nt(t.end, e, 1);
|
|
1498
|
-
}, Sr = (t, e) => {
|
|
1499
|
-
const n = [];
|
|
1500
|
-
let r = 0, i = null;
|
|
1501
|
-
const s = () => {
|
|
1502
|
-
i && (n.push(i), i = null);
|
|
1503
|
-
};
|
|
1504
|
-
for (const l of te(t, e)) {
|
|
1505
|
-
if (!l.added && !l.removed) {
|
|
1506
|
-
s(), r += l.value.length;
|
|
1507
|
-
continue;
|
|
1508
|
-
}
|
|
1509
|
-
if (i ??= {
|
|
1510
|
-
start: r,
|
|
1511
|
-
end: r,
|
|
1512
|
-
replacement: ""
|
|
1513
|
-
}, l.added) {
|
|
1514
|
-
i.replacement += l.value;
|
|
1515
|
-
continue;
|
|
1516
|
-
}
|
|
1517
|
-
r += l.value.length, i.end = r;
|
|
1518
|
-
}
|
|
1519
|
-
return s(), n;
|
|
1520
|
-
}, vr = (t) => t.includes(`\r
|
|
1521
|
-
`) ? `\r
|
|
1522
|
-
` : `
|
|
1523
|
-
`, me = (t, e) => {
|
|
1524
|
-
const n = vr(e);
|
|
1525
|
-
return n === `
|
|
1526
|
-
` ? t : t.replaceAll(`
|
|
1527
|
-
`, n);
|
|
1528
|
-
}, se = (t) => Array.isArray(t) ? t.map(se) : !t || typeof t != "object" ? t : Object.fromEntries(Object.entries(t).filter(([e]) => e !== "position").map(([e, n]) => [e, se(n)])), wt = (t, e) => JSON.stringify(se(t)) === JSON.stringify(se(e)), _e = (t) => B(t).children.filter((e) => e.type === "table" && !!e.position), ge = (t) => t.children.flatMap((e) => e.children), Ke = (t, e) => t.children.length === e.children.length && t.children.every((n, r) => n.children.length === e.children[r]?.children.length), J = (t) => {
|
|
1529
|
-
const e = t.position?.start.offset, n = t.position?.end.offset;
|
|
1530
|
-
return e === void 0 || n === void 0 ? null : {
|
|
1531
|
-
end: n,
|
|
1532
|
-
start: e
|
|
1533
|
-
};
|
|
1534
|
-
}, Et = (t, e) => {
|
|
1535
|
-
const n = e.children[0], r = e.children.at(-1), i = n?.position?.start.offset, s = r?.position?.end.offset;
|
|
1536
|
-
if (i !== void 0 && s !== void 0)
|
|
1537
|
-
return {
|
|
1538
|
-
start: i,
|
|
1539
|
-
end: s
|
|
1540
|
-
};
|
|
1541
|
-
const l = J(e);
|
|
1542
|
-
if (!l) return null;
|
|
1543
|
-
const a = t.slice(l.start, l.end), o = a.indexOf("|"), c = a.endsWith("|") ? a.length - 1 : a.length, u = o < 0 ? 0 : o + 1, d = a.slice(u, c).match(/^\s*/)?.[0].length ?? 0, p = l.start + u + d;
|
|
1544
|
-
return {
|
|
1545
|
-
start: p,
|
|
1546
|
-
end: p
|
|
1547
|
-
};
|
|
1548
|
-
}, Or = (t, e) => {
|
|
1549
|
-
const n = Et(t, e);
|
|
1550
|
-
return n ? t.slice(n.start, n.end) : "";
|
|
1551
|
-
}, Mr = (t, e, n, r, i) => {
|
|
1552
|
-
const s = ge(n), l = ge(r);
|
|
1553
|
-
return ge(i).flatMap((o, c) => {
|
|
1554
|
-
const u = s[c], d = l[c];
|
|
1555
|
-
if (!u || !d || wt(d, o)) return [];
|
|
1556
|
-
const p = Et(t, u);
|
|
1557
|
-
return p ? [{
|
|
1558
|
-
...p,
|
|
1559
|
-
replacement: Or(e, o)
|
|
1560
|
-
}] : [];
|
|
1561
|
-
});
|
|
1562
|
-
}, Lr = (t, e, n, r, i) => {
|
|
1563
|
-
if (wt(r, i)) return [];
|
|
1564
|
-
if (Ke(r, i) && Ke(n, r) && JSON.stringify(r.align) === JSON.stringify(i.align))
|
|
1565
|
-
return Mr(t, e, n, r, i);
|
|
1566
|
-
const l = J(n), a = J(i);
|
|
1567
|
-
return !l || !a ? [] : [{
|
|
1568
|
-
start: l.start,
|
|
1569
|
-
end: l.end,
|
|
1570
|
-
replacement: e.slice(a.start, a.end)
|
|
1571
|
-
}];
|
|
1572
|
-
}, Rr = (t, e, n) => {
|
|
1573
|
-
const r = _e(t), i = _e(e), s = _e(n);
|
|
1574
|
-
if (r.length !== i.length || i.length !== s.length)
|
|
1575
|
-
return {
|
|
1576
|
-
edits: [],
|
|
1577
|
-
normalizedCurrent: n
|
|
1578
|
-
};
|
|
1579
|
-
const l = [];
|
|
1580
|
-
let a = n;
|
|
1581
|
-
for (let o = s.length - 1; o >= 0; o -= 1) {
|
|
1582
|
-
const c = r[o], u = i[o], d = s[o];
|
|
1583
|
-
if (!c || !u || !d) continue;
|
|
1584
|
-
const p = J(u), _ = J(d);
|
|
1585
|
-
!p || !_ || (a = a.slice(0, _.start) + e.slice(p.start, p.end) + a.slice(_.end), l.push(...Lr(t, n, c, u, d)));
|
|
1586
|
-
}
|
|
1587
|
-
return {
|
|
1588
|
-
edits: l,
|
|
1589
|
-
normalizedCurrent: a
|
|
1590
|
-
};
|
|
1591
|
-
}, Ir = (t, e, n, r) => {
|
|
1592
|
-
if (n === r) return t;
|
|
1593
|
-
const i = Er(t, n, r), s = Rr(t, n, i.normalizedCurrent), l = Sr(n, s.normalizedCurrent).map((o) => ({
|
|
1594
|
-
start: o.start === o.end ? Je(e, o.start) : $r(e, o.start),
|
|
1595
|
-
end: Je(e, o.end),
|
|
1596
|
-
replacement: me(o.replacement, t)
|
|
1597
|
-
})).concat(i.edits.map((o) => ({
|
|
1598
|
-
...o,
|
|
1599
|
-
replacement: me(o.replacement, t)
|
|
1600
|
-
}))).concat(s.edits.map((o) => ({
|
|
1601
|
-
...o,
|
|
1602
|
-
replacement: me(o.replacement, t)
|
|
1603
|
-
}))).sort((o, c) => c.start - o.start);
|
|
1604
|
-
let a = t;
|
|
1605
|
-
for (const o of l)
|
|
1606
|
-
a = a.slice(0, o.start) + o.replacement + a.slice(o.end);
|
|
1607
|
-
return a;
|
|
1608
|
-
}, _i = (t, e) => {
|
|
1609
|
-
let n = null, r = null;
|
|
1610
|
-
return {
|
|
1611
|
-
importToLexical() {
|
|
1612
|
-
xr(t, e), n = Pe(nt()), r = He(n, t);
|
|
1613
|
-
},
|
|
1614
|
-
exportFromLexical(i) {
|
|
1615
|
-
const s = Pe(i), l = n ?? s;
|
|
1616
|
-
return Ir(t, r ?? He(l, t), l, s);
|
|
1617
|
-
}
|
|
1618
|
-
};
|
|
1619
|
-
};
|
|
1620
|
-
function gi(t) {
|
|
1621
|
-
const e = x(4), {
|
|
1622
|
-
isEditable: n
|
|
1623
|
-
} = t, [r] = le();
|
|
1624
|
-
let i, s;
|
|
1625
|
-
return e[0] !== r || e[1] !== n ? (i = () => {
|
|
1626
|
-
r.setEditable(n);
|
|
1627
|
-
}, s = [n, r], e[0] = r, e[1] = n, e[2] = i, e[3] = s) : (i = e[2], s = e[3]), oe(i, s), null;
|
|
1628
|
-
}
|
|
1629
|
-
function ki() {
|
|
1630
|
-
const t = x(2), [e] = le();
|
|
1631
|
-
let n;
|
|
1632
|
-
return t[0] !== e ? (n = /* @__PURE__ */ h($, { fontSize: "xs", color: "fg.muted", padding: "4", children: /* @__PURE__ */ h(Tn, { treeTypeButtonClassName: "debug-treetype-button", timeTravelButtonClassName: "debug-timetravel-button", timeTravelPanelButtonClassName: "debug-timetravel-button", timeTravelPanelClassName: "debug-timetravel-panel", timeTravelPanelSliderClassName: "debug-timetravel-slider", viewClassName: "tree-view-output", editor: e }) }), t[0] = e, t[1] = n) : n = t[1], n;
|
|
1633
|
-
}
|
|
1634
|
-
const Ar = /^---\s*\n([\s\S]*?)\n---\s*(?:\n|$)/;
|
|
1635
|
-
function yi(t) {
|
|
1636
|
-
const e = t.match(Ar);
|
|
1637
|
-
return e ? {
|
|
1638
|
-
frontmatter: e[0],
|
|
1639
|
-
body: t.slice(e[0].length)
|
|
1640
|
-
} : {
|
|
1641
|
-
frontmatter: "",
|
|
1642
|
-
body: t
|
|
1643
|
-
};
|
|
1644
|
-
}
|
|
1645
|
-
export {
|
|
1646
|
-
Yn as $,
|
|
1647
|
-
mi as C,
|
|
1648
|
-
ui as E,
|
|
1649
|
-
fi as I,
|
|
1650
|
-
ci as M,
|
|
1651
|
-
gi as T,
|
|
1652
|
-
di as a,
|
|
1653
|
-
ai as b,
|
|
1654
|
-
be as c,
|
|
1655
|
-
kt as d,
|
|
1656
|
-
hi as e,
|
|
1657
|
-
_i as f,
|
|
1658
|
-
pi as g,
|
|
1659
|
-
ki as h,
|
|
1660
|
-
yi as s,
|
|
1661
|
-
vn as t
|
|
1662
|
-
};
|
|
1663
|
-
//# sourceMappingURL=markdown-BCfPxNpb.js.map
|