@eazo/sdk 0.11.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PROTOCOL.md +7 -1
- package/README.md +78 -7
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/auth-primitive/EazoAuthClient.js +1 -1
- package/dist/internal/auth-primitive/EazoAuthClient.js.map +1 -1
- package/dist/internal/banner-ui/app-info.d.ts +78 -0
- package/dist/internal/banner-ui/app-info.d.ts.map +1 -0
- package/dist/internal/banner-ui/app-info.js +62 -0
- package/dist/internal/banner-ui/app-info.js.map +1 -0
- package/dist/internal/banner-ui/icons.d.ts +18 -4
- package/dist/internal/banner-ui/icons.d.ts.map +1 -1
- package/dist/internal/banner-ui/icons.js +57 -4
- package/dist/internal/banner-ui/icons.js.map +1 -1
- package/dist/internal/banner-ui/index.d.ts +16 -3
- package/dist/internal/banner-ui/index.d.ts.map +1 -1
- package/dist/internal/banner-ui/index.js +336 -41
- package/dist/internal/banner-ui/index.js.map +1 -1
- package/dist/internal/banner-ui/initial-info.d.ts +4 -0
- package/dist/internal/banner-ui/initial-info.d.ts.map +1 -0
- package/dist/internal/banner-ui/initial-info.js +22 -0
- package/dist/internal/banner-ui/initial-info.js.map +1 -0
- package/dist/internal/banner-ui/qr.d.ts +22 -0
- package/dist/internal/banner-ui/qr.d.ts.map +1 -0
- package/dist/internal/banner-ui/qr.js +95 -0
- package/dist/internal/banner-ui/qr.js.map +1 -0
- package/dist/internal/banner-ui/store-links.d.ts +38 -0
- package/dist/internal/banner-ui/store-links.d.ts.map +1 -1
- package/dist/internal/banner-ui/store-links.js +49 -0
- package/dist/internal/banner-ui/store-links.js.map +1 -1
- package/dist/internal/banner-ui/styles.d.ts +4 -2
- package/dist/internal/banner-ui/styles.d.ts.map +1 -1
- package/dist/internal/banner-ui/styles.js +578 -66
- package/dist/internal/banner-ui/styles.js.map +1 -1
- package/dist/internal/bridge/protocol.d.ts +6 -0
- package/dist/internal/bridge/protocol.d.ts.map +1 -1
- package/dist/internal/bridge/protocol.js +5 -1
- package/dist/internal/bridge/protocol.js.map +1 -1
- package/dist/internal/capabilities/ai.js +1 -1
- package/dist/internal/capabilities/ai.js.map +1 -1
- package/dist/internal/capabilities/auth.d.ts +10 -5
- package/dist/internal/capabilities/auth.d.ts.map +1 -1
- package/dist/internal/capabilities/auth.js +29 -13
- package/dist/internal/capabilities/auth.js.map +1 -1
- package/dist/internal/capabilities/device.d.ts +0 -1
- package/dist/internal/capabilities/device.d.ts.map +1 -1
- package/dist/internal/capabilities/device.js +2 -6
- package/dist/internal/capabilities/device.js.map +1 -1
- package/dist/internal/capabilities/memory.d.ts +10 -15
- package/dist/internal/capabilities/memory.d.ts.map +1 -1
- package/dist/internal/capabilities/memory.js +9 -26
- package/dist/internal/capabilities/memory.js.map +1 -1
- package/dist/internal/capabilities/notifications.d.ts +41 -0
- package/dist/internal/capabilities/notifications.d.ts.map +1 -0
- package/dist/internal/capabilities/notifications.js +61 -0
- package/dist/internal/capabilities/notifications.js.map +1 -0
- package/dist/internal/capabilities/share.d.ts +4 -2
- package/dist/internal/capabilities/share.d.ts.map +1 -1
- package/dist/internal/capabilities/share.js +13 -9
- package/dist/internal/capabilities/share.js.map +1 -1
- package/dist/internal/capabilities/storage.d.ts +7 -11
- package/dist/internal/capabilities/storage.d.ts.map +1 -1
- package/dist/internal/capabilities/storage.js +5 -13
- package/dist/internal/capabilities/storage.js.map +1 -1
- package/dist/internal/config.d.ts +9 -12
- package/dist/internal/config.d.ts.map +1 -1
- package/dist/internal/config.js +53 -22
- package/dist/internal/config.js.map +1 -1
- package/dist/internal/store.d.ts.map +1 -1
- package/dist/internal/store.js +0 -1
- package/dist/internal/store.js.map +1 -1
- package/dist/react.d.ts +34 -5
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +26 -5
- package/dist/react.js.map +1 -1
- package/dist/react.server.d.ts +22 -0
- package/dist/react.server.d.ts.map +1 -0
- package/dist/react.server.js +118 -0
- package/dist/react.server.js.map +1 -0
- package/dist/server.d.ts +29 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +158 -0
- package/dist/server.js.map +1 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -2
|
@@ -9,7 +9,7 @@ const protocol_1 = require("../bridge/protocol");
|
|
|
9
9
|
const store_1 = require("../store");
|
|
10
10
|
const MAX_IMAGES = 4;
|
|
11
11
|
function getShareDownloadUrl() {
|
|
12
|
-
return `${(0, config_1.
|
|
12
|
+
return `${(0, config_1.getPlatformApiBase)()}/`;
|
|
13
13
|
}
|
|
14
14
|
function __resetShareCapability() {
|
|
15
15
|
(0, store_1.setShareUI)({ open: false });
|
|
@@ -65,6 +65,13 @@ exports.share = {
|
|
|
65
65
|
async compose(input) {
|
|
66
66
|
validate(input);
|
|
67
67
|
const payload = normalize(input);
|
|
68
|
+
// Auto-stamp the running app's id when the caller didn't supply an
|
|
69
|
+
// explicit override. Mirrors the same default applied in `memory`.
|
|
70
|
+
if (!payload.sourceAppId) {
|
|
71
|
+
const appId = (0, config_1.getAppId)();
|
|
72
|
+
if (appId)
|
|
73
|
+
payload.sourceAppId = appId;
|
|
74
|
+
}
|
|
68
75
|
const hello = await (0, bootstrap_1.waitForBootstrap)();
|
|
69
76
|
const bridge = (0, bootstrap_1.getBridge)();
|
|
70
77
|
if (hello && bridge?.getStatus().ready) {
|
|
@@ -75,17 +82,14 @@ exports.share = {
|
|
|
75
82
|
return { accepted: result?.accepted ?? true };
|
|
76
83
|
}
|
|
77
84
|
catch (err) {
|
|
78
|
-
|
|
79
|
-
(err.code === "NOT_SUPPORTED" || err.code === "TIMEOUT")
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
85
|
+
const fallbackable = err instanceof protocol_1.BridgeErrorObject &&
|
|
86
|
+
(err.code === "NOT_SUPPORTED" || err.code === "TIMEOUT");
|
|
87
|
+
if (!fallbackable)
|
|
83
88
|
throw err;
|
|
84
|
-
|
|
89
|
+
// fall through to web fallback
|
|
85
90
|
}
|
|
86
91
|
}
|
|
87
|
-
//
|
|
88
|
-
// effectful but predictable — apps can detect it via `accepted: false`.
|
|
92
|
+
// Side-effectful but observable: apps detect this branch via `accepted: false`.
|
|
89
93
|
if (typeof document !== "undefined") {
|
|
90
94
|
(0, store_1.setShareUI)({ open: true });
|
|
91
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"share.js","sourceRoot":"","sources":["../../../src/internal/capabilities/share.ts"],"names":[],"mappings":";;;AAMA,kDAEC;
|
|
1
|
+
{"version":3,"file":"share.js","sourceRoot":"","sources":["../../../src/internal/capabilities/share.ts"],"names":[],"mappings":";;;AAMA,kDAEC;AA6BD,wDAEC;AAvCD,sCAAyD;AACzD,4CAA2D;AAC3D,iDAAsE;AACtE,oCAAsC;AAEtC,MAAM,UAAU,GAAG,CAAC,CAAC;AACrB,SAAgB,mBAAmB;IACjC,OAAO,GAAG,IAAA,2BAAkB,GAAE,GAAG,CAAC;AACpC,CAAC;AA6BD,SAAgB,sBAAsB;IACpC,IAAA,kBAAU,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AAC9B,CAAC;AAED,SAAS,QAAQ,CAAC,KAAwB;IACxC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,MAAM,IAAI,4BAAiB,CAAC,cAAc,EAAE,wCAAwC,CAAC,CAAC;IACxF,CAAC;IACD,MAAM,OAAO,GAAG,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;IAC/E,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,M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AW,EAAE,CAAC;YACpC,IAAA,kBAAU,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC7B,CAAC;CACF,CAAC"}
|
|
@@ -1,30 +1,26 @@
|
|
|
1
1
|
export interface StorageCredentials {
|
|
2
|
-
/** Presigned PUT URL —
|
|
2
|
+
/** Presigned PUT URL — issue the request without an auth header. */
|
|
3
3
|
uploadUrl: string;
|
|
4
|
-
/**
|
|
4
|
+
/** Permanent CDN URL for the uploaded object (no expiry). */
|
|
5
5
|
publicUrl: string;
|
|
6
|
-
/** Full S3 object key
|
|
6
|
+
/** Full S3 object key, e.g. `app-contents/{md5(ownerId)}/{path}`. */
|
|
7
7
|
key: string;
|
|
8
8
|
bucket: string;
|
|
9
9
|
region: string;
|
|
10
|
-
/** ISO timestamp
|
|
10
|
+
/** ISO timestamp at which `uploadUrl` expires. */
|
|
11
11
|
expiration: string;
|
|
12
12
|
}
|
|
13
13
|
export interface UploadResult {
|
|
14
|
-
/** Full S3 object key */
|
|
15
14
|
key: string;
|
|
16
|
-
/** Publicly accessible CDN URL */
|
|
17
15
|
url: string;
|
|
18
16
|
}
|
|
19
17
|
export declare const storage: {
|
|
20
18
|
/**
|
|
21
19
|
* Upload a file to Eazo built-in object storage.
|
|
22
20
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* 2. PUTs the file directly to S3 — no platform bandwidth used.
|
|
27
|
-
* 3. Returns the S3 key and a permanent CDN URL.
|
|
21
|
+
* Two-step: requests a presigned PUT URL (tenant-scoped via STS Session
|
|
22
|
+
* Policy), then PUTs directly to S3 — no platform bandwidth in the
|
|
23
|
+
* critical path. Returns the S3 key and a permanent CDN URL.
|
|
28
24
|
*
|
|
29
25
|
* @param path Relative object path, e.g. "todos/123/avatar.png"
|
|
30
26
|
* @param file File or Blob to upload
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/internal/capabilities/storage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/internal/capabilities/storage.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AA6BD,eAAO,MAAM,OAAO;IAClB;;;;;;;;;;OAUG;iBAEK,MAAM,QACN,IAAI,GAAG,IAAI,YACR;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,GAChC,OAAO,CAAC,YAAY,CAAC;IAiBxB;;;;OAIG;yBACkB,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAG1D,CAAC"}
|
|
@@ -2,15 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.storage = void 0;
|
|
4
4
|
const config_1 = require("../config");
|
|
5
|
-
// ---------------------------------------------------------------------------
|
|
6
|
-
// Internal helpers
|
|
7
|
-
// ---------------------------------------------------------------------------
|
|
8
5
|
async function fetchCredentials(path) {
|
|
9
6
|
const appId = (0, config_1.getAppId)();
|
|
10
7
|
if (!appId) {
|
|
11
|
-
throw new Error("@eazo/sdk:
|
|
8
|
+
throw new Error("@eazo/sdk: app id not configured. Mount <EazoProvider appId={...}> at the root of your app.");
|
|
12
9
|
}
|
|
13
|
-
const res = await fetch(`${(0, config_1.
|
|
10
|
+
const res = await fetch(`${(0, config_1.getPlatformApiBase)()}/api/open/storage-credentials`, {
|
|
14
11
|
method: "POST",
|
|
15
12
|
headers: { "Content-Type": "application/json" },
|
|
16
13
|
body: JSON.stringify({ appId, path }),
|
|
@@ -28,18 +25,13 @@ async function fetchCredentials(path) {
|
|
|
28
25
|
const json = await res.json();
|
|
29
26
|
return json.data;
|
|
30
27
|
}
|
|
31
|
-
// ---------------------------------------------------------------------------
|
|
32
|
-
// Public API
|
|
33
|
-
// ---------------------------------------------------------------------------
|
|
34
28
|
exports.storage = {
|
|
35
29
|
/**
|
|
36
30
|
* Upload a file to Eazo built-in object storage.
|
|
37
31
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* 2. PUTs the file directly to S3 — no platform bandwidth used.
|
|
42
|
-
* 3. Returns the S3 key and a permanent CDN URL.
|
|
32
|
+
* Two-step: requests a presigned PUT URL (tenant-scoped via STS Session
|
|
33
|
+
* Policy), then PUTs directly to S3 — no platform bandwidth in the
|
|
34
|
+
* critical path. Returns the S3 key and a permanent CDN URL.
|
|
43
35
|
*
|
|
44
36
|
* @param path Relative object path, e.g. "todos/123/avatar.png"
|
|
45
37
|
* @param file File or Blob to upload
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/internal/capabilities/storage.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/internal/capabilities/storage.ts"],"names":[],"mappings":";;;AAAA,sCAAyD;AAoBzD,KAAK,UAAU,gBAAgB,CAAC,IAAY;IAC1C,MAAM,KAAK,GAAG,IAAA,iBAAQ,GAAE,CAAC;IACzB,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,6FAA6F,CAC9F,CAAC;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,IAAA,2BAAkB,GAAE,+BAA+B,EAA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,KAAK,CAAC,qCAAqC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QACxE,CAAC;QAED,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IAClD,CAAC;IAED;;;;OAIG;IACH,cAAc,CAAC,IAAY;QACzB,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACF,CAAC"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Shared runtime configuration
|
|
3
|
-
*
|
|
2
|
+
* Shared runtime configuration. Dependency-free so both bootstrap and
|
|
3
|
+
* capability modules can read/write without circular imports.
|
|
4
4
|
*/
|
|
5
|
+
export declare const DEFAULT_PLATFORM_API_BASE = "https://eazo.ai";
|
|
6
|
+
/** Set by `<EazoProvider appId={...}>`. */
|
|
5
7
|
export declare function setAppId(id: string | null): void;
|
|
6
|
-
/**
|
|
7
|
-
* Returns the configured Eazo app ID. Falls back to
|
|
8
|
-
* NEXT_PUBLIC_EAZO_APP_ID when no explicit override has been set via
|
|
9
|
-
* `auth.configure({ appId })`.
|
|
10
|
-
*/
|
|
8
|
+
/** Explicit value via setAppId, then env-name list, then null. */
|
|
11
9
|
export declare function getAppId(): string | null;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export declare function getApiBase(override?: string): string;
|
|
10
|
+
/** Set from `hello.apiBase` during device-capability bootstrap. */
|
|
11
|
+
export declare function setHostApiBase(url: string | null): void;
|
|
12
|
+
export declare function getPlatformApiBase(override?: string): string;
|
|
13
|
+
export declare function readAppIdFromEnv(): string | null;
|
|
17
14
|
export declare function __resetConfig(): void;
|
|
18
15
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/internal/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAEhD;AAED
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/internal/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,eAAO,MAAM,yBAAyB,oBAAoB,CAAC;AA8B3D,2CAA2C;AAC3C,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAEhD;AAED,kEAAkE;AAClE,wBAAgB,QAAQ,IAAI,MAAM,GAAG,IAAI,CAGxC;AAED,mEAAmE;AACnE,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAEvD;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAM5D;AAED,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAEhD;AAED,wBAAgB,aAAa,IAAI,IAAI,CAGpC"}
|
package/dist/internal/config.js
CHANGED
|
@@ -1,44 +1,75 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Shared runtime configuration
|
|
4
|
-
*
|
|
3
|
+
* Shared runtime configuration. Dependency-free so both bootstrap and
|
|
4
|
+
* capability modules can read/write without circular imports.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.DEFAULT_PLATFORM_API_BASE = void 0;
|
|
7
8
|
exports.setAppId = setAppId;
|
|
8
9
|
exports.getAppId = getAppId;
|
|
9
|
-
exports.
|
|
10
|
+
exports.setHostApiBase = setHostApiBase;
|
|
11
|
+
exports.getPlatformApiBase = getPlatformApiBase;
|
|
12
|
+
exports.readAppIdFromEnv = readAppIdFromEnv;
|
|
10
13
|
exports.__resetConfig = __resetConfig;
|
|
11
14
|
let appId = null;
|
|
12
|
-
|
|
15
|
+
let hostInjectedApiBase = null;
|
|
16
|
+
exports.DEFAULT_PLATFORM_API_BASE = "https://eazo.ai";
|
|
17
|
+
function readEnvByNames(names) {
|
|
18
|
+
if (typeof process === "undefined" || !process.env)
|
|
19
|
+
return null;
|
|
20
|
+
for (const name of names) {
|
|
21
|
+
const value = process.env[name];
|
|
22
|
+
if (typeof value === "string" && value.length > 0)
|
|
23
|
+
return value;
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const APP_ID_ENV_NAMES = [
|
|
28
|
+
"EAZO_APP_ID",
|
|
29
|
+
"NEXT_PUBLIC_EAZO_APP_ID",
|
|
30
|
+
"EXPO_PUBLIC_EAZO_APP_ID",
|
|
31
|
+
"VITE_EAZO_APP_ID",
|
|
32
|
+
"PUBLIC_EAZO_APP_ID",
|
|
33
|
+
"REACT_APP_EAZO_APP_ID",
|
|
34
|
+
];
|
|
35
|
+
const API_BASE_ENV_NAMES = [
|
|
36
|
+
"EAZO_API_BASE",
|
|
37
|
+
"EAZO_API_URL",
|
|
38
|
+
"NEXT_PUBLIC_EAZO_API_URL",
|
|
39
|
+
"EXPO_PUBLIC_EAZO_API_URL",
|
|
40
|
+
"VITE_EAZO_API_URL",
|
|
41
|
+
"PUBLIC_EAZO_API_URL",
|
|
42
|
+
"REACT_APP_EAZO_API_URL",
|
|
43
|
+
];
|
|
44
|
+
/** Set by `<EazoProvider appId={...}>`. */
|
|
13
45
|
function setAppId(id) {
|
|
14
46
|
appId = id;
|
|
15
47
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Returns the configured Eazo app ID. Falls back to
|
|
18
|
-
* NEXT_PUBLIC_EAZO_APP_ID when no explicit override has been set via
|
|
19
|
-
* `auth.configure({ appId })`.
|
|
20
|
-
*/
|
|
48
|
+
/** Explicit value via setAppId, then env-name list, then null. */
|
|
21
49
|
function getAppId() {
|
|
22
50
|
if (appId)
|
|
23
51
|
return appId;
|
|
24
|
-
|
|
25
|
-
return process.env.NEXT_PUBLIC_EAZO_APP_ID;
|
|
26
|
-
}
|
|
27
|
-
return null;
|
|
52
|
+
return readEnvByNames(APP_ID_ENV_NAMES);
|
|
28
53
|
}
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
function
|
|
54
|
+
/** Set from `hello.apiBase` during device-capability bootstrap. */
|
|
55
|
+
function setHostApiBase(url) {
|
|
56
|
+
hostInjectedApiBase = url ? url.replace(/\/$/, "") : null;
|
|
57
|
+
}
|
|
58
|
+
function getPlatformApiBase(override) {
|
|
34
59
|
if (override)
|
|
35
60
|
return override.replace(/\/$/, "");
|
|
36
|
-
if (
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
61
|
+
if (hostInjectedApiBase)
|
|
62
|
+
return hostInjectedApiBase;
|
|
63
|
+
const fromEnv = readEnvByNames(API_BASE_ENV_NAMES);
|
|
64
|
+
if (fromEnv)
|
|
65
|
+
return fromEnv.replace(/\/$/, "");
|
|
66
|
+
return exports.DEFAULT_PLATFORM_API_BASE;
|
|
67
|
+
}
|
|
68
|
+
function readAppIdFromEnv() {
|
|
69
|
+
return readEnvByNames(APP_ID_ENV_NAMES);
|
|
40
70
|
}
|
|
41
71
|
function __resetConfig() {
|
|
42
72
|
appId = null;
|
|
73
|
+
hostInjectedApiBase = null;
|
|
43
74
|
}
|
|
44
75
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/internal/config.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/internal/config.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAoCH,4BAEC;AAGD,4BAGC;AAGD,wCAEC;AAED,gDAMC;AAED,4CAEC;AAED,sCAGC;AAhED,IAAI,KAAK,GAAkB,IAAI,CAAC;AAChC,IAAI,mBAAmB,GAAkB,IAAI,CAAC;AAEjC,QAAA,yBAAyB,GAAG,iBAAiB,CAAC;A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cAAc,CAAC,kBAAkB,CAAC,CAAC;IACnD,IAAI,OAAO;QAAE,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC/C,OAAO,iCAAyB,CAAC;AACnC,CAAC;AAED,SAAgB,gBAAgB;IAC9B,OAAO,cAAc,CAAC,gBAAgB,CAAC,CAAC;AAC1C,CAAC;AAED,SAAgB,aAAa;IAC3B,KAAK,GAAG,IAAI,CAAC;IACb,mBAAmB,GAAG,IAAI,CAAC;AAC7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/internal/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEpE,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAC;AAE3B,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,OAAO,CAAC;AAChD,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,UAAU,CAAC;AAEnD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB;
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/internal/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEpE,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAC;AAE3B,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,OAAO,CAAC;AAChD,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,UAAU,CAAC;AAEnD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB;AAuBD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;CACf;AAMD,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,eAAO,MAAM,aAAa,EAAE,iBAK3B,CAAC;AAKF,eAAO,MAAM,KAAK;mBACD,iBAAiB;yBAGX,iBAAiB;wBAGlB,QAAQ,GAAG,MAAM,IAAI;aAIhC,IAAI;CAId,CAAC;AAOF,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,CAWvD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAQ7D;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAQ7D;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAQ7D"}
|
package/dist/internal/store.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/internal/store.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/internal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E,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,CACpC,CAAC;IACF,IAAI,CAAC,OAAO;QAAE,OAAO;IACrB,OAAO,CAAC,EAAE,GAAG,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAC1C,CAAC;AAED,SAAgB,UAAU,CAAC,KAA4B;IACrD,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;IACjC,MAAM,IAAI,GAAiB,EAAE,GAAG,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC;IACpD,MAAM,OAAO,GAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAA+B,CAAC,IAAI,CACnE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,CACpC,CAAC;IACF,IAAI,CAAC,OAAO;QAAE,OAAO;IACrB,OAAO,CAAC,EAAE,GAAG,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAC1C,CAAC"}
|
package/dist/react.d.ts
CHANGED
|
@@ -1,21 +1,50 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import type { PublicAppInfo } from "./internal/banner-ui/app-info";
|
|
2
3
|
import type { EazoState } from "./types";
|
|
3
4
|
/**
|
|
4
5
|
* Mounts the SDK runtime. Place once at the root of your React tree.
|
|
5
6
|
*
|
|
6
|
-
* <EazoProvider
|
|
7
|
+
* <EazoProvider
|
|
8
|
+
* appId={process.env.EAZO_APP_ID}
|
|
9
|
+
* apiBase={process.env.EAZO_API_BASE}
|
|
10
|
+
* >
|
|
7
11
|
* <App />
|
|
8
12
|
* </EazoProvider>
|
|
9
13
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
14
|
+
* `<EazoProvider>` is how an app's appId reaches every SDK capability
|
|
15
|
+
* (`auth`, `device`, `share`, `storage`, `memory`); every project must
|
|
16
|
+
* pass one. Also mounts the shared login and share UIs so `auth.login()`
|
|
17
|
+
* and `share.compose()` work anywhere in the tree.
|
|
18
|
+
*
|
|
19
|
+
* **`apiBase` is optional.** When omitted the SDK calls the production
|
|
20
|
+
* Eazo platform (`https://eazo.ai`). Pass it explicitly to point the
|
|
21
|
+
* SDK at staging / a local platform server during development — this is
|
|
22
|
+
* how a server-only env like `EAZO_API_BASE` (which Next.js does NOT
|
|
23
|
+
* inline into the client bundle) reaches the browser side of the SDK.
|
|
12
24
|
*/
|
|
13
25
|
export declare function EazoProvider(props: {
|
|
14
26
|
children: React.ReactNode;
|
|
27
|
+
/** Eazo app ID. Required. */
|
|
28
|
+
appId: string;
|
|
29
|
+
/**
|
|
30
|
+
* Optional platform API base URL. Pass it from a Server Component when
|
|
31
|
+
* the value comes from a server-only env var (e.g. `process.env.EAZO_API_BASE`
|
|
32
|
+
* in a Next.js layout) so it reaches the client without needing a
|
|
33
|
+
* `NEXT_PUBLIC_*` alias. Falls back to `https://eazo.ai`.
|
|
34
|
+
*/
|
|
35
|
+
apiBase?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Pre-fetched `PublicAppInfo` for the host app. When supplied (typically
|
|
38
|
+
* from a Server Component / SSR loader using
|
|
39
|
+
* `fetchPublicAppInfo` from `@eazo/sdk/server`), the handoff banner
|
|
40
|
+
* renders real content on first paint and skips the client-side fetch
|
|
41
|
+
* entirely. Omit it to fall back to the SDK's own client fetch + skeleton.
|
|
42
|
+
*/
|
|
43
|
+
initialAppInfo?: PublicAppInfo | null;
|
|
15
44
|
}): React.ReactElement;
|
|
16
45
|
/**
|
|
17
|
-
* Subscribe to a slice of
|
|
18
|
-
*
|
|
46
|
+
* Subscribe to a slice of state. Re-renders only when the selector's
|
|
47
|
+
* return value changes (Object.is).
|
|
19
48
|
*
|
|
20
49
|
* const user = useEazo(s => s.auth.user);
|
|
21
50
|
* const { platform, locale } = useEazo(s => s.device);
|
package/dist/react.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AASnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CACvC,GAAG,KAAK,CAAC,YAAY,CA2BrB;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,CAAC,GAAG,CAAC,CAkB/D"}
|
package/dist/react.js
CHANGED
|
@@ -38,9 +38,11 @@ exports.useEazo = useEazo;
|
|
|
38
38
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
39
|
const React = __importStar(require("react"));
|
|
40
40
|
const banner_ui_1 = require("./internal/banner-ui");
|
|
41
|
+
const initial_info_1 = require("./internal/banner-ui/initial-info");
|
|
41
42
|
const bootstrap_1 = require("./internal/bootstrap");
|
|
42
43
|
const auth_1 = require("./internal/capabilities/auth");
|
|
43
44
|
const device_1 = require("./internal/capabilities/device");
|
|
45
|
+
const config_1 = require("./internal/config");
|
|
44
46
|
const login_ui_1 = require("./internal/login-ui");
|
|
45
47
|
const share_ui_1 = require("./internal/share-ui");
|
|
46
48
|
const store_1 = require("./internal/store");
|
|
@@ -48,14 +50,33 @@ const MountedContext = React.createContext(false);
|
|
|
48
50
|
/**
|
|
49
51
|
* Mounts the SDK runtime. Place once at the root of your React tree.
|
|
50
52
|
*
|
|
51
|
-
* <EazoProvider
|
|
53
|
+
* <EazoProvider
|
|
54
|
+
* appId={process.env.EAZO_APP_ID}
|
|
55
|
+
* apiBase={process.env.EAZO_API_BASE}
|
|
56
|
+
* >
|
|
52
57
|
* <App />
|
|
53
58
|
* </EazoProvider>
|
|
54
59
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
60
|
+
* `<EazoProvider>` is how an app's appId reaches every SDK capability
|
|
61
|
+
* (`auth`, `device`, `share`, `storage`, `memory`); every project must
|
|
62
|
+
* pass one. Also mounts the shared login and share UIs so `auth.login()`
|
|
63
|
+
* and `share.compose()` work anywhere in the tree.
|
|
64
|
+
*
|
|
65
|
+
* **`apiBase` is optional.** When omitted the SDK calls the production
|
|
66
|
+
* Eazo platform (`https://eazo.ai`). Pass it explicitly to point the
|
|
67
|
+
* SDK at staging / a local platform server during development — this is
|
|
68
|
+
* how a server-only env like `EAZO_API_BASE` (which Next.js does NOT
|
|
69
|
+
* inline into the client bundle) reaches the browser side of the SDK.
|
|
57
70
|
*/
|
|
58
71
|
function EazoProvider(props) {
|
|
72
|
+
if (!props.appId) {
|
|
73
|
+
throw new Error("@eazo/sdk: <EazoProvider appId> is required. Pass your Eazo app id explicitly.");
|
|
74
|
+
}
|
|
75
|
+
(0, config_1.setAppId)(props.appId);
|
|
76
|
+
// Setter ignores null/empty — calling unconditionally keeps the
|
|
77
|
+
// "clear on Provider unmount with apiBase removed" semantics simple.
|
|
78
|
+
(0, config_1.setHostApiBase)(props.apiBase ?? null);
|
|
79
|
+
(0, initial_info_1.setInitialAppInfo)(props.initialAppInfo ?? null);
|
|
59
80
|
React.useEffect(() => {
|
|
60
81
|
// Starting the bridge is idempotent; capability access may have already done so.
|
|
61
82
|
(0, bootstrap_1.getBridge)();
|
|
@@ -65,8 +86,8 @@ function EazoProvider(props) {
|
|
|
65
86
|
return ((0, jsx_runtime_1.jsxs)(MountedContext.Provider, { value: true, children: [props.children, (0, jsx_runtime_1.jsx)(banner_ui_1.EazoBrandBanner, {}), (0, jsx_runtime_1.jsx)(login_ui_1.LoginUI, {}), (0, jsx_runtime_1.jsx)(share_ui_1.ShareDownloadModal, {})] }));
|
|
66
87
|
}
|
|
67
88
|
/**
|
|
68
|
-
* Subscribe to a slice of
|
|
69
|
-
*
|
|
89
|
+
* Subscribe to a slice of state. Re-renders only when the selector's
|
|
90
|
+
* return value changes (Object.is).
|
|
70
91
|
*
|
|
71
92
|
* const user = useEazo(s => s.auth.user);
|
|
72
93
|
* const { platform, locale } = useEazo(s => s.device);
|
package/dist/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCb,oCA8CC;AASD,0BAkBC;;AA9GD,6CAA+B;AAE/B,oDAAuD;AAEvD,oEAAsE;AACtE,oDAAiD;AACjD,uDAA8D;AAC9D,2DAAkE;AAClE,8CAA6D;AAC7D,kDAA8C;AAC9C,kDAAyD;AACzD,4CAAwD;AAGxD,MAAM,cAAc,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,YAAY,CAAC,KAmB5B;IACC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CACb,gFAAgF,CACjF,CAAC;IACJ,CAAC;IACD,IAAA,iBAAQ,EAAC,KAAK,CAAC,K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|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export { useEazo } from "./react";
|
|
3
|
+
export declare function EazoProvider(props: {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** Eazo app ID. Required. */
|
|
6
|
+
appId: string;
|
|
7
|
+
/**
|
|
8
|
+
* Optional platform API base URL. Read here on the server to issue
|
|
9
|
+
* the prefetch against the right host (staging vs prod), and
|
|
10
|
+
* forwarded to the client `EazoProvider` so the rest of the SDK
|
|
11
|
+
* targets the same host post-hydration.
|
|
12
|
+
*/
|
|
13
|
+
apiBase?: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Escape hatch — pre-resolved `PublicAppInfo`. When the caller
|
|
16
|
+
* already has the data (e.g. fetched alongside other server-side
|
|
17
|
+
* queries) supplying it here skips the in-Provider fetch. When
|
|
18
|
+
* omitted, the server Provider does the fetch itself.
|
|
19
|
+
*/
|
|
20
|
+
initialAppInfo?: import("./internal/banner-ui/app-info").PublicAppInfo | null;
|
|
21
|
+
}): Promise<React.ReactElement>;
|
|
22
|
+
//# sourceMappingURL=react.server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.server.d.ts","sourceRoot":"","sources":["../src/react.server.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAoDlC,wBAAsB,YAAY,CAAC,KAAK,EAAE;IACxC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,+BAA+B,EAAE,aAAa,GAAG,IAAI,CAAC;CAC/E,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAiC9B"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.useEazo = void 0;
|
|
37
|
+
exports.EazoProvider = EazoProvider;
|
|
38
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
|
+
const react_1 = require("./react");
|
|
40
|
+
const app_info_1 = require("./internal/banner-ui/app-info");
|
|
41
|
+
// Hooks must remain client-only; re-exporting them through the server
|
|
42
|
+
// entry keeps `import { useEazo } from "@eazo/sdk/react"` working for
|
|
43
|
+
// app code regardless of which entry the bundler picks.
|
|
44
|
+
var react_2 = require("./react");
|
|
45
|
+
Object.defineProperty(exports, "useEazo", { enumerable: true, get: function () { return react_2.useEazo; } });
|
|
46
|
+
/**
|
|
47
|
+
* UA fragments that mark the request as coming from an Eazo Mobile
|
|
48
|
+
* WebView. When the SDK detects any of these on the SSR request, it
|
|
49
|
+
* skips the public-app-info prefetch — the handoff overlay never
|
|
50
|
+
* renders inside the host shell (`getHost() === "eazoMobile"`), so the
|
|
51
|
+
* fetch would be pure waste plus added TTFB.
|
|
52
|
+
*
|
|
53
|
+
* - `EazoMobile/` — explicit marker injected by `AppViewerFallback.tsx`
|
|
54
|
+
* via `applicationNameForUserAgent` on iOS.
|
|
55
|
+
* - `wv` — Android RN WebView default UA token (`Mozilla/5.0 (...; wv) ...`).
|
|
56
|
+
* Generic enough to catch the immersive iOS WebView too in some
|
|
57
|
+
* builds, and broad enough to cover any embedded RN WebView. False
|
|
58
|
+
* positives (a non-Eazo Android WebView hitting the template) just
|
|
59
|
+
* fall back to the existing client fetch — same as before SSR.
|
|
60
|
+
*/
|
|
61
|
+
const MOBILE_WEBVIEW_UA_MARKERS = ["EazoMobile/", " wv)", "(wv;"];
|
|
62
|
+
function isMobileWebViewUserAgent(ua) {
|
|
63
|
+
if (!ua)
|
|
64
|
+
return false;
|
|
65
|
+
for (const marker of MOBILE_WEBVIEW_UA_MARKERS) {
|
|
66
|
+
if (ua.indexOf(marker) !== -1)
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Reads the request's `User-Agent` via Next.js `headers()`. Dynamically
|
|
73
|
+
* imported so non-Next.js RSC bundlers don't blow up at load time —
|
|
74
|
+
* returns `null` on any failure (header not available, runtime doesn't
|
|
75
|
+
* ship `next/headers`, etc.), which means the prefetch path runs
|
|
76
|
+
* unchanged outside Next.
|
|
77
|
+
*/
|
|
78
|
+
async function getRequestUserAgent() {
|
|
79
|
+
try {
|
|
80
|
+
// `next/headers` is intentionally NOT a dependency of `@eazo/sdk` —
|
|
81
|
+
// it's resolved at runtime only when the SDK ships inside a Next.js
|
|
82
|
+
// RSC bundle. The `@ts-expect-error` keeps tsc quiet about the
|
|
83
|
+
// unresolvable module path; the try/catch handles every other
|
|
84
|
+
// runtime where the import throws.
|
|
85
|
+
// @ts-expect-error - Optional peer; resolved only in Next.js runtimes.
|
|
86
|
+
const headersModule = (await Promise.resolve().then(() => __importStar(require("next/headers"))));
|
|
87
|
+
const requestHeaders = await headersModule.headers();
|
|
88
|
+
return requestHeaders.get("user-agent");
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
async function EazoProvider(props) {
|
|
95
|
+
if (!props.appId) {
|
|
96
|
+
throw new Error("@eazo/sdk: <EazoProvider appId> is required. Pass your Eazo app id explicitly.");
|
|
97
|
+
}
|
|
98
|
+
// Skip the prefetch entirely when the request comes from inside an
|
|
99
|
+
// Eazo Mobile WebView — the handoff overlay is `getHost()`-gated and
|
|
100
|
+
// never renders there, so the fetch would just add TTFB for no
|
|
101
|
+
// user-visible benefit. Detection is best-effort (UA-based); on a
|
|
102
|
+
// false-negative the fetch still runs and the bounded 2s timeout
|
|
103
|
+
// caps the worst-case impact.
|
|
104
|
+
let initialAppInfo = null;
|
|
105
|
+
if (props.initialAppInfo !== undefined) {
|
|
106
|
+
initialAppInfo = props.initialAppInfo;
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
const ua = await getRequestUserAgent();
|
|
110
|
+
if (!isMobileWebViewUserAgent(ua)) {
|
|
111
|
+
initialAppInfo = await (0, app_info_1.fetchPublicAppInfo)(props.appId, {
|
|
112
|
+
apiBase: props.apiBase,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return ((0, jsx_runtime_1.jsx)(react_1.EazoProvider, { appId: props.appId, apiBase: props.apiBase, initialAppInfo: initialAppInfo, children: props.children }));
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=react.server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.server.js","sourceRoot":"","sources":["../src/react.server.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2EA,oCAmDC;;AA7GD,mCAA6D;AAC7D,4DAAmE;AAEnE,sEAAsE;AACtE,sEAAsE;AACtE,wDAAwD;AACxD,iCAAkC;AAAzB,gGAAA,OAAO,OAAA;AAEhB;;;;;;;;;;;;;;GAcG;AACH,MAAM,yBAAyB,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAE3E,SAAS,wBAAwB,CAAC,EAA6B;IAC7D,IAAI,CAAC,EAAE;QAAE,OAAO,KAAK,CAAC;IACtB,KAAK,MAAM,MAAM,IAAI,yBAAyB,EAAE,CAAC;QAC/C,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;IAC7C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;GAMG;AACH,KAAK,UAAU,mBAAmB;IAChC,IAAI,CAAC;QACH,oEAAoE;QACpE,oEAAoE;QACpE,+DAA+D;QAC/D,8DAA8D;QAC9D,mCAAmC;QACnC,uEAAuE;QACvE,MAAM,aAAa,GAAG,CAAC,wDAAa,cAAc,GAAC,CAElD,CAAC;QACF,MAAM,cAAc,GAAG,MAAM,aAAa,CAAC,OAAO,EAAE,CAAC;QACrD,OAAO,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,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