@vibingbase/react-router 0.12.15 → 0.12.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -10,4 +10,4 @@ function V(){let t="vibingbase-template";try{let e=import.meta.env.VITE_VIBINGBA
10
10
  document.documentElement.classList.add(colorScheme);
11
11
  document.documentElement.style.colorScheme = colorScheme;
12
12
  })();
13
- `.trim()}}),Z);import{isAppTarget as nt}from"@vibingbase/common-client";import{isSSR as ot}from"@vibingbase/common-client";import{connect as rt,WindowMessenger as it}from"penpal";var x=a==="development-preview"||a==="production-preview";var E=a==="production-preview"||a==="production-release";var g=x&&!ot?await rt({messenger:new it({remoteWindow:parent,allowedOrigins:[E?"https://app.vibingbase.com":"http://localhost:1420","tauri://localhost","http://tauri.localhost","https://tauri.localhost"]})}).promise:void 0;function at(){try{if(g)return g.getAppTarget();let t=import.meta.env.VITE_VIBINGBASE_APP_TARGET;return nt(t)?t:void 0}catch{}}var l=await at();var Ie=l==="macOS";var Ae=l==="Windows";import{isTauri as ut}from"@tauri-apps/api/core";import{JotaiConnector as dt,TauriColorScheme as ft}from"@vibingbase/common-client";import{useEffect as ht}from"react";import{useColorScheme as st}from"@mantine/hooks";import{isSSR as mt}from"@vibingbase/common-client";import{useAtom as ct}from"jotai";import{atomWithStorage as pt}from"jotai/utils";function L(t){return t==="light"||t==="dark"}function b(t){return L(t)||t==="auto"}var lt=pt(`${r}/vibingbase-theme`,"auto",{getItem:(t,e)=>{if(mt)return e;let o=localStorage.getItem(t);return b(o)?o:e},setItem:(t,e)=>{localStorage.setItem(t,e)},removeItem:t=>{localStorage.removeItem(t)},subscribe:(t,e,o)=>{let s=i=>{i.storageArea===localStorage&&i.key===t&&e(b(i.newValue)?i.newValue:o)};return addEventListener("storage",s),()=>{removeEventListener("storage",s)}}},{getOnInit:!0});function z(){let[t,e]=ct(lt),o=st("light",{getInitialValueInEffect:!1});return{theme:t,setTheme:e,colorScheme:L(t)?t:o}}import{Fragment as gt,jsx as P,jsxs as wt}from"react/jsx-runtime";function We({children:t}){let{colorScheme:e}=z();return ht(()=>{document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(e),document.documentElement.style.colorScheme=e},[e]),wt(gt,{children:[P(dt,{}),ut()&&P(ft,{colorScheme:e}),t]})}import{isTauri as vt}from"@tauri-apps/api/core";import{isInitializedAtom as It,tauriInitializationAtom as kt}from"@vibingbase/common-client";import{atom as St,useAtomValue as At}from"jotai";var yt=St(t=>vt()?t(kt)??{status:"initializing"}:{status:t(It)?"initialized":"initializing"});function Be(){return At(yt)}export{re as Config,We as Provider,r as appId,xt as appVersion,Yt as clientMiddlewareFunction,L as isColorScheme,p as isLive,Ie as isMac,b as isTheme,Ae as isWindows,Be as useInitialization,z as useTheme};
13
+ `.trim()}}),Z);import{isAppTarget as nt}from"@vibingbase/common-client";import{isSSR as ot}from"@vibingbase/common-client";import{connect as rt,WindowMessenger as it}from"penpal";var x=a==="development-preview"||a==="production-preview";var E=a==="production-preview"||a==="production-release";var g=x&&!ot?await rt({messenger:new it({remoteWindow:parent,allowedOrigins:[E?"https://app.vibingbase.com":"http://localhost:1420","tauri://localhost","http://tauri.localhost","https://tauri.localhost"]})}).promise:void 0;function at(){try{if(g)return g.getAppTarget();let t=import.meta.env.VITE_VIBINGBASE_APP_TARGET;return nt(t)?t:void 0}catch{}}var l=await at();var Ie=l==="macOS";var Ae=l==="Windows";import{isTauri as ut}from"@tauri-apps/api/core";import{JotaiConnector as dt,TauriColorScheme as ft}from"@vibingbase/common-client";import{useEffect as ht}from"react";import{useColorScheme as st}from"@mantine/hooks";import{isSSR as mt}from"@vibingbase/common-client";import{useAtom as ct}from"jotai";import{atomWithStorage as pt}from"jotai/utils";function L(t){return t==="light"||t==="dark"}function b(t){return L(t)||t==="auto"}var lt=pt(`${r}/vibingbase-theme`,"auto",{getItem:(t,e)=>{if(mt)return e;let o=localStorage.getItem(t);return b(o)?o:e},setItem:(t,e)=>{localStorage.setItem(t,e)},removeItem:t=>{localStorage.removeItem(t)},subscribe:(t,e,o)=>{let s=i=>{i.storageArea===localStorage&&i.key===t&&e(b(i.newValue)?i.newValue:o)};return addEventListener("storage",s),()=>{removeEventListener("storage",s)}}},{getOnInit:!0});function z(){let[t,e]=ct(lt),o=st("light",{getInitialValueInEffect:!1});return{theme:t,setTheme:e,colorScheme:L(t)?t:o}}import{Fragment as gt,jsx as P,jsxs as wt}from"react/jsx-runtime";function We({children:t}){let{colorScheme:e,theme:o}=z();return ht(()=>{document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(e),document.documentElement.style.colorScheme=e},[e]),wt(gt,{children:[P(dt,{}),ut()&&P(ft,{colorScheme:o}),t]})}import{isTauri as vt}from"@tauri-apps/api/core";import{isInitializedAtom as It,tauriInitializationAtom as kt}from"@vibingbase/common-client";import{atom as St,useAtomValue as At}from"jotai";var yt=St(t=>vt()?t(kt)??{status:"initializing"}:{status:t(It)?"initialized":"initializing"});function Be(){return At(yt)}export{re as Config,We as Provider,r as appId,xt as appVersion,Yt as clientMiddlewareFunction,L as isColorScheme,p as isLive,Ie as isMac,b as isTheme,Ae as isWindows,Be as useInitialization,z as useTheme};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibingbase/react-router",
3
- "version": "0.12.15",
3
+ "version": "0.12.17",
4
4
  "keywords": [
5
5
  "vibingbase",
6
6
  "vibe-coding",
@@ -32,7 +32,7 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "@mantine/hooks": "^8.3.8",
35
+ "@mantine/hooks": "^8.3.9",
36
36
  "@tauri-apps/api": "^2.9.0",
37
37
  "@tauri-apps/plugin-deep-link": "^2.4.5",
38
38
  "@tauri-apps/plugin-process": "^2.3.1",
@@ -41,8 +41,8 @@
41
41
  "penpal": "^7.0.4",
42
42
  "react": "^19.2.0",
43
43
  "react-router": "^7.9.6",
44
- "@vibingbase/common-client": "^0.12.15",
45
- "@vibingbase/common-util": "^0.12.15"
44
+ "@vibingbase/common-client": "^0.12.17",
45
+ "@vibingbase/common-util": "^0.12.17"
46
46
  },
47
47
  "files": [
48
48
  "dist"