@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBillingVisibility.d.ts","sourceRoot":"","sources":["../../src/utils/useBillingVisibility.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,oBAAoB,IAAI,sBAAsB,CAkB7D"}
|
|
1
|
+
{"version":3,"file":"useBillingVisibility.d.ts","sourceRoot":"","sources":["../../src/utils/useBillingVisibility.ts"],"names":[],"mappings":"AAmBA,qDAAqD;AACrD,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,oBAAoB,IAAI,sBAAsB,CAkB7D"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Dynamic SEO Component
|
|
3
|
+
* @description Isomorphic component for setting SEO metadata at runtime.
|
|
4
|
+
* Works with both static pages and dynamic data (after fetch).
|
|
5
|
+
* Uses react-helmet-async internally - works in SSR/prerender.
|
|
6
|
+
*
|
|
7
|
+
* Priority (highest to lowest):
|
|
8
|
+
* 1. <Seo /> component - runtime, always wins
|
|
9
|
+
* 2. i18n meta.fullTitle - translated
|
|
10
|
+
* 3. seo.fullTitle (PageMeta) - static fallback
|
|
11
|
+
* 4. seo.title / i18n title - "title | siteName"
|
|
12
|
+
* 5. siteName only
|
|
13
|
+
*
|
|
14
|
+
* @example Basic usage
|
|
15
|
+
* ```tsx
|
|
16
|
+
* const { data: apartment } = useApartment(id);
|
|
17
|
+
*
|
|
18
|
+
* return (
|
|
19
|
+
* <>
|
|
20
|
+
* {apartment && (
|
|
21
|
+
* <Seo
|
|
22
|
+
* fullTitle={`${apartment.reference} - €${apartment.rent} | 아이수수`}
|
|
23
|
+
* description={apartment.description}
|
|
24
|
+
* image={apartment.photos[0]}
|
|
25
|
+
* />
|
|
26
|
+
* )}
|
|
27
|
+
* <ApartmentDetails data={apartment} />
|
|
28
|
+
* </>
|
|
29
|
+
* );
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @version 0.1.0
|
|
33
|
+
* @since 0.2.0
|
|
34
|
+
* @author AMBROISE PARK Consulting
|
|
35
|
+
*/
|
|
36
|
+
import type { ReactElement } from 'react';
|
|
37
|
+
import type { SeoMeta } from '@donotdev/core';
|
|
38
|
+
/**
|
|
39
|
+
* Dynamic SEO props
|
|
40
|
+
* Extends SeoMeta with runtime-specific fields
|
|
41
|
+
*/
|
|
42
|
+
export interface SeoProps extends SeoMeta {
|
|
43
|
+
/**
|
|
44
|
+
* Canonical URL override
|
|
45
|
+
* @description If not set, uses current URL
|
|
46
|
+
*/
|
|
47
|
+
canonicalUrl?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Article publish date (ISO 8601)
|
|
50
|
+
* @description For article pages, sets article:published_time
|
|
51
|
+
*/
|
|
52
|
+
publishDate?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Article modified date (ISO 8601)
|
|
55
|
+
* @description For article pages, sets article:modified_time
|
|
56
|
+
*/
|
|
57
|
+
modifiedDate?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Dynamic SEO component
|
|
61
|
+
*
|
|
62
|
+
* @description Sets SEO metadata at runtime. Render after data is loaded.
|
|
63
|
+
* Overrides any static PageMeta SEO settings.
|
|
64
|
+
* Works in SSR/prerender - meta tags will be in initial HTML.
|
|
65
|
+
*
|
|
66
|
+
* @example Static title override
|
|
67
|
+
* ```tsx
|
|
68
|
+
* <Seo fullTitle="About Us | MyApp" />
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @example Dynamic product page
|
|
72
|
+
* ```tsx
|
|
73
|
+
* const { data: product } = useProduct(id);
|
|
74
|
+
* if (!product) return <Loading />;
|
|
75
|
+
*
|
|
76
|
+
* return (
|
|
77
|
+
* <>
|
|
78
|
+
* <Seo
|
|
79
|
+
* title={product.name}
|
|
80
|
+
* description={product.description}
|
|
81
|
+
* image={product.image}
|
|
82
|
+
* type="product"
|
|
83
|
+
* />
|
|
84
|
+
* <ProductDetails product={product} />
|
|
85
|
+
* </>
|
|
86
|
+
* );
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* @example Article with dates
|
|
90
|
+
* ```tsx
|
|
91
|
+
* <Seo
|
|
92
|
+
* title={article.title}
|
|
93
|
+
* description={article.excerpt}
|
|
94
|
+
* type="article"
|
|
95
|
+
* publishDate={article.createdAt}
|
|
96
|
+
* modifiedDate={article.updatedAt}
|
|
97
|
+
* />
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
export declare function Seo({ title, fullTitle, description, image, type, keywords, noindex, canonicalUrl, publishDate, modifiedDate, }: SeoProps): ReactElement | null;
|
|
101
|
+
/**
|
|
102
|
+
* Hook version for those who prefer hooks
|
|
103
|
+
* Returns the Seo component with props bound
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```tsx
|
|
107
|
+
* const SeoTags = useSeo({
|
|
108
|
+
* title: apartment.reference,
|
|
109
|
+
* description: apartment.description,
|
|
110
|
+
* });
|
|
111
|
+
*
|
|
112
|
+
* return (
|
|
113
|
+
* <>
|
|
114
|
+
* <SeoTags />
|
|
115
|
+
* <Content />
|
|
116
|
+
* </>
|
|
117
|
+
* );
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
export declare function useSeo(props: SeoProps | null): (() => ReactElement | null);
|
|
121
|
+
//# sourceMappingURL=useSeo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSeo.d.ts","sourceRoot":"","sources":["../../src/utils/useSeo.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAM1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;GAGG;AACH,MAAM,WAAW,QAAS,SAAQ,OAAO;IACvC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,GAAG,CAAC,EAClB,KAAK,EACL,SAAS,EACT,WAAW,EACX,KAAK,EACL,IAAgB,EAChB,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,WAAW,EACX,YAAY,GACb,EAAE,QAAQ,GAAG,YAAY,GAAG,IAAI,CA0EhC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,CAK1E"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Helmet } from 'react-helmet-async';
|
|
4
|
+
import { useAppConfig } from '@donotdev/core';
|
|
5
|
+
/**
|
|
6
|
+
* Dynamic SEO component
|
|
7
|
+
*
|
|
8
|
+
* @description Sets SEO metadata at runtime. Render after data is loaded.
|
|
9
|
+
* Overrides any static PageMeta SEO settings.
|
|
10
|
+
* Works in SSR/prerender - meta tags will be in initial HTML.
|
|
11
|
+
*
|
|
12
|
+
* @example Static title override
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <Seo fullTitle="About Us | MyApp" />
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @example Dynamic product page
|
|
18
|
+
* ```tsx
|
|
19
|
+
* const { data: product } = useProduct(id);
|
|
20
|
+
* if (!product) return <Loading />;
|
|
21
|
+
*
|
|
22
|
+
* return (
|
|
23
|
+
* <>
|
|
24
|
+
* <Seo
|
|
25
|
+
* title={product.name}
|
|
26
|
+
* description={product.description}
|
|
27
|
+
* image={product.image}
|
|
28
|
+
* type="product"
|
|
29
|
+
* />
|
|
30
|
+
* <ProductDetails product={product} />
|
|
31
|
+
* </>
|
|
32
|
+
* );
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @example Article with dates
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <Seo
|
|
38
|
+
* title={article.title}
|
|
39
|
+
* description={article.excerpt}
|
|
40
|
+
* type="article"
|
|
41
|
+
* publishDate={article.createdAt}
|
|
42
|
+
* modifiedDate={article.updatedAt}
|
|
43
|
+
* />
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export function Seo({ title, fullTitle, description, image, type = 'website', keywords, noindex, canonicalUrl, publishDate, modifiedDate, }) {
|
|
47
|
+
const siteName = useAppConfig('name') || '';
|
|
48
|
+
// Resolve final title
|
|
49
|
+
const resolvedTitle = fullTitle
|
|
50
|
+
? fullTitle
|
|
51
|
+
: title
|
|
52
|
+
? `${title} | ${siteName}`
|
|
53
|
+
: siteName;
|
|
54
|
+
// Build meta tags array for cleaner rendering
|
|
55
|
+
const metaTags = [];
|
|
56
|
+
// Description
|
|
57
|
+
if (description) {
|
|
58
|
+
metaTags.push(_jsx("meta", { name: "description", content: description }, "description"), _jsx("meta", { property: "og:description", content: description }, "og:description"), _jsx("meta", { name: "twitter:description", content: description }, "twitter:description"));
|
|
59
|
+
}
|
|
60
|
+
// Image
|
|
61
|
+
if (image) {
|
|
62
|
+
metaTags.push(_jsx("meta", { property: "og:image", content: image }, "og:image"), _jsx("meta", { name: "twitter:image", content: image }, "twitter:image"), _jsx("meta", { name: "twitter:card", content: "summary_large_image" }, "twitter:card"));
|
|
63
|
+
}
|
|
64
|
+
// Type
|
|
65
|
+
if (type) {
|
|
66
|
+
metaTags.push(_jsx("meta", { property: "og:type", content: type }, "og:type"));
|
|
67
|
+
}
|
|
68
|
+
// Keywords
|
|
69
|
+
if (keywords && keywords.length > 0) {
|
|
70
|
+
const keywordsStr = Array.isArray(keywords) ? keywords.join(', ') : keywords;
|
|
71
|
+
metaTags.push(_jsx("meta", { name: "keywords", content: keywordsStr }, "keywords"));
|
|
72
|
+
}
|
|
73
|
+
// Robots
|
|
74
|
+
if (noindex) {
|
|
75
|
+
metaTags.push(_jsx("meta", { name: "robots", content: "noindex, nofollow" }, "robots"));
|
|
76
|
+
}
|
|
77
|
+
// Article-specific meta
|
|
78
|
+
if (type === 'article') {
|
|
79
|
+
if (publishDate) {
|
|
80
|
+
metaTags.push(_jsx("meta", { property: "article:published_time", content: publishDate }, "article:published_time"));
|
|
81
|
+
}
|
|
82
|
+
if (modifiedDate) {
|
|
83
|
+
metaTags.push(_jsx("meta", { property: "article:modified_time", content: modifiedDate }, "article:modified_time"));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
// OG/Twitter title
|
|
87
|
+
metaTags.push(_jsx("meta", { property: "og:title", content: resolvedTitle }, "og:title"), _jsx("meta", { name: "twitter:title", content: resolvedTitle }, "twitter:title"));
|
|
88
|
+
return (_jsxs(Helmet, { children: [_jsx("title", { children: resolvedTitle }), canonicalUrl && _jsx("link", { rel: "canonical", href: canonicalUrl }), metaTags] }));
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Hook version for those who prefer hooks
|
|
92
|
+
* Returns the Seo component with props bound
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```tsx
|
|
96
|
+
* const SeoTags = useSeo({
|
|
97
|
+
* title: apartment.reference,
|
|
98
|
+
* description: apartment.description,
|
|
99
|
+
* });
|
|
100
|
+
*
|
|
101
|
+
* return (
|
|
102
|
+
* <>
|
|
103
|
+
* <SeoTags />
|
|
104
|
+
* <Content />
|
|
105
|
+
* </>
|
|
106
|
+
* );
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
export function useSeo(props) {
|
|
110
|
+
if (props === null) {
|
|
111
|
+
return () => null;
|
|
112
|
+
}
|
|
113
|
+
return () => _jsx(Seo, { ...props });
|
|
114
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppRoutes.d.ts","sourceRoot":"","sources":["../../src/vite-routing/AppRoutes.tsx"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAQ3E,OAAO,KAAK,EAAE,aAAa,EAAkC,MAAM,OAAO,CAAC;AAG3E,yEAAyE;AACzE,KAAK,oBAAoB,GACrB,CAAC,MAAM,OAAO,CAAC;IAAE,OAAO,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC,GAC3C,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"AppRoutes.d.ts","sourceRoot":"","sources":["../../src/vite-routing/AppRoutes.tsx"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAQ3E,OAAO,KAAK,EAAE,aAAa,EAAkC,MAAM,OAAO,CAAC;AAG3E,yEAAyE;AACzE,KAAK,oBAAoB,GACrB,CAAC,MAAM,OAAO,CAAC;IAAE,OAAO,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC,GAC3C,MAAM,CAAC;AA8IX;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;CAChC;AAED,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,oBAAoB,CAAC;IAChC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,UAAU,sBAAsB;IAC9B,4CAA4C;IAC5C,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,yCAiF9D"}
|
|
@@ -32,7 +32,7 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
32
32
|
* - **Suspense Boundaries**: Proper loading states prevent UI flicker
|
|
33
33
|
* - **Native Scroll Restoration**: Built-in scroll position memory
|
|
34
34
|
*
|
|
35
|
-
* @version 0.0
|
|
35
|
+
* @version 0.1.0
|
|
36
36
|
* @since 0.0.1
|
|
37
37
|
* @author AMBROISE PARK Consulting
|
|
38
38
|
* @license Commercial
|
|
@@ -97,6 +97,14 @@ function getRoutePreset(meta) {
|
|
|
97
97
|
}
|
|
98
98
|
return undefined;
|
|
99
99
|
}
|
|
100
|
+
/** Extract hideBreadcrumbs from route meta */
|
|
101
|
+
function getRouteHideBreadcrumbs(meta) {
|
|
102
|
+
if (meta && typeof meta === 'object' && 'hideBreadcrumbs' in meta) {
|
|
103
|
+
const hide = meta.hideBreadcrumbs;
|
|
104
|
+
return typeof hide === 'boolean' ? hide : undefined;
|
|
105
|
+
}
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
100
108
|
/**
|
|
101
109
|
* LayoutRoute - Per-route preset switcher
|
|
102
110
|
*
|
|
@@ -107,12 +115,14 @@ function getRoutePreset(meta) {
|
|
|
107
115
|
*
|
|
108
116
|
* Uses useLayoutEffect to apply before paint, avoiding visual flash.
|
|
109
117
|
*/
|
|
110
|
-
const LayoutRoute = ({ preset, children, }) => {
|
|
118
|
+
const LayoutRoute = ({ preset, hideBreadcrumbs, children, }) => {
|
|
111
119
|
const setRoutePresetOverride = useLayout('setRoutePresetOverride');
|
|
120
|
+
const setRouteHideBreadcrumbs = useLayout('setRouteHideBreadcrumbs');
|
|
112
121
|
useLayoutEffect(() => {
|
|
113
122
|
// Set route override (or null to clear and use app default)
|
|
114
123
|
setRoutePresetOverride(preset ?? null);
|
|
115
|
-
|
|
124
|
+
setRouteHideBreadcrumbs(hideBreadcrumbs ?? false);
|
|
125
|
+
}, [preset, hideBreadcrumbs, setRoutePresetOverride, setRouteHideBreadcrumbs]);
|
|
116
126
|
return _jsx(_Fragment, { children: children });
|
|
117
127
|
};
|
|
118
128
|
/**
|
|
@@ -210,7 +220,7 @@ export function createAppRouter(options) {
|
|
|
210
220
|
console.warn('[DoNotDev] HomePage has auth config but the index route is always public. ' +
|
|
211
221
|
'Auth config on HomePage is ignored. Use a different page as your protected entry point.');
|
|
212
222
|
}
|
|
213
|
-
return (_jsx(LayoutRoute, { preset: getRoutePreset(homePageRoute.meta), children: _jsx(LazyRoute, { component: homePageRoute.component, path: homePageRoute.path }) }));
|
|
223
|
+
return (_jsx(LayoutRoute, { preset: getRoutePreset(homePageRoute.meta), hideBreadcrumbs: getRouteHideBreadcrumbs(homePageRoute.meta), children: _jsx(LazyRoute, { component: homePageRoute.component, path: homePageRoute.path }) }));
|
|
214
224
|
})(),
|
|
215
225
|
},
|
|
216
226
|
/** All other routes are discovered and rendered here */
|
|
@@ -218,7 +228,7 @@ export function createAppRouter(options) {
|
|
|
218
228
|
.filter((route) => route.path !== '/')
|
|
219
229
|
.map((route) => ({
|
|
220
230
|
path: route.path.startsWith('/') ? route.path.slice(1) : route.path,
|
|
221
|
-
element: route.parsedAuth === false ? (_jsx(LayoutRoute, { preset: getRoutePreset(route.meta), children: _jsx(LazyRoute, { component: route.component, path: route.path }) })) : (_jsx(LayoutRoute, { preset: getRoutePreset(route.meta), children: _jsx(AuthGuard, { auth: route.parsedAuth, children: _jsx(LazyRoute, { component: route.component, path: route.path }) }) })),
|
|
231
|
+
element: route.parsedAuth === false ? (_jsx(LayoutRoute, { preset: getRoutePreset(route.meta), hideBreadcrumbs: getRouteHideBreadcrumbs(route.meta), children: _jsx(LazyRoute, { component: route.component, path: route.path }) })) : (_jsx(LayoutRoute, { preset: getRoutePreset(route.meta), hideBreadcrumbs: getRouteHideBreadcrumbs(route.meta), children: _jsx(AuthGuard, { auth: route.parsedAuth, children: _jsx(LazyRoute, { component: route.component, path: route.path }) }) })),
|
|
222
232
|
})),
|
|
223
233
|
// 404 catch-all route (must be last)
|
|
224
234
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootLayout.d.ts","sourceRoot":"","sources":["../../src/vite-routing/RootLayout.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"RootLayout.d.ts","sourceRoot":"","sources":["../../src/vite-routing/RootLayout.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AA4LnD;;GAEG;AACH,UAAU,oBAAoB;IAC5B,2BAA2B;IAC3B,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE,oBAAoB,2CAkC1D"}
|
|
@@ -8,7 +8,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
8
8
|
* data router configuration. It provides the core provider hierarchy for all
|
|
9
9
|
* routes in the application.
|
|
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
|
*/
|
|
@@ -17,6 +17,8 @@ import { Outlet, useLocation } from 'react-router-dom';
|
|
|
17
17
|
import { globalEmitter, isClient, QueryProviders } from '@donotdev/core';
|
|
18
18
|
import { DnDevLayout } from '../internal/layout/DnDevLayout';
|
|
19
19
|
import { UIProviders } from '../internal/providers/UIProviders';
|
|
20
|
+
import { PasswordResetCallback } from '../utils/useAuthSafe';
|
|
21
|
+
import { AuthReturnTo } from '../routing/AuthReturnTo';
|
|
20
22
|
// Only lazy load non-critical components (not in render path)
|
|
21
23
|
const AutoMetaTags = lazy(() => import('../internal/layout/components/AutoMetaTags').then((m) => ({
|
|
22
24
|
default: m.default,
|
|
@@ -44,7 +46,7 @@ const RedirectOverlay = lazy(() => import('../components/common/RedirectOverlay'
|
|
|
44
46
|
* - New navigation (PUSH): Scroll main element to top
|
|
45
47
|
* - Back/Forward (POP): Restore previous scroll position
|
|
46
48
|
*
|
|
47
|
-
* @version 0.0
|
|
49
|
+
* @version 0.1.0
|
|
48
50
|
* @since 0.0.1
|
|
49
51
|
* @author AMBROISE PARK Consulting
|
|
50
52
|
*/
|
|
@@ -76,9 +78,9 @@ function CustomScrollRestoration() {
|
|
|
76
78
|
prevLocationKey.current = location.key;
|
|
77
79
|
// Cleanup: Keep only last 20 positions to prevent memory leaks
|
|
78
80
|
if (scrollPositions.current.size > 20) {
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
for (const key of scrollPositions.current.keys()) {
|
|
82
|
+
scrollPositions.current.delete(key);
|
|
83
|
+
break;
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
86
|
}, [location.pathname, location.key]);
|
|
@@ -96,7 +98,7 @@ function CustomScrollRestoration() {
|
|
|
96
98
|
* Uses useLayoutEffect to detect when framework providers (UIProviders wrapper) are painted.
|
|
97
99
|
* Dispatches 'DNDEV_FRAMEWORK_READY' event for shell loader removal coordination.
|
|
98
100
|
*
|
|
99
|
-
* @version 0.0
|
|
101
|
+
* @version 0.1.0
|
|
100
102
|
* @since 0.0.1
|
|
101
103
|
* @author AMBROISE PARK Consulting
|
|
102
104
|
*/
|
|
@@ -147,7 +149,7 @@ function FrameworkReadySignal({ children }) {
|
|
|
147
149
|
* Shell loader removed only when BOTH framework AND route are ready,
|
|
148
150
|
* preventing "late arrival" of route content after Header/Footer paint.
|
|
149
151
|
*
|
|
150
|
-
* @version 0.0
|
|
152
|
+
* @version 0.1.0
|
|
151
153
|
* @since 0.0.1
|
|
152
154
|
* @author AMBROISE PARK Consulting
|
|
153
155
|
*/
|
|
@@ -197,10 +199,10 @@ function RouteReadySignal({ children }) {
|
|
|
197
199
|
* ];
|
|
198
200
|
* ```
|
|
199
201
|
*
|
|
200
|
-
* @version 0.0
|
|
202
|
+
* @version 0.1.0
|
|
201
203
|
* @since 0.0.1
|
|
202
204
|
* @author AMBROISE PARK Consulting
|
|
203
205
|
*/
|
|
204
206
|
export function RootLayout({ layout }) {
|
|
205
|
-
return (_jsx(QueryProviders, { children: _jsxs(UIProviders, { children: [_jsx(Suspense, { fallback: null, children: _jsx(AutoMetaTags, {}) }), _jsxs(FrameworkReadySignal, { children: [_jsx(DnDevLayout, { layout: layout, children: _jsx(RouteReadySignal, { children: _jsx(Outlet, {}) }) }), _jsx(CustomScrollRestoration, {}), _jsxs(Suspense, { fallback: null, children: [_jsx(ConsentBanner, {}), _jsx(PWAUpdateNotification, {}), _jsx(LicenseWatermark, {}), _jsx(RedirectOverlay, {})] })] })] }) }));
|
|
207
|
+
return (_jsx(QueryProviders, { children: _jsxs(UIProviders, { children: [_jsx(Suspense, { fallback: null, children: _jsx(AutoMetaTags, {}) }), _jsxs(FrameworkReadySignal, { children: [_jsx(DnDevLayout, { layout: layout, children: _jsx(RouteReadySignal, { children: _jsx(Outlet, {}) }) }), _jsx(CustomScrollRestoration, {}), _jsx(AuthReturnTo, {}), _jsxs(Suspense, { fallback: null, children: [_jsx(ConsentBanner, {}), _jsx(PasswordResetCallback, {}), _jsx(PWAUpdateNotification, {}), _jsx(LicenseWatermark, {}), _jsx(RedirectOverlay, {})] })] })] }) }));
|
|
206
208
|
}
|
package/dist/vite.d.ts
CHANGED
package/dist/vite.js
CHANGED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# UI Components Reference
|
|
2
|
+
|
|
3
|
+
**Check JSDoc in your IDE** - Hover over any component import to see props, types, and examples.
|
|
4
|
+
|
|
5
|
+
**Import from:** `@donotdev/ui` (layout/composition components)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Layout Components
|
|
10
|
+
|
|
11
|
+
- **PageContainer** - Page wrapper with width constraints, spacing, and density system.
|
|
12
|
+
- **GameContainer** - Game preset container with fixed header/footer layout.
|
|
13
|
+
- **GameFlow** - Game flow component for step-by-step game interfaces.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Layout Sub-Components
|
|
18
|
+
|
|
19
|
+
- **AppBranding** - App branding display with logo and name.
|
|
20
|
+
- **AppIcon** - App icon component.
|
|
21
|
+
- **AppTitle** - App title display component.
|
|
22
|
+
- **GameTitle** - Game title component for game preset.
|
|
23
|
+
- **Breadcrumbs** - Breadcrumb navigation component.
|
|
24
|
+
- **HeaderNavigation** - Header navigation menu component.
|
|
25
|
+
- **DropdownNavigation** - Dropdown navigation menu.
|
|
26
|
+
- **HeaderMenu** - Header menu component.
|
|
27
|
+
- **SettingsMenu** - Settings menu component.
|
|
28
|
+
- **ThemeToggle** - Theme toggle button component.
|
|
29
|
+
- **CacheSettings** - Cache settings component.
|
|
30
|
+
- **Notifications** - Notifications component.
|
|
31
|
+
- **FloatingLanguageSwitcher** - Floating language selector component.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Auth Components
|
|
36
|
+
|
|
37
|
+
- **AuthHeader** - Header component with authentication UI (sign in/out, user menu).
|
|
38
|
+
- **AuthMenu** - Authentication menu component.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Helpers
|
|
43
|
+
|
|
44
|
+
- **tList(t, key, count, icon?, size?)** - Translated array as List. Default: CheckCircle icon. Pass `null` for no icon (use with emoji labels).
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Common Components
|
|
49
|
+
|
|
50
|
+
- **FeatureDisabled** - Component shown when features are disabled.
|
|
51
|
+
- **Icon** - Icon component wrapper.
|
|
52
|
+
- **ProgressBar** - Progress bar component.
|
|
53
|
+
- **Skeleton** - Skeleton loading component (consumer use, not used internally).
|
|
54
|
+
- **FeatureCard** - Feature showcase card component.
|
|
55
|
+
- **TechBento** - Tech stack showcase component.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Routing Components
|
|
60
|
+
|
|
61
|
+
- **Link** - Platform-agnostic link component (works in Vite + Next.js).
|
|
62
|
+
- **AuthGuard** - Route guard component for protected routes.
|
|
63
|
+
- **AuthGuardFallback** - Fallback component for auth-guarded routes.
|
|
64
|
+
- **GoTo** - Programmatic navigation component.
|
|
65
|
+
- **GoToWrapper** - Wrapper for GoTo navigation.
|
|
66
|
+
- **GoToInput** - Input component for GoTo navigation.
|
|
67
|
+
- **GoToDialog** - Dialog for GoTo navigation.
|
|
68
|
+
- **DnDevNavigationMenu** - Framework navigation menu component.
|
|
69
|
+
- **NotFoundPage** - 404 page component.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Routing Hooks
|
|
74
|
+
|
|
75
|
+
- **useNavigate** - Navigate to routes programmatically.
|
|
76
|
+
- **useBack** - Navigate back in history.
|
|
77
|
+
- **useRefresh** - Refresh current route.
|
|
78
|
+
- **usePrefetch** - Prefetch route data.
|
|
79
|
+
- **useLocation** - Get current location.
|
|
80
|
+
- **useParams** - Get route parameters.
|
|
81
|
+
- **useSearchParams** - Get URL search parameters. Returns `URLSearchParams` directly (NOT a tuple). Use `.get('key')` to read values.
|
|
82
|
+
- **useMatch** - Match current route pattern.
|
|
83
|
+
- **useQueryParams** - Get and set query parameters.
|
|
84
|
+
- **useRedirectGuard** - Guard against redirects.
|
|
85
|
+
- **useNavigation** - Navigation state and methods.
|
|
86
|
+
- **useGoTo** - GoTo navigation hook.
|
|
87
|
+
- **useRouteDiscovery** - Route discovery hook.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Cookie Consent
|
|
92
|
+
|
|
93
|
+
- **CookieConsent** - Cookie consent management component.
|
|
94
|
+
- **ConsentBanner** - Cookie consent banner component.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Platform-Specific Providers
|
|
99
|
+
|
|
100
|
+
- **ViteAppProviders** - App providers for Vite (import from `@donotdev/ui/vite`).
|
|
101
|
+
- **NextJsAppProviders** - App providers for Next.js (import from `@donotdev/ui/next`).
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## CRUD Display Components (from @donotdev/ui)
|
|
106
|
+
|
|
107
|
+
- **DisplayFieldRenderer** - Renders read-only field displays.
|
|
108
|
+
- **EntityDisplayRenderer** - Renders complete entity displays.
|
|
109
|
+
- **TextFieldDisplay** - Text field display component.
|
|
110
|
+
- **BadgeFieldDisplay** - Badge field display component.
|
|
111
|
+
- **AvatarFieldDisplay** - Avatar field display component.
|
|
112
|
+
- **LinkFieldDisplay** - Link field display component.
|
|
113
|
+
- **DateFieldDisplay** - Date field display component.
|
|
114
|
+
- **NumberFieldDisplay** - Number field display component.
|
|
115
|
+
- **PhoneNumberDisplay** - Phone number display component.
|
|
116
|
+
- **TextAreaDisplay** - Textarea display component.
|
|
117
|
+
- **CheckboxFieldDisplay** - Checkbox display component.
|
|
118
|
+
- **DropdownDisplay** - Dropdown display component.
|
|
119
|
+
- **MultiDropdownDisplay** - Multi-select dropdown display component.
|
|
120
|
+
- **MultiInputTextFieldDisplay** - Multi-input text field display component.
|
|
121
|
+
- **RadioFieldDisplay** - Radio field display component.
|
|
122
|
+
- **RangeFieldDisplay** - Range field display component.
|
|
123
|
+
- **FileFieldDisplay** - File field display component.
|
|
124
|
+
- **ImageFieldDisplay** - Image field display component.
|
|
125
|
+
- **GeoPointFieldDisplay** - GeoPoint field display component.
|
|
126
|
+
- **MapFieldDisplay** - Map field display component.
|
|
127
|
+
- **ReferenceFieldDisplay** - Reference field display component.
|
|
128
|
+
- **TimestampFieldDisplay** - Timestamp field display component.
|
|
129
|
+
- **HiddenFieldDisplay** - Hidden field display component.
|
|
130
|
+
- **ButtonFieldDisplay** - Button field display component.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
**For MVP:** Only `PageContainer` is needed. All other components are optional.
|
|
135
|
+
|
|
136
|
+
**All props documented in JSDoc** - Hover in IDE for complete reference.
|