@alwatr/signal 5.2.0 → 5.2.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,35 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.2.2](https://github.com/Alwatr/flux/compare/v5.2.1...v5.2.2) (2025-09-15)
7
+
8
+ ### 🐛 Bug Fixes
9
+
10
+ * update subscription to prevent receiving previous value in debounced signal ([044780d](https://github.com/Alwatr/flux/commit/044780d35427a97711788224e60e209fb53dea53))
11
+ * update subscription to trigger debouncer with value from source signal ([a7e8eff](https://github.com/Alwatr/flux/commit/a7e8effd7e963aaf905afae08a652d7abe222c3a))
12
+
13
+ ### 🔨 Code Refactoring
14
+
15
+ * improve logging in subscribe method to pass options directly ([e026dbf](https://github.com/Alwatr/flux/commit/e026dbf74ca96ec6d878bd5fb08f4939c46d08f2))
16
+ * simplify signalId assignment using nullish coalescing operator ([0578c85](https://github.com/Alwatr/flux/commit/0578c854677df2fe0a62e5fbbfa017856d82b611))
17
+ * update logging in subscribe method to pass options directly ([a7e32f2](https://github.com/Alwatr/flux/commit/a7e32f20df6b12c1c9dd06feaf01fca8170a5346))
18
+
19
+ ### 🧹 Miscellaneous Chores
20
+
21
+ * update @alwatr/debounce dependency to version 1.1.1 ([c2e2ae4](https://github.com/Alwatr/flux/commit/c2e2ae4fe54f8fdd482bd53b598f5e88570a26f2))
22
+ * update package dependencies to latest versions ([a517c82](https://github.com/Alwatr/flux/commit/a517c82b99073a65a8470da428dfd288080b7ea5))
23
+
24
+ ## [5.2.1](https://github.com/Alwatr/flux/compare/v5.2.0...v5.2.1) (2025-09-15)
25
+
26
+ ### ⚡ Performance Improvements
27
+
28
+ * To improve readability and avoid calling sourceSignal.get() twice, used temporary variable before using it. ([2aaa3bd](https://github.com/Alwatr/flux/commit/2aaa3bdd06745885495ca64a71c4040b9ec57cea))
29
+
30
+ ### 🔨 Code Refactoring
31
+
32
+ * change the `signal.value` to `signal.get()` ([fcdcb6c](https://github.com/Alwatr/flux/commit/fcdcb6caf82747b8e6d7ad846d6babead385c603))
33
+ * rename run_ method to scheduleExecution_ for clarity in EffectSignal ([402af2f](https://github.com/Alwatr/flux/commit/402af2f7b84357ade4f79b33611d6968ec6b8efd))
34
+
6
35
  ## [5.2.0](https://github.com/Alwatr/flux/compare/v5.1.0...v5.2.0) (2025-09-15)
7
36
 
8
37
  ### ✨ Features
package/README.md CHANGED
@@ -69,10 +69,10 @@ import {ComputedSignal} from '@alwatr/signal';
69
69
  const fullName = new ComputedSignal<string>({
70
70
  signalId: 'user-fullName',
71
71
  deps: [firstName], // This computed signal depends on firstName.
72
- get: () => `User: ${firstName.value}`,
72
+ get: () => `User: ${firstName.get()}`,
73
73
  });
74
74
 
75
- console.log(fullName.value); // Outputs: "User: John"
75
+ console.log(fullName.get()); // Outputs: "User: John"
76
76
  ```
77
77
 
78
78
  ### 4. Create an Effect Signal
@@ -85,7 +85,7 @@ import {EffectSignal} from '@alwatr/signal';
85
85
  const loggerEffect = new EffectSignal({
86
86
  deps: [fullName, counter], // This effect depends on fullName and counter.
87
87
  run: () => {
88
- console.log(`${fullName.value} has clicked ${counter.value} times.`);
88
+ console.log(`${fullName.get()} has clicked ${counter.get()} times.`);
89
89
  },
90
90
  });
91
91
  ```
@@ -134,7 +134,7 @@ Signals that depend on other signals (like `ComputedSignal` and `EffectSignal`)
134
134
  // Create a computed signal
135
135
  const isEven = new ComputedSignal({
136
136
  deps: [counter],
137
- get: () => counter.value % 2 === 0,
137
+ get: () => counter.get() % 2 === 0,
138
138
  });
139
139
 
140
140
  // ... use it for a while ...
@@ -167,7 +167,7 @@ The `subscribe` method accepts an optional second argument to customize its beha
167
167
  - **`constructor(config)`**: Creates a new state signal.
168
168
  - `config.signalId`: `string`
169
169
  - `config.initialValue`: `T`
170
- - **`.value`**: `T` - Gets the current value.
170
+ - **`.get()`**: `T` - Gets the current value.
171
171
  - **`.set(newValue: T)`**: Sets a new value and notifies listeners.
172
172
 
173
173
  ### `ComputedSignal<T>`
@@ -176,7 +176,7 @@ The `subscribe` method accepts an optional second argument to customize its beha
176
176
  - `config.signalId`: `string`
177
177
  - `config.deps`: `IReadonlySignal<unknown>[]` - Array of dependency signals.
178
178
  - `config.get`: `() => T` - The function to compute the value.
179
- - **`.value`**: `T` - Gets the current (memoized) value.
179
+ - **`.get()`**: `T` - Gets the current (memoized) value.
180
180
  - **`.destroy()`**: Cleans up the signal's subscriptions. **(Important!)**
181
181
 
182
182
  ### `EffectSignal`
@@ -284,10 +284,10 @@ import {ComputedSignal} from '@alwatr/signal';
284
284
  const fullName = new ComputedSignal<string>({
285
285
  signalId: 'user-fullName',
286
286
  deps: [firstName], // این سیگنال محاسباتی به firstName وابسته است
287
- get: () => `User: ${firstName.value}`,
287
+ get: () => `User: ${firstName.get()}`,
288
288
  });
289
289
 
290
- console.log(fullName.value); // خروجی: "User: John"
290
+ console.log(fullName.get()); // خروجی: "User: John"
291
291
  ```
292
292
 
293
293
  ### ۴. ایجاد `EffectSignal`
@@ -300,7 +300,7 @@ import {EffectSignal} from '@alwatr/signal';
300
300
  const loggerEffect = new EffectSignal({
301
301
  deps: [fullName, counter], // این افکت به fullName و counter وابسته است
302
302
  run: () => {
303
- console.log(`${fullName.value} has clicked ${counter.value} times.`);
303
+ console.log(`${fullName.get()} has clicked ${counter.get()} times.`);
304
304
  },
305
305
  });
306
306
  ```
@@ -349,7 +349,7 @@ User: Jane has clicked 1 times.
349
349
  // یک سیگنال محاسباتی ایجاد کنید
350
350
  const isEven = new ComputedSignal({
351
351
  deps: [counter],
352
- get: () => counter.value % 2 === 0,
352
+ get: () => counter.get() % 2 === 0,
353
353
  });
354
354
 
355
355
  // ... مدتی از آن استفاده کنید ...
@@ -382,7 +382,7 @@ Alwatr Signal از یک مدل ناهمزمان قابل پیش‌بینی بر
382
382
  - **`constructor(config)`**: یک سیگنال وضعیت جدید ایجاد می‌کند.
383
383
  - `config.signalId`: `string`
384
384
  - `config.initialValue`: `T`
385
- - **`.value`**: `T` - مقدار فعلی را دریافت می‌کند.
385
+ - **`.get()`**: `T` - مقدار فعلی را دریافت می‌کند.
386
386
  - **`.set(newValue: T)`**: مقدار جدیدی را تنظیم کرده و شنوندگان را مطلع می‌کند.
387
387
 
388
388
  ### `ComputedSignal<T>`
@@ -391,7 +391,7 @@ Alwatr Signal از یک مدل ناهمزمان قابل پیش‌بینی بر
391
391
  - `config.signalId`: `string`
392
392
  - `config.deps`: `IReadonlySignal<unknown>[]` - آرایه‌ای از سیگنال‌های وابسته.
393
393
  - `config.get`: `() => T` - تابعی برای محاسبه مقدار.
394
- - **`.value`**: `T` - مقدار فعلی (کش شده) را دریافت می‌کند.
394
+ - **`.get()`**: `T` - مقدار فعلی (کش شده) را دریافت می‌کند.
395
395
  - **`.destroy()`**: اشتراک‌های سیگنال را پاک‌سازی می‌کند. **(مهم!)**
396
396
 
397
397
  ### `EffectSignal`
@@ -21,10 +21,10 @@ import type { ComputedSignalConfig, IReadonlySignal, SubscribeResult, SubscribeO
21
21
  * const fullName = new ComputedSignal({
22
22
  * signalId: 'fullName',
23
23
  * deps: [firstName, lastName],
24
- * get: () => `${firstName.value} ${lastName.value}`,
24
+ * get: () => `${firstName.get()} ${lastName.get()}`,
25
25
  * });
26
26
  *
27
- * console.log(fullName.value); // Outputs: "John Doe"
27
+ * console.log(fullName.get()); // Outputs: "John Doe"
28
28
  *
29
29
  * // --- Subscribe to the computed value ---
30
30
  * fullName.subscribe(newFullName => {
@@ -33,7 +33,7 @@ import type { ComputedSignalConfig, IReadonlySignal, SubscribeResult, SubscribeO
33
33
  *
34
34
  * // --- Update a dependency ---
35
35
  * lastName.set('Smith'); // Recalculates and logs: "Name changed to: John Smith"
36
- * console.log(fullName.value); // Outputs: "John Smith"
36
+ * console.log(fullName.get()); // Outputs: "John Smith"
37
37
  *
38
38
  * // --- IMPORTANT: Clean up when done ---
39
39
  * fullName.destroy();
@@ -51,7 +51,7 @@ export declare class ComputedSignal<T> implements IReadonlySignal<T> {
51
51
  protected readonly logger_: import("@alwatr/logger").AlwatrLogger;
52
52
  /**
53
53
  * The internal `StateSignal` that holds the computed value.
54
- * This is how the computed signal provides `.value` and `.subscribe()` methods.
54
+ * This is how the computed signal provides `.get()` and `.subscribe()` methods.
55
55
  * @protected
56
56
  */
57
57
  protected readonly internalSignal_: StateSignal<T>;
@@ -73,7 +73,7 @@ export declare class ComputedSignal<T> implements IReadonlySignal<T> {
73
73
  * @returns The current computed value.
74
74
  * @throws {Error} If accessed after the signal has been destroyed.
75
75
  */
76
- get value(): T;
76
+ get(): T;
77
77
  /**
78
78
  * Indicates whether the computed signal has been destroyed.
79
79
  * A destroyed signal cannot be used and will throw an error if interacted with.
@@ -102,7 +102,7 @@ export declare class ComputedSignal<T> implements IReadonlySignal<T> {
102
102
  * stopping future recalculations and allowing the signal to be garbage collected.
103
103
  * Failure to call `destroy()` will result in memory leaks.
104
104
  *
105
- * After `destroy()` is called, any attempt to access `.value` or `.subscribe()` will throw an error.
105
+ * After `destroy()` is called, any attempt to access `.get()` or `.subscribe()` will throw an error.
106
106
  */
107
107
  destroy(): void;
108
108
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"computed-signal.d.ts","sourceRoot":"","sources":["../../src/core/computed-signal.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAE9C,OAAO,KAAK,EAAC,oBAAoB,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAC,MAAM,YAAY,CAAC;AAEzG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,qBAAa,cAAc,CAAC,CAAC,CAAE,YAAW,eAAe,CAAC,CAAC,CAAC;IAmCvC,SAAS,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAlC7D;;OAEG;IACH,SAAgB,QA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AS,CAAC,QAAQ,CAAC,eAAe,iBAG/B;IAEH;;;OAGG;IAEH,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAAyB;IAEnE;;;OAGG;IACH,OAAO,CAAC,iBAAiB,CAAS;gBAEL,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAU7D;;;;;;OAMG;IACI,GAAG,IAAI,CAAC;IAIf;;;;OAIG;IACH,IAAW,WAAW,IAAI,OAAO,CAEhC;IAED;;;;;;;OAOG;IACI,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,eAAe;IAI3F;;;;OAIG;IACI,SAAS,IAAI,OAAO,CAAC,CAAC,CAAC;IAI9B;;;;;;;;OAQG;IACI,OAAO,IAAI,IAAI;IAqBtB;;;;;;;OAOG;cACa,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;CAwC9C"}
@@ -22,7 +22,7 @@ import type { EffectSignalConfig, IEffectSignal } from '../type.js';
22
22
  * signalId: 'analytics-effect',
23
23
  * deps: [counter, user],
24
24
  * run: () => {
25
- * console.log(`Analytics: User '${user.value}' clicked ${counter.value} times.`);
25
+ * console.log(`Analytics: User '${user.get()}' clicked ${counter.get()} times.`);
26
26
  * },
27
27
  * runImmediately: true, // Optional: run once on creation
28
28
  * });
@@ -80,7 +80,7 @@ export declare class EffectSignal implements IEffectSignal {
80
80
  * dependencies change simultaneously.
81
81
  * @protected
82
82
  */
83
- protected run_(): Promise<void>;
83
+ protected scheduleExecution_(): Promise<void>;
84
84
  /**
85
85
  * Permanently disposes of the effect signal.
86
86
  *
@@ -1 +1 @@
1
- {"version":3,"file":"effect-signal.d.ts","sourceRoot":"","sources":["../../src/core/effect-signal.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,kBAAkB,EAAE,aAAa,EAAkB,MAAM,YAAY,CAAC;AAEnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;IACI,OAAO,IAAI,IAAI;CAmBvB"}
@@ -17,7 +17,7 @@ import type { StateSignalConfig, ListenerCallback, SubscribeOptions, SubscribeRe
17
17
  * });
18
18
  *
19
19
  * // Get the current value.
20
- * console.log(counter.value); // Outputs: 0
20
+ * console.log(counter.get()); // Outputs: 0
21
21
  *
22
22
  * // Subscribe to changes.
23
23
  * const subscription = counter.subscribe(newValue => {
@@ -51,9 +51,9 @@ export declare class StateSignal<T> extends SignalBase<T> implements IReadonlySi
51
51
  * @returns The current value.
52
52
  *
53
53
  * @example
54
- * console.log(mySignal.value);
54
+ * console.log(mySignal.get());
55
55
  */
56
- get value(): T;
56
+ get(): T;
57
57
  /**
58
58
  * Updates the signal's value and notifies all active listeners.
59
59
  *
@@ -67,7 +67,7 @@ export declare class StateSignal<T> extends SignalBase<T> implements IReadonlySi
67
67
  * mySignal.set(42);
68
68
  *
69
69
  * // For object types, it's best practice to set an immutable new object.
70
- * mySignal.set({ ...mySignal.value, property: 'new-value' });
70
+ * mySignal.set({ ...mySignal.get(), property: 'new-value' });
71
71
  */
72
72
  set(newValue: T): void;
73
73
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"state-signal.d.ts","sourceRoot":"","sources":["../../src/core/state-signal.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAE5C,OAAO,KAAK,EAAC,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAC,MAAM,YAAY,CAAC;AAExH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBAAa,WAAW,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAE,YAAW,eAAe,CAAC,CAAC,CAAC;IAC7E;;;OAGG;IACH,OAAO,CAAC,OAAO,CAAI;IAEnB;;;OAGG;IACH,SAAS,CAAC,OAAO,wCAAkD;gBAEhD,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC;IA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,OAAO,GAAE,gBAAqB,GAAG,eAAe;IA2BzG;;;OAGG;IACa,OAAO,IAAI,IAAI;CAIhC"}
@@ -22,10 +22,10 @@ import type { ComputedSignalConfig } from '../type.js';
22
22
  * const fullName = createComputedSignal({
23
23
  * signalId: 'fullName',
24
24
  * deps: [firstName, lastName],
25
- * get: () => `${firstName.value} ${lastName.value}`,
25
+ * get: () => `${firstName.get()} ${lastName.get()}`,
26
26
  * });
27
27
  *
28
- * console.log(fullName.value); // "John Doe"
28
+ * console.log(fullName.get()); // "John Doe"
29
29
  *
30
30
  * // IMPORTANT: Always destroy a computed signal when no longer needed.
31
31
  * // fullName.destroy();
@@ -23,7 +23,7 @@ import type { EffectSignalConfig } from '../type.js';
23
23
  * const analyticsEffect = createEffect({
24
24
  * deps: [counter, user],
25
25
  * run: () => {
26
- * console.log(`Analytics: User '${user.value}' clicked ${counter.value} times.`);
26
+ * console.log(`Analytics: User '${user.get()}' clicked ${counter.get()} times.`);
27
27
  * },
28
28
  * runImmediately: true, // Optional: run once on creation
29
29
  * });
@@ -17,9 +17,9 @@ import type { StateSignalConfig } from '../type.js';
17
17
  * initialValue: 0,
18
18
  * });
19
19
  *
20
- * console.log(counter.value); // Outputs: 0
20
+ * console.log(counter.get()); // Outputs: 0
21
21
  * counter.set(1);
22
- * console.log(counter.value); // Outputs: 1
22
+ * console.log(counter.get()); // Outputs: 1
23
23
  */
24
24
  export declare function createStateSignal<T>(config: StateSignalConfig<T>): StateSignal<T>;
25
25
  //# sourceMappingURL=state.d.ts.map