@donotdev/ui 0.2.2 → 0.2.3

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.
Files changed (160) hide show
  1. package/dist/{GoToDialog-CICRYHHG.js → GoToDialog-KSBGOIWO.js} +1 -1
  2. package/dist/chunk-MS7ZIW5Z.js +1 -0
  3. package/dist/components/auth/AuthHeader.d.ts.map +1 -1
  4. package/dist/components/auth/AuthHeader.js +0 -2
  5. package/dist/components/auth/AuthMenu.d.ts.map +1 -1
  6. package/dist/components/auth/AuthMenu.js +6 -40
  7. package/dist/components/common/icon.d.ts.map +1 -1
  8. package/dist/components/common/icon.js +2 -1
  9. package/dist/components/common/lucideIconByName.d.ts +9 -0
  10. package/dist/components/common/lucideIconByName.d.ts.map +1 -0
  11. package/dist/components/common/lucideIconByName.js +32 -0
  12. package/dist/components/layout/GameFlow.d.ts.map +1 -1
  13. package/dist/components/layout/components/Breadcrumbs.d.ts.map +1 -1
  14. package/dist/components/layout/components/Breadcrumbs.js +14 -9
  15. package/dist/components/layout/components/header/CacheSettings.d.ts.map +1 -1
  16. package/dist/components/layout/components/header/CacheSettings.js +6 -4
  17. package/dist/components/layout/components/header/SettingsMenu.d.ts.map +1 -1
  18. package/dist/components/layout/components/header/SettingsMenu.js +2 -1
  19. package/dist/components/layout/components/header/ThemeToggle.d.ts.map +1 -1
  20. package/dist/components/layout/components/header/ThemeToggle.js +2 -1
  21. package/dist/crud/components/CrudCardLink.d.ts +6 -6
  22. package/dist/crud/components/CrudCardLink.d.ts.map +1 -1
  23. package/dist/crud/components/CrudCardLink.js +3 -9
  24. package/dist/crud/components/EntityCardList.d.ts.map +1 -1
  25. package/dist/crud/components/EntityCardList.js +3 -11
  26. package/dist/crud/components/EntityDisplayRenderer.d.ts.map +1 -1
  27. package/dist/crud/components/EntityDisplayRenderer.js +4 -1
  28. package/dist/crud/components/EntityFormRenderer.d.ts.map +1 -1
  29. package/dist/crud/components/EntityFormRenderer.js +27 -5
  30. package/dist/crud/components/EntityList.d.ts +4 -4
  31. package/dist/crud/components/EntityList.d.ts.map +1 -1
  32. package/dist/crud/components/EntityList.js +136 -59
  33. package/dist/crud/components/Form.d.ts +1 -1
  34. package/dist/crud/components/Form.d.ts.map +1 -1
  35. package/dist/crud/components/Form.js +2 -2
  36. package/dist/crud/components/cellEditFor.d.ts +28 -0
  37. package/dist/crud/components/cellEditFor.d.ts.map +1 -0
  38. package/dist/crud/components/cellEditFor.js +54 -0
  39. package/dist/crud/components/entityParent.d.ts +40 -0
  40. package/dist/crud/components/entityParent.d.ts.map +1 -0
  41. package/dist/crud/components/entityParent.js +54 -0
  42. package/dist/crud/components/useRecordBreadcrumb.d.ts +11 -0
  43. package/dist/crud/components/useRecordBreadcrumb.d.ts.map +1 -0
  44. package/dist/crud/components/useRecordBreadcrumb.js +34 -0
  45. package/dist/crud/crudImports.d.ts +2 -0
  46. package/dist/crud/crudImports.d.ts.map +1 -1
  47. package/dist/crud/crudImports.js +2 -0
  48. package/dist/dndev-next.css +483 -145
  49. package/dist/dndev.css +483 -145
  50. package/dist/index.js +4 -4
  51. package/dist/internal/common/RouteErrorFallback.d.ts.map +1 -1
  52. package/dist/internal/common/RouteErrorFallback.js +2 -4
  53. package/dist/internal/devtools/components/ConfigTab.d.ts.map +1 -1
  54. package/dist/internal/devtools/components/ConfigTab.js +1 -1
  55. package/dist/internal/devtools/components/CookieTab.d.ts.map +1 -1
  56. package/dist/internal/devtools/components/CookieTab.js +1 -5
  57. package/dist/internal/devtools/components/DesignTab.d.ts.map +1 -1
  58. package/dist/internal/devtools/components/DesignTab.js +18 -7
  59. package/dist/internal/devtools/components/StoresTab.d.ts.map +1 -1
  60. package/dist/internal/devtools/components/StoresTab.js +17 -3
  61. package/dist/internal/devtools/types.d.ts +3 -3
  62. package/dist/internal/devtools/types.d.ts.map +1 -1
  63. package/dist/internal/devtools/utils/maskSensitive.d.ts +1 -1
  64. package/dist/internal/devtools/utils/maskSensitive.d.ts.map +1 -1
  65. package/dist/internal/layout/DnDevLayout.d.ts.map +1 -1
  66. package/dist/internal/layout/DnDevLayout.js +21 -21
  67. package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
  68. package/dist/internal/layout/components/AutoMetaTags.js +39 -36
  69. package/dist/internal/layout/components/i18nSeoMeta.d.ts.map +1 -1
  70. package/dist/internal/layout/components/i18nSeoMeta.js +1 -0
  71. package/dist/internal/layout/zones/DnDevMergedBar.js +3 -3
  72. package/dist/internal/providers/UIProviders.d.ts.map +1 -1
  73. package/dist/internal/providers/UIProviders.js +7 -2
  74. package/dist/providers/NextJsAppProviders.d.ts +5 -1
  75. package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
  76. package/dist/providers/NextJsAppProviders.js +36 -5
  77. package/dist/providers/ViteAppProviders.d.ts.map +1 -1
  78. package/dist/providers/ViteAppProviders.js +42 -4
  79. package/dist/routing/404.js +4 -4
  80. package/dist/routing/AuthGuardFallback.d.ts.map +1 -1
  81. package/dist/routing/AuthGuardFallback.js +1 -2
  82. package/dist/routing/AuthReturnTo.d.ts.map +1 -1
  83. package/dist/routing/AuthReturnTo.js +9 -2
  84. package/dist/routing/GoTo.d.ts +0 -6
  85. package/dist/routing/GoTo.d.ts.map +1 -1
  86. package/dist/routing/GoTo.js +5 -8
  87. package/dist/routing/Link.d.ts +4 -2
  88. package/dist/routing/Link.d.ts.map +1 -1
  89. package/dist/routing/Link.js +8 -5
  90. package/dist/routing/SignedInRedirect.d.ts +27 -0
  91. package/dist/routing/SignedInRedirect.d.ts.map +1 -0
  92. package/dist/routing/SignedInRedirect.js +47 -0
  93. package/dist/routing/hooks/hooks.next.d.ts +2 -0
  94. package/dist/routing/hooks/hooks.next.d.ts.map +1 -1
  95. package/dist/routing/hooks/hooks.next.js +1 -1
  96. package/dist/routing/hooks/hooks.vite.d.ts +2 -0
  97. package/dist/routing/hooks/hooks.vite.d.ts.map +1 -1
  98. package/dist/routing/hooks/hooks.vite.js +1 -1
  99. package/dist/routing/hooks/useLocation.next.d.ts +12 -0
  100. package/dist/routing/hooks/useLocation.next.d.ts.map +1 -1
  101. package/dist/routing/hooks/useLocation.next.js +17 -4
  102. package/dist/routing/hooks/useMatch.next.d.ts +6 -0
  103. package/dist/routing/hooks/useMatch.next.d.ts.map +1 -1
  104. package/dist/routing/hooks/useMatch.next.js +8 -2
  105. package/dist/routing/hooks/useNavigate.next.d.ts +6 -1
  106. package/dist/routing/hooks/useNavigate.next.d.ts.map +1 -1
  107. package/dist/routing/hooks/useNavigate.next.js +13 -4
  108. package/dist/routing/hooks/useNavigate.vite.d.ts +7 -1
  109. package/dist/routing/hooks/useNavigate.vite.d.ts.map +1 -1
  110. package/dist/routing/hooks/useNavigate.vite.js +20 -4
  111. package/dist/routing/hooks/useRedirectGuard.next.d.ts.map +1 -1
  112. package/dist/routing/hooks/useRedirectGuard.next.js +7 -1
  113. package/dist/routing/hooks/useRedirectGuard.vite.d.ts.map +1 -1
  114. package/dist/routing/hooks/useRedirectGuard.vite.js +7 -1
  115. package/dist/routing/hooks/useRoutePath.next.d.ts +23 -0
  116. package/dist/routing/hooks/useRoutePath.next.d.ts.map +1 -0
  117. package/dist/routing/hooks/useRoutePath.next.js +36 -0
  118. package/dist/routing/hooks/useRoutePath.vite.d.ts +13 -0
  119. package/dist/routing/hooks/useRoutePath.vite.d.ts.map +1 -0
  120. package/dist/routing/hooks/useRoutePath.vite.js +25 -0
  121. package/dist/routing/hooks/useUrlLanguage.next.d.ts +28 -0
  122. package/dist/routing/hooks/useUrlLanguage.next.d.ts.map +1 -0
  123. package/dist/routing/hooks/useUrlLanguage.next.js +50 -0
  124. package/dist/routing/hooks/useUrlLanguage.vite.d.ts +22 -0
  125. package/dist/routing/hooks/useUrlLanguage.vite.d.ts.map +1 -0
  126. package/dist/routing/hooks/useUrlLanguage.vite.js +41 -0
  127. package/dist/routing/index.d.ts +3 -1
  128. package/dist/routing/index.d.ts.map +1 -1
  129. package/dist/routing/index.js +2 -1
  130. package/dist/routing/useNavigation.js +4 -4
  131. package/dist/styles/index.css +483 -145
  132. package/dist/symbol-index.json +1 -1
  133. package/dist/utils/assetResolver.d.ts.map +1 -1
  134. package/dist/utils/assetResolver.js +1 -0
  135. package/dist/utils/index.d.ts +2 -0
  136. package/dist/utils/index.d.ts.map +1 -1
  137. package/dist/utils/index.js +3 -0
  138. package/dist/utils/useDeleteAccountSafe.d.ts +17 -0
  139. package/dist/utils/useDeleteAccountSafe.d.ts.map +1 -0
  140. package/dist/utils/useDeleteAccountSafe.js +52 -0
  141. package/dist/utils/useFormStoreSafe.d.ts.map +1 -1
  142. package/dist/utils/useFormStoreSafe.js +1 -0
  143. package/dist/utils/useSeo.d.ts +10 -2
  144. package/dist/utils/useSeo.d.ts.map +1 -1
  145. package/dist/utils/useSeo.js +44 -9
  146. package/dist/vite-routing/AppRoutes.d.ts.map +1 -1
  147. package/dist/vite-routing/AppRoutes.js +37 -4
  148. package/guidelines/COMPONENTS.md +2 -1
  149. package/guidelines/PAGES.md +7 -0
  150. package/guidelines/ROUTING.md +4 -0
  151. package/guidelines/SEO.md +52 -0
  152. package/package.json +9 -9
  153. package/dist/CookieConsent-5NH5DNTP.js +0 -1
  154. package/dist/CookieConsent-W7UE647Y.js +0 -1
  155. package/dist/GoToDialog-YGBON6FR.js +0 -1
  156. package/dist/chunk-DRFM6WXH.js +0 -1
  157. package/dist/chunk-MIPTBUWY.js +0 -1
  158. package/dist/internal/layout/components/NextJsAutoMetaTags.d.ts +0 -57
  159. package/dist/internal/layout/components/NextJsAutoMetaTags.d.ts.map +0 -1
  160. package/dist/internal/layout/components/NextJsAutoMetaTags.js +0 -182
@@ -59,9 +59,7 @@
59
59
  * applies regardless of density tier.
60
60
  */
61
61
  --gap-none: 0;
62
- --gap-sm: min(0.5rem, 2vw); /* 8px or 2vw, whichever is smaller */
63
- --gap-md: min(1rem, 2vw); /* 16px or 2vw */
64
- --gap-lg: min(2rem, 2vw); /* 32px or 2vw */
62
+ /* --gap-sm / --gap-md / --gap-lg: see DENSITY SYSTEM below */
65
63
 
66
64
  /* ===========================
67
65
  DIALOG SIZE VARIANTS
@@ -188,14 +186,7 @@
188
186
  /* Typography Scale - Musical Scale System (STANDARD density defaults - Major Third 1.25×) */
189
187
  --font-size-xs: 0.75rem; /* 12px - captions, shortcuts, meta */
190
188
  --font-size-sm: 0.875rem; /* 14px - small text, captions */
191
- --font-size-base: 1rem; /* 16px - body text, DEFAULT */
192
- --font-size-lg: 1.25rem; /* 20px - base × 1.25¹ - emphasized text */
193
- --font-size-xl: 1.563rem; /* 25px - base × 1.25² - headings */
194
- --font-size-2xl: 1.953rem; /* 31px - base × 1.25³ - large headings */
195
- --font-size-3xl: 2.441rem; /* 39px - base × 1.25⁴ - hero text */
196
-
197
- /* Line Height - Musical Scale System (matches font scale ratio) */
198
- --line-height: 1.25; /* Major Third - Standard density default */
189
+ /* --font-size-base…3xl and --line-height: see DENSITY SYSTEM below */
199
190
 
200
191
  /* Font Weight - Semantic weights */
201
192
  --font-weight-normal: 400;
@@ -327,12 +318,36 @@
327
318
 
328
319
  /* ===========================
329
320
  DENSITY SYSTEM
330
- Semantic spacing and typography presets based on context
331
- Applied via [data-density] attribute on root or container
321
+ Semantic spacing and typography presets based on context.
322
+
323
+ App density: the layout wrapper (.dndev-layout) carries data-density in the
324
+ server HTML, and the tokens are declared on <html> from it (:has), so they
325
+ resolve on the first paint, before and without hydration.
326
+ Nested density: PageContainer / List set data-density on their own element.
327
+
328
+ The tokens are never declared on .dndev-layout itself: every element of the
329
+ app sits under it, so a declaration there would shadow the app's :root
330
+ overrides (themes.css). The <html> rules carry zero specificity (:where), so
331
+ an app :root override wins whatever the stylesheet order.
332
332
  =========================== */
333
333
 
334
+ /* Base values (standard density), used until a density applies */
335
+ :where(:root) {
336
+ --gap-sm: min(0.5rem, 2vw); /* 8px or 2vw, whichever is smaller */
337
+ --gap-md: min(1rem, 2vw); /* 16px or 2vw */
338
+ --gap-lg: min(2rem, 2vw); /* 32px or 2vw */
339
+ --font-size-base: 1rem; /* 16px - body text, DEFAULT */
340
+ --font-size-lg: 1.25rem; /* 20px - base × 1.25¹ - emphasized text */
341
+ --font-size-xl: 1.563rem; /* 25px - base × 1.25² - headings */
342
+ --font-size-2xl: 1.953rem; /* 31px - base × 1.25³ - large headings */
343
+ --font-size-3xl: 2.441rem; /* 39px - base × 1.25⁴ - hero text */
344
+ /* Line Height - Musical Scale System (matches font scale ratio) */
345
+ --line-height: 1.25; /* Major Third - Standard density default */
346
+ }
347
+
334
348
  /* Compact (Admin/Data) - Dense, information-dense layouts - Minor Third (1.2×) */
335
- [data-density='compact'] {
349
+ :where(:root:has(.dndev-layout[data-density='compact'])),
350
+ [data-density='compact']:where(:not(.dndev-layout)) {
336
351
  /* Base sizes: Fluid responsiveness for all text, zoom-safe */
337
352
  --font-size-base: clamp(
338
353
  0.875rem,
@@ -372,7 +387,8 @@
372
387
  }
373
388
 
374
389
  /* Standard (Docs/SaaS) - DEFAULT, balanced for readability */
375
- [data-density='standard'] {
390
+ :where(:root:has(.dndev-layout[data-density='standard'])),
391
+ [data-density='standard']:where(:not(.dndev-layout)) {
376
392
  /* Base sizes: Fluid responsiveness for all text, zoom-safe */
377
393
  --font-size-base: clamp(
378
394
  1rem,
@@ -412,7 +428,8 @@
412
428
  }
413
429
 
414
430
  /* Expressive (Marketing) - Perfect Fourth (1.333×) + Fluid typography (2025 best practice) */
415
- [data-density='expressive'] {
431
+ :where(:root:has(.dndev-layout[data-density='expressive'])),
432
+ [data-density='expressive']:where(:not(.dndev-layout)) {
416
433
  /* Base sizes: Fluid responsiveness for all text, zoom-safe */
417
434
  --font-size-base: clamp(1rem, 0.875rem + 0.5vw, 1.125rem); /* 16-18px fluid */
418
435
  --font-size-lg: clamp(1.25rem, 1rem + 0.75vw, 1.5rem); /* 20-24px fluid */
@@ -444,9 +461,9 @@
444
461
  }
445
462
 
446
463
  /* Form field text: follows density, never below 16px (iOS focus zoom).
447
- Declared on [data-density] too, so nested densities resolve their own base. */
448
- :root,
449
- [data-density] {
464
+ Declared on nested [data-density] too, so they resolve their own base. */
465
+ :where(:root),
466
+ [data-density]:where(:not(.dndev-layout)) {
450
467
  --font-size-input: max(16px, var(--font-size-base));
451
468
  }
452
469
  /* 2. Theme system - color palette definitions */
@@ -3710,6 +3727,50 @@ em {
3710
3727
  background: var(--card);
3711
3728
  }
3712
3729
 
3730
+ /* href: stretched link. The title is the <a href>; its ::after covers the whole
3731
+ card so the tile is clickable, while controls inside stay above it. The body
3732
+ must not be the containing block, or the hit area would stop at the cover. */
3733
+ .dndev-card[data-has-link='true'] > .dndev-card-body {
3734
+ position: static;
3735
+ }
3736
+
3737
+ .dndev-card-link {
3738
+ color: inherit;
3739
+ text-decoration: none;
3740
+ }
3741
+
3742
+ .dndev-card-link::after {
3743
+ content: '';
3744
+ position: absolute;
3745
+ inset: 0;
3746
+ z-index: 1;
3747
+ border-radius: inherit;
3748
+ }
3749
+
3750
+ .dndev-card-link:focus-visible {
3751
+ outline: none;
3752
+ }
3753
+
3754
+ .dndev-card[data-has-link='true']:has(.dndev-card-link:focus-visible) {
3755
+ outline: 2px solid var(--ring);
3756
+ outline-offset: 2px;
3757
+ }
3758
+
3759
+ .dndev-card[data-has-link='true']
3760
+ :is(
3761
+ a,
3762
+ button,
3763
+ input,
3764
+ select,
3765
+ textarea,
3766
+ label,
3767
+ [role='button'],
3768
+ [tabindex]
3769
+ ):not(.dndev-card-link) {
3770
+ position: relative;
3771
+ z-index: 2;
3772
+ }
3773
+
3713
3774
  /* Card body children spacing */
3714
3775
  .dndev-card-header {
3715
3776
  display: flex;
@@ -3774,7 +3835,8 @@ em {
3774
3835
 
3775
3836
  /* Contain: whole image visible on the muted cover background (cut-outs), inset
3776
3837
  proportionally so a packshot never touches the frame. */
3777
- .dndev-card-cover[data-fit='contain'] > img:not(.dndev-card-cover-hover) {
3838
+ .dndev-card-cover[data-fit='contain'] > img:not(.dndev-card-cover-hover),
3839
+ .dndev-card-cover[data-fit='contain'] > picture > img:not(.dndev-card-cover-hover) {
3778
3840
  -o-object-fit: contain;
3779
3841
  object-fit: contain;
3780
3842
  box-sizing: border-box;
@@ -3782,7 +3844,9 @@ em {
3782
3844
  }
3783
3845
 
3784
3846
  /* Hover view: stacked over the cover, crossfades in on hover / keyboard focus. */
3785
- .dndev-card-cover > img.dndev-card-cover-hover {
3847
+ /* An image pair renders <picture><img>: the <img> carries the class either way. */
3848
+ .dndev-card-cover > img.dndev-card-cover-hover,
3849
+ .dndev-card-cover > picture > img.dndev-card-cover-hover {
3786
3850
  position: absolute;
3787
3851
  inset: 0;
3788
3852
  -o-object-fit: cover;
@@ -3805,7 +3869,8 @@ em {
3805
3869
  }
3806
3870
 
3807
3871
  @media (prefers-reduced-motion: reduce) {
3808
- .dndev-card-cover > img.dndev-card-cover-hover {
3872
+ .dndev-card-cover > img.dndev-card-cover-hover,
3873
+ .dndev-card-cover > picture > img.dndev-card-cover-hover {
3809
3874
  transition: none;
3810
3875
  }
3811
3876
  }
@@ -5435,6 +5500,17 @@ em {
5435
5500
  outline: none;
5436
5501
  }
5437
5502
 
5503
+ /* Gallery pictures are always protected (with blockContextMenu + draggable=false):
5504
+ no drag, no iOS long-press "Save image" callout, no selection. */
5505
+ .image-gallery img,
5506
+ .image-gallery__lightbox-stage img {
5507
+ -webkit-touch-callout: none;
5508
+ -webkit-user-drag: none;
5509
+ -webkit-user-select: none;
5510
+ -moz-user-select: none;
5511
+ user-select: none;
5512
+ }
5513
+
5438
5514
  .image-gallery:focus-visible {
5439
5515
  outline: 2px solid var(--primary);
5440
5516
  outline-offset: 2px;
@@ -5468,13 +5544,57 @@ em {
5468
5544
  cursor: zoom-in;
5469
5545
  }
5470
5546
 
5471
- .image-gallery__main-image {
5547
+ /* Swipeable strip (main view and lightbox): native scrolling, one slide per snap point */
5548
+ .image-gallery__strip {
5549
+ /* Offset parent of the slides: a slide's offsetLeft is its scroll offset */
5550
+ position: relative;
5551
+ display: flex;
5552
+ height: 100%;
5553
+ overflow-x: auto;
5554
+ overflow-y: hidden;
5555
+ scroll-snap-type: x mandatory;
5556
+ overscroll-behavior-x: contain;
5557
+ scrollbar-width: none;
5558
+ }
5559
+
5560
+ .image-gallery__strip::-webkit-scrollbar {
5561
+ display: none;
5562
+ }
5563
+
5564
+ /* Arrow / thumbnail / key navigation glides to a neighbour (never a touch swipe) */
5565
+ @media (prefers-reduced-motion: no-preference) {
5566
+ .image-gallery__strip {
5567
+ scroll-behavior: smooth;
5568
+ }
5569
+ }
5570
+
5571
+ .image-gallery__slide {
5572
+ position: relative;
5573
+ flex: 0 0 100%;
5574
+ height: 100%;
5575
+ scroll-snap-align: start;
5576
+ scroll-snap-stop: always;
5577
+ }
5578
+
5579
+ .image-gallery__slide-img {
5580
+ position: absolute;
5581
+ inset: 0;
5582
+ display: block;
5472
5583
  width: 100%;
5473
5584
  height: 100%;
5474
5585
  -o-object-fit: cover;
5475
5586
  object-fit: cover;
5476
- display: block;
5477
- position: relative;
5587
+ -webkit-user-select: none;
5588
+ -moz-user-select: none;
5589
+ user-select: none;
5590
+ -webkit-user-drag: none;
5591
+ }
5592
+
5593
+ .image-gallery__slide-img[data-fit='contain'] {
5594
+ -o-object-fit: contain;
5595
+ object-fit: contain;
5596
+ box-sizing: border-box;
5597
+ padding: 6%;
5478
5598
  }
5479
5599
 
5480
5600
  /* Navigation arrows */
@@ -5593,38 +5713,186 @@ em {
5593
5713
  }
5594
5714
  }
5595
5715
 
5596
- /* Lightbox (full-size image dialog) */
5716
+ /* Lightbox: full-screen dialog, the viewer owns every gesture */
5597
5717
  .image-gallery__lightbox.dndev-modal-content {
5598
- max-width: min(96vw, 1400px);
5599
- max-height: 96dvh;
5600
- padding: var(--gap-sm);
5718
+ inset: 0;
5719
+ transform: none;
5720
+ width: 100vw;
5721
+ height: 100dvh;
5722
+ max-width: none;
5723
+ max-height: none;
5724
+ display: block;
5725
+ padding: 0;
5726
+ border: none;
5727
+ border-radius: 0;
5728
+ box-shadow: none;
5729
+ background: transparent;
5730
+ /* Fade only: the dialog keyframes translate a centred box */
5731
+ animation-name: overlay-in;
5601
5732
  }
5733
+ .image-gallery__lightbox.dndev-modal-content[data-state='closed'] {
5734
+ animation-name: overlay-out;
5735
+ }
5736
+ .image-gallery__lightbox.dndev-modal-content .dndev-modal-close {
5737
+ z-index: 4;
5738
+ opacity: 1;
5739
+ }
5602
5740
 
5603
5741
  .image-gallery__lightbox .dndev-modal-body {
5742
+ position: absolute;
5743
+ inset: 0;
5604
5744
  padding: 0;
5605
- display: flex;
5606
- align-items: center;
5607
- justify-content: center;
5608
5745
  overflow: hidden;
5609
- min-height: 40dvh;
5610
5746
  }
5611
5747
 
5612
- .image-gallery__lightbox-body {
5613
- position: relative;
5748
+ .image-gallery__lightbox-stage {
5749
+ position: absolute;
5750
+ inset: 0;
5751
+ overflow: hidden;
5752
+ outline: none;
5753
+ -webkit-user-select: none;
5754
+ -moz-user-select: none;
5755
+ user-select: none;
5756
+ }
5757
+
5758
+ /* Opaque layer behind the slides. The close drag fades it with opacity (composited);
5759
+ never animate its colour, that repaints the whole screen every frame. */
5760
+ .image-gallery__lightbox-backdrop {
5761
+ position: absolute;
5762
+ inset: 0;
5763
+ background-color: var(--background);
5764
+ will-change: opacity;
5765
+ }
5766
+
5767
+ /* pan-x: the browser pages; vertical drags and pinches reach the gesture code */
5768
+ .image-gallery__lightbox-strip {
5769
+ touch-action: pan-x;
5770
+ }
5771
+
5772
+ /* Zoomed: no paging, a drag pans the image */
5773
+ .image-gallery__lightbox-stage[data-zoomed] .image-gallery__lightbox-strip {
5774
+ touch-action: none;
5775
+ }
5776
+
5777
+ .image-gallery__lightbox-slide {
5614
5778
  display: flex;
5615
5779
  align-items: center;
5616
5780
  justify-content: center;
5781
+ box-sizing: border-box;
5782
+ padding: var(--gap-md);
5783
+ /* The frame sizes itself against the slide's content box (cq units) */
5784
+ container-type: size;
5785
+ }
5786
+
5787
+ /* Box of one image. Until its aspect ratio is known it fills the slide (the images are
5788
+ `contain`, so they look the same); then it is exactly the fitted image: the zoom, pan,
5789
+ hit-test and open / close morph target. */
5790
+ .image-gallery__lightbox-frame {
5791
+ position: relative;
5792
+ flex: none;
5617
5793
  width: 100%;
5618
- outline: none;
5794
+ height: 100%;
5795
+ cursor: zoom-in;
5619
5796
  }
5620
5797
 
5621
- .image-gallery__lightbox-img {
5622
- max-width: 100%;
5623
- max-height: 85dvh;
5624
- width: auto;
5798
+ .image-gallery__lightbox-frame[data-sized] {
5799
+ width: min(100cqw, 100cqh * var(--image-ratio));
5625
5800
  height: auto;
5801
+ aspect-ratio: var(--image-ratio);
5802
+ }
5803
+
5804
+ /* Full image over its cached thumbnail: never an empty slide while it downloads */
5805
+ .image-gallery__lightbox-frame > img {
5806
+ position: absolute;
5807
+ inset: 0;
5808
+ display: block;
5809
+ width: 100%;
5810
+ height: 100%;
5626
5811
  -o-object-fit: contain;
5627
5812
  object-fit: contain;
5813
+ -webkit-user-drag: none;
5814
+ }
5815
+
5816
+ .image-gallery__lightbox-frame[data-loaded] > .image-gallery__lightbox-placeholder {
5817
+ visibility: hidden;
5818
+ }
5819
+
5820
+ /* Own layer only for what a gesture moves: the dragged slide, the zoomed image */
5821
+ .image-gallery__lightbox-stage[data-closing]
5822
+ .image-gallery__lightbox-slide:not([aria-hidden]) {
5823
+ will-change: translate;
5824
+ }
5825
+
5826
+ .image-gallery__lightbox-stage[data-zoomed]
5827
+ .image-gallery__lightbox-slide:not([aria-hidden])
5828
+ > .image-gallery__lightbox-frame {
5829
+ will-change: transform;
5830
+ cursor: grab;
5831
+ }
5832
+
5833
+ .image-gallery__lightbox-stage[data-zoomed]:active
5834
+ .image-gallery__lightbox-frame {
5835
+ cursor: grabbing;
5836
+ }
5837
+
5838
+ /* Settles (snap back, double-tap / click zoom) are transitions, off during a gesture */
5839
+ @media (prefers-reduced-motion: no-preference) {
5840
+ .image-gallery__lightbox-stage[data-settle]
5841
+ :is(
5842
+ .image-gallery__lightbox-backdrop,
5843
+ .image-gallery__lightbox-slide,
5844
+ .image-gallery__lightbox-frame
5845
+ ) {
5846
+ transition-property: opacity, translate, transform;
5847
+ transition-duration: var(--dur-normal);
5848
+ transition-timing-function: var(--ease-heavy);
5849
+ }
5850
+
5851
+ /* Pan glide after a fling: a long deceleration. GLIDE_MS in lightboxGestures.ts
5852
+ projects the end point from these two tokens; keep them in step. */
5853
+ .image-gallery__lightbox-stage[data-settle='momentum']
5854
+ .image-gallery__lightbox-frame {
5855
+ transition-duration: var(--dur-slow);
5856
+ }
5857
+ }
5858
+
5859
+ /* Open / close morph: the tapped image grows into the lightbox and shrinks back
5860
+ (same-document view transition, run by the browser on the compositor). */
5861
+ ::view-transition-group(image-gallery-image) {
5862
+ animation-duration: var(--dur-normal);
5863
+ animation-timing-function: var(--ease-heavy);
5864
+ }
5865
+
5866
+ ::view-transition-old(image-gallery-image),
5867
+ ::view-transition-new(image-gallery-image) {
5868
+ height: 100%;
5869
+ -o-object-fit: cover;
5870
+ object-fit: cover;
5871
+ overflow: clip;
5872
+ }
5873
+
5874
+ /* With the morph, the view transition animates open / close: the dialog's own
5875
+ fade would run on top of it. Same conditions as `canMorph` in ImageGallery.tsx. */
5876
+ @supports (view-transition-name: none) {
5877
+ @media (prefers-reduced-motion: no-preference) {
5878
+ .image-gallery__lightbox.dndev-modal-content[data-state],
5879
+ .dndev-overlay[data-state]:has(+ .image-gallery__lightbox) {
5880
+ animation: none;
5881
+ }
5882
+ }
5883
+ }
5884
+
5885
+ .image-gallery__lightbox-counter {
5886
+ position: absolute;
5887
+ top: var(--gap-md);
5888
+ inset-inline-start: var(--gap-md);
5889
+ z-index: 3;
5890
+ padding: calc(var(--gap-sm) / 2) var(--gap-sm);
5891
+ border-radius: var(--radius-full);
5892
+ background-color: var(--card);
5893
+ color: var(--foreground);
5894
+ font-size: var(--font-size-sm);
5895
+ font-variant-numeric: tabular-nums;
5628
5896
  }
5629
5897
 
5630
5898
  .image-gallery__lightbox-nav {
@@ -5632,6 +5900,12 @@ em {
5632
5900
  z-index: 3;
5633
5901
  }
5634
5902
 
5903
+ /* Touch: swipe pages, so arrows are noise */
5904
+ @media (pointer: coarse) {
5905
+ .image-gallery__lightbox-nav {
5906
+ display: none;
5907
+ }
5908
+ }
5635
5909
  /* packages/components/src/atomic/Input/Input.css */
5636
5910
 
5637
5911
  /* Hide number input spinners - cleaner UI for price/range inputs */
@@ -8196,6 +8470,11 @@ input[type='number'] {
8196
8470
  will-change: transform;
8197
8471
  }
8198
8472
 
8473
+ /* Primary while on: thumb in the primary foreground (as Checkbox), readable on the track */
8474
+ .dndev-switch[data-variant='primary'][data-state='checked'] .dndev-switch-thumb {
8475
+ background-color: var(--primary-foreground);
8476
+ }
8477
+
8199
8478
  .dndev-switch[data-state='checked'] .dndev-switch-thumb {
8200
8479
  transform: translateX(calc(2.75rem - 1.25rem - 0.125rem));
8201
8480
  }
@@ -8251,6 +8530,10 @@ input[type='number'] {
8251
8530
  font-weight: var(--font-weight-normal);
8252
8531
  }
8253
8532
 
8533
+ /* Switch with a label after it: the switch keeps its size, the label wraps */
8534
+ .dndev-switch-field > .dndev-switch {
8535
+ flex-shrink: 0;
8536
+ }
8254
8537
  /* packages/components/src/atomic/Table/Table.css */
8255
8538
 
8256
8539
  .dndev-table-wrapper {
@@ -8485,6 +8768,84 @@ input[type='number'] {
8485
8768
  opacity: var(--opacity-muted);
8486
8769
  }
8487
8770
  }
8771
+
8772
+ /* Editable DataTable --------------------------------------------------- */
8773
+
8774
+ /* Scope for editor lookup (keyboard navigation); adds no box. */
8775
+ .dndev-table-edit-scope {
8776
+ display: contents;
8777
+ }
8778
+
8779
+ .dndev-table-bulk-bar {
8780
+ padding: var(--gap-xs) var(--gap-sm);
8781
+ border: 1px solid var(--border);
8782
+ background-color: var(--muted);
8783
+ }
8784
+
8785
+ /* Cell editor: fills the cell, reads as text until focused. */
8786
+ .dndev-table-cell-editor {
8787
+ width: 100%;
8788
+ min-width: 6rem;
8789
+ font: inherit;
8790
+ color: inherit;
8791
+ background-color: transparent;
8792
+ border: 1px solid transparent;
8793
+ border-radius: var(--radius-sm);
8794
+ padding: var(--gap-xs);
8795
+ }
8796
+
8797
+ .dndev-table-cell-editor:hover {
8798
+ border-color: var(--border);
8799
+ }
8800
+
8801
+ .dndev-table-cell-editor:focus-visible,
8802
+ .dndev-table-cell-editor:focus {
8803
+ outline: 2px solid var(--ring);
8804
+ outline-offset: -1px;
8805
+ background-color: var(--background);
8806
+ }
8807
+
8808
+ .dndev-table-bulk-bar .dndev-table-cell-editor {
8809
+ width: auto;
8810
+ border-color: var(--border);
8811
+ background-color: var(--background);
8812
+ }
8813
+
8814
+ .dndev-table-cell[data-editable='true'] {
8815
+ padding-block: 0;
8816
+ }
8817
+
8818
+ /* Changed, not saved yet */
8819
+ .dndev-table-cell[data-dirty='true'] {
8820
+ background-color: color-mix(in oklab, var(--primary) 12%, transparent);
8821
+ }
8822
+
8823
+ /* Value that does not parse: the save will reject it */
8824
+ .dndev-table-cell[data-invalid='true'] .dndev-table-cell-editor {
8825
+ border-color: var(--destructive);
8826
+ }
8827
+
8828
+ /* Open cell: icon link to the row's record (touch-sized hit area) */
8829
+ .dndev-table-open-link {
8830
+ display: inline-flex;
8831
+ align-items: center;
8832
+ justify-content: center;
8833
+ min-width: var(--touch-target);
8834
+ min-height: var(--touch-target);
8835
+ color: var(--muted-foreground);
8836
+ border-radius: var(--radius-sm);
8837
+ }
8838
+
8839
+ .dndev-table-open-link:hover {
8840
+ color: var(--foreground);
8841
+ background-color: var(--muted);
8842
+ }
8843
+
8844
+ .dndev-table-open-link:focus-visible {
8845
+ outline: 2px solid var(--ring);
8846
+ outline-offset: -1px;
8847
+ }
8848
+
8488
8849
  /* packages/components/src/atomic/Tabs/Tabs.css */
8489
8850
 
8490
8851
  /* Tabs list: use flexbox for natural wrapping, not grid */
@@ -8504,100 +8865,51 @@ input[type='number'] {
8504
8865
  word-break: break-word;
8505
8866
  border: var(--border-hairline) solid var(--line-2); /* Show clickable area */
8506
8867
 
8507
- /* Fallback (no variant): inactive = primary, active = foreground/card */
8508
- background-color: var(--primary);
8509
- color: var(--primary-foreground);
8868
+ /*
8869
+ * Inactive = neutral surface, active = filled with the variant colour, so the
8870
+ * selected tab is the one that stands out (the panel sits below with a gap, it
8871
+ * is not a folder tab joined to its content). --card not --background: the tab
8872
+ * surface must be opaque (--background can be transparent in some themes).
8873
+ */
8874
+ background-color: var(--card);
8875
+ color: var(--muted-foreground);
8876
+ --tab-active-bg: var(--primary);
8877
+ --tab-active-fg: var(--primary-foreground);
8510
8878
  }
8511
- .dndev-interactive[data-role='tab-trigger'][data-state='active'] {
8512
- /* --card not --background: active tab surface must be opaque (--background can be transparent in some themes) */
8513
- background-color: var(--card);
8879
+ .dndev-interactive[data-role='tab-trigger']:hover:not([data-state='active']):not(:disabled) {
8514
8880
  color: var(--foreground);
8515
- box-shadow: var(--shadow-sm);
8516
- border-color: var(--primary);
8517
- }
8518
- /* Default/Primary variant: inactive = primary, active = foreground/card */
8519
- .dndev-interactive[data-role='tab-trigger'][data-variant='default'],.dndev-interactive[data-role='tab-trigger'][data-variant='primary'] {
8520
- background-color: var(--primary);
8521
- color: var(--primary-foreground);
8522
8881
  }
8523
- [data-state='active']:is(.dndev-interactive[data-role='tab-trigger'][data-variant='default'],.dndev-interactive[data-role='tab-trigger'][data-variant='primary']) {
8524
- /* --card not --background: active tab surface must be opaque */
8525
- background-color: var(--card);
8526
- color: var(--foreground);
8527
- box-shadow: var(--shadow-sm);
8528
- border-color: var(--primary);
8529
- }
8530
- /* Secondary variant: inactive = secondary, active = foreground/card */
8531
8882
  .dndev-interactive[data-role='tab-trigger'][data-variant='secondary'] {
8532
- background-color: var(--secondary);
8533
- color: var(--secondary-foreground);
8883
+ --tab-active-bg: var(--secondary);
8884
+ --tab-active-fg: var(--secondary-foreground);
8534
8885
  }
8535
- .dndev-interactive[data-role='tab-trigger'][data-variant='secondary'][data-state='active'] {
8536
- /* --card not --background: active tab surface must be opaque */
8537
- background-color: var(--card);
8538
- color: var(--foreground);
8539
- box-shadow: var(--shadow-sm);
8540
- border-color: var(--secondary);
8541
- }
8542
- /* Accent variant: inactive = accent, active = foreground/card */
8543
8886
  .dndev-interactive[data-role='tab-trigger'][data-variant='accent'] {
8544
- background-color: var(--accent);
8545
- color: var(--accent-foreground);
8887
+ --tab-active-bg: var(--accent);
8888
+ --tab-active-fg: var(--accent-foreground);
8546
8889
  }
8547
- .dndev-interactive[data-role='tab-trigger'][data-variant='accent'][data-state='active'] {
8548
- /* --card not --background: active tab surface must be opaque */
8549
- background-color: var(--card);
8550
- color: var(--foreground);
8551
- box-shadow: var(--shadow-sm);
8552
- border-color: var(--accent);
8553
- }
8554
- /* Muted variant: inactive = muted, active = primary (to contrast) */
8890
+ /* Muted: the muted fill would not stand out as the selection, so primary */
8555
8891
  .dndev-interactive[data-role='tab-trigger'][data-variant='muted'] {
8556
- background-color: var(--muted);
8557
- color: var(--muted-foreground);
8892
+ --tab-active-bg: var(--primary);
8893
+ --tab-active-fg: var(--primary-foreground);
8558
8894
  }
8559
- .dndev-interactive[data-role='tab-trigger'][data-variant='muted'][data-state='active'] {
8560
- background-color: var(--primary);
8561
- color: var(--primary-foreground);
8562
- box-shadow: var(--shadow-sm);
8563
- border-color: var(--primary);
8564
- }
8565
- /* Warning variant: inactive = warning, active = foreground/card */
8566
8895
  .dndev-interactive[data-role='tab-trigger'][data-variant='warning'] {
8567
- background-color: var(--warning);
8568
- color: var(--warning-foreground);
8896
+ --tab-active-bg: var(--warning);
8897
+ --tab-active-fg: var(--warning-foreground);
8569
8898
  }
8570
- .dndev-interactive[data-role='tab-trigger'][data-variant='warning'][data-state='active'] {
8571
- /* --card not --background: active tab surface must be opaque */
8572
- background-color: var(--card);
8573
- color: var(--foreground);
8574
- box-shadow: var(--shadow-sm);
8575
- border-color: var(--warning);
8576
- }
8577
- /* Success variant: inactive = success, active = foreground/card */
8578
8899
  .dndev-interactive[data-role='tab-trigger'][data-variant='success'] {
8579
- background-color: var(--success);
8580
- color: var(--success-foreground);
8900
+ --tab-active-bg: var(--success);
8901
+ --tab-active-fg: var(--success-foreground);
8581
8902
  }
8582
- .dndev-interactive[data-role='tab-trigger'][data-variant='success'][data-state='active'] {
8583
- /* --card not --background: active tab surface must be opaque */
8584
- background-color: var(--card);
8585
- color: var(--foreground);
8586
- box-shadow: var(--shadow-sm);
8587
- border-color: var(--success);
8588
- }
8589
- /* Destructive variant: inactive = destructive, active = foreground/card */
8590
8903
  .dndev-interactive[data-role='tab-trigger'][data-variant='destructive'] {
8591
- background-color: var(--destructive);
8592
- color: var(--destructive-foreground);
8904
+ --tab-active-bg: var(--destructive);
8905
+ --tab-active-fg: var(--destructive-foreground);
8906
+ }
8907
+ .dndev-interactive[data-role='tab-trigger'][data-state='active'] {
8908
+ background-color: var(--tab-active-bg);
8909
+ color: var(--tab-active-fg);
8910
+ border-color: var(--tab-active-bg);
8911
+ box-shadow: var(--shadow-sm);
8593
8912
  }
8594
- .dndev-interactive[data-role='tab-trigger'][data-variant='destructive'][data-state='active'] {
8595
- /* --card not --background: active tab surface must be opaque */
8596
- background-color: var(--card);
8597
- color: var(--foreground);
8598
- box-shadow: var(--shadow-sm);
8599
- border-color: var(--destructive);
8600
- }
8601
8913
 
8602
8914
  .dndev-tabs-content {
8603
8915
  margin-top: var(--gap-md);
@@ -11679,9 +11991,17 @@ h4[data-variant='code'] {
11679
11991
  /* ===========================
11680
11992
  DEFAULT VALUES (Landing Preset)
11681
11993
  All presets inherit these - only override what's different
11994
+
11995
+ Layout tokens are declared on <html>, never on .dndev-layout: every element of
11996
+ the app sits under the wrapper, so a declaration there would shadow the app's
11997
+ :root overrides (themes.css). Presets read the wrapper's data-layout (in the
11998
+ server HTML) through :has, so they resolve on the first paint. All token rules
11999
+ carry zero specificity (:where): an app :root override wins whatever the
12000
+ stylesheet order. Preset display rules (hide header, sidebar…) stay scoped to
12001
+ [data-layout], which matches the wrapper.
11682
12002
  =========================== */
11683
12003
 
11684
- :root {
12004
+ :where(:root) {
11685
12005
  /* Layout structure dimensions */
11686
12006
  /* Height values include borders (box-sizing: border-box) */
11687
12007
  /* Content heights are multiples of 12px, then add 2px border */
@@ -11883,9 +12203,15 @@ main[role='main'][data-routing-animation='none'] {
11883
12203
  }
11884
12204
 
11885
12205
  /* Header content width adjustments for sidebar layouts */
11886
- [data-layout='moolti'],
11887
- [data-layout='docs'],
11888
- [data-layout='blog'] {
12206
+ :where(
12207
+ :root:has(
12208
+ .dndev-layout:is(
12209
+ [data-layout='moolti'],
12210
+ [data-layout='docs'],
12211
+ [data-layout='blog']
12212
+ )
12213
+ )
12214
+ ) {
11889
12215
  --header-content-width: calc(100% - var(--sidebar-width));
11890
12216
  }
11891
12217
 
@@ -12092,7 +12418,7 @@ aside[role='navigation'].sidebar {
12092
12418
  display: none;
12093
12419
  }
12094
12420
  /* Moolti: Sidebar spans full height (no header/footer on desktop) */
12095
- [data-layout='moolti']:root aside.sidebar[role='navigation'] {
12421
+ [data-layout='moolti']:root aside.sidebar[role='navigation'],.dndev-layout[data-layout='moolti'] aside.sidebar[role='navigation'] {
12096
12422
  grid-row: 1 / -1;
12097
12423
  }
12098
12424
 
@@ -12459,14 +12785,14 @@ footer[role='contentinfo']:not([data-custom]) a:not(.dndev-interactive):hover {
12459
12785
  * Perfect for: Admin panels, dashboards, management interfaces
12460
12786
  * Overrides: Adds sidebar (240px), constrains width (1480px), tighter spacing
12461
12787
  */
12462
- [data-layout='admin'] {
12788
+ :where(:root:has(.dndev-layout[data-layout='admin'])) {
12463
12789
  /* Desktop/Wide (>=1024px) - only overrides */
12464
12790
  --sidebar-width: var(--custom-sidebar-width, 240px);
12465
12791
 
12466
12792
  /* Admin: Mobile/Tablet (<1024px) - only overrides */
12467
12793
  }
12468
12794
  @media (width <=1023px) {
12469
- [data-layout='admin'] {
12795
+ :where(:root:has(.dndev-layout[data-layout='admin'])) {
12470
12796
  --sidebar-width: 0px;
12471
12797
  /* Override: hide sidebar on mobile */
12472
12798
  }
@@ -12477,48 +12803,53 @@ footer[role='contentinfo']:not([data-custom]) a:not(.dndev-interactive):hover {
12477
12803
  * Perfect for: SaaS applications, productivity tools, focused workflows
12478
12804
  * Overrides: No header/footer (sidebar only), sidebar (256px), balanced spacing
12479
12805
  */
12480
- [data-layout='moolti'] {
12806
+ :where(:root:has(.dndev-layout[data-layout='moolti'])) {
12481
12807
  /* Desktop/Wide (>=1024px) - only overrides */
12482
12808
  --header-height: 0px;
12483
12809
  --sidebar-width: var(--custom-sidebar-width, 256px);
12484
12810
  --footer-height: 0px;
12811
+
12812
+ /* Moolti: Mobile/Tablet (<1024px) - only overrides */
12813
+ }
12814
+ @media (width <=1023px) {
12815
+ :where(:root:has(.dndev-layout[data-layout='moolti'])) {
12816
+ --header-height: 62px;
12817
+ --sidebar-width: 0px;
12485
12818
  }
12819
+ }
12820
+
12486
12821
  [data-layout='moolti'] header[role='banner'] {
12487
12822
  display: none;
12488
12823
  }
12824
+
12489
12825
  [data-layout='moolti'] footer[role='contentinfo'] {
12490
12826
  display: none;
12491
12827
  }
12492
- /* Moolti: Mobile/Tablet (<1024px) - only overrides */
12493
- @media (width <=1023px) {
12494
- [data-layout='moolti'] {
12495
- --header-height: 62px;
12496
- --sidebar-width: 0px;
12497
- }
12498
- }
12499
12828
 
12500
12829
  /**
12501
12830
  * DOCS PRESET
12502
12831
  * Perfect for: Documentation sites, knowledge bases, content platforms
12503
12832
  * Overrides: No header, sidebar (300px), comfortable reading spacing
12504
12833
  */
12505
- [data-layout='docs'] {
12834
+ :where(:root:has(.dndev-layout[data-layout='docs'])) {
12506
12835
  /* Desktop/Wide (>=1024px) - only overrides */
12507
12836
  --header-height: 0px;
12508
12837
  /* Override: no header - maximizes reading space */
12509
12838
  --sidebar-width: var(--custom-sidebar-width, 300px);
12839
+
12840
+ /* Docs: Mobile/Tablet (<1024px) - only overrides */
12510
12841
  }
12511
- [data-layout='docs'] header[role='banner'] {
12512
- display: none;
12513
- }
12514
- /* Docs: Mobile/Tablet (<1024px) - only overrides */
12515
12842
  @media (width <=1023px) {
12516
- [data-layout='docs'] {
12843
+ :where(:root:has(.dndev-layout[data-layout='docs'])) {
12517
12844
  --sidebar-width: 0px;
12518
12845
  /* Override: hide sidebar on mobile */
12519
12846
  }
12520
12847
  }
12521
12848
 
12849
+ [data-layout='docs'] header[role='banner'] {
12850
+ display: none;
12851
+ }
12852
+
12522
12853
  /**
12523
12854
  * LANDING PRESET (Default)
12524
12855
  * Perfect for: Marketing sites, landing pages, public content
@@ -12530,17 +12861,19 @@ footer[role='contentinfo']:not([data-custom]) a:not(.dndev-interactive):hover {
12530
12861
  * Perfect for: Blogs, news sites, content management
12531
12862
  * Overrides: Sidebar (280px), constrains width (1480px), content-focused spacing
12532
12863
  */
12533
- [data-layout='blog'] {
12864
+ :where(:root:has(.dndev-layout[data-layout='blog'])) {
12534
12865
  --sidebar-width: var(--custom-sidebar-width, 280px);
12535
12866
 
12536
12867
  /* Blog: Mobile/Tablet (<1024px) - only overrides */
12537
12868
  }
12538
12869
  @media (width <=1023px) {
12539
- [data-layout='blog'] {
12870
+ :where(:root:has(.dndev-layout[data-layout='blog'])) {
12540
12871
  --header-height: 0px;
12541
12872
  --sidebar-width: 0px;
12542
12873
  }
12874
+ }
12543
12875
 
12876
+ @media (width <=1023px) {
12544
12877
  [data-layout='blog'] header[role='banner'] {
12545
12878
  display: none;
12546
12879
  }
@@ -12551,17 +12884,20 @@ footer[role='contentinfo']:not([data-custom]) a:not(.dndev-interactive):hover {
12551
12884
  * Perfect for: Full-screen apps, embedded widgets, clean content
12552
12885
  * Overrides: No header/footer/sidebar, minimal spacing
12553
12886
  */
12554
- [data-layout='plain'] {
12887
+ :where(:root:has(.dndev-layout[data-layout='plain'])) {
12555
12888
  --header-height: 0px;
12556
12889
  --sidebar-width: 0px;
12557
12890
  --footer-height: 0px;
12558
12891
  }
12892
+
12559
12893
  [data-layout='plain'] header[role='banner'] {
12560
12894
  display: none;
12561
12895
  }
12896
+
12562
12897
  [data-layout='plain'] aside.sidebar[role='navigation'] {
12563
12898
  display: none;
12564
12899
  }
12900
+
12565
12901
  [data-layout='plain'] footer[role='contentinfo'] {
12566
12902
  display: none;
12567
12903
  }
@@ -12573,16 +12909,18 @@ footer[role='contentinfo']:not([data-custom]) a:not(.dndev-interactive):hover {
12573
12909
  * Perfect for: Mobile gaming apps, full-screen experiences, touch interfaces
12574
12910
  * Overrides: Minimal spacing for maximum screen real estate
12575
12911
  */
12576
- [data-layout='game'] {
12912
+ :where(:root:has(.dndev-layout[data-layout='game'])) {
12577
12913
  --header-height: 92px;
12578
12914
 
12579
12915
  /* Game: Mobile/Tablet (<1024px) - only overrides */
12580
12916
  }
12581
12917
  @media (width <=1023px) {
12582
- [data-layout='game'] {
12918
+ :where(:root:has(.dndev-layout[data-layout='game'])) {
12583
12919
  --footer-height: 0px;
12584
12920
  }
12921
+ }
12585
12922
 
12923
+ @media (width <=1023px) {
12586
12924
  [data-layout='game'] footer[role='contentinfo'] {
12587
12925
  display: none;
12588
12926
  }