one 1.1.310 → 1.1.311
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/Root.cjs +2 -1
- package/dist/cjs/Root.cjs.map +1 -1
- package/dist/cjs/Root.native.js +2 -2
- package/dist/cjs/Root.native.js.map +2 -2
- package/dist/cjs/createHandleRequest.cjs +1 -0
- package/dist/cjs/createHandleRequest.cjs.map +1 -1
- package/dist/cjs/createHandleRequest.native.js +1 -0
- package/dist/cjs/createHandleRequest.native.js.map +2 -2
- package/dist/cjs/getURL.cjs +1 -1
- package/dist/esm/Root.js +2 -1
- package/dist/esm/Root.js.map +1 -1
- package/dist/esm/Root.mjs +2 -1
- package/dist/esm/Root.mjs.map +1 -1
- package/dist/esm/Root.native.js +2 -1
- package/dist/esm/Root.native.js.map +2 -2
- package/dist/esm/createHandleRequest.js +1 -0
- package/dist/esm/createHandleRequest.js.map +1 -1
- package/dist/esm/createHandleRequest.mjs +1 -0
- package/dist/esm/createHandleRequest.mjs.map +1 -1
- package/dist/esm/createHandleRequest.native.js +1 -0
- package/dist/esm/createHandleRequest.native.js.map +2 -2
- package/dist/esm/getURL.js +1 -1
- package/dist/esm/getURL.mjs +1 -1
- package/package.json +7 -7
- package/src/Root.tsx +2 -1
- package/src/createHandleRequest.ts +5 -0
- package/src/getURL.ts +1 -1
- package/types/Root.d.ts.map +1 -1
- package/types/createHandleRequest.d.ts.map +1 -1
package/dist/cjs/Root.cjs
CHANGED
@@ -46,6 +46,7 @@ var import_react = require("react"),
|
|
46
46
|
import_PreloadLinks = require("./views/PreloadLinks.cjs"),
|
47
47
|
import_ScrollRestoration = require("./views/ScrollRestoration.cjs"),
|
48
48
|
import_rand = require("./utils/rand.cjs"),
|
49
|
+
import_getURL = require("./getURL.cjs"),
|
49
50
|
import_jsx_runtime =
|
50
51
|
// <StrictMode>
|
51
52
|
require("react/jsx-runtime");
|
@@ -136,7 +137,7 @@ function Contents({
|
|
136
137
|
...props
|
137
138
|
}) {
|
138
139
|
const context = (0, import_useViteRoutes.useViteRoutes)(routes, routeOptions, globalThis.__vxrnVersion),
|
139
|
-
location = typeof window < "u" && window.location ? new URL(path || window.location.href || "/", window.location.href) : new URL(path || "/",
|
140
|
+
location = typeof window < "u" && window.location ? new URL(path || window.location.href || "/", window.location.href) : new URL(path || "/", (0, import_getURL.getURL)());
|
140
141
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(ContextNavigator, {
|
141
142
|
...props,
|
142
143
|
location,
|
package/dist/cjs/Root.cjs.map
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/Root.tsx"],
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsF,kBAEtF,uBAA8B,4BAC9B,2BAAkC,sCAElC,gBAKO,qCACP,kBAAuC,uCACvC,gCAA+B,yCAC/B,6BAAwC,mDACxC,+BAAsC,2CACtC,gCAAuC,4CACvC,sBAA6B,iCAC7B,2BAAkC,sCAElC,cAAqB,
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsF,kBAEtF,uBAA8B,4BAC9B,2BAAkC,sCAElC,gBAKO,qCACP,kBAAuC,uCACvC,gCAA+B,yCAC/B,6BAAwC,mDACxC,+BAAsC,2CACtC,gCAAuC,4CACvC,sBAA6B,iCAC7B,2BAAkC,sCAElC,cAAqB,yBACrB,gBAAuB,qBAwCnB;AAAA;AAAA;AAAA;AArCA,OAAO,SAAW,QAEpB,OAAO,kCAAkC,MAAM,CAAC,iBAAiB,sBAAsB,QAAQ;AA8B1F,SAAS,KAAK,OAAkB;AAGrC,QAAM,WAEJ,6CAAC,8CAEC;AAAA,gDAAC,YAAyB,GAAG,SAAf,UAAsB;AAAA,IACpC,4CAAC,sCAAiB,eAAgB;AAAA,KACpC;AAIF,MAAI,MAAM,UAAU;AAClB,QAAI,WAAW,wBAA2B,OAAO;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AChD,QAAM,UAA2C,OAAO;AAExD,MAAI,UAAU,eAAe,OAAO,IAAI,IACtC,UAAU,iBAAiB,KAAK,UAAU,OAAO,OAAO,CAAC,KAAK,EAChE;AAEA,UAAQ,OAAO,MAAM;AAAA,IACnB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,MAAI,SAAS,OACX,WAAW;AAAA;AAAA,6BAAkC,QAAQ,IAAI,OAEzD,WAAW;AAAA;AAAA;AAGb;AAAA,IACF,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,iBAAW;AAAA;AAAA;AACX;AAAA,IACF,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,iBAAW;AAAA;AAAA;AACX;AAAA,EACJ;AAIA,MAFA,WAAW;AAAA;AAAA,uEAEP,QAAQ,IAAI,aAAa;AAC3B,UAAM,IAAI,MAAM,OAAO;AAEzB,UAAQ,MAAM,OAAO;AACvB,IAEA,oBAAoB,MAAM;AAAC;",
|
5
5
|
"names": ["UpstreamNavigationContainer"]
|
6
6
|
}
|
package/dist/cjs/Root.native.js
CHANGED
@@ -26,7 +26,7 @@ __export(Root_exports, {
|
|
26
26
|
Root: () => Root
|
27
27
|
});
|
28
28
|
module.exports = __toCommonJS(Root_exports);
|
29
|
-
var import_jsx_runtime = require("react/jsx-runtime"), import_react = require("react"), import_useViteRoutes = require("./useViteRoutes"), import_RootErrorBoundary = require("./views/RootErrorBoundary"), import_native = require("@react-navigation/native"), import_elements = require("@react-navigation/elements"), import_universal_color_scheme = require("@vxrn/universal-color-scheme"), import_NavigationContainer = __toESM(require("./fork/NavigationContainer"), 1), import_serverLocationContext = require("./router/serverLocationContext"), import_useInitializeOneRouter = require("./router/useInitializeOneRouter"), import_PreloadLinks = require("./views/PreloadLinks"), import_ScrollRestoration = require("./views/ScrollRestoration"), import_rand = require("./utils/rand");
|
29
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_react = require("react"), import_useViteRoutes = require("./useViteRoutes"), import_RootErrorBoundary = require("./views/RootErrorBoundary"), import_native = require("@react-navigation/native"), import_elements = require("@react-navigation/elements"), import_universal_color_scheme = require("@vxrn/universal-color-scheme"), import_NavigationContainer = __toESM(require("./fork/NavigationContainer"), 1), import_serverLocationContext = require("./router/serverLocationContext"), import_useInitializeOneRouter = require("./router/useInitializeOneRouter"), import_PreloadLinks = require("./views/PreloadLinks"), import_ScrollRestoration = require("./views/ScrollRestoration"), import_rand = require("./utils/rand"), import_getURL = require("./getURL");
|
30
30
|
typeof window < "u" && (window.__getReactRefreshIgnoredExports = function() {
|
31
31
|
return [
|
32
32
|
"feedCardQuery",
|
@@ -135,7 +135,7 @@ window.$RefreshSig$ = () => (type) => type;`
|
|
135
135
|
});
|
136
136
|
}
|
137
137
|
function Contents(param) {
|
138
|
-
var { routes, path, wrapper = import_react.Fragment, routeOptions, ...props } = param, context = (0, import_useViteRoutes.useViteRoutes)(routes, routeOptions, globalThis.__vxrnVersion), location = typeof window < "u" && window.location ? new URL(path || window.location.href || "/", window.location.href) : new URL(path || "/",
|
138
|
+
var { routes, path, wrapper = import_react.Fragment, routeOptions, ...props } = param, context = (0, import_useViteRoutes.useViteRoutes)(routes, routeOptions, globalThis.__vxrnVersion), location = typeof window < "u" && window.location ? new URL(path || window.location.href || "/", window.location.href) : new URL(path || "/", (0, import_getURL.getURL)());
|
139
139
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ContextNavigator, {
|
140
140
|
...props,
|
141
141
|
location,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/Users/n8/one/packages/one/src/Root.tsx"],
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAAA,eAAsF,kBAEtF,uBAA8B,4BAC9B,2BAAkC,sCAElC,gBAKO,qCACP,kBAAuC,uCACvC,gCAA+B,yCAC/B,6BAAwC,mDACxC,+BAAsC,2CACtC,gCAAuC,4CACvC,sBAA6B,iCAC7B,2BAAkC,sCAElC,cAAqB;
|
5
|
-
"names": ["window", "__getReactRefreshIgnoredExports", "Root", "props", "loaderData", "contents", "_jsxs", "RootErrorBoundary", "_jsx", "Contents", "PreloadLinks", "isClient", "globalThis", "show", "setShow", "useState", "useEffect", "constructor", "name", "undefined", "html", "lang", "head", "process", "env", "NODE_ENV", "DevHead", "script", "dangerouslySetInnerHTML", "__html", "css", "map", "file", "link", "rel", "href", "body", "async", "JSON", "stringify", "loaderProps", "mode", "ssrCSSID", "rand", "_Fragment", "as", "data-ssr-css", "type", "routes", "path", "wrapper", "Fragment", "routeOptions", "context", "useViteRoutes", "location", "URL", "ContextNavigator", "ParentWrapper", "initialLocation", "navigationContainerProps", "store", "useInitializeOneRouter", "colorScheme", "useColorScheme", "children", "ScrollRestoration", "SafeAreaProviderCompat", "Component", "rootComponent", "Error", "UpstreamNavigationContainer", "ref", "navigationRef", "initialState", "linking", "onUnhandledAction", "theme", "DarkTheme", "DefaultTheme", "documentTitle", "enabled", "ServerLocationContext", "Provider", "value", "action", "payload", "message", "console", "error"]
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAAA,eAAsF,kBAEtF,uBAA8B,4BAC9B,2BAAkC,sCAElC,gBAKO,qCACP,kBAAuC,uCACvC,gCAA+B,yCAC/B,6BAAwC,mDACxC,+BAAsC,2CACtC,gCAAuC,4CACvC,sBAA6B,iCAC7B,2BAAkC,sCAElC,cAAqB,yBACrB,gBAAuB;AAGnB,OAAOA,SAAW,QAEpBA,OAAOC,kCAAkC,WAAA;SAAM;IAAC;IAAiB;IAAsB;;;AA8BlF,SAASC,KAAKC,OAAgB;MA+B/BC,yBAeGD,YA3CDE;;IAEJ,uCAAAC,MAACC,4CAAAA;;;QAEC,uCAAAC,KAACC,UAAAA;UAAyB,GAAGN;WAAf,UAAA;QACd,uCAAAK,KAACE,kCAAAA,CAAAA,GAAiB,eAAA;;;;AAKtB,MAAIP,MAAMQ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J,uCAAArD,KAAC2E,mDAAsBC,UAAQ;MAACC,OAAOzB;gBACpCV,QAAQ,uCAAA1C,KAAC6D,WAAAA,CAAAA,CAAAA,CAAAA;;;AAIlB;AAEA,IAAIQ;AAEAtD,QAAQC,IAAIC,aAAa,eAC3BoD,oBAAoB,SAACS,QAAAA;AACnB,MAAMC,UAA2CD,OAAOC,SAEpDC,UAAU,eAAeF,OAAOvC,IAAI,IACtCwC,UAAU,iBAAiBjD,KAAKC,UAAU+C,OAAOC,OAAO,CAAA,KAAM,EAAA;AAGhE,UAAQD,OAAOvC,MAAI;IACjB,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;AACH,MAAIwC,WAAAA,QAAAA,QAASrE,OACXsE,WAAW;;6BAAkCD,QAAQrE,IAAI,OAEzDsE,WAAW;;;AAGb;IACF,KAAK;IACL,KAAK;IACL,KAAK;AACHA,iBAAW;;;AACX;IACF,KAAK;IACL,KAAK;IACL,KAAK;AACHA,iBAAW;;;AACX;EACJ;AAIA,MAFAA,WAAW;;uEAEPjE,QAAQC,IAAIC,aAAa;AAC3B,UAAM,IAAI8C,MAAMiB,OAAAA;AAElBC,UAAQC,MAAMF,OAAAA;AAChB,IAEAX,oBAAoB,WAAA;AAAO;",
|
5
|
+
"names": ["window", "__getReactRefreshIgnoredExports", "Root", "props", "loaderData", "contents", "_jsxs", "RootErrorBoundary", "_jsx", "Contents", "PreloadLinks", "isClient", "globalThis", "show", "setShow", "useState", "useEffect", "constructor", "name", "undefined", "html", "lang", "head", "process", "env", "NODE_ENV", "DevHead", "script", "dangerouslySetInnerHTML", "__html", "css", "map", "file", "link", "rel", "href", "body", "async", "JSON", "stringify", "loaderProps", "mode", "ssrCSSID", "rand", "_Fragment", "as", "data-ssr-css", "type", "routes", "path", "wrapper", "Fragment", "routeOptions", "context", "useViteRoutes", "location", "URL", "getURL", "ContextNavigator", "ParentWrapper", "initialLocation", "navigationContainerProps", "store", "useInitializeOneRouter", "colorScheme", "useColorScheme", "children", "ScrollRestoration", "SafeAreaProviderCompat", "Component", "rootComponent", "Error", "UpstreamNavigationContainer", "ref", "navigationRef", "initialState", "linking", "onUnhandledAction", "theme", "DarkTheme", "DefaultTheme", "documentTitle", "enabled", "ServerLocationContext", "Provider", "value", "action", "payload", "message", "console", "error"]
|
6
6
|
}
|
@@ -77,6 +77,7 @@ function createHandleRequest(options, handlers) {
|
|
77
77
|
finalUrl = new URL(originalUrl, url.origin);
|
78
78
|
for (const route of pageRoutes) {
|
79
79
|
if (route.file === "" || !route.workingRegex.test(finalUrl.pathname)) continue;
|
80
|
+
process.env.NODE_ENV === "development" && console.info(` \u2776 Running loader for route: ${finalUrl.pathname}`);
|
80
81
|
const headers = new Headers();
|
81
82
|
headers.set("Content-Type", "text/javascript");
|
82
83
|
try {
|
@@ -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,uBAEtC,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;AACvF,YAAM,YAAY,QAAQ,OAAO,IAC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,uBAAO,GAAG,GACJ;AAAA,QACR,UAAE;AACA,iBAAO,eAAe,QAAQ;AAAA,QAChC;AAAA,MACF;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAEA,SAAS,gBACP,KACA,QACA;AACA,QAAM,SAAiC,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
|
}
|
@@ -76,6 +76,7 @@ function createHandleRequest(options, handlers) {
|
|
76
76
|
for (var _iterator = pageRoutes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
77
77
|
var route = _step.value;
|
78
78
|
if (route.file !== "" && route.workingRegex.test(finalUrl.pathname)) {
|
79
|
+
process.env.NODE_ENV === "development" && console.info(` \u2776 Running loader for route: ${finalUrl.pathname}`);
|
79
80
|
var headers = new Headers();
|
80
81
|
headers.set("Content-Type", "text/javascript");
|
81
82
|
try {
|
@@ -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,uBAE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Md;gBACNW;cACF;YACF,CAAA;UACF,SAASI,KAAK;AACZ,oBAAIC,8BAAWD,GAAAA;AACb,qBAAOA;AAET,kBAAMA;UACR;QACF;MACF;AAEA,UAAIrB,QAAQuB,WAAW;AACrB,eAAO;AAGT,UAAI7C,SAAS8C,cAAc;AACzB,YAAMC,6BAA6BnB,SAASoB,SAAS,iBAAA;AAErD,YAAID,4BAA4B;AAC9B,cAAME,kBAAcC,uCAAsBtB,QAAAA,GACpCuB,WAAW,IAAI1B,IAAIwB,aAAazB,IAAI4B,MAAM,GAE3C,4BAAA,IAAA,oBAAA,IAAA,iBAAA;;AAAL,qBAAK,YAAenC,WAAAA,OAAAA,QAAAA,EAAAA,GAAf,OAAA,EAAA,6BAAA,QAAA,UAAA,KAAA,GAAA,OAAA,4BAAA,IAA2B;AAA3B,kBAAME,QAAN,MAAA;AACH,kBAAIA,MAAMkC,SAAS,
|
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", "originalUrl", "getPathFromLoaderPath", "finalUrl", "origin", "file", "Headers", "set", "loaderResponse", "getLoaderParams", "Response", "
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;sBAAsC,uBAEtC,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,SA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K,0BAAA,IAAA,iBAAA;;;SAAA,6BAAA,UAAA,UAAA,QAAA,UAAA,OAAA;;YAAA;gBAAA;;;EAIP;AACA,SAAOpC;AACT;AAGA,SAASC,eAAeZ,UAAkBT,OAAwB;AAChE,MAAMkB,QAAQ,IAAI1B,OAAOQ,MAAMP,UAAU,GACnC0D,QAAQjC,MAAMkC,KAAK3C,QAAAA;AACzB,SAAK0C,QACExD,OAAOgE,YACZhE,OAAO2D,QAAQtD,MAAM0D,SAAS,EAAE3D,IAAI,SAAA,OAAA;QAAC,CAACwD,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", "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
|
}
|
package/dist/cjs/getURL.cjs
CHANGED
@@ -25,5 +25,5 @@ __export(getURL_exports, {
|
|
25
25
|
module.exports = __toCommonJS(getURL_exports);
|
26
26
|
const CLIENT_BASE_URL = typeof window < "u" && window.location ? `${window.location.protocol}//${window.location.host}` : "";
|
27
27
|
function getURL() {
|
28
|
-
return CLIENT_BASE_URL || process.env.ONE_SERVER_URL || "";
|
28
|
+
return CLIENT_BASE_URL || process.env.ONE_SERVER_URL || "http://localhost";
|
29
29
|
}
|
package/dist/esm/Root.js
CHANGED
@@ -13,6 +13,7 @@ import { useInitializeOneRouter } from "./router/useInitializeOneRouter";
|
|
13
13
|
import { PreloadLinks } from "./views/PreloadLinks";
|
14
14
|
import { ScrollRestoration } from "./views/ScrollRestoration";
|
15
15
|
import { rand } from "./utils/rand";
|
16
|
+
import { getURL } from "./getURL";
|
16
17
|
import { Fragment as Fragment2, jsx, jsxs } from "react/jsx-runtime";
|
17
18
|
typeof window < "u" && (window.__getReactRefreshIgnoredExports = () => ["feedCardQuery", "feedCardReplyQuery", "loader"]);
|
18
19
|
function Root(props) {
|
@@ -99,7 +100,7 @@ window.$RefreshSig$ = () => (type) => type;`
|
|
99
100
|
] });
|
100
101
|
}
|
101
102
|
function Contents({ routes, path, wrapper = Fragment, routeOptions, ...props }) {
|
102
|
-
const context = useViteRoutes(routes, routeOptions, globalThis.__vxrnVersion), location = typeof window < "u" && window.location ? new URL(path || window.location.href || "/", window.location.href) : new URL(path || "/",
|
103
|
+
const context = useViteRoutes(routes, routeOptions, globalThis.__vxrnVersion), location = typeof window < "u" && window.location ? new URL(path || window.location.href || "/", window.location.href) : new URL(path || "/", getURL());
|
103
104
|
return /* @__PURE__ */ jsx(ContextNavigator, { ...props, location, context, wrapper });
|
104
105
|
}
|
105
106
|
function ContextNavigator({
|
package/dist/esm/Root.js.map
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/Root.tsx"],
|
4
|
-
"mappings": "AAAA,SAAS,UAAU,WAAW,gBAAwD;AAEtF,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAElC;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,8BAA8B;AACvC,SAAS,sBAAsB;AAC/B,OAAO,iCAAiC;AACxC,SAAS,6BAA6B;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EAEP,QAAQ,IAAI,aAAa;AAC3B,UAAM,IAAI,MAAM,OAAO;AAEzB,UAAQ,MAAM,OAAO;AACvB,IAEA,oBAAoB,MAAM;AAAC;",
|
5
5
|
"names": ["Fragment"]
|
6
6
|
}
|
package/dist/esm/Root.mjs
CHANGED
@@ -10,6 +10,7 @@ import { useInitializeOneRouter } from "./router/useInitializeOneRouter.mjs";
|
|
10
10
|
import { PreloadLinks } from "./views/PreloadLinks.mjs";
|
11
11
|
import { ScrollRestoration } from "./views/ScrollRestoration.mjs";
|
12
12
|
import { rand } from "./utils/rand.mjs";
|
13
|
+
import { getURL } from "./getURL.mjs";
|
13
14
|
import { Fragment as Fragment2, jsx, jsxs } from "react/jsx-runtime";
|
14
15
|
typeof window < "u" && (window.__getReactRefreshIgnoredExports = () => ["feedCardQuery", "feedCardReplyQuery", "loader"]);
|
15
16
|
function Root(props) {
|
@@ -101,7 +102,7 @@ function Contents({
|
|
101
102
|
...props
|
102
103
|
}) {
|
103
104
|
const context = useViteRoutes(routes, routeOptions, globalThis.__vxrnVersion),
|
104
|
-
location = typeof window < "u" && window.location ? new URL(path || window.location.href || "/", window.location.href) : new URL(path || "/",
|
105
|
+
location = typeof window < "u" && window.location ? new URL(path || window.location.href || "/", window.location.href) : new URL(path || "/", getURL());
|
105
106
|
return /* @__PURE__ */jsx(ContextNavigator, {
|
106
107
|
...props,
|
107
108
|
location,
|
package/dist/esm/Root.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Fragment","useEffect","useState","useViteRoutes","RootErrorBoundary","DarkTheme","DefaultTheme","SafeAreaProviderCompat","useColorScheme","UpstreamNavigationContainer","ServerLocationContext","useInitializeOneRouter","PreloadLinks","ScrollRestoration","rand","Fragment2","jsx","jsxs","window","__getReactRefreshIgnoredExports","Root","props","contents","children","Contents","isClient","globalThis","__vxrnHydrateMode__","show","setShow","loaderData","constructor","name","lang","process","env","NODE_ENV","DevHead","dangerouslySetInnerHTML","__html","css","map","file","rel","href","async","JSON","stringify","loaderProps","mode","ssrCSSID","as","type","routes","path","wrapper","routeOptions","context","__vxrnVersion","location","URL","ContextNavigator","ParentWrapper","initialLocation","navigationContainerProps","store","colorScheme","Component","rootComponent","Error","ref","navigationRef","initialState","linking","onUnhandledAction","theme","documentTitle","enabled","Provider","value","action","payload","message","console","error"],"sources":["../../src/Root.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,QAAA,EAAUC,SAAA,EAAWC,QAAA,QAAwD;AAEtF,SAASC,aAAA,QAAqB;AAC9B,SAASC,iBAAA,QAAyB;AAElC,SACEC,SAAA,EACAC,YAAA,QAGK;AACP,SAASC,sBAAA,QAA8B;AACvC,SAASC,cAAA,QAAsB;AAC/B,OAAOC,2BAAA,MAAiC;AACxC,SAASC,qBAAA,QAA6B;AACtC,SAASC,sBAAA,QAA8B;AACvC,SAASC,YAAA,QAAoB;AAC7B,SAASC,iBAAA,QAAyB;AAElC,SAASC,IAAA,QAAY;
|
1
|
+
{"version":3,"names":["Fragment","useEffect","useState","useViteRoutes","RootErrorBoundary","DarkTheme","DefaultTheme","SafeAreaProviderCompat","useColorScheme","UpstreamNavigationContainer","ServerLocationContext","useInitializeOneRouter","PreloadLinks","ScrollRestoration","rand","getURL","Fragment2","jsx","jsxs","window","__getReactRefreshIgnoredExports","Root","props","contents","children","Contents","isClient","globalThis","__vxrnHydrateMode__","show","setShow","loaderData","constructor","name","lang","process","env","NODE_ENV","DevHead","dangerouslySetInnerHTML","__html","css","map","file","rel","href","async","JSON","stringify","loaderProps","mode","ssrCSSID","as","type","routes","path","wrapper","routeOptions","context","__vxrnVersion","location","URL","ContextNavigator","ParentWrapper","initialLocation","navigationContainerProps","store","colorScheme","Component","rootComponent","Error","ref","navigationRef","initialState","linking","onUnhandledAction","theme","documentTitle","enabled","Provider","value","action","payload","message","console","error"],"sources":["../../src/Root.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,QAAA,EAAUC,SAAA,EAAWC,QAAA,QAAwD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,KAAA,CAAMF,OAAO;AACvB,IAEAR,iBAAA,GAAoBA,CAAA,KAAM,CAAC","ignoreList":[]}
|
package/dist/esm/Root.native.js
CHANGED
@@ -11,6 +11,7 @@ import { useInitializeOneRouter } from "./router/useInitializeOneRouter";
|
|
11
11
|
import { PreloadLinks } from "./views/PreloadLinks";
|
12
12
|
import { ScrollRestoration } from "./views/ScrollRestoration";
|
13
13
|
import { rand } from "./utils/rand";
|
14
|
+
import { getURL } from "./getURL";
|
14
15
|
typeof window < "u" && (window.__getReactRefreshIgnoredExports = function() {
|
15
16
|
return [
|
16
17
|
"feedCardQuery",
|
@@ -119,7 +120,7 @@ window.$RefreshSig$ = () => (type) => type;`
|
|
119
120
|
});
|
120
121
|
}
|
121
122
|
function Contents(param) {
|
122
|
-
var { routes, path, wrapper = Fragment, routeOptions, ...props } = param, context = useViteRoutes(routes, routeOptions, globalThis.__vxrnVersion), location = typeof window < "u" && window.location ? new URL(path || window.location.href || "/", window.location.href) : new URL(path || "/",
|
123
|
+
var { routes, path, wrapper = Fragment, routeOptions, ...props } = param, context = useViteRoutes(routes, routeOptions, globalThis.__vxrnVersion), location = typeof window < "u" && window.location ? new URL(path || window.location.href || "/", window.location.href) : new URL(path || "/", getURL());
|
123
124
|
return /* @__PURE__ */ _jsx(ContextNavigator, {
|
124
125
|
...props,
|
125
126
|
location,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/Users/n8/one/packages/one/src/Root.tsx"],
|
4
|
-
"mappings": ";AAAA,SAASA,UAAUC,WAAWC,gBAAwD;AAEtF,SAASC,qBAAqB;AAC9B,SAASC,yBAAyB;AAElC,SACEC,WACAC,oBAGK;AACP,SAASC,8BAA8B;AACvC,SAASC,sBAAsB;AAC/B,OAAOC,iCAAiC;AACxC,SAASC,6BAA6B;AACtC,SAASC,8BAA8B;AACvC,SAASC,oBAAoB;AAC7B,SAASC,yBAAyB;AAElC,SAASC,YAAY;
|
5
|
-
"names": ["Fragment", "useEffect", "useState", "useViteRoutes", "RootErrorBoundary", "DarkTheme", "DefaultTheme", "SafeAreaProviderCompat", "useColorScheme", "UpstreamNavigationContainer", "ServerLocationContext", "useInitializeOneRouter", "PreloadLinks", "ScrollRestoration", "rand", "window", "__getReactRefreshIgnoredExports", "Root", "props", "loaderData", "contents", "Contents", "isClient", "globalThis", "show", "setShow", "constructor", "name", "undefined", "html", "lang", "head", "process", "env", "NODE_ENV", "DevHead", "script", "dangerouslySetInnerHTML", "__html", "css", "map", "file", "link", "rel", "href", "body", "async", "JSON", "stringify", "loaderProps", "mode", "ssrCSSID", "as", "data-ssr-css", "type", "routes", "path", "wrapper", "routeOptions", "context", "location", "URL", "ContextNavigator", "ParentWrapper", "initialLocation", "navigationContainerProps", "store", "colorScheme", "children", "Component", "rootComponent", "Error", "ref", "navigationRef", "initialState", "linking", "onUnhandledAction", "theme", "documentTitle", "enabled", "Provider", "value", "action", "payload", "message", "console", "error"]
|
4
|
+
"mappings": ";AAAA,SAASA,UAAUC,WAAWC,gBAAwD;AAEtF,SAASC,qBAAqB;AAC9B,SAASC,yBAAyB;AAElC,SACEC,WACAC,oBAGK;AACP,SAASC,8BAA8B;AACvC,SAASC,sBAAsB;AAC/B,OAAOC,iCAAiC;AACxC,SAASC,6BAA6B;AACtC,SAASC,8BAA8B;AACvC,SAASC,oBAAoB;AAC7B,SAASC,yBAAyB;AAElC,SAASC,YAAY;AACrB,SAASC,cAAc;AAGnB,OAAOC,SAAW,QAEpBA,OAAOC,kCAAkC,WAAA;SAAM;IAAC;IAAiB;IAAsB;;;AA8BlF,SAASC,KAAKC,OAAgB;MA+B/BC,yBAeGD,YA3CDE;;IAEJ,sBAACjB,mBAAAA;;;QAEC,qBAACkB,UAAAA;UAAyB,GAAGH;WAAf,UAAA;QACd,qBAACP,cAAAA,CAAAA,GAAiB,eAAA;;;;AAKtB,MAAIO,MAAMI,UAAU;AAClB,QAAIC,WAAW,wBAA2B,OAAO;AAE/C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AAOC,SAEpDC,UAAU,eAAeF,OAAO5B,IAAI,IACtC6B,UAAU,iBAAiBpC,KAAKC,UAAUkC,OAAOC,OAAO,CAAA,KAAM,EAAA;AAGhE,UAAQD,OAAO5B,MAAI;IACjB,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;AACH,MAAI6B,SAASxD,OACXyD,WAAW;;6BAAkCD,QAAQxD,IAAI,OAEzDyD,WAAW;;;AAGb;IACF,KAAK;IACL,KAAK;IACL,KAAK;AACHA,iBAAW;;;AACX;IACF,KAAK;IACL,KAAK;IACL,KAAK;AACHA,iBAAW;;;AACX;EACJ;AAIA,MAFAA,WAAW;;uEAEPpD,QAAQC,IAAIC,aAAa;AAC3B,UAAM,IAAIqC,MAAMa,OAAAA;AAElBC,UAAQC,MAAMF,OAAAA;AAChB,IAEAR,oBAAoB,WAAA;AAAO;",
|
5
|
+
"names": ["Fragment", "useEffect", "useState", "useViteRoutes", "RootErrorBoundary", "DarkTheme", "DefaultTheme", "SafeAreaProviderCompat", "useColorScheme", "UpstreamNavigationContainer", "ServerLocationContext", "useInitializeOneRouter", "PreloadLinks", "ScrollRestoration", "rand", "getURL", "window", "__getReactRefreshIgnoredExports", "Root", "props", "loaderData", "contents", "Contents", "isClient", "globalThis", "show", "setShow", "constructor", "name", "undefined", "html", "lang", "head", "process", "env", "NODE_ENV", "DevHead", "script", "dangerouslySetInnerHTML", "__html", "css", "map", "file", "link", "rel", "href", "body", "async", "JSON", "stringify", "loaderProps", "mode", "ssrCSSID", "as", "data-ssr-css", "type", "routes", "path", "wrapper", "routeOptions", "context", "location", "URL", "ContextNavigator", "ParentWrapper", "initialLocation", "navigationContainerProps", "store", "colorScheme", "children", "Component", "rootComponent", "Error", "ref", "navigationRef", "initialState", "linking", "onUnhandledAction", "theme", "documentTitle", "enabled", "Provider", "value", "action", "payload", "message", "console", "error"]
|
6
6
|
}
|
@@ -49,6 +49,7 @@ function createHandleRequest(options, handlers) {
|
|
49
49
|
for (const route of pageRoutes) {
|
50
50
|
if (route.file === "" || !route.workingRegex.test(finalUrl.pathname))
|
51
51
|
continue;
|
52
|
+
process.env.NODE_ENV === "development" && console.info(` \u2776 Running loader for route: ${finalUrl.pathname}`);
|
52
53
|
const headers = new Headers();
|
53
54
|
headers.set("Content-Type", "text/javascript");
|
54
55
|
try {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/createHandleRequest.ts"],
|
4
|
-
"mappings": "AAAA,SAAS,6BAA6B;AAEtC,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,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;AACvF,YAAM,YAAY,QAAQ,OAAO,IAC3B,MAAM,IAAI;AAAA,QACd,aAAa;AAAA,QACb,QAAQ,QAAQ,IAAI,MAAM,IAAI,UAAU,QAAQ,QAAQ,IAAI,MAAM,CAAC,KAAK;AAAA,MAC1E,GACM,EAAE,UAAU,OAAO,IAAI;AAE7B,UAAI,QAAQ,IAAI,aAAa,gBACvB,eAAe,QAAQ;AACzB,eAAO,MAAM,eAAe,QAAQ;AAIxC,UAAI,aAAa,gBAAgB,SAAS,WAAW,IAAI;AACvD,eAAO;AAGT,UAAI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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
|
}
|
@@ -52,6 +52,7 @@ function createHandleRequest(options, handlers) {
|
|
52
52
|
finalUrl = new URL(originalUrl, url.origin);
|
53
53
|
for (const route of pageRoutes) {
|
54
54
|
if (route.file === "" || !route.workingRegex.test(finalUrl.pathname)) continue;
|
55
|
+
process.env.NODE_ENV === "development" && console.info(` \u2776 Running loader for route: ${finalUrl.pathname}`);
|
55
56
|
const headers = new Headers();
|
56
57
|
headers.set("Content-Type", "text/javascript");
|
57
58
|
try {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["getPathFromLoaderPath","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","Headers","set","loaderResponse","getLoaderParams","Response","
|
1
|
+
{"version":3,"names":["getPathFromLoaderPath","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;AAEtC,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,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A,GAASC,GAAG,CAAC,CAAC,CACpF,IAHmB,CAAC;AAItB","ignoreList":[]}
|
@@ -59,6 +59,7 @@ function createHandleRequest(options, handlers) {
|
|
59
59
|
for (var _iterator = pageRoutes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
60
60
|
var route = _step.value;
|
61
61
|
if (route.file !== "" && route.workingRegex.test(finalUrl.pathname)) {
|
62
|
+
process.env.NODE_ENV === "development" && console.info(` \u2776 Running loader for route: ${finalUrl.pathname}`);
|
62
63
|
var headers = new Headers();
|
63
64
|
headers.set("Content-Type", "text/javascript");
|
64
65
|
try {
|
@@ -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;AAEtC,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,OAAAA;WAAW;MACrD,GAAGA;MACHC,cAAc,IAAIT,OAAOQ,MAAMP,UAAU;IAC3C;;AAEA,SAAO;IACLV;IACAmB,SAAS,eAA6BC,SAAgB;AACpD,UAAMC,YAAYD,QAAQE,OAAO,IAC3BA,MAAM,IAAIC,IACdF,aAAa,IACbD,QAAQI,QAAQC,IAAI,MAAA,IAAU,UAAUL,QAAQI,QAAQC,IAAI,MAAA,CAAA,KAAY,EAAA,GAEpE,EAAEC,UAAUC,OAAM,IAAKL;AAE7B,UAAIM,QAAQC,IAAIC,aAAa,gBACvBhB,eAAeY,QAAAA;AACjB,eAAO,MAAMZ,eAAeY,QAAAA;AAIhC,UAAIA,aAAa,gBAAgBA,SAASK,WAAW,IAAA;AACnD,eAAO;AAGT,UAAIhC,SAASiC,WAAW;AACtB,YAAMC,WAAWtB,cAAcuB,KAAK,SAACjB,QAAAA;AACnC,cAAMkB,QAAQlB,OAAMT;AACpB,iBAAO2B,MAAMC,KAAKV,QAAAA;QACpB,CAAA;AAEA,YAAIO,UAAU;AACZ,cAAMI,SAASC,eAAeZ,UAAUO,QAAAA;AAExC,cAAI;AACF,mBAAO,MAAMlC,SAASiC,UAAU;cAC9BZ;cACAH,OAAOgB;cACPX;cACAiB,aAAa;gBACXC,MAAMd;gBACNW;cACF;YACF,CAAA;UACF,SAASI,KAAK;AACZ,gBAAI/C,WAAW+C,GAAAA;AACb,qBAAOA;AAET,kBAAMA;UACR;QACF;MACF;AAEA,UAAIrB,QAAQsB,WAAW;AACrB,eAAO;AAGT,UAAI3C,SAAS4C,cAAc;AACzB,YAAMC,6BAA6BlB,SAASmB,SAAS,iBAAA;AAErD,YAAID,4BAA4B;AAC9B,cAAME,cAAcrD,sBAAsBiC,QAAAA,GACpCqB,WAAW,IAAIxB,IAAIuB,aAAaxB,IAAI0B,MAAM,GAE3C,4BAAA,IAAA,oBAAA,IAAA,iBAAA;;AAAL,qBAAK,YAAejC,WAAAA,OAAAA,QAAAA,EAAAA,GAAf,OAAA,EAAA,6BAAA,QAAA,UAAA,KAAA,GAAA,OAAA,4BAAA,IAA2B;AAA3B,kBAAME,QAAN,MAAA;AACH,kBAAIA,MAAMgC,SAAS,
|
5
|
-
"names": ["getPathFromLoaderPath", "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", "Headers", "set", "loaderResponse", "getLoaderParams", "Response", "
|
4
|
+
"mappings": "AAAA,SAASA,6BAA6B;AAEtC,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,OAAAA;WAAW;MACrD,GAAGA;MACHC,cAAc,IAAIT,OAAOQ,MAAMP,UAAU;IAC3C;;AAEA,SAAO;IACLV;IACAmB,SAAS,eAA6BC,SAAgB;AACpD,UAAMC,YAAYD,QAAQE,OAAO,IAC3BA,MAAM,IAAIC,IACdF,aAAa,IACbD,QAAQI,QAAQC,IAAI,MAAA,IAAU,UAAUL,QAAQI,QAAQC,IAAI,MAAA,CAAA,KAAY,EAAA,GAEpE,EAAEC,UAAUC,OAAM,IAAKL;AAE7B,UAAIM,QAAQC,IAAIC,aAAa,gBACvBhB,eAAeY,QAAAA;AACjB,eAAO,MAAMZ,e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AOpB,GAAAA,GACDA;QACR,UAAA;AACE,iBAAO3B,eAAeY,QAAAA;QACxB;MACF;AAEA,aAAO;IACT;EACF;AACF;AAEA,SAAS6B,gBACPjC,KACA0C,QAAmE;AAEnE,MAAM3B,SAAiC,CAAC,GAClC4B,QAAQ,IAAIxD,OAAOuD,OAAO9C,YAAY,EAAEgD,KAAK5C,IAAII,QAAQ;AAC/D,MAAIuC,OAAOE,QAAQ;QACZ,4BAAA,IAAA,oBAAA,IAAA,iBAAA;;AAAL,eAAK,YAAsBvD,OAAOwD,QAAQH,MAAME,MAAM,EAAA,OAAA,QAAA,EAAA,GAAjD,OAAA,EAAA,6BAAA,QAAA,UAAA,KAAA,GAAA,OAAA,4BAAA,IAAoD;AAApD,YAAM,CAACE,KAAKC,KAAAA,IAAZ,MAAA,OACGC,WAAWP,OAAOQ,UAAUH,GAAAA;AAClChC,eAAOkC,QAAAA,IAAYD;MACrB;;AAHK,0BAAA,IAAA,iBAAA;;;SAAA,6BAAA,UAAA,UAAA,QAAA,UAAA,OAAA;;YAAA;gBAAA;;;EAIP;AACA,SAAOjC;AACT;AAGA,SAASC,eAAeZ,UAAkBT,OAAwB;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", "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
|
}
|
package/dist/esm/getURL.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
const CLIENT_BASE_URL = typeof window < "u" && window.location ? `${window.location.protocol}//${window.location.host}` : "";
|
2
2
|
function getURL() {
|
3
|
-
return CLIENT_BASE_URL || process.env.ONE_SERVER_URL || "";
|
3
|
+
return CLIENT_BASE_URL || process.env.ONE_SERVER_URL || "http://localhost";
|
4
4
|
}
|
5
5
|
export {
|
6
6
|
getURL
|
package/dist/esm/getURL.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
const CLIENT_BASE_URL = typeof window < "u" && window.location ? `${window.location.protocol}//${window.location.host}` : "";
|
2
2
|
function getURL() {
|
3
|
-
return CLIENT_BASE_URL || process.env.ONE_SERVER_URL || "";
|
3
|
+
return CLIENT_BASE_URL || process.env.ONE_SERVER_URL || "http://localhost";
|
4
4
|
}
|
5
5
|
export { getURL };
|
6
6
|
//# sourceMappingURL=getURL.mjs.map
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "one",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.311",
|
4
4
|
"source": "src/index.ts",
|
5
5
|
"types": "./types/index.d.ts",
|
6
6
|
"sideEffects": false,
|
@@ -90,14 +90,14 @@
|
|
90
90
|
"@react-navigation/native-stack": "~6.9.13",
|
91
91
|
"@react-navigation/routers": "~6.1.9",
|
92
92
|
"@ungap/structured-clone": "^1.2.0",
|
93
|
-
"@vxrn/resolve": "1.1.
|
94
|
-
"@vxrn/tslib-lite": "1.1.
|
95
|
-
"@vxrn/universal-color-scheme": "1.1.
|
96
|
-
"@vxrn/use-isomorphic-layout-effect": "1.1.
|
93
|
+
"@vxrn/resolve": "1.1.311",
|
94
|
+
"@vxrn/tslib-lite": "1.1.311",
|
95
|
+
"@vxrn/universal-color-scheme": "1.1.311",
|
96
|
+
"@vxrn/use-isomorphic-layout-effect": "1.1.311",
|
97
97
|
"babel-dead-code-elimination": "^1.0.6",
|
98
98
|
"citty": "^0.1.6",
|
99
99
|
"core-js": "^3.38.1",
|
100
|
-
"create-vxrn": "1.1.
|
100
|
+
"create-vxrn": "1.1.311",
|
101
101
|
"dotenv": "^16.4.5",
|
102
102
|
"escape-string-regexp": "^5.0.0",
|
103
103
|
"expo-linking": "~6.3.1",
|
@@ -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.
|
123
|
+
"vxrn": "1.1.311",
|
124
124
|
"ws": "^8.18.0",
|
125
125
|
"xxhashjs": "^0.2.2"
|
126
126
|
},
|
package/src/Root.tsx
CHANGED
@@ -18,6 +18,7 @@ import { PreloadLinks } from './views/PreloadLinks'
|
|
18
18
|
import { ScrollRestoration } from './views/ScrollRestoration'
|
19
19
|
import type { One } from './vite/types'
|
20
20
|
import { rand } from './utils/rand'
|
21
|
+
import { getURL } from './getURL'
|
21
22
|
// import { SplashScreen } from './views/Splash'
|
22
23
|
|
23
24
|
if (typeof window !== 'undefined') {
|
@@ -160,7 +161,7 @@ function Contents({ routes, path, wrapper = Fragment, routeOptions, ...props }:
|
|
160
161
|
const location =
|
161
162
|
typeof window !== 'undefined' && window.location
|
162
163
|
? new URL(path || window.location.href || '/', window.location.href)
|
163
|
-
: new URL(path || '/',
|
164
|
+
: new URL(path || '/', getURL())
|
164
165
|
|
165
166
|
return <ContextNavigator {...props} location={location} context={context} wrapper={wrapper} />
|
166
167
|
}
|
@@ -111,10 +111,15 @@ export function createHandleRequest(
|
|
111
111
|
// TODO improve/remove when not found is fixed
|
112
112
|
continue
|
113
113
|
}
|
114
|
+
|
114
115
|
if (!route.workingRegex.test(finalUrl.pathname)) {
|
115
116
|
continue
|
116
117
|
}
|
117
118
|
|
119
|
+
if (process.env.NODE_ENV === 'development') {
|
120
|
+
console.info(` ❶ Running loader for route: ${finalUrl.pathname}`)
|
121
|
+
}
|
122
|
+
|
118
123
|
const headers = new Headers()
|
119
124
|
headers.set('Content-Type', 'text/javascript')
|
120
125
|
|
package/src/getURL.ts
CHANGED
@@ -6,5 +6,5 @@ const CLIENT_BASE_URL =
|
|
6
6
|
export function getURL() {
|
7
7
|
// We should use `CLIENT_BASE_URL` on the client as we can't guarantee how the client is connected to the server - it's possible that the server is listening on `127.0.0.1` and the client is connected via `localhost`. Things might break if URLs don't match due to a JS module being double-loaded via two different URLs.
|
8
8
|
// `process.env.ONE_SERVER_URL` is for the server, where `CLIENT_BASE_URL` will be blank.
|
9
|
-
return CLIENT_BASE_URL || process.env.ONE_SERVER_URL || ''
|
9
|
+
return CLIENT_BASE_URL || process.env.ONE_SERVER_URL || 'http://localhost'
|
10
10
|
}
|
package/types/Root.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Root.d.ts","sourceRoot":"","sources":["../src/Root.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAC7F,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAIlE,OAAO,EAIL,KAAK,wBAAwB,EAC9B,MAAM,0BAA0B,CAAA;AAQjC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;
|
1
|
+
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ceRoot":"","sources":["../src/createHandleRequest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAI9D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAEvC,KAAK,mBAAmB,CAAC,eAAe,SAAS,MAAM,GAAG,EAAE,IAAI;IAC9D,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,eAAe,CAAA;IAC1C,GAAG,EAAE,GAAG,CAAA;IACR,WAAW,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,CAAA;CAC5D,CAAA;AAED,KAAK,sBAAsB,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEtD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,GAAG,CAAC,aAAa,EAC1B,QAAQ,EAAE;IACR,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACxD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC3D,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CACzD;;uBA4BgD,OAAO,KAAG,OAAO,CAAC,sBAAsB,CAAC;
|
1
|
+
{"version":3,"file":"createHandleRequest.d.ts","sourceRoot":"","sources":["../src/createHandleRequest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAI9D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAEvC,KAAK,mBAAmB,CAAC,eAAe,SAAS,MAAM,GAAG,EAAE,IAAI;IAC9D,OAAO,EAAE,OAAO,CAAA;IA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