@replohq/canopy-sdk 2.6.0 → 3.0.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.
Files changed (387) 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/iframeRpcChannel.mjs +2 -1
  10. package/_vendor/schemas/loaderKeys.d.ts +1 -1
  11. package/_vendor/schemas/loaderKeys.mjs +103 -23
  12. package/_vendor/schemas/money.mjs +1860 -3
  13. package/_vendor/schemas/pageAnnotations.mjs +1 -1
  14. package/_vendor/schemas/routing/match.mjs +1 -0
  15. package/_vendor/schemas/routing/rules.mjs +2 -1
  16. package/_vendor/schemas/selectMode.d.ts +4 -4
  17. package/_vendor/schemas/selectMode.mjs +1 -0
  18. package/_vendor/schemas/selectModeIframeRpc.d.ts +4 -4
  19. package/_vendor/schemas/selectModeIframeRpc.mjs +1 -0
  20. package/analytics/analytics-provider.d.ts +5 -10
  21. package/analytics/analytics-provider.js +14 -101
  22. package/analytics/analytics-provider.js.map +2 -2
  23. package/analytics/get-analytics-sinks.d.ts +2 -19
  24. package/analytics/get-analytics-sinks.js +9 -46
  25. package/analytics/get-analytics-sinks.js.map +2 -2
  26. package/analytics/hooks/use-product-viewed-analytics.d.ts +2 -6
  27. package/analytics/hooks/use-product-viewed-analytics.js +6 -28
  28. package/analytics/hooks/use-product-viewed-analytics.js.map +2 -2
  29. package/analytics/replo-first-party-pixel.d.ts +3 -12
  30. package/analytics/replo-first-party-pixel.js +8 -24
  31. package/analytics/replo-first-party-pixel.js.map +2 -2
  32. package/analytics/replo-pixel-script.d.ts +4 -10
  33. package/analytics/replo-pixel-script.js +9 -23
  34. package/analytics/replo-pixel-script.js.map +2 -2
  35. package/analytics/sinks/ga4-sink.d.ts +10 -9
  36. package/analytics/sinks/ga4-sink.js +99 -50
  37. package/analytics/sinks/ga4-sink.js.map +2 -2
  38. package/analytics/sinks/meta-sink.d.ts +5 -4
  39. package/analytics/sinks/meta-sink.js +82 -29
  40. package/analytics/sinks/meta-sink.js.map +2 -2
  41. package/analytics/sinks/pinterest-sink.d.ts +7 -6
  42. package/analytics/sinks/pinterest-sink.js +82 -49
  43. package/analytics/sinks/pinterest-sink.js.map +2 -2
  44. package/analytics/sinks/reddit-sink.d.ts +8 -7
  45. package/analytics/sinks/reddit-sink.js +82 -53
  46. package/analytics/sinks/reddit-sink.js.map +2 -2
  47. package/analytics/sinks/replo-sink.d.ts +9 -8
  48. package/analytics/sinks/replo-sink.js +89 -37
  49. package/analytics/sinks/replo-sink.js.map +2 -2
  50. package/analytics/sinks/snapchat-sink.d.ts +6 -5
  51. package/analytics/sinks/snapchat-sink.js +82 -40
  52. package/analytics/sinks/snapchat-sink.js.map +2 -2
  53. package/analytics/sinks/tiktok-sink.d.ts +8 -7
  54. package/analytics/sinks/tiktok-sink.js +82 -52
  55. package/analytics/sinks/tiktok-sink.js.map +2 -2
  56. package/analytics/sinks/window-sink.d.ts +11 -14
  57. package/analytics/sinks/window-sink.js +101 -28
  58. package/analytics/sinks/window-sink.js.map +2 -2
  59. package/analytics/utils/analytics-utils.d.ts +4 -2
  60. package/analytics/utils/analytics-utils.js +19 -123
  61. package/analytics/utils/analytics-utils.js.map +2 -2
  62. package/analytics/utils/navigation-tracker.d.ts +2 -1
  63. package/analytics/utils/navigation-tracker.js +37 -30
  64. package/analytics/utils/navigation-tracker.js.map +2 -2
  65. package/analytics/utils/shopify-funnel-gate.d.ts +2 -7
  66. package/analytics/utils/shopify-funnel-gate.js +8 -15
  67. package/analytics/utils/shopify-funnel-gate.js.map +2 -2
  68. package/cart/buy-now-action.d.ts +2 -9
  69. package/cart/buy-now-action.js +5 -97
  70. package/cart/buy-now-action.js.map +2 -2
  71. package/cart/cart-actions.d.ts +12 -56
  72. package/cart/cart-actions.js +88 -68
  73. package/cart/cart-actions.js.map +2 -2
  74. package/cart/cart-loader.d.ts +3 -9
  75. package/cart/cart-loader.js +14 -6
  76. package/cart/cart-loader.js.map +2 -2
  77. package/cart/cart-provider.d.ts +6 -58
  78. package/cart/cart-provider.js +13 -359
  79. package/cart/cart-provider.js.map +3 -3
  80. package/cart/cart-schema.d.ts +2 -1
  81. package/cart/cart-schema.js +12 -64
  82. package/cart/cart-schema.js.map +2 -2
  83. package/cart/cart-types.d.ts +1 -1
  84. package/cart/cart-types.js +5 -4
  85. package/cart/cart-types.js.map +2 -2
  86. package/cart/gateways/cart-constants.d.ts +1 -0
  87. package/cart/gateways/cart-constants.js.map +2 -2
  88. package/cart/gateways/cart-gateway.d.ts +1 -0
  89. package/cart/gateways/cart-gateway.js +13 -12
  90. package/cart/gateways/cart-gateway.js.map +2 -2
  91. package/cart/gateways/cookie-cart-gateway.d.ts +8 -11
  92. package/cart/gateways/cookie-cart-gateway.js +93 -97
  93. package/cart/gateways/cookie-cart-gateway.js.map +2 -2
  94. package/cart/gateways/default-cart-gateway.d.ts +10 -16
  95. package/cart/gateways/default-cart-gateway.js +13 -23
  96. package/cart/gateways/default-cart-gateway.js.map +2 -2
  97. package/cart/gateways/resolver-cart-gateway.d.ts +1 -0
  98. package/cart/gateways/resolver-cart-gateway.js +13 -102
  99. package/cart/gateways/resolver-cart-gateway.js.map +2 -2
  100. package/cart/gateways/stripe-cart-gateway.d.ts +10 -16
  101. package/cart/gateways/stripe-cart-gateway.js +13 -21
  102. package/cart/gateways/stripe-cart-gateway.js.map +2 -2
  103. package/cart/hooks/use-add-to-cart.d.ts +3 -47
  104. package/cart/hooks/use-add-to-cart.js +10 -115
  105. package/cart/hooks/use-add-to-cart.js.map +2 -2
  106. package/cart/hooks/use-buy-now.d.ts +1 -39
  107. package/cart/hooks/use-buy-now.js +5 -55
  108. package/cart/hooks/use-buy-now.js.map +2 -2
  109. package/cart/utils/cart-utils.d.ts +8 -35
  110. package/cart/utils/cart-utils.js +21 -35
  111. package/cart/utils/cart-utils.js.map +2 -2
  112. package/cart/utils/cookie-cart-persistence.d.ts +16 -41
  113. package/cart/utils/cookie-cart-persistence.js +38 -143
  114. package/cart/utils/cookie-cart-persistence.js.map +2 -2
  115. package/cart/utils/variant-to-cart-line.d.ts +12 -42
  116. package/cart/utils/variant-to-cart-line.js +31 -147
  117. package/cart/utils/variant-to-cart-line.js.map +2 -2
  118. package/chunk-UJCSKKID.mjs +27 -0
  119. package/{chunk-OFU2QEDR.mjs → chunk-ZZPQ3E7S.mjs} +50 -5
  120. package/consent/consent-action.d.ts +2 -1
  121. package/consent/consent-action.js +10 -20
  122. package/consent/consent-action.js.map +2 -2
  123. package/consent/consent-actions.d.ts +2 -13
  124. package/consent/consent-actions.js +9 -29
  125. package/consent/consent-actions.js.map +2 -2
  126. package/consent/consent-store.d.ts +9 -36
  127. package/consent/consent-store.js +12 -182
  128. package/consent/consent-store.js.map +2 -2
  129. package/consent/cookie.d.ts +9 -12
  130. package/consent/cookie.js +32 -64
  131. package/consent/cookie.js.map +2 -2
  132. package/consent/replo-scripts.d.ts +5 -18
  133. package/consent/replo-scripts.js +11 -94
  134. package/consent/replo-scripts.js.map +2 -2
  135. package/consent/script-registration-store.d.ts +6 -2
  136. package/consent/script-registration-store.js +33 -47
  137. package/consent/script-registration-store.js.map +2 -2
  138. package/consent/script-snippets.d.ts +4 -18
  139. package/consent/script-snippets.js +19 -127
  140. package/consent/script-snippets.js.map +2 -2
  141. package/consent/window-api.d.ts +4 -15
  142. package/consent/window-api.js +8 -63
  143. package/consent/window-api.js.map +2 -2
  144. package/editor/ClientErrorBoundary.d.ts +4 -10
  145. package/editor/ClientErrorBoundary.js +7 -55
  146. package/editor/ClientErrorBoundary.js.map +2 -2
  147. package/editor/DocumentReadyBeacon.d.ts +3 -1
  148. package/editor/DocumentReadyBeacon.js +6 -3
  149. package/editor/DocumentReadyBeacon.js.map +2 -2
  150. package/editor/LinkInterceptor.d.ts +1 -0
  151. package/editor/LinkInterceptor.js +6 -121
  152. package/editor/LinkInterceptor.js.map +2 -2
  153. package/editor/NextErrorReporter.d.ts +1 -0
  154. package/editor/NextErrorReporter.js +6 -85
  155. package/editor/NextErrorReporter.js.map +2 -2
  156. package/editor/annotations/AnnotationLayerMount.d.ts +1 -0
  157. package/editor/annotations/AnnotationLayerMount.js +6 -6
  158. package/editor/annotations/AnnotationLayerMount.js.map +2 -2
  159. package/editor/annotations/annotationController.d.ts +1 -0
  160. package/editor/annotations/annotationController.js +6 -378
  161. package/editor/annotations/annotationController.js.map +2 -2
  162. package/editor/annotations/bridgeGate.d.ts +4 -7
  163. package/editor/annotations/bridgeGate.js +13 -15
  164. package/editor/annotations/bridgeGate.js.map +2 -2
  165. package/editor/design-library-preview/DesignLibraryPreview.d.ts +1 -0
  166. package/editor/design-library-preview/DesignLibraryPreview.js +6 -86
  167. package/editor/design-library-preview/DesignLibraryPreview.js.map +2 -2
  168. package/editor/posthog-relay.d.ts +1 -10
  169. package/editor/posthog-relay.js +6 -65
  170. package/editor/posthog-relay.js.map +2 -2
  171. package/editor/select-mode/EditorSelection.d.ts +1 -23
  172. package/editor/select-mode/EditorSelection.js +5 -87
  173. package/editor/select-mode/EditorSelection.js.map +2 -2
  174. package/editor/select-mode/annotationFrames.d.ts +9 -9
  175. package/editor/select-mode/annotationFrames.js +22 -103
  176. package/editor/select-mode/annotationFrames.js.map +2 -2
  177. package/editor/select-mode/descriptor/elementDescriptor.d.ts +6 -21
  178. package/editor/select-mode/descriptor/elementDescriptor.js +19 -192
  179. package/editor/select-mode/descriptor/elementDescriptor.js.map +3 -3
  180. package/editor/select-mode/descriptor/styleExtraction.d.ts +4 -2
  181. package/editor/select-mode/descriptor/styleExtraction.js +11 -262
  182. package/editor/select-mode/descriptor/styleExtraction.js.map +2 -2
  183. package/editor/select-mode/displayModeStore.d.ts +2 -0
  184. package/editor/select-mode/displayModeStore.js +14 -39
  185. package/editor/select-mode/displayModeStore.js.map +2 -2
  186. package/editor/select-mode/fast-refresh-relay.d.ts +2 -1
  187. package/editor/select-mode/fast-refresh-relay.js +7 -28
  188. package/editor/select-mode/fast-refresh-relay.js.map +2 -2
  189. package/editor/select-mode/fiber.d.ts +14 -7
  190. package/editor/select-mode/fiber.js +40 -286
  191. package/editor/select-mode/fiber.js.map +2 -2
  192. package/editor/select-mode/hooks/useCrosshairCursor.d.ts +2 -9
  193. package/editor/select-mode/hooks/useCrosshairCursor.js +7 -15
  194. package/editor/select-mode/hooks/useCrosshairCursor.js.map +2 -2
  195. package/editor/select-mode/hooks/useEditModeStateMachine.d.ts +5 -3
  196. package/editor/select-mode/hooks/useEditModeStateMachine.js +13 -228
  197. package/editor/select-mode/hooks/useEditModeStateMachine.js.map +2 -2
  198. package/editor/select-mode/hooks/useOptimisticOverrides.d.ts +2 -1
  199. package/editor/select-mode/hooks/useOptimisticOverrides.js +6 -277
  200. package/editor/select-mode/hooks/useOptimisticOverrides.js.map +2 -2
  201. package/editor/select-mode/hooks/useParentMessaging.d.ts +2 -20
  202. package/editor/select-mode/hooks/useParentMessaging.js +7 -69
  203. package/editor/select-mode/hooks/useParentMessaging.js.map +2 -2
  204. package/editor/select-mode/hooks/useSelectModeController.d.ts +2 -1
  205. package/editor/select-mode/hooks/useSelectModeController.js +6 -40
  206. package/editor/select-mode/hooks/useSelectModeController.js.map +2 -2
  207. package/editor/select-mode/hooks/useSelectionHover.d.ts +2 -16
  208. package/editor/select-mode/hooks/useSelectionHover.js +7 -105
  209. package/editor/select-mode/hooks/useSelectionHover.js.map +2 -2
  210. package/editor/select-mode/hooks/useSelectionInteractions.d.ts +2 -26
  211. package/editor/select-mode/hooks/useSelectionInteractions.js +7 -348
  212. package/editor/select-mode/hooks/useSelectionInteractions.js.map +2 -2
  213. package/editor/select-mode/hooks/useSelectionScrollSync.d.ts +2 -22
  214. package/editor/select-mode/hooks/useSelectionScrollSync.js +7 -65
  215. package/editor/select-mode/hooks/useSelectionScrollSync.js.map +2 -2
  216. package/editor/select-mode/hooks/useSiblingResolution.d.ts +4 -2
  217. package/editor/select-mode/hooks/useSiblingResolution.js +13 -52
  218. package/editor/select-mode/hooks/useSiblingResolution.js.map +2 -2
  219. package/editor/select-mode/iframeRpcChannel.d.ts +10 -349
  220. package/editor/select-mode/iframeRpcChannel.js +23 -79
  221. package/editor/select-mode/iframeRpcChannel.js.map +2 -2
  222. package/editor/select-mode/inlineTextMarks.d.ts +4 -6
  223. package/editor/select-mode/inlineTextMarks.js +13 -18
  224. package/editor/select-mode/inlineTextMarks.js.map +2 -2
  225. package/editor/select-mode/interactions/selectionGeometry.d.ts +19 -61
  226. package/editor/select-mode/interactions/selectionGeometry.js +57 -165
  227. package/editor/select-mode/interactions/selectionGeometry.js.map +2 -2
  228. package/editor/select-mode/selectModeSession.d.ts +1 -0
  229. package/editor/select-mode/selectModeSession.js +6 -3
  230. package/editor/select-mode/selectModeSession.js.map +2 -2
  231. package/editor/select-mode/selectionFrame.d.ts +9 -60
  232. package/editor/select-mode/selectionFrame.js +28 -116
  233. package/editor/select-mode/selectionFrame.js.map +2 -2
  234. package/editor/select-mode/symbolicate.d.ts +2 -1
  235. package/editor/select-mode/symbolicate.js +7 -195
  236. package/editor/select-mode/symbolicate.js.map +2 -2
  237. package/editor/select-mode/tiptapInlineEditor.d.ts +15 -2
  238. package/editor/select-mode/tiptapInlineEditor.js +6 -114
  239. package/editor/select-mode/tiptapInlineEditor.js.map +2 -2
  240. package/env.d.ts +2 -1
  241. package/env.js +10 -37
  242. package/env.js.map +2 -2
  243. package/gateways/canopy-api.d.ts +15 -12
  244. package/gateways/canopy-api.js +122 -160
  245. package/gateways/canopy-api.js.map +2 -2
  246. package/hooks/use-client-value.d.ts +2 -10
  247. package/hooks/use-client-value.js +10 -7
  248. package/hooks/use-client-value.js.map +2 -2
  249. package/hooks/use-formatted-price.d.ts +1 -14
  250. package/hooks/use-formatted-price.js +6 -14
  251. package/hooks/use-formatted-price.js.map +2 -2
  252. package/lib/canopy-error.d.ts +2 -5
  253. package/lib/canopy-error.js +10 -14
  254. package/lib/canopy-error.js.map +2 -2
  255. package/lib/get-query-client.d.ts +2 -1
  256. package/lib/get-query-client.js +8 -27
  257. package/lib/get-query-client.js.map +2 -2
  258. package/lib/integration-utils.d.ts +1 -0
  259. package/lib/integration-utils.js +9 -3
  260. package/lib/integration-utils.js.map +2 -2
  261. package/lib/shopify-utils.d.ts +2 -10
  262. package/lib/shopify-utils.js +10 -2
  263. package/lib/shopify-utils.js.map +2 -2
  264. package/lib/tombstone.d.ts +21 -0
  265. package/lib/tombstone.js +99 -0
  266. package/lib/tombstone.js.map +7 -0
  267. package/lib/url-utils.d.ts +2 -4
  268. package/lib/url-utils.js +10 -3
  269. package/lib/url-utils.js.map +2 -2
  270. package/loaders/collection-loader.d.ts +3 -2
  271. package/loaders/collection-loader.js +5 -48
  272. package/loaders/collection-loader.js.map +2 -2
  273. package/loaders/collection-products-loader.d.ts +3 -2
  274. package/loaders/collection-products-loader.js +5 -51
  275. package/loaders/collection-products-loader.js.map +2 -2
  276. package/loaders/contentful-entries-loader.d.ts +3 -2
  277. package/loaders/contentful-entries-loader.js +5 -71
  278. package/loaders/contentful-entries-loader.js.map +2 -2
  279. package/loaders/contentful-entry-loader.d.ts +3 -2
  280. package/loaders/contentful-entry-loader.js +5 -53
  281. package/loaders/contentful-entry-loader.js.map +2 -2
  282. package/loaders/invoke-loader-action.d.ts +2 -8
  283. package/loaders/invoke-loader-action.js +13 -8
  284. package/loaders/invoke-loader-action.js.map +2 -2
  285. package/loaders/invoke-loader-server.d.ts +2 -14
  286. package/loaders/invoke-loader-server.js +12 -34
  287. package/loaders/invoke-loader-server.js.map +2 -2
  288. package/loaders/invoke-loader.d.ts +6 -12
  289. package/loaders/invoke-loader.js +27 -29
  290. package/loaders/invoke-loader.js.map +2 -2
  291. package/loaders/levanta-product-loader.d.ts +3 -2
  292. package/loaders/levanta-product-loader.js +5 -46
  293. package/loaders/levanta-product-loader.js.map +2 -2
  294. package/loaders/loader-error-boundary.d.ts +9 -15
  295. package/loaders/loader-error-boundary.js +50 -13
  296. package/loaders/loader-error-boundary.js.map +2 -2
  297. package/loaders/loader-keys.d.ts +4 -12
  298. package/loaders/loader-keys.js +6 -1
  299. package/loaders/loader-keys.js.map +2 -2
  300. package/loaders/loader-schemas.d.ts +142 -61
  301. package/loaders/loader-schemas.js +253 -90
  302. package/loaders/loader-schemas.js.map +2 -2
  303. package/loaders/metaobject-loader.d.ts +3 -2
  304. package/loaders/metaobject-loader.js +5 -47
  305. package/loaders/metaobject-loader.js.map +2 -2
  306. package/loaders/metaobjects-loader.d.ts +3 -2
  307. package/loaders/metaobjects-loader.js +5 -53
  308. package/loaders/metaobjects-loader.js.map +2 -2
  309. package/loaders/okendo-review-aggregate-loader.d.ts +9 -10
  310. package/loaders/okendo-review-aggregate-loader.js +5 -49
  311. package/loaders/okendo-review-aggregate-loader.js.map +2 -2
  312. package/loaders/okendo-reviews-loader.d.ts +8 -16
  313. package/loaders/okendo-reviews-loader.js +5 -47
  314. package/loaders/okendo-reviews-loader.js.map +2 -2
  315. package/loaders/prefetch-loaders.d.ts +4 -26
  316. package/loaders/prefetch-loaders.js +5 -40
  317. package/loaders/prefetch-loaders.js.map +2 -2
  318. package/loaders/preview-placeholder.d.ts +8 -22
  319. package/loaders/preview-placeholder.js +47 -209
  320. package/loaders/preview-placeholder.js.map +2 -2
  321. package/loaders/product-loader-args.d.ts +2 -11
  322. package/loaders/product-loader-args.js +6 -12
  323. package/loaders/product-loader-args.js.map +2 -2
  324. package/loaders/product-loader.d.ts +3 -2
  325. package/loaders/product-loader.js +5 -45
  326. package/loaders/product-loader.js.map +2 -2
  327. package/loaders/rebuy-recommendations-loader.d.ts +8 -157
  328. package/loaders/rebuy-recommendations-loader.js +5 -50
  329. package/loaders/rebuy-recommendations-loader.js.map +2 -2
  330. package/loaders/reviews-io-review-aggregate-loader.d.ts +5 -4
  331. package/loaders/reviews-io-review-aggregate-loader.js +5 -36
  332. package/loaders/reviews-io-review-aggregate-loader.js.map +2 -2
  333. package/loaders/reviews-io-reviews-loader.d.ts +5 -4
  334. package/loaders/reviews-io-reviews-loader.js +5 -58
  335. package/loaders/reviews-io-reviews-loader.js.map +2 -2
  336. package/loaders/smile-earning-rules-loader.d.ts +10 -11
  337. package/loaders/smile-earning-rules-loader.js +5 -37
  338. package/loaders/smile-earning-rules-loader.js.map +2 -2
  339. package/loaders/smile-rewards-loader.d.ts +10 -11
  340. package/loaders/smile-rewards-loader.js +5 -37
  341. package/loaders/smile-rewards-loader.js.map +2 -2
  342. package/loaders/smile-vip-tiers-loader.d.ts +9 -10
  343. package/loaders/smile-vip-tiers-loader.js +5 -36
  344. package/loaders/smile-vip-tiers-loader.js.map +2 -2
  345. package/loaders/statsig-experiment-loader.d.ts +3 -8
  346. package/loaders/statsig-experiment-loader.js +5 -74
  347. package/loaders/statsig-experiment-loader.js.map +2 -2
  348. package/loaders/vendor-loader-keys.d.ts +4 -0
  349. package/loaders/vendor-loader-keys.js +9 -0
  350. package/loaders/vendor-loader-keys.js.map +7 -0
  351. package/loaders/yotpo-review-aggregate-loader.d.ts +5 -4
  352. package/loaders/yotpo-review-aggregate-loader.js +5 -43
  353. package/loaders/yotpo-review-aggregate-loader.js.map +2 -2
  354. package/loaders/yotpo-reviews-loader.d.ts +5 -4
  355. package/loaders/yotpo-reviews-loader.js +5 -58
  356. package/loaders/yotpo-reviews-loader.js.map +2 -2
  357. package/money.d.ts +9 -9
  358. package/money.js +25 -6
  359. package/money.js.map +2 -2
  360. package/next/config.d.ts +3 -1
  361. package/next/config.js +11 -85
  362. package/next/config.js.map +2 -2
  363. package/next/image-loader.d.ts +2 -1
  364. package/next/image-loader.js +7 -47
  365. package/next/image-loader.js.map +2 -2
  366. package/next/open-next.d.ts +4 -2
  367. package/next/open-next.js +6 -19
  368. package/next/open-next.js.map +2 -2
  369. package/orders/order-status-schema.d.ts +28 -13
  370. package/orders/order-status-schema.js +45 -13
  371. package/orders/order-status-schema.js.map +2 -2
  372. package/orders/order-status.d.ts +2 -8
  373. package/orders/order-status.js +6 -36
  374. package/orders/order-status.js.map +2 -2
  375. package/package.json +1 -12
  376. package/providers/query-provider.d.ts +3 -1
  377. package/providers/query-provider.js +10 -6
  378. package/providers/query-provider.js.map +2 -2
  379. package/providers/replo-provider.d.ts +3 -1
  380. package/providers/replo-provider.js +6 -37
  381. package/providers/replo-provider.js.map +2 -2
  382. package/routing/evaluate.d.ts +3 -3
  383. package/routing/evaluate.js +5 -40
  384. package/routing/evaluate.js.map +2 -2
  385. package/routing/rules.d.ts +3 -11
  386. package/routing/rules.js +7 -1
  387. package/routing/rules.js.map +2 -2
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../editor/select-mode/descriptor/styleExtraction.ts"],
4
- "sourcesContent": ["import type {\n SelectModeDefinedStyle,\n SelectModeStyleAtRule,\n SelectModeStyleVariant,\n} from \"schemas/generated/selectMode\";\n\nconst CONTROL_STYLE_PROPERTIES = [\n \"color\",\n \"background-color\",\n \"font-family\",\n \"font-size\",\n \"font-weight\",\n \"line-height\",\n \"letter-spacing\",\n \"text-align\",\n] as const;\n\ntype ControlStyleProperty = (typeof CONTROL_STYLE_PROPERTIES)[number];\n\nconst CONTROL_STYLE_PROPERTY_SET = new Set<string>(CONTROL_STYLE_PROPERTIES);\n\ntype SelectorMatch = {\n className: string;\n pseudo: string | null;\n};\n\nfunction isControlStyleProperty(\n propertyName: string,\n): propertyName is ControlStyleProperty {\n return CONTROL_STYLE_PROPERTY_SET.has(propertyName);\n}\n\nfunction getEscapedClassName(className: string) {\n return CSS.escape(className);\n}\n\nfunction getClassSelectorMatches({\n selectorText,\n classNames,\n}: {\n selectorText: string;\n classNames: string[];\n}): SelectorMatch[] {\n const matches: SelectorMatch[] = [];\n const selectorParts = selectorText.split(\",\").map((selectorPart) => {\n return selectorPart.trim();\n });\n\n for (const selectorPart of selectorParts) {\n for (const className of classNames) {\n const escapedClassName = getEscapedClassName(className);\n const baseSelector = `.${escapedClassName}`;\n if (selectorPart === baseSelector) {\n matches.push({ className, pseudo: null });\n continue;\n }\n\n if (!selectorPart.startsWith(`${baseSelector}:`)) {\n continue;\n }\n\n const pseudo = selectorPart.slice(baseSelector.length);\n const isSimplePseudoSelector =\n pseudo.startsWith(\":\") &&\n !/[ >+~#[.]/.test(pseudo) &&\n !pseudo.includes(\"::\");\n if (isSimplePseudoSelector) {\n matches.push({ className, pseudo });\n }\n }\n }\n\n return matches;\n}\n\nfunction getNestedAtRules({\n rule,\n activeAtRules,\n}: {\n rule: CSSRule;\n activeAtRules: SelectModeStyleAtRule[];\n}): SelectModeStyleAtRule[] {\n const nextAtRules = [...activeAtRules];\n if (rule instanceof CSSMediaRule) {\n nextAtRules.push({ type: \"@media\", text: rule.conditionText });\n } else if (rule instanceof CSSSupportsRule) {\n nextAtRules.push({ type: \"@supports\", text: rule.conditionText });\n } else if (\n rule.constructor?.name === \"CSSContainerRule\" &&\n \"conditionText\" in rule &&\n typeof rule.conditionText === \"string\"\n ) {\n nextAtRules.push({\n type: \"@container\",\n text: rule.conditionText,\n });\n }\n return nextAtRules;\n}\n\nfunction getNestedRuleList(rule: CSSRule): CSSRuleList | null {\n if (\n typeof CSSGroupingRule !== \"undefined\" &&\n rule instanceof CSSGroupingRule\n ) {\n return rule.cssRules;\n }\n return null;\n}\n\nfunction getStyleVariant({\n atRules,\n pseudo,\n}: {\n atRules: SelectModeStyleAtRule[];\n pseudo: string | null;\n}): SelectModeStyleVariant | null {\n if (atRules.length === 0 && !pseudo) {\n return null;\n }\n return { atRules, pseudo };\n}\n\nfunction getStyleVariantKey(variant: SelectModeStyleVariant | null) {\n return variant ? JSON.stringify(variant) : \"base\";\n}\n\nfunction getDefinedStyleKey({\n property,\n variant,\n}: {\n property: string;\n variant: SelectModeStyleVariant | null;\n}) {\n return `${property}:${getStyleVariantKey(variant)}`;\n}\n\nfunction getResolvedClassStyleValue({\n className,\n property,\n raw,\n variant,\n}: {\n className: string;\n property: string;\n raw: string;\n variant: SelectModeStyleVariant | null;\n}) {\n if (variant) {\n return raw;\n }\n\n const temporaryElement = document.createElement(\"div\");\n temporaryElement.className = className;\n document.body.append(temporaryElement);\n const resolved = window\n .getComputedStyle(temporaryElement)\n .getPropertyValue(property);\n temporaryElement.remove();\n\n return resolved.trim() || raw;\n}\n\nfunction setDefinedStyle({\n definedStylesByKey,\n property,\n variant,\n className,\n raw,\n resolved,\n}: {\n definedStylesByKey: Map<string, SelectModeDefinedStyle>;\n property: string;\n variant: SelectModeStyleVariant | null;\n className: string | null;\n raw: string;\n resolved: string;\n}) {\n definedStylesByKey.set(getDefinedStyleKey({ property, variant }), {\n property,\n variant,\n className,\n raw,\n resolved,\n });\n}\n\nfunction addRuleDefinedStyles({\n rule,\n activeAtRules,\n classNames,\n definedStylesByKey,\n}: {\n rule: CSSStyleRule;\n activeAtRules: SelectModeStyleAtRule[];\n classNames: string[];\n definedStylesByKey: Map<string, SelectModeDefinedStyle>;\n}) {\n const selectorMatches = getClassSelectorMatches({\n selectorText: rule.selectorText ?? \"\",\n classNames,\n });\n if (selectorMatches.length === 0) {\n return;\n }\n\n for (const selectorMatch of selectorMatches) {\n const variant = getStyleVariant({\n atRules: activeAtRules,\n pseudo: selectorMatch.pseudo,\n });\n\n for (let styleIndex = 0; styleIndex < rule.style.length; styleIndex += 1) {\n const property = rule.style.item(styleIndex);\n if (!property || !isControlStyleProperty(property)) {\n continue;\n }\n\n const raw = rule.style.getPropertyValue(property).trim();\n if (!raw) {\n continue;\n }\n\n setDefinedStyle({\n definedStylesByKey,\n property,\n variant,\n className: selectorMatch.className,\n raw,\n resolved: getResolvedClassStyleValue({\n className: selectorMatch.className,\n property,\n raw,\n variant,\n }),\n });\n }\n }\n}\n\nfunction addStyleRulesRecursively({\n ruleList,\n activeAtRules,\n classNames,\n definedStylesByKey,\n}: {\n ruleList: CSSRuleList;\n activeAtRules: SelectModeStyleAtRule[];\n classNames: string[];\n definedStylesByKey: Map<string, SelectModeDefinedStyle>;\n}) {\n for (const rule of Array.from(ruleList)) {\n const nestedRuleList = getNestedRuleList(rule);\n if (nestedRuleList) {\n addStyleRulesRecursively({\n ruleList: nestedRuleList,\n activeAtRules: getNestedAtRules({ rule, activeAtRules }),\n classNames,\n definedStylesByKey,\n });\n }\n\n if (rule instanceof CSSStyleRule) {\n addRuleDefinedStyles({\n rule,\n activeAtRules,\n classNames,\n definedStylesByKey,\n });\n }\n }\n}\n\nfunction addClassDefinedStyles({\n element,\n definedStylesByKey,\n}: {\n element: Element;\n definedStylesByKey: Map<string, SelectModeDefinedStyle>;\n}) {\n const classNames = Array.from(\n new Set([...element.classList].filter(Boolean)),\n );\n if (classNames.length === 0) {\n return;\n }\n\n for (const sheet of Array.from(document.styleSheets)) {\n if (sheet.href) {\n try {\n const sheetUrl = new URL(sheet.href);\n if (sheetUrl.origin !== window.location.origin) {\n continue;\n }\n } catch (error) {\n if (error instanceof TypeError) {\n continue;\n }\n throw error;\n }\n }\n\n try {\n addStyleRulesRecursively({\n ruleList: sheet.cssRules,\n activeAtRules: [],\n classNames,\n definedStylesByKey,\n });\n } catch (error) {\n if (error instanceof DOMException && error.name === \"SecurityError\") {\n continue;\n }\n throw error;\n }\n }\n}\n\nfunction addInlineDefinedStyles({\n element,\n definedStylesByKey,\n}: {\n element: Element;\n definedStylesByKey: Map<string, SelectModeDefinedStyle>;\n}) {\n if (!(element instanceof HTMLElement)) {\n return;\n }\n\n for (let styleIndex = 0; styleIndex < element.style.length; styleIndex += 1) {\n const property = element.style.item(styleIndex);\n if (!property || !isControlStyleProperty(property)) {\n continue;\n }\n const raw = element.style.getPropertyValue(property).trim();\n if (!raw) {\n continue;\n }\n setDefinedStyle({\n definedStylesByKey,\n property,\n variant: null,\n className: null,\n raw,\n resolved: raw,\n });\n }\n}\n\nexport function getDefinedStyles(element: Element): SelectModeDefinedStyle[] {\n const definedStylesByKey = new Map<string, SelectModeDefinedStyle>();\n addClassDefinedStyles({ element, definedStylesByKey });\n addInlineDefinedStyles({ element, definedStylesByKey });\n return Array.from(definedStylesByKey.values());\n}\n\nexport function getInheritedStyles(element: Element): Record<string, string> {\n const computedStyle = window.getComputedStyle(element);\n const inheritedStyles: Record<string, string> = {};\n for (const property of CONTROL_STYLE_PROPERTIES) {\n inheritedStyles[property] = computedStyle.getPropertyValue(property);\n }\n return inheritedStyles;\n}\n"],
5
- "mappings": "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",
4
+ "sourcesContent": ["import type { SelectModeDefinedStyle } from \"schemas/generated/selectMode\";\n\nimport { canopyTombstoneError } from \"../../../lib/tombstone\";\n\n/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */\nexport function getDefinedStyles(_element: Element): SelectModeDefinedStyle[] {\n throw canopyTombstoneError({\n symbol: \"getDefinedStyles\",\n subpath: \"editor/select-mode/descriptor/styleExtraction\",\n replacement: { kind: \"sandbox-runtime\" },\n });\n}\n\n/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */\nexport function getInheritedStyles(_element: Element): Record<string, string> {\n throw canopyTombstoneError({\n symbol: \"getInheritedStyles\",\n subpath: \"editor/select-mode/descriptor/styleExtraction\",\n replacement: { kind: \"sandbox-runtime\" },\n });\n}\n"],
5
+ "mappings": "AAEA,SAAS,4BAA4B;AAG9B,SAAS,iBAAiB,UAA6C;AAC5E,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,aAAa,EAAE,MAAM,kBAAkB;AAAA,EACzC,CAAC;AACH;AAGO,SAAS,mBAAmB,UAA2C;AAC5E,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,aAAa,EAAE,MAAM,kBAAkB;AAAA,EACzC,CAAC;AACH;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,5 @@
1
1
  import type { DisplayMode } from "../../_vendor/schemas/generated/selectMode";
2
+ /** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
2
3
  export declare const displayModeStore: {
3
4
  getSnapshot(): DisplayMode;
4
5
  getServerSnapshot(): DisplayMode;
@@ -7,4 +8,5 @@ export declare const displayModeStore: {
7
8
  /** Test-only: reset back to the default so specs don't leak state. */
8
9
  reset(): void;
9
10
  };
11
+ /** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
10
12
  export declare function useDisplayMode(): DisplayMode;
@@ -1,44 +1,19 @@
1
1
  "use client";
2
- import { useSyncExternalStore } from "react";
3
- const listeners = /* @__PURE__ */ new Set();
4
- let displayMode = "browse";
5
- const SERVER_SNAPSHOT = "browse";
6
- function notify() {
7
- for (const listener of listeners) {
8
- listener();
9
- }
10
- }
11
- const displayModeStore = {
12
- getSnapshot() {
13
- return displayMode;
14
- },
15
- getServerSnapshot() {
16
- return SERVER_SNAPSHOT;
17
- },
18
- subscribe(listener) {
19
- listeners.add(listener);
20
- return () => {
21
- listeners.delete(listener);
22
- };
23
- },
24
- setDisplayMode(nextDisplayMode) {
25
- if (nextDisplayMode === displayMode) {
26
- return;
27
- }
28
- displayMode = nextDisplayMode;
29
- notify();
30
- },
31
- /** Test-only: reset back to the default so specs don't leak state. */
32
- reset() {
33
- displayMode = "browse";
34
- }
35
- };
2
+ import {
3
+ canopyTombstoneError,
4
+ canopyTombstoneObject
5
+ } from "../../lib/tombstone";
6
+ const displayModeStore = canopyTombstoneObject({
7
+ symbol: "displayModeStore",
8
+ subpath: "editor/select-mode/displayModeStore",
9
+ replacement: { kind: "sandbox-runtime" }
10
+ });
36
11
  function useDisplayMode() {
37
- return useSyncExternalStore(
38
- displayModeStore.subscribe,
39
- displayModeStore.getSnapshot,
40
- displayModeStore.getServerSnapshot
41
- );
12
+ throw canopyTombstoneError({
13
+ symbol: "useDisplayMode",
14
+ subpath: "editor/select-mode/displayModeStore",
15
+ replacement: { kind: "sandbox-runtime" }
16
+ });
42
17
  }
43
18
  export {
44
19
  displayModeStore,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../editor/select-mode/displayModeStore.ts"],
4
- "sourcesContent": ["\"use client\";\n\nimport type { DisplayMode } from \"schemas/generated/selectMode\";\n\nimport { useSyncExternalStore } from \"react\";\n\n/**\n * Framework-agnostic singleton for the preview iframe's select-mode display\n * mode (\"browse\" vs \"selection\"). It lives as a module singleton so that\n * components that don't share a provider ancestor \u2014 `EditorSelection` (which\n * owns the pointer/selection machinery) and `LinkInterceptor` (a sibling under\n * `ReploProvider`) \u2014 can agree on whether the user is currently selecting.\n *\n * `LinkInterceptor` needs this because in agent-preview mode it turns\n * same-origin link clicks into a `replo:navigate` postMessage (SPA-style\n * navigation of the preview). While select mode is active that navigation must\n * stand down so a link click selects the element instead of leaving the page \u2014\n * the two capture-phase click listeners otherwise race, and `stopPropagation`\n * can't suppress a sibling listener on the same node.\n *\n * @author Noah Gilmore 2026-07-23\n */\n\nconst listeners = new Set<() => void>();\nlet displayMode: DisplayMode = \"browse\";\n\n// select-mode DOM behavior is client-only, so the server snapshot is a stable\n// constant and never causes a hydration mismatch.\nconst SERVER_SNAPSHOT: DisplayMode = \"browse\";\n\nfunction notify() {\n for (const listener of listeners) {\n listener();\n }\n}\n\nexport const displayModeStore = {\n getSnapshot(): DisplayMode {\n return displayMode;\n },\n getServerSnapshot(): DisplayMode {\n return SERVER_SNAPSHOT;\n },\n subscribe(listener: () => void): () => void {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n },\n setDisplayMode(nextDisplayMode: DisplayMode) {\n if (nextDisplayMode === displayMode) {\n return;\n }\n displayMode = nextDisplayMode;\n notify();\n },\n /** Test-only: reset back to the default so specs don't leak state. */\n reset() {\n displayMode = \"browse\";\n },\n};\n\nexport function useDisplayMode(): DisplayMode {\n return useSyncExternalStore(\n displayModeStore.subscribe,\n displayModeStore.getSnapshot,\n displayModeStore.getServerSnapshot,\n );\n}\n"],
5
- "mappings": ";AAIA,SAAS,4BAA4B;AAmBrC,MAAM,YAAY,oBAAI,IAAgB;AACtC,IAAI,cAA2B;AAI/B,MAAM,kBAA+B;AAErC,SAAS,SAAS;AAChB,aAAW,YAAY,WAAW;AAChC,aAAS;AAAA,EACX;AACF;AAEO,MAAM,mBAAmB;AAAA,EAC9B,cAA2B;AACzB,WAAO;AAAA,EACT;AAAA,EACA,oBAAiC;AAC/B,WAAO;AAAA,EACT;AAAA,EACA,UAAU,UAAkC;AAC1C,cAAU,IAAI,QAAQ;AACtB,WAAO,MAAM;AACX,gBAAU,OAAO,QAAQ;AAAA,IAC3B;AAAA,EACF;AAAA,EACA,eAAe,iBAA8B;AAC3C,QAAI,oBAAoB,aAAa;AACnC;AAAA,IACF;AACA,kBAAc;AACd,WAAO;AAAA,EACT;AAAA;AAAA,EAEA,QAAQ;AACN,kBAAc;AAAA,EAChB;AACF;AAEO,SAAS,iBAA8B;AAC5C,SAAO;AAAA,IACL,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,EACnB;AACF;",
4
+ "sourcesContent": ["\"use client\";\n\nimport type { DisplayMode } from \"schemas/generated/selectMode\";\n\nimport {\n canopyTombstoneError,\n canopyTombstoneObject,\n} from \"../../lib/tombstone\";\n\n/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */\nexport const displayModeStore: {\n getSnapshot(): DisplayMode;\n getServerSnapshot(): DisplayMode;\n subscribe(listener: () => void): () => void;\n setDisplayMode(nextDisplayMode: DisplayMode): void;\n /** Test-only: reset back to the default so specs don't leak state. */\n reset(): void;\n} = canopyTombstoneObject<{\n getSnapshot(): DisplayMode;\n getServerSnapshot(): DisplayMode;\n subscribe(listener: () => void): () => void;\n setDisplayMode(nextDisplayMode: DisplayMode): void;\n /** Test-only: reset back to the default so specs don't leak state. */\n reset(): void;\n}>({\n symbol: \"displayModeStore\",\n subpath: \"editor/select-mode/displayModeStore\",\n replacement: { kind: \"sandbox-runtime\" },\n});\n\n/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */\nexport function useDisplayMode(): DisplayMode {\n throw canopyTombstoneError({\n symbol: \"useDisplayMode\",\n subpath: \"editor/select-mode/displayModeStore\",\n replacement: { kind: \"sandbox-runtime\" },\n });\n}\n"],
5
+ "mappings": ";AAIA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAGA,MAAM,mBAOT,sBAOD;AAAA,EACD,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,aAAa,EAAE,MAAM,kBAAkB;AACzC,CAAC;AAGM,SAAS,iBAA8B;AAC5C,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,aAAa,EAAE,MAAM,kBAAkB;AAAA,EACzC,CAAC;AACH;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
- export declare function installFastRefreshRelay({ onComplete, }?: {
1
+ /** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
2
+ export declare function installFastRefreshRelay(_args?: {
2
3
  onComplete?: () => void;
3
4
  }): void;
@@ -1,31 +1,10 @@
1
- import { getWebsiteBuilderRpc } from "./iframeRpcChannel";
2
- let hasInstalledFastRefreshRelay = false;
3
- let onFastRefreshComplete = null;
4
- function installFastRefreshRelay({
5
- onComplete
6
- } = {}) {
7
- onFastRefreshComplete = onComplete ?? null;
8
- if (hasInstalledFastRefreshRelay) {
9
- return;
10
- }
11
- hasInstalledFastRefreshRelay = true;
12
- const originalLog = console.log;
13
- const originalInfo = console.info;
14
- const relayIfFastRefreshComplete = (...args) => {
15
- const message = args.join(" ");
16
- if (message.includes("[Fast Refresh] done")) {
17
- getWebsiteBuilderRpc()?.fastRefreshComplete(void 0);
18
- onFastRefreshComplete?.();
19
- }
20
- };
21
- console.log = (...args) => {
22
- relayIfFastRefreshComplete(...args);
23
- originalLog(...args);
24
- };
25
- console.info = (...args) => {
26
- relayIfFastRefreshComplete(...args);
27
- originalInfo(...args);
28
- };
1
+ import { canopyTombstoneError } from "../../lib/tombstone";
2
+ function installFastRefreshRelay(_args = {}) {
3
+ throw canopyTombstoneError({
4
+ symbol: "installFastRefreshRelay",
5
+ subpath: "editor/select-mode/fast-refresh-relay",
6
+ replacement: { kind: "sandbox-runtime" }
7
+ });
29
8
  }
30
9
  export {
31
10
  installFastRefreshRelay
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../editor/select-mode/fast-refresh-relay.ts"],
4
- "sourcesContent": ["import { getWebsiteBuilderRpc } from \"./iframeRpcChannel\";\n\nlet hasInstalledFastRefreshRelay = false;\nlet onFastRefreshComplete: (() => void) | null = null;\n\nexport function installFastRefreshRelay({\n onComplete,\n}: { onComplete?: () => void } = {}) {\n onFastRefreshComplete = onComplete ?? null;\n if (hasInstalledFastRefreshRelay) {\n return;\n }\n hasInstalledFastRefreshRelay = true;\n\n const originalLog = console.log;\n const originalInfo = console.info;\n const relayIfFastRefreshComplete = (...args: unknown[]) => {\n const message = args.join(\" \");\n if (message.includes(\"[Fast Refresh] done\")) {\n getWebsiteBuilderRpc()?.fastRefreshComplete(undefined);\n onFastRefreshComplete?.();\n }\n };\n\n console.log = (...args: unknown[]) => {\n relayIfFastRefreshComplete(...args);\n originalLog(...args);\n };\n console.info = (...args: unknown[]) => {\n relayIfFastRefreshComplete(...args);\n originalInfo(...args);\n };\n}\n"],
5
- "mappings": "AAAA,SAAS,4BAA4B;AAErC,IAAI,+BAA+B;AACnC,IAAI,wBAA6C;AAE1C,SAAS,wBAAwB;AAAA,EACtC;AACF,IAAiC,CAAC,GAAG;AACnC,0BAAwB,cAAc;AACtC,MAAI,8BAA8B;AAChC;AAAA,EACF;AACA,iCAA+B;AAE/B,QAAM,cAAc,QAAQ;AAC5B,QAAM,eAAe,QAAQ;AAC7B,QAAM,6BAA6B,IAAI,SAAoB;AACzD,UAAM,UAAU,KAAK,KAAK,GAAG;AAC7B,QAAI,QAAQ,SAAS,qBAAqB,GAAG;AAC3C,2BAAqB,GAAG,oBAAoB,MAAS;AACrD,8BAAwB;AAAA,IAC1B;AAAA,EACF;AAEA,UAAQ,MAAM,IAAI,SAAoB;AACpC,+BAA2B,GAAG,IAAI;AAClC,gBAAY,GAAG,IAAI;AAAA,EACrB;AACA,UAAQ,OAAO,IAAI,SAAoB;AACrC,+BAA2B,GAAG,IAAI;AAClC,iBAAa,GAAG,IAAI;AAAA,EACtB;AACF;",
4
+ "sourcesContent": ["/* oxlint-disable replo/no-void-return-type -- Tombstone declarations preserve exact return types for consumer compatibility. */\nimport { canopyTombstoneError } from \"../../lib/tombstone\";\n\n/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */\nexport function installFastRefreshRelay(\n _args: {\n onComplete?: () => void;\n } = {},\n): void {\n throw canopyTombstoneError({\n symbol: \"installFastRefreshRelay\",\n subpath: \"editor/select-mode/fast-refresh-relay\",\n replacement: { kind: \"sandbox-runtime\" },\n });\n}\n"],
5
+ "mappings": "AACA,SAAS,4BAA4B;AAG9B,SAAS,wBACd,QAEI,CAAC,GACC;AACN,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,aAAa,EAAE,MAAM,kBAAkB;AAAA,EACzC,CAAC;AACH;",
6
6
  "names": []
7
7
  }
@@ -14,29 +14,36 @@ export interface ReactFiber {
14
14
  memoizedProps?: Record<string, unknown>;
15
15
  pendingProps?: Record<string, unknown>;
16
16
  }
17
- export declare function getFiberFromElement(element: HTMLElement): ReactFiber | null;
18
- export declare function getComponentName(fiber: ReactFiber | null | undefined): string | undefined;
19
- export declare function findDebugSource(fiber: ReactFiber, maxDepth?: number): {
17
+ /** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
18
+ export declare function getFiberFromElement(_element: HTMLElement): ReactFiber | null;
19
+ /** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
20
+ export declare function getComponentName(_fiber: ReactFiber | null | undefined): string | undefined;
21
+ /** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
22
+ export declare function findDebugSource(_fiber: ReactFiber, _maxDepth?: number): {
20
23
  source: ReactFiber["_debugSource"];
21
24
  componentName?: string;
22
25
  } | null;
23
- export declare function findDebugSourceReact19(fiber: ReactFiber): {
26
+ /** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
27
+ export declare function findDebugSourceReact19(_fiber: ReactFiber): {
24
28
  source: ReactFiber["_debugSource"];
25
29
  componentName?: string;
26
30
  } | null;
27
- export declare function getSourceLocation(element: HTMLElement): {
31
+ /** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
32
+ export declare function getSourceLocation(_element: HTMLElement): {
28
33
  filePath: string;
29
34
  lineNumber: number;
30
35
  columnNumber: number | undefined;
31
36
  componentName: string | undefined;
32
37
  } | undefined;
33
- export declare function getHostSourceIdentity(element: HTMLElement): {
38
+ /** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
39
+ export declare function getHostSourceIdentity(_element: HTMLElement): {
34
40
  filePath: string;
35
41
  lineNumber: number;
36
42
  columnNumber: number | undefined;
37
43
  tagName: string;
38
44
  } | null;
39
- export declare function getFiberChain(element: HTMLElement): {
45
+ /** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
46
+ export declare function getFiberChain(_element: HTMLElement): {
40
47
  sourceLocation: {
41
48
  filePath: string;
42
49
  lineNumber: number;
@@ -1,298 +1,52 @@
1
- import { z } from "zod";
2
- const MAX_FIBER_CHAIN_DEPTH = 80;
3
- const MAX_SERIALIZED_PROP_COUNT = 24;
4
- const MAX_SERIALIZED_STRING_LENGTH = 500;
5
- const REACT_INTERNAL_FRAME_PATTERNS = [
6
- /react.*jsx-dev-runtime/,
7
- /react.*jsx-runtime/,
8
- /react-dom\//,
9
- /react\/cjs\/react\./,
10
- /react-server-dom/,
11
- /react_server_dom/,
12
- /next[/_.]dist[/_.]compiled/,
13
- /\/node_modules\/(next|react|react-dom)\//
14
- ];
15
- function isReactInternalFrame(fileName) {
16
- return REACT_INTERNAL_FRAME_PATTERNS.some((pattern) => {
17
- return pattern.test(fileName);
1
+ import { canopyTombstoneError } from "../../lib/tombstone";
2
+ function getFiberFromElement(_element) {
3
+ throw canopyTombstoneError({
4
+ symbol: "getFiberFromElement",
5
+ subpath: "editor/select-mode/fiber",
6
+ replacement: { kind: "sandbox-runtime" }
18
7
  });
19
8
  }
20
- const REACT_INTERNAL_METHOD_PATTERNS = [
21
- /(?:^|\.)jsxDEV(?:Impl)?$/,
22
- /(?:^|\.)jsxs?$/,
23
- /(?:^|\.)react_stack_bottom_frame$/,
24
- /(?:^|\.)fakeJSXCallSite$/
25
- ];
26
- function isReactInternalMethod(methodName) {
27
- if (!methodName) {
28
- return false;
29
- }
30
- return REACT_INTERNAL_METHOD_PATTERNS.some((pattern) => {
31
- return pattern.test(methodName);
9
+ function getComponentName(_fiber) {
10
+ throw canopyTombstoneError({
11
+ symbol: "getComponentName",
12
+ subpath: "editor/select-mode/fiber",
13
+ replacement: { kind: "sandbox-runtime" }
32
14
  });
33
15
  }
34
- function parseDebugStackSource(debugStack) {
35
- let stackText = null;
36
- if (typeof debugStack === "string") {
37
- stackText = debugStack;
38
- } else if (typeof debugStack === "object" && debugStack && "stack" in debugStack) {
39
- const stack = debugStack.stack;
40
- if (typeof stack === "string") {
41
- stackText = stack;
42
- }
43
- }
44
- if (!stackText) {
45
- return null;
46
- }
47
- for (const rawLine of stackText.split("\n")) {
48
- const line = rawLine.trim();
49
- if (!line) {
50
- continue;
51
- }
52
- const framedMatch = line.match(/^at\s+(.+?)\s+\((.*):(\d+):(\d+)\)$/);
53
- const stackFrameMatch = framedMatch ?? line.match(/^at\s+(?:.*\()?(.*):(\d+):(\d+)\)?$/) ?? line.match(/^(.*):(\d+):(\d+)$/);
54
- if (!stackFrameMatch) {
55
- continue;
56
- }
57
- const methodName = framedMatch ? framedMatch[1].trim() : null;
58
- const fileOffset = framedMatch ? 2 : 1;
59
- const fileName = stackFrameMatch[fileOffset]?.trim();
60
- const lineNumber = Number.parseInt(
61
- stackFrameMatch[fileOffset + 1] ?? "",
62
- 10
63
- );
64
- const columnNumber = Number.parseInt(
65
- stackFrameMatch[fileOffset + 2] ?? "",
66
- 10
67
- );
68
- if (!fileName || !Number.isFinite(lineNumber) || !Number.isFinite(columnNumber)) {
69
- continue;
70
- }
71
- if (isReactInternalFrame(fileName) || isReactInternalMethod(methodName)) {
72
- continue;
73
- }
74
- return {
75
- fileName,
76
- lineNumber,
77
- columnNumber
78
- };
79
- }
80
- return null;
81
- }
82
- function getFiberFromElement(element) {
83
- if (!element || typeof element !== "object") {
84
- return null;
85
- }
86
- const symbolKeys = Object.getOwnPropertySymbols(element);
87
- const fiberSymbolKey = symbolKeys.find((symbolKey) => {
88
- return symbolKey.toString().includes("reactFiber");
89
- });
90
- if (fiberSymbolKey) {
91
- return (
92
- // Legacy cast - may or may not be necessary
93
- // eslint-disable-next-line replo/no-as-cast
94
- element[fiberSymbolKey] ?? null
95
- );
96
- }
97
- const keys = Object.keys(element);
98
- const fiberKey = keys.find((key) => key.startsWith("__reactFiber$"));
99
- if (fiberKey) {
100
- return element[fiberKey] ?? null;
101
- }
102
- const instanceKey = keys.find((key) => {
103
- return key.startsWith("__reactInternalInstance$");
16
+ function findDebugSource(_fiber, _maxDepth = 50) {
17
+ throw canopyTombstoneError({
18
+ symbol: "findDebugSource",
19
+ subpath: "editor/select-mode/fiber",
20
+ replacement: { kind: "sandbox-runtime" }
104
21
  });
105
- if (instanceKey) {
106
- return (
107
- // Legacy cast - may or may not be necessary
108
- // eslint-disable-next-line replo/no-as-cast
109
- element[instanceKey] ?? null
110
- );
111
- }
112
- const possibleFiberKey = keys.find((key) => {
113
- if (!key.startsWith("__react")) {
114
- return false;
115
- }
116
- const value = element[key];
117
- return value && typeof value === "object" && "_debugSource" in value;
118
- });
119
- if (possibleFiberKey) {
120
- return (
121
- // Legacy cast - may or may not be necessary
122
- // eslint-disable-next-line replo/no-as-cast
123
- element[possibleFiberKey] ?? null
124
- );
125
- }
126
- return null;
127
- }
128
- function getComponentName(fiber) {
129
- if (!fiber?.type) {
130
- return void 0;
131
- }
132
- if (typeof fiber.type === "string") {
133
- return void 0;
134
- }
135
- if (typeof fiber.type === "function") {
136
- return fiber.type.name || void 0;
137
- }
138
- if (typeof fiber.type === "object") {
139
- return fiber.type.displayName ?? fiber.type.name ?? void 0;
140
- }
141
- return void 0;
142
- }
143
- function findDebugSource(fiber, maxDepth = 50) {
144
- let current = fiber;
145
- let depth = 0;
146
- while (current && depth < maxDepth) {
147
- if (current._debugSource) {
148
- return {
149
- source: current._debugSource,
150
- componentName: getComponentName(current)
151
- };
152
- }
153
- if (current._debugOwner?._debugSource) {
154
- return {
155
- source: current._debugOwner._debugSource,
156
- componentName: getComponentName(current._debugOwner)
157
- };
158
- }
159
- current = current.return;
160
- depth++;
161
- }
162
- return null;
163
- }
164
- function findDebugSourceReact19(fiber) {
165
- let current = fiber;
166
- let depth = 0;
167
- const maxDepth = 50;
168
- while (current && depth < maxDepth) {
169
- const debugStackSource = parseDebugStackSource(current._debugStack) ?? parseDebugStackSource(current._debugOwner?._debugStack);
170
- if (debugStackSource) {
171
- return {
172
- source: debugStackSource,
173
- componentName: getComponentName(current)
174
- };
175
- }
176
- current = current.return;
177
- depth++;
178
- }
179
- return null;
180
- }
181
- function getSourceLocation(element) {
182
- let currentElement = element;
183
- while (currentElement) {
184
- const fiber = getFiberFromElement(currentElement);
185
- if (fiber) {
186
- const debugInfo = findDebugSource(fiber) ?? findDebugSourceReact19(fiber);
187
- if (debugInfo?.source) {
188
- return {
189
- filePath: debugInfo.source.fileName,
190
- lineNumber: debugInfo.source.lineNumber,
191
- columnNumber: debugInfo.source.columnNumber,
192
- componentName: debugInfo.componentName ?? void 0
193
- };
194
- }
195
- }
196
- currentElement = currentElement.parentElement;
197
- }
198
- return void 0;
199
22
  }
200
- function getDebugSource(fiber) {
201
- const debugInfo = findDebugSource(fiber) ?? findDebugSourceReact19(fiber);
202
- return debugInfo?.source;
203
- }
204
- function getTagName(fiber) {
205
- return z.string().safeParse(fiber.type).data?.toLowerCase();
206
- }
207
- function getHostSourceIdentity(element) {
208
- const fiber = getFiberFromElement(element);
209
- if (!fiber) {
210
- return null;
211
- }
212
- const source = getDebugSource(fiber);
213
- if (!source) {
214
- return null;
215
- }
216
- return {
217
- filePath: source.fileName,
218
- lineNumber: source.lineNumber,
219
- columnNumber: source.columnNumber,
220
- tagName: element.tagName.toLowerCase()
221
- };
23
+ function findDebugSourceReact19(_fiber) {
24
+ throw canopyTombstoneError({
25
+ symbol: "findDebugSourceReact19",
26
+ subpath: "editor/select-mode/fiber",
27
+ replacement: { kind: "sandbox-runtime" }
28
+ });
222
29
  }
223
- function getSerializablePropValue(value) {
224
- if (value === null || typeof value === "number" || typeof value === "boolean") {
225
- return value;
226
- }
227
- if (typeof value === "string") {
228
- return value.length > MAX_SERIALIZED_STRING_LENGTH ? `${value.slice(0, MAX_SERIALIZED_STRING_LENGTH)}...` : value;
229
- }
230
- if (Array.isArray(value)) {
231
- return value.slice(0, 20).map(getSerializablePropValue);
232
- }
233
- if (typeof value === "object") {
234
- return "[object]";
235
- }
236
- return void 0;
30
+ function getSourceLocation(_element) {
31
+ throw canopyTombstoneError({
32
+ symbol: "getSourceLocation",
33
+ subpath: "editor/select-mode/fiber",
34
+ replacement: { kind: "sandbox-runtime" }
35
+ });
237
36
  }
238
- function getSerializableProps(props) {
239
- if (!props) {
240
- return void 0;
241
- }
242
- const serializedProps = {};
243
- for (const [key, value] of Object.entries(props).slice(
244
- 0,
245
- MAX_SERIALIZED_PROP_COUNT
246
- )) {
247
- if (key === "children" || key === "ref" || key.startsWith("on") || typeof value === "function" || typeof value === "symbol") {
248
- continue;
249
- }
250
- const serializableValue = getSerializablePropValue(value);
251
- if (serializableValue !== void 0) {
252
- serializedProps[key] = serializableValue;
253
- }
254
- }
255
- return Object.keys(serializedProps).length > 0 ? serializedProps : void 0;
37
+ function getHostSourceIdentity(_element) {
38
+ throw canopyTombstoneError({
39
+ symbol: "getHostSourceIdentity",
40
+ subpath: "editor/select-mode/fiber",
41
+ replacement: { kind: "sandbox-runtime" }
42
+ });
256
43
  }
257
- function getFiberChain(element) {
258
- const rootFiber = getFiberFromElement(element);
259
- const fiberChain = [];
260
- const seenKeys = /* @__PURE__ */ new Set();
261
- let currentFiber = rootFiber;
262
- let depth = 0;
263
- while (currentFiber && depth < MAX_FIBER_CHAIN_DEPTH) {
264
- const source = getDebugSource(currentFiber);
265
- if (source) {
266
- const tagName = getTagName(currentFiber);
267
- const componentName = getComponentName(currentFiber);
268
- const key = [
269
- source.fileName,
270
- source.lineNumber,
271
- source.columnNumber ?? "",
272
- tagName ?? "",
273
- componentName ?? ""
274
- ].join(":");
275
- if (!seenKeys.has(key)) {
276
- seenKeys.add(key);
277
- fiberChain.push({
278
- sourceLocation: {
279
- filePath: source.fileName,
280
- lineNumber: source.lineNumber,
281
- columnNumber: source.columnNumber,
282
- componentName
283
- },
284
- tagName,
285
- componentName,
286
- props: getSerializableProps(
287
- currentFiber.memoizedProps ?? currentFiber.pendingProps
288
- )
289
- });
290
- }
291
- }
292
- currentFiber = currentFiber.return;
293
- depth += 1;
294
- }
295
- return fiberChain;
44
+ function getFiberChain(_element) {
45
+ throw canopyTombstoneError({
46
+ symbol: "getFiberChain",
47
+ subpath: "editor/select-mode/fiber",
48
+ replacement: { kind: "sandbox-runtime" }
49
+ });
296
50
  }
297
51
  export {
298
52
  findDebugSource,