@replohq/sdk 0.13.0 → 0.15.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.
@@ -0,0 +1,16 @@
1
+ /**
2
+ * NOTE (Max, 2026-08-26): A site can be hosted somewhere that owns outbound
3
+ * navigation. The Replo sandbox is the case that forces this: its preview runs
4
+ * in an iframe that may not navigate away, and checkout providers refuse to be
5
+ * framed, so the host opens the destination in a new tab instead. Sites that
6
+ * are not hosted register nothing and navigate normally.
7
+ *
8
+ * The handler is read off a well-known `window` key rather than imported,
9
+ * because the host that registers it (`@replohq/sandbox-runtime`) publishes
10
+ * independently of this package and the two must not depend on each other.
11
+ * @module
12
+ */
13
+ export declare const EXTERNAL_NAVIGATION_HANDLER_KEY = "__reploExternalNavigationHandler";
14
+ /** Returns true when the host took ownership of the navigation. */
15
+ export type ExternalNavigationHandler = (url: string) => boolean;
16
+ export declare function navigateExternal(url: string): void;
@@ -0,0 +1,13 @@
1
+ const EXTERNAL_NAVIGATION_HANDLER_KEY = "__reploExternalNavigationHandler";
2
+ function navigateExternal(url) {
3
+ const handler = Reflect.get(window, EXTERNAL_NAVIGATION_HANDLER_KEY);
4
+ if (typeof handler === "function" && handler(url) === true) {
5
+ return;
6
+ }
7
+ window.location.href = url;
8
+ }
9
+ export {
10
+ EXTERNAL_NAVIGATION_HANDLER_KEY,
11
+ navigateExternal
12
+ };
13
+ //# sourceMappingURL=external-navigation.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../lib/external-navigation.ts"],
4
+ "sourcesContent": ["/**\n * NOTE (Max, 2026-08-26): A site can be hosted somewhere that owns outbound\n * navigation. The Replo sandbox is the case that forces this: its preview runs\n * in an iframe that may not navigate away, and checkout providers refuse to be\n * framed, so the host opens the destination in a new tab instead. Sites that\n * are not hosted register nothing and navigate normally.\n *\n * The handler is read off a well-known `window` key rather than imported,\n * because the host that registers it (`@replohq/sandbox-runtime`) publishes\n * independently of this package and the two must not depend on each other.\n * @module\n */\nexport const EXTERNAL_NAVIGATION_HANDLER_KEY =\n \"__reploExternalNavigationHandler\";\n\n/** Returns true when the host took ownership of the navigation. */\nexport type ExternalNavigationHandler = (url: string) => boolean;\n\nexport function navigateExternal(url: string) {\n const handler = Reflect.get(window, EXTERNAL_NAVIGATION_HANDLER_KEY);\n if (typeof handler === \"function\" && handler(url) === true) {\n return;\n }\n\n window.location.href = url;\n}\n"],
5
+ "mappings": "AAYO,MAAM,kCACX;AAKK,SAAS,iBAAiB,KAAa;AAC5C,QAAM,UAAU,QAAQ,IAAI,QAAQ,+BAA+B;AACnE,MAAI,OAAO,YAAY,cAAc,QAAQ,GAAG,MAAM,MAAM;AAC1D;AAAA,EACF;AAEA,SAAO,SAAS,OAAO;AACzB;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@replohq/sdk",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "reploBuild": {
5
5
  "packageName": "@replohq/sdk",
6
- "version": "0.13.0",
6
+ "version": "0.15.0",
7
7
  "branch": "HEAD",
8
- "commit": "56e0eef69efd5e5baff88bcd4428e1b34adcc765",
9
- "builtAt": "2026-08-26T20:40:22.478Z"
8
+ "commit": "24d52db6a49bcade4693ce801896805675d114fe",
9
+ "builtAt": "2026-08-27T00:53:22.404Z"
10
10
  },
11
11
  "description": "Replo SDK — cart, analytics, and data loaders for agent-built Next.js sites.",
12
12
  "license": "SEE LICENSE IN LICENSE",
@@ -205,6 +205,10 @@
205
205
  "types": "./orders/order-status-schema.d.ts",
206
206
  "default": "./orders/order-status-schema.js"
207
207
  },
208
+ "./content": {
209
+ "types": "./content.d.ts",
210
+ "default": "./content.js"
211
+ },
208
212
  "./next/config": {
209
213
  "types": "./next/config.d.ts",
210
214
  "default": "./next/config.js"
@@ -242,8 +246,12 @@
242
246
  "dependencies": {
243
247
  "@formatjs/intl-localematcher": "^0.8.13",
244
248
  "negotiator": "^1.0.0",
249
+ "react-markdown": "^9.1.0",
250
+ "remark-gfm": "^4.0.1",
251
+ "server-only": "^0.0.1",
245
252
  "tiny-jsonc": "^1.0.2",
246
253
  "uuid": "^11.1.0",
254
+ "yaml": "^2.8.3",
247
255
  "zod": "^4.3.6"
248
256
  },
249
257
  "peerDependencies": {