@bleedingdev/tanstack-redact 0.0.0-stage → 0.2.2

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 (476) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cloudflare/index.d.ts +6 -0
  3. package/dist/cloudflare/index.js +39 -0
  4. package/dist/cloudflare/index.js.map +7 -0
  5. package/dist/core/attributes.d.ts +4 -0
  6. package/dist/core/attributes.js +30 -0
  7. package/dist/core/attributes.js.map +7 -0
  8. package/dist/core/browser.d.ts +9 -0
  9. package/dist/core/browser.js +32 -0
  10. package/dist/core/browser.js.map +7 -0
  11. package/dist/core/class-props.d.ts +1 -0
  12. package/dist/core/class-props.js +15 -0
  13. package/dist/core/class-props.js.map +7 -0
  14. package/dist/core/devtools.d.ts +26 -0
  15. package/dist/core/devtools.js +70 -0
  16. package/dist/core/devtools.js.map +7 -0
  17. package/dist/core/functions.d.ts +6 -0
  18. package/dist/core/functions.js +14 -0
  19. package/dist/core/functions.js.map +7 -0
  20. package/dist/core/index.d.ts +2 -0
  21. package/dist/core/index.js +3 -0
  22. package/dist/core/index.js.map +7 -0
  23. package/dist/core/internal.d.ts +103 -0
  24. package/dist/core/internal.js +43 -0
  25. package/dist/core/internal.js.map +7 -0
  26. package/dist/core/resource-hints.d.ts +7 -0
  27. package/dist/core/resource-hints.js +20 -0
  28. package/dist/core/resource-hints.js.map +7 -0
  29. package/dist/core/types.d.ts +23 -0
  30. package/dist/core/types.js +8 -0
  31. package/dist/core/types.js.map +7 -0
  32. package/dist/core/unitless-style.d.ts +1 -0
  33. package/dist/core/unitless-style.js +5 -0
  34. package/dist/core/unitless-style.js.map +7 -0
  35. package/dist/dom/_all.d.ts +27 -0
  36. package/dist/dom/_all.js +51 -0
  37. package/dist/dom/_all.js.map +7 -0
  38. package/dist/dom/client.d.ts +9 -0
  39. package/dist/dom/client.js +13 -0
  40. package/dist/dom/client.js.map +7 -0
  41. package/dist/dom/commit.d.ts +27 -0
  42. package/dist/dom/commit.js +237 -0
  43. package/dist/dom/commit.js.map +7 -0
  44. package/dist/dom/devtools-effects.d.ts +8 -0
  45. package/dist/dom/devtools-effects.js +80 -0
  46. package/dist/dom/devtools-effects.js.map +7 -0
  47. package/dist/dom/devtools.d.ts +33 -0
  48. package/dist/dom/devtools.js +635 -0
  49. package/dist/dom/devtools.js.map +7 -0
  50. package/dist/dom/dispatcher.d.ts +4 -0
  51. package/dist/dom/dispatcher.js +437 -0
  52. package/dist/dom/dispatcher.js.map +7 -0
  53. package/dist/dom/document-metadata.d.ts +7 -0
  54. package/dist/dom/document-metadata.js +44 -0
  55. package/dist/dom/document-metadata.js.map +7 -0
  56. package/dist/dom/dom.d.ts +11 -0
  57. package/dist/dom/dom.js +165 -0
  58. package/dist/dom/dom.js.map +7 -0
  59. package/dist/dom/error-info.d.ts +2 -0
  60. package/dist/dom/error-info.js +19 -0
  61. package/dist/dom/error-info.js.map +7 -0
  62. package/dist/dom/event-replay.d.ts +13 -0
  63. package/dist/dom/event-replay.js +24 -0
  64. package/dist/dom/event-replay.js.map +7 -0
  65. package/dist/dom/features/activity/full.d.ts +1 -0
  66. package/dist/dom/features/activity/full.js +140 -0
  67. package/dist/dom/features/activity/full.js.map +7 -0
  68. package/dist/dom/features/activity/index.d.ts +1 -0
  69. package/dist/dom/features/activity/index.js +2 -0
  70. package/dist/dom/features/activity/index.js.map +7 -0
  71. package/dist/dom/features/activity/stub.d.ts +1 -0
  72. package/dist/dom/features/activity/stub.js +10 -0
  73. package/dist/dom/features/activity/stub.js.map +7 -0
  74. package/dist/dom/features/class/full.d.ts +1 -0
  75. package/dist/dom/features/class/full.js +208 -0
  76. package/dist/dom/features/class/full.js.map +7 -0
  77. package/dist/dom/features/class/index.d.ts +1 -0
  78. package/dist/dom/features/class/index.js +2 -0
  79. package/dist/dom/features/class/index.js.map +7 -0
  80. package/dist/dom/features/class/stub.d.ts +1 -0
  81. package/dist/dom/features/class/stub.js +46 -0
  82. package/dist/dom/features/class/stub.js.map +7 -0
  83. package/dist/dom/features/context/full.d.ts +4 -0
  84. package/dist/dom/features/context/full.js +103 -0
  85. package/dist/dom/features/context/full.js.map +7 -0
  86. package/dist/dom/features/context/index.d.ts +1 -0
  87. package/dist/dom/features/context/index.js +2 -0
  88. package/dist/dom/features/context/index.js.map +7 -0
  89. package/dist/dom/features/context/stub.d.ts +4 -0
  90. package/dist/dom/features/context/stub.js +21 -0
  91. package/dist/dom/features/context/stub.js.map +7 -0
  92. package/dist/dom/features/forward-ref/full.d.ts +1 -0
  93. package/dist/dom/features/forward-ref/full.js +9 -0
  94. package/dist/dom/features/forward-ref/full.js.map +7 -0
  95. package/dist/dom/features/forward-ref/index.d.ts +1 -0
  96. package/dist/dom/features/forward-ref/index.js +2 -0
  97. package/dist/dom/features/forward-ref/index.js.map +7 -0
  98. package/dist/dom/features/forward-ref/stub.d.ts +1 -0
  99. package/dist/dom/features/forward-ref/stub.js +9 -0
  100. package/dist/dom/features/forward-ref/stub.js.map +7 -0
  101. package/dist/dom/features/fragment-refs/index.d.ts +1 -0
  102. package/dist/dom/features/fragment-refs/index.js +9 -0
  103. package/dist/dom/features/fragment-refs/index.js.map +7 -0
  104. package/dist/dom/features/fragment-refs/stub.d.ts +5 -0
  105. package/dist/dom/features/fragment-refs/stub.js +17 -0
  106. package/dist/dom/features/fragment-refs/stub.js.map +7 -0
  107. package/dist/dom/features/hydration/full.d.ts +68 -0
  108. package/dist/dom/features/hydration/full.js +493 -0
  109. package/dist/dom/features/hydration/full.js.map +7 -0
  110. package/dist/dom/features/hydration/index.d.ts +1 -0
  111. package/dist/dom/features/hydration/index.js +2 -0
  112. package/dist/dom/features/hydration/index.js.map +7 -0
  113. package/dist/dom/features/hydration/stub.d.ts +36 -0
  114. package/dist/dom/features/hydration/stub.js +80 -0
  115. package/dist/dom/features/hydration/stub.js.map +7 -0
  116. package/dist/dom/features/index.d.ts +8 -0
  117. package/dist/dom/features/index.js +9 -0
  118. package/dist/dom/features/index.js.map +7 -0
  119. package/dist/dom/features/lazy/full.d.ts +1 -0
  120. package/dist/dom/features/lazy/full.js +23 -0
  121. package/dist/dom/features/lazy/full.js.map +7 -0
  122. package/dist/dom/features/lazy/index.d.ts +1 -0
  123. package/dist/dom/features/lazy/index.js +2 -0
  124. package/dist/dom/features/lazy/index.js.map +7 -0
  125. package/dist/dom/features/lazy/stub.d.ts +1 -0
  126. package/dist/dom/features/lazy/stub.js +19 -0
  127. package/dist/dom/features/lazy/stub.js.map +7 -0
  128. package/dist/dom/features/memo/full.d.ts +1 -0
  129. package/dist/dom/features/memo/full.js +34 -0
  130. package/dist/dom/features/memo/full.js.map +7 -0
  131. package/dist/dom/features/memo/index.d.ts +1 -0
  132. package/dist/dom/features/memo/index.js +2 -0
  133. package/dist/dom/features/memo/index.js.map +7 -0
  134. package/dist/dom/features/memo/stub.d.ts +1 -0
  135. package/dist/dom/features/memo/stub.js +9 -0
  136. package/dist/dom/features/memo/stub.js.map +7 -0
  137. package/dist/dom/features/portal/full.d.ts +1 -0
  138. package/dist/dom/features/portal/full.js +11 -0
  139. package/dist/dom/features/portal/full.js.map +7 -0
  140. package/dist/dom/features/portal/index.d.ts +1 -0
  141. package/dist/dom/features/portal/index.js +2 -0
  142. package/dist/dom/features/portal/index.js.map +7 -0
  143. package/dist/dom/features/portal/stub.d.ts +1 -0
  144. package/dist/dom/features/portal/stub.js +5 -0
  145. package/dist/dom/features/portal/stub.js.map +7 -0
  146. package/dist/dom/features/suspense/full.d.ts +1 -0
  147. package/dist/dom/features/suspense/full.js +389 -0
  148. package/dist/dom/features/suspense/full.js.map +7 -0
  149. package/dist/dom/features/suspense/index.d.ts +1 -0
  150. package/dist/dom/features/suspense/index.js +2 -0
  151. package/dist/dom/features/suspense/index.js.map +7 -0
  152. package/dist/dom/features/suspense/stub.d.ts +1 -0
  153. package/dist/dom/features/suspense/stub.js +4 -0
  154. package/dist/dom/features/suspense/stub.js.map +7 -0
  155. package/dist/dom/features/suspense-runtime/index.d.ts +1 -0
  156. package/dist/dom/features/suspense-runtime/index.js +2 -0
  157. package/dist/dom/features/suspense-runtime/index.js.map +7 -0
  158. package/dist/dom/features/suspense-runtime/stub.d.ts +1 -0
  159. package/dist/dom/features/suspense-runtime/stub.js +11 -0
  160. package/dist/dom/features/suspense-runtime/stub.js.map +7 -0
  161. package/dist/dom/features/view-transition/full.d.ts +7 -0
  162. package/dist/dom/features/view-transition/full.js +324 -0
  163. package/dist/dom/features/view-transition/full.js.map +7 -0
  164. package/dist/dom/features/view-transition/index.d.ts +1 -0
  165. package/dist/dom/features/view-transition/index.js +2 -0
  166. package/dist/dom/features/view-transition/index.js.map +7 -0
  167. package/dist/dom/features/view-transition/resources.d.ts +11 -0
  168. package/dist/dom/features/view-transition/resources.js +117 -0
  169. package/dist/dom/features/view-transition/resources.js.map +7 -0
  170. package/dist/dom/features/view-transition/stub.d.ts +7 -0
  171. package/dist/dom/features/view-transition/stub.js +21 -0
  172. package/dist/dom/features/view-transition/stub.js.map +7 -0
  173. package/dist/dom/features/view-transition/visual.d.ts +14 -0
  174. package/dist/dom/features/view-transition/visual.js +404 -0
  175. package/dist/dom/features/view-transition/visual.js.map +7 -0
  176. package/dist/dom/form-actions.d.ts +4 -0
  177. package/dist/dom/form-actions.js +74 -0
  178. package/dist/dom/form-actions.js.map +7 -0
  179. package/dist/dom/form-controls.d.ts +3 -0
  180. package/dist/dom/form-controls.js +91 -0
  181. package/dist/dom/form-controls.js.map +7 -0
  182. package/dist/dom/fragment-instance.d.ts +33 -0
  183. package/dist/dom/fragment-instance.js +449 -0
  184. package/dist/dom/fragment-instance.js.map +7 -0
  185. package/dist/dom/index.d.ts +61 -0
  186. package/dist/dom/index.js +71 -0
  187. package/dist/dom/index.js.map +7 -0
  188. package/dist/dom/portal.d.ts +2 -0
  189. package/dist/dom/portal.js +14 -0
  190. package/dist/dom/portal.js.map +7 -0
  191. package/dist/dom/react-ids.d.ts +6 -0
  192. package/dist/dom/react-ids.js +38 -0
  193. package/dist/dom/react-ids.js.map +7 -0
  194. package/dist/dom/reconcile.d.ts +86 -0
  195. package/dist/dom/reconcile.js +1305 -0
  196. package/dist/dom/reconcile.js.map +7 -0
  197. package/dist/dom/refresh.d.ts +12 -0
  198. package/dist/dom/refresh.js +174 -0
  199. package/dist/dom/refresh.js.map +7 -0
  200. package/dist/dom/resource-hints.d.ts +6 -0
  201. package/dist/dom/resource-hints.js +107 -0
  202. package/dist/dom/resource-hints.js.map +7 -0
  203. package/dist/dom/resource-store.d.ts +13 -0
  204. package/dist/dom/resource-store.js +47 -0
  205. package/dist/dom/resource-store.js.map +7 -0
  206. package/dist/dom/resources.d.ts +1 -0
  207. package/dist/dom/resources.js +46 -0
  208. package/dist/dom/resources.js.map +7 -0
  209. package/dist/dom/retained-effects.d.ts +6 -0
  210. package/dist/dom/retained-effects.js +67 -0
  211. package/dist/dom/retained-effects.js.map +7 -0
  212. package/dist/dom/root-internal.d.ts +11 -0
  213. package/dist/dom/root-internal.js +35 -0
  214. package/dist/dom/root-internal.js.map +7 -0
  215. package/dist/dom/root.d.ts +17 -0
  216. package/dist/dom/root.js +38 -0
  217. package/dist/dom/root.js.map +7 -0
  218. package/dist/dom/synthetic-event.d.ts +1 -0
  219. package/dist/dom/synthetic-event.js +37 -0
  220. package/dist/dom/synthetic-event.js.map +7 -0
  221. package/dist/dom/test-utils.d.ts +1 -0
  222. package/dist/dom/test-utils.js +5 -0
  223. package/dist/dom/test-utils.js.map +7 -0
  224. package/dist/dom/transitions.d.ts +9 -0
  225. package/dist/dom/transitions.js +147 -0
  226. package/dist/dom/transitions.js.map +7 -0
  227. package/dist/dom/tree.d.ts +5 -0
  228. package/dist/dom/tree.js +62 -0
  229. package/dist/dom/tree.js.map +7 -0
  230. package/dist/dom/walk.d.ts +2 -0
  231. package/dist/dom/walk.js +14 -0
  232. package/dist/dom/walk.js.map +7 -0
  233. package/dist/next/client.d.ts +9 -0
  234. package/dist/next/client.js +14 -0
  235. package/dist/next/client.js.map +7 -0
  236. package/dist/next/dev-cache-loader.cjs +13 -0
  237. package/dist/next/index.d.ts +2 -0
  238. package/dist/next/index.js +97 -0
  239. package/dist/next/index.js.map +7 -0
  240. package/dist/next/loader.cjs +10 -0
  241. package/dist/next/react.d.ts +71 -0
  242. package/dist/next/react.js +9 -0
  243. package/dist/next/react.js.map +7 -0
  244. package/dist/react/act.d.ts +3 -0
  245. package/dist/react/act.js +124 -0
  246. package/dist/react/act.js.map +7 -0
  247. package/dist/react/action-scope.d.ts +17 -0
  248. package/dist/react/action-scope.js +60 -0
  249. package/dist/react/action-scope.js.map +7 -0
  250. package/dist/react/activity.d.ts +7 -0
  251. package/dist/react/activity.js +7 -0
  252. package/dist/react/activity.js.map +7 -0
  253. package/dist/react/children.d.ts +8 -0
  254. package/dist/react/children.js +76 -0
  255. package/dist/react/children.js.map +7 -0
  256. package/dist/react/class.d.ts +36 -0
  257. package/dist/react/class.js +39 -0
  258. package/dist/react/class.js.map +7 -0
  259. package/dist/react/compiler-runtime.d.ts +1 -0
  260. package/dist/react/compiler-runtime.js +9 -0
  261. package/dist/react/compiler-runtime.js.map +7 -0
  262. package/dist/react/context.d.ts +32 -0
  263. package/dist/react/context.js +25 -0
  264. package/dist/react/context.js.map +7 -0
  265. package/dist/react/element.d.ts +13 -0
  266. package/dist/react/element.js +70 -0
  267. package/dist/react/element.js.map +7 -0
  268. package/dist/react/form-state.d.ts +26 -0
  269. package/dist/react/form-state.js +30 -0
  270. package/dist/react/form-state.js.map +7 -0
  271. package/dist/react/hooks.d.ts +67 -0
  272. package/dist/react/hooks.js +165 -0
  273. package/dist/react/hooks.js.map +7 -0
  274. package/dist/react/index.d.ts +99 -0
  275. package/dist/react/index.js +143 -0
  276. package/dist/react/index.js.map +7 -0
  277. package/dist/react/jsx-runtime.d.ts +24 -0
  278. package/dist/react/jsx-runtime.js +37 -0
  279. package/dist/react/jsx-runtime.js.map +7 -0
  280. package/dist/react/memo.d.ts +20 -0
  281. package/dist/react/memo.js +27 -0
  282. package/dist/react/memo.js.map +7 -0
  283. package/dist/react/portal.d.ts +1 -0
  284. package/dist/react/portal.js +5 -0
  285. package/dist/react/portal.js.map +7 -0
  286. package/dist/react/shared-internals.d.ts +52 -0
  287. package/dist/react/shared-internals.js +22 -0
  288. package/dist/react/shared-internals.js.map +7 -0
  289. package/dist/react/suspense.d.ts +15 -0
  290. package/dist/react/suspense.js +15 -0
  291. package/dist/react/suspense.js.map +7 -0
  292. package/dist/react/thenable.d.ts +1 -0
  293. package/dist/react/thenable.js +25 -0
  294. package/dist/react/thenable.js.map +7 -0
  295. package/dist/react/view-transition.d.ts +32 -0
  296. package/dist/react/view-transition.js +12 -0
  297. package/dist/react/view-transition.js.map +7 -0
  298. package/dist/scheduler/index.d.ts +44 -0
  299. package/dist/scheduler/index.js +109 -0
  300. package/dist/scheduler/index.js.map +7 -0
  301. package/dist/server/bootstrap-script.d.ts +3 -0
  302. package/dist/server/bootstrap-script.js +17 -0
  303. package/dist/server/bootstrap-script.js.map +7 -0
  304. package/dist/server/dispatcher.d.ts +57 -0
  305. package/dist/server/dispatcher.js +157 -0
  306. package/dist/server/dispatcher.js.map +7 -0
  307. package/dist/server/escape.d.ts +6 -0
  308. package/dist/server/escape.js +75 -0
  309. package/dist/server/escape.js.map +7 -0
  310. package/dist/server/index.d.ts +16 -0
  311. package/dist/server/index.js +25 -0
  312. package/dist/server/index.js.map +7 -0
  313. package/dist/server/insertion-context.d.ts +3 -0
  314. package/dist/server/insertion-context.js +32 -0
  315. package/dist/server/renderToString.d.ts +7 -0
  316. package/dist/server/renderToString.js +33 -0
  317. package/dist/server/renderToString.js.map +7 -0
  318. package/dist/server/resource-hints.d.ts +22 -0
  319. package/dist/server/resource-hints.js +168 -0
  320. package/dist/server/resource-hints.js.map +7 -0
  321. package/dist/server/stream-ids.d.ts +3 -0
  322. package/dist/server/stream-ids.js +8 -0
  323. package/dist/server/stream.d.ts +61 -0
  324. package/dist/server/stream.js +418 -0
  325. package/dist/server/stream.js.map +7 -0
  326. package/dist/server/walk.d.ts +58 -0
  327. package/dist/server/walk.js +378 -0
  328. package/dist/server/walk.js.map +7 -0
  329. package/dist/vinext/compatibility.d.ts +23 -0
  330. package/dist/vinext/compatibility.js +127 -0
  331. package/dist/vinext/compatibility.js.map +7 -0
  332. package/dist/vinext/flight-timing.d.ts +1 -0
  333. package/dist/vinext/flight-timing.js +46 -0
  334. package/dist/vinext/flight-timing.js.map +7 -0
  335. package/dist/vinext/index.d.ts +5 -0
  336. package/dist/vinext/index.js +50 -0
  337. package/dist/vinext/index.js.map +7 -0
  338. package/dist/vite/index.d.ts +102 -0
  339. package/dist/vite/index.js +291 -0
  340. package/dist/vite/index.js.map +7 -0
  341. package/dist/vite/react18.d.ts +4 -0
  342. package/dist/vite/react18.js +74 -0
  343. package/dist/vite/react18.js.map +7 -0
  344. package/package.json +121 -4
  345. package/src/cloudflare/index.ts +44 -0
  346. package/src/core/attributes.ts +20 -0
  347. package/src/core/browser.ts +34 -0
  348. package/src/core/class-props.ts +12 -0
  349. package/src/core/devtools.ts +69 -0
  350. package/src/core/functions.ts +11 -0
  351. package/src/core/index.ts +2 -0
  352. package/src/core/internal.ts +123 -0
  353. package/src/core/resource-hints.ts +39 -0
  354. package/src/core/types.ts +39 -0
  355. package/src/core/unitless-style.ts +1 -0
  356. package/src/dom/_all.ts +46 -0
  357. package/src/dom/client.ts +17 -0
  358. package/src/dom/commit.ts +223 -0
  359. package/src/dom/devtools-effects.ts +78 -0
  360. package/src/dom/devtools.ts +527 -0
  361. package/src/dom/dispatcher.ts +476 -0
  362. package/src/dom/document-metadata.ts +41 -0
  363. package/src/dom/dom.ts +181 -0
  364. package/src/dom/error-info.ts +20 -0
  365. package/src/dom/event-replay.ts +39 -0
  366. package/src/dom/features/activity/full.ts +150 -0
  367. package/src/dom/features/activity/index.ts +1 -0
  368. package/src/dom/features/activity/stub.ts +12 -0
  369. package/src/dom/features/class/full.ts +202 -0
  370. package/src/dom/features/class/index.ts +1 -0
  371. package/src/dom/features/class/stub.ts +58 -0
  372. package/src/dom/features/context/full.ts +107 -0
  373. package/src/dom/features/context/index.ts +1 -0
  374. package/src/dom/features/context/stub.ts +26 -0
  375. package/src/dom/features/forward-ref/full.ts +9 -0
  376. package/src/dom/features/forward-ref/index.ts +1 -0
  377. package/src/dom/features/forward-ref/stub.ts +15 -0
  378. package/src/dom/features/fragment-refs/index.ts +1 -0
  379. package/src/dom/features/fragment-refs/stub.ts +6 -0
  380. package/src/dom/features/hydration/full.ts +563 -0
  381. package/src/dom/features/hydration/index.ts +1 -0
  382. package/src/dom/features/hydration/stub.ts +86 -0
  383. package/src/dom/features/index.ts +12 -0
  384. package/src/dom/features/lazy/full.ts +27 -0
  385. package/src/dom/features/lazy/index.ts +1 -0
  386. package/src/dom/features/lazy/stub.ts +24 -0
  387. package/src/dom/features/memo/full.ts +39 -0
  388. package/src/dom/features/memo/index.ts +1 -0
  389. package/src/dom/features/memo/stub.ts +13 -0
  390. package/src/dom/features/portal/full.ts +14 -0
  391. package/src/dom/features/portal/index.ts +1 -0
  392. package/src/dom/features/portal/stub.ts +11 -0
  393. package/src/dom/features/suspense/full.ts +469 -0
  394. package/src/dom/features/suspense/index.ts +1 -0
  395. package/src/dom/features/suspense/stub.ts +13 -0
  396. package/src/dom/features/suspense-runtime/index.ts +1 -0
  397. package/src/dom/features/suspense-runtime/stub.ts +1 -0
  398. package/src/dom/features/view-transition/full.ts +292 -0
  399. package/src/dom/features/view-transition/index.ts +1 -0
  400. package/src/dom/features/view-transition/resources.ts +123 -0
  401. package/src/dom/features/view-transition/stub.ts +8 -0
  402. package/src/dom/features/view-transition/visual.ts +454 -0
  403. package/src/dom/form-actions.ts +69 -0
  404. package/src/dom/form-controls.ts +91 -0
  405. package/src/dom/fragment-instance.ts +462 -0
  406. package/src/dom/index.ts +49 -0
  407. package/src/dom/portal.ts +16 -0
  408. package/src/dom/react-ids.ts +36 -0
  409. package/src/dom/reconcile.ts +1423 -0
  410. package/src/dom/refresh.ts +171 -0
  411. package/src/dom/resource-hints.ts +104 -0
  412. package/src/dom/resource-store.ts +50 -0
  413. package/src/dom/resources.ts +47 -0
  414. package/src/dom/retained-effects.ts +57 -0
  415. package/src/dom/root-internal.ts +37 -0
  416. package/src/dom/root.ts +59 -0
  417. package/src/dom/synthetic-event.ts +27 -0
  418. package/src/dom/test-utils.ts +1 -0
  419. package/src/dom/transitions.ts +141 -0
  420. package/src/dom/tree.ts +56 -0
  421. package/src/dom/walk.ts +8 -0
  422. package/src/next/client.ts +10 -0
  423. package/src/next/dev-cache-loader.cjs +13 -0
  424. package/src/next/index.ts +95 -0
  425. package/src/next/loader.cjs +10 -0
  426. package/src/next/react.ts +7 -0
  427. package/src/react/act.ts +105 -0
  428. package/src/react/action-scope.ts +57 -0
  429. package/src/react/activity.ts +10 -0
  430. package/src/react/children.ts +86 -0
  431. package/src/react/class.ts +66 -0
  432. package/src/react/compiler-runtime.ts +8 -0
  433. package/src/react/context.ts +46 -0
  434. package/src/react/element.ts +82 -0
  435. package/src/react/form-state.ts +35 -0
  436. package/src/react/hooks.ts +214 -0
  437. package/src/react/index.ts +91 -0
  438. package/src/react/jsx-runtime.ts +50 -0
  439. package/src/react/memo.ts +42 -0
  440. package/src/react/portal.ts +1 -0
  441. package/src/react/shared-internals.ts +80 -0
  442. package/src/react/suspense.ts +18 -0
  443. package/src/react/thenable.ts +21 -0
  444. package/src/react/view-transition.ts +41 -0
  445. package/src/scheduler/index.ts +124 -0
  446. package/src/server/bootstrap-script.ts +92 -0
  447. package/src/server/dispatcher.ts +168 -0
  448. package/src/server/escape.ts +102 -0
  449. package/src/server/index.ts +26 -0
  450. package/src/server/insertion-context.ts +28 -0
  451. package/src/server/renderToString.ts +35 -0
  452. package/src/server/resource-hints.ts +166 -0
  453. package/src/server/stream-ids.ts +5 -0
  454. package/src/server/stream.ts +525 -0
  455. package/src/server/walk.ts +555 -0
  456. package/src/vinext/compatibility.ts +122 -0
  457. package/src/vinext/flight-timing.ts +37 -0
  458. package/src/vinext/index.ts +47 -0
  459. package/src/vite/index.ts +476 -0
  460. package/src/vite/react18.ts +74 -0
  461. package/vendor/cloudflare-vite-plugin/LICENSE +25 -0
  462. package/vendor/cloudflare-vite-plugin/README.md +9 -0
  463. package/vendor/cloudflare-vite-plugin/dist/chunk-U6NEESU5-BmLHqeIt.mjs +43 -0
  464. package/vendor/cloudflare-vite-plugin/dist/index.d.mts +155 -0
  465. package/vendor/cloudflare-vite-plugin/dist/index.mjs +94700 -0
  466. package/vendor/cloudflare-vite-plugin/dist/open-PCXX3ZDZ-DYH87NhH.mjs +530 -0
  467. package/vendor/cloudflare-vite-plugin/dist/package-4cnqy5mM.mjs +84 -0
  468. package/vendor/cloudflare-vite-plugin/dist/workers/asset-worker/index.js +5996 -0
  469. package/vendor/cloudflare-vite-plugin/dist/workers/router-worker/index.js +6414 -0
  470. package/vendor/cloudflare-vite-plugin/dist/workers/runner-worker/index.js +457 -0
  471. package/vendor/cloudflare-vite-plugin/dist/workers/runner-worker/module-runner-legacy.js +1129 -0
  472. package/vendor/cloudflare-vite-plugin/dist/workers/runner-worker/module-runner.js +1259 -0
  473. package/vendor/cloudflare-vite-plugin/dist/workers/vite-proxy-worker/index.js +31 -0
  474. package/vendor/cloudflare-vite-plugin/package.json +90 -0
  475. package/vendor/cloudflare-vite-plugin/provenance.json +26 -0
  476. package/README.md +0 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026-present Tanner Linsley
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Cloudflare's Vite plugin with Redact's maintained development evaluator fix.
3
+ * Accepts the same options as @cloudflare/vite-plugin 1.65.0. Await this factory
4
+ * in the Vite config so framework plugins receive the resolved plugin array.
5
+ */
6
+ export declare function cloudflare(options?: object): Promise<any[]>;
@@ -0,0 +1,39 @@
1
+ import { readFileSync } from "node:fs";
2
+ import * as module from "node:module";
3
+ let loaded;
4
+ const vendorURL = new URL("../../vendor/cloudflare-vite-plugin/", import.meta.url);
5
+ async function load() {
6
+ if (typeof module.registerHooks !== "function") {
7
+ throw new Error("Redact Cloudflare integration requires Node.js 22.15 or newer. The release matrix uses Node.js 24.22.");
8
+ }
9
+ const peerURL = import.meta.resolve("@cloudflare/vite-plugin");
10
+ const peer = JSON.parse(readFileSync(new URL("../package.json", peerURL), "utf8"));
11
+ if (peer.name !== "@cloudflare/vite-plugin" || peer.version !== "1.65.0") {
12
+ throw new Error(`Redact Cloudflare integration supports @cloudflare/vite-plugin 1.65.0; found ${peer.version}.`);
13
+ }
14
+ const hook = module.registerHooks({
15
+ resolve(specifier, context, nextResolve) {
16
+ if (context.parentURL?.startsWith(vendorURL.href) && !specifier.startsWith(".") && !specifier.startsWith("/") && !/^[a-z][a-z+.-]*:/i.test(specifier)) {
17
+ return nextResolve(specifier, { ...context, parentURL: peerURL });
18
+ }
19
+ return nextResolve(specifier, context);
20
+ }
21
+ });
22
+ try {
23
+ return await import(new URL("dist/index.mjs", vendorURL).href);
24
+ } catch (error) {
25
+ hook.deregister();
26
+ throw error;
27
+ }
28
+ }
29
+ async function cloudflare(options) {
30
+ const plugin = await (loaded ||= load().catch((error) => {
31
+ loaded = void 0;
32
+ throw error;
33
+ }));
34
+ return plugin.cloudflare(options);
35
+ }
36
+ export {
37
+ cloudflare
38
+ };
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/cloudflare/index.ts"],
4
+ "sourcesContent": ["import { readFileSync } from 'node:fs'\nimport * as module from 'node:module'\n\nlet loaded: Promise<any> | undefined\nconst vendorURL = new URL('../../vendor/cloudflare-vite-plugin/', import.meta.url)\n\nasync function load() {\n if (typeof module.registerHooks !== 'function') {\n throw new Error('Redact Cloudflare integration requires Node.js 22.15 or newer. The release matrix uses Node.js 24.22.')\n }\n // This optional entry uses the installed peer's dependency graph, including\n // the application's security overrides.\n const peerURL = import.meta.resolve('@cloudflare/vite-plugin')\n const peer = JSON.parse(readFileSync(new URL('../package.json', peerURL), 'utf8'))\n if (peer.name !== '@cloudflare/vite-plugin' || peer.version !== '1.65.0') {\n throw new Error(`Redact Cloudflare integration supports @cloudflare/vite-plugin 1.65.0; found ${peer.version}.`)\n }\n const hook = module.registerHooks({\n resolve(specifier: string, context: any, nextResolve: any) {\n if (context.parentURL?.startsWith(vendorURL.href) &&\n !specifier.startsWith('.') && !specifier.startsWith('/') &&\n !/^[a-z][a-z+.-]*:/i.test(specifier)) {\n return nextResolve(specifier, { ...context, parentURL: peerURL })\n }\n return nextResolve(specifier, context)\n },\n })\n try {\n return await import(new URL('dist/index.mjs', vendorURL).href)\n } catch (error) {\n hook.deregister()\n throw error\n }\n}\n\n/**\n * Cloudflare's Vite plugin with Redact's maintained development evaluator fix.\n * Accepts the same options as @cloudflare/vite-plugin 1.65.0. Await this factory\n * in the Vite config so framework plugins receive the resolved plugin array.\n */\nexport async function cloudflare(options?: object): Promise<any[]> {\n const plugin = await (loaded ||= load().catch(error => { loaded = undefined; throw error }))\n return plugin.cloudflare(options)\n}\n"],
5
+ "mappings": "AAAA,SAAS,oBAAoB;AAC7B,YAAY,YAAY;AAExB,IAAI;AACJ,MAAM,YAAY,IAAI,IAAI,wCAAwC,YAAY,GAAG;AAEjF,eAAe,OAAI;AACjB,MAAI,OAAO,OAAO,kBAAkB,YAAY;AAC9C,UAAM,IAAI,MAAM,uGAAuG;EACzH;AAGA,QAAM,UAAU,YAAY,QAAQ,yBAAyB;AAC7D,QAAM,OAAO,KAAK,MAAM,aAAa,IAAI,IAAI,mBAAmB,OAAO,GAAG,MAAM,CAAC;AACjF,MAAI,KAAK,SAAS,6BAA6B,KAAK,YAAY,UAAU;AACxE,UAAM,IAAI,MAAM,gFAAgF,KAAK,OAAO,GAAG;EACjH;AACA,QAAM,OAAO,OAAO,cAAc;IAChC,QAAQ,WAAmB,SAAc,aAAgB;AACvD,UAAI,QAAQ,WAAW,WAAW,UAAU,IAAI,KAC5C,CAAC,UAAU,WAAW,GAAG,KAAK,CAAC,UAAU,WAAW,GAAG,KACvD,CAAC,oBAAoB,KAAK,SAAS,GAAG;AACxC,eAAO,YAAY,WAAW,EAAE,GAAG,SAAS,WAAW,QAAO,CAAE;MAClE;AACA,aAAO,YAAY,WAAW,OAAO;IACvC;GACD;AACD,MAAI;AACF,WAAO,MAAM,OAAO,IAAI,IAAI,kBAAkB,SAAS,EAAE;EAC3D,SAAS,OAAO;AACd,SAAK,WAAU;AACf,UAAM;EACR;AACF;AAOA,eAAsB,WAAW,SAAgB;AAC/C,QAAM,SAAS,OAAO,WAAW,KAAI,EAAG,MAAM,WAAQ;AAAG,aAAS;AAAW,UAAM;EAAM,CAAC;AAC1F,SAAO,OAAO,WAAW,OAAO;AAClC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,4 @@
1
+ export declare const BOOLEAN_ATTRS: RegExp;
2
+ export declare const STRING_BOOLEAN_ATTRS: RegExp;
3
+ export declare function attributeName(name: string, isSvg?: boolean): string;
4
+ export declare function attributeValue(name: string, value: any, attr: string): string | null;
@@ -0,0 +1,30 @@
1
+ const BOOLEAN_ATTRS = /^(allowfullscreen|async|autofocus|autoplay|checked|controls|credentialless|default|defer|disabled|formnovalidate|hidden|inert|ismap|itemscope|loop|multiple|muted|nomodule|novalidate|open|playsinline|readonly|required|reversed|selected)$/;
2
+ const STRING_BOOLEAN_ATTRS = /^(contenteditable|draggable|spellcheck)$/;
3
+ function attributeName(name, isSvg) {
4
+ if (name === "className")
5
+ return "class";
6
+ if (name === "htmlFor")
7
+ return "for";
8
+ if (isSvg && /^(clip|fill|stroke)/.test(name) || /^(httpEquiv|acceptCharset|maskType)$/.test(name)) {
9
+ return name.replace(/[A-Z]/g, (m) => "-" + m.toLowerCase());
10
+ }
11
+ if (name === "tabIndex" || name === "crossOrigin")
12
+ return name.toLowerCase();
13
+ return isSvg || /^(aria|data)-/.test(name) ? name : name.toLowerCase();
14
+ }
15
+ function attributeValue(name, value, attr) {
16
+ if (/^on|^default(Value|Checked)$/.test(name))
17
+ return null;
18
+ if (name === "className" || name === "class" || name === "htmlFor" || STRING_BOOLEAN_ATTRS.test(attr))
19
+ return value == null ? null : "" + value;
20
+ if (BOOLEAN_ATTRS.test(attr))
21
+ return value ? "" : null;
22
+ return value == null || value === false ? null : value === true ? "" : `${value}`;
23
+ }
24
+ export {
25
+ BOOLEAN_ATTRS,
26
+ STRING_BOOLEAN_ATTRS,
27
+ attributeName,
28
+ attributeValue
29
+ };
30
+ //# sourceMappingURL=attributes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/core/attributes.ts"],
4
+ "sourcesContent": ["export const BOOLEAN_ATTRS = /^(allowfullscreen|async|autofocus|autoplay|checked|controls|credentialless|default|defer|disabled|formnovalidate|hidden|inert|ismap|itemscope|loop|multiple|muted|nomodule|novalidate|open|playsinline|readonly|required|reversed|selected)$/;\nexport const STRING_BOOLEAN_ATTRS = /^(contenteditable|draggable|spellcheck)$/\n\nexport function attributeName(name: string, isSvg?: boolean): string {\n if (name === 'className') return 'class'\n if (name === 'htmlFor') return 'for'\n if ((isSvg && /^(clip|fill|stroke)/.test(name)) || /^(httpEquiv|acceptCharset|maskType)$/.test(name)) {\n return name.replace(/[A-Z]/g, m => '-' + m.toLowerCase())\n }\n if (name === 'tabIndex' || name === 'crossOrigin') return name.toLowerCase()\n return isSvg || /^(aria|data)-/.test(name) ? name : name.toLowerCase()\n}\n\n// Share property coercion with hydration without creating resource-bearing probes.\nexport function attributeValue(name: string, value: any, attr: string): string | null {\n if (/^on|^default(Value|Checked)$/.test(name)) return null\n if (name === 'className' || name === 'class' || name === 'htmlFor' || STRING_BOOLEAN_ATTRS.test(attr)) return value == null ? null : '' + value\n if (BOOLEAN_ATTRS.test(attr)) return value ? '' : null\n return value == null || value === false ? null : value === true ? '' : `${value}`\n}\n"],
5
+ "mappings": "AAAO,MAAM,gBAAgB;AACtB,MAAM,uBAAuB;AAE9B,SAAU,cAAc,MAAc,OAAe;AACzD,MAAI,SAAS;AAAa,WAAO;AACjC,MAAI,SAAS;AAAW,WAAO;AAC/B,MAAK,SAAS,sBAAsB,KAAK,IAAI,KAAM,uCAAuC,KAAK,IAAI,GAAG;AACpG,WAAO,KAAK,QAAQ,UAAU,OAAK,MAAM,EAAE,YAAW,CAAE;EAC1D;AACA,MAAI,SAAS,cAAc,SAAS;AAAe,WAAO,KAAK,YAAW;AAC1E,SAAO,SAAS,gBAAgB,KAAK,IAAI,IAAI,OAAO,KAAK,YAAW;AACtE;AAGM,SAAU,eAAe,MAAc,OAAY,MAAY;AACnE,MAAI,+BAA+B,KAAK,IAAI;AAAG,WAAO;AACtD,MAAI,SAAS,eAAe,SAAS,WAAW,SAAS,aAAa,qBAAqB,KAAK,IAAI;AAAG,WAAO,SAAS,OAAO,OAAO,KAAK;AAC1I,MAAI,cAAc,KAAK,IAAI;AAAG,WAAO,QAAQ,KAAK;AAClD,SAAO,SAAS,QAAQ,UAAU,QAAQ,OAAO,UAAU,OAAO,KAAK,GAAG,KAAK;AACjF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,9 @@
1
+ export declare const REACT_RECOVERABLE_TYPE: unique symbol;
2
+ export interface BrowserToken {
3
+ readonly $$typeof: typeof REACT_RECOVERABLE_TYPE;
4
+ readonly _reason: string | (() => unknown) | undefined;
5
+ }
6
+ export declare function browser(reason?: string | (() => unknown)): BrowserToken;
7
+ export declare function isBrowserToken(value: any): value is BrowserToken;
8
+ export declare function browserError(token: BrowserToken): Error;
9
+ export declare function isBrowserError(error: any): error is Error;
@@ -0,0 +1,32 @@
1
+ import { isFunction } from "./functions.js";
2
+ const REACT_RECOVERABLE_TYPE = /* @__PURE__ */ Symbol.for("react.recoverable");
3
+ function browser(reason) {
4
+ return { $$typeof: REACT_RECOVERABLE_TYPE, _reason: reason };
5
+ }
6
+ function isBrowserToken(value) {
7
+ return value?.$$typeof === REACT_RECOVERABLE_TYPE;
8
+ }
9
+ function browserError(token) {
10
+ let cause = token._reason;
11
+ if (isFunction(cause)) {
12
+ try {
13
+ cause = cause();
14
+ } catch {
15
+ cause = "The reason for browser-only rendering could not be determined because its initializer threw.";
16
+ }
17
+ }
18
+ const error = new Error("Browser-only rendering was requested by `browser()`.", token._reason === void 0 ? void 0 : { cause });
19
+ Object.defineProperty(error, REACT_RECOVERABLE_TYPE, { value: true });
20
+ return error;
21
+ }
22
+ function isBrowserError(error) {
23
+ return error?.[REACT_RECOVERABLE_TYPE] === true;
24
+ }
25
+ export {
26
+ REACT_RECOVERABLE_TYPE,
27
+ browser,
28
+ browserError,
29
+ isBrowserError,
30
+ isBrowserToken
31
+ };
32
+ //# sourceMappingURL=browser.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/core/browser.ts"],
4
+ "sourcesContent": ["import { isFunction } from './functions'\nexport const REACT_RECOVERABLE_TYPE = Symbol.for('react.recoverable')\n\nexport interface BrowserToken {\n readonly $$typeof: typeof REACT_RECOVERABLE_TYPE\n readonly _reason: string | (() => unknown) | undefined\n}\n\nexport function browser(reason?: string | (() => unknown)): BrowserToken {\n return { $$typeof: REACT_RECOVERABLE_TYPE, _reason: reason }\n}\n\nexport function isBrowserToken(value: any): value is BrowserToken {\n return value?.$$typeof === REACT_RECOVERABLE_TYPE\n}\n\nexport function browserError(token: BrowserToken): Error {\n let cause: unknown = token._reason\n if (isFunction(cause)) {\n try {\n cause = cause()\n } catch {\n cause = 'The reason for browser-only rendering could not be determined because its initializer threw.'\n }\n }\n const error = new Error('Browser-only rendering was requested by `browser()`.',\n token._reason === undefined ? undefined : { cause })\n Object.defineProperty(error, REACT_RECOVERABLE_TYPE, { value: true })\n return error\n}\n\nexport function isBrowserError(error: any): error is Error {\n return error?.[REACT_RECOVERABLE_TYPE] === true\n}\n"],
5
+ "mappings": "AAAA,SAAS,kBAAkB;AACpB,MAAM,yBAAyB,uBAAO,IAAI,mBAAmB;AAO9D,SAAU,QAAQ,QAAiC;AACvD,SAAO,EAAE,UAAU,wBAAwB,SAAS,OAAM;AAC5D;AAEM,SAAU,eAAe,OAAU;AACvC,SAAO,OAAO,aAAa;AAC7B;AAEM,SAAU,aAAa,OAAmB;AAC9C,MAAI,QAAiB,MAAM;AAC3B,MAAI,WAAW,KAAK,GAAG;AACrB,QAAI;AACF,cAAQ,MAAK;IACf,QAAQ;AACN,cAAQ;IACV;EACF;AACA,QAAM,QAAQ,IAAI,MAAM,wDACtB,MAAM,YAAY,SAAY,SAAY,EAAE,MAAK,CAAE;AACrD,SAAO,eAAe,OAAO,wBAAwB,EAAE,OAAO,KAAI,CAAE;AACpE,SAAO;AACT;AAEM,SAAU,eAAe,OAAU;AACvC,SAAO,QAAQ,sBAAsB,MAAM;AAC7C;",
6
+ "names": []
7
+ }
@@ -0,0 +1 @@
1
+ export declare function resolveClassProps(type: any, props: Record<string, any>): Record<string, any>;
@@ -0,0 +1,15 @@
1
+ function resolveClassProps(type, props) {
2
+ const defaults = type.defaultProps;
3
+ if (defaults) {
4
+ props = { ...props };
5
+ for (const key in defaults) {
6
+ if (props[key] === void 0)
7
+ props[key] = defaults[key];
8
+ }
9
+ }
10
+ return props;
11
+ }
12
+ export {
13
+ resolveClassProps
14
+ };
15
+ //# sourceMappingURL=class-props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/core/class-props.ts"],
4
+ "sourcesContent": ["// Class defaults are resolved by both renderers, including elements made by an\n// automatic JSX runtime. Never mutate props owned by the caller.\nexport function resolveClassProps(type: any, props: Record<string, any>) {\n const defaults = type.defaultProps\n if (defaults) {\n props = { ...props }\n for (const key in defaults) {\n if (props[key] === undefined) props[key] = defaults[key]\n }\n }\n return props\n}\n"],
5
+ "mappings": "AAEM,SAAU,kBAAkB,MAAW,OAA0B;AACrE,QAAM,WAAW,KAAK;AACtB,MAAI,UAAU;AACZ,YAAQ,EAAE,GAAG,MAAK;AAClB,eAAW,OAAO,UAAU;AAC1B,UAAI,MAAM,GAAG,MAAM;AAAW,cAAM,GAAG,IAAI,SAAS,GAAG;IACzD;EACF;AACA,SAAO;AACT;",
6
+ "names": []
7
+ }
@@ -0,0 +1,26 @@
1
+ import type { Fiber, FiberRoot, ReactElement } from './index.js';
2
+ export declare const devToolsMetadata: {
3
+ enabled: boolean;
4
+ owner: Fiber | null;
5
+ current: Fiber | null;
6
+ errorStack: string | null | undefined;
7
+ stackBudget: number;
8
+ stackResetTime: number;
9
+ hosts: WeakMap<Node, Fiber>;
10
+ hydratedRoots: WeakSet<FiberRoot>;
11
+ elements: WeakMap<object, {
12
+ owner: Fiber | null;
13
+ stack: Error | null;
14
+ source: any;
15
+ }>;
16
+ fibers: WeakMap<Fiber, {
17
+ owner: Fiber | null;
18
+ stack: Error | null;
19
+ source: any;
20
+ }>;
21
+ };
22
+ export declare function rememberDevToolsElement(element: ReactElement, source?: any, original?: ReactElement): ReactElement;
23
+ export declare function readOwnerStack(fiber: Fiber | null): string | null;
24
+ export declare function runWithOwnerStack<T>(stack: string | null, callback: () => T): T;
25
+ /** Development-only, like React's diagnostic export. */
26
+ export declare let captureOwnerStack: () => string | null;
@@ -0,0 +1,70 @@
1
+ const devToolsMetadata = {
2
+ enabled: false,
3
+ owner: null,
4
+ current: null,
5
+ errorStack: void 0,
6
+ stackBudget: 1e4,
7
+ stackResetTime: 0,
8
+ hosts: /* @__PURE__ */ new WeakMap(),
9
+ hydratedRoots: /* @__PURE__ */ new WeakSet(),
10
+ elements: /* @__PURE__ */ new WeakMap(),
11
+ fibers: /* @__PURE__ */ new WeakMap()
12
+ };
13
+ function rememberDevToolsElement(element, source, original) {
14
+ const previous = original && devToolsMetadata.elements.get(original);
15
+ devToolsMetadata.elements.set(element, previous || {
16
+ owner: devToolsMetadata.owner,
17
+ // React also caps owner stack capture at 10,000 elements per second.
18
+ // Keep owner relationships, but don't invent a source once the budget ends.
19
+ stack: devToolsMetadata.stackBudget-- > 0 ? new Error("react-stack-top-frame") : null,
20
+ source: source || null
21
+ });
22
+ return element;
23
+ }
24
+ function readOwnerStack(fiber) {
25
+ if (!fiber)
26
+ return null;
27
+ if (!fiber)
28
+ return null;
29
+ let stack = "";
30
+ const seen = /* @__PURE__ */ new Set();
31
+ while (fiber && !seen.has(fiber)) {
32
+ seen.add(fiber);
33
+ const metadata = devToolsMetadata.fibers.get(fiber);
34
+ fiber = metadata?.owner || null;
35
+ if (!fiber)
36
+ break;
37
+ let type = fiber.type;
38
+ while (type && typeof type === "object")
39
+ type = type.type || type.render;
40
+ const name = typeof type === "function" ? type.displayName || type.name || "Anonymous" : "";
41
+ if (!name)
42
+ continue;
43
+ const frame = metadata?.stack?.stack?.split("\n").find((line) => line.includes("at " + name + " (") || line.startsWith(name + "@"));
44
+ stack += "\n" + (frame ? frame.startsWith(name + "@") ? " at " + name + " (" + frame.slice(name.length + 1) + ")" : frame : " at " + name);
45
+ }
46
+ return stack;
47
+ }
48
+ function runWithOwnerStack(stack, callback) {
49
+ const previousCurrent = devToolsMetadata.current;
50
+ const previousStack = devToolsMetadata.errorStack;
51
+ devToolsMetadata.current = null;
52
+ devToolsMetadata.errorStack = stack;
53
+ try {
54
+ return callback();
55
+ } finally {
56
+ devToolsMetadata.current = previousCurrent;
57
+ devToolsMetadata.errorStack = previousStack;
58
+ }
59
+ }
60
+ let captureOwnerStack;
61
+ if (process.env.NODE_ENV !== "production") {
62
+ captureOwnerStack = () => devToolsMetadata.current ? readOwnerStack(devToolsMetadata.current) : devToolsMetadata.errorStack ?? null;
63
+ }
64
+ export {
65
+ captureOwnerStack,
66
+ devToolsMetadata,
67
+ readOwnerStack,
68
+ rememberDevToolsElement,
69
+ runWithOwnerStack
70
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/core/devtools.ts"],
4
+ "sourcesContent": ["import type { Fiber, ReactElement } from './index'\n\n// Development metadata lives outside elements and fibers, so the production\n// object layouts stay unchanged. Owner metadata also supports captureOwnerStack\n// when no DevTools extension is attached.\nexport const devToolsMetadata = {\n enabled: false,\n owner: null as Fiber | null,\n current: null as Fiber | null,\n errorStack: undefined as string | null | undefined,\n stackBudget: 10000,\n stackResetTime: 0,\n hosts: /* @__PURE__ */ new WeakMap<Node, Fiber>(),\n elements: /* @__PURE__ */ new WeakMap<object, { owner: Fiber | null; stack: Error | null; source: any }>(),\n fibers: /* @__PURE__ */ new WeakMap<Fiber, { owner: Fiber | null; stack: Error | null; source: any }>(),\n}\n\nexport function rememberDevToolsElement(element: ReactElement, source?: any, original?: ReactElement): ReactElement {\n const previous = original && devToolsMetadata.elements.get(original)\n devToolsMetadata.elements.set(element, previous || {\n owner: devToolsMetadata.owner,\n // React also caps owner stack capture at 10,000 elements per second.\n // Keep owner relationships, but don't invent a source once the budget ends.\n stack: devToolsMetadata.stackBudget-- > 0 ? new Error('react-stack-top-frame') : null,\n source: source || null,\n })\n return element\n}\n\nexport function readOwnerStack(fiber: Fiber | null): string | null {\n if (!fiber) return null\n if (!fiber) return null\n let stack = ''\n const seen = new Set<typeof fiber>()\n while (fiber && !seen.has(fiber)) {\n seen.add(fiber)\n const metadata = devToolsMetadata.fibers.get(fiber)\n fiber = metadata?.owner || null\n if (!fiber) break\n let type = fiber.type\n while (type && typeof type === 'object') type = type.type || type.render\n const name = typeof type === 'function' ? type.displayName || type.name || 'Anonymous' : ''\n if (!name) continue\n const frame = metadata?.stack?.stack?.split('\\n').find(line =>\n line.includes('at ' + name + ' (') || line.startsWith(name + '@'))\n stack += '\\n' + (frame ? frame.startsWith(name + '@') ? ' at ' + name + ' (' + frame.slice(name.length + 1) + ')' : frame : ' at ' + name)\n }\n return stack\n}\n\nexport function runWithOwnerStack<T>(stack: string | null, callback: () => T): T {\n const previousCurrent = devToolsMetadata.current\n const previousStack = devToolsMetadata.errorStack\n devToolsMetadata.current = null\n devToolsMetadata.errorStack = stack\n try { return callback() } finally {\n devToolsMetadata.current = previousCurrent\n devToolsMetadata.errorStack = previousStack\n }\n}\n\n/** Development-only, like React's diagnostic export. */\nexport let captureOwnerStack: () => string | null\nif (process.env.NODE_ENV !== 'production') {\n captureOwnerStack = () => devToolsMetadata.current\n ? readOwnerStack(devToolsMetadata.current)\n : devToolsMetadata.errorStack ?? null\n}\n"],
5
+ "mappings": "AAKO,MAAM,mBAAmB;EAC9B,SAAS;EACT,OAAO;EACP,SAAS;EACT,YAAY;EACZ,aAAa;EACb,gBAAgB;EAChB,OAAuB,oBAAI,QAAO;EAClC,UAA0B,oBAAI,QAAO;EACrC,QAAwB,oBAAI,QAAO;;AAG/B,SAAU,wBAAwB,SAAuB,QAAc,UAAuB;AAClG,QAAM,WAAW,YAAY,iBAAiB,SAAS,IAAI,QAAQ;AACnE,mBAAiB,SAAS,IAAI,SAAS,YAAY;IACjD,OAAO,iBAAiB;;;IAGxB,OAAO,iBAAiB,gBAAgB,IAAI,IAAI,MAAM,uBAAuB,IAAI;IACjF,QAAQ,UAAU;GACnB;AACD,SAAO;AACT;AAEM,SAAU,eAAe,OAAmB;AAChD,MAAI,CAAC;AAAO,WAAO;AACnB,MAAI,CAAC;AAAO,WAAO;AACnB,MAAI,QAAQ;AACZ,QAAM,OAAO,oBAAI,IAAG;AACpB,SAAO,SAAS,CAAC,KAAK,IAAI,KAAK,GAAG;AAChC,SAAK,IAAI,KAAK;AACd,UAAM,WAAW,iBAAiB,OAAO,IAAI,KAAK;AAClD,YAAQ,UAAU,SAAS;AAC3B,QAAI,CAAC;AAAO;AACZ,QAAI,OAAO,MAAM;AACjB,WAAO,QAAQ,OAAO,SAAS;AAAU,aAAO,KAAK,QAAQ,KAAK;AAClE,UAAM,OAAO,OAAO,SAAS,aAAa,KAAK,eAAe,KAAK,QAAQ,cAAc;AACzF,QAAI,CAAC;AAAM;AACX,UAAM,QAAQ,UAAU,OAAO,OAAO,MAAM,IAAI,EAAE,KAAK,UACrD,KAAK,SAAS,QAAQ,OAAO,IAAI,KAAK,KAAK,WAAW,OAAO,GAAG,CAAC;AACnE,aAAS,QAAQ,QAAQ,MAAM,WAAW,OAAO,GAAG,IAAI,YAAY,OAAO,OAAO,MAAM,MAAM,KAAK,SAAS,CAAC,IAAI,MAAM,QAAQ,YAAY;EAC7I;AACA,SAAO;AACT;AAEM,SAAU,kBAAqB,OAAsB,UAAiB;AAC1E,QAAM,kBAAkB,iBAAiB;AACzC,QAAM,gBAAgB,iBAAiB;AACvC,mBAAiB,UAAU;AAC3B,mBAAiB,aAAa;AAC9B,MAAI;AAAE,WAAO,SAAQ;EAAG;AACtB,qBAAiB,UAAU;AAC3B,qBAAiB,aAAa;EAChC;AACF;AAGO,IAAI;AACX,IAAI,yBAAyB,cAAc;AACzC,sBAAoB,MAAM,iBAAiB,UACvC,eAAe,iBAAiB,OAAO,IACvC,iBAAiB,cAAc;AACrC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,6 @@
1
+ export declare const isFunction: (value: any) => value is ((...args: any[]) => any) & Record<string, any>;
2
+ export declare const isReservedProp: (name: string) => boolean;
3
+ export declare const isThenable: (x: any) => x is Promise<any>;
4
+ export declare const isString: (value: any) => value is string;
5
+ export declare const isObject: (value: any) => boolean;
6
+ export declare const isTextContent: (value: unknown) => value is string | number | bigint;
@@ -0,0 +1,14 @@
1
+ const isFunction = (value) => typeof value === "function";
2
+ const isReservedProp = (name) => name === "children" || name === "ref" || name === "key";
3
+ const isThenable = (x) => x != null && isFunction(x.then);
4
+ const isString = (value) => typeof value === "string";
5
+ const isObject = (value) => typeof value === "object";
6
+ const isTextContent = (value) => typeof value === "string" || typeof value === "number" || typeof value === "bigint";
7
+ export {
8
+ isFunction,
9
+ isObject,
10
+ isReservedProp,
11
+ isString,
12
+ isTextContent,
13
+ isThenable
14
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/core/functions.ts"],
4
+ "sourcesContent": ["export const isFunction = (value: any): value is ((...args: any[]) => any) & Record<string, any> => (typeof value === 'function')\n\nexport const isReservedProp = (name: string): boolean => (name === 'children' || name === 'ref' || name === 'key')\n\nexport const isThenable = (x: any): x is Promise<any> => (x != null && isFunction(x.then))\n\nexport const isString = (value: any): value is string => typeof value === 'string'\n\nexport const isObject = (value: any): boolean => typeof value === 'object'\n"],
5
+ "mappings": "AAAO,MAAM,aAAa,CAAC,UAA0E,OAAO,UAAU;AAE/G,MAAM,iBAAiB,CAAC,SAA2B,SAAS,cAAc,SAAS,SAAS,SAAS;AAErG,MAAM,aAAa,CAAC,MAA+B,KAAK,QAAQ,WAAW,EAAE,IAAI;AAEjF,MAAM,WAAW,CAAC,UAAgC,OAAO,UAAU;AAEnE,MAAM,WAAW,CAAC,UAAwB,OAAO,UAAU;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./types.js";
2
+ export * from "./internal.js";
@@ -0,0 +1,3 @@
1
+ export * from "./types.js";
2
+ export * from "./internal.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/core/index.ts"],
4
+ "sourcesContent": ["export * from './types'\nexport * from './internal'\n"],
5
+ "mappings": "AAAA,cAAc;AACd,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,103 @@
1
+ import type { ReactElement, ReactNode, Ref } from './types.js';
2
+ export declare const enum FiberTag {
3
+ Host = 0,
4
+ Text = 1,
5
+ Function = 2,
6
+ Class = 3,
7
+ Fragment = 4,
8
+ Portal = 5,
9
+ Provider = 6,
10
+ Consumer = 7,
11
+ ForwardRef = 8,
12
+ Memo = 9,
13
+ Lazy = 10,
14
+ Suspense = 11,
15
+ Root = 12,
16
+ Activity = 13,
17
+ Resource = 14
18
+ }
19
+ export interface Hook {
20
+ t?: any[] | undefined;
21
+ s: any;
22
+ q: any;
23
+ d: any;
24
+ c: any;
25
+ }
26
+ export interface Effect {
27
+ t: 0 | 1 | 2;
28
+ c: () => any;
29
+ d?: () => void;
30
+ s?: boolean | undefined;
31
+ }
32
+ export interface Fiber {
33
+ ix?: number;
34
+ t: FiberTag;
35
+ type: any;
36
+ key: string | null;
37
+ ref: Ref<any> | null;
38
+ v: any;
39
+ m: any;
40
+ b: any;
41
+ i: any;
42
+ n: Node | null;
43
+ p: Fiber | null;
44
+ c: Fiber | null;
45
+ s: Fiber | null;
46
+ h: Hook[] | null;
47
+ e: Array<() => void> | null;
48
+ g: boolean;
49
+ u: boolean;
50
+ pd?: boolean;
51
+ su?: Fiber | null;
52
+ bs?: boolean;
53
+ bt?: boolean;
54
+ ld?: boolean;
55
+ r: FiberRoot | null;
56
+ ad?: boolean;
57
+ ah?: boolean;
58
+ ef?: Map<Hook, Effect> | undefined;
59
+ hc?: import('../dom/features/hydration/full.js').HydrationCursor | undefined;
60
+ it?: bigint;
61
+ il?: number;
62
+ im?: boolean;
63
+ d?: number;
64
+ cx?: Map<any, any> | null;
65
+ cr?: Ref<any> | null;
66
+ rc?: (() => void) | null;
67
+ }
68
+ export type RecoverableErrorHandler = (error: unknown, info: {
69
+ componentStack: string | null;
70
+ errorBoundary?: unknown;
71
+ }) => void;
72
+ export interface FiberRoot {
73
+ tr?: Set<Fiber> & {
74
+ s: Set<import('../react/action-scope.js').ActionScope>;
75
+ w?: PromiseLike<unknown>;
76
+ u?: (() => void) | undefined;
77
+ };
78
+ hr?: Node | undefined;
79
+ ri?: boolean;
80
+ c: Element | DocumentFragment;
81
+ r: Fiber;
82
+ p: Set<Fiber>;
83
+ s: boolean;
84
+ u?: (() => void) | undefined;
85
+ er?: Array<{
86
+ error: unknown;
87
+ stack: string;
88
+ ownerStack?: string | null;
89
+ }> | undefined;
90
+ eb?: boolean;
91
+ sp?: boolean;
92
+ re?: RecoverableErrorHandler | undefined;
93
+ ce?: RecoverableErrorHandler | undefined;
94
+ ue?: RecoverableErrorHandler | undefined;
95
+ i: string | undefined;
96
+ ic: number;
97
+ h: boolean;
98
+ a?: boolean;
99
+ fr?: boolean;
100
+ }
101
+ export declare function createFiber(tag: FiberTag, type: any, key: string | null): Fiber;
102
+ export type ChildNode = ReactElement | string | number | boolean | null | undefined | ChildNode[];
103
+ export type { ReactElement, ReactNode };
@@ -0,0 +1,43 @@
1
+ var FiberTag;
2
+ (function(FiberTag2) {
3
+ FiberTag2[FiberTag2["Host"] = 0] = "Host";
4
+ FiberTag2[FiberTag2["Text"] = 1] = "Text";
5
+ FiberTag2[FiberTag2["Function"] = 2] = "Function";
6
+ FiberTag2[FiberTag2["Class"] = 3] = "Class";
7
+ FiberTag2[FiberTag2["Fragment"] = 4] = "Fragment";
8
+ FiberTag2[FiberTag2["Portal"] = 5] = "Portal";
9
+ FiberTag2[FiberTag2["Provider"] = 6] = "Provider";
10
+ FiberTag2[FiberTag2["Consumer"] = 7] = "Consumer";
11
+ FiberTag2[FiberTag2["ForwardRef"] = 8] = "ForwardRef";
12
+ FiberTag2[FiberTag2["Memo"] = 9] = "Memo";
13
+ FiberTag2[FiberTag2["Lazy"] = 10] = "Lazy";
14
+ FiberTag2[FiberTag2["Suspense"] = 11] = "Suspense";
15
+ FiberTag2[FiberTag2["Root"] = 12] = "Root";
16
+ FiberTag2[FiberTag2["Activity"] = 13] = "Activity";
17
+ FiberTag2[FiberTag2["Resource"] = 14] = "Resource";
18
+ })(FiberTag || (FiberTag = {}));
19
+ function createFiber(tag, type, key) {
20
+ return {
21
+ t: tag,
22
+ type,
23
+ key,
24
+ ref: null,
25
+ v: null,
26
+ m: null,
27
+ b: null,
28
+ i: null,
29
+ n: null,
30
+ p: null,
31
+ c: null,
32
+ s: null,
33
+ h: null,
34
+ e: null,
35
+ g: false,
36
+ u: false,
37
+ r: null
38
+ };
39
+ }
40
+ export {
41
+ FiberTag,
42
+ createFiber
43
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/core/internal.ts"],
4
+ "sourcesContent": ["import type { ReactElement, ReactNode, Ref } from './types';\nexport const enum FiberTag {\n Host = 0,\n Text = 1,\n Function = 2,\n Class = 3,\n Fragment = 4,\n Portal = 5,\n Provider = 6,\n Consumer = 7,\n ForwardRef = 8,\n Memo = 9,\n Lazy = 10,\n Suspense = 11,\n Root = 12,\n Activity = 13,\n Resource = 14\n}\nexport interface Hook {\n t?: any[] | undefined;\n s: any;\n q: any;\n d: any;\n c: any;\n}\nexport interface Effect {\n t: 0 | 1 | 2;\n c: () => any;\n d?: () => void;\n s?: boolean | undefined; // Store subscriptions run in layout but stay connected in Suspense.\n}\nexport interface Fiber {\n ix?: number; // Logical child position, including empty slots.\n t: FiberTag; // Tag.\n type: any;\n key: string | null;\n ref: Ref<any> | null;\n v: any; // Pending props.\n m: any; // Committed props.\n b: any; // Renderer state.\n i: any; // Class instance or resource node.\n n: Node | null; // Host node.\n p: Fiber | null; // Parent.\n c: Fiber | null; // First child.\n s: Fiber | null; // Next sibling.\n h: Hook[] | null;\n e: Array<() => void> | null; // Cleanups.\n g: boolean; // Has pending work.\n u: boolean; // Unmounted.\n pd?: boolean;\n su?: Fiber | null; // Retained Suspense primary update target.\n bs?: boolean; // This component suspended without a boundary.\n bt?: boolean; // Pending updates belong only to transitions.\n ld?: boolean; // Layout effects and refs are disconnected, not passive effects.\n r: FiberRoot | null;\n ad?: boolean; // Activity has disconnected this fiber.\n ah?: boolean; // Activity owns its hidden host DOM.\n ef?: Map<Hook, Effect> | undefined; // Retained effect descriptions.\n hc?: import('../dom/features/hydration/full').HydrationCursor | undefined;\n it?: bigint; // React hydration tree ID.\n il?: number; // Local useId calls in this render.\n im?: boolean; // This fiber materialized a React tree ID.\n d?: number; // Cached depth.\n cx?: Map<any, any> | null;\n cr?: Ref<any> | null;\n rc?: (() => void) | null;\n}\nexport type RecoverableErrorHandler = (error: unknown, info: {\n componentStack: string | null;\n errorBoundary?: unknown;\n}) => void;\nexport interface FiberRoot {\n tr?: Set<Fiber> & {\n s: Set<import('../react/action-scope').ActionScope>;\n w?: PromiseLike<unknown>;\n };\n hr?: Node | undefined; // Hydration recovery container.\n ri?: boolean; // React-compatible hydration IDs.\n c: Element | DocumentFragment;\n r: Fiber;\n p: Set<Fiber>;\n s: boolean;\n u?: (() => void) | undefined;\n er?: Array<{\n error: unknown;\n stack: string;\n ownerStack?: string | null;\n }> | undefined;\n eb?: boolean;\n sp?: boolean;\n re?: RecoverableErrorHandler | undefined;\n ce?: RecoverableErrorHandler | undefined;\n ue?: RecoverableErrorHandler | undefined;\n i: string | undefined;\n ic: number;\n h: boolean;\n a?: boolean;\n fr?: boolean;\n}\nexport function createFiber(tag: FiberTag, type: any, key: string | null): Fiber {\n return {\n t: tag,\n type,\n key,\n ref: null,\n v: null,\n m: null,\n b: null,\n i: null,\n n: null,\n p: null,\n c: null,\n s: null,\n h: null,\n e: null,\n g: false,\n u: false,\n r: null,\n };\n}\nexport type ChildNode = ReactElement | string | number | boolean | null | undefined | ChildNode[];\nexport type { ReactElement, ReactNode };\n"],
5
+ "mappings": "AACO,IAAW,WAAX,kBAAWA,cAAX;AACH,EAAAA,oBAAA,UAAO,KAAP;AACA,EAAAA,oBAAA,UAAO,KAAP;AACA,EAAAA,oBAAA,cAAW,KAAX;AACA,EAAAA,oBAAA,WAAQ,KAAR;AACA,EAAAA,oBAAA,cAAW,KAAX;AACA,EAAAA,oBAAA,YAAS,KAAT;AACA,EAAAA,oBAAA,cAAW,KAAX;AACA,EAAAA,oBAAA,cAAW,KAAX;AACA,EAAAA,oBAAA,gBAAa,KAAb;AACA,EAAAA,oBAAA,UAAO,KAAP;AACA,EAAAA,oBAAA,UAAO,MAAP;AACA,EAAAA,oBAAA,cAAW,MAAX;AACA,EAAAA,oBAAA,UAAO,MAAP;AACA,EAAAA,oBAAA,cAAW,MAAX;AACA,EAAAA,oBAAA,cAAW,MAAX;AAfc,SAAAA;AAAA,GAAA;AAkGX,SAAS,YAAY,KAAe,MAAW,KAA2B;AAC7E,SAAO;AAAA,IACH,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA,KAAK;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,EACP;AACJ;",
6
+ "names": ["FiberTag"]
7
+ }
@@ -0,0 +1,7 @@
1
+ export type ResourceHintKind = 'dns-prefetch' | 'preconnect' | 'preload' | 'modulepreload' | 'stylesheet' | 'script' | 'module-script';
2
+ export type ResourceHintOptions = Record<string, string>;
3
+ export declare const resourceHintDispatcher: {
4
+ emit?: (kind: ResourceHintKind, href: string, options: ResourceHintOptions) => boolean;
5
+ };
6
+ export declare function resourceKind(type: string, props: any): 'style' | 'stylesheet' | 'script' | undefined;
7
+ export declare const resourceURL: (value: string) => string;
@@ -0,0 +1,20 @@
1
+ import { isFunction } from "./functions.js";
2
+ const resourceHintDispatcher = {};
3
+ function resourceKind(type, props) {
4
+ if (props.itemProp != null)
5
+ return;
6
+ if (type === "style" || type === "link") {
7
+ if (isString(props.precedence) && isString(props.href) && props.href && (type === "style" || props.rel === "stylesheet" && props.disabled == null && !props.onLoad && !props.onError)) {
8
+ return type === "style" ? "style" : "stylesheet";
9
+ }
10
+ } else if (type === "script" && props.async && !isFunction(props.async) && typeof props.async !== "symbol" && isString(props.src) && props.src && !props.onLoad && !props.onError)
11
+ return "script";
12
+ }
13
+ const resourceURL = (value) => /^[\u0000-\u0020]*javascript:/i.test(String(value).replace(/[\r\n\t]/g, "")) ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')" : value;
14
+ import { isString } from "./functions.js";
15
+ export {
16
+ resourceHintDispatcher,
17
+ resourceKind,
18
+ resourceURL
19
+ };
20
+ //# sourceMappingURL=resource-hints.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/core/resource-hints.ts"],
4
+ "sourcesContent": ["import { isFunction } from './functions'\nexport type ResourceHintKind =\n | 'dns-prefetch'\n | 'preconnect'\n | 'preload'\n | 'modulepreload'\n | 'stylesheet'\n | 'script'\n | 'module-script'\n\n// Only supported string options reach the dispatcher, using the public camelCase\n// names. Fonts have crossOrigin: ''. Stylesheet precedence defaults to 'default'.\n// Module preloads omit as for the implicit script destination. href is non-empty.\n// A server renderer returns true to consume a hint in its current request, even\n// when deduplication means no new output. Returning false falls through to the DOM.\nexport type ResourceHintOptions = Record<string, string>\n\nexport const resourceHintDispatcher: {\n emit?: (kind: ResourceHintKind, href: string, options: ResourceHintOptions) => boolean\n} = {}\n\n// The renderer excludes SVG before calling this. A ref does not opt a resource\n// out of sharing, but event ownership, disabled sheets and itemProp do.\nexport function resourceKind(type: string, props: any): 'style' | 'stylesheet' | 'script' | undefined {\n if (props.itemProp != null) return\n if (type === 'style' || type === 'link') {\n if (isString(props.precedence) && isString(props.href) && props.href &&\n (type === 'style' || props.rel === 'stylesheet' && props.disabled == null && !props.onLoad && !props.onError)) {\n return type === 'style' ? 'style' : 'stylesheet'\n }\n } else if (type === 'script' && props.async && !isFunction(props.async) && typeof props.async !== 'symbol' && isString(props.src) && props.src && !props.onLoad && !props.onError) return 'script'\n\n}\n\nexport const resourceURL = (value: string): string => (/^[\\u0000-\\u0020]*javascript:/i.test(String(value).replace(/[\\r\\n\\t]/g, ''))\n ? \"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')\"\n : value)\n\nimport { isString } from \"./functions\"\n"],
5
+ "mappings": "AAAA,SAAS,kBAAkB;AAiBpB,MAAM,yBAET,CAAA;AAIE,SAAU,aAAa,MAAc,OAAU;AACnD,MAAI,MAAM,YAAY;AAAM;AAC5B,MAAI,SAAS,WAAW,SAAS,QAAQ;AACvC,QAAI,SAAS,MAAM,UAAU,KAAK,SAAS,MAAM,IAAI,KAAK,MAAM,SAC7D,SAAS,WAAW,MAAM,QAAQ,gBAAgB,MAAM,YAAY,QAAQ,CAAC,MAAM,UAAU,CAAC,MAAM,UAAU;AAC/G,aAAO,SAAS,UAAU,UAAU;IACtC;EACF,WAAW,SAAS,YAAY,MAAM,SAAS,CAAC,WAAW,MAAM,KAAK,KAAK,OAAO,MAAM,UAAU,YAAY,SAAS,MAAM,GAAG,KAAK,MAAM,OAAO,CAAC,MAAM,UAAU,CAAC,MAAM;AAAS,WAAO;AAE5L;AAEO,MAAM,cAAc,CAAC,UAA2B,gCAAgC,KAAK,OAAO,KAAK,EAAE,QAAQ,aAAa,EAAE,CAAC,IAC5H,gGACA;AAEN,SAAS,gBAAgB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,23 @@
1
+ export declare const REACT_ELEMENT_TYPE: unique symbol;
2
+ export declare const REACT_LEGACY_ELEMENT_TYPE: unique symbol;
3
+ export declare const REACT_FRAGMENT_TYPE: unique symbol;
4
+ export type Key = string | number | null | undefined;
5
+ export interface ReactElement<P = any, T = any> {
6
+ $$typeof: typeof REACT_ELEMENT_TYPE;
7
+ type: T;
8
+ key: string | null;
9
+ ref: any;
10
+ props: P;
11
+ }
12
+ type ReactNodeValue = ReactElement | string | number | bigint | boolean | null | undefined | Iterable<ReactNode>;
13
+ export type ReactNode = ReactNodeValue | Promise<ReactNodeValue>;
14
+ export type RefObject<T> = {
15
+ current: T | null;
16
+ };
17
+ export type RefCallback<T> = (instance: T | null) => void | (() => void);
18
+ export type Ref<T> = RefObject<T> | RefCallback<T> | null;
19
+ export type Dispatch<A> = (value: A) => void;
20
+ export type SetStateAction<S> = S | ((prev: S) => S);
21
+ export type EffectCallback = () => void | (() => void);
22
+ export type DependencyList = ReadonlyArray<unknown>;
23
+ export {};
@@ -0,0 +1,8 @@
1
+ const REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element");
2
+ const REACT_LEGACY_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
3
+ const REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
4
+ export {
5
+ REACT_ELEMENT_TYPE,
6
+ REACT_FRAGMENT_TYPE,
7
+ REACT_LEGACY_ELEMENT_TYPE
8
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/core/types.ts"],
4
+ "sourcesContent": ["// React 19+ uses the transitional element symbol. When our shim's elements\n// are passed to react-dom (e.g. Start routing through real react-dom/server\n// somewhere), they must carry the symbol that React's isValidElement checks.\nexport const REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element')\nexport const REACT_LEGACY_ELEMENT_TYPE = Symbol.for('react.element')\nexport const REACT_FRAGMENT_TYPE = Symbol.for('react.fragment')\n\nexport type Key = string | number | null | undefined\n\nexport interface ReactElement<P = any, T = any> {\n $$typeof: typeof REACT_ELEMENT_TYPE\n type: T\n key: string | null\n ref: any\n props: P\n}\n\ntype ReactNodeValue =\n | ReactElement\n | string\n | number\n | boolean\n | null\n | undefined\n | Iterable<ReactNode>\n\nexport type ReactNode = ReactNodeValue | Promise<ReactNodeValue>\n\nexport type RefObject<T> = { current: T | null }\nexport type RefCallback<T> = (instance: T | null) => void | (() => void)\nexport type Ref<T> = RefObject<T> | RefCallback<T> | null\n\nexport type Dispatch<A> = (value: A) => void\nexport type SetStateAction<S> = S | ((prev: S) => S)\n\nexport type EffectCallback = () => void | (() => void)\nexport type DependencyList = ReadonlyArray<unknown>\n\n"],
5
+ "mappings": "AAGO,MAAM,qBAAqB,uBAAO,IAAI,4BAA4B;AAClE,MAAM,4BAA4B,uBAAO,IAAI,eAAe;AAC5D,MAAM,sBAAsB,uBAAO,IAAI,gBAAgB;",
6
+ "names": []
7
+ }
@@ -0,0 +1 @@
1
+ export declare const UNITLESS_STYLE: RegExp;