brumate 0.6.0 → 0.6.1

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.
Files changed (45) hide show
  1. package/dist/{boot-CMvhoWRu.d.ts → boot-DkbcqdUz.d.ts} +2 -2
  2. package/dist/cli.js +2 -2
  3. package/dist/{client-eVI8Wc95.js → client-C3vRNuLi.js} +186 -78
  4. package/dist/client-C3vRNuLi.js.map +1 -0
  5. package/dist/{client-C4kNKGwH.d.ts → client-CqGDbWd_.d.ts} +29 -5
  6. package/dist/{defer-pKO0S6UT.js → defer-M18UKyfG.js} +2 -2
  7. package/dist/{defer-pKO0S6UT.js.map → defer-M18UKyfG.js.map} +1 -1
  8. package/dist/{devtools-DqqqdI4b.js → devtools-YnvrZ6D8.js} +4 -4
  9. package/dist/{devtools-DqqqdI4b.js.map → devtools-YnvrZ6D8.js.map} +1 -1
  10. package/dist/{devtools-panel--GYjFZ35.js → devtools-panel-DRcKclEG.js} +2 -2
  11. package/dist/{devtools-panel--GYjFZ35.js.map → devtools-panel-DRcKclEG.js.map} +1 -1
  12. package/dist/{files-CR-V05xd.js → files-HzPDUyTY.js} +2 -2
  13. package/dist/{files-CR-V05xd.js.map → files-HzPDUyTY.js.map} +1 -1
  14. package/dist/index.js +1 -1
  15. package/dist/{inspect-ddfGeww0.js → inspect-Q5W0A66e.js} +241 -66
  16. package/dist/inspect-Q5W0A66e.js.map +1 -0
  17. package/dist/{loader-CQkAXO0g.js → loader-C-S3yzep.js} +4 -4
  18. package/dist/{loader-CQkAXO0g.js.map → loader-C-S3yzep.js.map} +1 -1
  19. package/dist/{navigate-BcV1qkkx.js → navigate-r23FFR6e.js} +5 -2
  20. package/dist/{navigate-BcV1qkkx.js.map → navigate-r23FFR6e.js.map} +1 -1
  21. package/dist/{rpc-BgYnfg_a.js → rpc-C_znDZ_w.js} +2 -2
  22. package/dist/{rpc-BgYnfg_a.js.map → rpc-C_znDZ_w.js.map} +1 -1
  23. package/dist/runtime/bundles.d.ts +1 -1
  24. package/dist/runtime/client.d.ts +2 -2
  25. package/dist/runtime/client.js +2 -2
  26. package/dist/runtime/devtools.d.ts +1 -1
  27. package/dist/runtime/devtools.js +1 -1
  28. package/dist/runtime/hot.d.ts +1 -1
  29. package/dist/runtime/loader.d.ts +2 -2
  30. package/dist/runtime/loader.js +2 -2
  31. package/dist/runtime/static-loader.d.ts +2 -2
  32. package/dist/runtime/static-loader.js +1 -1
  33. package/dist/runtime/testing.d.ts +1 -1
  34. package/dist/runtime/testing.js +1 -1
  35. package/dist/{static-loader-DCxASuzA.js → static-loader-Bt2WDkY1.js} +2 -2
  36. package/dist/{static-loader-DCxASuzA.js.map → static-loader-Bt2WDkY1.js.map} +1 -1
  37. package/dist/{static-loader-CGthkX0s.d.ts → static-loader-DysAET-w.d.ts} +2 -2
  38. package/dist/vite.d.ts +1 -1
  39. package/dist/vite.js +3 -3
  40. package/dist/vite.js.map +1 -1
  41. package/elements.d.ts +8 -2
  42. package/package.json +1 -1
  43. package/skills/brumate/references/errors.md +14 -0
  44. package/dist/client-eVI8Wc95.js.map +0 -1
  45. 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
- /** The handlers of an element: `onClick` for `click`, and `onKeyDown` for `keydown`. */
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
- [K in keyof ElementEvents & string as `on${EventWord<K>}`]?: Handler<ElementEvents[K], E>;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brumate",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "A component language and compiler for resumable web apps",
5
5
  "homepage": "https://github.com/lxsmnsyc/brumate",
6
6
  "bugs": "https://github.com/lxsmnsyc/brumate/issues",
@@ -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.