@meith/theme-default 0.33.0 → 0.33.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-default",
3
- "version": "0.33.0",
3
+ "version": "0.33.1",
4
4
  "description": "Meith's default theme — every slot and every token, and the reference for what a complete theme fills.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -20,8 +20,8 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@meith/theme-kit": "^0.33.0",
24
- "@meith/ui": "^0.33.0"
23
+ "@meith/theme-kit": "^0.33.1",
24
+ "@meith/ui": "^0.33.1"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "react": "^19.2.0"
package/src/shared.tsx CHANGED
@@ -20,6 +20,8 @@ export function pageAt(width: 'max-w-3xl' | 'max-w-4xl'): string {
20
20
  export const LINK =
21
21
  'transition-colors hover:text-primary hover:underline underline-offset-2 decoration-1 decoration-primary'
22
22
 
23
+ export const PRIMARY_HEADER = 'border-b-primary/15 bg-primary/6'
24
+
23
25
  export const MUTED_LINK = `text-muted-foreground ${LINK}`
24
26
 
25
27
  export function UserRef({ user, className }: { user: UserRefModel; className?: string }) {
@@ -9,8 +9,9 @@ export function BoardIndex({
9
9
  regions,
10
10
  copy,
11
11
  }: BoardIndexModel & { copy: SlotCopy }) {
12
- const rail = (regions.latest ?? null) !== null
13
- const footer = regions.stats !== null || regions.online !== null
12
+ const latest = regions.latest ?? null
13
+ const rail = latest !== null || regions.stats !== null
14
+ const footer = regions.online !== null
14
15
 
15
16
  const c = (key: string) => fromSlotCopy(copy, `default.boardIndex.${key}`)
16
17
 
@@ -39,7 +40,8 @@ export function BoardIndex({
39
40
 
40
41
  {rail && (
41
42
  <aside aria-label={c('boardActivity')} className="flex min-w-0 flex-col gap-4">
42
- {regions.latest}
43
+ {latest}
44
+ {regions.stats}
43
45
  </aside>
44
46
  )}
45
47
  </div>
@@ -47,7 +49,6 @@ export function BoardIndex({
47
49
  {footer && (
48
50
  <div className="flex flex-col gap-1.5 border-t border-border pt-4 text-xs text-muted-foreground">
49
51
  {regions.online}
50
- {regions.stats}
51
52
  </div>
52
53
  )}
53
54
 
@@ -1,7 +1,8 @@
1
1
  import type { BoardStatsModel, SlotCopy } from '@meith/theme-kit'
2
2
  import { fromSlotCopy } from '@meith/theme-kit'
3
+ import { Card, CardContent, CardHeader, CardTitle } from '@meith/ui'
3
4
 
4
- import { NUMERIC, Stamp, UserRef } from '../shared'
5
+ import { NUMERIC, PRIMARY_HEADER, Stamp, UserRef } from '../shared'
5
6
 
6
7
  export function BoardStats({
7
8
  threadCount,
@@ -14,40 +15,45 @@ export function BoardStats({
14
15
  const c = (key: string) => fromSlotCopy(copy, `default.boardStats.${key}`)
15
16
 
16
17
  return (
17
- <section
18
- aria-labelledby="board-stats-heading"
19
- className="flex flex-wrap items-baseline gap-x-3 gap-y-1"
20
- >
21
- <h2 id="board-stats-heading" className="sr-only">
22
- {c('heading')}
23
- </h2>
18
+ <Card aria-labelledby="board-stats-heading">
19
+ <CardHeader className={PRIMARY_HEADER}>
20
+ <CardTitle id="board-stats-heading" className="text-primary">
21
+ {c('heading')}
22
+ </CardTitle>
23
+ </CardHeader>
24
24
 
25
- {computedAt === null ? (
26
- <span>{c('notComputed')}</span>
27
- ) : (
28
- <>
29
- {[
30
- { label: c('threads'), value: threadCount },
31
- { label: c('posts'), value: postCount },
32
- { label: c('members'), value: memberCount },
33
- ].map((figure) => (
34
- <span key={figure.label}>
35
- <span className={`font-medium text-foreground ${NUMERIC}`}>{figure.value.label}</span>{' '}
36
- {figure.label}
37
- </span>
38
- ))}
25
+ <CardContent className="flex flex-col gap-3">
26
+ {computedAt === null ? (
27
+ <p className="text-xs text-muted-foreground">{c('notComputed')}</p>
28
+ ) : (
29
+ <>
30
+ <dl className="grid grid-cols-3 gap-2 text-center">
31
+ {[
32
+ { label: c('threads'), value: threadCount },
33
+ { label: c('posts'), value: postCount },
34
+ { label: c('members'), value: memberCount },
35
+ ].map((figure) => (
36
+ <div key={figure.label}>
37
+ <dd className={`text-sm font-medium text-foreground ${NUMERIC}`}>
38
+ {figure.value.label}
39
+ </dd>
40
+ <dt className="text-xs text-muted-foreground">{figure.label}</dt>
41
+ </div>
42
+ ))}
43
+ </dl>
39
44
 
40
- {newestMember !== null && (
41
- <span>
42
- {c('newestMember')} <UserRef user={newestMember} />
43
- </span>
44
- )}
45
+ {newestMember !== null && (
46
+ <p className="text-xs text-muted-foreground">
47
+ {c('newestMember')} <UserRef user={newestMember} />
48
+ </p>
49
+ )}
45
50
 
46
- <span className={`ms-auto ${NUMERIC}`}>
47
- {c('counted')} <Stamp at={computedAt} />
48
- </span>
49
- </>
50
- )}
51
- </section>
51
+ <p className={`text-xs text-muted-foreground ${NUMERIC}`}>
52
+ {c('counted')} <Stamp at={computedAt} />
53
+ </p>
54
+ </>
55
+ )}
56
+ </CardContent>
57
+ </Card>
52
58
  )
53
59
  }
@@ -1,14 +1,14 @@
1
1
  import type { CategoryBlockModel } from '@meith/theme-kit'
2
2
  import { Card, CardDescription, CardHeader, CardRows, CardTitle } from '@meith/ui'
3
3
 
4
- import { LINK } from '../shared'
4
+ import { LINK, PRIMARY_HEADER } from '../shared'
5
5
 
6
6
  export function CategoryBlock({ category, children }: CategoryBlockModel) {
7
7
  const headingId = `category-${category.id}`
8
8
 
9
9
  return (
10
10
  <Card aria-labelledby={headingId}>
11
- <CardHeader className="flex-col items-start gap-0.5 border-b-primary/15 bg-primary/6">
11
+ <CardHeader className={`flex-col items-start gap-0.5 ${PRIMARY_HEADER}`}>
12
12
  <CardTitle id={headingId} className="text-primary">
13
13
  <a href={category.href} className={`${LINK} hover:text-primary-hover`}>
14
14
  {category.title}
@@ -143,7 +143,7 @@ export function Header({
143
143
  const hasNavigation = navigation.length > 0
144
144
 
145
145
  return (
146
- <header className="relative border-t-4 border-b border-t-primary border-b-border bg-card">
146
+ <header className="relative border-b border-b-border bg-card">
147
147
  <div className={`${PAGE} flex flex-wrap items-center gap-x-4 gap-y-3 py-3`}>
148
148
  <a
149
149
  href={homeHref}
@@ -10,15 +10,17 @@ import {
10
10
  EmptyTitle,
11
11
  } from '@meith/ui'
12
12
 
13
- import { LINK, MUTED_LINK, NUMERIC, Stamp, UserRef } from '../shared'
13
+ import { LINK, MUTED_LINK, NUMERIC, PRIMARY_HEADER, Stamp, UserRef } from '../shared'
14
14
 
15
15
  export function LatestPosts({ posts, capturedAt, copy }: LatestPostsModel & { copy: SlotCopy }) {
16
16
  const c = (key: string) => fromSlotCopy(copy, `default.latestPosts.${key}`)
17
17
 
18
18
  return (
19
19
  <Card aria-labelledby="latest-posts-heading">
20
- <CardHeader>
21
- <CardTitle id="latest-posts-heading">{c('heading')}</CardTitle>
20
+ <CardHeader className={PRIMARY_HEADER}>
21
+ <CardTitle id="latest-posts-heading" className="text-primary">
22
+ {c('heading')}
23
+ </CardTitle>
22
24
  <p className={`text-xs text-muted-foreground ${NUMERIC}`}>
23
25
  {c('asOf')} <Stamp at={capturedAt} />
24
26
  </p>
@@ -10,7 +10,7 @@ import {
10
10
  EmptyTitle,
11
11
  } from '@meith/ui'
12
12
 
13
- import { LINK, MUTED_LINK, NUMERIC, Stamp, UserRef } from '../shared'
13
+ import { LINK, MUTED_LINK, NUMERIC, PRIMARY_HEADER, Stamp, UserRef } from '../shared'
14
14
 
15
15
  export function LatestThreads({
16
16
  threads,
@@ -21,8 +21,10 @@ export function LatestThreads({
21
21
 
22
22
  return (
23
23
  <Card aria-labelledby="latest-threads-heading">
24
- <CardHeader>
25
- <CardTitle id="latest-threads-heading">{c('heading')}</CardTitle>
24
+ <CardHeader className={PRIMARY_HEADER}>
25
+ <CardTitle id="latest-threads-heading" className="text-primary">
26
+ {c('heading')}
27
+ </CardTitle>
26
28
  <p className={`text-xs text-muted-foreground ${NUMERIC}`}>
27
29
  {c('asOf')} <Stamp at={capturedAt} />
28
30
  </p>
package/src/theme.ts CHANGED
@@ -70,7 +70,7 @@ import { WhoIsOnline } from './slots/who-is-online'
70
70
  export const defaultTheme = defineTheme({
71
71
  key: 'default',
72
72
  title: 'Default',
73
- version: '0.33.0',
73
+ version: '0.33.1',
74
74
  slots: {
75
75
  Shell,
76
76
  Header,