creo 0.2.5 → 0.2.7
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/AGENTS.md +156 -0
- package/CHANGELOG.md +138 -0
- package/README.md +4 -2
- package/dist/functional/key.d.ts +0 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +293 -146
- package/dist/index.js.map +15 -15
- package/dist/internal/internal_view.d.ts +10 -1
- package/dist/public/primitive.d.ts +9 -10
- package/dist/public/primitives/primitives.d.ts +341 -111
- package/dist/public/state.d.ts +6 -0
- package/dist/public/view.d.ts +27 -12
- package/dist/render/html_render.d.ts +8 -0
- package/dist/render/render_interface.d.ts +14 -0
- package/dist/render/string_render.d.ts +0 -2
- package/docs/create-app.md +110 -0
- package/docs/events.md +236 -0
- package/docs/getting-started.md +201 -0
- package/docs/how-to/data-fetching.md +155 -0
- package/docs/how-to/deploy-vercel.md +130 -0
- package/docs/how-to/router.md +111 -0
- package/docs/how-to/styles.md +124 -0
- package/docs/how-to/suspense.md +116 -0
- package/docs/index.md +66 -0
- package/docs/lifecycle.md +173 -0
- package/docs/primitives.md +195 -0
- package/docs/renderers.md +183 -0
- package/docs/state.md +131 -0
- package/docs/store.md +135 -0
- package/docs/view.md +205 -0
- package/package.json +5 -2
- package/dist/public/event_handle.d.ts +0 -32
- package/dist/render/canvas_render.d.ts +0 -1
- package/dist/render/stream_render.d.ts +0 -1
- package/dist/structures/indexed_list.d.ts +0 -46
- package/dist/structures/list.d.ts +0 -68
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type PublicView, type ViewFn } from "../view";
|
|
1
|
+
import { type PublicView, type Ref, type ViewFn } from "../view";
|
|
3
2
|
export type BaseEventData = {
|
|
4
3
|
stopPropagation: () => void;
|
|
5
4
|
preventDefault: () => void;
|
|
@@ -7,6 +6,19 @@ export type BaseEventData = {
|
|
|
7
6
|
export type PointerEventData = BaseEventData & {
|
|
8
7
|
x: number;
|
|
9
8
|
y: number;
|
|
9
|
+
/** Pointer ID — pass to setPointerCapture. */
|
|
10
|
+
pointerId: number;
|
|
11
|
+
pointerType: "mouse" | "touch" | "pen" | "";
|
|
12
|
+
button: number;
|
|
13
|
+
buttons: number;
|
|
14
|
+
target: HTMLElement;
|
|
15
|
+
/** The element the handler is bound to (handles event delegation correctly). */
|
|
16
|
+
currentTarget: HTMLElement;
|
|
17
|
+
/** Capture the pointer to currentTarget — keeps move/up firing when the pointer leaves bounds. */
|
|
18
|
+
capture: () => void;
|
|
19
|
+
release: () => void;
|
|
20
|
+
/** Escape hatch — the underlying DOM event. Avoid where the typed fields cover the use case. */
|
|
21
|
+
nativeEvent: Event;
|
|
10
22
|
};
|
|
11
23
|
export type KeyEventData = BaseEventData & {
|
|
12
24
|
key: string;
|
|
@@ -41,8 +53,7 @@ export type ContainerEvents = {
|
|
|
41
53
|
pointerDown: (e: PointerEventData) => void;
|
|
42
54
|
pointerUp: (e: PointerEventData) => void;
|
|
43
55
|
pointerMove: (e: PointerEventData) => void;
|
|
44
|
-
|
|
45
|
-
mouseLeave: (e: PointerEventData) => void;
|
|
56
|
+
pointerCancel: (e: PointerEventData) => void;
|
|
46
57
|
pointerEnter: (e: PointerEventData) => void;
|
|
47
58
|
pointerLeave: (e: PointerEventData) => void;
|
|
48
59
|
keyDown: (e: KeyEventData) => void;
|
|
@@ -88,67 +99,150 @@ export type HtmlAttrs = {
|
|
|
88
99
|
hidden?: boolean;
|
|
89
100
|
role?: string;
|
|
90
101
|
draggable?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Set with the underlying DOM element after mount, and with `null` after
|
|
104
|
+
* unmount. Accepts either a callback or a `{ current }` ref object
|
|
105
|
+
*/
|
|
106
|
+
ref?: Ref<Element>;
|
|
91
107
|
[attr: string]: unknown;
|
|
92
108
|
};
|
|
93
|
-
export declare function html<Attrs extends HtmlAttrs = HtmlAttrs, Events = ContainerEvents>(tag: string): PublicView<Attrs &
|
|
109
|
+
export declare function html<Attrs extends HtmlAttrs = HtmlAttrs, Events = ContainerEvents>(tag: string): PublicView<Attrs & {
|
|
110
|
+
on?: Partial<Events>;
|
|
111
|
+
}, Element>;
|
|
94
112
|
export declare const textViewFn: ViewFn<string | number, void>;
|
|
95
113
|
export declare function text(content: string | number): void;
|
|
96
|
-
export declare const div: PublicView<HtmlAttrs &
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
export declare const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
export declare const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
export declare const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
export declare const
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
export declare const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
export declare const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
export declare const
|
|
118
|
-
|
|
114
|
+
export declare const div: PublicView<HtmlAttrs & {
|
|
115
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
116
|
+
}, Element>;
|
|
117
|
+
export declare const span: PublicView<HtmlAttrs & {
|
|
118
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
119
|
+
}, Element>;
|
|
120
|
+
export declare const section: PublicView<HtmlAttrs & {
|
|
121
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
122
|
+
}, Element>;
|
|
123
|
+
export declare const article: PublicView<HtmlAttrs & {
|
|
124
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
125
|
+
}, Element>;
|
|
126
|
+
export declare const aside: PublicView<HtmlAttrs & {
|
|
127
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
128
|
+
}, Element>;
|
|
129
|
+
export declare const nav: PublicView<HtmlAttrs & {
|
|
130
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
131
|
+
}, Element>;
|
|
132
|
+
export declare const header: PublicView<HtmlAttrs & {
|
|
133
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
134
|
+
}, Element>;
|
|
135
|
+
export declare const footer: PublicView<HtmlAttrs & {
|
|
136
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
137
|
+
}, Element>;
|
|
138
|
+
export declare const main: PublicView<HtmlAttrs & {
|
|
139
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
140
|
+
}, Element>;
|
|
141
|
+
export declare const p: PublicView<HtmlAttrs & {
|
|
142
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
143
|
+
}, Element>;
|
|
144
|
+
export declare const h1: PublicView<HtmlAttrs & {
|
|
145
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
146
|
+
}, Element>;
|
|
147
|
+
export declare const h2: PublicView<HtmlAttrs & {
|
|
148
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
149
|
+
}, Element>;
|
|
150
|
+
export declare const h3: PublicView<HtmlAttrs & {
|
|
151
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
152
|
+
}, Element>;
|
|
153
|
+
export declare const h4: PublicView<HtmlAttrs & {
|
|
154
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
155
|
+
}, Element>;
|
|
156
|
+
export declare const h5: PublicView<HtmlAttrs & {
|
|
157
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
158
|
+
}, Element>;
|
|
159
|
+
export declare const h6: PublicView<HtmlAttrs & {
|
|
160
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
161
|
+
}, Element>;
|
|
162
|
+
export declare const pre: PublicView<HtmlAttrs & {
|
|
163
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
164
|
+
}, Element>;
|
|
165
|
+
export declare const code: PublicView<HtmlAttrs & {
|
|
166
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
167
|
+
}, Element>;
|
|
168
|
+
export declare const em: PublicView<HtmlAttrs & {
|
|
169
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
170
|
+
}, Element>;
|
|
171
|
+
export declare const strong: PublicView<HtmlAttrs & {
|
|
172
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
173
|
+
}, Element>;
|
|
174
|
+
export declare const small: PublicView<HtmlAttrs & {
|
|
175
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
176
|
+
}, Element>;
|
|
177
|
+
export declare const br: PublicView<HtmlAttrs & {
|
|
178
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
179
|
+
}, Element>;
|
|
180
|
+
export declare const hr: PublicView<HtmlAttrs & {
|
|
181
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
182
|
+
}, Element>;
|
|
119
183
|
export declare const a: PublicView<HtmlAttrs & {
|
|
120
184
|
href?: string;
|
|
121
185
|
target?: string;
|
|
122
|
-
} &
|
|
123
|
-
|
|
186
|
+
} & {
|
|
187
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
188
|
+
}, Element>;
|
|
189
|
+
export declare const blockquote: PublicView<HtmlAttrs & {
|
|
190
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
191
|
+
}, Element>;
|
|
124
192
|
export declare const label: PublicView<HtmlAttrs & {
|
|
125
193
|
for?: string;
|
|
126
|
-
} &
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
export declare const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
export declare const
|
|
133
|
-
|
|
134
|
-
|
|
194
|
+
} & {
|
|
195
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
196
|
+
}, Element>;
|
|
197
|
+
export declare const ul: PublicView<HtmlAttrs & {
|
|
198
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
199
|
+
}, Element>;
|
|
200
|
+
export declare const ol: PublicView<HtmlAttrs & {
|
|
201
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
202
|
+
}, Element>;
|
|
203
|
+
export declare const li: PublicView<HtmlAttrs & {
|
|
204
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
205
|
+
}, Element>;
|
|
206
|
+
export declare const table: PublicView<HtmlAttrs & {
|
|
207
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
208
|
+
}, Element>;
|
|
209
|
+
export declare const thead: PublicView<HtmlAttrs & {
|
|
210
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
211
|
+
}, Element>;
|
|
212
|
+
export declare const tbody: PublicView<HtmlAttrs & {
|
|
213
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
214
|
+
}, Element>;
|
|
215
|
+
export declare const tfoot: PublicView<HtmlAttrs & {
|
|
216
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
217
|
+
}, Element>;
|
|
218
|
+
export declare const tr: PublicView<HtmlAttrs & {
|
|
219
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
220
|
+
}, Element>;
|
|
135
221
|
export declare const th: PublicView<HtmlAttrs & {
|
|
136
222
|
colspan?: number;
|
|
137
223
|
rowspan?: number;
|
|
138
224
|
scope?: string;
|
|
139
|
-
} &
|
|
225
|
+
} & {
|
|
226
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
227
|
+
}, Element>;
|
|
140
228
|
export declare const td: PublicView<HtmlAttrs & {
|
|
141
229
|
colspan?: number;
|
|
142
230
|
rowspan?: number;
|
|
143
|
-
} &
|
|
231
|
+
} & {
|
|
232
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
233
|
+
}, Element>;
|
|
144
234
|
export declare const form: PublicView<HtmlAttrs & {
|
|
145
235
|
action?: string;
|
|
146
236
|
method?: string;
|
|
147
|
-
} &
|
|
237
|
+
} & {
|
|
238
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
239
|
+
}, Element>;
|
|
148
240
|
export declare const button: PublicView<HtmlAttrs & {
|
|
149
241
|
disabled?: boolean;
|
|
150
242
|
type?: string;
|
|
151
|
-
} &
|
|
243
|
+
} & {
|
|
244
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
245
|
+
}, Element>;
|
|
152
246
|
export declare const input: PublicView<HtmlAttrs & {
|
|
153
247
|
type?: string;
|
|
154
248
|
value?: string;
|
|
@@ -163,7 +257,9 @@ export declare const input: PublicView<HtmlAttrs & {
|
|
|
163
257
|
pattern?: string;
|
|
164
258
|
required?: boolean;
|
|
165
259
|
autofocus?: boolean;
|
|
166
|
-
} &
|
|
260
|
+
} & {
|
|
261
|
+
on?: Partial<FormEvents> | undefined;
|
|
262
|
+
}, Element>;
|
|
167
263
|
export declare const textarea: PublicView<HtmlAttrs & {
|
|
168
264
|
value?: string;
|
|
169
265
|
placeholder?: string;
|
|
@@ -173,29 +269,41 @@ export declare const textarea: PublicView<HtmlAttrs & {
|
|
|
173
269
|
cols?: number;
|
|
174
270
|
name?: string;
|
|
175
271
|
required?: boolean;
|
|
176
|
-
} &
|
|
272
|
+
} & {
|
|
273
|
+
on?: Partial<FormEvents> | undefined;
|
|
274
|
+
}, Element>;
|
|
177
275
|
export declare const select: PublicView<HtmlAttrs & {
|
|
178
276
|
value?: string;
|
|
179
277
|
disabled?: boolean;
|
|
180
278
|
name?: string;
|
|
181
279
|
multiple?: boolean;
|
|
182
280
|
required?: boolean;
|
|
183
|
-
} &
|
|
281
|
+
} & {
|
|
282
|
+
on?: Partial<FormEvents> | undefined;
|
|
283
|
+
}, Element>;
|
|
184
284
|
export declare const option: PublicView<HtmlAttrs & {
|
|
185
285
|
value?: string;
|
|
186
286
|
selected?: boolean;
|
|
187
287
|
disabled?: boolean;
|
|
188
|
-
} &
|
|
288
|
+
} & {
|
|
289
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
290
|
+
}, Element>;
|
|
189
291
|
export declare const fieldset: PublicView<HtmlAttrs & {
|
|
190
292
|
disabled?: boolean;
|
|
191
|
-
} &
|
|
192
|
-
|
|
293
|
+
} & {
|
|
294
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
295
|
+
}, Element>;
|
|
296
|
+
export declare const legend: PublicView<HtmlAttrs & {
|
|
297
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
298
|
+
}, Element>;
|
|
193
299
|
export declare const img: PublicView<HtmlAttrs & {
|
|
194
300
|
src: string;
|
|
195
301
|
alt?: string;
|
|
196
302
|
width?: number;
|
|
197
303
|
height?: number;
|
|
198
|
-
} &
|
|
304
|
+
} & {
|
|
305
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
306
|
+
}, Element>;
|
|
199
307
|
export declare const video: PublicView<HtmlAttrs & {
|
|
200
308
|
src?: string;
|
|
201
309
|
controls?: boolean;
|
|
@@ -204,30 +312,46 @@ export declare const video: PublicView<HtmlAttrs & {
|
|
|
204
312
|
muted?: boolean;
|
|
205
313
|
width?: number;
|
|
206
314
|
height?: number;
|
|
207
|
-
} &
|
|
315
|
+
} & {
|
|
316
|
+
on?: Partial<MediaEvents> | undefined;
|
|
317
|
+
}, Element>;
|
|
208
318
|
export declare const audio: PublicView<HtmlAttrs & {
|
|
209
319
|
src?: string;
|
|
210
320
|
controls?: boolean;
|
|
211
321
|
autoplay?: boolean;
|
|
212
322
|
loop?: boolean;
|
|
213
323
|
muted?: boolean;
|
|
214
|
-
} &
|
|
324
|
+
} & {
|
|
325
|
+
on?: Partial<MediaEvents> | undefined;
|
|
326
|
+
}, Element>;
|
|
215
327
|
export declare const canvas: PublicView<HtmlAttrs & {
|
|
216
328
|
width?: number;
|
|
217
329
|
height?: number;
|
|
218
|
-
} &
|
|
330
|
+
} & {
|
|
331
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
332
|
+
}, Element>;
|
|
219
333
|
export declare const source: PublicView<HtmlAttrs & {
|
|
220
334
|
src?: string;
|
|
221
335
|
type?: string;
|
|
222
|
-
} &
|
|
336
|
+
} & {
|
|
337
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
338
|
+
}, Element>;
|
|
223
339
|
export declare const details: PublicView<HtmlAttrs & {
|
|
224
340
|
open?: boolean;
|
|
225
|
-
} &
|
|
226
|
-
|
|
341
|
+
} & {
|
|
342
|
+
on?: Partial<DisclosureEvents> | undefined;
|
|
343
|
+
}, Element>;
|
|
344
|
+
export declare const summary: PublicView<HtmlAttrs & {
|
|
345
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
346
|
+
}, Element>;
|
|
227
347
|
export declare const dialog: PublicView<HtmlAttrs & {
|
|
228
348
|
open?: boolean;
|
|
229
|
-
} &
|
|
230
|
-
|
|
349
|
+
} & {
|
|
350
|
+
on?: Partial<DisclosureEvents> | undefined;
|
|
351
|
+
}, Element>;
|
|
352
|
+
export declare const menu: PublicView<HtmlAttrs & {
|
|
353
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
354
|
+
}, Element>;
|
|
231
355
|
export declare const iframe: PublicView<HtmlAttrs & {
|
|
232
356
|
src?: string;
|
|
233
357
|
width?: number;
|
|
@@ -236,103 +360,191 @@ export declare const iframe: PublicView<HtmlAttrs & {
|
|
|
236
360
|
allow?: string;
|
|
237
361
|
loading?: string;
|
|
238
362
|
referrerpolicy?: string;
|
|
239
|
-
} &
|
|
363
|
+
} & {
|
|
364
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
365
|
+
}, Element>;
|
|
240
366
|
export declare const embed: PublicView<HtmlAttrs & {
|
|
241
367
|
src?: string;
|
|
242
368
|
type?: string;
|
|
243
369
|
width?: number;
|
|
244
370
|
height?: number;
|
|
245
|
-
} &
|
|
371
|
+
} & {
|
|
372
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
373
|
+
}, Element>;
|
|
246
374
|
export declare const object: PublicView<HtmlAttrs & {
|
|
247
375
|
data?: string;
|
|
248
376
|
type?: string;
|
|
249
377
|
width?: number;
|
|
250
378
|
height?: number;
|
|
251
379
|
name?: string;
|
|
252
|
-
} &
|
|
253
|
-
|
|
380
|
+
} & {
|
|
381
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
382
|
+
}, Element>;
|
|
383
|
+
export declare const picture: PublicView<HtmlAttrs & {
|
|
384
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
385
|
+
}, Element>;
|
|
254
386
|
export declare const portal: PublicView<HtmlAttrs & {
|
|
255
387
|
src?: string;
|
|
256
|
-
} &
|
|
388
|
+
} & {
|
|
389
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
390
|
+
}, Element>;
|
|
257
391
|
export declare const svg: PublicView<HtmlAttrs & {
|
|
258
392
|
viewBox?: string;
|
|
259
393
|
xmlns?: string;
|
|
260
394
|
width?: number | string;
|
|
261
395
|
height?: number | string;
|
|
262
396
|
fill?: string;
|
|
263
|
-
} &
|
|
397
|
+
} & {
|
|
398
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
399
|
+
}, Element>;
|
|
264
400
|
export declare const script: PublicView<HtmlAttrs & {
|
|
265
401
|
src?: string;
|
|
266
402
|
type?: string;
|
|
267
403
|
async?: boolean;
|
|
268
404
|
defer?: boolean;
|
|
269
|
-
} &
|
|
270
|
-
|
|
271
|
-
|
|
405
|
+
} & {
|
|
406
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
407
|
+
}, Element>;
|
|
408
|
+
export declare const noscript: PublicView<HtmlAttrs & {
|
|
409
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
410
|
+
}, Element>;
|
|
411
|
+
export declare const template: PublicView<HtmlAttrs & {
|
|
412
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
413
|
+
}, Element>;
|
|
272
414
|
export declare const slot: PublicView<HtmlAttrs & {
|
|
273
415
|
name?: string;
|
|
274
|
-
} &
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
export declare const
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
export declare const
|
|
416
|
+
} & {
|
|
417
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
418
|
+
}, Element>;
|
|
419
|
+
export declare const address: PublicView<HtmlAttrs & {
|
|
420
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
421
|
+
}, Element>;
|
|
422
|
+
export declare const hgroup: PublicView<HtmlAttrs & {
|
|
423
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
424
|
+
}, Element>;
|
|
425
|
+
export declare const search: PublicView<HtmlAttrs & {
|
|
426
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
427
|
+
}, Element>;
|
|
428
|
+
export declare const abbr: PublicView<HtmlAttrs & {
|
|
429
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
430
|
+
}, Element>;
|
|
431
|
+
export declare const b: PublicView<HtmlAttrs & {
|
|
432
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
433
|
+
}, Element>;
|
|
434
|
+
export declare const bdi: PublicView<HtmlAttrs & {
|
|
435
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
436
|
+
}, Element>;
|
|
281
437
|
export declare const bdo: PublicView<HtmlAttrs & {
|
|
282
438
|
dir?: string;
|
|
283
|
-
} &
|
|
284
|
-
|
|
439
|
+
} & {
|
|
440
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
441
|
+
}, Element>;
|
|
442
|
+
export declare const cite: PublicView<HtmlAttrs & {
|
|
443
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
444
|
+
}, Element>;
|
|
285
445
|
export declare const data: PublicView<HtmlAttrs & {
|
|
286
446
|
value?: string;
|
|
287
|
-
} &
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
export declare const
|
|
291
|
-
|
|
447
|
+
} & {
|
|
448
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
449
|
+
}, Element>;
|
|
450
|
+
export declare const dfn: PublicView<HtmlAttrs & {
|
|
451
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
452
|
+
}, Element>;
|
|
453
|
+
export declare const i: PublicView<HtmlAttrs & {
|
|
454
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
455
|
+
}, Element>;
|
|
456
|
+
export declare const kbd: PublicView<HtmlAttrs & {
|
|
457
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
458
|
+
}, Element>;
|
|
459
|
+
export declare const mark: PublicView<HtmlAttrs & {
|
|
460
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
461
|
+
}, Element>;
|
|
292
462
|
export declare const q: PublicView<HtmlAttrs & {
|
|
293
463
|
cite?: string;
|
|
294
|
-
} &
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
export declare const
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
export declare const
|
|
301
|
-
|
|
464
|
+
} & {
|
|
465
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
466
|
+
}, Element>;
|
|
467
|
+
export declare const rp: PublicView<HtmlAttrs & {
|
|
468
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
469
|
+
}, Element>;
|
|
470
|
+
export declare const rt: PublicView<HtmlAttrs & {
|
|
471
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
472
|
+
}, Element>;
|
|
473
|
+
export declare const ruby: PublicView<HtmlAttrs & {
|
|
474
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
475
|
+
}, Element>;
|
|
476
|
+
export declare const s: PublicView<HtmlAttrs & {
|
|
477
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
478
|
+
}, Element>;
|
|
479
|
+
export declare const samp: PublicView<HtmlAttrs & {
|
|
480
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
481
|
+
}, Element>;
|
|
482
|
+
export declare const sub: PublicView<HtmlAttrs & {
|
|
483
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
484
|
+
}, Element>;
|
|
485
|
+
export declare const sup: PublicView<HtmlAttrs & {
|
|
486
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
487
|
+
}, Element>;
|
|
302
488
|
export declare const time: PublicView<HtmlAttrs & {
|
|
303
489
|
datetime?: string;
|
|
304
|
-
} &
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
export declare const
|
|
490
|
+
} & {
|
|
491
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
492
|
+
}, Element>;
|
|
493
|
+
export declare const u: PublicView<HtmlAttrs & {
|
|
494
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
495
|
+
}, Element>;
|
|
496
|
+
export declare const varEl: PublicView<HtmlAttrs & {
|
|
497
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
498
|
+
}, Element>;
|
|
499
|
+
export declare const wbr: PublicView<HtmlAttrs & {
|
|
500
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
501
|
+
}, Element>;
|
|
308
502
|
export declare const del: PublicView<HtmlAttrs & {
|
|
309
503
|
cite?: string;
|
|
310
504
|
datetime?: string;
|
|
311
|
-
} &
|
|
505
|
+
} & {
|
|
506
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
507
|
+
}, Element>;
|
|
312
508
|
export declare const ins: PublicView<HtmlAttrs & {
|
|
313
509
|
cite?: string;
|
|
314
510
|
datetime?: string;
|
|
315
|
-
} &
|
|
316
|
-
|
|
511
|
+
} & {
|
|
512
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
513
|
+
}, Element>;
|
|
514
|
+
export declare const caption: PublicView<HtmlAttrs & {
|
|
515
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
516
|
+
}, Element>;
|
|
317
517
|
export declare const colgroup: PublicView<HtmlAttrs & {
|
|
318
518
|
span?: number;
|
|
319
|
-
} &
|
|
519
|
+
} & {
|
|
520
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
521
|
+
}, Element>;
|
|
320
522
|
export declare const col: PublicView<HtmlAttrs & {
|
|
321
523
|
span?: number;
|
|
322
|
-
} &
|
|
323
|
-
|
|
524
|
+
} & {
|
|
525
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
526
|
+
}, Element>;
|
|
527
|
+
export declare const datalist: PublicView<HtmlAttrs & {
|
|
528
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
529
|
+
}, Element>;
|
|
324
530
|
export declare const optgroup: PublicView<HtmlAttrs & {
|
|
325
531
|
label?: string;
|
|
326
532
|
disabled?: boolean;
|
|
327
|
-
} &
|
|
533
|
+
} & {
|
|
534
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
535
|
+
}, Element>;
|
|
328
536
|
export declare const output: PublicView<HtmlAttrs & {
|
|
329
537
|
for?: string;
|
|
330
538
|
name?: string;
|
|
331
|
-
} &
|
|
539
|
+
} & {
|
|
540
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
541
|
+
}, Element>;
|
|
332
542
|
export declare const progress: PublicView<HtmlAttrs & {
|
|
333
543
|
value?: number;
|
|
334
544
|
max?: number;
|
|
335
|
-
} &
|
|
545
|
+
} & {
|
|
546
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
547
|
+
}, Element>;
|
|
336
548
|
export declare const meter: PublicView<HtmlAttrs & {
|
|
337
549
|
value?: number;
|
|
338
550
|
min?: number;
|
|
@@ -340,26 +552,44 @@ export declare const meter: PublicView<HtmlAttrs & {
|
|
|
340
552
|
low?: number;
|
|
341
553
|
high?: number;
|
|
342
554
|
optimum?: number;
|
|
343
|
-
} &
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
export declare const
|
|
347
|
-
|
|
348
|
-
|
|
555
|
+
} & {
|
|
556
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
557
|
+
}, Element>;
|
|
558
|
+
export declare const figure: PublicView<HtmlAttrs & {
|
|
559
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
560
|
+
}, Element>;
|
|
561
|
+
export declare const figcaption: PublicView<HtmlAttrs & {
|
|
562
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
563
|
+
}, Element>;
|
|
564
|
+
export declare const dd: PublicView<HtmlAttrs & {
|
|
565
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
566
|
+
}, Element>;
|
|
567
|
+
export declare const dl: PublicView<HtmlAttrs & {
|
|
568
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
569
|
+
}, Element>;
|
|
570
|
+
export declare const dt: PublicView<HtmlAttrs & {
|
|
571
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
572
|
+
}, Element>;
|
|
349
573
|
export declare const track: PublicView<HtmlAttrs & {
|
|
350
574
|
src?: string;
|
|
351
575
|
kind?: string;
|
|
352
576
|
srclang?: string;
|
|
353
577
|
label?: string;
|
|
354
578
|
default?: boolean;
|
|
355
|
-
} &
|
|
579
|
+
} & {
|
|
580
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
581
|
+
}, Element>;
|
|
356
582
|
export declare const map: PublicView<HtmlAttrs & {
|
|
357
583
|
name?: string;
|
|
358
|
-
} &
|
|
584
|
+
} & {
|
|
585
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
586
|
+
}, Element>;
|
|
359
587
|
export declare const area: PublicView<HtmlAttrs & {
|
|
360
588
|
alt?: string;
|
|
361
589
|
coords?: string;
|
|
362
590
|
href?: string;
|
|
363
591
|
shape?: string;
|
|
364
592
|
target?: string;
|
|
365
|
-
} &
|
|
593
|
+
} & {
|
|
594
|
+
on?: Partial<ContainerEvents> | undefined;
|
|
595
|
+
}, Element>;
|
package/dist/public/state.d.ts
CHANGED
|
@@ -16,6 +16,12 @@ export interface Reactive<T> {
|
|
|
16
16
|
* count.get() // read current value
|
|
17
17
|
* count.set(5) // set immediately, schedule render
|
|
18
18
|
* count.update(n => n + 1) // update via fn, schedule render
|
|
19
|
+
*
|
|
20
|
+
* Async updates chain: a second `update` issued while a previous async
|
|
21
|
+
* update is still in flight runs against the previous update's result,
|
|
22
|
+
* not against the snapshot at issue time. `set` cancels any pending
|
|
23
|
+
* chain — its value becomes authoritative and in-flight links won't
|
|
24
|
+
* commit afterwards.
|
|
19
25
|
*/
|
|
20
26
|
export declare class State<T> implements Reactive<T> {
|
|
21
27
|
#private;
|