@sarimarcus/content-sites-core 0.43.0 → 0.45.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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All packages in the platform release in lockstep; entries are per release version.
4
4
 
5
+ ## 0.45.0 (2026-10-22)
6
+
7
+ - `people`: `peopleSchemaFields` gains an optional `knownFor` (one trimmed line, at most `KNOWN_FOR_MAX` = 100 characters) for the PersonCard hook. The schema needs no site edit; to show it, a site passes `p.data.knownFor ?? p.data.description` to `PeopleHub` (SLA-3297).
8
+
9
+ ## 0.44.0 (2026-10-22)
10
+
11
+ - No changes; lockstep release with ui (SLA-3314).
12
+
5
13
  ## 0.43.0 (2026-10-22)
6
14
 
7
15
  - No changes; lockstep release with ui (SLA-3313).
@@ -4,6 +4,8 @@ import type { FieldIssue } from '../internal/issues.ts';
4
4
  type ZodBuilders = Pick<typeof Zod, 'enum' | 'number' | 'string' | 'array' | 'boolean' | 'object'>;
5
5
  export declare const PERSON_ROLES: readonly ["ruler", "military", "scholar", "philosopher", "poet", "writer", "architect", "artist", "saint", "cleric", "physician", "patron"];
6
6
  export declare const PERSON_ALT_PREFIX = "Illustration of ";
7
+ /** Longest `knownFor` hook, the one line a PersonCard shows instead of the clamped description. */
8
+ export declare const KNOWN_FOR_MAX = 100;
7
9
  export interface PeopleSchemaOptions {
8
10
  /** The site's era ids (the `eras` module); omit to leave `era` out of the schema. */
9
11
  eraValues?: readonly string[];
@@ -21,6 +23,7 @@ export declare function peopleSchemaFields(z: ZodBuilders, options?: PeopleSchem
21
23
  [x: string]: string;
22
24
  }>>;
23
25
  description: Zod.ZodString;
26
+ knownFor: Zod.ZodOptional<Zod.ZodString>;
24
27
  targetKeyword: Zod.ZodString;
25
28
  seoTitle: Zod.ZodString;
26
29
  bio: Zod.ZodString;
@@ -6,6 +6,8 @@ export const PERSON_ROLES = [
6
6
  'physician', 'patron',
7
7
  ];
8
8
  export const PERSON_ALT_PREFIX = 'Illustration of ';
9
+ /** Longest `knownFor` hook, the one line a PersonCard shows instead of the clamped description. */
10
+ export const KNOWN_FOR_MAX = 100;
9
11
  const WIKIDATA_URL = /^https:\/\/www\.wikidata\.org\/(wiki|entity)\/Q\d+$/;
10
12
  const DATE = /^\d{4}-\d{2}-\d{2}/;
11
13
  /**
@@ -28,6 +30,7 @@ export function peopleSchemaFields(z, options = {}) {
28
30
  ...(options.eraValues?.length ? { era: z.enum(options.eraValues).optional() } : {}),
29
31
  roles: z.array(z.enum(roles)).min(1),
30
32
  description: z.string().min(descMin).max(descMax),
33
+ knownFor: z.string().trim().min(1).max(KNOWN_FOR_MAX).optional(),
31
34
  targetKeyword: z.string().trim().min(1),
32
35
  seoTitle: z.string().min(titleMin).max(titleMax),
33
36
  bio: z.string().min(1),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarimarcus/content-sites-core",
3
- "version": "0.43.0",
3
+ "version": "0.45.0",
4
4
  "description": "Non-visual utilities, Astro config builders and SEO schema assembly shared by the content sites.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -17,6 +17,9 @@ export const PERSON_ROLES = [
17
17
 
18
18
  export const PERSON_ALT_PREFIX = 'Illustration of ';
19
19
 
20
+ /** Longest `knownFor` hook, the one line a PersonCard shows instead of the clamped description. */
21
+ export const KNOWN_FOR_MAX = 100;
22
+
20
23
  const WIKIDATA_URL = /^https:\/\/www\.wikidata\.org\/(wiki|entity)\/Q\d+$/;
21
24
  const DATE = /^\d{4}-\d{2}-\d{2}/;
22
25
 
@@ -48,6 +51,7 @@ export function peopleSchemaFields(z: ZodBuilders, options: PeopleSchemaOptions
48
51
  ...(options.eraValues?.length ? { era: z.enum(options.eraValues as [string, ...string[]]).optional() } : {}),
49
52
  roles: z.array(z.enum(roles as [string, ...string[]])).min(1),
50
53
  description: z.string().min(descMin).max(descMax),
54
+ knownFor: z.string().trim().min(1).max(KNOWN_FOR_MAX).optional(),
51
55
  targetKeyword: z.string().trim().min(1),
52
56
  seoTitle: z.string().min(titleMin).max(titleMax),
53
57
  bio: z.string().min(1),