@p10node/office-engine 0.1.1 → 0.2.2
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/README.md +28 -21
- package/dist/{DocViewer-kfAVEXOO.js → DocViewer-Co7q5D2H.js} +661 -624
- package/dist/DocViewer-Co7q5D2H.js.map +1 -0
- package/dist/assets/worker-BEwT3OhG.js.map +1 -0
- package/dist/{collab-BzN1ZI-z.js → collab-BvjXvfJ9.js} +529 -232
- package/dist/collab-BvjXvfJ9.js.map +1 -0
- package/dist/collab.js +1 -1
- package/dist/core.js +1 -1
- package/dist/{default-worker-f546VALp.js → default-worker-BDj6MNRA.js} +28 -8
- package/dist/default-worker-BDj6MNRA.js.map +1 -0
- package/dist/embed.js +5 -3
- package/dist/embed.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/office-engine.embed.js +15 -11
- package/dist/office-engine.worker.js +26 -6
- package/dist/types/collab/compact.d.ts +23 -0
- package/dist/types/collab/hub.d.ts +35 -4
- package/dist/types/collab/index.d.ts +9 -2
- package/dist/types/collab/protocol.d.ts +29 -2
- package/dist/types/collab/session.d.ts +5 -1
- package/dist/types/collab/store.d.ts +94 -0
- package/dist/types/core/xlsx/workbook.d.ts +2 -1
- package/dist/types/embed.d.ts +1 -1
- package/dist/types/react/common/hooks.d.ts +1 -1
- package/dist/types/react/xlsx/fit.d.ts +4 -0
- package/package.json +1 -1
- package/dist/DocViewer-kfAVEXOO.js.map +0 -1
- package/dist/assets/worker-DbLPJnSo.js.map +0 -1
- package/dist/collab-BzN1ZI-z.js.map +0 -1
- package/dist/default-worker-f546VALp.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,33 +1,20 @@
|
|
|
1
1
|
# @p10node/office-engine
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@p10node/office-engine)
|
|
4
|
+
[](https://www.npmjs.com/package/@p10node/office-engine)
|
|
5
|
+
[](https://github.com/p10node/office-engine/actions/workflows/ci.yml)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
3
8
|
View + edit **DOCX / XLSX / PPTX** directly in the browser. Loads progressively like Google Docs, handles heavy files, one-line React embed, saves back to the original format.
|
|
4
9
|
|
|
5
|
-
**[Live demo](https://p10node.github.io/office-engine/demo/)
|
|
10
|
+
**[npm](https://www.npmjs.com/package/@p10node/office-engine)** · **[Live demo](https://p10node.github.io/office-engine/demo/)** · **[Docs](https://p10node.github.io/office-engine/)**
|
|
11
|
+
|
|
12
|
+
The demo has samples, heavy files (300k-row sheet, 305-slide deck), drag & drop your own file, edit and download.
|
|
6
13
|
|
|
7
14
|
| DOCX | XLSX | PPTX |
|
|
8
15
|
|-------------------------------------------|-------------------------------------------|-------------------------------------------|
|
|
9
16
|
|  |  |  |
|
|
10
17
|
|
|
11
|
-
## Features
|
|
12
|
-
|
|
13
|
-
- **Progressive loading**: lazy ZIP, HTTP Range requests, streaming XML parser in a Web Worker → UI never blocks
|
|
14
|
-
- **Virtualized views**: only visible pages, cells and slides render
|
|
15
|
-
- **Editing** with a Google Docs-style toolbar: DOCX text, styles, lists, images, tables; XLSX cells, formulas (134 functions), formats, borders, rows/columns, sheets; PPTX text, shapes, images, slides, slideshow
|
|
16
|
-
- **Fast save**: only edited parts are regenerated, everything else keeps its original bytes
|
|
17
|
-
- **File menu**: new, open (also CSV / text / Markdown / HTML), import CSV, rename, download as PDF / HTML / text / CSV, document details, print
|
|
18
|
-
- **Real-time collaboration**: live edits, avatars, collaborators' cursors, offline edits sync on reconnect
|
|
19
|
-
- **Embed anywhere**: React component, hook, vanilla `mount()`, `<office-viewer>` web component, single `<script>` file
|
|
20
|
-
|
|
21
|
-
Full list, format coverage and limitations: [Features](docs/features.md).
|
|
22
|
-
|
|
23
|
-
| File | Size | First paint | Fully loaded |
|
|
24
|
-
|--------------------------|---------|-------------|-------------------|
|
|
25
|
-
| DOCX 20k paragraphs | 1.2 MB | ~180 ms | 2073 pages in ~2s |
|
|
26
|
-
| XLSX 300k rows × 12 cols | 24.8 MB | ~330 ms | ~2s |
|
|
27
|
-
| PPTX 305 slides | 0.3 MB | ~110 ms | on-demand |
|
|
28
|
-
|
|
29
|
-
Measured in headless Chromium on Apple M-series.
|
|
30
|
-
|
|
31
18
|
## Install
|
|
32
19
|
|
|
33
20
|
```bash
|
|
@@ -62,6 +49,26 @@ Also online at [p10node.github.io/office-engine](https://p10node.github.io/offic
|
|
|
62
49
|
- [Real-time collaboration](docs/collaboration.md)
|
|
63
50
|
- [Development](docs/development.md): playground, architecture, demo deploy, release
|
|
64
51
|
|
|
52
|
+
## Features
|
|
53
|
+
|
|
54
|
+
- **Progressive loading**: lazy ZIP, HTTP Range requests, streaming XML parser in a Web Worker → UI never blocks
|
|
55
|
+
- **Virtualized views**: only visible pages, cells and slides render
|
|
56
|
+
- **Editing** with a Google Docs-style toolbar: DOCX text, styles, lists, images, tables; XLSX cells, formulas (134 functions), formats, borders, rows/columns, sheets; PPTX text, shapes, images, slides, slideshow
|
|
57
|
+
- **Fast save**: only edited parts are regenerated, everything else keeps its original bytes
|
|
58
|
+
- **File menu**: new, open (also CSV / text / Markdown / HTML), import CSV, rename, download as PDF / HTML / text / CSV, document details, print
|
|
59
|
+
- **Real-time collaboration**: live edits, avatars, collaborators' cursors, offline edits sync on reconnect
|
|
60
|
+
- **Embed anywhere**: React component, hook, vanilla `mount()`, `<office-viewer>` web component, single `<script>` file
|
|
61
|
+
|
|
62
|
+
Full list, format coverage and limitations: [Features](docs/features.md).
|
|
63
|
+
|
|
64
|
+
| File | Size | First paint | Fully loaded |
|
|
65
|
+
|--------------------------|---------|-------------|-------------------|
|
|
66
|
+
| DOCX 20k paragraphs | 1.2 MB | ~180 ms | 2073 pages in ~2s |
|
|
67
|
+
| XLSX 300k rows × 12 cols | 24.8 MB | ~330 ms | ~2s |
|
|
68
|
+
| PPTX 305 slides | 0.3 MB | ~110 ms | on-demand |
|
|
69
|
+
|
|
70
|
+
Measured in headless Chromium on Apple M-series.
|
|
71
|
+
|
|
65
72
|
## License
|
|
66
73
|
|
|
67
74
|
[MIT](LICENSE) © p10node
|