@zjlab-fe/data-hub-ui 0.21.7 → 0.23.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/es/assets/cardImg.png.js +3 -0
- package/es/assets/closeBtn.png.js +3 -0
- package/es/assets/icon-tag-header.png.js +3 -0
- package/es/assets/source.png.js +3 -0
- package/es/components/FileUploader/FileUploadModal.js +23 -0
- package/es/components/FileUploader/FileUploader.js +20 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploader.js +34 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderContextProvider.js +46 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderFileReceiver.css.js +36 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderFileReceiver.js +56 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderFileReceiverContainer.js +24 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderFileReceiverDesc.js +9 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderList.js +46 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderListItem.js +46 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderListItemFail.js +21 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderListItemPaused.js +20 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderListItemUploading.js +43 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderlListItemFinished.js +32 -0
- package/es/components/FileUploader/Locale/translations.js +52 -0
- package/es/components/FileUploader/Locale/useTranslate.js +16 -0
- package/es/components/FileUploader/UploadStoreProvider/UploadStoreProvider.js +31 -0
- package/es/components/FileUploader/UploadStoreProvider/uploadStoreReducer.js +62 -0
- package/es/components/FileUploader/UploadStoreProvider/useOnFileAllUploaded.js +31 -0
- package/es/components/FileUploader/UploadStoreProvider/useSaveUnfinishedUploads.js +42 -0
- package/es/components/FileUploader/UploadStoreProvider/useSetupMergingEvent.js +45 -0
- package/es/components/FileUploader/hooks/useCancelUpload.js +40 -0
- package/es/components/FileUploader/hooks/useCurrentFile.js +61 -0
- package/es/components/FileUploader/hooks/useCurrentFileOnUploading.js +52 -0
- package/es/components/FileUploader/hooks/useCurrentFileSetupAndBackUp.js +39 -0
- package/es/components/FileUploader/hooks/useFormatFiles.js +64 -0
- package/es/components/FileUploader/hooks/useFormatFilesFindDuplicates.js +75 -0
- package/es/components/FileUploader/hooks/useFormatFilesRemoveDuplicates.js +21 -0
- package/es/components/FileUploader/hooks/useHandleChunkCompletion.js +31 -0
- package/es/components/FileUploader/hooks/useOnMounted.js +24 -0
- package/es/components/FileUploader/hooks/useOnMountedResumeUnfinished.js +58 -0
- package/es/components/FileUploader/hooks/useRetryUpload.js +33 -0
- package/es/components/FileUploader/hooks/useUploadChunk.js +46 -0
- package/es/components/FileUploader/icons/CloseFilled.js +7 -0
- package/es/components/FileUploader/icons/UnkownFileIcon.js +7 -0
- package/es/components/FileUploader/icons/UploadIcon.js +7 -0
- package/es/components/FileUploader/index.css.js +532 -0
- package/es/components/FileUploader/index.js +20 -0
- package/es/components/FileUploader/types.js +13 -0
- package/es/components/FileUploader/utils/calcDisplaySize.js +20 -0
- package/es/components/FileUploader/utils/checkExpiryTime.js +15 -0
- package/es/components/FileUploader/utils/createFileToUpload.js +60 -0
- package/es/components/FileUploader/utils/fileDB/addFilesToIndexdb.js +14 -0
- package/es/components/FileUploader/utils/fileDB/deleteFileInStore.js +18 -0
- package/es/components/FileUploader/utils/fileDB/deleteObjectStore.js +25 -0
- package/es/components/FileUploader/utils/fileDB/index.js +77 -0
- package/es/components/FileUploader/utils/fileDB/openDBAndRetrieveData.js +90 -0
- package/es/components/FileUploader/utils/fileDB/retrieveExistingData.js +49 -0
- package/es/components/FileUploader/utils/modalConfig.css.js +20 -0
- package/es/components/FileUploader/utils/modalConfig.js +32 -0
- package/es/components/FileUploader/utils/retrieveAllFiles.js +70 -0
- package/es/components/FileUploader/utils/splitFileIntoChunk.js +15 -0
- package/es/components/SDK-modal/document-link.js +8 -0
- package/es/components/SDK-modal/index.js +25 -0
- package/es/components/SDK-modal/index.module.scss.js +49 -0
- package/es/components/SDK-modal/inner-modal.js +59 -0
- package/es/components/SDK-modal/locale/translations.js +17 -0
- package/es/components/apply-perm-modal/index.js +53 -0
- package/es/components/apply-perm-modal/index.module.scss.js +96 -0
- package/es/components/auth-tag/index.js +23 -0
- package/es/components/bench-card/index.js +20 -0
- package/es/components/bench-card/index.module.scss.js +48 -0
- package/es/components/confirm-again/index.js +14 -0
- package/es/components/confirm-again/index.scss.js +37 -0
- package/es/components/copy/index.js +41 -0
- package/es/components/copy/index.module.scss.js +15 -0
- package/es/components/corpus-card/index.js +88 -0
- package/es/components/corpus-card/index.module.scss.js +171 -0
- package/es/components/feature-card/classNames.js +72 -0
- package/es/components/feature-card/components.js +48 -0
- package/es/components/feature-card/context.js +13 -0
- package/es/components/feature-card/index.css.js +655 -0
- package/es/components/feature-card/index.js +47 -0
- package/es/components/file-preview/data-table/index.js +94 -0
- package/es/components/file-preview/data-table/index.module.scss.js +54 -0
- package/es/components/file-preview/excel-preview/index.js +132 -0
- package/es/components/file-preview/excel-preview/index.module.scss.js +11 -0
- package/es/components/file-preview/excel-preview/utils.js +46 -0
- package/es/components/file-preview/img-preview/index.js +18 -0
- package/es/components/file-preview/img-preview/index.module.scss.js +17 -0
- package/es/components/file-preview/index.js +124 -0
- package/es/components/file-preview/index.module.scss.js +32 -0
- package/es/components/file-preview/json-preview/index.js +166 -0
- package/es/components/file-preview/markdown-preview/index.js +53 -0
- package/es/components/file-preview/markdown-preview/index.module.scss.js +1055 -0
- package/es/components/file-preview/parquet-preview/index.js +54 -0
- package/es/components/file-preview/pdf-preview/index.js +215 -0
- package/es/components/file-preview/pdf-preview/index.module.scss.js +16 -0
- package/es/components/file-preview/table-preview/index.js +43 -0
- package/es/components/file-preview/table-preview/index.module.scss.js +11 -0
- package/es/components/file-preview/txt-preview/index.js +24 -0
- package/es/components/file-preview/util.js +94 -0
- package/es/components/file-uploader/components/circle-progress.css.js +39 -0
- package/es/components/file-uploader/components/circle-progress.js +11 -0
- package/es/components/file-uploader/components/hooks/use-drop-zone.js +74 -0
- package/es/components/file-uploader/components/hooks/use-file-validation.js +52 -0
- package/es/components/file-uploader/components/icons.js +19 -0
- package/es/components/file-uploader/components/theme.css.js +64 -0
- package/es/components/file-uploader/components/uploader-drop-zone.css.js +66 -0
- package/es/components/file-uploader/components/uploader-drop-zone.js +72 -0
- package/es/components/file-uploader/components/uploader-file-item.css.js +186 -0
- package/es/components/file-uploader/components/uploader-file-item.js +61 -0
- package/es/components/file-uploader/components/uploader-file-list.css.js +43 -0
- package/es/components/file-uploader/components/uploader-file-list.js +25 -0
- package/es/components/file-uploader/components/uploader.css.js +20 -0
- package/es/components/file-uploader/components/uploader.js +49 -0
- package/es/components/file-uploader/components/uploading-status.css.js +52 -0
- package/es/components/file-uploader/components/uploading-status.js +53 -0
- package/es/components/file-uploader/components/utils/directory-reader.js +65 -0
- package/es/components/file-uploader/constants.js +31 -0
- package/es/components/file-uploader/context/action-registry.js +69 -0
- package/es/components/file-uploader/context/file-state-store.js +83 -0
- package/es/components/file-uploader/context/handler-registry.js +119 -0
- package/es/components/file-uploader/context/upload-context.js +36 -0
- package/es/components/file-uploader/context/upload-provider.js +77 -0
- package/es/components/file-uploader/context/upload-reducer.js +21 -0
- package/es/components/file-uploader/context/use-upload-engine.js +440 -0
- package/es/components/file-uploader/engine/queue-callbacks.js +257 -0
- package/es/components/file-uploader/engine/queue-manager.js +195 -0
- package/es/components/file-uploader/engine/queue-uploader.js +25 -0
- package/es/components/file-uploader/hooks/use-upload.js +327 -0
- package/es/components/file-uploader/utils/chunk-handlers.js +66 -0
- package/es/components/file-uploader/utils/ensure-handlers.js +53 -0
- package/es/components/file-uploader/utils/error-handler.js +84 -0
- package/es/components/file-uploader/utils/upload-controllers.js +43 -0
- package/es/components/file-uploader/utils/upload-handler.js +68 -0
- package/es/components/file-uploader/utils/validate-handlers.js +16 -0
- package/es/components/floating-label-input/index.js +46 -0
- package/es/components/floating-label-input/index.module.scss.js +30 -0
- package/es/components/floating-layer/index.js +14 -0
- package/es/components/floating-layer/index.scss.js +31 -0
- package/es/components/header/index.js +10 -0
- package/es/components/header/index.module.scss.js +16 -0
- package/es/components/input-tag/index.js +65 -0
- package/es/components/menu/index.js +96 -0
- package/es/components/menu/index.module.scss.js +188 -0
- package/es/components/model-card/index.js +20 -0
- package/es/components/model-card/index.module.scss.js +116 -0
- package/es/components/notion-editor/code-block/index.js +18 -0
- package/es/components/notion-editor/code-block/languageDetector.js +134 -0
- package/es/components/notion-editor/code-block/languages.js +42 -0
- package/es/components/notion-editor/index.js +257 -0
- package/es/components/notion-editor/index.scss.js +421 -0
- package/es/components/notion-editor/parseMarkdown.js +184 -0
- package/es/components/operator-chain/components/AddButton.js +20 -0
- package/es/components/operator-chain/components/IOCard.js +8 -0
- package/es/components/operator-chain/components/SingleCard.js +12 -0
- package/es/components/operator-chain/components/VirtualDropdown.js +56 -0
- package/es/components/operator-chain/index.js +83 -0
- package/es/components/operator-chain/index.module.scss.js +232 -0
- package/es/components/permission-editor/index.js +9 -0
- package/es/components/permission-editor/permissionEditModal/index.js +37 -0
- package/es/components/permission-editor/permissionEditor/index.js +253 -0
- package/es/components/permission-editor/permissionEditor/index.module.scss.js +22 -0
- package/es/components/permission-editor/permissionViewPopover/index.js +9 -0
- package/es/components/popover-select/index.js +42 -0
- package/es/components/popover-select/index.module.scss.js +22 -0
- package/es/components/radio-card/index.js +23 -0
- package/es/components/radio-card/index.scss.js +58 -0
- package/es/components/section-heading/classNames.js +22 -0
- package/es/components/section-heading/components.js +27 -0
- package/es/components/section-heading/context.js +13 -0
- package/es/components/section-heading/index.css.js +648 -0
- package/es/components/section-heading/index.js +36 -0
- package/es/components/status-tag/index.js +31 -0
- package/es/components/tag-group-filter/dataSizeFilter.js +100 -0
- package/es/components/tag-group-filter/index.js +53 -0
- package/es/components/tag-group-filter/index.module.scss.js +134 -0
- package/es/components/tag-group-filter/tagFilter.js +19 -0
- package/es/components/tag-view/index.js +138 -0
- package/es/components/tag-view/index.module.scss.js +56 -0
- package/es/components/tag-view/useSize.js +41 -0
- package/es/components/tip-tap/bubble-menu.js +47 -0
- package/es/components/tip-tap/editor.js +34 -0
- package/es/components/tip-tap/extensions/index.js +133 -0
- package/es/components/tip-tap/extensions/markdown-paste.js +148 -0
- package/es/components/tip-tap/icons/index.js +29 -0
- package/es/components/tip-tap/reader.js +15 -0
- package/es/components/tip-tap/styles/editor.css.js +863 -0
- package/es/components/tip-tap/toolbar/components/color-picker.js +76 -0
- package/es/components/tip-tap/toolbar/components/heading-dropdown.js +44 -0
- package/es/components/tip-tap/toolbar/components/image-button.js +26 -0
- package/es/components/tip-tap/toolbar/components/link-button.js +107 -0
- package/es/components/tip-tap/toolbar/components/table-button.js +37 -0
- package/es/components/tip-tap/toolbar/components/toolbar-button.js +7 -0
- package/es/components/tip-tap/toolbar/index.js +39 -0
- package/es/components/uploadDrawer/UploadStoreProvider.js +61 -0
- package/es/components/uploadDrawer/fileUploadDrawer.js +66 -0
- package/es/components/uploadDrawer/fileUploadDrawerFileDragger.js +71 -0
- package/es/components/uploadDrawer/fileUploadDrawerList.js +54 -0
- package/es/components/uploadDrawer/fileUploadDrawerListProgressButton.js +54 -0
- package/es/components/uploadDrawer/hooks/useCancelUpload.js +37 -0
- package/es/components/uploadDrawer/hooks/useFilterFiles.js +107 -0
- package/es/components/uploadDrawer/hooks/useFinishUpload.js +33 -0
- package/es/components/uploadDrawer/hooks/useFormatFiles.js +54 -0
- package/es/components/uploadDrawer/hooks/useProgressButtonRef.js +22 -0
- package/es/components/uploadDrawer/hooks/useRemoveFilesInUploadQueue.js +21 -0
- package/es/components/uploadDrawer/hooks/useResumeUnfinishedUploads.js +52 -0
- package/es/components/uploadDrawer/hooks/useRetryUpload.js +35 -0
- package/es/components/uploadDrawer/hooks/useSaveUnfinishedUploads.js +42 -0
- package/es/components/uploadDrawer/hooks/useSetupUpload.js +80 -0
- package/es/components/uploadDrawer/hooks/useUploadFileToOSS.js +23 -0
- package/es/components/uploadDrawer/index.css.js +511 -0
- package/es/components/uploadDrawer/index.js +42 -0
- package/es/components/uploadDrawer/utils/calcDisplaySize.js +19 -0
- package/es/components/uploadDrawer/utils/constant.js +16 -0
- package/es/components/uploadDrawer/utils/createFileToUpload.js +51 -0
- package/es/components/uploadDrawer/utils/fileDB/deleteFileInStore.js +28 -0
- package/es/components/uploadDrawer/utils/fileDB/deleteObjectStore.js +28 -0
- package/es/components/uploadDrawer/utils/fileDB/handleAddFilesToDB.js +37 -0
- package/es/components/uploadDrawer/utils/fileDB/index.js +9 -0
- package/es/components/uploadDrawer/utils/fileDB/openDB.js +111 -0
- package/es/components/uploadDrawer/utils/retrieveAllFiles.js +110 -0
- package/es/components/uploadDrawer/utils/shouldCreateNewFile.js +13 -0
- package/es/components/uploadDrawer/utils/splitFileIntoChunk.js +15 -0
- package/es/index.js +40 -1
- package/es/lib/utils.js +8 -0
- package/lib/index.js +1 -1
- package/package.json +33 -6
- package/rollup.es.config.mjs +177 -0
- package/tsconfig.rollup.json +7 -0
- package/dist/types/components/FileUploader/FileUploaderContextProvider.d.ts +0 -9
- package/dist/types/components/FileUploader/FileUploaderFileDragger.d.ts +0 -11
- package/dist/types/components/FileUploader/FileUploaderFileDraggerDragAreaDescription.d.ts +0 -4
- package/dist/types/components/FileUploader/FileUploaderList.d.ts +0 -1
- package/dist/types/components/FileUploader/FileUploaderListItem.d.ts +0 -26
- package/dist/types/components/FileUploader/FileUploaderListItemFail.d.ts +0 -5
- package/dist/types/components/FileUploader/FileUploaderListItemPaused.d.ts +0 -5
- package/dist/types/components/FileUploader/FileUploaderListItemUploading.d.ts +0 -2
- package/dist/types/components/FileUploader/FileUploaderMain.d.ts +0 -7
- package/dist/types/components/FileUploader/FileUploaderlListItemFinished.d.ts +0 -5
- package/dist/types/components/FileUploader/UploadStoreProvider.d.ts +0 -41
- package/dist/types/components/FileUploader/hooks/useCheckForDuplicates.d.ts +0 -1
- package/dist/types/components/FileUploader/hooks/useCurrentFIleOnInit.d.ts +0 -5
- package/dist/types/components/FileUploader/hooks/useCurrentFileOnAllUploaded.d.ts +0 -1
- package/dist/types/components/FileUploader/hooks/useCurrentFileOnCancel.d.ts +0 -2
- package/dist/types/components/FileUploader/hooks/useCurrentFileOnFail.d.ts +0 -2
- package/dist/types/components/FileUploader/hooks/useCurrentFileOnFinished.d.ts +0 -2
- package/dist/types/components/FileUploader/hooks/useFileDragAndDrop.d.ts +0 -9
- package/dist/types/components/FileUploader/hooks/useRemoveFilesInUploadQueue.d.ts +0 -1
- package/dist/types/components/FileUploader/hooks/useResumeUnfinishedUploads.d.ts +0 -1
- package/dist/types/components/FileUploader/hooks/useSaveUnfinishedUploads.d.ts +0 -11
- package/dist/types/components/FileUploader/hooks/useTranslate.d.ts +0 -1
- package/dist/types/components/FileUploader/hooks/useUploadContext.d.ts +0 -26
- package/dist/types/components/FileUploader/hooks/useWathUploadQueueAndSetupCurrentFile.d.ts +0 -1
- package/dist/types/components/FileUploader/translations.d.ts +0 -4
- package/dist/types/components/file-uploader/hooks/use-upload-batch.d.ts +0 -36
- package/dist/types/components/file-uploader/hooks/use-upload-control.d.ts +0 -37
- package/dist/types/components/file-uploader/hooks/use-upload-files.d.ts +0 -40
- package/dist/types/components/file-uploader/hooks/use-upload-operations.d.ts +0 -43
- package/dist/types/components/tip-tap/actions/BoldItalicStrikeUnderline.d.ts +0 -4
- package/dist/types/components/tip-tap/actions/CodeQuoteHorizontalRule.d.ts +0 -4
- package/dist/types/components/tip-tap/actions/Image.d.ts +0 -4
- package/dist/types/components/tip-tap/actions/Link.d.ts +0 -5
- package/dist/types/components/tip-tap/actions/LinkModifier.d.ts +0 -4
- package/dist/types/components/tip-tap/actions/List.d.ts +0 -4
- package/dist/types/components/tip-tap/actions/ParagraphHeadings.d.ts +0 -13
- package/dist/types/components/tip-tap/actions/Table.d.ts +0 -4
- package/dist/types/components/tip-tap/actions/TextAligment.d.ts +0 -4
- package/dist/types/components/tip-tap/actions/UndoRedo.d.ts +0 -4
- package/dist/types/components/tip-tap/actions/action-image.d.ts +0 -4
- package/dist/types/components/tip-tap/actions/action-link.d.ts +0 -5
- package/dist/types/components/tip-tap/actions/action-list.d.ts +0 -4
- package/dist/types/components/tip-tap/actions/action-table.d.ts +0 -4
- package/dist/types/components/tip-tap/actions/bold-italic-strike-underline.d.ts +0 -4
- package/dist/types/components/tip-tap/actions/code-quote-horizontalRule.d.ts +0 -4
- package/dist/types/components/tip-tap/actions/highlight-textcolor-fontsize.d.ts +0 -4
- package/dist/types/components/tip-tap/actions/link-modifier.d.ts +0 -4
- package/dist/types/components/tip-tap/actions/paragraph-headings.d.ts +0 -13
- package/dist/types/components/tip-tap/actions/text-aligment.d.ts +0 -4
- package/dist/types/components/tip-tap/actions/undo-redo.d.ts +0 -4
- package/dist/types/components/tip-tap/extensions/DropHandler.d.ts +0 -2
- package/dist/types/components/tip-tap/extensions/FontSize.d.ts +0 -20
- package/dist/types/components/tip-tap/extensions/PatseHandler.d.ts +0 -3
- package/dist/types/components/tip-tap/extensions/drop-handler.d.ts +0 -2
- package/dist/types/components/tip-tap/extensions/font-size.d.ts +0 -20
- package/dist/types/components/tip-tap/extensions/patse-handler.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/HumbleiconsAlignTextCenter.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/HumbleiconsAlignTextJustify.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/HumbleiconsAlignTextLeft.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/HumbleiconsAlignTextRight.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsAddLink.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsAddPhotoAlternateOutline.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsCode.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsEditOutline.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsFormatColorText.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsFormatH1.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsFormatH2.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsFormatH3.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsFormatH4.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsFormatH5.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsFormatH6.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsFormatInkHighlighterOutlineSharp.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsFormatListBulleted.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsFormatListNumbered.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsFormatParagraph.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsFormatQuote.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsHorizontalRule.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsLinkOff.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsRedo.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsTable.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MaterialSymbolsUndo.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MdiCodeBlockTags.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MdiFormatBold.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MdiFormatItalic.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MdiFormatStrikethroughVariant.d.ts +0 -3
- package/dist/types/components/tip-tap/icons/MdiFormatUnderline.d.ts +0 -3
- package/dist/types/components/tip-tap/menus/BubbleMenu.d.ts +0 -7
- package/dist/types/components/tip-tap/menus/FixedMenu.d.ts +0 -9
- package/dist/types/components/tip-tap/menus/LinkFloatingMenu.d.ts +0 -6
- package/dist/types/components/tip-tap/menus/ParagraphFloatingMenu.d.ts +0 -6
- package/dist/types/components/tip-tap/menus/bubble-menu.d.ts +0 -7
- package/dist/types/components/tip-tap/menus/fixed-menu.d.ts +0 -9
- package/dist/types/components/tip-tap/menus/link-floating-menu.d.ts +0 -6
- package/dist/types/components/tip-tap/menus/paragraph-floating-menu.d.ts +0 -6
- package/dist/types/components/tip-tap/the-editor.d.ts +0 -4
- package/dist/types/components/tip-tap/utils/add-image-to-editor.d.ts +0 -2
- package/dist/types/components/tip-tap/utils/addImageToEditor.d.ts +0 -2
- package/dist/types/components/tip-tap/utils/markdown-detector.d.ts +0 -33
- package/dist/types/components/tip-tap/utils/parse-markdown.d.ts +0 -2
- package/dist/types/components/tip-tap/utils/parseMarkDown.d.ts +0 -2
- package/dist/types/components/tip-tap-2/demo/index.d.ts +0 -1
- package/dist/types/components/tip-tap-2/index.d.ts +0 -26
- package/dist/types/demo/layout/index.d.ts +0 -2
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
var style = document.createElement('style');
|
|
2
|
+
style.textContent = `.data-hub-ui-blocknote-editor-wrapper {
|
|
3
|
+
position: relative;
|
|
4
|
+
display: grid;
|
|
5
|
+
grid-template-columns: minmax(0, 1fr) var(--blocknote-toc-width, 240px);
|
|
6
|
+
gap: 24px;
|
|
7
|
+
align-items: start;
|
|
8
|
+
background: #ffffff;
|
|
9
|
+
border-radius: 8px;
|
|
10
|
+
padding: 0 48px;
|
|
11
|
+
font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
|
|
12
|
+
}
|
|
13
|
+
.data-hub-ui-blocknote-editor-wrapper div,
|
|
14
|
+
.data-hub-ui-blocknote-editor-wrapper ul,
|
|
15
|
+
.data-hub-ui-blocknote-editor-wrapper ol,
|
|
16
|
+
.data-hub-ui-blocknote-editor-wrapper main,
|
|
17
|
+
.data-hub-ui-blocknote-editor-wrapper nav {
|
|
18
|
+
scrollbar-width: thin;
|
|
19
|
+
scrollbar-color: #eaeaea transparent;
|
|
20
|
+
}
|
|
21
|
+
.data-hub-ui-blocknote-editor-wrapper.is-toc-collapsed {
|
|
22
|
+
--blocknote-toc-width: 42px;
|
|
23
|
+
}
|
|
24
|
+
.data-hub-ui-blocknote-toc {
|
|
25
|
+
position: sticky;
|
|
26
|
+
top: 10px;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
width: 240px;
|
|
30
|
+
max-height: 560px;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
color: #334155;
|
|
33
|
+
font-size: 13px;
|
|
34
|
+
}
|
|
35
|
+
.data-hub-ui-blocknote-toc.is-collapsed {
|
|
36
|
+
width: 42px;
|
|
37
|
+
}
|
|
38
|
+
.data-hub-ui-blocknote-toc__toggle {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-shrink: 0;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: space-between;
|
|
43
|
+
width: 100%;
|
|
44
|
+
height: 32px;
|
|
45
|
+
padding: 0 10px;
|
|
46
|
+
color: #475569;
|
|
47
|
+
font: inherit;
|
|
48
|
+
font-weight: 600;
|
|
49
|
+
background: #f8fafc;
|
|
50
|
+
border: 1px solid #e2e8f0;
|
|
51
|
+
border-radius: 6px;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
|
|
54
|
+
}
|
|
55
|
+
.data-hub-ui-blocknote-toc__toggle:hover {
|
|
56
|
+
color: #2563eb;
|
|
57
|
+
background: #f3f8ff;
|
|
58
|
+
border-color: #bfdbfe;
|
|
59
|
+
}
|
|
60
|
+
.data-hub-ui-blocknote-toc.is-collapsed .data-hub-ui-blocknote-toc__toggle {
|
|
61
|
+
justify-content: center;
|
|
62
|
+
padding: 0;
|
|
63
|
+
}
|
|
64
|
+
.data-hub-ui-blocknote-toc.is-collapsed .data-hub-ui-blocknote-toc__toggle > span:first-child {
|
|
65
|
+
display: none;
|
|
66
|
+
}
|
|
67
|
+
.data-hub-ui-blocknote-toc__toggle-icon {
|
|
68
|
+
color: #94a3b8;
|
|
69
|
+
font-size: 18px;
|
|
70
|
+
line-height: 1;
|
|
71
|
+
}
|
|
72
|
+
.data-hub-ui-blocknote-toc__list {
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
flex: 1;
|
|
76
|
+
gap: 2px;
|
|
77
|
+
min-height: 0;
|
|
78
|
+
max-height: 516px;
|
|
79
|
+
margin-top: 8px;
|
|
80
|
+
padding: 4px 0 4px 8px;
|
|
81
|
+
overflow-y: auto;
|
|
82
|
+
overflow-x: hidden;
|
|
83
|
+
border-left: 1px solid #e2e8f0;
|
|
84
|
+
}
|
|
85
|
+
.data-hub-ui-blocknote-toc__item {
|
|
86
|
+
display: block;
|
|
87
|
+
flex-shrink: 0;
|
|
88
|
+
width: 100%;
|
|
89
|
+
padding: 5px 8px 5px calc((var(--toc-level) - 1) * 10px + 8px);
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
color: #64748b;
|
|
92
|
+
font: inherit;
|
|
93
|
+
line-height: 1.45;
|
|
94
|
+
text-align: left;
|
|
95
|
+
text-overflow: ellipsis;
|
|
96
|
+
white-space: nowrap;
|
|
97
|
+
background: transparent;
|
|
98
|
+
border: 0;
|
|
99
|
+
border-radius: 4px;
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
transition: color 0.15s ease, background 0.15s ease;
|
|
102
|
+
}
|
|
103
|
+
.data-hub-ui-blocknote-toc__item:hover {
|
|
104
|
+
color: #2563eb;
|
|
105
|
+
background: #eff6ff;
|
|
106
|
+
}
|
|
107
|
+
@media (max-width: 960px) {
|
|
108
|
+
.data-hub-ui-blocknote-editor-wrapper {
|
|
109
|
+
display: block;
|
|
110
|
+
padding: 16px 24px;
|
|
111
|
+
}
|
|
112
|
+
.data-hub-ui-blocknote-toc {
|
|
113
|
+
position: sticky;
|
|
114
|
+
top: 0;
|
|
115
|
+
right: auto;
|
|
116
|
+
width: 100%;
|
|
117
|
+
max-height: none;
|
|
118
|
+
margin-bottom: 12px;
|
|
119
|
+
background: #ffffff;
|
|
120
|
+
}
|
|
121
|
+
.data-hub-ui-blocknote-toc.is-collapsed {
|
|
122
|
+
width: 42px;
|
|
123
|
+
}
|
|
124
|
+
.data-hub-ui-blocknote-toc__list {
|
|
125
|
+
max-height: 220px;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
.data-hub-ui-blocknote-editor .bn-editor {
|
|
129
|
+
padding: 12px 0;
|
|
130
|
+
min-height: 200px;
|
|
131
|
+
outline: none;
|
|
132
|
+
color: #37352f;
|
|
133
|
+
font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
|
|
134
|
+
font-size: 16px;
|
|
135
|
+
line-height: 1.72;
|
|
136
|
+
}
|
|
137
|
+
.data-hub-ui-blocknote-editor .bn-block-content {
|
|
138
|
+
color: inherit;
|
|
139
|
+
}
|
|
140
|
+
.data-hub-ui-blocknote-editor .bn-inline-content {
|
|
141
|
+
line-height: inherit;
|
|
142
|
+
}
|
|
143
|
+
.data-hub-ui-blocknote-editor p {
|
|
144
|
+
margin: 0;
|
|
145
|
+
}
|
|
146
|
+
.data-hub-ui-blocknote-editor h1 {
|
|
147
|
+
margin: 0;
|
|
148
|
+
color: #2f2e2a;
|
|
149
|
+
font-size: 30px;
|
|
150
|
+
font-weight: 700;
|
|
151
|
+
line-height: 1.25;
|
|
152
|
+
}
|
|
153
|
+
.data-hub-ui-blocknote-editor h2 {
|
|
154
|
+
margin: 0;
|
|
155
|
+
color: #2f2e2a;
|
|
156
|
+
font-size: 24px;
|
|
157
|
+
font-weight: 650;
|
|
158
|
+
line-height: 1.3;
|
|
159
|
+
}
|
|
160
|
+
.data-hub-ui-blocknote-editor h3 {
|
|
161
|
+
margin: 0;
|
|
162
|
+
color: #2f2e2a;
|
|
163
|
+
font-size: 20px;
|
|
164
|
+
font-weight: 600;
|
|
165
|
+
line-height: 1.35;
|
|
166
|
+
}
|
|
167
|
+
.data-hub-ui-blocknote-editor h4 {
|
|
168
|
+
margin: 0;
|
|
169
|
+
color: #37352f;
|
|
170
|
+
font-size: 17px;
|
|
171
|
+
font-weight: 600;
|
|
172
|
+
line-height: 1.45;
|
|
173
|
+
}
|
|
174
|
+
.data-hub-ui-blocknote-editor h5 {
|
|
175
|
+
margin: 0;
|
|
176
|
+
color: #37352f;
|
|
177
|
+
font-size: 15px;
|
|
178
|
+
font-weight: 600;
|
|
179
|
+
line-height: 1.5;
|
|
180
|
+
}
|
|
181
|
+
.data-hub-ui-blocknote-editor h6 {
|
|
182
|
+
margin: 0;
|
|
183
|
+
color: #6f6e69;
|
|
184
|
+
font-size: 14px;
|
|
185
|
+
font-weight: 600;
|
|
186
|
+
line-height: 1.5;
|
|
187
|
+
}
|
|
188
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=heading] {
|
|
189
|
+
padding-top: 4px;
|
|
190
|
+
padding-bottom: 4px;
|
|
191
|
+
}
|
|
192
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=heading]:has(h1) {
|
|
193
|
+
padding-top: 16px;
|
|
194
|
+
padding-bottom: 16px;
|
|
195
|
+
}
|
|
196
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=heading]:has(h2) {
|
|
197
|
+
padding-top: 12px;
|
|
198
|
+
padding-bottom: 12px;
|
|
199
|
+
}
|
|
200
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=heading]:has(h3) {
|
|
201
|
+
padding-top: 8px;
|
|
202
|
+
padding-bottom: 8px;
|
|
203
|
+
}
|
|
204
|
+
.data-hub-ui-blocknote-editor .bn-side-menu[data-block-type=heading][data-level="1"] {
|
|
205
|
+
height: 66px;
|
|
206
|
+
}
|
|
207
|
+
.data-hub-ui-blocknote-editor .bn-side-menu[data-block-type=heading][data-level="2"] {
|
|
208
|
+
height: 54px;
|
|
209
|
+
}
|
|
210
|
+
.data-hub-ui-blocknote-editor .bn-side-menu[data-block-type=heading][data-level="3"] {
|
|
211
|
+
height: 40px;
|
|
212
|
+
}
|
|
213
|
+
.data-hub-ui-blocknote-editor .bn-side-menu[data-block-type=heading][data-level="4"],
|
|
214
|
+
.data-hub-ui-blocknote-editor .bn-side-menu[data-block-type=heading][data-level="5"],
|
|
215
|
+
.data-hub-ui-blocknote-editor .bn-side-menu[data-block-type=heading][data-level="6"] {
|
|
216
|
+
height: 30px;
|
|
217
|
+
}
|
|
218
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=quote] {
|
|
219
|
+
background: #f3f8ff;
|
|
220
|
+
margin: 0.75em 0;
|
|
221
|
+
padding: 8px 0;
|
|
222
|
+
border-left: 3px solid #2f80ed;
|
|
223
|
+
border-radius: 0 6px 6px 0;
|
|
224
|
+
}
|
|
225
|
+
.data-hub-ui-blocknote-editor blockquote {
|
|
226
|
+
font-style: normal;
|
|
227
|
+
padding: 0 12px;
|
|
228
|
+
color: #334155;
|
|
229
|
+
border-left: 0;
|
|
230
|
+
}
|
|
231
|
+
.data-hub-ui-blocknote-editor blockquote p,
|
|
232
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=quote] p {
|
|
233
|
+
margin: 0;
|
|
234
|
+
}
|
|
235
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=bulletListItem],
|
|
236
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=numberedListItem],
|
|
237
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=checkListItem],
|
|
238
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=toggleListItem] {
|
|
239
|
+
margin: 2px 0;
|
|
240
|
+
line-height: 1.68;
|
|
241
|
+
}
|
|
242
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=bulletListItem] .bn-inline-content,
|
|
243
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=numberedListItem] .bn-inline-content,
|
|
244
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=checkListItem] .bn-inline-content,
|
|
245
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=toggleListItem] .bn-inline-content {
|
|
246
|
+
padding-top: 1px;
|
|
247
|
+
padding-bottom: 1px;
|
|
248
|
+
}
|
|
249
|
+
.data-hub-ui-blocknote-editor ul,
|
|
250
|
+
.data-hub-ui-blocknote-editor ol {
|
|
251
|
+
margin: 0.45em 0;
|
|
252
|
+
padding-left: 1.5em;
|
|
253
|
+
}
|
|
254
|
+
.data-hub-ui-blocknote-editor li {
|
|
255
|
+
margin: 0.25em 0;
|
|
256
|
+
padding-left: 0.15em;
|
|
257
|
+
}
|
|
258
|
+
.data-hub-ui-blocknote-editor li > ul,
|
|
259
|
+
.data-hub-ui-blocknote-editor li > ol {
|
|
260
|
+
margin: 0.25em 0;
|
|
261
|
+
padding-left: 1.45em;
|
|
262
|
+
}
|
|
263
|
+
.data-hub-ui-blocknote-editor input[type=checkbox] {
|
|
264
|
+
accent-color: #37352f;
|
|
265
|
+
}
|
|
266
|
+
.data-hub-ui-blocknote-editor .bn-inline-content code {
|
|
267
|
+
background: #f1f5f9;
|
|
268
|
+
color: #e11d48;
|
|
269
|
+
padding: 2px 6px;
|
|
270
|
+
border-radius: 4px;
|
|
271
|
+
font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
|
|
272
|
+
font-size: 0.9em;
|
|
273
|
+
}
|
|
274
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=table] {
|
|
275
|
+
overflow-x: auto;
|
|
276
|
+
margin: 0.75em 0;
|
|
277
|
+
}
|
|
278
|
+
.data-hub-ui-blocknote-editor table tr:first-child {
|
|
279
|
+
background-color: #f1f5f9;
|
|
280
|
+
}
|
|
281
|
+
.data-hub-ui-blocknote-editor table tr:first-child td {
|
|
282
|
+
font-weight: 600;
|
|
283
|
+
}
|
|
284
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=table] table,
|
|
285
|
+
.data-hub-ui-blocknote-editor table {
|
|
286
|
+
width: 100%;
|
|
287
|
+
min-width: 520px;
|
|
288
|
+
border: 1px solid #e6e6e3;
|
|
289
|
+
border-collapse: collapse;
|
|
290
|
+
border-spacing: 0;
|
|
291
|
+
color: #37352f;
|
|
292
|
+
font-size: 15px;
|
|
293
|
+
line-height: 1.55;
|
|
294
|
+
}
|
|
295
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=table] th,
|
|
296
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=table] td,
|
|
297
|
+
.data-hub-ui-blocknote-editor th,
|
|
298
|
+
.data-hub-ui-blocknote-editor td {
|
|
299
|
+
min-width: 120px;
|
|
300
|
+
padding: 8px 12px;
|
|
301
|
+
border: 1px solid #e6e6e3;
|
|
302
|
+
text-align: left;
|
|
303
|
+
vertical-align: top;
|
|
304
|
+
word-break: break-word;
|
|
305
|
+
overflow-wrap: anywhere;
|
|
306
|
+
}
|
|
307
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=table] th,
|
|
308
|
+
.data-hub-ui-blocknote-editor th {
|
|
309
|
+
color: #37352f;
|
|
310
|
+
background: #f7f7f5;
|
|
311
|
+
font-weight: 600;
|
|
312
|
+
}
|
|
313
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=table] tr:hover td,
|
|
314
|
+
.data-hub-ui-blocknote-editor table tr:hover td {
|
|
315
|
+
background: #fbfbfa;
|
|
316
|
+
}
|
|
317
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=codeBlock] {
|
|
318
|
+
position: relative;
|
|
319
|
+
background: #ffffff;
|
|
320
|
+
border: 1px solid #e6e6e3;
|
|
321
|
+
border-radius: 6px;
|
|
322
|
+
margin: 0.75em 0;
|
|
323
|
+
}
|
|
324
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=codeBlock] > div {
|
|
325
|
+
position: absolute;
|
|
326
|
+
top: 0;
|
|
327
|
+
left: 0;
|
|
328
|
+
z-index: 10;
|
|
329
|
+
}
|
|
330
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=codeBlock] > div > select {
|
|
331
|
+
outline: none;
|
|
332
|
+
-moz-appearance: none;
|
|
333
|
+
appearance: none;
|
|
334
|
+
-webkit-appearance: none;
|
|
335
|
+
-webkit-user-select: none;
|
|
336
|
+
-moz-user-select: none;
|
|
337
|
+
user-select: none;
|
|
338
|
+
border: none;
|
|
339
|
+
cursor: pointer;
|
|
340
|
+
background: transparent;
|
|
341
|
+
padding: 4px 20px 4px 8px;
|
|
342
|
+
font-size: 0.75em;
|
|
343
|
+
color: #787774;
|
|
344
|
+
opacity: 0;
|
|
345
|
+
transition: opacity 0.2s ease;
|
|
346
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
|
|
347
|
+
background-repeat: no-repeat;
|
|
348
|
+
background-position: right 4px center;
|
|
349
|
+
background-size: 12px;
|
|
350
|
+
border-radius: 4px;
|
|
351
|
+
top: 0;
|
|
352
|
+
left: 0;
|
|
353
|
+
}
|
|
354
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=codeBlock] > div > select > option {
|
|
355
|
+
color: #37352f;
|
|
356
|
+
background: #ffffff;
|
|
357
|
+
}
|
|
358
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=codeBlock]:hover > div > select,
|
|
359
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=codeBlock] > div > select:focus {
|
|
360
|
+
opacity: 1;
|
|
361
|
+
background-color: rgba(0, 0, 0, 0.04);
|
|
362
|
+
}
|
|
363
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=codeBlock] > pre {
|
|
364
|
+
margin: 0;
|
|
365
|
+
padding: 16px;
|
|
366
|
+
padding-top: 22px;
|
|
367
|
+
overflow-x: auto;
|
|
368
|
+
color: #37352f;
|
|
369
|
+
font-size: 0.86em;
|
|
370
|
+
line-height: 1.6;
|
|
371
|
+
-moz-tab-size: 2;
|
|
372
|
+
-o-tab-size: 2;
|
|
373
|
+
tab-size: 2;
|
|
374
|
+
}
|
|
375
|
+
.data-hub-ui-blocknote-editor .bn-block-content[data-content-type=codeBlock] > pre > code {
|
|
376
|
+
font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", Consolas, monospace;
|
|
377
|
+
white-space: pre;
|
|
378
|
+
}
|
|
379
|
+
.data-hub-ui-custom-file-block {
|
|
380
|
+
display: flex;
|
|
381
|
+
align-items: center;
|
|
382
|
+
gap: 10px;
|
|
383
|
+
padding: 10px 14px;
|
|
384
|
+
margin: 0.5em 0;
|
|
385
|
+
background: #f9fafb;
|
|
386
|
+
border: 1px solid #e5e7eb;
|
|
387
|
+
border-radius: 8px;
|
|
388
|
+
cursor: pointer;
|
|
389
|
+
transition: background 0.15s;
|
|
390
|
+
-webkit-user-select: none;
|
|
391
|
+
-moz-user-select: none;
|
|
392
|
+
user-select: none;
|
|
393
|
+
}
|
|
394
|
+
.data-hub-ui-custom-file-block:hover {
|
|
395
|
+
background: #f3f4f6;
|
|
396
|
+
}
|
|
397
|
+
.data-hub-ui-custom-file-block__icon {
|
|
398
|
+
display: flex;
|
|
399
|
+
align-items: center;
|
|
400
|
+
justify-content: center;
|
|
401
|
+
width: 36px;
|
|
402
|
+
height: 36px;
|
|
403
|
+
background: #6366f1;
|
|
404
|
+
border-radius: 6px;
|
|
405
|
+
color: white;
|
|
406
|
+
font-size: 16px;
|
|
407
|
+
flex-shrink: 0;
|
|
408
|
+
}
|
|
409
|
+
.data-hub-ui-custom-file-block__info {
|
|
410
|
+
flex: 1;
|
|
411
|
+
min-width: 0;
|
|
412
|
+
}
|
|
413
|
+
.data-hub-ui-custom-file-block__name {
|
|
414
|
+
font-size: 14px;
|
|
415
|
+
font-weight: 500;
|
|
416
|
+
color: #374151;
|
|
417
|
+
overflow: hidden;
|
|
418
|
+
text-overflow: ellipsis;
|
|
419
|
+
white-space: nowrap;
|
|
420
|
+
}`;
|
|
421
|
+
document.head.appendChild(style);
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { __awaiter } from 'tslib';
|
|
2
|
+
import { v4 } from 'uuid';
|
|
3
|
+
|
|
4
|
+
/** 正则匹配围栏代码块 */
|
|
5
|
+
const FENCED_CODE_REGEX = /```(\w*)\r?\n([\s\S]*?)```/g;
|
|
6
|
+
/** 正则匹配 HTML 图片标签 */
|
|
7
|
+
const HTML_IMG_REGEX = /<img\b[^>]*\bsrc=(["'])(.*?)\1[^>]*\/?>/gi;
|
|
8
|
+
/** 无序列表项标记 */
|
|
9
|
+
const UNORDERED_LIST_REGEX = /^[-*+]\s+/;
|
|
10
|
+
/** 有序列表项标记:1. 或 1) */
|
|
11
|
+
const ORDERED_LIST_REGEX = /^\d+[.)]\s+/;
|
|
12
|
+
/**
|
|
13
|
+
* 将纯文本分割成段落,对每个段落判断是否属于列表块。
|
|
14
|
+
* 相邻的同类型列表行合并为一个列表块。
|
|
15
|
+
*/
|
|
16
|
+
function parsePastedMarkdown(text, parseMarkdown, uploadImageByUrl) {
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
// 1) 先提取围栏代码块,并将代码块文本替换为占位符
|
|
19
|
+
const segments = [];
|
|
20
|
+
const placeholderText = text.replace(FENCED_CODE_REGEX, (_match, lang, code) => {
|
|
21
|
+
segments.push({ type: 'code', lang: lang || 'text', code });
|
|
22
|
+
return `\n__CODE_BLOCK_${segments.length - 1}__\n`;
|
|
23
|
+
});
|
|
24
|
+
const imageSegments = [];
|
|
25
|
+
const markdownText = placeholderText.replace(HTML_IMG_REGEX, (match, _quote, src) => {
|
|
26
|
+
imageSegments.push({ src, raw: match });
|
|
27
|
+
return `\n__IMAGE_BLOCK_${imageSegments.length - 1}__\n`;
|
|
28
|
+
});
|
|
29
|
+
// 2) 解析非代码块部分(逐行处理列表)
|
|
30
|
+
const lines = markdownText.split(/\r?\n/);
|
|
31
|
+
const nonListBlocks = [];
|
|
32
|
+
let listBuffer = null;
|
|
33
|
+
function flushList() {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
var _a;
|
|
36
|
+
if (!listBuffer)
|
|
37
|
+
return;
|
|
38
|
+
const currentList = listBuffer;
|
|
39
|
+
listBuffer = null;
|
|
40
|
+
const blockType = currentList.type === 'bullet' ? 'bulletListItem' : 'numberedListItem';
|
|
41
|
+
for (const item of currentList.items) {
|
|
42
|
+
// 去掉列表标记(- / * / 1. 等)
|
|
43
|
+
const text = item.replace(currentList.type === 'bullet' ? UNORDERED_LIST_REGEX : ORDERED_LIST_REGEX, '');
|
|
44
|
+
const parsedBlocks = yield parseMarkdown(text);
|
|
45
|
+
const parsedContent = (_a = parsedBlocks.find((block) => Array.isArray(block.content))) === null || _a === void 0 ? void 0 : _a.content;
|
|
46
|
+
const inlineContent = Array.isArray(parsedContent) ? parsedContent : undefined;
|
|
47
|
+
nonListBlocks.push({
|
|
48
|
+
id: v4(),
|
|
49
|
+
type: blockType,
|
|
50
|
+
props: {
|
|
51
|
+
textAlignment: 'left',
|
|
52
|
+
backgroundColor: 'default',
|
|
53
|
+
textColor: 'default',
|
|
54
|
+
},
|
|
55
|
+
content: inlineContent && inlineContent.length > 0
|
|
56
|
+
? inlineContent
|
|
57
|
+
: [{ type: 'text', text, styles: {} }],
|
|
58
|
+
children: [],
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
for (const rawLine of lines) {
|
|
64
|
+
// 检查是否是代码块占位符
|
|
65
|
+
const codeMatch = rawLine.match(/^__CODE_BLOCK_(\d+)__$/);
|
|
66
|
+
if (codeMatch) {
|
|
67
|
+
yield flushList();
|
|
68
|
+
const idx = parseInt(codeMatch[1], 10);
|
|
69
|
+
if (segments[idx]) {
|
|
70
|
+
nonListBlocks.push({
|
|
71
|
+
id: v4(),
|
|
72
|
+
type: 'codeBlock',
|
|
73
|
+
props: { language: segments[idx].lang },
|
|
74
|
+
content: segments[idx].code,
|
|
75
|
+
children: [],
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const imageMatch = rawLine.match(/^__IMAGE_BLOCK_(\d+)__$/);
|
|
81
|
+
if (imageMatch) {
|
|
82
|
+
yield flushList();
|
|
83
|
+
const idx = parseInt(imageMatch[1], 10);
|
|
84
|
+
const image = imageSegments[idx];
|
|
85
|
+
let uploadedUrl = '';
|
|
86
|
+
if (image) {
|
|
87
|
+
if (!uploadImageByUrl) {
|
|
88
|
+
uploadedUrl = image.src;
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
try {
|
|
92
|
+
uploadedUrl = yield uploadImageByUrl(image.src);
|
|
93
|
+
}
|
|
94
|
+
catch (_a) {
|
|
95
|
+
// 上传失败则使用原 URL
|
|
96
|
+
uploadedUrl = image.src;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (uploadedUrl) {
|
|
101
|
+
nonListBlocks.push({
|
|
102
|
+
id: v4(),
|
|
103
|
+
type: 'image',
|
|
104
|
+
props: {
|
|
105
|
+
textAlignment: 'left',
|
|
106
|
+
backgroundColor: 'default',
|
|
107
|
+
name: image.src.split('/').pop() || '',
|
|
108
|
+
url: uploadedUrl,
|
|
109
|
+
caption: '',
|
|
110
|
+
showPreview: true,
|
|
111
|
+
},
|
|
112
|
+
children: [],
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
else if (image) {
|
|
116
|
+
nonListBlocks.push({ _raw: image.raw });
|
|
117
|
+
}
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
const isUnordered = UNORDERED_LIST_REGEX.test(rawLine);
|
|
121
|
+
const isOrdered = ORDERED_LIST_REGEX.test(rawLine);
|
|
122
|
+
if (isUnordered) {
|
|
123
|
+
if (listBuffer && listBuffer.type === 'bullet') {
|
|
124
|
+
listBuffer.items.push(rawLine);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
yield flushList();
|
|
128
|
+
listBuffer = { type: 'bullet', items: [rawLine] };
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
else if (isOrdered) {
|
|
132
|
+
if (listBuffer && listBuffer.type === 'ordered') {
|
|
133
|
+
listBuffer.items.push(rawLine);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
yield flushList();
|
|
137
|
+
listBuffer = { type: 'ordered', items: [rawLine] };
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
yield flushList();
|
|
142
|
+
// 普通行,累积到待解析文本
|
|
143
|
+
nonListBlocks.push({ _raw: rawLine });
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
yield flushList();
|
|
147
|
+
// 3) 将非列表/非代码块的文本合并,通过标准 Markdown 解析
|
|
148
|
+
const rawParts = [];
|
|
149
|
+
const result = [];
|
|
150
|
+
for (const b of nonListBlocks) {
|
|
151
|
+
if ('_raw' in b) {
|
|
152
|
+
rawParts.push(b._raw);
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
// 先 flush 累积的原始文本
|
|
156
|
+
if (rawParts.length > 0) {
|
|
157
|
+
const md = rawParts.join('\n').trim();
|
|
158
|
+
if (md) {
|
|
159
|
+
const mdBlocks = yield parseMarkdown(md);
|
|
160
|
+
result.push(...mdBlocks);
|
|
161
|
+
}
|
|
162
|
+
rawParts.length = 0;
|
|
163
|
+
}
|
|
164
|
+
result.push(b);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
// 剩余原始文本
|
|
168
|
+
if (rawParts.length > 0) {
|
|
169
|
+
const md = rawParts.join('\n').trim();
|
|
170
|
+
if (md) {
|
|
171
|
+
const mdBlocks = yield parseMarkdown(md);
|
|
172
|
+
result.push(...mdBlocks);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
// 4) 如果完全没有解析出任何内容,整体走一次标准解析
|
|
176
|
+
if (result.length === 0) {
|
|
177
|
+
const mdBlocks = yield parseMarkdown(text);
|
|
178
|
+
result.push(...mdBlocks);
|
|
179
|
+
}
|
|
180
|
+
return result;
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export { parsePastedMarkdown };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Divider, Dropdown, Tooltip } from 'antd';
|
|
3
|
+
import { PlusCircleOutlined } from '@ant-design/icons';
|
|
4
|
+
import { "divider-block" as divider_block, "card-divider" as card_divider } from '../index.module.scss.js';
|
|
5
|
+
import VirtualDropdown from './VirtualDropdown.js';
|
|
6
|
+
|
|
7
|
+
function AddButton({ menu, isEdit, onClick }) {
|
|
8
|
+
return (jsx("div", { className: divider_block, children: jsx(Divider, { className: card_divider, style: {
|
|
9
|
+
borderColor: '#1775FE',
|
|
10
|
+
margin: '0',
|
|
11
|
+
padding: '0 10px 0 10px',
|
|
12
|
+
}, children: jsx(Dropdown, { popupRender: () => jsx(VirtualDropdown, { menu: menu || [], onItemClick: onClick }), trigger: ['click'], children: jsx(Tooltip, { placement: "topLeft", title: '添加算子', children: jsx("span", { onClick: (e) => e.preventDefault(), style: {
|
|
13
|
+
color: '#1775FE',
|
|
14
|
+
cursor: isEdit ? 'pointer' : 'not-allowed',
|
|
15
|
+
height: '16px',
|
|
16
|
+
width: '16px',
|
|
17
|
+
}, children: jsx(PlusCircleOutlined, {}) }) }) }) }) }));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { AddButton as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { iocard, "iocard-body" as iocard_body, active } from '../index.module.scss.js';
|
|
3
|
+
|
|
4
|
+
function IOCard({ isActive, onClick, id }) {
|
|
5
|
+
return (jsx("div", { className: iocard, children: jsx("div", { className: `${iocard_body} ${isActive ? active : ''}`, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(id || ''), children: jsx("div", { children: id === 'IMPORT' ? '输入数据集' : '输出数据集' }) }) }));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { IOCard as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { DeleteOutlined } from '@ant-design/icons';
|
|
3
|
+
import { "card-body" as card_body, active, "card-title" as card_title, "delete-btn-container" as delete_btn_container, "card-description" as card_description } from '../index.module.scss.js';
|
|
4
|
+
|
|
5
|
+
function SingleCard({ isEdit, isActive, onClick, onDelete, title, description, id }) {
|
|
6
|
+
return (jsxs("div", { className: `${card_body} ${isActive ? active : ''}`, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(id || ''), children: [jsxs("div", { className: card_title, children: [title, isEdit && (jsx("div", { className: delete_btn_container, onClick: (e) => {
|
|
7
|
+
e.stopPropagation();
|
|
8
|
+
onDelete === null || onDelete === void 0 ? void 0 : onDelete(id || '');
|
|
9
|
+
}, children: jsx(DeleteOutlined, {}) }))] }), jsx("div", { className: card_description, title: description, children: description })] }));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { SingleCard as default };
|