@univerjs/drawing-ui 1.0.3 → 1.1.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 +80 -49
- package/lib/es/index.js +79 -48
- package/lib/index.css +0 -23
- package/lib/index.js +79 -48
- package/lib/types/index.d.ts +1 -1
- package/lib/umd/index.js +3 -3
- package/package.json +10 -10
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
|
|
654
|
+
var version = "1.1.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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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);
|
|
@@ -785,7 +785,7 @@ let DrawingRenderService = class DrawingRenderService {
|
|
|
785
785
|
this._drawingImageClipService = _drawingImageClipService;
|
|
786
786
|
}
|
|
787
787
|
async renderImages(imageParam, scene, options) {
|
|
788
|
-
const { transform: singleTransform, drawingType, source, imageSourceType, srcRect, prstGeom, groupId, unitId, subUnitId, drawingId, isMultiTransform, transforms: multiTransforms, adjustValues, hidden } = imageParam;
|
|
788
|
+
const { transform: singleTransform, drawingType, source, imageSourceType, srcRect, prstGeom, groupId, unitId, subUnitId, drawingId, isMultiTransform, transforms: multiTransforms, adjustValues, hidden, opacity } = imageParam;
|
|
789
789
|
const { docxHeaderFooterDrawing, layoutType } = imageParam;
|
|
790
790
|
if (drawingType !== _univerjs_core.DrawingTypeEnum.DRAWING_IMAGE) return;
|
|
791
791
|
if (!this._drawingManagerService.getDrawingVisible()) return;
|
|
@@ -816,6 +816,7 @@ let DrawingRenderService = class DrawingRenderService {
|
|
|
816
816
|
skewY
|
|
817
817
|
});
|
|
818
818
|
(_setClipBounds = imageShape.setClipBounds) === null || _setClipBounds === void 0 || _setClipBounds.call(imageShape, transform.clipBounds);
|
|
819
|
+
if (this._univerInstanceService.getUnitType(unitId) === _univerjs_core.UniverInstanceType.UNIVER_SHEET || opacity !== void 0) imageShape.setOpacity((0, _univerjs_drawing.normalizeImageOpacity)(opacity));
|
|
819
820
|
if ("hidden" in imageParam) hidden ? imageShape.hide() : imageShape.show();
|
|
820
821
|
ensureDrawingRenderLayer(scene, imageShape, imageParam);
|
|
821
822
|
continue;
|
|
@@ -824,6 +825,7 @@ let DrawingRenderService = class DrawingRenderService {
|
|
|
824
825
|
const zIndex = orders.indexOf(drawingId);
|
|
825
826
|
const imageConfig = {
|
|
826
827
|
...transform,
|
|
828
|
+
opacity: (0, _univerjs_drawing.normalizeImageOpacity)(opacity),
|
|
827
829
|
zIndex: zIndex === -1 ? orders.length - 1 : zIndex
|
|
828
830
|
};
|
|
829
831
|
const imageNativeCache = this._imageIoService.getImageSourceCache(source, imageSourceType);
|
|
@@ -1298,12 +1300,12 @@ let DrawingUpdateController = class DrawingUpdateController extends _univerjs_co
|
|
|
1298
1300
|
subUnitId,
|
|
1299
1301
|
drawingId
|
|
1300
1302
|
});
|
|
1301
|
-
const
|
|
1302
|
-
if (
|
|
1303
|
+
const drawingObjects = scene.fuzzyMathObjects(oKey, true);
|
|
1304
|
+
if (drawingObjects.length === 0) return;
|
|
1303
1305
|
const index = this._drawingManagerService.getDrawingOrder(unitId, subUnitId).indexOf(drawingId);
|
|
1304
|
-
for (const
|
|
1305
|
-
|
|
1306
|
-
|
|
1306
|
+
for (const object of drawingObjects) {
|
|
1307
|
+
object.zIndex = index;
|
|
1308
|
+
object.makeDirty();
|
|
1307
1309
|
}
|
|
1308
1310
|
});
|
|
1309
1311
|
}
|
|
@@ -1338,6 +1340,14 @@ let DrawingUpdateController = class DrawingUpdateController extends _univerjs_co
|
|
|
1338
1340
|
if (disposeDrawingRenderObject(scene, param)) {
|
|
1339
1341
|
var _scene$getTransformer2;
|
|
1340
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
|
+
}
|
|
1341
1351
|
}
|
|
1342
1352
|
});
|
|
1343
1353
|
}));
|
|
@@ -1384,7 +1394,6 @@ let DrawingUpdateController = class DrawingUpdateController extends _univerjs_co
|
|
|
1384
1394
|
_drawingRefreshListener() {
|
|
1385
1395
|
this.disposeWithMe(this._drawingManagerService.refreshTransform$.subscribe((params) => {
|
|
1386
1396
|
params.forEach((param) => {
|
|
1387
|
-
var _setClipBounds2;
|
|
1388
1397
|
const { unitId, subUnitId, drawingId } = param;
|
|
1389
1398
|
const renderObject = this._getSceneAndTransformerByDrawingSearch(unitId);
|
|
1390
1399
|
if (renderObject == null) return;
|
|
@@ -1393,38 +1402,44 @@ let DrawingUpdateController = class DrawingUpdateController extends _univerjs_co
|
|
|
1393
1402
|
const { transform } = drawingParam;
|
|
1394
1403
|
const { scene } = renderObject;
|
|
1395
1404
|
if (transform == null) return true;
|
|
1396
|
-
const drawingShapeKey = (0, _univerjs_drawing.getDrawingShapeKeyByDrawingSearch)({
|
|
1397
|
-
unitId,
|
|
1398
|
-
subUnitId,
|
|
1399
|
-
drawingId
|
|
1400
|
-
});
|
|
1401
|
-
const drawingShape = scene.getObjectIncludeInGroup(drawingShapeKey);
|
|
1402
1405
|
const drawingParamWithRefreshMetadata = mergeRefreshMetadata(drawingParam, param);
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
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)({
|
|
1406
1412
|
unitId,
|
|
1407
1413
|
subUnitId,
|
|
1408
1414
|
drawingId
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
top,
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
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);
|
|
1423
1437
|
});
|
|
1424
|
-
(
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1438
|
+
if (hasMissingShape && drawingParamWithRefreshMetadata.hidden !== true) this._drawingManagerService.addNotification([{
|
|
1439
|
+
unitId,
|
|
1440
|
+
subUnitId,
|
|
1441
|
+
drawingId
|
|
1442
|
+
}]);
|
|
1428
1443
|
});
|
|
1429
1444
|
}));
|
|
1430
1445
|
}
|
|
@@ -3275,14 +3290,20 @@ function ToolbarGroup(props) {
|
|
|
3275
3290
|
});
|
|
3276
3291
|
}
|
|
3277
3292
|
function ToolbarButton(props) {
|
|
3293
|
+
const [tooltipVisible, setTooltipVisible] = (0, react.useState)(false);
|
|
3278
3294
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
|
|
3279
3295
|
className: "univer-fill-mode-backwards univer-delay-100",
|
|
3280
3296
|
title: props.title,
|
|
3281
3297
|
placement: "bottom",
|
|
3298
|
+
visible: tooltipVisible,
|
|
3299
|
+
onVisibleChange: setTooltipVisible,
|
|
3282
3300
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3283
3301
|
type: "button",
|
|
3284
3302
|
disabled: props.disabled,
|
|
3285
|
-
onClick:
|
|
3303
|
+
onClick: () => {
|
|
3304
|
+
setTooltipVisible(false);
|
|
3305
|
+
props.onClick();
|
|
3306
|
+
},
|
|
3286
3307
|
className: (0, _univerjs_design.clsx)("univer-flex univer-h-6 univer-w-6 univer-items-center univer-justify-center univer-rounded-md univer-border-none univer-bg-transparent univer-p-0 univer-text-sm univer-text-gray-700 univer-transition-colors hover:univer-bg-gray-100 disabled:univer-cursor-not-allowed disabled:univer-opacity-40 dark:!univer-text-gray-100 dark:hover:!univer-bg-gray-700", { "univer-bg-gray-100 univer-text-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-primary-300": props.active }),
|
|
3287
3308
|
children: props.children
|
|
3288
3309
|
})
|
|
@@ -3290,10 +3311,14 @@ function ToolbarButton(props) {
|
|
|
3290
3311
|
}
|
|
3291
3312
|
function ToolbarDropdownButton(props) {
|
|
3292
3313
|
const [open, setOpen] = (0, react.useState)(false);
|
|
3314
|
+
const [tooltipVisible, setTooltipVisible] = (0, react.useState)(false);
|
|
3293
3315
|
const activeOption = props.options.find((option) => option.value === props.value) ?? props.options[0];
|
|
3294
3316
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Dropdown, {
|
|
3295
3317
|
open,
|
|
3296
|
-
onOpenChange:
|
|
3318
|
+
onOpenChange: (open) => {
|
|
3319
|
+
setOpen(open);
|
|
3320
|
+
if (open) setTooltipVisible(false);
|
|
3321
|
+
},
|
|
3297
3322
|
overlay: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3298
3323
|
className: "univer-min-w-32 univer-rounded-lg univer-border univer-border-solid univer-border-gray-200 univer-bg-gray-0 univer-p-1 univer-shadow-lg dark:!univer-border-gray-700 dark:!univer-bg-gray-900",
|
|
3299
3324
|
children: props.options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
@@ -3316,6 +3341,8 @@ function ToolbarDropdownButton(props) {
|
|
|
3316
3341
|
className: "univer-fill-mode-backwards univer-delay-100",
|
|
3317
3342
|
title: props.title,
|
|
3318
3343
|
placement: "bottom",
|
|
3344
|
+
visible: tooltipVisible && !open,
|
|
3345
|
+
onVisibleChange: (visible) => setTooltipVisible(visible && !open),
|
|
3319
3346
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
3320
3347
|
type: "button",
|
|
3321
3348
|
className: (0, _univerjs_design.clsx)("univer-flex univer-h-6 univer-min-w-9 univer-items-center univer-justify-center univer-gap-1 univer-rounded-md univer-border-none univer-bg-transparent univer-px-1.5 univer-text-sm univer-text-gray-700 univer-transition-colors hover:univer-bg-gray-100 dark:!univer-text-gray-100 dark:hover:!univer-bg-gray-700", { "univer-bg-gray-100 univer-text-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-primary-300": open }),
|
|
@@ -4439,7 +4466,7 @@ let ImageUpdateController = class ImageUpdateController extends _univerjs_core.D
|
|
|
4439
4466
|
const { unitId, subUnitId, drawingId } = param;
|
|
4440
4467
|
const drawingParam = this._drawingManagerService.getDrawingByParam(param);
|
|
4441
4468
|
if (drawingParam == null) return;
|
|
4442
|
-
const { transform, drawingType, srcRect, prstGeom, source, imageSourceType } = drawingParam;
|
|
4469
|
+
const { transform, drawingType, srcRect, prstGeom, source, imageSourceType, opacity } = drawingParam;
|
|
4443
4470
|
if (drawingType !== _univerjs_core.DrawingTypeEnum.DRAWING_IMAGE) return;
|
|
4444
4471
|
const renderObject = this._getSceneAndTransformerByDrawingSearch(unitId);
|
|
4445
4472
|
if (renderObject == null) return;
|
|
@@ -4468,6 +4495,7 @@ let ImageUpdateController = class ImageUpdateController extends _univerjs_core.D
|
|
|
4468
4495
|
ensureDrawingRenderLayer(scene, imageShape, drawingParam);
|
|
4469
4496
|
imageShape.setSrcRect(srcRect);
|
|
4470
4497
|
imageShape.setPrstGeom(prstGeom);
|
|
4498
|
+
syncImageOpacity(imageShape, opacity, this._currentUniverService.getUnitType(unitId) === _univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
4471
4499
|
if (source != null && source.length > 0 && (imageSourceType === _univerjs_core.ImageSourceType.BASE64 || imageSourceType === _univerjs_core.ImageSourceType.URL)) imageShape.changeSource(source);
|
|
4472
4500
|
});
|
|
4473
4501
|
}));
|
|
@@ -4495,6 +4523,9 @@ ImageUpdateController = __decorate([
|
|
|
4495
4523
|
__decorateParam(3, _univerjs_core.IUniverInstanceService),
|
|
4496
4524
|
__decorateParam(4, (0, _univerjs_core.Inject)(DrawingRenderService))
|
|
4497
4525
|
], ImageUpdateController);
|
|
4526
|
+
function syncImageOpacity(image, opacity, isSheet) {
|
|
4527
|
+
if (isSheet || opacity !== void 0) image.setOpacity((0, _univerjs_drawing.normalizeImageOpacity)(opacity));
|
|
4528
|
+
}
|
|
4498
4529
|
|
|
4499
4530
|
//#endregion
|
|
4500
4531
|
//#region src/controllers/ui.controller.ts
|
|
@@ -5250,8 +5281,8 @@ function ObjectDetailsEditor(props) {
|
|
|
5250
5281
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5251
5282
|
className: "univer-text-xs univer-text-gray-500 dark:!univer-text-gray-400",
|
|
5252
5283
|
children: labels.description
|
|
5253
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5254
|
-
className: (0, _univerjs_design.clsx)(
|
|
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),
|
|
5255
5286
|
value: draftDescription,
|
|
5256
5287
|
disabled,
|
|
5257
5288
|
placeholder: labels.descriptionPlaceholder,
|
|
@@ -5612,7 +5643,7 @@ exports.CloseImageCropOperation = CloseImageCropOperation;
|
|
|
5612
5643
|
exports.DRAWING_GROUP_TYPES = DRAWING_GROUP_TYPES;
|
|
5613
5644
|
exports.DrawingCommonPanel = DrawingCommonPanel;
|
|
5614
5645
|
exports.DrawingImageClipService = DrawingImageClipService;
|
|
5615
|
-
Object.defineProperty(exports,
|
|
5646
|
+
Object.defineProperty(exports, "DrawingRenderService", {
|
|
5616
5647
|
enumerable: true,
|
|
5617
5648
|
get: function () {
|
|
5618
5649
|
return DrawingRenderService;
|
|
@@ -5630,13 +5661,13 @@ exports.OpenImageCropOperation = OpenImageCropOperation;
|
|
|
5630
5661
|
exports.SetDrawingAlignOperation = SetDrawingAlignOperation;
|
|
5631
5662
|
exports.SetDrawingArrangeOperation = SetDrawingArrangeOperation;
|
|
5632
5663
|
exports.SetDrawingGroupOperation = SetDrawingGroupOperation;
|
|
5633
|
-
Object.defineProperty(exports,
|
|
5664
|
+
Object.defineProperty(exports, "UniverDrawingMobileUIPlugin", {
|
|
5634
5665
|
enumerable: true,
|
|
5635
5666
|
get: function () {
|
|
5636
5667
|
return UniverDrawingMobileUIPlugin;
|
|
5637
5668
|
}
|
|
5638
5669
|
});
|
|
5639
|
-
Object.defineProperty(exports,
|
|
5670
|
+
Object.defineProperty(exports, "UniverDrawingUIPlugin", {
|
|
5640
5671
|
enumerable: true,
|
|
5641
5672
|
get: function () {
|
|
5642
5673
|
return UniverDrawingUIPlugin;
|
package/lib/es/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ArrangeTypeEnum, BooleanNumber, CommandType, DependentOn, Disposable, DisposableCollection, DrawingTypeEnum, ICommandService, IConfigService, IImageIoService, IURLImageService, IUniverInstanceService, ImageSourceType, Inject, Injector, LocaleService, Plugin, PositionedObjectLayoutType, ThemeService, UniverInstanceType, checkIfMove, debounce, generateRandomId, merge, toDisposable } from "@univerjs/core";
|
|
2
|
-
import { DRAWING_GROUPABLE_TYPES, IDrawingManagerService, SetDrawingSelectedOperation, UniverDrawingPlugin, getDrawingShapeKeyByDrawingSearch, isGroupableDrawingType, resolveDrawingRotateEnabled } from "@univerjs/drawing";
|
|
2
|
+
import { DRAWING_GROUPABLE_TYPES, IDrawingManagerService, SetDrawingSelectedOperation, UniverDrawingPlugin, getDrawingShapeKeyByDrawingSearch, isGroupableDrawingType, normalizeImageOpacity, resolveDrawingRotateEnabled } from "@univerjs/drawing";
|
|
3
3
|
import { CURSOR_TYPE, Canvas, DRAWING_OBJECT_LAYER_INDEX, DrawingGroupObject, Group, IRenderManagerService, Image as Image$1, RENDER_CLASS_TYPE, Rect, Shape, UniverRenderEnginePlugin, Vector2, degToRad, getGroupState, precisionTo, transformObjectOutOfGroup } from "@univerjs/engine-render";
|
|
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
|
|
653
|
+
var version = "1.1.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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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);
|
|
@@ -784,7 +784,7 @@ let DrawingRenderService = class DrawingRenderService {
|
|
|
784
784
|
this._drawingImageClipService = _drawingImageClipService;
|
|
785
785
|
}
|
|
786
786
|
async renderImages(imageParam, scene, options) {
|
|
787
|
-
const { transform: singleTransform, drawingType, source, imageSourceType, srcRect, prstGeom, groupId, unitId, subUnitId, drawingId, isMultiTransform, transforms: multiTransforms, adjustValues, hidden } = imageParam;
|
|
787
|
+
const { transform: singleTransform, drawingType, source, imageSourceType, srcRect, prstGeom, groupId, unitId, subUnitId, drawingId, isMultiTransform, transforms: multiTransforms, adjustValues, hidden, opacity } = imageParam;
|
|
788
788
|
const { docxHeaderFooterDrawing, layoutType } = imageParam;
|
|
789
789
|
if (drawingType !== DrawingTypeEnum.DRAWING_IMAGE) return;
|
|
790
790
|
if (!this._drawingManagerService.getDrawingVisible()) return;
|
|
@@ -815,6 +815,7 @@ let DrawingRenderService = class DrawingRenderService {
|
|
|
815
815
|
skewY
|
|
816
816
|
});
|
|
817
817
|
(_setClipBounds = imageShape.setClipBounds) === null || _setClipBounds === void 0 || _setClipBounds.call(imageShape, transform.clipBounds);
|
|
818
|
+
if (this._univerInstanceService.getUnitType(unitId) === UniverInstanceType.UNIVER_SHEET || opacity !== void 0) imageShape.setOpacity(normalizeImageOpacity(opacity));
|
|
818
819
|
if ("hidden" in imageParam) hidden ? imageShape.hide() : imageShape.show();
|
|
819
820
|
ensureDrawingRenderLayer(scene, imageShape, imageParam);
|
|
820
821
|
continue;
|
|
@@ -823,6 +824,7 @@ let DrawingRenderService = class DrawingRenderService {
|
|
|
823
824
|
const zIndex = orders.indexOf(drawingId);
|
|
824
825
|
const imageConfig = {
|
|
825
826
|
...transform,
|
|
827
|
+
opacity: normalizeImageOpacity(opacity),
|
|
826
828
|
zIndex: zIndex === -1 ? orders.length - 1 : zIndex
|
|
827
829
|
};
|
|
828
830
|
const imageNativeCache = this._imageIoService.getImageSourceCache(source, imageSourceType);
|
|
@@ -1297,12 +1299,12 @@ let DrawingUpdateController = class DrawingUpdateController extends Disposable {
|
|
|
1297
1299
|
subUnitId,
|
|
1298
1300
|
drawingId
|
|
1299
1301
|
});
|
|
1300
|
-
const
|
|
1301
|
-
if (
|
|
1302
|
+
const drawingObjects = scene.fuzzyMathObjects(oKey, true);
|
|
1303
|
+
if (drawingObjects.length === 0) return;
|
|
1302
1304
|
const index = this._drawingManagerService.getDrawingOrder(unitId, subUnitId).indexOf(drawingId);
|
|
1303
|
-
for (const
|
|
1304
|
-
|
|
1305
|
-
|
|
1305
|
+
for (const object of drawingObjects) {
|
|
1306
|
+
object.zIndex = index;
|
|
1307
|
+
object.makeDirty();
|
|
1306
1308
|
}
|
|
1307
1309
|
});
|
|
1308
1310
|
}
|
|
@@ -1337,6 +1339,14 @@ let DrawingUpdateController = class DrawingUpdateController extends Disposable {
|
|
|
1337
1339
|
if (disposeDrawingRenderObject(scene, param)) {
|
|
1338
1340
|
var _scene$getTransformer2;
|
|
1339
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
|
+
}
|
|
1340
1350
|
}
|
|
1341
1351
|
});
|
|
1342
1352
|
}));
|
|
@@ -1383,7 +1393,6 @@ let DrawingUpdateController = class DrawingUpdateController extends Disposable {
|
|
|
1383
1393
|
_drawingRefreshListener() {
|
|
1384
1394
|
this.disposeWithMe(this._drawingManagerService.refreshTransform$.subscribe((params) => {
|
|
1385
1395
|
params.forEach((param) => {
|
|
1386
|
-
var _setClipBounds2;
|
|
1387
1396
|
const { unitId, subUnitId, drawingId } = param;
|
|
1388
1397
|
const renderObject = this._getSceneAndTransformerByDrawingSearch(unitId);
|
|
1389
1398
|
if (renderObject == null) return;
|
|
@@ -1392,38 +1401,44 @@ let DrawingUpdateController = class DrawingUpdateController extends Disposable {
|
|
|
1392
1401
|
const { transform } = drawingParam;
|
|
1393
1402
|
const { scene } = renderObject;
|
|
1394
1403
|
if (transform == null) return true;
|
|
1395
|
-
const drawingShapeKey = getDrawingShapeKeyByDrawingSearch({
|
|
1396
|
-
unitId,
|
|
1397
|
-
subUnitId,
|
|
1398
|
-
drawingId
|
|
1399
|
-
});
|
|
1400
|
-
const drawingShape = scene.getObjectIncludeInGroup(drawingShapeKey);
|
|
1401
1404
|
const drawingParamWithRefreshMetadata = mergeRefreshMetadata(drawingParam, param);
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
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({
|
|
1405
1411
|
unitId,
|
|
1406
1412
|
subUnitId,
|
|
1407
1413
|
drawingId
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
top,
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
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);
|
|
1422
1436
|
});
|
|
1423
|
-
(
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1437
|
+
if (hasMissingShape && drawingParamWithRefreshMetadata.hidden !== true) this._drawingManagerService.addNotification([{
|
|
1438
|
+
unitId,
|
|
1439
|
+
subUnitId,
|
|
1440
|
+
drawingId
|
|
1441
|
+
}]);
|
|
1427
1442
|
});
|
|
1428
1443
|
}));
|
|
1429
1444
|
}
|
|
@@ -3274,14 +3289,20 @@ function ToolbarGroup(props) {
|
|
|
3274
3289
|
});
|
|
3275
3290
|
}
|
|
3276
3291
|
function ToolbarButton(props) {
|
|
3292
|
+
const [tooltipVisible, setTooltipVisible] = useState(false);
|
|
3277
3293
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
3278
3294
|
className: "univer-fill-mode-backwards univer-delay-100",
|
|
3279
3295
|
title: props.title,
|
|
3280
3296
|
placement: "bottom",
|
|
3297
|
+
visible: tooltipVisible,
|
|
3298
|
+
onVisibleChange: setTooltipVisible,
|
|
3281
3299
|
children: /* @__PURE__ */ jsx("button", {
|
|
3282
3300
|
type: "button",
|
|
3283
3301
|
disabled: props.disabled,
|
|
3284
|
-
onClick:
|
|
3302
|
+
onClick: () => {
|
|
3303
|
+
setTooltipVisible(false);
|
|
3304
|
+
props.onClick();
|
|
3305
|
+
},
|
|
3285
3306
|
className: clsx("univer-flex univer-h-6 univer-w-6 univer-items-center univer-justify-center univer-rounded-md univer-border-none univer-bg-transparent univer-p-0 univer-text-sm univer-text-gray-700 univer-transition-colors hover:univer-bg-gray-100 disabled:univer-cursor-not-allowed disabled:univer-opacity-40 dark:!univer-text-gray-100 dark:hover:!univer-bg-gray-700", { "univer-bg-gray-100 univer-text-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-primary-300": props.active }),
|
|
3286
3307
|
children: props.children
|
|
3287
3308
|
})
|
|
@@ -3289,10 +3310,14 @@ function ToolbarButton(props) {
|
|
|
3289
3310
|
}
|
|
3290
3311
|
function ToolbarDropdownButton(props) {
|
|
3291
3312
|
const [open, setOpen] = useState(false);
|
|
3313
|
+
const [tooltipVisible, setTooltipVisible] = useState(false);
|
|
3292
3314
|
const activeOption = props.options.find((option) => option.value === props.value) ?? props.options[0];
|
|
3293
3315
|
return /* @__PURE__ */ jsx(Dropdown, {
|
|
3294
3316
|
open,
|
|
3295
|
-
onOpenChange:
|
|
3317
|
+
onOpenChange: (open) => {
|
|
3318
|
+
setOpen(open);
|
|
3319
|
+
if (open) setTooltipVisible(false);
|
|
3320
|
+
},
|
|
3296
3321
|
overlay: /* @__PURE__ */ jsx("div", {
|
|
3297
3322
|
className: "univer-min-w-32 univer-rounded-lg univer-border univer-border-solid univer-border-gray-200 univer-bg-gray-0 univer-p-1 univer-shadow-lg dark:!univer-border-gray-700 dark:!univer-bg-gray-900",
|
|
3298
3323
|
children: props.options.map((option) => /* @__PURE__ */ jsxs("button", {
|
|
@@ -3315,6 +3340,8 @@ function ToolbarDropdownButton(props) {
|
|
|
3315
3340
|
className: "univer-fill-mode-backwards univer-delay-100",
|
|
3316
3341
|
title: props.title,
|
|
3317
3342
|
placement: "bottom",
|
|
3343
|
+
visible: tooltipVisible && !open,
|
|
3344
|
+
onVisibleChange: (visible) => setTooltipVisible(visible && !open),
|
|
3318
3345
|
children: /* @__PURE__ */ jsxs("button", {
|
|
3319
3346
|
type: "button",
|
|
3320
3347
|
className: clsx("univer-flex univer-h-6 univer-min-w-9 univer-items-center univer-justify-center univer-gap-1 univer-rounded-md univer-border-none univer-bg-transparent univer-px-1.5 univer-text-sm univer-text-gray-700 univer-transition-colors hover:univer-bg-gray-100 dark:!univer-text-gray-100 dark:hover:!univer-bg-gray-700", { "univer-bg-gray-100 univer-text-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-primary-300": open }),
|
|
@@ -4438,7 +4465,7 @@ let ImageUpdateController = class ImageUpdateController extends Disposable {
|
|
|
4438
4465
|
const { unitId, subUnitId, drawingId } = param;
|
|
4439
4466
|
const drawingParam = this._drawingManagerService.getDrawingByParam(param);
|
|
4440
4467
|
if (drawingParam == null) return;
|
|
4441
|
-
const { transform, drawingType, srcRect, prstGeom, source, imageSourceType } = drawingParam;
|
|
4468
|
+
const { transform, drawingType, srcRect, prstGeom, source, imageSourceType, opacity } = drawingParam;
|
|
4442
4469
|
if (drawingType !== DrawingTypeEnum.DRAWING_IMAGE) return;
|
|
4443
4470
|
const renderObject = this._getSceneAndTransformerByDrawingSearch(unitId);
|
|
4444
4471
|
if (renderObject == null) return;
|
|
@@ -4467,6 +4494,7 @@ let ImageUpdateController = class ImageUpdateController extends Disposable {
|
|
|
4467
4494
|
ensureDrawingRenderLayer(scene, imageShape, drawingParam);
|
|
4468
4495
|
imageShape.setSrcRect(srcRect);
|
|
4469
4496
|
imageShape.setPrstGeom(prstGeom);
|
|
4497
|
+
syncImageOpacity(imageShape, opacity, this._currentUniverService.getUnitType(unitId) === UniverInstanceType.UNIVER_SHEET);
|
|
4470
4498
|
if (source != null && source.length > 0 && (imageSourceType === ImageSourceType.BASE64 || imageSourceType === ImageSourceType.URL)) imageShape.changeSource(source);
|
|
4471
4499
|
});
|
|
4472
4500
|
}));
|
|
@@ -4494,6 +4522,9 @@ ImageUpdateController = __decorate([
|
|
|
4494
4522
|
__decorateParam(3, IUniverInstanceService),
|
|
4495
4523
|
__decorateParam(4, Inject(DrawingRenderService))
|
|
4496
4524
|
], ImageUpdateController);
|
|
4525
|
+
function syncImageOpacity(image, opacity, isSheet) {
|
|
4526
|
+
if (isSheet || opacity !== void 0) image.setOpacity(normalizeImageOpacity(opacity));
|
|
4527
|
+
}
|
|
4497
4528
|
|
|
4498
4529
|
//#endregion
|
|
4499
4530
|
//#region src/controllers/ui.controller.ts
|
|
@@ -5249,8 +5280,8 @@ function ObjectDetailsEditor(props) {
|
|
|
5249
5280
|
children: [/* @__PURE__ */ jsx("span", {
|
|
5250
5281
|
className: "univer-text-xs univer-text-gray-500 dark:!univer-text-gray-400",
|
|
5251
5282
|
children: labels.description
|
|
5252
|
-
}), /* @__PURE__ */ jsx(
|
|
5253
|
-
className: clsx(
|
|
5283
|
+
}), /* @__PURE__ */ jsx(Textarea, {
|
|
5284
|
+
className: clsx("univer-min-h-16 univer-resize-none univer-text-sm", descriptionClassName),
|
|
5254
5285
|
value: draftDescription,
|
|
5255
5286
|
disabled,
|
|
5256
5287
|
placeholder: labels.descriptionPlaceholder,
|
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;
|