oasis-editor 0.0.83 → 0.0.84

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.
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { v as visitRun, a as assertNever, c as createSignal, b as createEditorStateFromDocument, d as createInitialEditorState, S as STANDARD_FONT_SIZES_PT, f as fontSizePxToPt, p as probeLocalFontFamilies, e as createEditorParagraphFromRuns, i as isInlineObjectRun, g as createEditorStyledRun, h as getParagraphLength, j as getParagraphText, k as getActiveZone, l as getDocumentSections, m as getActiveSectionIndex, n as getParagraphs, o as normalizeSelection, q as positionToParagraphOffset, r as paragraphOffsetToPosition, s as clampPosition, t as findParagraphIndex, u as createCollapsedSelection, w as isSelectionCollapsed, x as parseFontSizePtToPx, y as formatFontSizePt, z as createEditorParagraph, A as getBlockParagraphs, B as findParagraphTableLocation, C as buildTableCellLayout, P as PT_PER_PX, D as createEditorTableCell, E as createEditorTableRow, F as createEditorTable, G as underlineStyleToCssDecorationStyle, H as resolveImageSrc, I as listKindForTag, J as isParagraphTag, K as collectInlineRuns, L as parseParagraphStyle, M as getRunImage, N as InlineShell, O as BalloonShell, Q as DocumentShell, R as createMemo, T as buildCanvasLayoutSnapshot, U as getCaretRectFromSnapshot, V as getParagraphRectFromSnapshot, W as createComponent, X as CaretOverlay, Y as Show, Z as createRenderEffect, _ as style, $ as setAttribute, a0 as setStyleProperty, a1 as memo, a2 as template, a3 as useI18n, a4 as createEffect, a5 as insert, a6 as use, a7 as addEventListener, a8 as Dialog, a9 as delegateEvents, aa as className, ab as For, ac as UNDERLINE_STYLE_OPTIONS, ad as Tabs, ae as onMount, af as onCleanup, ag as PluginUiHost, ah as OasisEditorEditor, ai as OasisBrandMark, aj as setPreciseFontPreference, ak as setWelcomeSeen, al as enablePreciseFontMode, am as TWIPS_PER_POINT, an as PX_PER_INCH, ao as TWIPS_PER_INCH, ap as resolveEffectiveParagraphStyle, aq as resolveEffectiveTextStyleForParagraph, ar as EMU_PER_PX, as as EMU_PER_PT, at as getRunFootnoteReference, au as getRunEndnoteReference, av as iterateFootnoteReferenceRuns, aw as iterateEndnoteReferenceRuns, ax as imageContentTypeDefaults, ay as getRunFieldChar, az as getRunFieldInstruction, aA as createEditorRun, aB as JSZip, aC as imageExtensionFromMime, aD as pxToPt$1, aE as resolveFloatingObjectRect, aF as getTextBoxFloatingGeometry, aG as getPresetPathSegments, aH as projectBlocksLayout, aI as buildListLabels, aJ as textStyleToFontSizePt, aK as PX_PER_POINT, aL as DEFAULT_FONT_SIZE_PX, aM as isDoubleUnderlineStyle, aN as isWavyUnderlineStyle, aO as underlineStyleLineWidthPx, aP as underlineStyleDashArray, aQ as resolveListLabel, aR as getListLabelInset, aS as getAlignedListLabelInset, aT as getParagraphBorderInsets, aU as buildSegmentTable, aV as buildCanvasTableLayout, aW as normalizeFamily, aX as ROBOTO_FONT_FILES, aY as loadFontAsset, aZ as OFFICE_COMPAT_FONT_FAMILIES, a_ as buildSfnt, a$ as defaultFontDecoderRegistry, b0 as SfntFontProgram, b1 as collectPdfFontFamilies, b2 as projectDocumentLayout, b3 as getPageContentWidth, b4 as getPageHeaderZoneTop, b5 as getPageBodyTop, b6 as getPageColumnRects, b7 as findFootnoteReference, b8 as FOOTNOTE_MARKER_GUTTER_PX, b9 as resolveImporterForFile, ba as getDocumentSectionsCanonical, bb as getDocumentParagraphsCanonical, bc as getDocumentParagraphs, bd as getDocumentPageSettings, be as getTableCellContentWidthForParagraph, bf as on, bg as debounce, bh as unwrap, bi as perfTimer, bj as getRunTextBox, bk as createEditorDocument, bl as resolveResizedDimensions, bm as resolveTextBoxRenderHeight, bn as getToolbarStyleState, bo as getCachedCanvasImage, bp as measureParagraphMinContentWidthPx, bq as getEditableBlocksForZone, br as findParagraphLocation, bs as createSectionBoundaryParagraph, bt as normalizePageSettings, bu as DEFAULT_EDITOR_PAGE_SETTINGS, bv as markStart, bw as markEnd, bx as getParagraphEntries, by as getParagraphById, bz as createEditorFootnote, bA as createFootnoteReferenceRun, bB as renumberFootnotes, bC as getFootnoteDisplayMarker, bD as getHeadingLevel, bE as preciseFontModeVersion, bF as isPreciseFontModeEnabled, bG as togglePreciseFontMode, bH as nextFontSizePt, bI as previousFontSizePt, bJ as fontSizePtToPx, bK as createDefaultToolbarPreset, bL as MenuRegistry, bM as createToolbarRegistry, bN as Editor, bO as resolveCommandRef, bP as commandRefName, bQ as createOasisEditorClient, bR as createEditorZoom, bS as startLongTaskObserver, bT as installGlobalReport, bU as applyStoredPreciseFontPreference, bV as getWelcomeSeen, bW as isLocalFontAccessSupported, bX as EDITOR_SCROLL_PADDING_PX, bY as Toolbar, bZ as OasisEditorLoading, b_ as I18nProvider, b$ as createTranslator, c0 as createEditorLogger, c1 as registerDomStatsSurface } from "./index-CF99ClZS.js";
4
+ import { v as visitRun, a as assertNever, c as createSignal, b as createEditorStateFromDocument, d as createInitialEditorState, S as STANDARD_FONT_SIZES_PT, f as fontSizePxToPt, p as probeLocalFontFamilies, e as createEditorParagraphFromRuns, i as isInlineObjectRun, g as createEditorStyledRun, h as getParagraphLength, j as getParagraphText, k as getActiveZone, l as getDocumentSections, m as getActiveSectionIndex, n as getParagraphs, o as normalizeSelection, q as positionToParagraphOffset, r as paragraphOffsetToPosition, s as clampPosition, t as findParagraphIndex, u as createCollapsedSelection, w as isSelectionCollapsed, x as parseFontSizePtToPx, y as formatFontSizePt, z as createEditorParagraph, A as getBlockParagraphs, B as findParagraphTableLocation, C as buildTableCellLayout, P as PT_PER_PX, D as createEditorTableCell, E as createEditorTableRow, F as createEditorTable, G as underlineStyleToCssDecorationStyle, H as resolveImageSrc, I as listKindForTag, J as isParagraphTag, K as collectInlineRuns, L as parseParagraphStyle, M as getRunImage, N as InlineShell, O as BalloonShell, Q as DocumentShell, R as createMemo, T as buildCanvasLayoutSnapshot, U as getCaretRectFromSnapshot, V as getParagraphRectFromSnapshot, W as createComponent, X as CaretOverlay, Y as Show, Z as createRenderEffect, _ as style, $ as setAttribute, a0 as setStyleProperty, a1 as memo, a2 as template, a3 as useI18n, a4 as createEffect, a5 as insert, a6 as use, a7 as addEventListener, a8 as Dialog, a9 as delegateEvents, aa as className, ab as For, ac as UNDERLINE_STYLE_OPTIONS, ad as Tabs, ae as onMount, af as onCleanup, ag as PluginUiHost, ah as OasisEditorEditor, ai as OasisBrandMark, aj as setPreciseFontPreference, ak as setWelcomeSeen, al as enablePreciseFontMode, am as TWIPS_PER_POINT, an as PX_PER_INCH, ao as TWIPS_PER_INCH, ap as resolveEffectiveParagraphStyle, aq as resolveEffectiveTextStyleForParagraph, ar as EMU_PER_PX, as as EMU_PER_PT, at as getRunFootnoteReference, au as getRunEndnoteReference, av as iterateFootnoteReferenceRuns, aw as iterateEndnoteReferenceRuns, ax as imageContentTypeDefaults, ay as getRunFieldChar, az as getRunFieldInstruction, aA as createEditorRun, aB as JSZip, aC as imageExtensionFromMime, aD as pxToPt$1, aE as resolveFloatingObjectRect, aF as getTextBoxFloatingGeometry, aG as getPresetPathSegments, aH as projectBlocksLayout, aI as buildListLabels, aJ as textStyleToFontSizePt, aK as PX_PER_POINT, aL as DEFAULT_FONT_SIZE_PX, aM as isDoubleUnderlineStyle, aN as isWavyUnderlineStyle, aO as underlineStyleLineWidthPx, aP as underlineStyleDashArray, aQ as resolveListLabel, aR as getListLabelInset, aS as getAlignedListLabelInset, aT as getParagraphBorderInsets, aU as buildSegmentTable, aV as buildCanvasTableLayout, aW as normalizeFamily, aX as ROBOTO_FONT_FILES, aY as loadFontAsset, aZ as OFFICE_COMPAT_FONT_FAMILIES, a_ as buildSfnt, a$ as defaultFontDecoderRegistry, b0 as SfntFontProgram, b1 as collectPdfFontFamilies, b2 as projectDocumentLayout, b3 as getPageContentWidth, b4 as getPageHeaderZoneTop, b5 as getPageBodyTop, b6 as getPageColumnRects, b7 as findFootnoteReference, b8 as FOOTNOTE_MARKER_GUTTER_PX, b9 as resolveImporterForFile, ba as getDocumentSectionsCanonical, bb as getDocumentParagraphsCanonical, bc as getDocumentParagraphs, bd as getDocumentPageSettings, be as getTableCellContentWidthForParagraph, bf as on, bg as debounce, bh as unwrap, bi as perfTimer, bj as getRunTextBox, bk as createEditorDocument, bl as resolveResizedDimensions, bm as resolveTextBoxRenderHeight, bn as getToolbarStyleState, bo as getCachedCanvasImage, bp as measureParagraphMinContentWidthPx, bq as getEditableBlocksForZone, br as findParagraphLocation, bs as createSectionBoundaryParagraph, bt as normalizePageSettings, bu as DEFAULT_EDITOR_PAGE_SETTINGS, bv as markStart, bw as markEnd, bx as getParagraphEntries, by as getParagraphById, bz as createEditorFootnote, bA as createFootnoteReferenceRun, bB as renumberFootnotes, bC as getFootnoteDisplayMarker, bD as getHeadingLevel, bE as preciseFontModeVersion, bF as isPreciseFontModeEnabled, bG as togglePreciseFontMode, bH as nextFontSizePt, bI as previousFontSizePt, bJ as fontSizePtToPx, bK as createDefaultToolbarPreset, bL as MenuRegistry, bM as createToolbarRegistry, bN as Editor, bO as resolveCommandRef, bP as commandRefName, bQ as createOasisEditorClient, bR as createEditorZoom, bS as startLongTaskObserver, bT as installGlobalReport, bU as applyStoredPreciseFontPreference, bV as getWelcomeSeen, bW as isLocalFontAccessSupported, bX as EDITOR_SCROLL_PADDING_PX, bY as Toolbar, bZ as OasisEditorLoading, b_ as I18nProvider, b$ as createTranslator, c0 as createEditorLogger, c1 as registerDomStatsSurface } from "./index-9_ibx79n.js";
5
5
  function cloneStyle(style2) {
6
6
  return style2 ? { ...style2 } : void 0;
7
7
  }
@@ -26762,6 +26762,40 @@ function createEditorFontOptions(ctx) {
26762
26762
  loadLocalFontFamilyOptions
26763
26763
  };
26764
26764
  }
26765
+ const MERGE_KEYS = {
26766
+ insertText: "insertText",
26767
+ insertImage: "insertImage",
26768
+ insertTable: "insertTable",
26769
+ moveImage: "moveImage",
26770
+ splitListItem: "splitListItem",
26771
+ link: "link",
26772
+ imageAlt: "imageAlt",
26773
+ imageCaption: "imageCaption",
26774
+ layoutWrapPolygon: "layoutWrapPolygon",
26775
+ specialIndent: "specialIndent",
26776
+ paraBorders: "paraBorders",
26777
+ findReplace: "findReplace",
26778
+ findReplaceAll: "findReplaceAll",
26779
+ tableProperties: "tableProperties",
26780
+ paragraphDialog: "paragraph-dialog",
26781
+ fontDialog: "font-dialog",
26782
+ copyTextByDrag: "copyTextByDrag",
26783
+ moveTextByDrag: "moveTextByDrag",
26784
+ collapseSelectionByClick: "collapseSelectionByClick",
26785
+ mergeTable: "mergeTable",
26786
+ splitTable: "splitTable",
26787
+ insertTableColumn: "insertTableColumn",
26788
+ deleteTableColumn: "deleteTableColumn",
26789
+ insertTableRow: "insertTableRow",
26790
+ deleteTableRow: "deleteTableRow",
26791
+ tableShading: "tableShading",
26792
+ tableBorders: "tableBorders",
26793
+ tableWidth: "tableWidth",
26794
+ tableAlign: "tableAlign",
26795
+ tableCellWidth: "tableCellWidth",
26796
+ layoutWrapPreset: "layoutWrapPreset",
26797
+ layoutFixedPosition: "layoutFixedPosition"
26798
+ };
26765
26799
  function normalizeRuns(runs, fallbackStyles) {
26766
26800
  const merged = [];
26767
26801
  for (const run of runs) {
@@ -28121,7 +28155,7 @@ function createFontDialogBridge(deps) {
28121
28155
  }
28122
28156
  return next;
28123
28157
  },
28124
- { mergeKey: "font-dialog" }
28158
+ { mergeKey: MERGE_KEYS.fontDialog }
28125
28159
  );
28126
28160
  deps.focusInput();
28127
28161
  };
@@ -28503,7 +28537,7 @@ function createParagraphDialogBridge(deps) {
28503
28537
  }
28504
28538
  return next;
28505
28539
  },
28506
- { mergeKey: "paragraph-dialog" }
28540
+ { mergeKey: MERGE_KEYS.paragraphDialog }
28507
28541
  );
28508
28542
  deps.focusInput();
28509
28543
  };
@@ -29206,7 +29240,7 @@ function createTablePropertiesDialogBridge(deps) {
29206
29240
  deps.resetTransactionGrouping();
29207
29241
  deps.applyTransactionalState(
29208
29242
  (current) => applyTableProperties(current, values),
29209
- { mergeKey: "tableProperties" }
29243
+ { mergeKey: MERGE_KEYS.tableProperties }
29210
29244
  );
29211
29245
  deps.focusInput();
29212
29246
  };
@@ -30111,35 +30145,35 @@ function createEditorTableContextMenuActions(deps) {
30111
30145
  openBordersAndShading: () => deps.openTablePropertiesDialog("cell"),
30112
30146
  merge: () => applyTableContextCommand(
30113
30147
  (current) => tableOps.mergeSelectedTable(current),
30114
- "mergeTable"
30148
+ MERGE_KEYS.mergeTable
30115
30149
  ),
30116
30150
  split: () => applyTableContextCommand(
30117
30151
  (current) => tableOps.splitSelectedTable(current),
30118
- "splitTable"
30152
+ MERGE_KEYS.splitTable
30119
30153
  ),
30120
30154
  insertColumnBefore: () => applyTableContextCommand(
30121
30155
  (current) => tableOps.insertSelectedTableColumn(current, -1),
30122
- "insertTableColumn"
30156
+ MERGE_KEYS.insertTableColumn
30123
30157
  ),
30124
30158
  insertColumnAfter: () => applyTableContextCommand(
30125
30159
  (current) => tableOps.insertSelectedTableColumn(current, 1),
30126
- "insertTableColumn"
30160
+ MERGE_KEYS.insertTableColumn
30127
30161
  ),
30128
30162
  deleteColumn: () => applyTableContextCommand(
30129
30163
  (current) => tableOps.deleteSelectedTableColumn(current),
30130
- "deleteTableColumn"
30164
+ MERGE_KEYS.deleteTableColumn
30131
30165
  ),
30132
30166
  insertRowBefore: () => applyTableContextCommand(
30133
30167
  (current) => tableOps.insertSelectedTableRow(current, -1),
30134
- "insertTableRow"
30168
+ MERGE_KEYS.insertTableRow
30135
30169
  ),
30136
30170
  insertRowAfter: () => applyTableContextCommand(
30137
30171
  (current) => tableOps.insertSelectedTableRow(current, 1),
30138
- "insertTableRow"
30172
+ MERGE_KEYS.insertTableRow
30139
30173
  ),
30140
30174
  deleteRow: () => applyTableContextCommand(
30141
30175
  (current) => tableOps.deleteSelectedTableRow(current),
30142
- "deleteTableRow"
30176
+ MERGE_KEYS.deleteTableRow
30143
30177
  )
30144
30178
  };
30145
30179
  }
@@ -38142,7 +38176,7 @@ function createImageInsertionService(deps) {
38142
38176
  const targetState = position ? setSelection(current, { anchor: position, focus: position }) : current;
38143
38177
  return insertImageAtSelection(targetState, { src, width, height });
38144
38178
  },
38145
- { mergeKey: "insertImage" }
38179
+ { mergeKey: MERGE_KEYS.insertImage }
38146
38180
  );
38147
38181
  };
38148
38182
  return {
@@ -38947,7 +38981,7 @@ function createEditorHistoryActions(deps) {
38947
38981
  deps.applyTransactionalState(
38948
38982
  () => moveSelectedImageToPosition(nextState, targetPosition),
38949
38983
  {
38950
- mergeKey: "moveImage"
38984
+ mergeKey: MERGE_KEYS.moveImage
38951
38985
  }
38952
38986
  );
38953
38987
  deps.focusInput();
@@ -38960,7 +38994,7 @@ function createEditorHistoryActions(deps) {
38960
38994
  current,
38961
38995
  paragraphOffsetToPosition(targetParagraph, targetOffset)
38962
38996
  ),
38963
- { mergeKey: "moveImage" }
38997
+ { mergeKey: MERGE_KEYS.moveImage }
38964
38998
  );
38965
38999
  deps.focusInput();
38966
39000
  return true;
@@ -40817,7 +40851,7 @@ function createEditorTableOperations(deps) {
40817
40851
  deps.applyTransactionalState(
40818
40852
  (current) => insertTableAtSelection(current, rows, cols),
40819
40853
  {
40820
- mergeKey: "insertTable"
40854
+ mergeKey: MERGE_KEYS.insertTable
40821
40855
  }
40822
40856
  );
40823
40857
  deps.focusInput();
@@ -41199,7 +41233,7 @@ function createEditorImageOperations(deps) {
41199
41233
  );
41200
41234
  deps.applyTransactionalState(
41201
41235
  (current) => moveSelectedImageToPosition(current, position),
41202
- { mergeKey: "moveImage" }
41236
+ { mergeKey: MERGE_KEYS.moveImage }
41203
41237
  );
41204
41238
  } else {
41205
41239
  deps.logger.warn(
@@ -41552,7 +41586,7 @@ function useEditorFindReplace(deps) {
41552
41586
  });
41553
41587
  return insertTextAtSelection(stateWithSelection, replaceTerm());
41554
41588
  },
41555
- { mergeKey: "findReplace" }
41589
+ { mergeKey: MERGE_KEYS.findReplace }
41556
41590
  );
41557
41591
  };
41558
41592
  const replaceAll = () => {
@@ -41571,7 +41605,7 @@ function useEditorFindReplace(deps) {
41571
41605
  }
41572
41606
  return workingState;
41573
41607
  },
41574
- { mergeKey: "findReplaceAll" }
41608
+ { mergeKey: MERGE_KEYS.findReplaceAll }
41575
41609
  );
41576
41610
  setIsOpen(false);
41577
41611
  deps.focusInput();
@@ -42195,7 +42229,7 @@ function createEditorLayoutOptionsController(deps) {
42195
42229
  const polygon = traceImageAlphaContour(img2);
42196
42230
  applyTransactionalState(
42197
42231
  (current) => setImageWrapPolygon(current, runId, polygon),
42198
- { mergeKey: "layoutWrapPolygon" }
42232
+ { mergeKey: MERGE_KEYS.layoutWrapPolygon }
42199
42233
  );
42200
42234
  };
42201
42235
  const img = getCachedCanvasImage(resolved, () => {
@@ -42221,7 +42255,7 @@ function createEditorLayoutOptionsController(deps) {
42221
42255
  },
42222
42256
  setPreset: (preset) => {
42223
42257
  applyLayoutOptionPatch(
42224
- "layoutWrapPreset",
42258
+ MERGE_KEYS.layoutWrapPreset,
42225
42259
  (current, target) => target === "image" ? setSelectedImageWrapPreset(current, preset) : setSelectedTextBoxWrapPreset(current, preset)
42226
42260
  );
42227
42261
  if (preset === "tight" || preset === "through") {
@@ -42233,7 +42267,7 @@ function createEditorLayoutOptionsController(deps) {
42233
42267
  }
42234
42268
  },
42235
42269
  setFixedPosition: (fixed) => applyLayoutOptionPatch(
42236
- "layoutFixedPosition",
42270
+ MERGE_KEYS.layoutFixedPosition,
42237
42271
  (current, target) => target === "image" ? setSelectedImageFixedPosition(current, fixed) : setSelectedTextBoxFixedPosition(current, fixed)
42238
42272
  )
42239
42273
  };
@@ -43638,7 +43672,7 @@ function createEditorTextInput(deps) {
43638
43672
  (temp) => insertTextAtSelection(temp, text, pendingStyle)
43639
43673
  ),
43640
43674
  {
43641
- mergeKey: "insertText"
43675
+ mergeKey: MERGE_KEYS.insertText
43642
43676
  }
43643
43677
  );
43644
43678
  event.currentTarget.value = "";
@@ -43675,7 +43709,7 @@ function createEditorTextInput(deps) {
43675
43709
  (temp) => insertTextAtSelection(temp, text, pendingStyle)
43676
43710
  ),
43677
43711
  {
43678
- mergeKey: "insertText"
43712
+ mergeKey: MERGE_KEYS.insertText
43679
43713
  }
43680
43714
  );
43681
43715
  event.currentTarget.value = "";
@@ -43827,7 +43861,7 @@ function createEditorTextDrag(deps) {
43827
43861
  current,
43828
43862
  (temp) => moveOrCopySelectionToPosition(temp, destination, { copy })
43829
43863
  ),
43830
- { mergeKey: copy ? "copyTextByDrag" : "moveTextByDrag" }
43864
+ { mergeKey: copy ? MERGE_KEYS.copyTextByDrag : MERGE_KEYS.moveTextByDrag }
43831
43865
  );
43832
43866
  (_b = deps.logger) == null ? void 0 : _b.info("text-drag:apply", {
43833
43867
  mode: copy ? "copy" : "move",
@@ -43845,7 +43879,7 @@ function createEditorTextDrag(deps) {
43845
43879
  focus: startPosition
43846
43880
  });
43847
43881
  },
43848
- { mergeKey: "collapseSelectionByClick" }
43882
+ { mergeKey: MERGE_KEYS.collapseSelectionByClick }
43849
43883
  );
43850
43884
  (_c = deps.logger) == null ? void 0 : _c.info("text-drag:collapse", {
43851
43885
  at: `${startPosition.paragraphId}:${startPosition.runId}[${startPosition.offset}]`
@@ -44903,7 +44937,7 @@ function createEditorCommandsController(deps) {
44903
44937
  current,
44904
44938
  (temp) => splitListItemAtSelection(temp)
44905
44939
  ),
44906
- { mergeKey: "splitListItem" }
44940
+ { mergeKey: MERGE_KEYS.splitListItem }
44907
44941
  );
44908
44942
  }
44909
44943
  focusInput();
@@ -45109,7 +45143,7 @@ function createEditorCommandsController(deps) {
45109
45143
  clearPreferredColumn();
45110
45144
  resetTransactionGrouping();
45111
45145
  applyTransactionalState((current) => setLinkAtSelection(current, href), {
45112
- mergeKey: "link"
45146
+ mergeKey: MERGE_KEYS.link
45113
45147
  });
45114
45148
  focusInput();
45115
45149
  };
@@ -45131,7 +45165,7 @@ function createEditorCommandsController(deps) {
45131
45165
  clearPreferredColumn();
45132
45166
  resetTransactionGrouping();
45133
45167
  applyTransactionalState((current) => setSelectedImageAlt(current, alt), {
45134
- mergeKey: "imageAlt"
45168
+ mergeKey: MERGE_KEYS.imageAlt
45135
45169
  });
45136
45170
  focusInput();
45137
45171
  };
@@ -45153,7 +45187,7 @@ function createEditorCommandsController(deps) {
45153
45187
  resetTransactionGrouping();
45154
45188
  applyTransactionalState(
45155
45189
  (current) => setSelectedImageCaption(current, caption, deps.imageCaptionLabel()),
45156
- { mergeKey: "imageCaption" }
45190
+ { mergeKey: MERGE_KEYS.imageCaption }
45157
45191
  );
45158
45192
  focusInput();
45159
45193
  };
@@ -46851,7 +46885,7 @@ function createEditorEssentialsRuntimePlugin(options) {
46851
46885
  }
46852
46886
  return next;
46853
46887
  },
46854
- { mergeKey: "specialIndent" }
46888
+ { mergeKey: MERGE_KEYS.specialIndent }
46855
46889
  );
46856
46890
  options.focusInput();
46857
46891
  },
@@ -46870,7 +46904,7 @@ function createEditorEssentialsRuntimePlugin(options) {
46870
46904
  next = setParagraphStyle(next, "borderLeft", border);
46871
46905
  return next;
46872
46906
  },
46873
- { mergeKey: "paraBorders" }
46907
+ { mergeKey: MERGE_KEYS.paraBorders }
46874
46908
  );
46875
46909
  options.focusInput();
46876
46910
  },
@@ -46980,39 +47014,39 @@ function createEditorEssentialsRuntimePlugin(options) {
46980
47014
  canEditRow: () => options.tableOps.canEditSelectedTableRow(options.state()),
46981
47015
  merge: () => apply(
46982
47016
  (current) => options.tableOps.mergeSelectedTable(current),
46983
- "mergeTable"
47017
+ MERGE_KEYS.mergeTable
46984
47018
  ),
46985
47019
  split: () => apply(
46986
47020
  (current) => options.tableOps.splitSelectedTable(current),
46987
- "splitTable"
47021
+ MERGE_KEYS.splitTable
46988
47022
  ),
46989
47023
  insertColumnBefore: () => apply(
46990
47024
  (current) => options.tableOps.insertSelectedTableColumn(current, -1),
46991
- "insertTableColumn"
47025
+ MERGE_KEYS.insertTableColumn
46992
47026
  ),
46993
47027
  insertColumnAfter: () => apply(
46994
47028
  (current) => options.tableOps.insertSelectedTableColumn(current, 1),
46995
- "insertTableColumn"
47029
+ MERGE_KEYS.insertTableColumn
46996
47030
  ),
46997
47031
  deleteColumn: () => apply(
46998
47032
  (current) => options.tableOps.deleteSelectedTableColumn(current),
46999
- "deleteTableColumn"
47033
+ MERGE_KEYS.deleteTableColumn
47000
47034
  ),
47001
47035
  insertRowBefore: () => apply(
47002
47036
  (current) => options.tableOps.insertSelectedTableRow(current, -1),
47003
- "insertTableRow"
47037
+ MERGE_KEYS.insertTableRow
47004
47038
  ),
47005
47039
  insertRowAfter: () => apply(
47006
47040
  (current) => options.tableOps.insertSelectedTableRow(current, 1),
47007
- "insertTableRow"
47041
+ MERGE_KEYS.insertTableRow
47008
47042
  ),
47009
47043
  deleteRow: () => apply(
47010
47044
  (current) => options.tableOps.deleteSelectedTableRow(current),
47011
- "deleteTableRow"
47045
+ MERGE_KEYS.deleteTableRow
47012
47046
  ),
47013
47047
  cellShading: (color) => apply(
47014
47048
  (current) => setTableCellStyleValue(current, "shading", color || null),
47015
- "tableShading"
47049
+ MERGE_KEYS.tableShading
47016
47050
  ),
47017
47051
  cellBorders: () => apply(
47018
47052
  (current) => setTableCellBorders(current, {
@@ -47020,7 +47054,7 @@ function createEditorEssentialsRuntimePlugin(options) {
47020
47054
  type: "solid",
47021
47055
  color: "#64748b"
47022
47056
  }),
47023
- "tableBorders"
47057
+ MERGE_KEYS.tableBorders
47024
47058
  ),
47025
47059
  cellNoBorders: () => apply(
47026
47060
  (current) => setTableCellBorders(current, {
@@ -47028,25 +47062,25 @@ function createEditorEssentialsRuntimePlugin(options) {
47028
47062
  type: "none",
47029
47063
  color: "transparent"
47030
47064
  }),
47031
- "tableBorders"
47065
+ MERGE_KEYS.tableBorders
47032
47066
  ),
47033
47067
  width100: () => apply(
47034
47068
  (current) => setTableStyleValue(current, "width", "100%"),
47035
- "tableWidth"
47069
+ MERGE_KEYS.tableWidth
47036
47070
  ),
47037
47071
  alignLeft: () => apply(
47038
47072
  (current) => setTableCellStyleValue(current, "horizontalAlign", "left"),
47039
- "tableAlign"
47073
+ MERGE_KEYS.tableAlign
47040
47074
  ),
47041
47075
  alignCenter: () => apply(
47042
47076
  (current) => setTableCellStyleValue(current, "horizontalAlign", "center"),
47043
- "tableAlign"
47077
+ MERGE_KEYS.tableAlign
47044
47078
  ),
47045
47079
  alignRight: () => apply(
47046
47080
  (current) => setTableCellStyleValue(current, "horizontalAlign", "right"),
47047
- "tableAlign"
47081
+ MERGE_KEYS.tableAlign
47048
47082
  ),
47049
- setCellWidth: (width) => apply((current) => setTableCellWidth(current, width), "tableCellWidth"),
47083
+ setCellWidth: (width) => apply((current) => setTableCellWidth(current, width), MERGE_KEYS.tableCellWidth),
47050
47084
  insert: (rows, cols) => options.tableOps.insertTableCommand(rows, cols)
47051
47085
  };
47052
47086
  })();
@@ -1,10 +1,11 @@
1
+ import { MergeKey } from '../../../core/transactionMergeKeys.js';
1
2
  import { EditorPosition, EditorState } from '../../../core/model.js';
2
3
  import { EditorLogger } from '../../../utils/logger.js';
3
4
 
4
5
  export interface ImageInsertionServiceDeps {
5
6
  state: () => EditorState;
6
7
  applyTransactionalState: (producer: (current: EditorState) => EditorState, options?: {
7
- mergeKey?: string;
8
+ mergeKey?: MergeKey;
8
9
  }) => void;
9
10
  surfaceRef: () => HTMLDivElement | null;
10
11
  logger: EditorLogger;
@@ -1,10 +1,11 @@
1
+ import { MergeKey } from '../../core/transactionMergeKeys.js';
1
2
  import { EditorBlockNode, EditorEditingZone, EditorState } from '../../core/model.js';
2
3
  import { EditorLogger } from '../../utils/logger.js';
3
4
  import { SelectedTableCells } from './tableOpsSelectionRanges.js';
4
5
 
5
6
  interface TableSelectionAwareCommandsDeps {
6
7
  applyTransactionalState: (producer: (current: EditorState) => EditorState, options?: {
7
- mergeKey?: string;
8
+ mergeKey?: MergeKey;
8
9
  }) => void;
9
10
  applySelectionToStatePreservingStructure: (current: EditorState, nextSelection: EditorState["selection"]) => EditorState;
10
11
  getTargetBlocks: (state: EditorState, zone: EditorEditingZone) => EditorBlockNode[];
@@ -1,3 +1,4 @@
1
+ import { MergeKey } from '../../core/transactionMergeKeys.js';
1
2
  import { EditorState, EditorPosition } from '../../core/model.js';
2
3
  import { EditorLogger } from '../../utils/logger.js';
3
4
  import { ImportProgressState } from './documentIO/importProgress.js';
@@ -7,7 +8,7 @@ export interface UseEditorDocumentIOProps {
7
8
  state: () => EditorState;
8
9
  applyState: (state: EditorState) => void;
9
10
  applyTransactionalState: (producer: (current: EditorState) => EditorState, options?: {
10
- mergeKey?: string;
11
+ mergeKey?: MergeKey;
11
12
  }) => void;
12
13
  isReadOnly: () => boolean;
13
14
  surfaceRef: () => HTMLDivElement | null;
@@ -1,3 +1,4 @@
1
+ import { MergeKey } from '../../core/transactionMergeKeys.js';
1
2
  import { FindOptions, FindReplaceMatch } from '../services/FindReplaceService.js';
2
3
  import { EditorState } from '../../core/model.js';
3
4
 
@@ -21,7 +22,7 @@ export interface FindReplaceDeps {
21
22
  state: EditorState;
22
23
  applyState: (next: EditorState) => void;
23
24
  applyTransactionalState: (producer: (current: EditorState) => EditorState, options?: {
24
- mergeKey?: string;
25
+ mergeKey?: MergeKey;
25
26
  }) => void;
26
27
  focusInput: () => void;
27
28
  }
@@ -1,3 +1,4 @@
1
+ import { MergeKey } from '../../core/transactionMergeKeys.js';
1
2
  import { EditorHistoryState } from '../../ui/editorHistory.js';
2
3
  import { EditorState } from '../../core/model.js';
3
4
  import { createEditorImageOperations } from './useEditorImageOperations.js';
@@ -7,7 +8,7 @@ export interface UseEditorHistoryActionsProps {
7
8
  stateSnapshot: () => EditorState;
8
9
  applyHistoryState: (state: EditorState) => void;
9
10
  applyTransactionalState: (producer: (current: EditorState) => EditorState, options?: {
10
- mergeKey?: string;
11
+ mergeKey?: MergeKey;
11
12
  }) => void;
12
13
  focusInput: () => void;
13
14
  clearPreferredColumn: () => void;
@@ -1,3 +1,4 @@
1
+ import { MergeKey } from '../../core/transactionMergeKeys.js';
1
2
  import { EditorPosition, EditorState } from '../../core/model.js';
2
3
  import { ResizeHandleDirection } from '../../ui/resizeGeometry.js';
3
4
  import { EditorLogger } from '../../utils/logger.js';
@@ -24,7 +25,7 @@ export interface EditorImageOperationsDeps {
24
25
  resolvePositionAtSurfacePoint: (clientX: number, clientY: number) => EditorPosition | null;
25
26
  applyState: (next: EditorState) => void;
26
27
  applyTransactionalState: (producer: (current: EditorState) => EditorState, options?: {
27
- mergeKey?: string;
28
+ mergeKey?: MergeKey;
28
29
  }) => void;
29
30
  updateHistoryState: (updater: (current: EditorHistoryState) => EditorHistoryState) => void;
30
31
  focusInput: () => void;
@@ -1,9 +1,10 @@
1
+ import { MergeKey } from '../../core/transactionMergeKeys.js';
1
2
  import { EditorBlockNode, EditorState, EditorEditingZone } from '../../core/model.js';
2
3
  import { EditorLogger } from '../../utils/logger.js';
3
4
 
4
5
  export interface EditorTableOperationsDeps {
5
6
  applyTransactionalState: (producer: (current: EditorState) => EditorState, options?: {
6
- mergeKey?: string;
7
+ mergeKey?: MergeKey;
7
8
  }) => void;
8
9
  applySelectionToStatePreservingStructure: (current: EditorState, nextSelection: EditorState["selection"]) => EditorState;
9
10
  focusInput: () => void;
@@ -1,3 +1,4 @@
1
+ import { MergeKey } from '../../core/transactionMergeKeys.js';
1
2
  import { EditorPosition, EditorState } from '../../core/model.js';
2
3
  import { SurfaceHit } from '../../ui/canvas/CanvasHitTestService.js';
3
4
 
@@ -8,7 +9,7 @@ export interface EditorTextDragDeps {
8
9
  forDrag?: boolean;
9
10
  }) => SurfaceHit | null;
10
11
  applyTransactionalState: (producer: (current: EditorState) => EditorState, options?: {
11
- mergeKey?: string;
12
+ mergeKey?: MergeKey;
12
13
  }) => void;
13
14
  applyTableAwareParagraphEdit: (state: EditorState, edit: (state: EditorState) => EditorState) => EditorState;
14
15
  clearPreferredColumn: () => void;
@@ -1,3 +1,4 @@
1
+ import { MergeKey } from '../../core/transactionMergeKeys.js';
1
2
  import { EditorState, EditorTextStyle } from '../../core/model.js';
2
3
 
3
4
  export interface UseEditorTextInputProps {
@@ -10,7 +11,7 @@ export interface UseEditorTextInputProps {
10
11
  clearPreferredColumn: () => void;
11
12
  pendingCaretTextStyle: () => EditorTextStyle | undefined;
12
13
  applyTransactionalState: (producer: (current: EditorState) => EditorState, options?: {
13
- mergeKey?: string;
14
+ mergeKey?: MergeKey;
14
15
  }) => void;
15
16
  applyTableAwareParagraphEdit: (state: EditorState, edit: (temp: EditorState) => EditorState) => EditorState;
16
17
  focusInput: () => void;
@@ -0,0 +1,35 @@
1
+ export declare const MERGE_KEYS: {
2
+ readonly insertText: "insertText";
3
+ readonly insertImage: "insertImage";
4
+ readonly insertTable: "insertTable";
5
+ readonly moveImage: "moveImage";
6
+ readonly splitListItem: "splitListItem";
7
+ readonly link: "link";
8
+ readonly imageAlt: "imageAlt";
9
+ readonly imageCaption: "imageCaption";
10
+ readonly layoutWrapPolygon: "layoutWrapPolygon";
11
+ readonly specialIndent: "specialIndent";
12
+ readonly paraBorders: "paraBorders";
13
+ readonly findReplace: "findReplace";
14
+ readonly findReplaceAll: "findReplaceAll";
15
+ readonly tableProperties: "tableProperties";
16
+ readonly paragraphDialog: "paragraph-dialog";
17
+ readonly fontDialog: "font-dialog";
18
+ readonly copyTextByDrag: "copyTextByDrag";
19
+ readonly moveTextByDrag: "moveTextByDrag";
20
+ readonly collapseSelectionByClick: "collapseSelectionByClick";
21
+ readonly mergeTable: "mergeTable";
22
+ readonly splitTable: "splitTable";
23
+ readonly insertTableColumn: "insertTableColumn";
24
+ readonly deleteTableColumn: "deleteTableColumn";
25
+ readonly insertTableRow: "insertTableRow";
26
+ readonly deleteTableRow: "deleteTableRow";
27
+ readonly tableShading: "tableShading";
28
+ readonly tableBorders: "tableBorders";
29
+ readonly tableWidth: "tableWidth";
30
+ readonly tableAlign: "tableAlign";
31
+ readonly tableCellWidth: "tableCellWidth";
32
+ readonly layoutWrapPreset: "layoutWrapPreset";
33
+ readonly layoutFixedPosition: "layoutFixedPosition";
34
+ };
35
+ export type MergeKey = (typeof MERGE_KEYS)[keyof typeof MERGE_KEYS];
@@ -2483,7 +2483,7 @@ function OasisEditorAppLazy(props = {}) {
2483
2483
  onCleanup(() => {
2484
2484
  cancelled = true;
2485
2485
  });
2486
- import("./OasisEditorApp-BI74x5qK.js").then((m) => {
2486
+ import("./OasisEditorApp-lNYRC99y.js").then((m) => {
2487
2487
  cancelled = true;
2488
2488
  setProgress(1);
2489
2489
  setTimeout(() => setApp(() => m.OasisEditorApp), 180);
@@ -1,4 +1,4 @@
1
- import { O, c2, c3, c4, c5, c6, a8, c7, Q, bN, c8, c9, ca, N, cb, bL, cc, cd, ce, cf, cg, bZ, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, cr, ad, cs, bY, ct, c4 as c42, c9 as c92, cb as cb2, ck as ck2, cm as cm2, cr as cr2, cu, bP, bK, cv, cw, cx, bM, cy, cz, bO } from "./index-CF99ClZS.js";
1
+ import { O, c2, c3, c4, c5, c6, a8, c7, Q, bN, c8, c9, ca, N, cb, bL, cc, cd, ce, cf, cg, bZ, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, cr, ad, cs, bY, ct, c4 as c42, c9 as c92, cb as cb2, ck as ck2, cm as cm2, cr as cr2, cu, bP, bK, cv, cw, cx, bM, cy, cz, bO } from "./index-9_ibx79n.js";
2
2
  export {
3
3
  O as BalloonShell,
4
4
  c2 as Button,