@dudousxd/nestjs-catalog-react 0.2.0 → 0.3.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/dist/AccessConsole.js +2 -2
- package/dist/CatalogManager.js +5 -5
- package/dist/ConnectionPanel.js +1 -1
- package/dist/CoverageLedger.js +2 -2
- package/dist/DashboardBoard.js +2 -2
- package/dist/EditableField.js +2 -2
- package/dist/ObjectExplorer.js +3 -3
- package/dist/PipelineConsole.js +1 -1
- package/dist/QueryConsole.js +2 -2
- package/dist/SavedQueryPanel.js +2 -2
- package/dist/TraceExplorer.js +4 -4
- package/dist/charts/css.js +1 -1
- package/dist/ui/field.js +1 -1
- package/dist/ui/select.js +2 -2
- package/dist/ui/sheet.js +1 -1
- package/dist/ui/switch.js +1 -1
- package/dist/ui/tabs.js +1 -1
- package/dist/workflow/nodes.js +3 -3
- package/package.json +2 -2
package/dist/AccessConsole.js
CHANGED
|
@@ -161,7 +161,7 @@ const AUTH_METHODS = {
|
|
|
161
161
|
},
|
|
162
162
|
session: {
|
|
163
163
|
icon: ShieldHalf,
|
|
164
|
-
tone: 'text-
|
|
164
|
+
tone: 'text-sky-600',
|
|
165
165
|
hint: 'Holds no credential of its own. Reachable only by a person signing in, and it caps what any of them can do.',
|
|
166
166
|
},
|
|
167
167
|
};
|
|
@@ -187,7 +187,7 @@ function Failed({ message, onRetry, }) {
|
|
|
187
187
|
}
|
|
188
188
|
const TONES = {
|
|
189
189
|
neutral: 'bg-zinc-100 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-300',
|
|
190
|
-
write: 'bg-
|
|
190
|
+
write: 'bg-sky-100 text-sky-700 dark:bg-sky-950 dark:text-sky-300',
|
|
191
191
|
own: 'bg-emerald-100 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-300',
|
|
192
192
|
classified: 'bg-amber-100 text-amber-700 dark:bg-amber-950 dark:text-amber-300',
|
|
193
193
|
};
|
package/dist/CatalogManager.js
CHANGED
|
@@ -16,7 +16,7 @@ import { Tooltip, TooltipProvider } from './ui/tooltip';
|
|
|
16
16
|
*/
|
|
17
17
|
const TYPE_TONE = {
|
|
18
18
|
string: 'text-sky-700 dark:text-sky-300',
|
|
19
|
-
number: 'text-
|
|
19
|
+
number: 'text-sky-700 dark:text-sky-300',
|
|
20
20
|
date: 'text-amber-700 dark:text-amber-300',
|
|
21
21
|
boolean: 'text-emerald-700 dark:text-emerald-300',
|
|
22
22
|
json: 'text-zinc-600 dark:text-zinc-300',
|
|
@@ -97,8 +97,8 @@ export function CatalogManager({ explorerHref, title = 'Catalog', eyebrow = 'Sem
|
|
|
97
97
|
if (isError || !data) {
|
|
98
98
|
return (_jsx("div", { className: "flex h-full items-center justify-center px-6", children: _jsxs("div", { className: "max-w-md text-center", children: [_jsx("h2", { className: "text-lg font-medium", children: "The catalog did not load" }), _jsx("p", { className: cn('mt-1 text-sm', SECONDARY), children: "The server builds it from ORM metadata at boot. Check that the API is reachable and that your account may read it." })] }) }));
|
|
99
99
|
}
|
|
100
|
-
return (_jsx(TooltipProvider, { children: _jsxs("div", { className: "flex h-full flex-col bg-zinc-50 dark:bg-zinc-950", children: [_jsxs("header", { className: cn('shrink-0 border-b px-8 py-6', RULE, PANEL), children: [_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-6", children: [_jsxs("div", { children: [_jsx("p", { className: cn('font-mono text-[11px] uppercase tracking-[0.18em]', MUTED), children: eyebrow }), _jsx("h1", { className: "mt-1 text-2xl font-semibold tracking-tight", children: title }), _jsx("p", { className: cn('mt-1 max-w-xl text-sm', SECONDARY), children: intro })] }), _jsxs("div", { className: "flex items-center gap-6", children: [_jsx(Stat, { label: "Types", value: data.stats.types }), _jsx(Stat, { label: "Properties", value: data.stats.properties }), _jsx(Stat, { label: "Links", value: data.stats.relations }), _jsxs("button", { type: "button", onClick: () => resetMutation.mutate(), disabled: resetMutation.isPending, className: cn('flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs', RULE, SECONDARY, 'transition-colors hover:bg-zinc-50 disabled:opacity-50 dark:hover:bg-zinc-800'), children: [_jsx(RotateCcw, { size: 13 }), "Reset edits"] })] })] }), _jsx("div", { className: "mt-6", children: _jsx(CoverageLedger, { types: types, selected: selected?.name, onSelect: setSelectedName }) })] }), _jsxs("div", { className: "flex min-h-0 flex-1", children: [_jsxs("aside", { className: cn('flex w-72 shrink-0 flex-col border-r', RULE, PANEL), children: [_jsxs("div", { className: cn('shrink-0 space-y-2 border-b p-3', HAIRLINE), children: [_jsxs("div", { className: "relative", children: [_jsx(Search, { size: 14, className: cn('pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2', MUTED) }), _jsx("input", { type: "text", value: filter, onChange: (e) => setFilter(e.target.value), placeholder: "Find a type or table", "aria-label": "Filter object types", className: cn('w-full rounded-md border bg-zinc-50 py-1.5 pl-8 pr-2 text-sm outline-none dark:bg-zinc-950', RULE, 'placeholder:text-zinc-400 focus:border-
|
|
101
|
-
? 'bg-
|
|
100
|
+
return (_jsx(TooltipProvider, { children: _jsxs("div", { className: "flex h-full flex-col bg-zinc-50 dark:bg-zinc-950", children: [_jsxs("header", { className: cn('shrink-0 border-b px-8 py-6', RULE, PANEL), children: [_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-6", children: [_jsxs("div", { children: [_jsx("p", { className: cn('font-mono text-[11px] uppercase tracking-[0.18em]', MUTED), children: eyebrow }), _jsx("h1", { className: "mt-1 text-2xl font-semibold tracking-tight", children: title }), _jsx("p", { className: cn('mt-1 max-w-xl text-sm', SECONDARY), children: intro })] }), _jsxs("div", { className: "flex items-center gap-6", children: [_jsx(Stat, { label: "Types", value: data.stats.types }), _jsx(Stat, { label: "Properties", value: data.stats.properties }), _jsx(Stat, { label: "Links", value: data.stats.relations }), _jsxs("button", { type: "button", onClick: () => resetMutation.mutate(), disabled: resetMutation.isPending, className: cn('flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs', RULE, SECONDARY, 'transition-colors hover:bg-zinc-50 disabled:opacity-50 dark:hover:bg-zinc-800'), children: [_jsx(RotateCcw, { size: 13 }), "Reset edits"] })] })] }), _jsx("div", { className: "mt-6", children: _jsx(CoverageLedger, { types: types, selected: selected?.name, onSelect: setSelectedName }) })] }), _jsxs("div", { className: "flex min-h-0 flex-1", children: [_jsxs("aside", { className: cn('flex w-72 shrink-0 flex-col border-r', RULE, PANEL), children: [_jsxs("div", { className: cn('shrink-0 space-y-2 border-b p-3', HAIRLINE), children: [_jsxs("div", { className: "relative", children: [_jsx(Search, { size: 14, className: cn('pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2', MUTED) }), _jsx("input", { type: "text", value: filter, onChange: (e) => setFilter(e.target.value), placeholder: "Find a type or table", "aria-label": "Filter object types", className: cn('w-full rounded-md border bg-zinc-50 py-1.5 pl-8 pr-2 text-sm outline-none dark:bg-zinc-950', RULE, 'placeholder:text-zinc-400 focus:border-sky-500 focus:ring-2 focus:ring-sky-500/15') })] }), _jsxs("label", { className: cn('flex cursor-pointer items-center gap-2 px-0.5 text-xs', SECONDARY), children: [_jsx("input", { type: "checkbox", checked: onlyUnnamed, onChange: (e) => setOnlyUnnamed(e.target.checked), className: "accent-amber-500" }), "Only types nobody has named"] })] }), _jsxs("nav", { className: "min-h-0 flex-1 overflow-y-auto p-2", children: [grouped.length === 0 && (_jsxs("p", { className: cn('px-2 py-6 text-center text-xs', MUTED), children: ["Nothing matches \u201C", filter, "\u201D."] })), grouped.map(([group, groupTypes]) => (_jsxs("div", { className: "mb-3", children: [_jsxs("div", { className: "flex items-baseline justify-between px-2 py-1", children: [_jsx("span", { className: cn('font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: group }), _jsx("span", { className: cn('font-mono text-[10px]', MUTED), children: groupTypes.length })] }), groupTypes.map((type) => (_jsxs("button", { type: "button", onClick: () => setSelectedName(type.name), className: cn('group flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left transition-colors', selected?.name === type.name
|
|
101
|
+
? 'bg-sky-100 dark:bg-sky-950'
|
|
102
102
|
: 'hover:bg-zinc-50 dark:hover:bg-zinc-800'), children: [_jsx("span", { "aria-hidden": true, className: cn('h-1.5 w-1.5 shrink-0 rounded-full', type.enriched ? 'bg-emerald-500' : 'bg-amber-400/60') }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsxs("span", { className: "block truncate text-sm", children: [type.icon ? `${type.icon} ` : '', type.displayName] }), _jsx("span", { className: cn('block truncate font-mono text-[10px]', MUTED), children: type.tableName })] })] }, type.name)))] }, group)))] })] }), _jsx("main", { className: "min-w-0 flex-1 overflow-y-auto", children: selected && (_jsx(TypeDetail, { type: selected, explorerHref: explorerHref, onPatchType: (patch) => typeMutation.mutate({ name: selected.name, patch }), onPatchProperty: (property, patch) => propertyMutation.mutate({ name: selected.name, property, patch }), onNavigate: setSelectedName }, selected.name)) })] })] }) }));
|
|
103
103
|
}
|
|
104
104
|
function Stat({ label, value }) {
|
|
@@ -106,11 +106,11 @@ function Stat({ label, value }) {
|
|
|
106
106
|
}
|
|
107
107
|
function TypeDetail({ type, explorerHref, onPatchType, onPatchProperty, onNavigate, }) {
|
|
108
108
|
const visible = type.properties.filter((p) => !p.hidden).length;
|
|
109
|
-
return (_jsxs("div", { className: "mx-auto max-w-5xl px-8 py-8", children: [_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-4", children: [_jsxs("div", { className: "min-w-0", children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-2xl leading-none", children: type.icon ?? '◈' }), _jsx(EditableField, { label: "display name", value: type.displayName, onSave: (displayName) => onPatchType({ displayName }), className: "text-2xl font-semibold tracking-tight", inputClassName: "text-2xl font-semibold tracking-tight" })] }), _jsxs("div", { className: cn('mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 pl-1 font-mono text-[11px]', MUTED), children: [_jsx("span", { children: type.name }), _jsx("span", { "aria-hidden": true, children: "\u00B7" }), _jsx("span", { children: type.tableName }), _jsx("span", { "aria-hidden": true, children: "\u00B7" }), _jsxs("span", { children: ["pk ", type.primaryKey.join(', ') || 'none'] }), _jsx("span", { "aria-hidden": true, children: "\u00B7" }), _jsxs("span", { children: [visible, " of ", type.properties.length, " shown"] })] })] }), explorerHref && (_jsxs("a", { href: explorerHref(type.name), className: cn('flex items-center gap-1.5 rounded-md bg-zinc-950 px-3 py-2 text-xs text-zinc-50', 'transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-950 dark:hover:bg-zinc-300'), children: ["Open ", type.pluralDisplayName, _jsx(ArrowUpRight, { size: 13 })] }))] }), _jsx("div", { className: "mt-5 border-l-2 border-
|
|
109
|
+
return (_jsxs("div", { className: "mx-auto max-w-5xl px-8 py-8", children: [_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-4", children: [_jsxs("div", { className: "min-w-0", children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-2xl leading-none", children: type.icon ?? '◈' }), _jsx(EditableField, { label: "display name", value: type.displayName, onSave: (displayName) => onPatchType({ displayName }), className: "text-2xl font-semibold tracking-tight", inputClassName: "text-2xl font-semibold tracking-tight" })] }), _jsxs("div", { className: cn('mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 pl-1 font-mono text-[11px]', MUTED), children: [_jsx("span", { children: type.name }), _jsx("span", { "aria-hidden": true, children: "\u00B7" }), _jsx("span", { children: type.tableName }), _jsx("span", { "aria-hidden": true, children: "\u00B7" }), _jsxs("span", { children: ["pk ", type.primaryKey.join(', ') || 'none'] }), _jsx("span", { "aria-hidden": true, children: "\u00B7" }), _jsxs("span", { children: [visible, " of ", type.properties.length, " shown"] })] })] }), explorerHref && (_jsxs("a", { href: explorerHref(type.name), className: cn('flex items-center gap-1.5 rounded-md bg-zinc-950 px-3 py-2 text-xs text-zinc-50', 'transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-950 dark:hover:bg-zinc-300'), children: ["Open ", type.pluralDisplayName, _jsx(ArrowUpRight, { size: 13 })] }))] }), _jsx("div", { className: "mt-5 border-l-2 border-sky-200 pl-4 dark:border-sky-900", children: _jsx(EditableField, { label: "description", multiline: true, value: type.description ?? '', placeholder: "No one has written down what this type means yet.", onSave: (description) => onPatchType({ description }), className: cn('text-sm leading-relaxed', SECONDARY), inputClassName: "text-sm leading-relaxed" }) }), _jsxs("div", { className: "mt-4 flex flex-wrap items-center gap-2", children: [_jsx(FieldChip, { label: "Group", value: type.group, onSave: (group) => onPatchType({ group }) }), _jsx(FieldChip, { label: "Plural", value: type.pluralDisplayName, onSave: (pluralDisplayName) => onPatchType({ pluralDisplayName }) }), _jsx(FieldChip, { label: "Icon", value: type.icon ?? '', onSave: (icon) => onPatchType({ icon }) })] }), _jsxs("section", { className: "mt-10", children: [_jsx(SectionHeading, { title: "Properties", note: "The column and its SQL type are read from the ORM. The label, description and unit are yours." }), _jsx("div", { className: cn('overflow-hidden rounded-lg border', RULE, PANEL), children: _jsxs("table", { className: "w-full text-sm", children: [_jsx("thead", { children: _jsxs("tr", { className: cn('border-b bg-zinc-50 text-left dark:bg-zinc-950', RULE), children: [_jsx(Th, { className: "w-[30%]", children: "Label" }), _jsx(Th, { className: "w-[22%]", children: "Column" }), _jsx(Th, { className: "w-[10%]", children: "Type" }), _jsx(Th, { className: "w-[12%]", children: "Unit" }), _jsx(Th, { className: "w-[20%]", children: "Meaning" }), _jsx(Th, { className: "w-[6%] text-right", children: "Shown" })] }) }), _jsx("tbody", { children: type.properties.map((property) => (_jsxs("tr", { className: cn('border-b last:border-0', HAIRLINE, property.hidden && 'opacity-45'), children: [_jsxs("td", { className: "px-3 py-2 align-top", children: [_jsx(EditableField, { label: `label for ${property.name}`, value: property.displayName, onSave: (displayName) => onPatchProperty(property.name, { displayName }), inputClassName: "text-sm" }), _jsxs("div", { className: cn('px-1.5 font-mono text-[10px]', MUTED), children: [property.name, property.primary && (_jsx(Tooltip, { content: "Primary key. Always fetched, even when hidden, so a row keeps a stable identity.", children: _jsx("span", { className: "ml-1.5 cursor-help text-sky-600 dark:text-sky-400", children: "pk" }) })), !property.nullable && !property.primary && (_jsx(Tooltip, { content: "NOT NULL in the database. Read from the ORM, not something this screen can change.", children: _jsx("span", { className: "ml-1.5 cursor-help text-amber-600", children: "required" }) }))] })] }), _jsx("td", { className: cn('px-3 py-2 align-top font-mono text-[11px]', SECONDARY), children: property.columnName }), _jsx("td", { className: "px-3 py-2 align-top", children: _jsx(ScalarBadge, { type: property.type }) }), _jsx("td", { className: "px-3 py-2 align-top", children: _jsx(EditableField, { label: `unit for ${property.name}`, value: property.unit ?? '', placeholder: "\u2014", onSave: (unit) => onPatchProperty(property.name, { unit }), inputClassName: "text-xs", className: "text-xs" }) }), _jsx("td", { className: "px-3 py-2 align-top", children: _jsx(EditableField, { label: `description for ${property.name}`, multiline: true, value: property.description ?? '', placeholder: "\u2014", onSave: (description) => onPatchProperty(property.name, { description }), className: cn('text-xs leading-snug', SECONDARY), inputClassName: "text-xs leading-snug" }) }), _jsx("td", { className: "px-3 py-2 text-right align-top", children: _jsx(Tooltip, { content: property.hidden
|
|
110
110
|
? `Hidden from tables and search. ${property.displayName} is still stored — showing it again needs no migration.`
|
|
111
111
|
: `Shown in tables and search. Hiding it only changes what is displayed; the column is untouched.`, children: _jsx("button", { type: "button", "aria-label": `${property.hidden ? 'Show' : 'Hide'} ${property.displayName}`, onClick: () => onPatchProperty(property.name, {
|
|
112
112
|
hidden: !property.hidden,
|
|
113
|
-
}), className: cn('rounded-sm p-1 hover:bg-zinc-100 dark:hover:bg-zinc-800', MUTED), children: property.hidden ? _jsx(EyeOff, { size: 14 }) : _jsx(Eye, { size: 14 }) }) }) })] }, property.name))) })] }) })] }), _jsxs("section", { className: "mt-10 pb-16", children: [_jsx(SectionHeading, { title: "Links", note: "Read from the foreign keys." }), type.relations.length === 0 ? (_jsxs("p", { className: cn('rounded-lg border border-dashed px-4 py-6 text-center text-sm', RULE, MUTED), children: ["Nothing links to or from ", type.displayName, " yet."] })) : (_jsx("div", { className: "flex flex-wrap gap-2", children: type.relations.map((relation) => (_jsxs("button", { type: "button", onClick: () => onNavigate(relation.targetType), className: cn('group flex items-center gap-2 rounded-md border px-3 py-2 text-left transition-colors', RULE, PANEL, 'hover:border-
|
|
113
|
+
}), className: cn('rounded-sm p-1 hover:bg-zinc-100 dark:hover:bg-zinc-800', MUTED), children: property.hidden ? _jsx(EyeOff, { size: 14 }) : _jsx(Eye, { size: 14 }) }) }) })] }, property.name))) })] }) })] }), _jsxs("section", { className: "mt-10 pb-16", children: [_jsx(SectionHeading, { title: "Links", note: "Read from the foreign keys." }), type.relations.length === 0 ? (_jsxs("p", { className: cn('rounded-lg border border-dashed px-4 py-6 text-center text-sm', RULE, MUTED), children: ["Nothing links to or from ", type.displayName, " yet."] })) : (_jsx("div", { className: "flex flex-wrap gap-2", children: type.relations.map((relation) => (_jsxs("button", { type: "button", onClick: () => onNavigate(relation.targetType), className: cn('group flex items-center gap-2 rounded-md border px-3 py-2 text-left transition-colors', RULE, PANEL, 'hover:border-sky-500 hover:bg-sky-100 dark:hover:bg-sky-950'), children: [_jsx("span", { className: cn('font-mono text-[10px] uppercase tracking-wider', MUTED), children: relation.kind }), _jsx("span", { className: "text-sm", children: relation.displayName }), _jsxs("span", { className: cn('font-mono text-[10px]', MUTED), children: ["\u2192 ", relation.targetType] })] }, relation.name))) }))] })] }));
|
|
114
114
|
}
|
|
115
115
|
function SectionHeading({ title, note }) {
|
|
116
116
|
return (_jsxs("div", { className: "mb-3", children: [_jsx("h2", { className: cn('font-mono text-[11px] uppercase tracking-[0.16em]', MUTED), children: title }), _jsx("p", { className: cn('mt-1 text-xs', MUTED), children: note })] }));
|
package/dist/ConnectionPanel.js
CHANGED
|
@@ -130,7 +130,7 @@ function ConnectionCard({ connection, users, canEdit, onEdit, onChanged, }) {
|
|
|
130
130
|
},
|
|
131
131
|
});
|
|
132
132
|
const result = check.data;
|
|
133
|
-
return (_jsxs("div", { className: cn('rounded-lg border p-4', RULE, PANEL), children: [_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Plug, { size: 13, className: MUTED }), _jsx("span", { className: "text-sm font-medium", children: connection.name }), _jsx("span", { className: "rounded-sm bg-zinc-100 px-1.5 py-0.5 font-mono text-[10px] uppercase dark:bg-zinc-800", children: connection.kind }), users.length > 0 && (_jsx(Tooltip, { content: `Read through by ${users.map((c) => c.name).join(', ')}. Moving this address moves all of them at once, which is the point.`, children: _jsxs("span", { className: cn('flex cursor-help items-center gap-1 font-mono text-[10px]', MUTED), children: [_jsx(Waypoints, { size: 10 }), users.length] }) }))] }), _jsx("div", { className: cn('mt-1 font-mono text-[11px]', MUTED), children: describeConnection(connection) }), connection.description && (_jsx("p", { className: cn('mt-1 text-[11px]', MUTED), children: connection.description })), connection.secretEnvVar && (_jsx(Tooltip, { content: "The catalog stores the NAME of this variable, never its value. A leaked catalog database gives away the shape of the integration, not the keys to it.", children: _jsxs("div", { className: cn('mt-1 flex w-fit cursor-help items-center gap-1 font-mono text-[10px]', MUTED), children: [_jsx(KeyRound, { size: 10 }), connection.secretEnvVar] }) }))] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [_jsxs("button", { type: "button", onClick: () => check.mutate(), disabled: check.isPending, className: cn('flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs disabled:opacity-40', RULE, 'hover:bg-zinc-50 dark:hover:bg-zinc-800'), children: [check.isPending ? _jsx(Loader2, { size: 12, className: "animate-spin" }) : _jsx(Plug, { size: 12 }), check.isPending ? 'Reaching…' : 'Test connection'] }), canEdit && (_jsxs(_Fragment, { children: [_jsx(Tooltip, { content: `Edit ${connection.name}`, children: _jsx("button", { type: "button", onClick: onEdit, "aria-label": `Edit ${connection.name}`, className: cn('rounded-sm p-1.5 hover:text-
|
|
133
|
+
return (_jsxs("div", { className: cn('rounded-lg border p-4', RULE, PANEL), children: [_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Plug, { size: 13, className: MUTED }), _jsx("span", { className: "text-sm font-medium", children: connection.name }), _jsx("span", { className: "rounded-sm bg-zinc-100 px-1.5 py-0.5 font-mono text-[10px] uppercase dark:bg-zinc-800", children: connection.kind }), users.length > 0 && (_jsx(Tooltip, { content: `Read through by ${users.map((c) => c.name).join(', ')}. Moving this address moves all of them at once, which is the point.`, children: _jsxs("span", { className: cn('flex cursor-help items-center gap-1 font-mono text-[10px]', MUTED), children: [_jsx(Waypoints, { size: 10 }), users.length] }) }))] }), _jsx("div", { className: cn('mt-1 font-mono text-[11px]', MUTED), children: describeConnection(connection) }), connection.description && (_jsx("p", { className: cn('mt-1 text-[11px]', MUTED), children: connection.description })), connection.secretEnvVar && (_jsx(Tooltip, { content: "The catalog stores the NAME of this variable, never its value. A leaked catalog database gives away the shape of the integration, not the keys to it.", children: _jsxs("div", { className: cn('mt-1 flex w-fit cursor-help items-center gap-1 font-mono text-[10px]', MUTED), children: [_jsx(KeyRound, { size: 10 }), connection.secretEnvVar] }) }))] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [_jsxs("button", { type: "button", onClick: () => check.mutate(), disabled: check.isPending, className: cn('flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs disabled:opacity-40', RULE, 'hover:bg-zinc-50 dark:hover:bg-zinc-800'), children: [check.isPending ? _jsx(Loader2, { size: 12, className: "animate-spin" }) : _jsx(Plug, { size: 12 }), check.isPending ? 'Reaching…' : 'Test connection'] }), canEdit && (_jsxs(_Fragment, { children: [_jsx(Tooltip, { content: `Edit ${connection.name}`, children: _jsx("button", { type: "button", onClick: onEdit, "aria-label": `Edit ${connection.name}`, className: cn('rounded-sm p-1.5 hover:text-sky-600', MUTED), children: _jsx(Pencil, { size: 12 }) }) }), _jsx(Tooltip, { content: users.length > 0
|
|
134
134
|
? `${users.length} connector${users.length === 1 ? '' : 's'} read through this. Deleting it is refused while that is true.`
|
|
135
135
|
: `Delete ${connection.name}`, children: _jsx("button", { type: "button", onClick: () => {
|
|
136
136
|
setBlockedBy(null);
|
package/dist/CoverageLedger.js
CHANGED
|
@@ -10,7 +10,7 @@ import { cn } from './cn';
|
|
|
10
10
|
*/
|
|
11
11
|
export function CoverageLedger({ types, selected, onSelect }) {
|
|
12
12
|
const named = types.filter((t) => t.enriched).length;
|
|
13
|
-
return (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("div", { className: "flex flex-wrap items-end gap-[3px]", children: types.map((type, index) => (_jsx("button", { type: "button", onClick: () => onSelect(type.name), title: `${type.displayName} — ${type.enriched ? 'named' : 'not yet named'}`, "aria-label": `${type.displayName}, ${type.enriched ? 'named' : 'not yet named'}`, style: { animationDelay: `${Math.min(index * 12, 600)}ms` }, className: cn('h-7 w-[7px] rounded-[1px] transition-all duration-150', 'hover:h-9 focus-visible:h-9 focus-visible:outline-2', 'focus-visible:outline-offset-2 focus-visible:outline-
|
|
13
|
+
return (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("div", { className: "flex flex-wrap items-end gap-[3px]", children: types.map((type, index) => (_jsx("button", { type: "button", onClick: () => onSelect(type.name), title: `${type.displayName} — ${type.enriched ? 'named' : 'not yet named'}`, "aria-label": `${type.displayName}, ${type.enriched ? 'named' : 'not yet named'}`, style: { animationDelay: `${Math.min(index * 12, 600)}ms` }, className: cn('h-7 w-[7px] rounded-[1px] transition-all duration-150', 'hover:h-9 focus-visible:h-9 focus-visible:outline-2', 'focus-visible:outline-offset-2 focus-visible:outline-sky-500', type.enriched
|
|
14
14
|
? 'bg-emerald-500/85 hover:bg-emerald-500'
|
|
15
|
-
: 'bg-amber-400/55 hover:bg-amber-400/90', selected === type.name && 'h-10 bg-
|
|
15
|
+
: 'bg-amber-400/55 hover:bg-amber-400/90', selected === type.name && 'h-10 bg-sky-600 hover:bg-sky-600') }, type.name))) }), _jsxs("p", { className: "font-mono text-[11px] tracking-tight text-zinc-400 dark:text-zinc-500", children: [_jsx("span", { className: "text-zinc-950 dark:text-zinc-50", children: named }), " of ", types.length, " object types carry a name a person chose. The rest still answer to whatever the class was called."] })] }));
|
|
16
16
|
}
|
package/dist/DashboardBoard.js
CHANGED
|
@@ -124,8 +124,8 @@ export function DashboardBoard() {
|
|
|
124
124
|
e.preventDefault();
|
|
125
125
|
create.mutate();
|
|
126
126
|
}, children: [_jsx("input", { value: name, onChange: (e) => setName(e.target.value), placeholder: "Name", "aria-label": "Dashboard name", className: cn('min-w-0 flex-1 rounded-md border bg-white px-2 py-1 text-xs outline-none dark:bg-zinc-900', RULE) }), _jsx("button", { type: "submit", disabled: name.trim().length === 0, className: "rounded-md bg-zinc-950 px-2 text-xs text-zinc-50 disabled:opacity-40 dark:bg-zinc-100 dark:text-zinc-950", children: "Add" })] })), _jsxs("nav", { className: "min-h-0 flex-1 overflow-y-auto p-2", children: [dashboards.length === 0 && (_jsx("p", { className: cn('px-2 py-4 text-center text-[11px]', MUTED), children: "No dashboards yet." })), dashboards.map((dashboard) => (_jsxs("button", { type: "button", onClick: () => setSelectedId(dashboard.id), className: cn('flex w-full items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-sm', selected?.id === dashboard.id
|
|
127
|
-
? 'bg-
|
|
128
|
-
: 'hover:bg-zinc-50 dark:hover:bg-zinc-800'), children: [_jsx(LayoutGrid, { size: 12, className: MUTED }), _jsx("span", { className: "min-w-0 flex-1 truncate", children: dashboard.name }), _jsx("span", { className: cn('font-mono text-[10px]', MUTED), children: dashboard.cards.length })] }, dashboard.id)))] }), selected && saved.length > 0 && (_jsxs("div", { className: cn('border-t p-2', RULE), children: [_jsx("div", { className: cn('px-1 pb-1 font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: "Add a card" }), saved.map((query) => (_jsxs("button", { type: "button", onClick: () => addCard(query.id), className: cn('w-full truncate rounded-md px-2 py-1 text-left text-[11px]', 'transition-all hover:translate-x-0.5 hover:bg-
|
|
127
|
+
? 'bg-sky-100 dark:bg-sky-950'
|
|
128
|
+
: 'hover:bg-zinc-50 dark:hover:bg-zinc-800'), children: [_jsx(LayoutGrid, { size: 12, className: MUTED }), _jsx("span", { className: "min-w-0 flex-1 truncate", children: dashboard.name }), _jsx("span", { className: cn('font-mono text-[10px]', MUTED), children: dashboard.cards.length })] }, dashboard.id)))] }), selected && saved.length > 0 && (_jsxs("div", { className: cn('border-t p-2', RULE), children: [_jsx("div", { className: cn('px-1 pb-1 font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: "Add a card" }), saved.map((query) => (_jsxs("button", { type: "button", onClick: () => addCard(query.id), className: cn('w-full truncate rounded-md px-2 py-1 text-left text-[11px]', 'transition-all hover:translate-x-0.5 hover:bg-sky-50', 'dark:hover:bg-sky-950/40'), children: ["+ ", query.name] }, query.id)))] }))] }), _jsx("main", { className: "min-w-0 flex-1 overflow-y-auto", children: !selected ? (_jsx("div", { className: "flex h-full items-center justify-center px-6", children: _jsxs("div", { className: "max-w-sm text-center", children: [_jsx("h2", { className: "text-lg font-medium", children: "No dashboard open" }), _jsx("p", { className: cn('mt-1 text-sm', MUTED), children: "Save a query first, then make a dashboard and add it as a card." })] }) })) : (_jsxs("div", { className: "mx-auto max-w-6xl px-8 py-6", children: [_jsxs("div", { className: "flex items-start justify-between gap-4", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-2xl font-semibold tracking-tight", children: selected.name }), _jsxs("p", { className: cn('mt-0.5 font-mono text-[11px]', MUTED), children: [selected.cards.length, " cards \u00B7 by ", selected.createdBy] })] }), _jsxs("button", { type: "button", onClick: () => remove.mutate(selected.id), className: cn('flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs', RULE, MUTED, 'hover:bg-zinc-50 dark:hover:bg-zinc-800'), children: [_jsx(Trash2, { size: 12 }), "Delete"] })] }), selected.cards.length === 0 ? (_jsx("p", { className: cn('mt-8 rounded-lg border border-dashed px-4 py-12 text-center text-sm', RULE, MUTED), children: "Empty. Add a saved query from the left." })) : (_jsx(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragEnd: onDragEnd, children: _jsx(SortableContext, { items: [...selected.cards]
|
|
129
129
|
.sort((a, b) => a.position - b.position)
|
|
130
130
|
.map((c) => c.id), strategy: rectSortingStrategy, children: _jsx("div", { className: "mt-6 grid grid-cols-4 gap-4", children: [...selected.cards]
|
|
131
131
|
.sort((a, b) => a.position - b.position)
|
package/dist/EditableField.js
CHANGED
|
@@ -53,9 +53,9 @@ export function EditableField({ value, placeholder = 'Not named yet', onSave, mu
|
|
|
53
53
|
commit();
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
-
className: cn('w-full rounded-sm border border-
|
|
56
|
+
className: cn('w-full rounded-sm border border-sky-500 bg-white px-1.5 py-0.5 dark:bg-zinc-900', 'outline-none ring-2 ring-sky-500/20', inputClassName),
|
|
57
57
|
};
|
|
58
58
|
return (_jsxs("div", { className: cn('flex items-start gap-1.5', className), children: [multiline ? (_jsx("textarea", { ...shared, ref: textareaRef, rows: 3 })) : (_jsx("input", { ...shared, ref: inputRef, type: "text" })), _jsx("button", { type: "button", onMouseDown: (e) => e.preventDefault(), onClick: commit, "aria-label": `Save ${label}`, className: "mt-0.5 rounded-sm p-0.5 text-emerald-600 hover:bg-emerald-100 dark:hover:bg-emerald-950", children: _jsx(Check, { size: 14 }) }), _jsx("button", { type: "button", onMouseDown: (e) => e.preventDefault(), onClick: cancel, "aria-label": `Cancel editing ${label}`, className: "mt-0.5 rounded-sm p-0.5 text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-800", children: _jsx(X, { size: 14 }) })] }));
|
|
59
59
|
}
|
|
60
|
-
return (_jsxs("button", { type: "button", onClick: () => setEditing(true), "aria-label": `Edit ${label}`, className: cn('group/edit flex w-full items-start gap-1.5 rounded-sm px-1.5 py-0.5 text-left', 'border border-transparent hover:border-zinc-200 hover:bg-zinc-50', 'dark:hover:border-zinc-800 dark:hover:bg-zinc-950', 'focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-
|
|
60
|
+
return (_jsxs("button", { type: "button", onClick: () => setEditing(true), "aria-label": `Edit ${label}`, className: cn('group/edit flex w-full items-start gap-1.5 rounded-sm px-1.5 py-0.5 text-left', 'border border-transparent hover:border-zinc-200 hover:bg-zinc-50', 'dark:hover:border-zinc-800 dark:hover:bg-zinc-950', 'focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-sky-500', className), children: [_jsx("span", { className: cn(!value && 'italic text-zinc-400 dark:text-zinc-500'), children: value || placeholder }), _jsx(Pencil, { size: 12, className: "mt-1 shrink-0 opacity-0 transition-opacity group-hover/edit:opacity-60" })] }));
|
|
61
61
|
}
|
package/dist/ObjectExplorer.js
CHANGED
|
@@ -134,8 +134,8 @@ export function ObjectExplorer({ type: typeProp, pageSize = 25, backHref, backLa
|
|
|
134
134
|
setSort(undefined);
|
|
135
135
|
setSearch('');
|
|
136
136
|
}, className: cn('flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm', t.name === typeName
|
|
137
|
-
? 'bg-
|
|
138
|
-
: 'hover:bg-zinc-50 dark:hover:bg-zinc-800'), children: [_jsx("span", { children: t.icon ?? '◈' }), _jsx("span", { className: "flex-1 truncate", children: t.pluralDisplayName }), _jsx("span", { className: cn('font-mono text-[10px]', MUTED), children: t.tableName })] }, t.name))) }))] }), _jsxs("div", { className: "relative", children: [_jsx(Search, { size: 14, className: cn('pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2', MUTED) }), _jsx("input", { type: "text", value: search, onChange: (e) => setSearch(e.target.value), placeholder: `Search ${selectedType?.pluralDisplayName?.toLowerCase() ?? 'objects'}`, "aria-label": "Search objects", className: cn('w-72 rounded-md border bg-zinc-50 py-2 pl-8 pr-3 text-sm outline-none dark:bg-zinc-950', RULE, 'placeholder:text-zinc-400 focus:border-
|
|
137
|
+
? 'bg-sky-100 dark:bg-sky-950'
|
|
138
|
+
: 'hover:bg-zinc-50 dark:hover:bg-zinc-800'), children: [_jsx("span", { children: t.icon ?? '◈' }), _jsx("span", { className: "flex-1 truncate", children: t.pluralDisplayName }), _jsx("span", { className: cn('font-mono text-[10px]', MUTED), children: t.tableName })] }, t.name))) }))] }), _jsxs("div", { className: "relative", children: [_jsx(Search, { size: 14, className: cn('pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2', MUTED) }), _jsx("input", { type: "text", value: search, onChange: (e) => setSearch(e.target.value), placeholder: `Search ${selectedType?.pluralDisplayName?.toLowerCase() ?? 'objects'}`, "aria-label": "Search objects", className: cn('w-72 rounded-md border bg-zinc-50 py-2 pl-8 pr-3 text-sm outline-none dark:bg-zinc-950', RULE, 'placeholder:text-zinc-400 focus:border-sky-500 focus:ring-2 focus:ring-sky-500/15') })] })] })] }), _jsxs("div", { className: "min-h-0 flex-1 overflow-auto px-8 py-6", children: [_jsxs("div", { className: cn('overflow-hidden rounded-lg border transition-opacity', RULE, PANEL, isFetching && 'opacity-60'), children: [_jsx("div", { className: "overflow-x-auto", children: _jsxs("table", { className: "w-full min-w-max text-sm", children: [_jsx("thead", { children: _jsx("tr", { className: cn('border-b bg-zinc-50 dark:bg-zinc-950', RULE), children: data?.columns.map((column) => {
|
|
139
139
|
const active = sort === column.name;
|
|
140
140
|
return (_jsxs("th", { className: cn('whitespace-nowrap px-3 py-2 text-left font-normal', isNumeric(column.type) && 'text-right'), children: [_jsxs("button", { type: "button", onClick: () => toggleSort(column.name), className: cn('group inline-flex items-center gap-1', isNumeric(column.type) && 'flex-row-reverse'), children: [_jsxs("span", { className: cn('text-xs', active
|
|
141
141
|
? 'text-zinc-950 dark:text-zinc-50'
|
|
@@ -144,7 +144,7 @@ export function ObjectExplorer({ type: typeProp, pageSize = 25, backHref, backLa
|
|
|
144
144
|
}
|
|
145
145
|
function EmptyState({ type, search, onClear, }) {
|
|
146
146
|
if (search) {
|
|
147
|
-
return (_jsxs("div", { className: "px-6 py-16 text-center", children: [_jsxs("p", { className: "text-sm text-zinc-500 dark:text-zinc-400", children: ["Nothing matches \u201C", search, "\u201D."] }), _jsx("button", { type: "button", onClick: onClear, className: "mt-2 text-sm text-
|
|
147
|
+
return (_jsxs("div", { className: "px-6 py-16 text-center", children: [_jsxs("p", { className: "text-sm text-zinc-500 dark:text-zinc-400", children: ["Nothing matches \u201C", search, "\u201D."] }), _jsx("button", { type: "button", onClick: onClear, className: "mt-2 text-sm text-sky-600 underline underline-offset-2 dark:text-sky-400", children: "Clear the search" })] }));
|
|
148
148
|
}
|
|
149
149
|
return (_jsxs("div", { className: "px-6 py-16 text-center", children: [_jsxs("p", { className: "text-sm text-zinc-500 dark:text-zinc-400", children: [type?.tableName, " has no rows yet."] }), _jsx("p", { className: cn('mt-1 text-xs', MUTED), children: "The type is in the catalog, so this table will fill in as soon as something writes to it." })] }));
|
|
150
150
|
}
|
package/dist/PipelineConsole.js
CHANGED
|
@@ -139,7 +139,7 @@ function ConnectorCard({ connector, transform, connection, canEdit, running, onR
|
|
|
139
139
|
onDeleted();
|
|
140
140
|
},
|
|
141
141
|
});
|
|
142
|
-
return (_jsxs("div", { className: cn('rounded-lg border p-4', RULE, PANEL), children: [_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("span", { className: "text-sm font-medium", children: connector.name }), _jsx("span", { className: "rounded-sm bg-zinc-100 px-1.5 py-0.5 font-mono text-[10px] uppercase dark:bg-zinc-800", children: connector.kind }), _jsxs("span", { className: cn('font-mono text-[10px]', MUTED), children: ["\u2192 ", connector.targetType] }), connection && (_jsx(Tooltip, { content: `Reads through the ${connection.name} connection, which supplies the address and the credential. Moving that connection moves this connector with it.`, children: _jsxs("span", { className: cn('flex cursor-help items-center gap-1 font-mono text-[10px]', MUTED), children: [_jsx(Plug, { size: 10 }), connection.name] }) })), connector.mode === 'incremental' && (_jsx(Tooltip, { content: "Reads only what changed since the last run, and carries the rest forward.", children: _jsxs("span", { className: cn('flex cursor-help items-center gap-1 font-mono text-[10px]', MUTED), children: [_jsx(RefreshCw, { size: 10 }), "incremental"] }) })), !connector.enabled && (_jsx("span", { className: "rounded-sm bg-zinc-100 px-1.5 py-0.5 font-mono text-[10px] uppercase text-zinc-500 dark:bg-zinc-800", children: "disabled" }))] }), _jsx("div", { className: cn('mt-1 font-mono text-[11px]', MUTED), children: describeSource(connector, connection) }), connector.secretEnvVar && (_jsx(Tooltip, { content: "The catalog stores the NAME of this variable, never its value. A leaked catalog database gives away the shape of the integration, not the keys to it.", children: _jsxs("div", { className: cn('mt-1 flex w-fit cursor-help items-center gap-1 font-mono text-[10px]', MUTED), children: [_jsx(KeyRound, { size: 10 }), connector.secretEnvVar] }) }))] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [_jsxs("button", { type: "button", onClick: onRun, disabled: running || !connector.enabled, className: "flex items-center gap-1.5 rounded-md bg-zinc-950 px-3 py-1.5 text-xs text-zinc-50 disabled:opacity-40 dark:bg-zinc-100 dark:text-zinc-950", children: [running ? _jsx(Loader2, { size: 12, className: "animate-spin" }) : _jsx(Play, { size: 12 }), running ? 'Running…' : 'Run now'] }), canEdit && (_jsx(Tooltip, { content: `Delete ${connector.name}`, children: _jsx("button", { type: "button", onClick: () => setConfirming(true), "aria-label": `Delete ${connector.name}`, className: cn('rounded-sm p-1.5 hover:text-red-600', MUTED), children: _jsx(Trash2, { size: 12 }) }) }))] })] }), transform && (_jsxs("button", { type: "button", onClick: onEdit, className: cn('mt-3 flex items-center gap-1.5 text-[11px]', MUTED, 'hover:text-
|
|
142
|
+
return (_jsxs("div", { className: cn('rounded-lg border p-4', RULE, PANEL), children: [_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("span", { className: "text-sm font-medium", children: connector.name }), _jsx("span", { className: "rounded-sm bg-zinc-100 px-1.5 py-0.5 font-mono text-[10px] uppercase dark:bg-zinc-800", children: connector.kind }), _jsxs("span", { className: cn('font-mono text-[10px]', MUTED), children: ["\u2192 ", connector.targetType] }), connection && (_jsx(Tooltip, { content: `Reads through the ${connection.name} connection, which supplies the address and the credential. Moving that connection moves this connector with it.`, children: _jsxs("span", { className: cn('flex cursor-help items-center gap-1 font-mono text-[10px]', MUTED), children: [_jsx(Plug, { size: 10 }), connection.name] }) })), connector.mode === 'incremental' && (_jsx(Tooltip, { content: "Reads only what changed since the last run, and carries the rest forward.", children: _jsxs("span", { className: cn('flex cursor-help items-center gap-1 font-mono text-[10px]', MUTED), children: [_jsx(RefreshCw, { size: 10 }), "incremental"] }) })), !connector.enabled && (_jsx("span", { className: "rounded-sm bg-zinc-100 px-1.5 py-0.5 font-mono text-[10px] uppercase text-zinc-500 dark:bg-zinc-800", children: "disabled" }))] }), _jsx("div", { className: cn('mt-1 font-mono text-[11px]', MUTED), children: describeSource(connector, connection) }), connector.secretEnvVar && (_jsx(Tooltip, { content: "The catalog stores the NAME of this variable, never its value. A leaked catalog database gives away the shape of the integration, not the keys to it.", children: _jsxs("div", { className: cn('mt-1 flex w-fit cursor-help items-center gap-1 font-mono text-[10px]', MUTED), children: [_jsx(KeyRound, { size: 10 }), connector.secretEnvVar] }) }))] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [_jsxs("button", { type: "button", onClick: onRun, disabled: running || !connector.enabled, className: "flex items-center gap-1.5 rounded-md bg-zinc-950 px-3 py-1.5 text-xs text-zinc-50 disabled:opacity-40 dark:bg-zinc-100 dark:text-zinc-950", children: [running ? _jsx(Loader2, { size: 12, className: "animate-spin" }) : _jsx(Play, { size: 12 }), running ? 'Running…' : 'Run now'] }), canEdit && (_jsx(Tooltip, { content: `Delete ${connector.name}`, children: _jsx("button", { type: "button", onClick: () => setConfirming(true), "aria-label": `Delete ${connector.name}`, className: cn('rounded-sm p-1.5 hover:text-red-600', MUTED), children: _jsx(Trash2, { size: 12 }) }) }))] })] }), transform && (_jsxs("button", { type: "button", onClick: onEdit, className: cn('mt-3 flex items-center gap-1.5 text-[11px]', MUTED, 'hover:text-sky-600'), children: [_jsx(Code2, { size: 11 }), transform.name, _jsxs("span", { className: "font-mono", children: [transform.language, " \u00B7 v", transform.version] })] })), runs.length > 0 && (_jsxs("div", { className: cn('mt-3 border-t pt-3', RULE), children: [_jsx("div", { className: cn('mb-1.5 font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: "Recent runs" }), _jsx("div", { className: "space-y-1", children: runs.slice(0, 4).map((entry) => (_jsx(Tooltip, { content: entry.error ? (_jsx("span", { className: "font-mono text-[11px]", children: entry.error })) : (_jsx("span", { className: "font-mono text-[11px]", children: entry.logs.slice(-3).join('\n') || 'No logs.' })), children: _jsxs("div", { className: "flex cursor-help items-center gap-2 text-[11px]", children: [_jsxs("span", { className: "sr-only", children: [entry.status, ": "] }), entry.status === 'succeeded' ? (_jsx(CircleCheck, { size: 11, "aria-hidden": true, className: "text-emerald-600" })) : entry.status === 'failed' ? (_jsx(CircleX, { size: 11, "aria-hidden": true, className: "text-red-600" })) : (_jsx(Loader2, { size: 11, "aria-hidden": true, className: "animate-spin text-sky-600" })), _jsx("span", { className: "font-mono", children: entry.snapshotId }), _jsxs("span", { className: MUTED, children: [entry.fetched, " fetched \u00B7 ", entry.written, " written", entry.transformVersion ? ` · code v${entry.transformVersion}` : ''] }), _jsx("span", { className: cn('ml-auto font-mono text-[10px]', MUTED), children: new Date(entry.startedAt).toLocaleTimeString() })] }) }, entry.id))) })] })), _jsx(ConfirmDialog, { open: confirming, onOpenChange: setConfirming, title: `Delete ${connector.name}?`, description: "The snapshots it already wrote stay where they are \u2014 this removes the connector, its schedule and its incremental watermark. Recreating it later starts reading from the beginning again.", confirmLabel: remove.isPending ? 'Deleting…' : 'Delete', pending: remove.isPending, onConfirm: () => remove.mutate(), error: remove.error
|
|
143
143
|
? remove.error instanceof Error
|
|
144
144
|
? remove.error.message
|
|
145
145
|
: 'Could not delete it.'
|
package/dist/QueryConsole.js
CHANGED
|
@@ -82,10 +82,10 @@ export function QueryConsole({ onGenerate, maxRows = 500 }) {
|
|
|
82
82
|
// Tab still moves focus; indentation is Shift-agnostic two spaces on Enter.
|
|
83
83
|
}
|
|
84
84
|
const error = run.error instanceof Error ? run.error.message : null;
|
|
85
|
-
return (_jsx(TooltipProvider, { children: _jsxs("div", { className: "flex h-full min-h-0", children: [_jsxs("aside", { className: cn('flex w-64 shrink-0 flex-col border-r', RULE, PANEL), children: [_jsx("div", { className: cn('border-b px-3 py-2', RULE), children: _jsx("p", { className: cn('font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: "Relations" }) }), _jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto p-2", children: [grouped.length === 0 && (_jsx("p", { className: cn('px-2 py-6 text-center text-xs', MUTED), children: "Nothing has been published yet." })), grouped.map(([objectType, list]) => (_jsxs("div", { className: "mb-3", children: [_jsx("div", { className: cn('px-2 py-1 font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: objectType }), list.map((relation) => (_jsx(RelationRow, { relation: relation, onInsert: insert }, relation.name)))] }, objectType)))] }), _jsx(SavedQueryPanel, { currentSql: sql, onLoad: (query) => setSql(query.sql) })] }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [_jsxs("div", { className: cn('flex shrink-0 items-center gap-2 border-b px-4 py-2', RULE, PANEL), children: [_jsxs("button", { type: "button", onClick: () => run.mutate(), disabled: run.isPending, className: "flex items-center gap-1.5 rounded-md bg-zinc-950 px-3 py-1.5 text-xs text-zinc-50 transition-colors hover:bg-zinc-800 disabled:opacity-50 dark:bg-zinc-100 dark:text-zinc-950", children: [_jsx(Play, { size: 12 }), run.isPending ? 'Running…' : 'Run'] }), _jsx("span", { className: cn('font-mono text-[10px]', MUTED), children: "\u2318\u21B5" }), onGenerate && (_jsxs("button", { type: "button", onClick: () => setAskOpen((open) => !open), className: cn('flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs transition-colors', RULE, 'hover:bg-zinc-50 dark:hover:bg-zinc-800', askOpen && 'bg-
|
|
85
|
+
return (_jsx(TooltipProvider, { children: _jsxs("div", { className: "flex h-full min-h-0", children: [_jsxs("aside", { className: cn('flex w-64 shrink-0 flex-col border-r', RULE, PANEL), children: [_jsx("div", { className: cn('border-b px-3 py-2', RULE), children: _jsx("p", { className: cn('font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: "Relations" }) }), _jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto p-2", children: [grouped.length === 0 && (_jsx("p", { className: cn('px-2 py-6 text-center text-xs', MUTED), children: "Nothing has been published yet." })), grouped.map(([objectType, list]) => (_jsxs("div", { className: "mb-3", children: [_jsx("div", { className: cn('px-2 py-1 font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: objectType }), list.map((relation) => (_jsx(RelationRow, { relation: relation, onInsert: insert }, relation.name)))] }, objectType)))] }), _jsx(SavedQueryPanel, { currentSql: sql, onLoad: (query) => setSql(query.sql) })] }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [_jsxs("div", { className: cn('flex shrink-0 items-center gap-2 border-b px-4 py-2', RULE, PANEL), children: [_jsxs("button", { type: "button", onClick: () => run.mutate(), disabled: run.isPending, className: "flex items-center gap-1.5 rounded-md bg-zinc-950 px-3 py-1.5 text-xs text-zinc-50 transition-colors hover:bg-zinc-800 disabled:opacity-50 dark:bg-zinc-100 dark:text-zinc-950", children: [_jsx(Play, { size: 12 }), run.isPending ? 'Running…' : 'Run'] }), _jsx("span", { className: cn('font-mono text-[10px]', MUTED), children: "\u2318\u21B5" }), onGenerate && (_jsxs("button", { type: "button", onClick: () => setAskOpen((open) => !open), className: cn('flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs transition-colors', RULE, 'hover:bg-zinc-50 dark:hover:bg-zinc-800', askOpen && 'bg-sky-100 dark:bg-sky-950'), children: [_jsx(Sparkles, { size: 12 }), "Ask"] })), run.data && (_jsxs("span", { className: cn('ml-auto font-mono text-[11px]', MUTED), children: [run.data.rowCount, " rows \u00B7 ", run.data.cached ? 'cached' : `${run.data.elapsedMs} ms`, run.data.truncated && ' · capped'] }))] }), askOpen && onGenerate && (_jsxs("div", { className: cn('shrink-0 border-b bg-sky-50/60 px-4 py-3 dark:bg-sky-950/20', RULE), children: [_jsxs("form", { className: "flex gap-2", onSubmit: (e) => {
|
|
86
86
|
e.preventDefault();
|
|
87
87
|
generate.mutate();
|
|
88
|
-
}, children: [_jsx("input", { value: prompt, onChange: (e) => setPrompt(e.target.value), placeholder: "Which vehicles gained the most work orders since the last load?", "aria-label": "Describe the query", className: cn('flex-1 rounded-md border px-3 py-1.5 text-sm outline-none', RULE, PANEL, 'focus:border-
|
|
88
|
+
}, children: [_jsx("input", { value: prompt, onChange: (e) => setPrompt(e.target.value), placeholder: "Which vehicles gained the most work orders since the last load?", "aria-label": "Describe the query", className: cn('flex-1 rounded-md border px-3 py-1.5 text-sm outline-none', RULE, PANEL, 'focus:border-sky-500 focus:ring-2 focus:ring-sky-500/15') }), _jsx("button", { type: "submit", disabled: generate.isPending || prompt.trim().length === 0, className: "rounded-md bg-sky-600 px-3 py-1.5 text-xs text-white disabled:opacity-40", children: generate.isPending ? 'Writing…' : 'Write the SQL' })] }), _jsx("p", { className: cn('mt-1.5 text-[11px]', MUTED), children: "It sees the relation and column names above, never the rows. Read the SQL before running it." }), generate.error && (_jsx("p", { className: "mt-1 text-[11px] text-red-600", children: generate.error instanceof Error
|
|
89
89
|
? generate.error.message
|
|
90
90
|
: 'The assistant could not write that.' }))] })), _jsx(SqlEditor, { value: sql, onChange: setSql, onKeyDown: onEditorKeyDown, textareaRef: editorRef }), _jsxs("div", { className: "min-h-0 flex-1 overflow-auto", children: [error && (_jsxs("div", { className: "m-4 flex items-start gap-2 rounded-md border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-700 dark:border-red-900 dark:bg-red-950/40 dark:text-red-300", children: [_jsx(AlertTriangle, { size: 14, className: "mt-0.5 shrink-0" }), _jsx("span", { className: "font-mono leading-relaxed", children: error })] })), run.data && _jsx(ResultTable, { result: run.data }), !run.data && !error && (_jsx("p", { className: cn('p-8 text-center text-sm', MUTED), children: "Results appear here." }))] })] })] }) }));
|
|
91
91
|
}
|
package/dist/SavedQueryPanel.js
CHANGED
|
@@ -59,7 +59,7 @@ export function SavedQueryPanel({ currentSql, onLoad, }) {
|
|
|
59
59
|
return (_jsxs("div", { className: cn('border-t', RULE), children: [_jsxs("div", { className: "flex items-center justify-between px-3 py-2", children: [_jsx("span", { className: cn('font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: "Saved" }), _jsx("button", { type: "button", onClick: () => setSaving((open) => !open), disabled: currentSql.trim().length === 0, className: cn('rounded-sm p-1 disabled:opacity-30', MUTED, 'hover:bg-zinc-100 hover:text-zinc-900 dark:hover:bg-zinc-800'), "aria-label": "Save the current query", children: _jsx(Bookmark, { size: 12 }) })] }), saving && (_jsxs("form", { className: "space-y-1.5 px-3 pb-3", onSubmit: (e) => {
|
|
60
60
|
e.preventDefault();
|
|
61
61
|
save.mutate();
|
|
62
|
-
}, children: [_jsx("input", { value: draft.name, onChange: (e) => setDraft({ ...draft, name: e.target.value }), placeholder: "Name", "aria-label": "Query name", className: cn('w-full rounded-md border bg-white px-2 py-1 text-xs outline-none dark:bg-zinc-900', RULE, 'focus:border-
|
|
62
|
+
}, children: [_jsx("input", { value: draft.name, onChange: (e) => setDraft({ ...draft, name: e.target.value }), placeholder: "Name", "aria-label": "Query name", className: cn('w-full rounded-md border bg-white px-2 py-1 text-xs outline-none dark:bg-zinc-900', RULE, 'focus:border-sky-500') }), _jsx("input", { value: draft.folder ?? '', onChange: (e) => setDraft({ ...draft, folder: e.target.value }), placeholder: "Folder (optional)", "aria-label": "Folder", className: cn('w-full rounded-md border bg-white px-2 py-1 text-xs outline-none dark:bg-zinc-900', RULE, 'focus:border-sky-500') }), _jsxs("div", { className: "flex gap-1.5", children: [_jsx("select", { value: draft.visualization?.kind ?? 'table', onChange: (e) => setDraft({
|
|
63
63
|
...draft,
|
|
64
64
|
visualization: {
|
|
65
65
|
...(draft.visualization ?? {}),
|
|
@@ -71,7 +71,7 @@ export function SavedQueryPanel({ currentSql, onLoad, }) {
|
|
|
71
71
|
...(draft.visualization ?? { kind: 'table' }),
|
|
72
72
|
library: e.target.value === 'css' ? undefined : e.target.value,
|
|
73
73
|
},
|
|
74
|
-
}), "aria-label": "Chart library", title: "Which chart library draws this. Only libraries this app registered appear here.", className: cn('min-w-0 flex-1 rounded-md border bg-white px-1 py-1 text-[11px] outline-none dark:bg-zinc-900', RULE), children: registeredChartLibraries().map((library) => (_jsx("option", { value: library, children: library }, library))) })] }), _jsxs("label", { className: cn('flex items-center gap-1.5 text-[11px]', MUTED), children: [_jsx("input", { type: "checkbox", checked: draft.shared ?? false, onChange: (e) => setDraft({ ...draft, shared: e.target.checked }), className: "accent-
|
|
74
|
+
}), "aria-label": "Chart library", title: "Which chart library draws this. Only libraries this app registered appear here.", className: cn('min-w-0 flex-1 rounded-md border bg-white px-1 py-1 text-[11px] outline-none dark:bg-zinc-900', RULE), children: registeredChartLibraries().map((library) => (_jsx("option", { value: library, children: library }, library))) })] }), _jsxs("label", { className: cn('flex items-center gap-1.5 text-[11px]', MUTED), children: [_jsx("input", { type: "checkbox", checked: draft.shared ?? false, onChange: (e) => setDraft({ ...draft, shared: e.target.checked }), className: "accent-sky-500" }), "Let other apps embed this"] }), _jsxs("label", { className: cn('flex items-center gap-1.5 text-[11px]', MUTED), children: [_jsx(Timer, { size: 11 }), "Reuse the result for", _jsx("input", { type: "number", min: 0, value: draft.cacheTtlSeconds ?? 0, onChange: (e) => setDraft({ ...draft, cacheTtlSeconds: Number(e.target.value) }), "aria-label": "Cache seconds", className: cn('w-14 rounded-md border bg-white px-1 py-0.5 text-right text-[11px] outline-none dark:bg-zinc-900', RULE) }), "s"] }), _jsx("button", { type: "submit", disabled: save.isPending || draft.name.trim().length === 0, className: "w-full rounded-md bg-zinc-950 px-2 py-1 text-xs text-zinc-50 disabled:opacity-40 dark:bg-zinc-100 dark:text-zinc-950", children: save.isPending ? 'Saving…' : 'Save this query' }), save.error && (_jsx("p", { className: "text-[11px] text-red-600", children: save.error instanceof Error ? save.error.message : 'Could not save.' }))] })), _jsxs("div", { className: "max-h-64 overflow-y-auto px-2 pb-2", children: [saved.length === 0 && (_jsx("p", { className: cn('px-2 py-3 text-center text-[11px]', MUTED), children: "Nothing saved yet." })), grouped.map(([folder, list]) => (_jsxs("div", { className: "mb-2", children: [_jsx("div", { className: cn('px-2 py-1 font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: folder }), list.map((query) => (_jsxs("div", { className: "group flex items-center", children: [_jsx(Tooltip, { side: "right", content: query.description ??
|
|
75
75
|
(query.cacheTtlSeconds > 0
|
|
76
76
|
? `Results reused for ${query.cacheTtlSeconds}s.`
|
|
77
77
|
: 'Never cached — runs every time.'), children: _jsxs("button", { type: "button", onClick: () => onLoad(query), className: "min-w-0 flex-1 truncate rounded-md px-2 py-1 text-left text-[11px] hover:bg-zinc-50 dark:hover:bg-zinc-800", children: [query.name, query.cacheTtlSeconds > 0 && (_jsxs("span", { className: cn('ml-1 font-mono text-[9px]', MUTED), children: [query.cacheTtlSeconds, "s"] }))] }) }), _jsx(Tooltip, { content: "Download as CSV", children: _jsx("a", { href: client.exportUrl(query.id), className: cn('rounded-sm p-1 opacity-0 group-hover:opacity-100', MUTED), "aria-label": `Export ${query.name}`, children: _jsx(Download, { size: 11 }) }) }), _jsx("button", { type: "button", onClick: () => remove.mutate(query.id), className: cn('rounded-sm p-1 opacity-0 group-hover:opacity-100 hover:text-red-600', MUTED), "aria-label": `Delete ${query.name}`, children: _jsx(Trash2, { size: 11 }) })] }, query.id)))] }, folder)))] })] }));
|
package/dist/TraceExplorer.js
CHANGED
|
@@ -84,8 +84,8 @@ export const CATALOG_EVENT_META = {
|
|
|
84
84
|
},
|
|
85
85
|
'transform.changed': {
|
|
86
86
|
icon: ScrollText,
|
|
87
|
-
tone: 'text-
|
|
88
|
-
bar: 'bg-
|
|
87
|
+
tone: 'text-sky-600',
|
|
88
|
+
bar: 'bg-sky-500/70',
|
|
89
89
|
label: 'Transform changed',
|
|
90
90
|
meaning: 'Code that shapes stored data was edited. The first question about a surprising load.',
|
|
91
91
|
},
|
|
@@ -126,8 +126,8 @@ export const CATALOG_EVENT_META = {
|
|
|
126
126
|
},
|
|
127
127
|
'type.curated': {
|
|
128
128
|
icon: Pencil,
|
|
129
|
-
tone: 'text-
|
|
130
|
-
bar: 'bg-
|
|
129
|
+
tone: 'text-sky-600',
|
|
130
|
+
bar: 'bg-sky-500/70',
|
|
131
131
|
label: 'Curated',
|
|
132
132
|
meaning: 'A label, description or unit changed. No migration.',
|
|
133
133
|
},
|
package/dist/charts/css.js
CHANGED
|
@@ -23,7 +23,7 @@ export function CssBarChart({ result, visualization }) {
|
|
|
23
23
|
const max = Math.max(...rows.map((row) => Number(row[value]) || 0).filter(Number.isFinite), 0);
|
|
24
24
|
return (_jsx("div", { className: "space-y-1.5", children: rows.map((row, index) => {
|
|
25
25
|
const raw = Number(row[value]) || 0;
|
|
26
|
-
return (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "w-24 shrink-0 truncate text-[11px]", children: String(row[label] ?? '—') }), _jsx("div", { className: "h-3 flex-1 overflow-hidden rounded-sm bg-zinc-100 dark:bg-zinc-800", children: _jsx("div", { className: "h-full rounded-sm bg-
|
|
26
|
+
return (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "w-24 shrink-0 truncate text-[11px]", children: String(row[label] ?? '—') }), _jsx("div", { className: "h-3 flex-1 overflow-hidden rounded-sm bg-zinc-100 dark:bg-zinc-800", children: _jsx("div", { className: "h-full rounded-sm bg-sky-500/80", style: { width: max > 0 ? `${(raw / max) * 100}%` : '0%' } }) }), _jsx("span", { className: "w-12 shrink-0 text-right font-mono text-[11px] tabular-nums", children: raw })] }, index));
|
|
27
27
|
}) }));
|
|
28
28
|
}
|
|
29
29
|
/**
|
package/dist/ui/field.js
CHANGED
|
@@ -12,7 +12,7 @@ import { cn } from '../cn';
|
|
|
12
12
|
* checking a half-filled connector form has no way to tell which box held the
|
|
13
13
|
* prefix and which held the suffix.
|
|
14
14
|
*/
|
|
15
|
-
const CONTROL = cn('w-full rounded-md border px-2 py-1.5 text-xs outline-none', 'border-zinc-200 bg-white text-zinc-900 placeholder:text-zinc-400', 'dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-100 dark:placeholder:text-zinc-600', 'focus-visible:border-
|
|
15
|
+
const CONTROL = cn('w-full rounded-md border px-2 py-1.5 text-xs outline-none', 'border-zinc-200 bg-white text-zinc-900 placeholder:text-zinc-400', 'dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-100 dark:placeholder:text-zinc-600', 'focus-visible:border-sky-500 focus-visible:ring-2 focus-visible:ring-sky-500/15');
|
|
16
16
|
function Label({ children }) {
|
|
17
17
|
return (_jsx("span", { className: "mb-1 block font-mono text-[10px] uppercase tracking-[0.14em] text-zinc-400 dark:text-zinc-500", children: children }));
|
|
18
18
|
}
|
package/dist/ui/select.js
CHANGED
|
@@ -12,12 +12,12 @@ export function Select({ value, onValueChange, options, ariaLabel, placeholder =
|
|
|
12
12
|
onValueChange: (next) => {
|
|
13
13
|
if (typeof next === 'string')
|
|
14
14
|
onValueChange(next);
|
|
15
|
-
}, disabled: disabled, children: [_jsxs(BaseSelect.Trigger, { "aria-label": ariaLabel, className: cn('flex w-full items-center justify-between gap-2 rounded-md border px-2 py-1.5 text-left text-xs', 'border-zinc-200 bg-white text-zinc-900 outline-none', 'dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-100', 'focus-visible:border-
|
|
15
|
+
}, disabled: disabled, children: [_jsxs(BaseSelect.Trigger, { "aria-label": ariaLabel, className: cn('flex w-full items-center justify-between gap-2 rounded-md border px-2 py-1.5 text-left text-xs', 'border-zinc-200 bg-white text-zinc-900 outline-none', 'dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-100', 'focus-visible:border-sky-500 focus-visible:ring-2 focus-visible:ring-sky-500/15', 'disabled:opacity-40', className), children: [_jsx(BaseSelect.Value, { className: "truncate", children: selected ? (selected.label) : (_jsx("span", { className: "text-zinc-400 dark:text-zinc-500", children: placeholder })) }), _jsx(BaseSelect.Icon, { children: _jsx(ChevronsUpDown, { size: 12, className: "shrink-0 text-zinc-400" }) })] }), _jsx(BaseSelect.Portal, { children: _jsx(BaseSelect.Positioner, { sideOffset: 4,
|
|
16
16
|
// Overlapping the trigger so the chosen row lands under the cursor is
|
|
17
17
|
// Base UI's default and it is wrong here: these popups carry a hint
|
|
18
18
|
// line per row, so the popup is much taller than the trigger and the
|
|
19
19
|
// overlap puts it over the field somebody is reading.
|
|
20
|
-
alignItemWithTrigger: false, className: "z-50", children: _jsx(BaseSelect.Popup, { className: cn('max-h-72 min-w-[var(--anchor-width)] overflow-y-auto rounded-md border p-1 shadow-md', 'border-zinc-200 bg-white dark:border-zinc-800 dark:bg-zinc-900', 'origin-[var(--transform-origin)] transition-[opacity,transform] duration-100 ease-out', 'data-[starting-style]:scale-95 data-[starting-style]:opacity-0', 'data-[ending-style]:scale-95 data-[ending-style]:opacity-0'), children: _jsx(BaseSelect.List, { children: options.map((option) => (_jsxs(BaseSelect.Item, { value: option.value, disabled: option.disabled, className: cn('flex cursor-default items-start gap-2 rounded-sm px-2 py-1.5 text-xs outline-none', 'data-[highlighted]:bg-zinc-100 dark:data-[highlighted]:bg-zinc-800', 'data-[disabled]:opacity-40'), children: [_jsx(BaseSelect.ItemIndicator, { className: "mt-0.5 shrink-0", children: _jsx(Check, { size: 11, className: "text-
|
|
20
|
+
alignItemWithTrigger: false, className: "z-50", children: _jsx(BaseSelect.Popup, { className: cn('max-h-72 min-w-[var(--anchor-width)] overflow-y-auto rounded-md border p-1 shadow-md', 'border-zinc-200 bg-white dark:border-zinc-800 dark:bg-zinc-900', 'origin-[var(--transform-origin)] transition-[opacity,transform] duration-100 ease-out', 'data-[starting-style]:scale-95 data-[starting-style]:opacity-0', 'data-[ending-style]:scale-95 data-[ending-style]:opacity-0'), children: _jsx(BaseSelect.List, { children: options.map((option) => (_jsxs(BaseSelect.Item, { value: option.value, disabled: option.disabled, className: cn('flex cursor-default items-start gap-2 rounded-sm px-2 py-1.5 text-xs outline-none', 'data-[highlighted]:bg-zinc-100 dark:data-[highlighted]:bg-zinc-800', 'data-[disabled]:opacity-40'), children: [_jsx(BaseSelect.ItemIndicator, { className: "mt-0.5 shrink-0", children: _jsx(Check, { size: 11, className: "text-sky-600" }) }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx(BaseSelect.ItemText, { className: "block truncate", children: option.label }), option.hint && (_jsx("span", { className: "mt-0.5 block truncate font-mono text-[10px] text-zinc-400 dark:text-zinc-500", children: option.hint }))] })] }, option.value))) }) }) }) })] }));
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* A select with a label above it, which is what every form in this package
|
package/dist/ui/sheet.js
CHANGED
|
@@ -33,5 +33,5 @@ import { Tooltip } from './tooltip';
|
|
|
33
33
|
export function Sheet({ open, onOpenChange, title, description, width = 'narrow', modal = true, children, }) {
|
|
34
34
|
return (_jsx(BaseDialog.Root, { open: open, onOpenChange: onOpenChange, modal: modal, children: _jsxs(BaseDialog.Portal, { children: [modal && (_jsx(BaseDialog.Backdrop, { className: cn('fixed inset-0 z-40 bg-zinc-950/20 dark:bg-zinc-950/50', 'transition-opacity duration-150', 'data-[starting-style]:opacity-0 data-[ending-style]:opacity-0') })), _jsxs(BaseDialog.Popup, { className: cn('fixed inset-y-0 right-0 z-50 flex flex-col border-l shadow-xl outline-none', 'border-zinc-200 bg-white dark:border-zinc-800 dark:bg-zinc-900', width === 'wide'
|
|
35
35
|
? 'w-[min(64rem,calc(100vw-2rem))]'
|
|
36
|
-
: 'w-[min(24rem,calc(100vw-2rem))]', 'transition-transform duration-200 ease-out', 'data-[starting-style]:translate-x-full data-[ending-style]:translate-x-full'), children: [_jsxs("div", { className: "flex items-start gap-3 border-b border-zinc-200 px-4 py-3 dark:border-zinc-800", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx(BaseDialog.Title, { className: "truncate text-sm font-semibold tracking-tight", children: title }), description && (_jsx(BaseDialog.Description, { className: "mt-0.5 text-[11px] leading-relaxed text-zinc-500 dark:text-zinc-400", children: description }))] }), _jsx(Tooltip, { content: "Close (Esc)", children: _jsx(BaseDialog.Close, { "aria-label": "Close", className: cn('rounded-md p-1 text-zinc-400 outline-none', 'hover:bg-zinc-100 hover:text-zinc-900', 'focus-visible:ring-2 focus-visible:ring-
|
|
36
|
+
: 'w-[min(24rem,calc(100vw-2rem))]', 'transition-transform duration-200 ease-out', 'data-[starting-style]:translate-x-full data-[ending-style]:translate-x-full'), children: [_jsxs("div", { className: "flex items-start gap-3 border-b border-zinc-200 px-4 py-3 dark:border-zinc-800", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx(BaseDialog.Title, { className: "truncate text-sm font-semibold tracking-tight", children: title }), description && (_jsx(BaseDialog.Description, { className: "mt-0.5 text-[11px] leading-relaxed text-zinc-500 dark:text-zinc-400", children: description }))] }), _jsx(Tooltip, { content: "Close (Esc)", children: _jsx(BaseDialog.Close, { "aria-label": "Close", className: cn('rounded-md p-1 text-zinc-400 outline-none', 'hover:bg-zinc-100 hover:text-zinc-900', 'focus-visible:ring-2 focus-visible:ring-sky-500/30', 'dark:hover:bg-zinc-800 dark:hover:text-zinc-100'), children: _jsx(X, { size: 14 }) }) })] }), _jsx("div", { className: "min-h-0 flex-1 overflow-y-auto px-4 py-4", children: children })] })] }) }));
|
|
37
37
|
}
|
package/dist/ui/switch.js
CHANGED
|
@@ -10,5 +10,5 @@ import { cn } from '../cn';
|
|
|
10
10
|
* checkbox reads as "include this in what I am about to submit".
|
|
11
11
|
*/
|
|
12
12
|
export function Switch({ checked, onCheckedChange, label, hint, disabled, }) {
|
|
13
|
-
return (_jsxs("label", { className: "flex items-start gap-2.5", children: [_jsx(BaseSwitch.Root, { checked: checked, onCheckedChange: onCheckedChange, disabled: disabled, className: cn('relative mt-0.5 h-4 w-7 shrink-0 rounded-full border transition-colors outline-none', 'border-zinc-300 bg-zinc-200 dark:border-zinc-700 dark:bg-zinc-800', 'data-[checked]:border-
|
|
13
|
+
return (_jsxs("label", { className: "flex items-start gap-2.5", children: [_jsx(BaseSwitch.Root, { checked: checked, onCheckedChange: onCheckedChange, disabled: disabled, className: cn('relative mt-0.5 h-4 w-7 shrink-0 rounded-full border transition-colors outline-none', 'border-zinc-300 bg-zinc-200 dark:border-zinc-700 dark:bg-zinc-800', 'data-[checked]:border-sky-600 data-[checked]:bg-sky-600', 'focus-visible:ring-2 focus-visible:ring-sky-500/30', 'disabled:opacity-40'), children: _jsx(BaseSwitch.Thumb, { className: cn('block h-3 w-3 translate-x-0.5 rounded-full bg-white shadow-sm transition-transform', 'data-[checked]:translate-x-[14px]') }) }), _jsxs("span", { className: "min-w-0", children: [_jsx("span", { className: "block text-[11px] text-zinc-600 dark:text-zinc-300", children: label }), hint && _jsx("span", { className: "block text-[11px] text-zinc-400 dark:text-zinc-500", children: hint })] })] }));
|
|
14
14
|
}
|
package/dist/ui/tabs.js
CHANGED
|
@@ -25,7 +25,7 @@ export function TabsList({ children, className, }) {
|
|
|
25
25
|
return (_jsx(BaseTabs.List, { className: cn('flex gap-1 border-b border-zinc-200 dark:border-zinc-800', className), children: children }));
|
|
26
26
|
}
|
|
27
27
|
export function TabsTab({ value, children, }) {
|
|
28
|
-
return (_jsx(BaseTabs.Tab, { value: value, className: cn('flex items-center gap-1.5 border-b-2 px-3 py-2 text-sm transition-colors outline-none', 'border-transparent text-zinc-500', 'hover:text-zinc-950 dark:hover:text-zinc-50', 'focus-visible:ring-2 focus-visible:ring-
|
|
28
|
+
return (_jsx(BaseTabs.Tab, { value: value, className: cn('flex items-center gap-1.5 border-b-2 px-3 py-2 text-sm transition-colors outline-none', 'border-transparent text-zinc-500', 'hover:text-zinc-950 dark:hover:text-zinc-50', 'focus-visible:ring-2 focus-visible:ring-sky-500/30', 'data-[selected]:border-sky-600 data-[selected]:text-zinc-950', 'dark:data-[selected]:text-zinc-50'), children: children }));
|
|
29
29
|
}
|
|
30
30
|
export function TabsPanel({ value, children, className, }) {
|
|
31
31
|
// Not `keepMounted`: a panel holding a half-typed connector form should keep
|
package/dist/workflow/nodes.js
CHANGED
|
@@ -26,8 +26,8 @@ const KIND_STYLE = {
|
|
|
26
26
|
noun: 'source',
|
|
27
27
|
},
|
|
28
28
|
transform: {
|
|
29
|
-
accent: 'bg-
|
|
30
|
-
chip: 'text-
|
|
29
|
+
accent: 'bg-sky-500',
|
|
30
|
+
chip: 'text-sky-700 dark:text-sky-300',
|
|
31
31
|
icon: Repeat,
|
|
32
32
|
noun: 'transform',
|
|
33
33
|
},
|
|
@@ -73,7 +73,7 @@ export function WorkflowNodeBody({ id, data, selected }) {
|
|
|
73
73
|
const Icon = style.icon;
|
|
74
74
|
const errors = data.problems.filter((problem) => problem.level === 'error');
|
|
75
75
|
const warnings = data.problems.filter((problem) => problem.level === 'warning');
|
|
76
|
-
return (_jsxs("div", { className: cn('relative w-56 overflow-hidden rounded-lg border shadow-sm transition-shadow', RULE, PANEL, selected && 'ring-2 ring-
|
|
76
|
+
return (_jsxs("div", { className: cn('relative w-56 overflow-hidden rounded-lg border shadow-sm transition-shadow', RULE, PANEL, selected && 'ring-2 ring-sky-500/40', errors.length > 0 && 'border-red-400 dark:border-red-800', errors.length === 0 && warnings.length > 0 && 'border-amber-300 dark:border-amber-800'), children: [_jsx("span", { className: cn('absolute inset-y-0 left-0 w-1', style.accent) }), data.kind !== 'source' && (_jsx(Handle, { type: "target", position: Position.Left, className: HANDLE, "aria-label": `input of ${data.label}` })), data.kind !== 'sink' && (_jsx(Handle, { type: "source", position: Position.Right, className: HANDLE, "aria-label": `output of ${data.label}` })), _jsxs("div", { className: "pl-3 pr-2 py-2", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(Icon, { size: 12, className: style.chip }), _jsx("span", { className: cn('font-mono text-[9px] uppercase tracking-[0.16em]', style.chip), children: style.noun }), _jsxs("span", { className: "ml-auto flex items-center gap-1", children: [data.run && _jsx(RunBadge, { run: data.run }), errors.length > 0 && (_jsx(Tooltip, { content: errors.map((p) => p.message).join(' '), children: _jsx("span", { className: "flex items-center", children: _jsx(CircleAlert, { size: 11, className: "text-red-500" }) }) })), errors.length === 0 && warnings.length > 0 && (_jsx(Tooltip, { content: warnings.map((p) => p.message).join(' '), children: _jsx("span", { className: "flex items-center", children: _jsx(TriangleAlert, { size: 11, className: "text-amber-500" }) }) }))] })] }), _jsxs("button", { type: "button", onClick: () => onInspect(id), className: "nodrag mt-1 block w-full text-left", children: [_jsx("span", { className: "block truncate text-[13px] font-medium", children: data.label }), _jsx("span", { className: cn('block truncate font-mono text-[10px]', MUTED), children: data.subtitle })] }), data.kind === 'transform' && canEdit && (_jsx("div", { className: "mt-1.5 flex", children: _jsx(Tooltip, { content: "Open this transform's code. The canvas stays where it is.", children: _jsxs("button", { type: "button", onClick: () => onEditCode(id), "aria-label": `Edit the code behind ${data.label}`, className: cn('nodrag flex items-center gap-1 rounded border px-1.5 py-0.5 font-mono text-[9px]', RULE, MUTED, 'hover:bg-zinc-50 dark:hover:bg-zinc-800'), children: [_jsx(Code2, { size: 9 }), "code"] }) }) }))] })] }));
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* Declared once, at module scope.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dudousxd/nestjs-catalog-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Ready-made React screens for @dudousxd/nestjs-catalog — a model manager and a generic object explorer you can drop into your own app shell.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Davide Carvalho",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"recharts": "2.15.4",
|
|
95
95
|
"tailwind-merge": "3.4.1",
|
|
96
96
|
"typescript": "5.9.3",
|
|
97
|
-
"@dudousxd/nestjs-catalog": "0.3.
|
|
97
|
+
"@dudousxd/nestjs-catalog": "0.3.1"
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
100
|
"clsx": "2.1.1",
|