@bodhiapp/bodhi-js-react-ext 0.0.12 → 0.0.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.
@@ -6,5 +6,5 @@
6
6
  */
7
7
  export { BodhiProvider, type BodhiProviderProps } from './BodhiProvider';
8
8
  export { ExtUIClient, type ExtUIClientParams } from '../../ext/src/index.ts';
9
- export { BodhiReactContext, useBodhi, type BodhiContext, type SetupState, type ClientContextState, type ClientContextStatus, INITIAL_CLIENT_CONTEXT_STATE, INITIALIZING_CLIENT_CONTEXT_STATE, ClientCtxState, clientStateToContextState, isClientCtxInitialized, isClientCtxInitializing, isClientCtxNotInitialized, isClientCtxReady, isOverallReady, type ApiResponseResult, type ClientState, type AuthState, type UIClient, type OperationError, isApiResultError, isApiResultOperationError, isApiResultSuccess, isDirectState, isExtensionState, isWebUIClient, isAuthError, isAuthLoading, isAuthenticated, isClientReady, isOperationError, createApiError, createOperationError, } from '../../react-core/src/index.ts';
9
+ export { BodhiReactContext, useBodhi, type BodhiContext, type SetupState, type ClientContextState, type ClientContextStatus, INITIAL_CLIENT_CONTEXT_STATE, INITIALIZING_CLIENT_CONTEXT_STATE, ClientCtxState, clientStateToContextState, isClientCtxInitialized, isClientCtxInitializing, isClientCtxNotInitialized, isClientCtxReady, isOverallReady, type ApiResponseResult, type ClientState, type AuthState, type UIClient, type OperationError, isApiResultError, isApiResultOperationError, isApiResultSuccess, isDirectState, isExtensionState, isWebUIClient, isAuthError, isAuthLoading, isAuthenticated, isClientReady, isOperationError, createApiError, createOperationError, BodhiBadge, type BodhiBadgeProps, type BodhiBadgeSize, type BodhiBadgeVariant, } from '../../react-core/src/index.ts';
10
10
  export { BUILD_MODE as REACT_EXT_BUILD_MODE } from './build-info';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),o=require("react"),a=require("@bodhiapp/bodhi-js-ext"),e=require("@bodhiapp/bodhi-js-react-core");function p({children:l,authClientId:i,clientConfig:n,client:t,basePath:u,...s}){if(!t&&!i)throw new Error('BodhiProvider requires either "client" or "authClientId" prop');const r=o.useRef(null),c=o.useMemo(()=>{if(t)return t;if(r.current)return r.current;const b={...n,basePath:n?.basePath??u};return r.current=new a.ExtUIClient(i,b),r.current},[t,i,n,u]);return d.jsx(e.BodhiProvider,{client:c,basePath:u,...s,children:l})}const O="production";Object.defineProperty(exports,"ExtUIClient",{enumerable:!0,get:()=>a.ExtUIClient});Object.defineProperty(exports,"BodhiReactContext",{enumerable:!0,get:()=>e.BodhiReactContext});Object.defineProperty(exports,"ClientCtxState",{enumerable:!0,get:()=>e.ClientCtxState});Object.defineProperty(exports,"INITIALIZING_CLIENT_CONTEXT_STATE",{enumerable:!0,get:()=>e.INITIALIZING_CLIENT_CONTEXT_STATE});Object.defineProperty(exports,"INITIAL_CLIENT_CONTEXT_STATE",{enumerable:!0,get:()=>e.INITIAL_CLIENT_CONTEXT_STATE});Object.defineProperty(exports,"clientStateToContextState",{enumerable:!0,get:()=>e.clientStateToContextState});Object.defineProperty(exports,"createApiError",{enumerable:!0,get:()=>e.createApiError});Object.defineProperty(exports,"createOperationError",{enumerable:!0,get:()=>e.createOperationError});Object.defineProperty(exports,"isApiResultError",{enumerable:!0,get:()=>e.isApiResultError});Object.defineProperty(exports,"isApiResultOperationError",{enumerable:!0,get:()=>e.isApiResultOperationError});Object.defineProperty(exports,"isApiResultSuccess",{enumerable:!0,get:()=>e.isApiResultSuccess});Object.defineProperty(exports,"isAuthError",{enumerable:!0,get:()=>e.isAuthError});Object.defineProperty(exports,"isAuthLoading",{enumerable:!0,get:()=>e.isAuthLoading});Object.defineProperty(exports,"isAuthenticated",{enumerable:!0,get:()=>e.isAuthenticated});Object.defineProperty(exports,"isClientCtxInitialized",{enumerable:!0,get:()=>e.isClientCtxInitialized});Object.defineProperty(exports,"isClientCtxInitializing",{enumerable:!0,get:()=>e.isClientCtxInitializing});Object.defineProperty(exports,"isClientCtxNotInitialized",{enumerable:!0,get:()=>e.isClientCtxNotInitialized});Object.defineProperty(exports,"isClientCtxReady",{enumerable:!0,get:()=>e.isClientCtxReady});Object.defineProperty(exports,"isClientReady",{enumerable:!0,get:()=>e.isClientReady});Object.defineProperty(exports,"isDirectState",{enumerable:!0,get:()=>e.isDirectState});Object.defineProperty(exports,"isExtensionState",{enumerable:!0,get:()=>e.isExtensionState});Object.defineProperty(exports,"isOperationError",{enumerable:!0,get:()=>e.isOperationError});Object.defineProperty(exports,"isOverallReady",{enumerable:!0,get:()=>e.isOverallReady});Object.defineProperty(exports,"isWebUIClient",{enumerable:!0,get:()=>e.isWebUIClient});Object.defineProperty(exports,"useBodhi",{enumerable:!0,get:()=>e.useBodhi});exports.BodhiProvider=p;exports.REACT_EXT_BUILD_MODE=O;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),u=require("react"),a=require("@bodhiapp/bodhi-js-ext"),e=require("@bodhiapp/bodhi-js-react-core");function p({children:l,authClientId:i,clientConfig:n,client:t,basePath:o,...s}){if(!t&&!i)throw new Error('BodhiProvider requires either "client" or "authClientId" prop');const r=u.useRef(null),c=u.useMemo(()=>{if(t)return t;if(r.current)return r.current;const b={...n,basePath:n?.basePath??o};return r.current=new a.ExtUIClient(i,b),r.current},[t,i,n,o]);return d.jsx(e.BodhiProvider,{client:c,basePath:o,...s,children:l})}const O="production";Object.defineProperty(exports,"ExtUIClient",{enumerable:!0,get:()=>a.ExtUIClient});Object.defineProperty(exports,"BodhiBadge",{enumerable:!0,get:()=>e.BodhiBadge});Object.defineProperty(exports,"BodhiReactContext",{enumerable:!0,get:()=>e.BodhiReactContext});Object.defineProperty(exports,"ClientCtxState",{enumerable:!0,get:()=>e.ClientCtxState});Object.defineProperty(exports,"INITIALIZING_CLIENT_CONTEXT_STATE",{enumerable:!0,get:()=>e.INITIALIZING_CLIENT_CONTEXT_STATE});Object.defineProperty(exports,"INITIAL_CLIENT_CONTEXT_STATE",{enumerable:!0,get:()=>e.INITIAL_CLIENT_CONTEXT_STATE});Object.defineProperty(exports,"clientStateToContextState",{enumerable:!0,get:()=>e.clientStateToContextState});Object.defineProperty(exports,"createApiError",{enumerable:!0,get:()=>e.createApiError});Object.defineProperty(exports,"createOperationError",{enumerable:!0,get:()=>e.createOperationError});Object.defineProperty(exports,"isApiResultError",{enumerable:!0,get:()=>e.isApiResultError});Object.defineProperty(exports,"isApiResultOperationError",{enumerable:!0,get:()=>e.isApiResultOperationError});Object.defineProperty(exports,"isApiResultSuccess",{enumerable:!0,get:()=>e.isApiResultSuccess});Object.defineProperty(exports,"isAuthError",{enumerable:!0,get:()=>e.isAuthError});Object.defineProperty(exports,"isAuthLoading",{enumerable:!0,get:()=>e.isAuthLoading});Object.defineProperty(exports,"isAuthenticated",{enumerable:!0,get:()=>e.isAuthenticated});Object.defineProperty(exports,"isClientCtxInitialized",{enumerable:!0,get:()=>e.isClientCtxInitialized});Object.defineProperty(exports,"isClientCtxInitializing",{enumerable:!0,get:()=>e.isClientCtxInitializing});Object.defineProperty(exports,"isClientCtxNotInitialized",{enumerable:!0,get:()=>e.isClientCtxNotInitialized});Object.defineProperty(exports,"isClientCtxReady",{enumerable:!0,get:()=>e.isClientCtxReady});Object.defineProperty(exports,"isClientReady",{enumerable:!0,get:()=>e.isClientReady});Object.defineProperty(exports,"isDirectState",{enumerable:!0,get:()=>e.isDirectState});Object.defineProperty(exports,"isExtensionState",{enumerable:!0,get:()=>e.isExtensionState});Object.defineProperty(exports,"isOperationError",{enumerable:!0,get:()=>e.isOperationError});Object.defineProperty(exports,"isOverallReady",{enumerable:!0,get:()=>e.isOverallReady});Object.defineProperty(exports,"isWebUIClient",{enumerable:!0,get:()=>e.isWebUIClient});Object.defineProperty(exports,"useBodhi",{enumerable:!0,get:()=>e.useBodhi});exports.BodhiProvider=p;exports.REACT_EXT_BUILD_MODE=O;
@@ -1,9 +1,9 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
2
  import { useRef as E, useMemo as l } from "react";
3
3
  import { ExtUIClient as I } from "@bodhiapp/bodhi-js-ext";
4
- import { ExtUIClient as R } from "@bodhiapp/bodhi-js-ext";
4
+ import { ExtUIClient as B } from "@bodhiapp/bodhi-js-ext";
5
5
  import { BodhiProvider as C } from "@bodhiapp/bodhi-js-react-core";
6
- import { BodhiReactContext as B, ClientCtxState as N, INITIALIZING_CLIENT_CONTEXT_STATE as O, INITIAL_CLIENT_CONTEXT_STATE as S, clientStateToContextState as L, createApiError as D, createOperationError as U, isApiResultError as P, isApiResultOperationError as w, isApiResultSuccess as y, isAuthError as z, isAuthLoading as M, isAuthenticated as X, isClientCtxInitialized as g, isClientCtxInitializing as v, isClientCtxNotInitialized as b, isClientCtxReady as j, isClientReady as q, isDirectState as G, isExtensionState as W, isOperationError as Z, isOverallReady as $, isWebUIClient as k, useBodhi as F } from "@bodhiapp/bodhi-js-react-core";
6
+ import { BodhiBadge as _, BodhiReactContext as N, ClientCtxState as O, INITIALIZING_CLIENT_CONTEXT_STATE as S, INITIAL_CLIENT_CONTEXT_STATE as L, clientStateToContextState as D, createApiError as U, createOperationError as P, isApiResultError as g, isApiResultOperationError as w, isApiResultSuccess as y, isAuthError as z, isAuthLoading as M, isAuthenticated as X, isClientCtxInitialized as v, isClientCtxInitializing as b, isClientCtxNotInitialized as j, isClientCtxReady as q, isClientReady as G, isDirectState as W, isExtensionState as Z, isOperationError as $, isOverallReady as k, isWebUIClient as F, useBodhi as H } from "@bodhiapp/bodhi-js-react-core";
7
7
  function m({ children: n, authClientId: e, clientConfig: i, client: t, basePath: o, ...s }) {
8
8
  if (!t && !e)
9
9
  throw new Error('BodhiProvider requires either "client" or "authClientId" prop');
@@ -20,31 +20,32 @@ function m({ children: n, authClientId: e, clientConfig: i, client: t, basePath:
20
20
  }
21
21
  const A = "production";
22
22
  export {
23
+ _ as BodhiBadge,
23
24
  m as BodhiProvider,
24
- B as BodhiReactContext,
25
- N as ClientCtxState,
26
- R as ExtUIClient,
27
- O as INITIALIZING_CLIENT_CONTEXT_STATE,
28
- S as INITIAL_CLIENT_CONTEXT_STATE,
25
+ N as BodhiReactContext,
26
+ O as ClientCtxState,
27
+ B as ExtUIClient,
28
+ S as INITIALIZING_CLIENT_CONTEXT_STATE,
29
+ L as INITIAL_CLIENT_CONTEXT_STATE,
29
30
  A as REACT_EXT_BUILD_MODE,
30
- L as clientStateToContextState,
31
- D as createApiError,
32
- U as createOperationError,
33
- P as isApiResultError,
31
+ D as clientStateToContextState,
32
+ U as createApiError,
33
+ P as createOperationError,
34
+ g as isApiResultError,
34
35
  w as isApiResultOperationError,
35
36
  y as isApiResultSuccess,
36
37
  z as isAuthError,
37
38
  M as isAuthLoading,
38
39
  X as isAuthenticated,
39
- g as isClientCtxInitialized,
40
- v as isClientCtxInitializing,
41
- b as isClientCtxNotInitialized,
42
- j as isClientCtxReady,
43
- q as isClientReady,
44
- G as isDirectState,
45
- W as isExtensionState,
46
- Z as isOperationError,
47
- $ as isOverallReady,
48
- k as isWebUIClient,
49
- F as useBodhi
40
+ v as isClientCtxInitialized,
41
+ b as isClientCtxInitializing,
42
+ j as isClientCtxNotInitialized,
43
+ q as isClientCtxReady,
44
+ G as isClientReady,
45
+ W as isDirectState,
46
+ Z as isExtensionState,
47
+ $ as isOperationError,
48
+ k as isOverallReady,
49
+ F as isWebUIClient,
50
+ H as useBodhi
50
51
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bodhiapp/bodhi-js-react-ext",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "React bindings for Bodhi Browser SDK with ExtUIClient preset (Chrome Extension)",
5
5
  "type": "module",
6
6
  "main": "dist/bodhi-react-ext.cjs.js",
@@ -42,8 +42,8 @@
42
42
  "typecheck": "tsc --noEmit"
43
43
  },
44
44
  "dependencies": {
45
- "@bodhiapp/bodhi-js-react-core": "0.0.12",
46
- "@bodhiapp/bodhi-js-ext": "0.0.12"
45
+ "@bodhiapp/bodhi-js-react-core": "0.0.14",
46
+ "@bodhiapp/bodhi-js-ext": "0.0.14"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "react": "^18.3.0 || ^19.0.0"