@4399ywkf/editor 0.10.1 → 0.10.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,4 +1,4 @@
1
- import { EditorConfigProvider, NotionEditor } from './chunk-ABXCS4IZ.js';
1
+ import { EditorConfigProvider, NotionEditor } from './chunk-PCM4FATZ.js';
2
2
  import './chunk-MGSVKKK7.js';
3
3
  import './chunk-UD6MDBTN.js';
4
4
  import './chunk-ABMZOL26.js';
@@ -18,5 +18,5 @@ function DocView({ content, contentFormat, readOnly, room, className, onReady })
18
18
  }
19
19
 
20
20
  export { DocView as default };
21
- //# sourceMappingURL=DocView-HCBFGLWI.js.map
22
- //# sourceMappingURL=DocView-HCBFGLWI.js.map
21
+ //# sourceMappingURL=DocView-P72ZRRVW.js.map
22
+ //# sourceMappingURL=DocView-P72ZRRVW.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/views/DocView.tsx"],"names":[],"mappings":";;;;;;AAMe,SAAR,OAAA,CAAyB,EAAE,OAAA,EAAS,aAAA,EAAe,UAAU,IAAA,EAAM,SAAA,EAAW,SAAQ,EAAsB;AACjH,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,aAAA;AAAA,MACA,QAAA;AAAA,MACA,aAAA,EAAe,CAAC,MAAA,KAAmB,OAAA,GAAU,MAAM;AAAA;AAAA,KAEvD,CAAA,EACF,CAAA;AAEJ","file":"DocView-HCBFGLWI.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, contentFormat, 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 contentFormat={contentFormat}\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,OAAA,CAAyB,EAAE,OAAA,EAAS,aAAA,EAAe,UAAU,IAAA,EAAM,SAAA,EAAW,SAAQ,EAAsB;AACjH,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,aAAA;AAAA,MACA,QAAA;AAAA,MACA,aAAA,EAAe,CAAC,MAAA,KAAmB,OAAA,GAAU,MAAM;AAAA;AAAA,KAEvD,CAAA,EACF,CAAA;AAEJ","file":"DocView-P72ZRRVW.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, contentFormat, 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 contentFormat={contentFormat}\n readOnly={readOnly}\n onEditorReady={(editor: Editor) => onReady?.(editor)}\n />\n </EditorConfigProvider>\n </div>\n )\n}\n"]}
@@ -38749,7 +38749,8 @@ var TableActionMenu = () => {
38749
38749
  {
38750
38750
  autoFocusOnShow: true,
38751
38751
  autoFocusOnHide: false,
38752
- modal: true,
38752
+ portal: true,
38753
+ preventBodyScroll: true,
38753
38754
  onClose: resetMenu,
38754
38755
  children: [
38755
38756
  /* @__PURE__ */ jsx(Combobox2, { style: SR_ONLY }),
@@ -39467,21 +39468,24 @@ var TableActionItem2 = ({ action }) => {
39467
39468
  var TableActionMenu2 = ({ onClose }) => {
39468
39469
  const { mergeAction, splitAction, clearAction } = useTableActions();
39469
39470
  const hasMergeOrSplit = mergeAction.isAvailable || splitAction.isAvailable;
39470
- return /* @__PURE__ */ jsxs(MenuContent, { autoFocusOnShow: true, modal: true, onClose, children: [
39471
- /* @__PURE__ */ jsx(Combobox2, { style: SR_ONLY }),
39472
- /* @__PURE__ */ jsxs(ComboboxList2, { style: { minWidth: "15rem" }, children: [
39473
- hasMergeOrSplit && /* @__PURE__ */ jsxs(MenuGroup2, { children: [
39474
- mergeAction.isAvailable && /* @__PURE__ */ jsx(TableActionItem2, { action: mergeAction }),
39475
- splitAction.isAvailable && /* @__PURE__ */ jsx(TableActionItem2, { action: splitAction }),
39476
- /* @__PURE__ */ jsx(Separator, { orientation: "horizontal" })
39477
- ] }),
39478
- /* @__PURE__ */ jsxs(MenuGroup2, { children: [
39479
- /* @__PURE__ */ jsx(ColorMenu, {}),
39480
- /* @__PURE__ */ jsx(TableAlignMenu, {}),
39481
- clearAction.isAvailable && /* @__PURE__ */ jsx(TableActionItem2, { action: clearAction })
39471
+ return (
39472
+ // 不用 modal,原因同 table-handle-menu:modal 会改写编辑器 DOM,选区被 ProseMirror 重置
39473
+ /* @__PURE__ */ jsxs(MenuContent, { autoFocusOnShow: true, portal: true, preventBodyScroll: true, onClose, children: [
39474
+ /* @__PURE__ */ jsx(Combobox2, { style: SR_ONLY }),
39475
+ /* @__PURE__ */ jsxs(ComboboxList2, { style: { minWidth: "15rem" }, children: [
39476
+ hasMergeOrSplit && /* @__PURE__ */ jsxs(MenuGroup2, { children: [
39477
+ mergeAction.isAvailable && /* @__PURE__ */ jsx(TableActionItem2, { action: mergeAction }),
39478
+ splitAction.isAvailable && /* @__PURE__ */ jsx(TableActionItem2, { action: splitAction }),
39479
+ /* @__PURE__ */ jsx(Separator, { orientation: "horizontal" })
39480
+ ] }),
39481
+ /* @__PURE__ */ jsxs(MenuGroup2, { children: [
39482
+ /* @__PURE__ */ jsx(ColorMenu, {}),
39483
+ /* @__PURE__ */ jsx(TableAlignMenu, {}),
39484
+ clearAction.isAvailable && /* @__PURE__ */ jsx(TableActionItem2, { action: clearAction })
39485
+ ] })
39482
39486
  ] })
39483
39487
  ] })
39484
- ] });
39488
+ );
39485
39489
  };
39486
39490
  var TableCellHandleMenu = forwardRef(({ editor: providedEditor, onOpenChange, className, ...props }, ref) => {
39487
39491
  const { editor } = useTiptapEditor(providedEditor);
@@ -51651,5 +51655,5 @@ function ArticleViewer({
51651
51655
  }
51652
51656
 
51653
51657
  export { ApiParamExtension, ArticleViewer, Audio, CalloutExtension, CodeBlockExtension, CodeGroupExtension, CollabContext, CollabProvider, Column, Columns, DEFAULT_DOC_PERMISSIONS, DEFAULT_MAX_FILE_SIZES, DOC_WIDTHS, DetailsExtension, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditorConfigProvider, EditorContentArea, EditorProvider, EditorThemeStyle, FileAttachment, FileInline, FloatingElement, HIDE_FLOATING_META, LoadingSpinner, MediaUploadButton, MediaUploadPlaceholder, NotionEditor, NotionEditorContent, PasteDropMedia, Separator, Spacer, Toolbar, ToolbarGroup, ToolbarSeparator, UiState, UserContext, UserProvider, VIEW_MODE_TOAST, Video, ViewModeSwitch, WidthModeMenu, countDocument, countRange, countText, defaultUiState, detectMediaKind, findSelectionPosition, getDocPermissions, getEditorMarkdown, hasContentAbove, markHideFloatingOnNext, parseEditorContent, pickFile, printDocument, renderHighlightedHTML, resolveEditorTheme, resolveMaxSize, runMediaUpload, selectNodeAndHideFloating, serializeEditorMarkdown, useCollab, useCollaboration, useComposedRef, useCursorVisibility, useEditorConfig, useElementRect, useFloatingElement, useFloatingToolbarVisibility, useIsBreakpoint, useIsomorphicLayoutEffect, useMenuNavigation, useOnClickOutside, useThrottledCallback, useUiEditorState, useUnmount, useUser, useViewMode, useWidthMode, useWindowSize, use_ui_editor_state_default };
51654
- //# sourceMappingURL=chunk-ABXCS4IZ.js.map
51655
- //# sourceMappingURL=chunk-ABXCS4IZ.js.map
51658
+ //# sourceMappingURL=chunk-PCM4FATZ.js.map
51659
+ //# sourceMappingURL=chunk-PCM4FATZ.js.map