@donotdev/ui 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/auth/AuthHeader.js +1 -93
- package/dist/components/auth/AuthMenu.d.ts.map +1 -1
- package/dist/components/auth/AuthMenu.js +3 -286
- package/dist/components/auth/index.js +1 -9
- package/dist/components/common/FeatureCard.d.ts.map +1 -1
- package/dist/components/common/FeatureCard.js +1 -86
- package/dist/components/common/FeatureDisabled.js +1 -67
- package/dist/components/common/IconPlaceholder.d.ts +24 -0
- package/dist/components/common/IconPlaceholder.d.ts.map +1 -0
- package/dist/components/common/IconPlaceholder.js +1 -0
- package/dist/components/common/LazyLucideIcon.d.ts +39 -0
- package/dist/components/common/LazyLucideIcon.d.ts.map +1 -0
- package/dist/components/common/LazyLucideIcon.js +1 -0
- package/dist/components/common/ProgressBar.js +1 -84
- package/dist/components/common/RedirectOverlay.js +1 -243
- package/dist/components/common/Skeleton.js +1 -144
- package/dist/components/common/TechBento.d.ts.map +1 -1
- package/dist/components/common/TechBento.js +1 -53
- package/dist/components/common/icon.d.ts +1 -1
- package/dist/components/common/icon.d.ts.map +1 -1
- package/dist/components/common/icon.js +1 -84
- package/dist/components/common/iconByName.d.ts +33 -0
- package/dist/components/common/iconByName.d.ts.map +1 -0
- package/dist/components/common/iconByName.js +1 -0
- package/dist/components/common/index.js +1 -16
- package/dist/components/cookie-consent/ConsentBanner.d.ts +3 -1
- package/dist/components/cookie-consent/ConsentBanner.d.ts.map +1 -1
- package/dist/components/cookie-consent/ConsentBanner.js +1 -31
- package/dist/components/cookie-consent/CookieConsent.d.ts.map +1 -1
- package/dist/components/cookie-consent/CookieConsent.js +1 -183
- package/dist/components/cookie-consent/index.js +1 -11
- package/dist/components/cookie-consent/useCookieNoticeRequired.d.ts +7 -0
- package/dist/components/cookie-consent/useCookieNoticeRequired.d.ts.map +1 -0
- package/dist/components/cookie-consent/useCookieNoticeRequired.js +1 -0
- package/dist/components/index.js +1 -13
- package/dist/components/layout/GameContainer.d.ts.map +1 -1
- package/dist/components/layout/GameContainer.js +1 -72
- package/dist/components/layout/GameFlow.d.ts.map +1 -1
- package/dist/components/layout/GameFlow.js +1 -93
- package/dist/components/layout/PageConfig.d.ts.map +1 -1
- package/dist/components/layout/PageConfig.js +1 -47
- package/dist/components/layout/PageContainer.d.ts.map +1 -1
- package/dist/components/layout/PageContainer.js +1 -38
- package/dist/components/layout/components/Breadcrumbs.d.ts +2 -1
- package/dist/components/layout/components/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/layout/components/Breadcrumbs.js +1 -89
- package/dist/components/layout/components/DropdownNavigation.d.ts.map +1 -1
- package/dist/components/layout/components/DropdownNavigation.js +1 -30
- package/dist/components/layout/components/FloatingLanguageSwitcher.d.ts.map +1 -1
- package/dist/components/layout/components/FloatingLanguageSwitcher.js +1 -26
- package/dist/components/layout/components/Notifications.js +1 -182
- package/dist/components/layout/components/header/AppBranding.d.ts.map +1 -1
- package/dist/components/layout/components/header/AppBranding.js +1 -54
- package/dist/components/layout/components/header/AppIcon.d.ts.map +1 -1
- package/dist/components/layout/components/header/AppIcon.js +1 -59
- package/dist/components/layout/components/header/AppTitle.d.ts.map +1 -1
- package/dist/components/layout/components/header/AppTitle.js +1 -40
- package/dist/components/layout/components/header/CacheSettings.js +1 -225
- package/dist/components/layout/components/header/GameTitle.d.ts.map +1 -1
- package/dist/components/layout/components/header/GameTitle.js +1 -66
- package/dist/components/layout/components/header/HeaderMenu.d.ts +17 -16
- package/dist/components/layout/components/header/HeaderMenu.d.ts.map +1 -1
- package/dist/components/layout/components/header/HeaderMenu.js +1 -47
- package/dist/components/layout/components/header/HeaderNavigation.d.ts.map +1 -1
- package/dist/components/layout/components/header/HeaderNavigation.js +1 -66
- package/dist/components/layout/components/header/SettingsMenu.d.ts.map +1 -1
- package/dist/components/layout/components/header/SettingsMenu.js +1 -85
- package/dist/components/layout/components/header/ThemeToggle.d.ts.map +1 -1
- package/dist/components/layout/components/header/ThemeToggle.js +1 -93
- package/dist/components/layout/components/index.js +1 -25
- package/dist/components/layout/index.js +1 -14
- package/dist/crud/components/ChildRowsPicker.js +1 -68
- package/dist/crud/components/CrudCardLink.js +1 -14
- package/dist/crud/components/EntityCardList.js +1 -184
- package/dist/crud/components/EntityDisplayRenderer.js +1 -130
- package/dist/crud/components/EntityFormRenderer.js +1 -433
- package/dist/crud/components/EntityList.js +1 -521
- package/dist/crud/components/EntityRecommendations.js +1 -87
- package/dist/crud/components/EntityWorkflow.js +1 -55
- package/dist/crud/components/Form.d.ts.map +1 -1
- package/dist/crud/components/Form.js +1 -198
- package/dist/crud/components/cellEditFor.js +1 -74
- package/dist/crud/components/entityParent.js +1 -76
- package/dist/crud/components/index.js +1 -16
- package/dist/crud/components/useRecordBreadcrumb.d.ts.map +1 -1
- package/dist/crud/components/useRecordBreadcrumb.js +1 -43
- package/dist/crud/crudImports.js +1 -51
- package/dist/crud/index.js +1 -11
- package/dist/data/techLogos.js +1 -99
- package/dist/dndev-next.css +104 -17
- package/dist/dndev.css +104 -17
- package/dist/index.js +1 -5
- package/dist/internal/common/DnDevErrorBoundary.js +1 -55
- package/dist/internal/common/ErrorFallback.js +3 -214
- package/dist/internal/common/GlobalErrorFallback.js +1 -45
- package/dist/internal/common/RouteErrorFallback.js +3 -140
- package/dist/internal/devtools/DebugTools.js +1 -131
- package/dist/internal/devtools/components/AuthDebugButton.js +1 -72
- package/dist/internal/devtools/components/ConfigTab.js +1 -61
- package/dist/internal/devtools/components/CookieTab.js +1 -156
- package/dist/internal/devtools/components/DebugDialog.js +1 -48
- package/dist/internal/devtools/components/DesignTab.js +1 -469
- package/dist/internal/devtools/components/LayoutReset.js +1 -214
- package/dist/internal/devtools/components/MaskedValue.js +1 -39
- package/dist/internal/devtools/components/StoresTab.js +1 -90
- package/dist/internal/devtools/components/index.js +1 -16
- package/dist/internal/devtools/index.js +1 -13
- package/dist/internal/devtools/types.js +0 -2
- package/dist/internal/devtools/utils/envVarDiscovery.js +1 -106
- package/dist/internal/devtools/utils/index.js +1 -12
- package/dist/internal/devtools/utils/maskSensitive.js +1 -59
- package/dist/internal/devtools/utils/virtualModuleInspector.js +1 -309
- package/dist/internal/initializers/BaseStoresInitializer.js +1 -367
- package/dist/internal/initializers/NextJsStoresInitializer.js +1 -78
- package/dist/internal/initializers/ViteStoresInitializer.js +1 -20
- package/dist/internal/initializers/index.js +1 -11
- package/dist/internal/layout/DnDevLayout.js +1 -321
- package/dist/internal/layout/components/AutoMetaTags.d.ts +2 -0
- package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
- package/dist/internal/layout/components/AutoMetaTags.js +1 -338
- package/dist/internal/layout/components/FaviconHead.js +1 -60
- package/dist/internal/layout/components/FontPreloadLinks.js +1 -31
- package/dist/internal/layout/components/HeadTags.js +1 -20
- package/dist/internal/layout/components/PWAUpdateNotification.js +1 -131
- package/dist/internal/layout/components/footer/FooterBranding.d.ts.map +1 -1
- package/dist/internal/layout/components/footer/FooterBranding.js +1 -35
- package/dist/internal/layout/components/footer/FooterCopyright.d.ts.map +1 -1
- package/dist/internal/layout/components/footer/FooterCopyright.js +1 -37
- package/dist/internal/layout/components/footer/FooterLegalLinks.d.ts.map +1 -1
- package/dist/internal/layout/components/footer/FooterLegalLinks.js +1 -44
- package/dist/internal/layout/components/footer/useLegalLinks.d.ts +4 -2
- package/dist/internal/layout/components/footer/useLegalLinks.d.ts.map +1 -1
- package/dist/internal/layout/components/footer/useLegalLinks.js +1 -21
- package/dist/internal/layout/components/i18nSeoMeta.js +1 -53
- package/dist/internal/layout/components/index.js +1 -13
- package/dist/internal/layout/config/defaults.js +1 -47
- package/dist/internal/layout/config/index.js +1 -11
- package/dist/internal/layout/config/presets/admin.js +1 -35
- package/dist/internal/layout/config/presets/blog.js +1 -31
- package/dist/internal/layout/config/presets/docs.js +1 -51
- package/dist/internal/layout/config/presets/game.js +1 -53
- package/dist/internal/layout/config/presets/index.js +1 -24
- package/dist/internal/layout/config/presets/landing.js +1 -42
- package/dist/internal/layout/config/presets/moolti.js +1 -52
- package/dist/internal/layout/config/presets/plain.js +1 -25
- package/dist/internal/layout/renderers/index.js +0 -10
- package/dist/internal/layout/zones/DnDevFooter.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevFooter.js +1 -67
- package/dist/internal/layout/zones/DnDevHeader.js +1 -41
- package/dist/internal/layout/zones/DnDevMergedBar.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevMergedBar.js +1 -52
- package/dist/internal/layout/zones/DnDevSidebar.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevSidebar.js +1 -181
- package/dist/internal/layout/zones/index.js +1 -14
- package/dist/internal/providers/NavigationProvider.d.ts.map +1 -1
- package/dist/internal/providers/NavigationProvider.js +1 -71
- package/dist/internal/providers/SentryInitializer.d.ts.map +1 -1
- package/dist/internal/providers/SentryInitializer.js +1 -36
- package/dist/internal/providers/UIProviders.js +1 -79
- package/dist/internal/providers/index.js +1 -12
- package/dist/next.js +1 -11
- package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
- package/dist/providers/NextJsAppProviders.js +1 -107
- package/dist/providers/ViteAppProviders.d.ts.map +1 -1
- package/dist/providers/ViteAppProviders.js +1 -117
- package/dist/providers/index.js +1 -11
- package/dist/routing/404.js +1 -108
- package/dist/routing/AuthGuard.js +1 -178
- package/dist/routing/AuthGuardFallback.d.ts.map +1 -1
- package/dist/routing/AuthGuardFallback.js +1 -67
- package/dist/routing/AuthReturnTo.js +1 -68
- package/dist/routing/DnDevNavigationMenu.d.ts.map +1 -1
- package/dist/routing/DnDevNavigationMenu.js +1 -138
- package/dist/routing/GoTo.d.ts.map +1 -1
- package/dist/routing/GoTo.js +1 -38
- package/dist/routing/GoToDialog.d.ts.map +1 -1
- package/dist/routing/GoToDialog.js +1 -97
- package/dist/routing/GoToInput.d.ts.map +1 -1
- package/dist/routing/GoToInput.js +1 -49
- package/dist/routing/GoToWrapper.d.ts.map +1 -1
- package/dist/routing/GoToWrapper.js +1 -59
- package/dist/routing/Link.d.ts +10 -2
- package/dist/routing/Link.d.ts.map +1 -1
- package/dist/routing/Link.js +1 -109
- package/dist/routing/NavigationItem.d.ts.map +1 -1
- package/dist/routing/NavigationItem.js +1 -44
- package/dist/routing/NotFoundDocument.d.ts +33 -0
- package/dist/routing/NotFoundDocument.d.ts.map +1 -0
- package/dist/routing/NotFoundDocument.js +1 -0
- package/dist/routing/SignedInRedirect.js +1 -47
- package/dist/routing/hooks/hooks.vite.js +1 -1
- package/dist/routing/hooks/index.js +1 -26
- package/dist/routing/hooks/types.js +0 -2
- package/dist/routing/hooks/useLocation.next.js +1 -35
- package/dist/routing/hooks/useLocation.vite.js +1 -13
- package/dist/routing/hooks/useMatch.next.js +1 -31
- package/dist/routing/hooks/useMatch.vite.js +1 -6
- package/dist/routing/hooks/useNavigate.next.js +1 -64
- package/dist/routing/hooks/useNavigate.vite.js +1 -61
- package/dist/routing/hooks/useParams.next.js +1 -9
- package/dist/routing/hooks/useParams.vite.js +1 -6
- package/dist/routing/hooks/useQueryParams.next.js +1 -66
- package/dist/routing/hooks/useQueryParams.vite.js +1 -66
- package/dist/routing/hooks/useRedirectGuard.next.js +1 -119
- package/dist/routing/hooks/useRedirectGuard.vite.js +1 -117
- package/dist/routing/hooks/useRouteParam.next.js +1 -38
- package/dist/routing/hooks/useRouteParam.vite.js +1 -38
- package/dist/routing/hooks/useRoutePath.next.js +1 -36
- package/dist/routing/hooks/useRoutePath.vite.js +1 -25
- package/dist/routing/hooks/useSearchParams.next.js +1 -22
- package/dist/routing/hooks/useSearchParams.vite.js +1 -22
- package/dist/routing/hooks/useUrlLanguage.next.js +1 -50
- package/dist/routing/hooks/useUrlLanguage.vite.js +1 -41
- package/dist/routing/index.d.ts +1 -0
- package/dist/routing/index.d.ts.map +1 -1
- package/dist/routing/index.js +1 -32
- package/dist/routing/link/InternalLink.next.d.ts +23 -0
- package/dist/routing/link/InternalLink.next.d.ts.map +1 -0
- package/dist/routing/link/InternalLink.next.js +1 -0
- package/dist/routing/link/InternalLink.vite.d.ts +22 -0
- package/dist/routing/link/InternalLink.vite.d.ts.map +1 -0
- package/dist/routing/link/InternalLink.vite.js +1 -0
- package/dist/routing/link/absolutePath.d.ts +17 -0
- package/dist/routing/link/absolutePath.d.ts.map +1 -0
- package/dist/routing/link/absolutePath.js +1 -0
- package/dist/routing/link/link.next.d.ts +12 -0
- package/dist/routing/link/link.next.d.ts.map +1 -0
- package/dist/routing/link/link.next.js +1 -0
- package/dist/routing/link/link.vite.d.ts +12 -0
- package/dist/routing/link/link.vite.d.ts.map +1 -0
- package/dist/routing/link/link.vite.js +1 -0
- package/dist/routing/link/types.d.ts +30 -0
- package/dist/routing/link/types.d.ts.map +1 -0
- package/dist/routing/link/types.js +0 -0
- package/dist/routing/parentRoute.js +1 -43
- package/dist/routing/useGoTo.d.ts.map +1 -1
- package/dist/routing/useGoTo.js +1 -59
- package/dist/routing/useNavigation.d.ts.map +1 -1
- package/dist/routing/useNavigation.js +1 -114
- package/dist/routing/useRouteDiscovery.d.ts +1 -0
- package/dist/routing/useRouteDiscovery.d.ts.map +1 -1
- package/dist/routing/useRouteDiscovery.js +1 -313
- package/dist/rsc.d.ts +28 -0
- package/dist/rsc.d.ts.map +1 -0
- package/dist/rsc.js +1 -0
- package/dist/styles/index.css +104 -17
- package/dist/styles/index.js +1 -10
- package/dist/styles/layoutConstants.js +1 -134
- package/dist/symbol-index.json +1 -1
- package/dist/utils/assetResolver.d.ts.map +1 -1
- package/dist/utils/assetResolver.js +1 -297
- package/dist/utils/index.js +1 -23
- package/dist/utils/sanitizeSvg.js +1 -51
- package/dist/utils/tList.js +1 -42
- package/dist/utils/useAISafe.d.ts.map +1 -1
- package/dist/utils/useAISafe.js +1 -53
- package/dist/utils/useAuthSafe.d.ts.map +1 -1
- package/dist/utils/useAuthSafe.js +1 -78
- package/dist/utils/useAuthVisibility.d.ts.map +1 -1
- package/dist/utils/useAuthVisibility.js +1 -63
- package/dist/utils/useBillingVisibility.d.ts.map +1 -1
- package/dist/utils/useBillingVisibility.js +1 -57
- package/dist/utils/useCrudSafe.d.ts.map +1 -1
- package/dist/utils/useCrudSafe.js +1 -75
- package/dist/utils/useDeleteAccountSafe.js +1 -52
- package/dist/utils/useFormStoreSafe.d.ts.map +1 -1
- package/dist/utils/useFormStoreSafe.js +1 -85
- package/dist/utils/useOAuthSafe.d.ts.map +1 -1
- package/dist/utils/useOAuthSafe.js +1 -38
- package/dist/utils/useSeo.js +1 -151
- package/dist/utils/useStripeBillingSafe.d.ts.map +1 -1
- package/dist/utils/useStripeBillingSafe.js +1 -81
- package/dist/vite-routing/AppRoutes.d.ts.map +1 -1
- package/dist/vite-routing/AppRoutes.js +1 -235
- package/dist/vite-routing/RootLayout.d.ts.map +1 -1
- package/dist/vite-routing/RootLayout.js +1 -205
- package/dist/vite-routing/index.js +1 -11
- package/dist/vite.js +1 -10
- package/guidelines/COMPONENTS.md +4 -4
- package/guidelines/PAGES.md +3 -0
- package/guidelines/ROUTING.md +15 -0
- package/guidelines/SEO.md +4 -1
- package/package.json +18 -8
- package/dist/ChildRowsPicker-63M4EQUQ.js +0 -1
- package/dist/ChildRowsPicker-ISP365ON.js +0 -1
- package/dist/ChildRowsPicker-PQFE6NCR.js +0 -1
- package/dist/ChildRowsPicker-XXFFSMWY.js +0 -1
- package/dist/CookieConsent-QOUAY6B4.js +0 -1
- package/dist/GoToDialog-KSBGOIWO.js +0 -1
- package/dist/GoToDialog-XBK5EZF4.js +0 -1
- package/dist/chunk-3CIZFGST.js +0 -1
- package/dist/chunk-LHMKU342.js +0 -1
- package/dist/chunk-MS7ZIW5Z.js +0 -1
- package/dist/chunk-O2XFH626.js +0 -1
- package/dist/chunk-P2DHZWPY.js +0 -1
- package/dist/components/common/lucideIconByName.d.ts +0 -9
- package/dist/components/common/lucideIconByName.d.ts.map +0 -1
- package/dist/components/common/lucideIconByName.js +0 -32
- package/dist/internal/layout/components/PerformanceHints.d.ts +0 -71
- package/dist/internal/layout/components/PerformanceHints.d.ts.map +0 -1
- package/dist/internal/layout/components/PerformanceHints.js +0 -71
|
@@ -1,35 +1 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
// packages/ui/src/internal/layout/components/footer/FooterBranding.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview FooterBranding Component
|
|
5
|
-
* @description "Links to DoNotDev.com in the footers of generated apps.
|
|
6
|
-
*
|
|
7
|
-
* @version 0.1.0
|
|
8
|
-
* @since 0.0.1
|
|
9
|
-
* @author AMBROISE PARK Consulting
|
|
10
|
-
*/
|
|
11
|
-
import { ExternalLink } from 'lucide-react';
|
|
12
|
-
import { useAppConfig, getPlatformEnvVar } from '@donotdev/core';
|
|
13
|
-
/**
|
|
14
|
-
* FooterBranding - Framework branding link (power move)
|
|
15
|
-
*
|
|
16
|
-
* Shows AMBROISE-PARK for framework's own site (donotdev.com),
|
|
17
|
-
* otherwise shows DoNotDev for consumer apps.
|
|
18
|
-
*
|
|
19
|
-
* @version 0.1.0
|
|
20
|
-
* @since 0.0.1
|
|
21
|
-
* @author AMBROISE PARK Consulting
|
|
22
|
-
*/
|
|
23
|
-
export const FooterBranding = ({ className, }) => {
|
|
24
|
-
const appUrl = getPlatformEnvVar('APP_URL');
|
|
25
|
-
const isFrameworkSite = appUrl === 'https://donotdev.com';
|
|
26
|
-
return (_jsxs("a", { href: isFrameworkSite
|
|
27
|
-
? 'https://www.ambroise-park.com'
|
|
28
|
-
: 'https://donotdev.com', target: "_blank", rel: "noopener noreferrer", className: className, style: {
|
|
29
|
-
display: 'inline-flex',
|
|
30
|
-
alignItems: 'center',
|
|
31
|
-
gap: 'var(--gap-sm)',
|
|
32
|
-
fontSize: 'var(--font-size-xs)',
|
|
33
|
-
}, children: [isFrameworkSite ? 'AMBROISE-PARK' : 'DoNotDev', _jsx(ExternalLink, { style: { width: '12px', height: '12px' }, "aria-hidden": "true" })] }));
|
|
34
|
-
};
|
|
35
|
-
export default FooterBranding;
|
|
1
|
+
"use client";import{ExternalLink as r}from"lucide-react";import{getPlatformEnvVar as o}from"@donotdev/core";import{jsx as a,jsxs as p}from"react/jsx-runtime";var n=({className:t})=>{let e=o("APP_URL")==="https://donotdev.com";return p("a",{href:e?"https://www.ambroise-park.com":"https://donotdev.com",target:"_blank",rel:"noopener noreferrer",className:t,style:{display:"inline-flex",alignItems:"center",gap:"var(--gap-sm)",fontSize:"var(--font-size-xs)"},children:[e?"AMBROISE-PARK":"DoNotDev",a(r,{style:{width:"12px",height:"12px"},"aria-hidden":"true"})]})},d=n;export{n as FooterBranding,d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FooterCopyright.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/components/footer/FooterCopyright.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FooterCopyright.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/components/footer/FooterCopyright.tsx"],"names":[],"mappings":"AAeA,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAuBrE,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,37 +1 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
// packages/ui/src/internal/layout/components/footer/FooterCopyright.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview FooterCopyright Component
|
|
5
|
-
* @description Copyright notice with year and app name, uses translations
|
|
6
|
-
*
|
|
7
|
-
* @version 0.1.0
|
|
8
|
-
* @since 0.0.1
|
|
9
|
-
* @author AMBROISE PARK Consulting
|
|
10
|
-
*/
|
|
11
|
-
import { cn } from '@donotdev/components';
|
|
12
|
-
import { useTranslation, useAppConfig } from '@donotdev/core';
|
|
13
|
-
/**
|
|
14
|
-
* FooterCopyright - Copyright notice component
|
|
15
|
-
*
|
|
16
|
-
* Uses useTranslation internally, so it re-renders when language changes.
|
|
17
|
-
* If appName not provided, reads from app config automatically.
|
|
18
|
-
* Renders nothing when the app has no footer (`app.footer: null`), as DnDevFooter,
|
|
19
|
-
* including in presets that show it in the sidebar.
|
|
20
|
-
*
|
|
21
|
-
* @version 0.1.0
|
|
22
|
-
* @since 0.0.1
|
|
23
|
-
* @author AMBROISE PARK Consulting
|
|
24
|
-
*/
|
|
25
|
-
export const FooterCopyright = ({ appName, year = new Date().getFullYear(), className, }) => {
|
|
26
|
-
const { t } = useTranslation('dndev');
|
|
27
|
-
const app = useAppConfig('app');
|
|
28
|
-
const resolvedAppName = appName || app?.name || 'App';
|
|
29
|
-
if (app?.footer === null)
|
|
30
|
-
return null;
|
|
31
|
-
return (_jsxs("span", { className: cn(className), style: {
|
|
32
|
-
flexShrink: 0,
|
|
33
|
-
color: 'var(--muted-foreground)',
|
|
34
|
-
fontSize: 'var(--font-size-xs)',
|
|
35
|
-
}, children: ["\u00A9 ", year, " ", resolvedAppName, ". ", t('footer.legal.allRightsReserved')] }));
|
|
36
|
-
};
|
|
37
|
-
export default FooterCopyright;
|
|
1
|
+
"use client";import{cn as a}from"@donotdev/components";import{useTranslation as s,useAppConfig as l}from"@donotdev/core";import{jsxs as f}from"react/jsx-runtime";var i=({appName:o,year:r=new Date().getFullYear(),className:t})=>{let{t:n}=s("dndev"),e=l("app"),p=o||e?.name||"App";return e?.footer===null?null:f("span",{className:a(t),style:{flexShrink:0,color:"var(--muted-foreground)",fontSize:"var(--font-size-xs)"},children:["\xA9 ",r," ",p,". ",n("footer.legal.allRightsReserved")]})},c=i;export{i as FooterCopyright,c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FooterLegalLinks.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/components/footer/FooterLegalLinks.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FooterLegalLinks.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/components/footer/FooterLegalLinks.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAOlD,MAAM,WAAW,qBAAqB;IACpC,4EAA4E;IAC5E,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,iCAAiC;IACjC,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC7B,wBAAwB;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC5C,yBAAyB;IACzB,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;CAChD;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,qBAAqB,CA0CvE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,44 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
// packages/ui/src/internal/layout/components/footer/FooterLegalLinks.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview FooterLegalLinks Component
|
|
5
|
-
* @description Legal links component for use in sidebars when footer is hidden
|
|
6
|
-
*
|
|
7
|
-
* @version 0.1.0
|
|
8
|
-
* @since 0.0.1
|
|
9
|
-
* @author AMBROISE PARK Consulting
|
|
10
|
-
*/
|
|
11
|
-
import { Stack } from '@donotdev/components';
|
|
12
|
-
import { useTranslation, maybeTranslate, useAppConfig } from '@donotdev/core';
|
|
13
|
-
import { FooterBranding } from './FooterBranding';
|
|
14
|
-
import { getLegalLinks } from './useLegalLinks';
|
|
15
|
-
import { Link } from '../../../../routing/Link';
|
|
16
|
-
/**
|
|
17
|
-
* FooterLegalLinks - Legal links component
|
|
18
|
-
*
|
|
19
|
-
* Renders legal links from app.footer.legalLinks config.
|
|
20
|
-
* If app not provided, reads from app config automatically.
|
|
21
|
-
* Used in footer and sidebar when footer zone is hidden.
|
|
22
|
-
*
|
|
23
|
-
* @version 0.1.0
|
|
24
|
-
* @since 0.0.1
|
|
25
|
-
* @author AMBROISE PARK Consulting
|
|
26
|
-
*/
|
|
27
|
-
export const FooterLegalLinks = ({ app, direction = 'column', gap = 'tight', align = 'stretch', }) => {
|
|
28
|
-
const { t } = useTranslation('dndev');
|
|
29
|
-
const appConfig = useAppConfig('app');
|
|
30
|
-
const resolvedApp = app || appConfig || {};
|
|
31
|
-
const links = getLegalLinks(resolvedApp.footer);
|
|
32
|
-
const linkStyle = {
|
|
33
|
-
transition: 'color var(--dur-fast) ease-out',
|
|
34
|
-
textDecoration: 'underline',
|
|
35
|
-
textUnderlineOffset: '2px',
|
|
36
|
-
color: 'var(--muted-foreground)',
|
|
37
|
-
fontSize: 'var(--font-size-xs)',
|
|
38
|
-
};
|
|
39
|
-
if (links.length === 0) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
return (_jsxs(Stack, { direction: direction, gap: gap, align: align, children: [links.map((link) => (_jsx(Link, { path: link.path, style: linkStyle, onMouseEnter: (e) => (e.currentTarget.style.color = 'var(--primary)'), onMouseLeave: (e) => (e.currentTarget.style.color = 'var(--muted-foreground)'), children: maybeTranslate(t, link.label) }, link.path))), _jsx(FooterBranding, {})] }));
|
|
43
|
-
};
|
|
44
|
-
export default FooterLegalLinks;
|
|
1
|
+
"use client";import{Stack as d}from"@donotdev/components";import{useTranslation as g,maybeTranslate as f,useAppConfig as L}from"@donotdev/core";import{FooterBranding as k}from"./FooterBranding.js";import{getLegalLinks as y}from"./useLegalLinks.js";import{useCookieNoticeRequired as v}from"../../../../components/cookie-consent/useCookieNoticeRequired.js";import{Link as h}from"../../../../routing/Link.js";import{jsx as r,jsxs as F}from"react/jsx-runtime";var x=({app:n,direction:a="column",gap:i="tight",align:p="stretch"})=>{let{t:s}=g("dndev"),l=L("app"),c=n||l||{},m=v(),o=y(c.footer,m),u={transition:"color var(--dur-fast) ease-out",textDecoration:"underline",textUnderlineOffset:"2px",color:"var(--muted-foreground)",fontSize:"var(--font-size-xs)"};return o.length===0?null:F(d,{direction:a,gap:i,align:p,children:[o.map(e=>r(h,{path:e.path,style:u,onMouseEnter:t=>t.currentTarget.style.color="var(--primary)",onMouseLeave:t=>t.currentTarget.style.color="var(--muted-foreground)",children:f(s,e.label)},e.path)),r(k,{})]})},b=x;export{x as FooterLegalLinks,b as default};
|
|
@@ -6,9 +6,11 @@ export interface FooterLegalLink {
|
|
|
6
6
|
/**
|
|
7
7
|
* Returns the configured legal links for the footer.
|
|
8
8
|
* Handles the logic: `footer: null` or `legalLinks: null` = hide, undefined = defaults,
|
|
9
|
-
* array = custom
|
|
9
|
+
* array = custom.
|
|
10
|
+
* The `#cookie-settings` link is dropped when the app has no cookie notice
|
|
11
|
+
* (`cookieNoticeRequired: false`, see `useCookieNoticeRequired`): nothing to configure.
|
|
10
12
|
*
|
|
11
13
|
* @remarks Not a hook — no React state or effects. Named with `get` prefix.
|
|
12
14
|
*/
|
|
13
|
-
export declare const getLegalLinks: (footerConfig: AppMetadata["footer"]) => FooterLegalLink[];
|
|
15
|
+
export declare const getLegalLinks: (footerConfig: AppMetadata["footer"], cookieNoticeRequired?: boolean) => FooterLegalLink[];
|
|
14
16
|
//# sourceMappingURL=useLegalLinks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLegalLinks.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/components/footer/useLegalLinks.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAQD
|
|
1
|
+
{"version":3,"file":"useLegalLinks.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/components/footer/useLegalLinks.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAQD;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,GACxB,cAAc,WAAW,CAAC,QAAQ,CAAC,EACnC,8BAA2B,KAC1B,eAAe,EAWjB,CAAC"}
|
|
@@ -1,21 +1 @@
|
|
|
1
|
-
|
|
2
|
-
const DEFAULT_LINKS = [
|
|
3
|
-
{ path: '#cookie-settings', label: 'footer.legal.cookieSettings' },
|
|
4
|
-
{ label: 'footer.legal.privacyPolicy', path: '/privacy' },
|
|
5
|
-
{ label: 'footer.legal.termsOfService', path: '/terms' },
|
|
6
|
-
];
|
|
7
|
-
/**
|
|
8
|
-
* Returns the configured legal links for the footer.
|
|
9
|
-
* Handles the logic: `footer: null` or `legalLinks: null` = hide, undefined = defaults,
|
|
10
|
-
* array = custom
|
|
11
|
-
*
|
|
12
|
-
* @remarks Not a hook — no React state or effects. Named with `get` prefix.
|
|
13
|
-
*/
|
|
14
|
-
export const getLegalLinks = (footerConfig) => {
|
|
15
|
-
// No footer at all, or links explicitly null: hidden (also in presets that show them in the sidebar)
|
|
16
|
-
if (footerConfig === null || footerConfig?.legalLinks === null) {
|
|
17
|
-
return [];
|
|
18
|
-
}
|
|
19
|
-
// Use configured links or defaults
|
|
20
|
-
return footerConfig?.legalLinks ?? DEFAULT_LINKS;
|
|
21
|
-
};
|
|
1
|
+
var o=[{path:"#cookie-settings",label:"footer.legal.cookieSettings"},{label:"footer.legal.privacyPolicy",path:"/privacy"},{label:"footer.legal.termsOfService",path:"/terms"}],r=(e,l=!0)=>{if(e===null||e?.legalLinks===null)return[];let t=e?.legalLinks??o;return l?t:t.filter(a=>a.path!=="#cookie-settings")};export{r as getLegalLinks};
|
|
@@ -1,53 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { translateArray } from '@donotdev/core';
|
|
3
|
-
/** Upper bound for translateArray: keywords past it are not emitted. */
|
|
4
|
-
const MAX_KEYWORDS = 20;
|
|
5
|
-
/** An empty default is how a missing key is detected: on a namespaced key, i18next returns the key without its namespace. */
|
|
6
|
-
const EMPTY_WHEN_MISSING = { defaultValue: '' };
|
|
7
|
-
/**
|
|
8
|
-
* Resolves a title or description: explicit value, else its translation.
|
|
9
|
-
*
|
|
10
|
-
* @param seoValue - `null` omits the field, a string is used as is, `undefined` looks up the translation
|
|
11
|
-
* @param translationKey - Namespaced key, e.g. `home:description`
|
|
12
|
-
* @param t - Translation function loaded with the key's namespace
|
|
13
|
-
* @returns The resolved text, or undefined when omitted or not translated
|
|
14
|
-
*
|
|
15
|
-
* @version 0.2.2
|
|
16
|
-
* @since 0.2.2
|
|
17
|
-
* @author AMBROISE PARK Consulting
|
|
18
|
-
*/
|
|
19
|
-
export function resolveSeoField(seoValue, translationKey, t) {
|
|
20
|
-
if (seoValue === null)
|
|
21
|
-
return undefined;
|
|
22
|
-
if (seoValue !== undefined)
|
|
23
|
-
return seoValue;
|
|
24
|
-
return t(translationKey, EMPTY_WHEN_MISSING) || undefined;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Reads the SEO fields of a namespace from its translations.
|
|
28
|
-
*
|
|
29
|
-
* @param t - Translation function loaded with `ns`
|
|
30
|
-
* @param ns - Namespace holding the `meta` object
|
|
31
|
-
* @returns The defined fields; a missing or empty field is undefined
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* // JSON: { "meta": { "image": "/og.png", "keywords": ["a", "b"] } }
|
|
35
|
-
* readI18nSeoMeta(t, 'home'); // { image: '/og.png', keywords: ['a', 'b'] }
|
|
36
|
-
*
|
|
37
|
-
* @version 0.2.2
|
|
38
|
-
* @since 0.2.2
|
|
39
|
-
* @author AMBROISE PARK Consulting
|
|
40
|
-
*/
|
|
41
|
-
export function readI18nSeoMeta(t, ns) {
|
|
42
|
-
// why: TFunction is an i18next overload set; a single-signature wrapper cannot satisfy it structurally
|
|
43
|
-
const translateOrEmpty = ((key) => t(key, EMPTY_WHEN_MISSING));
|
|
44
|
-
const field = (name) => translateOrEmpty(`${ns}:meta.${name}`) || undefined;
|
|
45
|
-
const keywords = translateArray(translateOrEmpty, `${ns}:meta.keywords`, MAX_KEYWORDS);
|
|
46
|
-
return {
|
|
47
|
-
fullTitle: field('fullTitle'),
|
|
48
|
-
image: field('image'),
|
|
49
|
-
type: field('type'),
|
|
50
|
-
keywords: keywords.length > 0 ? keywords : undefined,
|
|
51
|
-
author: field('author'),
|
|
52
|
-
};
|
|
53
|
-
}
|
|
1
|
+
import{translateArray as d}from"@donotdev/core";var s=20,u={defaultValue:""};function f(n,t,e){if(n!==null)return n!==void 0?n:e(t,u)||void 0}function l(n,t){let e=(i=>n(i,u)),r=i=>e(`${t}:meta.${i}`)||void 0,o=d(e,`${t}:meta.keywords`,s);return{fullTitle:r("fullTitle"),image:r("image"),type:r("type"),keywords:o.length>0?o:void 0,author:r("author")}}export{l as readI18nSeoMeta,f as resolveSeoField};
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @fileoverview Internal Layout Components Barrel Exports
|
|
4
|
-
* @description Barrel exports for internal layout component modules
|
|
5
|
-
*
|
|
6
|
-
* @version 0.1.0
|
|
7
|
-
* @since 0.0.1
|
|
8
|
-
* @author AMBROISE PARK Consulting
|
|
9
|
-
*/
|
|
10
|
-
export { FooterCopyright } from './footer/FooterCopyright';
|
|
11
|
-
export { FooterLegalLinks } from './footer/FooterLegalLinks';
|
|
12
|
-
export { FooterBranding } from './footer/FooterBranding';
|
|
13
|
-
export { getLegalLinks } from './footer/useLegalLinks';
|
|
1
|
+
import{FooterCopyright as r}from"./footer/FooterCopyright.js";import{FooterLegalLinks as L}from"./footer/FooterLegalLinks.js";import{FooterBranding as p}from"./footer/FooterBranding.js";import{getLegalLinks as i}from"./footer/useLegalLinks.js";export{p as FooterBranding,r as FooterCopyright,L as FooterLegalLinks,i as getLegalLinks};
|
|
@@ -1,47 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DISPLAY } from '@donotdev/components';
|
|
3
|
-
import { LanguageSelector } from '@donotdev/core';
|
|
4
|
-
import { AuthHeader } from '../../../components/auth';
|
|
5
|
-
import { AppBranding, ThemeToggle, } from '../../../components/layout/components';
|
|
6
|
-
import { DnDevNavigationMenu } from '../../../routing';
|
|
7
|
-
import { GoTo } from '../../../routing/GoTo';
|
|
8
|
-
/**
|
|
9
|
-
* Default slot functions - zones use these unless preset overrides
|
|
10
|
-
*
|
|
11
|
-
* All slots are functions, even if they return null.
|
|
12
|
-
* This ensures defaults exist when switching layouts.
|
|
13
|
-
*/
|
|
14
|
-
export const DEFAULT_SLOTS = {
|
|
15
|
-
header: {
|
|
16
|
-
/** Default start: AppBranding (responsive logo + title) */
|
|
17
|
-
start: () => _jsx(AppBranding, { display: DISPLAY.AUTO }),
|
|
18
|
-
/** Default center: empty (function exists but returns null) */
|
|
19
|
-
center: () => null,
|
|
20
|
-
/** Default end: GoTo, Auth, Language, Theme */
|
|
21
|
-
end: () => (_jsxs(_Fragment, { children: [_jsx(GoTo, { display: DISPLAY.AUTO }), _jsx(AuthHeader, { display: DISPLAY.AUTO }), _jsx(LanguageSelector, { display: DISPLAY.AUTO }), _jsx(ThemeToggle, { display: DISPLAY.AUTO })] })),
|
|
22
|
-
},
|
|
23
|
-
sidebar: {
|
|
24
|
-
/** Default top: empty (function exists but returns null) */
|
|
25
|
-
top: () => null,
|
|
26
|
-
/** Default content: Navigation menu */
|
|
27
|
-
content: () => (_jsx(DnDevNavigationMenu, { vertical: true, display: DISPLAY.AUTO })),
|
|
28
|
-
/** Default bottom: Auth, Language, Theme */
|
|
29
|
-
bottom: () => (_jsxs(_Fragment, { children: [_jsx(AuthHeader, { display: DISPLAY.AUTO }), _jsx(LanguageSelector, { display: DISPLAY.AUTO }), _jsx(ThemeToggle, { display: DISPLAY.AUTO })] })),
|
|
30
|
-
/** Default dimensions */
|
|
31
|
-
defaultWidth: 240,
|
|
32
|
-
minWidth: 48,
|
|
33
|
-
maxWidth: 400,
|
|
34
|
-
},
|
|
35
|
-
mobile: {
|
|
36
|
-
mergedBar: {
|
|
37
|
-
/** Default trigger: AppBranding */
|
|
38
|
-
trigger: () => _jsx(AppBranding, { display: DISPLAY.AUTO }),
|
|
39
|
-
/** Default top: empty (function exists but returns null) */
|
|
40
|
-
top: () => null,
|
|
41
|
-
/** Default content: empty (will use sidebar.content default) */
|
|
42
|
-
content: () => null,
|
|
43
|
-
/** Default bottom: empty (will use sidebar.bottom default) */
|
|
44
|
-
bottom: () => null,
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
};
|
|
1
|
+
import{DISPLAY as e}from"@donotdev/components";import{LanguageSelector as o}from"@donotdev/core";import{AuthHeader as a}from"../../../components/auth/index.js";import{AppBranding as d,ThemeToggle as i}from"../../../components/layout/components/index.js";import{DnDevNavigationMenu as p}from"../../../routing/index.js";import{GoTo as m}from"../../../routing/GoTo.js";import{Fragment as r,jsx as t,jsxs as l}from"react/jsx-runtime";var y={header:{start:()=>t(d,{display:e.AUTO}),center:()=>null,end:()=>l(r,{children:[t(m,{display:e.AUTO}),t(a,{display:e.AUTO}),t(o,{display:e.AUTO}),t(i,{display:e.AUTO})]})},sidebar:{top:()=>null,content:()=>t(p,{vertical:!0,display:e.AUTO}),bottom:()=>l(r,{children:[t(a,{display:e.AUTO}),t(o,{display:e.AUTO}),t(i,{display:e.AUTO})]}),defaultWidth:240,minWidth:48,maxWidth:400},mobile:{mergedBar:{trigger:()=>t(d,{display:e.AUTO}),top:()=>null,content:()=>null,bottom:()=>null}}};export{y as DEFAULT_SLOTS};
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @fileoverview Layout Config Barrel Export
|
|
4
|
-
* @description Exports for config-based layout system.
|
|
5
|
-
*
|
|
6
|
-
* @version 0.1.0
|
|
7
|
-
* @since 0.0.1
|
|
8
|
-
* @author AMBROISE PARK Consulting
|
|
9
|
-
*/
|
|
10
|
-
export * from './presets';
|
|
11
|
-
export * from './defaults';
|
|
1
|
+
export*from"./presets/index.js";export*from"./defaults.js";
|
|
@@ -1,35 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { DEFAULT_SLOTS } from '../defaults';
|
|
3
|
-
/**
|
|
4
|
-
* Admin preset - admin panel layout
|
|
5
|
-
*
|
|
6
|
-
* Zones:
|
|
7
|
-
* - Header: Logo + title (left), GoTo + Auth + Language + Theme (right)
|
|
8
|
-
* - Sidebar: Navigation menu only (no bottom controls - they're in header)
|
|
9
|
-
* - Footer: Automatic footer (copyright + legal links + DoNotDev branding)
|
|
10
|
-
*
|
|
11
|
-
* Mobile behavior:
|
|
12
|
-
* - MergedBar at top (64px trigger → sheet)
|
|
13
|
-
* - Sidebar hidden, content in sheet
|
|
14
|
-
*/
|
|
15
|
-
export const adminPreset = {
|
|
16
|
-
name: 'admin',
|
|
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
|
-
},
|
|
23
|
-
footer: {},
|
|
24
|
-
mobile: {
|
|
25
|
-
mergedBar: {
|
|
26
|
-
position: 'top',
|
|
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)
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
};
|
|
1
|
+
import{DEFAULT_SLOTS as e}from"../defaults.js";var o={name:"admin",sidebar:{bottom:()=>null},footer:{},mobile:{mergedBar:{position:"top",height:"var(--header-height)",trigger:e.header.start,top:e.header.center,content:e.sidebar.content,bottom:e.header.end}}};export{o as adminPreset};
|
|
@@ -1,31 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { DEFAULT_SLOTS } from '../defaults';
|
|
3
|
-
/**
|
|
4
|
-
* Blog preset - content-focused layout
|
|
5
|
-
*
|
|
6
|
-
* Zones:
|
|
7
|
-
* - Header: Logo + title (left), actions (right)
|
|
8
|
-
* - Sidebar: Categories/tags navigation
|
|
9
|
-
* - Footer: Automatic footer (copyright + legal links + DoNotDev branding)
|
|
10
|
-
*
|
|
11
|
-
* Mobile behavior:
|
|
12
|
-
* - MergedBar at bottom (48px trigger → sheet)
|
|
13
|
-
* - Maximizes reading space
|
|
14
|
-
*/
|
|
15
|
-
export const blogPreset = {
|
|
16
|
-
name: 'blog',
|
|
17
|
-
// header omitted → uses DEFAULT_SLOTS.header
|
|
18
|
-
// sidebar omitted → uses DEFAULT_SLOTS.sidebar
|
|
19
|
-
footer: {},
|
|
20
|
-
mobile: {
|
|
21
|
-
mergedBar: {
|
|
22
|
-
position: 'bottom',
|
|
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
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
};
|
|
1
|
+
import{DEFAULT_SLOTS as e}from"../defaults.js";var t={name:"blog",footer:{},mobile:{mergedBar:{position:"bottom",trigger:e.header.start,top:e.header.center,content:e.sidebar.content,bottom:e.header.end}}};export{t as blogPreset};
|
|
@@ -1,51 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
// packages/ui/src/internal/layout/config/presets/docs.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview Docs Preset Configuration
|
|
5
|
-
* @description Documentation layout with sidebar and footer (no header).
|
|
6
|
-
* Maximizes vertical reading space.
|
|
7
|
-
*
|
|
8
|
-
* @version 0.1.0
|
|
9
|
-
* @since 0.0.1
|
|
10
|
-
* @author AMBROISE PARK Consulting
|
|
11
|
-
*/
|
|
12
|
-
import { DISPLAY } from '@donotdev/components';
|
|
13
|
-
import { AppBranding } from '../../../../components/layout/components';
|
|
14
|
-
import { GoTo } from '../../../../routing/GoTo';
|
|
15
|
-
import { DEFAULT_SLOTS } from '../defaults';
|
|
16
|
-
/**
|
|
17
|
-
* Docs preset - documentation layout
|
|
18
|
-
*
|
|
19
|
-
* Zones:
|
|
20
|
-
* - No header (maximizes vertical space)
|
|
21
|
-
* - Sidebar: AppBranding + GoTo at top, navigation, settings at bottom
|
|
22
|
-
* - Footer: Automatic footer (copyright + legal links + DoNotDev branding)
|
|
23
|
-
*
|
|
24
|
-
* Mobile behavior:
|
|
25
|
-
* - MergedBar at top (64px hamburger menu → side drawer)
|
|
26
|
-
* - Footer stays visible at bottom (industry standard)
|
|
27
|
-
* - Sidebar content in drawer
|
|
28
|
-
*/
|
|
29
|
-
export const docsPreset = {
|
|
30
|
-
name: 'docs',
|
|
31
|
-
sidebar: {
|
|
32
|
-
top: () => (_jsxs(_Fragment, { children: [_jsx(AppBranding, { display: DISPLAY.AUTO }), _jsx(GoTo, { display: DISPLAY.AUTO })] })),
|
|
33
|
-
// content omitted → uses DEFAULT_SLOTS.sidebar.content
|
|
34
|
-
// bottom omitted → uses DEFAULT_SLOTS.sidebar.bottom
|
|
35
|
-
defaultWidth: 300,
|
|
36
|
-
minWidth: 48,
|
|
37
|
-
maxWidth: 400,
|
|
38
|
-
},
|
|
39
|
-
footer: {},
|
|
40
|
-
mobile: {
|
|
41
|
-
mergedBar: {
|
|
42
|
-
position: 'top',
|
|
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)
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
};
|
|
1
|
+
import{DISPLAY as o}from"@donotdev/components";import{AppBranding as e}from"../../../../components/layout/components/index.js";import{GoTo as i}from"../../../../routing/GoTo.js";import{DEFAULT_SLOTS as r}from"../defaults.js";import{Fragment as d,jsx as t,jsxs as p}from"react/jsx-runtime";var f={name:"docs",sidebar:{top:()=>p(d,{children:[t(e,{display:o.AUTO}),t(i,{display:o.AUTO})]}),defaultWidth:300,minWidth:48,maxWidth:400},footer:{},mobile:{mergedBar:{position:"top",height:"var(--header-height)",trigger:()=>t(e,{display:o.AUTO}),top:()=>t(i,{display:o.AUTO}),content:r.sidebar.content,bottom:r.sidebar.bottom}}};export{f as docsPreset};
|
|
@@ -1,53 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
// packages/ui/src/internal/layout/config/presets/game.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview Game Preset Configuration
|
|
5
|
-
* @description Mobile gaming layout with centered title.
|
|
6
|
-
* Optimized for full-screen gaming experiences.
|
|
7
|
-
*
|
|
8
|
-
* @version 0.1.0
|
|
9
|
-
* @since 0.0.1
|
|
10
|
-
* @author AMBROISE PARK Consulting
|
|
11
|
-
*/
|
|
12
|
-
import { DISPLAY } from '@donotdev/components';
|
|
13
|
-
import { LanguageSelector } from '@donotdev/core';
|
|
14
|
-
import { AuthHeader } from '../../../../components/auth';
|
|
15
|
-
import { GameTitle, ThemeToggle, } from '../../../../components/layout/components';
|
|
16
|
-
import { FooterCopyright } from '../../components/footer/FooterCopyright';
|
|
17
|
-
import { FooterLegalLinks } from '../../components/footer/FooterLegalLinks';
|
|
18
|
-
import { DEFAULT_SLOTS } from '../defaults';
|
|
19
|
-
/**
|
|
20
|
-
* Game preset - mobile gaming layout
|
|
21
|
-
*
|
|
22
|
-
* Zones:
|
|
23
|
-
* - Header: Empty start, GameTitle center, actions end (no GoTo)
|
|
24
|
-
* - Footer: Automatic footer (hidden on mobile, merged into header)
|
|
25
|
-
* - No sidebar
|
|
26
|
-
*
|
|
27
|
-
* Mobile behavior:
|
|
28
|
-
* - MergedBar at top includes footer content
|
|
29
|
-
* - Footer hidden on mobile/tablet
|
|
30
|
-
*/
|
|
31
|
-
export const gamePreset = {
|
|
32
|
-
name: 'game',
|
|
33
|
-
header: {
|
|
34
|
-
start: () => null,
|
|
35
|
-
center: () => _jsx(GameTitle, {}),
|
|
36
|
-
end: () => (_jsxs(_Fragment, { children: [_jsx(AuthHeader, { display: DISPLAY.AUTO }), _jsx(LanguageSelector, { display: DISPLAY.AUTO }), _jsx(ThemeToggle, { display: DISPLAY.AUTO })] })),
|
|
37
|
-
},
|
|
38
|
-
footer: {},
|
|
39
|
-
mobile: {
|
|
40
|
-
mergedBar: {
|
|
41
|
-
position: 'top',
|
|
42
|
-
// Desktop → Mobile mapping:
|
|
43
|
-
trigger: () => _jsx(GameTitle, {}), // header.center → trigger
|
|
44
|
-
top: () => (
|
|
45
|
-
// header.end → top (Auth, Language, Theme)
|
|
46
|
-
_jsxs(_Fragment, { children: [_jsx(AuthHeader, { display: DISPLAY.AUTO }), _jsx(LanguageSelector, { display: DISPLAY.AUTO }), _jsx(ThemeToggle, { display: DISPLAY.AUTO })] })),
|
|
47
|
-
content: DEFAULT_SLOTS.sidebar.content, // Navigation menu
|
|
48
|
-
bottom: () => (
|
|
49
|
-
// Footer content: copyright + legal links (includes branding)
|
|
50
|
-
_jsxs(_Fragment, { children: [_jsx(FooterCopyright, {}), _jsx(FooterLegalLinks, {})] })),
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
};
|
|
1
|
+
import{DISPLAY as e}from"@donotdev/components";import{LanguageSelector as i}from"@donotdev/core";import{AuthHeader as m}from"../../../../components/auth/index.js";import{GameTitle as p,ThemeToggle as a}from"../../../../components/layout/components/index.js";import{FooterCopyright as n}from"../../components/footer/FooterCopyright.js";import{FooterLegalLinks as d}from"../../components/footer/FooterLegalLinks.js";import{DEFAULT_SLOTS as g}from"../defaults.js";import{Fragment as r,jsx as o,jsxs as t}from"react/jsx-runtime";var U={name:"game",header:{start:()=>null,center:()=>o(p,{}),end:()=>t(r,{children:[o(m,{display:e.AUTO}),o(i,{display:e.AUTO}),o(a,{display:e.AUTO})]})},footer:{},mobile:{mergedBar:{position:"top",trigger:()=>o(p,{}),top:()=>t(r,{children:[o(m,{display:e.AUTO}),o(i,{display:e.AUTO}),o(a,{display:e.AUTO})]}),content:g.sidebar.content,bottom:()=>t(r,{children:[o(n,{}),o(d,{})]})}}};export{U as gamePreset};
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './admin';
|
|
3
|
-
export * from './blog';
|
|
4
|
-
export * from './docs';
|
|
5
|
-
export * from './game';
|
|
6
|
-
export * from './landing';
|
|
7
|
-
export * from './moolti';
|
|
8
|
-
export * from './plain';
|
|
9
|
-
import { adminPreset } from './admin';
|
|
10
|
-
import { blogPreset } from './blog';
|
|
11
|
-
import { docsPreset } from './docs';
|
|
12
|
-
import { gamePreset } from './game';
|
|
13
|
-
import { landingPreset } from './landing';
|
|
14
|
-
import { mooltiPreset } from './moolti';
|
|
15
|
-
import { plainPreset } from './plain';
|
|
16
|
-
export const presetRegistry = {
|
|
17
|
-
admin: adminPreset,
|
|
18
|
-
blog: blogPreset,
|
|
19
|
-
docs: docsPreset,
|
|
20
|
-
game: gamePreset,
|
|
21
|
-
landing: landingPreset,
|
|
22
|
-
moolti: mooltiPreset,
|
|
23
|
-
plain: plainPreset,
|
|
24
|
-
};
|
|
1
|
+
export*from"./admin.js";export*from"./blog.js";export*from"./docs.js";export*from"./game.js";export*from"./landing.js";export*from"./moolti.js";export*from"./plain.js";import{adminPreset as r}from"./admin.js";import{blogPreset as o}from"./blog.js";import{docsPreset as e}from"./docs.js";import{gamePreset as t}from"./game.js";import{landingPreset as m}from"./landing.js";import{mooltiPreset as p}from"./moolti.js";import{plainPreset as i}from"./plain.js";var l={admin:r,blog:o,docs:e,game:t,landing:m,moolti:p,plain:i};export{l as presetRegistry};
|
|
@@ -1,42 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
// packages/ui/src/internal/layout/config/presets/landing.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview Landing Preset Configuration
|
|
5
|
-
* @description Marketing site layout with header and footer.
|
|
6
|
-
* Optimized for landing pages and public content.
|
|
7
|
-
*
|
|
8
|
-
* @version 0.1.0
|
|
9
|
-
* @since 0.0.1
|
|
10
|
-
* @author AMBROISE PARK Consulting
|
|
11
|
-
*/
|
|
12
|
-
import { DISPLAY } from '@donotdev/components';
|
|
13
|
-
import { LanguageSelector } from '@donotdev/core';
|
|
14
|
-
import { AuthHeader } from '../../../../components/auth';
|
|
15
|
-
import { AppBranding, HeaderMenu, ThemeToggle, } from '../../../../components/layout/components';
|
|
16
|
-
import { GoTo } from '../../../../routing/GoTo';
|
|
17
|
-
/**
|
|
18
|
-
* Landing preset - marketing site layout
|
|
19
|
-
*
|
|
20
|
-
* Zones:
|
|
21
|
-
* - Header: AppBranding (left), GoTo + Auth + Language + Theme (right)
|
|
22
|
-
* - Footer: Automatic footer (copyright + legal links + DoNotDev branding)
|
|
23
|
-
* - No sidebar
|
|
24
|
-
*
|
|
25
|
-
* Mobile behavior:
|
|
26
|
-
* - Header start: AppBranding COMPACT (logo only)
|
|
27
|
-
* - Header end: HeaderMenu hamburger wrapping desktop end content
|
|
28
|
-
*/
|
|
29
|
-
export const landingPreset = {
|
|
30
|
-
name: 'landing',
|
|
31
|
-
header: {
|
|
32
|
-
start: () => _jsx(AppBranding, {}),
|
|
33
|
-
end: () => (_jsxs(_Fragment, { children: [_jsx(GoTo, { display: DISPLAY.AUTO }), _jsx(AuthHeader, { display: DISPLAY.AUTO }), _jsx(LanguageSelector, { display: DISPLAY.COMPACT }), _jsx(ThemeToggle, { display: DISPLAY.COMPACT })] })),
|
|
34
|
-
},
|
|
35
|
-
footer: {},
|
|
36
|
-
mobile: {
|
|
37
|
-
header: {
|
|
38
|
-
start: () => _jsx(AppBranding, { display: DISPLAY.COMPACT }),
|
|
39
|
-
end: () => (_jsxs(HeaderMenu, { children: [_jsx(GoTo, { display: DISPLAY.AUTO }), _jsx(AuthHeader, { display: DISPLAY.AUTO }), _jsx(LanguageSelector, { display: DISPLAY.COMPACT }), _jsx(ThemeToggle, { display: DISPLAY.COMPACT })] })),
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
};
|
|
1
|
+
import{DISPLAY as o}from"@donotdev/components";import{LanguageSelector as r}from"@donotdev/core";import{AuthHeader as a}from"../../../../components/auth/index.js";import{AppBranding as d,HeaderMenu as n,ThemeToggle as i}from"../../../../components/layout/components/index.js";import{GoTo as p}from"../../../../routing/GoTo.js";import{Fragment as l,jsx as e,jsxs as t}from"react/jsx-runtime";var y={name:"landing",header:{start:()=>e(d,{}),end:()=>t(l,{children:[e(p,{display:o.AUTO}),e(a,{display:o.AUTO}),e(r,{display:o.COMPACT}),e(i,{display:o.COMPACT})]})},footer:{},mobile:{header:{start:()=>e(d,{display:o.COMPACT}),end:()=>t(n,{children:[e(p,{display:o.AUTO}),e(a,{display:o.AUTO}),e(r,{display:o.COMPACT}),e(i,{display:o.COMPACT})]})}}};export{y as landingPreset};
|
|
@@ -1,52 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
// packages/ui/src/internal/layout/config/presets/moolti.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview Moolti Preset Configuration
|
|
5
|
-
* @description SaaS app layout with sidebar only (no header/footer zones).
|
|
6
|
-
* All UI in sidebar for focused productivity.
|
|
7
|
-
*
|
|
8
|
-
* @version 0.1.0
|
|
9
|
-
* @since 0.0.1
|
|
10
|
-
* @author AMBROISE PARK Consulting
|
|
11
|
-
*/
|
|
12
|
-
import { DISPLAY, Stack } from '@donotdev/components';
|
|
13
|
-
import { LanguageSelector } from '@donotdev/core';
|
|
14
|
-
import { AuthHeader } from '../../../../components/auth';
|
|
15
|
-
import { AppBranding, ThemeToggle, } from '../../../../components/layout/components';
|
|
16
|
-
import { DnDevNavigationMenu, GoTo } from '../../../../routing';
|
|
17
|
-
import { FooterCopyright, FooterLegalLinks } from '../../components';
|
|
18
|
-
const sidebarTop = () => _jsx(AppBranding, { display: DISPLAY.AUTO });
|
|
19
|
-
const sidebarContent = () => (_jsxs(_Fragment, { children: [_jsx(GoTo, { display: DISPLAY.AUTO }), _jsx(DnDevNavigationMenu, { vertical: true, display: DISPLAY.AUTO })] }));
|
|
20
|
-
const sidebarBottom = () => (_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(FooterLegalLinks, { direction: "column" }), _jsx(FooterCopyright, {})] }));
|
|
21
|
-
/**
|
|
22
|
-
* Moolti preset - SaaS app layout
|
|
23
|
-
*
|
|
24
|
-
* Zones:
|
|
25
|
-
* - No header zone (branding in sidebar)
|
|
26
|
-
* - Sidebar: AppIcon + AppTitle top, GoTo + navigation, settings/footer at bottom
|
|
27
|
-
* - No footer zone (footer content in sidebar)
|
|
28
|
-
*
|
|
29
|
-
* Mobile behavior:
|
|
30
|
-
* - MergedBar at top (64px trigger → sheet)
|
|
31
|
-
* - Full sidebar content in sheet
|
|
32
|
-
*/
|
|
33
|
-
export const mooltiPreset = {
|
|
34
|
-
name: 'moolti',
|
|
35
|
-
sidebar: {
|
|
36
|
-
top: sidebarTop,
|
|
37
|
-
content: sidebarContent,
|
|
38
|
-
bottom: sidebarBottom,
|
|
39
|
-
defaultWidth: 256,
|
|
40
|
-
minWidth: 48,
|
|
41
|
-
maxWidth: 400,
|
|
42
|
-
},
|
|
43
|
-
mobile: {
|
|
44
|
-
mergedBar: {
|
|
45
|
-
position: 'top',
|
|
46
|
-
trigger: sidebarTop,
|
|
47
|
-
top: () => null,
|
|
48
|
-
content: sidebarContent,
|
|
49
|
-
bottom: sidebarBottom,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
};
|
|
1
|
+
import{DISPLAY as t,Stack as m}from"@donotdev/components";import{LanguageSelector as a}from"@donotdev/core";import{AuthHeader as p}from"../../../../components/auth/index.js";import{AppBranding as d,ThemeToggle as l}from"../../../../components/layout/components/index.js";import{DnDevNavigationMenu as s,GoTo as g}from"../../../../routing/index.js";import{FooterCopyright as c,FooterLegalLinks as f}from"../../components/index.js";import{Fragment as T,jsx as o,jsxs as n}from"react/jsx-runtime";var i=()=>o(d,{display:t.AUTO}),e=()=>n(T,{children:[o(g,{display:t.AUTO}),o(s,{vertical:!0,display:t.AUTO})]}),r=()=>n(m,{direction:"column",gap:"tight",align:"stretch",children:[o(p,{display:t.AUTO}),o(a,{display:t.AUTO}),o(l,{display:t.AUTO}),o(f,{direction:"column"}),o(c,{})]}),U={name:"moolti",sidebar:{top:i,content:e,bottom:r,defaultWidth:256,minWidth:48,maxWidth:400},mobile:{mergedBar:{position:"top",trigger:i,top:()=>null,content:e,bottom:r}}};export{U as mooltiPreset};
|