@delali/web-editor 0.0.0-stage → 0.4.1
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/CHANGELOG.md +39 -0
- package/LICENSE +201 -0
- package/README.md +167 -2
- package/dist/components/editor/chat-comment-effects.d.ts +2 -0
- package/dist/components/editor/chat-types.d.ts +20 -0
- package/dist/components/editor/collaboration/base-collaboration-plugin.d.ts +14 -0
- package/dist/components/editor/collaboration/collaboration-plugin.d.ts +6 -0
- package/dist/components/editor/collaboration/collaboration-session.d.ts +30 -0
- package/dist/components/editor/collaboration/collaboration-starter.d.ts +9 -0
- package/dist/components/editor/collaboration/editor-collaboration.d.ts +16 -0
- package/dist/components/editor/collaboration/editor-collaboration.js +293 -0
- package/dist/components/editor/collaboration/remote-cursor-overlay.d.ts +1 -0
- package/dist/components/editor/collaboration/shared-document.d.ts +18 -0
- package/dist/components/editor/create-editor-plugins.d.ts +3 -0
- package/dist/components/editor/create-editor-plugins.js +25204 -0
- package/dist/components/editor/create-viewer-plugins.d.ts +3 -0
- package/dist/components/editor/editor-base-kit.d.ts +329 -0
- package/dist/components/editor/editor-base-kit.js +3136 -0
- package/dist/components/editor/editor-config.d.ts +14 -0
- package/dist/components/editor/editor-config.js +145 -0
- package/dist/components/editor/editor-kit.d.ts +3978 -0
- package/dist/components/editor/editor-kit.js +18781 -0
- package/dist/components/editor/plate-types.d.ts +99 -0
- package/dist/components/editor/plugins/accordion-group-base-kit.d.ts +2 -0
- package/dist/components/editor/plugins/accordion-group-kit.d.ts +3 -0
- package/dist/components/editor/plugins/accordion-types.d.ts +14 -0
- package/dist/components/editor/plugins/ai-kit.d.ts +248 -0
- package/dist/components/editor/plugins/align-base-kit.d.ts +3 -0
- package/dist/components/editor/plugins/api-doc/expandable-base-kit.d.ts +24 -0
- package/dist/components/editor/plugins/api-doc/expandable-kit.d.ts +29 -0
- package/dist/components/editor/plugins/api-doc/expandable-types.d.ts +7 -0
- package/dist/components/editor/plugins/api-doc/panel-base-kit.d.ts +2 -0
- package/dist/components/editor/plugins/api-doc/panel-kit.d.ts +3 -0
- package/dist/components/editor/plugins/api-doc/panel-types.d.ts +7 -0
- package/dist/components/editor/plugins/api-doc/response-field-base-kit.d.ts +3 -0
- package/dist/components/editor/plugins/api-doc/response-field-kit.d.ts +4 -0
- package/dist/components/editor/plugins/api-doc/response-field-types.d.ts +17 -0
- package/dist/components/editor/plugins/autoformat-kit.d.ts +1 -0
- package/dist/components/editor/plugins/badge-base-kit.d.ts +2 -0
- package/dist/components/editor/plugins/badge-kit.d.ts +3 -0
- package/dist/components/editor/plugins/badge-types.d.ts +24 -0
- package/dist/components/editor/plugins/banner-base-kit.d.ts +2 -0
- package/dist/components/editor/plugins/banner-kit.d.ts +3 -0
- package/dist/components/editor/plugins/banner-types.d.ts +15 -0
- package/dist/components/editor/plugins/basic-blocks-base-kit.d.ts +5 -0
- package/dist/components/editor/plugins/basic-blocks-kit.d.ts +5 -0
- package/dist/components/editor/plugins/basic-marks-base-kit.d.ts +19 -0
- package/dist/components/editor/plugins/basic-marks-kit.d.ts +35 -0
- package/dist/components/editor/plugins/basic-nodes-kit.d.ts +21 -0
- package/dist/components/editor/plugins/block-menu-kit.d.ts +165 -0
- package/dist/components/editor/plugins/block-placeholder-kit.d.ts +14 -0
- package/dist/components/editor/plugins/block-selection-kit.d.ts +137 -0
- package/dist/components/editor/plugins/callout-base-kit.d.ts +20 -0
- package/dist/components/editor/plugins/callout-kit.d.ts +20 -0
- package/dist/components/editor/plugins/callout-types.d.ts +18 -0
- package/dist/components/editor/plugins/card-base-kit.d.ts +2 -0
- package/dist/components/editor/plugins/card-kit.d.ts +3 -0
- package/dist/components/editor/plugins/card-types.d.ts +14 -0
- package/dist/components/editor/plugins/caret-placement-kit.d.ts +8 -0
- package/dist/components/editor/plugins/code-block-base-kit.d.ts +7 -0
- package/dist/components/editor/plugins/code-block-input-rule-gate.d.ts +4 -0
- package/dist/components/editor/plugins/code-block-kit.d.ts +7 -0
- package/dist/components/editor/plugins/color-base-kit.d.ts +2 -0
- package/dist/components/editor/plugins/color-kit.d.ts +3 -0
- package/dist/components/editor/plugins/color-types.d.ts +18 -0
- package/dist/components/editor/plugins/column-base-kit.d.ts +1 -0
- package/dist/components/editor/plugins/column-kit.d.ts +1 -0
- package/dist/components/editor/plugins/comment-base-kit.d.ts +47 -0
- package/dist/components/editor/plugins/comment-kit.d.ts +71 -0
- package/dist/components/editor/plugins/copilot-kit.d.ts +72 -0
- package/dist/components/editor/plugins/cursor-overlay-kit.d.ts +11 -0
- package/dist/components/editor/plugins/date-base-kit.d.ts +19 -0
- package/dist/components/editor/plugins/date-kit.d.ts +19 -0
- package/dist/components/editor/plugins/discussion-kit.d.ts +31 -0
- package/dist/components/editor/plugins/dnd-kit.d.ts +20 -0
- package/dist/components/editor/plugins/docx-kit.d.ts +1 -0
- package/dist/components/editor/plugins/emoji-kit.d.ts +9 -0
- package/dist/components/editor/plugins/exit-break-kit.d.ts +4 -0
- package/dist/components/editor/plugins/floating-toolbar-kit.d.ts +1 -0
- package/dist/components/editor/plugins/font-base-kit.d.ts +9 -0
- package/dist/components/editor/plugins/font-kit.d.ts +9 -0
- package/dist/components/editor/plugins/fraction-input-rule.d.ts +12 -0
- package/dist/components/editor/plugins/frame-base-kit.d.ts +2 -0
- package/dist/components/editor/plugins/frame-kit.d.ts +3 -0
- package/dist/components/editor/plugins/frame-types.d.ts +10 -0
- package/dist/components/editor/plugins/icon-base-kit.d.ts +2 -0
- package/dist/components/editor/plugins/icon-kit.d.ts +3 -0
- package/dist/components/editor/plugins/icon-types.d.ts +15 -0
- package/dist/components/editor/plugins/indent-base-kit.d.ts +1 -0
- package/dist/components/editor/plugins/indent-kit.d.ts +5 -0
- package/dist/components/editor/plugins/input-rule-gate.d.ts +8 -0
- package/dist/components/editor/plugins/line-height-base-kit.d.ts +3 -0
- package/dist/components/editor/plugins/link-base-kit.d.ts +2 -0
- package/dist/components/editor/plugins/link-kit.d.ts +89 -0
- package/dist/components/editor/plugins/list-base-kit.d.ts +1 -0
- package/dist/components/editor/plugins/list-kit.d.ts +16 -0
- package/dist/components/editor/plugins/mark-input-rule-gate.d.ts +2 -0
- package/dist/components/editor/plugins/markdown-kit.d.ts +19 -0
- package/dist/components/editor/plugins/math-base-kit.d.ts +9 -0
- package/dist/components/editor/plugins/math-kit.d.ts +9 -0
- package/dist/components/editor/plugins/media-base-kit.d.ts +25 -0
- package/dist/components/editor/plugins/media-kit.d.ts +38 -0
- package/dist/components/editor/plugins/mention-base-kit.d.ts +11 -0
- package/dist/components/editor/plugins/mention-kit.d.ts +11 -0
- package/dist/components/editor/plugins/mermaid-base-kit.d.ts +2 -0
- package/dist/components/editor/plugins/mermaid-kit.d.ts +3 -0
- package/dist/components/editor/plugins/mermaid-types.d.ts +14 -0
- package/dist/components/editor/plugins/shared/color-selector.d.ts +9 -0
- package/dist/components/editor/plugins/shared/component-popover.d.ts +12 -0
- package/dist/components/editor/plugins/slash-kit.d.ts +1 -0
- package/dist/components/editor/plugins/steps-base-kit.d.ts +3 -0
- package/dist/components/editor/plugins/steps-kit.d.ts +4 -0
- package/dist/components/editor/plugins/steps-types.d.ts +18 -0
- package/dist/components/editor/plugins/suggestion-base-kit.d.ts +32 -0
- package/dist/components/editor/plugins/suggestion-kit.d.ts +53 -0
- package/dist/components/editor/plugins/tabbed-code-block-base-kit.d.ts +32 -0
- package/dist/components/editor/plugins/tabbed-code-block-kit.d.ts +33 -0
- package/dist/components/editor/plugins/tabbed-code-block-types.d.ts +29 -0
- package/dist/components/editor/plugins/table-base-kit.d.ts +94 -0
- package/dist/components/editor/plugins/table-kit.d.ts +162 -0
- package/dist/components/editor/plugins/tabs-base-kit.d.ts +2 -0
- package/dist/components/editor/plugins/tabs-kit.d.ts +3 -0
- package/dist/components/editor/plugins/tabs-types.d.ts +14 -0
- package/dist/components/editor/plugins/text-substitution-input-rule-gate.d.ts +4 -0
- package/dist/components/editor/plugins/tiles-base-kit.d.ts +3 -0
- package/dist/components/editor/plugins/tiles-kit.d.ts +4 -0
- package/dist/components/editor/plugins/tiles-types.d.ts +16 -0
- package/dist/components/editor/plugins/toc-base-kit.d.ts +1 -0
- package/dist/components/editor/plugins/toc-kit.d.ts +5 -0
- package/dist/components/editor/plugins/todo-to-bullet-kit.d.ts +7 -0
- package/dist/components/editor/plugins/toggle-base-kit.d.ts +12 -0
- package/dist/components/editor/plugins/toggle-kit.d.ts +16 -0
- package/dist/components/editor/plugins/tooltip-base-kit.d.ts +2 -0
- package/dist/components/editor/plugins/tooltip-html.d.ts +27 -0
- package/dist/components/editor/plugins/tooltip-kit.d.ts +3 -0
- package/dist/components/editor/plugins/tooltip-types.d.ts +10 -0
- package/dist/components/editor/plugins/tree-base-kit.d.ts +2 -0
- package/dist/components/editor/plugins/tree-kit.d.ts +3 -0
- package/dist/components/editor/plugins/tree-types.d.ts +26 -0
- package/dist/components/editor/plugins/typed-conversion-options.d.ts +13 -0
- package/dist/components/editor/plugins/update-base-kit.d.ts +1 -0
- package/dist/components/editor/plugins/update-kit.d.ts +4 -0
- package/dist/components/editor/plugins/update-types.d.ts +19 -0
- package/dist/components/editor/plugins/web-address-text.d.ts +1 -0
- package/dist/components/editor/transforms.d.ts +8 -0
- package/dist/components/editor/use-chat.d.ts +3 -0
- package/dist/components/editor/use-chat.js +3315 -0
- package/dist/components/editor/use-typed-conversion-options.d.ts +3 -0
- package/dist/components/editor/version-history/chunk-node.d.ts +7 -0
- package/dist/components/editor/version-history/chunk-plugin.d.ts +6 -0
- package/dist/components/editor/version-history/collapse-blocks-without-diff.d.ts +4 -0
- package/dist/components/editor/version-history/diff-node.d.ts +9 -0
- package/dist/components/editor/version-history/diff-plate.d.ts +7 -0
- package/dist/components/editor/version-history/diff-plugin.d.ts +8 -0
- package/dist/components/editor/version-history/index.d.ts +9 -0
- package/dist/components/editor/version-history/index.js +19179 -0
- package/dist/components/editor/version-history/use-object-version.d.ts +1 -0
- package/dist/components/editor/version-history/use-reset-editor-on-change.d.ts +7 -0
- package/dist/components/editor/version-history/version-plate.d.ts +7 -0
- package/dist/components/editor/web-editor.d.ts +6 -0
- package/dist/components/editor/web-editor.js +27295 -0
- package/dist/context/editor-adapter-context.d.ts +13 -0
- package/dist/context/editor-adapter-context.js +124 -0
- package/dist/context/editor-adapter.d.ts +262 -0
- package/dist/context/editor-toc-context.d.ts +16 -0
- package/dist/context/heading-slug-context.d.ts +11 -0
- package/dist/context/link-resolution-context.d.ts +24 -0
- package/dist/context/link-resolution-store.d.ts +20 -0
- package/dist/context/portal-container.d.ts +7 -0
- package/dist/hooks/use-copy-to-clipboard.d.ts +10 -0
- package/dist/hooks/use-dark-mode.d.ts +1 -0
- package/dist/hooks/use-debounce-callback.d.ts +108 -0
- package/dist/hooks/use-debounce.d.ts +1 -0
- package/dist/hooks/use-is-touch-device.d.ts +1 -0
- package/dist/hooks/use-lock-scroll.d.ts +1 -0
- package/dist/hooks/use-media-query.d.ts +2 -0
- package/dist/hooks/use-mounted.d.ts +6 -0
- package/dist/hooks/use-on-click-outside.d.ts +26 -0
- package/dist/hooks/use-shield-input-selection-from-editor.d.ts +3 -0
- package/dist/hooks/use-upload-file.d.ts +25 -0
- package/dist/hooks/use-upload-file.js +129 -0
- package/dist/lib/accepted-file-types.d.ts +1 -0
- package/dist/lib/block-features.d.ts +11 -0
- package/dist/lib/comment-mark-strip.d.ts +24 -0
- package/dist/lib/comment-mark-strip.js +56 -0
- package/dist/lib/download-file.d.ts +1 -0
- package/dist/lib/editor-element-path.d.ts +8 -0
- package/dist/lib/extract-headings.d.ts +13 -0
- package/dist/lib/extract-headings.js +79 -0
- package/dist/lib/file-size-limit.d.ts +7 -0
- package/dist/lib/html-serialize-hast.d.ts +18 -0
- package/dist/lib/html-serialize-rules.d.ts +15 -0
- package/dist/lib/html-serialize-utils.d.ts +24 -0
- package/dist/lib/html-serialize-utils.js +392 -0
- package/dist/lib/line-marking-context.d.ts +13 -0
- package/dist/lib/line-marking.d.ts +47 -0
- package/dist/lib/list-html.d.ts +30 -0
- package/dist/lib/markdown-joiner-transform.d.ts +31 -0
- package/dist/lib/markdown-utils.d.ts +4 -0
- package/dist/lib/markdown-utils.js +25275 -0
- package/dist/lib/mdx/mdx-archetype-rules.d.ts +2 -0
- package/dist/lib/mdx/mdx-attribute-codec.d.ts +23 -0
- package/dist/lib/mdx/mdx-color-rules.d.ts +2 -0
- package/dist/lib/mdx/mdx-component-rules.d.ts +2 -0
- package/dist/lib/mdx/mdx-mermaid-rules.d.ts +10 -0
- package/dist/lib/mdx/mdx-reference-rules.d.ts +11 -0
- package/dist/lib/mdx/mdx-round-trip.d.ts +3 -0
- package/dist/lib/mdx/mdx-round-trip.js +1397 -0
- package/dist/lib/mdx/mdx-rule-builder.d.ts +45 -0
- package/dist/lib/mdx/mdx-server-plugins.d.ts +8 -0
- package/dist/lib/mdx/mdx-tabbed-code-rules.d.ts +2 -0
- package/dist/lib/mdx/mdx-tabs-rules.d.ts +2 -0
- package/dist/lib/mdx/mdx-toggle-rules.d.ts +9 -0
- package/dist/lib/mdx/mdx-tree-rules.d.ts +2 -0
- package/dist/lib/media-html.d.ts +121 -0
- package/dist/lib/paragraph-html.d.ts +26 -0
- package/dist/lib/server-plugins.d.ts +199 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.js +25 -0
- package/dist/lib/video-embeds.d.ts +9 -0
- package/dist/styles.css +6726 -0
- package/dist/types/editor.d.ts +161 -0
- package/dist/types/editor.js +77 -0
- package/dist/ui/accordion-group-node-static.d.ts +11 -0
- package/dist/ui/accordion-group-node.d.ts +10 -0
- package/dist/ui/ai-chat-editor.d.ts +4 -0
- package/dist/ui/ai-menu.d.ts +2 -0
- package/dist/ui/ai-node.d.ts +3 -0
- package/dist/ui/ai-toolbar-button.d.ts +3 -0
- package/dist/ui/alert-dialog.d.ts +20 -0
- package/dist/ui/api-doc/expandable-node-static.d.ts +4 -0
- package/dist/ui/api-doc/expandable-node.d.ts +3 -0
- package/dist/ui/api-doc/expandable-settings.d.ts +17 -0
- package/dist/ui/api-doc/panel-node-static.d.ts +3 -0
- package/dist/ui/api-doc/panel-node.d.ts +3 -0
- package/dist/ui/api-doc/response-field-item-node-static.d.ts +3 -0
- package/dist/ui/api-doc/response-field-item-node.d.ts +3 -0
- package/dist/ui/api-doc/response-field-node-static.d.ts +9 -0
- package/dist/ui/api-doc/response-field-node.d.ts +9 -0
- package/dist/ui/avatar.d.ts +16 -0
- package/dist/ui/badge-node-static.d.ts +3 -0
- package/dist/ui/badge-node.d.ts +3 -0
- package/dist/ui/badge-settings-options.d.ts +24 -0
- package/dist/ui/badge-settings.d.ts +19 -0
- package/dist/ui/badge.d.ts +9 -0
- package/dist/ui/banner-node-static.d.ts +4 -0
- package/dist/ui/banner-node.d.ts +3 -0
- package/dist/ui/block-context-menu.d.ts +8 -0
- package/dist/ui/block-discussion.d.ts +3 -0
- package/dist/ui/block-draggable.d.ts +2 -0
- package/dist/ui/block-list-static.d.ts +2 -0
- package/dist/ui/block-list.d.ts +2 -0
- package/dist/ui/block-menu.d.ts +167 -0
- package/dist/ui/block-selection.d.ts +5 -0
- package/dist/ui/block-suggestion.d.ts +17 -0
- package/dist/ui/blockquote-node-static.d.ts +2 -0
- package/dist/ui/blockquote-node.d.ts +2 -0
- package/dist/ui/button.d.ts +81 -0
- package/dist/ui/calendar.d.ts +5 -0
- package/dist/ui/callout-detail-settings.d.ts +15 -0
- package/dist/ui/callout-icon.d.ts +9 -0
- package/dist/ui/callout-node-static.d.ts +2 -0
- package/dist/ui/callout-node.d.ts +3 -0
- package/dist/ui/callout-settings.d.ts +19 -0
- package/dist/ui/callout-type-button.d.ts +9 -0
- package/dist/ui/caption.d.ts +72 -0
- package/dist/ui/card-element-actions.d.ts +7 -0
- package/dist/ui/card-icon-settings.d.ts +11 -0
- package/dist/ui/card-node-static.d.ts +3 -0
- package/dist/ui/card-node.d.ts +3 -0
- package/dist/ui/card-settings.d.ts +24 -0
- package/dist/ui/card-title-row.d.ts +14 -0
- package/dist/ui/checkbox.d.ts +4 -0
- package/dist/ui/code-block-line-marking-form.d.ts +9 -0
- package/dist/ui/code-block-line-marking-input.d.ts +8 -0
- package/dist/ui/code-block-line-marking-popover.d.ts +12 -0
- package/dist/ui/code-block-line-marking-state.d.ts +11 -0
- package/dist/ui/code-block-node-static.d.ts +10 -0
- package/dist/ui/code-block-node.d.ts +5 -0
- package/dist/ui/code-line-selection-toolbar.d.ts +10 -0
- package/dist/ui/code-line-wrapper.d.ts +22 -0
- package/dist/ui/code-node-static.d.ts +2 -0
- package/dist/ui/code-node.d.ts +2 -0
- package/dist/ui/collapsible.d.ts +6 -0
- package/dist/ui/color-copy-icon.d.ts +9 -0
- package/dist/ui/color-element-actions.d.ts +7 -0
- package/dist/ui/color-item-settings.d.ts +11 -0
- package/dist/ui/color-node-static.d.ts +3 -0
- package/dist/ui/color-node.d.ts +3 -0
- package/dist/ui/color-settings.d.ts +18 -0
- package/dist/ui/color-swatch-editable.d.ts +12 -0
- package/dist/ui/color-table-row-editable.d.ts +10 -0
- package/dist/ui/column-node-static.d.ts +4 -0
- package/dist/ui/column-node.d.ts +3 -0
- package/dist/ui/command.d.ts +25 -0
- package/dist/ui/comment-node-static.d.ts +3 -0
- package/dist/ui/comment-node.d.ts +3 -0
- package/dist/ui/comment-toolbar-button.d.ts +1 -0
- package/dist/ui/comment.d.ts +45 -0
- package/dist/ui/cursor-overlay.d.ts +4 -0
- package/dist/ui/date-node-static.d.ts +2 -0
- package/dist/ui/date-node.d.ts +2 -0
- package/dist/ui/dialog.d.ts +90 -0
- package/dist/ui/dropdown-menu.d.ts +35 -0
- package/dist/ui/editor-inspector-panel.d.ts +6 -0
- package/dist/ui/editor-static.d.ts +8 -0
- package/dist/ui/editor.d.ts +15 -0
- package/dist/ui/emoji-node.d.ts +3 -0
- package/dist/ui/emoji-toolbar-button.d.ts +16 -0
- package/dist/ui/equation-node-static.d.ts +4 -0
- package/dist/ui/equation-node.d.ts +5 -0
- package/dist/ui/equation-toolbar-button.d.ts +2 -0
- package/dist/ui/floating-discussion.d.ts +8 -0
- package/dist/ui/floating-toolbar-buttons.d.ts +1 -0
- package/dist/ui/floating-toolbar.d.ts +6 -0
- package/dist/ui/font-color-toolbar-button.d.ts +15 -0
- package/dist/ui/frame-node-static.d.ts +3 -0
- package/dist/ui/frame-node.d.ts +3 -0
- package/dist/ui/frame-settings.d.ts +19 -0
- package/dist/ui/ghost-text.d.ts +1 -0
- package/dist/ui/heading-node-static.d.ts +10 -0
- package/dist/ui/heading-node.d.ts +14 -0
- package/dist/ui/highlight-node-static.d.ts +2 -0
- package/dist/ui/highlight-node.d.ts +2 -0
- package/dist/ui/hover-card.d.ts +6 -0
- package/dist/ui/hr-node-static.d.ts +2 -0
- package/dist/ui/hr-node.d.ts +2 -0
- package/dist/ui/icon-node-static.d.ts +3 -0
- package/dist/ui/icon-node.d.ts +3 -0
- package/dist/ui/icon-picker.d.ts +16 -0
- package/dist/ui/icon-settings.d.ts +17 -0
- package/dist/ui/inline-combobox.d.ts +38 -0
- package/dist/ui/input.d.ts +7 -0
- package/dist/ui/kbd-node-static.d.ts +2 -0
- package/dist/ui/kbd-node.d.ts +2 -0
- package/dist/ui/label.d.ts +8 -0
- package/dist/ui/link-node-static.d.ts +11 -0
- package/dist/ui/link-node.d.ts +11 -0
- package/dist/ui/link-reference.d.ts +39 -0
- package/dist/ui/link-reference.js +84 -0
- package/dist/ui/link-search-panel.d.ts +5 -0
- package/dist/ui/link-toolbar-button.d.ts +3 -0
- package/dist/ui/link-toolbar-edit-command.d.ts +7 -0
- package/dist/ui/link-toolbar-shared.d.ts +18 -0
- package/dist/ui/link-toolbar.d.ts +1 -0
- package/dist/ui/mark-toolbar-button.d.ts +6 -0
- package/dist/ui/media-align-button.d.ts +5 -0
- package/dist/ui/media-audio-node-static.d.ts +3 -0
- package/dist/ui/media-audio-node.d.ts +2 -0
- package/dist/ui/media-card.d.ts +11 -0
- package/dist/ui/media-embed-node-static.d.ts +6 -0
- package/dist/ui/media-embed-node.d.ts +2 -0
- package/dist/ui/media-file-display.d.ts +11 -0
- package/dist/ui/media-file-mode-dropdown.d.ts +10 -0
- package/dist/ui/media-file-node-static.d.ts +3 -0
- package/dist/ui/media-file-node.d.ts +2 -0
- package/dist/ui/media-hint-icon-picker.d.ts +5 -0
- package/dist/ui/media-hint-settings.d.ts +2 -0
- package/dist/ui/media-image-lightbox.d.ts +17 -0
- package/dist/ui/media-image-node-static.d.ts +6 -0
- package/dist/ui/media-image-node.d.ts +7 -0
- package/dist/ui/media-placeholder-node.d.ts +3 -0
- package/dist/ui/media-preview-dialog.d.ts +12 -0
- package/dist/ui/media-toolbar.d.ts +3 -0
- package/dist/ui/media-upload-toast.d.ts +1 -0
- package/dist/ui/media-video-node-static.d.ts +6 -0
- package/dist/ui/media-video-node.d.ts +2 -0
- package/dist/ui/member-profile-card.d.ts +17 -0
- package/dist/ui/mention-document-element.d.ts +5 -0
- package/dist/ui/mention-document-hover-card.d.ts +17 -0
- package/dist/ui/mention-document-link.d.ts +13 -0
- package/dist/ui/mention-element.d.ts +5 -0
- package/dist/ui/mention-input-element.d.ts +2 -0
- package/dist/ui/mention-node-static.d.ts +7 -0
- package/dist/ui/mention-page-combobox-group.d.ts +8 -0
- package/dist/ui/mention-people-combobox-group.d.ts +8 -0
- package/dist/ui/menu.d.ts +103 -0
- package/dist/ui/mermaid-node-static.d.ts +4 -0
- package/dist/ui/mermaid-node.d.ts +3 -0
- package/dist/ui/more-toolbar-button.d.ts +3 -0
- package/dist/ui/paragraph-node-static.d.ts +2 -0
- package/dist/ui/paragraph-node.d.ts +2 -0
- package/dist/ui/popover.d.ts +11 -0
- package/dist/ui/progress.d.ts +3 -0
- package/dist/ui/resize-handle.d.ts +15 -0
- package/dist/ui/select.d.ts +13 -0
- package/dist/ui/separator.d.ts +8 -0
- package/dist/ui/slash-node.d.ts +20 -0
- package/dist/ui/smart-link-clipboard.d.ts +1 -0
- package/dist/ui/smart-link-copy-button.d.ts +6 -0
- package/dist/ui/smart-link-mode-dropdown.d.ts +9 -0
- package/dist/ui/smart-link-toolbar.d.ts +17 -0
- package/dist/ui/smart-link-view.d.ts +23 -0
- package/dist/ui/smart-link.d.ts +43 -0
- package/dist/ui/spinner.d.ts +7 -0
- package/dist/ui/step-node-static.d.ts +3 -0
- package/dist/ui/step-node.d.ts +3 -0
- package/dist/ui/step-settings.d.ts +19 -0
- package/dist/ui/steps-node-static.d.ts +10 -0
- package/dist/ui/steps-node.d.ts +10 -0
- package/dist/ui/suggestion-node-static.d.ts +3 -0
- package/dist/ui/suggestion-node.d.ts +6 -0
- package/dist/ui/suggestion-toolbar-button.d.ts +1 -0
- package/dist/ui/switch.d.ts +4 -0
- package/dist/ui/tabbed-code-block-actions.d.ts +24 -0
- package/dist/ui/tabbed-code-block-header.d.ts +23 -0
- package/dist/ui/tabbed-code-block-language-selector.d.ts +7 -0
- package/dist/ui/tabbed-code-block-languages.d.ts +6 -0
- package/dist/ui/tabbed-code-block-node-static.d.ts +4 -0
- package/dist/ui/tabbed-code-block-node.d.ts +4 -0
- package/dist/ui/tabbed-code-block-settings.d.ts +18 -0
- package/dist/ui/tabbed-code-block-sync.d.ts +10 -0
- package/dist/ui/tabbed-code-block-tab-dropdown.d.ts +10 -0
- package/dist/ui/tabbed-code-block-tab-strip.d.ts +27 -0
- package/dist/ui/tabbed-code-block-tab-trigger.d.ts +14 -0
- package/dist/ui/tabbed-code-block-utils.d.ts +9 -0
- package/dist/ui/table-icons.d.ts +7 -0
- package/dist/ui/table-node-static.d.ts +9 -0
- package/dist/ui/table-node.d.ts +9 -0
- package/dist/ui/tabs-node-static.d.ts +4 -0
- package/dist/ui/tabs-node.d.ts +3 -0
- package/dist/ui/tabs.d.ts +10 -0
- package/dist/ui/textarea.d.ts +10 -0
- package/dist/ui/tile-node-static.d.ts +3 -0
- package/dist/ui/tile-node.d.ts +3 -0
- package/dist/ui/tile-settings.d.ts +18 -0
- package/dist/ui/tiles-node-static.d.ts +3 -0
- package/dist/ui/tiles-node.d.ts +3 -0
- package/dist/ui/toc-node-static.d.ts +2 -0
- package/dist/ui/toc-node.d.ts +2 -0
- package/dist/ui/toc-sidebar.d.ts +6 -0
- package/dist/ui/toc-state-sync.d.ts +5 -0
- package/dist/ui/toggle-node-static.d.ts +3 -0
- package/dist/ui/toggle-node-views.d.ts +35 -0
- package/dist/ui/toggle-node.d.ts +3 -0
- package/dist/ui/toggle-settings.d.ts +23 -0
- package/dist/ui/toggle.d.ts +8 -0
- package/dist/ui/toolbar.d.ts +37 -0
- package/dist/ui/tooltip-node-static.d.ts +3 -0
- package/dist/ui/tooltip-node.d.ts +3 -0
- package/dist/ui/tooltip-preview-content.d.ts +6 -0
- package/dist/ui/tooltip-settings.d.ts +21 -0
- package/dist/ui/tooltip-toolbar-button.d.ts +3 -0
- package/dist/ui/tooltip.d.ts +19 -0
- package/dist/ui/tree-context-value.d.ts +22 -0
- package/dist/ui/tree-context.d.ts +32 -0
- package/dist/ui/tree-file-node-static.d.ts +8 -0
- package/dist/ui/tree-file-node.d.ts +11 -0
- package/dist/ui/tree-folder-node-static.d.ts +9 -0
- package/dist/ui/tree-folder-node.d.ts +12 -0
- package/dist/ui/tree-item-utils.d.ts +11 -0
- package/dist/ui/tree-items-list.d.ts +11 -0
- package/dist/ui/tree-node-events.d.ts +19 -0
- package/dist/ui/tree-node-state.d.ts +14 -0
- package/dist/ui/tree-node-static.d.ts +12 -0
- package/dist/ui/tree-node.d.ts +5 -0
- package/dist/ui/tree-root-actions.d.ts +11 -0
- package/dist/ui/tree-settings.d.ts +18 -0
- package/dist/ui/turn-into-toolbar-button.d.ts +129 -0
- package/dist/ui/update-display-tags.d.ts +5 -0
- package/dist/ui/update-node-static.d.ts +2 -0
- package/dist/ui/update-node.d.ts +3 -0
- package/dist/ui/update-rss-settings.d.ts +9 -0
- package/dist/ui/update-settings.d.ts +21 -0
- package/dist/ui/update-tags-settings.d.ts +8 -0
- package/dist/ui/updates-node-static.d.ts +2 -0
- package/dist/ui/updates-node.d.ts +2 -0
- package/dist/ui/use-member-profile.d.ts +22 -0
- package/dist/ui/use-placeholder-max-file-size.d.ts +3 -0
- package/dist/vendor/slate-yjs-core.d.ts +1 -0
- package/dist/vendor/slate-yjs-core.js +2 -0
- package/dist/vendor/y-protocols-awareness.d.ts +1 -0
- package/dist/vendor/y-protocols-awareness.js +2 -0
- package/dist/vendor/yjs.d.ts +1 -0
- package/dist/vendor/yjs.js +2 -0
- package/package.json +255 -4
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
export declare const inputVariants: (props?: ({
|
|
4
|
+
variant?: "search" | "link" | "flat" | "default" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export type InputProps = React.ComponentProps<'input'> & VariantProps<typeof inputVariants>;
|
|
7
|
+
export declare function Input({ className, variant, ...props }: InputProps): React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Label as LabelPrimitive } from 'radix-ui';
|
|
3
|
+
import type * as React from 'react';
|
|
4
|
+
declare const labelVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
5
|
+
export declare function Label({ className, disabled, ...props }: React.ComponentProps<typeof LabelPrimitive.Root> & {
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
} & VariantProps<typeof labelVariants>): React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TLinkElement } from 'platejs';
|
|
2
|
+
import { type SlateElementProps } from 'platejs/static';
|
|
3
|
+
interface LinkElementStaticProps extends SlateElementProps<TLinkElement> {
|
|
4
|
+
isPlainLink?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function LinkElementStatic({ isPlainLink, ...props }: LinkElementStaticProps): import("react").JSX.Element;
|
|
7
|
+
/**
|
|
8
|
+
* Renders a read-only link as its own text on the text baseline, with the same href guards as the smart link.
|
|
9
|
+
*/
|
|
10
|
+
export declare const PlainLinkElementStatic: (props: SlateElementProps<TLinkElement>) => import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type PlateElementProps } from 'platejs/react';
|
|
2
|
+
interface LinkElementProps extends PlateElementProps {
|
|
3
|
+
isPlainLink?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function LinkElement({ isPlainLink, ...props }: LinkElementProps): import("react").JSX.Element;
|
|
6
|
+
/**
|
|
7
|
+
* Renders a link as its own editable text on the text baseline, keeping the click toolbar to open, copy, edit, or
|
|
8
|
+
* remove it, but without the smart link view menu.
|
|
9
|
+
*/
|
|
10
|
+
export declare const PlainLinkElement: (props: PlateElementProps) => import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const LINK_REFERENCE_SCOPES: readonly ["editorial", "workspace-doc"];
|
|
2
|
+
export type LinkReferenceScope = (typeof LINK_REFERENCE_SCOPES)[number];
|
|
3
|
+
export declare const EDITORIAL_REFERENCE_PLATFORMS: readonly ["apps", "conjoin"];
|
|
4
|
+
export type EditorialReferencePlatform = (typeof EDITORIAL_REFERENCE_PLATFORMS)[number];
|
|
5
|
+
export interface EditorialLinkReference {
|
|
6
|
+
scope: 'editorial';
|
|
7
|
+
platform: EditorialReferencePlatform;
|
|
8
|
+
contentType: string;
|
|
9
|
+
targetId: string;
|
|
10
|
+
}
|
|
11
|
+
export interface WorkspaceDocLinkReference {
|
|
12
|
+
scope: 'workspace-doc';
|
|
13
|
+
targetId: string;
|
|
14
|
+
}
|
|
15
|
+
export type LinkReference = EditorialLinkReference | WorkspaceDocLinkReference;
|
|
16
|
+
/**
|
|
17
|
+
* Narrows an unknown persisted `reference` field to a typed reference. Returns
|
|
18
|
+
* null for any shape that fails structural validation, which the renderers
|
|
19
|
+
* treat as an unresolvable reference and fall back to inert text. Bounds and
|
|
20
|
+
* character classes are enforced here so a hostile or corrupt document can
|
|
21
|
+
* never drive a downstream lookup with an unbounded or control-bearing key.
|
|
22
|
+
*/
|
|
23
|
+
export declare const parseLinkReference: (value: unknown) => LinkReference | null;
|
|
24
|
+
/**
|
|
25
|
+
* Structurally unambiguous key for a reference. Editorial references key on
|
|
26
|
+
* (scope, platform, contentType, targetId); workspace-doc references key on
|
|
27
|
+
* (scope, targetId). JSON.stringify of a fixed-shape tuple keeps the key
|
|
28
|
+
* collision-free even if a field legitimately contains a separator character.
|
|
29
|
+
*/
|
|
30
|
+
export declare const linkReferenceKey: (reference: LinkReference) => string;
|
|
31
|
+
export declare const readElementReference: (element: {
|
|
32
|
+
reference?: unknown;
|
|
33
|
+
}) => LinkReference | null;
|
|
34
|
+
/**
|
|
35
|
+
* Inverse of `linkReferenceKey`. Only keys produced by `linkReferenceKey` are
|
|
36
|
+
* accepted; anything else returns null. Lets string-keyed plumbing (resolver
|
|
37
|
+
* caches, seed maps) recover the typed reference without a side channel.
|
|
38
|
+
*/
|
|
39
|
+
export declare const linkReferenceFromKey: (key: string) => LinkReference | null;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// src/ui/link-reference.ts
|
|
2
|
+
var LINK_REFERENCE_SCOPES = ["editorial", "workspace-doc"];
|
|
3
|
+
var EDITORIAL_REFERENCE_PLATFORMS = ["apps", "conjoin"];
|
|
4
|
+
var TARGET_ID_MAX_LENGTH = 128;
|
|
5
|
+
var CONTENT_TYPE_MAX_LENGTH = 64;
|
|
6
|
+
var TARGET_ID_PATTERN = /^[A-Za-z0-9._~-]+$/;
|
|
7
|
+
var CONTENT_TYPE_PATTERN = /^[a-z0-9_]+$/;
|
|
8
|
+
var isPlainObject = (value) => {
|
|
9
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
10
|
+
};
|
|
11
|
+
var isSafeTargetId = (value) => {
|
|
12
|
+
return typeof value === "string" && value.length > 0 && value.length <= TARGET_ID_MAX_LENGTH && !value.includes("\0") && TARGET_ID_PATTERN.test(value);
|
|
13
|
+
};
|
|
14
|
+
var isSafeContentType = (value) => {
|
|
15
|
+
return typeof value === "string" && value.length > 0 && value.length <= CONTENT_TYPE_MAX_LENGTH && CONTENT_TYPE_PATTERN.test(value);
|
|
16
|
+
};
|
|
17
|
+
var isEditorialPlatform = (value) => {
|
|
18
|
+
return value === "apps" || value === "conjoin";
|
|
19
|
+
};
|
|
20
|
+
var parseLinkReference = (value) => {
|
|
21
|
+
if (!isPlainObject(value)) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
if (value.scope === "editorial") {
|
|
25
|
+
if (!isEditorialPlatform(value.platform) || !isSafeContentType(value.contentType) || !isSafeTargetId(value.targetId)) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
scope: "editorial",
|
|
30
|
+
platform: value.platform,
|
|
31
|
+
contentType: value.contentType,
|
|
32
|
+
targetId: value.targetId
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
if (value.scope === "workspace-doc") {
|
|
36
|
+
if (!isSafeTargetId(value.targetId)) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
return { scope: "workspace-doc", targetId: value.targetId };
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
};
|
|
43
|
+
var linkReferenceKey = (reference) => {
|
|
44
|
+
if (reference.scope === "editorial") {
|
|
45
|
+
return JSON.stringify(["editorial", reference.platform, reference.contentType, reference.targetId]);
|
|
46
|
+
}
|
|
47
|
+
return JSON.stringify(["workspace-doc", reference.targetId]);
|
|
48
|
+
};
|
|
49
|
+
var readElementReference = (element) => {
|
|
50
|
+
return parseLinkReference(element.reference);
|
|
51
|
+
};
|
|
52
|
+
var linkReferenceFromKey = (key) => {
|
|
53
|
+
if (key.length === 0 || key.length > 512) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
const parsed = JSON.parse(key);
|
|
58
|
+
if (!Array.isArray(parsed)) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
if (parsed[0] === "editorial") {
|
|
62
|
+
return parseLinkReference({
|
|
63
|
+
scope: "editorial",
|
|
64
|
+
platform: parsed[1],
|
|
65
|
+
contentType: parsed[2],
|
|
66
|
+
targetId: parsed[3]
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
if (parsed[0] === "workspace-doc") {
|
|
70
|
+
return parseLinkReference({ scope: "workspace-doc", targetId: parsed[1] });
|
|
71
|
+
}
|
|
72
|
+
return null;
|
|
73
|
+
} catch (e) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
export {
|
|
78
|
+
EDITORIAL_REFERENCE_PLATFORMS,
|
|
79
|
+
LINK_REFERENCE_SCOPES,
|
|
80
|
+
linkReferenceFromKey,
|
|
81
|
+
linkReferenceKey,
|
|
82
|
+
parseLinkReference,
|
|
83
|
+
readElementReference
|
|
84
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface EditLinkCommandProps {
|
|
2
|
+
initialUrl: string;
|
|
3
|
+
setInitialUrl: (url: string) => void;
|
|
4
|
+
autoFocus?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function EditLinkCommand({ autoFocus, initialUrl, setInitialUrl }: EditLinkCommandProps): import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PlateEditor } from 'platejs/react';
|
|
2
|
+
import type { LinkReference } from './link-reference';
|
|
3
|
+
export declare const upsertEditorLink: (editor: PlateEditor, url: string) => string | null;
|
|
4
|
+
interface InsertSmartLinkOptions {
|
|
5
|
+
url?: string;
|
|
6
|
+
reference?: LinkReference;
|
|
7
|
+
text?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Inserts a link from the search panel. A `reference` persists typed identity
|
|
11
|
+
* with no url; a `url` persists an external link. A non-empty `text` becomes
|
|
12
|
+
* the visible label; an empty one lets Plate wrap the current selection (or
|
|
13
|
+
* fall back to the URL). Display mode is left unset so it normalizes to the
|
|
14
|
+
* inline default.
|
|
15
|
+
*/
|
|
16
|
+
export declare const insertSmartLink: (editor: PlateEditor, { reference, text, url }: InsertSmartLinkOptions) => boolean;
|
|
17
|
+
export declare const getOverlayAnchorElement: () => HTMLElement | null;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function LinkFloatingToolbar(): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import { ToolbarButton } from './toolbar';
|
|
3
|
+
export declare function MarkToolbarButton({ clear, nodeType, ...props }: React.ComponentProps<typeof ToolbarButton> & {
|
|
4
|
+
nodeType: string;
|
|
5
|
+
clear?: string[] | string;
|
|
6
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type LucideIcon } from 'lucide-react';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
export declare const HINT_ICONS: Record<string, LucideIcon>;
|
|
4
|
+
export declare function MediaHint({ hint, hintIcon }: {
|
|
5
|
+
hint?: string;
|
|
6
|
+
hintIcon?: string;
|
|
7
|
+
}): React.JSX.Element | null;
|
|
8
|
+
export declare function MediaCardBody({ children, className }: {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type TCaptionElement, type TMediaEmbedElement, type TResizableProps } from 'platejs';
|
|
2
|
+
import { type SlateElementProps } from 'platejs/static';
|
|
3
|
+
export declare function MediaEmbedElementStatic(props: SlateElementProps<TMediaEmbedElement & TCaptionElement & TResizableProps & {
|
|
4
|
+
hint?: string;
|
|
5
|
+
hintIcon?: string;
|
|
6
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const FILE_DISPLAY_MODES: readonly ["inline", "url", "embed"];
|
|
2
|
+
export type FileDisplayMode = (typeof FILE_DISPLAY_MODES)[number];
|
|
3
|
+
export declare const DEFAULT_FILE_DISPLAY_MODE: FileDisplayMode;
|
|
4
|
+
export declare const normalizeFileDisplayMode: (value: unknown) => FileDisplayMode;
|
|
5
|
+
/**
|
|
6
|
+
* Reports whether the browser can render this file inline in a frame. Embed mode
|
|
7
|
+
* falls back to the inline chip when this is false so callers never mount a frame
|
|
8
|
+
* the browser would only offer for download. The extension is read from the file
|
|
9
|
+
* name first and the URL second.
|
|
10
|
+
*/
|
|
11
|
+
export declare const isEmbeddableFile: (name: string, url: string) => boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FileDisplayMode } from './media-file-display';
|
|
2
|
+
interface MediaFileModeDropdownProps {
|
|
3
|
+
canEdit: boolean;
|
|
4
|
+
canEmbed: boolean;
|
|
5
|
+
displayMode: FileDisplayMode;
|
|
6
|
+
onDisplayModeChange: (mode: FileDisplayMode) => void;
|
|
7
|
+
onModeMenuOpenChange?: (open: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function MediaFileModeDropdown({ canEdit, canEmbed, displayMode, onDisplayModeChange, onModeMenuOpenChange, }: MediaFileModeDropdownProps): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface ImageLightboxRect {
|
|
2
|
+
height: number;
|
|
3
|
+
left: number;
|
|
4
|
+
naturalHeight: number;
|
|
5
|
+
naturalWidth: number;
|
|
6
|
+
top: number;
|
|
7
|
+
width: number;
|
|
8
|
+
}
|
|
9
|
+
interface ImageLightboxProps {
|
|
10
|
+
alt?: string;
|
|
11
|
+
isOpen: boolean;
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
sourceRect: ImageLightboxRect | null;
|
|
14
|
+
src: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function ImageLightbox({ alt, isOpen, onClose, sourceRect, src }: ImageLightboxProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TCaptionElement, TImageElement, TResizableProps } from 'platejs';
|
|
2
|
+
import { type SlateElementProps } from 'platejs/static';
|
|
3
|
+
export declare function ImageElementStatic(props: SlateElementProps<TImageElement & TCaptionElement & TResizableProps & {
|
|
4
|
+
hint?: string;
|
|
5
|
+
hintIcon?: string;
|
|
6
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TImageElement } from 'platejs';
|
|
2
|
+
import { type PlateElementProps } from 'platejs/react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export declare const ImageElement: React.ForwardRefExoticComponent<Omit<PlateElementProps<TImageElement & {
|
|
5
|
+
hint?: string;
|
|
6
|
+
hintIcon?: string;
|
|
7
|
+
}>, "ref"> & React.RefAttributes<unknown>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ImagePreviewSourceInfo {
|
|
2
|
+
naturalHeight: number;
|
|
3
|
+
naturalWidth: number;
|
|
4
|
+
rect: {
|
|
5
|
+
height: number;
|
|
6
|
+
left: number;
|
|
7
|
+
top: number;
|
|
8
|
+
width: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export declare const setImagePreviewSource: (info: ImagePreviewSourceInfo | null) => void;
|
|
12
|
+
export declare function ImagePreview(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function MediaUploadToast(): null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type TCaptionElement, type TResizableProps, type TVideoElement } from 'platejs';
|
|
2
|
+
import { type SlateElementProps } from 'platejs/static';
|
|
3
|
+
export declare function MediaVideoElementStatic(props: SlateElementProps<TVideoElement & TCaptionElement & TResizableProps & {
|
|
4
|
+
hint?: string;
|
|
5
|
+
hintIcon?: string;
|
|
6
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { MemberProfile } from '../context/editor-adapter';
|
|
2
|
+
interface MemberProfileCardProps {
|
|
3
|
+
profile: MemberProfile | null;
|
|
4
|
+
fallbackName: string;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Surface-agnostic presenter for a member mention card. It renders only the
|
|
9
|
+
* fields the resolved profile carries, so the same component serves the
|
|
10
|
+
* internal face (email, work location, teams) and the public face (bio,
|
|
11
|
+
* links) without encoding which is which. Identity sits in the header; contact
|
|
12
|
+
* detail and outbound links live below a hairline divider so the card reads in
|
|
13
|
+
* two clear tiers regardless of which fields are present. Photo and link URLs
|
|
14
|
+
* pass through the editor's URL-safety guard before they reach an src or href.
|
|
15
|
+
*/
|
|
16
|
+
export declare function MemberProfileCard({ profile, fallbackName, isLoading }: MemberProfileCardProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type PlateElementProps } from 'platejs/react';
|
|
2
|
+
import type { MyMentionElement } from '../components/editor/plate-types';
|
|
3
|
+
export declare function DocumentMentionElement(props: PlateElementProps<MyMentionElement> & {
|
|
4
|
+
prefix?: string;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PagePreview } from '../context/editor-adapter';
|
|
2
|
+
import type { LinkReference } from './link-reference';
|
|
3
|
+
import { type ResolvePage } from './mention-document-link';
|
|
4
|
+
import { type SmartLinkDisplayMode } from './smart-link';
|
|
5
|
+
interface DocumentMentionHoverCardProps {
|
|
6
|
+
displayMode: SmartLinkDisplayMode;
|
|
7
|
+
onDisplayModeChange: (mode: SmartLinkDisplayMode) => void;
|
|
8
|
+
onModeMenuOpenChange: (open: boolean) => void;
|
|
9
|
+
onOpen: () => void;
|
|
10
|
+
onRemove: () => void;
|
|
11
|
+
page: PagePreview | null;
|
|
12
|
+
readOnly: boolean;
|
|
13
|
+
reference: LinkReference | null;
|
|
14
|
+
resolvePage: ResolvePage;
|
|
15
|
+
}
|
|
16
|
+
export declare function DocumentMentionHoverCard({ displayMode, onDisplayModeChange, onModeMenuOpenChange, onOpen, onRemove, page, readOnly, reference, resolvePage, }: DocumentMentionHoverCardProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MyMentionElement } from '../components/editor/plate-types';
|
|
2
|
+
import type { PagePreview } from '../context/editor-adapter';
|
|
3
|
+
import { type LinkReference } from './link-reference';
|
|
4
|
+
import type { SmartLinkDisplayMode, SmartLinkViewModel } from './smart-link';
|
|
5
|
+
export type ResolvePage = (reference: LinkReference, signal?: AbortSignal) => Promise<PagePreview | null>;
|
|
6
|
+
interface UseDocumentPagePreviewInput {
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
reference: LinkReference | null;
|
|
9
|
+
resolvePage: ResolvePage;
|
|
10
|
+
}
|
|
11
|
+
export declare const useDocumentPagePreview: ({ enabled, reference, resolvePage }: UseDocumentPagePreviewInput) => PagePreview | null;
|
|
12
|
+
export declare const getDocumentMentionLink: (element: MyMentionElement, page: PagePreview | null, displayMode: SmartLinkDisplayMode) => SmartLinkViewModel;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type PlateElementProps } from 'platejs/react';
|
|
2
|
+
import type { MyMentionElement } from '../components/editor/plate-types';
|
|
3
|
+
export declare function MentionElement(props: PlateElementProps<MyMentionElement> & {
|
|
4
|
+
prefix?: string;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TMentionElement } from 'platejs';
|
|
2
|
+
import { type SlateElementProps } from 'platejs/static';
|
|
3
|
+
type StaticMentionProps = SlateElementProps<TMentionElement> & {
|
|
4
|
+
prefix?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function MentionElementStatic({ prefix, ...props }: StaticMentionProps): import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PageRef } from '../context/editor-adapter';
|
|
2
|
+
interface PageComboboxGroupProps {
|
|
3
|
+
search: string;
|
|
4
|
+
onPageHover: (title: string) => void;
|
|
5
|
+
onPageSelect: (page: PageRef) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function PageComboboxGroup({ search, onPageHover, onPageSelect }: PageComboboxGroupProps): import("react").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MentionMember } from '../context/editor-adapter';
|
|
2
|
+
interface PeopleComboboxGroupProps {
|
|
3
|
+
search: string;
|
|
4
|
+
onUserHover: (label: string) => void;
|
|
5
|
+
onUserSelect: (member: MentionMember) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function PeopleComboboxGroup({ search, onUserHover, onUserSelect }: PeopleComboboxGroupProps): import("react").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as Ariakit from '@ariakit/react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export type Action = {
|
|
5
|
+
filterItems?: boolean;
|
|
6
|
+
focusEditor?: boolean;
|
|
7
|
+
group?: string;
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
items?: Action[];
|
|
10
|
+
keywords?: string[];
|
|
11
|
+
label?: string;
|
|
12
|
+
shortcut?: string;
|
|
13
|
+
value?: string;
|
|
14
|
+
};
|
|
15
|
+
export type ActionGroup = {
|
|
16
|
+
group?: string;
|
|
17
|
+
value?: string;
|
|
18
|
+
};
|
|
19
|
+
export type MenuProps = Ariakit.MenuProviderProps & {
|
|
20
|
+
trigger?: React.ReactNode;
|
|
21
|
+
value?: string;
|
|
22
|
+
onOpenChange?: Ariakit.MenuProviderProps['setOpen'];
|
|
23
|
+
onRootMenuClose?: () => void;
|
|
24
|
+
onValueChange?: Ariakit.ComboboxProviderProps['setValue'];
|
|
25
|
+
onValuesChange?: Ariakit.MenuProviderProps['setValues'];
|
|
26
|
+
};
|
|
27
|
+
export declare function Menu({ children, trigger, value, onOpenChange, onRootMenuClose, onValueChange, onValuesChange, ...props }: MenuProps): React.JSX.Element;
|
|
28
|
+
export declare function MenuTrigger({ children, icon, label, ...props }: React.ComponentProps<typeof Ariakit.MenuButton> & {
|
|
29
|
+
icon?: React.ReactNode;
|
|
30
|
+
label?: React.ReactNode;
|
|
31
|
+
}): React.JSX.Element;
|
|
32
|
+
declare const menuVariants: (props?: ({
|
|
33
|
+
animateZoom?: boolean | null | undefined;
|
|
34
|
+
variant?: "default" | "ai" | "aiSub" | null | undefined;
|
|
35
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
36
|
+
export type MenuContentProps = Ariakit.MenuProps & VariantProps<typeof menuVariants> & {
|
|
37
|
+
animateZoom?: boolean;
|
|
38
|
+
onClickOutside?: (event: MouseEvent) => void;
|
|
39
|
+
};
|
|
40
|
+
export declare function MenuContent({ animateZoom, children, className, ref, variant, onClickOutside, ...props }: MenuContentProps): React.JSX.Element;
|
|
41
|
+
export declare function MenuSeparator(props: React.ComponentProps<typeof Ariakit.MenuSeparator>): React.JSX.Element;
|
|
42
|
+
export declare function MenuGroup({ label, ...props }: React.ComponentProps<typeof Ariakit.MenuGroup> & {
|
|
43
|
+
label?: React.ReactNode;
|
|
44
|
+
}): React.JSX.Element;
|
|
45
|
+
export declare function MenuShortcut({ ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
46
|
+
declare const menuItemVariants: (props?: ({
|
|
47
|
+
isEmpty?: boolean | null | undefined;
|
|
48
|
+
variant?: "default" | null | undefined;
|
|
49
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
50
|
+
export type MenuItemProps = Omit<Ariakit.ComboboxItemProps, 'store'> & {
|
|
51
|
+
checked?: boolean;
|
|
52
|
+
group?: string;
|
|
53
|
+
icon?: React.ReactNode;
|
|
54
|
+
label?: string;
|
|
55
|
+
name?: string;
|
|
56
|
+
parentGroup?: string;
|
|
57
|
+
preventClose?: boolean;
|
|
58
|
+
shortcut?: React.ReactNode;
|
|
59
|
+
shortcutEnter?: boolean;
|
|
60
|
+
value?: string;
|
|
61
|
+
} & VariantProps<typeof menuItemVariants>;
|
|
62
|
+
export declare function MenuItem({ checked, className, group, icon, isEmpty, label, name, parentGroup, preventClose, shortcut, shortcutEnter, variant, ...props }: Omit<Ariakit.ComboboxItemProps, 'store'> & {
|
|
63
|
+
checked?: boolean;
|
|
64
|
+
group?: string;
|
|
65
|
+
icon?: React.ReactNode;
|
|
66
|
+
label?: string;
|
|
67
|
+
name?: string;
|
|
68
|
+
parentGroup?: string;
|
|
69
|
+
preventClose?: boolean;
|
|
70
|
+
shortcut?: React.ReactNode;
|
|
71
|
+
shortcutEnter?: boolean;
|
|
72
|
+
value?: string;
|
|
73
|
+
} & VariantProps<typeof menuItemVariants>): React.JSX.Element;
|
|
74
|
+
export declare const comboboxVariants: (props?: ({
|
|
75
|
+
variant?: "default" | "ai" | null | undefined;
|
|
76
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
77
|
+
export declare function ComboboxContent({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof comboboxVariants>): React.JSX.Element;
|
|
78
|
+
declare const comboboxListVariants: (props?: ({
|
|
79
|
+
variant?: "default" | "ai" | null | undefined;
|
|
80
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
81
|
+
export declare function ComboboxList({ className, variant, ...props }: React.ComponentProps<typeof Ariakit.ComboboxList> & VariantProps<typeof comboboxListVariants>): React.JSX.Element;
|
|
82
|
+
export declare function ComboboxInput({ children, ...props }: React.ComponentProps<typeof Ariakit.Combobox>): React.JSX.Element;
|
|
83
|
+
export declare function ComboboxEmpty(): React.JSX.Element;
|
|
84
|
+
export * as Ariakit from '@ariakit/react';
|
|
85
|
+
export declare function filterMenuItems({ items, ...group }: Action, searchValue: string): Action[];
|
|
86
|
+
export declare function filterMenuGroups(menuGroups: Action[], searchValue: string): Action[];
|
|
87
|
+
export declare function useComboboxValueState(): readonly [string, import("@ariakit/core/utils/types").SetState<string>];
|
|
88
|
+
export declare function useMenuSide(): string;
|
|
89
|
+
export declare function useContextMenu(anchorRect: {
|
|
90
|
+
x: number;
|
|
91
|
+
y: number;
|
|
92
|
+
}): {
|
|
93
|
+
store: Ariakit.MenuStore<import("@ariakit/core/menu/menu-store").MenuStoreValues>;
|
|
94
|
+
getAnchorRect: () => {
|
|
95
|
+
x: number;
|
|
96
|
+
y: number;
|
|
97
|
+
};
|
|
98
|
+
show: () => void;
|
|
99
|
+
};
|
|
100
|
+
export declare function useMenuStore(): {
|
|
101
|
+
store: Ariakit.MenuStore<import("@ariakit/core/menu/menu-store").MenuStoreValues>;
|
|
102
|
+
show: (anchorElement: HTMLElement) => void;
|
|
103
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type SlateElementProps } from 'platejs/static';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import type { TMermaidElement } from '../components/editor/plugins/mermaid-types';
|
|
4
|
+
export declare function MermaidElementStatic(props: SlateElementProps<TMermaidElement>): React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Popover as PopoverPrimitive } from 'radix-ui';
|
|
3
|
+
import type * as React from 'react';
|
|
4
|
+
declare const popoverVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "media" | "combobox" | "equation" | "equationInline" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
|
|
8
|
+
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element;
|
|
9
|
+
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): React.JSX.Element;
|
|
10
|
+
declare function PopoverContent({ align, className, sideOffset, variant, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content> & VariantProps<typeof popoverVariants>): React.JSX.Element;
|
|
11
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger, popoverVariants };
|