@capxul/sdk-react 4.1.0 → 4.1.2

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.
@@ -1,6 +1,6 @@
1
1
  import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
2
2
  import { QueryClient, QueryClientProvider, useQueryClient } from "@tanstack/react-query";
3
- import { CapxulError, createCapxulClient, isCapxulError, resolveIdentityDestination, toCountryCode } from "@capxul/sdk";
3
+ import { CapxulError, createCapxulClient, isCapxulError, resolveIdentityDestination, toCountryCode, toHandle } from "@capxul/sdk";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/internal/capxul-bootstrap-context.tsx
6
6
  const CapxulBootstrapContext = createContext(null);
@@ -195,17 +195,16 @@ function organizationFailure(reason, state) {
195
195
  error: new CapxulError(reason === "WORK_DIED" ? "UNKNOWN" : reason, reason === "INVALID_INPUT" ? "Organization details are invalid." : "Organization creation failed.", { layer: "identity" })
196
196
  };
197
197
  }
198
- const ORGANIZATION_HANDLE = /^[a-z0-9-]{3,32}$/;
199
198
  function normalizeOrganization(organization) {
200
199
  const name = typeof organization.name === "string" ? organization.name.trim() : "";
201
200
  const handle = typeof organization.handle === "string" ? organization.handle.trim().toLowerCase() : "";
202
- if (name.length === 0 || !ORGANIZATION_HANDLE.test(handle)) return null;
201
+ if (name.length === 0) return null;
203
202
  if (organization.bio !== void 0 && typeof organization.bio !== "string") return null;
204
203
  if (organization.size !== void 0 && typeof organization.size !== "string") return null;
205
204
  try {
206
205
  return {
207
206
  name,
208
- handle,
207
+ handle: toHandle(handle),
209
208
  country: toCountryCode(organization.country),
210
209
  ...organization.bio === void 0 ? {} : { bio: organization.bio },
211
210
  ...organization.size === void 0 ? {} : { size: organization.size }
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-BgkCs0nW.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-Dzk5AvfL.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 { CAPXUL_OPERATIONS, CapxulError, EVM_ADDRESS_RE, Errors, HANDLE_RE, PAYMENT_DIRECTIONS, PAYMENT_STATUSES, fingerprintPaymentIntent, formatMoney, isCapxulError, isClaimed, isClaimed as isClaimed$1, isMoneyParseError, isRestoring, isRestoring as isRestoring$1, parseMoney, paymentPhase, resolveIdentityDestination, toEvmAddress, toPartyId } from "@capxul/sdk";
@@ -1,4 +1,4 @@
1
- import { n as CapxulOnboardingController, r as CapxulProvider, t as CapxulAuthenticationController } from "../controllers-BgkCs0nW.mjs";
1
+ import { n as CapxulOnboardingController, r as CapxulProvider, t as CapxulAuthenticationController } from "../controllers-Dzk5AvfL.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": "4.1.0",
3
+ "version": "4.1.2",
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": "4.1.0"
29
+ "@capxul/sdk": "4.1.2"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@tanstack/react-query": "^5.66.9",