logisheets-engine 1.0.0
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 +85 -0
- package/dist/assets/logisheets_wasm_server_bg.wasm +0 -0
- package/dist/assets/worker-DtAa7uxj.js +4205 -0
- package/dist/logisheets-engine.css +1 -0
- package/dist/logisheets-engine.es.js +14095 -0
- package/dist/logisheets-engine.umd.js +1 -0
- package/dist/types/lib/adapters/index.d.ts +5 -0
- package/dist/types/lib/adapters/react.d.ts +88 -0
- package/dist/types/lib/block/enum_set_manager.d.ts +118 -0
- package/dist/types/lib/block/field_manager.d.ts +236 -0
- package/dist/types/lib/block/index.d.ts +7 -0
- package/dist/types/lib/block/manager.d.ts +25 -0
- package/dist/types/lib/block/value_formula.d.ts +47 -0
- package/dist/types/lib/clients/index.d.ts +3 -0
- package/dist/types/lib/clients/offscreen.d.ts +23 -0
- package/dist/types/lib/clients/service.d.ts +48 -0
- package/dist/types/lib/clients/workbook.d.ts +184 -0
- package/dist/types/lib/components/contextMenuTypes.d.ts +39 -0
- package/dist/types/lib/components/index.d.ts +8 -0
- package/dist/types/lib/components/utils.d.ts +33 -0
- package/dist/types/lib/engine.d.ts +242 -0
- package/dist/types/lib/global.d.ts +36 -0
- package/dist/types/lib/index.d.ts +15 -0
- package/dist/types/lib/license/index.d.ts +26 -0
- package/dist/types/lib/worker/border_helper.d.ts +24 -0
- package/dist/types/lib/worker/index.d.ts +3 -0
- package/dist/types/lib/worker/license.d.ts +27 -0
- package/dist/types/lib/worker/offscreen.worker.d.ts +35 -0
- package/dist/types/lib/worker/painter.d.ts +23 -0
- package/dist/types/lib/worker/pool.d.ts +26 -0
- package/dist/types/lib/worker/render.d.ts +24 -0
- package/dist/types/lib/worker/standable.d.ts +119 -0
- package/dist/types/lib/worker/types.d.ts +122 -0
- package/dist/types/lib/worker/view_manager.d.ts +59 -0
- package/dist/types/lib/worker/workbook.worker.d.ts +163 -0
- package/dist/types/lib/worker/worker.d.ts +5 -0
- package/dist/types/types/index.d.ts +115 -0
- package/package.json +40 -0
package/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# LogiSheets Engine
|
|
2
|
+
|
|
3
|
+
A high-performance spreadsheet rendering and editing library built with Svelte 5 and Web Workers.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🚀 High-performance canvas rendering with OffscreenCanvas
|
|
8
|
+
- 🔄 Web Worker architecture for non-blocking operations
|
|
9
|
+
- 📊 Full spreadsheet functionality (selection, editing, formulas)
|
|
10
|
+
- 🎨 Customizable cell layouts and styling
|
|
11
|
+
- 📱 Responsive scrollbars and touch support
|
|
12
|
+
- 🔌 Works with logisheets-web WASM engine
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install logisheets-engine logisheets-web
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
### Svelte
|
|
23
|
+
|
|
24
|
+
```svelte
|
|
25
|
+
<script>
|
|
26
|
+
import { Spreadsheet } from 'logisheets-engine';
|
|
27
|
+
import 'logisheets-engine/style.css';
|
|
28
|
+
|
|
29
|
+
let selectedData = $state({ source: 'none' });
|
|
30
|
+
let activeSheet = $state(0);
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<Spreadsheet
|
|
34
|
+
bind:selectedData
|
|
35
|
+
bind:activeSheet
|
|
36
|
+
showSheetTabs={true}
|
|
37
|
+
showScrollbars={true}
|
|
38
|
+
/>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### React / Other Frameworks
|
|
42
|
+
|
|
43
|
+
Use the DataService and WorkbookClient directly:
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import { DataService } from 'logisheets-engine';
|
|
47
|
+
import 'logisheets-engine/style.css';
|
|
48
|
+
|
|
49
|
+
// Create a worker and data service
|
|
50
|
+
const worker = new Worker(new URL('./worker.js', import.meta.url));
|
|
51
|
+
const dataService = new DataService(worker);
|
|
52
|
+
|
|
53
|
+
// Load a workbook
|
|
54
|
+
const fileBuffer = await fetch('workbook.xlsx').then(r => r.arrayBuffer());
|
|
55
|
+
await dataService.loadWorkbook(new Uint8Array(fileBuffer), 'workbook.xlsx');
|
|
56
|
+
|
|
57
|
+
// Render
|
|
58
|
+
const grid = await dataService.render(sheetId, anchorX, anchorY);
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## API
|
|
62
|
+
|
|
63
|
+
### Components
|
|
64
|
+
|
|
65
|
+
- `Spreadsheet` - Main spreadsheet component
|
|
66
|
+
- `ColumnHeaders` - Column header component
|
|
67
|
+
- `RowHeaders` - Row header component
|
|
68
|
+
- `Selector` - Cell selection indicator
|
|
69
|
+
- `SheetTabs` - Sheet tab bar
|
|
70
|
+
- `Scrollbar` - Custom scrollbar
|
|
71
|
+
- `ContextMenu` - Right-click context menu
|
|
72
|
+
|
|
73
|
+
### Services
|
|
74
|
+
|
|
75
|
+
- `DataService` - High-level API for spreadsheet operations
|
|
76
|
+
- `WorkbookClient` - Low-level workbook operations
|
|
77
|
+
- `OffscreenClient` - Canvas rendering operations
|
|
78
|
+
|
|
79
|
+
### Types
|
|
80
|
+
|
|
81
|
+
See the TypeScript definitions for full API documentation.
|
|
82
|
+
|
|
83
|
+
## License
|
|
84
|
+
|
|
85
|
+
MIT
|
|
Binary file
|