@univerjs/docs 0.1.13 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,13 +1,13 @@
1
- var Tt = Object.defineProperty;
2
- var Et = (s, e, t) => e in s ? Tt(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var y = (s, e, t) => (Et(s, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { UniverInstanceType as Z, CommandType as I, RxDisposable as fe, ICommandService as v, TextXActionType as x, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as mt, IUniverInstanceService as E, IUndoRedoService as Ee, UndoCommandId as Ze, RedoCommandId as Je, JSONX as b, TextX as F, DataStreamTreeTokenType as ye, Tools as ee, LocaleService as Dt, MemoryCursor as re, getDocsUpdateBody as At, UpdateDocsAttributeType as De, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Nt, BooleanNumber as j, BaselineOffset as G, PRESET_LIST_TYPE as Pt, PresetListType as ft, HorizontalAlign as ie, OnLifecycle as Ae, LifecycleStages as Ne, Disposable as Pe, Direction as P, Plugin as bt } from "@univerjs/core";
5
- import { NORMAL_TEXT_SELECTION_PLUGIN_STYLE as Ut, ITextSelectionRenderManager as he, DocumentViewModel as wt, DocumentSkeleton as Lt, hasListGlyph as Bt, isIndentByGlyph as Ft, isFirstGlyph as $t, getParagraphByGlyph as Vt, getCharSpaceApply as kt, getNumberUnitValue as Ce, RANGE_DIRECTION as Ke, NodePositionConvertToCursor as qe, IRenderManagerService as ht, TextSelectionRenderManager as zt } from "@univerjs/engine-render";
1
+ var Ot = Object.defineProperty;
2
+ var Tt = (s, e, t) => e in s ? Ot(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var y = (s, e, t) => (Tt(s, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import { UniverInstanceType as Z, CommandType as I, RxDisposable as fe, ICommandService as v, TextXActionType as x, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Et, IUniverInstanceService as E, IUndoRedoService as Ee, UndoCommandId as Ze, RedoCommandId as Je, JSONX as b, TextX as F, DataStreamTreeTokenType as ye, Tools as ee, LocaleService as Dt, MemoryCursor as re, getDocsUpdateBody as At, UpdateDocsAttributeType as De, BooleanNumber as j, BaselineOffset as G, PRESET_LIST_TYPE as Nt, PresetListType as mt, HorizontalAlign as ie, OnLifecycle as Ae, LifecycleStages as Ne, Disposable as Pe, Direction as P, Plugin as Pt } from "@univerjs/core";
5
+ import { NORMAL_TEXT_SELECTION_PLUGIN_STYLE as bt, ITextSelectionRenderManager as pe, DocumentViewModel as Ut, DocumentSkeleton as wt, hasListGlyph as Lt, isIndentByGlyph as Bt, isFirstGlyph as Ft, getParagraphByGlyph as $t, getCharSpaceApply as Vt, getNumberUnitValue as Ce, RANGE_DIRECTION as Ke, NodePositionConvertToCursor as qe, IRenderManagerService as ft, TextSelectionRenderManager as kt } from "@univerjs/engine-render";
6
6
  import { BehaviorSubject as te, takeUntil as ne } from "rxjs";
7
- import { Inject as k, Injector as jt } from "@wendellhu/redi";
8
- var be = /* @__PURE__ */ ((s) => (s.MAIN = "__Document_Render_Main__", s.BACKGROUND = "__Document_Render_Background__", s))(be || {}), Gt = /* @__PURE__ */ ((s) => (s.VIEW_MAIN = "viewMain", s.VIEW_TOP = "viewTop", s.VIEW_LEFT = "viewLeft", s.VIEW_LEFT_TOP = "viewLeftTop", s))(Gt || {});
7
+ import { Inject as k, Injector as zt } from "@wendellhu/redi";
8
+ var be = /* @__PURE__ */ ((s) => (s.MAIN = "__Document_Render_Main__", s.BACKGROUND = "__Document_Render_Background__", s))(be || {}), jt = /* @__PURE__ */ ((s) => (s.VIEW_MAIN = "viewMain", s.VIEW_TOP = "viewTop", s.VIEW_LEFT = "viewLeft", s.VIEW_LEFT_TOP = "viewLeftTop", s))(jt || {});
9
9
  const Xn = 0, Hn = 2, Yn = 4, Wn = 10, Zn = "normalTextSelectionPluginName";
10
- function Xt(s, e) {
10
+ function Gt(s, e) {
11
11
  const t = s.getCurrentUnitForType(Z.UNIVER_DOC);
12
12
  if (!t)
13
13
  return null;
@@ -39,10 +39,10 @@ const pt = {
39
39
  type: I.OPERATION,
40
40
  handler: (s, e) => !0
41
41
  };
42
- var Ht = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, Wt = (s, e, t, n) => {
43
- for (var o = n > 1 ? void 0 : n ? Yt(e, t) : e, r = s.length - 1, i; r >= 0; r--)
42
+ var Xt = Object.defineProperty, Ht = Object.getOwnPropertyDescriptor, Yt = (s, e, t, n) => {
43
+ for (var o = n > 1 ? void 0 : n ? Ht(e, t) : e, r = s.length - 1, i; r >= 0; r--)
44
44
  (i = s[r]) && (o = (n ? i(e, t, o) : i(o)) || o);
45
- return n && o && Ht(e, t, o), o;
45
+ return n && o && Xt(e, t, o), o;
46
46
  }, Qe = (s, e) => (t, n) => e(t, n, s);
47
47
  function J(s) {
48
48
  const { startOffset: e, endOffset: t, collapsed: n } = s, o = {
@@ -118,7 +118,7 @@ let T = class extends fe {
118
118
  textRanges: e,
119
119
  segmentId: "",
120
120
  isEditing: t,
121
- style: Ut
121
+ style: bt
122
122
  // mock style.
123
123
  });
124
124
  }
@@ -171,8 +171,8 @@ let T = class extends fe {
171
171
  c.has(n) ? c.get(n).textRanges.push(...o) : c.set(n, { textRanges: o, style: r, segmentId: i, isEditing: a });
172
172
  }
173
173
  };
174
- T = Wt([
175
- Qe(0, he),
174
+ T = Yt([
175
+ Qe(0, pe),
176
176
  Qe(1, v)
177
177
  ], T);
178
178
  function Ue(s, e = "", t = 0) {
@@ -188,11 +188,11 @@ function Ue(s, e = "", t = 0) {
188
188
  segmentId: e
189
189
  }), r;
190
190
  }
191
- var Zt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, Kt = (s, e, t, n) => {
192
- for (var o = n > 1 ? void 0 : n ? Jt(e, t) : e, r = s.length - 1, i; r >= 0; r--)
191
+ var Wt = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, Jt = (s, e, t, n) => {
192
+ for (var o = n > 1 ? void 0 : n ? Zt(e, t) : e, r = s.length - 1, i; r >= 0; r--)
193
193
  (i = s[r]) && (o = (n ? i(e, t, o) : i(o)) || o);
194
- return n && o && Zt(e, t, o), o;
195
- }, qt = (s, e) => (t, n) => e(t, n, s);
194
+ return n && o && Wt(e, t, o), o;
195
+ }, Kt = (s, e) => (t, n) => e(t, n, s);
196
196
  let se = class extends fe {
197
197
  constructor(e) {
198
198
  super();
@@ -242,7 +242,7 @@ let se = class extends fe {
242
242
  docViewModel: o
243
243
  });
244
244
  }
245
- if (e === mt) {
245
+ if (e === Et) {
246
246
  const o = (n = this._docViewModelMap.get(e)) == null ? void 0 : n.docViewModel;
247
247
  if (o == null)
248
248
  return;
@@ -252,18 +252,18 @@ let se = class extends fe {
252
252
  }
253
253
  }
254
254
  _buildDocViewModel(e) {
255
- return new wt(e);
255
+ return new Ut(e);
256
256
  }
257
257
  };
258
- se = Kt([
259
- qt(0, E)
258
+ se = Jt([
259
+ Kt(0, E)
260
260
  ], se);
261
- var Qt = Object.defineProperty, en = Object.getOwnPropertyDescriptor, tn = (s, e, t, n) => {
262
- for (var o = n > 1 ? void 0 : n ? en(e, t) : e, r = s.length - 1, i; r >= 0; r--)
261
+ var qt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, en = (s, e, t, n) => {
262
+ for (var o = n > 1 ? void 0 : n ? Qt(e, t) : e, r = s.length - 1, i; r >= 0; r--)
263
263
  (i = s[r]) && (o = (n ? i(e, t, o) : i(o)) || o);
264
- return n && o && Qt(e, t, o), o;
264
+ return n && o && qt(e, t, o), o;
265
265
  }, Re = (s, e) => (t, n) => e(t, n, s);
266
- const nn = 300;
266
+ const tn = 300;
267
267
  let me = class extends fe {
268
268
  constructor(e, t, n) {
269
269
  super();
@@ -300,7 +300,7 @@ let me = class extends fe {
300
300
  this._stateCache.set(n, [e]);
301
301
  t === Se.id || t === _e.id ? (this._timer && clearTimeout(this._timer), this._timer = setTimeout(() => {
302
302
  this._pushHistory(n);
303
- }, nn)) : this._pushHistory(n);
303
+ }, tn)) : this._pushHistory(n);
304
304
  }
305
305
  }
306
306
  _pushHistory(e) {
@@ -324,12 +324,12 @@ let me = class extends fe {
324
324
  }), n.length = 0;
325
325
  }
326
326
  };
327
- me = tn([
327
+ me = en([
328
328
  Re(0, k(Ee)),
329
329
  Re(1, v),
330
330
  Re(2, E)
331
331
  ], me);
332
- class pe {
332
+ class he {
333
333
  constructor() {
334
334
  y(this, "_previousActiveRange", null);
335
335
  y(this, "_undoMutationParamsCache", []);
@@ -392,7 +392,7 @@ const et = "doc.mutation.rich-text-editing", B = {
392
392
  noHistory: c,
393
393
  isCompositionEnd: d,
394
394
  noNeedSetTextRange: l
395
- } = e, g = s.get(E).getUniverDocInstance(t), S = s.get(se).getViewModel(t), f = s.get(T), _ = ((L = f.getSelections()) != null ? L : []).map(J), p = s.get(me), R = s.get(pe);
395
+ } = e, g = s.get(E).getUniverDocInstance(t), S = s.get(se).getViewModel(t), f = s.get(T), _ = ((L = f.getSelections()) != null ? L : []).map(J), h = s.get(me), R = s.get(he);
396
396
  if (g == null || S == null)
397
397
  throw new Error(`DocumentDataModel or documentViewModel not found for unitId: ${t}`);
398
398
  const C = !!g.getSnapshot().disabled;
@@ -430,14 +430,14 @@ const et = "doc.mutation.rich-text-editing", B = {
430
430
  const { undoMutationParams: U, redoMutationParams: w, previousActiveRange: Y } = O;
431
431
  N.redoState.actions = w.actions, N.undoState.actions = U.actions, N.undoState.textRanges = [Y];
432
432
  }
433
- return p.setChangeState(N), {
433
+ return h.setChangeState(N), {
434
434
  unitId: t,
435
435
  actions: M,
436
436
  textRanges: _
437
437
  };
438
438
  }
439
- }, Se = {
440
- id: "doc.command.insert-text",
439
+ }, nn = "doc.command.insert-text", Se = {
440
+ id: nn,
441
441
  type: I.COMMAND,
442
442
  handler: async (s, e) => {
443
443
  const t = s.get(v), { range: n, segmentId: o, body: r, unitId: i, textRanges: a } = e, { startOffset: c, collapsed: d } = n, l = {
@@ -485,7 +485,7 @@ const _e = {
485
485
  segmentId: o
486
486
  }), l.params.actions = g.editOp(u.serialize()), !!t.syncExecuteCommand(l.id, l.params);
487
487
  }
488
- }, St = {
488
+ }, ht = {
489
489
  id: "doc.command.update-text",
490
490
  type: I.COMMAND,
491
491
  handler: async (s, e) => {
@@ -538,7 +538,7 @@ const on = {
538
538
  endOffset: a + 1,
539
539
  style: d
540
540
  }
541
- ], g = ((f = (S = r.getBody()) == null ? void 0 : S.paragraphs) != null ? f : []).find((h) => h.startIndex >= a);
541
+ ], g = ((f = (S = r.getBody()) == null ? void 0 : S.paragraphs) != null ? f : []).find((p) => p.startIndex >= a);
542
542
  return await n.executeCommand(Se.id, {
543
543
  unitId: i,
544
544
  body: {
@@ -590,9 +590,6 @@ let H = class extends fe {
590
590
  getAllSkeleton() {
591
591
  return this._docSkeletonMap;
592
592
  }
593
- makeDirtyCurrent(e = !0) {
594
- this.makeDirty(this._currentSkeletonUnitId, e);
595
- }
596
593
  makeDirty(e, t = !0) {
597
594
  const n = this.getSkeletonByUnitId(e);
598
595
  n != null && (n.dirty = t);
@@ -616,7 +613,7 @@ let H = class extends fe {
616
613
  return this._currentSkeletonUnitId = t, this._currentSkeletonBefore$.next(this.getCurrent()), this._currentSkeleton$.next(this.getCurrent()), this.getCurrent();
617
614
  }
618
615
  _buildSkeleton(e) {
619
- return Lt.create(e, this._localeService);
616
+ return wt.create(e, this._localeService);
620
617
  }
621
618
  };
622
619
  H = cn([
@@ -644,31 +641,31 @@ const Kn = {
644
641
  }, g = new re();
645
642
  g.reset();
646
643
  const m = new F(), S = b.getInstance();
647
- for (const h of c) {
648
- const { startOffset: _, endOffset: p, collapsed: R } = h, C = _ - g.cursor;
644
+ for (const p of c) {
645
+ const { startOffset: _, endOffset: h, collapsed: R } = p, C = _ - g.cursor;
649
646
  R ? m.push({
650
647
  t: x.RETAIN,
651
648
  len: C,
652
649
  segmentId: t
653
- }) : m.push(...Ue(h, t, g.cursor)), m.push({
650
+ }) : m.push(...Ue(p, t, g.cursor)), m.push({
654
651
  t: x.INSERT,
655
652
  body: n,
656
653
  len: n.dataStream.length,
657
654
  line: 0,
658
655
  segmentId: t
659
- }), g.reset(), g.moveCursor(p);
656
+ }), g.reset(), g.moveCursor(h);
660
657
  }
661
658
  return u.params.actions = S.editOp(m.serialize()), !!r.syncExecuteCommand(u.id, u.params);
662
659
  }
663
- }, _t = {
660
+ }, St = {
664
661
  id: "doc.command.inner-cut",
665
662
  type: I.COMMAND,
666
663
  handler: async (s, e) => {
667
- var h;
664
+ var p;
668
665
  const { segmentId: t, textRanges: n } = e, o = s.get(v), r = s.get(T), i = s.get(E), a = r.getSelections();
669
666
  if (!Array.isArray(a) || a.length === 0)
670
667
  return !1;
671
- const c = (h = i.getCurrentUniverDocInstance()) == null ? void 0 : h.getUnitId();
668
+ const c = (p = i.getCurrentUniverDocInstance()) == null ? void 0 : p.getUnitId();
672
669
  if (!c)
673
670
  return !1;
674
671
  const d = i.getUniverDocInstance(c), l = At(d.getSnapshot(), t);
@@ -685,7 +682,7 @@ const Kn = {
685
682
  g.reset();
686
683
  const m = new F(), S = b.getInstance();
687
684
  for (const _ of a) {
688
- const { startOffset: p, endOffset: R, collapsed: C } = _, M = p - g.cursor;
685
+ const { startOffset: h, endOffset: R, collapsed: C } = _, M = h - g.cursor;
689
686
  C ? m.push({
690
687
  t: x.RETAIN,
691
688
  len: M,
@@ -742,11 +739,11 @@ const dn = {
742
739
  const d = n.getCurrentUniverDocInstance();
743
740
  if (!d)
744
741
  return !1;
745
- const { startOffset: l, collapsed: u, segmentId: g, style: m } = r, S = a.findNodeByCharIndex(l), f = Bt(S), h = Ft(S, d.getBody());
742
+ const { startOffset: l, collapsed: u, segmentId: g, style: m } = r, S = a.findNodeByCharIndex(l), f = Lt(S), p = Bt(S, d.getBody());
746
743
  let _ = l;
747
- const p = a.findNodeByCharIndex(l - 1);
748
- if ($t(S) && p !== S && (f === !0 || h === !0) && u) {
749
- const M = Vt(S, d.getBody());
744
+ const h = a.findNodeByCharIndex(l - 1);
745
+ if (Ft(S) && h !== S && (f === !0 || p === !0) && u) {
746
+ const M = $t(S, d.getBody());
750
747
  if (M == null)
751
748
  return !1;
752
749
  const A = M == null ? void 0 : M.startIndex, D = { startIndex: 0 }, N = M.paragraphStyle;
@@ -757,7 +754,7 @@ const dn = {
757
754
  const { hanging: U } = O;
758
755
  U && (D.paragraphStyle.indentStart = U, D.paragraphStyle.hanging = void 0);
759
756
  }
760
- } else if (h === !0) {
757
+ } else if (p === !0) {
761
758
  const O = M.bullet;
762
759
  O && (D.bullet = O), N != null && (D.paragraphStyle = { ...N }, delete D.paragraphStyle.hanging, delete D.paragraphStyle.indentStart);
763
760
  }
@@ -768,7 +765,7 @@ const dn = {
768
765
  style: m
769
766
  }
770
767
  ];
771
- c = await o.executeCommand(St.id, {
768
+ c = await o.executeCommand(ht.id, {
772
769
  unitId: d.getUnitId(),
773
770
  updateBody: {
774
771
  dataStream: "",
@@ -783,15 +780,15 @@ const dn = {
783
780
  segmentId: g
784
781
  });
785
782
  } else if (u === !0) {
786
- if (p == null)
783
+ if (h == null)
787
784
  return !0;
788
- if (p.content === "\r")
785
+ if (h.content === "\r")
789
786
  c = await o.executeCommand(we.id, {
790
787
  direction: X.LEFT,
791
788
  range: r
792
789
  });
793
790
  else {
794
- _ -= p.count;
791
+ _ -= h.count;
795
792
  const M = [
796
793
  {
797
794
  startOffset: _,
@@ -804,13 +801,13 @@ const dn = {
804
801
  range: r,
805
802
  segmentId: g,
806
803
  direction: X.LEFT,
807
- len: p.count,
804
+ len: h.count,
808
805
  textRanges: M
809
806
  });
810
807
  }
811
808
  } else {
812
- const M = It(r, i);
813
- c = await o.executeCommand(_t.id, {
809
+ const M = _t(r, i);
810
+ c = await o.executeCommand(St.id, {
814
811
  segmentId: g,
815
812
  textRanges: M
816
813
  });
@@ -840,7 +837,7 @@ const dn = {
840
837
  range: r
841
838
  });
842
839
  else {
843
- const h = [
840
+ const p = [
844
841
  {
845
842
  startOffset: l,
846
843
  endOffset: l,
@@ -852,13 +849,13 @@ const dn = {
852
849
  range: r,
853
850
  segmentId: g,
854
851
  direction: X.RIGHT,
855
- textRanges: h,
852
+ textRanges: p,
856
853
  len: f.count
857
854
  });
858
855
  }
859
856
  } else {
860
- const f = It(r, i);
861
- c = await o.executeCommand(_t.id, {
857
+ const f = _t(r, i);
858
+ c = await o.executeCommand(St.id, {
862
859
  segmentId: g,
863
860
  textRanges: f
864
861
  });
@@ -880,7 +877,7 @@ const dn = {
880
877
  const { startOffset: l, collapsed: u, segmentId: g, style: m } = a;
881
878
  if (!u)
882
879
  return !1;
883
- const S = r === X.LEFT ? l : l + 1, f = (O = (L = (N = d.getBody()) == null ? void 0 : N.paragraphs) == null ? void 0 : L.find((U) => U.startIndex >= S)) == null ? void 0 : O.startIndex, h = gn(d.getBody(), S, f), _ = r === X.LEFT ? l - 1 : l, p = d.getUnitId(), R = [
880
+ const S = r === X.LEFT ? l : l + 1, f = (O = (L = (N = d.getBody()) == null ? void 0 : N.paragraphs) == null ? void 0 : L.find((U) => U.startIndex >= S)) == null ? void 0 : O.startIndex, p = gn(d.getBody(), S, f), _ = r === X.LEFT ? l - 1 : l, h = d.getUnitId(), R = [
884
881
  {
885
882
  startOffset: _,
886
883
  endOffset: _,
@@ -889,7 +886,7 @@ const dn = {
889
886
  ], C = {
890
887
  id: B.id,
891
888
  params: {
892
- unitId: p,
889
+ unitId: h,
893
890
  actions: [],
894
891
  textRanges: R,
895
892
  prevTextRanges: [i]
@@ -899,10 +896,10 @@ const dn = {
899
896
  t: x.RETAIN,
900
897
  len: r === X.LEFT ? l - 1 : l,
901
898
  segmentId: g
902
- }), h.dataStream.length && M.push({
899
+ }), p.dataStream.length && M.push({
903
900
  t: x.INSERT,
904
- body: h,
905
- len: h.dataStream.length,
901
+ body: p,
902
+ len: p.dataStream.length,
906
903
  line: 0,
907
904
  segmentId: g
908
905
  }), M.push({
@@ -945,7 +942,7 @@ function gn(s, e, t) {
945
942
  textRuns: r
946
943
  };
947
944
  }
948
- function It(s, e) {
945
+ function _t(s, e) {
949
946
  let t = s.endOffset;
950
947
  for (const o of e) {
951
948
  const { startOffset: r, endOffset: i } = o;
@@ -959,11 +956,11 @@ function It(s, e) {
959
956
  }
960
957
  ];
961
958
  }
962
- const vt = {
959
+ const It = {
963
960
  id: "doc.command.ime-input",
964
961
  type: I.COMMAND,
965
962
  handler: async (s, e) => {
966
- const { unitId: t, newText: n, oldTextLen: o, isCompositionEnd: r, isCompositionStart: i } = e, a = s.get(v), c = s.get(pe), d = c.getActiveRange();
963
+ const { unitId: t, newText: n, oldTextLen: o, isCompositionEnd: r, isCompositionStart: i } = e, a = s.get(v), c = s.get(he), d = c.getActiveRange();
967
964
  if (d == null)
968
965
  return !1;
969
966
  const { startOffset: l, style: u, segmentId: g } = d, m = n.length, S = [
@@ -980,17 +977,17 @@ const vt = {
980
977
  actions: [],
981
978
  textRanges: S
982
979
  }
983
- }, h = new F(), _ = b.getInstance();
984
- !d.collapsed && i ? h.push(...Ue(d, g)) : h.push({
980
+ }, p = new F(), _ = b.getInstance();
981
+ !d.collapsed && i ? p.push(...Ue(d, g)) : p.push({
985
982
  t: x.RETAIN,
986
983
  len: l,
987
984
  segmentId: g
988
- }), o > 0 && h.push({
985
+ }), o > 0 && p.push({
989
986
  t: x.DELETE,
990
987
  len: o,
991
988
  line: 0,
992
989
  segmentId: g
993
- }), h.push({
990
+ }), p.push({
994
991
  t: x.INSERT,
995
992
  body: {
996
993
  dataStream: n
@@ -998,15 +995,15 @@ const vt = {
998
995
  len: n.length,
999
996
  line: 0,
1000
997
  segmentId: g
1001
- }), f.params.actions = _.editOp(h.serialize()), f.params.noHistory = !r, f.params.isCompositionEnd = r;
1002
- const p = a.syncExecuteCommand(f.id, f.params);
1003
- return c.pushUndoRedoMutationParams(p, f.params), !!p;
998
+ }), f.params.actions = _.editOp(p.serialize()), f.params.noHistory = !r, f.params.isCompositionEnd = r;
999
+ const h = a.syncExecuteCommand(f.id, f.params);
1000
+ return c.pushUndoRedoMutationParams(h, f.params), !!h;
1004
1001
  }
1005
1002
  };
1006
1003
  function $(s, e, t, n) {
1007
1004
  var r;
1008
1005
  const { segmentId: o } = (r = t.getActiveRange()) != null ? r : {};
1009
- return o == null ? !1 : n.executeCommand(Ct.id, {
1006
+ return o == null ? !1 : n.executeCommand(Mt.id, {
1010
1007
  segmentId: o,
1011
1008
  preCommandId: s,
1012
1009
  ...e != null ? e : {}
@@ -1144,7 +1141,7 @@ const tt = "doc.command.set-inline-format-bold", Le = {
1144
1141
  t
1145
1142
  );
1146
1143
  }
1147
- }, Mt = {
1144
+ }, vt = {
1148
1145
  [Le.id]: "bl",
1149
1146
  [Be.id]: "it",
1150
1147
  [Fe.id]: "ul",
@@ -1156,7 +1153,7 @@ const tt = "doc.command.set-inline-format-bold", Le = {
1156
1153
  [Xe.id]: "bg",
1157
1154
  [oe.id]: "va",
1158
1155
  [Ve.id]: "va"
1159
- }, Ct = {
1156
+ }, Mt = {
1160
1157
  id: "doc.command.set-inline-format",
1161
1158
  type: I.COMMAND,
1162
1159
  // eslint-disable-next-line max-lines-per-function
@@ -1164,11 +1161,10 @@ const tt = "doc.command.set-inline-format-bold", Le = {
1164
1161
  const { segmentId: t, value: n, preCommandId: o } = e, r = s.get(v), i = s.get(T), a = s.get(E), c = i.getSelections();
1165
1162
  if (!Array.isArray(c) || c.length === 0)
1166
1163
  return !1;
1167
- let d = a.getCurrentUniverDocInstance();
1164
+ const d = a.getCurrentUniverDocInstance();
1168
1165
  if (!d)
1169
1166
  return !1;
1170
- let l = d.getUnitId();
1171
- l === Nt && (d = a.getUniverDocInstance(mt), l = d.getUnitId());
1167
+ const l = d.getUnitId();
1172
1168
  let u;
1173
1169
  switch (o) {
1174
1170
  case Le.id:
@@ -1215,18 +1211,18 @@ const tt = "doc.command.set-inline-format-bold", Le = {
1215
1211
  }, m = new F(), S = b.getInstance(), f = new re();
1216
1212
  f.reset();
1217
1213
  for (const _ of c) {
1218
- const { startOffset: p, endOffset: R } = _, C = {
1214
+ const { startOffset: h, endOffset: R } = _, C = {
1219
1215
  dataStream: "",
1220
1216
  textRuns: [
1221
1217
  {
1222
1218
  st: 0,
1223
- ed: R - p,
1219
+ ed: R - h,
1224
1220
  ts: {
1225
- [Mt[o]]: u
1221
+ [vt[o]]: u
1226
1222
  }
1227
1223
  }
1228
1224
  ]
1229
- }, M = p - f.cursor;
1225
+ }, M = h - f.cursor;
1230
1226
  M !== 0 && m.push({
1231
1227
  t: x.RETAIN,
1232
1228
  len: M,
@@ -1234,7 +1230,7 @@ const tt = "doc.command.set-inline-format-bold", Le = {
1234
1230
  }), m.push({
1235
1231
  t: x.RETAIN,
1236
1232
  body: C,
1237
- len: R - p,
1233
+ len: R - h,
1238
1234
  segmentId: t
1239
1235
  }), f.reset(), f.moveCursor(R);
1240
1236
  }
@@ -1246,7 +1242,7 @@ function mn(s) {
1246
1242
  }
1247
1243
  function fn(s, e, t) {
1248
1244
  let n = 0, o = 0;
1249
- const r = Mt[e];
1245
+ const r = vt[e];
1250
1246
  for (; n !== s.length && o !== t.length; ) {
1251
1247
  const { startOffset: i, endOffset: a } = t[o], { st: c, ed: d, ts: l } = s[n];
1252
1248
  if (a <= c)
@@ -1283,14 +1279,14 @@ const He = {
1283
1279
  const a = t.getActiveRange(), c = (U = t.getSelections()) != null ? U : [], d = (w = i.getBody()) == null ? void 0 : w.paragraphs, l = c.map(J);
1284
1280
  if (a == null || d == null)
1285
1281
  return !1;
1286
- const u = Rt(a, d), { segmentId: g } = a, m = i.getUnitId(), S = u.every((W) => {
1282
+ const u = Ct(a, d), { segmentId: g } = a, m = i.getUnitId(), S = u.every((W) => {
1287
1283
  var V;
1288
1284
  return ((V = W.bullet) == null ? void 0 : V.listType) === r;
1289
1285
  });
1290
- let h = ee.generateRandomId(6);
1286
+ let p = ee.generateRandomId(6);
1291
1287
  if (u.length === 1) {
1292
1288
  const W = d.indexOf(u[0]), V = d[W - 1], z = d[W + 1];
1293
- V && V.bullet && V.bullet.listType === r ? h = V.bullet.listId : z && z.bullet && z.bullet.listType === r && (h = z.bullet.listId);
1289
+ V && V.bullet && V.bullet.listType === r ? p = V.bullet.listId : z && z.bullet && z.bullet.listType === r && (p = z.bullet.listId);
1294
1290
  }
1295
1291
  const _ = {
1296
1292
  id: B.id,
@@ -1299,17 +1295,17 @@ const He = {
1299
1295
  actions: [],
1300
1296
  textRanges: l
1301
1297
  }
1302
- }, p = new re();
1303
- p.reset();
1298
+ }, h = new re();
1299
+ h.reset();
1304
1300
  const R = new F(), C = b.getInstance(), M = (Y = i.getSnapshot().lists) != null ? Y : {}, A = {
1305
- ...Pt,
1301
+ ...Nt,
1306
1302
  ...M
1307
1303
  }, { charSpace: D, defaultTabStop: N = 36, gridType: L } = i.getSnapshot().documentStyle;
1308
1304
  for (const W of u) {
1309
- const { startIndex: V, paragraphStyle: z = {} } = W, { indentFirstLine: yt = 0, snapToGrid: Ot, indentStart: Ie = 0 } = z, { hanging: ve, indentStart: We } = A[r].nestingLevel[0], Me = kt(D, N, L, Ot);
1305
+ const { startIndex: V, paragraphStyle: z = {} } = W, { indentFirstLine: xt = 0, snapToGrid: yt, indentStart: Ie = 0 } = z, { hanging: ve, indentStart: We } = A[r].nestingLevel[0], Me = Vt(D, N, L, yt);
1310
1306
  R.push({
1311
1307
  t: x.RETAIN,
1312
- len: V - p.cursor,
1308
+ len: V - h.cursor,
1313
1309
  segmentId: g
1314
1310
  }), R.push({
1315
1311
  t: x.RETAIN,
@@ -1330,7 +1326,7 @@ const He = {
1330
1326
  ...z,
1331
1327
  indentFirstLine: void 0,
1332
1328
  hanging: ve,
1333
- indentStart: We - ve + Ce(yt, Me) + Ce(Ie, Me)
1329
+ indentStart: We - ve + Ce(xt, Me) + Ce(Ie, Me)
1334
1330
  },
1335
1331
  bullet: {
1336
1332
  ...(Ye = W.bullet) != null ? Ye : {
@@ -1340,31 +1336,31 @@ const He = {
1340
1336
  }
1341
1337
  },
1342
1338
  listType: r,
1343
- listId: h
1339
+ listId: p
1344
1340
  }
1345
1341
  }
1346
1342
  ]
1347
1343
  },
1348
1344
  segmentId: g,
1349
1345
  coverType: De.REPLACE
1350
- }), p.moveCursorTo(V + 1);
1346
+ }), h.moveCursorTo(V + 1);
1351
1347
  }
1352
1348
  return _.params.actions = C.editOp(R.serialize()), !!o.syncExecuteCommand(_.id, _.params);
1353
1349
  }
1354
- }, hn = {
1350
+ }, pn = {
1355
1351
  id: "doc.command.bullet-list",
1356
1352
  type: I.COMMAND,
1357
1353
  handler: (s) => s.get(v).syncExecuteCommand(He.id, {
1358
- listType: ft.BULLET_LIST
1354
+ listType: mt.BULLET_LIST
1359
1355
  })
1360
- }, pn = {
1356
+ }, hn = {
1361
1357
  id: "doc.command.order-list",
1362
1358
  type: I.COMMAND,
1363
1359
  handler: (s) => s.get(v).syncExecuteCommand(He.id, {
1364
- listType: ft.ORDER_LIST
1360
+ listType: mt.ORDER_LIST
1365
1361
  })
1366
1362
  };
1367
- function Rt(s, e) {
1363
+ function Ct(s, e) {
1368
1364
  const { startOffset: t, endOffset: n } = s, o = [];
1369
1365
  let r = -1;
1370
1366
  for (const i of e) {
@@ -1385,7 +1381,7 @@ const ae = {
1385
1381
  const a = t.getActiveRange(), c = (C = t.getSelections()) != null ? C : [], d = (M = i.getBody()) == null ? void 0 : M.paragraphs, l = c.map(J);
1386
1382
  if (a == null || d == null)
1387
1383
  return !1;
1388
- const u = Rt(a, d), { segmentId: g } = a, m = i.getUnitId(), S = u.every((A) => {
1384
+ const u = Ct(a, d), { segmentId: g } = a, m = i.getUnitId(), S = u.every((A) => {
1389
1385
  var D;
1390
1386
  return ((D = A.paragraphStyle) == null ? void 0 : D.horizontalAlign) === r;
1391
1387
  }), f = {
@@ -1395,14 +1391,14 @@ const ae = {
1395
1391
  actions: [],
1396
1392
  textRanges: l
1397
1393
  }
1398
- }, h = new re();
1399
- h.reset();
1400
- const _ = new F(), p = b.getInstance();
1394
+ }, p = new re();
1395
+ p.reset();
1396
+ const _ = new F(), h = b.getInstance();
1401
1397
  for (const A of u) {
1402
1398
  const { startIndex: D } = A;
1403
1399
  _.push({
1404
1400
  t: x.RETAIN,
1405
- len: D - h.cursor,
1401
+ len: D - p.cursor,
1406
1402
  segmentId: g
1407
1403
  });
1408
1404
  const N = {
@@ -1424,9 +1420,9 @@ const ae = {
1424
1420
  },
1425
1421
  segmentId: g,
1426
1422
  coverType: De.REPLACE
1427
- }), h.moveCursorTo(D + 1);
1423
+ }), p.moveCursorTo(D + 1);
1428
1424
  }
1429
- return f.params.actions = p.editOp(_.serialize()), !!o.syncExecuteCommand(f.id, f.params);
1425
+ return f.params.actions = h.editOp(_.serialize()), !!o.syncExecuteCommand(f.id, f.params);
1430
1426
  }
1431
1427
  }, Sn = {
1432
1428
  id: "doc.command.align-left",
@@ -1460,7 +1456,7 @@ const ae = {
1460
1456
  const { unitId: t, body: n, textRanges: o, segmentId: r = "" } = e, i = s.get(E), a = s.get(v), c = s.get(T), d = (m = i.getUniverDocInstance(t)) == null ? void 0 : m.getSnapshot().body, l = c.getSelections();
1461
1457
  if (d == null || !Array.isArray(l) || l.length === 0)
1462
1458
  return !1;
1463
- const u = xt(t, r, d, n);
1459
+ const u = Rt(t, r, d, n);
1464
1460
  return u.params.textRanges = o, !!a.syncExecuteCommand(u.id, u.params);
1465
1461
  }
1466
1462
  }, Cn = {
@@ -1471,14 +1467,14 @@ const ae = {
1471
1467
  const { unitId: t, body: n, segmentId: o = "" } = e, r = s.get(E), i = s.get(v), a = s.get(Ee), c = (l = r.getUniverDocInstance(t)) == null ? void 0 : l.getSnapshot().body;
1472
1468
  if (c == null)
1473
1469
  return !1;
1474
- const d = xt(t, o, c, n);
1470
+ const d = Rt(t, o, c, n);
1475
1471
  return d.params.noNeedSetTextRange = !0, d.params.noHistory = !0, i.syncExecuteCommand(
1476
1472
  d.id,
1477
1473
  d.params
1478
1474
  ), a.clearUndoRedo(t), !0;
1479
1475
  }
1480
1476
  };
1481
- function xt(s, e, t, n) {
1477
+ function Rt(s, e, t, n) {
1482
1478
  const o = {
1483
1479
  id: B.id,
1484
1480
  params: {
@@ -1620,7 +1616,7 @@ let de = class extends Pe {
1620
1616
  if (n == null || i == null)
1621
1617
  return;
1622
1618
  const c = r.data;
1623
- c === this._previousIMEContent && t || (await this._commandService.executeCommand(vt.id, {
1619
+ c === this._previousIMEContent && t || (await this._commandService.executeCommand(It.id, {
1624
1620
  unitId: o.getUnitId(),
1625
1621
  newText: c,
1626
1622
  oldTextLen: this._previousIMEContent.length,
@@ -1636,8 +1632,8 @@ de = En([
1636
1632
  Ae(Ne.Rendered, de),
1637
1633
  K(0, k(H)),
1638
1634
  K(1, E),
1639
- K(2, he),
1640
- K(3, k(pe)),
1635
+ K(2, pe),
1636
+ K(3, k(he)),
1641
1637
  K(4, v)
1642
1638
  ], de);
1643
1639
  var Dn = Object.defineProperty, An = Object.getOwnPropertyDescriptor, Nn = (s, e, t, n) => {
@@ -1673,8 +1669,9 @@ let ue = class extends Pe {
1673
1669
  })
1674
1670
  );
1675
1671
  }
1672
+ // eslint-disable-next-line max-lines-per-function, complexity
1676
1673
  _handleShiftMoveSelection(e) {
1677
- var f, h, _;
1674
+ var f, p, _;
1678
1675
  const t = this._textSelectionManagerService.getActiveRange(), n = this._textSelectionManagerService.getSelections(), o = this._univerInstanceService.getCurrentUniverDocInstance();
1679
1676
  if (!o)
1680
1677
  return;
@@ -1683,13 +1680,13 @@ let ue = class extends Pe {
1683
1680
  return;
1684
1681
  const { startOffset: a, endOffset: c, style: d, collapsed: l, direction: u } = t;
1685
1682
  if (n.length > 1) {
1686
- let p = Number.POSITIVE_INFINITY, R = Number.NEGATIVE_INFINITY;
1683
+ let h = Number.POSITIVE_INFINITY, R = Number.NEGATIVE_INFINITY;
1687
1684
  for (const C of n)
1688
- p = Math.min(p, C.startOffset), R = Math.max(R, C.endOffset);
1685
+ h = Math.min(h, C.startOffset), R = Math.max(R, C.endOffset);
1689
1686
  this._textSelectionManagerService.replaceTextRanges([
1690
1687
  {
1691
- startOffset: e === P.LEFT || e === P.UP ? R : p,
1692
- endOffset: e === P.LEFT || e === P.UP ? p : R,
1688
+ startOffset: e === P.LEFT || e === P.UP ? R : h,
1689
+ endOffset: e === P.LEFT || e === P.UP ? h : R,
1693
1690
  style: d
1694
1691
  }
1695
1692
  ], !1);
@@ -1697,10 +1694,10 @@ let ue = class extends Pe {
1697
1694
  }
1698
1695
  const g = l || u === Ke.FORWARD ? a : c;
1699
1696
  let m = l || u === Ke.FORWARD ? c : a;
1700
- const S = (h = o.getBody().dataStream.length) != null ? h : Number.POSITIVE_INFINITY;
1697
+ const S = (p = o.getBody().dataStream.length) != null ? p : Number.POSITIVE_INFINITY;
1701
1698
  if (e === P.LEFT || e === P.RIGHT) {
1702
- const p = r.findNodeByCharIndex(m - 1), R = r.findNodeByCharIndex(m);
1703
- m = e === P.RIGHT ? m + R.count : m - ((_ = p == null ? void 0 : p.count) != null ? _ : 0), m = Math.min(S - 2, Math.max(0, m)), this._textSelectionManagerService.replaceTextRanges([
1699
+ const h = r.findNodeByCharIndex(m - 1), R = r.findNodeByCharIndex(m);
1700
+ m = e === P.RIGHT ? m + R.count : m - ((_ = h == null ? void 0 : h.count) != null ? _ : 0), m = Math.min(S - 2, Math.max(0, m)), this._textSelectionManagerService.replaceTextRanges([
1704
1701
  {
1705
1702
  startOffset: g,
1706
1703
  endOffset: m,
@@ -1708,7 +1705,7 @@ let ue = class extends Pe {
1708
1705
  }
1709
1706
  ], !1);
1710
1707
  } else {
1711
- const p = r.findNodeByCharIndex(m), R = i.document.getOffsetConfig(), C = this._getTopOrBottomPosition(r, p, e === P.DOWN);
1708
+ const h = r.findNodeByCharIndex(m), R = i.document.getOffsetConfig(), C = this._getTopOrBottomPosition(r, h, e === P.DOWN);
1712
1709
  if (C == null) {
1713
1710
  const A = e === P.UP ? 0 : S - 2;
1714
1711
  if (A === m)
@@ -1747,13 +1744,13 @@ let ue = class extends Pe {
1747
1744
  if (e === P.LEFT || e === P.RIGHT) {
1748
1745
  let f;
1749
1746
  if (!t.collapsed || n.length > 1) {
1750
- let h = Number.POSITIVE_INFINITY, _ = Number.NEGATIVE_INFINITY;
1751
- for (const p of n)
1752
- h = Math.min(h, p.startOffset), _ = Math.max(_, p.endOffset);
1753
- f = e === P.LEFT ? h : _;
1747
+ let p = Number.POSITIVE_INFINITY, _ = Number.NEGATIVE_INFINITY;
1748
+ for (const h of n)
1749
+ p = Math.min(p, h.startOffset), _ = Math.max(_, h.endOffset);
1750
+ f = e === P.LEFT ? p : _;
1754
1751
  } else {
1755
- const h = r.findNodeByCharIndex(a - 1), _ = r.findNodeByCharIndex(a);
1756
- e === P.LEFT ? f = Math.max(0, a - ((S = h == null ? void 0 : h.count) != null ? S : 0)) : f = Math.min(u - 2, c + _.count);
1752
+ const p = r.findNodeByCharIndex(a - 1), _ = r.findNodeByCharIndex(a);
1753
+ e === P.LEFT ? f = Math.max(0, a - ((S = p == null ? void 0 : p.count) != null ? S : 0)) : f = Math.min(u - 2, c + _.count);
1757
1754
  }
1758
1755
  this._textSelectionManagerService.replaceTextRanges([
1759
1756
  {
@@ -1763,12 +1760,12 @@ let ue = class extends Pe {
1763
1760
  }
1764
1761
  ], !1);
1765
1762
  } else {
1766
- const f = r.findNodeByCharIndex(a), h = r.findNodeByCharIndex(c), _ = i.document.getOffsetConfig(), p = this._getTopOrBottomPosition(
1763
+ const f = r.findNodeByCharIndex(a), p = r.findNodeByCharIndex(c), _ = i.document.getOffsetConfig(), h = this._getTopOrBottomPosition(
1767
1764
  r,
1768
- e === P.UP ? f : h,
1765
+ e === P.UP ? f : p,
1769
1766
  e === P.DOWN
1770
1767
  );
1771
- if (p == null) {
1768
+ if (h == null) {
1772
1769
  let C;
1773
1770
  l ? C = e === P.UP ? 0 : u - 2 : C = e === P.UP ? a : c, this._textSelectionManagerService.replaceTextRanges([
1774
1771
  {
@@ -1780,8 +1777,8 @@ let ue = class extends Pe {
1780
1777
  return;
1781
1778
  }
1782
1779
  const R = new qe(_, r).getRangePointData(
1783
- p,
1784
- p
1780
+ h,
1781
+ h
1785
1782
  ).cursorList[0];
1786
1783
  this._textSelectionManagerService.replaceTextRanges([
1787
1784
  {
@@ -1823,7 +1820,7 @@ let ue = class extends Pe {
1823
1820
  return e.findPositionByGlyph(o.glyph);
1824
1821
  }
1825
1822
  _getNextOrPrevLine(e, t) {
1826
- var S, f, h, _, p, R, C, M, A, D, N, L;
1823
+ var S, f, p, _, h, R, C, M, A, D, N, L;
1827
1824
  const n = e.parent;
1828
1825
  if (n == null)
1829
1826
  return;
@@ -1848,7 +1845,7 @@ let ue = class extends Pe {
1848
1845
  if (t === !0)
1849
1846
  a = (S = c.columns[d + 1]) == null ? void 0 : S.lines[0];
1850
1847
  else {
1851
- const O = (h = (f = c.columns) == null ? void 0 : f[d - 1]) == null ? void 0 : h.lines;
1848
+ const O = (p = (f = c.columns) == null ? void 0 : f[d - 1]) == null ? void 0 : p.lines;
1852
1849
  a = O == null ? void 0 : O[O.length - 1];
1853
1850
  }
1854
1851
  if (a != null)
@@ -1860,7 +1857,7 @@ let ue = class extends Pe {
1860
1857
  if (u === -1)
1861
1858
  return;
1862
1859
  if (t === !0)
1863
- a = (p = (_ = l.sections[u - 1]) == null ? void 0 : _.columns[0]) == null ? void 0 : p.lines[0];
1860
+ a = (h = (_ = l.sections[u - 1]) == null ? void 0 : _.columns[0]) == null ? void 0 : h.lines[0];
1864
1861
  else {
1865
1862
  const O = (C = (R = l.sections) == null ? void 0 : R[u - 1]) == null ? void 0 : C.columns, U = O == null ? void 0 : O[O.length - 1], w = U == null ? void 0 : U.lines;
1866
1863
  a = w == null ? void 0 : w[w.length - 1];
@@ -1886,14 +1883,14 @@ let ue = class extends Pe {
1886
1883
  }
1887
1884
  }
1888
1885
  _getDocObject() {
1889
- return Xt(this._univerInstanceService, this._renderManagerService);
1886
+ return Gt(this._univerInstanceService, this._renderManagerService);
1890
1887
  }
1891
1888
  };
1892
1889
  ue = Nn([
1893
1890
  Ae(Ne.Rendered, ue),
1894
1891
  q(0, k(H)),
1895
1892
  q(1, E),
1896
- q(2, ht),
1893
+ q(2, ft),
1897
1894
  q(3, k(T)),
1898
1895
  q(4, v)
1899
1896
  ], ue);
@@ -1949,8 +1946,8 @@ ge = Un([
1949
1946
  Ae(Ne.Rendered, ge),
1950
1947
  Q(0, k(H)),
1951
1948
  Q(1, E),
1952
- Q(2, ht),
1953
- Q(3, he),
1949
+ Q(2, ft),
1950
+ Q(3, pe),
1954
1951
  Q(4, v)
1955
1952
  ], ge);
1956
1953
  var wn = Object.defineProperty, Ln = Object.getOwnPropertyDescriptor, Bn = (s, e, t, n) => {
@@ -1960,7 +1957,7 @@ var wn = Object.defineProperty, Ln = Object.getOwnPropertyDescriptor, Bn = (s, e
1960
1957
  }, Fn = (s, e) => (t, n) => e(t, n, s);
1961
1958
  const $n = "docs";
1962
1959
  var ce;
1963
- let gt = (ce = class extends bt {
1960
+ let gt = (ce = class extends Pt {
1964
1961
  constructor(s = {}, e) {
1965
1962
  super(), this._injector = e, this._initializeDependencies(e), this._initializeCommands();
1966
1963
  }
@@ -1981,12 +1978,12 @@ let gt = (ce = class extends bt {
1981
1978
  je,
1982
1979
  Xe,
1983
1980
  Ge,
1984
- Ct,
1981
+ Mt,
1985
1982
  on,
1986
1983
  Se,
1987
1984
  _e,
1988
- St,
1989
- vt,
1985
+ ht,
1986
+ It,
1990
1987
  we,
1991
1988
  B,
1992
1989
  Mn,
@@ -1995,8 +1992,8 @@ let gt = (ce = class extends bt {
1995
1992
  le,
1996
1993
  pt,
1997
1994
  yn,
1998
- pn,
1999
1995
  hn,
1996
+ pn,
2000
1997
  He,
2001
1998
  Sn,
2002
1999
  _n,
@@ -2013,11 +2010,11 @@ let gt = (ce = class extends bt {
2013
2010
  [H],
2014
2011
  [se],
2015
2012
  [me],
2016
- [pe],
2013
+ [he],
2017
2014
  [
2018
- he,
2015
+ pe,
2019
2016
  {
2020
- useClass: zt
2017
+ useClass: kt
2021
2018
  }
2022
2019
  ],
2023
2020
  [T],
@@ -2029,7 +2026,7 @@ let gt = (ce = class extends bt {
2029
2026
  }
2030
2027
  }, y(ce, "pluginName", $n), y(ce, "type", Z.UNIVER_DOC), ce);
2031
2028
  gt = Bn([
2032
- Fn(1, k(jt))
2029
+ Fn(1, k(zt))
2033
2030
  ], gt);
2034
2031
  export {
2035
2032
  _n as AlignCenterCommand,
@@ -2038,9 +2035,9 @@ export {
2038
2035
  ae as AlignOperationCommand,
2039
2036
  In as AlignRightCommand,
2040
2037
  on as BreakLineCommand,
2041
- hn as BulletListCommand,
2038
+ pn as BulletListCommand,
2042
2039
  Cn as CoverContentCommand,
2043
- _t as CutContentCommand,
2040
+ St as CutContentCommand,
2044
2041
  Xn as DOCS_COMPONENT_BACKGROUND_LAYER_INDEX,
2045
2042
  Wn as DOCS_COMPONENT_DEFAULT_Z_INDEX,
2046
2043
  Yn as DOCS_COMPONENT_HEADER_LAYER_INDEX,
@@ -2052,14 +2049,15 @@ export {
2052
2049
  H as DocSkeletonManagerService,
2053
2050
  me as DocStateChangeManagerService,
2054
2051
  se as DocViewModelManagerService,
2055
- vt as IMEInputCommand,
2056
- pe as IMEInputManagerService,
2052
+ nn as EditorInsertTextCommandId,
2053
+ It as IMEInputCommand,
2054
+ he as IMEInputManagerService,
2057
2055
  Kn as InnerPasteCommand,
2058
2056
  Se as InsertCommand,
2059
2057
  Oe as MoveCursorOperation,
2060
2058
  Te as MoveSelectionOperation,
2061
2059
  Zn as NORMAL_TEXT_SELECTION_PLUGIN_NAME,
2062
- pn as OrderListCommand,
2060
+ hn as OrderListCommand,
2063
2061
  Mn as ReplaceContentCommand,
2064
2062
  Xe as ResetInlineFormatTextBackgroundColorCommand,
2065
2063
  B as RichTextEditingMutation,
@@ -2067,7 +2065,7 @@ export {
2067
2065
  xn as SetDocZoomRatioCommand,
2068
2066
  le as SetDocZoomRatioOperation,
2069
2067
  Le as SetInlineFormatBoldCommand,
2070
- Ct as SetInlineFormatCommand,
2068
+ Mt as SetInlineFormatCommand,
2071
2069
  ze as SetInlineFormatFontFamilyCommand,
2072
2070
  ke as SetInlineFormatFontSizeCommand,
2073
2071
  Be as SetInlineFormatItalicCommand,
@@ -2080,9 +2078,9 @@ export {
2080
2078
  pt as SetTextSelectionsOperation,
2081
2079
  T as TextSelectionManagerService,
2082
2080
  gt as UniverDocsPlugin,
2083
- St as UpdateCommand,
2084
- Gt as VIEWPORT_KEY,
2085
- Xt as getDocObject,
2081
+ ht as UpdateCommand,
2082
+ jt as VIEWPORT_KEY,
2083
+ Gt as getDocObject,
2086
2084
  Jn as getDocObjectById,
2087
2085
  J as serializeTextRange
2088
2086
  };