@univerjs/ui 0.5.4 → 0.5.5-experimental.20250123-34738ff
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +23 -32
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +211 -155
- package/lib/es/index.js +5756 -6080
- package/lib/es/locale/en-US.js +2 -2
- package/lib/es/locale/fa-IR.js +2 -2
- package/lib/es/locale/fr-FR.js +2 -2
- package/lib/es/locale/ru-RU.js +2 -2
- package/lib/es/locale/vi-VN.js +2 -2
- package/lib/es/locale/zh-CN.js +2 -2
- package/lib/es/locale/zh-TW.js +2 -2
- package/lib/index.css +1 -1
- package/lib/types/components/custom-label/CustomLabel.d.ts +2 -2
- package/lib/types/components/font-family/FontFamily.d.ts +1 -2
- package/lib/types/components/font-family/FontFamilyItem.d.ts +1 -2
- package/lib/types/components/font-size/FontSize.d.ts +1 -2
- package/lib/types/components/hooks/{__tests__/observable.spec.d.ts → index.d.ts} +5 -1
- package/lib/types/components/hooks/update-effect.d.ts +2 -0
- package/lib/types/components/hooks/useClickOutSide.d.ts +5 -0
- package/lib/types/components/menu/desktop/Menu.d.ts +1 -2
- package/lib/types/components/menu/mobile/MobileMenu.d.ts +1 -2
- package/lib/types/components/menu/mobile/MobileMenu.stories.d.ts +1 -2
- package/lib/types/components/notification/Notification.d.ts +2 -3
- package/lib/types/components/notification/Notification.stories.d.ts +1 -2
- package/lib/types/components/progress-bar/ProgressBar.d.ts +16 -2
- package/lib/types/controllers/ui/ui-mobile.controller.d.ts +3 -3
- package/lib/types/facade/f-enum.d.ts +6 -0
- package/lib/types/facade/f-hooks.d.ts +6 -0
- package/lib/types/facade/f-menu-builder.d.ts +67 -18
- package/lib/types/facade/f-shortcut.d.ts +30 -2
- package/lib/types/facade/f-univer.d.ts +17 -1
- package/lib/types/index.d.ts +3 -5
- package/lib/types/services/clipboard/clipboard-interface.service.d.ts +1 -0
- package/lib/types/services/parts/parts.service.d.ts +2 -1
- package/lib/types/views/MobileApp.d.ts +1 -2
- package/lib/types/views/components/ComponentContainer.d.ts +1 -1
- package/lib/types/views/components/confirm-part/ConfirmPart.d.ts +16 -2
- package/lib/types/views/components/context-menu/ContextMenu.d.ts +16 -2
- package/lib/types/views/components/context-menu/MobileContextMenu.d.ts +16 -2
- package/lib/types/views/components/dialog-part/DialogPart.d.ts +16 -2
- package/lib/types/views/components/dom/FloatDom.d.ts +16 -2
- package/lib/types/views/components/global-zone/GlobalZone.d.ts +16 -2
- package/lib/types/views/components/popup/CanvasPopup.d.ts +16 -2
- package/lib/types/views/components/popup/RectPopup.d.ts +3 -2
- package/lib/types/views/components/popup/dom-popup.d.ts +12 -0
- package/lib/types/views/components/popup/single-canvas-popup.d.ts +9 -0
- package/lib/types/views/components/ribbon/Button/ToolbarButton.d.ts +1 -1
- package/lib/types/views/components/ribbon/Ribbon.d.ts +2 -2
- package/lib/types/views/components/ribbon/TooltipButtonWrapper.d.ts +1 -1
- package/lib/types/views/components/shortcut-panel/ShortcutPanel.d.ts +16 -2
- package/lib/types/views/components/sidebar/Sidebar.d.ts +16 -2
- package/lib/types/views/components/zen-zone/ZenZone.d.ts +16 -2
- package/lib/types/views/workbench/Workbench.d.ts +1 -2
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +23 -32
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +9 -9
- package/LICENSE +0 -176
package/lib/es/locale/en-US.js
CHANGED
package/lib/es/locale/fa-IR.js
CHANGED
package/lib/es/locale/fr-FR.js
CHANGED
package/lib/es/locale/ru-RU.js
CHANGED
package/lib/es/locale/vi-VN.js
CHANGED
package/lib/es/locale/zh-CN.js
CHANGED
package/lib/es/locale/zh-TW.js
CHANGED
package/lib/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.univer-pointer-events-none{pointer-events:none}.univer-absolute{position:absolute}.univer-relative{position:relative}.univer-right-0{right:0}.univer-right-2{right:.5rem}.univer-top-0{top:0}.univer-box-border{box-sizing:border-box}.univer-flex{display:flex}.univer-grid{display:grid}.univer-h-0{height:0px}.univer-h-6{height:1.5rem}.univer-h-8{height:2rem}.univer-h-full{height:100%}.univer-w-5{width:1.25rem}.univer-cursor-not-allowed{cursor:not-allowed}.univer-cursor-pointer{cursor:pointer}.univer-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.univer-items-center{align-items:center}.univer-justify-center{justify-content:center}.univer-gap-2{gap:.5rem}.univer-overflow-hidden{overflow:hidden}.univer-rounded{border-radius:.25rem}.\!univer-bg-primary-500{--tw-bg-opacity: 1 !important;background-color:rgb(70 106 247 / var(--tw-bg-opacity, 1))!important}.univer-bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(227 229 234 / var(--tw-bg-opacity, 1))}.univer-bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.univer-bg-primary-500{--tw-bg-opacity: 1;background-color:rgb(70 106 247 / var(--tw-bg-opacity, 1))}.univer-px-2{padding-left:.5rem;padding-right:.5rem}.univer-py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.univer-pr-5{padding-right:1.25rem}.univer-text-sm{font-size:.875rem;line-height:1.25rem}.univer-text-gray-200{--tw-text-opacity: 1;color:rgb(227 229 234 / var(--tw-text-opacity, 1))}.univer-text-gray-400{--tw-text-opacity: 1;color:rgb(151 157 172 / var(--tw-text-opacity, 1))}.univer-text-gray-700{--tw-text-opacity: 1;color:rgb(44 48 64 / var(--tw-text-opacity, 1))}.univer-text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.univer-underline{text-decoration-line:underline}.univer-transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.univer-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\:\!univer-bg-primary-500:hover{--tw-bg-opacity: 1 !important;background-color:rgb(70 106 247 / var(--tw-bg-opacity, 1))!important}.hover\:univer-bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(238 239 241 / var(--tw-bg-opacity, 1))}.hover\:univer-bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(227 229 234 / var(--tw-bg-opacity, 1))}.hover\:univer-bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(205 208 216 / var(--tw-bg-opacity, 1))}.\[\&\>\*\]\:univer-inline-flex>*{display:inline-flex}.\[\&\>\*\]\:univer-h-6>*{height:1.5rem}.\[\&\>\*\]\:univer-items-center>*{align-items:center}.\[\&\>\*\]\:univer-rounded>*{border-radius:.25rem}.\[\&\>\*\]\:univer-px-1>*{padding-left:.25rem;padding-right:.25rem}.\[\&\>\*\]\:univer-transition-colors>*{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\:\[\&\>\*\]\:univer-bg-gray-300>*:hover{--tw-bg-opacity: 1;background-color:rgb(205 208 216 / var(--tw-bg-opacity, 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-popup-fixed{position:fixed;z-index:1000;top:-9999px;left:-9999px}.univer-menu-item-no-hover,.univer-menu-item-no-hover.univer-menu-item-active{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-progress-bar{width:160px;height:4px;background-color:rgb(var(--border-color));border-radius:var(--border-radius-lg);margin-right:var(--margin-xs)}.univer-progress-bar-container{display:flex;align-items:center;margin:0 var(--margin-xs) 0 var(--margin-xs)}.univer-progress-bar-label{font-size:var(--font-size-xxs);color:rgb(var(--text-color-secondary));width:98px;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:var(--margin-xs);line-height:17px}.univer-progress-bar-inner{height:4px;border-radius:var(--border-radius-lg);transition:width .5s}.univer-progress-bar-close-button{background:none;border:none;font-size:var(--font-size-xxs);color:rgb(var(--text-color));cursor:pointer;padding:0;margin:0;line-height:1;display:flex;align-items:center}.univer-progress-bar-close-button:hover{color:rgb(var(--text-color-secondary))}.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-float-dom-wrapper{z-index:10}.univer-float-dom{overflow:hidden}.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-no-icon{padding:var(--padding-xs)}.univer-toolbar-btn-active{background-color:rgb(var(--grey-100))}.univer-toolbar-btn-active[disabled]{color:rgba(var(--text-color),.25)}.univer-toolbar{-webkit-user-select:none;-moz-user-select:none;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{flex:1;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;align-items:center;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{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{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: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{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))}.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;z-index:-1;transition:all .2s ease-in-out;display:flex;flex-direction:row}.univer-zen-zone-open{z-index:100;top:0;left:0;width:100%;height:100%;background:rgb(var(--bg-color));opacity:1}.univer-zen-zone-close{opacity:0}.univer-zen-zone-editor-container{flex:1;position:relative}.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-workbench-layout{display:flex;flex-direction:column;height:100%;background-color:rgb(var(--bg-color));min-height:0;position:relative}.univer-workbench-custom-header{position:relative;display:flex;flex-direction:column;min-height:0;background-color:rgb(var(--color-white))}.univer-workbench-container{position:relative;display:flex;flex:1;flex-direction:column;min-height:0}.univer-workbench-container-header{position:relative;z-index:10;width:100%}.univer-workbench-container-wrapper{display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:100%;height:100%;overflow:hidden}.univer-workbench-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-workbench-container-doc-content{background:rgb(var(--bg-color-secondary))}.univer-workbench-container-canvas{position:relative;overflow:hidden}.univer-workbench-container-left-sidebar,.univer-workbench-container-sidebar{height:100%}.univer-mobile-menu-container{min-width:32px;max-width:200px;display:grid;grid-gap:4px;background-color:#000;border-radius:4px;padding:4px 8px}.univer-mobile-menu-item{display:flex;flex-direction:column;justify-content:center;align-items:center;border:none;background:none;color:#fff;width:48px}.univer-mobile-menu-item>svg{font-size:18px;height:18px;width:18px}.univer-mobile-menu-item>span{width:100%;margin-top:2px;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.univer-app-layout{display:flex;flex-direction:column;height:100%;background-color:rgb(var(--bg-color));min-height:0;position:relative}.univer-app-custom-header{position:relative;display:flex;flex-direction:column;min-height:0;background-color:rgb(var(--color-white))}.univer-app-header{width:100vw}.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-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:-moz-fit-content;width:fit-content;height:-moz-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}}
|
|
1
|
+
.univer-pointer-events-none{pointer-events:none}.univer-absolute{position:absolute}.univer-relative{position:relative}.univer-right-0{right:0}.univer-right-2{right:.5rem}.univer-top-0{top:0}.univer-box-border{box-sizing:border-box}.univer-flex{display:flex}.univer-grid{display:grid}.univer-h-0{height:0px}.univer-h-6{height:1.5rem}.univer-h-8{height:2rem}.univer-h-full{height:100%}.univer-w-5{width:1.25rem}.univer-cursor-not-allowed{cursor:not-allowed}.univer-cursor-pointer{cursor:pointer}.univer-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.univer-items-center{align-items:center}.univer-justify-center{justify-content:center}.univer-gap-2{gap:.5rem}.univer-overflow-hidden{overflow:hidden}.univer-rounded{border-radius:.25rem}.\!univer-bg-primary-500{--tw-bg-opacity: 1 !important;background-color:#466af7!important;background-color:rgba(70,106,247,var(--tw-bg-opacity, 1))!important}.univer-bg-gray-200{--tw-bg-opacity: 1;background-color:#e3e5ea;background-color:rgba(227,229,234,var(--tw-bg-opacity, 1))}.univer-bg-gray-50{--tw-bg-opacity: 1;background-color:#f9fafb;background-color:rgba(249,250,251,var(--tw-bg-opacity, 1))}.univer-bg-primary-500{--tw-bg-opacity: 1;background-color:#466af7;background-color:rgba(70,106,247,var(--tw-bg-opacity, 1))}.univer-px-2{padding-left:.5rem;padding-right:.5rem}.univer-py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.univer-pr-5{padding-right:1.25rem}.univer-text-sm{font-size:.875rem;line-height:1.25rem}.univer-text-gray-200{--tw-text-opacity: 1;color:#e3e5ea;color:rgba(227,229,234,var(--tw-text-opacity, 1))}.univer-text-gray-400{--tw-text-opacity: 1;color:#979dac;color:rgba(151,157,172,var(--tw-text-opacity, 1))}.univer-text-gray-700{--tw-text-opacity: 1;color:#2c3040;color:rgba(44,48,64,var(--tw-text-opacity, 1))}.univer-text-white{--tw-text-opacity: 1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity, 1))}.univer-underline{text-decoration-line:underline}.univer-transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.univer-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\:\!univer-bg-primary-500:hover{--tw-bg-opacity: 1 !important;background-color:#466af7!important;background-color:rgba(70,106,247,var(--tw-bg-opacity, 1))!important}.hover\:univer-bg-gray-100:hover{--tw-bg-opacity: 1;background-color:#eeeff1;background-color:rgba(238,239,241,var(--tw-bg-opacity, 1))}.hover\:univer-bg-gray-200:hover{--tw-bg-opacity: 1;background-color:#e3e5ea;background-color:rgba(227,229,234,var(--tw-bg-opacity, 1))}.hover\:univer-bg-gray-300:hover{--tw-bg-opacity: 1;background-color:#cdd0d8;background-color:rgba(205,208,216,var(--tw-bg-opacity, 1))}.\[\&\>\*\]\:univer-inline-flex>*{display:inline-flex}.\[\&\>\*\]\:univer-h-6>*{height:1.5rem}.\[\&\>\*\]\:univer-items-center>*{align-items:center}.\[\&\>\*\]\:univer-rounded>*{border-radius:.25rem}.\[\&\>\*\]\:univer-px-1>*{padding-left:.25rem;padding-right:.25rem}.\[\&\>\*\]\:univer-transition-colors>*{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\:\[\&\>\*\]\:univer-bg-gray-300>*:hover{--tw-bg-opacity: 1;background-color:#cdd0d8;background-color:rgba(205,208,216,var(--tw-bg-opacity, 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-popup-fixed{position:fixed;z-index:1020;top:-9999px;left:-9999px}.univer-menu-item-no-hover,.univer-menu-item-no-hover.univer-menu-item-active{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-progress-bar{width:160px;height:4px;background-color:rgb(var(--border-color));border-radius:var(--border-radius-lg);margin-right:var(--margin-xs)}.univer-progress-bar-container{display:flex;align-items:center;margin:0 var(--margin-xs) 0 var(--margin-xs)}.univer-progress-bar-label{font-size:var(--font-size-xxs);color:rgb(var(--text-color-secondary));width:98px;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:var(--margin-xs);line-height:17px}.univer-progress-bar-inner{height:4px;border-radius:var(--border-radius-lg);transition:width .5s}.univer-progress-bar-close-button{background:none;border:none;font-size:var(--font-size-xxs);color:rgb(var(--text-color));cursor:pointer;padding:0;margin:0;line-height:1;display:flex;align-items:center}.univer-progress-bar-close-button:hover{color:rgb(var(--text-color-secondary))}.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-float-dom-wrapper{z-index:10}.univer-float-dom{overflow:hidden}.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-no-icon{padding:var(--padding-xs)}.univer-toolbar-btn-active{background-color:rgb(var(--grey-100))}.univer-toolbar-btn-active[disabled]{color:rgba(var(--text-color),.25)}.univer-toolbar{-webkit-user-select:none;-moz-user-select:none;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{flex:1;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:normal;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):not(: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;align-items:center;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{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{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: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{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))}.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;z-index:-1;transition:all .2s ease-in-out;display:flex;flex-direction:row}.univer-zen-zone-open{z-index:100;top:0;left:0;width:100%;height:100%;background:rgb(var(--bg-color));opacity:1}.univer-zen-zone-close{opacity:0}.univer-zen-zone-editor-container{flex:1;position:relative}.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-workbench-layout{display:flex;flex-direction:column;height:100%;background-color:rgb(var(--bg-color));min-height:0;position:relative}.univer-workbench-custom-header{position:relative;display:flex;flex-direction:column;min-height:0;background-color:rgb(var(--color-white))}.univer-workbench-container{position:relative;display:flex;flex:1;flex-direction:column;min-height:0}.univer-workbench-container-header{position:relative;z-index:10;width:100%}.univer-workbench-container-wrapper{display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:100%;height:100%;overflow:hidden}.univer-workbench-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-workbench-container-doc-content{background:rgb(var(--bg-color-secondary))}.univer-workbench-container-canvas{position:relative;overflow:hidden}.univer-workbench-container-left-sidebar,.univer-workbench-container-sidebar{height:100%}.univer-mobile-menu-container{min-width:32px;max-width:200px;display:grid;grid-gap:4px;background-color:#000;border-radius:4px;padding:4px 8px}.univer-mobile-menu-item{display:flex;flex-direction:column;justify-content:center;align-items:center;border:none;background:none;color:#fff;width:48px}.univer-mobile-menu-item>svg{font-size:18px;height:18px;width:18px}.univer-mobile-menu-item>span{width:100%;margin-top:2px;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.univer-app-layout{display:flex;flex-direction:column;height:100%;background-color:rgb(var(--bg-color));min-height:0;position:relative}.univer-app-custom-header{position:relative;display:flex;flex-direction:column;min-height:0;background-color:rgb(var(--color-white))}.univer-app-header{width:100vw}.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-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:-moz-fit-content;width:fit-content;height:-moz-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}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { Observable } from 'rxjs';
|
|
3
2
|
import { IMenuSelectorItem } from '../../services/menu/menu';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
4
|
export type ICustomLabelProps<T = undefined> = {
|
|
5
5
|
value?: string | number | undefined;
|
|
6
6
|
value$?: Observable<T>;
|
|
@@ -11,4 +11,4 @@ export type ICustomLabelProps<T = undefined> = {
|
|
|
11
11
|
* The component to render toolbar item label and menu item label.
|
|
12
12
|
* @param props
|
|
13
13
|
*/
|
|
14
|
-
export declare function CustomLabel(props: ICustomLabelProps): JSX.Element;
|
|
14
|
+
export declare function CustomLabel(props: ICustomLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { IFontFamilyProps } from './interface';
|
|
3
|
-
export declare const FontFamily: (props: IFontFamilyProps) =>
|
|
2
|
+
export declare const FontFamily: (props: IFontFamilyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { IFontFamilyItemProps } from './interface';
|
|
3
|
-
export declare const FontFamilyItem: (props: IFontFamilyItemProps) =>
|
|
2
|
+
export declare const FontFamilyItem: (props: IFontFamilyItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,4 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export {};
|
|
16
|
+
export { useEvent } from './event';
|
|
17
|
+
export { useObservable, useObservableRef } from './observable';
|
|
18
|
+
export { useUpdateEffect } from './update-effect';
|
|
19
|
+
export { useClickOutSide } from './useClickOutSide';
|
|
20
|
+
export { useVirtualList } from './virtual-list';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IValueOption } from '../../../services/menu/menu';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
2
|
export interface IBaseMenuProps {
|
|
4
3
|
parentKey?: string | number;
|
|
5
4
|
menuType?: string;
|
|
@@ -12,4 +11,4 @@ export interface IBaseMenuProps {
|
|
|
12
11
|
overViewport?: 'scroll';
|
|
13
12
|
onOptionSelect?: (option: IValueOption) => void;
|
|
14
13
|
}
|
|
15
|
-
export declare const Menu: (props: IBaseMenuProps) =>
|
|
14
|
+
export declare const Menu: (props: IBaseMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { IBaseMenuProps } from '../desktop/Menu';
|
|
3
2
|
/**
|
|
4
3
|
* The mobile context menu wrapper.
|
|
5
4
|
*/
|
|
6
|
-
export declare function MobileMenu(props: IBaseMenuProps):
|
|
5
|
+
export declare function MobileMenu(props: IBaseMenuProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Placement } from 'rc-notification/es/interface';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
2
|
import { Subject } from 'rxjs';
|
|
4
3
|
export type NotificationType = 'success' | 'info' | 'warning' | 'error';
|
|
5
4
|
export interface INotificationOptions {
|
|
@@ -37,8 +36,8 @@ export interface INotificationOptions {
|
|
|
37
36
|
lines?: number;
|
|
38
37
|
}
|
|
39
38
|
export declare const notificationObserver: Subject<INotificationOptions>;
|
|
40
|
-
export declare const PureContent: (props: INotificationOptions) =>
|
|
41
|
-
export declare function Notification():
|
|
39
|
+
export declare const PureContent: (props: INotificationOptions) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export declare function Notification(): import("react/jsx-runtime").JSX.Element | null;
|
|
42
41
|
export declare const notification: {
|
|
43
42
|
show: (options: INotificationOptions) => void;
|
|
44
43
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/react';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
2
|
import { Notification } from './Notification';
|
|
4
3
|
declare const meta: Meta<typeof Notification>;
|
|
5
4
|
export default meta;
|
|
6
5
|
export declare const Playground: {
|
|
7
|
-
render: () =>
|
|
6
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
};
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
|
|
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
|
+
*/
|
|
2
16
|
export interface IProgressBarProps {
|
|
3
17
|
progress: {
|
|
4
18
|
done: number;
|
|
@@ -9,4 +23,4 @@ export interface IProgressBarProps {
|
|
|
9
23
|
onTerminate?: () => void;
|
|
10
24
|
onClearProgress?: () => void;
|
|
11
25
|
}
|
|
12
|
-
export declare function ProgressBar(props: IProgressBarProps):
|
|
26
|
+
export declare function ProgressBar(props: IProgressBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { IUniverUIConfig } from '../config.schema';
|
|
2
|
+
import { IUIController } from './ui.controller';
|
|
1
3
|
import { Disposable, Injector, IUniverInstanceService, LifecycleService } from '@univerjs/core';
|
|
2
4
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
5
|
import { ILayoutService } from '../../services/layout/layout.service';
|
|
4
|
-
import { IUIPartsService } from '../../services/parts/parts.service';
|
|
5
|
-
import { IUniverUIConfig } from '../config.schema';
|
|
6
6
|
import { IMenuManagerService } from '../../services/menu/menu-manager.service';
|
|
7
|
-
import {
|
|
7
|
+
import { IUIPartsService } from '../../services/parts/parts.service';
|
|
8
8
|
export declare class MobileUIController extends Disposable implements IUIController {
|
|
9
9
|
private readonly _config;
|
|
10
10
|
private readonly _instanceService;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { FEnum } from '@univerjs/core';
|
|
2
2
|
import { BuiltInUIPart } from '@univerjs/ui';
|
|
3
|
+
/**
|
|
4
|
+
* @ignore
|
|
5
|
+
*/
|
|
3
6
|
interface IFUIEnumMixin {
|
|
4
7
|
get BuiltInUIPart(): typeof BuiltInUIPart;
|
|
5
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
6
12
|
export declare class FUIEnum extends FEnum implements IFUIEnumMixin {
|
|
7
13
|
get BuiltInUIPart(): typeof BuiltInUIPart;
|
|
8
14
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { IDisposable, FHooks } from '@univerjs/core';
|
|
2
|
+
/**
|
|
3
|
+
* @ignore
|
|
4
|
+
*/
|
|
2
5
|
export interface IFHooksSheetsUIMixin {
|
|
3
6
|
/**
|
|
4
7
|
* The onBeforeCopy event is fired before a copy operation is performed.
|
|
@@ -31,6 +34,9 @@ export interface IFHooksSheetsUIMixin {
|
|
|
31
34
|
*/
|
|
32
35
|
onPaste(callback: () => void): IDisposable;
|
|
33
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* @ignore
|
|
39
|
+
*/
|
|
34
40
|
export declare class FHooksSheetsMixin extends FHooks implements IFHooksSheetsUIMixin {
|
|
35
41
|
onBeforeCopy(callback: () => void): IDisposable;
|
|
36
42
|
onCopy(callback: () => void): IDisposable;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { MenuSchemaType, IMenuManagerService, MenuManagerPosition, RibbonPosition, RibbonStartGroup } from '@univerjs/ui';
|
|
2
2
|
import { FBase, ICommandService, Injector } from '@univerjs/core';
|
|
3
|
+
/**
|
|
4
|
+
* @ignore
|
|
5
|
+
*/
|
|
3
6
|
export interface IFacadeMenuItem {
|
|
4
7
|
/**
|
|
5
8
|
* The unique identifier of the menu item.
|
|
@@ -27,6 +30,9 @@ export interface IFacadeMenuItem {
|
|
|
27
30
|
*/
|
|
28
31
|
order?: number;
|
|
29
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* @ignore
|
|
35
|
+
*/
|
|
30
36
|
export interface IFacadeSubmenuItem {
|
|
31
37
|
/**
|
|
32
38
|
* The unique identifier of the menu item.
|
|
@@ -50,11 +56,50 @@ export interface IFacadeSubmenuItem {
|
|
|
50
56
|
order?: number;
|
|
51
57
|
}
|
|
52
58
|
/**
|
|
53
|
-
*
|
|
54
|
-
|
|
55
|
-
|
|
59
|
+
* @ignore
|
|
60
|
+
*/
|
|
61
|
+
declare abstract class FMenuBase extends FBase {
|
|
62
|
+
protected abstract readonly _menuManagerService: IMenuManagerService;
|
|
63
|
+
abstract __getSchema(): {
|
|
64
|
+
[key: string]: MenuSchemaType;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Append the menu to any menu position on Univer UI.
|
|
68
|
+
* @param {string | string[]} path - Some predefined path to append the menu. The paths can be an array,
|
|
69
|
+
* or an array joined by `|` separator. Since lots of submenus reuse the same name,
|
|
70
|
+
* you may need to specify their parent menus as well.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```typescript
|
|
74
|
+
* // This menu item will appear on every `contextMenu.others` section.
|
|
75
|
+
* univerAPI.createMenu({
|
|
76
|
+
* id: 'custom-menu-id-1',
|
|
77
|
+
* title: 'Custom Menu 1',
|
|
78
|
+
* action: () => {},
|
|
79
|
+
* }).appendTo('contextMenu.others');
|
|
80
|
+
*
|
|
81
|
+
* // This menu item will only appear on the `contextMenu.others` section on the main area.
|
|
82
|
+
* univerAPI.createMenu({
|
|
83
|
+
* id: 'custom-menu-id-2',
|
|
84
|
+
* title: 'Custom Menu 2',
|
|
85
|
+
* action: () => { console.log(123); },
|
|
86
|
+
* }).appendTo(['contextMenu.mainArea', 'contextMenu.others']);
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
appendTo(path: string | string[]): void;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* This is the builder for adding a menu to Univer. You shall never construct this
|
|
93
|
+
* class by yourself. Instead, call `createMenu` of {@link FUniver} to create a instance.
|
|
94
|
+
*
|
|
95
|
+
* Please notice that until the `appendTo` method is called, the menu item is not added to the UI.
|
|
96
|
+
*
|
|
97
|
+
* Please note that this menu cannot have submenus. If you want to
|
|
98
|
+
* have submenus, please use {@link FSubmenu}.
|
|
99
|
+
*
|
|
100
|
+
* @hideconstructor
|
|
56
101
|
*/
|
|
57
|
-
export declare class FMenu extends
|
|
102
|
+
export declare class FMenu extends FMenuBase {
|
|
58
103
|
private readonly _item;
|
|
59
104
|
protected readonly _injector: Injector;
|
|
60
105
|
protected readonly _commandService: ICommandService;
|
|
@@ -65,17 +110,23 @@ export declare class FMenu extends FBase {
|
|
|
65
110
|
private _commandToRegister;
|
|
66
111
|
private _buildingSchema;
|
|
67
112
|
constructor(_item: IFacadeMenuItem, _injector: Injector, _commandService: ICommandService, _menuManagerService: IMenuManagerService);
|
|
68
|
-
/**
|
|
113
|
+
/**
|
|
114
|
+
* @ignore
|
|
115
|
+
*/
|
|
69
116
|
__getSchema(): {
|
|
70
117
|
[key: string]: MenuSchemaType;
|
|
71
118
|
};
|
|
72
|
-
/**
|
|
73
|
-
* Append the menu to any menu position on Univer UI.
|
|
74
|
-
* @param path Some predefined path to append the menu.
|
|
75
|
-
*/
|
|
76
|
-
appendTo(path: string): void;
|
|
77
119
|
}
|
|
78
|
-
|
|
120
|
+
/**
|
|
121
|
+
* This is the builder for add a menu that can contains submenus to Univer. You shall
|
|
122
|
+
* never construct this class by yourself. Instead, call `createSubmenu` of {@link FUniver} to
|
|
123
|
+
* create a instance.
|
|
124
|
+
*
|
|
125
|
+
* Please notice that until the `appendTo` method is called, the menu item is not added to the UI.
|
|
126
|
+
*
|
|
127
|
+
* @hideconstructor
|
|
128
|
+
*/
|
|
129
|
+
export declare class FSubmenu extends FMenuBase {
|
|
79
130
|
private readonly _item;
|
|
80
131
|
protected readonly _injector: Injector;
|
|
81
132
|
protected readonly _menuManagerService: IMenuManagerService;
|
|
@@ -85,22 +136,20 @@ export declare class FSubmenu extends FBase {
|
|
|
85
136
|
constructor(_item: IFacadeSubmenuItem, _injector: Injector, _menuManagerService: IMenuManagerService);
|
|
86
137
|
/**
|
|
87
138
|
* Add a menu to the submenu. It can be a {@link FMenu} or a {@link FSubmenu}.
|
|
88
|
-
* @param submenu Menu to add to the submenu.
|
|
89
|
-
* @returns The FSubmenu itself for chaining calls.
|
|
139
|
+
* @param {FMenu | FSubmenu} submenu - Menu to add to the submenu.
|
|
140
|
+
* @returns {FSubmenu} The FSubmenu itself for chaining calls.
|
|
90
141
|
*/
|
|
91
142
|
addSubmenu(submenu: FMenu | FSubmenu): this;
|
|
92
143
|
/**
|
|
93
144
|
* Add a separator to the submenu.
|
|
94
|
-
* @returns The FSubmenu itself for chaining calls.
|
|
145
|
+
* @returns {FSubmenu} The FSubmenu itself for chaining calls.
|
|
95
146
|
*/
|
|
96
147
|
addSeparator(): this;
|
|
97
148
|
/**
|
|
98
|
-
*
|
|
99
|
-
* @param path Some predefined path to append the menu.
|
|
149
|
+
* @ignore
|
|
100
150
|
*/
|
|
101
|
-
appendTo(path: string): void;
|
|
102
|
-
/** @ignore */
|
|
103
151
|
__getSchema(): {
|
|
104
152
|
[key: string]: MenuSchemaType;
|
|
105
153
|
};
|
|
106
154
|
}
|
|
155
|
+
export {};
|
|
@@ -1,11 +1,39 @@
|
|
|
1
1
|
import { IShortcutItem, IShortcutService } from '@univerjs/ui';
|
|
2
2
|
import { FBase, Injector } from '@univerjs/core';
|
|
3
|
+
/**
|
|
4
|
+
* The Facade API object to handle shortcuts in Univer
|
|
5
|
+
* @hideconstructor
|
|
6
|
+
*/
|
|
3
7
|
export declare class FShortcut extends FBase {
|
|
4
8
|
protected readonly _injector: Injector;
|
|
5
9
|
protected readonly _shortcutService: IShortcutService;
|
|
6
10
|
private _forceEscapeDisposable;
|
|
7
11
|
constructor(_injector: Injector, _shortcutService: IShortcutService);
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Enable shortcuts of Univer.
|
|
14
|
+
* @returns {FShortcut} The Facade API instance itself for chaining.
|
|
15
|
+
*/
|
|
16
|
+
enableShortcut(): this;
|
|
17
|
+
/**
|
|
18
|
+
* Disable shortcuts of Univer.
|
|
19
|
+
* @returns {FShortcut} The Facade API instance itself for chaining.
|
|
20
|
+
*/
|
|
21
|
+
disableShortcut(): this;
|
|
22
|
+
/**
|
|
23
|
+
* Dispatch a KeyboardEvent to the shortcut service and return the matched shortcut item.
|
|
24
|
+
* @param {KeyboardEvent} e - The KeyboardEvent to dispatch.
|
|
25
|
+
* @returns {IShortcutItem<object> | undefined} The matched shortcut item.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* const fShortcut = univerAPI.getShortcut();
|
|
30
|
+
* const pseudoEvent = new KeyboardEvent('keydown', { key: 's', ctrlKey: true });
|
|
31
|
+
* const ifShortcutItem = fShortcut.dispatchShortcutEvent(pseudoEvent);
|
|
32
|
+
* if (ifShortcutItem) {
|
|
33
|
+
* const commandId = ifShortcutItem.id;
|
|
34
|
+
* // Do something with the commandId.
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
10
38
|
dispatchShortcutEvent(e: KeyboardEvent): IShortcutItem<object> | undefined;
|
|
11
39
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { IDisposable, FUniver } from '@univerjs/core';
|
|
2
2
|
import { IMessageProps } from '@univerjs/design';
|
|
3
|
-
import { BuiltInUIPart, IDialogPartMethodOptions, ISidebarMethodOptions, ComponentManager } from '@univerjs/ui';
|
|
3
|
+
import { BuiltInUIPart, ComponentType, IComponentOptions, IDialogPartMethodOptions, ISidebarMethodOptions, ComponentManager } from '@univerjs/ui';
|
|
4
4
|
import { IFacadeMenuItem, IFacadeSubmenuItem, FMenu, FSubmenu } from './f-menu-builder';
|
|
5
5
|
import { FShortcut } from './f-shortcut';
|
|
6
|
+
/**
|
|
7
|
+
* @ignore
|
|
8
|
+
*/
|
|
6
9
|
export interface IFUniverUIMixin {
|
|
7
10
|
/**
|
|
8
11
|
* Return the URL of the current page.
|
|
@@ -117,7 +120,19 @@ export interface IFUniverUIMixin {
|
|
|
117
120
|
* ```
|
|
118
121
|
*/
|
|
119
122
|
registerUIPart(key: BuiltInUIPart, component: any): IDisposable;
|
|
123
|
+
/**
|
|
124
|
+
* register an component.
|
|
125
|
+
* @param component
|
|
126
|
+
* @example
|
|
127
|
+
* ```ts
|
|
128
|
+
* univerAPI.registerComponent('my-comp', () => React.createElement('h1', null, 'Custom Header'));
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
registerComponent(name: string, component: ComponentType, options?: IComponentOptions): IDisposable;
|
|
120
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* @ignore
|
|
135
|
+
*/
|
|
121
136
|
export declare class FUniverUIMixin extends FUniver implements IFUniverUIMixin {
|
|
122
137
|
getURL(): URL;
|
|
123
138
|
getShortcut(): FShortcut;
|
|
@@ -133,6 +148,7 @@ export declare class FUniverUIMixin extends FUniver implements IFUniverUIMixin {
|
|
|
133
148
|
setUIVisible(ui: BuiltInUIPart, visible: boolean): FUniver;
|
|
134
149
|
isUIVisible(ui: BuiltInUIPart): boolean;
|
|
135
150
|
registerUIPart(key: BuiltInUIPart, component: any): IDisposable;
|
|
151
|
+
registerComponent(name: string, component: any, options?: IComponentOptions): IDisposable;
|
|
136
152
|
}
|
|
137
153
|
declare module '@univerjs/core' {
|
|
138
154
|
interface FUniver extends IFUniverUIMixin {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -18,11 +18,9 @@ export * from './common';
|
|
|
18
18
|
export { getHeaderFooterMenuHiddenObservable, getMenuHiddenObservable } from './common/menu-hidden-observable';
|
|
19
19
|
export { mergeMenuConfigs } from './common/menu-merge-configs';
|
|
20
20
|
export * from './components';
|
|
21
|
-
export { useEvent } from './components/hooks/event';
|
|
22
21
|
export { t } from './components/hooks/locale';
|
|
23
|
-
export
|
|
22
|
+
export * from './components/hooks';
|
|
24
23
|
export { RectPopup } from './views/components/popup/RectPopup';
|
|
25
|
-
export { useVirtualList } from './components/hooks/virtual-list';
|
|
26
24
|
export { Menu as UIMenu } from './components/menu/desktop/Menu';
|
|
27
25
|
export { type INotificationOptions, type NotificationType } from './components/notification/Notification';
|
|
28
26
|
export { ProgressBar } from './components/progress-bar/ProgressBar';
|
|
@@ -38,13 +36,13 @@ export { UniverMobileUIPlugin } from './mobile-ui-plugin';
|
|
|
38
36
|
export { DesktopBeforeCloseService, IBeforeCloseService } from './services/before-close/before-close.service';
|
|
39
37
|
export { CopyCommand, CutCommand, PasteCommand, SheetPasteShortKeyCommandName } from './services/clipboard/clipboard.command';
|
|
40
38
|
export { supportClipboardAPI } from './services/clipboard/clipboard-utils';
|
|
41
|
-
export { BrowserClipboardService, FILE__BMP_CLIPBOARD_MIME_TYPE, FILE__JPEG_CLIPBOARD_MIME_TYPE, FILE__WEBP_CLIPBOARD_MIME_TYPE, FILE_PNG_CLIPBOARD_MIME_TYPE, FILE_SVG_XML_CLIPBOARD_MIME_TYPE, HTML_CLIPBOARD_MIME_TYPE, IClipboardInterfaceService, PLAIN_TEXT_CLIPBOARD_MIME_TYPE, } from './services/clipboard/clipboard-interface.service';
|
|
39
|
+
export { BrowserClipboardService, FILE__BMP_CLIPBOARD_MIME_TYPE, FILE__JPEG_CLIPBOARD_MIME_TYPE, FILE__WEBP_CLIPBOARD_MIME_TYPE, FILE_PNG_CLIPBOARD_MIME_TYPE, FILE_SVG_XML_CLIPBOARD_MIME_TYPE, HTML_CLIPBOARD_MIME_TYPE, IClipboardInterfaceService, imageMimeTypeSet, PLAIN_TEXT_CLIPBOARD_MIME_TYPE, } from './services/clipboard/clipboard-interface.service';
|
|
42
40
|
export { IConfirmService } from './services/confirm/confirm.service';
|
|
43
41
|
export { DesktopConfirmService } from './services/confirm/desktop-confirm.service';
|
|
44
42
|
export { ContextMenuService, type IContextMenuHandler, IContextMenuService, } from './services/contextmenu/contextmenu.service';
|
|
45
43
|
export { DesktopDialogService } from './services/dialog/desktop-dialog.service';
|
|
46
44
|
export { IDialogService } from './services/dialog/dialog.service';
|
|
47
|
-
export { CanvasFloatDomService, type IFloatDomLayout } from './services/dom/canvas-dom-layer.service';
|
|
45
|
+
export { CanvasFloatDomService, type IFloatDom, type IFloatDomLayout } from './services/dom/canvas-dom-layer.service';
|
|
48
46
|
export { DesktopGlobalZoneService } from './services/global-zone/desktop-global-zone.service';
|
|
49
47
|
export { IGlobalZoneService } from './services/global-zone/global-zone.service';
|
|
50
48
|
export { DesktopLayoutService, ILayoutService } from './services/layout/layout.service';
|
|
@@ -7,6 +7,7 @@ export declare const FILE__JPEG_CLIPBOARD_MIME_TYPE = "image/jpeg";
|
|
|
7
7
|
export declare const FILE__BMP_CLIPBOARD_MIME_TYPE = "image/bmp";
|
|
8
8
|
export declare const FILE__WEBP_CLIPBOARD_MIME_TYPE = "image/webp";
|
|
9
9
|
export declare const FILE_SVG_XML_CLIPBOARD_MIME_TYPE = "image/svg+xml";
|
|
10
|
+
export declare const imageMimeTypeSet: Set<string>;
|
|
10
11
|
/**
|
|
11
12
|
* This interface provides an interface to access system's clipboard.
|
|
12
13
|
*/
|
|
@@ -15,7 +15,8 @@ export declare enum BuiltInUIPart {
|
|
|
15
15
|
CUSTOM_HEADER = "custom-header",
|
|
16
16
|
CUSTOM_LEFT = "custom-left",
|
|
17
17
|
CUSTOM_RIGHT = "custom-right",
|
|
18
|
-
CUSTOM_FOOTER = "custom-footer"
|
|
18
|
+
CUSTOM_FOOTER = "custom-footer",
|
|
19
|
+
TOOLBAR = "toolbar"
|
|
19
20
|
}
|
|
20
21
|
export interface IUIPartsService {
|
|
21
22
|
componentRegistered$: Observable<ComponentPartKey>;
|