@instincthub/react-ui 0.1.63 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -3
- package/dist/_virtual/_rollupPluginBabelHelpers.js +2 -2
- package/dist/node_modules/.pnpm/@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/@tiptap_react@2.27.1_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_pm@2.27.1_react-dom_3687a02a33de69fe477ccd0d970063c0/node_modules/@tiptap/react/dist/index.js +3 -3
- package/dist/node_modules/.pnpm/@tiptap_react@2.27.1_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_pm@2.27.1_react-dom_3687a02a33de69fe477ccd0d970063c0/node_modules/@tiptap/react/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/align-center.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/align-center.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/align-left.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/align-left.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/align-right.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/align-right.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-down.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-down.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-left.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-left.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-right.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-right.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-up.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/arrow-up.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/ban.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/ban.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/baseline.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/baseline.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/download.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/download.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/file-text.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/file-text.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/film.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/film.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/grip-horizontal.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/grip-horizontal.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/heading-1.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/heading-1.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/heading.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/heading.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/highlighter.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/highlighter.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/lightbulb.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/lightbulb.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/link-2.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/link-2.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/monitor-play.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/monitor-play.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/mouse-pointer-click.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/mouse-pointer-click.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/music.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/music.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/paint-bucket.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/paint-bucket.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/palette.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/palette.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/panel-left.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/panel-left.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/panel-top.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/panel-top.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/paperclip.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/paperclip.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/refresh-cw.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/refresh-cw.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/remove-formatting.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/remove-formatting.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/settings-2.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/settings-2.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/square-chevron-right.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/square-chevron-right.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/type.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/type.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/upload.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/upload.js.map +1 -1
- package/dist/src/assets/css/ui/ihub-text-editor-blocks.css +951 -0
- package/dist/src/assets/css/ui/ui-index.css +1 -0
- package/dist/src/components/ui/ComponentLists.js +1 -1
- package/dist/src/components/ui/editor/ihub-editor/IHubTextEditor.js +1 -1
- package/dist/src/components/ui/editor/ihub-editor/blocks/BlockHandle.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/blocks/BlockHandle.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/blocks/BlockKeymap.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/blocks/BlockKeymap.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/blocks/blockLayout.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/blocks/blockLayout.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/blocks/blockOps.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/blocks/blockOps.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/blocks/useBlockDrag.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/blocks/useBlockDrag.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/components/BubbleToolbar.js +1 -1
- package/dist/src/components/ui/editor/ihub-editor/components/ColorPalette.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/components/ColorPalette.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/components/FloatingAddButton.js +1 -1
- package/dist/src/components/ui/editor/ihub-editor/components/SlashCommandMenu.js +1 -1
- package/dist/src/components/ui/editor/ihub-editor/components/TableToolbar.js +1 -1
- package/dist/src/components/ui/editor/ihub-editor/components/blocks/ButtonBlockView.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/components/blocks/ButtonBlockView.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/components/blocks/CalloutView.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/components/blocks/CalloutView.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/components/blocks/SectionBannerView.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/components/blocks/SectionBannerView.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/components/blocks/useDismiss.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/components/blocks/useDismiss.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/components/commandIcons.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/components/commandIcons.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/components/media/MediaBlockView.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/components/media/MediaBlockView.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/components/media/MediaPlaceholder.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/components/media/MediaPlaceholder.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/components/media/MediaPreview.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/components/media/MediaPreview.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/constants.js +1 -1
- package/dist/src/components/ui/editor/ihub-editor/constants.js.map +1 -1
- package/dist/src/components/ui/editor/ihub-editor/extensions/ButtonBlock.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/ButtonBlock.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/Callout.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/Callout.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/MediaBlock.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/MediaBlock.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/PreserveStyles.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/PreserveStyles.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/SectionBanner.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/SectionBanner.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/TableExtensions.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/TableExtensions.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/ToggleBlock.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/ToggleBlock.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/colorUtils.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/colorUtils.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/hooks/useIHubEditor.js +1 -1
- package/dist/src/components/ui/editor/ihub-editor/hooks/useMediaEmbed.js +1 -1
- package/dist/src/components/ui/editor/ihub-editor/hooks/useSurfaceClick.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/hooks/useSurfaceClick.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/table/TableControls.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/table/TableControls.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/table/TableLineMenu.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/table/TableLineMenu.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/table/tableOps.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/table/tableOps.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/table/useTableHover.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/table/useTableHover.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/types.js +1 -1
- package/dist/src/components/ui/editor/ihub-editor/types.js.map +1 -1
- package/dist/src/components/ui/editor/ihub-editor/upload/mediaKinds.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/upload/mediaKinds.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/upload/s3Direct.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/upload/s3Direct.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/upload/uploadFile.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/upload/uploadFile.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/upload/uploadRegistry.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/upload/uploadRegistry.js.map +1 -0
- package/dist/src/types/components/ui/editor/ihub-editor/IHubTextEditor.d.ts +1 -1
- package/dist/src/types/components/ui/editor/ihub-editor/blocks/BlockHandle.d.ts +16 -0
- package/dist/src/types/components/ui/editor/ihub-editor/blocks/BlockKeymap.d.ts +11 -0
- package/dist/src/types/components/ui/editor/ihub-editor/blocks/blockLayout.d.ts +37 -0
- package/dist/src/types/components/ui/editor/ihub-editor/blocks/blockOps.d.ts +45 -0
- package/dist/src/types/components/ui/editor/ihub-editor/blocks/useBlockDrag.d.ts +30 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/ColorPalette.d.ts +14 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/FloatingAddButton.d.ts +3 -2
- package/dist/src/types/components/ui/editor/ihub-editor/components/blocks/ButtonBlockView.d.ts +2 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/blocks/CalloutView.d.ts +2 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/blocks/SectionBannerView.d.ts +2 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/blocks/useDismiss.d.ts +3 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/commandIcons.d.ts +3 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/media/MediaBlockView.d.ts +6 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/media/MediaPlaceholder.d.ts +10 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/media/MediaPreview.d.ts +10 -0
- package/dist/src/types/components/ui/editor/ihub-editor/constants.d.ts +5 -1
- package/dist/src/types/components/ui/editor/ihub-editor/extensions/ButtonBlock.d.ts +21 -0
- package/dist/src/types/components/ui/editor/ihub-editor/extensions/Callout.d.ts +20 -0
- package/dist/src/types/components/ui/editor/ihub-editor/extensions/MediaBlock.d.ts +39 -0
- package/dist/src/types/components/ui/editor/ihub-editor/extensions/PreserveStyles.d.ts +6 -0
- package/dist/src/types/components/ui/editor/ihub-editor/extensions/SectionBanner.d.ts +15 -0
- package/dist/src/types/components/ui/editor/ihub-editor/extensions/TableExtensions.d.ts +14 -0
- package/dist/src/types/components/ui/editor/ihub-editor/extensions/ToggleBlock.d.ts +13 -0
- package/dist/src/types/components/ui/editor/ihub-editor/extensions/colorUtils.d.ts +14 -0
- package/dist/src/types/components/ui/editor/ihub-editor/hooks/useIHubEditor.d.ts +8 -2
- package/dist/src/types/components/ui/editor/ihub-editor/hooks/useMediaEmbed.d.ts +2 -1
- package/dist/src/types/components/ui/editor/ihub-editor/hooks/useSurfaceClick.d.ts +28 -0
- package/dist/src/types/components/ui/editor/ihub-editor/index.d.ts +1 -1
- package/dist/src/types/components/ui/editor/ihub-editor/table/TableControls.d.ts +9 -0
- package/dist/src/types/components/ui/editor/ihub-editor/table/TableLineMenu.d.ts +25 -0
- package/dist/src/types/components/ui/editor/ihub-editor/table/tableOps.d.ts +25 -0
- package/dist/src/types/components/ui/editor/ihub-editor/table/useTableHover.d.ts +25 -0
- package/dist/src/types/components/ui/editor/ihub-editor/types.d.ts +83 -2
- package/dist/src/types/components/ui/editor/ihub-editor/upload/mediaKinds.d.ts +32 -0
- package/dist/src/types/components/ui/editor/ihub-editor/upload/s3Direct.d.ts +5 -0
- package/dist/src/types/components/ui/editor/ihub-editor/upload/uploadFile.d.ts +19 -0
- package/dist/src/types/components/ui/editor/ihub-editor/upload/uploadRegistry.d.ts +15 -0
- package/dist/src/types/index.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -4
- package/dist/src/components/ui/editor/ihub-editor/extensions/ImageWithCaption.js +0 -2
- package/dist/src/components/ui/editor/ihub-editor/extensions/ImageWithCaption.js.map +0 -1
- package/dist/src/components/ui/editor/ihub-editor/hooks/useImageUpload.js +0 -2
- package/dist/src/components/ui/editor/ihub-editor/hooks/useImageUpload.js.map +0 -1
- package/dist/src/types/components/ui/editor/ihub-editor/components/ImageBlock.d.ts +0 -12
- package/dist/src/types/components/ui/editor/ihub-editor/extensions/ImageWithCaption.d.ts +0 -14
- package/dist/src/types/components/ui/editor/ihub-editor/hooks/useImageUpload.d.ts +0 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instincthub/react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "InstinctHub React UI components and assets in TypeScript",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"module": "dist/src/index.js",
|
|
@@ -102,11 +102,12 @@
|
|
|
102
102
|
"link-ui": "npm unlink @instincthub/react-ui && rm -rf dist && rollup -c && npm link",
|
|
103
103
|
"unlink-ui-linux": "npm unlink @instincthub/react-ui",
|
|
104
104
|
"link-ui-win": "npm unlink @instincthub/react-ui && rmdir /s /q dist && rollup -c && npm link",
|
|
105
|
-
"test": "
|
|
105
|
+
"test": "vitest run",
|
|
106
106
|
"yalc-link-ui": "rm -rf dist && rollup -c && yalc publish",
|
|
107
107
|
"yalc-link-ui-win": "rmdir /s /q dist && rollup -c && yalc publish",
|
|
108
108
|
"yalc-update-ui": "rmdir /s /q dist && rollup -c && yalc push",
|
|
109
|
-
"deploy": "pnpm rollup && pnpm publish --access public && vercel --prod"
|
|
109
|
+
"deploy": "pnpm rollup && pnpm publish --access public && vercel --prod",
|
|
110
|
+
"test:watch": "vitest"
|
|
110
111
|
},
|
|
111
112
|
"dependencies": {
|
|
112
113
|
"@tiptap/core": "^2.27.1",
|
|
@@ -132,6 +133,7 @@
|
|
|
132
133
|
"@tiptap/extension-typography": "^2.27.2",
|
|
133
134
|
"@tiptap/extension-underline": "^2.27.2",
|
|
134
135
|
"@tiptap/extension-youtube": "^2.27.2",
|
|
136
|
+
"@tiptap/pm": "^2.27.1",
|
|
135
137
|
"@tiptap/react": "^2.11.7",
|
|
136
138
|
"@tiptap/starter-kit": "^2.11.5",
|
|
137
139
|
"@tiptap/suggestion": "^2.27.2",
|
|
@@ -182,6 +184,7 @@
|
|
|
182
184
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
183
185
|
"@types/rollup-plugin-node-resolve": "^4.1.0",
|
|
184
186
|
"@types/styled-components": "^5.1.25",
|
|
187
|
+
"jsdom": "^26.1.0",
|
|
185
188
|
"postcss-import": "^16.1.0",
|
|
186
189
|
"recharts": "^2.15.3",
|
|
187
190
|
"rollup": "^2.75.6",
|
|
@@ -190,7 +193,8 @@
|
|
|
190
193
|
"rollup-plugin-postcss": "^4.0.2",
|
|
191
194
|
"rollup-plugin-terser": "^7.0.2",
|
|
192
195
|
"tslib": "^2.4.0",
|
|
193
|
-
"typescript": "^4.7.4"
|
|
196
|
+
"typescript": "^4.7.4",
|
|
197
|
+
"vitest": "^3.2.7"
|
|
194
198
|
},
|
|
195
199
|
"keywords": [
|
|
196
200
|
"css",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../../../_virtual/_rollupPluginBabelHelpers.js"),e=require("../../../../../../node_modules/.pnpm/@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js"),n=["src","alt","caption","alignment"],i=e.Node.create({name:"imageWithCaption",group:"block",content:"inline*",draggable:!0,addAttributes:function(){return{src:{default:null},alt:{default:null},caption:{default:""},alignment:{default:"center"}}},parseHTML:function(){return[{tag:"figure.ihub-te-image-block",getAttrs:function(t){var e=t.querySelector("img"),n=t.querySelector("figcaption");return{src:null==e?void 0:e.getAttribute("src"),alt:null==e?void 0:e.getAttribute("alt"),caption:(null==n?void 0:n.textContent)||""}}}]},renderHTML:function(i){var r=i.HTMLAttributes,a=r.src,o=r.alt,u=r.caption,l=r.alignment,c=t.objectWithoutProperties(r,n);return["figure",e.mergeAttributes(c,{class:"ihub-te-image-block ihub-te-image-".concat(l||"center")}),["img",{src:a,alt:o||""}],["figcaption",{class:"ihub-te-image-caption"},u||""]]},addCommands:function(){var t=this;return{setImageWithCaption:function(e){return function(n){return n.commands.insertContent({type:t.name,attrs:e,content:e.caption?[{type:"text",text:e.caption}]:[]})}}}}});exports.default=i;
|
|
2
|
-
//# sourceMappingURL=ImageWithCaption.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ImageWithCaption.js","sources":["../../../../../../../src/components/ui/editor/ihub-editor/extensions/ImageWithCaption.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n imageWithCaption: {\n setImageWithCaption: (options: {\n src: string;\n alt?: string;\n caption?: string;\n }) => ReturnType;\n };\n }\n}\n\nconst ImageWithCaption = Node.create({\n name: \"imageWithCaption\",\n group: \"block\",\n content: \"inline*\",\n draggable: true,\n\n addAttributes() {\n return {\n src: { default: null },\n alt: { default: null },\n caption: { default: \"\" },\n alignment: { default: \"center\" },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"figure.ihub-te-image-block\",\n getAttrs: (dom: HTMLElement) => {\n const img = dom.querySelector(\"img\");\n const figcaption = dom.querySelector(\"figcaption\");\n return {\n src: img?.getAttribute(\"src\"),\n alt: img?.getAttribute(\"alt\"),\n caption: figcaption?.textContent || \"\",\n };\n },\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }: any) {\n const { src, alt, caption, alignment, ...rest } = HTMLAttributes;\n return [\n \"figure\",\n mergeAttributes(rest, {\n class: `ihub-te-image-block ihub-te-image-${alignment || \"center\"}`,\n }),\n [\"img\", { src, alt: alt || \"\" }],\n [\"figcaption\", { class: \"ihub-te-image-caption\" }, caption || \"\"],\n ];\n },\n\n addCommands() {\n return {\n setImageWithCaption:\n (options: any) =>\n ({ commands }: any) => {\n return commands.insertContent({\n type: this.name,\n attrs: options,\n content: options.caption\n ? [{ type: \"text\", text: options.caption }]\n : [],\n });\n },\n };\n },\n});\n\nexport default ImageWithCaption;\n"],"names":["ImageWithCaption","Node","create","name","group","content","draggable","addAttributes","src","default","alt","caption","alignment","parseHTML","tag","getAttrs","dom","img","querySelector","figcaption","getAttribute","textContent","renderHTML","_ref","HTMLAttributes","rest","_objectWithoutProperties","objectWithoutProperties","_excluded","mergeAttributes","class","concat","addCommands","_this","this","setImageWithCaption","options","_ref2","commands","insertContent","type","attrs","text"],"mappings":"mTAcMA,EAAmBC,EAAIA,KAACC,OAAO,CACnCC,KAAM,mBACNC,MAAO,QACPC,QAAS,UACTC,WAAW,EAEXC,cAAa,WACX,MAAO,CACLC,IAAK,CAAEC,QAAS,MAChBC,IAAK,CAAED,QAAS,MAChBE,QAAS,CAAEF,QAAS,IACpBG,UAAW,CAAEH,QAAS,UAEzB,EAEDI,UAAS,WACP,MAAO,CACL,CACEC,IAAK,6BACLC,SAAU,SAACC,GACT,IAAMC,EAAMD,EAAIE,cAAc,OACxBC,EAAaH,EAAIE,cAAc,cACrC,MAAO,CACLV,IAAKS,aAAG,EAAHA,EAAKG,aAAa,OACvBV,IAAKO,aAAG,EAAHA,EAAKG,aAAa,OACvBT,SAASQ,aAAAA,EAAAA,EAAYE,cAAe,GAExC,GAGL,EAEDC,WAAAA,SAAUC,GAAwB,IAArBC,EAAcD,EAAdC,eACHhB,EAA0CgB,EAA1ChB,IAAKE,EAAqCc,EAArCd,IAAKC,EAAgCa,EAAhCb,QAASC,EAAuBY,EAAvBZ,UAAca,EAAIC,EAAAC,wBAAKH,EAAcI,GAChE,MAAO,CACL,SACAC,EAAeA,gBAACJ,EAAM,CACpBK,MAAA,qCAAAC,OAA4CnB,GAAa,YAE3D,CAAC,MAAO,CAAEJ,IAAAA,EAAKE,IAAKA,GAAO,KAC3B,CAAC,aAAc,CAAEoB,MAAO,yBAA2BnB,GAAW,IAEjE,EAEDqB,YAAW,WAAA,IAAAC,EAAAC,KACT,MAAO,CACLC,oBACE,SAACC,GAAY,OACb,SAAAC,GACE,OADSA,EAARC,SACeC,cAAc,CAC5BC,KAAMP,EAAK9B,KACXsC,MAAOL,EACP/B,QAAS+B,EAAQzB,QACb,CAAC,CAAE6B,KAAM,OAAQE,KAAMN,EAAQzB,UAC/B,KAEP,EAEP"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../../_virtual/_rollupPluginBabelHelpers.js"),r=require("react");exports.default=function(n){var t=n.editor,a=n.onImageUpload,i=n.enabled,o=void 0===i||i,u=r.useCallback(function(){var r=e.asyncToGenerator(e.regenerator().m(function r(n){var i,o;return e.regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t&&a){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,a(n);case 2:i=e.v,t.commands.setImageWithCaption({src:i,alt:n.name,caption:""}),e.n=4;break;case 3:e.p=3,o=e.v,console.error("Image upload failed:",o);case 4:return e.a(2)}},r,null,[[1,3]])}));return function(e){return r.apply(this,arguments)}}(),[t,a]),c=r.useCallback(function(){var e=document.createElement("input");e.type="file",e.accept="image/*",e.onchange=function(e){var r,n=null===(r=e.target.files)||void 0===r?void 0:r[0];n&&u(n)},e.click()},[u]);return r.useEffect(function(){if(t&&o&&a){var e=function(e,r){var n,t=null===(n=r.dataTransfer)||void 0===n?void 0:n.files;if(null==t||!t.length)return!1;var a=Array.from(t).filter(function(e){return e.type.startsWith("image/")});return 0!==a.length&&(r.preventDefault(),a.forEach(function(e){return u(e)}),!0)};t.view.dom.addEventListener("drop",e);var r=function(e){var r=e.detail;(null==r?void 0:r.editor)===t&&c()};return document.addEventListener("ihub-editor-insert-image",r),function(){t.view.dom.removeEventListener("drop",e),document.removeEventListener("ihub-editor-insert-image",r)}}},[t,o,a,u,c]),{insertImage:u,openFilePicker:c}};
|
|
2
|
-
//# sourceMappingURL=useImageUpload.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useImageUpload.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
interface ImageBlockProps {
|
|
2
|
-
src: string;
|
|
3
|
-
alt?: string;
|
|
4
|
-
caption?: string;
|
|
5
|
-
alignment?: string;
|
|
6
|
-
onUpdateCaption?: (caption: string) => void;
|
|
7
|
-
onUpdateAlignment?: (alignment: string) => void;
|
|
8
|
-
onDelete?: () => void;
|
|
9
|
-
selected?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export default function ImageBlock({ src, alt, caption, alignment, onUpdateCaption, onUpdateAlignment, onDelete, selected, }: ImageBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Node } from "@tiptap/core";
|
|
2
|
-
declare module "@tiptap/core" {
|
|
3
|
-
interface Commands<ReturnType> {
|
|
4
|
-
imageWithCaption: {
|
|
5
|
-
setImageWithCaption: (options: {
|
|
6
|
-
src: string;
|
|
7
|
-
alt?: string;
|
|
8
|
-
caption?: string;
|
|
9
|
-
}) => ReturnType;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
declare const ImageWithCaption: Node<any, any>;
|
|
14
|
-
export default ImageWithCaption;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Editor } from "@tiptap/react";
|
|
2
|
-
interface UseImageUploadOptions {
|
|
3
|
-
editor: Editor | null;
|
|
4
|
-
onImageUpload?: (file: File) => Promise<string>;
|
|
5
|
-
enabled?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export default function useImageUpload({ editor, onImageUpload, enabled, }: UseImageUploadOptions): {
|
|
8
|
-
insertImage: (file: File) => Promise<void>;
|
|
9
|
-
openFilePicker: () => void;
|
|
10
|
-
};
|
|
11
|
-
export {};
|