@ersbeth/picoflow 0.2.2 → 0.2.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 (47) hide show
  1. package/api/doc/picoflow.from.md +55 -0
  2. package/api/doc/picoflow.from_1.md +55 -0
  3. package/api/doc/picoflow.from_2.md +55 -0
  4. package/api/doc/picoflow.from_3.md +55 -0
  5. package/api/doc/picoflow.from_4.md +55 -0
  6. package/api/doc/picoflow.from_5.md +55 -0
  7. package/api/doc/picoflow.md +121 -11
  8. package/api/doc/picoflow.solidderivation._constructor_.md +49 -0
  9. package/api/doc/picoflow.solidderivation.get.md +13 -0
  10. package/api/doc/picoflow.solidderivation.md +94 -0
  11. package/api/doc/picoflow.solidgetter.md +13 -0
  12. package/api/doc/picoflow.solidobservable.get.md +13 -0
  13. package/api/doc/picoflow.solidobservable.md +57 -0
  14. package/api/doc/picoflow.solidresource._constructor_.md +49 -0
  15. package/api/doc/picoflow.solidresource.get.md +13 -0
  16. package/api/doc/picoflow.solidresource.latest.md +13 -0
  17. package/api/doc/picoflow.solidresource.md +157 -0
  18. package/api/doc/picoflow.solidresource.refetch.md +13 -0
  19. package/api/doc/picoflow.solidresource.state.md +13 -0
  20. package/api/doc/picoflow.solidstate._constructor_.md +49 -0
  21. package/api/doc/picoflow.solidstate.get.md +13 -0
  22. package/api/doc/picoflow.solidstate.md +115 -0
  23. package/api/doc/picoflow.solidstate.set.md +13 -0
  24. package/api/picoflow.public.api.md +52 -6
  25. package/dist/picoflow.js +903 -351
  26. package/dist/types/basic/index.d.ts +0 -1
  27. package/dist/types/basic/index.d.ts.map +1 -1
  28. package/dist/types/index.d.ts +3 -5
  29. package/dist/types/index.d.ts.map +1 -1
  30. package/dist/types/solid/converters.d.ts +64 -0
  31. package/dist/types/solid/converters.d.ts.map +1 -0
  32. package/dist/types/solid/index.d.ts +3 -0
  33. package/dist/types/solid/index.d.ts.map +1 -0
  34. package/dist/types/solid/primitives.d.ts +88 -0
  35. package/dist/types/solid/primitives.d.ts.map +1 -0
  36. package/package.json +4 -1
  37. package/src/basic/index.ts +0 -1
  38. package/src/index.ts +18 -13
  39. package/src/solid/converters.ts +159 -0
  40. package/src/solid/index.ts +2 -0
  41. package/src/solid/primitives.ts +109 -0
  42. package/api/doc/picoflow.flowderivationasync._constructor_.md +0 -49
  43. package/api/doc/picoflow.flowderivationasync.get.md +0 -23
  44. package/api/doc/picoflow.flowderivationasync.md +0 -86
  45. package/dist/types/basic/derivationAsync.d.ts +0 -31
  46. package/dist/types/basic/derivationAsync.d.ts.map +0 -1
  47. package/src/basic/derivationAsync.ts +0 -38
@@ -1,86 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@ersbeth/picoflow](./picoflow.md) &gt; [FlowDerivationAsync](./picoflow.flowderivationasync.md)
4
-
5
- ## FlowDerivationAsync class
6
-
7
- Represents a reactive resource that asynchronously fetches its value.
8
-
9
- **Signature:**
10
-
11
- ```typescript
12
- export declare class FlowDerivationAsync<T> extends FlowDerivation<Promise<T>>
13
- ```
14
- **Extends:** [FlowDerivation](./picoflow.flowderivation.md)<!-- -->&lt;Promise&lt;T&gt;&gt;
15
-
16
- ## Remarks
17
-
18
- A FlowResource extends FlowObservable and encapsulates an asynchronous fetch function. It is used to retrieve and update its value asynchronously. When the fetch is executed, if the new value differs from the current value, the resource is updated and its subscribers are notified.
19
-
20
- ## Constructors
21
-
22
- <table><thead><tr><th>
23
-
24
- Constructor
25
-
26
-
27
- </th><th>
28
-
29
- Modifiers
30
-
31
-
32
- </th><th>
33
-
34
- Description
35
-
36
-
37
- </th></tr></thead>
38
- <tbody><tr><td>
39
-
40
- [(constructor)(compute)](./picoflow.flowderivationasync._constructor_.md)
41
-
42
-
43
- </td><td>
44
-
45
-
46
- </td><td>
47
-
48
- Creates a new FlowDerivation.
49
-
50
-
51
- </td></tr>
52
- </tbody></table>
53
-
54
- ## Methods
55
-
56
- <table><thead><tr><th>
57
-
58
- Method
59
-
60
-
61
- </th><th>
62
-
63
- Modifiers
64
-
65
-
66
- </th><th>
67
-
68
- Description
69
-
70
-
71
- </th></tr></thead>
72
- <tbody><tr><td>
73
-
74
- [get()](./picoflow.flowderivationasync.get.md)
75
-
76
-
77
- </td><td>
78
-
79
-
80
- </td><td>
81
-
82
- Retrieves the current resource value.
83
-
84
-
85
- </td></tr>
86
- </tbody></table>
@@ -1,31 +0,0 @@
1
- import { FlowDerivation, FlowGetter, FlowWatcher } from '@ersbeth/picoflow';
2
- /**
3
- * Represents a reactive resource that asynchronously fetches its value.
4
- *
5
- * @remarks
6
- * A FlowResource extends FlowObservable and encapsulates an asynchronous fetch function.
7
- * It is used to retrieve and update its value asynchronously. When the fetch is executed,
8
- * if the new value differs from the current value, the resource is updated and its subscribers
9
- * are notified.
10
- *
11
- * @typeparam T - The type of the resource value.
12
- *
13
- * @public
14
- */
15
- export declare class FlowDerivationAsync<T> extends FlowDerivation<Promise<T>> {
16
- /**
17
- * Creates a new FlowDerivation.
18
- * @param compute - A function that computes the derived value. It is provided with two parameters:
19
- * a getter and a watcher that respect dependency tracking.
20
- * @public
21
- */
22
- constructor(compute: (get: FlowGetter, watch: FlowWatcher) => Promise<T>);
23
- /**
24
- * Retrieves the current resource value.
25
- * @returns The current value, or undefined if the resource has not been fetched yet.
26
- * @throws Error if the resource is disposed.
27
- * @public
28
- */
29
- get(): Promise<T>;
30
- }
31
- //# sourceMappingURL=derivationAsync.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"derivationAsync.d.ts","sourceRoot":"","sources":["../../../src/basic/derivationAsync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEtF;;;;;;;;;;;;GAYG;AACH,qBAAa,mBAAmB,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAClE;;;;;OAKG;gBAGS,OAAO,EAAE,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC;IAIxE;;;;;OAKG;IACa,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC;CAGpC"}
@@ -1,38 +0,0 @@
1
- import { FlowDerivation, type FlowGetter, type FlowWatcher } from '@ersbeth/picoflow';
2
-
3
- /**
4
- * Represents a reactive resource that asynchronously fetches its value.
5
- *
6
- * @remarks
7
- * A FlowResource extends FlowObservable and encapsulates an asynchronous fetch function.
8
- * It is used to retrieve and update its value asynchronously. When the fetch is executed,
9
- * if the new value differs from the current value, the resource is updated and its subscribers
10
- * are notified.
11
- *
12
- * @typeparam T - The type of the resource value.
13
- *
14
- * @public
15
- */
16
- export class FlowDerivationAsync<T> extends FlowDerivation<Promise<T>> {
17
- /**
18
- * Creates a new FlowDerivation.
19
- * @param compute - A function that computes the derived value. It is provided with two parameters:
20
- * a getter and a watcher that respect dependency tracking.
21
- * @public
22
- */
23
-
24
- // biome-ignore lint/complexity/noUselessConstructor: <explanation>
25
- constructor(compute: (get: FlowGetter, watch: FlowWatcher) => Promise<T>) {
26
- super(compute);
27
- }
28
-
29
- /**
30
- * Retrieves the current resource value.
31
- * @returns The current value, or undefined if the resource has not been fetched yet.
32
- * @throws Error if the resource is disposed.
33
- * @public
34
- */
35
- public override get(): Promise<T> {
36
- return super.get();
37
- }
38
- }