@replohq/sdk 0.4.0 → 0.6.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/_vendor/schemas/generated/consent.d.ts +2 -0
- package/consent/inject-script-descriptors.d.ts +11 -0
- package/consent/inject-script-descriptors.js +35 -0
- package/consent/inject-script-descriptors.js.map +7 -0
- package/consent/replo-scripts.js +3 -26
- package/consent/replo-scripts.js.map +2 -2
- package/lib/buildMetadata.d.ts +9 -0
- package/lib/buildMetadata.js +7 -0
- package/lib/buildMetadata.js.map +7 -0
- package/package.json +12 -1
|
@@ -10,6 +10,7 @@ export type ScriptTagDescriptor = {
|
|
|
10
10
|
} | {
|
|
11
11
|
kind: "inline";
|
|
12
12
|
body: string;
|
|
13
|
+
module?: boolean;
|
|
13
14
|
};
|
|
14
15
|
export type ReploScriptEntry = {
|
|
15
16
|
type: "GA4" | "GoogleTagManager" | "Meta" | "TikTok" | "Pinterest" | "Reddit" | "Snapchat" | "Hotjar" | "MicrosoftClarity" | "Contentsquare" | "Segment" | "Northbeam";
|
|
@@ -19,6 +20,7 @@ export type ReploScriptEntry = {
|
|
|
19
20
|
type: "snippet";
|
|
20
21
|
id: string;
|
|
21
22
|
body: string;
|
|
23
|
+
module?: boolean;
|
|
22
24
|
requiredConsent: ConsentCategory[];
|
|
23
25
|
} | {
|
|
24
26
|
type: "custom";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ScriptTagDescriptor } from "../_vendor/schemas/generated/consent";
|
|
2
|
+
/**
|
|
3
|
+
* Creates and appends the script nodes for `descriptors`, skipping node ids
|
|
4
|
+
* already in the document, and returns the created nodes so the caller owns
|
|
5
|
+
* their removal. Lives outside replo-scripts.tsx so the component file only
|
|
6
|
+
* exports components (HMR) and this stays off the published public surface.
|
|
7
|
+
*/
|
|
8
|
+
export declare function injectScriptDescriptors({ baseId, descriptors, }: {
|
|
9
|
+
baseId: string;
|
|
10
|
+
descriptors: ScriptTagDescriptor[];
|
|
11
|
+
}): HTMLScriptElement[];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function injectScriptDescriptors({
|
|
2
|
+
baseId,
|
|
3
|
+
descriptors
|
|
4
|
+
}) {
|
|
5
|
+
const createdNodes = [];
|
|
6
|
+
descriptors.forEach((descriptor, index) => {
|
|
7
|
+
const nodeId = `${baseId}#${index}`;
|
|
8
|
+
if (document.querySelector(`script[data-replo-script-id="${nodeId}"]`)) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const scriptElement = document.createElement("script");
|
|
12
|
+
scriptElement.dataset.reploScriptId = nodeId;
|
|
13
|
+
if (descriptor.kind === "external") {
|
|
14
|
+
scriptElement.src = descriptor.src;
|
|
15
|
+
scriptElement.async = true;
|
|
16
|
+
for (const [attributeName, attributeValue] of Object.entries(
|
|
17
|
+
descriptor.attributes ?? {}
|
|
18
|
+
)) {
|
|
19
|
+
scriptElement.setAttribute(attributeName, attributeValue);
|
|
20
|
+
}
|
|
21
|
+
} else {
|
|
22
|
+
if (descriptor.module) {
|
|
23
|
+
scriptElement.type = "module";
|
|
24
|
+
}
|
|
25
|
+
scriptElement.textContent = descriptor.body;
|
|
26
|
+
}
|
|
27
|
+
document.head.append(scriptElement);
|
|
28
|
+
createdNodes.push(scriptElement);
|
|
29
|
+
});
|
|
30
|
+
return createdNodes;
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
injectScriptDescriptors
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=inject-script-descriptors.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../consent/inject-script-descriptors.ts"],
|
|
4
|
+
"sourcesContent": ["import type { ScriptTagDescriptor } from \"schemas/generated/consent\";\n\n/**\n * Creates and appends the script nodes for `descriptors`, skipping node ids\n * already in the document, and returns the created nodes so the caller owns\n * their removal. Lives outside replo-scripts.tsx so the component file only\n * exports components (HMR) and this stays off the published public surface.\n */\nexport function injectScriptDescriptors({\n baseId,\n descriptors,\n}: {\n baseId: string;\n descriptors: ScriptTagDescriptor[];\n}): HTMLScriptElement[] {\n const createdNodes: HTMLScriptElement[] = [];\n descriptors.forEach((descriptor, index) => {\n const nodeId = `${baseId}#${index}`;\n if (document.querySelector(`script[data-replo-script-id=\"${nodeId}\"]`)) {\n return;\n }\n const scriptElement = document.createElement(\"script\");\n scriptElement.dataset.reploScriptId = nodeId;\n if (descriptor.kind === \"external\") {\n scriptElement.src = descriptor.src;\n scriptElement.async = true;\n for (const [attributeName, attributeValue] of Object.entries(\n descriptor.attributes ?? {},\n )) {\n scriptElement.setAttribute(attributeName, attributeValue);\n }\n } else {\n // Module snippets (top-level await, import()) are a SyntaxError as\n // classic scripts, so the type must survive injection.\n if (descriptor.module) {\n scriptElement.type = \"module\";\n }\n scriptElement.textContent = descriptor.body;\n }\n document.head.append(scriptElement);\n createdNodes.push(scriptElement);\n });\n return createdNodes;\n}\n"],
|
|
5
|
+
"mappings": "AAQO,SAAS,wBAAwB;AAAA,EACtC;AAAA,EACA;AACF,GAGwB;AACtB,QAAM,eAAoC,CAAC;AAC3C,cAAY,QAAQ,CAAC,YAAY,UAAU;AACzC,UAAM,SAAS,GAAG,MAAM,IAAI,KAAK;AACjC,QAAI,SAAS,cAAc,gCAAgC,MAAM,IAAI,GAAG;AACtE;AAAA,IACF;AACA,UAAM,gBAAgB,SAAS,cAAc,QAAQ;AACrD,kBAAc,QAAQ,gBAAgB;AACtC,QAAI,WAAW,SAAS,YAAY;AAClC,oBAAc,MAAM,WAAW;AAC/B,oBAAc,QAAQ;AACtB,iBAAW,CAAC,eAAe,cAAc,KAAK,OAAO;AAAA,QACnD,WAAW,cAAc,CAAC;AAAA,MAC5B,GAAG;AACD,sBAAc,aAAa,eAAe,cAAc;AAAA,MAC1D;AAAA,IACF,OAAO;AAGL,UAAI,WAAW,QAAQ;AACrB,sBAAc,OAAO;AAAA,MACvB;AACA,oBAAc,cAAc,WAAW;AAAA,IACzC;AACA,aAAS,KAAK,OAAO,aAAa;AAClC,iBAAa,KAAK,aAAa;AAAA,EACjC,CAAC;AACD,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/consent/replo-scripts.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect } from "react";
|
|
4
4
|
import { isConsentAllowed, useConsent } from "./consent-store";
|
|
5
|
+
import { injectScriptDescriptors } from "./inject-script-descriptors";
|
|
5
6
|
import { registerScript, unregisterScript } from "./script-registration-store";
|
|
6
7
|
import { buildScriptTags, defaultConsentFor } from "./script-snippets";
|
|
7
8
|
import { installConsentWindowApi } from "./window-api";
|
|
@@ -31,7 +32,7 @@ function descriptorsFor(entry) {
|
|
|
31
32
|
return [];
|
|
32
33
|
}
|
|
33
34
|
if (entry.type === "snippet") {
|
|
34
|
-
return [{ kind: "inline", body: entry.body }];
|
|
35
|
+
return [{ kind: "inline", body: entry.body, module: entry.module }];
|
|
35
36
|
}
|
|
36
37
|
return buildScriptTags({ type: entry.type, identifier: entry.identifier });
|
|
37
38
|
}
|
|
@@ -44,31 +45,7 @@ function InjectedScript({
|
|
|
44
45
|
if (typeof document === "undefined") {
|
|
45
46
|
return;
|
|
46
47
|
}
|
|
47
|
-
const createdNodes =
|
|
48
|
-
descriptors.forEach((descriptor, index) => {
|
|
49
|
-
const nodeId = `${baseId}#${index}`;
|
|
50
|
-
const existing = document.querySelector(
|
|
51
|
-
`script[data-replo-script-id="${nodeId}"]`
|
|
52
|
-
);
|
|
53
|
-
if (existing) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
const scriptElement = document.createElement("script");
|
|
57
|
-
scriptElement.dataset.reploScriptId = nodeId;
|
|
58
|
-
if (descriptor.kind === "external") {
|
|
59
|
-
scriptElement.src = descriptor.src;
|
|
60
|
-
scriptElement.async = true;
|
|
61
|
-
for (const [attributeName, attributeValue] of Object.entries(
|
|
62
|
-
descriptor.attributes ?? {}
|
|
63
|
-
)) {
|
|
64
|
-
scriptElement.setAttribute(attributeName, attributeValue);
|
|
65
|
-
}
|
|
66
|
-
} else {
|
|
67
|
-
scriptElement.textContent = descriptor.body;
|
|
68
|
-
}
|
|
69
|
-
document.head.append(scriptElement);
|
|
70
|
-
createdNodes.push(scriptElement);
|
|
71
|
-
});
|
|
48
|
+
const createdNodes = injectScriptDescriptors({ baseId, descriptors });
|
|
72
49
|
return () => {
|
|
73
50
|
for (const node of createdNodes) {
|
|
74
51
|
node.remove();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../consent/replo-scripts.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\";\n\nimport type {\n ConsentCategory,\n ReploScriptEntry,\n ScriptTagDescriptor,\n} from \"schemas/generated/consent\";\n\nimport { useEffect } from \"react\";\n\nimport { isConsentAllowed, useConsent } from \"./consent-store\";\nimport { registerScript, unregisterScript } from \"./script-registration-store\";\nimport { buildScriptTags, defaultConsentFor } from \"./script-snippets\";\nimport { installConsentWindowApi } from \"./window-api\";\n\n/**\n * Stable identity for an entry, used as React key and DOM dedupe key. `snippet`\n * and `custom` entries key on their `id`; identifier providers on type+id.\n */\nfunction scriptId(entry: ReploScriptEntry): string {\n if (entry.type === \"custom\") {\n return `custom:${entry.id}`;\n }\n if (entry.type === \"snippet\") {\n return `snippet:${entry.id}`;\n }\n return `${entry.type}:${entry.identifier}`;\n}\n\nfunction requiredConsentFor(entry: ReploScriptEntry): ConsentCategory[] {\n if (entry.type === \"custom\" || entry.type === \"snippet\") {\n return entry.requiredConsent;\n }\n return entry.requiredConsent ?? defaultConsentFor(entry.type);\n}\n\n/**\n * Resolves an entry to the concrete tags to inject. An identifier provider may\n * resolve to multiple tags (GA4 = external loader + inline config); a `snippet`\n * entry injects its pasted body inline; a `custom` entry is a single external\n * `src` or inline `body`.\n */\nfunction descriptorsFor(entry: ReploScriptEntry): ScriptTagDescriptor[] {\n if (entry.type === \"custom\") {\n if (entry.src) {\n return [{ kind: \"external\", src: entry.src }];\n }\n if (entry.body) {\n return [{ kind: \"inline\", body: entry.body }];\n }\n return [];\n }\n if (entry.type === \"snippet\") {\n return [{ kind: \"inline\", body: entry.body }];\n }\n return buildScriptTags({ type: entry.type, identifier: entry.identifier });\n}\n\n/**\n * Injects the resolved tags into `document.head` once a caller has decided\n * consent allows it. Reused both for author-managed `ReploScripts` entries and\n * for the implicit Replo first-party pixel.\n *\n * DOM insertion (not JSX) is required because inline `<script>` bodies set via\n * React's `dangerouslySetInnerHTML` never execute. Each node is tagged with\n * `data-replo-script-id` (plus a per-tag index) so re-renders and React Strict\n * Mode double-invokes do not double-inject.\n */\nexport function InjectedScript({\n baseId,\n descriptors,\n}: {\n baseId: string;\n descriptors: ScriptTagDescriptor[];\n}) {\n // Re-inject only when the resolved tags actually change.\n const injectionKey = `${baseId}|${JSON.stringify(descriptors)}`;\n\n // eslint-disable-next-line replo/no-use-effect -- script injection is a DOM side effect that must run after mount and on consent changes\n useEffect(() => {\n if (typeof document === \"undefined\") {\n return;\n }\n const createdNodes
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport type {\n ConsentCategory,\n ReploScriptEntry,\n ScriptTagDescriptor,\n} from \"schemas/generated/consent\";\n\nimport { useEffect } from \"react\";\n\nimport { isConsentAllowed, useConsent } from \"./consent-store\";\nimport { injectScriptDescriptors } from \"./inject-script-descriptors\";\nimport { registerScript, unregisterScript } from \"./script-registration-store\";\nimport { buildScriptTags, defaultConsentFor } from \"./script-snippets\";\nimport { installConsentWindowApi } from \"./window-api\";\n\n/**\n * Stable identity for an entry, used as React key and DOM dedupe key. `snippet`\n * and `custom` entries key on their `id`; identifier providers on type+id.\n */\nfunction scriptId(entry: ReploScriptEntry): string {\n if (entry.type === \"custom\") {\n return `custom:${entry.id}`;\n }\n if (entry.type === \"snippet\") {\n return `snippet:${entry.id}`;\n }\n return `${entry.type}:${entry.identifier}`;\n}\n\nfunction requiredConsentFor(entry: ReploScriptEntry): ConsentCategory[] {\n if (entry.type === \"custom\" || entry.type === \"snippet\") {\n return entry.requiredConsent;\n }\n return entry.requiredConsent ?? defaultConsentFor(entry.type);\n}\n\n/**\n * Resolves an entry to the concrete tags to inject. An identifier provider may\n * resolve to multiple tags (GA4 = external loader + inline config); a `snippet`\n * entry injects its pasted body inline; a `custom` entry is a single external\n * `src` or inline `body`.\n */\nfunction descriptorsFor(entry: ReploScriptEntry): ScriptTagDescriptor[] {\n if (entry.type === \"custom\") {\n if (entry.src) {\n return [{ kind: \"external\", src: entry.src }];\n }\n if (entry.body) {\n return [{ kind: \"inline\", body: entry.body }];\n }\n return [];\n }\n if (entry.type === \"snippet\") {\n return [{ kind: \"inline\", body: entry.body, module: entry.module }];\n }\n return buildScriptTags({ type: entry.type, identifier: entry.identifier });\n}\n\n/**\n * Injects the resolved tags into `document.head` once a caller has decided\n * consent allows it. Reused both for author-managed `ReploScripts` entries and\n * for the implicit Replo first-party pixel.\n *\n * DOM insertion (not JSX) is required because inline `<script>` bodies set via\n * React's `dangerouslySetInnerHTML` never execute. Each node is tagged with\n * `data-replo-script-id` (plus a per-tag index) so re-renders and React Strict\n * Mode double-invokes do not double-inject.\n */\nexport function InjectedScript({\n baseId,\n descriptors,\n}: {\n baseId: string;\n descriptors: ScriptTagDescriptor[];\n}) {\n // Re-inject only when the resolved tags actually change.\n const injectionKey = `${baseId}|${JSON.stringify(descriptors)}`;\n\n // eslint-disable-next-line replo/no-use-effect -- script injection is a DOM side effect that must run after mount and on consent changes\n useEffect(() => {\n if (typeof document === \"undefined\") {\n return;\n }\n const createdNodes = injectScriptDescriptors({ baseId, descriptors });\n\n return () => {\n // Removing the node does not unload an already-loaded vendor (see the plan's\n // revocation note); full teardown is a reload triggered by the banner. This\n // cleanup keeps the DOM tidy and prevents duplicates across remounts.\n for (const node of createdNodes) {\n node.remove();\n }\n };\n }, [injectionKey]);\n\n return null;\n}\n\nfunction ManagedScript({ entry }: { entry: ReploScriptEntry }) {\n const consent = useConsent();\n const requiredConsent = requiredConsentFor(entry);\n const id = scriptId(entry);\n const consentKey = requiredConsent.join(\",\");\n\n // eslint-disable-next-line replo/no-use-effect -- register/unregister with the singleton so the analytics provider can gate sinks by what's on the page\n useEffect(() => {\n registerScript({ id, type: entry.type, requiredConsent });\n return () => unregisterScript(id);\n }, [id, entry.type, consentKey]);\n\n if (!isConsentAllowed({ state: consent, requiredConsent })) {\n return null;\n }\n return <InjectedScript baseId={id} descriptors={descriptorsFor(entry)} />;\n}\n\n/**\n * The single registry component for all managed tracking scripts on the site.\n * Authored once in `app/layout.tsx`; the agent/miniapp only edit the `scripts`\n * array. Each entry registers itself and is gated + injected per consent.\n */\nexport function ReploScripts({ scripts }: { scripts: ReploScriptEntry[] }) {\n // eslint-disable-next-line replo/no-use-effect -- install the window.Replo.customerPrivacy API + change event once the consent runtime mounts\n useEffect(() => installConsentWindowApi(), []);\n\n return (\n <>\n {scripts.map((entry) => (\n <ManagedScript key={scriptId(entry)} entry={entry} />\n ))}\n </>\n );\n}\n"],
|
|
5
|
+
"mappings": ";AAkHS,SAaL,UAbK;AA1GT,SAAS,iBAAiB;AAE1B,SAAS,kBAAkB,kBAAkB;AAC7C,SAAS,+BAA+B;AACxC,SAAS,gBAAgB,wBAAwB;AACjD,SAAS,iBAAiB,yBAAyB;AACnD,SAAS,+BAA+B;AAMxC,SAAS,SAAS,OAAiC;AACjD,MAAI,MAAM,SAAS,UAAU;AAC3B,WAAO,UAAU,MAAM,EAAE;AAAA,EAC3B;AACA,MAAI,MAAM,SAAS,WAAW;AAC5B,WAAO,WAAW,MAAM,EAAE;AAAA,EAC5B;AACA,SAAO,GAAG,MAAM,IAAI,IAAI,MAAM,UAAU;AAC1C;AAEA,SAAS,mBAAmB,OAA4C;AACtE,MAAI,MAAM,SAAS,YAAY,MAAM,SAAS,WAAW;AACvD,WAAO,MAAM;AAAA,EACf;AACA,SAAO,MAAM,mBAAmB,kBAAkB,MAAM,IAAI;AAC9D;AAQA,SAAS,eAAe,OAAgD;AACtE,MAAI,MAAM,SAAS,UAAU;AAC3B,QAAI,MAAM,KAAK;AACb,aAAO,CAAC,EAAE,MAAM,YAAY,KAAK,MAAM,IAAI,CAAC;AAAA,IAC9C;AACA,QAAI,MAAM,MAAM;AACd,aAAO,CAAC,EAAE,MAAM,UAAU,MAAM,MAAM,KAAK,CAAC;AAAA,IAC9C;AACA,WAAO,CAAC;AAAA,EACV;AACA,MAAI,MAAM,SAAS,WAAW;AAC5B,WAAO,CAAC,EAAE,MAAM,UAAU,MAAM,MAAM,MAAM,QAAQ,MAAM,OAAO,CAAC;AAAA,EACpE;AACA,SAAO,gBAAgB,EAAE,MAAM,MAAM,MAAM,YAAY,MAAM,WAAW,CAAC;AAC3E;AAYO,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AACF,GAGG;AAED,QAAM,eAAe,GAAG,MAAM,IAAI,KAAK,UAAU,WAAW,CAAC;AAG7D,YAAU,MAAM;AACd,QAAI,OAAO,aAAa,aAAa;AACnC;AAAA,IACF;AACA,UAAM,eAAe,wBAAwB,EAAE,QAAQ,YAAY,CAAC;AAEpE,WAAO,MAAM;AAIX,iBAAW,QAAQ,cAAc;AAC/B,aAAK,OAAO;AAAA,MACd;AAAA,IACF;AAAA,EACF,GAAG,CAAC,YAAY,CAAC;AAEjB,SAAO;AACT;AAEA,SAAS,cAAc,EAAE,MAAM,GAAgC;AAC7D,QAAM,UAAU,WAAW;AAC3B,QAAM,kBAAkB,mBAAmB,KAAK;AAChD,QAAM,KAAK,SAAS,KAAK;AACzB,QAAM,aAAa,gBAAgB,KAAK,GAAG;AAG3C,YAAU,MAAM;AACd,mBAAe,EAAE,IAAI,MAAM,MAAM,MAAM,gBAAgB,CAAC;AACxD,WAAO,MAAM,iBAAiB,EAAE;AAAA,EAClC,GAAG,CAAC,IAAI,MAAM,MAAM,UAAU,CAAC;AAE/B,MAAI,CAAC,iBAAiB,EAAE,OAAO,SAAS,gBAAgB,CAAC,GAAG;AAC1D,WAAO;AAAA,EACT;AACA,SAAO,oBAAC,kBAAe,QAAQ,IAAI,aAAa,eAAe,KAAK,GAAG;AACzE;AAOO,SAAS,aAAa,EAAE,QAAQ,GAAoC;AAEzE,YAAU,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAE7C,SACE,gCACG,kBAAQ,IAAI,CAAC,UACZ,oBAAC,iBAAoC,SAAjB,SAAS,KAAK,CAAiB,CACpD,GACH;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../lib/buildMetadata.ts"],
|
|
4
|
+
"sourcesContent": ["type BuildMetadata = {\n packageName: string;\n version: string;\n branch: string | null;\n commit: string | null;\n builtAt: string | null;\n};\n\nexport const BUILD_METADATA: BuildMetadata = {\n packageName: \"@replohq/sdk\",\n version: \"0.0.0-dev\",\n branch: null,\n commit: null,\n builtAt: null,\n};\n"],
|
|
5
|
+
"mappings": "AAQO,MAAM,iBAAgC;AAAA,EAC3C,aAAa;AAAA,EACb,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@replohq/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"reploBuild": {
|
|
5
|
+
"packageName": "@replohq/sdk",
|
|
6
|
+
"version": "0.6.0",
|
|
7
|
+
"branch": "HEAD",
|
|
8
|
+
"commit": "bcdd1e929edca05c6245d0bc2af6978fc9e402e8",
|
|
9
|
+
"builtAt": "2026-08-19T16:52:57.734Z"
|
|
10
|
+
},
|
|
4
11
|
"description": "Replo SDK — cart, analytics, and data loaders for agent-built Next.js sites.",
|
|
5
12
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
13
|
"type": "module",
|
|
@@ -66,6 +73,10 @@
|
|
|
66
73
|
"types": "./hooks/use-formatted-price.d.ts",
|
|
67
74
|
"default": "./hooks/use-formatted-price.js"
|
|
68
75
|
},
|
|
76
|
+
"./lib/buildMetadata": {
|
|
77
|
+
"types": "./lib/buildMetadata.d.ts",
|
|
78
|
+
"default": "./lib/buildMetadata.js"
|
|
79
|
+
},
|
|
69
80
|
"./analytics/analytics-provider": {
|
|
70
81
|
"types": "./analytics/analytics-provider.d.ts",
|
|
71
82
|
"default": "./analytics/analytics-provider.js"
|