@surreal-ui/web 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.
Files changed (127) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.js +832 -6249
  3. package/dist/utils.d.ts +9 -0
  4. package/dist/utils.js +14 -0
  5. package/package.json +14 -3
  6. package/CHANGELOG.md +0 -149
  7. package/src/components/GlassmorphismAlert.ts +0 -115
  8. package/src/components/GlassmorphismButton.ts +0 -18
  9. package/src/components/GlassmorphismCard.ts +0 -36
  10. package/src/components/GlassmorphismEmptyState.ts +0 -35
  11. package/src/components/GlassmorphismInputGroup.ts +0 -205
  12. package/src/components/GlassmorphismMenubar.ts +0 -36
  13. package/src/components/GlassmorphismScrollArea.ts +0 -86
  14. package/src/components/GlassmorphismTable.ts +0 -52
  15. package/src/components/GlassmorphismTypography.ts +0 -70
  16. package/src/components/MinimalistAccordion.ts +0 -252
  17. package/src/components/MinimalistAlert.ts +0 -98
  18. package/src/components/MinimalistAlertDialog.ts +0 -102
  19. package/src/components/MinimalistAspectRatio.ts +0 -36
  20. package/src/components/MinimalistAvatar.ts +0 -97
  21. package/src/components/MinimalistBadge.ts +0 -70
  22. package/src/components/MinimalistBreadcrumb.ts +0 -92
  23. package/src/components/MinimalistButton.ts +0 -110
  24. package/src/components/MinimalistButtonGroup.ts +0 -112
  25. package/src/components/MinimalistCalendar.ts +0 -281
  26. package/src/components/MinimalistCard.ts +0 -130
  27. package/src/components/MinimalistCarousel.ts +0 -121
  28. package/src/components/MinimalistChart.ts +0 -150
  29. package/src/components/MinimalistCheckbox.ts +0 -178
  30. package/src/components/MinimalistCodeBlock.ts +0 -112
  31. package/src/components/MinimalistCollapsible.ts +0 -160
  32. package/src/components/MinimalistCommand.ts +0 -111
  33. package/src/components/MinimalistContextMenu.ts +0 -101
  34. package/src/components/MinimalistDialog.ts +0 -103
  35. package/src/components/MinimalistDrawer.ts +0 -222
  36. package/src/components/MinimalistDropdownMenu.ts +0 -125
  37. package/src/components/MinimalistEmpty.ts +0 -97
  38. package/src/components/MinimalistEmptyState.ts +0 -41
  39. package/src/components/MinimalistField.ts +0 -176
  40. package/src/components/MinimalistForm.ts +0 -102
  41. package/src/components/MinimalistHoverCard.ts +0 -149
  42. package/src/components/MinimalistInput.ts +0 -104
  43. package/src/components/MinimalistInputGroup.ts +0 -95
  44. package/src/components/MinimalistInputOtp.ts +0 -154
  45. package/src/components/MinimalistItem.ts +0 -159
  46. package/src/components/MinimalistKbd.ts +0 -37
  47. package/src/components/MinimalistLabel.ts +0 -53
  48. package/src/components/MinimalistMenubar.ts +0 -81
  49. package/src/components/MinimalistNativeSelect.ts +0 -149
  50. package/src/components/MinimalistNavigationMenu.ts +0 -103
  51. package/src/components/MinimalistPagination.ts +0 -140
  52. package/src/components/MinimalistPopover.ts +0 -112
  53. package/src/components/MinimalistProgress.ts +0 -70
  54. package/src/components/MinimalistRadioGroup.ts +0 -228
  55. package/src/components/MinimalistRangeCalendar.ts +0 -272
  56. package/src/components/MinimalistResizable.ts +0 -44
  57. package/src/components/MinimalistScrollArea.ts +0 -42
  58. package/src/components/MinimalistSelect.ts +0 -103
  59. package/src/components/MinimalistSeparator.ts +0 -52
  60. package/src/components/MinimalistSheet.ts +0 -165
  61. package/src/components/MinimalistSidebar.ts +0 -74
  62. package/src/components/MinimalistSkeleton.ts +0 -32
  63. package/src/components/MinimalistSlider.ts +0 -236
  64. package/src/components/MinimalistSonner.ts +0 -93
  65. package/src/components/MinimalistSpinner.ts +0 -52
  66. package/src/components/MinimalistSwitch.ts +0 -165
  67. package/src/components/MinimalistTable.ts +0 -35
  68. package/src/components/MinimalistTabs.ts +0 -97
  69. package/src/components/MinimalistTextarea.ts +0 -99
  70. package/src/components/MinimalistToggle.ts +0 -104
  71. package/src/components/MinimalistToggleGroup.ts +0 -177
  72. package/src/components/MinimalistTooltip.ts +0 -82
  73. package/src/components/MinimalistTypography.ts +0 -106
  74. package/src/components/NeubrutalismCard.ts +0 -35
  75. package/src/components/NeubrutalismItem.ts +0 -67
  76. package/src/components/ShadcnAccordion.ts +0 -248
  77. package/src/components/ShadcnAlertDialog.ts +0 -95
  78. package/src/components/ShadcnAspectRatio.ts +0 -29
  79. package/src/components/ShadcnAvatar.ts +0 -93
  80. package/src/components/ShadcnBadge.ts +0 -66
  81. package/src/components/ShadcnBreadcrumb.ts +0 -88
  82. package/src/components/ShadcnButton.ts +0 -106
  83. package/src/components/ShadcnButtonGroup.ts +0 -105
  84. package/src/components/ShadcnCalendar.ts +0 -277
  85. package/src/components/ShadcnCarousel.ts +0 -117
  86. package/src/components/ShadcnChart.ts +0 -146
  87. package/src/components/ShadcnCheckbox.ts +0 -174
  88. package/src/components/ShadcnCodeBlock.ts +0 -108
  89. package/src/components/ShadcnCollapsible.ts +0 -153
  90. package/src/components/ShadcnCommand.ts +0 -107
  91. package/src/components/ShadcnContextMenu.ts +0 -94
  92. package/src/components/ShadcnDialog.ts +0 -99
  93. package/src/components/ShadcnDrawer.ts +0 -218
  94. package/src/components/ShadcnDropdownMenu.ts +0 -118
  95. package/src/components/ShadcnEmpty.ts +0 -93
  96. package/src/components/ShadcnField.ts +0 -172
  97. package/src/components/ShadcnForm.ts +0 -98
  98. package/src/components/ShadcnHoverCard.ts +0 -145
  99. package/src/components/ShadcnInput.ts +0 -100
  100. package/src/components/ShadcnInputGroup.ts +0 -88
  101. package/src/components/ShadcnInputOtp.ts +0 -150
  102. package/src/components/ShadcnItem.ts +0 -155
  103. package/src/components/ShadcnKbd.ts +0 -33
  104. package/src/components/ShadcnLabel.ts +0 -49
  105. package/src/components/ShadcnMenubar.ts +0 -77
  106. package/src/components/ShadcnNativeSelect.ts +0 -142
  107. package/src/components/ShadcnNavigationMenu.ts +0 -96
  108. package/src/components/ShadcnPagination.ts +0 -136
  109. package/src/components/ShadcnPopover.ts +0 -108
  110. package/src/components/ShadcnProgress.ts +0 -66
  111. package/src/components/ShadcnRadioGroup.ts +0 -221
  112. package/src/components/ShadcnRangeCalendar.ts +0 -265
  113. package/src/components/ShadcnSelect.ts +0 -99
  114. package/src/components/ShadcnSeparator.ts +0 -48
  115. package/src/components/ShadcnSheet.ts +0 -161
  116. package/src/components/ShadcnSidebar.ts +0 -70
  117. package/src/components/ShadcnSkeleton.ts +0 -28
  118. package/src/components/ShadcnSlider.ts +0 -232
  119. package/src/components/ShadcnSonner.ts +0 -89
  120. package/src/components/ShadcnSpinner.ts +0 -48
  121. package/src/components/ShadcnSwitch.ts +0 -161
  122. package/src/components/ShadcnTabs.ts +0 -93
  123. package/src/components/ShadcnTextarea.ts +0 -95
  124. package/src/components/ShadcnToggle.ts +0 -100
  125. package/src/components/ShadcnToggleGroup.ts +0 -170
  126. package/src/components/ShadcnTooltip.ts +0 -78
  127. package/src/index.ts +0 -124
@@ -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/web",
3
- "version": "0.8.1",
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,28 @@
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
  "dependencies": {
17
21
  "lit": "^3.2.0",
18
- "@surreal-ui/core": "0.8.1"
22
+ "class-variance-authority": "^0.7.1",
23
+ "clsx": "^2.1.1",
24
+ "tailwind-merge": "^3.7.0",
25
+ "@surreal-ui/catalog": "0.9.0"
19
26
  },
20
27
  "devDependencies": {
21
28
  "tsup": "^8.0.2",
22
29
  "typescript": "^5.5.0"
23
30
  },
31
+ "files": [
32
+ "dist"
33
+ ],
34
+ "license": "MIT",
24
35
  "scripts": {
25
- "build": "tsup src/index.ts --format esm --clean --external @surreal-ui/core --external lit"
36
+ "build": "node ../../scripts/build-component-packages.mjs web && tsup"
26
37
  }
27
38
  }
package/CHANGELOG.md DELETED
@@ -1,149 +0,0 @@
1
- # @surreal-ui/web
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,115 +0,0 @@
1
- class SurrealGlassAlert extends HTMLElement {
2
- private _successMessage: string = '';
3
- private _createdComponent: { id: string; title: string; currentVersion: string | number } | null =
4
- null;
5
-
6
- constructor() {
7
- super();
8
- this.attachShadow({ mode: 'open' });
9
- }
10
-
11
- set successMessage(val: string) {
12
- this._successMessage = val;
13
- this.render();
14
- }
15
-
16
- set createdComponent(val: any) {
17
- this._createdComponent = typeof val === 'string' ? JSON.parse(val) : val;
18
- this.render();
19
- }
20
-
21
- connectedCallback() {
22
- if (this.hasAttribute('success-message')) {
23
- this._successMessage = this.getAttribute('success-message') || '';
24
- }
25
- if (this.hasAttribute('created-component')) {
26
- try {
27
- this._createdComponent = JSON.parse(this.getAttribute('created-component') || '{}');
28
- } catch (e) {
29
- this._createdComponent = null;
30
- }
31
- }
32
- this.render();
33
- }
34
-
35
- render() {
36
- if (!this._successMessage || !this._createdComponent) {
37
- this.shadowRoot!.innerHTML = '';
38
- return;
39
- }
40
-
41
- this.shadowRoot!.innerHTML = `
42
- <style>
43
- @import "https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css";
44
- :host {
45
- display: block;
46
- }
47
- .glass-alert {
48
- padding: 1.5rem;
49
- backdrop-filter: blur(12px);
50
- background-color: rgba(16, 185, 129, 0.1);
51
- border: 1px solid rgba(16, 185, 129, 0.3);
52
- border-radius: 1rem;
53
- box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
54
- color: #e2e8f0;
55
- }
56
- .flex-center {
57
- display: flex;
58
- align-items: center;
59
- gap: 0.75rem;
60
- }
61
- .title-text {
62
- color: #6ee7b7;
63
- font-weight: 700;
64
- font-size: 1.125rem;
65
- }
66
- .desc-text {
67
- font-size: 0.875rem;
68
- color: #cbd5e1;
69
- margin-top: 1rem;
70
- margin-bottom: 1rem;
71
- }
72
- .action-btn {
73
- display: inline-flex;
74
- align-items: center;
75
- gap: 0.5rem;
76
- padding: 0.625rem 1.25rem;
77
- background-color: rgba(5, 150, 105, 0.8);
78
- color: #ffffff;
79
- font-weight: 600;
80
- font-size: 0.875rem;
81
- border-radius: 0.75rem;
82
- text-decoration: none;
83
- transition: background-color 0.2s;
84
- box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.2);
85
- }
86
- .action-btn:hover {
87
- background-color: rgba(4, 120, 87, 1);
88
- }
89
- </style>
90
- <div class="glass-alert">
91
- <div class="flex-center">
92
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#6ee7b7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>
93
- <span class="title-text">${this._successMessage}</span>
94
- </div>
95
- <p class="desc-text">
96
- View your new component v${this._createdComponent.currentVersion} in the Surreal UI catalog:
97
- </p>
98
- <a
99
- href="/components/${this._createdComponent.id}"
100
- class="action-btn"
101
- >
102
- <span>Open ${this._createdComponent.title} in Playground</span>
103
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>
104
- </a>
105
- </div>
106
- `;
107
- }
108
- }
109
-
110
- if (typeof customElements !== 'undefined' && !customElements.get('surreal-glassmorphism-alert')) {
111
- customElements.define('surreal-glassmorphism-alert', SurrealGlassAlert);
112
- }
113
- export { SurrealGlassAlert as GlassmorphismAlert, SurrealGlassAlert };
114
-
115
- export default SurrealGlassAlert;
@@ -1,18 +0,0 @@
1
- class GlassButton extends HTMLElement {
2
- constructor() {
3
- super();
4
- this.attachShadow({ mode: 'open' });
5
- }
6
- static get observedAttributes() {
7
- return ['label'];
8
- }
9
- attributeChangedCallback() {
10
- this.render();
11
- }
12
- }
13
- export { GlassButton as GlassmorphismButton, GlassButton };
14
- if (typeof customElements !== 'undefined' && !customElements.get('surreal-glassmorphism-button')) {
15
- customElements.define('surreal-glassmorphism-button', GlassButton);
16
- }
17
-
18
- export default GlassButton;
@@ -1,36 +0,0 @@
1
- class SurrealGlassmorphismCardSkeletonGrid extends HTMLElement {
2
- constructor() {
3
- super();
4
- this.attachShadow({ mode: 'open' });
5
- }
6
- static get observedAttributes() {
7
- return ['count'];
8
- }
9
- attributeChangedCallback() {
10
- this.render();
11
- }
12
- connectedCallback() {
13
- this.render();
14
- }
15
- render() {
16
- const count = parseInt(this.getAttribute('count') || '6', 10);
17
- this.shadowRoot.innerHTML = `<style>@import "https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css";</style><div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">${Array.from(
18
- { length: count }
19
- )
20
- .map(
21
- () =>
22
- `<div class="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"><div class="space-y-3"><div class="flex items-center justify-between"><div class="h-5 w-28 bg-slate-800/80 rounded-md"></div><div class="h-4 w-12 bg-slate-800/60 rounded"></div></div><div class="space-y-2 pt-1"><div class="h-6 w-3/4 bg-slate-800/90 rounded-lg"></div><div class="h-3.5 w-full bg-slate-800/60 rounded"></div><div class="h-3.5 w-5/6 bg-slate-800/50 rounded"></div></div><div class="flex items-center gap-2 pt-2"><div class="h-4 w-16 bg-slate-800/70 rounded"></div><div class="h-4 w-14 bg-slate-800/60 rounded"></div><div class="h-4 w-12 bg-slate-800/50 rounded"></div></div></div><div class="pt-4 border-t border-slate-800/60 flex items-center justify-between"><div class="flex items-center gap-1.5"><div class="h-4 w-12 bg-slate-800/60 rounded"></div><div class="h-4 w-12 bg-slate-800/60 rounded"></div><div class="h-4 w-12 bg-slate-800/60 rounded"></div></div><div class="h-4 w-20 bg-slate-800/70 rounded"></div></div></div>`
23
- )
24
- .join('')}</div>`;
25
- }
26
- }
27
-
28
- if (typeof customElements !== 'undefined' && !customElements.get('surreal-glassmorphism-card')) {
29
- customElements.define('surreal-glassmorphism-card', SurrealGlassmorphismCardSkeletonGrid);
30
- }
31
- export {
32
- SurrealGlassmorphismCardSkeletonGrid as GlassmorphismCard,
33
- SurrealGlassmorphismCardSkeletonGrid
34
- };
35
-
36
- export default SurrealGlassmorphismCardSkeletonGrid;
@@ -1,35 +0,0 @@
1
- class SurrealGlassmorphismEmptyState extends HTMLElement {
2
- constructor() {
3
- super();
4
- this.attachShadow({ mode: 'open' });
5
- }
6
- static get observedAttributes() {
7
- return ['title', 'description'];
8
- }
9
- attributeChangedCallback() {
10
- this.render();
11
- }
12
- connectedCallback() {
13
- this.render();
14
- }
15
- render() {
16
- const title = this.getAttribute('title') || 'No activity logged yet';
17
- const description =
18
- this.getAttribute('description') ||
19
- 'Activities will appear automatically as components are ingested or modified.';
20
- this.shadowRoot.innerHTML = `<style>@import "https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/tailwind.min.css";:host {display: block;}.empty-state {text-align: center;padding: 4rem 1.5rem;background: rgba(255, 255, 255, 0.05);backdrop-filter: blur(12px);border: 1px dashed rgba(255, 255, 255, 0.1);border-radius: 1.5rem;box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);}.icon {width: 2.5rem;height: 2.5rem;margin: 0 auto 0.75rem auto;color: #94a3b8;}.title {font-size: 1.125rem;line-height: 1.75rem;font-weight: 700;color: #ffffff;margin: 0 0 0.5rem 0;}.description {font-size: 0.75rem;line-height: 1rem;color: #94a3b8;margin: 0;}</style><div class="empty-state"><svg class="icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg><h3 class="title">${title}</h3><p class="description">${description}</p></div>`;
21
- }
22
- }
23
-
24
- if (
25
- typeof customElements !== 'undefined' &&
26
- !customElements.get('surreal-glassmorphism-empty-state')
27
- ) {
28
- customElements.define('surreal-glassmorphism-empty-state', SurrealGlassmorphismEmptyState);
29
- }
30
- export {
31
- SurrealGlassmorphismEmptyState as GlassmorphismEmptyState,
32
- SurrealGlassmorphismEmptyState
33
- };
34
-
35
- export default SurrealGlassmorphismEmptyState;
@@ -1,205 +0,0 @@
1
- class GlassInputGroupElement extends HTMLElement {
2
- constructor() {
3
- super();
4
- this.attachShadow({ mode: 'open' });
5
- this._loading = false;
6
- }
7
-
8
- static get observedAttributes() {
9
- return [
10
- 'component-type-id',
11
- 'aesthetic-id',
12
- 'code-bundle',
13
- 'changelog-note',
14
- 'source-platform',
15
- 'loading'
16
- ];
17
- }
18
-
19
- attributeChangedCallback(name, oldValue, newValue) {
20
- if (oldValue !== newValue) {
21
- this.render();
22
- }
23
- }
24
-
25
- connectedCallback() {
26
- this.render();
27
- }
28
-
29
- get componentTypeId() {
30
- return this.getAttribute('component-type-id') || 'button';
31
- }
32
- set componentTypeId(v) {
33
- this.setAttribute('component-type-id', v);
34
- }
35
-
36
- get aestheticId() {
37
- return this.getAttribute('aesthetic-id') || 'glassmorphism';
38
- }
39
- set aestheticId(v) {
40
- this.setAttribute('aesthetic-id', v);
41
- }
42
-
43
- get codeBundle() {
44
- return this.getAttribute('code-bundle') || '';
45
- }
46
- set codeBundle(v) {
47
- this.setAttribute('code-bundle', v);
48
- }
49
-
50
- get changelogNote() {
51
- return this.getAttribute('changelog-note') || 'Initial code package release';
52
- }
53
- set changelogNote(v) {
54
- this.setAttribute('changelog-note', v);
55
- }
56
-
57
- get sourcePlatform() {
58
- return this.getAttribute('source-platform') || '';
59
- }
60
- set sourcePlatform(v) {
61
- this.setAttribute('source-platform', v);
62
- }
63
-
64
- get loading() {
65
- return this.hasAttribute('loading');
66
- }
67
- set loading(v) {
68
- if (v) this.setAttribute('loading', '');
69
- else this.removeAttribute('loading');
70
- }
71
-
72
- render() {
73
- this.shadowRoot.innerHTML = `
74
- <style>
75
- @import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/tailwind.min.css');
76
- /* Custom inline styling fallbacks */
77
- :host {
78
- display: block;
79
- font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
80
- }
81
- .glass-form {
82
- padding: 2rem;
83
- border-radius: 1.5rem;
84
- background: rgba(15, 23, 42, 0.8);
85
- backdrop-filter: blur(16px);
86
- border: 1px solid rgba(30, 41, 59, 0.8);
87
- box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
88
- color: white;
89
- }
90
- .grid-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
91
- @media (min-width: 768px) { .grid-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
92
- .field-group { display: flex; flex-direction: column; gap: 0.5rem; }
93
- label {
94
- font-size: 0.75rem;
95
- font-weight: 600;
96
- color: #cbd5e1;
97
- text-transform: uppercase;
98
- letter-spacing: 0.05em;
99
- }
100
- input, select, textarea {
101
- width: 100%;
102
- padding: 0.625rem 1rem;
103
- background: rgba(3, 7, 18, 0.6);
104
- border: 1px solid #1e293b;
105
- border-radius: 0.75rem;
106
- font-size: 0.875rem;
107
- color: white;
108
- outline: none;
109
- }
110
- input:focus, select:focus, textarea:focus {
111
- border-color: #6366f1;
112
- }
113
- textarea {
114
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
115
- font-size: 0.75rem;
116
- color: #c7d2fe;
117
- line-height: 1.5;
118
- }
119
- .submit-btn {
120
- width: 100%;
121
- padding: 0.875rem;
122
- background: linear-gradient(to right, #6366f1, #a855f7, #ec4899);
123
- color: white;
124
- font-weight: bold;
125
- font-size: 0.875rem;
126
- border-radius: 0.75rem;
127
- border: none;
128
- cursor: pointer;
129
- display: flex;
130
- align-items: center;
131
- justify-content: center;
132
- gap: 0.5rem;
133
- box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.25);
134
- transition: opacity 0.2s;
135
- }
136
- .submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
137
- .animate-spin {
138
- animation: spin 1s linear infinite;
139
- }
140
- @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
141
- </style>
142
- <form class="glass-form">
143
- <div class="grid-layout">
144
- <div class="field-group">
145
- <label for="comp-type">UI Component Type *</label>
146
- <input id="comp-type" type="text" value="${this.componentTypeId}" placeholder="e.g. button, card" required />
147
- </div>
148
- <div class="field-group">
149
- <label for="aesthetic-id">Aesthetic Variant *</label>
150
- <input id="aesthetic-id" type="text" value="${this.aestheticId}" placeholder="e.g. glassmorphism" required />
151
- </div>
152
- <div class="field-group">
153
- <label for="source-plat">Source Language (Optional)</label>
154
- <select id="source-plat">
155
- <option value="" ${this.sourcePlatform === '' ? 'selected' : ''}>✨ Auto-Detect Language</option>
156
- <option value="svelte" ${this.sourcePlatform === 'svelte' ? 'selected' : ''}>Svelte Component (.svelte)</option>
157
- <option value="react" ${this.sourcePlatform === 'react' ? 'selected' : ''}>React Component (.tsx/.jsx)</option>
158
- <option value="webcomponent" ${this.sourcePlatform === 'webcomponent' ? 'selected' : ''}>WebComponent / Custom Element</option>
159
- </select>
160
- </div>
161
- <div class="field-group">
162
- <label for="change-note">Changelog Note</label>
163
- <input id="change-note" type="text" value="${this.changelogNote}" placeholder="Summary of changes..." />
164
- </div>
165
- </div>
166
- <div class="field-group" style="margin-top: 1.5rem;">
167
- <label for="code-bundle">Raw Encapsulated Code Bundle *</label>
168
- <textarea id="code-bundle" rows="10" required placeholder="Paste source code...">${this.codeBundle}</textarea>
169
- </div>
170
- <button type="submit" class="submit-btn" style="margin-top: 1.5rem;" ${this.loading ? 'disabled' : ''}>
171
- ${this.loading ? '<span>Ingesting Code Package & Synthesizing...</span>' : '<span>Ingest Code Package & Generate Variants</span>'}
172
- </button>
173
- </form>
174
- `;
175
-
176
- const form = this.shadowRoot.querySelector('form');
177
- form.addEventListener('submit', (e) => {
178
- e.preventDefault();
179
- this.componentTypeId = this.shadowRoot.getElementById('comp-type').value;
180
- this.aestheticId = this.shadowRoot.getElementById('aesthetic-id').value;
181
- this.sourcePlatform = this.shadowRoot.getElementById('source-plat').value;
182
- this.changelogNote = this.shadowRoot.getElementById('change-note').value;
183
- this.codeBundle = this.shadowRoot.getElementById('code-bundle').value;
184
- this.dispatchEvent(
185
- new CustomEvent('component-submit', {
186
- detail: {
187
- componentTypeId: this.componentTypeId,
188
- aestheticId: this.aestheticId,
189
- codeBundle: this.codeBundle
190
- }
191
- })
192
- );
193
- });
194
- }
195
- }
196
-
197
- if (
198
- typeof customElements !== 'undefined' &&
199
- !customElements.get('surreal-glassmorphism-input-group')
200
- ) {
201
- customElements.define('surreal-glassmorphism-input-group', GlassInputGroupElement);
202
- }
203
- export { GlassInputGroupElement as GlassmorphismInputGroup, GlassInputGroupElement };
204
-
205
- export default GlassInputGroupElement;
@@ -1,36 +0,0 @@
1
- class SurrealGlassmorphismMenubar extends HTMLElement {
2
- constructor() {
3
- super();
4
- this.attachShadow({ mode: 'open' });
5
- }
6
- static get observedAttributes() {
7
- return ['app-version', 'current-user'];
8
- }
9
- attributeChangedCallback() {
10
- this.render();
11
- }
12
- connectedCallback() {
13
- this.render();
14
- }
15
- render() {
16
- const appVersion = this.getAttribute('app-version') || '0.1.0';
17
- const currentUserStr = this.getAttribute('current-user');
18
- const currentUser = currentUserStr ? JSON.parse(currentUserStr) : null;
19
- this.shadowRoot.innerHTML = `<style>@import "https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/tailwind.min.css"; /* Add custom styles or use standard layout utilities */</style><header class="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"><div class="max-w-7xl mx-auto flex items-center justify-between gap-4"><a href="/" class="flex items-center gap-2.5 group"><div class="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"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 2v20m10-10H2"></path></svg></div><div><span class="text-xl font-bold text-white tracking-tight">Surreal UI</span><span class="ml-2 px-2 py-0.5 text-[10px] font-mono bg-indigo-500/20 text-indigo-300 border border-indigo-500/30 rounded-full">v${appVersion}</span></div></a><div class="flex items-center gap-2">${currentUser ? `<span class="text-xs text-indigo-300">${currentUser.email}</span><button id="sign-out" class="p-2 bg-slate-900 text-slate-400 rounded-lg">Sign Out</button>` : ''}</div></div></header>`;
20
- if (currentUser) {
21
- const btn = this.shadowRoot.getElementById('sign-out');
22
- if (btn) {
23
- btn.addEventListener('click', () => {
24
- this.dispatchEvent(new CustomEvent('signout'));
25
- });
26
- }
27
- }
28
- }
29
- }
30
-
31
- if (typeof customElements !== 'undefined' && !customElements.get('surreal-glassmorphism-menubar')) {
32
- customElements.define('surreal-glassmorphism-menubar', SurrealGlassmorphismMenubar);
33
- }
34
- export { SurrealGlassmorphismMenubar as GlassmorphismMenubar, SurrealGlassmorphismMenubar };
35
-
36
- export default SurrealGlassmorphismMenubar;