one 1.1.298 → 1.1.299

Sign up to get free protection for your applications and to get access to all the features.
Files changed (279) hide show
  1. package/dist/cjs/vite/replaceLoader.js +7 -1
  2. package/dist/cjs/vite/replaceLoader.js.map +1 -1
  3. package/dist/cjs/vite/replaceLoader.native.js +7 -1
  4. package/dist/cjs/vite/replaceLoader.native.js.map +1 -1
  5. package/dist/esm/Root.native.js +110 -104
  6. package/dist/esm/Root.native.js.map +6 -1
  7. package/dist/esm/Route.native.js +12 -10
  8. package/dist/esm/Route.native.js.map +6 -1
  9. package/dist/esm/cleanUrl.native.js +12 -13
  10. package/dist/esm/cleanUrl.native.js.map +6 -1
  11. package/dist/esm/cli/label-process.native.js +5 -4
  12. package/dist/esm/cli/label-process.native.js.map +6 -1
  13. package/dist/esm/cli/main.native.js +8 -13
  14. package/dist/esm/cli/main.native.js.map +6 -1
  15. package/dist/esm/cli/prebuild.native.js +5 -5
  16. package/dist/esm/cli/prebuild.native.js.map +6 -1
  17. package/dist/esm/cli/run.native.js +21 -28
  18. package/dist/esm/cli/run.native.js.map +6 -1
  19. package/dist/esm/cli.native.js +119 -148
  20. package/dist/esm/cli.native.js.map +6 -1
  21. package/dist/esm/clientLoaderResolver.native.js +9 -6
  22. package/dist/esm/clientLoaderResolver.native.js.map +6 -1
  23. package/dist/esm/config.native.js +12 -11
  24. package/dist/esm/config.native.js.map +6 -1
  25. package/dist/esm/constants.native.js +7 -5
  26. package/dist/esm/constants.native.js.map +6 -1
  27. package/dist/esm/createApp.native.js +13 -9
  28. package/dist/esm/createApp.native.js.map +6 -1
  29. package/dist/esm/createHandleRequest.native.js +55 -64
  30. package/dist/esm/createHandleRequest.native.js.map +6 -1
  31. package/dist/esm/createRoute.native.js +16 -16
  32. package/dist/esm/createRoute.native.js.map +6 -1
  33. package/dist/esm/fallbackViews/Sitemap.native.js +6 -3
  34. package/dist/esm/fallbackViews/Sitemap.native.js.map +6 -1
  35. package/dist/esm/fallbackViews/Unmatched.native.js +5 -3
  36. package/dist/esm/fallbackViews/Unmatched.native.js.map +6 -1
  37. package/dist/esm/fork/NavigationContainer.native.js +24 -31
  38. package/dist/esm/fork/NavigationContainer.native.js.map +6 -1
  39. package/dist/esm/fork/createMemoryHistory.native.js +99 -115
  40. package/dist/esm/fork/createMemoryHistory.native.js.map +6 -1
  41. package/dist/esm/fork/extractPathFromURL.native.js +16 -15
  42. package/dist/esm/fork/extractPathFromURL.native.js.map +6 -1
  43. package/dist/esm/fork/findFocusedRoute.native.js +6 -5
  44. package/dist/esm/fork/findFocusedRoute.native.js.map +6 -1
  45. package/dist/esm/fork/getPathFromState.native.js +127 -140
  46. package/dist/esm/fork/getPathFromState.native.js.map +6 -1
  47. package/dist/esm/fork/getStateFromPath.native.js +292 -288
  48. package/dist/esm/fork/getStateFromPath.native.js.map +6 -1
  49. package/dist/esm/fork/useLinking.native.js +70 -61
  50. package/dist/esm/fork/useLinking.native.js.map +6 -1
  51. package/dist/esm/fork/validatePathConfig.native.js +15 -9
  52. package/dist/esm/fork/validatePathConfig.native.js.map +6 -1
  53. package/dist/esm/getLinkingConfig.native.js +11 -6
  54. package/dist/esm/getLinkingConfig.native.js.map +6 -1
  55. package/dist/esm/getReactNavigationConfig.native.js +28 -20
  56. package/dist/esm/getReactNavigationConfig.native.js.map +6 -1
  57. package/dist/esm/getRoutes.native.js +249 -229
  58. package/dist/esm/getRoutes.native.js.map +6 -1
  59. package/dist/esm/getURL.native.js +4 -4
  60. package/dist/esm/getURL.native.js.map +6 -1
  61. package/dist/esm/head/Head.android.js +5 -3
  62. package/dist/esm/head/Head.android.js.map +6 -1
  63. package/dist/esm/head/Head.ios.js +144 -132
  64. package/dist/esm/head/Head.ios.js.map +6 -1
  65. package/dist/esm/head/Head.native.js +7 -7
  66. package/dist/esm/head/Head.native.js.map +6 -1
  67. package/dist/esm/head/HeadModule.native.js +6 -6
  68. package/dist/esm/head/HeadModule.native.js.map +6 -1
  69. package/dist/esm/head/index.native.js +2 -2
  70. package/dist/esm/head/index.native.js.map +6 -1
  71. package/dist/esm/head/types.native.js +1 -2
  72. package/dist/esm/head/types.native.js.map +6 -1
  73. package/dist/esm/head/url.native.js +10 -8
  74. package/dist/esm/head/url.native.js.map +6 -1
  75. package/dist/esm/hooks.native.js +53 -34
  76. package/dist/esm/hooks.native.js.map +6 -1
  77. package/dist/esm/imperative-api.native.js +9 -6
  78. package/dist/esm/imperative-api.native.js.map +6 -1
  79. package/dist/esm/import-mode/index.android.js +4 -3
  80. package/dist/esm/import-mode/index.android.js.map +6 -1
  81. package/dist/esm/import-mode/index.ios.js +4 -3
  82. package/dist/esm/import-mode/index.ios.js.map +6 -1
  83. package/dist/esm/import-mode/index.native.js +3 -1
  84. package/dist/esm/import-mode/index.native.js.map +6 -1
  85. package/dist/esm/index.native.js +65 -27
  86. package/dist/esm/index.native.js.map +6 -1
  87. package/dist/esm/interfaces/router.native.js +4 -2
  88. package/dist/esm/interfaces/router.native.js.map +6 -1
  89. package/dist/esm/layouts/Drawer.native.js +7 -6
  90. package/dist/esm/layouts/Drawer.native.js.map +6 -1
  91. package/dist/esm/layouts/Stack.native.js +7 -6
  92. package/dist/esm/layouts/Stack.native.js.map +6 -1
  93. package/dist/esm/layouts/Tabs.native.js +42 -39
  94. package/dist/esm/layouts/Tabs.native.js.map +6 -1
  95. package/dist/esm/layouts/withLayoutContext.native.js +51 -48
  96. package/dist/esm/layouts/withLayoutContext.native.js.map +6 -1
  97. package/dist/esm/link/Link.native.js +62 -53
  98. package/dist/esm/link/Link.native.js.map +6 -1
  99. package/dist/esm/link/Redirect.native.js +8 -9
  100. package/dist/esm/link/Redirect.native.js.map +6 -1
  101. package/dist/esm/link/href.native.js +28 -27
  102. package/dist/esm/link/href.native.js.map +6 -1
  103. package/dist/esm/link/linking.native.js +51 -40
  104. package/dist/esm/link/linking.native.js.map +6 -1
  105. package/dist/esm/link/path.native.js +28 -19
  106. package/dist/esm/link/path.native.js.map +6 -1
  107. package/dist/esm/link/useLinkTo.native.js +22 -20
  108. package/dist/esm/link/useLinkTo.native.js.map +6 -1
  109. package/dist/esm/link/useLoadedNavigation.native.js +30 -23
  110. package/dist/esm/link/useLoadedNavigation.native.js.map +6 -1
  111. package/dist/esm/matchers.native.js +16 -3
  112. package/dist/esm/matchers.native.js.map +6 -1
  113. package/dist/esm/platform.native.js +4 -2
  114. package/dist/esm/platform.native.js.map +6 -1
  115. package/dist/esm/polyfills-mobile.native.js +4 -5
  116. package/dist/esm/polyfills-mobile.native.js.map +6 -1
  117. package/dist/esm/polyfills-server.native.js +1 -1
  118. package/dist/esm/polyfills-server.native.js.map +6 -1
  119. package/dist/esm/render.native.js +3 -1
  120. package/dist/esm/render.native.js.map +6 -1
  121. package/dist/esm/router/RouterStore.native.js +1 -2
  122. package/dist/esm/router/RouterStore.native.js.map +6 -1
  123. package/dist/esm/router/constants.native.js +4 -2
  124. package/dist/esm/router/constants.native.js.map +6 -1
  125. package/dist/esm/router/getNormalizedStatePath.native.js +18 -17
  126. package/dist/esm/router/getNormalizedStatePath.native.js.map +6 -1
  127. package/dist/esm/router/lastAction.native.js +10 -9
  128. package/dist/esm/router/lastAction.native.js.map +6 -1
  129. package/dist/esm/router/router.native.js +135 -114
  130. package/dist/esm/router/router.native.js.map +6 -1
  131. package/dist/esm/router/serverLocationContext.native.js +4 -2
  132. package/dist/esm/router/serverLocationContext.native.js.map +6 -1
  133. package/dist/esm/router/useInitializeOneRouter.native.js +8 -5
  134. package/dist/esm/router/useInitializeOneRouter.native.js.map +6 -1
  135. package/dist/esm/serve.native.js +77 -104
  136. package/dist/esm/serve.native.js.map +6 -1
  137. package/dist/esm/server/createRoutesManifest.native.js +14 -11
  138. package/dist/esm/server/createRoutesManifest.native.js.map +6 -1
  139. package/dist/esm/server/getServerManifest.native.js +61 -67
  140. package/dist/esm/server/getServerManifest.native.js.map +6 -1
  141. package/dist/esm/server-render.native.js +9 -10
  142. package/dist/esm/server-render.native.js.map +6 -1
  143. package/dist/esm/sortRoutes.native.js +27 -17
  144. package/dist/esm/sortRoutes.native.js.map +6 -1
  145. package/dist/esm/typed-routes/generateRouteTypes.native.js +10 -11
  146. package/dist/esm/typed-routes/generateRouteTypes.native.js.map +6 -1
  147. package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.native.js +38 -37
  148. package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.native.js.map +6 -1
  149. package/dist/esm/types.native.js +1 -2
  150. package/dist/esm/types.native.js.map +6 -1
  151. package/dist/esm/useFocusEffect.native.js +25 -22
  152. package/dist/esm/useFocusEffect.native.js.map +6 -1
  153. package/dist/esm/useLoader.native.js +50 -50
  154. package/dist/esm/useLoader.native.js.map +6 -1
  155. package/dist/esm/useNavigation.native.js +23 -19
  156. package/dist/esm/useNavigation.native.js.map +6 -1
  157. package/dist/esm/useScreens.native.js +143 -160
  158. package/dist/esm/useScreens.native.js.map +6 -1
  159. package/dist/esm/useViteRoutes.native.js +25 -28
  160. package/dist/esm/useViteRoutes.native.js.map +6 -1
  161. package/dist/esm/utils/assertIsReady.native.js +6 -3
  162. package/dist/esm/utils/assertIsReady.native.js.map +6 -1
  163. package/dist/esm/utils/dynamicImport.native.js +5 -3
  164. package/dist/esm/utils/dynamicImport.native.js.map +6 -1
  165. package/dist/esm/utils/existsAsync.native.js +6 -4
  166. package/dist/esm/utils/existsAsync.native.js.map +6 -1
  167. package/dist/esm/utils/getPageExport.native.js +12 -11
  168. package/dist/esm/utils/getPageExport.native.js.map +6 -1
  169. package/dist/esm/utils/globDir.native.js +5 -3
  170. package/dist/esm/utils/globDir.native.js.map +6 -1
  171. package/dist/esm/utils/hashString.native.js +4 -2
  172. package/dist/esm/utils/hashString.native.js.map +6 -1
  173. package/dist/esm/utils/isResponse.native.js +4 -2
  174. package/dist/esm/utils/isResponse.native.js.map +6 -1
  175. package/dist/esm/utils/isStatus.native.js +4 -2
  176. package/dist/esm/utils/isStatus.native.js.map +6 -1
  177. package/dist/esm/utils/promiseWithResolvers.native.js +7 -7
  178. package/dist/esm/utils/promiseWithResolvers.native.js.map +6 -1
  179. package/dist/esm/utils/rand.native.js +5 -3
  180. package/dist/esm/utils/rand.native.js.map +6 -1
  181. package/dist/esm/utils/redirect.native.js +7 -5
  182. package/dist/esm/utils/redirect.native.js.map +6 -1
  183. package/dist/esm/utils/removeSearch.native.js +4 -2
  184. package/dist/esm/utils/removeSearch.native.js.map +6 -1
  185. package/dist/esm/utils/removeUndefined.native.js +6 -3
  186. package/dist/esm/utils/removeUndefined.native.js.map +6 -1
  187. package/dist/esm/utils/requireResolve.native.js +4 -2
  188. package/dist/esm/utils/requireResolve.native.js.map +6 -1
  189. package/dist/esm/utils/url.native.js +6 -2
  190. package/dist/esm/utils/url.native.js.map +6 -1
  191. package/dist/esm/utils/weakKey.native.js +11 -10
  192. package/dist/esm/utils/weakKey.native.js.map +6 -1
  193. package/dist/esm/utils/weakMemo.native.js +8 -8
  194. package/dist/esm/utils/weakMemo.native.js.map +6 -1
  195. package/dist/esm/views/EmptyRoute.native.js +5 -3
  196. package/dist/esm/views/EmptyRoute.native.js.map +6 -1
  197. package/dist/esm/views/ErrorBoundary.native.js +5 -8
  198. package/dist/esm/views/ErrorBoundary.native.js.map +6 -1
  199. package/dist/esm/views/LoadProgressBar.native.js +58 -57
  200. package/dist/esm/views/LoadProgressBar.native.js.map +6 -1
  201. package/dist/esm/views/Navigator.native.js +54 -71
  202. package/dist/esm/views/Navigator.native.js.map +6 -1
  203. package/dist/esm/views/PreloadLinks.native.js +3 -1
  204. package/dist/esm/views/PreloadLinks.native.js.map +6 -1
  205. package/dist/esm/views/RootErrorBoundary.native.js +39 -29
  206. package/dist/esm/views/RootErrorBoundary.native.js.map +6 -1
  207. package/dist/esm/views/Screen.native.js +12 -12
  208. package/dist/esm/views/Screen.native.js.map +6 -1
  209. package/dist/esm/views/ScrollRestoration.native.js +27 -27
  210. package/dist/esm/views/ScrollRestoration.native.js.map +6 -1
  211. package/dist/esm/views/Try.native.js +40 -37
  212. package/dist/esm/views/Try.native.js.map +6 -1
  213. package/dist/esm/vite/build.native.js +260 -295
  214. package/dist/esm/vite/build.native.js.map +6 -1
  215. package/dist/esm/vite/clientTreeShakePlugin.native.js +34 -33
  216. package/dist/esm/vite/clientTreeShakePlugin.native.js.map +6 -1
  217. package/dist/esm/vite/constants.native.js +6 -4
  218. package/dist/esm/vite/constants.native.js.map +6 -1
  219. package/dist/esm/vite/createFileSystemRouter.native.js +99 -130
  220. package/dist/esm/vite/createFileSystemRouter.native.js.map +6 -1
  221. package/dist/esm/vite/customNodeExternals.native.js +9 -10
  222. package/dist/esm/vite/customNodeExternals.native.js.map +6 -1
  223. package/dist/esm/vite/ensureTsConfig.native.js +7 -5
  224. package/dist/esm/vite/ensureTsConfig.native.js.map +6 -1
  225. package/dist/esm/vite/findDepsToOptimize.native.js +27 -19
  226. package/dist/esm/vite/findDepsToOptimize.native.js.map +6 -1
  227. package/dist/esm/vite/fixDependenciesPlugin.native.js +5 -3
  228. package/dist/esm/vite/fixDependenciesPlugin.native.js.map +6 -1
  229. package/dist/esm/vite/generateTypesForRoutes.native.js +9 -9
  230. package/dist/esm/vite/generateTypesForRoutes.native.js.map +6 -1
  231. package/dist/esm/vite/getManifest.native.js +6 -4
  232. package/dist/esm/vite/getManifest.native.js.map +6 -1
  233. package/dist/esm/vite/headers.native.js +11 -5
  234. package/dist/esm/vite/headers.native.js.map +6 -1
  235. package/dist/esm/vite/loadEnv.native.js +7 -6
  236. package/dist/esm/vite/loadEnv.native.js.map +6 -1
  237. package/dist/esm/vite/makePluginWebOnly.native.js +9 -5
  238. package/dist/esm/vite/makePluginWebOnly.native.js.map +6 -1
  239. package/dist/esm/vite/one.native.js +142 -127
  240. package/dist/esm/vite/one.native.js.map +6 -1
  241. package/dist/esm/vite/removeReactNativeWebAnimatedPlugin.native.js +14 -11
  242. package/dist/esm/vite/removeReactNativeWebAnimatedPlugin.native.js.map +6 -1
  243. package/dist/esm/vite/replaceLoader.js +7 -1
  244. package/dist/esm/vite/replaceLoader.js.map +1 -1
  245. package/dist/esm/vite/replaceLoader.mjs +5 -1
  246. package/dist/esm/vite/replaceLoader.mjs.map +1 -1
  247. package/dist/esm/vite/replaceLoader.native.js +13 -10
  248. package/dist/esm/vite/replaceLoader.native.js.map +6 -1
  249. package/dist/esm/vite/resolveAPIRequest.native.js +44 -47
  250. package/dist/esm/vite/resolveAPIRequest.native.js.map +6 -1
  251. package/dist/esm/vite/server.native.js +5 -4
  252. package/dist/esm/vite/server.native.js.map +6 -1
  253. package/dist/esm/vite/types.native.js +1 -2
  254. package/dist/esm/vite/types.native.js.map +6 -1
  255. package/dist/esm/vite/virtualEntryPlugin.native.js +21 -16
  256. package/dist/esm/vite/virtualEntryPlugin.native.js.map +6 -1
  257. package/dist/esm/vite/vitePluginSsrCss.native.js +61 -50
  258. package/dist/esm/vite/vitePluginSsrCss.native.js.map +6 -1
  259. package/dist/esm/vite.native.js +19 -10
  260. package/dist/esm/vite.native.js.map +6 -1
  261. package/dist/esm/zero/getQueryKey.native.js +5 -3
  262. package/dist/esm/zero/getQueryKey.native.js.map +6 -1
  263. package/dist/esm/zero/isZeroQuery.native.js +4 -2
  264. package/dist/esm/zero/isZeroQuery.native.js.map +6 -1
  265. package/dist/esm/zero/resolveQuery.native.js +9 -8
  266. package/dist/esm/zero/resolveQuery.native.js.map +6 -1
  267. package/dist/esm/zero/subscribeToQuery.native.js +5 -3
  268. package/dist/esm/zero/subscribeToQuery.native.js.map +6 -1
  269. package/dist/esm/zero/types.native.js +1 -2
  270. package/dist/esm/zero/types.native.js.map +6 -1
  271. package/dist/esm/zero/useQuery.native.js +12 -12
  272. package/dist/esm/zero/useQuery.native.js.map +6 -1
  273. package/dist/esm/zero/useQueryZero.native.js +24 -20
  274. package/dist/esm/zero/useQueryZero.native.js.map +6 -1
  275. package/dist/esm/zero.native.js +9 -5
  276. package/dist/esm/zero.native.js.map +6 -1
  277. package/package.json +7 -7
  278. package/src/vite/replaceLoader.ts +7 -1
  279. package/types/vite/replaceLoader.d.ts.map +1 -1
@@ -1 +1,6 @@
1
- {"version":3,"names":["isResponse","asyncHeadersCache","mergeHeaders","requestAsyncLocalStore","resolveAPIRequest","asyncImport","request","params","Promise","res","rej","id","_id","Math","random","run","imported","requestType","method","handler","default","console","warn","response","asyncHeaders","get","Response","headers","json","err","includes","body","streamToString","status","statusText","error","stream","reader","getReader","decoder","TextDecoder","result","done","value","read","decode"],"sources":["../../../src/vite/resolveAPIRequest.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,UAAA,QAAkB;AAC3B,SAASC,iBAAA,EAAmBC,YAAA,EAAcC,sBAAA,QAA8B;AAEjE,SAASC,kBACdC,WAAA,EACAC,OAAA,EACAC,MAAA,EACA;EACA,IAAKF,WAAA,EAEL,OAAO,IAAIG,OAAA,CAAQ,UAAMC,GAAA,EAAQC,GAAA;IAC/B,IAAAC,EAAM;MACNC,GAAA,EAAAC,IAAA,CAAAC,MAAA;IACE;IACEX,sBAAiB,CAAAY,GAAA,CAAMJ,EAAA,oBACjB;MAGN;QACE,IAAAK,QAAQ,GAAK,MAAAX,WAAA;UAAAY,WAAgC,GAAAX,OAAA,CAAWY,MAAE;UAAAC,OAAA,GAAAH,QAAA,CAAAC,WAAA,KAAAD,QAAA,CAAAI,OAAA;QAC1D,KAAAD,OAAA;UACFE,OAAA,CAAAC,IAAA,iCAAAL,WAAA;UAEA;QAEA;QAEA,IAAIM,QAAA,SAAAJ,OAAA,CAAAb,OAAA;YACFC;UACE;UAAIiB,YAAA,GAAAvB,iBACF,CAAAwB,GAAA,CAAAd,EAAA;QAKoE,IAGxEa,YAAc,EACZ;UAEED,QAAM,YAAOG,QAAS,GAAOxB,YAAM,CAAAqB,QAAe,CAAAI,OAAA,EAASH,YAAQ,IAAAD,QAAA,WAAAA,QAAA,eAAAA,QAAA,GAAAG,QAAA,CAAAE,IAAA,CAAAL,QAAA;YACnEI,OAAA,EAAAH;UAA8B,KAC5BD,QAAS,OAAAG,QAAS,CAAAH,QAAA;YAAAI,OAClB,EAAAH;UAAiB;QACI,SAEvBK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,CAAA;IACjD;EACF,SAASD,OAAO;AACdd,YAAQc,MAAM,6BAA6BA,KAAAA;EAC7C,UAAA;AACEE,WAAOS,YAAW;EACpB;AAEA,SAAOL;AACT;",
5
+ "names": ["isResponse", "asyncHeadersCache", "mergeHeaders", "requestAsyncLocalStore", "resolveAPIRequest", "asyncImport", "request", "params", "Promise", "res", "rej", "id", "_id", "Math", "random", "run", "imported", "requestType", "method", "handler", "default", "console", "warn", "response", "asyncHeaders", "get", "Response", "headers", "json", "err", "includes", "body", "streamToString", "status", "statusText", "error", "stream", "reader", "getReader", "decoder", "TextDecoder", "result", "done", "value", "read", "decode", "releaseLock"]
6
+ }
@@ -1,17 +1,18 @@
1
1
  import { parentPort } from "node:worker_threads";
2
2
  import { fileURLToPath } from "node:url";
3
3
  import { ESModulesEvaluator, ModuleRunner, RemoteRunnerTransport } from "vite/module-runner";
4
- if (!parentPort) throw new Error("No parent port");
4
+ if (!parentPort)
5
+ throw new Error("No parent port");
5
6
  var runner = new ModuleRunner({
6
7
  root: fileURLToPath(new URL("./", import.meta.url)),
7
8
  transport: new RemoteRunnerTransport({
8
- send: function (data) {
9
+ send: function(data) {
9
10
  return parentPort.postMessage(data);
10
11
  },
11
- onMessage: function (listener) {
12
+ onMessage: function(listener) {
12
13
  return parentPort.on("message", listener);
13
14
  },
14
15
  timeout: 5e3
15
16
  })
16
17
  }, new ESModulesEvaluator());
17
- //# sourceMappingURL=server.native.js.map
18
+ //# sourceMappingURL=server.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["parentPort","fileURLToPath","ESModulesEvaluator","ModuleRunner","RemoteRunnerTransport","Error","runner","root","URL","import","meta","url","transport","send","data","postMessage","onMessage","listener","on","timeout"],"sources":["../../../src/vite/server.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,UAAA,QAAkB;AAC3B,SAASC,aAAA,QAAqB;AAC9B,SAASC,kBAAA,EAAoBC,YAAA,EAAcC,qBAAA,QAA6B;AAExE,IAAI,CAACJ,UAAA,EACH,MAAM,IAAIK,KAAA,CAAM,gBAAgB;AAGlC,IAAAC,MAAM,OAASH,YAAI;EACjBI,IAAA,EAAAN,aAAA,KAAAO,GAAA,OAAAC,MAAA,CAAAC,IAAA,CAAAC,GAAA;EAAAC,SACQ,MAAAR,qBAA4B;IAClCS,IAAA,WAAAA,CAAeC,IAAA;MACb,OAAOd,UAAS,CAAAe,WAAY,CAAAD,IAAA;IAAgB;IACeE,SAC3D,EAAS,SAAAA,CAAAC,QAAA;MACV,OAAAjB,UAAA,CAAAkB,EAAA,YAAAD,QAAA;IACH;IACAE,OAAI;EACN","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/server.ts"],
4
+ "mappings": "AAAA,SAASA,kBAAkB;AAC3B,SAASC,qBAAqB;AAC9B,SAASC,oBAAoBC,cAAcC,6BAA6B;AAExE,IAAI,CAACJ;AACH,QAAM,IAAIK,MAAM,gBAAgB;AAGlC,IAAMC,SAAS,IAAIH,aACjB;EACEI,MAAMN,cAAc,IAAIO,IAAI,MAAM,YAAYC,GAAG,CAAA;EACjDC,WAAW,IAAIN,sBAAsB;IACnCO,MAAM,SAACC,MAAAA;aAASZ,WAAYa,YAAYD,IAAAA;;IACxCE,WAAW,SAACC,UAAAA;aAAaf,WAAYgB,GAAG,WAAWD,QAAAA;;IACnDE,SAAS;EACX,CAAA;AACF,GACA,IAAIf,mBAAAA,CAAAA;",
5
+ "names": ["parentPort", "fileURLToPath", "ESModulesEvaluator", "ModuleRunner", "RemoteRunnerTransport", "Error", "runner", "root", "URL", "url", "transport", "send", "data", "postMessage", "onMessage", "listener", "on", "timeout"]
6
+ }
@@ -1,2 +1 @@
1
-
2
- //# sourceMappingURL=types.native.js.map
1
+ //# sourceMappingURL=types.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "mappings": "",
5
+ "names": []
6
+ }
@@ -1,12 +1,5 @@
1
1
  import { isNativeEnvironment } from "vxrn";
2
- var virtualEntryIdName = "one-entry",
3
- virtualEntryId = `virtual:${virtualEntryIdName}`,
4
- virtalEntryIdClient = `/@id/__x00__virtual:${virtualEntryIdName}`,
5
- resolvedVirtualEntryId = "\0" + virtualEntryId,
6
- virtualEntryIdNativeName = `${virtualEntryIdName}-native`,
7
- virtualEntryIdNative = `virtual:${virtualEntryIdNativeName}`,
8
- resolvedVirtualEntryIdNative = "\0" + virtualEntryIdNativeName,
9
- USE_One_SETUP_FILE = `
2
+ var virtualEntryIdName = "one-entry", virtualEntryId = `virtual:${virtualEntryIdName}`, virtalEntryIdClient = `/@id/__x00__virtual:${virtualEntryIdName}`, resolvedVirtualEntryId = "\0" + virtualEntryId, virtualEntryIdNativeName = `${virtualEntryIdName}-native`, virtualEntryIdNative = `virtual:${virtualEntryIdNativeName}`, resolvedVirtualEntryIdNative = "\0" + virtualEntryIdNativeName, USE_One_SETUP_FILE = `
10
3
  if (process.env.One_SETUP_FILE) {
11
4
  import(/* @vite-ignore */ process.env.One_SETUP_FILE)
12
5
  }
@@ -17,13 +10,17 @@ function createVirtualEntry(options) {
17
10
  name: "one-virtual-entry",
18
11
  enforce: "pre",
19
12
  resolveId(id) {
20
- if (id === virtualEntryId) return resolvedVirtualEntryId;
21
- if (id === virtualEntryIdNative) return resolvedVirtualEntryIdNative;
13
+ if (id === virtualEntryId)
14
+ return resolvedVirtualEntryId;
15
+ if (id === virtualEntryIdNative)
16
+ return resolvedVirtualEntryIdNative;
22
17
  },
23
18
  load(id) {
24
19
  if (id === resolvedVirtualEntryId) {
25
- var prependCode = isNativeEnvironment(this.environment) ? "" : (/* `import()` will not work on native */
26
- USE_One_SETUP_FILE);
20
+ var prependCode = isNativeEnvironment(this.environment) ? "" : (
21
+ /* `import()` will not work on native */
22
+ USE_One_SETUP_FILE
23
+ );
27
24
  return `
28
25
  ${prependCode}
29
26
 
@@ -36,8 +33,10 @@ export default createApp({
36
33
  `;
37
34
  }
38
35
  if (id === resolvedVirtualEntryIdNative) {
39
- var prependCode1 = isNativeEnvironment(this.environment) ? "" : (/* `import()` will not work on native */
40
- USE_One_SETUP_FILE);
36
+ var prependCode1 = isNativeEnvironment(this.environment) ? "" : (
37
+ /* `import()` will not work on native */
38
+ USE_One_SETUP_FILE
39
+ );
41
40
  return `
42
41
  ${prependCode1}
43
42
 
@@ -52,5 +51,11 @@ export default createApp({
52
51
  }
53
52
  };
54
53
  }
55
- export { createVirtualEntry, virtalEntryIdClient, virtualEntryId, virtualEntryIdName, virtualEntryIdNative };
56
- //# sourceMappingURL=virtualEntryPlugin.native.js.map
54
+ export {
55
+ createVirtualEntry,
56
+ virtalEntryIdClient,
57
+ virtualEntryId,
58
+ virtualEntryIdName,
59
+ virtualEntryIdNative
60
+ };
61
+ //# sourceMappingURL=virtualEntryPlugin.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["isNativeEnvironment","virtualEntryIdName","virtualEntryId","virtalEntryIdClient","resolvedVirtualEntryId","virtualEntryIdNativeName","virtualEntryIdNative","resolvedVirtualEntryIdNative","USE_One_SETUP_FILE","createVirtualEntry","options","appDirGlob","root","name","enforce","resolveId","id","load","prependCode","environment","prependCode1"],"sources":["../../../src/vite/virtualEntryPlugin.ts"],"sourcesContent":[null],"mappings":"AACA,SAASA,mBAAA,QAA2B;AAE7B,IAAAC,kBAAM,cAAqB;EAAAC,cACrB,cAAiBD,kBAAW,EAAkB;EAAAE,mBAC9C,0BAAsBF,kBAAuB,EAAkB;EAAAG,sBACtE,OAAyB,GAAAF,cAAO;EAAAG,wBAEhC,MAA2BJ,kBAAG,SAAkB;EAAAK,oBACzC,cAAuBD,wBAAW,EAAwB;EAAAE,4BACjE,OAA+B,GAAAF,wBAAO;EAAAG,kBAEtC;AAAqB;AAAA;AAAA;AAAA;AAMpB,SAASC,mBAAmBC,OAAA,EAAmC;EACpE,IAAAC,UAAM,OAAaD,OAAI,C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AX;;AACJ,eAAO;EACbU,WAAAA;;;;cAIYP,UAAAA;;8BAEgBA,UAAAA;;;MAGxB;AAEA,UAAIK,OAAOT,8BAA8B;AACvC,YAAMW,eAAclB,oBAAoB,KAAKmB,WAAW,IACpD;;UACAX;;AACJ,eAAO;EACbU,YAAAA;;;;cAIYP,UAAAA;;8BAEgBA,UAAAA;;;MAGxB;IACF;EACF;AACF;",
5
+ "names": ["isNativeEnvironment", "virtualEntryIdName", "virtualEntryId", "virtalEntryIdClient", "resolvedVirtualEntryId", "virtualEntryIdNativeName", "virtualEntryIdNative", "resolvedVirtualEntryIdNative", "USE_One_SETUP_FILE", "createVirtualEntry", "options", "appDirGlob", "root", "name", "enforce", "resolveId", "id", "load", "prependCode", "environment"]
6
+ }
@@ -1,12 +1,11 @@
1
1
  var VIRTUAL_ENTRY = "virtual:ssr-css.css";
2
2
  function vitePluginSsrCss(pluginOpts) {
3
- var server,
4
- virtualHref = "/@id/__x00__" + VIRTUAL_ENTRY;
3
+ var server, virtualHref = "/@id/__x00__" + VIRTUAL_ENTRY;
5
4
  return {
6
5
  name: "vite-plugin-ssr-css",
7
6
  apply: "serve",
8
7
  configureServer(server_) {
9
- server = server_, server.middlewares.use(async function (req, res, next) {
8
+ server = server_, server.middlewares.use(async function(req, res, next) {
10
9
  var _req_url;
11
10
  if (!((_req_url = req.url) === null || _req_url === void 0) && _req_url.includes(virtualHref)) {
12
11
  invalidateModule(server, "\0" + VIRTUAL_ENTRY + "?direct");
@@ -24,30 +23,32 @@ function vitePluginSsrCss(pluginOpts) {
24
23
  },
25
24
  async load(id, _options) {
26
25
  if (id.startsWith("\0" + VIRTUAL_ENTRY)) {
27
- var url = new URL(id.slice(1), "https://test.local"),
28
- code = await collectStyle(server, pluginOpts.entries);
26
+ var url = new URL(id.slice(1), "https://test.local"), code = await collectStyle(server, pluginOpts.entries);
29
27
  return url.searchParams.has("direct") || (code = `export default ${JSON.stringify(code)}`), code;
30
28
  }
31
29
  },
32
30
  // also expose via transformIndexHtml
33
31
  transformIndexHtml: {
34
- handler: async function () {
35
- return [{
36
- tag: "link",
37
- injectTo: "head",
38
- attrs: {
39
- rel: "stylesheet",
40
- href: virtualHref,
41
- "data-ssr-css": !0
42
- }
43
- }, {
44
- tag: "script",
45
- injectTo: "head",
46
- attrs: {
47
- type: "module"
32
+ handler: async function() {
33
+ return [
34
+ {
35
+ tag: "link",
36
+ injectTo: "head",
37
+ attrs: {
38
+ rel: "stylesheet",
39
+ href: virtualHref,
40
+ "data-ssr-css": !0
41
+ }
48
42
  },
49
- children: (/* js */
50
- `
43
+ {
44
+ tag: "script",
45
+ injectTo: "head",
46
+ attrs: {
47
+ type: "module"
48
+ },
49
+ children: (
50
+ /* js */
51
+ `
51
52
  import { createHotContext } from "/@vite/client";
52
53
  const hot = createHotContext("/__clear_ssr_css");
53
54
  hot.on("vite:afterUpdate", () => {
@@ -55,8 +56,10 @@ function vitePluginSsrCss(pluginOpts) {
55
56
  .querySelectorAll("[data-ssr-css]")
56
57
  .forEach(node => node.remove());
57
58
  });
58
- `)
59
- }];
59
+ `
60
+ )
61
+ }
62
+ ];
60
63
  }
61
64
  }
62
65
  };
@@ -66,49 +69,57 @@ function invalidateModule(server, id) {
66
69
  mod && server.moduleGraph.invalidateModule(mod);
67
70
  }
68
71
  async function collectStyle(server, entries) {
69
- var urls = await collectStyleUrls(server, entries),
70
- codes = await Promise.all(urls.map(async function (url) {
71
- var res = await server.transformRequest(url + "?direct"),
72
- code = res?.code || "",
73
- prefix = `/* [collectStyle] ${url} */`;
74
- try {
75
- var {
76
- transform
77
- } = await import("lightningcss"),
78
- processed = transform({
79
- filename: "code.css",
80
- code: Buffer.from(code),
81
- ...server.config.css.lightningcss
82
- }).code.toString();
83
- return [prefix, processed];
84
- } catch (err) {
85
- return console.error(` [one] Error post-processing CSS, leaving un-processed: ${err}`), [prefix, code];
86
- }
87
- }));
72
+ var urls = await collectStyleUrls(server, entries), codes = await Promise.all(urls.map(async function(url) {
73
+ var res = await server.transformRequest(url + "?direct"), code = res?.code || "", prefix = `/* [collectStyle] ${url} */`;
74
+ try {
75
+ var { transform } = await import("lightningcss"), processed = transform({
76
+ filename: "code.css",
77
+ code: Buffer.from(code),
78
+ ...server.config.css.lightningcss
79
+ }).code.toString();
80
+ return [
81
+ prefix,
82
+ processed
83
+ ];
84
+ } catch (err) {
85
+ return console.error(` [one] Error post-processing CSS, leaving un-processed: ${err}`), [
86
+ prefix,
87
+ code
88
+ ];
89
+ }
90
+ }));
88
91
  return codes.flat().filter(Boolean).join(`
89
92
 
90
93
  `);
91
94
  }
92
95
  async function collectStyleUrls(server, entries) {
93
- var visited = /* @__PURE__ */new Set();
96
+ var visited = /* @__PURE__ */ new Set();
94
97
  async function traverse(url) {
95
98
  var [, id] = await server.moduleGraph.resolveUrl(url);
96
99
  if (!visited.has(id)) {
97
100
  visited.add(id);
98
101
  var mod = server.moduleGraph.getModuleById(id);
99
- mod && (await Promise.all([...mod.importedModules].map(function (childMod) {
102
+ mod && await Promise.all([
103
+ ...mod.importedModules
104
+ ].map(function(childMod) {
100
105
  return traverse(childMod.url);
101
- })));
106
+ }));
102
107
  }
103
108
  }
104
- return await Promise.all(entries.map(function (e) {
109
+ return await Promise.all(entries.map(function(e) {
105
110
  return server.transformRequest(e);
106
- })), await Promise.all(entries.map(function (url) {
111
+ })), await Promise.all(entries.map(function(url) {
107
112
  return traverse(url);
108
- })), [...visited].filter(function (url) {
113
+ })), [
114
+ ...visited
115
+ ].filter(function(url) {
109
116
  return url.match(CSS_LANGS_RE);
110
117
  });
111
118
  }
112
119
  var CSS_LANGS_RE = /\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/;
113
- export { VIRTUAL_ENTRY, collectStyle, vitePluginSsrCss };
114
- //# sourceMappingURL=vitePluginSsrCss.native.js.map
120
+ export {
121
+ VIRTUAL_ENTRY,
122
+ collectStyle,
123
+ vitePluginSsrCss
124
+ };
125
+ //# sourceMappingURL=vitePluginSsrCss.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["VIRTUAL_ENTRY","vitePluginSsrCss","pluginOpts","server","virtualHref","name","apply","configureServer","server_","middlewares","use","req","res","next","_req_url","url","includes","invalidateModule","code","collectStyle","entries","setHeader","write","end","resolveId","source","_importer","_options","startsWith","load","id","URL","slice","searchParams","has","JSON","stringify","transformIndexHtml","handler","tag","injectTo","attrs","rel","href","type","children","mod","moduleGraph","getModuleById","urls","collectStyleUrls","codes","Promise","all","map","transformRequest","prefix","transform","processed","filename","Buffer","from","config","css","lightningcss","toString","err","console","error","flat","filter","Boolean","join","visited","Set","traverse","resolveUrl","add"],"sources":["../../../src/vite/vitePluginSsrCss.ts"],"sourcesContent":[null],"mappings":"AAKO,IAAAA,aAAM,wBAAgB;AAEtB,SAASC,iBAAiBC,UAAA,EAA2C;EAC1E,IAAIC,MAAA;IAAAC,WAAA,oBAAAJ,aAAA;EAGJ,OAAM;IAENK,IAAA,EAAO;IACLC,KAAA,EAAM;IACNC,eAAOA,CAAAC,OAAA;MACPL,MAAA,GAAAK,OAAgB,EAAAL,MAAS,CAAAM,WAAA,CAAAC,GAAA,iBAAAC,GAAA,EAAAC,GAAA,EAAAC,IAAA;QACvB,IAAAC,QAAS;QAIP,IAAI,GAAAA,QAAS,GAAAH,GAAA,CAASI,GAAA,UAAW,IAAGD,QAAA,gBAAAA,QAAA,CAAAE,QAAA,CAAAZ,WAAA;UAClCa,gBAAA,CAAiBd,MAAA,EAAQ,OAAOH,aAAA,GAAgB,SAAS;UAEzD,IAAIkB,IAAA,GAAO,MAAMC,YAAA,CAAahB,MAAA,EAAQD,UAAA,CAAWkB,OAAO;UAExDR,GAAA,CAAIS,SAAA,CAAU,gBAAgB,UAAU,GACxCT,GAAA,CAAIS,SAAA,CAAU,iBAAiB,UAAU,GACzCT,GAAA,CAAIS,SAAA,CAAU,QAAQ,GAAG,GACzBT,GAAA,CAAIU,KAAA,CAAMJ,IAAI,GACdN,GAAA,CAAIW,GAAA,CAAI;UACR;QAC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ASI,SAASjE,GAAG;;;EACpF;AAGA,eAAMsC,QAAQC,IAAIlC,QAAQmC,IAAI,SAAC0B,GAAAA;WAAM7E,OAAOoD,iBAAiByB,CAAAA;OAG7D,MAAM5B,QAAQC,IAAIlC,QAAQmC,IAAI,SAACxC,KAAAA;WAAQ6D,SAAS7D,GAAAA;OAGzC;OAAI2D;IAASH,OAAO,SAACxD,KAAAA;WAAQA,IAAImE,MAAMC,YAAAA;;AAChD;AAGA,IAAMA,eAAe;",
5
+ "names": ["VIRTUAL_ENTRY", "vitePluginSsrCss", "pluginOpts", "server", "virtualHref", "name", "apply", "configureServer", "server_", "middlewares", "use", "req", "res", "next", "url", "includes", "invalidateModule", "code", "collectStyle", "entries", "setHeader", "write", "end", "resolveId", "source", "_importer", "_options", "startsWith", "undefined", "load", "id", "URL", "slice", "searchParams", "has", "JSON", "stringify", "transformIndexHtml", "handler", "tag", "injectTo", "attrs", "rel", "href", "type", "children", "mod", "moduleGraph", "getModuleById", "urls", "collectStyleUrls", "codes", "Promise", "all", "map", "transformRequest", "prefix", "transform", "processed", "filename", "Buffer", "from", "config", "css", "lightningcss", "toString", "err", "console", "error", "flat", "filter", "Boolean", "join", "visited", "Set", "traverse", "resolveUrl", "add", "importedModules", "childMod", "e", "match", "CSS_LANGS_RE"]
6
+ }
@@ -1,10 +1,19 @@
1
- import { clientTreeShakePlugin } from "./vite/clientTreeShakePlugin.native.js";
2
- import { createFileSystemRouter } from "./vite/createFileSystemRouter.native.js";
3
- import { vitePluginSsrCss } from "./vite/vitePluginSsrCss.native.js";
4
- import { removeReactNativeWebAnimatedPlugin } from "./vite/removeReactNativeWebAnimatedPlugin.native.js";
5
- import { makePluginWebOnly } from "./vite/makePluginWebOnly.native.js";
6
- import { setCurrentRequestHeaders } from "./vite/headers.native.js";
7
- import { build } from "./vite/build.native.js";
8
- import { one } from "./vite/one.native.js";
9
- export { build, clientTreeShakePlugin, createFileSystemRouter, makePluginWebOnly, one, removeReactNativeWebAnimatedPlugin, setCurrentRequestHeaders, vitePluginSsrCss };
10
- //# sourceMappingURL=vite.native.js.map
1
+ import { clientTreeShakePlugin } from "./vite/clientTreeShakePlugin";
2
+ import { createFileSystemRouter } from "./vite/createFileSystemRouter";
3
+ import { vitePluginSsrCss } from "./vite/vitePluginSsrCss";
4
+ import { removeReactNativeWebAnimatedPlugin } from "./vite/removeReactNativeWebAnimatedPlugin";
5
+ import { makePluginWebOnly } from "./vite/makePluginWebOnly";
6
+ import { setCurrentRequestHeaders } from "./vite/headers";
7
+ import { build } from "./vite/build";
8
+ import { one } from "./vite/one";
9
+ export {
10
+ build,
11
+ clientTreeShakePlugin,
12
+ createFileSystemRouter,
13
+ makePluginWebOnly,
14
+ one,
15
+ removeReactNativeWebAnimatedPlugin,
16
+ setCurrentRequestHeaders,
17
+ vitePluginSsrCss
18
+ };
19
+ //# sourceMappingURL=vite.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["clientTreeShakePlugin","createFileSystemRouter","vitePluginSsrCss","removeReactNativeWebAnimatedPlugin","makePluginWebOnly","setCurrentRequestHeaders","build","one"],"sources":["../../src/vite.ts"],"sourcesContent":[null],"mappings":"AACA,SAASA,qBAAA,QAA6B;AACtC,SAASC,sBAAA,QAA8B;AACvC,SAASC,gBAAA,QAAwB;AACjC,SAASC,kCAAA,QAA0C;AACnD,SAASC,iBAAA,QAAyB;AAElC,SAASC,wBAAA,QAAgC;AAEzC,SAASC,KAAA,QAAa;AACtB,SAASC,GAAA,QAAW","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Users/n8/one/packages/one/src/vite.ts"],
4
+ "mappings": "AACA,SAASA,6BAA6B;AACtC,SAASC,8BAA8B;AACvC,SAASC,wBAAwB;AACjC,SAASC,0CAA0C;AACnD,SAASC,yBAAyB;AAElC,SAASC,gCAAgC;AAEzC,SAASC,aAAa;AACtB,SAASC,WAAW;",
5
+ "names": ["clientTreeShakePlugin", "createFileSystemRouter", "vitePluginSsrCss", "removeReactNativeWebAnimatedPlugin", "makePluginWebOnly", "setCurrentRequestHeaders", "build", "one"]
6
+ }
@@ -1,6 +1,8 @@
1
- import { hashString } from "../utils/hashString.native.js";
1
+ import { hashString } from "../utils/hashString";
2
2
  function getQueryKey(query) {
3
3
  return hashString(JSON.stringify(query.ast));
4
4
  }
5
- export { getQueryKey };
6
- //# sourceMappingURL=getQueryKey.native.js.map
5
+ export {
6
+ getQueryKey
7
+ };
8
+ //# sourceMappingURL=getQueryKey.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["hashString","getQueryKey","query","JSON","stringify","ast"],"sources":["../../../src/zero/getQueryKey.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,UAAA,QAAkB;AAEpB,SAASC,YAAYC,KAAA,EAA6B;EACvD,OAAOF,UAAA,CAAWG,IAAA,CAAKC,SAAA,CAAUF,KAAA,CAAMG,GAAG,CAAC;AAC7C","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/zero/Users/n8/one/packages/one/src/zero/getQueryKey.ts"],
4
+ "mappings": "AAAA,SAASA,kBAAkB;AAEpB,SAASC,YAAYC,OAAmB;AAC7C,SAAOF,WAAWG,KAAKC,UAAUF,MAAMG,GAAG,CAAA;AAC5C;",
5
+ "names": ["hashString", "getQueryKey", "query", "JSON", "stringify", "ast"]
6
+ }
@@ -1,5 +1,7 @@
1
1
  function isZeroQuery(obj) {
2
2
  return !(!obj || typeof obj != "object" || !obj.ast || !obj.ast.table);
3
3
  }
4
- export { isZeroQuery };
5
- //# sourceMappingURL=isZeroQuery.native.js.map
4
+ export {
5
+ isZeroQuery
6
+ };
7
+ //# sourceMappingURL=isZeroQuery.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["isZeroQuery","obj","ast","table"],"sources":["../../../src/zero/isZeroQuery.ts"],"sourcesContent":[null],"mappings":"AACO,SAASA,YAAYC,GAAA,EAAmB;EAG7C,OAFI,GAACA,GAAA,IACD,OAAOA,GAAA,IAAQ,YACf,CAACA,GAAA,CAAIC,GAAA,IAAO,CAACD,GAAA,CAAIC,GAAA,CAAIC,KAAA;AAE3B","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/zero/Users/n8/one/packages/one/src/zero/isZeroQuery.ts"],
4
+ "mappings": "AACO,SAASA,YAAYC,KAAQ;AAGlC,SAFI,GAACA,OACD,OAAOA,OAAQ,YACf,CAACA,IAAIC,OAAO,CAACD,IAAIC,IAAIC;AAE3B;",
5
+ "names": ["isZeroQuery", "obj", "ast", "table"]
6
+ }
@@ -1,11 +1,10 @@
1
1
  async function resolveZeroQuery(query) {
2
- var view = query.materialize(),
3
- tm = setTimeout(function () {
4
- console.warn(" Warning: query slow to resolve, ensure Zero server is running", JSON.stringify(query.ast, null, 2));
5
- }, 2e3);
6
- return new Promise(function (res, rej) {
2
+ var view = query.materialize(), tm = setTimeout(function() {
3
+ console.warn(" Warning: query slow to resolve, ensure Zero server is running", JSON.stringify(query.ast, null, 2));
4
+ }, 2e3);
5
+ return new Promise(function(res, rej) {
7
6
  try {
8
- var unsubscribe = view.addListener(function (snapshot) {
7
+ var unsubscribe = view.addListener(function(snapshot) {
9
8
  unsubscribe(), clearTimeout(tm), res(snapshot);
10
9
  });
11
10
  view.hydrate();
@@ -14,5 +13,7 @@ async function resolveZeroQuery(query) {
14
13
  }
15
14
  });
16
15
  }
17
- export { resolveZeroQuery };
18
- //# sourceMappingURL=resolveQuery.native.js.map
16
+ export {
17
+ resolveZeroQuery
18
+ };
19
+ //# sourceMappingURL=resolveQuery.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["resolveZeroQuery","query","view","materialize","tm","setTimeout","console","warn","JSON","stringify","ast","Promise","res","rej","unsubscribe","addListener","snapshot","clearTimeout","hydrate","err"],"sources":["../../../src/zero/resolveQuery.ts"],"sourcesContent":[null],"mappings":"AAGA,eAAsBA,iBAAiBC,KAAA,EAA4B;EACjE,IAAAC,IAAM,GAAAD,KAAO,CAAAE,WAAM;IAAYC,EAGzB,GAAAC,UAAK,aAAiB;MAC1BC,OAAA,CAAQC,IAAA,mEAAAC,IAAA,CAAAC,SAAA,CAAAR,KAAA,CAAAS,GAAA;IAAA,MACN;EAAA,OACA,IAAKC,OAAA,CAAU,UAAMC,GAAK,EAAAC,GAAM,EAAC;IACnC;MACC,IAAIC,WAAA,GAAAZ,IAAA,CAAAa,WAAA,WAAAC,QAAA;QAEPF,WAAW,EAAQ,EAACG,YAAa,CAAAb,EAAA,GAAAQ,GAAA,CAAAI,QAAA;MAC/B,EAAI;MACFd,IAAA,CAAAgB,OAAM;IACJ,SAAAC,GAAA;MAGFF,YAAC,CAAAb,EAAA,GAAAS,GAAA,CAAAM,GAAA;IAED;EAAa,EACf;AACE;AACO,SAEXnB,gBAAC","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/zero/Users/n8/one/packages/one/src/zero/resolveQuery.ts"],
4
+ "mappings": "AAGA,eAAsBA,iBAAiBC,OAAY;AACjD,MAAMC,OAAOD,MAAME,YAAW,GAGxBC,KAAKC,WAAW,WAAA;AACpBC,YAAQC,KACN,kEACAC,KAAKC,UAAUR,MAAMS,KAAK,MAAM,CAAA,CAAA;EAEpC,GAAG,GAAA;AAEH,SAAO,IAAIC,QAAQ,SAACC,KAAKC,KAAAA;AACvB,QAAI;AACF,UAAMC,cAAcZ,KAAKa,YAAY,SAACC,UAAAA;AACpCF,oBAAAA,GACAG,aAAab,EAAAA,GACbQ,IAAII,QAAAA;MACN,CAAA;AAEAd,WAAKgB,QAAO;IACd,SAASC,KAAK;AACZF,mBAAab,EAAAA,GACbS,IAAIM,GAAAA;IACN;EACF,CAAA;AACF;",
5
+ "names": ["resolveZeroQuery", "query", "view", "materialize", "tm", "setTimeout", "console", "warn", "JSON", "stringify", "ast", "Promise", "res", "rej", "unsubscribe", "addListener", "snapshot", "clearTimeout", "hydrate", "err"]
6
+ }
@@ -2,9 +2,11 @@ function subscribeToZeroQuery(query, onUpdate) {
2
2
  var view = query.materialize();
3
3
  view.hydrate();
4
4
  var unsubscribe = view.addListener(onUpdate);
5
- return function () {
5
+ return function() {
6
6
  unsubscribe(), view.destroy();
7
7
  };
8
8
  }
9
- export { subscribeToZeroQuery };
10
- //# sourceMappingURL=subscribeToQuery.native.js.map
9
+ export {
10
+ subscribeToZeroQuery
11
+ };
12
+ //# sourceMappingURL=subscribeToQuery.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["subscribeToZeroQuery","query","onUpdate","view","materialize","hydrate","unsubscribe","addListener","destroy"],"sources":["../../../src/zero/subscribeToQuery.ts"],"sourcesContent":[null],"mappings":"AAGO,SAASA,qBAAqBC,KAAA,EAAcC,QAAA,EAA0C;EAC3F,IAAAC,IAAM,GAAAF,KAAO,CAAAG,WAAM;EACnBD,IAAA,CAAKE,OAAA,CAAQ;EACb,IAAAC,WAAM,GAAAH,IAAc,CAAAI,WAAK,CAAAL,QAAY;EACrC,OAAO,YAAM;IACXI,WAAA,CAAY,GACZH,IAAA,CAAKK,OAAA,CAAQ;EACf;AACF","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/zero/Users/n8/one/packages/one/src/zero/subscribeToQuery.ts"],
4
+ "mappings": "AAGO,SAASA,qBAAqBC,OAAcC,UAA4B;AAC7E,MAAMC,OAAOF,MAAMG,YAAW;AAC9BD,OAAKE,QAAO;AACZ,MAAMC,cAAcH,KAAKI,YAAYL,QAAAA;AACrC,SAAO,WAAA;AACLI,gBAAAA,GACAH,KAAKK,QAAO;EACd;AACF;",
5
+ "names": ["subscribeToZeroQuery", "query", "onUpdate", "view", "materialize", "hydrate", "unsubscribe", "addListener", "destroy"]
6
+ }
@@ -1,2 +1 @@
1
-
2
- //# sourceMappingURL=types.native.js.map
1
+ //# sourceMappingURL=types.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "mappings": "",
5
+ "names": []
6
+ }
@@ -1,21 +1,21 @@
1
1
  import { useRef } from "react";
2
- import { getQueryKey } from "./getQueryKey.native.js";
3
- import "./resolveQuery.native.js";
4
- import { useQuery as useQueryZero } from "./useQueryZero.native.js";
5
- var clientInitialData = globalThis.__vxrnPostRenderData__,
6
- serverQueryData = {};
2
+ import { getQueryKey } from "./getQueryKey";
3
+ import "./resolveQuery";
4
+ import { useQuery as useQueryZero } from "./useQueryZero";
5
+ var clientInitialData = globalThis.__vxrnPostRenderData__, serverQueryData = {};
7
6
  globalThis.__vxrnServerData__ = serverQueryData;
8
- var useQuery = function (query) {
9
- var enable = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0,
10
- snapshot = useQueryZero(query, enable),
11
- queryIdRef = useRef();
7
+ var useQuery = function(query) {
8
+ var enable = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, snapshot = useQueryZero(query, enable), queryIdRef = useRef();
12
9
  query && !queryIdRef.current && (queryIdRef.current = getQueryKey(query));
13
10
  var queryId = queryIdRef.current || "";
14
11
  if (0) {
15
12
  var promise, value;
16
- if (!promise) var promise1;
13
+ if (!promise)
14
+ var promise1;
17
15
  }
18
16
  return clientInitialData && !snapshot ? clientInitialData[queryId] || [] : snapshot || [];
19
17
  };
20
- export { useQuery };
21
- //# sourceMappingURL=useQuery.native.js.map
18
+ export {
19
+ useQuery
20
+ };
21
+ //# sourceMappingURL=useQuery.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["useRef","getQueryKey","useQuery","useQueryZero","clientInitialData","globalThis","__vxrnPostRenderData__","serverQueryData","__vxrnServerData__","query","enable","arguments","length","snapshot","queryIdRef","current","queryId","promise","value","promise1"],"sources":["../../../src/zero/useQuery.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,MAAA,QAAc;AACvB,SAASC,WAAA,QAAmB;AAC5B,iCAAS;AACT,SAASC,QAAA,IAAYC,YAAA,QAAoB;AAEzC,IAAIC,iBAAA,GAAmCC,UAAA,C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A;EAkBV;AAEA,SAAIE,qBAAqB,CAACV,WACjBU,kBAAkBJ,OAAAA,KAAY,CAAA,IAGhCN,YAAY,CAAA;AACrB;",
5
+ "names": ["useRef", "getQueryKey", "useQuery", "useQueryZero", "clientInitialData", "globalThis", "serverQueryData", "useQuery", "query", "enable", "snapshot", "useQueryZero", "queryIdRef", "useRef", "current", "getQueryKey", "queryId", "process", "promise", "value", "clientInitialData"]
6
+ }
@@ -1,24 +1,28 @@
1
1
  import { useLayoutEffect, useState } from "react";
2
2
  function useQuery(q) {
3
- var enable = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0,
4
- queryImpl = q,
5
- [snapshot, setSnapshot] = useState(void 0),
6
- [, setView] = useState(void 0);
7
- return useLayoutEffect(function () {
8
- if (enable) {
9
- var view = q.materialize();
10
- setView(view);
11
- var unsubscribe = view.addListener(function (snapshot2) {
12
- setSnapshot(structuredClone(snapshot2));
13
- });
14
- return view.hydrate(), function () {
15
- unsubscribe(), view.destroy();
3
+ var enable = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, queryImpl = q, [snapshot, setSnapshot] = useState(void 0), [, setView] = useState(void 0);
4
+ return useLayoutEffect(
5
+ function() {
6
+ if (enable) {
7
+ var view = q.materialize();
8
+ setView(view);
9
+ var unsubscribe = view.addListener(function(snapshot2) {
10
+ setSnapshot(structuredClone(snapshot2));
11
+ });
12
+ return view.hydrate(), function() {
13
+ unsubscribe(), view.destroy();
14
+ };
15
+ }
16
+ return setSnapshot(queryImpl.singular ? void 0 : []), setView(void 0), function() {
16
17
  };
17
- }
18
- return setSnapshot(queryImpl.singular ? void 0 : []), setView(void 0), function () {};
19
- },
20
- //
21
- [JSON.stringify(enable ? q.ast : null)]), snapshot;
18
+ },
19
+ //
20
+ [
21
+ JSON.stringify(enable ? q.ast : null)
22
+ ]
23
+ ), snapshot;
22
24
  }
23
- export { useQuery };
24
- //# sourceMappingURL=useQueryZero.native.js.map
25
+ export {
26
+ useQuery
27
+ };
28
+ //# sourceMappingURL=useQueryZero.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["useLayoutEffect","useState","useQuery","q","enable","arguments","length","queryImpl","snapshot","setSnapshot","setView","view","materialize","unsubscribe","addListener","snapshot2","structuredClone","hydrate","destroy","singular"],"sources":["../../../src/zero/useQueryZero.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAA,EAAiBC,QAAA,QAAgB;AASnC,SAASC,SACdC,CAAA,EACA;EAEA,IAAAC,MAAM,GAAAC,SAEC,CAAAC,MAAA,GAAU,KAAAD,SAAW,CAAI,YAAyB,IAAsCA,SACtF,GAAO,IAAI;IAAAE,SAAgD,GAASJ,CAAA;IAAA,CAAAK,QAAA,EAAAC,WAAA,IAAAR,QAAA;IAAA,GAAAS,OAAA,IAAAT,QAAA;EAE7E,OAAAD,eAAA,CACE,YAAI;IACF,IAAAI,MAAM;MACN,IAAAO,IAAQ,GAAIR,CAAA,CAAAS,WAAA;MACZF,OAAM,CAAAC,IAAA;MACJ,IAAAE,WAAY,GAAAF,IAAA,CAAAG,WAAgB,WAA2BC,SAAA;QACxDN,WAAA,CAAAO,eAAA,CAAAD,SAAA;MACD;MAEE,OAAAJ,IAAA,CAAYM,OACZ,CAAK,eAAQ;QACfJ,WAAA,IAAAF,IAAA,CAAAO,OAAA;MACF;IACA;IAIA,OAAAT,WAAA,CAAAF,SAAA,CAAAY,QAAA,iBAAAT,OAAA,uBACE;EAGN","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/zero/Users/n8/one/packages/one/src/zero/useQueryZero.ts"],
4
+ "mappings": "AAAA,SAASA,iBAAiBC,gBAAgB;AASnC,SAASC,SACdC,GAA0B;MAC1BC,SAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAAS,IAEHC,YAAYF,GAEZ,CAACG,UAAUC,WAAAA,IAAeN,SAAyBO,MAAAA,GACnD,CAAA,EAAGC,OAAAA,IAAWR,SAAgDO,MAAAA;AAEpER;IAAgB,WAAA;AACd,UAAII,QAAQ;AACV,YAAMM,OAAOP,EAAEQ,YAAW;AAC1BF,gBAAQC,IAAAA;AACR,YAAME,cAAcF,KAAKG,YAAY,SAACP,WAAAA;AACpCC,sBAAYO,gBAAgBR,SAAAA,CAAAA;QAC9B,CAAA;AACAI,oBAAKK,QAAO,GACL,WAAA;AACLH,sBAAAA,GACAF,KAAKM,QAAO;QACd;MACF;AACAT,yBAAaF,UAAUY,WAAWT,SAAY,CAAA,CAAE,GAChDC,QAAQD,MAAAA,GACD,WAAA;MAEP;IACF;;IAAG;MAACU,KAAKC,UAAUf,SAAUD,EAA8BiB,MAAM,IAAA;;EAAM,GAEhEd;AACT;",
5
+ "names": ["useLayoutEffect", "useState", "useQuery", "q", "enable", "queryImpl", "snapshot", "setSnapshot", "undefined", "setView", "view", "materialize", "unsubscribe", "addListener", "structuredClone", "hydrate", "destroy", "singular", "JSON", "stringify", "ast"]
6
+ }
@@ -1,5 +1,9 @@
1
- import { useQuery } from "./zero/useQuery.native.js";
2
- import { resolveZeroQuery } from "./zero/resolveQuery.native.js";
3
- import { isZeroQuery } from "./zero/isZeroQuery.native.js";
4
- export { isZeroQuery, resolveZeroQuery, useQuery };
5
- //# sourceMappingURL=zero.native.js.map
1
+ import { useQuery } from "./zero/useQuery";
2
+ import { resolveZeroQuery } from "./zero/resolveQuery";
3
+ import { isZeroQuery } from "./zero/isZeroQuery";
4
+ export {
5
+ isZeroQuery,
6
+ resolveZeroQuery,
7
+ useQuery
8
+ };
9
+ //# sourceMappingURL=zero.js.map