@replohq/canopy-sdk 2.6.0 → 3.0.1

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.
Files changed (389) hide show
  1. package/_vendor/replo-utils/lib/fonts.mjs +1 -0
  2. package/_vendor/replo-utils/lib/geometry.mjs +2 -0
  3. package/_vendor/replo-utils/lib/json.mjs +1 -0
  4. package/_vendor/replo-utils/lib/misc.mjs +1 -0
  5. package/_vendor/replo-utils/lib/posthogReplay.mjs +2 -0
  6. package/_vendor/replo-utils/lib/url.mjs +1 -0
  7. package/_vendor/replo-utils/react/use-iframe-rpc-channel.mjs +1 -1
  8. package/_vendor/schemas/designLibrary.mjs +1 -1
  9. package/_vendor/schemas/generated/consent.d.ts +2 -0
  10. package/_vendor/schemas/generated/selectModeIframeRpc.d.ts +8 -0
  11. package/_vendor/schemas/iframeRpcChannel.mjs +2 -1
  12. package/_vendor/schemas/loaderKeys.d.ts +1 -1
  13. package/_vendor/schemas/loaderKeys.mjs +103 -23
  14. package/_vendor/schemas/money.mjs +1860 -3
  15. package/_vendor/schemas/pageAnnotations.mjs +1 -1
  16. package/_vendor/schemas/routing/match.mjs +1 -0
  17. package/_vendor/schemas/routing/rules.mjs +2 -1
  18. package/_vendor/schemas/selectMode.d.ts +4 -4
  19. package/_vendor/schemas/selectMode.mjs +1 -0
  20. package/_vendor/schemas/selectModeIframeRpc.d.ts +25 -5
  21. package/_vendor/schemas/selectModeIframeRpc.mjs +12 -3
  22. package/analytics/analytics-provider.d.ts +5 -10
  23. package/analytics/analytics-provider.js +14 -101
  24. package/analytics/analytics-provider.js.map +2 -2
  25. package/analytics/get-analytics-sinks.d.ts +2 -19
  26. package/analytics/get-analytics-sinks.js +9 -46
  27. package/analytics/get-analytics-sinks.js.map +2 -2
  28. package/analytics/hooks/use-product-viewed-analytics.d.ts +2 -6
  29. package/analytics/hooks/use-product-viewed-analytics.js +6 -28
  30. package/analytics/hooks/use-product-viewed-analytics.js.map +2 -2
  31. package/analytics/replo-first-party-pixel.d.ts +3 -12
  32. package/analytics/replo-first-party-pixel.js +8 -24
  33. package/analytics/replo-first-party-pixel.js.map +2 -2
  34. package/analytics/replo-pixel-script.d.ts +4 -10
  35. package/analytics/replo-pixel-script.js +9 -23
  36. package/analytics/replo-pixel-script.js.map +2 -2
  37. package/analytics/sinks/ga4-sink.d.ts +10 -9
  38. package/analytics/sinks/ga4-sink.js +99 -50
  39. package/analytics/sinks/ga4-sink.js.map +2 -2
  40. package/analytics/sinks/meta-sink.d.ts +5 -4
  41. package/analytics/sinks/meta-sink.js +82 -29
  42. package/analytics/sinks/meta-sink.js.map +2 -2
  43. package/analytics/sinks/pinterest-sink.d.ts +7 -6
  44. package/analytics/sinks/pinterest-sink.js +82 -49
  45. package/analytics/sinks/pinterest-sink.js.map +2 -2
  46. package/analytics/sinks/reddit-sink.d.ts +8 -7
  47. package/analytics/sinks/reddit-sink.js +82 -53
  48. package/analytics/sinks/reddit-sink.js.map +2 -2
  49. package/analytics/sinks/replo-sink.d.ts +9 -8
  50. package/analytics/sinks/replo-sink.js +89 -37
  51. package/analytics/sinks/replo-sink.js.map +2 -2
  52. package/analytics/sinks/snapchat-sink.d.ts +6 -5
  53. package/analytics/sinks/snapchat-sink.js +82 -40
  54. package/analytics/sinks/snapchat-sink.js.map +2 -2
  55. package/analytics/sinks/tiktok-sink.d.ts +8 -7
  56. package/analytics/sinks/tiktok-sink.js +82 -52
  57. package/analytics/sinks/tiktok-sink.js.map +2 -2
  58. package/analytics/sinks/window-sink.d.ts +11 -14
  59. package/analytics/sinks/window-sink.js +101 -28
  60. package/analytics/sinks/window-sink.js.map +2 -2
  61. package/analytics/utils/analytics-utils.d.ts +4 -2
  62. package/analytics/utils/analytics-utils.js +19 -123
  63. package/analytics/utils/analytics-utils.js.map +2 -2
  64. package/analytics/utils/navigation-tracker.d.ts +2 -1
  65. package/analytics/utils/navigation-tracker.js +37 -30
  66. package/analytics/utils/navigation-tracker.js.map +2 -2
  67. package/analytics/utils/shopify-funnel-gate.d.ts +2 -7
  68. package/analytics/utils/shopify-funnel-gate.js +8 -15
  69. package/analytics/utils/shopify-funnel-gate.js.map +2 -2
  70. package/cart/buy-now-action.d.ts +2 -9
  71. package/cart/buy-now-action.js +5 -97
  72. package/cart/buy-now-action.js.map +2 -2
  73. package/cart/cart-actions.d.ts +12 -56
  74. package/cart/cart-actions.js +88 -68
  75. package/cart/cart-actions.js.map +2 -2
  76. package/cart/cart-loader.d.ts +3 -9
  77. package/cart/cart-loader.js +14 -6
  78. package/cart/cart-loader.js.map +2 -2
  79. package/cart/cart-provider.d.ts +6 -58
  80. package/cart/cart-provider.js +13 -359
  81. package/cart/cart-provider.js.map +3 -3
  82. package/cart/cart-schema.d.ts +2 -1
  83. package/cart/cart-schema.js +12 -64
  84. package/cart/cart-schema.js.map +2 -2
  85. package/cart/cart-types.d.ts +1 -1
  86. package/cart/cart-types.js +5 -4
  87. package/cart/cart-types.js.map +2 -2
  88. package/cart/gateways/cart-constants.d.ts +1 -0
  89. package/cart/gateways/cart-constants.js.map +2 -2
  90. package/cart/gateways/cart-gateway.d.ts +1 -0
  91. package/cart/gateways/cart-gateway.js +13 -12
  92. package/cart/gateways/cart-gateway.js.map +2 -2
  93. package/cart/gateways/cookie-cart-gateway.d.ts +8 -11
  94. package/cart/gateways/cookie-cart-gateway.js +93 -97
  95. package/cart/gateways/cookie-cart-gateway.js.map +2 -2
  96. package/cart/gateways/default-cart-gateway.d.ts +10 -16
  97. package/cart/gateways/default-cart-gateway.js +13 -23
  98. package/cart/gateways/default-cart-gateway.js.map +2 -2
  99. package/cart/gateways/resolver-cart-gateway.d.ts +1 -0
  100. package/cart/gateways/resolver-cart-gateway.js +13 -102
  101. package/cart/gateways/resolver-cart-gateway.js.map +2 -2
  102. package/cart/gateways/stripe-cart-gateway.d.ts +10 -16
  103. package/cart/gateways/stripe-cart-gateway.js +13 -21
  104. package/cart/gateways/stripe-cart-gateway.js.map +2 -2
  105. package/cart/hooks/use-add-to-cart.d.ts +3 -47
  106. package/cart/hooks/use-add-to-cart.js +10 -115
  107. package/cart/hooks/use-add-to-cart.js.map +2 -2
  108. package/cart/hooks/use-buy-now.d.ts +1 -39
  109. package/cart/hooks/use-buy-now.js +5 -55
  110. package/cart/hooks/use-buy-now.js.map +2 -2
  111. package/cart/utils/cart-utils.d.ts +8 -35
  112. package/cart/utils/cart-utils.js +21 -35
  113. package/cart/utils/cart-utils.js.map +2 -2
  114. package/cart/utils/cookie-cart-persistence.d.ts +16 -41
  115. package/cart/utils/cookie-cart-persistence.js +38 -143
  116. package/cart/utils/cookie-cart-persistence.js.map +2 -2
  117. package/cart/utils/variant-to-cart-line.d.ts +12 -42
  118. package/cart/utils/variant-to-cart-line.js +31 -147
  119. package/cart/utils/variant-to-cart-line.js.map +2 -2
  120. package/chunk-UJCSKKID.mjs +27 -0
  121. package/{chunk-OFU2QEDR.mjs → chunk-ZZPQ3E7S.mjs} +50 -5
  122. package/consent/consent-action.d.ts +2 -1
  123. package/consent/consent-action.js +10 -20
  124. package/consent/consent-action.js.map +2 -2
  125. package/consent/consent-actions.d.ts +2 -13
  126. package/consent/consent-actions.js +9 -29
  127. package/consent/consent-actions.js.map +2 -2
  128. package/consent/consent-store.d.ts +9 -36
  129. package/consent/consent-store.js +12 -182
  130. package/consent/consent-store.js.map +2 -2
  131. package/consent/cookie.d.ts +9 -12
  132. package/consent/cookie.js +32 -64
  133. package/consent/cookie.js.map +2 -2
  134. package/consent/replo-scripts.d.ts +5 -18
  135. package/consent/replo-scripts.js +11 -94
  136. package/consent/replo-scripts.js.map +2 -2
  137. package/consent/script-registration-store.d.ts +6 -2
  138. package/consent/script-registration-store.js +33 -47
  139. package/consent/script-registration-store.js.map +2 -2
  140. package/consent/script-snippets.d.ts +4 -18
  141. package/consent/script-snippets.js +19 -127
  142. package/consent/script-snippets.js.map +2 -2
  143. package/consent/window-api.d.ts +4 -15
  144. package/consent/window-api.js +8 -63
  145. package/consent/window-api.js.map +2 -2
  146. package/editor/ClientErrorBoundary.d.ts +4 -10
  147. package/editor/ClientErrorBoundary.js +7 -55
  148. package/editor/ClientErrorBoundary.js.map +2 -2
  149. package/editor/DocumentReadyBeacon.d.ts +3 -1
  150. package/editor/DocumentReadyBeacon.js +6 -3
  151. package/editor/DocumentReadyBeacon.js.map +2 -2
  152. package/editor/LinkInterceptor.d.ts +1 -0
  153. package/editor/LinkInterceptor.js +6 -121
  154. package/editor/LinkInterceptor.js.map +2 -2
  155. package/editor/NextErrorReporter.d.ts +1 -0
  156. package/editor/NextErrorReporter.js +6 -85
  157. package/editor/NextErrorReporter.js.map +2 -2
  158. package/editor/annotations/AnnotationLayerMount.d.ts +1 -0
  159. package/editor/annotations/AnnotationLayerMount.js +6 -6
  160. package/editor/annotations/AnnotationLayerMount.js.map +2 -2
  161. package/editor/annotations/annotationController.d.ts +1 -0
  162. package/editor/annotations/annotationController.js +6 -378
  163. package/editor/annotations/annotationController.js.map +2 -2
  164. package/editor/annotations/bridgeGate.d.ts +4 -7
  165. package/editor/annotations/bridgeGate.js +13 -15
  166. package/editor/annotations/bridgeGate.js.map +2 -2
  167. package/editor/design-library-preview/DesignLibraryPreview.d.ts +1 -0
  168. package/editor/design-library-preview/DesignLibraryPreview.js +6 -86
  169. package/editor/design-library-preview/DesignLibraryPreview.js.map +2 -2
  170. package/editor/posthog-relay.d.ts +1 -10
  171. package/editor/posthog-relay.js +6 -65
  172. package/editor/posthog-relay.js.map +2 -2
  173. package/editor/select-mode/EditorSelection.d.ts +1 -23
  174. package/editor/select-mode/EditorSelection.js +5 -87
  175. package/editor/select-mode/EditorSelection.js.map +2 -2
  176. package/editor/select-mode/annotationFrames.d.ts +9 -9
  177. package/editor/select-mode/annotationFrames.js +22 -103
  178. package/editor/select-mode/annotationFrames.js.map +2 -2
  179. package/editor/select-mode/descriptor/elementDescriptor.d.ts +6 -21
  180. package/editor/select-mode/descriptor/elementDescriptor.js +19 -192
  181. package/editor/select-mode/descriptor/elementDescriptor.js.map +3 -3
  182. package/editor/select-mode/descriptor/styleExtraction.d.ts +4 -2
  183. package/editor/select-mode/descriptor/styleExtraction.js +11 -262
  184. package/editor/select-mode/descriptor/styleExtraction.js.map +2 -2
  185. package/editor/select-mode/displayModeStore.d.ts +2 -0
  186. package/editor/select-mode/displayModeStore.js +14 -39
  187. package/editor/select-mode/displayModeStore.js.map +2 -2
  188. package/editor/select-mode/fast-refresh-relay.d.ts +2 -1
  189. package/editor/select-mode/fast-refresh-relay.js +7 -28
  190. package/editor/select-mode/fast-refresh-relay.js.map +2 -2
  191. package/editor/select-mode/fiber.d.ts +14 -7
  192. package/editor/select-mode/fiber.js +40 -286
  193. package/editor/select-mode/fiber.js.map +2 -2
  194. package/editor/select-mode/hooks/useCrosshairCursor.d.ts +2 -9
  195. package/editor/select-mode/hooks/useCrosshairCursor.js +7 -15
  196. package/editor/select-mode/hooks/useCrosshairCursor.js.map +2 -2
  197. package/editor/select-mode/hooks/useEditModeStateMachine.d.ts +5 -3
  198. package/editor/select-mode/hooks/useEditModeStateMachine.js +13 -228
  199. package/editor/select-mode/hooks/useEditModeStateMachine.js.map +2 -2
  200. package/editor/select-mode/hooks/useOptimisticOverrides.d.ts +2 -1
  201. package/editor/select-mode/hooks/useOptimisticOverrides.js +6 -277
  202. package/editor/select-mode/hooks/useOptimisticOverrides.js.map +2 -2
  203. package/editor/select-mode/hooks/useParentMessaging.d.ts +2 -20
  204. package/editor/select-mode/hooks/useParentMessaging.js +7 -69
  205. package/editor/select-mode/hooks/useParentMessaging.js.map +2 -2
  206. package/editor/select-mode/hooks/useSelectModeController.d.ts +2 -1
  207. package/editor/select-mode/hooks/useSelectModeController.js +6 -40
  208. package/editor/select-mode/hooks/useSelectModeController.js.map +2 -2
  209. package/editor/select-mode/hooks/useSelectionHover.d.ts +2 -16
  210. package/editor/select-mode/hooks/useSelectionHover.js +7 -105
  211. package/editor/select-mode/hooks/useSelectionHover.js.map +2 -2
  212. package/editor/select-mode/hooks/useSelectionInteractions.d.ts +2 -26
  213. package/editor/select-mode/hooks/useSelectionInteractions.js +7 -348
  214. package/editor/select-mode/hooks/useSelectionInteractions.js.map +2 -2
  215. package/editor/select-mode/hooks/useSelectionScrollSync.d.ts +2 -22
  216. package/editor/select-mode/hooks/useSelectionScrollSync.js +7 -65
  217. package/editor/select-mode/hooks/useSelectionScrollSync.js.map +2 -2
  218. package/editor/select-mode/hooks/useSiblingResolution.d.ts +4 -2
  219. package/editor/select-mode/hooks/useSiblingResolution.js +13 -52
  220. package/editor/select-mode/hooks/useSiblingResolution.js.map +2 -2
  221. package/editor/select-mode/iframeRpcChannel.d.ts +10 -349
  222. package/editor/select-mode/iframeRpcChannel.js +23 -79
  223. package/editor/select-mode/iframeRpcChannel.js.map +2 -2
  224. package/editor/select-mode/inlineTextMarks.d.ts +4 -6
  225. package/editor/select-mode/inlineTextMarks.js +13 -18
  226. package/editor/select-mode/inlineTextMarks.js.map +2 -2
  227. package/editor/select-mode/interactions/selectionGeometry.d.ts +19 -61
  228. package/editor/select-mode/interactions/selectionGeometry.js +57 -165
  229. package/editor/select-mode/interactions/selectionGeometry.js.map +2 -2
  230. package/editor/select-mode/selectModeSession.d.ts +1 -0
  231. package/editor/select-mode/selectModeSession.js +6 -3
  232. package/editor/select-mode/selectModeSession.js.map +2 -2
  233. package/editor/select-mode/selectionFrame.d.ts +9 -60
  234. package/editor/select-mode/selectionFrame.js +28 -116
  235. package/editor/select-mode/selectionFrame.js.map +2 -2
  236. package/editor/select-mode/symbolicate.d.ts +2 -1
  237. package/editor/select-mode/symbolicate.js +7 -195
  238. package/editor/select-mode/symbolicate.js.map +2 -2
  239. package/editor/select-mode/tiptapInlineEditor.d.ts +15 -2
  240. package/editor/select-mode/tiptapInlineEditor.js +6 -114
  241. package/editor/select-mode/tiptapInlineEditor.js.map +2 -2
  242. package/env.d.ts +2 -1
  243. package/env.js +10 -37
  244. package/env.js.map +2 -2
  245. package/gateways/canopy-api.d.ts +15 -12
  246. package/gateways/canopy-api.js +122 -160
  247. package/gateways/canopy-api.js.map +2 -2
  248. package/hooks/use-client-value.d.ts +2 -10
  249. package/hooks/use-client-value.js +10 -7
  250. package/hooks/use-client-value.js.map +2 -2
  251. package/hooks/use-formatted-price.d.ts +1 -14
  252. package/hooks/use-formatted-price.js +6 -14
  253. package/hooks/use-formatted-price.js.map +2 -2
  254. package/lib/canopy-error.d.ts +2 -5
  255. package/lib/canopy-error.js +10 -14
  256. package/lib/canopy-error.js.map +2 -2
  257. package/lib/get-query-client.d.ts +2 -1
  258. package/lib/get-query-client.js +8 -27
  259. package/lib/get-query-client.js.map +2 -2
  260. package/lib/integration-utils.d.ts +1 -0
  261. package/lib/integration-utils.js +9 -3
  262. package/lib/integration-utils.js.map +2 -2
  263. package/lib/shopify-utils.d.ts +2 -10
  264. package/lib/shopify-utils.js +10 -2
  265. package/lib/shopify-utils.js.map +2 -2
  266. package/lib/tombstone.d.ts +21 -0
  267. package/lib/tombstone.js +99 -0
  268. package/lib/tombstone.js.map +7 -0
  269. package/lib/url-utils.d.ts +2 -4
  270. package/lib/url-utils.js +10 -3
  271. package/lib/url-utils.js.map +2 -2
  272. package/loaders/collection-loader.d.ts +3 -2
  273. package/loaders/collection-loader.js +5 -48
  274. package/loaders/collection-loader.js.map +2 -2
  275. package/loaders/collection-products-loader.d.ts +3 -2
  276. package/loaders/collection-products-loader.js +5 -51
  277. package/loaders/collection-products-loader.js.map +2 -2
  278. package/loaders/contentful-entries-loader.d.ts +3 -2
  279. package/loaders/contentful-entries-loader.js +5 -71
  280. package/loaders/contentful-entries-loader.js.map +2 -2
  281. package/loaders/contentful-entry-loader.d.ts +3 -2
  282. package/loaders/contentful-entry-loader.js +5 -53
  283. package/loaders/contentful-entry-loader.js.map +2 -2
  284. package/loaders/invoke-loader-action.d.ts +2 -8
  285. package/loaders/invoke-loader-action.js +13 -8
  286. package/loaders/invoke-loader-action.js.map +2 -2
  287. package/loaders/invoke-loader-server.d.ts +2 -14
  288. package/loaders/invoke-loader-server.js +12 -34
  289. package/loaders/invoke-loader-server.js.map +2 -2
  290. package/loaders/invoke-loader.d.ts +6 -12
  291. package/loaders/invoke-loader.js +27 -29
  292. package/loaders/invoke-loader.js.map +2 -2
  293. package/loaders/levanta-product-loader.d.ts +3 -2
  294. package/loaders/levanta-product-loader.js +5 -46
  295. package/loaders/levanta-product-loader.js.map +2 -2
  296. package/loaders/loader-error-boundary.d.ts +9 -15
  297. package/loaders/loader-error-boundary.js +50 -13
  298. package/loaders/loader-error-boundary.js.map +2 -2
  299. package/loaders/loader-keys.d.ts +4 -12
  300. package/loaders/loader-keys.js +6 -1
  301. package/loaders/loader-keys.js.map +2 -2
  302. package/loaders/loader-schemas.d.ts +142 -61
  303. package/loaders/loader-schemas.js +253 -90
  304. package/loaders/loader-schemas.js.map +2 -2
  305. package/loaders/metaobject-loader.d.ts +3 -2
  306. package/loaders/metaobject-loader.js +5 -47
  307. package/loaders/metaobject-loader.js.map +2 -2
  308. package/loaders/metaobjects-loader.d.ts +3 -2
  309. package/loaders/metaobjects-loader.js +5 -53
  310. package/loaders/metaobjects-loader.js.map +2 -2
  311. package/loaders/okendo-review-aggregate-loader.d.ts +9 -10
  312. package/loaders/okendo-review-aggregate-loader.js +5 -49
  313. package/loaders/okendo-review-aggregate-loader.js.map +2 -2
  314. package/loaders/okendo-reviews-loader.d.ts +8 -16
  315. package/loaders/okendo-reviews-loader.js +5 -47
  316. package/loaders/okendo-reviews-loader.js.map +2 -2
  317. package/loaders/prefetch-loaders.d.ts +4 -26
  318. package/loaders/prefetch-loaders.js +5 -40
  319. package/loaders/prefetch-loaders.js.map +2 -2
  320. package/loaders/preview-placeholder.d.ts +8 -22
  321. package/loaders/preview-placeholder.js +47 -209
  322. package/loaders/preview-placeholder.js.map +2 -2
  323. package/loaders/product-loader-args.d.ts +2 -11
  324. package/loaders/product-loader-args.js +6 -12
  325. package/loaders/product-loader-args.js.map +2 -2
  326. package/loaders/product-loader.d.ts +3 -2
  327. package/loaders/product-loader.js +5 -45
  328. package/loaders/product-loader.js.map +2 -2
  329. package/loaders/rebuy-recommendations-loader.d.ts +8 -157
  330. package/loaders/rebuy-recommendations-loader.js +5 -50
  331. package/loaders/rebuy-recommendations-loader.js.map +2 -2
  332. package/loaders/reviews-io-review-aggregate-loader.d.ts +5 -4
  333. package/loaders/reviews-io-review-aggregate-loader.js +5 -36
  334. package/loaders/reviews-io-review-aggregate-loader.js.map +2 -2
  335. package/loaders/reviews-io-reviews-loader.d.ts +5 -4
  336. package/loaders/reviews-io-reviews-loader.js +5 -58
  337. package/loaders/reviews-io-reviews-loader.js.map +2 -2
  338. package/loaders/smile-earning-rules-loader.d.ts +10 -11
  339. package/loaders/smile-earning-rules-loader.js +5 -37
  340. package/loaders/smile-earning-rules-loader.js.map +2 -2
  341. package/loaders/smile-rewards-loader.d.ts +10 -11
  342. package/loaders/smile-rewards-loader.js +5 -37
  343. package/loaders/smile-rewards-loader.js.map +2 -2
  344. package/loaders/smile-vip-tiers-loader.d.ts +9 -10
  345. package/loaders/smile-vip-tiers-loader.js +5 -36
  346. package/loaders/smile-vip-tiers-loader.js.map +2 -2
  347. package/loaders/statsig-experiment-loader.d.ts +3 -8
  348. package/loaders/statsig-experiment-loader.js +5 -74
  349. package/loaders/statsig-experiment-loader.js.map +2 -2
  350. package/loaders/vendor-loader-keys.d.ts +4 -0
  351. package/loaders/vendor-loader-keys.js +9 -0
  352. package/loaders/vendor-loader-keys.js.map +7 -0
  353. package/loaders/yotpo-review-aggregate-loader.d.ts +5 -4
  354. package/loaders/yotpo-review-aggregate-loader.js +5 -43
  355. package/loaders/yotpo-review-aggregate-loader.js.map +2 -2
  356. package/loaders/yotpo-reviews-loader.d.ts +5 -4
  357. package/loaders/yotpo-reviews-loader.js +5 -58
  358. package/loaders/yotpo-reviews-loader.js.map +2 -2
  359. package/money.d.ts +9 -9
  360. package/money.js +25 -6
  361. package/money.js.map +2 -2
  362. package/next/config.d.ts +3 -1
  363. package/next/config.js +11 -85
  364. package/next/config.js.map +2 -2
  365. package/next/image-loader.d.ts +2 -1
  366. package/next/image-loader.js +7 -47
  367. package/next/image-loader.js.map +2 -2
  368. package/next/open-next.d.ts +4 -2
  369. package/next/open-next.js +6 -19
  370. package/next/open-next.js.map +2 -2
  371. package/orders/order-status-schema.d.ts +28 -13
  372. package/orders/order-status-schema.js +45 -13
  373. package/orders/order-status-schema.js.map +2 -2
  374. package/orders/order-status.d.ts +2 -8
  375. package/orders/order-status.js +6 -36
  376. package/orders/order-status.js.map +2 -2
  377. package/package.json +1 -12
  378. package/providers/query-provider.d.ts +3 -1
  379. package/providers/query-provider.js +10 -6
  380. package/providers/query-provider.js.map +2 -2
  381. package/providers/replo-provider.d.ts +3 -1
  382. package/providers/replo-provider.js +6 -37
  383. package/providers/replo-provider.js.map +2 -2
  384. package/routing/evaluate.d.ts +3 -3
  385. package/routing/evaluate.js +5 -40
  386. package/routing/evaluate.js.map +2 -2
  387. package/routing/rules.d.ts +3 -11
  388. package/routing/rules.js +7 -1
  389. package/routing/rules.js.map +2 -2
package/consent/cookie.js CHANGED
@@ -1,74 +1,42 @@
1
- import { parseJsonOrNull } from "../_vendor/replo-utils/lib/json.mjs";
2
- import { z } from "zod";
1
+ import { canopyTombstoneError, canopyTombstoneObject } from "../lib/tombstone";
3
2
  const CONSENT_COOKIE_NAME = "replo_consent";
4
3
  const CONSENT_COOKIE_VERSION = 1;
5
4
  const CONSENT_COOKIE_MAX_AGE_SECONDS = 60 * 60 * 24 * 180;
6
- const persistedCookieSchema = z.object({
7
- version: z.literal(CONSENT_COOKIE_VERSION),
8
- decidedAt: z.number().optional(),
9
- consentId: z.string().optional(),
10
- categories: z.object({
11
- analytics: z.boolean(),
12
- marketing: z.boolean(),
13
- preferences: z.boolean(),
14
- sale_of_data: z.boolean()
15
- })
16
- });
17
- const DENIED_CATEGORIES = {
18
- necessary: true,
19
- analytics: false,
20
- marketing: false,
21
- preferences: false,
22
- sale_of_data: false
23
- };
24
- const GRANTED_CATEGORIES = {
25
- necessary: true,
26
- analytics: true,
27
- marketing: true,
28
- preferences: true,
29
- sale_of_data: true
30
- };
31
- function parseConsentCookie(rawCookie) {
32
- if (!rawCookie) {
33
- return null;
34
- }
35
- const match = rawCookie.split("; ").find((entry) => entry.startsWith(`${CONSENT_COOKIE_NAME}=`));
36
- const encoded = match ? match.slice(CONSENT_COOKIE_NAME.length + 1) : rawCookie;
37
- let decoded;
38
- try {
39
- decoded = decodeURIComponent(encoded);
40
- } catch {
41
- return null;
5
+ const DENIED_CATEGORIES = canopyTombstoneObject({
6
+ symbol: "DENIED_CATEGORIES",
7
+ subpath: "consent/cookie",
8
+ replacement: {
9
+ kind: "internal",
10
+ nearestPublicSubpaths: ["consent/consent-store", "consent/replo-scripts"]
42
11
  }
43
- const result = persistedCookieSchema.safeParse(parseJsonOrNull(decoded));
44
- if (!result.success) {
45
- return null;
12
+ });
13
+ const GRANTED_CATEGORIES = canopyTombstoneObject({
14
+ symbol: "GRANTED_CATEGORIES",
15
+ subpath: "consent/cookie",
16
+ replacement: {
17
+ kind: "internal",
18
+ nearestPublicSubpaths: ["consent/consent-store", "consent/replo-scripts"]
46
19
  }
47
- const { decidedAt, categories, consentId } = result.data;
48
- return {
49
- version: CONSENT_COOKIE_VERSION,
50
- decidedAt: decidedAt ?? Date.now(),
51
- consentId,
52
- categories
53
- };
20
+ });
21
+ function parseConsentCookie(_rawCookie) {
22
+ throw canopyTombstoneError({
23
+ symbol: "parseConsentCookie",
24
+ subpath: "consent/cookie",
25
+ replacement: {
26
+ kind: "internal",
27
+ nearestPublicSubpaths: ["consent/consent-store", "consent/replo-scripts"]
28
+ }
29
+ });
54
30
  }
55
- function serializeConsentCookieValue({
56
- categories,
57
- decidedAt,
58
- consentId
59
- }) {
60
- const payload = {
61
- version: CONSENT_COOKIE_VERSION,
62
- decidedAt,
63
- consentId,
64
- categories: {
65
- analytics: categories.analytics,
66
- marketing: categories.marketing,
67
- preferences: categories.preferences,
68
- sale_of_data: categories.sale_of_data
31
+ function serializeConsentCookieValue(_args) {
32
+ throw canopyTombstoneError({
33
+ symbol: "serializeConsentCookieValue",
34
+ subpath: "consent/cookie",
35
+ replacement: {
36
+ kind: "internal",
37
+ nearestPublicSubpaths: ["consent/consent-store", "consent/replo-scripts"]
69
38
  }
70
- };
71
- return encodeURIComponent(JSON.stringify(payload));
39
+ });
72
40
  }
73
41
  export {
74
42
  CONSENT_COOKIE_MAX_AGE_SECONDS,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../consent/cookie.ts"],
4
- "sourcesContent": ["import type { ConsentCategory } from \"schemas/generated/consent\";\n\nimport { parseJsonOrNull } from \"replo-utils/lib/json\";\nimport { z } from \"zod\";\n\n/**\n * Pure (non-React, framework-agnostic) consent cookie helpers used by the client\n * store (`consent-store.ts`).\n */\n\nexport const CONSENT_COOKIE_NAME = \"replo_consent\";\nexport const CONSENT_COOKIE_VERSION = 1;\nexport const CONSENT_COOKIE_MAX_AGE_SECONDS = 60 * 60 * 24 * 180; // 180 days\n\n// Validates the untrusted JSON cookie payload at the parse boundary. A stale\n// version (or any shape mismatch) fails `safeParse`, so the caller treats the\n// visitor as undecided and re-prompts.\n//\n// `consentId` is OPTIONAL on purpose: it was added after v1 shipped, and we must\n// NOT bump `CONSENT_COOKIE_VERSION` to introduce it. Bumping would fail this\n// `safeParse` for every existing cookie, re-showing the banner and dropping the\n// visitor's prior decision. Optional keeps v1 cookies valid; `commit()` lazily\n// backfills the id on the next interaction.\nconst persistedCookieSchema = z.object({\n version: z.literal(CONSENT_COOKIE_VERSION),\n decidedAt: z.number().optional(),\n consentId: z.string().optional(),\n categories: z.object({\n analytics: z.boolean(),\n marketing: z.boolean(),\n preferences: z.boolean(),\n sale_of_data: z.boolean(),\n }),\n});\n\nexport type ConsentCategories = Record<ConsentCategory, boolean>;\n\n/** Persisted cookie payload. `necessary` is always granted and never stored. */\nexport interface ConsentCookiePayload {\n version: number;\n decidedAt: number;\n /** Persistent pseudonymous per-browser id; absent on pre-id (legacy) cookies. */\n consentId?: string;\n categories: {\n analytics: boolean;\n marketing: boolean;\n preferences: boolean;\n sale_of_data: boolean;\n };\n}\n\nexport const DENIED_CATEGORIES: ConsentCategories = {\n necessary: true,\n analytics: false,\n marketing: false,\n preferences: false,\n sale_of_data: false,\n};\n\nexport const GRANTED_CATEGORIES: ConsentCategories = {\n necessary: true,\n analytics: true,\n marketing: true,\n preferences: true,\n sale_of_data: true,\n};\n\n/**\n * Parse a raw `document.cookie` (or a single cookie value) into a payload.\n * Returns null for missing, malformed, or stale-version cookies so callers\n * treat the visitor as undecided and re-prompt.\n */\nexport function parseConsentCookie(\n rawCookie: string | undefined,\n): ConsentCookiePayload | null {\n if (!rawCookie) {\n return null;\n }\n const match = rawCookie\n .split(\"; \")\n .find((entry) => entry.startsWith(`${CONSENT_COOKIE_NAME}=`));\n const encoded = match\n ? match.slice(CONSENT_COOKIE_NAME.length + 1)\n : rawCookie;\n\n // A tampered/corrupted cookie (bad percent-encoding) must not throw \u2014 that\n // would crash the client snapshot or the server seed read. Treat as undecided.\n let decoded: string;\n try {\n decoded = decodeURIComponent(encoded);\n } catch {\n return null;\n }\n\n const result = persistedCookieSchema.safeParse(parseJsonOrNull(decoded));\n if (!result.success) {\n return null;\n }\n const { decidedAt, categories, consentId } = result.data;\n\n return {\n version: CONSENT_COOKIE_VERSION,\n decidedAt: decidedAt ?? Date.now(),\n consentId,\n categories,\n };\n}\n\n/** Serialize categories into the JSON-encoded cookie value (not the full Set-Cookie line). */\nexport function serializeConsentCookieValue({\n categories,\n decidedAt,\n consentId,\n}: {\n categories: ConsentCategories;\n decidedAt: number;\n consentId?: string;\n}): string {\n const payload: ConsentCookiePayload = {\n version: CONSENT_COOKIE_VERSION,\n decidedAt,\n consentId,\n categories: {\n analytics: categories.analytics,\n marketing: categories.marketing,\n preferences: categories.preferences,\n sale_of_data: categories.sale_of_data,\n },\n };\n return encodeURIComponent(JSON.stringify(payload));\n}\n"],
5
- "mappings": "AAEA,SAAS,uBAAuB;AAChC,SAAS,SAAS;AAOX,MAAM,sBAAsB;AAC5B,MAAM,yBAAyB;AAC/B,MAAM,iCAAiC,KAAK,KAAK,KAAK;AAW7D,MAAM,wBAAwB,EAAE,OAAO;AAAA,EACrC,SAAS,EAAE,QAAQ,sBAAsB;AAAA,EACzC,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,YAAY,EAAE,OAAO;AAAA,IACnB,WAAW,EAAE,QAAQ;AAAA,IACrB,WAAW,EAAE,QAAQ;AAAA,IACrB,aAAa,EAAE,QAAQ;AAAA,IACvB,cAAc,EAAE,QAAQ;AAAA,EAC1B,CAAC;AACH,CAAC;AAkBM,MAAM,oBAAuC;AAAA,EAClD,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,aAAa;AAAA,EACb,cAAc;AAChB;AAEO,MAAM,qBAAwC;AAAA,EACnD,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,aAAa;AAAA,EACb,cAAc;AAChB;AAOO,SAAS,mBACd,WAC6B;AAC7B,MAAI,CAAC,WAAW;AACd,WAAO;AAAA,EACT;AACA,QAAM,QAAQ,UACX,MAAM,IAAI,EACV,KAAK,CAAC,UAAU,MAAM,WAAW,GAAG,mBAAmB,GAAG,CAAC;AAC9D,QAAM,UAAU,QACZ,MAAM,MAAM,oBAAoB,SAAS,CAAC,IAC1C;AAIJ,MAAI;AACJ,MAAI;AACF,cAAU,mBAAmB,OAAO;AAAA,EACtC,QAAQ;AACN,WAAO;AAAA,EACT;AAEA,QAAM,SAAS,sBAAsB,UAAU,gBAAgB,OAAO,CAAC;AACvE,MAAI,CAAC,OAAO,SAAS;AACnB,WAAO;AAAA,EACT;AACA,QAAM,EAAE,WAAW,YAAY,UAAU,IAAI,OAAO;AAEpD,SAAO;AAAA,IACL,SAAS;AAAA,IACT,WAAW,aAAa,KAAK,IAAI;AAAA,IACjC;AAAA,IACA;AAAA,EACF;AACF;AAGO,SAAS,4BAA4B;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AACF,GAIW;AACT,QAAM,UAAgC;AAAA,IACpC,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA,YAAY;AAAA,MACV,WAAW,WAAW;AAAA,MACtB,WAAW,WAAW;AAAA,MACtB,aAAa,WAAW;AAAA,MACxB,cAAc,WAAW;AAAA,IAC3B;AAAA,EACF;AACA,SAAO,mBAAmB,KAAK,UAAU,OAAO,CAAC;AACnD;",
4
+ "sourcesContent": ["import type { ConsentCategory } from \"schemas/generated/consent\";\n\nimport { canopyTombstoneError, canopyTombstoneObject } from \"../lib/tombstone\";\n\n/** @deprecated Use a supported public @replohq/sdk API for this domain; CONSENT_COOKIE_NAME remains only for primitive compatibility. */\nexport const CONSENT_COOKIE_NAME = \"replo_consent\";\n\n/** @deprecated Use a supported public @replohq/sdk API for this domain; CONSENT_COOKIE_VERSION remains only for primitive compatibility. */\nexport const CONSENT_COOKIE_VERSION = 1;\n\n/** @deprecated Use a supported public @replohq/sdk API for this domain; CONSENT_COOKIE_MAX_AGE_SECONDS remains only for primitive compatibility. */\nexport const CONSENT_COOKIE_MAX_AGE_SECONDS = 60 * 60 * 24 * 180;\n\nexport type ConsentCategories = Record<ConsentCategory, boolean>;\n\n/** Persisted cookie payload. `necessary` is always granted and never stored. */\nexport interface ConsentCookiePayload {\n version: number;\n decidedAt: number;\n /** Persistent pseudonymous per-browser id; absent on pre-id (legacy) cookies. */\n consentId?: string;\n categories: {\n analytics: boolean;\n marketing: boolean;\n preferences: boolean;\n sale_of_data: boolean;\n };\n}\n\n/** @deprecated Use a supported public @replohq/sdk API for this domain; DENIED_CATEGORIES has no direct replacement. */\nexport const DENIED_CATEGORIES: ConsentCategories =\n canopyTombstoneObject<ConsentCategories>({\n symbol: \"DENIED_CATEGORIES\",\n subpath: \"consent/cookie\",\n replacement: {\n kind: \"internal\",\n nearestPublicSubpaths: [\"consent/consent-store\", \"consent/replo-scripts\"],\n },\n });\n\n/** @deprecated Use a supported public @replohq/sdk API for this domain; GRANTED_CATEGORIES has no direct replacement. */\nexport const GRANTED_CATEGORIES: ConsentCategories =\n canopyTombstoneObject<ConsentCategories>({\n symbol: \"GRANTED_CATEGORIES\",\n subpath: \"consent/cookie\",\n replacement: {\n kind: \"internal\",\n nearestPublicSubpaths: [\"consent/consent-store\", \"consent/replo-scripts\"],\n },\n });\n\n/** @deprecated Use a supported public @replohq/sdk API for this domain; parseConsentCookie has no direct replacement. */\nexport function parseConsentCookie(\n _rawCookie: string | undefined,\n): ConsentCookiePayload | null {\n throw canopyTombstoneError({\n symbol: \"parseConsentCookie\",\n subpath: \"consent/cookie\",\n replacement: {\n kind: \"internal\",\n nearestPublicSubpaths: [\"consent/consent-store\", \"consent/replo-scripts\"],\n },\n });\n}\n\n/** @deprecated Use a supported public @replohq/sdk API for this domain; serializeConsentCookieValue has no direct replacement. */\nexport function serializeConsentCookieValue(_args: {\n categories: ConsentCategories;\n decidedAt: number;\n consentId?: string;\n}): string {\n throw canopyTombstoneError({\n symbol: \"serializeConsentCookieValue\",\n subpath: \"consent/cookie\",\n replacement: {\n kind: \"internal\",\n nearestPublicSubpaths: [\"consent/consent-store\", \"consent/replo-scripts\"],\n },\n });\n}\n"],
5
+ "mappings": "AAEA,SAAS,sBAAsB,6BAA6B;AAGrD,MAAM,sBAAsB;AAG5B,MAAM,yBAAyB;AAG/B,MAAM,iCAAiC,KAAK,KAAK,KAAK;AAmBtD,MAAM,oBACX,sBAAyC;AAAA,EACvC,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,aAAa;AAAA,IACX,MAAM;AAAA,IACN,uBAAuB,CAAC,yBAAyB,uBAAuB;AAAA,EAC1E;AACF,CAAC;AAGI,MAAM,qBACX,sBAAyC;AAAA,EACvC,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,aAAa;AAAA,IACX,MAAM;AAAA,IACN,uBAAuB,CAAC,yBAAyB,uBAAuB;AAAA,EAC1E;AACF,CAAC;AAGI,SAAS,mBACd,YAC6B;AAC7B,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,aAAa;AAAA,MACX,MAAM;AAAA,MACN,uBAAuB,CAAC,yBAAyB,uBAAuB;AAAA,IAC1E;AAAA,EACF,CAAC;AACH;AAGO,SAAS,4BAA4B,OAIjC;AACT,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,aAAa;AAAA,MACX,MAAM;AAAA,MACN,uBAAuB,CAAC,yBAAyB,uBAAuB;AAAA,IAC1E;AAAA,EACF,CAAC;AACH;",
6
6
  "names": []
7
7
  }
@@ -1,23 +1,10 @@
1
1
  import type { ReploScriptEntry, ScriptTagDescriptor } from "../_vendor/schemas/generated/consent";
2
- /**
3
- * Injects the resolved tags into `document.head` once a caller has decided
4
- * consent allows it. Reused both for author-managed `ReploScripts` entries and
5
- * for the implicit Replo first-party pixel.
6
- *
7
- * DOM insertion (not JSX) is required because inline `<script>` bodies set via
8
- * React's `dangerouslySetInnerHTML` never execute. Each node is tagged with
9
- * `data-replo-script-id` (plus a per-tag index) so re-renders and React Strict
10
- * Mode double-invokes do not double-inject.
11
- */
12
- export declare function InjectedScript({ baseId, descriptors, }: {
2
+ /** @deprecated Use InjectedScript from @replohq/sdk/consent/replo-scripts. */
3
+ export declare function InjectedScript(_props: {
13
4
  baseId: string;
14
5
  descriptors: ScriptTagDescriptor[];
15
6
  }): null;
16
- /**
17
- * The single registry component for all managed tracking scripts on the site.
18
- * Authored once in `app/layout.tsx`; the agent/miniapp only edit the `scripts`
19
- * array. Each entry registers itself and is gated + injected per consent.
20
- */
21
- export declare function ReploScripts({ scripts }: {
7
+ /** @deprecated Use ReploScripts from @replohq/sdk/consent/replo-scripts. */
8
+ export declare function ReploScripts(_props: {
22
9
  scripts: ReploScriptEntry[];
23
- }): import("react/jsx-runtime").JSX.Element;
10
+ }): React.ReactElement;
@@ -1,99 +1,16 @@
1
1
  "use client";
2
- import { Fragment, jsx } from "react/jsx-runtime";
3
- import { useEffect } from "react";
4
- import { isConsentAllowed, useConsent } from "./consent-store";
5
- import { registerScript, unregisterScript } from "./script-registration-store";
6
- import { buildScriptTags, defaultConsentFor } from "./script-snippets";
7
- import { installConsentWindowApi } from "./window-api";
8
- function scriptId(entry) {
9
- if (entry.type === "custom") {
10
- return `custom:${entry.id}`;
11
- }
12
- if (entry.type === "snippet") {
13
- return `snippet:${entry.id}`;
14
- }
15
- return `${entry.type}:${entry.identifier}`;
2
+ import { canopyTombstoneError } from "../lib/tombstone";
3
+ function InjectedScript(_props) {
4
+ throw canopyTombstoneError({
5
+ symbol: "InjectedScript",
6
+ subpath: "consent/replo-scripts"
7
+ });
16
8
  }
17
- function requiredConsentFor(entry) {
18
- if (entry.type === "custom" || entry.type === "snippet") {
19
- return entry.requiredConsent;
20
- }
21
- return entry.requiredConsent ?? defaultConsentFor(entry.type);
22
- }
23
- function descriptorsFor(entry) {
24
- if (entry.type === "custom") {
25
- if (entry.src) {
26
- return [{ kind: "external", src: entry.src }];
27
- }
28
- if (entry.body) {
29
- return [{ kind: "inline", body: entry.body }];
30
- }
31
- return [];
32
- }
33
- if (entry.type === "snippet") {
34
- return [{ kind: "inline", body: entry.body }];
35
- }
36
- return buildScriptTags({ type: entry.type, identifier: entry.identifier });
37
- }
38
- function InjectedScript({
39
- baseId,
40
- descriptors
41
- }) {
42
- const injectionKey = `${baseId}|${JSON.stringify(descriptors)}`;
43
- useEffect(() => {
44
- if (typeof document === "undefined") {
45
- return;
46
- }
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
- });
72
- return () => {
73
- for (const node of createdNodes) {
74
- node.remove();
75
- }
76
- };
77
- }, [injectionKey]);
78
- return null;
79
- }
80
- function ManagedScript({ entry }) {
81
- const consent = useConsent();
82
- const requiredConsent = requiredConsentFor(entry);
83
- const id = scriptId(entry);
84
- const consentKey = requiredConsent.join(",");
85
- useEffect(() => {
86
- registerScript({ id, type: entry.type, requiredConsent });
87
- return () => unregisterScript(id);
88
- }, [id, entry.type, consentKey]);
89
- if (!isConsentAllowed({ state: consent, requiredConsent })) {
90
- return null;
91
- }
92
- return /* @__PURE__ */ jsx(InjectedScript, { baseId: id, descriptors: descriptorsFor(entry) });
93
- }
94
- function ReploScripts({ scripts }) {
95
- useEffect(() => installConsentWindowApi(), []);
96
- return /* @__PURE__ */ jsx(Fragment, { children: scripts.map((entry) => /* @__PURE__ */ jsx(ManagedScript, { entry }, scriptId(entry))) });
9
+ function ReploScripts(_props) {
10
+ throw canopyTombstoneError({
11
+ symbol: "ReploScripts",
12
+ subpath: "consent/replo-scripts"
13
+ });
97
14
  }
98
15
  export {
99
16
  InjectedScript,
@@ -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: HTMLScriptElement[] = [];\n descriptors.forEach((descriptor, index) => {\n const nodeId = `${baseId}#${index}`;\n const existing = document.querySelector(\n `script[data-replo-script-id=\"${nodeId}\"]`,\n );\n if (existing) {\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 scriptElement.textContent = descriptor.body;\n }\n document.head.append(scriptElement);\n createdNodes.push(scriptElement);\n });\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": ";AAyIS,SAaL,UAbK;AAjIT,SAAS,iBAAiB;AAE1B,SAAS,kBAAkB,kBAAkB;AAC7C,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,KAAK,CAAC;AAAA,EAC9C;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,eAAoC,CAAC;AAC3C,gBAAY,QAAQ,CAAC,YAAY,UAAU;AACzC,YAAM,SAAS,GAAG,MAAM,IAAI,KAAK;AACjC,YAAM,WAAW,SAAS;AAAA,QACxB,gCAAgC,MAAM;AAAA,MACxC;AACA,UAAI,UAAU;AACZ;AAAA,MACF;AACA,YAAM,gBAAgB,SAAS,cAAc,QAAQ;AACrD,oBAAc,QAAQ,gBAAgB;AACtC,UAAI,WAAW,SAAS,YAAY;AAClC,sBAAc,MAAM,WAAW;AAC/B,sBAAc,QAAQ;AACtB,mBAAW,CAAC,eAAe,cAAc,KAAK,OAAO;AAAA,UACnD,WAAW,cAAc,CAAC;AAAA,QAC5B,GAAG;AACD,wBAAc,aAAa,eAAe,cAAc;AAAA,QAC1D;AAAA,MACF,OAAO;AACL,sBAAc,cAAc,WAAW;AAAA,MACzC;AACA,eAAS,KAAK,OAAO,aAAa;AAClC,mBAAa,KAAK,aAAa;AAAA,IACjC,CAAC;AAED,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;",
4
+ "sourcesContent": ["\"use client\";\n\nimport type {\n ReploScriptEntry,\n ScriptTagDescriptor,\n} from \"schemas/generated/consent\";\n\nimport { canopyTombstoneError } from \"../lib/tombstone\";\n\n/** @deprecated Use InjectedScript from @replohq/sdk/consent/replo-scripts. */\nexport function InjectedScript(_props: {\n baseId: string;\n descriptors: ScriptTagDescriptor[];\n}): null {\n throw canopyTombstoneError({\n symbol: \"InjectedScript\",\n subpath: \"consent/replo-scripts\",\n });\n}\n\n/** @deprecated Use ReploScripts from @replohq/sdk/consent/replo-scripts. */\nexport function ReploScripts(_props: {\n scripts: ReploScriptEntry[];\n}): React.ReactElement {\n throw canopyTombstoneError({\n symbol: \"ReploScripts\",\n subpath: \"consent/replo-scripts\",\n });\n}\n"],
5
+ "mappings": ";AAOA,SAAS,4BAA4B;AAG9B,SAAS,eAAe,QAGtB;AACP,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,EACX,CAAC;AACH;AAGO,SAAS,aAAa,QAEN;AACrB,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,EACX,CAAC;AACH;",
6
6
  "names": []
7
7
  }
@@ -11,6 +11,7 @@ export interface RegisteredScript {
11
11
  type: ReploScriptType;
12
12
  requiredConsent: ConsentCategory[];
13
13
  }
14
+ /** @deprecated Use a supported public @replohq/sdk API for this domain; scriptRegistrationStore has no direct replacement. */
14
15
  export declare const scriptRegistrationStore: {
15
16
  register(script: RegisteredScript): void;
16
17
  unregister(id: string): void;
@@ -20,6 +21,9 @@ export declare const scriptRegistrationStore: {
20
21
  /** Test-only: clear the registry between cases. */
21
22
  reset(): void;
22
23
  };
23
- export declare function registerScript(script: RegisteredScript): void;
24
- export declare function unregisterScript(id: string): void;
24
+ /** @deprecated Use a supported public @replohq/sdk API for this domain; registerScript has no direct replacement. */
25
+ export declare function registerScript(_script: RegisteredScript): void;
26
+ /** @deprecated Use a supported public @replohq/sdk API for this domain; unregisterScript has no direct replacement. */
27
+ export declare function unregisterScript(_id: string): void;
28
+ /** @deprecated Use a supported public @replohq/sdk API for this domain; useRegisteredScripts has no direct replacement. */
25
29
  export declare function useRegisteredScripts(): RegisteredScript[];
@@ -1,56 +1,42 @@
1
1
  "use client";
2
- import { useSyncExternalStore } from "react";
3
- const registry = /* @__PURE__ */ new Map();
4
- const listeners = /* @__PURE__ */ new Set();
5
- let snapshot = [];
6
- const SERVER_SNAPSHOT = [];
7
- function emit() {
8
- snapshot = [...registry.values()];
9
- for (const listener of listeners) {
10
- listener();
2
+ import { canopyTombstoneError, canopyTombstoneObject } from "../lib/tombstone";
3
+ const scriptRegistrationStore = canopyTombstoneObject({
4
+ symbol: "scriptRegistrationStore",
5
+ subpath: "consent/script-registration-store",
6
+ replacement: {
7
+ kind: "internal",
8
+ nearestPublicSubpaths: ["consent/consent-store", "consent/replo-scripts"]
11
9
  }
12
- }
13
- const scriptRegistrationStore = {
14
- register(script) {
15
- registry.set(script.id, script);
16
- emit();
17
- },
18
- unregister(id) {
19
- if (registry.delete(id)) {
20
- emit();
10
+ });
11
+ function registerScript(_script) {
12
+ throw canopyTombstoneError({
13
+ symbol: "registerScript",
14
+ subpath: "consent/script-registration-store",
15
+ replacement: {
16
+ kind: "internal",
17
+ nearestPublicSubpaths: ["consent/consent-store", "consent/replo-scripts"]
21
18
  }
22
- },
23
- getSnapshot() {
24
- return snapshot;
25
- },
26
- getServerSnapshot() {
27
- return SERVER_SNAPSHOT;
28
- },
29
- subscribe(listener) {
30
- listeners.add(listener);
31
- return () => {
32
- listeners.delete(listener);
33
- };
34
- },
35
- /** Test-only: clear the registry between cases. */
36
- reset() {
37
- registry.clear();
38
- listeners.clear();
39
- snapshot = [];
40
- }
41
- };
42
- function registerScript(script) {
43
- scriptRegistrationStore.register(script);
19
+ });
44
20
  }
45
- function unregisterScript(id) {
46
- scriptRegistrationStore.unregister(id);
21
+ function unregisterScript(_id) {
22
+ throw canopyTombstoneError({
23
+ symbol: "unregisterScript",
24
+ subpath: "consent/script-registration-store",
25
+ replacement: {
26
+ kind: "internal",
27
+ nearestPublicSubpaths: ["consent/consent-store", "consent/replo-scripts"]
28
+ }
29
+ });
47
30
  }
48
31
  function useRegisteredScripts() {
49
- return useSyncExternalStore(
50
- scriptRegistrationStore.subscribe,
51
- scriptRegistrationStore.getSnapshot,
52
- scriptRegistrationStore.getServerSnapshot
53
- );
32
+ throw canopyTombstoneError({
33
+ symbol: "useRegisteredScripts",
34
+ subpath: "consent/script-registration-store",
35
+ replacement: {
36
+ kind: "internal",
37
+ nearestPublicSubpaths: ["consent/consent-store", "consent/replo-scripts"]
38
+ }
39
+ });
54
40
  }
55
41
  export {
56
42
  registerScript,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../consent/script-registration-store.ts"],
4
- "sourcesContent": ["\"use client\";\n\nimport type {\n ConsentCategory,\n ReploScriptType,\n} from \"schemas/generated/consent\";\n\nimport { useSyncExternalStore } from \"react\";\n\n/**\n * Tracks which managed scripts are currently mounted on the page. Each\n * `ReploScripts` entry registers itself here on mount, so the analytics provider\n * can create sinks only for providers that are actually present (and consented),\n * without importing a static list. Like the consent store, this is a singleton\n * rather than React context so it works regardless of tree position.\n */\n\nexport interface RegisteredScript {\n id: string;\n type: ReploScriptType;\n requiredConsent: ConsentCategory[];\n}\n\nconst registry = new Map<string, RegisteredScript>();\nconst listeners = new Set<() => void>();\n\n// useSyncExternalStore requires a referentially-stable snapshot between emits.\nlet snapshot: RegisteredScript[] = [];\n\nconst SERVER_SNAPSHOT: RegisteredScript[] = [];\n\nfunction emit() {\n snapshot = [...registry.values()];\n for (const listener of listeners) {\n listener();\n }\n}\n\nexport const scriptRegistrationStore = {\n register(script: RegisteredScript) {\n registry.set(script.id, script);\n emit();\n },\n unregister(id: string) {\n if (registry.delete(id)) {\n emit();\n }\n },\n getSnapshot(): RegisteredScript[] {\n return snapshot;\n },\n getServerSnapshot(): RegisteredScript[] {\n return SERVER_SNAPSHOT;\n },\n subscribe(listener: () => void): () => void {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n },\n /** Test-only: clear the registry between cases. */\n reset() {\n registry.clear();\n listeners.clear();\n snapshot = [];\n },\n};\n\nexport function registerScript(script: RegisteredScript) {\n scriptRegistrationStore.register(script);\n}\n\nexport function unregisterScript(id: string) {\n scriptRegistrationStore.unregister(id);\n}\n\nexport function useRegisteredScripts(): RegisteredScript[] {\n return useSyncExternalStore(\n scriptRegistrationStore.subscribe,\n scriptRegistrationStore.getSnapshot,\n scriptRegistrationStore.getServerSnapshot,\n );\n}\n"],
5
- "mappings": ";AAOA,SAAS,4BAA4B;AAgBrC,MAAM,WAAW,oBAAI,IAA8B;AACnD,MAAM,YAAY,oBAAI,IAAgB;AAGtC,IAAI,WAA+B,CAAC;AAEpC,MAAM,kBAAsC,CAAC;AAE7C,SAAS,OAAO;AACd,aAAW,CAAC,GAAG,SAAS,OAAO,CAAC;AAChC,aAAW,YAAY,WAAW;AAChC,aAAS;AAAA,EACX;AACF;AAEO,MAAM,0BAA0B;AAAA,EACrC,SAAS,QAA0B;AACjC,aAAS,IAAI,OAAO,IAAI,MAAM;AAC9B,SAAK;AAAA,EACP;AAAA,EACA,WAAW,IAAY;AACrB,QAAI,SAAS,OAAO,EAAE,GAAG;AACvB,WAAK;AAAA,IACP;AAAA,EACF;AAAA,EACA,cAAkC;AAChC,WAAO;AAAA,EACT;AAAA,EACA,oBAAwC;AACtC,WAAO;AAAA,EACT;AAAA,EACA,UAAU,UAAkC;AAC1C,cAAU,IAAI,QAAQ;AACtB,WAAO,MAAM;AACX,gBAAU,OAAO,QAAQ;AAAA,IAC3B;AAAA,EACF;AAAA;AAAA,EAEA,QAAQ;AACN,aAAS,MAAM;AACf,cAAU,MAAM;AAChB,eAAW,CAAC;AAAA,EACd;AACF;AAEO,SAAS,eAAe,QAA0B;AACvD,0BAAwB,SAAS,MAAM;AACzC;AAEO,SAAS,iBAAiB,IAAY;AAC3C,0BAAwB,WAAW,EAAE;AACvC;AAEO,SAAS,uBAA2C;AACzD,SAAO;AAAA,IACL,wBAAwB;AAAA,IACxB,wBAAwB;AAAA,IACxB,wBAAwB;AAAA,EAC1B;AACF;",
4
+ "sourcesContent": ["\"use client\";\n\n/* oxlint-disable replo/no-void-return-type -- Tombstone declarations preserve exact return types for consumer compatibility. */\nimport type {\n ConsentCategory,\n ReploScriptType,\n} from \"schemas/generated/consent\";\n\nimport { canopyTombstoneError, canopyTombstoneObject } from \"../lib/tombstone\";\n\n/**\n * Tracks which managed scripts are currently mounted on the page. Each\n * `ReploScripts` entry registers itself here on mount, so the analytics provider\n * can create sinks only for providers that are actually present (and consented),\n * without importing a static list. Like the consent store, this is a singleton\n * rather than React context so it works regardless of tree position.\n */\nexport interface RegisteredScript {\n id: string;\n type: ReploScriptType;\n requiredConsent: ConsentCategory[];\n}\n\n/** @deprecated Use a supported public @replohq/sdk API for this domain; scriptRegistrationStore has no direct replacement. */\nexport const scriptRegistrationStore: {\n register(script: RegisteredScript): void;\n unregister(id: string): void;\n getSnapshot(): RegisteredScript[];\n getServerSnapshot(): RegisteredScript[];\n subscribe(listener: () => void): () => void;\n /** Test-only: clear the registry between cases. */\n reset(): void;\n} = canopyTombstoneObject<{\n register(script: RegisteredScript): void;\n unregister(id: string): void;\n getSnapshot(): RegisteredScript[];\n getServerSnapshot(): RegisteredScript[];\n subscribe(listener: () => void): () => void;\n /** Test-only: clear the registry between cases. */\n reset(): void;\n}>({\n symbol: \"scriptRegistrationStore\",\n subpath: \"consent/script-registration-store\",\n replacement: {\n kind: \"internal\",\n nearestPublicSubpaths: [\"consent/consent-store\", \"consent/replo-scripts\"],\n },\n});\n\n/** @deprecated Use a supported public @replohq/sdk API for this domain; registerScript has no direct replacement. */\nexport function registerScript(_script: RegisteredScript): void {\n throw canopyTombstoneError({\n symbol: \"registerScript\",\n subpath: \"consent/script-registration-store\",\n replacement: {\n kind: \"internal\",\n nearestPublicSubpaths: [\"consent/consent-store\", \"consent/replo-scripts\"],\n },\n });\n}\n\n/** @deprecated Use a supported public @replohq/sdk API for this domain; unregisterScript has no direct replacement. */\nexport function unregisterScript(_id: string): void {\n throw canopyTombstoneError({\n symbol: \"unregisterScript\",\n subpath: \"consent/script-registration-store\",\n replacement: {\n kind: \"internal\",\n nearestPublicSubpaths: [\"consent/consent-store\", \"consent/replo-scripts\"],\n },\n });\n}\n\n/** @deprecated Use a supported public @replohq/sdk API for this domain; useRegisteredScripts has no direct replacement. */\nexport function useRegisteredScripts(): RegisteredScript[] {\n throw canopyTombstoneError({\n symbol: \"useRegisteredScripts\",\n subpath: \"consent/script-registration-store\",\n replacement: {\n kind: \"internal\",\n nearestPublicSubpaths: [\"consent/consent-store\", \"consent/replo-scripts\"],\n },\n });\n}\n"],
5
+ "mappings": ";AAQA,SAAS,sBAAsB,6BAA6B;AAgBrD,MAAM,0BAQT,sBAQD;AAAA,EACD,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,aAAa;AAAA,IACX,MAAM;AAAA,IACN,uBAAuB,CAAC,yBAAyB,uBAAuB;AAAA,EAC1E;AACF,CAAC;AAGM,SAAS,eAAe,SAAiC;AAC9D,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,aAAa;AAAA,MACX,MAAM;AAAA,MACN,uBAAuB,CAAC,yBAAyB,uBAAuB;AAAA,IAC1E;AAAA,EACF,CAAC;AACH;AAGO,SAAS,iBAAiB,KAAmB;AAClD,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,aAAa;AAAA,MACX,MAAM;AAAA,MACN,uBAAuB,CAAC,yBAAyB,uBAAuB;AAAA,IAC1E;AAAA,EACF,CAAC;AACH;AAGO,SAAS,uBAA2C;AACzD,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,aAAa;AAAA,MACX,MAAM;AAAA,MACN,uBAAuB,CAAC,yBAAyB,uBAAuB;AAAA,IAC1E;AAAA,EACF,CAAC;AACH;",
6
6
  "names": []
7
7
  }
@@ -1,24 +1,10 @@
1
1
  import type { ConsentCategory, ReploScriptType, ScriptTagDescriptor } from "../_vendor/schemas/generated/consent";
2
2
  type ProviderType = Exclude<ReploScriptType, "custom" | "snippet">;
3
- /**
4
- * Snippet providers don't synthesize tags (the user pastes the provider-issued
5
- * snippet as the entry's `body`), but they still get a first-class default
6
- * consent categorization like identifier providers.
7
- */
8
- /**
9
- * Returns the structured tag descriptors for a named provider. A single provider
10
- * can produce multiple tags (e.g. GA4 = external loader + inline config), which
11
- * the runtime injects in order.
12
- */
13
- export declare function buildScriptTags({ type, identifier, }: {
3
+ /** @deprecated Use a supported public @replohq/sdk API for this domain; buildScriptTags has no direct replacement. */
4
+ export declare function buildScriptTags(_args: {
14
5
  type: ProviderType;
15
6
  identifier: string;
16
7
  }): ScriptTagDescriptor[];
17
- /**
18
- * The default consent categories that gate an identifier-provider script when an
19
- * entry does not specify `requiredConsent`. `snippet` and `custom` entries carry
20
- * `requiredConsent` explicitly (the runtime has no default for them), so this is
21
- * only consulted for identifier providers. Overridable per entry by the customer.
22
- */
23
- export declare function defaultConsentFor(type: ProviderType): ConsentCategory[];
8
+ /** @deprecated Use a supported public @replohq/sdk API for this domain; defaultConsentFor has no direct replacement. */
9
+ export declare function defaultConsentFor(_type: ProviderType): ConsentCategory[];
24
10
  export {};