@univerjs/docs-drawing-ui 0.6.6-experimental.20250321-5cc1a0d → 0.6.6-experimental.20250326-149d5e1

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,9 +1,9 @@
1
1
  var At = Object.defineProperty;
2
2
  var xt = (i, e, n) => e in i ? At(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
3
3
  var Se = (i, e, n) => xt(i, typeof e != "symbol" ? e + "" : e, n);
4
- import { Disposable as Ge, BlockType as Lt, UndoCommand as Ut, RedoCommand as Bt, JSONX as X, IUniverInstanceService as q, ICommandService as $, PositionedObjectLayoutType as W, CommandType as Y, BooleanNumber as se, ObjectRelativeFromH as ee, ObjectRelativeFromV as H, Tools as Me, TextX as Sn, TextXActionType as Q, toDisposable as Oe, throttle as Rn, COLORS as kt, MemoryCursor as Ft, IUndoRedoService as Yn, BuildTextUtils as Wt, ArrangeTypeEnum as Qe, Inject as pe, IContextService as Zn, LocaleService as mn, WrapTextType as Xe, DrawingTypeEnum as Dn, FOCUSING_COMMON_DRAWINGS as rn, UniverInstanceType as Ie, Direction as fe, DocumentFlavor as pn, DOCS_ZEN_EDITOR_UNIT_ID_KEY as Cn, FOCUSING_UNIVER_EDITOR as Ht, DisposableCollection as Gt, fromEventSubject as Qn, generateRandomId as Vt, RxDisposable as jt, SHEET_EDITOR_UNITS as $t, LifecycleService as zt, LifecycleStages as En, DependentOn as Xt, Injector as qt, IConfigService as Kt, Plugin as Yt, merge as Zt } from "@univerjs/core";
4
+ import { Disposable as Ge, BlockType as Lt, UndoCommand as Ut, RedoCommand as Bt, JSONX as X, IUniverInstanceService as q, ICommandService as $, PositionedObjectLayoutType as W, CommandType as Y, BooleanNumber as se, ObjectRelativeFromH as ee, ObjectRelativeFromV as H, Tools as Me, TextX as Dn, TextXActionType as Q, toDisposable as Oe, throttle as Rn, COLORS as kt, MemoryCursor as Ft, IUndoRedoService as Yn, BuildTextUtils as Wt, ArrangeTypeEnum as Qe, Inject as pe, IContextService as Zn, LocaleService as un, WrapTextType as Xe, DrawingTypeEnum as rn, FOCUSING_COMMON_DRAWINGS as on, UniverInstanceType as Ie, Direction as fe, DocumentFlavor as wn, DOCS_ZEN_EDITOR_UNIT_ID_KEY as Cn, FOCUSING_UNIVER_EDITOR as Ht, DisposableCollection as Gt, fromEventSubject as Qn, generateRandomId as Vt, RxDisposable as jt, SHEET_EDITOR_UNITS as $t, LifecycleService as zt, LifecycleStages as En, DependentOn as Xt, Injector as qt, IConfigService as Kt, Plugin as Yt, merge as Zt } from "@univerjs/core";
5
5
  import { IDocDrawingService as Ue, UniverDocsDrawingPlugin as Qt } from "@univerjs/docs-drawing";
6
- import { IDrawingManagerService as _e, IImageIoService as Jt, DRAWING_IMAGE_ALLOW_IMAGE_LIST as ei, DRAWING_IMAGE_COUNT_LIMIT as Nn, ImageUploadStatusType as wn, DRAWING_IMAGE_ALLOW_SIZE as ni, getImageSize as ti, getDrawingShapeKeyByDrawingSearch as ii, DRAWING_IMAGE_WIDTH_LIMIT as An, DRAWING_IMAGE_HEIGHT_LIMIT as xn, UniverDrawingPlugin as ri } from "@univerjs/drawing";
6
+ import { IDrawingManagerService as _e, IImageIoService as Jt, DRAWING_IMAGE_ALLOW_IMAGE_LIST as ei, DRAWING_IMAGE_COUNT_LIMIT as Nn, ImageUploadStatusType as vn, DRAWING_IMAGE_ALLOW_SIZE as ni, getImageSize as ti, getDrawingShapeKeyByDrawingSearch as ii, DRAWING_IMAGE_WIDTH_LIMIT as An, DRAWING_IMAGE_HEIGHT_LIMIT as xn, UniverDrawingPlugin as ri } from "@univerjs/drawing";
7
7
  import { DrawingCommonPanel as oi, DrawingRenderService as si, ImageCropperObject as ai, COMPONENT_IMAGE_POPUP_MENU as ci, OpenImageCropOperation as di, ImageResetSizeOperation as li, UniverDrawingUIPlugin as gi } from "@univerjs/drawing-ui";
8
8
  import { IRenderManagerService as J, DocumentEditArea as We, Liquid as Jn, PageLayoutType as Ln, DocumentSkeletonPageType as Un, Vector2 as mi, Rect as ui, getColor as fi, getCurrentTypeOfRenderer as hi, CURSOR_TYPE as Bn, TRANSFORM_CHANGE_OBSERVABLE_TYPE as pi } from "@univerjs/engine-render";
9
9
  import { IMessageService as wi, ILocalFileService as vi, ISidebarService as Ii, useDependency as ve, getMenuHiddenObservable as et, MenuItemType as nt, RibbonStartGroup as _i, KeyCode as He, ComponentManager as Si, IMenuManagerService as Di, IShortcutService as Ci, CanvasFloatDomService as Oi, UniverUIPlugin as Ti } from "@univerjs/ui";
@@ -57,7 +57,7 @@ function Hi(i) {
57
57
  }
58
58
  return e;
59
59
  }
60
- let on = class extends Ge {
60
+ let sn = class extends Ge {
61
61
  constructor(i, e, n, t, r) {
62
62
  super(), this._univerInstanceService = i, this._commandService = e, this._drawingManagerService = n, this._docDrawingService = t, this._renderManagerService = r, this._initialize();
63
63
  }
@@ -128,14 +128,14 @@ let on = class extends Ge {
128
128
  t.orderNotification(o), r.orderNotification(o);
129
129
  }
130
130
  };
131
- on = Fi([
131
+ sn = Fi([
132
132
  $e(0, q),
133
133
  $e(1, $),
134
134
  $e(2, _e),
135
135
  $e(3, Ue),
136
136
  $e(4, J)
137
- ], on);
138
- class un {
137
+ ], sn);
138
+ class fn {
139
139
  constructor() {
140
140
  Se(this, "_refreshDrawings$", new ot(null));
141
141
  Se(this, "refreshDrawings$", this._refreshDrawings$.asObservable());
@@ -154,7 +154,7 @@ const Gi = {
154
154
  };
155
155
  function dt(i, e, n, t, r, o, s) {
156
156
  var f, u;
157
- const a = new Sn(), d = X.getInstance(), c = [], g = o.getSelfOrHeaderFooterModel(e).getBody(), m = o.getSelfOrHeaderFooterModel(i).getBody();
157
+ const a = new Dn(), d = X.getInstance(), c = [], g = o.getSelfOrHeaderFooterModel(e).getBody(), m = o.getSelfOrHeaderFooterModel(i).getBody();
158
158
  if (g == null || m == null)
159
159
  return;
160
160
  const l = (u = (f = g.customBlocks) == null ? void 0 : f.find((v) => v.blockId === r)) == null ? void 0 : u.startIndex;
@@ -412,7 +412,7 @@ const lt = {
412
412
  var B, E;
413
413
  if (e == null)
414
414
  return !1;
415
- const n = i.get(J), t = (B = n.getRenderById(e.unitId)) == null ? void 0 : B.with(Re), r = i.get(un), o = n.getRenderById(e.unitId), s = o == null ? void 0 : o.scene, a = o == null ? void 0 : o.with(te).getSkeleton();
415
+ const n = i.get(J), t = (B = n.getRenderById(e.unitId)) == null ? void 0 : B.with(Re), r = i.get(fn), o = n.getRenderById(e.unitId), s = o == null ? void 0 : o.scene, a = o == null ? void 0 : o.with(te).getSkeleton();
416
416
  if (s == null || t == null)
417
417
  return !1;
418
418
  const d = s.getTransformerByCreate(), c = i.get($), m = i.get(q).getCurrentUniverDocInstance();
@@ -512,7 +512,7 @@ function Xn(i) {
512
512
  const { path: e } = i;
513
513
  return e.some((n) => n === "cells");
514
514
  }
515
- let sn = class extends Ge {
515
+ let an = class extends Ge {
516
516
  constructor(e, n, t, r) {
517
517
  super();
518
518
  Se(this, "_liquid", new Jn());
@@ -750,8 +750,8 @@ let sn = class extends Ge {
750
750
  segmentPage: U.getSegmentPage()
751
751
  });
752
752
  if (k) {
753
- const { node: we, segmentPage: fn, segmentId: hn } = k;
754
- L = we, x = fn, G = hn;
753
+ const { node: we, segmentPage: hn, segmentId: pn } = k;
754
+ L = we, x = hn, G = pn;
755
755
  }
756
756
  if (L == null)
757
757
  return;
@@ -761,11 +761,11 @@ let sn = class extends Ge {
761
761
  this._liquid.reset();
762
762
  const Z = F.type;
763
763
  for (const we of s) {
764
- const { headerId: fn, footerId: hn, pageHeight: Rt, pageWidth: bn, marginLeft: Mn, marginBottom: Et } = we, Nt = s.indexOf(we);
764
+ const { headerId: hn, footerId: pn, pageHeight: Rt, pageWidth: bn, marginLeft: Mn, marginBottom: Et } = we, Nt = s.indexOf(we);
765
765
  if (x > -1 && Nt === x) {
766
766
  switch (Z) {
767
767
  case Un.HEADER: {
768
- const je = (ye = a.get(fn)) == null ? void 0 : ye.get(bn);
768
+ const je = (ye = a.get(hn)) == null ? void 0 : ye.get(bn);
769
769
  if (je)
770
770
  this._liquid.translatePagePadding({
771
771
  marginTop: je.marginTop,
@@ -776,7 +776,7 @@ let sn = class extends Ge {
776
776
  break;
777
777
  }
778
778
  case Un.FOOTER: {
779
- const je = (Ne = d.get(hn)) == null ? void 0 : Ne.get(bn);
779
+ const je = (Ne = d.get(pn)) == null ? void 0 : Ne.get(bn);
780
780
  if (je)
781
781
  this._liquid.translatePagePadding({
782
782
  marginTop: Rt - Et + je.marginTop,
@@ -991,12 +991,12 @@ let sn = class extends Ge {
991
991
  };
992
992
  }
993
993
  };
994
- sn = ji([
994
+ an = ji([
995
995
  Je(0, $),
996
996
  Je(1, q),
997
997
  Je(2, _e),
998
998
  Je(3, J)
999
- ], sn);
999
+ ], an);
1000
1000
  var he = function() {
1001
1001
  return he = Object.assign || function(i) {
1002
1002
  for (var e, n = 1, t = arguments.length; n < t; n++) {
@@ -1060,7 +1060,7 @@ const yn = {
1060
1060
  const n = i.get($), t = i.get(q), r = i.get(J), o = t.getCurrentUniverDocInstance();
1061
1061
  if (e == null || o == null)
1062
1062
  return !1;
1063
- const s = r.getRenderById(e.unitId).with(Re), { drawings: a } = e, d = (M = s.getSegment()) != null ? M : "", c = new Sn(), g = X.getInstance(), m = (N = (P = o.getSelfOrHeaderFooterModel(d).getBody()) == null ? void 0 : P.customBlocks) != null ? N : [], l = a.map((E) => m.find((_) => _.blockId === E.drawingId)).filter((E) => !!E).sort((E, _) => E.startIndex > _.startIndex ? 1 : -1), f = a[0].unitId, u = new Ft();
1063
+ const s = r.getRenderById(e.unitId).with(Re), { drawings: a } = e, d = (M = s.getSegment()) != null ? M : "", c = new Dn(), g = X.getInstance(), m = (N = (P = o.getSelfOrHeaderFooterModel(d).getBody()) == null ? void 0 : P.customBlocks) != null ? N : [], l = a.map((E) => m.find((_) => _.blockId === E.drawingId)).filter((E) => !!E).sort((E, _) => E.startIndex > _.startIndex ? 1 : -1), f = a[0].unitId, u = new Ft();
1064
1064
  u.reset();
1065
1065
  const v = l[0].startIndex, w = [
1066
1066
  {
@@ -1144,7 +1144,7 @@ const yn = {
1144
1144
  const a = s.getUnitId(), { drawings: d } = e, { collapsed: c, startOffset: g, segmentId: m } = o, l = s.getSelfOrHeaderFooterModel(m).getBody();
1145
1145
  if (l == null)
1146
1146
  return !1;
1147
- const f = new Sn(), u = X.getInstance(), v = [], w = (N = (P = s.getSnapshot().drawingsOrder) == null ? void 0 : P.length) != null ? N : 0;
1147
+ const f = new Dn(), u = X.getInstance(), v = [], w = (N = (P = s.getSnapshot().drawingsOrder) == null ? void 0 : P.length) != null ? N : 0;
1148
1148
  let I = 0;
1149
1149
  if (c)
1150
1150
  g > 0 && f.push({
@@ -1240,7 +1240,7 @@ var Zi = Object.getOwnPropertyDescriptor, Qi = (i, e, n, t) => {
1240
1240
  (s = i[o]) && (r = s(r) || r);
1241
1241
  return r;
1242
1242
  }, me = (i, e) => (n, t) => e(n, t, i);
1243
- let an = class extends Ge {
1243
+ let cn = class extends Ge {
1244
1244
  constructor(i, e, n, t, r, o, s, a, d, c, g, m, l) {
1245
1245
  super(), this._context = i, this._commandService = e, this._docSelectionManagerService = n, this._renderManagerSrv = t, this._imageIoService = r, this._docDrawingService = o, this._drawingManagerService = s, this._contextService = a, this._messageService = d, this._localeService = c, this._docSelectionRenderService = g, this._docRefreshDrawingsService = m, this._fileOpenerService = l, this._updateOrderListener(), this._groupDrawingListener(), this._focusDrawingListener(), this._transformDrawingListener(), this._editAreaChangeListener();
1246
1246
  }
@@ -1263,13 +1263,13 @@ let an = class extends Ge {
1263
1263
  const o = r.message;
1264
1264
  let s = "";
1265
1265
  switch (o) {
1266
- case wn.ERROR_EXCEED_SIZE:
1266
+ case vn.ERROR_EXCEED_SIZE:
1267
1267
  s = this._localeService.t("update-status.exceedMaxSize", String(ni / (1024 * 1024)));
1268
1268
  break;
1269
- case wn.ERROR_IMAGE_TYPE:
1269
+ case vn.ERROR_IMAGE_TYPE:
1270
1270
  s = this._localeService.t("update-status.invalidImageType");
1271
1271
  break;
1272
- case wn.ERROR_IMAGE:
1272
+ case vn.ERROR_IMAGE:
1273
1273
  s = this._localeService.t("update-status.invalidImage");
1274
1274
  break;
1275
1275
  }
@@ -1298,7 +1298,7 @@ let an = class extends Ge {
1298
1298
  unitId: n,
1299
1299
  subUnitId: n,
1300
1300
  drawingId: o,
1301
- drawingType: Dn.DRAWING_IMAGE,
1301
+ drawingType: rn.DRAWING_IMAGE,
1302
1302
  imageSourceType: s,
1303
1303
  source: a,
1304
1304
  transform: tt(f),
@@ -1386,12 +1386,12 @@ let an = class extends Ge {
1386
1386
  var r;
1387
1387
  const { transformer: e, docsLeft: n, docsTop: t } = (r = this._getCurrentSceneAndTransformer()) != null ? r : {};
1388
1388
  if (i == null || i.length === 0)
1389
- this._contextService.setContextValue(rn, !1), this._docDrawingService.focusDrawing([]), e && e.resetProps({
1389
+ this._contextService.setContextValue(on, !1), this._docDrawingService.focusDrawing([]), e && e.resetProps({
1390
1390
  zeroTop: 0,
1391
1391
  zeroLeft: 0
1392
1392
  });
1393
1393
  else {
1394
- this._contextService.setContextValue(rn, !0), this._docDrawingService.focusDrawing(i), this._setDrawingSelections(i);
1394
+ this._contextService.setContextValue(on, !0), this._docDrawingService.focusDrawing(i), this._setDrawingSelections(i);
1395
1395
  const o = this._docSelectionRenderService.getSegment(), s = this._findSegmentIdByDrawingId(i[0].drawingId);
1396
1396
  o !== s && this._docSelectionRenderService.setSegment(s), e && e.resetProps({
1397
1397
  zeroTop: t,
@@ -1468,7 +1468,7 @@ let an = class extends Ge {
1468
1468
  this._docSelectionManagerService.replaceDocRanges(t);
1469
1469
  }
1470
1470
  };
1471
- an = Qi([
1471
+ cn = Qi([
1472
1472
  me(1, $),
1473
1473
  me(2, pe(On)),
1474
1474
  me(3, J),
@@ -1477,18 +1477,18 @@ an = Qi([
1477
1477
  me(6, _e),
1478
1478
  me(7, Zn),
1479
1479
  me(8, wi),
1480
- me(9, pe(mn)),
1480
+ me(9, pe(un)),
1481
1481
  me(10, pe(Re)),
1482
- me(11, pe(un)),
1482
+ me(11, pe(fn)),
1483
1483
  me(12, vi)
1484
- ], an);
1484
+ ], cn);
1485
1485
  const Dt = {
1486
1486
  id: "doc.command.insert-float-image",
1487
1487
  type: Y.COMMAND,
1488
1488
  handler: (i) => {
1489
1489
  var t, r;
1490
1490
  const e = i.get(q), n = i.get(J);
1491
- return (r = (t = hi(Ie.UNIVER_DOC, e, n)) == null ? void 0 : t.with(an).insertDocImage()) != null ? r : !1;
1491
+ return (r = (t = hi(Ie.UNIVER_DOC, e, n)) == null ? void 0 : t.with(cn).insertDocImage()) != null ? r : !1;
1492
1492
  }
1493
1493
  }, Ye = {
1494
1494
  id: "doc.command.move-drawing",
@@ -1535,7 +1535,7 @@ const Dt = {
1535
1535
  id: "sidebar.operation.doc-image",
1536
1536
  type: Y.COMMAND,
1537
1537
  handler: async (i, e) => {
1538
- const n = i.get(Ii), t = i.get(mn), r = i.get(_e);
1538
+ const n = i.get(Ii), t = i.get(un), r = i.get(_e);
1539
1539
  switch (e.value) {
1540
1540
  case "open":
1541
1541
  n.open({
@@ -1572,7 +1572,7 @@ const Dt = {
1572
1572
  imageCommonPanelSpan2: ar,
1573
1573
  imageCommonPanelInput: cr
1574
1574
  }, qn = -1e3, Kn = 1e3, dr = (i) => {
1575
- const e = ve($), n = ve(mn), t = ve(_e), r = ve(J), o = ve(q), { drawings: s } = i, a = s[0];
1575
+ const e = ve($), n = ve(un), t = ve(_e), r = ve(J), o = ve(q), { drawings: s } = i, a = s[0];
1576
1576
  if (a == null)
1577
1577
  return;
1578
1578
  const { unitId: d } = a, c = o.getUniverDocInstance(d), g = c == null ? void 0 : c.getSnapshot().documentStyle.documentFlavor, m = r.getRenderById(d), l = m == null ? void 0 : m.scene;
@@ -1590,15 +1590,15 @@ const Dt = {
1590
1590
  }], v = [{
1591
1591
  label: n.t("image-position.line"),
1592
1592
  value: String(H.LINE),
1593
- disabled: g === pn.MODERN
1593
+ disabled: g === wn.MODERN
1594
1594
  }, {
1595
1595
  label: n.t("image-position.page"),
1596
1596
  value: String(H.PAGE),
1597
- disabled: g === pn.MODERN
1597
+ disabled: g === wn.MODERN
1598
1598
  }, {
1599
1599
  label: n.t("image-position.margin"),
1600
1600
  value: String(H.MARGIN),
1601
- disabled: g === pn.MODERN
1601
+ disabled: g === wn.MODERN
1602
1602
  }, {
1603
1603
  label: n.t("image-position.paragraph"),
1604
1604
  value: String(H.PARAGRAPH)
@@ -1803,7 +1803,7 @@ const Dt = {
1803
1803
  /* @__PURE__ */ p("div", { className: h.imageCommonPanelRow, style: { marginBottom: "50px" }, children: /* @__PURE__ */ p("div", { className: h.imageCommonPanelColumn, children: /* @__PURE__ */ p(Li, { disabled: w, checked: P, onChange: S, children: n.t("image-position.moveObjectWithText") }) }) })
1804
1804
  ] });
1805
1805
  }, en = 0, nn = 100, lr = (i) => {
1806
- const e = ve($), n = ve(mn), t = ve(_e), r = ve(J), o = ve(q), { drawings: s } = i, a = s[0];
1806
+ const e = ve($), n = ve(un), t = ve(_e), r = ve(J), o = ve(q), { drawings: s } = i, a = s[0];
1807
1807
  if (a == null)
1808
1808
  return null;
1809
1809
  const { unitId: d } = a, c = o.getUniverDocInstance(d), g = r.getRenderById(d);
@@ -2084,7 +2084,7 @@ const hr = {
2084
2084
  }
2085
2085
  };
2086
2086
  function Ze(i) {
2087
- return i.getContextValue(Ht) && i.getContextValue(rn);
2087
+ return i.getContextValue(Ht) && i.getContextValue(on);
2088
2088
  }
2089
2089
  const pr = {
2090
2090
  id: Ye.id,
@@ -2140,7 +2140,7 @@ var Sr = Object.getOwnPropertyDescriptor, Dr = (i, e, n, t) => {
2140
2140
  (s = i[o]) && (r = s(r) || r);
2141
2141
  return r;
2142
2142
  }, tn = (i, e) => (n, t) => e(n, t, i);
2143
- let cn = class extends Ge {
2143
+ let dn = class extends Ge {
2144
2144
  constructor(i, e, n, t) {
2145
2145
  super(), this._componentManager = i, this._menuManagerService = e, this._commandService = n, this._shortcutService = t, this._init();
2146
2146
  }
@@ -2188,18 +2188,18 @@ let cn = class extends Ge {
2188
2188
  this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
2189
2189
  }
2190
2190
  };
2191
- cn = Dr([
2191
+ dn = Dr([
2192
2192
  tn(0, pe(Si)),
2193
2193
  tn(1, Di),
2194
2194
  tn(2, $),
2195
2195
  tn(3, Ci)
2196
- ], cn);
2196
+ ], dn);
2197
2197
  var Cr = Object.getOwnPropertyDescriptor, Or = (i, e, n, t) => {
2198
2198
  for (var r = t > 1 ? void 0 : t ? Cr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
2199
2199
  (s = i[o]) && (r = s(r) || r);
2200
2200
  return r;
2201
2201
  }, ke = (i, e) => (n, t) => e(n, t, i);
2202
- function vn(i, e) {
2202
+ function In(i, e) {
2203
2203
  const { top: n, left: t, width: r, height: o, angle: s, opacity: a } = i, d = e.scene, c = d.getViewport(it.VIEW_MAIN), { viewportScrollX: g, viewportScrollY: m } = c, { scaleX: l, scaleY: f } = d.getAncestorScale();
2204
2204
  return {
2205
2205
  startX: (t - g) * l,
@@ -2216,7 +2216,7 @@ function vn(i, e) {
2216
2216
  opacity: a != null ? a : 1
2217
2217
  };
2218
2218
  }
2219
- let dn = class extends Ge {
2219
+ let ln = class extends Ge {
2220
2220
  constructor(e, n, t, r, o, s) {
2221
2221
  super();
2222
2222
  Se(this, "_domLayerInfoMap", /* @__PURE__ */ new Map());
@@ -2265,7 +2265,7 @@ let dn = class extends Ge {
2265
2265
  if (!(a == null || a.length === 0))
2266
2266
  for (const d of a) {
2267
2267
  this._addHoverForRect(d);
2268
- const c = new Gt(), g = vn(d, o.renderUnit), m = new ot(g), l = o.canvas, f = s.data, u = {
2268
+ const c = new Gt(), g = In(d, o.renderUnit), m = new ot(g), l = o.canvas, f = s.data, u = {
2269
2269
  dispose: c,
2270
2270
  rect: d,
2271
2271
  position$: m,
@@ -2291,7 +2291,7 @@ let dn = class extends Ge {
2291
2291
  unitId: t
2292
2292
  });
2293
2293
  const v = d.onTransformChange$.subscribeEvent(() => {
2294
- const w = vn(d, o.renderUnit);
2294
+ const w = In(d, o.renderUnit);
2295
2295
  m.next(
2296
2296
  w
2297
2297
  );
@@ -2331,7 +2331,7 @@ let dn = class extends Ge {
2331
2331
  const t = this._getSceneAndTransformerByDrawingSearch(n);
2332
2332
  t && this._domLayerInfoMap.forEach((r) => {
2333
2333
  if (r.unitId !== n) return;
2334
- const o = vn(r.rect, t.renderUnit);
2334
+ const o = In(r.rect, t.renderUnit);
2335
2335
  r.position$.next(o);
2336
2336
  });
2337
2337
  };
@@ -2384,7 +2384,7 @@ let dn = class extends Ge {
2384
2384
  drawings: [
2385
2385
  {
2386
2386
  drawingId: f,
2387
- drawingType: Dn.DRAWING_DOM,
2387
+ drawingType: rn.DRAWING_DOM,
2388
2388
  subUnitId: t.getUnitId(),
2389
2389
  unitId: t.getUnitId(),
2390
2390
  ...e,
@@ -2399,20 +2399,20 @@ let dn = class extends Ge {
2399
2399
  return this._commandService.syncExecuteCommand(Pn.id, u), f;
2400
2400
  }
2401
2401
  };
2402
- dn = Or([
2402
+ ln = Or([
2403
2403
  ke(0, J),
2404
2404
  ke(1, _e),
2405
2405
  ke(2, pe(si)),
2406
2406
  ke(3, pe(Oi)),
2407
2407
  ke(4, q),
2408
2408
  ke(5, $)
2409
- ], dn);
2409
+ ], ln);
2410
2410
  var Tr = Object.getOwnPropertyDescriptor, yr = (i, e, n, t) => {
2411
2411
  for (var r = t > 1 ? void 0 : t ? Tr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
2412
2412
  (s = i[o]) && (r = s(r) || r);
2413
2413
  return r;
2414
2414
  }, ze = (i, e) => (n, t) => e(n, t, i);
2415
- let ln = class extends jt {
2415
+ let gn = class extends jt {
2416
2416
  constructor(e, n, t, r, o) {
2417
2417
  super();
2418
2418
  Se(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
@@ -2460,7 +2460,7 @@ let ln = class extends jt {
2460
2460
  if (!a)
2461
2461
  return;
2462
2462
  const d = a.oKey, c = this._drawingManagerService.getDrawingOKey(d);
2463
- if (!c)
2463
+ if (!c || c.drawingType === rn.DRAWING_DOM)
2464
2464
  return;
2465
2465
  const { unitId: g, subUnitId: m, drawingId: l, drawingType: f } = c, u = this._canvasPopManagerService.attachPopupToObject(
2466
2466
  a,
@@ -2484,7 +2484,7 @@ let ln = class extends jt {
2484
2484
  ), this.disposeWithMe(
2485
2485
  Oe(
2486
2486
  t.clearControl$.subscribe(() => {
2487
- r.forEach((s) => s.dispose()), r.length = 0, this._contextService.setContextValue(rn, !1), this._drawingManagerService.focusDrawing(null);
2487
+ r.forEach((s) => s.dispose()), r.length = 0, this._contextService.setContextValue(on, !1), this._drawingManagerService.focusDrawing(null);
2488
2488
  })
2489
2489
  )
2490
2490
  ), this.disposeWithMe(
@@ -2508,7 +2508,7 @@ let ln = class extends jt {
2508
2508
  index: 0,
2509
2509
  commandId: Tt.id,
2510
2510
  commandParams: { unitId: e, subUnitId: n, drawingId: t },
2511
- disable: !!$t.includes(e) || r === Dn.DRAWING_DOM
2511
+ disable: !!$t.includes(e) || r === rn.DRAWING_DOM
2512
2512
  },
2513
2513
  {
2514
2514
  label: "image-popup.delete",
@@ -2536,19 +2536,19 @@ let ln = class extends jt {
2536
2536
  ];
2537
2537
  }
2538
2538
  };
2539
- ln = yr([
2539
+ gn = yr([
2540
2540
  ze(0, _e),
2541
2541
  ze(1, pe(Ri)),
2542
2542
  ze(2, J),
2543
2543
  ze(3, q),
2544
2544
  ze(4, Zn)
2545
- ], ln);
2545
+ ], gn);
2546
2546
  var Pr = Object.getOwnPropertyDescriptor, br = (i, e, n, t) => {
2547
2547
  for (var r = t > 1 ? void 0 : t ? Pr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
2548
2548
  (s = i[o]) && (r = s(r) || r);
2549
2549
  return r;
2550
2550
  }, Le = (i, e) => (n, t) => e(n, t, i);
2551
- let _n = class extends Ge {
2551
+ let Sn = class extends Ge {
2552
2552
  constructor(e, n, t, r, o, s, a, d) {
2553
2553
  super();
2554
2554
  Se(this, "_liquid", new Jn());
@@ -2684,22 +2684,22 @@ let _n = class extends Ge {
2684
2684
  }, 1e3) : this._lifecycleService.lifecycle$.pipe(Gn((n) => n === En.Steady)).subscribe(e);
2685
2685
  }
2686
2686
  };
2687
- _n = br([
2687
+ Sn = br([
2688
2688
  Le(1, pe(te)),
2689
2689
  Le(2, $),
2690
2690
  Le(3, Ei),
2691
2691
  Le(4, _e),
2692
- Le(5, pe(un)),
2692
+ Le(5, pe(fn)),
2693
2693
  Le(6, q),
2694
2694
  Le(7, pe(zt))
2695
- ], _n);
2695
+ ], Sn);
2696
2696
  var Mr = Object.defineProperty, Rr = Object.getOwnPropertyDescriptor, Er = (i, e, n) => e in i ? Mr(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, Nr = (i, e, n, t) => {
2697
2697
  for (var r = t > 1 ? void 0 : t ? Rr(e, n) : e, o = i.length - 1, s; o >= 0; o--)
2698
2698
  (s = i[o]) && (r = s(r) || r);
2699
2699
  return r;
2700
- }, In = (i, e) => (n, t) => e(n, t, i), Mt = (i, e, n) => Er(i, typeof e != "symbol" ? e + "" : e, n);
2700
+ }, _n = (i, e) => (n, t) => e(n, t, i), Mt = (i, e, n) => Er(i, typeof e != "symbol" ? e + "" : e, n);
2701
2701
  const Ar = "DOC_DRAWING_UI_PLUGIN";
2702
- let gn = class extends Yt {
2702
+ let mn = class extends Yt {
2703
2703
  constructor(i = zn, e, n, t) {
2704
2704
  super(), this._config = i, this._injector = e, this._renderManagerSrv = n, this._configService = t;
2705
2705
  const { ...r } = Zt(
@@ -2711,37 +2711,37 @@ let gn = class extends Yt {
2711
2711
  }
2712
2712
  onStarting() {
2713
2713
  [
2714
- [cn],
2715
- [ln],
2714
+ [dn],
2715
+ [gn],
2716
+ [an],
2716
2717
  [sn],
2717
- [on],
2718
- [un],
2719
- [dn]
2718
+ [fn],
2719
+ [ln]
2720
2720
  ].forEach((e) => this._injector.add(e));
2721
2721
  }
2722
2722
  onReady() {
2723
2723
  [
2724
- [an],
2725
- [_n]
2726
- ].forEach((i) => this._renderManagerSrv.registerRenderModule(Ie.UNIVER_DOC, i)), this._injector.get(on), this._injector.get(cn), this._injector.get(sn);
2724
+ [cn],
2725
+ [Sn]
2726
+ ].forEach((i) => this._renderManagerSrv.registerRenderModule(Ie.UNIVER_DOC, i)), this._injector.get(sn), this._injector.get(dn), this._injector.get(an);
2727
2727
  }
2728
2728
  onRendered() {
2729
- this._injector.get(ln), this._injector.get(dn);
2729
+ this._injector.get(gn), this._injector.get(ln);
2730
2730
  }
2731
2731
  };
2732
- Mt(gn, "type", Ie.UNIVER_DOC);
2733
- Mt(gn, "pluginName", Ar);
2734
- gn = Nr([
2732
+ Mt(mn, "type", Ie.UNIVER_DOC);
2733
+ Mt(mn, "pluginName", Ar);
2734
+ mn = Nr([
2735
2735
  Xt(gi, ri, Qt, Ti),
2736
- In(1, pe(qt)),
2737
- In(2, J),
2738
- In(3, Kt)
2739
- ], gn);
2736
+ _n(1, pe(qt)),
2737
+ _n(2, J),
2738
+ _n(3, Kt)
2739
+ ], mn);
2740
2740
  export {
2741
2741
  Ji as ClearDocDrawingTransformerOperation,
2742
2742
  Pt as DOCS_IMAGE_MENU_ID,
2743
2743
  vt as DeleteDocDrawingsCommand,
2744
- dn as DocFloatDomController,
2744
+ ln as DocFloatDomController,
2745
2745
  Tt as EditDocDrawingOperation,
2746
2746
  It as GroupDocDrawingCommand,
2747
2747
  Pn as InsertDocDrawingCommand,
@@ -2751,5 +2751,5 @@ export {
2751
2751
  _t as SetDocDrawingArrangeCommand,
2752
2752
  Ot as SidebarDocDrawingOperation,
2753
2753
  St as UngroupDocDrawingCommand,
2754
- gn as UniverDocsDrawingUIPlugin
2754
+ mn as UniverDocsDrawingUIPlugin
2755
2755
  };