@surreal-ui/react 0.8.1 → 0.9.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/LICENSE +21 -0
- package/dist/index.js +955 -7227
- package/dist/utils.d.ts +9 -0
- package/dist/utils.js +14 -0
- package/package.json +21 -4
- package/CHANGELOG.md +0 -149
- package/src/components/GlassmorphismAlert.tsx +0 -43
- package/src/components/GlassmorphismButton.tsx +0 -20
- package/src/components/GlassmorphismCard.tsx +0 -43
- package/src/components/GlassmorphismEmptyState.tsx +0 -20
- package/src/components/GlassmorphismInputGroup.tsx +0 -148
- package/src/components/GlassmorphismMenubar.tsx +0 -96
- package/src/components/GlassmorphismScrollArea.tsx +0 -67
- package/src/components/GlassmorphismTable.tsx +0 -61
- package/src/components/GlassmorphismTypography.tsx +0 -31
- package/src/components/MinimalistAccordion.tsx +0 -215
- package/src/components/MinimalistAlert.tsx +0 -43
- package/src/components/MinimalistAlertDialog.tsx +0 -318
- package/src/components/MinimalistAspectRatio.tsx +0 -30
- package/src/components/MinimalistAvatar.tsx +0 -149
- package/src/components/MinimalistBadge.tsx +0 -49
- package/src/components/MinimalistBreadcrumb.tsx +0 -109
- package/src/components/MinimalistButton.tsx +0 -86
- package/src/components/MinimalistButtonGroup.tsx +0 -86
- package/src/components/MinimalistCalendar.tsx +0 -355
- package/src/components/MinimalistCard.tsx +0 -89
- package/src/components/MinimalistCarousel.tsx +0 -266
- package/src/components/MinimalistChart.tsx +0 -296
- package/src/components/MinimalistCheckbox.tsx +0 -117
- package/src/components/MinimalistCodeBlock.tsx +0 -203
- package/src/components/MinimalistCollapsible.tsx +0 -134
- package/src/components/MinimalistCommand.tsx +0 -344
- package/src/components/MinimalistContextMenu.tsx +0 -408
- package/src/components/MinimalistDialog.tsx +0 -273
- package/src/components/MinimalistDrawer.tsx +0 -220
- package/src/components/MinimalistDropdownMenu.tsx +0 -431
- package/src/components/MinimalistEmpty.tsx +0 -105
- package/src/components/MinimalistEmptyState.tsx +0 -34
- package/src/components/MinimalistField.tsx +0 -275
- package/src/components/MinimalistForm.tsx +0 -205
- package/src/components/MinimalistHoverCard.tsx +0 -48
- package/src/components/MinimalistInput.tsx +0 -24
- package/src/components/MinimalistInputGroup.tsx +0 -180
- package/src/components/MinimalistInputOtp.tsx +0 -189
- package/src/components/MinimalistItem.tsx +0 -182
- package/src/components/MinimalistKbd.tsx +0 -46
- package/src/components/MinimalistLabel.tsx +0 -19
- package/src/components/MinimalistMenubar.tsx +0 -491
- package/src/components/MinimalistNativeSelect.tsx +0 -77
- package/src/components/MinimalistNavigationMenu.tsx +0 -198
- package/src/components/MinimalistPagination.tsx +0 -152
- package/src/components/MinimalistPopover.tsx +0 -229
- package/src/components/MinimalistProgress.tsx +0 -39
- package/src/components/MinimalistRadioGroup.tsx +0 -115
- package/src/components/MinimalistRangeCalendar.tsx +0 -396
- package/src/components/MinimalistResizable.tsx +0 -54
- package/src/components/MinimalistScrollArea.tsx +0 -41
- package/src/components/MinimalistSelect.tsx +0 -262
- package/src/components/MinimalistSeparator.tsx +0 -45
- package/src/components/MinimalistSheet.tsx +0 -247
- package/src/components/MinimalistSidebar.tsx +0 -638
- package/src/components/MinimalistSkeleton.tsx +0 -16
- package/src/components/MinimalistSlider.tsx +0 -213
- package/src/components/MinimalistSonner.tsx +0 -41
- package/src/components/MinimalistSpinner.tsx +0 -39
- package/src/components/MinimalistSwitch.tsx +0 -92
- package/src/components/MinimalistTable.tsx +0 -65
- package/src/components/MinimalistTabs.tsx +0 -171
- package/src/components/MinimalistTextarea.tsx +0 -24
- package/src/components/MinimalistToggle.tsx +0 -74
- package/src/components/MinimalistToggleGroup.tsx +0 -197
- package/src/components/MinimalistTooltip.tsx +0 -172
- package/src/components/MinimalistTypography.tsx +0 -33
- package/src/components/NeubrutalismCard.tsx +0 -84
- package/src/components/NeubrutalismItem.tsx +0 -48
- package/src/components/ShadcnAccordion.tsx +0 -215
- package/src/components/ShadcnAlertDialog.tsx +0 -318
- package/src/components/ShadcnAspectRatio.tsx +0 -30
- package/src/components/ShadcnAvatar.tsx +0 -149
- package/src/components/ShadcnBadge.tsx +0 -49
- package/src/components/ShadcnBreadcrumb.tsx +0 -109
- package/src/components/ShadcnButton.tsx +0 -86
- package/src/components/ShadcnButtonGroup.tsx +0 -86
- package/src/components/ShadcnCalendar.tsx +0 -355
- package/src/components/ShadcnCarousel.tsx +0 -266
- package/src/components/ShadcnChart.tsx +0 -296
- package/src/components/ShadcnCheckbox.tsx +0 -117
- package/src/components/ShadcnCodeBlock.tsx +0 -203
- package/src/components/ShadcnCollapsible.tsx +0 -134
- package/src/components/ShadcnCommand.tsx +0 -344
- package/src/components/ShadcnContextMenu.tsx +0 -408
- package/src/components/ShadcnDialog.tsx +0 -273
- package/src/components/ShadcnDrawer.tsx +0 -220
- package/src/components/ShadcnDropdownMenu.tsx +0 -431
- package/src/components/ShadcnEmpty.tsx +0 -105
- package/src/components/ShadcnField.tsx +0 -275
- package/src/components/ShadcnForm.tsx +0 -205
- package/src/components/ShadcnHoverCard.tsx +0 -48
- package/src/components/ShadcnInput.tsx +0 -24
- package/src/components/ShadcnInputGroup.tsx +0 -180
- package/src/components/ShadcnInputOtp.tsx +0 -189
- package/src/components/ShadcnItem.tsx +0 -182
- package/src/components/ShadcnKbd.tsx +0 -46
- package/src/components/ShadcnLabel.tsx +0 -19
- package/src/components/ShadcnMenubar.tsx +0 -491
- package/src/components/ShadcnNativeSelect.tsx +0 -77
- package/src/components/ShadcnNavigationMenu.tsx +0 -198
- package/src/components/ShadcnPagination.tsx +0 -152
- package/src/components/ShadcnPopover.tsx +0 -229
- package/src/components/ShadcnProgress.tsx +0 -39
- package/src/components/ShadcnRadioGroup.tsx +0 -115
- package/src/components/ShadcnRangeCalendar.tsx +0 -396
- package/src/components/ShadcnSelect.tsx +0 -262
- package/src/components/ShadcnSeparator.tsx +0 -45
- package/src/components/ShadcnSheet.tsx +0 -247
- package/src/components/ShadcnSidebar.tsx +0 -638
- package/src/components/ShadcnSkeleton.tsx +0 -16
- package/src/components/ShadcnSlider.tsx +0 -213
- package/src/components/ShadcnSonner.tsx +0 -41
- package/src/components/ShadcnSpinner.tsx +0 -39
- package/src/components/ShadcnSwitch.tsx +0 -92
- package/src/components/ShadcnTabs.tsx +0 -171
- package/src/components/ShadcnTextarea.tsx +0 -24
- package/src/components/ShadcnToggle.tsx +0 -74
- package/src/components/ShadcnToggleGroup.tsx +0 -197
- package/src/components/ShadcnTooltip.tsx +0 -172
- package/src/index.ts +0 -124
- package/tsconfig.json +0 -10
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
export { ClassValue, clsx } from 'clsx';
|
|
3
|
+
export { twMerge } from 'tailwind-merge';
|
|
4
|
+
export { VariantProps, cva, cx } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
/** Merges Tailwind class names: `clsx` for conditions, `tailwind-merge` for conflicts. */
|
|
7
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
8
|
+
|
|
9
|
+
export { cn };
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/utils.ts
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
import { cva, cx } from "class-variance-authority";
|
|
5
|
+
function cn(...inputs) {
|
|
6
|
+
return twMerge(clsx(inputs));
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
clsx,
|
|
10
|
+
cn,
|
|
11
|
+
cva,
|
|
12
|
+
cx,
|
|
13
|
+
twMerge
|
|
14
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@surreal-ui/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -11,17 +11,25 @@
|
|
|
11
11
|
".": {
|
|
12
12
|
"import": "./dist/index.js",
|
|
13
13
|
"types": "./dist/index.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"./utils": {
|
|
16
|
+
"types": "./dist/utils.d.ts",
|
|
17
|
+
"import": "./dist/utils.js"
|
|
14
18
|
}
|
|
15
19
|
},
|
|
16
20
|
"peerDependencies": {
|
|
17
21
|
"react": ">=18.0.0",
|
|
18
|
-
"react-dom": ">=18.0.0"
|
|
22
|
+
"react-dom": ">=18.0.0",
|
|
23
|
+
"shiki": ">=1.0.0"
|
|
19
24
|
},
|
|
20
25
|
"dependencies": {
|
|
21
26
|
"@radix-ui/react-hover-card": "^1.2.1",
|
|
22
27
|
"lucide-react": "^1.59.0",
|
|
23
28
|
"sonner": "^2.0.7",
|
|
24
|
-
"
|
|
29
|
+
"class-variance-authority": "^0.7.1",
|
|
30
|
+
"clsx": "^2.1.1",
|
|
31
|
+
"tailwind-merge": "^3.7.0",
|
|
32
|
+
"@surreal-ui/catalog": "0.9.0"
|
|
25
33
|
},
|
|
26
34
|
"devDependencies": {
|
|
27
35
|
"@radix-ui/react-hover-card": "^1.2.1",
|
|
@@ -32,7 +40,16 @@
|
|
|
32
40
|
"tsup": "^8.0.2",
|
|
33
41
|
"typescript": "^5.5.0"
|
|
34
42
|
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist"
|
|
45
|
+
],
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"peerDependenciesMeta": {
|
|
48
|
+
"shiki": {
|
|
49
|
+
"optional": true
|
|
50
|
+
}
|
|
51
|
+
},
|
|
35
52
|
"scripts": {
|
|
36
|
-
"build": "
|
|
53
|
+
"build": "node ../../scripts/build-component-packages.mjs react && tsup"
|
|
37
54
|
}
|
|
38
55
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
# @surreal-ui/react
|
|
2
|
-
|
|
3
|
-
## 0.8.1
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Updated dependencies [9c87bd5]
|
|
8
|
-
- @surreal-ui/core@0.8.1
|
|
9
|
-
|
|
10
|
-
## 0.8.0
|
|
11
|
-
|
|
12
|
-
### Patch Changes
|
|
13
|
-
|
|
14
|
-
- Updated dependencies [4e054ea]
|
|
15
|
-
- @surreal-ui/core@0.8.0
|
|
16
|
-
|
|
17
|
-
## 0.7.0
|
|
18
|
-
|
|
19
|
-
### Minor Changes
|
|
20
|
-
|
|
21
|
-
- ad9e9ad: Implement complete component dependencies architecture supporting internal Surreal UI cross-component dependencies and external NPM package dependencies.
|
|
22
|
-
|
|
23
|
-
- Added internal and external component dependency extraction in core pipeline
|
|
24
|
-
- Added recursive dependency tree generation and companion code bundling in `ComponentService`
|
|
25
|
-
- Added `get_component_dependencies` tool to MCP server
|
|
26
|
-
- Updated `RegistryService` and CLI to preserve companion dependencies
|
|
27
|
-
- Enhanced `ComponentPreviewCanvas` sandbox with companion component compilation and runtime injection
|
|
28
|
-
- Added Dependencies tab in the web catalog component explorer
|
|
29
|
-
|
|
30
|
-
### Patch Changes
|
|
31
|
-
|
|
32
|
-
- Updated dependencies [ad9e9ad]
|
|
33
|
-
- @surreal-ui/core@0.7.0
|
|
34
|
-
|
|
35
|
-
## 0.6.2
|
|
36
|
-
|
|
37
|
-
### Patch Changes
|
|
38
|
-
|
|
39
|
-
- @surreal-ui/core@0.6.2
|
|
40
|
-
|
|
41
|
-
## 0.6.1
|
|
42
|
-
|
|
43
|
-
### Patch Changes
|
|
44
|
-
|
|
45
|
-
- Configure standalone CLI publishing with OIDC provenance and decouple runtime monorepo dependencies.
|
|
46
|
-
- Updated dependencies
|
|
47
|
-
- @surreal-ui/core@0.6.1
|
|
48
|
-
|
|
49
|
-
## 0.6.0
|
|
50
|
-
|
|
51
|
-
### Patch Changes
|
|
52
|
-
|
|
53
|
-
- Updated dependencies [d3f47ca]
|
|
54
|
-
- @surreal-ui/core@0.6.0
|
|
55
|
-
|
|
56
|
-
## 0.5.4
|
|
57
|
-
|
|
58
|
-
### Patch Changes
|
|
59
|
-
|
|
60
|
-
- @surreal-ui/core@0.5.4
|
|
61
|
-
|
|
62
|
-
## 0.5.3
|
|
63
|
-
|
|
64
|
-
### Patch Changes
|
|
65
|
-
|
|
66
|
-
- @surreal-ui/core@0.5.3
|
|
67
|
-
|
|
68
|
-
## 0.5.2
|
|
69
|
-
|
|
70
|
-
### Patch Changes
|
|
71
|
-
|
|
72
|
-
- a2375f9: Normalize exported component implementations and formatting across multi-platform packages.
|
|
73
|
-
- @surreal-ui/core@0.5.2
|
|
74
|
-
|
|
75
|
-
## 0.5.1
|
|
76
|
-
|
|
77
|
-
### Patch Changes
|
|
78
|
-
|
|
79
|
-
- 18465ad: verify npm OIDC trusted publishing flow
|
|
80
|
-
- Updated dependencies [18465ad]
|
|
81
|
-
- @surreal-ui/core@0.5.1
|
|
82
|
-
|
|
83
|
-
## 0.5.0
|
|
84
|
-
|
|
85
|
-
### Minor Changes
|
|
86
|
-
|
|
87
|
-
- 7dfb5a8: Implement automated multi-platform package export and synchronization engine. Automatically updates and versions public Svelte 5, React 19 TSX, and WebComponent distribution packages as components and variants are added, modified, reverted, or removed in the Surreal UI catalog.
|
|
88
|
-
|
|
89
|
-
### Patch Changes
|
|
90
|
-
|
|
91
|
-
- 91759d6: feat: add automated npm OIDC Trusted Publishing with provenance and GitHub repository dispatch on catalog modifications.
|
|
92
|
-
- Updated dependencies [7dfb5a8]
|
|
93
|
-
- Updated dependencies [91759d6]
|
|
94
|
-
- @surreal-ui/core@0.5.0
|
|
95
|
-
|
|
96
|
-
## 0.4.13
|
|
97
|
-
|
|
98
|
-
## 0.4.12
|
|
99
|
-
|
|
100
|
-
## 0.4.11
|
|
101
|
-
|
|
102
|
-
## 0.4.10
|
|
103
|
-
|
|
104
|
-
## 0.4.9
|
|
105
|
-
|
|
106
|
-
## 0.4.8
|
|
107
|
-
|
|
108
|
-
## 0.4.7
|
|
109
|
-
|
|
110
|
-
## 0.4.6
|
|
111
|
-
|
|
112
|
-
## 0.4.5
|
|
113
|
-
|
|
114
|
-
## 0.4.4
|
|
115
|
-
|
|
116
|
-
## 0.4.3
|
|
117
|
-
|
|
118
|
-
## 0.4.2
|
|
119
|
-
|
|
120
|
-
## 0.4.1
|
|
121
|
-
|
|
122
|
-
## 0.4.0
|
|
123
|
-
|
|
124
|
-
## 0.3.3
|
|
125
|
-
|
|
126
|
-
## 0.3.2
|
|
127
|
-
|
|
128
|
-
## 0.3.1
|
|
129
|
-
|
|
130
|
-
## 0.3.0
|
|
131
|
-
|
|
132
|
-
## 0.2.2
|
|
133
|
-
|
|
134
|
-
## 0.2.1
|
|
135
|
-
|
|
136
|
-
### Patch Changes
|
|
137
|
-
|
|
138
|
-
- 363ae8b: Align monorepo release and automated version bump pipeline with Pixerate/Critical-Path:
|
|
139
|
-
|
|
140
|
-
- Added `.github/workflows/release-and-publish.yml` for direct automated release, changelog updates, and tag pushing on push to `main` when pending changesets exist.
|
|
141
|
-
- Added `.github/workflows/version-bump.yml` for manual workflow dispatch version bumping.
|
|
142
|
-
- Added `scripts/bump-version.js` and `scripts/sync-root-version.js` for synchronizing versions across all monorepo package definitions.
|
|
143
|
-
- Removed obsolete PR-based release workflow.
|
|
144
|
-
|
|
145
|
-
## 0.2.0
|
|
146
|
-
|
|
147
|
-
### Patch Changes
|
|
148
|
-
|
|
149
|
-
- e6006a2: Mandate and configure Changesets for monorepo package versioning and release automation.
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CheckCircle2, ArrowRight } from 'lucide-react';
|
|
3
|
-
|
|
4
|
-
interface CreatedComponent {
|
|
5
|
-
id: string;
|
|
6
|
-
title: string;
|
|
7
|
-
currentVersion: string | number;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface GlassmorphismAlertProps {
|
|
11
|
-
successMessage?: string;
|
|
12
|
-
createdComponent?: CreatedComponent | null;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const GlassmorphismAlert: React.FC<GlassmorphismAlertProps> = ({
|
|
16
|
-
successMessage = '',
|
|
17
|
-
createdComponent = null
|
|
18
|
-
}) => {
|
|
19
|
-
if (!successMessage || !createdComponent) {
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<div className="p-6 backdrop-blur-md bg-emerald-500/10 border border-emerald-500/30 rounded-2xl space-y-4 shadow-xl">
|
|
25
|
-
<div className="flex items-center gap-3 text-emerald-300 font-bold text-lg">
|
|
26
|
-
<CheckCircle2 className="w-6 h-6" />
|
|
27
|
-
<span>{successMessage}</span>
|
|
28
|
-
</div>
|
|
29
|
-
<p className="text-slate-300 text-sm">
|
|
30
|
-
View your new component v{createdComponent.currentVersion} in the Surreal UI catalog:
|
|
31
|
-
</p>
|
|
32
|
-
<a
|
|
33
|
-
href={`/components/${createdComponent.id}`}
|
|
34
|
-
className="inline-flex items-center gap-2 px-5 py-2.5 bg-emerald-600/80 hover:bg-emerald-600 text-white font-semibold text-sm rounded-xl transition-colors shadow-lg shadow-emerald-500/20 backdrop-blur-sm"
|
|
35
|
-
>
|
|
36
|
-
<span>Open {createdComponent.title} in Playground</span>
|
|
37
|
-
<ArrowRight className="w-4 h-4" />
|
|
38
|
-
</a>
|
|
39
|
-
</div>
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export default GlassmorphismAlert;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface GlassButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
-
label?: string;
|
|
4
|
-
}
|
|
5
|
-
export const GlassmorphismButton: React.FC<GlassButtonProps> = ({
|
|
6
|
-
label = 'Glass Action Button',
|
|
7
|
-
children,
|
|
8
|
-
className = '',
|
|
9
|
-
...props
|
|
10
|
-
}) => {
|
|
11
|
-
return (
|
|
12
|
-
<button
|
|
13
|
-
className={`px-6 py-3 rounded-2xl bg-white/10 backdrop-blur-md border border-white/20 text-white font-semibold shadow-lg hover:bg-white/20 transition-all active:scale-95 cursor-pointer dark:bg-slate-900/40 dark:border-white/10 dark:hover:bg-slate-900/60 ${className}`}
|
|
14
|
-
{...props}
|
|
15
|
-
>
|
|
16
|
-
{children || label}
|
|
17
|
-
</button>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
export default GlassmorphismButton;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface CardSkeletonGridProps {
|
|
3
|
-
count?: number;
|
|
4
|
-
}
|
|
5
|
-
export const CardSkeletonGrid: React.FC<CardSkeletonGridProps> = ({ count = 6 }) => {
|
|
6
|
-
return (
|
|
7
|
-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
8
|
-
{Array.from({ length: count }).map((_, index) => (
|
|
9
|
-
<div
|
|
10
|
-
key={index}
|
|
11
|
-
className="relative flex flex-col justify-between rounded-2xl bg-slate-900/60 backdrop-blur-xl border border-slate-800/80 p-6 animate-pulse overflow-hidden space-y-4"
|
|
12
|
-
>
|
|
13
|
-
<div className="space-y-3">
|
|
14
|
-
<div className="flex items-center justify-between">
|
|
15
|
-
<div className="h-5 w-28 bg-slate-800/80 rounded-md"></div>
|
|
16
|
-
<div className="h-4 w-12 bg-slate-800/60 rounded"></div>
|
|
17
|
-
</div>
|
|
18
|
-
<div className="space-y-2 pt-1">
|
|
19
|
-
<div className="h-6 w-3/4 bg-slate-800/90 rounded-lg"></div>
|
|
20
|
-
<div className="h-3.5 w-full bg-slate-800/60 rounded"></div>
|
|
21
|
-
<div className="h-3.5 w-5/6 bg-slate-800/50 rounded"></div>
|
|
22
|
-
</div>
|
|
23
|
-
<div className="flex items-center gap-2 pt-2">
|
|
24
|
-
<div className="h-4 w-16 bg-slate-800/70 rounded"></div>
|
|
25
|
-
<div className="h-4 w-14 bg-slate-800/60 rounded"></div>
|
|
26
|
-
<div className="h-4 w-12 bg-slate-800/50 rounded"></div>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
<div className="pt-4 border-t border-slate-800/60 flex items-center justify-between">
|
|
30
|
-
<div className="flex items-center gap-1.5">
|
|
31
|
-
<div className="h-4 w-12 bg-slate-800/60 rounded"></div>
|
|
32
|
-
<div className="h-4 w-12 bg-slate-800/60 rounded"></div>
|
|
33
|
-
<div className="h-4 w-12 bg-slate-800/60 rounded"></div>
|
|
34
|
-
</div>
|
|
35
|
-
<div className="h-4 w-20 bg-slate-800/70 rounded"></div>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
))}
|
|
39
|
-
</div>
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export default GlassmorphismCard;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Activity } from 'lucide-react';
|
|
3
|
-
interface GlassmorphismEmptyStateProps {
|
|
4
|
-
title?: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
}
|
|
7
|
-
export const GlassmorphismEmptyState: React.FC<GlassmorphismEmptyStateProps> = ({
|
|
8
|
-
title = 'No activity logged yet',
|
|
9
|
-
description = 'Activities will appear automatically as components are ingested or modified.'
|
|
10
|
-
}) => {
|
|
11
|
-
return (
|
|
12
|
-
<div className="text-center py-16 px-6 bg-white/5 backdrop-blur-md border border-dashed border-white/10 rounded-3xl space-y-3 shadow-2xl">
|
|
13
|
-
<Activity className="w-10 h-10 mx-auto text-slate-400" />
|
|
14
|
-
<h3 className="text-lg font-bold text-white">{title}</h3>
|
|
15
|
-
<p className="text-xs text-slate-400">{description}</p>
|
|
16
|
-
</div>
|
|
17
|
-
);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export default GlassmorphismEmptyState;
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { Sparkles, Loader2 } from 'lucide-react';
|
|
3
|
-
|
|
4
|
-
interface GlassInputGroupProps {
|
|
5
|
-
componentTypeId?: string;
|
|
6
|
-
aestheticId?: string;
|
|
7
|
-
codeBundle?: string;
|
|
8
|
-
changelogNote?: string;
|
|
9
|
-
sourcePlatform?: string;
|
|
10
|
-
loading?: boolean;
|
|
11
|
-
onSubmit?: () => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const GlassInputGroup: React.FC<GlassInputGroupProps> = ({
|
|
15
|
-
componentTypeId: initialComponentTypeId = 'button',
|
|
16
|
-
aestheticId: initialAestheticId = 'glassmorphism',
|
|
17
|
-
codeBundle: initialCodeBundle = '',
|
|
18
|
-
changelogNote: initialChangelogNote = 'Initial code package release',
|
|
19
|
-
sourcePlatform: initialSourcePlatform = '',
|
|
20
|
-
loading = false,
|
|
21
|
-
onSubmit = () => {}
|
|
22
|
-
}) => {
|
|
23
|
-
const [componentTypeId, setComponentTypeId] = useState(initialComponentTypeId);
|
|
24
|
-
const [aestheticId, setAestheticId] = useState(initialAestheticId);
|
|
25
|
-
const [codeBundle, setCodeBundle] = useState(initialCodeBundle);
|
|
26
|
-
const [changelogNote, setChangelogNote] = useState(initialChangelogNote);
|
|
27
|
-
const [sourcePlatform, setSourcePlatform] = useState(initialSourcePlatform);
|
|
28
|
-
|
|
29
|
-
const handleSubmit = (e: React.FormEvent) => {
|
|
30
|
-
e.preventDefault();
|
|
31
|
-
onSubmit();
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<form
|
|
36
|
-
onSubmit={handleSubmit}
|
|
37
|
-
className="p-8 rounded-3xl bg-slate-900/80 backdrop-blur-xl border border-slate-800/80 space-y-6 shadow-2xl"
|
|
38
|
-
>
|
|
39
|
-
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
40
|
-
<div className="space-y-2">
|
|
41
|
-
<label
|
|
42
|
-
htmlFor="comp-type"
|
|
43
|
-
className="text-xs font-semibold text-slate-300 uppercase tracking-wider"
|
|
44
|
-
>
|
|
45
|
-
UI Component Type *
|
|
46
|
-
</label>
|
|
47
|
-
<input
|
|
48
|
-
id="comp-type"
|
|
49
|
-
type="text"
|
|
50
|
-
value={componentTypeId}
|
|
51
|
-
onChange={(e) => setComponentTypeId(e.target.value)}
|
|
52
|
-
placeholder="e.g. button, card, dialog, accordion"
|
|
53
|
-
required
|
|
54
|
-
className="w-full px-4 py-2.5 bg-slate-950/60 border border-slate-800 rounded-xl text-sm text-white placeholder-slate-500 focus:outline-none focus:border-indigo-500"
|
|
55
|
-
/>
|
|
56
|
-
</div>
|
|
57
|
-
<div className="space-y-2">
|
|
58
|
-
<label
|
|
59
|
-
htmlFor="aesthetic-id"
|
|
60
|
-
className="text-xs font-semibold text-slate-300 uppercase tracking-wider"
|
|
61
|
-
>
|
|
62
|
-
Aesthetic Variant *
|
|
63
|
-
</label>
|
|
64
|
-
<input
|
|
65
|
-
id="aesthetic-id"
|
|
66
|
-
type="text"
|
|
67
|
-
value={aestheticId}
|
|
68
|
-
onChange={(e) => setAestheticId(e.target.value)}
|
|
69
|
-
placeholder="e.g. glassmorphism, neubrutalism, minimalist, modern"
|
|
70
|
-
required
|
|
71
|
-
className="w-full px-4 py-2.5 bg-slate-950/60 border border-slate-800 rounded-xl text-sm text-white placeholder-slate-500 focus:outline-none focus:border-indigo-500"
|
|
72
|
-
/>
|
|
73
|
-
</div>
|
|
74
|
-
<div className="space-y-2">
|
|
75
|
-
<label
|
|
76
|
-
htmlFor="source-plat"
|
|
77
|
-
className="text-xs font-semibold text-slate-300 uppercase tracking-wider"
|
|
78
|
-
>
|
|
79
|
-
Source Language (Optional)
|
|
80
|
-
</label>
|
|
81
|
-
<select
|
|
82
|
-
id="source-plat"
|
|
83
|
-
value={sourcePlatform}
|
|
84
|
-
onChange={(e) => setSourcePlatform(e.target.value)}
|
|
85
|
-
className="w-full px-4 py-2.5 bg-slate-950/60 border border-slate-800 rounded-xl text-sm text-white focus:outline-none focus:border-indigo-500"
|
|
86
|
-
>
|
|
87
|
-
<option value="">✨ Auto-Detect Language</option>
|
|
88
|
-
<option value="svelte">Svelte Component (.svelte)</option>
|
|
89
|
-
<option value="react">React Component (.tsx/.jsx)</option>
|
|
90
|
-
<option value="webcomponent">WebComponent / Custom Element</option>
|
|
91
|
-
</select>
|
|
92
|
-
</div>
|
|
93
|
-
<div className="space-y-2">
|
|
94
|
-
<label
|
|
95
|
-
htmlFor="change-note"
|
|
96
|
-
className="text-xs font-semibold text-slate-300 uppercase tracking-wider"
|
|
97
|
-
>
|
|
98
|
-
Changelog Note
|
|
99
|
-
</label>
|
|
100
|
-
<input
|
|
101
|
-
id="change-note"
|
|
102
|
-
type="text"
|
|
103
|
-
value={changelogNote}
|
|
104
|
-
onChange={(e) => setChangelogNote(e.target.value)}
|
|
105
|
-
placeholder="Summary of code changes..."
|
|
106
|
-
className="w-full px-4 py-2.5 bg-slate-950/60 border border-slate-800 rounded-xl text-sm text-white placeholder-slate-500 focus:outline-none focus:border-indigo-500"
|
|
107
|
-
/>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
<div className="space-y-2">
|
|
111
|
-
<label
|
|
112
|
-
htmlFor="code-bundle"
|
|
113
|
-
className="text-xs font-semibold text-slate-300 uppercase tracking-wider"
|
|
114
|
-
>
|
|
115
|
-
Raw Encapsulated Code Bundle *
|
|
116
|
-
</label>
|
|
117
|
-
<textarea
|
|
118
|
-
id="code-bundle"
|
|
119
|
-
value={codeBundle}
|
|
120
|
-
onChange={(e) => setCodeBundle(e.target.value)}
|
|
121
|
-
rows={10}
|
|
122
|
-
required
|
|
123
|
-
placeholder="Paste component source code here..."
|
|
124
|
-
className="w-full p-4 bg-slate-950/60 border border-slate-800 rounded-xl font-mono text-xs text-indigo-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500 leading-relaxed"
|
|
125
|
-
></textarea>
|
|
126
|
-
</div>
|
|
127
|
-
<button
|
|
128
|
-
type="submit"
|
|
129
|
-
disabled={loading}
|
|
130
|
-
className="w-full py-3.5 bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 hover:from-indigo-600 hover:to-pink-600 text-white font-bold text-sm rounded-xl shadow-xl shadow-indigo-500/25 transition-all flex items-center justify-center gap-2 cursor-pointer disabled:opacity-50"
|
|
131
|
-
>
|
|
132
|
-
{loading ? (
|
|
133
|
-
<>
|
|
134
|
-
<Loader2 className="w-5 h-5 animate-spin" />
|
|
135
|
-
<span>Ingesting Code Package & Synthesizing Multi-Platform Bundles...</span>
|
|
136
|
-
</>
|
|
137
|
-
) : (
|
|
138
|
-
<>
|
|
139
|
-
<Sparkles className="w-5 h-5" />
|
|
140
|
-
<span>Ingest Code Package & Generate Svelte, React & WebComponent Variants</span>
|
|
141
|
-
</>
|
|
142
|
-
)}
|
|
143
|
-
</button>
|
|
144
|
-
</form>
|
|
145
|
-
);
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
export default GlassmorphismInputGroup;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Sparkles,
|
|
4
|
-
LayoutGrid,
|
|
5
|
-
PlusCircle,
|
|
6
|
-
Activity,
|
|
7
|
-
Terminal,
|
|
8
|
-
Github,
|
|
9
|
-
LogOut,
|
|
10
|
-
User
|
|
11
|
-
} from 'lucide-react';
|
|
12
|
-
interface GlassmorphismMenubarProps {
|
|
13
|
-
appVersion?: string;
|
|
14
|
-
currentUser?: { email: string } | null;
|
|
15
|
-
onSignOut?: () => void;
|
|
16
|
-
}
|
|
17
|
-
export const GlassmorphismMenubar: React.FC<GlassmorphismMenubarProps> = ({
|
|
18
|
-
appVersion = '0.1.0',
|
|
19
|
-
currentUser = null,
|
|
20
|
-
onSignOut = () => {}
|
|
21
|
-
}) => {
|
|
22
|
-
return (
|
|
23
|
-
<header className="sticky top-0 z-50 bg-slate-950/80 backdrop-blur-md border-b border-slate-800/80 px-4 lg:px-8 py-3.5">
|
|
24
|
-
<div className="max-w-7xl mx-auto flex items-center justify-between gap-4">
|
|
25
|
-
<a href="/" className="flex items-center gap-2.5 group">
|
|
26
|
-
<div className="p-2 rounded-xl bg-gradient-to-tr from-indigo-500 via-purple-500 to-pink-500 text-white shadow-lg shadow-indigo-500/30 group-hover:scale-105 transition-transform">
|
|
27
|
-
<Sparkles className="w-5 h-5" />
|
|
28
|
-
</div>
|
|
29
|
-
<div>
|
|
30
|
-
<span className="text-xl font-bold bg-gradient-to-r from-white via-slate-200 to-indigo-300 bg-clip-text text-transparent tracking-tight">
|
|
31
|
-
Surreal UI
|
|
32
|
-
</span>
|
|
33
|
-
<span className="hidden sm:inline-block ml-2 px-2 py-0.5 text-[10px] font-mono tracking-wider bg-indigo-500/20 text-indigo-300 border border-indigo-500/30 rounded-full">
|
|
34
|
-
v{appVersion}
|
|
35
|
-
</span>
|
|
36
|
-
</div>
|
|
37
|
-
</a>
|
|
38
|
-
<nav className="hidden md:flex items-center gap-1 bg-slate-900/60 p-1 rounded-xl border border-slate-800">
|
|
39
|
-
<a
|
|
40
|
-
href="/"
|
|
41
|
-
className="flex items-center gap-2 px-3.5 py-1.5 rounded-lg text-sm font-medium hover:bg-slate-800 text-slate-200 transition-colors"
|
|
42
|
-
>
|
|
43
|
-
<LayoutGrid className="w-4 h-4 text-indigo-400" />
|
|
44
|
-
Catalog
|
|
45
|
-
</a>
|
|
46
|
-
<a
|
|
47
|
-
href="/studio"
|
|
48
|
-
className="flex items-center gap-2 px-3.5 py-1.5 rounded-lg text-sm font-medium hover:bg-slate-800 text-slate-200 transition-colors"
|
|
49
|
-
>
|
|
50
|
-
<PlusCircle className="w-4 h-4 text-pink-400" />
|
|
51
|
-
Studio & Ingest
|
|
52
|
-
</a>
|
|
53
|
-
<a
|
|
54
|
-
href="/activity"
|
|
55
|
-
className="flex items-center gap-2 px-3.5 py-1.5 rounded-lg text-sm font-medium hover:bg-slate-800 text-slate-200 transition-colors"
|
|
56
|
-
>
|
|
57
|
-
<Activity className="w-4 h-4 text-emerald-400" />
|
|
58
|
-
Activity Log
|
|
59
|
-
</a>
|
|
60
|
-
</nav>
|
|
61
|
-
<div className="flex items-center gap-2 sm:gap-3">
|
|
62
|
-
<div className="hidden lg:flex items-center gap-1.5 px-3 py-1.5 bg-slate-900 border border-slate-800 rounded-lg text-xs font-mono text-slate-400">
|
|
63
|
-
<Terminal className="w-3.5 h-3.5 text-purple-400" />
|
|
64
|
-
<span>npx @surreal-ui/mcp</span>
|
|
65
|
-
</div>
|
|
66
|
-
<a
|
|
67
|
-
href="https://github.com/surrealroad/surreal-ui"
|
|
68
|
-
target="_blank"
|
|
69
|
-
rel="noreferrer"
|
|
70
|
-
className="p-2 rounded-lg bg-slate-900 border border-slate-800 hover:bg-slate-800 text-slate-300 transition-colors hidden sm:inline-flex"
|
|
71
|
-
title="GitHub Repository"
|
|
72
|
-
>
|
|
73
|
-
<Github className="w-4 h-4" />
|
|
74
|
-
</a>
|
|
75
|
-
{currentUser && (
|
|
76
|
-
<div className="flex items-center gap-2 pl-2 border-l border-slate-800">
|
|
77
|
-
<div className="hidden sm:flex items-center gap-1.5 px-2.5 py-1 bg-indigo-500/10 border border-indigo-500/20 rounded-lg text-xs text-indigo-300">
|
|
78
|
-
<User className="w-3.5 h-3.5 text-indigo-400" />
|
|
79
|
-
<span className="max-w-[120px] truncate font-medium">{currentUser.email}</span>
|
|
80
|
-
</div>
|
|
81
|
-
<button
|
|
82
|
-
onClick={onSignOut}
|
|
83
|
-
className="p-2 rounded-lg bg-slate-900 border border-slate-800 hover:bg-red-500/20 hover:border-red-500/30 hover:text-red-300 text-slate-400 transition-colors"
|
|
84
|
-
title="Sign Out"
|
|
85
|
-
>
|
|
86
|
-
<LogOut className="w-4 h-4" />
|
|
87
|
-
</button>
|
|
88
|
-
</div>
|
|
89
|
-
)}
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
</header>
|
|
93
|
-
);
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export default GlassmorphismMenubar;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RotateCcw } from 'lucide-react';
|
|
3
|
-
interface Version {
|
|
4
|
-
id: string;
|
|
5
|
-
version: string;
|
|
6
|
-
aestheticId: string;
|
|
7
|
-
createdAt: string;
|
|
8
|
-
changelogNote: string;
|
|
9
|
-
}
|
|
10
|
-
interface GlassmorphismScrollAreaProps {
|
|
11
|
-
currentVersionId?: string;
|
|
12
|
-
versions?: Version[];
|
|
13
|
-
revertLoading?: boolean;
|
|
14
|
-
onRevert?: (versionId: string) => void;
|
|
15
|
-
}
|
|
16
|
-
export const GlassmorphismScrollArea: React.FC<GlassmorphismScrollAreaProps> = ({
|
|
17
|
-
currentVersionId = '',
|
|
18
|
-
versions = [],
|
|
19
|
-
revertLoading = false,
|
|
20
|
-
onRevert = () => {}
|
|
21
|
-
}) => {
|
|
22
|
-
return (
|
|
23
|
-
<div className="backdrop-blur-xl bg-slate-900/60 border border-white/10 p-6 rounded-2xl shadow-2xl space-y-4 max-h-[600px] overflow-y-auto">
|
|
24
|
-
<h3 className="text-sm font-semibold text-slate-300 uppercase tracking-wider">
|
|
25
|
-
Semver Timeline & Revert
|
|
26
|
-
</h3>
|
|
27
|
-
<div className="space-y-3">
|
|
28
|
-
{versions.map((v) => (
|
|
29
|
-
<div
|
|
30
|
-
key={v.id}
|
|
31
|
-
className="p-4 rounded-xl bg-slate-950/40 border border-white/10 backdrop-blur-md flex flex-col sm:flex-row sm:items-center justify-between gap-4 transition-all hover:bg-slate-950/60"
|
|
32
|
-
>
|
|
33
|
-
<div className="space-y-1">
|
|
34
|
-
<div className="flex flex-wrap items-center gap-2">
|
|
35
|
-
<span className="font-mono text-sm font-bold text-indigo-300">v{v.version}</span>
|
|
36
|
-
<span className="px-2 py-0.5 text-[10px] font-mono bg-purple-500/20 text-purple-300 border border-purple-500/30 rounded">
|
|
37
|
-
{v.aestheticId}
|
|
38
|
-
</span>
|
|
39
|
-
{v.id === currentVersionId && (
|
|
40
|
-
<span className="px-2 py-0.5 text-[10px] font-bold bg-emerald-500/20 text-emerald-300 border border-emerald-500/30 rounded-full uppercase">
|
|
41
|
-
Active Version
|
|
42
|
-
</span>
|
|
43
|
-
)}
|
|
44
|
-
<span className="text-xs text-slate-500">
|
|
45
|
-
{new Date(v.createdAt).toLocaleString()}
|
|
46
|
-
</span>
|
|
47
|
-
</div>
|
|
48
|
-
<p className="text-xs text-slate-300">{v.changelogNote}</p>
|
|
49
|
-
</div>
|
|
50
|
-
{v.id !== currentVersionId && (
|
|
51
|
-
<button
|
|
52
|
-
disabled={revertLoading}
|
|
53
|
-
onClick={() => onRevert(v.id)}
|
|
54
|
-
className="px-3.5 py-1.5 bg-white/5 hover:bg-white/10 active:bg-white/15 disabled:opacity-50 text-slate-200 text-xs font-semibold rounded-lg border border-white/10 flex items-center gap-1.5 transition-colors self-start sm:self-auto cursor-pointer"
|
|
55
|
-
>
|
|
56
|
-
<RotateCcw className="w-3.5 h-3.5 text-indigo-400" />
|
|
57
|
-
<span>Revert to v{v.version}</span>
|
|
58
|
-
</button>
|
|
59
|
-
)}
|
|
60
|
-
</div>
|
|
61
|
-
))}
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export default GlassmorphismScrollArea;
|