@4399ywkf/editor 0.13.2 → 0.14.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/dist/{DocView-K6PKSJII.js → DocView-FYAAUPSK.js} +3 -3
- package/dist/{DocView-K6PKSJII.js.map → DocView-FYAAUPSK.js.map} +1 -1
- package/dist/{chunk-I4FESO5C.js → chunk-6BJB4YWS.js} +35 -7
- package/dist/{chunk-I4FESO5C.js.map → chunk-6BJB4YWS.js.map} +1 -1
- package/dist/doc-standalone.js +49 -22
- package/dist/doc-standalone.js.map +1 -1
- package/dist/doc.d.ts +27 -5
- package/dist/doc.js +17 -19
- package/dist/doc.js.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorConfigProvider, NotionEditor } from './chunk-
|
|
1
|
+
import { EditorConfigProvider, NotionEditor } from './chunk-6BJB4YWS.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-
|
|
22
|
-
//# sourceMappingURL=DocView-
|
|
21
|
+
//# sourceMappingURL=DocView-FYAAUPSK.js.map
|
|
22
|
+
//# sourceMappingURL=DocView-FYAAUPSK.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-
|
|
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-FYAAUPSK.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"]}
|
|
@@ -52211,7 +52211,12 @@ function LoadingSpinner({ text = "Connecting..." }) {
|
|
|
52211
52211
|
/* @__PURE__ */ jsx("div", { className: "spinner-loading-text", children: text })
|
|
52212
52212
|
] }) });
|
|
52213
52213
|
}
|
|
52214
|
-
function EditorContentArea({
|
|
52214
|
+
function EditorContentArea({
|
|
52215
|
+
hideFloatingToolbar = false,
|
|
52216
|
+
hideSlashMenu = false,
|
|
52217
|
+
hideDragHandle = false,
|
|
52218
|
+
hideEmojiMenu = false
|
|
52219
|
+
}) {
|
|
52215
52220
|
const { editor } = useContext(EditorContext);
|
|
52216
52221
|
useScrollToHash();
|
|
52217
52222
|
if (!editor) {
|
|
@@ -52237,10 +52242,10 @@ function EditorContentArea({ hideFloatingToolbar = false }) {
|
|
|
52237
52242
|
/* @__PURE__ */ jsx(FindReplacePanel, { editor }),
|
|
52238
52243
|
/* @__PURE__ */ jsx(WordCountBadge, { editor }),
|
|
52239
52244
|
isEditable && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
52240
|
-
/* @__PURE__ */ jsx(DragContextMenu, {}),
|
|
52241
|
-
/* @__PURE__ */ jsx(EmojiDropdownMenu, {}),
|
|
52245
|
+
!hideDragHandle && /* @__PURE__ */ jsx(DragContextMenu, {}),
|
|
52246
|
+
!hideEmojiMenu && /* @__PURE__ */ jsx(EmojiDropdownMenu, {}),
|
|
52242
52247
|
/* @__PURE__ */ jsx(MentionDropdownMenu, {}),
|
|
52243
|
-
/* @__PURE__ */ jsx(SlashDropdownMenu, {}),
|
|
52248
|
+
!hideSlashMenu && /* @__PURE__ */ jsx(SlashDropdownMenu, {}),
|
|
52244
52249
|
!hideFloatingToolbar && /* @__PURE__ */ jsx(NotionToolbarFloating, {}),
|
|
52245
52250
|
/* @__PURE__ */ jsx(MathEditorPopover, { editor }),
|
|
52246
52251
|
/* @__PURE__ */ jsx(LinkPastePanel, { editor }),
|
|
@@ -52268,6 +52273,9 @@ function EditorProvider(props) {
|
|
|
52268
52273
|
permissions,
|
|
52269
52274
|
hideHeader = false,
|
|
52270
52275
|
hideFloatingToolbar = false,
|
|
52276
|
+
hideSlashMenu = false,
|
|
52277
|
+
hideDragHandle = false,
|
|
52278
|
+
hideEmojiMenu = false,
|
|
52271
52279
|
embedded = false,
|
|
52272
52280
|
richMarkdown = false,
|
|
52273
52281
|
sendKey,
|
|
@@ -52746,7 +52754,15 @@ function EditorProvider(props) {
|
|
|
52746
52754
|
/* @__PURE__ */ jsx(ReadModeSelectionBar, { editor }),
|
|
52747
52755
|
!readOnly && !hideHeader && /* @__PURE__ */ jsx(NotionEditorHeader, {}),
|
|
52748
52756
|
/* @__PURE__ */ jsxs("div", { className: "notion-like-editor-layout", "data-width-mode": widthModeValue, children: [
|
|
52749
|
-
/* @__PURE__ */ jsx(
|
|
52757
|
+
/* @__PURE__ */ jsx(
|
|
52758
|
+
EditorContentArea,
|
|
52759
|
+
{
|
|
52760
|
+
hideFloatingToolbar,
|
|
52761
|
+
hideSlashMenu,
|
|
52762
|
+
hideDragHandle,
|
|
52763
|
+
hideEmojiMenu
|
|
52764
|
+
}
|
|
52765
|
+
),
|
|
52750
52766
|
!embedded && /* @__PURE__ */ jsx(TocSidebar, { topOffset: 48 })
|
|
52751
52767
|
] }),
|
|
52752
52768
|
isEditable && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
@@ -52777,6 +52793,9 @@ function NotionEditor({
|
|
|
52777
52793
|
readOnly = false,
|
|
52778
52794
|
hideHeader = false,
|
|
52779
52795
|
hideFloatingToolbar = false,
|
|
52796
|
+
hideSlashMenu = false,
|
|
52797
|
+
hideDragHandle = false,
|
|
52798
|
+
hideEmojiMenu = false,
|
|
52780
52799
|
embedded = false,
|
|
52781
52800
|
richMarkdown = false,
|
|
52782
52801
|
sendKey,
|
|
@@ -52809,6 +52828,9 @@ function NotionEditor({
|
|
|
52809
52828
|
permissions,
|
|
52810
52829
|
hideHeader,
|
|
52811
52830
|
hideFloatingToolbar,
|
|
52831
|
+
hideSlashMenu,
|
|
52832
|
+
hideDragHandle,
|
|
52833
|
+
hideEmojiMenu,
|
|
52812
52834
|
embedded,
|
|
52813
52835
|
richMarkdown,
|
|
52814
52836
|
sendKey,
|
|
@@ -52838,6 +52860,9 @@ function NotionEditorContent({
|
|
|
52838
52860
|
permissions,
|
|
52839
52861
|
hideHeader = false,
|
|
52840
52862
|
hideFloatingToolbar = false,
|
|
52863
|
+
hideSlashMenu = false,
|
|
52864
|
+
hideDragHandle = false,
|
|
52865
|
+
hideEmojiMenu = false,
|
|
52841
52866
|
embedded = false,
|
|
52842
52867
|
richMarkdown = false,
|
|
52843
52868
|
sendKey,
|
|
@@ -52875,6 +52900,9 @@ function NotionEditorContent({
|
|
|
52875
52900
|
permissions,
|
|
52876
52901
|
hideHeader,
|
|
52877
52902
|
hideFloatingToolbar,
|
|
52903
|
+
hideSlashMenu,
|
|
52904
|
+
hideDragHandle,
|
|
52905
|
+
hideEmojiMenu,
|
|
52878
52906
|
embedded,
|
|
52879
52907
|
richMarkdown,
|
|
52880
52908
|
sendKey,
|
|
@@ -52923,5 +52951,5 @@ function ArticleViewer({
|
|
|
52923
52951
|
}
|
|
52924
52952
|
|
|
52925
52953
|
export { ApiParamExtension, ArticleViewer, Audio, CalloutExtension, CodeBlockExtension, CodeGroupExtension, CollabContext, CollabProvider, Column, Columns, CommentThread, 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, WIDTH_MODE_ITEMS, WIDTH_MODE_MENU_HEADER, WIDTH_MODE_MENU_TITLE, countDocument, countRange, countText, defaultUiState, detectMediaKind, findSelectionPosition, getDocPermissions, getEditorMarkdown, hasContentAbove, markHideFloatingOnNext, parseEditorContent, pickFile, printDocument, refreshCommentThreadInteractivity, 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 };
|
|
52926
|
-
//# sourceMappingURL=chunk-
|
|
52927
|
-
//# sourceMappingURL=chunk-
|
|
52954
|
+
//# sourceMappingURL=chunk-6BJB4YWS.js.map
|
|
52955
|
+
//# sourceMappingURL=chunk-6BJB4YWS.js.map
|