@absolutejs/absolute 0.20.0-beta.6 → 0.20.0-beta.61
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 +10107 -2126
- 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 +3756 -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 +11287 -3348
- 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 +532 -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 +19 -0
- package/dist/src/mobile/ciWorkflow.d.ts +26 -0
- package/dist/src/mobile/config.d.ts +10 -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 +15 -0
- package/dist/src/mobile/uiPrimitives.d.ts +37 -0
- package/dist/src/mobile/updateClient.d.ts +44 -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 +64 -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
|
@@ -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;
|
|
@@ -84,9 +86,9 @@ var jsxs = (type, props, key) => reactJsxs(type, nativeRootProps(type, props), k
|
|
|
84
86
|
// src/react/jsxDevRuntimeCompat.ts
|
|
85
87
|
var jsxDEV = (type, props, key, _isStaticChildren, _source, _self) => Array.isArray(props?.children) ? jsxs(type, props, key) : jsx(type, props, key);
|
|
86
88
|
export {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
Fragment,
|
|
90
|
+
jsxDEV
|
|
89
91
|
};
|
|
90
92
|
|
|
91
|
-
//# debugId=
|
|
93
|
+
//# debugId=682E163D9238E04A64756E2164756E21
|
|
92
94
|
//# sourceMappingURL=jsxDevRuntimeCompat.js.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"import {\n\tFragment,\n\tjsx as reactJsx,\n\tjsxs as reactJsxs\n} from 'react/jsx-runtime';\n\ntype JSXType = Parameters<typeof reactJsx>[0];\ntype JSXProps = Parameters<typeof reactJsx>[1];\ntype JSXKey = Parameters<typeof reactJsx>[2];\n\nconst nativeRootProps = (type: JSXType, props: JSXProps) => {\n\tif (type !== 'html') return props;\n\tconst capacitor: unknown = Reflect.get(globalThis, 'Capacitor');\n\tif (typeof capacitor !== 'object' || capacitor === null) return props;\n\tconst isNativePlatform: unknown = Reflect.get(\n\t\tcapacitor,\n\t\t'isNativePlatform'\n\t);\n\tif (\n\t\ttypeof isNativePlatform !== 'function' ||\n\t\tisNativePlatform.call(capacitor) !== true\n\t) {\n\t\treturn props;\n\t}\n\n\t// Capacitor's SystemBars plugin owns safe-area CSS variables on <html>.\n\t// React must preserve those native runtime attributes during hydration.\n\treturn Object.assign(\n\t\t{},\n\t\ttypeof props === 'object' && props !== null ? props : {},\n\t\t{ suppressHydrationWarning: true }\n\t);\n};\n\nexport { Fragment };\n\nexport const jsx = (type: JSXType, props: JSXProps, key?: JSXKey) =>\n\treactJsx(type, nativeRootProps(type, props), key);\n\nexport const jsxs = (type: JSXType, props: JSXProps, key?: JSXKey) =>\n\treactJsxs(type, nativeRootProps(type, props), key);\n",
|
|
6
6
|
"import { Fragment, jsx, jsxs } from './jsxRuntimeCompat';\n\ntype JSXType = Parameters<typeof jsx>[0];\ntype JSXKey = Parameters<typeof jsx>[2];\ntype JSXProps = Parameters<typeof jsx>[1] & {\n\tchildren?: unknown;\n};\n\nexport { Fragment };\n\nexport const jsxDEV = (\n\ttype: JSXType,\n\tprops: JSXProps,\n\tkey?: JSXKey,\n\t_isStaticChildren?: boolean,\n\t_source?: unknown,\n\t_self?: unknown\n) =>\n\tArray.isArray(props?.children)\n\t\t? jsxs(type, props, key)\n\t\t: jsx(type, props, key);\n"
|
|
7
7
|
],
|
|
8
|
-
"mappings": "
|
|
9
|
-
"debugId": "
|
|
8
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,SAEC;AAAA,UACA;AAAA;AAOD,IAAM,kBAAkB,CAAC,MAAe,UAAoB;AAAA,EAC3D,IAAI,SAAS;AAAA,IAAQ,OAAO;AAAA,EAC5B,MAAM,YAAqB,QAAQ,IAAI,YAAY,WAAW;AAAA,EAC9D,IAAI,OAAO,cAAc,YAAY,cAAc;AAAA,IAAM,OAAO;AAAA,EAChE,MAAM,mBAA4B,QAAQ,IACzC,WACA,kBACD;AAAA,EACA,IACC,OAAO,qBAAqB,cAC5B,iBAAiB,KAAK,SAAS,MAAM,MACpC;AAAA,IACD,OAAO;AAAA,EACR;AAAA,EAIA,OAAO,OAAO,OACb,CAAC,GACD,OAAO,UAAU,YAAY,UAAU,OAAO,QAAQ,CAAC,GACvD,EAAE,0BAA0B,KAAK,CAClC;AAAA;AAKM,IAAM,MAAM,CAAC,MAAe,OAAiB,QACnD,SAAS,MAAM,gBAAgB,MAAM,KAAK,GAAG,GAAG;AAE1C,IAAM,OAAO,CAAC,MAAe,OAAiB,QACpD,UAAU,MAAM,gBAAgB,MAAM,KAAK,GAAG,GAAG;;;AC9B3C,IAAM,SAAS,CACrB,MACA,OACA,KACA,mBACA,SACA,UAEA,MAAM,QAAQ,OAAO,QAAQ,IAC1B,KAAK,MAAM,OAAO,GAAG,IACrB,IAAI,MAAM,OAAO,GAAG;",
|
|
9
|
+
"debugId": "682E163D9238E04A64756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
|
@@ -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;
|
|
@@ -81,10 +83,10 @@ var nativeRootProps = (type, props) => {
|
|
|
81
83
|
var jsx = (type, props, key) => reactJsx(type, nativeRootProps(type, props), key);
|
|
82
84
|
var jsxs = (type, props, key) => reactJsxs(type, nativeRootProps(type, props), key);
|
|
83
85
|
export {
|
|
84
|
-
|
|
86
|
+
Fragment,
|
|
85
87
|
jsx,
|
|
86
|
-
|
|
88
|
+
jsxs
|
|
87
89
|
};
|
|
88
90
|
|
|
89
|
-
//# debugId=
|
|
91
|
+
//# debugId=A6BB10B64D476FAD64756E2164756E21
|
|
90
92
|
//# sourceMappingURL=jsxRuntimeCompat.js.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import {\n\tFragment,\n\tjsx as reactJsx,\n\tjsxs as reactJsxs\n} from 'react/jsx-runtime';\n\ntype JSXType = Parameters<typeof reactJsx>[0];\ntype JSXProps = Parameters<typeof reactJsx>[1];\ntype JSXKey = Parameters<typeof reactJsx>[2];\n\nconst nativeRootProps = (type: JSXType, props: JSXProps) => {\n\tif (type !== 'html') return props;\n\tconst capacitor: unknown = Reflect.get(globalThis, 'Capacitor');\n\tif (typeof capacitor !== 'object' || capacitor === null) return props;\n\tconst isNativePlatform: unknown = Reflect.get(\n\t\tcapacitor,\n\t\t'isNativePlatform'\n\t);\n\tif (\n\t\ttypeof isNativePlatform !== 'function' ||\n\t\tisNativePlatform.call(capacitor) !== true\n\t) {\n\t\treturn props;\n\t}\n\n\t// Capacitor's SystemBars plugin owns safe-area CSS variables on <html>.\n\t// React must preserve those native runtime attributes during hydration.\n\treturn Object.assign(\n\t\t{},\n\t\ttypeof props === 'object' && props !== null ? props : {},\n\t\t{ suppressHydrationWarning: true }\n\t);\n};\n\nexport { Fragment };\n\nexport const jsx = (type: JSXType, props: JSXProps, key?: JSXKey) =>\n\treactJsx(type, nativeRootProps(type, props), key);\n\nexport const jsxs = (type: JSXType, props: JSXProps, key?: JSXKey) =>\n\treactJsxs(type, nativeRootProps(type, props), key);\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,SAEC;AAAA,UACA;AAAA;AAOD,IAAM,kBAAkB,CAAC,MAAe,UAAoB;AAAA,EAC3D,IAAI,SAAS;AAAA,IAAQ,OAAO;AAAA,EAC5B,MAAM,YAAqB,QAAQ,IAAI,YAAY,WAAW;AAAA,EAC9D,IAAI,OAAO,cAAc,YAAY,cAAc;AAAA,IAAM,OAAO;AAAA,EAChE,MAAM,mBAA4B,QAAQ,IACzC,WACA,kBACD;AAAA,EACA,IACC,OAAO,qBAAqB,cAC5B,iBAAiB,KAAK,SAAS,MAAM,MACpC;AAAA,IACD,OAAO;AAAA,EACR;AAAA,EAIA,OAAO,OAAO,OACb,CAAC,GACD,OAAO,UAAU,YAAY,UAAU,OAAO,QAAQ,CAAC,GACvD,EAAE,0BAA0B,KAAK,CAClC;AAAA;AAKM,IAAM,MAAM,CAAC,MAAe,OAAiB,QACnD,SAAS,MAAM,gBAAgB,MAAM,KAAK,GAAG,GAAG;AAE1C,IAAM,OAAO,CAAC,MAAe,OAAiB,QACpD,UAAU,MAAM,gBAAgB,MAAM,KAAK,GAAG,GAAG;",
|
|
8
|
+
"debugId": "A6BB10B64D476FAD64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -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;
|
|
@@ -73,5 +75,5 @@ export {
|
|
|
73
75
|
UniversalRouter
|
|
74
76
|
};
|
|
75
77
|
|
|
76
|
-
//# debugId=
|
|
78
|
+
//# debugId=4DFB01207B8E6AD964756E2164756E21
|
|
77
79
|
//# sourceMappingURL=browser.js.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import { createElement, type ReactNode } from 'react';\nimport { BrowserRouter, StaticRouter } from 'react-router';\n\nexport type UniversalRouterProps = {\n\t/** The request URL to seed `<StaticRouter>` with on the server. Pages\n\t * typically forward `props.url` (auto-injected by handleReactPageRequest\n\t * from `request.url`). Ignored in the browser, where `<BrowserRouter>`\n\t * reads `window.location` directly. Defaults to '/'. */\n\turl?: string;\n\tchildren?: ReactNode;\n};\n\n/** SSR-safe wrapper around react-router that picks `<StaticRouter>` on the\n * server and `<BrowserRouter>` in the browser. Without it, every SPA page\n * has to write its own `typeof window === 'undefined'` branch and import\n * both routers — boilerplate that's the same in every page.\n *\n * Usage:\n *\n * import { UniversalRouter } from '@absolutejs/absolute/react/router';\n *\n * export const MySpa = ({ url }: { url?: string }) => (\n * <html>\n * <Head />\n * <body>\n * <UniversalRouter url={url}>\n * <Routes>\n * <Route path=\"/foo\" element={<Foo />} />\n * </Routes>\n * </UniversalRouter>\n * </body>\n * </html>\n * );\n *\n * This component lives on its own `@absolutejs/absolute/react/router`\n * subpath rather than the main `@absolutejs/absolute/react` barrel so the\n * static `import 'react-router'` below only loads for consumers who\n * actually use the router — importing `Head`/`Image`/`Island` from\n * `@absolutejs/absolute/react` does not pull react-router into the bundle,\n * so projects that don't route aren't forced to install it.\n *\n * `<BrowserRouter>` reads `window.history` at construction, so it throws\n * if instantiated on the server. The `typeof window` check has to live at\n * render time (not import time) because the module is loaded in both\n * environments. */\nexport const UniversalRouter = ({ url, children }: UniversalRouterProps) => {\n\tif (typeof window === 'undefined') {\n\t\treturn createElement(StaticRouter, { location: url ?? '/' }, children);\n\t}\n\n\treturn createElement(BrowserRouter, null, children);\n};\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AA4CO,IAAM,kBAAkB,GAAG,KAAK,eAAqC;AAAA,EAC3E,IAAI,OAAO,WAAW,aAAa;AAAA,IAClC,OAAO,cAAc,cAAc,EAAE,UAAU,OAAO,IAAI,GAAG,QAAQ;AAAA,EACtE;AAAA,EAEA,OAAO,cAAc,eAAe,MAAM,QAAQ;AAAA;",
|
|
8
|
+
"debugId": "4DFB01207B8E6AD964756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -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;
|
|
@@ -73,5 +75,5 @@ export {
|
|
|
73
75
|
UniversalRouter
|
|
74
76
|
};
|
|
75
77
|
|
|
76
|
-
//# debugId=
|
|
78
|
+
//# debugId=54F5F161F396C44764756E2164756E21
|
|
77
79
|
//# sourceMappingURL=index.js.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import { createElement, type ReactNode } from 'react';\nimport { BrowserRouter, StaticRouter } from 'react-router';\n\nexport type UniversalRouterProps = {\n\t/** The request URL to seed `<StaticRouter>` with on the server. Pages\n\t * typically forward `props.url` (auto-injected by handleReactPageRequest\n\t * from `request.url`). Ignored in the browser, where `<BrowserRouter>`\n\t * reads `window.location` directly. Defaults to '/'. */\n\turl?: string;\n\tchildren?: ReactNode;\n};\n\n/** SSR-safe wrapper around react-router that picks `<StaticRouter>` on the\n * server and `<BrowserRouter>` in the browser. Without it, every SPA page\n * has to write its own `typeof window === 'undefined'` branch and import\n * both routers — boilerplate that's the same in every page.\n *\n * Usage:\n *\n * import { UniversalRouter } from '@absolutejs/absolute/react/router';\n *\n * export const MySpa = ({ url }: { url?: string }) => (\n * <html>\n * <Head />\n * <body>\n * <UniversalRouter url={url}>\n * <Routes>\n * <Route path=\"/foo\" element={<Foo />} />\n * </Routes>\n * </UniversalRouter>\n * </body>\n * </html>\n * );\n *\n * This component lives on its own `@absolutejs/absolute/react/router`\n * subpath rather than the main `@absolutejs/absolute/react` barrel so the\n * static `import 'react-router'` below only loads for consumers who\n * actually use the router — importing `Head`/`Image`/`Island` from\n * `@absolutejs/absolute/react` does not pull react-router into the bundle,\n * so projects that don't route aren't forced to install it.\n *\n * `<BrowserRouter>` reads `window.history` at construction, so it throws\n * if instantiated on the server. The `typeof window` check has to live at\n * render time (not import time) because the module is loaded in both\n * environments. */\nexport const UniversalRouter = ({ url, children }: UniversalRouterProps) => {\n\tif (typeof window === 'undefined') {\n\t\treturn createElement(StaticRouter, { location: url ?? '/' }, children);\n\t}\n\n\treturn createElement(BrowserRouter, null, children);\n};\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AA4CO,IAAM,kBAAkB,GAAG,KAAK,eAAqC;AAAA,EAC3E,IAAI,OAAO,WAAW,aAAa;AAAA,IAClC,OAAO,cAAc,cAAc,EAAE,UAAU,OAAO,IAAI,GAAG,QAAQ;AAAA,EACtE;AAAA,EAEA,OAAO,cAAc,eAAe,MAAM,QAAQ;AAAA;",
|
|
8
|
+
"debugId": "54F5F161F396C44764756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/dist/react/server.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;
|
|
@@ -63,10 +65,10 @@ var __require = import.meta.require;
|
|
|
63
65
|
// src/core/devRouteRegistrationCallsite.ts
|
|
64
66
|
var exports_devRouteRegistrationCallsite = {};
|
|
65
67
|
__export(exports_devRouteRegistrationCallsite, {
|
|
66
|
-
|
|
67
|
-
isPageHandler: () => isPageHandler,
|
|
68
|
+
getCurrentRouteRegistrationCallsite: () => getCurrentRouteRegistrationCallsite,
|
|
68
69
|
getOriginalPageHandlerSource: () => getOriginalPageHandlerSource,
|
|
69
|
-
|
|
70
|
+
isPageHandler: () => isPageHandler,
|
|
71
|
+
patchElysiaRouteRegistrationCallsites: () => patchElysiaRouteRegistrationCallsites
|
|
70
72
|
});
|
|
71
73
|
import { AsyncLocalStorage } from "async_hooks";
|
|
72
74
|
import { Elysia } from "elysia";
|
|
@@ -941,6 +943,7 @@ var colors, MONTHS, formatTimestamp = () => {
|
|
|
941
943
|
port,
|
|
942
944
|
host,
|
|
943
945
|
networkUrl,
|
|
946
|
+
mobilePreviewUrl,
|
|
944
947
|
protocol = "http"
|
|
945
948
|
} = options;
|
|
946
949
|
const name = `${colors.cyan}${colors.bold}ABSOLUTEJS${colors.reset}`;
|
|
@@ -954,6 +957,9 @@ var colors, MONTHS, formatTimestamp = () => {
|
|
|
954
957
|
if (networkUrl) {
|
|
955
958
|
console.log(` ${colors.green}\u279C${colors.reset} ${colors.bold}Network:${colors.reset} ${networkUrl}`);
|
|
956
959
|
}
|
|
960
|
+
if (mobilePreviewUrl) {
|
|
961
|
+
console.log(` ${colors.green}\u279C${colors.reset} ${colors.bold}Mobile:${colors.reset} ${mobilePreviewUrl}`);
|
|
962
|
+
}
|
|
957
963
|
console.log("");
|
|
958
964
|
};
|
|
959
965
|
var init_startupBanner = __esm(() => {
|
|
@@ -1464,6 +1470,20 @@ var init_spaRouteManifest = __esm(() => {
|
|
|
1464
1470
|
init_resolveConvention();
|
|
1465
1471
|
});
|
|
1466
1472
|
|
|
1473
|
+
// src/core/browserTranslation.ts
|
|
1474
|
+
var BASELINE_MARKER = "__ABSOLUTE_SSR_TEXT_BASELINES__", BROWSER_TRANSLATION_BASELINE_SCRIPT, browserTranslationBaselineTag = () => `<script>${BROWSER_TRANSLATION_BASELINE_SCRIPT}</script>`, injectBrowserTranslationBaseline = (html) => {
|
|
1475
|
+
if (html.includes(BASELINE_MARKER))
|
|
1476
|
+
return html;
|
|
1477
|
+
const script = browserTranslationBaselineTag();
|
|
1478
|
+
const closingBodyIndex = html.lastIndexOf("</body>");
|
|
1479
|
+
if (closingBodyIndex < 0)
|
|
1480
|
+
return `${html}${script}`;
|
|
1481
|
+
return `${html.slice(0, closingBodyIndex)}${script}${html.slice(closingBodyIndex)}`;
|
|
1482
|
+
};
|
|
1483
|
+
var init_browserTranslation = __esm(() => {
|
|
1484
|
+
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);}}';
|
|
1485
|
+
});
|
|
1486
|
+
|
|
1467
1487
|
// src/core/streamingSlotRegistrar.ts
|
|
1468
1488
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
1469
1489
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
@@ -1846,6 +1866,7 @@ var getCurrentAbsoluteMobileProducerContext = () => {
|
|
|
1846
1866
|
// src/mobile/pageProtocol.ts
|
|
1847
1867
|
var ABSOLUTE_MOBILE_PAGE_MEDIA_TYPE = "application/vnd.absolute.page+json";
|
|
1848
1868
|
var ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION = 1;
|
|
1869
|
+
var ABSOLUTE_NATIVE_ROUTE_DATA_MEDIA_TYPE = "application/vnd.absolute.native-route+json";
|
|
1849
1870
|
var BAD_REQUEST_STATUS = 400;
|
|
1850
1871
|
var OK_STATUS = 200;
|
|
1851
1872
|
var SERVER_ERROR_STATUS = 500;
|
|
@@ -1864,6 +1885,11 @@ var acceptsAbsoluteMobilePage = (request) => {
|
|
|
1864
1885
|
return false;
|
|
1865
1886
|
return (request.headers.get("accept") ?? "").split(",").some((value) => parseMediaType(value) === ABSOLUTE_MOBILE_PAGE_MEDIA_TYPE);
|
|
1866
1887
|
};
|
|
1888
|
+
var acceptsAbsoluteNativeRouteData = (request) => {
|
|
1889
|
+
if (!request)
|
|
1890
|
+
return false;
|
|
1891
|
+
return (request.headers.get("accept") ?? "").split(",").some((value) => parseMediaType(value) === ABSOLUTE_NATIVE_ROUTE_DATA_MEDIA_TYPE);
|
|
1892
|
+
};
|
|
1867
1893
|
var readRequiredHeader = (request, name) => {
|
|
1868
1894
|
const value = request.headers.get(name)?.trim();
|
|
1869
1895
|
return value ? value : undefined;
|
|
@@ -1994,6 +2020,32 @@ var finalizeArchivedMobilePage = (context, input) => {
|
|
|
1994
2020
|
return createAbsoluteMobilePageErrorResponse(page.pageId);
|
|
1995
2021
|
}
|
|
1996
2022
|
};
|
|
2023
|
+
var finalizeAbsoluteNativeRouteDevelopmentPage = (input) => {
|
|
2024
|
+
if (false) {}
|
|
2025
|
+
if (input.request?.method !== "GET") {
|
|
2026
|
+
return createAbsoluteMobileInvalidRequestResponse("Native-route data requests must use GET.");
|
|
2027
|
+
}
|
|
2028
|
+
if (input.request.headers.get(MOBILE_PAGE_REQUEST_HEADERS.protocol) !== String(ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION)) {
|
|
2029
|
+
return createAbsoluteMobileInvalidRequestResponse(`Native-route data requires protocol ${ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION}.`);
|
|
2030
|
+
}
|
|
2031
|
+
const [representation] = input.compatibility.representations;
|
|
2032
|
+
if (!representation) {
|
|
2033
|
+
return createAbsoluteMobilePageErrorResponse(input.compatibility.pageId);
|
|
2034
|
+
}
|
|
2035
|
+
try {
|
|
2036
|
+
return envelopeResponse({
|
|
2037
|
+
contract: representation.contract,
|
|
2038
|
+
framework: input.compatibility.framework,
|
|
2039
|
+
kind: "page",
|
|
2040
|
+
pageId: input.compatibility.pageId,
|
|
2041
|
+
props: normalizeJsonValue(representation.mapProps(input.props)),
|
|
2042
|
+
status: input.status ?? OK_STATUS
|
|
2043
|
+
}, input.status ?? OK_STATUS);
|
|
2044
|
+
} catch (error) {
|
|
2045
|
+
console.error(`[Mobile] Failed to produce development native route ${input.compatibility.pageId}:`, error);
|
|
2046
|
+
return createAbsoluteMobilePageErrorResponse(input.compatibility.pageId);
|
|
2047
|
+
}
|
|
2048
|
+
};
|
|
1997
2049
|
var createAbsoluteMobileInvalidRequestResponse = (message) => envelopeResponse({ kind: "invalid-request", message }, BAD_REQUEST_STATUS);
|
|
1998
2050
|
var createAbsoluteMobilePageErrorResponse = (pageId) => envelopeResponse({
|
|
1999
2051
|
code: "representation-failed",
|
|
@@ -2003,6 +2055,9 @@ var createAbsoluteMobilePageErrorResponse = (pageId) => envelopeResponse({
|
|
|
2003
2055
|
}, SERVER_ERROR_STATUS);
|
|
2004
2056
|
var createAbsoluteMobileUpgradeResponse = (result) => envelopeResponse(result, UPGRADE_REQUIRED_STATUS);
|
|
2005
2057
|
var finalizeAbsoluteMobilePage = (input) => {
|
|
2058
|
+
if (acceptsAbsoluteNativeRouteData(input.request)) {
|
|
2059
|
+
return finalizeAbsoluteNativeRouteDevelopmentPage(input);
|
|
2060
|
+
}
|
|
2006
2061
|
const parsed = parseAbsoluteMobilePageRequest(input.request);
|
|
2007
2062
|
if (parsed.kind === "not-mobile")
|
|
2008
2063
|
return;
|
|
@@ -2180,6 +2235,7 @@ var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage(
|
|
|
2180
2235
|
// src/react/pageHandler.ts
|
|
2181
2236
|
init_spaRouteManifest();
|
|
2182
2237
|
init_resolveConvention();
|
|
2238
|
+
init_browserTranslation();
|
|
2183
2239
|
var withRequestUrl = (props, url) => Object.assign(Object.create(null), props, { url });
|
|
2184
2240
|
var resolveRequestPathname = (request) => {
|
|
2185
2241
|
if (!request)
|
|
@@ -2233,7 +2289,7 @@ var handleReactPageRequest = async (input) => {
|
|
|
2233
2289
|
const refreshSetup = buildRefreshSetup();
|
|
2234
2290
|
const stream = await renderToReadableStream(element, {
|
|
2235
2291
|
bootstrapModules: [resolvedIndex],
|
|
2236
|
-
bootstrapScriptContent: propsScript + refreshSetup
|
|
2292
|
+
bootstrapScriptContent: BROWSER_TRANSLATION_BASELINE_SCRIPT + propsScript + refreshSetup,
|
|
2237
2293
|
onError(error) {
|
|
2238
2294
|
console.error("[SSR] React streaming error:", error);
|
|
2239
2295
|
}
|
|
@@ -2269,5 +2325,5 @@ export {
|
|
|
2269
2325
|
handleReactPageRequest
|
|
2270
2326
|
};
|
|
2271
2327
|
|
|
2272
|
-
//# debugId=
|
|
2328
|
+
//# debugId=A95B123BCADA2FE364756E2164756E21
|
|
2273
2329
|
//# sourceMappingURL=server.js.map
|