superdoc 1.0.0-beta.4 → 1.0.0-beta.5
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/chunks/{PdfViewer-ZtwLhE_8.cjs → PdfViewer-B2yJpudB.cjs} +1 -1
- package/dist/chunks/{PdfViewer-DUns3s8O.es.js → PdfViewer-Ebg4DPUi.es.js} +1 -1
- package/dist/chunks/{index-DIccWgYh.es.js → index-6_t69RiQ.es.js} +3 -3
- package/dist/chunks/{index-BNGaD3Up-CQuoo1EF.es.js → index-D653XgvV-B-4_BIjA.es.js} +1 -1
- package/dist/chunks/{index-BNGaD3Up-D2cRHMMk.cjs → index-D653XgvV-BN--CbY4.cjs} +1 -1
- package/dist/chunks/{index-BW38mdZF.cjs → index-DcKcwu3F.cjs} +3 -3
- package/dist/chunks/{super-editor.es-CtCHBIPE.es.js → super-editor.es-0TS__OEc.es.js} +54 -14
- package/dist/chunks/{super-editor.es-C06-V-Iy.cjs → super-editor.es-Bt9VCC9D.cjs} +54 -14
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-ZJiSHoiq.js → converter-BiUZIOjP.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-B7FStorN.js → docx-zipper-Dz6dcXS4.js} +1 -1
- package/dist/super-editor/chunks/{editor-DvepAjbe.js → editor-BtePjrrv.js} +55 -15
- package/dist/super-editor/chunks/{index-BNGaD3Up.js → index-D653XgvV.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-CKXXbIQO.js → toolbar-D6JNBgna.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +56 -16
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E } from "./chunks/editor-
|
|
2
|
-
import "./chunks/converter-
|
|
3
|
-
import "./chunks/docx-zipper-
|
|
1
|
+
import { E } from "./chunks/editor-BtePjrrv.js";
|
|
2
|
+
import "./chunks/converter-BiUZIOjP.js";
|
|
3
|
+
import "./chunks/docx-zipper-Dz6dcXS4.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
|
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
11
11
|
var _MARK_TOGGLE_NAMES, _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn, syncStickyMarksFromState_fn, restoreStickyMarksIfNeeded_fn, ensureStoredMarksForMarkToggle_fn;
|
|
12
|
-
import { aJ as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aM as vClickOutside, aN as getActiveFormatting, aC as isInTable, U as findParentNode, aq as calculateResolvedParagraphProperties, a7 as twipsToLines, V as isList, al as parseSizeUnit, a8 as pixelsToTwips, aO as getFileObject, aP as translator, aQ as translator$1, aR as translator$2, aS as translator$3, aT as translator$4, aU as translator$5, aV as translator$6, aW as translator$7, aX as translator$8, aY as translator$9, aZ as translator$a, a_ as translator$b, a$ as translator$c, b0 as translator$d, b1 as translator$e, b2 as commentRangeEndTranslator, b3 as commentRangeStartTranslator, b4 as translator$f, b5 as translator$g, b6 as translator$h, b7 as translator$i, b8 as translator$j, b9 as translator$k, ba as translator$l, bb as translator$m, bc as translator$n, bd as translator$o, be as translator$p, bf as translator$q, bg as translator$r, bh as translator$s, bi as translator$t, bj as translator$u, bk as translator$v, bl as translator$w, bm as translator$x, bn as translator$y, bo as translator$z, bp as translator$A, bq as translator$B, br as translator$C, bs as translator$D, bt as translator$E, bu as translator$F, bv as translator$G, bw as translator$H, bx as translator$I, by as translator$J, bz as translator$K, bA as translator$L, bB as translator$M, bC as translator$N, bD as translator$O, bE as translator$P, bF as translator$Q, bG as translator$R, bH as translator$S, bI as translator$T, bJ as translator$U, bK as translator$V, bL as translator$W, bM as translator$X, bN as translator$Y, bO as translator$Z, bP as translator$_, bQ as translator$$, bR as translator$10, bS as translator$11, bT as translator$12, bU as translator$13, bV as translator$14, bW as translator$15, bX as translator$16, bY as translator$17, bZ as translator$18, b_ as translator$19, b$ as translator$1a, c0 as translator$1b, c1 as translator$1c, c2 as translator$1d, c3 as translator$1e, c4 as translator$1f, c5 as translator$1g, c6 as translator$1h, c7 as translator$1i, c8 as translator$1j, P as PluginKey, a as Plugin } from "./chunks/converter-
|
|
13
|
-
import { ac, i, a9 } from "./chunks/converter-
|
|
14
|
-
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as measureCache, n as isHeadless, E as Editor, o as getStarterExtensions, P as PresentationEditor, p as Placeholder, q as getRichTextExtensions, D as DecorationSet, t as Decoration, M as Mark, v as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
15
|
-
import { z, F, B, T, w, C, x } from "./chunks/editor-
|
|
12
|
+
import { aJ as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aM as vClickOutside, aN as getActiveFormatting, aC as isInTable, U as findParentNode, aq as calculateResolvedParagraphProperties, a7 as twipsToLines, V as isList, al as parseSizeUnit, a8 as pixelsToTwips, aO as getFileObject, aP as translator, aQ as translator$1, aR as translator$2, aS as translator$3, aT as translator$4, aU as translator$5, aV as translator$6, aW as translator$7, aX as translator$8, aY as translator$9, aZ as translator$a, a_ as translator$b, a$ as translator$c, b0 as translator$d, b1 as translator$e, b2 as commentRangeEndTranslator, b3 as commentRangeStartTranslator, b4 as translator$f, b5 as translator$g, b6 as translator$h, b7 as translator$i, b8 as translator$j, b9 as translator$k, ba as translator$l, bb as translator$m, bc as translator$n, bd as translator$o, be as translator$p, bf as translator$q, bg as translator$r, bh as translator$s, bi as translator$t, bj as translator$u, bk as translator$v, bl as translator$w, bm as translator$x, bn as translator$y, bo as translator$z, bp as translator$A, bq as translator$B, br as translator$C, bs as translator$D, bt as translator$E, bu as translator$F, bv as translator$G, bw as translator$H, bx as translator$I, by as translator$J, bz as translator$K, bA as translator$L, bB as translator$M, bC as translator$N, bD as translator$O, bE as translator$P, bF as translator$Q, bG as translator$R, bH as translator$S, bI as translator$T, bJ as translator$U, bK as translator$V, bL as translator$W, bM as translator$X, bN as translator$Y, bO as translator$Z, bP as translator$_, bQ as translator$$, bR as translator$10, bS as translator$11, bT as translator$12, bU as translator$13, bV as translator$14, bW as translator$15, bX as translator$16, bY as translator$17, bZ as translator$18, b_ as translator$19, b$ as translator$1a, c0 as translator$1b, c1 as translator$1c, c2 as translator$1d, c3 as translator$1e, c4 as translator$1f, c5 as translator$1g, c6 as translator$1h, c7 as translator$1i, c8 as translator$1j, P as PluginKey, a as Plugin } from "./chunks/converter-BiUZIOjP.js";
|
|
13
|
+
import { ac, i, a9 } from "./chunks/converter-BiUZIOjP.js";
|
|
14
|
+
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as measureCache, n as isHeadless, E as Editor, o as getStarterExtensions, P as PresentationEditor, p as Placeholder, q as getRichTextExtensions, D as DecorationSet, t as Decoration, M as Mark, v as Extension, A as Attribute, N as Node } from "./chunks/editor-BtePjrrv.js";
|
|
15
|
+
import { z, F, B, T, w, C, x } from "./chunks/editor-BtePjrrv.js";
|
|
16
16
|
import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, defineComponent, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
|
|
17
|
-
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-D6JNBgna.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-Dz6dcXS4.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
21
21
|
var eventemitter3 = { exports: {} };
|
|
22
22
|
var hasRequiredEventemitter3;
|
package/dist/super-editor.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-Bt9VCC9D.cjs");
|
|
4
4
|
require("./chunks/vue-ARQSyfaw.cjs");
|
|
5
5
|
exports.AIWriter = superEditor_es.AIWriter;
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, a, _, C, D, E, b, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-
|
|
1
|
+
import { A, a, _, C, D, E, b, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-0TS__OEc.es.js";
|
|
2
2
|
import "./chunks/vue-CztqUvm1.es.js";
|
|
3
3
|
export {
|
|
4
4
|
A as AIWriter,
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
4
|
-
const superdoc = require("./chunks/index-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-Bt9VCC9D.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-DcKcwu3F.cjs");
|
|
5
5
|
const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
|
7
7
|
exports.Editor = superEditor_es.Editor;
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-
|
|
2
|
-
import { D, H, P, S as S2, m, l } from "./chunks/index-
|
|
1
|
+
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-0TS__OEc.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-6_t69RiQ.es.js";
|
|
3
3
|
import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
|
|
4
4
|
export {
|
|
5
5
|
a as AnnotatorHelpers,
|
package/dist/superdoc.umd.js
CHANGED
|
@@ -35581,7 +35581,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
35581
35581
|
static getStoredSuperdocVersion(docx) {
|
|
35582
35582
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
35583
35583
|
}
|
|
35584
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.
|
|
35584
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.5") {
|
|
35585
35585
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
35586
35586
|
}
|
|
35587
35587
|
/**
|
|
@@ -60069,7 +60069,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
60069
60069
|
const shouldSkipNodeView = (editor) => {
|
|
60070
60070
|
return isHeadless(editor);
|
|
60071
60071
|
};
|
|
60072
|
-
const summaryVersion = "1.0.0-beta.
|
|
60072
|
+
const summaryVersion = "1.0.0-beta.5";
|
|
60073
60073
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
60074
60074
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
60075
60075
|
function mapAttributes(attrs) {
|
|
@@ -60848,7 +60848,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
60848
60848
|
{ default: remarkStringify2 },
|
|
60849
60849
|
{ default: remarkGfm2 }
|
|
60850
60850
|
] = await Promise.all([
|
|
60851
|
-
Promise.resolve().then(() =>
|
|
60851
|
+
Promise.resolve().then(() => indexD653XgvV),
|
|
60852
60852
|
Promise.resolve().then(() => indexDRCvimau),
|
|
60853
60853
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
60854
60854
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -61053,7 +61053,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61053
61053
|
* Process collaboration migrations
|
|
61054
61054
|
*/
|
|
61055
61055
|
processCollaborationMigrations() {
|
|
61056
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
61056
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.5");
|
|
61057
61057
|
if (!this.options.ydoc) return;
|
|
61058
61058
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
61059
61059
|
let docVersion = metaMap.get("version");
|
|
@@ -97170,13 +97170,22 @@ ${l}
|
|
|
97170
97170
|
return !/\p{L}$/u.test(before.text) || !/^\p{L}/u.test(after.text);
|
|
97171
97171
|
}
|
|
97172
97172
|
class SearchState {
|
|
97173
|
-
|
|
97173
|
+
/**
|
|
97174
|
+
* Create a new SearchState instance.
|
|
97175
|
+
*
|
|
97176
|
+
* @param {SearchQuery} query - The search query to execute
|
|
97177
|
+
* @param {{from: number, to: number}|null} range - Optional range to restrict search to, or null for entire document
|
|
97178
|
+
* @param {boolean} highlight - Whether to apply CSS classes for visual highlighting of matches
|
|
97179
|
+
* @param {DecorationSet} deco - The decoration set containing match highlights
|
|
97180
|
+
*/
|
|
97181
|
+
constructor(query, range2, highlight, deco) {
|
|
97174
97182
|
this.query = query;
|
|
97175
97183
|
this.range = range2;
|
|
97184
|
+
this.highlight = highlight;
|
|
97176
97185
|
this.deco = deco;
|
|
97177
97186
|
}
|
|
97178
97187
|
}
|
|
97179
|
-
function buildMatchDeco(state2, query, range2) {
|
|
97188
|
+
function buildMatchDeco(state2, query, range2, highlight = true) {
|
|
97180
97189
|
if (!query.valid) return DecorationSet.empty;
|
|
97181
97190
|
let deco = [];
|
|
97182
97191
|
let sel = state2.selection;
|
|
@@ -97184,7 +97193,8 @@ ${l}
|
|
|
97184
97193
|
let next2 = query.findNext(state2, pos, end2);
|
|
97185
97194
|
if (!next2) break;
|
|
97186
97195
|
let cls = next2.from == sel.from && next2.to == sel.to ? "ProseMirror-active-search-match" : "ProseMirror-search-match";
|
|
97187
|
-
|
|
97196
|
+
const attrs = highlight ? { class: cls } : {};
|
|
97197
|
+
deco.push(Decoration.inline(next2.from, next2.to, attrs));
|
|
97188
97198
|
pos = next2.to;
|
|
97189
97199
|
}
|
|
97190
97200
|
return DecorationSet.create(state2.doc, deco);
|
|
@@ -97197,11 +97207,20 @@ ${l}
|
|
|
97197
97207
|
init(_config, state2) {
|
|
97198
97208
|
let query = options.initialQuery || new SearchQuery({ search: "" });
|
|
97199
97209
|
let range2 = options.initialRange || null;
|
|
97200
|
-
|
|
97210
|
+
const highlight = options.initialHighlight ?? true;
|
|
97211
|
+
return new SearchState(query, range2, highlight, buildMatchDeco(state2, query, range2, highlight));
|
|
97201
97212
|
},
|
|
97202
97213
|
apply(tr, search2, _oldState, state2) {
|
|
97203
97214
|
let set = tr.getMeta(searchKey);
|
|
97204
|
-
if (set)
|
|
97215
|
+
if (set) {
|
|
97216
|
+
const highlight = typeof set.highlight === "boolean" ? set.highlight : true;
|
|
97217
|
+
return new SearchState(
|
|
97218
|
+
set.query,
|
|
97219
|
+
set.range,
|
|
97220
|
+
highlight,
|
|
97221
|
+
buildMatchDeco(state2, set.query, set.range, highlight)
|
|
97222
|
+
);
|
|
97223
|
+
}
|
|
97205
97224
|
if (tr.docChanged || tr.selectionSet) {
|
|
97206
97225
|
let range2 = search2.range;
|
|
97207
97226
|
if (range2) {
|
|
@@ -97209,7 +97228,13 @@ ${l}
|
|
|
97209
97228
|
let to = tr.mapping.map(range2.to, -1);
|
|
97210
97229
|
range2 = from2 < to ? { from: from2, to } : null;
|
|
97211
97230
|
}
|
|
97212
|
-
|
|
97231
|
+
const highlight = typeof search2.highlight === "boolean" ? search2.highlight : true;
|
|
97232
|
+
search2 = new SearchState(
|
|
97233
|
+
search2.query,
|
|
97234
|
+
range2,
|
|
97235
|
+
highlight,
|
|
97236
|
+
buildMatchDeco(state2, search2.query, range2, highlight)
|
|
97237
|
+
);
|
|
97213
97238
|
}
|
|
97214
97239
|
return search2;
|
|
97215
97240
|
}
|
|
@@ -97223,8 +97248,12 @@ ${l}
|
|
|
97223
97248
|
let search2 = searchKey.getState(state2);
|
|
97224
97249
|
return search2 ? search2.deco : DecorationSet.empty;
|
|
97225
97250
|
}
|
|
97226
|
-
function setSearchState(tr, query, range2 = null) {
|
|
97227
|
-
|
|
97251
|
+
function setSearchState(tr, query, range2 = null, options = {}) {
|
|
97252
|
+
if (options != null && (typeof options !== "object" || Array.isArray(options))) {
|
|
97253
|
+
throw new TypeError("setSearchState options must be an object");
|
|
97254
|
+
}
|
|
97255
|
+
const highlight = typeof options?.highlight === "boolean" ? options.highlight : true;
|
|
97256
|
+
return tr.setMeta(searchKey, { query, range: range2, highlight });
|
|
97228
97257
|
}
|
|
97229
97258
|
const isRegExp = (value) => Object.prototype.toString.call(value) === "[object RegExp]";
|
|
97230
97259
|
const Search = Extension.create({
|
|
@@ -97285,14 +97314,25 @@ ${l}
|
|
|
97285
97314
|
* Search for string matches in editor content
|
|
97286
97315
|
* @category Command
|
|
97287
97316
|
* @param {String|RegExp} patternInput - Search string or pattern
|
|
97317
|
+
* @param {SearchCommandOptions} [options={}] - Options to control search behavior
|
|
97288
97318
|
* @example
|
|
97319
|
+
* // Basic search with highlighting (default)
|
|
97289
97320
|
* const matches = editor.commands.search('test string')
|
|
97321
|
+
*
|
|
97322
|
+
* // Regex search
|
|
97290
97323
|
* const regexMatches = editor.commands.search(/test/i)
|
|
97324
|
+
*
|
|
97325
|
+
* // Search without visual highlighting
|
|
97326
|
+
* const silentMatches = editor.commands.search('test', { highlight: false })
|
|
97291
97327
|
* @note Returns array of SearchMatch objects with positions and IDs
|
|
97292
97328
|
*/
|
|
97293
|
-
search: (patternInput) => (
|
|
97329
|
+
search: (patternInput, options = {}) => (
|
|
97294
97330
|
/** @returns {SearchMatch[]} */
|
|
97295
97331
|
(({ state: state2, dispatch }) => {
|
|
97332
|
+
if (options != null && (typeof options !== "object" || Array.isArray(options))) {
|
|
97333
|
+
throw new TypeError("Search options must be an object");
|
|
97334
|
+
}
|
|
97335
|
+
const highlight = typeof options?.highlight === "boolean" ? options.highlight : true;
|
|
97296
97336
|
let pattern;
|
|
97297
97337
|
let caseSensitive = false;
|
|
97298
97338
|
let regexp = false;
|
|
@@ -97319,7 +97359,7 @@ ${l}
|
|
|
97319
97359
|
regexp,
|
|
97320
97360
|
wholeWord
|
|
97321
97361
|
});
|
|
97322
|
-
const tr = setSearchState(state2.tr, query);
|
|
97362
|
+
const tr = setSearchState(state2.tr, query, null, { highlight });
|
|
97323
97363
|
dispatch(tr);
|
|
97324
97364
|
const newState = state2.apply(tr);
|
|
97325
97365
|
const decoSet = getMatchHighlights(newState);
|
|
@@ -131174,7 +131214,7 @@ ${style2}
|
|
|
131174
131214
|
this.config.colors = shuffleArray(this.config.colors);
|
|
131175
131215
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
131176
131216
|
this.colorIndex = 0;
|
|
131177
|
-
this.version = "1.0.0-beta.
|
|
131217
|
+
this.version = "1.0.0-beta.5";
|
|
131178
131218
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
131179
131219
|
this.superdocId = config2.superdocId || v4();
|
|
131180
131220
|
this.colors = this.config.colors;
|
|
@@ -133617,7 +133657,7 @@ ${style2}
|
|
|
133617
133657
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
133618
133658
|
);
|
|
133619
133659
|
}
|
|
133620
|
-
const
|
|
133660
|
+
const indexD653XgvV = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
133621
133661
|
__proto__: null,
|
|
133622
133662
|
unified
|
|
133623
133663
|
}, Symbol.toStringTag, { value: "Module" }));
|