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.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
feat(README): update
DR-Univer55e76b871d18
diff --git a/README-zh.md b/README-zh.mdindex 0408f185a0..22ec461e06 100644--- a/README-zh.md+++ b/README-zh.md@@ -58,102 +58,237 @@ npm run dev:slide[](https://github.com/dream-num/univer/stargazers)+## 整体架构++Univer 采用 typescript 编写,按照插件化架构进行设计,核心外的功能都以插件的形式进行开发,今后会建设插件市场,满足更加个性化的需求+++## 渲染引擎++Univer sheet, document, slide 采用同一套渲染引擎架构,把应用抽象为文本流,表格,画布,core 部分触发渲染,object 为渲染器。+++1. 做到了应用互相间的嵌套和操作。+2. sheet 单元格支持嵌入 doc 文字+3. slide 中支持插入 sheet,doc,slide++| slide 10-layer embedding | Sheet in slide and doc in cell | wrap text around a picture |+| :-------------------------------: | :--------------------------------------------: | :-----------------------------: |+|  |  |  |++## 公式引擎++Univer 自研公式引擎,支持异步计算, lambda 函数及范围命名+++## 开发计划### Sheets-- 基础能力-- - [x] 核心数据结构- - [x] 渲染- - [x] 界面- - [x] 单元格编辑--- sheet 操作-- - [x] sheet 删除- - [x] sheet 复制- - [x] sheet 排序- - [x] sheet 重命名- - [x] sheet 更改颜色- - [x] sheet 隐藏- - [x] sheet 取消隐藏- - [x] sheet 向左移- - [x] sheet 向右移--- 右击菜单-- - [x] 复制- - [x] 粘贴- - [x] 插入行- - [x] 插入列- - [x] 删除选中行- - [x] 删除选中列- - [x] 删除单元格- - [x] 清除内容--- 工具栏-- - [x] 撤销- - [x] 重做- - [ ] 格式刷- - [ ] 货币格式- - [ ] 百分比格式- - [ ] 减少小数位数- - [ ] 增加小数位数- - [ ] 更多格式- - [x] 字体- - [x] 字体大小- - [x] 加粗- - [x] 斜体- - [x] 删除线- - [x] 下划线- - [x] 文本颜色- - [x] 单元格颜色- - [x] 边框- - [x] 合并单元格- - [x] 水平对齐- - [x] 垂直对齐- - [x] 文本换行- - [x] 文本旋转--- 计数栏-- - [x] 计数- - [x] 缩放--- 插件- - [x] 剪切板- - [ ] 单元格格式- - [ ] 公式- - [ ] 图片- - [ ] 冻结- - [ ] 链接- - [ ] 批注- - [ ] 数据透视表- - [ ] 图表- - [ ] 排序- - [ ] 筛选- - [ ] 条件格式- - [ ] 交替颜色- - [ ] 数据验证- - [ ] 分列- - [ ] 截图- - [ ] 查找- - [ ] 替换- - [ ] 工作表保护- - [ ] 打印- - [ ] 导入导出- - [ ] 协同+> 第一期目标与[luckysheet2.0 版本功能对齐](https://dream-num.github.io/LuckysheetDocs/guide/#features)++#### 🛠️ 格式设置++- **样式** `done`+- **条件格式** `2023Q1`+- **文本对齐及旋转** `done`+- **支持文本的截断、溢出、自动换行** `done`+- **数据类型** `done`+- **单元格内多样式** `done`++#### 🧬 单元格++- **拖拽选取来修改单元格** `done`+- **选区下拉填充** `2023Q1`+- **自动填充选项** `2023Q1`+- **多选区操作** `2023Q1`+- **查找和替换** `2023Q2`+- **定位** `2023Q4`+- **合并单元格** `done`+- **数据验证(表单功能)** `2023Q2`++#### 🖱️ 行和列操作++- **隐藏,插入,删除行或列** `2023Q1`+- **冻结行或列** `2023Q1`+- **文本分列** `2023Q4`++#### 🔨 操作体验++- **撤销/重做** `2023Q1`+- **复制/粘贴/剪切操作** `2023Q2`+- **快捷键支持** `2023Q2`+- **格式刷** `2023Q4`+- **任意选区拖拽** `2023Q1`++#### ⚙️ 公式和函数++- **公式引擎(支持数组函数、命名、lambda)** `done`+- **内置公式** `2023Q1 - 2023Q4 按照使用频率补齐`+- **远程公式** `2023Q4`+- **自定义公式** `2023Q4`++#### 📐 表格操作++- **筛选** `2023Q2`+- **排序** `2023Q2`++#### 📈 数据透视表++- **字段拖拽** `2023Q3`+- **聚合方式** `2023Q3`+- **筛选数据** `2023Q4`+- **数据透视表下钻** `2023Q4`+- **根据数据透视表新建图表** `2023Q4`++#### 📊 图表 2023H2++- **基础 6 种图表类型** `2023Q4 - 2024Q2`+- **进阶图表类型** `2024Q4`+- **SparkLines 小图** `2024Q2`++#### ✍️ 分享及写作++- **评论** `2023Q3`+- **协同编辑** `2023Q3`++#### 📚 插入对象++- **插入图片** `2023Q3`++#### ⚡ 其他++- **矩阵计算** `2023Q4`+- **截图** `2023Q4`+- **复制到其他格式** `2023Q3`+- **EXCEL 导入及导出** `2023Q1 - 2023Q4 逐渐增强兼容性`++> ⏱️ 后续目标++- **打印及设置** (像 excel 一样进行打印设置,并导出为图片或者 PDF) `2024Q2`+- **树形菜单** (类似 excel 中的分级显示(分组)) `2024Q1`+- **表格新功能** (类似 excel 中表格的筛选器和切片器) `2024Q1`+- **CSV,TXT 导入及导出** (专为 Luckysheet 打造的导入导出插件,支持密码、水印、公式等的本地导入导出) `2024Q1`+- **插入 svg 形状** (支持[Pen tool](https://github.com/mengshukeji/Pentool)的插入、修改和删除,并且随表格的变动而产生变化) `2023Q2`### Docs-- [x] 渲染-- [ ] 界面-- [ ] 待定+#### 📚 编辑++- **添加和编辑文本** `2023Q1`+- **查找和替换文本** `2023Q4`+- **检查语法、拼写等** `2024Q2`+- **显示字数统计** `2023Q1`+- **插入和删除超链接** `2023Q2`++#### 📚 文本格式++- **设置文本格式** `2023Q1`+- **创建项目符号列表或编号列表** `2023Q1`+- **更改行距** `2023Q1`+- **样式** `2023Q1`+- **主题** `2024Q1`++#### 📚 页面布局++- **更改页边距** `2023Q1`+- **分栏** `2023Q1`+- **横向或纵向页面** `2023Q2`+- **页面边框** `2023Q4`+- **页眉或页脚** `2023Q2`+- **页码** `2023Q2`+- **分页符** `2023Q2`+- **目录** `2024Q2`++#### 📚 插入表格、图片和水印++- **表格** `2023Q2`+- **图片** `2023Q1`+- **图标** `2023Q3`+- **艺术字** `2024Q3`+- **水印** `2023Q2`+- **标尺** `2023Q3`+- **旋转图片或形状** `2023Q1`+- **图文混排** `2023Q1`++#### 📚 学术格式++- **编写方程式或公式** `2024Q2`+- **段落首行缩进** `2023Q1`+- **双倍行距** `2023Q1`++#### 📚 编辑、打印、协作++- **转换或保存为 PDF** `2024Q4`+- **编辑 PDF** `2024Q4`+- **打印文档** `2024Q4`+- **协同编辑** `2023Q4`+- **批注** `2023Q4`+- **移动端** `2024Q4`++#### 📚 其他++- **插入 Sheet** `2023Q2`+- **插入 slide** `2023Q2`+- **导入/导出 word 格式** `2023Q4 - 2024Q4 Gradually enhance compatibility`### Slides-- [ ] 渲染-- [ ] 界面-- [ ] 待定+#### 📚 幻灯片和版式++- **幻灯片母版** `2023Q3`+- **幻灯片版式** `2023Q3`+- **通过主题为幻灯片添加颜色和设计** `2023Q4`+- **横向和纵向页面** `2023Q4`+- **幻灯片组织成节** `2023Q4`+- **创建、合并和组合幻灯片上的对象** `2023Q2`+- **旋转或翻转对象** `2023Q2`+- **叠放顺序** `2023Q2`++#### 📚 文本、表格++- **艺术字** `2024Q3`+- **超链接** `2023Q3`+- **拼写检查** `2024Q4`+- **表格** `2023Q2`+- **幻灯片编号、页码或日期和时间** `2023Q4`+- **形状或文本框中的文本方向和位置** `2023Q3`++#### 📚 图片、形状、图表++- **图片插入** `2023Q1`+- **图片编辑** `2024Q2`+- **SmartArt** `2024Q2`+- **背景图片** `2023Q2`+- **图表** `2023Q4 - 2024Q2`+- **形状** `2023Q2`+- **图标** `2023Q2`++#### 📚 幻灯片放映++- **演示模式** `2023Q2`+- **演讲者备注** `2023Q4`+- **排练和计时** `2024Q4`+- **录制** `2024Q4`+- **打印** `2024Q4`+- **自动放映** `2024Q4`++#### 📚 动画、视频和音频++- **切换效果** `2024Q2`+- **文本和对象动画** `2024Q1`+- **补间切换** `2024Q4`+- **视频** `2023Q4`+- **音频** `2023Q4`+- **录制屏幕** `2024Q4`++#### 📚 其他++- **协同编辑** `2023Q4`+- **转换为视频** `2024Q4`+- **保存为 PDF** `2024Q4`+- **导入/导出为 PPT** `2023Q4`+- **移动端** `2023Q4`+- **插入 Sheets** `2023Q2`+- **插入 documents** `2023Q2`diff --git a/README.md b/README.mdindex 9d9461264f..32dddc7091 100644--- a/README.md+++ b/README.md@@ -58,102 +58,239 @@ Please file an issue at [Issues](http://github.com/dream-num/univer/issues).[](https://github.com/dream-num/univer/stargazers)+## Architecture++Univer is written in typescript and designed according to the plug-in architecture. The functions outside the core are developed in the form of plug-ins. In the future, a plug-in market will be built to meet more personalized needs+++## Rendering engine++Univer sheet, document, and slide adopt the same rendering engine architecture, which abstracts the application into text flow, table, canvas, and core part triggers rendering, and object is the renderer.+++1. Achieve the nesting and operation between applications.+2. Sheet cells support embedding doc text+3. Support inserting sheet, doc, slide in slide++| slide 10-layer embedding | Sheet in slide and doc in cell | wrap text around a picture |+| :-------------------------------: | :--------------------------------------------: | :-----------------------------: |+|  |  |  |++## Formula engine++Univer formula engine, supports asynchronous calculation, lambda function and range naming+++## Development Plan### Sheets-- Basic ability-- - [x] core data structures- - [x] render- - [x] UI- - [x] cell editing--- Sheet operation-- - [x] sheet delete- - [x] sheet copy- - [x] sheet sort- - [x] sheet rename- - [x] sheet change color- - [x] sheet hide- - [x] sheet unhide- - [x] sheet move left- - [x] sheet moves right--- Right click menu-- - [x] copy- - [x] paste- - [x] insert row- - [x] insert column- - [x] delete selected rows- - [x] delete selected columns- - [x] delete cell- - [x] clear content--- Toolbar-- - [x] undo- - [x] redo- - [ ] formatter- - [ ] currency format- - [ ] percent format- - [ ] decrease decimal places- - [ ] increase the number of decimal places- - [ ] more formats- - [x] font family- - [x] font size- - [x] bold- - [x] italic- - [x] strikethrough- - [x] underscore- - [x] text color- - [x] fill color- - [x] border- - [x] merge cells- - [x] horizontal alignment- - [x] vertical alignment- - [x] text wrap- - [x] text rotation--- Count bar-- - [x] count- - [x] zoom--- Plugins- - [x] clipboard- - [ ] format- - [ ] formula- - [ ] image- - [ ] freeze- - [ ] link- - [ ] comment- - [ ] pivot table- - [ ] chart- - [ ] sort- - [ ] filter- - [ ] conditional format- - [ ] alternating colors- - [ ] data validation- - [ ] split column- - [ ] screenshot- - [ ] find- - [ ] replace- - [ ] protection- - [ ] import and export- - [ ] collaboration+> The goal of the first phase, [consistent with the function of luckysheet2.0 version](https://dream-num.github.io/LuckysheetDocs/guide/#features)++##### 🛠️Formatting++- **Styling** `done`+- **Conditional formatting** `2023Q1`+- **Align or rotate text** `done`+- **Support text truncation, overflow, automatic line wrapping** `done`+- **Data types** `done`+ - **currency, percentages, decimals, dates**+ - **Custom**+- **Cell segmentation style** `done`++##### 🧬Cells++- **Move cells by drag and dropping** `done`+- **Fill handle** `2023Q1`+- **Auto Fill Options** `2023Q1`+- **Multiple selection** `2023Q1`+- **Find and replace** `2023Q2`+- **Location** `2023Q4`+- **Merge cells** `done`+- **Data validation** `2023Q2`++##### 🖱️Row & columns++- **Hide, Insert, Delete rows and columns** `2023Q1`+- **Frozen rows and columns** `2023Q1`+- **Split text** `2023Q4`++##### 🔨Operation++- **Undo/Redo** `2023Q1`+- **Copy/Paste/Cut** `2023Q2`+- **Hot key** `2023Q2`+- **Format Painter** `2023Q4`+- **Selection by drag and dropping** `2023Q1`++##### ⚙️Formulas & functions++- **formula engine (array formula, named, lambda)** `done`+- **Built-in formulas** `2023Q1 - 2023Q4 finished according to the frequency of use`+- **Remote formulas** `2023Q4`+- **Custom** `2023Q4`++##### 📐Tables++- **Filters** `2023Q2`+- **Sort** `2023Q2`++##### 📈Pivot table++- **Arrange fields** `2023Q3`+- **Aggregation** `2023Q3`+- **Filter data** `2023Q4`+- **Drill down** `2023Q4`+- **Create a PivotChart** `2023Q4`++##### 📊Chart++- **Basic 6 Chart** `2023Q4 - 2024Q2`+- **Advanced Chart** `2024Q4`+- **SparkLines** `2024Q2`++##### ✍️Share++- **Comments** `2023Q3`+- **Collaborate** `2023Q3`++##### 📚Insert object++- **Insert picture** (JPG,PNG,SVG and so on) `2023Q3`++##### ⚡Other++- **Matrix operation** `2023Q4`+- **Screenshot** `2023Q4`+- **Copy to** `2023Q3`+- **EXCEL import/export** `2023Q1 - 2023Q4 Gradually enhance compatibility`++> New feature++- **Print** (Like excel print option, save to PDF) `2024Q2`+- **Tree menu** (Just like the outline (group) function of excel) `2024Q1`+- **Table new Features** (filter, slicer) `2024Q1`+- **CSV,TXT import/export** (Specially adapted to Luckysheet) `2024Q1`+- **Insert Shapes** ([Pen tool](https://github.com/mengshukeji/Pentool) Shapes) `2023Q2`### Docs-- [x] render-- [ ] UI-- [ ] pending+#### 📚 Write & edit++- **Add and edit text** `2023Q1`+- **Find and replace text** `2023Q4`+- **Check grammar, spelling, and more** `2024Q2`+- **Show word count** `2023Q1`+- **Insert and remove hyperlinks** `2023Q2`++#### 📚 Format text++- **Add and format text** `2023Q1`+- **Create a bulleted or numbered list** `2023Q1`+- **Change the line spacing** `2023Q1`+- **Apply styles** `2023Q1`+- **Apply themes** `2024Q1`++#### 📚 Lay out pages++- **Change margins** `2023Q1`+- **Create newsletter columns** `2023Q1`+- **Change page orientation to landscape or portrait** `2023Q2`+- **Add a border to a page** `2023Q4`+- **Insert a header or footer** `2023Q2`+- **Insert page numbers** `2023Q2`+- **Insert a page break** `2023Q2`+- **Insert a table of contents** `2024Q2`++#### 📚 Lay out pages++- **Insert a table** `2023Q2`+- **Insert pictures** `2023Q1`+- **Insert icons** `2023Q3`+- **Insert WordArt** `2024Q3`+- **Insert a watermark** `2023Q2`+- **Show the ruler** `2023Q3`+- **Rotate a picture or shape** `2023Q1`+- **Wrap text around a picture in Word** `2023Q1`++#### 📚 For school++- **Write an equation or formula** `2024Q2`+- **Indent the first line of a paragraph** `2023Q1`+- **Double-space the lines in a document** `2023Q1`++#### 📚 Edit & print &++- **Convert or save to PDF** `2024Q4`+- **Edit a PDF** `2024Q4`+- **Print your document** `2024Q4`+- **Collaborate** `2023Q4`+- **Comment** `2023Q4`+- **mobile device** `2024Q4`++#### 📚 Other++- **Insert a Sheet** `2023Q2`+- **Insert a Slide** `2023Q2`+- **Word import/export** `2023Q4 - 2024Q4 Gradually enhance compatibility`### Slides-- [ ] render-- [ ] UI-- [ ] pending+#### 📚 Slides & layouts++- **Slide master** `2023Q3`+- **Apply a slide layout** `2023Q3`+- **Add color and design with Themes** `2023Q4`+- **landscape and portrait** `2023Q4`+- **Organize slides into sections** `2023Q4`+- **Create, merge, and group objects on a slide** `2023Q2`+- **Rotate or flip an object** `2023Q2`+- **Change the order** `2023Q2`++#### 📚 Text & tables++- **WordArt** `2024Q3`+- **Hyperlink** `2023Q3`+- **Check spelling** `2024Q4`+- **Table** `2023Q2`+- **Add slide numbers, page numbers, or the date and time** `2023Q4`+- **Set text direction and position in a shape or text box** `2023Q3`++#### 📚 Pictures & graphics++- **Insert a picture** `2023Q1`+- **Edit pictures** `2024Q2`+- **SmartArt** `2024Q2`+- **Put a background picture** `2023Q2`+- **Chart** `2023Q4 - 2024Q2`+- **Shape** `2023Q2`+- **Insert icons** `2023Q2`++#### 📚 Present slideshows++- **Presenter view** `2023Q2`+- **Speaker notes** `2023Q4`+- **Rehearse and time the delivery of a presentation** `2024Q4`+- **Record a slide show** `2024Q4`+- **Print your PowerPoint slides, handouts, or notes** `2024Q4`+- **Self-running presentation** `2024Q4`++#### 📚 Animation, video & audio++- **Transitions between slides** `2024Q2`+- **Animate text or objects** `2024Q1`+- **Morph transition** `2024Q4`+- **Video** `2023Q4`+- **Audio** `2023Q4`+- **Record screen** `2024Q4`++#### 📚 Other++- **Collaborate** `2023Q4`+- **Convert a presentation as a video** `2024Q4`+- **Save as PDF** `2024Q4`+- **PowerPoint import/export** `2023Q4`+- **Mobile** `2023Q4`+- **insert Sheets** `2023Q2`+- **insert documents** `2023Q2`diff --git a/docs/source/Formula Engine.png b/docs/source/Formula Engine.pngnew file mode 100644index 0000000000..b212b1f931Binary files /dev/null and b/docs/source/Formula Engine.png differdiff --git a/docs/source/Render Engine.png b/docs/source/Render Engine.pngnew file mode 100644index 0000000000..6b15e2d331Binary files /dev/null and b/docs/source/Render Engine.png differdiff --git a/docs/source/Sheet in slide.png b/docs/source/Sheet in slide.pngnew file mode 100644index 0000000000..bd9b04bcddBinary files /dev/null and b/docs/source/Sheet in slide.png differdiff --git a/docs/source/Slide.png b/docs/source/Slide.pngnew file mode 100644index 0000000000..428140dbebBinary files /dev/null and b/docs/source/Slide.png differdiff --git a/docs/source/doc.png b/docs/source/doc.pngnew file mode 100644index 0000000000..30a24e80beBinary files /dev/null and b/docs/source/doc.png differdiff --git a/docs/source/overall.png b/docs/source/overall.pngnew file mode 100644index 0000000000..d915c03276Binary files /dev/null and b/docs/source/overall.png differdiff --git a/examples/univer-sheet-ts/index.html b/examples/univer-sheet-ts/index.htmlindex c5e5e1855a..e471eecb52 100644--- a/examples/univer-sheet-ts/index.html+++ b/examples/univer-sheet-ts/index.html@@ -17,7 +17,7 @@<body><div id="app" style="z-index: 1; position: fixed; font-size: 20px; color: green;"></div>- <div id="universheet" style="height: 100vh;"></div>+ <div id="universheet" style="height: 100%;"></div><script type="module" src="./src/main.tsx"></script></body>diff --git a/packages/base-sheets/src/SheetPlugin.tsx b/packages/base-sheets/src/SheetPlugin.tsxindex aaad776955..bd6fb0a884 100644--- a/packages/base-sheets/src/SheetPlugin.tsx+++ b/packages/base-sheets/src/SheetPlugin.tsx@@ -106,6 +106,12 @@ export class SheetPlugin extends Plugin<SheetPluginObserve, SheetContext> {window.addEventListener('resize', () => {engineInstance.resize();});++ // should be clear+ setTimeout(() => {+ engineInstance.resize();+ }, 0);+// window.onresize = () => {// engineInstance.resize();// };diff --git a/packages/base-sheets/tsconfig.json b/packages/base-sheets/tsconfig.jsonindex 5cb09f4076..0d0b125dfa 100644--- a/packages/base-sheets/tsconfig.json+++ b/packages/base-sheets/tsconfig.json@@ -29,12 +29,5 @@"jsxFragmentFactory": "Fragment","strictPropertyInitialization": false,"types": ["jest", "node", "@types/jest"]- },- "include": [- "src/**/*",- "test/**/*.test.(ts|tsx|js)",- "../base-render/src/ScrollTimer.ts",- "../sheets-plugin-formula/src/Controller/locale",- "../sheets-plugin-formula/src/Controller/CellInputHandler.ts"- ]+ }}diff --git a/packages/base-slides/src/View/Render/Adaptors/DocsAdaptor.ts b/packages/base-slides/src/View/Render/Adaptors/DocsAdaptor.tsindex eb0b4f8f40..cc7fd9bbd3 100644--- a/packages/base-slides/src/View/Render/Adaptors/DocsAdaptor.ts+++ b/packages/base-slides/src/View/Render/Adaptors/DocsAdaptor.ts@@ -107,6 +107,8 @@ export class DocsAdaptor extends ObjectAdaptor {documents.calculatePagePosition();+ // documents.enableEditor();+const pageSize = documents.getSkeleton()?.getPageSize();documents.onPageRenderObservable.add((config: IPageRenderConfig) => {diff --git a/packages/base-slides/src/View/Render/CanvasView.ts b/packages/base-slides/src/View/Render/CanvasView.tsindex c15385a695..fd35705706 100644--- a/packages/base-slides/src/View/Render/CanvasView.ts+++ b/packages/base-slides/src/View/Render/CanvasView.ts@@ -44,13 +44,26 @@ export class CanvasView {continue;}- this._createThumb(thumbDom as HTMLElement, id);-this._createScene(id, this._slide, pages[i]);- this._thumbSceneRender(id);+ // this._thumbSceneRender(id);}+ setTimeout(() => {+ for (var i = 0, len = thumbList.length; i < len; i++) {+ const thumbDom = (thumbList[i] as HTMLElement).querySelector('div');+ const page = pages[i];+ const { id } = page;+ if (this._slideThumbEngine.has(id) || !thumbDom) {+ continue;+ }++ this._createThumb(thumbDom as HTMLElement, id);++ this._thumbSceneRender(id);+ }+ }, 300);+this._activePageId = pages[0].id;this._slide.activeFirstPage();