@signaltree/enterprise 5.1.6 → 6.0.1
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 +10 -10
- package/dist/index.js +1 -1
- package/dist/lib/enterprise-enhancer.js +3 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -20,9 +20,9 @@ npm install @signaltree/core @signaltree/enterprise
|
|
|
20
20
|
|
|
21
21
|
```typescript
|
|
22
22
|
import { signalTree } from '@signaltree/core';
|
|
23
|
-
import {
|
|
23
|
+
import { enterprise } from '@signaltree/enterprise';
|
|
24
24
|
|
|
25
|
-
const tree = signalTree(largeState).with(
|
|
25
|
+
const tree = signalTree(largeState).with(enterprise());
|
|
26
26
|
|
|
27
27
|
// Use optimized bulk updates
|
|
28
28
|
const result = tree.updateOptimized(newData, {
|
|
@@ -53,15 +53,15 @@ console.log(result.stats);
|
|
|
53
53
|
|
|
54
54
|
## API
|
|
55
55
|
|
|
56
|
-
### `
|
|
56
|
+
### `enterprise()`
|
|
57
57
|
|
|
58
58
|
Enhancer that adds enterprise optimizations to a SignalTree.
|
|
59
59
|
|
|
60
60
|
```typescript
|
|
61
61
|
import { signalTree } from '@signaltree/core';
|
|
62
|
-
import {
|
|
62
|
+
import { enterprise } from '@signaltree/enterprise';
|
|
63
63
|
|
|
64
|
-
const tree = signalTree(initialState).with(
|
|
64
|
+
const tree = signalTree(initialState).with(enterprise());
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
### `tree.updateOptimized(updates, options?)`
|
|
@@ -116,7 +116,7 @@ if (index) {
|
|
|
116
116
|
|
|
117
117
|
```typescript
|
|
118
118
|
import { signalTree } from '@signaltree/core';
|
|
119
|
-
import {
|
|
119
|
+
import { enterprise } from '@signaltree/enterprise';
|
|
120
120
|
|
|
121
121
|
interface DashboardState {
|
|
122
122
|
metrics: Record<string, number>;
|
|
@@ -125,7 +125,7 @@ interface DashboardState {
|
|
|
125
125
|
// ... hundreds more properties
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
const dashboard = signalTree<DashboardState>(initialState).with(
|
|
128
|
+
const dashboard = signalTree<DashboardState>(initialState).with(enterprise());
|
|
129
129
|
|
|
130
130
|
// High-frequency updates from WebSocket
|
|
131
131
|
socket.on('metrics', (newMetrics) => {
|
|
@@ -139,14 +139,14 @@ socket.on('metrics', (newMetrics) => {
|
|
|
139
139
|
|
|
140
140
|
```typescript
|
|
141
141
|
import { signalTree } from '@signaltree/core';
|
|
142
|
-
import {
|
|
142
|
+
import { enterprise } from '@signaltree/enterprise';
|
|
143
143
|
|
|
144
144
|
const grid = signalTree({
|
|
145
145
|
rows: [] as GridRow[],
|
|
146
146
|
columns: [] as GridColumn[],
|
|
147
147
|
filters: {} as FilterState,
|
|
148
148
|
selection: new Set<string>(),
|
|
149
|
-
}).with(
|
|
149
|
+
}).with(enterprise());
|
|
150
150
|
|
|
151
151
|
// Bulk update from API
|
|
152
152
|
async function loadData() {
|
|
@@ -164,7 +164,7 @@ async function loadData() {
|
|
|
164
164
|
### Custom Equality for Complex Objects
|
|
165
165
|
|
|
166
166
|
```typescript
|
|
167
|
-
const tree = signalTree(complexState).with(
|
|
167
|
+
const tree = signalTree(complexState).with(enterprise());
|
|
168
168
|
|
|
169
169
|
tree.updateOptimized(newState, {
|
|
170
170
|
equalityFn: (a, b) => {
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ChangeType, DiffEngine } from './lib/diff-engine.js';
|
|
2
2
|
export { PathIndex } from './lib/path-index.js';
|
|
3
3
|
export { OptimizedUpdateEngine } from './lib/update-engine.js';
|
|
4
|
-
export { withEnterprise } from './lib/enterprise-enhancer.js';
|
|
4
|
+
export { enterprise, withEnterprise } from './lib/enterprise-enhancer.js';
|
|
5
5
|
export { configureScheduler, getSchedulerMetrics, postTask } from './lib/scheduler.js';
|
|
6
6
|
export { createMockPool } from './lib/thread-pools.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PathIndex } from './path-index.js';
|
|
2
2
|
import { OptimizedUpdateEngine } from './update-engine.js';
|
|
3
3
|
|
|
4
|
-
function
|
|
4
|
+
function enterprise() {
|
|
5
5
|
return tree => {
|
|
6
6
|
let pathIndex = null;
|
|
7
7
|
let updateEngine = null;
|
|
@@ -28,5 +28,6 @@ function withEnterprise() {
|
|
|
28
28
|
return enhancedTree;
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
+
const withEnterprise = Object.assign(enterprise, {});
|
|
31
32
|
|
|
32
|
-
export { withEnterprise };
|
|
33
|
+
export { enterprise, withEnterprise };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signaltree/enterprise",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"description": "Enterprise-grade optimizations for SignalTree. Provides diff-based updates, bulk operation optimization, and advanced change tracking for large-scale applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@angular/compiler": "^20.0.0",
|
|
72
72
|
"@angular/platform-browser-dynamic": "^20.0.0",
|
|
73
73
|
"zone.js": "^0.15.0",
|
|
74
|
-
"@signaltree/core": "^
|
|
74
|
+
"@signaltree/core": "^6.0.0",
|
|
75
75
|
"tslib": "^2.0.0",
|
|
76
76
|
"vitest": "^2.0.0"
|
|
77
77
|
},
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
|
-
"@signaltree/core": "
|
|
93
|
+
"@signaltree/core": "^6.0.0"
|
|
94
94
|
},
|
|
95
95
|
"publishConfig": {
|
|
96
96
|
"access": "public"
|