@takuhon/core 0.21.0 → 0.23.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 +203 -42
- package/dist/index.js +2657 -2251
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/takuhon.schema.json +21 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var $schema = "https://json-schema.org/draft/2020-12/schema";
|
|
2
|
-
var $id = "https://takuhon.example/schemas/0.
|
|
2
|
+
var $id = "https://takuhon.example/schemas/0.7.0/takuhon.schema.json";
|
|
3
3
|
var title = "Takuhon Profile";
|
|
4
4
|
var description = "Portable profile data format consumed by @takuhon/core. The canonical contract for profile content authored as takuhon.json.";
|
|
5
5
|
var type = "object";
|
|
@@ -179,6 +179,14 @@ var $defs = {
|
|
|
179
179
|
pattern: "^[a-z0-9][a-z0-9-]*$",
|
|
180
180
|
description: "URL-safe identifier (lowercase alphanumerics and hyphens, must start with alphanumeric)."
|
|
181
181
|
},
|
|
182
|
+
Visibility: {
|
|
183
|
+
type: "string",
|
|
184
|
+
"enum": [
|
|
185
|
+
"public",
|
|
186
|
+
"private"
|
|
187
|
+
],
|
|
188
|
+
description: "Per-item public visibility (added in 0.7.0). 'private' removes the item from every public surface via applyPublicPrivacyFilter; an absent value or 'public' keeps the item public."
|
|
189
|
+
},
|
|
182
190
|
LocalizedTitle: {
|
|
183
191
|
type: "object",
|
|
184
192
|
minProperties: 1,
|
|
@@ -301,6 +309,9 @@ var $defs = {
|
|
|
301
309
|
id: {
|
|
302
310
|
$ref: "#/$defs/Slug"
|
|
303
311
|
},
|
|
312
|
+
visibility: {
|
|
313
|
+
$ref: "#/$defs/Visibility"
|
|
314
|
+
},
|
|
304
315
|
type: {
|
|
305
316
|
$ref: "#/$defs/LinkType"
|
|
306
317
|
},
|
|
@@ -359,6 +370,9 @@ var $defs = {
|
|
|
359
370
|
id: {
|
|
360
371
|
$ref: "#/$defs/Slug"
|
|
361
372
|
},
|
|
373
|
+
visibility: {
|
|
374
|
+
$ref: "#/$defs/Visibility"
|
|
375
|
+
},
|
|
362
376
|
organization: {
|
|
363
377
|
$ref: "#/$defs/LocalizedTitle"
|
|
364
378
|
},
|
|
@@ -407,6 +421,9 @@ var $defs = {
|
|
|
407
421
|
id: {
|
|
408
422
|
$ref: "#/$defs/Slug"
|
|
409
423
|
},
|
|
424
|
+
visibility: {
|
|
425
|
+
$ref: "#/$defs/Visibility"
|
|
426
|
+
},
|
|
410
427
|
title: {
|
|
411
428
|
$ref: "#/$defs/LocalizedTitle"
|
|
412
429
|
},
|
|
@@ -461,6 +478,9 @@ var $defs = {
|
|
|
461
478
|
id: {
|
|
462
479
|
$ref: "#/$defs/Slug"
|
|
463
480
|
},
|
|
481
|
+
visibility: {
|
|
482
|
+
$ref: "#/$defs/Visibility"
|
|
483
|
+
},
|
|
464
484
|
label: {
|
|
465
485
|
type: "string",
|
|
466
486
|
minLength: 1,
|
|
@@ -782,6 +802,9 @@ var $defs = {
|
|
|
782
802
|
id: {
|
|
783
803
|
$ref: "#/$defs/Slug"
|
|
784
804
|
},
|
|
805
|
+
visibility: {
|
|
806
|
+
$ref: "#/$defs/Visibility"
|
|
807
|
+
},
|
|
785
808
|
title: {
|
|
786
809
|
$ref: "#/$defs/LocalizedTitle"
|
|
787
810
|
},
|
|
@@ -829,6 +852,9 @@ var $defs = {
|
|
|
829
852
|
id: {
|
|
830
853
|
$ref: "#/$defs/Slug"
|
|
831
854
|
},
|
|
855
|
+
visibility: {
|
|
856
|
+
$ref: "#/$defs/Visibility"
|
|
857
|
+
},
|
|
832
858
|
organization: {
|
|
833
859
|
$ref: "#/$defs/LocalizedTitle"
|
|
834
860
|
},
|
|
@@ -877,6 +903,9 @@ var $defs = {
|
|
|
877
903
|
id: {
|
|
878
904
|
$ref: "#/$defs/Slug"
|
|
879
905
|
},
|
|
906
|
+
visibility: {
|
|
907
|
+
$ref: "#/$defs/Visibility"
|
|
908
|
+
},
|
|
880
909
|
organization: {
|
|
881
910
|
$ref: "#/$defs/LocalizedTitle"
|
|
882
911
|
},
|
|
@@ -927,6 +956,9 @@ var $defs = {
|
|
|
927
956
|
id: {
|
|
928
957
|
$ref: "#/$defs/Slug"
|
|
929
958
|
},
|
|
959
|
+
visibility: {
|
|
960
|
+
$ref: "#/$defs/Visibility"
|
|
961
|
+
},
|
|
930
962
|
title: {
|
|
931
963
|
$ref: "#/$defs/LocalizedTitle"
|
|
932
964
|
},
|
|
@@ -960,6 +992,9 @@ var $defs = {
|
|
|
960
992
|
id: {
|
|
961
993
|
$ref: "#/$defs/Slug"
|
|
962
994
|
},
|
|
995
|
+
visibility: {
|
|
996
|
+
$ref: "#/$defs/Visibility"
|
|
997
|
+
},
|
|
963
998
|
institution: {
|
|
964
999
|
$ref: "#/$defs/LocalizedTitle"
|
|
965
1000
|
},
|
|
@@ -1016,6 +1051,9 @@ var $defs = {
|
|
|
1016
1051
|
id: {
|
|
1017
1052
|
$ref: "#/$defs/Slug"
|
|
1018
1053
|
},
|
|
1054
|
+
visibility: {
|
|
1055
|
+
$ref: "#/$defs/Visibility"
|
|
1056
|
+
},
|
|
1019
1057
|
title: {
|
|
1020
1058
|
$ref: "#/$defs/LocalizedTitle"
|
|
1021
1059
|
},
|
|
@@ -1065,6 +1103,9 @@ var $defs = {
|
|
|
1065
1103
|
id: {
|
|
1066
1104
|
$ref: "#/$defs/Slug"
|
|
1067
1105
|
},
|
|
1106
|
+
visibility: {
|
|
1107
|
+
$ref: "#/$defs/Visibility"
|
|
1108
|
+
},
|
|
1068
1109
|
language: {
|
|
1069
1110
|
$ref: "#/$defs/LocaleTag"
|
|
1070
1111
|
},
|
|
@@ -1099,6 +1140,9 @@ var $defs = {
|
|
|
1099
1140
|
id: {
|
|
1100
1141
|
$ref: "#/$defs/Slug"
|
|
1101
1142
|
},
|
|
1143
|
+
visibility: {
|
|
1144
|
+
$ref: "#/$defs/Visibility"
|
|
1145
|
+
},
|
|
1102
1146
|
title: {
|
|
1103
1147
|
$ref: "#/$defs/LocalizedTitle"
|
|
1104
1148
|
},
|
|
@@ -1142,6 +1186,9 @@ var $defs = {
|
|
|
1142
1186
|
id: {
|
|
1143
1187
|
$ref: "#/$defs/Slug"
|
|
1144
1188
|
},
|
|
1189
|
+
visibility: {
|
|
1190
|
+
$ref: "#/$defs/Visibility"
|
|
1191
|
+
},
|
|
1145
1192
|
title: {
|
|
1146
1193
|
$ref: "#/$defs/LocalizedTitle"
|
|
1147
1194
|
},
|
|
@@ -1204,6 +1251,9 @@ var $defs = {
|
|
|
1204
1251
|
id: {
|
|
1205
1252
|
$ref: "#/$defs/Slug"
|
|
1206
1253
|
},
|
|
1254
|
+
visibility: {
|
|
1255
|
+
$ref: "#/$defs/Visibility"
|
|
1256
|
+
},
|
|
1207
1257
|
title: {
|
|
1208
1258
|
$ref: "#/$defs/LocalizedTitle"
|
|
1209
1259
|
},
|
|
@@ -1244,6 +1294,9 @@ var $defs = {
|
|
|
1244
1294
|
id: {
|
|
1245
1295
|
$ref: "#/$defs/Slug"
|
|
1246
1296
|
},
|
|
1297
|
+
visibility: {
|
|
1298
|
+
$ref: "#/$defs/Visibility"
|
|
1299
|
+
},
|
|
1247
1300
|
body: {
|
|
1248
1301
|
$ref: "#/$defs/LocalizedBody"
|
|
1249
1302
|
},
|
|
@@ -1488,6 +1541,11 @@ declare const schema: {
|
|
|
1488
1541
|
pattern: string;
|
|
1489
1542
|
description: string;
|
|
1490
1543
|
};
|
|
1544
|
+
Visibility: {
|
|
1545
|
+
type: string;
|
|
1546
|
+
enum: string[];
|
|
1547
|
+
description: string;
|
|
1548
|
+
};
|
|
1491
1549
|
LocalizedTitle: {
|
|
1492
1550
|
type: string;
|
|
1493
1551
|
minProperties: number;
|
|
@@ -1586,6 +1644,9 @@ declare const schema: {
|
|
|
1586
1644
|
id: {
|
|
1587
1645
|
$ref: string;
|
|
1588
1646
|
};
|
|
1647
|
+
visibility: {
|
|
1648
|
+
$ref: string;
|
|
1649
|
+
};
|
|
1589
1650
|
type: {
|
|
1590
1651
|
$ref: string;
|
|
1591
1652
|
};
|
|
@@ -1633,6 +1694,9 @@ declare const schema: {
|
|
|
1633
1694
|
id: {
|
|
1634
1695
|
$ref: string;
|
|
1635
1696
|
};
|
|
1697
|
+
visibility: {
|
|
1698
|
+
$ref: string;
|
|
1699
|
+
};
|
|
1636
1700
|
organization: {
|
|
1637
1701
|
$ref: string;
|
|
1638
1702
|
};
|
|
@@ -1677,6 +1741,9 @@ declare const schema: {
|
|
|
1677
1741
|
id: {
|
|
1678
1742
|
$ref: string;
|
|
1679
1743
|
};
|
|
1744
|
+
visibility: {
|
|
1745
|
+
$ref: string;
|
|
1746
|
+
};
|
|
1680
1747
|
title: {
|
|
1681
1748
|
$ref: string;
|
|
1682
1749
|
};
|
|
@@ -1727,6 +1794,9 @@ declare const schema: {
|
|
|
1727
1794
|
id: {
|
|
1728
1795
|
$ref: string;
|
|
1729
1796
|
};
|
|
1797
|
+
visibility: {
|
|
1798
|
+
$ref: string;
|
|
1799
|
+
};
|
|
1730
1800
|
label: {
|
|
1731
1801
|
type: string;
|
|
1732
1802
|
minLength: number;
|
|
@@ -2032,6 +2102,9 @@ declare const schema: {
|
|
|
2032
2102
|
id: {
|
|
2033
2103
|
$ref: string;
|
|
2034
2104
|
};
|
|
2105
|
+
visibility: {
|
|
2106
|
+
$ref: string;
|
|
2107
|
+
};
|
|
2035
2108
|
title: {
|
|
2036
2109
|
$ref: string;
|
|
2037
2110
|
};
|
|
@@ -2074,6 +2147,9 @@ declare const schema: {
|
|
|
2074
2147
|
id: {
|
|
2075
2148
|
$ref: string;
|
|
2076
2149
|
};
|
|
2150
|
+
visibility: {
|
|
2151
|
+
$ref: string;
|
|
2152
|
+
};
|
|
2077
2153
|
organization: {
|
|
2078
2154
|
$ref: string;
|
|
2079
2155
|
};
|
|
@@ -2116,6 +2192,9 @@ declare const schema: {
|
|
|
2116
2192
|
id: {
|
|
2117
2193
|
$ref: string;
|
|
2118
2194
|
};
|
|
2195
|
+
visibility: {
|
|
2196
|
+
$ref: string;
|
|
2197
|
+
};
|
|
2119
2198
|
organization: {
|
|
2120
2199
|
$ref: string;
|
|
2121
2200
|
};
|
|
@@ -2160,6 +2239,9 @@ declare const schema: {
|
|
|
2160
2239
|
id: {
|
|
2161
2240
|
$ref: string;
|
|
2162
2241
|
};
|
|
2242
|
+
visibility: {
|
|
2243
|
+
$ref: string;
|
|
2244
|
+
};
|
|
2163
2245
|
title: {
|
|
2164
2246
|
$ref: string;
|
|
2165
2247
|
};
|
|
@@ -2189,6 +2271,9 @@ declare const schema: {
|
|
|
2189
2271
|
id: {
|
|
2190
2272
|
$ref: string;
|
|
2191
2273
|
};
|
|
2274
|
+
visibility: {
|
|
2275
|
+
$ref: string;
|
|
2276
|
+
};
|
|
2192
2277
|
institution: {
|
|
2193
2278
|
$ref: string;
|
|
2194
2279
|
};
|
|
@@ -2240,6 +2325,9 @@ declare const schema: {
|
|
|
2240
2325
|
id: {
|
|
2241
2326
|
$ref: string;
|
|
2242
2327
|
};
|
|
2328
|
+
visibility: {
|
|
2329
|
+
$ref: string;
|
|
2330
|
+
};
|
|
2243
2331
|
title: {
|
|
2244
2332
|
$ref: string;
|
|
2245
2333
|
};
|
|
@@ -2285,6 +2373,9 @@ declare const schema: {
|
|
|
2285
2373
|
id: {
|
|
2286
2374
|
$ref: string;
|
|
2287
2375
|
};
|
|
2376
|
+
visibility: {
|
|
2377
|
+
$ref: string;
|
|
2378
|
+
};
|
|
2288
2379
|
language: {
|
|
2289
2380
|
$ref: string;
|
|
2290
2381
|
};
|
|
@@ -2310,6 +2401,9 @@ declare const schema: {
|
|
|
2310
2401
|
id: {
|
|
2311
2402
|
$ref: string;
|
|
2312
2403
|
};
|
|
2404
|
+
visibility: {
|
|
2405
|
+
$ref: string;
|
|
2406
|
+
};
|
|
2313
2407
|
title: {
|
|
2314
2408
|
$ref: string;
|
|
2315
2409
|
};
|
|
@@ -2348,6 +2442,9 @@ declare const schema: {
|
|
|
2348
2442
|
id: {
|
|
2349
2443
|
$ref: string;
|
|
2350
2444
|
};
|
|
2445
|
+
visibility: {
|
|
2446
|
+
$ref: string;
|
|
2447
|
+
};
|
|
2351
2448
|
title: {
|
|
2352
2449
|
$ref: string;
|
|
2353
2450
|
};
|
|
@@ -2400,6 +2497,9 @@ declare const schema: {
|
|
|
2400
2497
|
id: {
|
|
2401
2498
|
$ref: string;
|
|
2402
2499
|
};
|
|
2500
|
+
visibility: {
|
|
2501
|
+
$ref: string;
|
|
2502
|
+
};
|
|
2403
2503
|
title: {
|
|
2404
2504
|
$ref: string;
|
|
2405
2505
|
};
|
|
@@ -2436,6 +2536,9 @@ declare const schema: {
|
|
|
2436
2536
|
id: {
|
|
2437
2537
|
$ref: string;
|
|
2438
2538
|
};
|
|
2539
|
+
visibility: {
|
|
2540
|
+
$ref: string;
|
|
2541
|
+
};
|
|
2439
2542
|
body: {
|
|
2440
2543
|
$ref: string;
|
|
2441
2544
|
};
|
|
@@ -2540,6 +2643,21 @@ type Slug = string;
|
|
|
2540
2643
|
type LocalizedTitle = Record<LocaleTag, string>;
|
|
2541
2644
|
/** Map from BCP-47 locale tag to a body-length localized string (≤5000 chars). */
|
|
2542
2645
|
type LocalizedBody = Record<LocaleTag, string>;
|
|
2646
|
+
/**
|
|
2647
|
+
* Per-item public visibility (added in 0.7.0). A content item (a link, career,
|
|
2648
|
+
* project, … — any element of a content-section array) set to `'private'` is
|
|
2649
|
+
* stripped from every public surface (`GET /`, `/api/profile`, `/api/jsonld`,
|
|
2650
|
+
* `/takuhon.json`, MCP, and the derived CV) by `applyPublicPrivacyFilter`, while
|
|
2651
|
+
* remaining editable through the authenticated admin export. An absent value —
|
|
2652
|
+
* or `'public'` — keeps the item public, so the default is all-visible and
|
|
2653
|
+
* omitting it is fully backwards-compatible. This is the item-level analogue of
|
|
2654
|
+
* the section-level {@link PublicVisibility}.
|
|
2655
|
+
*/
|
|
2656
|
+
type Visibility = 'public' | 'private';
|
|
2657
|
+
/** Mixin for content items that support a per-item {@link Visibility} flag. */
|
|
2658
|
+
interface VisibilityControlled {
|
|
2659
|
+
visibility?: Visibility;
|
|
2660
|
+
}
|
|
2543
2661
|
type LinkType = 'website' | 'blog' | 'github' | 'gitlab' | 'linkedin' | 'x' | 'mastodon' | 'bluesky' | 'instagram' | 'youtube' | 'threads' | 'facebook' | 'email' | 'rss' | 'custom';
|
|
2544
2662
|
interface Avatar {
|
|
2545
2663
|
url: string;
|
|
@@ -2558,7 +2676,7 @@ interface Profile {
|
|
|
2558
2676
|
avatar?: Avatar;
|
|
2559
2677
|
location?: Address;
|
|
2560
2678
|
}
|
|
2561
|
-
interface LinkCommon {
|
|
2679
|
+
interface LinkCommon extends VisibilityControlled {
|
|
2562
2680
|
id: Slug;
|
|
2563
2681
|
label?: LocalizedTitle;
|
|
2564
2682
|
url: string;
|
|
@@ -2586,7 +2704,7 @@ interface LinkCustom extends LinkCommon {
|
|
|
2586
2704
|
}
|
|
2587
2705
|
/** A profile link. Discriminated on `type`; see `LinkBuiltin` / `LinkCustom`. */
|
|
2588
2706
|
type Link = LinkBuiltin | LinkCustom;
|
|
2589
|
-
interface Career {
|
|
2707
|
+
interface Career extends VisibilityControlled {
|
|
2590
2708
|
id: Slug;
|
|
2591
2709
|
organization: LocalizedTitle;
|
|
2592
2710
|
role: LocalizedTitle;
|
|
@@ -2599,7 +2717,7 @@ interface Career {
|
|
|
2599
2717
|
location?: Address;
|
|
2600
2718
|
order?: number;
|
|
2601
2719
|
}
|
|
2602
|
-
interface Project {
|
|
2720
|
+
interface Project extends VisibilityControlled {
|
|
2603
2721
|
id: Slug;
|
|
2604
2722
|
title: LocalizedTitle;
|
|
2605
2723
|
description?: LocalizedBody;
|
|
@@ -2611,7 +2729,7 @@ interface Project {
|
|
|
2611
2729
|
highlighted?: boolean;
|
|
2612
2730
|
order?: number;
|
|
2613
2731
|
}
|
|
2614
|
-
interface Skill {
|
|
2732
|
+
interface Skill extends VisibilityControlled {
|
|
2615
2733
|
id: Slug;
|
|
2616
2734
|
label: string;
|
|
2617
2735
|
/**
|
|
@@ -2621,7 +2739,7 @@ interface Skill {
|
|
|
2621
2739
|
category?: string;
|
|
2622
2740
|
order?: number;
|
|
2623
2741
|
}
|
|
2624
|
-
interface Certification {
|
|
2742
|
+
interface Certification extends VisibilityControlled {
|
|
2625
2743
|
id: Slug;
|
|
2626
2744
|
title: LocalizedTitle;
|
|
2627
2745
|
issuingOrganization: LocalizedTitle;
|
|
@@ -2636,7 +2754,7 @@ interface Certification {
|
|
|
2636
2754
|
url?: string;
|
|
2637
2755
|
order?: number;
|
|
2638
2756
|
}
|
|
2639
|
-
interface Membership {
|
|
2757
|
+
interface Membership extends VisibilityControlled {
|
|
2640
2758
|
id: Slug;
|
|
2641
2759
|
organization: LocalizedTitle;
|
|
2642
2760
|
role?: LocalizedTitle;
|
|
@@ -2648,7 +2766,7 @@ interface Membership {
|
|
|
2648
2766
|
url?: string;
|
|
2649
2767
|
order?: number;
|
|
2650
2768
|
}
|
|
2651
|
-
interface Volunteering {
|
|
2769
|
+
interface Volunteering extends VisibilityControlled {
|
|
2652
2770
|
id: Slug;
|
|
2653
2771
|
organization: LocalizedTitle;
|
|
2654
2772
|
role: LocalizedTitle;
|
|
@@ -2660,7 +2778,7 @@ interface Volunteering {
|
|
|
2660
2778
|
url?: string;
|
|
2661
2779
|
order?: number;
|
|
2662
2780
|
}
|
|
2663
|
-
interface Honor {
|
|
2781
|
+
interface Honor extends VisibilityControlled {
|
|
2664
2782
|
id: Slug;
|
|
2665
2783
|
title: LocalizedTitle;
|
|
2666
2784
|
issuer: LocalizedTitle;
|
|
@@ -2669,7 +2787,7 @@ interface Honor {
|
|
|
2669
2787
|
url?: string;
|
|
2670
2788
|
order?: number;
|
|
2671
2789
|
}
|
|
2672
|
-
interface Education {
|
|
2790
|
+
interface Education extends VisibilityControlled {
|
|
2673
2791
|
id: Slug;
|
|
2674
2792
|
institution: LocalizedTitle;
|
|
2675
2793
|
degree?: LocalizedTitle;
|
|
@@ -2687,7 +2805,7 @@ interface Education {
|
|
|
2687
2805
|
url?: string;
|
|
2688
2806
|
order?: number;
|
|
2689
2807
|
}
|
|
2690
|
-
interface Publication {
|
|
2808
|
+
interface Publication extends VisibilityControlled {
|
|
2691
2809
|
id: Slug;
|
|
2692
2810
|
title: LocalizedTitle;
|
|
2693
2811
|
publisher?: LocalizedTitle;
|
|
@@ -2701,7 +2819,7 @@ interface Publication {
|
|
|
2701
2819
|
order?: number;
|
|
2702
2820
|
}
|
|
2703
2821
|
type LanguageProficiency = 'native' | 'fluent' | 'professional' | 'intermediate' | 'basic';
|
|
2704
|
-
interface Language {
|
|
2822
|
+
interface Language extends VisibilityControlled {
|
|
2705
2823
|
id: Slug;
|
|
2706
2824
|
/** BCP-47 tag (e.g. 'ja', 'en', 'fr-CA'). */
|
|
2707
2825
|
language: LocaleTag;
|
|
@@ -2710,7 +2828,7 @@ interface Language {
|
|
|
2710
2828
|
proficiency: LanguageProficiency;
|
|
2711
2829
|
order?: number;
|
|
2712
2830
|
}
|
|
2713
|
-
interface Course {
|
|
2831
|
+
interface Course extends VisibilityControlled {
|
|
2714
2832
|
id: Slug;
|
|
2715
2833
|
title: LocalizedTitle;
|
|
2716
2834
|
provider?: LocalizedTitle;
|
|
@@ -2723,7 +2841,7 @@ interface Course {
|
|
|
2723
2841
|
order?: number;
|
|
2724
2842
|
}
|
|
2725
2843
|
type PatentStatus = 'pending' | 'issued' | 'expired' | 'abandoned';
|
|
2726
|
-
interface Patent {
|
|
2844
|
+
interface Patent extends VisibilityControlled {
|
|
2727
2845
|
id: Slug;
|
|
2728
2846
|
title: LocalizedTitle;
|
|
2729
2847
|
patentNumber: string;
|
|
@@ -2737,7 +2855,7 @@ interface Patent {
|
|
|
2737
2855
|
coInventors?: string[];
|
|
2738
2856
|
order?: number;
|
|
2739
2857
|
}
|
|
2740
|
-
interface TestScore {
|
|
2858
|
+
interface TestScore extends VisibilityControlled {
|
|
2741
2859
|
id: Slug;
|
|
2742
2860
|
title: LocalizedTitle;
|
|
2743
2861
|
/**
|
|
@@ -2761,7 +2879,7 @@ interface RecommendationAuthor {
|
|
|
2761
2879
|
/** Link to the recommender's profile, for external verification by the reader. */
|
|
2762
2880
|
url?: string;
|
|
2763
2881
|
}
|
|
2764
|
-
interface Recommendation {
|
|
2882
|
+
interface Recommendation extends VisibilityControlled {
|
|
2765
2883
|
id: Slug;
|
|
2766
2884
|
/** The recommendation text (testimonial body). */
|
|
2767
2885
|
body: LocalizedBody;
|
|
@@ -2954,7 +3072,7 @@ interface LocalizedProfile {
|
|
|
2954
3072
|
avatar?: LocalizedAvatar;
|
|
2955
3073
|
location?: LocalizedAddress;
|
|
2956
3074
|
}
|
|
2957
|
-
interface LocalizedLinkCommon {
|
|
3075
|
+
interface LocalizedLinkCommon extends VisibilityControlled {
|
|
2958
3076
|
id: Slug;
|
|
2959
3077
|
label?: string;
|
|
2960
3078
|
url: string;
|
|
@@ -2972,7 +3090,7 @@ interface LocalizedLinkCustom extends LocalizedLinkCommon {
|
|
|
2972
3090
|
/** Link with `label` collapsed to a single string. */
|
|
2973
3091
|
type LocalizedLink = LocalizedLinkBuiltin | LocalizedLinkCustom;
|
|
2974
3092
|
/** Career with `organization`, `role`, `description` collapsed to single strings. */
|
|
2975
|
-
interface LocalizedCareer {
|
|
3093
|
+
interface LocalizedCareer extends VisibilityControlled {
|
|
2976
3094
|
id: Slug;
|
|
2977
3095
|
organization: string;
|
|
2978
3096
|
role: string;
|
|
@@ -2985,7 +3103,7 @@ interface LocalizedCareer {
|
|
|
2985
3103
|
order?: number;
|
|
2986
3104
|
}
|
|
2987
3105
|
/** Project with `title`, `description` collapsed to single strings. */
|
|
2988
|
-
interface LocalizedProject {
|
|
3106
|
+
interface LocalizedProject extends VisibilityControlled {
|
|
2989
3107
|
id: Slug;
|
|
2990
3108
|
title: string;
|
|
2991
3109
|
description?: string;
|
|
@@ -2998,7 +3116,7 @@ interface LocalizedProject {
|
|
|
2998
3116
|
order?: number;
|
|
2999
3117
|
}
|
|
3000
3118
|
/** Certification with localized fields collapsed to single strings. */
|
|
3001
|
-
interface LocalizedCertification {
|
|
3119
|
+
interface LocalizedCertification extends VisibilityControlled {
|
|
3002
3120
|
id: Slug;
|
|
3003
3121
|
title: string;
|
|
3004
3122
|
issuingOrganization: string;
|
|
@@ -3009,7 +3127,7 @@ interface LocalizedCertification {
|
|
|
3009
3127
|
order?: number;
|
|
3010
3128
|
}
|
|
3011
3129
|
/** Membership with localized fields collapsed to single strings. */
|
|
3012
|
-
interface LocalizedMembership {
|
|
3130
|
+
interface LocalizedMembership extends VisibilityControlled {
|
|
3013
3131
|
id: Slug;
|
|
3014
3132
|
organization: string;
|
|
3015
3133
|
role?: string;
|
|
@@ -3021,7 +3139,7 @@ interface LocalizedMembership {
|
|
|
3021
3139
|
order?: number;
|
|
3022
3140
|
}
|
|
3023
3141
|
/** Volunteering with localized fields collapsed to single strings. */
|
|
3024
|
-
interface LocalizedVolunteering {
|
|
3142
|
+
interface LocalizedVolunteering extends VisibilityControlled {
|
|
3025
3143
|
id: Slug;
|
|
3026
3144
|
organization: string;
|
|
3027
3145
|
role: string;
|
|
@@ -3034,7 +3152,7 @@ interface LocalizedVolunteering {
|
|
|
3034
3152
|
order?: number;
|
|
3035
3153
|
}
|
|
3036
3154
|
/** Honor with localized fields collapsed to single strings. */
|
|
3037
|
-
interface LocalizedHonor {
|
|
3155
|
+
interface LocalizedHonor extends VisibilityControlled {
|
|
3038
3156
|
id: Slug;
|
|
3039
3157
|
title: string;
|
|
3040
3158
|
issuer: string;
|
|
@@ -3044,7 +3162,7 @@ interface LocalizedHonor {
|
|
|
3044
3162
|
order?: number;
|
|
3045
3163
|
}
|
|
3046
3164
|
/** Education with localized fields collapsed to single strings. */
|
|
3047
|
-
interface LocalizedEducation {
|
|
3165
|
+
interface LocalizedEducation extends VisibilityControlled {
|
|
3048
3166
|
id: Slug;
|
|
3049
3167
|
institution: string;
|
|
3050
3168
|
degree?: string;
|
|
@@ -3058,7 +3176,7 @@ interface LocalizedEducation {
|
|
|
3058
3176
|
order?: number;
|
|
3059
3177
|
}
|
|
3060
3178
|
/** Publication with localized fields collapsed to single strings. */
|
|
3061
|
-
interface LocalizedPublication {
|
|
3179
|
+
interface LocalizedPublication extends VisibilityControlled {
|
|
3062
3180
|
id: Slug;
|
|
3063
3181
|
title: string;
|
|
3064
3182
|
publisher?: string;
|
|
@@ -3070,7 +3188,7 @@ interface LocalizedPublication {
|
|
|
3070
3188
|
order?: number;
|
|
3071
3189
|
}
|
|
3072
3190
|
/** Language entry with `displayName` collapsed to a single string. */
|
|
3073
|
-
interface LocalizedLanguage {
|
|
3191
|
+
interface LocalizedLanguage extends VisibilityControlled {
|
|
3074
3192
|
id: Slug;
|
|
3075
3193
|
language: LocaleTag;
|
|
3076
3194
|
displayName?: string;
|
|
@@ -3078,7 +3196,7 @@ interface LocalizedLanguage {
|
|
|
3078
3196
|
order?: number;
|
|
3079
3197
|
}
|
|
3080
3198
|
/** Course with localized fields collapsed to single strings. */
|
|
3081
|
-
interface LocalizedCourse {
|
|
3199
|
+
interface LocalizedCourse extends VisibilityControlled {
|
|
3082
3200
|
id: Slug;
|
|
3083
3201
|
title: string;
|
|
3084
3202
|
provider?: string;
|
|
@@ -3090,7 +3208,7 @@ interface LocalizedCourse {
|
|
|
3090
3208
|
order?: number;
|
|
3091
3209
|
}
|
|
3092
3210
|
/** Patent with localized fields collapsed to single strings. */
|
|
3093
|
-
interface LocalizedPatent {
|
|
3211
|
+
interface LocalizedPatent extends VisibilityControlled {
|
|
3094
3212
|
id: Slug;
|
|
3095
3213
|
title: string;
|
|
3096
3214
|
patentNumber: string;
|
|
@@ -3104,7 +3222,7 @@ interface LocalizedPatent {
|
|
|
3104
3222
|
order?: number;
|
|
3105
3223
|
}
|
|
3106
3224
|
/** Test score with localized fields collapsed to single strings. */
|
|
3107
|
-
interface LocalizedTestScore {
|
|
3225
|
+
interface LocalizedTestScore extends VisibilityControlled {
|
|
3108
3226
|
id: Slug;
|
|
3109
3227
|
title: string;
|
|
3110
3228
|
score: string;
|
|
@@ -3121,7 +3239,7 @@ interface LocalizedRecommendationAuthor {
|
|
|
3121
3239
|
url?: string;
|
|
3122
3240
|
}
|
|
3123
3241
|
/** Recommendation with localized fields collapsed to single strings. */
|
|
3124
|
-
interface LocalizedRecommendation {
|
|
3242
|
+
interface LocalizedRecommendation extends VisibilityControlled {
|
|
3125
3243
|
id: Slug;
|
|
3126
3244
|
body: string;
|
|
3127
3245
|
author: LocalizedRecommendationAuthor;
|
|
@@ -3204,7 +3322,7 @@ interface LocalizedTakuhon {
|
|
|
3204
3322
|
* versions whose JSON Schema this package literally bundles, not the full
|
|
3205
3323
|
* support window seen by end users.
|
|
3206
3324
|
*/
|
|
3207
|
-
declare const SUPPORTED_SCHEMA_VERSIONS: readonly ["0.1.0", "0.2.0", "0.3.0", "0.4.0", "0.5.0", "0.6.0"];
|
|
3325
|
+
declare const SUPPORTED_SCHEMA_VERSIONS: readonly ["0.1.0", "0.2.0", "0.3.0", "0.4.0", "0.5.0", "0.6.0", "0.7.0"];
|
|
3208
3326
|
/**
|
|
3209
3327
|
* A single validation failure.
|
|
3210
3328
|
*
|
|
@@ -3456,22 +3574,28 @@ declare function importTakuhon(data: ExportedTakuhon): Takuhon;
|
|
|
3456
3574
|
*
|
|
3457
3575
|
* Strips content that the spec's privacy posture marks as opt-in for public
|
|
3458
3576
|
* exposure, before the document reaches a public reader (a public API
|
|
3459
|
-
* response, a server-rendered page, a statically built page, …).
|
|
3460
|
-
* compose here,
|
|
3577
|
+
* response, a server-rendered page, a statically built page, …). Three layers
|
|
3578
|
+
* compose here, all conservative by default:
|
|
3461
3579
|
*
|
|
3462
3580
|
* 1. **Section layer** (`settings.publicVisibility`, schema 0.6.0). Each
|
|
3463
3581
|
* content section the owner sets to `false` is emptied: array sections
|
|
3464
3582
|
* become `[]` and the `contact` section becomes `{}`. An absent key — or an
|
|
3465
3583
|
* absent `publicVisibility` block — means the section is public, so the
|
|
3466
3584
|
* default is all-visible and older documents are unaffected.
|
|
3467
|
-
* 2. **
|
|
3468
|
-
*
|
|
3469
|
-
*
|
|
3585
|
+
* 2. **Item layer** (`<item>.visibility`, schema 0.7.0). Within a section that
|
|
3586
|
+
* survived the section layer, each array item the owner marks
|
|
3587
|
+
* `visibility: 'private'` is removed. An absent value — or `'public'` —
|
|
3588
|
+
* keeps the item, so the default is all-visible and older documents are
|
|
3589
|
+
* unaffected.
|
|
3590
|
+
* 3. **Field layer** (`meta.privacy.*`, `contact.showEmail`). Within an item
|
|
3591
|
+
* that survived, individual identifying fields are stripped unless the
|
|
3592
|
+
* operator opts into disclosure.
|
|
3470
3593
|
*
|
|
3471
|
-
* Visibility is the AND of the
|
|
3472
|
-
* toggles are a
|
|
3473
|
-
* here): a field survives only when its section is visible
|
|
3474
|
-
* flag allows it. Hiding a whole section short-circuits
|
|
3594
|
+
* Visibility is the AND of the layers (the surface-level `enable*` feature
|
|
3595
|
+
* toggles are a further, orthogonal layer enforced by the route / renderer, not
|
|
3596
|
+
* here): a field survives only when its section is visible, its item is not
|
|
3597
|
+
* private, *and* its field flag allows it. Hiding a whole section short-circuits
|
|
3598
|
+
* its item and field checks; removing an item short-circuits its field checks.
|
|
3475
3599
|
*
|
|
3476
3600
|
* This lives in `@takuhon/core` because it is a pure transform over the core
|
|
3477
3601
|
* document types with no transport coupling, so every public surface — the
|
|
@@ -4084,6 +4208,43 @@ interface GravatarOptions {
|
|
|
4084
4208
|
*/
|
|
4085
4209
|
declare function gravatarUrl(email: string, options?: GravatarOptions): string;
|
|
4086
4210
|
|
|
4211
|
+
/**
|
|
4212
|
+
* Format an ISO date (`YYYY-MM` or `YYYY-MM-DD`) as human-facing text in the
|
|
4213
|
+
* given locale — e.g. `2024-11` renders as `Nov 2024` (en) / `2024年11月` (ja),
|
|
4214
|
+
* and `2025-12-22` as `Dec 22, 2025` (en) / `2025年12月22日` (ja).
|
|
4215
|
+
*
|
|
4216
|
+
* This is the single date-formatting transform shared by the static HTML and CV
|
|
4217
|
+
* renderers in `@takuhon/api` (via their `dateRange`/`timeTag` helpers). The
|
|
4218
|
+
* machine-readable ISO value is never altered: the caller keeps it verbatim in
|
|
4219
|
+
* the enclosing `<time datetime>` attribute. The machine-readable surfaces
|
|
4220
|
+
* (JSON-LD, `/api/profile`, `takuhon.json`, MCP) must NOT call this — they emit
|
|
4221
|
+
* raw ISO so consuming machines decide their own presentation.
|
|
4222
|
+
*
|
|
4223
|
+
* The date is built with `setUTCFullYear` — not `Date.UTC`, which coerces years
|
|
4224
|
+
* 0-99 into 1900-1999 — and formatted in UTC, so a month-precision value keeps
|
|
4225
|
+
* its century and never slips to the previous month west of UTC (`new
|
|
4226
|
+
* Date('2024-05')` parses as midnight UTC and would render as the prior month).
|
|
4227
|
+
*
|
|
4228
|
+
* Every failure path is fail-safe (this never throws):
|
|
4229
|
+
* - A value that is not a well-formed `YYYY-MM`/`YYYY-MM-DD` (wrong shape, an
|
|
4230
|
+
* out-of-range month/day digit, or a calendar-impossible date such as
|
|
4231
|
+
* `2024-02-30`) is returned unchanged, never a shifted or `Invalid Date`.
|
|
4232
|
+
* - An empty `locale` is replaced with `en` before the call, because
|
|
4233
|
+
* `Intl.DateTimeFormat('')` throws a `RangeError`. A structurally invalid
|
|
4234
|
+
* BCP-47 tag also throws and is caught, again falling back to `en`. A
|
|
4235
|
+
* well-formed but unregistered tag (e.g. `zz`) does not throw — `Intl`
|
|
4236
|
+
* negotiates it (typically to English) without entering the catch.
|
|
4237
|
+
*/
|
|
4238
|
+
declare function formatDate(value: string, locale: LocaleTag): string;
|
|
4239
|
+
|
|
4240
|
+
/**
|
|
4241
|
+
* Resolve the "Present" timeline label for the given locale. Tries the exact
|
|
4242
|
+
* tag, then the base language subtag (so a resolved `ja-JP` still finds `ja`,
|
|
4243
|
+
* mirroring core's regional-subtag fallback), then English. Callers pass a
|
|
4244
|
+
* `LocalizedTakuhon.resolvedLocale`.
|
|
4245
|
+
*/
|
|
4246
|
+
declare function getPresentLabel(locale: LocaleTag): string;
|
|
4247
|
+
|
|
4087
4248
|
/**
|
|
4088
4249
|
* MCP (Model Context Protocol) projection of a profile.
|
|
4089
4250
|
*
|
|
@@ -4291,6 +4452,6 @@ declare function stripImageMetadata(bytes: Uint8Array, mime: AcceptedImageMime):
|
|
|
4291
4452
|
* A takuhon profile document's `schemaVersion` field must be migrate-compatible
|
|
4292
4453
|
* with this version. See operational-lifecycle docs for the migration policy.
|
|
4293
4454
|
*/
|
|
4294
|
-
declare const SCHEMA_VERSION = "0.
|
|
4455
|
+
declare const SCHEMA_VERSION = "0.7.0";
|
|
4295
4456
|
|
|
4296
|
-
export { ACCEPTED_IMAGE_MIME_TYPES, type AcceptedImageMime, type ActivitySettings, type ActivitySnapshot, type ActivityStorage, type Address, type AssetOptions, type AssetRecord, type Avatar, type Career, type Certification, type CodingTime, ConflictError, type Contact, type ContentLicense, type ContentLicenseAttribution, type ContributionCalendar, type ContributionDay, type Course, type CvDocument, type CvHeader, type CvSection, type CvSectionKind, DARK_PALETTE, type Education, type ExportOptions, type ExportedTakuhon, type GravatarOptions, type Honor, IMAGE_EXTENSIONS, type ImageInfo, ImportError, type Iso3166Alpha2, type IsoDateTime, LIGHT_PALETTE, type Language, type LanguageBreakdown, type LanguageProficiency, type Link, type LinkBuiltin, type LinkCustom, type LinkType, type LocaleTag, type LocalizedAddress, type LocalizedAvatar, type LocalizedBody, type LocalizedCareer, type LocalizedCertification, type LocalizedCourse, type LocalizedEducation, type LocalizedHonor, type LocalizedLanguage, type LocalizedLink, type LocalizedLinkBuiltin, type LocalizedLinkCustom, type LocalizedMembership, type LocalizedPatent, type LocalizedProfile, type LocalizedProject, type LocalizedPublication, type LocalizedRecommendation, type LocalizedRecommendationAuthor, type LocalizedTakuhon, type LocalizedTestScore, type LocalizedTitle, type LocalizedVolunteering, MAX_IMAGE_BYTES, MAX_IMAGE_DIMENSION, MAX_IMAGE_FRAMES, MCP_PROFILE_SECTIONS, MCP_RESOURCES, MCP_TOOLS, type McpInputSchema, type McpProfileSection, McpRequestError, type McpResourceDefinition, type McpResourceResult, type McpToolDefinition, type McpToolResult, type Membership, type Meta, type MetaPrivacy, type Migration, MigrationError, type NormalizedTakuhon, NotFoundError, type Palette, type Patent, type PatentStatus, type Profile, type Project, type PublicVisibility, type Publication, RANK_FULL_CODING_HOURS, RANK_FULL_CONTRIBUTIONS, RANK_TIER_THRESHOLDS, type RankInput, type RankTier, type RankTierLabel, type Recommendation, type RecommendationAuthor, type RenderActivitySvgOptions, SCHEMA_VERSION, SUPPORTED_SCHEMA_VERSIONS, type Schema, type Settings, type Skill, type Slug, StorageError, type Takuhon, type TakuhonAssetStorage, type TakuhonStorage, type TestScore, type ValidationError, type ValidationResult, type Volunteering, type YearMonth, applyPublicPrivacyFilter, computeLanguagePercentages, deriveCv, deriveRankTier, detectImageMime, executeMcpTool, exportTakuhon, formatCodingTime, generateJsonLd, generatePersonJsonLd, generateProfilePageJsonLd, gravatarUrl, importTakuhon, isActivitySnapshot, migrateTakuhon, migrations, normalize, readImageInfo, readMcpResource, renderActivitySvg, resolveLocale, schema, stripImageMetadata, validate };
|
|
4457
|
+
export { ACCEPTED_IMAGE_MIME_TYPES, type AcceptedImageMime, type ActivitySettings, type ActivitySnapshot, type ActivityStorage, type Address, type AssetOptions, type AssetRecord, type Avatar, type Career, type Certification, type CodingTime, ConflictError, type Contact, type ContentLicense, type ContentLicenseAttribution, type ContributionCalendar, type ContributionDay, type Course, type CvDocument, type CvHeader, type CvSection, type CvSectionKind, DARK_PALETTE, type Education, type ExportOptions, type ExportedTakuhon, type GravatarOptions, type Honor, IMAGE_EXTENSIONS, type ImageInfo, ImportError, type Iso3166Alpha2, type IsoDateTime, LIGHT_PALETTE, type Language, type LanguageBreakdown, type LanguageProficiency, type Link, type LinkBuiltin, type LinkCustom, type LinkType, type LocaleTag, type LocalizedAddress, type LocalizedAvatar, type LocalizedBody, type LocalizedCareer, type LocalizedCertification, type LocalizedCourse, type LocalizedEducation, type LocalizedHonor, type LocalizedLanguage, type LocalizedLink, type LocalizedLinkBuiltin, type LocalizedLinkCustom, type LocalizedMembership, type LocalizedPatent, type LocalizedProfile, type LocalizedProject, type LocalizedPublication, type LocalizedRecommendation, type LocalizedRecommendationAuthor, type LocalizedTakuhon, type LocalizedTestScore, type LocalizedTitle, type LocalizedVolunteering, MAX_IMAGE_BYTES, MAX_IMAGE_DIMENSION, MAX_IMAGE_FRAMES, MCP_PROFILE_SECTIONS, MCP_RESOURCES, MCP_TOOLS, type McpInputSchema, type McpProfileSection, McpRequestError, type McpResourceDefinition, type McpResourceResult, type McpToolDefinition, type McpToolResult, type Membership, type Meta, type MetaPrivacy, type Migration, MigrationError, type NormalizedTakuhon, NotFoundError, type Palette, type Patent, type PatentStatus, type Profile, type Project, type PublicVisibility, type Publication, RANK_FULL_CODING_HOURS, RANK_FULL_CONTRIBUTIONS, RANK_TIER_THRESHOLDS, type RankInput, type RankTier, type RankTierLabel, type Recommendation, type RecommendationAuthor, type RenderActivitySvgOptions, SCHEMA_VERSION, SUPPORTED_SCHEMA_VERSIONS, type Schema, type Settings, type Skill, type Slug, StorageError, type Takuhon, type TakuhonAssetStorage, type TakuhonStorage, type TestScore, type ValidationError, type ValidationResult, type Volunteering, type YearMonth, applyPublicPrivacyFilter, computeLanguagePercentages, deriveCv, deriveRankTier, detectImageMime, executeMcpTool, exportTakuhon, formatCodingTime, formatDate, generateJsonLd, generatePersonJsonLd, generateProfilePageJsonLd, getPresentLabel, gravatarUrl, importTakuhon, isActivitySnapshot, migrateTakuhon, migrations, normalize, readImageInfo, readMcpResource, renderActivitySvg, resolveLocale, schema, stripImageMetadata, validate };
|