@donotdev/ui 0.1.1 → 0.1.43
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 +21 -242
- package/README.md +1 -19
- package/assets/apple-touch-icon.png +0 -0
- package/assets/favicon.ico +0 -0
- package/assets/fonts/Inter-latin-ext.woff2 +0 -0
- package/assets/fonts/Inter-latin.woff2 +0 -0
- package/assets/fonts/PlayfairDisplay-latin-ext.woff2 +0 -0
- package/assets/fonts/PlayfairDisplay-latin.woff2 +0 -0
- package/assets/fonts/Roboto-400-cyrillic-ext.woff2 +0 -0
- package/assets/fonts/Roboto-400-cyrillic.woff2 +0 -0
- package/assets/fonts/Roboto-400-greek-ext.woff2 +0 -0
- package/assets/fonts/Roboto-400-greek.woff2 +0 -0
- package/assets/fonts/Roboto-400-latin-ext.woff2 +0 -0
- package/assets/fonts/Roboto-400-latin.woff2 +0 -0
- package/assets/fonts/Roboto-400-vietnamese.woff2 +0 -0
- package/assets/fonts/Roboto-700-cyrillic-ext.woff2 +0 -0
- package/assets/fonts/Roboto-700-cyrillic.woff2 +0 -0
- package/assets/fonts/Roboto-700-greek-ext.woff2 +0 -0
- package/assets/fonts/Roboto-700-greek.woff2 +0 -0
- package/assets/fonts/Roboto-700-latin-ext.woff2 +0 -0
- package/assets/fonts/Roboto-700-latin.woff2 +0 -0
- package/assets/fonts/Roboto-700-vietnamese.woff2 +0 -0
- package/assets/icon-192x192.png +0 -0
- package/assets/icon-512x512.png +0 -0
- package/assets/logo.png +0 -0
- package/assets/logo.svg +1 -1
- package/assets/manifest.json +0 -0
- package/dist/CookieConsent-5NH5DNTP.js +1 -0
- package/dist/{GoToDialog-RU5RP7S2.js → GoToDialog-CICRYHHG.js} +1 -1
- package/dist/chunk-MIPTBUWY.js +1 -0
- package/dist/components/common/FeatureCard.d.ts +9 -6
- package/dist/components/common/FeatureCard.d.ts.map +1 -1
- package/dist/components/common/FeatureCard.js +43 -32
- package/dist/components/cookie-consent/CookieConsent.d.ts +3 -3
- package/dist/components/cookie-consent/CookieConsent.d.ts.map +1 -1
- package/dist/components/cookie-consent/CookieConsent.js +36 -35
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +0 -1
- package/dist/components/layout/components/header/CacheSettings.d.ts.map +1 -1
- package/dist/components/layout/components/header/CacheSettings.js +6 -2
- package/dist/crud/components/EntityCardList.d.ts.map +1 -1
- package/dist/crud/components/EntityCardList.js +17 -4
- package/dist/crud/components/EntityDisplayRenderer.js +4 -4
- package/dist/crud/components/EntityFormRenderer.d.ts +6 -1
- package/dist/crud/components/EntityFormRenderer.d.ts.map +1 -1
- package/dist/crud/components/EntityFormRenderer.js +31 -21
- package/dist/crud/components/EntityList.d.ts.map +1 -1
- package/dist/crud/components/EntityList.js +56 -72
- package/dist/crud/components/EntityRecommendations.d.ts.map +1 -1
- package/dist/crud/components/EntityWorkflow.d.ts.map +1 -1
- package/dist/crud/components/EntityWorkflow.js +1 -1
- package/dist/crud/crudImports.d.ts +0 -1
- package/dist/crud/crudImports.d.ts.map +1 -1
- package/dist/crud/crudImports.js +0 -1
- package/dist/dndev-next.css +659 -107
- package/dist/dndev.css +794 -113
- package/dist/files/inter-cyrillic-300-normal.woff +0 -0
- package/dist/files/inter-cyrillic-300-normal.woff2 +0 -0
- package/dist/files/inter-cyrillic-400-normal.woff +0 -0
- package/dist/files/inter-cyrillic-400-normal.woff2 +0 -0
- package/dist/files/inter-cyrillic-600-normal.woff +0 -0
- package/dist/files/inter-cyrillic-600-normal.woff2 +0 -0
- package/dist/files/inter-cyrillic-700-normal.woff +0 -0
- package/dist/files/inter-cyrillic-700-normal.woff2 +0 -0
- package/dist/files/inter-cyrillic-ext-300-normal.woff +0 -0
- package/dist/files/inter-cyrillic-ext-300-normal.woff2 +0 -0
- package/dist/files/inter-cyrillic-ext-400-normal.woff +0 -0
- package/dist/files/inter-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/files/inter-cyrillic-ext-600-normal.woff +0 -0
- package/dist/files/inter-cyrillic-ext-600-normal.woff2 +0 -0
- package/dist/files/inter-cyrillic-ext-700-normal.woff +0 -0
- package/dist/files/inter-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/files/inter-greek-300-normal.woff +0 -0
- package/dist/files/inter-greek-300-normal.woff2 +0 -0
- package/dist/files/inter-greek-400-normal.woff +0 -0
- package/dist/files/inter-greek-400-normal.woff2 +0 -0
- package/dist/files/inter-greek-600-normal.woff +0 -0
- package/dist/files/inter-greek-600-normal.woff2 +0 -0
- package/dist/files/inter-greek-700-normal.woff +0 -0
- package/dist/files/inter-greek-700-normal.woff2 +0 -0
- package/dist/files/inter-greek-ext-300-normal.woff +0 -0
- package/dist/files/inter-greek-ext-300-normal.woff2 +0 -0
- package/dist/files/inter-greek-ext-400-normal.woff +0 -0
- package/dist/files/inter-greek-ext-400-normal.woff2 +0 -0
- package/dist/files/inter-greek-ext-600-normal.woff +0 -0
- package/dist/files/inter-greek-ext-600-normal.woff2 +0 -0
- package/dist/files/inter-greek-ext-700-normal.woff +0 -0
- package/dist/files/inter-greek-ext-700-normal.woff2 +0 -0
- package/dist/files/inter-latin-300-normal.woff +0 -0
- package/dist/files/inter-latin-300-normal.woff2 +0 -0
- package/dist/files/inter-latin-400-normal.woff +0 -0
- package/dist/files/inter-latin-400-normal.woff2 +0 -0
- package/dist/files/inter-latin-600-normal.woff +0 -0
- package/dist/files/inter-latin-600-normal.woff2 +0 -0
- package/dist/files/inter-latin-700-normal.woff +0 -0
- package/dist/files/inter-latin-700-normal.woff2 +0 -0
- package/dist/files/inter-latin-ext-300-normal.woff +0 -0
- package/dist/files/inter-latin-ext-300-normal.woff2 +0 -0
- package/dist/files/inter-latin-ext-400-normal.woff +0 -0
- package/dist/files/inter-latin-ext-400-normal.woff2 +0 -0
- package/dist/files/inter-latin-ext-600-normal.woff +0 -0
- package/dist/files/inter-latin-ext-600-normal.woff2 +0 -0
- package/dist/files/inter-latin-ext-700-normal.woff +0 -0
- package/dist/files/inter-latin-ext-700-normal.woff2 +0 -0
- package/dist/files/inter-vietnamese-300-normal.woff +0 -0
- package/dist/files/inter-vietnamese-300-normal.woff2 +0 -0
- package/dist/files/inter-vietnamese-400-normal.woff +0 -0
- package/dist/files/inter-vietnamese-400-normal.woff2 +0 -0
- package/dist/files/inter-vietnamese-600-normal.woff +0 -0
- package/dist/files/inter-vietnamese-600-normal.woff2 +0 -0
- package/dist/files/inter-vietnamese-700-normal.woff +0 -0
- package/dist/files/inter-vietnamese-700-normal.woff2 +0 -0
- package/dist/files/playfair-display-cyrillic-400-normal.woff +0 -0
- package/dist/files/playfair-display-cyrillic-400-normal.woff2 +0 -0
- package/dist/files/playfair-display-cyrillic-500-normal.woff +0 -0
- package/dist/files/playfair-display-cyrillic-500-normal.woff2 +0 -0
- package/dist/files/playfair-display-cyrillic-600-normal.woff +0 -0
- package/dist/files/playfair-display-cyrillic-600-normal.woff2 +0 -0
- package/dist/files/playfair-display-cyrillic-700-normal.woff +0 -0
- package/dist/files/playfair-display-cyrillic-700-normal.woff2 +0 -0
- package/dist/files/playfair-display-latin-400-normal.woff +0 -0
- package/dist/files/playfair-display-latin-400-normal.woff2 +0 -0
- package/dist/files/playfair-display-latin-500-normal.woff +0 -0
- package/dist/files/playfair-display-latin-500-normal.woff2 +0 -0
- package/dist/files/playfair-display-latin-600-normal.woff +0 -0
- package/dist/files/playfair-display-latin-600-normal.woff2 +0 -0
- package/dist/files/playfair-display-latin-700-normal.woff +0 -0
- package/dist/files/playfair-display-latin-700-normal.woff2 +0 -0
- package/dist/files/playfair-display-latin-ext-400-normal.woff +0 -0
- package/dist/files/playfair-display-latin-ext-400-normal.woff2 +0 -0
- package/dist/files/playfair-display-latin-ext-500-normal.woff +0 -0
- package/dist/files/playfair-display-latin-ext-500-normal.woff2 +0 -0
- package/dist/files/playfair-display-latin-ext-600-normal.woff +0 -0
- package/dist/files/playfair-display-latin-ext-600-normal.woff2 +0 -0
- package/dist/files/playfair-display-latin-ext-700-normal.woff +0 -0
- package/dist/files/playfair-display-latin-ext-700-normal.woff2 +0 -0
- package/dist/files/playfair-display-vietnamese-400-normal.woff +0 -0
- package/dist/files/playfair-display-vietnamese-400-normal.woff2 +0 -0
- package/dist/files/playfair-display-vietnamese-500-normal.woff +0 -0
- package/dist/files/playfair-display-vietnamese-500-normal.woff2 +0 -0
- package/dist/files/playfair-display-vietnamese-600-normal.woff +0 -0
- package/dist/files/playfair-display-vietnamese-600-normal.woff2 +0 -0
- package/dist/files/playfair-display-vietnamese-700-normal.woff +0 -0
- package/dist/files/playfair-display-vietnamese-700-normal.woff2 +0 -0
- package/dist/files/press-start-2p-cyrillic-400-normal.woff +0 -0
- package/dist/files/press-start-2p-cyrillic-400-normal.woff2 +0 -0
- package/dist/files/press-start-2p-cyrillic-ext-400-normal.woff +0 -0
- package/dist/files/press-start-2p-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/files/press-start-2p-greek-400-normal.woff +0 -0
- package/dist/files/press-start-2p-greek-400-normal.woff2 +0 -0
- package/dist/files/press-start-2p-latin-400-normal.woff +0 -0
- package/dist/files/press-start-2p-latin-400-normal.woff2 +0 -0
- package/dist/files/press-start-2p-latin-ext-400-normal.woff +0 -0
- package/dist/files/press-start-2p-latin-ext-400-normal.woff2 +0 -0
- package/dist/files/roboto-cyrillic-400-normal.woff +0 -0
- package/dist/files/roboto-cyrillic-400-normal.woff2 +0 -0
- package/dist/files/roboto-cyrillic-700-normal.woff +0 -0
- package/dist/files/roboto-cyrillic-700-normal.woff2 +0 -0
- package/dist/files/roboto-cyrillic-ext-400-normal.woff +0 -0
- package/dist/files/roboto-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/files/roboto-cyrillic-ext-700-normal.woff +0 -0
- package/dist/files/roboto-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/files/roboto-greek-400-normal.woff +0 -0
- package/dist/files/roboto-greek-400-normal.woff2 +0 -0
- package/dist/files/roboto-greek-700-normal.woff +0 -0
- package/dist/files/roboto-greek-700-normal.woff2 +0 -0
- package/dist/files/roboto-greek-ext-400-normal.woff +0 -0
- package/dist/files/roboto-greek-ext-400-normal.woff2 +0 -0
- package/dist/files/roboto-greek-ext-700-normal.woff +0 -0
- package/dist/files/roboto-greek-ext-700-normal.woff2 +0 -0
- package/dist/files/roboto-latin-400-normal.woff +0 -0
- package/dist/files/roboto-latin-400-normal.woff2 +0 -0
- package/dist/files/roboto-latin-700-normal.woff +0 -0
- package/dist/files/roboto-latin-700-normal.woff2 +0 -0
- package/dist/files/roboto-latin-ext-400-normal.woff +0 -0
- package/dist/files/roboto-latin-ext-400-normal.woff2 +0 -0
- package/dist/files/roboto-latin-ext-700-normal.woff +0 -0
- package/dist/files/roboto-latin-ext-700-normal.woff2 +0 -0
- package/dist/files/roboto-math-400-normal.woff +0 -0
- package/dist/files/roboto-math-400-normal.woff2 +0 -0
- package/dist/files/roboto-math-700-normal.woff +0 -0
- package/dist/files/roboto-math-700-normal.woff2 +0 -0
- package/dist/files/roboto-symbols-400-normal.woff +0 -0
- package/dist/files/roboto-symbols-400-normal.woff2 +0 -0
- package/dist/files/roboto-symbols-700-normal.woff +0 -0
- package/dist/files/roboto-symbols-700-normal.woff2 +0 -0
- package/dist/files/roboto-vietnamese-400-normal.woff +0 -0
- package/dist/files/roboto-vietnamese-400-normal.woff2 +0 -0
- package/dist/files/roboto-vietnamese-700-normal.woff +0 -0
- package/dist/files/roboto-vietnamese-700-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-300-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-300-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-400-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-400-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-500-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-500-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-600-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-600-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-700-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-700-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-ext-300-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-ext-300-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-ext-400-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-ext-400-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-ext-500-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-ext-500-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-ext-600-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-ext-600-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-ext-700-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-ext-700-normal.woff2 +0 -0
- package/dist/files/space-grotesk-vietnamese-300-normal.woff +0 -0
- package/dist/files/space-grotesk-vietnamese-300-normal.woff2 +0 -0
- package/dist/files/space-grotesk-vietnamese-400-normal.woff +0 -0
- package/dist/files/space-grotesk-vietnamese-400-normal.woff2 +0 -0
- package/dist/files/space-grotesk-vietnamese-500-normal.woff +0 -0
- package/dist/files/space-grotesk-vietnamese-500-normal.woff2 +0 -0
- package/dist/files/space-grotesk-vietnamese-600-normal.woff +0 -0
- package/dist/files/space-grotesk-vietnamese-600-normal.woff2 +0 -0
- package/dist/files/space-grotesk-vietnamese-700-normal.woff +0 -0
- package/dist/files/space-grotesk-vietnamese-700-normal.woff2 +0 -0
- package/dist/index.js +4 -4
- package/dist/internal/devtools/components/DesignTab.d.ts.map +1 -1
- package/dist/internal/devtools/utils/virtualModuleInspector.d.ts.map +1 -1
- package/dist/internal/devtools/utils/virtualModuleInspector.js +12 -1
- package/dist/internal/initializers/BaseStoresInitializer.d.ts +3 -1
- package/dist/internal/initializers/BaseStoresInitializer.d.ts.map +1 -1
- package/dist/internal/initializers/BaseStoresInitializer.js +8 -4
- package/dist/internal/initializers/NextJsStoresInitializer.d.ts +1 -1
- package/dist/internal/initializers/NextJsStoresInitializer.d.ts.map +1 -1
- package/dist/internal/initializers/NextJsStoresInitializer.js +2 -13
- package/dist/internal/layout/DnDevLayout.d.ts.map +1 -1
- package/dist/internal/layout/DnDevLayout.js +32 -13
- package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
- package/dist/internal/layout/components/AutoMetaTags.js +3 -7
- package/dist/internal/layout/config/presets/moolti.d.ts.map +1 -1
- package/dist/internal/layout/config/presets/moolti.js +11 -13
- package/dist/internal/layout/zones/DnDevFooter.d.ts +1 -1
- package/dist/internal/layout/zones/DnDevFooter.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevFooter.js +1 -1
- package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
- package/dist/providers/NextJsAppProviders.js +12 -8
- package/dist/routing/AuthGuard.d.ts.map +1 -1
- package/dist/routing/AuthGuard.js +1 -1
- package/dist/routing/AuthReturnTo.d.ts.map +1 -1
- package/dist/routing/GoToInput.d.ts.map +1 -1
- package/dist/routing/GoToInput.js +5 -5
- package/dist/routing/Link.d.ts.map +1 -1
- package/dist/routing/Link.js +14 -0
- package/dist/routing/hooks/hooks.next.js +1 -1
- package/dist/routing/hooks/hooks.vite.js +1 -1
- package/dist/routing/hooks/useNavigate.next.d.ts +2 -6
- package/dist/routing/hooks/useNavigate.next.d.ts.map +1 -1
- package/dist/routing/hooks/useNavigate.next.js +5 -52
- package/dist/routing/hooks/useNavigate.vite.d.ts +2 -6
- package/dist/routing/hooks/useNavigate.vite.d.ts.map +1 -1
- package/dist/routing/hooks/useNavigate.vite.js +5 -52
- package/dist/routing/hooks/useRedirectGuard.next.d.ts.map +1 -1
- package/dist/routing/hooks/useRedirectGuard.next.js +5 -1
- package/dist/routing/hooks/useRedirectGuard.vite.d.ts.map +1 -1
- package/dist/routing/hooks/useRedirectGuard.vite.js +5 -1
- package/dist/routing/useGoTo.d.ts.map +1 -1
- package/dist/routing/useGoTo.js +12 -17
- package/dist/styles/index.css +794 -113
- package/dist/symbol-index.json +1 -1
- package/dist/utils/useAuthSafe.d.ts.map +1 -1
- package/dist/utils/useSeo.d.ts +1 -1
- package/dist/utils/useSeo.d.ts.map +1 -1
- package/dist/utils/useSeo.js +3 -1
- package/dist/vite-routing/AppRoutes.d.ts.map +1 -1
- package/dist/vite-routing/AppRoutes.js +7 -2
- package/dist/vite-routing/RootLayout.d.ts.map +1 -1
- package/dist/vite-routing/RootLayout.js +1 -4
- package/guidelines/COMPONENTS.md +0 -0
- package/guidelines/GOTCHAS.md +0 -0
- package/guidelines/LAYOUTS.md +0 -0
- package/guidelines/PAGES.md +0 -0
- package/guidelines/ROUTING.md +0 -0
- package/guidelines/SEO.md +0 -0
- package/package.json +13 -13
- package/dist/CookieConsent-UVTR7CWW.js +0 -1
- package/dist/chunk-ETE4RC7M.js +0 -1
- package/dist/components/license/LicenseWatermark.d.ts +0 -25
- package/dist/components/license/LicenseWatermark.d.ts.map +0 -1
- package/dist/components/license/LicenseWatermark.js +0 -109
- package/dist/components/license/watermarkData.d.ts +0 -7
- package/dist/components/license/watermarkData.d.ts.map +0 -1
- package/dist/components/license/watermarkData.js +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DesignTab.d.ts","sourceRoot":"","sources":["../../../../src/internal/devtools/components/DesignTab.tsx"],"names":[],"mappings":"AA+CA,eAAO,MAAM,SAAS,+
|
|
1
|
+
{"version":3,"file":"DesignTab.d.ts","sourceRoot":"","sources":["../../../../src/internal/devtools/components/DesignTab.tsx"],"names":[],"mappings":"AA+CA,eAAO,MAAM,SAAS,+CAozBrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtualModuleInspector.d.ts","sourceRoot":"","sources":["../../../../src/internal/devtools/utils/virtualModuleInspector.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,OAAO,EAER,MAAM,UAAU,CAAC;AAElB,qBAAa,sBAAsB;WACpB,eAAe,IAAI,OAAO,CAAC,mBAAmB,CAAC;WA4E/C,cAAc,IAAI,OAAO,CAAC,mBAAmB,CAAC;IA2D3D,MAAM,CAAC,sBAAsB,IAAI,UAAU;IAoB3C,MAAM,CAAC,kBAAkB,IAAI,OAAO;
|
|
1
|
+
{"version":3,"file":"virtualModuleInspector.d.ts","sourceRoot":"","sources":["../../../../src/internal/devtools/utils/virtualModuleInspector.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,OAAO,EAER,MAAM,UAAU,CAAC;AAElB,qBAAa,sBAAsB;WACpB,eAAe,IAAI,OAAO,CAAC,mBAAmB,CAAC;WA4E/C,cAAc,IAAI,OAAO,CAAC,mBAAmB,CAAC;IA2D3D,MAAM,CAAC,sBAAsB,IAAI,UAAU;IAoB3C,MAAM,CAAC,kBAAkB,IAAI,OAAO;WA6GvB,kBAAkB,IAAI,OAAO,CAAC,iBAAiB,CAAC;CAgF9D"}
|
|
@@ -150,7 +150,18 @@ export class VirtualModuleInspector {
|
|
|
150
150
|
}
|
|
151
151
|
static getCSSVariableData() {
|
|
152
152
|
if (typeof document === 'undefined')
|
|
153
|
-
return {
|
|
153
|
+
return {
|
|
154
|
+
dndevVariables: {},
|
|
155
|
+
allCSSPropsCount: 0,
|
|
156
|
+
dndevVarsCount: 0,
|
|
157
|
+
utilityTests: {},
|
|
158
|
+
actualHeader: null,
|
|
159
|
+
keyVariables: {
|
|
160
|
+
headerHeight: 'not set',
|
|
161
|
+
sidebarWidth: 'not set',
|
|
162
|
+
debugEnabled: 'not set',
|
|
163
|
+
},
|
|
164
|
+
};
|
|
154
165
|
const documentStyle = getComputedStyle(document.documentElement);
|
|
155
166
|
// Get all CSS custom properties
|
|
156
167
|
const allCSSProps = Array.from(document.documentElement.style);
|
|
@@ -23,6 +23,8 @@ export interface BaseStoresInitializerProps {
|
|
|
23
23
|
customStores?: CustomStoreConfig[];
|
|
24
24
|
skipStoreInit?: boolean;
|
|
25
25
|
serverCookies?: string;
|
|
26
|
+
/** Render children before stores are ready. Used by Next.js so SSR/SEO content is not blank. */
|
|
27
|
+
renderBeforeReady?: boolean;
|
|
26
28
|
}
|
|
27
29
|
/**
|
|
28
30
|
* BaseStoresInitializer - Initializes all framework stores
|
|
@@ -34,5 +36,5 @@ export interface BaseStoresInitializerProps {
|
|
|
34
36
|
* @since 0.0.1
|
|
35
37
|
* @author AMBROISE PARK Consulting
|
|
36
38
|
*/
|
|
37
|
-
export declare function BaseStoresInitializer({ children, handlers, customStores, skipStoreInit, serverCookies, }: BaseStoresInitializerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
39
|
+
export declare function BaseStoresInitializer({ children, handlers, customStores, skipStoreInit, serverCookies, renderBeforeReady, }: BaseStoresInitializerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
38
40
|
//# sourceMappingURL=BaseStoresInitializer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseStoresInitializer.d.ts","sourceRoot":"","sources":["../../../src/internal/initializers/BaseStoresInitializer.tsx"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA6DvC;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,aAAa,CAAC;IACxB,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseStoresInitializer.d.ts","sourceRoot":"","sources":["../../../src/internal/initializers/BaseStoresInitializer.tsx"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA6DvC;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,aAAa,CAAC;IACxB,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gGAAgG;IAChG,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAiID;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,QAAQ,EACR,YAAiB,EACjB,aAAqB,EACrB,aAAa,EACb,iBAAyB,GAC1B,EAAE,0BAA0B,kDAiL5B"}
|
|
@@ -138,7 +138,9 @@ async function initializeStore(config, handlers, appConfig, serverCookies) {
|
|
|
138
138
|
try {
|
|
139
139
|
cookieValue = decodeURIComponent(cookieParts[1].trim());
|
|
140
140
|
}
|
|
141
|
-
catch {
|
|
141
|
+
catch {
|
|
142
|
+
/* malformed cookie */
|
|
143
|
+
}
|
|
142
144
|
}
|
|
143
145
|
}
|
|
144
146
|
}
|
|
@@ -152,7 +154,9 @@ async function initializeStore(config, handlers, appConfig, serverCookies) {
|
|
|
152
154
|
try {
|
|
153
155
|
cookieValue = decodeURIComponent(cookieParts[1].trim());
|
|
154
156
|
}
|
|
155
|
-
catch {
|
|
157
|
+
catch {
|
|
158
|
+
/* malformed cookie */
|
|
159
|
+
}
|
|
156
160
|
}
|
|
157
161
|
}
|
|
158
162
|
}
|
|
@@ -203,7 +207,7 @@ async function initializeStore(config, handlers, appConfig, serverCookies) {
|
|
|
203
207
|
* @since 0.0.1
|
|
204
208
|
* @author AMBROISE PARK Consulting
|
|
205
209
|
*/
|
|
206
|
-
export function BaseStoresInitializer({ children, handlers, customStores = [], skipStoreInit = false, serverCookies, }) {
|
|
210
|
+
export function BaseStoresInitializer({ children, handlers, customStores = [], skipStoreInit = false, serverCookies, renderBeforeReady = false, }) {
|
|
207
211
|
const hasInitialized = useRef(false);
|
|
208
212
|
const appConfig = useAppConfig();
|
|
209
213
|
useEffect(() => {
|
|
@@ -332,7 +336,7 @@ export function BaseStoresInitializer({ children, handlers, customStores = [], s
|
|
|
332
336
|
clearTimeout(fallbackTimeout);
|
|
333
337
|
};
|
|
334
338
|
}, [criticalReady]);
|
|
335
|
-
if (!criticalReady)
|
|
339
|
+
if (!criticalReady && !renderBeforeReady)
|
|
336
340
|
return null;
|
|
337
341
|
return _jsx(_Fragment, { children: children });
|
|
338
342
|
}
|
|
@@ -17,6 +17,6 @@ interface NextJsStoresInitializerProps {
|
|
|
17
17
|
* @since 0.0.1
|
|
18
18
|
* @author AMBROISE PARK Consulting
|
|
19
19
|
*/
|
|
20
|
-
export declare function NextJsStoresInitializer({ children, serverCookies, customStores, skipStoreInit, }: NextJsStoresInitializerProps): import("react/jsx-runtime").JSX.Element
|
|
20
|
+
export declare function NextJsStoresInitializer({ children, serverCookies, customStores, skipStoreInit, }: NextJsStoresInitializerProps): import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
export {};
|
|
22
22
|
//# sourceMappingURL=NextJsStoresInitializer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NextJsStoresInitializer.d.ts","sourceRoot":"","sources":["../../../src/internal/initializers/NextJsStoresInitializer.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAOxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,4BAA4B;IACpC,QAAQ,EAAE,SAAS,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAQD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,aAAa,GACd,EAAE,4BAA4B,
|
|
1
|
+
{"version":3,"file":"NextJsStoresInitializer.d.ts","sourceRoot":"","sources":["../../../src/internal/initializers/NextJsStoresInitializer.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAOxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,4BAA4B;IACpC,QAAQ,EAAE,SAAS,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAQD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,aAAa,GACd,EAAE,4BAA4B,2CAqD9B"}
|
|
@@ -9,7 +9,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
9
9
|
* @since 0.0.1
|
|
10
10
|
* @author AMBROISE PARK Consulting
|
|
11
11
|
*/
|
|
12
|
-
import { useEffect
|
|
12
|
+
import { useEffect } from 'react';
|
|
13
13
|
import { isTest, isClient, getDndevConfig } from '@donotdev/core';
|
|
14
14
|
import { useThemeStore } from '@donotdev/core';
|
|
15
15
|
import { BaseStoresInitializer, } from './BaseStoresInitializer';
|
|
@@ -32,12 +32,6 @@ function createNextJsHandlers() {
|
|
|
32
32
|
export function NextJsStoresInitializer({ children, serverCookies, customStores, skipStoreInit, }) {
|
|
33
33
|
const skip = skipStoreInit ?? isTest();
|
|
34
34
|
const handlers = createNextJsHandlers();
|
|
35
|
-
const [isMounted, setIsMounted] = useState(false);
|
|
36
|
-
// Ensure component only renders BaseStoresInitializer after client mount
|
|
37
|
-
// This prevents SSR issues with React 19 + Next.js 16
|
|
38
|
-
useEffect(() => {
|
|
39
|
-
setIsMounted(true);
|
|
40
|
-
}, []);
|
|
41
35
|
// Next.js SSR: Hydrate theme store from cookies before render
|
|
42
36
|
// Flow: 1) Next.js layout reads cookie and applies theme class (SSR)
|
|
43
37
|
// 2) This component hydrates Zustand store with theme from cookie (client-side only)
|
|
@@ -73,10 +67,5 @@ export function NextJsStoresInitializer({ children, serverCookies, customStores,
|
|
|
73
67
|
}
|
|
74
68
|
}
|
|
75
69
|
}, [skip, serverCookies]);
|
|
76
|
-
|
|
77
|
-
// Return null during SSR to prevent hook calls in children (DnDevLayout, etc.)
|
|
78
|
-
if (!isMounted) {
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
return (_jsx(BaseStoresInitializer, { handlers: handlers, customStores: customStores, skipStoreInit: skip, serverCookies: serverCookies, children: children }));
|
|
70
|
+
return (_jsx(BaseStoresInitializer, { handlers: handlers, customStores: customStores, skipStoreInit: skip, serverCookies: serverCookies, renderBeforeReady: true, children: children }));
|
|
82
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DnDevLayout.d.ts","sourceRoot":"","sources":["../../../src/internal/layout/DnDevLayout.tsx"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AAEH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAIV,YAAY,EACb,MAAM,gBAAgB,CAAC;AA0CxB,UAAU,yBAAyB;IACjC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW,GAAI,kCAIzB,yBAAyB,
|
|
1
|
+
{"version":3,"file":"DnDevLayout.d.ts","sourceRoot":"","sources":["../../../src/internal/layout/DnDevLayout.tsx"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AAEH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAIV,YAAY,EACb,MAAM,gBAAgB,CAAC;AA0CxB,UAAU,yBAAyB;IACjC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW,GAAI,kCAIzB,yBAAyB,4CAqY3B,CAAC"}
|
|
@@ -107,10 +107,10 @@ export const DnDevLayout = ({ children, layout, className, }) => {
|
|
|
107
107
|
const resolvedHeader = useMemo(() => {
|
|
108
108
|
// Function = custom mode: consumer owns zone visuals, DnDevHeader wraps with structural behavior
|
|
109
109
|
if (typeof layout?.header === 'function') {
|
|
110
|
-
return _jsx(DnDevHeader, { children: _jsx(layout.header, {}) });
|
|
110
|
+
return (_jsx(DnDevHeader, { children: _jsx(layout.header, {}) }));
|
|
111
111
|
}
|
|
112
112
|
if (typeof config.header === 'function') {
|
|
113
|
-
return _jsx(DnDevHeader, { children: config.header() });
|
|
113
|
+
return (_jsx(DnDevHeader, { children: config.header() }));
|
|
114
114
|
}
|
|
115
115
|
// Determine effective header config (mobile overrides desktop when on mobile)
|
|
116
116
|
const effectiveHeader = isMobile
|
|
@@ -172,10 +172,10 @@ export const DnDevLayout = ({ children, layout, className, }) => {
|
|
|
172
172
|
const resolvedSidebar = useMemo(() => {
|
|
173
173
|
// Function = custom mode: consumer owns zone visuals, DnDevSidebar wraps with resize behavior
|
|
174
174
|
if (typeof layout?.sidebar === 'function') {
|
|
175
|
-
return _jsx(DnDevSidebar, { children: _jsx(layout.sidebar, {}) });
|
|
175
|
+
return (_jsx(DnDevSidebar, { children: _jsx(layout.sidebar, {}) }));
|
|
176
176
|
}
|
|
177
177
|
if (typeof config.sidebar === 'function') {
|
|
178
|
-
return _jsx(DnDevSidebar, { children: config.sidebar() });
|
|
178
|
+
return (_jsx(DnDevSidebar, { children: config.sidebar() }));
|
|
179
179
|
}
|
|
180
180
|
if (layout?.sidebar && typeof layout.sidebar === 'object') {
|
|
181
181
|
// If consumer provides a function (including () => null), use it; otherwise fall back
|
|
@@ -200,13 +200,13 @@ export const DnDevLayout = ({ children, layout, className, }) => {
|
|
|
200
200
|
const resolvedFooter = useMemo(() => {
|
|
201
201
|
// Function = custom mode: consumer owns zone visuals, DnDevFooter wraps with structural behavior
|
|
202
202
|
if (layout?.footer) {
|
|
203
|
-
return _jsx(DnDevFooter, { children: _jsx(layout.footer, {}) });
|
|
203
|
+
return (_jsx(DnDevFooter, { children: _jsx(layout.footer, {}) }));
|
|
204
204
|
}
|
|
205
205
|
if (config.footer === null) {
|
|
206
206
|
return null;
|
|
207
207
|
}
|
|
208
208
|
if (typeof config.footer === 'function') {
|
|
209
|
-
return _jsx(DnDevFooter, { children: config.footer() });
|
|
209
|
+
return (_jsx(DnDevFooter, { children: config.footer() }));
|
|
210
210
|
}
|
|
211
211
|
return _jsx(DnDevFooter, { app: app });
|
|
212
212
|
}, [layout?.footer, config.footer, app]);
|
|
@@ -221,6 +221,11 @@ export const DnDevLayout = ({ children, layout, className, }) => {
|
|
|
221
221
|
// Narrow zone configs: function zones don't provide slots for mergedBar fallback
|
|
222
222
|
const headerSlots = typeof config.header === 'object' ? config.header : undefined;
|
|
223
223
|
const sidebarSlots = typeof config.sidebar === 'object' ? config.sidebar : undefined;
|
|
224
|
+
// Consumer sidebar/mobile.sidebar overrides propagate to mergedBar when not explicitly overridden
|
|
225
|
+
const layoutSidebarSlots = layout?.sidebar && typeof layout.sidebar === 'object'
|
|
226
|
+
? layout.sidebar
|
|
227
|
+
: undefined;
|
|
228
|
+
const layoutMobileSidebarSlots = layout?.mobile?.sidebar;
|
|
224
229
|
if (layout?.mergedbar && typeof layout.mergedbar === 'object') {
|
|
225
230
|
// If consumer provides a function (including () => null), use it; otherwise fall back
|
|
226
231
|
const triggerSlot = layout.mergedbar.trigger !== undefined
|
|
@@ -230,15 +235,22 @@ export const DnDevLayout = ({ children, layout, className, }) => {
|
|
|
230
235
|
DEFAULT_SLOTS.header.start);
|
|
231
236
|
const topSlot = layout.mergedbar.top !== undefined
|
|
232
237
|
? layout.mergedbar.top
|
|
233
|
-
: (
|
|
238
|
+
: (layoutMobileSidebarSlots?.top ??
|
|
239
|
+
layoutSidebarSlots?.top ??
|
|
240
|
+
mergedBarConfig.top ??
|
|
241
|
+
DEFAULT_SLOTS.mobile.mergedBar.top);
|
|
234
242
|
const contentSlot = layout.mergedbar.content !== undefined
|
|
235
243
|
? layout.mergedbar.content
|
|
236
|
-
: (
|
|
244
|
+
: (layoutMobileSidebarSlots?.content ??
|
|
245
|
+
layoutSidebarSlots?.content ??
|
|
246
|
+
mergedBarConfig.content ??
|
|
237
247
|
sidebarSlots?.content ??
|
|
238
248
|
DEFAULT_SLOTS.sidebar.content);
|
|
239
249
|
const bottomSlot = layout.mergedbar.bottom !== undefined
|
|
240
250
|
? layout.mergedbar.bottom
|
|
241
|
-
: (
|
|
251
|
+
: (layoutMobileSidebarSlots?.bottom ??
|
|
252
|
+
layoutSidebarSlots?.bottom ??
|
|
253
|
+
mergedBarConfig.bottom ??
|
|
242
254
|
sidebarSlots?.bottom ??
|
|
243
255
|
DEFAULT_SLOTS.sidebar.bottom);
|
|
244
256
|
return (_jsx(DnDevMergedBar, { position: mergedBarConfig.position, height: mergedBarConfig.height, trigger: triggerSlot(), top: topSlot(), content: contentSlot(), bottom: bottomSlot() }));
|
|
@@ -247,15 +259,22 @@ export const DnDevLayout = ({ children, layout, className, }) => {
|
|
|
247
259
|
const triggerSlot = mergedBarConfig.trigger ??
|
|
248
260
|
headerSlots?.start ??
|
|
249
261
|
DEFAULT_SLOTS.header.start;
|
|
250
|
-
const topSlot =
|
|
251
|
-
|
|
262
|
+
const topSlot = layoutMobileSidebarSlots?.top ??
|
|
263
|
+
layoutSidebarSlots?.top ??
|
|
264
|
+
mergedBarConfig.top ??
|
|
265
|
+
DEFAULT_SLOTS.mobile.mergedBar.top;
|
|
266
|
+
const contentSlot = layoutMobileSidebarSlots?.content ??
|
|
267
|
+
layoutSidebarSlots?.content ??
|
|
268
|
+
mergedBarConfig.content ??
|
|
252
269
|
sidebarSlots?.content ??
|
|
253
270
|
DEFAULT_SLOTS.sidebar.content;
|
|
254
|
-
const bottomSlot =
|
|
271
|
+
const bottomSlot = layoutMobileSidebarSlots?.bottom ??
|
|
272
|
+
layoutSidebarSlots?.bottom ??
|
|
273
|
+
mergedBarConfig.bottom ??
|
|
255
274
|
sidebarSlots?.bottom ??
|
|
256
275
|
DEFAULT_SLOTS.sidebar.bottom;
|
|
257
276
|
return (_jsx(DnDevMergedBar, { position: mergedBarConfig.position, height: mergedBarConfig.height, trigger: triggerSlot(), top: topSlot(), content: contentSlot(), bottom: bottomSlot() }));
|
|
258
|
-
}, [layout?.mergedbar, config]);
|
|
277
|
+
}, [layout?.mergedbar, layout?.sidebar, layout?.mobile?.sidebar, config]);
|
|
259
278
|
// Apply routing animation data attribute (useLayoutEffect = before paint)
|
|
260
279
|
useLayoutEffect(() => {
|
|
261
280
|
if (!isClient() || !mainRef.current)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoMetaTags.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/components/AutoMetaTags.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AutoMetaTags.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/components/AutoMetaTags.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAqN3C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,EAAE,aAqT1B,CAAC;AAEF;;;GAGG;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -114,8 +114,7 @@ function buildBreadcrumbSchema(pathname, baseUrl, siteName) {
|
|
|
114
114
|
items.push({
|
|
115
115
|
'@type': 'ListItem',
|
|
116
116
|
position: i + 2,
|
|
117
|
-
name: segments[i]
|
|
118
|
-
.split('-')
|
|
117
|
+
name: segments[i].split('-')
|
|
119
118
|
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
|
|
120
119
|
.join(' '),
|
|
121
120
|
item: `${baseUrl}${currentPath}`,
|
|
@@ -192,10 +191,7 @@ function buildSpeculationRules() {
|
|
|
192
191
|
prefetch: [
|
|
193
192
|
{
|
|
194
193
|
where: {
|
|
195
|
-
and: [
|
|
196
|
-
{ href_matches: '/*' },
|
|
197
|
-
{ not: { href_matches: '/api/*' } },
|
|
198
|
-
],
|
|
194
|
+
and: [{ href_matches: '/*' }, { not: { href_matches: '/api/*' } }],
|
|
199
195
|
},
|
|
200
196
|
eagerness: 'conservative',
|
|
201
197
|
},
|
|
@@ -307,7 +303,7 @@ export const AutoMetaTags = () => {
|
|
|
307
303
|
const shouldEmitHreflang = hreflangEnabled && languages.length >= 2;
|
|
308
304
|
return (_jsxs(Helmet, { children: [_jsx("title", { children: metaData.title }), metaData.description && (_jsx("meta", { name: "description", content: metaData.description })), baseUrl && _jsx("link", { rel: "canonical", href: metaData.url }), metaData.keywords && (_jsx("meta", { name: "keywords", content: Array.isArray(metaData.keywords)
|
|
309
305
|
? metaData.keywords.join(', ')
|
|
310
|
-
: metaData.keywords })), metaData.author && _jsx("meta", { name: "author", content: metaData.author }), metaData.noindex && _jsx("meta", { name: "robots", content: "noindex, nofollow" }), _jsx("meta", { property: "og:title", content: metaData.title }), metaData.description && (_jsx("meta", { property: "og:description", content: metaData.description })), baseUrl && _jsx("meta", { property: "og:url", content: metaData.url }), _jsx("meta", { property: "og:type", content: metaData.type }), metaData.image && _jsx("meta", { property: "og:image", content: metaData.image }), metaData.image &&
|
|
306
|
+
: metaData.keywords })), metaData.author && _jsx("meta", { name: "author", content: metaData.author }), metaData.noindex && _jsx("meta", { name: "robots", content: "noindex, nofollow" }), _jsx("meta", { property: "og:title", content: metaData.title }), metaData.description && (_jsx("meta", { property: "og:description", content: metaData.description })), baseUrl && _jsx("meta", { property: "og:url", content: metaData.url }), _jsx("meta", { property: "og:type", content: metaData.type }), metaData.image && _jsx("meta", { property: "og:image", content: metaData.image }), metaData.image && _jsx("meta", { property: "og:image:width", content: "1200" }), metaData.image && _jsx("meta", { property: "og:image:height", content: "630" }), _jsx("meta", { property: "og:site_name", content: siteName }), metaData.type === 'article' && (_jsxs(_Fragment, { children: [metaData.author && (_jsx("meta", { property: "article:author", content: metaData.author })), metaData.publishDate && (_jsx("meta", { property: "article:published_time", content: metaData.publishDate })), metaData.modifiedDate && (_jsx("meta", { property: "article:modified_time", content: metaData.modifiedDate }))] })), _jsx("meta", { name: "twitter:card", content: "summary_large_image" }), _jsx("meta", { name: "twitter:title", content: metaData.title }), metaData.description && (_jsx("meta", { name: "twitter:description", content: metaData.description })), metaData.image && _jsx("meta", { name: "twitter:image", content: metaData.image }), twitterHandle && (_jsx("meta", { name: "twitter:site", content: `@${twitterHandle}` })), metaData.author && (_jsx("meta", { name: "twitter:creator", content: metaData.author })), _jsx("meta", { name: "format-detection", content: "telephone=no" }), _jsx("meta", { name: "mobile-web-app-capable", content: "yes" }), _jsx("meta", { name: "apple-mobile-web-app-status-bar-style", content: "default" }), Object.entries(staticTags).map(([name, content]) => (_jsx("meta", { name: name, content: content }, name))), shouldEmitHreflang &&
|
|
311
307
|
languages.map((lang) => (_jsx("link", { rel: "alternate", hrefLang: lang, href: `${baseUrl}${lang === defaultLanguage ? '' : `/${lang}`}${location.pathname}` }, `hreflang-${lang}`))), shouldEmitHreflang && (_jsx("link", { rel: "alternate", hrefLang: "x-default", href: `${baseUrl}${location.pathname}` })), baseUrl && (_jsx("link", { rel: "alternate", type: "application/rss+xml", title: `${siteName} Blog`, href: `${baseUrl}/rss.xml` })), metaData.image && metaData.image.startsWith('http') && (_jsx("link", { rel: "dns-prefetch", href: new URL(metaData.image).origin })), _jsx("script", { type: "application/ld+json", children: JSON.stringify({
|
|
312
308
|
'@context': 'https://schema.org',
|
|
313
309
|
'@type': metaData.type === 'article' ? 'Article' : 'WebPage',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moolti.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/config/presets/moolti.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"moolti.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/config/presets/moolti.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AA6BnD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,EAAE,YAqB1B,CAAC"}
|
|
@@ -14,7 +14,10 @@ import { LanguageSelector } from '@donotdev/core';
|
|
|
14
14
|
import { AuthHeader } from '../../../../components/auth';
|
|
15
15
|
import { AppBranding, ThemeToggle, } from '../../../../components/layout/components';
|
|
16
16
|
import { DnDevNavigationMenu, GoTo } from '../../../../routing';
|
|
17
|
-
import { FooterCopyright } from '../../components';
|
|
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, {})] }));
|
|
18
21
|
/**
|
|
19
22
|
* Moolti preset - SaaS app layout
|
|
20
23
|
*
|
|
@@ -30,9 +33,9 @@ import { FooterCopyright } from '../../components';
|
|
|
30
33
|
export const mooltiPreset = {
|
|
31
34
|
name: 'moolti',
|
|
32
35
|
sidebar: {
|
|
33
|
-
top:
|
|
34
|
-
content:
|
|
35
|
-
bottom:
|
|
36
|
+
top: sidebarTop,
|
|
37
|
+
content: sidebarContent,
|
|
38
|
+
bottom: sidebarBottom,
|
|
36
39
|
defaultWidth: 256,
|
|
37
40
|
minWidth: 48,
|
|
38
41
|
maxWidth: 400,
|
|
@@ -40,15 +43,10 @@ export const mooltiPreset = {
|
|
|
40
43
|
mobile: {
|
|
41
44
|
mergedBar: {
|
|
42
45
|
position: 'top',
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
// sidebar.content → content (GoTo + NavigationMenu)
|
|
48
|
-
_jsxs(_Fragment, { children: [_jsx(GoTo, { display: DISPLAY.AUTO }), _jsx(DnDevNavigationMenu, { vertical: true, display: DISPLAY.AUTO })] })),
|
|
49
|
-
bottom: () => (
|
|
50
|
-
// sidebar.bottom → bottom (Auth, Language, Theme, Footer)
|
|
51
|
-
_jsxs(Stack, { direction: "column", gap: "tight", align: "stretch", children: [_jsx(AuthHeader, { display: DISPLAY.AUTO }), _jsx(LanguageSelector, { display: DISPLAY.AUTO }), _jsx(ThemeToggle, { display: DISPLAY.AUTO }), _jsx(FooterCopyright, {})] })),
|
|
46
|
+
trigger: sidebarTop,
|
|
47
|
+
top: () => null,
|
|
48
|
+
content: sidebarContent,
|
|
49
|
+
bottom: sidebarBottom,
|
|
52
50
|
},
|
|
53
51
|
},
|
|
54
52
|
};
|
|
@@ -26,7 +26,7 @@ export interface DnDevFooterProps {
|
|
|
26
26
|
* preset-specific visibility (moolti/plain hide footer, blog hides on mobile).
|
|
27
27
|
* DO NOT change role, tag, or className.
|
|
28
28
|
*/
|
|
29
|
-
declare function DnDevFooterComponent({ children, app }: DnDevFooterProps): ReactNode;
|
|
29
|
+
declare function DnDevFooterComponent({ children, app, }: DnDevFooterProps): ReactNode;
|
|
30
30
|
export declare const DnDevFooter: import("react").MemoExoticComponent<typeof DnDevFooterComponent>;
|
|
31
31
|
export {};
|
|
32
32
|
//# sourceMappingURL=DnDevFooter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DnDevFooter.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/zones/DnDevFooter.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAUlD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,gBAAgB;IAC/B,wGAAwG;IACxG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,uCAAuC;IACvC,GAAG,CAAC,EAAE,WAAW,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iBAAS,oBAAoB,CAAC,
|
|
1
|
+
{"version":3,"file":"DnDevFooter.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/zones/DnDevFooter.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAUlD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,gBAAgB;IAC/B,wGAAwG;IACxG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,uCAAuC;IACvC,GAAG,CAAC,EAAE,WAAW,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iBAAS,oBAAoB,CAAC,EAC5B,QAAQ,EACR,GAAQ,GACT,EAAE,gBAAgB,GAAG,SAAS,CAuF9B;AAED,eAAO,MAAM,WAAW,kEAA6B,CAAC"}
|
|
@@ -38,7 +38,7 @@ import { getLegalLinks, } from '../components/footer/useLegalLinks';
|
|
|
38
38
|
* preset-specific visibility (moolti/plain hide footer, blog hides on mobile).
|
|
39
39
|
* DO NOT change role, tag, or className.
|
|
40
40
|
*/
|
|
41
|
-
function DnDevFooterComponent({ children, app = {} }) {
|
|
41
|
+
function DnDevFooterComponent({ children, app = {}, }) {
|
|
42
42
|
const { t } = useTranslation('dndev');
|
|
43
43
|
const isLaptopOrDesktop = useBreakpoint('isLaptopOrDesktop');
|
|
44
44
|
// Get legal links (defaults or custom) — must be called before any return
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NextJsAppProviders.d.ts","sourceRoot":"","sources":["../../src/providers/NextJsAppProviders.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"NextJsAppProviders.d.ts","sourceRoot":"","sources":["../../src/providers/NextJsAppProviders.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AA0DxD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CA2DhE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
// packages/ui/src/providers/NextJsAppProviders.tsx
|
|
4
4
|
/**
|
|
5
5
|
* @fileoverview NextJsAppProviders component
|
|
@@ -9,7 +9,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
* @since 0.0.1
|
|
10
10
|
* @author AMBROISE PARK Consulting
|
|
11
11
|
*/
|
|
12
|
-
import { lazy, Suspense } from 'react';
|
|
12
|
+
import { lazy, Suspense, useEffect, useState } from 'react';
|
|
13
13
|
import { HelmetProvider } from 'react-helmet-async';
|
|
14
14
|
import { QueryProviders, AppConfigProvider } from '@donotdev/core';
|
|
15
15
|
import { useConsent } from '@donotdev/core';
|
|
@@ -30,9 +30,6 @@ const CookieConsent = lazy(() => import('../components/cookie-consent/CookieCons
|
|
|
30
30
|
const PWAUpdateNotification = lazy(() => import('../internal/layout/components/PWAUpdateNotification')
|
|
31
31
|
.then((m) => ({ default: m.default }))
|
|
32
32
|
.catch(() => ({ default: NullFallback })));
|
|
33
|
-
const LicenseWatermark = lazy(() => import('../components/license/LicenseWatermark')
|
|
34
|
-
.then((m) => ({ default: m.LicenseWatermark }))
|
|
35
|
-
.catch(() => ({ default: NullFallback })));
|
|
36
33
|
const RedirectOverlay = lazy(() => import('../components/common/RedirectOverlay')
|
|
37
34
|
.then((m) => ({ default: m.RedirectOverlay }))
|
|
38
35
|
.catch(() => ({ default: NullFallback })));
|
|
@@ -46,13 +43,20 @@ const RedirectOverlay = lazy(() => import('../components/common/RedirectOverlay'
|
|
|
46
43
|
*/
|
|
47
44
|
function ConsentBanner() {
|
|
48
45
|
const hasConsented = useConsent('hasConsented');
|
|
49
|
-
|
|
50
|
-
if (hasConsented) {
|
|
46
|
+
const showBanner = useConsent('showBanner');
|
|
47
|
+
if (hasConsented && !showBanner) {
|
|
51
48
|
return null;
|
|
52
49
|
}
|
|
53
50
|
return (_jsx(Suspense, { fallback: null, children: _jsx(CookieConsent, {}) }));
|
|
54
51
|
}
|
|
55
52
|
export function NextJsAppProviders(props) {
|
|
56
53
|
const { config = {}, layout, children, serverCookies, customStores } = props;
|
|
57
|
-
|
|
54
|
+
const [isMounted, setIsMounted] = useState(false);
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
setIsMounted(true);
|
|
57
|
+
}, []);
|
|
58
|
+
if (!isMounted) {
|
|
59
|
+
return _jsx(_Fragment, { children: children });
|
|
60
|
+
}
|
|
61
|
+
return (_jsxs(AppConfigProvider, { config: config, platform: "nextjs", children: [_jsx(SentryInitializer, {}), _jsx(HelmetProvider, { children: _jsxs(NextJsStoresInitializer, { serverCookies: serverCookies, customStores: customStores, children: [_jsx(FaviconHead, {}), _jsx(PerformanceHints, {}), _jsx(QueryProviders, { children: _jsxs(UIProviders, { children: [_jsx(DnDevLayout, { layout: layout, children: children }), _jsx(ConsentBanner, {}), _jsx(AuthReturnTo, {}), _jsx(PasswordResetCallback, {}), _jsx(Suspense, { fallback: null, children: _jsx(PWAUpdateNotification, {}) }), _jsx(Suspense, { fallback: null, children: _jsx(RedirectOverlay, {}) })] }) })] }) })] }));
|
|
58
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthGuard.d.ts","sourceRoot":"","sources":["../../src/routing/AuthGuard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthGuard.d.ts","sourceRoot":"","sources":["../../src/routing/AuthGuard.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAEL,UAAU,EACV,kBAAkB,EAGnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAM/C;;GAEG;AACH,UAAU,cAAc;IACtB,wCAAwC;IACxC,IAAI,EAAE,QAAQ,GAAG,KAAK,CAAC;IACvB,wCAAwC;IACxC,QAAQ,EAAE,SAAS,CAAC;IACpB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,QAAQ,EACR,QAAQ,EAAE,QAAoC,GAC/C,EAAE,cAAc,2CA0ChB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,CAG9D;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,uBAAiB,CAAC;AAE3C;;;;;;GAMG;AACH,wBAAgB,WAAW,IACvB,OAAO,UAAU,CAAC,KAAK,GACvB,OAAO,UAAU,CAAC,IAAI,GACtB,OAAO,UAAU,CAAC,KAAK,CAS1B;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,IAAI,EACA,OAAO,UAAU,CAAC,KAAK,GACvB,OAAO,UAAU,CAAC,IAAI,GACtB,OAAO,UAAU,CAAC,KAAK,GAC1B,OAAO,CAIT;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY;;;;;;EAW3B;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EACvC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAC3B,IAAI,EAAE,QAAQ,GAAG,KAAK,WAEW,CAAC,6CAOnC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;IAC3B,iCAAiC;kBACrB,KAAK;IAEjB,oCAAoC;oBACtB,QAAQ;IAEtB,yCAAyC;gBAC/B,QAAQ;IAKlB,uDAAuD;iBAC5C,QAAQ;IAKnB,gCAAgC;iBAExB,CAAC,OAAO,kBAAkB,EAAE,MAAM,OAAO,kBAAkB,CAAC,KACjE,QAAQ;IAKX,eAAe;eACN,QAAQ;IAKjB,mBAAmB;mBACN,QAAQ;IAKrB,sCAAsC;oBACxB,QAAQ;IAMtB,wBAAwB;uBACL,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,KAAG,QAAQ;CAItE,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -10,7 +10,7 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
10
10
|
* @since 0.0.1
|
|
11
11
|
* @author AMBROISE PARK Consulting
|
|
12
12
|
*/
|
|
13
|
-
import { useEffect
|
|
13
|
+
import { useEffect } from 'react';
|
|
14
14
|
import { Spinner } from '@donotdev/components';
|
|
15
15
|
import { FEATURE_STATUS, USER_ROLES, SUBSCRIPTION_TIERS, isClient, safeSessionStorage, } from '@donotdev/core';
|
|
16
16
|
// Platform-specific hooks via conditional exports
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthReturnTo.d.ts","sourceRoot":"","sources":["../../src/routing/AuthReturnTo.tsx"],"names":[],"mappings":"AA0BA;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,
|
|
1
|
+
{"version":3,"file":"AuthReturnTo.d.ts","sourceRoot":"","sources":["../../src/routing/AuthReturnTo.tsx"],"names":[],"mappings":"AA0BA;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,SA8B3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoToInput.d.ts","sourceRoot":"","sources":["../../src/routing/GoToInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GoToInput.d.ts","sourceRoot":"","sources":["../../src/routing/GoToInput.tsx"],"names":[],"mappings":"AA0BA,QAAA,MAAM,SAAS,+CAqEd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
* @author AMBROISE PARK Consulting
|
|
10
10
|
*/
|
|
11
11
|
import { Search } from 'lucide-react';
|
|
12
|
-
import {
|
|
12
|
+
import { useEffect, useState, useRef } from 'react';
|
|
13
13
|
import { Stack } from '@donotdev/components';
|
|
14
14
|
import { useOverlayStore } from '@donotdev/core';
|
|
15
15
|
import { useTranslation } from '@donotdev/core';
|
|
@@ -30,15 +30,15 @@ const GoToInput = () => {
|
|
|
30
30
|
setValue('');
|
|
31
31
|
}
|
|
32
32
|
}, [isCommandDialogOpen]);
|
|
33
|
-
const handleFocus =
|
|
33
|
+
const handleFocus = () => {
|
|
34
34
|
useOverlayStore.getState().openCommandDialog(value);
|
|
35
|
-
}
|
|
36
|
-
const handleKeyDown =
|
|
35
|
+
};
|
|
36
|
+
const handleKeyDown = (e) => {
|
|
37
37
|
if (e.key === 'Enter') {
|
|
38
38
|
e.preventDefault();
|
|
39
39
|
useOverlayStore.getState().openCommandDialog(value);
|
|
40
40
|
}
|
|
41
|
-
}
|
|
41
|
+
};
|
|
42
42
|
return (_jsxs(Stack, { direction: "row", align: "center", className: "dndev-relative dndev-w-full dndev-max-w-sm", role: "search", children: [_jsx(Search, { className: "dndev-absolute dndev-size-md", style: { insetInlineStart: '0.75rem', opacity: 0.5 }, "aria-hidden": "true" }), _jsx("input", { ref: inputRef, type: "text", value: value, onChange: (e) => setValue(e.target.value), onFocus: handleFocus, onKeyDown: handleKeyDown, placeholder: t('globalGoTo.searchPlaceholder', 'Search pages...'), className: "dndev-input dndev-w-full", style: { paddingInlineStart: '2.5rem', paddingInlineEnd: '5rem' }, "aria-label": t('globalGoTo.ariaLabel', 'Search navigation') }), _jsx("div", { className: "dndev-absolute dndev-flex dndev-items-center dndev-text-sm", style: { insetInlineEnd: '0.75rem', gap: '0.25rem', opacity: 0.5 }, "aria-hidden": "true", children: _jsx("kbd", { style: {
|
|
43
43
|
padding: '0.25rem 0.5rem',
|
|
44
44
|
fontSize: 'var(--font-size-xs)',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/routing/Link.tsx"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,aAAa,EAElB,KAAK,oBAAoB,EAC1B,MAAM,OAAO,CAAC;AASf;;;;;;GAMG;AACH,MAAM,WAAW,SAAU,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,EAAE,aAAa,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/routing/Link.tsx"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,aAAa,EAElB,KAAK,oBAAoB,EAC1B,MAAM,OAAO,CAAC;AASf;;;;;;GAMG;AACH,MAAM,WAAW,SAAU,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,EAAE,aAAa,CAAC,SAAS,CAyJzC,CAAC"}
|
package/dist/routing/Link.js
CHANGED
|
@@ -29,6 +29,12 @@ export const Link = ({ path, replace, prefetch = true, children, icon, iconEnd =
|
|
|
29
29
|
// Special framework trigger: #cookie-settings
|
|
30
30
|
if (path === '#cookie-settings') {
|
|
31
31
|
const handleCookieSettings = (e) => {
|
|
32
|
+
// Honor browser native open-in-new-tab on modifier+click or non-left-click.
|
|
33
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0) {
|
|
34
|
+
if (onClick)
|
|
35
|
+
onClick(e);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
32
38
|
e.preventDefault();
|
|
33
39
|
e.stopPropagation();
|
|
34
40
|
try {
|
|
@@ -61,6 +67,14 @@ export const Link = ({ path, replace, prefetch = true, children, icon, iconEnd =
|
|
|
61
67
|
}
|
|
62
68
|
return; // Don't prevent default for external links
|
|
63
69
|
}
|
|
70
|
+
// Honor browser native open-in-new-tab on modifier+click or non-left-click.
|
|
71
|
+
// Without this, preventDefault() below would block the browser default,
|
|
72
|
+
// and Ctrl/Cmd-click would silently navigate in the same tab.
|
|
73
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0) {
|
|
74
|
+
if (onClick)
|
|
75
|
+
onClick(e);
|
|
76
|
+
return; // browser handles new tab / new window
|
|
77
|
+
}
|
|
64
78
|
// Internal links: use framework navigation
|
|
65
79
|
e.preventDefault();
|
|
66
80
|
if (onClick) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useRouter as p}from"next/navigation";import{isClient as
|
|
1
|
+
"use client";import{useRouter as p}from"next/navigation";import{isClient as k,useOverlayStore as v}from"@donotdev/core";function d(){let e=p(),r=v(t=>t.closeAll);return(t,s)=>{if(t==="back")return r(),e.back();if(r(),s?.preserveScroll&&k()){let o=window.scrollY;s?.replace?e.replace(t):e.push(t),requestAnimationFrame(()=>{window.scrollTo({top:o,behavior:"auto"})});return}return s?.replace?e.replace(t):e.push(t)}}function b(){let e=p();return()=>e.back()}function w(){let e=p();return()=>e.refresh()}function N(){let e=p();return r=>e.prefetch(r)}import{usePathname as T,useSearchParams as I}from"next/navigation";function l(){let e=T(),t=I().toString(),s=t?`?${t}`:void 0;return{pathname:e||"/",search:s,hash:"",state:null}}import{useParams as C}from"next/navigation";function g(){let e=C();return e||{}}function G(e){let t=g()[e];if(typeof t=="string")return t;if(Array.isArray(t)&&t.length>0)return t[0]}import{useSearchParams as $}from"next/navigation";function R(){return $()}import{usePathname as K}from"next/navigation";function O(e){let r=K(),t=e.replace(/:[^/]+/g,"([^/]+)").replace(/\*/g,".*"),s=new RegExp(`^${t}$`),o=r.match(s);if(!o)return null;let u=e.match(/:[^/]+/g)?.map(a=>a.slice(1))||[],n={};return u.forEach((a,c)=>{n[a]=o[c+1]||""}),{params:n,pathname:r,pattern:e}}import{useCallback as P}from"react";function U(){let e=R(),r=d(),t=l(),s=P((n,a)=>{let c=new URLSearchParams(e.toString());c.set(n,a);let f=c.toString(),i=`${t.pathname||"/"}${f?`?${f}`:""}`;r(i)},[e,r,t.pathname]),o=P(n=>{let a=new URLSearchParams(e.toString());a.delete(n);let c=a.toString(),m=`${t.pathname||"/"}${c?`?${c}`:""}`;r(m)},[e,r,t.pathname]),u=P(()=>{let n=t.pathname||"/";r(n)},[r,t.pathname]);return{query:e,setQuery:s,removeQuery:o,clearQueries:u}}import{useMemo as Q}from"react";import{isClient as F,FEATURE_STATUS as M}from"@donotdev/core";import{useAuthConfig as j}from"@donotdev/core";import*as S from"@donotdev/auth";import{DEGRADED_AUTH_API as L}from"@donotdev/core";var A=S?.useAuth;function E(e){return L[e]}function h(e){return A?A(e):E(e)}var ce=S?.PasswordResetCallback??(()=>null);function q(e={}){let{auth:r,redirectTo:t,condition:s}=e,o=l(),u=j(),n=h("user"),a=h("can"),c=h("status");return Q(()=>{let m={shouldRedirect:!1,redirectTo:null,isChecking:!1};if(!F())return m;if(c===M.INITIALIZING)return{...m,isChecking:!0};if(s){let i=s(n,c);return{shouldRedirect:i,redirectTo:i&&t||null,isChecking:!1}}if(r!==!1&&r!==void 0){if(!a)return m;if(!a.navigate(r)){let i=null;if(typeof r=="object"&&r.required&&!n){let y=o.search?.includes("code=")||o.search?.includes("state=")||o.search?.includes("error="),x=u.authRoute;y?i=`${x}${o.search}`:i=x}else typeof r=="object"&&r.role?i=u.roleRoute:typeof r=="object"&&r.tier?i=u.tierRoute:i=u.roleRoute;return{shouldRedirect:!0,redirectTo:t||i,isChecking:!1}}}return m},[r,c,n,a,s,t,o.search,u.authRoute,u.roleRoute,u.tierRoute])}export{b as useBack,l as useLocation,O as useMatch,d as useNavigate,g as useParams,N as usePrefetch,U as useQueryParams,q as useRedirectGuard,w as useRefresh,G as useRouteParam,R as useSearchParams};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useNavigate as
|
|
1
|
+
"use client";import{useNavigate as P}from"react-router-dom";import{isClient as v,useOverlayStore as k}from"@donotdev/core";function h(){let e=P(),r=k(t=>t.closeAll);return(t,i)=>t==="back"?(r(),e(-1)):(r(),i?.replace?e(t,{replace:!0}):e(t))}function I(){let e=P();return()=>e(-1)}function b(){return()=>{v()&&window.location.reload()}}function w(){return e=>{}}import{useLocation as C}from"react-router-dom";function m(){return C()}import{useParams as G}from"react-router-dom";function d(){return G()}function T(e){let t=d()[e];if(typeof t=="string")return t;if(Array.isArray(t)&&t.length>0)return t[0]}import{useSearchParams as N}from"react-router-dom";function R(){return N()[0]}import{useMatch as L}from"react-router-dom";function K(e){return L(e)}import{useCallback as g}from"react";function U(){let e=R(),r=h(),t=m(),i=g((n,u)=>{let a=new URLSearchParams(e.toString());a.set(n,u);let l=a.toString(),o=`${t.pathname||"/"}${l?`?${l}`:""}`;r(o)},[e,r,t.pathname]),c=g(n=>{let u=new URLSearchParams(e.toString());u.delete(n);let a=u.toString(),f=`${t.pathname||"/"}${a?`?${a}`:""}`;r(f)},[e,r,t.pathname]),s=g(()=>{let n=t.pathname||"/";r(n)},[r,t.pathname]);return{query:e,setQuery:i,removeQuery:c,clearQueries:s}}import{useMemo as M}from"react";import{isClient as Q,FEATURE_STATUS as E}from"@donotdev/core";import{useAuthConfig as _}from"@donotdev/core";import*as y from"@donotdev/auth";import{DEGRADED_AUTH_API as O}from"@donotdev/core";var x=y?.useAuth;function $(e){return O[e]}function p(e){return x?x(e):$(e)}var ue=y?.PasswordResetCallback??(()=>null);function j(e={}){let{auth:r,redirectTo:t,condition:i}=e,c=m(),s=_(),n=p("user"),u=p("can"),a=p("status");return M(()=>{let f={shouldRedirect:!1,redirectTo:null,isChecking:!1};if(!Q())return f;if(a===E.INITIALIZING)return{...f,isChecking:!0};if(i){let o=i(n,a);return{shouldRedirect:o,redirectTo:o&&t||null,isChecking:!1}}if(r!==!1&&r!==void 0){if(!u)return f;if(!u.navigate(r)){let o=null;if(typeof r=="object"&&r.required&&!n){let S=c.search.includes("code=")||c.search.includes("state=")||c.search.includes("error="),A=s.authRoute;S?o=`${A}${c.search}`:o=A}else typeof r=="object"&&r.role?o=s.roleRoute:typeof r=="object"&&r.tier?o=s.tierRoute:o=s.roleRoute;return{shouldRedirect:!0,redirectTo:t||o,isChecking:!1}}}return f},[r,a,n,u,i,t,c.search,s.authRoute,s.roleRoute,s.tierRoute])}export{I as useBack,m as useLocation,K as useMatch,h as useNavigate,d as useParams,w as usePrefetch,U as useQueryParams,j as useRedirectGuard,b as useRefresh,T as useRouteParam,R as useSearchParams};
|