@meith/theme-raidframe 0.28.1 → 0.29.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meith/theme-raidframe",
3
- "version": "0.28.1",
3
+ "version": "0.29.1",
4
4
  "description": "A gaming theme for Meith — guild, raid and match boards — built on the default theme's slots.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -20,9 +20,9 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@meith/theme-default": "^0.28.1",
24
- "@meith/theme-kit": "^0.28.1",
25
- "@meith/ui": "^0.28.1"
23
+ "@meith/theme-default": "^0.29.1",
24
+ "@meith/theme-kit": "^0.29.1",
25
+ "@meith/ui": "^0.29.1"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": "^19.2.0"
package/src/shared.tsx CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from 'react'
2
2
 
3
- import type { TimeModel, UserRefModel } from '@meith/theme-kit'
3
+ import type { GroupTagModel, TimeModel, UserRefModel } from '@meith/theme-kit'
4
4
 
5
5
  export const MICRO =
6
6
  'font-mono text-[0.625rem] font-semibold uppercase tracking-[0.18em] text-muted-foreground'
@@ -130,3 +130,11 @@ export function UserRef({
130
130
  </a>
131
131
  )
132
132
  }
133
+
134
+ export function groupTags(
135
+ groups: readonly GroupTagModel[] | undefined,
136
+ title: string | null,
137
+ ): readonly GroupTagModel[] {
138
+ if (groups !== undefined && groups.length > 0) return groups
139
+ return title === null ? [] : [{ title }]
140
+ }
@@ -3,7 +3,17 @@ import type { ReactNode } from 'react'
3
3
  import type { MemberProfileModel, SlotCopy } from '@meith/theme-kit'
4
4
  import { fromSlotCopy } from '@meith/theme-kit'
5
5
 
6
- import { BUTTON, Frame, HEADING, MICRO, NUMERIC, PanelHead, RULE, Stamp } from '../shared'
6
+ import {
7
+ BUTTON,
8
+ Frame,
9
+ groupTags,
10
+ HEADING,
11
+ MICRO,
12
+ NUMERIC,
13
+ PanelHead,
14
+ RULE,
15
+ Stamp,
16
+ } from '../shared'
7
17
 
8
18
  function Field({ label, children }: { label: string; children: ReactNode }) {
9
19
  return (
@@ -18,6 +28,7 @@ export function MemberProfile({
18
28
  user,
19
29
  avatarUrl,
20
30
  title,
31
+ groups,
21
32
  joinedAt,
22
33
  lastVisitAt,
23
34
  postCount,
@@ -56,7 +67,11 @@ export function MemberProfile({
56
67
  >
57
68
  {user.username}
58
69
  </h1>
59
- {title !== null && <p className={`${MICRO} mt-0.5 text-primary/90`}>{title}</p>}
70
+ {groupTags(groups, title).map((group) => (
71
+ <p key={group.title} className={`${MICRO} mt-0.5 text-primary/90`}>
72
+ <span className={group.nameClass ?? undefined}>{group.title}</span>
73
+ </p>
74
+ ))}
60
75
  </div>
61
76
  </div>
62
77
  <div className={RULE} aria-hidden="true" />
@@ -3,7 +3,7 @@ import type { ReactNode } from 'react'
3
3
  import type { PostBitSlotModel, SlotCopy } from '@meith/theme-kit'
4
4
  import { fromSlotCopy } from '@meith/theme-kit'
5
5
 
6
- import { HEADING, MICRO, NUMERIC, Stamp, UserRef } from '../shared'
6
+ import { groupTags, HEADING, MICRO, NUMERIC, Stamp, UserRef } from '../shared'
7
7
 
8
8
  function GroupBadge({
9
9
  badge,
@@ -119,9 +119,11 @@ export function PostBit({ post, select, regions, copy }: PostBitSlotModel & { co
119
119
  }`}
120
120
  />
121
121
  </p>
122
- {post.author.title !== null && (
123
- <p className={`${MICRO} mt-0.5 text-primary/90`}>{post.author.title}</p>
124
- )}
122
+ {groupTags(post.author.groups, post.author.title).map((group) => (
123
+ <p key={group.title} className={`${MICRO} mt-0.5 text-primary/90`}>
124
+ <span className={group.nameClass ?? undefined}>{group.title}</span>
125
+ </p>
126
+ ))}
125
127
  {post.author.isOnline && (
126
128
  <p className="mt-1 inline-flex items-center gap-1.5">
127
129
  <span
package/src/theme.ts CHANGED
@@ -73,7 +73,7 @@ import { WhoIsOnline } from './slots/who-is-online'
73
73
  export const raidframeTheme = defineTheme({
74
74
  key: 'raidframe',
75
75
  title: 'Raidframe',
76
- version: '0.28.1',
76
+ version: '0.29.1',
77
77
  extends: defaultTheme,
78
78
  slots: {
79
79
  Shell,