@4399ywkf/editor 0.14.0 → 0.14.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.
- package/dist/{DocView-FYAAUPSK.js → DocView-VTKFMW46.js} +3 -3
- package/dist/{DocView-FYAAUPSK.js.map → DocView-VTKFMW46.js.map} +1 -1
- package/dist/{chunk-6BJB4YWS.js → chunk-ZLEGKX2U.js} +72 -8
- package/dist/chunk-ZLEGKX2U.js.map +1 -0
- package/dist/doc-standalone.js +134 -68
- package/dist/doc-standalone.js.map +1 -1
- package/dist/doc.js +2 -2
- package/dist/index.js +1 -1
- package/dist/style.css +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
|
|
@@ -35642,6 +35642,28 @@ ${isDark ? `:root {
|
|
|
35642
35642
|
width: 230px;
|
|
35643
35643
|
box-sizing: border-box;
|
|
35644
35644
|
|
|
35645
|
+
/* 卡片是 align-items: center 的纵向 flex,body 不拉满就按内容宽度居中,内容一宽就两边溢出 */
|
|
35646
|
+
> .tiptap-card-body {
|
|
35647
|
+
align-self: stretch;
|
|
35648
|
+
}
|
|
35649
|
+
|
|
35650
|
+
/* 一行 8 个要塞进 216px(230 - 边框 - 内边距):通用按钮 min-width 32px 会撑到 282px,色块改 24px、按列均分 */
|
|
35651
|
+
.tiptap-card-item-group > [data-slot="tiptap-button-group"] {
|
|
35652
|
+
display: grid;
|
|
35653
|
+
grid-template-columns: repeat(8, 1fr);
|
|
35654
|
+
justify-items: center;
|
|
35655
|
+
width: 100%;
|
|
35656
|
+
gap: 0;
|
|
35657
|
+
}
|
|
35658
|
+
|
|
35659
|
+
.tiptap-card-item-group > [data-slot="tiptap-button-group"] > [data-slot="tiptap-button-group"] > .tiptap-button {
|
|
35660
|
+
min-width: 0;
|
|
35661
|
+
width: 24px;
|
|
35662
|
+
height: 24px;
|
|
35663
|
+
padding: 0;
|
|
35664
|
+
justify-content: center;
|
|
35665
|
+
}
|
|
35666
|
+
|
|
35645
35667
|
.tt-text-color-panel__reset {
|
|
35646
35668
|
width: 100%;
|
|
35647
35669
|
justify-content: center;
|
|
@@ -45293,9 +45315,27 @@ function editorComponentCss(ctx) {
|
|
|
45293
45315
|
return COMPONENT_STYLES.map((fn) => fn(ctx)).join("\n");
|
|
45294
45316
|
}
|
|
45295
45317
|
var SSR_PSEUDO_FLAG = "/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */";
|
|
45318
|
+
var PSEUDO = /:(?:first|nth|nth-last)-child/;
|
|
45319
|
+
function markUnsafePseudo(flat) {
|
|
45320
|
+
const parts = [];
|
|
45321
|
+
let segStart = 0;
|
|
45322
|
+
for (let i = 0; i < flat.length; i++) {
|
|
45323
|
+
const ch = flat.charCodeAt(i);
|
|
45324
|
+
if (ch !== 123 && ch !== 125) continue;
|
|
45325
|
+
const seg = flat.slice(segStart, i);
|
|
45326
|
+
parts.push(ch === 123 && PSEUDO.test(seg) ? `${seg} ${SSR_PSEUDO_FLAG} {` : seg + flat[i]);
|
|
45327
|
+
segStart = i + 1;
|
|
45328
|
+
}
|
|
45329
|
+
parts.push(flat.slice(segStart));
|
|
45330
|
+
return parts.join("");
|
|
45331
|
+
}
|
|
45332
|
+
var cache;
|
|
45296
45333
|
function prepareForEmotion(css) {
|
|
45334
|
+
if (cache?.input === css) return cache.output;
|
|
45297
45335
|
const flat = serialize(compile(css), stringify).replace(/\n/g, " ");
|
|
45298
|
-
|
|
45336
|
+
const output = markUnsafePseudo(flat);
|
|
45337
|
+
cache = { input: css, output };
|
|
45338
|
+
return output;
|
|
45299
45339
|
}
|
|
45300
45340
|
|
|
45301
45341
|
// src/theme/base-vars.ts
|
|
@@ -46811,8 +46851,8 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
|
|
|
46811
46851
|
}
|
|
46812
46852
|
return rectToClientRect(rect);
|
|
46813
46853
|
}
|
|
46814
|
-
function getClippingElementAncestors(element,
|
|
46815
|
-
const cachedResult2 =
|
|
46854
|
+
function getClippingElementAncestors(element, cache3) {
|
|
46855
|
+
const cachedResult2 = cache3.get(element);
|
|
46816
46856
|
if (cachedResult2) {
|
|
46817
46857
|
return cachedResult2;
|
|
46818
46858
|
}
|
|
@@ -46832,7 +46872,7 @@ function getClippingElementAncestors(element, cache2) {
|
|
|
46832
46872
|
}
|
|
46833
46873
|
currentNode = getParentNode(currentNode);
|
|
46834
46874
|
}
|
|
46835
|
-
|
|
46875
|
+
cache3.set(element, result);
|
|
46836
46876
|
return result;
|
|
46837
46877
|
}
|
|
46838
46878
|
function getClippingRect(_ref) {
|
|
@@ -47129,12 +47169,12 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
47129
47169
|
var offset2 = offset;
|
|
47130
47170
|
var flip2 = flip;
|
|
47131
47171
|
var computePosition2 = (reference, floating, options) => {
|
|
47132
|
-
const
|
|
47172
|
+
const cache3 = /* @__PURE__ */ new Map();
|
|
47133
47173
|
const mergedOptions = options != null ? options : {};
|
|
47134
47174
|
const platformWithCache = {
|
|
47135
47175
|
...platform,
|
|
47136
47176
|
...mergedOptions.platform,
|
|
47137
|
-
_c:
|
|
47177
|
+
_c: cache3
|
|
47138
47178
|
};
|
|
47139
47179
|
return computePosition(reference, floating, {
|
|
47140
47180
|
...mergedOptions,
|
|
@@ -47853,13 +47893,13 @@ var emoji_regex_default = () => {
|
|
|
47853
47893
|
};
|
|
47854
47894
|
|
|
47855
47895
|
// ../../node_modules/.pnpm/is-emoji-supported@0.0.5/node_modules/is-emoji-supported/dist/esm/is-emoji-supported.js
|
|
47856
|
-
var
|
|
47896
|
+
var cache2 = /* @__PURE__ */ new Map();
|
|
47857
47897
|
function isEmojiSupported(unicode) {
|
|
47858
|
-
if (
|
|
47859
|
-
return
|
|
47898
|
+
if (cache2.has(unicode)) {
|
|
47899
|
+
return cache2.get(unicode);
|
|
47860
47900
|
}
|
|
47861
47901
|
var supported = isSupported(unicode);
|
|
47862
|
-
|
|
47902
|
+
cache2.set(unicode, supported);
|
|
47863
47903
|
return supported;
|
|
47864
47904
|
}
|
|
47865
47905
|
var isSupported = (function() {
|
|
@@ -71961,23 +72001,23 @@ function useTiptapEditor(providedEditor) {
|
|
|
71961
72001
|
var readFromCache;
|
|
71962
72002
|
var addToCache;
|
|
71963
72003
|
if (typeof WeakMap != "undefined") {
|
|
71964
|
-
let
|
|
71965
|
-
readFromCache = (key) =>
|
|
72004
|
+
let cache3 = /* @__PURE__ */ new WeakMap();
|
|
72005
|
+
readFromCache = (key) => cache3.get(key);
|
|
71966
72006
|
addToCache = (key, value) => {
|
|
71967
|
-
|
|
72007
|
+
cache3.set(key, value);
|
|
71968
72008
|
return value;
|
|
71969
72009
|
};
|
|
71970
72010
|
} else {
|
|
71971
|
-
const
|
|
72011
|
+
const cache3 = [];
|
|
71972
72012
|
const cacheSize = 10;
|
|
71973
72013
|
let cachePos = 0;
|
|
71974
72014
|
readFromCache = (key) => {
|
|
71975
|
-
for (let i = 0; i <
|
|
72015
|
+
for (let i = 0; i < cache3.length; i += 2) if (cache3[i] == key) return cache3[i + 1];
|
|
71976
72016
|
};
|
|
71977
72017
|
addToCache = (key, value) => {
|
|
71978
72018
|
if (cachePos == cacheSize) cachePos = 0;
|
|
71979
|
-
|
|
71980
|
-
return
|
|
72019
|
+
cache3[cachePos++] = key;
|
|
72020
|
+
return cache3[cachePos++] = value;
|
|
71981
72021
|
};
|
|
71982
72022
|
}
|
|
71983
72023
|
var TableMap = class {
|
|
@@ -75303,6 +75343,32 @@ var UiState = Extension.create({
|
|
|
75303
75343
|
}
|
|
75304
75344
|
});
|
|
75305
75345
|
|
|
75346
|
+
// src/lib/react-node-view-renderer.ts
|
|
75347
|
+
function isReactRenderMutation(mutation, dom, contentDOM) {
|
|
75348
|
+
if (mutation.type !== "childList" || !dom || !contentDOM) return false;
|
|
75349
|
+
if (contentDOM.contains(mutation.target)) return false;
|
|
75350
|
+
if (mutation.target === dom) return true;
|
|
75351
|
+
const changed = [
|
|
75352
|
+
...Array.from(mutation.addedNodes ?? []),
|
|
75353
|
+
...Array.from(mutation.removedNodes ?? [])
|
|
75354
|
+
];
|
|
75355
|
+
return changed.includes(contentDOM);
|
|
75356
|
+
}
|
|
75357
|
+
function guardReactRenderMutations(view) {
|
|
75358
|
+
const v = view;
|
|
75359
|
+
const original = v.ignoreMutation;
|
|
75360
|
+
if (typeof original !== "function") return view;
|
|
75361
|
+
v.ignoreMutation = (mutation) => {
|
|
75362
|
+
if (isReactRenderMutation(mutation, v.dom, v.contentDOM)) return true;
|
|
75363
|
+
return original.call(view, mutation);
|
|
75364
|
+
};
|
|
75365
|
+
return view;
|
|
75366
|
+
}
|
|
75367
|
+
function ReactNodeViewRenderer2(component, options) {
|
|
75368
|
+
const create4 = ReactNodeViewRenderer(component, options);
|
|
75369
|
+
return (props) => guardReactRenderMutations(create4(props));
|
|
75370
|
+
}
|
|
75371
|
+
|
|
75306
75372
|
// ../../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
75373
|
var inputRegex5 = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/;
|
|
75308
75374
|
var Image2 = Node3.create({
|
|
@@ -76367,7 +76433,7 @@ var Image3 = Image2.extend({
|
|
|
76367
76433
|
};
|
|
76368
76434
|
},
|
|
76369
76435
|
addNodeView() {
|
|
76370
|
-
return
|
|
76436
|
+
return ReactNodeViewRenderer2(ImageNodeView);
|
|
76371
76437
|
}
|
|
76372
76438
|
});
|
|
76373
76439
|
|
|
@@ -76956,7 +77022,7 @@ var TocNode = Node3.create({
|
|
|
76956
77022
|
];
|
|
76957
77023
|
},
|
|
76958
77024
|
addNodeView() {
|
|
76959
|
-
return
|
|
77025
|
+
return ReactNodeViewRenderer2(TocNodeComponent, {
|
|
76960
77026
|
stopEvent: ({ event }) => {
|
|
76961
77027
|
if (!(event instanceof MouseEvent)) return false;
|
|
76962
77028
|
const el = event.target;
|
|
@@ -78379,7 +78445,7 @@ function CoverPanel({
|
|
|
78379
78445
|
// src/components/tiptap-node/page-header-node/page-header-node-extension.ts
|
|
78380
78446
|
var PageHeader = PageHeaderSchema.extend({
|
|
78381
78447
|
addNodeView() {
|
|
78382
|
-
return
|
|
78448
|
+
return ReactNodeViewRenderer2(PageHeaderNodeView);
|
|
78383
78449
|
}
|
|
78384
78450
|
});
|
|
78385
78451
|
function useFocusAfterMount(ref, enabled = true) {
|
|
@@ -79839,7 +79905,7 @@ function createCodeHighlighter(options = {}, deps = {}) {
|
|
|
79839
79905
|
const aliases = { ...DEFAULT_ALIASES, ...options.languageAliases ?? {} };
|
|
79840
79906
|
configSerial += 1;
|
|
79841
79907
|
const configId = configSerial;
|
|
79842
|
-
const
|
|
79908
|
+
const cache3 = /* @__PURE__ */ new Map();
|
|
79843
79909
|
let cachedSourceLength = 0;
|
|
79844
79910
|
let customLanguagesLoaded = null;
|
|
79845
79911
|
const normalizeLanguage = (input) => {
|
|
@@ -79848,18 +79914,18 @@ function createCodeHighlighter(options = {}, deps = {}) {
|
|
|
79848
79914
|
return aliases[raw] ?? raw;
|
|
79849
79915
|
};
|
|
79850
79916
|
const evict = () => {
|
|
79851
|
-
while (
|
|
79852
|
-
const oldest =
|
|
79917
|
+
while (cache3.size > CACHE_MAX_ENTRIES || cachedSourceLength > CACHE_MAX_SOURCE_LENGTH) {
|
|
79918
|
+
const oldest = cache3.keys().next();
|
|
79853
79919
|
if (oldest.done) break;
|
|
79854
|
-
const entry =
|
|
79855
|
-
|
|
79920
|
+
const entry = cache3.get(oldest.value);
|
|
79921
|
+
cache3.delete(oldest.value);
|
|
79856
79922
|
if (entry) cachedSourceLength -= entry.size;
|
|
79857
79923
|
}
|
|
79858
79924
|
};
|
|
79859
79925
|
const forget = (key) => {
|
|
79860
|
-
const entry =
|
|
79926
|
+
const entry = cache3.get(key);
|
|
79861
79927
|
if (!entry) return;
|
|
79862
|
-
|
|
79928
|
+
cache3.delete(key);
|
|
79863
79929
|
cachedSourceLength -= entry.size;
|
|
79864
79930
|
};
|
|
79865
79931
|
const ensureCustomLanguages = (highlighter) => {
|
|
@@ -79901,17 +79967,17 @@ function createCodeHighlighter(options = {}, deps = {}) {
|
|
|
79901
79967
|
if (lang === PLAINTEXT && !source) return Promise.resolve(plaintextResult(source));
|
|
79902
79968
|
if (exceedsLimits(source)) return Promise.resolve(plaintextResult(source));
|
|
79903
79969
|
const key = `${configId}\0${resolvedTheme}\0${lang}\0${source}`;
|
|
79904
|
-
const hit =
|
|
79970
|
+
const hit = cache3.get(key);
|
|
79905
79971
|
if (hit) {
|
|
79906
|
-
|
|
79907
|
-
|
|
79972
|
+
cache3.delete(key);
|
|
79973
|
+
cache3.set(key, hit);
|
|
79908
79974
|
return hit.promise;
|
|
79909
79975
|
}
|
|
79910
79976
|
const promise = run4(source, lang, resolvedTheme).catch(() => {
|
|
79911
79977
|
forget(key);
|
|
79912
79978
|
return plaintextResult(source);
|
|
79913
79979
|
});
|
|
79914
|
-
|
|
79980
|
+
cache3.set(key, { promise, size: source.length });
|
|
79915
79981
|
cachedSourceLength += source.length;
|
|
79916
79982
|
evict();
|
|
79917
79983
|
return promise;
|
|
@@ -80804,7 +80870,7 @@ function EmbedInput({
|
|
|
80804
80870
|
// src/components/tiptap-node/embed-node/embed-node-extension.ts
|
|
80805
80871
|
var Embed = EmbedSchema.extend({
|
|
80806
80872
|
addNodeView() {
|
|
80807
|
-
return
|
|
80873
|
+
return ReactNodeViewRenderer2(EmbedNodeView);
|
|
80808
80874
|
}
|
|
80809
80875
|
});
|
|
80810
80876
|
function BookmarkNodeView(props) {
|
|
@@ -80977,7 +81043,7 @@ var BookmarkSchema = Node3.create({
|
|
|
80977
81043
|
// src/components/tiptap-node/bookmark-node/bookmark-node-extension.ts
|
|
80978
81044
|
var Bookmark = BookmarkSchema.extend({
|
|
80979
81045
|
addNodeView() {
|
|
80980
|
-
return
|
|
81046
|
+
return ReactNodeViewRenderer2(BookmarkNodeView);
|
|
80981
81047
|
}
|
|
80982
81048
|
});
|
|
80983
81049
|
function LinkPastePanel({ editor }) {
|
|
@@ -87230,7 +87296,7 @@ var PencilGlyph = () => /* @__PURE__ */ jsxs("svg", { width: "16", height: "16",
|
|
|
87230
87296
|
// src/components/tiptap-node/inline-button-node/inline-button-node-extension.ts
|
|
87231
87297
|
var InlineButton = InlineButtonSchema.extend({
|
|
87232
87298
|
addNodeView() {
|
|
87233
|
-
return
|
|
87299
|
+
return ReactNodeViewRenderer2(InlineButtonNodeView, { as: "span" });
|
|
87234
87300
|
}
|
|
87235
87301
|
});
|
|
87236
87302
|
|
|
@@ -88030,7 +88096,7 @@ function TimeInput({ value, onPick }) {
|
|
|
88030
88096
|
// src/components/tiptap-node/reminder-node/reminder-node-extension.ts
|
|
88031
88097
|
var Reminder = ReminderSchema.extend({
|
|
88032
88098
|
addNodeView() {
|
|
88033
|
-
return
|
|
88099
|
+
return ReactNodeViewRenderer2(ReminderNodeView, { as: "span" });
|
|
88034
88100
|
}
|
|
88035
88101
|
});
|
|
88036
88102
|
|
|
@@ -88859,7 +88925,7 @@ var AgendaItemContentSchema = Node3.create({
|
|
|
88859
88925
|
var Agenda = AgendaSchema.extend({ priority: 200 });
|
|
88860
88926
|
var AgendaItem = AgendaItemSchema.extend({
|
|
88861
88927
|
addNodeView() {
|
|
88862
|
-
return
|
|
88928
|
+
return ReactNodeViewRenderer2(AgendaItemView);
|
|
88863
88929
|
}
|
|
88864
88930
|
});
|
|
88865
88931
|
var AgendaItemTitle = AgendaItemTitleSchema.extend({ priority: 200 });
|
|
@@ -89808,7 +89874,7 @@ var UnlinkGlyph = () => /* @__PURE__ */ jsx(Glyph, { d: "M15 7h2a5 5 0 0 1 0 10h
|
|
|
89808
89874
|
// src/components/tiptap-node/synced-block-node/synced-block-extension.ts
|
|
89809
89875
|
var SyncedBlock = SyncedBlockSchema.extend({
|
|
89810
89876
|
addNodeView() {
|
|
89811
|
-
return
|
|
89877
|
+
return ReactNodeViewRenderer2(SyncedBlockView);
|
|
89812
89878
|
}
|
|
89813
89879
|
});
|
|
89814
89880
|
|
|
@@ -90047,7 +90113,7 @@ function MermaidNodeView({ node, editor, updateAttributes: updateAttributes2, se
|
|
|
90047
90113
|
// src/components/tiptap-node/mermaid-node/mermaid-extension.ts
|
|
90048
90114
|
var Mermaid = MermaidSchema.extend({
|
|
90049
90115
|
addNodeView() {
|
|
90050
|
-
return
|
|
90116
|
+
return ReactNodeViewRenderer2(MermaidNodeView);
|
|
90051
90117
|
},
|
|
90052
90118
|
onCreate() {
|
|
90053
90119
|
if (!this.editor.isEditable) return;
|
|
@@ -90065,7 +90131,7 @@ var Poll = PollSchema.extend({
|
|
|
90065
90131
|
return { enabled: false, userId: null };
|
|
90066
90132
|
},
|
|
90067
90133
|
addNodeView() {
|
|
90068
|
-
return
|
|
90134
|
+
return ReactNodeViewRenderer2(PollNodeView);
|
|
90069
90135
|
}
|
|
90070
90136
|
});
|
|
90071
90137
|
function PollConfigBridge({ editor }) {
|
|
@@ -90437,7 +90503,7 @@ ${toMermaid(normalizeDiagram(node.attrs?.data))}
|
|
|
90437
90503
|
// src/components/tiptap-node/diagram-node/diagram-node-extension.ts
|
|
90438
90504
|
var Diagram = DiagramSchema.extend({
|
|
90439
90505
|
addNodeView() {
|
|
90440
|
-
return
|
|
90506
|
+
return ReactNodeViewRenderer2(DiagramNodeView);
|
|
90441
90507
|
}
|
|
90442
90508
|
});
|
|
90443
90509
|
function HeadingNumberMenu({ editor }) {
|
|
@@ -91048,7 +91114,7 @@ var ImageUploadNode2 = Node3.create({
|
|
|
91048
91114
|
];
|
|
91049
91115
|
},
|
|
91050
91116
|
addNodeView() {
|
|
91051
|
-
return
|
|
91117
|
+
return ReactNodeViewRenderer2(ImageUploadNode);
|
|
91052
91118
|
},
|
|
91053
91119
|
addCommands() {
|
|
91054
91120
|
return {
|
|
@@ -91313,7 +91379,7 @@ var Video = Node3.create({
|
|
|
91313
91379
|
// 可编辑时还要拦下缩放把手上的事件:不然 PM 把按住把手当成选中 / 拖动整个节点。
|
|
91314
91380
|
// atom 节点的 DOM 变化 ReactNodeView 默认就忽略,不用再写 ignoreMutation。
|
|
91315
91381
|
addNodeView() {
|
|
91316
|
-
return
|
|
91382
|
+
return ReactNodeViewRenderer2(VideoNodeView, {
|
|
91317
91383
|
stopEvent: ({ event }) => !this.editor.isEditable || event.target instanceof Element && event.target.closest(".tiptap-video-handle") !== null
|
|
91318
91384
|
});
|
|
91319
91385
|
}
|
|
@@ -91991,12 +92057,12 @@ var FileInlineSchema = Node3.create({
|
|
|
91991
92057
|
// src/components/tiptap-node/file-attachment-node/file-attachment-node-extension.ts
|
|
91992
92058
|
var FileAttachment = FileAttachmentSchema.extend({
|
|
91993
92059
|
addNodeView() {
|
|
91994
|
-
return
|
|
92060
|
+
return ReactNodeViewRenderer2(FileAttachmentNodeView);
|
|
91995
92061
|
}
|
|
91996
92062
|
});
|
|
91997
92063
|
var FileInline = FileInlineSchema.extend({
|
|
91998
92064
|
addNodeView() {
|
|
91999
|
-
return
|
|
92065
|
+
return ReactNodeViewRenderer2(FileInlineNodeView, { as: "span" });
|
|
92000
92066
|
}
|
|
92001
92067
|
});
|
|
92002
92068
|
|
|
@@ -92179,7 +92245,7 @@ var MediaUploadPlaceholder = Node3.create({
|
|
|
92179
92245
|
];
|
|
92180
92246
|
},
|
|
92181
92247
|
addNodeView() {
|
|
92182
|
-
return
|
|
92248
|
+
return ReactNodeViewRenderer2(MediaUploadPlaceholderNodeView);
|
|
92183
92249
|
}
|
|
92184
92250
|
});
|
|
92185
92251
|
|
|
@@ -93046,7 +93112,7 @@ var PlusGlyph = () => /* @__PURE__ */ jsxs("svg", { className: "tiptap-columns-g
|
|
|
93046
93112
|
// src/components/tiptap-node/column-node/column-node-extension.ts
|
|
93047
93113
|
var Columns = ColumnsSchema.extend({
|
|
93048
93114
|
addNodeView() {
|
|
93049
|
-
return
|
|
93115
|
+
return ReactNodeViewRenderer2(ColumnsNodeView);
|
|
93050
93116
|
},
|
|
93051
93117
|
// 栏里第一个块开头按 Backspace:空块删掉(这栏随之去掉)、有字接到上一栏末尾(飞书)
|
|
93052
93118
|
addKeyboardShortcuts() {
|
|
@@ -93517,7 +93583,7 @@ var PasteColorSnap = Extension.create({
|
|
|
93517
93583
|
// src/components/tiptap-node/code-block-node/code-block-node-extension.ts
|
|
93518
93584
|
var CodeBlockExtension = CodeBlockSchema.extend({
|
|
93519
93585
|
addNodeView() {
|
|
93520
|
-
return
|
|
93586
|
+
return ReactNodeViewRenderer2(CodeBlockNodeView, {
|
|
93521
93587
|
contentDOMElementTag: "code"
|
|
93522
93588
|
});
|
|
93523
93589
|
}
|
|
@@ -94124,7 +94190,7 @@ function CodeGroupNodeView(props) {
|
|
|
94124
94190
|
// src/components/tiptap-node/code-block-node/code-group-node-extension.ts
|
|
94125
94191
|
var CodeGroupExtension = CodeGroupSchema.extend({
|
|
94126
94192
|
addNodeView() {
|
|
94127
|
-
return
|
|
94193
|
+
return ReactNodeViewRenderer2(CodeGroupNodeView);
|
|
94128
94194
|
}
|
|
94129
94195
|
});
|
|
94130
94196
|
|
|
@@ -96788,7 +96854,7 @@ var CalloutSchema = Node3.create({
|
|
|
96788
96854
|
// src/components/tiptap-node/collapsible-node/callout-node-extension.ts
|
|
96789
96855
|
var CalloutExtension = CalloutSchema.extend({
|
|
96790
96856
|
addNodeView() {
|
|
96791
|
-
return
|
|
96857
|
+
return ReactNodeViewRenderer2(CalloutNodeView);
|
|
96792
96858
|
}
|
|
96793
96859
|
});
|
|
96794
96860
|
function DetailsNodeView(props) {
|
|
@@ -96897,7 +96963,7 @@ var DetailsSchema = Node3.create({
|
|
|
96897
96963
|
// src/components/tiptap-node/collapsible-node/details-node-extension.ts
|
|
96898
96964
|
var DetailsExtension = DetailsSchema.extend({
|
|
96899
96965
|
addNodeView() {
|
|
96900
|
-
return
|
|
96966
|
+
return ReactNodeViewRenderer2(DetailsNodeView);
|
|
96901
96967
|
}
|
|
96902
96968
|
});
|
|
96903
96969
|
function ApiParamNodeView(props) {
|
|
@@ -97175,7 +97241,7 @@ var ApiParamSchema = Node3.create({
|
|
|
97175
97241
|
// src/components/tiptap-node/collapsible-node/api-param-node-extension.ts
|
|
97176
97242
|
var ApiParamExtension = ApiParamSchema.extend({
|
|
97177
97243
|
addNodeView() {
|
|
97178
|
-
return
|
|
97244
|
+
return ReactNodeViewRenderer2(ApiParamNodeView);
|
|
97179
97245
|
}
|
|
97180
97246
|
});
|
|
97181
97247
|
|