@torpor/view 0.4.17 → 1.0.0
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/README.md +41 -16
- package/dist/Cleanup-D0wvGW5d.d.cts +9 -0
- package/dist/Cleanup-D0wvGW5d.d.cts.map +1 -0
- package/dist/Cleanup-D0wvGW5d.d.mts +9 -0
- package/dist/Cleanup-D0wvGW5d.d.mts.map +1 -0
- package/dist/Component-0MH0zd-m.d.cts +11 -0
- package/dist/Component-0MH0zd-m.d.cts.map +1 -0
- package/dist/Component-0MH0zd-m.d.mts +11 -0
- package/dist/Component-0MH0zd-m.d.mts.map +1 -0
- package/dist/Effect-BTKurOpr.d.mts +381 -0
- package/dist/Effect-BTKurOpr.d.mts.map +1 -0
- package/dist/Effect-COl3aRJV.d.cts +381 -0
- package/dist/Effect-COl3aRJV.d.cts.map +1 -0
- package/dist/compile.cjs +1728 -740
- package/dist/compile.d.cts +85 -50
- package/dist/compile.d.cts.map +1 -1
- package/dist/compile.d.mts +85 -50
- package/dist/compile.d.mts.map +1 -1
- package/dist/compile.mjs +1731 -742
- package/dist/compile.mjs.map +1 -1
- package/dist/dev.cjs +62 -63
- package/dist/dev.d.cts +4 -3
- package/dist/dev.d.cts.map +1 -1
- package/dist/dev.d.mts +4 -3
- package/dist/dev.d.mts.map +1 -1
- package/dist/dev.mjs +61 -62
- package/dist/dev.mjs.map +1 -1
- package/dist/{devContext-B3yskfhA.cjs → devContext-BulTn3U5.cjs} +6 -9
- package/dist/{devContext-CQ8RhBX-.mjs → devContext-ZNsPyOgB.mjs} +3 -4
- package/dist/devContext-ZNsPyOgB.mjs.map +1 -0
- package/dist/fromWebSocket-1QOjcrHE.cjs +182 -0
- package/dist/fromWebSocket-B52kN3-W.d.mts +91 -0
- package/dist/fromWebSocket-B52kN3-W.d.mts.map +1 -0
- package/dist/fromWebSocket-DeB35Q4w.d.cts +91 -0
- package/dist/fromWebSocket-DeB35Q4w.d.cts.map +1 -0
- package/dist/fromWebSocket-Dxc_uwm1.mjs +137 -0
- package/dist/fromWebSocket-Dxc_uwm1.mjs.map +1 -0
- package/dist/index.cjs +2071 -508
- package/dist/index.d.cts +600 -112
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +600 -112
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2052 -505
- package/dist/index.mjs.map +1 -1
- package/dist/ssr.cjs +78 -17
- package/dist/ssr.d.cts +64 -11
- package/dist/ssr.d.cts.map +1 -1
- package/dist/ssr.d.mts +64 -11
- package/dist/ssr.d.mts.map +1 -1
- package/dist/ssr.mjs +67 -14
- package/dist/ssr.mjs.map +1 -1
- package/package.json +21 -19
- package/dist/Cleanup-CYsytTEc.d.cts +0 -9
- package/dist/Cleanup-CYsytTEc.d.cts.map +0 -1
- package/dist/Cleanup-CgjyN0lW.d.mts +0 -9
- package/dist/Cleanup-CgjyN0lW.d.mts.map +0 -1
- package/dist/Component-DmWGMgak.d.mts +0 -11
- package/dist/Component-DmWGMgak.d.mts.map +0 -1
- package/dist/Component-kGLRFYg2.d.cts +0 -11
- package/dist/Component-kGLRFYg2.d.cts.map +0 -1
- package/dist/Region-Bb6HAb-F.d.cts +0 -201
- package/dist/Region-Bb6HAb-F.d.cts.map +0 -1
- package/dist/Region-CTchywkr.d.mts +0 -201
- package/dist/Region-CTchywkr.d.mts.map +0 -1
- package/dist/devContext-CQ8RhBX-.mjs.map +0 -1
- package/dist/formatText--9zsK5Nq.cjs +0 -59
- package/dist/formatText-B8u71S_K.mjs +0 -42
- package/dist/formatText-B8u71S_K.mjs.map +0 -1
- package/dist/formatText-BNP3P38F.d.cts +0 -17
- package/dist/formatText-BNP3P38F.d.cts.map +0 -1
- package/dist/formatText-D6Ov8Ub0.d.mts +0 -17
- package/dist/formatText-D6Ov8Ub0.d.mts.map +0 -1
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import { t as Cleanup } from "./Cleanup-CYsytTEc.cjs";
|
|
2
|
-
|
|
3
|
-
//#region src/types/constants.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* The type of a Signal object.
|
|
6
|
-
*/
|
|
7
|
-
declare const SIGNAL_TYPE = 0;
|
|
8
|
-
/**
|
|
9
|
-
* The type of a Computed object.
|
|
10
|
-
*/
|
|
11
|
-
declare const COMPUTED_TYPE = 1;
|
|
12
|
-
/**
|
|
13
|
-
* The type of an Effect object.
|
|
14
|
-
*/
|
|
15
|
-
declare const EFFECT_TYPE = 2;
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region src/types/Computed.d.ts
|
|
18
|
-
/**
|
|
19
|
-
* A computed value that is lazily refreshed when accessed from an Effect or
|
|
20
|
-
* another Computed. Our computed values are implemented as property getter
|
|
21
|
-
* functions.
|
|
22
|
-
*/
|
|
23
|
-
interface Computed<T = any> {
|
|
24
|
-
/**
|
|
25
|
-
* COMPUTED.
|
|
26
|
-
*/
|
|
27
|
-
type: typeof COMPUTED_TYPE;
|
|
28
|
-
/**
|
|
29
|
-
* The cached, computed value.
|
|
30
|
-
*/
|
|
31
|
-
value: T;
|
|
32
|
-
/**
|
|
33
|
-
* The getter function to run to access this computed's value.
|
|
34
|
-
*/
|
|
35
|
-
run: () => T;
|
|
36
|
-
/**
|
|
37
|
-
* The first signal or computed that causes this effect to be run.
|
|
38
|
-
*/
|
|
39
|
-
firstSource: Subscription | null;
|
|
40
|
-
/**
|
|
41
|
-
* The first computed or effect that is triggered when this property is changed.
|
|
42
|
-
*/
|
|
43
|
-
firstTarget: Subscription | null;
|
|
44
|
-
/**
|
|
45
|
-
* Whether the computed may need to be recalculated (if any of its sources
|
|
46
|
-
* have changed). We store this on the computed (as well as its
|
|
47
|
-
* subscription) so we don't have to check the sources every time (which may
|
|
48
|
-
* be expensive).
|
|
49
|
-
*/
|
|
50
|
-
recalc: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Used to track cycles.
|
|
53
|
-
*/
|
|
54
|
-
running: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* True if the computed encountered an exception in its last run.
|
|
57
|
-
*/
|
|
58
|
-
didError: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* A subscription to roll back to when recursively updating signal targets.
|
|
61
|
-
*/
|
|
62
|
-
rollback: Subscription | null;
|
|
63
|
-
/**
|
|
64
|
-
* The name of the computed property, for debugging.
|
|
65
|
-
*/
|
|
66
|
-
name?: string;
|
|
67
|
-
}
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region src/types/ProxySignal.d.ts
|
|
70
|
-
/**
|
|
71
|
-
* A value that causes dependent Computeds and Effects to be re-run. Our signals
|
|
72
|
-
* are implemented as object properties.
|
|
73
|
-
*/
|
|
74
|
-
interface ProxySignal {
|
|
75
|
-
/**
|
|
76
|
-
* SIGNAL.
|
|
77
|
-
*/
|
|
78
|
-
type: typeof SIGNAL_TYPE;
|
|
79
|
-
/**
|
|
80
|
-
* The first Computed or Effect that is triggered when this property is changed.
|
|
81
|
-
*/
|
|
82
|
-
firstTarget: Subscription | null;
|
|
83
|
-
/**
|
|
84
|
-
* When signals have been changed in a batch, this is the next changed signal.
|
|
85
|
-
*/
|
|
86
|
-
nextSignalToUpdate: ProxySignal | null;
|
|
87
|
-
/**
|
|
88
|
-
* The name of the property, for debugging.
|
|
89
|
-
*/
|
|
90
|
-
name?: string;
|
|
91
|
-
}
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region src/types/Subscription.d.ts
|
|
94
|
-
/**
|
|
95
|
-
* A subscription that connects a source Signal or Computed to a target Computed
|
|
96
|
-
* or Effect.
|
|
97
|
-
*/
|
|
98
|
-
interface Subscription {
|
|
99
|
-
/**
|
|
100
|
-
* The source Signal or Computed.
|
|
101
|
-
*/
|
|
102
|
-
source: ProxySignal | Computed;
|
|
103
|
-
/**
|
|
104
|
-
* The target Computed or Effect.
|
|
105
|
-
*/
|
|
106
|
-
target: Computed | Effect;
|
|
107
|
-
/**
|
|
108
|
-
* The next source subscription. After the targets have been re-run, we run
|
|
109
|
-
* through sources to remove any that weren't re-used.
|
|
110
|
-
*/
|
|
111
|
-
nextSource: Subscription | null;
|
|
112
|
-
/**
|
|
113
|
-
* The next target subscription. When the source is changed, we run through
|
|
114
|
-
* targets to mark them dirty and possibly re-run them.
|
|
115
|
-
*/
|
|
116
|
-
nextTarget: Subscription | null;
|
|
117
|
-
/**
|
|
118
|
-
* The previous target subscription. We remove subscriptions by looping
|
|
119
|
-
* through the sources list, so we only need to know the next source, but we
|
|
120
|
-
* need to know both the next and previous targets to properly update the
|
|
121
|
-
* targets list.
|
|
122
|
-
*/
|
|
123
|
-
previousTarget: Subscription | null;
|
|
124
|
-
/**
|
|
125
|
-
* Whether this subscription is active. At the start of a re-run, all
|
|
126
|
-
* subscriptions are marked inactive and marked active if re-used. If not
|
|
127
|
-
* re-used, they are removed after the run.
|
|
128
|
-
*/
|
|
129
|
-
active: boolean;
|
|
130
|
-
/**
|
|
131
|
-
* Whether the subscription's target may need to be recalculated (if any of
|
|
132
|
-
* its sources have changed).
|
|
133
|
-
*/
|
|
134
|
-
recalc: boolean;
|
|
135
|
-
/**
|
|
136
|
-
* The name of the subscription, for debugging.
|
|
137
|
-
*/
|
|
138
|
-
name?: string;
|
|
139
|
-
}
|
|
140
|
-
//#endregion
|
|
141
|
-
//#region src/types/Effect.d.ts
|
|
142
|
-
/**
|
|
143
|
-
* An effect that is run and re-run when the properties it depends on change.
|
|
144
|
-
*/
|
|
145
|
-
interface Effect {
|
|
146
|
-
/**
|
|
147
|
-
* EFFECT.
|
|
148
|
-
*/
|
|
149
|
-
type: typeof EFFECT_TYPE;
|
|
150
|
-
/**
|
|
151
|
-
*
|
|
152
|
-
* @returns An optional cleanup function, to run when the effect is re-run or disposed.
|
|
153
|
-
*/
|
|
154
|
-
run: () => Cleanup | void;
|
|
155
|
-
/**
|
|
156
|
-
* The optional cleanup function that may have been returned from the run function.
|
|
157
|
-
*/
|
|
158
|
-
cleanup: Cleanup | void;
|
|
159
|
-
/**
|
|
160
|
-
* The first signal or computed that causes this effect to be run.
|
|
161
|
-
*/
|
|
162
|
-
firstSource: Subscription | null;
|
|
163
|
-
nextEffect: Effect | null;
|
|
164
|
-
/**
|
|
165
|
-
* The number of children of this effect.
|
|
166
|
-
*/
|
|
167
|
-
extent: number;
|
|
168
|
-
/**
|
|
169
|
-
* When signals have been changed, this is the next dependent effect to run.
|
|
170
|
-
*/
|
|
171
|
-
nextEffectToRun: Effect | null;
|
|
172
|
-
/**
|
|
173
|
-
* True if the effect encountered an exception in its last run.
|
|
174
|
-
*/
|
|
175
|
-
didError: boolean;
|
|
176
|
-
/**
|
|
177
|
-
* The name of the effect, for debugging.
|
|
178
|
-
*/
|
|
179
|
-
name?: string;
|
|
180
|
-
}
|
|
181
|
-
//#endregion
|
|
182
|
-
//#region src/types/Region.d.ts
|
|
183
|
-
interface Region {
|
|
184
|
-
startNode: ChildNode | null;
|
|
185
|
-
endNode: ChildNode | null;
|
|
186
|
-
previousRegion: Region | null;
|
|
187
|
-
nextRegion: Region | null;
|
|
188
|
-
depth: number;
|
|
189
|
-
/**
|
|
190
|
-
* Animations that are currently running in the region, and which need to
|
|
191
|
-
* awaited or canceled before it is removed
|
|
192
|
-
*/
|
|
193
|
-
animations: Set<Animation> | null;
|
|
194
|
-
/**
|
|
195
|
-
* The name of the region, for debugging.
|
|
196
|
-
*/
|
|
197
|
-
name?: string;
|
|
198
|
-
}
|
|
199
|
-
//#endregion
|
|
200
|
-
export { Computed as i, Effect as n, ProxySignal as r, Region as t };
|
|
201
|
-
//# sourceMappingURL=Region-Bb6HAb-F.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Region-Bb6HAb-F.d.cts","names":[],"sources":["../src/types/constants.ts","../src/types/Computed.ts","../src/types/ProxySignal.ts","../src/types/Subscription.ts","../src/types/Effect.ts","../src/types/Region.ts"],"sourcesContent":[],"mappings":";;;;;;AAGa,cAAA,WAAA,GAAA,CAAA;AAKb;AAKA;;cALa,aAAA;;ACPiB;;AAgBtB,cDJK,WAAA,GCIL,CAAA;;;;ADdR;AAKA;AAKA;;UCLyB;;AAPK;;EAgBtB,IAAA,EAAA,OALM,aAKN;EAKI;;;EAiCD,KAAA,EAtCH,CAsCG;EAAA;;;aAjCC;ECrBgB;;;EAoBP,WAAA,EDMP,YCNO,GAAA,IAAA;EAAA;;;eDWP;EE9Be;;;;;;EA2BhB,MAAA,EAAA,OAAA;EAQI;;;;;ACnCW;;EAehB,QAAA,EAAA,OAAA;EAKF;;;EAoBQ,QAAA,EHaP,YGbO,GAAA,IAAA;EAAA;;;;;;;;AJvClB;AAKA;AAKA;UENyB,WAAA;;;ADNK;EAWhB,IAAA,EAAA,OCDA,WDCA;EAKN;;;EAeM,WAAA,EChBA,YDgBA,GAAA,IAAA;EAuBH;;;sBClCU;;AApBO;;EAed,IAAA,CAAA,EAAA,MAAA;;;;AFbd;AAKA;AAKA;;UGLyB,YAAA;;AFPK;;EAgBtB,MAAA,EELC,WFKD,GELe,QFKf;EAKI;;;EAiCD,MAAA,EEtCF,QFsCE,GEtCS,MFsCT;EAAA;;;;ECtDiB,UAMH,ECgBZ,YDhBY,GAAA,IAAA;EAIX;;;;cCkBD;;;AA3BgB;;;;EAeT,cAAA,EAoBH,YApBG,GAAA,IAAA;EAMP;;;;;;;ACrBe;;;EAoBlB,MAAA,EAAA,OAAA;EAKI;;;EAeI,IAAA,CAAA,EAAA,MAAA;;;;AJvClB;AAKA;AAKA;UINyB,MAAA;;;AHNK;EAWhB,IAAA,EAAA,OGDA,WHCA;EAKN;;;;EAsCG,GAAA,EAAA,GAAA,GGtCC,OHsCD,GAAA,IAAA;EAAA;;;WGjCD;EFrBkB;;;EAoBP,WAAA,EEMP,YFNO,GAAA,IAAA;EAAA,UAAA,EEWR,MFXQ,GAAA,IAAA;;;;ECnBQ,MAMJ,EAAA,MAAA;EAIhB;;;EAKW,eAAA,ECyBF,MDzBE,GAAA,IAAA;EAMP;;;EAcI,QAAA,EAAA,OAAA;;;;ECnCW,IAKH,CAAA,EAAA,MAAA;;;;UCPA,MAAA;aACb;WACF;ELCV,cAAa,EKCI,MLDJ,GAAA,IAAA;EAKb,UAAa,EKHA,MLGA,GAAA,IAAA;EAKb,KAAa,EAAA,MAAA;;;;ACZiB;EAWhB,UAAA,EIAD,GJAC,CIAG,SJAH,CAAA,GAAA,IAAA;EAKN;;;EAeM,IAAA,CAAA,EAAA,MAAA"}
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import { t as Cleanup } from "./Cleanup-CgjyN0lW.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/types/constants.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* The type of a Signal object.
|
|
6
|
-
*/
|
|
7
|
-
declare const SIGNAL_TYPE = 0;
|
|
8
|
-
/**
|
|
9
|
-
* The type of a Computed object.
|
|
10
|
-
*/
|
|
11
|
-
declare const COMPUTED_TYPE = 1;
|
|
12
|
-
/**
|
|
13
|
-
* The type of an Effect object.
|
|
14
|
-
*/
|
|
15
|
-
declare const EFFECT_TYPE = 2;
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region src/types/Computed.d.ts
|
|
18
|
-
/**
|
|
19
|
-
* A computed value that is lazily refreshed when accessed from an Effect or
|
|
20
|
-
* another Computed. Our computed values are implemented as property getter
|
|
21
|
-
* functions.
|
|
22
|
-
*/
|
|
23
|
-
interface Computed<T = any> {
|
|
24
|
-
/**
|
|
25
|
-
* COMPUTED.
|
|
26
|
-
*/
|
|
27
|
-
type: typeof COMPUTED_TYPE;
|
|
28
|
-
/**
|
|
29
|
-
* The cached, computed value.
|
|
30
|
-
*/
|
|
31
|
-
value: T;
|
|
32
|
-
/**
|
|
33
|
-
* The getter function to run to access this computed's value.
|
|
34
|
-
*/
|
|
35
|
-
run: () => T;
|
|
36
|
-
/**
|
|
37
|
-
* The first signal or computed that causes this effect to be run.
|
|
38
|
-
*/
|
|
39
|
-
firstSource: Subscription | null;
|
|
40
|
-
/**
|
|
41
|
-
* The first computed or effect that is triggered when this property is changed.
|
|
42
|
-
*/
|
|
43
|
-
firstTarget: Subscription | null;
|
|
44
|
-
/**
|
|
45
|
-
* Whether the computed may need to be recalculated (if any of its sources
|
|
46
|
-
* have changed). We store this on the computed (as well as its
|
|
47
|
-
* subscription) so we don't have to check the sources every time (which may
|
|
48
|
-
* be expensive).
|
|
49
|
-
*/
|
|
50
|
-
recalc: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Used to track cycles.
|
|
53
|
-
*/
|
|
54
|
-
running: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* True if the computed encountered an exception in its last run.
|
|
57
|
-
*/
|
|
58
|
-
didError: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* A subscription to roll back to when recursively updating signal targets.
|
|
61
|
-
*/
|
|
62
|
-
rollback: Subscription | null;
|
|
63
|
-
/**
|
|
64
|
-
* The name of the computed property, for debugging.
|
|
65
|
-
*/
|
|
66
|
-
name?: string;
|
|
67
|
-
}
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region src/types/ProxySignal.d.ts
|
|
70
|
-
/**
|
|
71
|
-
* A value that causes dependent Computeds and Effects to be re-run. Our signals
|
|
72
|
-
* are implemented as object properties.
|
|
73
|
-
*/
|
|
74
|
-
interface ProxySignal {
|
|
75
|
-
/**
|
|
76
|
-
* SIGNAL.
|
|
77
|
-
*/
|
|
78
|
-
type: typeof SIGNAL_TYPE;
|
|
79
|
-
/**
|
|
80
|
-
* The first Computed or Effect that is triggered when this property is changed.
|
|
81
|
-
*/
|
|
82
|
-
firstTarget: Subscription | null;
|
|
83
|
-
/**
|
|
84
|
-
* When signals have been changed in a batch, this is the next changed signal.
|
|
85
|
-
*/
|
|
86
|
-
nextSignalToUpdate: ProxySignal | null;
|
|
87
|
-
/**
|
|
88
|
-
* The name of the property, for debugging.
|
|
89
|
-
*/
|
|
90
|
-
name?: string;
|
|
91
|
-
}
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region src/types/Subscription.d.ts
|
|
94
|
-
/**
|
|
95
|
-
* A subscription that connects a source Signal or Computed to a target Computed
|
|
96
|
-
* or Effect.
|
|
97
|
-
*/
|
|
98
|
-
interface Subscription {
|
|
99
|
-
/**
|
|
100
|
-
* The source Signal or Computed.
|
|
101
|
-
*/
|
|
102
|
-
source: ProxySignal | Computed;
|
|
103
|
-
/**
|
|
104
|
-
* The target Computed or Effect.
|
|
105
|
-
*/
|
|
106
|
-
target: Computed | Effect;
|
|
107
|
-
/**
|
|
108
|
-
* The next source subscription. After the targets have been re-run, we run
|
|
109
|
-
* through sources to remove any that weren't re-used.
|
|
110
|
-
*/
|
|
111
|
-
nextSource: Subscription | null;
|
|
112
|
-
/**
|
|
113
|
-
* The next target subscription. When the source is changed, we run through
|
|
114
|
-
* targets to mark them dirty and possibly re-run them.
|
|
115
|
-
*/
|
|
116
|
-
nextTarget: Subscription | null;
|
|
117
|
-
/**
|
|
118
|
-
* The previous target subscription. We remove subscriptions by looping
|
|
119
|
-
* through the sources list, so we only need to know the next source, but we
|
|
120
|
-
* need to know both the next and previous targets to properly update the
|
|
121
|
-
* targets list.
|
|
122
|
-
*/
|
|
123
|
-
previousTarget: Subscription | null;
|
|
124
|
-
/**
|
|
125
|
-
* Whether this subscription is active. At the start of a re-run, all
|
|
126
|
-
* subscriptions are marked inactive and marked active if re-used. If not
|
|
127
|
-
* re-used, they are removed after the run.
|
|
128
|
-
*/
|
|
129
|
-
active: boolean;
|
|
130
|
-
/**
|
|
131
|
-
* Whether the subscription's target may need to be recalculated (if any of
|
|
132
|
-
* its sources have changed).
|
|
133
|
-
*/
|
|
134
|
-
recalc: boolean;
|
|
135
|
-
/**
|
|
136
|
-
* The name of the subscription, for debugging.
|
|
137
|
-
*/
|
|
138
|
-
name?: string;
|
|
139
|
-
}
|
|
140
|
-
//#endregion
|
|
141
|
-
//#region src/types/Effect.d.ts
|
|
142
|
-
/**
|
|
143
|
-
* An effect that is run and re-run when the properties it depends on change.
|
|
144
|
-
*/
|
|
145
|
-
interface Effect {
|
|
146
|
-
/**
|
|
147
|
-
* EFFECT.
|
|
148
|
-
*/
|
|
149
|
-
type: typeof EFFECT_TYPE;
|
|
150
|
-
/**
|
|
151
|
-
*
|
|
152
|
-
* @returns An optional cleanup function, to run when the effect is re-run or disposed.
|
|
153
|
-
*/
|
|
154
|
-
run: () => Cleanup | void;
|
|
155
|
-
/**
|
|
156
|
-
* The optional cleanup function that may have been returned from the run function.
|
|
157
|
-
*/
|
|
158
|
-
cleanup: Cleanup | void;
|
|
159
|
-
/**
|
|
160
|
-
* The first signal or computed that causes this effect to be run.
|
|
161
|
-
*/
|
|
162
|
-
firstSource: Subscription | null;
|
|
163
|
-
nextEffect: Effect | null;
|
|
164
|
-
/**
|
|
165
|
-
* The number of children of this effect.
|
|
166
|
-
*/
|
|
167
|
-
extent: number;
|
|
168
|
-
/**
|
|
169
|
-
* When signals have been changed, this is the next dependent effect to run.
|
|
170
|
-
*/
|
|
171
|
-
nextEffectToRun: Effect | null;
|
|
172
|
-
/**
|
|
173
|
-
* True if the effect encountered an exception in its last run.
|
|
174
|
-
*/
|
|
175
|
-
didError: boolean;
|
|
176
|
-
/**
|
|
177
|
-
* The name of the effect, for debugging.
|
|
178
|
-
*/
|
|
179
|
-
name?: string;
|
|
180
|
-
}
|
|
181
|
-
//#endregion
|
|
182
|
-
//#region src/types/Region.d.ts
|
|
183
|
-
interface Region {
|
|
184
|
-
startNode: ChildNode | null;
|
|
185
|
-
endNode: ChildNode | null;
|
|
186
|
-
previousRegion: Region | null;
|
|
187
|
-
nextRegion: Region | null;
|
|
188
|
-
depth: number;
|
|
189
|
-
/**
|
|
190
|
-
* Animations that are currently running in the region, and which need to
|
|
191
|
-
* awaited or canceled before it is removed
|
|
192
|
-
*/
|
|
193
|
-
animations: Set<Animation> | null;
|
|
194
|
-
/**
|
|
195
|
-
* The name of the region, for debugging.
|
|
196
|
-
*/
|
|
197
|
-
name?: string;
|
|
198
|
-
}
|
|
199
|
-
//#endregion
|
|
200
|
-
export { Computed as i, Effect as n, ProxySignal as r, Region as t };
|
|
201
|
-
//# sourceMappingURL=Region-CTchywkr.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Region-CTchywkr.d.mts","names":[],"sources":["../src/types/constants.ts","../src/types/Computed.ts","../src/types/ProxySignal.ts","../src/types/Subscription.ts","../src/types/Effect.ts","../src/types/Region.ts"],"sourcesContent":[],"mappings":";;;;;;AAGa,cAAA,WAAA,GAAA,CAAA;AAKb;AAKA;;cALa,aAAA;;ACPiB;;AAgBtB,cDJK,WAAA,GCIL,CAAA;;;;ADdR;AAKA;AAKA;;UCLyB;;AAPK;;EAgBtB,IAAA,EAAA,OALM,aAKN;EAKI;;;EAiCD,KAAA,EAtCH,CAsCG;EAAA;;;aAjCC;ECrBgB;;;EAoBP,WAAA,EDMP,YCNO,GAAA,IAAA;EAAA;;;eDWP;EE9Be;;;;;;EA2BhB,MAAA,EAAA,OAAA;EAQI;;;;;ACnCW;;EAehB,QAAA,EAAA,OAAA;EAKF;;;EAoBQ,QAAA,EHaP,YGbO,GAAA,IAAA;EAAA;;;;;;;;AJvClB;AAKA;AAKA;UENyB,WAAA;;;ADNK;EAWhB,IAAA,EAAA,OCDA,WDCA;EAKN;;;EAeM,WAAA,EChBA,YDgBA,GAAA,IAAA;EAuBH;;;sBClCU;;AApBO;;EAed,IAAA,CAAA,EAAA,MAAA;;;;AFbd;AAKA;AAKA;;UGLyB,YAAA;;AFPK;;EAgBtB,MAAA,EELC,WFKD,GELe,QFKf;EAKI;;;EAiCD,MAAA,EEtCF,QFsCE,GEtCS,MFsCT;EAAA;;;;ECtDiB,UAMH,ECgBZ,YDhBY,GAAA,IAAA;EAIX;;;;cCkBD;;;AA3BgB;;;;EAeT,cAAA,EAoBH,YApBG,GAAA,IAAA;EAMP;;;;;;;ACrBe;;;EAoBlB,MAAA,EAAA,OAAA;EAKI;;;EAeI,IAAA,CAAA,EAAA,MAAA;;;;AJvClB;AAKA;AAKA;UINyB,MAAA;;;AHNK;EAWhB,IAAA,EAAA,OGDA,WHCA;EAKN;;;;EAsCG,GAAA,EAAA,GAAA,GGtCC,OHsCD,GAAA,IAAA;EAAA;;;WGjCD;EFrBkB;;;EAoBP,WAAA,EEMP,YFNO,GAAA,IAAA;EAAA,UAAA,EEWR,MFXQ,GAAA,IAAA;;;;ECnBQ,MAMJ,EAAA,MAAA;EAIhB;;;EAKW,eAAA,ECyBF,MDzBE,GAAA,IAAA;EAMP;;;EAcI,QAAA,EAAA,OAAA;;;;ECnCW,IAKH,CAAA,EAAA,MAAA;;;;UCPA,MAAA;aACb;WACF;ELCV,cAAa,EKCI,MLDJ,GAAA,IAAA;EAKb,UAAa,EKHA,MLGA,GAAA,IAAA;EAKb,KAAa,EAAA,MAAA;;;;ACZiB;EAWhB,UAAA,EIAD,GJAC,CIAG,SJAH,CAAA,GAAA,IAAA;EAKN;;;EAeM,IAAA,CAAA,EAAA,MAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devContext-CQ8RhBX-.mjs","names":["DEV_CONTEXT_SYMBOL: unique symbol","devContext: DevContext"],"sources":["../src/dev/devContext.ts"],"sourcesContent":["import type DevContext from \"./types/DevContext\";\n\nconst DEV_CONTEXT_SYMBOL: unique symbol = Symbol.for(\"t_dev_context\");\n\nconst noop = () => {};\n\nconst devContext: DevContext =\n\t// @ts-ignore\n\t(globalThis[DEV_CONTEXT_SYMBOL] ??= {\n\t\tenabled: false,\n\t\tdepth: 0,\n\t\tindex: -1,\n\t\tboundaries: [],\n\n\t\tformat: () => \"\",\n\t\tgetDetails: () => \"\",\n\t\tunmark: noop,\n\t\tmark: noop,\n\n\t\t// Hooks\n\t\tonWatch: noop,\n\t\tonRun: noop,\n\t\tonRegionPushed: noop,\n\t\tonRegionPopped: noop,\n\t\tonRegionCleared: noop,\n\n\t\tsignalSet: noop,\n\t\teffectRun: noop,\n\t} satisfies DevContext);\n\nexport default devContext;\n"],"mappings":";AAEA,MAAMA,qBAAoC,OAAO,IAAI,gBAAgB;AAErE,MAAM,aAAa;AAEnB,MAAMC,aAEJ,WAAW,wBAAwB;CACnC,SAAS;CACT,OAAO;CACP,OAAO;CACP,YAAY,EAAE;CAEd,cAAc;CACd,kBAAkB;CAClB,QAAQ;CACR,MAAM;CAGN,SAAS;CACT,OAAO;CACP,gBAAgB;CAChB,gBAAgB;CAChB,iBAAiB;CAEjB,WAAW;CACX,WAAW;CACX;AAEF,yBAAe"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/render/buildClasses.ts
|
|
3
|
-
function buildClasses(value, styleHash) {
|
|
4
|
-
if (typeof value === "string") {
|
|
5
|
-
if (styleHash !== void 0) value += " " + styleHash;
|
|
6
|
-
return value;
|
|
7
|
-
} else {
|
|
8
|
-
let classes = [];
|
|
9
|
-
gatherNames("", value, classes);
|
|
10
|
-
if (styleHash !== void 0) classes.push(styleHash);
|
|
11
|
-
return classes.join(" ");
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
function gatherNames(name, value, classes) {
|
|
15
|
-
if (value) if (Array.isArray(value)) for (let v of value) gatherNames(v, v, classes);
|
|
16
|
-
else if (typeof value === "object") for (let [n, v] of Object.entries(value)) gatherNames(n, v, classes);
|
|
17
|
-
else classes.push(name);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/render/buildStyles.ts
|
|
22
|
-
function buildStyles(value) {
|
|
23
|
-
if (typeof value === "string") return value;
|
|
24
|
-
else {
|
|
25
|
-
let styles = [];
|
|
26
|
-
if (value) {
|
|
27
|
-
if (Array.isArray(value)) {
|
|
28
|
-
for (let v of value) if (v) styles.push(v);
|
|
29
|
-
} else if (typeof value === "object") for (let [n, v] of Object.entries(value)) styles.push(`${n}: ${v}`);
|
|
30
|
-
}
|
|
31
|
-
return styles.join("; ");
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region src/render/formatText.ts
|
|
37
|
-
function formatText(value) {
|
|
38
|
-
return value ?? "";
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
//#endregion
|
|
42
|
-
Object.defineProperty(exports, 'buildClasses', {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return buildClasses;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, 'buildStyles', {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function () {
|
|
51
|
-
return buildStyles;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, 'formatText', {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return formatText;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
//#region src/render/buildClasses.ts
|
|
2
|
-
function buildClasses(value, styleHash) {
|
|
3
|
-
if (typeof value === "string") {
|
|
4
|
-
if (styleHash !== void 0) value += " " + styleHash;
|
|
5
|
-
return value;
|
|
6
|
-
} else {
|
|
7
|
-
let classes = [];
|
|
8
|
-
gatherNames("", value, classes);
|
|
9
|
-
if (styleHash !== void 0) classes.push(styleHash);
|
|
10
|
-
return classes.join(" ");
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
function gatherNames(name, value, classes) {
|
|
14
|
-
if (value) if (Array.isArray(value)) for (let v of value) gatherNames(v, v, classes);
|
|
15
|
-
else if (typeof value === "object") for (let [n, v] of Object.entries(value)) gatherNames(n, v, classes);
|
|
16
|
-
else classes.push(name);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/render/buildStyles.ts
|
|
21
|
-
function buildStyles(value) {
|
|
22
|
-
if (typeof value === "string") return value;
|
|
23
|
-
else {
|
|
24
|
-
let styles = [];
|
|
25
|
-
if (value) {
|
|
26
|
-
if (Array.isArray(value)) {
|
|
27
|
-
for (let v of value) if (v) styles.push(v);
|
|
28
|
-
} else if (typeof value === "object") for (let [n, v] of Object.entries(value)) styles.push(`${n}: ${v}`);
|
|
29
|
-
}
|
|
30
|
-
return styles.join("; ");
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region src/render/formatText.ts
|
|
36
|
-
function formatText(value) {
|
|
37
|
-
return value ?? "";
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
//#endregion
|
|
41
|
-
export { buildStyles as n, buildClasses as r, formatText as t };
|
|
42
|
-
//# sourceMappingURL=formatText-B8u71S_K.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatText-B8u71S_K.mjs","names":["classes: string[]","styles: string[]"],"sources":["../src/render/buildClasses.ts","../src/render/buildStyles.ts","../src/render/formatText.ts"],"sourcesContent":["import ClassValue from \"../types/ClassValue\";\n\nexport default function buildClasses(value: ClassValue, styleHash?: string): string {\n\tif (typeof value === \"string\") {\n\t\tif (styleHash !== undefined) {\n\t\t\tvalue += \" \" + styleHash;\n\t\t}\n\t\treturn value;\n\t} else {\n\t\tlet classes: string[] = [];\n\t\tgatherNames(\"\", value, classes);\n\t\tif (styleHash !== undefined) {\n\t\t\tclasses.push(styleHash);\n\t\t}\n\t\treturn classes.join(\" \");\n\t}\n}\n\nfunction gatherNames(name: string, value: unknown, classes: string[]) {\n\tif (value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (let v of value) {\n\t\t\t\tgatherNames(v as string, v, classes);\n\t\t\t}\n\t\t} else if (typeof value === \"object\") {\n\t\t\tfor (let [n, v] of Object.entries(value)) {\n\t\t\t\tgatherNames(n, v, classes);\n\t\t\t}\n\t\t} else {\n\t\t\tclasses.push(name);\n\t\t}\n\t}\n}\n","import type StyleValue from \"../types/StyleValue\";\n\nexport default function buildStyles(value: StyleValue): string {\n\tif (typeof value === \"string\") {\n\t\treturn value;\n\t} else {\n\t\tlet styles: string[] = [];\n\t\tif (value) {\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tfor (let v of value) {\n\t\t\t\t\tif (v) {\n\t\t\t\t\t\tstyles.push(v);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (typeof value === \"object\") {\n\t\t\t\tfor (let [n, v] of Object.entries(value)) {\n\t\t\t\t\tstyles.push(`${n}: ${v}`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn styles.join(\"; \");\n\t}\n}\n","export default function formatText(value: any): string {\n\treturn value ?? \"\";\n}\n"],"mappings":";AAEA,SAAwB,aAAa,OAAmB,WAA4B;AACnF,KAAI,OAAO,UAAU,UAAU;AAC9B,MAAI,cAAc,OACjB,UAAS,MAAM;AAEhB,SAAO;QACD;EACN,IAAIA,UAAoB,EAAE;AAC1B,cAAY,IAAI,OAAO,QAAQ;AAC/B,MAAI,cAAc,OACjB,SAAQ,KAAK,UAAU;AAExB,SAAO,QAAQ,KAAK,IAAI;;;AAI1B,SAAS,YAAY,MAAc,OAAgB,SAAmB;AACrE,KAAI,MACH,KAAI,MAAM,QAAQ,MAAM,CACvB,MAAK,IAAI,KAAK,MACb,aAAY,GAAa,GAAG,QAAQ;UAE3B,OAAO,UAAU,SAC3B,MAAK,IAAI,CAAC,GAAG,MAAM,OAAO,QAAQ,MAAM,CACvC,aAAY,GAAG,GAAG,QAAQ;KAG3B,SAAQ,KAAK,KAAK;;;;;AC3BrB,SAAwB,YAAY,OAA2B;AAC9D,KAAI,OAAO,UAAU,SACpB,QAAO;MACD;EACN,IAAIC,SAAmB,EAAE;AACzB,MAAI,OACH;OAAI,MAAM,QAAQ,MAAM,EACvB;SAAK,IAAI,KAAK,MACb,KAAI,EACH,QAAO,KAAK,EAAE;cAGN,OAAO,UAAU,SAC3B,MAAK,IAAI,CAAC,GAAG,MAAM,OAAO,QAAQ,MAAM,CACvC,QAAO,KAAK,GAAG,EAAE,IAAI,IAAI;;AAI5B,SAAO,OAAO,KAAK,KAAK;;;;;;ACpB1B,SAAwB,WAAW,OAAoB;AACtD,QAAO,SAAS"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
//#region src/types/ClassValue.d.ts
|
|
2
|
-
type ClassValue = string | Record<string, boolean | null | undefined> | Array<ClassValue> | null | undefined;
|
|
3
|
-
//#endregion
|
|
4
|
-
//#region src/render/buildClasses.d.ts
|
|
5
|
-
declare function buildClasses(value: ClassValue, styleHash?: string): string;
|
|
6
|
-
//#endregion
|
|
7
|
-
//#region src/types/StyleValue.d.ts
|
|
8
|
-
type StyleValue = string | Record<string, string | null | undefined> | Array<string | null | undefined> | null | undefined;
|
|
9
|
-
//#endregion
|
|
10
|
-
//#region src/render/buildStyles.d.ts
|
|
11
|
-
declare function buildStyles(value: StyleValue): string;
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/render/formatText.d.ts
|
|
14
|
-
declare function formatText(value: any): string;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { ClassValue as a, buildClasses as i, buildStyles as n, StyleValue as r, formatText as t };
|
|
17
|
-
//# sourceMappingURL=formatText-BNP3P38F.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatText-BNP3P38F.d.cts","names":[],"sources":["../src/types/ClassValue.ts","../src/render/buildClasses.ts","../src/types/StyleValue.ts","../src/render/buildStyles.ts","../src/render/formatText.ts"],"sourcesContent":[],"mappings":";KAAK,UAAA,YAEF,6CACA,MAAM;;;AAHJ,iBCEmB,YAAA,CDFnB,KAAA,ECEuC,UDFvC,EAAA,SAAA,CAAA,EAAA,MAAA,CAAA,EAAA,MAAA;;;KEAA,UAAA,YAEF,4CACA;;;AFHE,iBGEmB,WAAA,CHFnB,KAAA,EGEsC,UHFtC,CAAA,EAAA,MAAA;;;iBIAmB,UAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
//#region src/types/ClassValue.d.ts
|
|
2
|
-
type ClassValue = string | Record<string, boolean | null | undefined> | Array<ClassValue> | null | undefined;
|
|
3
|
-
//#endregion
|
|
4
|
-
//#region src/render/buildClasses.d.ts
|
|
5
|
-
declare function buildClasses(value: ClassValue, styleHash?: string): string;
|
|
6
|
-
//#endregion
|
|
7
|
-
//#region src/types/StyleValue.d.ts
|
|
8
|
-
type StyleValue = string | Record<string, string | null | undefined> | Array<string | null | undefined> | null | undefined;
|
|
9
|
-
//#endregion
|
|
10
|
-
//#region src/render/buildStyles.d.ts
|
|
11
|
-
declare function buildStyles(value: StyleValue): string;
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/render/formatText.d.ts
|
|
14
|
-
declare function formatText(value: any): string;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { ClassValue as a, buildClasses as i, buildStyles as n, StyleValue as r, formatText as t };
|
|
17
|
-
//# sourceMappingURL=formatText-D6Ov8Ub0.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatText-D6Ov8Ub0.d.mts","names":[],"sources":["../src/types/ClassValue.ts","../src/render/buildClasses.ts","../src/types/StyleValue.ts","../src/render/buildStyles.ts","../src/render/formatText.ts"],"sourcesContent":[],"mappings":";KAAK,UAAA,YAEF,6CACA,MAAM;;;AAHJ,iBCEmB,YAAA,CDFnB,KAAA,ECEuC,UDFvC,EAAA,SAAA,CAAA,EAAA,MAAA,CAAA,EAAA,MAAA;;;KEAA,UAAA,YAEF,4CACA;;;AFHE,iBGEmB,WAAA,CHFnB,KAAA,EGEsC,UHFtC,CAAA,EAAA,MAAA;;;iBIAmB,UAAA"}
|