@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
@@ -0,0 +1,534 @@
1
+ export const JUN_DYNAMIC_SPEC_KEYS = ["stats"];
2
+ export const JUN_HOME_SECTIONS = [
3
+ { id: "hero", label: "Hero", icon: "i-lucide-user-round" },
4
+ { id: "latest", label: "Latest writing", icon: "i-lucide-feather" },
5
+ { id: "projects", label: "Projects", icon: "i-lucide-box" },
6
+ { id: "now", label: "Now", icon: "i-lucide-radio" },
7
+ { id: "links", label: "Links", icon: "i-lucide-link" },
8
+ { id: "pages", label: "Pages", icon: "i-lucide-layout-grid" },
9
+ { id: "prose", label: "Page content", icon: "i-lucide-text" }
10
+ ];
11
+ export const JUN_HOME_DEFAULT_SECTIONS = ["hero", "latest", "projects", "pages"];
12
+ const MATURITY_OPTION = {
13
+ key: "maturity",
14
+ kind: "select",
15
+ label: "Maturity",
16
+ icon: "i-lucide-sprout",
17
+ metaKey: "maturity",
18
+ default: "",
19
+ choices: [
20
+ { value: "", label: "Not said" },
21
+ { value: "seedling", label: "Seedling", hint: "Rough, and says so" },
22
+ { value: "budding", label: "Budding", hint: "Taking shape" },
23
+ { value: "evergreen", label: "Evergreen", hint: "Tended, and holds up" }
24
+ ]
25
+ };
26
+ export const JUN_VIEW_SPECS = {
27
+ apps: [
28
+ { key: "columns", kind: "number", label: "Columns", icon: "i-lucide-columns-3", default: 4, min: 2, max: 6 },
29
+ { key: "labels", kind: "toggle", label: "Names under icons", icon: "i-lucide-type", default: true },
30
+ { key: "status", kind: "toggle", label: "Status badges", icon: "i-lucide-badge-check", default: true }
31
+ ],
32
+ cinema: [
33
+ { key: "columns", kind: "number", label: "Posters per row", icon: "i-lucide-columns-3", default: 5, min: 2, max: 6 },
34
+ { key: "ratings", kind: "toggle", label: "Ratings", icon: "i-lucide-star", default: true },
35
+ { key: "years", kind: "toggle", label: "Years", icon: "i-lucide-calendar", default: true }
36
+ ],
37
+ deck: [
38
+ {
39
+ key: "ratio",
40
+ kind: "variant",
41
+ label: "Stage",
42
+ default: "16:9",
43
+ choices: [
44
+ { value: "16:9", label: "Wide", icon: "i-lucide-rectangle-horizontal", hint: "Projectors and screens" },
45
+ { value: "4:3", label: "Classic", icon: "i-lucide-square", hint: "Older rooms, more text" },
46
+ { value: "free", label: "Fill", icon: "i-lucide-maximize", hint: "Whatever the window is" }
47
+ ]
48
+ },
49
+ {
50
+ key: "transition",
51
+ kind: "select",
52
+ label: "Between slides",
53
+ default: "fade",
54
+ choices: [
55
+ { value: "fade", label: "Fade" },
56
+ { value: "slide", label: "Slide" },
57
+ // Never remove this one: a projector at a conference is not the place to
58
+ // discover that a crossfade drops frames.
59
+ { value: "none", label: "Cut", hint: "No animation at all" }
60
+ ]
61
+ },
62
+ {
63
+ key: "accent",
64
+ kind: "color",
65
+ label: "Accent",
66
+ default: "auto",
67
+ choices: [
68
+ { value: "auto", label: "Site accent" },
69
+ { value: "#e11d48", label: "Rose" },
70
+ { value: "#0ea5e9", label: "Sky" },
71
+ { value: "#f59e0b", label: "Amber" }
72
+ ]
73
+ },
74
+ { key: "progress", kind: "toggle", label: "Progress bar", icon: "i-lucide-loader", default: true },
75
+ { key: "numbers", kind: "toggle", label: "Slide numbers", icon: "i-lucide-hash", default: true },
76
+ {
77
+ key: "autoAdvance",
78
+ kind: "range",
79
+ label: "Advance itself (s)",
80
+ icon: "i-lucide-timer",
81
+ // Zero is OFF, and it is the default: a deck that moves on its own while
82
+ // somebody is presenting from it would take the wheel from the speaker.
83
+ default: 0,
84
+ min: 0,
85
+ max: 30,
86
+ step: 5
87
+ }
88
+ ],
89
+ course: [
90
+ { key: "progress", kind: "toggle", label: "Your progress bar", icon: "i-lucide-loader", default: true },
91
+ {
92
+ key: "room",
93
+ kind: "toggle",
94
+ label: "How far others are",
95
+ icon: "i-lucide-users",
96
+ // The figure only a live document can offer. Off is a legitimate choice: a
97
+ // course with three learners reads better without it.
98
+ default: true
99
+ },
100
+ { key: "numbers", kind: "toggle", label: "Step numbers", icon: "i-lucide-hash", default: true }
101
+ ],
102
+ cv: [
103
+ {
104
+ key: "variant",
105
+ kind: "variant",
106
+ label: "Stations",
107
+ default: "timeline",
108
+ choices: [
109
+ { value: "timeline", label: "Timeline", icon: "i-lucide-milestone", hint: "A rail with dots" },
110
+ { value: "list", label: "List", icon: "i-lucide-list", hint: "No rail, tighter" }
111
+ ]
112
+ },
113
+ { key: "icons", kind: "toggle", label: "Icons", icon: "i-lucide-image", default: true },
114
+ { key: "periods", kind: "toggle", label: "Dates and places", icon: "i-lucide-calendar", default: true },
115
+ { key: "descriptions", kind: "toggle", label: "Descriptions", icon: "i-lucide-text", default: true }
116
+ ],
117
+ /**
118
+ * ── The leaf pages ─────────────────────────────────────────────────────────
119
+ *
120
+ * Every collection could be reshaped and nothing a visitor READS could, which
121
+ * was the largest configuration gap in the module: `entry`, `item`, `project`,
122
+ * `movie`, `track` and `now` are the pages somebody lands on and stays on.
123
+ *
124
+ * `entry`'s table of contents is nearly free — the section scan that paints
125
+ * presence in the margin already knows every heading on the page.
126
+ */
127
+ entry: [
128
+ {
129
+ key: "toc",
130
+ kind: "select",
131
+ label: "Contents",
132
+ icon: "i-lucide-list",
133
+ default: "off",
134
+ choices: [
135
+ { value: "off", label: "None" },
136
+ { value: "top", label: "At the top", hint: "Before the prose" },
137
+ { value: "aside", label: "In the margin", hint: "Sticky, wide screens only" }
138
+ ]
139
+ },
140
+ { key: "progress", kind: "toggle", label: "Reading progress", icon: "i-lucide-loader", default: false },
141
+ {
142
+ key: "measure",
143
+ kind: "select",
144
+ label: "Line width",
145
+ icon: "i-lucide-text",
146
+ default: "normal",
147
+ choices: [
148
+ { value: "narrow", label: "Narrow", hint: "About 60 characters" },
149
+ { value: "normal", label: "Normal" },
150
+ { value: "wide", label: "Wide", hint: "For code and tables" }
151
+ ]
152
+ },
153
+ { key: "readingTime", kind: "toggle", label: "Reading time", icon: "i-lucide-timer", default: true },
154
+ { key: "tags", kind: "toggle", label: "Tags", icon: "i-lucide-tag", default: true },
155
+ { key: "neighbours", kind: "toggle", label: "Previous and next", icon: "i-lucide-arrow-left-right", default: true },
156
+ MATURITY_OPTION
157
+ ],
158
+ item: [
159
+ {
160
+ key: "cover",
161
+ kind: "variant",
162
+ label: "Cover",
163
+ default: "poster",
164
+ choices: [
165
+ { value: "poster", label: "Poster", icon: "i-lucide-rectangle-vertical" },
166
+ { value: "square", label: "Square", icon: "i-lucide-square" },
167
+ { value: "wide", label: "Wide", icon: "i-lucide-rectangle-horizontal" },
168
+ { value: "none", label: "None", icon: "i-lucide-minus" }
169
+ ]
170
+ },
171
+ { key: "facts", kind: "toggle", label: "Facts row", icon: "i-lucide-list-tree", default: true },
172
+ { key: "neighbours", kind: "toggle", label: "The rest of the shelf", icon: "i-lucide-arrow-left-right", default: true },
173
+ MATURITY_OPTION,
174
+ {
175
+ key: "measure",
176
+ kind: "select",
177
+ label: "Line width",
178
+ icon: "i-lucide-text",
179
+ default: "normal",
180
+ choices: [
181
+ { value: "narrow", label: "Narrow" },
182
+ { value: "normal", label: "Normal" },
183
+ { value: "wide", label: "Wide" }
184
+ ]
185
+ }
186
+ ],
187
+ movie: [
188
+ { key: "facts", kind: "toggle", label: "Year, director, runtime", icon: "i-lucide-list-tree", default: true },
189
+ { key: "rating", kind: "toggle", label: "Rating", icon: "i-lucide-star", default: true },
190
+ { key: "chapters", kind: "toggle", label: "Chapters", icon: "i-lucide-list-video", default: true },
191
+ {
192
+ key: "lights",
193
+ kind: "toggle",
194
+ label: "Dim the page while playing",
195
+ icon: "i-lucide-lamp",
196
+ // A site showing its own films wants this; one embedding a trailer beside
197
+ // its prose does not, and it was neither optional nor visible before.
198
+ default: true
199
+ }
200
+ ],
201
+ track: [
202
+ { key: "artwork", kind: "toggle", label: "Artwork", icon: "i-lucide-image", default: true },
203
+ { key: "facts", kind: "toggle", label: "Artist, album, length", icon: "i-lucide-list-tree", default: true },
204
+ { key: "upNext", kind: "toggle", label: "The rest of the set", icon: "i-lucide-list-music", default: true }
205
+ ],
206
+ now: [
207
+ {
208
+ key: "dates",
209
+ kind: "variant",
210
+ label: "Timestamp",
211
+ default: "full",
212
+ choices: [
213
+ { value: "full", label: "Full date", icon: "i-lucide-calendar" },
214
+ { value: "relative", label: "Relative", icon: "i-lucide-clock", hint: "\u201C2 days ago\u201D \u2014 for a fast feed" }
215
+ ]
216
+ },
217
+ { key: "chips", kind: "toggle", label: "Place and now-playing", icon: "i-lucide-map-pin", default: true },
218
+ { key: "photos", kind: "toggle", label: "Photographs", icon: "i-lucide-image", default: true }
219
+ ],
220
+ project: [
221
+ { key: "status", kind: "toggle", label: "Status badge", icon: "i-lucide-badge-check", default: true },
222
+ { key: "place", kind: "toggle", label: "Coordinates", icon: "i-lucide-map-pin", default: true },
223
+ // NEW rather than a gate: a project's stack is the thing a reader scans for
224
+ // and nothing rendered `meta.tags` on this page at all.
225
+ { key: "tags", kind: "toggle", label: "Tags", icon: "i-lucide-tag", default: true },
226
+ { key: "shots", kind: "number", label: "Screenshots per row", icon: "i-lucide-columns-3", default: 3, min: 1, max: 4 },
227
+ {
228
+ key: "measure",
229
+ kind: "select",
230
+ label: "Line width",
231
+ icon: "i-lucide-text",
232
+ default: "normal",
233
+ choices: [
234
+ { value: "narrow", label: "Narrow" },
235
+ { value: "normal", label: "Normal" },
236
+ { value: "wide", label: "Wide", hint: "For code and tables" }
237
+ ]
238
+ }
239
+ ],
240
+ festival: [
241
+ { key: "artwork", kind: "toggle", label: "Artwork", icon: "i-lucide-image", default: true },
242
+ { key: "albums", kind: "toggle", label: "Albums", icon: "i-lucide-disc-3", default: true },
243
+ { key: "durations", kind: "toggle", label: "Durations", icon: "i-lucide-clock", default: true }
244
+ ],
245
+ garden: [
246
+ {
247
+ key: "variant",
248
+ kind: "variant",
249
+ label: "Notes",
250
+ default: "notes",
251
+ choices: [
252
+ { value: "notes", label: "List", icon: "i-lucide-list", hint: "What links where, in words" },
253
+ { value: "graph", label: "Graph", icon: "i-lucide-git-fork", hint: "The shape of the garden" },
254
+ { value: "both", label: "Both", icon: "i-lucide-layout-panel-top", hint: "Graph over the list" }
255
+ ]
256
+ },
257
+ {
258
+ key: "sort",
259
+ kind: "select",
260
+ label: "Order",
261
+ icon: "i-lucide-arrow-down-up",
262
+ default: "links",
263
+ choices: [
264
+ { value: "links", label: "Most linked", hint: "What the garden has grown around" },
265
+ { value: "recent", label: "Recently tended" },
266
+ { value: "alpha", label: "By name" }
267
+ ]
268
+ },
269
+ { key: "orphans", kind: "toggle", label: "Orphans", icon: "i-lucide-unlink", default: true },
270
+ { key: "maturity", kind: "toggle", label: "Maturity badges", icon: "i-lucide-sprout", default: true },
271
+ { key: "labels", kind: "toggle", label: "Names in the graph", icon: "i-lucide-type", default: true },
272
+ {
273
+ key: "spread",
274
+ kind: "range",
275
+ label: "How loose the graph sits",
276
+ icon: "i-lucide-move-diagonal",
277
+ default: 10,
278
+ min: 5,
279
+ max: 20,
280
+ step: 1
281
+ }
282
+ ],
283
+ guestbook: [
284
+ {
285
+ key: "variant",
286
+ kind: "variant",
287
+ label: "Signatures",
288
+ default: "stack",
289
+ choices: [
290
+ { value: "stack", label: "Stack", icon: "i-lucide-rows-3", hint: "One column" },
291
+ { value: "wall", label: "Wall", icon: "i-lucide-layout-grid", hint: "Two or three across" }
292
+ ]
293
+ }
294
+ ],
295
+ home: [
296
+ {
297
+ key: "layout",
298
+ kind: "variant",
299
+ label: "Layout",
300
+ metaKey: "homeLayout",
301
+ default: "stack",
302
+ choices: [
303
+ { value: "stack", label: "Stack", icon: "i-lucide-rows-3", hint: "One column, generous" },
304
+ { value: "split", label: "Split", icon: "i-lucide-columns-2", hint: "Hero beside the rest" },
305
+ { value: "magazine", label: "Magazine", icon: "i-lucide-layout-panel-top", hint: "Wide, denser sections" },
306
+ { value: "minimal", label: "Minimal", icon: "i-lucide-minus", hint: "Centred hero, little else" }
307
+ ]
308
+ },
309
+ {
310
+ key: "sections",
311
+ kind: "order",
312
+ label: "Sections",
313
+ metaKey: "homeSections",
314
+ default: JUN_HOME_DEFAULT_SECTIONS,
315
+ choices: JUN_HOME_SECTIONS.map((s) => ({ value: s.id, label: s.label, icon: s.icon }))
316
+ }
317
+ ],
318
+ journal: [
319
+ {
320
+ key: "variant",
321
+ kind: "variant",
322
+ label: "Entries",
323
+ default: "cards",
324
+ choices: [
325
+ { value: "cards", label: "Cards", icon: "i-lucide-layout-grid", hint: "Covers in a grid" },
326
+ { value: "list", label: "Index", icon: "i-lucide-list", hint: "Dated lines, no covers" }
327
+ ]
328
+ },
329
+ {
330
+ key: "featured",
331
+ kind: "toggle",
332
+ // Cards only — see `featured` below.
333
+ label: "Feature the newest (cards)",
334
+ icon: "i-lucide-star",
335
+ default: true
336
+ },
337
+ { key: "columns", kind: "number", label: "Columns", icon: "i-lucide-columns-3", default: 3, min: 1, max: 4 },
338
+ { key: "covers", kind: "toggle", label: "Cover images", icon: "i-lucide-image", default: true },
339
+ { key: "excerpts", kind: "toggle", label: "Excerpts", icon: "i-lucide-text", default: true },
340
+ { key: "tags", kind: "toggle", label: "Tags", icon: "i-lucide-tags", default: true }
341
+ ],
342
+ library: [
343
+ {
344
+ key: "variant",
345
+ kind: "variant",
346
+ label: "Shelves",
347
+ default: "rows",
348
+ choices: [
349
+ { value: "rows", label: "Rows", icon: "i-lucide-rows-3", hint: "One line per book" },
350
+ { value: "grid", label: "Covers", icon: "i-lucide-layout-grid", hint: "Cover-forward grid" },
351
+ { value: "shelf", label: "Shelf", icon: "i-lucide-library", hint: "Spines in a row, as on a shelf" }
352
+ ]
353
+ },
354
+ // "Cover art", not "Covers" — the grid VARIANT is called Covers, and two
355
+ // controls with the same word in one panel is one control too many.
356
+ { key: "covers", kind: "toggle", label: "Cover art", icon: "i-lucide-image", default: true },
357
+ { key: "ratings", kind: "toggle", label: "Ratings", icon: "i-lucide-star", default: true },
358
+ { key: "authors", kind: "toggle", label: "Authors", icon: "i-lucide-user-round", default: true },
359
+ {
360
+ key: "group",
361
+ kind: "select",
362
+ label: "Group by",
363
+ default: "status",
364
+ choices: [
365
+ { value: "status", label: "Reading status" },
366
+ { value: "none", label: "Nothing" }
367
+ ]
368
+ },
369
+ {
370
+ key: "sort",
371
+ kind: "select",
372
+ label: "Order",
373
+ default: "manual",
374
+ choices: [
375
+ { value: "manual", label: "As arranged", hint: "Drag to reorder" },
376
+ { value: "title", label: "Title" },
377
+ { value: "author", label: "Author" },
378
+ { value: "rating", label: "Rating" }
379
+ ]
380
+ }
381
+ ],
382
+ links: [
383
+ {
384
+ key: "variant",
385
+ kind: "variant",
386
+ label: "Items",
387
+ default: "rows",
388
+ choices: [
389
+ { value: "rows", label: "Rows", icon: "i-lucide-rows-3", hint: "One per line" },
390
+ { value: "grid", label: "Grid", icon: "i-lucide-layout-grid", hint: "Two or three per row" }
391
+ ]
392
+ },
393
+ { key: "icons", kind: "toggle", label: "Icons", icon: "i-lucide-image", default: true },
394
+ { key: "descriptions", kind: "toggle", label: "Descriptions", icon: "i-lucide-text", default: true },
395
+ { key: "hosts", kind: "toggle", label: "Hostnames", icon: "i-lucide-globe", default: true },
396
+ { key: "compact", kind: "toggle", label: "Compact rows", icon: "i-lucide-minimize-2", default: false }
397
+ ],
398
+ live: [
399
+ {
400
+ key: "variant",
401
+ kind: "variant",
402
+ label: "Posts",
403
+ default: "timeline",
404
+ choices: [
405
+ { value: "timeline", label: "Timeline", icon: "i-lucide-milestone", hint: "A rail with dots" },
406
+ { value: "plain", label: "Plain", icon: "i-lucide-rows-3", hint: "No rail, tighter" }
407
+ ]
408
+ },
409
+ {
410
+ key: "spacing",
411
+ kind: "select",
412
+ label: "Spacing",
413
+ default: "normal",
414
+ choices: [
415
+ { value: "tight", label: "Tight" },
416
+ { value: "normal", label: "Normal" }
417
+ ]
418
+ }
419
+ ],
420
+ /**
421
+ * A poll's CHOICES are a setting, which is why the `tags` kind exists: a list
422
+ * of short strings is exactly what a tag field is, and the alternative was a
423
+ * bespoke choice editor for one page type.
424
+ *
425
+ * `multiple` and `revote` use `metaKey` — they are BEHAVIOUR the server enforces,
426
+ * and the server reads document meta rather than the display namespace. Same
427
+ * escape hatch the home page's composition uses, for the same reason: where a
428
+ * value lives is a contract, and `junView` is a contract about looks.
429
+ */
430
+ poll: [
431
+ {
432
+ key: "options",
433
+ kind: "tags",
434
+ label: "Choices",
435
+ icon: "i-lucide-list",
436
+ metaKey: "pollOptions",
437
+ default: []
438
+ },
439
+ {
440
+ key: "results",
441
+ kind: "variant",
442
+ label: "Results",
443
+ default: "bars",
444
+ choices: [
445
+ { value: "bars", label: "Bars", icon: "i-lucide-chart-no-axes-column", hint: "Relative to the leader" },
446
+ { value: "counts", label: "Counts", icon: "i-lucide-hash", hint: "Numbers only" },
447
+ { value: "dots", label: "Dots", icon: "i-lucide-circle", hint: "One dot per voter" }
448
+ ]
449
+ },
450
+ {
451
+ key: "reveal",
452
+ kind: "toggle",
453
+ label: "Hide results until you vote",
454
+ icon: "i-lucide-eye-off",
455
+ default: false
456
+ },
457
+ { key: "multiple", kind: "toggle", label: "Pick more than one", icon: "i-lucide-list-checks", metaKey: "pollMultiple", default: false },
458
+ { key: "revote", kind: "toggle", label: "Allow changing a vote", icon: "i-lucide-repeat", metaKey: "pollRevote", default: true }
459
+ ],
460
+ services: [
461
+ { key: "columns", kind: "number", label: "Columns", icon: "i-lucide-columns-3", default: 3, min: 1, max: 4 }
462
+ ],
463
+ thread: [
464
+ {
465
+ key: "order",
466
+ kind: "variant",
467
+ label: "Order",
468
+ default: "oldest",
469
+ choices: [
470
+ { value: "oldest", label: "In order", icon: "i-lucide-arrow-down", hint: "An announcement reads this way" },
471
+ { value: "newest", label: "Newest first", icon: "i-lucide-arrow-up", hint: "A question reads this way" }
472
+ ]
473
+ },
474
+ {
475
+ key: "depth",
476
+ kind: "range",
477
+ label: "How deep replies nest",
478
+ icon: "i-lucide-indent-increase",
479
+ // Past three or four levels a reply on a phone is a column one word wide,
480
+ // so the overflow flattens rather than indenting — it never disappears.
481
+ default: 3,
482
+ min: 1,
483
+ max: 6,
484
+ step: 1
485
+ },
486
+ // Server-enforced, so it lives in document meta rather than the display
487
+ // namespace: a closed thread whose only lock is a missing button is not closed.
488
+ { key: "closed", kind: "toggle", label: "Closed to new posts", icon: "i-lucide-lock", metaKey: "threadClosed", default: false }
489
+ ],
490
+ uses: [
491
+ {
492
+ key: "variant",
493
+ kind: "variant",
494
+ label: "Items",
495
+ default: "rows",
496
+ choices: [
497
+ { value: "rows", label: "Rows", icon: "i-lucide-rows-3", hint: "One per line" },
498
+ { value: "grid", label: "Grid", icon: "i-lucide-layout-grid", hint: "Two or three per row" }
499
+ ]
500
+ },
501
+ { key: "group", kind: "toggle", label: "Group by category", icon: "i-lucide-layout-list", default: true },
502
+ { key: "icons", kind: "toggle", label: "Icons", icon: "i-lucide-image", default: true },
503
+ { key: "descriptions", kind: "toggle", label: "Descriptions", icon: "i-lucide-text", default: true },
504
+ { key: "hosts", kind: "toggle", label: "Hostnames", icon: "i-lucide-globe", default: true },
505
+ { key: "compact", kind: "toggle", label: "Compact rows", icon: "i-lucide-minimize-2", default: false }
506
+ ],
507
+ wall: [
508
+ { key: "columns", kind: "number", label: "Columns", icon: "i-lucide-columns-3", default: 3, min: 1, max: 5 },
509
+ { key: "captions", kind: "toggle", label: "Captions", icon: "i-lucide-text", default: true },
510
+ {
511
+ key: "gap",
512
+ kind: "select",
513
+ label: "Spacing",
514
+ default: "normal",
515
+ choices: [
516
+ { value: "tight", label: "Tight" },
517
+ { value: "normal", label: "Normal" },
518
+ { value: "airy", label: "Airy" }
519
+ ]
520
+ },
521
+ // The wall has always desaturated slightly until hover. It is a house
522
+ // style, not a fact about the photographs, so it is a setting.
523
+ { key: "muted", kind: "toggle", label: "Desaturate until hover", icon: "i-lucide-contrast", default: true }
524
+ ]
525
+ };
526
+ export function junViewSpecFor(typeKey) {
527
+ const own = JUN_VIEW_SPECS[typeKey];
528
+ return own ? [...own, ...JUN_CHROME_OPTIONS] : [...JUN_CHROME_OPTIONS];
529
+ }
530
+ export const JUN_CHROME_OPTIONS = [
531
+ { key: "chromeNav", kind: "toggle", label: "Navbar", icon: "i-lucide-navigation", default: true },
532
+ { key: "chromeFooter", kind: "toggle", label: "Footer", icon: "i-lucide-panel-bottom", default: true },
533
+ { key: "chromeBackdrop", kind: "toggle", label: "Backdrop", icon: "i-lucide-image", default: true }
534
+ ];
@@ -0,0 +1,125 @@
1
+ /**
2
+ * The arithmetic behind `useJunViewOptions` — coercion, three-layer resolution,
3
+ * and the default-clearing write. No Vue, no `#imports`, **no imports at all.**
4
+ *
5
+ * That is the same split `junActivityMath.ts` needed and for the same reason:
6
+ * this is the part worth unit-testing, and the composable around it cannot be
7
+ * loaded outside a Nuxt app. A rule with no test is a rule that rots — and the
8
+ * one most likely to is the last function here, which is what keeps a site's
9
+ * changed default reaching every page that never disagreed with it.
10
+ */
11
+ /**
12
+ * What kind of control an option gets.
13
+ *
14
+ * The first five were enough while every setting was a shape or a count. The rest
15
+ * exist because whole classes of setting could not be expressed at all: a page
16
+ * could not carry an accent, a caption prefix, a set of tags, a speed, or a
17
+ * pointer to another document — so those settings were not offered anywhere,
18
+ * which reads as "the module has no opinion" rather than "there is no control".
19
+ *
20
+ * - `color` — an accent. A ramp token, or a free `#rrggbb`.
21
+ * - `text` — one line. A label, a caption prefix, an empty string means unset.
22
+ * - `tags` — a set of short strings, deduplicated and capped.
23
+ * - `range` — a number with a slider rather than a stepper. Same arithmetic as
24
+ * `number`; the difference is the control, and a density between 0 and 1 is
25
+ * absurd to nudge one step at a time.
26
+ * - `doc` — a document id. Which page a deck presents from, which collection a
27
+ * home section pulls.
28
+ */
29
+ export type JunViewOptionKind = 'variant' | 'toggle' | 'select' | 'number' | 'order' | 'color' | 'text' | 'tags' | 'range' | 'doc';
30
+ export type JunViewValue = string | boolean | number | string[];
31
+ /** How long a `text` value may be, and how many `tags` there may be. */
32
+ export declare const JUN_TEXT_MAX = 120;
33
+ export declare const JUN_TAGS_MAX = 12;
34
+ export interface JunViewChoice {
35
+ value: string;
36
+ label: string;
37
+ icon?: string;
38
+ /** One short line under the label, in the panel. */
39
+ hint?: string;
40
+ }
41
+ export interface JunViewOption {
42
+ key: string;
43
+ kind: JunViewOptionKind;
44
+ label: string;
45
+ icon?: string;
46
+ /**
47
+ * `variant`, `select` and `order` only — a value outside this list is ignored.
48
+ *
49
+ * For `color` it is OPTIONAL and means "these swatches, plus anything else the
50
+ * owner types": a palette is a suggestion, not a permission list, and a site
51
+ * whose brand colour is not on the ramp still has a brand colour.
52
+ */
53
+ choices?: JunViewChoice[];
54
+ /** `number` and `range` only. Values are clamped, never rejected. */
55
+ min?: number;
56
+ max?: number;
57
+ step?: number;
58
+ /** `text` only. Defaults to `JUN_TEXT_MAX`. */
59
+ maxLength?: number;
60
+ /** `text` only, for the control. */
61
+ placeholder?: string;
62
+ /** The value that means "unset". Stored as `undefined`. */
63
+ default: JunViewValue;
64
+ /**
65
+ * Store at `meta.<metaKey>` instead of inside `meta.junView`.
66
+ *
67
+ * The escape hatch for a setting that already exists on live documents. The
68
+ * home page's composition has been `meta.homeLayout` + `meta.homeSections`
69
+ * since before this system existed, and the stats page's tiles are
70
+ * `meta.statsTiles`; moving either into `junView` would discard the
71
+ * composition of every front page anybody has arranged. So the CONTROL is
72
+ * shared and the STORAGE stays where it was.
73
+ */
74
+ metaKey?: string;
75
+ }
76
+ /**
77
+ * One value, validated against its own option. Anything invalid returns
78
+ * `undefined`, which sends the caller to the next layer.
79
+ *
80
+ * An unknown choice is not a choice: a variant written by a NEWER build must
81
+ * fall back to the default rather than render as a blank page, which is the
82
+ * filter the home renderer had for its section ids before this generalised it.
83
+ */
84
+ export declare function junCoerceViewValue(option: JunViewOption, raw: unknown): JunViewValue | undefined;
85
+ /** Where a stored value for this option lives. */
86
+ export declare function junViewStore(option: JunViewOption): 'meta' | 'junView';
87
+ /**
88
+ * The resolved value: the DOCUMENT's own setting, then the SITE's house style,
89
+ * then the renderer's default. Each layer is coerced, so a mistyped site
90
+ * default is skipped rather than rendered.
91
+ */
92
+ export declare function junResolveViewValue(option: JunViewOption, stored: Record<string, unknown>, siteDefaults: Record<string, unknown>, meta?: Record<string, unknown>): JunViewValue;
93
+ /**
94
+ * What the page would show with NOTHING stored — the site's default if it has
95
+ * one, else the renderer's. This is what a write compares against, and the
96
+ * comparison is against the SITE's value rather than the module's on purpose: a
97
+ * site whose house style already IS this value must store nothing either, or
98
+ * changing the house style later would be overridden by every page that had
99
+ * once agreed with it.
100
+ */
101
+ export declare function junViewUnsetValue(option: JunViewOption, siteDefaults: Record<string, unknown>): JunViewValue;
102
+ /**
103
+ * Did the owner CLEAR this, or send something invalid?
104
+ *
105
+ * Both coerce to `undefined`, and the two must not be treated alike. An invalid
106
+ * value has to leave the stored setting alone — a peer on a newer build writing a
107
+ * shape this one cannot read must not wipe it. But for the kinds whose empty state
108
+ * is a legitimate value, emptying the field IS the way an owner unsets it, and
109
+ * treating that as invalid input made the control silently refuse to clear.
110
+ *
111
+ * Found by the test that asserts every kind can be cleared, not by using it.
112
+ */
113
+ export declare function junIsClearedValue(option: JunViewOption, raw: unknown): boolean;
114
+ /** Value equality that works for an `order` list as well as a scalar. */
115
+ export declare function junViewValuesEqual(a: JunViewValue | undefined, b: JunViewValue | undefined): boolean;
116
+ /**
117
+ * The next `junView` object after writing one option — or `undefined`, meaning
118
+ * remove the key entirely.
119
+ *
120
+ * Rebuilt without the key rather than `delete`d out of a copy: an assignment of
121
+ * `undefined` leaves a key that `Object.keys` still counts, so a document that
122
+ * had been reset would keep an empty-looking `junView` forever and never fall
123
+ * back to a changed site default.
124
+ */
125
+ export declare function junNextViewObject(option: JunViewOption, stored: Record<string, unknown>, siteDefaults: Record<string, unknown>, value: JunViewValue): Record<string, unknown> | undefined;