@busiverse/ui 0.2.13 → 0.2.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.
- package/README.md +7 -0
- package/dist/index.js +7 -7
- package/dist/sandbox/SandboxExperience.d.ts +5 -0
- package/dist/sandbox/SandboxExperience.d.ts.map +1 -0
- package/dist/sandbox/index.d.ts +4 -0
- package/dist/sandbox/index.d.ts.map +1 -0
- package/dist/sandbox/sandboxClient.d.ts +9 -0
- package/dist/sandbox/sandboxClient.d.ts.map +1 -0
- package/dist/sandbox/types.d.ts +37 -0
- package/dist/sandbox/types.d.ts.map +1 -0
- package/dist/sandbox.d.ts +2 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +190 -0
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -293,3 +293,10 @@ This frontend uses the shared BUSIVERSE theme contract from `@busiverse/ui`.
|
|
|
293
293
|
## Theme contract
|
|
294
294
|
|
|
295
295
|
Use `BusiverseThemeProvider` from `@busiverse/ui/theme` in every separately deployed frontend. The only approved storage key is `busiverse-theme`, and every app must expose Light, Dark, and System through `ThemeModeSelect`. Do not create per-frontend theme storage keys or binary-only toggles.
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
## Sandbox UI
|
|
299
|
+
|
|
300
|
+
`@busiverse/ui/sandbox` provides the shared Busiverse sandbox experience used by service frontends. It is network-neutral: it renders sandbox scenarios, dependency maps, event timelines, pricing previews, and gateway headers without making backend calls or embedding secrets.
|
|
301
|
+
|
|
302
|
+
Frontends must pass service-specific scenario content and keep API calls Gateway-only. Sandbox tokens must be issued by Authentication and enforced by Gateway; browser code must never receive client secrets.
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
busiverseColors,
|
|
3
|
+
busiverseContainers,
|
|
4
|
+
busiverseRadius,
|
|
5
|
+
busiverseSpacing,
|
|
6
|
+
busiverseTypography
|
|
7
|
+
} from "./chunk-SXD6EH2C.js";
|
|
1
8
|
import {
|
|
2
9
|
BUSIVERSE_THEME_STORAGE_KEY,
|
|
3
10
|
BusiverseThemeProvider,
|
|
@@ -71,13 +78,6 @@ import {
|
|
|
71
78
|
import {
|
|
72
79
|
cn
|
|
73
80
|
} from "./chunk-PYZVP4NI.js";
|
|
74
|
-
import {
|
|
75
|
-
busiverseColors,
|
|
76
|
-
busiverseContainers,
|
|
77
|
-
busiverseRadius,
|
|
78
|
-
busiverseSpacing,
|
|
79
|
-
busiverseTypography
|
|
80
|
-
} from "./chunk-SXD6EH2C.js";
|
|
81
81
|
|
|
82
82
|
// src/tokens/motion.ts
|
|
83
83
|
var busiverseMotion = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SandboxExperience.d.ts","sourceRoot":"","sources":["../../src/sandbox/SandboxExperience.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,sBAAsB,EAAmB,MAAM,SAAS,CAAC;AAyCvE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,qBA+I9D;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sandbox/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const BUSIVERSE_SANDBOX_ENVIRONMENT: "SANDBOX";
|
|
2
|
+
export type SandboxHeadersInput = {
|
|
3
|
+
sandboxId?: string;
|
|
4
|
+
tenantId?: string;
|
|
5
|
+
correlationId?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function createSandboxHeaders(input?: SandboxHeadersInput): Record<string, string>;
|
|
8
|
+
export declare function isSandboxEnvironment(value: unknown): value is typeof BUSIVERSE_SANDBOX_ENVIRONMENT;
|
|
9
|
+
//# sourceMappingURL=sandboxClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandboxClient.d.ts","sourceRoot":"","sources":["../../src/sandbox/sandboxClient.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,EAAG,SAAkB,CAAC;AAEhE,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,KAAK,GAAE,mBAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAU5F;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,OAAO,6BAA6B,CAElG"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type SandboxEnvironment = "SANDBOX";
|
|
2
|
+
export type SandboxDependency = {
|
|
3
|
+
name: string;
|
|
4
|
+
href: string;
|
|
5
|
+
reason: string;
|
|
6
|
+
};
|
|
7
|
+
export type SandboxScenario = {
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
entrypoint: string;
|
|
11
|
+
simulated: string[];
|
|
12
|
+
dependencies: SandboxDependency[];
|
|
13
|
+
pricePreview: string;
|
|
14
|
+
events: string[];
|
|
15
|
+
promoteChecklist: string[];
|
|
16
|
+
};
|
|
17
|
+
export type SandboxEvent = {
|
|
18
|
+
label: string;
|
|
19
|
+
service: string;
|
|
20
|
+
status: "Ready" | "Simulated" | "Blocked" | "Review";
|
|
21
|
+
detail: string;
|
|
22
|
+
};
|
|
23
|
+
export type SandboxExperienceProps = {
|
|
24
|
+
serviceName: string;
|
|
25
|
+
serviceCode: string;
|
|
26
|
+
headline: string;
|
|
27
|
+
description: string;
|
|
28
|
+
apiPrefix: string;
|
|
29
|
+
publicUrl: string;
|
|
30
|
+
signupUrl?: string;
|
|
31
|
+
scenarios: SandboxScenario[];
|
|
32
|
+
controls: string[];
|
|
33
|
+
blockedEffects: string[];
|
|
34
|
+
dataPolicy: string[];
|
|
35
|
+
events: SandboxEvent[];
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/sandbox/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAE3C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;IACrD,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,EAAE,YAAY,EAAE,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
package/dist/sandbox.js
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
// src/sandbox/sandboxClient.ts
|
|
2
|
+
var BUSIVERSE_SANDBOX_ENVIRONMENT = "SANDBOX";
|
|
3
|
+
function createSandboxHeaders(input = {}) {
|
|
4
|
+
const headers = {
|
|
5
|
+
"X-Busiverse-Environment": BUSIVERSE_SANDBOX_ENVIRONMENT
|
|
6
|
+
};
|
|
7
|
+
if (input.sandboxId) headers["X-Busiverse-Sandbox-Id"] = input.sandboxId;
|
|
8
|
+
if (input.tenantId) headers["X-Busiverse-Tenant-Id"] = input.tenantId;
|
|
9
|
+
if (input.correlationId) headers["X-Correlation-Id"] = input.correlationId;
|
|
10
|
+
return headers;
|
|
11
|
+
}
|
|
12
|
+
function isSandboxEnvironment(value) {
|
|
13
|
+
return value === BUSIVERSE_SANDBOX_ENVIRONMENT;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// src/sandbox/SandboxExperience.tsx
|
|
17
|
+
import * as React from "react";
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
function cx(...classes) {
|
|
20
|
+
return classes.filter(Boolean).join(" ");
|
|
21
|
+
}
|
|
22
|
+
function Card({ children, className = "" }) {
|
|
23
|
+
return /* @__PURE__ */ jsx("section", { className: cx("rounded-3xl border border-white/10 bg-white/[0.04] p-6 shadow-2xl shadow-black/10 backdrop-blur-xl", className), children });
|
|
24
|
+
}
|
|
25
|
+
function Pill({ children }) {
|
|
26
|
+
return /* @__PURE__ */ jsx("span", { className: "inline-flex items-center rounded-full border border-white/10 bg-white/[0.06] px-3 py-1 text-xs font-medium text-muted-foreground", children });
|
|
27
|
+
}
|
|
28
|
+
function ScenarioCard({ scenario, active, onSelect }) {
|
|
29
|
+
return /* @__PURE__ */ jsxs(
|
|
30
|
+
"button",
|
|
31
|
+
{
|
|
32
|
+
type: "button",
|
|
33
|
+
onClick: onSelect,
|
|
34
|
+
className: cx(
|
|
35
|
+
"w-full rounded-2xl border p-5 text-left transition duration-200",
|
|
36
|
+
active ? "border-primary/60 bg-primary/10 shadow-lg shadow-primary/10" : "border-white/10 bg-white/[0.03] hover:border-primary/30 hover:bg-white/[0.06]"
|
|
37
|
+
),
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between", children: [
|
|
40
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
41
|
+
/* @__PURE__ */ jsx("h3", { className: "font-heading text-lg font-semibold text-foreground", children: scenario.title }),
|
|
42
|
+
/* @__PURE__ */ jsx("p", { className: "mt-2 text-sm leading-6 text-muted-foreground", children: scenario.description })
|
|
43
|
+
] }),
|
|
44
|
+
/* @__PURE__ */ jsx(Pill, { children: scenario.entrypoint })
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ jsx("p", { className: "mt-4 text-sm font-medium text-primary", children: scenario.pricePreview })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
function SandboxExperience(props) {
|
|
52
|
+
const [activeIndex, setActiveIndex] = React.useState(0);
|
|
53
|
+
const [sandboxId] = React.useState(() => `sbx_${props.serviceCode.toLowerCase().replace(/[^a-z0-9]+/g, "_")}_preview`);
|
|
54
|
+
const active = props.scenarios[activeIndex] ?? props.scenarios[0];
|
|
55
|
+
const headers = createSandboxHeaders({ sandboxId, correlationId: `${props.serviceCode.toLowerCase()}-sandbox-preview` });
|
|
56
|
+
return /* @__PURE__ */ jsxs("main", { className: "min-h-screen bg-background text-foreground", children: [
|
|
57
|
+
/* @__PURE__ */ jsxs("section", { className: "relative overflow-hidden border-b border-white/10", children: [
|
|
58
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 -z-10 bg-[radial-gradient(circle_at_top_left,hsl(var(--primary)/0.22),transparent_34%),radial-gradient(circle_at_top_right,hsl(var(--accent)/0.18),transparent_30%)]" }),
|
|
59
|
+
/* @__PURE__ */ jsxs("div", { className: "mx-auto flex max-w-7xl flex-col gap-8 px-4 py-12 sm:px-6 lg:px-8 lg:py-16", children: [
|
|
60
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
61
|
+
/* @__PURE__ */ jsx(Pill, { children: "Sandbox environment" }),
|
|
62
|
+
/* @__PURE__ */ jsx(Pill, { children: "Resettable data" }),
|
|
63
|
+
/* @__PURE__ */ jsx(Pill, { children: "No production side effects" })
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-8 lg:grid-cols-[1.2fr_0.8fr] lg:items-end", children: [
|
|
66
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
67
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold uppercase tracking-[0.3em] text-primary", children: props.serviceName }),
|
|
68
|
+
/* @__PURE__ */ jsx("h1", { className: "mt-4 max-w-4xl font-heading text-4xl font-bold tracking-tight sm:text-5xl lg:text-6xl", children: props.headline }),
|
|
69
|
+
/* @__PURE__ */ jsx("p", { className: "mt-6 max-w-3xl text-base leading-8 text-muted-foreground sm:text-lg", children: props.description }),
|
|
70
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-8 flex flex-wrap gap-3", children: [
|
|
71
|
+
/* @__PURE__ */ jsx("a", { href: "#scenarios", className: "rounded-full bg-primary px-5 py-3 text-sm font-semibold text-primary-foreground shadow-lg shadow-primary/20", children: "Run a scenario" }),
|
|
72
|
+
/* @__PURE__ */ jsx("a", { href: props.signupUrl ?? "https://user.busiversehq.com/signup", className: "rounded-full border border-white/10 bg-white/[0.04] px-5 py-3 text-sm font-semibold text-foreground hover:bg-white/[0.08]", children: "Create sandbox tenant" }),
|
|
73
|
+
/* @__PURE__ */ jsx("a", { href: props.publicUrl, className: "rounded-full border border-white/10 px-5 py-3 text-sm font-semibold text-muted-foreground hover:text-foreground", children: "Open service" })
|
|
74
|
+
] })
|
|
75
|
+
] }),
|
|
76
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
77
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
78
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
79
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Environment" }),
|
|
80
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 font-heading text-2xl font-semibold", children: "SANDBOX" })
|
|
81
|
+
] }),
|
|
82
|
+
/* @__PURE__ */ jsx("span", { className: "rounded-full border border-emerald-400/30 bg-emerald-400/10 px-3 py-1 text-xs font-semibold text-emerald-300", children: "isolated" })
|
|
83
|
+
] }),
|
|
84
|
+
/* @__PURE__ */ jsxs("dl", { className: "mt-6 space-y-4 text-sm", children: [
|
|
85
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between gap-4 border-t border-white/10 pt-4", children: [
|
|
86
|
+
/* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: "Sandbox ID" }),
|
|
87
|
+
/* @__PURE__ */ jsx("dd", { className: "font-mono text-xs", children: sandboxId })
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between gap-4 border-t border-white/10 pt-4", children: [
|
|
90
|
+
/* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: "API prefix" }),
|
|
91
|
+
/* @__PURE__ */ jsx("dd", { className: "font-mono text-xs", children: props.apiPrefix })
|
|
92
|
+
] }),
|
|
93
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between gap-4 border-t border-white/10 pt-4", children: [
|
|
94
|
+
/* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: "Promotion" }),
|
|
95
|
+
/* @__PURE__ */ jsx("dd", { children: "configuration only" })
|
|
96
|
+
] })
|
|
97
|
+
] })
|
|
98
|
+
] })
|
|
99
|
+
] })
|
|
100
|
+
] })
|
|
101
|
+
] }),
|
|
102
|
+
/* @__PURE__ */ jsxs("section", { id: "scenarios", className: "mx-auto grid max-w-7xl gap-6 px-4 py-10 sm:px-6 lg:grid-cols-[0.9fr_1.1fr] lg:px-8", children: [
|
|
103
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-4", children: props.scenarios.map((scenario, index) => /* @__PURE__ */ jsx(ScenarioCard, { scenario, active: index === activeIndex, onSelect: () => setActiveIndex(index) }, scenario.title)) }),
|
|
104
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
105
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
106
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between", children: [
|
|
107
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
108
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold uppercase tracking-[0.24em] text-primary", children: "Active scenario" }),
|
|
109
|
+
/* @__PURE__ */ jsx("h2", { className: "mt-2 font-heading text-3xl font-semibold", children: active.title }),
|
|
110
|
+
/* @__PURE__ */ jsx("p", { className: "mt-3 text-sm leading-6 text-muted-foreground", children: active.description })
|
|
111
|
+
] }),
|
|
112
|
+
/* @__PURE__ */ jsx(Pill, { children: active.entrypoint })
|
|
113
|
+
] }),
|
|
114
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-6 grid gap-4 md:grid-cols-2", children: [
|
|
115
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
116
|
+
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground", children: "Simulated workflow" }),
|
|
117
|
+
/* @__PURE__ */ jsx("ul", { className: "mt-3 space-y-2 text-sm text-muted-foreground", children: active.simulated.map((item) => /* @__PURE__ */ jsx("li", { className: "rounded-xl bg-white/[0.03] px-3 py-2", children: item }, item)) })
|
|
118
|
+
] }),
|
|
119
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
120
|
+
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground", children: "Promotion checklist" }),
|
|
121
|
+
/* @__PURE__ */ jsx("ul", { className: "mt-3 space-y-2 text-sm text-muted-foreground", children: active.promoteChecklist.map((item) => /* @__PURE__ */ jsx("li", { className: "rounded-xl bg-white/[0.03] px-3 py-2", children: item }, item)) })
|
|
122
|
+
] })
|
|
123
|
+
] })
|
|
124
|
+
] }),
|
|
125
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
126
|
+
/* @__PURE__ */ jsx("h2", { className: "font-heading text-2xl font-semibold", children: "Dependency map" }),
|
|
127
|
+
/* @__PURE__ */ jsx("div", { className: "mt-4 grid gap-3 sm:grid-cols-2", children: active.dependencies.map((dependency) => /* @__PURE__ */ jsxs("a", { href: dependency.href, className: "rounded-2xl border border-white/10 bg-white/[0.03] p-4 transition hover:border-primary/40 hover:bg-white/[0.06]", children: [
|
|
128
|
+
/* @__PURE__ */ jsx("p", { className: "font-semibold text-foreground", children: dependency.name }),
|
|
129
|
+
/* @__PURE__ */ jsx("p", { className: "mt-2 text-sm leading-6 text-muted-foreground", children: dependency.reason })
|
|
130
|
+
] }, dependency.name)) })
|
|
131
|
+
] }),
|
|
132
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-6 lg:grid-cols-2", children: [
|
|
133
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
134
|
+
/* @__PURE__ */ jsx("h2", { className: "font-heading text-2xl font-semibold", children: "Sandbox headers" }),
|
|
135
|
+
/* @__PURE__ */ jsx("pre", { className: "mt-4 overflow-x-auto rounded-2xl border border-white/10 bg-black/30 p-4 text-xs text-muted-foreground", children: /* @__PURE__ */ jsx("code", { children: JSON.stringify(headers, null, 2) }) })
|
|
136
|
+
] }),
|
|
137
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
138
|
+
/* @__PURE__ */ jsx("h2", { className: "font-heading text-2xl font-semibold", children: "Production price preview" }),
|
|
139
|
+
/* @__PURE__ */ jsx("p", { className: "mt-4 text-sm leading-6 text-muted-foreground", children: active.pricePreview }),
|
|
140
|
+
/* @__PURE__ */ jsx("p", { className: "mt-4 text-xs leading-5 text-muted-foreground", children: "Sandbox usage is not billed. This preview maps workflow activity to customer-facing production pricing only." })
|
|
141
|
+
] })
|
|
142
|
+
] })
|
|
143
|
+
] })
|
|
144
|
+
] }),
|
|
145
|
+
/* @__PURE__ */ jsxs("section", { className: "mx-auto grid max-w-7xl gap-6 px-4 pb-14 sm:px-6 lg:grid-cols-3 lg:px-8", children: [
|
|
146
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
147
|
+
/* @__PURE__ */ jsx("h2", { className: "font-heading text-xl font-semibold", children: "Controls" }),
|
|
148
|
+
/* @__PURE__ */ jsx("ul", { className: "mt-4 space-y-2 text-sm text-muted-foreground", children: props.controls.map((item) => /* @__PURE__ */ jsxs("li", { children: [
|
|
149
|
+
"\u2022 ",
|
|
150
|
+
item
|
|
151
|
+
] }, item)) })
|
|
152
|
+
] }),
|
|
153
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
154
|
+
/* @__PURE__ */ jsx("h2", { className: "font-heading text-xl font-semibold", children: "Blocked production effects" }),
|
|
155
|
+
/* @__PURE__ */ jsx("ul", { className: "mt-4 space-y-2 text-sm text-muted-foreground", children: props.blockedEffects.map((item) => /* @__PURE__ */ jsxs("li", { children: [
|
|
156
|
+
"\u2022 ",
|
|
157
|
+
item
|
|
158
|
+
] }, item)) })
|
|
159
|
+
] }),
|
|
160
|
+
/* @__PURE__ */ jsxs(Card, { children: [
|
|
161
|
+
/* @__PURE__ */ jsx("h2", { className: "font-heading text-xl font-semibold", children: "Data policy" }),
|
|
162
|
+
/* @__PURE__ */ jsx("ul", { className: "mt-4 space-y-2 text-sm text-muted-foreground", children: props.dataPolicy.map((item) => /* @__PURE__ */ jsxs("li", { children: [
|
|
163
|
+
"\u2022 ",
|
|
164
|
+
item
|
|
165
|
+
] }, item)) })
|
|
166
|
+
] })
|
|
167
|
+
] }),
|
|
168
|
+
/* @__PURE__ */ jsx("section", { className: "mx-auto max-w-7xl px-4 pb-16 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs(Card, { children: [
|
|
169
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between", children: [
|
|
170
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
171
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold uppercase tracking-[0.24em] text-primary", children: "Observability" }),
|
|
172
|
+
/* @__PURE__ */ jsx("h2", { className: "mt-2 font-heading text-3xl font-semibold", children: "Sandbox event timeline" })
|
|
173
|
+
] }),
|
|
174
|
+
/* @__PURE__ */ jsx(Pill, { children: "correlation aware" })
|
|
175
|
+
] }),
|
|
176
|
+
/* @__PURE__ */ jsx("div", { className: "mt-6 grid gap-3", children: props.events.map((event) => /* @__PURE__ */ jsxs("div", { className: "grid gap-3 rounded-2xl border border-white/10 bg-white/[0.03] p-4 md:grid-cols-[0.8fr_0.6fr_0.4fr_1.2fr] md:items-center", children: [
|
|
177
|
+
/* @__PURE__ */ jsx("p", { className: "font-semibold text-foreground", children: event.label }),
|
|
178
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: event.service }),
|
|
179
|
+
/* @__PURE__ */ jsx("span", { className: "w-fit rounded-full border border-white/10 px-3 py-1 text-xs text-muted-foreground", children: event.status }),
|
|
180
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: event.detail })
|
|
181
|
+
] }, `${event.service}-${event.label}`)) })
|
|
182
|
+
] }) })
|
|
183
|
+
] });
|
|
184
|
+
}
|
|
185
|
+
export {
|
|
186
|
+
BUSIVERSE_SANDBOX_ENVIRONMENT,
|
|
187
|
+
SandboxExperience,
|
|
188
|
+
createSandboxHeaders,
|
|
189
|
+
isSandboxEnvironment
|
|
190
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@busiverse/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
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",
|
|
@@ -61,11 +61,16 @@
|
|
|
61
61
|
"types": "./dist/theme-public.d.ts",
|
|
62
62
|
"import": "./dist/theme-public.js",
|
|
63
63
|
"default": "./dist/theme-public.js"
|
|
64
|
+
},
|
|
65
|
+
"./sandbox": {
|
|
66
|
+
"types": "./dist/sandbox.d.ts",
|
|
67
|
+
"import": "./dist/sandbox.js",
|
|
68
|
+
"default": "./dist/sandbox.js"
|
|
64
69
|
}
|
|
65
70
|
},
|
|
66
71
|
"scripts": {
|
|
67
72
|
"clean": "node scripts/clean.mjs",
|
|
68
|
-
"build": "npm run clean && tsup src/index.ts src/tailwind-public.ts src/brand.ts src/i18n-public.ts src/billing.ts src/social.ts src/marketing.ts src/assets-public.ts src/theme-public.ts --format esm --target es2022 && tsc -p tsconfig.build.json && node scripts/copy-static.mjs",
|
|
73
|
+
"build": "npm run clean && tsup src/index.ts src/tailwind-public.ts src/brand.ts src/i18n-public.ts src/billing.ts src/social.ts src/marketing.ts src/assets-public.ts src/theme-public.ts src/sandbox.ts --format esm --target es2022 && tsc -p tsconfig.build.json && node scripts/copy-static.mjs",
|
|
69
74
|
"typecheck": "tsc --noEmit",
|
|
70
75
|
"pack:local": "npm pack",
|
|
71
76
|
"prepublishOnly": "npm run typecheck && npm run build && npm pack --dry-run"
|