@4399ywkf/editor 0.14.0 → 0.14.1
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-FYAAUPSK.js → DocView-MZKHSN67.js} +3 -3
- package/dist/{DocView-FYAAUPSK.js.map → DocView-MZKHSN67.js.map} +1 -1
- package/dist/{chunk-6BJB4YWS.js → chunk-IKYVPJQ5.js} +50 -8
- package/dist/chunk-IKYVPJQ5.js.map +1 -0
- package/dist/doc-standalone.js +112 -68
- package/dist/doc-standalone.js.map +1 -1
- package/dist/doc.js +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-6BJB4YWS.js.map +0 -1
package/dist/doc-standalone.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactFlowProvider, Position, MarkerType, useNodesState, useEdgesState, useReactFlow, addEdge, ReactFlow, ConnectionMode, Background, Controls, Panel, Handle } from '@xyflow/react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import React__default, { createContext, forwardRef, useState, useEffect, memo, isValidElement, version, cloneElement, useMemo, useCallback, lazy, useLayoutEffect, useRef, useContext, Fragment as Fragment$2, createRef, createElement,
|
|
3
|
+
import React__default, { createContext, forwardRef, useState, useEffect, memo, isValidElement, version, cloneElement, useMemo, useCallback, lazy, useLayoutEffect, useRef, useContext, Fragment as Fragment$2, useDebugValue, createRef, createElement, Suspense, useReducer, useId, Children } from 'react';
|
|
4
4
|
import { jsxs, Fragment as Fragment$1, jsx } from 'react/jsx-runtime';
|
|
5
5
|
import ReactDOM, { flushSync, createPortal } from 'react-dom';
|
|
6
6
|
import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js';
|
|
@@ -1722,18 +1722,18 @@ var ResolvedPos = class _ResolvedPos {
|
|
|
1722
1722
|
@internal
|
|
1723
1723
|
*/
|
|
1724
1724
|
static resolveCached(doc4, pos) {
|
|
1725
|
-
let
|
|
1726
|
-
if (
|
|
1727
|
-
for (let i = 0; i <
|
|
1728
|
-
let elt =
|
|
1725
|
+
let cache3 = resolveCache.get(doc4);
|
|
1726
|
+
if (cache3) {
|
|
1727
|
+
for (let i = 0; i < cache3.elts.length; i++) {
|
|
1728
|
+
let elt = cache3.elts[i];
|
|
1729
1729
|
if (elt.pos == pos)
|
|
1730
1730
|
return elt;
|
|
1731
1731
|
}
|
|
1732
1732
|
} else {
|
|
1733
|
-
resolveCache.set(doc4,
|
|
1733
|
+
resolveCache.set(doc4, cache3 = new ResolveCache());
|
|
1734
1734
|
}
|
|
1735
|
-
let result =
|
|
1736
|
-
|
|
1735
|
+
let result = cache3.elts[cache3.i] = _ResolvedPos.resolve(doc4, pos);
|
|
1736
|
+
cache3.i = (cache3.i + 1) % resolveCacheSize;
|
|
1737
1737
|
return result;
|
|
1738
1738
|
}
|
|
1739
1739
|
};
|
|
@@ -20075,17 +20075,17 @@ function createIsCircular(areItemsEqual) {
|
|
|
20075
20075
|
if (!a || !b || typeof a !== "object" || typeof b !== "object") {
|
|
20076
20076
|
return areItemsEqual(a, b, state);
|
|
20077
20077
|
}
|
|
20078
|
-
const { cache:
|
|
20079
|
-
const cachedA =
|
|
20080
|
-
const cachedB =
|
|
20078
|
+
const { cache: cache3 } = state;
|
|
20079
|
+
const cachedA = cache3.get(a);
|
|
20080
|
+
const cachedB = cache3.get(b);
|
|
20081
20081
|
if (cachedA && cachedB) {
|
|
20082
20082
|
return cachedA === b && cachedB === a;
|
|
20083
20083
|
}
|
|
20084
|
-
|
|
20085
|
-
|
|
20084
|
+
cache3.set(a, b);
|
|
20085
|
+
cache3.set(b, a);
|
|
20086
20086
|
const result = areItemsEqual(a, b, state);
|
|
20087
|
-
|
|
20088
|
-
|
|
20087
|
+
cache3.delete(a);
|
|
20088
|
+
cache3.delete(b);
|
|
20089
20089
|
return result;
|
|
20090
20090
|
};
|
|
20091
20091
|
}
|
|
@@ -20440,9 +20440,9 @@ function createInternalEqualityComparator(compare) {
|
|
|
20440
20440
|
function createIsEqual({ circular, comparator, createState, equals: equals2, strict }) {
|
|
20441
20441
|
if (createState) {
|
|
20442
20442
|
return function isEqual(a, b) {
|
|
20443
|
-
const { cache:
|
|
20443
|
+
const { cache: cache3 = circular ? /* @__PURE__ */ new WeakMap() : void 0, meta } = createState();
|
|
20444
20444
|
return comparator(a, b, {
|
|
20445
|
-
cache:
|
|
20445
|
+
cache: cache3,
|
|
20446
20446
|
equals: equals2,
|
|
20447
20447
|
meta,
|
|
20448
20448
|
strict
|
|
@@ -45293,9 +45293,27 @@ function editorComponentCss(ctx) {
|
|
|
45293
45293
|
return COMPONENT_STYLES.map((fn) => fn(ctx)).join("\n");
|
|
45294
45294
|
}
|
|
45295
45295
|
var SSR_PSEUDO_FLAG = "/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */";
|
|
45296
|
+
var PSEUDO = /:(?:first|nth|nth-last)-child/;
|
|
45297
|
+
function markUnsafePseudo(flat) {
|
|
45298
|
+
const parts = [];
|
|
45299
|
+
let segStart = 0;
|
|
45300
|
+
for (let i = 0; i < flat.length; i++) {
|
|
45301
|
+
const ch = flat.charCodeAt(i);
|
|
45302
|
+
if (ch !== 123 && ch !== 125) continue;
|
|
45303
|
+
const seg = flat.slice(segStart, i);
|
|
45304
|
+
parts.push(ch === 123 && PSEUDO.test(seg) ? `${seg} ${SSR_PSEUDO_FLAG} {` : seg + flat[i]);
|
|
45305
|
+
segStart = i + 1;
|
|
45306
|
+
}
|
|
45307
|
+
parts.push(flat.slice(segStart));
|
|
45308
|
+
return parts.join("");
|
|
45309
|
+
}
|
|
45310
|
+
var cache;
|
|
45296
45311
|
function prepareForEmotion(css) {
|
|
45312
|
+
if (cache?.input === css) return cache.output;
|
|
45297
45313
|
const flat = serialize(compile(css), stringify).replace(/\n/g, " ");
|
|
45298
|
-
|
|
45314
|
+
const output = markUnsafePseudo(flat);
|
|
45315
|
+
cache = { input: css, output };
|
|
45316
|
+
return output;
|
|
45299
45317
|
}
|
|
45300
45318
|
|
|
45301
45319
|
// src/theme/base-vars.ts
|
|
@@ -46811,8 +46829,8 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
|
|
|
46811
46829
|
}
|
|
46812
46830
|
return rectToClientRect(rect);
|
|
46813
46831
|
}
|
|
46814
|
-
function getClippingElementAncestors(element,
|
|
46815
|
-
const cachedResult2 =
|
|
46832
|
+
function getClippingElementAncestors(element, cache3) {
|
|
46833
|
+
const cachedResult2 = cache3.get(element);
|
|
46816
46834
|
if (cachedResult2) {
|
|
46817
46835
|
return cachedResult2;
|
|
46818
46836
|
}
|
|
@@ -46832,7 +46850,7 @@ function getClippingElementAncestors(element, cache2) {
|
|
|
46832
46850
|
}
|
|
46833
46851
|
currentNode = getParentNode(currentNode);
|
|
46834
46852
|
}
|
|
46835
|
-
|
|
46853
|
+
cache3.set(element, result);
|
|
46836
46854
|
return result;
|
|
46837
46855
|
}
|
|
46838
46856
|
function getClippingRect(_ref) {
|
|
@@ -47129,12 +47147,12 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
47129
47147
|
var offset2 = offset;
|
|
47130
47148
|
var flip2 = flip;
|
|
47131
47149
|
var computePosition2 = (reference, floating, options) => {
|
|
47132
|
-
const
|
|
47150
|
+
const cache3 = /* @__PURE__ */ new Map();
|
|
47133
47151
|
const mergedOptions = options != null ? options : {};
|
|
47134
47152
|
const platformWithCache = {
|
|
47135
47153
|
...platform,
|
|
47136
47154
|
...mergedOptions.platform,
|
|
47137
|
-
_c:
|
|
47155
|
+
_c: cache3
|
|
47138
47156
|
};
|
|
47139
47157
|
return computePosition(reference, floating, {
|
|
47140
47158
|
...mergedOptions,
|
|
@@ -47853,13 +47871,13 @@ var emoji_regex_default = () => {
|
|
|
47853
47871
|
};
|
|
47854
47872
|
|
|
47855
47873
|
// ../../node_modules/.pnpm/is-emoji-supported@0.0.5/node_modules/is-emoji-supported/dist/esm/is-emoji-supported.js
|
|
47856
|
-
var
|
|
47874
|
+
var cache2 = /* @__PURE__ */ new Map();
|
|
47857
47875
|
function isEmojiSupported(unicode) {
|
|
47858
|
-
if (
|
|
47859
|
-
return
|
|
47876
|
+
if (cache2.has(unicode)) {
|
|
47877
|
+
return cache2.get(unicode);
|
|
47860
47878
|
}
|
|
47861
47879
|
var supported = isSupported(unicode);
|
|
47862
|
-
|
|
47880
|
+
cache2.set(unicode, supported);
|
|
47863
47881
|
return supported;
|
|
47864
47882
|
}
|
|
47865
47883
|
var isSupported = (function() {
|
|
@@ -71961,23 +71979,23 @@ function useTiptapEditor(providedEditor) {
|
|
|
71961
71979
|
var readFromCache;
|
|
71962
71980
|
var addToCache;
|
|
71963
71981
|
if (typeof WeakMap != "undefined") {
|
|
71964
|
-
let
|
|
71965
|
-
readFromCache = (key) =>
|
|
71982
|
+
let cache3 = /* @__PURE__ */ new WeakMap();
|
|
71983
|
+
readFromCache = (key) => cache3.get(key);
|
|
71966
71984
|
addToCache = (key, value) => {
|
|
71967
|
-
|
|
71985
|
+
cache3.set(key, value);
|
|
71968
71986
|
return value;
|
|
71969
71987
|
};
|
|
71970
71988
|
} else {
|
|
71971
|
-
const
|
|
71989
|
+
const cache3 = [];
|
|
71972
71990
|
const cacheSize = 10;
|
|
71973
71991
|
let cachePos = 0;
|
|
71974
71992
|
readFromCache = (key) => {
|
|
71975
|
-
for (let i = 0; i <
|
|
71993
|
+
for (let i = 0; i < cache3.length; i += 2) if (cache3[i] == key) return cache3[i + 1];
|
|
71976
71994
|
};
|
|
71977
71995
|
addToCache = (key, value) => {
|
|
71978
71996
|
if (cachePos == cacheSize) cachePos = 0;
|
|
71979
|
-
|
|
71980
|
-
return
|
|
71997
|
+
cache3[cachePos++] = key;
|
|
71998
|
+
return cache3[cachePos++] = value;
|
|
71981
71999
|
};
|
|
71982
72000
|
}
|
|
71983
72001
|
var TableMap = class {
|
|
@@ -75303,6 +75321,32 @@ var UiState = Extension.create({
|
|
|
75303
75321
|
}
|
|
75304
75322
|
});
|
|
75305
75323
|
|
|
75324
|
+
// src/lib/react-node-view-renderer.ts
|
|
75325
|
+
function isReactRenderMutation(mutation, dom, contentDOM) {
|
|
75326
|
+
if (mutation.type !== "childList" || !dom || !contentDOM) return false;
|
|
75327
|
+
if (contentDOM.contains(mutation.target)) return false;
|
|
75328
|
+
if (mutation.target === dom) return true;
|
|
75329
|
+
const changed = [
|
|
75330
|
+
...Array.from(mutation.addedNodes ?? []),
|
|
75331
|
+
...Array.from(mutation.removedNodes ?? [])
|
|
75332
|
+
];
|
|
75333
|
+
return changed.includes(contentDOM);
|
|
75334
|
+
}
|
|
75335
|
+
function guardReactRenderMutations(view) {
|
|
75336
|
+
const v = view;
|
|
75337
|
+
const original = v.ignoreMutation;
|
|
75338
|
+
if (typeof original !== "function") return view;
|
|
75339
|
+
v.ignoreMutation = (mutation) => {
|
|
75340
|
+
if (isReactRenderMutation(mutation, v.dom, v.contentDOM)) return true;
|
|
75341
|
+
return original.call(view, mutation);
|
|
75342
|
+
};
|
|
75343
|
+
return view;
|
|
75344
|
+
}
|
|
75345
|
+
function ReactNodeViewRenderer2(component, options) {
|
|
75346
|
+
const create4 = ReactNodeViewRenderer(component, options);
|
|
75347
|
+
return (props) => guardReactRenderMutations(create4(props));
|
|
75348
|
+
}
|
|
75349
|
+
|
|
75306
75350
|
// ../../node_modules/.pnpm/@tiptap+extension-image@3.30.0_@tiptap+core@3.30.0_@tiptap+pm@3.30.0_/node_modules/@tiptap/extension-image/dist/index.js
|
|
75307
75351
|
var inputRegex5 = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/;
|
|
75308
75352
|
var Image2 = Node3.create({
|
|
@@ -76367,7 +76411,7 @@ var Image3 = Image2.extend({
|
|
|
76367
76411
|
};
|
|
76368
76412
|
},
|
|
76369
76413
|
addNodeView() {
|
|
76370
|
-
return
|
|
76414
|
+
return ReactNodeViewRenderer2(ImageNodeView);
|
|
76371
76415
|
}
|
|
76372
76416
|
});
|
|
76373
76417
|
|
|
@@ -76956,7 +77000,7 @@ var TocNode = Node3.create({
|
|
|
76956
77000
|
];
|
|
76957
77001
|
},
|
|
76958
77002
|
addNodeView() {
|
|
76959
|
-
return
|
|
77003
|
+
return ReactNodeViewRenderer2(TocNodeComponent, {
|
|
76960
77004
|
stopEvent: ({ event }) => {
|
|
76961
77005
|
if (!(event instanceof MouseEvent)) return false;
|
|
76962
77006
|
const el = event.target;
|
|
@@ -78379,7 +78423,7 @@ function CoverPanel({
|
|
|
78379
78423
|
// src/components/tiptap-node/page-header-node/page-header-node-extension.ts
|
|
78380
78424
|
var PageHeader = PageHeaderSchema.extend({
|
|
78381
78425
|
addNodeView() {
|
|
78382
|
-
return
|
|
78426
|
+
return ReactNodeViewRenderer2(PageHeaderNodeView);
|
|
78383
78427
|
}
|
|
78384
78428
|
});
|
|
78385
78429
|
function useFocusAfterMount(ref, enabled = true) {
|
|
@@ -79839,7 +79883,7 @@ function createCodeHighlighter(options = {}, deps = {}) {
|
|
|
79839
79883
|
const aliases = { ...DEFAULT_ALIASES, ...options.languageAliases ?? {} };
|
|
79840
79884
|
configSerial += 1;
|
|
79841
79885
|
const configId = configSerial;
|
|
79842
|
-
const
|
|
79886
|
+
const cache3 = /* @__PURE__ */ new Map();
|
|
79843
79887
|
let cachedSourceLength = 0;
|
|
79844
79888
|
let customLanguagesLoaded = null;
|
|
79845
79889
|
const normalizeLanguage = (input) => {
|
|
@@ -79848,18 +79892,18 @@ function createCodeHighlighter(options = {}, deps = {}) {
|
|
|
79848
79892
|
return aliases[raw] ?? raw;
|
|
79849
79893
|
};
|
|
79850
79894
|
const evict = () => {
|
|
79851
|
-
while (
|
|
79852
|
-
const oldest =
|
|
79895
|
+
while (cache3.size > CACHE_MAX_ENTRIES || cachedSourceLength > CACHE_MAX_SOURCE_LENGTH) {
|
|
79896
|
+
const oldest = cache3.keys().next();
|
|
79853
79897
|
if (oldest.done) break;
|
|
79854
|
-
const entry =
|
|
79855
|
-
|
|
79898
|
+
const entry = cache3.get(oldest.value);
|
|
79899
|
+
cache3.delete(oldest.value);
|
|
79856
79900
|
if (entry) cachedSourceLength -= entry.size;
|
|
79857
79901
|
}
|
|
79858
79902
|
};
|
|
79859
79903
|
const forget = (key) => {
|
|
79860
|
-
const entry =
|
|
79904
|
+
const entry = cache3.get(key);
|
|
79861
79905
|
if (!entry) return;
|
|
79862
|
-
|
|
79906
|
+
cache3.delete(key);
|
|
79863
79907
|
cachedSourceLength -= entry.size;
|
|
79864
79908
|
};
|
|
79865
79909
|
const ensureCustomLanguages = (highlighter) => {
|
|
@@ -79901,17 +79945,17 @@ function createCodeHighlighter(options = {}, deps = {}) {
|
|
|
79901
79945
|
if (lang === PLAINTEXT && !source) return Promise.resolve(plaintextResult(source));
|
|
79902
79946
|
if (exceedsLimits(source)) return Promise.resolve(plaintextResult(source));
|
|
79903
79947
|
const key = `${configId}\0${resolvedTheme}\0${lang}\0${source}`;
|
|
79904
|
-
const hit =
|
|
79948
|
+
const hit = cache3.get(key);
|
|
79905
79949
|
if (hit) {
|
|
79906
|
-
|
|
79907
|
-
|
|
79950
|
+
cache3.delete(key);
|
|
79951
|
+
cache3.set(key, hit);
|
|
79908
79952
|
return hit.promise;
|
|
79909
79953
|
}
|
|
79910
79954
|
const promise = run4(source, lang, resolvedTheme).catch(() => {
|
|
79911
79955
|
forget(key);
|
|
79912
79956
|
return plaintextResult(source);
|
|
79913
79957
|
});
|
|
79914
|
-
|
|
79958
|
+
cache3.set(key, { promise, size: source.length });
|
|
79915
79959
|
cachedSourceLength += source.length;
|
|
79916
79960
|
evict();
|
|
79917
79961
|
return promise;
|
|
@@ -80804,7 +80848,7 @@ function EmbedInput({
|
|
|
80804
80848
|
// src/components/tiptap-node/embed-node/embed-node-extension.ts
|
|
80805
80849
|
var Embed = EmbedSchema.extend({
|
|
80806
80850
|
addNodeView() {
|
|
80807
|
-
return
|
|
80851
|
+
return ReactNodeViewRenderer2(EmbedNodeView);
|
|
80808
80852
|
}
|
|
80809
80853
|
});
|
|
80810
80854
|
function BookmarkNodeView(props) {
|
|
@@ -80977,7 +81021,7 @@ var BookmarkSchema = Node3.create({
|
|
|
80977
81021
|
// src/components/tiptap-node/bookmark-node/bookmark-node-extension.ts
|
|
80978
81022
|
var Bookmark = BookmarkSchema.extend({
|
|
80979
81023
|
addNodeView() {
|
|
80980
|
-
return
|
|
81024
|
+
return ReactNodeViewRenderer2(BookmarkNodeView);
|
|
80981
81025
|
}
|
|
80982
81026
|
});
|
|
80983
81027
|
function LinkPastePanel({ editor }) {
|
|
@@ -87230,7 +87274,7 @@ var PencilGlyph = () => /* @__PURE__ */ jsxs("svg", { width: "16", height: "16",
|
|
|
87230
87274
|
// src/components/tiptap-node/inline-button-node/inline-button-node-extension.ts
|
|
87231
87275
|
var InlineButton = InlineButtonSchema.extend({
|
|
87232
87276
|
addNodeView() {
|
|
87233
|
-
return
|
|
87277
|
+
return ReactNodeViewRenderer2(InlineButtonNodeView, { as: "span" });
|
|
87234
87278
|
}
|
|
87235
87279
|
});
|
|
87236
87280
|
|
|
@@ -88030,7 +88074,7 @@ function TimeInput({ value, onPick }) {
|
|
|
88030
88074
|
// src/components/tiptap-node/reminder-node/reminder-node-extension.ts
|
|
88031
88075
|
var Reminder = ReminderSchema.extend({
|
|
88032
88076
|
addNodeView() {
|
|
88033
|
-
return
|
|
88077
|
+
return ReactNodeViewRenderer2(ReminderNodeView, { as: "span" });
|
|
88034
88078
|
}
|
|
88035
88079
|
});
|
|
88036
88080
|
|
|
@@ -88859,7 +88903,7 @@ var AgendaItemContentSchema = Node3.create({
|
|
|
88859
88903
|
var Agenda = AgendaSchema.extend({ priority: 200 });
|
|
88860
88904
|
var AgendaItem = AgendaItemSchema.extend({
|
|
88861
88905
|
addNodeView() {
|
|
88862
|
-
return
|
|
88906
|
+
return ReactNodeViewRenderer2(AgendaItemView);
|
|
88863
88907
|
}
|
|
88864
88908
|
});
|
|
88865
88909
|
var AgendaItemTitle = AgendaItemTitleSchema.extend({ priority: 200 });
|
|
@@ -89808,7 +89852,7 @@ var UnlinkGlyph = () => /* @__PURE__ */ jsx(Glyph, { d: "M15 7h2a5 5 0 0 1 0 10h
|
|
|
89808
89852
|
// src/components/tiptap-node/synced-block-node/synced-block-extension.ts
|
|
89809
89853
|
var SyncedBlock = SyncedBlockSchema.extend({
|
|
89810
89854
|
addNodeView() {
|
|
89811
|
-
return
|
|
89855
|
+
return ReactNodeViewRenderer2(SyncedBlockView);
|
|
89812
89856
|
}
|
|
89813
89857
|
});
|
|
89814
89858
|
|
|
@@ -90047,7 +90091,7 @@ function MermaidNodeView({ node, editor, updateAttributes: updateAttributes2, se
|
|
|
90047
90091
|
// src/components/tiptap-node/mermaid-node/mermaid-extension.ts
|
|
90048
90092
|
var Mermaid = MermaidSchema.extend({
|
|
90049
90093
|
addNodeView() {
|
|
90050
|
-
return
|
|
90094
|
+
return ReactNodeViewRenderer2(MermaidNodeView);
|
|
90051
90095
|
},
|
|
90052
90096
|
onCreate() {
|
|
90053
90097
|
if (!this.editor.isEditable) return;
|
|
@@ -90065,7 +90109,7 @@ var Poll = PollSchema.extend({
|
|
|
90065
90109
|
return { enabled: false, userId: null };
|
|
90066
90110
|
},
|
|
90067
90111
|
addNodeView() {
|
|
90068
|
-
return
|
|
90112
|
+
return ReactNodeViewRenderer2(PollNodeView);
|
|
90069
90113
|
}
|
|
90070
90114
|
});
|
|
90071
90115
|
function PollConfigBridge({ editor }) {
|
|
@@ -90437,7 +90481,7 @@ ${toMermaid(normalizeDiagram(node.attrs?.data))}
|
|
|
90437
90481
|
// src/components/tiptap-node/diagram-node/diagram-node-extension.ts
|
|
90438
90482
|
var Diagram = DiagramSchema.extend({
|
|
90439
90483
|
addNodeView() {
|
|
90440
|
-
return
|
|
90484
|
+
return ReactNodeViewRenderer2(DiagramNodeView);
|
|
90441
90485
|
}
|
|
90442
90486
|
});
|
|
90443
90487
|
function HeadingNumberMenu({ editor }) {
|
|
@@ -91048,7 +91092,7 @@ var ImageUploadNode2 = Node3.create({
|
|
|
91048
91092
|
];
|
|
91049
91093
|
},
|
|
91050
91094
|
addNodeView() {
|
|
91051
|
-
return
|
|
91095
|
+
return ReactNodeViewRenderer2(ImageUploadNode);
|
|
91052
91096
|
},
|
|
91053
91097
|
addCommands() {
|
|
91054
91098
|
return {
|
|
@@ -91313,7 +91357,7 @@ var Video = Node3.create({
|
|
|
91313
91357
|
// 可编辑时还要拦下缩放把手上的事件:不然 PM 把按住把手当成选中 / 拖动整个节点。
|
|
91314
91358
|
// atom 节点的 DOM 变化 ReactNodeView 默认就忽略,不用再写 ignoreMutation。
|
|
91315
91359
|
addNodeView() {
|
|
91316
|
-
return
|
|
91360
|
+
return ReactNodeViewRenderer2(VideoNodeView, {
|
|
91317
91361
|
stopEvent: ({ event }) => !this.editor.isEditable || event.target instanceof Element && event.target.closest(".tiptap-video-handle") !== null
|
|
91318
91362
|
});
|
|
91319
91363
|
}
|
|
@@ -91991,12 +92035,12 @@ var FileInlineSchema = Node3.create({
|
|
|
91991
92035
|
// src/components/tiptap-node/file-attachment-node/file-attachment-node-extension.ts
|
|
91992
92036
|
var FileAttachment = FileAttachmentSchema.extend({
|
|
91993
92037
|
addNodeView() {
|
|
91994
|
-
return
|
|
92038
|
+
return ReactNodeViewRenderer2(FileAttachmentNodeView);
|
|
91995
92039
|
}
|
|
91996
92040
|
});
|
|
91997
92041
|
var FileInline = FileInlineSchema.extend({
|
|
91998
92042
|
addNodeView() {
|
|
91999
|
-
return
|
|
92043
|
+
return ReactNodeViewRenderer2(FileInlineNodeView, { as: "span" });
|
|
92000
92044
|
}
|
|
92001
92045
|
});
|
|
92002
92046
|
|
|
@@ -92179,7 +92223,7 @@ var MediaUploadPlaceholder = Node3.create({
|
|
|
92179
92223
|
];
|
|
92180
92224
|
},
|
|
92181
92225
|
addNodeView() {
|
|
92182
|
-
return
|
|
92226
|
+
return ReactNodeViewRenderer2(MediaUploadPlaceholderNodeView);
|
|
92183
92227
|
}
|
|
92184
92228
|
});
|
|
92185
92229
|
|
|
@@ -93046,7 +93090,7 @@ var PlusGlyph = () => /* @__PURE__ */ jsxs("svg", { className: "tiptap-columns-g
|
|
|
93046
93090
|
// src/components/tiptap-node/column-node/column-node-extension.ts
|
|
93047
93091
|
var Columns = ColumnsSchema.extend({
|
|
93048
93092
|
addNodeView() {
|
|
93049
|
-
return
|
|
93093
|
+
return ReactNodeViewRenderer2(ColumnsNodeView);
|
|
93050
93094
|
},
|
|
93051
93095
|
// 栏里第一个块开头按 Backspace:空块删掉(这栏随之去掉)、有字接到上一栏末尾(飞书)
|
|
93052
93096
|
addKeyboardShortcuts() {
|
|
@@ -93517,7 +93561,7 @@ var PasteColorSnap = Extension.create({
|
|
|
93517
93561
|
// src/components/tiptap-node/code-block-node/code-block-node-extension.ts
|
|
93518
93562
|
var CodeBlockExtension = CodeBlockSchema.extend({
|
|
93519
93563
|
addNodeView() {
|
|
93520
|
-
return
|
|
93564
|
+
return ReactNodeViewRenderer2(CodeBlockNodeView, {
|
|
93521
93565
|
contentDOMElementTag: "code"
|
|
93522
93566
|
});
|
|
93523
93567
|
}
|
|
@@ -94124,7 +94168,7 @@ function CodeGroupNodeView(props) {
|
|
|
94124
94168
|
// src/components/tiptap-node/code-block-node/code-group-node-extension.ts
|
|
94125
94169
|
var CodeGroupExtension = CodeGroupSchema.extend({
|
|
94126
94170
|
addNodeView() {
|
|
94127
|
-
return
|
|
94171
|
+
return ReactNodeViewRenderer2(CodeGroupNodeView);
|
|
94128
94172
|
}
|
|
94129
94173
|
});
|
|
94130
94174
|
|
|
@@ -96788,7 +96832,7 @@ var CalloutSchema = Node3.create({
|
|
|
96788
96832
|
// src/components/tiptap-node/collapsible-node/callout-node-extension.ts
|
|
96789
96833
|
var CalloutExtension = CalloutSchema.extend({
|
|
96790
96834
|
addNodeView() {
|
|
96791
|
-
return
|
|
96835
|
+
return ReactNodeViewRenderer2(CalloutNodeView);
|
|
96792
96836
|
}
|
|
96793
96837
|
});
|
|
96794
96838
|
function DetailsNodeView(props) {
|
|
@@ -96897,7 +96941,7 @@ var DetailsSchema = Node3.create({
|
|
|
96897
96941
|
// src/components/tiptap-node/collapsible-node/details-node-extension.ts
|
|
96898
96942
|
var DetailsExtension = DetailsSchema.extend({
|
|
96899
96943
|
addNodeView() {
|
|
96900
|
-
return
|
|
96944
|
+
return ReactNodeViewRenderer2(DetailsNodeView);
|
|
96901
96945
|
}
|
|
96902
96946
|
});
|
|
96903
96947
|
function ApiParamNodeView(props) {
|
|
@@ -97175,7 +97219,7 @@ var ApiParamSchema = Node3.create({
|
|
|
97175
97219
|
// src/components/tiptap-node/collapsible-node/api-param-node-extension.ts
|
|
97176
97220
|
var ApiParamExtension = ApiParamSchema.extend({
|
|
97177
97221
|
addNodeView() {
|
|
97178
|
-
return
|
|
97222
|
+
return ReactNodeViewRenderer2(ApiParamNodeView);
|
|
97179
97223
|
}
|
|
97180
97224
|
});
|
|
97181
97225
|
|