@digilogiclabs/create-saas-app 2.7.3 → 2.8.1
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/.tsbuildinfo +1 -1
- package/dist/templates/shared/observability/web/src/lib/observability.ts +14 -22
- package/dist/templates/web/ai-platform/template/src/components/providers/app-providers.tsx +17 -27
- package/dist/templates/web/base/template/package.json +1 -3
- package/dist/templates/web/base/template/src/app/auth/callback/route.ts +32 -18
- package/dist/templates/web/base/template/src/app/globals.css +158 -157
- package/dist/templates/web/base/template/src/components/providers/app-providers.tsx +17 -30
- package/dist/templates/web/iot-dashboard/template/src/components/providers/app-providers.tsx +17 -24
- package/dist/templates/web/marketplace/template/src/components/providers/app-providers.tsx +17 -27
- package/dist/templates/web/micro-saas/template/src/components/providers/app-providers.tsx +17 -24
- package/dist/templates/web/ui-auth/template/src/app/globals.css +96 -95
- package/dist/templates/web/ui-auth/template/src/app/page.tsx +1 -0
- package/dist/templates/web/ui-auth/template/src/components/providers/app-providers.tsx +17 -31
- package/dist/templates/web/ui-auth-ai/template/src/app/globals.css +3 -3
- package/dist/templates/web/ui-auth-payments/template/src/app/globals.css +212 -211
- package/dist/templates/web/ui-auth-payments-ai/template/src/app/globals.css +97 -96
- package/dist/templates/web/ui-auth-payments-ai/template/src/components/providers/app-providers.tsx +17 -35
- package/dist/templates/web/ui-auth-payments-ai-rag/template/package.json +1 -2
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/globals.css +97 -96
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/providers/app-providers.tsx +17 -35
- package/dist/templates/web/ui-auth-payments-video/template/src/app/globals.css +229 -228
- package/dist/templates/web/ui-auth-payments-video/template/src/app/page.tsx +1 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/components/providers/app-providers.tsx +17 -31
- package/dist/templates/web/ui-only/template/src/app/globals.css +43 -42
- package/package.json +1 -1
- package/src/templates/shared/observability/web/src/lib/observability.ts +14 -22
- package/src/templates/web/ai-platform/template/src/components/providers/app-providers.tsx +17 -27
- package/src/templates/web/base/template/package.json +1 -3
- package/src/templates/web/base/template/src/app/auth/callback/route.ts +32 -18
- package/src/templates/web/base/template/src/app/globals.css +158 -157
- package/src/templates/web/base/template/src/components/providers/app-providers.tsx +17 -30
- package/src/templates/web/iot-dashboard/template/src/components/providers/app-providers.tsx +17 -24
- package/src/templates/web/marketplace/template/src/components/providers/app-providers.tsx +17 -27
- package/src/templates/web/micro-saas/template/src/components/providers/app-providers.tsx +17 -24
- package/src/templates/web/ui-auth/template/src/app/globals.css +96 -95
- package/src/templates/web/ui-auth/template/src/app/page.tsx +1 -0
- package/src/templates/web/ui-auth/template/src/components/providers/app-providers.tsx +17 -31
- package/src/templates/web/ui-auth-ai/template/src/app/globals.css +3 -3
- package/src/templates/web/ui-auth-payments/template/src/app/globals.css +212 -211
- package/src/templates/web/ui-auth-payments-ai/template/src/app/globals.css +97 -96
- package/src/templates/web/ui-auth-payments-ai/template/src/components/providers/app-providers.tsx +17 -35
- package/src/templates/web/ui-auth-payments-ai-rag/template/package.json +1 -2
- package/src/templates/web/ui-auth-payments-audio/template/src/app/globals.css +97 -96
- package/src/templates/web/ui-auth-payments-audio/template/src/components/providers/app-providers.tsx +17 -35
- package/src/templates/web/ui-auth-payments-video/template/src/app/globals.css +229 -228
- package/src/templates/web/ui-auth-payments-video/template/src/app/page.tsx +1 -0
- package/src/templates/web/ui-auth-payments-video/template/src/components/providers/app-providers.tsx +17 -31
- package/src/templates/web/ui-only/template/src/app/globals.css +43 -42
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getClientIp } from '@digilogiclabs/platform-core/auth';
|
|
2
|
+
import type { AuditEvent, AuditCategory } from '@digilogiclabs/platform-core';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Observability helpers — audit logging, error reporting, metrics.
|
|
@@ -13,22 +14,11 @@ const SERVICE_NAME = 'my-app';
|
|
|
13
14
|
|
|
14
15
|
// ─── Lazy Singletons ────────────────────────────────────────
|
|
15
16
|
|
|
16
|
-
let auditLogPromise: Promise<AuditLogger> | null = null;
|
|
17
|
-
|
|
18
17
|
interface AuditLogger {
|
|
19
|
-
log(event: AuditEvent): Promise<
|
|
18
|
+
log(event: AuditEvent): Promise<unknown>;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
action: string;
|
|
24
|
-
actor: { id: string; type: string; email?: string };
|
|
25
|
-
resource?: { type: string; id?: string };
|
|
26
|
-
outcome: 'success' | 'failure' | 'blocked';
|
|
27
|
-
metadata?: Record<string, unknown>;
|
|
28
|
-
category?: string;
|
|
29
|
-
ip?: string;
|
|
30
|
-
userAgent?: string;
|
|
31
|
-
}
|
|
21
|
+
let auditLogPromise: Promise<AuditLogger> | null = null;
|
|
32
22
|
|
|
33
23
|
async function getAuditLog(): Promise<AuditLogger> {
|
|
34
24
|
if (!auditLogPromise) {
|
|
@@ -37,7 +27,7 @@ async function getAuditLog(): Promise<AuditLogger> {
|
|
|
37
27
|
const { getPlatform } = await import('@/lib/platform');
|
|
38
28
|
const platform = await getPlatform();
|
|
39
29
|
const { DatabaseAuditLog } = await import('@digilogiclabs/platform-core');
|
|
40
|
-
return new DatabaseAuditLog(platform.db,
|
|
30
|
+
return new DatabaseAuditLog({ database: platform.db, serviceName: SERVICE_NAME });
|
|
41
31
|
} catch {
|
|
42
32
|
return {
|
|
43
33
|
log: async (event: AuditEvent) => {
|
|
@@ -67,7 +57,7 @@ export function auditAction(params: {
|
|
|
67
57
|
actorEmail?: string;
|
|
68
58
|
resourceType?: string;
|
|
69
59
|
resourceId?: string;
|
|
70
|
-
outcome?: 'success' | 'failure' | '
|
|
60
|
+
outcome?: 'success' | 'failure' | 'denied' | 'error';
|
|
71
61
|
metadata?: Record<string, unknown>;
|
|
72
62
|
request?: Request;
|
|
73
63
|
}): void {
|
|
@@ -81,14 +71,16 @@ export function auditAction(params: {
|
|
|
81
71
|
type: params.actorId === 'system' ? 'system' : 'user',
|
|
82
72
|
email: params.actorEmail,
|
|
83
73
|
},
|
|
84
|
-
|
|
74
|
+
target: params.resourceType
|
|
85
75
|
? { type: params.resourceType, id: params.resourceId }
|
|
86
76
|
: undefined,
|
|
87
77
|
outcome: params.outcome || 'success',
|
|
88
|
-
|
|
78
|
+
data: {
|
|
79
|
+
...params.metadata,
|
|
80
|
+
ip: params.request ? getClientIp(params.request) : undefined,
|
|
81
|
+
userAgent: params.request ? getUserAgent(params.request) : undefined,
|
|
82
|
+
},
|
|
89
83
|
category,
|
|
90
|
-
ip: params.request ? getClientIp(params.request) : undefined,
|
|
91
|
-
userAgent: params.request ? getUserAgent(params.request) : undefined,
|
|
92
84
|
})
|
|
93
85
|
)
|
|
94
86
|
.catch(() => {});
|
|
@@ -124,12 +116,12 @@ export function captureError(error: unknown, context?: Record<string, unknown>):
|
|
|
124
116
|
|
|
125
117
|
// ─── Helpers ─────────────────────────────────────────────────
|
|
126
118
|
|
|
127
|
-
function inferCategory(action: string):
|
|
128
|
-
if (action.startsWith('admin.')) return '
|
|
119
|
+
function inferCategory(action: string): AuditCategory {
|
|
120
|
+
if (action.startsWith('admin.')) return 'admin_action';
|
|
129
121
|
if (action.startsWith('payment.')) return 'billing';
|
|
130
122
|
if (action.startsWith('account.')) return 'data_mutation';
|
|
131
123
|
if (action.startsWith('auth.')) return 'authentication';
|
|
132
124
|
if (action.startsWith('cron.')) return 'system';
|
|
133
125
|
if (action.startsWith('security.')) return 'security';
|
|
134
|
-
return '
|
|
126
|
+
return 'custom';
|
|
135
127
|
}
|
|
@@ -1,27 +1,17 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { ThemeProvider } from 'next-themes'
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
interface AppProvidersProps {
|
|
7
|
-
children: React.ReactNode
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function AppProviders({ children }: AppProvidersProps) {
|
|
11
|
-
return (
|
|
12
|
-
<ThemeProvider attribute="class" defaultTheme="
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
payments: {
|
|
19
|
-
provider: 'stripe',
|
|
20
|
-
},
|
|
21
|
-
}}
|
|
22
|
-
>
|
|
23
|
-
{children}
|
|
24
|
-
</DLLProvider>
|
|
25
|
-
</ThemeProvider>
|
|
26
|
-
)
|
|
27
|
-
}
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { ThemeProvider } from 'next-themes'
|
|
4
|
+
import { Toaster } from '@digilogiclabs/saas-factory-ui'
|
|
5
|
+
|
|
6
|
+
interface AppProvidersProps {
|
|
7
|
+
children: React.ReactNode
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function AppProviders({ children }: AppProvidersProps) {
|
|
11
|
+
return (
|
|
12
|
+
<ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange>
|
|
13
|
+
{children}
|
|
14
|
+
<Toaster />
|
|
15
|
+
</ThemeProvider>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
@@ -38,10 +38,8 @@
|
|
|
38
38
|
"@types/node": "^20.0.0",
|
|
39
39
|
"@types/react": "^19.0.0",
|
|
40
40
|
"@types/react-dom": "^19.0.0",
|
|
41
|
-
"eslint": "^
|
|
41
|
+
"eslint": "^9.0.0",
|
|
42
42
|
"eslint-config-next": "^15.0.0",
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
44
|
-
"@typescript-eslint/parser": "^6.0.0",
|
|
45
43
|
"prettier": "^3.0.0",
|
|
46
44
|
"prettier-plugin-tailwindcss": "^0.5.0",
|
|
47
45
|
"vitest": "^1.0.0",
|
|
@@ -1,18 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cookies } from 'next/headers';
|
|
3
|
-
import { NextResponse } from 'next/server';
|
|
4
|
-
|
|
5
|
-
import type { NextRequest } from 'next/server';
|
|
6
|
-
|
|
7
|
-
export async function GET(request: NextRequest) {
|
|
8
|
-
const requestUrl = new URL(request.url);
|
|
9
|
-
const code = requestUrl.searchParams.get('code');
|
|
10
|
-
|
|
11
|
-
if (code) {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { createServerClient } from '@supabase/ssr';
|
|
2
|
+
import { cookies } from 'next/headers';
|
|
3
|
+
import { NextResponse } from 'next/server';
|
|
4
|
+
|
|
5
|
+
import type { NextRequest } from 'next/server';
|
|
6
|
+
|
|
7
|
+
export async function GET(request: NextRequest) {
|
|
8
|
+
const requestUrl = new URL(request.url);
|
|
9
|
+
const code = requestUrl.searchParams.get('code');
|
|
10
|
+
|
|
11
|
+
if (code) {
|
|
12
|
+
const cookieStore = await cookies();
|
|
13
|
+
const supabase = createServerClient(
|
|
14
|
+
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
|
15
|
+
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
|
16
|
+
{
|
|
17
|
+
cookies: {
|
|
18
|
+
getAll: () => cookieStore.getAll(),
|
|
19
|
+
setAll: (cookiesToSet) => {
|
|
20
|
+
cookiesToSet.forEach(({ name, value, options }) =>
|
|
21
|
+
cookieStore.set(name, value, options)
|
|
22
|
+
);
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
await supabase.auth.exchangeCodeForSession(code);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// URL to redirect to after sign in process completes
|
|
31
|
+
return NextResponse.redirect(requestUrl.origin);
|
|
32
|
+
}
|
|
@@ -1,157 +1,158 @@
|
|
|
1
|
-
|
|
2
|
-
@
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
@
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
--
|
|
12
|
-
--
|
|
13
|
-
--card
|
|
14
|
-
--
|
|
15
|
-
--popover
|
|
16
|
-
--
|
|
17
|
-
--primary
|
|
18
|
-
--
|
|
19
|
-
--secondary
|
|
20
|
-
--
|
|
21
|
-
--muted
|
|
22
|
-
--
|
|
23
|
-
--accent
|
|
24
|
-
--
|
|
25
|
-
--destructive
|
|
26
|
-
--
|
|
27
|
-
--
|
|
28
|
-
--
|
|
29
|
-
--
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
--
|
|
35
|
-
--
|
|
36
|
-
--card
|
|
37
|
-
--
|
|
38
|
-
--popover
|
|
39
|
-
--
|
|
40
|
-
--primary
|
|
41
|
-
--
|
|
42
|
-
--secondary
|
|
43
|
-
--
|
|
44
|
-
--muted
|
|
45
|
-
--
|
|
46
|
-
--accent
|
|
47
|
-
--
|
|
48
|
-
--destructive
|
|
49
|
-
--
|
|
50
|
-
--
|
|
51
|
-
--
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
min-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
*::
|
|
101
|
-
|
|
102
|
-
animation-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
background
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
1
|
+
/* Import SaaS Factory UI styles */
|
|
2
|
+
@import '@digilogiclabs/saas-factory-ui/styles.css';
|
|
3
|
+
|
|
4
|
+
@tailwind base;
|
|
5
|
+
@tailwind components;
|
|
6
|
+
@tailwind utilities;
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@layer base {
|
|
10
|
+
:root {
|
|
11
|
+
--background: 0 0% 100%;
|
|
12
|
+
--foreground: 222.2 84% 4.9%;
|
|
13
|
+
--card: 0 0% 100%;
|
|
14
|
+
--card-foreground: 222.2 84% 4.9%;
|
|
15
|
+
--popover: 0 0% 100%;
|
|
16
|
+
--popover-foreground: 222.2 84% 4.9%;
|
|
17
|
+
--primary: 221.2 83.2% 53.3%;
|
|
18
|
+
--primary-foreground: 210 40% 98%;
|
|
19
|
+
--secondary: 210 40% 96%;
|
|
20
|
+
--secondary-foreground: 222.2 84% 4.9%;
|
|
21
|
+
--muted: 210 40% 96%;
|
|
22
|
+
--muted-foreground: 215.4 16.3% 46.9%;
|
|
23
|
+
--accent: 210 40% 96%;
|
|
24
|
+
--accent-foreground: 222.2 84% 4.9%;
|
|
25
|
+
--destructive: 0 84.2% 60.2%;
|
|
26
|
+
--destructive-foreground: 210 40% 98%;
|
|
27
|
+
--border: 214.3 31.8% 91.4%;
|
|
28
|
+
--input: 214.3 31.8% 91.4%;
|
|
29
|
+
--ring: 221.2 83.2% 53.3%;
|
|
30
|
+
--radius: 0.5rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dark {
|
|
34
|
+
--background: 222.2 84% 4.9%;
|
|
35
|
+
--foreground: 210 40% 98%;
|
|
36
|
+
--card: 222.2 84% 4.9%;
|
|
37
|
+
--card-foreground: 210 40% 98%;
|
|
38
|
+
--popover: 222.2 84% 4.9%;
|
|
39
|
+
--popover-foreground: 210 40% 98%;
|
|
40
|
+
--primary: 217.2 91.2% 59.8%;
|
|
41
|
+
--primary-foreground: 222.2 84% 4.9%;
|
|
42
|
+
--secondary: 217.2 32.6% 17.5%;
|
|
43
|
+
--secondary-foreground: 210 40% 98%;
|
|
44
|
+
--muted: 217.2 32.6% 17.5%;
|
|
45
|
+
--muted-foreground: 215 20.2% 65.1%;
|
|
46
|
+
--accent: 217.2 32.6% 17.5%;
|
|
47
|
+
--accent-foreground: 210 40% 98%;
|
|
48
|
+
--destructive: 0 62.8% 30.6%;
|
|
49
|
+
--destructive-foreground: 210 40% 98%;
|
|
50
|
+
--border: 217.2 32.6% 17.5%;
|
|
51
|
+
--input: 217.2 32.6% 17.5%;
|
|
52
|
+
--ring: 224.3 76.3% 94.1%;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@layer base {
|
|
57
|
+
* {
|
|
58
|
+
@apply border-border;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
body {
|
|
62
|
+
@apply bg-background text-foreground;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Mobile-first optimizations */
|
|
67
|
+
@media (max-width: 768px) {
|
|
68
|
+
.mobile-optimized {
|
|
69
|
+
touch-action: manipulation;
|
|
70
|
+
-webkit-tap-highlight-color: transparent;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Better touch targets */
|
|
74
|
+
button,
|
|
75
|
+
a,
|
|
76
|
+
input,
|
|
77
|
+
select,
|
|
78
|
+
textarea {
|
|
79
|
+
min-height: 44px;
|
|
80
|
+
min-width: 44px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Smooth scrolling for mobile */
|
|
84
|
+
html {
|
|
85
|
+
scroll-behavior: smooth;
|
|
86
|
+
-webkit-overflow-scrolling: touch;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Network-aware styles */
|
|
91
|
+
@media (prefers-reduced-data: reduce) {
|
|
92
|
+
.high-bandwidth-content {
|
|
93
|
+
display: none;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Reduced motion preferences */
|
|
98
|
+
@media (prefers-reduced-motion: reduce) {
|
|
99
|
+
*,
|
|
100
|
+
*::before,
|
|
101
|
+
*::after {
|
|
102
|
+
animation-duration: 0.01ms !important;
|
|
103
|
+
animation-iteration-count: 1 !important;
|
|
104
|
+
transition-duration: 0.01ms !important;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Custom animations for mobile interactions */
|
|
109
|
+
@keyframes haptic-feedback {
|
|
110
|
+
0% { transform: scale(1); }
|
|
111
|
+
50% { transform: scale(0.95); }
|
|
112
|
+
100% { transform: scale(1); }
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.haptic-feedback {
|
|
116
|
+
animation: haptic-feedback 0.1s ease-in-out;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Offline indicator styles */
|
|
120
|
+
.offline-indicator {
|
|
121
|
+
position: fixed;
|
|
122
|
+
top: 0;
|
|
123
|
+
left: 0;
|
|
124
|
+
right: 0;
|
|
125
|
+
background: #f59e0b;
|
|
126
|
+
color: white;
|
|
127
|
+
text-align: center;
|
|
128
|
+
padding: 8px;
|
|
129
|
+
font-size: 14px;
|
|
130
|
+
z-index: 9999;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Loading states */
|
|
134
|
+
.loading-skeleton {
|
|
135
|
+
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
|
136
|
+
background-size: 200% 100%;
|
|
137
|
+
animation: loading 1.5s infinite;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@keyframes loading {
|
|
141
|
+
0% {
|
|
142
|
+
background-position: 200% 0;
|
|
143
|
+
}
|
|
144
|
+
100% {
|
|
145
|
+
background-position: -200% 0;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Progressive image loading */
|
|
150
|
+
.progressive-image {
|
|
151
|
+
filter: blur(5px);
|
|
152
|
+
transition: filter 0.3s;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.progressive-image.loaded {
|
|
156
|
+
filter: blur(0);
|
|
157
|
+
}
|
|
158
|
+
|
|
@@ -1,30 +1,17 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
defaultTheme="{{defaultTheme}}"
|
|
19
|
-
enableSystem
|
|
20
|
-
disableTransitionOnChange
|
|
21
|
-
storageKey="{{packageName}}-theme"
|
|
22
|
-
>
|
|
23
|
-
<AppThemeProvider themeColor="{{themeColor}}">
|
|
24
|
-
{children}
|
|
25
|
-
<Toaster />
|
|
26
|
-
</AppThemeProvider>
|
|
27
|
-
</ThemeProvider>
|
|
28
|
-
</DLLProvider>
|
|
29
|
-
)
|
|
30
|
-
}
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { ThemeProvider } from 'next-themes'
|
|
4
|
+
import { Toaster } from '@digilogiclabs/saas-factory-ui'
|
|
5
|
+
|
|
6
|
+
interface AppProvidersProps {
|
|
7
|
+
children: React.ReactNode
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function AppProviders({ children }: AppProvidersProps) {
|
|
11
|
+
return (
|
|
12
|
+
<ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange>
|
|
13
|
+
{children}
|
|
14
|
+
<Toaster />
|
|
15
|
+
</ThemeProvider>
|
|
16
|
+
)
|
|
17
|
+
}
|
package/dist/templates/web/iot-dashboard/template/src/components/providers/app-providers.tsx
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { ThemeProvider } from 'next-themes'
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
interface AppProvidersProps {
|
|
7
|
-
children: React.ReactNode
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function AppProviders({ children }: AppProvidersProps) {
|
|
11
|
-
return (
|
|
12
|
-
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}}
|
|
19
|
-
>
|
|
20
|
-
{children}
|
|
21
|
-
</DLLProvider>
|
|
22
|
-
</ThemeProvider>
|
|
23
|
-
)
|
|
24
|
-
}
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { ThemeProvider } from 'next-themes'
|
|
4
|
+
import { Toaster } from '@digilogiclabs/saas-factory-ui'
|
|
5
|
+
|
|
6
|
+
interface AppProvidersProps {
|
|
7
|
+
children: React.ReactNode
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function AppProviders({ children }: AppProvidersProps) {
|
|
11
|
+
return (
|
|
12
|
+
<ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange>
|
|
13
|
+
{children}
|
|
14
|
+
<Toaster />
|
|
15
|
+
</ThemeProvider>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
@@ -1,27 +1,17 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { ThemeProvider } from 'next-themes'
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
interface AppProvidersProps {
|
|
7
|
-
children: React.ReactNode
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function AppProviders({ children }: AppProvidersProps) {
|
|
11
|
-
return (
|
|
12
|
-
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
payments: {
|
|
19
|
-
provider: 'stripe',
|
|
20
|
-
},
|
|
21
|
-
}}
|
|
22
|
-
>
|
|
23
|
-
{children}
|
|
24
|
-
</DLLProvider>
|
|
25
|
-
</ThemeProvider>
|
|
26
|
-
)
|
|
27
|
-
}
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { ThemeProvider } from 'next-themes'
|
|
4
|
+
import { Toaster } from '@digilogiclabs/saas-factory-ui'
|
|
5
|
+
|
|
6
|
+
interface AppProvidersProps {
|
|
7
|
+
children: React.ReactNode
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function AppProviders({ children }: AppProvidersProps) {
|
|
11
|
+
return (
|
|
12
|
+
<ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange>
|
|
13
|
+
{children}
|
|
14
|
+
<Toaster />
|
|
15
|
+
</ThemeProvider>
|
|
16
|
+
)
|
|
17
|
+
}
|