@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.
- package/dist/module.d.mts +17 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +270 -22
- package/dist/runtime/assets/css/jun.css +1 -1
- package/dist/runtime/components/JunBlobBackdrop.client.vue +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/JunFooter.vue +1 -1
- package/dist/runtime/components/JunHead.vue +37 -5
- 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/JunLogo.vue +10 -45
- 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/JunPatternBackdrop.client.vue +1 -1
- 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.client.d.vue.ts +17 -0
- package/dist/runtime/components/JunSectionPresence.client.vue +99 -0
- package/dist/runtime/components/JunSectionPresence.client.vue.d.ts +17 -0
- package/dist/runtime/components/JunShaderBackdrop.client.vue +1 -1
- 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 +362 -239
- 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 +157 -31
- package/dist/runtime/components/renderers/JunFestivalRenderer.vue +42 -5
- 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/JunGuestbookRenderer.vue +96 -14
- package/dist/runtime/components/renderers/JunHomeRenderer.vue +31 -132
- 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 +38 -2
- 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 +40 -7
- 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 +57 -13
- 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/useJunOptions.d.ts +1 -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 +49 -50
- package/dist/runtime/composables/useJunViewOptions.d.ts +85 -0
- package/dist/runtime/composables/useJunViewOptions.js +63 -0
- package/dist/runtime/pages/doc.vue +14 -8
- package/dist/runtime/plugins/jun-sw.client.d.ts +2 -0
- package/dist/runtime/plugins/jun-sw.client.js +36 -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 +5 -0
- package/dist/runtime/server/api/stats.get.js +2 -1
- 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 +9 -1
- 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/jun-icon.png.get.d.ts +2 -0
- package/dist/runtime/server/routes/jun-icon.png.get.js +25 -0
- package/dist/runtime/server/routes/jun-icon.svg.get.d.ts +2 -0
- package/dist/runtime/server/routes/jun-icon.svg.get.js +9 -0
- package/dist/runtime/server/routes/jun-splash.png.get.d.ts +2 -0
- package/dist/runtime/server/routes/jun-splash.png.get.js +37 -0
- package/dist/runtime/server/routes/jun-sw.js.get.d.ts +2 -0
- package/dist/runtime/server/routes/jun-sw.js.get.js +126 -0
- package/dist/runtime/server/routes/manifest.webmanifest.get.d.ts +24 -0
- package/dist/runtime/server/routes/manifest.webmanifest.get.js +51 -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/junBrand.d.ts +4 -0
- package/dist/runtime/server/utils/junBrand.js +9 -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/junIcon.d.ts +44 -0
- package/dist/runtime/server/utils/junIcon.js +374 -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 +82 -3
- 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/junIdentity.d.ts +121 -0
- package/dist/runtime/utils/junIdentity.js +115 -0
- package/dist/runtime/utils/junMark.d.ts +254 -0
- package/dist/runtime/utils/junMark.js +169 -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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
docId: string;
|
|
3
|
+
docLabel?: string;
|
|
4
|
+
docMeta?: Record<string, unknown>;
|
|
5
|
+
childProvider?: unknown;
|
|
6
|
+
editable?: boolean;
|
|
7
|
+
};
|
|
8
|
+
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>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref } from "vue";
|
|
3
|
+
import {
|
|
4
|
+
useAbracadabra,
|
|
5
|
+
useChildTree,
|
|
6
|
+
useDocSlugs,
|
|
7
|
+
useDocTree,
|
|
8
|
+
useJunRename,
|
|
9
|
+
useJunSelfId,
|
|
10
|
+
useJunStudio,
|
|
11
|
+
useJunViewOptions,
|
|
12
|
+
useToast
|
|
13
|
+
} from "#imports";
|
|
14
|
+
import { junViewSpecFor } from "../../utils/junViewSpecs";
|
|
15
|
+
import { junCourseView } from "../../utils/junCourse";
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
docId: { type: String, required: true },
|
|
18
|
+
docLabel: { type: String, required: false },
|
|
19
|
+
docMeta: { type: Object, required: false },
|
|
20
|
+
childProvider: { type: null, required: false },
|
|
21
|
+
editable: { type: Boolean, required: false }
|
|
22
|
+
});
|
|
23
|
+
const abra = useAbracadabra();
|
|
24
|
+
const tree = useChildTree(abra.doc, props.docId);
|
|
25
|
+
const { getEntry } = useDocTree();
|
|
26
|
+
const { getDocUrl } = useDocSlugs();
|
|
27
|
+
const { editing } = useJunStudio();
|
|
28
|
+
const { renameDoc } = useJunRename();
|
|
29
|
+
const selfId = useJunSelfId();
|
|
30
|
+
const toast = useToast();
|
|
31
|
+
const entry = computed(() => getEntry(props.docId));
|
|
32
|
+
const meta = computed(
|
|
33
|
+
() => entry.value?.meta ?? props.docMeta ?? {}
|
|
34
|
+
);
|
|
35
|
+
const title = computed(() => entry.value?.label ?? props.docLabel ?? "Course");
|
|
36
|
+
const subtitle = computed(() => {
|
|
37
|
+
const ex = meta.value.excerpt;
|
|
38
|
+
return typeof ex === "string" && ex.trim() ? ex : void 0;
|
|
39
|
+
});
|
|
40
|
+
const { view, set: setView, reset: resetView, isDefault: viewIsDefault, options: viewOptions } = useJunViewOptions(props.docId, {
|
|
41
|
+
typeKey: "course",
|
|
42
|
+
options: junViewSpecFor("course")
|
|
43
|
+
}, () => props.docMeta);
|
|
44
|
+
const children = computed(() => tree.childrenOf(null) ?? []);
|
|
45
|
+
const course = computed(() => junCourseView(children.value, meta.value, selfId.value));
|
|
46
|
+
const barStyle = computed(() => ({ width: `${course.value.percent}%` }));
|
|
47
|
+
const pending = ref(null);
|
|
48
|
+
async function toggle(stepId) {
|
|
49
|
+
if (pending.value) return;
|
|
50
|
+
pending.value = stepId;
|
|
51
|
+
try {
|
|
52
|
+
await abra.provider.value?.rpc?.call("jun.course.step@1", { docId: props.docId, stepId });
|
|
53
|
+
} catch (error) {
|
|
54
|
+
const text = error?.message ?? "that did not save";
|
|
55
|
+
toast.add({ title: text, icon: "i-lucide-info", color: "neutral" });
|
|
56
|
+
} finally {
|
|
57
|
+
pending.value = null;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function renamePage(t) {
|
|
61
|
+
renameDoc(props.docId, t);
|
|
62
|
+
}
|
|
63
|
+
function renameSubtitle(s) {
|
|
64
|
+
tree.updateMeta(props.docId, { excerpt: s || void 0 });
|
|
65
|
+
}
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<template>
|
|
69
|
+
<div class="mx-auto w-full max-w-3xl px-4 pt-12 pb-16 sm:px-8">
|
|
70
|
+
<JunPageHero
|
|
71
|
+
:doc-id="docId"
|
|
72
|
+
:title="title"
|
|
73
|
+
:subtitle="subtitle"
|
|
74
|
+
:editable="editing"
|
|
75
|
+
@rename="renamePage"
|
|
76
|
+
@rename-subtitle="renameSubtitle"
|
|
77
|
+
>
|
|
78
|
+
<template #right>
|
|
79
|
+
<JunViewControls
|
|
80
|
+
v-if="editing"
|
|
81
|
+
:options="viewOptions"
|
|
82
|
+
:values="view"
|
|
83
|
+
:is-default="viewIsDefault"
|
|
84
|
+
@set="setView"
|
|
85
|
+
@reset="resetView"
|
|
86
|
+
/>
|
|
87
|
+
</template>
|
|
88
|
+
</JunPageHero>
|
|
89
|
+
|
|
90
|
+
<JunCollectionIntro
|
|
91
|
+
:doc-id="docId"
|
|
92
|
+
:doc-label="title"
|
|
93
|
+
:doc-meta="docMeta"
|
|
94
|
+
placeholder="What somebody will be able to do at the end…"
|
|
95
|
+
/>
|
|
96
|
+
|
|
97
|
+
<ClientOnly>
|
|
98
|
+
<div class="mt-4">
|
|
99
|
+
<JunReaders :doc-id="docId" />
|
|
100
|
+
</div>
|
|
101
|
+
</ClientOnly>
|
|
102
|
+
|
|
103
|
+
<!-- Your own progress. Client-only: it is keyed on an identity the server
|
|
104
|
+
stamped, which the server-rendered HTML cannot know. -->
|
|
105
|
+
<ClientOnly>
|
|
106
|
+
<div
|
|
107
|
+
v-if="view.progress && course.total"
|
|
108
|
+
class="mt-8"
|
|
109
|
+
data-jun-course="progress"
|
|
110
|
+
>
|
|
111
|
+
<div class="mb-1.5 flex items-baseline justify-between gap-3 text-[12px] text-dimmed tabular-nums">
|
|
112
|
+
<span data-jun-course="mine">{{ course.done }} of {{ course.total }} done</span>
|
|
113
|
+
<span data-jun-course="percent">{{ course.percent }}%</span>
|
|
114
|
+
</div>
|
|
115
|
+
<div class="h-1.5 overflow-hidden rounded-full bg-black/10 dark:bg-white/15">
|
|
116
|
+
<div
|
|
117
|
+
class="h-full rounded-full bg-current transition-[width] duration-500"
|
|
118
|
+
:style="barStyle"
|
|
119
|
+
/>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</ClientOnly>
|
|
123
|
+
|
|
124
|
+
<!-- The room. The thing a course on a live document can say that a static one
|
|
125
|
+
cannot — and it is a separate question from your own progress. -->
|
|
126
|
+
<ClientOnly>
|
|
127
|
+
<p
|
|
128
|
+
v-if="view.room && course.people"
|
|
129
|
+
class="mt-3 text-[12px] text-muted tabular-nums"
|
|
130
|
+
data-jun-course="room"
|
|
131
|
+
>
|
|
132
|
+
<template v-if="course.finished">
|
|
133
|
+
{{ course.finished }} {{ course.finished === 1 ? "person has" : "people have" }} finished this ·
|
|
134
|
+
</template>
|
|
135
|
+
{{ course.people }} {{ course.people === 1 ? "person is" : "people are" }} working through it
|
|
136
|
+
</p>
|
|
137
|
+
</ClientOnly>
|
|
138
|
+
|
|
139
|
+
<!-- Where to go next: the whole affordance a course has over a list of pages. -->
|
|
140
|
+
<ClientOnly>
|
|
141
|
+
<div
|
|
142
|
+
v-if="course.next"
|
|
143
|
+
class="mt-6"
|
|
144
|
+
>
|
|
145
|
+
<UButton
|
|
146
|
+
:to="getDocUrl(course.next.id)"
|
|
147
|
+
color="neutral"
|
|
148
|
+
size="sm"
|
|
149
|
+
trailing-icon="i-lucide-arrow-right"
|
|
150
|
+
:label="course.done ? `Continue \u2014 ${course.next.label}` : `Start \u2014 ${course.next.label}`"
|
|
151
|
+
data-jun-course="continue"
|
|
152
|
+
/>
|
|
153
|
+
</div>
|
|
154
|
+
<p
|
|
155
|
+
v-else-if="course.total && course.done === course.total"
|
|
156
|
+
class="mt-6 text-sm text-muted"
|
|
157
|
+
data-jun-course="finished"
|
|
158
|
+
>
|
|
159
|
+
You have been through every step. Nothing here locks, so revisit any of them.
|
|
160
|
+
</p>
|
|
161
|
+
</ClientOnly>
|
|
162
|
+
|
|
163
|
+
<hr class="my-8 border-default">
|
|
164
|
+
|
|
165
|
+
<p
|
|
166
|
+
v-if="!course.total"
|
|
167
|
+
class="text-sm text-muted"
|
|
168
|
+
>
|
|
169
|
+
No steps yet — add a page under this one and it becomes step one.
|
|
170
|
+
</p>
|
|
171
|
+
|
|
172
|
+
<ol
|
|
173
|
+
v-else
|
|
174
|
+
class="flex flex-col gap-2"
|
|
175
|
+
data-jun-course="steps"
|
|
176
|
+
>
|
|
177
|
+
<li
|
|
178
|
+
v-for="step in course.steps"
|
|
179
|
+
:key="step.id"
|
|
180
|
+
class="jun-card flex items-center gap-3 rounded-xl px-3.5 py-3"
|
|
181
|
+
:data-jun-step="step.id"
|
|
182
|
+
:data-jun-step-done="step.done ? 'true' : 'false'"
|
|
183
|
+
>
|
|
184
|
+
<!-- The tick is a BUTTON, not a checkbox: it is a request to the server,
|
|
185
|
+
which may refuse, so its state must follow the answer rather than the
|
|
186
|
+
click. Client-only for the same reason the bar is. -->
|
|
187
|
+
<ClientOnly>
|
|
188
|
+
<UButton
|
|
189
|
+
:icon="step.done ? 'i-lucide-circle-check-big' : 'i-lucide-circle'"
|
|
190
|
+
:color="step.done ? 'primary' : 'neutral'"
|
|
191
|
+
variant="ghost"
|
|
192
|
+
size="sm"
|
|
193
|
+
:loading="pending === step.id"
|
|
194
|
+
:aria-label="step.done ? `Mark ${step.label} as not done` : `Mark ${step.label} as done`"
|
|
195
|
+
:data-jun-step-toggle="step.id"
|
|
196
|
+
@click="toggle(step.id)"
|
|
197
|
+
/>
|
|
198
|
+
<template #fallback>
|
|
199
|
+
<span
|
|
200
|
+
class="size-4 shrink-0 rounded-full ring-1 ring-black/15 dark:ring-white/20"
|
|
201
|
+
aria-hidden="true"
|
|
202
|
+
/>
|
|
203
|
+
</template>
|
|
204
|
+
</ClientOnly>
|
|
205
|
+
|
|
206
|
+
<span
|
|
207
|
+
v-if="view.numbers"
|
|
208
|
+
class="w-5 shrink-0 text-[11px] text-dimmed tabular-nums"
|
|
209
|
+
>{{ step.number }}</span>
|
|
210
|
+
|
|
211
|
+
<NuxtLink
|
|
212
|
+
:to="getDocUrl(step.id)"
|
|
213
|
+
class="min-w-0 flex-1 truncate text-[15px] underline-offset-4 hover:underline"
|
|
214
|
+
:class="step.done ? 'text-muted' : ''"
|
|
215
|
+
>
|
|
216
|
+
{{ step.label }}
|
|
217
|
+
</NuxtLink>
|
|
218
|
+
|
|
219
|
+
<ClientOnly>
|
|
220
|
+
<span
|
|
221
|
+
v-if="view.room && step.finishedBy"
|
|
222
|
+
class="shrink-0 text-[11px] text-dimmed tabular-nums"
|
|
223
|
+
:data-jun-step-count="step.id"
|
|
224
|
+
>{{ step.finishedBy }}</span>
|
|
225
|
+
</ClientOnly>
|
|
226
|
+
</li>
|
|
227
|
+
</ol>
|
|
228
|
+
</div>
|
|
229
|
+
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
docId: string;
|
|
3
|
+
docLabel?: string;
|
|
4
|
+
docMeta?: Record<string, unknown>;
|
|
5
|
+
childProvider?: unknown;
|
|
6
|
+
editable?: boolean;
|
|
7
|
+
};
|
|
8
|
+
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>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -11,8 +11,10 @@ import {
|
|
|
11
11
|
useJunListDnD,
|
|
12
12
|
useJunRename,
|
|
13
13
|
useJunStudio,
|
|
14
|
-
useJunViewingAccent
|
|
14
|
+
useJunViewingAccent,
|
|
15
|
+
useJunViewOptions
|
|
15
16
|
} from "#imports";
|
|
17
|
+
import { junViewSpecFor } from "../../utils/junViewSpecs";
|
|
16
18
|
const props = defineProps({
|
|
17
19
|
docId: { type: String, required: true },
|
|
18
20
|
docLabel: { type: String, required: false },
|
|
@@ -27,6 +29,10 @@ const { getEntry } = useDocTree();
|
|
|
27
29
|
const { editing } = useJunStudio();
|
|
28
30
|
const { renameDoc } = useJunRename();
|
|
29
31
|
const { accentInsetStyle, accentTitle } = useJunViewingAccent();
|
|
32
|
+
const { view, set: setView, reset: resetView, isDefault: viewIsDefault, options: viewOptions } = useJunViewOptions(props.docId, {
|
|
33
|
+
typeKey: "cv",
|
|
34
|
+
options: junViewSpecFor("cv")
|
|
35
|
+
}, () => props.docMeta);
|
|
30
36
|
const pageTitle = computed(() => getEntry(props.docId)?.label ?? props.docLabel ?? "Journey");
|
|
31
37
|
const subtitle = computed(() => {
|
|
32
38
|
const meta = getEntry(props.docId)?.meta;
|
|
@@ -101,11 +107,33 @@ const {
|
|
|
101
107
|
@drop="onContainerDrop"
|
|
102
108
|
>
|
|
103
109
|
<JunPageHero
|
|
110
|
+
:doc-id="docId"
|
|
104
111
|
:title="pageTitle"
|
|
105
112
|
:subtitle="subtitle"
|
|
106
113
|
:editable="editing"
|
|
107
114
|
@rename="renamePage"
|
|
108
115
|
@rename-subtitle="renameSubtitle"
|
|
116
|
+
>
|
|
117
|
+
<template #right>
|
|
118
|
+
<JunViewControls
|
|
119
|
+
v-if="editing"
|
|
120
|
+
:options="viewOptions"
|
|
121
|
+
:values="view"
|
|
122
|
+
:is-default="viewIsDefault"
|
|
123
|
+
@set="setView"
|
|
124
|
+
@reset="resetView"
|
|
125
|
+
/>
|
|
126
|
+
</template>
|
|
127
|
+
</JunPageHero>
|
|
128
|
+
|
|
129
|
+
<!-- The page's own prose, above its children. Collapses to nothing
|
|
130
|
+
when the document has no body, which is every site that has never
|
|
131
|
+
written one. -->
|
|
132
|
+
<JunCollectionIntro
|
|
133
|
+
:doc-id="docId"
|
|
134
|
+
:doc-label="pageTitle"
|
|
135
|
+
:doc-meta="docMeta"
|
|
136
|
+
placeholder="What this timeline covers…"
|
|
109
137
|
/>
|
|
110
138
|
|
|
111
139
|
<div
|
|
@@ -139,7 +167,11 @@ const {
|
|
|
139
167
|
v-else
|
|
140
168
|
class="relative"
|
|
141
169
|
>
|
|
170
|
+
<!-- The rail, and the dot on each station below it, ARE the timeline
|
|
171
|
+
variant. The list variant drops both and reclaims the 3rem of
|
|
172
|
+
left padding they need. -->
|
|
142
173
|
<div
|
|
174
|
+
v-if="view.variant === 'timeline'"
|
|
143
175
|
aria-hidden="true"
|
|
144
176
|
class="absolute top-2 bottom-2 left-[19px] w-px bg-linear-to-b from-transparent via-black/15 to-transparent dark:via-white/15"
|
|
145
177
|
/>
|
|
@@ -148,14 +180,18 @@ const {
|
|
|
148
180
|
v-for="(s, i) in stations"
|
|
149
181
|
:key="s.id"
|
|
150
182
|
v-motion="junMotion(junStagger(Math.min(i, 6), { delayMs: 60, durationMs: 450, yPx: 18 }))"
|
|
151
|
-
class="relative
|
|
183
|
+
class="relative last:pb-0"
|
|
152
184
|
:data-dnd-id="s.id"
|
|
153
185
|
:draggable="editing ? true : void 0"
|
|
154
|
-
:class="
|
|
186
|
+
:class="[
|
|
187
|
+
view.variant === 'timeline' ? 'pb-6 pl-12' : 'pb-2.5',
|
|
188
|
+
editing ? dragId === s.id ? 'cursor-grabbing opacity-70' : 'cursor-grab' : ''
|
|
189
|
+
]"
|
|
155
190
|
@dragstart="onItemDragStart(s, $event)"
|
|
156
191
|
@dragend="onItemDragEnd($event)"
|
|
157
192
|
>
|
|
158
193
|
<div
|
|
194
|
+
v-if="view.variant === 'timeline'"
|
|
159
195
|
aria-hidden="true"
|
|
160
196
|
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
197
|
/>
|
|
@@ -179,6 +215,7 @@ const {
|
|
|
179
215
|
|
|
180
216
|
<div class="flex items-start gap-3.5">
|
|
181
217
|
<span
|
|
218
|
+
v-if="view.icons"
|
|
182
219
|
class="mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-lg bg-black/5 text-black/60 ring-1 ring-black/5 dark:bg-white/10 dark:text-white/70 dark:ring-white/10"
|
|
183
220
|
>
|
|
184
221
|
<UIcon
|
|
@@ -189,7 +226,7 @@ const {
|
|
|
189
226
|
|
|
190
227
|
<div class="min-w-0 flex-1">
|
|
191
228
|
<p
|
|
192
|
-
v-if="periodFor(s) || s.meta?.place"
|
|
229
|
+
v-if="view.periods && (periodFor(s) || s.meta?.place)"
|
|
193
230
|
class="mb-1 truncate text-[10px] font-medium tracking-[0.22em] text-dimmed uppercase"
|
|
194
231
|
>
|
|
195
232
|
{{ periodFor(s) }}<template v-if="periodFor(s) && s.meta?.place"> · </template>{{ s.meta?.place }}
|
|
@@ -198,7 +235,7 @@ const {
|
|
|
198
235
|
{{ s.label }}
|
|
199
236
|
</h3>
|
|
200
237
|
<p
|
|
201
|
-
v-if="s.meta?.description"
|
|
238
|
+
v-if="s.meta?.description && view.descriptions"
|
|
202
239
|
class="mt-1 line-clamp-2 text-xs text-muted sm:text-sm"
|
|
203
240
|
>
|
|
204
241
|
{{ s.meta.description }}
|
|
@@ -215,7 +252,8 @@ const {
|
|
|
215
252
|
|
|
216
253
|
<div
|
|
217
254
|
v-if="editing"
|
|
218
|
-
class="mt-1.5 flex flex-wrap gap-1.5 pr-2
|
|
255
|
+
class="mt-1.5 flex flex-wrap gap-1.5 pr-2"
|
|
256
|
+
:class="view.icons ? 'pl-[3.25rem]' : 'pl-4'"
|
|
219
257
|
>
|
|
220
258
|
<AMetaChip
|
|
221
259
|
field-type="daterange"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
docId: string;
|
|
3
|
+
docLabel?: string;
|
|
4
|
+
docMeta?: Record<string, unknown>;
|
|
5
|
+
editable?: boolean;
|
|
6
|
+
};
|
|
7
|
+
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>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|