@busiverse/ui 0.2.2 → 0.2.4

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/README.md CHANGED
@@ -235,3 +235,14 @@ import { BusiverseBrandHead } from "@busiverse/ui";
235
235
  ```
236
236
 
237
237
  The package remains network-neutral: it does not call `fetch`, open sockets, or import remote fonts.
238
+
239
+
240
+ ## v0.2.4 social icon ownership
241
+
242
+ `@busiverse/ui` owns BUSIVERSE-approved social icon wrappers so separately deployed frontends do not import brand icons from `lucide-react`. Lucide is an outline UI-icon library and newer builds do not export brand icons such as `Github`, `Twitter`, or `Linkedin`. Use:
243
+
244
+ ```tsx
245
+ import { BusiverseGithubIcon, BusiverseXIcon, BusiverseLinkedInIcon, BusiverseMailIcon } from "@busiverse/ui";
246
+ ```
247
+
248
+ The package remains network-neutral. The icons are inline SVG React components and do not fetch remote assets.
@@ -6,4 +6,5 @@ export * from "./forms";
6
6
  export * from "./feedback";
7
7
  export * from "./billing";
8
8
  export * from "./marketing";
9
+ export * from "./social";
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ export type BusiverseSocialIconName = "github" | "x" | "linkedin" | "mail";
3
+ export interface BusiverseSocialIconProps extends Omit<React.SVGProps<SVGSVGElement>, "name"> {
4
+ name: BusiverseSocialIconName;
5
+ size?: number | string;
6
+ title?: string;
7
+ }
8
+ export interface BusiverseNamedSocialIconProps extends Omit<React.SVGProps<SVGSVGElement>, "name"> {
9
+ size?: number | string;
10
+ title?: string;
11
+ }
12
+ export declare function BusiverseSocialIcon({ name, size, title, className, ...props }: BusiverseSocialIconProps): React.JSX.Element;
13
+ export declare function BusiverseGithubIcon(props: BusiverseNamedSocialIconProps): React.JSX.Element;
14
+ export declare function BusiverseXIcon(props: BusiverseNamedSocialIconProps): React.JSX.Element;
15
+ export declare function BusiverseLinkedInIcon(props: BusiverseNamedSocialIconProps): React.JSX.Element;
16
+ export declare function BusiverseMailIcon(props: BusiverseNamedSocialIconProps): React.JSX.Element;
17
+ //# sourceMappingURL=SocialIcons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SocialIcons.d.ts","sourceRoot":"","sources":["../../../src/components/social/SocialIcons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,GAAG,GAAG,UAAU,GAAG,MAAM,CAAC;AAE3E,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAC3F,IAAI,EAAE,uBAAuB,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,6BAA8B,SAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChG,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAqBD,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,IAAS,EACT,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,wBAAwB,qBAkB1B;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,6BAA6B,qBAEvE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,6BAA6B,qBAElE;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,6BAA6B,qBAEzE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,6BAA6B,qBAErE"}
@@ -0,0 +1,2 @@
1
+ export * from "./SocialIcons";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/social/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -8341,6 +8341,61 @@ function HeroSection({
8341
8341
  ] }) });
8342
8342
  }
8343
8343
 
8344
+ // src/components/social/SocialIcons.tsx
8345
+ import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
8346
+ var paths = {
8347
+ github: /* @__PURE__ */ jsx24(
8348
+ "path",
8349
+ {
8350
+ fillRule: "evenodd",
8351
+ clipRule: "evenodd",
8352
+ d: "M12 2.25c-5.52 0-10 4.48-10 10 0 4.42 2.87 8.17 6.84 9.5.5.09.68-.22.68-.48v-1.68c-2.78.6-3.37-1.34-3.37-1.34-.45-1.15-1.1-1.46-1.1-1.46-.9-.62.07-.6.07-.6 1 .07 1.53 1.03 1.53 1.03.89 1.52 2.34 1.08 2.91.83.09-.64.35-1.08.63-1.33-2.22-.25-4.56-1.11-4.56-4.94 0-1.09.39-1.98 1.03-2.68-.1-.25-.45-1.27.1-2.65 0 0 .84-.27 2.75 1.02A9.58 9.58 0 0 1 12 7.14c.85 0 1.7.11 2.5.34 1.9-1.29 2.74-1.02 2.74-1.02.55 1.38.2 2.4.1 2.65.64.7 1.03 1.59 1.03 2.68 0 3.84-2.34 4.69-4.57 4.94.36.31.68.92.68 1.86v2.76c0 .27.18.58.69.48A10.01 10.01 0 0 0 22 12.25c0-5.52-4.48-10-10-10Z"
8353
+ }
8354
+ ),
8355
+ x: /* @__PURE__ */ jsx24("path", { d: "M13.66 10.62 21.24 2h-1.8l-6.58 7.48L7.6 2H1.54l7.95 11.31L1.54 22h1.8l6.95-7.53L15.84 22h6.06l-8.24-11.38Zm-2.46 2.8-.8-1.12L4 3.33h2.74l5.17 7.24.8 1.12 6.72 9.42H16.7l-5.5-7.69Z" }),
8356
+ linkedin: /* @__PURE__ */ jsx24("path", { d: "M5.34 8.25H2.7V21h2.64V8.25ZM5.52 4.3A1.53 1.53 0 1 0 2.46 4.3a1.53 1.53 0 0 0 3.06 0ZM21 13.68c0-3.42-1.83-5.01-4.28-5.01-1.97 0-2.86 1.08-3.35 1.84V8.25h-2.64V21h2.64v-6.31c0-1.66.31-3.28 2.38-3.28 2.04 0 2.07 1.91 2.07 3.38V21H21v-7.32Z" }),
8357
+ mail: /* @__PURE__ */ jsx24("path", { d: "M4.5 5.75A2.5 2.5 0 0 0 2 8.25v7.5a2.5 2.5 0 0 0 2.5 2.5h15a2.5 2.5 0 0 0 2.5-2.5v-7.5a2.5 2.5 0 0 0-2.5-2.5h-15Zm.17 2h14.66L12 12.87 4.67 7.75Zm-.67 2v6c0 .28.22.5.5.5h15a.5.5 0 0 0 .5-.5v-6l-7.43 5.2a1 1 0 0 1-1.14 0L4 9.75Z" })
8358
+ };
8359
+ function BusiverseSocialIcon({
8360
+ name,
8361
+ size = 20,
8362
+ title,
8363
+ className,
8364
+ ...props
8365
+ }) {
8366
+ const labelled = Boolean(title || props["aria-label"]);
8367
+ return /* @__PURE__ */ jsxs12(
8368
+ "svg",
8369
+ {
8370
+ viewBox: "0 0 24 24",
8371
+ width: size,
8372
+ height: size,
8373
+ fill: "currentColor",
8374
+ role: labelled ? "img" : "presentation",
8375
+ "aria-hidden": labelled ? void 0 : true,
8376
+ className: cn("busiverse-social-icon", className),
8377
+ xmlns: "http://www.w3.org/2000/svg",
8378
+ ...props,
8379
+ children: [
8380
+ title ? /* @__PURE__ */ jsx24("title", { children: title }) : null,
8381
+ paths[name]
8382
+ ]
8383
+ }
8384
+ );
8385
+ }
8386
+ function BusiverseGithubIcon(props) {
8387
+ return /* @__PURE__ */ jsx24(BusiverseSocialIcon, { name: "github", ...props });
8388
+ }
8389
+ function BusiverseXIcon(props) {
8390
+ return /* @__PURE__ */ jsx24(BusiverseSocialIcon, { name: "x", ...props });
8391
+ }
8392
+ function BusiverseLinkedInIcon(props) {
8393
+ return /* @__PURE__ */ jsx24(BusiverseSocialIcon, { name: "linkedin", ...props });
8394
+ }
8395
+ function BusiverseMailIcon(props) {
8396
+ return /* @__PURE__ */ jsx24(BusiverseSocialIcon, { name: "mail", ...props });
8397
+ }
8398
+
8344
8399
  // src/api/createGatewayClient.ts
8345
8400
  var GatewayApiError = class extends Error {
8346
8401
  status;
@@ -8387,10 +8442,10 @@ function createGatewayClient(options) {
8387
8442
 
8388
8443
  // src/auth/AuthSessionProvider.tsx
8389
8444
  import * as React8 from "react";
8390
- import { jsx as jsx24 } from "react/jsx-runtime";
8445
+ import { jsx as jsx25 } from "react/jsx-runtime";
8391
8446
  var AuthContext = React8.createContext(null);
8392
8447
  function AuthSessionProvider({ children, session }) {
8393
- return /* @__PURE__ */ jsx24(AuthContext.Provider, { value: session, children });
8448
+ return /* @__PURE__ */ jsx25(AuthContext.Provider, { value: session, children });
8394
8449
  }
8395
8450
  function useBusiverseAuth() {
8396
8451
  const value = React8.useContext(AuthContext);
@@ -8399,34 +8454,34 @@ function useBusiverseAuth() {
8399
8454
  }
8400
8455
 
8401
8456
  // src/auth/RequireAuth.tsx
8402
- import { Fragment as Fragment2, jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
8457
+ import { Fragment as Fragment2, jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
8403
8458
  function RequireAuth({ children }) {
8404
8459
  const auth = useBusiverseAuth();
8405
- if (auth.isLoading) return /* @__PURE__ */ jsx25("div", { className: "busiverse-loading-state", children: "Checking session\u2026" });
8460
+ if (auth.isLoading) return /* @__PURE__ */ jsx26("div", { className: "busiverse-loading-state", children: "Checking session\u2026" });
8406
8461
  if (!auth.isAuthenticated) {
8407
- return /* @__PURE__ */ jsxs12("div", { className: "busiverse-auth-required", children: [
8408
- /* @__PURE__ */ jsx25("h1", { children: "Sign in required" }),
8409
- /* @__PURE__ */ jsx25("p", { children: "Use your BUSIVERSE account to continue." }),
8410
- /* @__PURE__ */ jsx25(Button, { onClick: () => void auth.signIn(), children: "Sign in" })
8462
+ return /* @__PURE__ */ jsxs13("div", { className: "busiverse-auth-required", children: [
8463
+ /* @__PURE__ */ jsx26("h1", { children: "Sign in required" }),
8464
+ /* @__PURE__ */ jsx26("p", { children: "Use your BUSIVERSE account to continue." }),
8465
+ /* @__PURE__ */ jsx26(Button, { onClick: () => void auth.signIn(), children: "Sign in" })
8411
8466
  ] });
8412
8467
  }
8413
- return /* @__PURE__ */ jsx25(Fragment2, { children });
8468
+ return /* @__PURE__ */ jsx26(Fragment2, { children });
8414
8469
  }
8415
8470
 
8416
8471
  // src/auth/SignUpLink.tsx
8417
- import { jsx as jsx26 } from "react/jsx-runtime";
8472
+ import { jsx as jsx27 } from "react/jsx-runtime";
8418
8473
  function SignUpLink({ signupUrl = "https://user.busiversehq.com/signup", children = "Create your Busiverse account", ...props }) {
8419
- return /* @__PURE__ */ jsx26("a", { href: signupUrl, ...props, children });
8474
+ return /* @__PURE__ */ jsx27("a", { href: signupUrl, ...props, children });
8420
8475
  }
8421
8476
 
8422
8477
  // src/auth/UserMenu.tsx
8423
- import { jsx as jsx27, jsxs as jsxs13 } from "react/jsx-runtime";
8478
+ import { jsx as jsx28, jsxs as jsxs14 } from "react/jsx-runtime";
8424
8479
  function UserMenu() {
8425
8480
  const auth = useBusiverseAuth();
8426
- if (!auth.isAuthenticated || !auth.user) return /* @__PURE__ */ jsx27(Button, { size: "sm", onClick: () => void auth.signIn(), children: "Sign in" });
8427
- return /* @__PURE__ */ jsxs13("div", { className: "busiverse-user-menu", children: [
8428
- /* @__PURE__ */ jsx27("span", { children: auth.user.name ?? auth.user.email ?? "User" }),
8429
- /* @__PURE__ */ jsx27(Button, { size: "sm", variant: "ghost", onClick: () => void auth.signOut(), children: "Sign out" })
8481
+ if (!auth.isAuthenticated || !auth.user) return /* @__PURE__ */ jsx28(Button, { size: "sm", onClick: () => void auth.signIn(), children: "Sign in" });
8482
+ return /* @__PURE__ */ jsxs14("div", { className: "busiverse-user-menu", children: [
8483
+ /* @__PURE__ */ jsx28("span", { children: auth.user.name ?? auth.user.email ?? "User" }),
8484
+ /* @__PURE__ */ jsx28(Button, { size: "sm", variant: "ghost", onClick: () => void auth.signOut(), children: "Sign out" })
8430
8485
  ] });
8431
8486
  }
8432
8487
  export {
@@ -8434,8 +8489,13 @@ export {
8434
8489
  AuthSessionProvider,
8435
8490
  Badge,
8436
8491
  BusiverseBrandHead,
8492
+ BusiverseGithubIcon,
8437
8493
  BusiverseI18nProvider,
8494
+ BusiverseLinkedInIcon,
8438
8495
  BusiverseLogo,
8496
+ BusiverseMailIcon,
8497
+ BusiverseSocialIcon,
8498
+ BusiverseXIcon,
8439
8499
  Button,
8440
8500
  Card,
8441
8501
  CardContent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@busiverse/ui",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "author": "Joel Julius Okoromi <okmarq@gmail.com> (https://busiversehq.com)",
5
5
  "description": "BUSIVERSE shared React UI, design tokens, pricing, i18n, auth helpers, and product shell. Network-neutral core; Gateway transport is app-injected.",
6
6
  "type": "module",