@abraca/junis 2.85.0 → 2.87.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.
- package/dist/module.d.mts +17 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +253 -21
- package/dist/runtime/assets/css/jun.css +1 -1
- package/dist/runtime/components/JunCampfirePresence.client.vue +75 -10
- package/dist/runtime/components/JunCollectionIntro.d.vue.ts +11 -0
- package/dist/runtime/components/JunCollectionIntro.vue +45 -0
- package/dist/runtime/components/JunCollectionIntro.vue.d.ts +11 -0
- package/dist/runtime/components/JunConfigRow.d.vue.ts +43 -0
- package/dist/runtime/components/JunConfigRow.vue +34 -0
- package/dist/runtime/components/JunConfigRow.vue.d.ts +43 -0
- package/dist/runtime/components/JunDocSurface.vue +3 -0
- package/dist/runtime/components/JunFooter.vue +1 -1
- package/dist/runtime/components/JunHorizontalTimeline.d.vue.ts +30 -0
- package/dist/runtime/components/JunHorizontalTimeline.vue.d.ts +30 -0
- package/dist/runtime/components/JunLinksRow.d.vue.ts +16 -1
- package/dist/runtime/components/JunLinksRow.vue +17 -7
- package/dist/runtime/components/JunLinksRow.vue.d.ts +16 -1
- package/dist/runtime/components/JunMedia.client.d.vue.ts +1 -1
- package/dist/runtime/components/JunMedia.client.vue.d.ts +1 -1
- package/dist/runtime/components/JunNavigation.vue +21 -4
- package/dist/runtime/components/JunNoteLinks.d.vue.ts +6 -0
- package/dist/runtime/components/JunNoteLinks.vue +57 -0
- package/dist/runtime/components/JunNoteLinks.vue.d.ts +6 -0
- package/dist/runtime/components/JunPageHero.d.vue.ts +8 -2
- package/dist/runtime/components/JunPageHero.vue +15 -3
- package/dist/runtime/components/JunPageHero.vue.d.ts +8 -2
- package/dist/runtime/components/JunReaders.d.vue.ts +11 -0
- package/dist/runtime/components/JunReaders.vue +99 -0
- package/dist/runtime/components/JunReaders.vue.d.ts +11 -0
- package/dist/runtime/components/JunSearch.client.vue +2 -2
- package/dist/runtime/components/JunSectionPresence.d.vue.ts +17 -0
- package/dist/runtime/components/JunSectionPresence.vue +99 -0
- package/dist/runtime/components/JunSectionPresence.vue.d.ts +17 -0
- package/dist/runtime/components/JunThreadComposer.d.vue.ts +37 -0
- package/dist/runtime/components/JunThreadComposer.vue +54 -0
- package/dist/runtime/components/JunThreadComposer.vue.d.ts +37 -0
- package/dist/runtime/components/JunTravellersChip.vue +35 -5
- package/dist/runtime/components/JunVideoEmbed.client.d.vue.ts +1 -1
- package/dist/runtime/components/JunVideoEmbed.client.vue.d.ts +1 -1
- package/dist/runtime/components/JunViewControl.d.vue.ts +29 -0
- package/dist/runtime/components/JunViewControl.vue +340 -0
- package/dist/runtime/components/JunViewControl.vue.d.ts +29 -0
- package/dist/runtime/components/JunViewControls.d.vue.ts +27 -0
- package/dist/runtime/components/JunViewControls.vue +94 -0
- package/dist/runtime/components/JunViewControls.vue.d.ts +27 -0
- package/dist/runtime/components/renderers/JunAppsRenderer.vue +45 -4
- package/dist/runtime/components/renderers/JunCinemaRenderer.vue +42 -4
- package/dist/runtime/components/renderers/JunConfigRenderer.vue +348 -225
- package/dist/runtime/components/renderers/JunCourseRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunCourseRenderer.vue +229 -0
- package/dist/runtime/components/renderers/JunCourseRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunCvRenderer.vue +44 -6
- package/dist/runtime/components/renderers/JunDeckRenderer.d.vue.ts +9 -0
- package/dist/runtime/components/renderers/JunDeckRenderer.vue +370 -0
- package/dist/runtime/components/renderers/JunDeckRenderer.vue.d.ts +9 -0
- package/dist/runtime/components/renderers/JunEntryRenderer.vue +151 -23
- package/dist/runtime/components/renderers/JunFestivalRenderer.vue +41 -4
- package/dist/runtime/components/renderers/JunGardenRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunGardenRenderer.vue +280 -0
- package/dist/runtime/components/renderers/JunGardenRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunGlobeRenderer.vue +43 -26
- package/dist/runtime/components/renderers/JunGuestbookRenderer.vue +96 -14
- package/dist/runtime/components/renderers/JunHomeRenderer.vue +28 -129
- package/dist/runtime/components/renderers/JunItemRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunItemRenderer.vue +398 -0
- package/dist/runtime/components/renderers/JunItemRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunJournalRenderer.vue +141 -11
- package/dist/runtime/components/renderers/JunLibraryRenderer.vue +295 -12
- package/dist/runtime/components/renderers/JunLinksRenderer.vue +33 -1
- package/dist/runtime/components/renderers/JunLiveRenderer.vue +37 -1
- package/dist/runtime/components/renderers/JunMosaicRenderer.vue +3 -2
- package/dist/runtime/components/renderers/JunMovieRenderer.vue +32 -5
- package/dist/runtime/components/renderers/JunNowRenderer.vue +38 -5
- package/dist/runtime/components/renderers/JunPollRenderer.d.vue.ts +9 -0
- package/dist/runtime/components/renderers/JunPollRenderer.vue +231 -0
- package/dist/runtime/components/renderers/JunPollRenderer.vue.d.ts +9 -0
- package/dist/runtime/components/renderers/JunProjectRenderer.vue +74 -18
- package/dist/runtime/components/renderers/JunServicesRenderer.vue +40 -2
- package/dist/runtime/components/renderers/JunStatsRenderer.vue +37 -50
- package/dist/runtime/components/renderers/JunThreadRenderer.d.vue.ts +9 -0
- package/dist/runtime/components/renderers/JunThreadRenderer.vue +304 -0
- package/dist/runtime/components/renderers/JunThreadRenderer.vue.d.ts +9 -0
- package/dist/runtime/components/renderers/JunTrackRenderer.vue +32 -4
- package/dist/runtime/components/renderers/JunUsesRenderer.vue +51 -5
- package/dist/runtime/components/renderers/JunWallRenderer.vue +60 -5
- package/dist/runtime/composables/useJunDeck.d.ts +66 -0
- package/dist/runtime/composables/useJunDeck.js +61 -0
- package/dist/runtime/composables/useJunDocPage.d.ts +14 -11
- package/dist/runtime/composables/useJunDocPage.js +67 -3
- package/dist/runtime/composables/useJunFollow.d.ts +65 -9
- package/dist/runtime/composables/useJunFollow.js +237 -20
- package/dist/runtime/composables/useJunGarden.d.ts +67 -0
- package/dist/runtime/composables/useJunGarden.js +92 -0
- package/dist/runtime/composables/useJunPresence.d.ts +26 -0
- package/dist/runtime/composables/useJunPresence.js +9 -2
- package/dist/runtime/composables/useJunSections.d.ts +73 -0
- package/dist/runtime/composables/useJunSections.js +117 -0
- package/dist/runtime/composables/useJunSettings.d.ts +1 -1
- package/dist/runtime/composables/useJunSettings.js +5 -1
- package/dist/runtime/composables/useJunSiteConfig.d.ts +37 -0
- package/dist/runtime/composables/useJunTheme.js +40 -2
- package/dist/runtime/composables/useJunViewOptions.d.ts +85 -0
- package/dist/runtime/composables/useJunViewOptions.js +63 -0
- package/dist/runtime/pages/doc.vue +52 -42
- package/dist/runtime/pages/index.vue +61 -35
- package/dist/runtime/plugins/jun-doc-tree.d.ts +2 -0
- package/dist/runtime/plugins/jun-doc-tree.js +26 -0
- package/dist/runtime/server/api/health.get.d.ts +19 -0
- package/dist/runtime/server/api/health.get.js +40 -0
- package/dist/runtime/server/api/links.get.d.ts +19 -0
- package/dist/runtime/server/api/links.get.js +37 -0
- package/dist/runtime/server/api/resolve/[...slug].get.d.ts +9 -0
- package/dist/runtime/server/api/resolve/[...slug].get.js +7 -2
- package/dist/runtime/server/api/stats.get.js +2 -1
- package/dist/runtime/server/api/tree.get.d.ts +9 -0
- package/dist/runtime/server/api/tree.get.js +23 -0
- package/dist/runtime/server/janitor/junJanitorActor.d.ts +13 -0
- package/dist/runtime/server/janitor/junJanitorActor.js +36 -5
- package/dist/runtime/server/janitor/junJanitorChores.js +8 -0
- package/dist/runtime/server/plugins/jun-bootstrap.js +103 -15
- package/dist/runtime/server/plugins/jun-doc-cache.js +42 -4
- package/dist/runtime/server/plugins/jun-janitor.js +7 -0
- package/dist/runtime/server/plugins/jun-rpc.js +293 -0
- package/dist/runtime/server/plugins/jun-watchdog.d.ts +2 -0
- package/dist/runtime/server/plugins/jun-watchdog.js +54 -0
- package/dist/runtime/server/routes/sitemap.xml.get.js +2 -0
- package/dist/runtime/server/utils/junBoot.d.ts +1 -0
- package/dist/runtime/server/utils/junBoot.js +4 -0
- package/dist/runtime/server/utils/junCache.d.ts +17 -0
- package/dist/runtime/server/utils/junCache.js +5 -0
- package/dist/runtime/server/utils/junSeedGate.d.ts +68 -0
- package/dist/runtime/server/utils/junSeedGate.js +41 -0
- package/dist/runtime/types.d.ts +57 -1
- package/dist/runtime/utils/junCourse.d.ts +106 -0
- package/dist/runtime/utils/junCourse.js +65 -0
- package/dist/runtime/utils/junGarden.d.ts +193 -0
- package/dist/runtime/utils/junGarden.js +233 -0
- package/dist/runtime/utils/junMetaSchemas.js +8 -1
- package/dist/runtime/utils/junModeration.d.ts +67 -0
- package/dist/runtime/utils/junModeration.js +20 -0
- package/dist/runtime/utils/junMotion.d.ts +26 -0
- package/dist/runtime/utils/junMotion.js +31 -0
- package/dist/runtime/utils/junPeople.d.ts +43 -0
- package/dist/runtime/utils/junPeople.js +9 -0
- package/dist/runtime/utils/junPoll.d.ts +79 -0
- package/dist/runtime/utils/junPoll.js +82 -0
- package/dist/runtime/utils/junReadiness.d.ts +131 -0
- package/dist/runtime/utils/junReadiness.js +69 -0
- package/dist/runtime/utils/junSections.d.ts +115 -0
- package/dist/runtime/utils/junSections.js +45 -0
- package/dist/runtime/utils/junSlides.d.ts +66 -0
- package/dist/runtime/utils/junSlides.js +47 -0
- package/dist/runtime/utils/junThread.d.ts +81 -0
- package/dist/runtime/utils/junThread.js +75 -0
- package/dist/runtime/utils/junViewSpecs.d.ts +671 -0
- package/dist/runtime/utils/junViewSpecs.js +534 -0
- package/dist/runtime/utils/junViewValues.d.ts +125 -0
- package/dist/runtime/utils/junViewValues.js +104 -0
- package/dist/types.d.mts +1 -1
- package/package.json +5 -1
|
@@ -15,11 +15,37 @@ import {
|
|
|
15
15
|
useJunStudio
|
|
16
16
|
} from "#imports";
|
|
17
17
|
import { junCampfireLabel, useJunCampfireNames } from "../composables/useJunCampfire";
|
|
18
|
+
import { junSectionText, useJunSectionMarks } from "../composables/useJunSections";
|
|
18
19
|
const settings = useJunCampfireSettings();
|
|
19
20
|
const abra = useAbracadabra();
|
|
20
21
|
const { others, self, everyone } = useJunCampfirePeople();
|
|
21
22
|
const channelDocId = useJunCampfireChannel();
|
|
22
|
-
const { toggle: toggleFollow, unfollow, followingClientId, followingUser, isFollowing } = useJunFollow();
|
|
23
|
+
const { toggle: toggleFollow, unfollow, followingClientId, followingUser, isFollowing, followers, notice } = useJunFollow();
|
|
24
|
+
const { markFor } = useJunSectionMarks();
|
|
25
|
+
const banner = computed(() => {
|
|
26
|
+
if (open.value) return null;
|
|
27
|
+
if (isFollowing.value && followingUser.value) {
|
|
28
|
+
return {
|
|
29
|
+
kind: "following",
|
|
30
|
+
name: followingUser.value.name || "someone",
|
|
31
|
+
color: followingUser.value.color || "var(--ui-text-muted)",
|
|
32
|
+
/**
|
|
33
|
+
* Which part of the page they are in, when the page has parts. On a long
|
|
34
|
+
* document the banner otherwise says the same sentence whether the leader
|
|
35
|
+
* is at the top or three screens down, which is precisely the interval
|
|
36
|
+
* where a follower wants to know. Read through awareness only — see the
|
|
37
|
+
* note in `useJunSections` about why the follow machinery cannot depend on
|
|
38
|
+
* the section machinery.
|
|
39
|
+
*/
|
|
40
|
+
where: junSectionText(markFor(followingClientId.value), 24)
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
if (notice.value) return { kind: "notice", name: notice.value, color: "", where: "" };
|
|
44
|
+
return null;
|
|
45
|
+
});
|
|
46
|
+
const ledLabel = computed(
|
|
47
|
+
() => followers.value.length === 1 ? `${followers.value[0].name} is travelling with you` : `${followers.value.length} travellers are following you`
|
|
48
|
+
);
|
|
23
49
|
const count = computed(() => others.value.length);
|
|
24
50
|
const label = computed(() => junCampfireLabel(count.value, settings.value.label));
|
|
25
51
|
const open = ref(false);
|
|
@@ -324,28 +350,47 @@ onBeforeUnmount(() => {
|
|
|
324
350
|
</TransitionGroup>
|
|
325
351
|
|
|
326
352
|
<Transition name="jun-campfire-rise">
|
|
327
|
-
<
|
|
328
|
-
|
|
329
|
-
|
|
353
|
+
<component
|
|
354
|
+
:is="banner.kind === 'following' ? 'button' : 'div'"
|
|
355
|
+
v-if="banner"
|
|
356
|
+
:key="banner.kind"
|
|
357
|
+
:type="banner.kind === 'following' ? 'button' : void 0"
|
|
330
358
|
class="jun-bar jun-bar-pill jun-chrome jun-campfire-banner gap-1.5 rounded-full py-1 pr-2
|
|
331
359
|
pl-2.5 text-xs"
|
|
332
360
|
:data-jun-corner="corner"
|
|
333
361
|
:style="panelStyle"
|
|
334
|
-
|
|
335
|
-
|
|
362
|
+
data-jun-follow-ui
|
|
363
|
+
:aria-label="banner.kind === 'following' ? `Stop following ${banner.name}` : banner.name"
|
|
364
|
+
:aria-live="banner.kind === 'notice' ? 'polite' : void 0"
|
|
365
|
+
@click="banner.kind === 'following' && unfollow()"
|
|
336
366
|
>
|
|
337
367
|
<span
|
|
368
|
+
v-if="banner.kind === 'following'"
|
|
338
369
|
class="size-2 rounded-full"
|
|
339
|
-
:style="{ background:
|
|
370
|
+
:style="{ background: banner.color }"
|
|
371
|
+
/>
|
|
372
|
+
<UIcon
|
|
373
|
+
v-else
|
|
374
|
+
name="i-lucide-footprints"
|
|
375
|
+
class="size-3 text-neutral-400"
|
|
340
376
|
/>
|
|
341
377
|
<span class="font-medium text-neutral-600 dark:text-neutral-300">
|
|
342
|
-
following {{
|
|
378
|
+
<template v-if="banner.kind === 'following'">following {{ banner.name }}</template>
|
|
379
|
+
<template v-else>{{ banner.name }}</template>
|
|
343
380
|
</span>
|
|
381
|
+
<!-- Where they are inside the page, on a page that has parts. Its own
|
|
382
|
+
element so it can be dimmer than the name and truncate on its
|
|
383
|
+
own — the name must never be the thing that gets cut. -->
|
|
384
|
+
<span
|
|
385
|
+
v-if="banner.where"
|
|
386
|
+
class="jun-campfire-banner__where hidden max-w-40 truncate text-neutral-400 sm:inline dark:text-neutral-500"
|
|
387
|
+
>· {{ banner.where }}</span>
|
|
344
388
|
<UIcon
|
|
389
|
+
v-if="banner.kind === 'following'"
|
|
345
390
|
name="i-lucide-x"
|
|
346
391
|
class="size-3 text-neutral-400"
|
|
347
392
|
/>
|
|
348
|
-
</
|
|
393
|
+
</component>
|
|
349
394
|
</Transition>
|
|
350
395
|
|
|
351
396
|
<button
|
|
@@ -397,6 +442,26 @@ onBeforeUnmount(() => {
|
|
|
397
442
|
>{{ initial(p.name) }}</span>
|
|
398
443
|
</span>
|
|
399
444
|
|
|
445
|
+
<!-- The LEADER's half of a follow. Being followed was invisible: the
|
|
446
|
+
site would navigate somebody else's browser and never tell the
|
|
447
|
+
person doing the navigating that anyone was there. It costs one
|
|
448
|
+
awareness field and it is the difference between company and being
|
|
449
|
+
watched. Shown in every pill mode except the bare ember, which by
|
|
450
|
+
definition shows nothing. -->
|
|
451
|
+
<span
|
|
452
|
+
v-if="followers.length && settings.pillMode !== 'ember'"
|
|
453
|
+
class="jun-campfire-led flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px]
|
|
454
|
+
font-medium tabular-nums text-neutral-600 dark:text-neutral-300"
|
|
455
|
+
:title="ledLabel"
|
|
456
|
+
:aria-label="ledLabel"
|
|
457
|
+
>
|
|
458
|
+
<UIcon
|
|
459
|
+
name="i-lucide-footprints"
|
|
460
|
+
class="size-3"
|
|
461
|
+
/>
|
|
462
|
+
{{ followers.length }}
|
|
463
|
+
</span>
|
|
464
|
+
|
|
400
465
|
<span
|
|
401
466
|
v-if="settings.pillMode === 'full'"
|
|
402
467
|
class="font-medium tracking-wide whitespace-nowrap text-neutral-600 dark:text-neutral-300"
|
|
@@ -417,5 +482,5 @@ onBeforeUnmount(() => {
|
|
|
417
482
|
</template>
|
|
418
483
|
|
|
419
484
|
<style scoped>
|
|
420
|
-
.jun-campfire-pill{transition:transform .5s cubic-bezier(.22,1,.36,1)}.jun-campfire-pill:hover{transform:scale(1.03)}.jun-campfire-pill:active{transform:scale(.97)}.jun-campfire-pill.is-static{cursor:default}.jun-campfire-pill.is-static:hover{transform:none}.jun-campfire-badge{background:var(--color-neutral-900);border-radius:999px;color:#fff;font-size:9px;font-variant-numeric:tabular-nums;font-weight:500;line-height:.95rem;min-width:.95rem;padding:0 .2rem;position:absolute;right:-.35rem;top:-.25rem}:root.dark .jun-campfire-badge{background:var(--color-neutral-100);color:var(--color-neutral-900)}.jun-campfire-badge.is-ember{background:var(--jun-ember);color:#fff}.jun-campfire-glow{animation:jun-campfire-breathe 3.2s ease-in-out infinite;background:radial-gradient(circle at 50% 55%,color-mix(in srgb,var(--jun-ember-glow) 55%,transparent),color-mix(in srgb,var(--jun-ember) 18%,transparent) 55%,transparent 72%)}@keyframes jun-campfire-breathe{0%,to{opacity:.5;transform:scale(.9)}50%{opacity:1;transform:scale(1.15)}}.jun-campfire-floater{animation:jun-campfire-float 1.9s cubic-bezier(.22,1,.36,1) forwards;bottom:0;filter:drop-shadow(0 0 8px currentColor);font-size:1.25rem;position:absolute;right:0}@keyframes jun-campfire-float{0%{opacity:0;transform:translate(0) scale(.6)}18%{opacity:1;transform:translate(var(--dx),-1.5rem) scale(1.1)}to{opacity:0;transform:translate(calc(var(--dx)*1.6),-7.5rem) scale(.8)}}.jun-campfire-rise-enter-active,.jun-campfire-rise-leave-active{transition:opacity .28s ease,transform .28s cubic-bezier(.22,1,.36,1)}.jun-campfire-rise-enter-from,.jun-campfire-rise-leave-to{opacity:0;transform:translateY(12px) scale(.98)}.jun-campfire-bubbles{align-items:flex-end;display:flex;flex-direction:column-reverse;gap:.375rem;max-width:min(19rem,calc(100vw - 2rem));pointer-events:none}[data-jun-corner^=top].jun-campfire-bubbles{flex-direction:column}.jun-campfire-bubble,[data-jun-corner$=left].jun-campfire-bubbles{align-items:flex-start}.jun-campfire-bubble{display:flex;max-width:100%;pointer-events:auto;text-align:left;transition:transform .2s cubic-bezier(.22,1,.36,1)}.jun-campfire-bubble:hover{transform:translateY(-1px)}.jun-campfire-bubble span>span:last-child{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden}.jun-campfire-bubble-enter-active,.jun-campfire-bubble-leave-active{transition:opacity .3s ease,transform .3s cubic-bezier(.22,1,.36,1)}.jun-campfire-bubble-enter-from,.jun-campfire-bubble-leave-to{opacity:0;transform:translateY(8px) scale(.96)}.jun-campfire-bubble-move{transition:transform .3s cubic-bezier(.22,1,.36,1)}@media (prefers-reduced-motion:reduce){.jun-campfire-glow{animation:none;opacity:.7}.jun-campfire-floater{animation-duration:1.2s}.jun-campfire-pill{transition:none}.jun-campfire-pill:hover{transform:none}.jun-campfire-rise-enter-active,.jun-campfire-rise-leave-active{transition:opacity .2s ease}.jun-campfire-rise-enter-from,.jun-campfire-rise-leave-to{transform:none}.jun-campfire-bubble,.jun-campfire-bubble-move{transition:none}.jun-campfire-bubble:hover{transform:none}.jun-campfire-bubble-enter-active,.jun-campfire-bubble-leave-active{transition:opacity .2s ease}.jun-campfire-bubble-enter-from,.jun-campfire-bubble-leave-to{transform:none}}
|
|
485
|
+
.jun-campfire-pill{transition:transform .5s cubic-bezier(.22,1,.36,1)}.jun-campfire-led{background:color-mix(in srgb,currentColor 9%,transparent)}.jun-campfire-pill:hover{transform:scale(1.03)}.jun-campfire-pill:active{transform:scale(.97)}.jun-campfire-pill.is-static{cursor:default}.jun-campfire-pill.is-static:hover{transform:none}.jun-campfire-badge{background:var(--color-neutral-900);border-radius:999px;color:#fff;font-size:9px;font-variant-numeric:tabular-nums;font-weight:500;line-height:.95rem;min-width:.95rem;padding:0 .2rem;position:absolute;right:-.35rem;top:-.25rem}:root.dark .jun-campfire-badge{background:var(--color-neutral-100);color:var(--color-neutral-900)}.jun-campfire-badge.is-ember{background:var(--jun-ember);color:#fff}.jun-campfire-glow{animation:jun-campfire-breathe 3.2s ease-in-out infinite;background:radial-gradient(circle at 50% 55%,color-mix(in srgb,var(--jun-ember-glow) 55%,transparent),color-mix(in srgb,var(--jun-ember) 18%,transparent) 55%,transparent 72%)}@keyframes jun-campfire-breathe{0%,to{opacity:.5;transform:scale(.9)}50%{opacity:1;transform:scale(1.15)}}.jun-campfire-floater{animation:jun-campfire-float 1.9s cubic-bezier(.22,1,.36,1) forwards;bottom:0;filter:drop-shadow(0 0 8px currentColor);font-size:1.25rem;position:absolute;right:0}@keyframes jun-campfire-float{0%{opacity:0;transform:translate(0) scale(.6)}18%{opacity:1;transform:translate(var(--dx),-1.5rem) scale(1.1)}to{opacity:0;transform:translate(calc(var(--dx)*1.6),-7.5rem) scale(.8)}}.jun-campfire-rise-enter-active,.jun-campfire-rise-leave-active{transition:opacity .28s ease,transform .28s cubic-bezier(.22,1,.36,1)}.jun-campfire-rise-enter-from,.jun-campfire-rise-leave-to{opacity:0;transform:translateY(12px) scale(.98)}.jun-campfire-bubbles{align-items:flex-end;display:flex;flex-direction:column-reverse;gap:.375rem;max-width:min(19rem,calc(100vw - 2rem));pointer-events:none}[data-jun-corner^=top].jun-campfire-bubbles{flex-direction:column}.jun-campfire-bubble,[data-jun-corner$=left].jun-campfire-bubbles{align-items:flex-start}.jun-campfire-bubble{display:flex;max-width:100%;pointer-events:auto;text-align:left;transition:transform .2s cubic-bezier(.22,1,.36,1)}.jun-campfire-bubble:hover{transform:translateY(-1px)}.jun-campfire-bubble span>span:last-child{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden}.jun-campfire-bubble-enter-active,.jun-campfire-bubble-leave-active{transition:opacity .3s ease,transform .3s cubic-bezier(.22,1,.36,1)}.jun-campfire-bubble-enter-from,.jun-campfire-bubble-leave-to{opacity:0;transform:translateY(8px) scale(.96)}.jun-campfire-bubble-move{transition:transform .3s cubic-bezier(.22,1,.36,1)}@media (prefers-reduced-motion:reduce){.jun-campfire-glow{animation:none;opacity:.7}.jun-campfire-floater{animation-duration:1.2s}.jun-campfire-pill{transition:none}.jun-campfire-pill:hover{transform:none}.jun-campfire-rise-enter-active,.jun-campfire-rise-leave-active{transition:opacity .2s ease}.jun-campfire-rise-enter-from,.jun-campfire-rise-leave-to{transform:none}.jun-campfire-bubble,.jun-campfire-bubble-move{transition:none}.jun-campfire-bubble:hover{transform:none}.jun-campfire-bubble-enter-active,.jun-campfire-bubble-leave-active{transition:opacity .2s ease}.jun-campfire-bubble-enter-from,.jun-campfire-bubble-leave-to{transform:none}}
|
|
421
486
|
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** The COLLECTION document — this renders that document's own body. */
|
|
3
|
+
docId: string;
|
|
4
|
+
docLabel?: string;
|
|
5
|
+
docMeta?: Record<string, unknown>;
|
|
6
|
+
/** Placeholder shown to the owner while the intro is empty. */
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref } from "vue";
|
|
3
|
+
import { junEditorBodyText, useJunStudio } from "#imports";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
docId: { type: String, required: true },
|
|
6
|
+
docLabel: { type: String, required: false },
|
|
7
|
+
docMeta: { type: Object, required: false },
|
|
8
|
+
placeholder: { type: String, required: false }
|
|
9
|
+
});
|
|
10
|
+
const { editing } = useJunStudio();
|
|
11
|
+
const introEditor = ref(null);
|
|
12
|
+
const hasProse = ref(false);
|
|
13
|
+
function recalc() {
|
|
14
|
+
hasProse.value = junEditorBodyText(introEditor.value?.editor).trim().length > 0;
|
|
15
|
+
}
|
|
16
|
+
const shown = computed(() => editing.value || hasProse.value);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<div
|
|
21
|
+
class="jun-collection-intro"
|
|
22
|
+
:class="shown ? 'mb-8' : 'jun-collection-intro--empty'"
|
|
23
|
+
>
|
|
24
|
+
<AEditor
|
|
25
|
+
ref="introEditor"
|
|
26
|
+
:doc-id="props.docId"
|
|
27
|
+
:doc-label="props.docLabel"
|
|
28
|
+
:doc-meta="props.docMeta ?? {}"
|
|
29
|
+
:editable="editing"
|
|
30
|
+
:show-toolbar="editing"
|
|
31
|
+
:show-suggestion-menu="editing"
|
|
32
|
+
:show-drag-handle="editing"
|
|
33
|
+
:show-breadcrumb="false"
|
|
34
|
+
:breadcrumb-menu="false"
|
|
35
|
+
:placeholder="props.placeholder ?? 'Say what this page is\u2026'"
|
|
36
|
+
:show-sub-pages="false"
|
|
37
|
+
@ready="recalc"
|
|
38
|
+
@update="recalc"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<style scoped>
|
|
44
|
+
.jun-collection-intro--empty{display:none}.jun-collection-intro :deep(.document-header){display:none}.jun-collection-intro :deep([data-meta-key=excerpt]){display:none}.jun-collection-intro :deep(.ProseMirror),.jun-collection-intro :deep(.aeditor-canvas){padding:0}
|
|
45
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** The COLLECTION document — this renders that document's own body. */
|
|
3
|
+
docId: string;
|
|
4
|
+
docLabel?: string;
|
|
5
|
+
docMeta?: Record<string, unknown>;
|
|
6
|
+
/** Placeholder shown to the owner while the intro is empty. */
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JunConfigRow — one labelled setting row in the settings panel.
|
|
3
|
+
*
|
|
4
|
+
* `JunConfigRenderer` had **27** copies of this six-line block: a
|
|
5
|
+
* `flex items-center justify-between gap-3` wrapper, a `min-w-0` column holding a
|
|
6
|
+
* `text-xs font-medium` label and a `text-[11px] text-muted` hint, and a control
|
|
7
|
+
* beside it. Twenty-seven chances for one of them to drift, and they had already
|
|
8
|
+
* started to — some rows carried the hint, some did not, and two used a different
|
|
9
|
+
* gap.
|
|
10
|
+
*
|
|
11
|
+
* It was deliberately NOT extracted for three rounds, which was the right call
|
|
12
|
+
* every time: a 1,600-line template rewrite in the same change as six other things
|
|
13
|
+
* is the unreviewable diff this repo has warned itself about. The condition it was
|
|
14
|
+
* waiting for is a round where it is the ONLY change to that file.
|
|
15
|
+
*
|
|
16
|
+
* ── Why a `hint` slot as well as a prop ─────────────────────────────────────
|
|
17
|
+
*
|
|
18
|
+
* Most hints are a sentence. A few carry a `<code>` fragment or a link, and a
|
|
19
|
+
* prop-only component would have sent those back to hand-rolling the whole row —
|
|
20
|
+
* which is how a shared component ends up used by half its call sites.
|
|
21
|
+
*/
|
|
22
|
+
type __VLS_Props = {
|
|
23
|
+
label: string;
|
|
24
|
+
/** One short line under the label. Omit for a row that needs none. */
|
|
25
|
+
hint?: string;
|
|
26
|
+
/** Dim the whole row — for a setting this build cannot offer. */
|
|
27
|
+
muted?: boolean;
|
|
28
|
+
};
|
|
29
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
30
|
+
type __VLS_Slots = {} & {
|
|
31
|
+
hint?: (props: typeof __VLS_1) => any;
|
|
32
|
+
} & {
|
|
33
|
+
default?: (props: typeof __VLS_3) => any;
|
|
34
|
+
};
|
|
35
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
defineProps({
|
|
3
|
+
label: { type: String, required: true },
|
|
4
|
+
hint: { type: String, required: false },
|
|
5
|
+
muted: { type: Boolean, required: false }
|
|
6
|
+
});
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div
|
|
11
|
+
data-jun-config-row
|
|
12
|
+
class="flex items-center justify-between gap-3"
|
|
13
|
+
:class="muted ? 'opacity-60' : ''"
|
|
14
|
+
>
|
|
15
|
+
<div class="min-w-0">
|
|
16
|
+
<p class="text-xs font-medium">
|
|
17
|
+
{{ label }}
|
|
18
|
+
</p>
|
|
19
|
+
<p
|
|
20
|
+
v-if="hint || $slots.hint"
|
|
21
|
+
class="text-[11px] text-muted"
|
|
22
|
+
>
|
|
23
|
+
<slot name="hint">
|
|
24
|
+
{{ hint }}
|
|
25
|
+
</slot>
|
|
26
|
+
</p>
|
|
27
|
+
</div>
|
|
28
|
+
<!-- The control. `flex-none` so a long label never squeezes a switch out of
|
|
29
|
+
shape — one of the small inconsistencies the 27 copies had between them. -->
|
|
30
|
+
<div class="flex-none">
|
|
31
|
+
<slot />
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JunConfigRow — one labelled setting row in the settings panel.
|
|
3
|
+
*
|
|
4
|
+
* `JunConfigRenderer` had **27** copies of this six-line block: a
|
|
5
|
+
* `flex items-center justify-between gap-3` wrapper, a `min-w-0` column holding a
|
|
6
|
+
* `text-xs font-medium` label and a `text-[11px] text-muted` hint, and a control
|
|
7
|
+
* beside it. Twenty-seven chances for one of them to drift, and they had already
|
|
8
|
+
* started to — some rows carried the hint, some did not, and two used a different
|
|
9
|
+
* gap.
|
|
10
|
+
*
|
|
11
|
+
* It was deliberately NOT extracted for three rounds, which was the right call
|
|
12
|
+
* every time: a 1,600-line template rewrite in the same change as six other things
|
|
13
|
+
* is the unreviewable diff this repo has warned itself about. The condition it was
|
|
14
|
+
* waiting for is a round where it is the ONLY change to that file.
|
|
15
|
+
*
|
|
16
|
+
* ── Why a `hint` slot as well as a prop ─────────────────────────────────────
|
|
17
|
+
*
|
|
18
|
+
* Most hints are a sentence. A few carry a `<code>` fragment or a link, and a
|
|
19
|
+
* prop-only component would have sent those back to hand-rolling the whole row —
|
|
20
|
+
* which is how a shared component ends up used by half its call sites.
|
|
21
|
+
*/
|
|
22
|
+
type __VLS_Props = {
|
|
23
|
+
label: string;
|
|
24
|
+
/** One short line under the label. Omit for a row that needs none. */
|
|
25
|
+
hint?: string;
|
|
26
|
+
/** Dim the whole row — for a setting this build cannot offer. */
|
|
27
|
+
muted?: boolean;
|
|
28
|
+
};
|
|
29
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
30
|
+
type __VLS_Slots = {} & {
|
|
31
|
+
hint?: (props: typeof __VLS_1) => any;
|
|
32
|
+
} & {
|
|
33
|
+
default?: (props: typeof __VLS_3) => any;
|
|
34
|
+
};
|
|
35
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -28,6 +28,7 @@ const { isFeedType } = useJunLayoutPolicy();
|
|
|
28
28
|
:key="props.renderKey"
|
|
29
29
|
:doc-id="props.docId"
|
|
30
30
|
:entry="props.entry"
|
|
31
|
+
:ssr-html="props.html"
|
|
31
32
|
:editable="props.editable"
|
|
32
33
|
editor-class="w-full h-full"
|
|
33
34
|
renderer-class="w-full h-full"
|
|
@@ -60,6 +61,7 @@ const { isFeedType } = useJunLayoutPolicy();
|
|
|
60
61
|
:key="props.renderKey"
|
|
61
62
|
:doc-id="props.docId"
|
|
62
63
|
:entry="props.entry"
|
|
64
|
+
:ssr-html="props.html"
|
|
63
65
|
:editable="props.editable"
|
|
64
66
|
editor-class="w-full h-full"
|
|
65
67
|
renderer-class="w-full h-full"
|
|
@@ -93,6 +95,7 @@ const { isFeedType } = useJunLayoutPolicy();
|
|
|
93
95
|
:key="props.renderKey"
|
|
94
96
|
:doc-id="props.docId"
|
|
95
97
|
:entry="props.entry"
|
|
98
|
+
:ssr-html="props.html"
|
|
96
99
|
:editable="props.editable"
|
|
97
100
|
editor-class="w-full rounded-md"
|
|
98
101
|
renderer-class="w-full flex-1"
|
|
@@ -65,7 +65,7 @@ const visible = computed(
|
|
|
65
65
|
<template>
|
|
66
66
|
<footer
|
|
67
67
|
v-if="visible"
|
|
68
|
-
class="relative z-10 flex flex-wrap items-center justify-center gap-x-3 gap-y-1 px-6 pb-10 pt-16 text-center text-xs tracking-wide text-black/40 dark:text-white/35"
|
|
68
|
+
class="jun-footer relative z-10 flex flex-wrap items-center justify-center gap-x-3 gap-y-1 px-6 pb-10 pt-16 text-center text-xs tracking-wide text-black/40 dark:text-white/35"
|
|
69
69
|
>
|
|
70
70
|
<span v-if="text">{{ text }}</span>
|
|
71
71
|
<span
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface Waypoint {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
meta?: {
|
|
5
|
+
date?: string;
|
|
6
|
+
geoLat?: number;
|
|
7
|
+
geoLng?: number;
|
|
8
|
+
transport?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
routeKm?: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
17
|
+
waypoints: Waypoint[];
|
|
18
|
+
selectedId?: string | null;
|
|
19
|
+
ready?: boolean;
|
|
20
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
21
|
+
select: (wp: Waypoint) => any;
|
|
22
|
+
focusRoute: (a: Waypoint, b: Waypoint, selectId?: string | undefined) => any;
|
|
23
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
24
|
+
waypoints: Waypoint[];
|
|
25
|
+
selectedId?: string | null;
|
|
26
|
+
ready?: boolean;
|
|
27
|
+
}> & Readonly<{
|
|
28
|
+
onSelect?: ((wp: Waypoint) => any) | undefined;
|
|
29
|
+
onFocusRoute?: ((a: Waypoint, b: Waypoint, selectId?: string | undefined) => any) | undefined;
|
|
30
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface Waypoint {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
meta?: {
|
|
5
|
+
date?: string;
|
|
6
|
+
geoLat?: number;
|
|
7
|
+
geoLng?: number;
|
|
8
|
+
transport?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
routeKm?: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
17
|
+
waypoints: Waypoint[];
|
|
18
|
+
selectedId?: string | null;
|
|
19
|
+
ready?: boolean;
|
|
20
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
21
|
+
select: (wp: Waypoint) => any;
|
|
22
|
+
focusRoute: (a: Waypoint, b: Waypoint, selectId?: string | undefined) => any;
|
|
23
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
24
|
+
waypoints: Waypoint[];
|
|
25
|
+
selectedId?: string | null;
|
|
26
|
+
ready?: boolean;
|
|
27
|
+
}> & Readonly<{
|
|
28
|
+
onSelect?: ((wp: Waypoint) => any) | undefined;
|
|
29
|
+
onFocusRoute?: ((a: Waypoint, b: Waypoint, selectId?: string | undefined) => any) | undefined;
|
|
30
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -13,7 +13,22 @@ type __VLS_Props = {
|
|
|
13
13
|
accentTitle?: string;
|
|
14
14
|
/** Owner edit mode: always link to the entry's own document page. */
|
|
15
15
|
forceInternal?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Display settings from the page's own `useJunViewOptions`, so the links and
|
|
18
|
+
* gear pages can be configured without a second row component. All default to
|
|
19
|
+
* the row as it has always looked.
|
|
20
|
+
*/
|
|
21
|
+
showIcon?: boolean;
|
|
22
|
+
showDescription?: boolean;
|
|
23
|
+
showHost?: boolean;
|
|
24
|
+
/** Half the vertical padding and one line of text. For a long list. */
|
|
25
|
+
compact?: boolean;
|
|
16
26
|
};
|
|
17
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
27
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
28
|
+
compact: boolean;
|
|
29
|
+
showIcon: boolean;
|
|
30
|
+
showDescription: boolean;
|
|
31
|
+
showHost: boolean;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
33
|
declare const _default: typeof __VLS_export;
|
|
19
34
|
export default _default;
|
|
@@ -6,7 +6,11 @@ const props = defineProps({
|
|
|
6
6
|
entry: { type: Object, required: true },
|
|
7
7
|
accent: { type: Object, required: false },
|
|
8
8
|
accentTitle: { type: String, required: false },
|
|
9
|
-
forceInternal: { type: Boolean, required: false }
|
|
9
|
+
forceInternal: { type: Boolean, required: false },
|
|
10
|
+
showIcon: { type: Boolean, required: false, default: true },
|
|
11
|
+
showDescription: { type: Boolean, required: false, default: true },
|
|
12
|
+
showHost: { type: Boolean, required: false, default: true },
|
|
13
|
+
compact: { type: Boolean, required: false, default: false }
|
|
10
14
|
});
|
|
11
15
|
const { getDocUrl } = useDocSlugs();
|
|
12
16
|
const docIcon = useJunDocIcon();
|
|
@@ -37,8 +41,9 @@ const faviconSrc = computed(
|
|
|
37
41
|
<component
|
|
38
42
|
:is="external ? 'a' : NuxtLink"
|
|
39
43
|
v-bind="external ? { href: entry.meta.url, target: '_blank', rel: 'noopener noreferrer' } : { to: getDocUrl(entry.id) }"
|
|
40
|
-
class="jun-card group relative flex items-center
|
|
44
|
+
class="jun-card group relative flex items-center rounded-xl px-4
|
|
41
45
|
transition-all duration-300 hover:scale-[1.01] hover:shadow-xl"
|
|
46
|
+
:class="compact ? 'gap-3 py-2' : 'gap-4 py-3.5'"
|
|
42
47
|
:title="accentTitle"
|
|
43
48
|
>
|
|
44
49
|
<!-- Presence halo — a traveller is reading this link's page right now. -->
|
|
@@ -50,9 +55,11 @@ const faviconSrc = computed(
|
|
|
50
55
|
/>
|
|
51
56
|
|
|
52
57
|
<span
|
|
53
|
-
|
|
58
|
+
v-if="showIcon"
|
|
59
|
+
class="flex shrink-0 items-center justify-center rounded-lg bg-black/5
|
|
54
60
|
text-black/60 ring-1 ring-black/5 transition-transform duration-300
|
|
55
61
|
group-hover:scale-110 dark:bg-white/10 dark:text-white/70 dark:ring-white/10"
|
|
62
|
+
:class="compact ? 'size-7' : 'size-10'"
|
|
56
63
|
>
|
|
57
64
|
<img
|
|
58
65
|
v-if="faviconSrc"
|
|
@@ -65,16 +72,19 @@ const faviconSrc = computed(
|
|
|
65
72
|
<UIcon
|
|
66
73
|
v-else
|
|
67
74
|
:name="icon"
|
|
68
|
-
class="size-4.5"
|
|
75
|
+
:class="compact ? 'size-3.5' : 'size-4.5'"
|
|
69
76
|
/>
|
|
70
77
|
</span>
|
|
71
78
|
|
|
72
79
|
<span class="min-w-0 flex-1">
|
|
73
|
-
<span
|
|
80
|
+
<span
|
|
81
|
+
class="block truncate font-medium tracking-wide text-highlighted"
|
|
82
|
+
:class="compact ? 'text-sm' : 'text-sm sm:text-base'"
|
|
83
|
+
>
|
|
74
84
|
{{ entry.label }}
|
|
75
85
|
</span>
|
|
76
86
|
<span
|
|
77
|
-
v-if="entry.meta?.description"
|
|
87
|
+
v-if="entry.meta?.description && showDescription && !compact"
|
|
78
88
|
class="block truncate text-xs text-muted sm:text-sm"
|
|
79
89
|
>
|
|
80
90
|
{{ entry.meta.description }}
|
|
@@ -83,7 +93,7 @@ const faviconSrc = computed(
|
|
|
83
93
|
|
|
84
94
|
<span class="flex shrink-0 items-center gap-1.5 text-xs text-dimmed">
|
|
85
95
|
<span
|
|
86
|
-
v-if="host"
|
|
96
|
+
v-if="host && showHost"
|
|
87
97
|
class="hidden tracking-wide sm:inline"
|
|
88
98
|
>{{ host }}</span>
|
|
89
99
|
<UIcon
|
|
@@ -13,7 +13,22 @@ type __VLS_Props = {
|
|
|
13
13
|
accentTitle?: string;
|
|
14
14
|
/** Owner edit mode: always link to the entry's own document page. */
|
|
15
15
|
forceInternal?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Display settings from the page's own `useJunViewOptions`, so the links and
|
|
18
|
+
* gear pages can be configured without a second row component. All default to
|
|
19
|
+
* the row as it has always looked.
|
|
20
|
+
*/
|
|
21
|
+
showIcon?: boolean;
|
|
22
|
+
showDescription?: boolean;
|
|
23
|
+
showHost?: boolean;
|
|
24
|
+
/** Half the vertical padding and one line of text. For a long list. */
|
|
25
|
+
compact?: boolean;
|
|
16
26
|
};
|
|
17
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
27
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
28
|
+
compact: boolean;
|
|
29
|
+
showIcon: boolean;
|
|
30
|
+
showDescription: boolean;
|
|
31
|
+
showHost: boolean;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
33
|
declare const _default: typeof __VLS_export;
|
|
19
34
|
export default _default;
|
|
@@ -31,10 +31,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
31
31
|
full: boolean;
|
|
32
32
|
mimeType: string;
|
|
33
33
|
stream: boolean;
|
|
34
|
+
poster: string;
|
|
34
35
|
autoplay: boolean;
|
|
35
36
|
alt: string;
|
|
36
37
|
mediaClass: string;
|
|
37
|
-
poster: string;
|
|
38
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
39
|
declare const _default: typeof __VLS_export;
|
|
40
40
|
export default _default;
|
|
@@ -31,10 +31,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
31
31
|
full: boolean;
|
|
32
32
|
mimeType: string;
|
|
33
33
|
stream: boolean;
|
|
34
|
+
poster: string;
|
|
34
35
|
autoplay: boolean;
|
|
35
36
|
alt: string;
|
|
36
37
|
mediaClass: string;
|
|
37
|
-
poster: string;
|
|
38
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
39
|
declare const _default: typeof __VLS_export;
|
|
40
40
|
export default _default;
|
|
@@ -19,7 +19,7 @@ import { useJunNavSettings } from "../composables/useJunNavSettings";
|
|
|
19
19
|
import { useJunSearch } from "../composables/useJunSearch";
|
|
20
20
|
import { useJunStudio } from "../composables/useJunStudio";
|
|
21
21
|
import { useJunRename } from "../composables/useJunRename";
|
|
22
|
-
import { useJunTravellers } from "../composables/useJunPresence";
|
|
22
|
+
import { junDedupeTravellers, useJunTravellers } from "../composables/useJunPresence";
|
|
23
23
|
const props = defineProps({
|
|
24
24
|
navigation: { type: Array, required: true }
|
|
25
25
|
});
|
|
@@ -185,6 +185,7 @@ const presenceByNavId = computed(() => {
|
|
|
185
185
|
list.push(t);
|
|
186
186
|
map.set(top, list);
|
|
187
187
|
}
|
|
188
|
+
for (const [id, list] of map) map.set(id, junDedupeTravellers(list));
|
|
188
189
|
return map;
|
|
189
190
|
});
|
|
190
191
|
const presenceFor = (id) => id ? presenceByNavId.value.get(id) ?? [] : [];
|
|
@@ -1033,9 +1034,25 @@ onUnmounted(() => {
|
|
|
1033
1034
|
aria-hidden="true"
|
|
1034
1035
|
/>
|
|
1035
1036
|
|
|
1036
|
-
<!-- Ambient presence. Colour rides on presence ONLY.
|
|
1037
|
+
<!-- Ambient presence. Colour rides on presence ONLY.
|
|
1038
|
+
|
|
1039
|
+
Both dots are gated on `mounted`, and that gate is
|
|
1040
|
+
load-bearing rather than cosmetic. Presence comes
|
|
1041
|
+
from awareness and freshness from this browser's own
|
|
1042
|
+
last-seen stamps — neither exists on the server, so
|
|
1043
|
+
whenever a peer was connected (the janitor and the
|
|
1044
|
+
doc-cache runner always are) the client's first
|
|
1045
|
+
render added a `<span>` where the server had emitted
|
|
1046
|
+
a comment placeholder, and Vue reported a hydration
|
|
1047
|
+
node mismatch on EVERY page of the site. `parity:nav`
|
|
1048
|
+
failed on it for as long as it has existed.
|
|
1049
|
+
|
|
1050
|
+
Deferring to `mounted` makes the first client render
|
|
1051
|
+
identical to the server's and the dot an ordinary
|
|
1052
|
+
reactive update one tick later — the same fix, and
|
|
1053
|
+
the same reasoning, as the navbar mode above. -->
|
|
1037
1054
|
<span
|
|
1038
|
-
v-if="presenceFor(item.id).length"
|
|
1055
|
+
v-if="mounted && presenceFor(item.id).length"
|
|
1039
1056
|
class="jun-nav-presence-dot absolute -top-0.5 -right-0.5 size-1.5 rounded-full"
|
|
1040
1057
|
:style="{ background: presenceFor(item.id)[0].color }"
|
|
1041
1058
|
:title="`${presenceFor(item.id).length} ${presenceFor(item.id).length === 1 ? 'traveller' : 'travellers'} here`"
|
|
@@ -1043,7 +1060,7 @@ onUnmounted(() => {
|
|
|
1043
1060
|
<!-- Freshness. Hollow and monochrome, so presence stays the
|
|
1044
1061
|
only colour in the chrome. -->
|
|
1045
1062
|
<span
|
|
1046
|
-
v-else-if="freshFor(item)"
|
|
1063
|
+
v-else-if="mounted && freshFor(item)"
|
|
1047
1064
|
class="absolute -top-0.5 -right-0.5 size-1.5 rounded-full ring-1 ring-inset ring-current opacity-50"
|
|
1048
1065
|
title="Updated since your last visit"
|
|
1049
1066
|
aria-hidden="true"
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
docId: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|