superdoc 1.0.0-beta.6 → 1.0.0-beta.7

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 (30) hide show
  1. package/dist/chunks/{PdfViewer-DmPiOFJ8.cjs → PdfViewer-T4fTm1XF.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-CdGAVn-4.es.js → PdfViewer-hAYAlKzI.es.js} +1 -1
  3. package/dist/chunks/{index-QulG3CF7.cjs → index-CYQjWGo5.cjs} +3 -3
  4. package/dist/chunks/{index-nXifzD54.es.js → index-DGYP5Xod.es.js} +3 -3
  5. package/dist/chunks/{index-hjUbJ86s-BMiwCR8J.es.js → index-DV613LhK-BY095UD2.es.js} +1 -1
  6. package/dist/chunks/{index-hjUbJ86s-BLl65XJn.cjs → index-DV613LhK-CqFLIBmd.cjs} +1 -1
  7. package/dist/chunks/{super-editor.es-BYVEYLjl.es.js → super-editor.es-CcaD69pQ.es.js} +135 -48
  8. package/dist/chunks/{super-editor.es-0GatZWs9.cjs → super-editor.es-DmhQckCV.cjs} +135 -48
  9. package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
  10. package/dist/style.css +9 -9
  11. package/dist/super-editor/ai-writer.es.js +2 -2
  12. package/dist/super-editor/chunks/{converter-CZF9SnYh.js → converter-BM6gXTRC.js} +1 -1
  13. package/dist/super-editor/chunks/{docx-zipper-DWypbE0V.js → docx-zipper-fwXPJGKu.js} +1 -1
  14. package/dist/super-editor/chunks/{editor-BdXHlHt-.js → editor-RPTrfArg.js} +192 -45
  15. package/dist/super-editor/chunks/{index-hjUbJ86s.js → index-DV613LhK.js} +1 -1
  16. package/dist/super-editor/chunks/{toolbar-CmelvLTd.js → toolbar-DacKXz_n.js} +5 -4
  17. package/dist/super-editor/converter.es.js +1 -1
  18. package/dist/super-editor/docx-zipper.es.js +2 -2
  19. package/dist/super-editor/editor.es.js +3 -3
  20. package/dist/super-editor/file-zipper.es.js +1 -1
  21. package/dist/super-editor/style.css +9 -9
  22. package/dist/super-editor/super-editor.es.js +9 -8
  23. package/dist/super-editor/toolbar.es.js +2 -2
  24. package/dist/super-editor.cjs +1 -1
  25. package/dist/super-editor.es.js +1 -1
  26. package/dist/superdoc.cjs +2 -2
  27. package/dist/superdoc.es.js +2 -2
  28. package/dist/superdoc.umd.js +137 -50
  29. package/dist/superdoc.umd.js.map +1 -1
  30. 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-QulG3CF7.cjs");
4
+ const superdoc = require("./index-CYQjWGo5.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-nXifzD54.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-DGYP5Xod.es.js";
3
3
  function self(vars) {
4
4
  const {
5
5
  opacityDisabled,
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const superEditor_es = require("./super-editor.es-0GatZWs9.cjs");
2
+ const superEditor_es = require("./super-editor.es-DmhQckCV.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-DmPiOFJ8.cjs")));
17230
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-T4fTm1XF.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.6";
18083
+ this.version = "1.0.0-beta.7";
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;
@@ -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-BYVEYLjl.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-CcaD69pQ.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-CdGAVn-4.es.js"));
17213
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-hAYAlKzI.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.6";
18066
+ this.version = "1.0.0-beta.7";
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-BYVEYLjl.es.js";
1
+ import { s as getDefaultExportFromCjs$2 } from "./super-editor.es-CcaD69pQ.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-0GatZWs9.cjs");
3
+ const superEditor_es = require("./super-editor.es-DmhQckCV.cjs");
4
4
  const indexCvBqQJbG = require("./index-CvBqQJbG-Dwm0THD7.cjs");
5
5
  function bail(error) {
6
6
  if (error) {
@@ -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.6") {
35566
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.7") {
35567
35567
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
35568
35568
  }
35569
35569
  /**
@@ -38763,7 +38763,7 @@ var __privateGet$1 = (obj, member, getter) => (__accessCheck$1(obj, member, "rea
38763
38763
  var __privateAdd$1 = (obj, member, value) => member.has(obj) ? __typeError$1("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
38764
38764
  var __privateSet = (obj, member, value, setter) => (__accessCheck$1(obj, member, "write to private field"), member.set(obj, value), value);
38765
38765
  var __privateMethod$1 = (obj, member, method) => (__accessCheck$1(obj, member, "access private method"), method);
38766
- 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;
38766
+ 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, _layoutSurfaces, _getTargetDom, _onTargetChanged, _listeners, _currentTarget, _destroyed, _useWindowFallback, _PresentationInputBridge_instances, addListener_fn, dispatchToTarget_fn, forwardKeyboardEvent_fn, forwardTextEvent_fn, forwardCompositionEvent_fn, forwardContextMenu_fn, isEventOnActiveTarget_fn, shouldSkipSurface_fn, isInLayoutSurface_fn, getListenerTargets_fn, isPlainCharacterKey_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;
38767
38767
  var GOOD_LEAF_SIZE = 200;
38768
38768
  var RopeSequence = function RopeSequence2() {
38769
38769
  };
@@ -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.6";
52273
+ const summaryVersion = "1.0.0-beta.7";
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-hjUbJ86s-BMiwCR8J.es.js"),
53052
+ import("./index-DV613LhK-BY095UD2.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.6");
53257
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.7");
53258
53258
  if (!this.options.ydoc) return;
53259
53259
  const metaMap = this.options.ydoc.getMap("meta");
53260
53260
  let docVersion = metaMap.get("version");
@@ -68966,6 +68966,24 @@ getConverterContext_fn = function() {
68966
68966
  }
68967
68967
  return Object.keys(context).length > 0 ? context : void 0;
68968
68968
  };
68969
+ const uiSurfaces = /* @__PURE__ */ new WeakSet();
68970
+ function isInRegisteredSurface(event) {
68971
+ const path = typeof event.composedPath === "function" ? event.composedPath() : [];
68972
+ if (path.length > 0) {
68973
+ for (const node2 of path) {
68974
+ if (uiSurfaces.has(node2)) return true;
68975
+ if (node2?.hasAttribute?.("data-editor-ui-surface")) return true;
68976
+ }
68977
+ return false;
68978
+ }
68979
+ let node = event.target;
68980
+ while (node) {
68981
+ if (uiSurfaces.has(node)) return true;
68982
+ if (node.hasAttribute?.("data-editor-ui-surface")) return true;
68983
+ node = node.parentElement;
68984
+ }
68985
+ return false;
68986
+ }
68969
68987
  const DEFAULT_PAGE_SIZE = { w: 612, h: 792 };
68970
68988
  const DEFAULT_MARGINS = { top: 72, right: 72, bottom: 72, left: 72 };
68971
68989
  const WORD_CHARACTER_REGEX = /[\p{L}\p{N}''_~-]/u;
@@ -71742,39 +71760,49 @@ _PresentationEditor.CURSOR_STYLES = {
71742
71760
  };
71743
71761
  let PresentationEditor = _PresentationEditor;
71744
71762
  class PresentationInputBridge {
71745
- constructor(windowRoot, visibleHost, getTargetDom, onTargetChanged) {
71763
+ constructor(windowRoot, layoutSurface, getTargetDom, onTargetChanged, options) {
71746
71764
  __privateAdd$1(this, _PresentationInputBridge_instances);
71747
71765
  __privateAdd$1(this, _windowRoot);
71748
- __privateAdd$1(this, _visibleHost2);
71766
+ __privateAdd$1(this, _layoutSurfaces);
71749
71767
  __privateAdd$1(this, _getTargetDom);
71750
71768
  __privateAdd$1(this, _onTargetChanged);
71751
71769
  __privateAdd$1(this, _listeners);
71752
71770
  __privateAdd$1(this, _currentTarget, null);
71753
71771
  __privateAdd$1(this, _destroyed, false);
71772
+ __privateAdd$1(this, _useWindowFallback);
71754
71773
  __privateSet(this, _windowRoot, windowRoot);
71755
- __privateSet(this, _visibleHost2, visibleHost);
71774
+ __privateSet(this, _layoutSurfaces, /* @__PURE__ */ new Set([layoutSurface]));
71756
71775
  __privateSet(this, _getTargetDom, getTargetDom);
71757
71776
  __privateSet(this, _onTargetChanged, onTargetChanged);
71758
71777
  __privateSet(this, _listeners, []);
71778
+ __privateSet(this, _useWindowFallback, options?.useWindowFallback ?? false);
71759
71779
  }
71760
71780
  bind() {
71761
- __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "keydown", __privateMethod$1(this, _PresentationInputBridge_instances, forwardKeyboardEvent_fn), __privateGet$1(this, _windowRoot));
71762
- __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "keypress", __privateMethod$1(this, _PresentationInputBridge_instances, forwardKeyboardEvent_fn), __privateGet$1(this, _windowRoot));
71763
- __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "keyup", __privateMethod$1(this, _PresentationInputBridge_instances, forwardKeyboardEvent_fn), __privateGet$1(this, _windowRoot));
71764
- __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "compositionstart", __privateMethod$1(this, _PresentationInputBridge_instances, forwardCompositionEvent_fn), __privateGet$1(this, _windowRoot));
71765
- __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "compositionupdate", __privateMethod$1(this, _PresentationInputBridge_instances, forwardCompositionEvent_fn), __privateGet$1(this, _windowRoot));
71766
- __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "compositionend", __privateMethod$1(this, _PresentationInputBridge_instances, forwardCompositionEvent_fn), __privateGet$1(this, _windowRoot));
71767
- __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "contextmenu", __privateMethod$1(this, _PresentationInputBridge_instances, forwardContextMenu_fn), __privateGet$1(this, _windowRoot));
71768
- __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "beforeinput", __privateMethod$1(this, _PresentationInputBridge_instances, forwardTextEvent_fn), __privateGet$1(this, _visibleHost2));
71769
- __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "input", __privateMethod$1(this, _PresentationInputBridge_instances, forwardTextEvent_fn), __privateGet$1(this, _visibleHost2));
71770
- __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "textInput", __privateMethod$1(this, _PresentationInputBridge_instances, forwardTextEvent_fn), __privateGet$1(this, _visibleHost2));
71771
- __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "beforeinput", __privateMethod$1(this, _PresentationInputBridge_instances, forwardTextEvent_fn), __privateGet$1(this, _windowRoot));
71772
- __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "input", __privateMethod$1(this, _PresentationInputBridge_instances, forwardTextEvent_fn), __privateGet$1(this, _windowRoot));
71773
- __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "textInput", __privateMethod$1(this, _PresentationInputBridge_instances, forwardTextEvent_fn), __privateGet$1(this, _windowRoot));
71781
+ const keyboardTargets = __privateMethod$1(this, _PresentationInputBridge_instances, getListenerTargets_fn).call(this);
71782
+ keyboardTargets.forEach((target) => {
71783
+ __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "keydown", __privateMethod$1(this, _PresentationInputBridge_instances, forwardKeyboardEvent_fn), target);
71784
+ __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "keyup", __privateMethod$1(this, _PresentationInputBridge_instances, forwardKeyboardEvent_fn), target);
71785
+ });
71786
+ const compositionTargets = __privateMethod$1(this, _PresentationInputBridge_instances, getListenerTargets_fn).call(this);
71787
+ compositionTargets.forEach((target) => {
71788
+ __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "compositionstart", __privateMethod$1(this, _PresentationInputBridge_instances, forwardCompositionEvent_fn), target);
71789
+ __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "compositionupdate", __privateMethod$1(this, _PresentationInputBridge_instances, forwardCompositionEvent_fn), target);
71790
+ __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "compositionend", __privateMethod$1(this, _PresentationInputBridge_instances, forwardCompositionEvent_fn), target);
71791
+ });
71792
+ const textTargets = __privateMethod$1(this, _PresentationInputBridge_instances, getListenerTargets_fn).call(this);
71793
+ textTargets.forEach((target) => {
71794
+ __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "beforeinput", __privateMethod$1(this, _PresentationInputBridge_instances, forwardTextEvent_fn), target);
71795
+ __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "input", __privateMethod$1(this, _PresentationInputBridge_instances, forwardTextEvent_fn), target);
71796
+ __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "textInput", __privateMethod$1(this, _PresentationInputBridge_instances, forwardTextEvent_fn), target);
71797
+ });
71798
+ const contextTargets = __privateMethod$1(this, _PresentationInputBridge_instances, getListenerTargets_fn).call(this);
71799
+ contextTargets.forEach((target) => {
71800
+ __privateMethod$1(this, _PresentationInputBridge_instances, addListener_fn).call(this, "contextmenu", __privateMethod$1(this, _PresentationInputBridge_instances, forwardContextMenu_fn), target);
71801
+ });
71774
71802
  }
71775
71803
  destroy() {
71776
- __privateGet$1(this, _listeners).forEach(({ type: type2, handler: handler2, target }) => {
71777
- target.removeEventListener(type2, handler2, true);
71804
+ __privateGet$1(this, _listeners).forEach(({ type: type2, handler: handler2, target, useCapture }) => {
71805
+ target.removeEventListener(type2, handler2, useCapture);
71778
71806
  });
71779
71807
  __privateSet(this, _listeners, []);
71780
71808
  __privateSet(this, _currentTarget, null);
@@ -71809,17 +71837,18 @@ class PresentationInputBridge {
71809
71837
  }
71810
71838
  }
71811
71839
  _windowRoot = /* @__PURE__ */ new WeakMap();
71812
- _visibleHost2 = /* @__PURE__ */ new WeakMap();
71840
+ _layoutSurfaces = /* @__PURE__ */ new WeakMap();
71813
71841
  _getTargetDom = /* @__PURE__ */ new WeakMap();
71814
71842
  _onTargetChanged = /* @__PURE__ */ new WeakMap();
71815
71843
  _listeners = /* @__PURE__ */ new WeakMap();
71816
71844
  _currentTarget = /* @__PURE__ */ new WeakMap();
71817
71845
  _destroyed = /* @__PURE__ */ new WeakMap();
71846
+ _useWindowFallback = /* @__PURE__ */ new WeakMap();
71818
71847
  _PresentationInputBridge_instances = /* @__PURE__ */ new WeakSet();
71819
- addListener_fn = function(type2, handler2, target) {
71848
+ addListener_fn = function(type2, handler2, target, useCapture = false) {
71820
71849
  const bound = handler2.bind(this);
71821
- __privateGet$1(this, _listeners).push({ type: type2, handler: bound, target });
71822
- target.addEventListener(type2, bound, true);
71850
+ __privateGet$1(this, _listeners).push({ type: type2, handler: bound, target, useCapture });
71851
+ target.addEventListener(type2, bound, useCapture);
71823
71852
  };
71824
71853
  dispatchToTarget_fn = function(originalEvent, synthetic) {
71825
71854
  if (__privateGet$1(this, _destroyed)) return;
@@ -71840,7 +71869,16 @@ dispatchToTarget_fn = function(originalEvent, synthetic) {
71840
71869
  }
71841
71870
  };
71842
71871
  forwardKeyboardEvent_fn = function(event) {
71843
- if (__privateMethod$1(this, _PresentationInputBridge_instances, isEventOnActiveTarget_fn).call(this, event)) {
71872
+ if (__privateMethod$1(this, _PresentationInputBridge_instances, shouldSkipSurface_fn).call(this, event)) {
71873
+ return;
71874
+ }
71875
+ if (event.defaultPrevented) {
71876
+ return;
71877
+ }
71878
+ if (event.isComposing || event.keyCode === 229) {
71879
+ return;
71880
+ }
71881
+ if (__privateMethod$1(this, _PresentationInputBridge_instances, isPlainCharacterKey_fn).call(this, event)) {
71844
71882
  return;
71845
71883
  }
71846
71884
  const synthetic = new KeyboardEvent(event.type, {
@@ -71858,26 +71896,40 @@ forwardKeyboardEvent_fn = function(event) {
71858
71896
  __privateMethod$1(this, _PresentationInputBridge_instances, dispatchToTarget_fn).call(this, event, synthetic);
71859
71897
  };
71860
71898
  forwardTextEvent_fn = function(event) {
71861
- if (__privateMethod$1(this, _PresentationInputBridge_instances, isEventOnActiveTarget_fn).call(this, event)) {
71899
+ if (__privateMethod$1(this, _PresentationInputBridge_instances, shouldSkipSurface_fn).call(this, event)) {
71862
71900
  return;
71863
71901
  }
71864
- let synthetic;
71865
- if (typeof InputEvent !== "undefined") {
71866
- synthetic = new InputEvent(event.type, {
71867
- data: event.data ?? event.data ?? null,
71868
- inputType: event.inputType ?? "insertText",
71869
- dataTransfer: event.dataTransfer ?? null,
71870
- isComposing: event.isComposing ?? false,
71871
- bubbles: true,
71872
- cancelable: true
71873
- });
71874
- } else {
71875
- synthetic = new Event(event.type, { bubbles: true, cancelable: true });
71902
+ if (event.defaultPrevented) {
71903
+ return;
71876
71904
  }
71877
- __privateMethod$1(this, _PresentationInputBridge_instances, dispatchToTarget_fn).call(this, event, synthetic);
71905
+ if (event.isComposing) {
71906
+ return;
71907
+ }
71908
+ queueMicrotask(() => {
71909
+ if (event.defaultPrevented) {
71910
+ return;
71911
+ }
71912
+ let synthetic;
71913
+ if (typeof InputEvent !== "undefined") {
71914
+ synthetic = new InputEvent(event.type, {
71915
+ data: event.data ?? event.data ?? null,
71916
+ inputType: event.inputType ?? "insertText",
71917
+ dataTransfer: event.dataTransfer ?? null,
71918
+ isComposing: event.isComposing ?? false,
71919
+ bubbles: true,
71920
+ cancelable: true
71921
+ });
71922
+ } else {
71923
+ synthetic = new Event(event.type, { bubbles: true, cancelable: true });
71924
+ }
71925
+ __privateMethod$1(this, _PresentationInputBridge_instances, dispatchToTarget_fn).call(this, event, synthetic);
71926
+ });
71878
71927
  };
71879
71928
  forwardCompositionEvent_fn = function(event) {
71880
- if (__privateMethod$1(this, _PresentationInputBridge_instances, isEventOnActiveTarget_fn).call(this, event)) {
71929
+ if (__privateMethod$1(this, _PresentationInputBridge_instances, shouldSkipSurface_fn).call(this, event)) {
71930
+ return;
71931
+ }
71932
+ if (event.defaultPrevented) {
71881
71933
  return;
71882
71934
  }
71883
71935
  let synthetic;
@@ -71893,7 +71945,10 @@ forwardCompositionEvent_fn = function(event) {
71893
71945
  __privateMethod$1(this, _PresentationInputBridge_instances, dispatchToTarget_fn).call(this, event, synthetic);
71894
71946
  };
71895
71947
  forwardContextMenu_fn = function(event) {
71896
- if (__privateMethod$1(this, _PresentationInputBridge_instances, isEventOnActiveTarget_fn).call(this, event)) {
71948
+ if (__privateMethod$1(this, _PresentationInputBridge_instances, shouldSkipSurface_fn).call(this, event)) {
71949
+ return;
71950
+ }
71951
+ if (event.defaultPrevented) {
71897
71952
  return;
71898
71953
  }
71899
71954
  const synthetic = new MouseEvent("contextmenu", {
@@ -71927,6 +71982,36 @@ isEventOnActiveTarget_fn = function(event) {
71927
71982
  }
71928
71983
  return false;
71929
71984
  };
71985
+ shouldSkipSurface_fn = function(event) {
71986
+ if (__privateMethod$1(this, _PresentationInputBridge_instances, isEventOnActiveTarget_fn).call(this, event)) {
71987
+ return true;
71988
+ }
71989
+ if (!__privateMethod$1(this, _PresentationInputBridge_instances, isInLayoutSurface_fn).call(this, event)) {
71990
+ return true;
71991
+ }
71992
+ if (isInRegisteredSurface(event)) {
71993
+ return true;
71994
+ }
71995
+ return false;
71996
+ };
71997
+ isInLayoutSurface_fn = function(event) {
71998
+ const path = typeof event.composedPath === "function" ? event.composedPath() : [];
71999
+ if (path.length) {
72000
+ return path.some((node) => __privateGet$1(this, _layoutSurfaces).has(node));
72001
+ }
72002
+ const origin = event.target;
72003
+ return origin ? __privateGet$1(this, _layoutSurfaces).has(origin) : false;
72004
+ };
72005
+ getListenerTargets_fn = function() {
72006
+ const targets = new Set(__privateGet$1(this, _layoutSurfaces));
72007
+ if (__privateGet$1(this, _useWindowFallback)) {
72008
+ targets.add(__privateGet$1(this, _windowRoot));
72009
+ }
72010
+ return Array.from(targets);
72011
+ };
72012
+ isPlainCharacterKey_fn = function(event) {
72013
+ return event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey;
72014
+ };
71930
72015
  const Color = Extension.create({
71931
72016
  name: "color",
71932
72017
  addOptions() {
@@ -100314,7 +100399,8 @@ const _sfc_main$h = {
100314
100399
  class: "superdoc-toolbar",
100315
100400
  key: unref(toolbarKey),
100316
100401
  role: "toolbar",
100317
- "aria-label": "Toolbar"
100402
+ "aria-label": "Toolbar",
100403
+ "data-editor-ui-surface": ""
100318
100404
  }, [
100319
100405
  unref(showLeftSide) ? (openBlock(), createBlock(ButtonGroup, {
100320
100406
  key: 0,
@@ -100346,7 +100432,7 @@ const _sfc_main$h = {
100346
100432
  };
100347
100433
  }
100348
100434
  };
100349
- const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-639f50b4"]]);
100435
+ const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-3f5ec271"]]);
100350
100436
  const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
100351
100437
  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: ";
100352
100438
  async function baseInsightsFetch(payload, options = {}) {
@@ -101358,7 +101444,8 @@ const _sfc_main$e = {
101358
101444
  const DocumentMode = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-8730b752"]]);
101359
101445
  const _hoisted_1$c = {
101360
101446
  key: 0,
101361
- class: "linked-style-buttons"
101447
+ class: "linked-style-buttons",
101448
+ "data-editor-ui-surface": ""
101362
101449
  };
101363
101450
  const _hoisted_2$8 = ["onClick", "onKeydown", "aria-label"];
101364
101451
  const _sfc_main$d = {
@@ -101437,7 +101524,7 @@ const _sfc_main$d = {
101437
101524
  };
101438
101525
  }
101439
101526
  };
101440
- const LinkedStyle = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-b53508a8"]]);
101527
+ const LinkedStyle = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-ecb78965"]]);
101441
101528
  const _hoisted_1$b = {
101442
101529
  key: 0,
101443
101530
  class: "link-title"