@urun-sh/react 0.1.13 → 0.1.14

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.14
4
+
5
+ - Read known public auth environment variables directly so browser bundlers can inline them.
6
+
3
7
  ## 0.1.13
4
8
 
5
9
  - Let explicit `NEXT_PUBLIC_AUTH_MODE` override production environment defaults.
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var fe=Object.create;var T=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var Se=Object.getPrototypeOf,ye=Object.prototype.hasOwnProperty;var ke=(t,e)=>{for(var r in e)T(t,r,{get:e[r],enumerable:!0})},V=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ve(e))!ye.call(t,o)&&o!==r&&T(t,o,{get:()=>e[o],enumerable:!(n=he(e,o))||n.enumerable});return t};var Pe=(t,e,r)=>(r=t!=null?fe(Se(t)):{},V(e||!t||!t.__esModule?T(r,"default",{value:t,enumerable:!0}):r,t)),xe=t=>V(T({},"__esModule",{value:!0}),t);var we={};ke(we,{ComponentRenderer:()=>te,ImageFrame:()=>pe,ImageFrameSchema:()=>ce,MetricsPanel:()=>me,MetricsPanelSchema:()=>de,ProgressCard:()=>oe,ProgressCardSchema:()=>ne,StatusBadge:()=>ie,StatusBadgeSchema:()=>se,TextStream:()=>ue,TextStreamSchema:()=>ae,UrunErrorBoundary:()=>m,UrunProvider:()=>q,authMode:()=>v,registerComponent:()=>ee,urunPublicEnv:()=>i,useApp:()=>Q,useImageFrame:()=>F,useMetricsPanel:()=>L,useProgressCard:()=>O,useStatusBadge:()=>W,useTextStream:()=>D,usesWorkOSAuth:()=>K});module.exports=xe(we);var A=require("react");var J=require("react"),f=require("react/jsx-runtime"),m=class extends J.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,r){console.error("[urun] Error caught by UrunErrorBoundary:",e,r)}render(){if(this.state.error){let{fallback:e}=this.props;return typeof e=="function"?e(this.state.error):e||(0,f.jsxs)("div",{role:"status","aria-live":"polite",style:{padding:"16px",border:"1px solid rgba(17, 24, 39, 0.12)",borderRadius:"8px",background:"#ffffff",color:"#111827",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',maxWidth:"360px"},children:[(0,f.jsx)("p",{style:{margin:0,fontWeight:600},children:"Connection interrupted"}),(0,f.jsx)("p",{style:{margin:"6px 0 0",color:"#4b5563"},children:"Reconnecting automatically."})]})}return this.props.children}};var X=require("react"),_=(0,X.createContext)(null);var h=require("react"),Z=require("react/jsx-runtime");function be({module:t,onToken:e}){let r;try{r=t.useAuth()}catch{r={}}return(0,h.useEffect)(()=>{let n=!1;async function o(){if(!(r.loading||r.isLoading))try{let c=r.getAccessToken?await r.getAccessToken():r.accessToken;n||e(c??void 0)}catch{n||e(void 0)}}o();let s=window.setInterval(()=>{o()},6e4);return()=>{n=!0,window.clearInterval(s)}},[r,r.accessToken,r.getAccessToken,r.isAuthenticated,r.isLoading,r.loading,r.user,e]),null}function H({onToken:t}){let[e,r]=(0,h.useState)(null);return(0,h.useEffect)(()=>{let n=!1;return import("@workos-inc/authkit-react").then(o=>{!n&&typeof o.useAuth=="function"&&r({useAuth:o.useAuth})}).catch(()=>{n||r(null)}),()=>{n=!0}},[]),e?(0,Z.jsx)(be,{module:e,onToken:t}):null}function i(t){let r=(typeof process<"u"?process.env:void 0)?.[t];return r&&r.trim()?r.trim():void 0}function v(){let t=i("NEXT_PUBLIC_AUTH_MODE")?.toLowerCase();return t==="jwt"||t==="customer-jwt"||t==="test-jwt"?"jwt":t==="workos"||i("VERCEL_ENV")==="production"?"workos":i("NEXT_PUBLIC_AUTH_ENABLED")==="false"?"jwt":"workos"}function K(){return v()==="workos"}var S=require("react/jsx-runtime");function q({baseUrl:t,orgId:e,appId:r,jwt:n,authProvider:o,fallback:s,children:c}){let[C,R]=(0,A.useState)(),w=i("NEXT_PUBLIC_SESSION_TOKEN")??i("NEXT_PUBLIC_URUN_JWT"),j=v(),z=j==="workos"&&!n,M=n??(j==="jwt"?w:void 0)??C,$=o??i("NEXT_PUBLIC_SESSION_AUTH_PROVIDER"),le=z&&!M,ge=(0,A.useMemo)(()=>({appId:r,baseUrl:t,orgId:e,jwt:M,authProvider:$}),[r,t,$,M,e]);return(0,S.jsxs)(m,{fallback:s,children:[z?(0,S.jsx)(H,{onToken:R}):null,le?null:(0,S.jsx)(_.Provider,{value:ge,children:c})]})}var a=require("react"),G=require("@urun-sh/core");function Ce(t,e){return`${t}:${JSON.stringify(e??{})}`}var N=class{constructor(e,r){this._doc=e;this._notify=r;this._unsubscribeChange=this._doc.on("change",()=>this._notify())}_doc;_notify;_unsubscribeChange;get(e,r){return this._doc.get(e,r)}set(e){this._doc.set(e),this._notify()}on(e,r){return this._doc.on(e,n=>r(n))}dispose(){this._unsubscribeChange()}},I=class{constructor(e,r){this._stream=e;this._notify=r;this._unsubscribeTrack=this._stream.on("track",()=>this._notify())}_stream;_notify;_unsubscribeTrack;get track(){return this._stream.track}attach(e){return this._stream.attach(e)}detach(){return this._stream.detach()}seek(e){return this._stream.seek(e)}on(e,r){return this._stream.on(e,r)}dispose(){this._unsubscribeTrack()}},B=class{constructor(e,r){this._session=e;this._notify=r}_session;_notify;_docs=new Map;_streams=new Map;get id(){return this._session.id}doc(e){let r=this._docs.get(e);return r||(r=new N(this._session.doc(e),this._notify),this._docs.set(e,r)),r}stream(e){let r=this._streams.get(e);return r||(r=new I(this._session.stream(e),this._notify),this._streams.set(e,r)),r}disconnect(){for(let e of this._docs.values())e.dispose();for(let e of this._streams.values())e.dispose();this._docs.clear(),this._streams.clear(),this._session.disconnect(),this._notify()}};function Q(){let t=(0,a.useContext)(_);if(!t)throw new Error("useApp must be used within <UrunProvider>");if(!t.appId)throw new Error('useApp requires <UrunProvider appId="...">');let[,e]=(0,a.useReducer)(o=>o+1,0),r=(0,a.useRef)(new Map),n=(0,a.useMemo)(()=>(0,G.App)(t.appId,{baseUrl:t.baseUrl,orgId:t.orgId,jwt:t.jwt,authProvider:t.authProvider}),[t.appId,t.baseUrl,t.orgId,t.jwt,t.authProvider]);return(0,a.useMemo)(()=>new Proxy({},{get(o,s){if(typeof s=="string")return c=>{let C=Ce(s,c),R=r.current.get(C);if(R)return R;let w=new B(n[s](c),e);return r.current.set(C,w),w}}}),[n])}var Y=new Map;function ee(t,e,r){if(!r||typeof r.safeParse!="function")throw new Error(`registerComponent("${t}"): schema must be a valid Zod schema`);Y.set(t,{component:e,schema:r})}function re(t,e){let r=Y.get(t);if(!r)return{error:`Unknown component: "${t}"`};let n=r.schema.safeParse(e);return n.success?{Component:r.component,validatedProps:n.data}:{error:`Validation failed for "${t}": ${n.error.message}`}}var p=require("react/jsx-runtime");function te({name:t,props:e,fallback:r}){let n=re(t,e);if(n.error)return console.warn(`[urun] ComponentRenderer: ${n.error}`),r?(0,p.jsx)(p.Fragment,{children:r}):(0,p.jsx)("div",{className:"urun-component-error",role:"alert",children:(0,p.jsx)("span",{className:"urun-component-error-text",children:n.error})});let o=n.Component;return(0,p.jsx)(o,{...n.validatedProps})}var l=require("zod"),d=require("react/jsx-runtime"),ne=l.z.object({step:l.z.number().min(0),total:l.z.number().min(1),label:l.z.string().optional(),variant:l.z.enum(["default","success","error"]).default("default")});function O(t){let{step:e,total:r,label:n,variant:o="default"}=t,s=Math.min(e/r*100,100),c=e>=r;return{step:e,total:r,label:n,variant:o,percentage:s,isComplete:c}}function oe(t){let{step:e,total:r,label:n,variant:o,percentage:s}=O(t);return(0,d.jsxs)("div",{className:"urun-progress-card","data-variant":o,children:[n&&(0,d.jsx)("div",{className:"urun-progress-label",children:n}),(0,d.jsx)("div",{className:"urun-progress-bar",children:(0,d.jsx)("div",{className:"urun-progress-fill",style:{width:`${s}%`}})}),(0,d.jsxs)("div",{className:"urun-progress-text",children:[e,"/",r]})]})}var E=require("zod"),y=require("react/jsx-runtime"),se=E.z.object({state:E.z.enum(["thinking","generating","idle","error"]),message:E.z.string().optional()}),Re={thinking:"Thinking...",generating:"Generating...",idle:"Idle",error:"Error"};function W(t){let{state:e,message:r}=t,n=e==="thinking"||e==="generating",o=r??Re[e]??e;return{state:e,message:o,isActive:n}}function ie(t){let{state:e,message:r,isActive:n}=W(t);return(0,y.jsxs)("span",{className:"urun-status-badge","data-state":e,children:[(0,y.jsx)("span",{className:`urun-status-indicator${n?" urun-status-pulse":""}`}),(0,y.jsx)("span",{className:"urun-status-message",children:r})]})}var k=require("react"),U=require("zod"),P=require("react/jsx-runtime"),ae=U.z.object({text:U.z.string(),streaming:U.z.boolean().default(!1)});function D(t){let{text:e,streaming:r=!1}=t,n=e.length===0;return{text:e,streaming:r,isEmpty:n}}function ue(t){let{text:e,streaming:r}=D(t),n=(0,k.useRef)(null),o=(0,k.useRef)(0);return(0,k.useEffect)(()=>{let s=n.current;s&&e.length!==o.current&&(s.textContent=e,o.current=e.length)},[e]),(0,P.jsxs)("div",{className:"urun-text-stream",children:[(0,P.jsx)("span",{ref:n,className:"urun-text-content"}),r&&(0,P.jsx)("span",{className:"urun-text-cursor"})]})}var x=require("zod"),b=require("react/jsx-runtime"),ce=x.z.object({src:x.z.string().url(),alt:x.z.string().optional(),caption:x.z.string().optional()});function F(t){let{src:e,alt:r,caption:n}=t;return{src:e,alt:r??"",caption:n}}function pe(t){let{src:e,alt:r,caption:n}=F(t);return(0,b.jsxs)("figure",{className:"urun-image-frame",children:[(0,b.jsx)("img",{className:"urun-image",src:e,alt:r}),n&&(0,b.jsx)("figcaption",{className:"urun-image-caption",children:n})]})}var u=require("zod"),g=require("react/jsx-runtime"),de=u.z.object({metrics:u.z.array(u.z.object({label:u.z.string(),value:u.z.union([u.z.string(),u.z.number()]),unit:u.z.string().optional()}))});function L(t){return{metrics:t.metrics.map(r=>({...r,displayValue:r.unit?`${r.value} ${r.unit}`:String(r.value)}))}}function me(t){let{metrics:e}=L(t);return(0,g.jsx)("div",{className:"urun-metrics-panel",children:e.map((r,n)=>(0,g.jsxs)("div",{className:"urun-metric-card",children:[(0,g.jsx)("div",{className:"urun-metric-label",children:r.label}),(0,g.jsx)("div",{className:"urun-metric-value",children:r.displayValue})]},n))})}0&&(module.exports={ComponentRenderer,ImageFrame,ImageFrameSchema,MetricsPanel,MetricsPanelSchema,ProgressCard,ProgressCardSchema,StatusBadge,StatusBadgeSchema,TextStream,TextStreamSchema,UrunErrorBoundary,UrunProvider,authMode,registerComponent,urunPublicEnv,useApp,useImageFrame,useMetricsPanel,useProgressCard,useStatusBadge,useTextStream,usesWorkOSAuth});
1
+ "use strict";var he=Object.create;var b=Object.defineProperty;var Se=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var ye=Object.getPrototypeOf,Pe=Object.prototype.hasOwnProperty;var _e=(t,e)=>{for(var r in e)b(t,r,{get:e[r],enumerable:!0})},$=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ve(e))!Pe.call(t,o)&&o!==r&&b(t,o,{get:()=>e[o],enumerable:!(n=Se(e,o))||n.enumerable});return t};var ke=(t,e,r)=>(r=t!=null?he(ye(t)):{},$(e||!t||!t.__esModule?b(r,"default",{value:t,enumerable:!0}):r,t)),Ce=t=>$(b({},"__esModule",{value:!0}),t);var Ee={};_e(Ee,{ComponentRenderer:()=>ne,ImageFrame:()=>de,ImageFrameSchema:()=>pe,MetricsPanel:()=>le,MetricsPanelSchema:()=>me,ProgressCard:()=>se,ProgressCardSchema:()=>oe,StatusBadge:()=>ae,StatusBadgeSchema:()=>ie,TextStream:()=>ce,TextStreamSchema:()=>ue,UrunErrorBoundary:()=>l,UrunProvider:()=>G,authMode:()=>v,registerComponent:()=>re,urunPublicEnv:()=>i,useApp:()=>Y,useImageFrame:()=>V,useMetricsPanel:()=>X,useProgressCard:()=>L,useStatusBadge:()=>D,useTextStream:()=>W,usesWorkOSAuth:()=>q});module.exports=Ce(Ee);var N=require("react");var H=require("react"),h=require("react/jsx-runtime"),l=class extends H.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,r){console.error("[urun] Error caught by UrunErrorBoundary:",e,r)}render(){if(this.state.error){let{fallback:e}=this.props;return typeof e=="function"?e(this.state.error):e||(0,h.jsxs)("div",{role:"status","aria-live":"polite",style:{padding:"16px",border:"1px solid rgba(17, 24, 39, 0.12)",borderRadius:"8px",background:"#ffffff",color:"#111827",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',maxWidth:"360px"},children:[(0,h.jsx)("p",{style:{margin:0,fontWeight:600},children:"Connection interrupted"}),(0,h.jsx)("p",{style:{margin:"6px 0 0",color:"#4b5563"},children:"Reconnecting automatically."})]})}return this.props.children}};var J=require("react"),w=(0,J.createContext)(null);var S=require("react"),Z=require("react/jsx-runtime");function Te({module:t,onToken:e}){let r;try{r=t.useAuth()}catch{r={}}return(0,S.useEffect)(()=>{let n=!1;async function o(){if(!(r.loading||r.isLoading))try{let c=r.getAccessToken?await r.getAccessToken():r.accessToken;n||e(c??void 0)}catch{n||e(void 0)}}o();let s=window.setInterval(()=>{o()},6e4);return()=>{n=!0,window.clearInterval(s)}},[r,r.accessToken,r.getAccessToken,r.isAuthenticated,r.isLoading,r.loading,r.user,e]),null}function K({onToken:t}){let[e,r]=(0,S.useState)(null);return(0,S.useEffect)(()=>{let n=!1;return import("@workos-inc/authkit-react").then(o=>{!n&&typeof o.useAuth=="function"&&r({useAuth:o.useAuth})}).catch(()=>{n||r(null)}),()=>{n=!0}},[]),e?(0,Z.jsx)(Te,{module:e,onToken:t}):null}function p(t){return t&&t.trim()?t.trim():void 0}function i(t){switch(t){case"NEXT_PUBLIC_AUTH_MODE":return p(typeof process<"u"?process.env?.NEXT_PUBLIC_AUTH_MODE:void 0);case"NEXT_PUBLIC_AUTH_ENABLED":return p(typeof process<"u"?process.env?.NEXT_PUBLIC_AUTH_ENABLED:void 0);case"NEXT_PUBLIC_SESSION_AUTH_PROVIDER":return p(typeof process<"u"?process.env?.NEXT_PUBLIC_SESSION_AUTH_PROVIDER:void 0);case"NEXT_PUBLIC_SESSION_TOKEN":return p(typeof process<"u"?process.env?.NEXT_PUBLIC_SESSION_TOKEN:void 0);case"NEXT_PUBLIC_URUN_JWT":return p(typeof process<"u"?process.env?.NEXT_PUBLIC_URUN_JWT:void 0);case"VERCEL_ENV":return p(typeof process<"u"?process.env?.VERCEL_ENV:void 0);default:return p(typeof process<"u"?process.env?.[t]:void 0)}}function v(){let t=i("NEXT_PUBLIC_AUTH_MODE")?.toLowerCase();return t==="jwt"||t==="customer-jwt"||t==="test-jwt"?"jwt":t==="workos"||i("VERCEL_ENV")==="production"?"workos":i("NEXT_PUBLIC_AUTH_ENABLED")==="false"?"jwt":"workos"}function q(){return v()==="workos"}var y=require("react/jsx-runtime");function G({baseUrl:t,orgId:e,appId:r,jwt:n,authProvider:o,fallback:s,children:c}){let[x,R]=(0,N.useState)(),E=i("NEXT_PUBLIC_SESSION_TOKEN")??i("NEXT_PUBLIC_URUN_JWT"),F=v(),j=F==="workos"&&!n,I=n??(F==="jwt"?E:void 0)??x,z=o??i("NEXT_PUBLIC_SESSION_AUTH_PROVIDER"),fe=j&&!I,ge=(0,N.useMemo)(()=>({appId:r,baseUrl:t,orgId:e,jwt:I,authProvider:z}),[r,t,z,I,e]);return(0,y.jsxs)(l,{fallback:s,children:[j?(0,y.jsx)(K,{onToken:R}):null,fe?null:(0,y.jsx)(w.Provider,{value:ge,children:c})]})}var a=require("react"),Q=require("@urun-sh/core");function xe(t,e){return`${t}:${JSON.stringify(e??{})}`}var B=class{constructor(e,r){this._doc=e;this._notify=r;this._unsubscribeChange=this._doc.on("change",()=>this._notify())}_doc;_notify;_unsubscribeChange;get(e,r){return this._doc.get(e,r)}set(e){this._doc.set(e),this._notify()}on(e,r){return this._doc.on(e,n=>r(n))}dispose(){this._unsubscribeChange()}},M=class{constructor(e,r){this._stream=e;this._notify=r;this._unsubscribeTrack=this._stream.on("track",()=>this._notify())}_stream;_notify;_unsubscribeTrack;get track(){return this._stream.track}attach(e){return this._stream.attach(e)}detach(){return this._stream.detach()}seek(e){return this._stream.seek(e)}on(e,r){return this._stream.on(e,r)}dispose(){this._unsubscribeTrack()}},O=class{constructor(e,r){this._session=e;this._notify=r}_session;_notify;_docs=new Map;_streams=new Map;get id(){return this._session.id}doc(e){let r=this._docs.get(e);return r||(r=new B(this._session.doc(e),this._notify),this._docs.set(e,r)),r}stream(e){let r=this._streams.get(e);return r||(r=new M(this._session.stream(e),this._notify),this._streams.set(e,r)),r}disconnect(){for(let e of this._docs.values())e.dispose();for(let e of this._streams.values())e.dispose();this._docs.clear(),this._streams.clear(),this._session.disconnect(),this._notify()}};function Y(){let t=(0,a.useContext)(w);if(!t)throw new Error("useApp must be used within <UrunProvider>");if(!t.appId)throw new Error('useApp requires <UrunProvider appId="...">');let[,e]=(0,a.useReducer)(o=>o+1,0),r=(0,a.useRef)(new Map),n=(0,a.useMemo)(()=>(0,Q.App)(t.appId,{baseUrl:t.baseUrl,orgId:t.orgId,jwt:t.jwt,authProvider:t.authProvider}),[t.appId,t.baseUrl,t.orgId,t.jwt,t.authProvider]);return(0,a.useMemo)(()=>new Proxy({},{get(o,s){if(typeof s=="string")return c=>{let x=xe(s,c),R=r.current.get(x);if(R)return R;let E=new O(n[s](c),e);return r.current.set(x,E),E}}}),[n])}var ee=new Map;function re(t,e,r){if(!r||typeof r.safeParse!="function")throw new Error(`registerComponent("${t}"): schema must be a valid Zod schema`);ee.set(t,{component:e,schema:r})}function te(t,e){let r=ee.get(t);if(!r)return{error:`Unknown component: "${t}"`};let n=r.schema.safeParse(e);return n.success?{Component:r.component,validatedProps:n.data}:{error:`Validation failed for "${t}": ${n.error.message}`}}var d=require("react/jsx-runtime");function ne({name:t,props:e,fallback:r}){let n=te(t,e);if(n.error)return console.warn(`[urun] ComponentRenderer: ${n.error}`),r?(0,d.jsx)(d.Fragment,{children:r}):(0,d.jsx)("div",{className:"urun-component-error",role:"alert",children:(0,d.jsx)("span",{className:"urun-component-error-text",children:n.error})});let o=n.Component;return(0,d.jsx)(o,{...n.validatedProps})}var f=require("zod"),m=require("react/jsx-runtime"),oe=f.z.object({step:f.z.number().min(0),total:f.z.number().min(1),label:f.z.string().optional(),variant:f.z.enum(["default","success","error"]).default("default")});function L(t){let{step:e,total:r,label:n,variant:o="default"}=t,s=Math.min(e/r*100,100),c=e>=r;return{step:e,total:r,label:n,variant:o,percentage:s,isComplete:c}}function se(t){let{step:e,total:r,label:n,variant:o,percentage:s}=L(t);return(0,m.jsxs)("div",{className:"urun-progress-card","data-variant":o,children:[n&&(0,m.jsx)("div",{className:"urun-progress-label",children:n}),(0,m.jsx)("div",{className:"urun-progress-bar",children:(0,m.jsx)("div",{className:"urun-progress-fill",style:{width:`${s}%`}})}),(0,m.jsxs)("div",{className:"urun-progress-text",children:[e,"/",r]})]})}var U=require("zod"),P=require("react/jsx-runtime"),ie=U.z.object({state:U.z.enum(["thinking","generating","idle","error"]),message:U.z.string().optional()}),Re={thinking:"Thinking...",generating:"Generating...",idle:"Idle",error:"Error"};function D(t){let{state:e,message:r}=t,n=e==="thinking"||e==="generating",o=r??Re[e]??e;return{state:e,message:o,isActive:n}}function ae(t){let{state:e,message:r,isActive:n}=D(t);return(0,P.jsxs)("span",{className:"urun-status-badge","data-state":e,children:[(0,P.jsx)("span",{className:`urun-status-indicator${n?" urun-status-pulse":""}`}),(0,P.jsx)("span",{className:"urun-status-message",children:r})]})}var _=require("react"),A=require("zod"),k=require("react/jsx-runtime"),ue=A.z.object({text:A.z.string(),streaming:A.z.boolean().default(!1)});function W(t){let{text:e,streaming:r=!1}=t,n=e.length===0;return{text:e,streaming:r,isEmpty:n}}function ce(t){let{text:e,streaming:r}=W(t),n=(0,_.useRef)(null),o=(0,_.useRef)(0);return(0,_.useEffect)(()=>{let s=n.current;s&&e.length!==o.current&&(s.textContent=e,o.current=e.length)},[e]),(0,k.jsxs)("div",{className:"urun-text-stream",children:[(0,k.jsx)("span",{ref:n,className:"urun-text-content"}),r&&(0,k.jsx)("span",{className:"urun-text-cursor"})]})}var C=require("zod"),T=require("react/jsx-runtime"),pe=C.z.object({src:C.z.string().url(),alt:C.z.string().optional(),caption:C.z.string().optional()});function V(t){let{src:e,alt:r,caption:n}=t;return{src:e,alt:r??"",caption:n}}function de(t){let{src:e,alt:r,caption:n}=V(t);return(0,T.jsxs)("figure",{className:"urun-image-frame",children:[(0,T.jsx)("img",{className:"urun-image",src:e,alt:r}),n&&(0,T.jsx)("figcaption",{className:"urun-image-caption",children:n})]})}var u=require("zod"),g=require("react/jsx-runtime"),me=u.z.object({metrics:u.z.array(u.z.object({label:u.z.string(),value:u.z.union([u.z.string(),u.z.number()]),unit:u.z.string().optional()}))});function X(t){return{metrics:t.metrics.map(r=>({...r,displayValue:r.unit?`${r.value} ${r.unit}`:String(r.value)}))}}function le(t){let{metrics:e}=X(t);return(0,g.jsx)("div",{className:"urun-metrics-panel",children:e.map((r,n)=>(0,g.jsxs)("div",{className:"urun-metric-card",children:[(0,g.jsx)("div",{className:"urun-metric-label",children:r.label}),(0,g.jsx)("div",{className:"urun-metric-value",children:r.displayValue})]},n))})}0&&(module.exports={ComponentRenderer,ImageFrame,ImageFrameSchema,MetricsPanel,MetricsPanelSchema,ProgressCard,ProgressCardSchema,StatusBadge,StatusBadgeSchema,TextStream,TextStreamSchema,UrunErrorBoundary,UrunProvider,authMode,registerComponent,urunPublicEnv,useApp,useImageFrame,useMetricsPanel,useProgressCard,useStatusBadge,useTextStream,usesWorkOSAuth});
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{useMemo as re,useState as te}from"react";import{Component as Z}from"react";import{jsx as A,jsxs as K}from"react/jsx-runtime";var c=class extends Z{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,r){console.error("[urun] Error caught by UrunErrorBoundary:",e,r)}render(){if(this.state.error){let{fallback:e}=this.props;return typeof e=="function"?e(this.state.error):e||K("div",{role:"status","aria-live":"polite",style:{padding:"16px",border:"1px solid rgba(17, 24, 39, 0.12)",borderRadius:"8px",background:"#ffffff",color:"#111827",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',maxWidth:"360px"},children:[A("p",{style:{margin:0,fontWeight:600},children:"Connection interrupted"}),A("p",{style:{margin:"6px 0 0",color:"#4b5563"},children:"Reconnecting automatically."})]})}return this.props.children}};import{createContext as q}from"react";var g=q(null);import{useEffect as E,useState as G}from"react";import{jsx as Y}from"react/jsx-runtime";function Q({module:t,onToken:e}){let r;try{r=t.useAuth()}catch{r={}}return E(()=>{let n=!1;async function o(){if(!(r.loading||r.isLoading))try{let i=r.getAccessToken?await r.getAccessToken():r.accessToken;n||e(i??void 0)}catch{n||e(void 0)}}o();let s=window.setInterval(()=>{o()},6e4);return()=>{n=!0,window.clearInterval(s)}},[r,r.accessToken,r.getAccessToken,r.isAuthenticated,r.isLoading,r.loading,r.user,e]),null}function U({onToken:t}){let[e,r]=G(null);return E(()=>{let n=!1;return import("@workos-inc/authkit-react").then(o=>{!n&&typeof o.useAuth=="function"&&r({useAuth:o.useAuth})}).catch(()=>{n||r(null)}),()=>{n=!0}},[]),e?Y(Q,{module:e,onToken:t}):null}function a(t){let r=(typeof process<"u"?process.env:void 0)?.[t];return r&&r.trim()?r.trim():void 0}function f(){let t=a("NEXT_PUBLIC_AUTH_MODE")?.toLowerCase();return t==="jwt"||t==="customer-jwt"||t==="test-jwt"?"jwt":t==="workos"||a("VERCEL_ENV")==="production"?"workos":a("NEXT_PUBLIC_AUTH_ENABLED")==="false"?"jwt":"workos"}function ee(){return f()==="workos"}import{jsx as M,jsxs as oe}from"react/jsx-runtime";function ne({baseUrl:t,orgId:e,appId:r,jwt:n,authProvider:o,fallback:s,children:i}){let[d,m]=te(),l=a("NEXT_PUBLIC_SESSION_TOKEN")??a("NEXT_PUBLIC_URUN_JWT"),w=f(),T=w==="workos"&&!n,S=n??(w==="jwt"?l:void 0)??d,_=o??a("NEXT_PUBLIC_SESSION_AUTH_PROVIDER"),X=T&&!S,H=re(()=>({appId:r,baseUrl:t,orgId:e,jwt:S,authProvider:_}),[r,t,_,S,e]);return oe(c,{fallback:s,children:[T?M(U,{onToken:m}):null,X?null:M(g.Provider,{value:H,children:i})]})}import{useContext as se,useMemo as N,useReducer as ie,useRef as ae}from"react";import{App as ue}from"@urun-sh/core";function ce(t,e){return`${t}:${JSON.stringify(e??{})}`}var y=class{constructor(e,r){this._doc=e;this._notify=r;this._unsubscribeChange=this._doc.on("change",()=>this._notify())}_doc;_notify;_unsubscribeChange;get(e,r){return this._doc.get(e,r)}set(e){this._doc.set(e),this._notify()}on(e,r){return this._doc.on(e,n=>r(n))}dispose(){this._unsubscribeChange()}},k=class{constructor(e,r){this._stream=e;this._notify=r;this._unsubscribeTrack=this._stream.on("track",()=>this._notify())}_stream;_notify;_unsubscribeTrack;get track(){return this._stream.track}attach(e){return this._stream.attach(e)}detach(){return this._stream.detach()}seek(e){return this._stream.seek(e)}on(e,r){return this._stream.on(e,r)}dispose(){this._unsubscribeTrack()}},P=class{constructor(e,r){this._session=e;this._notify=r}_session;_notify;_docs=new Map;_streams=new Map;get id(){return this._session.id}doc(e){let r=this._docs.get(e);return r||(r=new y(this._session.doc(e),this._notify),this._docs.set(e,r)),r}stream(e){let r=this._streams.get(e);return r||(r=new k(this._session.stream(e),this._notify),this._streams.set(e,r)),r}disconnect(){for(let e of this._docs.values())e.dispose();for(let e of this._streams.values())e.dispose();this._docs.clear(),this._streams.clear(),this._session.disconnect(),this._notify()}};function pe(){let t=se(g);if(!t)throw new Error("useApp must be used within <UrunProvider>");if(!t.appId)throw new Error('useApp requires <UrunProvider appId="...">');let[,e]=ie(o=>o+1,0),r=ae(new Map),n=N(()=>ue(t.appId,{baseUrl:t.baseUrl,orgId:t.orgId,jwt:t.jwt,authProvider:t.authProvider}),[t.appId,t.baseUrl,t.orgId,t.jwt,t.authProvider]);return N(()=>new Proxy({},{get(o,s){if(typeof s=="string")return i=>{let d=ce(s,i),m=r.current.get(d);if(m)return m;let l=new P(n[s](i),e);return r.current.set(d,l),l}}}),[n])}var I=new Map;function de(t,e,r){if(!r||typeof r.safeParse!="function")throw new Error(`registerComponent("${t}"): schema must be a valid Zod schema`);I.set(t,{component:e,schema:r})}function B(t,e){let r=I.get(t);if(!r)return{error:`Unknown component: "${t}"`};let n=r.schema.safeParse(e);return n.success?{Component:r.component,validatedProps:n.data}:{error:`Validation failed for "${t}": ${n.error.message}`}}import{Fragment as le,jsx as h}from"react/jsx-runtime";function me({name:t,props:e,fallback:r}){let n=B(t,e);if(n.error)return console.warn(`[urun] ComponentRenderer: ${n.error}`),r?h(le,{children:r}):h("div",{className:"urun-component-error",role:"alert",children:h("span",{className:"urun-component-error-text",children:n.error})});let o=n.Component;return h(o,{...n.validatedProps})}import{z as p}from"zod";import{jsx as x,jsxs as O}from"react/jsx-runtime";var ge=p.object({step:p.number().min(0),total:p.number().min(1),label:p.string().optional(),variant:p.enum(["default","success","error"]).default("default")});function W(t){let{step:e,total:r,label:n,variant:o="default"}=t,s=Math.min(e/r*100,100),i=e>=r;return{step:e,total:r,label:n,variant:o,percentage:s,isComplete:i}}function fe(t){let{step:e,total:r,label:n,variant:o,percentage:s}=W(t);return O("div",{className:"urun-progress-card","data-variant":o,children:[n&&x("div",{className:"urun-progress-label",children:n}),x("div",{className:"urun-progress-bar",children:x("div",{className:"urun-progress-fill",style:{width:`${s}%`}})}),O("div",{className:"urun-progress-text",children:[e,"/",r]})]})}import{z as b}from"zod";import{jsx as D,jsxs as ye}from"react/jsx-runtime";var he=b.object({state:b.enum(["thinking","generating","idle","error"]),message:b.string().optional()}),ve={thinking:"Thinking...",generating:"Generating...",idle:"Idle",error:"Error"};function F(t){let{state:e,message:r}=t,n=e==="thinking"||e==="generating",o=r??ve[e]??e;return{state:e,message:o,isActive:n}}function Se(t){let{state:e,message:r,isActive:n}=F(t);return ye("span",{className:"urun-status-badge","data-state":e,children:[D("span",{className:`urun-status-indicator${n?" urun-status-pulse":""}`}),D("span",{className:"urun-status-message",children:r})]})}import{useRef as L,useEffect as ke}from"react";import{z as C}from"zod";import{jsx as j,jsxs as be}from"react/jsx-runtime";var Pe=C.object({text:C.string(),streaming:C.boolean().default(!1)});function z(t){let{text:e,streaming:r=!1}=t,n=e.length===0;return{text:e,streaming:r,isEmpty:n}}function xe(t){let{text:e,streaming:r}=z(t),n=L(null),o=L(0);return ke(()=>{let s=n.current;s&&e.length!==o.current&&(s.textContent=e,o.current=e.length)},[e]),be("div",{className:"urun-text-stream",children:[j("span",{ref:n,className:"urun-text-content"}),r&&j("span",{className:"urun-text-cursor"})]})}import{z as v}from"zod";import{jsx as $,jsxs as we}from"react/jsx-runtime";var Ce=v.object({src:v.string().url(),alt:v.string().optional(),caption:v.string().optional()});function V(t){let{src:e,alt:r,caption:n}=t;return{src:e,alt:r??"",caption:n}}function Re(t){let{src:e,alt:r,caption:n}=V(t);return we("figure",{className:"urun-image-frame",children:[$("img",{className:"urun-image",src:e,alt:r}),n&&$("figcaption",{className:"urun-image-caption",children:n})]})}import{z as u}from"zod";import{jsx as R,jsxs as Ae}from"react/jsx-runtime";var Te=u.object({metrics:u.array(u.object({label:u.string(),value:u.union([u.string(),u.number()]),unit:u.string().optional()}))});function J(t){return{metrics:t.metrics.map(r=>({...r,displayValue:r.unit?`${r.value} ${r.unit}`:String(r.value)}))}}function _e(t){let{metrics:e}=J(t);return R("div",{className:"urun-metrics-panel",children:e.map((r,n)=>Ae("div",{className:"urun-metric-card",children:[R("div",{className:"urun-metric-label",children:r.label}),R("div",{className:"urun-metric-value",children:r.displayValue})]},n))})}export{me as ComponentRenderer,Re as ImageFrame,Ce as ImageFrameSchema,_e as MetricsPanel,Te as MetricsPanelSchema,fe as ProgressCard,ge as ProgressCardSchema,Se as StatusBadge,he as StatusBadgeSchema,xe as TextStream,Pe as TextStreamSchema,c as UrunErrorBoundary,ne as UrunProvider,f as authMode,de as registerComponent,a as urunPublicEnv,pe as useApp,V as useImageFrame,J as useMetricsPanel,W as useProgressCard,F as useStatusBadge,z as useTextStream,ee as usesWorkOSAuth};
1
+ import{useMemo as te,useState as ne}from"react";import{Component as Z}from"react";import{jsx as N,jsxs as q}from"react/jsx-runtime";var p=class extends Z{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,r){console.error("[urun] Error caught by UrunErrorBoundary:",e,r)}render(){if(this.state.error){let{fallback:e}=this.props;return typeof e=="function"?e(this.state.error):e||q("div",{role:"status","aria-live":"polite",style:{padding:"16px",border:"1px solid rgba(17, 24, 39, 0.12)",borderRadius:"8px",background:"#ffffff",color:"#111827",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',maxWidth:"360px"},children:[N("p",{style:{margin:0,fontWeight:600},children:"Connection interrupted"}),N("p",{style:{margin:"6px 0 0",color:"#4b5563"},children:"Reconnecting automatically."})]})}return this.props.children}};import{createContext as G}from"react";var g=G(null);import{useEffect as U,useState as Q}from"react";import{jsx as ee}from"react/jsx-runtime";function Y({module:t,onToken:e}){let r;try{r=t.useAuth()}catch{r={}}return U(()=>{let n=!1;async function o(){if(!(r.loading||r.isLoading))try{let i=r.getAccessToken?await r.getAccessToken():r.accessToken;n||e(i??void 0)}catch{n||e(void 0)}}o();let s=window.setInterval(()=>{o()},6e4);return()=>{n=!0,window.clearInterval(s)}},[r,r.accessToken,r.getAccessToken,r.isAuthenticated,r.isLoading,r.loading,r.user,e]),null}function A({onToken:t}){let[e,r]=Q(null);return U(()=>{let n=!1;return import("@workos-inc/authkit-react").then(o=>{!n&&typeof o.useAuth=="function"&&r({useAuth:o.useAuth})}).catch(()=>{n||r(null)}),()=>{n=!0}},[]),e?ee(Y,{module:e,onToken:t}):null}function c(t){return t&&t.trim()?t.trim():void 0}function a(t){switch(t){case"NEXT_PUBLIC_AUTH_MODE":return c(typeof process<"u"?process.env?.NEXT_PUBLIC_AUTH_MODE:void 0);case"NEXT_PUBLIC_AUTH_ENABLED":return c(typeof process<"u"?process.env?.NEXT_PUBLIC_AUTH_ENABLED:void 0);case"NEXT_PUBLIC_SESSION_AUTH_PROVIDER":return c(typeof process<"u"?process.env?.NEXT_PUBLIC_SESSION_AUTH_PROVIDER:void 0);case"NEXT_PUBLIC_SESSION_TOKEN":return c(typeof process<"u"?process.env?.NEXT_PUBLIC_SESSION_TOKEN:void 0);case"NEXT_PUBLIC_URUN_JWT":return c(typeof process<"u"?process.env?.NEXT_PUBLIC_URUN_JWT:void 0);case"VERCEL_ENV":return c(typeof process<"u"?process.env?.VERCEL_ENV:void 0);default:return c(typeof process<"u"?process.env?.[t]:void 0)}}function h(){let t=a("NEXT_PUBLIC_AUTH_MODE")?.toLowerCase();return t==="jwt"||t==="customer-jwt"||t==="test-jwt"?"jwt":t==="workos"||a("VERCEL_ENV")==="production"?"workos":a("NEXT_PUBLIC_AUTH_ENABLED")==="false"?"jwt":"workos"}function re(){return h()==="workos"}import{jsx as I,jsxs as se}from"react/jsx-runtime";function oe({baseUrl:t,orgId:e,appId:r,jwt:n,authProvider:o,fallback:s,children:i}){let[m,l]=ne(),f=a("NEXT_PUBLIC_SESSION_TOKEN")??a("NEXT_PUBLIC_URUN_JWT"),E=h(),b=E==="workos"&&!n,y=n??(E==="jwt"?f:void 0)??m,w=o??a("NEXT_PUBLIC_SESSION_AUTH_PROVIDER"),J=b&&!y,K=te(()=>({appId:r,baseUrl:t,orgId:e,jwt:y,authProvider:w}),[r,t,w,y,e]);return se(p,{fallback:s,children:[b?I(A,{onToken:l}):null,J?null:I(g.Provider,{value:K,children:i})]})}import{useContext as ie,useMemo as B,useReducer as ae,useRef as ue}from"react";import{App as ce}from"@urun-sh/core";function pe(t,e){return`${t}:${JSON.stringify(e??{})}`}var P=class{constructor(e,r){this._doc=e;this._notify=r;this._unsubscribeChange=this._doc.on("change",()=>this._notify())}_doc;_notify;_unsubscribeChange;get(e,r){return this._doc.get(e,r)}set(e){this._doc.set(e),this._notify()}on(e,r){return this._doc.on(e,n=>r(n))}dispose(){this._unsubscribeChange()}},_=class{constructor(e,r){this._stream=e;this._notify=r;this._unsubscribeTrack=this._stream.on("track",()=>this._notify())}_stream;_notify;_unsubscribeTrack;get track(){return this._stream.track}attach(e){return this._stream.attach(e)}detach(){return this._stream.detach()}seek(e){return this._stream.seek(e)}on(e,r){return this._stream.on(e,r)}dispose(){this._unsubscribeTrack()}},k=class{constructor(e,r){this._session=e;this._notify=r}_session;_notify;_docs=new Map;_streams=new Map;get id(){return this._session.id}doc(e){let r=this._docs.get(e);return r||(r=new P(this._session.doc(e),this._notify),this._docs.set(e,r)),r}stream(e){let r=this._streams.get(e);return r||(r=new _(this._session.stream(e),this._notify),this._streams.set(e,r)),r}disconnect(){for(let e of this._docs.values())e.dispose();for(let e of this._streams.values())e.dispose();this._docs.clear(),this._streams.clear(),this._session.disconnect(),this._notify()}};function de(){let t=ie(g);if(!t)throw new Error("useApp must be used within <UrunProvider>");if(!t.appId)throw new Error('useApp requires <UrunProvider appId="...">');let[,e]=ae(o=>o+1,0),r=ue(new Map),n=B(()=>ce(t.appId,{baseUrl:t.baseUrl,orgId:t.orgId,jwt:t.jwt,authProvider:t.authProvider}),[t.appId,t.baseUrl,t.orgId,t.jwt,t.authProvider]);return B(()=>new Proxy({},{get(o,s){if(typeof s=="string")return i=>{let m=pe(s,i),l=r.current.get(m);if(l)return l;let f=new k(n[s](i),e);return r.current.set(m,f),f}}}),[n])}var M=new Map;function me(t,e,r){if(!r||typeof r.safeParse!="function")throw new Error(`registerComponent("${t}"): schema must be a valid Zod schema`);M.set(t,{component:e,schema:r})}function O(t,e){let r=M.get(t);if(!r)return{error:`Unknown component: "${t}"`};let n=r.schema.safeParse(e);return n.success?{Component:r.component,validatedProps:n.data}:{error:`Validation failed for "${t}": ${n.error.message}`}}import{Fragment as fe,jsx as S}from"react/jsx-runtime";function le({name:t,props:e,fallback:r}){let n=O(t,e);if(n.error)return console.warn(`[urun] ComponentRenderer: ${n.error}`),r?S(fe,{children:r}):S("div",{className:"urun-component-error",role:"alert",children:S("span",{className:"urun-component-error-text",children:n.error})});let o=n.Component;return S(o,{...n.validatedProps})}import{z as d}from"zod";import{jsx as C,jsxs as L}from"react/jsx-runtime";var ge=d.object({step:d.number().min(0),total:d.number().min(1),label:d.string().optional(),variant:d.enum(["default","success","error"]).default("default")});function D(t){let{step:e,total:r,label:n,variant:o="default"}=t,s=Math.min(e/r*100,100),i=e>=r;return{step:e,total:r,label:n,variant:o,percentage:s,isComplete:i}}function he(t){let{step:e,total:r,label:n,variant:o,percentage:s}=D(t);return L("div",{className:"urun-progress-card","data-variant":o,children:[n&&C("div",{className:"urun-progress-label",children:n}),C("div",{className:"urun-progress-bar",children:C("div",{className:"urun-progress-fill",style:{width:`${s}%`}})}),L("div",{className:"urun-progress-text",children:[e,"/",r]})]})}import{z as T}from"zod";import{jsx as W,jsxs as Pe}from"react/jsx-runtime";var Se=T.object({state:T.enum(["thinking","generating","idle","error"]),message:T.string().optional()}),ve={thinking:"Thinking...",generating:"Generating...",idle:"Idle",error:"Error"};function V(t){let{state:e,message:r}=t,n=e==="thinking"||e==="generating",o=r??ve[e]??e;return{state:e,message:o,isActive:n}}function ye(t){let{state:e,message:r,isActive:n}=V(t);return Pe("span",{className:"urun-status-badge","data-state":e,children:[W("span",{className:`urun-status-indicator${n?" urun-status-pulse":""}`}),W("span",{className:"urun-status-message",children:r})]})}import{useRef as X,useEffect as _e}from"react";import{z as x}from"zod";import{jsx as F,jsxs as Te}from"react/jsx-runtime";var ke=x.object({text:x.string(),streaming:x.boolean().default(!1)});function j(t){let{text:e,streaming:r=!1}=t,n=e.length===0;return{text:e,streaming:r,isEmpty:n}}function Ce(t){let{text:e,streaming:r}=j(t),n=X(null),o=X(0);return _e(()=>{let s=n.current;s&&e.length!==o.current&&(s.textContent=e,o.current=e.length)},[e]),Te("div",{className:"urun-text-stream",children:[F("span",{ref:n,className:"urun-text-content"}),r&&F("span",{className:"urun-text-cursor"})]})}import{z as v}from"zod";import{jsx as z,jsxs as Ee}from"react/jsx-runtime";var xe=v.object({src:v.string().url(),alt:v.string().optional(),caption:v.string().optional()});function $(t){let{src:e,alt:r,caption:n}=t;return{src:e,alt:r??"",caption:n}}function Re(t){let{src:e,alt:r,caption:n}=$(t);return Ee("figure",{className:"urun-image-frame",children:[z("img",{className:"urun-image",src:e,alt:r}),n&&z("figcaption",{className:"urun-image-caption",children:n})]})}import{z as u}from"zod";import{jsx as R,jsxs as Ne}from"react/jsx-runtime";var be=u.object({metrics:u.array(u.object({label:u.string(),value:u.union([u.string(),u.number()]),unit:u.string().optional()}))});function H(t){return{metrics:t.metrics.map(r=>({...r,displayValue:r.unit?`${r.value} ${r.unit}`:String(r.value)}))}}function we(t){let{metrics:e}=H(t);return R("div",{className:"urun-metrics-panel",children:e.map((r,n)=>Ne("div",{className:"urun-metric-card",children:[R("div",{className:"urun-metric-label",children:r.label}),R("div",{className:"urun-metric-value",children:r.displayValue})]},n))})}export{le as ComponentRenderer,Re as ImageFrame,xe as ImageFrameSchema,we as MetricsPanel,be as MetricsPanelSchema,he as ProgressCard,ge as ProgressCardSchema,ye as StatusBadge,Se as StatusBadgeSchema,Ce as TextStream,ke as TextStreamSchema,p as UrunErrorBoundary,oe as UrunProvider,h as authMode,me as registerComponent,a as urunPublicEnv,de as useApp,$ as useImageFrame,H as useMetricsPanel,D as useProgressCard,V as useStatusBadge,j as useTextStream,re as usesWorkOSAuth};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urun-sh/react",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "React bindings for the urun TypeScript SDK",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "peerDependencies": {
38
38
  "react": "^18.2.0 || ^19.0.0",
39
- "@urun-sh/core": "^0.1.13",
39
+ "@urun-sh/core": "^0.1.14",
40
40
  "@workos-inc/authkit-react": "^0.15.0"
41
41
  },
42
42
  "dependencies": {