@capxul/sdk-react 2.5.0 → 2.5.1

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.
@@ -516,7 +516,7 @@ function clearClientScopedQueries(queryClient, ownsQueryClient) {
516
516
  queryClient.removeQueries({ predicate: (query) => isCapxulQueryKey(query.queryKey) });
517
517
  }
518
518
  function CapxulProvider(props) {
519
- const { publishableKey, client: injectedClient, requirement, signer, observability, queryClient, children } = props;
519
+ const { publishableKey, client: injectedClient, requirement, signer, observability, bootstrapBaseUrl, queryClient, children } = props;
520
520
  const [resolvedQueryClient] = useState(() => queryClient ?? makeDefaultQueryClient());
521
521
  const [ownsQueryClient] = useState(() => queryClient === void 0);
522
522
  const [attempt, setAttempt] = useState(0);
@@ -527,12 +527,14 @@ function CapxulProvider(props) {
527
527
  publishableKey,
528
528
  ...requirement === void 0 ? {} : { requirement },
529
529
  ...signer === void 0 ? {} : { signer },
530
- ...observability === void 0 ? {} : { observability }
530
+ ...observability === void 0 ? {} : { observability },
531
+ ...bootstrapBaseUrl === void 0 ? {} : { bootstrapBaseUrl }
531
532
  }, [
532
533
  publishableKey,
533
534
  requirement,
534
535
  signer,
535
536
  observability,
537
+ bootstrapBaseUrl,
536
538
  attempt
537
539
  ]);
538
540
  const [ownedBootstrap, setOwnedBootstrap] = useState(null);
package/dist/index.d.mts CHANGED
@@ -19,6 +19,13 @@ type CapxulProviderPublishableKeyProps = CapxulProviderSharedProps & {
19
19
  * with `requirement: "deployed"` — the SDK wires Openfort from bootstrap.
20
20
  */
21
21
  readonly signer?: CapxulSigner;
22
+ /**
23
+ * Where the bootstrap call goes. Default: the page's own origin, which a
24
+ * host app proxies to Capxul. Set it to the Capxul Site URL to call the
25
+ * backend directly and skip the host's proxy hop; the backend answers the
26
+ * route cross-origin for the publishable key's allowed origins.
27
+ */
28
+ readonly bootstrapBaseUrl?: string;
22
29
  };
23
30
  /**
24
31
  * Node / server / test path — a pre-built client is supplied; lifecycle stays
@@ -30,6 +37,7 @@ type CapxulProviderInjectedClientProps = CapxulProviderSharedProps & {
30
37
  readonly observability?: never;
31
38
  readonly requirement?: never;
32
39
  readonly signer?: never;
40
+ readonly bootstrapBaseUrl?: never;
33
41
  };
34
42
  type CapxulProviderProps = CapxulProviderPublishableKeyProps | CapxulProviderInjectedClientProps;
35
43
  declare function CapxulProvider(props: CapxulProviderProps): import("react/jsx-runtime").JSX.Element;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { a as useCapxulAuth, c as useCapxulIdentityOrNull, d as capxulKeys, f as useCapxulClientOrNull, i as entered, l as useCapxulSend, n as CapxulOnboardingController, o as useCapxulDestination, p as useCapxul, r as CapxulProvider, s as useCapxulIdentity, t as CapxulAuthenticationController, u as useCapxulTransitions } from "./controllers-BJ_uFXT3.mjs";
2
+ import { a as useCapxulAuth, c as useCapxulIdentityOrNull, d as capxulKeys, f as useCapxulClientOrNull, i as entered, l as useCapxulSend, n as CapxulOnboardingController, o as useCapxulDestination, p as useCapxul, r as CapxulProvider, s as useCapxulIdentity, t as CapxulAuthenticationController, u as useCapxulTransitions } from "./controllers-DpScp8c5.mjs";
3
3
  import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
4
4
  import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
5
5
  import { CapxulError, Errors, PAYMENT_DIRECTIONS, PAYMENT_STATUSES, fingerprintPaymentIntent, formatMoney, isCapxulError, isClaimed, isClaimed as isClaimed$1, isMoneyParseError, isRestoring, isRestoring as isRestoring$1, parseMoney, paymentPhase, resolveIdentityDestination } from "@capxul/sdk";
@@ -1,4 +1,4 @@
1
- import { n as CapxulOnboardingController, r as CapxulProvider, t as CapxulAuthenticationController } from "../controllers-BJ_uFXT3.mjs";
1
+ import { n as CapxulOnboardingController, r as CapxulProvider, t as CapxulAuthenticationController } from "../controllers-DpScp8c5.mjs";
2
2
  import "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { createCapxulTestClient } from "@capxul/sdk/testing";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capxul/sdk-react",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Xelmar-tech/infrastructure.git",
@@ -26,7 +26,7 @@
26
26
  "access": "public"
27
27
  },
28
28
  "dependencies": {
29
- "@capxul/sdk": "2.5.0"
29
+ "@capxul/sdk": "2.5.1"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@tanstack/react-query": "^5.66.9",
@@ -42,8 +42,8 @@
42
42
  "react-dom": "^19.2.6",
43
43
  "vite-plus": "0.1.23",
44
44
  "vitest": "npm:@voidzero-dev/vite-plus-test@0.1.23",
45
- "@capxul/errors": "0.0.1",
46
- "@capxul/types": "0.2.0",
45
+ "@capxul/errors": "0.0.2",
46
+ "@capxul/types": "0.2.1",
47
47
  "@capxul/typescript-config": "0.0.0"
48
48
  },
49
49
  "peerDependencies": {