32 lines
1.3 KiB
TypeScript
32 lines
1.3 KiB
TypeScript
import type { UiAdapterDefinition } from "./types.js";
|
|
|
|
export const layoutAdapterNames = ["ShadcnSidebarLayout", "UiRegistry"] as const;
|
|
|
|
export type LayoutAdapterName = (typeof layoutAdapterNames)[number];
|
|
|
|
const layoutAdapterSources = {
|
|
ShadcnSidebarLayout: "apps/web/app/components/layouts/sidebars/shadcn/ShadcnSidebarLayout.tsx",
|
|
UiRegistry: "apps/web/app/application/ui/uiRegistry.ts",
|
|
} as const satisfies Record<LayoutAdapterName, string>;
|
|
|
|
export type LayoutAdapter = UiAdapterDefinition<"layout"> & {
|
|
readonly status: "available";
|
|
readonly name: LayoutAdapterName;
|
|
readonly source: (typeof layoutAdapterSources)[LayoutAdapterName];
|
|
readonly implementation: "shell-layout" | "agent-registry";
|
|
readonly packageExport: "@hivegrid/ui/layout";
|
|
};
|
|
|
|
export const layoutAdapters = layoutAdapterNames.map((name) => ({
|
|
category: "layout",
|
|
name,
|
|
status: "available",
|
|
source: layoutAdapterSources[name],
|
|
implementation: name === "UiRegistry" ? "agent-registry" : "shell-layout",
|
|
packageExport: "@hivegrid/ui/layout",
|
|
description:
|
|
name === "UiRegistry"
|
|
? "Stable data-ui-id registry consumed by shell, navigation and UI inventory guards."
|
|
: "Stable authenticated shell layout adapter contract. Runtime implementation currently remains in app/.",
|
|
})) satisfies readonly LayoutAdapter[];
|