brumate 0.6.0 → 0.6.2
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/dist/{boot-CMvhoWRu.d.ts → boot-DkbcqdUz.d.ts} +2 -2
- package/dist/cli.js +2 -2
- package/dist/{client-eVI8Wc95.js → client-C3vRNuLi.js} +186 -78
- package/dist/client-C3vRNuLi.js.map +1 -0
- package/dist/{client-C4kNKGwH.d.ts → client-CqGDbWd_.d.ts} +29 -5
- package/dist/{defer-pKO0S6UT.js → defer-M18UKyfG.js} +2 -2
- package/dist/{defer-pKO0S6UT.js.map → defer-M18UKyfG.js.map} +1 -1
- package/dist/{devtools-DqqqdI4b.js → devtools-D9Q7a41M.js} +34 -24
- package/dist/devtools-D9Q7a41M.js.map +1 -0
- package/dist/{devtools-panel--GYjFZ35.js → devtools-panel-DTQtljeA.js} +2 -2
- package/dist/{devtools-panel--GYjFZ35.js.map → devtools-panel-DTQtljeA.js.map} +1 -1
- package/dist/{files-CR-V05xd.js → files-DtDH5AR4.js} +2 -2
- package/dist/{files-CR-V05xd.js.map → files-DtDH5AR4.js.map} +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -1
- package/dist/{inspect-ddfGeww0.js → inspect-Bonq6EJO.js} +338 -69
- package/dist/inspect-Bonq6EJO.js.map +1 -0
- package/dist/{loader-CQkAXO0g.js → loader-C-S3yzep.js} +4 -4
- package/dist/{loader-CQkAXO0g.js.map → loader-C-S3yzep.js.map} +1 -1
- package/dist/{navigate-BcV1qkkx.js → navigate-r23FFR6e.js} +5 -2
- package/dist/{navigate-BcV1qkkx.js.map → navigate-r23FFR6e.js.map} +1 -1
- package/dist/{rpc-BgYnfg_a.js → rpc-C_znDZ_w.js} +2 -2
- package/dist/{rpc-BgYnfg_a.js.map → rpc-C_znDZ_w.js.map} +1 -1
- package/dist/runtime/bundles.d.ts +1 -1
- package/dist/runtime/client.d.ts +2 -2
- package/dist/runtime/client.js +2 -2
- package/dist/runtime/devtools.d.ts +14 -1
- package/dist/runtime/devtools.js +2 -2
- package/dist/runtime/hot.d.ts +1 -1
- package/dist/runtime/loader.d.ts +2 -2
- package/dist/runtime/loader.js +2 -2
- package/dist/runtime/static-loader.d.ts +2 -2
- package/dist/runtime/static-loader.js +1 -1
- package/dist/runtime/testing.d.ts +1 -1
- package/dist/runtime/testing.js +1 -1
- package/dist/{static-loader-DCxASuzA.js → static-loader-Bt2WDkY1.js} +2 -2
- package/dist/{static-loader-DCxASuzA.js.map → static-loader-Bt2WDkY1.js.map} +1 -1
- package/dist/{static-loader-CGthkX0s.d.ts → static-loader-DysAET-w.d.ts} +2 -2
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +3 -3
- package/dist/vite.js.map +1 -1
- package/elements.d.ts +8 -2
- package/package.json +1 -1
- package/skills/brumate/references/errors.md +14 -0
- package/dist/client-eVI8Wc95.js.map +0 -1
- package/dist/devtools-DqqqdI4b.js.map +0 -1
- package/dist/inspect-ddfGeww0.js.map +0 -1
package/elements.d.ts
CHANGED
|
@@ -253,9 +253,15 @@ type EventWord<K extends string> = K extends keyof ElementEventNames
|
|
|
253
253
|
? ElementEventNames[K]
|
|
254
254
|
: Capitalize<K>;
|
|
255
255
|
|
|
256
|
-
/**
|
|
256
|
+
/**
|
|
257
|
+
* The handlers of an element: `onClick` for `click`, and `onKeyDown` for `keydown`. The `webkit*`
|
|
258
|
+
* names are left out: the browser fires them as `webkitAnimationEnd` and the like, and the
|
|
259
|
+
* compiler lower-cases a handler name. Use `onAnimationEnd` and `onTransitionEnd`.
|
|
260
|
+
*/
|
|
257
261
|
export type Handlers<E> = {
|
|
258
|
-
[
|
|
262
|
+
[
|
|
263
|
+
K in keyof ElementEvents & string as K extends `webkit${string}` ? never : `on${EventWord<K>}`
|
|
264
|
+
]?: Handler<ElementEvents[K], E>;
|
|
259
265
|
};
|
|
260
266
|
|
|
261
267
|
/** A value of an ARIA attribute that is `true` or `false`. The runtime writes both as words. */
|
package/package.json
CHANGED
|
@@ -259,6 +259,20 @@ https://brumate-docs.vercel.app/docs/errors#brm180
|
|
|
259
259
|
<input onKeyDown=(handle) onFocusOut=(handle) />
|
|
260
260
|
```
|
|
261
261
|
|
|
262
|
+
## BRM201: "{name}" cannot be a handler. {fix}
|
|
263
|
+
|
|
264
|
+
The event has capitals in its name, or the browser fires another name for it, and a handler name is lower-cased to the event. `onDOMContentLoaded` would listen to `domcontentloaded`, which the browser never fires, and page code loads after the HTML, mostly after `DOMContentLoaded`. Use the event that the message names, or `$client(fn, 'load')` to run code at load.
|
|
265
|
+
|
|
266
|
+
https://brumate-docs.vercel.app/docs/errors#brm201
|
|
267
|
+
|
|
268
|
+
```brm fragment
|
|
269
|
+
<script>
|
|
270
|
+
$client(() => {
|
|
271
|
+
start();
|
|
272
|
+
}, 'load');
|
|
273
|
+
</script>
|
|
274
|
+
```
|
|
275
|
+
|
|
262
276
|
## BRM186: "{name}" in the #loading header is not a memo that markup in the body reads. Name a $memo of the component or of a block script around the block
|
|
263
277
|
|
|
264
278
|
The header of `#loading (…)` names something other than a memo, or a memo that no markup in the body reads, so its loads would not show the fallback for that body.
|