@schemavaults/ui 0.80.0 → 0.81.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.
@@ -210,5 +210,7 @@ export * from "./http-method-badge";
210
210
  export type * from "./http-method-badge";
211
211
  export * from "./browser-frame";
212
212
  export type * from "./browser-frame";
213
+ export * from "./terminal-frame";
214
+ export type * from "./terminal-frame";
213
215
  export * from "./inline-edit";
214
216
  export type * from "./inline-edit";
@@ -104,5 +104,6 @@ export * from "./time-picker";
104
104
  export * from "./mark";
105
105
  export * from "./http-method-badge";
106
106
  export * from "./browser-frame";
107
+ export * from "./terminal-frame";
107
108
  export * from "./inline-edit";
108
109
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAGzB,cAAc,uBAAuB,CAAC;AAGtC,cAAc,aAAa,CAAC;AAG5B,cAAc,eAAe,CAAC;AAG9B,cAAc,SAAS,CAAC;AAGxB,cAAc,WAAW,CAAC;AAG1B,cAAc,cAAc,CAAC;AAG7B,cAAc,SAAS,CAAC;AAGxB,cAAc,mBAAmB,CAAC;AAGlC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,UAAU,CAAC;AAGzB,cAAc,SAAS,CAAC;AAGxB,cAAc,kBAAkB,CAAC;AAGjC,cAAc,aAAa,CAAC;AAG5B,cAAc,kCAAkC,CAAC;AAGjD,cAAc,cAAc,CAAC;AAG7B,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAExB,cAAc,WAAW,CAAC;AAG1B,cAAc,YAAY,CAAC;AAG3B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,QAAQ,CAAC;AAGvB,cAAc,QAAQ,CAAC;AAGvB,cAAc,aAAa,CAAC;AAG5B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,WAAW,CAAC;AAG1B,cAAc,mBAAmB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iBAAiB,CAAC;AAGhC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./terminal-frame";
2
+ export type * from "./terminal-frame";
@@ -0,0 +1,2 @@
1
+ export * from "./terminal-frame";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/terminal-frame/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,110 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import type { HTMLAttributes, ReactElement, ReactNode, Ref } from "react";
3
+ export declare const terminalFrameVariantIds: ["macos", "windows", "minimal"];
4
+ export type TerminalFrameVariantId = (typeof terminalFrameVariantIds)[number];
5
+ export declare const terminalFrameSizeIds: ["sm", "md", "lg"];
6
+ export type TerminalFrameSizeId = (typeof terminalFrameSizeIds)[number];
7
+ export declare const terminalFrameThemeIds: ["default", "dark", "matrix", "amber"];
8
+ export type TerminalFrameThemeId = (typeof terminalFrameThemeIds)[number];
9
+ declare const terminalFrameVariants: (props?: ({
10
+ variant?: "minimal" | "macos" | "windows" | null | undefined;
11
+ size?: "sm" | "lg" | "md" | null | undefined;
12
+ theme?: "default" | "dark" | "matrix" | "amber" | null | undefined;
13
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
14
+ export interface TerminalFrameProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof terminalFrameVariants> {
15
+ ref?: Ref<HTMLDivElement>;
16
+ }
17
+ declare function TerminalFrame({ className, variant, size, theme, ref, ...props }: TerminalFrameProps): ReactElement;
18
+ declare namespace TerminalFrame {
19
+ var displayName: string;
20
+ }
21
+ declare const terminalFrameHeaderVariants: (props?: ({
22
+ variant?: "minimal" | "macos" | "windows" | null | undefined;
23
+ size?: "sm" | "lg" | "md" | null | undefined;
24
+ theme?: "default" | "dark" | "matrix" | "amber" | null | undefined;
25
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
26
+ export interface TerminalFrameHeaderProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof terminalFrameHeaderVariants> {
27
+ ref?: Ref<HTMLDivElement>;
28
+ }
29
+ declare function TerminalFrameHeader({ className, variant, size, theme, ref, ...props }: TerminalFrameHeaderProps): ReactElement;
30
+ declare namespace TerminalFrameHeader {
31
+ var displayName: string;
32
+ }
33
+ export interface TerminalFrameControlsProps extends HTMLAttributes<HTMLDivElement> {
34
+ variant?: TerminalFrameVariantId;
35
+ /**
36
+ * Disable the visual difference between hover/idle dots. When true,
37
+ * the controls render as non-interactive decorations only.
38
+ */
39
+ decorative?: boolean;
40
+ ref?: Ref<HTMLDivElement>;
41
+ }
42
+ declare function TerminalFrameControls({ className, variant, decorative, ref, ...props }: TerminalFrameControlsProps): ReactElement;
43
+ declare namespace TerminalFrameControls {
44
+ var displayName: string;
45
+ }
46
+ export interface TerminalFrameTitleProps extends HTMLAttributes<HTMLDivElement> {
47
+ /**
48
+ * Optional icon rendered before the title text (e.g. a shell glyph).
49
+ */
50
+ leadingIcon?: ReactNode;
51
+ ref?: Ref<HTMLDivElement>;
52
+ }
53
+ declare function TerminalFrameTitle({ className, leadingIcon, children, ref, ...props }: TerminalFrameTitleProps): ReactElement;
54
+ declare namespace TerminalFrameTitle {
55
+ var displayName: string;
56
+ }
57
+ declare const terminalFrameBodyVariants: (props?: ({
58
+ size?: "sm" | "lg" | "md" | null | undefined;
59
+ theme?: "default" | "dark" | "matrix" | "amber" | null | undefined;
60
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
61
+ export interface TerminalFrameBodyProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof terminalFrameBodyVariants> {
62
+ ref?: Ref<HTMLDivElement>;
63
+ }
64
+ declare function TerminalFrameBody({ className, size, theme, ref, ...props }: TerminalFrameBodyProps): ReactElement;
65
+ declare namespace TerminalFrameBody {
66
+ var displayName: string;
67
+ }
68
+ export interface TerminalFramePromptProps extends HTMLAttributes<HTMLDivElement> {
69
+ /**
70
+ * The prompt symbol or full prompt string rendered before the command.
71
+ * Defaults to `$`. Common alternatives: `#`, `>`, `➜`, `user@host:~$`.
72
+ */
73
+ prompt?: ReactNode;
74
+ /**
75
+ * Color/style variant for the prompt symbol.
76
+ */
77
+ promptTone?: "muted" | "primary" | "success" | "warning" | "danger" | "info";
78
+ /**
79
+ * When true, appends a blinking cursor after the command text.
80
+ */
81
+ cursor?: boolean;
82
+ ref?: Ref<HTMLDivElement>;
83
+ }
84
+ declare function TerminalFramePrompt({ className, prompt, promptTone, cursor, children, ref, ...props }: TerminalFramePromptProps): ReactElement;
85
+ declare namespace TerminalFramePrompt {
86
+ var displayName: string;
87
+ }
88
+ export interface TerminalFrameOutputProps extends HTMLAttributes<HTMLDivElement> {
89
+ /**
90
+ * Color/style variant for the output line. `default` inherits body color.
91
+ */
92
+ tone?: "default" | "muted" | "success" | "warning" | "danger" | "info";
93
+ ref?: Ref<HTMLDivElement>;
94
+ }
95
+ declare function TerminalFrameOutput({ className, tone, ref, ...props }: TerminalFrameOutputProps): ReactElement;
96
+ declare namespace TerminalFrameOutput {
97
+ var displayName: string;
98
+ }
99
+ export interface TerminalFrameCursorProps extends HTMLAttributes<HTMLSpanElement> {
100
+ /**
101
+ * When false, the cursor is rendered but does not blink.
102
+ */
103
+ blink?: boolean;
104
+ ref?: Ref<HTMLSpanElement>;
105
+ }
106
+ declare function TerminalFrameCursor({ className, blink, ref, ...props }: TerminalFrameCursorProps): ReactElement;
107
+ declare namespace TerminalFrameCursor {
108
+ var displayName: string;
109
+ }
110
+ export { TerminalFrame, TerminalFrameHeader, TerminalFrameControls, TerminalFrameTitle, TerminalFrameBody, TerminalFramePrompt, TerminalFrameOutput, TerminalFrameCursor, terminalFrameVariants, terminalFrameHeaderVariants, terminalFrameBodyVariants, };
@@ -0,0 +1,159 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { cva } from "class-variance-authority";
4
+ import { cn } from "../../../lib/utils";
5
+ export const terminalFrameVariantIds = [
6
+ "macos",
7
+ "windows",
8
+ "minimal",
9
+ ];
10
+ export const terminalFrameSizeIds = [
11
+ "sm",
12
+ "md",
13
+ "lg",
14
+ ];
15
+ export const terminalFrameThemeIds = [
16
+ "default",
17
+ "dark",
18
+ "matrix",
19
+ "amber",
20
+ ];
21
+ const terminalFrameVariants = cva("flex w-full flex-col overflow-hidden border shadow-lg font-mono", {
22
+ variants: {
23
+ variant: {
24
+ macos: "rounded-xl border-border",
25
+ windows: "rounded-md border-border",
26
+ minimal: "rounded-lg border-border",
27
+ },
28
+ size: {
29
+ sm: "text-xs",
30
+ md: "text-sm",
31
+ lg: "text-base",
32
+ },
33
+ theme: {
34
+ default: "bg-card text-card-foreground",
35
+ dark: "border-zinc-800 bg-zinc-950 text-zinc-100",
36
+ matrix: "border-emerald-900 bg-black text-emerald-400",
37
+ amber: "border-amber-900/60 bg-[#1a0f00] text-amber-300",
38
+ },
39
+ },
40
+ defaultVariants: {
41
+ variant: "macos",
42
+ size: "md",
43
+ theme: "default",
44
+ },
45
+ });
46
+ function TerminalFrame({ className, variant, size, theme, ref, ...props }) {
47
+ return (_jsx("div", { ref: ref, "data-slot": "terminal-frame", "data-variant": variant ?? "macos", "data-size": size ?? "md", "data-theme": theme ?? "default", className: cn(terminalFrameVariants({ variant, size, theme }), className), ...props }));
48
+ }
49
+ TerminalFrame.displayName = "TerminalFrame";
50
+ const terminalFrameHeaderVariants = cva("flex items-center gap-3 border-b backdrop-blur-sm", {
51
+ variants: {
52
+ variant: {
53
+ macos: "px-3 py-2.5",
54
+ windows: "px-2 py-1.5",
55
+ minimal: "px-3 py-2",
56
+ },
57
+ size: {
58
+ sm: "min-h-8",
59
+ md: "min-h-10",
60
+ lg: "min-h-12",
61
+ },
62
+ theme: {
63
+ default: "border-border bg-muted/60 text-muted-foreground",
64
+ dark: "border-zinc-800 bg-zinc-900/70 text-zinc-400",
65
+ matrix: "border-emerald-900 bg-emerald-950/50 text-emerald-500/80",
66
+ amber: "border-amber-900/60 bg-[#241300] text-amber-400/80",
67
+ },
68
+ },
69
+ defaultVariants: {
70
+ variant: "macos",
71
+ size: "md",
72
+ theme: "default",
73
+ },
74
+ });
75
+ function TerminalFrameHeader({ className, variant, size, theme, ref, ...props }) {
76
+ return (_jsx("div", { ref: ref, "data-slot": "terminal-frame-header", className: cn(terminalFrameHeaderVariants({ variant, size, theme }), className), ...props }));
77
+ }
78
+ TerminalFrameHeader.displayName = "TerminalFrameHeader";
79
+ const macosControlColors = [
80
+ {
81
+ label: "Close",
82
+ className: "bg-[#ff5f57] border-[#e0443e]",
83
+ },
84
+ {
85
+ label: "Minimize",
86
+ className: "bg-[#febc2e] border-[#dea123]",
87
+ },
88
+ {
89
+ label: "Maximize",
90
+ className: "bg-[#28c840] border-[#1aab29]",
91
+ },
92
+ ];
93
+ function TerminalFrameControls({ className, variant = "macos", decorative = true, ref, ...props }) {
94
+ if (variant === "minimal") {
95
+ return (_jsx("div", { ref: ref, "data-slot": "terminal-frame-controls", className: cn("flex items-center", className), "aria-hidden": decorative ? "true" : undefined, ...props }));
96
+ }
97
+ if (variant === "windows") {
98
+ return (_jsxs("div", { ref: ref, "data-slot": "terminal-frame-controls", "data-variant": "windows", className: cn("ml-auto flex items-center gap-0", className), "aria-hidden": decorative ? "true" : undefined, ...props, children: [_jsx("span", { className: "flex h-6 w-9 items-center justify-center hover:bg-white/10", children: _jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M0 5h10", stroke: "currentColor", strokeWidth: "1" }) }) }), _jsx("span", { className: "flex h-6 w-9 items-center justify-center hover:bg-white/10", children: _jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true", children: _jsx("rect", { x: "0.5", y: "0.5", width: "9", height: "9", stroke: "currentColor", strokeWidth: "1", fill: "none" }) }) }), _jsx("span", { className: "flex h-6 w-9 items-center justify-center hover:bg-destructive hover:text-white", children: _jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M0 0L10 10M10 0L0 10", stroke: "currentColor", strokeWidth: "1" }) }) })] }));
99
+ }
100
+ return (_jsx("div", { ref: ref, "data-slot": "terminal-frame-controls", "data-variant": "macos", className: cn("flex items-center gap-1.5", className), "aria-hidden": decorative ? "true" : undefined, ...props, children: macosControlColors.map((control) => (_jsx("span", { "aria-label": decorative ? undefined : control.label, className: cn("block size-3 rounded-full border", control.className) }, control.label))) }));
101
+ }
102
+ TerminalFrameControls.displayName = "TerminalFrameControls";
103
+ function TerminalFrameTitle({ className, leadingIcon, children, ref, ...props }) {
104
+ return (_jsxs("div", { ref: ref, "data-slot": "terminal-frame-title", className: cn("flex min-w-0 flex-1 items-center justify-center gap-2 truncate text-center", className), ...props, children: [leadingIcon ? (_jsx("span", { className: "flex shrink-0 items-center", children: leadingIcon })) : null, _jsx("span", { className: "truncate", children: children })] }));
105
+ }
106
+ TerminalFrameTitle.displayName = "TerminalFrameTitle";
107
+ const terminalFrameBodyVariants = cva("relative flex-1 overflow-auto whitespace-pre-wrap break-words leading-relaxed", {
108
+ variants: {
109
+ size: {
110
+ sm: "gap-1 px-3 py-2",
111
+ md: "gap-1.5 px-4 py-3",
112
+ lg: "gap-2 px-5 py-4",
113
+ },
114
+ theme: {
115
+ default: "bg-background text-foreground",
116
+ dark: "bg-zinc-950 text-zinc-100",
117
+ matrix: "bg-black text-emerald-400",
118
+ amber: "bg-[#1a0f00] text-amber-300",
119
+ },
120
+ },
121
+ defaultVariants: {
122
+ size: "md",
123
+ theme: "default",
124
+ },
125
+ });
126
+ function TerminalFrameBody({ className, size, theme, ref, ...props }) {
127
+ return (_jsx("div", { ref: ref, "data-slot": "terminal-frame-body", className: cn("flex flex-col", terminalFrameBodyVariants({ size, theme }), className), ...props }));
128
+ }
129
+ TerminalFrameBody.displayName = "TerminalFrameBody";
130
+ const promptToneClasses = {
131
+ muted: "text-muted-foreground opacity-70",
132
+ primary: "text-primary",
133
+ success: "text-emerald-500 dark:text-emerald-400",
134
+ warning: "text-amber-500 dark:text-amber-400",
135
+ danger: "text-red-500 dark:text-red-400",
136
+ info: "text-sky-500 dark:text-sky-400",
137
+ };
138
+ function TerminalFramePrompt({ className, prompt = "$", promptTone = "success", cursor = false, children, ref, ...props }) {
139
+ return (_jsxs("div", { ref: ref, "data-slot": "terminal-frame-prompt", className: cn("flex items-baseline gap-2", className), ...props, children: [_jsx("span", { "aria-hidden": "true", className: cn("shrink-0 select-none", promptToneClasses[promptTone]), children: prompt }), _jsxs("span", { className: "min-w-0 flex-1 whitespace-pre-wrap break-words", children: [children, cursor ? _jsx(TerminalFrameCursor, { className: "ml-1 align-middle" }) : null] })] }));
140
+ }
141
+ TerminalFramePrompt.displayName = "TerminalFramePrompt";
142
+ const outputToneClasses = {
143
+ default: "",
144
+ muted: "opacity-60",
145
+ success: "text-emerald-500 dark:text-emerald-400",
146
+ warning: "text-amber-500 dark:text-amber-400",
147
+ danger: "text-red-500 dark:text-red-400",
148
+ info: "text-sky-500 dark:text-sky-400",
149
+ };
150
+ function TerminalFrameOutput({ className, tone = "default", ref, ...props }) {
151
+ return (_jsx("div", { ref: ref, "data-slot": "terminal-frame-output", className: cn("whitespace-pre-wrap break-words", outputToneClasses[tone], className), ...props }));
152
+ }
153
+ TerminalFrameOutput.displayName = "TerminalFrameOutput";
154
+ function TerminalFrameCursor({ className, blink = true, ref, ...props }) {
155
+ return (_jsx("span", { ref: ref, "data-slot": "terminal-frame-cursor", "aria-hidden": "true", className: cn("inline-block h-[1em] w-[0.5em] translate-y-[0.15em] bg-current align-baseline", blink && "animate-pulse", className), ...props }));
156
+ }
157
+ TerminalFrameCursor.displayName = "TerminalFrameCursor";
158
+ export { TerminalFrame, TerminalFrameHeader, TerminalFrameControls, TerminalFrameTitle, TerminalFrameBody, TerminalFramePrompt, TerminalFrameOutput, TerminalFrameCursor, terminalFrameVariants, terminalFrameHeaderVariants, terminalFrameBodyVariants, };
159
+ //# sourceMappingURL=terminal-frame.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terminal-frame.js","sourceRoot":"","sources":["../../../../src/components/ui/terminal-frame/terminal-frame.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAQlE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,OAAO;IACP,SAAS;IACT,SAAS;CACkB,CAAC;AAI9B,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI;IACJ,IAAI;IACJ,IAAI;CACuB,CAAC;AAI9B,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,SAAS;IACT,MAAM;IACN,QAAQ;IACR,OAAO;CACoB,CAAC;AAI9B,MAAM,qBAAqB,GAAG,GAAG,CAC/B,iEAAiE,EACjE;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,KAAK,EAAE,0BAA0B;YACjC,OAAO,EAAE,0BAA0B;YACnC,OAAO,EAAE,0BAA0B;SACa;QAClD,IAAI,EAAE;YACJ,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,WAAW;SAC8B;QAC/C,KAAK,EAAE;YACL,OAAO,EAAE,8BAA8B;YACvC,IAAI,EAAE,2CAA2C;YACjD,MAAM,EAAE,8CAA8C;YACtD,KAAK,EAAE,iDAAiD;SACV;KACjD;IACD,eAAe,EAAE;QACf,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,SAAS;KACjB;CACF,CACF,CAAC;AAQF,SAAS,aAAa,CAAC,EACrB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACW;IACnB,OAAO,CACL,cACE,GAAG,EAAE,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AqB,CAAC;AAExD,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,GAC1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schemavaults/ui",
3
- "version": "0.80.0",
3
+ "version": "0.81.0",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "description": "React.js UI components for SchemaVaults frontend applications",