@absolutejs/absolute 0.20.0-beta.121 → 0.20.0-beta.123

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 (59) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/changelog.json +57 -0
  3. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  4. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  5. package/dist/angular/index.js +14 -2
  6. package/dist/angular/index.js.map +5 -4
  7. package/dist/angular/server.js +14 -2
  8. package/dist/angular/server.js.map +5 -4
  9. package/dist/build.js +120 -43
  10. package/dist/build.js.map +7 -6
  11. package/dist/cli/config/server.js +9 -1
  12. package/dist/cli/{dev-pdefc9ac.js → dev-s7kct3xq.js} +6 -1
  13. package/dist/cli/index-hty8111z.js +410 -0
  14. package/dist/cli/index.js +6 -2
  15. package/dist/cli/patchedBun-zjtrn2s4.js +38 -0
  16. package/dist/client/chunks/index-dk743xs6.js +146 -0
  17. package/dist/client/chunks/index-dk743xs6.js.map +10 -0
  18. package/dist/client/chunks/index-jrcwp722.js +12 -0
  19. package/dist/client/chunks/index-jrcwp722.js.map +10 -0
  20. package/dist/client/chunks/{islands-xj2n8nwf.js → islands-50dg63j9.js} +6 -3
  21. package/dist/client/chunks/{islands-xj2n8nwf.js.map → islands-50dg63j9.js.map} +3 -3
  22. package/dist/client/chunks/{react-pdg4325x.js → react-yq4ss9y4.js} +4 -3
  23. package/dist/client/chunks/{react-pdg4325x.js.map → react-yq4ss9y4.js.map} +2 -2
  24. package/dist/client/index.js +5 -4
  25. package/dist/client/index.js.map +2 -2
  26. package/dist/dev/client/handlers/react.ts +31 -39
  27. package/dist/dev/client/hmrClient.ts +3 -0
  28. package/dist/dev/serverBootstrap.js +11 -0
  29. package/dist/index.js +122 -45
  30. package/dist/index.js.map +7 -6
  31. package/dist/islands/index.js +14 -2
  32. package/dist/islands/index.js.map +5 -4
  33. package/dist/mobile/remoteMacAgentEntry.js +1 -1
  34. package/dist/react/index.js +14 -2
  35. package/dist/react/index.js.map +5 -4
  36. package/dist/react/server.js +14 -2
  37. package/dist/react/server.js.map +5 -4
  38. package/dist/src/cli/patchedBun.d.ts +84 -0
  39. package/dist/src/client/browserTranslation.d.ts +3 -0
  40. package/dist/src/client/browserTranslationAttributes.d.ts +2 -0
  41. package/dist/src/dev/hotRejectionGuard.d.ts +1 -0
  42. package/dist/src/dev/moduleServer.d.ts +10 -3
  43. package/dist/src/mobile/emulatorDoctor.d.ts +1 -1
  44. package/dist/src/vue/components/Image.d.ts +1 -1
  45. package/dist/svelte/index.js +14 -2
  46. package/dist/svelte/index.js.map +5 -4
  47. package/dist/svelte/server.js +14 -2
  48. package/dist/svelte/server.js.map +5 -4
  49. package/dist/types/globals.d.ts +10 -0
  50. package/dist/vue/browser.js +75 -8
  51. package/dist/vue/browser.js.map +5 -4
  52. package/dist/vue/index.js +77 -9
  53. package/dist/vue/index.js.map +6 -5
  54. package/dist/vue/server.js +14 -2
  55. package/dist/vue/server.js.map +5 -4
  56. package/package.json +1 -1
  57. package/dist/client/chunks/index-5py90ctf.js +0 -87
  58. package/dist/client/chunks/index-5py90ctf.js.map +0 -10
  59. package/dist/cli/{mobile-00bqw12c.js → mobile-6kdsrhxy.js} +3 -3
@@ -0,0 +1,84 @@
1
+ /** The published build: Bun 1.4.0 + the reactFastRefresh backport. The
2
+ * checksums are the release's SHASUMS256.txt, pinned so a download that
3
+ * differs by one byte is refused. */
4
+ export declare const PATCHED_BUN_RELEASE: {
5
+ readonly bunVersion: "1.4.0";
6
+ readonly issue: "https://github.com/oven-sh/bun/issues/32919";
7
+ readonly repo: "absolutejs/patched-bun";
8
+ readonly sha256: {
9
+ readonly 'bun-darwin-aarch64': "940d8c7eadb9fb4f39f06b0a086bbb6851d1bf3bc164bd3ba3a6966f8229f53c";
10
+ readonly 'bun-darwin-x64': "847f215cdd147431d025ffec94063467d1e4e80a5e4c311efff4570e04fa06ed";
11
+ readonly 'bun-freebsd-aarch64': "6d1c6c51cb782a1f9d2f4e2481aa7b856eff05be430094fa3b8fb86adf4067a3";
12
+ readonly 'bun-freebsd-x64': "c5395cd411bf3df75c3943e6ebb7722b5dd369df9a97c622449d36129cc6277a";
13
+ readonly 'bun-linux-aarch64': "fd5931bf59ff2bbaeab5fa37a1b003a3f10ada6b7fee2d3d8f15e606adad61f9";
14
+ readonly 'bun-linux-aarch64-android': "ab560ea72357554c93b4b0390b869ec62769c9b5f676ab196ecb3b0e328d7126";
15
+ readonly 'bun-linux-aarch64-musl': "b9c3f9936f4c7b6b0b749090f70806a1f73ca48d5a9762709ef9a4e9a5b0fed8";
16
+ readonly 'bun-linux-x64': "d36584f9aa71773fada3831ddf01a34c6089988988b900fd968586db099a0567";
17
+ readonly 'bun-linux-x64-android': "1a9712c77516fc224ed3307e083a12ea6e4f1a2956e920b9590bf12e4f59304e";
18
+ readonly 'bun-linux-x64-musl': "061a8bd6afad866f807d93125508c303f16c2dbf000387c91d22dd777c072951";
19
+ readonly 'bun-windows-aarch64': "91ed75e937b191eaf18bb361040acc24cd363b38f7bdaab5228fadd813f2a9ea";
20
+ readonly 'bun-windows-x64': "f7a7a22349dc7d4df0347da3f3058fe746763e22950bc77f4ae8021dab75a7b3";
21
+ };
22
+ readonly tag: "bun-v1.4.0-absolute.2";
23
+ };
24
+ export type PatchedBunAsset = keyof typeof PATCHED_BUN_RELEASE.sha256;
25
+ type Libc = 'android' | 'glibc' | 'musl';
26
+ type Choice = 'install' | 'later' | 'never';
27
+ type Preference = {
28
+ askAfter: string;
29
+ decision: 'later';
30
+ } | {
31
+ decision: 'never';
32
+ };
33
+ type OfferContext = {
34
+ asset: PatchedBunAsset | null;
35
+ bunVersion: string;
36
+ ci: boolean;
37
+ installed: boolean;
38
+ interactive: boolean;
39
+ now: Date;
40
+ preference: Preference | null;
41
+ supported: boolean;
42
+ usesReact: boolean;
43
+ };
44
+ type InstallOptions = {
45
+ asset?: PatchedBunAsset | null;
46
+ /** The expected SHA-256 per asset; the pinned release unless a test swaps it. */
47
+ checksums?: Readonly<Record<PatchedBunAsset, string>>;
48
+ fetchImpl?: typeof fetch;
49
+ home?: string;
50
+ log?: (line: string) => void;
51
+ };
52
+ /** The release zip for a platform, named the way Bun names its own. */
53
+ export declare const installedPatchedBun: (home?: string) => string | null;
54
+ export declare const patchedBunAsset: (platform?: string, arch?: string, libc?: Libc) => "bun-darwin-x64" | "bun-darwin-aarch64" | "bun-linux-x64" | "bun-linux-aarch64" | "bun-linux-x64-musl" | "bun-linux-aarch64-musl" | "bun-windows-x64" | "bun-windows-aarch64" | "bun-freebsd-aarch64" | "bun-freebsd-x64" | "bun-linux-aarch64-android" | "bun-linux-x64-android" | null;
55
+ export declare const patchedBunPath: (asset: PatchedBunAsset, home?: string) => string;
56
+ export declare const runtimeSupportsReactFastRefresh: () => boolean;
57
+ /** Whether `absolute dev` should offer the patched build, and if not, why. */
58
+ export declare const patchedBunOfferState: (context: OfferContext) => "installed" | "runtime-supports-refresh" | "not-a-react-project" | "unsupported-platform" | "runtime-newer" | "declined" | "asked-recently" | "non-interactive" | "offer";
59
+ export declare const readPatchedBunPreference: (home?: string) => {
60
+ askAfter: string;
61
+ decision: "later";
62
+ } | {
63
+ decision: "never";
64
+ } | null;
65
+ /** Reads one file out of a zip archive (stored or deflated entries). */
66
+ export declare const readZipEntry: (archive: Uint8Array, entryName: string) => Uint8Array<ArrayBufferLike>;
67
+ export declare const writePatchedBunPreference: (preference: Preference | null, home?: string) => void;
68
+ export declare const PATCHED_BUN_EXPLANATION: string[];
69
+ /** Downloads, verifies and installs the patched build; returns its path. */
70
+ export declare const installPatchedBun: (options?: InstallOptions) => Promise<string>;
71
+ export declare const parsePatchedBunChoice: (answer: string) => Choice | null;
72
+ export declare const patchedBunDownloadUrl: (asset: PatchedBunAsset) => string;
73
+ /** Checks an installed binary really is the patched build. */
74
+ export declare const verifyPatchedBun: (path: string) => boolean;
75
+ /**
76
+ * The Bun executable `absolute dev` runs its server with: the installed
77
+ * patched build when there is one, otherwise `bun` from PATH after offering
78
+ * the patched build once (Install now / Ask me later / Don't ask again).
79
+ * Set ABSOLUTE_PATCHED_BUN=0 to always use PATH's bun.
80
+ */
81
+ export declare const resolveDevBunExecutable: (projectDir?: string, home?: string) => Promise<string>;
82
+ /** `absolute bun-patch [status|install|remove|reset]` */
83
+ export declare const bunPatch: (args: string[], home?: string) => Promise<void>;
84
+ export {};
@@ -1,8 +1,11 @@
1
1
  type TextBaseline = ReadonlyMap<number, string>;
2
2
  type SsrTextBaselines = WeakMap<Element, TextBaseline>;
3
+ type AttributeBaseline = ReadonlyMap<string, string>;
4
+ type SsrAttributeBaselines = WeakMap<Element, AttributeBaseline>;
3
5
  declare global {
4
6
  interface Window {
5
7
  __ABSOLUTE_SSR_TEXT_BASELINES__?: SsrTextBaselines;
8
+ __ABSOLUTE_SSR_ATTRIBUTE_BASELINES__?: SsrAttributeBaselines;
6
9
  }
7
10
  }
8
11
  /** Capture server-authored text before client modules load. Absolute page
@@ -0,0 +1,2 @@
1
+ /** Human-readable attributes a browser translator may rewrite before hydration. */
2
+ export declare const TRANSLATABLE_ATTRIBUTES: readonly ["alt", "title", "placeholder", "aria-label"];
@@ -0,0 +1 @@
1
+ export declare const installHotRejectionGuard: () => void;
@@ -21,12 +21,19 @@ export declare const warmCompilers: (frameworks: {
21
21
  svelte?: boolean;
22
22
  vue?: boolean;
23
23
  }) => Promise<void>;
24
+ export type ModuleServerHandler = (pathname: string) => Promise<Response | undefined> | Response | undefined;
25
+ export type TransformError = {
26
+ column?: number;
27
+ line?: number;
28
+ lineText?: string;
29
+ message: string;
30
+ };
31
+ export declare const getTransformError: (filePath: string) => TransformError | undefined;
24
32
  export declare const createModuleServer: (config: ModuleServerConfig) => (pathname: string) => Promise<Response | undefined>;
33
+ export declare const SRC_URL_PREFIX = "/@src/";
25
34
  export declare const invalidateModule: (filePath: string) => void;
35
+ export declare const setGlobalModuleServer: (handler: ModuleServerHandler | null) => void;
26
36
  export declare const warmCache: (pathname: string) => Promise<void>;
27
- declare let globalModuleServer: ((pathname: string) => Promise<Response | undefined> | Response | undefined) | null;
28
- export declare const SRC_URL_PREFIX = "/@src/";
29
- export declare const setGlobalModuleServer: (handler: typeof globalModuleServer) => void;
30
37
  /** The ambient warmer `asset()` and the page handlers reach through
31
38
  * `src/core/requestContext.ts`. */
32
39
  export declare const createDevPageWarmer: () => DevPageWarmer;
@@ -21,5 +21,5 @@ export type InspectAbsoluteMobileToolchainOptions = {
21
21
  which?: (command: string) => string | null;
22
22
  };
23
23
  export declare const absoluteManagedAndroidSdkRoot: (host: AbsoluteMobileHost, env?: Record<string, string | undefined>) => string;
24
- export declare const detectAbsoluteMobileHost: (platform?: NodeJS.Platform, wsl?: boolean) => "linux" | "macos" | "windows" | "wsl";
24
+ export declare const detectAbsoluteMobileHost: (platform?: NodeJS.Platform, wsl?: boolean) => "linux" | "windows" | "macos" | "wsl";
25
25
  export declare const inspectAbsoluteMobileToolchain: (input?: InspectAbsoluteMobileToolchainOptions) => Promise<AbsoluteMobileDoctorCheck[]>;
@@ -58,12 +58,12 @@ export declare const Image: import("vue").DefineComponent<{
58
58
  onError: Function;
59
59
  height: number;
60
60
  width: number;
61
+ placeholder: string;
61
62
  onLoad: Function;
62
63
  className: string;
63
64
  quality: number;
64
65
  unoptimized: boolean;
65
66
  sizes: string;
66
- placeholder: string;
67
67
  crossOrigin: string;
68
68
  overrideSrc: string;
69
69
  blurDataURL: string;
@@ -3128,6 +3128,17 @@ var init_spaRouteManifest = __esm(() => {
3128
3128
  init_resolveConvention();
3129
3129
  });
3130
3130
 
3131
+ // src/client/browserTranslationAttributes.ts
3132
+ var TRANSLATABLE_ATTRIBUTES;
3133
+ var init_browserTranslationAttributes = __esm(() => {
3134
+ TRANSLATABLE_ATTRIBUTES = [
3135
+ "alt",
3136
+ "title",
3137
+ "placeholder",
3138
+ "aria-label"
3139
+ ];
3140
+ });
3141
+
3131
3142
  // src/core/browserTranslation.ts
3132
3143
  var BASELINE_MARKER = "__ABSOLUTE_SSR_TEXT_BASELINES__", BROWSER_TRANSLATION_BASELINE_SCRIPT, browserTranslationBaselineTag = () => `<script>${BROWSER_TRANSLATION_BASELINE_SCRIPT}</script>`, injectBrowserTranslationBaseline = (html) => {
3133
3144
  if (html.includes(BASELINE_MARKER))
@@ -3139,7 +3150,8 @@ var BASELINE_MARKER = "__ABSOLUTE_SSR_TEXT_BASELINES__", BROWSER_TRANSLATION_BAS
3139
3150
  return `${html.slice(0, closingBodyIndex)}${script}${html.slice(closingBodyIndex)}`;
3140
3151
  };
3141
3152
  var init_browserTranslation = __esm(() => {
3142
- BROWSER_TRANSLATION_BASELINE_SCRIPT = "window.__ABSOLUTE_SSR_TEXT_BASELINES__=new WeakMap();" + "{const r=document.body,b=window.__ABSOLUTE_SSR_TEXT_BASELINES__;" + 'if(r)for(const e of [r,...r.querySelectorAll("*")]){' + "const t=new Map();for(const [i,n]of[...e.childNodes].entries())" + 'if(n.nodeType===3)t.set(i,n.nodeValue??"");if(t.size)b.set(e,t);}}';
3153
+ init_browserTranslationAttributes();
3154
+ BROWSER_TRANSLATION_BASELINE_SCRIPT = "window.__ABSOLUTE_SSR_TEXT_BASELINES__=new WeakMap();" + "window.__ABSOLUTE_SSR_ATTRIBUTE_BASELINES__=new WeakMap();" + "{const r=document.body,b=window.__ABSOLUTE_SSR_TEXT_BASELINES__," + "a=window.__ABSOLUTE_SSR_ATTRIBUTE_BASELINES__;" + 'if(r)for(const e of [r,...r.querySelectorAll("*")]){' + "const t=new Map();for(const [i,n]of[...e.childNodes].entries())" + 'if(n.nodeType===3)t.set(i,n.nodeValue??"");if(t.size)b.set(e,t);' + `const v=new Map();for(const k of ${JSON.stringify(TRANSLATABLE_ATTRIBUTES)}){` + "const s=e.getAttribute(k);if(s!==null)v.set(k,s);}if(v.size)a.set(e,v);}}";
3143
3155
  });
3144
3156
 
3145
3157
  // src/svelte/renderToReadableStream.ts
@@ -5172,5 +5184,5 @@ export {
5172
5184
  useIslandStore
5173
5185
  };
5174
5186
 
5175
- //# debugId=478433C92B8BC1F864756E2164756E21
5187
+ //# debugId=078B84D8A383B4D464756E2164756E21
5176
5188
  //# sourceMappingURL=index.js.map