@abraca/junis 2.82.0 → 2.83.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 (39) hide show
  1. package/README.md +19 -14
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +7 -0
  4. package/dist/runtime/assets/css/jun.css +1 -1
  5. package/dist/runtime/components/JunCampfireChat.vue +1 -1
  6. package/dist/runtime/components/JunCampfirePanel.vue +12 -12
  7. package/dist/runtime/components/JunCampfirePresence.client.vue +8 -8
  8. package/dist/runtime/components/JunCampfireRoster.vue +13 -13
  9. package/dist/runtime/components/JunCampfireYou.vue +9 -9
  10. package/dist/runtime/components/JunGlobeEditor.client.vue +396 -183
  11. package/dist/runtime/components/JunGlobeMap.client.vue +1 -0
  12. package/dist/runtime/components/JunHorizontalTimeline.vue +41 -4
  13. package/dist/runtime/components/JunImagePopup.client.vue +1 -1
  14. package/dist/runtime/components/renderers/JunAppsRenderer.vue +5 -5
  15. package/dist/runtime/components/renderers/JunCvRenderer.vue +1 -1
  16. package/dist/runtime/components/renderers/JunEntryRenderer.vue +1 -1
  17. package/dist/runtime/components/renderers/JunGuestbookRenderer.vue +2 -0
  18. package/dist/runtime/components/renderers/JunHomeRenderer.vue +2 -2
  19. package/dist/runtime/components/renderers/JunJournalRenderer.vue +6 -6
  20. package/dist/runtime/components/renderers/JunLiveRenderer.vue +2 -1
  21. package/dist/runtime/components/renderers/JunMovieRenderer.vue +1 -1
  22. package/dist/runtime/components/renderers/JunNowRenderer.vue +39 -0
  23. package/dist/runtime/components/renderers/JunProjectRenderer.vue +2 -2
  24. package/dist/runtime/components/renderers/JunStatsRenderer.vue +15 -2
  25. package/dist/runtime/components/renderers/JunTrackRenderer.vue +44 -0
  26. package/dist/runtime/components/renderers/JunWallRenderer.vue +1 -0
  27. package/dist/runtime/composables/useJunChrome.js +11 -2
  28. package/dist/runtime/composables/useJunTheme.js +9 -0
  29. package/dist/runtime/plugins/jun-fresh-server.client.d.ts +2 -0
  30. package/dist/runtime/plugins/jun-fresh-server.client.js +42 -0
  31. package/dist/runtime/server/janitor/junJanitorChores.d.ts +23 -2
  32. package/dist/runtime/server/janitor/junJanitorChores.js +74 -8
  33. package/dist/runtime/server/janitor/junJanitorMachine.js +16 -2
  34. package/dist/runtime/server/janitor/junJanitorStore.d.ts +35 -1
  35. package/dist/runtime/server/janitor/junJanitorStore.js +62 -4
  36. package/dist/runtime/server/plugins/jun-bootstrap.js +88 -3
  37. package/dist/runtime/server/utils/junVisibility.js +2 -0
  38. package/dist/runtime/utils/junVisibility.js +2 -0
  39. package/package.json +4 -2
@@ -125,11 +125,32 @@ function scrollConnectorIntoView(i) {
125
125
  const el = container.value?.querySelector(`[data-conn="${i}"]`);
126
126
  el?.scrollIntoView({ behavior: "smooth", inline: "center", block: "nearest" });
127
127
  }
128
+ const track = ref(null);
129
+ const expandedH = ref(0);
130
+ let trackRO = null;
131
+ function measureTrack() {
132
+ const el = track.value;
133
+ if (!el) return;
134
+ const h = Math.ceil(el.scrollHeight);
135
+ if (h && h !== expandedH.value) expandedH.value = h;
136
+ }
128
137
  onMounted(() => {
129
138
  window.addEventListener("keydown", onKey);
130
139
  nextTick(() => container.value?.focus?.({ preventScroll: true }));
140
+ nextTick(() => {
141
+ measureTrack();
142
+ if (track.value && typeof ResizeObserver !== "undefined") {
143
+ trackRO = new ResizeObserver(measureTrack);
144
+ trackRO.observe(track.value);
145
+ }
146
+ });
131
147
  });
132
- onBeforeUnmount(() => window.removeEventListener("keydown", onKey));
148
+ onBeforeUnmount(() => {
149
+ window.removeEventListener("keydown", onKey);
150
+ trackRO?.disconnect();
151
+ trackRO = null;
152
+ });
153
+ watch(() => items.value.length, () => void nextTick(measureTrack));
133
154
  watch(() => props.selectedId, (id) => {
134
155
  if (id) scrollIntoView(id);
135
156
  });
@@ -197,6 +218,7 @@ function fmt(s) {
197
218
  <footer
198
219
  class="jun-timeline jun-chrome group/tl pointer-events-auto relative mx-auto w-full max-w-6xl
199
220
  overflow-hidden rounded-t-lg rounded-b-none border-b-0"
221
+ :style="expandedH ? { '--jun-tl-expanded': `${expandedH}px` } : void 0"
200
222
  @pointerleave="hoveredId = null;
201
223
  hoveredConn = null"
202
224
  >
@@ -242,7 +264,10 @@ function fmt(s) {
242
264
  @pointercancel="onPointerUp"
243
265
  @wheel="onWheel"
244
266
  >
245
- <ol class="flex items-end gap-0 px-12 min-w-max pt-8 pb-3 select-none">
267
+ <ol
268
+ ref="track"
269
+ class="flex items-end gap-0 px-12 min-w-max pt-8 pb-3 select-none"
270
+ >
246
271
  <template
247
272
  v-for="(wp, i) in items"
248
273
  :key="wp.id"
@@ -251,6 +276,7 @@ function fmt(s) {
251
276
  <li
252
277
  v-if="i > 0"
253
278
  :data-conn="i"
279
+ :data-jun-anchor="`leg:${wp.id}`"
254
280
  class="jun-connector relative flex flex-col items-center justify-end self-end mb-[14px] mx-1 cursor-pointer"
255
281
  :class="{ 'is-pulsing': pulsingIdx === i }"
256
282
  :style="{ width: connectorWidth(distanceKm(items[i - 1], wp)) + 'px' }"
@@ -289,9 +315,20 @@ function fmt(s) {
289
315
  </div>
290
316
  </li>
291
317
 
292
- <!-- Waypoint orb -->
318
+ <!-- Waypoint orb.
319
+
320
+ `data-jun-anchor` is what lets a peer's pointer land HERE
321
+ rather than at a viewport-normalised guess. `JunPresenceBlobs`
322
+ resolves an explicit anchor first and the enclosing link's
323
+ `href` second — and a timeline waypoint is a `<li>` with a
324
+ click handler, not a link, so without this it falls all the
325
+ way through to the fallback and paints in the wrong place.
326
+ Keyed on the DOCUMENT ID, which every peer agrees on; a DOM
327
+ index would not survive owners seeing affordances visitors
328
+ do not. -->
293
329
  <li
294
330
  :data-id="wp.id"
331
+ :data-jun-anchor="`wp:${wp.id}`"
295
332
  class="jun-waypoint group flex flex-col items-center shrink-0 snap-center
296
333
  cursor-pointer focus-visible:outline-none"
297
334
  :class="posClass(i)"
@@ -359,5 +396,5 @@ function fmt(s) {
359
396
  </template>
360
397
 
361
398
  <style scoped>
362
- .jun-timeline{height:54px;margin-bottom:env(safe-area-inset-bottom);transition:height .3s ease,background-color .3s ease,border-color .3s ease,color .3s ease}.jun-timeline:hover{height:120px}.jun-tl-fade-enter-active{transition:opacity .5s ease}.jun-tl-fade-enter-from{opacity:0}.jun-tl-ctrl{align-items:center;backdrop-filter:blur(6px);border-radius:9999px;display:flex;height:2rem;justify-content:center;opacity:0;position:absolute;top:14px;transition:opacity .3s ease,background-color .2s ease,color .2s ease;width:2rem;z-index:5}.group\/tl:hover .jun-tl-ctrl{opacity:1}.jun-shimmer{animation:jun-shimmer 3s linear infinite;background:linear-gradient(90deg,transparent 0,color-mix(in srgb,var(--shimmer,#fff) 75%,#fff) 50%,transparent 100%);inset:0;position:absolute;transform:translateX(-100%)}.jun-connector:hover .jun-shimmer{animation-duration:1.5s}@keyframes jun-shimmer{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}.jun-connector.is-pulsing{animation:jun-conn-pulse .6s ease}@keyframes jun-conn-pulse{0%{transform:scaleY(1)}50%{filter:brightness(1.4);transform:scaleY(2.2)}to{transform:scaleY(1)}}.jun-orb-ring{background:radial-gradient(circle at center,color-mix(in srgb,var(--c,#e4e4e7) 60%,transparent) 0,transparent 65%);transition:filter .3s ease}.jun-orb-core{background:color-mix(in srgb,var(--c,#e4e4e7) 55%,#fff)}.jun-waypoint.is-selected .jun-orb-core,.jun-waypoint:hover .jun-orb-core{background:var(--c,#fff)}.jun-waypoint.is-selected .jun-orb-ring,.jun-waypoint:hover .jun-orb-ring{filter:brightness(1.4)}.jun-waypoint{transition:opacity .3s ease,filter .3s ease}.jun-waypoint.is-future,.jun-waypoint.is-past{filter:saturate(.7);opacity:.5}.jun-waypoint.is-future:hover,.jun-waypoint.is-past:hover{filter:none;opacity:.9}.jun-waypoint.is-selected{opacity:1}.jun-timeline-scroll::-webkit-scrollbar{display:none}.jun-timeline-scroll{scrollbar-width:none}@media (prefers-reduced-motion:reduce){.jun-connector.is-pulsing,.jun-shimmer{animation:none}}
399
+ .jun-timeline{height:54px;margin-bottom:env(safe-area-inset-bottom);transition:height .3s ease,background-color .3s ease,border-color .3s ease,color .3s ease}.jun-timeline:has(.jun-waypoint:focus),.jun-timeline:hover{height:min(var(--jun-tl-expanded,120px),45vh)}.jun-timeline:has(.jun-waypoint:focus) .jun-timeline-scroll,.jun-timeline:hover .jun-timeline-scroll{overflow-y:auto}.jun-tl-fade-enter-active{transition:opacity .5s ease}.jun-tl-fade-enter-from{opacity:0}.jun-tl-ctrl{align-items:center;backdrop-filter:blur(6px);border-radius:9999px;display:flex;height:2rem;justify-content:center;opacity:0;position:absolute;top:14px;transition:opacity .3s ease,background-color .2s ease,color .2s ease;width:2rem;z-index:5}.group\/tl:hover .jun-tl-ctrl{opacity:1}.jun-shimmer{animation:jun-shimmer 3s linear infinite;background:linear-gradient(90deg,transparent 0,color-mix(in srgb,var(--shimmer,#fff) 75%,#fff) 50%,transparent 100%);inset:0;position:absolute;transform:translateX(-100%)}.jun-connector:hover .jun-shimmer{animation-duration:1.5s}@keyframes jun-shimmer{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}.jun-connector.is-pulsing{animation:jun-conn-pulse .6s ease}@keyframes jun-conn-pulse{0%{transform:scaleY(1)}50%{filter:brightness(1.4);transform:scaleY(2.2)}to{transform:scaleY(1)}}.jun-orb-ring{background:radial-gradient(circle at center,color-mix(in srgb,var(--c,#e4e4e7) 60%,transparent) 0,transparent 65%);transition:filter .3s ease}.jun-orb-core{background:color-mix(in srgb,var(--c,#e4e4e7) 55%,#fff)}.jun-waypoint.is-selected .jun-orb-core,.jun-waypoint:hover .jun-orb-core{background:var(--c,#fff)}.jun-waypoint.is-selected .jun-orb-ring,.jun-waypoint:hover .jun-orb-ring{filter:brightness(1.4)}.jun-waypoint{transition:opacity .3s ease,filter .3s ease}.jun-waypoint.is-future,.jun-waypoint.is-past{filter:saturate(.7);opacity:.5}.jun-waypoint.is-future:hover,.jun-waypoint.is-past:hover{filter:none;opacity:.9}.jun-waypoint.is-selected{opacity:1}.jun-timeline-scroll::-webkit-scrollbar{display:none}.jun-timeline-scroll{scrollbar-width:none}@media (prefers-reduced-motion:reduce){.jun-connector.is-pulsing,.jun-shimmer{animation:none}}
363
400
  </style>
@@ -341,7 +341,7 @@ useEventListener("touchend", () => {
341
341
  @click="dismiss"
342
342
  >
343
343
  <div
344
- class="absolute inset-0 bg-white/85 backdrop-blur-md transition-opacity duration-300 dark:bg-zinc-950/85"
344
+ class="absolute inset-0 bg-neutral-50/85 backdrop-blur-md transition-opacity duration-300 dark:bg-neutral-950/85"
345
345
  :class="backdropOn ? 'opacity-100' : 'opacity-0'"
346
346
  />
347
347
 
@@ -185,30 +185,30 @@ async function onTileFileDrop(item, e) {
185
185
  />
186
186
  <div
187
187
  v-else
188
- class="flex h-[60%] w-[60%] items-center justify-center rounded-xl bg-linear-to-br from-zinc-100 to-zinc-300 shadow-lg shadow-black/20 ring-1 ring-zinc-200 transition-transform duration-300 group-hover:scale-110 sm:rounded-2xl dark:from-zinc-700 dark:to-zinc-900 dark:ring-white/10"
188
+ class="flex h-[60%] w-[60%] items-center justify-center rounded-xl bg-linear-to-br from-neutral-100 to-neutral-300 shadow-lg shadow-black/20 ring-1 ring-neutral-200 transition-transform duration-300 group-hover:scale-110 sm:rounded-2xl dark:from-neutral-700 dark:to-neutral-900 dark:ring-white/10"
189
189
  >
190
190
  <UIcon
191
191
  name="i-lucide-box"
192
- class="size-7 text-zinc-400 sm:size-8 dark:text-zinc-500"
192
+ class="size-7 text-neutral-400 sm:size-8 dark:text-neutral-500"
193
193
  />
194
194
  </div>
195
195
 
196
196
  <span
197
197
  v-if="clickedId === app.id"
198
198
  aria-hidden="true"
199
- class="absolute inset-0 animate-ping rounded-xl ring-2 ring-zinc-900/40 sm:rounded-2xl dark:ring-white/40"
199
+ class="absolute inset-0 animate-ping rounded-xl ring-2 ring-neutral-900/40 sm:rounded-2xl dark:ring-white/40"
200
200
  />
201
201
 
202
202
  <UIcon
203
203
  v-if="app.meta?.location"
204
204
  name="i-lucide-map-pin"
205
- class="absolute bottom-2 left-2 size-4 text-zinc-500 opacity-70 dark:text-zinc-400"
205
+ class="absolute bottom-2 left-2 size-4 text-neutral-500 opacity-70 dark:text-neutral-400"
206
206
  />
207
207
  </div>
208
208
 
209
209
  <div class="mt-2 flex items-center justify-center sm:mt-3">
210
210
  <span
211
- class="inline-block max-w-full truncate rounded-md px-2 py-0.5 text-sm font-semibold text-highlighted transition-all duration-300 group-hover:bg-zinc-900 group-hover:text-white sm:text-base dark:group-hover:bg-zinc-100 dark:group-hover:text-zinc-900"
211
+ class="inline-block max-w-full truncate rounded-md px-2 py-0.5 text-sm font-semibold text-highlighted transition-all duration-300 group-hover:bg-neutral-900 group-hover:text-white sm:text-base dark:group-hover:bg-neutral-100 dark:group-hover:text-neutral-900"
212
212
  >{{ app.label }}</span>
213
213
  </div>
214
214
 
@@ -157,7 +157,7 @@ const {
157
157
  >
158
158
  <div
159
159
  aria-hidden="true"
160
- class="absolute top-5 left-[13px] h-[13px] w-[13px] rounded-full bg-white ring-2 ring-black/25 dark:bg-zinc-900 dark:ring-white/30"
160
+ class="absolute top-5 left-[13px] h-[13px] w-[13px] rounded-full bg-white ring-2 ring-black/25 dark:bg-neutral-900 dark:ring-white/30"
161
161
  />
162
162
 
163
163
  <JunItemMenu
@@ -330,7 +330,7 @@ function removeCover() {
330
330
  <!-- Cover -->
331
331
  <div
332
332
  v-if="meta.coverUrl || meta.coverUploadId"
333
- class="group/cover relative mt-7 cursor-zoom-in overflow-hidden rounded-xl shadow-lg shadow-black/15 ring-1 ring-zinc-200/70 dark:ring-white/10"
333
+ class="group/cover relative mt-7 cursor-zoom-in overflow-hidden rounded-xl shadow-lg shadow-black/15 ring-1 ring-neutral-200/70 dark:ring-white/10"
334
334
  :class="coverDropActive ? 'ring-2 ring-black/40 dark:ring-white/50' : ''"
335
335
  @dragover="onCoverDragOver"
336
336
  @dragleave="coverDropActive = false"
@@ -153,6 +153,7 @@ function deleteSignature(entry) {
153
153
  <ClientOnly>
154
154
  <div
155
155
  v-if="guestbookOpen && myCount < 3"
156
+ data-jun-anchor="guestbook:sign"
156
157
  class="jun-card mb-10 rounded-2xl p-4 sm:p-5"
157
158
  >
158
159
  <div class="mb-3 flex items-center gap-2">
@@ -236,6 +237,7 @@ function deleteSignature(entry) {
236
237
  v-for="(entry, i) in signatures"
237
238
  :key="entry.id"
238
239
  v-motion="junMotion(junStagger(i, { delayMs: 50 }))"
240
+ :data-jun-anchor="`doc:${entry.id}`"
239
241
  >
240
242
  <JunItemMenu
241
243
  :entry="entry"
@@ -418,11 +418,11 @@ const studioOpen = ref(false);
418
418
  />
419
419
  <span
420
420
  v-else
421
- class="flex h-[60%] w-[60%] items-center justify-center rounded-xl bg-linear-to-br from-zinc-100 to-zinc-300 shadow-lg shadow-black/20 ring-1 ring-zinc-200 dark:from-zinc-700 dark:to-zinc-900 dark:ring-white/10"
421
+ class="flex h-[60%] w-[60%] items-center justify-center rounded-xl bg-linear-to-br from-neutral-100 to-neutral-300 shadow-lg shadow-black/20 ring-1 ring-neutral-200 dark:from-neutral-700 dark:to-neutral-900 dark:ring-white/10"
422
422
  >
423
423
  <UIcon
424
424
  name="i-lucide-box"
425
- class="size-6 text-zinc-400 dark:text-zinc-500"
425
+ class="size-6 text-neutral-400 dark:text-neutral-500"
426
426
  />
427
427
  </span>
428
428
  </span>
@@ -199,7 +199,7 @@ function corners(i) {
199
199
  :class="[
200
200
  corners(0),
201
201
  'group relative mb-8 block overflow-hidden',
202
- 'ring-1 ring-zinc-200/70 dark:ring-white/15',
202
+ 'ring-1 ring-neutral-200/70 dark:ring-white/15',
203
203
  'shadow-lg shadow-black/20',
204
204
  'transition-all duration-300 hover:scale-[1.01] hover:shadow-xl',
205
205
  dropTargetId === hero.id ? 'ring-2 ring-black/40 dark:ring-white/50' : '',
@@ -237,11 +237,11 @@ function corners(i) {
237
237
  />
238
238
  <div
239
239
  v-else
240
- class="flex h-full w-full items-center justify-center bg-linear-to-br from-zinc-200 to-zinc-400 dark:from-zinc-800 dark:to-zinc-950"
240
+ class="flex h-full w-full items-center justify-center bg-linear-to-br from-neutral-200 to-neutral-400 dark:from-neutral-800 dark:to-neutral-950"
241
241
  >
242
242
  <UIcon
243
243
  name="i-lucide-feather"
244
- class="size-12 text-zinc-400/60 dark:text-zinc-600/70"
244
+ class="size-12 text-neutral-400/60 dark:text-neutral-600/70"
245
245
  />
246
246
  </div>
247
247
  <div class="absolute inset-0 bg-linear-to-t from-black/70 via-black/10 to-transparent" />
@@ -259,7 +259,7 @@ function corners(i) {
259
259
  </div>
260
260
 
261
261
  <div
262
- class="border-t border-default bg-gradient-to-b from-white/75 to-white/55 px-5 py-6 backdrop-blur-xl sm:px-8 sm:py-8 dark:from-zinc-900/70 dark:to-zinc-900/55"
262
+ class="border-t border-default bg-gradient-to-b from-white/75 to-white/55 px-5 py-6 backdrop-blur-xl sm:px-8 sm:py-8 dark:from-neutral-900/70 dark:to-neutral-900/55"
263
263
  >
264
264
  <!-- Owner: the date edits in place through the same chip
265
265
  vocabulary as the editor's meta header. The wrapper stops the
@@ -361,11 +361,11 @@ function corners(i) {
361
361
  />
362
362
  <div
363
363
  v-else
364
- class="flex h-full w-full items-center justify-center bg-linear-to-br from-zinc-200 to-zinc-300 dark:from-zinc-800 dark:to-zinc-950"
364
+ class="flex h-full w-full items-center justify-center bg-linear-to-br from-neutral-200 to-neutral-300 dark:from-neutral-800 dark:to-neutral-950"
365
365
  >
366
366
  <UIcon
367
367
  name="i-lucide-feather"
368
- class="size-8 text-zinc-400/60 dark:text-zinc-600/70"
368
+ class="size-8 text-neutral-400/60 dark:text-neutral-600/70"
369
369
  />
370
370
  </div>
371
371
  </div>
@@ -465,11 +465,12 @@ function onFeedDrop(e) {
465
465
  v-for="(entry, i) in sorted"
466
466
  :key="entry.id"
467
467
  v-motion="junMotion(junStagger(Math.min(i, 6), { delayMs: 60, durationMs: 450, yPx: 18 }))"
468
+ :data-jun-anchor="`doc:${entry.id}`"
468
469
  class="relative pb-8 pl-12 last:pb-0"
469
470
  >
470
471
  <div
471
472
  aria-hidden="true"
472
- class="absolute top-4 left-[13px] h-[13px] w-[13px] rounded-full bg-white ring-2 ring-black/25 dark:bg-zinc-900 dark:ring-white/30"
473
+ class="absolute top-4 left-[13px] h-[13px] w-[13px] rounded-full bg-white ring-2 ring-black/25 dark:bg-neutral-900 dark:ring-white/30"
473
474
  />
474
475
 
475
476
  <JunItemMenu
@@ -344,7 +344,7 @@ const factLine = computed(
344
344
 
345
345
  <div
346
346
  v-else
347
- class="flex aspect-video w-full items-center justify-center bg-gradient-to-b from-zinc-900 to-black text-white/50"
347
+ class="flex aspect-video w-full items-center justify-center bg-gradient-to-b from-neutral-900 to-black text-white/50"
348
348
  >
349
349
  <div class="text-center">
350
350
  <UIcon
@@ -5,6 +5,7 @@ import {
5
5
  junMotion,
6
6
  useAbracadabra,
7
7
  useChildTree,
8
+ useDocSlugs,
8
9
  useDocTree,
9
10
  useJunBrand,
10
11
  useJunRouting,
@@ -21,6 +22,10 @@ const props = defineProps({
21
22
  });
22
23
  const abra = useAbracadabra();
23
24
  const tree = useChildTree(abra.doc, props.docId);
25
+ const { getDocUrl } = useDocSlugs();
26
+ const otherChildren = computed(
27
+ () => (tree.childrenOf(null) ?? []).filter((e) => !!e.label)
28
+ );
24
29
  const brand = useJunBrand();
25
30
  const { getEntry } = useDocTree();
26
31
  const { editing } = useJunStudio();
@@ -374,6 +379,40 @@ function commitText(field, e) {
374
379
  />
375
380
  </div>
376
381
  </template>
382
+
383
+ <!-- Children, listed rather than dropped. Same shape the movie and track
384
+ renderers use, because these are the same kind of leaf. -->
385
+ <section
386
+ v-if="otherChildren.length"
387
+ class="mt-8"
388
+ >
389
+ <div class="mb-3 flex items-baseline gap-3">
390
+ <h2 class="text-xs font-medium tracking-[0.22em] text-dimmed uppercase">
391
+ More
392
+ </h2>
393
+ <div class="h-px flex-1 bg-black/10 dark:bg-white/10" />
394
+ </div>
395
+ <ul class="flex flex-wrap gap-2">
396
+ <li
397
+ v-for="child in otherChildren"
398
+ :key="child.id"
399
+ >
400
+ <JunItemMenu
401
+ :entry="child"
402
+ :tree="tree"
403
+ >
404
+ <UButton
405
+ :to="getDocUrl(child.id)"
406
+ icon="i-lucide-file-text"
407
+ color="neutral"
408
+ variant="soft"
409
+ size="xs"
410
+ :label="child.label"
411
+ />
412
+ </JunItemMenu>
413
+ </li>
414
+ </ul>
415
+ </section>
377
416
  </article>
378
417
  </template>
379
418
 
@@ -188,11 +188,11 @@ function openShot(index, e) {
188
188
  />
189
189
  <div
190
190
  v-else
191
- class="flex size-20 items-center justify-center rounded-2xl bg-linear-to-br from-zinc-100 to-zinc-300 shadow-lg shadow-black/20 ring-1 ring-zinc-200 sm:size-24 dark:from-zinc-700 dark:to-zinc-900 dark:ring-white/10"
191
+ class="flex size-20 items-center justify-center rounded-2xl bg-linear-to-br from-neutral-100 to-neutral-300 shadow-lg shadow-black/20 ring-1 ring-neutral-200 sm:size-24 dark:from-neutral-700 dark:to-neutral-900 dark:ring-white/10"
192
192
  >
193
193
  <UIcon
194
194
  :name="meta.icon || 'i-lucide-box'"
195
- class="size-9 text-zinc-400 dark:text-zinc-500"
195
+ class="size-9 text-neutral-400 dark:text-neutral-500"
196
196
  />
197
197
  </div>
198
198
 
@@ -270,7 +270,10 @@ const tileMenuItems = computed(() => {
270
270
  @rename-subtitle="renameSubtitle"
271
271
  />
272
272
 
273
- <div class="jun-card mb-6 flex items-center gap-3 rounded-2xl px-5 py-4">
273
+ <div
274
+ data-jun-anchor="stat:summary"
275
+ class="jun-card mb-6 flex items-center gap-3 rounded-2xl px-5 py-4"
276
+ >
274
277
  <span
275
278
  class="relative flex size-2.5 flex-none"
276
279
  aria-hidden="true"
@@ -304,10 +307,16 @@ const tileMenuItems = computed(() => {
304
307
  </div>
305
308
 
306
309
  <div class="grid grid-cols-2 gap-3 sm:grid-cols-4">
310
+ <!-- `stat:` and not `doc:` — a tile is a derived figure, not a document,
311
+ so there is no id to key it on. `tile.key` is stable across peers
312
+ (it comes from the tile definition, not from render order) and the
313
+ owner's `statsTiles` selection only ever changes which tiles are
314
+ present, never what a given one is called. -->
307
315
  <div
308
316
  v-for="(tile, i) in tiles"
309
317
  :key="tile.key"
310
318
  v-motion="junMotion(junStagger(i, { delayMs: 40 }))"
319
+ :data-jun-anchor="`stat:${tile.key}`"
311
320
  class="jun-card rounded-2xl p-4"
312
321
  >
313
322
  <UIcon
@@ -331,7 +340,10 @@ const tileMenuItems = computed(() => {
331
340
  </div>
332
341
 
333
342
  <!-- Activity. Server-only and a HISTORY: the tree cannot answer it. -->
334
- <div class="jun-card mt-3 rounded-2xl p-5">
343
+ <div
344
+ data-jun-anchor="stat:activity"
345
+ class="jun-card mt-3 rounded-2xl p-5"
346
+ >
335
347
  <div class="mb-3 flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1">
336
348
  <p class="text-[11px] tracking-wider text-dimmed uppercase">
337
349
  Activity · last 30 days
@@ -406,6 +418,7 @@ const tileMenuItems = computed(() => {
406
418
  <!-- What the site is MADE of. Live: the tree can answer this one. -->
407
419
  <div
408
420
  v-if="typeBreakdown.length > 1"
421
+ data-jun-anchor="stat:by-type"
409
422
  class="jun-card mt-3 rounded-2xl p-5"
410
423
  >
411
424
  <p class="mb-3 text-[11px] tracking-wider text-dimmed uppercase">
@@ -26,6 +26,9 @@ const abra = useAbracadabra();
26
26
  const tree = useChildTree(abra.doc, props.docId);
27
27
  const { entries, getEntry } = useDocTree();
28
28
  const { getDocUrl } = useDocSlugs();
29
+ const otherChildren = computed(
30
+ () => (tree.childrenOf(null) ?? []).filter((e) => !!e.label)
31
+ );
29
32
  const { editing } = useJunStudio();
30
33
  const { renameDoc } = useJunRename();
31
34
  const { uploadTo, imageFiles } = useJunUpload();
@@ -357,6 +360,47 @@ const factLine = computed(
357
360
  </ul>
358
361
  </section>
359
362
 
363
+ <!-- Children, listed rather than dropped.
364
+
365
+ This renderer read none of them. Every other renderer in the module
366
+ tolerates a child created under a different page type — "never silently
367
+ drop a child" is what makes `Page type ▸` a safe context-menu item
368
+ rather than a data-loss button — and a track was the one page where
369
+ converting a document with children made them invisible. Same shape the
370
+ movie renderer uses, because a track and a film are the same kind of
371
+ leaf. -->
372
+ <section
373
+ v-if="otherChildren.length"
374
+ class="mt-8"
375
+ >
376
+ <div class="mb-3 flex items-baseline gap-3">
377
+ <h2 class="text-xs font-medium tracking-[0.22em] text-dimmed uppercase">
378
+ More
379
+ </h2>
380
+ <div class="h-px flex-1 bg-black/10 dark:bg-white/10" />
381
+ </div>
382
+ <ul class="flex flex-wrap gap-2">
383
+ <li
384
+ v-for="child in otherChildren"
385
+ :key="child.id"
386
+ >
387
+ <JunItemMenu
388
+ :entry="child"
389
+ :tree="tree"
390
+ >
391
+ <UButton
392
+ :to="getDocUrl(child.id)"
393
+ icon="i-lucide-file-text"
394
+ color="neutral"
395
+ variant="soft"
396
+ size="xs"
397
+ :label="child.label"
398
+ />
399
+ </JunItemMenu>
400
+ </li>
401
+ </ul>
402
+ </section>
403
+
360
404
  <hr class="my-8 border-default">
361
405
 
362
406
  <div class="jun-track-body">
@@ -196,6 +196,7 @@ function commitCaption(p, e) {
196
196
  v-for="(p, i) in orderedItems"
197
197
  :key="p.id"
198
198
  v-motion="junMotion(junStagger(Math.min(i, 8), { delayMs: 50 }))"
199
+ :data-jun-anchor="`doc:${p.id}`"
199
200
  class="mb-3 break-inside-avoid sm:mb-4"
200
201
  :data-dnd-id="p.id"
201
202
  :draggable="editing ? true : void 0"
@@ -13,6 +13,9 @@ const ALIGN = ["x-left", "x-right", "y-top", "y-bottom"];
13
13
  const SETTLE_MS = 260;
14
14
  const GAP = 16;
15
15
  const PLAYER_SIDE_ROOM = 220;
16
+ const SHARE_RADIUS_MIN = 4;
17
+ let radiusMax = 0;
18
+ let radiusFor = null;
16
19
  const published = {
17
20
  edges: { "top": 0, "bottom": 0, "left-top": 0, "left-bottom": 0, "right-top": 0, "right-bottom": 0 },
18
21
  align: { "x-left": GAP, "x-right": GAP, "y-top": GAP, "y-bottom": GAP },
@@ -64,8 +67,14 @@ function measure() {
64
67
  else out.align["y-top"] = Math.max(GAP, r.top);
65
68
  }
66
69
  if (!docked) {
67
- const rad = getComputedStyle(nav).borderTopLeftRadius;
68
- if (rad && Number.parseFloat(rad) > 0) out.radius = rad;
70
+ const px = Number.parseFloat(getComputedStyle(nav).borderTopLeftRadius);
71
+ const round = Number.isFinite(px) ? Math.round(px) : 0;
72
+ if (placement !== radiusFor) {
73
+ radiusFor = placement;
74
+ radiusMax = 0;
75
+ }
76
+ if (round > radiusMax) radiusMax = round;
77
+ out.radius = radiusMax >= SHARE_RADIUS_MIN ? `${radiusMax}px` : null;
69
78
  }
70
79
  }
71
80
  }
@@ -84,6 +84,13 @@ function sunVars(hex, orb) {
84
84
  `--jun-sun-glow:${hex}`
85
85
  ];
86
86
  }
87
+ function emberVars(hex) {
88
+ if (!hex) return [];
89
+ return [
90
+ `--jun-ember:${hex}`,
91
+ `--jun-ember-glow:${shade(hex, 0.12)}`
92
+ ];
93
+ }
87
94
  export function junFontClass(cfg) {
88
95
  const font = cfg.themeFont;
89
96
  const surface = cfg.themeSurface ?? "soft";
@@ -107,6 +114,8 @@ export function junThemeCss(cfg) {
107
114
  if (darkHex) dark.push(`--ui-primary:${darkHex}`);
108
115
  root.push(...sunVars(lightHex, customLight ? void 0 : preset?.orb?.light));
109
116
  dark.push(...sunVars(darkHex, customDark ? void 0 : preset?.orb?.dark));
117
+ root.push(...emberVars(lightHex));
118
+ dark.push(...emberVars(darkHex));
110
119
  const neutral = cfg.themeNeutral ?? "stone";
111
120
  const ramp = NEUTRAL[neutral] ?? NEUTRAL.stone;
112
121
  ramp.forEach((hex, i) => {
@@ -0,0 +1,2 @@
1
+ declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
2
+ export default _default;
@@ -0,0 +1,42 @@
1
+ import { dropCachesIfServerReplaced } from "@abraca/dabra";
2
+ import { defineNuxtPlugin, useRuntimeConfig } from "#imports";
3
+ export default defineNuxtPlugin({
4
+ name: "jun:fresh-server",
5
+ enforce: "pre",
6
+ async setup() {
7
+ if (import.meta.server) return;
8
+ const config = useRuntimeConfig().public;
9
+ const url = config.abracadabra?.url ?? config.jun?.serverUrl;
10
+ if (!url) return;
11
+ let origin;
12
+ let host;
13
+ try {
14
+ const parsed = new URL(url, window.location.origin);
15
+ origin = parsed.origin;
16
+ host = parsed.host;
17
+ } catch {
18
+ return;
19
+ }
20
+ try {
21
+ const controller = new AbortController();
22
+ const timer = setTimeout(() => controller.abort(), 4e3);
23
+ const info = await fetch(`${origin}/info`, { signal: controller.signal }).finally(() => clearTimeout(timer));
24
+ if (!info.ok) return;
25
+ const serverId = (await info.json())?.server_id;
26
+ if (typeof serverId !== "string" || !serverId) return;
27
+ const outcome = await dropCachesIfServerReplaced(host, serverId);
28
+ if (!outcome) return;
29
+ const moved = `${outcome.previousServerId?.slice(0, 8)} \u2192 ${serverId.slice(0, 8)}`;
30
+ if (outcome.blocked.length) {
31
+ console.warn(
32
+ `[jun] ${origin} has a new database (${moved}), but ${outcome.blocked.length} cache(s) could not be cleared \u2014 something already had them open, so this tab may re-push a tree that no longer exists. Reload it. Blocked: ${outcome.blocked.join(", ")}`
33
+ );
34
+ } else {
35
+ console.info(
36
+ `[jun] ${origin} has a new database (${moved}); cleared ${outcome.cleared.length} local cache(s) so this tab does not re-push a tree that no longer exists.`
37
+ );
38
+ }
39
+ } catch {
40
+ }
41
+ }
42
+ });
@@ -68,6 +68,13 @@ export type JunChore = (ChoreBase & {
68
68
  kind: 'entry.rename';
69
69
  from: string;
70
70
  to: string;
71
+ }) | (ChoreBase & {
72
+ kind: 'entry.type';
73
+ from: string;
74
+ to: string;
75
+ }) | (ChoreBase & {
76
+ kind: 'entry.move';
77
+ parentId: string | null;
71
78
  }) | (ChoreBase & {
72
79
  kind: 'entry.reorder';
73
80
  order: number;
@@ -100,8 +107,22 @@ export interface JunChorePolicy {
100
107
  backspaceLimit: number;
101
108
  /** Above this, a body edit is not a tidy-up — it collapses to one flat cut. */
102
109
  wholesaleLimit: number;
103
- /** Meta keys the janitor considers part of the page. Everything else is none of its business. */
104
- metaKeys: readonly string[];
110
+ /**
111
+ * Meta keys the janitor must NOT touch. Everything else on a page is content,
112
+ * and content is its business.
113
+ *
114
+ * This is a DENYLIST, and it used to be an allowlist of seven keys
115
+ * (`excerpt`, `icon`, `tags`, `accent`, `description`, `status`, `url`). That
116
+ * was wrong in a way nothing caught: the renderers read **56** distinct meta
117
+ * keys, so a visitor could rewrite `nowPlaying` on a `now` page, `location`
118
+ * on a live entry, an `author`, a `rating`, a `category`, a `place` — any of
119
+ * the forty-nine the list did not name — and the janitor walked straight
120
+ * past it. A custom page type, whose fields are unknowable in advance, was
121
+ * invisible to it ENTIRELY. An allowlist cannot express "put everything
122
+ * back"; only a denylist can, and only a denylist keeps working when a new
123
+ * page type invents a field.
124
+ */
125
+ metaIgnore: readonly string[];
105
126
  /** Never touch these documents, whatever the baseline says. */
106
127
  ignoreDocIds: readonly string[];
107
128
  /** Never remove a document that has at least this many children. */