@univerjs/ui 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -0
  3. package/lib/cjs/index.js +4671 -0
  4. package/lib/cjs/locale/en-US.js +46 -0
  5. package/lib/cjs/locale/zh-CN.js +35 -0
  6. package/lib/esm/index.js +4507 -0
  7. package/lib/esm/locale/en-US.js +25 -0
  8. package/lib/esm/locale/zh-CN.js +14 -0
  9. package/lib/index.css +474 -0
  10. package/lib/types/BaseComponent.d.ts +8 -0
  11. package/lib/types/BaseComponent.d.ts.map +1 -0
  12. package/lib/types/commands/operations/toggle-shortcut-panel.operation.d.ts +4 -0
  13. package/lib/types/commands/operations/toggle-shortcut-panel.operation.d.ts.map +1 -0
  14. package/lib/types/common/component-manager.d.ts +14 -0
  15. package/lib/types/common/component-manager.d.ts.map +1 -0
  16. package/lib/types/common/index.d.ts +3 -0
  17. package/lib/types/common/index.d.ts.map +1 -0
  18. package/lib/types/common/lifecycle.d.ts +4 -0
  19. package/lib/types/common/lifecycle.d.ts.map +1 -0
  20. package/lib/types/common/z-index-manager.d.ts +8 -0
  21. package/lib/types/common/z-index-manager.d.ts.map +1 -0
  22. package/lib/types/components/custom-label/CustomLabel.d.ts +14 -0
  23. package/lib/types/components/custom-label/CustomLabel.d.ts.map +1 -0
  24. package/lib/types/components/custom-label/index.d.ts +2 -0
  25. package/lib/types/components/custom-label/index.d.ts.map +1 -0
  26. package/lib/types/components/hooks/observable.d.ts +4 -0
  27. package/lib/types/components/hooks/observable.d.ts.map +1 -0
  28. package/lib/types/components/index.d.ts +3 -0
  29. package/lib/types/components/index.d.ts.map +1 -0
  30. package/lib/types/components/menu/Menu.d.ts +11 -0
  31. package/lib/types/components/menu/Menu.d.ts.map +1 -0
  32. package/lib/types/components/menu/index.d.ts +2 -0
  33. package/lib/types/components/menu/index.d.ts.map +1 -0
  34. package/lib/types/components/notification/Notification.d.ts +41 -0
  35. package/lib/types/components/notification/Notification.d.ts.map +1 -0
  36. package/lib/types/controllers/error/error.controller.d.ts +8 -0
  37. package/lib/types/controllers/error/error.controller.d.ts.map +1 -0
  38. package/lib/types/controllers/menus/menus.d.ts +5 -0
  39. package/lib/types/controllers/menus/menus.d.ts.map +1 -0
  40. package/lib/types/controllers/shared-shortcut.controller.d.ts +25 -0
  41. package/lib/types/controllers/shared-shortcut.controller.d.ts.map +1 -0
  42. package/lib/types/controllers/shortcut-display/menu.d.ts +3 -0
  43. package/lib/types/controllers/shortcut-display/menu.d.ts.map +1 -0
  44. package/lib/types/controllers/shortcut-display/shortcut-panel.controller.d.ts +10 -0
  45. package/lib/types/controllers/shortcut-display/shortcut-panel.controller.d.ts.map +1 -0
  46. package/lib/types/controllers/ui/ui-desktop.controller.d.ts +55 -0
  47. package/lib/types/controllers/ui/ui-desktop.controller.d.ts.map +1 -0
  48. package/lib/types/controllers/ui/ui.controller.d.ts +14 -0
  49. package/lib/types/controllers/ui/ui.controller.d.ts.map +1 -0
  50. package/lib/types/index.d.ts +30 -0
  51. package/lib/types/index.d.ts.map +1 -0
  52. package/lib/types/locale/en-US.d.ts +23 -0
  53. package/lib/types/locale/en-US.d.ts.map +1 -0
  54. package/lib/types/locale/index.d.ts +3 -0
  55. package/lib/types/locale/index.d.ts.map +1 -0
  56. package/lib/types/locale/zh-CN.d.ts +12 -0
  57. package/lib/types/locale/zh-CN.d.ts.map +1 -0
  58. package/lib/types/services/before-close/before-close.service.d.ts +21 -0
  59. package/lib/types/services/before-close/before-close.service.d.ts.map +1 -0
  60. package/lib/types/services/clipboard/clipboard-interface.service.d.ts +36 -0
  61. package/lib/types/services/clipboard/clipboard-interface.service.d.ts.map +1 -0
  62. package/lib/types/services/clipboard/clipboard.command.d.ts +5 -0
  63. package/lib/types/services/clipboard/clipboard.command.d.ts.map +1 -0
  64. package/lib/types/services/confirm/confirm.service.d.ts +10 -0
  65. package/lib/types/services/confirm/confirm.service.d.ts.map +1 -0
  66. package/lib/types/services/confirm/desktop-confirm.service.d.ts +12 -0
  67. package/lib/types/services/confirm/desktop-confirm.service.d.ts.map +1 -0
  68. package/lib/types/services/contextmenu/contextmenu.service.d.ts +18 -0
  69. package/lib/types/services/contextmenu/contextmenu.service.d.ts.map +1 -0
  70. package/lib/types/services/dialog/desktop-dialog.service.d.ts +12 -0
  71. package/lib/types/services/dialog/desktop-dialog.service.d.ts.map +1 -0
  72. package/lib/types/services/dialog/dialog.service.d.ts +10 -0
  73. package/lib/types/services/dialog/dialog.service.d.ts.map +1 -0
  74. package/lib/types/services/focus/focus.service.d.ts +22 -0
  75. package/lib/types/services/focus/focus.service.d.ts.map +1 -0
  76. package/lib/types/services/local-storage/local-storage.service.d.ts +11 -0
  77. package/lib/types/services/local-storage/local-storage.service.d.ts.map +1 -0
  78. package/lib/types/services/menu/menu.d.ts +103 -0
  79. package/lib/types/services/menu/menu.d.ts.map +1 -0
  80. package/lib/types/services/menu/menu.service.d.ts +28 -0
  81. package/lib/types/services/menu/menu.service.d.ts.map +1 -0
  82. package/lib/types/services/message/desktop-message.service.d.ts +11 -0
  83. package/lib/types/services/message/desktop-message.service.d.ts.map +1 -0
  84. package/lib/types/services/message/message.service.d.ts +8 -0
  85. package/lib/types/services/message/message.service.d.ts.map +1 -0
  86. package/lib/types/services/notification/desktop-notification.service.d.ts +7 -0
  87. package/lib/types/services/notification/desktop-notification.service.d.ts.map +1 -0
  88. package/lib/types/services/notification/notification.service.d.ts +7 -0
  89. package/lib/types/services/notification/notification.service.d.ts.map +1 -0
  90. package/lib/types/services/platform/platform.service.d.ts +15 -0
  91. package/lib/types/services/platform/platform.service.d.ts.map +1 -0
  92. package/lib/types/services/shortcut/keycode.d.ts +79 -0
  93. package/lib/types/services/shortcut/keycode.d.ts.map +1 -0
  94. package/lib/types/services/shortcut/shortcut-experience.service.d.ts +31 -0
  95. package/lib/types/services/shortcut/shortcut-experience.service.d.ts.map +1 -0
  96. package/lib/types/services/shortcut/shortcut-panel.service.d.ts +10 -0
  97. package/lib/types/services/shortcut/shortcut-panel.service.d.ts.map +1 -0
  98. package/lib/types/services/shortcut/shortcut.service.d.ts +55 -0
  99. package/lib/types/services/shortcut/shortcut.service.d.ts.map +1 -0
  100. package/lib/types/services/sidebar/desktop-sidebar.service.d.ts +12 -0
  101. package/lib/types/services/sidebar/desktop-sidebar.service.d.ts.map +1 -0
  102. package/lib/types/services/sidebar/sidebar.service.d.ts +10 -0
  103. package/lib/types/services/sidebar/sidebar.service.d.ts.map +1 -0
  104. package/lib/types/ui-plugin.d.ts +20 -0
  105. package/lib/types/ui-plugin.d.ts.map +1 -0
  106. package/lib/types/utils/cell.d.ts +34 -0
  107. package/lib/types/utils/cell.d.ts.map +1 -0
  108. package/lib/types/utils/index.d.ts +3 -0
  109. package/lib/types/utils/index.d.ts.map +1 -0
  110. package/lib/types/utils/util.d.ts +2 -0
  111. package/lib/types/utils/util.d.ts.map +1 -0
  112. package/lib/types/views/App.d.ts +13 -0
  113. package/lib/types/views/App.d.ts.map +1 -0
  114. package/lib/types/views/components/ComponentContainer.d.ts +6 -0
  115. package/lib/types/views/components/ComponentContainer.d.ts.map +1 -0
  116. package/lib/types/views/components/confirm-part/ConfirmPart.d.ts +3 -0
  117. package/lib/types/views/components/confirm-part/ConfirmPart.d.ts.map +1 -0
  118. package/lib/types/views/components/confirm-part/interface.d.ts +8 -0
  119. package/lib/types/views/components/confirm-part/interface.d.ts.map +1 -0
  120. package/lib/types/views/components/context-menu/ContextMenu.d.ts +5 -0
  121. package/lib/types/views/components/context-menu/ContextMenu.d.ts.map +1 -0
  122. package/lib/types/views/components/dialog-part/DialogPart.d.ts +3 -0
  123. package/lib/types/views/components/dialog-part/DialogPart.d.ts.map +1 -0
  124. package/lib/types/views/components/dialog-part/interface.d.ts +10 -0
  125. package/lib/types/views/components/dialog-part/interface.d.ts.map +1 -0
  126. package/lib/types/views/components/doc-bars/Button/ToolbarButton.d.ts +28 -0
  127. package/lib/types/views/components/doc-bars/Button/ToolbarButton.d.ts.map +1 -0
  128. package/lib/types/views/components/doc-bars/MenuBar.d.ts +7 -0
  129. package/lib/types/views/components/doc-bars/MenuBar.d.ts.map +1 -0
  130. package/lib/types/views/components/doc-bars/Toolbar.d.ts +3 -0
  131. package/lib/types/views/components/doc-bars/Toolbar.d.ts.map +1 -0
  132. package/lib/types/views/components/doc-bars/ToolbarItem.d.ts +4 -0
  133. package/lib/types/views/components/doc-bars/ToolbarItem.d.ts.map +1 -0
  134. package/lib/types/views/components/doc-bars/hooks/menu.d.ts +10 -0
  135. package/lib/types/views/components/doc-bars/hooks/menu.d.ts.map +1 -0
  136. package/lib/types/views/components/shortcut-panel/ShortcutPanel.d.ts +6 -0
  137. package/lib/types/views/components/shortcut-panel/ShortcutPanel.d.ts.map +1 -0
  138. package/lib/types/views/components/sidebar/Sidebar.d.ts +3 -0
  139. package/lib/types/views/components/sidebar/Sidebar.d.ts.map +1 -0
  140. package/lib/types/views/components/sidebar/interface.d.ts +11 -0
  141. package/lib/types/views/components/sidebar/interface.d.ts.map +1 -0
  142. package/lib/types/views/parts.d.ts +3 -0
  143. package/lib/types/views/parts.d.ts.map +1 -0
  144. package/package.json +77 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShortcutPanel.d.ts","sourceRoot":"","sources":["../../../../../src/views/components/shortcut-panel/ShortcutPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAgBtD;;GAEG;AACH,wBAAgB,aAAa,sBAkE5B"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function Sidebar(): React.JSX.Element;
3
+ //# sourceMappingURL=Sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../../src/views/components/sidebar/Sidebar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAO5D,wBAAgB,OAAO,sBA4EtB"}
@@ -0,0 +1,11 @@
1
+ import { type ICustomLabelProps } from '../../../components/custom-label/CustomLabel';
2
+ export interface ISidebarMethodOptions {
3
+ header?: ICustomLabelProps;
4
+ children?: ICustomLabelProps;
5
+ footer?: ICustomLabelProps;
6
+ visible?: boolean;
7
+ width?: number | string;
8
+ onClose?: () => void;
9
+ onOpen?: () => void;
10
+ }
11
+ //# sourceMappingURL=interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../src/views/components/sidebar/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAEtF,MAAM,WAAW,qBAAqB;IAClC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAE3B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAE7B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAE3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB"}
@@ -0,0 +1,3 @@
1
+ import type { ComponentType } from 'react';
2
+ export declare const globalComponents: Set<() => ComponentType>;
3
+ //# sourceMappingURL=parts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../../src/views/parts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAO3C,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,MAAM,aAAa,CAKpD,CAAC"}
package/package.json ADDED
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "@univerjs/ui",
3
+ "version": "0.1.0-alpha.1",
4
+ "description": "UniverSheet normal plugin UI manager",
5
+ "keywords": [],
6
+ "author": "DreamNum <developer@univer.ai>",
7
+ "license": "MIT",
8
+ "main": "./lib/cjs/index.js",
9
+ "module": "./lib/esm/index.js",
10
+ "types": "./lib/types/index.d.ts",
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "exports": {
15
+ ".": {
16
+ "import": "./lib/esm/index.js",
17
+ "require": "./lib/cjs/index.js",
18
+ "types": "./lib/types/index.d.ts"
19
+ },
20
+ "./*": {
21
+ "import": "./lib/esm/*",
22
+ "require": "./lib/cjs/*",
23
+ "types": "./lib/types/index.d.ts"
24
+ },
25
+ "./locale/*": {
26
+ "import": "./lib/esm/locale/*.js",
27
+ "require": "./lib/cjs/locale/*.js",
28
+ "types": "./lib/types/index.d.ts"
29
+ }
30
+ },
31
+ "directories": {
32
+ "lib": "lib"
33
+ },
34
+ "files": [
35
+ "lib"
36
+ ],
37
+ "private": false,
38
+ "dependencies": {
39
+ "@ctrl/tinycolor": "^4.0.2",
40
+ "@univerjs/icons": "^0.1.14",
41
+ "@wendellhu/redi": "^0.12.11",
42
+ "clsx": "^2.0.0",
43
+ "localforage": "^1.10.0",
44
+ "rc-notification": "^5.3.0",
45
+ "rc-util": "^5.38.1",
46
+ "rxjs": "^7.8.1",
47
+ "@univerjs/engine-render": "0.1.0-alpha.1",
48
+ "@univerjs/core": "0.1.0-alpha.1",
49
+ "@univerjs/design": "0.1.0-alpha.1"
50
+ },
51
+ "devDependencies": {
52
+ "@testing-library/react": "^14.1.2",
53
+ "@types/react": "^18.2.40",
54
+ "@types/react-dom": "^18.2.17",
55
+ "@types/react-transition-group": "^4.4.9",
56
+ "@vitejs/plugin-react": "^4.2.0",
57
+ "@vitest/coverage-istanbul": "^0.34.6",
58
+ "esbuild": "^0.19.8",
59
+ "happy-dom": "^12.10.3",
60
+ "less": "^4.2.0",
61
+ "react": "^18.2.0",
62
+ "react-dom": "^18.2.0",
63
+ "ts-node": "^10.9.1",
64
+ "typescript": "^5.3.2",
65
+ "vitest": "^0.34.6"
66
+ },
67
+ "peerDependencies": {
68
+ "react": ">=16.9.0",
69
+ "react-dom": ">=16.9.0"
70
+ },
71
+ "scripts": {
72
+ "test": "vitest run",
73
+ "test:watch": "vitest",
74
+ "coverage": "vitest run --coverage",
75
+ "esbuild": "node ./esbuild.config.mjs && tsc -p tsconfig.esbuild.json"
76
+ }
77
+ }