@surreal-ui/react 0.8.0 → 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.
Files changed (128) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.js +955 -7227
  3. package/dist/utils.d.ts +9 -0
  4. package/dist/utils.js +14 -0
  5. package/package.json +25 -8
  6. package/CHANGELOG.md +0 -142
  7. package/src/components/GlassmorphismAlert.tsx +0 -43
  8. package/src/components/GlassmorphismButton.tsx +0 -20
  9. package/src/components/GlassmorphismCard.tsx +0 -43
  10. package/src/components/GlassmorphismEmptyState.tsx +0 -20
  11. package/src/components/GlassmorphismInputGroup.tsx +0 -148
  12. package/src/components/GlassmorphismMenubar.tsx +0 -96
  13. package/src/components/GlassmorphismScrollArea.tsx +0 -67
  14. package/src/components/GlassmorphismTable.tsx +0 -61
  15. package/src/components/GlassmorphismTypography.tsx +0 -31
  16. package/src/components/MinimalistAccordion.tsx +0 -215
  17. package/src/components/MinimalistAlert.tsx +0 -43
  18. package/src/components/MinimalistAlertDialog.tsx +0 -318
  19. package/src/components/MinimalistAspectRatio.tsx +0 -30
  20. package/src/components/MinimalistAvatar.tsx +0 -149
  21. package/src/components/MinimalistBadge.tsx +0 -49
  22. package/src/components/MinimalistBreadcrumb.tsx +0 -109
  23. package/src/components/MinimalistButton.tsx +0 -86
  24. package/src/components/MinimalistButtonGroup.tsx +0 -86
  25. package/src/components/MinimalistCalendar.tsx +0 -355
  26. package/src/components/MinimalistCard.tsx +0 -89
  27. package/src/components/MinimalistCarousel.tsx +0 -266
  28. package/src/components/MinimalistChart.tsx +0 -296
  29. package/src/components/MinimalistCheckbox.tsx +0 -117
  30. package/src/components/MinimalistCodeBlock.tsx +0 -203
  31. package/src/components/MinimalistCollapsible.tsx +0 -134
  32. package/src/components/MinimalistCommand.tsx +0 -344
  33. package/src/components/MinimalistContextMenu.tsx +0 -408
  34. package/src/components/MinimalistDialog.tsx +0 -273
  35. package/src/components/MinimalistDrawer.tsx +0 -220
  36. package/src/components/MinimalistDropdownMenu.tsx +0 -431
  37. package/src/components/MinimalistEmpty.tsx +0 -105
  38. package/src/components/MinimalistEmptyState.tsx +0 -34
  39. package/src/components/MinimalistField.tsx +0 -275
  40. package/src/components/MinimalistForm.tsx +0 -205
  41. package/src/components/MinimalistHoverCard.tsx +0 -48
  42. package/src/components/MinimalistInput.tsx +0 -24
  43. package/src/components/MinimalistInputGroup.tsx +0 -180
  44. package/src/components/MinimalistInputOtp.tsx +0 -189
  45. package/src/components/MinimalistItem.tsx +0 -182
  46. package/src/components/MinimalistKbd.tsx +0 -46
  47. package/src/components/MinimalistLabel.tsx +0 -19
  48. package/src/components/MinimalistMenubar.tsx +0 -491
  49. package/src/components/MinimalistNativeSelect.tsx +0 -77
  50. package/src/components/MinimalistNavigationMenu.tsx +0 -198
  51. package/src/components/MinimalistPagination.tsx +0 -152
  52. package/src/components/MinimalistPopover.tsx +0 -229
  53. package/src/components/MinimalistProgress.tsx +0 -39
  54. package/src/components/MinimalistRadioGroup.tsx +0 -115
  55. package/src/components/MinimalistRangeCalendar.tsx +0 -396
  56. package/src/components/MinimalistResizable.tsx +0 -54
  57. package/src/components/MinimalistScrollArea.tsx +0 -41
  58. package/src/components/MinimalistSelect.tsx +0 -262
  59. package/src/components/MinimalistSeparator.tsx +0 -45
  60. package/src/components/MinimalistSheet.tsx +0 -247
  61. package/src/components/MinimalistSidebar.tsx +0 -638
  62. package/src/components/MinimalistSkeleton.tsx +0 -16
  63. package/src/components/MinimalistSlider.tsx +0 -213
  64. package/src/components/MinimalistSonner.tsx +0 -41
  65. package/src/components/MinimalistSpinner.tsx +0 -39
  66. package/src/components/MinimalistSwitch.tsx +0 -92
  67. package/src/components/MinimalistTable.tsx +0 -65
  68. package/src/components/MinimalistTabs.tsx +0 -171
  69. package/src/components/MinimalistTextarea.tsx +0 -24
  70. package/src/components/MinimalistToggle.tsx +0 -74
  71. package/src/components/MinimalistToggleGroup.tsx +0 -197
  72. package/src/components/MinimalistTooltip.tsx +0 -172
  73. package/src/components/MinimalistTypography.tsx +0 -33
  74. package/src/components/NeubrutalismCard.tsx +0 -84
  75. package/src/components/NeubrutalismItem.tsx +0 -48
  76. package/src/components/ShadcnAccordion.tsx +0 -215
  77. package/src/components/ShadcnAlertDialog.tsx +0 -318
  78. package/src/components/ShadcnAspectRatio.tsx +0 -30
  79. package/src/components/ShadcnAvatar.tsx +0 -149
  80. package/src/components/ShadcnBadge.tsx +0 -49
  81. package/src/components/ShadcnBreadcrumb.tsx +0 -109
  82. package/src/components/ShadcnButton.tsx +0 -86
  83. package/src/components/ShadcnButtonGroup.tsx +0 -86
  84. package/src/components/ShadcnCalendar.tsx +0 -355
  85. package/src/components/ShadcnCarousel.tsx +0 -266
  86. package/src/components/ShadcnChart.tsx +0 -296
  87. package/src/components/ShadcnCheckbox.tsx +0 -117
  88. package/src/components/ShadcnCodeBlock.tsx +0 -203
  89. package/src/components/ShadcnCollapsible.tsx +0 -134
  90. package/src/components/ShadcnCommand.tsx +0 -344
  91. package/src/components/ShadcnContextMenu.tsx +0 -408
  92. package/src/components/ShadcnDialog.tsx +0 -273
  93. package/src/components/ShadcnDrawer.tsx +0 -220
  94. package/src/components/ShadcnDropdownMenu.tsx +0 -431
  95. package/src/components/ShadcnEmpty.tsx +0 -105
  96. package/src/components/ShadcnField.tsx +0 -275
  97. package/src/components/ShadcnForm.tsx +0 -205
  98. package/src/components/ShadcnHoverCard.tsx +0 -48
  99. package/src/components/ShadcnInput.tsx +0 -24
  100. package/src/components/ShadcnInputGroup.tsx +0 -180
  101. package/src/components/ShadcnInputOtp.tsx +0 -189
  102. package/src/components/ShadcnItem.tsx +0 -182
  103. package/src/components/ShadcnKbd.tsx +0 -46
  104. package/src/components/ShadcnLabel.tsx +0 -19
  105. package/src/components/ShadcnMenubar.tsx +0 -491
  106. package/src/components/ShadcnNativeSelect.tsx +0 -77
  107. package/src/components/ShadcnNavigationMenu.tsx +0 -198
  108. package/src/components/ShadcnPagination.tsx +0 -152
  109. package/src/components/ShadcnPopover.tsx +0 -229
  110. package/src/components/ShadcnProgress.tsx +0 -39
  111. package/src/components/ShadcnRadioGroup.tsx +0 -115
  112. package/src/components/ShadcnRangeCalendar.tsx +0 -396
  113. package/src/components/ShadcnSelect.tsx +0 -262
  114. package/src/components/ShadcnSeparator.tsx +0 -45
  115. package/src/components/ShadcnSheet.tsx +0 -247
  116. package/src/components/ShadcnSidebar.tsx +0 -638
  117. package/src/components/ShadcnSkeleton.tsx +0 -16
  118. package/src/components/ShadcnSlider.tsx +0 -213
  119. package/src/components/ShadcnSonner.tsx +0 -41
  120. package/src/components/ShadcnSpinner.tsx +0 -39
  121. package/src/components/ShadcnSwitch.tsx +0 -92
  122. package/src/components/ShadcnTabs.tsx +0 -171
  123. package/src/components/ShadcnTextarea.tsx +0 -24
  124. package/src/components/ShadcnToggle.tsx +0 -74
  125. package/src/components/ShadcnToggleGroup.tsx +0 -197
  126. package/src/components/ShadcnTooltip.tsx +0 -172
  127. package/src/index.ts +0 -124
  128. package/tsconfig.json +0 -10
@@ -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.8.0",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -11,28 +11,45 @@
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
- "@radix-ui/react-hover-card": "^1.1.6",
22
- "lucide-react": "^1.16.0",
26
+ "@radix-ui/react-hover-card": "^1.2.1",
27
+ "lucide-react": "^1.59.0",
23
28
  "sonner": "^2.0.7",
24
- "@surreal-ui/core": "0.8.0"
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
- "@radix-ui/react-hover-card": "^1.1.6",
35
+ "@radix-ui/react-hover-card": "^1.2.1",
28
36
  "@types/react": "^18.3.0",
29
37
  "@types/react-dom": "^18.3.0",
30
- "lucide-react": "^1.16.0",
38
+ "lucide-react": "^1.59.0",
31
39
  "sonner": "^2.0.7",
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": "tsup src/index.ts --format esm --clean --external react --external react-dom --external lucide-react --external sonner --external @radix-ui/react-hover-card --external @surreal-ui/core"
53
+ "build": "node ../../scripts/build-component-packages.mjs react && tsup"
37
54
  }
38
55
  }
package/CHANGELOG.md DELETED
@@ -1,142 +0,0 @@
1
- # @surreal-ui/react
2
-
3
- ## 0.8.0
4
-
5
- ### Patch Changes
6
-
7
- - Updated dependencies [4e054ea]
8
- - @surreal-ui/core@0.8.0
9
-
10
- ## 0.7.0
11
-
12
- ### Minor Changes
13
-
14
- - ad9e9ad: Implement complete component dependencies architecture supporting internal Surreal UI cross-component dependencies and external NPM package dependencies.
15
-
16
- - Added internal and external component dependency extraction in core pipeline
17
- - Added recursive dependency tree generation and companion code bundling in `ComponentService`
18
- - Added `get_component_dependencies` tool to MCP server
19
- - Updated `RegistryService` and CLI to preserve companion dependencies
20
- - Enhanced `ComponentPreviewCanvas` sandbox with companion component compilation and runtime injection
21
- - Added Dependencies tab in the web catalog component explorer
22
-
23
- ### Patch Changes
24
-
25
- - Updated dependencies [ad9e9ad]
26
- - @surreal-ui/core@0.7.0
27
-
28
- ## 0.6.2
29
-
30
- ### Patch Changes
31
-
32
- - @surreal-ui/core@0.6.2
33
-
34
- ## 0.6.1
35
-
36
- ### Patch Changes
37
-
38
- - Configure standalone CLI publishing with OIDC provenance and decouple runtime monorepo dependencies.
39
- - Updated dependencies
40
- - @surreal-ui/core@0.6.1
41
-
42
- ## 0.6.0
43
-
44
- ### Patch Changes
45
-
46
- - Updated dependencies [d3f47ca]
47
- - @surreal-ui/core@0.6.0
48
-
49
- ## 0.5.4
50
-
51
- ### Patch Changes
52
-
53
- - @surreal-ui/core@0.5.4
54
-
55
- ## 0.5.3
56
-
57
- ### Patch Changes
58
-
59
- - @surreal-ui/core@0.5.3
60
-
61
- ## 0.5.2
62
-
63
- ### Patch Changes
64
-
65
- - a2375f9: Normalize exported component implementations and formatting across multi-platform packages.
66
- - @surreal-ui/core@0.5.2
67
-
68
- ## 0.5.1
69
-
70
- ### Patch Changes
71
-
72
- - 18465ad: verify npm OIDC trusted publishing flow
73
- - Updated dependencies [18465ad]
74
- - @surreal-ui/core@0.5.1
75
-
76
- ## 0.5.0
77
-
78
- ### Minor Changes
79
-
80
- - 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.
81
-
82
- ### Patch Changes
83
-
84
- - 91759d6: feat: add automated npm OIDC Trusted Publishing with provenance and GitHub repository dispatch on catalog modifications.
85
- - Updated dependencies [7dfb5a8]
86
- - Updated dependencies [91759d6]
87
- - @surreal-ui/core@0.5.0
88
-
89
- ## 0.4.13
90
-
91
- ## 0.4.12
92
-
93
- ## 0.4.11
94
-
95
- ## 0.4.10
96
-
97
- ## 0.4.9
98
-
99
- ## 0.4.8
100
-
101
- ## 0.4.7
102
-
103
- ## 0.4.6
104
-
105
- ## 0.4.5
106
-
107
- ## 0.4.4
108
-
109
- ## 0.4.3
110
-
111
- ## 0.4.2
112
-
113
- ## 0.4.1
114
-
115
- ## 0.4.0
116
-
117
- ## 0.3.3
118
-
119
- ## 0.3.2
120
-
121
- ## 0.3.1
122
-
123
- ## 0.3.0
124
-
125
- ## 0.2.2
126
-
127
- ## 0.2.1
128
-
129
- ### Patch Changes
130
-
131
- - 363ae8b: Align monorepo release and automated version bump pipeline with Pixerate/Critical-Path:
132
-
133
- - Added `.github/workflows/release-and-publish.yml` for direct automated release, changelog updates, and tag pushing on push to `main` when pending changesets exist.
134
- - Added `.github/workflows/version-bump.yml` for manual workflow dispatch version bumping.
135
- - Added `scripts/bump-version.js` and `scripts/sync-root-version.js` for synchronizing versions across all monorepo package definitions.
136
- - Removed obsolete PR-based release workflow.
137
-
138
- ## 0.2.0
139
-
140
- ### Patch Changes
141
-
142
- - 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;