@zephytiju/juntai-blueprint-ui 0.0.0-bootstrap.0

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 ADDED
@@ -0,0 +1,84 @@
1
+ # JuntaiBlueprintUI
2
+
3
+ `@zephytiju/juntai-blueprint-ui` is the Blueprint-owned discovery Micro-UI for
4
+ Juntai Console. It renders the approved Blueprint gallery, calls Blueprint
5
+ Service for authorized exact-version discovery, and resolves one build-time
6
+ domain contribution for each result.
7
+
8
+ The package deliberately does not contain create/detail workflows or a domain
9
+ page. Its browser boundary is:
10
+
11
+ ```text
12
+ Juntai Console
13
+ -> @zephytiju/juntai-blueprint-ui
14
+ -> @zephytiju/juntai-typescript-sdk/services/platform.blueprint
15
+ -> Blueprint Service
16
+
17
+ Open in {Domain}
18
+ -> build-time domain + asset-kind contribution
19
+ -> scalar Blueprint IDs and intent
20
+ -> owning domain page and owning domain backend
21
+ ```
22
+
23
+ No payload, exact domain reference, credential, callback, client, or object
24
+ snapshot crosses the route. The package never calls Configuration Registry,
25
+ Artifact Registry, OCI, a domain proxy, or a different domain service.
26
+
27
+ ## Immutable prerequisites
28
+
29
+ - `@zephytiju/juntai-typescript-sdk@1.2.0`
30
+ - Blueprint OpenAPI source: Blueprint Service `2.0.0`
31
+ - OpenAPI SHA-256: `d5a4f0044b8bccf8a6618ed59c5afcc325168432d0826f28cdfdae9d45e4d72e`
32
+ - SDK tarball SHA-256: `4c0f33c8f6714dd9952342bd3eb77603ab7ad9a72e474876b9a0bf883c1f6054`
33
+ - `@zephytiju/console-sdk@2.1.0`
34
+ - npm integrity: `sha512-/ni9gTeREAKwQtyQpDEprzDz1cl01I/N5aXdG11M+KPGoib1UjmoXIBSs8N6kuqS4iX3KF6FIyy6hehtYiGEsg==`
35
+ - npm shasum: `cb58e1e83f52bebadae6567a30d3e6764526f07a`
36
+
37
+ These are exact registry dependencies. Workspace, link, file, and path
38
+ dependencies are not supported.
39
+
40
+ ## Static composition
41
+
42
+ Console assembles domain contributions at build time and passes the frozen list
43
+ to the module factory:
44
+
45
+ ```ts
46
+ import { createJuntaiBlueprintConsoleModule } from "@zephytiju/juntai-blueprint-ui";
47
+ import "@zephytiju/juntai-blueprint-ui/styles.css";
48
+
49
+ const blueprintModule = createJuntaiBlueprintConsoleModule({
50
+ blueprintAssetContributions: [
51
+ latticeBlueprintContribution,
52
+ axiomBlueprintContribution,
53
+ prismBlueprintContribution,
54
+ ],
55
+ });
56
+ ```
57
+
58
+ Resolution is unique by `domain + asset kind` and must match the service-owned
59
+ `owning_route_key`. Missing, ambiguous, and incompatible contributions render a
60
+ disabled `Open in {Domain}` action with a stable reason. A successful action
61
+ navigates with only `blueprintAssetId`, `blueprintVersionId`, `intent`, and any
62
+ declared optional target identifiers.
63
+
64
+ ## Visual authority
65
+
66
+ The gallery follows Figma frame
67
+ [`232:227`](https://www.figma.com/design/d1Bf2nbIOfErIq5nVDiyTj/Juntai-Console-%E2%80%94-Product-UI-Review?node-id=232-227&p=f):
68
+ search and compact filters, exact-version result count, responsive 360-pixel
69
+ cards, domain/kind identity, title/summary/publisher, version/digest, and one
70
+ full-width domain action. Shell header and navigation remain Console-owned.
71
+
72
+ ## Verification
73
+
74
+ ```bash
75
+ npm ci
76
+ npm run verify
77
+ npm run release:verify
78
+ ```
79
+
80
+ Verification covers generated-client requests, auth failure, cancellation,
81
+ loading/error/empty states, direct-entry filter restoration, exact-version
82
+ cards, scalar routing, missing/ambiguous/incompatible contributions,
83
+ accessibility, Figma measurements, immutable pins, forbidden browser surfaces,
84
+ package contents, and a clean exact-version consumer install.
@@ -0,0 +1,20 @@
1
+ import type { ConsolePageContext } from "@zephytiju/console-sdk";
2
+ import { type BlueprintVersionSummary, type VersionLifecycle } from "@zephytiju/juntai-typescript-sdk/services/platform.blueprint";
3
+ export interface BlueprintDiscoveryFilters {
4
+ readonly query?: string;
5
+ readonly domain?: string;
6
+ readonly assetKind?: string;
7
+ readonly lifecycle?: VersionLifecycle;
8
+ readonly pageSize?: number;
9
+ }
10
+ export interface BlueprintDiscoveryClient {
11
+ search(filters: BlueprintDiscoveryFilters, signal: AbortSignal): Promise<readonly BlueprintVersionSummary[]>;
12
+ }
13
+ export declare class BlueprintDiscoveryError extends Error {
14
+ readonly code: string;
15
+ readonly status: number | undefined;
16
+ constructor(message: string, code: string, status?: number);
17
+ }
18
+ /** Creates the only browser client used by this package: Blueprint Service. */
19
+ export declare function createBlueprintDiscoveryClient(context: Pick<ConsolePageContext, "correlationIds" | "fetch">): BlueprintDiscoveryClient;
20
+ //# sourceMappingURL=blueprint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../../src/clients/blueprint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAGL,KAAK,uBAAuB,EAG5B,KAAK,gBAAgB,EACtB,MAAM,8DAA8D,CAAC;AAEtE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,CACJ,OAAO,EAAE,yBAAyB,EAClC,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,SAAS,uBAAuB,EAAE,CAAC,CAAC;CAChD;AAED,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;gBAExB,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;CAM3D;AA4BD,+EAA+E;AAC/E,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,gBAAgB,GAAG,OAAO,CAAC,GAC5D,wBAAwB,CA0B1B"}
@@ -0,0 +1,58 @@
1
+ import { createClient, searchBlueprintVersions, } from "@zephytiju/juntai-typescript-sdk/services/platform.blueprint";
2
+ export class BlueprintDiscoveryError extends Error {
3
+ code;
4
+ status;
5
+ constructor(message, code, status) {
6
+ super(message);
7
+ this.name = "BlueprintDiscoveryError";
8
+ this.code = code;
9
+ this.status = status;
10
+ }
11
+ }
12
+ function sameOriginBaseUrl() {
13
+ if (typeof globalThis.location !== "undefined" && globalThis.location.origin) {
14
+ return globalThis.location.origin;
15
+ }
16
+ return "http://localhost";
17
+ }
18
+ function toSearchRequest(filters) {
19
+ const query = filters.query?.trim();
20
+ return {
21
+ ...(query ? { query } : {}),
22
+ ...(filters.domain ? { domain: filters.domain } : {}),
23
+ ...(filters.assetKind ? { asset_kind: filters.assetKind } : {}),
24
+ ...(filters.lifecycle ? { lifecycle: filters.lifecycle } : {}),
25
+ page_size: filters.pageSize ?? 50,
26
+ };
27
+ }
28
+ function problemCode(error) {
29
+ if (error && typeof error === "object" && "code" in error) {
30
+ const code = error.code;
31
+ if (typeof code === "string" && code)
32
+ return code;
33
+ }
34
+ return "BLUEPRINT_DISCOVERY_UNAVAILABLE";
35
+ }
36
+ /** Creates the only browser client used by this package: Blueprint Service. */
37
+ export function createBlueprintDiscoveryClient(context) {
38
+ const client = createClient({
39
+ baseUrl: sameOriginBaseUrl(),
40
+ fetch: context.fetch,
41
+ });
42
+ return {
43
+ async search(filters, signal) {
44
+ const result = await searchBlueprintVersions({
45
+ body: toSearchRequest(filters),
46
+ client,
47
+ headers: {
48
+ "X-Correlation-ID": context.correlationIds.create(),
49
+ },
50
+ signal,
51
+ });
52
+ if (result.data)
53
+ return result.data.items;
54
+ throw new BlueprintDiscoveryError("Blueprint Service could not complete discovery.", problemCode(result.error), result.response?.status);
55
+ },
56
+ };
57
+ }
58
+ //# sourceMappingURL=blueprint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprint.js","sourceRoot":"","sources":["../../src/clients/blueprint.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,uBAAuB,GAKxB,MAAM,8DAA8D,CAAC;AAiBtE,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IACvC,IAAI,CAAS;IACb,MAAM,CAAqB;IAEpC,YAAY,OAAe,EAAE,IAAY,EAAE,MAAe;QACxD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAED,SAAS,iBAAiB;IACxB,IAAI,OAAO,UAAU,CAAC,QAAQ,KAAK,WAAW,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QAC7E,OAAO,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC;IACpC,CAAC;IACD,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAED,SAAS,eAAe,CAAC,OAAkC;IACzD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC;IACpC,OAAO;QACL,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3B,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrD,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/D,GAAG,C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ageContext } from "@zephytiju/console-sdk";
2
+ import { type ReactElement } from "react";
3
+ import { type BlueprintDiscoveryClient } from "./clients/blueprint.js";
4
+ export declare function abbreviateDigest(digest: string): string;
5
+ export interface BlueprintGalleryProps {
6
+ readonly context: ConsolePageContext;
7
+ readonly contributions: readonly BlueprintAssetContribution[];
8
+ /** Test seam; production always uses the generated Blueprint Service client. */
9
+ readonly discoveryClient?: BlueprintDiscoveryClient;
10
+ }
11
+ export declare function BlueprintGallery({ context, contributions, discoveryClient, }: BlueprintGalleryProps): ReactElement;
12
+ //# sourceMappingURL=gallery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../src/gallery.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAE1B,kBAAkB,EAEnB,MAAM,wBAAwB,CAAC;AAKhC,OAAO,EAEL,KAAK,YAAY,EAIlB,MAAM,OAAO,CAAC;AAEf,OAAO,EAGL,KAAK,wBAAwB,EAE9B,MAAM,wBAAwB,CAAC;AAyChC,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAMvD;AA8FD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC;IACrC,QAAQ,CAAC,aAAa,EAAE,SAAS,0BAA0B,EAAE,CAAC;IAC9D,gFAAgF;IAChF,QAAQ,CAAC,eAAe,CAAC,EAAE,wBAAwB,CAAC;CACrD;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,aAAa,EACb,eAAe,GAChB,EAAE,qBAAqB,GAAG,YAAY,CAoJtC"}
@@ -0,0 +1,110 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useMemo, useState, } from "react";
3
+ import { BlueprintDiscoveryError, createBlueprintDiscoveryClient, } from "./clients/blueprint.js";
4
+ import { RequestFeedback, useAsyncResource } from "./request-state.js";
5
+ import { createBlueprintVersionNavigationTarget, resolveBlueprintVersionContribution, } from "./routing.js";
6
+ const LIFECYCLES = new Set([
7
+ "active",
8
+ "deprecated",
9
+ "unavailable",
10
+ ]);
11
+ function queryScalar(value) {
12
+ return typeof value === "string" ? value : (value?.[0] ?? "");
13
+ }
14
+ function initialFilters(context) {
15
+ const lifecycle = queryScalar(context.route.query.lifecycle);
16
+ return {
17
+ query: queryScalar(context.route.query.query),
18
+ domain: queryScalar(context.route.query.domain),
19
+ assetKind: queryScalar(context.route.query.assetKind),
20
+ ...(LIFECYCLES.has(lifecycle)
21
+ ? { lifecycle: lifecycle }
22
+ : {}),
23
+ };
24
+ }
25
+ function domainDisplayName(domain) {
26
+ return domain
27
+ .split(/[._-]+/u)
28
+ .filter(Boolean)
29
+ .map((part) => part.charAt(0).toUpperCase() + part.slice(1))
30
+ .join(" ");
31
+ }
32
+ function exactVersionLabel(label) {
33
+ return label.toLowerCase().startsWith("v") ? label : `v${label}`;
34
+ }
35
+ export function abbreviateDigest(digest) {
36
+ if (digest.length <= 18)
37
+ return digest;
38
+ const separator = digest.indexOf(":");
39
+ const prefix = separator >= 0 ? digest.slice(0, separator + 1) : "";
40
+ const value = separator >= 0 ? digest.slice(separator + 1) : digest;
41
+ return `${prefix}${value.slice(0, 4)}…${value.slice(-4)}`;
42
+ }
43
+ function errorFeedback(error) {
44
+ if (error instanceof BlueprintDiscoveryError &&
45
+ (error.status === 401 || error.status === 403 || error.code === "BLUEPRINT_FORBIDDEN")) {
46
+ return {
47
+ title: "Blueprint access unavailable",
48
+ message: "You do not have permission to discover Blueprint assets for this tenant.",
49
+ };
50
+ }
51
+ return {
52
+ title: "Blueprint assets could not be loaded",
53
+ message: "Blueprint Service is unavailable. Try the request again.",
54
+ };
55
+ }
56
+ function AssetCard({ context, contributions, version, }) {
57
+ const resolution = resolveBlueprintVersionContribution(version, contributions);
58
+ const domainName = resolution.status === "resolved"
59
+ ? resolution.contribution.domainDisplayName
60
+ : domainDisplayName(version.domain);
61
+ const actionLabel = resolution.status === "resolved"
62
+ ? resolution.contribution.openActionLabel
63
+ : `Open in ${domainName}`;
64
+ const reasonId = `blueprint-route-${version.asset_id}-${version.blueprint_version_id}`;
65
+ const open = () => {
66
+ if (resolution.status !== "resolved")
67
+ return;
68
+ context.navigate(createBlueprintVersionNavigationTarget(version, resolution.contribution));
69
+ };
70
+ return (_jsxs("article", { className: "blueprint-card", "aria-label": `${version.catalog_title}, ${exactVersionLabel(version.version_label)}`, children: [_jsxs("div", { className: "blueprint-card__identity", children: [_jsx("span", { className: "blueprint-badge", children: domainName }), _jsx("span", { className: "blueprint-card__kind", children: version.asset_kind }), _jsx("span", { className: `blueprint-card__status blueprint-card__status--${version.lifecycle}`, children: version.lifecycle })] }), _jsx("h2", { children: version.catalog_title }), _jsx("p", { className: "blueprint-card__summary", children: version.catalog_summary }), _jsxs("p", { className: "blueprint-card__publisher", children: ["Published by ", version.publisher, version.taxonomy[0] ? ` · ${version.taxonomy[0]}` : ""] }), _jsxs("div", { className: "blueprint-card__version", children: [_jsx("span", { children: exactVersionLabel(version.version_label) }), _jsx("code", { title: version.exact_digest, children: abbreviateDigest(version.exact_digest) })] }), _jsx("button", { "aria-describedby": resolution.status === "unavailable" ? reasonId : undefined, className: "blueprint-card__action", disabled: resolution.status === "unavailable", onClick: open, type: "button", children: actionLabel }), resolution.status === "unavailable" ? (_jsx(UnavailableReason, { id: reasonId, resolution: resolution })) : null] }));
71
+ }
72
+ function UnavailableReason({ id, resolution, }) {
73
+ return (_jsxs("p", { className: "blueprint-card__unavailable", id: id, children: [_jsx("span", { className: "sr-only", children: "Unavailable reason: " }), resolution.reason.code, ": ", resolution.reason.message] }));
74
+ }
75
+ export function BlueprintGallery({ context, contributions, discoveryClient, }) {
76
+ const startingFilters = useMemo(() => initialFilters(context), [context]);
77
+ const [draftQuery, setDraftQuery] = useState(startingFilters.query ?? "");
78
+ const [filters, setFilters] = useState(startingFilters);
79
+ const [compatibleOnly, setCompatibleOnly] = useState(queryScalar(context.route.query.compatible) === "true");
80
+ const client = useMemo(() => discoveryClient ?? createBlueprintDiscoveryClient(context), [context, discoveryClient]);
81
+ const load = useCallback((signal) => client.search(filters, signal), [client, filters]);
82
+ const { state, retry } = useAsyncResource(load);
83
+ const submitSearch = (event) => {
84
+ event.preventDefault();
85
+ setFilters((current) => ({ ...current, query: draftQuery }));
86
+ };
87
+ const versions = state.status === "ready"
88
+ ? state.value.filter((version) => !compatibleOnly || Object.keys(version.compatibility).length > 0)
89
+ : [];
90
+ const domains = state.status === "ready"
91
+ ? [...new Set(state.value.map(({ domain }) => domain))].sort()
92
+ : [];
93
+ const assetKinds = state.status === "ready"
94
+ ? [...new Set(state.value.map(({ asset_kind }) => asset_kind))].sort()
95
+ : [];
96
+ return (_jsxs("main", { className: "juntai-blueprint-gallery", "aria-labelledby": "blueprint-gallery-title", children: [_jsxs("header", { className: "blueprint-heading", children: [_jsx("p", { className: "blueprint-breadcrumb", children: "Platform\u00A0\u00A0/\u00A0\u00A0Blueprint" }), _jsx("h1", { id: "blueprint-gallery-title", children: "Discover Blueprint assets" }), _jsx("p", { children: "Find exact, immutable assets across domains, then continue in the owning domain experience." })] }), _jsxs("form", { className: "blueprint-controls", onSubmit: submitSearch, role: "search", children: [_jsxs("label", { className: "blueprint-search", children: [_jsx("span", { className: "sr-only", children: "Search Blueprint assets" }), _jsx("input", { onChange: (event) => setDraftQuery(event.currentTarget.value), placeholder: "Search by title, taxonomy, publisher, or exact digest\u2026", type: "search", value: draftQuery })] }), _jsxs("label", { className: "blueprint-filter", children: [_jsx("span", { className: "sr-only", children: "Domain" }), _jsxs("select", { "aria-label": "Domain", onChange: (event) => setFilters((current) => ({
97
+ ...current,
98
+ domain: event.currentTarget.value,
99
+ })), value: filters.domain ?? "", children: [_jsx("option", { value: "", children: "All domains" }), domains.map((domain) => _jsx("option", { value: domain, children: domainDisplayName(domain) }, domain))] })] }), _jsxs("label", { className: "blueprint-filter", children: [_jsx("span", { className: "sr-only", children: "Asset kind" }), _jsxs("select", { "aria-label": "Asset kind", onChange: (event) => setFilters((current) => ({
100
+ ...current,
101
+ assetKind: event.currentTarget.value,
102
+ })), value: filters.assetKind ?? "", children: [_jsx("option", { value: "", children: "All asset kinds" }), assetKinds.map((kind) => _jsx("option", { value: kind, children: kind }, kind))] })] }), _jsxs("label", { className: "blueprint-filter", children: [_jsx("span", { className: "sr-only", children: "Lifecycle" }), _jsxs("select", { "aria-label": "Lifecycle", onChange: (event) => {
103
+ const lifecycle = event.currentTarget.value;
104
+ setFilters((current) => {
105
+ const { lifecycle: _previousLifecycle, ...rest } = current;
106
+ return lifecycle ? { ...rest, lifecycle } : rest;
107
+ });
108
+ }, value: filters.lifecycle ?? "", children: [_jsx("option", { value: "", children: "All states" }), _jsx("option", { value: "active", children: "Published" }), _jsx("option", { value: "deprecated", children: "Deprecated" }), _jsx("option", { value: "unavailable", children: "Unavailable" })] })] }), _jsx("button", { "aria-pressed": compatibleOnly, className: "blueprint-filter blueprint-filter--button", onClick: () => setCompatibleOnly((current) => !current), type: "button", children: "Compatible" }), _jsx("button", { className: "sr-only", type: "submit", children: "Search" })] }), state.status === "loading" ? (_jsx(RequestFeedback, { message: "Searching authorized, exact Blueprint versions.", status: "loading", title: "Loading Blueprint assets" })) : null, state.status === "error" ? (_jsx(RequestFeedback, { ...errorFeedback(state.error), onRetry: retry, status: "error" })) : null, state.status === "ready" && versions.length === 0 ? (_jsx(RequestFeedback, { message: "Adjust the search or filters to discover another exact version.", status: "empty", title: "No Blueprint assets found" })) : null, state.status === "ready" && versions.length > 0 ? (_jsxs("section", { "aria-label": "Blueprint asset results", children: [_jsxs("p", { className: "blueprint-result-count", children: [versions.length, " ", versions.length === 1 ? "asset" : "assets", " \u00B7 exact immutable versions"] }), _jsx("div", { className: "blueprint-grid", children: versions.map((version) => (_jsx(AssetCard, { context: context, contributions: contributions, version: version }, `${version.asset_id}:${version.blueprint_version_id}`))) })] })) : null] }));
109
+ }
110
+ //# sourceMappingURL=gallery.js.map
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2BAA2B,GACjC,CACH,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,MAAM,KAAK,OAAO,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACjD,iCAAoB,yBAAyB,aAC3C,aAAG,SAAS,EAAC,wBAAwB,aAClC,QAAQ,CAAC,MAAM,OAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,wCAC3D,EACJ,cAAK,SAAS,EAAC,gBAAgB,YAC5B,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CACzB,KAAC,SAAS,IACR,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,aAAa,EAE5B,OAAO,EAAE,OAAO,IADX,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAE1D,CACH,CAAC,GACE,IACE,CACX,CAAC,CAAC,CAAC,IAAI,IACH,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ export { blueprintServiceRegistration, createJuntaiBlueprintConsoleModule, juntaiBlueprintConsoleModule, } from "./module.js";
2
+ export type { BlueprintConsoleModuleOptions, } from "./module.js";
3
+ export { BlueprintDiscoveryError, createBlueprintDiscoveryClient, } from "./clients/blueprint.js";
4
+ export type { BlueprintDiscoveryClient, BlueprintDiscoveryFilters, } from "./clients/blueprint.js";
5
+ export { BlueprintGallery, abbreviateDigest } from "./gallery.js";
6
+ export type { BlueprintGalleryProps } from "./gallery.js";
7
+ export { createBlueprintVersionNavigationTarget, resolveBlueprintVersionContribution, } from "./routing.js";
8
+ export { RequestFeedback, useAsyncResource } from "./request-state.js";
9
+ export type { AsyncResourceState, RequestFeedbackProps, UseAsyncResourceResult, } from "./request-state.js";
10
+ export { juntaiBlueprintConsoleModule as default } from "./module.js";
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,kCAAkC,EAClC,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,uBAAuB,EACvB,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EACL,sCAAsC,EACtC,mCAAmC,GACpC,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACvE,YAAY,EACV,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,4BAA4B,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ export { blueprintServiceRegistration, createJuntaiBlueprintConsoleModule, juntaiBlueprintConsoleModule, } from "./module.js";
2
+ export { BlueprintDiscoveryError, createBlueprintDiscoveryClient, } from "./clients/blueprint.js";
3
+ export { BlueprintGallery, abbreviateDigest } from "./gallery.js";
4
+ export { createBlueprintVersionNavigationTarget, resolveBlueprintVersionContribution, } from "./routing.js";
5
+ export { RequestFeedback, useAsyncResource } from "./request-state.js";
6
+ export { juntaiBlueprintConsoleModule as default } from "./module.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,kCAAkC,EAClC,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AAIrB,OAAO,EACL,uBAAuB,EACvB,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC;AAKhC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAElE,OAAO,EACL,sCAAsC,EACtC,mCAAmC,GACpC,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAOvE,OAAO,EAAE,4BAA4B,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { type BlueprintAssetContribution, type ConsoleModule, type ServiceRegistration } from "@zephytiju/console-sdk";
2
+ export interface BlueprintConsoleModuleOptions {
3
+ /** Build-time contributions compiled into the owning Console release. */
4
+ readonly blueprintAssetContributions?: readonly BlueprintAssetContribution[];
5
+ }
6
+ /**
7
+ * Creates the module from an immutable build-time contribution list. This is
8
+ * the composition seam used by JuntaiConsole; it is not a runtime registry.
9
+ */
10
+ export declare function createJuntaiBlueprintConsoleModule(options?: BlueprintConsoleModuleOptions): ConsoleModule;
11
+ export declare const blueprintServiceRegistration: ServiceRegistration;
12
+ export declare const juntaiBlueprintConsoleModule: ConsoleModule;
13
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACzB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,6BAA6B;IAC5C,yEAAyE;IACzE,QAAQ,CAAC,2BAA2B,CAAC,EAAE,SAAS,0BAA0B,EAAE,CAAC;CAC9E;AAkCD;;;GAGG;AACH,wBAAgB,kCAAkC,CAChD,OAAO,GAAE,6BAAkC,GAC1C,aAAa,CAKf;AAsBD,eAAO,MAAM,4BAA4B,qBAExC,CAAC;AACF,eAAO,MAAM,4BAA4B,eAExC,CAAC"}
package/dist/module.js ADDED
@@ -0,0 +1,61 @@
1
+ import { defineConsoleModule, defineService, } from "@zephytiju/console-sdk";
2
+ const NO_BLUEPRINT_CONTRIBUTIONS = Object.freeze([]);
3
+ function createBlueprintServiceRegistration(contributions) {
4
+ return defineService({
5
+ id: "platform.blueprints",
6
+ ownerModuleId: "juntai-blueprint",
7
+ displayName: { defaultMessage: "Blueprint" },
8
+ summary: {
9
+ defaultMessage: "Discover exact, immutable assets across product domains.",
10
+ },
11
+ category: "Application Delivery",
12
+ tags: ["blueprint", "catalog", "discovery"],
13
+ icon: { name: "blueprint" },
14
+ discoveryPermissions: [{ resource: "blueprints", action: "read" }],
15
+ pages: [
16
+ {
17
+ id: "browse",
18
+ kind: "overview",
19
+ path: "/",
20
+ label: { defaultMessage: "Discover" },
21
+ permissions: [{ resource: "blueprints", action: "read" }],
22
+ load: async () => {
23
+ const { createBrowseBlueprintsPage } = await import("./pages/browse-page.js");
24
+ return { default: createBrowseBlueprintsPage(contributions) };
25
+ },
26
+ },
27
+ ],
28
+ });
29
+ }
30
+ /**
31
+ * Creates the module from an immutable build-time contribution list. This is
32
+ * the composition seam used by JuntaiConsole; it is not a runtime registry.
33
+ */
34
+ export function createJuntaiBlueprintConsoleModule(options = {}) {
35
+ const contributions = Object.freeze([
36
+ ...(options.blueprintAssetContributions ?? []),
37
+ ]);
38
+ return createBlueprintModule(createBlueprintServiceRegistration(contributions));
39
+ }
40
+ function createBlueprintModule(service) {
41
+ return defineConsoleModule({
42
+ id: "juntai-blueprint",
43
+ version: "1.0.0",
44
+ owner: {
45
+ team: "Juntai Blueprint",
46
+ repository: "zephytiju/JuntaiBlueprintUI",
47
+ },
48
+ compatibility: {
49
+ console: "^1",
50
+ sdk: ">=2.1.0 <=2.1.0",
51
+ react: "^19",
52
+ typescriptSdk: ">=1.2.0 <=1.2.0",
53
+ },
54
+ register(registrar) {
55
+ registrar.registerService(service);
56
+ },
57
+ });
58
+ }
59
+ export const blueprintServiceRegistration = createBlueprintServiceRegistration(NO_BLUEPRINT_CONTRIBUTIONS);
60
+ export const juntaiBlueprintConsoleModule = createBlueprintModule(blueprintServiceRegistration);
61
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,aAAa,GAId,MAAM,wBAAwB,CAAC;AAOhC,MAAM,0BAA0B,GAA0C,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAE5F,SAAS,kCAAkC,CACzC,aAAoD;IAEpD,OAAO,aAAa,CAAC;QACnB,EAAE,EAAE,qBAAqB;QACzB,aAAa,EAAE,kBAAkB;QACjC,WAAW,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE;QAC5C,OAAO,EAAE;YACP,cAAc,EAAE,0DAA0D;SAC3E;QACD,QAAQ,EAAE,sBAAsB;QAChC,IAAI,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,WAAW,CAAC;QAC3C,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QAC3B,oBAAoB,EAAE,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QAClE,KAAK,EAAE;YACL;gBACE,EAAE,EAAE,QAAQ;gBACZ,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,EAAE,cAAc,EAAE,UAAU,EAAE;gBACrC,WAAW,EAAE,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;gBACzD,IAAI,EAAE,KAAK,IAAI,EAAE;oBACf,MAAM,EAAE,0BAA0B,EAAE,GAAG,MAAM,MAAM,CAAC,wBAAwB,CAAC,CAAC;oBAC9E,OAAO,EAAE,OAAO,EAAE,0BAA0B,CAAC,aAAa,CAAC,EAAE,CAAC;gBAChE,CAAC;aACF;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kCAAkC,CAChD,UAAyC,EAAE;IAE3C,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;QAClC,GAAG,CAAC,OAAO,CAAC,2BAA2B,IAAI,EAAE,CAAC;KAC/C,CAAC,CAAC;IACH,OAAO,qBAAqB,CAAC,kCAAkC,CAAC,aAAa,CAAC,CAAC,CAAC;AAClF,CAAC;AAED,SAAS,qBAAqB,CAAC,OAA4B;IACzD,OAAO,mBAAmB,CAAC;QACzB,EAAE,EAAE,kBAAkB;QACtB,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE;YACL,IAAI,EAAE,kBAAkB;YACxB,UAAU,EAAE,6BAA6B;SAC1C;QACD,aAAa,EAAE;YACb,OAAO,EAAE,IAAI;YACb,GAAG,EAAE,iBAAiB;YACtB,KAAK,EAAE,KAAK;YACZ,aAAa,EAAE,iBAAiB;SACjC;QACD,QAAQ,CAAC,SAAS;YAChB,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG,kCAAkC,CAC5E,0BAA0B,CAC3B,CAAC;AACF,MAAM,CAAC,MAAM,4BAA4B,GAAG,qBAAqB,CAC/D,4BAA4B,CAC7B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { BlueprintAssetContribution, ConsolePageProps } from "@zephytiju/console-sdk";
2
+ import type { ComponentType } from "react";
3
+ import "../styles.css";
4
+ export declare function createBrowseBlueprintsPage(contributions: readonly BlueprintAssetContribution[]): ComponentType<ConsolePageProps>;
5
+ declare const _default: ComponentType<ConsolePageProps>;
6
+ export default _default;
7
+ //# sourceMappingURL=browse-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browse-page.d.ts","sourceRoot":"","sources":["../../src/pages/browse-page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,eAAe,CAAC;AAEvB,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,SAAS,0BAA0B,EAAE,GACnD,aAAa,CAAC,gBAAgB,CAAC,CAWjC;;AAED,wBAA8C"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { BlueprintGallery } from "../gallery.js";
3
+ import "../styles.css";
4
+ export function createBrowseBlueprintsPage(contributions) {
5
+ const installedContributions = Object.freeze([...contributions]);
6
+ return function BrowseBlueprintsPage({ context }) {
7
+ return (_jsx(BlueprintGallery, { context: context, contributions: installedContributions }));
8
+ };
9
+ }
10
+ export default createBrowseBlueprintsPage([]);
11
+ //# sourceMappingURL=browse-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browse-page.js","sourceRoot":"","sources":["../../src/pages/browse-page.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,eAAe,CAAC;AAEvB,MAAM,UAAU,0BAA0B,CACxC,aAAoD;IAEpD,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC;IAEjE,OAAO,SAAS,oBAAoB,CAAC,EAAE,OAAO,EAAoB;QAChE,OAAO,CACL,KAAC,gBAAgB,IACf,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,sBAAsB,GACrC,CACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,eAAe,0BAA0B,CAAC,EAAE,CAAC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { type ReactElement, type ReactNode } from "react";
2
+ export type AsyncResourceState<T> = {
3
+ readonly status: "loading";
4
+ } | {
5
+ readonly status: "ready";
6
+ readonly value: T;
7
+ } | {
8
+ readonly status: "error";
9
+ readonly error: unknown;
10
+ };
11
+ export interface UseAsyncResourceResult<T> {
12
+ readonly state: AsyncResourceState<T>;
13
+ readonly retry: () => void;
14
+ }
15
+ /**
16
+ * Runs one page-owned request with cancellation and retry. State remains local
17
+ * to the mounted contributor page; no cross-module store or shell state exists.
18
+ */
19
+ export declare function useAsyncResource<T>(load: (signal: AbortSignal) => Promise<T>): UseAsyncResourceResult<T>;
20
+ export interface RequestFeedbackProps {
21
+ readonly status: "loading" | "empty" | "error";
22
+ readonly title: string;
23
+ readonly message: string;
24
+ readonly retryLabel?: string | undefined;
25
+ readonly onRetry?: (() => void) | undefined;
26
+ readonly action?: ReactNode | undefined;
27
+ }
28
+ /** Renders safe, semantic request feedback without exposing backend details. */
29
+ export declare function RequestFeedback({ status, title, message, retryLabel, onRetry, action, }: RequestFeedbackProps): ReactElement;
30
+ //# sourceMappingURL=request-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-state.d.ts","sourceRoot":"","sources":["../src/request-state.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAC5B;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;CAAE,GAC9B;IAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GAC/C;IAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1D,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,GACxC,sBAAsB,CAAC,CAAC,CAAC,CAsB3B;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;IAC/C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACzC;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,KAAK,EACL,OAAO,EACP,UAAwB,EACxB,OAAO,EACP,MAAM,GACP,EAAE,oBAAoB,GAAG,YAAY,CAerC"}
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useState, } from "react";
3
+ /**
4
+ * Runs one page-owned request with cancellation and retry. State remains local
5
+ * to the mounted contributor page; no cross-module store or shell state exists.
6
+ */
7
+ export function useAsyncResource(load) {
8
+ const [attempt, setAttempt] = useState(0);
9
+ const [state, setState] = useState({ status: "loading" });
10
+ useEffect(() => {
11
+ const controller = new AbortController();
12
+ setState({ status: "loading" });
13
+ void Promise.resolve().then(() => load(controller.signal)).then((value) => {
14
+ if (!controller.signal.aborted)
15
+ setState({ status: "ready", value });
16
+ }, (error) => {
17
+ if (!controller.signal.aborted)
18
+ setState({ status: "error", error });
19
+ });
20
+ return () => controller.abort();
21
+ }, [attempt, load]);
22
+ const retry = useCallback(() => setAttempt((current) => current + 1), []);
23
+ return { state, retry };
24
+ }
25
+ /** Renders safe, semantic request feedback without exposing backend details. */
26
+ export function RequestFeedback({ status, title, message, retryLabel = "Try again", onRetry, action, }) {
27
+ const isError = status === "error";
28
+ return (_jsxs("section", { "aria-atomic": "true", "aria-live": isError ? "assertive" : "polite", role: isError ? "alert" : "status", children: [_jsx("h2", { children: title }), _jsx("p", { children: message }), onRetry ? _jsx("button", { onClick: onRetry, type: "button", children: retryLabel }) : null, action] }));
29
+ }
30
+ //# sourceMappingURL=request-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-state.js","sourceRoot":"","sources":["../src/request-state.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,WAAW,EACX,SAAS,EACT,QAAQ,GACT,MAAM,OAAO,CAAC;AAYf;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC9B,IAAyC;IAEzC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC1C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAwB,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IAEjF,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACzC,QAAQ,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;QAEhC,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAC7D,CAAC,KAAK,EAAE,EAAE;YACR,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO;gBAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QACvE,CAAC,EACD,CAAC,KAAc,EAAE,EAAE;YACjB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO;gBAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QACvE,CAAC,CACF,CAAC;QAEF,OAAO,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAClC,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IAEpB,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1E,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC1B,CAAC;AAWD,gFAAgF;AAChF,MAAM,UAAU,eAAe,CAAC,EAC9B,MAAM,EACN,KAAK,EACL,OAAO,EACP,UAAU,GAAG,WAAW,EACxB,OAAO,EACP,MAAM,GACe;IACrB,MAAM,OAAO,GAAG,MAAM,KAAK,OAAO,CAAC;IAEnC,OAAO,CACL,kCACc,MAAM,eACP,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,EAC3C,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,aAElC,uBAAK,KAAK,GAAM,EAChB,sBAAI,OAAO,GAAK,EACf,OAAO,CAAC,CAAC,CAAC,iBAAQ,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ,YAAE,UAAU,GAAU,CAAC,CAAC,CAAC,IAAI,EAC9E,MAAM,IACC,CACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type BlueprintAssetContribution, type BlueprintAssetContributionResolution, type ConsoleContributionNavigationTarget } from "@zephytiju/console-sdk";
2
+ import type { BlueprintVersionSummary } from "@zephytiju/juntai-typescript-sdk/services/platform.blueprint";
3
+ export declare function resolveBlueprintVersionContribution(version: BlueprintVersionSummary, contributions: readonly BlueprintAssetContribution[]): BlueprintAssetContributionResolution;
4
+ export declare function createBlueprintVersionNavigationTarget(version: BlueprintVersionSummary, contribution: BlueprintAssetContribution, intent?: string, targetIds?: Readonly<Record<string, string>>): ConsoleContributionNavigationTarget;
5
+ //# sourceMappingURL=routing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../src/routing.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,0BAA0B,EAC/B,KAAK,oCAAoC,EACzC,KAAK,mCAAmC,EACzC,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8DAA8D,CAAC;AAE5G,wBAAgB,mCAAmC,CACjD,OAAO,EAAE,uBAAuB,EAChC,aAAa,EAAE,SAAS,0BAA0B,EAAE,GACnD,oCAAoC,CAMtC;AAED,wBAAgB,sCAAsC,CACpD,OAAO,EAAE,uBAAuB,EAChC,YAAY,EAAE,0BAA0B,EACxC,MAAM,SAAS,EACf,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAC3C,mCAAmC,CAOrC"}
@@ -0,0 +1,17 @@
1
+ import { createBlueprintAssetNavigationTarget, resolveBlueprintAssetContribution, } from "@zephytiju/console-sdk";
2
+ export function resolveBlueprintVersionContribution(version, contributions) {
3
+ return resolveBlueprintAssetContribution(contributions, {
4
+ assetKind: version.asset_kind,
5
+ domain: version.domain,
6
+ owningRouteKey: version.owning_route_key,
7
+ });
8
+ }
9
+ export function createBlueprintVersionNavigationTarget(version, contribution, intent = "view", targetIds) {
10
+ return createBlueprintAssetNavigationTarget(contribution, {
11
+ blueprintAssetId: version.asset_id,
12
+ blueprintVersionId: version.blueprint_version_id,
13
+ intent,
14
+ ...(targetIds ? { targetIds } : {}),
15
+ });
16
+ }
17
+ //# sourceMappingURL=routing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routing.js","sourceRoot":"","sources":["../src/routing.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oCAAoC,EACpC,iCAAiC,GAIlC,MAAM,wBAAwB,CAAC;AAGhC,MAAM,UAAU,mCAAmC,CACjD,OAAgC,EAChC,aAAoD;IAEpD,OAAO,iCAAiC,CAAC,aAAa,EAAE;QACtD,SAAS,EAAE,OAAO,CAAC,UAAU;QAC7B,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,cAAc,EAAE,OAAO,CAAC,gBAAgB;KACzC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,sCAAsC,CACpD,OAAgC,EAChC,YAAwC,EACxC,MAAM,GAAG,MAAM,EACf,SAA4C;IAE5C,OAAO,oCAAoC,CAAC,YAAY,EAAE;QACxD,gBAAgB,EAAE,OAAO,CAAC,QAAQ;QAClC,kBAAkB,EAAE,OAAO,CAAC,oBAAoB;QAChD,MAAM;QACN,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACpC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,330 @@
1
+ .juntai-blueprint-gallery {
2
+ --blueprint-surface: var(--juntai-surface-base, #ffffff);
3
+ --blueprint-surface-selected: var(--juntai-surface-selected, #f2f7ff);
4
+ --blueprint-border: var(--juntai-border-default, #dce3ee);
5
+ --blueprint-border-strong: var(--juntai-border-strong, #cbd6e5);
6
+ --blueprint-text: var(--juntai-text-primary, #172033);
7
+ --blueprint-text-secondary: var(--juntai-text-secondary, #526176);
8
+ --blueprint-text-muted: var(--juntai-text-muted, #6f7d90);
9
+ --blueprint-link: var(--juntai-text-link, #1455aa);
10
+ box-sizing: border-box;
11
+ width: 100%;
12
+ min-height: 100%;
13
+ padding: 28px 32px 32px;
14
+ color: var(--blueprint-text);
15
+ background: var(--juntai-surface-canvas, #ffffff);
16
+ font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
17
+ }
18
+
19
+ .juntai-blueprint-gallery *,
20
+ .juntai-blueprint-gallery *::before,
21
+ .juntai-blueprint-gallery *::after {
22
+ box-sizing: inherit;
23
+ }
24
+
25
+ .blueprint-heading {
26
+ display: flex;
27
+ flex-direction: column;
28
+ gap: 8px;
29
+ margin: 0 0 24px;
30
+ }
31
+
32
+ .blueprint-heading h1,
33
+ .blueprint-heading p,
34
+ .blueprint-card h2,
35
+ .blueprint-card p {
36
+ margin: 0;
37
+ }
38
+
39
+ .blueprint-heading h1 {
40
+ font-size: 28px;
41
+ font-weight: 600;
42
+ line-height: 36px;
43
+ letter-spacing: -0.3px;
44
+ }
45
+
46
+ .blueprint-heading > p:last-child {
47
+ max-width: 900px;
48
+ color: var(--blueprint-text-secondary);
49
+ font-size: 14px;
50
+ line-height: 20px;
51
+ }
52
+
53
+ .blueprint-breadcrumb,
54
+ .blueprint-result-count,
55
+ .blueprint-card__publisher,
56
+ .blueprint-card__kind,
57
+ .blueprint-card__status,
58
+ .blueprint-card__version {
59
+ color: var(--blueprint-text-muted);
60
+ font-size: 11px;
61
+ font-weight: 500;
62
+ line-height: 16px;
63
+ letter-spacing: 0.3px;
64
+ }
65
+
66
+ .blueprint-controls {
67
+ display: flex;
68
+ align-items: center;
69
+ gap: 8px;
70
+ width: 100%;
71
+ min-height: 44px;
72
+ margin-bottom: 16px;
73
+ }
74
+
75
+ .blueprint-search {
76
+ flex: 0 1 600px;
77
+ min-width: 280px;
78
+ }
79
+
80
+ .blueprint-search input,
81
+ .blueprint-filter select,
82
+ .blueprint-filter--button {
83
+ height: 44px;
84
+ border: 1px solid var(--blueprint-border-strong);
85
+ border-radius: 8px;
86
+ color: var(--blueprint-text);
87
+ background: var(--blueprint-surface);
88
+ font: inherit;
89
+ font-size: 13px;
90
+ }
91
+
92
+ .blueprint-search input {
93
+ width: 100%;
94
+ padding: 0 14px;
95
+ }
96
+
97
+ .blueprint-search input::placeholder {
98
+ color: var(--blueprint-text-muted);
99
+ opacity: 1;
100
+ }
101
+
102
+ .blueprint-filter select {
103
+ min-width: 118px;
104
+ padding: 0 30px 0 12px;
105
+ }
106
+
107
+ .blueprint-filter--button {
108
+ padding: 0 14px;
109
+ cursor: pointer;
110
+ }
111
+
112
+ .blueprint-filter--button[aria-pressed="true"] {
113
+ border-color: var(--blueprint-link);
114
+ color: var(--blueprint-link);
115
+ background: var(--blueprint-surface-selected);
116
+ }
117
+
118
+ .blueprint-search input:focus-visible,
119
+ .blueprint-filter select:focus-visible,
120
+ .blueprint-filter--button:focus-visible,
121
+ .blueprint-card__action:focus-visible,
122
+ .juntai-blueprint-gallery [role="alert"] button:focus-visible {
123
+ outline: 3px solid color-mix(in srgb, var(--blueprint-link) 35%, transparent);
124
+ outline-offset: 2px;
125
+ }
126
+
127
+ .blueprint-result-count {
128
+ margin: 0 0 16px;
129
+ color: var(--blueprint-text-secondary);
130
+ }
131
+
132
+ .blueprint-grid {
133
+ display: grid;
134
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 360px));
135
+ gap: 16px;
136
+ align-items: stretch;
137
+ }
138
+
139
+ .blueprint-card {
140
+ display: flex;
141
+ flex-direction: column;
142
+ gap: 12px;
143
+ width: 100%;
144
+ min-height: 278px;
145
+ padding: 20px;
146
+ border: 1px solid var(--blueprint-border);
147
+ border-radius: 10px;
148
+ background: var(--blueprint-surface);
149
+ }
150
+
151
+ .blueprint-card__identity,
152
+ .blueprint-card__version {
153
+ display: flex;
154
+ align-items: center;
155
+ gap: 8px;
156
+ width: 100%;
157
+ }
158
+
159
+ .blueprint-badge {
160
+ flex: 0 0 auto;
161
+ padding: 4px 8px;
162
+ border-radius: 8px;
163
+ color: var(--blueprint-link);
164
+ background: var(--blueprint-surface-selected);
165
+ font-size: 11px;
166
+ font-weight: 500;
167
+ line-height: 16px;
168
+ letter-spacing: 0.3px;
169
+ }
170
+
171
+ .blueprint-card__kind {
172
+ flex: 1 1 auto;
173
+ min-width: 0;
174
+ color: var(--blueprint-text-secondary);
175
+ overflow-wrap: anywhere;
176
+ }
177
+
178
+ .blueprint-card__status {
179
+ flex: 0 0 auto;
180
+ text-transform: capitalize;
181
+ }
182
+
183
+ .blueprint-card__status--deprecated,
184
+ .blueprint-card__status--unavailable {
185
+ color: #8b4b00;
186
+ }
187
+
188
+ .blueprint-card h2 {
189
+ font-size: 16px;
190
+ font-weight: 600;
191
+ line-height: 24px;
192
+ }
193
+
194
+ .blueprint-card__summary {
195
+ flex: 1 1 auto;
196
+ color: var(--blueprint-text-secondary);
197
+ font-size: 13px;
198
+ line-height: 18px;
199
+ }
200
+
201
+ .blueprint-card__version {
202
+ color: var(--blueprint-text-secondary);
203
+ }
204
+
205
+ .blueprint-card__version > span {
206
+ flex: 1 1 auto;
207
+ }
208
+
209
+ .blueprint-card__version code {
210
+ color: var(--blueprint-text-muted);
211
+ font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
212
+ font-size: 12px;
213
+ font-weight: 400;
214
+ line-height: 18px;
215
+ }
216
+
217
+ .blueprint-card__action {
218
+ width: 100%;
219
+ min-height: 36px;
220
+ padding: 8px 14px;
221
+ border: 0;
222
+ border-radius: 8px;
223
+ color: #ffffff;
224
+ background: #2d2d2d;
225
+ font: inherit;
226
+ font-size: 13px;
227
+ cursor: pointer;
228
+ }
229
+
230
+ .blueprint-card__action:hover:not(:disabled) {
231
+ background: #171717;
232
+ }
233
+
234
+ .blueprint-card__action:disabled {
235
+ color: #64748b;
236
+ background: #e9eef5;
237
+ cursor: not-allowed;
238
+ }
239
+
240
+ .blueprint-card__unavailable {
241
+ color: #7c4a03;
242
+ font-size: 11px;
243
+ line-height: 16px;
244
+ overflow-wrap: anywhere;
245
+ }
246
+
247
+ .juntai-blueprint-gallery > [role="status"],
248
+ .juntai-blueprint-gallery > [role="alert"] {
249
+ max-width: 720px;
250
+ padding: 24px;
251
+ border: 1px solid var(--blueprint-border);
252
+ border-radius: 10px;
253
+ background: var(--blueprint-surface);
254
+ }
255
+
256
+ .juntai-blueprint-gallery [role="status"] h2,
257
+ .juntai-blueprint-gallery [role="alert"] h2 {
258
+ margin: 0 0 8px;
259
+ font-size: 16px;
260
+ line-height: 24px;
261
+ }
262
+
263
+ .juntai-blueprint-gallery [role="status"] p,
264
+ .juntai-blueprint-gallery [role="alert"] p {
265
+ margin: 0;
266
+ color: var(--blueprint-text-secondary);
267
+ font-size: 13px;
268
+ line-height: 18px;
269
+ }
270
+
271
+ .juntai-blueprint-gallery [role="alert"] button {
272
+ margin-top: 16px;
273
+ padding: 8px 14px;
274
+ border: 0;
275
+ border-radius: 8px;
276
+ color: #ffffff;
277
+ background: #2d2d2d;
278
+ font: inherit;
279
+ font-size: 13px;
280
+ cursor: pointer;
281
+ }
282
+
283
+ .sr-only {
284
+ position: absolute !important;
285
+ width: 1px !important;
286
+ height: 1px !important;
287
+ padding: 0 !important;
288
+ margin: -1px !important;
289
+ overflow: hidden !important;
290
+ clip: rect(0, 0, 0, 0) !important;
291
+ white-space: nowrap !important;
292
+ border: 0 !important;
293
+ }
294
+
295
+ @media (max-width: 860px) {
296
+ .juntai-blueprint-gallery {
297
+ padding: 24px;
298
+ }
299
+
300
+ .blueprint-controls {
301
+ flex-wrap: wrap;
302
+ }
303
+
304
+ .blueprint-search {
305
+ flex-basis: 100%;
306
+ }
307
+
308
+ .blueprint-grid {
309
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
310
+ }
311
+ }
312
+
313
+ @media (max-width: 520px) {
314
+ .juntai-blueprint-gallery {
315
+ padding: 20px 16px;
316
+ }
317
+
318
+ .blueprint-filter,
319
+ .blueprint-filter select,
320
+ .blueprint-filter--button {
321
+ flex: 1 1 100%;
322
+ width: 100%;
323
+ }
324
+ }
325
+
326
+ @media (prefers-reduced-motion: reduce) {
327
+ .juntai-blueprint-gallery * {
328
+ scroll-behavior: auto !important;
329
+ }
330
+ }
package/package.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "@zephytiju/juntai-blueprint-ui",
3
+ "version": "0.0.0-bootstrap.0",
4
+ "description": "Blueprint-owned Micro-UI for Juntai Console",
5
+ "license": "UNLICENSED",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/zephytiju/JuntaiBlueprintUI.git"
9
+ },
10
+ "homepage": "https://github.com/zephytiju/JuntaiBlueprintUI#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/zephytiju/JuntaiBlueprintUI/issues"
13
+ },
14
+ "type": "module",
15
+ "sideEffects": false,
16
+ "files": [
17
+ "dist",
18
+ "README.md"
19
+ ],
20
+ "main": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/index.d.ts",
25
+ "import": "./dist/index.js"
26
+ },
27
+ "./styles.css": "./dist/styles.css",
28
+ "./package.json": "./package.json"
29
+ },
30
+ "publishConfig": {
31
+ "access": "public",
32
+ "tag": "bootstrap"
33
+ },
34
+ "packageManager": "npm@11.9.0",
35
+ "engines": {
36
+ "node": ">=24.14.0"
37
+ },
38
+ "scripts": {
39
+ "boundary": "node ./scripts/check-boundaries.mjs",
40
+ "build": "tsc --project tsconfig.build.json && node ./scripts/copy-assets.mjs",
41
+ "clean": "node ./scripts/clean.mjs",
42
+ "consumer:check": "node ./scripts/consumer-check.mjs",
43
+ "pack:check": "node ./scripts/package-check.mjs",
44
+ "release:verify": "npm run verify && node ./scripts/check-release-ready.mjs",
45
+ "test": "vitest run",
46
+ "typecheck": "tsc --project tsconfig.json --noEmit",
47
+ "verify": "npm run boundary && npm run typecheck && npm run test && npm run clean && npm run build && npm run pack:check && npm run consumer:check"
48
+ },
49
+ "dependencies": {
50
+ "@zephytiju/juntai-typescript-sdk": "1.2.0"
51
+ },
52
+ "peerDependencies": {
53
+ "@zephytiju/console-sdk": "2.1.0",
54
+ "react": "^19.0.0",
55
+ "react-dom": "^19.0.0"
56
+ },
57
+ "devDependencies": {
58
+ "@testing-library/jest-dom": "6.9.1",
59
+ "@testing-library/react": "16.3.2",
60
+ "@testing-library/user-event": "14.6.1",
61
+ "@types/node": "24.10.1",
62
+ "@types/react": "19.2.7",
63
+ "@types/react-dom": "19.2.3",
64
+ "@zephytiju/console-sdk": "2.1.0",
65
+ "axe-core": "4.10.3",
66
+ "jsdom": "27.0.1",
67
+ "react": "19.2.7",
68
+ "react-dom": "19.2.7",
69
+ "typescript": "5.9.3",
70
+ "vitest": "4.1.10"
71
+ }
72
+ }