@busiverse/ui 0.2.16 → 0.2.18

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.
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Refuses a browser API base URL that is not the public gateway.
3
+ *
4
+ * ## The rule this enforces
5
+ *
6
+ * East-west is service to service: direct, `https://<service>.internal.busiversehq.com:8080`, mutual
7
+ * TLS and an HMAC identity, never through the gateway. North-south is browser to platform, and it goes
8
+ * through the gateway and nowhere else — that is where a frontend is matched to its approved-frontend
9
+ * record, where its OAuth2 client is validated, and where route permissions are applied.
10
+ *
11
+ * A frontend that reaches a service directly skips all three. It would not merely be unusual, it would
12
+ * be unauthorised traffic that no policy layer ever saw.
13
+ *
14
+ * ## Why an allow-list
15
+ *
16
+ * The one guard that existed before this checked that the host did *not* end in
17
+ * `.internal.busiversehq.com`. That is a deny-list, and it admitted every other host in the world —
18
+ * a service's public name, an IP, a copied preview URL. It also lived in a single frontend of
19
+ * twenty-two, and had to be remembered at each call site.
20
+ *
21
+ * This states the allowed origins instead, and runs where the client is constructed, so a frontend
22
+ * cannot be pointed anywhere else by configuration. Configuration held on 2026-09-08 — all twenty-two
23
+ * `.env` files named the gateway — but nothing made it hold.
24
+ *
25
+ * ## Local development
26
+ *
27
+ * `localhost` and `127.0.0.1` are allowed because a developer runs the gateway there. That is the
28
+ * whole exemption: naming a loopback host is not the same as naming a service.
29
+ */
30
+ /** The public gateway. The only origin a browser may call the platform on. */
31
+ export declare const GATEWAY_PUBLIC_HOST = "api.busiversehq.com";
32
+ export declare class NorthSouthViolationError extends Error {
33
+ readonly host: string;
34
+ constructor(host: string, reason: string);
35
+ }
36
+ /**
37
+ * @param baseUrl the API base a frontend was configured with
38
+ * @returns the same URL, normalised, when it is the gateway
39
+ * @throws NorthSouthViolationError when it is anything else
40
+ */
41
+ export declare function assertGatewayBaseUrl(baseUrl: string): string;
42
+ //# sourceMappingURL=assertGatewayBaseUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertGatewayBaseUrl.d.ts","sourceRoot":"","sources":["../../src/api/assertGatewayBaseUrl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,8EAA8E;AAC9E,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AAIzD,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBACV,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAUzC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAmB5D"}
@@ -1 +1 @@
1
- {"version":3,"file":"createGatewayClient.d.ts","sourceRoot":"","sources":["../../src/api/createGatewayClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAG5D,MAAM,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAErF,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,SAAS,EAAE,gBAAgB,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtF,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,sBAAsB,CAAC;CACjC;AAED,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;gBACX,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,SAA0C;CAM7F;AAQD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,oBAAoB;cACxC,CAAC,QAAQ,MAAM,SAAQ,qBAAqB,KAAQ,OAAO,CAAC,CAAC,CAAC;UAqB7E,CAAC,QAAQ,MAAM,SAAS,qBAAqB;WAC5C,CAAC,QAAQ,MAAM,SAAS,OAAO,SAAS,qBAAqB;UAC9D,CAAC,QAAQ,MAAM,SAAS,OAAO,SAAS,qBAAqB;YAC3D,CAAC,QAAQ,MAAM,SAAS,OAAO,SAAS,qBAAqB;aAC5D,CAAC,QAAQ,MAAM,SAAS,qBAAqB;EAEzD"}
1
+ {"version":3,"file":"createGatewayClient.d.ts","sourceRoot":"","sources":["../../src/api/createGatewayClient.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAG5D,MAAM,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAErF,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,SAAS,EAAE,gBAAgB,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtF,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,sBAAsB,CAAC;CACjC;AAED,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;gBACX,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,SAA0C;CAM7F;AAQD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,oBAAoB;cAQxC,CAAC,QAAQ,MAAM,SAAQ,qBAAqB,KAAQ,OAAO,CAAC,CAAC,CAAC;UAqB7E,CAAC,QAAQ,MAAM,SAAS,qBAAqB;WAC5C,CAAC,QAAQ,MAAM,SAAS,OAAO,SAAS,qBAAqB;UAC9D,CAAC,QAAQ,MAAM,SAAS,OAAO,SAAS,qBAAqB;YAC3D,CAAC,QAAQ,MAAM,SAAS,OAAO,SAAS,qBAAqB;aAC5D,CAAC,QAAQ,MAAM,SAAS,qBAAqB;EAEzD"}
@@ -1,2 +1,3 @@
1
1
  export * from "./createGatewayClient";
2
+ export * from "./assertGatewayBaseUrl";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC"}
package/dist/billing.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  getServicePricingSummaries,
17
17
  getServicePricingSummary,
18
18
  labelCadence
19
- } from "./chunk-MPBOCUY4.js";
19
+ } from "./chunk-YLQKXFA7.js";
20
20
  import {
21
21
  busiverseSupportedRegions,
22
22
  getSupportedRegion
@@ -26,10 +26,10 @@ function HeroSection({
26
26
 
27
27
  // src/components/marketing/MarketingSectionHeader.tsx
28
28
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
29
- function MarketingSectionHeader({ eyebrow, title, description, align = "center", className }) {
29
+ function MarketingSectionHeader({ eyebrow, title, description, align = "center", as: Heading = "h2", className }) {
30
30
  return /* @__PURE__ */ jsxs2("div", { className: ["busiverse-marketing-section-header", align === "left" ? "is-left" : "is-center", className].filter(Boolean).join(" "), children: [
31
31
  eyebrow ? /* @__PURE__ */ jsx2("p", { className: "busiverse-eyebrow", children: eyebrow }) : null,
32
- /* @__PURE__ */ jsx2("h2", { children: title }),
32
+ /* @__PURE__ */ jsx2(Heading, { children: title }),
33
33
  description ? /* @__PURE__ */ jsx2("p", { children: description }) : null
34
34
  ] });
35
35
  }
@@ -103,7 +103,6 @@ var busiverseServices = [
103
103
  { key: "ml", name: "ML", category: "intelligence", frontendHost: "ml.busiversehq.com", apiPrefix: "/ml/api/v1", description: "Training, experiments, feature engineering, evaluation, datasets, and agent training.", usesTimeSeries: true },
104
104
  { key: "observability", name: "Observability", category: "operations", frontendHost: "observability.busiversehq.com", apiPrefix: "/observability/api/v1", description: "Metrics, logs, traces, incidents, SLA reports, audit trails, and telemetry.", usesTimeSeries: true },
105
105
  { key: "project", name: "Project", category: "business", frontendHost: "project.busiversehq.com", apiPrefix: "/project/api/v1", description: "Projects, charters, requirements, tasks, milestones, budgets, teams, and deliverables." },
106
- { key: "registry", name: "Registry", category: "developer", frontendHost: "registry.busiversehq.com", apiPrefix: "/registry/api/v1", description: "Legacy registry frontend retained for migration/reference." },
107
106
  { key: "scraper", name: "Scraper", category: "intelligence", frontendHost: "scraper.busiversehq.com", apiPrefix: "/scraper/api/v1", description: "Data acquisition, scheduled feeds, connectors, datasets, and source attribution.", usesTimeSeries: true },
108
107
  { key: "software", name: "Software", category: "developer", frontendHost: "software.busiversehq.com", apiPrefix: "/software/api/v1", description: "Software, API product, app catalog, OAuth client metadata, versions, and integration onboarding." },
109
108
  { key: "stock-exchange", name: "Stock Exchange", category: "finance", frontendHost: "stock-exchange.busiversehq.com", apiPrefix: "/stock-exchange/api/v1", description: "Private listings, public applications, stocks, shares, orders, trades, quotes, and market data.", usesTimeSeries: true },
@@ -1 +1 @@
1
- {"version":3,"file":"BusiverseBrandHead.d.ts","sourceRoot":"","sources":["../../../src/components/brand/BusiverseBrandHead.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA6CD,wBAAgB,uBAAuB,CAAC,EACtC,KAAqB,EACrB,WAAiC,EACjC,QAAsB,EACtB,GAAG,EACH,KAAsC,EACtC,WAA2B,EAC3B,QAA8H,EAC9H,MAAgB,EAChB,UAAgC,EAChC,sBAAoC,EACpC,eAA6B,GAC9B,GAAE,uBAA4B,QAgC9B;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,QAkBhE"}
1
+ {"version":3,"file":"BusiverseBrandHead.d.ts","sourceRoot":"","sources":["../../../src/components/brand/BusiverseBrandHead.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAgDD,wBAAgB,uBAAuB,CAAC,EACtC,KAAqB,EACrB,WAAiC,EACjC,QAAsB,EACtB,GAAG,EACH,KAAsC,EACtC,WAA2B,EAC3B,QAA8H,EAC9H,MAAgB,EAChB,UAAgC,EAChC,sBAAoC,EACpC,eAA6B,GAC9B,GAAE,uBAA4B,QAgC9B;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,QAkBhE"}
@@ -1 +1 @@
1
- {"version":3,"file":"BusiverseLogo.d.ts","sourceRoot":"","sources":["../../../src/components/brand/BusiverseLogo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,UAAU,CAAC;AAC/E,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAsB5D,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IAC/E,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,aAAa,CAAC,EAAE,OAAsB,EAAE,IAAc,EAAE,KAAmB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,qBAUrI"}
1
+ {"version":3,"file":"BusiverseLogo.d.ts","sourceRoot":"","sources":["../../../src/components/brand/BusiverseLogo.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,UAAU,CAAC;AAC/E,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAsB5D,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IAC/E,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,aAAa,CAAC,EAAE,OAAsB,EAAE,IAAc,EAAE,KAAmB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,qBAUrI"}
@@ -4,7 +4,9 @@ export interface MarketingSectionHeaderProps {
4
4
  title: React.ReactNode;
5
5
  description?: React.ReactNode;
6
6
  align?: "left" | "center";
7
+ /** Heading level: h2 inside a longer page, h1 when the section is the page. */
8
+ as?: "h1" | "h2";
7
9
  className?: string;
8
10
  }
9
- export declare function MarketingSectionHeader({ eyebrow, title, description, align, className }: MarketingSectionHeaderProps): React.JSX.Element;
11
+ export declare function MarketingSectionHeader({ eyebrow, title, description, align, as: Heading, className }: MarketingSectionHeaderProps): React.JSX.Element;
10
12
  //# sourceMappingURL=MarketingSectionHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarketingSectionHeader.d.ts","sourceRoot":"","sources":["../../../src/components/marketing/MarketingSectionHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,2BAA2B;IAC1C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,sBAAsB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,KAAgB,EAAE,SAAS,EAAE,EAAE,2BAA2B,qBAQ/H"}
1
+ {"version":3,"file":"MarketingSectionHeader.d.ts","sourceRoot":"","sources":["../../../src/components/marketing/MarketingSectionHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,2BAA2B;IAC1C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC1B,+EAA+E;IAC/E,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,sBAAsB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,KAAgB,EAAE,EAAE,EAAE,OAAc,EAAE,SAAS,EAAE,EAAE,2BAA2B,qBAQnJ"}
package/dist/index.js CHANGED
@@ -41,7 +41,7 @@ import {
41
41
  getServicePricingSummaries,
42
42
  getServicePricingSummary,
43
43
  labelCadence
44
- } from "./chunk-MPBOCUY4.js";
44
+ } from "./chunk-YLQKXFA7.js";
45
45
  import {
46
46
  BusiverseBrandHead,
47
47
  applyBusiverseBrandHead
@@ -65,7 +65,7 @@ import {
65
65
  MarketingFeatureCard,
66
66
  MarketingPricingCard,
67
67
  MarketingSectionHeader
68
- } from "./chunk-NUGBTLBK.js";
68
+ } from "./chunk-732WJVQR.js";
69
69
  import {
70
70
  Button
71
71
  } from "./chunk-IVTESKF4.js";
@@ -91,6 +91,27 @@ var busiverseMotion = {
91
91
  easeStandard: "cubic-bezier(0.16, 1, 0.3, 1)"
92
92
  };
93
93
 
94
+ // src/tokens/controls.ts
95
+ var busiverseControls = {
96
+ /** The smallest target a pointer may be asked to hit. */
97
+ minTarget: "44px",
98
+ height: {
99
+ sm: "44px",
100
+ md: "44px",
101
+ lg: "50px"
102
+ },
103
+ padding: {
104
+ sm: "0 12px",
105
+ md: "0 16px",
106
+ lg: "0 22px"
107
+ },
108
+ fontSize: {
109
+ sm: "14px",
110
+ md: "15px",
111
+ lg: "16px"
112
+ }
113
+ };
114
+
94
115
  // src/components/primitives/Input.tsx
95
116
  import * as React from "react";
96
117
  import { jsx } from "react/jsx-runtime";
@@ -263,6 +284,34 @@ function ForbiddenState({ description = "You do not have permission to access th
263
284
  return /* @__PURE__ */ jsx12(ErrorState, { title: "Access denied", description, action: /* @__PURE__ */ jsx12(Button, { variant: "secondary", children: "Go back" }) });
264
285
  }
265
286
 
287
+ // src/api/assertGatewayBaseUrl.ts
288
+ var GATEWAY_PUBLIC_HOST = "api.busiversehq.com";
289
+ var LOOPBACK_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "[::1]"]);
290
+ var NorthSouthViolationError = class extends Error {
291
+ host;
292
+ constructor(host, reason) {
293
+ super(
294
+ `Refusing an API base URL of '${host}': ${reason}. Browsers reach the platform only through the gateway at ${GATEWAY_PUBLIC_HOST}, which is where a frontend is matched to its approved-frontend record and its route permissions are applied. Service-to-service calls are east-west and do not come from a browser.`
295
+ );
296
+ this.name = "NorthSouthViolationError";
297
+ this.host = host;
298
+ }
299
+ };
300
+ function assertGatewayBaseUrl(baseUrl) {
301
+ let parsed;
302
+ try {
303
+ parsed = new URL(baseUrl);
304
+ } catch {
305
+ throw new NorthSouthViolationError(String(baseUrl), "it is not an absolute URL");
306
+ }
307
+ const host = parsed.hostname;
308
+ if (host.endsWith(".internal.busiversehq.com")) {
309
+ throw new NorthSouthViolationError(host, "that is internal service DNS, reachable only east-west");
310
+ }
311
+ if (host === GATEWAY_PUBLIC_HOST || LOOPBACK_HOSTS.has(host)) return parsed.toString();
312
+ throw new NorthSouthViolationError(host, `the only allowed origins are ${GATEWAY_PUBLIC_HOST} and loopback`);
313
+ }
314
+
266
315
  // src/api/createGatewayClient.ts
267
316
  var GatewayApiError = class extends Error {
268
317
  status;
@@ -280,6 +329,7 @@ async function parseBody(response) {
280
329
  return response.text();
281
330
  }
282
331
  function createGatewayClient(options) {
332
+ const baseUrl = assertGatewayBaseUrl(options.baseUrl);
283
333
  const request = async (path, init = {}) => {
284
334
  const token = typeof options.getAccessToken === "function" ? await options.getAccessToken() : options.getAccessToken;
285
335
  const region = init.region ?? options.region;
@@ -291,7 +341,7 @@ function createGatewayClient(options) {
291
341
  if (init.correlationId) headers.set("X-Correlation-Id", init.correlationId);
292
342
  if (region) Object.entries(toRegionHeaders(region)).forEach(([key, value]) => headers.set(key, value));
293
343
  new Headers(init.headers).forEach((value, key) => headers.set(key, value));
294
- const response = await options.transport(new URL(path, options.baseUrl).toString(), { ...init, headers });
344
+ const response = await options.transport(new URL(path, baseUrl).toString(), { ...init, headers });
295
345
  if (response.status === 401) options.onUnauthorized?.();
296
346
  if (!response.ok) throw new GatewayApiError(response.status, await parseBody(response));
297
347
  if (response.status === 204) return void 0;
@@ -380,12 +430,14 @@ export {
380
430
  ErrorState,
381
431
  Field,
382
432
  ForbiddenState,
433
+ GATEWAY_PUBLIC_HOST,
383
434
  GatewayApiError,
384
435
  HeroSection,
385
436
  Input,
386
437
  MarketingFeatureCard,
387
438
  MarketingPricingCard,
388
439
  MarketingSectionHeader,
440
+ NorthSouthViolationError,
389
441
  PageHeader,
390
442
  RegionSelector,
391
443
  RequireAuth,
@@ -401,11 +453,13 @@ export {
401
453
  UsageQuotaBar,
402
454
  UserMenu,
403
455
  applyBusiverseBrandHead,
456
+ assertGatewayBaseUrl,
404
457
  brandChartColors,
405
458
  brandColor,
406
459
  busiverseAssets,
407
460
  busiverseColors,
408
461
  busiverseContainers,
462
+ busiverseControls,
409
463
  busiverseMotion,
410
464
  busiverseRadius,
411
465
  busiverseServicePricingCatalog,
package/dist/marketing.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  MarketingFeatureCard,
4
4
  MarketingPricingCard,
5
5
  MarketingSectionHeader
6
- } from "./chunk-NUGBTLBK.js";
6
+ } from "./chunk-732WJVQR.js";
7
7
  import "./chunk-IVTESKF4.js";
8
8
  import "./chunk-32FPZZH2.js";
9
9
  import "./chunk-PYZVP4NI.js";
@@ -1 +1 @@
1
- {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/registry/services.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAChC,MAAM,GACN,UAAU,GACV,SAAS,GACT,UAAU,GACV,UAAU,GACV,cAAc,GACd,YAAY,GACZ,WAAW,GACX,YAAY,CAAC;AAEjB,MAAM,WAAW,0BAA0B;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,wBAAwB,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,iBAAiB,EAAE,0BAA0B,EAgCzD,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,0BAA0B,GAAG,SAAS,CAEvF"}
1
+ {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/registry/services.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAChC,MAAM,GACN,UAAU,GACV,SAAS,GACT,UAAU,GACV,UAAU,GACV,cAAc,GACd,YAAY,GACZ,WAAW,GACX,YAAY,CAAC;AAEjB,MAAM,WAAW,0BAA0B;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,wBAAwB,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,iBAAiB,EAAE,0BAA0B,EA+BzD,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,0BAA0B,GAAG,SAAS,CAEvF"}