@univerjs/drawing-ui 1.0.4 → 1.2.0

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/cjs/index.js CHANGED
@@ -651,7 +651,7 @@ const menuSchema = { [_univerjs_ui.ContextMenuPosition.DRAWING]: { [_univerjs_ui
651
651
  //#endregion
652
652
  //#region package.json
653
653
  var name = "@univerjs/drawing-ui";
654
- var version = "1.0.4";
654
+ var version = "1.2.0";
655
655
 
656
656
  //#endregion
657
657
  //#region src/config/config.ts
@@ -660,7 +660,7 @@ const configSymbol = Symbol(DRAWING_UI_PLUGIN_CONFIG_KEY);
660
660
  const defaultPluginConfig = {};
661
661
 
662
662
  //#endregion
663
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/typeof.js
663
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
664
664
  function _typeof(o) {
665
665
  "@babel/helpers - typeof";
666
666
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -671,7 +671,7 @@ function _typeof(o) {
671
671
  }
672
672
 
673
673
  //#endregion
674
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPrimitive.js
674
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPrimitive.js
675
675
  function toPrimitive(t, r) {
676
676
  if ("object" != _typeof(t) || !t) return t;
677
677
  var e = t[Symbol.toPrimitive];
@@ -684,14 +684,14 @@ function toPrimitive(t, r) {
684
684
  }
685
685
 
686
686
  //#endregion
687
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPropertyKey.js
687
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
688
688
  function toPropertyKey(t) {
689
689
  var i = toPrimitive(t, "string");
690
690
  return "symbol" == _typeof(i) ? i : i + "";
691
691
  }
692
692
 
693
693
  //#endregion
694
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/defineProperty.js
694
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
695
695
  function _defineProperty(e, r, t) {
696
696
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
697
697
  value: t,
@@ -744,7 +744,7 @@ var DrawingImageClipService = class extends _univerjs_core.Disposable {
744
744
  };
745
745
 
746
746
  //#endregion
747
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/decorateParam.js
747
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
748
748
  function __decorateParam(paramIndex, decorator) {
749
749
  return function(target, key) {
750
750
  decorator(target, key, paramIndex);
@@ -752,7 +752,7 @@ function __decorateParam(paramIndex, decorator) {
752
752
  }
753
753
 
754
754
  //#endregion
755
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/decorate.js
755
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
756
756
  function __decorate(decorators, target, key, desc) {
757
757
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
758
758
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -1340,6 +1340,14 @@ let DrawingUpdateController = class DrawingUpdateController extends _univerjs_co
1340
1340
  if (disposeDrawingRenderObject(scene, param)) {
1341
1341
  var _scene$getTransformer2;
1342
1342
  (_scene$getTransformer2 = scene.getTransformer()) === null || _scene$getTransformer2 === void 0 || _scene$getTransformer2.clearSelectedObjects();
1343
+ } else {
1344
+ const transformer = scene.getTransformer();
1345
+ const key = (0, _univerjs_drawing.getDrawingShapeKeyByDrawingSearch)(param);
1346
+ const selectedKeys = [...(transformer === null || transformer === void 0 ? void 0 : transformer.getSelectedObjectMap().keys()) ?? []].filter((selectedKey) => selectedKey === key || selectedKey.startsWith(`${key}#-#`));
1347
+ if (selectedKeys.length > 0) {
1348
+ if (selectedKeys.length === (transformer === null || transformer === void 0 ? void 0 : transformer.getSelectedObjectMap().size)) transformer.clearSelectedObjects();
1349
+ else transformer === null || transformer === void 0 || transformer.clearControlByIds(selectedKeys);
1350
+ }
1343
1351
  }
1344
1352
  });
1345
1353
  }));
@@ -1386,7 +1394,6 @@ let DrawingUpdateController = class DrawingUpdateController extends _univerjs_co
1386
1394
  _drawingRefreshListener() {
1387
1395
  this.disposeWithMe(this._drawingManagerService.refreshTransform$.subscribe((params) => {
1388
1396
  params.forEach((param) => {
1389
- var _setClipBounds2;
1390
1397
  const { unitId, subUnitId, drawingId } = param;
1391
1398
  const renderObject = this._getSceneAndTransformerByDrawingSearch(unitId);
1392
1399
  if (renderObject == null) return;
@@ -1395,38 +1402,44 @@ let DrawingUpdateController = class DrawingUpdateController extends _univerjs_co
1395
1402
  const { transform } = drawingParam;
1396
1403
  const { scene } = renderObject;
1397
1404
  if (transform == null) return true;
1398
- const drawingShapeKey = (0, _univerjs_drawing.getDrawingShapeKeyByDrawingSearch)({
1399
- unitId,
1400
- subUnitId,
1401
- drawingId
1402
- });
1403
- const drawingShape = scene.getObjectIncludeInGroup(drawingShapeKey);
1404
1405
  const drawingParamWithRefreshMetadata = mergeRefreshMetadata(drawingParam, param);
1405
- if (drawingShape == null) {
1406
- if (drawingParamWithRefreshMetadata.hidden === true) return true;
1407
- this._drawingManagerService.addNotification([{
1406
+ const isMultiTransform = drawingParam.isMultiTransform === _univerjs_core.BooleanNumber.TRUE;
1407
+ const transforms = isMultiTransform ? drawingParam.transforms ?? [] : [transform];
1408
+ let hasMissingShape = false;
1409
+ transforms.forEach((instanceTransform, index) => {
1410
+ var _setClipBounds2;
1411
+ const drawingShapeKey = (0, _univerjs_drawing.getDrawingShapeKeyByDrawingSearch)({
1408
1412
  unitId,
1409
1413
  subUnitId,
1410
1414
  drawingId
1411
- }]);
1412
- return true;
1413
- }
1414
- const { left = 0, top = 0, width = 0, height = 0, angle = 0, flipX = false, flipY = false, skewX = 0, skewY = 0 } = transform;
1415
- drawingShape.transformByState({
1416
- left,
1417
- top,
1418
- width,
1419
- height,
1420
- angle,
1421
- flipX,
1422
- flipY,
1423
- skewX,
1424
- skewY
1415
+ }, isMultiTransform ? index : void 0);
1416
+ const drawingShape = scene.getObjectIncludeInGroup(drawingShapeKey);
1417
+ if (drawingShape == null) {
1418
+ hasMissingShape = true;
1419
+ return;
1420
+ }
1421
+ const { left = 0, top = 0, width = 0, height = 0, angle = 0, flipX = false, flipY = false, skewX = 0, skewY = 0 } = instanceTransform;
1422
+ drawingShape.transformByState({
1423
+ left,
1424
+ top,
1425
+ width,
1426
+ height,
1427
+ angle,
1428
+ flipX,
1429
+ flipY,
1430
+ skewX,
1431
+ skewY
1432
+ });
1433
+ (_setClipBounds2 = drawingShape.setClipBounds) === null || _setClipBounds2 === void 0 || _setClipBounds2.call(drawingShape, instanceTransform.clipBounds);
1434
+ syncDrawingHiddenState(drawingShape, drawingParamWithRefreshMetadata);
1435
+ syncDrawingSelectableState(drawingShape, drawingParamWithRefreshMetadata, scene, this._drawingManagerService);
1436
+ ensureDrawingRenderLayer(scene, drawingShape, drawingParamWithRefreshMetadata);
1425
1437
  });
1426
- (_setClipBounds2 = drawingShape.setClipBounds) === null || _setClipBounds2 === void 0 || _setClipBounds2.call(drawingShape, transform.clipBounds);
1427
- syncDrawingHiddenState(drawingShape, drawingParamWithRefreshMetadata);
1428
- syncDrawingSelectableState(drawingShape, drawingParamWithRefreshMetadata, scene, this._drawingManagerService);
1429
- ensureDrawingRenderLayer(scene, drawingShape, drawingParamWithRefreshMetadata);
1438
+ if (hasMissingShape && drawingParamWithRefreshMetadata.hidden !== true) this._drawingManagerService.addNotification([{
1439
+ unitId,
1440
+ subUnitId,
1441
+ drawingId
1442
+ }]);
1430
1443
  });
1431
1444
  }));
1432
1445
  }
@@ -5053,7 +5066,7 @@ function ObjectListPanelBase(props) {
5053
5066
  ["locked", labels.filterLocked]
5054
5067
  ].map(([mode, label]) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
5055
5068
  type: "button",
5056
- className: (0, _univerjs_design.clsx)("univer-min-w-0 univer-flex-1 univer-rounded-md univer-border univer-border-solid univer-px-2 univer-text-xs univer-outline-none univer-transition-colors dark:!univer-border-gray-700", "univer-h-7", filterMode === mode ? "dark:!univer-bg-primary-900/30 univer-border-primary-500 univer-bg-primary-50 univer-text-primary-600 dark:!univer-text-primary-200" : (0, _univerjs_design.clsx)("univer-border-gray-200 univer-bg-gray-0 univer-text-gray-600 dark:!univer-bg-gray-900 dark:!univer-text-gray-300", "hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-800")),
5069
+ className: (0, _univerjs_design.clsx)("univer-min-w-0 univer-flex-1 univer-rounded-md univer-border univer-border-solid univer-px-2 univer-text-xs univer-outline-none univer-transition-colors dark:!univer-border-gray-700", "univer-h-7", filterMode === mode ? "univer-border-primary-500 univer-bg-primary-50 univer-text-primary-600 dark:!univer-bg-primary-900 dark:!univer-text-primary-200" : (0, _univerjs_design.clsx)("univer-border-gray-200 univer-bg-gray-0 univer-text-gray-600 dark:!univer-bg-gray-900 dark:!univer-text-gray-300", "hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-800")),
5057
5070
  "aria-pressed": filterMode === mode,
5058
5071
  onClick: () => setFilterMode(mode),
5059
5072
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
@@ -5268,8 +5281,8 @@ function ObjectDetailsEditor(props) {
5268
5281
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5269
5282
  className: "univer-text-xs univer-text-gray-500 dark:!univer-text-gray-400",
5270
5283
  children: labels.description
5271
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
5272
- className: (0, _univerjs_design.clsx)(descriptionClassName, "univer-box-border univer-min-h-16 univer-w-full univer-resize-none univer-rounded-md univer-border univer-border-solid univer-border-gray-200 univer-bg-gray-0 univer-p-2 univer-text-sm univer-text-gray-900 univer-outline-none focus:univer-border-primary-500 focus:univer-ring-1 focus:univer-ring-primary-100 disabled:univer-cursor-not-allowed disabled:univer-opacity-70 dark:!univer-border-gray-700 dark:!univer-bg-gray-900 dark:!univer-text-gray-100 dark:focus:!univer-ring-primary-900"),
5284
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Textarea, {
5285
+ className: (0, _univerjs_design.clsx)("univer-min-h-16 univer-resize-none univer-text-sm", descriptionClassName),
5273
5286
  value: draftDescription,
5274
5287
  disabled,
5275
5288
  placeholder: labels.descriptionPlaceholder,
@@ -5405,7 +5418,7 @@ function MobileObjectListPanel(props) {
5405
5418
  ["locked", labels.filterLocked]
5406
5419
  ].map(([mode, label]) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
5407
5420
  type: "button",
5408
- className: (0, _univerjs_design.clsx)("univer-min-w-0 univer-flex-1 univer-rounded-md univer-border univer-border-solid univer-px-2 univer-text-xs univer-outline-none univer-transition-colors dark:!univer-border-gray-700", "univer-h-11 univer-text-sm", filterMode === mode ? "dark:!univer-bg-primary-900/30 univer-border-primary-500 univer-bg-primary-50 univer-text-primary-600 dark:!univer-text-primary-200" : (0, _univerjs_design.clsx)("univer-border-gray-200 univer-bg-gray-0 univer-text-gray-600 dark:!univer-bg-gray-900 dark:!univer-text-gray-300")),
5421
+ className: (0, _univerjs_design.clsx)("univer-min-w-0 univer-flex-1 univer-rounded-md univer-border univer-border-solid univer-px-2 univer-text-xs univer-outline-none univer-transition-colors dark:!univer-border-gray-700", "univer-h-11 univer-text-sm", filterMode === mode ? "univer-border-primary-500 univer-bg-primary-50 univer-text-primary-600 dark:!univer-bg-primary-900 dark:!univer-text-primary-200" : (0, _univerjs_design.clsx)("univer-border-gray-200 univer-bg-gray-0 univer-text-gray-600 dark:!univer-bg-gray-900 dark:!univer-text-gray-300")),
5409
5422
  "aria-pressed": filterMode === mode,
5410
5423
  onClick: () => setFilterMode(mode),
5411
5424
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
@@ -5630,7 +5643,7 @@ exports.CloseImageCropOperation = CloseImageCropOperation;
5630
5643
  exports.DRAWING_GROUP_TYPES = DRAWING_GROUP_TYPES;
5631
5644
  exports.DrawingCommonPanel = DrawingCommonPanel;
5632
5645
  exports.DrawingImageClipService = DrawingImageClipService;
5633
- Object.defineProperty(exports, 'DrawingRenderService', {
5646
+ Object.defineProperty(exports, "DrawingRenderService", {
5634
5647
  enumerable: true,
5635
5648
  get: function () {
5636
5649
  return DrawingRenderService;
@@ -5648,13 +5661,13 @@ exports.OpenImageCropOperation = OpenImageCropOperation;
5648
5661
  exports.SetDrawingAlignOperation = SetDrawingAlignOperation;
5649
5662
  exports.SetDrawingArrangeOperation = SetDrawingArrangeOperation;
5650
5663
  exports.SetDrawingGroupOperation = SetDrawingGroupOperation;
5651
- Object.defineProperty(exports, 'UniverDrawingMobileUIPlugin', {
5664
+ Object.defineProperty(exports, "UniverDrawingMobileUIPlugin", {
5652
5665
  enumerable: true,
5653
5666
  get: function () {
5654
5667
  return UniverDrawingMobileUIPlugin;
5655
5668
  }
5656
5669
  });
5657
- Object.defineProperty(exports, 'UniverDrawingUIPlugin', {
5670
+ Object.defineProperty(exports, "UniverDrawingUIPlugin", {
5658
5671
  enumerable: true,
5659
5672
  get: function () {
5660
5673
  return UniverDrawingUIPlugin;
package/lib/es/index.js CHANGED
@@ -4,7 +4,7 @@ import { CURSOR_TYPE, Canvas, DRAWING_OBJECT_LAYER_INDEX, DrawingGroupObject, Gr
4
4
  import { BuiltInUIPart, ComponentManager, ContextMenuGroup, ContextMenuPosition, IDialogService, IGalleryService, ILayoutService, IMenuManagerService, IMessageService, IShortcutService, IUIPartsService, IconManager, KeyCode, MenuItemType, MobileMenu, connectInjector, useDependency, useObservable } from "@univerjs/ui";
5
5
  import { BehaviorSubject, Observable, bufferTime, combineLatest, filter, map, merge as merge$1, of, startWith, switchMap } from "rxjs";
6
6
  import { ArrowDownIcon, ArrowUpIcon, AutofillDoubleIcon, BottomIcon, ChartIcon, CheckMarkIcon, CloseIcon, CreateCopyIcon, CropIcon, DeleteIcon, DocSettingIcon, ExpandIcon, EyeIcon, EyelashIcon, GroupIcon, LocateFixedIcon, LockIcon, MoreDownIcon, MoveDownIcon, MoveUpIcon, TextWrapShapeIcon, TopmostIcon, UngroupIcon, UnlockIcon } from "@univerjs/icons";
7
- import { Button, Checkbox, Dropdown, DropdownMenu, Input, InputNumber, MessageType, MobileActionRow, MobileSelect, Select, Separator, StateIconButton, Tooltip, borderClassName, clsx, render, unmount } from "@univerjs/design";
7
+ import { Button, Checkbox, Dropdown, DropdownMenu, Input, InputNumber, MessageType, MobileActionRow, MobileSelect, Select, Separator, StateIconButton, Textarea, Tooltip, borderClassName, clsx, render, unmount } from "@univerjs/design";
8
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
9
  import { createElement, useEffect, useMemo, useRef, useState } from "react";
10
10
 
@@ -650,7 +650,7 @@ const menuSchema = { [ContextMenuPosition.DRAWING]: { [ContextMenuGroup.OTHERS]:
650
650
  //#endregion
651
651
  //#region package.json
652
652
  var name = "@univerjs/drawing-ui";
653
- var version = "1.0.4";
653
+ var version = "1.2.0";
654
654
 
655
655
  //#endregion
656
656
  //#region src/config/config.ts
@@ -659,7 +659,7 @@ const configSymbol = Symbol(DRAWING_UI_PLUGIN_CONFIG_KEY);
659
659
  const defaultPluginConfig = {};
660
660
 
661
661
  //#endregion
662
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/typeof.js
662
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
663
663
  function _typeof(o) {
664
664
  "@babel/helpers - typeof";
665
665
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -670,7 +670,7 @@ function _typeof(o) {
670
670
  }
671
671
 
672
672
  //#endregion
673
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPrimitive.js
673
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPrimitive.js
674
674
  function toPrimitive(t, r) {
675
675
  if ("object" != _typeof(t) || !t) return t;
676
676
  var e = t[Symbol.toPrimitive];
@@ -683,14 +683,14 @@ function toPrimitive(t, r) {
683
683
  }
684
684
 
685
685
  //#endregion
686
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPropertyKey.js
686
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
687
687
  function toPropertyKey(t) {
688
688
  var i = toPrimitive(t, "string");
689
689
  return "symbol" == _typeof(i) ? i : i + "";
690
690
  }
691
691
 
692
692
  //#endregion
693
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/defineProperty.js
693
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
694
694
  function _defineProperty(e, r, t) {
695
695
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
696
696
  value: t,
@@ -743,7 +743,7 @@ var DrawingImageClipService = class extends Disposable {
743
743
  };
744
744
 
745
745
  //#endregion
746
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/decorateParam.js
746
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
747
747
  function __decorateParam(paramIndex, decorator) {
748
748
  return function(target, key) {
749
749
  decorator(target, key, paramIndex);
@@ -751,7 +751,7 @@ function __decorateParam(paramIndex, decorator) {
751
751
  }
752
752
 
753
753
  //#endregion
754
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/decorate.js
754
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
755
755
  function __decorate(decorators, target, key, desc) {
756
756
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
757
757
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -1339,6 +1339,14 @@ let DrawingUpdateController = class DrawingUpdateController extends Disposable {
1339
1339
  if (disposeDrawingRenderObject(scene, param)) {
1340
1340
  var _scene$getTransformer2;
1341
1341
  (_scene$getTransformer2 = scene.getTransformer()) === null || _scene$getTransformer2 === void 0 || _scene$getTransformer2.clearSelectedObjects();
1342
+ } else {
1343
+ const transformer = scene.getTransformer();
1344
+ const key = getDrawingShapeKeyByDrawingSearch(param);
1345
+ const selectedKeys = [...(transformer === null || transformer === void 0 ? void 0 : transformer.getSelectedObjectMap().keys()) ?? []].filter((selectedKey) => selectedKey === key || selectedKey.startsWith(`${key}#-#`));
1346
+ if (selectedKeys.length > 0) {
1347
+ if (selectedKeys.length === (transformer === null || transformer === void 0 ? void 0 : transformer.getSelectedObjectMap().size)) transformer.clearSelectedObjects();
1348
+ else transformer === null || transformer === void 0 || transformer.clearControlByIds(selectedKeys);
1349
+ }
1342
1350
  }
1343
1351
  });
1344
1352
  }));
@@ -1385,7 +1393,6 @@ let DrawingUpdateController = class DrawingUpdateController extends Disposable {
1385
1393
  _drawingRefreshListener() {
1386
1394
  this.disposeWithMe(this._drawingManagerService.refreshTransform$.subscribe((params) => {
1387
1395
  params.forEach((param) => {
1388
- var _setClipBounds2;
1389
1396
  const { unitId, subUnitId, drawingId } = param;
1390
1397
  const renderObject = this._getSceneAndTransformerByDrawingSearch(unitId);
1391
1398
  if (renderObject == null) return;
@@ -1394,38 +1401,44 @@ let DrawingUpdateController = class DrawingUpdateController extends Disposable {
1394
1401
  const { transform } = drawingParam;
1395
1402
  const { scene } = renderObject;
1396
1403
  if (transform == null) return true;
1397
- const drawingShapeKey = getDrawingShapeKeyByDrawingSearch({
1398
- unitId,
1399
- subUnitId,
1400
- drawingId
1401
- });
1402
- const drawingShape = scene.getObjectIncludeInGroup(drawingShapeKey);
1403
1404
  const drawingParamWithRefreshMetadata = mergeRefreshMetadata(drawingParam, param);
1404
- if (drawingShape == null) {
1405
- if (drawingParamWithRefreshMetadata.hidden === true) return true;
1406
- this._drawingManagerService.addNotification([{
1405
+ const isMultiTransform = drawingParam.isMultiTransform === BooleanNumber.TRUE;
1406
+ const transforms = isMultiTransform ? drawingParam.transforms ?? [] : [transform];
1407
+ let hasMissingShape = false;
1408
+ transforms.forEach((instanceTransform, index) => {
1409
+ var _setClipBounds2;
1410
+ const drawingShapeKey = getDrawingShapeKeyByDrawingSearch({
1407
1411
  unitId,
1408
1412
  subUnitId,
1409
1413
  drawingId
1410
- }]);
1411
- return true;
1412
- }
1413
- const { left = 0, top = 0, width = 0, height = 0, angle = 0, flipX = false, flipY = false, skewX = 0, skewY = 0 } = transform;
1414
- drawingShape.transformByState({
1415
- left,
1416
- top,
1417
- width,
1418
- height,
1419
- angle,
1420
- flipX,
1421
- flipY,
1422
- skewX,
1423
- skewY
1414
+ }, isMultiTransform ? index : void 0);
1415
+ const drawingShape = scene.getObjectIncludeInGroup(drawingShapeKey);
1416
+ if (drawingShape == null) {
1417
+ hasMissingShape = true;
1418
+ return;
1419
+ }
1420
+ const { left = 0, top = 0, width = 0, height = 0, angle = 0, flipX = false, flipY = false, skewX = 0, skewY = 0 } = instanceTransform;
1421
+ drawingShape.transformByState({
1422
+ left,
1423
+ top,
1424
+ width,
1425
+ height,
1426
+ angle,
1427
+ flipX,
1428
+ flipY,
1429
+ skewX,
1430
+ skewY
1431
+ });
1432
+ (_setClipBounds2 = drawingShape.setClipBounds) === null || _setClipBounds2 === void 0 || _setClipBounds2.call(drawingShape, instanceTransform.clipBounds);
1433
+ syncDrawingHiddenState(drawingShape, drawingParamWithRefreshMetadata);
1434
+ syncDrawingSelectableState(drawingShape, drawingParamWithRefreshMetadata, scene, this._drawingManagerService);
1435
+ ensureDrawingRenderLayer(scene, drawingShape, drawingParamWithRefreshMetadata);
1424
1436
  });
1425
- (_setClipBounds2 = drawingShape.setClipBounds) === null || _setClipBounds2 === void 0 || _setClipBounds2.call(drawingShape, transform.clipBounds);
1426
- syncDrawingHiddenState(drawingShape, drawingParamWithRefreshMetadata);
1427
- syncDrawingSelectableState(drawingShape, drawingParamWithRefreshMetadata, scene, this._drawingManagerService);
1428
- ensureDrawingRenderLayer(scene, drawingShape, drawingParamWithRefreshMetadata);
1437
+ if (hasMissingShape && drawingParamWithRefreshMetadata.hidden !== true) this._drawingManagerService.addNotification([{
1438
+ unitId,
1439
+ subUnitId,
1440
+ drawingId
1441
+ }]);
1429
1442
  });
1430
1443
  }));
1431
1444
  }
@@ -5052,7 +5065,7 @@ function ObjectListPanelBase(props) {
5052
5065
  ["locked", labels.filterLocked]
5053
5066
  ].map(([mode, label]) => /* @__PURE__ */ jsx("button", {
5054
5067
  type: "button",
5055
- className: clsx("univer-min-w-0 univer-flex-1 univer-rounded-md univer-border univer-border-solid univer-px-2 univer-text-xs univer-outline-none univer-transition-colors dark:!univer-border-gray-700", "univer-h-7", filterMode === mode ? "dark:!univer-bg-primary-900/30 univer-border-primary-500 univer-bg-primary-50 univer-text-primary-600 dark:!univer-text-primary-200" : clsx("univer-border-gray-200 univer-bg-gray-0 univer-text-gray-600 dark:!univer-bg-gray-900 dark:!univer-text-gray-300", "hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-800")),
5068
+ className: clsx("univer-min-w-0 univer-flex-1 univer-rounded-md univer-border univer-border-solid univer-px-2 univer-text-xs univer-outline-none univer-transition-colors dark:!univer-border-gray-700", "univer-h-7", filterMode === mode ? "univer-border-primary-500 univer-bg-primary-50 univer-text-primary-600 dark:!univer-bg-primary-900 dark:!univer-text-primary-200" : clsx("univer-border-gray-200 univer-bg-gray-0 univer-text-gray-600 dark:!univer-bg-gray-900 dark:!univer-text-gray-300", "hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-800")),
5056
5069
  "aria-pressed": filterMode === mode,
5057
5070
  onClick: () => setFilterMode(mode),
5058
5071
  children: /* @__PURE__ */ jsx("span", {
@@ -5267,8 +5280,8 @@ function ObjectDetailsEditor(props) {
5267
5280
  children: [/* @__PURE__ */ jsx("span", {
5268
5281
  className: "univer-text-xs univer-text-gray-500 dark:!univer-text-gray-400",
5269
5282
  children: labels.description
5270
- }), /* @__PURE__ */ jsx("textarea", {
5271
- className: clsx(descriptionClassName, "univer-box-border univer-min-h-16 univer-w-full univer-resize-none univer-rounded-md univer-border univer-border-solid univer-border-gray-200 univer-bg-gray-0 univer-p-2 univer-text-sm univer-text-gray-900 univer-outline-none focus:univer-border-primary-500 focus:univer-ring-1 focus:univer-ring-primary-100 disabled:univer-cursor-not-allowed disabled:univer-opacity-70 dark:!univer-border-gray-700 dark:!univer-bg-gray-900 dark:!univer-text-gray-100 dark:focus:!univer-ring-primary-900"),
5283
+ }), /* @__PURE__ */ jsx(Textarea, {
5284
+ className: clsx("univer-min-h-16 univer-resize-none univer-text-sm", descriptionClassName),
5272
5285
  value: draftDescription,
5273
5286
  disabled,
5274
5287
  placeholder: labels.descriptionPlaceholder,
@@ -5404,7 +5417,7 @@ function MobileObjectListPanel(props) {
5404
5417
  ["locked", labels.filterLocked]
5405
5418
  ].map(([mode, label]) => /* @__PURE__ */ jsx("button", {
5406
5419
  type: "button",
5407
- className: clsx("univer-min-w-0 univer-flex-1 univer-rounded-md univer-border univer-border-solid univer-px-2 univer-text-xs univer-outline-none univer-transition-colors dark:!univer-border-gray-700", "univer-h-11 univer-text-sm", filterMode === mode ? "dark:!univer-bg-primary-900/30 univer-border-primary-500 univer-bg-primary-50 univer-text-primary-600 dark:!univer-text-primary-200" : clsx("univer-border-gray-200 univer-bg-gray-0 univer-text-gray-600 dark:!univer-bg-gray-900 dark:!univer-text-gray-300")),
5420
+ className: clsx("univer-min-w-0 univer-flex-1 univer-rounded-md univer-border univer-border-solid univer-px-2 univer-text-xs univer-outline-none univer-transition-colors dark:!univer-border-gray-700", "univer-h-11 univer-text-sm", filterMode === mode ? "univer-border-primary-500 univer-bg-primary-50 univer-text-primary-600 dark:!univer-bg-primary-900 dark:!univer-text-primary-200" : clsx("univer-border-gray-200 univer-bg-gray-0 univer-text-gray-600 dark:!univer-bg-gray-900 dark:!univer-text-gray-300")),
5408
5421
  "aria-pressed": filterMode === mode,
5409
5422
  onClick: () => setFilterMode(mode),
5410
5423
  children: /* @__PURE__ */ jsx("span", {
package/lib/index.css CHANGED
@@ -358,10 +358,6 @@
358
358
  padding: .25rem;
359
359
  }
360
360
 
361
- .univer-p-2 {
362
- padding: .5rem;
363
- }
364
-
365
361
  .univer-p-3 {
366
362
  padding: .75rem;
367
363
  }
@@ -584,10 +580,6 @@
584
580
  border-color: var(--univer-primary-500) !important;
585
581
  }
586
582
 
587
- .focus\:univer-border-primary-500:focus {
588
- border-color: var(--univer-primary-500);
589
- }
590
-
591
583
  .focus\:\!univer-bg-gray-0:focus {
592
584
  background-color: var(--univer-gray-0) !important;
593
585
  }
@@ -599,21 +591,10 @@
599
591
  box-shadow: var(--univer-tw-ring-offset-shadow), var(--univer-tw-ring-shadow), var(--univer-tw-shadow, 0 0 #0000) !important;
600
592
  }
601
593
 
602
- .focus\:univer-ring-1:focus {
603
- --univer-tw-ring-offset-shadow: var(--univer-tw-ring-inset) 0 0 0 var(--univer-tw-ring-offset-width) var(--univer-tw-ring-offset-color);
604
- --univer-tw-ring-shadow: var(--univer-tw-ring-inset) 0 0 0 calc(1px + var(--univer-tw-ring-offset-width)) var(--univer-tw-ring-color);
605
- box-shadow: var(--univer-tw-ring-offset-shadow), var(--univer-tw-ring-shadow), 0 0 #0000;
606
- box-shadow: var(--univer-tw-ring-offset-shadow), var(--univer-tw-ring-shadow), var(--univer-tw-shadow, 0 0 #0000);
607
- }
608
-
609
594
  .focus\:\!univer-ring-primary-100:focus {
610
595
  --univer-tw-ring-color: var(--univer-primary-100) !important;
611
596
  }
612
597
 
613
- .focus\:univer-ring-primary-100:focus {
614
- --univer-tw-ring-color: var(--univer-primary-100);
615
- }
616
-
617
598
  .active\:univer-scale-95:active {
618
599
  --univer-tw-scale-x: .95;
619
600
  --univer-tw-scale-y: .95;
@@ -649,10 +630,6 @@
649
630
  opacity: .4;
650
631
  }
651
632
 
652
- .disabled\:univer-opacity-70:disabled {
653
- opacity: .7;
654
- }
655
-
656
633
  @media (hover: hover) and (pointer: fine) {
657
634
  .disabled\:hover\:univer-bg-transparent:hover:disabled {
658
635
  background-color: #0000;
@@ -681,6 +658,10 @@
681
658
  background-color: var(--univer-gray-900) !important;
682
659
  }
683
660
 
661
+ .dark\:\!univer-bg-primary-900:where(.univer-dark, .univer-dark *) {
662
+ background-color: var(--univer-primary-900) !important;
663
+ }
664
+
684
665
  .dark\:\!univer-text-gray-0:where(.univer-dark, .univer-dark *) {
685
666
  color: var(--univer-gray-0) !important;
686
667
  }