@donotdev/ui 0.0.2 → 0.0.4
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/dist/components/auth/AuthMenu.d.ts.map +1 -1
- package/dist/components/auth/AuthMenu.js +19 -32
- package/dist/components/common/FeatureCard.d.ts +7 -19
- package/dist/components/common/FeatureCard.d.ts.map +1 -1
- package/dist/components/common/FeatureCard.js +5 -29
- package/dist/components/common/TechBento.d.ts +15 -3
- package/dist/components/common/TechBento.d.ts.map +1 -1
- package/dist/components/common/TechBento.js +20 -2
- package/dist/components/cookie-consent/CookieConsent.d.ts.map +1 -1
- package/dist/components/cookie-consent/CookieConsent.js +2 -41
- package/dist/components/cookie-consent/index.d.ts +0 -1
- package/dist/components/cookie-consent/index.d.ts.map +1 -1
- package/dist/components/cookie-consent/index.js +1 -1
- package/dist/components/layout/components/DropdownNavigation.d.ts.map +1 -1
- package/dist/components/layout/components/header/ThemeToggle.d.ts +1 -1
- package/dist/components/layout/components/header/ThemeToggle.d.ts.map +1 -1
- package/dist/components/layout/components/header/ThemeToggle.js +5 -4
- package/dist/dndev.css +373 -249
- package/dist/index.js +4 -4
- package/dist/internal/devtools/DebugTools.d.ts.map +1 -1
- package/dist/internal/devtools/DebugTools.js +8 -4
- package/dist/internal/devtools/components/ConfigTab.d.ts.map +1 -1
- package/dist/internal/devtools/components/ConfigTab.js +33 -133
- package/dist/internal/devtools/components/DebugDialog.d.ts.map +1 -1
- package/dist/internal/devtools/components/DebugDialog.js +11 -520
- package/dist/internal/devtools/components/DesignTab.d.ts +2 -0
- package/dist/internal/devtools/components/DesignTab.d.ts.map +1 -0
- package/dist/internal/devtools/components/DesignTab.js +431 -0
- package/dist/internal/devtools/components/StoresTab.d.ts.map +1 -1
- package/dist/internal/devtools/components/StoresTab.js +54 -102
- package/dist/internal/devtools/components/index.d.ts +1 -6
- package/dist/internal/devtools/components/index.d.ts.map +1 -1
- package/dist/internal/devtools/components/index.js +1 -6
- package/dist/internal/devtools/utils/index.d.ts +0 -1
- package/dist/internal/devtools/utils/index.d.ts.map +1 -1
- package/dist/internal/devtools/utils/index.js +0 -1
- package/dist/internal/initializers/BaseStoresInitializer.d.ts.map +1 -1
- package/dist/internal/initializers/BaseStoresInitializer.js +36 -59
- package/dist/internal/layout/DnDevLayout.js +3 -3
- package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
- package/dist/internal/layout/components/AutoMetaTags.js +6 -1
- package/dist/internal/layout/components/footer/FooterBranding.d.ts.map +1 -1
- package/dist/internal/layout/components/footer/FooterBranding.js +3 -1
- package/dist/internal/layout/zones/DnDevFooter.js +2 -2
- package/dist/routing/AuthGuard.d.ts +14 -10
- package/dist/routing/AuthGuard.d.ts.map +1 -1
- package/dist/routing/AuthGuard.js +25 -22
- package/dist/routing/Link.d.ts +2 -2
- package/dist/routing/Link.js +2 -2
- package/dist/routing/hooks/hooks.next.js +1 -1
- package/dist/routing/hooks/hooks.vite.js +1 -1
- package/dist/routing/hooks/useRedirectGuard.next.d.ts +2 -36
- package/dist/routing/hooks/useRedirectGuard.next.d.ts.map +1 -1
- package/dist/routing/hooks/useRedirectGuard.next.js +14 -55
- package/dist/routing/hooks/useRedirectGuard.vite.d.ts +2 -36
- package/dist/routing/hooks/useRedirectGuard.vite.d.ts.map +1 -1
- package/dist/routing/hooks/useRedirectGuard.vite.js +14 -55
- package/dist/routing/index.d.ts +0 -1
- package/dist/routing/index.d.ts.map +1 -1
- package/dist/routing/index.js +1 -1
- package/dist/styles/index.css +373 -249
- package/dist/utils/assetResolver.d.ts +5 -5
- package/dist/utils/assetResolver.d.ts.map +1 -1
- package/dist/utils/assetResolver.js +26 -15
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/tList.d.ts +30 -0
- package/dist/utils/tList.d.ts.map +1 -0
- package/dist/utils/tList.js +51 -0
- package/dist/utils/useAuthSafe.d.ts +25 -12
- package/dist/utils/useAuthSafe.d.ts.map +1 -1
- package/dist/utils/useAuthSafe.js +3 -1
- package/dist/utils/useAuthVisibility.d.ts +3 -3
- package/dist/utils/useAuthVisibility.d.ts.map +1 -1
- package/dist/utils/useAuthVisibility.js +25 -21
- package/dist/utils/useBillingVisibility.d.ts +2 -2
- package/dist/utils/useBillingVisibility.d.ts.map +1 -1
- package/dist/utils/useBillingVisibility.js +12 -13
- package/dist/utils/useCrudSafe.d.ts +1 -1
- package/dist/utils/useCrudSafe.d.ts.map +1 -1
- package/dist/utils/useCrudSafe.js +26 -13
- package/dist/utils/useOAuthSafe.d.ts +25 -12
- package/dist/utils/useOAuthSafe.d.ts.map +1 -1
- package/dist/utils/useStripeBillingSafe.d.ts +30 -18
- package/dist/utils/useStripeBillingSafe.d.ts.map +1 -1
- package/dist/utils/useStripeBillingSafe.js +5 -6
- package/dist/vite-routing/AppRoutes.d.ts.map +1 -1
- package/dist/vite-routing/AppRoutes.js +5 -5
- package/dist/vite-routing/RootLayout.d.ts.map +1 -1
- package/dist/vite-routing/RootLayout.js +34 -7
- package/package.json +9 -9
- package/dist/internal/devtools/components/AuthTab.d.ts +0 -2
- package/dist/internal/devtools/components/AuthTab.d.ts.map +0 -1
- package/dist/internal/devtools/components/AuthTab.js +0 -98
- package/dist/internal/devtools/components/ColorRatioTab.d.ts +0 -2
- package/dist/internal/devtools/components/ColorRatioTab.d.ts.map +0 -1
- package/dist/internal/devtools/components/ColorRatioTab.js +0 -322
- package/dist/internal/devtools/components/DebugToggle.d.ts +0 -2
- package/dist/internal/devtools/components/DebugToggle.d.ts.map +0 -1
- package/dist/internal/devtools/components/DebugToggle.js +0 -57
- package/dist/internal/devtools/components/EnvironmentTab.d.ts +0 -2
- package/dist/internal/devtools/components/EnvironmentTab.d.ts.map +0 -1
- package/dist/internal/devtools/components/EnvironmentTab.js +0 -26
- package/dist/internal/devtools/components/I18nTab.d.ts +0 -2
- package/dist/internal/devtools/components/I18nTab.d.ts.map +0 -1
- package/dist/internal/devtools/components/I18nTab.js +0 -76
- package/dist/internal/devtools/components/OAuthGuideButton.d.ts +0 -10
- package/dist/internal/devtools/components/OAuthGuideButton.d.ts.map +0 -1
- package/dist/internal/devtools/components/OAuthGuideButton.js +0 -71
- package/dist/internal/devtools/components/StripeDebugTab.d.ts +0 -2
- package/dist/internal/devtools/components/StripeDebugTab.d.ts.map +0 -1
- package/dist/internal/devtools/components/StripeDebugTab.js +0 -175
- package/dist/internal/devtools/components/ThemesTab.d.ts +0 -2
- package/dist/internal/devtools/components/ThemesTab.d.ts.map +0 -1
- package/dist/internal/devtools/components/ThemesTab.js +0 -77
- package/dist/internal/devtools/utils/spacingAnalyzer.d.ts +0 -15
- package/dist/internal/devtools/utils/spacingAnalyzer.d.ts.map +0 -1
- package/dist/internal/devtools/utils/spacingAnalyzer.js +0 -88
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
// packages/ui/src/internal/devtools/components/ColorRatioTab.tsx
|
|
4
|
-
/**
|
|
5
|
-
* @fileoverview Color Ratio Tab Component
|
|
6
|
-
* @description 60/30/10 color ratio checker with copy/paste functionality
|
|
7
|
-
*
|
|
8
|
-
* @version 0.0.1
|
|
9
|
-
* @since 0.0.1
|
|
10
|
-
* @author AMBROISE PARK Consulting
|
|
11
|
-
*/
|
|
12
|
-
import { Palette } from 'lucide-react';
|
|
13
|
-
import { useState } from 'react';
|
|
14
|
-
import { Card, Button, BUTTON_VARIANT, Stack, Label, CopyToClipboard, Alert, ALERT_VARIANT, toast, ScrollArea, } from '@donotdev/components';
|
|
15
|
-
export const ColorRatioTab = () => {
|
|
16
|
-
const [colorRatio, setColorRatio] = useState(null);
|
|
17
|
-
const [isAnalyzing, setIsAnalyzing] = useState(false);
|
|
18
|
-
const checkColorRatio = () => {
|
|
19
|
-
setIsAnalyzing(true);
|
|
20
|
-
try {
|
|
21
|
-
const elements = document.querySelectorAll('*');
|
|
22
|
-
const colorMap = new Map();
|
|
23
|
-
elements.forEach((el) => {
|
|
24
|
-
const style = getComputedStyle(el);
|
|
25
|
-
const bg = style.backgroundColor;
|
|
26
|
-
const rect = el.getBoundingClientRect();
|
|
27
|
-
const area = rect.width * rect.height;
|
|
28
|
-
if (bg &&
|
|
29
|
-
bg !== 'rgba(0, 0, 0, 0)' &&
|
|
30
|
-
bg !== 'transparent' &&
|
|
31
|
-
area > 0) {
|
|
32
|
-
const existing = colorMap.get(bg) || { count: 0, area: 0 };
|
|
33
|
-
colorMap.set(bg, {
|
|
34
|
-
count: existing.count + 1,
|
|
35
|
-
area: existing.area + area,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
const rootStyles = getComputedStyle(document.documentElement);
|
|
40
|
-
const getComputedColor = (varName) => {
|
|
41
|
-
const testEl = document.createElement('div');
|
|
42
|
-
testEl.style.setProperty('background-color', `var(${varName})`);
|
|
43
|
-
testEl.style.position = 'absolute';
|
|
44
|
-
testEl.style.visibility = 'hidden';
|
|
45
|
-
document.body.appendChild(testEl);
|
|
46
|
-
const computed = getComputedStyle(testEl).backgroundColor;
|
|
47
|
-
document.body.removeChild(testEl);
|
|
48
|
-
return computed || '';
|
|
49
|
-
};
|
|
50
|
-
const bgColor = getComputedColor('--background') || rootStyles.backgroundColor || '';
|
|
51
|
-
const mutedColor = getComputedColor('--muted') || '';
|
|
52
|
-
const primaryColor = getComputedColor('--primary') || '';
|
|
53
|
-
const accentColor = getComputedColor('--accent') || '';
|
|
54
|
-
const totalArea = Array.from(colorMap.values()).reduce((sum, v) => sum + v.area, 0);
|
|
55
|
-
if (totalArea === 0) {
|
|
56
|
-
setColorRatio({
|
|
57
|
-
dominant: 0,
|
|
58
|
-
secondary: 0,
|
|
59
|
-
accent: 0,
|
|
60
|
-
details: [],
|
|
61
|
-
});
|
|
62
|
-
setIsAnalyzing(false);
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
const colors = Array.from(colorMap.entries())
|
|
66
|
-
.map(([color, data]) => ({
|
|
67
|
-
color,
|
|
68
|
-
percentage: (data.area / totalArea) * 100,
|
|
69
|
-
area: data.area,
|
|
70
|
-
}))
|
|
71
|
-
.sort((a, b) => b.percentage - a.percentage);
|
|
72
|
-
const rgbToHex = (rgb) => {
|
|
73
|
-
const match = rgb.match(/\d+/g);
|
|
74
|
-
if (!match || match.length < 3 || !match[0] || !match[1] || !match[2])
|
|
75
|
-
return '';
|
|
76
|
-
const r = parseInt(match[0]).toString(16).padStart(2, '0');
|
|
77
|
-
const g = parseInt(match[1]).toString(16).padStart(2, '0');
|
|
78
|
-
const b = parseInt(match[2]).toString(16).padStart(2, '0');
|
|
79
|
-
return `#${r}${g}${b}`;
|
|
80
|
-
};
|
|
81
|
-
const normalizeToRgb = (color) => {
|
|
82
|
-
if (!color || color === 'transparent' || color === 'rgba(0, 0, 0, 0)') {
|
|
83
|
-
return null;
|
|
84
|
-
}
|
|
85
|
-
if (color.startsWith('rgb')) {
|
|
86
|
-
const match = color.match(/\d+/g);
|
|
87
|
-
if (match && match.length >= 3) {
|
|
88
|
-
return `rgb(${match[0]}, ${match[1]}, ${match[2]})`;
|
|
89
|
-
}
|
|
90
|
-
return color;
|
|
91
|
-
}
|
|
92
|
-
if (color.startsWith('#')) {
|
|
93
|
-
const hex = color.replace('#', '');
|
|
94
|
-
if (hex.length === 3 && hex[0] && hex[1] && hex[2]) {
|
|
95
|
-
const r = parseInt(hex[0] + hex[0], 16);
|
|
96
|
-
const g = parseInt(hex[1] + hex[1], 16);
|
|
97
|
-
const b = parseInt(hex[2] + hex[2], 16);
|
|
98
|
-
return `rgb(${r}, ${g}, ${b})`;
|
|
99
|
-
}
|
|
100
|
-
if (hex.length >= 6) {
|
|
101
|
-
const r = parseInt(hex.substr(0, 2), 16);
|
|
102
|
-
const g = parseInt(hex.substr(2, 2), 16);
|
|
103
|
-
const b = parseInt(hex.substr(4, 2), 16);
|
|
104
|
-
return `rgb(${r}, ${g}, ${b})`;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
if (color.startsWith('oklab') || color.startsWith('color(')) {
|
|
108
|
-
const testEl = document.createElement('div');
|
|
109
|
-
testEl.style.backgroundColor = color;
|
|
110
|
-
testEl.style.position = 'absolute';
|
|
111
|
-
testEl.style.visibility = 'hidden';
|
|
112
|
-
document.body.appendChild(testEl);
|
|
113
|
-
const computed = getComputedStyle(testEl).backgroundColor;
|
|
114
|
-
document.body.removeChild(testEl);
|
|
115
|
-
if (computed && computed.startsWith('rgb')) {
|
|
116
|
-
const match = computed.match(/\d+/g);
|
|
117
|
-
if (match && match.length >= 3) {
|
|
118
|
-
return `rgb(${match[0]}, ${match[1]}, ${match[2]})`;
|
|
119
|
-
}
|
|
120
|
-
return computed;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return null;
|
|
124
|
-
};
|
|
125
|
-
const getBrightness = (rgb) => {
|
|
126
|
-
if (!rgb)
|
|
127
|
-
return 0;
|
|
128
|
-
const match = rgb.match(/\d+/g);
|
|
129
|
-
if (!match || match.length < 3 || !match[0] || !match[1] || !match[2])
|
|
130
|
-
return 0;
|
|
131
|
-
const r = parseInt(match[0]);
|
|
132
|
-
const g = parseInt(match[1]);
|
|
133
|
-
const b = parseInt(match[2]);
|
|
134
|
-
return (r * 299 + g * 587 + b * 114) / 1000;
|
|
135
|
-
};
|
|
136
|
-
const getSaturation = (rgb) => {
|
|
137
|
-
if (!rgb)
|
|
138
|
-
return 0;
|
|
139
|
-
const match = rgb.match(/\d+/g);
|
|
140
|
-
if (!match || match.length < 3 || !match[0] || !match[1] || !match[2])
|
|
141
|
-
return 0;
|
|
142
|
-
const r = parseInt(match[0]) / 255;
|
|
143
|
-
const g = parseInt(match[1]) / 255;
|
|
144
|
-
const b = parseInt(match[2]) / 255;
|
|
145
|
-
const max = Math.max(r, g, b);
|
|
146
|
-
const min = Math.min(r, g, b);
|
|
147
|
-
const delta = max - min;
|
|
148
|
-
if (max === 0)
|
|
149
|
-
return 0;
|
|
150
|
-
return delta / max;
|
|
151
|
-
};
|
|
152
|
-
const colorsMatch = (c1, c2, threshold = 15) => {
|
|
153
|
-
if (!c1 || !c2)
|
|
154
|
-
return false;
|
|
155
|
-
const rgb1 = normalizeToRgb(c1);
|
|
156
|
-
const rgb2 = normalizeToRgb(c2);
|
|
157
|
-
if (!rgb1 || !rgb2)
|
|
158
|
-
return false;
|
|
159
|
-
const match1 = rgb1.match(/\d+/g);
|
|
160
|
-
const match2 = rgb2.match(/\d+/g);
|
|
161
|
-
if (!match1 || !match2 || match1.length < 3 || match2.length < 3)
|
|
162
|
-
return false;
|
|
163
|
-
if (!match1[0] || !match1[1] || !match1[2] || !match2[0] || !match2[1] || !match2[2])
|
|
164
|
-
return false;
|
|
165
|
-
const r1 = parseInt(match1[0]);
|
|
166
|
-
const g1 = parseInt(match1[1]);
|
|
167
|
-
const b1 = parseInt(match1[2]);
|
|
168
|
-
const r2 = parseInt(match2[0]);
|
|
169
|
-
const g2 = parseInt(match2[1]);
|
|
170
|
-
const b2 = parseInt(match2[2]);
|
|
171
|
-
const diff = Math.abs(r1 - r2) + Math.abs(g1 - g2) + Math.abs(b1 - b2);
|
|
172
|
-
return diff <= threshold * 3;
|
|
173
|
-
};
|
|
174
|
-
const groupSimilarColors = (colors) => {
|
|
175
|
-
const grouped = [];
|
|
176
|
-
const groups = [];
|
|
177
|
-
let currentGroup = 0;
|
|
178
|
-
for (const color of colors) {
|
|
179
|
-
const normalized = normalizeToRgb(color.color);
|
|
180
|
-
let assigned = false;
|
|
181
|
-
for (let i = 0; i < grouped.length; i++) {
|
|
182
|
-
const existing = grouped[i];
|
|
183
|
-
if (!existing)
|
|
184
|
-
continue;
|
|
185
|
-
const existingNormalized = normalizeToRgb(existing.color);
|
|
186
|
-
if (colorsMatch(normalized, existingNormalized)) {
|
|
187
|
-
grouped.push({ ...color, group: existing.group });
|
|
188
|
-
assigned = true;
|
|
189
|
-
break;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
if (!assigned) {
|
|
193
|
-
grouped.push({ ...color, group: currentGroup++ });
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
return grouped;
|
|
197
|
-
};
|
|
198
|
-
const categorizeByColorRole = (colors) => {
|
|
199
|
-
const categoryMap = new Map();
|
|
200
|
-
const normalizedAccent = accentColor ? normalizeToRgb(accentColor) : null;
|
|
201
|
-
const normalizedPrimary = primaryColor ? normalizeToRgb(primaryColor) : null;
|
|
202
|
-
const normalizedBg = bgColor ? normalizeToRgb(bgColor) : null;
|
|
203
|
-
const normalizedMuted = mutedColor ? normalizeToRgb(mutedColor) : null;
|
|
204
|
-
const bgBrightness = normalizedBg ? getBrightness(normalizedBg) : 0;
|
|
205
|
-
for (const color of colors) {
|
|
206
|
-
const normalized = normalizeToRgb(color.color);
|
|
207
|
-
if (!normalized) {
|
|
208
|
-
categoryMap.set(color.color, 'secondary');
|
|
209
|
-
continue;
|
|
210
|
-
}
|
|
211
|
-
const brightness = getBrightness(normalized);
|
|
212
|
-
const saturation = getSaturation(normalized);
|
|
213
|
-
if ((normalizedAccent && colorsMatch(normalized, normalizedAccent, 15)) ||
|
|
214
|
-
(normalizedPrimary && colorsMatch(normalized, normalizedPrimary, 15)) ||
|
|
215
|
-
(saturation > 0.5 && brightness > 120)) {
|
|
216
|
-
categoryMap.set(color.color, 'accent');
|
|
217
|
-
}
|
|
218
|
-
else if ((normalizedBg && colorsMatch(normalized, normalizedBg, 20)) ||
|
|
219
|
-
(normalizedMuted && colorsMatch(normalized, normalizedMuted, 20)) ||
|
|
220
|
-
(normalizedBg && brightness < bgBrightness + 30 && brightness > bgBrightness - 30)) {
|
|
221
|
-
categoryMap.set(color.color, 'dominant');
|
|
222
|
-
}
|
|
223
|
-
else if (brightness < 60) {
|
|
224
|
-
categoryMap.set(color.color, 'dominant');
|
|
225
|
-
}
|
|
226
|
-
else if (brightness > 200) {
|
|
227
|
-
categoryMap.set(color.color, 'secondary');
|
|
228
|
-
}
|
|
229
|
-
else {
|
|
230
|
-
categoryMap.set(color.color, 'secondary');
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
return categoryMap;
|
|
234
|
-
};
|
|
235
|
-
const categoryMap = categorizeByColorRole(colors);
|
|
236
|
-
const categorized = colors.map((c) => ({
|
|
237
|
-
...c,
|
|
238
|
-
category: categoryMap.get(c.color) || 'secondary',
|
|
239
|
-
}));
|
|
240
|
-
const dominant = categorized
|
|
241
|
-
.filter((c) => c.category === 'dominant')
|
|
242
|
-
.reduce((sum, c) => sum + c.percentage, 0);
|
|
243
|
-
const secondary = categorized
|
|
244
|
-
.filter((c) => c.category === 'secondary')
|
|
245
|
-
.reduce((sum, c) => sum + c.percentage, 0);
|
|
246
|
-
const accent = categorized
|
|
247
|
-
.filter((c) => c.category === 'accent')
|
|
248
|
-
.reduce((sum, c) => sum + c.percentage, 0);
|
|
249
|
-
setColorRatio({
|
|
250
|
-
dominant,
|
|
251
|
-
secondary,
|
|
252
|
-
accent,
|
|
253
|
-
details: categorized.slice(0, 20),
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
catch (error) {
|
|
257
|
-
console.error('Color ratio check failed:', error);
|
|
258
|
-
toast('error', 'Failed to analyze color ratio');
|
|
259
|
-
}
|
|
260
|
-
finally {
|
|
261
|
-
setIsAnalyzing(false);
|
|
262
|
-
}
|
|
263
|
-
};
|
|
264
|
-
const formatResults = () => {
|
|
265
|
-
if (!colorRatio)
|
|
266
|
-
return '';
|
|
267
|
-
return `60/30/10 Color Ratio Analysis
|
|
268
|
-
|
|
269
|
-
Dominant (60%): ${colorRatio.dominant.toFixed(1)}%
|
|
270
|
-
Secondary (30%): ${colorRatio.secondary.toFixed(1)}%
|
|
271
|
-
Accent (10%): ${colorRatio.accent.toFixed(1)}%
|
|
272
|
-
|
|
273
|
-
Status: ${colorRatio.dominant >= 55 &&
|
|
274
|
-
colorRatio.dominant <= 65 &&
|
|
275
|
-
colorRatio.secondary >= 25 &&
|
|
276
|
-
colorRatio.secondary <= 35 &&
|
|
277
|
-
colorRatio.accent >= 5 &&
|
|
278
|
-
colorRatio.accent <= 15
|
|
279
|
-
? '✅ Compliant'
|
|
280
|
-
: '⚠️ Not compliant'}
|
|
281
|
-
|
|
282
|
-
Top Colors:
|
|
283
|
-
${colorRatio.details
|
|
284
|
-
.map((c, i) => `${i + 1}. ${c.color} - ${c.percentage.toFixed(1)}% (${c.category})`)
|
|
285
|
-
.join('\n')}`;
|
|
286
|
-
};
|
|
287
|
-
const isCompliant = colorRatio &&
|
|
288
|
-
colorRatio.dominant >= 55 &&
|
|
289
|
-
colorRatio.dominant <= 65 &&
|
|
290
|
-
colorRatio.secondary >= 25 &&
|
|
291
|
-
colorRatio.secondary <= 35 &&
|
|
292
|
-
colorRatio.accent >= 5 &&
|
|
293
|
-
colorRatio.accent <= 15;
|
|
294
|
-
return (_jsx(Stack, { gap: "medium", style: { padding: 'var(--gap-md)' }, children: _jsx(Card, { title: _jsxs(Stack, { direction: "row", align: "center", justify: "between", className: "dndev-w-full", children: [_jsx("span", { children: "60/30/10 Color Ratio" }), _jsx(Button, { onClick: checkColorRatio, variant: BUTTON_VARIANT.OUTLINE, icon: Palette, disabled: isAnalyzing, children: isAnalyzing ? 'Analyzing...' : 'Analyze' })] }), content: _jsx(Stack, { gap: "medium", children: colorRatio ? (_jsxs(_Fragment, { children: [isCompliant ? (_jsx(Alert, { variant: ALERT_VARIANT.SUCCESS, children: "Color ratio is compliant with 60/30/10 rule" })) : (_jsx(Alert, { variant: ALERT_VARIANT.WARNING, children: "Color ratio does not match 60/30/10 rule" })), _jsxs(Stack, { gap: "tight", children: [_jsxs(Stack, { direction: "row", align: "center", justify: "between", className: "dndev-w-full", children: [_jsx(Label, { className: "dndev-font-mono", children: "Results" }), _jsx(CopyToClipboard, { text: formatResults(), variant: BUTTON_VARIANT.GHOST, onCopy: () => toast('success', 'Results copied') })] }), _jsxs(Stack, { gap: "tight", children: [_jsxs("div", { style: {
|
|
295
|
-
display: 'flex',
|
|
296
|
-
justifyContent: 'space-between',
|
|
297
|
-
}, children: [_jsx("span", { children: "Dominant (60%):" }), _jsxs("span", { className: colorRatio.dominant >= 55 &&
|
|
298
|
-
colorRatio.dominant <= 65
|
|
299
|
-
? 'dndev-text-primary'
|
|
300
|
-
: 'dndev-text-destructive', children: [colorRatio.dominant.toFixed(1), "%"] })] }), _jsxs("div", { style: {
|
|
301
|
-
display: 'flex',
|
|
302
|
-
justifyContent: 'space-between',
|
|
303
|
-
}, children: [_jsx("span", { children: "Secondary (30%):" }), _jsxs("span", { className: colorRatio.secondary >= 25 &&
|
|
304
|
-
colorRatio.secondary <= 35
|
|
305
|
-
? 'dndev-text-primary'
|
|
306
|
-
: 'dndev-text-destructive', children: [colorRatio.secondary.toFixed(1), "%"] })] }), _jsxs("div", { style: {
|
|
307
|
-
display: 'flex',
|
|
308
|
-
justifyContent: 'space-between',
|
|
309
|
-
}, children: [_jsx("span", { children: "Accent (10%):" }), _jsxs("span", { className: colorRatio.accent >= 5 && colorRatio.accent <= 15
|
|
310
|
-
? 'dndev-text-primary'
|
|
311
|
-
: 'dndev-text-destructive', children: [colorRatio.accent.toFixed(1), "%"] })] })] }), colorRatio.details.length > 0 && (_jsxs("details", { style: { marginTop: 'var(--gap-xs)' }, children: [_jsxs("summary", { className: "dndev-text-sm dndev-cursor-pointer", children: ["Top Colors (", colorRatio.details.length, ")"] }), _jsx(ScrollArea, { className: "dndev-max-h-96", style: { marginTop: 'var(--gap-xs)' }, children: _jsx(Stack, { gap: "tight", children: colorRatio.details.map((c, i) => (_jsxs("div", { style: {
|
|
312
|
-
display: 'flex',
|
|
313
|
-
gap: 'var(--gap-xs)',
|
|
314
|
-
alignItems: 'center',
|
|
315
|
-
}, children: [_jsx("div", { style: {
|
|
316
|
-
width: '1rem',
|
|
317
|
-
height: '1rem',
|
|
318
|
-
backgroundColor: c.color,
|
|
319
|
-
border: '1px solid var(--border)',
|
|
320
|
-
flexShrink: 0,
|
|
321
|
-
} }), _jsx("span", { className: "dndev-text-xs dndev-font-mono", children: c.color }), _jsxs("span", { className: "dndev-text-xs", children: [c.percentage.toFixed(1), "% (", c.category, ")"] })] }, i))) }) })] }))] })] })) : (_jsx(Alert, { variant: ALERT_VARIANT.INFO, children: "Click \"Analyze\" to check color ratio distribution" })) }) }) }));
|
|
322
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DebugToggle.d.ts","sourceRoot":"","sources":["../../../../src/internal/devtools/components/DebugToggle.tsx"],"names":[],"mappings":"AAgBA,eAAO,MAAM,WAAW,+CA8EvB,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
// packages/ui/src/internal/devtools/components/DebugToggle.tsx
|
|
4
|
-
/**
|
|
5
|
-
* @fileoverview Debug Toggle Component
|
|
6
|
-
* @description Toggle button for enabling/disabling debug borders and visual debugging aids
|
|
7
|
-
*
|
|
8
|
-
* @version 0.0.1
|
|
9
|
-
* @since 0.0.1
|
|
10
|
-
* @author AMBROISE PARK Consulting
|
|
11
|
-
*/
|
|
12
|
-
import { useState } from 'react';
|
|
13
|
-
import { cn, Stack } from '@donotdev/components';
|
|
14
|
-
export const DebugToggle = () => {
|
|
15
|
-
const [debugEnabled, setDebugEnabled] = useState(false);
|
|
16
|
-
const toggleDebug = () => {
|
|
17
|
-
const newValue = debugEnabled ? '0' : '1';
|
|
18
|
-
document.documentElement.style.setProperty('--debug-enabled', newValue);
|
|
19
|
-
setDebugEnabled(!debugEnabled);
|
|
20
|
-
console.log(`🐛 Debug mode: ${newValue === '1' ? 'ON' : 'OFF'}`);
|
|
21
|
-
};
|
|
22
|
-
return (_jsx(Stack, { as: "button", align: "center", justify: "center", onClick: toggleDebug, className: cn('hover:scale-105 active:scale-95 transition-transform duration-fast'), style: {
|
|
23
|
-
width: 'var(--touch-target)',
|
|
24
|
-
height: 'var(--touch-target)',
|
|
25
|
-
borderRadius: 'var(--radius-lg)',
|
|
26
|
-
transition: 'var(--transition-fast)',
|
|
27
|
-
...(debugEnabled
|
|
28
|
-
? {
|
|
29
|
-
backgroundColor: 'rgb(from var(--destructive) r g b / 0.2)',
|
|
30
|
-
color: 'var(--destructive)',
|
|
31
|
-
boxShadow: 'var(--shadow-xl)',
|
|
32
|
-
}
|
|
33
|
-
: {
|
|
34
|
-
color: 'var(--muted-foreground)',
|
|
35
|
-
}),
|
|
36
|
-
}, onMouseEnter: (e) => {
|
|
37
|
-
if (debugEnabled) {
|
|
38
|
-
e.currentTarget.style.backgroundColor =
|
|
39
|
-
'rgb(from var(--destructive) r g b / 0.3)';
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
e.currentTarget.style.backgroundColor = 'var(--accent)';
|
|
43
|
-
e.currentTarget.style.color = 'var(--accent-foreground)';
|
|
44
|
-
e.currentTarget.style.boxShadow = 'var(--shadow-xl)';
|
|
45
|
-
}
|
|
46
|
-
}, onMouseLeave: (e) => {
|
|
47
|
-
if (debugEnabled) {
|
|
48
|
-
e.currentTarget.style.backgroundColor =
|
|
49
|
-
'rgb(from var(--destructive) r g b / 0.2)';
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
e.currentTarget.style.backgroundColor = 'transparent';
|
|
53
|
-
e.currentTarget.style.color = 'var(--muted-foreground)';
|
|
54
|
-
e.currentTarget.style.boxShadow = 'none';
|
|
55
|
-
}
|
|
56
|
-
}, title: `Toggle debug borders (${debugEnabled ? 'ON' : 'OFF'})`, "aria-label": "Toggle debug mode", children: _jsxs("svg", { style: { width: '1.5rem', height: '1.5rem' }, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("path", { d: "m8 2 1.88 1.88" }), _jsx("path", { d: "M14.12 3.88 16 2" }), _jsx("path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1" }), _jsx("path", { d: "M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6" }), _jsx("path", { d: "M12 20v-9" }), _jsx("path", { d: "M6.53 9C4.6 8.8 3 7.1 3 5" }), _jsx("path", { d: "M6 13H2" }), _jsx("path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4" }), _jsx("path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4" }), _jsx("path", { d: "M22 13h-4" }), _jsx("path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4" })] }) }));
|
|
57
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentTab.d.ts","sourceRoot":"","sources":["../../../../src/internal/devtools/components/EnvironmentTab.tsx"],"names":[],"mappings":"AAiBA,eAAO,MAAM,cAAc,+CA8B1B,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
// packages/ui/src/internal/devtools/components/EnvironmentTab.tsx
|
|
4
|
-
/**
|
|
5
|
-
* @fileoverview Environment Tab Component
|
|
6
|
-
* @description Displays all environment variables in a clean, copyable format
|
|
7
|
-
*
|
|
8
|
-
* @version 0.0.1
|
|
9
|
-
* @since 0.0.1
|
|
10
|
-
* @author AMBROISE PARK Consulting
|
|
11
|
-
*/
|
|
12
|
-
import { Card, DescriptionList, Text } from '@donotdev/components';
|
|
13
|
-
import { getDndevConfig } from '@donotdev/core';
|
|
14
|
-
import { MaskedValue } from './MaskedValue';
|
|
15
|
-
export const EnvironmentTab = () => {
|
|
16
|
-
const config = getDndevConfig();
|
|
17
|
-
const envVars = config?.env || {};
|
|
18
|
-
const envItems = Object.entries(envVars).map(([key, value]) => ({
|
|
19
|
-
label: key,
|
|
20
|
-
value: _jsx(MaskedValue, { keyName: key, value: String(value) }),
|
|
21
|
-
}));
|
|
22
|
-
if (Object.keys(envVars).length === 0) {
|
|
23
|
-
return (_jsx(Card, { title: "Environment Variables", subtitle: "No environment variables found", children: _jsx(Text, { as: "span", className: "dndev-text-muted-foreground", children: "No environment variables detected in config." }) }));
|
|
24
|
-
}
|
|
25
|
-
return (_jsx(Card, { title: "Environment Variables", subtitle: `${Object.keys(envVars).length} variable${Object.keys(envVars).length !== 1 ? 's' : ''}`, children: _jsx(DescriptionList, { items: envItems, className: "dndev-gap-sm" }) }));
|
|
26
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"I18nTab.d.ts","sourceRoot":"","sources":["../../../../src/internal/devtools/components/I18nTab.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,OAAO,+CA4JnB,CAAC"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
// packages/ui/src/internal/devtools/components/I18nTab.tsx
|
|
4
|
-
/**
|
|
5
|
-
* @fileoverview i18n Tab Component
|
|
6
|
-
* @description Displays i18n configuration and current language state
|
|
7
|
-
*
|
|
8
|
-
* @version 0.0.1
|
|
9
|
-
* @since 0.0.1
|
|
10
|
-
* @author AMBROISE PARK Consulting
|
|
11
|
-
*/
|
|
12
|
-
import { Card, DescriptionList, Text, Badge, Stack, } from '@donotdev/components';
|
|
13
|
-
import { useTranslation } from '@donotdev/core';
|
|
14
|
-
import { useLanguageSelector } from '@donotdev/core';
|
|
15
|
-
import { getI18nConfig } from '@donotdev/core';
|
|
16
|
-
export const I18nTab = () => {
|
|
17
|
-
const { i18n, ready, isLoading } = useTranslation('dndev');
|
|
18
|
-
const { languages, currentLanguage } = useLanguageSelector();
|
|
19
|
-
const i18nConfig = getI18nConfig();
|
|
20
|
-
const currentLangInfo = languages.find((lang) => lang.id === currentLanguage);
|
|
21
|
-
const currentLanguageItems = [
|
|
22
|
-
{
|
|
23
|
-
label: 'Current Language',
|
|
24
|
-
value: (_jsx(Text, { as: "span", className: "dndev-font-mono", children: currentLanguage })),
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
label: 'Display Name',
|
|
28
|
-
value: (_jsx(Text, { as: "span", className: "dndev-font-mono", children: currentLangInfo?.name || 'Unknown' })),
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
label: 'Ready',
|
|
32
|
-
value: (_jsx(Text, { as: "span", className: "dndev-font-mono", children: ready ? 'Yes' : 'No' })),
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
label: 'Loading',
|
|
36
|
-
value: (_jsx(Text, { as: "span", className: "dndev-font-mono", children: isLoading ? 'Yes' : 'No' })),
|
|
37
|
-
},
|
|
38
|
-
...(i18n
|
|
39
|
-
? [
|
|
40
|
-
{
|
|
41
|
-
label: 'i18next Language',
|
|
42
|
-
value: (_jsx(Text, { as: "span", className: "dndev-font-mono", children: i18n.language })),
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
label: 'Fallback Language',
|
|
46
|
-
value: (_jsx(Text, { as: "span", className: "dndev-font-mono", children: i18n.options.fallbackLng?.[0] || 'none' })),
|
|
47
|
-
},
|
|
48
|
-
]
|
|
49
|
-
: []),
|
|
50
|
-
];
|
|
51
|
-
const configItems = i18nConfig
|
|
52
|
-
? [
|
|
53
|
-
{
|
|
54
|
-
label: 'Languages',
|
|
55
|
-
value: (_jsx(Text, { as: "span", className: "dndev-font-mono", children: i18nConfig.languages.join(', ') })),
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
label: 'Fallback',
|
|
59
|
-
value: (_jsx(Text, { as: "span", className: "dndev-font-mono", children: i18nConfig.fallback })),
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
label: 'Eager Namespaces',
|
|
63
|
-
value: (_jsx(Text, { as: "span", className: "dndev-font-mono", children: i18nConfig.eager.join(', ') })),
|
|
64
|
-
},
|
|
65
|
-
...(i18nConfig.manifest
|
|
66
|
-
? [
|
|
67
|
-
{
|
|
68
|
-
label: 'Total Namespaces',
|
|
69
|
-
value: (_jsxs(Text, { as: "span", className: "dndev-font-mono", children: [i18nConfig.manifest.totalNamespaces || 0, " namespaces"] })),
|
|
70
|
-
},
|
|
71
|
-
]
|
|
72
|
-
: []),
|
|
73
|
-
]
|
|
74
|
-
: [];
|
|
75
|
-
return (_jsxs(Stack, { gap: "medium", children: [_jsx(Card, { title: "Current Language", subtitle: "Active i18n state", children: _jsx(DescriptionList, { items: currentLanguageItems }) }), _jsx(Card, { title: "Available Languages", subtitle: `${languages.length} language${languages.length !== 1 ? 's' : ''} supported`, children: _jsx(Stack, { gap: "tight", children: Array.isArray(languages) && languages.length > 0 ? (languages.map((lang, index) => (_jsx(Card, { variant: lang.id === currentLanguage ? 'accent' : 'default', children: _jsxs(Stack, { direction: "row", align: "center", justify: "between", children: [_jsxs("div", { children: [_jsx(Text, { as: "span", className: "dndev-font-semibold", children: lang.name }), _jsx(Text, { as: "span", className: "dndev-text-xs dndev-text-muted-foreground dndev-font-mono", children: lang.id })] }), _jsx(Stack, { direction: "row", align: "center", gap: "tight", children: lang.id === currentLanguage && _jsx(Badge, { children: "Active" }) })] }) }, lang.id || `lang-${index}`)))) : (_jsx(Text, { as: "span", className: "dndev-text-sm dndev-text-muted-foreground", children: "No languages available" })) }) }), i18nConfig && (_jsx(Card, { title: "Config", subtitle: "i18n configuration from build", children: _jsx(DescriptionList, { items: configItems }) }))] }));
|
|
76
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OAuthGuideButton.d.ts","sourceRoot":"","sources":["../../../../src/internal/devtools/components/OAuthGuideButton.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;;;;;GAMG;AAEH,eAAO,MAAM,gBAAgB,EAAE,aA+L9B,CAAC"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
// packages/ui/src/internal/devtools/components/OAuthGuideButton.tsx
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
* @fileoverview OAuth Setup Guide Button Component
|
|
7
|
-
|
|
8
|
-
* @description Shows OAuth setup instructions in a compact format for developers
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
* @version 0.0.1
|
|
13
|
-
|
|
14
|
-
* @since 0.0.1
|
|
15
|
-
|
|
16
|
-
* @author AMBROISE PARK Consulting
|
|
17
|
-
|
|
18
|
-
*/
|
|
19
|
-
import { useState } from 'react';
|
|
20
|
-
import { Stack } from '@donotdev/components';
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
* OAuth Setup Guide Button Component
|
|
24
|
-
|
|
25
|
-
* Shows OAuth setup instructions in a compact format
|
|
26
|
-
|
|
27
|
-
*/
|
|
28
|
-
export const OAuthGuideButton = () => {
|
|
29
|
-
const [isExpanded, setIsExpanded] = useState(false);
|
|
30
|
-
return (_jsxs("div", { className: "dndev-relative", children: [_jsx("button", { onClick: () => setIsExpanded(!isExpanded), style: {
|
|
31
|
-
padding: 'var(--gap-sm) var(--gap-md)',
|
|
32
|
-
borderRadius: 'var(--radius-lg)',
|
|
33
|
-
fontFamily: 'monospace',
|
|
34
|
-
backgroundColor: 'rgb(59 130 246 / 0.2)',
|
|
35
|
-
transition: 'background-color var(--duration-normal)',
|
|
36
|
-
}, onMouseEnter: (e) => {
|
|
37
|
-
e.currentTarget.style.backgroundColor = 'rgb(59 130 246 / 0.3)';
|
|
38
|
-
}, onMouseLeave: (e) => {
|
|
39
|
-
e.currentTarget.style.backgroundColor = 'rgb(59 130 246 / 0.2)';
|
|
40
|
-
}, title: "OAuth Setup Guide", children: "\uD83D\uDD27 OAuth" }), isExpanded && (_jsxs("div", { className: "dndev-absolute", style: {
|
|
41
|
-
bottom: '100%',
|
|
42
|
-
right: 0,
|
|
43
|
-
zIndex: 'calc(var(--z-toast) + 100)',
|
|
44
|
-
marginBottom: 'var(--gap-sm)',
|
|
45
|
-
padding: 'var(--gap-md)',
|
|
46
|
-
backgroundColor: '#fff',
|
|
47
|
-
border: '1px solid rgb(229 231 235)',
|
|
48
|
-
borderRadius: 'var(--radius-lg)',
|
|
49
|
-
boxShadow: 'var(--shadow-xl)',
|
|
50
|
-
maxWidth: '28rem',
|
|
51
|
-
}, children: [_jsx("h3", { style: {
|
|
52
|
-
marginBottom: 'var(--gap-md)',
|
|
53
|
-
color: 'rgb(17 24 39)',
|
|
54
|
-
}, children: "OAuth Setup Guide" }), _jsxs(Stack, { direction: "row", gap: "tight", children: [_jsxs("div", { children: [_jsx("h4", { style: {
|
|
55
|
-
color: 'rgb(31 41 55)',
|
|
56
|
-
marginBottom: 'var(--gap-sm)',
|
|
57
|
-
}, children: "1. Firebase Console" }), _jsxs(Stack, { as: "ol", gap: "tight", className: "list-decimal list-inside", style: { color: 'var(--muted-foreground)' }, children: [_jsxs("li", { children: ["Go to", ' ', _jsx("a", { href: "https://console.firebase.google.com", target: "_blank", rel: "noopener noreferrer", style: { color: 'rgb(37 99 235)' }, onMouseEnter: (e) => (e.currentTarget.style.textDecoration = 'underline'), onMouseLeave: (e) => (e.currentTarget.style.textDecoration = 'none'), children: "Firebase Console" })] }), _jsx("li", { children: "Authentication \u2192 Sign-in method" }), _jsx("li", { children: "Enable Google, GitHub, etc." })] })] }), _jsxs("div", { children: [_jsx("h4", { style: {
|
|
58
|
-
color: 'rgb(31 41 55)',
|
|
59
|
-
marginBottom: 'var(--gap-sm)',
|
|
60
|
-
}, children: "2. GitHub OAuth" }), _jsxs(Stack, { as: "ol", gap: "tight", className: "list-decimal list-inside", style: { color: 'var(--muted-foreground)' }, children: [_jsxs("li", { children: ["Create OAuth App at", ' ', _jsx("a", { href: "https://github.com/settings/applications/new", target: "_blank", rel: "noopener noreferrer", style: { color: 'rgb(37 99 235)' }, onMouseEnter: (e) => (e.currentTarget.style.textDecoration = 'underline'), onMouseLeave: (e) => (e.currentTarget.style.textDecoration = 'none'), children: "GitHub" })] }), _jsxs("li", { children: ["Callback URL:", ' ', _jsx("code", { style: {
|
|
61
|
-
backgroundColor: 'var(--muted)',
|
|
62
|
-
padding: '0 var(--gap-sm)',
|
|
63
|
-
}, children: "https://your-project.firebaseapp.com/__/auth/handler" })] }), _jsx("li", { children: "Copy Client ID/Secret to Firebase" })] })] }), _jsxs("div", { children: [_jsx("h4", { style: {
|
|
64
|
-
color: 'rgb(31 41 55)',
|
|
65
|
-
marginBottom: 'var(--gap-sm)',
|
|
66
|
-
}, children: "3. Authorized Domains" }), _jsx("p", { style: { color: 'rgb(55 65 81)' }, children: "Add localhost, your-domain.com to Firebase Console \u2192 Authentication \u2192 Settings" })] }), _jsx("div", { style: {
|
|
67
|
-
border: '1px solid var(--warning)',
|
|
68
|
-
padding: 'var(--gap-sm)',
|
|
69
|
-
color: 'var(--warning)',
|
|
70
|
-
}, children: _jsxs("p", { children: [_jsx("strong", { children: "Note:" }), " 400 error = GitHub OAuth not configured in Firebase"] }) })] })] }))] }));
|
|
71
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StripeDebugTab.d.ts","sourceRoot":"","sources":["../../../../src/internal/devtools/components/StripeDebugTab.tsx"],"names":[],"mappings":"AAiDA,eAAO,MAAM,cAAc,+CAyhB1B,CAAC"}
|