Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

docs: add menu architecture graph

Wenzhao Hu0f29b3a1b24c
diff --git a/packages/ui/docs/menu.excalidraw b/packages/ui/docs/menu.excalidraw
new file mode 100644
index 0000000000..14ccc1df64
--- /dev/null
+++ b/packages/ui/docs/menu.excalidraw
@@ -0,0 +1,719 @@
+{
+ "type": "excalidraw",
+ "version": 2,
+ "source": "https://marketplace.visualstudio.com/items?itemName=pomdtr.excalidraw-editor",
+ "elements": [
+ {
+ "id": "VtEzghQeh1SW-9I-0gUNP",
+ "type": "rectangle",
+ "x": 297.55470125108866,
+ "y": 469.3333435058594,
+ "width": 561.6666870117188,
+ "height": 218.00003051757812,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "transparent",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "dashed",
+ "roughness": 1,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": {
+ "type": 3
+ },
+ "seed": 1071526398,
+ "version": 161,
+ "versionNonce": 2107998654,
+ "isDeleted": false,
+ "boundElements": [
+ {
+ "type": "text",
+ "id": "bGE6WD2ACAKp96MY4MIG-"
+ }
+ ],
+ "updated": 1706536654220,
+ "link": null,
+ "locked": false
+ },
+ {
+ "id": "bGE6WD2ACAKp96MY4MIG-",
+ "type": "text",
+ "x": 521.2180999937644,
+ "y": 474.3333435058594,
+ "width": 114.33988952636719,
+ "height": 25,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "transparent",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "solid",
+ "roughness": 1,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": null,
+ "seed": 1268058494,
+ "version": 130,
+ "versionNonce": 985334050,
+ "isDeleted": false,
+ "boundElements": null,
+ "updated": 1706536654220,
+ "link": null,
+ "locked": false,
+ "text": "@univerjs/ui",
+ "fontSize": 20,
+ "fontFamily": 1,
+ "textAlign": "center",
+ "verticalAlign": "top",
+ "baseline": 17,
+ "containerId": "VtEzghQeh1SW-9I-0gUNP",
+ "originalText": "@univerjs/ui",
+ "lineHeight": 1.25
+ },
+ {
+ "id": "SbsCBeknqPfCuZMuQ-9BF",
+ "type": "rectangle",
+ "x": 606.5548233214012,
+ "y": 617.3334350585938,
+ "width": 230.3333740234375,
+ "height": 48.6666259765625,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "transparent",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "solid",
+ "roughness": 1,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": {
+ "type": 3
+ },
+ "seed": 1138101346,
+ "version": 298,
+ "versionNonce": 592091646,
+ "isDeleted": false,
+ "boundElements": [
+ {
+ "type": "text",
+ "id": "vWGSTC-jxJrQq6VkJt0uv"
+ },
+ {
+ "id": "g2Miwc2X8XnGeZn0nwuxz",
+ "type": "arrow"
+ },
+ {
+ "id": "c62GN6iH8nwKGuwpFSsh9",
+ "type": "arrow"
+ }
+ ],
+ "updated": 1706536654220,
+ "link": null,
+ "locked": false
+ },
+ {
+ "id": "vWGSTC-jxJrQq6VkJt0uv",
+ "type": "text",
+ "x": 659.0315689268699,
+ "y": 629.166748046875,
+ "width": 125.3798828125,
+ "height": 25,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "transparent",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "dashed",
+ "roughness": 1,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": null,
+ "seed": 1156702754,
+ "version": 250,
+ "versionNonce": 2143456482,
+ "isDeleted": false,
+ "boundElements": null,
+ "updated": 1706536654220,
+ "link": null,
+ "locked": false,
+ "text": "IMenuService",
+ "fontSize": 20,
+ "fontFamily": 1,
+ "textAlign": "center",
+ "verticalAlign": "middle",
+ "baseline": 17,
+ "containerId": "SbsCBeknqPfCuZMuQ-9BF",
+ "originalText": "IMenuService",
+ "lineHeight": 1.25
+ },
+ {
+ "type": "rectangle",
+ "version": 345,
+ "versionNonce": 1025681982,
+ "isDeleted": false,
+ "id": "qaNNS3ZWr9QLYImJu6f0V",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "solid",
+ "roughness": 1,
+ "opacity": 100,
+ "angle": 0,
+ "x": 328.38807527452616,
+ "y": 514,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "transparent",
+ "width": 230.3333740234375,
+ "height": 54.66662597656249,
+ "seed": 1807478334,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": {
+ "type": 3
+ },
+ "boundElements": [
+ {
+ "type": "text",
+ "id": "zGoE_Pec2wTnxBdD4cLqT"
+ },
+ {
+ "id": "g2Miwc2X8XnGeZn0nwuxz",
+ "type": "arrow"
+ },
+ {
+ "id": "c62GN6iH8nwKGuwpFSsh9",
+ "type": "arrow"
+ }
+ ],
+ "updated": 1706536654220,
+ "link": null,
+ "locked": false
+ },
+ {
+ "type": "text",
+ "version": 328,
+ "versionNonce": 459448482,
+ "isDeleted": false,
+ "id": "zGoE_Pec2wTnxBdD4cLqT",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "dashed",
+ "roughness": 1,
+ "opacity": 100,
+ "angle": 0,
+ "x": 386.3148178282371,
+ "y": 528.8333129882812,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "transparent",
+ "width": 114.47988891601562,
+ "height": 25,
+ "seed": 1289713278,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": null,
+ "boundElements": [],
+ "updated": 1706536654220,
+ "link": null,
+ "locked": false,
+ "fontSize": 20,
+ "fontFamily": 1,
+ "text": "Toolbar.tsx",
+ "textAlign": "center",
+ "verticalAlign": "middle",
+ "containerId": "qaNNS3ZWr9QLYImJu6f0V",
+ "originalText": "Toolbar.tsx",
+ "lineHeight": 1.25,
+ "baseline": 17
+ },
+ {
+ "id": "g2Miwc2X8XnGeZn0nwuxz",
+ "type": "arrow",
+ "x": 501.1425331770429,
+ "y": 573.9999389648438,
+ "width": 134.8211291601421,
+ "height": 34.666748046875,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "transparent",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "solid",
+ "roughness": 1,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": {
+ "type": 2
+ },
+ "seed": 637273022,
+ "version": 201,
+ "versionNonce": 974041726,
+ "isDeleted": false,
+ "boundElements": null,
+ "updated": 1706536654220,
+ "link": null,
+ "locked": false,
+ "points": [
+ [
+ 0,
+ 0
+ ],
+ [
+ 134.8211291601421,
+ 34.666748046875
+ ]
+ ],
+ "lastCommittedPoint": null,
+ "startBinding": {
+ "elementId": "qaNNS3ZWr9QLYImJu6f0V",
+ "focus": 0.3117257409988943,
+ "gap": 5.33331298828125
+ },
+ "endBinding": {
+ "elementId": "SbsCBeknqPfCuZMuQ-9BF",
+ "focus": 0.20296158897009264,
+ "gap": 8.666748046875
+ },
+ "startArrowhead": null,
+ "endArrowhead": "arrow"
+ },
+ {
+ "id": "6dTc23JbI67ggrfFdEfO1",
+ "type": "rectangle",
+ "x": 230.67964200237145,
+ "y": 145.37571352683727,
+ "width": 582.3333129882812,
+ "height": 206.66668701171875,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "transparent",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "dashed",
+ "roughness": 1,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": {
+ "type": 3
+ },
+ "seed": 1932714814,
+ "version": 143,
+ "versionNonce": 491847074,
+ "isDeleted": false,
+ "boundElements": [
+ {
+ "type": "text",
+ "id": "62nXjv0x5uTLXBAbJtg8X"
+ }
+ ],
+ "updated": 1706536667506,
+ "link": null,
+ "locked": false
+ },
+ {
+ "id": "62nXjv0x5uTLXBAbJtg8X",
+ "type": "text",
+ "x": 428.17639950969567,
+ "y": 150.37571352683727,
+ "width": 187.3397979736328,
+ "height": 25,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "transparent",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "dashed",
+ "roughness": 1,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": null,
+ "seed": 600293118,
+ "version": 117,
+ "versionNonce": 124057954,
+ "isDeleted": false,
+ "boundElements": null,
+ "updated": 1706536667506,
+ "link": null,
+ "locked": false,
+ "text": "@univerjs/sheets-ui",
+ "fontSize": 20,
+ "fontFamily": 1,
+ "textAlign": "center",
+ "verticalAlign": "top",
+ "baseline": 17,
+ "containerId": "6dTc23JbI67ggrfFdEfO1",
+ "originalText": "@univerjs/sheets-ui",
+ "lineHeight": 1.25
+ },
+ {
+ "id": "cp81RscM_e44FdVDdQN0V",
+ "type": "rectangle",
+ "x": 385.55470125108866,
+ "y": 201.33334350585938,
+ "width": 278.33343505859375,
+ "height": 50.000000000000014,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "transparent",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "solid",
+ "roughness": 1,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": {
+ "type": 3
+ },
+ "seed": 704894974,
+ "version": 155,
+ "versionNonce": 927490082,
+ "isDeleted": false,
+ "boundElements": [
+ {
+ "type": "text",
+ "id": "TTKnT5Hajj7IVode179PK"
+ },
+ {
+ "id": "c62GN6iH8nwKGuwpFSsh9",
+ "type": "arrow"
+ }
+ ],
+ "updated": 1706536654220,
+ "link": null,
+ "locked": false
+ },
+ {
+ "id": "TTKnT5Hajj7IVode179PK",
+ "type": "text",
+ "x": 431.9215072813621,
+ "y": 213.83334350585938,
+ "width": 185.59982299804688,
+ "height": 25,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "transparent",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "solid",
+ "roughness": 1,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": null,
+ "seed": 536988030,
+ "version": 142,
+ "versionNonce": 134654718,
+ "isDeleted": false,
+ "boundElements": null,
+ "updated": 1706536654220,
+ "link": null,
+ "locked": false,
+ "text": "SheetsUIController",
+ "fontSize": 20,
+ "fontFamily": 1,
+ "textAlign": "center",
+ "verticalAlign": "middle",
+ "baseline": 17,
+ "containerId": "cp81RscM_e44FdVDdQN0V",
+ "originalText": "SheetsUIController",
+ "lineHeight": 1.25
+ },
+ {
+ "id": "c62GN6iH8nwKGuwpFSsh9",
+ "type": "arrow",
+ "x": 524.2504770548852,
+ "y": 260,
+ "width": 197.2149674323823,
+ "height": 344.6666259765625,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "transparent",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "solid",
+ "roughness": 1,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": {
+ "type": 2
+ },
+ "seed": 1441502434,
+ "version": 229,
+ "versionNonce": 1632373730,
+ "isDeleted": false,
+ "boundElements": [
+ {
+ "type": "text",
+ "id": "uiBjGTtd0V1YcCjsgGAt0"
+ }
+ ],
+ "updated": 1706536654220,
+ "link": null,
+ "locked": false,
+ "points": [
+ [
+ 0,
+ 0
+ ],
+ [
+ 197.2149674323823,
+ 344.6666259765625
+ ]
+ ],
+ "lastCommittedPoint": null,
+ "startBinding": {
+ "elementId": "cp81RscM_e44FdVDdQN0V",
+ "focus": 0.12858859894652533,
+ "gap": 8.666656494140625
+ },
+ "endBinding": {
+ "elementId": "SbsCBeknqPfCuZMuQ-9BF",
+ "focus": 0.16201918030680326,
+ "gap": 12.66680908203125
+ },
+ "startArrowhead": null,
+ "endArrowhead": "arrow"
+ },
+ {
+ "id": "uiBjGTtd0V1YcCjsgGAt0",
+ "type": "text",
+ "x": 439.568090838491,
+ "y": 371.1666564941406,
+ "width": 75.63990783691406,
+ "height": 25,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "transparent",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "dashed",
+ "roughness": 1,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": null,
+ "seed": 1268350846,
+ "version": 99,
+ "versionNonce": 842308414,
+ "isDeleted": false,
+ "boundElements": null,
+ "updated": 1706536654220,
+ "link": null,
+ "locked": false,
+ "text": "register",
+ "fontSize": 20,
+ "fontFamily": 1,
+ "textAlign": "center",
+ "verticalAlign": "middle",
+ "baseline": 17,
+ "containerId": "c62GN6iH8nwKGuwpFSsh9",
+ "originalText": "register",
+ "lineHeight": 1.25
+ },
+ {
+ "id": "AW2CrkjNUHMoqcnoQzTlY",
+ "type": "ellipse",
+ "x": 588.3520732266394,
+ "y": 384.4148217913581,
+ "width": 28.66668701171875,
+ "height": 28.66668701171875,
+ "angle": 0,
+ "strokeColor": "#f08c00",
+ "backgroundColor": "#ffd8a8",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "solid",
+ "roughness": 1,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": {
+ "type": 2
+ },
+ "seed": 1046304830,
+ "version": 258,
+ "versionNonce": 2042266494,
+ "isDeleted": false,
+ "boundElements": [
+ {
+ "id": "YkpUCEgSJTyLDamPqe8FM",
+ "type": "arrow"
+ }
+ ],
+ "updated": 1706536654220,
+ "link": null,
+ "locked": false
+ },
+ {
+ "id": "_ymJpeL6P5cesVwfS5R36",
+ "type": "ellipse",
+ "x": 879.2213272276512,
+ "y": 199.3333740234375,
+ "width": 321.33343505859375,
+ "height": 321.33343505859375,
+ "angle": 0,
+ "strokeColor": "#f08c00",
+ "backgroundColor": "transparent",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "dotted",
+ "roughness": 1,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": {
+ "type": 2
+ },
+ "seed": 219251070,
+ "version": 332,
+ "versionNonce": 2009070434,
+ "isDeleted": false,
+ "boundElements": [
+ {
+ "type": "text",
+ "id": "kEWHaCZxwxldwji5ZIGjS"
+ },
+ {
+ "id": "YkpUCEgSJTyLDamPqe8FM",
+ "type": "arrow"
+ }
+ ],
+ "updated": 1706536654220,
+ "link": null,
+ "locked": false
+ },
+ {
+ "id": "kEWHaCZxwxldwji5ZIGjS",
+ "type": "text",
+ "x": 931.2795192809984,
+ "y": 308.9525989406348,
+ "width": 204.45358276367188,
+ "height": 101.87793427230042,
+ "angle": 0,
+ "strokeColor": "#f08c00",
+ "backgroundColor": "transparent",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "dashed",
+ "roughness": 1,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": null,
+ "seed": 15749950,
+ "version": 435,
+ "versionNonce": 1624859582,
+ "isDeleted": false,
+ "boundElements": null,
+ "updated": 1706536654220,
+ "link": null,
+ "locked": false,
+ "text": "{\n id: \"insert-col\",\n hidden$: Observe$\n}",
+ "fontSize": 20.375586854460085,
+ "fontFamily": 1,
+ "textAlign": "left",
+ "verticalAlign": "middle",
+ "baseline": 94,
+ "containerId": "_ymJpeL6P5cesVwfS5R36",
+ "originalText": "{\n id: \"insert-col\",\n hidden$: Observe$\n}",
+ "lineHeight": 1.25
+ },
+ {
+ "id": "YkpUCEgSJTyLDamPqe8FM",
+ "type": "arrow",
+ "x": 870.3718048036619,
+ "y": 370.90577080338596,
+ "width": 243.37321739124275,
+ "height": 26.79649772127908,
+ "angle": 0,
+ "strokeColor": "#1e1e1e",
+ "backgroundColor": "transparent",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "solid",
+ "roughness": 1,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": "ZhupNcsv9SpdMhI_xBSHi",
+ "roundness": {
+ "type": 2
+ },
+ "seed": 457678242,
+ "version": 391,
+ "versionNonce": 1051606818,
+ "isDeleted": false,
+ "boundElements": null,
+ "updated": 1706536654220,
+ "link": null,
+ "locked": false,
+ "points": [
+ [
+ 0,
+ 0
+ ],
+ [
+ -63.81701199983888,
+ 17.094290231770287
+ ],
+ [
+ -243.37321739124275,
+ 26.79649772127908
+ ]
+ ],
+ "lastCommittedPoint": null,
+ "startBinding": {
+ "elementId": "_ymJpeL6P5cesVwfS5R36",
+ "gap": 9.199963864725078,
+ "focus": 0.2074277707652223
+ },
+ "endBinding": {
+ "elementId": "AW2CrkjNUHMoqcnoQzTlY",
+ "focus": 0.01865999104105891,
+ "gap": 10.002312815057488
+ },
+ "startArrowhead": null,
+ "endArrowhead": "dot"
+ },
+ {
+ "id": "ZhupNcsv9SpdMhI_xBSHi",
+ "type": "frame",
+ "x": 132.7028938896051,
+ "y": 96.16411463066936,
+ "width": 1118.5926659825714,
+ "height": 634.4384638443128,
+ "angle": 0,
+ "strokeColor": "#bbb",
+ "backgroundColor": "transparent",
+ "fillStyle": "solid",
+ "strokeWidth": 2,
+ "strokeStyle": "solid",
+ "roughness": 0,
+ "opacity": 100,
+ "groupIds": [],
+ "frameId": null,
+ "roundness": null,
+ "seed": 704468990,
+ "version": 188,
+ "versionNonce": 123216638,
+ "isDeleted": false,
+ "boundElements": null,
+ "updated": 1706536653938,
+ "link": null,
+ "locked": false,
+ "name": null
+ }
+ ],
+ "appState": {
+ "gridSize": null,
+ "viewBackgroundColor": "#ffffff"
+ },
+ "files": {}
+}
\ No newline at end of file