@abraca/junis 2.83.0 → 2.85.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/README.md +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +49 -5
- package/dist/runtime/assets/css/jun.css +1 -1
- package/dist/runtime/components/JunBlobBackdrop.client.vue +1 -1
- package/dist/runtime/components/JunCampfireChat.vue +6 -4
- package/dist/runtime/components/JunCampfireComposer.d.vue.ts +27 -0
- package/dist/runtime/components/JunCampfireComposer.vue +158 -0
- package/dist/runtime/components/JunCampfireComposer.vue.d.ts +27 -0
- package/dist/runtime/components/JunCampfirePanel.vue +8 -18
- package/dist/runtime/components/JunCampfirePresence.client.vue +102 -2
- package/dist/runtime/components/JunCampfireReactions.d.vue.ts +13 -0
- package/dist/runtime/components/JunCampfireReactions.vue +142 -0
- package/dist/runtime/components/JunCampfireReactions.vue.d.ts +13 -0
- package/dist/runtime/components/JunCampfireRoster.vue +82 -31
- package/dist/runtime/components/JunHead.vue +37 -5
- package/dist/runtime/components/JunLogo.vue +10 -45
- package/dist/runtime/components/JunMosaicPane.client.d.vue.ts +9 -0
- package/dist/runtime/components/JunMosaicPane.client.vue +63 -3
- package/dist/runtime/components/JunMosaicPane.client.vue.d.ts +9 -0
- package/dist/runtime/components/JunPatternBackdrop.client.vue +1 -1
- package/dist/runtime/components/JunShaderBackdrop.client.vue +1 -1
- package/dist/runtime/components/JunStudioBar.client.vue +2 -1
- package/dist/runtime/components/renderers/JunConfigRenderer.vue +14 -14
- package/dist/runtime/components/renderers/JunEntryRenderer.vue +6 -8
- package/dist/runtime/components/renderers/JunFestivalRenderer.vue +1 -1
- package/dist/runtime/components/renderers/JunHomeRenderer.vue +3 -3
- package/dist/runtime/components/renderers/JunLiveRenderer.vue +1 -1
- package/dist/runtime/components/renderers/JunMosaicRenderer.vue +14 -12
- package/dist/runtime/components/renderers/JunNowRenderer.vue +2 -2
- package/dist/runtime/components/renderers/JunUsesRenderer.vue +6 -8
- package/dist/runtime/composables/useJunCampfire.d.ts +2 -0
- package/dist/runtime/composables/useJunCampfire.js +11 -1
- package/dist/runtime/composables/useJunDocMenu.d.ts +16 -1
- package/dist/runtime/composables/useJunDocMenu.js +8 -0
- package/dist/runtime/composables/useJunOptions.d.ts +1 -0
- package/dist/runtime/composables/useJunTheme.js +9 -48
- package/dist/runtime/layouts/jun.vue +10 -0
- 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/plugins/jun-janitor.js +2 -1
- 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/utils/junBrand.d.ts +4 -0
- package/dist/runtime/server/utils/junBrand.js +9 -0
- package/dist/runtime/server/utils/junIcon.d.ts +44 -0
- package/dist/runtime/server/utils/junIcon.js +374 -0
- package/dist/runtime/types.d.ts +51 -2
- 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/package.json +7 -7
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
useJunPressDrag,
|
|
15
15
|
useJunStudio
|
|
16
16
|
} from "#imports";
|
|
17
|
-
import { junCampfireLabel } from "../composables/useJunCampfire";
|
|
17
|
+
import { junCampfireLabel, useJunCampfireNames } from "../composables/useJunCampfire";
|
|
18
18
|
const settings = useJunCampfireSettings();
|
|
19
19
|
const abra = useAbracadabra();
|
|
20
20
|
const { others, self, everyone } = useJunCampfirePeople();
|
|
@@ -86,6 +86,9 @@ const emberStyle = computed(() => ({
|
|
|
86
86
|
"--jun-bar-stack": `calc(${stack.value} + 2.5rem)`,
|
|
87
87
|
"--jun-bar-inset": "2.5rem"
|
|
88
88
|
}));
|
|
89
|
+
const bubbleStyle = computed(() => ({
|
|
90
|
+
"--jun-bar-stack": `calc(${stack.value} + var(--jun-hearth-h, 0px) + 0.5rem${isFollowing.value && followingUser.value ? " + 2.25rem" : ""})`
|
|
91
|
+
}));
|
|
89
92
|
const PILL_SIZE = {
|
|
90
93
|
sm: "gap-2 py-1 pr-3 pl-2 text-[11px]",
|
|
91
94
|
md: "gap-2.5 py-1.5 pr-3.5 pl-2.5 text-xs",
|
|
@@ -134,6 +137,69 @@ watch(
|
|
|
134
137
|
},
|
|
135
138
|
{ immediate: true }
|
|
136
139
|
);
|
|
140
|
+
const BUBBLE_TTL = 12e3;
|
|
141
|
+
const BUBBLE_MAX = 3;
|
|
142
|
+
const BUBBLE_CHARS = 90;
|
|
143
|
+
const bubbles = ref([]);
|
|
144
|
+
const bubbleTimers = /* @__PURE__ */ new Map();
|
|
145
|
+
const { nameFor } = useJunCampfireNames();
|
|
146
|
+
function dropBubble(key) {
|
|
147
|
+
const t = bubbleTimers.get(key);
|
|
148
|
+
if (t) clearTimeout(t);
|
|
149
|
+
bubbleTimers.delete(key);
|
|
150
|
+
bubbles.value = bubbles.value.filter((b) => b.key !== key);
|
|
151
|
+
}
|
|
152
|
+
function pushBubble(b) {
|
|
153
|
+
bubbles.value = [...bubbles.value, b].slice(-BUBBLE_MAX);
|
|
154
|
+
bubbleTimers.set(b.key, setTimeout(() => dropBubble(b.key), BUBBLE_TTL));
|
|
155
|
+
}
|
|
156
|
+
function clearBubbles() {
|
|
157
|
+
for (const t of bubbleTimers.values()) clearTimeout(t);
|
|
158
|
+
bubbleTimers.clear();
|
|
159
|
+
bubbles.value = [];
|
|
160
|
+
}
|
|
161
|
+
function speaker(senderId, fallbackName) {
|
|
162
|
+
const person = others.value.find((p) => p.publicKey === senderId);
|
|
163
|
+
return {
|
|
164
|
+
name: person?.name || fallbackName || nameFor(senderId),
|
|
165
|
+
color: person?.color || "var(--ui-text-muted)"
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
const arrivedAt = Date.now();
|
|
169
|
+
const bubbledKeys = /* @__PURE__ */ new Set();
|
|
170
|
+
watch(
|
|
171
|
+
() => channelDocId.value ? messagesByChannel.value[channelDocId.value] : void 0,
|
|
172
|
+
(list) => {
|
|
173
|
+
if (!list?.length) return;
|
|
174
|
+
const mine = abra.publicKeyB64.value;
|
|
175
|
+
for (const m of list) {
|
|
176
|
+
const key = m.id || `${m.senderId}:${m.createdAt}`;
|
|
177
|
+
if (bubbledKeys.has(key)) continue;
|
|
178
|
+
bubbledKeys.add(key);
|
|
179
|
+
if (m.senderId === mine || m.createdAt <= arrivedAt) continue;
|
|
180
|
+
if (!settings.value.bubbles || open.value) continue;
|
|
181
|
+
const text = String(m.content ?? "").trim();
|
|
182
|
+
if (!text) continue;
|
|
183
|
+
const who = speaker(m.senderId, m.senderName);
|
|
184
|
+
pushBubble({
|
|
185
|
+
key,
|
|
186
|
+
name: who.name,
|
|
187
|
+
color: who.color,
|
|
188
|
+
text: text.length > BUBBLE_CHARS ? `${text.slice(0, BUBBLE_CHARS - 1)}\u2026` : text
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
{ deep: true }
|
|
193
|
+
);
|
|
194
|
+
watch(open, (isOpen) => {
|
|
195
|
+
if (isOpen) clearBubbles();
|
|
196
|
+
});
|
|
197
|
+
function openFromBubble() {
|
|
198
|
+
clearBubbles();
|
|
199
|
+
wantedTab.value = "fire";
|
|
200
|
+
open.value = true;
|
|
201
|
+
markRead();
|
|
202
|
+
}
|
|
137
203
|
const { peers: peerReactions, setLocal } = useAAEphemeral("campfire:react");
|
|
138
204
|
const EMBER_TTL = 1900;
|
|
139
205
|
const embers = [];
|
|
@@ -223,6 +289,40 @@ onBeforeUnmount(() => {
|
|
|
223
289
|
/>
|
|
224
290
|
</Transition>
|
|
225
291
|
|
|
292
|
+
<!-- Speech bubbles. They occupy the same corner slot the panel would, so
|
|
293
|
+
they read as the panel's quiet form rather than as a separate widget
|
|
294
|
+
— and they clear the follow banner when both are up. -->
|
|
295
|
+
<TransitionGroup
|
|
296
|
+
v-if="bubbles.length && !open"
|
|
297
|
+
name="jun-campfire-bubble"
|
|
298
|
+
tag="div"
|
|
299
|
+
class="jun-bar jun-campfire-bubbles"
|
|
300
|
+
:data-jun-corner="corner"
|
|
301
|
+
:style="bubbleStyle"
|
|
302
|
+
>
|
|
303
|
+
<button
|
|
304
|
+
v-for="b in bubbles"
|
|
305
|
+
:key="b.key"
|
|
306
|
+
type="button"
|
|
307
|
+
class="jun-bar-pill jun-chrome jun-campfire-bubble gap-2 rounded-2xl py-1.5 pr-3 pl-2.5"
|
|
308
|
+
:aria-label="`${b.name}: ${b.text}. Open ${settings.title}`"
|
|
309
|
+
@click="openFromBubble()"
|
|
310
|
+
>
|
|
311
|
+
<span
|
|
312
|
+
class="jun-campfire-bubble-mark mt-0.5 size-2 shrink-0 rounded-full"
|
|
313
|
+
:style="{ background: b.color }"
|
|
314
|
+
/>
|
|
315
|
+
<span class="min-w-0 text-left">
|
|
316
|
+
<span
|
|
317
|
+
class="block truncate text-[10px] tracking-wide text-neutral-400 dark:text-neutral-500"
|
|
318
|
+
>{{ b.name }}</span>
|
|
319
|
+
<span
|
|
320
|
+
class="block text-xs leading-snug text-neutral-700 dark:text-neutral-200"
|
|
321
|
+
>{{ b.text }}</span>
|
|
322
|
+
</span>
|
|
323
|
+
</button>
|
|
324
|
+
</TransitionGroup>
|
|
325
|
+
|
|
226
326
|
<Transition name="jun-campfire-rise">
|
|
227
327
|
<button
|
|
228
328
|
v-if="isFollowing && followingUser && !open"
|
|
@@ -317,5 +417,5 @@ onBeforeUnmount(() => {
|
|
|
317
417
|
</template>
|
|
318
418
|
|
|
319
419
|
<style scoped>
|
|
320
|
-
.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)}@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}}
|
|
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}}
|
|
321
421
|
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** The owner's quick row, already validated and capped. */
|
|
3
|
+
set: string[];
|
|
4
|
+
/** The action key under a dragging pointer — see `useJunPressDrag`. */
|
|
5
|
+
hot?: string | null;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
react: (emoji: string) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onReact?: ((emoji: string) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
set: { type: Array, required: true },
|
|
5
|
+
hot: { type: [String, null], required: false }
|
|
6
|
+
});
|
|
7
|
+
const emit = defineEmits(["react"]);
|
|
8
|
+
const GROUPS = [
|
|
9
|
+
{ label: "Warmth", emoji: ["\u{1F525}", "\u2728", "\u2B50", "\u{1F31F}", "\u{1F4AB}", "\u{1F389}", "\u{1F38A}", "\u{1F973}"] },
|
|
10
|
+
{ label: "Faces", emoji: ["\u{1F604}", "\u{1F60A}", "\u{1F642}", "\u{1F60D}", "\u{1F929}", "\u{1F602}", "\u{1F972}", "\u{1F62E}", "\u{1F914}", "\u{1F605}", "\u{1F634}", "\u{1FAE0}"] },
|
|
11
|
+
{ label: "Hands", emoji: ["\u{1F44B}", "\u{1F44F}", "\u{1F64C}", "\u{1F91D}", "\u{1F44D}", "\u{1F44C}", "\u{1F919}", "\u270C\uFE0F", "\u{1F64F}", "\u{1F4AA}"] },
|
|
12
|
+
{ label: "Hearts", emoji: ["\u2764\uFE0F", "\u{1F9E1}", "\u{1F49B}", "\u{1F49A}", "\u{1F499}", "\u{1F49C}", "\u{1F5A4}", "\u{1F90D}", "\u{1F496}", "\u{1F494}"] },
|
|
13
|
+
{ label: "Around", emoji: ["\u2615", "\u{1F375}", "\u{1F37A}", "\u{1F377}", "\u{1F370}", "\u{1F355}", "\u{1F319}", "\u2600\uFE0F", "\u{1F327}\uFE0F", "\u{1F30A}", "\u{1F331}", "\u{1F342}"] },
|
|
14
|
+
{ label: "Marks", emoji: ["\u{1F440}", "\u{1F4A1}", "\u{1F4CC}", "\u{1F516}", "\u{1F3A7}", "\u{1F4F7}", "\u270F\uFE0F", "\u{1F9ED}", "\u{1F5FA}\uFE0F", "\u{1F56F}\uFE0F"] }
|
|
15
|
+
];
|
|
16
|
+
const RECENT_KEY = "jun:campfire:reactions";
|
|
17
|
+
const RECENT_CAP = 8;
|
|
18
|
+
function loadRecent() {
|
|
19
|
+
if (typeof localStorage === "undefined") return [];
|
|
20
|
+
try {
|
|
21
|
+
const raw = JSON.parse(localStorage.getItem(RECENT_KEY) || "[]");
|
|
22
|
+
return Array.isArray(raw) ? raw.filter((e) => typeof e === "string") : [];
|
|
23
|
+
} catch {
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const recent = ref(loadRecent());
|
|
28
|
+
function remember(emoji) {
|
|
29
|
+
recent.value = [emoji, ...recent.value.filter((e) => e !== emoji)].slice(0, RECENT_CAP);
|
|
30
|
+
if (typeof localStorage === "undefined") return;
|
|
31
|
+
try {
|
|
32
|
+
localStorage.setItem(RECENT_KEY, JSON.stringify(recent.value));
|
|
33
|
+
} catch {
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const shownRecent = computed(() => recent.value.filter((e) => !props.set.includes(e)));
|
|
37
|
+
const open = ref(false);
|
|
38
|
+
function pick(emoji) {
|
|
39
|
+
remember(emoji);
|
|
40
|
+
emit("react", emoji);
|
|
41
|
+
open.value = false;
|
|
42
|
+
}
|
|
43
|
+
function quick(emoji) {
|
|
44
|
+
emit("react", emoji);
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<template>
|
|
49
|
+
<div
|
|
50
|
+
class="flex items-center gap-1.5 border-t border-neutral-900/5 px-3 py-2 dark:border-white/10"
|
|
51
|
+
>
|
|
52
|
+
<!-- ONE row, always. The panel is 17–23rem wide and its proportions are
|
|
53
|
+
load-bearing (see the golden-ratio note in `JunCampfirePanel`), so a
|
|
54
|
+
quick row that wrapped to a second line took 35px off the roster and
|
|
55
|
+
the chat at every size.
|
|
56
|
+
`size-7` + `gap-1` rather than the `size-8` + `gap-1.5` this row wore
|
|
57
|
+
when it held four: eight buttons and `+` measure 284px against the
|
|
58
|
+
296px a `md` panel has to give, so the default set fits whole at `md`
|
|
59
|
+
and `lg`. Only `sm` scrolls, and a twelve-emoji set scrolls everywhere
|
|
60
|
+
— which is why the strip scrolls at all rather than assuming. -->
|
|
61
|
+
<div class="jun-scrollbar-hide flex min-w-0 flex-1 items-center gap-1 overflow-x-auto">
|
|
62
|
+
<button
|
|
63
|
+
v-for="r in set"
|
|
64
|
+
:key="r"
|
|
65
|
+
type="button"
|
|
66
|
+
:data-jun-action="`react:${r}`"
|
|
67
|
+
class="jun-campfire-react inline-flex size-7 shrink-0 items-center justify-center rounded-lg
|
|
68
|
+
text-base"
|
|
69
|
+
:class="hot === `react:${r}` ? 'is-hot' : ''"
|
|
70
|
+
:aria-label="`React ${r}`"
|
|
71
|
+
@click="quick(r)"
|
|
72
|
+
>
|
|
73
|
+
{{ r }}
|
|
74
|
+
</button>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<UPopover
|
|
78
|
+
v-model:open="open"
|
|
79
|
+
:content="{ side: 'top', align: 'end' }"
|
|
80
|
+
>
|
|
81
|
+
<button
|
|
82
|
+
type="button"
|
|
83
|
+
class="jun-campfire-react jun-campfire-more inline-flex size-7 shrink-0 items-center
|
|
84
|
+
justify-center rounded-lg text-neutral-400 dark:text-neutral-500"
|
|
85
|
+
:class="open ? 'is-on' : ''"
|
|
86
|
+
aria-label="More reactions"
|
|
87
|
+
>
|
|
88
|
+
<UIcon
|
|
89
|
+
name="i-lucide-smile-plus"
|
|
90
|
+
class="size-4"
|
|
91
|
+
/>
|
|
92
|
+
</button>
|
|
93
|
+
|
|
94
|
+
<template #content>
|
|
95
|
+
<div class="jun-campfire-picker jun-scrollbar-hide max-h-72 w-64 overflow-y-auto p-2">
|
|
96
|
+
<template v-if="shownRecent.length">
|
|
97
|
+
<p class="jun-campfire-picker-label">
|
|
98
|
+
Recent
|
|
99
|
+
</p>
|
|
100
|
+
<div class="grid grid-cols-8 gap-0.5 pb-1">
|
|
101
|
+
<button
|
|
102
|
+
v-for="r in shownRecent"
|
|
103
|
+
:key="`recent:${r}`"
|
|
104
|
+
type="button"
|
|
105
|
+
class="jun-campfire-react inline-flex size-7 items-center justify-center rounded-md text-base"
|
|
106
|
+
:aria-label="`React ${r}`"
|
|
107
|
+
@click="pick(r)"
|
|
108
|
+
>
|
|
109
|
+
{{ r }}
|
|
110
|
+
</button>
|
|
111
|
+
</div>
|
|
112
|
+
</template>
|
|
113
|
+
|
|
114
|
+
<template
|
|
115
|
+
v-for="g in GROUPS"
|
|
116
|
+
:key="g.label"
|
|
117
|
+
>
|
|
118
|
+
<p class="jun-campfire-picker-label">
|
|
119
|
+
{{ g.label }}
|
|
120
|
+
</p>
|
|
121
|
+
<div class="grid grid-cols-8 gap-0.5 pb-1">
|
|
122
|
+
<button
|
|
123
|
+
v-for="r in g.emoji"
|
|
124
|
+
:key="r"
|
|
125
|
+
type="button"
|
|
126
|
+
class="jun-campfire-react inline-flex size-7 items-center justify-center rounded-md text-base"
|
|
127
|
+
:aria-label="`React ${r}`"
|
|
128
|
+
@click="pick(r)"
|
|
129
|
+
>
|
|
130
|
+
{{ r }}
|
|
131
|
+
</button>
|
|
132
|
+
</div>
|
|
133
|
+
</template>
|
|
134
|
+
</div>
|
|
135
|
+
</template>
|
|
136
|
+
</UPopover>
|
|
137
|
+
</div>
|
|
138
|
+
</template>
|
|
139
|
+
|
|
140
|
+
<style scoped>
|
|
141
|
+
.jun-campfire-react{background:hsla(0,0%,100%,.5);box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);transition:transform .2s cubic-bezier(.22,1,.36,1)}:root.dark .jun-campfire-react{background:hsla(0,0%,100%,.05);box-shadow:inset 0 0 0 1px hsla(0,0%,100%,.1)}.jun-campfire-react:hover{transform:translateY(-2px)}.jun-campfire-react:active{transform:scale(.92)}@media (prefers-reduced-motion:reduce){.jun-campfire-react{transition:none}.jun-campfire-react:hover{transform:none}}.jun-campfire-more.is-on{background:rgba(0,0,0,.06);color:var(--color-neutral-700)}:root.dark .jun-campfire-more.is-on{background:hsla(0,0%,100%,.08);color:var(--color-neutral-200)}.jun-campfire-picker-label{color:var(--color-neutral-400);font-size:10px;letter-spacing:.06em;padding:.25rem .25rem .125rem;text-transform:uppercase}:root.dark .jun-campfire-picker-label{color:var(--color-neutral-500)}
|
|
142
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** The owner's quick row, already validated and capped. */
|
|
3
|
+
set: string[];
|
|
4
|
+
/** The action key under a dragging pointer — see `useJunPressDrag`. */
|
|
5
|
+
hot?: string | null;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
react: (emoji: string) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onReact?: ((emoji: string) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -24,6 +24,7 @@ function placeFor(p) {
|
|
|
24
24
|
if (p.page) return { label: p.page === "/" ? "the front page" : p.page.slice(1), to: p.page };
|
|
25
25
|
return { label: "somewhere", to: null };
|
|
26
26
|
}
|
|
27
|
+
const rows = computed(() => props.people.map((p) => ({ p, place: placeFor(p) })));
|
|
27
28
|
function initial(name) {
|
|
28
29
|
return [...name.trim()][0]?.toUpperCase() ?? "\xB7";
|
|
29
30
|
}
|
|
@@ -34,7 +35,7 @@ function canFollow(p) {
|
|
|
34
35
|
return props.follow && !p.isSelf && !p.isBot && p.clientId >= 0;
|
|
35
36
|
}
|
|
36
37
|
const FACEPILE_MAX = 7;
|
|
37
|
-
const faces = computed(() =>
|
|
38
|
+
const faces = computed(() => rows.value.slice(0, FACEPILE_MAX));
|
|
38
39
|
const overflow = computed(() => Math.max(0, props.people.length - FACEPILE_MAX));
|
|
39
40
|
const { canAdmin, grants, busy, setRole, revoke, refresh } = useJunPeopleAdmin();
|
|
40
41
|
onMounted(() => {
|
|
@@ -90,7 +91,7 @@ function roleMenu(p) {
|
|
|
90
91
|
class="space-y-0.5 px-1.5 py-1"
|
|
91
92
|
>
|
|
92
93
|
<li
|
|
93
|
-
v-for="p in
|
|
94
|
+
v-for="{ p, place } in rows"
|
|
94
95
|
:key="p.publicKey || p.clientId"
|
|
95
96
|
class="jun-campfire-person group flex items-center gap-2.5 rounded-lg px-2 py-1.5"
|
|
96
97
|
:class="p.idle ? 'opacity-55' : ''"
|
|
@@ -109,7 +110,15 @@ function roleMenu(p) {
|
|
|
109
110
|
/>
|
|
110
111
|
</span>
|
|
111
112
|
|
|
112
|
-
|
|
113
|
+
<!-- THE WHOLE identity block is the journey — name, badges and the place
|
|
114
|
+
line together. See `rows` for why it is not the second line alone. -->
|
|
115
|
+
<component
|
|
116
|
+
:is="place.to ? NuxtLink : 'span'"
|
|
117
|
+
:to="place.to ?? void 0"
|
|
118
|
+
class="jun-campfire-who min-w-0 flex-1"
|
|
119
|
+
:class="place.to ? 'is-linked' : ''"
|
|
120
|
+
:title="place.to ? `Go to ${place.label}` : void 0"
|
|
121
|
+
>
|
|
113
122
|
<span class="flex items-baseline gap-1.5">
|
|
114
123
|
<span class="truncate text-sm text-neutral-800 dark:text-neutral-100">{{ p.name }}</span>
|
|
115
124
|
<span
|
|
@@ -130,6 +139,13 @@ function roleMenu(p) {
|
|
|
130
139
|
v-if="canAdmin && grantFor(p)"
|
|
131
140
|
class="jun-campfire-grant"
|
|
132
141
|
>{{ grantFor(p) }}</span>
|
|
142
|
+
<!-- Only where there is somewhere to go, and only on hover: a
|
|
143
|
+
permanent arrow on every row is eight arrows saying nothing. -->
|
|
144
|
+
<UIcon
|
|
145
|
+
v-if="place.to"
|
|
146
|
+
name="i-lucide-corner-up-right"
|
|
147
|
+
class="jun-campfire-goto size-3 shrink-0 text-neutral-400 dark:text-neutral-500"
|
|
148
|
+
/>
|
|
133
149
|
</span>
|
|
134
150
|
<span class="flex items-center gap-1 text-[11px] text-neutral-400 dark:text-neutral-500">
|
|
135
151
|
<UIcon
|
|
@@ -137,19 +153,28 @@ function roleMenu(p) {
|
|
|
137
153
|
:name="`i-lucide-${p.statusIcon}`"
|
|
138
154
|
class="size-3 shrink-0"
|
|
139
155
|
/>
|
|
156
|
+
<!-- Status and place SHARE this line. They used to be alternatives,
|
|
157
|
+
which cost anyone with a status their only link. -->
|
|
140
158
|
<span
|
|
141
159
|
v-if="p.statusText"
|
|
142
160
|
class="truncate"
|
|
143
161
|
>{{ p.statusText }}</span>
|
|
144
|
-
<
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
162
|
+
<span
|
|
163
|
+
v-if="p.statusText && showPages"
|
|
164
|
+
class="shrink-0 opacity-50"
|
|
165
|
+
aria-hidden="true"
|
|
166
|
+
>·</span>
|
|
167
|
+
<!-- The verb is dropped for yourself and after a status: "here, with
|
|
168
|
+
you" is already a sentence, and "reading" in front of it is not.
|
|
169
|
+
`placeFor` returns the phrase; this only decides the verb. -->
|
|
170
|
+
<span
|
|
171
|
+
v-if="showPages"
|
|
148
172
|
class="truncate"
|
|
149
|
-
|
|
150
|
-
|
|
173
|
+
>{{
|
|
174
|
+
p.isSelf || p.statusText ? place.label : `${p.idle ? "resting on" : "reading"} ${place.label}`
|
|
175
|
+
}}</span>
|
|
151
176
|
</span>
|
|
152
|
-
</
|
|
177
|
+
</component>
|
|
153
178
|
|
|
154
179
|
<button
|
|
155
180
|
v-if="canFollow(p)"
|
|
@@ -196,24 +221,46 @@ function roleMenu(p) {
|
|
|
196
221
|
v-else-if="style === 'grid'"
|
|
197
222
|
class="grid grid-cols-4 gap-1.5 p-2.5"
|
|
198
223
|
>
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
224
|
+
<!-- A tile GOES THERE. Following is a separate, smaller control in the
|
|
225
|
+
corner — it used to be the tile's only action, which meant the one
|
|
226
|
+
obvious thing to do with a person's face did not take you to them. -->
|
|
227
|
+
<div
|
|
228
|
+
v-for="{ p, place } in rows"
|
|
202
229
|
:key="p.publicKey || p.clientId"
|
|
203
|
-
|
|
204
|
-
class="jun-campfire-tile flex flex-col items-center gap-1 rounded-lg px-1 py-2"
|
|
205
|
-
:class="[p.idle ? 'opacity-55' : '', isFollowed(p) ? 'is-on' : '']"
|
|
206
|
-
:title="showPages ? `${p.name} \u2014 ${placeFor(p).label}` : p.name"
|
|
207
|
-
@click="canFollow(p) && emit('follow', p.clientId)"
|
|
230
|
+
class="jun-campfire-cell relative"
|
|
208
231
|
>
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
:
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
{
|
|
215
|
-
|
|
216
|
-
|
|
232
|
+
<component
|
|
233
|
+
:is="place.to ? NuxtLink : 'div'"
|
|
234
|
+
:to="place.to ?? void 0"
|
|
235
|
+
class="jun-campfire-tile flex flex-col items-center gap-1 rounded-lg px-1 py-2"
|
|
236
|
+
:class="[p.idle ? 'opacity-55' : '', isFollowed(p) ? 'is-on' : '']"
|
|
237
|
+
:title="showPages ? `${p.name} \u2014 ${place.label}` : p.name"
|
|
238
|
+
>
|
|
239
|
+
<span
|
|
240
|
+
class="jun-campfire-mark flex size-8 items-center justify-center rounded-full text-xs font-medium"
|
|
241
|
+
:style="{ color: p.color, boxShadow: `inset 0 0 0 1.5px ${p.color}` }"
|
|
242
|
+
>{{ initial(p.name) }}</span>
|
|
243
|
+
<span class="w-full truncate text-center text-[10px] text-neutral-500 dark:text-neutral-400">
|
|
244
|
+
{{ p.isSelf ? "you" : p.name }}
|
|
245
|
+
</span>
|
|
246
|
+
</component>
|
|
247
|
+
|
|
248
|
+
<button
|
|
249
|
+
v-if="canFollow(p)"
|
|
250
|
+
type="button"
|
|
251
|
+
class="jun-campfire-follow absolute top-0.5 right-0.5 flex size-5 items-center justify-center
|
|
252
|
+
rounded-md text-neutral-400 dark:text-neutral-500"
|
|
253
|
+
:class="isFollowed(p) ? 'is-on' : ''"
|
|
254
|
+
:aria-pressed="isFollowed(p)"
|
|
255
|
+
:aria-label="isFollowed(p) ? `Stop following ${p.name}` : `Follow ${p.name}`"
|
|
256
|
+
@click="emit('follow', p.clientId)"
|
|
257
|
+
>
|
|
258
|
+
<UIcon
|
|
259
|
+
:name="isFollowed(p) ? 'i-lucide-eye' : 'i-lucide-eye-off'"
|
|
260
|
+
class="size-3"
|
|
261
|
+
/>
|
|
262
|
+
</button>
|
|
263
|
+
</div>
|
|
217
264
|
</div>
|
|
218
265
|
|
|
219
266
|
<!-- FACEPILE — one stack, one count. -->
|
|
@@ -222,15 +269,19 @@ function roleMenu(p) {
|
|
|
222
269
|
class="flex flex-wrap items-center gap-2 px-3.5 py-4"
|
|
223
270
|
>
|
|
224
271
|
<span class="flex -space-x-2">
|
|
225
|
-
|
|
226
|
-
|
|
272
|
+
<!-- Ambient, but still a destination: a face you can see is a face you
|
|
273
|
+
should be able to walk to. -->
|
|
274
|
+
<component
|
|
275
|
+
:is="place.to ? NuxtLink : 'span'"
|
|
276
|
+
v-for="{ p, place } in faces"
|
|
227
277
|
:key="p.publicKey || p.clientId"
|
|
278
|
+
:to="place.to ?? void 0"
|
|
228
279
|
class="jun-campfire-mark flex size-7 items-center justify-center rounded-full bg-white
|
|
229
280
|
text-[10px] font-medium ring-2 ring-white dark:bg-neutral-900 dark:ring-neutral-900"
|
|
230
281
|
:class="p.idle ? 'opacity-55' : ''"
|
|
231
282
|
:style="{ color: p.color, boxShadow: `inset 0 0 0 1.5px ${p.color}` }"
|
|
232
|
-
:title="p.name"
|
|
233
|
-
>{{ initial(p.name) }}</
|
|
283
|
+
:title="showPages && place.to ? `${p.name} \u2014 ${place.label}` : p.name"
|
|
284
|
+
>{{ initial(p.name) }}</component>
|
|
234
285
|
</span>
|
|
235
286
|
<span
|
|
236
287
|
v-if="overflow"
|
|
@@ -255,5 +306,5 @@ function roleMenu(p) {
|
|
|
255
306
|
</template>
|
|
256
307
|
|
|
257
308
|
<style scoped>
|
|
258
|
-
.jun-campfire-person{transition:background-color .2s ease}.jun-campfire-person:hover{background:rgba(0,0,0,.035)}:root.dark .jun-campfire-person:hover{background:hsla(0,0%,100%,.05)}.jun-campfire-mark{transition:transform .25s cubic-bezier(.22,1,.36,1)}.jun-campfire-person:hover .jun-campfire-mark,.jun-campfire-tile:hover .jun-campfire-mark{transform:scale(1.08)}.jun-campfire-tile{transition:background-color .2s ease}.jun-campfire-tile:hover{background:rgba(0,0,0,.035)}:root.dark .jun-campfire-tile:hover{background:hsla(0,0%,100%,.05)}.jun-campfire-tile.is-on{background:rgba(0,0,0,.07)}:root.dark .jun-campfire-tile.is-on{background:hsla(0,0%,100%,.1)}.jun-campfire-follow{opacity:0;transition:opacity .2s ease,color .2s ease,background-color .2s ease}.jun-campfire-follow.is-on,.jun-campfire-follow:focus-visible,.jun-campfire-person:hover .jun-campfire-follow{opacity:1}.jun-campfire-follow:hover{background:rgba(0,0,0,.06);color:var(--color-neutral-700)}:root.dark .jun-campfire-follow:hover{background:hsla(0,0%,100%,.08);color:var(--color-neutral-200)}.jun-campfire-follow.is-on{color:var(--color-neutral-700)}:root.dark .jun-campfire-follow.is-on{color:var(--color-neutral-200)}.jun-campfire-grant{background:rgba(0,0,0,.07);border-radius:999px;color:var(--color-neutral-600);font-size:9px;letter-spacing:.04em;line-height:.95rem;padding:0 .3rem;text-transform:uppercase}:root.dark .jun-campfire-grant{background:hsla(0,0%,100%,.1);color:var(--color-neutral-300)}.jun-campfire-alive,.jun-campfire-pulse{animation:jun-campfire-pulse 5s ease-in-out infinite}@keyframes jun-campfire-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.18)}}@media (prefers-reduced-motion:reduce){.jun-campfire-alive,.jun-campfire-mark,.jun-campfire-pulse{animation:none;transition:none}}
|
|
309
|
+
.jun-campfire-person{transition:background-color .2s ease}.jun-campfire-person:hover{background:rgba(0,0,0,.035)}:root.dark .jun-campfire-person:hover{background:hsla(0,0%,100%,.05)}.jun-campfire-mark{transition:transform .25s cubic-bezier(.22,1,.36,1)}.jun-campfire-person:hover .jun-campfire-mark,.jun-campfire-tile:hover .jun-campfire-mark{transform:scale(1.08)}.jun-campfire-who{color:inherit;display:block;min-width:0;text-decoration:none}.jun-campfire-who.is-linked{cursor:pointer}.jun-campfire-goto{opacity:0;transition:opacity .2s ease}.jun-campfire-person:hover .jun-campfire-goto,.jun-campfire-who:focus-visible .jun-campfire-goto{opacity:1}.jun-campfire-tile{color:inherit;display:flex;text-decoration:none;transition:background-color .2s ease}.jun-campfire-tile:hover{background:rgba(0,0,0,.035)}:root.dark .jun-campfire-tile:hover{background:hsla(0,0%,100%,.05)}.jun-campfire-tile.is-on{background:rgba(0,0,0,.07)}:root.dark .jun-campfire-tile.is-on{background:hsla(0,0%,100%,.1)}.jun-campfire-follow{opacity:0;transition:opacity .2s ease,color .2s ease,background-color .2s ease}.jun-campfire-cell:hover .jun-campfire-follow,.jun-campfire-follow.is-on,.jun-campfire-follow:focus-visible,.jun-campfire-person:hover .jun-campfire-follow{opacity:1}.jun-campfire-follow:hover{background:rgba(0,0,0,.06);color:var(--color-neutral-700)}:root.dark .jun-campfire-follow:hover{background:hsla(0,0%,100%,.08);color:var(--color-neutral-200)}.jun-campfire-follow.is-on{color:var(--color-neutral-700)}:root.dark .jun-campfire-follow.is-on{color:var(--color-neutral-200)}.jun-campfire-grant{background:rgba(0,0,0,.07);border-radius:999px;color:var(--color-neutral-600);font-size:9px;letter-spacing:.04em;line-height:.95rem;padding:0 .3rem;text-transform:uppercase}:root.dark .jun-campfire-grant{background:hsla(0,0%,100%,.1);color:var(--color-neutral-300)}.jun-campfire-alive,.jun-campfire-pulse{animation:jun-campfire-pulse 5s ease-in-out infinite}@keyframes jun-campfire-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.18)}}@media (prefers-reduced-motion:reduce){.jun-campfire-alive,.jun-campfire-mark,.jun-campfire-pulse{animation:none;transition:none}}
|
|
259
310
|
</style>
|
|
@@ -3,9 +3,12 @@ import { computed } from "vue";
|
|
|
3
3
|
import { useHead, useSeoMeta } from "#app";
|
|
4
4
|
import { useJunOptions } from "../composables/useJunOptions";
|
|
5
5
|
import { junConfigOn, junConfigStr, useJunSiteConfigValues } from "../composables/useJunSiteConfigValues";
|
|
6
|
+
import { junAppleSplashLinks, junIconUrls, junIdentity } from "../utils/junIdentity";
|
|
6
7
|
const { brand, features } = useJunOptions();
|
|
7
8
|
const site = await useJunSiteConfigValues();
|
|
8
9
|
const str = (key) => junConfigStr(site.value[key]);
|
|
10
|
+
const identity = computed(() => junIdentity(brand, site.value));
|
|
11
|
+
const icons = computed(() => junIconUrls(identity.value));
|
|
9
12
|
const title = computed(() => str("seoTitle") ?? brand.name);
|
|
10
13
|
const description = computed(() => str("seoDescription") ?? brand.tagline);
|
|
11
14
|
const author = computed(() => str("authorName") ?? brand.name);
|
|
@@ -47,16 +50,45 @@ useHead(() => ({
|
|
|
47
50
|
{ key: "theme-color-light", name: "theme-color", media: "(prefers-color-scheme: light)", content: "#ffffff" },
|
|
48
51
|
{ key: "theme-color-dark", name: "theme-color", media: "(prefers-color-scheme: dark)", content: brand.themeColor },
|
|
49
52
|
// PWA app chrome.
|
|
53
|
+
//
|
|
54
|
+
// Both capability metas, and BOTH are needed: `mobile-web-app-capable` is
|
|
55
|
+
// the standard one, `apple-mobile-web-app-capable` is what iOS reads, and
|
|
56
|
+
// iOS reads it out of the SERVED HTML at add-to-home-screen time. A tag
|
|
57
|
+
// injected by JavaScript after hydration is too late — the icon then opens
|
|
58
|
+
// in the in-app Safari overlay instead of standalone.
|
|
50
59
|
{ name: "mobile-web-app-capable", content: "yes" },
|
|
51
60
|
{ name: "apple-mobile-web-app-capable", content: "yes" },
|
|
52
61
|
{ name: "apple-touch-fullscreen", content: "yes" },
|
|
62
|
+
// `black-translucent` is load-bearing, not cosmetic: it is what puts the
|
|
63
|
+
// page UNDER the status bar, which is the whole reason `viewport-fit=cover`
|
|
64
|
+
// and the `env(safe-area-inset-*)` rules in jun.css exist. Change this and
|
|
65
|
+
// every safe-area rule becomes dead weight.
|
|
53
66
|
{ name: "apple-mobile-web-app-status-bar-style", content: "black-translucent" },
|
|
54
|
-
{ name: "apple-mobile-web-app-title", content:
|
|
67
|
+
{ name: "apple-mobile-web-app-title", content: identity.value.shortName },
|
|
68
|
+
{ name: "application-name", content: identity.value.name },
|
|
69
|
+
// Windows tiles read this one and ignore the manifest.
|
|
70
|
+
{ name: "msapplication-TileColor", content: identity.value.themeColor }
|
|
71
|
+
],
|
|
72
|
+
link: [
|
|
73
|
+
// ── Identity ──────────────────────────────────────────────────────────
|
|
74
|
+
// ONE svg favicon, which answers both colour schemes from inside itself
|
|
75
|
+
// (see `junFaviconSvg`). `?v=` is the brand fingerprint — the response is
|
|
76
|
+
// immutable for a year, so this is what lets a changed accent ever show.
|
|
77
|
+
{ key: "jun-favicon", rel: "icon", type: "image/svg+xml", href: icons.value.favicon },
|
|
78
|
+
// iOS takes PNG and nothing else. Without this it uses a SCREENSHOT of the
|
|
79
|
+
// page as the home-screen icon, which is the single most obvious tell that
|
|
80
|
+
// an installed site is a website rather than an app.
|
|
81
|
+
{ key: "jun-apple-icon", rel: "apple-touch-icon", sizes: "180x180", href: icons.value.appleTouch },
|
|
82
|
+
{ key: "jun-manifest", rel: "manifest", href: `/manifest.webmanifest?v=${identity.value.version}` },
|
|
83
|
+
// iOS launch screens. Thirty-two near-identical tags, which sounds like a
|
|
84
|
+
// lot of head and gzips to almost nothing — see `JUN_IOS_SCREENS` for the
|
|
85
|
+
// measurement and for why the list has to name devices individually.
|
|
86
|
+
...junAppleSplashLinks(identity.value),
|
|
87
|
+
...feedsEnabled.value ? [
|
|
88
|
+
{ rel: "alternate", type: "application/atom+xml", title: "Atom feed", href: "/feed.xml" },
|
|
89
|
+
{ rel: "alternate", type: "application/feed+json", title: "JSON feed", href: "/feed.json" }
|
|
90
|
+
] : []
|
|
55
91
|
],
|
|
56
|
-
link: feedsEnabled.value ? [
|
|
57
|
-
{ rel: "alternate", type: "application/atom+xml", title: "Atom feed", href: "/feed.xml" },
|
|
58
|
-
{ rel: "alternate", type: "application/feed+json", title: "JSON feed", href: "/feed.json" }
|
|
59
|
-
] : [],
|
|
60
92
|
script: identityJsonLd.value ? [{ key: "jun-identity-ld", type: "application/ld+json", innerHTML: identityJsonLd.value }] : []
|
|
61
93
|
}));
|
|
62
94
|
useSeoMeta({
|
|
@@ -2,53 +2,18 @@
|
|
|
2
2
|
import { computed, useId } from "vue";
|
|
3
3
|
import { useJunOptions } from "../composables/useJunOptions";
|
|
4
4
|
import { useJunEffectiveConfig } from "../composables/useJunSiteConfig";
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
// centred in the box at every size, and the shoot leaves it at the same
|
|
9
|
-
// angle the hook exits — the two arms balance instead of one out-weighing
|
|
10
|
-
// the other, which is what made the old draw lean right.
|
|
11
|
-
sprout: {
|
|
12
|
-
paths: [
|
|
13
|
-
{ d: "M24 18v12.2c0 7.4-3.6 11.1-9.8 9", w: 3.4 },
|
|
14
|
-
{ d: "M24 25.4 32.6 18.6", w: 3.4 }
|
|
15
|
-
],
|
|
16
|
-
dots: [
|
|
17
|
-
{ cx: 24, cy: 9.6, r: 3.4 },
|
|
18
|
-
{ cx: 35.4, cy: 16.4, r: 2.8 },
|
|
19
|
-
{ cx: 11.2, cy: 38.2, r: 2.8 }
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
// The graph. Edges stop SHORT of each node and tuck under it, so the joins
|
|
23
|
-
// stay clean when the stroke is only a couple of device pixels wide.
|
|
24
|
-
node: {
|
|
25
|
-
paths: [
|
|
26
|
-
{ d: "M31.5 13.5V24.5", w: 3.2 },
|
|
27
|
-
{ d: "M29.2 28.6 18.9 35.2", w: 3.2 }
|
|
28
|
-
],
|
|
29
|
-
dots: [
|
|
30
|
-
{ cx: 31.5, cy: 10.8, r: 3.5 },
|
|
31
|
-
{ cx: 31.5, cy: 27.2, r: 3.5 },
|
|
32
|
-
{ cx: 16.6, cy: 36.6, r: 3.5 }
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
|
-
// The document, with the bang set inside it. The old three-stroke mini-tree
|
|
36
|
-
// in there turned to mush below ~20px; one stem and one dot survive it.
|
|
37
|
-
page: {
|
|
38
|
-
paths: [
|
|
39
|
-
{ d: "M13 6h14l8 8v28H13z", w: 3, join: true },
|
|
40
|
-
{ d: "M27 6v8h8", w: 3, join: true },
|
|
41
|
-
{ d: "M24 18v8.6", w: 3.2 }
|
|
42
|
-
],
|
|
43
|
-
dots: [
|
|
44
|
-
{ cx: 24, cy: 31.8, r: 2.2 }
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
};
|
|
5
|
+
import { JUN_MARKS, JUN_MARK_NAMES, JUN_SUN } from "../utils/junMark";
|
|
6
|
+
const KNOWN_MARKS = JUN_MARK_NAMES;
|
|
7
|
+
const MARKS = JUN_MARKS;
|
|
48
8
|
const SUN = {
|
|
49
9
|
body: { from: "var(--jun-sun-from)", to: "var(--jun-sun-to)" },
|
|
50
10
|
core: "var(--jun-sun-core)",
|
|
51
|
-
|
|
11
|
+
// The NUMBERS come from `JUN_SUN`, for the same reason `MARKS` does: the
|
|
12
|
+
// favicon and the app icon draw this orb too, and a glow centre that is 45
|
|
13
|
+
// here and 44 there is a mark that quietly differs between the tab and the
|
|
14
|
+
// navbar. Only the COLOURS are stated here, because only the DOM has CSS
|
|
15
|
+
// variables to state them with.
|
|
16
|
+
glow: { color: "var(--jun-sun-glow)", cx: JUN_SUN.glow.cx, cy: JUN_SUN.glow.cy, r: JUN_SUN.glow.r },
|
|
52
17
|
/**
|
|
53
18
|
* The core's soft ring — the blob's `box-shadow: 0 0 20px rgba(0,0,0,.2)`,
|
|
54
19
|
* drawn as GEOMETRY rather than as a CSS `drop-shadow`.
|
|
@@ -63,7 +28,7 @@ const SUN = {
|
|
|
63
28
|
* `r` 17 against the core's 12 is the old 10-unit blur radius, and the two
|
|
64
29
|
* inner stops reproduce its falloff — flat to the core's edge, then out.
|
|
65
30
|
*/
|
|
66
|
-
halo:
|
|
31
|
+
halo: JUN_SUN.halo
|
|
67
32
|
};
|
|
68
33
|
const props = defineProps({
|
|
69
34
|
title: { type: String, required: false, default: "Home" },
|