@signaltree/core 7.6.1 → 8.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.
@@ -1,7 +1,7 @@
1
1
  import { computed } from '@angular/core';
2
2
  import { isNodeAccessor } from '../../lib/utils.js';
3
- import { deepEqual } from '../../deep-equal.js';
4
- import { LRUCache } from '../../lru-cache.js';
3
+ import { deepEqual } from '../../shared/lib/deep-equal.js';
4
+ import { LRUCache } from '../../shared/lib/lru-cache.js';
5
5
 
6
6
  function isDevMode() {
7
7
  if (typeof __DEV__ !== 'undefined') {
package/dist/index.js CHANGED
@@ -21,7 +21,7 @@ export { createAsyncOperation, trackAsync } from './lib/async-helpers.js';
21
21
  export { TREE_PRESETS, combinePresets, createPresetConfig, getAvailablePresets, validatePreset } from './enhancers/presets/lib/presets.js';
22
22
  export { SIGNAL_TREE_CONSTANTS, SIGNAL_TREE_MESSAGES } from './lib/constants.js';
23
23
  export { entityMap } from './lib/markers/entity-map.js';
24
- export { deepEqual, deepEqual as equal } from './deep-equal.js';
25
- export { parsePath } from './parse-path.js';
26
- export { isBuiltInObject } from './is-built-in-object.js';
24
+ export { deepEqual, deepEqual as equal } from './shared/lib/deep-equal.js';
25
+ export { parsePath } from './shared/lib/parse-path.js';
26
+ export { isBuiltInObject } from './shared/lib/is-built-in-object.js';
27
27
  export { createDevTree } from './lib/presets.js';
@@ -1,4 +1,4 @@
1
- import { DEFAULT_PATH_CACHE_SIZE } from '../constants.js';
1
+ import { DEFAULT_PATH_CACHE_SIZE } from '../shared/lib/constants.js';
2
2
 
3
3
  const SIGNAL_TREE_CONSTANTS = {
4
4
  MAX_PATH_CACHE_SIZE: DEFAULT_PATH_CACHE_SIZE,
@@ -1,5 +1,5 @@
1
1
  import { signal } from '@angular/core';
2
- import { deepEqual } from '../deep-equal.js';
2
+ import { deepEqual } from '../shared/lib/deep-equal.js';
3
3
 
4
4
  function clone(value) {
5
5
  try {
@@ -9,8 +9,8 @@ import { SignalMemoryManager } from './memory/memory-manager.js';
9
9
  import { getPathNotifier } from './path-notifier.js';
10
10
  import { SecurityValidator } from './security/security-validator.js';
11
11
  import { createLazySignalTree, unwrap } from './utils.js';
12
- import { deepEqual } from '../deep-equal.js';
13
- import { isBuiltInObject } from '../is-built-in-object.js';
12
+ import { deepEqual } from '../shared/lib/deep-equal.js';
13
+ import { isBuiltInObject } from '../shared/lib/is-built-in-object.js';
14
14
 
15
15
  const NODE_ACCESSOR_SYMBOL = Symbol.for('SignalTree:NodeAccessor');
16
16
  function isNodeAccessor(value) {
package/dist/lib/utils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { isSignal, signal, runInInjectionContext, effect } from '@angular/core';
2
- import { isBuiltInObject } from '../is-built-in-object.js';
2
+ import { isBuiltInObject } from '../shared/lib/is-built-in-object.js';
3
3
 
4
4
  const CALLABLE_SIGNAL_SYMBOL = Symbol.for('SignalTree:NodeAccessor');
5
5
  function isEntityMapMarker(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signaltree/core",
3
- "version": "7.6.1",
3
+ "version": "8.0.1",
4
4
  "description": "Reactive JSON for Angular. JSON branches, reactive leaves. No actions. No reducers. No selectors.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -21,8 +21,7 @@
21
21
  "@angular/compiler": "^20.0.0",
22
22
  "@angular/platform-browser-dynamic": "^20.0.0",
23
23
  "zone.js": "^0.15.0",
24
- "tslib": "^2.0.0",
25
- "vitest": "^2.0.0"
24
+ "tslib": "^2.0.0"
26
25
  },
27
26
  "peerDependenciesMeta": {
28
27
  "@angular/compiler": {
@@ -33,9 +32,6 @@
33
32
  },
34
33
  "zone.js": {
35
34
  "optional": true
36
- },
37
- "vitest": {
38
- "optional": true
39
35
  }
40
36
  },
41
37
  "publishConfig": {
@@ -46,7 +46,7 @@ export interface ModularDevToolsInterface {
46
46
  trackComposition: (modules: string[]) => void;
47
47
  startModuleProfiling: (module: string) => string;
48
48
  endModuleProfiling: (profileId: string) => void;
49
- connectDevTools: (treeName: string) => void;
49
+ connectDevTools: () => void;
50
50
  exportDebugSession: () => {
51
51
  metrics: ModularPerformanceMetrics;
52
52
  modules: ModuleMetadata[];
@@ -93,7 +93,7 @@ export interface TimeTravelMethods<T = unknown> {
93
93
  };
94
94
  }
95
95
  export interface DevToolsMethods {
96
- connectDevTools(): void;
96
+ connectDevTools(treeName?: string): void;
97
97
  disconnectDevTools(): void;
98
98
  }
99
99
  export interface EntitiesEnabled {
@@ -261,6 +261,10 @@ export interface DevToolsConfig {
261
261
  maxArrayLength?: number;
262
262
  maxStringLength?: number;
263
263
  serialize?: (state: unknown) => unknown;
264
+ aggregatedReduxInstance?: {
265
+ id: string;
266
+ name?: string;
267
+ };
264
268
  features?: {
265
269
  jump?: boolean;
266
270
  skip?: boolean;
@@ -1,5 +1,4 @@
1
1
  import { WritableSignal } from '@angular/core';
2
- import { deepEqual, isBuiltInObject, parsePath } from '@signaltree/shared';
3
2
  export { deepEqual };
4
3
  export { deepEqual as equal };
5
4
  export { isBuiltInObject };
@@ -11,6 +10,26 @@ export interface MemoryManager {
11
10
  dispose(): void;
12
11
  }
13
12
  import type { NodeAccessor, TreeNode } from './types';
13
+
14
+ // Inlined from @signaltree/shared (internal package)
15
+ declare function deepEqual<T>(a: T, b: T): boolean;
16
+ declare function deepClone<T>(obj: T): T;
17
+ declare function isBuiltInObject(value: unknown): boolean;
18
+ declare function parsePath(path: string): string[];
19
+ declare function matchPath(path: string[], pattern: string[]): boolean;
20
+ declare function mergeDeep<T>(target: T, source: unknown): T;
21
+ declare function snapshotsEqual<T>(a: T, b: T): boolean;
22
+ declare function getChanges<T>(prev: T, next: T): unknown;
23
+ declare class LRUCache<K, V> {
24
+ constructor(maxSize: number);
25
+ get(key: K): V | undefined;
26
+ set(key: K, value: V): void;
27
+ has(key: K): boolean;
28
+ delete(key: K): boolean;
29
+ clear(): void;
30
+ get size(): number;
31
+ }
32
+ declare const DEFAULT_PATH_CACHE_SIZE: number;
14
33
  export declare function isNodeAccessor(value: unknown): value is NodeAccessor<unknown>;
15
34
  export declare function isAnySignal(value: unknown): boolean;
16
35
  export declare function toWritableSignal<T>(node: NodeAccessor<T>, injector?: unknown): WritableSignal<T>;
File without changes
File without changes