@zengrid/shared 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.
Files changed (2) hide show
  1. package/README.md +44 -0
  2. package/package.json +52 -0
package/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # @zengrid/shared
2
+
3
+ Shared algorithms and data structures for ZenGrid - reusable primitives for building high-performance grid applications.
4
+
5
+ ## Features
6
+
7
+ ### Data Structures
8
+ - **SparseMatrix** - Memory-efficient storage for large grids with empty cells
9
+ - **PrefixSumArray** - Fast range queries for cumulative data
10
+ - **ColumnStore** - Column-oriented storage with typed arrays
11
+ - **IntervalTree** - Efficient range overlap queries
12
+ - **R-Tree** - 2D spatial indexing for hit testing
13
+ - **Trie** - Prefix-based autocomplete
14
+ - **DependencyGraph** - DAG for formula dependencies
15
+
16
+ ### Algorithms
17
+ - **Binary Search** - O(log n) search in sorted arrays
18
+ - **Topological Sort** - DAG ordering (Kahn's algorithm)
19
+ - **Cycle Detection** - Find circular dependencies (DFS)
20
+ - **Pattern Detection** - Autofill pattern recognition
21
+ - **Predicate Compiler** - Optimize filter expressions
22
+
23
+ ## Installation
24
+
25
+ ```bash
26
+ npm install @zengrid/shared
27
+ ```
28
+
29
+ ## Usage
30
+
31
+ ### Barrel Imports
32
+ ```typescript
33
+ import { SparseMatrix, binarySearch } from '@zengrid/shared';
34
+ ```
35
+
36
+ ### Deep Imports (Better Tree-Shaking)
37
+ ```typescript
38
+ import { binarySearch } from '@zengrid/shared/algorithms/search';
39
+ import { SparseMatrix } from '@zengrid/shared/data-structures/sparse-matrix';
40
+ ```
41
+
42
+ ## License
43
+
44
+ MIT
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@zengrid/shared",
3
+ "version": "1.0.0",
4
+ "description": "14 advanced data structures and algorithms for high-performance grids",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.esm.js",
7
+ "types": "./dist/index.d.ts",
8
+ "sideEffects": false,
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.esm.js",
13
+ "require": "./dist/index.cjs"
14
+ },
15
+ "./algorithms/*": {
16
+ "types": "./dist/algorithms/*/index.d.ts",
17
+ "import": "./dist/algorithms/*/index.esm.js",
18
+ "require": "./dist/algorithms/*/index.cjs"
19
+ },
20
+ "./data-structures/*": {
21
+ "types": "./dist/data-structures/*/index.d.ts",
22
+ "import": "./dist/data-structures/*/index.esm.js",
23
+ "require": "./dist/data-structures/*/index.cjs"
24
+ },
25
+ "./types": {
26
+ "types": "./dist/types/index.d.ts",
27
+ "import": "./dist/types/index.esm.js",
28
+ "require": "./dist/types/index.cjs"
29
+ }
30
+ },
31
+ "files": [
32
+ "dist",
33
+ "README.md"
34
+ ],
35
+ "keywords": [
36
+ "algorithms",
37
+ "data-structures",
38
+ "grid",
39
+ "utilities"
40
+ ],
41
+ "author": "ZenGrid Team",
42
+ "license": "MIT",
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "https://github.com/zengrid-dev/zengrid.git",
46
+ "directory": "packages/shared"
47
+ },
48
+ "bugs": {
49
+ "url": "https://github.com/zengrid-dev/zengrid/issues"
50
+ },
51
+ "homepage": "https://github.com/zengrid-dev/zengrid#readme"
52
+ }