brumate 0.4.3 → 0.5.0
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-D3NjfyUX.d.ts → boot-Difa0qdg.d.ts} +2 -8
- package/dist/cli.js +2 -2
- package/dist/{client-DNva05jp.d.ts → client-DvsU9qxG.d.ts} +107 -23
- package/dist/{client-AXNULmRZ.js → client-glvRglTB.js} +1000 -370
- package/dist/client-glvRglTB.js.map +1 -0
- package/dist/{defer-D3YMPgkX.js → defer-CNYYG-A5.js} +2 -2
- package/dist/{defer-D3YMPgkX.js.map → defer-CNYYG-A5.js.map} +1 -1
- package/dist/{devtools-BiP5fDiB.js → devtools-D8EioKXs.js} +4 -4
- package/dist/{devtools-BiP5fDiB.js.map → devtools-D8EioKXs.js.map} +1 -1
- package/dist/{devtools-panel-EQhLm39H.js → devtools-panel-BKmBqkau.js} +2 -2
- package/dist/{devtools-panel-EQhLm39H.js.map → devtools-panel-BKmBqkau.js.map} +1 -1
- package/dist/{features-CHY5Ekku.js → features-D5kLyihb.js} +19 -2
- package/dist/features-D5kLyihb.js.map +1 -0
- package/dist/{files-BUjvEO_o.js → files-ClQJlDcB.js} +2 -2
- package/dist/{files-BUjvEO_o.js.map → files-ClQJlDcB.js.map} +1 -1
- package/dist/index.d.ts +1 -8
- package/dist/index.js +1 -1
- package/dist/{inspect-BvPTZs6k.js → inspect-B8i6R3mZ.js} +877 -132
- package/dist/inspect-B8i6R3mZ.js.map +1 -0
- package/dist/{loader-DgMk6p9M.js → loader-DB0i9MwD.js} +4 -4
- package/dist/{loader-DgMk6p9M.js.map → loader-DB0i9MwD.js.map} +1 -1
- package/dist/{navigate-CfOr-TRF.js → navigate-BcV1qkkx.js} +2 -2
- package/dist/navigate-BcV1qkkx.js.map +1 -0
- package/dist/{produce-DS-dQaUX.js → produce-Cq6KKi7b.js} +2 -2
- package/dist/{produce-DS-dQaUX.js.map → produce-Cq6KKi7b.js.map} +1 -1
- package/dist/{rpc-Bxv7DYGe.js → rpc-BHlxmeWe.js} +5 -5
- package/dist/rpc-BHlxmeWe.js.map +1 -0
- package/dist/runtime/bundles.d.ts +9 -0
- package/dist/runtime/bundles.js +60 -0
- package/dist/runtime/bundles.js.map +1 -0
- package/dist/runtime/client.d.ts +2 -2
- package/dist/runtime/client.js +3 -3
- package/dist/runtime/devtools.d.ts +1 -1
- package/dist/runtime/devtools.js +1 -1
- 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/server.d.ts +3 -3
- package/dist/runtime/server.js +4 -4
- package/dist/runtime/static-loader.d.ts +2 -2
- package/dist/runtime/static-loader.js +1 -1
- package/dist/runtime/testing.d.ts +2 -2
- package/dist/runtime/testing.js +2 -2
- package/dist/{server-BXMH3Z9T.d.ts → server-CAwIqrXl.d.ts} +44 -5
- package/dist/{server-O_rC-RRL.js → server-Doy5HR7r.js} +106 -17
- package/dist/server-Doy5HR7r.js.map +1 -0
- package/dist/{static-loader-BiUaZaag.d.ts → static-loader-9Nc1GvF0.d.ts} +2 -2
- package/dist/{static-loader-U_x-ctJI.js → static-loader-D0ARlMxM.js} +3 -26
- package/dist/static-loader-D0ARlMxM.js.map +1 -0
- package/dist/{stream-JGRPr7u5.js → stream-BdhzvPQO.js} +2 -2
- package/dist/{stream-JGRPr7u5.js.map → stream-BdhzvPQO.js.map} +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +129 -51
- package/dist/vite.js.map +1 -1
- package/package.json +5 -1
- package/skills/brumate/references/errors.md +39 -5
- package/dist/client-AXNULmRZ.js.map +0 -1
- package/dist/features-CHY5Ekku.js.map +0 -1
- package/dist/inspect-BvPTZs6k.js.map +0 -1
- package/dist/navigate-CfOr-TRF.js.map +0 -1
- package/dist/rpc-Bxv7DYGe.js.map +0 -1
- package/dist/server-O_rC-RRL.js.map +0 -1
- package/dist/static-loader-U_x-ctJI.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brumate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
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",
|
|
@@ -103,6 +103,10 @@
|
|
|
103
103
|
"types": "./dist/runtime/hot.d.ts",
|
|
104
104
|
"default": "./dist/runtime/hot.js"
|
|
105
105
|
},
|
|
106
|
+
"./bundles": {
|
|
107
|
+
"types": "./dist/runtime/bundles.d.ts",
|
|
108
|
+
"default": "./dist/runtime/bundles.js"
|
|
109
|
+
},
|
|
106
110
|
"./testing": {
|
|
107
111
|
"types": "./dist/runtime/testing.d.ts",
|
|
108
112
|
"default": "./dist/runtime/testing.js"
|
|
@@ -257,15 +257,16 @@ https://brumate-docs.vercel.app/docs/errors#brm180
|
|
|
257
257
|
<input onKeyDown=(handle) onFocusOut=(handle) />
|
|
258
258
|
```
|
|
259
259
|
|
|
260
|
-
##
|
|
260
|
+
## 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
|
|
261
261
|
|
|
262
|
-
|
|
262
|
+
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.
|
|
263
263
|
|
|
264
|
-
https://brumate-docs.vercel.app/docs/errors#
|
|
264
|
+
https://brumate-docs.vercel.app/docs/errors#brm186
|
|
265
265
|
|
|
266
266
|
```brm fragment
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
const posts = $memo(loadPosts(id));
|
|
268
|
+
#loading (posts) {
|
|
269
|
+
<p>{posts.length} posts</p>
|
|
269
270
|
} #else {
|
|
270
271
|
<p>Loading</p>
|
|
271
272
|
}
|
|
@@ -324,6 +325,39 @@ https://brumate-docs.vercel.app/docs/errors#brm185
|
|
|
324
325
|
</div>
|
|
325
326
|
```
|
|
326
327
|
|
|
328
|
+
## BRM187: The {kind} {name} of {component} did not settle: it writes a value that it reads, and runs again without end. Wrap the read or the write in $untrack, or write only when the value changes
|
|
329
|
+
|
|
330
|
+
In the browser, an effect or an update writes a value that it reads, so each run schedules the next. Past 1000 rounds of effects, or 10000 rounds of updates, in one change, the page stops the loop and sends this error to the nearest `#try` in place of hanging the tab. A production build sends the short form `Update loop {scope}:{name} [BRM187]`.
|
|
331
|
+
|
|
332
|
+
https://brumate-docs.vercel.app/docs/errors#brm187
|
|
333
|
+
|
|
334
|
+
```brm fragment
|
|
335
|
+
<script>
|
|
336
|
+
import { $effect, $signal, $untrack } from 'brumate/signals';
|
|
337
|
+
|
|
338
|
+
let query = $signal('');
|
|
339
|
+
let saves = $signal(0);
|
|
340
|
+
|
|
341
|
+
$effect(() => {
|
|
342
|
+
void query;
|
|
343
|
+
$untrack(saves++);
|
|
344
|
+
});
|
|
345
|
+
</script>
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
## BRM188: "{name}" gives a promise, and {place} cannot wait for one. Await it in the code that runs, or read its value with $memo
|
|
349
|
+
|
|
350
|
+
Markup waits for a promise in text and in attribute values only. An event handler, the key of a `#for`, a `ref` and a `$bind` need the value at once, and the compiler sees that this expression gives a promise: `new Promise(…)`, a call of a server function or of an async function, or a prop typed as a promise.
|
|
351
|
+
|
|
352
|
+
https://brumate-docs.vercel.app/docs/errors#brm188
|
|
353
|
+
|
|
354
|
+
```brm fragment
|
|
355
|
+
<button onClick=(() => save(draft))>Save</button>
|
|
356
|
+
#for (user of users by user.id) {
|
|
357
|
+
<p>{user.name}</p>
|
|
358
|
+
}
|
|
359
|
+
```
|
|
360
|
+
|
|
327
361
|
## BRM023: Modifiers apply to elements. Put ":{modifier}" on the element that the component renders
|
|
328
362
|
|
|
329
363
|
An event modifier is on a component, which only passes the handler on.
|