@4399ywkf/editor 0.4.0 → 0.4.2

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.
@@ -1,5 +1,5 @@
1
- import { EditorConfigProvider, NotionEditor } from './chunk-BBZGFBWU.js';
2
- import './chunk-GSBPP62I.js';
1
+ import { EditorConfigProvider, NotionEditor } from './chunk-FQCG2HNJ.js';
2
+ import './chunk-QMYT5WXO.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
5
5
  function DocView({ content, readOnly, room, className, onReady }) {
@@ -15,5 +15,5 @@ function DocView({ content, readOnly, room, className, onReady }) {
15
15
  }
16
16
 
17
17
  export { DocView as default };
18
- //# sourceMappingURL=DocView-7QREDSQJ.js.map
19
- //# sourceMappingURL=DocView-7QREDSQJ.js.map
18
+ //# sourceMappingURL=DocView-IZ4JBSIA.js.map
19
+ //# sourceMappingURL=DocView-IZ4JBSIA.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/views/DocView.tsx"],"names":[],"mappings":";;;;AAMe,SAAR,QAAyB,EAAE,OAAA,EAAS,UAAU,IAAA,EAAM,SAAA,EAAW,SAAQ,EAAsB;AAClG,EAAA,2BACG,KAAA,EAAA,EAAI,SAAA,EACH,8BAAC,oBAAA,EAAA,EAAqB,MAAA,EAAQ,EAAC,EAC7B,QAAA,kBAAA,GAAA;AAAA,IAAC,YAAA;AAAA,IAAA;AAAA,MACC,MAAM,IAAA,IAAQ,SAAA;AAAA,MACd,OAAA;AAAA,MACA,QAAA;AAAA,MACA,aAAA,EAAe,CAAC,MAAA,KAAmB,OAAA,GAAU,MAAM;AAAA;AAAA,KAEvD,CAAA,EACF,CAAA;AAEJ","file":"DocView-7QREDSQJ.js","sourcesContent":["import type { Editor } from \"@tiptap/react\"\nimport { EditorConfigProvider } from \"../contexts/editor-config-context\"\nimport { NotionEditor } from \"../components/tiptap-templates/notion-like/notion-like-editor\"\nimport type { DocumentViewProps } from \"../registry\"\n\n/** doc 通道:云文档与本地 doc 是同一套 tiptap,不做区分 */\nexport default function DocView({ content, readOnly, room, className, onReady }: DocumentViewProps) {\n return (\n <div className={className}>\n <EditorConfigProvider config={{}}>\n <NotionEditor\n room={room ?? \"default\"}\n content={content as string}\n readOnly={readOnly}\n onEditorReady={(editor: Editor) => onReady?.(editor)}\n />\n </EditorConfigProvider>\n </div>\n )\n}\n"]}
1
+ {"version":3,"sources":["../src/views/DocView.tsx"],"names":[],"mappings":";;;;AAMe,SAAR,QAAyB,EAAE,OAAA,EAAS,UAAU,IAAA,EAAM,SAAA,EAAW,SAAQ,EAAsB;AAClG,EAAA,2BACG,KAAA,EAAA,EAAI,SAAA,EACH,8BAAC,oBAAA,EAAA,EAAqB,MAAA,EAAQ,EAAC,EAC7B,QAAA,kBAAA,GAAA;AAAA,IAAC,YAAA;AAAA,IAAA;AAAA,MACC,MAAM,IAAA,IAAQ,SAAA;AAAA,MACd,OAAA;AAAA,MACA,QAAA;AAAA,MACA,aAAA,EAAe,CAAC,MAAA,KAAmB,OAAA,GAAU,MAAM;AAAA;AAAA,KAEvD,CAAA,EACF,CAAA;AAEJ","file":"DocView-IZ4JBSIA.js","sourcesContent":["import type { Editor } from \"@tiptap/react\"\nimport { EditorConfigProvider } from \"../contexts/editor-config-context\"\nimport { NotionEditor } from \"../components/tiptap-templates/notion-like/notion-like-editor\"\nimport type { DocumentViewProps } from \"../registry\"\n\n/** doc 通道:云文档与本地 doc 是同一套 tiptap,不做区分 */\nexport default function DocView({ content, readOnly, room, className, onReady }: DocumentViewProps) {\n return (\n <div className={className}>\n <EditorConfigProvider config={{}}>\n <NotionEditor\n room={room ?? \"default\"}\n content={content as string}\n readOnly={readOnly}\n onEditorReady={(editor: Editor) => onReady?.(editor)}\n />\n </EditorConfigProvider>\n </div>\n )\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { useTiptapEditor, isExtensionAvailable, isNodeInSchema, Button, cn, getSelectionBoundingRect, isSelectionValid, getSelectedNodesOfType, selectCurrentBlockContent, Popover, PopoverTrigger, PopoverContent, isValidPosition, updateNodesAttr, parseShortcutKeys, isMarkInSchema, isNodeTypeSelected, SR_ONLY, sanitizeUrl, selectionWithinConvertibleTypes, getSelectedBlockNodes, findNodePosition, Card, CardBody, CardItemGroup, Input, clamp, focusNextNode, getAvatar, getUrlParam, handleImageUpload, getNodeDisplayName, isTextSelectionValid, AIButton, CardGroupLabel, getElementOverflowPosition } from './chunk-GSBPP62I.js';
1
+ import { useTiptapEditor, isExtensionAvailable, isNodeInSchema, Button, cn, getSelectionBoundingRect, isSelectionValid, getSelectedNodesOfType, selectCurrentBlockContent, Popover, PopoverTrigger, PopoverContent, isValidPosition, updateNodesAttr, parseShortcutKeys, isMarkInSchema, isNodeTypeSelected, SR_ONLY, sanitizeUrl, selectionWithinConvertibleTypes, getSelectedBlockNodes, findNodePosition, clamp, focusNextNode, getAvatar, getUrlParam, handleImageUpload, getNodeDisplayName, isTextSelectionValid, AIButton, getElementOverflowPosition } from './chunk-QMYT5WXO.js';
2
2
  import * as React from 'react';
3
3
  import { createContext, memo, forwardRef, useState, useCallback, useRef, useEffect, useMemo, useLayoutEffect, useContext, Children, isValidElement, cloneElement } from 'react';
4
4
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
@@ -5880,6 +5880,17 @@ var MoreVerticalIcon = memo(({ className, ...props }) => {
5880
5880
  );
5881
5881
  });
5882
5882
  MoreVerticalIcon.displayName = "MoreVerticalIcon";
5883
+ function Input({ className, type, ...props }) {
5884
+ return /* @__PURE__ */ jsx(
5885
+ "input",
5886
+ {
5887
+ type,
5888
+ "data-slot": "tiptap-input",
5889
+ className: cn("tiptap-input", className),
5890
+ ...props
5891
+ }
5892
+ );
5893
+ }
5883
5894
  function ComboboxProvider2({ ...props }) {
5884
5895
  return /* @__PURE__ */ jsx(
5885
5896
  Ariakit2.ComboboxProvider,
@@ -8583,6 +8594,69 @@ var ChevronDownIcon = memo(({ className, ...props }) => {
8583
8594
  );
8584
8595
  });
8585
8596
  ChevronDownIcon.displayName = "ChevronDownIcon";
8597
+ var Card = forwardRef(
8598
+ ({ className, ...props }, ref) => {
8599
+ return /* @__PURE__ */ jsx("div", { ref, className: cn("tiptap-card", className), ...props });
8600
+ }
8601
+ );
8602
+ Card.displayName = "Card";
8603
+ var CardHeader = forwardRef(
8604
+ ({ className, ...props }, ref) => {
8605
+ return /* @__PURE__ */ jsx(
8606
+ "div",
8607
+ {
8608
+ ref,
8609
+ className: cn("tiptap-card-header", className),
8610
+ ...props
8611
+ }
8612
+ );
8613
+ }
8614
+ );
8615
+ CardHeader.displayName = "CardHeader";
8616
+ var CardBody = forwardRef(
8617
+ ({ className, ...props }, ref) => {
8618
+ return /* @__PURE__ */ jsx("div", { ref, className: cn("tiptap-card-body", className), ...props });
8619
+ }
8620
+ );
8621
+ CardBody.displayName = "CardBody";
8622
+ var CardItemGroup = forwardRef(({ className, orientation = "vertical", ...props }, ref) => {
8623
+ return /* @__PURE__ */ jsx(
8624
+ "div",
8625
+ {
8626
+ ref,
8627
+ "data-orientation": orientation,
8628
+ className: cn("tiptap-card-item-group", className),
8629
+ ...props
8630
+ }
8631
+ );
8632
+ });
8633
+ CardItemGroup.displayName = "CardItemGroup";
8634
+ var CardGroupLabel = forwardRef(
8635
+ ({ className, ...props }, ref) => {
8636
+ return /* @__PURE__ */ jsx(
8637
+ "div",
8638
+ {
8639
+ ref,
8640
+ className: cn("tiptap-card-group-label", className),
8641
+ ...props
8642
+ }
8643
+ );
8644
+ }
8645
+ );
8646
+ CardGroupLabel.displayName = "CardGroupLabel";
8647
+ var CardFooter = forwardRef(
8648
+ ({ className, ...props }, ref) => {
8649
+ return /* @__PURE__ */ jsx(
8650
+ "div",
8651
+ {
8652
+ ref,
8653
+ className: cn("tiptap-card-footer", className),
8654
+ ...props
8655
+ }
8656
+ );
8657
+ }
8658
+ );
8659
+ CardFooter.displayName = "CardFooter";
8586
8660
  var buttonGroupVariants = cva("tiptap-button-group", {
8587
8661
  variants: {
8588
8662
  orientation: {
@@ -21169,5 +21243,5 @@ function ArticleViewer({ content, placeholder = "" }) {
21169
21243
  }
21170
21244
 
21171
21245
  export { ArticleViewer, Audio, CollabContext, CollabProvider, Column, Columns, DEFAULT_MAX_FILE_SIZES, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditorConfigProvider, EditorContentArea, EditorProvider, FileAttachment, FloatingElement, HIDE_FLOATING_META, LoadingSpinner, MediaUploadButton, MediaUploadPlaceholder, NotionEditor, NotionEditorContent, PasteDropMedia, Separator, Spacer, Toolbar, ToolbarGroup, ToolbarSeparator, UiState, UserContext, UserProvider, Video, defaultUiState, detectMediaKind, findSelectionPosition, hasContentAbove, markHideFloatingOnNext, pickFile, resolveMaxSize, runMediaUpload, selectNodeAndHideFloating, useCollab, useCollaboration, useComposedRef, useCursorVisibility, useEditorConfig, useElementRect, useFloatingElement, useFloatingToolbarVisibility, useIsBreakpoint, useIsomorphicLayoutEffect, useMenuNavigation, useOnClickOutside, useThrottledCallback, useUiEditorState, useUnmount, useUser, useWindowSize, use_ui_editor_state_default };
21172
- //# sourceMappingURL=chunk-BBZGFBWU.js.map
21173
- //# sourceMappingURL=chunk-BBZGFBWU.js.map
21246
+ //# sourceMappingURL=chunk-FQCG2HNJ.js.map
21247
+ //# sourceMappingURL=chunk-FQCG2HNJ.js.map