@univerjs/ui 0.1.10 → 0.1.12

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 (67) hide show
  1. package/lib/cjs/index.js +14 -14
  2. package/lib/es/index.js +6081 -5836
  3. package/lib/index.css +1 -1
  4. package/lib/types/common/component-manager.d.ts +2 -2
  5. package/lib/types/common/menu-hidden-observable.d.ts +2 -2
  6. package/lib/types/common/menu-merge-configs.d.ts +3 -0
  7. package/lib/types/components/custom-label/CustomLabel.d.ts +2 -2
  8. package/lib/types/components/editor/TextEditor.d.ts +2 -2
  9. package/lib/types/components/font-family/FontFamily.d.ts +1 -1
  10. package/lib/types/components/font-family/FontFamilyItem.d.ts +1 -1
  11. package/lib/types/components/font-size/FontSize.d.ts +1 -1
  12. package/lib/types/components/font-size/interface.d.ts +1 -1
  13. package/lib/types/components/hooks/layout.d.ts +14 -0
  14. package/lib/types/components/hooks/observable.d.ts +2 -2
  15. package/lib/types/components/menu/Menu.d.ts +6 -1
  16. package/lib/types/components/notification/Notification.d.ts +6 -6
  17. package/lib/types/components/notification/Notification.stories.d.ts +2 -2
  18. package/lib/types/components/progress-bar/ProgressBar.d.ts +4 -1
  19. package/lib/types/components/range-selector/RangeSelector.d.ts +1 -1
  20. package/lib/types/controllers/error/error.controller.d.ts +1 -1
  21. package/lib/types/controllers/menus/menus.d.ts +1 -1
  22. package/lib/types/controllers/shared-shortcut.controller.d.ts +6 -4
  23. package/lib/types/controllers/shortcut-display/menu.d.ts +1 -1
  24. package/lib/types/controllers/shortcut-display/shortcut-panel.controller.d.ts +7 -5
  25. package/lib/types/controllers/ui/ui-desktop.controller.d.ts +5 -24
  26. package/lib/types/controllers/ui/ui.controller.d.ts +10 -15
  27. package/lib/types/index.d.ts +13 -6
  28. package/lib/types/locale/index.d.ts +1 -0
  29. package/lib/types/locale/ru-RU.d.ts +4 -0
  30. package/lib/types/services/before-close/before-close.service.d.ts +1 -1
  31. package/lib/types/services/clipboard/clipboard-interface.service.d.ts +1 -1
  32. package/lib/types/services/confirm/confirm.service.d.ts +2 -2
  33. package/lib/types/services/confirm/desktop-confirm.service.d.ts +10 -4
  34. package/lib/types/services/contextmenu/contextmenu.service.d.ts +2 -2
  35. package/lib/types/services/dialog/desktop-dialog.service.d.ts +12 -7
  36. package/lib/types/services/dialog/dialog.service.d.ts +2 -2
  37. package/lib/types/services/editor/editor.service.d.ts +4 -4
  38. package/lib/types/services/global-zone/desktop-global-zone.service.d.ts +4 -4
  39. package/lib/types/services/global-zone/global-zone.service.d.ts +1 -1
  40. package/lib/types/services/layout/layout.service.d.ts +4 -2
  41. package/lib/types/services/menu/menu.d.ts +9 -3
  42. package/lib/types/services/menu/menu.service.d.ts +11 -6
  43. package/lib/types/services/message/__testing__/mock-message.service.d.ts +2 -2
  44. package/lib/types/services/message/desktop-message.service.d.ts +2 -2
  45. package/lib/types/services/message/message.service.d.ts +1 -1
  46. package/lib/types/services/notification/desktop-notification.service.d.ts +10 -4
  47. package/lib/types/services/notification/notification.service.d.ts +2 -2
  48. package/lib/types/services/parts/parts.service.d.ts +30 -0
  49. package/lib/types/services/popup/canvas-popup.service.d.ts +10 -11
  50. package/lib/types/services/progress/progress.service.d.ts +2 -2
  51. package/lib/types/services/range-selector/range-selector.service.d.ts +2 -2
  52. package/lib/types/services/shortcut/shortcut.service.d.ts +4 -4
  53. package/lib/types/services/sidebar/desktop-sidebar.service.d.ts +3 -4
  54. package/lib/types/services/sidebar/sidebar.service.d.ts +2 -3
  55. package/lib/types/services/zen-zone/desktop-zen-zone.service.d.ts +6 -4
  56. package/lib/types/services/zen-zone/zen-zone.service.d.ts +2 -1
  57. package/lib/types/ui-plugin.d.ts +4 -7
  58. package/lib/types/views/App.d.ts +1 -6
  59. package/lib/types/views/components/confirm-part/interface.d.ts +1 -1
  60. package/lib/types/views/components/dialog-part/interface.d.ts +1 -1
  61. package/lib/types/views/components/doc-bars/Toolbar.d.ts +3 -2
  62. package/lib/types/views/components/doc-bars/ToolbarItem.d.ts +1 -1
  63. package/lib/types/views/components/doc-bars/hook.d.ts +44 -0
  64. package/lib/types/views/parts.d.ts +1 -1
  65. package/lib/umd/index.js +14 -14
  66. package/package.json +18 -18
  67. package/lib/types/views/hooks/active.d.ts +0 -10
package/lib/index.css CHANGED
@@ -1 +1 @@
1
- .univer-ui-plugin-sheets-font-family{overflow:hidden;width:120px;font-size:var(--font-size-xs);text-overflow:ellipsis;white-space:nowrap}.univer-ui-plugin-sheets-font-family-item{font-size:var(--font-size-xs)}.univer-ui-plugin-sheets-font-size{width:28px;height:24px;font-size:var(--font-size-xs)}.univer-ui-plugin-sheets-font-size-input{height:24px;line-height:24px;background-color:transparent;border:none}.univer-ui-plugin-sheets-font-size-input input{font-size:var(--font-size-xs);background-color:transparent}.univer-menu-item-no-hover{background:none}.univer-menu-item-activated{background-color:rgb(var(--bg-color-hover))}.univer-menu-item-content{display:inline-flex;gap:var(--margin-xs);align-items:center}.univer-menu-item-selectable{position:relative;padding-left:var(--padding-xl)}.univer-menu-item-selectable-icon{position:absolute;left:0;display:inline-flex;align-items:center;font-size:var(--font-size-lg)}.univer-menu-item-more-icon{font-size:var(--font-size-sm);color:rgb(var(--text-color))}.univer-app-layout{display:flex;flex-direction:column;height:100%;background-color:rgb(var(--bg-color));min-height:0;position:relative}.univer-app-container{position:relative;display:flex;flex:1;flex-direction:column;min-height:0}.univer-app-container-header{position:relative;z-index:10;width:100%}.univer-app-container-wrapper{display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:100%;height:100%;overflow:hidden}.univer-app-container-content{position:relative;overflow:hidden;display:grid;grid-template-rows:auto 1fr;flex:1;background-color:rgb(var(--bg-color-secondary));border-bottom:1px solid rgb(var(--border-color))}.univer-app-container-canvas{position:relative}.univer-app-container-left-sidebar,.univer-app-container-sidebar{height:100%}.univer-toolbar-btn{cursor:pointer;display:flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0;font-size:var(--font-size-lg);color:rgb(var(--text-color));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none}.univer-toolbar-btn:not([disabled]):hover{background-color:rgb(var(--grey-100))}.univer-toolbar-btn[disabled]{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-toolbar-btn-active{background-color:rgb(var(--grey-100))}.univer-toolbar-btn-active[disabled]{color:rgba(var(--text-color),.25)}.univer-headerbar{user-select:none;position:relative}.univer-headerbar>.univer-header-menu{position:absolute;top:0;right:0;display:flex;box-sizing:border-box;height:100%}.univer-headerbar>.univer-header-menu>div{user-select:none;display:inline-flex;align-items:center;height:28px;margin-left:4px;padding:2px 4px;text-align:center;border-radius:4px}.univer-headerbar>.univer-header-menu>div:hover{background-color:rgb(var(--grey-300))}.univer-menubar{display:flex;gap:var(--margin-xs);align-items:center;justify-content:center;height:32px}.univer-menubar-item{cursor:pointer;display:block;padding:var(--padding-xs) var(--padding-sm);font-size:var(--font-size-xs);font-weight:400;border-radius:var(--border-radius-base);transition:all .1s ease-in-out}.univer-menubar-item:hover:not(.univer-menubar-item-active){background:rgb(var(--grey-300))}.univer-menubar-item-active{color:rgb(var(--color-white));background:rgb(var(--primary-color))}.univer-toolbar{user-select:none;position:relative;display:flex;align-items:center;box-sizing:border-box;height:32px;font-size:var(--font-size-base);color:rgb(var(--text-color));background-color:rgb(var(--bg-color-secondary));border-bottom:1px solid rgb(var(--border-color))}.univer-toolbar-container{padding:0 var(--padding-lg);display:flex;gap:var(--margin-xs);align-items:center;justify-content:center;box-sizing:border-box;height:100%;margin:0 auto;max-width:100%;overflow:hidden}.univer-toolbar-more{max-width:80%}.univer-toolbar-more-container{display:grid;box-sizing:border-box;padding:var(--padding-sm);background-color:rgb(var(--bg-color-secondary));border-radius:var(--border-radius-base);box-shadow:var(--box-shadow-base)}.univer-toolbar-more-container .univer-toolbar-group{flex-wrap:wrap}.univer-toolbar-more-container .univer-toolbar-group:not(:last-child):after{content:initial}.univer-toolbar-more-container .univer-toolbar-group:not(:last-child)>*{margin-bottom:var(--margin-xs)}.univer-toolbar-group{display:flex;gap:var(--margin-xs);align-items:center;flex-shrink:0}.univer-toolbar-group>*{flex-shrink:0}.univer-toolbar-group:not(:last-child,:empty):after{content:"";display:block;width:1px;height:20px;background-color:rgb(var(--border-color));flex-shrink:0}.univer-toolbar-item-select-button{cursor:pointer;position:relative;overflow:hidden;display:flex;gap:var(--margin-xs);align-items:center;height:24px;padding-right:18px;font-size:var(--font-size-lg);border-radius:var(--border-radius-base)}.univer-toolbar-item-select-button-disabled{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-toolbar-item-select-button-disabled.univer-toolbar-item-select-button-activated{color:rgba(var(--text-color),.25)}.univer-toolbar-item-select-button-disabled.univer-toolbar-item-select-button-activated .univer-toolbar-item-select-button-label:hover,.univer-toolbar-item-select-button-disabled.univer-toolbar-item-select-button-activated .univer-toolbar-item-select-button-arrow:hover{background-color:rgb(var(--grey-100))!important}.univer-toolbar-item-select-button-activated,.univer-toolbar-item-select-button:hover,.univer-toolbar-item-select-button:hover .univer-toolbar-item-select-button-label{background-color:rgb(var(--grey-100))}.univer-toolbar-item-select-button-label{position:relative;z-index:1;display:flex;align-items:center;height:100%;padding:0 var(--padding-xs)}.univer-toolbar-item-select-button-label:hover{background-color:rgb(var(--grey-300))!important}.univer-toolbar-item-select-button-arrow{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:flex-end;box-sizing:border-box;width:100%;height:100%;padding-right:var(--padding-xs);font-size:10px;color:rgb(var(--grey-400))}.univer-toolbar-item-select-button-arrow:hover{background-color:rgb(var(--grey-300))}.univer-toolbar-item-select{cursor:pointer;position:relative;display:flex;gap:var(--margin-xs);align-items:center;height:24px;padding:0 var(--padding-xs);font-size:var(--font-size-lg);border-radius:var(--border-radius-base)}.univer-toolbar-item-select-disabled{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-toolbar-item-select-disabled.univer-toolbar-item-select-activated{color:rgba(var(--text-color),.25)}.univer-toolbar-item-select-disabled.univer-toolbar-item-select-activated:hover,.univer-toolbar-item-select-activated{background-color:rgb(var(--grey-100))}.univer-toolbar-item-select:hover{background-color:rgb(var(--grey-100));border-radius:var(--border-radius-base)}.univer-toolbar-item-select-arrow{display:flex;align-items:center;height:100%;font-size:10px;color:rgb(var(--grey-400))}.univer-toolbar-item-select-arrow-disabled{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-toolbar-item-select-arrow-disabled.univer-toolbar-item-select-arrow-activated{color:rgba(var(--text-color),.25)}.univer-toolbar-item-select-arrow-disabled.univer-toolbar-item-select-arrow-activated:hover,.univer-toolbar-item-select-arrow-activated{background-color:rgb(var(--grey-100))}.univer-sidebar{position:relative;transform:translate(100%);box-sizing:border-box;width:0;height:100%;color:rgb(var(--text-color));transition:all .15s}.univer-sidebar.univer-sidebar-open{transform:translate(0);width:380px}.univer-sidebar-container{overflow-y:auto;display:grid;grid-template-rows:auto 1fr auto;box-sizing:border-box;width:100%;height:0;min-height:100%;margin:auto;background-color:rgb(var(--bg-color-secondary));border-bottom:1px solid rgb(var(--border-color));border-left:1px solid rgb(var(--border-color));scrollbar-color:rgba(var(--scrollbar-color),.7) transparent;scrollbar-gutter:auto;scrollbar-width:thin}.univer-sidebar-header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;height:44px;padding:var(--padding-xl) var(--padding-xl) 0;font-size:var(--font-size-lg);font-weight:500;background:rgb(var(--bg-color-secondary));box-sizing:border-box;z-index:10}.univer-sidebar-header-close{cursor:pointer;color:rgb(var(--text-color-secondary))}.univer-sidebar-body{padding:0 var(--padding-xl);box-sizing:border-box}.univer-sidebar-footer{position:sticky;bottom:0;padding:var(--padding-xl);background:rgb(var(--bg-color-secondary));box-sizing:border-box}.univer-zen-zone{position:absolute;display:none}.univer-zen-zone-open{z-index:100;top:0;left:0;display:block;width:100%;height:100%;background:rgb(var(--bg-color))}.univer-zen-zone-close{display:none}.univer-notification{position:fixed;z-index:1000;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;box-sizing:border-box;margin:var(--margin-xs) 0}.univer-notification-notice{display:flex;gap:var(--margin-xs);justify-content:space-between;width:280px;padding:var(--padding-lg);font-size:var(--font-size-lg);background-color:rgb(var(--color-white));border-radius:var(--border-radius-base);box-shadow:var(--box-shadow-lg)}.univer-notification-notice-wrapper{margin:var(--margin-xs) var(--margin-base)}.univer-notification-notice-content{display:inline-flex;gap:var(--margin-xs);align-items:center;align-items:flex-start}.univer-notification-notice-close{cursor:pointer;display:flex;align-items:center;justify-content:center;width:fit-content;height:fit-content;padding:var(--padding-xs);color:rgb(var(--text-color-secondary));border-radius:var(--border-radius-base);outline:none;transition:background-color .2s}.univer-notification-notice-close:hover{background-color:rgb(var(--bg-color-hover))}.univer-notification-icon{padding:var(--padding-xs)}.univer-notification-icon-success{color:rgb(var(--success-color))}.univer-notification-icon-info{color:rgb(var(--info-color))}.univer-notification-icon-warning{color:rgb(var(--warning-color))}.univer-notification-icon-error{color:rgb(var(--error-color))}.univer-notification-content-container{display:inline-flex;flex-direction:column;gap:var(--margin-xs);align-items:flex-start;padding-top:var(--padding-xs)}.univer-notification-title{color:rgb(var(--text-color))}.univer-notification-content{color:rgb(var(--text-color-secondary))}.univer-notification-content-ellipsis{overflow:hidden;display:-webkit-box;text-overflow:ellipsis;-webkit-box-orient:vertical}.univer-notification-top,.univer-notification-topLeft,.univer-notification-topRight{top:0}.univer-notification-bottom,.univer-notification-bottomRight,.univer-notification-bottomLeft{bottom:0}.univer-notification-bottomRight,.univer-notification-topRight{right:0}.univer-notification-fade{overflow:hidden;transition:all .3s}.univer-notification-fade-appear-prepare{opacity:0}.univer-notification-fade-appear-start{transform:translate(100%);opacity:0}.univer-notification-fade-appear-active{transform:translate(0);opacity:1}.univer-notification-fade-appear,.univer-notification-fade-enter{opacity:0;animation-play-state:paused;animation-duration:.3s;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-fill-mode:both}.univer-notification-fade-leave{animation-duration:.3s;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-fill-mode:both;animation-play-state:paused}.univer-notification-fade-appear.univer-notification-fade-appear-active,.univer-notification-fade-enter.univer-notification-fade-enter-active{animation-name:univer-notification-fade-in;animation-play-state:running}.univer-notification-fade-leave.univer-notification-fade-leave-active{animation-name:univer-notification-fade-out;animation-play-state:running}@keyframes univer-notification-fade-in{0%{opacity:0}to{opacity:1}}@keyframes univer-notification-fade-out{0%{opacity:1}to{opacity:0}}.univer-global-zone{position:absolute;display:none}.univer-global-zone-open{z-index:100;top:0;left:0;display:block;width:100%;height:100%;background:rgb(var(--bg-color))}.univer-global-zone-close{display:none}.univer-shortcut-panel-group-title{height:40px;font-size:13px;font-weight:700;line-height:40px}.univer-shortcut-panel-item{display:flex;justify-content:space-between;height:40px;font-size:13px;line-height:40px}.univer-shortcut-panel-item-title{overflow:hidden;flex-grow:1;flex-shrink:1;max-width:200px;text-overflow:ellipsis;text-wrap:nowrap}.univer-shortcut-panel-item-shortcut{flex-grow:0;flex-shrink:0}.univer-shortcut-panel-item:not(:last-of-type){border-bottom:1px solid rgb(var(--grey-200))}.univer-text-editor-container{position:relative;width:100%;height:30px;user-select:none;border:1px solid rgb(var(--border-color));transition:all .15s;border-radius:var(--border-radius-base)}.univer-text-editor-container:hover,.univer-text-editor-container:active,.univer-text-editor-container-active,.univer-text-editor-container-active:hover{border:1px solid rgb(var(--hyacinth-500))}.univer-text-editor-container-error,.univer-text-editor-container-error:hover{border:1px solid rgb(var(--red-400))}.univer-text-editor-container-disabled,.univer-text-editor-container-disabled:hover{border-color:rgb(var(--grey-100))}.univer-text-editor-container-placeholder{position:absolute;top:49%;left:5px;transform:translateY(-50%);color:rgb(var(--grey-400));font-size:var(--font-size-xs);pointer-events:none}.univer-text-editor-validation-error{font-size:10px;color:rgb(var(--red-400))}.univer-range-selector{overflow:hidden;display:flex;align-items:center;justify-content:space-between;color:rgb(var(--grey-600));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-base);width:220px;height:28px}.univer-range-selector-editor{position:relative;user-select:none;width:100%;height:100%;border:0;outline:0}.univer-range-selector-icon{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;margin-right:4px;font-size:var(--font-size-lg);color:rgb(var(--text-color));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none}.univer-range-selector-icon:not([disabled]):hover{background-color:rgb(var(--grey-100))}.univer-range-selector-icon[disabled]{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-range-selector:hover,.univer-range-selector-active{border-color:rgb(var(--hyacinth-500))}.univer-range-selector-active .univer-range-selector-icon{color:rgb(var(--hyacinth-500))}.univer-range-selector-error{border-color:rgb(var(--red-400))}.univer-range-selector-error .univer-range-selector-icon{color:rgb(var(--red-400))}.univer-range-selector-error:hover{border-color:rgb(var(--red-400))}.univer-range-selector-disabled{border-color:rgb(var(--grey-100))}.univer-range-selector-disabled .univer-range-selector-icon{color:rgb(var(--grey-100))}.univer-range-selector-disabled:hover{border-color:rgb(var(--grey-100))}.univer-range-selector-modal{position:relative;max-height:500px;overflow:hidden;overflow-y:auto}.univer-range-selector-modal-container{display:flex;flex-direction:row;align-items:center;margin-bottom:10px}.univer-range-selector-modal-container-input{display:inline-block;width:280px}.univer-range-selector-modal-container-input-active{border-color:rgb(var(--hyacinth-500))}.univer-range-selector-modal-container-button{display:inline-block;text-align:center;width:28px}.univer-range-selector-modal-container-button:hover{cursor:pointer;color:rgb(var(--hyacinth-500))}.univer-range-selector-modal-add{position:relative;width:300px;margin-top:5px;text-align:left;color:rgb(var(--hyacinth-500));font-size:var(--font-size-xs)}.univer-range-selector-modal-add-button{display:flex;align-items:center;justify-content:center}.univer-range-selector-modal-add-button:hover{cursor:pointer;background-color:rgb(var(--hyacinth-500),.05)}.univer-progress-bar{margin:12px 8px 0;width:160px;height:4px;background-color:rgb(var(--border-color));border-radius:var(--border-radius-lg)}.univer-progress-bar-inner{height:4px;border-radius:var(--border-radius-lg);transition:width .5s}
1
+ .univer-ui-plugin-sheets-font-family{overflow:hidden;width:120px;font-size:var(--font-size-xs);text-overflow:ellipsis;white-space:nowrap}.univer-ui-plugin-sheets-font-family-item{font-size:var(--font-size-xs)}.univer-ui-plugin-sheets-font-size{width:28px;height:24px;font-size:var(--font-size-xs)}.univer-ui-plugin-sheets-font-size-input{height:24px;line-height:24px;background-color:transparent;border:none}.univer-ui-plugin-sheets-font-size-input input{font-size:var(--font-size-xs);background-color:transparent}.univer-menu-item-no-hover{background:none}.univer-menu-item-activated{background-color:rgb(var(--bg-color-hover))}.univer-menu-item-content{display:inline-flex;gap:var(--margin-xs);align-items:center}.univer-menu-item-selectable{position:relative;padding-left:var(--padding-xl)}.univer-menu-item-selectable-icon{position:absolute;left:0;display:inline-flex;align-items:center;font-size:var(--font-size-lg)}.univer-menu-item-more-icon{font-size:var(--font-size-sm);color:rgb(var(--text-color))}.univer-app-layout{display:flex;flex-direction:column;height:100%;background-color:rgb(var(--bg-color));min-height:0;position:relative}.univer-app-container{position:relative;display:flex;flex:1;flex-direction:column;min-height:0}.univer-app-container-header{position:relative;z-index:10;width:100%}.univer-app-container-wrapper{display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:100%;height:100%;overflow:hidden}.univer-app-container-content{position:relative;overflow:hidden;display:grid;grid-template-rows:auto 1fr;flex:1;background-color:rgb(var(--bg-color-secondary));border-bottom:1px solid rgb(var(--border-color))}.univer-app-container-canvas{position:relative;overflow:hidden}.univer-app-container-left-sidebar,.univer-app-container-sidebar{height:100%}.univer-toolbar-btn{cursor:pointer;display:flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0;font-size:var(--font-size-lg);color:rgb(var(--text-color));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none}.univer-toolbar-btn:not([disabled]):hover{background-color:rgb(var(--grey-100))}.univer-toolbar-btn[disabled]{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-toolbar-btn-active{background-color:rgb(var(--grey-100))}.univer-toolbar-btn-active[disabled]{color:rgba(var(--text-color),.25)}.univer-headerbar{user-select:none;position:relative}.univer-headerbar>.univer-header-menu{position:absolute;top:0;right:0;display:flex;box-sizing:border-box;height:100%}.univer-headerbar>.univer-header-menu>div{user-select:none;display:inline-flex;align-items:center;height:28px;margin-left:4px;padding:2px 4px;text-align:center;border-radius:4px}.univer-headerbar>.univer-header-menu>div:hover{background-color:rgb(var(--grey-300))}.univer-menubar{display:flex;gap:var(--margin-xs);align-items:center;justify-content:center;height:32px}.univer-menubar-item{cursor:pointer;display:block;padding:var(--padding-xs) var(--padding-sm);font-size:var(--font-size-xs);font-weight:400;border-radius:var(--border-radius-base);transition:all .1s ease-in-out}.univer-menubar-item:hover:not(.univer-menubar-item-active){background:rgb(var(--grey-300))}.univer-menubar-item-active{color:rgb(var(--color-white));background:rgb(var(--primary-color))}.univer-toolbar{user-select:none;position:relative;display:flex;align-items:center;box-sizing:border-box;height:32px;font-size:var(--font-size-base);color:rgb(var(--text-color));background-color:rgb(var(--bg-color-secondary));border-bottom:1px solid rgb(var(--border-color))}.univer-toolbar-container{padding:0 var(--padding-lg);display:flex;gap:var(--margin-xs);align-items:center;justify-content:center;box-sizing:border-box;height:100%;margin:0 auto;max-width:100%;overflow:hidden}.univer-toolbar-more{max-width:80%}.univer-toolbar-more-container{display:grid;box-sizing:border-box;padding:var(--padding-sm);background-color:rgb(var(--bg-color-secondary));border-radius:var(--border-radius-base);box-shadow:var(--box-shadow-base)}.univer-toolbar-more-container .univer-toolbar-group{flex-wrap:wrap}.univer-toolbar-more-container .univer-toolbar-group:not(:last-child):after{content:initial}.univer-toolbar-more-container .univer-toolbar-group:not(:last-child)>*{margin-bottom:var(--margin-xs)}.univer-toolbar-group{display:flex;gap:var(--margin-xs);align-items:center;flex-shrink:0}.univer-toolbar-group>*{flex-shrink:0}.univer-toolbar-group:not(:last-child,:empty):after{content:"";display:block;width:1px;height:20px;background-color:rgb(var(--border-color));flex-shrink:0}.univer-toolbar-item-select-button{cursor:pointer;position:relative;overflow:hidden;display:flex;gap:var(--margin-xs);align-items:center;height:24px;padding-right:18px;font-size:var(--font-size-lg);border-radius:var(--border-radius-base)}.univer-toolbar-item-select-button-disabled{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-toolbar-item-select-button-disabled.univer-toolbar-item-select-button-activated{color:rgba(var(--text-color),.25)}.univer-toolbar-item-select-button-disabled.univer-toolbar-item-select-button-activated .univer-toolbar-item-select-button-label:hover,.univer-toolbar-item-select-button-disabled.univer-toolbar-item-select-button-activated .univer-toolbar-item-select-button-arrow:hover{background-color:rgb(var(--grey-100))!important}.univer-toolbar-item-select-button-activated,.univer-toolbar-item-select-button:hover,.univer-toolbar-item-select-button:hover .univer-toolbar-item-select-button-label{background-color:rgb(var(--grey-100))}.univer-toolbar-item-select-button-label{position:relative;z-index:1;display:flex;align-items:center;height:100%;padding:0 var(--padding-xs)}.univer-toolbar-item-select-button-label:hover{background-color:rgb(var(--grey-300))!important}.univer-toolbar-item-select-button-arrow{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:flex-end;box-sizing:border-box;width:100%;height:100%;padding-right:var(--padding-xs);color:rgb(var(--grey-400))}.univer-toolbar-item-select-button-arrow:hover{background-color:rgb(var(--grey-300))}.univer-toolbar-item-select{cursor:pointer;position:relative;display:flex;gap:var(--margin-xs);align-items:center;height:24px;padding:0 var(--padding-xs);font-size:var(--font-size-lg);border-radius:var(--border-radius-base)}.univer-toolbar-item-select-disabled{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-toolbar-item-select-disabled.univer-toolbar-item-select-activated{color:rgba(var(--text-color),.25)}.univer-toolbar-item-select-disabled.univer-toolbar-item-select-activated:hover,.univer-toolbar-item-select-activated{background-color:rgb(var(--grey-100))}.univer-toolbar-item-select:hover{background-color:rgb(var(--grey-100));border-radius:var(--border-radius-base)}.univer-toolbar-item-select-arrow{display:flex;align-items:center;height:100%;color:rgb(var(--grey-400))}.univer-toolbar-item-select-arrow-disabled{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-toolbar-item-select-arrow-disabled.univer-toolbar-item-select-arrow-activated{color:rgba(var(--text-color),.25)}.univer-toolbar-item-select-arrow-disabled.univer-toolbar-item-select-arrow-activated:hover,.univer-toolbar-item-select-arrow-activated{background-color:rgb(var(--grey-100))}.univer-sidebar{position:relative;transform:translate(100%);box-sizing:border-box;width:0;height:100%;color:rgb(var(--text-color));transition:all .15s}.univer-sidebar.univer-sidebar-open{transform:translate(0);width:380px}.univer-sidebar-container{overflow-y:auto;display:grid;grid-template-rows:auto 1fr auto;box-sizing:border-box;width:100%;height:0;min-height:100%;margin:auto;background-color:rgb(var(--bg-color-secondary));border-bottom:1px solid rgb(var(--border-color));border-left:1px solid rgb(var(--border-color));scrollbar-color:rgba(var(--scrollbar-color),.7) transparent;scrollbar-gutter:auto;scrollbar-width:thin}.univer-sidebar-header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;height:44px;padding:var(--padding-xl) var(--padding-xl) 0;font-size:var(--font-size-lg);font-weight:500;background:rgb(var(--bg-color-secondary));box-sizing:border-box;z-index:10}.univer-sidebar-header-close{cursor:pointer;color:rgb(var(--text-color-secondary))}.univer-sidebar-body{padding:0 var(--padding-xl);box-sizing:border-box}.univer-sidebar-footer{position:sticky;bottom:0;padding:var(--padding-xl);background:rgb(var(--bg-color-secondary));box-sizing:border-box}.univer-zen-zone{position:absolute;display:none}.univer-zen-zone-open{z-index:100;top:0;left:0;display:block;width:100%;height:100%;background:rgb(var(--bg-color))}.univer-zen-zone-close{display:none}.univer-global-zone{position:absolute;display:none}.univer-global-zone-open{z-index:100;top:0;left:0;display:block;width:100%;height:100%;background:rgb(var(--bg-color))}.univer-global-zone-close{display:none}.univer-notification{position:fixed;z-index:1000;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;box-sizing:border-box;margin:var(--margin-xs) 0}.univer-notification-notice{display:flex;gap:var(--margin-xs);justify-content:space-between;width:280px;padding:var(--padding-lg);font-size:var(--font-size-lg);background-color:rgb(var(--color-white));border-radius:var(--border-radius-base);box-shadow:var(--box-shadow-lg)}.univer-notification-notice-wrapper{margin:var(--margin-xs) var(--margin-base)}.univer-notification-notice-content{display:inline-flex;gap:var(--margin-xs);align-items:center;align-items:flex-start}.univer-notification-notice-close{cursor:pointer;display:flex;align-items:center;justify-content:center;width:fit-content;height:fit-content;padding:var(--padding-xs);color:rgb(var(--text-color-secondary));border-radius:var(--border-radius-base);outline:none;transition:background-color .2s}.univer-notification-notice-close:hover{background-color:rgb(var(--bg-color-hover))}.univer-notification-icon{padding:var(--padding-xs)}.univer-notification-icon-success{color:rgb(var(--success-color))}.univer-notification-icon-info{color:rgb(var(--info-color))}.univer-notification-icon-warning{color:rgb(var(--warning-color))}.univer-notification-icon-error{color:rgb(var(--error-color))}.univer-notification-content-container{display:inline-flex;flex-direction:column;gap:var(--margin-xs);align-items:flex-start;padding-top:var(--padding-xs)}.univer-notification-title{color:rgb(var(--text-color))}.univer-notification-content{color:rgb(var(--text-color-secondary))}.univer-notification-content-ellipsis{overflow:hidden;display:-webkit-box;text-overflow:ellipsis;-webkit-box-orient:vertical}.univer-notification-top,.univer-notification-topLeft,.univer-notification-topRight{top:0}.univer-notification-bottom,.univer-notification-bottomRight,.univer-notification-bottomLeft{bottom:0}.univer-notification-bottomRight,.univer-notification-topRight{right:0}.univer-notification-fade{overflow:hidden;transition:all .3s}.univer-notification-fade-appear-prepare{opacity:0}.univer-notification-fade-appear-start{transform:translate(100%);opacity:0}.univer-notification-fade-appear-active{transform:translate(0);opacity:1}.univer-notification-fade-appear,.univer-notification-fade-enter{opacity:0;animation-play-state:paused;animation-duration:.3s;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-fill-mode:both}.univer-notification-fade-leave{animation-duration:.3s;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-fill-mode:both;animation-play-state:paused}.univer-notification-fade-appear.univer-notification-fade-appear-active,.univer-notification-fade-enter.univer-notification-fade-enter-active{animation-name:univer-notification-fade-in;animation-play-state:running}.univer-notification-fade-leave.univer-notification-fade-leave-active{animation-name:univer-notification-fade-out;animation-play-state:running}@keyframes univer-notification-fade-in{0%{opacity:0}to{opacity:1}}@keyframes univer-notification-fade-out{0%{opacity:1}to{opacity:0}}.univer-shortcut-panel-group-title{height:40px;font-size:13px;font-weight:700;line-height:40px}.univer-shortcut-panel-item{display:flex;justify-content:space-between;height:40px;font-size:13px;line-height:40px}.univer-shortcut-panel-item-title{overflow:hidden;flex-grow:1;flex-shrink:1;max-width:200px;text-overflow:ellipsis;text-wrap:nowrap}.univer-shortcut-panel-item-shortcut{flex-grow:0;flex-shrink:0}.univer-shortcut-panel-item:not(:last-of-type){border-bottom:1px solid rgb(var(--grey-200))}.univer-text-editor-container{position:relative;width:100%;height:30px;user-select:none;border:1px solid rgb(var(--border-color));transition:all .15s;border-radius:var(--border-radius-base)}.univer-text-editor-container:hover,.univer-text-editor-container:active,.univer-text-editor-container-active,.univer-text-editor-container-active:hover{border:1px solid rgb(var(--hyacinth-500))}.univer-text-editor-container-error,.univer-text-editor-container-error:hover{border:1px solid rgb(var(--red-400))}.univer-text-editor-container-disabled,.univer-text-editor-container-disabled:hover{border-color:rgb(var(--grey-100))}.univer-text-editor-container-placeholder{position:absolute;top:49%;left:5px;transform:translateY(-50%);color:rgb(var(--grey-400));font-size:var(--font-size-xs);pointer-events:none}.univer-text-editor-validation-error{font-size:10px;color:rgb(var(--red-400))}.univer-range-selector{overflow:hidden;display:flex;align-items:center;justify-content:space-between;color:rgb(var(--grey-600));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-base);width:220px;height:28px}.univer-range-selector-editor{position:relative;user-select:none;width:100%;height:100%;border:0;outline:0}.univer-range-selector-icon{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;margin-right:4px;font-size:var(--font-size-lg);color:rgb(var(--text-color));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none}.univer-range-selector-icon:not([disabled]):hover{background-color:rgb(var(--grey-100))}.univer-range-selector-icon[disabled]{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-range-selector:hover,.univer-range-selector-active{border-color:rgb(var(--hyacinth-500))}.univer-range-selector-active .univer-range-selector-icon{color:rgb(var(--hyacinth-500))}.univer-range-selector-error{border-color:rgb(var(--red-400))}.univer-range-selector-error .univer-range-selector-icon{color:rgb(var(--red-400))}.univer-range-selector-error:hover{border-color:rgb(var(--red-400))}.univer-range-selector-disabled{border-color:rgb(var(--grey-100))}.univer-range-selector-disabled .univer-range-selector-icon{color:rgb(var(--grey-100))}.univer-range-selector-disabled:hover{border-color:rgb(var(--grey-100))}.univer-range-selector-modal{position:relative;max-height:500px;overflow:hidden;overflow-y:auto}.univer-range-selector-modal-container{display:flex;flex-direction:row;align-items:center;margin-bottom:10px}.univer-range-selector-modal-container-input{display:inline-block;width:280px}.univer-range-selector-modal-container-input-active{border-color:rgb(var(--hyacinth-500))}.univer-range-selector-modal-container-button{display:inline-block;text-align:center;width:28px}.univer-range-selector-modal-container-button:hover{cursor:pointer;color:rgb(var(--hyacinth-500))}.univer-range-selector-modal-add{position:relative;width:300px;margin-top:5px;text-align:left;color:rgb(var(--hyacinth-500));font-size:var(--font-size-xs)}.univer-range-selector-modal-add-button{display:flex;align-items:center;justify-content:center}.univer-range-selector-modal-add-button:hover{cursor:pointer;background-color:rgb(var(--hyacinth-500),.05)}.univer-progress-bar{margin:12px 8px 0;width:160px;height:4px;background-color:rgb(var(--border-color));border-radius:var(--border-radius-lg)}.univer-progress-bar-inner{height:4px;border-radius:var(--border-radius-lg);transition:width .5s}
@@ -1,6 +1,6 @@
1
- import { default as React } from 'react';
2
- import { defineComponent } from 'vue';
3
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { defineComponent } from 'vue';
3
+ import { default as React } from 'react';
4
4
 
5
5
  type ComponentFramework = 'vue3' | 'react';
6
6
  interface IComponentOptions {
@@ -1,5 +1,5 @@
1
- import { Observable } from 'rxjs';
2
- import { IAccessor } from '@wendellhu/redi';
3
1
  import { UniverInstanceType } from '@univerjs/core';
2
+ import { IAccessor } from '@wendellhu/redi';
3
+ import { Observable } from 'rxjs';
4
4
 
5
5
  export declare function getMenuHiddenObservable(accessor: IAccessor, targetUniverType: UniverInstanceType): Observable<boolean>;
@@ -0,0 +1,3 @@
1
+ import { MenuConfig, MenuItemConfig } from '../services/menu/menu';
2
+
3
+ export declare function mergeMenuConfigs<T = MenuConfig>(baseConfig: T, additionalConfig: MenuItemConfig | null): T;
@@ -1,6 +1,6 @@
1
- import { IMenuSelectorItem } from '../../services/menu/menu';
2
- import { Observable } from 'rxjs';
3
1
  import { default as React } from 'react';
2
+ import { Observable } from 'rxjs';
3
+ import { IMenuSelectorItem } from '../../services/menu/menu';
4
4
 
5
5
  export type ICustomLabelProps<T = undefined> = {
6
6
  value?: string | number | undefined;
@@ -1,6 +1,6 @@
1
- import { IEditorCanvasStyle } from '../../services/editor/editor.service';
2
- import { default as React } from 'react';
3
1
  import { IDocumentData, Nullable } from '@univerjs/core';
2
+ import { default as React } from 'react';
3
+ import { IEditorCanvasStyle } from '../../services/editor/editor.service';
4
4
 
5
5
  type MyComponentProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
6
6
  export interface ITextEditorProps {
@@ -1,4 +1,4 @@
1
- import { IFontFamilyProps } from './interface';
2
1
  import { default as React } from 'react';
2
+ import { IFontFamilyProps } from './interface';
3
3
 
4
4
  export declare const FontFamily: (props: IFontFamilyProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import { IFontFamilyItemProps } from './interface';
2
1
  import { default as React } from 'react';
2
+ import { IFontFamilyItemProps } from './interface';
3
3
 
4
4
  export declare const FontFamilyItem: (props: IFontFamilyItemProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import { IFontSizeProps } from './interface';
2
1
  import { default as React } from 'react';
2
+ import { IFontSizeProps } from './interface';
3
3
 
4
4
  export declare const FontSize: (props: IFontSizeProps) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import { Observable } from 'rxjs';
2
1
  import { ICustomComponentProps } from '@univerjs/ui';
2
+ import { Observable } from 'rxjs';
3
3
 
4
4
  export interface IFontSizeProps extends ICustomComponentProps<string> {
5
5
  value: string;
@@ -0,0 +1,14 @@
1
+ import { Nullable } from '@univerjs/core';
2
+
3
+ /**
4
+ * These hooks are used for browser layout
5
+ * Prefer to client-side
6
+ */
7
+ /**
8
+ * Allow the element to scroll when its height over the container height
9
+ * @param element
10
+ * Container means the window view that the element displays in.
11
+ * Recommend pass the sheet mountContainer as container
12
+ * @param container
13
+ */
14
+ export declare function useScrollYOverContainer(element: Nullable<HTMLElement>, container: Nullable<HTMLElement>): void;
@@ -1,10 +1,10 @@
1
- import { Observable } from 'rxjs';
2
1
  import { Nullable } from '@univerjs/core';
2
+ import { Observable } from 'rxjs';
3
3
 
4
4
  type ObservableOrFn<T> = Observable<T> | (() => Observable<T>);
5
5
  export declare function useObservable<T>(observable: ObservableOrFn<T>, defaultValue: T | undefined, shouldHaveSyncValue?: true): T;
6
6
  export declare function useObservable<T>(observable: Nullable<ObservableOrFn<T>>, defaultValue: T): T;
7
7
  export declare function useObservable<T>(observable: Nullable<ObservableOrFn<T>>, defaultValue?: undefined): T | undefined;
8
- export declare function useObservable<T>(observable: Nullable<ObservableOrFn<T>>, defaultValue?: T, shouldHaveSyncValue?: true, deps?: any[]): T | undefined;
8
+ export declare function useObservable<T>(observable: Nullable<ObservableOrFn<T>>, defaultValue: undefined, shouldHaveSyncValue: true, deps?: any[]): T;
9
9
  export declare function useObservable<T>(observable: Nullable<ObservableOrFn<T>>, defaultValue?: T, shouldHaveSyncValue?: boolean, deps?: any[]): T | undefined;
10
10
  export {};
@@ -1,11 +1,16 @@
1
- import { IValueOption } from '../../services/menu/menu';
2
1
  import { default as React } from 'react';
2
+ import { IValueOption } from '../../services/menu/menu';
3
3
 
4
4
  export interface IBaseMenuProps {
5
5
  parentKey?: string | number;
6
6
  menuType?: string | string[];
7
7
  value?: string | number;
8
8
  options?: IValueOption[];
9
+ /**
10
+ * The menu will show scroll on it over viewport height
11
+ * Recommend that you use this prop when displaying menu overlays in Dropdown
12
+ */
13
+ overViewport?: 'scroll';
9
14
  onOptionSelect?: (option: IValueOption) => void;
10
15
  }
11
16
  export declare const Menu: (props: IBaseMenuProps) => React.JSX.Element;
@@ -1,9 +1,9 @@
1
- import { Subject } from 'rxjs';
2
- import { default as React } from 'react';
3
1
  import { Placement } from 'rc-notification/es/interface';
2
+ import { default as React } from 'react';
3
+ import { Subject } from 'rxjs';
4
4
 
5
5
  export type NotificationType = 'success' | 'info' | 'warning' | 'error';
6
- export interface INotificationMethodOptions {
6
+ export interface INotificationOptions {
7
7
  /**
8
8
  * Component type, optional success, warning, error
9
9
  */
@@ -33,9 +33,9 @@ export interface INotificationMethodOptions {
33
33
  */
34
34
  lines?: number;
35
35
  }
36
- export declare const notificationObserver: Subject<INotificationMethodOptions>;
37
- export declare const PureContent: (props: INotificationMethodOptions) => React.JSX.Element;
36
+ export declare const notificationObserver: Subject<INotificationOptions>;
37
+ export declare const PureContent: (props: INotificationOptions) => React.JSX.Element;
38
38
  export declare function Notification(): React.JSX.Element;
39
39
  export declare const notification: {
40
- show: (options: INotificationMethodOptions) => void;
40
+ show: (options: INotificationOptions) => void;
41
41
  };
@@ -1,6 +1,6 @@
1
- import { Notification } from './Notification';
2
- import { default as React } from 'react';
3
1
  import { Meta } from '@storybook/react';
2
+ import { default as React } from 'react';
3
+ import { Notification } from './Notification';
4
4
 
5
5
  declare const meta: Meta<typeof Notification>;
6
6
  export default meta;
@@ -1,3 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
 
3
- export declare function ProgressBar(): React.JSX.Element;
3
+ export interface IProgressBarProps {
4
+ barColor: string;
5
+ }
6
+ export declare function ProgressBar(props: IProgressBarProps): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { IUnitRangeWithName, Nullable } from '@univerjs/core';
2
+ import { default as React } from 'react';
3
3
 
4
4
  export interface IRangeSelectorProps {
5
5
  id: string;
@@ -1,5 +1,5 @@
1
- import { IMessageService } from '../../services/message/message.service';
2
1
  import { Disposable, ErrorService } from '@univerjs/core';
2
+ import { IMessageService } from '../../services/message/message.service';
3
3
 
4
4
  export declare class ErrorController extends Disposable {
5
5
  private readonly _errorService;
@@ -1,5 +1,5 @@
1
- import { IMenuButtonItem } from '../../services/menu/menu';
2
1
  import { IAccessor } from '@wendellhu/redi';
2
+ import { IMenuButtonItem } from '../../services/menu/menu';
3
3
 
4
4
  export declare function UndoMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
5
5
  export declare function RedoMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
@@ -1,7 +1,8 @@
1
- import { IShortcutItem, IShortcutService } from '../services/shortcut/shortcut.service';
2
- import { IMenuService } from '../services/menu/menu.service';
3
- import { Injector } from '@wendellhu/redi';
4
1
  import { Disposable, ICommandService } from '@univerjs/core';
2
+ import { Injector } from '@wendellhu/redi';
3
+ import { IMenuService } from '../services/menu/menu.service';
4
+ import { IShortcutItem, IShortcutService } from '../services/shortcut/shortcut.service';
5
+ import { IUniverUIConfig } from './ui/ui.controller';
5
6
 
6
7
  export declare const CopyShortcutItem: IShortcutItem;
7
8
  export declare const CutShortcutItem: IShortcutItem;
@@ -15,11 +16,12 @@ export declare const RedoShortcutItem: IShortcutItem;
15
16
  * Define shared UI behavior across Univer business. Including undo / redo and clipboard operations.
16
17
  */
17
18
  export declare class SharedController extends Disposable {
19
+ private readonly _config;
18
20
  private readonly _injector;
19
21
  private readonly _menuService;
20
22
  private readonly _shortcutService;
21
23
  private readonly _commandService;
22
- constructor(_injector: Injector, _menuService: IMenuService, _shortcutService: IShortcutService, _commandService: ICommandService);
24
+ constructor(_config: Partial<IUniverUIConfig>, _injector: Injector, _menuService: IMenuService, _shortcutService: IShortcutService, _commandService: ICommandService);
23
25
  initialize(): void;
24
26
  private _registerMenus;
25
27
  private _registerCommands;
@@ -1,4 +1,4 @@
1
- import { IMenuButtonItem } from '../../services/menu/menu';
2
1
  import { IAccessor } from '@wendellhu/redi';
2
+ import { IMenuButtonItem } from '../../services/menu/menu';
3
3
 
4
4
  export declare function ShortcutPanelMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
@@ -1,12 +1,14 @@
1
- import { IShortcutService } from '../../services/shortcut/shortcut.service';
2
- import { IMenuService } from '../../services/menu/menu.service';
3
- import { ComponentManager } from '../../common/component-manager';
4
- import { Injector } from '@wendellhu/redi';
5
1
  import { Disposable, ICommandService } from '@univerjs/core';
2
+ import { Injector } from '@wendellhu/redi';
3
+ import { ComponentManager } from '../../common/component-manager';
4
+ import { IMenuService } from '../../services/menu/menu.service';
5
+ import { IShortcutService } from '../../services/shortcut/shortcut.service';
6
+ import { IUniverUIConfig } from '../ui/ui.controller';
6
7
 
7
8
  /**
8
9
  * This controller add a side panel to the application to display the shortcuts.
9
10
  */
10
11
  export declare class ShortcutPanelController extends Disposable {
11
- constructor(injector: Injector, componentManager: ComponentManager, shortcutService: IShortcutService, menuService: IMenuService, commandService: ICommandService);
12
+ private readonly _config;
13
+ constructor(_config: Partial<IUniverUIConfig>, injector: Injector, componentManager: ComponentManager, shortcutService: IShortcutService, menuService: IMenuService, commandService: ICommandService);
12
14
  }
@@ -1,34 +1,15 @@
1
- import { IWorkbenchOptions, IUIController } from './ui.controller';
2
- import { ILayoutService } from '../../services/layout/layout.service';
3
- import { Observable } from 'rxjs';
4
- import { ComponentType, default as React } from 'react';
5
- import { IDisposable, Injector } from '@wendellhu/redi';
6
- import { IRenderManagerService } from '@univerjs/engine-render';
7
1
  import { Disposable, IUniverInstanceService, LifecycleService } from '@univerjs/core';
2
+ import { IRenderManagerService } from '@univerjs/engine-render';
3
+ import { Injector } from '@wendellhu/redi';
4
+ import { ILayoutService } from '../../services/layout/layout.service';
5
+ import { IWorkbenchOptions } from './ui.controller';
8
6
 
9
- export declare enum DesktopUIPart {
10
- HEADER = "header",
11
- HEADER_MENU = "header-menu",
12
- CONTENT = "content",
13
- FOOTER = "footer",
14
- LEFT_SIDEBAR = "left-sidebar"
15
- }
16
- export interface IDesktopUIController extends IUIController {
17
- componentRegistered$: Observable<void>;
18
- registerComponent(part: DesktopUIPart, component: () => ComponentType): IDisposable;
19
- getComponents(part: DesktopUIPart): Set<() => ComponentType>;
20
- }
21
- export declare class DesktopUIController extends Disposable implements IDesktopUIController {
7
+ export declare class DesktopUIController extends Disposable {
22
8
  private readonly _instanceService;
23
9
  private readonly _renderManagerService;
24
10
  private readonly _injector;
25
11
  private readonly _lifecycleService;
26
12
  private readonly _layoutService?;
27
- private _componentsByPart;
28
- private readonly _componentRegistered$;
29
- readonly componentRegistered$: Observable<void>;
30
13
  constructor(_instanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _injector: Injector, _lifecycleService: LifecycleService, _layoutService?: ILayoutService | undefined);
31
14
  bootstrapWorkbench(options: IWorkbenchOptions): void;
32
- registerComponent(part: DesktopUIPart, component: () => React.ComponentType): IDisposable;
33
- getComponents(part: DesktopUIPart): Set<() => ComponentType>;
34
15
  }
@@ -1,24 +1,19 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
1
+ import { DependencyOverride } from '@univerjs/core';
2
+ import { MenuConfig } from '../../services/menu/menu';
3
+
16
4
  export interface IWorkbenchOptions {
17
5
  container?: string | HTMLElement;
18
6
  header?: boolean;
19
7
  footer?: boolean;
8
+ contextMenu?: boolean;
20
9
  }
21
10
  export interface IUIController {
22
11
  bootstrapWorkbench(options: IWorkbenchOptions): void;
23
12
  }
24
13
  export declare const IUIController: import('@wendellhu/redi').IdentifierDecorator<IUIController>;
14
+ export interface IUniverUIConfig extends IWorkbenchOptions {
15
+ /** Disable auto focus when Univer bootstraps. */
16
+ disableAutoFocus?: true;
17
+ override?: DependencyOverride;
18
+ menu?: MenuConfig;
19
+ }
@@ -21,8 +21,9 @@ export { useObservable } from './components/hooks/observable';
21
21
  export { useEvent } from './components/hooks/event';
22
22
  export { CopyShortcutItem, CutShortcutItem, RedoShortcutItem, SharedController, UndoShortcutItem, } from './controllers/shared-shortcut.controller';
23
23
  export { IUIController, type IWorkbenchOptions } from './controllers/ui/ui.controller';
24
- export { DesktopUIController, DesktopUIPart, type IDesktopUIController } from './controllers/ui/ui-desktop.controller';
25
- export { enUS, zhCN } from './locale';
24
+ export { DesktopUIController } from './controllers/ui/ui-desktop.controller';
25
+ export { IUIPartsService, BuiltInUIPart, UIPartsService } from './services/parts/parts.service';
26
+ export { enUS, zhCN, ruRU } from './locale';
26
27
  export { DesktopBeforeCloseService, IBeforeCloseService } from './services/before-close/before-close.service';
27
28
  export { CopyCommand, CutCommand, PasteCommand } from './services/clipboard/clipboard.command';
28
29
  export { BrowserClipboardService, HTML_CLIPBOARD_MIME_TYPE, IClipboardInterfaceService, PLAIN_TEXT_CLIPBOARD_MIME_TYPE, } from './services/clipboard/clipboard-interface.service';
@@ -33,11 +34,12 @@ export { DesktopDialogService } from './services/dialog/desktop-dialog.service';
33
34
  export { type IDialogPartMethodOptions } from './views/components/dialog-part/interface';
34
35
  export { IDialogService } from './services/dialog/dialog.service';
35
36
  export { ILayoutService, DesktopLayoutService } from './services/layout/layout.service';
36
- export { type ICustomComponentProps, type IDisplayMenuItem, type IMenuButtonItem, type IMenuItem, type IMenuItemFactory, type IMenuSelectorItem, type IValueOption, MenuGroup, MenuItemType, MenuPosition, } from './services/menu/menu';
37
+ export { type ICustomComponentProps, type IDisplayMenuItem, type IMenuButtonItem, type IMenuItem, type IMenuItemFactory, type IMenuSelectorItem, type IValueOption, type MenuConfig, MenuGroup, MenuItemType, MenuPosition, type MenuItemDefaultValueType, } from './services/menu/menu';
37
38
  export { DesktopMenuService, IMenuService } from './services/menu/menu.service';
38
39
  export { DesktopMessageService } from './services/message/desktop-message.service';
39
40
  export { IMessageService } from './services/message/message.service';
40
41
  export { DesktopNotificationService } from './services/notification/desktop-notification.service';
42
+ export { type NotificationType, type INotificationOptions } from './components/notification/Notification';
41
43
  export { INotificationService } from './services/notification/notification.service';
42
44
  export { DesktopPlatformService, IPlatformService } from './services/platform/platform.service';
43
45
  export { DesktopGlobalZoneService } from './services/global-zone/desktop-global-zone.service';
@@ -47,6 +49,7 @@ export { DesktopShortcutService, type IShortcutItem, IShortcutService } from './
47
49
  export { DesktopSidebarService } from './services/sidebar/desktop-sidebar.service';
48
50
  export { ISidebarService } from './services/sidebar/sidebar.service';
49
51
  export { IZenZoneService } from './services/zen-zone/zen-zone.service';
52
+ export { ZenZone } from './views/components/zen-zone/ZenZone';
50
53
  export { UniverUIPlugin, DISABLE_AUTO_FOCUS_KEY } from './ui-plugin';
51
54
  export * from './utils';
52
55
  export { type IConfirmPartMethodOptions } from './views/components/confirm-part/interface';
@@ -56,7 +59,11 @@ export { SetEditorResizeOperation } from './commands/operations/editor/set-edito
56
59
  export { RangeSelector } from './components/range-selector/RangeSelector';
57
60
  export { IRangeSelectorService } from './services/range-selector/range-selector.service';
58
61
  export { DesktopLocalStorageService } from './services/local-storage/local-storage.service';
59
- export { useActiveWorkbook, useActiveWorksheet } from './views/hooks/active';
60
- export { CanvasPopupService, ICanvasPopupService } from './services/popup/canvas-popup.service';
62
+ export { CanvasPopupService, ICanvasPopupService, type IPopup } from './services/popup/canvas-popup.service';
63
+ export { ContextMenu } from './views/components/context-menu/ContextMenu';
64
+ export { CanvasPopup } from './views/components/popup/CanvasPopup';
61
65
  export { ProgressBar } from './components/progress-bar/ProgressBar';
62
- export { IProgressService } from './services/progress/progress.service';
66
+ export { type IMenuGroup, useToolbarGroups, useToolbarItemStatus, useToolbarCollapseObserver } from './views/components/doc-bars/hook';
67
+ export { mergeMenuConfigs } from './common/menu-merge-configs';
68
+ export { IProgressService, ProgressService } from './services/progress/progress.service';
69
+ export type { IProgressStep } from './services/progress/progress.service';
@@ -15,3 +15,4 @@
15
15
  */
16
16
  export { default as enUS } from './en-US';
17
17
  export { default as zhCN } from './zh-CN';
18
+ export { default as ruRU } from './ru-RU';
@@ -0,0 +1,4 @@
1
+ import { default as zhCN } from './zh-CN';
2
+
3
+ declare const locale: typeof zhCN;
4
+ export default locale;
@@ -1,5 +1,5 @@
1
- import { INotificationService } from '../notification/notification.service';
2
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { INotificationService } from '../notification/notification.service';
3
3
 
4
4
  export interface IBeforeCloseService {
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { INotificationService } from '../notification/notification.service';
2
1
  import { Disposable, ILogService, LocaleService } from '@univerjs/core';
2
+ import { INotificationService } from '../notification/notification.service';
3
3
 
4
4
  export declare const PLAIN_TEXT_CLIPBOARD_MIME_TYPE = "text/plain";
5
5
  export declare const HTML_CLIPBOARD_MIME_TYPE = "text/html";
@@ -1,6 +1,6 @@
1
- import { IConfirmPartMethodOptions } from '../../views/components/confirm-part/interface';
2
- import { Subject } from 'rxjs';
3
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { Subject } from 'rxjs';
3
+ import { IConfirmPartMethodOptions } from '../../views/components/confirm-part/interface';
4
4
 
5
5
  export declare const IConfirmService: import('@wendellhu/redi').IdentifierDecorator<IConfirmService>;
6
6
  export interface IConfirmService {
@@ -1,12 +1,18 @@
1
- import { IConfirmService } from './confirm.service';
2
- import { IConfirmPartMethodOptions } from '../../views/components/confirm-part/interface';
1
+ import { Disposable } from '@univerjs/core';
2
+ import { IDisposable, Injector } from '@wendellhu/redi';
3
3
  import { Subject } from 'rxjs';
4
- import { IDisposable } from '@wendellhu/redi';
4
+ import { IConfirmPartMethodOptions } from '../../views/components/confirm-part/interface';
5
+ import { IUIPartsService } from '../parts/parts.service';
6
+ import { IConfirmService } from './confirm.service';
5
7
 
6
- export declare class DesktopConfirmService implements IConfirmService {
8
+ export declare class DesktopConfirmService extends Disposable implements IConfirmService {
9
+ protected readonly _injector: Injector;
10
+ protected readonly _uiPartsService: IUIPartsService;
7
11
  private _confirmOptions;
8
12
  readonly confirmOptions$: Subject<IConfirmPartMethodOptions[]>;
13
+ constructor(_injector: Injector, _uiPartsService: IUIPartsService);
9
14
  open(option: IConfirmPartMethodOptions): IDisposable;
10
15
  confirm(params: IConfirmPartMethodOptions): Promise<boolean>;
11
16
  close(id: string): void;
17
+ protected _initUIPart(): void;
12
18
  }
@@ -1,6 +1,6 @@
1
- import { IDisposable } from '@wendellhu/redi';
2
- import { IMouseEvent, IPointerEvent } from '@univerjs/engine-render';
3
1
  import { Disposable } from '@univerjs/core';
2
+ import { IMouseEvent, IPointerEvent } from '@univerjs/engine-render';
3
+ import { IDisposable } from '@wendellhu/redi';
4
4
 
5
5
  export interface IContextMenuHandler {
6
6
  /** A callback to open context menu with given position and menu type. */
@@ -1,14 +1,19 @@
1
- import { IDialogService } from './dialog.service';
2
- import { IDialogPartMethodOptions } from '../../views/components/dialog-part/interface';
3
- import { Subject } from 'rxjs';
4
- import { IDisposable } from '@wendellhu/redi';
5
1
  import { Disposable } from '@univerjs/core';
2
+ import { IDisposable, Injector } from '@wendellhu/redi';
3
+ import { Subject } from 'rxjs';
4
+ import { IDialogPartMethodOptions } from '../../views/components/dialog-part/interface';
5
+ import { IUIPartsService } from '../parts/parts.service';
6
+ import { IDialogService } from './dialog.service';
6
7
 
7
8
  export declare class DesktopDialogService extends Disposable implements IDialogService {
8
- private _dialogOptions;
9
- private readonly _dialogOptions$;
9
+ protected readonly _injector: Injector;
10
+ protected readonly _uiPartsService: IUIPartsService;
11
+ protected _dialogOptions: IDialogPartMethodOptions[];
12
+ protected readonly _dialogOptions$: Subject<IDialogPartMethodOptions[]>;
13
+ constructor(_injector: Injector, _uiPartsService: IUIPartsService);
10
14
  dispose(): void;
11
15
  open(option: IDialogPartMethodOptions): IDisposable;
12
16
  close(id: string): void;
13
- getDialogs$(): Subject<IDialogPartMethodOptions[]>;
17
+ getDialogs$(): import('rxjs').Observable<IDialogPartMethodOptions[]>;
18
+ protected _initUIPart(): void;
14
19
  }
@@ -1,6 +1,6 @@
1
- import { IDialogPartMethodOptions } from '../../views/components/dialog-part/interface';
2
- import { Observable } from 'rxjs';
3
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { Observable } from 'rxjs';
3
+ import { IDialogPartMethodOptions } from '../../views/components/dialog-part/interface';
4
4
 
5
5
  export declare const IDialogService: import('@wendellhu/redi').IdentifierDecorator<IDialogService>;
6
6
  export interface IDialogService {
@@ -1,8 +1,8 @@
1
- import { LexerTreeBuilder } from '@univerjs/engine-formula';
2
- import { IRender, ISuccinctTextRangeParam, IRenderManagerService } from '@univerjs/engine-render';
3
- import { Observable } from 'rxjs';
4
- import { IDisposable, Injector } from '@wendellhu/redi';
5
1
  import { DocumentDataModel, IDocumentBody, IDocumentData, IPosition, Nullable, Disposable, IContextService, IUniverInstanceService } from '@univerjs/core';
2
+ import { IDisposable, Injector } from '@wendellhu/redi';
3
+ import { Observable } from 'rxjs';
4
+ import { IRender, ISuccinctTextRangeParam, IRenderManagerService } from '@univerjs/engine-render';
5
+ import { LexerTreeBuilder } from '@univerjs/engine-formula';
6
6
 
7
7
  export interface IEditorStateParam extends Partial<IPosition> {
8
8
  visible?: boolean;
@@ -1,8 +1,8 @@
1
- import { IGlobalZoneService } from './global-zone.service';
2
- import { ComponentManager } from '../../common/component-manager';
3
- import { Subject } from 'rxjs';
4
- import { ForwardRefExoticComponent } from 'react';
5
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { ForwardRefExoticComponent } from 'react';
3
+ import { Subject } from 'rxjs';
4
+ import { ComponentManager } from '../../common/component-manager';
5
+ import { IGlobalZoneService } from './global-zone.service';
6
6
 
7
7
  export declare class DesktopGlobalZoneService implements IGlobalZoneService {
8
8
  private readonly _componentManager;
@@ -1,5 +1,5 @@
1
- import { Subject } from 'rxjs';
2
1
  import { IDisposable } from '@wendellhu/redi';
2
+ import { Subject } from 'rxjs';
3
3
 
4
4
  export declare const IGlobalZoneService: import('@wendellhu/redi').IdentifierDecorator<IGlobalZoneService>;
5
5
  export interface IGlobalZoneService {