@abraca/junis 2.82.0 → 2.84.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +19 -14
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +21 -2
  4. package/dist/runtime/assets/css/jun.css +1 -1
  5. package/dist/runtime/components/JunCampfireChat.vue +7 -5
  6. package/dist/runtime/components/JunCampfireComposer.d.vue.ts +27 -0
  7. package/dist/runtime/components/JunCampfireComposer.vue +158 -0
  8. package/dist/runtime/components/JunCampfireComposer.vue.d.ts +27 -0
  9. package/dist/runtime/components/JunCampfirePanel.vue +18 -28
  10. package/dist/runtime/components/JunCampfirePresence.client.vue +109 -9
  11. package/dist/runtime/components/JunCampfireReactions.d.vue.ts +13 -0
  12. package/dist/runtime/components/JunCampfireReactions.vue +142 -0
  13. package/dist/runtime/components/JunCampfireReactions.vue.d.ts +13 -0
  14. package/dist/runtime/components/JunCampfireRoster.vue +92 -41
  15. package/dist/runtime/components/JunCampfireYou.vue +9 -9
  16. package/dist/runtime/components/JunGlobeEditor.client.vue +396 -183
  17. package/dist/runtime/components/JunGlobeMap.client.vue +1 -0
  18. package/dist/runtime/components/JunHorizontalTimeline.vue +41 -4
  19. package/dist/runtime/components/JunImagePopup.client.vue +1 -1
  20. package/dist/runtime/components/JunMosaicPane.client.d.vue.ts +9 -0
  21. package/dist/runtime/components/JunMosaicPane.client.vue +63 -3
  22. package/dist/runtime/components/JunMosaicPane.client.vue.d.ts +9 -0
  23. package/dist/runtime/components/JunStudioBar.client.vue +2 -1
  24. package/dist/runtime/components/renderers/JunAppsRenderer.vue +5 -5
  25. package/dist/runtime/components/renderers/JunCvRenderer.vue +1 -1
  26. package/dist/runtime/components/renderers/JunEntryRenderer.vue +1 -1
  27. package/dist/runtime/components/renderers/JunGuestbookRenderer.vue +2 -0
  28. package/dist/runtime/components/renderers/JunHomeRenderer.vue +2 -2
  29. package/dist/runtime/components/renderers/JunJournalRenderer.vue +6 -6
  30. package/dist/runtime/components/renderers/JunLiveRenderer.vue +2 -1
  31. package/dist/runtime/components/renderers/JunMosaicRenderer.vue +14 -12
  32. package/dist/runtime/components/renderers/JunMovieRenderer.vue +1 -1
  33. package/dist/runtime/components/renderers/JunNowRenderer.vue +39 -0
  34. package/dist/runtime/components/renderers/JunProjectRenderer.vue +2 -2
  35. package/dist/runtime/components/renderers/JunStatsRenderer.vue +15 -2
  36. package/dist/runtime/components/renderers/JunTrackRenderer.vue +44 -0
  37. package/dist/runtime/components/renderers/JunWallRenderer.vue +1 -0
  38. package/dist/runtime/composables/useJunCampfire.d.ts +2 -0
  39. package/dist/runtime/composables/useJunCampfire.js +11 -1
  40. package/dist/runtime/composables/useJunChrome.js +11 -2
  41. package/dist/runtime/composables/useJunDocMenu.d.ts +16 -1
  42. package/dist/runtime/composables/useJunDocMenu.js +8 -0
  43. package/dist/runtime/composables/useJunTheme.js +9 -0
  44. package/dist/runtime/layouts/jun.vue +10 -0
  45. package/dist/runtime/plugins/jun-fresh-server.client.d.ts +2 -0
  46. package/dist/runtime/plugins/jun-fresh-server.client.js +42 -0
  47. package/dist/runtime/server/janitor/junJanitorChores.d.ts +23 -2
  48. package/dist/runtime/server/janitor/junJanitorChores.js +74 -8
  49. package/dist/runtime/server/janitor/junJanitorMachine.js +16 -2
  50. package/dist/runtime/server/janitor/junJanitorStore.d.ts +35 -1
  51. package/dist/runtime/server/janitor/junJanitorStore.js +62 -4
  52. package/dist/runtime/server/plugins/jun-bootstrap.js +88 -3
  53. package/dist/runtime/server/utils/junVisibility.js +2 -0
  54. package/dist/runtime/types.d.ts +26 -0
  55. package/dist/runtime/utils/junVisibility.js +2 -0
  56. package/package.json +10 -8
@@ -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"
@@ -238,12 +338,12 @@ onBeforeUnmount(() => {
238
338
  class="size-2 rounded-full"
239
339
  :style="{ background: followingUser.color || 'var(--ui-text-muted)' }"
240
340
  />
241
- <span class="font-medium text-zinc-600 dark:text-zinc-300">
341
+ <span class="font-medium text-neutral-600 dark:text-neutral-300">
242
342
  following {{ followingUser.name }}
243
343
  </span>
244
344
  <UIcon
245
345
  name="i-lucide-x"
246
- class="size-3 text-zinc-400"
346
+ class="size-3 text-neutral-400"
247
347
  />
248
348
  </button>
249
349
  </Transition>
@@ -274,7 +374,7 @@ onBeforeUnmount(() => {
274
374
  <UIcon
275
375
  :name="settings.icon"
276
376
  class="relative size-4"
277
- :class="settings.ember ? 'text-amber-500 dark:text-amber-400' : 'text-zinc-500 dark:text-zinc-400'"
377
+ :class="settings.ember ? 'jun-ember-ink' : 'text-neutral-500 dark:text-neutral-400'"
278
378
  />
279
379
  <span
280
380
  v-if="unread && !open"
@@ -291,7 +391,7 @@ onBeforeUnmount(() => {
291
391
  v-for="p in faces"
292
392
  :key="p.publicKey || p.clientId"
293
393
  class="flex size-5 items-center justify-center rounded-full bg-white text-[9px]
294
- font-medium ring-2 ring-white dark:bg-zinc-900 dark:ring-zinc-900"
394
+ font-medium ring-2 ring-white dark:bg-neutral-900 dark:ring-neutral-900"
295
395
  :class="p.idle ? 'opacity-50' : ''"
296
396
  :style="{ color: p.color, boxShadow: `inset 0 0 0 1.5px ${p.color}` }"
297
397
  >{{ initial(p.name) }}</span>
@@ -299,17 +399,17 @@ onBeforeUnmount(() => {
299
399
 
300
400
  <span
301
401
  v-if="settings.pillMode === 'full'"
302
- class="font-medium tracking-wide whitespace-nowrap text-zinc-600 dark:text-zinc-300"
402
+ class="font-medium tracking-wide whitespace-nowrap text-neutral-600 dark:text-neutral-300"
303
403
  >{{ label }}</span>
304
404
  <span
305
405
  v-else-if="settings.pillMode !== 'ember'"
306
- class="font-medium tabular-nums text-zinc-600 dark:text-zinc-300"
406
+ class="font-medium tabular-nums text-neutral-600 dark:text-neutral-300"
307
407
  >{{ count }}</span>
308
408
 
309
409
  <UIcon
310
410
  v-if="settings.hasPanel && settings.pillMode !== 'ember'"
311
411
  :name="open ? 'i-lucide-chevron-down' : 'i-lucide-chevron-up'"
312
- class="size-3.5 text-zinc-400 dark:text-zinc-500"
412
+ class="size-3.5 text-neutral-400 dark:text-neutral-500"
313
413
  />
314
414
  </button>
315
415
  </template>
@@ -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:#18181b;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:#f4f4f5;color:#18181b}.jun-campfire-badge.is-ember{background:#f59e0b;color:#fff}.jun-campfire-glow{animation:jun-campfire-breathe 3.2s ease-in-out infinite;background:radial-gradient(circle at 50% 55%,rgba(251,191,36,.55),rgba(251,146,60,.18) 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(() => props.people.slice(0, FACEPILE_MAX));
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 people"
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' : ''"
@@ -104,25 +105,33 @@ function roleMenu(p) {
104
105
  <span
105
106
  v-if="!p.idle"
106
107
  class="jun-campfire-alive absolute -right-0.5 -bottom-0.5 size-2 rounded-full ring-2
107
- ring-white dark:ring-zinc-900"
108
+ ring-white dark:ring-neutral-900"
108
109
  :style="{ background: p.color }"
109
110
  />
110
111
  </span>
111
112
 
112
- <span class="min-w-0 flex-1">
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
- <span class="truncate text-sm text-zinc-800 dark:text-zinc-100">{{ p.name }}</span>
123
+ <span class="truncate text-sm text-neutral-800 dark:text-neutral-100">{{ p.name }}</span>
115
124
  <span
116
125
  v-if="p.isSelf"
117
- class="text-[10px] tracking-wide text-zinc-400 dark:text-zinc-500"
126
+ class="text-[10px] tracking-wide text-neutral-400 dark:text-neutral-500"
118
127
  >you</span>
119
128
  <span
120
129
  v-else-if="p.isBot"
121
- class="text-[10px] tracking-wide text-zinc-400 dark:text-zinc-500"
130
+ class="text-[10px] tracking-wide text-neutral-400 dark:text-neutral-500"
122
131
  >service</span>
123
132
  <span
124
133
  v-if="p.sessions > 1"
125
- class="text-[10px] tabular-nums text-zinc-400 dark:text-zinc-500"
134
+ class="text-[10px] tabular-nums text-neutral-400 dark:text-neutral-500"
126
135
  >×{{ p.sessions }}</span>
127
136
  <!-- The stored grant, owner's eyes only. Absent means "inherits the
128
137
  site default", which is not the same as being a viewer by name. -->
@@ -130,32 +139,48 @@ 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
- <span class="flex items-center gap-1 text-[11px] text-zinc-400 dark:text-zinc-500">
150
+ <span class="flex items-center gap-1 text-[11px] text-neutral-400 dark:text-neutral-500">
135
151
  <UIcon
136
152
  v-if="p.statusIcon"
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
- <component
145
- :is="placeFor(p).to ? NuxtLink : 'span'"
146
- v-else-if="showPages"
147
- :to="placeFor(p).to ?? void 0"
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
- :class="placeFor(p).to ? 'hover:text-zinc-600 dark:hover:text-zinc-300' : ''"
150
- >{{ p.idle ? "resting on" : "reading" }} {{ placeFor(p).label }}</component>
173
+ >{{
174
+ p.isSelf || p.statusText ? place.label : `${p.idle ? "resting on" : "reading"} ${place.label}`
175
+ }}</span>
151
176
  </span>
152
- </span>
177
+ </component>
153
178
 
154
179
  <button
155
180
  v-if="canFollow(p)"
156
181
  type="button"
157
182
  class="jun-campfire-follow flex size-7 flex-none items-center justify-center rounded-md
158
- text-zinc-400 dark:text-zinc-500"
183
+ text-neutral-400 dark:text-neutral-500"
159
184
  :class="isFollowed(p) ? 'is-on' : ''"
160
185
  :aria-pressed="isFollowed(p)"
161
186
  :aria-label="isFollowed(p) ? `Stop following ${p.name}` : `Follow ${p.name}`"
@@ -177,7 +202,7 @@ function roleMenu(p) {
177
202
  <button
178
203
  type="button"
179
204
  class="jun-campfire-follow flex size-7 flex-none items-center justify-center rounded-md
180
- text-zinc-400 dark:text-zinc-500"
205
+ text-neutral-400 dark:text-neutral-500"
181
206
  :class="busy === p.publicKey ? 'is-on' : ''"
182
207
  :aria-label="`Manage ${p.name}`"
183
208
  >
@@ -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
- <component
200
- :is="canFollow(p) ? 'button' : 'div'"
201
- v-for="p in people"
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
- :type="canFollow(p) ? 'button' : void 0"
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
- <span
210
- class="jun-campfire-mark flex size-8 items-center justify-center rounded-full text-xs font-medium"
211
- :style="{ color: p.color, boxShadow: `inset 0 0 0 1.5px ${p.color}` }"
212
- >{{ initial(p.name) }}</span>
213
- <span class="w-full truncate text-center text-[10px] text-zinc-500 dark:text-zinc-400">
214
- {{ p.isSelf ? "you" : p.name }}
215
- </span>
216
- </component>
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,19 +269,23 @@ 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
- <span
226
- v-for="p in faces"
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
- text-[10px] font-medium ring-2 ring-white dark:bg-zinc-900 dark:ring-zinc-900"
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) }}</span>
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"
237
- class="text-xs tabular-nums text-zinc-400 dark:text-zinc-500"
288
+ class="text-xs tabular-nums text-neutral-400 dark:text-neutral-500"
238
289
  >+{{ overflow }}</span>
239
290
  </div>
240
291
 
@@ -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:#3f3f46}:root.dark .jun-campfire-follow:hover{background:hsla(0,0%,100%,.08);color:#e4e4e7}.jun-campfire-follow.is-on{color:#3f3f46}:root.dark .jun-campfire-follow.is-on{color:#e4e4e7}.jun-campfire-grant{background:rgba(0,0,0,.07);border-radius:999px;color:#52525b;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:#d4d4d8}.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>