@pstdio/ui 0.15.0 → 0.17.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/{MermaidComponent-DBJsTOmj.js → MermaidComponent-BCMQqPqu.js} +11 -11
- package/dist/{MermaidComponent-DBJsTOmj.js.map → MermaidComponent-BCMQqPqu.js.map} +1 -1
- package/dist/browser-storage-BinyFNJX.js +40 -0
- package/dist/browser-storage-BinyFNJX.js.map +1 -0
- package/dist/chat-ui.js +1832 -1275
- package/dist/chat-ui.js.map +1 -1
- package/dist/checkbox-B2zYVemL.js +70 -0
- package/dist/checkbox-B2zYVemL.js.map +1 -0
- package/dist/components/chat-ui/components/ai-conversation.d.ts +1 -1
- package/dist/components/chat-ui/components/ai-message.d.ts +1 -1
- package/dist/components/chat-ui/components/ai-response.d.ts +0 -1
- package/dist/components/chat-ui/components/attachment-list.d.ts +1 -1
- package/dist/components/chat-ui/components/auto-scroll.d.ts +27 -0
- package/dist/components/chat-ui/components/chat-input-actions.d.ts +1 -0
- package/dist/components/chat-ui/components/chat-input.d.ts +8 -2
- package/dist/components/chat-ui/components/chat-message-animation.d.ts +22 -0
- package/dist/components/chat-ui/components/chat-panel.d.ts +11 -5
- package/dist/components/chat-ui/components/composer-constants.d.ts +1 -0
- package/dist/components/chat-ui/components/conversation-browse.d.ts +22 -0
- package/dist/components/chat-ui/components/message-types.d.ts +14 -0
- package/dist/components/chat-ui/components/queued-follow-up-list-state.d.ts +4 -0
- package/dist/components/chat-ui/components/queued-follow-up-list.d.ts +11 -0
- package/dist/components/chat-ui/components/timeline.d.ts +5 -2
- package/dist/components/chat-ui/components/working-indicator.d.ts +9 -0
- package/dist/components/chat-ui/components/workspace-hub.d.ts +8 -1
- package/dist/components/chat-ui/index.d.ts +4 -2
- package/dist/components/chat-ui/performance/chat-performance-fixtures.d.ts +0 -1
- package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +4 -14
- package/dist/components/chat-ui/tool-rendering/question-prompt.d.ts +9 -0
- package/dist/components/chat-ui/tool-rendering/shared.d.ts +1 -1
- package/dist/components/chat-ui/tool-rendering/types.d.ts +1 -2
- package/dist/components/command-palette/index.d.ts +4 -0
- package/dist/components/data-table/build-columns.d.ts +13 -2
- package/dist/components/data-table/categorical-color-cell.d.ts +8 -0
- package/dist/components/data-table/color-cell-style.d.ts +13 -0
- package/dist/components/data-table/color-scale-cell.d.ts +7 -0
- package/dist/components/data-table/data-table-column-menu.d.ts +12 -0
- package/dist/components/data-table/data-table-header.d.ts +18 -0
- package/dist/components/data-table/data-table-stat-chart.d.ts +21 -0
- package/dist/components/data-table/data-table-state.d.ts +27 -0
- package/dist/components/data-table/data-table-stats-row.d.ts +11 -0
- package/dist/components/data-table/data-table-stats.d.ts +19 -0
- package/dist/components/data-table/data-table-table-parts.d.ts +21 -0
- package/dist/components/data-table/data-table.story-descriptions.d.ts +6 -0
- package/dist/components/data-table/data-table.story-fixtures.d.ts +6 -0
- package/dist/components/data-table/friendly-json-display.d.ts +31 -0
- package/dist/components/data-table/index.d.ts +3 -1
- package/dist/components/data-table/json-cell.d.ts +6 -0
- package/dist/components/data-table/pagination-footer.d.ts +4 -1
- package/dist/components/data-table/selection-toolbar.d.ts +3 -1
- package/dist/components/data-table/types.d.ts +72 -0
- package/dist/components/diff-viewer/diff-card.d.ts +1 -0
- package/dist/components/diff-viewer/diff-drawer-scroll.d.ts +0 -19
- package/dist/components/diff-viewer/diff-drawer.d.ts +1 -0
- package/dist/components/diff-viewer/index.d.ts +2 -0
- package/dist/components/diff-viewer/use-selected-diff-scroll.d.ts +7 -3
- package/dist/components/internal/style-guide.d.ts +14 -0
- package/dist/components/internal/token-editor-controls.d.ts +8 -0
- package/dist/components/internal/token-editor-data.d.ts +40 -0
- package/dist/components/internal/token-editor-state.d.ts +22 -0
- package/dist/components/{data-renderer → kanban-renderer}/display-menu.d.ts +4 -4
- package/dist/components/{data-renderer → kanban-renderer}/filter-menu.d.ts +3 -3
- package/dist/components/kanban-renderer/index.d.ts +19 -0
- package/dist/components/kanban-renderer/kanban-renderer-attribute-badge.d.ts +7 -0
- package/dist/components/{data-renderer/data-renderer-board-column-header.d.ts → kanban-renderer/kanban-renderer-board-column-header.d.ts} +2 -2
- package/dist/components/{data-renderer/data-renderer-board-group-section.d.ts → kanban-renderer/kanban-renderer-board-group-section.d.ts} +2 -2
- package/dist/components/{data-renderer/data-renderer-board-move.d.ts → kanban-renderer/kanban-renderer-board-move.d.ts} +3 -3
- package/dist/components/{data-renderer/data-renderer-board.d.ts → kanban-renderer/kanban-renderer-board.d.ts} +16 -15
- package/dist/components/{data-renderer/data-renderer-card.d.ts → kanban-renderer/kanban-renderer-card.d.ts} +5 -4
- package/dist/components/{data-renderer/data-renderer-content.d.ts → kanban-renderer/kanban-renderer-content.d.ts} +8 -8
- package/dist/components/kanban-renderer/kanban-renderer-create-dialog.d.ts +12 -0
- package/dist/components/kanban-renderer/kanban-renderer-create-field.d.ts +10 -0
- package/dist/components/kanban-renderer/kanban-renderer-grouping.d.ts +23 -0
- package/dist/components/{data-renderer/data-renderer-helpers.d.ts → kanban-renderer/kanban-renderer-helpers.d.ts} +15 -15
- package/dist/components/kanban-renderer/kanban-renderer-list-items.d.ts +25 -0
- package/dist/components/kanban-renderer/kanban-renderer-list.d.ts +43 -0
- package/dist/components/{data-renderer/data-renderer-story-fixtures.d.ts → kanban-renderer/kanban-renderer-story-fixtures.d.ts} +3 -2
- package/dist/components/kanban-renderer/kanban-renderer-toolbar.d.ts +15 -0
- package/dist/components/kanban-renderer/kanban-renderer-view-bar.d.ts +14 -0
- package/dist/components/kanban-renderer/kanban-renderer-views.d.ts +12 -0
- package/dist/components/{data-renderer/data-renderer.d.ts → kanban-renderer/kanban-renderer.d.ts} +12 -9
- package/dist/components/{data-renderer → kanban-renderer}/types.d.ts +51 -14
- package/dist/components/kanban-renderer/use-kanban-renderer-store.d.ts +78 -0
- package/dist/components/layout/index.d.ts +7 -0
- package/dist/components/layout/panel-header.constants.d.ts +3 -0
- package/dist/components/{resizable-split-layout.d.ts → layout/resizable-split-layout.d.ts} +3 -2
- package/dist/components/layout/resizable-split-layout.geometry.d.ts +56 -0
- package/dist/components/{resizable-split-layout.handle.d.ts → layout/resizable-split-layout.handle.d.ts} +6 -2
- package/dist/components/layout/resizable-split-layout.panels.d.ts +25 -0
- package/dist/components/list-row/list-row-actions.d.ts +1 -0
- package/dist/components/list-row/list-row-content.d.ts +7 -0
- package/dist/components/list-row/list-row.types.d.ts +4 -1
- package/dist/components/overlays/attached-menu.d.ts +6 -0
- package/dist/components/overlays/attachment-chip.d.ts +13 -0
- package/dist/components/overlays/index.d.ts +16 -0
- package/dist/components/{resource-context-menu.d.ts → overlays/resource-context-menu.d.ts} +13 -1
- package/dist/components/{search-modal-content.d.ts → overlays/search-modal-content.d.ts} +1 -1
- package/dist/components/{searchable-menu.d.ts → overlays/searchable-menu.d.ts} +1 -1
- package/dist/components/param-editor/index.d.ts +24 -0
- package/dist/components/param-editor/inputs/action-input.d.ts +13 -0
- package/dist/components/param-editor/inputs/anchor-grid-input.d.ts +12 -0
- package/dist/components/param-editor/inputs/anchor-grid.d.ts +4 -0
- package/dist/components/param-editor/inputs/file-accept.d.ts +22 -0
- package/dist/components/param-editor/inputs/file-drop-input.d.ts +14 -0
- package/dist/components/param-editor/inputs/numeric-value.d.ts +6 -0
- package/dist/components/param-editor/inputs/range-input.d.ts +17 -0
- package/dist/components/param-editor/inputs/range-value.d.ts +5 -0
- package/dist/components/param-editor/inputs/resource-input-chips.d.ts +15 -0
- package/dist/components/param-editor/inputs/resource-input.d.ts +18 -0
- package/dist/components/param-editor/inputs/segmented-input.d.ts +14 -0
- package/dist/components/param-editor/{selection-input.d.ts → inputs/selection-input.d.ts} +6 -6
- package/dist/components/param-editor/inputs/selection-menu.d.ts +29 -0
- package/dist/components/param-editor/inputs/slider-marks.d.ts +5 -0
- package/dist/components/param-editor/inputs/vector-input.d.ts +17 -0
- package/dist/components/param-editor/inputs/vector-value.d.ts +7 -0
- package/dist/components/param-editor/param-editor-control-item.d.ts +15 -0
- package/dist/components/param-editor/param-editor-control-list.d.ts +5 -0
- package/dist/components/param-editor/param-editor-field-label.d.ts +1 -0
- package/dist/components/param-editor/param-editor-field.d.ts +11 -0
- package/dist/components/param-editor/param-editor-horizontal.d.ts +1 -0
- package/dist/components/param-editor/param-editor-inline-group.d.ts +5 -0
- package/dist/components/param-editor/param-editor-read-only-field.d.ts +9 -0
- package/dist/components/param-editor/param-editor-section.d.ts +17 -0
- package/dist/components/param-editor/param-editor.d.ts +3 -1
- package/dist/components/param-editor/param-editor.types.d.ts +135 -24
- package/dist/components/{breadcrumb.d.ts → primitives/breadcrumb.d.ts} +1 -1
- package/dist/components/primitives/index.d.ts +28 -0
- package/dist/components/{number-input.d.ts → primitives/number-input.d.ts} +0 -2
- package/dist/components/{session-indicator.d.ts → primitives/session-indicator.d.ts} +2 -1
- package/dist/components/{tooltip.d.ts → primitives/tooltip.d.ts} +0 -1
- package/dist/components/rich-text/prompt-input/commands.d.ts +0 -17
- package/dist/components/rich-text/prompt-input/events.d.ts +0 -13
- package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.d.ts +1 -2
- package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.d.ts +2 -1
- package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.d.ts +2 -1
- package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.d.ts +2 -1
- package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +1 -2
- package/dist/components/rich-text/prompt-input/prompt-input.d.ts +3 -2
- package/dist/components/rich-text/prompt-input/utils.d.ts +1 -2
- package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidNode.d.ts +0 -1
- package/dist/components/rich-text/types.d.ts +1 -1
- package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -1
- package/dist/components/{sidebar/sidebar-footer.d.ts → sidenav/sidenav-footer.d.ts} +2 -2
- package/dist/components/{sidebar/sidebar-header.d.ts → sidenav/sidenav-header.d.ts} +2 -2
- package/dist/components/sidenav/sidenav.d.ts +2 -0
- package/dist/components/sidenav/sidenav.store.d.ts +49 -0
- package/dist/components/{sidebar/sidebar.types.d.ts → sidenav/sidenav.types.d.ts} +6 -6
- package/dist/components/tab-strip/tab-visibility-filter.d.ts +2 -1
- package/dist/components/tag-editor/tag-editor-row.d.ts +1 -1
- package/dist/components/tag-editor/tag-editor.types.d.ts +1 -1
- package/dist/components/terminal/bind-session.d.ts +33 -0
- package/dist/components/terminal/index.d.ts +6 -0
- package/dist/components/terminal/scripted-bridge.d.ts +35 -0
- package/dist/components/terminal/terminal-contract.d.ts +22 -0
- package/dist/components/terminal/terminal-theme.d.ts +12 -0
- package/dist/components/terminal/terminal.d.ts +56 -0
- package/dist/components/terminal/types.d.ts +35 -0
- package/dist/components/terminal/use-terminal-session.d.ts +21 -0
- package/dist/components/tree-list/tree-list-order-filter.d.ts +1 -2
- package/dist/components/tree-list/tree-list-visibility-filter.d.ts +1 -2
- package/dist/components/tree-list/tree-list.d.ts +2 -2
- package/dist/components/tree-list/tree-list.types.d.ts +4 -0
- package/dist/data-table.js +1271 -0
- package/dist/data-table.js.map +1 -0
- package/dist/diff-editor-BnfV8cYB.js +182 -0
- package/dist/diff-editor-BnfV8cYB.js.map +1 -0
- package/dist/diff.js +1313 -0
- package/dist/diff.js.map +1 -0
- package/dist/empty-state-Bo4HVrgr.js +34 -0
- package/dist/empty-state-Bo4HVrgr.js.map +1 -0
- package/dist/foundations/gallery/gallery-frame.d.ts +21 -0
- package/dist/foundations/gallery/sections/badges-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/buttons-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/composite-chat-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/composites-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/feedback-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/input-authoring-card.d.ts +1 -0
- package/dist/foundations/gallery/sections/inputs-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/layout-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/navigation-identity-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/overlays-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/panels-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/param-editor-composite-card.d.ts +1 -0
- package/dist/foundations/gallery/sections/settings-composite-cards.d.ts +1 -0
- package/dist/index.d.ts +14 -87
- package/dist/index.js +2027 -7501
- package/dist/index.js.map +1 -1
- package/dist/kanban-renderer-toolbar-B9ro-9z1.js +1318 -0
- package/dist/kanban-renderer-toolbar-B9ro-9z1.js.map +1 -0
- package/dist/kanban-renderer.js +1087 -0
- package/dist/kanban-renderer.js.map +1 -0
- package/dist/list-row-YRUxEcy3.js +808 -0
- package/dist/list-row-YRUxEcy3.js.map +1 -0
- package/dist/mermaid-renderer-DZo3qj6D.js +425 -0
- package/dist/mermaid-renderer-DZo3qj6D.js.map +1 -0
- package/dist/mermaid.js +5 -0
- package/dist/mermaid.js.map +1 -0
- package/dist/param-editor-CYZJbmKu.js +933 -0
- package/dist/param-editor-CYZJbmKu.js.map +1 -0
- package/dist/param-editor-read-only-field-DgtLqcFa.js +925 -0
- package/dist/param-editor-read-only-field-DgtLqcFa.js.map +1 -0
- package/dist/prism-BXb57lxL.js +125 -0
- package/dist/prism-BXb57lxL.js.map +1 -0
- package/dist/radio-cLMEBBZk.js +76 -0
- package/dist/radio-cLMEBBZk.js.map +1 -0
- package/dist/resource-badge-qCWHP-wQ.js +99 -0
- package/dist/resource-badge-qCWHP-wQ.js.map +1 -0
- package/dist/{rich-message-DNSEhxXh.js → rich-message-DBf_5YlW.js} +462 -481
- package/dist/rich-message-DBf_5YlW.js.map +1 -0
- package/dist/rich-text.js +300 -299
- package/dist/rich-text.js.map +1 -1
- package/dist/scroll-area-BMbg1WcD.js +91 -0
- package/dist/scroll-area-BMbg1WcD.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/terminal.js +359 -0
- package/dist/terminal.js.map +1 -0
- package/dist/theme/global.d.ts +3 -0
- package/dist/theme/primitives/sizes.d.ts +23 -0
- package/dist/theme/recipes/badge.d.ts +50 -0
- package/dist/theme/recipes/button.d.ts +30 -19
- package/dist/theme/recipes/color-picker.d.ts +1 -0
- package/dist/theme/recipes/dialog.d.ts +1 -1
- package/dist/theme/recipes/drawer.d.ts +1 -1
- package/dist/theme/recipes/input.d.ts +55 -0
- package/dist/theme/recipes/number-input.d.ts +98 -0
- package/dist/theme/recipes/tabs.d.ts +49 -28
- package/dist/theme/recipes/textarea.d.ts +62 -1
- package/dist/theme/recipes/timeline.d.ts +74 -0
- package/dist/theme/tokens/borders.d.ts +0 -3
- package/dist/theme/tokens/colors.d.ts +118 -94
- package/dist/{theme-25P7ij4C.js → theme-CNhnbvcE.js} +1300 -375
- package/dist/theme-CNhnbvcE.js.map +1 -0
- package/dist/theme-preference-DOzHx64J.js +123 -0
- package/dist/theme-preference-DOzHx64J.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/tree-list-CZHLAURU.js +1033 -0
- package/dist/tree-list-CZHLAURU.js.map +1 -0
- package/package.json +29 -3
- package/dist/components/data-renderer/card-interaction-guard.d.ts +0 -2
- package/dist/components/data-renderer/data-renderer-attribute-badge.d.ts +0 -7
- package/dist/components/data-renderer/data-renderer-grouping.d.ts +0 -23
- package/dist/components/data-renderer/data-renderer-list.d.ts +0 -39
- package/dist/components/data-renderer/data-renderer-toolbar.d.ts +0 -12
- package/dist/components/data-renderer/use-data-renderer-store.d.ts +0 -59
- package/dist/components/file-tree-helpers.d.ts +0 -8
- package/dist/components/open-source-notices-screen.d.ts +0 -20
- package/dist/components/panel-header.constants.d.ts +0 -1
- package/dist/components/param-editor/input-group.d.ts +0 -10
- package/dist/components/rich-text/shared/plugins/MermaidPlugin/index.d.ts +0 -1
- package/dist/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.d.ts +0 -5
- package/dist/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.d.ts +0 -2
- package/dist/components/rich-text/theme/report-theme.d.ts +0 -3
- package/dist/components/sidebar/sidebar.d.ts +0 -2
- package/dist/components/sidebar/sidebar.store.d.ts +0 -49
- package/dist/components/style-guide-data.d.ts +0 -40
- package/dist/components/style-guide.d.ts +0 -1
- package/dist/mermaid-renderer-CPGj6vsb.js +0 -570
- package/dist/mermaid-renderer-CPGj6vsb.js.map +0 -1
- package/dist/radio-DJtQY9po.js +0 -286
- package/dist/radio-DJtQY9po.js.map +0 -1
- package/dist/resource-badge-CeJTOn8F.js +0 -188
- package/dist/resource-badge-CeJTOn8F.js.map +0 -1
- package/dist/rich-message-DNSEhxXh.js.map +0 -1
- package/dist/theme-25P7ij4C.js.map +0 -1
- package/dist/utils/formats.d.ts +0 -7
- /package/dist/components/{palette-filter.d.ts → command-palette/palette-filter.d.ts} +0 -0
- /package/dist/components/{palette-list.d.ts → command-palette/palette-list.d.ts} +0 -0
- /package/dist/components/{palette-shortcut.d.ts → command-palette/palette-shortcut.d.ts} +0 -0
- /package/dist/components/{palette.d.ts → command-palette/palette.d.ts} +0 -0
- /package/dist/components/{code-editor.d.ts → diff-viewer/code-editor.d.ts} +0 -0
- /package/dist/components/{column-file-browser.d.ts → file-browser/column-file-browser.d.ts} +0 -0
- /package/dist/components/{performance-panel.d.ts → internal/performance-panel.d.ts} +0 -0
- /package/dist/components/{data-renderer/data-renderer-badge-helpers.d.ts → kanban-renderer/kanban-renderer-badge-helpers.d.ts} +0 -0
- /package/dist/components/{data-renderer/data-renderer-enum-helpers.d.ts → kanban-renderer/kanban-renderer-enum-helpers.d.ts} +0 -0
- /package/dist/components/{data-renderer → kanban-renderer}/use-resolved-attributes.d.ts +0 -0
- /package/dist/components/{header.d.ts → layout/header.d.ts} +0 -0
- /package/dist/components/{horizontal-menu-stack.d.ts → layout/horizontal-menu-stack.d.ts} +0 -0
- /package/dist/components/{item-section.d.ts → layout/item-section.d.ts} +0 -0
- /package/dist/components/{attached-panel.d.ts → overlays/attached-panel.d.ts} +0 -0
- /package/dist/components/{bubble-button.d.ts → overlays/bubble-button.d.ts} +0 -0
- /package/dist/components/{bubble-panel.d.ts → overlays/bubble-panel.d.ts} +0 -0
- /package/dist/components/{delete-confirmation-modal.d.ts → overlays/delete-confirmation-modal.d.ts} +0 -0
- /package/dist/components/{repo-picker-dialog.d.ts → overlays/repo-picker-dialog.d.ts} +0 -0
- /package/dist/components/param-editor/{color-input.d.ts → inputs/color-input.d.ts} +0 -0
- /package/dist/components/param-editor/{date-input.d.ts → inputs/date-input.d.ts} +0 -0
- /package/dist/components/param-editor/{horizontal-text-input.d.ts → inputs/horizontal-text-input.d.ts} +0 -0
- /package/dist/components/param-editor/{number-input.d.ts → inputs/number-input.d.ts} +0 -0
- /package/dist/components/param-editor/{text-input.d.ts → inputs/text-input.d.ts} +0 -0
- /package/dist/components/{alert.d.ts → primitives/alert.d.ts} +0 -0
- /package/dist/components/{checkbox.d.ts → primitives/checkbox.d.ts} +0 -0
- /package/dist/components/{content-placeholder.d.ts → primitives/content-placeholder.d.ts} +0 -0
- /package/dist/components/{empty-state.d.ts → primitives/empty-state.d.ts} +0 -0
- /package/dist/components/{error-boundary.d.ts → primitives/error-boundary.d.ts} +0 -0
- /package/dist/components/{icon-color-picker.d.ts → primitives/icon-color-picker.d.ts} +0 -0
- /package/dist/components/{info-card.d.ts → primitives/info-card.d.ts} +0 -0
- /package/dist/components/{integration-card.d.ts → primitives/integration-card.d.ts} +0 -0
- /package/dist/components/{radio.d.ts → primitives/radio.d.ts} +0 -0
- /package/dist/components/{resource-badge.d.ts → primitives/resource-badge.d.ts} +0 -0
- /package/dist/components/{scroll-area.d.ts → primitives/scroll-area.d.ts} +0 -0
- /package/dist/components/{simple-card.d.ts → primitives/simple-card.d.ts} +0 -0
- /package/dist/components/{slider.d.ts → primitives/slider.d.ts} +0 -0
- /package/dist/components/{switch.d.ts → primitives/switch.d.ts} +0 -0
- /package/dist/components/{toaster.d.ts → primitives/toaster.d.ts} +0 -0
- /package/dist/components/{workspace-badge.d.ts → primitives/workspace-badge.d.ts} +0 -0
package/dist/rich-text.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsx as n, jsxs as le, Fragment as ft } from "react/jsx-runtime";
|
|
2
2
|
import { c as te } from "react/compiler-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import { D as
|
|
5
|
-
import { IconButton as K, Text as ue, Stack as Ae, Box as
|
|
3
|
+
import { e as Ke, a as We, C as Ge, I as Ve, E as qe, b as Ye, s as mt, n as ut, c as Te, T as ht, d as pt } from "./rich-message-DBf_5YlW.js";
|
|
4
|
+
import { D as uo, f as ho, R as po, P as go, R as bo, g as vo, h as Co } from "./rich-message-DBf_5YlW.js";
|
|
5
|
+
import { IconButton as K, Text as ue, Stack as Ae, Box as ze, Flex as Me, Input as gt, Link as bt } from "@chakra-ui/react";
|
|
6
6
|
import { LexicalCollaboration as vt } from "@lexical/react/LexicalCollaborationContext";
|
|
7
7
|
import { CollaborationPluginV2__EXPERIMENTAL as Ct } from "@lexical/react/LexicalCollaborationPlugin";
|
|
8
|
-
import { LexicalComposer as
|
|
9
|
-
import { LexicalErrorBoundary as
|
|
10
|
-
import { HorizontalRulePlugin as
|
|
11
|
-
import { LinkPlugin as
|
|
12
|
-
import { ListPlugin as
|
|
13
|
-
import { RichTextPlugin as
|
|
14
|
-
import { TabIndentationPlugin as
|
|
8
|
+
import { LexicalComposer as Xe } from "@lexical/react/LexicalComposer";
|
|
9
|
+
import { LexicalErrorBoundary as Qe } from "@lexical/react/LexicalErrorBoundary";
|
|
10
|
+
import { HorizontalRulePlugin as Ze } from "@lexical/react/LexicalHorizontalRulePlugin";
|
|
11
|
+
import { LinkPlugin as Je } from "@lexical/react/LexicalLinkPlugin";
|
|
12
|
+
import { ListPlugin as et } from "@lexical/react/LexicalListPlugin";
|
|
13
|
+
import { RichTextPlugin as tt } from "@lexical/react/LexicalRichTextPlugin";
|
|
14
|
+
import { TabIndentationPlugin as nt } from "@lexical/react/LexicalTabIndentationPlugin";
|
|
15
15
|
import { useState as A, useRef as ie, useEffect as Y, useLayoutEffect as _t } from "react";
|
|
16
|
-
import { WebsocketProvider as
|
|
17
|
-
import * as
|
|
18
|
-
import { useLexicalComposerContext as
|
|
19
|
-
import { mergeRegister as
|
|
20
|
-
import { SELECTION_CHANGE_COMMAND as
|
|
21
|
-
import { Check as
|
|
16
|
+
import { WebsocketProvider as Et } from "y-websocket";
|
|
17
|
+
import * as kt from "yjs";
|
|
18
|
+
import { useLexicalComposerContext as $e } from "@lexical/react/LexicalComposerContext";
|
|
19
|
+
import { mergeRegister as Le, $findMatchingParent as Z } from "@lexical/utils";
|
|
20
|
+
import { SELECTION_CHANGE_COMMAND as Se, COMMAND_PRIORITY_CRITICAL as Ue, $getSelection as ee, $isRangeSelection as Q, createCommand as Lt, FORMAT_TEXT_COMMAND as Re, $isRootOrShadowRoot as St, CLICK_COMMAND as ot, COMMAND_PRIORITY_HIGH as it, $createParagraphNode as Fe, COMMAND_PRIORITY_LOW as Be, KEY_ESCAPE_COMMAND as yt, $isLineBreakNode as xt, $setSelection as Tt, $getRoot as Rt } from "lexical";
|
|
21
|
+
import { Check as lt, Copy as wt, Link as Nt, Code2 as It, List as Pt, ListOrdered as At, ListTodo as Mt, X as Bt, Pencil as Dt, Trash2 as Ot } from "lucide-react";
|
|
22
22
|
import { createPortal as He } from "react-dom";
|
|
23
|
-
import { T as W } from "./
|
|
24
|
-
import { $isCodeNode as we, $createCodeNode as
|
|
25
|
-
import { $isLinkNode as re, $isAutoLinkNode as pe, TOGGLE_LINK_COMMAND as
|
|
26
|
-
import { $isListNode as Ne, REMOVE_LIST_COMMAND as
|
|
27
|
-
import { $isHeadingNode as
|
|
23
|
+
import { T as W } from "./scroll-area-BMbg1WcD.js";
|
|
24
|
+
import { $isCodeNode as we, $createCodeNode as zt } from "@lexical/code";
|
|
25
|
+
import { $isLinkNode as re, $isAutoLinkNode as pe, TOGGLE_LINK_COMMAND as De, $createLinkNode as $t } from "@lexical/link";
|
|
26
|
+
import { $isListNode as Ne, REMOVE_LIST_COMMAND as Ut, INSERT_CHECK_LIST_COMMAND as Ht, INSERT_ORDERED_LIST_COMMAND as Ft, INSERT_UNORDERED_LIST_COMMAND as jt } from "@lexical/list";
|
|
27
|
+
import { $isHeadingNode as Kt, $createHeadingNode as Wt } from "@lexical/rich-text";
|
|
28
28
|
import { $isAtNodeEnd as je, $setBlocksType as _e } from "@lexical/selection";
|
|
29
|
-
import { $convertFromMarkdownString as
|
|
30
|
-
import { AutoFocusPlugin as
|
|
31
|
-
import { CheckListPlugin as
|
|
32
|
-
import { HistoryPlugin as
|
|
33
|
-
import { MarkdownShortcutPlugin as
|
|
34
|
-
import { OnChangePlugin as
|
|
29
|
+
import { $convertFromMarkdownString as Gt, $convertToMarkdownString as Vt } from "@lexical/markdown";
|
|
30
|
+
import { AutoFocusPlugin as qt } from "@lexical/react/LexicalAutoFocusPlugin";
|
|
31
|
+
import { CheckListPlugin as Yt } from "@lexical/react/LexicalCheckListPlugin";
|
|
32
|
+
import { HistoryPlugin as Xt } from "@lexical/react/LexicalHistoryPlugin";
|
|
33
|
+
import { MarkdownShortcutPlugin as Qt } from "@lexical/react/LexicalMarkdownShortcutPlugin";
|
|
34
|
+
import { OnChangePlugin as Zt } from "@lexical/react/LexicalOnChangePlugin";
|
|
35
35
|
function Ie(t) {
|
|
36
36
|
const e = ee();
|
|
37
37
|
if (!Q(e))
|
|
@@ -42,62 +42,62 @@ function Ie(t) {
|
|
|
42
42
|
const l = t.getElementByKey(o.getKey());
|
|
43
43
|
return l instanceof HTMLElement ? l : null;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Jt(t) {
|
|
46
46
|
return t instanceof HTMLElement ? t.closest(".rich-text__code") : null;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function en(t, e) {
|
|
49
49
|
const r = t.getBoundingClientRect(), o = e.getBoundingClientRect();
|
|
50
50
|
return {
|
|
51
51
|
top: o.top - r.top + 6,
|
|
52
52
|
left: o.right - r.left - 30
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function rt(t) {
|
|
56
56
|
const e = te(31), {
|
|
57
57
|
anchorElem: r
|
|
58
|
-
} = t, [o] =
|
|
59
|
-
let p,
|
|
58
|
+
} = t, [o] = $e(), [l, u] = A(null), [L, h] = A(!1), a = ie(null);
|
|
59
|
+
let p, E;
|
|
60
60
|
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = () => () => {
|
|
61
61
|
a.current !== null && window.clearTimeout(a.current);
|
|
62
|
-
},
|
|
62
|
+
}, E = [], e[0] = p, e[1] = E) : (p = e[0], E = e[1]), Y(p, E);
|
|
63
63
|
let b, d;
|
|
64
64
|
e[2] !== o ? (b = () => {
|
|
65
65
|
const _ = o.getRootElement();
|
|
66
66
|
if (!_)
|
|
67
67
|
return;
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
u(
|
|
68
|
+
const k = (I) => {
|
|
69
|
+
const M = Jt(I.target);
|
|
70
|
+
u(M instanceof HTMLElement ? M : null);
|
|
71
71
|
}, N = () => {
|
|
72
72
|
o.getEditorState().read(() => {
|
|
73
73
|
const I = Ie(o);
|
|
74
74
|
u(I);
|
|
75
75
|
});
|
|
76
76
|
};
|
|
77
|
-
return _.addEventListener("pointermove",
|
|
78
|
-
_.removeEventListener("pointermove",
|
|
77
|
+
return _.addEventListener("pointermove", k), _.addEventListener("pointerleave", N), () => {
|
|
78
|
+
_.removeEventListener("pointermove", k), _.removeEventListener("pointerleave", N);
|
|
79
79
|
};
|
|
80
80
|
}, d = [o], e[2] = o, e[3] = b, e[4] = d) : (b = e[3], d = e[4]), Y(b, d);
|
|
81
81
|
let C, R;
|
|
82
|
-
if (e[5] !== o ? (C = () =>
|
|
82
|
+
if (e[5] !== o ? (C = () => Le(o.registerUpdateListener((_) => {
|
|
83
83
|
const {
|
|
84
|
-
editorState:
|
|
84
|
+
editorState: k
|
|
85
85
|
} = _;
|
|
86
|
-
|
|
86
|
+
k.read(() => {
|
|
87
87
|
const N = Ie(o);
|
|
88
88
|
N && u(N);
|
|
89
89
|
});
|
|
90
|
-
}), o.registerCommand(
|
|
90
|
+
}), o.registerCommand(Se, () => (o.getEditorState().read(() => {
|
|
91
91
|
const _ = Ie(o);
|
|
92
92
|
if (!_) {
|
|
93
|
-
u(
|
|
93
|
+
u(tn);
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
u(_);
|
|
97
97
|
}), !1), Ue)), R = [o], e[5] = o, e[6] = C, e[7] = R) : (C = e[6], R = e[7]), Y(C, R), !r || !l)
|
|
98
98
|
return null;
|
|
99
99
|
let c;
|
|
100
|
-
e[8] !== l || e[9] !== r ? (c =
|
|
100
|
+
e[8] !== l || e[9] !== r ? (c = en(r, l), e[8] = l, e[9] = r, e[10] = c) : c = e[10];
|
|
101
101
|
const w = c;
|
|
102
102
|
let v;
|
|
103
103
|
e[11] !== w.left || e[12] !== w.top ? (v = {
|
|
@@ -105,7 +105,7 @@ function st(t) {
|
|
|
105
105
|
top: w.top,
|
|
106
106
|
left: w.left
|
|
107
107
|
}, e[11] = w.left, e[12] = w.top, e[13] = v) : v = e[13];
|
|
108
|
-
const
|
|
108
|
+
const S = v, g = L ? "Copied" : "Copy code", f = L ? "Copied" : "Copy code";
|
|
109
109
|
let i;
|
|
110
110
|
e[14] !== l.textContent ? (i = async () => {
|
|
111
111
|
const _ = l.textContent ?? "";
|
|
@@ -118,33 +118,34 @@ function st(t) {
|
|
|
118
118
|
}
|
|
119
119
|
}, e[14] = l.textContent, e[15] = i) : i = e[15];
|
|
120
120
|
let s;
|
|
121
|
-
e[16] !==
|
|
121
|
+
e[16] !== L ? (s = L ? /* @__PURE__ */ n(lt, { size: 14 }) : /* @__PURE__ */ n(wt, { size: 14 }), e[16] = L, e[17] = s) : s = e[17];
|
|
122
122
|
let m;
|
|
123
|
-
e[18] !== f || e[19] !== i || e[20] !== s ? (m = /* @__PURE__ */ n(K, { "aria-label": f, variant: "
|
|
124
|
-
let
|
|
125
|
-
e[22] !== m || e[23] !== g ? (
|
|
123
|
+
e[18] !== f || e[19] !== i || e[20] !== s ? (m = /* @__PURE__ */ n(K, { "aria-label": f, variant: "subtle", size: "xs", onClick: i, children: s }), e[18] = f, e[19] = i, e[20] = s, e[21] = m) : m = e[21];
|
|
124
|
+
let y;
|
|
125
|
+
e[22] !== m || e[23] !== g ? (y = /* @__PURE__ */ n(W, { content: g, children: m }), e[22] = m, e[23] = g, e[24] = y) : y = e[24];
|
|
126
126
|
let x;
|
|
127
|
-
e[25] !==
|
|
127
|
+
e[25] !== S || e[26] !== y ? (x = /* @__PURE__ */ n("div", { className: "code-block-actions", style: S, children: y }), e[25] = S, e[26] = y, e[27] = x) : x = e[27];
|
|
128
128
|
let T;
|
|
129
129
|
return e[28] !== r || e[29] !== x ? (T = He(x, r), e[28] = r, e[29] = x, e[30] = T) : T = e[30], T;
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function tn(t) {
|
|
132
132
|
return t?.matches(":hover") ? t : null;
|
|
133
133
|
}
|
|
134
|
+
const st = Lt("TOGGLE_LINK_EDIT_MODE_COMMAND");
|
|
134
135
|
function ge(t) {
|
|
135
136
|
const e = t.anchor, r = t.focus, o = t.anchor.getNode(), l = t.focus.getNode();
|
|
136
137
|
return o === l ? o : t.isBackward() ? je(r) ? o : l : je(e) ? o : l;
|
|
137
138
|
}
|
|
138
|
-
const
|
|
139
|
-
function
|
|
140
|
-
const
|
|
141
|
-
if (t === null || !
|
|
139
|
+
const nn = 10, on = 5;
|
|
140
|
+
function ke(t, e, r, o = nn, l = on, u = "legacy") {
|
|
141
|
+
const L = r.parentElement;
|
|
142
|
+
if (t === null || !L) {
|
|
142
143
|
e.style.opacity = "0", e.style.transform = "translate(-10000px, -10000px)";
|
|
143
144
|
return;
|
|
144
145
|
}
|
|
145
|
-
const h = e.getBoundingClientRect(), a = r.getBoundingClientRect(), p =
|
|
146
|
-
let
|
|
147
|
-
|
|
146
|
+
const h = e.getBoundingClientRect(), a = r.getBoundingClientRect(), p = L.getBoundingClientRect();
|
|
147
|
+
let E = u === "above" ? t.top - h.height - o : t.top - o, b = t.left - l;
|
|
148
|
+
E < p.top && (E = u === "above" ? t.bottom + o : E + h.height + t.height + o * 2), b + h.width > p.right && (b = p.right - h.width - l), E -= a.top, b -= a.left, e.style.opacity = "1", e.style.transform = `translate(${b}px, ${E}px)`;
|
|
148
149
|
}
|
|
149
150
|
function Pe() {
|
|
150
151
|
const t = te(1);
|
|
@@ -153,20 +154,20 @@ function Pe() {
|
|
|
153
154
|
display: "inline-flex",
|
|
154
155
|
height: "1rem",
|
|
155
156
|
margin: "0 0.25rem",
|
|
156
|
-
borderLeft: "1px solid var(--chakra-colors-border-
|
|
157
|
+
borderLeft: "1px solid var(--chakra-colors-border-subtle)"
|
|
157
158
|
} }), t[0] = e) : e = t[0], e;
|
|
158
159
|
}
|
|
159
|
-
function
|
|
160
|
+
function ln(t) {
|
|
160
161
|
const e = te(81), {
|
|
161
162
|
editor: r,
|
|
162
163
|
blockType: o,
|
|
163
164
|
isBold: l,
|
|
164
165
|
isItalic: u,
|
|
165
|
-
isUnderline:
|
|
166
|
+
isUnderline: L,
|
|
166
167
|
isLink: h,
|
|
167
168
|
formatHeading: a,
|
|
168
169
|
formatList: p,
|
|
169
|
-
formatCodeBlock:
|
|
170
|
+
formatCodeBlock: E,
|
|
170
171
|
insertLink: b
|
|
171
172
|
} = t, d = l || void 0;
|
|
172
173
|
let C;
|
|
@@ -178,96 +179,96 @@ function on(t) {
|
|
|
178
179
|
const w = u || void 0;
|
|
179
180
|
let v;
|
|
180
181
|
e[6] !== r ? (v = () => r.dispatchCommand(Re, "italic"), e[6] = r, e[7] = v) : v = e[7];
|
|
181
|
-
let
|
|
182
|
-
e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
182
|
+
let S;
|
|
183
|
+
e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ n(ue, { fontStyle: "italic", fontSize: ".75rem", children: "I" }), e[8] = S) : S = e[8];
|
|
183
184
|
let g;
|
|
184
|
-
e[9] !== w || e[10] !== v ? (g = /* @__PURE__ */ n(W, { content: "Italic", children: /* @__PURE__ */ n(K, { "data-active": w, onClick: v, variant: "ghost", "aria-label": "Italic", size: "xs", children:
|
|
185
|
-
const f =
|
|
185
|
+
e[9] !== w || e[10] !== v ? (g = /* @__PURE__ */ n(W, { content: "Italic", children: /* @__PURE__ */ n(K, { "data-active": w, onClick: v, variant: "ghost", "aria-label": "Italic", size: "xs", children: S }) }), e[9] = w, e[10] = v, e[11] = g) : g = e[11];
|
|
186
|
+
const f = L || void 0;
|
|
186
187
|
let i;
|
|
187
188
|
e[12] !== r ? (i = () => r.dispatchCommand(Re, "underline"), e[12] = r, e[13] = i) : i = e[13];
|
|
188
189
|
let s;
|
|
189
190
|
e[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ n(ue, { textDecoration: "underline", fontSize: ".75rem", children: "U" }), e[14] = s) : s = e[14];
|
|
190
191
|
let m;
|
|
191
192
|
e[15] !== f || e[16] !== i ? (m = /* @__PURE__ */ n(W, { content: "Underline", children: /* @__PURE__ */ n(K, { "data-active": f, onClick: i, variant: "ghost", "aria-label": "Underline", size: "xs", children: s }) }), e[15] = f, e[16] = i, e[17] = m) : m = e[17];
|
|
192
|
-
const
|
|
193
|
+
const y = h ? "Remove Link" : "Insert Link", x = h || void 0, T = h ? "Remove Link" : "Insert Link";
|
|
193
194
|
let _;
|
|
194
|
-
e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ n(
|
|
195
|
-
let
|
|
196
|
-
e[19] !== b || e[20] !== x || e[21] !== T ? (
|
|
195
|
+
e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ n(Nt, { size: 14 }), e[18] = _) : _ = e[18];
|
|
196
|
+
let k;
|
|
197
|
+
e[19] !== b || e[20] !== x || e[21] !== T ? (k = /* @__PURE__ */ n(K, { "data-active": x, variant: "ghost", "aria-label": T, size: "xs", onClick: b, children: _ }), e[19] = b, e[20] = x, e[21] = T, e[22] = k) : k = e[22];
|
|
197
198
|
let N;
|
|
198
|
-
e[23] !==
|
|
199
|
+
e[23] !== y || e[24] !== k ? (N = /* @__PURE__ */ n(W, { content: y, children: k }), e[23] = y, e[24] = k, e[25] = N) : N = e[25];
|
|
199
200
|
let I;
|
|
200
201
|
e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ n(Pe, {}), e[26] = I) : I = e[26];
|
|
201
|
-
const
|
|
202
|
-
let $;
|
|
203
|
-
e[27] !== a ? ($ = () => a("h1"), e[27] = a, e[28] = $) : $ = e[28];
|
|
204
|
-
let D;
|
|
205
|
-
e[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ n(ue, { fontWeight: "thin", fontSize: ".8rem", children: "H1" }), e[29] = D) : D = e[29];
|
|
202
|
+
const M = o === "h1" || void 0;
|
|
206
203
|
let O;
|
|
207
|
-
e[
|
|
208
|
-
|
|
204
|
+
e[27] !== a ? (O = () => a("h1"), e[27] = a, e[28] = O) : O = e[28];
|
|
205
|
+
let z;
|
|
206
|
+
e[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ n(ue, { fontWeight: "thin", fontSize: ".8rem", children: "H1" }), e[29] = z) : z = e[29];
|
|
207
|
+
let $;
|
|
208
|
+
e[30] !== M || e[31] !== O ? ($ = /* @__PURE__ */ n(W, { content: "Heading 1", children: /* @__PURE__ */ n(K, { "data-active": M, variant: "ghost", "aria-label": "Heading 1", size: "xs", onClick: O, children: z }) }), e[30] = M, e[31] = O, e[32] = $) : $ = e[32];
|
|
209
|
+
const G = o === "h2" || void 0;
|
|
209
210
|
let U;
|
|
210
211
|
e[33] !== a ? (U = () => a("h2"), e[33] = a, e[34] = U) : U = e[34];
|
|
211
212
|
let H;
|
|
212
213
|
e[35] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ n(ue, { fontWeight: "thin", fontSize: ".8rem", children: "H2" }), e[35] = H) : H = e[35];
|
|
213
|
-
let
|
|
214
|
-
e[36] !==
|
|
215
|
-
const
|
|
214
|
+
let B;
|
|
215
|
+
e[36] !== G || e[37] !== U ? (B = /* @__PURE__ */ n(W, { content: "Heading 2", children: /* @__PURE__ */ n(K, { "data-active": G, variant: "ghost", "aria-label": "Heading 2", size: "xs", onClick: U, children: H }) }), e[36] = G, e[37] = U, e[38] = B) : B = e[38];
|
|
216
|
+
const D = o === "h3" || void 0;
|
|
216
217
|
let P;
|
|
217
218
|
e[39] !== a ? (P = () => a("h3"), e[39] = a, e[40] = P) : P = e[40];
|
|
218
219
|
let F;
|
|
219
220
|
e[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (F = /* @__PURE__ */ n(ue, { fontWeight: "thin", fontSize: ".8rem", children: "H3" }), e[41] = F) : F = e[41];
|
|
220
221
|
let j;
|
|
221
|
-
e[42] !==
|
|
222
|
-
let
|
|
223
|
-
e[45] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
222
|
+
e[42] !== D || e[43] !== P ? (j = /* @__PURE__ */ n(W, { content: "Heading 3", children: /* @__PURE__ */ n(K, { "data-active": D, variant: "ghost", "aria-label": "Heading 3", size: "xs", onClick: P, children: F }) }), e[42] = D, e[43] = P, e[44] = j) : j = e[44];
|
|
223
|
+
let V;
|
|
224
|
+
e[45] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ n(Pe, {}), e[45] = V) : V = e[45];
|
|
224
225
|
const J = o === "code" || void 0;
|
|
225
226
|
let X;
|
|
226
|
-
e[46] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (X = /* @__PURE__ */ n(
|
|
227
|
+
e[46] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (X = /* @__PURE__ */ n(It, { size: 14 }), e[46] = X) : X = e[46];
|
|
227
228
|
let q;
|
|
228
|
-
e[47] !==
|
|
229
|
+
e[47] !== E || e[48] !== J ? (q = /* @__PURE__ */ n(W, { content: "Code Block", children: /* @__PURE__ */ n(K, { "data-active": J, variant: "ghost", "aria-label": "Code Block", size: "xs", onClick: E, children: X }) }), e[47] = E, e[48] = J, e[49] = q) : q = e[49];
|
|
229
230
|
let ne;
|
|
230
231
|
e[50] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ne = /* @__PURE__ */ n(Pe, {}), e[50] = ne) : ne = e[50];
|
|
231
232
|
const he = o === "bullet" || void 0;
|
|
232
233
|
let oe;
|
|
233
234
|
e[51] !== p ? (oe = () => p("bullet"), e[51] = p, e[52] = oe) : oe = e[52];
|
|
234
235
|
let se;
|
|
235
|
-
e[53] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (se = /* @__PURE__ */ n(
|
|
236
|
+
e[53] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (se = /* @__PURE__ */ n(Pt, { size: 14 }), e[53] = se) : se = e[53];
|
|
236
237
|
let ae;
|
|
237
238
|
e[54] !== he || e[55] !== oe ? (ae = /* @__PURE__ */ n(W, { content: "Bulleted List", children: /* @__PURE__ */ n(K, { "data-active": he, variant: "ghost", "aria-label": "Bulleted List", size: "xs", onClick: oe, children: se }) }), e[54] = he, e[55] = oe, e[56] = ae) : ae = e[56];
|
|
238
|
-
const
|
|
239
|
+
const ye = o === "number" || void 0;
|
|
239
240
|
let ce;
|
|
240
241
|
e[57] !== p ? (ce = () => p("number"), e[57] = p, e[58] = ce) : ce = e[58];
|
|
241
242
|
let be;
|
|
242
|
-
e[59] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (be = /* @__PURE__ */ n(
|
|
243
|
+
e[59] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (be = /* @__PURE__ */ n(At, { size: 14 }), e[59] = be) : be = e[59];
|
|
243
244
|
let de;
|
|
244
|
-
e[60] !==
|
|
245
|
+
e[60] !== ye || e[61] !== ce ? (de = /* @__PURE__ */ n(W, { content: "Numbered List", children: /* @__PURE__ */ n(K, { "data-active": ye, variant: "ghost", "aria-label": "Numbered List", size: "xs", onClick: ce, children: be }) }), e[60] = ye, e[61] = ce, e[62] = de) : de = e[62];
|
|
245
246
|
const xe = o === "check" || void 0;
|
|
246
247
|
let fe;
|
|
247
248
|
e[63] !== p ? (fe = () => p("check"), e[63] = p, e[64] = fe) : fe = e[64];
|
|
248
249
|
let ve;
|
|
249
|
-
e[65] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ve = /* @__PURE__ */ n(
|
|
250
|
+
e[65] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ve = /* @__PURE__ */ n(Mt, { size: 14 }), e[65] = ve) : ve = e[65];
|
|
250
251
|
let me;
|
|
251
252
|
e[66] !== xe || e[67] !== fe ? (me = /* @__PURE__ */ n(W, { content: "Check List", children: /* @__PURE__ */ n(K, { "data-active": xe, variant: "ghost", "aria-label": "Check List", size: "xs", onClick: fe, children: ve }) }), e[66] = xe, e[67] = fe, e[68] = me) : me = e[68];
|
|
252
253
|
let Ce;
|
|
253
|
-
return e[69] !== m || e[70] !== N || e[71] !==
|
|
254
|
+
return e[69] !== m || e[70] !== N || e[71] !== $ || e[72] !== B || e[73] !== c || e[74] !== j || e[75] !== q || e[76] !== ae || e[77] !== de || e[78] !== me || e[79] !== g ? (Ce = /* @__PURE__ */ le(Ae, { direction: "row", gap: "0.5", alignItems: "center", children: [
|
|
254
255
|
c,
|
|
255
256
|
g,
|
|
256
257
|
m,
|
|
257
258
|
N,
|
|
258
259
|
I,
|
|
259
|
-
|
|
260
|
-
|
|
260
|
+
$,
|
|
261
|
+
B,
|
|
261
262
|
j,
|
|
262
|
-
|
|
263
|
+
V,
|
|
263
264
|
q,
|
|
264
265
|
ne,
|
|
265
266
|
ae,
|
|
266
267
|
de,
|
|
267
268
|
me
|
|
268
|
-
] }), e[69] = m, e[70] = N, e[71] =
|
|
269
|
+
] }), e[69] = m, e[70] = N, e[71] = $, e[72] = B, e[73] = c, e[74] = j, e[75] = q, e[76] = ae, e[77] = de, e[78] = me, e[79] = g, e[80] = Ce) : Ce = e[80], Ce;
|
|
269
270
|
}
|
|
270
|
-
const
|
|
271
|
+
const rn = {
|
|
271
272
|
bullet: "Bulleted List",
|
|
272
273
|
check: "Check List",
|
|
273
274
|
code: "Code Block",
|
|
@@ -280,39 +281,39 @@ const ln = {
|
|
|
280
281
|
number: "Numbered List",
|
|
281
282
|
paragraph: "Normal",
|
|
282
283
|
quote: "Quote"
|
|
283
|
-
},
|
|
284
|
+
}, sn = (t) => t in rn ? t : null, an = (t) => (t.getKey() === "root" ? t : Z(t, (r) => {
|
|
284
285
|
const o = r.getParent();
|
|
285
286
|
return o !== null && St(o);
|
|
286
|
-
})) ?? t.getTopLevelElementOrThrow(),
|
|
287
|
-
const e =
|
|
287
|
+
})) ?? t.getTopLevelElementOrThrow(), cn = (t) => {
|
|
288
|
+
const e = an(t);
|
|
288
289
|
if (Ne(e))
|
|
289
290
|
return e.getListType();
|
|
290
291
|
const r = Z(t, (l) => Ne(l));
|
|
291
292
|
if (r !== null && Ne(r))
|
|
292
293
|
return r.getListType();
|
|
293
|
-
const o =
|
|
294
|
-
return
|
|
294
|
+
const o = Kt(e) ? e.getTag() : e.getType();
|
|
295
|
+
return sn(o);
|
|
295
296
|
};
|
|
296
|
-
function
|
|
297
|
+
function dn(t) {
|
|
297
298
|
const {
|
|
298
299
|
hasSelection: e,
|
|
299
300
|
isRangeSelection: r,
|
|
300
301
|
isCollapsed: o,
|
|
301
302
|
hasNativeSelection: l,
|
|
302
303
|
hasNativeRange: u,
|
|
303
|
-
isAnchorInsideEditor:
|
|
304
|
+
isAnchorInsideEditor: L,
|
|
304
305
|
isEditorEditable: h
|
|
305
306
|
} = t;
|
|
306
|
-
return e && r && !o && l && u &&
|
|
307
|
+
return e && r && !o && l && u && L && h;
|
|
307
308
|
}
|
|
308
|
-
const
|
|
309
|
-
function
|
|
309
|
+
const fn = -4;
|
|
310
|
+
function mn({
|
|
310
311
|
editor: t,
|
|
311
312
|
anchorElem: e,
|
|
312
313
|
isToolbarActive: r,
|
|
313
314
|
setIsToolbarActive: o
|
|
314
315
|
}) {
|
|
315
|
-
const l = ie(null), [u,
|
|
316
|
+
const l = ie(null), [u, L] = A("paragraph"), [h, a] = A(!1), [p, E] = A(!1), [b, d] = A(!1), [C, R] = A(!1), c = ie(() => {
|
|
316
317
|
}), w = (i) => {
|
|
317
318
|
t.update(() => {
|
|
318
319
|
const s = ee();
|
|
@@ -321,21 +322,21 @@ function fn({
|
|
|
321
322
|
_e(s, Fe);
|
|
322
323
|
return;
|
|
323
324
|
}
|
|
324
|
-
_e(s, () =>
|
|
325
|
+
_e(s, () => Wt(i));
|
|
325
326
|
}
|
|
326
327
|
});
|
|
327
328
|
}, v = (i) => {
|
|
328
329
|
if (u === i) {
|
|
329
|
-
t.dispatchCommand(
|
|
330
|
+
t.dispatchCommand(Ut, void 0);
|
|
330
331
|
return;
|
|
331
332
|
}
|
|
332
333
|
const s = {
|
|
333
|
-
bullet:
|
|
334
|
-
number:
|
|
335
|
-
check:
|
|
334
|
+
bullet: jt,
|
|
335
|
+
number: Ft,
|
|
336
|
+
check: Ht
|
|
336
337
|
}[i];
|
|
337
338
|
t.dispatchCommand(s, void 0);
|
|
338
|
-
},
|
|
339
|
+
}, S = () => {
|
|
339
340
|
t.update(() => {
|
|
340
341
|
const i = ee();
|
|
341
342
|
if (Q(i)) {
|
|
@@ -343,30 +344,30 @@ function fn({
|
|
|
343
344
|
_e(i, Fe);
|
|
344
345
|
return;
|
|
345
346
|
}
|
|
346
|
-
_e(i, () =>
|
|
347
|
+
_e(i, () => zt());
|
|
347
348
|
}
|
|
348
349
|
});
|
|
349
350
|
}, g = () => {
|
|
350
351
|
if (C) {
|
|
351
|
-
t.dispatchCommand(
|
|
352
|
+
t.dispatchCommand(De, null);
|
|
352
353
|
return;
|
|
353
354
|
}
|
|
354
|
-
t.dispatchCommand(
|
|
355
|
+
t.dispatchCommand(st, !0);
|
|
355
356
|
}, f = () => {
|
|
356
357
|
const i = ee();
|
|
357
358
|
if (!Q(i)) return;
|
|
358
|
-
a(i.hasFormat("bold")),
|
|
359
|
-
const s = ge(i), m = Z(s, re),
|
|
360
|
-
R(m !== null ||
|
|
361
|
-
const x =
|
|
362
|
-
x &&
|
|
359
|
+
a(i.hasFormat("bold")), E(i.hasFormat("italic")), d(i.hasFormat("underline"));
|
|
360
|
+
const s = ge(i), m = Z(s, re), y = Z(s, pe);
|
|
361
|
+
R(m !== null || y !== null);
|
|
362
|
+
const x = cn(i.anchor.getNode());
|
|
363
|
+
x && L(x);
|
|
363
364
|
};
|
|
364
365
|
return c.current = () => {
|
|
365
366
|
const i = ee(), s = l.current, m = window.getSelection();
|
|
366
367
|
if (s === null)
|
|
367
368
|
return;
|
|
368
|
-
const
|
|
369
|
-
if (
|
|
369
|
+
const y = t.getRootElement(), x = m !== null, T = x && m.rangeCount > 0, _ = !!y?.contains(x ? m.anchorNode : null);
|
|
370
|
+
if (dn({
|
|
370
371
|
hasSelection: i !== null,
|
|
371
372
|
isRangeSelection: Q(i),
|
|
372
373
|
isCollapsed: Q(i) ? i.isCollapsed() : !1,
|
|
@@ -375,14 +376,14 @@ function fn({
|
|
|
375
376
|
isAnchorInsideEditor: _,
|
|
376
377
|
isEditorEditable: t.isEditable()
|
|
377
378
|
}) && m) {
|
|
378
|
-
const
|
|
379
|
-
if (
|
|
380
|
-
const N = new DOMRect(
|
|
381
|
-
|
|
379
|
+
const k = m.getRangeAt(0).getBoundingClientRect();
|
|
380
|
+
if (k) {
|
|
381
|
+
const N = new DOMRect(k.left, k.bottom, 0, 0);
|
|
382
|
+
ke(N, s, e, fn);
|
|
382
383
|
}
|
|
383
384
|
o(!0);
|
|
384
385
|
} else
|
|
385
|
-
|
|
386
|
+
y !== null && ke(null, s, e), o(!1);
|
|
386
387
|
return f(), !0;
|
|
387
388
|
}, Y(() => {
|
|
388
389
|
const i = e.parentElement, s = () => {
|
|
@@ -393,27 +394,27 @@ function fn({
|
|
|
393
394
|
return window.addEventListener("resize", s), i && i.addEventListener("scroll", s), () => {
|
|
394
395
|
window.removeEventListener("resize", s), i && i.removeEventListener("scroll", s);
|
|
395
396
|
};
|
|
396
|
-
}, [e, t]), Y(() =>
|
|
397
|
+
}, [e, t]), Y(() => Le(t.registerUpdateListener(({
|
|
397
398
|
editorState: i
|
|
398
399
|
}) => {
|
|
399
400
|
i.read(() => {
|
|
400
401
|
c.current();
|
|
401
402
|
});
|
|
402
|
-
}), t.registerCommand(
|
|
403
|
+
}), t.registerCommand(Se, (i) => (c.current(), !1), Ue), t.registerCommand(ot, (i) => {
|
|
403
404
|
const s = ee();
|
|
404
405
|
return Q(s) && c.current(), !1;
|
|
405
|
-
},
|
|
406
|
+
}, it)), [t]), /* @__PURE__ */ n("div", { ref: l, className: `floating-text-format-toolbar ${r ? "active" : ""}`, children: /* @__PURE__ */ n(ln, { editor: t, blockType: u, isBold: h, isItalic: p, isUnderline: b, isLink: C, formatHeading: w, formatList: v, formatCodeBlock: S, insertLink: g }) });
|
|
406
407
|
}
|
|
407
408
|
function at(t) {
|
|
408
409
|
const e = te(7), {
|
|
409
410
|
anchorElem: r
|
|
410
|
-
} = t, o = r === void 0 ? document.body : r, [l] =
|
|
411
|
+
} = t, o = r === void 0 ? document.body : r, [l] = $e(), [u, L] = A(!1);
|
|
411
412
|
let h;
|
|
412
|
-
e[0] !== o || e[1] !== l || e[2] !== u ? (h = /* @__PURE__ */ n(
|
|
413
|
+
e[0] !== o || e[1] !== l || e[2] !== u ? (h = /* @__PURE__ */ n(mn, { editor: l, anchorElem: o, isToolbarActive: u, setIsToolbarActive: L }), e[0] = o, e[1] = l, e[2] = u, e[3] = h) : h = e[3];
|
|
413
414
|
let a;
|
|
414
415
|
return e[4] !== o || e[5] !== h ? (a = He(h, o), e[4] = o, e[5] = h, e[6] = a) : a = e[6], a;
|
|
415
416
|
}
|
|
416
|
-
function
|
|
417
|
+
function un() {
|
|
417
418
|
const t = te(1);
|
|
418
419
|
let e;
|
|
419
420
|
return t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ n("style", { children: `
|
|
@@ -452,29 +453,29 @@ function mn() {
|
|
|
452
453
|
}
|
|
453
454
|
` }), t[0] = e) : e = t[0], e;
|
|
454
455
|
}
|
|
455
|
-
function
|
|
456
|
+
function ro(t) {
|
|
456
457
|
const e = te(42), {
|
|
457
458
|
roomId: r,
|
|
458
459
|
wsUrl: o,
|
|
459
460
|
wsParams: l,
|
|
460
461
|
userName: u,
|
|
461
|
-
userColor:
|
|
462
|
+
userColor: L,
|
|
462
463
|
placeholder: h
|
|
463
464
|
} = t;
|
|
464
465
|
let a;
|
|
465
466
|
e[0] !== l ? (a = l === void 0 ? {} : l, e[0] = l, e[1] = a) : a = e[1];
|
|
466
|
-
const p = a,
|
|
467
|
-
let
|
|
468
|
-
e[2] !== v || e[3] !== r || e[4] !== p || e[5] !== o ? (
|
|
469
|
-
const j = new
|
|
467
|
+
const p = a, E = u === void 0 ? "Anonymous" : u, b = L === void 0 ? "#30bced" : L, d = ie(null), [C, R] = A(null), [c, w] = A(!1), [v] = A(pn);
|
|
468
|
+
let S;
|
|
469
|
+
e[2] !== v || e[3] !== r || e[4] !== p || e[5] !== o ? (S = () => {
|
|
470
|
+
const j = new Et(o, r, v, {
|
|
470
471
|
params: p,
|
|
471
472
|
connect: !1
|
|
472
473
|
});
|
|
473
|
-
return j.on("sync", (
|
|
474
|
-
|
|
474
|
+
return j.on("sync", (V) => {
|
|
475
|
+
V && w(!0);
|
|
475
476
|
}), j;
|
|
476
|
-
}, e[2] = v, e[3] = r, e[4] = p, e[5] = o, e[6] =
|
|
477
|
-
const [g] = A(
|
|
477
|
+
}, e[2] = v, e[3] = r, e[4] = p, e[5] = o, e[6] = S) : S = e[6];
|
|
478
|
+
const [g] = A(S);
|
|
478
479
|
let f, i;
|
|
479
480
|
e[7] !== g ? (f = () => (g.connect(), () => {
|
|
480
481
|
g.disconnect();
|
|
@@ -483,70 +484,70 @@ function lo(t) {
|
|
|
483
484
|
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = () => {
|
|
484
485
|
R(d.current);
|
|
485
486
|
}, m = [], e[10] = s, e[11] = m) : (s = e[10], m = e[11]), Y(s, m);
|
|
486
|
-
let
|
|
487
|
-
e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
487
|
+
let y;
|
|
488
|
+
e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = {
|
|
488
489
|
namespace: "COLLABORATIVE_EDITOR",
|
|
489
|
-
nodes:
|
|
490
|
+
nodes: We,
|
|
490
491
|
editorState: null,
|
|
491
|
-
onError:
|
|
492
|
+
onError: hn,
|
|
492
493
|
editable: !0,
|
|
493
|
-
theme:
|
|
494
|
-
}, e[12] =
|
|
495
|
-
const x =
|
|
494
|
+
theme: Ke
|
|
495
|
+
}, e[12] = y) : y = e[12];
|
|
496
|
+
const x = y;
|
|
496
497
|
let T;
|
|
497
|
-
e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ n(
|
|
498
|
+
e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ n(un, {}), e[13] = T) : T = e[13];
|
|
498
499
|
const _ = g;
|
|
499
|
-
let
|
|
500
|
-
e[14] !== v || e[15] !== r || e[16] !== _ || e[17] !== b || e[18] !==
|
|
501
|
-
let N, I,
|
|
502
|
-
e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ n(
|
|
503
|
-
let
|
|
504
|
-
e[26] !== C ? (
|
|
500
|
+
let k;
|
|
501
|
+
e[14] !== v || e[15] !== r || e[16] !== _ || e[17] !== b || e[18] !== E ? (k = /* @__PURE__ */ n(Ct, { id: r, doc: v, provider: _, __shouldBootstrapUnsafe: !1, username: E, cursorColor: b }), e[14] = v, e[15] = r, e[16] = _, e[17] = b, e[18] = E, e[19] = k) : k = e[19];
|
|
502
|
+
let N, I, M, O, z, $;
|
|
503
|
+
e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ n(Je, {}), I = /* @__PURE__ */ n(et, {}), M = /* @__PURE__ */ n(nt, { maxIndent: 7 }), O = /* @__PURE__ */ n(Ze, {}), z = /* @__PURE__ */ n(Ge, {}), $ = /* @__PURE__ */ n(Ve, {}), e[20] = N, e[21] = I, e[22] = M, e[23] = O, e[24] = z, e[25] = $) : (N = e[20], I = e[21], M = e[22], O = e[23], z = e[24], $ = e[25]);
|
|
504
|
+
let G;
|
|
505
|
+
e[26] !== C ? (G = /* @__PURE__ */ n(rt, { anchorElem: C }), e[26] = C, e[27] = G) : G = e[27];
|
|
505
506
|
let U;
|
|
506
|
-
e[28] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (U = /* @__PURE__ */ n(
|
|
507
|
+
e[28] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (U = /* @__PURE__ */ n(qe, {}), e[28] = U) : U = e[28];
|
|
507
508
|
let H;
|
|
508
|
-
e[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ n(
|
|
509
|
-
let
|
|
510
|
-
e[30] !== h || e[31] !== c ? (
|
|
511
|
-
let
|
|
512
|
-
e[33] !==
|
|
509
|
+
e[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ n(Ye, { fullWidth: !1 }), e[29] = H) : H = e[29];
|
|
510
|
+
let B;
|
|
511
|
+
e[30] !== h || e[31] !== c ? (B = c && h ? /* @__PURE__ */ n(ze, { position: "absolute", top: "0", color: "fg.muted", pointerEvents: "none", userSelect: "none", textStyle: "paragraph/M/regular", children: h }) : null, e[30] = h, e[31] = c, e[32] = B) : B = e[32];
|
|
512
|
+
let D;
|
|
513
|
+
e[33] !== B ? (D = /* @__PURE__ */ n(tt, { contentEditable: H, placeholder: B, ErrorBoundary: Qe }), e[33] = B, e[34] = D) : D = e[34];
|
|
513
514
|
let P;
|
|
514
515
|
e[35] !== C ? (P = C ? /* @__PURE__ */ n(at, { anchorElem: C }) : null, e[35] = C, e[36] = P) : P = e[36];
|
|
515
516
|
let F;
|
|
516
|
-
return e[37] !==
|
|
517
|
+
return e[37] !== k || e[38] !== G || e[39] !== D || e[40] !== P ? (F = /* @__PURE__ */ le(Me, { ref: d, className: "rich-text", justifyContent: "space-between", width: "100%", maxWidth: "100%", height: "100%", position: "relative", direction: "column", overflow: "visible", children: [
|
|
517
518
|
T,
|
|
518
|
-
/* @__PURE__ */ n(
|
|
519
|
-
|
|
519
|
+
/* @__PURE__ */ n(Xe, { initialConfig: x, children: /* @__PURE__ */ le(vt, { children: [
|
|
520
|
+
k,
|
|
520
521
|
N,
|
|
521
522
|
I,
|
|
522
|
-
|
|
523
|
-
$,
|
|
524
|
-
D,
|
|
523
|
+
M,
|
|
525
524
|
O,
|
|
526
|
-
V,
|
|
527
|
-
U,
|
|
528
525
|
z,
|
|
526
|
+
$,
|
|
527
|
+
G,
|
|
528
|
+
U,
|
|
529
|
+
D,
|
|
529
530
|
P
|
|
530
531
|
] }) })
|
|
531
|
-
] }), e[37] =
|
|
532
|
+
] }), e[37] = k, e[38] = G, e[39] = D, e[40] = P, e[41] = F) : F = e[41], F;
|
|
532
533
|
}
|
|
533
|
-
function
|
|
534
|
+
function hn(t) {
|
|
534
535
|
return console.error(t);
|
|
535
536
|
}
|
|
536
|
-
function
|
|
537
|
-
return new
|
|
537
|
+
function pn() {
|
|
538
|
+
return new kt.Doc();
|
|
538
539
|
}
|
|
539
|
-
function
|
|
540
|
+
function gn(t) {
|
|
540
541
|
const e = te(32), {
|
|
541
542
|
isActive: r,
|
|
542
543
|
isLinkEditMode: o,
|
|
543
544
|
editedLinkUrl: l,
|
|
544
545
|
editedLinkUrlIsValid: u,
|
|
545
|
-
linkUrl:
|
|
546
|
+
linkUrl: L,
|
|
546
547
|
href: h,
|
|
547
548
|
inputRef: a,
|
|
548
549
|
onEditedLinkUrlChange: p,
|
|
549
|
-
onInputKeyDown:
|
|
550
|
+
onInputKeyDown: E,
|
|
550
551
|
onClose: b,
|
|
551
552
|
onSubmit: d,
|
|
552
553
|
onEdit: C,
|
|
@@ -561,33 +562,33 @@ function pn(t) {
|
|
|
561
562
|
p(I.target.value);
|
|
562
563
|
}, e[0] = p, e[1] = s) : s = e[1];
|
|
563
564
|
let m;
|
|
564
|
-
e[2] !== l || e[3] !== a || e[4] !==
|
|
565
|
-
let
|
|
566
|
-
e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
565
|
+
e[2] !== l || e[3] !== a || e[4] !== E || e[5] !== i || e[6] !== s ? (m = /* @__PURE__ */ n(gt, { ref: a, className: "link-editor-url-field", size: "sm", fontSize: "sm", value: l, placeholder: "https://", "aria-label": "Link URL", "aria-invalid": i, onChange: s, onKeyDown: E }), e[2] = l, e[3] = a, e[4] = E, e[5] = i, e[6] = s, e[7] = m) : m = e[7];
|
|
566
|
+
let y;
|
|
567
|
+
e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ n(Bt, { size: 14 }), e[8] = y) : y = e[8];
|
|
567
568
|
let x;
|
|
568
|
-
e[9] !== b ? (x = /* @__PURE__ */ n(W, { content: "Cancel", children: /* @__PURE__ */ n(K, { variant: "ghost", size: "xs", "aria-label": "Cancel link edit", onMouseDown:
|
|
569
|
+
e[9] !== b ? (x = /* @__PURE__ */ n(W, { content: "Cancel", children: /* @__PURE__ */ n(K, { variant: "ghost", size: "xs", "aria-label": "Cancel link edit", onMouseDown: Ee, onClick: b, children: y }) }), e[9] = b, e[10] = x) : x = e[10];
|
|
569
570
|
const T = !u;
|
|
570
571
|
let _;
|
|
571
|
-
e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ n(
|
|
572
|
-
let
|
|
573
|
-
e[12] !== d || e[13] !== T ? (
|
|
572
|
+
e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ n(lt, { size: 14 }), e[11] = _) : _ = e[11];
|
|
573
|
+
let k;
|
|
574
|
+
e[12] !== d || e[13] !== T ? (k = /* @__PURE__ */ n(W, { content: "Confirm", children: /* @__PURE__ */ n(K, { variant: "ghost", size: "xs", "aria-label": "Confirm link edit", disabled: T, onMouseDown: Ee, onClick: d, children: _ }) }), e[12] = d, e[13] = T, e[14] = k) : k = e[14];
|
|
574
575
|
let N;
|
|
575
|
-
return e[15] !== m || e[16] !== x || e[17] !==
|
|
576
|
+
return e[15] !== m || e[16] !== x || e[17] !== k ? (N = /* @__PURE__ */ le(Ae, { className: "link-editor-content", direction: "row", gap: "1", alignItems: "center", p: "1", children: [
|
|
576
577
|
m,
|
|
577
578
|
x,
|
|
578
|
-
|
|
579
|
-
] }), e[15] = m, e[16] = x, e[17] =
|
|
579
|
+
k
|
|
580
|
+
] }), e[15] = m, e[16] = x, e[17] = k, e[18] = N) : N = e[18], N;
|
|
580
581
|
}
|
|
581
582
|
let c;
|
|
582
|
-
e[19] !== h || e[20] !==
|
|
583
|
+
e[19] !== h || e[20] !== L ? (c = /* @__PURE__ */ n(bt, { href: h, target: "_blank", rel: "noopener noreferrer", className: "link-editor-url-field", fontSize: "sm", textDecoration: "underline", px: "2", truncate: !0, children: L }), e[19] = h, e[20] = L, e[21] = c) : c = e[21];
|
|
583
584
|
let w;
|
|
584
|
-
e[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ n(
|
|
585
|
+
e[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ n(Dt, { size: 14 }), e[22] = w) : w = e[22];
|
|
585
586
|
let v;
|
|
586
|
-
e[23] !== C ? (v = /* @__PURE__ */ n(W, { content: "Edit link", children: /* @__PURE__ */ n(K, { variant: "ghost", size: "xs", "aria-label": "Edit link", onMouseDown:
|
|
587
|
-
let
|
|
588
|
-
e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
587
|
+
e[23] !== C ? (v = /* @__PURE__ */ n(W, { content: "Edit link", children: /* @__PURE__ */ n(K, { variant: "ghost", size: "xs", "aria-label": "Edit link", onMouseDown: Ee, onClick: C, children: w }) }), e[23] = C, e[24] = v) : v = e[24];
|
|
588
|
+
let S;
|
|
589
|
+
e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ n(Ot, { size: 14 }), e[25] = S) : S = e[25];
|
|
589
590
|
let g;
|
|
590
|
-
e[26] !== R ? (g = /* @__PURE__ */ n(W, { content: "Remove link", children: /* @__PURE__ */ n(K, { variant: "ghost", size: "xs", "aria-label": "Remove link", onMouseDown:
|
|
591
|
+
e[26] !== R ? (g = /* @__PURE__ */ n(W, { content: "Remove link", children: /* @__PURE__ */ n(K, { variant: "ghost", size: "xs", "aria-label": "Remove link", onMouseDown: Ee, onClick: R, children: S }) }), e[26] = R, e[27] = g) : g = e[27];
|
|
591
592
|
let f;
|
|
592
593
|
return e[28] !== c || e[29] !== v || e[30] !== g ? (f = /* @__PURE__ */ le(Ae, { className: "link-editor-content", direction: "row", gap: "1", alignItems: "center", p: "1", children: [
|
|
593
594
|
c,
|
|
@@ -595,18 +596,18 @@ function pn(t) {
|
|
|
595
596
|
g
|
|
596
597
|
] }), e[28] = c, e[29] = v, e[30] = g, e[31] = f) : f = e[31], f;
|
|
597
598
|
}
|
|
598
|
-
function
|
|
599
|
+
function Ee(t) {
|
|
599
600
|
t.preventDefault();
|
|
600
601
|
}
|
|
601
|
-
function
|
|
602
|
+
function bn(t, e, r) {
|
|
602
603
|
return t && e && r === "";
|
|
603
604
|
}
|
|
604
|
-
function
|
|
605
|
+
function vn(t) {
|
|
605
606
|
const e = ge(t), r = Z(e, re);
|
|
606
607
|
return r ? r.getURL() : re(e) ? e.getURL() : "";
|
|
607
608
|
}
|
|
608
609
|
const ct = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "sms:", "tel:"]);
|
|
609
|
-
function
|
|
610
|
+
function Oe(t) {
|
|
610
611
|
try {
|
|
611
612
|
const e = new URL(t);
|
|
612
613
|
if (!ct.has(e.protocol))
|
|
@@ -624,8 +625,8 @@ function dt(t) {
|
|
|
624
625
|
return !1;
|
|
625
626
|
}
|
|
626
627
|
}
|
|
627
|
-
const
|
|
628
|
-
function
|
|
628
|
+
const Cn = 8;
|
|
629
|
+
function _n({
|
|
629
630
|
editor: t,
|
|
630
631
|
isLink: e,
|
|
631
632
|
setIsLink: r,
|
|
@@ -633,22 +634,22 @@ function Cn({
|
|
|
633
634
|
isLinkEditMode: l,
|
|
634
635
|
setIsLinkEditMode: u
|
|
635
636
|
}) {
|
|
636
|
-
const
|
|
637
|
-
}), [p,
|
|
637
|
+
const L = ie(null), h = ie(null), a = ie(() => {
|
|
638
|
+
}), [p, E] = A(""), [b, d] = A("https://"), [C, R] = A(null), c = e || l, w = dt(b);
|
|
638
639
|
a.current = () => {
|
|
639
640
|
const f = ee();
|
|
640
641
|
if (Q(f)) {
|
|
641
|
-
const T =
|
|
642
|
-
|
|
642
|
+
const T = vn(f);
|
|
643
|
+
E(T), bn(l, e, T) && S(), l && T !== "" && d(T);
|
|
643
644
|
}
|
|
644
|
-
const i =
|
|
645
|
+
const i = L.current, s = window.getSelection(), m = document.activeElement;
|
|
645
646
|
if (i === null)
|
|
646
647
|
return;
|
|
647
|
-
const
|
|
648
|
-
if (f !== null && s !== null && x &&
|
|
648
|
+
const y = t.getRootElement(), x = s !== null && s.rangeCount > 0;
|
|
649
|
+
if (f !== null && s !== null && x && y?.contains(s.anchorNode) && t.isEditable()) {
|
|
649
650
|
const T = s.getRangeAt(0).getBoundingClientRect(), _ = new DOMRect(T.left, T.top, 0, T.height);
|
|
650
|
-
|
|
651
|
-
} else i.contains(m) || (
|
|
651
|
+
ke(_, i, o, Cn, void 0, "above"), R(f);
|
|
652
|
+
} else i.contains(m) || (y !== null && ke(null, i, o), R(null), u(!1), E(""));
|
|
652
653
|
}, Y(() => {
|
|
653
654
|
const f = o.parentElement, i = () => {
|
|
654
655
|
t.getEditorState().read(() => {
|
|
@@ -658,13 +659,13 @@ function Cn({
|
|
|
658
659
|
return window.addEventListener("resize", i), f && f.addEventListener("scroll", i), () => {
|
|
659
660
|
window.removeEventListener("resize", i), f && f.removeEventListener("scroll", i);
|
|
660
661
|
};
|
|
661
|
-
}, [o.parentElement, t]), Y(() =>
|
|
662
|
+
}, [o.parentElement, t]), Y(() => Le(t.registerUpdateListener(({
|
|
662
663
|
editorState: f
|
|
663
664
|
}) => {
|
|
664
665
|
f.read(() => {
|
|
665
666
|
a.current();
|
|
666
667
|
});
|
|
667
|
-
}), t.registerCommand(
|
|
668
|
+
}), t.registerCommand(Se, () => (a.current(), !0), Be), t.registerCommand(yt, () => e ? (r(!1), !0) : !1, it)), [t, r, e]), Y(() => {
|
|
668
669
|
t.getEditorState().read(() => {
|
|
669
670
|
a.current();
|
|
670
671
|
});
|
|
@@ -676,18 +677,18 @@ function Cn({
|
|
|
676
677
|
l && h.current && h.current.focus();
|
|
677
678
|
}, [l]);
|
|
678
679
|
const v = (f) => {
|
|
679
|
-
f.key === "Enter" ? (f.preventDefault(), g()) : f.key === "Escape" && (f.preventDefault(),
|
|
680
|
-
},
|
|
680
|
+
f.key === "Enter" ? (f.preventDefault(), g()) : f.key === "Escape" && (f.preventDefault(), S());
|
|
681
|
+
}, S = () => {
|
|
681
682
|
d("https://"), u(!1);
|
|
682
683
|
}, g = () => {
|
|
683
684
|
C === null || !w || (t.update(() => {
|
|
684
|
-
|
|
685
|
-
}), t.dispatchCommand(
|
|
685
|
+
Tt(C);
|
|
686
|
+
}), t.dispatchCommand(De, Oe(b)), t.update(() => {
|
|
686
687
|
const f = ee();
|
|
687
688
|
if (Q(f)) {
|
|
688
689
|
const i = ge(f).getParent();
|
|
689
690
|
if (pe(i)) {
|
|
690
|
-
const s =
|
|
691
|
+
const s = $t(i.getURL(), {
|
|
691
692
|
rel: i.__rel,
|
|
692
693
|
target: i.__target,
|
|
693
694
|
title: i.__title
|
|
@@ -695,44 +696,44 @@ function Cn({
|
|
|
695
696
|
i.replace(s, !0);
|
|
696
697
|
}
|
|
697
698
|
}
|
|
698
|
-
}),
|
|
699
|
+
}), S());
|
|
699
700
|
};
|
|
700
|
-
return /* @__PURE__ */ n(
|
|
701
|
+
return /* @__PURE__ */ n(ze, { ref: L, className: `link-editor ${c ? "active" : ""}`, children: /* @__PURE__ */ n(gn, { isActive: c, isLinkEditMode: l, editedLinkUrl: b, editedLinkUrlIsValid: w, linkUrl: p, href: Oe(p), inputRef: h, onEditedLinkUrlChange: d, onInputKeyDown: v, onClose: S, onSubmit: g, onEdit: () => {
|
|
701
702
|
d(p), u(!0);
|
|
702
703
|
}, onRemove: () => {
|
|
703
|
-
t.dispatchCommand(
|
|
704
|
+
t.dispatchCommand(De, null);
|
|
704
705
|
} }) });
|
|
705
706
|
}
|
|
706
|
-
function
|
|
707
|
-
const l = te(13), [u,
|
|
708
|
-
let p,
|
|
707
|
+
function En(t, e, r, o) {
|
|
708
|
+
const l = te(13), [u, L] = A(t), [h, a] = A(!1);
|
|
709
|
+
let p, E;
|
|
709
710
|
l[0] !== t || l[1] !== o ? (p = () => {
|
|
710
711
|
const C = function() {
|
|
711
712
|
const c = ee();
|
|
712
713
|
if (Q(c)) {
|
|
713
|
-
const w = ge(c), v = Z(w, re),
|
|
714
|
-
if (!(v ||
|
|
714
|
+
const w = ge(c), v = Z(w, re), S = Z(w, pe);
|
|
715
|
+
if (!(v || S)) {
|
|
715
716
|
a(!1);
|
|
716
717
|
return;
|
|
717
718
|
}
|
|
718
|
-
const g = c.getNodes().filter(
|
|
719
|
+
const g = c.getNodes().filter(Ln).find((f) => {
|
|
719
720
|
const i = Z(f, re), s = Z(f, pe), m = pe(s) && s.getIsUnlinked();
|
|
720
|
-
return v && !v.is(i) || i && !i.is(v) ||
|
|
721
|
+
return v && !v.is(i) || i && !i.is(v) || S && !S.is(s) || s && (!s.is(S) || m);
|
|
721
722
|
});
|
|
722
723
|
a(!g);
|
|
723
724
|
}
|
|
724
725
|
};
|
|
725
|
-
return
|
|
726
|
+
return Le(t.registerUpdateListener((R) => {
|
|
726
727
|
const {
|
|
727
728
|
editorState: c
|
|
728
729
|
} = R;
|
|
729
730
|
c.read(() => {
|
|
730
731
|
C();
|
|
731
732
|
});
|
|
732
|
-
}), t.registerCommand(
|
|
733
|
-
},
|
|
733
|
+
}), t.registerCommand(Se, (R, c) => (C(), L(c), !1), Ue), t.registerCommand(ot, kn, Be), t.registerCommand(st, (R) => (o(R), !0), Be));
|
|
734
|
+
}, E = [t, o], l[0] = t, l[1] = o, l[2] = p, l[3] = E) : (p = l[2], E = l[3]), Y(p, E);
|
|
734
735
|
let b;
|
|
735
|
-
l[4] !== u || l[5] !== e || l[6] !== h || l[7] !== r || l[8] !== o ? (b = /* @__PURE__ */ n(
|
|
736
|
+
l[4] !== u || l[5] !== e || l[6] !== h || l[7] !== r || l[8] !== o ? (b = /* @__PURE__ */ n(_n, { editor: u, isLink: h, anchorElem: e, setIsLink: a, isLinkEditMode: r, setIsLinkEditMode: o }), l[4] = u, l[5] = e, l[6] = h, l[7] = r, l[8] = o, l[9] = b) : b = l[9];
|
|
736
737
|
let d;
|
|
737
738
|
return l[10] !== e || l[11] !== b ? (d = He(b, e), l[10] = e, l[11] = b, l[12] = d) : d = l[12], d;
|
|
738
739
|
}
|
|
@@ -741,125 +742,125 @@ function kn(t) {
|
|
|
741
742
|
if (Q(e)) {
|
|
742
743
|
const r = ge(e), o = Z(r, re);
|
|
743
744
|
if (re(o) && (t.metaKey || t.ctrlKey))
|
|
744
|
-
return window.open(
|
|
745
|
+
return window.open(Oe(o.getURL()), "_blank", "noopener,noreferrer"), !0;
|
|
745
746
|
}
|
|
746
747
|
return !1;
|
|
747
748
|
}
|
|
748
|
-
function
|
|
749
|
-
return !
|
|
749
|
+
function Ln(t) {
|
|
750
|
+
return !xt(t);
|
|
750
751
|
}
|
|
751
752
|
function Sn(t) {
|
|
752
753
|
const {
|
|
753
754
|
anchorElem: e
|
|
754
|
-
} = t, r = e === void 0 ? document.body : e, [o, l] = A(!1), [u] =
|
|
755
|
-
return
|
|
755
|
+
} = t, r = e === void 0 ? document.body : e, [o, l] = A(!1), [u] = $e();
|
|
756
|
+
return En(u, r, o, l);
|
|
756
757
|
}
|
|
757
758
|
function yn() {
|
|
758
759
|
const t = te(1);
|
|
759
760
|
let e;
|
|
760
|
-
return t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ n(
|
|
761
|
+
return t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ n(Je, { validateUrl: dt }), t[0] = e) : e = t[0], e;
|
|
761
762
|
}
|
|
762
|
-
function
|
|
763
|
+
function so(t) {
|
|
763
764
|
const e = te(57), {
|
|
764
765
|
autoFocus: r,
|
|
765
766
|
debug: o,
|
|
766
767
|
defaultState: l,
|
|
767
768
|
isEditable: u,
|
|
768
|
-
placeholder:
|
|
769
|
+
placeholder: L,
|
|
769
770
|
scrollable: h,
|
|
770
771
|
onChange: a
|
|
771
|
-
} = t, p = r === void 0 ? !1 : r,
|
|
772
|
+
} = t, p = r === void 0 ? !1 : r, E = o === void 0 ? !1 : o, b = l === void 0 ? "" : l, d = u === void 0 ? !1 : u, C = h === void 0 ? !0 : h;
|
|
772
773
|
let R;
|
|
773
774
|
e[0] !== b ? (R = mt(b), e[0] = b, e[1] = R) : R = e[1];
|
|
774
775
|
const {
|
|
775
776
|
frontmatter: c,
|
|
776
777
|
body: w
|
|
777
|
-
} = R, v = d && !!a,
|
|
778
|
+
} = R, v = d && !!a, S = ie(null), [g, f] = A(null);
|
|
778
779
|
let i, s;
|
|
779
780
|
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = () => {
|
|
780
|
-
f(
|
|
781
|
+
f(S.current);
|
|
781
782
|
}, s = [], e[2] = i, e[3] = s) : (i = e[2], s = e[3]), Y(i, s);
|
|
782
783
|
let m;
|
|
783
|
-
e[4] !== w ? (m = () =>
|
|
784
|
-
let
|
|
785
|
-
e[6] !== d || e[7] !== m ? (
|
|
784
|
+
e[4] !== w ? (m = () => Gt(ut(w), Te, void 0, !1), e[4] = w, e[5] = m) : m = e[5];
|
|
785
|
+
let y;
|
|
786
|
+
e[6] !== d || e[7] !== m ? (y = {
|
|
786
787
|
namespace: "MARKDOWN_EDITOR",
|
|
787
|
-
nodes:
|
|
788
|
+
nodes: We,
|
|
788
789
|
editorState: m,
|
|
789
|
-
onError:
|
|
790
|
+
onError: xn,
|
|
790
791
|
editable: d,
|
|
791
|
-
theme:
|
|
792
|
-
}, e[6] = d, e[7] = m, e[8] =
|
|
793
|
-
const x =
|
|
792
|
+
theme: Ke
|
|
793
|
+
}, e[6] = d, e[7] = m, e[8] = y) : y = e[8];
|
|
794
|
+
const x = y, T = C ? "100%" : "auto";
|
|
794
795
|
let _;
|
|
795
|
-
e[9] !== p ? (_ = p ? /* @__PURE__ */ n(
|
|
796
|
-
let
|
|
797
|
-
e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
798
|
-
let B;
|
|
799
|
-
e[14] !== d ? (B = d ? /* @__PURE__ */ n(ot, { maxIndent: 7 }) : null, e[14] = d, e[15] = B) : B = e[15];
|
|
800
|
-
let $;
|
|
801
|
-
e[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = /* @__PURE__ */ n(qt, {}), e[16] = $) : $ = e[16];
|
|
802
|
-
let D;
|
|
803
|
-
e[17] !== d ? (D = d ? /* @__PURE__ */ n(Xt, { transformers: Te }) : null, e[17] = d, e[18] = D) : D = e[18];
|
|
804
|
-
let O, V, U;
|
|
805
|
-
e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = /* @__PURE__ */ n(Je, {}), V = /* @__PURE__ */ n(Ge, {}), U = /* @__PURE__ */ n(qe, {}), e[19] = O, e[20] = V, e[21] = U) : (O = e[19], V = e[20], U = e[21]);
|
|
806
|
-
let H;
|
|
807
|
-
e[22] !== g ? (H = /* @__PURE__ */ n(st, { anchorElem: g }), e[22] = g, e[23] = H) : H = e[23];
|
|
796
|
+
e[9] !== p ? (_ = p ? /* @__PURE__ */ n(qt, {}) : null, e[9] = p, e[10] = _) : _ = e[10];
|
|
797
|
+
let k, N, I;
|
|
798
|
+
e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ n(Xt, {}), N = /* @__PURE__ */ n(yn, {}), I = /* @__PURE__ */ n(et, {}), e[11] = k, e[12] = N, e[13] = I) : (k = e[11], N = e[12], I = e[13]);
|
|
808
799
|
let M;
|
|
809
|
-
e[
|
|
800
|
+
e[14] !== d ? (M = d ? /* @__PURE__ */ n(nt, { maxIndent: 7 }) : null, e[14] = d, e[15] = M) : M = e[15];
|
|
801
|
+
let O;
|
|
802
|
+
e[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = /* @__PURE__ */ n(Yt, {}), e[16] = O) : O = e[16];
|
|
810
803
|
let z;
|
|
811
|
-
e[
|
|
804
|
+
e[17] !== d ? (z = d ? /* @__PURE__ */ n(Qt, { transformers: Te }) : null, e[17] = d, e[18] = z) : z = e[18];
|
|
805
|
+
let $, G, U;
|
|
806
|
+
e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = /* @__PURE__ */ n(Ze, {}), G = /* @__PURE__ */ n(Ge, {}), U = /* @__PURE__ */ n(Ve, {}), e[19] = $, e[20] = G, e[21] = U) : ($ = e[19], G = e[20], U = e[21]);
|
|
807
|
+
let H;
|
|
808
|
+
e[22] !== g ? (H = /* @__PURE__ */ n(rt, { anchorElem: g }), e[22] = g, e[23] = H) : H = e[23];
|
|
809
|
+
let B;
|
|
810
|
+
e[24] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (B = /* @__PURE__ */ n(qe, {}), e[24] = B) : B = e[24];
|
|
811
|
+
let D;
|
|
812
|
+
e[25] !== C ? (D = /* @__PURE__ */ n(Ye, { fullWidth: !1, padding: "sm", scrollable: C }), e[25] = C, e[26] = D) : D = e[26];
|
|
812
813
|
let P;
|
|
813
|
-
e[27] !==
|
|
814
|
+
e[27] !== L ? (P = L ? /* @__PURE__ */ n(Me, { position: "absolute", padding: "sm", top: "0", left: "0", right: "0", pointerEvents: "none", userSelect: "none", justifyContent: "center", children: /* @__PURE__ */ n(ze, { width: "100%", maxWidth: "45rem", color: "fg.muted", textStyle: "paragraph/M/regular", children: L }) }) : null, e[27] = L, e[28] = P) : P = e[28];
|
|
814
815
|
let F;
|
|
815
|
-
e[29] !==
|
|
816
|
+
e[29] !== D || e[30] !== P ? (F = /* @__PURE__ */ n(tt, { contentEditable: D, placeholder: P, ErrorBoundary: Qe }), e[29] = D, e[30] = P, e[31] = F) : F = e[31];
|
|
816
817
|
let j;
|
|
817
818
|
e[32] !== g || e[33] !== d ? (j = d && g ? /* @__PURE__ */ le(ft, { children: [
|
|
818
819
|
/* @__PURE__ */ n(at, { anchorElem: g }),
|
|
819
820
|
/* @__PURE__ */ n(Sn, { anchorElem: g })
|
|
820
821
|
] }) : null, e[32] = g, e[33] = d, e[34] = j) : j = e[34];
|
|
821
|
-
let
|
|
822
|
-
e[35] !== c || e[36] !== a || e[37] !== v ? (
|
|
822
|
+
let V;
|
|
823
|
+
e[35] !== c || e[36] !== a || e[37] !== v ? (V = v ? /* @__PURE__ */ n(Zt, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (he) => {
|
|
823
824
|
he.read(() => {
|
|
824
|
-
const oe =
|
|
825
|
+
const oe = Rt(), se = Vt(Te, oe);
|
|
825
826
|
a?.(c + se);
|
|
826
827
|
});
|
|
827
|
-
} }) : null, e[35] = c, e[36] = a, e[37] = v, e[38] =
|
|
828
|
+
} }) : null, e[35] = c, e[36] = a, e[37] = v, e[38] = V) : V = e[38];
|
|
828
829
|
let J;
|
|
829
830
|
e[39] !== d ? (J = /* @__PURE__ */ n(ht, { isEditable: d }), e[39] = d, e[40] = J) : J = e[40];
|
|
830
831
|
let X;
|
|
831
|
-
e[41] !==
|
|
832
|
+
e[41] !== E ? (X = E && /* @__PURE__ */ n(pt, {}), e[41] = E, e[42] = X) : X = e[42];
|
|
832
833
|
let q;
|
|
833
|
-
e[43] !== x || e[44] !== _ || e[45] !==
|
|
834
|
+
e[43] !== x || e[44] !== _ || e[45] !== M || e[46] !== z || e[47] !== H || e[48] !== F || e[49] !== j || e[50] !== V || e[51] !== J || e[52] !== X ? (q = /* @__PURE__ */ le(Xe, { initialConfig: x, children: [
|
|
834
835
|
_,
|
|
835
|
-
|
|
836
|
+
k,
|
|
836
837
|
N,
|
|
837
838
|
I,
|
|
838
|
-
|
|
839
|
-
$,
|
|
840
|
-
D,
|
|
839
|
+
M,
|
|
841
840
|
O,
|
|
842
|
-
|
|
841
|
+
z,
|
|
842
|
+
$,
|
|
843
|
+
G,
|
|
843
844
|
U,
|
|
844
845
|
H,
|
|
845
|
-
|
|
846
|
+
B,
|
|
846
847
|
F,
|
|
847
848
|
j,
|
|
848
|
-
|
|
849
|
+
V,
|
|
849
850
|
J,
|
|
850
851
|
X
|
|
851
|
-
] }), e[43] = x, e[44] = _, e[45] =
|
|
852
|
+
] }), e[43] = x, e[44] = _, e[45] = M, e[46] = z, e[47] = H, e[48] = F, e[49] = j, e[50] = V, e[51] = J, e[52] = X, e[53] = q) : q = e[53];
|
|
852
853
|
let ne;
|
|
853
|
-
return e[54] !== T || e[55] !== q ? (ne = /* @__PURE__ */ n(
|
|
854
|
+
return e[54] !== T || e[55] !== q ? (ne = /* @__PURE__ */ n(Me, { ref: S, className: "rich-text", justifyContent: "space-between", width: "100%", maxWidth: "100%", height: T, position: "relative", direction: "column", overflow: "visible", children: q }), e[54] = T, e[55] = q, e[56] = ne) : ne = e[56], ne;
|
|
854
855
|
}
|
|
855
|
-
function
|
|
856
|
+
function xn(t) {
|
|
856
857
|
return console.error(t);
|
|
857
858
|
}
|
|
858
|
-
function
|
|
859
|
+
function ao(t) {
|
|
859
860
|
const e = t.toLowerCase().trim();
|
|
860
861
|
return e ? e.startsWith("image/") ? "image" : e === "application/pdf" ? "pdf" : e === "text/markdown" ? "markdown" : e === "text/csv" || e === "text/tab-separated-values" ? "table" : e === "application/json" ? "json" : (e.startsWith("text/") || e.startsWith("application/"), "text") : "text";
|
|
861
862
|
}
|
|
862
|
-
const
|
|
863
|
+
const Tn = {
|
|
863
864
|
csv: "text/csv",
|
|
864
865
|
tsv: "text/tab-separated-values",
|
|
865
866
|
json: "application/json",
|
|
@@ -883,21 +884,21 @@ const xn = {
|
|
|
883
884
|
yml: "text/yaml",
|
|
884
885
|
yaml: "text/yaml"
|
|
885
886
|
};
|
|
886
|
-
function
|
|
887
|
+
function co(t) {
|
|
887
888
|
const r = (t.split("?")[0]?.split("#")[0] ?? "").split(".").pop()?.toLowerCase();
|
|
888
|
-
return r ?
|
|
889
|
+
return r ? Tn[r] ?? null : null;
|
|
889
890
|
}
|
|
890
891
|
export {
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
892
|
+
ro as CollaborativeMarkdownEditor,
|
|
893
|
+
uo as DefaultRichTextCodeEditor,
|
|
894
|
+
ho as DefaultRichTextDataTable,
|
|
895
|
+
so as MarkdownEditor,
|
|
896
|
+
po as MarkdownPreview,
|
|
897
|
+
go as PromptEditor,
|
|
898
|
+
bo as RichMessage,
|
|
899
|
+
vo as generateEditorStateFromString,
|
|
900
|
+
Co as getTextFromSerializedEditorState,
|
|
901
|
+
ao as inferResourceTypeFromMediaType,
|
|
902
|
+
co as mediaTypeFromPath
|
|
902
903
|
};
|
|
903
904
|
//# sourceMappingURL=rich-text.js.map
|