@d4gger/design-system 3.0.1 → 4.0.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/README.md +19 -0
- package/dist/brand-effects.css +5 -3
- package/dist/components/accordion.css +9 -2
- package/dist/components/alert/Alert.cjs +27 -9
- package/dist/components/alert/Alert.cjs.map +2 -2
- package/dist/components/alert/Alert.d.cts +6 -0
- package/dist/components/alert/Alert.d.cts.map +1 -1
- package/dist/components/alert/Alert.d.mts +6 -0
- package/dist/components/alert/Alert.d.mts.map +1 -1
- package/dist/components/alert/Alert.d.ts +6 -0
- package/dist/components/alert/Alert.d.ts.map +1 -1
- package/dist/components/alert/Alert.js +28 -10
- package/dist/components/alert/Alert.js.map +2 -2
- package/dist/components/alert.css +73 -3
- package/dist/components/article-nodes.css +16 -1
- package/dist/components/articleNodes/ArticleNodes.cjs +46 -5
- package/dist/components/articleNodes/ArticleNodes.cjs.map +2 -2
- package/dist/components/articleNodes/ArticleNodes.d.cts +7 -3
- package/dist/components/articleNodes/ArticleNodes.d.cts.map +1 -1
- package/dist/components/articleNodes/ArticleNodes.d.mts +7 -3
- package/dist/components/articleNodes/ArticleNodes.d.mts.map +1 -1
- package/dist/components/articleNodes/ArticleNodes.d.ts +7 -3
- package/dist/components/articleNodes/ArticleNodes.d.ts.map +1 -1
- package/dist/components/articleNodes/ArticleNodes.js +46 -5
- package/dist/components/articleNodes/ArticleNodes.js.map +2 -2
- package/dist/components/articleNodes/articleExtensions.cjs +21 -4
- package/dist/components/articleNodes/articleExtensions.cjs.map +2 -2
- package/dist/components/articleNodes/articleExtensions.d.cts +8 -2
- package/dist/components/articleNodes/articleExtensions.d.cts.map +1 -1
- package/dist/components/articleNodes/articleExtensions.d.mts +8 -2
- package/dist/components/articleNodes/articleExtensions.d.mts.map +1 -1
- package/dist/components/articleNodes/articleExtensions.d.ts +8 -2
- package/dist/components/articleNodes/articleExtensions.d.ts.map +1 -1
- package/dist/components/articleNodes/articleExtensions.js +21 -4
- package/dist/components/articleNodes/articleExtensions.js.map +2 -2
- package/dist/components/articleNodes/articleNodeViews.cjs +154 -0
- package/dist/components/articleNodes/articleNodeViews.cjs.map +7 -0
- package/dist/components/articleNodes/articleNodeViews.d.cts +3 -0
- package/dist/components/articleNodes/articleNodeViews.d.cts.map +1 -0
- package/dist/components/articleNodes/articleNodeViews.d.mts +3 -0
- package/dist/components/articleNodes/articleNodeViews.d.mts.map +1 -0
- package/dist/components/articleNodes/articleNodeViews.d.ts +3 -0
- package/dist/components/articleNodes/articleNodeViews.d.ts.map +1 -0
- package/dist/components/articleNodes/articleNodeViews.js +124 -0
- package/dist/components/articleNodes/articleNodeViews.js.map +7 -0
- package/dist/components/articleNodes/articleNodes.props.cjs.map +1 -1
- package/dist/components/articleNodes/articleNodes.props.d.cts +25 -2
- package/dist/components/articleNodes/articleNodes.props.d.cts.map +1 -1
- package/dist/components/articleNodes/articleNodes.props.d.mts +25 -2
- package/dist/components/articleNodes/articleNodes.props.d.mts.map +1 -1
- package/dist/components/articleNodes/articleNodes.props.d.ts +25 -2
- package/dist/components/articleNodes/articleNodes.props.d.ts.map +1 -1
- package/dist/components/banner.css +5 -4
- package/dist/components/blockquote.css +7 -4
- package/dist/components/bottom-dock.css +140 -0
- package/dist/components/bottomDock/BottomDock.cjs +140 -0
- package/dist/components/bottomDock/BottomDock.cjs.map +7 -0
- package/dist/components/bottomDock/BottomDock.d.cts +25 -0
- package/dist/components/bottomDock/BottomDock.d.cts.map +1 -0
- package/dist/components/bottomDock/BottomDock.d.mts +25 -0
- package/dist/components/bottomDock/BottomDock.d.mts.map +1 -0
- package/dist/components/bottomDock/BottomDock.d.ts +25 -0
- package/dist/components/bottomDock/BottomDock.d.ts.map +1 -0
- package/dist/components/bottomDock/BottomDock.js +110 -0
- package/dist/components/bottomDock/BottomDock.js.map +7 -0
- package/dist/components/bottomDock/bottomDock.props.cjs +49 -0
- package/dist/components/bottomDock/bottomDock.props.cjs.map +7 -0
- package/dist/components/bottomDock/bottomDock.props.d.cts +29 -0
- package/dist/components/bottomDock/bottomDock.props.d.cts.map +1 -0
- package/dist/components/bottomDock/bottomDock.props.d.mts +29 -0
- package/dist/components/bottomDock/bottomDock.props.d.mts.map +1 -0
- package/dist/components/bottomDock/bottomDock.props.d.ts +29 -0
- package/dist/components/bottomDock/bottomDock.props.d.ts.map +1 -0
- package/dist/components/bottomDock/bottomDock.props.js +29 -0
- package/dist/components/bottomDock/bottomDock.props.js.map +7 -0
- package/dist/components/breadcrumb.css +24 -3
- package/dist/components/callout.css +20 -7
- package/dist/components/card.css +9 -1
- package/dist/components/code.css +29 -13
- package/dist/components/collapsible/Collapsible.cjs +14 -0
- package/dist/components/collapsible/Collapsible.cjs.map +2 -2
- package/dist/components/collapsible/Collapsible.d.cts.map +1 -1
- package/dist/components/collapsible/Collapsible.d.mts.map +1 -1
- package/dist/components/collapsible/Collapsible.d.ts.map +1 -1
- package/dist/components/collapsible/Collapsible.js +14 -0
- package/dist/components/collapsible/Collapsible.js.map +2 -2
- package/dist/components/collapsible.css +10 -1
- package/dist/components/command.css +0 -2
- package/dist/components/comment-thread.css +15 -7
- package/dist/components/commentThread/CommentThread.cjs +45 -17
- package/dist/components/commentThread/CommentThread.cjs.map +2 -2
- package/dist/components/commentThread/CommentThread.d.cts +6 -6
- package/dist/components/commentThread/CommentThread.d.cts.map +1 -1
- package/dist/components/commentThread/CommentThread.d.mts +6 -6
- package/dist/components/commentThread/CommentThread.d.mts.map +1 -1
- package/dist/components/commentThread/CommentThread.d.ts +6 -6
- package/dist/components/commentThread/CommentThread.d.ts.map +1 -1
- package/dist/components/commentThread/CommentThread.js +45 -17
- package/dist/components/commentThread/CommentThread.js.map +2 -2
- package/dist/components/commentThread/commentThread.props.cjs.map +1 -1
- package/dist/components/commentThread/commentThread.props.d.cts +24 -0
- package/dist/components/commentThread/commentThread.props.d.cts.map +1 -1
- package/dist/components/commentThread/commentThread.props.d.mts +24 -0
- package/dist/components/commentThread/commentThread.props.d.mts.map +1 -1
- package/dist/components/commentThread/commentThread.props.d.ts +24 -0
- package/dist/components/commentThread/commentThread.props.d.ts.map +1 -1
- package/dist/components/config-drawer.css +7 -3
- package/dist/components/configDrawer/ConfigDrawer.cjs +1 -1
- package/dist/components/configDrawer/ConfigDrawer.cjs.map +2 -2
- package/dist/components/configDrawer/ConfigDrawer.js +1 -1
- package/dist/components/configDrawer/ConfigDrawer.js.map +2 -2
- package/dist/components/context-menu.css +3 -1
- package/dist/components/contextMenu/ContextMenu.cjs +37 -6
- package/dist/components/contextMenu/ContextMenu.cjs.map +2 -2
- package/dist/components/contextMenu/ContextMenu.d.cts +1 -1
- package/dist/components/contextMenu/ContextMenu.d.cts.map +1 -1
- package/dist/components/contextMenu/ContextMenu.d.mts +1 -1
- package/dist/components/contextMenu/ContextMenu.d.mts.map +1 -1
- package/dist/components/contextMenu/ContextMenu.d.ts +1 -1
- package/dist/components/contextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/components/contextMenu/ContextMenu.js +37 -6
- package/dist/components/contextMenu/ContextMenu.js.map +2 -2
- package/dist/components/dialog.css +1 -1
- package/dist/components/drawer.css +23 -6
- package/dist/components/dropdownMenu/DropdownMenu.cjs +10 -5
- package/dist/components/dropdownMenu/DropdownMenu.cjs.map +2 -2
- package/dist/components/dropdownMenu/DropdownMenu.d.cts.map +1 -1
- package/dist/components/dropdownMenu/DropdownMenu.d.mts.map +1 -1
- package/dist/components/dropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/dropdownMenu/DropdownMenu.js +10 -5
- package/dist/components/dropdownMenu/DropdownMenu.js.map +2 -2
- package/dist/components/environment-ribbon.css +73 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.cjs +69 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.cjs.map +7 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.cts +15 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.cts.map +1 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.mts +15 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.mts.map +1 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.ts +15 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.ts.map +1 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.js +39 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.js.map +7 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.cjs +39 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.cjs.map +7 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.cts +18 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.cts.map +1 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.mts +18 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.mts.map +1 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.ts +18 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.ts.map +1 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.js +19 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.js.map +7 -0
- package/dist/components/field.css +5 -0
- package/dist/components/file-upload.css +36 -9
- package/dist/components/floating-panel.css +49 -18
- package/dist/components/floatingPanel/FloatingPanel.cjs +156 -58
- package/dist/components/floatingPanel/FloatingPanel.cjs.map +2 -2
- package/dist/components/floatingPanel/FloatingPanel.d.cts.map +1 -1
- package/dist/components/floatingPanel/FloatingPanel.d.mts.map +1 -1
- package/dist/components/floatingPanel/FloatingPanel.d.ts.map +1 -1
- package/dist/components/floatingPanel/FloatingPanel.js +156 -58
- package/dist/components/floatingPanel/FloatingPanel.js.map +2 -2
- package/dist/components/grid/Grid.cjs +24 -35
- package/dist/components/grid/Grid.cjs.map +2 -2
- package/dist/components/grid/Grid.d.cts.map +1 -1
- package/dist/components/grid/Grid.d.mts.map +1 -1
- package/dist/components/grid/Grid.d.ts.map +1 -1
- package/dist/components/grid/Grid.js +24 -35
- package/dist/components/grid/Grid.js.map +2 -2
- package/dist/components/heading/Heading.cjs +1 -8
- package/dist/components/heading/Heading.cjs.map +2 -2
- package/dist/components/heading/Heading.d.cts.map +1 -1
- package/dist/components/heading/Heading.d.mts.map +1 -1
- package/dist/components/heading/Heading.d.ts.map +1 -1
- package/dist/components/heading/Heading.js +1 -8
- package/dist/components/heading/Heading.js.map +2 -2
- package/dist/components/heading/heading.props.cjs +9 -9
- package/dist/components/heading/heading.props.cjs.map +2 -2
- package/dist/components/heading/heading.props.d.cts +42 -43
- package/dist/components/heading/heading.props.d.cts.map +1 -1
- package/dist/components/heading/heading.props.d.mts +42 -43
- package/dist/components/heading/heading.props.d.mts.map +1 -1
- package/dist/components/heading/heading.props.d.ts +42 -43
- package/dist/components/heading/heading.props.d.ts.map +1 -1
- package/dist/components/heading/heading.props.js +9 -9
- package/dist/components/heading/heading.props.js.map +2 -2
- package/dist/components/heading.css +127 -104
- package/dist/components/hover-card.css +5 -2
- package/dist/components/icon/Icon.cjs +19 -0
- package/dist/components/icon/Icon.cjs.map +2 -2
- package/dist/components/icon/Icon.d.cts +29 -1
- package/dist/components/icon/Icon.d.cts.map +1 -1
- package/dist/components/icon/Icon.d.mts +29 -1
- package/dist/components/icon/Icon.d.mts.map +1 -1
- package/dist/components/icon/Icon.d.ts +29 -1
- package/dist/components/icon/Icon.d.ts.map +1 -1
- package/dist/components/icon/Icon.js +25 -0
- package/dist/components/icon/Icon.js.map +2 -2
- package/dist/components/icon/icons.cjs +14 -0
- package/dist/components/icon/icons.cjs.map +2 -2
- package/dist/components/icon/icons.d.cts +35 -0
- package/dist/components/icon/icons.d.cts.map +1 -1
- package/dist/components/icon/icons.d.mts +35 -0
- package/dist/components/icon/icons.d.mts.map +1 -1
- package/dist/components/icon/icons.d.ts +35 -0
- package/dist/components/icon/icons.d.ts.map +1 -1
- package/dist/components/icon/icons.js +14 -0
- package/dist/components/icon/icons.js.map +2 -2
- package/dist/components/index.cjs +2 -0
- package/dist/components/index.cjs.map +2 -2
- package/dist/components/index.d.cts +2 -0
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +2 -0
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +2 -2
- package/dist/components/label.css +3 -0
- package/dist/components/link.css +33 -97
- package/dist/components/notification-center.css +58 -10
- package/dist/components/notificationCenter/NotificationCenter.cjs +27 -17
- package/dist/components/notificationCenter/NotificationCenter.cjs.map +2 -2
- package/dist/components/notificationCenter/NotificationCenter.d.cts +2 -0
- package/dist/components/notificationCenter/NotificationCenter.d.cts.map +1 -1
- package/dist/components/notificationCenter/NotificationCenter.d.mts +2 -0
- package/dist/components/notificationCenter/NotificationCenter.d.mts.map +1 -1
- package/dist/components/notificationCenter/NotificationCenter.d.ts +2 -0
- package/dist/components/notificationCenter/NotificationCenter.d.ts.map +1 -1
- package/dist/components/notificationCenter/NotificationCenter.js +28 -18
- package/dist/components/notificationCenter/NotificationCenter.js.map +2 -2
- package/dist/components/page-header.css +21 -0
- package/dist/components/pageHeader/PageHeader.cjs +10 -2
- package/dist/components/pageHeader/PageHeader.cjs.map +2 -2
- package/dist/components/pageHeader/PageHeader.d.cts.map +1 -1
- package/dist/components/pageHeader/PageHeader.d.mts.map +1 -1
- package/dist/components/pageHeader/PageHeader.d.ts.map +1 -1
- package/dist/components/pageHeader/PageHeader.js +10 -2
- package/dist/components/pageHeader/PageHeader.js.map +2 -2
- package/dist/components/pageHeader/pageHeader.props.cjs +7 -1
- package/dist/components/pageHeader/pageHeader.props.cjs.map +2 -2
- package/dist/components/pageHeader/pageHeader.props.d.cts +5 -0
- package/dist/components/pageHeader/pageHeader.props.d.cts.map +1 -1
- package/dist/components/pageHeader/pageHeader.props.d.mts +5 -0
- package/dist/components/pageHeader/pageHeader.props.d.mts.map +1 -1
- package/dist/components/pageHeader/pageHeader.props.d.ts +5 -0
- package/dist/components/pageHeader/pageHeader.props.d.ts.map +1 -1
- package/dist/components/pageHeader/pageHeader.props.js +7 -1
- package/dist/components/pageHeader/pageHeader.props.js.map +2 -2
- package/dist/components/pills/Pills.cjs +1 -1
- package/dist/components/pills/Pills.cjs.map +2 -2
- package/dist/components/pills/Pills.js +2 -2
- package/dist/components/pills/Pills.js.map +2 -2
- package/dist/components/pills.css +6 -0
- package/dist/components/popover.css +45 -6
- package/dist/components/prose.css +3 -3
- package/dist/components/qr-code.css +5 -2
- package/dist/components/qrCode/QrCode.cjs +14 -11
- package/dist/components/qrCode/QrCode.cjs.map +2 -2
- package/dist/components/qrCode/QrCode.d.cts.map +1 -1
- package/dist/components/qrCode/QrCode.d.mts.map +1 -1
- package/dist/components/qrCode/QrCode.d.ts.map +1 -1
- package/dist/components/qrCode/QrCode.js +14 -11
- package/dist/components/qrCode/QrCode.js.map +2 -2
- package/dist/components/resizable.css +20 -4
- package/dist/components/rich-text-editor.css +50 -14
- package/dist/components/richTextEditor/EditorTools.cjs +226 -0
- package/dist/components/richTextEditor/EditorTools.cjs.map +7 -0
- package/dist/components/richTextEditor/EditorTools.d.cts +22 -0
- package/dist/components/richTextEditor/EditorTools.d.cts.map +1 -0
- package/dist/components/richTextEditor/EditorTools.d.mts +22 -0
- package/dist/components/richTextEditor/EditorTools.d.mts.map +1 -0
- package/dist/components/richTextEditor/EditorTools.d.ts +22 -0
- package/dist/components/richTextEditor/EditorTools.d.ts.map +1 -0
- package/dist/components/richTextEditor/EditorTools.js +196 -0
- package/dist/components/richTextEditor/EditorTools.js.map +7 -0
- package/dist/components/richTextEditor/MentionSuggestions.cjs +96 -0
- package/dist/components/richTextEditor/MentionSuggestions.cjs.map +7 -0
- package/dist/components/richTextEditor/MentionSuggestions.d.cts +7 -0
- package/dist/components/richTextEditor/MentionSuggestions.d.cts.map +1 -0
- package/dist/components/richTextEditor/MentionSuggestions.d.mts +7 -0
- package/dist/components/richTextEditor/MentionSuggestions.d.mts.map +1 -0
- package/dist/components/richTextEditor/MentionSuggestions.d.ts +7 -0
- package/dist/components/richTextEditor/MentionSuggestions.d.ts.map +1 -0
- package/dist/components/richTextEditor/MentionSuggestions.js +66 -0
- package/dist/components/richTextEditor/MentionSuggestions.js.map +7 -0
- package/dist/components/richTextEditor/RichTextEditor.cjs +53 -206
- package/dist/components/richTextEditor/RichTextEditor.cjs.map +3 -3
- package/dist/components/richTextEditor/RichTextEditor.d.cts +17 -7
- package/dist/components/richTextEditor/RichTextEditor.d.cts.map +1 -1
- package/dist/components/richTextEditor/RichTextEditor.d.mts +17 -7
- package/dist/components/richTextEditor/RichTextEditor.d.mts.map +1 -1
- package/dist/components/richTextEditor/RichTextEditor.d.ts +17 -7
- package/dist/components/richTextEditor/RichTextEditor.d.ts.map +1 -1
- package/dist/components/richTextEditor/RichTextEditor.js +53 -206
- package/dist/components/richTextEditor/RichTextEditor.js.map +3 -3
- package/dist/components/richTextEditor/editorTokens.cjs +75 -0
- package/dist/components/richTextEditor/editorTokens.cjs.map +7 -0
- package/dist/components/richTextEditor/editorTokens.d.cts +21 -0
- package/dist/components/richTextEditor/editorTokens.d.cts.map +1 -0
- package/dist/components/richTextEditor/editorTokens.d.mts +21 -0
- package/dist/components/richTextEditor/editorTokens.d.mts.map +1 -0
- package/dist/components/richTextEditor/editorTokens.d.ts +21 -0
- package/dist/components/richTextEditor/editorTokens.d.ts.map +1 -0
- package/dist/components/richTextEditor/editorTokens.js +55 -0
- package/dist/components/richTextEditor/editorTokens.js.map +7 -0
- package/dist/components/scroll-area.css +12 -0
- package/dist/components/scrollArea/ScrollArea.cjs +12 -1
- package/dist/components/scrollArea/ScrollArea.cjs.map +2 -2
- package/dist/components/scrollArea/ScrollArea.d.cts.map +1 -1
- package/dist/components/scrollArea/ScrollArea.d.mts.map +1 -1
- package/dist/components/scrollArea/ScrollArea.d.ts.map +1 -1
- package/dist/components/scrollArea/ScrollArea.js +12 -1
- package/dist/components/scrollArea/ScrollArea.js.map +2 -2
- package/dist/components/segmentedControl/SegmentedControl.cjs +2 -2
- package/dist/components/segmentedControl/SegmentedControl.cjs.map +2 -2
- package/dist/components/segmentedControl/SegmentedControl.d.cts.map +1 -1
- package/dist/components/segmentedControl/SegmentedControl.d.mts.map +1 -1
- package/dist/components/segmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/segmentedControl/SegmentedControl.js +2 -2
- package/dist/components/segmentedControl/SegmentedControl.js.map +2 -2
- package/dist/components/separator.css +3 -9
- package/dist/components/sidebar/Sidebar.cjs +17 -5
- package/dist/components/sidebar/Sidebar.cjs.map +2 -2
- package/dist/components/sidebar/Sidebar.d.cts +12 -1
- package/dist/components/sidebar/Sidebar.d.cts.map +1 -1
- package/dist/components/sidebar/Sidebar.d.mts +12 -1
- package/dist/components/sidebar/Sidebar.d.mts.map +1 -1
- package/dist/components/sidebar/Sidebar.d.ts +12 -1
- package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.js +17 -5
- package/dist/components/sidebar/Sidebar.js.map +2 -2
- package/dist/components/sidebar/sidebar.props.cjs +8 -1
- package/dist/components/sidebar/sidebar.props.cjs.map +2 -2
- package/dist/components/sidebar/sidebar.props.d.cts +9 -1
- package/dist/components/sidebar/sidebar.props.d.cts.map +1 -1
- package/dist/components/sidebar/sidebar.props.d.mts +9 -1
- package/dist/components/sidebar/sidebar.props.d.mts.map +1 -1
- package/dist/components/sidebar/sidebar.props.d.ts +9 -1
- package/dist/components/sidebar/sidebar.props.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar.props.js +8 -1
- package/dist/components/sidebar/sidebar.props.js.map +2 -2
- package/dist/components/sidebar.css +86 -13
- package/dist/components/sonner.css +78 -16
- package/dist/components/stepper.css +23 -12
- package/dist/components/tab-nav.css +25 -13
- package/dist/components/tabNav/TabNav.cjs +1 -4
- package/dist/components/tabNav/TabNav.cjs.map +2 -2
- package/dist/components/tabNav/TabNav.d.cts.map +1 -1
- package/dist/components/tabNav/TabNav.d.mts.map +1 -1
- package/dist/components/tabNav/TabNav.d.ts.map +1 -1
- package/dist/components/tabNav/TabNav.js +1 -4
- package/dist/components/tabNav/TabNav.js.map +2 -2
- package/dist/components/table-of-contents.css +12 -2
- package/dist/components/tableOfContents/TableOfContents.cjs +11 -4
- package/dist/components/tableOfContents/TableOfContents.cjs.map +2 -2
- package/dist/components/tableOfContents/TableOfContents.d.cts.map +1 -1
- package/dist/components/tableOfContents/TableOfContents.d.mts.map +1 -1
- package/dist/components/tableOfContents/TableOfContents.d.ts.map +1 -1
- package/dist/components/tableOfContents/TableOfContents.js +11 -4
- package/dist/components/tableOfContents/TableOfContents.js.map +2 -2
- package/dist/components/tabs/Tabs.cjs +39 -54
- package/dist/components/tabs/Tabs.cjs.map +2 -2
- package/dist/components/tabs/Tabs.d.cts.map +1 -1
- package/dist/components/tabs/Tabs.d.mts.map +1 -1
- package/dist/components/tabs/Tabs.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.js +39 -54
- package/dist/components/tabs/Tabs.js.map +2 -2
- package/dist/components/tabs.css +52 -7
- package/dist/components/text/text.props.cjs +9 -9
- package/dist/components/text/text.props.cjs.map +2 -2
- package/dist/components/text/text.props.d.cts +42 -43
- package/dist/components/text/text.props.d.cts.map +1 -1
- package/dist/components/text/text.props.d.mts +42 -43
- package/dist/components/text/text.props.d.mts.map +1 -1
- package/dist/components/text/text.props.d.ts +42 -43
- package/dist/components/text/text.props.d.ts.map +1 -1
- package/dist/components/text/text.props.js +9 -9
- package/dist/components/text/text.props.js.map +2 -2
- package/dist/components/text/typography.props.cjs +32 -0
- package/dist/components/text/typography.props.cjs.map +7 -0
- package/dist/components/text/typography.props.d.cts +3 -0
- package/dist/components/text/typography.props.d.cts.map +1 -0
- package/dist/components/text/typography.props.d.mts +3 -0
- package/dist/components/text/typography.props.d.mts.map +1 -0
- package/dist/components/text/typography.props.d.ts +3 -0
- package/dist/components/text/typography.props.d.ts.map +1 -0
- package/dist/components/text/typography.props.js +12 -0
- package/dist/components/text/typography.props.js.map +7 -0
- package/dist/components/text-field.css +1 -0
- package/dist/components/text.css +41 -6
- package/dist/components/theme-panel.css +6 -0
- package/dist/components/toast/Toast.cjs +3 -1
- package/dist/components/toast/Toast.cjs.map +2 -2
- package/dist/components/toast/Toast.d.cts.map +1 -1
- package/dist/components/toast/Toast.d.mts.map +1 -1
- package/dist/components/toast/Toast.d.ts.map +1 -1
- package/dist/components/toast/Toast.js +3 -1
- package/dist/components/toast/Toast.js.map +2 -2
- package/dist/components/toast.css +36 -36
- package/dist/components/toggle-tip.css +58 -9
- package/dist/components/toggleTip/ToggleTip.cjs +9 -5
- package/dist/components/toggleTip/ToggleTip.cjs.map +2 -2
- package/dist/components/toggleTip/ToggleTip.d.cts.map +1 -1
- package/dist/components/toggleTip/ToggleTip.d.mts.map +1 -1
- package/dist/components/toggleTip/ToggleTip.d.ts.map +1 -1
- package/dist/components/toggleTip/ToggleTip.js +9 -5
- package/dist/components/toggleTip/ToggleTip.js.map +2 -2
- package/dist/components/toolbar/Toolbar.cjs +10 -7
- package/dist/components/toolbar/Toolbar.cjs.map +2 -2
- package/dist/components/toolbar/Toolbar.js +10 -7
- package/dist/components/toolbar/Toolbar.js.map +2 -2
- package/dist/components/toolbar.css +58 -4
- package/dist/components/tooltip.css +9 -5
- package/dist/components/tree-view.css +17 -3
- package/dist/components/treeView/TreeView.cjs +76 -21
- package/dist/components/treeView/TreeView.cjs.map +2 -2
- package/dist/components/treeView/TreeView.d.cts.map +1 -1
- package/dist/components/treeView/TreeView.d.mts.map +1 -1
- package/dist/components/treeView/TreeView.d.ts.map +1 -1
- package/dist/components/treeView/TreeView.js +76 -21
- package/dist/components/treeView/TreeView.js.map +2 -2
- package/dist/components.css +2 -0
- package/dist/docs/README.md +2 -0
- package/dist/docs/component-contract.md +7 -4
- package/dist/docs/component-index.json +17 -1
- package/dist/docs/components/accordion.md +5 -36
- package/dist/docs/components/alert.md +44 -17
- package/dist/docs/components/article-nodes.md +59 -2
- package/dist/docs/components/aspect-ratio.md +3 -26
- package/dist/docs/components/banner.md +7 -7
- package/dist/docs/components/blockquote.md +15 -14
- package/dist/docs/components/bottom-dock.md +146 -0
- package/dist/docs/components/box.md +3 -34
- package/dist/docs/components/breadcrumb.md +13 -8
- package/dist/docs/components/callout.md +18 -7
- package/dist/docs/components/card.md +10 -3
- package/dist/docs/components/code.md +33 -220
- package/dist/docs/components/collapsible.md +16 -35
- package/dist/docs/components/command.md +2 -0
- package/dist/docs/components/comment-thread.md +51 -1
- package/dist/docs/components/config-drawer.md +72 -171
- package/dist/docs/components/container.md +2 -0
- package/dist/docs/components/context-menu.md +19 -5
- package/dist/docs/components/dialog.md +4 -2
- package/dist/docs/components/drawer.md +17 -6
- package/dist/docs/components/dropdown-menu.md +11 -2
- package/dist/docs/components/em.md +1 -1
- package/dist/docs/components/environment-ribbon.md +126 -0
- package/dist/docs/components/field.md +2 -0
- package/dist/docs/components/file-upload.md +13 -7
- package/dist/docs/components/floating-panel.md +79 -285
- package/dist/docs/components/form.md +4 -0
- package/dist/docs/components/grid.md +11 -60
- package/dist/docs/components/heading.md +35 -32
- package/dist/docs/components/hover-card.md +9 -1
- package/dist/docs/components/icon.md +1 -0
- package/dist/docs/components/kbd.md +2 -0
- package/dist/docs/components/label.md +11 -9
- package/dist/docs/components/link.md +31 -209
- package/dist/docs/components/notification-center.md +30 -15
- package/dist/docs/components/page-header.md +20 -6
- package/dist/docs/components/pagination.md +4 -0
- package/dist/docs/components/pills.md +13 -4
- package/dist/docs/components/popover.md +10 -3
- package/dist/docs/components/prose.md +9 -0
- package/dist/docs/components/qr-code.md +12 -12
- package/dist/docs/components/quote.md +9 -4
- package/dist/docs/components/resizable.md +26 -18
- package/dist/docs/components/rich-text-editor.md +68 -18
- package/dist/docs/components/scroll-area.md +17 -9
- package/dist/docs/components/section.md +3 -38
- package/dist/docs/components/segmented-control.md +1 -1
- package/dist/docs/components/segmented-meter.md +9 -0
- package/dist/docs/components/separator.md +10 -46
- package/dist/docs/components/sidebar.md +34 -9
- package/dist/docs/components/sonner.md +25 -16
- package/dist/docs/components/stepper.md +8 -33
- package/dist/docs/components/strong.md +1 -1
- package/dist/docs/components/tab-nav.md +33 -96
- package/dist/docs/components/table-of-contents.md +8 -2
- package/dist/docs/components/tabs.md +19 -50
- package/dist/docs/components/text-field.md +1 -0
- package/dist/docs/components/text.md +34 -28
- package/dist/docs/components/theme-panel.md +3 -28
- package/dist/docs/components/theme.md +7 -3
- package/dist/docs/components/toast.md +27 -13
- package/dist/docs/components/toggle-tip.md +58 -241
- package/dist/docs/components/toolbar.md +16 -39
- package/dist/docs/components/tooltip.md +13 -7
- package/dist/docs/components/tree-view.md +22 -55
- package/dist/docs/consumer-guide.md +11 -4
- package/dist/generated/tokens.cjs +1 -0
- package/dist/generated/tokens.cjs.map +2 -2
- package/dist/generated/tokens.d.cts.map +1 -1
- package/dist/generated/tokens.d.mts.map +1 -1
- package/dist/generated/tokens.d.ts.map +1 -1
- package/dist/generated/tokens.js +1 -0
- package/dist/generated/tokens.js.map +2 -2
- package/dist/styles.css +1921 -1349
- package/dist/tokens.css +346 -362
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/articleNodes/ArticleNodes.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport classNames from 'classnames'\n\nimport type {\n ArticleEmbedProps,\n ArticleImageProps,\n ArticlePollProps,\n BeforeAfterComparisonProps,\n} from './articleNodes.props'\n\nconst ArticleImage = ({ caption, className, alt = '', ...props }: ArticleImageProps) => <figure className=\"dsx-article-image\"><img {...props} alt={alt} className={classNames('dsx-article-image__media', className)} />{caption ? <figcaption>{caption}</figcaption> : null}</figure>\n\nconst ArticleEmbed = ({ url, render, isAllowed, className, ...props }: ArticleEmbedProps) => {\n let canonical: string | undefined\n try { const parsed = new URL(url); if (parsed.protocol === 'https:' || parsed.protocol === 'http:') canonical = parsed.href } catch {}\n const allowed = Boolean(canonical && (isAllowed?.(canonical) ?? true))\n return <div {...props} className={classNames('dsx-article-embed', className)} data-dsx-url={allowed ? canonical : undefined}>{allowed && canonical ? (render?.(canonical) ?? <a href={canonical}>{canonical}</a>) : <span role=\"alert\">Embed unavailable</span>}</div>\n}\n\nconst BeforeAfterComparison = ({ beforeSrc, afterSrc, beforeAlt, afterAlt, beforeLabel = 'Before', afterLabel = 'After', className, ...props }: BeforeAfterComparisonProps) => <figure {...props} className={classNames('dsx-before-after', className)}><div><img src={beforeSrc} alt={beforeAlt}/><span>{beforeLabel}</span></div><div><img src={afterSrc} alt={afterAlt}/><span>{afterLabel}</span></div></figure>\n\nconst ArticlePoll = ({ pollId, question, options = [], state = 'ready', onLoad, onVote, className, ...props }: ArticlePollProps) => {\n React.useEffect(() => { onLoad?.(pollId) }, [pollId, onLoad])\n return <div {...props} className={classNames('dsx-article-poll', className)} data-dsx-poll-id={pollId} data-state={state} aria-busy={state === 'loading' || undefined}
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,wBAAuB;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react'\nimport classNames from 'classnames'\nimport { Button } from '../button/Button'\nimport { Tabs } from '../tabs/Tabs'\nimport type { ArticleVideoProps, ArticleMaterialLinkProps, ArticlePlatformTabsProps } from './articleNodes.props'\n\nimport type {\n ArticleEmbedProps,\n ArticleImageProps,\n ArticlePollProps,\n BeforeAfterComparisonProps,\n} from './articleNodes.props'\n\nconst ArticleImage = ({ caption, className, alt = '', ...props }: ArticleImageProps) => <figure className=\"dsx-article-image\"><img {...props} alt={alt} className={classNames('dsx-article-image__media', className)} />{caption ? <figcaption>{caption}</figcaption> : null}</figure>\n\nconst ArticleEmbed = ({ url, render, isAllowed, className, ...props }: ArticleEmbedProps) => {\n let canonical: string | undefined\n try { const parsed = new URL(url); if (parsed.protocol === 'https:' || parsed.protocol === 'http:') canonical = parsed.href } catch {}\n const allowed = Boolean(canonical && (isAllowed?.(canonical) ?? true))\n return <div {...props} className={classNames('dsx-article-embed', className)} data-dsx-url={allowed ? canonical : undefined}>{allowed && canonical ? (render?.(canonical) ?? <a href={canonical}>{canonical}</a>) : <span role=\"alert\">Embed unavailable</span>}</div>\n}\n\nconst BeforeAfterComparison = ({ beforeSrc, afterSrc, beforeAlt, afterAlt, beforeLabel = 'Before', afterLabel = 'After', className, ...props }: BeforeAfterComparisonProps) => <figure {...props} className={classNames('dsx-before-after', className)}><div><img src={beforeSrc} alt={beforeAlt}/><span>{beforeLabel}</span></div><div><img src={afterSrc} alt={afterAlt}/><span>{afterLabel}</span></div></figure>\n\nconst ArticleVideo = ({ caption, className, controls = true, ...props }: ArticleVideoProps) => <figure className=\"dsx-article-video\"><video {...props} controls={controls} className={classNames('dsx-article-video__media', className)} />{caption ? <figcaption>{caption}</figcaption> : null}</figure>\nconst ArticleMaterialLink = ({ materialId, href, children, unavailableLabel = 'Material unavailable', ...props }: ArticleMaterialLinkProps) => {\n let allowed = false\n try { allowed = ['http:', 'https:'].includes(new URL(href ?? '', 'https://example.invalid').protocol) } catch {}\n return href && allowed ? <a {...props} href={href} data-dsx-material-id={materialId}>{children}</a> : <span role=\"status\" data-dsx-material-id={materialId}>{unavailableLabel}</span>\n}\nconst ArticlePlatformTabs = ({ tabs, value, onValueChange, className, dir, ...props }: ArticlePlatformTabsProps) => <Tabs {...props} dir={dir === 'rtl' || dir === 'ltr' ? dir : undefined} className={classNames('dsx-article-platform-tabs', className)} defaultValue={tabs[0]?.platform} value={value} onValueChange={onValueChange}>\n <Tabs.List aria-label=\"Platform instructions\">{tabs.map(tab => <Tabs.Trigger key={tab.platform} value={tab.platform}>{tab.label}</Tabs.Trigger>)}<Tabs.Indicator /></Tabs.List>\n {tabs.map(tab => <Tabs.Content key={tab.platform} value={tab.platform}>{tab.content}</Tabs.Content>)}\n</Tabs>\nconst ArticlePoll = ({ pollId, question, options = [], state = 'ready', onLoad, onVote, selection, multiple = false, onSelectionChange, onSubmit, onRetract, totalVotes, className, ...props }: ArticlePollProps) => {\n React.useEffect(() => { onLoad?.(pollId) }, [pollId, onLoad])\n const controlled = selection !== undefined\n const total = totalVotes ?? options.reduce((sum, option) => sum + (option.votes ?? 0), 0)\n const inert = state === 'closed' || state === 'loading' || state === 'error' || (!controlled && state !== 'ready')\n return <div {...props} className={classNames('dsx-article-poll', className)} data-dsx-poll-id={pollId} data-state={state} aria-busy={state === 'loading' || undefined}>\n {question ? <strong>{question}</strong> : null}\n {state === 'closed' ? <span role=\"status\">Poll closed</span> : null}\n {state === 'error' ? <span role=\"alert\">Poll unavailable</span> : options.map(option => <div className=\"dsx-article-poll__result\" key={option.id}>\n <Button className=\"dsx-article-poll__option\" type=\"button\" size=\"lg\" variant={selection?.includes(option.id) ? 'secondary' : 'outline'} aria-pressed={controlled ? selection.includes(option.id) : undefined} disabled={inert} onClick={() => {\n if (!controlled) { onVote?.(pollId, option.id); return }\n onSelectionChange?.(multiple ? selection.includes(option.id) ? selection.filter(id => id !== option.id) : [...selection, option.id] : [option.id])\n }}>{option.label}{option.votes === undefined ? null : ` (${option.votes})`}</Button>\n {option.votes !== undefined ? <progress aria-label={`${String(option.label)} results`} value={option.votes} max={Math.max(total, 1)} /> : null}\n </div>)}\n {controlled && !inert ? <div className=\"dsx-article-poll__actions\"><Button type=\"button\" size=\"lg\" disabled={!selection.length || !onSubmit} onClick={() => onSubmit?.(pollId, selection)}>{state === 'voted' ? 'Change vote' : 'Vote'}</Button>{state === 'voted' && onRetract ? <Button type=\"button\" size=\"lg\" variant=\"outline\" onClick={() => onRetract(pollId)}>Retract vote</Button> : null}</div> : null}\n </div>\n}\n\nexport { ArticleEmbed, ArticleImage, ArticlePoll, BeforeAfterComparison, ArticleVideo, ArticleMaterialLink, ArticlePlatformTabs }\nexport type {\n ArticleEmbedProps,\n ArticleImageProps,\n ArticlePollProps,\n BeforeAfterComparisonProps,\n PollState, Artic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AAI,CAAC,GAAG,WAAW,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;AAAA,MACnJ,GAAI;AAAA,eAAO;AAAA,QAAO,OAAO,UAAU,SAAY,OAAO,KAAK,OAAO,KAAK;AAAA,SAAI;AAAA,MAC1E,OAAO,UAAU,SAAY,4CAAC,cAAS,cAAY,GAAG,OAAO,OAAO,KAAK,CAAC,YAAY,OAAO,OAAO,OAAO,KAAK,KAAK,IAAI,OAAO,CAAC,GAAG,IAAK;AAAA,SALL,OAAO,EAM9I,CAAM;AAAA,IACL,cAAc,CAAC,QAAQ,6CAAC,SAAI,WAAU,6BAA4B;AAAA,kDAAC,wBAAO,MAAK,UAAS,MAAK,MAAK,UAAU,CAAC,UAAU,UAAU,CAAC,UAAU,SAAS,MAAM,WAAW,QAAQ,SAAS,GAAI,oBAAU,UAAU,gBAAgB,QAAO;AAAA,MAAU,UAAU,WAAW,YAAY,4CAAC,wBAAO,MAAK,UAAS,MAAK,MAAK,SAAQ,WAAU,SAAS,MAAM,UAAU,MAAM,GAAG,0BAAY,IAAY;AAAA,OAAK,IAAS;AAAA,KAC9Y;AACF;",
|
|
6
6
|
"names": ["classNames"]
|
|
7
7
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import type { ArticleVideoProps, ArticleMaterialLinkProps, ArticlePlatformTabsProps } from './articleNodes.props.cjs';
|
|
1
2
|
import type { ArticleEmbedProps, ArticleImageProps, ArticlePollProps, BeforeAfterComparisonProps } from './articleNodes.props.cjs';
|
|
2
3
|
declare const ArticleImage: ({ caption, className, alt, ...props }: ArticleImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
declare const ArticleEmbed: ({ url, render, isAllowed, className, ...props }: ArticleEmbedProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
5
|
declare const BeforeAfterComparison: ({ beforeSrc, afterSrc, beforeAlt, afterAlt, beforeLabel, afterLabel, className, ...props }: BeforeAfterComparisonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare const
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
declare const ArticleVideo: ({ caption, className, controls, ...props }: ArticleVideoProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const ArticleMaterialLink: ({ materialId, href, children, unavailableLabel, ...props }: ArticleMaterialLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const ArticlePlatformTabs: ({ tabs, value, onValueChange, className, dir, ...props }: ArticlePlatformTabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const ArticlePoll: ({ pollId, question, options, state, onLoad, onVote, selection, multiple, onSelectionChange, onSubmit, onRetract, totalVotes, className, ...props }: ArticlePollProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { ArticleEmbed, ArticleImage, ArticlePoll, BeforeAfterComparison, ArticleVideo, ArticleMaterialLink, ArticlePlatformTabs };
|
|
11
|
+
export type { ArticleEmbedProps, ArticleImageProps, ArticlePollProps, BeforeAfterComparisonProps, PollState, ArticleVideoProps, ArticleMaterialLinkProps, ArticlePlatformTabsProps, } from './articleNodes.props.cjs';
|
|
8
12
|
//# sourceMappingURL=ArticleNodes.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleNodes.d.cts","sourceRoot":"","sources":["../../../src/components/articleNodes/ArticleNodes.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ArticleNodes.d.cts","sourceRoot":"","sources":["../../../src/components/articleNodes/ArticleNodes.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAEjH,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC3B,MAAM,sBAAsB,CAAA;AAE7B,QAAA,MAAM,YAAY,GAAI,uCAA4C,iBAAiB,4CAAmM,CAAA;AAEtR,QAAA,MAAM,YAAY,GAAI,iDAAiD,iBAAiB,4CAKvF,CAAA;AAED,QAAA,MAAM,qBAAqB,GAAI,4FAAiH,0BAA0B,4CAA0O,CAAA;AAEpZ,QAAA,MAAM,YAAY,GAAI,4CAAmD,iBAAiB,4CAA+M,CAAA;AACzS,QAAA,MAAM,mBAAmB,GAAI,4DAAqF,wBAAwB,4CAIzI,CAAA;AACD,QAAA,MAAM,mBAAmB,GAAI,0DAA0D,wBAAwB,4CAGxG,CAAA;AACP,QAAA,MAAM,WAAW,GAAI,oJAA2K,gBAAgB,4CAiB/M,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,qBAAqB,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAA;AACjI,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC1B,SAAS,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,wBAAwB,GACjF,MAAM,sBAAsB,CAAA"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import type { ArticleVideoProps, ArticleMaterialLinkProps, ArticlePlatformTabsProps } from './articleNodes.props.js';
|
|
1
2
|
import type { ArticleEmbedProps, ArticleImageProps, ArticlePollProps, BeforeAfterComparisonProps } from './articleNodes.props.js';
|
|
2
3
|
declare const ArticleImage: ({ caption, className, alt, ...props }: ArticleImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
declare const ArticleEmbed: ({ url, render, isAllowed, className, ...props }: ArticleEmbedProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
5
|
declare const BeforeAfterComparison: ({ beforeSrc, afterSrc, beforeAlt, afterAlt, beforeLabel, afterLabel, className, ...props }: BeforeAfterComparisonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare const
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
declare const ArticleVideo: ({ caption, className, controls, ...props }: ArticleVideoProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const ArticleMaterialLink: ({ materialId, href, children, unavailableLabel, ...props }: ArticleMaterialLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const ArticlePlatformTabs: ({ tabs, value, onValueChange, className, dir, ...props }: ArticlePlatformTabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const ArticlePoll: ({ pollId, question, options, state, onLoad, onVote, selection, multiple, onSelectionChange, onSubmit, onRetract, totalVotes, className, ...props }: ArticlePollProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { ArticleEmbed, ArticleImage, ArticlePoll, BeforeAfterComparison, ArticleVideo, ArticleMaterialLink, ArticlePlatformTabs };
|
|
11
|
+
export type { ArticleEmbedProps, ArticleImageProps, ArticlePollProps, BeforeAfterComparisonProps, PollState, ArticleVideoProps, ArticleMaterialLinkProps, ArticlePlatformTabsProps, } from './articleNodes.props.js';
|
|
8
12
|
//# sourceMappingURL=ArticleNodes.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleNodes.d.mts","sourceRoot":"","sources":["../../../src/components/articleNodes/ArticleNodes.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ArticleNodes.d.mts","sourceRoot":"","sources":["../../../src/components/articleNodes/ArticleNodes.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAEjH,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC3B,MAAM,sBAAsB,CAAA;AAE7B,QAAA,MAAM,YAAY,GAAI,uCAA4C,iBAAiB,4CAAmM,CAAA;AAEtR,QAAA,MAAM,YAAY,GAAI,iDAAiD,iBAAiB,4CAKvF,CAAA;AAED,QAAA,MAAM,qBAAqB,GAAI,4FAAiH,0BAA0B,4CAA0O,CAAA;AAEpZ,QAAA,MAAM,YAAY,GAAI,4CAAmD,iBAAiB,4CAA+M,CAAA;AACzS,QAAA,MAAM,mBAAmB,GAAI,4DAAqF,wBAAwB,4CAIzI,CAAA;AACD,QAAA,MAAM,mBAAmB,GAAI,0DAA0D,wBAAwB,4CAGxG,CAAA;AACP,QAAA,MAAM,WAAW,GAAI,oJAA2K,gBAAgB,4CAiB/M,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,qBAAqB,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAA;AACjI,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC1B,SAAS,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,wBAAwB,GACjF,MAAM,sBAAsB,CAAA"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import type { ArticleVideoProps, ArticleMaterialLinkProps, ArticlePlatformTabsProps } from './articleNodes.props.js';
|
|
1
2
|
import type { ArticleEmbedProps, ArticleImageProps, ArticlePollProps, BeforeAfterComparisonProps } from './articleNodes.props.js';
|
|
2
3
|
declare const ArticleImage: ({ caption, className, alt, ...props }: ArticleImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
declare const ArticleEmbed: ({ url, render, isAllowed, className, ...props }: ArticleEmbedProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
5
|
declare const BeforeAfterComparison: ({ beforeSrc, afterSrc, beforeAlt, afterAlt, beforeLabel, afterLabel, className, ...props }: BeforeAfterComparisonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare const
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
declare const ArticleVideo: ({ caption, className, controls, ...props }: ArticleVideoProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const ArticleMaterialLink: ({ materialId, href, children, unavailableLabel, ...props }: ArticleMaterialLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const ArticlePlatformTabs: ({ tabs, value, onValueChange, className, dir, ...props }: ArticlePlatformTabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const ArticlePoll: ({ pollId, question, options, state, onLoad, onVote, selection, multiple, onSelectionChange, onSubmit, onRetract, totalVotes, className, ...props }: ArticlePollProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { ArticleEmbed, ArticleImage, ArticlePoll, BeforeAfterComparison, ArticleVideo, ArticleMaterialLink, ArticlePlatformTabs };
|
|
11
|
+
export type { ArticleEmbedProps, ArticleImageProps, ArticlePollProps, BeforeAfterComparisonProps, PollState, ArticleVideoProps, ArticleMaterialLinkProps, ArticlePlatformTabsProps, } from './articleNodes.props.js';
|
|
8
12
|
//# sourceMappingURL=ArticleNodes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleNodes.d.ts","sourceRoot":"","sources":["../../../src/components/articleNodes/ArticleNodes.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ArticleNodes.d.ts","sourceRoot":"","sources":["../../../src/components/articleNodes/ArticleNodes.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAEjH,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC3B,MAAM,sBAAsB,CAAA;AAE7B,QAAA,MAAM,YAAY,GAAI,uCAA4C,iBAAiB,4CAAmM,CAAA;AAEtR,QAAA,MAAM,YAAY,GAAI,iDAAiD,iBAAiB,4CAKvF,CAAA;AAED,QAAA,MAAM,qBAAqB,GAAI,4FAAiH,0BAA0B,4CAA0O,CAAA;AAEpZ,QAAA,MAAM,YAAY,GAAI,4CAAmD,iBAAiB,4CAA+M,CAAA;AACzS,QAAA,MAAM,mBAAmB,GAAI,4DAAqF,wBAAwB,4CAIzI,CAAA;AACD,QAAA,MAAM,mBAAmB,GAAI,0DAA0D,wBAAwB,4CAGxG,CAAA;AACP,QAAA,MAAM,WAAW,GAAI,oJAA2K,gBAAgB,4CAiB/M,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,qBAAqB,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAA;AACjI,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC1B,SAAS,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,wBAAwB,GACjF,MAAM,sBAAsB,CAAA"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
+
import { Button } from "../button/Button.js";
|
|
4
|
+
import { Tabs } from "../tabs/Tabs.js";
|
|
3
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
6
|
const ArticleImage = ({ caption, className, alt = "", ...props }) => /* @__PURE__ */ jsxs("figure", { className: "dsx-article-image", children: [
|
|
5
7
|
/* @__PURE__ */ jsx("img", { ...props, alt, className: classNames("dsx-article-image__media", className) }),
|
|
@@ -25,22 +27,61 @@ const BeforeAfterComparison = ({ beforeSrc, afterSrc, beforeAlt, afterAlt, befor
|
|
|
25
27
|
/* @__PURE__ */ jsx("span", { children: afterLabel })
|
|
26
28
|
] })
|
|
27
29
|
] });
|
|
28
|
-
const
|
|
30
|
+
const ArticleVideo = ({ caption, className, controls = true, ...props }) => /* @__PURE__ */ jsxs("figure", { className: "dsx-article-video", children: [
|
|
31
|
+
/* @__PURE__ */ jsx("video", { ...props, controls, className: classNames("dsx-article-video__media", className) }),
|
|
32
|
+
caption ? /* @__PURE__ */ jsx("figcaption", { children: caption }) : null
|
|
33
|
+
] });
|
|
34
|
+
const ArticleMaterialLink = ({ materialId, href, children, unavailableLabel = "Material unavailable", ...props }) => {
|
|
35
|
+
let allowed = false;
|
|
36
|
+
try {
|
|
37
|
+
allowed = ["http:", "https:"].includes(new URL(href ?? "", "https://example.invalid").protocol);
|
|
38
|
+
} catch {
|
|
39
|
+
}
|
|
40
|
+
return href && allowed ? /* @__PURE__ */ jsx("a", { ...props, href, "data-dsx-material-id": materialId, children }) : /* @__PURE__ */ jsx("span", { role: "status", "data-dsx-material-id": materialId, children: unavailableLabel });
|
|
41
|
+
};
|
|
42
|
+
const ArticlePlatformTabs = ({ tabs, value, onValueChange, className, dir, ...props }) => /* @__PURE__ */ jsxs(Tabs, { ...props, dir: dir === "rtl" || dir === "ltr" ? dir : void 0, className: classNames("dsx-article-platform-tabs", className), defaultValue: tabs[0]?.platform, value, onValueChange, children: [
|
|
43
|
+
/* @__PURE__ */ jsxs(Tabs.List, { "aria-label": "Platform instructions", children: [
|
|
44
|
+
tabs.map((tab) => /* @__PURE__ */ jsx(Tabs.Trigger, { value: tab.platform, children: tab.label }, tab.platform)),
|
|
45
|
+
/* @__PURE__ */ jsx(Tabs.Indicator, {})
|
|
46
|
+
] }),
|
|
47
|
+
tabs.map((tab) => /* @__PURE__ */ jsx(Tabs.Content, { value: tab.platform, children: tab.content }, tab.platform))
|
|
48
|
+
] });
|
|
49
|
+
const ArticlePoll = ({ pollId, question, options = [], state = "ready", onLoad, onVote, selection, multiple = false, onSelectionChange, onSubmit, onRetract, totalVotes, className, ...props }) => {
|
|
29
50
|
React.useEffect(() => {
|
|
30
51
|
onLoad?.(pollId);
|
|
31
52
|
}, [pollId, onLoad]);
|
|
53
|
+
const controlled = selection !== void 0;
|
|
54
|
+
const total = totalVotes ?? options.reduce((sum, option) => sum + (option.votes ?? 0), 0);
|
|
55
|
+
const inert = state === "closed" || state === "loading" || state === "error" || !controlled && state !== "ready";
|
|
32
56
|
return /* @__PURE__ */ jsxs("div", { ...props, className: classNames("dsx-article-poll", className), "data-dsx-poll-id": pollId, "data-state": state, "aria-busy": state === "loading" || void 0, children: [
|
|
33
57
|
question ? /* @__PURE__ */ jsx("strong", { children: question }) : null,
|
|
34
|
-
state === "
|
|
35
|
-
|
|
36
|
-
option.
|
|
37
|
-
|
|
58
|
+
state === "closed" ? /* @__PURE__ */ jsx("span", { role: "status", children: "Poll closed" }) : null,
|
|
59
|
+
state === "error" ? /* @__PURE__ */ jsx("span", { role: "alert", children: "Poll unavailable" }) : options.map((option) => /* @__PURE__ */ jsxs("div", { className: "dsx-article-poll__result", children: [
|
|
60
|
+
/* @__PURE__ */ jsxs(Button, { className: "dsx-article-poll__option", type: "button", size: "lg", variant: selection?.includes(option.id) ? "secondary" : "outline", "aria-pressed": controlled ? selection.includes(option.id) : void 0, disabled: inert, onClick: () => {
|
|
61
|
+
if (!controlled) {
|
|
62
|
+
onVote?.(pollId, option.id);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
onSelectionChange?.(multiple ? selection.includes(option.id) ? selection.filter((id) => id !== option.id) : [...selection, option.id] : [option.id]);
|
|
66
|
+
}, children: [
|
|
67
|
+
option.label,
|
|
68
|
+
option.votes === void 0 ? null : ` (${option.votes})`
|
|
69
|
+
] }),
|
|
70
|
+
option.votes !== void 0 ? /* @__PURE__ */ jsx("progress", { "aria-label": `${String(option.label)} results`, value: option.votes, max: Math.max(total, 1) }) : null
|
|
71
|
+
] }, option.id)),
|
|
72
|
+
controlled && !inert ? /* @__PURE__ */ jsxs("div", { className: "dsx-article-poll__actions", children: [
|
|
73
|
+
/* @__PURE__ */ jsx(Button, { type: "button", size: "lg", disabled: !selection.length || !onSubmit, onClick: () => onSubmit?.(pollId, selection), children: state === "voted" ? "Change vote" : "Vote" }),
|
|
74
|
+
state === "voted" && onRetract ? /* @__PURE__ */ jsx(Button, { type: "button", size: "lg", variant: "outline", onClick: () => onRetract(pollId), children: "Retract vote" }) : null
|
|
75
|
+
] }) : null
|
|
38
76
|
] });
|
|
39
77
|
};
|
|
40
78
|
export {
|
|
41
79
|
ArticleEmbed,
|
|
42
80
|
ArticleImage,
|
|
81
|
+
ArticleMaterialLink,
|
|
82
|
+
ArticlePlatformTabs,
|
|
43
83
|
ArticlePoll,
|
|
84
|
+
ArticleVideo,
|
|
44
85
|
BeforeAfterComparison
|
|
45
86
|
};
|
|
46
87
|
//# sourceMappingURL=ArticleNodes.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/articleNodes/ArticleNodes.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport classNames from 'classnames'\n\nimport type {\n ArticleEmbedProps,\n ArticleImageProps,\n ArticlePollProps,\n BeforeAfterComparisonProps,\n} from './articleNodes.props'\n\nconst ArticleImage = ({ caption, className, alt = '', ...props }: ArticleImageProps) => <figure className=\"dsx-article-image\"><img {...props} alt={alt} className={classNames('dsx-article-image__media', className)} />{caption ? <figcaption>{caption}</figcaption> : null}</figure>\n\nconst ArticleEmbed = ({ url, render, isAllowed, className, ...props }: ArticleEmbedProps) => {\n let canonical: string | undefined\n try { const parsed = new URL(url); if (parsed.protocol === 'https:' || parsed.protocol === 'http:') canonical = parsed.href } catch {}\n const allowed = Boolean(canonical && (isAllowed?.(canonical) ?? true))\n return <div {...props} className={classNames('dsx-article-embed', className)} data-dsx-url={allowed ? canonical : undefined}>{allowed && canonical ? (render?.(canonical) ?? <a href={canonical}>{canonical}</a>) : <span role=\"alert\">Embed unavailable</span>}</div>\n}\n\nconst BeforeAfterComparison = ({ beforeSrc, afterSrc, beforeAlt, afterAlt, beforeLabel = 'Before', afterLabel = 'After', className, ...props }: BeforeAfterComparisonProps) => <figure {...props} className={classNames('dsx-before-after', className)}><div><img src={beforeSrc} alt={beforeAlt}/><span>{beforeLabel}</span></div><div><img src={afterSrc} alt={afterAlt}/><span>{afterLabel}</span></div></figure>\n\nconst ArticlePoll = ({ pollId, question, options = [], state = 'ready', onLoad, onVote, className, ...props }: ArticlePollProps) => {\n React.useEffect(() => { onLoad?.(pollId) }, [pollId, onLoad])\n return <div {...props} className={classNames('dsx-article-poll', className)} data-dsx-poll-id={pollId} data-state={state} aria-busy={state === 'loading' || undefined}
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AACvB,OAAO,gBAAgB;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react'\nimport classNames from 'classnames'\nimport { Button } from '../button/Button'\nimport { Tabs } from '../tabs/Tabs'\nimport type { ArticleVideoProps, ArticleMaterialLinkProps, ArticlePlatformTabsProps } from './articleNodes.props'\n\nimport type {\n ArticleEmbedProps,\n ArticleImageProps,\n ArticlePollProps,\n BeforeAfterComparisonProps,\n} from './articleNodes.props'\n\nconst ArticleImage = ({ caption, className, alt = '', ...props }: ArticleImageProps) => <figure className=\"dsx-article-image\"><img {...props} alt={alt} className={classNames('dsx-article-image__media', className)} />{caption ? <figcaption>{caption}</figcaption> : null}</figure>\n\nconst ArticleEmbed = ({ url, render, isAllowed, className, ...props }: ArticleEmbedProps) => {\n let canonical: string | undefined\n try { const parsed = new URL(url); if (parsed.protocol === 'https:' || parsed.protocol === 'http:') canonical = parsed.href } catch {}\n const allowed = Boolean(canonical && (isAllowed?.(canonical) ?? true))\n return <div {...props} className={classNames('dsx-article-embed', className)} data-dsx-url={allowed ? canonical : undefined}>{allowed && canonical ? (render?.(canonical) ?? <a href={canonical}>{canonical}</a>) : <span role=\"alert\">Embed unavailable</span>}</div>\n}\n\nconst BeforeAfterComparison = ({ beforeSrc, afterSrc, beforeAlt, afterAlt, beforeLabel = 'Before', afterLabel = 'After', className, ...props }: BeforeAfterComparisonProps) => <figure {...props} className={classNames('dsx-before-after', className)}><div><img src={beforeSrc} alt={beforeAlt}/><span>{beforeLabel}</span></div><div><img src={afterSrc} alt={afterAlt}/><span>{afterLabel}</span></div></figure>\n\nconst ArticleVideo = ({ caption, className, controls = true, ...props }: ArticleVideoProps) => <figure className=\"dsx-article-video\"><video {...props} controls={controls} className={classNames('dsx-article-video__media', className)} />{caption ? <figcaption>{caption}</figcaption> : null}</figure>\nconst ArticleMaterialLink = ({ materialId, href, children, unavailableLabel = 'Material unavailable', ...props }: ArticleMaterialLinkProps) => {\n let allowed = false\n try { allowed = ['http:', 'https:'].includes(new URL(href ?? '', 'https://example.invalid').protocol) } catch {}\n return href && allowed ? <a {...props} href={href} data-dsx-material-id={materialId}>{children}</a> : <span role=\"status\" data-dsx-material-id={materialId}>{unavailableLabel}</span>\n}\nconst ArticlePlatformTabs = ({ tabs, value, onValueChange, className, dir, ...props }: ArticlePlatformTabsProps) => <Tabs {...props} dir={dir === 'rtl' || dir === 'ltr' ? dir : undefined} className={classNames('dsx-article-platform-tabs', className)} defaultValue={tabs[0]?.platform} value={value} onValueChange={onValueChange}>\n <Tabs.List aria-label=\"Platform instructions\">{tabs.map(tab => <Tabs.Trigger key={tab.platform} value={tab.platform}>{tab.label}</Tabs.Trigger>)}<Tabs.Indicator /></Tabs.List>\n {tabs.map(tab => <Tabs.Content key={tab.platform} value={tab.platform}>{tab.content}</Tabs.Content>)}\n</Tabs>\nconst ArticlePoll = ({ pollId, question, options = [], state = 'ready', onLoad, onVote, selection, multiple = false, onSelectionChange, onSubmit, onRetract, totalVotes, className, ...props }: ArticlePollProps) => {\n React.useEffect(() => { onLoad?.(pollId) }, [pollId, onLoad])\n const controlled = selection !== undefined\n const total = totalVotes ?? options.reduce((sum, option) => sum + (option.votes ?? 0), 0)\n const inert = state === 'closed' || state === 'loading' || state === 'error' || (!controlled && state !== 'ready')\n return <div {...props} className={classNames('dsx-article-poll', className)} data-dsx-poll-id={pollId} data-state={state} aria-busy={state === 'loading' || undefined}>\n {question ? <strong>{question}</strong> : null}\n {state === 'closed' ? <span role=\"status\">Poll closed</span> : null}\n {state === 'error' ? <span role=\"alert\">Poll unavailable</span> : options.map(option => <div className=\"dsx-article-poll__result\" key={option.id}>\n <Button className=\"dsx-article-poll__option\" type=\"button\" size=\"lg\" variant={selection?.includes(option.id) ? 'secondary' : 'outline'} aria-pressed={controlled ? selection.includes(option.id) : undefined} disabled={inert} onClick={() => {\n if (!controlled) { onVote?.(pollId, option.id); return }\n onSelectionChange?.(multiple ? selection.includes(option.id) ? selection.filter(id => id !== option.id) : [...selection, option.id] : [option.id])\n }}>{option.label}{option.votes === undefined ? null : ` (${option.votes})`}</Button>\n {option.votes !== undefined ? <progress aria-label={`${String(option.label)} results`} value={option.votes} max={Math.max(total, 1)} /> : null}\n </div>)}\n {controlled && !inert ? <div className=\"dsx-article-poll__actions\"><Button type=\"button\" size=\"lg\" disabled={!selection.length || !onSubmit} onClick={() => onSubmit?.(pollId, selection)}>{state === 'voted' ? 'Change vote' : 'Vote'}</Button>{state === 'voted' && onRetract ? <Button type=\"button\" size=\"lg\" variant=\"outline\" onClick={() => onRetract(pollId)}>Retract vote</Button> : null}</div> : null}\n </div>\n}\n\nexport { ArticleEmbed, ArticleImage, ArticlePoll, BeforeAfterComparison, ArticleVideo, ArticleMaterialLink, ArticlePlatformTabs }\nexport type {\n ArticleEmbedProps,\n ArticleImageProps,\n ArticlePollProps,\n BeforeAfterComparisonProps,\n PollState, ArticleVideoProps, ArticleMaterialLinkProps, ArticlePlatformTabsProps,\n} from './articleNodes.props'\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AACvB,OAAO,gBAAgB;AACvB,SAAS,cAAc;AACvB,SAAS,YAAY;AAUmE,SAAsC,KAAtC;AAAxF,MAAM,eAAe,CAAC,EAAE,SAAS,WAAW,MAAM,IAAI,GAAG,MAAM,MAAyB,qBAAC,YAAO,WAAU,qBAAoB;AAAA,sBAAC,SAAK,GAAG,OAAO,KAAU,WAAW,WAAW,4BAA4B,SAAS,GAAG;AAAA,EAAG,UAAU,oBAAC,gBAAY,mBAAQ,IAAgB;AAAA,GAAK;AAE7Q,MAAM,eAAe,CAAC,EAAE,KAAK,QAAQ,WAAW,WAAW,GAAG,MAAM,MAAyB;AAC3F,MAAI;AACJ,MAAI;AAAE,UAAM,SAAS,IAAI,IAAI,GAAG;AAAG,QAAI,OAAO,aAAa,YAAY,OAAO,aAAa,QAAS,aAAY,OAAO;AAAA,EAAK,QAAQ;AA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 @@ __export(articleExtensions_exports, {
|
|
|
32
32
|
CalloutExtension: () => CalloutExtension,
|
|
33
33
|
ComparisonExtension: () => ComparisonExtension,
|
|
34
34
|
EmbedExtension: () => EmbedExtension,
|
|
35
|
+
MaterialLinkExtension: () => MaterialLinkExtension,
|
|
36
|
+
PlatformTabExtension: () => PlatformTabExtension,
|
|
37
|
+
PlatformTabsExtension: () => PlatformTabsExtension,
|
|
35
38
|
PollExtension: () => PollExtension,
|
|
39
|
+
VideoExtension: () => VideoExtension,
|
|
36
40
|
createArticleExtensions: () => createArticleExtensions
|
|
37
41
|
});
|
|
38
42
|
module.exports = __toCommonJS(articleExtensions_exports);
|
|
@@ -41,6 +45,8 @@ var import_extension_image = __toESM(require("@tiptap/extension-image"), 1);
|
|
|
41
45
|
var import_extension_table = require("@tiptap/extension-table");
|
|
42
46
|
var import_extension_code_block_lowlight = __toESM(require("@tiptap/extension-code-block-lowlight"), 1);
|
|
43
47
|
var import_lowlight = require("lowlight");
|
|
48
|
+
var import_react = require("@tiptap/react");
|
|
49
|
+
var import_articleNodeViews = require("./articleNodeViews");
|
|
44
50
|
const lowlight = (0, import_lowlight.createLowlight)(import_lowlight.common);
|
|
45
51
|
const dataAttributes = (attributes) => Object.fromEntries(Object.entries(attributes).filter(([, value]) => value != null));
|
|
46
52
|
const attribute = (key, htmlName = key, defaultValue = null) => ({ default: defaultValue, parseHTML: (element) => element.getAttribute(`data-dsx-${htmlName}`), renderHTML: (attributes) => attributes[key] == null ? {} : { [`data-dsx-${htmlName}`]: attributes[key] } });
|
|
@@ -54,7 +60,7 @@ const canonicalUrl = (value) => {
|
|
|
54
60
|
};
|
|
55
61
|
const ArticleImageExtension = import_extension_image.default.extend({
|
|
56
62
|
addAttributes() {
|
|
57
|
-
return { ...this.parent?.(), caption: { default: null, parseHTML: (element) => element.getAttribute("data-dsx-caption"), renderHTML: ({ caption }) => caption ? { "data-dsx-caption": caption } : {} } };
|
|
63
|
+
return { ...this.parent?.(), mediaId: attribute("mediaId", "media-id"), caption: { default: null, parseHTML: (element) => element.getAttribute("data-dsx-caption"), renderHTML: ({ caption }) => caption ? { "data-dsx-caption": caption } : {} } };
|
|
58
64
|
}
|
|
59
65
|
});
|
|
60
66
|
const EmbedExtension = import_core.Node.create({ name: "dsxEmbed", group: "block", atom: true, addAttributes: () => ({ url: attribute("url") }), parseHTML: () => [{ tag: 'div[data-dsx-node="embed"]' }], renderHTML: ({ HTMLAttributes }) => {
|
|
@@ -63,8 +69,19 @@ const EmbedExtension = import_core.Node.create({ name: "dsxEmbed", group: "block
|
|
|
63
69
|
} });
|
|
64
70
|
const CalloutExtension = import_core.Node.create({ name: "dsxCallout", group: "block", content: "block+", defining: true, addAttributes: () => ({ tone: attribute("tone", "tone", "info"), title: attribute("title") }), parseHTML: () => [{ tag: 'aside[data-dsx-node="callout"]' }], renderHTML: ({ HTMLAttributes }) => ["aside", (0, import_core.mergeAttributes)({ "data-dsx-node": "callout" }, dataAttributes(HTMLAttributes)), 0] });
|
|
65
71
|
const ComparisonExtension = import_core.Node.create({ name: "dsxComparison", group: "block", atom: true, addAttributes: () => ({ beforeSrc: attribute("beforeSrc", "before-src"), afterSrc: attribute("afterSrc", "after-src"), beforeAlt: attribute("beforeAlt", "before-alt", ""), afterAlt: attribute("afterAlt", "after-alt", ""), beforeLabel: attribute("beforeLabel", "before-label"), afterLabel: attribute("afterLabel", "after-label") }), parseHTML: () => [{ tag: 'figure[data-dsx-node="comparison"]' }], renderHTML: ({ HTMLAttributes }) => ["figure", (0, import_core.mergeAttributes)({ "data-dsx-node": "comparison" }, dataAttributes(HTMLAttributes))] });
|
|
66
|
-
const PollExtension = import_core.Node.create({ name: "dsxPoll", group: "block", atom: true, addAttributes: () => ({ pollId: attribute("pollId", "poll-id"), question: attribute("question")
|
|
67
|
-
|
|
68
|
-
|
|
72
|
+
const PollExtension = import_core.Node.create({ name: "dsxPoll", group: "block", atom: true, addAttributes: () => ({ pollId: attribute("pollId", "poll-id"), question: attribute("question"), multiple: { default: false, parseHTML: (element) => element.getAttribute("data-dsx-multiple") === "true", renderHTML: (attrs) => ({ "data-dsx-multiple": String(attrs.multiple) }) }, options: { default: [], parseHTML: (element) => {
|
|
73
|
+
try {
|
|
74
|
+
return JSON.parse(element.getAttribute("data-dsx-options") ?? "[]");
|
|
75
|
+
} catch {
|
|
76
|
+
return [];
|
|
77
|
+
}
|
|
78
|
+
}, renderHTML: (attrs) => ({ "data-dsx-options": JSON.stringify(attrs.options) }) } }), parseHTML: () => [{ tag: 'div[data-dsx-node="poll"]' }], renderHTML: ({ HTMLAttributes }) => ["div", (0, import_core.mergeAttributes)({ "data-dsx-node": "poll" }, dataAttributes(HTMLAttributes))] });
|
|
79
|
+
const VideoExtension = import_core.Node.create({ name: "dsxVideo", group: "block", atom: true, addAttributes: () => ({ src: attribute("src"), caption: attribute("caption"), mediaId: attribute("mediaId", "media-id") }), parseHTML: () => [{ tag: 'figure[data-dsx-node="video"]' }], renderHTML: ({ HTMLAttributes }) => ["figure", (0, import_core.mergeAttributes)({ "data-dsx-node": "video" }, dataAttributes(HTMLAttributes))] });
|
|
80
|
+
const MaterialLinkExtension = import_core.Node.create({ name: "dsxMaterialLink", group: "block", atom: true, addAttributes: () => ({ materialId: attribute("materialId", "material-id"), label: attribute("label"), href: attribute("href") }), parseHTML: () => [{ tag: 'div[data-dsx-node="material-link"]' }], renderHTML: ({ HTMLAttributes }) => ["div", (0, import_core.mergeAttributes)({ "data-dsx-node": "material-link" }, dataAttributes(HTMLAttributes))] });
|
|
81
|
+
const PlatformTabsExtension = import_core.Node.create({ name: "dsxTabs", group: "block", content: "dsxTab+", defining: true, parseHTML: () => [{ tag: 'div[data-dsx-node="tabs"]' }], renderHTML: () => ["div", { "data-dsx-node": "tabs" }, 0] });
|
|
82
|
+
const PlatformTabExtension = import_core.Node.create({ name: "dsxTab", content: "block+", defining: true, addAttributes: () => ({ platform: attribute("platform"), label: attribute("label") }), parseHTML: () => [{ tag: 'section[data-dsx-node="tab"]' }], renderHTML: ({ HTMLAttributes }) => ["section", (0, import_core.mergeAttributes)({ "data-dsx-node": "tab" }, dataAttributes(HTMLAttributes)), 0] });
|
|
83
|
+
function createArticleExtensions({ editable = true } = {}) {
|
|
84
|
+
const blocks = [ArticleImageExtension, EmbedExtension, CalloutExtension, ComparisonExtension, PollExtension, VideoExtension, MaterialLinkExtension, PlatformTabsExtension, PlatformTabExtension];
|
|
85
|
+
return [...blocks.map((extension) => editable ? extension.extend({ addNodeView: () => (0, import_react.ReactNodeViewRenderer)(import_articleNodeViews.ArticleBlockView) }) : extension), import_extension_code_block_lowlight.default.configure({ lowlight }), import_extension_table.Table.configure({ resizable: true }), import_extension_table.TableRow, import_extension_table.TableHeader, import_extension_table.TableCell];
|
|
69
86
|
}
|
|
70
87
|
//# sourceMappingURL=articleExtensions.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/articleNodes/articleExtensions.ts"],
|
|
4
|
-
"sourcesContent": ["import { Node, mergeAttributes, type Extensions } from '@tiptap/core'\nimport Image from '@tiptap/extension-image'\nimport { Table, TableCell, TableHeader, TableRow } from '@tiptap/extension-table'\nimport CodeBlockLowlight from '@tiptap/extension-code-block-lowlight'\nimport { common, createLowlight } from 'lowlight'\n\nconst lowlight = createLowlight(common)\nconst dataAttributes = (attributes: Record<string, unknown>) => Object.fromEntries(Object.entries(attributes).filter(([, value]) => value != null))\nconst attribute = (key: string, htmlName = key, defaultValue: unknown = null) => ({ default: defaultValue, parseHTML: (element: HTMLElement) => element.getAttribute(`data-dsx-${htmlName}`), renderHTML: (attributes: Record<string, unknown>) => attributes[key] == null ? {} : { [`data-dsx-${htmlName}`]: attributes[key] } })\nconst canonicalUrl = (value: unknown) => { try { const url = new URL(String(value)); return url.protocol === 'https:' || url.protocol === 'http:' ? url.href : null } catch { return null } }\n\nconst ArticleImageExtension = Image.extend({\n addAttributes() { return { ...this.parent?.(), caption: { default: null, parseHTML: (element) => element.getAttribute('data-dsx-caption'), renderHTML: ({ caption }) => caption ? { 'data-dsx-caption': caption } : {} } } },\n})\nconst EmbedExtension = Node.create({ name: 'dsxEmbed', group: 'block', atom: true, addAttributes: () => ({ url: attribute('url') }), parseHTML: () => [{ tag: 'div[data-dsx-node=\"embed\"]' }], renderHTML: ({ HTMLAttributes }) => { const url = canonicalUrl(HTMLAttributes['data-dsx-url']); return ['div', { 'data-dsx-node': 'embed', ...(url ? { 'data-dsx-url': url } : { 'data-dsx-invalid': 'true' }) }] } })\nconst CalloutExtension = Node.create({ name: 'dsxCallout', group: 'block', content: 'block+', defining: true, addAttributes: () => ({ tone: attribute('tone', 'tone', 'info'), title: attribute('title') }), parseHTML: () => [{ tag: 'aside[data-dsx-node=\"callout\"]' }], renderHTML: ({ HTMLAttributes }) => ['aside', mergeAttributes({ 'data-dsx-node': 'callout' }, dataAttributes(HTMLAttributes)), 0] })\nconst ComparisonExtension = Node.create({ name: 'dsxComparison', group: 'block', atom: true, addAttributes: () => ({ beforeSrc: attribute('beforeSrc', 'before-src'), afterSrc: attribute('afterSrc', 'after-src'), beforeAlt: attribute('beforeAlt', 'before-alt', ''), afterAlt: attribute('afterAlt', 'after-alt', ''), beforeLabel: attribute('beforeLabel', 'before-label'), afterLabel: attribute('afterLabel', 'after-label') }), parseHTML: () => [{ tag: 'figure[data-dsx-node=\"comparison\"]' }], renderHTML: ({ HTMLAttributes }) => ['figure', mergeAttributes({ 'data-dsx-node': 'comparison' }, dataAttributes(HTMLAttributes))] })\nconst PollExtension = Node.create({ name: 'dsxPoll', group: 'block', atom: true, addAttributes: () => ({ pollId: attribute('pollId', 'poll-id'), question: attribute('question') }), parseHTML: () => [{ tag: 'div[data-dsx-node=\"poll\"]' }], renderHTML: ({ HTMLAttributes }) => ['div', mergeAttributes({ 'data-dsx-node': 'poll' }, dataAttributes(HTMLAttributes))] })\n\nfunction createArticleExtensions(): Extensions {\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuD;AACvD,6BAAkB;AAClB,6BAAwD;AACxD,2CAA8B;AAC9B,sBAAuC;
|
|
4
|
+
"sourcesContent": ["import { Node, mergeAttributes, type Extensions } from '@tiptap/core'\nimport Image from '@tiptap/extension-image'\nimport { Table, TableCell, TableHeader, TableRow } from '@tiptap/extension-table'\nimport CodeBlockLowlight from '@tiptap/extension-code-block-lowlight'\nimport { common, createLowlight } from 'lowlight'\nimport { ReactNodeViewRenderer } from '@tiptap/react'\nimport { ArticleBlockView } from './articleNodeViews'\n\nconst lowlight = createLowlight(common)\nconst dataAttributes = (attributes: Record<string, unknown>) => Object.fromEntries(Object.entries(attributes).filter(([, value]) => value != null))\nconst attribute = (key: string, htmlName = key, defaultValue: unknown = null) => ({ default: defaultValue, parseHTML: (element: HTMLElement) => element.getAttribute(`data-dsx-${htmlName}`), renderHTML: (attributes: Record<string, unknown>) => attributes[key] == null ? {} : { [`data-dsx-${htmlName}`]: attributes[key] } })\nconst canonicalUrl = (value: unknown) => { try { const url = new URL(String(value)); return url.protocol === 'https:' || url.protocol === 'http:' ? url.href : null } catch { return null } }\n\nconst ArticleImageExtension = Image.extend({\n addAttributes() { return { ...this.parent?.(), mediaId: attribute('mediaId', 'media-id'), caption: { default: null, parseHTML: (element) => element.getAttribute('data-dsx-caption'), renderHTML: ({ caption }) => caption ? { 'data-dsx-caption': caption } : {} } } },\n})\nconst EmbedExtension = Node.create({ name: 'dsxEmbed', group: 'block', atom: true, addAttributes: () => ({ url: attribute('url') }), parseHTML: () => [{ tag: 'div[data-dsx-node=\"embed\"]' }], renderHTML: ({ HTMLAttributes }) => { const url = canonicalUrl(HTMLAttributes['data-dsx-url']); return ['div', { 'data-dsx-node': 'embed', ...(url ? { 'data-dsx-url': url } : { 'data-dsx-invalid': 'true' }) }] } })\nconst CalloutExtension = Node.create({ name: 'dsxCallout', group: 'block', content: 'block+', defining: true, addAttributes: () => ({ tone: attribute('tone', 'tone', 'info'), title: attribute('title') }), parseHTML: () => [{ tag: 'aside[data-dsx-node=\"callout\"]' }], renderHTML: ({ HTMLAttributes }) => ['aside', mergeAttributes({ 'data-dsx-node': 'callout' }, dataAttributes(HTMLAttributes)), 0] })\nconst ComparisonExtension = Node.create({ name: 'dsxComparison', group: 'block', atom: true, addAttributes: () => ({ beforeSrc: attribute('beforeSrc', 'before-src'), afterSrc: attribute('afterSrc', 'after-src'), beforeAlt: attribute('beforeAlt', 'before-alt', ''), afterAlt: attribute('afterAlt', 'after-alt', ''), beforeLabel: attribute('beforeLabel', 'before-label'), afterLabel: attribute('afterLabel', 'after-label') }), parseHTML: () => [{ tag: 'figure[data-dsx-node=\"comparison\"]' }], renderHTML: ({ HTMLAttributes }) => ['figure', mergeAttributes({ 'data-dsx-node': 'comparison' }, dataAttributes(HTMLAttributes))] })\nconst PollExtension = Node.create({ name: 'dsxPoll', group: 'block', atom: true, addAttributes: () => ({ pollId: attribute('pollId', 'poll-id'), question: attribute('question'), multiple: { default: false, parseHTML: element => element.getAttribute('data-dsx-multiple') === 'true', renderHTML: attrs => ({ 'data-dsx-multiple': String(attrs.multiple) }) }, options: { default: [], parseHTML: element => { try { return JSON.parse(element.getAttribute('data-dsx-options') ?? '[]') } catch { return [] } }, renderHTML: attrs => ({ 'data-dsx-options': JSON.stringify(attrs.options) }) } }), parseHTML: () => [{ tag: 'div[data-dsx-node=\"poll\"]' }], renderHTML: ({ HTMLAttributes }) => ['div', mergeAttributes({ 'data-dsx-node': 'poll' }, dataAttributes(HTMLAttributes))] })\n\nconst VideoExtension = Node.create({ name: 'dsxVideo', group: 'block', atom: true, addAttributes: () => ({ src: attribute('src'), caption: attribute('caption'), mediaId: attribute('mediaId', 'media-id') }), parseHTML: () => [{ tag: 'figure[data-dsx-node=\"video\"]' }], renderHTML: ({ HTMLAttributes }) => ['figure', mergeAttributes({ 'data-dsx-node': 'video' }, dataAttributes(HTMLAttributes))] })\nconst MaterialLinkExtension = Node.create({ name: 'dsxMaterialLink', group: 'block', atom: true, addAttributes: () => ({ materialId: attribute('materialId', 'material-id'), label: attribute('label'), href: attribute('href') }), parseHTML: () => [{ tag: 'div[data-dsx-node=\"material-link\"]' }], renderHTML: ({ HTMLAttributes }) => ['div', mergeAttributes({ 'data-dsx-node': 'material-link' }, dataAttributes(HTMLAttributes))] })\nconst PlatformTabsExtension = Node.create({ name: 'dsxTabs', group: 'block', content: 'dsxTab+', defining: true, parseHTML: () => [{ tag: 'div[data-dsx-node=\"tabs\"]' }], renderHTML: () => ['div', { 'data-dsx-node': 'tabs' }, 0] })\nconst PlatformTabExtension = Node.create({ name: 'dsxTab', content: 'block+', defining: true, addAttributes: () => ({ platform: attribute('platform'), label: attribute('label') }), parseHTML: () => [{ tag: 'section[data-dsx-node=\"tab\"]' }], renderHTML: ({ HTMLAttributes }) => ['section', mergeAttributes({ 'data-dsx-node': 'tab' }, dataAttributes(HTMLAttributes)), 0] })\n\nfunction createArticleExtensions({ editable = true }: { editable?: boolean } = {}): Extensions {\n const blocks = [ArticleImageExtension, EmbedExtension, CalloutExtension, ComparisonExtension, PollExtension, VideoExtension, MaterialLinkExtension, PlatformTabsExtension, PlatformTabExtension]\n return [...blocks.map(extension => editable ? extension.extend({ addNodeView: () => ReactNodeViewRenderer(ArticleBlockView) }) : extension), CodeBlockLowlight.configure({ lowlight }), Table.configure({ resizable: true }), TableRow, TableHeader, TableCell]\n}\n\nexport { ArticleImageExtension, CalloutExtension, ComparisonExtension, EmbedExtension, PollExtension, VideoExtension, MaterialLinkExtension, PlatformTabsExtension, PlatformTabExtension, createArticleExtensions }\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuD;AACvD,6BAAkB;AAClB,6BAAwD;AACxD,2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MAAM,CAAC,OAAO,EAAE,iBAAiB,OAAO,GAAG,CAAC,EAAE,CAAC;AACrO,MAAM,uBAAuB,iBAAK,OAAO,EAAE,MAAM,UAAU,SAAS,UAAU,UAAU,MAAM,eAAe,OAAO,EAAE,UAAU,UAAU,UAAU,GAAG,OAAO,UAAU,OAAO,EAAE,IAAI,WAAW,MAAM,CAAC,EAAE,KAAK,+BAA+B,CAAC,GAAG,YAAY,CAAC,EAAE,eAAe,MAAM,CAAC,eAAW,6BAAgB,EAAE,iBAAiB,MAAM,GAAG,eAAe,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;AAElX,SAAS,wBAAwB,EAAE,WAAW,KAAK,IAA4B,CAAC,GAAe;AAC7F,QAAM,SAAS,CAAC,uBAAuB,gBAAgB,kBAAkB,qBAAqB,eAAe,gBAAgB,uBAAuB,uBAAuB,oBAAoB;AAC/L,SAAO,CAAC,GAAG,OAAO,IAAI,eAAa,WAAW,UAAU,OAAO,EAAE,aAAa,UAAM,oCAAsB,wCAAgB,EAAE,CAAC,IAAI,SAAS,GAAG,qCAAAC,QAAkB,UAAU,EAAE,SAAS,CAAC,GAAG,6BAAM,UAAU,EAAE,WAAW,KAAK,CAAC,GAAG,iCAAU,oCAAa,gCAAS;AAChQ;",
|
|
6
6
|
"names": ["Image", "CodeBlockLowlight"]
|
|
7
7
|
}
|
|
@@ -4,6 +4,12 @@ declare const EmbedExtension: Node<any, any>;
|
|
|
4
4
|
declare const CalloutExtension: Node<any, any>;
|
|
5
5
|
declare const ComparisonExtension: Node<any, any>;
|
|
6
6
|
declare const PollExtension: Node<any, any>;
|
|
7
|
-
declare
|
|
8
|
-
|
|
7
|
+
declare const VideoExtension: Node<any, any>;
|
|
8
|
+
declare const MaterialLinkExtension: Node<any, any>;
|
|
9
|
+
declare const PlatformTabsExtension: Node<any, any>;
|
|
10
|
+
declare const PlatformTabExtension: Node<any, any>;
|
|
11
|
+
declare function createArticleExtensions({ editable }?: {
|
|
12
|
+
editable?: boolean;
|
|
13
|
+
}): Extensions;
|
|
14
|
+
export { ArticleImageExtension, CalloutExtension, ComparisonExtension, EmbedExtension, PollExtension, VideoExtension, MaterialLinkExtension, PlatformTabsExtension, PlatformTabExtension, createArticleExtensions };
|
|
9
15
|
//# sourceMappingURL=articleExtensions.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"articleExtensions.d.cts","sourceRoot":"","sources":["../../../src/components/articleNodes/articleExtensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"articleExtensions.d.cts","sourceRoot":"","sources":["../../../src/components/articleNodes/articleExtensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAA;AAarE,QAAA,MAAM,qBAAqB,2DAEzB,CAAA;AACF,QAAA,MAAM,cAAc,gBAAiY,CAAA;AACrZ,QAAA,MAAM,gBAAgB,gBAAyX,CAAA;AAC/Y,QAAA,MAAM,mBAAmB,gBAAulB,CAAA;AAChnB,QAAA,MAAM,aAAa,gBAA4uB,CAAA;AAE/vB,QAAA,MAAM,cAAc,gBAAwX,CAAA;AAC5Y,QAAA,MAAM,qBAAqB,gBAAgZ,CAAA;AAC3a,QAAA,MAAM,qBAAqB,gBAA2M,CAAA;AACtO,QAAA,MAAM,oBAAoB,gBAAyV,CAAA;AAEnX,iBAAS,uBAAuB,CAAC,EAAE,QAAe,EAAE,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,UAAU,CAG7F;AAED,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,CAAA"}
|
|
@@ -4,6 +4,12 @@ declare const EmbedExtension: Node<any, any>;
|
|
|
4
4
|
declare const CalloutExtension: Node<any, any>;
|
|
5
5
|
declare const ComparisonExtension: Node<any, any>;
|
|
6
6
|
declare const PollExtension: Node<any, any>;
|
|
7
|
-
declare
|
|
8
|
-
|
|
7
|
+
declare const VideoExtension: Node<any, any>;
|
|
8
|
+
declare const MaterialLinkExtension: Node<any, any>;
|
|
9
|
+
declare const PlatformTabsExtension: Node<any, any>;
|
|
10
|
+
declare const PlatformTabExtension: Node<any, any>;
|
|
11
|
+
declare function createArticleExtensions({ editable }?: {
|
|
12
|
+
editable?: boolean;
|
|
13
|
+
}): Extensions;
|
|
14
|
+
export { ArticleImageExtension, CalloutExtension, ComparisonExtension, EmbedExtension, PollExtension, VideoExtension, MaterialLinkExtension, PlatformTabsExtension, PlatformTabExtension, createArticleExtensions };
|
|
9
15
|
//# sourceMappingURL=articleExtensions.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"articleExtensions.d.mts","sourceRoot":"","sources":["../../../src/components/articleNodes/articleExtensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"articleExtensions.d.mts","sourceRoot":"","sources":["../../../src/components/articleNodes/articleExtensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAA;AAarE,QAAA,MAAM,qBAAqB,2DAEzB,CAAA;AACF,QAAA,MAAM,cAAc,gBAAiY,CAAA;AACrZ,QAAA,MAAM,gBAAgB,gBAAyX,CAAA;AAC/Y,QAAA,MAAM,mBAAmB,gBAAulB,CAAA;AAChnB,QAAA,MAAM,aAAa,gBAA4uB,CAAA;AAE/vB,QAAA,MAAM,cAAc,gBAAwX,CAAA;AAC5Y,QAAA,MAAM,qBAAqB,gBAAgZ,CAAA;AAC3a,QAAA,MAAM,qBAAqB,gBAA2M,CAAA;AACtO,QAAA,MAAM,oBAAoB,gBAAyV,CAAA;AAEnX,iBAAS,uBAAuB,CAAC,EAAE,QAAe,EAAE,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,UAAU,CAG7F;AAED,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,CAAA"}
|
|
@@ -4,6 +4,12 @@ declare const EmbedExtension: Node<any, any>;
|
|
|
4
4
|
declare const CalloutExtension: Node<any, any>;
|
|
5
5
|
declare const ComparisonExtension: Node<any, any>;
|
|
6
6
|
declare const PollExtension: Node<any, any>;
|
|
7
|
-
declare
|
|
8
|
-
|
|
7
|
+
declare const VideoExtension: Node<any, any>;
|
|
8
|
+
declare const MaterialLinkExtension: Node<any, any>;
|
|
9
|
+
declare const PlatformTabsExtension: Node<any, any>;
|
|
10
|
+
declare const PlatformTabExtension: Node<any, any>;
|
|
11
|
+
declare function createArticleExtensions({ editable }?: {
|
|
12
|
+
editable?: boolean;
|
|
13
|
+
}): Extensions;
|
|
14
|
+
export { ArticleImageExtension, CalloutExtension, ComparisonExtension, EmbedExtension, PollExtension, VideoExtension, MaterialLinkExtension, PlatformTabsExtension, PlatformTabExtension, createArticleExtensions };
|
|
9
15
|
//# sourceMappingURL=articleExtensions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"articleExtensions.d.ts","sourceRoot":"","sources":["../../../src/components/articleNodes/articleExtensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"articleExtensions.d.ts","sourceRoot":"","sources":["../../../src/components/articleNodes/articleExtensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAA;AAarE,QAAA,MAAM,qBAAqB,2DAEzB,CAAA;AACF,QAAA,MAAM,cAAc,gBAAiY,CAAA;AACrZ,QAAA,MAAM,gBAAgB,gBAAyX,CAAA;AAC/Y,QAAA,MAAM,mBAAmB,gBAAulB,CAAA;AAChnB,QAAA,MAAM,aAAa,gBAA4uB,CAAA;AAE/vB,QAAA,MAAM,cAAc,gBAAwX,CAAA;AAC5Y,QAAA,MAAM,qBAAqB,gBAAgZ,CAAA;AAC3a,QAAA,MAAM,qBAAqB,gBAA2M,CAAA;AACtO,QAAA,MAAM,oBAAoB,gBAAyV,CAAA;AAEnX,iBAAS,uBAAuB,CAAC,EAAE,QAAe,EAAE,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,UAAU,CAG7F;AAED,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,CAAA"}
|
|
@@ -3,6 +3,8 @@ import Image from "@tiptap/extension-image";
|
|
|
3
3
|
import { Table, TableCell, TableHeader, TableRow } from "@tiptap/extension-table";
|
|
4
4
|
import CodeBlockLowlight from "@tiptap/extension-code-block-lowlight";
|
|
5
5
|
import { common, createLowlight } from "lowlight";
|
|
6
|
+
import { ReactNodeViewRenderer } from "@tiptap/react";
|
|
7
|
+
import { ArticleBlockView } from "./articleNodeViews.js";
|
|
6
8
|
const lowlight = createLowlight(common);
|
|
7
9
|
const dataAttributes = (attributes) => Object.fromEntries(Object.entries(attributes).filter(([, value]) => value != null));
|
|
8
10
|
const attribute = (key, htmlName = key, defaultValue = null) => ({ default: defaultValue, parseHTML: (element) => element.getAttribute(`data-dsx-${htmlName}`), renderHTML: (attributes) => attributes[key] == null ? {} : { [`data-dsx-${htmlName}`]: attributes[key] } });
|
|
@@ -16,7 +18,7 @@ const canonicalUrl = (value) => {
|
|
|
16
18
|
};
|
|
17
19
|
const ArticleImageExtension = Image.extend({
|
|
18
20
|
addAttributes() {
|
|
19
|
-
return { ...this.parent?.(), caption: { default: null, parseHTML: (element) => element.getAttribute("data-dsx-caption"), renderHTML: ({ caption }) => caption ? { "data-dsx-caption": caption } : {} } };
|
|
21
|
+
return { ...this.parent?.(), mediaId: attribute("mediaId", "media-id"), caption: { default: null, parseHTML: (element) => element.getAttribute("data-dsx-caption"), renderHTML: ({ caption }) => caption ? { "data-dsx-caption": caption } : {} } };
|
|
20
22
|
}
|
|
21
23
|
});
|
|
22
24
|
const EmbedExtension = Node.create({ name: "dsxEmbed", group: "block", atom: true, addAttributes: () => ({ url: attribute("url") }), parseHTML: () => [{ tag: 'div[data-dsx-node="embed"]' }], renderHTML: ({ HTMLAttributes }) => {
|
|
@@ -25,16 +27,31 @@ const EmbedExtension = Node.create({ name: "dsxEmbed", group: "block", atom: tru
|
|
|
25
27
|
} });
|
|
26
28
|
const CalloutExtension = Node.create({ name: "dsxCallout", group: "block", content: "block+", defining: true, addAttributes: () => ({ tone: attribute("tone", "tone", "info"), title: attribute("title") }), parseHTML: () => [{ tag: 'aside[data-dsx-node="callout"]' }], renderHTML: ({ HTMLAttributes }) => ["aside", mergeAttributes({ "data-dsx-node": "callout" }, dataAttributes(HTMLAttributes)), 0] });
|
|
27
29
|
const ComparisonExtension = Node.create({ name: "dsxComparison", group: "block", atom: true, addAttributes: () => ({ beforeSrc: attribute("beforeSrc", "before-src"), afterSrc: attribute("afterSrc", "after-src"), beforeAlt: attribute("beforeAlt", "before-alt", ""), afterAlt: attribute("afterAlt", "after-alt", ""), beforeLabel: attribute("beforeLabel", "before-label"), afterLabel: attribute("afterLabel", "after-label") }), parseHTML: () => [{ tag: 'figure[data-dsx-node="comparison"]' }], renderHTML: ({ HTMLAttributes }) => ["figure", mergeAttributes({ "data-dsx-node": "comparison" }, dataAttributes(HTMLAttributes))] });
|
|
28
|
-
const PollExtension = Node.create({ name: "dsxPoll", group: "block", atom: true, addAttributes: () => ({ pollId: attribute("pollId", "poll-id"), question: attribute("question")
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
const PollExtension = Node.create({ name: "dsxPoll", group: "block", atom: true, addAttributes: () => ({ pollId: attribute("pollId", "poll-id"), question: attribute("question"), multiple: { default: false, parseHTML: (element) => element.getAttribute("data-dsx-multiple") === "true", renderHTML: (attrs) => ({ "data-dsx-multiple": String(attrs.multiple) }) }, options: { default: [], parseHTML: (element) => {
|
|
31
|
+
try {
|
|
32
|
+
return JSON.parse(element.getAttribute("data-dsx-options") ?? "[]");
|
|
33
|
+
} catch {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
}, renderHTML: (attrs) => ({ "data-dsx-options": JSON.stringify(attrs.options) }) } }), parseHTML: () => [{ tag: 'div[data-dsx-node="poll"]' }], renderHTML: ({ HTMLAttributes }) => ["div", mergeAttributes({ "data-dsx-node": "poll" }, dataAttributes(HTMLAttributes))] });
|
|
37
|
+
const VideoExtension = Node.create({ name: "dsxVideo", group: "block", atom: true, addAttributes: () => ({ src: attribute("src"), caption: attribute("caption"), mediaId: attribute("mediaId", "media-id") }), parseHTML: () => [{ tag: 'figure[data-dsx-node="video"]' }], renderHTML: ({ HTMLAttributes }) => ["figure", mergeAttributes({ "data-dsx-node": "video" }, dataAttributes(HTMLAttributes))] });
|
|
38
|
+
const MaterialLinkExtension = Node.create({ name: "dsxMaterialLink", group: "block", atom: true, addAttributes: () => ({ materialId: attribute("materialId", "material-id"), label: attribute("label"), href: attribute("href") }), parseHTML: () => [{ tag: 'div[data-dsx-node="material-link"]' }], renderHTML: ({ HTMLAttributes }) => ["div", mergeAttributes({ "data-dsx-node": "material-link" }, dataAttributes(HTMLAttributes))] });
|
|
39
|
+
const PlatformTabsExtension = Node.create({ name: "dsxTabs", group: "block", content: "dsxTab+", defining: true, parseHTML: () => [{ tag: 'div[data-dsx-node="tabs"]' }], renderHTML: () => ["div", { "data-dsx-node": "tabs" }, 0] });
|
|
40
|
+
const PlatformTabExtension = Node.create({ name: "dsxTab", content: "block+", defining: true, addAttributes: () => ({ platform: attribute("platform"), label: attribute("label") }), parseHTML: () => [{ tag: 'section[data-dsx-node="tab"]' }], renderHTML: ({ HTMLAttributes }) => ["section", mergeAttributes({ "data-dsx-node": "tab" }, dataAttributes(HTMLAttributes)), 0] });
|
|
41
|
+
function createArticleExtensions({ editable = true } = {}) {
|
|
42
|
+
const blocks = [ArticleImageExtension, EmbedExtension, CalloutExtension, ComparisonExtension, PollExtension, VideoExtension, MaterialLinkExtension, PlatformTabsExtension, PlatformTabExtension];
|
|
43
|
+
return [...blocks.map((extension) => editable ? extension.extend({ addNodeView: () => ReactNodeViewRenderer(ArticleBlockView) }) : extension), CodeBlockLowlight.configure({ lowlight }), Table.configure({ resizable: true }), TableRow, TableHeader, TableCell];
|
|
31
44
|
}
|
|
32
45
|
export {
|
|
33
46
|
ArticleImageExtension,
|
|
34
47
|
CalloutExtension,
|
|
35
48
|
ComparisonExtension,
|
|
36
49
|
EmbedExtension,
|
|
50
|
+
MaterialLinkExtension,
|
|
51
|
+
PlatformTabExtension,
|
|
52
|
+
PlatformTabsExtension,
|
|
37
53
|
PollExtension,
|
|
54
|
+
VideoExtension,
|
|
38
55
|
createArticleExtensions
|
|
39
56
|
};
|
|
40
57
|
//# sourceMappingURL=articleExtensions.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/articleNodes/articleExtensions.ts"],
|
|
4
|
-
"sourcesContent": ["import { Node, mergeAttributes, type Extensions } from '@tiptap/core'\nimport Image from '@tiptap/extension-image'\nimport { Table, TableCell, TableHeader, TableRow } from '@tiptap/extension-table'\nimport CodeBlockLowlight from '@tiptap/extension-code-block-lowlight'\nimport { common, createLowlight } from 'lowlight'\n\nconst lowlight = createLowlight(common)\nconst dataAttributes = (attributes: Record<string, unknown>) => Object.fromEntries(Object.entries(attributes).filter(([, value]) => value != null))\nconst attribute = (key: string, htmlName = key, defaultValue: unknown = null) => ({ default: defaultValue, parseHTML: (element: HTMLElement) => element.getAttribute(`data-dsx-${htmlName}`), renderHTML: (attributes: Record<string, unknown>) => attributes[key] == null ? {} : { [`data-dsx-${htmlName}`]: attributes[key] } })\nconst canonicalUrl = (value: unknown) => { try { const url = new URL(String(value)); return url.protocol === 'https:' || url.protocol === 'http:' ? url.href : null } catch { return null } }\n\nconst ArticleImageExtension = Image.extend({\n addAttributes() { return { ...this.parent?.(), caption: { default: null, parseHTML: (element) => element.getAttribute('data-dsx-caption'), renderHTML: ({ caption }) => caption ? { 'data-dsx-caption': caption } : {} } } },\n})\nconst EmbedExtension = Node.create({ name: 'dsxEmbed', group: 'block', atom: true, addAttributes: () => ({ url: attribute('url') }), parseHTML: () => [{ tag: 'div[data-dsx-node=\"embed\"]' }], renderHTML: ({ HTMLAttributes }) => { const url = canonicalUrl(HTMLAttributes['data-dsx-url']); return ['div', { 'data-dsx-node': 'embed', ...(url ? { 'data-dsx-url': url } : { 'data-dsx-invalid': 'true' }) }] } })\nconst CalloutExtension = Node.create({ name: 'dsxCallout', group: 'block', content: 'block+', defining: true, addAttributes: () => ({ tone: attribute('tone', 'tone', 'info'), title: attribute('title') }), parseHTML: () => [{ tag: 'aside[data-dsx-node=\"callout\"]' }], renderHTML: ({ HTMLAttributes }) => ['aside', mergeAttributes({ 'data-dsx-node': 'callout' }, dataAttributes(HTMLAttributes)), 0] })\nconst ComparisonExtension = Node.create({ name: 'dsxComparison', group: 'block', atom: true, addAttributes: () => ({ beforeSrc: attribute('beforeSrc', 'before-src'), afterSrc: attribute('afterSrc', 'after-src'), beforeAlt: attribute('beforeAlt', 'before-alt', ''), afterAlt: attribute('afterAlt', 'after-alt', ''), beforeLabel: attribute('beforeLabel', 'before-label'), afterLabel: attribute('afterLabel', 'after-label') }), parseHTML: () => [{ tag: 'figure[data-dsx-node=\"comparison\"]' }], renderHTML: ({ HTMLAttributes }) => ['figure', mergeAttributes({ 'data-dsx-node': 'comparison' }, dataAttributes(HTMLAttributes))] })\nconst PollExtension = Node.create({ name: 'dsxPoll', group: 'block', atom: true, addAttributes: () => ({ pollId: attribute('pollId', 'poll-id'), question: attribute('question') }), parseHTML: () => [{ tag: 'div[data-dsx-node=\"poll\"]' }], renderHTML: ({ HTMLAttributes }) => ['div', mergeAttributes({ 'data-dsx-node': 'poll' }, dataAttributes(HTMLAttributes))] })\n\nfunction createArticleExtensions(): Extensions {\n
|
|
5
|
-
"mappings": "AAAA,SAAS,MAAM,uBAAwC;AACvD,OAAO,WAAW;AAClB,SAAS,OAAO,WAAW,aAAa,gBAAgB;AACxD,OAAO,uBAAuB;AAC9B,SAAS,QAAQ,sBAAsB;
|
|
4
|
+
"sourcesContent": ["import { Node, mergeAttributes, type Extensions } from '@tiptap/core'\nimport Image from '@tiptap/extension-image'\nimport { Table, TableCell, TableHeader, TableRow } from '@tiptap/extension-table'\nimport CodeBlockLowlight from '@tiptap/extension-code-block-lowlight'\nimport { common, createLowlight } from 'lowlight'\nimport { ReactNodeViewRenderer } from '@tiptap/react'\nimport { ArticleBlockView } from './articleNodeViews'\n\nconst lowlight = createLowlight(common)\nconst dataAttributes = (attributes: Record<string, unknown>) => Object.fromEntries(Object.entries(attributes).filter(([, value]) => value != null))\nconst attribute = (key: string, htmlName = key, defaultValue: unknown = null) => ({ default: defaultValue, parseHTML: (element: HTMLElement) => element.getAttribute(`data-dsx-${htmlName}`), renderHTML: (attributes: Record<string, unknown>) => attributes[key] == null ? {} : { [`data-dsx-${htmlName}`]: attributes[key] } })\nconst canonicalUrl = (value: unknown) => { try { const url = new URL(String(value)); return url.protocol === 'https:' || url.protocol === 'http:' ? url.href : null } catch { return null } }\n\nconst ArticleImageExtension = Image.extend({\n addAttributes() { return { ...this.parent?.(), mediaId: attribute('mediaId', 'media-id'), caption: { default: null, parseHTML: (element) => element.getAttribute('data-dsx-caption'), renderHTML: ({ caption }) => caption ? { 'data-dsx-caption': caption } : {} } } },\n})\nconst EmbedExtension = Node.create({ name: 'dsxEmbed', group: 'block', atom: true, addAttributes: () => ({ url: attribute('url') }), parseHTML: () => [{ tag: 'div[data-dsx-node=\"embed\"]' }], renderHTML: ({ HTMLAttributes }) => { const url = canonicalUrl(HTMLAttributes['data-dsx-url']); return ['div', { 'data-dsx-node': 'embed', ...(url ? { 'data-dsx-url': url } : { 'data-dsx-invalid': 'true' }) }] } })\nconst CalloutExtension = Node.create({ name: 'dsxCallout', group: 'block', content: 'block+', defining: true, addAttributes: () => ({ tone: attribute('tone', 'tone', 'info'), title: attribute('title') }), parseHTML: () => [{ tag: 'aside[data-dsx-node=\"callout\"]' }], renderHTML: ({ HTMLAttributes }) => ['aside', mergeAttributes({ 'data-dsx-node': 'callout' }, dataAttributes(HTMLAttributes)), 0] })\nconst ComparisonExtension = Node.create({ name: 'dsxComparison', group: 'block', atom: true, addAttributes: () => ({ beforeSrc: attribute('beforeSrc', 'before-src'), afterSrc: attribute('afterSrc', 'after-src'), beforeAlt: attribute('beforeAlt', 'before-alt', ''), afterAlt: attribute('afterAlt', 'after-alt', ''), beforeLabel: attribute('beforeLabel', 'before-label'), afterLabel: attribute('afterLabel', 'after-label') }), parseHTML: () => [{ tag: 'figure[data-dsx-node=\"comparison\"]' }], renderHTML: ({ HTMLAttributes }) => ['figure', mergeAttributes({ 'data-dsx-node': 'comparison' }, dataAttributes(HTMLAttributes))] })\nconst PollExtension = Node.create({ name: 'dsxPoll', group: 'block', atom: true, addAttributes: () => ({ pollId: attribute('pollId', 'poll-id'), question: attribute('question'), multiple: { default: false, parseHTML: element => element.getAttribute('data-dsx-multiple') === 'true', renderHTML: attrs => ({ 'data-dsx-multiple': String(attrs.multiple) }) }, options: { default: [], parseHTML: element => { try { return JSON.parse(element.getAttribute('data-dsx-options') ?? '[]') } catch { return [] } }, renderHTML: attrs => ({ 'data-dsx-options': JSON.stringify(attrs.options) }) } }), parseHTML: () => [{ tag: 'div[data-dsx-node=\"poll\"]' }], renderHTML: ({ HTMLAttributes }) => ['div', mergeAttributes({ 'data-dsx-node': 'poll' }, dataAttributes(HTMLAttributes))] })\n\nconst VideoExtension = Node.create({ name: 'dsxVideo', group: 'block', atom: true, addAttributes: () => ({ src: attribute('src'), caption: attribute('caption'), mediaId: attribute('mediaId', 'media-id') }), parseHTML: () => [{ tag: 'figure[data-dsx-node=\"video\"]' }], renderHTML: ({ HTMLAttributes }) => ['figure', mergeAttributes({ 'data-dsx-node': 'video' }, dataAttributes(HTMLAttributes))] })\nconst MaterialLinkExtension = Node.create({ name: 'dsxMaterialLink', group: 'block', atom: true, addAttributes: () => ({ materialId: attribute('materialId', 'material-id'), label: attribute('label'), href: attribute('href') }), parseHTML: () => [{ tag: 'div[data-dsx-node=\"material-link\"]' }], renderHTML: ({ HTMLAttributes }) => ['div', mergeAttributes({ 'data-dsx-node': 'material-link' }, dataAttributes(HTMLAttributes))] })\nconst PlatformTabsExtension = Node.create({ name: 'dsxTabs', group: 'block', content: 'dsxTab+', defining: true, parseHTML: () => [{ tag: 'div[data-dsx-node=\"tabs\"]' }], renderHTML: () => ['div', { 'data-dsx-node': 'tabs' }, 0] })\nconst PlatformTabExtension = Node.create({ name: 'dsxTab', content: 'block+', defining: true, addAttributes: () => ({ platform: attribute('platform'), label: attribute('label') }), parseHTML: () => [{ tag: 'section[data-dsx-node=\"tab\"]' }], renderHTML: ({ HTMLAttributes }) => ['section', mergeAttributes({ 'data-dsx-node': 'tab' }, dataAttributes(HTMLAttributes)), 0] })\n\nfunction createArticleExtensions({ editable = true }: { editable?: boolean } = {}): Extensions {\n const blocks = [ArticleImageExtension, EmbedExtension, CalloutExtension, ComparisonExtension, PollExtension, VideoExtension, MaterialLinkExtension, PlatformTabsExtension, PlatformTabExtension]\n return [...blocks.map(extension => editable ? extension.extend({ addNodeView: () => ReactNodeViewRenderer(ArticleBlockView) }) : extension), CodeBlockLowlight.configure({ lowlight }), Table.configure({ resizable: true }), TableRow, TableHeader, TableCell]\n}\n\nexport { ArticleImageExtension, CalloutExtension, ComparisonExtension, EmbedExtension, PollExtension, VideoExtension, MaterialLinkExtension, PlatformTabsExtension, PlatformTabExtension, createArticleExtensions }\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,MAAM,uBAAwC;AACvD,OAAO,WAAW;AAClB,SAAS,OAAO,WAAW,aAAa,gBAAgB;AACxD,OAAO,uBAAuB;AAC9B,SAAS,QAAQ,sBAAsB;AACvC,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;AAEjC,MAAM,WAAW,eAAe,MAAM;AACtC,MAAM,iBAAiB,CAAC,eAAwC,OAAO,YAAY,OAAO,QAAQ,UAAU,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,MAAM,SAAS,IAAI,CAAC;AAClJ,MAAM,YAAY,CAAC,KAAa,WAAW,KAAK,eAAwB,UAAU,EAAE,SAAS,cAAc,WAAW,CAAC,YAAyB,QAAQ,aAAa,YAAY,QAAQ,EAAE,GAAG,YAAY,CAAC,eAAwC,WAAW,GAAG,KAAK,OAAO,CAAC,IAAI,EAAE,CAAC,YAAY,QAAQ,EAAE,GAAG,WAAW,GAAG,EAAE,EAAE;AAChU,MAAM,eAAe,CAAC,UAAmB;AAAE,MAAI;AAAE,UAAM,MAAM,IAAI,IAAI,OAAO,KAAK,CAAC;AAAG,WAAO,IAAI,aAAa,YAAY,IAAI,aAAa,UAAU,IAAI,OAAO;AAAA,EAAK,QAAQ;AAAE,WAAO;AAAA,EAAK;AAAE;AAE5L,MAAM,wBAAwB,MAAM,OAAO;AAAA,EACzC,gBAAgB;AAAE,WAAO,EAAE,GAAG,KAAK,SAAS,GAAG,SAAS,UAAU,WAAW,UAAU,GAAG,SAAS,EAAE,SAAS,MAAM,WAAW,CAAC,YAAY,QAAQ,aAAa,kBAAkB,GAAG,YAAY,CAAC,EAAE,QAAQ,MAAM,UAAU,EAAE,oBAAoB,QAAQ,IAAI,CAAC,EAAE,EAAE;AAAA,EAAE;AACxQ,CAAC;AACD,MAAM,iBAAiB,KAA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