@donotdev/ui 0.0.31 → 0.1.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/LICENSE.md +3 -3
- package/dist/{GoToDialog-CR4VOVXT.js → GoToDialog-RU5RP7S2.js} +1 -1
- package/dist/chunk-ETE4RC7M.js +1 -0
- package/dist/components/auth/AuthHeader.d.ts +8 -3
- package/dist/components/auth/AuthHeader.d.ts.map +1 -1
- package/dist/components/auth/AuthHeader.js +6 -6
- package/dist/components/auth/AuthMenu.d.ts +2 -2
- package/dist/components/auth/AuthMenu.js +1 -1
- package/dist/components/common/FeatureCard.d.ts +2 -0
- package/dist/components/common/FeatureCard.d.ts.map +1 -1
- package/dist/components/common/FeatureCard.js +1 -1
- package/dist/components/common/FeatureDisabled.d.ts +2 -1
- package/dist/components/common/FeatureDisabled.d.ts.map +1 -1
- package/dist/components/common/FeatureDisabled.js +2 -2
- package/dist/components/common/ProgressBar.d.ts +1 -1
- package/dist/components/common/ProgressBar.js +2 -2
- package/dist/components/common/RedirectOverlay.d.ts +1 -1
- package/dist/components/common/RedirectOverlay.js +2 -2
- package/dist/components/common/Skeleton.d.ts +7 -7
- package/dist/components/common/Skeleton.js +8 -8
- package/dist/components/common/TechBento.d.ts +1 -0
- package/dist/components/common/TechBento.d.ts.map +1 -1
- package/dist/components/common/icon.d.ts +2 -1
- package/dist/components/common/icon.d.ts.map +1 -1
- package/dist/components/common/icon.js +2 -2
- package/dist/components/common/index.d.ts +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/cookie-consent/ConsentBanner.d.ts +1 -1
- package/dist/components/cookie-consent/ConsentBanner.js +2 -2
- package/dist/components/cookie-consent/CookieConsent.d.ts +1 -0
- package/dist/components/cookie-consent/CookieConsent.d.ts.map +1 -1
- package/dist/components/cookie-consent/index.d.ts +1 -1
- package/dist/components/cookie-consent/index.js +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/layout/GameContainer.d.ts +1 -1
- package/dist/components/layout/GameContainer.js +2 -2
- package/dist/components/layout/GameFlow.d.ts +2 -2
- package/dist/components/layout/GameFlow.js +2 -2
- package/dist/components/layout/PageConfig.d.ts +25 -0
- package/dist/components/layout/PageConfig.d.ts.map +1 -0
- package/dist/components/layout/PageConfig.js +47 -0
- package/dist/components/layout/PageContainer.d.ts +1 -1
- package/dist/components/layout/PageContainer.js +2 -2
- package/dist/components/layout/components/Breadcrumbs.d.ts +3 -1
- package/dist/components/layout/components/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/layout/components/Breadcrumbs.js +2 -2
- package/dist/components/layout/components/DropdownNavigation.d.ts +1 -1
- package/dist/components/layout/components/DropdownNavigation.js +2 -2
- package/dist/components/layout/components/FloatingLanguageSwitcher.d.ts +2 -1
- package/dist/components/layout/components/FloatingLanguageSwitcher.d.ts.map +1 -1
- package/dist/components/layout/components/FloatingLanguageSwitcher.js +2 -2
- package/dist/components/layout/components/Notifications.d.ts +4 -4
- package/dist/components/layout/components/Notifications.js +3 -3
- package/dist/components/layout/components/header/AppBranding.d.ts +3 -2
- package/dist/components/layout/components/header/AppBranding.d.ts.map +1 -1
- package/dist/components/layout/components/header/AppBranding.js +2 -2
- package/dist/components/layout/components/header/AppIcon.d.ts +2 -1
- package/dist/components/layout/components/header/AppIcon.d.ts.map +1 -1
- package/dist/components/layout/components/header/AppIcon.js +2 -2
- package/dist/components/layout/components/header/AppTitle.d.ts +2 -1
- package/dist/components/layout/components/header/AppTitle.d.ts.map +1 -1
- package/dist/components/layout/components/header/AppTitle.js +2 -2
- package/dist/components/layout/components/header/CacheSettings.d.ts +1 -1
- package/dist/components/layout/components/header/CacheSettings.js +5 -5
- package/dist/components/layout/components/header/GameTitle.d.ts +2 -1
- package/dist/components/layout/components/header/GameTitle.d.ts.map +1 -1
- package/dist/components/layout/components/header/GameTitle.js +2 -2
- package/dist/components/layout/components/header/HeaderMenu.d.ts +2 -1
- package/dist/components/layout/components/header/HeaderMenu.d.ts.map +1 -1
- package/dist/components/layout/components/header/HeaderMenu.js +2 -2
- package/dist/components/layout/components/header/HeaderNavigation.d.ts +2 -1
- package/dist/components/layout/components/header/HeaderNavigation.d.ts.map +1 -1
- package/dist/components/layout/components/header/HeaderNavigation.js +2 -2
- package/dist/components/layout/components/header/SettingsMenu.d.ts +2 -1
- package/dist/components/layout/components/header/SettingsMenu.d.ts.map +1 -1
- package/dist/components/layout/components/header/SettingsMenu.js +2 -2
- package/dist/components/layout/components/header/ThemeToggle.d.ts +1 -1
- package/dist/components/layout/components/header/ThemeToggle.js +2 -2
- package/dist/components/layout/components/index.d.ts +1 -1
- package/dist/components/layout/components/index.js +1 -1
- package/dist/components/layout/index.d.ts +2 -1
- package/dist/components/layout/index.d.ts.map +1 -1
- package/dist/components/layout/index.js +2 -1
- package/dist/components/license/LicenseWatermark.d.ts +1 -1
- package/dist/components/license/LicenseWatermark.js +2 -2
- package/dist/components/license/watermarkData.js +1 -1
- package/dist/crud/components/CrudCardLink.d.ts +1 -1
- package/dist/crud/components/EntityCardList.d.ts +1 -1
- package/dist/crud/components/EntityCardList.d.ts.map +1 -1
- package/dist/crud/components/EntityCardList.js +33 -22
- package/dist/crud/components/EntityDisplayRenderer.d.ts +1 -1
- package/dist/crud/components/EntityDisplayRenderer.d.ts.map +1 -1
- package/dist/crud/components/EntityDisplayRenderer.js +14 -13
- package/dist/crud/components/EntityFormRenderer.d.ts +1 -1
- package/dist/crud/components/EntityFormRenderer.d.ts.map +1 -1
- package/dist/crud/components/EntityFormRenderer.js +18 -20
- package/dist/crud/components/EntityList.d.ts +1 -1
- package/dist/crud/components/EntityList.d.ts.map +1 -1
- package/dist/crud/components/EntityList.js +41 -25
- package/dist/crud/components/EntityRecommendations.d.ts +2 -2
- package/dist/crud/components/EntityRecommendations.d.ts.map +1 -1
- package/dist/crud/components/EntityRecommendations.js +6 -6
- package/dist/crud/components/EntityWorkflow.js +1 -1
- package/dist/crud/components/Form.d.ts +10 -10
- package/dist/crud/components/Form.js +12 -12
- package/dist/crud/components/index.d.ts +1 -1
- package/dist/crud/components/index.js +1 -1
- package/dist/crud/crudImports.d.ts +2 -1
- package/dist/crud/crudImports.d.ts.map +1 -1
- package/dist/crud/crudImports.js +2 -1
- package/dist/crud/index.d.ts +1 -1
- package/dist/crud/index.js +1 -1
- package/dist/data/techLogos.d.ts +1 -1
- package/dist/data/techLogos.js +1 -1
- package/dist/dndev-next.css +374 -81
- package/dist/dndev.css +455 -80
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/internal/common/DnDevErrorBoundary.d.ts +2 -2
- package/dist/internal/common/DnDevErrorBoundary.js +2 -2
- package/dist/internal/common/ErrorFallback.d.ts +1 -1
- package/dist/internal/common/ErrorFallback.js +3 -3
- package/dist/internal/common/GlobalErrorFallback.d.ts +1 -1
- package/dist/internal/common/GlobalErrorFallback.js +2 -2
- package/dist/internal/common/RouteErrorFallback.d.ts +1 -1
- package/dist/internal/common/RouteErrorFallback.js +2 -2
- package/dist/internal/devtools/DebugTools.js +2 -2
- package/dist/internal/devtools/components/AuthDebugButton.js +1 -1
- package/dist/internal/devtools/components/ConfigTab.js +1 -1
- package/dist/internal/devtools/components/CookieTab.js +1 -1
- package/dist/internal/devtools/components/DebugDialog.js +1 -1
- package/dist/internal/devtools/components/DesignTab.d.ts.map +1 -1
- package/dist/internal/devtools/components/DesignTab.js +7 -3
- package/dist/internal/devtools/components/LayoutReset.js +2 -2
- package/dist/internal/devtools/components/MaskedValue.js +1 -1
- package/dist/internal/devtools/components/StoresTab.js +1 -1
- package/dist/internal/devtools/components/index.d.ts +1 -1
- package/dist/internal/devtools/components/index.js +1 -1
- package/dist/internal/devtools/index.d.ts +1 -1
- package/dist/internal/devtools/index.js +1 -1
- package/dist/internal/devtools/types.d.ts +9 -9
- package/dist/internal/devtools/utils/envVarDiscovery.d.ts.map +1 -1
- package/dist/internal/devtools/utils/envVarDiscovery.js +5 -6
- package/dist/internal/devtools/utils/index.d.ts +1 -1
- package/dist/internal/devtools/utils/index.js +1 -1
- package/dist/internal/devtools/utils/maskSensitive.js +1 -1
- package/dist/internal/devtools/utils/virtualModuleInspector.d.ts.map +1 -1
- package/dist/internal/devtools/utils/virtualModuleInspector.js +3 -1
- package/dist/internal/initializers/BaseStoresInitializer.d.ts +3 -3
- package/dist/internal/initializers/BaseStoresInitializer.d.ts.map +1 -1
- package/dist/internal/initializers/BaseStoresInitializer.js +13 -4
- package/dist/internal/initializers/NextJsStoresInitializer.d.ts +1 -1
- package/dist/internal/initializers/NextJsStoresInitializer.js +2 -2
- package/dist/internal/initializers/ViteStoresInitializer.d.ts +1 -1
- package/dist/internal/initializers/ViteStoresInitializer.js +2 -2
- package/dist/internal/initializers/index.d.ts +1 -1
- package/dist/internal/initializers/index.js +1 -1
- package/dist/internal/layout/DnDevLayout.d.ts +2 -2
- package/dist/internal/layout/DnDevLayout.d.ts.map +1 -1
- package/dist/internal/layout/DnDevLayout.js +45 -18
- package/dist/internal/layout/components/AutoMetaTags.d.ts +4 -2
- package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
- package/dist/internal/layout/components/AutoMetaTags.js +193 -57
- package/dist/internal/layout/components/FaviconHead.d.ts +1 -1
- package/dist/internal/layout/components/FaviconHead.js +2 -2
- package/dist/internal/layout/components/FontPreloadLinks.d.ts +1 -1
- package/dist/internal/layout/components/FontPreloadLinks.js +1 -1
- package/dist/internal/layout/components/NextJsAutoMetaTags.d.ts +3 -1
- package/dist/internal/layout/components/NextJsAutoMetaTags.d.ts.map +1 -1
- package/dist/internal/layout/components/NextJsAutoMetaTags.js +47 -17
- package/dist/internal/layout/components/PWAUpdateNotification.d.ts +1 -1
- package/dist/internal/layout/components/PWAUpdateNotification.d.ts.map +1 -1
- package/dist/internal/layout/components/PWAUpdateNotification.js +17 -4
- package/dist/internal/layout/components/PerformanceHints.js +1 -1
- package/dist/internal/layout/components/footer/FooterBranding.d.ts +1 -1
- package/dist/internal/layout/components/footer/FooterBranding.js +2 -2
- package/dist/internal/layout/components/footer/FooterCopyright.d.ts +1 -1
- package/dist/internal/layout/components/footer/FooterCopyright.js +2 -2
- package/dist/internal/layout/components/footer/FooterLegalLinks.d.ts +1 -1
- package/dist/internal/layout/components/footer/FooterLegalLinks.js +2 -2
- package/dist/internal/layout/components/index.d.ts +1 -1
- package/dist/internal/layout/components/index.js +1 -1
- package/dist/internal/layout/config/defaults.js +1 -1
- package/dist/internal/layout/config/index.d.ts +1 -1
- package/dist/internal/layout/config/index.js +1 -1
- package/dist/internal/layout/config/presets/admin.d.ts +1 -1
- package/dist/internal/layout/config/presets/blog.d.ts +1 -1
- package/dist/internal/layout/config/presets/docs.js +1 -1
- package/dist/internal/layout/config/presets/game.js +1 -1
- package/dist/internal/layout/config/presets/index.d.ts +1 -1
- package/dist/internal/layout/config/presets/landing.js +1 -1
- package/dist/internal/layout/config/presets/moolti.js +1 -1
- package/dist/internal/layout/config/presets/plain.d.ts +2 -2
- package/dist/internal/layout/config/presets/plain.d.ts.map +1 -1
- package/dist/internal/layout/config/presets/plain.js +12 -1
- package/dist/internal/layout/renderers/index.d.ts +1 -1
- package/dist/internal/layout/renderers/index.js +1 -1
- package/dist/internal/layout/zones/DnDevFooter.d.ts +3 -1
- package/dist/internal/layout/zones/DnDevFooter.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevFooter.js +6 -2
- package/dist/internal/layout/zones/DnDevHeader.d.ts +3 -1
- package/dist/internal/layout/zones/DnDevHeader.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevHeader.js +8 -3
- package/dist/internal/layout/zones/DnDevMergedBar.js +1 -1
- package/dist/internal/layout/zones/DnDevSidebar.d.ts +3 -1
- package/dist/internal/layout/zones/DnDevSidebar.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevSidebar.js +10 -4
- package/dist/internal/layout/zones/index.d.ts +1 -1
- package/dist/internal/layout/zones/index.js +1 -1
- package/dist/internal/providers/NavigationProvider.d.ts +1 -1
- package/dist/internal/providers/NavigationProvider.js +2 -2
- package/dist/internal/providers/SentryInitializer.d.ts +1 -1
- package/dist/internal/providers/SentryInitializer.js +2 -2
- package/dist/internal/providers/UIProviders.d.ts +1 -1
- package/dist/internal/providers/UIProviders.js +3 -3
- package/dist/internal/providers/index.d.ts +1 -1
- package/dist/internal/providers/index.js +1 -1
- package/dist/next.d.ts +1 -1
- package/dist/next.js +1 -1
- package/dist/providers/NextJsAppProviders.d.ts +1 -1
- package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
- package/dist/providers/NextJsAppProviders.js +5 -3
- package/dist/providers/ViteAppProviders.d.ts +1 -1
- package/dist/providers/ViteAppProviders.js +2 -2
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js +1 -1
- package/dist/routing/404.d.ts +2 -2
- package/dist/routing/404.js +3 -3
- package/dist/routing/AuthGuard.d.ts +14 -29
- package/dist/routing/AuthGuard.d.ts.map +1 -1
- package/dist/routing/AuthGuard.js +27 -72
- package/dist/routing/AuthGuardFallback.d.ts +1 -1
- package/dist/routing/AuthGuardFallback.js +2 -2
- package/dist/routing/AuthReturnTo.d.ts +13 -0
- package/dist/routing/AuthReturnTo.d.ts.map +1 -0
- package/dist/routing/AuthReturnTo.js +61 -0
- package/dist/routing/DnDevNavigationMenu.d.ts +2 -1
- package/dist/routing/DnDevNavigationMenu.d.ts.map +1 -1
- package/dist/routing/DnDevNavigationMenu.js +2 -2
- package/dist/routing/GoTo.d.ts +1 -0
- package/dist/routing/GoTo.d.ts.map +1 -1
- package/dist/routing/GoTo.js +1 -1
- package/dist/routing/GoToDialog.js +1 -1
- package/dist/routing/GoToInput.js +1 -1
- package/dist/routing/GoToWrapper.d.ts +1 -1
- package/dist/routing/GoToWrapper.js +2 -2
- package/dist/routing/Link.d.ts +2 -2
- package/dist/routing/Link.js +2 -2
- package/dist/routing/NavigationItem.d.ts +1 -1
- package/dist/routing/NavigationItem.js +2 -2
- package/dist/routing/hooks/hooks.next.d.ts +1 -1
- package/dist/routing/hooks/hooks.next.js +1 -1
- package/dist/routing/hooks/hooks.vite.d.ts +1 -1
- package/dist/routing/hooks/hooks.vite.js +1 -1
- package/dist/routing/hooks/index.d.ts +1 -1
- package/dist/routing/hooks/index.js +1 -1
- package/dist/routing/hooks/types.d.ts +1 -1
- package/dist/routing/hooks/useLocation.next.js +1 -1
- package/dist/routing/hooks/useLocation.vite.js +1 -1
- package/dist/routing/hooks/useNavigate.next.d.ts +8 -0
- package/dist/routing/hooks/useNavigate.next.d.ts.map +1 -1
- package/dist/routing/hooks/useNavigate.next.js +59 -9
- package/dist/routing/hooks/useNavigate.vite.d.ts +8 -0
- package/dist/routing/hooks/useNavigate.vite.d.ts.map +1 -1
- package/dist/routing/hooks/useNavigate.vite.js +65 -15
- package/dist/routing/hooks/useQueryParams.next.js +1 -1
- package/dist/routing/hooks/useQueryParams.vite.js +1 -1
- package/dist/routing/hooks/useRedirectGuard.next.d.ts +2 -0
- package/dist/routing/hooks/useRedirectGuard.next.d.ts.map +1 -1
- package/dist/routing/hooks/useRedirectGuard.next.js +12 -28
- package/dist/routing/hooks/useRedirectGuard.vite.d.ts +2 -0
- package/dist/routing/hooks/useRedirectGuard.vite.d.ts.map +1 -1
- package/dist/routing/hooks/useRedirectGuard.vite.js +12 -28
- package/dist/routing/hooks/useRouteParam.next.js +1 -1
- package/dist/routing/hooks/useRouteParam.vite.js +1 -1
- package/dist/routing/index.d.ts +2 -1
- package/dist/routing/index.d.ts.map +1 -1
- package/dist/routing/index.js +2 -1
- package/dist/routing/useGoTo.js +1 -1
- package/dist/routing/useNavigation.d.ts +2 -2
- package/dist/routing/useNavigation.js +3 -3
- package/dist/routing/useRouteDiscovery.d.ts +7 -7
- package/dist/routing/useRouteDiscovery.js +6 -6
- package/dist/styles/index.css +455 -80
- package/dist/styles/index.d.ts +1 -1
- package/dist/styles/index.js +1 -1
- package/dist/styles/layoutConstants.d.ts +6 -6
- package/dist/styles/layoutConstants.js +5 -5
- package/dist/symbol-index.json +1 -0
- package/dist/utils/assetResolver.d.ts +5 -5
- package/dist/utils/assetResolver.js +4 -4
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/sanitizeSvg.d.ts +4 -0
- package/dist/utils/sanitizeSvg.d.ts.map +1 -1
- package/dist/utils/sanitizeSvg.js +5 -1
- package/dist/utils/tList.js +1 -1
- package/dist/utils/useAISafe.d.ts +28 -0
- package/dist/utils/useAISafe.d.ts.map +1 -0
- package/dist/utils/useAISafe.js +53 -0
- package/dist/utils/useAuthSafe.d.ts +39 -0
- package/dist/utils/useAuthSafe.d.ts.map +1 -1
- package/dist/utils/useAuthSafe.js +6 -1
- package/dist/utils/useAuthVisibility.d.ts +1 -0
- package/dist/utils/useAuthVisibility.d.ts.map +1 -1
- package/dist/utils/useAuthVisibility.js +1 -1
- package/dist/utils/useBillingVisibility.d.ts +1 -0
- package/dist/utils/useBillingVisibility.d.ts.map +1 -1
- package/dist/utils/useBillingVisibility.js +1 -1
- package/dist/utils/useCrudSafe.js +1 -1
- package/dist/utils/useFormStoreSafe.js +1 -1
- package/dist/utils/useOAuthSafe.d.ts +1 -1
- package/dist/utils/useSeo.d.ts +121 -0
- package/dist/utils/useSeo.d.ts.map +1 -0
- package/dist/utils/useSeo.js +114 -0
- package/dist/utils/useStripeBillingSafe.js +1 -1
- package/dist/vite-routing/AppRoutes.d.ts.map +1 -1
- package/dist/vite-routing/AppRoutes.js +15 -5
- package/dist/vite-routing/RootLayout.d.ts +1 -1
- package/dist/vite-routing/RootLayout.d.ts.map +1 -1
- package/dist/vite-routing/RootLayout.js +11 -9
- package/dist/vite-routing/index.d.ts +1 -1
- package/dist/vite-routing/index.js +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +1 -1
- package/guidelines/COMPONENTS.md +136 -0
- package/guidelines/GOTCHAS.md +66 -0
- package/guidelines/LAYOUTS.md +310 -0
- package/guidelines/PAGES.md +205 -0
- package/guidelines/ROUTING.md +499 -0
- package/guidelines/SEO.md +275 -0
- package/package.json +12 -7
- package/dist/chunk-XHGRMKOY.js +0 -1
|
@@ -9,7 +9,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
9
9
|
* via generateMetadata() functions in page files for optimal SEO. This component
|
|
10
10
|
* only works client-side and meta tags won't be in initial HTML for search engines.
|
|
11
11
|
*
|
|
12
|
-
* @version 0.0
|
|
12
|
+
* @version 0.1.0
|
|
13
13
|
* @since 0.0.1
|
|
14
14
|
* @author AMBROISE PARK Consulting
|
|
15
15
|
*/
|
|
@@ -39,6 +39,22 @@ function matchRoutePath(pattern, pathname) {
|
|
|
39
39
|
}
|
|
40
40
|
return true;
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Resolve SEO field with i18n fallback
|
|
44
|
+
* @description
|
|
45
|
+
* - `undefined` → i18n lookup
|
|
46
|
+
* - `string` → use literal value
|
|
47
|
+
* - `null` → omit (return undefined)
|
|
48
|
+
*/
|
|
49
|
+
function resolveSeoField(seoValue, translationKey, t) {
|
|
50
|
+
if (seoValue === null)
|
|
51
|
+
return undefined; // Explicit null = omit
|
|
52
|
+
if (seoValue !== undefined)
|
|
53
|
+
return seoValue; // Explicit string = use it
|
|
54
|
+
// undefined = i18n lookup
|
|
55
|
+
const translated = t(translationKey);
|
|
56
|
+
return translated !== translationKey ? translated : undefined;
|
|
57
|
+
}
|
|
42
58
|
/**
|
|
43
59
|
* Get route metadata from config (injected by build system).
|
|
44
60
|
* Resolves dynamic routes by pattern so PageMeta (including namespace) is used for SEO.
|
|
@@ -77,7 +93,7 @@ function getRouteMetadata(pathname, isClient) {
|
|
|
77
93
|
*
|
|
78
94
|
* Uses Next.js hooks directly instead of platform-aware hooks
|
|
79
95
|
*
|
|
80
|
-
* @version 0.0
|
|
96
|
+
* @version 0.1.0
|
|
81
97
|
* @since 0.0.1
|
|
82
98
|
* @author AMBROISE PARK Consulting
|
|
83
99
|
*/
|
|
@@ -101,26 +117,40 @@ const NextJsAutoMetaTags = ({ config = {}, routeMeta: routeMetaOverride, title:
|
|
|
101
117
|
// Construct absolute URL for canonical link
|
|
102
118
|
const currentUrl = `${baseUrl}${pathname || '/'}`;
|
|
103
119
|
const ns = finalRouteMeta.ns || defaultNamespace;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const pageDescription = finalRouteMeta.description || t(`${ns}:description`);
|
|
107
|
-
// Get the meta object and destructure it properly
|
|
120
|
+
const seo = finalRouteMeta.seo;
|
|
121
|
+
// Get the meta object from i18n (for image, type, keywords, author, fullTitle)
|
|
108
122
|
const metaObject = t(`${ns}:meta`, { returnObjects: true });
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
123
|
+
// Title resolution priority:
|
|
124
|
+
// 1. i18n meta.fullTitle → translated, language-aware (wins)
|
|
125
|
+
// 2. seo.fullTitle (static PageMeta) → fallback for non-i18n apps
|
|
126
|
+
// 3. seo.title (explicit) → "title | siteName"
|
|
127
|
+
// 4. i18n ns:title → "translated | siteName"
|
|
128
|
+
// 5. siteName only (when seo.title === null or no translation)
|
|
129
|
+
let fullTitle;
|
|
130
|
+
if (metaObject?.fullTitle) {
|
|
131
|
+
// i18n fullTitle (ns:meta.fullTitle) → translated, takes priority
|
|
132
|
+
fullTitle = metaObject.fullTitle;
|
|
133
|
+
}
|
|
134
|
+
else if (seo?.fullTitle) {
|
|
135
|
+
// Static fullTitle in PageMeta → fallback for non-i18n apps
|
|
136
|
+
fullTitle = seo.fullTitle;
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
// Standard resolution: title | siteName
|
|
140
|
+
const pageTitle = resolveSeoField(seo?.title, `${ns}:title`, t);
|
|
141
|
+
fullTitle = pageTitle ? `${pageTitle} | ${siteName}` : siteName;
|
|
142
|
+
}
|
|
143
|
+
// Description resolution: seo.description > i18n
|
|
144
|
+
const description = resolveSeoField(seo?.description, `${ns}:description`, t);
|
|
145
|
+
// Other meta fields: seo > i18n meta object > defaults
|
|
146
|
+
const pageImage = seo?.image || metaObject?.image || defaultImage;
|
|
147
|
+
const pageType = seo?.type || metaObject?.type || 'website';
|
|
148
|
+
const pageKeywords = seo?.keywords || metaObject?.keywords;
|
|
112
149
|
const pageAuthor = finalRouteMeta.author || metaObject?.author;
|
|
113
|
-
// Only use values that are actually defined (not empty strings or undefined)
|
|
114
|
-
const title = pageTitle && pageTitle !== `${ns}:title` ? pageTitle : undefined;
|
|
115
|
-
const description = pageDescription && pageDescription !== `${ns}:description`
|
|
116
|
-
? pageDescription
|
|
117
|
-
: undefined;
|
|
118
150
|
const image = pageImage || undefined;
|
|
119
151
|
const type = pageType || 'website';
|
|
120
152
|
const keywords = pageKeywords || undefined;
|
|
121
153
|
const author = pageAuthor || undefined;
|
|
122
|
-
// Build full title with site name if title exists, otherwise just use site name
|
|
123
|
-
const fullTitle = title ? `${title} | ${siteName}` : siteName;
|
|
124
154
|
// Use relative image path instead of constructing absolute URL
|
|
125
155
|
// This prevents crashes from invalid baseUrl and works in all modes
|
|
126
156
|
const imagePath = image && image.startsWith('http') ? image : image ? image : undefined;
|
|
@@ -130,7 +160,7 @@ const NextJsAutoMetaTags = ({ config = {}, routeMeta: routeMetaOverride, title:
|
|
|
130
160
|
image: imagePath,
|
|
131
161
|
url: currentUrl,
|
|
132
162
|
type,
|
|
133
|
-
noindex: finalRouteMeta.noindex || false,
|
|
163
|
+
noindex: seo?.noindex || finalRouteMeta.noindex || false,
|
|
134
164
|
keywords,
|
|
135
165
|
author,
|
|
136
166
|
publishDate: finalRouteMeta.publishDate,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PWAUpdateNotification.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/components/PWAUpdateNotification.tsx"],"names":[],"mappings":"AAwBA,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,qBAAqB,CAAC,EAAE,QAAQ,EAAE,EAAE,0BAA0B,
|
|
1
|
+
{"version":3,"file":"PWAUpdateNotification.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/components/PWAUpdateNotification.tsx"],"names":[],"mappings":"AAwBA,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,qBAAqB,CAAC,EAAE,QAAQ,EAAE,EAAE,0BAA0B,QAoItE;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -11,7 +11,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
11
|
* - Handles service worker rejection gracefully
|
|
12
12
|
* - Uses toast system instead of Card component
|
|
13
13
|
*
|
|
14
|
-
* @version 0.0
|
|
14
|
+
* @version 0.1.0
|
|
15
15
|
* @since 0.0.1
|
|
16
16
|
* @author AMBROISE PARK Consulting
|
|
17
17
|
*/
|
|
@@ -28,7 +28,7 @@ import { isClient, useTranslation } from '@donotdev/core';
|
|
|
28
28
|
* - Component returns null (toast handles UI)
|
|
29
29
|
* - CSR/SSR safe with proper guards
|
|
30
30
|
*
|
|
31
|
-
* @version 0.0
|
|
31
|
+
* @version 0.1.0
|
|
32
32
|
* @since 0.0.1
|
|
33
33
|
* @author AMBROISE PARK Consulting
|
|
34
34
|
*/
|
|
@@ -49,6 +49,11 @@ function PWAUpdateNotification({ onUpdate }) {
|
|
|
49
49
|
window.location.reload();
|
|
50
50
|
};
|
|
51
51
|
navigator.serviceWorker.addEventListener('controllerchange', handleControllerChange);
|
|
52
|
+
// Track listeners for cleanup
|
|
53
|
+
let currentReg = null;
|
|
54
|
+
let handleUpdateFound = null;
|
|
55
|
+
let trackedWorker = null;
|
|
56
|
+
let handleStateChange = null;
|
|
52
57
|
const checkForUpdates = async () => {
|
|
53
58
|
// CSR guard: Check client again
|
|
54
59
|
if (!isClient())
|
|
@@ -56,11 +61,13 @@ function PWAUpdateNotification({ onUpdate }) {
|
|
|
56
61
|
try {
|
|
57
62
|
const reg = await navigator.serviceWorker.ready;
|
|
58
63
|
registrationRef.current = reg;
|
|
59
|
-
|
|
64
|
+
currentReg = reg;
|
|
65
|
+
handleUpdateFound = () => {
|
|
60
66
|
const newWorker = reg.installing;
|
|
61
67
|
if (!newWorker)
|
|
62
68
|
return;
|
|
63
|
-
|
|
69
|
+
trackedWorker = newWorker;
|
|
70
|
+
handleStateChange = () => {
|
|
64
71
|
if (newWorker.state === 'installed' &&
|
|
65
72
|
navigator.serviceWorker.controller &&
|
|
66
73
|
!toastIdRef.current) {
|
|
@@ -109,6 +116,12 @@ function PWAUpdateNotification({ onUpdate }) {
|
|
|
109
116
|
if (isClient() && 'serviceWorker' in navigator) {
|
|
110
117
|
navigator.serviceWorker.removeEventListener('controllerchange', handleControllerChange);
|
|
111
118
|
}
|
|
119
|
+
if (currentReg && handleUpdateFound) {
|
|
120
|
+
currentReg.removeEventListener('updatefound', handleUpdateFound);
|
|
121
|
+
}
|
|
122
|
+
if (trackedWorker && handleStateChange) {
|
|
123
|
+
trackedWorker.removeEventListener('statechange', handleStateChange);
|
|
124
|
+
}
|
|
112
125
|
clearInterval(interval);
|
|
113
126
|
};
|
|
114
127
|
}, [onUpdate]);
|
|
@@ -9,7 +9,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
* the page will need, saving 100-300ms per origin on slow networks.
|
|
10
10
|
* - Font preload initiates font downloads early, reducing LCP by ~500-1000ms
|
|
11
11
|
*
|
|
12
|
-
* @version 0.0
|
|
12
|
+
* @version 0.1.0
|
|
13
13
|
* @since 0.0.1
|
|
14
14
|
* @author AMBROISE PARK Consulting
|
|
15
15
|
*/
|
|
@@ -4,7 +4,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
* @fileoverview FooterBranding Component
|
|
5
5
|
* @description "Links to DoNotDev.com in the footers of generated apps.
|
|
6
6
|
*
|
|
7
|
-
* @version 0.0
|
|
7
|
+
* @version 0.1.0
|
|
8
8
|
* @since 0.0.1
|
|
9
9
|
* @author AMBROISE PARK Consulting
|
|
10
10
|
*/
|
|
@@ -16,7 +16,7 @@ import { useAppConfig, getPlatformEnvVar } from '@donotdev/core';
|
|
|
16
16
|
* Shows AMBROISE-PARK for framework's own site (donotdev.com),
|
|
17
17
|
* otherwise shows DoNotDev for consumer apps.
|
|
18
18
|
*
|
|
19
|
-
* @version 0.0
|
|
19
|
+
* @version 0.1.0
|
|
20
20
|
* @since 0.0.1
|
|
21
21
|
* @author AMBROISE PARK Consulting
|
|
22
22
|
*/
|
|
@@ -12,7 +12,7 @@ export interface FooterCopyrightProps {
|
|
|
12
12
|
* Uses useTranslation internally, so it re-renders when language changes.
|
|
13
13
|
* If appName not provided, reads from app config automatically.
|
|
14
14
|
*
|
|
15
|
-
* @version 0.0
|
|
15
|
+
* @version 0.1.0
|
|
16
16
|
* @since 0.0.1
|
|
17
17
|
* @author AMBROISE PARK Consulting
|
|
18
18
|
*/
|
|
@@ -4,7 +4,7 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
* @fileoverview FooterCopyright Component
|
|
5
5
|
* @description Copyright notice with year and app name, uses translations
|
|
6
6
|
*
|
|
7
|
-
* @version 0.0
|
|
7
|
+
* @version 0.1.0
|
|
8
8
|
* @since 0.0.1
|
|
9
9
|
* @author AMBROISE PARK Consulting
|
|
10
10
|
*/
|
|
@@ -16,7 +16,7 @@ import { useTranslation, useAppConfig } from '@donotdev/core';
|
|
|
16
16
|
* Uses useTranslation internally, so it re-renders when language changes.
|
|
17
17
|
* If appName not provided, reads from app config automatically.
|
|
18
18
|
*
|
|
19
|
-
* @version 0.0
|
|
19
|
+
* @version 0.1.0
|
|
20
20
|
* @since 0.0.1
|
|
21
21
|
* @author AMBROISE PARK Consulting
|
|
22
22
|
*/
|
|
@@ -16,7 +16,7 @@ export interface FooterLegalLinksProps {
|
|
|
16
16
|
* If app not provided, reads from app config automatically.
|
|
17
17
|
* Used in footer and sidebar when footer zone is hidden.
|
|
18
18
|
*
|
|
19
|
-
* @version 0.0
|
|
19
|
+
* @version 0.1.0
|
|
20
20
|
* @since 0.0.1
|
|
21
21
|
* @author AMBROISE PARK Consulting
|
|
22
22
|
*/
|
|
@@ -4,7 +4,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
* @fileoverview FooterLegalLinks Component
|
|
5
5
|
* @description Legal links component for use in sidebars when footer is hidden
|
|
6
6
|
*
|
|
7
|
-
* @version 0.0
|
|
7
|
+
* @version 0.1.0
|
|
8
8
|
* @since 0.0.1
|
|
9
9
|
* @author AMBROISE PARK Consulting
|
|
10
10
|
*/
|
|
@@ -20,7 +20,7 @@ import { Link } from '../../../../routing/Link';
|
|
|
20
20
|
* If app not provided, reads from app config automatically.
|
|
21
21
|
* Used in footer and sidebar when footer zone is hidden.
|
|
22
22
|
*
|
|
23
|
-
* @version 0.0
|
|
23
|
+
* @version 0.1.0
|
|
24
24
|
* @since 0.0.1
|
|
25
25
|
* @author AMBROISE PARK Consulting
|
|
26
26
|
*/
|
|
@@ -6,7 +6,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
6
6
|
* All slots are functions that return ReactNode (never null in defaults).
|
|
7
7
|
* Zones use these unless preset overrides.
|
|
8
8
|
*
|
|
9
|
-
* @version 0.0
|
|
9
|
+
* @version 0.1.0
|
|
10
10
|
* @since 0.0.1
|
|
11
11
|
* @author AMBROISE PARK Consulting
|
|
12
12
|
*/
|
|
@@ -5,7 +5,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
5
5
|
* @description Documentation layout with sidebar and footer (no header).
|
|
6
6
|
* Maximizes vertical reading space.
|
|
7
7
|
*
|
|
8
|
-
* @version 0.0
|
|
8
|
+
* @version 0.1.0
|
|
9
9
|
* @since 0.0.1
|
|
10
10
|
* @author AMBROISE PARK Consulting
|
|
11
11
|
*/
|
|
@@ -5,7 +5,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
5
5
|
* @description Mobile gaming layout with centered title.
|
|
6
6
|
* Optimized for full-screen gaming experiences.
|
|
7
7
|
*
|
|
8
|
-
* @version 0.0
|
|
8
|
+
* @version 0.1.0
|
|
9
9
|
* @since 0.0.1
|
|
10
10
|
* @author AMBROISE PARK Consulting
|
|
11
11
|
*/
|
|
@@ -5,7 +5,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
5
5
|
* @description Marketing site layout with header and footer.
|
|
6
6
|
* Optimized for landing pages and public content.
|
|
7
7
|
*
|
|
8
|
-
* @version 0.0
|
|
8
|
+
* @version 0.1.0
|
|
9
9
|
* @since 0.0.1
|
|
10
10
|
* @author AMBROISE PARK Consulting
|
|
11
11
|
*/
|
|
@@ -5,7 +5,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
5
5
|
* @description SaaS app layout with sidebar only (no header/footer zones).
|
|
6
6
|
* All UI in sidebar for focused productivity.
|
|
7
7
|
*
|
|
8
|
-
* @version 0.0
|
|
8
|
+
* @version 0.1.0
|
|
9
9
|
* @since 0.0.1
|
|
10
10
|
* @author AMBROISE PARK Consulting
|
|
11
11
|
*/
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* @description No UI chrome - full viewport for content.
|
|
4
4
|
* Perfect for embedded widgets, full-screen apps, modal overlays.
|
|
5
5
|
*
|
|
6
|
-
* @version 0.0
|
|
6
|
+
* @version 0.1.0
|
|
7
7
|
* @since 0.0.1
|
|
8
8
|
* @author AMBROISE PARK Consulting
|
|
9
9
|
*/
|
|
10
10
|
import type { PresetConfig } from '@donotdev/core';
|
|
11
11
|
/**
|
|
12
|
-
* Plain preset -
|
|
12
|
+
* Plain preset - no UI chrome, full viewport for content.
|
|
13
13
|
*
|
|
14
14
|
* Use cases:
|
|
15
15
|
* - Embedded widgets and iframes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plain.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/config/presets/plain.tsx"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"plain.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/config/presets/plain.tsx"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,EAAE,YAazB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// packages/ui/src/internal/layout/config/presets/plain.tsx
|
|
2
2
|
/**
|
|
3
|
-
* Plain preset -
|
|
3
|
+
* Plain preset - no UI chrome, full viewport for content.
|
|
4
4
|
*
|
|
5
5
|
* Use cases:
|
|
6
6
|
* - Embedded widgets and iframes
|
|
@@ -11,4 +11,15 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export const plainPreset = {
|
|
13
13
|
name: 'plain',
|
|
14
|
+
header: {
|
|
15
|
+
start: () => null,
|
|
16
|
+
center: () => null,
|
|
17
|
+
end: () => null,
|
|
18
|
+
},
|
|
19
|
+
sidebar: {
|
|
20
|
+
top: () => null,
|
|
21
|
+
content: () => null,
|
|
22
|
+
bottom: () => null,
|
|
23
|
+
},
|
|
24
|
+
footer: null,
|
|
14
25
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { AppMetadata } from '@donotdev/core';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
export interface DnDevFooterProps {
|
|
4
|
+
/** Custom mode: full zone replacement. When provided, app prop is ignored and no polish CSS applies. */
|
|
5
|
+
children?: ReactNode;
|
|
4
6
|
/** App metadata for copyright/links */
|
|
5
7
|
app?: AppMetadata;
|
|
6
8
|
}
|
|
@@ -24,7 +26,7 @@ export interface DnDevFooterProps {
|
|
|
24
26
|
* preset-specific visibility (moolti/plain hide footer, blog hides on mobile).
|
|
25
27
|
* DO NOT change role, tag, or className.
|
|
26
28
|
*/
|
|
27
|
-
declare function DnDevFooterComponent({ app }: DnDevFooterProps): ReactNode;
|
|
29
|
+
declare function DnDevFooterComponent({ children, app }: DnDevFooterProps): ReactNode;
|
|
28
30
|
export declare const DnDevFooter: import("react").MemoExoticComponent<typeof DnDevFooterComponent>;
|
|
29
31
|
export {};
|
|
30
32
|
//# sourceMappingURL=DnDevFooter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iBAAS,oBAAoB,CAAC,EAAE,GAAQ,EAAE,EAAE,gBAAgB,GAAG,SAAS,
|
|
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,wGAAwG;IACxG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,uCAAuC;IACvC,GAAG,CAAC,EAAE,WAAW,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iBAAS,oBAAoB,CAAC,EAAE,QAAQ,EAAE,GAAQ,EAAE,EAAE,gBAAgB,GAAG,SAAS,CAuFjF;AAED,eAAO,MAAM,WAAW,kEAA6B,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
* - Desktop: 2-zone [Copyright] | [Links + Branding]
|
|
9
9
|
* - Mobile: 2-line stacked, centered
|
|
10
10
|
*
|
|
11
|
-
* @version 0.0
|
|
11
|
+
* @version 0.1.0
|
|
12
12
|
* @since 0.0.1
|
|
13
13
|
* @author AMBROISE PARK Consulting
|
|
14
14
|
*/
|
|
@@ -38,11 +38,15 @@ import { getLegalLinks, } from '../components/footer/useLegalLinks';
|
|
|
38
38
|
* preset-specific visibility (moolti/plain hide footer, blog hides on mobile).
|
|
39
39
|
* DO NOT change role, tag, or className.
|
|
40
40
|
*/
|
|
41
|
-
function DnDevFooterComponent({ app = {} }) {
|
|
41
|
+
function DnDevFooterComponent({ children, app = {} }) {
|
|
42
42
|
const { t } = useTranslation('dndev');
|
|
43
43
|
const isLaptopOrDesktop = useBreakpoint('isLaptopOrDesktop');
|
|
44
44
|
// Get legal links (defaults or custom) — must be called before any return
|
|
45
45
|
const links = getLegalLinks(app?.footer);
|
|
46
|
+
// Custom mode: consumer owns zone visuals, structural wrapper only
|
|
47
|
+
if (children !== undefined) {
|
|
48
|
+
return (_jsx("footer", { role: "contentinfo", className: "footer", "data-custom": true, children: children }));
|
|
49
|
+
}
|
|
46
50
|
// Explicit null hides footer
|
|
47
51
|
if (app?.footer === null) {
|
|
48
52
|
return null;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
export interface DnDevHeaderProps {
|
|
3
|
+
/** Custom mode: full zone replacement. When provided, slot props are ignored and no polish CSS applies. */
|
|
4
|
+
children?: ReactNode;
|
|
3
5
|
/** Start slot - ReactNode from preset or consumer override */
|
|
4
6
|
start?: ReactNode | null;
|
|
5
7
|
/** Center slot - ReactNode from preset or consumer override */
|
|
@@ -20,7 +22,7 @@ export interface DnDevHeaderProps {
|
|
|
20
22
|
* and preset-specific rules (e.g. landing compact mode, mergedBar hiding).
|
|
21
23
|
* DO NOT change role, tag, or classNames.
|
|
22
24
|
*/
|
|
23
|
-
declare function DnDevHeaderComponent({ start, center, end, }: DnDevHeaderProps): ReactNode;
|
|
25
|
+
declare function DnDevHeaderComponent({ children, start, center, end, }: DnDevHeaderProps): ReactNode;
|
|
24
26
|
export declare const DnDevHeader: import("react").MemoExoticComponent<typeof DnDevHeaderComponent>;
|
|
25
27
|
export {};
|
|
26
28
|
//# sourceMappingURL=DnDevHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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;;;;;;;;;;;;GAYG;AACH,iBAAS,oBAAoB,CAAC,EAC5B,KAAK,EACL,MAAM,EACN,GAAG,GACJ,EAAE,gBAAgB,GAAG,SAAS,
|
|
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,2GAA2G;IAC3G,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,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;;;;;;;;;;;;GAYG;AACH,iBAAS,oBAAoB,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,MAAM,EACN,GAAG,GACJ,EAAE,gBAAgB,GAAG,SAAS,CAsB9B;AAED,eAAO,MAAM,WAAW,kEAA6B,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
* - center: null - absolutely centered overlay (regardless of start/end content)
|
|
10
10
|
* - end: [GoTo, Auth, Language, Theme] - end-aligned
|
|
11
11
|
*
|
|
12
|
-
* @version 0.0
|
|
12
|
+
* @version 0.1.0
|
|
13
13
|
* @since 0.0.1
|
|
14
14
|
* @author AMBROISE PARK Consulting
|
|
15
15
|
*/
|
|
@@ -28,8 +28,13 @@ import { cn } from '@donotdev/components';
|
|
|
28
28
|
* and preset-specific rules (e.g. landing compact mode, mergedBar hiding).
|
|
29
29
|
* DO NOT change role, tag, or classNames.
|
|
30
30
|
*/
|
|
31
|
-
function DnDevHeaderComponent({ start, center, end, }) {
|
|
32
|
-
//
|
|
31
|
+
function DnDevHeaderComponent({ children, start, center, end, }) {
|
|
32
|
+
// Custom mode: children provided = consumer owns zone visuals
|
|
33
|
+
const isCustom = children !== undefined;
|
|
34
|
+
if (isCustom) {
|
|
35
|
+
return (_jsx("header", { role: "banner", className: "header", "data-custom": true, children: children }));
|
|
36
|
+
}
|
|
37
|
+
// Slotted mode: framework slot layout with polish CSS
|
|
33
38
|
const hasCenter = center !== null && center !== undefined;
|
|
34
39
|
return (_jsxs("header", { role: "banner", className: "header", children: [_jsx("div", { className: "header-start", children: start }), hasCenter && _jsx("div", { className: "header-center", children: center }), _jsx("div", { className: "header-end", children: end })] }));
|
|
35
40
|
}
|
|
@@ -8,7 +8,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
8
8
|
* Slots: trigger (visible bar) + top/content/bottom (Sheet content)
|
|
9
9
|
* CSS: display:none on desktop, display:flex on mobile
|
|
10
10
|
*
|
|
11
|
-
* @version 0.0
|
|
11
|
+
* @version 0.1.0
|
|
12
12
|
* @since 0.0.1
|
|
13
13
|
* @author AMBROISE PARK Consulting
|
|
14
14
|
*/
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
export interface DnDevSidebarProps {
|
|
3
|
+
/** Custom mode: full zone replacement. When provided, slot props are ignored and no polish CSS applies. */
|
|
4
|
+
children?: ReactNode;
|
|
3
5
|
/** Top slot - ReactNode from preset or consumer override */
|
|
4
6
|
top?: ReactNode | null;
|
|
5
7
|
/** Content slot - ReactNode from preset or consumer override */
|
|
@@ -23,7 +25,7 @@ export interface DnDevSidebarProps {
|
|
|
23
25
|
* targets `aside[role='navigation'].sidebar`. Removing it silently breaks every sidebar feature.
|
|
24
26
|
* DO NOT remove or change role="navigation" under any circumstance.
|
|
25
27
|
*/
|
|
26
|
-
declare function DnDevSidebarComponent({ top, content, bottom, defaultWidth, minWidth, maxWidth, }: DnDevSidebarProps): ReactNode;
|
|
28
|
+
declare function DnDevSidebarComponent({ children, top, content, bottom, defaultWidth, minWidth, maxWidth, }: DnDevSidebarProps): ReactNode;
|
|
27
29
|
export declare const DnDevSidebar: import("react").MemoExoticComponent<typeof DnDevSidebarComponent>;
|
|
28
30
|
export {};
|
|
29
31
|
//# sourceMappingURL=DnDevSidebar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DnDevSidebar.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/zones/DnDevSidebar.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,MAAM,WAAW,iBAAiB;IAChC,4DAA4D;IAC5D,GAAG,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,gEAAgE;IAChE,OAAO,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B,+DAA+D;IAC/D,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1B,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,iBAAS,qBAAqB,CAAC,EAC7B,GAAG,EACH,OAAO,EACP,MAAM,EACN,YAAiD,EACjD,QAAyC,EACzC,QAAyC,GAC1C,EAAE,iBAAiB,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"DnDevSidebar.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/zones/DnDevSidebar.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,MAAM,WAAW,iBAAiB;IAChC,2GAA2G;IAC3G,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,4DAA4D;IAC5D,GAAG,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,gEAAgE;IAChE,OAAO,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B,+DAA+D;IAC/D,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1B,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,iBAAS,qBAAqB,CAAC,EAC7B,QAAQ,EACR,GAAG,EACH,OAAO,EACP,MAAM,EACN,YAAiD,EACjD,QAAyC,EACzC,QAAyC,GAC1C,EAAE,iBAAiB,GAAG,SAAS,CA+M/B;AAED,eAAO,MAAM,YAAY,mEAA8B,CAAC"}
|