one 1.1.314 → 1.1.316

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. package/dist/cjs/cleanUrl.cjs.map +1 -1
  2. package/dist/cjs/cleanUrl.native.js.map +1 -1
  3. package/dist/cjs/createHandleRequest.cjs +1 -1
  4. package/dist/cjs/createHandleRequest.cjs.map +1 -1
  5. package/dist/cjs/createHandleRequest.native.js +1 -1
  6. package/dist/cjs/createHandleRequest.native.js.map +2 -2
  7. package/dist/cjs/views/PreloadLinks.cjs +11 -5
  8. package/dist/cjs/views/PreloadLinks.cjs.map +1 -1
  9. package/dist/cjs/vite/one.cjs +5 -3
  10. package/dist/cjs/vite/one.cjs.map +1 -1
  11. package/dist/cjs/vite/one.native.js +9 -8
  12. package/dist/cjs/vite/one.native.js.map +1 -1
  13. package/dist/esm/cleanUrl.js.map +1 -1
  14. package/dist/esm/cleanUrl.mjs.map +1 -1
  15. package/dist/esm/cleanUrl.native.js.map +1 -1
  16. package/dist/esm/createHandleRequest.js +1 -1
  17. package/dist/esm/createHandleRequest.js.map +1 -1
  18. package/dist/esm/createHandleRequest.mjs +1 -1
  19. package/dist/esm/createHandleRequest.mjs.map +1 -1
  20. package/dist/esm/createHandleRequest.native.js +1 -1
  21. package/dist/esm/createHandleRequest.native.js.map +2 -2
  22. package/dist/esm/views/PreloadLinks.js +17 -8
  23. package/dist/esm/views/PreloadLinks.js.map +1 -1
  24. package/dist/esm/views/PreloadLinks.mjs +11 -5
  25. package/dist/esm/views/PreloadLinks.mjs.map +1 -1
  26. package/dist/esm/vite/one.js +9 -8
  27. package/dist/esm/vite/one.js.map +1 -1
  28. package/dist/esm/vite/one.mjs +5 -3
  29. package/dist/esm/vite/one.mjs.map +1 -1
  30. package/dist/esm/vite/one.native.js +9 -8
  31. package/dist/esm/vite/one.native.js.map +1 -1
  32. package/package.json +7 -7
  33. package/src/cleanUrl.ts +0 -1
  34. package/src/createHandleRequest.ts +0 -1
  35. package/src/views/PreloadLinks.tsx +24 -11
  36. package/src/vite/one.ts +4 -6
  37. package/types/cleanUrl.d.ts.map +1 -1
  38. package/types/views/PreloadLinks.d.ts.map +1 -1
  39. package/types/vite/one.d.ts.map +1 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/cleanUrl.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAMO,wBACP,gBAAuB,qBACvB,sBAA6B;AAE7B,SAAS,SAAS,MAAc;AAC9B,aACE,kCAAa,IAAI,EACd,WAAW,KAAK,GAAG,EAEnB,QAAQ,MAAM,EAAE;AAEvB;AAEA,MAAM,WAAW,OAAO,SAAW,KAC7B,gBAAgB,eAAW,sBAAO,IAAI;AAErC,SAAS,eAAe,aAAqB;AAClD,SAAO,GAAG,aAAa,WAAW,SAAS,YAAY,MAAM,CAAC,CAAC,CAAC,GAAG,mCAAkB;AACvF;AAEO,SAAS,cACd,aAEA,aAAa,2BACb;AACA,QAAM,UAAU,iBAAa,sBAAO,IAAI,IAClC,UAAU,QAAQ,IAAI,aAAa,gBAAgB,UAAU,IAE7D,iBAAiB,IAAI;AAAA,IACzB;AAAA,IACA;AAAA;AAAA,EACF;AAEA,SAAO,GAAG,OAAO,GAAG,OAAO,WAAW,SAAS,eAAe,SAAS,MAAM,CAAC,CAAC,CAAC,GAAG,kCAAiB;AACtG;AAEO,SAAS,sBAAsB,YAAoB;AACxD,SAAO,WACJ,QAAQ,0CAAyB,EAAE,EACnC,QAAQ,sBAAsB,EAAE,EAChC,WAAW,MAAM,GAAG;AACzB;",
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAKO,wBACP,gBAAuB,qBACvB,sBAA6B;AAE7B,SAAS,SAAS,MAAc;AAC9B,aACE,kCAAa,IAAI,EACd,WAAW,KAAK,GAAG,EAEnB,QAAQ,MAAM,EAAE;AAEvB;AAEA,MAAM,WAAW,OA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leanUrl", "path", "removeSearch", "replaceAll", "replace", "isClient", "window", "clientSideURL", "getURL", "getPreloadPath", "currentPath", "slice", "PRELOAD_JS_POSTFIX", "getLoaderPath", "includeUrl", "isNative", "baseURL", "devPath", "process", "env", "NODE_ENV", "currentPathUrl", "URL", "pathname", "LOADER_JS_POSTFIX", "getPathFromLoaderPath", "loaderPath", "LOADER_JS_POSTFIX_REGEX"]
6
6
  }
@@ -138,7 +138,7 @@ function createHandleRequest(options, handlers) {
138
138
  function getLoaderParams(url, config) {
139
139
  const params = {},
140
140
  match = new RegExp(config.workingRegex).exec(url.pathname);
141
- if (console.log("getting loader params", url), match?.groups) for (const [key, value] of Object.entries(match.groups)) {
141
+ if (match?.groups) for (const [key, value] of Object.entries(match.groups)) {
142
142
  const namedKey = config.routeKeys[key];
143
143
  params[namedKey] = value;
144
144
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/createHandleRequest.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAsC,uBACtC,mBAAoE,wBAEpE,oBAA2B,+BAC3B,8BAAqC,yCACrC,qBAA4B;AAYrB,SAAS,oBACd,SACA,UAKA;AACA,QAAM,eAAW,gCAAY;AAC7B,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,oBAAoB;AAGtC,QAAM,eACJ,SAAS,UAAU,OAAO,CAAC,KAAK,SAC9B,IAAI,IAAI,IAAI,IAAI,EAAE,GAAG,KAAK,eAAe,IAAI,OAAO,IAAI,UAAU,EAAE,GAC7D,MACN,CAAC,CAAC,GAED,gBAAgB,OAAO,OAAO,YAAY,GAK1C,iBAAiB,CAAC,GAGlB,aAAa,SAAS,WAAW,IAAI,CAAC,WAAW;AAAA,IACrD,GAAG;AAAA,IACH,cAAc,IAAI,OAAO,MAAM,UAAU;AAAA,EAC3C,EAAE;AAEF,SAAO;AAAA,IACL;AAAA,IACA,SAAS,eAA6B,SAAmD;A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K,QAAQ;AACjC,SAAK,QACE,OAAO;AAAA,IACZ,OAAO,QAAQ,MAAM,SAAS,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,OAAO,MAAM,SAAS,GAAG,CAAC,CAAC;AAAA,EACpF,IAHmB,CAAC;AAItB;",
5
5
  "names": []
6
6
  }
@@ -158,7 +158,7 @@ function createHandleRequest(options, handlers) {
158
158
  }
159
159
  function getLoaderParams(url, config) {
160
160
  var params = {}, match = new RegExp(config.workingRegex).exec(url.pathname);
161
- if (console.log("getting loader params", url), match != null && match.groups) {
161
+ if (match != null && match.groups) {
162
162
  var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
163
163
  try {
164
164
  for (var _iterator = Object.entries(match.groups)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Users/n8/one/packages/one/src/createHandleRequest.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;;;;;sBAAsC,uBACtC,mBAAoE,wBAEpE,oBAA2B,+BAC3B,8BAAqC,yCACrC,qBAA4B;AAYrB,SAASA,oBACdC,SACAC,UAIC;AAED,MAAMC,eAAWC,gCAAAA;AACjB,MAAI,CAACD;AACH,UAAM,IAAIE,MAAM,oBAAoB;AAGtC,MAAMC,eACJH,SAASI,UAAUC,OAAO,SAACC,KAAKC,KAAAA;AAC9BD,eAAIC,IAAIC,IAAI,IAAI;MAAE,GAAGD;MAAKE,eAAe,IAAIC,OAAOH,IAAII,UAAU;IAAE,GAC7DL;EACT,GAAG,CAAC,CAAA,GAEAM,gBAAgBC,OAAOC,OAAOX,YAAAA,GAK9BY,iBAAiB,CAAC,GAGlBC,aAAahB,SAASgB,WAAWC,IAAI,SAACC,OAAAA;WAAW;MACrD,GAAGA;MACHC,cAAc,IAAIT,OAAOQ,MAAMP,UAAU;IAC3C;;AAEA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QAAQxD,MAAM4D,SAAS,EAAE7D,IAAI,SAAA,OAAA;QAAC,CAAC0D,KAAKC,KAAAA,IAAM,OAAaN;WAAR;MAACM;OAAON,gBAAAA,MAAMG,YAAM,QAAZH,kBAAAA,SAAAA,SAAAA,cAAeK,GAAAA;;QAF5D,CAAC;AAItB;",
5
- "names": ["createHandleRequest", "options", "handlers", "manifest", "getManifest", "Error", "apiRoutesMap", "apiRoutes", "reduce", "acc", "cur", "page", "compiledRegex", "RegExp", "namedRegex", "apiRoutesList", "Object", "values", "activeRequests", "pageRoutes", "map", "route", "workingRegex", "handler", "request", "urlString", "url", "URL", "headers", "get", "pathname", "search", "process", "env", "NODE_ENV", "startsWith", "handleAPI", "apiRoute", "find", "regex", "test", "params", "getRouteParams", "loaderProps", "path", "err", "isResponse", "method", "handleLoader", "isClientRequestingNewRoute", "endsWith", "LOADER_JS_POSTFIX_UNCACHED", "originalUrl", "getPathFromLoaderPath", "finalUrl", "origin", "file", "console", "info", "Headers", "set", "loaderResponse", "getLoaderParams", "Response", "error", "routes", "handleSSR", "promise", "reject", "resolve", "promiseWithResolvers", "ssrResponse", "config", "match", "exec", "log", "groups", "entries", "key", "value", "namedKey", "routeKeys", "fromEntries"]
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;;;;;sBAAsC,uBACtC,mBAAoE,wBAEpE,oBAA2B,+BAC3B,8BAAqC,yCACrC,qBAA4B;AAYrB,SAASA,oBACdC,SACAC,UAIC;AAED,MAAMC,eAAWC,gCAAAA;AACjB,MAAI,CAACD;AACH,UAAM,IAAIE,MAAM,oBAAoB;AAGtC,MAAMC,eACJH,SAASI,UAAUC,OAAO,SAACC,KAAKC,KAAAA;AAC9BD,eAAIC,IAAIC,IAAI,IAAI;MAAE,GAAGD;MAAKE,eAAe,IAAIC,OAAOH,IAAII,UAAU;IAAE,GAC7DL;EACT,GAAG,CAAC,CAAA,GAEAM,gBAAgBC,OAAOC,OAAOX,YAAAA,GAK9BY,iBAAiB,CAAC,GAG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QAAQlC,MAAMmC,KAAK5C,QAAAA;AACzB,SAAK2C,QACEzD,OAAOiE,YACZjE,OAAO4D,QAAQvD,MAAM2D,SAAS,EAAE5D,IAAI,SAAA,OAAA;QAAC,CAACyD,KAAKC,KAAAA,IAAM,OAAaL;WAAR;MAACK;OAAOL,gBAAAA,MAAME,YAAM,QAAZF,kBAAAA,SAAAA,SAAAA,cAAeI,GAAAA;;QAF5D,CAAC;AAItB;",
5
+ "names": ["createHandleRequest", "options", "handlers", "manifest", "getManifest", "Error", "apiRoutesMap", "apiRoutes", "reduce", "acc", "cur", "page", "compiledRegex", "RegExp", "namedRegex", "apiRoutesList", "Object", "values", "activeRequests", "pageRoutes", "map", "route", "workingRegex", "handler", "request", "urlString", "url", "URL", "headers", "get", "pathname", "search", "process", "env", "NODE_ENV", "startsWith", "handleAPI", "apiRoute", "find", "regex", "test", "params", "getRouteParams", "loaderProps", "path", "err", "isResponse", "method", "handleLoader", "isClientRequestingNewRoute", "endsWith", "LOADER_JS_POSTFIX_UNCACHED", "originalUrl", "getPathFromLoaderPath", "finalUrl", "origin", "file", "console", "info", "Headers", "set", "loaderResponse", "getLoaderParams", "Response", "error", "routes", "handleSSR", "promise", "reject", "resolve", "promiseWithResolvers", "ssrResponse", "config", "match", "exec", "groups", "entries", "key", "value", "namedKey", "routeKeys", "fromEntries"]
6
6
  }
@@ -28,13 +28,19 @@ var import_react = require("react"),
28
28
  import_getURL = require("../getURL.cjs");
29
29
  const import_meta = {};
30
30
  function PreloadLinks() {
31
- return import_meta.env.PROD && (0, import_react.useEffect)(() => {
32
- const url = (0, import_getURL.getURL)();
33
- document.addEventListener("mouseover", e => {
31
+ return typeof window < "u" && import_meta.env.PROD && (0, import_react.useEffect)(() => {
32
+ const url = (0, import_getURL.getURL)(),
33
+ controller = new AbortController();
34
+ return document.addEventListener("mouseover", e => {
34
35
  let target = e.target;
35
- if (!(target instanceof HTMLElement) || (target = target instanceof HTMLAnchorElement ? target : target.parentElement, !(target instanceof HTMLAnchorElement))) return;
36
+ if (!(target instanceof HTMLElement) || (target = target instanceof HTMLAnchorElement ? target : target.closest("a"), !(target instanceof HTMLAnchorElement))) return;
36
37
  const href = target.getAttribute("href");
37
38
  (href?.[0] === "/" || href?.[0].startsWith(url)) && (0, import_router.preloadRoute)(href.replace(url, ""));
38
- });
39
+ }, {
40
+ passive: !0,
41
+ signal: controller.signal
42
+ }), () => {
43
+ controller.abort();
44
+ };
39
45
  }, []), null;
40
46
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/PreloadLinks.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0B,kBAC1B,gBAA6B,6BAC7B,gBAAuB;AAFvB;AAIO,SAAS,eAAe;AAG7B,SAAI,YAAY,IAAI,YAClB,wBAAU,MAAM;AACd,UAAM,UAAM,sBAAO;AACnB,aAAS,iBAAiB,aAAa,CAAC,MAAM;AAC5C,UAAI,SAAS,EAAE;AAGf,UAFI,EAAE,kBAAkB,iBACxB,SAAS,kBAAkB,oBAAoB,SAAS,OAAO,eAC3D,EAAE,kBAAkB,oBAAoB;AAC5C,YAAM,OAAO,OAAO,aAAa,MAAM;AACvC,OAAI,OAAO,CAAC,MAAM,OAAO,OAAO,CAAC,EAAE,WAAW,GAAG,UAE/C,4BAAa,KAAK,QAAQ,KAAK,EAAE,CAAC;AAAA,IAEtC,CAAC;AAAA,EACH,GAAG,CAAC,CAAC,GAGA;AACT;",
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0B,kBAC1B,gBAA6B,6BAC7B,gBAAuB;AAFvB;AAIO,SAAS,eAAe;AAG7B,SAAI,OAAO,SAAW,OAAe,YAAY,IAAI,YACnD,wBAAU,MAAM;AACd,UAAM,UAAM,sBAAO,GACb,aAAa,IAAI,gBAAgB;AAEvC,oBAAS;AAAA,MACP;AAAA,MACA,CAAC,MAAM;AACL,YAAI,SAAS,EAAE;AAGf,YAFI,EAAE,kBAAkB,iBACxB,SAAS,kBAAkB,oBAAoB,SAAS,OAAO,QAAQ,GAAG,GACtE,EAAE,kBAAkB,oBAAoB;AAC5C,cAAM,OAAO,OAAO,aAAa,MAAM;AACvC,SAAI,OAAO,CAAC,MAAM,OAAO,OAAO,CAAC,EAAE,WAAW,GAAG,UAE/C,4BAAa,KAAK,QAAQ,KAAK,EAAE,CAAC;AAAA,MAEtC;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,QAAQ,WAAW;AAAA,MACrB;AAAA,IACF,GAEO,MAAM;AACX,iBAAW,MAAM;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,CAAC,GAGA;AACT;",
5
5
  "names": []
6
6
  }
@@ -208,10 +208,12 @@ function one(options = {}) {
208
208
  }), {
209
209
  name: "one-define-environment",
210
210
  config() {
211
- if (options.app?.key) return {
211
+ return {
212
212
  define: {
213
- "process.env.ONE_APP_NAME": JSON.stringify(options.app.key),
214
- "import.meta.env.ONE_APP_NAME": JSON.stringify(options.app.key),
213
+ ...(options.app?.key && {
214
+ "process.env.ONE_APP_NAME": JSON.stringify(options.app.key),
215
+ "import.meta.env.ONE_APP_NAME": JSON.stringify(options.app.key)
216
+ }),
215
217
  "process.env.ONE_CACHE_KEY": JSON.stringify(import_constants.CACHE_KEY),
216
218
  "import.meta.env.ONE_CACHE_KEY": JSON.stringify(import_constants.CACHE_KEY)
217
219
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/vite/one.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA4B,0BAC5B,qBAAmB,oCACnB,mBAAuC,kCACvC,cAAoF,iBACpF,6BAA0B,4CAC1B,cAA6E,iBAC7E,mBAA0B,yBAC1B,0BAAO,gCACP,qBAA4B,iCAC5B,+BAAsC,oCACtC,gCAA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
5
  "names": ["events", "tsconfigPaths", "path"]
6
6
  }
@@ -201,15 +201,16 @@ function one() {
201
201
  name: "one-define-environment",
202
202
  config() {
203
203
  var _options_app;
204
- if (!((_options_app = options.app) === null || _options_app === void 0) && _options_app.key)
205
- return {
206
- define: {
204
+ return {
205
+ define: {
206
+ ...((_options_app = options.app) === null || _options_app === void 0 ? void 0 : _options_app.key) && {
207
207
  "process.env.ONE_APP_NAME": JSON.stringify(options.app.key),
208
- "import.meta.env.ONE_APP_NAME": JSON.stringify(options.app.key),
209
- "process.env.ONE_CACHE_KEY": JSON.stringify(import_constants.CACHE_KEY),
210
- "import.meta.env.ONE_CACHE_KEY": JSON.stringify(import_constants.CACHE_KEY)
211
- }
212
- };
208
+ "import.meta.env.ONE_APP_NAME": JSON.stringify(options.app.key)
209
+ },
210
+ "process.env.ONE_CACHE_KEY": JSON.stringify(import_constants.CACHE_KEY),
211
+ "import.meta.env.ONE_CACHE_KEY": JSON.stringify(import_constants.CACHE_KEY)
212
+ }
213
+ };
213
214
  }
214
215
  },
215
216
  {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/one.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;qBAA4B,0BAC5B,qBAAmB,oCACnB,mBAAuC,kCACvC,cAAoF,iBACpF,6BAA0B,4CAC1B,cAA6E,iBAC7E,mBAA0B,yBAC1B,0BAAO,gCACP,qBAA4B,iCAC5B,+BAAsC,oCACtC,gCAAuC,qCACvC,wBAA+B,6BAC/B,+BAAsC,oCACtC,gCAAuC,qCAEvC,4BAAmD,iCACnD,0BAAiC;AAEjCA,mBAAAA,QAAOC,gBAAgB,GAAA;AAGvBC,WAAWC,wBAAwB;AAE5B,SAASC,MAAAA;MAAIC,UAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAA6B,CAAC,GAI5CA;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BAAuBF,GAAAA;UACtC;QACF;MACF;IACF;QAEAG,0CAAiB;MACfC,SAAS;QAACC;;IACZ,CAAA;;AAEJ;AAEA,IAAItG,aAAuC;AAE3C,eAAeuG,kBAAkBC,SAA2B;AAC1D,MAAI,CAACxG,YAAY;AACf,QAAI,CAACwG,QAAS,OAAM,IAAIC,MAAM,yCAAyC;AACvE,UAAMC,mBAAmBF,OAAAA;EAC3B;AACA,MAAI,CAACxG;AACH,UAAM,IAAIyG,MAAM,4BAA4B;AAE9C,SAAOzG;AACT;AAEA,eAAsB0G,mBAAmBF,SAA0B;AACjE,MAAMG,QAAQ,UAAMC,gCAAmB;IACrC1F,MAAM;IACNsF;EACF,CAAA;AACA,MAAI,CAACG;AACH,UAAM,IAAIF,MAAM,sBAAsBzD,QAAQ6D,IAAG,CAAA,kCAAoC;AAEvF,MAAMC,eAAeP,kBAAAA;AACrB,MAAI,CAACO;AACH,UAAM,IAAIL,MAAM,yCAAyC;AAE3D,SAAOK;AACT;",
5
5
  "names": ["events", "setMaxListeners", "globalThis", "__vxrnEnableNativeEnv", "one", "options", "oneOptions", "config", "ensureTSConfig", "optimizeDeps", "getOptimizeDeps", "optimizeIds", "include", "optimizeIdRegex", "RegExp", "map", "id", "replace", "join", "tsConfigPathsPlugin", "vxrnOptions", "getOptionsFilled", "clientEnvDefine", "loadEnv", "mode", "devAndProdPlugins", "name", "define", "Proxy", "configIncoming", "pathsConfig", "tsConfigPaths", "plugins", "flat", "some", "p", "tsconfigPaths", "configResolved", "resolveId", "get", "target", "key", "thisArg", "Reflect", "enforce", "resolve", "alias", "tslib", "resolvePath", "web", "defaultRenderMode", "JSON", "stringify", "setupFile", "process", "env", "NODE_ENV", "server", "url", "environments", "client", "ssr", "ios", "android", "zero", "TESTING", "REPLICACHE_VERSION", "ZERO_VERSION", "hotUpdate", "modules", "m", "relativePath", "path", "relative", "root", "rootDir", "split", "sep", "acceptedHmrExports", "Set", "__vxrnAddNativePlugins", "clientTreeShakePlugin", "__vxrnAddWebPluginsProd", "createFileSystemRouter", "generateTypesForRoutes", "fixDependenciesPlugin", "deps", "createVirtualEntry", "app", "CACHE_KEY", "sharedNativeConfig", "react", "applyToEnvironment", "environment", "isWebEnvironment", "importer", "shouldOptimize", "test", "absolutePath", "dirname", "webPath", "directoryPath", "existsAsync", "err", "console", "warn", "vitePluginSsrCss", "entries", "virtualEntryId", "getUserOneOptions", "command", "Error", "loadUserOneOptions", "found", "loadConfigFromFile", "cwd", "foundOptions"]
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/cleanUrl.ts"],
4
- "mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAE7B,SAAS,SAAS,MAAc;AAC9B,SACE,aAAa,IAAI,EACd,WAAW,KAAK,GAAG,EAEnB,QAAQ,MAAM,EAAE;AAEvB;AAEA,MAAM,WAAW,OAAO,SAAW,KAC7B,gBAAgB,WAAW,OAAO,IAAI;AAErC,SAAS,eAAe,aAAqB;AAClD,SAAO,GAAG,aAAa,WAAW,SAAS,YAAY,MAAM,CAAC,CAAC,CAAC,GAAG,kBAAkB;AACvF;AAEO,SAAS,cACd,aAEA,aAAa,UACb;AACA,QAAM,UAAU,aAAa,OAAO,IAAI,IAClC,UAAU,QAAQ,IAAI,aAAa,gBAAgB,UAAU,IAE7D,iBAAiB,IAAI;AAAA,IACzB;AAAA,IACA;AAAA;AAAA,EACF;AAEA,SAAO,GAAG,OAAO,GAAG,OAAO,WAAW,SAAS,eAAe,SAAS,MAAM,CAAC,CAAC,CAAC,GAAG,iBAAiB;AACtG;AAEO,SAAS,sBAAsB,YAAoB;AACxD,SAAO,WACJ,QAAQ,yBAAyB,EAAE,EACnC,QAAQ,sBAAsB,EAAE,EAChC,WAAW,MAAM,GAAG;AACzB;",
4
+ "mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAE7B,SAAS,SAAS,MAAc;AAC9B,SACE,aAAa,IAAI,EACd,WAAW,KAAK,GAAG,EAEnB,QAAQ,MAAM,EAAE;AAEvB;AAEA,MAAM,WAAW,OAAO,SAAW,KAC7B,gBAAgB,WAAW,OAAO,IAAI;AAErC,SAAS,eAAe,aAAqB;AAClD,SAAO,GAAG,aAAa,WAAW,SAAS,YAAY,MAAM,CAAC,CAAC,CAAC,GAAG,kBAAkB;AACvF;AAEO,SAAS,cACd,aAEA,aAAa,UACb;AACA,QAAM,UAAU,aAAa,OAAO,IAAI,IAClC,UAAU,QAAQ,IAAI,aAAa,gBAAgB,UAAU,IAE7D,iBAAiB,IAAI;AAAA,IACzB;AAAA,IACA;AAAA;AAAA,EACF;AAEA,SAAO,GAAG,OAAO,GAAG,OAAO,WAAW,SAAS,eAAe,SAAS,MAAM,CAAC,CAAC,CAAC,GAAG,iBAAiB;AACtG;AAEO,SAAS,sBAAsB,YAAoB;AACxD,SAAO,WACJ,QAAQ,yBAAyB,EAAE,EACnC,QAAQ,sBAAsB,EAAE,EAChC,WAAW,MAAM,GAAG;AACzB;",
5
5
  "names": []
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"names":["isNative","LOADER_JS_POSTFIX","LOADER_JS_POSTFIX_REGEX","PRELOAD_JS_POSTFIX","getURL","removeSearch","cleanUrl","path","replaceAll","replace","isClient","window","clientSideURL","getPreloadPath","currentPath","slice","getLoaderPath","includeUrl","baseURL","devPath","process","env","NODE_ENV","currentPathUrl","URL","pathname","getPathFromLoaderPath","loaderPath"],"sources":["../../src/cleanUrl.ts"],"sourcesContent":[null],"mappings":"AAAA,SACEA,QAAA,EACAC,iBAAA,EACAC,uBAAA,EAEAC,kBAAA,QACK;AACP,SAASC,MAAA,QAAc;AACvB,SAASC,YAAA,QAAoB;AAE7B,SAASC,SAASC,IAAA,EAAc;EAC9B,OACEF,YAAA,CAAaE,IAAI,EACdC,UAAA,CAAW,KAAK,GAAG,EAEnBC,OAAA,CAAQ,MAAM,EAAE;AAEvB;AAEA,MAAMC,QAAA,GAAW,OAAOC,MAAA,GAAW;EAC7BC,aAAA,GAAgBF,QAAA,GAAWN,MAAA,CAAO,IAAI;AAErC,SAASS,eAAeC,WAAA,EAAqB;EAClD,OAAO,GAAGF,aAAa,WAAWN,QAAA,CAASQ,WAAA,CAAYC,KAAA,CAAM,CAAC,CAAC,CAAC,GAAGZ,kBAAkB;AACvF;AAEO,SAASa,cACdF,WAAA,EAEAG,UAAA,GAAajB,QAAA,EACb;EACA,MAAMkB,OAAA,GAAUD,UAAA,GAAab,MAAA,CAAO,IAAI;IAClCe,OAAA,GAAUC,OAAA,CAAQC,GAAA,CAAIC,QAAA,KAAa,gBAAgB,UAAU;IAE7DC,cAAA,GAAiB,IAAIC,GAAA,CACzBV,WAAA,EACA;IAAA,iDACF;EAEA,OAAO,GAAGI,OAAO,GAAGC,OAAO,WAAWb,QAAA,CAASiB,cAAA,CAAeE,QAAA,CAASV,KAAA,CAAM,CAAC,CAAC,CAAC,GAAGd,iBAAiB;AACtG;AAEO,SAASyB,sBAAsBC,UAAA,EAAoB;EACxD,OAAOA,UAAA,CACJlB,OAAA,CAAQP,uBAAA,EAAyB,EAAE,EACnCO,OAAA,CAAQ,sBAAsB,EAAE,EAChCD,UAAA,CAAW,MAAM,GAAG;AACzB","ignoreList":[]}
1
+ {"version":3,"names":["isNative","LOADER_JS_POSTFIX","LOADER_JS_POSTFIX_REGEX","PRELOAD_JS_POSTFIX","getURL","removeSearch","cleanUrl","path","replaceAll","replace","isClient","window","clientSideURL","getPreloadPath","currentPath","slice","getLoaderPath","includeUrl","baseURL","devPath","process","env","NODE_ENV","currentPathUrl","URL","pathname","getPathFromLoaderPath","loaderPath"],"sources":["../../src/cleanUrl.ts"],"sourcesContent":[null],"mappings":"AAAA,SACEA,QAAA,EACAC,iBAAA,EACAC,uBAAA,EACAC,kBAAA,QACK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AAA,IAAajB,UAEPkB,UAAUD,aAAab,OAAAA,IAAW,IAClCe,UAAUC,QAAQC,IAAIC,aAAa,gBAAgB,UAAU,IAE7DC,iBAAiB,IAAIC,IACzBV,aACA,oBAAA;AAGF,SAAO,GAAGI,OAAAA,GAAUC,OAAAA,WAAkBb,SAASiB,eAAeE,SAASV,MAAM,CAAA,CAAA,CAAA,GAAMd,iBAAAA;AACrF;AAEO,SAASyB,sBAAsBC,YAAkB;AACtD,SAAOA,WACJlB,QAAQP,yBAAyB,EAAA,EACjCO,QAAQ,sBAAsB,EAAA,EAC9BD,WAAW,MAAM,GAAA;AACtB;",
5
5
  "names": ["isNative", "LOADER_JS_POSTFIX", "LOADER_JS_POSTFIX_REGEX", "PRELOAD_JS_POSTFIX", "getURL", "removeSearch", "cleanUrl", "path", "replaceAll", "replace", "isClient", "window", "clientSideURL", "getPreloadPath", "currentPath", "slice", "getLoaderPath", "includeUrl", "baseURL", "devPath", "process", "env", "NODE_ENV", "currentPathUrl", "URL", "pathname", "getPathFromLoaderPath", "loaderPath"]
6
6
  }
@@ -107,7 +107,7 @@ function createHandleRequest(options, handlers) {
107
107
  }
108
108
  function getLoaderParams(url, config) {
109
109
  const params = {}, match = new RegExp(config.workingRegex).exec(url.pathname);
110
- if (console.log("getting loader params", url), match?.groups)
110
+ if (match?.groups)
111
111
  for (const [key, value] of Object.entries(match.groups)) {
112
112
  const namedKey = config.routeKeys[key];
113
113
  params[namedKey] = value;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/createHandleRequest.ts"],
4
- "mappings": "AAAA,SAAS,6BAA6B;AACtC,SAAkC,kCAAkC;AAEpE,SAAS,kBAAkB;AAC3B,SAAS,4BAA4B;AACrC,SAAS,mBAAmB;AAYrB,SAAS,oBACd,SACA,UAKA;AACA,QAAM,WAAW,YAAY;AAC7B,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,oBAAoB;AAGtC,QAAM,eACJ,SAAS,UAAU,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CAAC,GAClC,QAAQ,IAAI,OAAO,OAAO,YAAY,EAAE,KAAK,IAAI,QAAQ;AAC/D,MAAI,OAAO;AACT,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,MAAM,MAAM,GAAG;AACvD,YAAM,WAAW,OAAO,UAAU,GAAG;AACrC,aAAO,QAAQ,IAAI;AAAA,IACrB;AAEF,SAAO;AACT;AAGA,SAAS,eAAe,UAAkB,OAA0B;AAElE,QAAM,QADQ,IAAI,OAAO,MAAM,UAAU,EACrB,KAAK,QAAQ;AACjC,SAAK,QACE,OAAO;AAAA,IACZ,OAAO,QAAQ,MAAM,SAAS,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,OAAO,MAAM,SAAS,GAAG,CAAC,CAAC;AAAA,EACpF,IAHmB,CAAC;AAItB;",
5
5
  "names": []
6
6
  }
@@ -113,7 +113,7 @@ function createHandleRequest(options, handlers) {
113
113
  function getLoaderParams(url, config) {
114
114
  const params = {},
115
115
  match = new RegExp(config.workingRegex).exec(url.pathname);
116
- if (console.log("getting loader params", url), match?.groups) for (const [key, value] of Object.entries(match.groups)) {
116
+ if (match?.groups) for (const [key, value] of Object.entries(match.groups)) {
117
117
  const namedKey = config.routeKeys[key];
118
118
  params[namedKey] = value;
119
119
  }
@@ -1 +1 @@
1
- {"version":3,"names":["getPathFromLoaderPath","LOADER_JS_POSTFIX_UNCACHED","isResponse","promiseWithResolvers","getManifest","createHandleRequest","options","handlers","manifest","Error","apiRoutesMap","apiRoutes","reduce","acc","cur","page","compiledRegex","RegExp","namedRegex","apiRoutesList","Object","values","activeRequests","pageRoutes","map","route","workingRegex","handler","request","urlString","url","URL","headers","get","pathname","search","process","env","NODE_ENV","startsWith","handleAPI","apiRoute","find","test","params","getRouteParams","loaderProps","path","err","method","handleLoader","endsWith","originalUrl","finalUrl","origin","file","console","info","Headers","set","loaderResponse","getLoaderParams","Response","error","routes","handleSSR","promise","reject","resolve","ssrResponse","config","match","exec","log","groups","key","value","entries","namedKey","routeKeys","fromEntries"],"sources":["../../src/createHandleRequest.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,qBAAA,QAA6B;AACtC,SAAkCC,0BAAA,QAAkC;AAEpE,SAASC,UAAA,QAAkB;AAC3B,SAASC,oBAAA,QAA4B;AACrC,SAASC,WAAA,QAAmB;AAYrB,SAASC,oBACdC,OAAA,EACAC,QAAA,EAKA;EACA,MAAMC,QAAA,GAAWJ,WAAA,CAAY;EAC7B,IAAI,CAACI,QAAA,EACH,MAAM,IAAIC,KAAA,CAAM,oBAAoB;EAGtC,MAAMC,YAAA,GACJF,QAAA,CAASG,SAAA,CAAUC,MAAA,CAAO,CAACC,GAAA,EAAKC,GAAA,MAC9BD,GAAA,CAAIC,GAAA,CAAIC,IAAI,IAAI;MAAE,GAAGD,GAAA;MAAKE,aAAA,EAAe,IAAIC,MAAA,CAAOH,GAAA,CAAII,UAAU;IAAE,GAC7DL,GAAA,GACN,CAAC,CAAC;IAEDM,aAAA,GAAgBC,MAAA,CAAOC,MAAA,CAAOX,YAAY;IAK1CY,cAAA,GAAiB,CAAC;IAGlBC,UAAA,GAAaf,QAAA,CAASe,UAAA,CAAWC,GAAA,CAAKC,KAAA,KAAW;MACrD,GAAGA,KAAA;MACHC,YAAA,EAAc,IAAIT,MAAA,CAAOQ,KAAA,CAAMP,UAAU;IAC3C,EAAE;EAEF,OAAO;IACLV,QAAA;IACAmB,OAAA,EAAS,eAAAA,CAA6BC,OAAA,EAAmD;MACvF,MAAMC,SAAA,GAAYD,OAAA,CAAQE,GAAA,IAAO;QAC3BA,GAAA,GAAM,IAAIC,GAAA,CACdF,SAAA,IAAa,IACbD,OAAA,CAAQI,OAAA,CAAQC,GAAA,CAAI,MAAM,IAAI,UAAUL,OAAA,CAAQI,OAAA,CAAQC,GAAA,CAAI,MAAM,CAAC,KAAK,EAC1E;QACM;UAAEC,QAAA;UAAUC;QAAO,IAAIL,GAAA;MAE7B,IAAIM,OAAA,CAAQC,GAA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_JS_POSTFIX_UNCACHED","isResponse","promiseWithResolvers","getManifest","createHandleRequest","options","handlers","manifest","Error","apiRoutesMap","apiRoutes","reduce","acc","cur","page","compiledRegex","RegExp","namedRegex","apiRoutesList","Object","values","activeRequests","pageRoutes","map","route","workingRegex","handler","request","urlString","url","URL","headers","get","pathname","search","process","env","NODE_ENV","startsWith","handleAPI","apiRoute","find","test","params","getRouteParams","loaderProps","path","err","method","handleLoader","endsWith","originalUrl","finalUrl","origin","file","console","info","Headers","set","loaderResponse","getLoaderParams","Response","error","routes","handleSSR","promise","reject","resolve","ssrResponse","config","match","exec","groups","key","value","entries","namedKey","routeKeys","fromEntries"],"sources":["../../src/createHandleRequest.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,qBAAA,QAA6B;AACtC,SAAkCC,0BAAA,QAAkC;AAEpE,SAASC,UAAA,QAAkB;AAC3B,SAASC,oBAAA,QAA4B;AACrC,SAASC,WAAA,QAAmB;AAYrB,SAASC,oBACdC,OAAA,EACAC,QAAA,EAKA;EACA,MAAMC,QAAA,GAAWJ,WAAA,CAAY;EAC7B,IAAI,CAACI,QAAA,EACH,MAAM,IAAIC,KAAA,CAAM,oBAAoB;EAGtC,MAAMC,YAAA,GACJF,QAAA,CAASG,SAAA,CAAUC,MAAA,CAAO,CAACC,GAAA,EAAKC,GAAA,MAC9BD,GAAA,CAAIC,GAAA,CAAIC,IAAI,IAAI;MAAE,GAAGD,GAAA;MAAKE,aAAA,EAAe,IAAIC,MAAA,CAAOH,GAAA,CAAII,UAAU;IAAE,GAC7DL,GAAA,GACN,CAAC,CAAC;IAEDM,aAAA,GAAgBC,MAAA,CAAOC,MAAA,CAAOX,YAAY;IAK1CY,cAAA,GAAiB,CAAC;IAGlBC,UAAA,GAAaf,QAAA,CAASe,UAAA,CAAWC,GAAA,CAAKC,KAAA,KAAW;MACrD,GAAGA,KAAA;MACHC,YAAA,EAAc,IAAIT,MAAA,CAAOQ,KAAA,CAAMP,UAAU;IAC3C,EAAE;E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BsD,IAAA,CAAKtC,QAAQ;EACjC,OAAKqC,KAAA,GACEnD,MAAA,CAAO2D,WAAA,CACZ3D,MAAA,CAAOwD,OAAA,CAAQnD,KAAA,CAAMqD,SAAS,EAAEtD,GAAA,CAAI,CAAC,CAACkD,GAAA,EAAKC,KAAK,MAAM,CAACA,KAAA,EAAOJ,KAAA,CAAME,MAAA,GAASC,GAAG,CAAC,CAAC,CACpF,IAHmB,CAAC;AAItB","ignoreList":[]}
@@ -142,7 +142,7 @@ function createHandleRequest(options, handlers) {
142
142
  }
143
143
  function getLoaderParams(url, config) {
144
144
  var params = {}, match = new RegExp(config.workingRegex).exec(url.pathname);
145
- if (console.log("getting loader params", url), match?.groups) {
145
+ if (match?.groups) {
146
146
  var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
147
147
  try {
148
148
  for (var _iterator = Object.entries(match.groups)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Users/n8/one/packages/one/src/createHandleRequest.ts"],
4
- "mappings": "AAAA,SAASA,6BAA6B;AACtC,SAAkCC,kCAAkC;AAEpE,SAASC,kBAAkB;AAC3B,SAASC,4BAA4B;AACrC,SAASC,mBAAmB;AAYrB,SAASC,oBACdC,SACAC,UAIC;AAED,MAAMC,WAAWJ,YAAAA;AACjB,MAAI,CAACI;AACH,UAAM,IAAIC,MAAM,oBAAoB;AAGtC,MAAMC,eACJF,SAASG,UAAUC,OAAO,SAACC,KAAKC,KAAAA;AAC9BD,eAAIC,IAAIC,IAAI,IAAI;MAAE,GAAGD;MAAKE,eAAe,IAAIC,OAAOH,IAAII,UAAU;IAAE,GAC7DL;EACT,GAAG,CAAC,CAAA,GAEAM,gBAAgBC,OAAOC,OAAOX,YAAAA,GAK9BY,iBAAiB,CAAC,GAGlBC,aAAaf,SAASe,WAAWC,IAAI,SAACC,O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MAAM+B,KAAKxC,QAAAA;AACzB,SAAKuC,QACErD,OAAO8D,YACZ9D,OAAOyD,QAAQpD,MAAMwD,SAAS,EAAEzD,IAAI,SAAA,OAAA;QAAC,CAACsD,KAAKC,KAAAA,IAAM,OAAaN;WAAR;MAACM;OAAON,gBAAAA,MAAMG,YAAM,QAAZH,kBAAAA,SAAAA,SAAAA,cAAeK,GAAAA;;QAF5D,CAAC;AAItB;",
5
- "names": ["getPathFromLoaderPath", "LOADER_JS_POSTFIX_UNCACHED", "isResponse", "promiseWithResolvers", "getManifest", "createHandleRequest", "options", "handlers", "manifest", "Error", "apiRoutesMap", "apiRoutes", "reduce", "acc", "cur", "page", "compiledRegex", "RegExp", "namedRegex", "apiRoutesList", "Object", "values", "activeRequests", "pageRoutes", "map", "route", "workingRegex", "handler", "request", "urlString", "url", "URL", "headers", "get", "pathname", "search", "process", "env", "NODE_ENV", "startsWith", "handleAPI", "apiRoute", "find", "regex", "test", "params", "getRouteParams", "loaderProps", "path", "err", "method", "handleLoader", "isClientRequestingNewRoute", "endsWith", "originalUrl", "finalUrl", "origin", "file", "console", "info", "Headers", "set", "loaderResponse", "getLoaderParams", "Response", "error", "routes", "handleSSR", "promise", "reject", "resolve", "ssrResponse", "config", "match", "exec", "log", "groups", "entries", "key", "value", "namedKey", "routeKeys", "fromEntries"]
4
+ "mappings": "AAAA,SAASA,6BAA6B;AACtC,SAAkCC,kCAAkC;AAEpE,SAASC,kBAAkB;AAC3B,SAASC,4BAA4B;AACrC,SAASC,mBAAmB;AAYrB,SAASC,oBACdC,SACAC,UAIC;AAED,MAAMC,WAAWJ,YAAAA;AACjB,MAAI,CAACI;AACH,UAAM,IAAIC,MAAM,oBAAoB;AAGtC,MAAMC,eACJF,SAASG,UAAUC,OAAO,SAACC,KAAKC,KAAAA;AAC9BD,eAAIC,IAAIC,IAAI,IAAI;MAAE,GAAGD;MAAKE,eAAe,IAAIC,OAAOH,IAAII,UAAU;IAAE,GAC7DL;EACT,GAAG,CAA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AAChE,MAAMkB,QAAQ,IAAI1B,OAAOQ,MAAMP,UAAU,GACnCuD,QAAQ9B,MAAM+B,KAAKxC,QAAAA;AACzB,SAAKuC,QACErD,OAAO6D,YACZ7D,OAAOwD,QAAQnD,MAAMuD,SAAS,EAAExD,IAAI,SAAA,OAAA;QAAC,CAACqD,KAAKC,KAAAA,IAAM,OAAaL;WAAR;MAACK;OAAOL,gBAAAA,MAAME,YAAM,QAAZF,kBAAAA,SAAAA,SAAAA,cAAeI,GAAAA;;QAF5D,CAAC;AAItB;",
5
+ "names": ["getPathFromLoaderPath", "LOADER_JS_POSTFIX_UNCACHED", "isResponse", "promiseWithResolvers", "getManifest", "createHandleRequest", "options", "handlers", "manifest", "Error", "apiRoutesMap", "apiRoutes", "reduce", "acc", "cur", "page", "compiledRegex", "RegExp", "namedRegex", "apiRoutesList", "Object", "values", "activeRequests", "pageRoutes", "map", "route", "workingRegex", "handler", "request", "urlString", "url", "URL", "headers", "get", "pathname", "search", "process", "env", "NODE_ENV", "startsWith", "handleAPI", "apiRoute", "find", "regex", "test", "params", "getRouteParams", "loaderProps", "path", "err", "method", "handleLoader", "isClientRequestingNewRoute", "endsWith", "originalUrl", "finalUrl", "origin", "file", "console", "info", "Headers", "set", "loaderResponse", "getLoaderParams", "Response", "error", "routes", "handleSSR", "promise", "reject", "resolve", "ssrResponse", "config", "match", "exec", "groups", "entries", "key", "value", "namedKey", "routeKeys", "fromEntries"]
6
6
  }
@@ -2,14 +2,23 @@ import { useEffect } from "react";
2
2
  import { preloadRoute } from "../router/router";
3
3
  import { getURL } from "../getURL";
4
4
  function PreloadLinks() {
5
- return import.meta.env.PROD && useEffect(() => {
6
- const url = getURL();
7
- document.addEventListener("mouseover", (e) => {
8
- let target = e.target;
9
- if (!(target instanceof HTMLElement) || (target = target instanceof HTMLAnchorElement ? target : target.parentElement, !(target instanceof HTMLAnchorElement))) return;
10
- const href = target.getAttribute("href");
11
- (href?.[0] === "/" || href?.[0].startsWith(url)) && preloadRoute(href.replace(url, ""));
12
- });
5
+ return typeof window < "u" && import.meta.env.PROD && useEffect(() => {
6
+ const url = getURL(), controller = new AbortController();
7
+ return document.addEventListener(
8
+ "mouseover",
9
+ (e) => {
10
+ let target = e.target;
11
+ if (!(target instanceof HTMLElement) || (target = target instanceof HTMLAnchorElement ? target : target.closest("a"), !(target instanceof HTMLAnchorElement))) return;
12
+ const href = target.getAttribute("href");
13
+ (href?.[0] === "/" || href?.[0].startsWith(url)) && preloadRoute(href.replace(url, ""));
14
+ },
15
+ {
16
+ passive: !0,
17
+ signal: controller.signal
18
+ }
19
+ ), () => {
20
+ controller.abort();
21
+ };
13
22
  }, []), null;
14
23
  }
15
24
  export {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/PreloadLinks.tsx"],
4
- "mappings": "AAAA,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,cAAc;AAEhB,SAAS,eAAe;AAG7B,SAAI,YAAY,IAAI,QAClB,UAAU,MAAM;AACd,UAAM,MAAM,OAAO;AACnB,aAAS,iBAAiB,aAAa,CAAC,MAAM;AAC5C,UAAI,SAAS,EAAE;AAGf,UAFI,EAAE,kBAAkB,iBACxB,SAAS,kBAAkB,oBAAoB,SAAS,OAAO,eAC3D,EAAE,kBAAkB,oBAAoB;AAC5C,YAAM,OAAO,OAAO,aAAa,MAAM;AACvC,OAAI,OAAO,CAAC,MAAM,OAAO,OAAO,CAAC,EAAE,WAAW,GAAG,MAE/C,aAAa,KAAK,QAAQ,KAAK,EAAE,CAAC;AAAA,IAEtC,CAAC;AAAA,EACH,GAAG,CAAC,CAAC,GAGA;AACT;",
4
+ "mappings": "AAAA,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,cAAc;AAEhB,SAAS,eAAe;AAG7B,SAAI,OAAO,SAAW,OAAe,YAAY,IAAI,QACnD,UAAU,MAAM;AACd,UAAM,MAAM,OAAO,GACb,aAAa,IAAI,gBAAgB;AAEvC,oBAAS;AAAA,MACP;AAAA,MACA,CAAC,MAAM;AACL,YAAI,SAAS,EAAE;AAGf,YAFI,EAAE,kBAAkB,iBACxB,SAAS,kBAAkB,oBAAoB,SAAS,OAAO,QAAQ,GAAG,GACtE,EAAE,kBAAkB,oBAAoB;AAC5C,cAAM,OAAO,OAAO,aAAa,MAAM;AACvC,SAAI,OAAO,CAAC,MAAM,OAAO,OAAO,CAAC,EAAE,WAAW,GAAG,MAE/C,aAAa,KAAK,QAAQ,KAAK,EAAE,CAAC;AAAA,MAEtC;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,QAAQ,WAAW;AAAA,MACrB;AAAA,IACF,GAEO,MAAM;AACX,iBAAW,MAAM;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,CAAC,GAGA;AACT;",
5
5
  "names": []
6
6
  }
@@ -2,14 +2,20 @@ import { useEffect } from "react";
2
2
  import { preloadRoute } from "../router/router.mjs";
3
3
  import { getURL } from "../getURL.mjs";
4
4
  function PreloadLinks() {
5
- return import.meta.env.PROD && useEffect(() => {
6
- const url = getURL();
7
- document.addEventListener("mouseover", e => {
5
+ return typeof window < "u" && import.meta.env.PROD && useEffect(() => {
6
+ const url = getURL(),
7
+ controller = new AbortController();
8
+ return document.addEventListener("mouseover", e => {
8
9
  let target = e.target;
9
- if (!(target instanceof HTMLElement) || (target = target instanceof HTMLAnchorElement ? target : target.parentElement, !(target instanceof HTMLAnchorElement))) return;
10
+ if (!(target instanceof HTMLElement) || (target = target instanceof HTMLAnchorElement ? target : target.closest("a"), !(target instanceof HTMLAnchorElement))) return;
10
11
  const href = target.getAttribute("href");
11
12
  (href?.[0] === "/" || href?.[0].startsWith(url)) && preloadRoute(href.replace(url, ""));
12
- });
13
+ }, {
14
+ passive: !0,
15
+ signal: controller.signal
16
+ }), () => {
17
+ controller.abort();
18
+ };
13
19
  }, []), null;
14
20
  }
15
21
  export { PreloadLinks };
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","preloadRoute","getURL","PreloadLinks","import","meta","env","PROD","url","document","addEventListener","e","target","HTMLElement","HTMLAnchorElement","parentElement","href","getAttribute","startsWith","replace"],"sources":["../../../src/views/PreloadLinks.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,SAAA,QAAiB;AAC1B,SAASC,YAAA,QAAoB;AAC7B,SAASC,MAAA,QAAc;AAEhB,SAASC,aAAA,EAAe;EAG7B,OAAIC,MAAA,CAAAC,IAAA,CAAYC,GAAA,CAAIC,IAAA,IAClBP,SAAA,CAAU,MAAM;IACd,MAAMQ,GAAA,GAAMN,MAAA,CAAO;IACnBO,QAAA,CAASC,gBAAA,CAAiB,aAAcC,CAAA,IAAM;MAC5C,IAAIC,MAAA,GAASD,CAAA,CAAEC,MAAA;MAGf,IAFI,EAAEA,MAAA,YAAkBC,WAAA,MACxBD,MAAA,GAASA,MAAA,YAAkBE,iBAAA,GAAoBF,MAAA,GAASA,MAAA,CAAOG,aAAA,EAC3D,EAAEH,MAAA,YAAkBE,iBAAA,IAAoB;MAC5C,MAAME,IAAA,GAAOJ,MAAA,CAAOK,YAAA,CAAa,MAAM;MACvC,CAAID,IAAA,GAAO,CAAC,MAAM,OAAOA,IAAA,GAAO,CAAC,EAAEE,UAAA,CAAWV,GAAG,MAE/CP,YAAA,CAAae,IAAA,CAAKG,OAAA,CAAQX,GAAA,EAAK,EAAE,CAAC;IAEtC,CAAC;EACH,GAAG,EAAE,GAGA;AACT","ignoreList":[]}
1
+ {"version":3,"names":["useEffect","preloadRoute","getURL","PreloadLinks","window","import","meta","env","PROD","url","controller","AbortController","document","addEventListener","e","target","HTMLElement","HTMLAnchorElement","closest","href","getAttribute","startsWith","replace","passive","signal","abort"],"sources":["../../../src/views/PreloadLinks.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,SAAA,QAAiB;AAC1B,SAASC,YAAA,QAAoB;AAC7B,SAASC,MAAA,QAAc;AAEhB,SAASC,aAAA,EAAe;EAG7B,OAAI,OAAOC,MAAA,GAAW,OAAeC,MAAA,CAAAC,IAAA,CAAYC,GAAA,CAAIC,IAAA,IACnDR,SAAA,CAAU,MAAM;IACd,MAAMS,GAAA,GAAMP,MAAA,CAAO;MACbQ,UAAA,GAAa,IAAIC,eAAA,CAAgB;IAEvC,OAAAC,QAAA,CAASC,gBAAA,CACP,aACCC,CAAA,IAAM;MACL,IAAIC,MAAA,GAASD,CAAA,CAAEC,MAAA;MAGf,IAFI,EAAEA,MAAA,YAAkBC,WAAA,MACxBD,MAAA,GAASA,MAAA,YAAkBE,iBAAA,GAAoBF,MAAA,GAASA,MAAA,CAAOG,OAAA,CAAQ,GAAG,GACtE,EAAEH,MAAA,YAAkBE,iBAAA,IAAoB;MAC5C,MAAME,IAAA,GAAOJ,MAAA,CAAOK,YAAA,CAAa,MAAM;MACvC,CAAID,IAAA,GAAO,CAAC,MAAM,OAAOA,IAAA,GAAO,CAAC,EAAEE,UAAA,CAAWZ,GAAG,MAE/CR,YAAA,CAAakB,IAAA,CAAKG,OAAA,CAAQb,GAAA,EAAK,EAAE,CAAC;IAEtC,GACA;MACEc,OAAA,EAAS;MACTC,MAAA,EAAQd,UAAA,CAAWc;IACrB,CACF,GAEO,MAAM;MACXd,UAAA,CAAWe,KAAA,CAAM;IACnB;EACF,GAAG,EAAE,GAGA;AACT","ignoreList":[]}
@@ -184,15 +184,16 @@ function one(options = {}) {
184
184
  {
185
185
  name: "one-define-environment",
186
186
  config() {
187
- if (options.app?.key)
188
- return {
189
- define: {
187
+ return {
188
+ define: {
189
+ ...options.app?.key && {
190
190
  "process.env.ONE_APP_NAME": JSON.stringify(options.app.key),
191
- "import.meta.env.ONE_APP_NAME": JSON.stringify(options.app.key),
192
- "process.env.ONE_CACHE_KEY": JSON.stringify(CACHE_KEY),
193
- "import.meta.env.ONE_CACHE_KEY": JSON.stringify(CACHE_KEY)
194
- }
195
- };
191
+ "import.meta.env.ONE_APP_NAME": JSON.stringify(options.app.key)
192
+ },
193
+ "process.env.ONE_CACHE_KEY": JSON.stringify(CACHE_KEY),
194
+ "import.meta.env.ONE_CACHE_KEY": JSON.stringify(CACHE_KEY)
195
+ }
196
+ };
196
197
  }
197
198
  },
198
199
  {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/vite/one.ts"],
4
- "mappings": "AAAA,SAAS,mBAAmB;AAC5B,OAAO,YAAY;AACnB,OAAO,QAAQ,SAAS,eAAe;AACvC,SAA0D,0BAA0B;AACpF,OAAO,mBAAmB;AAC1B,SAAS,iBAAiB,kBAAkB,kBAAkB,eAAe;AAC7E,SAAS,iBAAiB;AAC1B,OAAO;AACP,SAAS,mBAAmB;AAC5B,SAAS,6BAA6B;AACtC,SAAS,8BAA8B;AACvC,SAAS,sBAAsB;AAC/B,SAAS,6BAA6B;AACtC,SAAS,8BAA8B;AAEvC,SAAS,oBAAoB,sBAAsB;AACnD,SAAS,wBAAwB;AAEjC,OAAO,gBAAgB,GAAK;AAG5B,WAAW,wBAAwB;AAE5B,SAAS,IAAI,UAA6B,CAAC,GAAiB;AACjE,eAAa,SAGT,QAAQ,QAAQ,mBAAmB,MAChC,eAAe,GAGtB,WAAW,uBAA0B;AAGrC,QAAM,EAAE,aAAa,IAAI,gBAAgB,OAAO,GAC1C,cAAc,aAAa,SAC3B,kBAAkB,IAAI;AAAA;AAAA;AAAA,IAG1B,GAAG,YAAY,IAAI,CAAC,OAAO,GAAG,QAAQ,uBAAuB,MAAM,CAAC,EAAE,KAAK,GAAG,CAAC;AAAA,EACjF;AAEA,MAAI,sBAAqC;AAEzC,QAAM,cAAc,iBAAiB,GAE/B,EAAE,gBAAgB,IAAI,QAAQ,aAAa,QAAQ,aAAa,GAEhE,oBAAoB;AAAA,IACxB;AAAA,MACE,MAAM;AAAA,MACN,SAAS;AACP,eAAO;AAAA,UACL,QAAQ;AAAA,QACV;AAAA,MACF;AAAA,IACF;AAAA;AAAA,IAGA,IAAI;AAAA,MACF;AAAA,QACE,MAAM;AAAA,Q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,CAAC,YAAY;AACf,QAAI,CAAC,QAAS,OAAM,IAAI,MAAM,yCAAyC;AACvE,UAAM,mBAAmB,OAAO;AAAA,EAClC;AACA,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,4BAA4B;AAE9C,SAAO;AACT;AAEA,eAAsB,mBAAmB,SAA4B;AAKnE,MAAI,CAJU,MAAM,mBAAmB;AAAA,IACrC,MAAM;AAAA,IACN;AAAA,EACF,CAAC;AAEC,UAAM,IAAI,MAAM,sBAAsB,QAAQ,IAAI,CAAC,kCAAkC;AAEvF,QAAM,eAAe,kBAAkB;AACvC,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,yCAAyC;AAE3D,SAAO;AACT;",
5
5
  "names": []
6
6
  }
@@ -171,10 +171,12 @@ function one(options = {}) {
171
171
  }), {
172
172
  name: "one-define-environment",
173
173
  config() {
174
- if (options.app?.key) return {
174
+ return {
175
175
  define: {
176
- "process.env.ONE_APP_NAME": JSON.stringify(options.app.key),
177
- "import.meta.env.ONE_APP_NAME": JSON.stringify(options.app.key),
176
+ ...(options.app?.key && {
177
+ "process.env.ONE_APP_NAME": JSON.stringify(options.app.key),
178
+ "import.meta.env.ONE_APP_NAME": JSON.stringify(options.app.key)
179
+ }),
178
180
  "process.env.ONE_CACHE_KEY": JSON.stringify(CACHE_KEY),
179
181
  "import.meta.env.ONE_CACHE_KEY": JSON.stringify(CACHE_KEY)
180
182
  }
@@ -1 +1 @@
1
- {"version":3,"names":["resolvePath","events","path","dirname","resolve","loadConfigFromFile","tsconfigPaths","getOptimizeDeps","getOptionsFilled","isWebEnvironment","loadEnv","CACHE_KEY","existsAsync","clientTreeShakePlugin","createFileSystemRouter","ensureTSConfig","fixDependenciesPlugin","generateTypesForRoutes","createVirtualEntry","virtualEntryId","vitePluginSsrCss","setMaxListeners","globalThis","__vxrnEnableNativeEnv","one","options","oneOptions","config","__vxrnPluginConfig__","optimizeDeps","optimizeIds","include","optimizeIdRegex","RegExp","map","id","replace","join","tsConfigPathsPlugin","vxrnOptions","clientEnvDefine","mode","devAndProdPlugins","name","define","Proxy","configIncoming","pathsConfig","tsConfigPaths","plugins","flat","some","p","configResolved","resolveId","get","target","key","thisArg","Reflect","enforce","alias","tslib","web","defaultRenderMode","JSON","stringify","setupFile","process","env","NODE_ENV","server","url","environments","client","ssr","ios","android","zero","TESTING","REPLICACHE_VERSION","ZERO_VERSION","hotUpdate","modules","m","relative","root","split","sep","acceptedHmrExports","Set","__vxrnAddNativePlugins","__vxrnAddWebPluginsProd","deps","app","sharedNativeConfig","react","applyToEnvironment","environment","importer","test","absolutePath","webPath","directoryPath","err","console","warn","entries","getUserOneOptions","command","Error","loadUserOneOptions","cwd","foundOptions"],"sources":["../../../src/vite/one.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,WAAA,QAAmB;AAC5B,OAAOC,MAAA,MAAY;AACnB,OAAOC,IAAA,IAAQC,OAAA,EAASC,OAAA,QAAe;AACvC,SAA0DC,kBAAA,QAA0B;AACpF,OAAOC,aAAA,MAAmB;AAC1B,SAASC,eAAA,EAAiBC,gBAAA,EAAkBC,gBAAA,EAAkBC,OAAA,QAAe;AAC7E,SAASC,SAAA,QAAiB;AAC1B,OAAO;AACP,SAASC,WAAA,QAAmB;AAC5B,SAASC,qBAAA,QAA6B;AACtC,SAASC,sBAAA,QAA8B;AACvC,SAASC,cAAA,QAAsB;AAC/B,SAASC,qBAAA,QAA6B;AACtC,SAASC,sBAAA,QAA8B;AAEvC,SAASC,kBAAA,EAAoBC,cAAA,QAAsB;AACnD,SAASC,gBAAA,QAAwB;AAEjCnB,MAAA,CAAOoB,eAAA,CAAgB,GAAK;AAG5BC,UAAA,CAAWC,qBAAA,GAAwB;AAE5B,SAASC,IAAIC,OAAA,GAA6B,CAAC,GAAiB;EACjEC,UAAA,GAAaD,OAAA,EAGTA,OAAA,CAAQE,MAAA,EAAQZ,cAAA,KAAmB,MAChCA,cAAA,CAAe,GAGtBO,UAAA,CAAWM,oBAAA,GAA0BH,OAAA;E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F,WAAA,CAAY2F,aAAa,GACjC,OAAOA,aAAA;UAET,IAAI,MAAM3F,WAAA,CAAY0F,OAAO,GAC3B,OAAOA,OAAA;QAEX,SAASE,GAAA,EAAK;UACZC,OAAA,CAAQC,IAAA,CAAK,uBAAuBF,GAAG;QACzC;MACF;IACF;EACF,GAEApF,gBAAA,CAAiB;IACfuF,OAAA,EAAS,CAACxF,cAAc;EAC1B,CAAC,EACH;AACF;AAEA,IAAIO,UAAA,GAAuC;AAE3C,eAAekF,kBAAkBC,OAAA,EAA6B;EAC5D,IAAI,CAACnF,UAAA,EAAY;IACf,IAAI,CAACmF,OAAA,EAAS,MAAM,IAAIC,KAAA,CAAM,yCAAyC;IACvE,MAAMC,kBAAA,CAAmBF,OAAO;EAClC;EACA,IAAI,CAACnF,UAAA,EACH,MAAM,IAAIoF,KAAA,CAAM,4BAA4B;EAE9C,OAAOpF,UAAA;AACT;AAEA,eAAsBqF,mBAAmBF,OAAA,EAA4B;EAKnE,IAAI,EAJU,MAAMxG,kBAAA,CAAmB;IACrCoC,IAAA,EAAM;IACNoE;EACF,CAAC,IAEC,MAAM,IAAIC,KAAA,CAAM,sBAAsB1C,OAAA,CAAQ4C,GAAA,CAAI,CAAC,kCAAkC;EAEvF,MAAMC,YAAA,GAAeL,iBAAA,CAAkB;EACvC,IAAI,CAACK,YAAA,EACH,MAAM,IAAIH,KAAA,CAAM,yCAAyC;EAE3D,OAAOG,YAAA;AACT","ignoreList":[]}
1
+ {"version":3,"names":["resolvePath","events","path","dirname","resolve","loadConfigFromFile","tsconfigPaths","getOptimizeDeps","getOptionsFilled","isWebEnvironment","loadEnv","CACHE_KEY","existsAsync","clientTreeShakePlugin","createFileSystemRouter","ensureTSConfig","fixDependenciesPlugin","generateTypesForRoutes","createVirtualEntry","virtualEntryId","vitePluginSsrCss","setMaxListeners","globalThis","__vxrnEnableNativeEnv","one","options","oneOptions","config","__vxrnPluginConfig__","optimizeDeps","optimizeIds","include","optimizeIdRegex","RegExp","map","id","replace","join","tsConfigPathsPlugin","vxrnOptions","clientEnvDefine","mode","devAndProdPlugins","name","define","Proxy","configIncoming","pathsConfig","tsConfigPaths","plugins","flat","some","p","configResolved","resolveId","get","target","key","thisArg","Reflect","enforce","alias","tslib","web","defaultRenderMode","JSON","stringify","setupFile","process","env","NODE_ENV","server","url","environments","client","ssr","ios","android","zero","TESTING","REPLICACHE_VERSION","ZERO_VERSION","hotUpdate","modules","m","relative","root","split","sep","acceptedHmrExports","Set","__vxrnAddNativePlugins","__vxrnAddWebPluginsProd","deps","app","sharedNativeConfig","react","applyToEnvironment","environment","importer","test","absolutePath","webPath","directoryPath","err","console","warn","entries","getUserOneOptions","command","Error","loadUserOneOptions","cwd","foundOptions"],"sources":["../../../src/vite/one.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,WAAA,QAAmB;AAC5B,OAAOC,MAAA,MAAY;AACnB,OAAOC,IAAA,IAAQC,OAAA,EAASC,OAAA,QAAe;AACvC,SAA0DC,kBAAA,QAA0B;AACpF,OAAOC,aAAA,MAAmB;AAC1B,SAASC,eAAA,EAAiBC,gBAAA,EAAkBC,gBAAA,EAAkBC,OAAA,QAAe;AAC7E,SAASC,SAAA,QAAiB;AAC1B,OAAO;AACP,SAASC,WAAA,QAAmB;AAC5B,SAASC,qBAAA,QAA6B;AACtC,SAASC,sBAAA,QAA8B;AACvC,SAASC,cAAA,QAAsB;AAC/B,SAASC,qBAAA,QAA6B;AACtC,SAASC,sBAAA,QAA8B;AAEvC,SAASC,kBAAA,EAAoBC,cAAA,QAAsB;AACnD,SAASC,gBAAA,QAAwB;AAEjCnB,MAAA,CAAOoB,eAAA,CAAgB,GAAK;AAG5BC,UAAA,CAAWC,qBAAA,GAAwB;AAE5B,SAASC,IAAIC,OAAA,GAA6B,CAAC,GAAiB;EACjEC,UAAA,GAAaD,OAAA,EAGTA,OAAA,CAAQE,MAAA,EAAQZ,cAAA,KAAmB,MAChCA,cAAA,CAAe,GAGtBO,UAAA,CAAWM,oBA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,YAAA,GAAe;UACrC,IAAI,MAAMzF,WAAA,CAAY2F,aAAa,GACjC,OAAOA,aAAA;UAET,IAAI,MAAM3F,WAAA,CAAY0F,OAAO,GAC3B,OAAOA,OAAA;QAEX,SAASE,GAAA,EAAK;UACZC,OAAA,CAAQC,IAAA,CAAK,uBAAuBF,GAAG;QACzC;MACF;IACF;EACF,GAEApF,gBAAA,CAAiB;IACfuF,OAAA,EAAS,CAACxF,cAAc;EAC1B,CAAC,EACH;AACF;AAEA,IAAIO,UAAA,GAAuC;AAE3C,eAAekF,kBAAkBC,OAAA,EAA6B;EAC5D,IAAI,CAACnF,UAAA,EAAY;IACf,IAAI,CAACmF,OAAA,EAAS,MAAM,IAAIC,KAAA,CAAM,yCAAyC;IACvE,MAAMC,kBAAA,CAAmBF,OAAO;EAClC;EACA,IAAI,CAACnF,UAAA,EACH,MAAM,IAAIoF,KAAA,CAAM,4BAA4B;EAE9C,OAAOpF,UAAA;AACT;AAEA,eAAsBqF,mBAAmBF,OAAA,EAA4B;EAKnE,IAAI,EAJU,MAAMxG,kBAAA,CAAmB;IACrCoC,IAAA,EAAM;IACNoE;EACF,CAAC,IAEC,MAAM,IAAIC,KAAA,CAAM,sBAAsB1C,OAAA,CAAQ4C,GAAA,CAAI,CAAC,kCAAkC;EAEvF,MAAMC,YAAA,GAAeL,iBAAA,CAAkB;EACvC,IAAI,CAACK,YAAA,EACH,MAAM,IAAIH,KAAA,CAAM,yCAAyC;EAE3D,OAAOG,YAAA;AACT","ignoreList":[]}
@@ -187,15 +187,16 @@ function one() {
187
187
  name: "one-define-environment",
188
188
  config() {
189
189
  var _options_app;
190
- if (!((_options_app = options.app) === null || _options_app === void 0) && _options_app.key)
191
- return {
192
- define: {
190
+ return {
191
+ define: {
192
+ ...((_options_app = options.app) === null || _options_app === void 0 ? void 0 : _options_app.key) && {
193
193
  "process.env.ONE_APP_NAME": JSON.stringify(options.app.key),
194
- "import.meta.env.ONE_APP_NAME": JSON.stringify(options.app.key),
195
- "process.env.ONE_CACHE_KEY": JSON.stringify(CACHE_KEY),
196
- "import.meta.env.ONE_CACHE_KEY": JSON.stringify(CACHE_KEY)
197
- }
198
- };
194
+ "import.meta.env.ONE_APP_NAME": JSON.stringify(options.app.key)
195
+ },
196
+ "process.env.ONE_CACHE_KEY": JSON.stringify(CACHE_KEY),
197
+ "import.meta.env.ONE_CACHE_KEY": JSON.stringify(CACHE_KEY)
198
+ }
199
+ };
199
200
  }
200
201
  },
201
202
  {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/one.ts"],
4
- "mappings": "AAAA,SAASA,mBAAmB;AAC5B,OAAOC,YAAY;AACnB,OAAOC,QAAQC,SAASC,eAAe;AACvC,SAA0DC,0BAA0B;AACpF,OAAOC,mBAAmB;AAC1B,SAASC,iBAAiBC,kBAAkBC,kBAAkBC,eAAe;AAC7E,SAASC,iBAAiB;AAC1B,OAAO;AACP,SAASC,mBAAmB;AAC5B,SAASC,6BAA6B;AACtC,SAASC,8BAA8B;AACvC,SAASC,sBAAsB;AAC/B,SAASC,6BAA6B;AACtC,SAASC,8BAA8B;AAEvC,SAASC,oBAAoBC,sBAAsB;AACnD,SAASC,wBAAwB;AAEjCnB,OAAOoB,gBAAgB,GAAA;AAGvBC,WAAWC,wBAAwB;AAE5B,SAASC,MAAAA;MAAIC,UAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAA6B,CAAC,GAI5CA;AAHJC,eAAaD,WAGTA,kBAAAA,QAAQE,YAAM,QAAdF,oBAAAA,SAAAA,SAAAA,gBAAgBV,oBAAmB,MAChCA,eAAAA,GAGPO,WAAW,uBAA0BG;AAGrC,MAAM,EAAEG,aAAY,IAAKrB,gBAAgB,OAAA,GACnCsB,cAAcD,aAAaE,SAC3BC,kBAAkB,IAAIC;;;IAG1B,GAAGH,YAAYI,IAAI,SAACC,IAAAA;aAAO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IsF,MAAM,4BAA4B;AAE9C,SAAOtF;AACT;AAEA,eAAsBuF,mBAAmBF,SAA0B;AACjE,MAAMG,QAAQ,MAAM7G,mBAAmB;IACrCmC,MAAM;IACNuE;EACF,CAAA;AACA,MAAI,CAACG;AACH,UAAM,IAAIF,MAAM,sBAAsB7C,QAAQgD,IAAG,CAAA,kCAAoC;AAEvF,MAAMC,eAAeN,kBAAAA;AACrB,MAAI,CAACM;AACH,UAAM,IAAIJ,MAAM,yCAAyC;AAE3D,SAAOI;AACT;",
5
5
  "names": ["resolvePath", "events", "path", "dirname", "resolve", "loadConfigFromFile", "tsconfigPaths", "getOptimizeDeps", "getOptionsFilled", "isWebEnvironment", "loadEnv", "CACHE_KEY", "existsAsync", "clientTreeShakePlugin", "createFileSystemRouter", "ensureTSConfig", "fixDependenciesPlugin", "generateTypesForRoutes", "createVirtualEntry", "virtualEntryId", "vitePluginSsrCss", "setMaxListeners", "globalThis", "__vxrnEnableNativeEnv", "one", "options", "oneOptions", "config", "optimizeDeps", "optimizeIds", "include", "optimizeIdRegex", "RegExp", "map", "id", "replace", "join", "tsConfigPathsPlugin", "vxrnOptions", "clientEnvDefine", "mode", "devAndProdPlugins", "name", "define", "Proxy", "configIncoming", "pathsConfig", "tsConfigPaths", "plugins", "flat", "some", "p", "configResolved", "resolveId", "get", "target", "key", "thisArg", "Reflect", "enforce", "alias", "tslib", "web", "defaultRenderMode", "JSON", "stringify", "setupFile", "process", "env", "NODE_ENV", "server", "url", "environments", "client", "ssr", "ios", "android", "zero", "TESTING", "REPLICACHE_VERSION", "ZERO_VERSION", "hotUpdate", "modules", "m", "relativePath", "relative", "root", "rootDir", "split", "sep", "acceptedHmrExports", "Set", "__vxrnAddNativePlugins", "__vxrnAddWebPluginsProd", "deps", "app", "sharedNativeConfig", "react", "applyToEnvironment", "environment", "importer", "shouldOptimize", "test", "absolutePath", "webPath", "directoryPath", "err", "console", "warn", "entries", "getUserOneOptions", "command", "Error", "loadUserOneOptions", "found", "cwd", "foundOptions"]
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "one",
3
- "version": "1.1.314",
3
+ "version": "1.1.316",
4
4
  "source": "src/index.ts",
5
5
  "types": "./types/index.d.ts",
6
6
  "sideEffects": false,
@@ -91,14 +91,14 @@
91
91
  "@react-navigation/native-stack": "~6.9.13",
92
92
  "@react-navigation/routers": "~6.1.9",
93
93
  "@ungap/structured-clone": "^1.2.0",
94
- "@vxrn/resolve": "1.1.314",
95
- "@vxrn/tslib-lite": "1.1.314",
96
- "@vxrn/universal-color-scheme": "1.1.314",
97
- "@vxrn/use-isomorphic-layout-effect": "1.1.314",
94
+ "@vxrn/resolve": "1.1.316",
95
+ "@vxrn/tslib-lite": "1.1.316",
96
+ "@vxrn/universal-color-scheme": "1.1.316",
97
+ "@vxrn/use-isomorphic-layout-effect": "1.1.316",
98
98
  "babel-dead-code-elimination": "^1.0.6",
99
99
  "citty": "^0.1.6",
100
100
  "core-js": "^3.38.1",
101
- "create-vxrn": "1.1.314",
101
+ "create-vxrn": "1.1.316",
102
102
  "escape-string-regexp": "^5.0.0",
103
103
  "expo-linking": "~6.3.1",
104
104
  "expo-modules-core": "^1.12.24",
@@ -120,7 +120,7 @@
120
120
  "url-parse": "^1.5.10",
121
121
  "vite": "6.0.0-beta.1",
122
122
  "vite-tsconfig-paths": "^5.0.1",
123
- "vxrn": "1.1.314",
123
+ "vxrn": "1.1.316",
124
124
  "ws": "^8.18.0",
125
125
  "xxhashjs": "^0.2.2"
126
126
  },
package/src/cleanUrl.ts CHANGED
@@ -2,7 +2,6 @@ import {
2
2
  isNative,
3
3
  LOADER_JS_POSTFIX,
4
4
  LOADER_JS_POSTFIX_REGEX,
5
- LOADER_JS_POSTFIX_UNCACHED,
6
5
  PRELOAD_JS_POSTFIX,
7
6
  } from './constants'
8
7
  import { getURL } from './getURL'
@@ -208,7 +208,6 @@ function getLoaderParams(
208
208
  ) {
209
209
  const params: Record<string, string> = {}
210
210
  const match = new RegExp(config.workingRegex).exec(url.pathname)
211
- console.log('getting loader params', url)
212
211
  if (match?.groups) {
213
212
  for (const [key, value] of Object.entries(match.groups)) {
214
213
  const namedKey = config.routeKeys[key]
@@ -5,20 +5,33 @@ import { getURL } from '../getURL'
5
5
  export function PreloadLinks() {
6
6
  // only in prod because we don't generate them until build
7
7
  // @ts-ignore
8
- if (import.meta.env.PROD) {
8
+ if (typeof window !== 'undefined' && import.meta.env.PROD) {
9
9
  useEffect(() => {
10
10
  const url = getURL()
11
- document.addEventListener('mouseover', (e) => {
12
- let target = e.target
13
- if (!(target instanceof HTMLElement)) return
14
- target = target instanceof HTMLAnchorElement ? target : target.parentElement
15
- if (!(target instanceof HTMLAnchorElement)) return
16
- const href = target.getAttribute('href')
17
- if (href?.[0] === '/' || href?.[0].startsWith(url)) {
18
- // local route
19
- preloadRoute(href.replace(url, ''))
11
+ const controller = new AbortController()
12
+
13
+ document.addEventListener(
14
+ 'mouseover',
15
+ (e) => {
16
+ let target = e.target
17
+ if (!(target instanceof HTMLElement)) return
18
+ target = target instanceof HTMLAnchorElement ? target : target.closest('a')
19
+ if (!(target instanceof HTMLAnchorElement)) return
20
+ const href = target.getAttribute('href')
21
+ if (href?.[0] === '/' || href?.[0].startsWith(url)) {
22
+ // local route
23
+ preloadRoute(href.replace(url, ''))
24
+ }
25
+ },
26
+ {
27
+ passive: true,
28
+ signal: controller.signal,
20
29
  }
21
- })
30
+ )
31
+
32
+ return () => {
33
+ controller.abort()
34
+ }
22
35
  }, [])
23
36
  }
24
37
 
package/src/vite/one.ts CHANGED
@@ -263,14 +263,12 @@ export function one(options: One.PluginOptions = {}): PluginOption {
263
263
  {
264
264
  name: 'one-define-environment',
265
265
  config() {
266
- if (!options.app?.key) {
267
- return
268
- }
269
-
270
266
  return {
271
267
  define: {
272
- 'process.env.ONE_APP_NAME': JSON.stringify(options.app.key),
273
- 'import.meta.env.ONE_APP_NAME': JSON.stringify(options.app.key),
268
+ ...options.app?.key && {
269
+ 'process.env.ONE_APP_NAME': JSON.stringify(options.app.key),
270
+ 'import.meta.env.ONE_APP_NAME': JSON.stringify(options.app.key),
271
+ },
274
272
 
275
273
  'process.env.ONE_CACHE_KEY': JSON.stringify(CACHE_KEY),
276
274
  'import.meta.env.ONE_CACHE_KEY': JSON.stringify(CACHE_KEY),
@@ -1 +1 @@
1
- {"version":3,"file":"cleanUrl.d.ts","sourceRoot":"","sources":["../src/cleanUrl.ts"],"names":[],"mappings":"AAsBA,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,UAEjD;AAED,wBAAgB,aAAa,CAC3B,WAAW,EAAE,MAAM,EAEnB,UAAU,UAAW,UAWtB;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,UAKvD"}
1
+ {"version":3,"file":"cleanUrl.d.ts","sourceRoot":"","sources":["../src/cleanUrl.ts"],"names":[],"mappings":"AAqBA,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,UAEjD;AAED,wBAAgB,aAAa,CAC3B,WAAW,EAAE,MAAM,EAEnB,UAAU,UAAW,UAWtB;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,UAKvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"PreloadLinks.d.ts","sourceRoot":"","sources":["../../src/views/PreloadLinks.tsx"],"names":[],"mappings":"AAIA,wBAAgB,YAAY,SAqB3B"}
1
+ {"version":3,"file":"PreloadLinks.d.ts","sourceRoot":"","sources":["../../src/views/PreloadLinks.tsx"],"names":[],"mappings":"AAIA,wBAAgB,YAAY,SAkC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"one.d.ts","sourceRoot":"","sources":["../../src/vite/one.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,KAAK,YAAY,EAAuC,MAAM,MAAM,CAAA;AAI1F,OAAO,qBAAqB,CAAA;AAO5B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AASlC,wBAAgB,GAAG,CAAC,OAAO,GAAE,GAAG,CAAC,aAAkB,GAAG,YAAY,CAgUjE;AAeD,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,8BAalE"}
1
+ {"version":3,"file":"one.d.ts","sourceRoot":"","sources":["../../src/vite/one.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,KAAK,YAAY,EAAuC,MAAM,MAAM,CAAA;AAI1F,OAAO,qBAAqB,CAAA;AAO5B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AASlC,wBAAgB,GAAG,CAAC,OAAO,GAAE,GAAG,CAAC,aAAkB,GAAG,YAAY,CA8TjE;AAeD,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,8BAalE"}