@absolutejs/absolute 0.20.0-beta.181 → 0.20.0-beta.182

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 (120) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/changelog.json +54 -0
  3. package/dist/angular/browser.js +2 -2
  4. package/dist/angular/browser.js.map +4 -4
  5. package/dist/angular/components/constants.js +4 -0
  6. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  7. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  8. package/dist/angular/index.js +344 -48
  9. package/dist/angular/index.js.map +10 -10
  10. package/dist/angular/server.js +344 -48
  11. package/dist/angular/server.js.map +10 -10
  12. package/dist/build.js +431 -78
  13. package/dist/build.js.map +15 -15
  14. package/dist/cli/{add-8gw9mk2b.js → add-jft96bp4.js} +9 -9
  15. package/dist/cli/{analyze-e57zz9x8.js → analyze-5w46d1f0.js} +3 -3
  16. package/dist/cli/{androidEmulatorController-vqc5m2rp.js → androidEmulatorController-gbf9r660.js} +6 -6
  17. package/dist/cli/{androidNativeWatcher-s03aczxv.js → androidNativeWatcher-3astrxxz.js} +6 -6
  18. package/dist/cli/{api-8ppxw487.js → api-zmvnvdsf.js} +8 -8
  19. package/dist/cli/{build-fz7qbdn3.js → build-mskrk9zb.js} +3 -3
  20. package/dist/cli/{build-ptx5a72p.js → build-p3qra1nj.js} +64 -6
  21. package/dist/cli/{buildDepVendor-qnwfct22.js → buildDepVendor-36d1aa7c.js} +2 -2
  22. package/dist/cli/{buildReactServerComponents-01s87hnk.js → buildReactServerComponents-vc9hh2rd.js} +5 -5
  23. package/dist/cli/{compile-54rb8szn.js → compile-7mjd739p.js} +10 -6
  24. package/dist/cli/config/server.js +18 -17
  25. package/dist/cli/{db-qbzjw3en.js → db-mpmj37jq.js} +2 -2
  26. package/dist/cli/{dev-6s6g5tnk.js → dev-9d6d7757.js} +14 -14
  27. package/dist/cli/{doctor-m36tmx4d.js → doctor-nng9szw6.js} +3 -3
  28. package/dist/cli/{emulatorDoctor-s1z5tkp7.js → emulatorDoctor-3eszsqs8.js} +5 -5
  29. package/dist/cli/{emulatorInstaller-pgkdswvq.js → emulatorInstaller-1r6cawm0.js} +6 -6
  30. package/dist/cli/{env-5nz1qm8e.js → env-bfa7vs35.js} +3 -3
  31. package/dist/cli/{expoDevController-018anvbm.js → expoDevController-s0msdwbm.js} +6 -6
  32. package/dist/cli/{generate-5vyz1s44.js → generate-xk3a7qnc.js} +8 -8
  33. package/dist/cli/{heapDiff-kncvdtn8.js → heapDiff-3ba8p8wf.js} +3 -3
  34. package/dist/cli/{htmx-26hs6jdm.js → htmx-an2x3gpx.js} +6 -6
  35. package/dist/cli/{index-7854xf0m.js → index-1bszxtdj.js} +1 -1
  36. package/dist/cli/{index-kx2d067c.js → index-3066eqr3.js} +8 -5
  37. package/dist/cli/{index-8khbn8qr.js → index-3a9h87v5.js} +3 -3
  38. package/dist/cli/{index-9djrap79.js → index-3pz5sjaz.js} +1 -1
  39. package/dist/cli/{index-50ag35xg.js → index-3ys9tz53.js} +2 -2
  40. package/dist/cli/{index-6f448d7m.js → index-4ynx0cq6.js} +26 -12
  41. package/dist/cli/{index-btp4fyf1.js → index-785hpa2r.js} +2 -2
  42. package/dist/cli/{index-5w8arh3m.js → index-7zwzyymv.js} +2 -2
  43. package/dist/cli/{index-kes8he5s.js → index-9sqqzeq4.js} +1 -1
  44. package/dist/cli/{index-pr1skxen.js → index-akseq9ps.js} +1 -1
  45. package/dist/cli/{index-23hvdyxf.js → index-c6j2727a.js} +1 -1
  46. package/dist/cli/{index-pkw3jktb.js → index-eh786rj4.js} +2 -2
  47. package/dist/cli/{index-aemhvvwb.js → index-eydgkr7w.js} +1 -1
  48. package/dist/cli/{index-rz56x932.js → index-fbmfpqk8.js} +1 -1
  49. package/dist/cli/{index-c8rcfe5a.js → index-fy4th3n0.js} +1 -1
  50. package/dist/cli/{index-prza6tkp.js → index-gx6pjzzk.js} +3 -3
  51. package/dist/cli/{index-125cfzvn.js → index-hker5fs4.js} +2 -2
  52. package/dist/cli/{index-cgmp9d02.js → index-hqkcxa2p.js} +1 -1
  53. package/dist/cli/{index-jkg2h10c.js → index-mmm6d3k5.js} +3 -3
  54. package/dist/cli/{index-enbw9484.js → index-wpgsermq.js} +1 -1
  55. package/dist/cli/{index-0z5fgb80.js → index-wqpg377f.js} +1 -1
  56. package/dist/cli/{index-3sfcmb49.js → index-x7h6w6td.js} +1 -1
  57. package/dist/cli/{index-a6xx0p9e.js → index-ydaxsftq.js} +1 -1
  58. package/dist/cli/{index-3ewt17wm.js → index-yhkg5by0.js} +1 -1
  59. package/dist/cli/{index-aqe25w4h.js → index-zeeep92g.js} +1 -1
  60. package/dist/cli/index.js +32 -32
  61. package/dist/cli/{info-k124sh7g.js → info-5rwsbhe2.js} +4 -4
  62. package/dist/cli/{inspect-n6pcfvfw.js → inspect-nmwb0q5k.js} +5 -5
  63. package/dist/cli/{iosNativeWatcher-wdq2fvj1.js → iosNativeWatcher-7r9gnk87.js} +7 -7
  64. package/dist/cli/{iosSimulatorController-n97dpa8p.js → iosSimulatorController-w963vv9r.js} +7 -7
  65. package/dist/cli/{islands-17tfx8jf.js → islands-w9xrehpk.js} +3 -3
  66. package/dist/cli/{logs-shg23fbt.js → logs-m793x8a7.js} +3 -3
  67. package/dist/cli/{ls-0wr74w0b.js → ls-k31npd5b.js} +3 -3
  68. package/dist/cli/{mem-16sy1707.js → mem-jm6kw6gr.js} +5 -5
  69. package/dist/cli/{migrate-k91k050s.js → migrate-95bjkqkr.js} +2 -2
  70. package/dist/cli/{mobile-hpqpy61f.js → mobile-cpp8vfn7.js} +13 -13
  71. package/dist/cli/prerender-26pzynh4.js +13 -0
  72. package/dist/cli/{prettier-dh5fh786.js → prettier-0ws9pbc1.js} +1 -1
  73. package/dist/cli/{ps-pk7ncjac.js → ps-fx8mz3e3.js} +6 -6
  74. package/dist/cli/{psTui-50wf0b72.js → psTui-0e9c7an6.js} +7 -7
  75. package/dist/cli/{remoteMacProtocol-g10s408w.js → remoteMacProtocol-y7h79gr8.js} +7 -7
  76. package/dist/cli/{remove-x987pvd3.js → remove-xhvph8bz.js} +8 -8
  77. package/dist/cli/{routes-mc3ymp8t.js → routes-hq9yje5z.js} +3 -3
  78. package/dist/cli/{start-mbn2zgs2.js → start-5mjh9hh2.js} +5 -5
  79. package/dist/cli/{typecheck-ynzw2eep.js → typecheck-yjme4fv1.js} +36 -14
  80. package/dist/cli/{workspace-7sbyyc59.js → workspace-xeb6abxj.js} +5 -5
  81. package/dist/index.js +446 -90
  82. package/dist/index.js.map +17 -17
  83. package/dist/islands/index.js +312 -23
  84. package/dist/islands/index.js.map +5 -5
  85. package/dist/mobile/index.js +2 -2
  86. package/dist/mobile/index.js.map +3 -3
  87. package/dist/react/browser.js +18 -1
  88. package/dist/react/browser.js.map +6 -4
  89. package/dist/react/components/index.js +2 -2
  90. package/dist/react/components/index.js.map +3 -3
  91. package/dist/react/index.js +361 -61
  92. package/dist/react/index.js.map +13 -12
  93. package/dist/react/server.js +42 -35
  94. package/dist/react/server.js.map +9 -9
  95. package/dist/src/angular/components/constants.d.ts +1 -0
  96. package/dist/src/angular/components/defer-slot-payload.d.ts +5 -0
  97. package/dist/src/cli/scripts/manifestKeysEditorHint.d.ts +9 -0
  98. package/dist/src/constants.d.ts +1 -0
  99. package/dist/src/core/prerender.d.ts +10 -0
  100. package/dist/src/react/browser.d.ts +1 -0
  101. package/dist/src/react/index.d.ts +1 -0
  102. package/dist/src/svelte/lowerAwaitSlotSyntax.d.ts +23 -0
  103. package/dist/src/utils/pageCspNonce.d.ts +14 -0
  104. package/dist/svelte/index.js +363 -68
  105. package/dist/svelte/index.js.map +10 -10
  106. package/dist/svelte/server.js +354 -59
  107. package/dist/svelte/server.js.map +10 -10
  108. package/dist/types/manifest.d.ts +3 -2
  109. package/dist/types/svelte.d.ts +3 -0
  110. package/dist/vue/components/Image.js +2 -2
  111. package/dist/vue/components/Image.js.map +3 -3
  112. package/dist/vue/components/index.js +2 -2
  113. package/dist/vue/components/index.js.map +3 -3
  114. package/dist/vue/index.js +355 -60
  115. package/dist/vue/index.js.map +10 -10
  116. package/dist/vue/server.js +45 -39
  117. package/dist/vue/server.js.map +8 -8
  118. package/package.json +1 -1
  119. package/dist/cli/prerender-w65xp6h8.js +0 -11
  120. /package/dist/cli/{index-t8jmj8w1.js → index-fm9x6sjs.js} +0 -0
@@ -30,6 +30,7 @@ export declare const CONFIG_DEFAULT_PORT = 4099;
30
30
  export declare const HMR_UPDATE_TIMEOUT_MS = 2000;
31
31
  export declare const HOOK_SIGNATURE_LENGTH = 12;
32
32
  export declare const EXCLUDE_LAST_OFFSET = -1;
33
+ export declare const HTML_CONTENT_TYPE = "text/html; charset=utf-8";
33
34
  export declare const HTTP_STATUS_OK = 200;
34
35
  export declare const HTTP_STATUS_BAD_REQUEST = 400;
35
36
  export declare const HTTP_STATUS_NOT_FOUND = 404;
@@ -1,5 +1,10 @@
1
1
  export type AngularDeferSlotPayload = {
2
2
  data?: Record<string, string>;
3
+ /** Size-accounting only: the streaming pipeline measures it for
4
+ * `maxSlotHtmlSizeBytes` and slot metrics. Never insert it into the DOM;
5
+ * the slot renders from `data` through Angular's own escaping, and the
6
+ * stream-swap runtime deliberately skips `angular-defer` payloads.
7
+ * Interpolated values in it are HTML-escaped at build time. */
3
8
  html: string;
4
9
  kind: 'angular-defer';
5
10
  state?: 'error' | 'resolved';
@@ -0,0 +1,9 @@
1
+ type TsconfigLists = {
2
+ exclude?: unknown;
3
+ files?: unknown;
4
+ include?: unknown;
5
+ };
6
+ /** The note, or null when tsconfig.json (its `include`, `files` and
7
+ * `exclude`) already lists the declaration. */
8
+ export declare const manifestKeysEditorHint: (config: TsconfigLists) => string | null;
9
+ export {};
@@ -30,6 +30,7 @@ export declare const CONFIG_DEFAULT_PORT = 4099;
30
30
  export declare const HMR_UPDATE_TIMEOUT_MS = 2000;
31
31
  export declare const HOOK_SIGNATURE_LENGTH = 12;
32
32
  export declare const EXCLUDE_LAST_OFFSET = -1;
33
+ export declare const HTML_CONTENT_TYPE = "text/html; charset=utf-8";
33
34
  export declare const HTTP_STATUS_OK = 200;
34
35
  export declare const HTTP_STATUS_BAD_REQUEST = 400;
35
36
  export declare const HTTP_STATUS_NOT_FOUND = 404;
@@ -1,9 +1,16 @@
1
1
  import type { StaticConfig } from '../../types/build';
2
+ export type PrerenderFailure = {
3
+ /** Why the route couldn't be pre-rendered */
4
+ reason: string;
5
+ route: string;
6
+ };
2
7
  export type PrerenderResult = {
3
8
  /** Map of route path → rendered HTML file path on disk */
4
9
  routes: Map<string, string>;
5
10
  /** Directory where pre-rendered files are stored */
6
11
  dir: string;
12
+ /** Routes that couldn't be pre-rendered; they render per request */
13
+ failures: PrerenderFailure[];
7
14
  };
8
15
  type LogFn = (message: string) => void;
9
16
  /** Header used to bypass the prerender cache during ISR re-renders */
@@ -17,6 +24,9 @@ export declare const readTimestamp: (htmlPath: string) => number;
17
24
  * with the bypass header so it hits SSR instead of the cache.
18
25
  */
19
26
  export declare const rerenderRoute: (route: string, port: number, prerenderDir: string) => Promise<boolean>;
27
+ /** The line `absolute start` and `absolute compile` print, once, for a
28
+ * route that couldn't be pre-rendered. */
29
+ export declare const formatPrerenderFailure: ({ reason, route }: PrerenderFailure) => string;
20
30
  /**
21
31
  * Pre-render routes by fetching them from a running server and saving the HTML to disk.
22
32
  *
@@ -1,3 +1,4 @@
1
1
  export { Island } from './Island.browser';
2
2
  export { createTypedIsland } from './createIsland.browser';
3
3
  export { useIslandStore } from './hooks/useIslandStore';
4
+ export { getCspNonce } from '../utils/pageCspNonce';
@@ -4,3 +4,4 @@ export { handleReactServerPageRequest } from './serverComponents/pageHandler';
4
4
  export { Island } from './Island';
5
5
  export { createTypedIsland } from './createIsland';
6
6
  export { useIslandStore } from './hooks/useIslandStore';
7
+ export { getCspNonce } from '../utils/pageCspNonce';
@@ -1,4 +1,27 @@
1
1
  export declare const AWAIT_STREAM_DIRECTIVE = "<!-- absolute:stream -->";
2
+ export declare const AWAIT_SCOPE_CLASS_PLACEHOLDER = "__absoluteAwaitScopeClass__";
3
+ export declare const AWAIT_HTML_HELPERS_SOURCE: string;
4
+ /** Puts `scopeClass` (or nothing, for a component without a `<style>`)
5
+ * where the lowering left the scoped-CSS class placeholder. */
6
+ export declare const applyAwaitScopeClass: (code: string, scopeClass: string) => string;
7
+ /** A `cssHash` compile option that hashes exactly as Svelte's default does
8
+ * (svelte/src/compiler/validate-options.js) and remembers the class, plus
9
+ * `apply`, which writes that class into the compiled code of a lowered
10
+ * component. Svelte only calls `cssHash` for a component with a `<style>`,
11
+ * so without one the placeholder becomes an empty string. One capture per
12
+ * `compile` call. */
13
+ export declare const createAwaitScopeClassCapture: () => {
14
+ apply: (code: string) => string;
15
+ cssHash: (args: {
16
+ name: string;
17
+ filename: string;
18
+ css: string;
19
+ hash: (input: string) => string;
20
+ }) => string;
21
+ };
22
+ /** Turns a branch's markup into a JS template literal that renders it,
23
+ * escaping every expression as Svelte's SSR would. */
24
+ export declare const branchMarkupToTemplateLiteral: (markup: string, branch?: string, filePath?: string) => string;
2
25
  /** Lowers every `{#await}` marked with `AWAIT_STREAM_DIRECTIVE` to a
3
26
  * streaming slot and leaves every other block to Svelte. Throws for a
4
27
  * marked block it can't stream. */
@@ -0,0 +1,14 @@
1
+ /** This page's Content-Security-Policy nonce, for the inline `<script>` and
2
+ * `<style>` tags a page component writes itself:
3
+ *
4
+ * ```tsx
5
+ * <script nonce={getCspNonce()} dangerouslySetInnerHTML={{ __html: code }} />
6
+ * ```
7
+ *
8
+ * Safe in code that also runs in the browser. During SSR it is the
9
+ * request's nonce (the one in the policy header); in the browser it is the
10
+ * same value, read back from the page's own scripts, so the component
11
+ * renders the same nonce on both sides. Undefined without
12
+ * `secureHeaders()`. In a route handler, `cspNonce` in the context is the
13
+ * same value. */
14
+ export declare const getCspNonce: () => string | undefined;