@abraca/junis 2.84.0 → 2.86.0

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 (178) hide show
  1. package/dist/module.d.mts +17 -2
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +270 -22
  4. package/dist/runtime/assets/css/jun.css +1 -1
  5. package/dist/runtime/components/JunBlobBackdrop.client.vue +1 -1
  6. package/dist/runtime/components/JunCampfirePresence.client.vue +75 -10
  7. package/dist/runtime/components/JunCollectionIntro.d.vue.ts +11 -0
  8. package/dist/runtime/components/JunCollectionIntro.vue +45 -0
  9. package/dist/runtime/components/JunCollectionIntro.vue.d.ts +11 -0
  10. package/dist/runtime/components/JunConfigRow.d.vue.ts +43 -0
  11. package/dist/runtime/components/JunConfigRow.vue +34 -0
  12. package/dist/runtime/components/JunConfigRow.vue.d.ts +43 -0
  13. package/dist/runtime/components/JunFooter.vue +1 -1
  14. package/dist/runtime/components/JunHead.vue +37 -5
  15. package/dist/runtime/components/JunHorizontalTimeline.d.vue.ts +30 -0
  16. package/dist/runtime/components/JunHorizontalTimeline.vue.d.ts +30 -0
  17. package/dist/runtime/components/JunLinksRow.d.vue.ts +16 -1
  18. package/dist/runtime/components/JunLinksRow.vue +17 -7
  19. package/dist/runtime/components/JunLinksRow.vue.d.ts +16 -1
  20. package/dist/runtime/components/JunLogo.vue +10 -45
  21. package/dist/runtime/components/JunMedia.client.d.vue.ts +1 -1
  22. package/dist/runtime/components/JunMedia.client.vue.d.ts +1 -1
  23. package/dist/runtime/components/JunNavigation.vue +21 -4
  24. package/dist/runtime/components/JunNoteLinks.d.vue.ts +6 -0
  25. package/dist/runtime/components/JunNoteLinks.vue +57 -0
  26. package/dist/runtime/components/JunNoteLinks.vue.d.ts +6 -0
  27. package/dist/runtime/components/JunPageHero.d.vue.ts +8 -2
  28. package/dist/runtime/components/JunPageHero.vue +15 -3
  29. package/dist/runtime/components/JunPageHero.vue.d.ts +8 -2
  30. package/dist/runtime/components/JunPatternBackdrop.client.vue +1 -1
  31. package/dist/runtime/components/JunReaders.d.vue.ts +11 -0
  32. package/dist/runtime/components/JunReaders.vue +99 -0
  33. package/dist/runtime/components/JunReaders.vue.d.ts +11 -0
  34. package/dist/runtime/components/JunSearch.client.vue +2 -2
  35. package/dist/runtime/components/JunSectionPresence.client.d.vue.ts +17 -0
  36. package/dist/runtime/components/JunSectionPresence.client.vue +99 -0
  37. package/dist/runtime/components/JunSectionPresence.client.vue.d.ts +17 -0
  38. package/dist/runtime/components/JunShaderBackdrop.client.vue +1 -1
  39. package/dist/runtime/components/JunThreadComposer.d.vue.ts +37 -0
  40. package/dist/runtime/components/JunThreadComposer.vue +54 -0
  41. package/dist/runtime/components/JunThreadComposer.vue.d.ts +37 -0
  42. package/dist/runtime/components/JunTravellersChip.vue +35 -5
  43. package/dist/runtime/components/JunVideoEmbed.client.d.vue.ts +1 -1
  44. package/dist/runtime/components/JunVideoEmbed.client.vue.d.ts +1 -1
  45. package/dist/runtime/components/JunViewControl.d.vue.ts +29 -0
  46. package/dist/runtime/components/JunViewControl.vue +340 -0
  47. package/dist/runtime/components/JunViewControl.vue.d.ts +29 -0
  48. package/dist/runtime/components/JunViewControls.d.vue.ts +27 -0
  49. package/dist/runtime/components/JunViewControls.vue +94 -0
  50. package/dist/runtime/components/JunViewControls.vue.d.ts +27 -0
  51. package/dist/runtime/components/renderers/JunAppsRenderer.vue +45 -4
  52. package/dist/runtime/components/renderers/JunCinemaRenderer.vue +42 -4
  53. package/dist/runtime/components/renderers/JunConfigRenderer.vue +362 -239
  54. package/dist/runtime/components/renderers/JunCourseRenderer.d.vue.ts +10 -0
  55. package/dist/runtime/components/renderers/JunCourseRenderer.vue +229 -0
  56. package/dist/runtime/components/renderers/JunCourseRenderer.vue.d.ts +10 -0
  57. package/dist/runtime/components/renderers/JunCvRenderer.vue +44 -6
  58. package/dist/runtime/components/renderers/JunDeckRenderer.d.vue.ts +9 -0
  59. package/dist/runtime/components/renderers/JunDeckRenderer.vue +370 -0
  60. package/dist/runtime/components/renderers/JunDeckRenderer.vue.d.ts +9 -0
  61. package/dist/runtime/components/renderers/JunEntryRenderer.vue +157 -31
  62. package/dist/runtime/components/renderers/JunFestivalRenderer.vue +42 -5
  63. package/dist/runtime/components/renderers/JunGardenRenderer.d.vue.ts +10 -0
  64. package/dist/runtime/components/renderers/JunGardenRenderer.vue +280 -0
  65. package/dist/runtime/components/renderers/JunGardenRenderer.vue.d.ts +10 -0
  66. package/dist/runtime/components/renderers/JunGuestbookRenderer.vue +96 -14
  67. package/dist/runtime/components/renderers/JunHomeRenderer.vue +31 -132
  68. package/dist/runtime/components/renderers/JunItemRenderer.d.vue.ts +10 -0
  69. package/dist/runtime/components/renderers/JunItemRenderer.vue +398 -0
  70. package/dist/runtime/components/renderers/JunItemRenderer.vue.d.ts +10 -0
  71. package/dist/runtime/components/renderers/JunJournalRenderer.vue +141 -11
  72. package/dist/runtime/components/renderers/JunLibraryRenderer.vue +295 -12
  73. package/dist/runtime/components/renderers/JunLinksRenderer.vue +33 -1
  74. package/dist/runtime/components/renderers/JunLiveRenderer.vue +38 -2
  75. package/dist/runtime/components/renderers/JunMosaicRenderer.vue +3 -2
  76. package/dist/runtime/components/renderers/JunMovieRenderer.vue +32 -5
  77. package/dist/runtime/components/renderers/JunNowRenderer.vue +40 -7
  78. package/dist/runtime/components/renderers/JunPollRenderer.d.vue.ts +9 -0
  79. package/dist/runtime/components/renderers/JunPollRenderer.vue +231 -0
  80. package/dist/runtime/components/renderers/JunPollRenderer.vue.d.ts +9 -0
  81. package/dist/runtime/components/renderers/JunProjectRenderer.vue +74 -18
  82. package/dist/runtime/components/renderers/JunServicesRenderer.vue +40 -2
  83. package/dist/runtime/components/renderers/JunStatsRenderer.vue +37 -50
  84. package/dist/runtime/components/renderers/JunThreadRenderer.d.vue.ts +9 -0
  85. package/dist/runtime/components/renderers/JunThreadRenderer.vue +304 -0
  86. package/dist/runtime/components/renderers/JunThreadRenderer.vue.d.ts +9 -0
  87. package/dist/runtime/components/renderers/JunTrackRenderer.vue +32 -4
  88. package/dist/runtime/components/renderers/JunUsesRenderer.vue +57 -13
  89. package/dist/runtime/components/renderers/JunWallRenderer.vue +60 -5
  90. package/dist/runtime/composables/useJunDeck.d.ts +66 -0
  91. package/dist/runtime/composables/useJunDeck.js +61 -0
  92. package/dist/runtime/composables/useJunDocPage.d.ts +14 -11
  93. package/dist/runtime/composables/useJunDocPage.js +67 -3
  94. package/dist/runtime/composables/useJunFollow.d.ts +65 -9
  95. package/dist/runtime/composables/useJunFollow.js +237 -20
  96. package/dist/runtime/composables/useJunGarden.d.ts +67 -0
  97. package/dist/runtime/composables/useJunGarden.js +92 -0
  98. package/dist/runtime/composables/useJunOptions.d.ts +1 -0
  99. package/dist/runtime/composables/useJunPresence.d.ts +26 -0
  100. package/dist/runtime/composables/useJunPresence.js +9 -2
  101. package/dist/runtime/composables/useJunSections.d.ts +73 -0
  102. package/dist/runtime/composables/useJunSections.js +117 -0
  103. package/dist/runtime/composables/useJunSettings.d.ts +1 -1
  104. package/dist/runtime/composables/useJunSettings.js +5 -1
  105. package/dist/runtime/composables/useJunSiteConfig.d.ts +37 -0
  106. package/dist/runtime/composables/useJunTheme.js +49 -50
  107. package/dist/runtime/composables/useJunViewOptions.d.ts +85 -0
  108. package/dist/runtime/composables/useJunViewOptions.js +63 -0
  109. package/dist/runtime/pages/doc.vue +14 -8
  110. package/dist/runtime/plugins/jun-sw.client.d.ts +2 -0
  111. package/dist/runtime/plugins/jun-sw.client.js +36 -0
  112. package/dist/runtime/server/api/health.get.d.ts +19 -0
  113. package/dist/runtime/server/api/health.get.js +40 -0
  114. package/dist/runtime/server/api/links.get.d.ts +19 -0
  115. package/dist/runtime/server/api/links.get.js +37 -0
  116. package/dist/runtime/server/api/resolve/[...slug].get.d.ts +9 -0
  117. package/dist/runtime/server/api/resolve/[...slug].get.js +5 -0
  118. package/dist/runtime/server/api/stats.get.js +2 -1
  119. package/dist/runtime/server/janitor/junJanitorChores.js +8 -0
  120. package/dist/runtime/server/plugins/jun-bootstrap.js +103 -15
  121. package/dist/runtime/server/plugins/jun-doc-cache.js +42 -4
  122. package/dist/runtime/server/plugins/jun-janitor.js +9 -1
  123. package/dist/runtime/server/plugins/jun-rpc.js +293 -0
  124. package/dist/runtime/server/plugins/jun-watchdog.d.ts +2 -0
  125. package/dist/runtime/server/plugins/jun-watchdog.js +54 -0
  126. package/dist/runtime/server/routes/jun-icon.png.get.d.ts +2 -0
  127. package/dist/runtime/server/routes/jun-icon.png.get.js +25 -0
  128. package/dist/runtime/server/routes/jun-icon.svg.get.d.ts +2 -0
  129. package/dist/runtime/server/routes/jun-icon.svg.get.js +9 -0
  130. package/dist/runtime/server/routes/jun-splash.png.get.d.ts +2 -0
  131. package/dist/runtime/server/routes/jun-splash.png.get.js +37 -0
  132. package/dist/runtime/server/routes/jun-sw.js.get.d.ts +2 -0
  133. package/dist/runtime/server/routes/jun-sw.js.get.js +126 -0
  134. package/dist/runtime/server/routes/manifest.webmanifest.get.d.ts +24 -0
  135. package/dist/runtime/server/routes/manifest.webmanifest.get.js +51 -0
  136. package/dist/runtime/server/routes/sitemap.xml.get.js +2 -0
  137. package/dist/runtime/server/utils/junBoot.d.ts +1 -0
  138. package/dist/runtime/server/utils/junBoot.js +4 -0
  139. package/dist/runtime/server/utils/junBrand.d.ts +4 -0
  140. package/dist/runtime/server/utils/junBrand.js +9 -0
  141. package/dist/runtime/server/utils/junCache.d.ts +17 -0
  142. package/dist/runtime/server/utils/junCache.js +5 -0
  143. package/dist/runtime/server/utils/junIcon.d.ts +44 -0
  144. package/dist/runtime/server/utils/junIcon.js +374 -0
  145. package/dist/runtime/server/utils/junSeedGate.d.ts +68 -0
  146. package/dist/runtime/server/utils/junSeedGate.js +41 -0
  147. package/dist/runtime/types.d.ts +82 -3
  148. package/dist/runtime/utils/junCourse.d.ts +106 -0
  149. package/dist/runtime/utils/junCourse.js +65 -0
  150. package/dist/runtime/utils/junGarden.d.ts +193 -0
  151. package/dist/runtime/utils/junGarden.js +233 -0
  152. package/dist/runtime/utils/junIdentity.d.ts +121 -0
  153. package/dist/runtime/utils/junIdentity.js +115 -0
  154. package/dist/runtime/utils/junMark.d.ts +254 -0
  155. package/dist/runtime/utils/junMark.js +169 -0
  156. package/dist/runtime/utils/junMetaSchemas.js +8 -1
  157. package/dist/runtime/utils/junModeration.d.ts +67 -0
  158. package/dist/runtime/utils/junModeration.js +20 -0
  159. package/dist/runtime/utils/junMotion.d.ts +26 -0
  160. package/dist/runtime/utils/junMotion.js +31 -0
  161. package/dist/runtime/utils/junPeople.d.ts +43 -0
  162. package/dist/runtime/utils/junPeople.js +9 -0
  163. package/dist/runtime/utils/junPoll.d.ts +79 -0
  164. package/dist/runtime/utils/junPoll.js +82 -0
  165. package/dist/runtime/utils/junReadiness.d.ts +131 -0
  166. package/dist/runtime/utils/junReadiness.js +69 -0
  167. package/dist/runtime/utils/junSections.d.ts +115 -0
  168. package/dist/runtime/utils/junSections.js +45 -0
  169. package/dist/runtime/utils/junSlides.d.ts +66 -0
  170. package/dist/runtime/utils/junSlides.js +47 -0
  171. package/dist/runtime/utils/junThread.d.ts +81 -0
  172. package/dist/runtime/utils/junThread.js +75 -0
  173. package/dist/runtime/utils/junViewSpecs.d.ts +671 -0
  174. package/dist/runtime/utils/junViewSpecs.js +534 -0
  175. package/dist/runtime/utils/junViewValues.d.ts +125 -0
  176. package/dist/runtime/utils/junViewValues.js +104 -0
  177. package/dist/types.d.mts +1 -1
  178. package/package.json +5 -1
@@ -10,10 +10,13 @@ import {
10
10
  useJunBackdrop,
11
11
  useJunBackgroundImage,
12
12
  useJunOptions,
13
+ useJunPageType,
13
14
  useJunSiteConfig,
14
15
  useJunStudio,
15
16
  useJunUpload
16
17
  } from "#imports";
18
+ import { JUN_DYNAMIC_SPEC_KEYS, JUN_VIEW_SPECS, junViewSpecFor } from "../../utils/junViewSpecs";
19
+ import { junResolveViewValue, junNextViewObject } from "../../utils/junViewValues";
17
20
  const props = defineProps({
18
21
  docId: { type: String, required: true },
19
22
  docLabel: { type: String, required: false },
@@ -34,6 +37,7 @@ function setText(key, e) {
34
37
  set({ [key]: value || void 0 });
35
38
  }
36
39
  const opts = useJunOptions();
40
+ const { typeIdFor, labelForType } = useJunPageType();
37
41
  const { navigation } = opts;
38
42
  const { choices: backdropChoices, isShader } = useJunBackdrop();
39
43
  const itemModeOptions = [
@@ -491,6 +495,90 @@ const campfireNoPanels = computed(
491
495
  const cardBase = "group flex flex-col items-center justify-center gap-1.5 rounded-lg px-2 py-3 text-center ring-1 transition-all duration-150 select-none w-full disabled:opacity-50 disabled:pointer-events-none";
492
496
  const cardOff = "ring-black/10 dark:ring-white/10 hover:ring-black/25 dark:hover:ring-white/25 hover:bg-black/[0.03] dark:hover:bg-white/[0.04] cursor-pointer";
493
497
  const cardOn = "ring-2 ring-black dark:ring-white bg-black/[0.04] dark:bg-white/[0.06]";
498
+ const typeScaleOptions = [
499
+ { value: "small", label: "Small", icon: "i-lucide-minimize-2", hint: "Denser \u2014 more on a screen" },
500
+ { value: "normal", label: "Normal", icon: "i-lucide-type", hint: "The browser's own size" },
501
+ { value: "large", label: "Large", icon: "i-lucide-maximize-2", hint: "Easier to read across a room" }
502
+ ];
503
+ const densityOptions = [
504
+ { value: "tight", label: "Tight", icon: "i-lucide-align-justify", hint: "Closer lines" },
505
+ { value: "normal", label: "Normal", icon: "i-lucide-align-left", hint: "As written" },
506
+ { value: "airy", label: "Airy", icon: "i-lucide-stretch-vertical", hint: "Generous leading" }
507
+ ];
508
+ const motionOptions = [
509
+ { value: "full", label: "Full", icon: "i-lucide-sparkle", hint: "Everything moves" },
510
+ { value: "reduced", label: "Reduced", icon: "i-lucide-wind", hint: "Fades, no movement" },
511
+ { value: "none", label: "None", icon: "i-lucide-square", hint: "Nothing animates at all" }
512
+ ];
513
+ const typeScale = computed({
514
+ get: () => config.value.typeScale ?? "normal",
515
+ set: (v) => set({ typeScale: v === "normal" ? void 0 : v })
516
+ });
517
+ const density = computed({
518
+ get: () => config.value.density ?? "normal",
519
+ set: (v) => set({ density: v === "normal" ? void 0 : v })
520
+ });
521
+ const motion = computed({
522
+ get: () => config.value.motion ?? "full",
523
+ set: (v) => set({ motion: v === "full" ? void 0 : v })
524
+ });
525
+ const TYPE_ACCENTS = [
526
+ { value: "", label: "Site accent" },
527
+ { value: "#e11d48", label: "Rose" },
528
+ { value: "#f59e0b", label: "Amber" },
529
+ { value: "#10b981", label: "Emerald" },
530
+ { value: "#0ea5e9", label: "Sky" },
531
+ { value: "#8b5cf6", label: "Violet" }
532
+ ];
533
+ function typeAccent(typeKey) {
534
+ const all = config.value.accentByType ?? {};
535
+ return all[typeKey] ?? "";
536
+ }
537
+ function setTypeAccent(typeKey, hex) {
538
+ const all = config.value.accentByType ?? {};
539
+ const next = {};
540
+ for (const [k, v] of Object.entries(all)) if (k !== typeKey && v) next[k] = v;
541
+ if (hex) next[typeKey] = hex;
542
+ set({ accentByType: Object.keys(next).length ? next : void 0 });
543
+ }
544
+ const houseTypes = computed(
545
+ () => Object.keys(JUN_VIEW_SPECS).map((key) => {
546
+ const typeId = typeIdFor(key);
547
+ return typeId ? { key, label: labelForType(typeId) ?? key, options: junViewSpecFor(key) } : null;
548
+ }).filter((t) => !!t).sort((a, b) => a.label.localeCompare(b.label))
549
+ );
550
+ function deployDefaults(typeKey) {
551
+ return (opts.renderers ?? {})[typeKey] ?? {};
552
+ }
553
+ function houseValues(typeKey) {
554
+ const stored = config.value.renderers?.[typeKey] ?? {};
555
+ const deploy = deployDefaults(typeKey);
556
+ const out = {};
557
+ for (const option of junViewSpecFor(typeKey)) {
558
+ out[option.key] = junResolveViewValue(option, stored, deploy);
559
+ }
560
+ return out;
561
+ }
562
+ function houseIsDefault(typeKey) {
563
+ return Object.keys(config.value.renderers?.[typeKey] ?? {}).length === 0;
564
+ }
565
+ function setHouseValue(typeKey, key, value) {
566
+ const option = junViewSpecFor(typeKey).find((o) => o.key === key);
567
+ if (!option) return;
568
+ const current = config.value.renderers?.[typeKey] ?? {};
569
+ const next = junNextViewObject(option, current, deployDefaults(typeKey), value);
570
+ writeHouse(typeKey, next);
571
+ }
572
+ function resetHouseType(typeKey) {
573
+ writeHouse(typeKey, void 0);
574
+ }
575
+ function writeHouse(typeKey, forType) {
576
+ const all = config.value.renderers ?? {};
577
+ const next = {};
578
+ for (const [k, v] of Object.entries(all)) if (k !== typeKey) next[k] = v;
579
+ if (forType && Object.keys(forType).length) next[typeKey] = forType;
580
+ set({ renderers: Object.keys(next).length ? next : void 0 });
581
+ }
494
582
  function shows(id) {
495
583
  return !props.section || props.section === id;
496
584
  }
@@ -550,7 +638,7 @@ function shows(id) {
550
638
  </div>
551
639
  </header>
552
640
 
553
- <div class="grid gap-4 sm:grid-cols-2">
641
+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-2">
554
642
  <UFormField
555
643
  label="Site title"
556
644
  help="Falls back to the page title when empty."
@@ -683,7 +771,7 @@ function shows(id) {
683
771
  </div>
684
772
  </UFormField>
685
773
 
686
- <div class="grid gap-4 sm:grid-cols-2">
774
+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-2">
687
775
  <UFormField
688
776
  label="Shape"
689
777
  help="Ghost drops the panel — border, ring and frosting."
@@ -730,129 +818,87 @@ function shows(id) {
730
818
  </UFormField>
731
819
  </div>
732
820
 
733
- <div class="grid gap-x-8 gap-y-3 pt-1 sm:grid-cols-3">
734
- <div class="flex items-center justify-between gap-3">
735
- <div class="min-w-0">
736
- <p class="text-xs font-medium">
737
- Index chips
738
- </p>
739
- <p class="text-[11px] text-muted">
740
- Little 1–9 numbers
741
- </p>
742
- </div>
821
+ <div class="grid grid-cols-1 gap-x-8 gap-y-3 pt-1 sm:grid-cols-3">
822
+ <JunConfigRow
823
+ label="Index chips"
824
+ hint="Little 1–9 numbers"
825
+ >
743
826
  <USwitch
744
827
  v-model="showIndices"
745
828
  :disabled="!editing"
746
829
  color="neutral"
747
830
  />
748
- </div>
749
- <div class="flex items-center justify-between gap-3">
750
- <div class="min-w-0">
751
- <p class="text-xs font-medium">
752
- Keyboard nav
753
- </p>
754
- <p class="text-[11px] text-muted">
755
- Digits 0–9 jump
756
- </p>
757
- </div>
831
+ </JunConfigRow>
832
+ <JunConfigRow
833
+ label="Keyboard nav"
834
+ hint="Digits 0–9 jump"
835
+ >
758
836
  <USwitch
759
837
  v-model="keyboardNav"
760
838
  :disabled="!editing"
761
839
  color="neutral"
762
840
  />
763
- </div>
764
- <div class="flex items-center justify-between gap-3">
765
- <div class="min-w-0">
766
- <p class="text-xs font-medium">
767
- Freshness dots
768
- </p>
769
- <p class="text-[11px] text-muted">
770
- "Changed since your visit"
771
- </p>
772
- </div>
841
+ </JunConfigRow>
842
+ <JunConfigRow label="Freshness dots">
843
+ <template #hint>
844
+ "Changed since your visit"
845
+ </template>
773
846
  <USwitch
774
847
  v-model="freshnessDots"
775
848
  :disabled="!editing"
776
849
  color="neutral"
777
850
  />
778
- </div>
851
+ </JunConfigRow>
779
852
  </div>
780
- <div class="grid gap-x-8 gap-y-3 sm:grid-cols-3">
781
- <div class="flex items-center justify-between gap-3">
782
- <div class="min-w-0">
783
- <p class="text-xs font-medium">
784
- Auto-hide
785
- </p>
786
- <p class="text-[11px] text-muted">
787
- Slides away going down
788
- </p>
789
- </div>
853
+ <div class="grid grid-cols-1 gap-x-8 gap-y-3 sm:grid-cols-3">
854
+ <JunConfigRow
855
+ label="Auto-hide"
856
+ hint="Slides away going down"
857
+ >
790
858
  <USwitch
791
859
  v-model="navAutoHide"
792
860
  :disabled="!editing"
793
861
  color="neutral"
794
862
  />
795
- </div>
796
- <div class="flex items-center justify-between gap-3">
797
- <div class="min-w-0">
798
- <p class="text-xs font-medium">
799
- Frosted panel
800
- </p>
801
- <p class="text-[11px] text-muted">
802
- Blur behind the bar
803
- </p>
804
- </div>
863
+ </JunConfigRow>
864
+ <JunConfigRow
865
+ label="Frosted panel"
866
+ hint="Blur behind the bar"
867
+ >
805
868
  <USwitch
806
869
  v-model="navBlur"
807
870
  :disabled="!editing"
808
871
  color="neutral"
809
872
  />
810
- </div>
811
- <div class="flex items-center justify-between gap-3">
812
- <div class="min-w-0">
813
- <p class="text-xs font-medium">
814
- Centre active
815
- </p>
816
- <p class="text-[11px] text-muted">
817
- Scrolls it into the middle
818
- </p>
819
- </div>
873
+ </JunConfigRow>
874
+ <JunConfigRow
875
+ label="Centre active"
876
+ hint="Scrolls it into the middle"
877
+ >
820
878
  <USwitch
821
879
  v-model="navCenterActive"
822
880
  :disabled="!editing"
823
881
  color="neutral"
824
882
  />
825
- </div>
826
- <div class="flex items-center justify-between gap-3">
827
- <div class="min-w-0">
828
- <p class="text-xs font-medium">
829
- Show logo
830
- </p>
831
- <p class="text-[11px] text-muted">
832
- The mark in the bar
833
- </p>
834
- </div>
883
+ </JunConfigRow>
884
+ <JunConfigRow
885
+ label="Show logo"
886
+ hint="The mark in the bar"
887
+ >
835
888
  <USwitch
836
889
  v-model="navShowLogo"
837
890
  :disabled="!editing"
838
891
  color="neutral"
839
892
  />
840
- </div>
893
+ </JunConfigRow>
841
894
  <!-- What the mark DOES. Offered next to "Show logo" because the two
842
895
  answer one question between them, and hidden when there is no
843
896
  logo to press or no palette to open. -->
844
- <div
897
+ <JunConfigRow
845
898
  v-if="navShowLogo && opts.features.search"
846
- class="flex items-center justify-between gap-3"
899
+ label="Logo opens"
900
+ hint="What pressing the mark does"
847
901
  >
848
- <div class="min-w-0">
849
- <p class="text-xs font-medium">
850
- Logo opens
851
- </p>
852
- <p class="text-[11px] text-muted">
853
- What pressing the mark does
854
- </p>
855
- </div>
856
902
  <USelect
857
903
  v-model="navLogoAction"
858
904
  :items="[
@@ -863,64 +909,46 @@ function shows(id) {
863
909
  size="xs"
864
910
  class="w-40"
865
911
  />
866
- </div>
912
+ </JunConfigRow>
867
913
  <!-- Switchable because the logo can be the way into search instead.
868
914
  Off never removes search: ⌘K stays bound either way, which is
869
915
  what the hint says so an owner is not left guessing. -->
870
- <div
916
+ <JunConfigRow
871
917
  v-if="opts.features.search"
872
- class="flex items-center justify-between gap-3"
918
+ label="Search button"
919
+ hint="⌘K works either way"
873
920
  >
874
- <div class="min-w-0">
875
- <p class="text-xs font-medium">
876
- Search button
877
- </p>
878
- <p class="text-[11px] text-muted">
879
- ⌘K works either way
880
- </p>
881
- </div>
882
921
  <USwitch
883
922
  v-model="navSearchButton"
884
923
  :disabled="!editing"
885
924
  color="neutral"
886
925
  />
887
- </div>
926
+ </JunConfigRow>
888
927
  <!-- Both off by default. The dots say how many people are here; the
889
928
  roster says who they are and what each is reading — different
890
929
  disclosures, so they are different switches. -->
891
- <div class="flex items-center justify-between gap-3">
892
- <div class="min-w-0">
893
- <p class="text-xs font-medium">
894
- Traveller dots
895
- </p>
896
- <p class="text-[11px] text-muted">
897
- Who else is on the site
898
- </p>
899
- </div>
930
+ <JunConfigRow
931
+ label="Traveller dots"
932
+ hint="Who else is on the site"
933
+ >
900
934
  <USwitch
901
935
  v-model="navTravellers"
902
936
  :disabled="!editing"
903
937
  color="neutral"
904
938
  />
905
- </div>
906
- <div
907
- class="flex items-center justify-between gap-3 transition-opacity"
908
- :class="navTravellers ? '' : 'opacity-50'"
939
+ </JunConfigRow>
940
+ <JunConfigRow
941
+ label="Name them"
942
+ hint="Hover lists each traveller"
943
+ :muted="!navTravellers"
944
+ class="transition-opacity"
909
945
  >
910
- <div class="min-w-0">
911
- <p class="text-xs font-medium">
912
- Name them
913
- </p>
914
- <p class="text-[11px] text-muted">
915
- Hover lists each traveller
916
- </p>
917
- </div>
918
946
  <USwitch
919
947
  v-model="navTravellersList"
920
948
  :disabled="!editing || !navTravellers"
921
949
  color="neutral"
922
950
  />
923
- </div>
951
+ </JunConfigRow>
924
952
  <!-- Presence as LIGHT rather than as a list. Its own switch because
925
953
  it is a different disclosure again: the dots say how many people
926
954
  are here, the roster says who — this says what each of them is
@@ -940,21 +968,16 @@ function shows(id) {
940
968
  color="neutral"
941
969
  />
942
970
  </div>
943
- <div class="flex items-center justify-between gap-3">
944
- <div class="min-w-0">
945
- <p class="text-xs font-medium">
946
- Home item
947
- </p>
948
- <p class="text-[11px] text-muted">
949
- An explicit way home
950
- </p>
951
- </div>
971
+ <JunConfigRow
972
+ label="Home item"
973
+ hint="An explicit way home"
974
+ >
952
975
  <USwitch
953
976
  v-model="navHomeItem"
954
977
  :disabled="!editing"
955
978
  color="neutral"
956
979
  />
957
- </div>
980
+ </JunConfigRow>
958
981
  </div>
959
982
 
960
983
  <p class="text-[11px] text-muted">
@@ -1187,7 +1210,7 @@ function shows(id) {
1187
1210
  </div>
1188
1211
  </UFormField>
1189
1212
 
1190
- <div class="grid gap-4 sm:grid-cols-2">
1213
+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-2">
1191
1214
  <UFormField
1192
1215
  label="Grayscale tint"
1193
1216
  help="The neutral family everything grey is mixed from."
@@ -1237,6 +1260,80 @@ function shows(id) {
1237
1260
  </UFormField>
1238
1261
  </div>
1239
1262
 
1263
+ <div class="grid gap-4 sm:grid-cols-3">
1264
+ <UFormField
1265
+ label="Type scale"
1266
+ help="A root font size, so the spacing scales with the type."
1267
+ >
1268
+ <div class="grid grid-cols-3 gap-2">
1269
+ <button
1270
+ v-for="opt in typeScaleOptions"
1271
+ :key="opt.value"
1272
+ type="button"
1273
+ :disabled="!editing"
1274
+ :title="opt.hint"
1275
+ :class="[cardBase, typeScale === opt.value ? cardOn : cardOff]"
1276
+ :data-jun-type-scale="opt.value"
1277
+ @click="typeScale = opt.value"
1278
+ >
1279
+ <UIcon
1280
+ :name="opt.icon"
1281
+ class="size-4.5 opacity-80"
1282
+ />
1283
+ <span class="text-xs">{{ opt.label }}</span>
1284
+ </button>
1285
+ </div>
1286
+ </UFormField>
1287
+
1288
+ <UFormField
1289
+ label="Density"
1290
+ help="How airy the reading column is — leading and the space between paragraphs."
1291
+ >
1292
+ <div class="grid grid-cols-3 gap-2">
1293
+ <button
1294
+ v-for="opt in densityOptions"
1295
+ :key="opt.value"
1296
+ type="button"
1297
+ :disabled="!editing"
1298
+ :title="opt.hint"
1299
+ :class="[cardBase, density === opt.value ? cardOn : cardOff]"
1300
+ :data-jun-density="opt.value"
1301
+ @click="density = opt.value"
1302
+ >
1303
+ <UIcon
1304
+ :name="opt.icon"
1305
+ class="size-4.5 opacity-80"
1306
+ />
1307
+ <span class="text-xs">{{ opt.label }}</span>
1308
+ </button>
1309
+ </div>
1310
+ </UFormField>
1311
+
1312
+ <UFormField
1313
+ label="Motion"
1314
+ help="A visitor who asked their system for less motion always gets less — this can only take movement away, never add it."
1315
+ >
1316
+ <div class="grid grid-cols-3 gap-2">
1317
+ <button
1318
+ v-for="opt in motionOptions"
1319
+ :key="opt.value"
1320
+ type="button"
1321
+ :disabled="!editing"
1322
+ :title="opt.hint"
1323
+ :class="[cardBase, motion === opt.value ? cardOn : cardOff]"
1324
+ :data-jun-motion-level="opt.value"
1325
+ @click="motion = opt.value"
1326
+ >
1327
+ <UIcon
1328
+ :name="opt.icon"
1329
+ class="size-4.5 opacity-80"
1330
+ />
1331
+ <span class="text-xs">{{ opt.label }}</span>
1332
+ </button>
1333
+ </div>
1334
+ </UFormField>
1335
+ </div>
1336
+
1240
1337
  <UFormField
1241
1338
  label="Surface"
1242
1339
  help="How much of the site is frosted glass. This is the biggest performance control here — a backdrop blur re-reads everything behind it, and this page has one on the navbar, every card and the user center."
@@ -1375,7 +1472,7 @@ function shows(id) {
1375
1472
  <!-- The modifiers only exist once there is something to modify. -->
1376
1473
  <div
1377
1474
  v-if="backgroundSettings.active"
1378
- class="mt-4 grid gap-4 sm:grid-cols-[auto_1fr_auto]"
1475
+ class="mt-4 grid grid-cols-1 gap-4 sm:grid-cols-[auto_1fr_auto]"
1379
1476
  >
1380
1477
  <div>
1381
1478
  <p class="mb-1.5 text-[11px] text-muted">
@@ -1464,7 +1561,7 @@ function shows(id) {
1464
1561
  </header>
1465
1562
 
1466
1563
  <div
1467
- class="grid gap-4 transition-opacity sm:grid-cols-[2fr_1fr]"
1564
+ class="grid grid-cols-1 gap-4 transition-opacity sm:grid-cols-[2fr_1fr]"
1468
1565
  :class="announceEnabled ? '' : 'opacity-50'"
1469
1566
  >
1470
1567
  <UFormField label="Text">
@@ -1525,7 +1622,7 @@ function shows(id) {
1525
1622
  :class="campfireEnabled ? '' : 'pointer-events-none opacity-50'"
1526
1623
  >
1527
1624
  <!-- Name and mark -->
1528
- <div class="grid gap-4 sm:grid-cols-[2fr_1fr]">
1625
+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-[2fr_1fr]">
1529
1626
  <UFormField
1530
1627
  label="Name"
1531
1628
  help="Shown in the panel header and read out by screen readers. Renaming it also drops the two strings that only make sense around a fire."
@@ -1566,52 +1663,37 @@ function shows(id) {
1566
1663
  label="What it offers"
1567
1664
  help="Each panel is a tab. Switch them all off and the pill becomes a read-only presence badge."
1568
1665
  >
1569
- <div class="grid gap-x-8 gap-y-3 sm:grid-cols-3">
1570
- <div class="flex items-center justify-between gap-3">
1571
- <div class="min-w-0">
1572
- <p class="text-xs font-medium">
1573
- Here
1574
- </p>
1575
- <p class="text-[11px] text-muted">
1576
- Who is here
1577
- </p>
1578
- </div>
1666
+ <div class="grid grid-cols-1 gap-x-8 gap-y-3 sm:grid-cols-3">
1667
+ <JunConfigRow
1668
+ label="Here"
1669
+ hint="Who is here"
1670
+ >
1579
1671
  <USwitch
1580
1672
  v-model="campfireRoster"
1581
1673
  :disabled="!editing"
1582
1674
  color="neutral"
1583
1675
  />
1584
- </div>
1585
- <div class="flex items-center justify-between gap-3">
1586
- <div class="min-w-0">
1587
- <p class="text-xs font-medium">
1588
- Chat
1589
- </p>
1590
- <p class="text-[11px] text-muted">
1591
- One shared channel
1592
- </p>
1593
- </div>
1676
+ </JunConfigRow>
1677
+ <JunConfigRow
1678
+ label="Chat"
1679
+ hint="One shared channel"
1680
+ >
1594
1681
  <USwitch
1595
1682
  v-model="campfireChat"
1596
1683
  :disabled="!editing"
1597
1684
  color="neutral"
1598
1685
  />
1599
- </div>
1600
- <div class="flex items-center justify-between gap-3">
1601
- <div class="min-w-0">
1602
- <p class="text-xs font-medium">
1603
- You
1604
- </p>
1605
- <p class="text-[11px] text-muted">
1606
- Their own handle
1607
- </p>
1608
- </div>
1686
+ </JunConfigRow>
1687
+ <JunConfigRow
1688
+ label="You"
1689
+ hint="Their own handle"
1690
+ >
1609
1691
  <USwitch
1610
1692
  v-model="campfireIdentity"
1611
1693
  :disabled="!editing"
1612
1694
  color="neutral"
1613
1695
  />
1614
- </div>
1696
+ </JunConfigRow>
1615
1697
  </div>
1616
1698
  <p
1617
1699
  v-if="campfireNoPanels"
@@ -1625,7 +1707,7 @@ function shows(id) {
1625
1707
  VANISH gives no clue that the numbers underneath survived. -->
1626
1708
  <div
1627
1709
  v-show="campfireChat"
1628
- class="grid gap-4 sm:grid-cols-2"
1710
+ class="grid grid-cols-1 gap-4 sm:grid-cols-2"
1629
1711
  >
1630
1712
  <UFormField
1631
1713
  label="Messages kept on screen"
@@ -1651,53 +1733,38 @@ function shows(id) {
1651
1733
  <!-- Roster detail -->
1652
1734
  <div
1653
1735
  v-show="campfireRoster"
1654
- class="grid gap-x-8 gap-y-3 sm:grid-cols-3"
1736
+ class="grid grid-cols-1 gap-x-8 gap-y-3 sm:grid-cols-3"
1655
1737
  >
1656
- <div class="flex items-center justify-between gap-3">
1657
- <div class="min-w-0">
1658
- <p class="text-xs font-medium">
1659
- Show pages
1660
- </p>
1661
- <p class="text-[11px] text-muted">
1662
- What each person is reading
1663
- </p>
1664
- </div>
1738
+ <JunConfigRow
1739
+ label="Show pages"
1740
+ hint="What each person is reading"
1741
+ >
1665
1742
  <USwitch
1666
1743
  v-model="campfireShowPages"
1667
1744
  :disabled="!editing"
1668
1745
  color="neutral"
1669
1746
  />
1670
- </div>
1671
- <div class="flex items-center justify-between gap-3">
1672
- <div class="min-w-0">
1673
- <p class="text-xs font-medium">
1674
- Follow
1675
- </p>
1676
- <p class="text-[11px] text-muted">
1677
- Tap someone to travel with them
1678
- </p>
1679
- </div>
1747
+ </JunConfigRow>
1748
+ <JunConfigRow
1749
+ label="Follow"
1750
+ hint="Tap someone to travel with them"
1751
+ >
1680
1752
  <USwitch
1681
1753
  v-model="campfireFollow"
1682
1754
  :disabled="!editing"
1683
1755
  color="neutral"
1684
1756
  />
1685
- </div>
1686
- <div class="flex items-center justify-between gap-3">
1687
- <div class="min-w-0">
1688
- <p class="text-xs font-medium">
1689
- Show services
1690
- </p>
1691
- <p class="text-[11px] text-muted">
1692
- Runners and agents, not people
1693
- </p>
1694
- </div>
1757
+ </JunConfigRow>
1758
+ <JunConfigRow
1759
+ label="Show services"
1760
+ hint="Runners and agents, not people"
1761
+ >
1695
1762
  <USwitch
1696
1763
  v-model="campfireShowBots"
1697
1764
  :disabled="!editing"
1698
1765
  color="neutral"
1699
1766
  />
1700
- </div>
1767
+ </JunConfigRow>
1701
1768
  </div>
1702
1769
 
1703
1770
  <UFormField
@@ -1725,24 +1792,18 @@ function shows(id) {
1725
1792
  </UFormField>
1726
1793
 
1727
1794
  <!-- Identity detail -->
1728
- <div
1795
+ <JunConfigRow
1729
1796
  v-show="campfireIdentity"
1730
- class="flex items-center justify-between gap-3 sm:max-w-sm"
1797
+ label="Let visitors rename themselves"
1798
+ hint="Off keeps everyone on their generated handle."
1799
+ class="sm:max-w-sm"
1731
1800
  >
1732
- <div class="min-w-0">
1733
- <p class="text-xs font-medium">
1734
- Let visitors rename themselves
1735
- </p>
1736
- <p class="text-[11px] text-muted">
1737
- Off keeps everyone on their generated handle.
1738
- </p>
1739
- </div>
1740
1801
  <USwitch
1741
1802
  v-model="campfireAllowRename"
1742
1803
  :disabled="!editing"
1743
1804
  color="neutral"
1744
1805
  />
1745
- </div>
1806
+ </JunConfigRow>
1746
1807
 
1747
1808
  <!-- Reactions -->
1748
1809
  <div class="grid items-start gap-4 sm:grid-cols-[1fr_auto]">
@@ -1829,7 +1890,7 @@ function shows(id) {
1829
1890
  </div>
1830
1891
  </UFormField>
1831
1892
 
1832
- <div class="grid gap-4 sm:grid-cols-2">
1893
+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-2">
1833
1894
  <UFormField
1834
1895
  label="Panel size"
1835
1896
  help="Every size clamps to the viewport on a phone."
@@ -1923,6 +1984,83 @@ function shows(id) {
1923
1984
  </section>
1924
1985
 
1925
1986
  <!-- Footer -->
1987
+ <!-- ── Page types ────────────────────────────────────────────────────
1988
+ Generated from the renderers' own specs. Nothing here is written per
1989
+ type: adding an option to `junViewSpecs.ts` gives it a site-wide
1990
+ control here and a per-page control in the page's own panel. -->
1991
+ <section
1992
+ v-if="shows('renderers')"
1993
+ class="space-y-5"
1994
+ :class="bare ? '' : 'jun-card rounded-2xl p-6'"
1995
+ >
1996
+ <header class="flex items-start gap-3">
1997
+ <span class="flex size-9 flex-none items-center justify-center rounded-lg bg-black/5 dark:bg-white/10">
1998
+ <UIcon
1999
+ name="i-lucide-sliders-horizontal"
2000
+ class="size-4.5"
2001
+ />
2002
+ </span>
2003
+ <div>
2004
+ <h2 class="text-sm font-semibold text-highlighted">
2005
+ Page types
2006
+ </h2>
2007
+ <p class="text-xs text-muted">
2008
+ How each kind of page looks by default. Any single page can still
2009
+ disagree — its own panel wins.
2010
+ </p>
2011
+ </div>
2012
+ </header>
2013
+
2014
+ <div class="grid gap-4 sm:grid-cols-2">
2015
+ <div
2016
+ v-for="type in houseTypes"
2017
+ :key="type.key"
2018
+ :data-jun-house-type="type.key"
2019
+ class="rounded-xl bg-black/[0.02] p-3 dark:bg-white/[0.03]"
2020
+ >
2021
+ <p class="mb-2 text-xs font-medium text-highlighted">
2022
+ {{ type.label }}
2023
+ </p>
2024
+ <!-- Not a renderer setting: nothing in a renderer reads it. It is a
2025
+ CSS rule keyed on the page-type attribute each page stamps. -->
2026
+ <div class="mb-3 flex flex-wrap items-center gap-1">
2027
+ <span class="mr-1 text-[11px] text-dimmed">Accent</span>
2028
+ <button
2029
+ v-for="swatch in TYPE_ACCENTS"
2030
+ :key="swatch.value || 'site'"
2031
+ type="button"
2032
+ :disabled="!editing"
2033
+ :title="swatch.label"
2034
+ class="size-5 rounded-full ring-1 transition-all disabled:opacity-50"
2035
+ :class="typeAccent(type.key) === swatch.value ? 'ring-2 ring-black dark:ring-white' : 'ring-black/15 dark:ring-white/20'"
2036
+ :style="swatch.value ? { background: swatch.value } : { background: 'var(--ui-primary)' }"
2037
+ :data-jun-type-accent="`${type.key}:${swatch.value || 'site'}`"
2038
+ @click="setTypeAccent(type.key, swatch.value)"
2039
+ />
2040
+ </div>
2041
+
2042
+ <JunViewControls
2043
+ inline
2044
+ :options="type.options"
2045
+ :values="houseValues(type.key)"
2046
+ :is-default="houseIsDefault(type.key)"
2047
+ title="Site default"
2048
+ reset-label="Clear"
2049
+ @set="(key, value) => setHouseValue(type.key, key, value)"
2050
+ @reset="resetHouseType(type.key)"
2051
+ />
2052
+ </div>
2053
+ </div>
2054
+
2055
+ <p
2056
+ v-if="JUN_DYNAMIC_SPEC_KEYS.length"
2057
+ class="text-[11px] text-dimmed"
2058
+ >
2059
+ {{ JUN_DYNAMIC_SPEC_KEYS.join(", ") }} builds its options from what this
2060
+ site actually has, so it is configured on its own page rather than here.
2061
+ </p>
2062
+ </section>
2063
+
1926
2064
  <section
1927
2065
  v-if="shows('footer')"
1928
2066
  class="space-y-5"
@@ -1996,55 +2134,40 @@ function shows(id) {
1996
2134
  </div>
1997
2135
  </header>
1998
2136
 
1999
- <div class="grid gap-x-8 gap-y-3 sm:grid-cols-3">
2000
- <div class="flex items-center justify-between gap-3">
2001
- <div class="min-w-0">
2002
- <p class="text-xs font-medium">
2003
- Guestbook
2004
- </p>
2005
- <p class="text-[11px] text-muted">
2006
- Visitors can sign
2007
- </p>
2008
- </div>
2137
+ <div class="grid grid-cols-1 gap-x-8 gap-y-3 sm:grid-cols-3">
2138
+ <JunConfigRow
2139
+ label="Guestbook"
2140
+ hint="Visitors can sign"
2141
+ >
2009
2142
  <USwitch
2010
2143
  v-model="guestbookEnabled"
2011
2144
  :disabled="!editing"
2012
2145
  color="neutral"
2013
2146
  />
2014
- </div>
2015
- <div class="flex items-center justify-between gap-3">
2016
- <div class="min-w-0">
2017
- <p class="text-xs font-medium">
2018
- Appreciations
2019
- </p>
2020
- <p class="text-[11px] text-muted">
2021
- The heart on posts
2022
- </p>
2023
- </div>
2147
+ </JunConfigRow>
2148
+ <JunConfigRow
2149
+ label="Appreciations"
2150
+ hint="The heart on posts"
2151
+ >
2024
2152
  <USwitch
2025
2153
  v-model="reactionsEnabled"
2026
2154
  :disabled="!editing"
2027
2155
  color="neutral"
2028
2156
  />
2029
- </div>
2030
- <div class="flex items-center justify-between gap-3">
2031
- <div class="min-w-0">
2032
- <p class="text-xs font-medium">
2033
- Feeds
2034
- </p>
2035
- <p class="text-[11px] text-muted">
2036
- /feed.xml and /feed.json
2037
- </p>
2038
- </div>
2157
+ </JunConfigRow>
2158
+ <JunConfigRow
2159
+ label="Feeds"
2160
+ hint="/feed.xml and /feed.json"
2161
+ >
2039
2162
  <USwitch
2040
2163
  v-model="feedsEnabled"
2041
2164
  :disabled="!editing"
2042
2165
  color="neutral"
2043
2166
  />
2044
- </div>
2167
+ </JunConfigRow>
2045
2168
  </div>
2046
2169
 
2047
- <div class="grid gap-4 sm:grid-cols-2">
2170
+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-2">
2048
2171
  <UFormField
2049
2172
  label="Author name"
2050
2173
  help="Feeds and structured data."