@donotdev/ui 0.0.7 → 0.0.9
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/assets/fonts/fonts.css +4 -4
- package/dist/components/auth/AuthHeader.d.ts +5 -0
- package/dist/components/auth/AuthHeader.d.ts.map +1 -1
- package/dist/components/auth/AuthHeader.js +22 -8
- package/dist/components/auth/AuthMenu.d.ts +6 -1
- package/dist/components/auth/AuthMenu.d.ts.map +1 -1
- package/dist/components/auth/AuthMenu.js +3 -3
- package/dist/components/common/AppLoading.d.ts +1 -1
- package/dist/components/common/AppLoading.d.ts.map +1 -1
- package/dist/components/common/AppLoading.js +0 -1
- package/dist/components/common/Loader.d.ts +4 -4
- package/dist/components/common/Loader.d.ts.map +1 -1
- package/dist/components/common/Loader.js +11 -12
- package/dist/components/common/LoadingMessage.d.ts +1 -9
- package/dist/components/common/LoadingMessage.d.ts.map +1 -1
- package/dist/components/common/LoadingMessage.js +0 -1
- package/dist/components/common/LoadingScreen.d.ts +1 -9
- package/dist/components/common/LoadingScreen.d.ts.map +1 -1
- package/dist/components/common/LoadingScreen.js +0 -1
- package/dist/components/common/RedirectOverlay.d.ts +37 -0
- package/dist/components/common/RedirectOverlay.d.ts.map +1 -0
- package/dist/components/common/RedirectOverlay.js +243 -0
- package/dist/components/common/TechBento.d.ts.map +1 -1
- package/dist/components/common/TechBento.js +1 -0
- package/dist/components/common/index.d.ts +1 -0
- package/dist/components/common/index.d.ts.map +1 -1
- package/dist/components/common/index.js +1 -0
- package/dist/components/layout/components/FloatingLanguageSwitcher.d.ts +1 -9
- package/dist/components/layout/components/FloatingLanguageSwitcher.d.ts.map +1 -1
- package/dist/components/layout/components/FloatingLanguageSwitcher.js +0 -1
- package/dist/components/layout/components/header/CacheSettings.d.ts.map +1 -1
- package/dist/components/layout/components/header/HeaderMenu.d.ts.map +1 -1
- package/dist/components/layout/components/header/SettingsMenu.d.ts.map +1 -1
- package/dist/components/layout/components/header/SettingsMenu.js +1 -2
- 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/crud/components/DisplayFieldRenderer.d.ts +3 -11
- package/dist/crud/components/DisplayFieldRenderer.d.ts.map +1 -1
- package/dist/crud/components/DisplayFieldRenderer.js +4 -3
- package/dist/crud/components/EntityDisplayRenderer.d.ts +2 -2
- package/dist/crud/components/fields/display/AvatarFieldDisplay.d.ts +2 -2
- package/dist/crud/components/fields/display/BadgeFieldDisplay.d.ts +2 -2
- package/dist/crud/components/fields/display/ButtonFieldDisplay.d.ts +2 -2
- package/dist/crud/components/fields/display/CheckboxFieldDisplay.d.ts +2 -2
- package/dist/crud/components/fields/display/DateFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/DateFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/DateFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/DropdownDisplay.d.ts +2 -2
- package/dist/crud/components/fields/display/FileFieldDisplay.d.ts +2 -2
- package/dist/crud/components/fields/display/GeoPointFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/GeoPointFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/GeoPointFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/HiddenFieldDisplay.d.ts +3 -3
- package/dist/crud/components/fields/display/HiddenFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/HiddenFieldDisplay.js +0 -9
- package/dist/crud/components/fields/display/ImageFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/ImageFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/ImageFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/LinkFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/LinkFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/LinkFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/MapFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/MapFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/MapFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/MultiDropdownDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/MultiDropdownDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/MultiDropdownDisplay.js +0 -1
- package/dist/crud/components/fields/display/MultiInputTextFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/MultiInputTextFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/MultiInputTextFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/NumberFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/NumberFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/NumberFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/PasswordFieldDisplay.d.ts +3 -3
- package/dist/crud/components/fields/display/PasswordFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/PasswordFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/PhoneNumberDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/PhoneNumberDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/PhoneNumberDisplay.js +0 -1
- package/dist/crud/components/fields/display/RadioFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/RadioFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/RadioFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/RangeFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/RangeFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/RangeFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/ReferenceFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/ReferenceFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/ReferenceFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/RichTextDisplay.d.ts +25 -0
- package/dist/crud/components/fields/display/RichTextDisplay.d.ts.map +1 -0
- package/dist/crud/components/fields/display/RichTextDisplay.js +104 -0
- package/dist/crud/components/fields/display/TextAreaDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/TextAreaDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/TextAreaDisplay.js +0 -1
- package/dist/crud/components/fields/display/TextFieldDisplay.d.ts +2 -2
- package/dist/crud/components/fields/display/TimestampFieldDisplay.d.ts +3 -11
- package/dist/crud/components/fields/display/TimestampFieldDisplay.d.ts.map +1 -1
- package/dist/crud/components/fields/display/TimestampFieldDisplay.js +0 -1
- package/dist/crud/components/fields/display/index.d.ts +1 -0
- package/dist/crud/components/fields/display/index.d.ts.map +1 -1
- package/dist/crud/components/fields/display/index.js +1 -0
- package/dist/dndev.css +827 -126
- package/dist/index.js +64 -4
- package/dist/internal/common/ErrorFallback.d.ts +1 -10
- package/dist/internal/common/ErrorFallback.d.ts.map +1 -1
- package/dist/internal/common/GlobalErrorFallback.d.ts +1 -9
- package/dist/internal/common/GlobalErrorFallback.d.ts.map +1 -1
- package/dist/internal/common/RouteErrorFallback.js +1 -1
- package/dist/internal/devtools/components/DebugDialog.d.ts.map +1 -1
- package/dist/internal/devtools/components/DebugDialog.js +3 -1
- package/dist/internal/devtools/components/DesignTab.d.ts.map +1 -1
- package/dist/internal/devtools/components/DesignTab.js +25 -3
- package/dist/internal/devtools/components/MaskedValue.d.ts.map +1 -1
- package/dist/internal/devtools/components/MaskedValue.js +1 -1
- package/dist/internal/devtools/components/StoresTab.js +1 -1
- package/dist/internal/initializers/BaseStoresInitializer.d.ts.map +1 -1
- package/dist/internal/initializers/BaseStoresInitializer.js +1 -2
- package/dist/internal/initializers/NextJsStoresInitializer.d.ts.map +1 -1
- package/dist/internal/layout/DnDevLayout.d.ts.map +1 -1
- package/dist/internal/layout/DnDevLayout.js +4 -5
- package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
- package/dist/internal/layout/components/PerformanceHints.d.ts.map +1 -1
- package/dist/internal/layout/components/PerformanceHints.js +3 -2
- package/dist/internal/layout/components/footer/FooterLegalLinks.js +2 -2
- package/dist/internal/layout/config/defaults.d.ts +0 -10
- package/dist/internal/layout/config/defaults.d.ts.map +1 -1
- package/dist/internal/layout/config/defaults.js +12 -1
- package/dist/internal/layout/config/presets/admin.d.ts +2 -2
- package/dist/internal/layout/config/presets/admin.d.ts.map +1 -1
- package/dist/internal/layout/config/presets/admin.js +15 -6
- package/dist/internal/layout/config/presets/blog.d.ts.map +1 -1
- package/dist/internal/layout/config/presets/blog.js +7 -1
- package/dist/internal/layout/config/presets/docs.d.ts.map +1 -1
- package/dist/internal/layout/config/presets/docs.js +7 -5
- package/dist/internal/layout/config/presets/game.d.ts.map +1 -1
- package/dist/internal/layout/config/presets/game.js +7 -2
- package/dist/internal/layout/config/presets/moolti.d.ts.map +1 -1
- package/dist/internal/layout/config/presets/moolti.js +10 -3
- package/dist/internal/layout/zones/DnDevFooter.d.ts +1 -13
- package/dist/internal/layout/zones/DnDevFooter.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevHeader.d.ts +1 -14
- package/dist/internal/layout/zones/DnDevHeader.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevMergedBar.d.ts +2 -14
- package/dist/internal/layout/zones/DnDevMergedBar.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevMergedBar.js +11 -3
- package/dist/internal/layout/zones/DnDevSidebar.d.ts +1 -14
- package/dist/internal/layout/zones/DnDevSidebar.d.ts.map +1 -1
- package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
- package/dist/providers/NextJsAppProviders.js +4 -1
- package/dist/routing/AuthGuard.d.ts.map +1 -1
- package/dist/routing/GoTo.d.ts +3 -1
- package/dist/routing/GoTo.d.ts.map +1 -1
- package/dist/routing/GoTo.js +6 -2
- package/dist/routing/GoToDialog.d.ts +1 -1
- package/dist/routing/GoToDialog.d.ts.map +1 -1
- package/dist/routing/GoToDialog.js +3 -5
- package/dist/routing/NavigationItem.d.ts +1 -1
- package/dist/routing/NavigationItem.d.ts.map +1 -1
- package/dist/routing/NavigationItem.js +0 -1
- package/dist/routing/hooks/hooks.next.d.ts +1 -0
- package/dist/routing/hooks/hooks.next.d.ts.map +1 -1
- package/dist/routing/hooks/hooks.next.js +1 -1
- package/dist/routing/hooks/hooks.vite.d.ts +1 -0
- package/dist/routing/hooks/hooks.vite.d.ts.map +1 -1
- package/dist/routing/hooks/hooks.vite.js +1 -1
- package/dist/routing/hooks/useNavigate.next.d.ts.map +1 -1
- package/dist/routing/hooks/useNavigate.next.js +1 -1
- package/dist/routing/hooks/useNavigate.vite.d.ts.map +1 -1
- package/dist/routing/hooks/useRouteParam.next.d.ts +18 -0
- package/dist/routing/hooks/useRouteParam.next.d.ts.map +1 -0
- package/dist/routing/hooks/useRouteParam.next.js +38 -0
- package/dist/routing/hooks/useRouteParam.vite.d.ts +18 -0
- package/dist/routing/hooks/useRouteParam.vite.d.ts.map +1 -0
- package/dist/routing/hooks/useRouteParam.vite.js +38 -0
- package/dist/routing/index.d.ts +1 -1
- package/dist/routing/index.d.ts.map +1 -1
- package/dist/routing/index.js +1 -1
- package/dist/routing/useGoTo.d.ts.map +1 -1
- package/dist/styles/index.css +823 -122
- package/dist/utils/assetResolver.d.ts +1 -1
- package/dist/utils/assetResolver.d.ts.map +1 -1
- package/dist/utils/assetResolver.js +1 -2
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/tList.d.ts +1 -1
- package/dist/utils/tList.d.ts.map +1 -1
- package/dist/utils/useAuthSafe.d.ts +0 -33
- package/dist/utils/useAuthSafe.d.ts.map +1 -1
- package/dist/utils/useAuthSafe.js +34 -1
- package/dist/utils/useCrudSafe.d.ts +12 -6
- package/dist/utils/useCrudSafe.d.ts.map +1 -1
- package/dist/utils/useCrudSafe.js +11 -7
- package/dist/utils/useOAuthSafe.d.ts.map +1 -1
- package/dist/utils/useStripeBillingSafe.d.ts +1 -34
- package/dist/utils/useStripeBillingSafe.d.ts.map +1 -1
- package/dist/utils/useStripeBillingSafe.js +34 -1
- package/dist/vite-routing/AppRoutes.d.ts +1 -1
- package/dist/vite-routing/AppRoutes.d.ts.map +1 -1
- package/dist/vite-routing/AppRoutes.js +0 -1
- package/dist/vite-routing/RootLayout.d.ts.map +1 -1
- package/dist/vite-routing/RootLayout.js +6 -6
- package/package.json +9 -9
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @fileoverview Shared Error Fallback Component
|
|
3
|
-
* @description A single error UI that takes full viewport and adapts recovery actions based on the context (global vs route errors). Uses only native HTML elements and emojis to avoid component dependencies.
|
|
4
|
-
* it's not using anything to make sure it doesnt crash.
|
|
5
|
-
*
|
|
6
|
-
* @version 0.0.1
|
|
7
|
-
* @since 0.0.1
|
|
8
|
-
* @author AMBROISE PARK Consulting
|
|
9
|
-
*/
|
|
10
|
-
import { type ComponentType } from 'react';
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
11
2
|
interface ErrorFallbackProps {
|
|
12
3
|
error: unknown;
|
|
13
4
|
resetError: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorFallback.d.ts","sourceRoot":"","sources":["../../../src/internal/common/ErrorFallback.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorFallback.d.ts","sourceRoot":"","sources":["../../../src/internal/common/ErrorFallback.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,UAAU,kBAAkB;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;GAUG;AACH,QAAA,MAAM,aAAa,EAAE,aAAa,CAAC,kBAAkB,CA0TpD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @fileoverview GlobalErrorFallback component
|
|
3
|
-
* @description Global error boundary fallback for application-level errors
|
|
4
|
-
*
|
|
5
|
-
* @version 0.0.1
|
|
6
|
-
* @since 0.0.1
|
|
7
|
-
* @author AMBROISE PARK Consulting
|
|
8
|
-
*/
|
|
9
|
-
import { type ComponentType } from 'react';
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
10
2
|
interface SentryFallbackProps {
|
|
11
3
|
error: unknown;
|
|
12
4
|
resetError: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalErrorFallback.d.ts","sourceRoot":"","sources":["../../../src/internal/common/GlobalErrorFallback.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GlobalErrorFallback.d.ts","sourceRoot":"","sources":["../../../src/internal/common/GlobalErrorFallback.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,UAAU,mBAAmB;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED;;;;;;GAMG;AACH,QAAA,MAAM,mBAAmB,EAAE,aAAa,CAAC,mBAAmB,CAuC3D,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -13,9 +13,9 @@ import { AlertTriangle, Home, ArrowLeft, RotateCw, Copy, Check, } from 'lucide-r
|
|
|
13
13
|
import { useEffect, useState } from 'react';
|
|
14
14
|
import { Button, BUTTON_VARIANT, Card, CARD_VARIANT, Alert, ALERT_VARIANT, Stack, } from '@donotdev/components';
|
|
15
15
|
import { handleError, useTranslation } from '@donotdev/core';
|
|
16
|
+
import { useLocation, useBack } from '@donotdev/ui/routing/hooks';
|
|
16
17
|
import { PageContainer } from '../../components/layout/PageContainer';
|
|
17
18
|
// Platform-specific hooks via conditional exports
|
|
18
|
-
import { useLocation, useBack } from '@donotdev/ui/routing/hooks';
|
|
19
19
|
import { Link } from '../../routing/Link';
|
|
20
20
|
/**
|
|
21
21
|
* Professional Route Error Fallback Component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DebugDialog.d.ts","sourceRoot":"","sources":["../../../../src/internal/devtools/components/DebugDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DebugDialog.d.ts","sourceRoot":"","sources":["../../../../src/internal/devtools/components/DebugDialog.tsx"],"names":[],"mappings":"AA8BA,eAAO,MAAM,WAAW,+CAiFvB,CAAC"}
|
|
@@ -12,13 +12,15 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
12
12
|
import { PanelRight } from 'lucide-react';
|
|
13
13
|
import { useState } from 'react';
|
|
14
14
|
import { Button, BUTTON_VARIANT, Sheet, Tabs, Stack, ScrollArea, } from '@donotdev/components';
|
|
15
|
+
import { useTranslation } from '@donotdev/core';
|
|
15
16
|
import { ConfigTab } from './ConfigTab';
|
|
16
17
|
import { CookieTab } from './CookieTab';
|
|
17
18
|
import { DesignTab } from './DesignTab';
|
|
18
19
|
import { StoresTab } from './StoresTab';
|
|
19
20
|
export const DebugDialog = () => {
|
|
21
|
+
const { t } = useTranslation('dndev');
|
|
20
22
|
const [open, setOpen] = useState(false);
|
|
21
|
-
return (_jsx(Sheet, { open: open, onOpenChange: setOpen, trigger: _jsx(Button, { icon: PanelRight, iconEnd: true, variant: BUTTON_VARIANT.OUTLINE, className: "dndev-flex-1 dndev-justify-center dndev-items-center", title: "Open debug panel", "aria-label": "Debug panel", children: "\uD83D\uDC1B Debug Tools" }), side: "top", showOverlay: false, title:
|
|
23
|
+
return (_jsx(Sheet, { open: open, onOpenChange: setOpen, trigger: _jsx(Button, { icon: PanelRight, iconEnd: true, variant: BUTTON_VARIANT.OUTLINE, className: "dndev-flex-1 dndev-justify-center dndev-items-center", title: "Open debug panel", "aria-label": "Debug panel", children: "\uD83D\uDC1B Debug Tools" }), side: "top", showOverlay: false, title: t('sheet.debugPanel', { defaultValue: 'Debug Panel' }), className: "dndev-h-[80vh] dndev-max-h-[80vh]", "data-dndev-devtools": "true", children: _jsx(Stack, { flex: "1", className: "dndev-h-full dndev-min-h-0", style: { padding: 0, overflow: 'hidden', height: '100%' }, children: _jsx(Tabs, { defaultValue: "config", className: "dndev-flex-1 dndev-min-h-0 dndev-flex dndev-flex-col dndev-h-full", items: [
|
|
22
24
|
{
|
|
23
25
|
value: 'config',
|
|
24
26
|
label: 'Config',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DesignTab.d.ts","sourceRoot":"","sources":["../../../../src/internal/devtools/components/DesignTab.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DesignTab.d.ts","sourceRoot":"","sources":["../../../../src/internal/devtools/components/DesignTab.tsx"],"names":[],"mappings":"AA+CA,eAAO,MAAM,SAAS,+CA2yBrB,CAAC"}
|
|
@@ -175,6 +175,9 @@ export const DesignTab = () => {
|
|
|
175
175
|
'--input',
|
|
176
176
|
'--ring',
|
|
177
177
|
'--radius',
|
|
178
|
+
'--font-sans',
|
|
179
|
+
'--font-mono',
|
|
180
|
+
'--font-family',
|
|
178
181
|
];
|
|
179
182
|
relevantVars.forEach((varName) => {
|
|
180
183
|
const value = style.getPropertyValue(varName).trim();
|
|
@@ -194,6 +197,7 @@ export const DesignTab = () => {
|
|
|
194
197
|
const analyzeTypography = () => {
|
|
195
198
|
const elements = document.querySelectorAll('*');
|
|
196
199
|
const fontSizeMap = new Map();
|
|
200
|
+
const fontFamilyMap = new Map();
|
|
197
201
|
let analyzedCount = 0;
|
|
198
202
|
elements.forEach((el) => {
|
|
199
203
|
if (isOverlayElement(el))
|
|
@@ -216,12 +220,23 @@ export const DesignTab = () => {
|
|
|
216
220
|
const fontSize = style.fontSize;
|
|
217
221
|
const fontSizeRounded = parseFloat(fontSize).toFixed(2) + 'px';
|
|
218
222
|
fontSizeMap.set(fontSizeRounded, (fontSizeMap.get(fontSizeRounded) || 0) + 1);
|
|
223
|
+
const fontFamily = style.fontFamily
|
|
224
|
+
?.split(',')[0]
|
|
225
|
+
?.trim()
|
|
226
|
+
?.replace(/['"]/g, '');
|
|
227
|
+
if (fontFamily) {
|
|
228
|
+
fontFamilyMap.set(fontFamily, (fontFamilyMap.get(fontFamily) || 0) + 1);
|
|
229
|
+
}
|
|
219
230
|
});
|
|
220
231
|
const fontSizes = Array.from(fontSizeMap.entries())
|
|
221
232
|
.map(([size, count]) => ({ size, count }))
|
|
222
233
|
.sort((a, b) => b.count - a.count);
|
|
234
|
+
const fontFamilies = Array.from(fontFamilyMap.entries())
|
|
235
|
+
.map(([family, count]) => ({ family, count }))
|
|
236
|
+
.sort((a, b) => b.count - a.count);
|
|
223
237
|
return {
|
|
224
238
|
fontSizes,
|
|
239
|
+
fontFamilies,
|
|
225
240
|
totalElements: analyzedCount,
|
|
226
241
|
};
|
|
227
242
|
};
|
|
@@ -376,7 +391,14 @@ export const DesignTab = () => {
|
|
|
376
391
|
flexShrink: 0,
|
|
377
392
|
} }), _jsxs(Text, { className: "dndev-text-xs dndev-font-mono", style: { flex: 1 }, children: [c.percentage.toFixed(1), "%"] }), _jsx(Badge, { variant: BADGE_VARIANT.SECONDARY, children: c.category })] }, i))) })),
|
|
378
393
|
},
|
|
379
|
-
] }))] }) })), typography && (
|
|
394
|
+
] }))] }) })), typography && typography.fontFamilies.length > 0 && (_jsx(Card, { content: _jsxs(Stack, { direction: "row", align: "center", justify: "between", className: "dndev-w-full", children: [_jsx("span", { children: "Font Families" }), _jsxs(Badge, { variant: BADGE_VARIANT.SECONDARY, children: [typography.fontFamilies.length, " families"] })] }), children: _jsx(Stack, { gap: "tight", className: "dndev-mt-xs", children: typography.fontFamilies.map((f, i) => (_jsxs(Stack, { direction: "row", justify: "between", align: "center", gap: "tight", style: {
|
|
395
|
+
padding: 'var(--gap-sm)',
|
|
396
|
+
borderRadius: 'var(--radius-sm)',
|
|
397
|
+
}, children: [_jsx(Text, { className: "dndev-font-mono dndev-text-xs", style: { flex: 1 }, children: f.family }), _jsxs(Text, { className: "dndev-text-xs", style: {
|
|
398
|
+
opacity: 0.6,
|
|
399
|
+
minWidth: '2rem',
|
|
400
|
+
textAlign: 'end',
|
|
401
|
+
}, children: [f.count, "\u00D7"] })] }, i))) }) })), typography && (_jsxs(Card, { content: _jsxs(Stack, { direction: "row", align: "center", justify: "between", className: "dndev-w-full", children: [_jsx("span", { children: "Font Sizes" }), _jsxs(Badge, { variant: BADGE_VARIANT.SECONDARY, children: [typography.totalElements, " elements"] })] }), children: [_jsxs(Stack, { direction: "row", align: "center", justify: "between", children: [_jsxs(Label, { className: "dndev-text-sm dndev-font-semibold", children: [typography.fontSizes.length, " sizes"] }), (highlightedSize || Object.keys(fontSizeColors).length > 0) && (_jsx(Button, { variant: BUTTON_VARIANT.GHOST, onClick: clearHighlights, style: { padding: '0 var(--gap-sm)', height: 'auto' }, children: _jsx(Text, { className: "dndev-text-xs", children: "Clear All" }) }))] }), _jsx(Stack, { gap: "tight", className: "dndev-mt-xs", children: typography.fontSizes.map((f, i) => {
|
|
380
402
|
const isOrphan = f.count < 5;
|
|
381
403
|
const isHighlighted = highlightedSize === f.size;
|
|
382
404
|
const currentColor = fontSizeColors[f.size] || '';
|
|
@@ -400,7 +422,7 @@ export const DesignTab = () => {
|
|
|
400
422
|
console.log(`Found ${found.length} elements with ${f.size}`);
|
|
401
423
|
};
|
|
402
424
|
return (_jsxs(Stack, { direction: "row", justify: "between", align: "center", gap: "tight", style: {
|
|
403
|
-
padding: 'var(--gap-
|
|
425
|
+
padding: 'var(--gap-sm)',
|
|
404
426
|
borderRadius: 'var(--radius-sm)',
|
|
405
427
|
backgroundColor: isHighlighted
|
|
406
428
|
? 'var(--primary)'
|
|
@@ -412,7 +434,7 @@ export const DesignTab = () => {
|
|
|
412
434
|
e.stopPropagation();
|
|
413
435
|
findOrphanElements();
|
|
414
436
|
}, style: {
|
|
415
|
-
padding: '0 var(--gap-
|
|
437
|
+
padding: '0 var(--gap-sm)',
|
|
416
438
|
height: '1.5rem',
|
|
417
439
|
minWidth: '2rem',
|
|
418
440
|
}, title: `Find ${f.size} elements in console`, children: _jsx(Text, { className: "dndev-text-xs", children: "\uD83D\uDD0D" }) })) : (_jsx("input", { type: "color", value: currentColor || '#000000', onChange: (e) => applyFontSizeColor(f.size, e.target.value), onClick: (e) => e.stopPropagation(), style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaskedValue.d.ts","sourceRoot":"","sources":["../../../../src/internal/devtools/components/MaskedValue.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MaskedValue.d.ts","sourceRoot":"","sources":["../../../../src/internal/devtools/components/MaskedValue.tsx"],"names":[],"mappings":"AAgCA,MAAM,WAAW,gBAAgB;IAC/B,iEAAiE;IAEjE,OAAO,EAAE,MAAM,CAAC;IAEhB,4EAA4E;IAE5E,KAAK,EAAE,MAAM,CAAC;IAEd,2CAA2C;IAE3C,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,sCAAsC;IAEtC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,oDAAoD;IAEpD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;GAMG;AAEH,eAAO,MAAM,WAAW,GAAI,wDAUzB,gBAAgB,4CA2ElB,CAAC"}
|
|
@@ -16,9 +16,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
16
16
|
* @author AMBROISE PARK Consulting
|
|
17
17
|
|
|
18
18
|
*/
|
|
19
|
+
import { Eye, EyeOff } from 'lucide-react';
|
|
19
20
|
import { useState } from 'react';
|
|
20
21
|
import { Stack, Text, Button, BUTTON_VARIANT, CopyToClipboard, } from '@donotdev/components';
|
|
21
|
-
import { Eye, EyeOff } from 'lucide-react';
|
|
22
22
|
import { shouldMaskValue, maskSensitiveValue } from '../utils/maskSensitive';
|
|
23
23
|
/**
|
|
24
24
|
|
|
@@ -9,9 +9,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
* @since 0.0.1
|
|
10
10
|
* @author AMBROISE PARK Consulting
|
|
11
11
|
*/
|
|
12
|
+
import { RefreshCw } from 'lucide-react';
|
|
12
13
|
import { useState, useEffect, useCallback } from 'react';
|
|
13
14
|
import { Stack, Card, Accordion, ScrollArea, JsonViewer, Text, Badge, BADGE_VARIANT, Button, BUTTON_VARIANT, } from '@donotdev/components';
|
|
14
|
-
import { RefreshCw } from 'lucide-react';
|
|
15
15
|
const STORE_NAMES = {
|
|
16
16
|
'theme-store': 'Theme',
|
|
17
17
|
'consent-store': 'Consent',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseStoresInitializer.d.ts","sourceRoot":"","sources":["../../../src/internal/initializers/BaseStoresInitializer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseStoresInitializer.d.ts","sourceRoot":"","sources":["../../../src/internal/initializers/BaseStoresInitializer.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA4DvC;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,aAAa,CAAC;IACxB,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAyGD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,QAAQ,EACR,YAAiB,EACjB,aAAqB,EACrB,aAAa,GACd,EAAE,0BAA0B,kDAgJ5B"}
|
|
@@ -10,7 +10,7 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
|
10
10
|
* @author AMBROISE PARK Consulting
|
|
11
11
|
*/
|
|
12
12
|
import { useEffect, useLayoutEffect, useRef } from 'react';
|
|
13
|
-
import { useThemeStore, useNavigationStore,
|
|
13
|
+
import { useThemeStore, useNavigationStore, useOverlayStore, useNetworkStore, useAbortControllerStore, useConsentStore, useConsentReady, useThemeReady, getPlatformEnvVar, } from '@donotdev/core';
|
|
14
14
|
import { useI18nReady } from '@donotdev/core';
|
|
15
15
|
import { handleError, isClient, getDndevConfig, globalEmitter, } from '@donotdev/core';
|
|
16
16
|
import { useAppConfig } from '@donotdev/core';
|
|
@@ -65,7 +65,6 @@ function removeShellLoader(options) {
|
|
|
65
65
|
const STORE_CONFIG = [
|
|
66
66
|
{ name: 'consent', type: 'critical', store: useConsentStore },
|
|
67
67
|
{ name: 'theme', type: 'critical', store: useThemeStore },
|
|
68
|
-
{ name: 'loading', type: 'regular', store: useLoadingStore },
|
|
69
68
|
{ name: 'overlay', type: 'regular', store: useOverlayStore },
|
|
70
69
|
{ name: 'network', type: 'regular', store: useNetworkStore },
|
|
71
70
|
{ name: 'abort', type: 'regular', store: useAbortControllerStore },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NextJsStoresInitializer.d.ts","sourceRoot":"","sources":["../../../src/internal/initializers/NextJsStoresInitializer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NextJsStoresInitializer.d.ts","sourceRoot":"","sources":["../../../src/internal/initializers/NextJsStoresInitializer.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAOxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,4BAA4B;IACpC,QAAQ,EAAE,SAAS,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAQD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,aAAa,GACd,EAAE,4BAA4B,kDA2D9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DnDevLayout.d.ts","sourceRoot":"","sources":["../../../src/internal/layout/DnDevLayout.tsx"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AAEH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DnDevLayout.d.ts","sourceRoot":"","sources":["../../../src/internal/layout/DnDevLayout.tsx"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AAEH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAIV,YAAY,EACb,MAAM,gBAAgB,CAAC;AA0CxB,UAAU,yBAAyB;IACjC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW,GAAI,kCAIzB,yBAAyB,4CA2T3B,CAAC"}
|
|
@@ -11,18 +11,17 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
11
11
|
* @author AMBROISE PARK Consulting
|
|
12
12
|
*/
|
|
13
13
|
import { useLayoutEffect, useEffect, useRef, useMemo, Suspense, startTransition, lazy, } from 'react';
|
|
14
|
-
import { Outlet } from 'react-router-dom';
|
|
15
14
|
import { cn, Stack } from '@donotdev/components';
|
|
16
15
|
import { isClient, isNextJs, isDev, useBreakpoint } from '@donotdev/core';
|
|
17
16
|
import { useLayout } from '@donotdev/core';
|
|
18
17
|
import { useTranslation } from '@donotdev/core';
|
|
19
18
|
import { useAppConfig } from '@donotdev/core';
|
|
20
19
|
import { LAYOUT_PRESET, DENSITY } from '@donotdev/core';
|
|
20
|
+
import { useLocation } from '@donotdev/ui/routing/hooks';
|
|
21
21
|
import Breadcrumbs from '../../components/layout/components/Breadcrumbs';
|
|
22
22
|
import { GoToWrapper } from '../../routing';
|
|
23
|
-
import { useLocation } from '@donotdev/ui/routing/hooks';
|
|
24
|
-
import { presetRegistry } from './config/presets';
|
|
25
23
|
import { DEFAULT_SLOTS } from './config/defaults';
|
|
24
|
+
import { presetRegistry } from './config/presets';
|
|
26
25
|
import { DnDevHeader, DnDevSidebar, DnDevFooter, DnDevMergedBar, } from './zones';
|
|
27
26
|
const DebugTools = lazy(() => {
|
|
28
27
|
return import('../devtools')
|
|
@@ -74,7 +73,7 @@ export const DnDevLayout = ({ children, layout, className, }) => {
|
|
|
74
73
|
const pathname = location.pathname;
|
|
75
74
|
const mainRef = useRef(null);
|
|
76
75
|
// Platform content handling
|
|
77
|
-
const content =
|
|
76
|
+
const content = children;
|
|
78
77
|
// Get effective preset from store (always use store, never layout prop)
|
|
79
78
|
const effectivePreset = useMemo(() => {
|
|
80
79
|
return preset || 'landing';
|
|
@@ -247,5 +246,5 @@ export const DnDevLayout = ({ children, layout, className, }) => {
|
|
|
247
246
|
};
|
|
248
247
|
startTransition(updateDOM);
|
|
249
248
|
}, [effectivePreset]);
|
|
250
|
-
return (_jsxs("div", { className: cn('dndev-layout', className), children: [resolvedHeader, resolvedSidebar, _jsxs("main", { ref: mainRef, role: "main", className: "main", children: [breadcrumbs !== 'never' && (_jsx("div", { className: "breadcrumbs-container", children: _jsx(Breadcrumbs, { variant: breadcrumbs === 'always' ? 'default' : 'smart' }) })), isDev() && (_jsx(Suspense, { fallback: null, children: _jsx(DebugTools, {}) })), _jsx(Stack, { flex: "1", className: "dndev-min-h-0", children: content }, pathname)] }), resolvedFooter, resolvedMergedBar, _jsx(GoToWrapper, {})] }));
|
|
249
|
+
return (_jsxs("div", { className: cn('dndev-layout', className), children: [resolvedHeader, resolvedSidebar, _jsxs("main", { ref: mainRef, role: "main", className: "main", children: [breadcrumbs !== 'never' && (_jsx("div", { className: "breadcrumbs-container", children: _jsx(Breadcrumbs, { variant: breadcrumbs === 'always' ? 'default' : 'smart' }) })), isDev() && (_jsx(Suspense, { fallback: null, children: _jsx(DebugTools, {}) })), _jsx(Stack, { flex: "1", className: "dndev-min-h-0", children: content }, pathname), resolvedFooter && (_jsx("div", { className: "footer-mobile", children: resolvedFooter }))] }), resolvedFooter && _jsx("div", { className: "footer-desktop", children: resolvedFooter }), resolvedMergedBar, _jsx(GoToWrapper, {})] }));
|
|
251
250
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoMetaTags.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/components/AutoMetaTags.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AutoMetaTags.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/components/AutoMetaTags.tsx"],"names":[],"mappings":"AA0DA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAwC3C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,EAAE,aAoN1B,CAAC;AAEF;;;GAGG;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PerformanceHints.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/components/PerformanceHints.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PerformanceHints.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/components/PerformanceHints.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAmC3C,UAAU,WAAW;IACnB,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,WAAW,CAAC,EAAE,WAAW,GAAG,iBAAiB,CAAC;CAC/C;AAED,UAAU,qBAAqB;IAC7B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,GAAG,WAAW,CAAC,EAAE,CAAC;IACxC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,QAAA,MAAM,gBAAgB,EAAE,aAAa,CAAC,qBAAqB,CA6D1D,CAAC;AAEF,eAAe,gBAAgB,CAAC;AAChC,YAAY,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -40,9 +40,10 @@ const DEFAULT_DNS_PREFETCH = [
|
|
|
40
40
|
];
|
|
41
41
|
/**
|
|
42
42
|
* Default critical fonts to preload
|
|
43
|
-
*
|
|
43
|
+
* Empty by default - apps should specify their own fonts based on their font-display strategy
|
|
44
|
+
* Note: Don't preload fonts with font-display: optional (they're meant to be non-blocking)
|
|
44
45
|
*/
|
|
45
|
-
const DEFAULT_FONT_PRELOADS = [
|
|
46
|
+
const DEFAULT_FONT_PRELOADS = [];
|
|
46
47
|
/**
|
|
47
48
|
* PerformanceHints component
|
|
48
49
|
*
|
|
@@ -10,9 +10,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
10
10
|
*/
|
|
11
11
|
import { Stack } from '@donotdev/components';
|
|
12
12
|
import { useTranslation, maybeTranslate, useAppConfig } from '@donotdev/core';
|
|
13
|
-
import { Link } from '../../../../routing/Link';
|
|
14
|
-
import { useLegalLinks } from './useLegalLinks';
|
|
15
13
|
import { FooterBranding } from './FooterBranding';
|
|
14
|
+
import { useLegalLinks } from './useLegalLinks';
|
|
15
|
+
import { Link } from '../../../../routing/Link';
|
|
16
16
|
/**
|
|
17
17
|
* FooterLegalLinks - Legal links component
|
|
18
18
|
*
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Slot Defaults
|
|
3
|
-
* @description Default slot functions for zone components.
|
|
4
|
-
* All slots are functions that return ReactNode (never null in defaults).
|
|
5
|
-
* Zones use these unless preset overrides.
|
|
6
|
-
*
|
|
7
|
-
* @version 0.0.1
|
|
8
|
-
* @since 0.0.1
|
|
9
|
-
* @author AMBROISE PARK Consulting
|
|
10
|
-
*/
|
|
11
1
|
import type { ReactNode } from 'react';
|
|
12
2
|
/**
|
|
13
3
|
* Default slot functions - zones use these unless preset overrides
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/config/defaults.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/config/defaults.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;QAEtB,2DAA2D;qBAChD,SAAS;QAEpB,+DAA+D;sBACnD,SAAS;QAErB,+CAA+C;mBACtC,SAAS;;;QAWlB,4DAA4D;mBACnD,SAAS;QAElB,uCAAuC;uBAC1B,SAAS;QAItB,4CAA4C;sBAChC,SAAS;QAQrB,yBAAyB;;;;;;;YAQvB,mCAAmC;2BACtB,SAAS;YAEtB,4DAA4D;uBACnD,SAAS;YAElB,gEAAgE;2BACnD,SAAS;YAEtB,8DAA8D;0BAClD,SAAS;;;CAG1B,CAAC"}
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// packages/ui/src/internal/layout/config/defaults.tsx
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview Slot Defaults
|
|
5
|
+
* @description Default slot functions for zone components.
|
|
6
|
+
* All slots are functions that return ReactNode (never null in defaults).
|
|
7
|
+
* Zones use these unless preset overrides.
|
|
8
|
+
*
|
|
9
|
+
* @version 0.0.1
|
|
10
|
+
* @since 0.0.1
|
|
11
|
+
* @author AMBROISE PARK Consulting
|
|
12
|
+
*/
|
|
2
13
|
import { DISPLAY } from '@donotdev/components';
|
|
3
14
|
import { LanguageSelector } from '@donotdev/core';
|
|
4
15
|
import { AuthHeader } from '../../../components/auth';
|
|
5
16
|
import { AppBranding, ThemeToggle, } from '../../../components/layout/components';
|
|
6
|
-
import { GoTo } from '../../../routing/GoTo';
|
|
7
17
|
import { DnDevNavigationMenu } from '../../../routing';
|
|
18
|
+
import { GoTo } from '../../../routing/GoTo';
|
|
8
19
|
/**
|
|
9
20
|
* Default slot functions - zones use these unless preset overrides
|
|
10
21
|
*
|
|
@@ -12,8 +12,8 @@ import type { PresetConfig } from '@donotdev/core';
|
|
|
12
12
|
* Admin preset - admin panel layout
|
|
13
13
|
*
|
|
14
14
|
* Zones:
|
|
15
|
-
* - Header: Logo + title (left),
|
|
16
|
-
* - Sidebar: Navigation menu
|
|
15
|
+
* - Header: Logo + title (left), GoTo + Auth + Language + Theme (right)
|
|
16
|
+
* - Sidebar: Navigation menu only (no bottom controls - they're in header)
|
|
17
17
|
* - Footer: Automatic footer (copyright + legal links + DoNotDev branding)
|
|
18
18
|
*
|
|
19
19
|
* Mobile behavior:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/config/presets/admin.tsx"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/config/presets/admin.tsx"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAInD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,EAAE,YAsBzB,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// packages/ui/src/internal/layout/config/presets/admin.tsx
|
|
2
|
+
import { DEFAULT_SLOTS } from '../defaults';
|
|
2
3
|
/**
|
|
3
4
|
* Admin preset - admin panel layout
|
|
4
5
|
*
|
|
5
6
|
* Zones:
|
|
6
|
-
* - Header: Logo + title (left),
|
|
7
|
-
* - Sidebar: Navigation menu
|
|
7
|
+
* - Header: Logo + title (left), GoTo + Auth + Language + Theme (right)
|
|
8
|
+
* - Sidebar: Navigation menu only (no bottom controls - they're in header)
|
|
8
9
|
* - Footer: Automatic footer (copyright + legal links + DoNotDev branding)
|
|
9
10
|
*
|
|
10
11
|
* Mobile behavior:
|
|
@@ -13,14 +14,22 @@
|
|
|
13
14
|
*/
|
|
14
15
|
export const adminPreset = {
|
|
15
16
|
name: 'admin',
|
|
16
|
-
// header omitted → uses DEFAULT_SLOTS.header
|
|
17
|
-
|
|
17
|
+
// header omitted → uses DEFAULT_SLOTS.header (GoTo + Auth + Language + Theme)
|
|
18
|
+
sidebar: {
|
|
19
|
+
// content omitted → uses DEFAULT_SLOTS.sidebar.content (NavigationMenu)
|
|
20
|
+
// bottom explicitly empty - Auth/Language/Theme are in header, no duplication
|
|
21
|
+
bottom: () => null,
|
|
22
|
+
},
|
|
18
23
|
footer: {},
|
|
19
24
|
mobile: {
|
|
20
25
|
mergedBar: {
|
|
21
26
|
position: 'top',
|
|
22
|
-
height: '
|
|
23
|
-
//
|
|
27
|
+
height: 'var(--header-height)',
|
|
28
|
+
// Desktop → Mobile mapping:
|
|
29
|
+
trigger: DEFAULT_SLOTS.header.start, // header.start → trigger (AppBranding)
|
|
30
|
+
top: DEFAULT_SLOTS.header.center, // header.center → top (null)
|
|
31
|
+
content: DEFAULT_SLOTS.sidebar.content, // sidebar.content → content (NavigationMenu)
|
|
32
|
+
bottom: DEFAULT_SLOTS.header.end, // header.end → bottom (GoTo, Auth, Language, Theme)
|
|
24
33
|
},
|
|
25
34
|
},
|
|
26
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blog.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/config/presets/blog.tsx"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"blog.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/config/presets/blog.tsx"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAInD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,EAAE,YAkBxB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// packages/ui/src/internal/layout/config/presets/blog.tsx
|
|
2
|
+
import { DEFAULT_SLOTS } from '../defaults';
|
|
2
3
|
/**
|
|
3
4
|
* Blog preset - content-focused layout
|
|
4
5
|
*
|
|
@@ -19,7 +20,12 @@ export const blogPreset = {
|
|
|
19
20
|
mobile: {
|
|
20
21
|
mergedBar: {
|
|
21
22
|
position: 'bottom',
|
|
22
|
-
//
|
|
23
|
+
// Desktop → Mobile mapping:
|
|
24
|
+
trigger: DEFAULT_SLOTS.header.start, // header.start → trigger (AppBranding)
|
|
25
|
+
top: DEFAULT_SLOTS.header.center, // header.center → top (null)
|
|
26
|
+
content: DEFAULT_SLOTS.sidebar.content, // sidebar.content → content (NavigationMenu)
|
|
27
|
+
bottom: DEFAULT_SLOTS.header.end, // header.end → bottom (GoTo, Auth, Language, Theme)
|
|
28
|
+
// Note: sidebar.bottom also has Auth+Lang+Theme, but header.end includes GoTo, so use header.end
|
|
23
29
|
},
|
|
24
30
|
},
|
|
25
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/config/presets/docs.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/config/presets/docs.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAMnD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,UAAU,EAAE,YA8BxB,CAAC"}
|
|
@@ -12,6 +12,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
12
12
|
import { DISPLAY } from '@donotdev/components';
|
|
13
13
|
import { AppBranding } from '../../../../components/layout/components';
|
|
14
14
|
import { GoTo } from '../../../../routing/GoTo';
|
|
15
|
+
import { DEFAULT_SLOTS } from '../defaults';
|
|
15
16
|
/**
|
|
16
17
|
* Docs preset - documentation layout
|
|
17
18
|
*
|
|
@@ -39,11 +40,12 @@ export const docsPreset = {
|
|
|
39
40
|
mobile: {
|
|
40
41
|
mergedBar: {
|
|
41
42
|
position: 'top',
|
|
42
|
-
height: '
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
//
|
|
43
|
+
height: 'var(--header-height)',
|
|
44
|
+
// Desktop → Mobile mapping:
|
|
45
|
+
trigger: () => _jsx(AppBranding, { display: DISPLAY.AUTO }), // sidebar.top (AppBranding) → trigger
|
|
46
|
+
top: () => _jsx(GoTo, { display: DISPLAY.AUTO }), // sidebar.top (GoTo) → top
|
|
47
|
+
content: DEFAULT_SLOTS.sidebar.content, // sidebar.content → content (NavigationMenu)
|
|
48
|
+
bottom: DEFAULT_SLOTS.sidebar.bottom, // sidebar.bottom → bottom (Auth, Language, Theme)
|
|
47
49
|
},
|
|
48
50
|
},
|
|
49
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"game.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/config/presets/game.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AASnD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"game.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/config/presets/game.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AASnD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,EAAE,YAkCxB,CAAC"}
|
|
@@ -36,8 +36,13 @@ export const gamePreset = {
|
|
|
36
36
|
mobile: {
|
|
37
37
|
mergedBar: {
|
|
38
38
|
position: 'top',
|
|
39
|
-
|
|
40
|
-
//
|
|
39
|
+
// Desktop → Mobile mapping:
|
|
40
|
+
trigger: () => _jsx(GameTitle, {}), // header.center → trigger (GameTitle, since header.start is null)
|
|
41
|
+
top: () => _jsx(GameTitle, {}), // header.center → top (GameTitle)
|
|
42
|
+
content: () => null, // No sidebar → content is null
|
|
43
|
+
bottom: () => (
|
|
44
|
+
// header.end → bottom (Auth, Language, Theme)
|
|
45
|
+
_jsxs(_Fragment, { children: [_jsx(AuthHeader, { display: DISPLAY.AUTO }), _jsx(LanguageSelector, { display: DISPLAY.AUTO }), _jsx(ThemeToggle, { display: DISPLAY.AUTO })] })),
|
|
41
46
|
},
|
|
42
47
|
},
|
|
43
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moolti.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/config/presets/moolti.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAUnD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"moolti.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/config/presets/moolti.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAUnD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,EAAE,YAgD1B,CAAC"}
|
|
@@ -13,8 +13,8 @@ import { DISPLAY, Stack } from '@donotdev/components';
|
|
|
13
13
|
import { LanguageSelector } from '@donotdev/core';
|
|
14
14
|
import { AuthHeader } from '../../../../components/auth';
|
|
15
15
|
import { AppBranding, ThemeToggle, } from '../../../../components/layout/components';
|
|
16
|
-
import { FooterCopyright } from '../../components';
|
|
17
16
|
import { DnDevNavigationMenu, GoTo } from '../../../../routing';
|
|
17
|
+
import { FooterCopyright } from '../../components';
|
|
18
18
|
/**
|
|
19
19
|
* Moolti preset - SaaS app layout
|
|
20
20
|
*
|
|
@@ -40,8 +40,15 @@ export const mooltiPreset = {
|
|
|
40
40
|
mobile: {
|
|
41
41
|
mergedBar: {
|
|
42
42
|
position: 'top',
|
|
43
|
-
|
|
44
|
-
// top
|
|
43
|
+
// Desktop → Mobile mapping:
|
|
44
|
+
trigger: () => _jsx(AppBranding, { display: DISPLAY.AUTO }), // sidebar.top → trigger (AppBranding)
|
|
45
|
+
top: () => null, // No header.center → top is null
|
|
46
|
+
content: () => (
|
|
47
|
+
// sidebar.content → content (GoTo + NavigationMenu)
|
|
48
|
+
_jsxs(_Fragment, { children: [_jsx(GoTo, { display: DISPLAY.AUTO }), _jsx(DnDevNavigationMenu, { vertical: true, display: DISPLAY.AUTO })] })),
|
|
49
|
+
bottom: () => (
|
|
50
|
+
// sidebar.bottom → bottom (Auth, Language, Theme, Footer)
|
|
51
|
+
_jsxs(Stack, { direction: "column", gap: "tight", align: "stretch", children: [_jsx(AuthHeader, { display: DISPLAY.AUTO }), _jsx(LanguageSelector, { display: DISPLAY.AUTO }), _jsx(ThemeToggle, { display: DISPLAY.AUTO }), _jsx(FooterCopyright, { size: "xs" })] })),
|
|
45
52
|
},
|
|
46
53
|
},
|
|
47
54
|
};
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview DnDevFooter Zone Component
|
|
3
|
-
* @description Footer zone with smart defaults.
|
|
4
|
-
*
|
|
5
|
-
* Default layout: Stack(FooterCopyright, FooterLegalLinks, FooterBranding)
|
|
6
|
-
* - Desktop: 2-zone [Copyright] | [Links + Branding]
|
|
7
|
-
* - Mobile: 2-line stacked, centered
|
|
8
|
-
*
|
|
9
|
-
* @version 0.0.1
|
|
10
|
-
* @since 0.0.1
|
|
11
|
-
* @author AMBROISE PARK Consulting
|
|
12
|
-
*/
|
|
13
|
-
import { type ReactNode } from 'react';
|
|
14
1
|
import type { AppMetadata } from '@donotdev/core';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
15
3
|
export interface DnDevFooterProps {
|
|
16
4
|
/** App metadata for copyright/links */
|
|
17
5
|
app?: AppMetadata;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DnDevFooter.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/zones/DnDevFooter.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DnDevFooter.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/zones/DnDevFooter.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAUlD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,gBAAgB;IAC/B,uCAAuC;IACvC,GAAG,CAAC,EAAE,WAAW,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,iBAAS,oBAAoB,CAAC,EAAE,GAAQ,EAAE,EAAE,gBAAgB,GAAG,SAAS,CAsEvE;AAED,eAAO,MAAM,WAAW,kEAA6B,CAAC"}
|
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @fileoverview DnDevHeader Zone Component
|
|
3
|
-
* @description Header zone with smart defaults.
|
|
4
|
-
*
|
|
5
|
-
* Layout: start (start-aligned) | center (absolutely centered) | end (end-aligned)
|
|
6
|
-
* - start: [AppIcon, AppTitle] - start-aligned
|
|
7
|
-
* - center: null - absolutely centered overlay (regardless of start/end content)
|
|
8
|
-
* - end: [GoTo, Auth, Language, Theme] - end-aligned
|
|
9
|
-
*
|
|
10
|
-
* @version 0.0.1
|
|
11
|
-
* @since 0.0.1
|
|
12
|
-
* @author AMBROISE PARK Consulting
|
|
13
|
-
*/
|
|
14
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
15
2
|
export interface DnDevHeaderProps {
|
|
16
3
|
/** Start slot - ReactNode from preset or consumer override */
|
|
17
4
|
start?: ReactNode | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DnDevHeader.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/zones/DnDevHeader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DnDevHeader.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/zones/DnDevHeader.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,KAAK,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACzB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1B,4DAA4D;IAC5D,GAAG,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CACxB;AAED;;;;;GAKG;AACH,iBAAS,oBAAoB,CAAC,EAC5B,KAAK,EACL,MAAM,EACN,GAAG,GACJ,EAAE,gBAAgB,GAAG,SAAS,CAgB9B;AAED,eAAO,MAAM,WAAW,kEAA6B,CAAC"}
|