@univerjs/ui 0.1.2 → 0.1.3

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/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-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))}.univer-app-container{position:relative;display:flex;flex:1;flex-direction:column}.univer-app-container-header{position:relative;z-index:10;width:100%}.univer-app-container-wrapper{display:grid;grid-template-columns:1fr auto;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-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-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{display:flex;gap:var(--margin-xs);align-items:center;justify-content:center;box-sizing:border-box;height:100%;margin:0 auto}.univer-toolbar-more{max-width:80%}.univer-toolbar-more-container{display:grid;gap:var(--margin-xs) 0;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-group{display:flex;gap:var(--margin-xs);align-items:center}.univer-toolbar-group:not(:last-child,:empty):after{content:"";display:block;width:1px;height:20px;background-color:rgb(var(--border-color))}.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: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: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-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))}.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))}.univer-sidebar-header-close{cursor:pointer;color:rgb(var(--text-color-secondary))}.univer-sidebar-body{padding:0 var(--padding-xl)}.univer-sidebar-footer{position:sticky;bottom:0;padding:var(--padding-xl);background:rgb(var(--bg-color-secondary))}.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{border:1px solid rgb(var(--primary-color))}.univer-text-editor-container-error,.univer-text-editor-container-error:hover{border:1px solid rgb(var(--error-color))}.univer-text-editor-validation-error{font-size:10px;color:rgb(var(--error-color))}
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-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))}.univer-app-container{position:relative;display:flex;flex:1;flex-direction:column}.univer-app-container-header{position:relative;z-index:10;width:100%}.univer-app-container-wrapper{display:grid;grid-template-columns:1fr auto;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-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-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{display:flex;gap:var(--margin-xs);align-items:center;justify-content:center;box-sizing:border-box;height:100%;margin:0 auto}.univer-toolbar-more{max-width:80%}.univer-toolbar-more-container{display:grid;gap:var(--margin-xs) 0;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-group{display:flex;gap:var(--margin-xs);align-items:center}.univer-toolbar-group:not(:last-child,:empty):after{content:"";display:block;width:1px;height:20px;background-color:rgb(var(--border-color))}.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: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: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-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))}.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))}.univer-sidebar-header-close{cursor:pointer;color:rgb(var(--text-color-secondary))}.univer-sidebar-body{padding:0 var(--padding-xl)}.univer-sidebar-footer{position:sticky;bottom:0;padding:var(--padding-xl);background:rgb(var(--bg-color-secondary))}.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:32px}.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)}
@@ -14,15 +14,34 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { IDisposable } from '@wendellhu/redi';
17
- export interface ICustomComponent {
18
- name: string;
19
- props?: any;
17
+ import type { defineComponent } from 'vue';
18
+ import type React from 'react';
19
+ type ComponentFramework = 'vue3' | 'react';
20
+ interface IComponentOptions {
21
+ framework?: ComponentFramework;
20
22
  }
21
- export type ComponentList = Map<string, React.ForwardRefExoticComponent<any>>;
23
+ export interface IVue3Component {
24
+ framework: 'vue3';
25
+ component: ReturnType<typeof defineComponent>;
26
+ }
27
+ export interface IReactComponent {
28
+ framework: 'react';
29
+ component: React.ForwardRefExoticComponent<any>;
30
+ }
31
+ export type ComponentType = React.ForwardRefExoticComponent<any> | ReturnType<typeof defineComponent>;
32
+ export type ComponentList = Map<string, IVue3Component | IReactComponent>;
22
33
  export declare class ComponentManager {
23
34
  private _components;
24
35
  constructor();
25
- register(name: string, component: any): IDisposable;
26
- get(name: string): import("react").ForwardRefExoticComponent<any> | undefined;
36
+ register(name: string, component: ComponentType, options?: IComponentOptions): IDisposable;
37
+ get(name: string): React.ForwardRefExoticComponent<any> | ((props: any) => React.FunctionComponentElement<{
38
+ component: any;
39
+ props: Record<string, any>;
40
+ }>) | undefined;
27
41
  delete(name: string): void;
28
42
  }
43
+ export declare function VueComponentWrapper(options: {
44
+ component: ReturnType<typeof defineComponent>;
45
+ props: Record<string, any>;
46
+ }): React.DetailedReactHTMLElement<React.HTMLAttributes<HTMLElement>, HTMLElement>;
47
+ export {};
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ /// <reference types="react" />
16
17
  import type { Observable } from 'rxjs';
17
18
  import type { IMenuSelectorItem } from '../../services/menu/menu';
18
19
  export type ICustomLabelProps<T = undefined> = {
@@ -31,10 +31,17 @@ export interface ITextEditorProps {
31
31
  onlyInputFormula?: boolean;
32
32
  onlyInputRange?: boolean;
33
33
  onlyInputContent?: boolean;
34
+ isSingleChoice?: boolean;
35
+ openForSheetUnitId?: Nullable<string>;
36
+ openForSheetSubUnitId?: Nullable<string>;
37
+ onChange?: (value: Nullable<string>) => void;
38
+ onActive?: (state: boolean) => void;
39
+ onValid?: (state: boolean) => void;
40
+ placeholder?: string;
34
41
  }
35
42
  /**
36
43
  * The component to render toolbar item label and menu item label.
37
44
  * @param props
38
45
  */
39
- export declare function TextEditor(props: ITextEditorProps & MyComponentProps): JSX.Element | null;
46
+ export declare function TextEditor(props: ITextEditorProps & Omit<MyComponentProps, 'onChange' | 'onActive'>): JSX.Element | null;
40
47
  export {};
@@ -14,5 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { Observable } from 'rxjs';
17
+ type ObservableOrFn<T> = Observable<T> | (() => Observable<T>);
17
18
  export declare function useObservable<T>(observable: Observable<T>, defaultValue?: T): T | undefined;
18
19
  export declare function useObservable<T>(observable: Observable<T>, defaultValue?: T, shouldHaveSyncValue?: true): T;
20
+ export declare function useObservable<T>(observable: ObservableOrFn<T>, defaultValue?: T, shouldHaveSyncValue?: false, deps?: any[]): T | undefined;
21
+ export {};
@@ -0,0 +1,32 @@
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
+ */
16
+ import type { IUnitRange, Nullable } from '@univerjs/core';
17
+ import React from 'react';
18
+ export interface IRangeSelectorProps {
19
+ id: string;
20
+ value?: string;
21
+ onChange?: (ranges: IUnitRange[]) => void;
22
+ onActive?: (state: boolean) => void;
23
+ onValid?: (state: boolean) => void;
24
+ isSingleChoice?: boolean;
25
+ isReadonly?: boolean;
26
+ openForSheetUnitId?: Nullable<string>;
27
+ openForSheetSubUnitId?: Nullable<string>;
28
+ width?: number;
29
+ size?: 'mini' | 'small' | 'middle' | 'large';
30
+ placeholder?: string;
31
+ }
32
+ export declare function RangeSelector(props: IRangeSelectorProps): React.JSX.Element;
@@ -18,10 +18,12 @@ import { Injector } from '@wendellhu/redi';
18
18
  import { IMenuService } from '../services/menu/menu.service';
19
19
  import type { IShortcutItem } from '../services/shortcut/shortcut.service';
20
20
  import { IShortcutService } from '../services/shortcut/shortcut.service';
21
- import { IClipboardInterfaceService } from '../services/clipboard/clipboard-interface.service';
22
21
  export declare const CopyShortcutItem: IShortcutItem;
23
22
  export declare const CutShortcutItem: IShortcutItem;
24
- export declare const PasteShortcutItem: IShortcutItem;
23
+ /**
24
+ * This shortcut item is just for displaying shortcut info, do not use it.
25
+ */
26
+ export declare const OnlyDisplayPasteShortcutItem: IShortcutItem;
25
27
  export declare const UndoShortcutItem: IShortcutItem;
26
28
  export declare const RedoShortcutItem: IShortcutItem;
27
29
  /**
@@ -32,8 +34,7 @@ export declare class SharedController extends Disposable {
32
34
  private readonly _menuService;
33
35
  private readonly _shortcutService;
34
36
  private readonly _commandService;
35
- private readonly _interfaceService;
36
- constructor(_injector: Injector, _menuService: IMenuService, _shortcutService: IShortcutService, _commandService: ICommandService, _interfaceService: IClipboardInterfaceService);
37
+ constructor(_injector: Injector, _menuService: IMenuService, _shortcutService: IShortcutService, _commandService: ICommandService);
37
38
  initialize(): void;
38
39
  private _registerMenus;
39
40
  private _registerCommands;
@@ -17,10 +17,10 @@ import { Disposable, ICommandService } from '@univerjs/core';
17
17
  import { Injector } from '@wendellhu/redi';
18
18
  import { ComponentManager } from '../../common/component-manager';
19
19
  import { IMenuService } from '../../services/menu/menu.service';
20
+ import { IShortcutService } from '../../services/shortcut/shortcut.service';
20
21
  /**
21
22
  * This controller add a side panel to the application to display the shortcuts.
22
23
  */
23
24
  export declare class ShortcutPanelController extends Disposable {
24
- private readonly _injector;
25
- constructor(_injector: Injector, menuService: IMenuService, commandService: ICommandService, componentManager: ComponentManager);
25
+ constructor(injector: Injector, componentManager: ComponentManager, shortcutService: IShortcutService, menuService: IMenuService, commandService: ICommandService);
26
26
  }
@@ -47,14 +47,14 @@ export declare class DesktopUIController extends Disposable implements IDesktopU
47
47
  private readonly _injector;
48
48
  private readonly _lifecycleService;
49
49
  private readonly _renderManagerService;
50
- private readonly _layoutService;
50
+ private readonly _layoutService?;
51
51
  private _headerComponents;
52
52
  private _headerMenuComponents;
53
53
  private _contentComponents;
54
54
  private _footerComponents;
55
55
  private _componentRegistered$;
56
56
  componentRegistered$: Observable<void>;
57
- constructor(_injector: Injector, _lifecycleService: LifecycleService, _renderManagerService: IRenderManagerService, _layoutService: ILayoutService);
57
+ constructor(_injector: Injector, _lifecycleService: LifecycleService, _renderManagerService: IRenderManagerService, _layoutService?: ILayoutService | undefined);
58
58
  bootstrapWorkbench(options: IWorkbenchOptions): void;
59
59
  private _initializeEngine;
60
60
  registerComponent(part: DesktopUIPart, component: () => React.ComponentType): IDisposable;
@@ -18,7 +18,7 @@ export { getMenuHiddenObservable } from './common/menu-hidden-observable';
18
18
  export * from './components';
19
19
  export { t } from './components/hooks/locale';
20
20
  export { useObservable } from './components/hooks/observable';
21
- export { CopyShortcutItem, CutShortcutItem, PasteShortcutItem, RedoShortcutItem, SharedController, UndoShortcutItem, } from './controllers/shared-shortcut.controller';
21
+ export { CopyShortcutItem, CutShortcutItem, RedoShortcutItem, SharedController, UndoShortcutItem, } from './controllers/shared-shortcut.controller';
22
22
  export { IUIController } from './controllers/ui/ui.controller';
23
23
  export { DesktopUIPart, type IDesktopUIController } from './controllers/ui/ui-desktop.controller';
24
24
  export { enUS, zhCN } from './locale';
@@ -51,3 +51,7 @@ export { type IConfirmPartMethodOptions } from './views/components/confirm-part/
51
51
  export { IEditorService, EditorService } from './services/editor/editor.service';
52
52
  export { TextEditor } from './components/editor/TextEditor';
53
53
  export { SetEditorResizeOperation } from './commands/operations/editor/set-editor-resize.operation';
54
+ export { RangeSelector } from './components/range-selector/RangeSelector';
55
+ export { IRangeSelectorService } from './services/range-selector/range-selector.service';
56
+ export { DesktopLocalStorageService } from './services/local-storage/local-storage.service';
57
+ export { useActiveWorkbook, useActiveWorksheet } from './views/hooks/active';
@@ -49,6 +49,7 @@ declare const locale: {
49
49
  cut: string;
50
50
  copy: string;
51
51
  paste: string;
52
+ 'shortcut-panel': string;
52
53
  };
53
54
  'common-edit': string;
54
55
  'toggle-shortcut-panel': string;
@@ -62,5 +63,14 @@ declare const locale: {
62
63
  formulaError: string;
63
64
  rangeError: string;
64
65
  };
66
+ rangeSelector: {
67
+ title: string;
68
+ addAnotherRange: string;
69
+ buttonTooltip: string;
70
+ placeHolder: string;
71
+ confirm: string;
72
+ cancel: string;
73
+ };
74
+ 'global-shortcut': string;
65
75
  };
66
76
  export default locale;
@@ -37,6 +37,9 @@ export interface IEditorConfigParam {
37
37
  onlyInputFormula: boolean;
38
38
  onlyInputRange: boolean;
39
39
  onlyInputContent: boolean;
40
+ isSingleChoice: boolean;
41
+ openForSheetUnitId: Nullable<string>;
42
+ openForSheetSubUnitId: Nullable<string>;
40
43
  }
41
44
  export interface IEditorSetParam extends IEditorConfigParam, IEditorStateParam {
42
45
  render: IRender;
@@ -51,15 +54,22 @@ export interface IEditorInputFormulaParam {
51
54
  editorUnitId: string;
52
55
  formulaString: string;
53
56
  }
54
- declare class Editor {
57
+ export declare class Editor {
55
58
  private _param;
56
59
  private _focus;
57
60
  private _valueLegality;
61
+ private _openForSheetUnitId;
62
+ private _openForSheetSubUnitId;
58
63
  constructor(_param: IEditorSetParam);
59
64
  get documentDataModel(): DocumentDataModel;
60
65
  get editorUnitId(): string;
61
66
  get cancelDefaultResizeListener(): boolean | undefined;
62
67
  get render(): IRender;
68
+ isSingleChoice(): boolean;
69
+ setOpenForSheetUnitId(unitId: Nullable<string>): void;
70
+ getOpenForSheetUnitId(): Nullable<string>;
71
+ setOpenForSheetSubUnitId(subUnitId: Nullable<string>): void;
72
+ getOpenForSheetSubUnitId(): Nullable<string>;
63
73
  isValueLegality(): boolean;
64
74
  setValueLegality(state?: boolean): void;
65
75
  isFocus(): boolean;
@@ -74,15 +84,13 @@ declare class Editor {
74
84
  isSheetEditor(): boolean;
75
85
  getValue(): string;
76
86
  getBody(): IDocumentBody | undefined;
77
- update(param: IEditorStateParam): void;
87
+ update(param: Partial<IEditorSetParam>): void;
78
88
  verticalAlign(): void;
79
89
  updateCanvasStyle(): void;
80
90
  }
81
91
  export interface IEditorService {
82
92
  getEditor(id?: string): Readonly<Nullable<Editor>>;
83
- setState(param: IEditorStateParam, id: string): void;
84
93
  register(config: IEditorConfigParam, container: HTMLDivElement): IDisposable;
85
- unRegister(editorUnitId: string): void;
86
94
  isVisible(id: string): Nullable<boolean>;
87
95
  inputFormula$: Observable<IEditorInputFormulaParam>;
88
96
  setFormula(formulaString: string): void;
@@ -103,8 +111,8 @@ export interface IEditorService {
103
111
  getOperationSheetSubUnitId(): Nullable<string>;
104
112
  isEditor(editorUnitId: string): boolean;
105
113
  isSheetEditor(editorUnitId: string): boolean;
106
- changeEditorFocus$: Observable<unknown>;
107
- changeEditorFocus(): void;
114
+ closeRangePrompt$: Observable<unknown>;
115
+ closeRangePrompt(): void;
108
116
  blur$: Observable<unknown>;
109
117
  blur(): void;
110
118
  focus$: Observable<ISuccinctTextRangeParam>;
@@ -114,10 +122,19 @@ export interface IEditorService {
114
122
  setValue(val: string, editorUnitId?: string): void;
115
123
  setRichValue(body: IDocumentBody, editorUnitId?: string): void;
116
124
  getFirstEditor(): Editor;
117
- focusStyle$: Observable<string>;
118
- focusStyle(editorUnitId: string): void;
125
+ focusStyle$: Observable<Nullable<string>>;
126
+ focusStyle(editorUnitId: Nullable<string>): void;
119
127
  refreshValueChange(editorId: string): void;
120
128
  checkValueLegality(editorId: string): boolean;
129
+ getValue(id: string): Nullable<string>;
130
+ getRichValue(id: string): Nullable<IDocumentBody>;
131
+ changeSpreadsheetFocusState(state: boolean): void;
132
+ getSpreadsheetFocusState(): boolean;
133
+ selectionChangingState(): boolean;
134
+ singleSelection$: Observable<boolean>;
135
+ singleSelection(state: boolean): void;
136
+ setFocusId(id: Nullable<string>): void;
137
+ getFocusId(): Nullable<string>;
121
138
  }
122
139
  export declare class EditorService extends Disposable implements IEditorService, IDisposable {
123
140
  private readonly _currentUniverService;
@@ -125,6 +142,7 @@ export declare class EditorService extends Disposable implements IEditorService,
125
142
  private readonly _lexerTreeBuilder;
126
143
  private readonly _contextService;
127
144
  private _editors;
145
+ private _focusEditorUnitId;
128
146
  private readonly _state$;
129
147
  readonly state$: Observable<Nullable<IEditorStateParam>>;
130
148
  private _currentSheetUnitId;
@@ -133,8 +151,8 @@ export declare class EditorService extends Disposable implements IEditorService,
133
151
  readonly inputFormula$: Observable<IEditorInputFormulaParam>;
134
152
  private readonly _resize$;
135
153
  readonly resize$: Observable<string>;
136
- private readonly _changeEditorFocus$;
137
- readonly changeEditorFocus$: Observable<unknown>;
154
+ private readonly _closeRangePrompt$;
155
+ readonly closeRangePrompt$: Observable<unknown>;
138
156
  private readonly _blur$;
139
157
  readonly blur$: Observable<unknown>;
140
158
  private readonly _focus$;
@@ -144,32 +162,40 @@ export declare class EditorService extends Disposable implements IEditorService,
144
162
  private readonly _valueChange$;
145
163
  readonly valueChange$: Observable<Readonly<Editor>>;
146
164
  private readonly _focusStyle$;
147
- readonly focusStyle$: Observable<string>;
165
+ readonly focusStyle$: Observable<Nullable<string>>;
166
+ private readonly _singleSelection$;
167
+ readonly singleSelection$: Observable<boolean>;
168
+ private _spreadsheetFocusState;
148
169
  constructor(_currentUniverService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _lexerTreeBuilder: LexerTreeBuilder, _contextService: IContextService);
170
+ setFocusId(id: Nullable<string>): void;
171
+ getFocusId(): Nullable<string>;
149
172
  isEditor(editorUnitId: string): boolean;
150
173
  isSheetEditor(editorUnitId: string): boolean;
151
- changeEditorFocus(): void;
174
+ closeRangePrompt(): void;
175
+ changeSpreadsheetFocusState(state: boolean): void;
176
+ getSpreadsheetFocusState(): boolean;
152
177
  focusStyle(editorUnitId: string): false | undefined;
178
+ singleSelection(state: boolean): void;
179
+ selectionChangingState(): boolean;
153
180
  blur(): void;
154
181
  focus(editorUnitId?: string): void;
155
182
  setFormula(formulaString: string, editorUnitId?: string): void;
156
183
  setValue(val: string, editorUnitId?: string): void;
157
- getValue(id?: string): string | undefined;
184
+ getValue(id: string): string | undefined;
158
185
  setRichValue(body: IDocumentBody, editorUnitId?: string): void;
159
- getRichValue(id?: string): IDocumentBody | undefined;
186
+ getRichValue(id: string): IDocumentBody | undefined;
160
187
  dispose(): void;
161
188
  getEditor(id?: string): Readonly<Nullable<Editor>>;
162
189
  getAllEditor(): Map<string, Editor>;
163
190
  getFirstEditor(): Editor;
164
191
  resize(unitId: string): void;
165
- setState(param: IEditorStateParam, id: string): void;
166
192
  isVisible(id: string): boolean | undefined;
167
193
  setOperationSheetUnitId(unitId: Nullable<string>): void;
168
194
  getOperationSheetUnitId(): Nullable<string>;
169
195
  setOperationSheetSubUnitId(sheetId: Nullable<string>): void;
170
196
  getOperationSheetSubUnitId(): Nullable<string>;
171
197
  register(config: IEditorConfigParam, container: HTMLDivElement): IDisposable;
172
- unRegister(editorUnitId: string): void;
198
+ private _unRegister;
173
199
  refreshValueChange(editorUnitId: string): void;
174
200
  checkValueLegality(editorUnitId: string): boolean;
175
201
  private _refreshValueChange;
@@ -178,4 +204,3 @@ export declare class EditorService extends Disposable implements IEditorService,
178
204
  private _getBlank;
179
205
  }
180
206
  export declare const IEditorService: import("@wendellhu/redi").IdentifierDecorator<IEditorService>;
181
- export {};
@@ -0,0 +1,42 @@
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
+ */
16
+ import type { IUnitRange, Nullable } from '@univerjs/core';
17
+ import { Disposable } from '@univerjs/core';
18
+ import type { IDisposable } from '@wendellhu/redi';
19
+ import type { Observable } from 'rxjs';
20
+ export interface IRangeSelectorRange extends IUnitRange {
21
+ sheetName: string;
22
+ }
23
+ export interface IRangeSelectorService {
24
+ selectionChange$: Observable<IRangeSelectorRange[]>;
25
+ selectionChange(ranges: IRangeSelectorRange[]): void;
26
+ setCurrentSelectorId(id: Nullable<string>): void;
27
+ getCurrentSelectorId(): Nullable<string>;
28
+ openSelector$: Observable<unknown>;
29
+ openSelector(): void;
30
+ }
31
+ export declare class RangeSelectorService extends Disposable implements IRangeSelectorService, IDisposable {
32
+ private _currentSelectorId;
33
+ private readonly _selectionChange$;
34
+ readonly selectionChange$: Observable<IRangeSelectorRange[]>;
35
+ private readonly _openSelector$;
36
+ readonly openSelector$: Observable<unknown>;
37
+ setCurrentSelectorId(id: Nullable<string>): void;
38
+ getCurrentSelectorId(): Nullable<string>;
39
+ selectionChange(range: IRangeSelectorRange[]): void;
40
+ openSelector(): void;
41
+ }
42
+ export declare const IRangeSelectorService: import("@wendellhu/redi").IdentifierDecorator<IRangeSelectorService>;
@@ -13,11 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare const KeyCodeToChar: {
17
- [key: number]: string;
18
- };
19
16
  /** KeyCode that maps to browser standard keycode. */
20
- export declare const enum KeyCode {
17
+ export declare enum KeyCode {
21
18
  UNKNOWN = 0,
22
19
  BACKSPACE = 8,
23
20
  TAB = 9,
@@ -81,13 +78,19 @@ export declare const enum KeyCode {
81
78
  NUM_LOCK = 144,
82
79
  SCROLL_LOCK = 145,
83
80
  MINUS = 189,
84
- EQUAL = 187
81
+ EQUAL = 187,
82
+ BACK_SLASH = 220
85
83
  }
86
- export declare const enum MetaKeys {
84
+ export declare const KeyCodeToChar: {
85
+ [key: number]: string;
86
+ };
87
+ /** Define meta key numbers. */
88
+ export declare enum MetaKeys {
87
89
  SHIFT = 1024,
88
90
  /** Option key on MacOS. Alt key on other systems. */
89
91
  ALT = 2048,
90
92
  /** Command key on MacOS. Ctrl key on other systems. */
91
93
  CTRL_COMMAND = 4096,
94
+ /** Ctrl key for MacOS. Not valid on other systems. */
92
95
  MAC_CTRL = 8192
93
96
  }
@@ -0,0 +1,24 @@
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
+ */
16
+ import type { Nullable, Workbook, Worksheet } from '@univerjs/core';
17
+ /**
18
+ * A react hooks to get the active workbook.
19
+ */
20
+ export declare function useActiveWorkbook(): Nullable<Workbook>;
21
+ /**
22
+ * A react hooks to get the active worksheet.
23
+ */
24
+ export declare function useActiveWorksheet(): Nullable<Worksheet>;