@signaltree/enterprise 4.1.1 → 4.1.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.
@@ -0,0 +1 @@
1
+ export * from "./src/index";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signaltree/enterprise",
3
- "version": "4.1.1",
3
+ "version": "4.1.2",
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,
@@ -68,7 +68,7 @@
68
68
  },
69
69
  "peerDependencies": {
70
70
  "@angular/core": "^20.3.0",
71
- "@signaltree/core": "4.1.1",
71
+ "@signaltree/core": "4.1.2",
72
72
  "tslib": "^2.0.0"
73
73
  },
74
74
  "devDependencies": {
@@ -79,7 +79,7 @@
79
79
  },
80
80
  "files": [
81
81
  "dist/**/*.js",
82
- "src/**/*.d.ts",
82
+ "dist/**/*.d.ts",
83
83
  "README.md"
84
84
  ]
85
85
  }
package/src/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export * from './lib/diff-engine';
2
- export * from './lib/path-index';
3
- export * from './lib/update-engine';
4
- export * from './lib/enterprise-enhancer';
5
- export * from './lib/scheduler';
6
- export * from './lib/thread-pools';
@@ -1,33 +0,0 @@
1
- import type { Path } from './path-index';
2
- export declare enum ChangeType {
3
- ADD = "add",
4
- UPDATE = "update",
5
- DELETE = "delete",
6
- REPLACE = "replace"
7
- }
8
- export interface Change {
9
- type: ChangeType;
10
- path: Path;
11
- value?: unknown;
12
- oldValue?: unknown;
13
- }
14
- export interface Diff {
15
- changes: Change[];
16
- hasChanges: boolean;
17
- }
18
- export interface DiffOptions {
19
- maxDepth?: number;
20
- detectDeletions?: boolean;
21
- ignoreArrayOrder?: boolean;
22
- equalityFn?: (a: unknown, b: unknown) => boolean;
23
- keyValidator?: (key: string) => boolean;
24
- }
25
- export declare class DiffEngine {
26
- private defaultOptions;
27
- diff(current: unknown, updates: unknown, options?: DiffOptions): Diff;
28
- private traverse;
29
- private diffArrays;
30
- private diffArraysOrdered;
31
- private diffArraysUnordered;
32
- private stringify;
33
- }
@@ -1,15 +0,0 @@
1
- import { PathIndex } from './path-index';
2
- import { UpdateResult } from './update-engine';
3
- import type { Signal } from '@angular/core';
4
- import type { Enhancer } from '@signaltree/core';
5
- export declare function withEnterprise<T extends Record<string, unknown>>(): Enhancer<T, T & EnterpriseEnhancedTree<T>>;
6
- export interface EnterpriseEnhancedTree<T> {
7
- updateOptimized(newValue: T, options?: {
8
- maxDepth?: number;
9
- ignoreArrayOrder?: boolean;
10
- equalityFn?: (a: unknown, b: unknown) => boolean;
11
- autoBatch?: boolean;
12
- batchSize?: number;
13
- }): UpdateResult;
14
- getPathIndex(): PathIndex<Signal<unknown>> | null;
15
- }
@@ -1 +0,0 @@
1
- export declare function enterprise(): string;
@@ -1,25 +0,0 @@
1
- import type { WritableSignal } from '@angular/core';
2
- export type PathSegment = string | number;
3
- export type Path = PathSegment[];
4
- export declare class PathIndex<T extends object = WritableSignal<any>> {
5
- private root;
6
- private pathCache;
7
- private stats;
8
- set(path: Path, signal: T): void;
9
- get(path: Path): T | null;
10
- has(path: Path): boolean;
11
- getByPrefix(prefix: Path): Map<string, T>;
12
- delete(path: Path): boolean;
13
- clear(): void;
14
- getStats(): {
15
- hits: number;
16
- misses: number;
17
- sets: number;
18
- cleanups: number;
19
- hitRate: number;
20
- cacheSize: number;
21
- };
22
- buildFromTree(tree: unknown, path?: Path): void;
23
- private pathToString;
24
- private collectDescendants;
25
- }
@@ -1,2 +0,0 @@
1
- export type Task = () => void;
2
- export declare function postTask(t: Task): void;
@@ -1,4 +0,0 @@
1
- export interface WorkerPool {
2
- run<T>(fn: (...args: any[]) => T, ...args: any[]): Promise<T>;
3
- }
4
- export declare function createMockPool(): WorkerPool;
@@ -1,32 +0,0 @@
1
- import { PathIndex } from './path-index';
2
- import type { DiffOptions } from './diff-engine';
3
- export interface UpdateOptions extends DiffOptions {
4
- batch?: boolean;
5
- batchSize?: number;
6
- }
7
- export interface UpdateResult {
8
- changed: boolean;
9
- duration: number;
10
- changedPaths: string[];
11
- stats?: {
12
- totalPaths: number;
13
- optimizedPaths: number;
14
- batchedUpdates: number;
15
- };
16
- }
17
- export declare class OptimizedUpdateEngine {
18
- private pathIndex;
19
- private diffEngine;
20
- constructor(tree: unknown);
21
- update(tree: unknown, updates: unknown, options?: UpdateOptions): UpdateResult;
22
- rebuildIndex(tree: unknown): void;
23
- getIndexStats(): ReturnType<PathIndex['getStats']>;
24
- private createPatches;
25
- private createPatch;
26
- private calculatePriority;
27
- private sortPatches;
28
- private applyPatches;
29
- private batchApplyPatches;
30
- private applyPatch;
31
- private isEqual;
32
- }
@@ -1 +0,0 @@
1
- export {};