@harbour-enterprises/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.
Files changed (27) hide show
  1. package/dist/chunks/{PdfViewer-ZtwLhE_8.cjs → PdfViewer-B2yJpudB.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-DUns3s8O.es.js → PdfViewer-Ebg4DPUi.es.js} +1 -1
  3. package/dist/chunks/{index-DIccWgYh.es.js → index-6_t69RiQ.es.js} +3 -3
  4. package/dist/chunks/{index-BNGaD3Up-CQuoo1EF.es.js → index-D653XgvV-B-4_BIjA.es.js} +1 -1
  5. package/dist/chunks/{index-BNGaD3Up-D2cRHMMk.cjs → index-D653XgvV-BN--CbY4.cjs} +1 -1
  6. package/dist/chunks/{index-BW38mdZF.cjs → index-DcKcwu3F.cjs} +3 -3
  7. package/dist/chunks/{super-editor.es-CtCHBIPE.es.js → super-editor.es-0TS__OEc.es.js} +54 -14
  8. package/dist/chunks/{super-editor.es-C06-V-Iy.cjs → super-editor.es-Bt9VCC9D.cjs} +54 -14
  9. package/dist/super-editor/ai-writer.es.js +2 -2
  10. package/dist/super-editor/chunks/{converter-ZJiSHoiq.js → converter-BiUZIOjP.js} +1 -1
  11. package/dist/super-editor/chunks/{docx-zipper-B7FStorN.js → docx-zipper-Dz6dcXS4.js} +1 -1
  12. package/dist/super-editor/chunks/{editor-DvepAjbe.js → editor-BtePjrrv.js} +55 -15
  13. package/dist/super-editor/chunks/{index-BNGaD3Up.js → index-D653XgvV.js} +1 -1
  14. package/dist/super-editor/chunks/{toolbar-CKXXbIQO.js → toolbar-D6JNBgna.js} +2 -2
  15. package/dist/super-editor/converter.es.js +1 -1
  16. package/dist/super-editor/docx-zipper.es.js +2 -2
  17. package/dist/super-editor/editor.es.js +3 -3
  18. package/dist/super-editor/file-zipper.es.js +1 -1
  19. package/dist/super-editor/super-editor.es.js +6 -6
  20. package/dist/super-editor/toolbar.es.js +2 -2
  21. package/dist/super-editor.cjs +1 -1
  22. package/dist/super-editor.es.js +1 -1
  23. package/dist/superdoc.cjs +2 -2
  24. package/dist/superdoc.es.js +2 -2
  25. package/dist/superdoc.umd.js +56 -16
  26. package/dist/superdoc.umd.js.map +1 -1
  27. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("./vue-ARQSyfaw.cjs");
4
- const superdoc = require("./index-BW38mdZF.cjs");
4
+ const superdoc = require("./index-DcKcwu3F.cjs");
5
5
  function self(vars) {
6
6
  const {
7
7
  opacityDisabled,
@@ -1,5 +1,5 @@
1
1
  import { y as defineComponent, z as h, O as Transition, $ as process$1, J as watchEffect, a as computed, r as ref, j as onMounted, W as onUnmounted, b as createElementBlock, o as openBlock, f as createBaseVNode, e as createCommentVNode, u as createVNode, v as unref } from "./vue-CztqUvm1.es.js";
2
- import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-DIccWgYh.es.js";
2
+ import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-6_t69RiQ.es.js";
3
3
  function self(vars) {
4
4
  const {
5
5
  opacityDisabled,
@@ -1,4 +1,4 @@
1
- import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-CtCHBIPE.es.js";
1
+ import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-0TS__OEc.es.js";
2
2
  import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
3
3
  import { E as EventEmitter } from "./eventemitter3-ByBH0NYV.es.js";
4
4
  import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
@@ -17210,7 +17210,7 @@ const _sfc_main = {
17210
17210
  __name: "SuperDoc",
17211
17211
  emits: ["selection-update"],
17212
17212
  setup(__props, { emit: __emit }) {
17213
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-DUns3s8O.es.js"));
17213
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-Ebg4DPUi.es.js"));
17214
17214
  const superdocStore = useSuperdocStore();
17215
17215
  const commentsStore = useCommentsStore();
17216
17216
  const {
@@ -18063,7 +18063,7 @@ class SuperDoc extends EventEmitter {
18063
18063
  this.config.colors = shuffleArray(this.config.colors);
18064
18064
  this.userColorMap = /* @__PURE__ */ new Map();
18065
18065
  this.colorIndex = 0;
18066
- this.version = "1.0.0-beta.4";
18066
+ this.version = "1.0.0-beta.5";
18067
18067
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
18068
18068
  this.superdocId = config.superdocId || v4();
18069
18069
  this.colors = this.config.colors;
@@ -1,4 +1,4 @@
1
- import { s as getDefaultExportFromCjs$2 } from "./super-editor.es-CtCHBIPE.es.js";
1
+ import { s as getDefaultExportFromCjs$2 } from "./super-editor.es-0TS__OEc.es.js";
2
2
  import { V as VFile } from "./index-CvBqQJbG-CvBqQJbG.es.js";
3
3
  function bail(error) {
4
4
  if (error) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./super-editor.es-C06-V-Iy.cjs");
3
+ const superEditor_es = require("./super-editor.es-Bt9VCC9D.cjs");
4
4
  const indexCvBqQJbG = require("./index-CvBqQJbG-Dwm0THD7.cjs");
5
5
  function bail(error) {
6
6
  if (error) {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const superEditor_es = require("./super-editor.es-C06-V-Iy.cjs");
2
+ const superEditor_es = require("./super-editor.es-Bt9VCC9D.cjs");
3
3
  const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
4
4
  const eventemitter3 = require("./eventemitter3-CFCpOk3d.cjs");
5
5
  const provider = require("@hocuspocus/provider");
@@ -17227,7 +17227,7 @@ const _sfc_main = {
17227
17227
  __name: "SuperDoc",
17228
17228
  emits: ["selection-update"],
17229
17229
  setup(__props, { emit: __emit }) {
17230
- const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-ZtwLhE_8.cjs")));
17230
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-B2yJpudB.cjs")));
17231
17231
  const superdocStore = useSuperdocStore();
17232
17232
  const commentsStore = useCommentsStore();
17233
17233
  const {
@@ -18080,7 +18080,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
18080
18080
  this.config.colors = shuffleArray(this.config.colors);
18081
18081
  this.userColorMap = /* @__PURE__ */ new Map();
18082
18082
  this.colorIndex = 0;
18083
- this.version = "1.0.0-beta.4";
18083
+ this.version = "1.0.0-beta.5";
18084
18084
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
18085
18085
  this.superdocId = config.superdocId || uuid.v4();
18086
18086
  this.colors = this.config.colors;
@@ -35563,7 +35563,7 @@ const _SuperConverter = class _SuperConverter2 {
35563
35563
  static getStoredSuperdocVersion(docx) {
35564
35564
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
35565
35565
  }
35566
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.4") {
35566
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.5") {
35567
35567
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
35568
35568
  }
35569
35569
  /**
@@ -52270,7 +52270,7 @@ const isHeadless = (editor) => {
52270
52270
  const shouldSkipNodeView = (editor) => {
52271
52271
  return isHeadless(editor);
52272
52272
  };
52273
- const summaryVersion = "1.0.0-beta.4";
52273
+ const summaryVersion = "1.0.0-beta.5";
52274
52274
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
52275
52275
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
52276
52276
  function mapAttributes(attrs) {
@@ -53049,7 +53049,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
53049
53049
  { default: remarkStringify },
53050
53050
  { default: remarkGfm }
53051
53051
  ] = await Promise.all([
53052
- import("./index-BNGaD3Up-CQuoo1EF.es.js"),
53052
+ import("./index-D653XgvV-B-4_BIjA.es.js"),
53053
53053
  import("./index-DRCvimau-Cw339678.es.js"),
53054
53054
  import("./index-C_x_N6Uh-DJn8hIEt.es.js"),
53055
53055
  import("./index-D_sWOSiG-DE96TaT5.es.js"),
@@ -53254,7 +53254,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
53254
53254
  * Process collaboration migrations
53255
53255
  */
53256
53256
  processCollaborationMigrations() {
53257
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.4");
53257
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.5");
53258
53258
  if (!this.options.ydoc) return;
53259
53259
  const metaMap = this.options.ydoc.getMap("meta");
53260
53260
  let docVersion = metaMap.get("version");
@@ -89371,13 +89371,22 @@ function checkWordBoundary(state2, pos) {
89371
89371
  return !/\p{L}$/u.test(before.text) || !/^\p{L}/u.test(after.text);
89372
89372
  }
89373
89373
  class SearchState {
89374
- constructor(query, range2, deco) {
89374
+ /**
89375
+ * Create a new SearchState instance.
89376
+ *
89377
+ * @param {SearchQuery} query - The search query to execute
89378
+ * @param {{from: number, to: number}|null} range - Optional range to restrict search to, or null for entire document
89379
+ * @param {boolean} highlight - Whether to apply CSS classes for visual highlighting of matches
89380
+ * @param {DecorationSet} deco - The decoration set containing match highlights
89381
+ */
89382
+ constructor(query, range2, highlight, deco) {
89375
89383
  this.query = query;
89376
89384
  this.range = range2;
89385
+ this.highlight = highlight;
89377
89386
  this.deco = deco;
89378
89387
  }
89379
89388
  }
89380
- function buildMatchDeco(state2, query, range2) {
89389
+ function buildMatchDeco(state2, query, range2, highlight = true) {
89381
89390
  if (!query.valid) return DecorationSet.empty;
89382
89391
  let deco = [];
89383
89392
  let sel = state2.selection;
@@ -89385,7 +89394,8 @@ function buildMatchDeco(state2, query, range2) {
89385
89394
  let next = query.findNext(state2, pos, end2);
89386
89395
  if (!next) break;
89387
89396
  let cls = next.from == sel.from && next.to == sel.to ? "ProseMirror-active-search-match" : "ProseMirror-search-match";
89388
- deco.push(Decoration.inline(next.from, next.to, { class: cls }));
89397
+ const attrs = highlight ? { class: cls } : {};
89398
+ deco.push(Decoration.inline(next.from, next.to, attrs));
89389
89399
  pos = next.to;
89390
89400
  }
89391
89401
  return DecorationSet.create(state2.doc, deco);
@@ -89398,11 +89408,20 @@ function search(options = {}) {
89398
89408
  init(_config, state2) {
89399
89409
  let query = options.initialQuery || new SearchQuery({ search: "" });
89400
89410
  let range2 = options.initialRange || null;
89401
- return new SearchState(query, range2, buildMatchDeco(state2, query, range2));
89411
+ const highlight = options.initialHighlight ?? true;
89412
+ return new SearchState(query, range2, highlight, buildMatchDeco(state2, query, range2, highlight));
89402
89413
  },
89403
89414
  apply(tr, search2, _oldState, state2) {
89404
89415
  let set = tr.getMeta(searchKey);
89405
- if (set) return new SearchState(set.query, set.range, buildMatchDeco(state2, set.query, set.range));
89416
+ if (set) {
89417
+ const highlight = typeof set.highlight === "boolean" ? set.highlight : true;
89418
+ return new SearchState(
89419
+ set.query,
89420
+ set.range,
89421
+ highlight,
89422
+ buildMatchDeco(state2, set.query, set.range, highlight)
89423
+ );
89424
+ }
89406
89425
  if (tr.docChanged || tr.selectionSet) {
89407
89426
  let range2 = search2.range;
89408
89427
  if (range2) {
@@ -89410,7 +89429,13 @@ function search(options = {}) {
89410
89429
  let to = tr.mapping.map(range2.to, -1);
89411
89430
  range2 = from2 < to ? { from: from2, to } : null;
89412
89431
  }
89413
- search2 = new SearchState(search2.query, range2, buildMatchDeco(state2, search2.query, range2));
89432
+ const highlight = typeof search2.highlight === "boolean" ? search2.highlight : true;
89433
+ search2 = new SearchState(
89434
+ search2.query,
89435
+ range2,
89436
+ highlight,
89437
+ buildMatchDeco(state2, search2.query, range2, highlight)
89438
+ );
89414
89439
  }
89415
89440
  return search2;
89416
89441
  }
@@ -89424,8 +89449,12 @@ function getMatchHighlights(state2) {
89424
89449
  let search2 = searchKey.getState(state2);
89425
89450
  return search2 ? search2.deco : DecorationSet.empty;
89426
89451
  }
89427
- function setSearchState(tr, query, range2 = null) {
89428
- return tr.setMeta(searchKey, { query, range: range2 });
89452
+ function setSearchState(tr, query, range2 = null, options = {}) {
89453
+ if (options != null && (typeof options !== "object" || Array.isArray(options))) {
89454
+ throw new TypeError("setSearchState options must be an object");
89455
+ }
89456
+ const highlight = typeof options?.highlight === "boolean" ? options.highlight : true;
89457
+ return tr.setMeta(searchKey, { query, range: range2, highlight });
89429
89458
  }
89430
89459
  const isRegExp = (value) => Object.prototype.toString.call(value) === "[object RegExp]";
89431
89460
  const Search = Extension.create({
@@ -89486,14 +89515,25 @@ const Search = Extension.create({
89486
89515
  * Search for string matches in editor content
89487
89516
  * @category Command
89488
89517
  * @param {String|RegExp} patternInput - Search string or pattern
89518
+ * @param {SearchCommandOptions} [options={}] - Options to control search behavior
89489
89519
  * @example
89520
+ * // Basic search with highlighting (default)
89490
89521
  * const matches = editor.commands.search('test string')
89522
+ *
89523
+ * // Regex search
89491
89524
  * const regexMatches = editor.commands.search(/test/i)
89525
+ *
89526
+ * // Search without visual highlighting
89527
+ * const silentMatches = editor.commands.search('test', { highlight: false })
89492
89528
  * @note Returns array of SearchMatch objects with positions and IDs
89493
89529
  */
89494
- search: (patternInput) => (
89530
+ search: (patternInput, options = {}) => (
89495
89531
  /** @returns {SearchMatch[]} */
89496
89532
  (({ state: state2, dispatch }) => {
89533
+ if (options != null && (typeof options !== "object" || Array.isArray(options))) {
89534
+ throw new TypeError("Search options must be an object");
89535
+ }
89536
+ const highlight = typeof options?.highlight === "boolean" ? options.highlight : true;
89497
89537
  let pattern;
89498
89538
  let caseSensitive = false;
89499
89539
  let regexp = false;
@@ -89520,7 +89560,7 @@ const Search = Extension.create({
89520
89560
  regexp,
89521
89561
  wholeWord
89522
89562
  });
89523
- const tr = setSearchState(state2.tr, query);
89563
+ const tr = setSearchState(state2.tr, query, null, { highlight });
89524
89564
  dispatch(tr);
89525
89565
  const newState = state2.apply(tr);
89526
89566
  const decoSet = getMatchHighlights(newState);
@@ -35580,7 +35580,7 @@ const _SuperConverter = class _SuperConverter2 {
35580
35580
  static getStoredSuperdocVersion(docx) {
35581
35581
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
35582
35582
  }
35583
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.4") {
35583
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.5") {
35584
35584
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
35585
35585
  }
35586
35586
  /**
@@ -52287,7 +52287,7 @@ const isHeadless = (editor) => {
52287
52287
  const shouldSkipNodeView = (editor) => {
52288
52288
  return isHeadless(editor);
52289
52289
  };
52290
- const summaryVersion = "1.0.0-beta.4";
52290
+ const summaryVersion = "1.0.0-beta.5";
52291
52291
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
52292
52292
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
52293
52293
  function mapAttributes(attrs) {
@@ -53066,7 +53066,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
53066
53066
  { default: remarkStringify },
53067
53067
  { default: remarkGfm }
53068
53068
  ] = await Promise.all([
53069
- Promise.resolve().then(() => require("./index-BNGaD3Up-D2cRHMMk.cjs")),
53069
+ Promise.resolve().then(() => require("./index-D653XgvV-BN--CbY4.cjs")),
53070
53070
  Promise.resolve().then(() => require("./index-DRCvimau-H4Ck3S9a.cjs")),
53071
53071
  Promise.resolve().then(() => require("./index-C_x_N6Uh-Db3CUJMX.cjs")),
53072
53072
  Promise.resolve().then(() => require("./index-D_sWOSiG-BtDZzJ6I.cjs")),
@@ -53271,7 +53271,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
53271
53271
  * Process collaboration migrations
53272
53272
  */
53273
53273
  processCollaborationMigrations() {
53274
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.4");
53274
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.5");
53275
53275
  if (!this.options.ydoc) return;
53276
53276
  const metaMap = this.options.ydoc.getMap("meta");
53277
53277
  let docVersion = metaMap.get("version");
@@ -89388,13 +89388,22 @@ function checkWordBoundary(state2, pos) {
89388
89388
  return !/\p{L}$/u.test(before.text) || !/^\p{L}/u.test(after.text);
89389
89389
  }
89390
89390
  class SearchState {
89391
- constructor(query, range2, deco) {
89391
+ /**
89392
+ * Create a new SearchState instance.
89393
+ *
89394
+ * @param {SearchQuery} query - The search query to execute
89395
+ * @param {{from: number, to: number}|null} range - Optional range to restrict search to, or null for entire document
89396
+ * @param {boolean} highlight - Whether to apply CSS classes for visual highlighting of matches
89397
+ * @param {DecorationSet} deco - The decoration set containing match highlights
89398
+ */
89399
+ constructor(query, range2, highlight, deco) {
89392
89400
  this.query = query;
89393
89401
  this.range = range2;
89402
+ this.highlight = highlight;
89394
89403
  this.deco = deco;
89395
89404
  }
89396
89405
  }
89397
- function buildMatchDeco(state2, query, range2) {
89406
+ function buildMatchDeco(state2, query, range2, highlight = true) {
89398
89407
  if (!query.valid) return DecorationSet.empty;
89399
89408
  let deco = [];
89400
89409
  let sel = state2.selection;
@@ -89402,7 +89411,8 @@ function buildMatchDeco(state2, query, range2) {
89402
89411
  let next = query.findNext(state2, pos, end2);
89403
89412
  if (!next) break;
89404
89413
  let cls = next.from == sel.from && next.to == sel.to ? "ProseMirror-active-search-match" : "ProseMirror-search-match";
89405
- deco.push(Decoration.inline(next.from, next.to, { class: cls }));
89414
+ const attrs = highlight ? { class: cls } : {};
89415
+ deco.push(Decoration.inline(next.from, next.to, attrs));
89406
89416
  pos = next.to;
89407
89417
  }
89408
89418
  return DecorationSet.create(state2.doc, deco);
@@ -89415,11 +89425,20 @@ function search(options = {}) {
89415
89425
  init(_config, state2) {
89416
89426
  let query = options.initialQuery || new SearchQuery({ search: "" });
89417
89427
  let range2 = options.initialRange || null;
89418
- return new SearchState(query, range2, buildMatchDeco(state2, query, range2));
89428
+ const highlight = options.initialHighlight ?? true;
89429
+ return new SearchState(query, range2, highlight, buildMatchDeco(state2, query, range2, highlight));
89419
89430
  },
89420
89431
  apply(tr, search2, _oldState, state2) {
89421
89432
  let set = tr.getMeta(searchKey);
89422
- if (set) return new SearchState(set.query, set.range, buildMatchDeco(state2, set.query, set.range));
89433
+ if (set) {
89434
+ const highlight = typeof set.highlight === "boolean" ? set.highlight : true;
89435
+ return new SearchState(
89436
+ set.query,
89437
+ set.range,
89438
+ highlight,
89439
+ buildMatchDeco(state2, set.query, set.range, highlight)
89440
+ );
89441
+ }
89423
89442
  if (tr.docChanged || tr.selectionSet) {
89424
89443
  let range2 = search2.range;
89425
89444
  if (range2) {
@@ -89427,7 +89446,13 @@ function search(options = {}) {
89427
89446
  let to = tr.mapping.map(range2.to, -1);
89428
89447
  range2 = from2 < to ? { from: from2, to } : null;
89429
89448
  }
89430
- search2 = new SearchState(search2.query, range2, buildMatchDeco(state2, search2.query, range2));
89449
+ const highlight = typeof search2.highlight === "boolean" ? search2.highlight : true;
89450
+ search2 = new SearchState(
89451
+ search2.query,
89452
+ range2,
89453
+ highlight,
89454
+ buildMatchDeco(state2, search2.query, range2, highlight)
89455
+ );
89431
89456
  }
89432
89457
  return search2;
89433
89458
  }
@@ -89441,8 +89466,12 @@ function getMatchHighlights(state2) {
89441
89466
  let search2 = searchKey.getState(state2);
89442
89467
  return search2 ? search2.deco : DecorationSet.empty;
89443
89468
  }
89444
- function setSearchState(tr, query, range2 = null) {
89445
- return tr.setMeta(searchKey, { query, range: range2 });
89469
+ function setSearchState(tr, query, range2 = null, options = {}) {
89470
+ if (options != null && (typeof options !== "object" || Array.isArray(options))) {
89471
+ throw new TypeError("setSearchState options must be an object");
89472
+ }
89473
+ const highlight = typeof options?.highlight === "boolean" ? options.highlight : true;
89474
+ return tr.setMeta(searchKey, { query, range: range2, highlight });
89446
89475
  }
89447
89476
  const isRegExp = (value) => Object.prototype.toString.call(value) === "[object RegExp]";
89448
89477
  const Search = Extension.create({
@@ -89503,14 +89532,25 @@ const Search = Extension.create({
89503
89532
  * Search for string matches in editor content
89504
89533
  * @category Command
89505
89534
  * @param {String|RegExp} patternInput - Search string or pattern
89535
+ * @param {SearchCommandOptions} [options={}] - Options to control search behavior
89506
89536
  * @example
89537
+ * // Basic search with highlighting (default)
89507
89538
  * const matches = editor.commands.search('test string')
89539
+ *
89540
+ * // Regex search
89508
89541
  * const regexMatches = editor.commands.search(/test/i)
89542
+ *
89543
+ * // Search without visual highlighting
89544
+ * const silentMatches = editor.commands.search('test', { highlight: false })
89509
89545
  * @note Returns array of SearchMatch objects with positions and IDs
89510
89546
  */
89511
- search: (patternInput) => (
89547
+ search: (patternInput, options = {}) => (
89512
89548
  /** @returns {SearchMatch[]} */
89513
89549
  (({ state: state2, dispatch }) => {
89550
+ if (options != null && (typeof options !== "object" || Array.isArray(options))) {
89551
+ throw new TypeError("Search options must be an object");
89552
+ }
89553
+ const highlight = typeof options?.highlight === "boolean" ? options.highlight : true;
89514
89554
  let pattern;
89515
89555
  let caseSensitive = false;
89516
89556
  let regexp = false;
@@ -89537,7 +89577,7 @@ const Search = Extension.create({
89537
89577
  regexp,
89538
89578
  wholeWord
89539
89579
  });
89540
- const tr = setSearchState(state2.tr, query);
89580
+ const tr = setSearchState(state2.tr, query, null, { highlight });
89541
89581
  dispatch(tr);
89542
89582
  const newState = state2.apply(tr);
89543
89583
  const decoSet = getMatchHighlights(newState);
@@ -1,6 +1,6 @@
1
1
  import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
2
- import { T as TextSelection } from "./chunks/converter-ZJiSHoiq.js";
3
- import { _ as _export_sfc } from "./chunks/editor-DvepAjbe.js";
2
+ import { T as TextSelection } from "./chunks/converter-BiUZIOjP.js";
3
+ import { _ as _export_sfc } from "./chunks/editor-BtePjrrv.js";
4
4
  const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
5
5
  const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
6
6
  async function baseInsightsFetch(payload, options = {}) {
@@ -35844,7 +35844,7 @@ const _SuperConverter = class _SuperConverter {
35844
35844
  static getStoredSuperdocVersion(docx) {
35845
35845
  return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
35846
35846
  }
35847
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.0.0-beta.4") {
35847
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.0.0-beta.5") {
35848
35848
  return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
35849
35849
  }
35850
35850
  /**
@@ -1,4 +1,4 @@
1
- import { p as process$1, aI as commonjsGlobal, B as Buffer, aJ as getDefaultExportFromCjs, aK as getContentTypesFromXml, aL as xmljs } from "./converter-ZJiSHoiq.js";
1
+ import { p as process$1, aI as commonjsGlobal, B as Buffer, aJ as getDefaultExportFromCjs, aK as getContentTypesFromXml, aL as xmljs } from "./converter-BiUZIOjP.js";
2
2
  function commonjsRequire(path) {
3
3
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
4
4
  }
@@ -12,8 +12,8 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12
12
  var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, dispatchWithFallback_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, getPluginKeyName_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, checkFonts_fn, determineUnsupportedFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _map, _editor2, _descriptors, _collections, _editorEntries, _maxCachedEditors, _editorAccessOrder, _pendingCreations, _cacheHits, _cacheMisses, _evictions, _HeaderFooterEditorManager_instances, hasConverter_fn, extractCollections_fn, collectDescriptors_fn, teardownMissingEditors_fn, teardownEditors_fn, createEditor_fn, createEditorContainer_fn, registerConverterEditor_fn, unregisterConverterEditor_fn, updateAccessOrder_fn, enforceCacheSizeLimit_fn, _manager, _mediaFiles, _blockCache, _HeaderFooterLayoutAdapter_instances, getBlocks_fn, getConverterContext_fn, _instances, _options, _editor3, _visibleHost, _viewportHost, _painterHost, _selectionOverlay, _hiddenHost, _layoutOptions, _layoutState, _domPainter, _layoutError, _layoutErrorState, _errorBanner, _errorBannerMessage, _telemetryEmitter, _renderScheduled, _pendingDocChange, _isRerendering, _selectionUpdateScheduled, _remoteCursorUpdateScheduled, _rafHandle, _editorListeners, _sectionMetadata, _documentMode, _inputBridge, _trackedChangesMode, _trackedChangesEnabled, _trackedChangesOverrides, _headerFooterManager, _headerFooterAdapter, _headerFooterIdentifier, _headerLayoutResults, _footerLayoutResults, _headerDecorationProvider, _footerDecorationProvider, _headerFooterManagerCleanups, _headerRegions, _footerRegions, _session, _activeHeaderFooterEditor, _hoverOverlay, _hoverTooltip, _modeBanner, _ariaLiveRegion, _hoverRegion, _clickCount, _lastClickTime, _lastClickPosition, _remoteCursorState, _remoteCursorDirty, _remoteCursorOverlay, _localSelectionLayer, _awarenessCleanup, _scrollCleanup, _remoteCursorRafHandle, _scrollTimeout, _PresentationEditor_instances, aggregateLayoutBounds_fn, safeCleanup_fn, setupEditorListeners_fn, setupCollaborationCursors_fn, normalizeAwarenessStates_fn, getFallbackColor_fn, getValidatedColor_fn, scheduleRemoteCursorUpdate_fn, scheduleRemoteCursorReRender_fn, updateRemoteCursors_fn, renderRemoteCursors_fn, renderRemoteCaret_fn, renderRemoteCursorLabel_fn, renderRemoteSelection_fn, setupPointerHandlers_fn, setupInputBridge_fn, initHeaderFooterRegistry_fn, _handlePointerDown, getFirstTextPosition_fn, registerPointerClick_fn, selectWordAt_fn, selectParagraphAt_fn, isWordCharacter_fn, _handlePointerMove, _handlePointerLeave, _handleDoubleClick, _handleKeyDown, focusHeaderFooterShortcut_fn, scheduleRerender_fn, flushRerenderQueue_fn, rerender_fn, ensurePainter_fn, scheduleSelectionUpdate_fn, updateSelection_fn, resolveLayoutOptions_fn, buildHeaderFooterInput_fn, computeHeaderFooterConstraints_fn, updateDecorationProviders_fn, createDecorationProvider_fn, computeDecorationBox_fn, rebuildHeaderFooterRegions_fn, hitTestHeaderFooterRegion_fn, pointInRegion_fn, activateHeaderFooterRegion_fn, enterHeaderFooterMode_fn, exitHeaderFooterMode_fn, getActiveDomTarget_fn, emitHeaderFooterModeChanged_fn, emitHeaderFooterEditingContext_fn, updateAwarenessSession_fn, updateModeBanner_fn, announce_fn, validateHeaderFooterEditPermission_fn, emitHeaderFooterEditBlocked_fn, resolveDescriptorForRegion_fn, getBodyPageHeight_fn, getHeaderFooterPageHeight_fn, renderSelectionRects_fn, renderHoverRegion_fn, clearHoverRegion_fn, renderCaretOverlay_fn, getHeaderFooterContext_fn, computeHeaderFooterSelectionRects_fn, computeHeaderFooterCaretRect_fn, syncTrackedChangesPreferences_fn, deriveTrackedChangesMode_fn, deriveTrackedChangesEnabled_fn, getTrackChangesPluginState_fn, computeDefaultLayoutDefaults_fn, parseColumns_fn, inchesToPx_fn, applyZoom_fn, createLayoutMetrics_fn, convertPageLocalToOverlayCoords_fn, normalizeClientPoint_fn, computeCaretLayoutRect_fn, findLineContainingPos_fn, lineHeightBeforeIndex_fn, getCurrentPageIndex_fn, findRegionForPage_fn, handleLayoutError_fn, decorateError_fn, showLayoutErrorBanner_fn, dismissErrorBanner_fn, createHiddenHost_fn, _windowRoot, _visibleHost2, _getTargetDom, _onTargetChanged, _listeners, _currentTarget, _destroyed, _PresentationInputBridge_instances, addListener_fn, dispatchToTarget_fn, forwardKeyboardEvent_fn, forwardTextEvent_fn, forwardCompositionEvent_fn, forwardContextMenu_fn, isEventOnActiveTarget_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ParagraphNodeView_instances, updateHTMLAttributes_fn, updateDOMStyles_fn, updateListStyles_fn, initList_fn, checkIsList_fn, createMarker_fn, createSeparator_fn, calculateTabSeparatorStyle_fn, calculateMarkerStyle_fn, removeList_fn, getParagraphContext_fn, scheduleAnimation_fn, cancelScheduledAnimation_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
13
13
  import * as Y from "yjs";
14
14
  import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
15
- import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as htmlHandler, E as ReplaceStep, G as twipsToInches, H as inchesToTwips, I as ptToTwips, J as getResolvedParagraphProperties, K as linesToTwips, L as ListHelpers, O as updateNumberingProperties, Q as changeListLevel, U as findParentNode, V as isList, W as isMacOS, X as isIOS, Y as getSchemaTypeByName, Z as inputRulesPlugin, _ as TrackDeleteMarkName, $ as TrackInsertMarkName, a0 as v4, a1 as TrackFormatMarkName, a2 as comments_module_events, a3 as findMark, a4 as objectIncludes, a5 as AddMarkStep, a6 as RemoveMarkStep, a7 as twipsToLines, a8 as pixelsToTwips, a9 as helpers, aa as posToDOMRect, ab as CommandService, ac as SuperConverter, ad as createDocument, ae as createDocFromMarkdown, af as createDocFromHTML, ag as EditorState, ah as isActive, ai as unflattenListsInHtml, aj as resolveParagraphProperties, ak as _getReferencedTableStyles, al as parseSizeUnit, am as minMax, an as updateDOMAttributes, ao as findChildren$5, ap as generateRandomSigned32BitIntStrId, aq as calculateResolvedParagraphProperties, ar as encodeCSSFromPPr, as as twipsToPixels$2, at as resolveRunProperties, au as encodeCSSFromRPr, av as generateOrderedListIndex, aw as docxNumberingHelpers, ax as InputRule, ay as convertSizeToCSS, az as SelectionRange, aA as Transform, aB as findParentNodeClosestToPos, aC as isInTable$1, aD as generateDocxRandomId, aE as insertNewRelationship, aF as inchesToPixels, aG as kebabCase, aH as getUnderlineCssString } from "./converter-ZJiSHoiq.js";
16
- import { D as DocxZipper } from "./docx-zipper-B7FStorN.js";
15
+ import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as htmlHandler, E as ReplaceStep, G as twipsToInches, H as inchesToTwips, I as ptToTwips, J as getResolvedParagraphProperties, K as linesToTwips, L as ListHelpers, O as updateNumberingProperties, Q as changeListLevel, U as findParentNode, V as isList, W as isMacOS, X as isIOS, Y as getSchemaTypeByName, Z as inputRulesPlugin, _ as TrackDeleteMarkName, $ as TrackInsertMarkName, a0 as v4, a1 as TrackFormatMarkName, a2 as comments_module_events, a3 as findMark, a4 as objectIncludes, a5 as AddMarkStep, a6 as RemoveMarkStep, a7 as twipsToLines, a8 as pixelsToTwips, a9 as helpers, aa as posToDOMRect, ab as CommandService, ac as SuperConverter, ad as createDocument, ae as createDocFromMarkdown, af as createDocFromHTML, ag as EditorState, ah as isActive, ai as unflattenListsInHtml, aj as resolveParagraphProperties, ak as _getReferencedTableStyles, al as parseSizeUnit, am as minMax, an as updateDOMAttributes, ao as findChildren$5, ap as generateRandomSigned32BitIntStrId, aq as calculateResolvedParagraphProperties, ar as encodeCSSFromPPr, as as twipsToPixels$2, at as resolveRunProperties, au as encodeCSSFromRPr, av as generateOrderedListIndex, aw as docxNumberingHelpers, ax as InputRule, ay as convertSizeToCSS, az as SelectionRange, aA as Transform, aB as findParentNodeClosestToPos, aC as isInTable$1, aD as generateDocxRandomId, aE as insertNewRelationship, aF as inchesToPixels, aG as kebabCase, aH as getUnderlineCssString } from "./converter-BiUZIOjP.js";
16
+ import { D as DocxZipper } from "./docx-zipper-Dz6dcXS4.js";
17
17
  import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
18
18
  var GOOD_LEAF_SIZE = 200;
19
19
  var RopeSequence = function RopeSequence2() {
@@ -13553,7 +13553,7 @@ const isHeadless = (editor) => {
13553
13553
  const shouldSkipNodeView = (editor) => {
13554
13554
  return isHeadless(editor);
13555
13555
  };
13556
- const summaryVersion = "1.0.0-beta.4";
13556
+ const summaryVersion = "1.0.0-beta.5";
13557
13557
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
13558
13558
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
13559
13559
  function mapAttributes(attrs) {
@@ -14335,7 +14335,7 @@ const _Editor = class _Editor extends EventEmitter {
14335
14335
  { default: remarkStringify },
14336
14336
  { default: remarkGfm }
14337
14337
  ] = await Promise.all([
14338
- import("./index-BNGaD3Up.js"),
14338
+ import("./index-D653XgvV.js"),
14339
14339
  import("./index-DRCvimau.js"),
14340
14340
  import("./index-C_x_N6Uh.js"),
14341
14341
  import("./index-D_sWOSiG.js"),
@@ -14540,7 +14540,7 @@ const _Editor = class _Editor extends EventEmitter {
14540
14540
  * Process collaboration migrations
14541
14541
  */
14542
14542
  processCollaborationMigrations() {
14543
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.4");
14543
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.5");
14544
14544
  if (!this.options.ydoc) return;
14545
14545
  const metaMap = this.options.ydoc.getMap("meta");
14546
14546
  let docVersion = metaMap.get("version");
@@ -51046,13 +51046,22 @@ function checkWordBoundary(state, pos) {
51046
51046
  return !/\p{L}$/u.test(before.text) || !/^\p{L}/u.test(after.text);
51047
51047
  }
51048
51048
  class SearchState {
51049
- constructor(query, range, deco) {
51049
+ /**
51050
+ * Create a new SearchState instance.
51051
+ *
51052
+ * @param {SearchQuery} query - The search query to execute
51053
+ * @param {{from: number, to: number}|null} range - Optional range to restrict search to, or null for entire document
51054
+ * @param {boolean} highlight - Whether to apply CSS classes for visual highlighting of matches
51055
+ * @param {DecorationSet} deco - The decoration set containing match highlights
51056
+ */
51057
+ constructor(query, range, highlight, deco) {
51050
51058
  this.query = query;
51051
51059
  this.range = range;
51060
+ this.highlight = highlight;
51052
51061
  this.deco = deco;
51053
51062
  }
51054
51063
  }
51055
- function buildMatchDeco(state, query, range) {
51064
+ function buildMatchDeco(state, query, range, highlight = true) {
51056
51065
  if (!query.valid) return DecorationSet.empty;
51057
51066
  let deco = [];
51058
51067
  let sel = state.selection;
@@ -51060,7 +51069,8 @@ function buildMatchDeco(state, query, range) {
51060
51069
  let next = query.findNext(state, pos, end2);
51061
51070
  if (!next) break;
51062
51071
  let cls = next.from == sel.from && next.to == sel.to ? "ProseMirror-active-search-match" : "ProseMirror-search-match";
51063
- deco.push(Decoration.inline(next.from, next.to, { class: cls }));
51072
+ const attrs = highlight ? { class: cls } : {};
51073
+ deco.push(Decoration.inline(next.from, next.to, attrs));
51064
51074
  pos = next.to;
51065
51075
  }
51066
51076
  return DecorationSet.create(state.doc, deco);
@@ -51073,11 +51083,20 @@ function search(options = {}) {
51073
51083
  init(_config, state) {
51074
51084
  let query = options.initialQuery || new SearchQuery({ search: "" });
51075
51085
  let range = options.initialRange || null;
51076
- return new SearchState(query, range, buildMatchDeco(state, query, range));
51086
+ const highlight = options.initialHighlight ?? true;
51087
+ return new SearchState(query, range, highlight, buildMatchDeco(state, query, range, highlight));
51077
51088
  },
51078
51089
  apply(tr, search2, _oldState, state) {
51079
51090
  let set = tr.getMeta(searchKey);
51080
- if (set) return new SearchState(set.query, set.range, buildMatchDeco(state, set.query, set.range));
51091
+ if (set) {
51092
+ const highlight = typeof set.highlight === "boolean" ? set.highlight : true;
51093
+ return new SearchState(
51094
+ set.query,
51095
+ set.range,
51096
+ highlight,
51097
+ buildMatchDeco(state, set.query, set.range, highlight)
51098
+ );
51099
+ }
51081
51100
  if (tr.docChanged || tr.selectionSet) {
51082
51101
  let range = search2.range;
51083
51102
  if (range) {
@@ -51085,7 +51104,13 @@ function search(options = {}) {
51085
51104
  let to = tr.mapping.map(range.to, -1);
51086
51105
  range = from2 < to ? { from: from2, to } : null;
51087
51106
  }
51088
- search2 = new SearchState(search2.query, range, buildMatchDeco(state, search2.query, range));
51107
+ const highlight = typeof search2.highlight === "boolean" ? search2.highlight : true;
51108
+ search2 = new SearchState(
51109
+ search2.query,
51110
+ range,
51111
+ highlight,
51112
+ buildMatchDeco(state, search2.query, range, highlight)
51113
+ );
51089
51114
  }
51090
51115
  return search2;
51091
51116
  }
@@ -51099,8 +51124,12 @@ function getMatchHighlights(state) {
51099
51124
  let search2 = searchKey.getState(state);
51100
51125
  return search2 ? search2.deco : DecorationSet.empty;
51101
51126
  }
51102
- function setSearchState(tr, query, range = null) {
51103
- return tr.setMeta(searchKey, { query, range });
51127
+ function setSearchState(tr, query, range = null, options = {}) {
51128
+ if (options != null && (typeof options !== "object" || Array.isArray(options))) {
51129
+ throw new TypeError("setSearchState options must be an object");
51130
+ }
51131
+ const highlight = typeof options?.highlight === "boolean" ? options.highlight : true;
51132
+ return tr.setMeta(searchKey, { query, range, highlight });
51104
51133
  }
51105
51134
  const isRegExp = (value) => Object.prototype.toString.call(value) === "[object RegExp]";
51106
51135
  const Search = Extension.create({
@@ -51161,14 +51190,25 @@ const Search = Extension.create({
51161
51190
  * Search for string matches in editor content
51162
51191
  * @category Command
51163
51192
  * @param {String|RegExp} patternInput - Search string or pattern
51193
+ * @param {SearchCommandOptions} [options={}] - Options to control search behavior
51164
51194
  * @example
51195
+ * // Basic search with highlighting (default)
51165
51196
  * const matches = editor.commands.search('test string')
51197
+ *
51198
+ * // Regex search
51166
51199
  * const regexMatches = editor.commands.search(/test/i)
51200
+ *
51201
+ * // Search without visual highlighting
51202
+ * const silentMatches = editor.commands.search('test', { highlight: false })
51167
51203
  * @note Returns array of SearchMatch objects with positions and IDs
51168
51204
  */
51169
- search: (patternInput) => (
51205
+ search: (patternInput, options = {}) => (
51170
51206
  /** @returns {SearchMatch[]} */
51171
51207
  ({ state, dispatch }) => {
51208
+ if (options != null && (typeof options !== "object" || Array.isArray(options))) {
51209
+ throw new TypeError("Search options must be an object");
51210
+ }
51211
+ const highlight = typeof options?.highlight === "boolean" ? options.highlight : true;
51172
51212
  let pattern;
51173
51213
  let caseSensitive = false;
51174
51214
  let regexp = false;
@@ -51195,7 +51235,7 @@ const Search = Extension.create({
51195
51235
  regexp,
51196
51236
  wholeWord
51197
51237
  });
51198
- const tr = setSearchState(state.tr, query);
51238
+ const tr = setSearchState(state.tr, query, null, { highlight });
51199
51239
  dispatch(tr);
51200
51240
  const newState = state.apply(tr);
51201
51241
  const decoSet = getMatchHighlights(newState);
@@ -1,4 +1,4 @@
1
- import { aJ as getDefaultExportFromCjs } from "./converter-ZJiSHoiq.js";
1
+ import { aJ as getDefaultExportFromCjs } from "./converter-BiUZIOjP.js";
2
2
  import { V as VFile } from "./index-CvBqQJbG.js";
3
3
  function bail(error) {
4
4
  if (error) {
@@ -1,6 +1,6 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
2
- import { p as process$1 } from "./converter-ZJiSHoiq.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-DvepAjbe.js";
2
+ import { p as process$1 } from "./converter-BiUZIOjP.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-BtePjrrv.js";
4
4
  const sanitizeNumber = (value, defaultNumber) => {
5
5
  let sanitized = value.replace(/[^0-9.]/g, "");
6
6
  sanitized = parseFloat(sanitized);
@@ -1,4 +1,4 @@
1
- import { ac } from "./chunks/converter-ZJiSHoiq.js";
1
+ import { ac } from "./chunks/converter-BiUZIOjP.js";
2
2
  export {
3
3
  ac as SuperConverter
4
4
  };
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-ZJiSHoiq.js";
2
- import { D } from "./chunks/docx-zipper-B7FStorN.js";
1
+ import "./chunks/converter-BiUZIOjP.js";
2
+ import { D } from "./chunks/docx-zipper-Dz6dcXS4.js";
3
3
  export {
4
4
  D as default
5
5
  };