@@ -35,26 +35,29 @@ export type Store<V> = {
35
35
// when the JS VM JITs the code.
36
36
37
37
export type ComponentContext = {
38
- // props
38
+ /** props */
39
39
s : MaybeSignal < Record < string , unknown > > ;
40
- // accessors
40
+ /** accessors */
41
41
a : Record < string , any > | null ;
42
- // effects
42
+ /** effectgs */
43
43
e : null | Array < EffectSignal > ;
44
- // mounted
44
+ /** mounted */
45
45
m : boolean ;
46
- // parent
46
+ /** parent */
47
47
p : null | ComponentContext ;
48
- // context
48
+ /** context */
49
49
c : null | Map < unknown , unknown > ;
50
- // immutable
50
+ /** immutable */
51
51
i : boolean ;
52
- // runes
52
+ /** runes */
53
53
r : boolean ;
54
- // update_callbacks
54
+ /** update_callbacks */
55
55
u : null | {
56
+ /** before */
56
57
b : Array < ( ) => void > ;
58
+ /** after */
57
59
a : Array < ( ) => void > ;
60
+ /** execute */
58
61
e : ( ) => void ;
59
62
} ;
60
63
} ;
@@ -125,176 +128,176 @@ export type BlockType =
125
128
export type TemplateNode = Text | Element | Comment ;
126
129
127
130
export type Transition = {
128
- // effect
131
+ /** effect */
129
132
e : EffectSignal ;
130
- // payload
133
+ /** payload */
131
134
p : null | TransitionPayload ;
132
- // init
135
+ /** init */
133
136
i : ( from ?: DOMRect ) => TransitionPayload ;
134
- // finished
137
+ /** finished */
135
138
f : ( fn : ( ) => void ) => void ;
136
139
in : ( ) => void ;
137
- // out
140
+ /** out */
138
141
o : ( ) => void ;
139
- // cancel
142
+ /** cancel */
140
143
c : ( ) => void ;
141
- // cleanup
144
+ /** cleanup */
142
145
x : ( ) => void ;
143
- // direction
146
+ /** direction */
144
147
r : 'in' | 'out' | 'both' | 'key' ;
145
- // dom
148
+ /** dom */
146
149
d : HTMLElement ;
147
150
} ;
148
151
149
152
export type RootBlock = {
150
- // dom
153
+ /** dom */
151
154
d : null | TemplateNode | Array < TemplateNode > ;
152
- // effect
155
+ /** effect */
153
156
e : null | ComputationSignal ;
154
- // intro
157
+ /** intro */
155
158
i : boolean ;
156
- // parent
159
+ /** parent */
157
160
p : null ;
158
- // transition
161
+ /** transition */
159
162
r : null | ( ( transition : Transition ) => void ) ;
160
- // type
163
+ /** type */
161
164
t : typeof ROOT_BLOCK ;
162
165
} ;
163
166
164
167
export type IfBlock = {
165
- // current
168
+ /** current */
166
169
c : boolean ;
167
- // dom
170
+ /** dom */
168
171
d : null | TemplateNode | Array < TemplateNode > ;
169
- // effect
172
+ /** effect */
170
173
e : null | ComputationSignal ;
171
- // parent
174
+ /** parent */
172
175
p : Block ;
173
- // transition
176
+ /** transition */
174
177
r : null | ( ( transition : Transition ) => void ) ;
175
- // type
178
+ /** type */
176
179
t : typeof IF_BLOCK ;
177
180
} ;
178
181
179
182
export type KeyBlock = {
180
- // dom
183
+ /** dom */
181
184
d : null | TemplateNode | Array < TemplateNode > ;
182
- // effect
185
+ /** effect */
183
186
e : null | ComputationSignal ;
184
- // parent
187
+ /** parent */
185
188
p : Block ;
186
- // transition
189
+ /** transition */
187
190
r : null | ( ( transition : Transition ) => void ) ;
188
- // type
191
+ /** type */
189
192
t : typeof KEY_BLOCK ;
190
193
} ;
191
194
192
195
export type HeadBlock = {
193
- // dom
196
+ /** dom */
194
197
d : null | TemplateNode | Array < TemplateNode > ;
195
- // effect
198
+ /** effect */
196
199
e : null | ComputationSignal ;
197
- // parent
200
+ /** parent */
198
201
p : Block ;
199
- // transition
202
+ /** transition */
200
203
r : null | ( ( transition : Transition ) => void ) ;
201
- // type
204
+ /** type */
202
205
t : typeof HEAD_BLOCK ;
203
206
} ;
204
207
205
208
export type DynamicElementBlock = {
206
- // dom
209
+ /** dom */
207
210
d : null | TemplateNode | Array < TemplateNode > ;
208
- // effect
211
+ /** effect */
209
212
e : null | ComputationSignal ;
210
- // parent
213
+ /** parent */
211
214
p : Block ;
212
- // transition
215
+ /** transition */
213
216
r : null | ( ( transition : Transition ) => void ) ;
214
- // type
217
+ /** type */
215
218
t : typeof DYNAMIC_ELEMENT_BLOCK ;
216
219
} ;
217
220
218
221
export type DynamicComponentBlock = {
219
- // dom
222
+ /** dom */
220
223
d : null | TemplateNode | Array < TemplateNode > ;
221
- // effect
224
+ /** effect */
222
225
e : null | ComputationSignal ;
223
- // parent
226
+ /** parent */
224
227
p : Block ;
225
- // transition
228
+ /** transition */
226
229
r : null | ( ( transition : Transition ) => void ) ;
227
- // type
230
+ /** type */
228
231
t : typeof DYNAMIC_COMPONENT_BLOCK ;
229
232
} ;
230
233
231
234
export type AwaitBlock = {
232
- // dom
235
+ /** dom */
233
236
d : null | TemplateNode | Array < TemplateNode > ;
234
- // effect
237
+ /** effect */
235
238
e : null | ComputationSignal ;
236
- // parent
239
+ /** parent */
237
240
p : Block ;
238
- // pending
241
+ /** pending */
239
242
n : boolean ;
240
- // transition
243
+ /** transition */
241
244
r : null | ( ( transition : Transition ) => void ) ;
242
- // type
245
+ /** type */
243
246
t : typeof AWAIT_BLOCK ;
244
247
} ;
245
248
246
249
export type EachBlock = {
247
- // anchor
250
+ /** anchor */
248
251
a : Element | Comment ;
249
- // flags
252
+ /** flags */
250
253
f : number ;
251
- // dom
254
+ /** dom */
252
255
d : null | TemplateNode | Array < TemplateNode > ;
253
- // items
256
+ /** items */
254
257
v : EachItemBlock [ ] ;
255
- // effect
258
+ /** effewct */
256
259
e : null | ComputationSignal ;
257
- // parent
260
+ /** parent */
258
261
p : Block ;
259
- // transition
262
+ /** transition */
260
263
r : null | ( ( transition : Transition ) => void ) ;
261
- // transitions
264
+ /** transitions */
262
265
s : Array < EachItemBlock > ;
263
- // type
266
+ /** type */
264
267
t : typeof EACH_BLOCK ;
265
268
} ;
266
269
267
270
export type EachItemBlock = {
268
- // dom
271
+ /** dom */
269
272
d : null | TemplateNode | Array < TemplateNode > ;
270
- // effect
273
+ /** effect */
271
274
e : null | ComputationSignal ;
272
- // item
275
+ /** item */
273
276
v : any | Signal < any > ;
274
- // index
277
+ /** index */
275
278
i : number | Signal < number > ;
276
- // key
279
+ /** key */
277
280
k : unknown ;
278
- // parent
281
+ /** parent */
279
282
p : EachBlock ;
280
- // transition
283
+ /** transition */
281
284
r : null | ( ( transition : Transition ) => void ) ;
282
- // transitions
285
+ /** transitions */
283
286
s : null | Set < Transition > ;
284
- // type
287
+ /** type */
285
288
t : typeof EACH_ITEM_BLOCK ;
286
289
} ;
287
290
288
291
export type SnippetBlock = {
289
- // dom
292
+ /** dom */
290
293
d : null | TemplateNode | Array < TemplateNode > ;
291
- // parent
294
+ /** parent */
292
295
p : Block ;
293
- // effect
296
+ /** effect */
294
297
e : null | ComputationSignal ;
295
- // transition
298
+ /** transition */
296
299
r : null ;
297
- // type
300
+ /** type */
298
301
t : typeof SNIPPET_BLOCK ;
299
302
} ;
300
303
@@ -344,13 +347,13 @@ export type StoreReferencesContainer = Record<
344
347
export type ActionPayload < P > = { destroy ?: ( ) => void ; update ?: ( value : P ) => void } ;
345
348
346
349
export type Render = {
347
- // dom
350
+ /** dom */
348
351
d : null | TemplateNode | Array < TemplateNode > ;
349
- // effect
352
+ /** effect */
350
353
e : null | EffectSignal ;
351
- // transitions
354
+ /** transitions */
352
355
s : Set < Transition > ;
353
- // prev
356
+ /** prev */
354
357
p : Render | null ;
355
358
} ;
356
359
0 commit comments