@alxia/react-router 0.9.0 → 0.10.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.
Files changed (51) hide show
  1. package/README.md +126 -13
  2. package/dist/chunks/index-59vhfj6n.js +10 -0
  3. package/dist/chunks/index-59vhfj6n.js.map +10 -0
  4. package/dist/chunks/index-5gqcpyyg.js +34 -0
  5. package/dist/chunks/index-5gqcpyyg.js.map +10 -0
  6. package/dist/chunks/{index-zqa30gr7.js → index-9xv2a8et.js} +7 -38
  7. package/dist/chunks/index-9xv2a8et.js.map +11 -0
  8. package/dist/chunks/index-mppz0806.js +119 -0
  9. package/dist/chunks/index-mppz0806.js.map +11 -0
  10. package/dist/chunks/index-rfr02vg4.js +40 -0
  11. package/dist/chunks/index-rfr02vg4.js.map +10 -0
  12. package/dist/chunks/index-zdbqzcjp.js +97 -0
  13. package/dist/chunks/index-zdbqzcjp.js.map +12 -0
  14. package/dist/pwa/build/build-worker.d.ts +41 -0
  15. package/dist/pwa/build/build-worker.d.ts.map +1 -0
  16. package/dist/pwa/build/index.d.ts +9 -0
  17. package/dist/pwa/build/index.d.ts.map +1 -0
  18. package/dist/pwa/build/index.js +9 -0
  19. package/dist/pwa/build/index.js.map +9 -0
  20. package/dist/pwa/build/precache.d.ts +17 -0
  21. package/dist/pwa/build/precache.d.ts.map +1 -0
  22. package/dist/pwa/index.js +34 -134
  23. package/dist/pwa/index.js.map +4 -8
  24. package/dist/pwa/react/index.js +1 -1
  25. package/dist/pwa/worker/index.d.ts +9 -0
  26. package/dist/pwa/worker/index.d.ts.map +1 -0
  27. package/dist/pwa/worker/index.js +144 -0
  28. package/dist/pwa/worker/index.js.map +12 -0
  29. package/dist/pwa/worker/injected.d.ts +15 -0
  30. package/dist/pwa/worker/injected.d.ts.map +1 -0
  31. package/dist/pwa/worker/plan.d.ts +65 -0
  32. package/dist/pwa/worker/plan.d.ts.map +1 -0
  33. package/dist/pwa/worker/scope.d.ts +18 -0
  34. package/dist/pwa/worker/scope.d.ts.map +1 -0
  35. package/dist/pwa/worker/start-worker.d.ts +17 -0
  36. package/dist/pwa/worker/start-worker.d.ts.map +1 -0
  37. package/dist/vite/index.d.ts +10 -0
  38. package/dist/vite/index.d.ts.map +1 -1
  39. package/dist/vite/index.js +49 -3
  40. package/dist/vite/index.js.map +6 -5
  41. package/dist/vite/runtime.d.ts +1 -1
  42. package/dist/vite/runtime.d.ts.map +1 -1
  43. package/dist/vite/worker.d.ts +16 -0
  44. package/dist/vite/worker.d.ts.map +1 -0
  45. package/docs/README.md +1 -1
  46. package/docs/guide/how-it-works.md +7 -1
  47. package/docs/guide/pwa.md +372 -211
  48. package/docs/roadmap.md +19 -5
  49. package/docs/troubleshooting.md +208 -3
  50. package/package.json +46 -4
  51. package/dist/chunks/index-zqa30gr7.js.map +0 -12
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/vite/worker.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,KAAK,kBAAkB,EAAe,MAAM,cAAc,CAAC;AAGpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C,kHAAkH;AAClH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACpC,kBAAkB,EAClB,MAAM,GAAG,QAAQ,GAAG,MAAM,CAC1B,GAAG;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/B;;;;GAIG;AACH,wBAAgB,UAAU,CACzB,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,EAC9B,MAAM,EAAE,cAAc,GACpB,MAAM,GAAG,SAAS,CAcpB;AAKD,iEAAiE;AACjE,wBAAsB,cAAc,CACnC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,GAC5B,OAAO,CAAC,IAAI,CAAC,CAqBf"}
package/docs/README.md CHANGED
@@ -16,7 +16,7 @@ installable and usable offline, and what to do with each message.
16
16
  | [OpenAPI](guide/openapi.md) | writing the API of an app that serves pages spec first: binding its routes to the generated operations, and checking them with `matchesSpec` |
17
17
  | [Testing](guide/testing.md) | making the app in process with `server.create(wiring)` from a build, and testing it without a server |
18
18
  | [Deploying](guide/deploying.md) | running the build with `bun build/server/index.js`, and the Docker image |
19
- | [Installable and offline](guide/pwa.md) | making the app installable and usable offline: the subpaths of `@alxia/react-router/pwa`, the service worker's contract and cache names, which requests the worker caches and which responses it stores, the precache list read from a build, or clearing the caches at sign-out |
19
+ | [Installable and offline](guide/pwa.md) | making the app installable and usable offline: the subpaths of `@alxia/react-router/pwa`, the service worker (`startWorker`, `/pwa/worker`), its build by `alxia()` or `buildWorker` (`/pwa/build`), its contract and cache names, which requests the worker caches and which responses it stores, the precache list read from a build, or clearing the caches at sign-out |
20
20
  | [Troubleshooting](troubleshooting.md) | something went wrong and you have the message, or a page streams, hydrates or reads its context unlike you expected |
21
21
  | [Roadmap](roadmap.md) | wondering what is coming, and what is not planned |
22
22
 
@@ -72,9 +72,15 @@ bun run build
72
72
  PORT=8080 bun run start
73
73
  ```
74
74
 
75
+ After React Router's builder has written the client, the plugin builds the
76
+ service worker when the app has an `app/service-worker.ts` (`worker: false`
77
+ turns it off): `build/client/service-worker.js`, with the precache list read
78
+ from the client build ([the PWA guide](pwa.md#zero-config-alxia-builds-it)).
79
+
75
80
  React Router's `serverBundles` split the server build in several, and
76
81
  alxia serves one: the plugin refuses them. With `ssr: false`, a
77
- single-page app, the plugin does nothing.
82
+ single-page app, the plugin does nothing but build the service worker (when
83
+ `app/service-worker.ts` exists).
78
84
 
79
85
  ## Under `vite preview`
80
86