@zjlab-fe/data-hub-ui 0.26.2 → 0.26.4

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.
Files changed (47) hide show
  1. package/dist/types/components/FileUploader/FileUploadModal.d.ts +1 -0
  2. package/dist/types/components/FileUploader/FileUploader.d.ts +1 -0
  3. package/dist/types/components/FileUploader/index.d.ts +0 -1
  4. package/dist/types/components/tip-tap/editor.d.ts +1 -0
  5. package/dist/types/components/tip-tap/index.d.ts +0 -1
  6. package/dist/types/components/tip-tap/reader.d.ts +1 -0
  7. package/es/components/FileUploader/FileUploadModal.js +4 -1
  8. package/es/components/FileUploader/FileUploader.js +2 -0
  9. package/es/components/FileUploader/FileUploaderImpl/FileUploaderFileReceiver.css.js +7 -3
  10. package/es/components/FileUploader/FileUploaderImpl/FileUploaderFileReceiver.js +2 -1
  11. package/es/components/FileUploader/index.css.js +7 -3
  12. package/es/components/FileUploader/index.js +1 -17
  13. package/es/components/FileUploader/utils/modalConfig.css.js +7 -3
  14. package/es/components/confirm-again/index.js +2 -1
  15. package/es/components/confirm-again/index.scss.js +7 -3
  16. package/es/components/feature-card/index.css.js +7 -3
  17. package/es/components/feature-card/index.js +2 -1
  18. package/es/components/file-uploader/components/circle-progress.css.js +7 -3
  19. package/es/components/file-uploader/components/circle-progress.js +2 -2
  20. package/es/components/file-uploader/components/theme.css.js +7 -3
  21. package/es/components/file-uploader/components/uploader-drop-zone.css.js +7 -3
  22. package/es/components/file-uploader/components/uploader-drop-zone.js +4 -2
  23. package/es/components/file-uploader/components/uploader-file-item.css.js +7 -3
  24. package/es/components/file-uploader/components/uploader-file-item.js +4 -2
  25. package/es/components/file-uploader/components/uploader-file-list.css.js +7 -3
  26. package/es/components/file-uploader/components/uploader-file-list.js +4 -2
  27. package/es/components/file-uploader/components/uploader.css.js +7 -3
  28. package/es/components/file-uploader/components/uploader.js +4 -2
  29. package/es/components/file-uploader/components/uploading-status.css.js +7 -3
  30. package/es/components/file-uploader/components/uploading-status.js +2 -1
  31. package/es/components/floating-layer/index.js +2 -1
  32. package/es/components/floating-layer/index.scss.js +7 -3
  33. package/es/components/notion-editor/index.js +6 -3
  34. package/es/components/notion-editor/index.scss.js +7 -3
  35. package/es/components/radio-card/index.js +2 -1
  36. package/es/components/radio-card/index.scss.js +7 -3
  37. package/es/components/section-heading/index.css.js +7 -3
  38. package/es/components/section-heading/index.js +2 -1
  39. package/es/components/tip-tap/editor.js +2 -0
  40. package/es/components/tip-tap/index.js +7 -0
  41. package/es/components/tip-tap/reader.js +2 -0
  42. package/es/components/tip-tap/styles/editor.css.js +7 -3
  43. package/es/components/uploadDrawer/index.css.js +7 -3
  44. package/es/components/uploadDrawer/index.js +2 -1
  45. package/es/index.js +0 -2
  46. package/lib/index.js +1 -1
  47. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import './index.css';
1
2
  import './utils/modalConfig.css';
2
3
  import { ModalProps } from 'antd';
3
4
  import { FileUploaderProps } from './FileUploaderImpl/FileUploader';
@@ -1,3 +1,4 @@
1
+ import './index.css';
1
2
  import { FileUploaderProps } from './FileUploaderImpl/FileUploader';
2
3
  /**
3
4
  * @deprecated This component is deprecated and will be removed in future releases.
@@ -1,4 +1,3 @@
1
- import './index.css';
2
1
  import UploadStoreProvider from './UploadStoreProvider/UploadStoreProvider';
3
2
  import FileUploader from './FileUploader';
4
3
  import FileUploadModal from './FileUploadModal';
@@ -1,3 +1,4 @@
1
+ import './styles/editor.css';
1
2
  export interface TipTapEditorHandle {
2
3
  getContent: () => string;
3
4
  getJSON: () => Record<string, unknown>;
@@ -1,4 +1,3 @@
1
- import './styles/editor.css';
2
1
  import TipTapEditor from './editor';
3
2
  import TipTapReader from './reader';
4
3
  export { TipTapEditor as default, TipTapReader };
@@ -1,3 +1,4 @@
1
+ import './styles/editor.css';
1
2
  export default function TipTapReader({ content, className }: {
2
3
  content: string;
3
4
  className?: string;
@@ -1,6 +1,7 @@
1
1
  import { __rest } from 'tslib';
2
2
  import { jsx } from 'react/jsx-runtime';
3
- import './utils/modalConfig.css.js';
3
+ import useStyle from './index.css.js';
4
+ import useStyle$1 from './utils/modalConfig.css.js';
4
5
  import { Modal, Alert, Button } from 'antd';
5
6
  import { useContext } from 'react';
6
7
  import { UploadStoreContext, TEMP_STORE } from './UploadStoreProvider/UploadStoreProvider.js';
@@ -8,6 +9,8 @@ import { useTranslate } from './Locale/useTranslate.js';
8
9
  import { modalConfig } from './utils/modalConfig.js';
9
10
  import FileUploader from './FileUploaderImpl/FileUploader.js';
10
11
 
12
+ useStyle();
13
+ useStyle$1();
11
14
  /**
12
15
  * @deprecated This component is deprecated and will be removed in future releases.
13
16
  */
@@ -1,10 +1,12 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
+ import useStyle from './index.css.js';
2
3
  import { useContext } from 'react';
3
4
  import { UploadStoreContext, TEMP_STORE } from './UploadStoreProvider/UploadStoreProvider.js';
4
5
  import FileUploader$1 from './FileUploaderImpl/FileUploader.js';
5
6
  import { Alert } from 'antd';
6
7
  import { useTranslate } from './Locale/useTranslate.js';
7
8
 
9
+ useStyle();
8
10
  /**
9
11
  * @deprecated This component is deprecated and will be removed in future releases.
10
12
  */
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `.zjlab-fe-data-hub-ui-default-drag-area {
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `.zjlab-fe-data-hub-ui-default-drag-area {
3
4
 
4
5
  margin-bottom: 1.25rem;
5
6
 
@@ -33,4 +34,7 @@ style.textContent = `.zjlab-fe-data-hub-ui-default-drag-area {
33
34
  border-color: rgb(23 117 254 / var(--tw-border-opacity, 1))
34
35
  }
35
36
  `;
36
- document.head.appendChild(style);
37
+ document.head.appendChild(style);
38
+ }
39
+
40
+ export { useStyle as default };
@@ -1,6 +1,6 @@
1
1
  import { __awaiter } from 'tslib';
2
2
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
- import './FileUploaderFileReceiver.css.js';
3
+ import useStyle from './FileUploaderFileReceiver.css.js';
4
4
  import { App } from 'antd';
5
5
  import { useRef, useMemo } from 'react';
6
6
  import '../utils/checkExpiryTime.js';
@@ -10,6 +10,7 @@ import { retrieveAllFiles as retrieveFilesFromEntry } from '../utils/retrieveAll
10
10
  import { useTranslate } from '../Locale/useTranslate.js';
11
11
  import FileUploaderFileReceiverContainer from './FileUploaderFileReceiverContainer.js';
12
12
 
13
+ useStyle();
13
14
  function FileUploaderFileReceiver({ accept = '', className = '', multiple = true, directory = true, dragAreaDescription, maxSizePerFile = 10 * GB, onFileReceived, }) {
14
15
  const t = useTranslate();
15
16
  const { message } = App.useApp();
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `@layer tailwind-base, antd;
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `@layer tailwind-base, antd;
3
4
  @layer tailwind-base {
4
5
  .zjlab-fe-data-hub-ui-file-uploader *, .zjlab-fe-data-hub-ui-file-uploader ::before, .zjlab-fe-data-hub-ui-file-uploader ::after {
5
6
  --tw-border-spacing-x: 0;
@@ -529,4 +530,7 @@ style.textContent = `@layer tailwind-base, antd;
529
530
  opacity: 1;
530
531
  }
531
532
  `;
532
- document.head.appendChild(style);
533
+ document.head.appendChild(style);
534
+ }
535
+
536
+ export { useStyle as default };
@@ -1,22 +1,6 @@
1
- import './index.css.js';
2
1
  export { default as UploadStoreProvider } from './UploadStoreProvider/UploadStoreProvider.js';
3
2
  import FileUploader from './FileUploader.js';
4
- import 'tslib';
5
- import 'react/jsx-runtime';
6
- import './utils/modalConfig.css.js';
7
- import 'antd';
8
- import 'react';
9
- import './FileUploaderImpl/FileUploaderFileReceiver.css.js';
10
- import './utils/checkExpiryTime.js';
11
- import './types.js';
12
- import './FileUploaderImpl/FileUploaderListItem.js';
13
- import './FileUploaderImpl/FileUploaderListItemUploading.js';
14
- import './FileUploaderImpl/FileUploaderlListItemFinished.js';
15
- import './FileUploaderImpl/FileUploaderListItemFail.js';
16
- import './FileUploaderImpl/FileUploaderListItemPaused.js';
17
- import 'jotai';
18
- import './hooks/useCurrentFile.js';
19
- import './FileUploaderImpl/FileUploaderContextProvider.js';
3
+ export { default as FileUploadModal } from './FileUploadModal.js';
20
4
 
21
5
 
22
6
 
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `.zjlab-fe-data-hub-ui-modal .ant-modal-title,
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `.zjlab-fe-data-hub-ui-modal .ant-modal-title,
3
4
  .zjlab-fe-data-hub-ui-modal .ant-modal-confirm-title {
4
5
  font-family: AlibabaPuHuiTi-3-65-Medium
5
6
  }
@@ -17,4 +18,7 @@ style.textContent = `.zjlab-fe-data-hub-ui-modal .ant-modal-title,
17
18
  line-height: 1.5rem
18
19
  }
19
20
  `;
20
- document.head.appendChild(style);
21
+ document.head.appendChild(style);
22
+ }
23
+
24
+ export { useStyle as default };
@@ -1,8 +1,9 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { Modal } from 'antd';
3
3
  import classNames from 'classnames';
4
- import './index.scss.js';
4
+ import useStyle from './index.scss.js';
5
5
 
6
+ useStyle();
6
7
  function ConfirmAgain(props) {
7
8
  var _a;
8
9
  return (jsx(Modal, Object.assign({}, props, { width: (_a = props.width) !== null && _a !== void 0 ? _a : 400, wrapClassName: classNames('data-hub-ui-confirm-wrap', props.wrapClassName) })));
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `@charset "UTF-8";
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `@charset "UTF-8";
3
4
  @font-face {
4
5
  font-family: "AlibabaPuHuiTi-3-45-Light";
5
6
  src: url("https://haina-datahub.zero2x.org/ossRoute/frontend/resources/fonts/alibaba_puhuiti_3/AlibabaPuHuiTi-3-45-Light.ttf") format("truetype");
@@ -34,4 +35,7 @@ style.textContent = `@charset "UTF-8";
34
35
  text-align: center;
35
36
  margin-top: 28px;
36
37
  }`;
37
- document.head.appendChild(style);
38
+ document.head.appendChild(style);
39
+ }
40
+
41
+ export { useStyle as default };
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `@layer tailwind-base, antd;
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `@layer tailwind-base, antd;
3
4
 
4
5
  @layer tailwind-base {
5
6
  *, ::before, ::after{
@@ -652,4 +653,7 @@ style.textContent = `@layer tailwind-base, antd;
652
653
  opacity: 1;
653
654
  }
654
655
  `;
655
- document.head.appendChild(style);
656
+ document.head.appendChild(style);
657
+ }
658
+
659
+ export { useStyle as default };
@@ -1,12 +1,13 @@
1
1
  import { __rest } from 'tslib';
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import React from 'react';
4
- import './index.css.js';
4
+ import useStyle from './index.css.js';
5
5
  import { cn } from '../../lib/utils.js';
6
6
  import { FeatureCardContext } from './context.js';
7
7
  import { getRootSizeClasses, getAlignClass, getTitleSizeClasses, getDescriptionSizeClasses, getIconAlignClass, getIconRoundedClass, getIconSizeClasses } from './classNames.js';
8
8
  import { Content, Description, Title, Body, Icon, Header } from './components.js';
9
9
 
10
+ useStyle();
10
11
  const FeatureCardRoot = React.forwardRef(function FeatureCardRoot(props, ref) {
11
12
  const { icon, cardTitle, description, titleAs = 'h3', align = 'left', size = 'lg', iconVariant = 'default', className, classNames, children } = props, rest = __rest(props, ["icon", "cardTitle", "description", "titleAs", "align", "size", "iconVariant", "className", "classNames", "children"]);
12
13
  const SemanticClassNames = typeof classNames === 'function' ? classNames(props) : classNames;
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `.styled-progress-circle {
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `.styled-progress-circle {
3
4
  display: flex;
4
5
  align-items: center;
5
6
  justify-content: center;
@@ -36,4 +37,7 @@ style.textContent = `.styled-progress-circle {
36
37
 
37
38
 
38
39
  `;
39
- document.head.appendChild(style);
40
+ document.head.appendChild(style);
41
+ }
42
+
43
+ export { useStyle as default };
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import './circle-progress.css.js';
2
+ import useStyle from './circle-progress.css.js';
3
3
 
4
- // Circle Progress Component
4
+ useStyle();
5
5
  function CircleProgress({ percent, isFailed, isSuccess, }) {
6
6
  const radius = 50;
7
7
  const circumference = 2 * Math.PI * radius;
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `:root {
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `:root {
3
4
  /* --- CSS Variables for Theming --- */
4
5
 
5
6
  /* Base Colors */
@@ -61,4 +62,7 @@ style.textContent = `:root {
61
62
  --uploader-progress-failed: #ef4444;
62
63
  }
63
64
  `;
64
- document.head.appendChild(style);
65
+ document.head.appendChild(style);
66
+ }
67
+
68
+ export { useStyle as default };
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `.upload-drop-zone-container {
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `.upload-drop-zone-container {
3
4
  position: relative;
4
5
  width: 100%;
5
6
  margin-bottom: 1.5rem;
@@ -63,4 +64,7 @@ style.textContent = `.upload-drop-zone-container {
63
64
 
64
65
 
65
66
  `;
66
- document.head.appendChild(style);
67
+ document.head.appendChild(style);
68
+ }
69
+
70
+ export { useStyle as default };
@@ -3,9 +3,11 @@ import { useRef, useCallback } from 'react';
3
3
  import UploadIcon from './icons.js';
4
4
  import { useDropZone } from './hooks/use-drop-zone.js';
5
5
  import { useFileValidation } from './hooks/use-file-validation.js';
6
- import './theme.css.js';
7
- import './uploader-drop-zone.css.js';
6
+ import useStyle from './theme.css.js';
7
+ import useStyle$1 from './uploader-drop-zone.css.js';
8
8
 
9
+ useStyle();
10
+ useStyle$1();
9
11
  function UploaderDropZone(props) {
10
12
  const { accept = '', maxSize, maxFiles, directory = false, disabled = false, dragAreaDescription = '点击或拖拽上传文件', icon, classNames, onDrop, fileValidation, onError, } = props;
11
13
  const semanticClassNames = typeof classNames === 'function' ? classNames(props) : classNames;
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `.upload-file-item {
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `.upload-file-item {
3
4
  display: flex;
4
5
  align-items: center;
5
6
  justify-content: space-between;
@@ -183,4 +184,7 @@ style.textContent = `.upload-file-item {
183
184
  background: var(--uploader-action-close-hover-bg);
184
185
  }
185
186
  `;
186
- document.head.appendChild(style);
187
+ document.head.appendChild(style);
188
+ }
189
+
190
+ export { useStyle as default };
@@ -3,9 +3,11 @@ import { UploadStatus } from '../constants.js';
3
3
  import { CircleProgress } from './circle-progress.js';
4
4
  import { FileIcon, PauseIcon, ResumeIcon, CloseIcon } from './icons.js';
5
5
  import { UploadingStatus } from './uploading-status.js';
6
- import './theme.css.js';
7
- import './uploader-file-item.css.js';
6
+ import useStyle from './theme.css.js';
7
+ import useStyle$1 from './uploader-file-item.css.js';
8
8
 
9
+ useStyle();
10
+ useStyle$1();
9
11
  function UploaderFileItem(props) {
10
12
  const { file, classNames, onCancel, onRemove, onPause, onResume } = props;
11
13
  const semanticClassNames = typeof classNames === 'function' ? classNames(props) : classNames;
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `.upload-file-list-wrapper {
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `.upload-file-list-wrapper {
3
4
  width: 100%;
4
5
  margin-top: 1.5rem;
5
6
  }
@@ -40,4 +41,7 @@ style.textContent = `.upload-file-list-wrapper {
40
41
 
41
42
 
42
43
  `;
43
- document.head.appendChild(style);
44
+ document.head.appendChild(style);
45
+ }
46
+
47
+ export { useStyle as default };
@@ -1,8 +1,10 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { useUpload } from '../hooks/use-upload.js';
3
- import './theme.css.js';
4
- import './uploader-file-list.css.js';
3
+ import useStyle from './theme.css.js';
4
+ import useStyle$1 from './uploader-file-list.css.js';
5
5
 
6
+ useStyle();
7
+ useStyle$1();
6
8
  /**
7
9
  * Simple file list component that displays all uploaded files.
8
10
  * Uses the useUploadFiles hook to access file state.
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `/* Styled File Uploader - shadcn/ui inspired */
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `/* Styled File Uploader - shadcn/ui inspired */
3
4
 
4
5
  .styled-uploader-container {
5
6
  /* --- Component Styles --- */
@@ -17,4 +18,7 @@ style.textContent = `/* Styled File Uploader - shadcn/ui inspired */
17
18
 
18
19
 
19
20
  `;
20
- document.head.appendChild(style);
21
+ document.head.appendChild(style);
22
+ }
23
+
24
+ export { useStyle as default };
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import './theme.css.js';
3
- import './uploader.css.js';
2
+ import useStyle from './theme.css.js';
3
+ import useStyle$1 from './uploader.css.js';
4
4
  import { useEffect, useCallback } from 'react';
5
5
  import { DEFAULT_MAX_FILE_SIZE } from '../constants.js';
6
6
  import { UploaderDropZone } from './uploader-drop-zone.js';
@@ -8,6 +8,8 @@ import { UploaderFileListLayout } from './uploader-file-list.js';
8
8
  import { UploaderFileItem } from './uploader-file-item.js';
9
9
  import { useUpload } from '../hooks/use-upload.js';
10
10
 
11
+ useStyle();
12
+ useStyle$1();
11
13
  /**
12
14
  * Styled File Uploader - Matches FileUploader capabilities with custom styling
13
15
  *
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `.uploading-status {
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `.uploading-status {
3
4
  display: inline-block;
4
5
  position: relative;
5
6
  overflow: hidden;
@@ -49,4 +50,7 @@ style.textContent = `.uploading-status {
49
50
  text-align: left;
50
51
  }
51
52
  `;
52
- document.head.appendChild(style);
53
+ document.head.appendChild(style);
54
+ }
55
+
56
+ export { useStyle as default };
@@ -1,7 +1,8 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useState, useEffect } from 'react';
3
- import './uploading-status.css.js';
3
+ import useStyle from './uploading-status.css.js';
4
4
 
5
+ useStyle();
5
6
  const UPLOADING_MESSAGES = [
6
7
  '上传中',
7
8
  '传输数据中',
@@ -1,9 +1,10 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useState, useEffect } from 'react';
3
- import './index.scss.js';
3
+ import useStyle from './index.scss.js';
4
4
  import closeBtn from '../../assets/closeBtn.png.js';
5
5
  import classNames from 'classnames';
6
6
 
7
+ useStyle();
7
8
  function FloatingLayer({ visiable, children, onClose, className, style }) {
8
9
  const [open, setOpen] = useState(false);
9
10
  useEffect(() => {
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `.data-hub-ui-floating-layer-wrap {
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `.data-hub-ui-floating-layer-wrap {
3
4
  min-width: 244px;
4
5
  min-height: 89px;
5
6
  background: #ffffff;
@@ -28,4 +29,7 @@ style.textContent = `.data-hub-ui-floating-layer-wrap {
28
29
  .data-hub-ui-floating-layer-slot {
29
30
  padding: 17px 10px;
30
31
  }`;
31
- document.head.appendChild(style);
32
+ document.head.appendChild(style);
33
+ }
34
+
35
+ export { useStyle as default };
@@ -7,13 +7,16 @@ import { TextSelection } from 'prosemirror-state';
7
7
  import { BlockNoteSchema, defaultStyleSpecs, defaultInlineContentSpecs, defaultBlockSpecs } from '@blocknote/core';
8
8
  import { BlockNoteView } from '@blocknote/mantine';
9
9
  import { zh } from '@blocknote/core/locales';
10
- import '@blocknote/core/fonts/inter.css';
11
- import '@blocknote/mantine/style.css';
12
- import './index.scss.js';
10
+ import __inject_css0 from '@blocknote/core/fonts/inter.css';
11
+ import __inject_css1 from '@blocknote/mantine/style.css';
12
+ import useStyle from './index.scss.js';
13
13
  import { CustomCodeBlock } from './code-block/index.js';
14
14
  import { detectLanguage } from './code-block/languageDetector.js';
15
15
  import { parsePastedMarkdown } from './parseMarkdown.js';
16
16
 
17
+ __inject_css0();
18
+ __inject_css1();
19
+ useStyle();
17
20
  // 自定义文件块,替换默认的文件块
18
21
  const CustomFileBlock = createReactBlockSpec({
19
22
  type: 'file',
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `.data-hub-ui-blocknote-editor-wrapper {
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `.data-hub-ui-blocknote-editor-wrapper {
3
4
  position: relative;
4
5
  display: grid;
5
6
  grid-template-columns: minmax(0, 1fr) var(--blocknote-toc-width, 240px);
@@ -418,4 +419,7 @@ style.textContent = `.data-hub-ui-blocknote-editor-wrapper {
418
419
  text-overflow: ellipsis;
419
420
  white-space: nowrap;
420
421
  }`;
421
- document.head.appendChild(style);
422
+ document.head.appendChild(style);
423
+ }
424
+
425
+ export { useStyle as default };
@@ -1,8 +1,9 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { Radio } from 'antd';
3
- import './index.scss.js';
3
+ import useStyle from './index.scss.js';
4
4
  import classNames from 'classnames';
5
5
 
6
+ useStyle();
6
7
  const RadioCard = ({ options, value, onChange, className, style }) => {
7
8
  const handleChange = (e) => {
8
9
  if (onChange) {
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `.data-hub-ui-radio-card-container {
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `.data-hub-ui-radio-card-container {
3
4
  display: flex;
4
5
  gap: 20px;
5
6
  }
@@ -55,4 +56,7 @@ style.textContent = `.data-hub-ui-radio-card-container {
55
56
  display: flex;
56
57
  flex-wrap: wrap;
57
58
  }`;
58
- document.head.appendChild(style);
59
+ document.head.appendChild(style);
60
+ }
61
+
62
+ export { useStyle as default };
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `@layer tailwind-base, antd;
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `@layer tailwind-base, antd;
3
4
 
4
5
  @layer tailwind-base {
5
6
  *, ::before, ::after{
@@ -645,4 +646,7 @@ style.textContent = `@layer tailwind-base, antd;
645
646
  opacity: 1;
646
647
  }
647
648
  `;
648
- document.head.appendChild(style);
649
+ document.head.appendChild(style);
650
+ }
651
+
652
+ export { useStyle as default };
@@ -1,12 +1,13 @@
1
1
  import { __rest } from 'tslib';
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import React from 'react';
4
- import './index.css.js';
4
+ import useStyle from './index.css.js';
5
5
  import { cn } from '../../lib/utils.js';
6
6
  import { SectionHeadingContext } from './context.js';
7
7
  import { getTitleSizeClasses, getAlignClass } from './classNames.js';
8
8
  import { Description, Title, Kicker } from './components.js';
9
9
 
10
+ useStyle();
10
11
  const SectionHeadingRoot = React.forwardRef(function SectionHeadingRoot(props, ref) {
11
12
  const { kicker, mainTitle, description, align = 'center', size = 'lg', titleAs = 'h2', className, classNames, styles, children } = props, rest = __rest(props, ["kicker", "mainTitle", "description", "align", "size", "titleAs", "className", "classNames", "styles", "children"]);
12
13
  const SemanticClassNames = typeof classNames === 'function' ? classNames(props) : classNames;
@@ -1,4 +1,5 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import useStyle from './styles/editor.css.js';
2
3
  import { useEditor, EditorContent } from '@tiptap/react';
3
4
  import { BubbleMenu } from '@tiptap/react/menus';
4
5
  import { forwardRef, useImperativeHandle } from 'react';
@@ -6,6 +7,7 @@ import { editorExtensions } from './extensions/index.js';
6
7
  import Toolbar from './toolbar/index.js';
7
8
  import TipTapBubbleMenu from './bubble-menu.js';
8
9
 
10
+ useStyle();
9
11
  var editor = forwardRef(function TipTapEditor({ content = '', placeholder = '开始输入内容...', editable = true, autofocus = false, className = '', toolbarClassName = '', onChange, }, ref) {
10
12
  const editor = useEditor({
11
13
  extensions: editorExtensions(placeholder),
@@ -0,0 +1,7 @@
1
+ import useStyle from './styles/editor.css.js';
2
+ export { default } from './editor.js';
3
+ import 'react/jsx-runtime';
4
+ import '@tiptap/react';
5
+ import './extensions/index.js';
6
+
7
+ useStyle();
@@ -1,7 +1,9 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
+ import useStyle from './styles/editor.css.js';
2
3
  import { useEditor, EditorContent } from '@tiptap/react';
3
4
  import { readerExtensions } from './extensions/index.js';
4
5
 
6
+ useStyle();
5
7
  function TipTapReader({ content, className = '' }) {
6
8
  const editor = useEditor({
7
9
  extensions: readerExtensions(),
@@ -1,5 +1,6 @@
1
- var style = document.createElement('style');
2
- style.textContent = `/* TipTap Editor - Modern Rich Text Editor */
1
+ function useStyle() {
2
+ var style = document.createElement('style');
3
+ style.textContent = `/* TipTap Editor - Modern Rich Text Editor */
3
4
  /* CSS Variables for TipTap Editor Theme */
4
5
  :root {
5
6
  /* Colors - Indigo Theme */
@@ -860,4 +861,7 @@ style.textContent = `/* TipTap Editor - Modern Rich Text Editor */
860
861
  background: #94a3b8;
861
862
  }
862
863
  `;
863
- document.head.appendChild(style);
864
+ document.head.appendChild(style);
865
+ }
866
+
867
+ export { useStyle as default };