@janga/norna 0.7.27 → 0.7.29

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 (136) hide show
  1. package/README.md +41 -29
  2. package/astro.config.mjs +33 -3
  3. package/bin/norna-cli.mjs +5 -3
  4. package/package.json +18 -12
  5. package/schemas/card-list.schema.json +1 -1
  6. package/schemas/config.schema.json +81 -66
  7. package/schemas/content-frontmatter.schema.json +23 -7
  8. package/schemas/manifest.json +49 -3
  9. package/schemas/page-theme.schema.json +1585 -41
  10. package/schemas/root-theme.schema.json +1767 -0
  11. package/schemas/sitewide-content.schema.json +18 -18
  12. package/schemas/theme.schema.json +243 -243
  13. package/scripts/add-site-node.mjs +31 -250
  14. package/scripts/build-site.mjs +11 -6
  15. package/scripts/check-config.mjs +7 -23
  16. package/scripts/dev-local.mjs +51 -17
  17. package/scripts/export-theme-preset.mjs +2 -2
  18. package/scripts/generate-images.mjs +89 -70
  19. package/scripts/generate-schemas.mjs +9 -6
  20. package/scripts/generate-search-index.mjs +3 -2
  21. package/scripts/lib/attachment-render.mjs +23 -0
  22. package/scripts/lib/category-destinations.mjs +13 -12
  23. package/scripts/lib/dev-server-identity.mjs +30 -0
  24. package/scripts/lib/documentation-links.mjs +1 -1
  25. package/scripts/lib/documentation-routes.json +70 -62
  26. package/scripts/lib/docusaurus-migration-audit.mjs +15 -12
  27. package/scripts/lib/editor-attachments.mjs +69 -0
  28. package/scripts/lib/editor-file-policy.mjs +20 -0
  29. package/scripts/lib/editor-language-service.mjs +74 -73
  30. package/scripts/lib/editor-page-addresses.mjs +57 -0
  31. package/scripts/lib/editor-page-placement.mjs +102 -0
  32. package/scripts/lib/editor-resource-actions.mjs +216 -0
  33. package/scripts/lib/editor-site-editing-tree.mjs +181 -0
  34. package/scripts/lib/editor-site-files.mjs +154 -0
  35. package/scripts/lib/editor-site-links.mjs +81 -0
  36. package/scripts/lib/editor-site-preview.mjs +149 -0
  37. package/scripts/lib/editor-site-tree.mjs +158 -0
  38. package/scripts/lib/editor-source-files.mjs +87 -0
  39. package/scripts/lib/editor-theme-help.mjs +43 -0
  40. package/scripts/lib/locale-registry.mjs +1 -1
  41. package/scripts/lib/locales/en.mjs +1 -1
  42. package/scripts/lib/logo-assets.mjs +2 -1
  43. package/scripts/lib/markdown-images.mjs +59 -0
  44. package/scripts/lib/markdown-links.mjs +29 -9
  45. package/scripts/lib/navigation-model.mjs +2 -44
  46. package/scripts/lib/navigation-review.mjs +14 -50
  47. package/scripts/lib/norna-markdown-blocks.mjs +1 -58
  48. package/scripts/lib/norna-markdown-render-plugin.mjs +29 -0
  49. package/scripts/lib/page-aliases.mjs +8 -1
  50. package/scripts/lib/page-attachments.mjs +59 -0
  51. package/scripts/lib/page-markdown.mjs +11 -7
  52. package/scripts/lib/page-model.mjs +19 -36
  53. package/scripts/lib/page-move-apply.mjs +119 -0
  54. package/scripts/lib/page-move-plan.mjs +64 -78
  55. package/scripts/lib/page-order-source.mjs +22 -0
  56. package/scripts/lib/page-order.mjs +45 -0
  57. package/scripts/lib/page-placement-cli.mjs +50 -0
  58. package/scripts/lib/presentation.mjs +3 -3
  59. package/scripts/lib/project-config.mjs +10 -8
  60. package/scripts/lib/publication-paths.mjs +72 -0
  61. package/scripts/lib/schema-definitions.mjs +15 -38
  62. package/scripts/lib/schema-editor-metadata.mjs +16 -60
  63. package/scripts/lib/schema-value-definitions.mjs +1 -1
  64. package/scripts/lib/site-content.mjs +8 -25
  65. package/scripts/lib/site-conventions.mjs +19 -1
  66. package/scripts/lib/site-link-graph.mjs +88 -18
  67. package/scripts/lib/site-navigation-tree.mjs +2 -7
  68. package/scripts/lib/site-node-create.mjs +182 -0
  69. package/scripts/lib/site-paths.mjs +24 -12
  70. package/scripts/lib/site-source-format.mjs +12 -0
  71. package/scripts/lib/site-structure.mjs +86 -95
  72. package/scripts/lib/site-upgrade.mjs +32 -0
  73. package/scripts/lib/social-image-assets.mjs +2 -1
  74. package/scripts/lib/source-files.mjs +34 -0
  75. package/scripts/lib/structured-blocks.mjs +3 -1
  76. package/scripts/lib/theme-config.mjs +26 -68
  77. package/scripts/lib/theme-packages.mjs +47 -0
  78. package/scripts/lib/theme-presets.mjs +20 -53
  79. package/scripts/lib/typography.mjs +2 -2
  80. package/scripts/lib/yaml-config.mjs +1 -1
  81. package/scripts/lib/yaml-source-edit.mjs +94 -0
  82. package/scripts/move-site-page.mjs +46 -254
  83. package/scripts/show-typography.mjs +32 -17
  84. package/scripts/sync-content-sections.mjs +17 -17
  85. package/scripts/sync-site-public.mjs +44 -66
  86. package/scripts/upgrade-site.mjs +17 -0
  87. package/src/components/AreaNavigationMenu.astro +24 -0
  88. package/src/components/AreaNavigationPanel.astro +55 -0
  89. package/src/components/AreaNavigationSwitcher.astro +30 -0
  90. package/src/components/ContentBlocks.astro +2 -1
  91. package/src/components/ImageStack.astro +7 -5
  92. package/src/components/ImageStackEnhancement.astro +0 -7
  93. package/src/components/NavigationContinuity.astro +26 -0
  94. package/src/components/NavigationPageTree.astro +13 -4
  95. package/src/components/NavigationState.astro +11 -0
  96. package/src/components/NavigationTreeControls.astro +3 -2
  97. package/src/components/SearchPage.astro +11 -2
  98. package/src/components/SectionNavigationScript.astro +106 -26
  99. package/src/components/SiteNavigation.astro +45 -20
  100. package/src/components/SitePage.astro +38 -61
  101. package/src/components/SiteSection.astro +1 -0
  102. package/src/components/SiteTreeNavigation.astro +38 -18
  103. package/src/components/TopPageMenu.astro +4 -3
  104. package/src/components/TreeNavigationScript.astro +50 -57
  105. package/src/content.config.ts +11 -12
  106. package/src/layouts/BaseLayout.astro +15 -39
  107. package/src/lib/areaNavigation.ts +42 -0
  108. package/src/lib/imagePresentation.ts +3 -0
  109. package/src/lib/markdownImages.ts +101 -0
  110. package/src/lib/navigationContinuity.ts +212 -0
  111. package/src/lib/navigationFollowing.ts +28 -18
  112. package/src/lib/navigationState.mjs +88 -0
  113. package/src/lib/navigationStateScript.mjs +76 -0
  114. package/src/lib/navigationVisibility.ts +9 -0
  115. package/src/lib/pageThemes.ts +5 -42
  116. package/src/lib/sectionContent.ts +67 -21
  117. package/src/lib/siteNavigation.ts +6 -0
  118. package/src/lib/sitePages.ts +13 -36
  119. package/src/lib/sitePublicAssets.ts +2 -1
  120. package/src/pages/404.astro +1 -1
  121. package/src/pages/[...slug].astro +7 -16
  122. package/src/pages/index.astro +1 -3
  123. package/src/styles/area-navigation.css +408 -0
  124. package/src/styles/content.css +8 -29
  125. package/src/styles/media.css +24 -0
  126. package/src/styles/navigation-continuity.css +163 -0
  127. package/src/styles/page-layout.css +57 -68
  128. package/src/styles/responsive.css +0 -4
  129. package/starters/basic/README.md +9 -8
  130. package/starters/basic/site/{pages/000-home → root}/content.md +2 -2
  131. package/starters/basic/site/{config.yaml → site-config/settings.yaml} +1 -0
  132. package/schemas/category.schema.json +0 -20
  133. package/src/components/PageContentsNavigation.astro +0 -20
  134. /package/starters/basic/site/{pages/000-home → root}/images/.gitkeep +0 -0
  135. /package/starters/basic/site/{theme.yaml → root/tree-theme.yaml} +0 -0
  136. /package/starters/basic/site/{sitewide-content.yaml → site-config/shared-content.yaml} +0 -0
@@ -0,0 +1,408 @@
1
+ /* Area menus, integrated H2 navigation and the tree-mode reading frame. */
2
+ .site-reading-location,
3
+ .area-navigation-switcher {
4
+ display: none;
5
+ }
6
+
7
+ /* An elevated dark panel needs a distinct surface and edge: a black shadow
8
+ cannot separate it from the page. Keep its link feedback distinct as well. */
9
+ :root[data-area-navigation][data-appearance='dark'] {
10
+ --area-menu-background: var(--color-surface-soft-background);
11
+ --area-menu-border: color-mix(in srgb, var(--color-primary-text) 40%, var(--color-surface-soft-background));
12
+ --area-menu-hover-background: var(--color-surface-emphasis-background);
13
+ }
14
+
15
+ @media (prefers-color-scheme: dark) {
16
+ :root[data-area-navigation][data-appearance='system'] {
17
+ --area-menu-background: var(--color-surface-soft-background);
18
+ --area-menu-border: color-mix(in srgb, var(--color-primary-text) 40%, var(--color-surface-soft-background));
19
+ --area-menu-hover-background: var(--color-surface-emphasis-background);
20
+ }
21
+ }
22
+
23
+ :root[data-area-navigation] .site-nav-row {
24
+ position: relative;
25
+ }
26
+
27
+ :root[data-area-navigation] .site-nav-item:has(.area-navigation-menu) {
28
+ position: static;
29
+ }
30
+
31
+ :root[data-area-navigation] .site-nav > ul > .site-nav-item > a,
32
+ :root[data-area-navigation] .area-navigation-menu > summary {
33
+ display: flex;
34
+ align-items: center;
35
+ min-height: var(--target-size-minimum);
36
+ padding-block: 0;
37
+ width: auto;
38
+ color: var(--color-secondary-text);
39
+ font-size: 0.78rem;
40
+ font-weight: 500;
41
+ letter-spacing: 0.08em;
42
+ line-height: 1.2;
43
+ text-transform: uppercase;
44
+ }
45
+
46
+ :root[data-area-navigation] .area-navigation-menu > summary {
47
+ position: relative;
48
+ isolation: isolate;
49
+ text-decoration: none;
50
+ }
51
+
52
+ /* Paint around the trigger without moving its label or neighboring links. */
53
+ :root[data-area-navigation] .area-navigation-menu > summary::before {
54
+ position: absolute;
55
+ inset: -0.25rem -0.6rem;
56
+ z-index: -1;
57
+ border: 1px solid transparent;
58
+ border-radius: var(--corner-radius-small);
59
+ content: '';
60
+ pointer-events: none;
61
+ }
62
+
63
+ :root[data-area-navigation] .area-navigation-menu > summary:is(:hover, :focus-visible),
64
+ :root[data-area-navigation] .area-navigation-menu[open] > summary,
65
+ :root[data-area-navigation] .site-nav-item-current-branch .area-navigation-menu > summary {
66
+ color: var(--site-top-text-color, var(--color-primary-text));
67
+ }
68
+
69
+ :root[data-area-navigation] .area-navigation-menu > summary:is(:hover, :focus-visible)::before,
70
+ :root[data-area-navigation] .area-navigation-menu[open] > summary::before {
71
+ border-color: color-mix(in srgb, currentColor 22%, transparent);
72
+ background: color-mix(in srgb, currentColor 8%, transparent);
73
+ }
74
+
75
+ :root[data-area-navigation] .area-navigation-panel {
76
+ --area-menu-width: min(calc(var(--area-menu-columns) * 16rem), calc(100vw - 2rem));
77
+ /* Anchor to the entire sticky row, including wrapped global links. This
78
+ also fits without the optional JavaScript panel-position adjustment. */
79
+ inset-inline-end: 0;
80
+ width: var(--area-menu-width);
81
+ max-width: calc(100vw - 2rem);
82
+ border-radius: var(--corner-radius-medium);
83
+ border-color: var(--area-menu-border, var(--color-border));
84
+ background: var(--area-menu-background, var(--site-top-background-color, var(--color-page)));
85
+ padding: 1rem;
86
+ display: grid;
87
+ grid-template-columns: repeat(var(--area-menu-columns), minmax(0, 1fr));
88
+ gap: 1rem;
89
+ }
90
+
91
+ :root[data-area-navigation] .area-navigation-choices {
92
+ margin: 0;
93
+ padding: 0;
94
+ list-style: none;
95
+ display: grid;
96
+ grid-column: span var(--area-group-columns);
97
+ grid-template-rows: repeat(var(--area-group-rows), auto);
98
+ grid-template-columns: repeat(var(--area-group-columns), minmax(0, 1fr));
99
+ grid-auto-flow: column;
100
+ grid-auto-columns: minmax(0, 1fr);
101
+ gap: 0.75rem 1rem;
102
+ align-content: start;
103
+ }
104
+
105
+ :root[data-area-navigation] [data-area-choice-group='branches'] + [data-area-choice-group='pages'] {
106
+ border-inline-start: 1px solid var(--color-border);
107
+ padding-inline-start: 1rem;
108
+ }
109
+
110
+ :root[data-area-navigation] [data-area-choice-group='pages'] {
111
+ row-gap: 0.15rem;
112
+ }
113
+
114
+ :root[data-area-navigation] [data-area-choice-group='pages'] .area-navigation-title {
115
+ font-weight: 400;
116
+ }
117
+
118
+ :root[data-area-navigation] .area-navigation-choices a {
119
+ display: flex;
120
+ flex-direction: column;
121
+ gap: 0.45rem;
122
+ height: 100%;
123
+ padding: 0.65rem 0.75rem;
124
+ border-radius: var(--corner-radius-small);
125
+ color: var(--color-primary-text);
126
+ font-size: 0.875rem;
127
+ font-weight: 400;
128
+ letter-spacing: 0;
129
+ line-height: 1.4;
130
+ text-decoration: none;
131
+ text-transform: none;
132
+ overflow-wrap: break-word;
133
+ }
134
+
135
+ :root[data-area-navigation] .area-navigation-choices a:is(:hover, :focus-visible) {
136
+ background: var(--area-menu-hover-background, var(--color-surface-soft-background));
137
+ }
138
+
139
+ :root[data-area-navigation] .area-navigation-title {
140
+ display: flex;
141
+ justify-content: space-between;
142
+ align-items: baseline;
143
+ gap: 0.4rem;
144
+ font-weight: 500;
145
+ }
146
+
147
+ :root[data-area-navigation] .area-navigation-title svg {
148
+ flex: 0 0 auto;
149
+ width: 0.85rem;
150
+ height: 0.85rem;
151
+ }
152
+
153
+ :root[data-area-navigation] .area-navigation-description {
154
+ color: var(--color-secondary-text);
155
+ font-size: 0.8rem;
156
+ line-height: 1.55;
157
+ }
158
+
159
+ :root[data-area-navigation] .area-navigation-other-roots {
160
+ grid-column: 1 / -1;
161
+ display: flex;
162
+ flex-wrap: wrap;
163
+ gap: 0.25rem 0.75rem;
164
+ margin: 0;
165
+ border-block-start: 1px solid var(--color-border);
166
+ padding: 0.75rem 0 0;
167
+ list-style: none;
168
+ }
169
+
170
+ :root[data-area-navigation] .area-navigation-other-roots a {
171
+ display: block;
172
+ padding: 0.45rem 0.75rem;
173
+ border-radius: var(--corner-radius-small);
174
+ color: var(--color-secondary-text);
175
+ font-size: 0.8rem;
176
+ font-weight: 400;
177
+ line-height: 1.4;
178
+ text-decoration: none;
179
+ }
180
+
181
+ :root[data-area-navigation] .area-navigation-other-roots a:is(:hover, :focus-visible) {
182
+ background: var(--area-menu-hover-background, var(--color-surface-soft-background));
183
+ color: var(--color-primary-text);
184
+ }
185
+
186
+ :root[data-area-navigation] .navigation-area-title {
187
+ display: block;
188
+ margin: 0 0 1rem;
189
+ color: var(--color-primary-text);
190
+ font-size: 0.95rem;
191
+ font-weight: 600;
192
+ text-decoration: none;
193
+ }
194
+
195
+ :root[data-area-navigation] a.navigation-area-title:is(:hover, :focus-visible) {
196
+ text-decoration: underline;
197
+ text-underline-offset: 0.25em;
198
+ }
199
+
200
+ /* The sticky controls mask 1.25rem above their box. Keep that background
201
+ below the area's linked title, including its underline. */
202
+ :root[data-area-navigation] .navigation-area-title:has(+ .navigation-tree-controls) {
203
+ margin-block-end: 1.5rem;
204
+ }
205
+
206
+ /* Scoped pages are now at the tree's first level. Override the ordinary
207
+ first-level emphasis as well as current-page emphasis at every depth. */
208
+ :root[data-navigation-continuity][data-area-navigation]
209
+ .tree-local-navigation .navigation-page-tree
210
+ :is(.navigation-page-link, .navigation-page-open-link, .navigation-page-summary) {
211
+ font-size: 0.84rem;
212
+ font-weight: 400;
213
+ }
214
+
215
+ @media (min-width: 961px) {
216
+ :root[data-area-reading-frame] {
217
+ --area-reading-rail-width: 16rem;
218
+ --area-reading-header-height: 4rem;
219
+ --site-top-anchor-offset: calc(var(--area-reading-header-height) + 1px + var(--nav-top-safety-inset));
220
+ --area-reading-outer-margin: var(--content-gutter);
221
+ --area-reading-frame-width: min(calc(100% - (var(--content-gutter) * 2)), max(var(--page-width), 86rem));
222
+ --area-reading-content-start: calc(var(--area-reading-outer-margin) + var(--area-reading-rail-width) + var(--local-navigation-gap, clamp(1.5rem, 3vw, 3rem)));
223
+ }
224
+
225
+ /* Keep the reading frame near navigation on wide screens. Focus reading
226
+ hides navigation without moving the article to a different reading axis. */
227
+ :root[data-area-reading-frame] .site-page-layout-tree {
228
+ width: var(--area-reading-frame-width);
229
+ margin-inline: var(--area-reading-outer-margin) auto;
230
+ --tree-layout-outer-margin: max(var(--content-gutter), calc(100vw - var(--content-gutter) - max(var(--page-width), 86rem)));
231
+ }
232
+
233
+ :root[data-area-reading-frame] .site-page-layout-tree > .site-content {
234
+ grid-column: 2;
235
+ }
236
+
237
+ /* One sticky row shares the article/tree columns. The ordinary header
238
+ measurement supplies anchor offsets and the fixed tree's upper edge. */
239
+ :root[data-area-reading-frame]:not([data-focus-reading='on']) .site-top {
240
+ background: var(--color-page);
241
+ color: var(--color-primary-text);
242
+ }
243
+
244
+ /* Keep header geometry stable when Focus reading switches to compact controls. */
245
+ :root[data-area-reading-frame] .site-nav-row {
246
+ min-height: var(--area-reading-header-height);
247
+ padding: 0.625rem 0;
248
+ }
249
+
250
+ :root[data-area-reading-frame]:not([data-focus-reading='on']) .site-nav-row {
251
+ display: grid;
252
+ grid-template-columns: var(--area-reading-rail-width) minmax(0, 1fr);
253
+ column-gap: var(--local-navigation-gap, clamp(1.5rem, 3vw, 3rem));
254
+ width: var(--area-reading-frame-width);
255
+ margin-inline: var(--area-reading-outer-margin) auto;
256
+ }
257
+
258
+ :root[data-area-reading-frame]:not([data-focus-reading='on']) .site-nav-leading {
259
+ grid-column: 1;
260
+ grid-row: 1;
261
+ max-width: calc(100% - 6rem);
262
+ padding-inline-start: 0.35rem;
263
+ }
264
+
265
+ :root[data-area-reading-frame]:not([data-focus-reading='on']) .site-brand {
266
+ min-width: 0;
267
+ max-width: 100%;
268
+ min-height: 2.25rem;
269
+ overflow: hidden;
270
+ color: inherit;
271
+ text-decoration: none;
272
+ }
273
+
274
+ :root[data-area-reading-frame] .site-brand-logo {
275
+ max-width: 100%;
276
+ object-fit: contain;
277
+ }
278
+
279
+ :root[data-area-reading-frame]:not([data-focus-reading='on']) .site-nav-actions {
280
+ grid-column: 1;
281
+ grid-row: 1;
282
+ justify-self: end;
283
+ gap: 0.35rem;
284
+ padding-inline-end: 0.75rem;
285
+ }
286
+
287
+ :root[data-area-reading-frame]:not([data-focus-reading='on']) .site-reading-location {
288
+ display: flex;
289
+ grid-column: 2;
290
+ grid-row: 1;
291
+ align-items: center;
292
+ gap: 0.65rem;
293
+ min-width: 0;
294
+ }
295
+
296
+ :root[data-area-reading-frame] .site-reading-location .site-breadcrumbs {
297
+ flex: 1 1 auto;
298
+ min-width: 0;
299
+ min-height: 0;
300
+ width: auto;
301
+ margin: 0;
302
+ padding: 0;
303
+ }
304
+
305
+ :root[data-area-reading-frame] .site-reading-location .site-breadcrumbs ol {
306
+ flex-wrap: nowrap;
307
+ }
308
+
309
+ :root[data-area-reading-frame] .site-reading-location .site-breadcrumbs li > :is(a, span) {
310
+ overflow: hidden;
311
+ text-overflow: ellipsis;
312
+ white-space: nowrap;
313
+ }
314
+
315
+ :root[data-area-reading-frame] .site-reading-location-label {
316
+ font-size: 0.78rem;
317
+ font-weight: 650;
318
+ }
319
+
320
+ /* The in-article breadcrumb remains available in the compact layout. */
321
+ :root[data-area-reading-frame] .site-content > .site-breadcrumbs {
322
+ display: none;
323
+ }
324
+
325
+ :root[data-area-reading-frame] .site-content-has-breadcrumbs > .site-section:first-of-type {
326
+ padding-top: var(--space-nav-to-first-section);
327
+ }
328
+
329
+ :root[data-area-reading-frame]:not([data-focus-reading='on']) .display-settings-panel {
330
+ left: 0;
331
+ right: auto;
332
+ max-height: calc(100svh - 4.5rem);
333
+ }
334
+
335
+ :root[data-area-reading-frame]:not([data-focus-reading='on']) .tree-local-navigation {
336
+ position: fixed;
337
+ top: var(--site-top-anchor-offset);
338
+ left: var(--area-reading-outer-margin);
339
+ bottom: 0;
340
+ width: var(--area-reading-rail-width);
341
+ max-height: calc(100svh - var(--site-top-anchor-offset));
342
+ }
343
+
344
+ :root[data-area-reading-frame] .site-banners {
345
+ width: calc(var(--area-reading-frame-width) - var(--area-reading-rail-width) - var(--local-navigation-gap, clamp(1.5rem, 3vw, 3rem)));
346
+ margin-inline: var(--area-reading-content-start) auto;
347
+ }
348
+
349
+ :root[data-area-reading-frame]:not([data-focus-reading='on']) .area-navigation-switcher {
350
+ position: static;
351
+ display: block;
352
+ flex: 0 0 auto;
353
+ min-width: 0;
354
+ }
355
+
356
+ :root[data-area-reading-frame] .area-navigation-switcher > summary {
357
+ width: 2.25rem;
358
+ height: 2.25rem;
359
+ border-radius: var(--corner-radius-small);
360
+ }
361
+
362
+ :root[data-area-reading-frame] .area-navigation-switcher > summary:is(:hover, :focus-visible),
363
+ :root[data-area-reading-frame] .area-navigation-switcher[open] > summary {
364
+ background: var(--color-surface-soft-background);
365
+ }
366
+
367
+ :root[data-area-reading-frame] .area-navigation-switcher > summary svg {
368
+ flex: 0 0 auto;
369
+ transform: none;
370
+ }
371
+
372
+ :root[data-area-reading-frame] .area-navigation-switcher .area-navigation-panel {
373
+ /* Fit beneath the shared row before the disclosure's toggle event.
374
+ This also keeps the panel visible without JavaScript. */
375
+ inset-inline-start: min(
376
+ calc(var(--area-reading-rail-width) + var(--local-navigation-gap, clamp(1.5rem, 3vw, 3rem))),
377
+ calc(100% - var(--area-menu-width))
378
+ );
379
+ inset-inline-end: auto;
380
+ inset-block-start: 100%;
381
+ max-height: calc(100svh - var(--site-top-anchor-offset) - 1rem);
382
+ background: var(--area-menu-background, var(--color-page));
383
+ color: var(--color-primary-text);
384
+ overscroll-behavior: contain;
385
+ }
386
+
387
+ :root[data-area-navigation] .site-page-layout-tree {
388
+ --tree-navigation-width: 16rem;
389
+ grid-template-columns: var(--tree-navigation-width) minmax(0, 1fr);
390
+ }
391
+
392
+ /* The recovered right column belongs to the content canvas. Do not count
393
+ the old outline allowance a second time for notes or wide blocks. */
394
+ :root[data-area-navigation] .site-page-layout-tree .section-markdown > :is(.norna-table-frame, .code-block) {
395
+ --wide-block-end-width: 100cqi;
396
+ --wide-block-canvas-width: var(--wide-block-end-width);
397
+ }
398
+
399
+ :root[data-area-navigation][data-reader-preferences-ready='true'][data-focus-reading='on'] .site-page-layout-tree {
400
+ grid-template-columns: var(--tree-navigation-width) minmax(0, 1fr);
401
+ }
402
+
403
+ :root[data-area-navigation][data-reader-preferences-ready='true'][data-focus-reading='on']
404
+ .site-page-layout-tree .section-markdown > :is(.norna-table-frame, .code-block) {
405
+ --wide-block-end-width: 100cqi;
406
+ --wide-block-canvas-width: calc(100cqi + var(--tree-navigation-width) + var(--tree-layout-gap));
407
+ }
408
+ }
@@ -466,7 +466,8 @@ ul {
466
466
  }
467
467
 
468
468
  .section-markdown > .norna-table-frame {
469
- width: var(--wide-block-end-width);
469
+ /* Start in the same lane that the layout enhancement tries first. */
470
+ width: var(--wide-block-prose-width);
470
471
  }
471
472
 
472
473
  .section-markdown > :is([data-table-layout='prose'], [data-code-layout='prose']) {
@@ -784,32 +785,10 @@ ul {
784
785
  }
785
786
  }
786
787
 
787
- @media (min-width: 1101px) {
788
- :root[data-reader-preferences-ready='true'][data-focus-reading='on']
789
- .site-page-layout-tree .section-markdown > :is(.norna-table-frame, .code-block) {
790
- --wide-block-end-width: calc(100cqi + var(--contents-navigation-width) + var(--tree-layout-gap));
791
- --wide-block-canvas-width: calc(
792
- 100cqi
793
- + var(--tree-navigation-width)
794
- + var(--contents-navigation-width)
795
- + (var(--tree-layout-gap) * 2)
796
- );
797
- --wide-block-canvas-inline-offset: calc(0px - var(--tree-navigation-width) - var(--tree-layout-gap));
798
- }
799
- }
800
-
801
- @media (min-width: 1281px) {
802
- .site-page-layout-tree:not(.site-page-layout-contents) .section-markdown > :is(.norna-table-frame, .code-block) {
803
- --wide-block-end-width: calc(100cqi + var(--contents-navigation-width) + var(--tree-layout-gap));
804
- --wide-block-canvas-width: var(--wide-block-end-width);
805
- }
806
- }
807
-
808
788
  :root[data-reader-preferences-ready='true'][data-focus-reading='on'] :is(
809
789
  .site-nav,
810
790
  .page-nav,
811
791
  .tree-local-navigation,
812
- .page-contents-navigation,
813
792
  .site-breadcrumbs,
814
793
  .site-footer
815
794
  ) {
@@ -835,12 +814,6 @@ ul {
835
814
  }
836
815
  }
837
816
 
838
- @media (min-width: 1101px) {
839
- :root[data-reader-preferences-ready='true'][data-focus-reading='on'] .site-page-layout-tree {
840
- grid-template-columns: var(--tree-navigation-width) minmax(0, 1fr) var(--contents-navigation-width);
841
- }
842
- }
843
-
844
817
  :root[data-reader-preferences-ready='true'][data-focus-reading='on']
845
818
  .site-content-has-breadcrumbs > .site-section:first-of-type {
846
819
  padding-top: var(--space-nav-to-first-section);
@@ -1201,6 +1174,12 @@ ul {
1201
1174
  text-align: left;
1202
1175
  }
1203
1176
 
1177
+ .section-markdown li > :is(ul, ol) {
1178
+ display: block;
1179
+ margin-right: 0;
1180
+ margin-left: 0;
1181
+ }
1182
+
1204
1183
  .section-markdown li + li {
1205
1184
  margin-top: 0.35rem;
1206
1185
  }
@@ -337,6 +337,30 @@
337
337
  object-fit: contain;
338
338
  }
339
339
 
340
+ .managed-markdown-inline {
341
+ display: inline;
342
+ width: auto;
343
+ height: auto;
344
+ max-width: 100%;
345
+ vertical-align: middle;
346
+ }
347
+
348
+ .section-markdown .managed-markdown-standalone {
349
+ margin-block: var(--space-image-item);
350
+ max-width: 100%;
351
+ }
352
+
353
+ .section-markdown :is(ul, ol):has(.managed-markdown-standalone) {
354
+ display: block;
355
+ }
356
+
357
+ .section-markdown li > .managed-markdown-standalone {
358
+ display: inline-grid;
359
+ width: 100%;
360
+ margin-block: 0;
361
+ vertical-align: top;
362
+ }
363
+
340
364
  :root[data-image-inspector-open='true'] {
341
365
  overflow: hidden;
342
366
  }
@@ -0,0 +1,163 @@
1
+ /* Stable reading positions and progressive navigation transitions. */
2
+ @view-transition {
3
+ navigation: auto;
4
+ }
5
+
6
+ :root[data-navigation-continuity]:not([data-navigation-motion-ready]) {
7
+ scroll-behavior: auto !important;
8
+ }
9
+
10
+ /* Keep label widths stable when a page or its parent branch becomes current. */
11
+ :root[data-navigation-continuity] .navigation-page-tree
12
+ :is(.navigation-page-link, .navigation-page-open-link, .navigation-page-summary) {
13
+ font-weight: 400;
14
+ }
15
+
16
+ :root[data-navigation-continuity]
17
+ :is(.navigation-page-tree-mobile, .navigation-page-tree-submenu)
18
+ :is(.navigation-page-link, .navigation-page-open-link) {
19
+ font-weight: 500;
20
+ }
21
+
22
+ :root[data-navigation-continuity] .site-top {
23
+ view-transition-name: norna-header;
24
+ }
25
+
26
+ :root[data-navigation-continuity] .tree-local-navigation {
27
+ /* Keep this in the static root snapshot: Safari can blank a separately
28
+ captured scroll container after restoring a deep scroll position. */
29
+ view-transition-name: none;
30
+ max-height: calc(100svh - var(--navigation-scrollport-top,
31
+ calc(var(--site-top-anchor-offset) + 1.25rem)) - 1.25rem);
32
+ /* Leave a clear ending below the final visible row when the tree is scrolled. */
33
+ padding-block-end: 3rem;
34
+ }
35
+
36
+ /* Mask the scrollport's top padding as rows pass behind the sticky controls. */
37
+ :root[data-navigation-continuity] .tree-local-navigation .navigation-tree-controls::before {
38
+ position: absolute;
39
+ inset-inline: 0;
40
+ bottom: 100%;
41
+ height: 1.25rem;
42
+ background: inherit;
43
+ content: '';
44
+ }
45
+
46
+ :root[data-navigation-continuity] .navigation-category-link {
47
+ color: inherit;
48
+ font: inherit;
49
+ text-decoration: none;
50
+ }
51
+
52
+ :root[data-navigation-continuity] .navigation-category-link:hover,
53
+ :root[data-navigation-continuity] .navigation-category-link:focus-visible {
54
+ text-decoration: underline;
55
+ text-underline-offset: 0.28em;
56
+ }
57
+
58
+ /* Keep the article in the viewport's root snapshot. Capturing a long article
59
+ separately delays Safari's first paint even with a zero-duration fade. */
60
+
61
+ ::view-transition-group(*) {
62
+ animation: none;
63
+ }
64
+
65
+ ::view-transition-old(root),
66
+ ::view-transition-old(norna-header) {
67
+ display: none;
68
+ }
69
+
70
+ ::view-transition-new(root),
71
+ ::view-transition-new(norna-header) {
72
+ animation: none;
73
+ mix-blend-mode: normal;
74
+ }
75
+
76
+ :root[data-navigation-continuity] .navigation-page-chevron::before {
77
+ transition: transform 120ms ease-out;
78
+ }
79
+
80
+ :root[data-navigation-continuity]:not([data-navigation-motion-ready])
81
+ .navigation-page-chevron::before {
82
+ /* Restoring an open branch is not a new disclosure interaction. */
83
+ transition: none;
84
+ }
85
+
86
+ :root[data-navigation-continuity] [data-navigation-motion-open='true']
87
+ > summary .navigation-page-chevron::before {
88
+ transform: rotate(90deg);
89
+ }
90
+
91
+ :root[data-navigation-continuity] [data-navigation-motion-open='false']
92
+ > summary .navigation-page-chevron::before {
93
+ transform: rotate(0deg);
94
+ }
95
+
96
+ :root[data-navigation-continuity] .navigation-page-tree-sidebar
97
+ [data-navigation-motion-open='true'] > summary .navigation-page-chevron::before {
98
+ transform: rotate(45deg);
99
+ }
100
+
101
+ :root[data-navigation-continuity] .navigation-page-tree-sidebar
102
+ [data-navigation-motion-open='false'] > summary .navigation-page-chevron::before {
103
+ transform: rotate(-45deg);
104
+ }
105
+
106
+ :root[data-navigation-continuity] [data-navigation-motion-active] {
107
+ overflow: clip;
108
+ }
109
+
110
+ :root[data-navigation-continuity] .page-contents-links[data-navigation-marker] {
111
+ position: relative;
112
+ }
113
+
114
+ :root[data-navigation-continuity] [data-navigation-marker] a[aria-current='location'] {
115
+ background: transparent;
116
+ box-shadow: none;
117
+ }
118
+
119
+ :root[data-navigation-continuity] [data-navigation-marker]
120
+ a[aria-current='location']:not(:hover):not(:focus-visible) {
121
+ text-decoration: none;
122
+ }
123
+
124
+ :root[data-navigation-continuity] [data-navigation-marker] a[aria-current='location']::before {
125
+ content: none;
126
+ }
127
+
128
+ :root[data-navigation-continuity] [data-navigation-marker]::after {
129
+ position: absolute;
130
+ top: 0;
131
+ left: -0.85rem;
132
+ width: 2px;
133
+ height: var(--navigation-marker-height, 0px);
134
+ border-radius: 2px;
135
+ background: var(--color-primary-text);
136
+ content: '';
137
+ opacity: var(--navigation-marker-opacity, 0);
138
+ pointer-events: none;
139
+ transform: translateY(var(--navigation-marker-top, 0px));
140
+ transition: transform 160ms ease-out, height 160ms ease-out, opacity 120ms ease-out;
141
+ }
142
+
143
+ :root[data-navigation-continuity] [data-navigation-marker-initial]::after {
144
+ transition: none;
145
+ }
146
+
147
+ @media (prefers-reduced-motion: reduce) {
148
+ @view-transition { navigation: none; }
149
+
150
+ :root[data-navigation-continuity][data-navigation-motion-ready] {
151
+ scroll-behavior: auto !important;
152
+ }
153
+
154
+ :root[data-navigation-continuity] .navigation-page-chevron::before,
155
+ :root[data-navigation-continuity] [data-navigation-marker]::after {
156
+ transition: none;
157
+ }
158
+
159
+ ::view-transition-old(*),
160
+ ::view-transition-new(*) {
161
+ animation: none !important;
162
+ }
163
+ }