@ersbeth/picoflow 2.0.1 → 2.0.3

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 (154) hide show
  1. package/README.md +10 -0
  2. package/SKILL.md +106 -0
  3. package/dist/types/api/base/flowSubscribable.d.ts +3 -3
  4. package/dist/types/api/base/flowSubscribable.d.ts.map +1 -1
  5. package/package.json +5 -1
  6. package/.gitlab-ci.yml +0 -24
  7. package/.vscode/settings.json +0 -5
  8. package/CHANGELOG.md +0 -94
  9. package/biome.json +0 -47
  10. package/docs/.vitepress/config.mts +0 -145
  11. package/docs/api/functions/array.md +0 -35
  12. package/docs/api/functions/constant.md +0 -33
  13. package/docs/api/functions/constantAsync.md +0 -69
  14. package/docs/api/functions/derivation.md +0 -34
  15. package/docs/api/functions/derivationAsync.md +0 -34
  16. package/docs/api/functions/from.md +0 -129
  17. package/docs/api/functions/isDisposable.md +0 -27
  18. package/docs/api/functions/map.md +0 -36
  19. package/docs/api/functions/signal.md +0 -21
  20. package/docs/api/functions/state.md +0 -67
  21. package/docs/api/functions/stateAsync.md +0 -69
  22. package/docs/api/functions/subscribe.md +0 -40
  23. package/docs/api/functions/writableDerivation.md +0 -33
  24. package/docs/api/functions/writableDerivationAsync.md +0 -34
  25. package/docs/api/index.md +0 -61
  26. package/docs/api/interfaces/FlowArray.md +0 -439
  27. package/docs/api/interfaces/FlowConstant.md +0 -220
  28. package/docs/api/interfaces/FlowConstantAsync.md +0 -221
  29. package/docs/api/interfaces/FlowDerivation.md +0 -241
  30. package/docs/api/interfaces/FlowDerivationAsync.md +0 -242
  31. package/docs/api/interfaces/FlowDisposable.md +0 -59
  32. package/docs/api/interfaces/FlowEffect.md +0 -64
  33. package/docs/api/interfaces/FlowMap.md +0 -374
  34. package/docs/api/interfaces/FlowObservable.md +0 -155
  35. package/docs/api/interfaces/FlowSignal.md +0 -156
  36. package/docs/api/interfaces/FlowState.md +0 -269
  37. package/docs/api/interfaces/FlowStateAsync.md +0 -268
  38. package/docs/api/interfaces/FlowSubscribable.md +0 -55
  39. package/docs/api/interfaces/FlowTracker.md +0 -61
  40. package/docs/api/interfaces/FlowValue.md +0 -222
  41. package/docs/api/interfaces/FlowWritableDerivation.md +0 -292
  42. package/docs/api/interfaces/FlowWritableDerivationAsync.md +0 -293
  43. package/docs/api/type-aliases/DerivationFunction.md +0 -28
  44. package/docs/api/type-aliases/DerivationFunctionAsync.md +0 -28
  45. package/docs/api/type-aliases/FlowArrayAction.md +0 -60
  46. package/docs/api/type-aliases/FlowDataTracker.md +0 -33
  47. package/docs/api/type-aliases/FlowMapAction.md +0 -48
  48. package/docs/api/type-aliases/FlowOnDataListener.md +0 -33
  49. package/docs/api/type-aliases/FlowOnErrorListener.md +0 -27
  50. package/docs/api/type-aliases/FlowOnPendingListener.md +0 -21
  51. package/docs/api/type-aliases/FlowReadonly.md +0 -22
  52. package/docs/api/type-aliases/InitFunction.md +0 -21
  53. package/docs/api/type-aliases/InitFunctionAsync.md +0 -21
  54. package/docs/api/type-aliases/NotPromise.md +0 -21
  55. package/docs/api/type-aliases/UpdateFunction.md +0 -27
  56. package/docs/api/type-aliases/UpdateFunctionAsync.md +0 -27
  57. package/docs/api/typedoc-sidebar.json +0 -65
  58. package/docs/examples/examples.md +0 -2311
  59. package/docs/examples/patterns.md +0 -649
  60. package/docs/guide/advanced/architecture.md +0 -1234
  61. package/docs/guide/advanced/disposal.md +0 -426
  62. package/docs/guide/advanced/migration-v1.md +0 -464
  63. package/docs/guide/advanced/migration-v2.md +0 -204
  64. package/docs/guide/advanced/solidjs.md +0 -135
  65. package/docs/guide/introduction/concepts.md +0 -57
  66. package/docs/guide/introduction/conventions.md +0 -30
  67. package/docs/guide/introduction/getting-started.md +0 -139
  68. package/docs/guide/introduction/lifecycle.md +0 -368
  69. package/docs/guide/primitives/array.md +0 -286
  70. package/docs/guide/primitives/constant.md +0 -207
  71. package/docs/guide/primitives/derivations.md +0 -281
  72. package/docs/guide/primitives/effects.md +0 -372
  73. package/docs/guide/primitives/map.md +0 -265
  74. package/docs/guide/primitives/overview.md +0 -92
  75. package/docs/guide/primitives/signal.md +0 -222
  76. package/docs/guide/primitives/state.md +0 -272
  77. package/docs/index.md +0 -47
  78. package/docs/public/logo.svg +0 -1
  79. package/src/api/base/flowDisposable.ts +0 -44
  80. package/src/api/base/flowObservable.ts +0 -28
  81. package/src/api/base/flowSubscribable.ts +0 -87
  82. package/src/api/base/flowTracker.ts +0 -7
  83. package/src/api/base/index.ts +0 -4
  84. package/src/api/index.ts +0 -2
  85. package/src/api/nodes/async/flowConstantAsync.ts +0 -36
  86. package/src/api/nodes/async/flowDerivationAsync.ts +0 -42
  87. package/src/api/nodes/async/flowStateAsync.ts +0 -47
  88. package/src/api/nodes/async/flowWritableDerivationAsync.ts +0 -33
  89. package/src/api/nodes/async/index.ts +0 -4
  90. package/src/api/nodes/collections/flowArray.ts +0 -155
  91. package/src/api/nodes/collections/flowMap.ts +0 -115
  92. package/src/api/nodes/collections/index.ts +0 -2
  93. package/src/api/nodes/flowEffect.ts +0 -42
  94. package/src/api/nodes/flowSignal.ts +0 -28
  95. package/src/api/nodes/flowValue.ts +0 -37
  96. package/src/api/nodes/index.ts +0 -7
  97. package/src/api/nodes/sync/flowConstant.ts +0 -33
  98. package/src/api/nodes/sync/flowDerivation.ts +0 -41
  99. package/src/api/nodes/sync/flowState.ts +0 -45
  100. package/src/api/nodes/sync/flowWritableDerivation.ts +0 -31
  101. package/src/api/nodes/sync/index.ts +0 -4
  102. package/src/api/nodes/utils.ts +0 -24
  103. package/src/base/disposable.ts +0 -18
  104. package/src/base/executionStack.ts +0 -42
  105. package/src/base/index.ts +0 -5
  106. package/src/base/node.ts +0 -98
  107. package/src/base/observable.ts +0 -92
  108. package/src/base/observer.ts +0 -51
  109. package/src/converters/index.ts +0 -1
  110. package/src/converters/solid.ts +0 -109
  111. package/src/index.ts +0 -2
  112. package/src/nodes/arrayNode.ts +0 -180
  113. package/src/nodes/effectNode.ts +0 -58
  114. package/src/nodes/index.ts +0 -7
  115. package/src/nodes/mapNode.ts +0 -125
  116. package/src/nodes/signalNode.ts +0 -19
  117. package/src/nodes/valueAsyncNode.ts +0 -85
  118. package/src/nodes/valueNode.ts +0 -148
  119. package/src/nodes/valueSyncNode.ts +0 -125
  120. package/src/schedulers/asyncResolver.ts +0 -78
  121. package/src/schedulers/asyncScheduler.ts +0 -66
  122. package/src/schedulers/index.ts +0 -4
  123. package/src/schedulers/pendingError.ts +0 -13
  124. package/src/schedulers/scheduler.ts +0 -9
  125. package/src/schedulers/syncResolver.ts +0 -69
  126. package/src/schedulers/syncScheduler.ts +0 -55
  127. package/test/base/pendingError.test.ts +0 -67
  128. package/test/converters/solid.derivation.browser.test.tsx +0 -69
  129. package/test/converters/solid.node.test.ts +0 -654
  130. package/test/converters/solid.state.browser.test.tsx +0 -1592
  131. package/test/reactivity/flowSignal.test.ts +0 -226
  132. package/test/reactivity/nodes/async/asyncScheduler/asyncResolver.test.ts +0 -593
  133. package/test/reactivity/nodes/async/asyncScheduler/asyncScheduler.test.ts +0 -317
  134. package/test/reactivity/nodes/async/flowConstantAsync.test.ts +0 -652
  135. package/test/reactivity/nodes/async/flowDerivation.test.ts +0 -898
  136. package/test/reactivity/nodes/async/flowDerivationAsync.test.ts +0 -1716
  137. package/test/reactivity/nodes/async/flowStateAsync.test.ts +0 -708
  138. package/test/reactivity/nodes/async/flowWritableDerivationAsync.test.ts +0 -614
  139. package/test/reactivity/nodes/collections/flowArray.asyncStates.test.ts +0 -1289
  140. package/test/reactivity/nodes/collections/flowArray.scalars.test.ts +0 -961
  141. package/test/reactivity/nodes/collections/flowArray.states.test.ts +0 -1035
  142. package/test/reactivity/nodes/collections/flowMap.asyncStates.test.ts +0 -960
  143. package/test/reactivity/nodes/collections/flowMap.scalars.test.ts +0 -775
  144. package/test/reactivity/nodes/collections/flowMap.states.test.ts +0 -958
  145. package/test/reactivity/nodes/sync/flowConstant.test.ts +0 -377
  146. package/test/reactivity/nodes/sync/flowDerivation.test.ts +0 -896
  147. package/test/reactivity/nodes/sync/flowState.test.ts +0 -341
  148. package/test/reactivity/nodes/sync/flowWritableDerivation.test.ts +0 -603
  149. package/test/vitest.d.ts +0 -10
  150. package/tsconfig.json +0 -37
  151. package/typedoc.json +0 -37
  152. package/vite.config.ts +0 -31
  153. package/vitest.browser.config.ts +0 -21
  154. package/vitest.config.ts +0 -17
@@ -1,59 +0,0 @@
1
- [@ersbeth/picoflow](/api/index.md) / FlowDisposable
2
-
3
- # Interface: FlowDisposable
4
-
5
- Defined in: [api/base/flowDisposable.ts:10](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/base/flowDisposable.ts#L10)
6
-
7
- Contract for resources that can be explicitly released to prevent memory leaks.
8
-
9
- All reactive primitives in PicoFlow implement this interface, allowing manual cleanup of subscriptions
10
- and dependencies. Once disposed, the resource cannot be reused and will throw errors on further access.
11
- Call `dispose()` when you no longer need a reactive primitive to free its resources.
12
-
13
- ## Extended by
14
-
15
- - [`FlowObservable`](/api/interfaces/FlowObservable.md)
16
- - [`FlowTracker`](/api/interfaces/FlowTracker.md)
17
- - [`FlowEffect`](/api/interfaces/FlowEffect.md)
18
-
19
- ## Accessors
20
-
21
- ### disposed
22
-
23
- #### Get Signature
24
-
25
- ```ts
26
- get disposed(): boolean;
27
- ```
28
-
29
- Defined in: [api/base/flowDisposable.ts:17](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/base/flowDisposable.ts#L17)
30
-
31
- Indicates whether this resource has been disposed.
32
-
33
- Returns `true` if `dispose()` has been called, `false` otherwise. Once disposed,
34
- the resource is no longer usable and any operations on it will throw errors.
35
-
36
- ##### Returns
37
-
38
- `boolean`
39
-
40
- ## Methods
41
-
42
- ### dispose()
43
-
44
- ```ts
45
- dispose(): void;
46
- ```
47
-
48
- Defined in: [api/base/flowDisposable.ts:27](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/base/flowDisposable.ts#L27)
49
-
50
- Releases all resources held by this disposable object.
51
-
52
- Cleans up all subscriptions, dependencies, and internal state. After calling this method,
53
- the resource enters a disposed state and cannot be reused. Any subsequent operations will
54
- throw errors. This method should be called when you no longer need the reactive primitive
55
- to prevent memory leaks.
56
-
57
- #### Returns
58
-
59
- `void`
@@ -1,64 +0,0 @@
1
- [@ersbeth/picoflow](/api/index.md) / FlowEffect
2
-
3
- # Interface: FlowEffect
4
-
5
- Defined in: [api/nodes/flowEffect.ts:18](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/nodes/flowEffect.ts#L18)
6
-
7
- Handle to a reactive effect that automatically tracks dependencies and re-executes when they change.
8
-
9
- Effects run immediately upon creation and then reactively respond to changes in any reactive values
10
- accessed during execution. Call `dispose()` to stop the effect and clean up its subscriptions.
11
-
12
- ## Extends
13
-
14
- - [`FlowDisposable`](/api/interfaces/FlowDisposable.md)
15
-
16
- ## Accessors
17
-
18
- ### disposed
19
-
20
- #### Get Signature
21
-
22
- ```ts
23
- get disposed(): boolean;
24
- ```
25
-
26
- Defined in: [api/base/flowDisposable.ts:17](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/base/flowDisposable.ts#L17)
27
-
28
- Indicates whether this resource has been disposed.
29
-
30
- Returns `true` if `dispose()` has been called, `false` otherwise. Once disposed,
31
- the resource is no longer usable and any operations on it will throw errors.
32
-
33
- ##### Returns
34
-
35
- `boolean`
36
-
37
- #### Inherited from
38
-
39
- [`FlowDisposable`](/api/interfaces/FlowDisposable.md).[`disposed`](/api/interfaces/FlowDisposable.md#disposed)
40
-
41
- ## Methods
42
-
43
- ### dispose()
44
-
45
- ```ts
46
- dispose(): void;
47
- ```
48
-
49
- Defined in: [api/base/flowDisposable.ts:27](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/base/flowDisposable.ts#L27)
50
-
51
- Releases all resources held by this disposable object.
52
-
53
- Cleans up all subscriptions, dependencies, and internal state. After calling this method,
54
- the resource enters a disposed state and cannot be reused. Any subsequent operations will
55
- throw errors. This method should be called when you no longer need the reactive primitive
56
- to prevent memory leaks.
57
-
58
- #### Returns
59
-
60
- `void`
61
-
62
- #### Inherited from
63
-
64
- [`FlowDisposable`](/api/interfaces/FlowDisposable.md).[`dispose`](/api/interfaces/FlowDisposable.md#dispose)
@@ -1,374 +0,0 @@
1
- [@ersbeth/picoflow](/api/index.md) / FlowMap
2
-
3
- # Interface: FlowMap\<K, V\>
4
-
5
- Defined in: [api/nodes/collections/flowMap.ts:52](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/nodes/collections/flowMap.ts#L52)
6
-
7
- Reactive map with standard mutation methods and fine-grained change tracking.
8
-
9
- FlowMap behaves like a regular Map but notifies dependents on mutations. It provides standard
10
- map operations (add, update, delete) and tracks each operation via the `$lastAction` signal.
11
- This enables both coarse-grained reactivity (reacting to any change) and fine-grained reactivity
12
- (reacting only to specific mutations). Use for key-value collections that need reactive updates,
13
- such as entity stores, lookup tables, or any map-based data that changes over time.
14
-
15
- ## Extends
16
-
17
- - [`FlowState`](/api/interfaces/FlowState.md)\<`Map`\<`K`, `V`\>\>
18
-
19
- ## Type Parameters
20
-
21
- | Type Parameter |
22
- | ------ |
23
- | `K` |
24
- | `V` |
25
-
26
- ## Properties
27
-
28
- | Property | Type | Description | Defined in |
29
- | ------ | ------ | ------ | ------ |
30
- | <a id="lastaction"></a> `$lastAction` | [`FlowState`](/api/interfaces/FlowState.md)\<[`FlowMapAction`](/api/type-aliases/FlowMapAction.md)\<`K`, `V`\>\> | Reactive state containing the last mutation operation performed on the map. Subscribe to this for fine-grained reactivity to specific mutation types. | [api/nodes/collections/flowMap.ts:93](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/nodes/collections/flowMap.ts#L93) |
31
-
32
- ## Accessors
33
-
34
- ### disposed
35
-
36
- #### Get Signature
37
-
38
- ```ts
39
- get disposed(): boolean;
40
- ```
41
-
42
- Defined in: [api/base/flowDisposable.ts:17](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/base/flowDisposable.ts#L17)
43
-
44
- Indicates whether this resource has been disposed.
45
-
46
- Returns `true` if `dispose()` has been called, `false` otherwise. Once disposed,
47
- the resource is no longer usable and any operations on it will throw errors.
48
-
49
- ##### Returns
50
-
51
- `boolean`
52
-
53
- #### Inherited from
54
-
55
- [`FlowState`](/api/interfaces/FlowState.md).[`disposed`](/api/interfaces/FlowState.md#disposed)
56
-
57
- ## Methods
58
-
59
- ### add()
60
-
61
- ```ts
62
- add(key, value): void;
63
- ```
64
-
65
- Defined in: [api/nodes/collections/flowMap.ts:79](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/nodes/collections/flowMap.ts#L79)
66
-
67
- Adds a new key-value pair to the map.
68
- Emits an "add" action to $lastAction.
69
-
70
- #### Parameters
71
-
72
- | Parameter | Type | Description |
73
- | ------ | ------ | ------ |
74
- | `key` | `K` | The key to add (must not exist) |
75
- | `value` | `V` | The value to associate with the key |
76
-
77
- #### Returns
78
-
79
- `void`
80
-
81
- ***
82
-
83
- ### clear()
84
-
85
- ```ts
86
- clear(): Map<K, V>;
87
- ```
88
-
89
- Defined in: [api/nodes/collections/flowMap.ts:87](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/nodes/collections/flowMap.ts#L87)
90
-
91
- Removes all entries from the map.
92
- Emits a "clear" action to $lastAction.
93
-
94
- #### Returns
95
-
96
- `Map`\<`K`, `V`\>
97
-
98
- Map of all removed entries
99
-
100
- ***
101
-
102
- ### delete()
103
-
104
- ```ts
105
- delete(key): V;
106
- ```
107
-
108
- Defined in: [api/nodes/collections/flowMap.ts:60](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/nodes/collections/flowMap.ts#L60)
109
-
110
- Removes a key-value pair from the map.
111
- Emits a "delete" action to $lastAction.
112
-
113
- #### Parameters
114
-
115
- | Parameter | Type | Description |
116
- | ------ | ------ | ------ |
117
- | `key` | `K` | The key to delete |
118
-
119
- #### Returns
120
-
121
- `V`
122
-
123
- The deleted value
124
-
125
- ***
126
-
127
- ### dispose()
128
-
129
- ```ts
130
- dispose(): void;
131
- ```
132
-
133
- Defined in: [api/base/flowDisposable.ts:27](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/base/flowDisposable.ts#L27)
134
-
135
- Releases all resources held by this disposable object.
136
-
137
- Cleans up all subscriptions, dependencies, and internal state. After calling this method,
138
- the resource enters a disposed state and cannot be reused. Any subsequent operations will
139
- throw errors. This method should be called when you no longer need the reactive primitive
140
- to prevent memory leaks.
141
-
142
- #### Returns
143
-
144
- `void`
145
-
146
- #### Inherited from
147
-
148
- [`FlowState`](/api/interfaces/FlowState.md).[`dispose`](/api/interfaces/FlowState.md#dispose)
149
-
150
- ***
151
-
152
- ### get()
153
-
154
- ```ts
155
- get(tracker): Map;
156
- ```
157
-
158
- Defined in: [api/nodes/flowValue.ts:24](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/nodes/flowValue.ts#L24)
159
-
160
- Gets the current value and establishes a reactive dependency.
161
-
162
- When called from within a reactive computation, this method registers the value as a dependency,
163
- ensuring the computation re-executes when the value changes. The value is computed on first access
164
- (if lazy) and then cached. For async values, throws PendingError while the value is resolving.
165
-
166
- #### Parameters
167
-
168
- | Parameter | Type | Description |
169
- | ------ | ------ | ------ |
170
- | `tracker` | [`FlowTracker`](/api/interfaces/FlowTracker.md) | Tracker that records this value as a dependency |
171
-
172
- #### Returns
173
-
174
- `Map`
175
-
176
- The current value
177
-
178
- #### Inherited from
179
-
180
- [`FlowState`](/api/interfaces/FlowState.md).[`get`](/api/interfaces/FlowState.md#get)
181
-
182
- ***
183
-
184
- ### pick()
185
-
186
- ```ts
187
- pick(): Promise<Map<K, V>>;
188
- ```
189
-
190
- Defined in: [api/nodes/flowValue.ts:35](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/nodes/flowValue.ts#L35)
191
-
192
- Asynchronously gets the current value without establishing a reactive dependency.
193
-
194
- This method reads the value non-reactively, meaning it won't trigger re-execution of the calling
195
- computation when the value changes. The value is computed on first access (if lazy) and then cached.
196
- For async values, the promise resolves once the value is available.
197
-
198
- #### Returns
199
-
200
- `Promise`\<`Map`\<`K`, `V`\>\>
201
-
202
- Promise that resolves with the current value
203
-
204
- #### Inherited from
205
-
206
- [`FlowState`](/api/interfaces/FlowState.md).[`pick`](/api/interfaces/FlowState.md#pick)
207
-
208
- ***
209
-
210
- ### set()
211
-
212
- #### Call Signature
213
-
214
- ```ts
215
- set(value): void;
216
- ```
217
-
218
- Defined in: [api/nodes/sync/flowState.ts:25](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/nodes/sync/flowState.ts#L25)
219
-
220
- Updates the state with a new value or via an updater function.
221
- Notifies all dependents after the update.
222
-
223
- ##### Parameters
224
-
225
- | Parameter | Type | Description |
226
- | ------ | ------ | ------ |
227
- | `value` | `Map`\<`K`\> | New value to set, or function that receives current value and returns new value |
228
-
229
- ##### Returns
230
-
231
- `void`
232
-
233
- ##### Inherited from
234
-
235
- [`FlowState`](/api/interfaces/FlowState.md).[`set`](/api/interfaces/FlowState.md#set)
236
-
237
- #### Call Signature
238
-
239
- ```ts
240
- set(updater): void;
241
- ```
242
-
243
- Defined in: [api/nodes/sync/flowState.ts:26](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/nodes/sync/flowState.ts#L26)
244
-
245
- ##### Parameters
246
-
247
- | Parameter | Type |
248
- | ------ | ------ |
249
- | `updater` | [`UpdateFunction`](/api/type-aliases/UpdateFunction.md)\<`Map`\<`K`, `V`\>\> |
250
-
251
- ##### Returns
252
-
253
- `void`
254
-
255
- ##### Inherited from
256
-
257
- [`FlowState`](/api/interfaces/FlowState.md).[`set`](/api/interfaces/FlowState.md#set)
258
-
259
- ***
260
-
261
- ### subscribe()
262
-
263
- ```ts
264
- subscribe(
265
- onData,
266
- onError?,
267
- onPending?): FlowEffect;
268
- ```
269
-
270
- Defined in: [api/base/flowSubscribable.ts:82](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/base/flowSubscribable.ts#L82)
271
-
272
- Subscribes to this observable with lifecycle callbacks.
273
-
274
- Creates an active subscription that executes immediately and then re-executes whenever
275
- the observable's dependencies change. The subscription remains active until the returned
276
- disposal function is called. The `onData` callback receives the computed value, while
277
- `onError` handles errors and `onPending` signals async operations in progress.
278
-
279
- #### Parameters
280
-
281
- | Parameter | Type | Description |
282
- | ------ | ------ | ------ |
283
- | `onData` | [`FlowOnDataListener`](/api/type-aliases/FlowOnDataListener.md)\<`Map`\<`K`, `V`\>\> | Callback invoked with the computed data on each execution |
284
- | `onError?` | [`FlowOnErrorListener`](/api/type-aliases/FlowOnErrorListener.md) | Optional callback for handling errors during execution |
285
- | `onPending?` | [`FlowOnPendingListener`](/api/type-aliases/FlowOnPendingListener.md) | Optional callback invoked when async dependencies are pending |
286
-
287
- #### Returns
288
-
289
- [`FlowEffect`](/api/interfaces/FlowEffect.md)
290
-
291
- A function to dispose the subscription and stop receiving updates
292
-
293
- #### Inherited from
294
-
295
- [`FlowState`](/api/interfaces/FlowState.md).[`subscribe`](/api/interfaces/FlowState.md#subscribe)
296
-
297
- ***
298
-
299
- ### trigger()
300
-
301
- ```ts
302
- trigger(): void;
303
- ```
304
-
305
- Defined in: [api/base/flowObservable.ts:27](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/base/flowObservable.ts#L27)
306
-
307
- Manually triggers notifications to all dependents.
308
-
309
- Forces all dependents of this observable to be notified and re-executed, even if the
310
- value hasn't actually changed. Useful for imperatively triggering updates when the
311
- reactive system cannot detect changes automatically.
312
-
313
- #### Returns
314
-
315
- `void`
316
-
317
- #### Inherited from
318
-
319
- [`FlowState`](/api/interfaces/FlowState.md).[`trigger`](/api/interfaces/FlowState.md#trigger)
320
-
321
- ***
322
-
323
- ### update()
324
-
325
- ```ts
326
- update(key, value): V | undefined;
327
- ```
328
-
329
- Defined in: [api/nodes/collections/flowMap.ts:70](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/nodes/collections/flowMap.ts#L70)
330
-
331
- Updates an existing key-value pair in the map.
332
- Emits an "update" action to $lastAction.
333
-
334
- #### Parameters
335
-
336
- | Parameter | Type | Description |
337
- | ------ | ------ | ------ |
338
- | `key` | `K` | The key to update (must exist) |
339
- | `value` | `V` | The new value |
340
-
341
- #### Returns
342
-
343
- `V` \| `undefined`
344
-
345
- The previous value
346
-
347
- ***
348
-
349
- ### watch()
350
-
351
- ```ts
352
- watch(tracker): void;
353
- ```
354
-
355
- Defined in: [api/base/flowObservable.ts:18](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/base/flowObservable.ts#L18)
356
-
357
- Establishes a reactive dependency without reading the value.
358
-
359
- Registers this observable as a dependency of the given tracker, allowing it to be notified
360
- when changes occur. This enables dependency tracking without accessing the actual value.
361
-
362
- #### Parameters
363
-
364
- | Parameter | Type | Description |
365
- | ------ | ------ | ------ |
366
- | `tracker` | [`FlowTracker`](/api/interfaces/FlowTracker.md) | Tracker that records this observable as a dependency |
367
-
368
- #### Returns
369
-
370
- `void`
371
-
372
- #### Inherited from
373
-
374
- [`FlowState`](/api/interfaces/FlowState.md).[`watch`](/api/interfaces/FlowState.md#watch)
@@ -1,155 +0,0 @@
1
- [@ersbeth/picoflow](/api/index.md) / FlowObservable
2
-
3
- # Interface: FlowObservable\<T\>
4
-
5
- Defined in: [api/base/flowObservable.ts:9](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/base/flowObservable.ts#L9)
6
-
7
- Contract for reactive primitives that emit changes and notify their dependents in the reactivity graph.
8
-
9
- ## Extends
10
-
11
- - [`FlowDisposable`](/api/interfaces/FlowDisposable.md).[`FlowSubscribable`](/api/interfaces/FlowSubscribable.md)\<`T`\>
12
-
13
- ## Extended by
14
-
15
- - [`FlowSignal`](/api/interfaces/FlowSignal.md)
16
- - [`FlowValue`](/api/interfaces/FlowValue.md)
17
-
18
- ## Type Parameters
19
-
20
- | Type Parameter |
21
- | ------ |
22
- | `T` |
23
-
24
- ## Accessors
25
-
26
- ### disposed
27
-
28
- #### Get Signature
29
-
30
- ```ts
31
- get disposed(): boolean;
32
- ```
33
-
34
- Defined in: [api/base/flowDisposable.ts:17](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/base/flowDisposable.ts#L17)
35
-
36
- Indicates whether this resource has been disposed.
37
-
38
- Returns `true` if `dispose()` has been called, `false` otherwise. Once disposed,
39
- the resource is no longer usable and any operations on it will throw errors.
40
-
41
- ##### Returns
42
-
43
- `boolean`
44
-
45
- #### Inherited from
46
-
47
- [`FlowDisposable`](/api/interfaces/FlowDisposable.md).[`disposed`](/api/interfaces/FlowDisposable.md#disposed)
48
-
49
- ## Methods
50
-
51
- ### dispose()
52
-
53
- ```ts
54
- dispose(): void;
55
- ```
56
-
57
- Defined in: [api/base/flowDisposable.ts:27](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/base/flowDisposable.ts#L27)
58
-
59
- Releases all resources held by this disposable object.
60
-
61
- Cleans up all subscriptions, dependencies, and internal state. After calling this method,
62
- the resource enters a disposed state and cannot be reused. Any subsequent operations will
63
- throw errors. This method should be called when you no longer need the reactive primitive
64
- to prevent memory leaks.
65
-
66
- #### Returns
67
-
68
- `void`
69
-
70
- #### Inherited from
71
-
72
- [`FlowDisposable`](/api/interfaces/FlowDisposable.md).[`dispose`](/api/interfaces/FlowDisposable.md#dispose)
73
-
74
- ***
75
-
76
- ### subscribe()
77
-
78
- ```ts
79
- subscribe(
80
- onData,
81
- onError?,
82
- onPending?): FlowEffect;
83
- ```
84
-
85
- Defined in: [api/base/flowSubscribable.ts:82](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/base/flowSubscribable.ts#L82)
86
-
87
- Subscribes to this observable with lifecycle callbacks.
88
-
89
- Creates an active subscription that executes immediately and then re-executes whenever
90
- the observable's dependencies change. The subscription remains active until the returned
91
- disposal function is called. The `onData` callback receives the computed value, while
92
- `onError` handles errors and `onPending` signals async operations in progress.
93
-
94
- #### Parameters
95
-
96
- | Parameter | Type | Description |
97
- | ------ | ------ | ------ |
98
- | `onData` | [`FlowOnDataListener`](/api/type-aliases/FlowOnDataListener.md)\<`T`\> | Callback invoked with the computed data on each execution |
99
- | `onError?` | [`FlowOnErrorListener`](/api/type-aliases/FlowOnErrorListener.md) | Optional callback for handling errors during execution |
100
- | `onPending?` | [`FlowOnPendingListener`](/api/type-aliases/FlowOnPendingListener.md) | Optional callback invoked when async dependencies are pending |
101
-
102
- #### Returns
103
-
104
- [`FlowEffect`](/api/interfaces/FlowEffect.md)
105
-
106
- A function to dispose the subscription and stop receiving updates
107
-
108
- #### Inherited from
109
-
110
- [`FlowSubscribable`](/api/interfaces/FlowSubscribable.md).[`subscribe`](/api/interfaces/FlowSubscribable.md#subscribe)
111
-
112
- ***
113
-
114
- ### trigger()
115
-
116
- ```ts
117
- trigger(): void;
118
- ```
119
-
120
- Defined in: [api/base/flowObservable.ts:27](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/base/flowObservable.ts#L27)
121
-
122
- Manually triggers notifications to all dependents.
123
-
124
- Forces all dependents of this observable to be notified and re-executed, even if the
125
- value hasn't actually changed. Useful for imperatively triggering updates when the
126
- reactive system cannot detect changes automatically.
127
-
128
- #### Returns
129
-
130
- `void`
131
-
132
- ***
133
-
134
- ### watch()
135
-
136
- ```ts
137
- watch(tracker): void;
138
- ```
139
-
140
- Defined in: [api/base/flowObservable.ts:18](https://gitlab.com/ersbeth-web/picoflow/-/blob/4e864254f0eac72524c3be40b9e41d799a16e020/src/api/base/flowObservable.ts#L18)
141
-
142
- Establishes a reactive dependency without reading the value.
143
-
144
- Registers this observable as a dependency of the given tracker, allowing it to be notified
145
- when changes occur. This enables dependency tracking without accessing the actual value.
146
-
147
- #### Parameters
148
-
149
- | Parameter | Type | Description |
150
- | ------ | ------ | ------ |
151
- | `tracker` | [`FlowTracker`](/api/interfaces/FlowTracker.md) | Tracker that records this observable as a dependency |
152
-
153
- #### Returns
154
-
155
- `void`