@absolutejs/absolute 0.20.0-beta.6 → 0.20.0-beta.60
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/README.md +205 -0
- package/dist/angular/browser.js +392 -405
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/core/streamingSlotRegistrar.js +7 -7
- package/dist/angular/components/core/streamingSlotRegistry.js +4 -4
- package/dist/angular/index.js +379 -321
- package/dist/angular/index.js.map +8 -7
- package/dist/angular/server.js +133 -61
- package/dist/angular/server.js.map +8 -7
- package/dist/build.js +2336 -1347
- package/dist/build.js.map +22 -17
- package/dist/cli/config/client.js +12 -12
- package/dist/cli/config/server.js +1140 -1091
- package/dist/cli/index.js +9621 -2093
- package/dist/client/chunks/angularPatch-arh4sr68.js +157 -0
- package/dist/client/chunks/angularPatch-arh4sr68.js.map +10 -0
- package/dist/client/chunks/index-5py90ctf.js +87 -0
- package/dist/client/chunks/index-5py90ctf.js.map +10 -0
- package/dist/client/chunks/index-m35nbkdp.js +374 -0
- package/dist/client/chunks/index-m35nbkdp.js.map +12 -0
- package/dist/client/chunks/index-qxjc7kc5.js +12 -0
- package/dist/client/chunks/index-qxjc7kc5.js.map +9 -0
- package/dist/client/chunks/islands-xj2n8nwf.js +281 -0
- package/dist/client/chunks/islands-xj2n8nwf.js.map +14 -0
- package/dist/client/chunks/react-pdg4325x.js +65 -0
- package/dist/client/chunks/react-pdg4325x.js.map +10 -0
- package/dist/client/chunks/svelte-s0c964kb.js +19 -0
- package/dist/client/chunks/svelte-s0c964kb.js.map +10 -0
- package/dist/client/chunks/vue-rdskrnyg.js +24 -0
- package/dist/client/chunks/vue-rdskrnyg.js.map +10 -0
- package/dist/client/index.js +73 -841
- package/dist/client/index.js.map +7 -20
- package/dist/core/streamingSlotRegistrar.js +15 -13
- package/dist/core/streamingSlotRegistrar.js.map +2 -2
- package/dist/core/streamingSlotRegistry.js +11 -9
- package/dist/core/streamingSlotRegistry.js.map +2 -2
- package/dist/dev/client/hmrClient.ts +35 -3
- package/dist/dev/client/hmrTiming.ts +6 -0
- package/dist/dev/client/syncDevtools.ts +237 -0
- package/dist/dev/serverBootstrap.js +28 -0
- package/dist/image-client/imageClient.js +7 -7
- package/dist/index.js +3748 -2361
- package/dist/index.js.map +38 -30
- package/dist/islands/browser.js +11 -25
- package/dist/islands/browser.js.map +2 -2
- package/dist/islands/index.js +55 -52
- package/dist/islands/index.js.map +5 -4
- package/dist/mobile/browser.js +429 -20
- package/dist/mobile/browser.js.map +8 -5
- package/dist/mobile/index.js +10626 -3132
- package/dist/mobile/index.js.map +47 -18
- package/dist/mobile/remoteMacAgentEntry.js +1374 -14
- package/dist/mobile/shellAuth.js +36 -0
- package/dist/mobile/shellBootstrap.js +1800 -0
- package/dist/mobile/shellExpoAuth.js +163 -0
- package/dist/mobile/shellExpoDevices.js +77 -0
- package/dist/mobile/shellExpoSync.js +104 -0
- package/dist/mobile/shellSync.js +184 -0
- package/dist/mobile/shellUpdate.js +456 -0
- package/dist/mobile/uiPrimitives.js +264 -0
- package/dist/react/browser.js +17 -59
- package/dist/react/browser.js.map +2 -2
- package/dist/react/components/browser/index.js +107 -107
- package/dist/react/components/index.js +118 -116
- package/dist/react/components/index.js.map +2 -2
- package/dist/react/hooks/index.js +11 -25
- package/dist/react/hooks/index.js.map +2 -2
- package/dist/react/index.js +110 -67
- package/dist/react/index.js.map +8 -7
- package/dist/react/jsxDevRuntimeCompat.js +11 -9
- package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
- package/dist/react/jsxRuntimeCompat.js +11 -9
- package/dist/react/jsxRuntimeCompat.js.map +2 -2
- package/dist/react/router/browser.js +9 -7
- package/dist/react/router/browser.js.map +2 -2
- package/dist/react/router/index.js +9 -7
- package/dist/react/router/index.js.map +2 -2
- package/dist/react/server.js +67 -11
- package/dist/react/server.js.map +7 -6
- package/dist/src/build/pwa.d.ts +16 -0
- package/dist/src/cli/config/server.d.ts +1 -1
- package/dist/src/cli/instanceStatus.d.ts +1 -0
- package/dist/src/cli/scripts/dev.d.ts +2 -0
- package/dist/src/client/browserTranslation.d.ts +19 -0
- package/dist/src/client/index.d.ts +1 -0
- package/dist/src/core/browserTranslation.d.ts +6 -0
- package/dist/src/core/devBuild.d.ts +1 -0
- package/dist/src/core/prepare.d.ts +376 -0
- package/dist/src/dev/clientManager.d.ts +1 -0
- package/dist/src/dev/devCert.d.ts +6 -4
- package/dist/src/dev/serverEntryCopies.d.ts +3 -0
- package/dist/src/ember/browser.d.ts +0 -16
- package/dist/src/mobile/adaptiveShell.d.ts +27 -0
- package/dist/src/mobile/androidEmulatorController.d.ts +8 -1
- package/dist/src/mobile/androidRelease.d.ts +9 -2
- package/dist/src/mobile/androidTestReport.d.ts +14 -0
- package/dist/src/mobile/androidUpgradeConformance.d.ts +47 -0
- package/dist/src/mobile/androidWebView.d.ts +1 -0
- package/dist/src/mobile/browser.d.ts +2 -0
- package/dist/src/mobile/capacitorBundle.d.ts +18 -0
- package/dist/src/mobile/ciWorkflow.d.ts +26 -0
- package/dist/src/mobile/config.d.ts +9 -1
- package/dist/src/mobile/devDeviceAdapter.d.ts +3 -0
- package/dist/src/mobile/deviceCapabilities.d.ts +49 -0
- package/dist/src/mobile/expoBridge.d.ts +91 -0
- package/dist/src/mobile/expoDevController.d.ts +56 -0
- package/dist/src/mobile/expoProject.d.ts +16 -0
- package/dist/src/mobile/index.d.ts +23 -0
- package/dist/src/mobile/iosDeviceAcceptance.d.ts +32 -0
- package/dist/src/mobile/iosPhysicalDeviceTransport.d.ts +16 -0
- package/dist/src/mobile/iosRelease.d.ts +63 -3
- package/dist/src/mobile/iosSimulatorController.d.ts +20 -2
- package/dist/src/mobile/iosTestReport.d.ts +24 -0
- package/dist/src/mobile/mobileBundleInspection.d.ts +63 -0
- package/dist/src/mobile/mobileInspect.d.ts +142 -0
- package/dist/src/mobile/mobilePreview.d.ts +174 -0
- package/dist/src/mobile/mobilePreviewClient.d.ts +1 -0
- package/dist/src/mobile/nativeAuth.d.ts +6 -0
- package/dist/src/mobile/nativeBackgroundSync.d.ts +4 -0
- package/dist/src/mobile/nativeDeviceCapabilities.d.ts +6 -0
- package/dist/src/mobile/nativeRoute.d.ts +13 -0
- package/dist/src/mobile/nativeTestReport.d.ts +91 -0
- package/dist/src/mobile/nativeUpdates.d.ts +4 -0
- package/dist/src/mobile/navigationLifecycle.d.ts +36 -0
- package/dist/src/mobile/navigationState.d.ts +53 -0
- package/dist/src/mobile/pageProtocol.d.ts +2 -0
- package/dist/src/mobile/releaseDoctor.d.ts +23 -1
- package/dist/src/mobile/remoteMacProtocol.d.ts +134 -1
- package/dist/src/mobile/remoteMacWire.d.ts +1 -1
- package/dist/src/mobile/shellAuth.d.ts +8 -1
- package/dist/src/mobile/shellBootstrap.d.ts +15 -2
- package/dist/src/mobile/shellExpoAuth.d.ts +12 -0
- package/dist/src/mobile/shellExpoDevices.d.ts +3 -0
- package/dist/src/mobile/shellExpoSync.d.ts +18 -0
- package/dist/src/mobile/shellHttp.d.ts +2 -0
- package/dist/src/mobile/shellPush.d.ts +11 -0
- package/dist/src/mobile/shellSync.d.ts +46 -1
- package/dist/src/mobile/shellUpdate.d.ts +2 -0
- package/dist/src/mobile/syncRemediation.d.ts +10 -0
- package/dist/src/mobile/syncSchema.d.ts +9 -0
- package/dist/src/mobile/transport.d.ts +14 -0
- package/dist/src/mobile/uiPrimitives.d.ts +37 -0
- package/dist/src/mobile/updateClient.d.ts +40 -0
- package/dist/src/mobile/updateProtocol.d.ts +51 -0
- package/dist/src/mobile/updatePublisher.d.ts +66 -0
- package/dist/src/mobile/updateRollout.d.ts +16 -0
- package/dist/src/mobile/updateRuntime.d.ts +27 -0
- package/dist/src/mobile/updateSigning.d.ts +20 -0
- package/dist/src/plugins/hmr.d.ts +3 -0
- package/dist/src/plugins/imageOptimizer.d.ts +1 -1
- package/dist/src/react/hooks/useMediaQuery.d.ts +1 -1
- package/dist/src/utils/imageProcessing.d.ts +3 -0
- package/dist/src/utils/loadConfig.d.ts +1 -0
- package/dist/src/utils/logger.d.ts +1 -0
- package/dist/src/utils/startupBanner.d.ts +1 -0
- package/dist/src/utils/userAgentFunctions.d.ts +1 -1
- package/dist/src/vue/browser.d.ts +1 -0
- package/dist/src/vue/browserTranslation.d.ts +5 -0
- package/dist/src/vue/index.d.ts +1 -0
- package/dist/svelte/browser.js +12 -26
- package/dist/svelte/browser.js.map +2 -2
- package/dist/svelte/index.js +104 -61
- package/dist/svelte/index.js.map +8 -7
- package/dist/svelte/server.js +84 -28
- package/dist/svelte/server.js.map +7 -6
- package/dist/types/build.d.ts +62 -3
- package/dist/types/cli.d.ts +1 -0
- package/dist/types/messages.d.ts +1 -1
- package/dist/vue/browser.js +116 -56
- package/dist/vue/browser.js.map +5 -3
- package/dist/vue/components/Image.js +9 -7
- package/dist/vue/components/Image.js.map +2 -2
- package/dist/vue/components/index.js +11 -9
- package/dist/vue/components/index.js.map +2 -2
- package/dist/vue/index.js +211 -94
- package/dist/vue/index.js.map +10 -7
- package/dist/vue/server.js +69 -13
- package/dist/vue/server.js.map +7 -6
- package/package.json +40 -14
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type AbsoluteMobileUpdateRequestIdentity = {
|
|
2
|
+
appId: string;
|
|
3
|
+
channel: string;
|
|
4
|
+
currentReleaseId: string;
|
|
5
|
+
installationId: string;
|
|
6
|
+
runtimeFingerprint: string;
|
|
7
|
+
};
|
|
8
|
+
export type AbsoluteMobileUpdateRolloutOptions = {
|
|
9
|
+
appId: string;
|
|
10
|
+
channel: string;
|
|
11
|
+
installationId: string;
|
|
12
|
+
releaseId: string;
|
|
13
|
+
rollout: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const isAbsoluteMobileUpdateRolloutMember: (options: AbsoluteMobileUpdateRolloutOptions) => boolean;
|
|
16
|
+
export declare const parseAbsoluteMobileUpdateRequest: (request: Request) => AbsoluteMobileUpdateRequestIdentity;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AbsoluteDeviceCapabilityPlan } from './deviceCapabilities';
|
|
2
|
+
import type { NormalizedAbsoluteMobileConfig } from './config';
|
|
3
|
+
import type { AbsoluteMobileAuthManifest } from './nativeAuth';
|
|
4
|
+
import type { SyncLocalStoreSchemaBundle } from '@absolutejs/sync/client';
|
|
5
|
+
export declare const ABSOLUTE_MOBILE_SHELL_ABI: 1;
|
|
6
|
+
export declare const ABSOLUTE_MOBILE_UPDATE_RUNTIME_FORMAT: 1;
|
|
7
|
+
export type AbsoluteMobileUpdateRuntimeDescriptor = {
|
|
8
|
+
appId: string;
|
|
9
|
+
auth: AbsoluteMobileAuthManifest | null;
|
|
10
|
+
deepLinks: {
|
|
11
|
+
hosts: string[];
|
|
12
|
+
scheme?: string;
|
|
13
|
+
};
|
|
14
|
+
deviceCapabilities: AbsoluteDeviceCapabilityPlan;
|
|
15
|
+
engine: 'capacitor' | 'expo';
|
|
16
|
+
format: typeof ABSOLUTE_MOBILE_UPDATE_RUNTIME_FORMAT;
|
|
17
|
+
shellAbi: typeof ABSOLUTE_MOBILE_SHELL_ABI;
|
|
18
|
+
syncSchema: SyncLocalStoreSchemaBundle | null;
|
|
19
|
+
updates: NormalizedAbsoluteMobileConfig['updates'] | null;
|
|
20
|
+
};
|
|
21
|
+
export declare const createAbsoluteMobileUpdateRuntimeDescriptor: (options: {
|
|
22
|
+
auth?: AbsoluteMobileAuthManifest;
|
|
23
|
+
config: NormalizedAbsoluteMobileConfig;
|
|
24
|
+
deviceCapabilities: AbsoluteDeviceCapabilityPlan;
|
|
25
|
+
syncSchema?: SyncLocalStoreSchemaBundle;
|
|
26
|
+
}) => AbsoluteMobileUpdateRuntimeDescriptor;
|
|
27
|
+
export declare const fingerprintAbsoluteMobileUpdateRuntime: (descriptor: AbsoluteMobileUpdateRuntimeDescriptor) => string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type AbsoluteMobileUpdateClassification } from './updateProtocol';
|
|
2
|
+
export type BuildAbsoluteMobileUpdateOptions = {
|
|
3
|
+
appId: string;
|
|
4
|
+
bundleDirectory: string;
|
|
5
|
+
channel: string;
|
|
6
|
+
classification: AbsoluteMobileUpdateClassification;
|
|
7
|
+
createdAt?: Date;
|
|
8
|
+
keyId: string;
|
|
9
|
+
outputDirectory: string;
|
|
10
|
+
privateKey: string | Buffer;
|
|
11
|
+
runtimeFingerprint: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const buildAbsoluteMobileUpdate: (options: BuildAbsoluteMobileUpdateOptions) => Promise<{
|
|
14
|
+
manifest: import("./updateProtocol").AbsoluteMobileUpdateManifest;
|
|
15
|
+
manifestPath: string;
|
|
16
|
+
outputDirectory: string;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const copyAbsoluteMobileUpdateFile: (updateDirectory: string, path: string, destination: string) => Promise<void>;
|
|
19
|
+
export declare const readAbsoluteMobileUpdate: (directory: string) => Promise<import("./updateProtocol").AbsoluteMobileUpdateManifest>;
|
|
20
|
+
export declare const verifyAbsoluteMobileUpdateSignature: (manifestValue: unknown, publicKey: string | Buffer) => import("./updateProtocol").AbsoluteMobileUpdateManifest;
|
|
@@ -86,7 +86,10 @@ export declare const hmr: (hmrState: HMRState, manifest: Record<string, string>,
|
|
|
86
86
|
entryWatcherReady: boolean;
|
|
87
87
|
isRebuilding: boolean;
|
|
88
88
|
manifestKeys: string[];
|
|
89
|
+
pendingBundleRebuilds: ("svelte" | "vue" | "angular")[];
|
|
90
|
+
pendingFileChanges: number;
|
|
89
91
|
rebuildCount: number;
|
|
90
92
|
rebuildQueue: string[];
|
|
93
|
+
rebuildScheduled: boolean;
|
|
91
94
|
timestamp: number;
|
|
92
95
|
}>;
|
|
@@ -19,7 +19,7 @@ export declare const imageOptimizer: (config: ImageConfig | undefined, buildDir:
|
|
|
19
19
|
status?: number | keyof import("elysia").StatusMap;
|
|
20
20
|
cookie?: Record<string, import("elysia").BaseCookie>;
|
|
21
21
|
};
|
|
22
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 500 | 100 | 200 | 400 | 404 | 300 | 304 | 426 | 204 |
|
|
22
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 500 | 100 | 200 | 400 | 404 | 300 | 304 | 426 | 204 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 301 | 302 | 303 | 307 | 308 | 401 | 402 | 403 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 428 | 429 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
|
|
23
23
|
readonly 100: "Continue";
|
|
24
24
|
readonly 101: "Switching Protocols";
|
|
25
25
|
readonly 102: "Processing";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Breakpoint, Breakpoints } from '../../../types/mediaQuery';
|
|
2
|
-
export declare const UserAgentProvider: import("react").Provider<"console" | "other" | "
|
|
2
|
+
export declare const UserAgentProvider: import("react").Provider<"console" | "other" | "phone" | "tablet" | "desktop" | "bot" | "tv" | "car" | "iot" | null>;
|
|
3
3
|
export declare const useMediaQuery: (customBreakpoints?: Breakpoints) => {
|
|
4
4
|
breakpoint: string;
|
|
5
5
|
isSizeOrGreater: (target: Breakpoint) => boolean;
|
|
@@ -24,6 +24,9 @@ export declare const getCacheKey: (url: string, width: number, quality: number,
|
|
|
24
24
|
export declare const isCacheStale: (meta: CacheMeta) => boolean;
|
|
25
25
|
export declare const matchRemotePattern: (urlString: string, patterns: RemotePattern[]) => boolean;
|
|
26
26
|
export declare const negotiateFormat: (acceptHeader: string, configuredFormats: ImageFormat[]) => ImageFormat;
|
|
27
|
+
/** The MIME type an image buffer actually is, from its magic bytes — used
|
|
28
|
+
* when optimization fails and the original must be served as itself. */
|
|
29
|
+
export declare const sniffImageMime: (buffer: Buffer) => "image/avif" | "image/gif" | "image/jpeg" | "image/png" | "image/webp" | null;
|
|
27
30
|
export declare const optimizeImage: (buffer: Buffer | ArrayBuffer, width: number, quality: number, format: ImageFormat) => Promise<Buffer<ArrayBufferLike>>;
|
|
28
31
|
export declare const readFromCache: (cacheDir: string, cacheKey: string) => {
|
|
29
32
|
buffer: NonSharedBuffer;
|
|
@@ -21,6 +21,7 @@ export declare const loadConfig: (configPath?: string) => Promise<{
|
|
|
21
21
|
htmlDirectory?: string;
|
|
22
22
|
htmxDirectory?: string;
|
|
23
23
|
mobile?: import("..").MobileConfig;
|
|
24
|
+
pwa?: import("..").PwaConfig;
|
|
24
25
|
stylesConfig?: string | import("..").StylesConfig;
|
|
25
26
|
stylePreprocessors?: import("..").StylePreprocessorConfig;
|
|
26
27
|
postcss?: import("..").PostCSSConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getUserAgentType: (userAgent: string) => "console" | "other" | "
|
|
1
|
+
export declare const getUserAgentType: (userAgent: string) => "console" | "other" | "phone" | "tablet" | "desktop" | "bot" | "tv" | "car" | "iot";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { Island } from './Island.browser';
|
|
2
2
|
export { createTypedIsland } from './createIsland.browser';
|
|
3
3
|
export { useIslandStore } from './useIslandStore';
|
|
4
|
+
export { captureSsrTextBaselines, prepareBrowserTranslationHydration, preserveBrowserTranslation } from './browserTranslation';
|
|
4
5
|
export { defineRoutes, defineVueSetupApp } from './defineVuePage';
|
|
5
6
|
export { applyVueRouterRedirect } from './routerRedirectProviders';
|
|
6
7
|
export type { VueAutoRouter, VueRouteRecord, VueRoutes, VueSetupApp, VueSetupAppContext } from '../../types/vue';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HydrationStrategy } from 'vue';
|
|
2
|
+
export { captureSsrTextBaselines, prepareBrowserTranslationHydration } from '../client/browserTranslation';
|
|
3
|
+
/** Wrap a Vue lazy-hydration strategy so text changed by browser translation
|
|
4
|
+
* after the SSR snapshot neither triggers a mismatch nor gets reset. */
|
|
5
|
+
export declare const preserveBrowserTranslation: (strategy: HydrationStrategy) => HydrationStrategy;
|
package/dist/src/vue/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type { VueAutoRouter, VueRouteRecord, VueRoutes, VueSetupApp, VueSetupApp
|
|
|
5
5
|
export { Island } from './Island';
|
|
6
6
|
export { createTypedIsland } from './createIsland';
|
|
7
7
|
export { useIslandStore } from './useIslandStore';
|
|
8
|
+
export { captureSsrTextBaselines, prepareBrowserTranslationHydration, preserveBrowserTranslation } from './browserTranslation';
|
|
8
9
|
export { Image } from './components/Image';
|
|
9
10
|
export { StreamSlot, SuspenseSlot } from './components';
|
|
10
11
|
export { useResource } from './useResource';
|
package/dist/svelte/browser.js
CHANGED
|
@@ -19,12 +19,14 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
|
+
for (let key of __getOwnPropNames(mod))
|
|
24
|
+
if (!__hasOwnProp.call(to, key))
|
|
25
|
+
__defProp(to, key, {
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
27
|
+
enumerable: true
|
|
28
|
+
});
|
|
29
|
+
}
|
|
28
30
|
if (canCache)
|
|
29
31
|
cache.set(mod, to);
|
|
30
32
|
return to;
|
|
@@ -239,22 +241,6 @@ var createIslandStore = (storeId, initialState, createState) => {
|
|
|
239
241
|
return store;
|
|
240
242
|
};
|
|
241
243
|
var getIslandStoreServerSnapshot = (store, selector) => selector(store.getInitialState());
|
|
242
|
-
var applySnapshotToStoreInstances = (storeId, instances, snapshot) => {
|
|
243
|
-
for (const instance of instances) {
|
|
244
|
-
instance.applyExternalSnapshot(snapshot[storeId] ?? {});
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
var initializeIslandStores = (state) => {
|
|
248
|
-
const currentSnapshot = getIslandStoreSnapshot();
|
|
249
|
-
const nextSnapshot = {
|
|
250
|
-
...state,
|
|
251
|
-
...currentSnapshot
|
|
252
|
-
};
|
|
253
|
-
globalThis.__ABS_ISLAND_STATE__ = nextSnapshot;
|
|
254
|
-
for (const [storeId, store] of getIslandStores()) {
|
|
255
|
-
applySnapshotToStoreInstances(storeId, store, nextSnapshot);
|
|
256
|
-
}
|
|
257
|
-
};
|
|
258
244
|
var readIslandStore = (store, selector) => selector(store.getState());
|
|
259
245
|
var subscribeIslandStore = (store, selector, listener) => {
|
|
260
246
|
let currentSelection = selector(store.getState());
|
|
@@ -281,11 +267,11 @@ var renderIsland = async () => {
|
|
|
281
267
|
throw new Error("renderIsland is server-only. Use it during SSR, not in the browser.");
|
|
282
268
|
};
|
|
283
269
|
export {
|
|
284
|
-
|
|
285
|
-
resolveIslandHtml,
|
|
270
|
+
createTypedIsland,
|
|
286
271
|
renderIsland,
|
|
287
|
-
|
|
272
|
+
resolveIslandHtml,
|
|
273
|
+
useIslandStore
|
|
288
274
|
};
|
|
289
275
|
|
|
290
|
-
//# debugId=
|
|
276
|
+
//# debugId=3CA834CE6A1E3B1B64756E2164756E21
|
|
291
277
|
//# sourceMappingURL=browser.js.map
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"import type { StoreApi } from 'zustand/vanilla';\nimport {\n\treadIslandStore,\n\tsubscribeIslandStore,\n\ttype IslandStoreState\n} from '../client/islandStore';\n\nexport const useIslandStore = <TState extends IslandStoreState, TSelected>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => ({\n\tsubscribe(listener: (value: TSelected) => void) {\n\t\tlistener(readIslandStore(store, selector));\n\n\t\treturn subscribeIslandStore(store, selector, listener);\n\t}\n});\n",
|
|
14
14
|
"export { createTypedIsland } from './createIsland.browser';\nexport { resolveIslandHtml } from './resolveIslandHtml.browser';\nexport { useIslandStore } from './islandStore';\n\nexport const renderIsland = async () => {\n\tthrow new Error(\n\t\t'renderIsland is server-only. Use it during SSR, not in the browser.'\n\t);\n};\n"
|
|
15
15
|
],
|
|
16
|
-
"mappings": "
|
|
17
|
-
"debugId": "
|
|
16
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEM,2BAA2B,CAAC,cACjC,UAAU,IAAI,YAAY,IAAI,UAAU,MAAM,CAAC,GAE1C,0BAA0B,CAC/B,UACA,WACI;AAAA,EACJ,MAAM,UAAkC,CAAC;AAAA,EACzC,IAAI,QAAQ;AAAA,EAEZ,YAAY,KAAK,UAAU,OAAO,QAAQ,QAAQ,GAAG;AAAA,IACpD,IAAI,CAAC,IAAI,WAAW,MAAM;AAAA,MAAG;AAAA,IAE7B,MAAM,YAAY,IAAI,MAAM,OAAO,MAAM;AAAA,IACzC,IAAI,CAAC;AAAA,MAAW;AAAA,IAEhB,QAAQ,aAAa;AAAA,IACrB,QAAQ;AAAA,EACT;AAAA,EAEA,OAAO,QAAQ,UAAU;AAAA,GAGb,2BAA2B,CAAC,aAAqC;AAAA,EAC7E,MAAM,UACL,CAAC;AAAA,EACF,MAAM,aAAgC,CAAC,SAAS,UAAU,OAAO,SAAS;AAAA,EAE1E,WAAW,aAAa,YAAY;AAAA,IACnC,MAAM,SAAS,SAAS,yBAAyB,SAAS;AAAA,IAC1D,MAAM,UAAU,wBAAwB,UAAU,MAAM;AAAA,IACxD,IAAI;AAAA,MAAS,QAAQ,aAAa;AAAA,EACnC;AAAA,EAEA,OAAO;AAAA,GAEK,uBAAuB,CACnC,WACA,cACI,SAAS,yBAAyB,SAAS,IAAI;;;ACK7C,SAAS,kBAA6B,CAC5C,WACC;AAAA,EACD,IAAI,4BAA4B,SAAS,GAAG;AAAA,IAC3C,OAAO,UAAU;AAAA,EAClB;AAAA,EAEA,OAAO;AAAA;AAAA,IA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S,aAAa;AAAA,GACtB;AAAA;;;AC3KK,IAAM,iBAAiB,CAC7B,OACA,cACK;AAAA,EACL,SAAS,CAAC,UAAsC;AAAA,IAC/C,SAAS,gBAAgB,OAAO,QAAQ,CAAC;AAAA,IAEzC,OAAO,qBAAqB,OAAO,UAAU,QAAQ;AAAA;AAEvD;;;ACZO,IAAM,eAAe,YAAY;AAAA,EACvC,MAAM,IAAI,MACT,qEACD;AAAA;",
|
|
17
|
+
"debugId": "3CA834CE6A1E3B1B64756E2164756E21",
|
|
18
18
|
"names": []
|
|
19
19
|
}
|
package/dist/svelte/index.js
CHANGED
|
@@ -19,12 +19,14 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
|
+
for (let key of __getOwnPropNames(mod))
|
|
24
|
+
if (!__hasOwnProp.call(to, key))
|
|
25
|
+
__defProp(to, key, {
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
27
|
+
enumerable: true
|
|
28
|
+
});
|
|
29
|
+
}
|
|
28
30
|
if (canCache)
|
|
29
31
|
cache.set(mod, to);
|
|
30
32
|
return to;
|
|
@@ -262,22 +264,22 @@ var init_lowerAwaitSlotSyntax = __esm(() => {
|
|
|
262
264
|
// src/build/stylePreprocessor.ts
|
|
263
265
|
var exports_stylePreprocessor = {};
|
|
264
266
|
__export(exports_stylePreprocessor, {
|
|
265
|
-
|
|
266
|
-
recordStyleOutput: () => recordStyleOutput,
|
|
267
|
-
isStylePath: () => isStylePath,
|
|
268
|
-
isStyleModulePath: () => isStyleModulePath,
|
|
269
|
-
isPreprocessableStylePath: () => isPreprocessableStylePath,
|
|
270
|
-
getStyleBaseName: () => getStyleBaseName,
|
|
271
|
-
getCssOutputExtension: () => getCssOutputExtension,
|
|
272
|
-
forgetStyleEntry: () => forgetStyleEntry,
|
|
273
|
-
findStyleEntriesImporting: () => findStyleEntriesImporting,
|
|
274
|
-
createSvelteStylePreprocessor: () => createSvelteStylePreprocessor,
|
|
275
|
-
createStyleTransformConfig: () => createStyleTransformConfig,
|
|
276
|
-
createStylePreprocessorPlugin: () => createStylePreprocessorPlugin,
|
|
277
|
-
compileStyleSource: () => compileStyleSource,
|
|
278
|
-
compileStyleFileIfNeededSync: () => compileStyleFileIfNeededSync,
|
|
267
|
+
addStyleImporter: () => addStyleImporter,
|
|
279
268
|
compileStyleFileIfNeeded: () => compileStyleFileIfNeeded,
|
|
280
|
-
|
|
269
|
+
compileStyleFileIfNeededSync: () => compileStyleFileIfNeededSync,
|
|
270
|
+
compileStyleSource: () => compileStyleSource,
|
|
271
|
+
createStylePreprocessorPlugin: () => createStylePreprocessorPlugin,
|
|
272
|
+
createStyleTransformConfig: () => createStyleTransformConfig,
|
|
273
|
+
createSvelteStylePreprocessor: () => createSvelteStylePreprocessor,
|
|
274
|
+
findStyleEntriesImporting: () => findStyleEntriesImporting,
|
|
275
|
+
forgetStyleEntry: () => forgetStyleEntry,
|
|
276
|
+
getCssOutputExtension: () => getCssOutputExtension,
|
|
277
|
+
getStyleBaseName: () => getStyleBaseName,
|
|
278
|
+
isPreprocessableStylePath: () => isPreprocessableStylePath,
|
|
279
|
+
isStyleModulePath: () => isStyleModulePath,
|
|
280
|
+
isStylePath: () => isStylePath,
|
|
281
|
+
recordStyleOutput: () => recordStyleOutput,
|
|
282
|
+
stylePreprocessorPlugin: () => stylePreprocessorPlugin
|
|
281
283
|
});
|
|
282
284
|
import { createHash } from "crypto";
|
|
283
285
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
@@ -1048,10 +1050,10 @@ var init_svelteServerModule = __esm(() => {
|
|
|
1048
1050
|
// src/core/devRouteRegistrationCallsite.ts
|
|
1049
1051
|
var exports_devRouteRegistrationCallsite = {};
|
|
1050
1052
|
__export(exports_devRouteRegistrationCallsite, {
|
|
1051
|
-
|
|
1052
|
-
isPageHandler: () => isPageHandler,
|
|
1053
|
+
getCurrentRouteRegistrationCallsite: () => getCurrentRouteRegistrationCallsite,
|
|
1053
1054
|
getOriginalPageHandlerSource: () => getOriginalPageHandlerSource,
|
|
1054
|
-
|
|
1055
|
+
isPageHandler: () => isPageHandler,
|
|
1056
|
+
patchElysiaRouteRegistrationCallsites: () => patchElysiaRouteRegistrationCallsites
|
|
1055
1057
|
});
|
|
1056
1058
|
import { AsyncLocalStorage } from "async_hooks";
|
|
1057
1059
|
import { Elysia } from "elysia";
|
|
@@ -1906,6 +1908,7 @@ var colors, MONTHS, formatTimestamp = () => {
|
|
|
1906
1908
|
port,
|
|
1907
1909
|
host,
|
|
1908
1910
|
networkUrl,
|
|
1911
|
+
mobilePreviewUrl,
|
|
1909
1912
|
protocol = "http"
|
|
1910
1913
|
} = options;
|
|
1911
1914
|
const name = `${colors.cyan}${colors.bold}ABSOLUTEJS${colors.reset}`;
|
|
@@ -1919,6 +1922,9 @@ var colors, MONTHS, formatTimestamp = () => {
|
|
|
1919
1922
|
if (networkUrl) {
|
|
1920
1923
|
console.log(` ${colors.green}\u279C${colors.reset} ${colors.bold}Network:${colors.reset} ${networkUrl}`);
|
|
1921
1924
|
}
|
|
1925
|
+
if (mobilePreviewUrl) {
|
|
1926
|
+
console.log(` ${colors.green}\u279C${colors.reset} ${colors.bold}Mobile:${colors.reset} ${mobilePreviewUrl}`);
|
|
1927
|
+
}
|
|
1922
1928
|
console.log("");
|
|
1923
1929
|
};
|
|
1924
1930
|
var init_startupBanner = __esm(() => {
|
|
@@ -2460,11 +2466,25 @@ var init_spaRouteManifest = __esm(() => {
|
|
|
2460
2466
|
init_resolveConvention();
|
|
2461
2467
|
});
|
|
2462
2468
|
|
|
2469
|
+
// src/core/browserTranslation.ts
|
|
2470
|
+
var BASELINE_MARKER = "__ABSOLUTE_SSR_TEXT_BASELINES__", BROWSER_TRANSLATION_BASELINE_SCRIPT, browserTranslationBaselineTag = () => `<script>${BROWSER_TRANSLATION_BASELINE_SCRIPT}</script>`, injectBrowserTranslationBaseline = (html) => {
|
|
2471
|
+
if (html.includes(BASELINE_MARKER))
|
|
2472
|
+
return html;
|
|
2473
|
+
const script = browserTranslationBaselineTag();
|
|
2474
|
+
const closingBodyIndex = html.lastIndexOf("</body>");
|
|
2475
|
+
if (closingBodyIndex < 0)
|
|
2476
|
+
return `${html}${script}`;
|
|
2477
|
+
return `${html.slice(0, closingBodyIndex)}${script}${html.slice(closingBodyIndex)}`;
|
|
2478
|
+
};
|
|
2479
|
+
var init_browserTranslation = __esm(() => {
|
|
2480
|
+
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);}}';
|
|
2481
|
+
});
|
|
2482
|
+
|
|
2463
2483
|
// src/svelte/renderToReadableStream.ts
|
|
2464
2484
|
var exports_renderToReadableStream = {};
|
|
2465
2485
|
__export(exports_renderToReadableStream, {
|
|
2466
|
-
|
|
2467
|
-
|
|
2486
|
+
SVELTE_PAGE_ROOT_ID: () => SVELTE_PAGE_ROOT_ID,
|
|
2487
|
+
renderToReadableStream: () => renderToReadableStream
|
|
2468
2488
|
});
|
|
2469
2489
|
var SVELTE_PAGE_ROOT_ID = "__absolute_svelte_root__", renderToReadableStream = async (component, props, {
|
|
2470
2490
|
bootstrapScriptContent,
|
|
@@ -2895,7 +2915,7 @@ var routeContextCache, cacheRouteData = (pagePath, data) => {
|
|
|
2895
2915
|
}
|
|
2896
2916
|
return html + snippet;
|
|
2897
2917
|
}, injectSsrScripts = (html, requestId, indexPath, requestContext) => {
|
|
2898
|
-
let result = html;
|
|
2918
|
+
let result = injectBeforeClose(html, browserTranslationBaselineTag());
|
|
2899
2919
|
const registeredScripts = getAndClearClientScripts(requestId);
|
|
2900
2920
|
if (registeredScripts.length > 0) {
|
|
2901
2921
|
result = injectBeforeClose(result, generateClientScriptCode(registeredScripts));
|
|
@@ -2931,6 +2951,7 @@ var routeContextCache, cacheRouteData = (pagePath, data) => {
|
|
|
2931
2951
|
};
|
|
2932
2952
|
var init_ssrRender = __esm(() => {
|
|
2933
2953
|
init_registerClientScript();
|
|
2954
|
+
init_browserTranslation();
|
|
2934
2955
|
routeContextCache = new Map;
|
|
2935
2956
|
selectorCache = new Map;
|
|
2936
2957
|
});
|
|
@@ -2938,10 +2959,10 @@ var init_ssrRender = __esm(() => {
|
|
|
2938
2959
|
// src/angular/islands.ts
|
|
2939
2960
|
var exports_islands = {};
|
|
2940
2961
|
__export(exports_islands, {
|
|
2941
|
-
|
|
2942
|
-
mountAngularIsland: () => mountAngularIsland,
|
|
2962
|
+
getAngularIslandSelector: () => getAngularIslandSelector,
|
|
2943
2963
|
isAngularComponent: () => isAngularComponent,
|
|
2944
|
-
|
|
2964
|
+
mountAngularIsland: () => mountAngularIsland,
|
|
2965
|
+
renderAngularIslandToHtml: () => renderAngularIslandToHtml
|
|
2945
2966
|
});
|
|
2946
2967
|
var angularIslandSelector = "abs-angular-island", getAngularIslandSelector = (_islandId) => angularIslandSelector, isAngularComponent = (value) => typeof value === "function", getSelectorFromRenderedIsland = (rootElement) => {
|
|
2947
2968
|
const firstChild = rootElement.firstElementChild;
|
|
@@ -3003,8 +3024,10 @@ var angularIslandSelector = "abs-angular-island", getAngularIslandSelector = (_i
|
|
|
3003
3024
|
const propsToken = new InjectionToken(`${wrapperKey}:props`);
|
|
3004
3025
|
|
|
3005
3026
|
class AngularIslandWrapperComponent {
|
|
3006
|
-
|
|
3007
|
-
|
|
3027
|
+
constructor() {
|
|
3028
|
+
this.component = component;
|
|
3029
|
+
this.props = inject(propsToken);
|
|
3030
|
+
}
|
|
3008
3031
|
}
|
|
3009
3032
|
return {
|
|
3010
3033
|
deps,
|
|
@@ -3453,13 +3476,13 @@ var init_nativeRewrite = __esm(() => {
|
|
|
3453
3476
|
// src/build/rewriteImportsPlugin.ts
|
|
3454
3477
|
var exports_rewriteImportsPlugin = {};
|
|
3455
3478
|
__export(exports_rewriteImportsPlugin, {
|
|
3456
|
-
|
|
3457
|
-
rewriteImportsInContent: () => rewriteImportsInContent,
|
|
3458
|
-
rewriteBuildOutputsWith: () => rewriteBuildOutputsWith,
|
|
3459
|
-
rewriteBuildOutputs: () => rewriteBuildOutputs,
|
|
3460
|
-
jsRewriteImports: () => jsRewriteImports,
|
|
3479
|
+
buildWithImportRewrite: () => buildWithImportRewrite,
|
|
3461
3480
|
fixMissingReExportNamespacesInContent: () => fixMissingReExportNamespacesInContent,
|
|
3462
|
-
|
|
3481
|
+
jsRewriteImports: () => jsRewriteImports,
|
|
3482
|
+
rewriteBuildOutputs: () => rewriteBuildOutputs,
|
|
3483
|
+
rewriteBuildOutputsWith: () => rewriteBuildOutputsWith,
|
|
3484
|
+
rewriteImportsInContent: () => rewriteImportsInContent,
|
|
3485
|
+
rewriteVendorDirectories: () => rewriteVendorDirectories
|
|
3463
3486
|
});
|
|
3464
3487
|
import { readdir as readdir2 } from "fs/promises";
|
|
3465
3488
|
import { join as join5 } from "path";
|
|
@@ -4417,6 +4440,7 @@ var getCurrentAbsoluteMobileProducerContext = () => {
|
|
|
4417
4440
|
// src/mobile/pageProtocol.ts
|
|
4418
4441
|
var ABSOLUTE_MOBILE_PAGE_MEDIA_TYPE = "application/vnd.absolute.page+json";
|
|
4419
4442
|
var ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION = 1;
|
|
4443
|
+
var ABSOLUTE_NATIVE_ROUTE_DATA_MEDIA_TYPE = "application/vnd.absolute.native-route+json";
|
|
4420
4444
|
var BAD_REQUEST_STATUS = 400;
|
|
4421
4445
|
var OK_STATUS = 200;
|
|
4422
4446
|
var SERVER_ERROR_STATUS = 500;
|
|
@@ -4435,6 +4459,11 @@ var acceptsAbsoluteMobilePage = (request) => {
|
|
|
4435
4459
|
return false;
|
|
4436
4460
|
return (request.headers.get("accept") ?? "").split(",").some((value) => parseMediaType(value) === ABSOLUTE_MOBILE_PAGE_MEDIA_TYPE);
|
|
4437
4461
|
};
|
|
4462
|
+
var acceptsAbsoluteNativeRouteData = (request) => {
|
|
4463
|
+
if (!request)
|
|
4464
|
+
return false;
|
|
4465
|
+
return (request.headers.get("accept") ?? "").split(",").some((value) => parseMediaType(value) === ABSOLUTE_NATIVE_ROUTE_DATA_MEDIA_TYPE);
|
|
4466
|
+
};
|
|
4438
4467
|
var readRequiredHeader = (request, name) => {
|
|
4439
4468
|
const value = request.headers.get(name)?.trim();
|
|
4440
4469
|
return value ? value : undefined;
|
|
@@ -4565,6 +4594,32 @@ var finalizeArchivedMobilePage = (context, input) => {
|
|
|
4565
4594
|
return createAbsoluteMobilePageErrorResponse(page.pageId);
|
|
4566
4595
|
}
|
|
4567
4596
|
};
|
|
4597
|
+
var finalizeAbsoluteNativeRouteDevelopmentPage = (input) => {
|
|
4598
|
+
if (false) {}
|
|
4599
|
+
if (input.request?.method !== "GET") {
|
|
4600
|
+
return createAbsoluteMobileInvalidRequestResponse("Native-route data requests must use GET.");
|
|
4601
|
+
}
|
|
4602
|
+
if (input.request.headers.get(MOBILE_PAGE_REQUEST_HEADERS.protocol) !== String(ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION)) {
|
|
4603
|
+
return createAbsoluteMobileInvalidRequestResponse(`Native-route data requires protocol ${ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION}.`);
|
|
4604
|
+
}
|
|
4605
|
+
const [representation] = input.compatibility.representations;
|
|
4606
|
+
if (!representation) {
|
|
4607
|
+
return createAbsoluteMobilePageErrorResponse(input.compatibility.pageId);
|
|
4608
|
+
}
|
|
4609
|
+
try {
|
|
4610
|
+
return envelopeResponse({
|
|
4611
|
+
contract: representation.contract,
|
|
4612
|
+
framework: input.compatibility.framework,
|
|
4613
|
+
kind: "page",
|
|
4614
|
+
pageId: input.compatibility.pageId,
|
|
4615
|
+
props: normalizeJsonValue(representation.mapProps(input.props)),
|
|
4616
|
+
status: input.status ?? OK_STATUS
|
|
4617
|
+
}, input.status ?? OK_STATUS);
|
|
4618
|
+
} catch (error) {
|
|
4619
|
+
console.error(`[Mobile] Failed to produce development native route ${input.compatibility.pageId}:`, error);
|
|
4620
|
+
return createAbsoluteMobilePageErrorResponse(input.compatibility.pageId);
|
|
4621
|
+
}
|
|
4622
|
+
};
|
|
4568
4623
|
var createAbsoluteMobileInvalidRequestResponse = (message) => envelopeResponse({ kind: "invalid-request", message }, BAD_REQUEST_STATUS);
|
|
4569
4624
|
var createAbsoluteMobilePageErrorResponse = (pageId) => envelopeResponse({
|
|
4570
4625
|
code: "representation-failed",
|
|
@@ -4574,6 +4629,9 @@ var createAbsoluteMobilePageErrorResponse = (pageId) => envelopeResponse({
|
|
|
4574
4629
|
}, SERVER_ERROR_STATUS);
|
|
4575
4630
|
var createAbsoluteMobileUpgradeResponse = (result) => envelopeResponse(result, UPGRADE_REQUIRED_STATUS);
|
|
4576
4631
|
var finalizeAbsoluteMobilePage = (input) => {
|
|
4632
|
+
if (acceptsAbsoluteNativeRouteData(input.request)) {
|
|
4633
|
+
return finalizeAbsoluteNativeRouteDevelopmentPage(input);
|
|
4634
|
+
}
|
|
4577
4635
|
const parsed = parseAbsoluteMobilePageRequest(input.request);
|
|
4578
4636
|
if (parsed.kind === "not-mobile")
|
|
4579
4637
|
return;
|
|
@@ -4752,6 +4810,7 @@ var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage(
|
|
|
4752
4810
|
init_inlinePageCss();
|
|
4753
4811
|
init_spaRouteManifest();
|
|
4754
4812
|
init_resolveConvention();
|
|
4813
|
+
init_browserTranslation();
|
|
4755
4814
|
var isRecord3 = (value) => typeof value === "object" && value !== null;
|
|
4756
4815
|
var isGenericSvelteComponent = (value) => typeof value === "function" || isRecord3(value);
|
|
4757
4816
|
var readHasIslands = (value) => {
|
|
@@ -4856,7 +4915,7 @@ var handleSveltePageRequest = async (input) => {
|
|
|
4856
4915
|
const composedHeadContent = `${cssBlock}${resolvedOptions?.headContent ?? ""}`;
|
|
4857
4916
|
const stream = await renderToReadableStream2(resolvedPage.component, resolvedProps, {
|
|
4858
4917
|
bodyContent: resolvedOptions?.bodyContent,
|
|
4859
|
-
bootstrapScriptContent:
|
|
4918
|
+
bootstrapScriptContent: `${BROWSER_TRANSLATION_BASELINE_SCRIPT}window.__ABS_SLOT_HYDRATION_PENDING__=true;window.__INITIAL_PROPS__=${JSON.stringify(resolvedProps)};${resolvedIndexPath ? `import(${JSON.stringify(resolvedIndexPath)});` : ""}`,
|
|
4860
4919
|
headContent: composedHeadContent
|
|
4861
4920
|
});
|
|
4862
4921
|
const htmlStream = injectIslandPageContextStream(stream, {
|
|
@@ -4974,22 +5033,6 @@ var createIslandStore = (storeId, initialState, createState) => {
|
|
|
4974
5033
|
return store;
|
|
4975
5034
|
};
|
|
4976
5035
|
var getIslandStoreServerSnapshot = (store, selector) => selector(store.getInitialState());
|
|
4977
|
-
var applySnapshotToStoreInstances = (storeId, instances, snapshot) => {
|
|
4978
|
-
for (const instance of instances) {
|
|
4979
|
-
instance.applyExternalSnapshot(snapshot[storeId] ?? {});
|
|
4980
|
-
}
|
|
4981
|
-
};
|
|
4982
|
-
var initializeIslandStores = (state) => {
|
|
4983
|
-
const currentSnapshot = getIslandStoreSnapshot();
|
|
4984
|
-
const nextSnapshot = {
|
|
4985
|
-
...state,
|
|
4986
|
-
...currentSnapshot
|
|
4987
|
-
};
|
|
4988
|
-
globalThis.__ABS_ISLAND_STATE__ = nextSnapshot;
|
|
4989
|
-
for (const [storeId, store] of getIslandStores()) {
|
|
4990
|
-
applySnapshotToStoreInstances(storeId, store, nextSnapshot);
|
|
4991
|
-
}
|
|
4992
|
-
};
|
|
4993
5036
|
var readIslandStore = (store, selector) => selector(store.getState());
|
|
4994
5037
|
var subscribeIslandStore = (store, selector, listener) => {
|
|
4995
5038
|
let currentSelection = selector(store.getState());
|
|
@@ -5020,13 +5063,13 @@ var resolveIslandHtml = (_slotId, props) => renderIslandMarkup(requireCurrentIsl
|
|
|
5020
5063
|
// src/svelte/index.ts
|
|
5021
5064
|
init_renderToReadableStream();
|
|
5022
5065
|
export {
|
|
5023
|
-
|
|
5024
|
-
resolveIslandHtml,
|
|
5025
|
-
renderToReadableStream,
|
|
5026
|
-
renderIsland,
|
|
5066
|
+
createTypedIsland,
|
|
5027
5067
|
handleSveltePageRequest,
|
|
5028
|
-
|
|
5068
|
+
renderIsland,
|
|
5069
|
+
renderToReadableStream,
|
|
5070
|
+
resolveIslandHtml,
|
|
5071
|
+
useIslandStore
|
|
5029
5072
|
};
|
|
5030
5073
|
|
|
5031
|
-
//# debugId=
|
|
5074
|
+
//# debugId=667D2CF11308C0AC64756E2164756E21
|
|
5032
5075
|
//# sourceMappingURL=index.js.map
|