@@ -35,26 +35,29 @@ export type Store<V> = {
3535// when the JS VM JITs the code.
3636
3737export type ComponentContext = {
38- // props
38+ /** props */
3939 s : MaybeSignal < Record < string , unknown > > ;
40- // accessors
40+ /** accessors */
4141 a : Record < string , any > | null ;
42- // effects
42+ /** effectgs */
4343 e : null | Array < EffectSignal > ;
44- // mounted
44+ /** mounted */
4545 m : boolean ;
46- // parent
46+ /** parent */
4747 p : null | ComponentContext ;
48- // context
48+ /** context */
4949 c : null | Map < unknown , unknown > ;
50- // immutable
50+ /** immutable */
5151 i : boolean ;
52- // runes
52+ /** runes */
5353 r : boolean ;
54- // update_callbacks
54+ /** update_callbacks */
5555 u : null | {
56+ /** before */
5657 b : Array < ( ) => void > ;
58+ /** after */
5759 a : Array < ( ) => void > ;
60+ /** execute */
5861 e : ( ) => void ;
5962 } ;
6063} ;
@@ -125,176 +128,176 @@ export type BlockType =
125128export type TemplateNode = Text | Element | Comment ;
126129
127130export type Transition = {
128- // effect
131+ /** effect */
129132 e : EffectSignal ;
130- // payload
133+ /** payload */
131134 p : null | TransitionPayload ;
132- // init
135+ /** init */
133136 i : ( from ?: DOMRect ) => TransitionPayload ;
134- // finished
137+ /** finished */
135138 f : ( fn : ( ) => void ) => void ;
136139 in : ( ) => void ;
137- // out
140+ /** out */
138141 o : ( ) => void ;
139- // cancel
142+ /** cancel */
140143 c : ( ) => void ;
141- // cleanup
144+ /** cleanup */
142145 x : ( ) => void ;
143- // direction
146+ /** direction */
144147 r : 'in' | 'out' | 'both' | 'key' ;
145- // dom
148+ /** dom */
146149 d : HTMLElement ;
147150} ;
148151
149152export type RootBlock = {
150- // dom
153+ /** dom */
151154 d : null | TemplateNode | Array < TemplateNode > ;
152- // effect
155+ /** effect */
153156 e : null | ComputationSignal ;
154- // intro
157+ /** intro */
155158 i : boolean ;
156- // parent
159+ /** parent */
157160 p : null ;
158- // transition
161+ /** transition */
159162 r : null | ( ( transition : Transition ) => void ) ;
160- // type
163+ /** type */
161164 t : typeof ROOT_BLOCK ;
162165} ;
163166
164167export type IfBlock = {
165- // current
168+ /** current */
166169 c : boolean ;
167- // dom
170+ /** dom */
168171 d : null | TemplateNode | Array < TemplateNode > ;
169- // effect
172+ /** effect */
170173 e : null | ComputationSignal ;
171- // parent
174+ /** parent */
172175 p : Block ;
173- // transition
176+ /** transition */
174177 r : null | ( ( transition : Transition ) => void ) ;
175- // type
178+ /** type */
176179 t : typeof IF_BLOCK ;
177180} ;
178181
179182export type KeyBlock = {
180- // dom
183+ /** dom */
181184 d : null | TemplateNode | Array < TemplateNode > ;
182- // effect
185+ /** effect */
183186 e : null | ComputationSignal ;
184- // parent
187+ /** parent */
185188 p : Block ;
186- // transition
189+ /** transition */
187190 r : null | ( ( transition : Transition ) => void ) ;
188- // type
191+ /** type */
189192 t : typeof KEY_BLOCK ;
190193} ;
191194
192195export type HeadBlock = {
193- // dom
196+ /** dom */
194197 d : null | TemplateNode | Array < TemplateNode > ;
195- // effect
198+ /** effect */
196199 e : null | ComputationSignal ;
197- // parent
200+ /** parent */
198201 p : Block ;
199- // transition
202+ /** transition */
200203 r : null | ( ( transition : Transition ) => void ) ;
201- // type
204+ /** type */
202205 t : typeof HEAD_BLOCK ;
203206} ;
204207
205208export type DynamicElementBlock = {
206- // dom
209+ /** dom */
207210 d : null | TemplateNode | Array < TemplateNode > ;
208- // effect
211+ /** effect */
209212 e : null | ComputationSignal ;
210- // parent
213+ /** parent */
211214 p : Block ;
212- // transition
215+ /** transition */
213216 r : null | ( ( transition : Transition ) => void ) ;
214- // type
217+ /** type */
215218 t : typeof DYNAMIC_ELEMENT_BLOCK ;
216219} ;
217220
218221export type DynamicComponentBlock = {
219- // dom
222+ /** dom */
220223 d : null | TemplateNode | Array < TemplateNode > ;
221- // effect
224+ /** effect */
222225 e : null | ComputationSignal ;
223- // parent
226+ /** parent */
224227 p : Block ;
225- // transition
228+ /** transition */
226229 r : null | ( ( transition : Transition ) => void ) ;
227- // type
230+ /** type */
228231 t : typeof DYNAMIC_COMPONENT_BLOCK ;
229232} ;
230233
231234export type AwaitBlock = {
232- // dom
235+ /** dom */
233236 d : null | TemplateNode | Array < TemplateNode > ;
234- // effect
237+ /** effect */
235238 e : null | ComputationSignal ;
236- // parent
239+ /** parent */
237240 p : Block ;
238- // pending
241+ /** pending */
239242 n : boolean ;
240- // transition
243+ /** transition */
241244 r : null | ( ( transition : Transition ) => void ) ;
242- // type
245+ /** type */
243246 t : typeof AWAIT_BLOCK ;
244247} ;
245248
246249export type EachBlock = {
247- // anchor
250+ /** anchor */
248251 a : Element | Comment ;
249- // flags
252+ /** flags */
250253 f : number ;
251- // dom
254+ /** dom */
252255 d : null | TemplateNode | Array < TemplateNode > ;
253- // items
256+ /** items */
254257 v : EachItemBlock [ ] ;
255- // effect
258+ /** effewct */
256259 e : null | ComputationSignal ;
257- // parent
260+ /** parent */
258261 p : Block ;
259- // transition
262+ /** transition */
260263 r : null | ( ( transition : Transition ) => void ) ;
261- // transitions
264+ /** transitions */
262265 s : Array < EachItemBlock > ;
263- // type
266+ /** type */
264267 t : typeof EACH_BLOCK ;
265268} ;
266269
267270export type EachItemBlock = {
268- // dom
271+ /** dom */
269272 d : null | TemplateNode | Array < TemplateNode > ;
270- // effect
273+ /** effect */
271274 e : null | ComputationSignal ;
272- // item
275+ /** item */
273276 v : any | Signal < any > ;
274- // index
277+ /** index */
275278 i : number | Signal < number > ;
276- // key
279+ /** key */
277280 k : unknown ;
278- // parent
281+ /** parent */
279282 p : EachBlock ;
280- // transition
283+ /** transition */
281284 r : null | ( ( transition : Transition ) => void ) ;
282- // transitions
285+ /** transitions */
283286 s : null | Set < Transition > ;
284- // type
287+ /** type */
285288 t : typeof EACH_ITEM_BLOCK ;
286289} ;
287290
288291export type SnippetBlock = {
289- // dom
292+ /** dom */
290293 d : null | TemplateNode | Array < TemplateNode > ;
291- // parent
294+ /** parent */
292295 p : Block ;
293- // effect
296+ /** effect */
294297 e : null | ComputationSignal ;
295- // transition
298+ /** transition */
296299 r : null ;
297- // type
300+ /** type */
298301 t : typeof SNIPPET_BLOCK ;
299302} ;
300303
@@ -344,13 +347,13 @@ export type StoreReferencesContainer = Record<
344347export type ActionPayload < P > = { destroy ?: ( ) => void ; update ?: ( value : P ) => void } ;
345348
346349export type Render = {
347- // dom
350+ /** dom */
348351 d : null | TemplateNode | Array < TemplateNode > ;
349- // effect
352+ /** effect */
350353 e : null | EffectSignal ;
351- // transitions
354+ /** transitions */
352355 s : Set < Transition > ;
353- // prev
356+ /** prev */
354357 p : Render | null ;
355358} ;
356359
0 commit comments