@takuhon/ui 0.11.0 → 0.13.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/dist/index.d.ts CHANGED
@@ -1,9 +1,50 @@
1
- import { LocalizedTakuhon, LocalizedProfile, LocalizedLink, LocaleTag, LocalizedCareer, LocalizedEducation, LocalizedCertification, LocalizedMembership, LocalizedVolunteering, LocalizedHonor, LocalizedRecommendation, LocalizedPublication, LocalizedLanguage, LocalizedTestScore, LocalizedCourse, LocalizedPatent, LocalizedProject, Skill, Contact } from '@takuhon/core';
1
+ import { LocalizedTakuhon, ActivitySnapshot, LocaleTag, CvDocument, LocalizedProfile, LocalizedLink, LocalizedCareer, LocalizedEducation, LocalizedCertification, LocalizedMembership, LocalizedVolunteering, LocalizedHonor, LocalizedRecommendation, LocalizedPublication, LocalizedLanguage, LocalizedTestScore, LocalizedCourse, LocalizedPatent, LocalizedProject, Skill, Contact } from '@takuhon/core';
2
2
 
3
3
  interface TakuhonProfileProps {
4
4
  data: LocalizedTakuhon;
5
- }
6
- declare function TakuhonProfile({ data }: TakuhonProfileProps): React.JSX.Element;
5
+ /**
6
+ * Synced developer-activity snapshot (a sibling document, fetched by the
7
+ * host — e.g. `GET /api/activity`). Rendered only while
8
+ * `settings.activity.enabled` is true, the same opt-in gate the API and the
9
+ * static export apply, so disabling the feature drops the section even if a
10
+ * stale snapshot is still supplied.
11
+ */
12
+ activitySnapshot?: ActivitySnapshot | null;
13
+ }
14
+ declare function TakuhonProfile({ data, activitySnapshot }: TakuhonProfileProps): React.JSX.Element;
15
+
16
+ interface ActivitySectionProps {
17
+ /**
18
+ * The synced developer-activity snapshot (a sibling document, not part of
19
+ * `LocalizedTakuhon`). Hosts fetch it themselves — `GET /api/activity` on a
20
+ * deployment, or the `activity.json` beside the profile locally.
21
+ */
22
+ snapshot?: ActivitySnapshot | null;
23
+ locale?: LocaleTag;
24
+ }
25
+ /**
26
+ * Developer-activity section: the same self-owned inline-SVG card the static
27
+ * export renders, generated by `@takuhon/core`'s `renderActivitySvg` so the
28
+ * two surfaces cannot drift. Renders nothing without a snapshot (or with one
29
+ * that carries no metric data) — the section degrades away gracefully.
30
+ */
31
+ declare function ActivitySection({ snapshot, locale, }: ActivitySectionProps): React.JSX.Element | null;
32
+
33
+ interface CvViewProps {
34
+ /** The CV projection from `@takuhon/core`'s `deriveCv` (already privacy-filtered upstream). */
35
+ cv: CvDocument;
36
+ /** Locale for headings and dates; defaults to the CV's resolved locale. */
37
+ locale?: LocaleTag;
38
+ }
39
+ /**
40
+ * Print-ready résumé/CV view, the React counterpart of the CLI's `renderCvHtml`.
41
+ * Renders a {@link CvDocument} (from `@takuhon/core`'s `deriveCv`) as an A4
42
+ * single-column document; the co-located CSS module carries an `@media print`
43
+ * block so the browser's "Save as PDF" yields a clean résumé. This is a
44
+ * presentational component (it shows what `deriveCv` gives it, which the host
45
+ * has already privacy-filtered) and renders nothing for an empty CV.
46
+ */
47
+ declare function CvView({ cv, locale }: CvViewProps): React.JSX.Element | null;
7
48
 
8
49
  interface ProfileHeaderProps {
9
50
  profile: LocalizedProfile;
@@ -124,4 +165,4 @@ interface TakuhonHeadProps {
124
165
  }
125
166
  declare function TakuhonHead({ data, siteUrl, pageUrl }: TakuhonHeadProps): React.JSX.Element;
126
167
 
127
- export { CareerTimeline, type CareerTimelineProps, Certifications, type CertificationsProps, ContactInfo, type ContactInfoProps, Courses, type CoursesProps, EducationTimeline, type EducationTimelineProps, Footer, HonorsList, type HonorsListProps, Languages, type LanguagesProps, LinksList, type LinksListProps, LocaleSwitcher, type LocaleSwitcherProps, Memberships, type MembershipsProps, Patents, type PatentsProps, ProfileHeader, type ProfileHeaderProps, ProjectsList, type ProjectsListProps, Publications, type PublicationsProps, Recommendations, type RecommendationsProps, SkillsList, type SkillsListProps, TakuhonHead, type TakuhonHeadProps, TakuhonProfile, type TakuhonProfileProps, TestScores, type TestScoresProps, Volunteering, type VolunteeringProps };
168
+ export { ActivitySection, type ActivitySectionProps, CareerTimeline, type CareerTimelineProps, Certifications, type CertificationsProps, ContactInfo, type ContactInfoProps, Courses, type CoursesProps, CvView, type CvViewProps, EducationTimeline, type EducationTimelineProps, Footer, HonorsList, type HonorsListProps, Languages, type LanguagesProps, LinksList, type LinksListProps, LocaleSwitcher, type LocaleSwitcherProps, Memberships, type MembershipsProps, Patents, type PatentsProps, ProfileHeader, type ProfileHeaderProps, ProjectsList, type ProjectsListProps, Publications, type PublicationsProps, Recommendations, type RecommendationsProps, SkillsList, type SkillsListProps, TakuhonHead, type TakuhonHeadProps, TakuhonProfile, type TakuhonProfileProps, TestScores, type TestScoresProps, Volunteering, type VolunteeringProps };