@takuhon/core 1.3.0 → 1.4.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/dist/index.d.ts +624 -20
- package/dist/index.js +4533 -805
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/takuhon.schema.json +158 -2
package/package.json
CHANGED
package/takuhon.schema.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://takuhon.example/schemas/1.
|
|
3
|
+
"$id": "https://takuhon.example/schemas/1.4.0/takuhon.schema.json",
|
|
4
4
|
"title": "Takuhon Profile",
|
|
5
5
|
"description": "Portable profile data format consumed by @takuhon/core. The canonical contract for profile content authored as takuhon.json.",
|
|
6
6
|
"type": "object",
|
|
@@ -88,6 +88,11 @@
|
|
|
88
88
|
"maxItems": 50,
|
|
89
89
|
"items": { "$ref": "#/$defs/Recommendation" }
|
|
90
90
|
},
|
|
91
|
+
"highlights": {
|
|
92
|
+
"type": "array",
|
|
93
|
+
"maxItems": 50,
|
|
94
|
+
"items": { "$ref": "#/$defs/Highlight" }
|
|
95
|
+
},
|
|
91
96
|
"contact": { "$ref": "#/$defs/Contact" },
|
|
92
97
|
"settings": { "$ref": "#/$defs/Settings" },
|
|
93
98
|
"meta": { "$ref": "#/$defs/Meta" }
|
|
@@ -279,6 +284,10 @@
|
|
|
279
284
|
"id": { "$ref": "#/$defs/Slug" },
|
|
280
285
|
"visibility": { "$ref": "#/$defs/Visibility" },
|
|
281
286
|
"title": { "$ref": "#/$defs/LocalizedTitle" },
|
|
287
|
+
"role": {
|
|
288
|
+
"$ref": "#/$defs/LocalizedTitle",
|
|
289
|
+
"description": "The owner's role/relationship on this project (added in 1.4.0), e.g. \"Author & lead maintainer\", \"Contributor\", \"Product owner\". Rendered as a short line under the project title. Localized, like the section-entry roles in `Career`/`Membership`/`Volunteering`."
|
|
290
|
+
},
|
|
282
291
|
"description": { "$ref": "#/$defs/LocalizedBody" },
|
|
283
292
|
"url": { "$ref": "#/$defs/Url" },
|
|
284
293
|
"tags": {
|
|
@@ -302,7 +311,13 @@
|
|
|
302
311
|
"properties": {
|
|
303
312
|
"id": { "$ref": "#/$defs/Slug" },
|
|
304
313
|
"visibility": { "$ref": "#/$defs/Visibility" },
|
|
305
|
-
"label": {
|
|
314
|
+
"label": {
|
|
315
|
+
"anyOf": [
|
|
316
|
+
{ "type": "string", "minLength": 1, "maxLength": 100 },
|
|
317
|
+
{ "$ref": "#/$defs/LocalizedTitle" }
|
|
318
|
+
],
|
|
319
|
+
"description": "Skill name. A plain string is locale-independent; a localized map (added in 1.4.0) resolves per request locale. Existing single-string labels stay valid — the map form is purely additive."
|
|
320
|
+
},
|
|
306
321
|
"category": {
|
|
307
322
|
"type": "string",
|
|
308
323
|
"minLength": 1,
|
|
@@ -387,9 +402,72 @@
|
|
|
387
402
|
"maxItems": 50,
|
|
388
403
|
"items": { "$ref": "#/$defs/SkillCategory" },
|
|
389
404
|
"description": "Ordered skill-category display groups (added in 1.3.0). When present, the rendered profile groups skills by their `category` under these localized headings, in array order; absent = the flat skill list. A skill whose `category` is not listed here (or which has none) renders in a trailing group so nothing is dropped."
|
|
405
|
+
},
|
|
406
|
+
"sectionOrder": {
|
|
407
|
+
"type": "array",
|
|
408
|
+
"uniqueItems": true,
|
|
409
|
+
"maxItems": 18,
|
|
410
|
+
"items": {
|
|
411
|
+
"enum": [
|
|
412
|
+
"about",
|
|
413
|
+
"careers",
|
|
414
|
+
"projects",
|
|
415
|
+
"volunteering",
|
|
416
|
+
"skills",
|
|
417
|
+
"activity",
|
|
418
|
+
"education",
|
|
419
|
+
"certifications",
|
|
420
|
+
"publications",
|
|
421
|
+
"honors",
|
|
422
|
+
"memberships",
|
|
423
|
+
"courses",
|
|
424
|
+
"patents",
|
|
425
|
+
"testScores",
|
|
426
|
+
"languages",
|
|
427
|
+
"recommendations",
|
|
428
|
+
"highlights",
|
|
429
|
+
"contact"
|
|
430
|
+
]
|
|
431
|
+
},
|
|
432
|
+
"description": "Explicit section display order (added in 1.4.0). A partial list is allowed — any renderable section not named here follows, in the default order. Absent = the default order."
|
|
433
|
+
},
|
|
434
|
+
"sectionLabels": { "$ref": "#/$defs/SectionLabelOverrides" },
|
|
435
|
+
"highlightsIntro": {
|
|
436
|
+
"$ref": "#/$defs/LocalizedTitle",
|
|
437
|
+
"description": "Optional localized intro line shown under the highlights section heading (added in 1.4.0). Absent = no intro line."
|
|
390
438
|
}
|
|
391
439
|
}
|
|
392
440
|
},
|
|
441
|
+
"SectionLabelOverrides": {
|
|
442
|
+
"type": "object",
|
|
443
|
+
"additionalProperties": false,
|
|
444
|
+
"description": "Localized overrides for section headings and chrome labels (added in 1.4.0). Each present key retitles that label; the renderer merges these over its built-in locale pack. Absent keys keep the built-in label.",
|
|
445
|
+
"properties": {
|
|
446
|
+
"about": { "$ref": "#/$defs/LocalizedTitle" },
|
|
447
|
+
"careers": { "$ref": "#/$defs/LocalizedTitle" },
|
|
448
|
+
"projects": { "$ref": "#/$defs/LocalizedTitle" },
|
|
449
|
+
"volunteering": { "$ref": "#/$defs/LocalizedTitle" },
|
|
450
|
+
"skills": { "$ref": "#/$defs/LocalizedTitle" },
|
|
451
|
+
"activity": { "$ref": "#/$defs/LocalizedTitle" },
|
|
452
|
+
"education": { "$ref": "#/$defs/LocalizedTitle" },
|
|
453
|
+
"certifications": { "$ref": "#/$defs/LocalizedTitle" },
|
|
454
|
+
"publications": { "$ref": "#/$defs/LocalizedTitle" },
|
|
455
|
+
"honors": { "$ref": "#/$defs/LocalizedTitle" },
|
|
456
|
+
"memberships": { "$ref": "#/$defs/LocalizedTitle" },
|
|
457
|
+
"courses": { "$ref": "#/$defs/LocalizedTitle" },
|
|
458
|
+
"patents": { "$ref": "#/$defs/LocalizedTitle" },
|
|
459
|
+
"testScores": { "$ref": "#/$defs/LocalizedTitle" },
|
|
460
|
+
"languages": { "$ref": "#/$defs/LocalizedTitle" },
|
|
461
|
+
"recommendations": { "$ref": "#/$defs/LocalizedTitle" },
|
|
462
|
+
"highlights": { "$ref": "#/$defs/LocalizedTitle" },
|
|
463
|
+
"contact": { "$ref": "#/$defs/LocalizedTitle" },
|
|
464
|
+
"skipLink": { "$ref": "#/$defs/LocalizedTitle" },
|
|
465
|
+
"localeNav": { "$ref": "#/$defs/LocalizedTitle" },
|
|
466
|
+
"featuredLinks": { "$ref": "#/$defs/LocalizedTitle" },
|
|
467
|
+
"otherLinks": { "$ref": "#/$defs/LocalizedTitle" },
|
|
468
|
+
"poweredBy": { "$ref": "#/$defs/LocalizedTitle" }
|
|
469
|
+
}
|
|
470
|
+
},
|
|
393
471
|
"AppearanceSettings": {
|
|
394
472
|
"type": "object",
|
|
395
473
|
"additionalProperties": false,
|
|
@@ -439,6 +517,10 @@
|
|
|
439
517
|
"primaryContrast": {
|
|
440
518
|
"$ref": "#/$defs/CssColor",
|
|
441
519
|
"description": "Foreground color used on top of the primary color."
|
|
520
|
+
},
|
|
521
|
+
"heading": {
|
|
522
|
+
"$ref": "#/$defs/CssColor",
|
|
523
|
+
"description": "Heading color for the \"About\" section's Markdown sub-headings (##/###)."
|
|
442
524
|
}
|
|
443
525
|
}
|
|
444
526
|
},
|
|
@@ -544,6 +626,10 @@
|
|
|
544
626
|
"type": "boolean",
|
|
545
627
|
"description": "Default true. When false, recommendations[] is emitted empty on public surfaces."
|
|
546
628
|
},
|
|
629
|
+
"highlights": {
|
|
630
|
+
"type": "boolean",
|
|
631
|
+
"description": "Default true. When false, highlights[] is emitted empty on public surfaces."
|
|
632
|
+
},
|
|
547
633
|
"contact": {
|
|
548
634
|
"type": "boolean",
|
|
549
635
|
"description": "Default true. When false, the contact section (email, formUrl) is emitted empty on public surfaces."
|
|
@@ -725,9 +811,29 @@
|
|
|
725
811
|
},
|
|
726
812
|
"isCurrent": { "type": "boolean" },
|
|
727
813
|
"url": { "$ref": "#/$defs/Url" },
|
|
814
|
+
"secondaryLink": {
|
|
815
|
+
"$ref": "#/$defs/SecondaryLink",
|
|
816
|
+
"description": "An optional second link for this entry (added in 1.4.0), rendered as a small pill beside the description — e.g. the organization's GitHub org page next to its main site. The brand glyph is resolved from the URL host; no vendor name is hard-coded."
|
|
817
|
+
},
|
|
728
818
|
"order": { "type": "integer", "minimum": 0 }
|
|
729
819
|
}
|
|
730
820
|
},
|
|
821
|
+
"SecondaryLink": {
|
|
822
|
+
"type": "object",
|
|
823
|
+
"additionalProperties": false,
|
|
824
|
+
"required": ["url"],
|
|
825
|
+
"description": "A supplementary link with an optional localized label (added in 1.4.0). When the label is absent the renderer shows the URL host. The brand glyph is resolved from the URL host.",
|
|
826
|
+
"properties": {
|
|
827
|
+
"url": {
|
|
828
|
+
"$ref": "#/$defs/Url",
|
|
829
|
+
"description": "The link target."
|
|
830
|
+
},
|
|
831
|
+
"label": {
|
|
832
|
+
"$ref": "#/$defs/LocalizedTitle",
|
|
833
|
+
"description": "Localized display label. When absent, the renderer derives a label from the URL host."
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
},
|
|
731
837
|
"Honor": {
|
|
732
838
|
"type": "object",
|
|
733
839
|
"additionalProperties": false,
|
|
@@ -933,6 +1039,56 @@
|
|
|
933
1039
|
"description": "Link to the recommender's profile, for external verification by the reader."
|
|
934
1040
|
}
|
|
935
1041
|
}
|
|
1042
|
+
},
|
|
1043
|
+
"Highlight": {
|
|
1044
|
+
"type": "object",
|
|
1045
|
+
"additionalProperties": false,
|
|
1046
|
+
"required": ["id", "platform", "url", "image", "alt", "title"],
|
|
1047
|
+
"description": "One curated \"selected post\" (added in 1.4.0), rendered as a card in the highlights carousel. A hand-picked link to an off-site post (Instagram, X, a blog, a talk, …) with a self-hosted thumbnail — deliberately not an automated social feed. Appears on the public page, /api/profile, /takuhon.json, and MCP; it is intentionally omitted from JSON-LD and the derived CV (no natural vocabulary/résumé slot).",
|
|
1048
|
+
"properties": {
|
|
1049
|
+
"id": { "$ref": "#/$defs/Slug" },
|
|
1050
|
+
"visibility": { "$ref": "#/$defs/Visibility" },
|
|
1051
|
+
"platform": {
|
|
1052
|
+
"type": "string",
|
|
1053
|
+
"minLength": 1,
|
|
1054
|
+
"maxLength": 64,
|
|
1055
|
+
"description": "Free-form source platform (e.g. 'instagram', 'x', 'github', 'blog', 'event'). A value with a matching brand glyph renders a badge icon; others fall back to a text badge. Not an enum, so new platforms need no schema change."
|
|
1056
|
+
},
|
|
1057
|
+
"url": {
|
|
1058
|
+
"$ref": "#/$defs/Url",
|
|
1059
|
+
"description": "Permalink to the original post; the card links here."
|
|
1060
|
+
},
|
|
1061
|
+
"image": {
|
|
1062
|
+
"type": "string",
|
|
1063
|
+
"format": "uri-reference",
|
|
1064
|
+
"maxLength": 2048,
|
|
1065
|
+
"description": "Self-hosted thumbnail, as an absolute URL or a root-relative path (like avatar). Serving the asset is the deployment's responsibility (a static build does not copy it; a Cloudflare deploy serves it via its assets binding / /assets/*). Do not point at a third-party CDN URL — those can be signed/expiring and leak visitor data."
|
|
1066
|
+
},
|
|
1067
|
+
"alt": {
|
|
1068
|
+
"$ref": "#/$defs/LocalizedTitle",
|
|
1069
|
+
"description": "Required alt text for the thumbnail — the card must not depend on the image alone."
|
|
1070
|
+
},
|
|
1071
|
+
"title": {
|
|
1072
|
+
"$ref": "#/$defs/LocalizedTitle",
|
|
1073
|
+
"description": "Localized card title / caption."
|
|
1074
|
+
},
|
|
1075
|
+
"description": {
|
|
1076
|
+
"$ref": "#/$defs/LocalizedBody",
|
|
1077
|
+
"description": "Optional localized supporting text shown under the title."
|
|
1078
|
+
},
|
|
1079
|
+
"postedAt": {
|
|
1080
|
+
"type": "string",
|
|
1081
|
+
"format": "date",
|
|
1082
|
+
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$",
|
|
1083
|
+
"description": "Optional post date, ISO 'YYYY-MM-DD' (full date, unlike the YYYY-MM dates used elsewhere — a post has a specific day)."
|
|
1084
|
+
},
|
|
1085
|
+
"tags": {
|
|
1086
|
+
"type": "array",
|
|
1087
|
+
"maxItems": 30,
|
|
1088
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 50 }
|
|
1089
|
+
},
|
|
1090
|
+
"order": { "type": "integer", "minimum": 0 }
|
|
1091
|
+
}
|
|
936
1092
|
}
|
|
937
1093
|
}
|
|
938
1094
|
}
|