nest-scramble 1.4.6 → 1.4.7

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.
@@ -6,7 +6,9 @@ export declare class DocsController {
6
6
  private options;
7
7
  constructor(openApiSpec: any, options: NestScrambleOptions);
8
8
  getDocs(res: any): void;
9
- private getProfessionalCSS;
9
+ private getFuturisticCSS;
10
+ private getClassicCSS;
11
+ private getEasterEggScript;
10
12
  getOpenApiJson(res: any): void;
11
13
  getOpenApiJsonLegacy(res: any): void;
12
14
  getOpenApiSpec(): any;
@@ -1 +1 @@
1
- {"version":3,"file":"DocsController.d.ts","sourceRoot":"","sources":["../../src/controllers/DocsController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,eAAO,MAAM,aAAa,aAAa,CAAC;AACxC,eAAO,MAAM,MAAM,wDAAyC,CAAC;AAE7D,qBAEa,cAAc;IAEU,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,OAAO;gBADP,WAAW,EAAE,GAAG,EAChB,OAAO,EAAE,mBAAmB;IAIvE,OAAO,CAAQ,GAAG,EAAE,GAAG;IA+DvB,OAAO,CAAC,kBAAkB;IAsQ1B,cAAc,CAAQ,GAAG,EAAE,GAAG;IAa9B,oBAAoB,CAAQ,GAAG,EAAE,GAAG;IAKpC,cAAc;CAGf"}
1
+ {"version":3,"file":"DocsController.d.ts","sourceRoot":"","sources":["../../src/controllers/DocsController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,eAAO,MAAM,aAAa,aAAa,CAAC;AACxC,eAAO,MAAM,MAAM,wDAAyC,CAAC;AAE7D,qBAEa,cAAc;IAEU,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,OAAO;gBADP,WAAW,EAAE,GAAG,EAChB,OAAO,EAAE,mBAAmB;IAIvE,OAAO,CAAQ,GAAG,EAAE,GAAG;IAgCvB,OAAO,CAAC,gBAAgB;IAkRxB,OAAO,CAAC,aAAa;IA8CrB,OAAO,CAAC,kBAAkB;IAsB1B,cAAc,CAAQ,GAAG,EAAE,GAAG;IAa9B,oBAAoB,CAAQ,GAAG,EAAE,GAAG;IAKpC,cAAc;CAGf"}
@@ -24,6 +24,7 @@ let DocsController = class DocsController {
24
24
  this.options = options;
25
25
  }
26
26
  getDocs(res) {
27
+ const isFuturistic = this.options.theme === 'futuristic';
27
28
  const primaryColor = this.options.primaryColor || '#00f2ff';
28
29
  const customIcon = this.options.customDomainIcon || '';
29
30
  const html = `<!DOCTYPE html>
@@ -34,314 +35,361 @@ let DocsController = class DocsController {
34
35
  <meta name="viewport" content="width=device-width, initial-scale=1" />
35
36
  <link rel="preconnect" href="https://fonts.googleapis.com">
36
37
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
37
- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap" rel="stylesheet">
38
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
38
39
  ${customIcon ? `<link rel="icon" href="${customIcon}" type="image/x-icon">` : ''}
39
- <style>${this.getProfessionalCSS(primaryColor)}</style>
40
+ <style>
41
+ ${isFuturistic ? this.getFuturisticCSS(primaryColor) : this.getClassicCSS(primaryColor)}
42
+ </style>
40
43
  </head>
41
44
  <body>
42
- <div id="api-reference"></div>
45
+ <script id="api-reference" data-url="/docs-json"></script>
43
46
  <script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
44
47
  <script>
45
- console.log('%cšŸš€ Nest-Scramble by Mohamed Mustafa', 'color: #00f2ff; font-weight: bold; font-size: 16px;');
46
-
47
- fetch('/docs-json')
48
- .then(res => {
49
- if (!res.ok) throw new Error('HTTP ' + res.status);
50
- return res.json();
51
- })
52
- .then(spec => {
53
- console.log('%cāœ… Spec Loaded:', 'color: #10B981; font-weight: bold;', Object.keys(spec.paths || {}).length, 'endpoints');
54
-
55
- if (!spec.paths || Object.keys(spec.paths).length === 0) {
56
- throw new Error('No endpoints found in OpenAPI spec');
57
- }
58
-
59
- const config = {
60
- spec: { content: spec },
61
- darkMode: true,
62
- layout: 'modern',
63
- showSidebar: true,
64
- hideModels: false,
65
- defaultOpenAllTags: true,
66
- searchHotKey: 'k'
67
- };
68
-
69
- const container = document.getElementById('api-reference');
70
- if (container && window.ScalarApiReference) {
71
- window.ScalarApiReference.mount(container, config);
72
- console.log('%cāœ… Dashboard Ready', 'color: #00f2ff; font-weight: bold;');
73
- }
74
- })
75
- .catch(err => {
76
- console.error('%cāŒ Error:', 'color: #EF4444; font-weight: bold;', err);
77
- document.getElementById('api-reference').innerHTML =
78
- '<div style="display:flex;align-items:center;justify-content:center;height:100vh;background:#0a0a0a;color:#fff;font-family:Inter,sans-serif"><div style="text-align:center;padding:40px"><h1 style="font-size:64px;margin:0">āš ļø</h1><h2 style="margin:20px 0;color:#00f2ff">Failed to Load</h2><p style="color:#999;margin:20px 0">' + err.message + '</p><button onclick="location.reload()" style="padding:12px 32px;background:#00f2ff;border:none;border-radius:8px;color:#000;font-weight:600;cursor:pointer;font-size:14px">Retry</button></div></div>';
79
- });
48
+ ${this.getEasterEggScript()}
80
49
  </script>
81
50
  </body>
82
51
  </html>`;
83
52
  res.setHeader('Content-Type', 'text/html; charset=utf-8');
84
53
  res.send(html);
85
54
  }
86
- getProfessionalCSS(primaryColor) {
55
+ getFuturisticCSS(primaryColor) {
87
56
  return `
88
- /* šŸŽØ Professional Three-Column Dashboard by Mohamed Mustafa */
89
- * { margin: 0; padding: 0; box-sizing: border-box; }
90
-
57
+ /* šŸš€ Futuristic Theme by Mohamed Mustafa - Deep Space Edition */
91
58
  :root {
92
- --primary: ${primaryColor};
93
- --bg-dark: #0a0a0a;
94
- --bg-card: #141414;
95
- --border: #2a2a2a;
96
- --text: #ffffff;
97
- --text-dim: #999999;
98
- --green: #10B981;
99
- --blue: #3B82F6;
100
- --orange: #F59E0B;
101
- --purple: #8B5CF6;
102
- --red: #EF4444;
59
+ --primary-cyber: ${primaryColor};
60
+ --primary-glow: ${primaryColor}80;
61
+ --purple-electric: #a855f7;
62
+ --deep-space: #050505;
63
+ --space-dark: #0a0a0a;
64
+ --space-card: #111111;
65
+ --space-border: #1a1a1a;
66
+ --text-primary: #ffffff;
67
+ --text-secondary: #a0a0a0;
68
+ --glow-shadow: 0 0 20px ${primaryColor}40, 0 0 40px ${primaryColor}20;
103
69
  }
104
-
70
+
71
+ * {
72
+ font-family: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
73
+ }
74
+
105
75
  body {
106
- font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
107
- background: var(--bg-dark);
108
- color: var(--text);
109
- line-height: 1.6;
76
+ margin: 0;
77
+ padding: 0;
78
+ background: var(--deep-space) !important;
79
+ color: var(--text-primary) !important;
80
+ overflow-x: hidden;
110
81
  }
111
-
112
- /* Sidebar - Fixed Navigation */
113
- aside, nav, [class*="sidebar"] {
114
- position: fixed !important;
82
+
83
+ /* Animated Background Grid */
84
+ body::before {
85
+ content: '';
86
+ position: fixed;
87
+ top: 0;
115
88
  left: 0;
89
+ width: 100%;
90
+ height: 100%;
91
+ background-image:
92
+ linear-gradient(var(--space-border) 1px, transparent 1px),
93
+ linear-gradient(90deg, var(--space-border) 1px, transparent 1px);
94
+ background-size: 50px 50px;
95
+ opacity: 0.3;
96
+ z-index: 0;
97
+ pointer-events: none;
98
+ animation: gridPulse 10s ease-in-out infinite;
99
+ }
100
+
101
+ @keyframes gridPulse {
102
+ 0%, 100% { opacity: 0.2; }
103
+ 50% { opacity: 0.4; }
104
+ }
105
+
106
+ /* Glassmorphism Cards */
107
+ .scalar-card,
108
+ [class*="card"],
109
+ [class*="panel"],
110
+ [class*="sidebar"] {
111
+ background: rgba(17, 17, 17, 0.6) !important;
112
+ backdrop-filter: blur(20px) !important;
113
+ -webkit-backdrop-filter: blur(20px) !important;
114
+ border: 1px solid rgba(255, 255, 255, 0.1) !important;
115
+ border-radius: 16px !important;
116
+ box-shadow:
117
+ 0 8px 32px rgba(0, 0, 0, 0.4),
118
+ inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
119
+ }
120
+
121
+ /* Cyber Buttons & Active States */
122
+ button,
123
+ [role="button"],
124
+ .button,
125
+ a[class*="button"] {
126
+ background: linear-gradient(135deg, var(--primary-cyber), var(--purple-electric)) !important;
127
+ border: none !important;
128
+ border-radius: 12px !important;
129
+ padding: 10px 20px !important;
130
+ color: white !important;
131
+ font-weight: 600 !important;
132
+ letter-spacing: 0.5px !important;
133
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
134
+ position: relative !important;
135
+ overflow: hidden !important;
136
+ }
137
+
138
+ button:hover,
139
+ [role="button"]:hover,
140
+ .button:hover {
141
+ transform: translateY(-2px) !important;
142
+ box-shadow: var(--glow-shadow) !important;
143
+ }
144
+
145
+ button::before {
146
+ content: '';
147
+ position: absolute;
116
148
  top: 0;
117
- width: 280px !important;
118
- height: 100vh;
119
- background: var(--bg-card) !important;
120
- border-right: 1px solid var(--border) !important;
121
- overflow-y: auto;
122
- z-index: 1000;
123
- padding: 0 !important;
149
+ left: -100%;
150
+ width: 100%;
151
+ height: 100%;
152
+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
153
+ transition: left 0.5s;
124
154
  }
125
-
126
- /* Sidebar Header */
127
- aside::before, [class*="sidebar"]::before {
128
- content: 'šŸ‘Øā€šŸ’» API Dashboard';
129
- display: block;
130
- padding: 24px 20px;
131
- font-size: 16px;
132
- font-weight: 700;
133
- color: var(--primary);
134
- border-bottom: 1px solid var(--border);
155
+
156
+ button:hover::before {
157
+ left: 100%;
135
158
  }
136
-
137
- /* Sidebar Links */
138
- aside a, [class*="sidebar"] a,
139
- aside button, [class*="sidebar"] button {
140
- display: block !important;
159
+
160
+ /* Search Bar - Spotlight Style */
161
+ input[type="search"],
162
+ input[type="text"],
163
+ [class*="search"] input {
164
+ background: rgba(17, 17, 17, 0.8) !important;
165
+ border: 2px solid rgba(255, 255, 255, 0.1) !important;
166
+ border-radius: 12px !important;
141
167
  padding: 12px 20px !important;
142
- color: var(--text-dim) !important;
143
- text-decoration: none !important;
168
+ color: var(--text-primary) !important;
144
169
  font-size: 14px !important;
145
- font-weight: 500 !important;
146
- border-left: 3px solid transparent !important;
147
- transition: all 0.2s !important;
170
+ transition: all 0.3s ease !important;
148
171
  }
149
-
150
- aside a:hover, [class*="sidebar"] a:hover {
151
- background: rgba(255,255,255,0.05) !important;
152
- color: var(--text) !important;
153
- border-left-color: var(--primary) !important;
154
- }
155
-
156
- aside a.active, [class*="sidebar"] a.active,
157
- [aria-selected="true"], [aria-current="page"] {
158
- background: rgba(0,242,255,0.1) !important;
159
- color: var(--primary) !important;
160
- border-left-color: var(--primary) !important;
161
- font-weight: 600 !important;
172
+
173
+ input[type="search"]:focus,
174
+ input[type="text"]:focus,
175
+ [class*="search"] input:focus {
176
+ border-color: var(--primary-cyber) !important;
177
+ box-shadow: 0 0 0 3px var(--primary-glow) !important;
178
+ outline: none !important;
162
179
  }
163
-
164
- /* Main Content Area */
165
- main, [class*="content"] {
166
- margin-left: 280px !important;
167
- padding: 40px !important;
168
- min-height: 100vh;
180
+
181
+ /* Code Blocks - Night Owl Theme */
182
+ pre,
183
+ code,
184
+ [class*="code"],
185
+ .hljs {
186
+ background: #011627 !important;
187
+ border: 1px solid rgba(0, 242, 255, 0.2) !important;
188
+ border-radius: 12px !important;
189
+ padding: 16px !important;
190
+ font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace !important;
191
+ font-size: 13px !important;
192
+ line-height: 1.6 !important;
193
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
169
194
  }
170
-
171
- /* Three-Column Grid Layout */
172
- [class*="endpoint"], article {
173
- display: grid !important;
174
- grid-template-columns: 1fr 1fr 1fr !important;
175
- gap: 24px !important;
176
- max-width: 1600px;
177
- margin: 0 auto;
195
+
196
+ code {
197
+ color: #82AAFF !important;
178
198
  }
179
-
180
- /* Column 1: Info & Parameters */
181
- [class*="description"], [class*="parameters"] {
182
- background: var(--bg-card);
183
- border: 1px solid var(--border);
184
- border-radius: 12px;
185
- padding: 24px;
199
+
200
+ /* Sidebar Glassmorphism */
201
+ [class*="sidebar"],
202
+ nav,
203
+ aside {
204
+ background: rgba(10, 10, 10, 0.7) !important;
205
+ backdrop-filter: blur(30px) !important;
206
+ border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
186
207
  }
187
-
188
- /* Column 2: Request Body Editor */
189
- [class*="request"], [class*="body"], [class*="editor"] {
190
- background: var(--bg-card);
191
- border: 1px solid var(--border);
192
- border-radius: 12px;
193
- padding: 24px;
208
+
209
+ /* Custom Branding Badge */
210
+ body::after {
211
+ content: '✨ Powered by Nest-Scramble';
212
+ position: fixed;
213
+ bottom: 20px;
214
+ right: 20px;
215
+ background: linear-gradient(135deg, var(--primary-cyber), var(--purple-electric));
216
+ padding: 8px 16px;
217
+ border-radius: 20px;
218
+ font-size: 11px;
219
+ font-weight: 600;
220
+ letter-spacing: 0.5px;
221
+ box-shadow: var(--glow-shadow);
222
+ z-index: 9999;
223
+ animation: badgePulse 3s ease-in-out infinite;
224
+ cursor: pointer;
194
225
  }
195
-
196
- /* Column 3: Test Panel & Response */
197
- [class*="test"], [class*="try"], [class*="playground"] {
198
- background: var(--bg-card);
199
- border: 1px solid var(--primary);
200
- border-radius: 12px;
201
- padding: 24px;
202
- box-shadow: 0 0 20px rgba(0,242,255,0.1);
226
+
227
+ @keyframes badgePulse {
228
+ 0%, 100% {
229
+ box-shadow: 0 0 20px ${primaryColor}40, 0 0 40px ${primaryColor}20;
230
+ }
231
+ 50% {
232
+ box-shadow: 0 0 30px ${primaryColor}60, 0 0 60px ${primaryColor}30;
233
+ }
203
234
  }
204
-
205
- /* HTTP Method Badges */
206
- [data-method="get"], [class*="method-get"] {
207
- background: var(--blue) !important;
208
- color: #fff !important;
209
- padding: 6px 16px !important;
210
- border-radius: 6px !important;
211
- font-weight: 700 !important;
212
- font-size: 12px !important;
213
- text-transform: uppercase !important;
235
+
236
+ /* Scrollbar Styling */
237
+ ::-webkit-scrollbar {
238
+ width: 10px;
239
+ height: 10px;
214
240
  }
215
-
216
- [data-method="post"], [class*="method-post"] {
217
- background: var(--green) !important;
218
- color: #fff !important;
219
- padding: 6px 16px !important;
220
- border-radius: 6px !important;
221
- font-weight: 700 !important;
222
- font-size: 12px !important;
223
- text-transform: uppercase !important;
241
+
242
+ ::-webkit-scrollbar-track {
243
+ background: var(--space-dark);
224
244
  }
225
-
226
- [data-method="put"], [class*="method-put"] {
227
- background: var(--orange) !important;
228
- color: #fff !important;
229
- padding: 6px 16px !important;
230
- border-radius: 6px !important;
231
- font-weight: 700 !important;
232
- font-size: 12px !important;
233
- text-transform: uppercase !important;
245
+
246
+ ::-webkit-scrollbar-thumb {
247
+ background: linear-gradient(180deg, var(--primary-cyber), var(--purple-electric));
248
+ border-radius: 10px;
234
249
  }
235
-
236
- [data-method="patch"], [class*="method-patch"] {
237
- background: var(--purple) !important;
238
- color: #fff !important;
239
- padding: 6px 16px !important;
240
- border-radius: 6px !important;
241
- font-weight: 700 !important;
242
- font-size: 12px !important;
243
- text-transform: uppercase !important;
250
+
251
+ ::-webkit-scrollbar-thumb:hover {
252
+ background: var(--primary-cyber);
244
253
  }
245
-
246
- [data-method="delete"], [class*="method-delete"] {
247
- background: var(--red) !important;
248
- color: #fff !important;
249
- padding: 6px 16px !important;
250
- border-radius: 6px !important;
254
+
255
+ /* Headers with Gradient */
256
+ h1, h2, h3, h4, h5, h6 {
257
+ background: linear-gradient(135deg, var(--primary-cyber), var(--purple-electric));
258
+ -webkit-background-clip: text;
259
+ -webkit-text-fill-color: transparent;
260
+ background-clip: text;
251
261
  font-weight: 700 !important;
252
- font-size: 12px !important;
253
- text-transform: uppercase !important;
254
262
  }
255
-
256
- /* Send Button */
257
- button[class*="send"], button[class*="execute"] {
258
- width: 100% !important;
259
- padding: 14px 24px !important;
260
- background: var(--primary) !important;
261
- color: #000 !important;
262
- border: none !important;
263
- border-radius: 8px !important;
264
- font-weight: 700 !important;
265
- font-size: 14px !important;
266
- cursor: pointer !important;
267
- transition: all 0.2s !important;
263
+
264
+ /* Links */
265
+ a {
266
+ color: var(--primary-cyber) !important;
267
+ text-decoration: none !important;
268
+ transition: all 0.3s ease !important;
268
269
  }
269
-
270
- button[class*="send"]:hover {
271
- transform: translateY(-2px) !important;
272
- box-shadow: 0 8px 20px rgba(0,242,255,0.3) !important;
270
+
271
+ a:hover {
272
+ color: var(--purple-electric) !important;
273
+ text-shadow: 0 0 10px var(--primary-glow) !important;
273
274
  }
274
-
275
- /* Response Terminal */
276
- [class*="response"], [class*="output"] {
277
- background: #000 !important;
278
- border: 1px solid var(--primary) !important;
275
+
276
+ /* Method Badges */
277
+ [class*="method"],
278
+ [class*="badge"] {
279
279
  border-radius: 8px !important;
280
- padding: 20px !important;
281
- font-family: 'JetBrains Mono', monospace !important;
282
- color: #00ff00 !important;
283
- font-size: 13px !important;
284
- max-height: 400px;
285
- overflow-y: auto;
280
+ padding: 4px 12px !important;
281
+ font-weight: 600 !important;
282
+ font-size: 11px !important;
283
+ letter-spacing: 0.5px !important;
286
284
  }
287
-
288
- /* Typography */
289
- h1 { font-size: 28px; font-weight: 800; margin-bottom: 16px; }
290
- h2 { font-size: 20px; font-weight: 700; margin: 24px 0 12px; }
291
- h3 { font-size: 16px; font-weight: 600; margin: 16px 0 8px; }
292
- p { color: var(--text-dim); line-height: 1.7; }
293
-
294
- /* Tables */
295
- table { width: 100%; border-collapse: collapse; margin: 16px 0; }
296
- th { text-align: left; padding: 12px; background: var(--bg-dark); font-weight: 600; font-size: 12px; text-transform: uppercase; color: var(--text-dim); }
297
- td { padding: 12px; border-top: 1px solid var(--border); }
298
-
299
- /* Inputs */
300
- input, textarea, select {
301
- width: 100%;
302
- background: var(--bg-dark);
303
- border: 1px solid var(--border);
304
- border-radius: 6px;
305
- padding: 10px 14px;
306
- color: var(--text);
307
- font-size: 14px;
285
+
286
+ /* Response Status Colors */
287
+ [class*="status-200"],
288
+ [class*="success"] {
289
+ background: linear-gradient(135deg, #10b981, #059669) !important;
290
+ color: white !important;
308
291
  }
309
-
310
- input:focus, textarea:focus {
311
- outline: none;
312
- border-color: var(--primary);
313
- box-shadow: 0 0 0 3px rgba(0,242,255,0.1);
292
+
293
+ [class*="status-400"],
294
+ [class*="error"] {
295
+ background: linear-gradient(135deg, #ef4444, #dc2626) !important;
296
+ color: white !important;
314
297
  }
315
-
316
- /* Scrollbar */
317
- ::-webkit-scrollbar { width: 8px; height: 8px; }
318
- ::-webkit-scrollbar-track { background: var(--bg-dark); }
319
- ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
320
- ::-webkit-scrollbar-thumb:hover { background: var(--primary); }
321
-
322
- /* Branding */
323
- body::after {
324
- content: '✨ Powered by Nest-Scramble';
298
+
299
+ /* Smooth Transitions */
300
+ * {
301
+ transition: background 0.3s ease, border 0.3s ease, box-shadow 0.3s ease !important;
302
+ }
303
+
304
+ /* Theme Toggle Button */
305
+ .theme-toggle {
325
306
  position: fixed;
326
- bottom: 20px;
307
+ top: 20px;
327
308
  right: 20px;
309
+ background: rgba(17, 17, 17, 0.8) !important;
310
+ backdrop-filter: blur(10px);
311
+ border: 1px solid rgba(255, 255, 255, 0.1);
312
+ border-radius: 12px;
328
313
  padding: 8px 16px;
329
- background: linear-gradient(135deg, var(--primary), var(--purple));
330
- border-radius: 8px;
331
- font-size: 11px;
314
+ color: var(--text-primary);
315
+ font-size: 12px;
332
316
  font-weight: 600;
333
- z-index: 9999;
334
- box-shadow: 0 4px 12px rgba(0,0,0,0.5);
317
+ cursor: pointer;
318
+ z-index: 9998;
319
+ transition: all 0.3s ease;
335
320
  }
336
-
337
- /* Responsive */
338
- @media (max-width: 1200px) {
339
- [class*="endpoint"], article {
340
- grid-template-columns: 1fr !important;
341
- }
321
+
322
+ .theme-toggle:hover {
323
+ border-color: var(--primary-cyber);
324
+ box-shadow: 0 0 15px var(--primary-glow);
342
325
  }
343
326
  `;
344
327
  }
328
+ getClassicCSS(primaryColor) {
329
+ return `
330
+ /* Classic Theme */
331
+ body {
332
+ margin: 0;
333
+ padding: 0;
334
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
335
+ background: #ffffff;
336
+ color: #1a1a1a;
337
+ }
338
+
339
+ button,
340
+ [role="button"] {
341
+ background: ${primaryColor} !important;
342
+ color: white !important;
343
+ border: none !important;
344
+ border-radius: 8px !important;
345
+ padding: 10px 20px !important;
346
+ font-weight: 600 !important;
347
+ transition: all 0.3s ease !important;
348
+ }
349
+
350
+ button:hover {
351
+ opacity: 0.9 !important;
352
+ transform: translateY(-1px) !important;
353
+ }
354
+
355
+ input[type="search"],
356
+ input[type="text"] {
357
+ border: 2px solid #e5e5e5 !important;
358
+ border-radius: 8px !important;
359
+ padding: 10px 16px !important;
360
+ transition: all 0.3s ease !important;
361
+ }
362
+
363
+ input:focus {
364
+ border-color: ${primaryColor} !important;
365
+ outline: none !important;
366
+ }
367
+
368
+ a {
369
+ color: ${primaryColor} !important;
370
+ }
371
+ `;
372
+ }
373
+ getEasterEggScript() {
374
+ return `
375
+ // Easter Egg Console Message
376
+ console.log('%c✨ Engineered with passion by Mohamed Mustafa', 'color: #00f2ff; font-size: 16px; font-weight: bold; text-shadow: 0 0 10px #00f2ff;');
377
+ console.log('%cNest-Scramble is active.', 'color: #a855f7; font-size: 14px; font-weight: 600;');
378
+ console.log('%cšŸš€ GitHub: https://github.com/Eng-MMustafa/nest-scramble', 'color: #ffffff; font-size: 12px;');
379
+
380
+ // Theme Toggle Functionality
381
+ const themeToggle = document.createElement('div');
382
+ themeToggle.className = 'theme-toggle';
383
+ themeToggle.textContent = 'šŸŽØ Theme';
384
+ themeToggle.onclick = () => {
385
+ const currentTheme = localStorage.getItem('nest-scramble-theme') || 'futuristic';
386
+ const newTheme = currentTheme === 'futuristic' ? 'classic' : 'futuristic';
387
+ localStorage.setItem('nest-scramble-theme', newTheme);
388
+ window.location.reload();
389
+ };
390
+ document.body.appendChild(themeToggle);
391
+ `;
392
+ }
345
393
  getOpenApiJson(res) {
346
394
  try {
347
395
  const jsonString = JSON.stringify(this.openApiSpec, null, 2);
@@ -1 +1 @@
1
- {"version":3,"file":"DocsController.js","sourceRoot":"","sources":["../../src/controllers/DocsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kEAAkE;AAClE,2CAA2E;AAG9D,QAAA,aAAa,GAAG,UAAU,CAAC;AACjC,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,IAAA,oBAAW,EAAC,qBAAa,EAAE,IAAI,CAAC,CAAC;AAAhD,QAAA,MAAM,UAA0C;AAItD,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,YAC2C,WAAgB,EAChB,OAA4B;QAD5B,gBAAW,GAAX,WAAW,CAAK;QAChB,YAAO,GAAP,OAAO,CAAqB;IACpE,CAAC;IAGJ,OAAO,CAAQ,GAAQ;QACrB,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,SAAS,CAAC;QAC5D,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,IAAI,EAAE,CAAC;QAEvD,MAAM,IAAI,GAAG;;;WAGN,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,mBAAmB;;;;;;IAMnD,UAAU,CAAC,CAAC,CAAC,0BAA0B,UAAU,wBAAwB,CAAC,CAAC,CAAC,EAAE;WACvE,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA2CxC,CAAC;QAEL,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,0BAA0B,CAAC,CAAC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AAC;YAC7D,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,iCAAiC,CAAC,CAAC;YACjE,GAAG,CAAC,SAAS,CAAC,6BAA6B,EAAE,GAAG,CAAC,CAAC;YAClD,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACvB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,iDAAiD,EAAE,KAAK,CAAC,CAAC;YACxE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,0CAA0C,EAAE,CAAC,CAAC;QAC9E,CAAC;IACH,CAAC;IAGD,oBAAoB,CAAQ,GAAQ;QAClC,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IAClC,CAAC;IAGD,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;CACF,CAAA;AAlZY,wCAAc;AAOzB;IADC,IAAA,YAAG,EAAC,MAAM,CAAC;IACH,WAAA,IAAA,YAAG,GAAE,CAAA;;;;6CA8Bb;AAwVD;IADC,IAAA,YAAG,EAAC,WAAW,CAAC;IACD,WAAA,IAAA,YAAG,GAAE,CAAA;;;;oDAUpB;AAGD;IADC,IAAA,YAAG,EAAC,WAAW,CAAC;IACK,WAAA,IAAA,YAAG,GAAE,CAAA;;;;0DAE1B;AAGD;IADC,IAAA,YAAG,EAAC,WAAW,CAAC;;;;oDAGhB;yBAjZU,cAAc;IAF1B,IAAA,mBAAU,GAAE;IACZ,IAAA,cAAM,GAAE;IAGJ,WAAA,IAAA,eAAM,EAAC,uBAAuB,CAAC,CAAA;IAC/B,WAAA,IAAA,eAAM,EAAC,uBAAuB,CAAC,CAAA;;GAHvB,cAAc,CAkZ1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nest-scramble",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "description": "A next-generation, decorator-free API documentation engine and intelligent mock server for NestJS, engineered by Mohamed Mustafa",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",