@univerjs/drawing-ui 0.24.0 → 0.25.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.
Files changed (91) hide show
  1. package/lib/cjs/index.js +309 -56
  2. package/lib/cjs/locale/ar-SA.js +74 -0
  3. package/lib/cjs/locale/ca-ES.js +27 -19
  4. package/lib/cjs/locale/de-DE.js +74 -0
  5. package/lib/cjs/locale/en-US.js +27 -19
  6. package/lib/cjs/locale/es-ES.js +27 -19
  7. package/lib/cjs/locale/fa-IR.js +27 -19
  8. package/lib/cjs/locale/fr-FR.js +27 -19
  9. package/lib/cjs/locale/id-ID.js +74 -0
  10. package/lib/cjs/locale/it-IT.js +74 -0
  11. package/lib/cjs/locale/ja-JP.js +27 -19
  12. package/lib/cjs/locale/ko-KR.js +27 -19
  13. package/lib/cjs/locale/pl-PL.js +74 -0
  14. package/lib/cjs/locale/pt-BR.js +74 -0
  15. package/lib/cjs/locale/ru-RU.js +27 -19
  16. package/lib/cjs/locale/sk-SK.js +27 -19
  17. package/lib/cjs/locale/vi-VN.js +27 -19
  18. package/lib/cjs/locale/zh-CN.js +27 -19
  19. package/lib/cjs/locale/zh-HK.js +74 -0
  20. package/lib/cjs/locale/zh-TW.js +27 -19
  21. package/lib/es/index.js +312 -59
  22. package/lib/es/locale/ar-SA.js +73 -0
  23. package/lib/es/locale/ca-ES.js +27 -19
  24. package/lib/es/locale/de-DE.js +73 -0
  25. package/lib/es/locale/en-US.js +27 -19
  26. package/lib/es/locale/es-ES.js +27 -19
  27. package/lib/es/locale/fa-IR.js +27 -19
  28. package/lib/es/locale/fr-FR.js +27 -19
  29. package/lib/es/locale/id-ID.js +73 -0
  30. package/lib/es/locale/it-IT.js +73 -0
  31. package/lib/es/locale/ja-JP.js +27 -19
  32. package/lib/es/locale/ko-KR.js +27 -19
  33. package/lib/es/locale/pl-PL.js +73 -0
  34. package/lib/es/locale/pt-BR.js +73 -0
  35. package/lib/es/locale/ru-RU.js +27 -19
  36. package/lib/es/locale/sk-SK.js +27 -19
  37. package/lib/es/locale/vi-VN.js +27 -19
  38. package/lib/es/locale/zh-CN.js +27 -19
  39. package/lib/es/locale/zh-HK.js +73 -0
  40. package/lib/es/locale/zh-TW.js +27 -19
  41. package/lib/index.css +183 -0
  42. package/lib/index.js +312 -59
  43. package/lib/locale/ar-SA.js +73 -0
  44. package/lib/locale/ca-ES.js +27 -19
  45. package/lib/locale/de-DE.js +73 -0
  46. package/lib/locale/en-US.js +27 -19
  47. package/lib/locale/es-ES.js +27 -19
  48. package/lib/locale/fa-IR.js +27 -19
  49. package/lib/locale/fr-FR.js +27 -19
  50. package/lib/locale/id-ID.js +73 -0
  51. package/lib/locale/it-IT.js +73 -0
  52. package/lib/locale/ja-JP.js +27 -19
  53. package/lib/locale/ko-KR.js +27 -19
  54. package/lib/locale/pl-PL.js +73 -0
  55. package/lib/locale/pt-BR.js +73 -0
  56. package/lib/locale/ru-RU.js +27 -19
  57. package/lib/locale/sk-SK.js +27 -19
  58. package/lib/locale/vi-VN.js +27 -19
  59. package/lib/locale/zh-CN.js +27 -19
  60. package/lib/locale/zh-HK.js +73 -0
  61. package/lib/locale/zh-TW.js +27 -19
  62. package/lib/types/locale/ar-SA.d.ts +18 -0
  63. package/lib/types/locale/de-DE.d.ts +18 -0
  64. package/lib/types/locale/en-US.d.ts +63 -53
  65. package/lib/types/locale/id-ID.d.ts +18 -0
  66. package/lib/types/locale/it-IT.d.ts +18 -0
  67. package/lib/types/locale/pl-PL.d.ts +18 -0
  68. package/lib/types/locale/pt-BR.d.ts +18 -0
  69. package/lib/types/locale/zh-HK.d.ts +18 -0
  70. package/lib/types/views/image-popup-menu/ImagePopupMenu.d.ts +5 -2
  71. package/lib/umd/index.js +4 -1
  72. package/lib/umd/locale/ar-SA.js +1 -0
  73. package/lib/umd/locale/ca-ES.js +1 -1
  74. package/lib/umd/locale/de-DE.js +1 -0
  75. package/lib/umd/locale/en-US.js +1 -1
  76. package/lib/umd/locale/es-ES.js +1 -1
  77. package/lib/umd/locale/fa-IR.js +1 -1
  78. package/lib/umd/locale/fr-FR.js +1 -1
  79. package/lib/umd/locale/id-ID.js +1 -0
  80. package/lib/umd/locale/it-IT.js +1 -0
  81. package/lib/umd/locale/ja-JP.js +1 -1
  82. package/lib/umd/locale/ko-KR.js +1 -1
  83. package/lib/umd/locale/pl-PL.js +1 -0
  84. package/lib/umd/locale/pt-BR.js +1 -0
  85. package/lib/umd/locale/ru-RU.js +1 -1
  86. package/lib/umd/locale/sk-SK.js +1 -1
  87. package/lib/umd/locale/vi-VN.js +1 -1
  88. package/lib/umd/locale/zh-CN.js +1 -1
  89. package/lib/umd/locale/zh-HK.js +1 -0
  90. package/lib/umd/locale/zh-TW.js +1 -1
  91. package/package.json +9 -9
package/lib/cjs/index.js CHANGED
@@ -322,7 +322,7 @@ function getCurrentUnitInfo(currentUniverService, propUnitId) {
322
322
  //#endregion
323
323
  //#region package.json
324
324
  var name = "@univerjs/drawing-ui";
325
- var version = "0.24.0";
325
+ var version = "0.25.0";
326
326
 
327
327
  //#endregion
328
328
  //#region src/config/config.ts
@@ -354,7 +354,7 @@ function DrawingAlignContextMenuItemFactory(accessor) {
354
354
  id: DRAWING_ALIGN_CONTEXT_MENU_ID,
355
355
  type: _univerjs_ui.MenuItemType.SUBITEMS,
356
356
  icon: "HorizontallyIcon",
357
- title: "image-panel.align.title",
357
+ title: "drawing-ui.image-panel.align.title",
358
358
  hidden$: getMenuStateByDrawingFocusChangedObservable$$1(accessor)
359
359
  };
360
360
  }
@@ -363,7 +363,7 @@ function SetDrawingAlignLeftMenuItemFactory() {
363
363
  id: SetDrawingAlignLeftOperation.id,
364
364
  type: _univerjs_ui.MenuItemType.BUTTON,
365
365
  icon: "LeftJustifyingIcon",
366
- title: "image-panel.align.left"
366
+ title: "drawing-ui.image-panel.align.left"
367
367
  };
368
368
  }
369
369
  function SetDrawingAlignCenterMenuItemFactory() {
@@ -371,7 +371,7 @@ function SetDrawingAlignCenterMenuItemFactory() {
371
371
  id: SetDrawingAlignCenterOperation.id,
372
372
  type: _univerjs_ui.MenuItemType.BUTTON,
373
373
  icon: "HorizontallyIcon",
374
- title: "image-panel.align.center"
374
+ title: "drawing-ui.image-panel.align.center"
375
375
  };
376
376
  }
377
377
  function SetDrawingAlignRightMenuItemFactory() {
@@ -379,7 +379,7 @@ function SetDrawingAlignRightMenuItemFactory() {
379
379
  id: SetDrawingAlignRightOperation.id,
380
380
  type: _univerjs_ui.MenuItemType.BUTTON,
381
381
  icon: "RightJustifyingIcon",
382
- title: "image-panel.align.right"
382
+ title: "drawing-ui.image-panel.align.right"
383
383
  };
384
384
  }
385
385
  function SetDrawingAlignTopMenuItemFactory() {
@@ -387,7 +387,7 @@ function SetDrawingAlignTopMenuItemFactory() {
387
387
  id: SetDrawingAlignTopOperation.id,
388
388
  type: _univerjs_ui.MenuItemType.BUTTON,
389
389
  icon: "AlignTopIcon",
390
- title: "image-panel.align.top"
390
+ title: "drawing-ui.image-panel.align.top"
391
391
  };
392
392
  }
393
393
  function SetDrawingAlignMiddleMenuItemFactory() {
@@ -395,7 +395,7 @@ function SetDrawingAlignMiddleMenuItemFactory() {
395
395
  id: SetDrawingAlignMiddleOperation.id,
396
396
  type: _univerjs_ui.MenuItemType.BUTTON,
397
397
  icon: "VerticalCenterIcon",
398
- title: "image-panel.align.middle"
398
+ title: "drawing-ui.image-panel.align.middle"
399
399
  };
400
400
  }
401
401
  function SetDrawingAlignBottomMenuItemFactory() {
@@ -403,7 +403,7 @@ function SetDrawingAlignBottomMenuItemFactory() {
403
403
  id: SetDrawingAlignBottomOperation.id,
404
404
  type: _univerjs_ui.MenuItemType.BUTTON,
405
405
  icon: "AlignBottomIcon",
406
- title: "image-panel.align.bottom"
406
+ title: "drawing-ui.image-panel.align.bottom"
407
407
  };
408
408
  }
409
409
  function SetDrawingAlignHorizonMenuItemFactory() {
@@ -411,7 +411,7 @@ function SetDrawingAlignHorizonMenuItemFactory() {
411
411
  id: SetDrawingAlignHorizonOperation.id,
412
412
  type: _univerjs_ui.MenuItemType.BUTTON,
413
413
  icon: "HorizontallyIcon",
414
- title: "image-panel.align.horizon"
414
+ title: "drawing-ui.image-panel.align.horizon"
415
415
  };
416
416
  }
417
417
  function SetDrawingAlignVerticalMenuItemFactory() {
@@ -419,7 +419,7 @@ function SetDrawingAlignVerticalMenuItemFactory() {
419
419
  id: SetDrawingAlignVerticalOperation.id,
420
420
  type: _univerjs_ui.MenuItemType.BUTTON,
421
421
  icon: "VerticalCenterIcon",
422
- title: "image-panel.align.vertical"
422
+ title: "drawing-ui.image-panel.align.vertical"
423
423
  };
424
424
  }
425
425
 
@@ -431,7 +431,7 @@ function DrawingArrangeContextMenuItemFactory() {
431
431
  id: DRAWING_ARRANGE_CONTEXT_MENU_ID,
432
432
  type: _univerjs_ui.MenuItemType.SUBITEMS,
433
433
  icon: "TopmostIcon",
434
- title: "image-panel.arrange.title"
434
+ title: "drawing-ui.image-panel.arrange.title"
435
435
  };
436
436
  }
437
437
  function SetDrawingArrangeFrontMenuItemFactory() {
@@ -439,7 +439,7 @@ function SetDrawingArrangeFrontMenuItemFactory() {
439
439
  id: SetDrawingArrangeFrontOperation.id,
440
440
  type: _univerjs_ui.MenuItemType.BUTTON,
441
441
  icon: "TopmostIcon",
442
- title: "image-panel.arrange.front"
442
+ title: "drawing-ui.image-panel.arrange.front"
443
443
  };
444
444
  }
445
445
  function SetDrawingArrangeForwardMenuItemFactory() {
@@ -447,7 +447,7 @@ function SetDrawingArrangeForwardMenuItemFactory() {
447
447
  id: SetDrawingArrangeForwardOperation.id,
448
448
  type: _univerjs_ui.MenuItemType.BUTTON,
449
449
  icon: "MoveUpIcon",
450
- title: "image-panel.arrange.forward"
450
+ title: "drawing-ui.image-panel.arrange.forward"
451
451
  };
452
452
  }
453
453
  function SetDrawingArrangeBackMenuItemFactory() {
@@ -455,7 +455,7 @@ function SetDrawingArrangeBackMenuItemFactory() {
455
455
  id: SetDrawingArrangeBackOperation.id,
456
456
  type: _univerjs_ui.MenuItemType.BUTTON,
457
457
  icon: "BottomIcon",
458
- title: "image-panel.arrange.back"
458
+ title: "drawing-ui.image-panel.arrange.back"
459
459
  };
460
460
  }
461
461
  function SetDrawingArrangeBackwardMenuItemFactory() {
@@ -463,7 +463,7 @@ function SetDrawingArrangeBackwardMenuItemFactory() {
463
463
  id: SetDrawingArrangeBackwardOperation.id,
464
464
  type: _univerjs_ui.MenuItemType.BUTTON,
465
465
  icon: "MoveDownIcon",
466
- title: "image-panel.arrange.backward"
466
+ title: "drawing-ui.image-panel.arrange.backward"
467
467
  };
468
468
  }
469
469
 
@@ -496,7 +496,7 @@ function DrawingGroupContextMenuItemFactory(accessor) {
496
496
  id: DRAWING_GROUP_CONTEXT_MENU_ID,
497
497
  type: _univerjs_ui.MenuItemType.SUBITEMS,
498
498
  icon: "GroupIcon",
499
- title: "image-panel.group.title",
499
+ title: "drawing-ui.image-panel.group.title",
500
500
  hidden$: getMenuStateByDrawingFocusChangedObservable$(accessor)
501
501
  };
502
502
  }
@@ -505,7 +505,7 @@ function SetDrawingGroupMenuItemFactory(accessor) {
505
505
  id: SetDrawingGroupOperation.id,
506
506
  type: _univerjs_ui.MenuItemType.BUTTON,
507
507
  icon: "GroupIcon",
508
- title: "image-panel.group.group",
508
+ title: "drawing-ui.image-panel.group.group",
509
509
  disabled$: getMenuStateByDrawingFocusChangedObservable$(accessor, "group")
510
510
  };
511
511
  }
@@ -514,7 +514,7 @@ function CancelDrawingGroupMenuItemFactory(accessor) {
514
514
  id: CancelDrawingGroupOperation.id,
515
515
  type: _univerjs_ui.MenuItemType.BUTTON,
516
516
  icon: "UngroupIcon",
517
- title: "image-panel.group.unGroup",
517
+ title: "drawing-ui.image-panel.group.unGroup",
518
518
  disabled$: getMenuStateByDrawingFocusChangedObservable$(accessor, "unGroup")
519
519
  };
520
520
  }
@@ -614,10 +614,16 @@ const COMPONENT_IMAGE_POPUP_MENU = "COMPONENT_IMAGE_POPUP_MENU";
614
614
  //#endregion
615
615
  //#region src/views/image-popup-menu/ImagePopupMenu.tsx
616
616
  function ImagePopupMenu(props) {
617
- var _popup$extraProps;
617
+ var _popup$extraProps, _popup$extraProps2;
618
618
  const { popup } = props;
619
619
  const menuItems = popup === null || popup === void 0 || (_popup$extraProps = popup.extraProps) === null || _popup$extraProps === void 0 ? void 0 : _popup$extraProps.menuItems;
620
620
  if (!menuItems) return null;
621
+ if (((_popup$extraProps2 = popup.extraProps) === null || _popup$extraProps2 === void 0 ? void 0 : _popup$extraProps2.variant) === "doc-floating-toolbar" && popup.extraProps.unitId && popup.extraProps.subUnitId && popup.extraProps.drawingId) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DocImageFloatingToolbar, {
622
+ menuItems,
623
+ unitId: popup.extraProps.unitId,
624
+ subUnitId: popup.extraProps.subUnitId,
625
+ drawingId: popup.extraProps.drawingId
626
+ });
621
627
  const commandService = (0, _univerjs_ui.useDependency)(_univerjs_core.ICommandService);
622
628
  const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
623
629
  const [visible, setVisible] = (0, react.useState)(false);
@@ -659,9 +665,256 @@ function ImagePopupMenu(props) {
659
665
  })
660
666
  });
661
667
  }
668
+ const UPDATE_DOC_DRAWING_WRAPPING_STYLE_COMMAND_ID = "doc.command.update-doc-drawing-wrapping-style";
669
+ function getWrappingStyle(documentDataModel, drawingId) {
670
+ var _documentDataModel$ge;
671
+ const drawing = documentDataModel === null || documentDataModel === void 0 || (_documentDataModel$ge = documentDataModel.getSnapshot().drawings) === null || _documentDataModel$ge === void 0 ? void 0 : _documentDataModel$ge[drawingId];
672
+ if (!drawing) return "inline";
673
+ if (drawing.layoutType === _univerjs_core.PositionedObjectLayoutType.WRAP_NONE) return drawing.behindDoc === _univerjs_core.BooleanNumber.TRUE ? "behindText" : "inFrontOfText";
674
+ if (drawing.layoutType === _univerjs_core.PositionedObjectLayoutType.WRAP_SQUARE) return "wrapSquare";
675
+ if (drawing.layoutType === _univerjs_core.PositionedObjectLayoutType.WRAP_TOP_AND_BOTTOM) return "wrapTopAndBottom";
676
+ return "inline";
677
+ }
678
+ function Divider() {
679
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "\n univer-h-5 univer-w-px univer-bg-gray-200\n dark:!univer-bg-gray-700\n " });
680
+ }
681
+ function ToolbarGroup(props) {
682
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
683
+ className: "univer-flex univer-h-7 univer-items-center univer-gap-1 univer-px-1",
684
+ children: props.children
685
+ });
686
+ }
687
+ function ToolbarButton(props) {
688
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
689
+ title: props.title,
690
+ placement: "bottom",
691
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
692
+ type: "button",
693
+ disabled: props.disabled,
694
+ onClick: props.onClick,
695
+ 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 }),
696
+ children: props.children
697
+ })
698
+ });
699
+ }
700
+ function TextWrapShapeIcon() {
701
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
702
+ viewBox: "0 0 20 20",
703
+ width: "1em",
704
+ height: "1em",
705
+ fill: "none",
706
+ "aria-hidden": "true",
707
+ children: [
708
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
709
+ d: "M2.5 4.5H8.2",
710
+ stroke: "currentColor",
711
+ strokeWidth: "1.4",
712
+ strokeLinecap: "round"
713
+ }),
714
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
715
+ d: "M11.8 4.5H17.5",
716
+ stroke: "currentColor",
717
+ strokeWidth: "1.4",
718
+ strokeLinecap: "round"
719
+ }),
720
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
721
+ d: "M2.5 10H5.7",
722
+ stroke: "currentColor",
723
+ strokeWidth: "1.4",
724
+ strokeLinecap: "round"
725
+ }),
726
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
727
+ d: "M14.3 10H17.5",
728
+ stroke: "currentColor",
729
+ strokeWidth: "1.4",
730
+ strokeLinecap: "round"
731
+ }),
732
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
733
+ d: "M2.5 15.5H8.2",
734
+ stroke: "currentColor",
735
+ strokeWidth: "1.4",
736
+ strokeLinecap: "round"
737
+ }),
738
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
739
+ d: "M11.8 15.5H17.5",
740
+ stroke: "currentColor",
741
+ strokeWidth: "1.4",
742
+ strokeLinecap: "round"
743
+ }),
744
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
745
+ x: "6.8",
746
+ y: "7",
747
+ width: "6.4",
748
+ height: "6",
749
+ rx: "1",
750
+ stroke: "currentColor",
751
+ strokeWidth: "1.4"
752
+ })
753
+ ]
754
+ });
755
+ }
756
+ function CropIcon() {
757
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
758
+ viewBox: "0 0 20 20",
759
+ width: "1em",
760
+ height: "1em",
761
+ fill: "none",
762
+ "aria-hidden": "true",
763
+ children: [
764
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
765
+ d: "M5 2.8V12.5C5 13.9 6.1 15 7.5 15H17.2",
766
+ stroke: "currentColor",
767
+ strokeWidth: "1.5",
768
+ strokeLinecap: "round"
769
+ }),
770
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
771
+ d: "M2.8 5H12.5C13.9 5 15 6.1 15 7.5V17.2",
772
+ stroke: "currentColor",
773
+ strokeWidth: "1.5",
774
+ strokeLinecap: "round"
775
+ }),
776
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
777
+ d: "M8.3 8.3H11.7V11.7H8.3V8.3Z",
778
+ stroke: "currentColor",
779
+ strokeWidth: "1.2"
780
+ })
781
+ ]
782
+ });
783
+ }
784
+ function ToolbarDropdownButton(props) {
785
+ var _props$options$find;
786
+ const [open, setOpen] = (0, react.useState)(false);
787
+ const activeOption = (_props$options$find = props.options.find((option) => option.value === props.value)) !== null && _props$options$find !== void 0 ? _props$options$find : props.options[0];
788
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Dropdown, {
789
+ open,
790
+ onOpenChange: setOpen,
791
+ overlay: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
792
+ className: "univer-min-w-32 univer-rounded-lg univer-border univer-border-solid univer-border-gray-200 univer-bg-white univer-p-1 univer-shadow-lg dark:!univer-border-gray-700 dark:!univer-bg-gray-900",
793
+ children: props.options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
794
+ type: "button",
795
+ onClick: () => {
796
+ props.onChange(option.value);
797
+ setOpen(false);
798
+ },
799
+ className: (0, _univerjs_design.clsx)("univer-flex univer-h-8 univer-w-full univer-items-center univer-gap-2 univer-rounded-md univer-border-none univer-bg-transparent univer-px-2 univer-text-left 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-800", { "univer-bg-primary-50 univer-text-primary-600 dark:!univer-bg-gray-800 dark:!univer-text-primary-300": option.value === props.value }),
800
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
801
+ className: "univer-flex univer-size-4 univer-items-center univer-justify-center",
802
+ children: option.icon
803
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
804
+ className: "univer-flex-1",
805
+ children: option.label
806
+ })]
807
+ }, option.value))
808
+ }),
809
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
810
+ title: props.title,
811
+ placement: "bottom",
812
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
813
+ type: "button",
814
+ 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 }),
815
+ children: [activeOption.icon, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.MoreDownIcon, { className: "univer-text-xs" })]
816
+ })
817
+ }) })
818
+ });
819
+ }
820
+ function DocImageFloatingToolbar(props) {
821
+ var _univerInstanceServic, _wrappingStyleOptions, _wrappingStyleOptions2;
822
+ const commandService = (0, _univerjs_ui.useDependency)(_univerjs_core.ICommandService);
823
+ const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
824
+ const documentDataModel = (_univerInstanceServic = (0, _univerjs_ui.useDependency)(_univerjs_core.IUniverInstanceService).getUnit(props.unitId, _univerjs_core.UniverInstanceType.UNIVER_DOC)) !== null && _univerInstanceServic !== void 0 ? _univerInstanceServic : void 0;
825
+ const [wrappingStyle, setWrappingStyle] = (0, react.useState)(() => getWrappingStyle(documentDataModel, props.drawingId));
826
+ const [hidden, setHidden] = (0, react.useState)(false);
827
+ const getMenuItem = (label) => props.menuItems.find((item) => item.label === label);
828
+ const editItem = getMenuItem("drawing-ui.image-popup.edit");
829
+ const cropItem = getMenuItem("drawing-ui.image-popup.crop");
830
+ const deleteItem = getMenuItem("drawing-ui.image-popup.delete");
831
+ const wrappingStyleOptions = [
832
+ {
833
+ label: localeService.t("drawing-ui.image-text-wrap.inline"),
834
+ value: "inline",
835
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextWrapShapeIcon, {})
836
+ },
837
+ {
838
+ label: localeService.t("drawing-ui.image-text-wrap.square"),
839
+ value: "wrapSquare",
840
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextWrapShapeIcon, {})
841
+ },
842
+ {
843
+ label: localeService.t("drawing-ui.image-text-wrap.topAndBottom"),
844
+ value: "wrapTopAndBottom",
845
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextWrapShapeIcon, {})
846
+ },
847
+ {
848
+ label: localeService.t("drawing-ui.image-text-wrap.behindText"),
849
+ value: "behindText",
850
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextWrapShapeIcon, {})
851
+ },
852
+ {
853
+ label: localeService.t("drawing-ui.image-text-wrap.inFrontText"),
854
+ value: "inFrontOfText",
855
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextWrapShapeIcon, {})
856
+ }
857
+ ];
858
+ const executeMenuItem = (item) => {
859
+ if (!item || item.disable) return;
860
+ commandService.executeCommand(item.commandId, item.commandParams);
861
+ };
862
+ const updateWrappingStyle = (value) => {
863
+ setWrappingStyle(value);
864
+ commandService.executeCommand(UPDATE_DOC_DRAWING_WRAPPING_STYLE_COMMAND_ID, {
865
+ unitId: props.unitId,
866
+ subUnitId: props.subUnitId,
867
+ drawings: [{
868
+ unitId: props.unitId,
869
+ subUnitId: props.subUnitId,
870
+ drawingId: props.drawingId
871
+ }],
872
+ wrappingStyle: value
873
+ });
874
+ };
875
+ if (hidden) return null;
876
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
877
+ "data-u-comp": "doc-image-floating-toolbar",
878
+ onMouseDown: (event) => {
879
+ event.stopPropagation();
880
+ event.preventDefault();
881
+ },
882
+ className: (0, _univerjs_design.clsx)("univer-box-border univer-flex univer-items-center univer-rounded univer-bg-white univer-px-1 univer-py-1 univer-shadow-sm dark:!univer-border-gray-700 dark:!univer-bg-gray-900", _univerjs_design.borderClassName),
883
+ children: [
884
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarGroup, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarDropdownButton, {
885
+ title: (_wrappingStyleOptions = (_wrappingStyleOptions2 = wrappingStyleOptions.find((option) => option.value === wrappingStyle)) === null || _wrappingStyleOptions2 === void 0 ? void 0 : _wrappingStyleOptions2.label) !== null && _wrappingStyleOptions !== void 0 ? _wrappingStyleOptions : localeService.t("drawing-ui.image-text-wrap.inline"),
886
+ value: wrappingStyle,
887
+ options: wrappingStyleOptions,
888
+ onChange: updateWrappingStyle
889
+ }) }),
890
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Divider, {}),
891
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ToolbarGroup, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarButton, {
892
+ title: editItem ? localeService.t(editItem.label) : localeService.t("drawing-ui.image-popup.edit"),
893
+ disabled: !editItem || editItem.disable,
894
+ onClick: () => {
895
+ setHidden(true);
896
+ executeMenuItem(editItem);
897
+ },
898
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.DocSettingIcon, {})
899
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarButton, {
900
+ title: cropItem ? localeService.t(cropItem.label) : localeService.t("drawing-ui.image-popup.crop"),
901
+ disabled: !cropItem || cropItem.disable,
902
+ onClick: () => executeMenuItem(cropItem),
903
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CropIcon, {})
904
+ })] }),
905
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Divider, {}),
906
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarGroup, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarButton, {
907
+ title: deleteItem ? localeService.t(deleteItem.label) : localeService.t("drawing-ui.image-popup.delete"),
908
+ disabled: !deleteItem || deleteItem.disable,
909
+ onClick: () => executeMenuItem(deleteItem),
910
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.DeleteIcon, {})
911
+ }) })
912
+ ]
913
+ });
914
+ }
662
915
 
663
916
  //#endregion
664
- //#region \0@oxc-project+runtime@0.129.0/helpers/decorateParam.js
917
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorateParam.js
665
918
  function __decorateParam(paramIndex, decorator) {
666
919
  return function(target, key) {
667
920
  decorator(target, key, paramIndex);
@@ -669,7 +922,7 @@ function __decorateParam(paramIndex, decorator) {
669
922
  }
670
923
 
671
924
  //#endregion
672
- //#region \0@oxc-project+runtime@0.129.0/helpers/decorate.js
925
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorate.js
673
926
  function __decorate(decorators, target, key, desc) {
674
927
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
675
928
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -786,7 +1039,7 @@ function getUpdateParams(objects, drawingManagerService) {
786
1039
  }
787
1040
 
788
1041
  //#endregion
789
- //#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
1042
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/typeof.js
790
1043
  function _typeof(o) {
791
1044
  "@babel/helpers - typeof";
792
1045
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -797,7 +1050,7 @@ function _typeof(o) {
797
1050
  }
798
1051
 
799
1052
  //#endregion
800
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
1053
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPrimitive.js
801
1054
  function toPrimitive(t, r) {
802
1055
  if ("object" != _typeof(t) || !t) return t;
803
1056
  var e = t[Symbol.toPrimitive];
@@ -810,14 +1063,14 @@ function toPrimitive(t, r) {
810
1063
  }
811
1064
 
812
1065
  //#endregion
813
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
1066
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPropertyKey.js
814
1067
  function toPropertyKey(t) {
815
1068
  var i = toPrimitive(t, "string");
816
1069
  return "symbol" == _typeof(i) ? i : i + "";
817
1070
  }
818
1071
 
819
1072
  //#endregion
820
- //#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
1073
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/defineProperty.js
821
1074
  function _defineProperty(e, r, t) {
822
1075
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
823
1076
  value: t,
@@ -1499,7 +1752,7 @@ let ImageCropperController = class ImageCropperController extends _univerjs_core
1499
1752
  if (!(imageShape instanceof _univerjs_engine_render.Image)) {
1500
1753
  this._messageService.show({
1501
1754
  type: _univerjs_design.MessageType.Error,
1502
- content: this._localeService.t("image-cropper.error")
1755
+ content: this._localeService.t("drawing-ui.image-cropper.error")
1503
1756
  });
1504
1757
  return;
1505
1758
  }
@@ -1600,7 +1853,7 @@ let ImageCropperController = class ImageCropperController extends _univerjs_core
1600
1853
  if (!(imageShape instanceof _univerjs_engine_render.Image)) {
1601
1854
  this._messageService.show({
1602
1855
  type: _univerjs_design.MessageType.Error,
1603
- content: this._localeService.t("image-cropper.error")
1856
+ content: this._localeService.t("drawing-ui.image-cropper.error")
1604
1857
  });
1605
1858
  return;
1606
1859
  }
@@ -2199,42 +2452,42 @@ const DrawingAlign = (props) => {
2199
2452
  const [alignValue, setAlignValue] = (0, react.useState)("0");
2200
2453
  const alignOptions = [
2201
2454
  {
2202
- label: localeService.t("image-panel.align.default"),
2455
+ label: localeService.t("drawing-ui.image-panel.align.default"),
2203
2456
  value: "0"
2204
2457
  },
2205
2458
  { options: [
2206
2459
  {
2207
- label: localeService.t("image-panel.align.left"),
2460
+ label: localeService.t("drawing-ui.image-panel.align.left"),
2208
2461
  value: "1"
2209
2462
  },
2210
2463
  {
2211
- label: localeService.t("image-panel.align.center"),
2464
+ label: localeService.t("drawing-ui.image-panel.align.center"),
2212
2465
  value: "2"
2213
2466
  },
2214
2467
  {
2215
- label: localeService.t("image-panel.align.right"),
2468
+ label: localeService.t("drawing-ui.image-panel.align.right"),
2216
2469
  value: "3"
2217
2470
  }
2218
2471
  ] },
2219
2472
  { options: [
2220
2473
  {
2221
- label: localeService.t("image-panel.align.top"),
2474
+ label: localeService.t("drawing-ui.image-panel.align.top"),
2222
2475
  value: "4"
2223
2476
  },
2224
2477
  {
2225
- label: localeService.t("image-panel.align.middle"),
2478
+ label: localeService.t("drawing-ui.image-panel.align.middle"),
2226
2479
  value: "5"
2227
2480
  },
2228
2481
  {
2229
- label: localeService.t("image-panel.align.bottom"),
2482
+ label: localeService.t("drawing-ui.image-panel.align.bottom"),
2230
2483
  value: "6"
2231
2484
  }
2232
2485
  ] },
2233
2486
  { options: [{
2234
- label: localeService.t("image-panel.align.horizon"),
2487
+ label: localeService.t("drawing-ui.image-panel.align.horizon"),
2235
2488
  value: "7"
2236
2489
  }, {
2237
- label: localeService.t("image-panel.align.vertical"),
2490
+ label: localeService.t("drawing-ui.image-panel.align.vertical"),
2238
2491
  value: "8"
2239
2492
  }] }
2240
2493
  ];
@@ -2249,7 +2502,7 @@ const DrawingAlign = (props) => {
2249
2502
  className: (0, _univerjs_design.clsx)("univer-relative univer-w-full", { "univer-hidden": !alignShow }),
2250
2503
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
2251
2504
  className: "univer-text-gray-600 dark:!univer-text-gray-200",
2252
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: localeService.t("image-panel.align.title") })
2505
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: localeService.t("drawing-ui.image-panel.align.title") })
2253
2506
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2254
2507
  className: "univer-relative univer-mt-2.5 univer-flex univer-h-full",
2255
2508
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -2295,7 +2548,7 @@ const DrawingArrange = (props) => {
2295
2548
  className: (0, _univerjs_design.clsx)("univer-grid univer-gap-2 univer-py-2 univer-text-gray-400", { "univer-hidden": !arrangeShow }),
2296
2549
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
2297
2550
  className: "univer-text-gray-600 dark:!univer-text-gray-200",
2298
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: localeService.t("image-panel.arrange.title") })
2551
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: localeService.t("drawing-ui.image-panel.arrange.title") })
2299
2552
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2300
2553
  className: "univer-grid univer-grid-cols-2 univer-gap-2",
2301
2554
  children: [
@@ -2303,25 +2556,25 @@ const DrawingArrange = (props) => {
2303
2556
  onClick: () => {
2304
2557
  onArrangeBtnClick(_univerjs_core.ArrangeTypeEnum.forward);
2305
2558
  },
2306
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MoveUpIcon, {}), localeService.t("image-panel.arrange.forward")]
2559
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MoveUpIcon, {}), localeService.t("drawing-ui.image-panel.arrange.forward")]
2307
2560
  }),
2308
2561
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_univerjs_design.Button, {
2309
2562
  onClick: () => {
2310
2563
  onArrangeBtnClick(_univerjs_core.ArrangeTypeEnum.backward);
2311
2564
  },
2312
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MoveDownIcon, {}), localeService.t("image-panel.arrange.backward")]
2565
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MoveDownIcon, {}), localeService.t("drawing-ui.image-panel.arrange.backward")]
2313
2566
  }),
2314
2567
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_univerjs_design.Button, {
2315
2568
  onClick: () => {
2316
2569
  onArrangeBtnClick(_univerjs_core.ArrangeTypeEnum.front);
2317
2570
  },
2318
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TopmostIcon, {}), localeService.t("image-panel.arrange.front")]
2571
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TopmostIcon, {}), localeService.t("drawing-ui.image-panel.arrange.front")]
2319
2572
  }),
2320
2573
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_univerjs_design.Button, {
2321
2574
  onClick: () => {
2322
2575
  onArrangeBtnClick(_univerjs_core.ArrangeTypeEnum.back);
2323
2576
  },
2324
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(BottomIcon, {}), localeService.t("image-panel.arrange.back")]
2577
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(BottomIcon, {}), localeService.t("drawing-ui.image-panel.arrange.back")]
2325
2578
  })
2326
2579
  ]
2327
2580
  })]
@@ -2380,17 +2633,17 @@ const DrawingGroup = (props) => {
2380
2633
  className: (0, _univerjs_design.clsx)("univer-grid univer-gap-2 univer-py-2 univer-text-gray-400", { "univer-hidden": hasGroup === true && groupShow === false || hasGroup === false }),
2381
2634
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
2382
2635
  className: "univer-text-gray-600 dark:!univer-text-gray-200",
2383
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: localeService.t("image-panel.group.title") })
2636
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: localeService.t("drawing-ui.image-panel.group.title") })
2384
2637
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2385
2638
  className: "univer-flex univer-items-center univer-justify-center univer-gap-2",
2386
2639
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_univerjs_design.Button, {
2387
2640
  className: (0, _univerjs_design.clsx)({ "univer-hidden": !groupBtnShow }),
2388
2641
  onClick: onGroupBtnClick,
2389
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(GroupIcon, {}), localeService.t("image-panel.group.group")]
2642
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(GroupIcon, {}), localeService.t("drawing-ui.image-panel.group.group")]
2390
2643
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_univerjs_design.Button, {
2391
2644
  className: (0, _univerjs_design.clsx)({ "univer-hidden": !ungroupBtnShow }),
2392
2645
  onClick: onUngroupBtnClick,
2393
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(UngroupIcon, {}), localeService.t("image-panel.group.unGroup")]
2646
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(UngroupIcon, {}), localeService.t("drawing-ui.image-panel.group.unGroup")]
2394
2647
  })]
2395
2648
  })]
2396
2649
  });
@@ -2589,12 +2842,12 @@ const DrawingTransform = (props) => {
2589
2842
  children: [
2590
2843
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
2591
2844
  className: "univer-text-gray-600 dark:!univer-text-gray-200",
2592
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: localeService.t("image-panel.transform.title") })
2845
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: localeService.t("drawing-ui.image-panel.transform.title") })
2593
2846
  }),
2594
2847
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2595
2848
  className: "univer-grid univer-grid-cols-3 univer-gap-2 [&>div]:univer-grid [&>div]:univer-gap-2",
2596
2849
  children: [
2597
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("image-panel.transform.width") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.InputNumber, {
2850
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("drawing-ui.image-panel.transform.width") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.InputNumber, {
2598
2851
  precision: 1,
2599
2852
  value: width,
2600
2853
  min: 20,
@@ -2602,7 +2855,7 @@ const DrawingTransform = (props) => {
2602
2855
  handleWidthChange(val);
2603
2856
  }
2604
2857
  })] }),
2605
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("image-panel.transform.height") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.InputNumber, {
2858
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("drawing-ui.image-panel.transform.height") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.InputNumber, {
2606
2859
  precision: 1,
2607
2860
  value: height,
2608
2861
  min: 20,
@@ -2610,7 +2863,7 @@ const DrawingTransform = (props) => {
2610
2863
  handleHeightChange(val);
2611
2864
  }
2612
2865
  })] }),
2613
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("image-panel.transform.lock") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2866
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("drawing-ui.image-panel.transform.lock") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2614
2867
  className: "univer-text-center",
2615
2868
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Checkbox, {
2616
2869
  checked: lockRatio,
@@ -2622,21 +2875,21 @@ const DrawingTransform = (props) => {
2622
2875
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2623
2876
  className: "univer-grid univer-grid-cols-3 univer-gap-2 [&>div]:univer-grid [&>div]:univer-gap-2",
2624
2877
  children: [
2625
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("image-panel.transform.x") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.InputNumber, {
2878
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("drawing-ui.image-panel.transform.x") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.InputNumber, {
2626
2879
  precision: 1,
2627
2880
  value: xPosition,
2628
2881
  onChange: (val) => {
2629
2882
  handleXChange(val);
2630
2883
  }
2631
2884
  })] }),
2632
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("image-panel.transform.y") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.InputNumber, {
2885
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("drawing-ui.image-panel.transform.y") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.InputNumber, {
2633
2886
  precision: 1,
2634
2887
  value: yPosition,
2635
2888
  onChange: (val) => {
2636
2889
  handleYChange(val);
2637
2890
  }
2638
2891
  })] }),
2639
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("image-panel.transform.rotate") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.InputNumber, {
2892
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("drawing-ui.image-panel.transform.rotate") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.InputNumber, {
2640
2893
  precision: 1,
2641
2894
  value: rotation,
2642
2895
  min: RANGE_DRAWING_ROTATION_LIMIT[0],
@@ -2663,7 +2916,7 @@ const ImageCropper = (props) => {
2663
2916
  const cropStateRef = (0, react.useRef)(false);
2664
2917
  const cropOptions = [
2665
2918
  {
2666
- label: localeService.t("image-panel.crop.mode"),
2919
+ label: localeService.t("drawing-ui.image-panel.crop.mode"),
2667
2920
  value: "0"
2668
2921
  },
2669
2922
  {
@@ -2727,7 +2980,7 @@ const ImageCropper = (props) => {
2727
2980
  children: [
2728
2981
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
2729
2982
  className: "univer-text-gray-600 dark:!univer-text-gray-200",
2730
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: localeService.t("image-panel.crop.title") })
2983
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: localeService.t("drawing-ui.image-panel.crop.title") })
2731
2984
  }),
2732
2985
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2733
2986
  className: "univer-flex univer-items-center univer-justify-center univer-gap-2",
@@ -2735,7 +2988,7 @@ const ImageCropper = (props) => {
2735
2988
  onClick: () => {
2736
2989
  onCropperBtnClick(cropValue);
2737
2990
  },
2738
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.CreateCopyIcon, {}), localeService.t("image-panel.crop.start")]
2991
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.CreateCopyIcon, {}), localeService.t("drawing-ui.image-panel.crop.start")]
2739
2992
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Select, {
2740
2993
  value: cropValue,
2741
2994
  options: cropOptions,
@@ -2834,7 +3087,7 @@ const DrawingCommonPanel = (props) => {
2834
3087
  className: (0, _univerjs_design.clsx)("univer-h-full", { "univer-hidden": !nullShow }),
2835
3088
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2836
3089
  className: "univer-flex univer-h-full univer-items-center univer-justify-center",
2837
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("image-panel.null") })
3090
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("drawing-ui.image-panel.null") })
2838
3091
  })
2839
3092
  }),
2840
3093
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DrawingArrange, {