@krizaka/org 0.1.0 → 0.2.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/README.md CHANGED
@@ -14,6 +14,11 @@ org.company.legalName; // « Technologies Krizaka Inc. »
14
14
  Without a build step, read it from the CDN: [krizaka-assets.b-cdn.net/org/v1/org.json](https://krizaka-assets.b-cdn.net/org/v1/org.json) (an immutable copy sits beside it,
15
15
  `org.<hash>.json`). Also exported: `@krizaka/org/org.json`, `@krizaka/org/org.schema.json` and `@krizaka/org/apps/<product>.json`.
16
16
 
17
+ - **Default media come from here.** The `defaults` section lists the central sets of default pictures — `person`, `folder`,
18
+ `organisation`, `shop`, `banner` — with id, alt text in English and French and the URLs per size on Bunny
19
+ (`defaults/v1/<kind>/<id>-<size>.<ext>`, written by krizaka-ui `tools/export-defaults.mjs`). An app never hard-codes or bundles one:
20
+ `listDefaults(kind)` lists them, `defaultFor(kind, seed)` picks one deterministically (FNV-1a of the seed, modulo the list), `defaultUrl(item, size)` gives the URL,
21
+ `fetchDefaults(ORG_URL)` reads the section from the published JSON. A folder is never given a person.
17
22
  - **Public facts only.** Never an address, a phone number, figures, a secret, an IP address or an internal host: the test
18
23
  scans for them and the schema refuses any field it does not list.
19
24
  - **Validated.** `orgSchema` (JSON Schema 2020-12) and the types `Org`, `AppConfig`…; a test validates the data and requests every
package/dist/index.d.ts CHANGED
@@ -33,6 +33,31 @@ interface OrgBanner {
33
33
  url: string;
34
34
  alt: Localized;
35
35
  }
36
+ /** The kinds of entity that have a set of default pictures. */
37
+ type OrgDefaultKind = "person" | "folder" | "organisation" | "shop" | "banner";
38
+ interface OrgDefaultItem {
39
+ /** Stable within its kind (`silhouette-3`, `boom-bap`). */
40
+ id: string;
41
+ /** What the picture shows, in both languages (never who). */
42
+ alt: Localized;
43
+ urls: {
44
+ /** The vector, for the sets drawn from the code. */
45
+ svg?: string;
46
+ /** Size in px (a square's side, a banner's width) → URL. */
47
+ webp: Record<string, string>;
48
+ };
49
+ }
50
+ /** The central sets of default pictures: URLs an app uses by default, never its own copy. */
51
+ interface OrgDefaults {
52
+ /** The folder version on the CDN: a changed picture is a new version, the old URLs keep serving. */
53
+ version: string;
54
+ base: string;
55
+ rule: {
56
+ pick: "fnv1a32-modulo";
57
+ description: string;
58
+ };
59
+ kinds: Record<OrgDefaultKind, OrgDefaultItem[]>;
60
+ }
36
61
  interface OrgMark {
37
62
  svg: string;
38
63
  png64: string;
@@ -42,8 +67,8 @@ interface OrgMark {
42
67
  }
43
68
  interface Org {
44
69
  $schema: string;
45
- /** The contract: `1` while the shape is the one of `org/v1/org.json`. */
46
- schemaVersion: 1;
70
+ /** The contract: `2` adds `defaults` (compatible: everything of `1` is unchanged). */
71
+ schemaVersion: 2;
47
72
  /** The version of `@krizaka/org` that carries this data. */
48
73
  version: string;
49
74
  /** The day the facts were last reviewed (YYYY-MM-DD). */
@@ -76,9 +101,12 @@ interface Org {
76
101
  manifest: string;
77
102
  };
78
103
  people: {
104
+ /** Legacy sets by brand (`people/defaults/v1/krizaka`): kept for the readers of schema 1; new code reads `defaults`. */
79
105
  defaults: OrgAvatar[];
80
106
  banners: OrgBanner[];
81
107
  };
108
+ /** The central default pictures (people, folders, organisations, shops, banners): use these URLs, never a copy. */
109
+ defaults: OrgDefaults;
82
110
  /** Only the products that are live. */
83
111
  products: OrgProduct[];
84
112
  sites: OrgSite[];
@@ -117,6 +145,21 @@ declare const APP_SCHEMA_URL = "https://krizaka-assets.b-cdn.net/org/v1/app.sche
117
145
  /** The runtime config a mobile app may know, per live product. The app reads it at start, with a copy built into the binary as fallback. */
118
146
  declare const apps: Record<string, AppConfig>;
119
147
 
148
+ /** The kinds of entity that have a default set, in the order the JSON lists them. */
149
+ declare const DEFAULT_KINDS: readonly ["person", "folder", "organisation", "shop", "banner"];
150
+ /** The `defaults` section of the org JSON: the central sets on Bunny (`defaults/v1/<kind>/<id>-<size>.<ext>`), written by krizaka-ui `tools/export-defaults.mjs`. */
151
+ declare const defaults: OrgDefaults;
152
+ /** 32-bit FNV-1a of a seed: stable across runs, devices and products (the same one `@krizaka/ui`'s default avatars use). */
153
+ declare function seedHash(seed: string | number): number;
154
+ /** The items of a kind, in the order of the JSON. A source other than the bundled one is the JSON an app fetched. */
155
+ declare function listDefaults(kind: OrgDefaultKind, source?: OrgDefaults): readonly OrgDefaultItem[];
156
+ /** The item of a kind for a seed (an entity's id): deterministic, so a folder keeps its picture everywhere. `undefined` only when the kind's list is empty. */
157
+ declare function defaultFor(kind: OrgDefaultKind, seed: string | number, source?: OrgDefaults): OrgDefaultItem | undefined;
158
+ /** The URL of an item at the smallest size that is at least `size` px (or the largest there is); `svg` when the item has a vector and `format` says so. */
159
+ declare function defaultUrl(entry: OrgDefaultItem, size: number, format?: "webp" | "svg"): string;
160
+ /** Reads the section from the published JSON (`ORG_URL`), for an app that does not bundle this package. */
161
+ declare function fetchDefaults(url: string, fetchImpl?: typeof fetch): Promise<OrgDefaults>;
162
+
120
163
  /** The pull zone that serves the brand files and this JSON. */
121
164
  declare const CDN = "https://krizaka-assets.b-cdn.net";
122
165
  declare const ORG_URL = "https://krizaka-assets.b-cdn.net/org/v1/org.json";
@@ -131,13 +174,13 @@ declare const orgSchema: {
131
174
  readonly title: "Krizaka organisation — public facts";
132
175
  readonly type: "object";
133
176
  readonly additionalProperties: false;
134
- readonly required: readonly ["$schema", "schemaVersion", "version", "updatedAt", "company", "brand", "people", "products", "sites", "contact", "footer"];
177
+ readonly required: readonly ["$schema", "schemaVersion", "version", "updatedAt", "company", "brand", "people", "defaults", "products", "sites", "contact", "footer"];
135
178
  readonly properties: {
136
179
  readonly $schema: {
137
180
  readonly type: "string";
138
181
  };
139
182
  readonly schemaVersion: {
140
- readonly const: 1;
183
+ readonly enum: readonly [1, 2];
141
184
  };
142
185
  readonly version: {
143
186
  readonly type: "string";
@@ -458,6 +501,98 @@ declare const orgSchema: {
458
501
  };
459
502
  };
460
503
  };
504
+ readonly defaults: {
505
+ readonly type: "object";
506
+ readonly additionalProperties: false;
507
+ readonly required: readonly ["version", "base", "rule", "kinds"];
508
+ readonly properties: {
509
+ readonly version: {
510
+ readonly type: "string";
511
+ readonly pattern: "^v\\d+$";
512
+ };
513
+ readonly base: {
514
+ readonly type: "string";
515
+ readonly format: "uri";
516
+ readonly pattern: "^https://";
517
+ };
518
+ readonly rule: {
519
+ readonly type: "object";
520
+ readonly additionalProperties: false;
521
+ readonly required: readonly ["pick", "description"];
522
+ readonly properties: {
523
+ readonly pick: {
524
+ readonly const: "fnv1a32-modulo";
525
+ };
526
+ readonly description: {
527
+ readonly type: "string";
528
+ readonly minLength: 1;
529
+ };
530
+ };
531
+ };
532
+ readonly kinds: {
533
+ readonly type: "object";
534
+ readonly additionalProperties: false;
535
+ readonly required: readonly ["person", "folder", "organisation", "shop", "banner"];
536
+ readonly properties: {
537
+ [k: string]: {
538
+ readonly type: "array";
539
+ readonly minItems: 1;
540
+ readonly uniqueItems: true;
541
+ readonly items: {
542
+ readonly type: "object";
543
+ readonly additionalProperties: false;
544
+ readonly required: readonly ["id", "alt", "urls"];
545
+ readonly properties: {
546
+ readonly id: {
547
+ readonly type: "string";
548
+ readonly pattern: "^[a-z0-9]+(-[a-z0-9]+)*$";
549
+ };
550
+ readonly alt: {
551
+ readonly type: "object";
552
+ readonly additionalProperties: false;
553
+ readonly required: readonly ["fr", "en"];
554
+ readonly properties: {
555
+ readonly fr: {
556
+ readonly type: "string";
557
+ readonly minLength: 1;
558
+ };
559
+ readonly en: {
560
+ readonly type: "string";
561
+ readonly minLength: 1;
562
+ };
563
+ };
564
+ };
565
+ readonly urls: {
566
+ readonly type: "object";
567
+ readonly additionalProperties: false;
568
+ readonly required: readonly ["webp"];
569
+ readonly properties: {
570
+ readonly svg: {
571
+ readonly type: "string";
572
+ readonly format: "uri";
573
+ readonly pattern: "^https://";
574
+ };
575
+ readonly webp: {
576
+ readonly type: "object";
577
+ readonly minProperties: 1;
578
+ readonly propertyNames: {
579
+ readonly pattern: "^\\d+$";
580
+ };
581
+ readonly additionalProperties: {
582
+ readonly type: "string";
583
+ readonly format: "uri";
584
+ readonly pattern: "^https://";
585
+ };
586
+ };
587
+ };
588
+ };
589
+ };
590
+ };
591
+ };
592
+ };
593
+ };
594
+ };
595
+ };
461
596
  readonly products: {
462
597
  readonly type: "array";
463
598
  readonly minItems: 1;
@@ -678,4 +813,4 @@ declare const localized: (text: Localized, locale: string) => string;
678
813
  /** The footer line of the family, « Une entreprise de Technologies Krizaka · Fait à Montréal ». */
679
814
  declare const footerLine: (locale: string) => string;
680
815
 
681
- export { APP_SCHEMA_URL, type AppConfig, type AppEnvironment, CDN, type Localized, ORG_SCHEMA_URL, ORG_URL, type Org, type OrgAvatar, type OrgBanner, type OrgMark, type OrgProduct, type OrgSite, type ProductStatus, appSchema, apps, footerLine, localized, org, orgSchema };
816
+ export { APP_SCHEMA_URL, type AppConfig, type AppEnvironment, CDN, DEFAULT_KINDS, type Localized, ORG_SCHEMA_URL, ORG_URL, type Org, type OrgAvatar, type OrgBanner, type OrgDefaultItem, type OrgDefaultKind, type OrgDefaults, type OrgMark, type OrgProduct, type OrgSite, type ProductStatus, appSchema, apps, defaultFor, defaultUrl, defaults, fetchDefaults, footerLine, listDefaults, localized, org, orgSchema, seedHash };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@krizaka/org",
4
- version: "0.1.0",
4
+ version: "0.2.0",
5
5
  description: "The public facts about Krizaka, in one validated JSON that every footer, site and app reads: legal name, NEQ, \xAB Fait \xE0 Montr\xE9al \xBB in French and English, brand marks, default avatars and banners, the live products and sites, the public contact, the footer line and the mobile apps' public runtime config. Typed data, JSON Schema, and the files published on the CDN.",
6
6
  keywords: [
7
7
  "krizaka",
@@ -62,6 +62,97 @@ var package_default = {
62
62
  }
63
63
  };
64
64
 
65
+ // src/defaults.ts
66
+ var BASE = "https://krizaka-assets.b-cdn.net/defaults/v1";
67
+ var DEFAULT_KINDS = ["person", "folder", "organisation", "shop", "banner"];
68
+ var SIZES = { person: [256, 512, 1024], folder: [256, 512, 1024], organisation: [256, 512, 1024], shop: [256, 512, 1024], banner: [960, 1920] };
69
+ var item = (kind, id, alt, drawn) => ({
70
+ id,
71
+ alt,
72
+ urls: {
73
+ ...drawn ? { svg: `${BASE}/${kind}/${id}.svg` } : {},
74
+ webp: Object.fromEntries(SIZES[kind].map((size) => [String(size), `${BASE}/${kind}/${id}-${size}.webp`]))
75
+ }
76
+ });
77
+ var tones = (kind, id, alt) => Array.from({ length: 6 }, (_, i) => item(kind, `${id}-${i + 1}`, alt(i + 1), true));
78
+ var PEOPLE = [
79
+ ["boom-bap", { en: "Illustration: a rapper in a denim jacket and beanie, microphone in hand, in a rainy Montr\xE9al alley at night", fr: "Illustration : un rappeur en veste de jean et tuque, micro \xE0 la main, dans une ruelle de Montr\xE9al sous la pluie, la nuit" }],
80
+ ["rasta-creative", { en: "A smiling man with long dreadlocks in a paint-stained denim jacket, in an artist's workshop", fr: "Un homme souriant aux longues dreadlocks, en veste de jean tach\xE9e de peinture, dans un atelier d'artiste" }],
81
+ ["mile-end-hipster", { en: "A smiling person with round glasses and an orange beanie at a leatherworking bench, in a brick workshop", fr: "Une personne souriante \xE0 lunettes rondes et tuque orange, \xE0 son \xE9tabli de cuir, dans un atelier de briques" }],
82
+ ["tech-architect", { en: "A person in a dark hoodie typing at a keyboard, between screens of code and a server rack", fr: "Une personne en chandail \xE0 capuchon sombre qui tape au clavier, entre des \xE9crans de code et une baie de serveurs" }],
83
+ ["electronic-dj", { en: "A DJ with headphones behind synthesizers and a mixing desk, in a club with violet lights", fr: "Un DJ casque aux oreilles derri\xE8re des synth\xE9tiseurs et une table de mixage, dans un club aux lumi\xE8res violettes" }],
84
+ ["visual-artist", { en: "A smiling painter with violet hair and big glasses, palette in hand, in a studio full of canvases", fr: "Une peintre souriante aux cheveux violets et aux grosses lunettes, palette \xE0 la main, dans un atelier plein de toiles" }],
85
+ ["salon-tattoo-maker", { en: "A tattoo artist with tattooed arms working on a client in a warm shop with wooden shelves", fr: "Une tatoueuse aux bras tatou\xE9s au travail sur un client, dans un salon chaleureux aux \xE9tag\xE8res de bois" }],
86
+ ["wise-auditor", { en: "A grey-haired person with glasses at a desk of old books and a lamp, a pen over open notes", fr: "Une personne aux cheveux gris et \xE0 lunettes \xE0 un bureau de vieux livres et de lampe, un stylo sur des notes ouvertes" }],
87
+ ["digital-creator", { en: "A laughing streamer with a microphone in a purple-lit studio under a neon \xAB Creator Zone \xBB sign", fr: "Une diffuseuse qui rit devant un micro, dans un studio violet sous une enseigne n\xE9on \xAB Creator Zone \xBB" }],
88
+ ["studio-maker", { en: "A potter in a linen apron holding a clay bowl, in a bright ceramics studio with plants", fr: "Une poti\xE8re en tablier de lin tenant un bol d'argile, dans un atelier de c\xE9ramique lumineux et plein de plantes" }],
89
+ ["community-lead", { en: "A smiling person with curly hair and a grey coat at a wooden table, a community space behind them", fr: "Une personne souriante aux cheveux boucl\xE9s et au manteau gris, \xE0 une table de bois, devant un espace communautaire" }],
90
+ ["ai-builder", { en: "A thoughtful person with blue-tinted glasses at a desk, screens of a neural network and code behind", fr: "Une personne pensive aux lunettes teint\xE9es de bleu \xE0 son bureau, devant des \xE9crans de r\xE9seau neuronal et de code" }]
91
+ ];
92
+ var BANNERS = [
93
+ ["montreal-winter-night", { en: "Illustration: a snowy night in downtown Montr\xE9al, lit shop fronts and walkers", fr: "Illustration : une nuit de neige au centre-ville de Montr\xE9al, devantures \xE9clair\xE9es et passants" }],
94
+ ["industrial-heritage", { en: "Dark blue skyline of old brick buildings with lit orange windows under a full moon", fr: "Silhouette bleu nuit de vieux immeubles de briques aux fen\xEAtres orang\xE9es, sous la pleine lune" }],
95
+ ["creator-loft-studio", { en: "A dark loft desk with a plant, a code window and a mixing board", fr: "Un bureau de loft sombre avec une plante, une fen\xEAtre de code et une table de mixage" }],
96
+ ["abstract-digital-flow", { en: "Flowing teal, violet and orange lines linking glowing points on a dark background", fr: "Des lignes ondulantes turquoise, violettes et orange reliant des points lumineux sur fond sombre" }],
97
+ ["paperwork-and-ink", { en: "Two dark document cards with colored stamps on a night-blue grid", fr: "Deux cartes de documents sombres tamponn\xE9es de couleur sur une grille bleu nuit" }],
98
+ ["nightlife-music-visual", { en: "A large glowing vinyl record with a pink label beside a small level meter, in violet light", fr: "Un grand disque vinyle lumineux \xE0 l'\xE9tiquette rose pr\xE8s d'un petit indicateur de niveau, en lumi\xE8re violette" }],
99
+ ["the-mascot-flock", { en: "The Krizaka mascots \u2014 an owl, a beaver and a flamingo \u2014 standing on a shelf in the dark", fr: "Les mascottes de Krizaka \u2014 un hibou, un castor et un flamant \u2014 debout sur une \xE9tag\xE8re dans le noir" }],
100
+ ["abstract-stripes", { en: "Diagonal teal, indigo, violet and orange stripes with a white star and \xAB Montr\xE9al // 514 \xBB", fr: "Des bandes diagonales turquoise, indigo, violettes et orange avec une \xE9toile blanche et \xAB Montr\xE9al // 514 \xBB" }],
101
+ ["open-source-horizon", { en: "A dark terminal window on a grid, a faint horizon behind", fr: "Une fen\xEAtre de terminal sombre sur une grille, un horizon p\xE2le derri\xE8re" }],
102
+ ["cafe-maker-studio", { en: "A warm dark brown scene with a card reading \xAB Fabriqu\xE9 \xE0 Montr\xE9al \xBB", fr: "Une sc\xE8ne brun fonc\xE9 chaleureuse avec une carte \xAB Fabriqu\xE9 \xE0 Montr\xE9al \xBB" }],
103
+ ["the-neon-flamingo", { en: "A pink neon flamingo outline on black, with a violet halo", fr: "Le contour d'un flamant rose en n\xE9on sur fond noir, avec un halo violet" }],
104
+ ["cooperative-network", { en: "Small linked glowing points over a dark hill at dusk", fr: "De petits points lumineux reli\xE9s au-dessus d'une colline sombre au cr\xE9puscule" }]
105
+ ];
106
+ var GLYPH_ALT = {
107
+ person: (n) => ({ en: `Default profile picture: a silhouette, tone ${n}`, fr: `Photo de profil par d\xE9faut : une silhouette, teinte ${n}` }),
108
+ folder: (n) => ({ en: `Default folder picture: a folder, tone ${n}`, fr: `Image de dossier par d\xE9faut : un dossier, teinte ${n}` }),
109
+ organisation: (n) => ({ en: `Default organisation picture: a building, tone ${n}`, fr: `Image d'organisation par d\xE9faut : un immeuble, teinte ${n}` }),
110
+ shop: (n) => ({ en: `Default shop picture: a storefront, tone ${n}`, fr: `Image de boutique par d\xE9faut : une devanture, teinte ${n}` })
111
+ };
112
+ var defaults = {
113
+ version: "v1",
114
+ base: BASE,
115
+ rule: {
116
+ pick: "fnv1a32-modulo",
117
+ description: "defaultFor(kind, seed) = items[fnv1a32(String(seed)) mod items.length] of the kind's list, in the order of the JSON; the same seed always gives the same item, in every app."
118
+ },
119
+ kinds: {
120
+ person: [...tones("person", "silhouette", GLYPH_ALT.person), ...PEOPLE.map(([id, alt]) => item("person", id, alt, false))],
121
+ folder: tones("folder", "folder", GLYPH_ALT.folder),
122
+ organisation: tones("organisation", "organisation", GLYPH_ALT.organisation),
123
+ shop: tones("shop", "shop", GLYPH_ALT.shop),
124
+ banner: BANNERS.map(([id, alt]) => item("banner", id, alt, false))
125
+ }
126
+ };
127
+ function seedHash(seed) {
128
+ let h = 2166136261;
129
+ for (const ch of String(seed)) {
130
+ h ^= ch.codePointAt(0) ?? 0;
131
+ h = Math.imul(h, 16777619) >>> 0;
132
+ }
133
+ return h;
134
+ }
135
+ function listDefaults(kind, source = defaults) {
136
+ return source.kinds[kind] ?? [];
137
+ }
138
+ function defaultFor(kind, seed, source = defaults) {
139
+ const items = listDefaults(kind, source);
140
+ return items.length === 0 ? void 0 : items[seedHash(seed) % items.length];
141
+ }
142
+ function defaultUrl(entry, size, format = "webp") {
143
+ if (format === "svg" && entry.urls.svg) return entry.urls.svg;
144
+ const sizes = Object.keys(entry.urls.webp).map(Number).sort((a, b) => a - b);
145
+ const chosen = sizes.find((s) => s >= size) ?? sizes[sizes.length - 1];
146
+ return entry.urls.webp[String(chosen)] ?? "";
147
+ }
148
+ async function fetchDefaults(url, fetchImpl = fetch) {
149
+ const res = await fetchImpl(url, { headers: { Accept: "application/json" } });
150
+ if (!res.ok) throw new Error(`${url} answered ${res.status}`);
151
+ const json = await res.json();
152
+ if (!json.defaults) throw new Error(`${url} has no \`defaults\` section`);
153
+ return json.defaults;
154
+ }
155
+
65
156
  // src/org.ts
66
157
  var CDN = "https://krizaka-assets.b-cdn.net";
67
158
  var ORG_URL = `${CDN}/org/v1/org.json`;
@@ -76,7 +167,7 @@ var mark = (kind, theme) => ({
76
167
  });
77
168
  var TONES = [1, 2, 3, 4, 5, 6];
78
169
  var avatarAlt = (kind, n) => kind === "person" ? { fr: `Photo de profil par d\xE9faut : silhouette, teinte ${n}`, en: `Default profile picture: silhouette, tone ${n}` } : { fr: `Photo de profil par d\xE9faut : disque uni, teinte ${n}`, en: `Default profile picture: plain disc, tone ${n}` };
79
- var defaults = ["person", "plain"].flatMap(
170
+ var defaults2 = ["person", "plain"].flatMap(
80
171
  (kind) => TONES.map((n) => ({
81
172
  id: `${kind}-${n}`,
82
173
  kind,
@@ -88,7 +179,7 @@ var defaults = ["person", "plain"].flatMap(
88
179
  );
89
180
  var org = {
90
181
  $schema: ORG_SCHEMA_URL,
91
- schemaVersion: 1,
182
+ schemaVersion: 2,
92
183
  version: package_default.version,
93
184
  updatedAt: "2026-10-26",
94
185
  company: {
@@ -111,10 +202,11 @@ var org = {
111
202
  manifest: cdn("brand/manifest.json")
112
203
  },
113
204
  people: {
114
- defaults,
205
+ defaults: defaults2,
115
206
  // No banner is published on the CDN yet; the set joins here with its alts when it is.
116
207
  banners: []
117
208
  },
209
+ defaults,
118
210
  products: [
119
211
  { id: "orazaka", name: "Orazaka", status: "devPreview", url: "https://dev.orazaka.com", repo: "https://github.com/krizaka/orazaka" },
120
212
  { id: "yomizaka", name: "Yomizaka", status: "development", url: "https://dev.yomizaka.com", repo: "https://github.com/krizaka/yomizaka" },
@@ -178,16 +270,36 @@ var slug = { type: "string", pattern: "^[a-z0-9]+(-[a-z0-9]+)*$" };
178
270
  var themed = { type: "object", additionalProperties: false, required: ["dark", "light"], properties: { dark: mark2, light: mark2 } };
179
271
  var date = { type: "string", pattern: "^\\d{4}-\\d{2}-\\d{2}$" };
180
272
  var semver = { type: "string", pattern: "^\\d+\\.\\d+\\.\\d+$" };
273
+ var defaultItems = {
274
+ type: "array",
275
+ minItems: 1,
276
+ uniqueItems: true,
277
+ items: {
278
+ type: "object",
279
+ additionalProperties: false,
280
+ required: ["id", "alt", "urls"],
281
+ properties: {
282
+ id: slug,
283
+ alt: localized,
284
+ urls: {
285
+ type: "object",
286
+ additionalProperties: false,
287
+ required: ["webp"],
288
+ properties: { svg: httpsUrl, webp: { type: "object", minProperties: 1, propertyNames: { pattern: "^\\d+$" }, additionalProperties: httpsUrl } }
289
+ }
290
+ }
291
+ }
292
+ };
181
293
  var orgSchema = {
182
294
  $schema: "https://json-schema.org/draft/2020-12/schema",
183
295
  $id: ORG_SCHEMA_URL,
184
296
  title: "Krizaka organisation \u2014 public facts",
185
297
  type: "object",
186
298
  additionalProperties: false,
187
- required: ["$schema", "schemaVersion", "version", "updatedAt", "company", "brand", "people", "products", "sites", "contact", "footer"],
299
+ required: ["$schema", "schemaVersion", "version", "updatedAt", "company", "brand", "people", "defaults", "products", "sites", "contact", "footer"],
188
300
  properties: {
189
301
  $schema: { type: "string" },
190
- schemaVersion: { const: 1 },
302
+ schemaVersion: { enum: [1, 2] },
191
303
  version: semver,
192
304
  updatedAt: date,
193
305
  company: {
@@ -231,6 +343,22 @@ var orgSchema = {
231
343
  }
232
344
  }
233
345
  },
346
+ defaults: {
347
+ type: "object",
348
+ additionalProperties: false,
349
+ required: ["version", "base", "rule", "kinds"],
350
+ properties: {
351
+ version: { type: "string", pattern: "^v\\d+$" },
352
+ base: httpsUrl,
353
+ rule: { type: "object", additionalProperties: false, required: ["pick", "description"], properties: { pick: { const: "fnv1a32-modulo" }, description: { type: "string", minLength: 1 } } },
354
+ kinds: {
355
+ type: "object",
356
+ additionalProperties: false,
357
+ required: ["person", "folder", "organisation", "shop", "banner"],
358
+ properties: Object.fromEntries(["person", "folder", "organisation", "shop", "banner"].map((kind) => [kind, defaultItems]))
359
+ }
360
+ }
361
+ },
234
362
  products: {
235
363
  type: "array",
236
364
  minItems: 1,
@@ -304,13 +432,20 @@ var footerLine = (locale) => localized2(org.footer.line, locale);
304
432
  export {
305
433
  APP_SCHEMA_URL,
306
434
  CDN,
435
+ DEFAULT_KINDS,
307
436
  ORG_SCHEMA_URL,
308
437
  ORG_URL,
309
438
  appSchema,
310
439
  apps,
440
+ defaultFor,
441
+ defaultUrl,
442
+ defaults,
443
+ fetchDefaults,
311
444
  footerLine,
445
+ listDefaults,
312
446
  localized2 as localized,
313
447
  org,
314
- orgSchema
448
+ orgSchema,
449
+ seedHash
315
450
  };
316
451
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../package.json","../src/org.ts","../src/apps.ts","../src/schema.ts","../src/index.ts"],"sourcesContent":["{\n \"name\": \"@krizaka/org\",\n \"version\": \"0.1.0\",\n \"description\": \"The public facts about Krizaka, in one validated JSON that every footer, site and app reads: legal name, NEQ, « Fait à Montréal » in French and English, brand marks, default avatars and banners, the live products and sites, the public contact, the footer line and the mobile apps' public runtime config. Typed data, JSON Schema, and the files published on the CDN.\",\n \"keywords\": [\n \"krizaka\",\n \"organization\",\n \"footer\",\n \"brand\",\n \"json-schema\"\n ],\n \"homepage\": \"https://ts.krizaka.com/org\",\n \"bugs\": \"https://github.com/krizaka/krizaka-ts/issues\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/krizaka/krizaka-ts.git\",\n \"directory\": \"packages/org\"\n },\n \"license\": \"Apache-2.0\",\n \"author\": \"Krizaka (https://www.krizaka.com)\",\n \"type\": \"module\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\"\n },\n \"./org.json\": \"./dist/org.json\",\n \"./org.schema.json\": \"./dist/org.schema.json\",\n \"./apps/*.json\": \"./dist/apps/*.json\",\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"README.md\",\n \"LICENSE\"\n ],\n \"sideEffects\": false,\n \"scripts\": {\n \"build\": \"node -e \\\"require('node:fs').rmSync('dist',{recursive:true,force:true})\\\" && tsup && node scripts/emit.mjs\",\n \"lint\": \"eslint . --max-warnings 0 && tsc --noEmit\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest run\",\n \"check\": \"pnpm run lint && pnpm run test && pnpm run build\",\n \"publish:cdn\": \"node scripts/publish.mjs\",\n \"prepublishOnly\": \"pnpm run build\"\n },\n \"engines\": {\n \"node\": \">=22\"\n },\n \"devDependencies\": {\n \"@krizaka/config\": \"workspace:^\",\n \"@types/node\": \"^22.10.0\",\n \"ajv\": \"^8.17.0\",\n \"eslint\": \"^9.39.0\",\n \"tsup\": \"^8.5.0\",\n \"typescript\": \"^5.9.3\",\n \"vitest\": \"^4.1.11\"\n }\n}\n","import pkg from \"../package.json\" with { type: \"json\" };\nimport type { Localized, Org, OrgAvatar, OrgMark } from \"./org.types\";\n\n/** The pull zone that serves the brand files and this JSON. */\nexport const CDN = \"https://krizaka-assets.b-cdn.net\";\nexport const ORG_URL = `${CDN}/org/v1/org.json`;\nexport const ORG_SCHEMA_URL = `${CDN}/org/v1/org.schema.json`;\n\nconst cdn = (path: string) => `${CDN}/${path}`;\n\nconst mark = (kind: \"logo\" | \"mark\", theme: \"dark\" | \"light\"): OrgMark => ({\n svg: cdn(`brand/krizaka/${kind}-${theme}.svg`),\n png64: cdn(`brand/krizaka/${kind}-${theme}-64.png`),\n png256: cdn(`brand/krizaka/${kind}-${theme}-256.png`),\n png512: cdn(`brand/krizaka/${kind}-${theme}-512.png`),\n png1024: cdn(`brand/krizaka/${kind}-${theme}-1024.png`),\n});\n\nconst TONES = [1, 2, 3, 4, 5, 6] as const;\n\nconst avatarAlt = (kind: \"person\" | \"plain\", n: number): Localized =>\n kind === \"person\"\n ? { fr: `Photo de profil par défaut : silhouette, teinte ${n}`, en: `Default profile picture: silhouette, tone ${n}` }\n : { fr: `Photo de profil par défaut : disque uni, teinte ${n}`, en: `Default profile picture: plain disc, tone ${n}` };\n\n/** The default profile pictures a product shows when a person has no photo (`people/defaults/v1`, krizaka-ui `tools/export-brand.mjs`). */\nconst defaults: OrgAvatar[] = ([\"person\", \"plain\"] as const).flatMap((kind) =>\n TONES.map((n) => ({\n id: `${kind}-${n}`,\n kind,\n svg: cdn(`people/defaults/v1/krizaka/${kind}-${n}.svg`),\n webp256: cdn(`people/defaults/v1/krizaka/${kind}-${n}-256.webp`),\n webp512: cdn(`people/defaults/v1/krizaka/${kind}-${n}-512.webp`),\n alt: avatarAlt(kind, n),\n })),\n);\n\n/** The public facts about Krizaka. Reviewed by pull request; changing a fact is one PR here and a release. */\nexport const org: Org = {\n $schema: ORG_SCHEMA_URL,\n schemaVersion: 1,\n version: pkg.version,\n updatedAt: \"2026-10-26\",\n company: {\n legalName: \"Technologies Krizaka Inc.\",\n tradeName: \"Krizaka\",\n neq: \"1182652231\",\n city: \"Montréal\",\n region: \"Québec\",\n country: \"CA\",\n license: \"Apache-2.0\",\n madeIn: { fr: \"Fait à Montréal\", en: \"Made in Montréal\" },\n },\n brand: {\n name: \"Krizaka\",\n logo: { dark: mark(\"logo\", \"dark\"), light: mark(\"logo\", \"light\") },\n mark: { dark: mark(\"mark\", \"dark\"), light: mark(\"mark\", \"light\") },\n favicon: cdn(\"brand/krizaka/favicon.svg\"),\n appleTouchIcon: cdn(\"brand/krizaka/apple-touch-icon.png\"),\n socialPreview: cdn(\"brand/krizaka/social-preview-1280x640.png\"),\n manifest: cdn(\"brand/manifest.json\"),\n },\n people: {\n defaults,\n // No banner is published on the CDN yet; the set joins here with its alts when it is.\n banners: [],\n },\n products: [\n { id: \"orazaka\", name: \"Orazaka\", status: \"devPreview\", url: \"https://dev.orazaka.com\", repo: \"https://github.com/krizaka/orazaka\" },\n { id: \"yomizaka\", name: \"Yomizaka\", status: \"development\", url: \"https://dev.yomizaka.com\", repo: \"https://github.com/krizaka/yomizaka\" },\n { id: \"akinaza\", name: \"Akinaza\", status: \"development\", url: \"https://dev.akinaza.com\", repo: \"https://github.com/krizaka/akinaza\" },\n ],\n sites: [\n { id: \"www\", name: \"krizaka.com\", url: \"https://www.krizaka.com\" },\n { id: \"ui\", name: \"Krizaka UI\", url: \"https://ui.krizaka.com\" },\n { id: \"java\", name: \"Krizaka Java\", url: \"https://java.krizaka.com\" },\n { id: \"ts\", name: \"Krizaka TS\", url: \"https://ts.krizaka.com\" },\n { id: \"motion\", name: \"Krizaka Motion\", url: \"https://motion.krizaka.com\" },\n { id: \"blog\", name: \"Blog\", url: \"https://blog.krizaka.com\" },\n ],\n contact: {\n page: { fr: \"https://www.krizaka.com/fr/contact\", en: \"https://www.krizaka.com/en/contact\" },\n email: null,\n },\n footer: {\n line: { fr: \"Une entreprise de Technologies Krizaka · Fait à Montréal\", en: \"A Technologies Krizaka company · Made in Montréal\" },\n legal: [\n { id: \"privacy\", label: { fr: \"Confidentialité\", en: \"Privacy\" }, url: { fr: \"https://www.krizaka.com/fr/privacy\", en: \"https://www.krizaka.com/en/privacy\" } },\n { id: \"terms\", label: { fr: \"Conditions\", en: \"Terms\" }, url: { fr: \"https://www.krizaka.com/fr/terms\", en: \"https://www.krizaka.com/en/terms\" } },\n ],\n },\n};\n","import { CDN } from \"./org\";\nimport type { AppConfig } from \"./org.types\";\n\nexport const APP_SCHEMA_URL = `${CDN}/org/v1/app.schema.json`;\nconst UPDATED = \"2026-10-26\";\n\nconst app = (id: string, devUrl: string): AppConfig => ({\n $schema: APP_SCHEMA_URL,\n schemaVersion: 1,\n app: id,\n // Public by nature: an address a client calls. No key, no token, no internal host.\n apiBaseUrl: { dev: devUrl, production: null },\n features: {},\n minAppVersion: \"0.0.0\",\n updatedAt: UPDATED,\n});\n\n/** The runtime config a mobile app may know, per live product. The app reads it at start, with a copy built into the binary as fallback. */\nexport const apps: Record<string, AppConfig> = {\n orazaka: app(\"orazaka\", \"https://dev.orazaka.com\"),\n yomizaka: app(\"yomizaka\", \"https://dev.yomizaka.com\"),\n akinaza: app(\"akinaza\", \"https://dev.akinaza.com\"),\n};\n","import { CDN, ORG_SCHEMA_URL } from \"./org\";\n\nconst localized = {\n type: \"object\",\n additionalProperties: false,\n required: [\"fr\", \"en\"],\n properties: { fr: { type: \"string\", minLength: 1 }, en: { type: \"string\", minLength: 1 } },\n} as const;\nconst httpsUrl = { type: \"string\", format: \"uri\", pattern: \"^https://\" } as const;\nconst mark = {\n type: \"object\",\n additionalProperties: false,\n required: [\"svg\", \"png64\", \"png256\", \"png512\", \"png1024\"],\n properties: { svg: httpsUrl, png64: httpsUrl, png256: httpsUrl, png512: httpsUrl, png1024: httpsUrl },\n} as const;\nconst slug = { type: \"string\", pattern: \"^[a-z0-9]+(-[a-z0-9]+)*$\" } as const;\nconst themed = { type: \"object\", additionalProperties: false, required: [\"dark\", \"light\"], properties: { dark: mark, light: mark } } as const;\nconst date = { type: \"string\", pattern: \"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\" } as const;\nconst semver = { type: \"string\", pattern: \"^\\\\d+\\\\.\\\\d+\\\\.\\\\d+$\" } as const;\n\n/** The JSON Schema of `org/v1/org.json`. Nothing outside it is allowed (`additionalProperties: false` everywhere): a new fact is a new line here first. */\nexport const orgSchema = {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n $id: ORG_SCHEMA_URL,\n title: \"Krizaka organisation — public facts\",\n type: \"object\",\n additionalProperties: false,\n required: [\"$schema\", \"schemaVersion\", \"version\", \"updatedAt\", \"company\", \"brand\", \"people\", \"products\", \"sites\", \"contact\", \"footer\"],\n properties: {\n $schema: { type: \"string\" },\n schemaVersion: { const: 1 },\n version: semver,\n updatedAt: date,\n company: {\n type: \"object\",\n additionalProperties: false,\n required: [\"legalName\", \"tradeName\", \"neq\", \"city\", \"region\", \"country\", \"license\", \"madeIn\"],\n properties: {\n legalName: { type: \"string\", minLength: 1 },\n tradeName: { type: \"string\", minLength: 1 },\n neq: { type: \"string\", pattern: \"^\\\\d{10}$\" },\n city: { type: \"string\", minLength: 1 },\n region: { type: \"string\", minLength: 1 },\n country: { type: \"string\", pattern: \"^[A-Z]{2}$\" },\n license: { type: \"string\", minLength: 1 },\n madeIn: localized,\n },\n },\n brand: {\n type: \"object\",\n additionalProperties: false,\n required: [\"name\", \"logo\", \"mark\", \"favicon\", \"appleTouchIcon\", \"socialPreview\", \"manifest\"],\n properties: { name: { type: \"string\", minLength: 1 }, logo: themed, mark: themed, favicon: httpsUrl, appleTouchIcon: httpsUrl, socialPreview: httpsUrl, manifest: httpsUrl },\n },\n people: {\n type: \"object\",\n additionalProperties: false,\n required: [\"defaults\", \"banners\"],\n properties: {\n defaults: {\n type: \"array\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"kind\", \"svg\", \"webp256\", \"webp512\", \"alt\"],\n properties: { id: slug, kind: { enum: [\"person\", \"plain\"] }, svg: httpsUrl, webp256: httpsUrl, webp512: httpsUrl, alt: localized },\n },\n },\n banners: {\n type: \"array\",\n items: { type: \"object\", additionalProperties: false, required: [\"id\", \"url\", \"alt\"], properties: { id: slug, url: httpsUrl, alt: localized } },\n },\n },\n },\n products: {\n type: \"array\",\n minItems: 1,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"name\", \"status\", \"url\", \"repo\"],\n properties: { id: slug, name: { type: \"string\", minLength: 1 }, status: { enum: [\"development\", \"devPreview\"] }, url: httpsUrl, repo: httpsUrl },\n },\n },\n sites: {\n type: \"array\",\n minItems: 1,\n items: { type: \"object\", additionalProperties: false, required: [\"id\", \"name\", \"url\"], properties: { id: slug, name: { type: \"string\", minLength: 1 }, url: httpsUrl } },\n },\n contact: {\n type: \"object\",\n additionalProperties: false,\n required: [\"page\", \"email\"],\n properties: {\n page: { type: \"object\", additionalProperties: false, required: [\"fr\", \"en\"], properties: { fr: httpsUrl, en: httpsUrl } },\n email: { type: [\"string\", \"null\"], format: \"email\" },\n },\n },\n footer: {\n type: \"object\",\n additionalProperties: false,\n required: [\"line\", \"legal\"],\n properties: {\n line: localized,\n legal: {\n type: \"array\",\n minItems: 1,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"label\", \"url\"],\n properties: { id: { enum: [\"privacy\", \"terms\"] }, label: localized, url: { type: \"object\", additionalProperties: false, required: [\"fr\", \"en\"], properties: { fr: httpsUrl, en: httpsUrl } } },\n },\n },\n },\n },\n },\n} as const;\n\n/** The JSON Schema of `apps/<product>.json`. */\nexport const appSchema = {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n $id: `${CDN}/org/v1/app.schema.json`,\n title: \"Krizaka mobile app — public runtime config\",\n type: \"object\",\n additionalProperties: false,\n required: [\"$schema\", \"schemaVersion\", \"app\", \"apiBaseUrl\", \"features\", \"minAppVersion\", \"updatedAt\"],\n properties: {\n $schema: { type: \"string\" },\n schemaVersion: { const: 1 },\n app: slug,\n apiBaseUrl: {\n type: \"object\",\n additionalProperties: false,\n required: [\"dev\", \"production\"],\n properties: { dev: { anyOf: [httpsUrl, { type: \"null\" }] }, production: { anyOf: [httpsUrl, { type: \"null\" }] } },\n },\n features: { type: \"object\", additionalProperties: { type: \"boolean\" } },\n minAppVersion: semver,\n updatedAt: date,\n },\n} as const;\n","export { APP_SCHEMA_URL,apps } from \"./apps\";\nexport { CDN, org, ORG_SCHEMA_URL, ORG_URL } from \"./org\";\nexport type { AppConfig, AppEnvironment, Localized, Org, OrgAvatar, OrgBanner, OrgMark, OrgProduct, OrgSite, ProductStatus } from \"./org.types\";\nexport { appSchema, orgSchema } from \"./schema\";\n\nimport { org } from \"./org\";\nimport type { Localized } from \"./org.types\";\n\n/** The text of a localized pair for a language (`fr` or `en`; anything else reads English). */\nexport const localized = (text: Localized, locale: string): string => (locale === \"fr\" ? text.fr : text.en);\n\n/** The footer line of the family, « Une entreprise de Technologies Krizaka · Fait à Montréal ». */\nexport const footerLine = (locale: string): string => localized(org.footer.line, locale);\n"],"mappings":";AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,UAAY;AAAA,EACZ,MAAQ;AAAA,EACR,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,IACP,WAAa;AAAA,EACf;AAAA,EACA,SAAW;AAAA,EACX,QAAU;AAAA,EACV,MAAQ;AAAA,EACR,MAAQ;AAAA,EACR,QAAU;AAAA,EACV,OAAS;AAAA,EACT,SAAW;AAAA,IACT,KAAK;AAAA,MACH,OAAS;AAAA,MACT,QAAU;AAAA,IACZ;AAAA,IACA,cAAc;AAAA,IACd,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,kBAAkB;AAAA,EACpB;AAAA,EACA,OAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,aAAe;AAAA,EACf,SAAW;AAAA,IACT,OAAS;AAAA,IACT,MAAQ;AAAA,IACR,WAAa;AAAA,IACb,MAAQ;AAAA,IACR,OAAS;AAAA,IACT,eAAe;AAAA,IACf,gBAAkB;AAAA,EACpB;AAAA,EACA,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AAAA,EACA,iBAAmB;AAAA,IACjB,mBAAmB;AAAA,IACnB,eAAe;AAAA,IACf,KAAO;AAAA,IACP,QAAU;AAAA,IACV,MAAQ;AAAA,IACR,YAAc;AAAA,IACd,QAAU;AAAA,EACZ;AACF;;;ACzDO,IAAM,MAAM;AACZ,IAAM,UAAU,GAAG,GAAG;AACtB,IAAM,iBAAiB,GAAG,GAAG;AAEpC,IAAM,MAAM,CAAC,SAAiB,GAAG,GAAG,IAAI,IAAI;AAE5C,IAAM,OAAO,CAAC,MAAuB,WAAsC;AAAA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AAY;AAAA,MACV,MAAM;AAAA,MACN,sBAAsB;AAAA,MACtB,UAAU,CAAC,OAAO,YAAY;AAAA,MAC9B,YAAY,EAAE,KAAK,EAAE,OAAO,CAAC,UAAU,EAAE,MAAM,OAAO,CAAC,EAAE,GAAG,YAAY,EAAE,OAAO,CAAC,UAAU,EAAE,MAAM,OAAO,CAAC,EAAE,EAAE;AAAA,IAClH;AAAA,IACA,UAAU,EAAE,MAAM,UAAU,sBAAsB,EAAE,MAAM,UAAU,EAAE;AAAA,IACtE,eAAe;AAAA,IACf,WAAW;AAAA,EACb;AACF;;;ACpIO,IAAMC,aAAY,CAAC,MAAiB,WAA4B,WAAW,OAAO,KAAK,KAAK,KAAK;AAGjG,IAAM,aAAa,CAAC,WAA2BA,WAAU,IAAI,OAAO,MAAM,MAAM;","names":["mark","localized"]}
1
+ {"version":3,"sources":["../package.json","../src/defaults.ts","../src/org.ts","../src/apps.ts","../src/schema.ts","../src/index.ts"],"sourcesContent":["{\n \"name\": \"@krizaka/org\",\n \"version\": \"0.2.0\",\n \"description\": \"The public facts about Krizaka, in one validated JSON that every footer, site and app reads: legal name, NEQ, « Fait à Montréal » in French and English, brand marks, default avatars and banners, the live products and sites, the public contact, the footer line and the mobile apps' public runtime config. Typed data, JSON Schema, and the files published on the CDN.\",\n \"keywords\": [\n \"krizaka\",\n \"organization\",\n \"footer\",\n \"brand\",\n \"json-schema\"\n ],\n \"homepage\": \"https://ts.krizaka.com/org\",\n \"bugs\": \"https://github.com/krizaka/krizaka-ts/issues\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/krizaka/krizaka-ts.git\",\n \"directory\": \"packages/org\"\n },\n \"license\": \"Apache-2.0\",\n \"author\": \"Krizaka (https://www.krizaka.com)\",\n \"type\": \"module\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\"\n },\n \"./org.json\": \"./dist/org.json\",\n \"./org.schema.json\": \"./dist/org.schema.json\",\n \"./apps/*.json\": \"./dist/apps/*.json\",\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"README.md\",\n \"LICENSE\"\n ],\n \"sideEffects\": false,\n \"scripts\": {\n \"build\": \"node -e \\\"require('node:fs').rmSync('dist',{recursive:true,force:true})\\\" && tsup && node scripts/emit.mjs\",\n \"lint\": \"eslint . --max-warnings 0 && tsc --noEmit\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest run\",\n \"check\": \"pnpm run lint && pnpm run test && pnpm run build\",\n \"publish:cdn\": \"node scripts/publish.mjs\",\n \"prepublishOnly\": \"pnpm run build\"\n },\n \"engines\": {\n \"node\": \">=22\"\n },\n \"devDependencies\": {\n \"@krizaka/config\": \"workspace:^\",\n \"@types/node\": \"^22.10.0\",\n \"ajv\": \"^8.17.0\",\n \"eslint\": \"^9.39.0\",\n \"tsup\": \"^8.5.0\",\n \"typescript\": \"^5.9.3\",\n \"vitest\": \"^4.1.11\"\n }\n}\n","import type { Localized, OrgDefaultItem, OrgDefaultKind, OrgDefaults } from \"./org.types\";\n\n/** The pull zone that serves the sets. Declared here, not imported from `org.ts`, so `org.ts` can build its section from this file. */\nconst BASE = \"https://krizaka-assets.b-cdn.net/defaults/v1\";\n\n/** The kinds of entity that have a default set, in the order the JSON lists them. */\nexport const DEFAULT_KINDS = [\"person\", \"folder\", \"organisation\", \"shop\", \"banner\"] as const satisfies readonly OrgDefaultKind[];\n\n/** The sizes (px) each kind is served in: squares for the pictures, widths for the banners (3:1). */\nconst SIZES: Record<OrgDefaultKind, readonly number[]> = { person: [256, 512, 1024], folder: [256, 512, 1024], organisation: [256, 512, 1024], shop: [256, 512, 1024], banner: [960, 1920] };\n\nconst item = (kind: OrgDefaultKind, id: string, alt: Localized, drawn: boolean): OrgDefaultItem => ({\n id,\n alt,\n urls: {\n ...(drawn ? { svg: `${BASE}/${kind}/${id}.svg` } : {}),\n webp: Object.fromEntries(SIZES[kind].map((size) => [String(size), `${BASE}/${kind}/${id}-${size}.webp`])),\n },\n});\n\nconst tones = (kind: OrgDefaultKind, id: string, alt: (n: number) => Localized): OrgDefaultItem[] => Array.from({ length: 6 }, (_, i) => item(kind, `${id}-${i + 1}`, alt(i + 1), true));\n\n/** The founder's illustrated people (`defaults/v1/person/<id>-<size>.webp`). Alt texts say what the picture shows, never who. */\nconst PEOPLE: [string, Localized][] = [\n [\"boom-bap\", { en: \"Illustration: a rapper in a denim jacket and beanie, microphone in hand, in a rainy Montréal alley at night\", fr: \"Illustration : un rappeur en veste de jean et tuque, micro à la main, dans une ruelle de Montréal sous la pluie, la nuit\" }],\n [\"rasta-creative\", { en: \"A smiling man with long dreadlocks in a paint-stained denim jacket, in an artist's workshop\", fr: \"Un homme souriant aux longues dreadlocks, en veste de jean tachée de peinture, dans un atelier d'artiste\" }],\n [\"mile-end-hipster\", { en: \"A smiling person with round glasses and an orange beanie at a leatherworking bench, in a brick workshop\", fr: \"Une personne souriante à lunettes rondes et tuque orange, à son établi de cuir, dans un atelier de briques\" }],\n [\"tech-architect\", { en: \"A person in a dark hoodie typing at a keyboard, between screens of code and a server rack\", fr: \"Une personne en chandail à capuchon sombre qui tape au clavier, entre des écrans de code et une baie de serveurs\" }],\n [\"electronic-dj\", { en: \"A DJ with headphones behind synthesizers and a mixing desk, in a club with violet lights\", fr: \"Un DJ casque aux oreilles derrière des synthétiseurs et une table de mixage, dans un club aux lumières violettes\" }],\n [\"visual-artist\", { en: \"A smiling painter with violet hair and big glasses, palette in hand, in a studio full of canvases\", fr: \"Une peintre souriante aux cheveux violets et aux grosses lunettes, palette à la main, dans un atelier plein de toiles\" }],\n [\"salon-tattoo-maker\", { en: \"A tattoo artist with tattooed arms working on a client in a warm shop with wooden shelves\", fr: \"Une tatoueuse aux bras tatoués au travail sur un client, dans un salon chaleureux aux étagères de bois\" }],\n [\"wise-auditor\", { en: \"A grey-haired person with glasses at a desk of old books and a lamp, a pen over open notes\", fr: \"Une personne aux cheveux gris et à lunettes à un bureau de vieux livres et de lampe, un stylo sur des notes ouvertes\" }],\n [\"digital-creator\", { en: \"A laughing streamer with a microphone in a purple-lit studio under a neon « Creator Zone » sign\", fr: \"Une diffuseuse qui rit devant un micro, dans un studio violet sous une enseigne néon « Creator Zone »\" }],\n [\"studio-maker\", { en: \"A potter in a linen apron holding a clay bowl, in a bright ceramics studio with plants\", fr: \"Une potière en tablier de lin tenant un bol d'argile, dans un atelier de céramique lumineux et plein de plantes\" }],\n [\"community-lead\", { en: \"A smiling person with curly hair and a grey coat at a wooden table, a community space behind them\", fr: \"Une personne souriante aux cheveux bouclés et au manteau gris, à une table de bois, devant un espace communautaire\" }],\n [\"ai-builder\", { en: \"A thoughtful person with blue-tinted glasses at a desk, screens of a neural network and code behind\", fr: \"Une personne pensive aux lunettes teintées de bleu à son bureau, devant des écrans de réseau neuronal et de code\" }],\n];\n\n/** The founder's banners, 3:1 (`defaults/v1/banner/<id>-<width>.webp`). */\nconst BANNERS: [string, Localized][] = [\n [\"montreal-winter-night\", { en: \"Illustration: a snowy night in downtown Montréal, lit shop fronts and walkers\", fr: \"Illustration : une nuit de neige au centre-ville de Montréal, devantures éclairées et passants\" }],\n [\"industrial-heritage\", { en: \"Dark blue skyline of old brick buildings with lit orange windows under a full moon\", fr: \"Silhouette bleu nuit de vieux immeubles de briques aux fenêtres orangées, sous la pleine lune\" }],\n [\"creator-loft-studio\", { en: \"A dark loft desk with a plant, a code window and a mixing board\", fr: \"Un bureau de loft sombre avec une plante, une fenêtre de code et une table de mixage\" }],\n [\"abstract-digital-flow\", { en: \"Flowing teal, violet and orange lines linking glowing points on a dark background\", fr: \"Des lignes ondulantes turquoise, violettes et orange reliant des points lumineux sur fond sombre\" }],\n [\"paperwork-and-ink\", { en: \"Two dark document cards with colored stamps on a night-blue grid\", fr: \"Deux cartes de documents sombres tamponnées de couleur sur une grille bleu nuit\" }],\n [\"nightlife-music-visual\", { en: \"A large glowing vinyl record with a pink label beside a small level meter, in violet light\", fr: \"Un grand disque vinyle lumineux à l'étiquette rose près d'un petit indicateur de niveau, en lumière violette\" }],\n [\"the-mascot-flock\", { en: \"The Krizaka mascots — an owl, a beaver and a flamingo — standing on a shelf in the dark\", fr: \"Les mascottes de Krizaka — un hibou, un castor et un flamant — debout sur une étagère dans le noir\" }],\n [\"abstract-stripes\", { en: \"Diagonal teal, indigo, violet and orange stripes with a white star and « Montréal // 514 »\", fr: \"Des bandes diagonales turquoise, indigo, violettes et orange avec une étoile blanche et « Montréal // 514 »\" }],\n [\"open-source-horizon\", { en: \"A dark terminal window on a grid, a faint horizon behind\", fr: \"Une fenêtre de terminal sombre sur une grille, un horizon pâle derrière\" }],\n [\"cafe-maker-studio\", { en: \"A warm dark brown scene with a card reading « Fabriqué à Montréal »\", fr: \"Une scène brun foncé chaleureuse avec une carte « Fabriqué à Montréal »\" }],\n [\"the-neon-flamingo\", { en: \"A pink neon flamingo outline on black, with a violet halo\", fr: \"Le contour d'un flamant rose en néon sur fond noir, avec un halo violet\" }],\n [\"cooperative-network\", { en: \"Small linked glowing points over a dark hill at dusk\", fr: \"De petits points lumineux reliés au-dessus d'une colline sombre au crépuscule\" }],\n];\n\nconst GLYPH_ALT = {\n person: (n: number): Localized => ({ en: `Default profile picture: a silhouette, tone ${n}`, fr: `Photo de profil par défaut : une silhouette, teinte ${n}` }),\n folder: (n: number): Localized => ({ en: `Default folder picture: a folder, tone ${n}`, fr: `Image de dossier par défaut : un dossier, teinte ${n}` }),\n organisation: (n: number): Localized => ({ en: `Default organisation picture: a building, tone ${n}`, fr: `Image d'organisation par défaut : un immeuble, teinte ${n}` }),\n shop: (n: number): Localized => ({ en: `Default shop picture: a storefront, tone ${n}`, fr: `Image de boutique par défaut : une devanture, teinte ${n}` }),\n};\n\n/** The `defaults` section of the org JSON: the central sets on Bunny (`defaults/v1/<kind>/<id>-<size>.<ext>`), written by krizaka-ui `tools/export-defaults.mjs`. */\nexport const defaults: OrgDefaults = {\n version: \"v1\",\n base: BASE,\n rule: {\n pick: \"fnv1a32-modulo\",\n description: \"defaultFor(kind, seed) = items[fnv1a32(String(seed)) mod items.length] of the kind's list, in the order of the JSON; the same seed always gives the same item, in every app.\",\n },\n kinds: {\n person: [...tones(\"person\", \"silhouette\", GLYPH_ALT.person), ...PEOPLE.map(([id, alt]) => item(\"person\", id, alt, false))],\n folder: tones(\"folder\", \"folder\", GLYPH_ALT.folder),\n organisation: tones(\"organisation\", \"organisation\", GLYPH_ALT.organisation),\n shop: tones(\"shop\", \"shop\", GLYPH_ALT.shop),\n banner: BANNERS.map(([id, alt]) => item(\"banner\", id, alt, false)),\n },\n};\n\n// ---- reading -------------------------------------------------------------------------------------------------------\n\n/** 32-bit FNV-1a of a seed: stable across runs, devices and products (the same one `@krizaka/ui`'s default avatars use). */\nexport function seedHash(seed: string | number): number {\n let h = 0x811c9dc5;\n for (const ch of String(seed)) {\n h ^= ch.codePointAt(0) ?? 0;\n h = Math.imul(h, 0x01000193) >>> 0;\n }\n return h;\n}\n\n/** The items of a kind, in the order of the JSON. A source other than the bundled one is the JSON an app fetched. */\nexport function listDefaults(kind: OrgDefaultKind, source: OrgDefaults = defaults): readonly OrgDefaultItem[] {\n return source.kinds[kind] ?? [];\n}\n\n/** The item of a kind for a seed (an entity's id): deterministic, so a folder keeps its picture everywhere. `undefined` only when the kind's list is empty. */\nexport function defaultFor(kind: OrgDefaultKind, seed: string | number, source: OrgDefaults = defaults): OrgDefaultItem | undefined {\n const items = listDefaults(kind, source);\n return items.length === 0 ? undefined : items[seedHash(seed) % items.length];\n}\n\n/** The URL of an item at the smallest size that is at least `size` px (or the largest there is); `svg` when the item has a vector and `format` says so. */\nexport function defaultUrl(entry: OrgDefaultItem, size: number, format: \"webp\" | \"svg\" = \"webp\"): string {\n if (format === \"svg\" && entry.urls.svg) return entry.urls.svg;\n const sizes = Object.keys(entry.urls.webp).map(Number).sort((a, b) => a - b);\n const chosen = sizes.find((s) => s >= size) ?? sizes[sizes.length - 1];\n return entry.urls.webp[String(chosen)] ?? \"\";\n}\n\n/** Reads the section from the published JSON (`ORG_URL`), for an app that does not bundle this package. */\nexport async function fetchDefaults(url: string, fetchImpl: typeof fetch = fetch): Promise<OrgDefaults> {\n const res = await fetchImpl(url, { headers: { Accept: \"application/json\" } });\n if (!res.ok) throw new Error(`${url} answered ${res.status}`);\n const json = (await res.json()) as { defaults?: OrgDefaults };\n if (!json.defaults) throw new Error(`${url} has no \\`defaults\\` section`);\n return json.defaults;\n}\n","import pkg from \"../package.json\" with { type: \"json\" };\nimport { defaults as centralDefaults } from \"./defaults\";\nimport type { Localized, Org, OrgAvatar, OrgMark } from \"./org.types\";\n\n/** The pull zone that serves the brand files and this JSON. */\nexport const CDN = \"https://krizaka-assets.b-cdn.net\";\nexport const ORG_URL = `${CDN}/org/v1/org.json`;\nexport const ORG_SCHEMA_URL = `${CDN}/org/v1/org.schema.json`;\n\nconst cdn = (path: string) => `${CDN}/${path}`;\n\nconst mark = (kind: \"logo\" | \"mark\", theme: \"dark\" | \"light\"): OrgMark => ({\n svg: cdn(`brand/krizaka/${kind}-${theme}.svg`),\n png64: cdn(`brand/krizaka/${kind}-${theme}-64.png`),\n png256: cdn(`brand/krizaka/${kind}-${theme}-256.png`),\n png512: cdn(`brand/krizaka/${kind}-${theme}-512.png`),\n png1024: cdn(`brand/krizaka/${kind}-${theme}-1024.png`),\n});\n\nconst TONES = [1, 2, 3, 4, 5, 6] as const;\n\nconst avatarAlt = (kind: \"person\" | \"plain\", n: number): Localized =>\n kind === \"person\"\n ? { fr: `Photo de profil par défaut : silhouette, teinte ${n}`, en: `Default profile picture: silhouette, tone ${n}` }\n : { fr: `Photo de profil par défaut : disque uni, teinte ${n}`, en: `Default profile picture: plain disc, tone ${n}` };\n\n/** The default profile pictures a product shows when a person has no photo (`people/defaults/v1`, krizaka-ui `tools/export-brand.mjs`). */\nconst defaults: OrgAvatar[] = ([\"person\", \"plain\"] as const).flatMap((kind) =>\n TONES.map((n) => ({\n id: `${kind}-${n}`,\n kind,\n svg: cdn(`people/defaults/v1/krizaka/${kind}-${n}.svg`),\n webp256: cdn(`people/defaults/v1/krizaka/${kind}-${n}-256.webp`),\n webp512: cdn(`people/defaults/v1/krizaka/${kind}-${n}-512.webp`),\n alt: avatarAlt(kind, n),\n })),\n);\n\n/** The public facts about Krizaka. Reviewed by pull request; changing a fact is one PR here and a release. */\nexport const org: Org = {\n $schema: ORG_SCHEMA_URL,\n schemaVersion: 2,\n version: pkg.version,\n updatedAt: \"2026-10-26\",\n company: {\n legalName: \"Technologies Krizaka Inc.\",\n tradeName: \"Krizaka\",\n neq: \"1182652231\",\n city: \"Montréal\",\n region: \"Québec\",\n country: \"CA\",\n license: \"Apache-2.0\",\n madeIn: { fr: \"Fait à Montréal\", en: \"Made in Montréal\" },\n },\n brand: {\n name: \"Krizaka\",\n logo: { dark: mark(\"logo\", \"dark\"), light: mark(\"logo\", \"light\") },\n mark: { dark: mark(\"mark\", \"dark\"), light: mark(\"mark\", \"light\") },\n favicon: cdn(\"brand/krizaka/favicon.svg\"),\n appleTouchIcon: cdn(\"brand/krizaka/apple-touch-icon.png\"),\n socialPreview: cdn(\"brand/krizaka/social-preview-1280x640.png\"),\n manifest: cdn(\"brand/manifest.json\"),\n },\n people: {\n defaults,\n // No banner is published on the CDN yet; the set joins here with its alts when it is.\n banners: [],\n },\n defaults: centralDefaults,\n products: [\n { id: \"orazaka\", name: \"Orazaka\", status: \"devPreview\", url: \"https://dev.orazaka.com\", repo: \"https://github.com/krizaka/orazaka\" },\n { id: \"yomizaka\", name: \"Yomizaka\", status: \"development\", url: \"https://dev.yomizaka.com\", repo: \"https://github.com/krizaka/yomizaka\" },\n { id: \"akinaza\", name: \"Akinaza\", status: \"development\", url: \"https://dev.akinaza.com\", repo: \"https://github.com/krizaka/akinaza\" },\n ],\n sites: [\n { id: \"www\", name: \"krizaka.com\", url: \"https://www.krizaka.com\" },\n { id: \"ui\", name: \"Krizaka UI\", url: \"https://ui.krizaka.com\" },\n { id: \"java\", name: \"Krizaka Java\", url: \"https://java.krizaka.com\" },\n { id: \"ts\", name: \"Krizaka TS\", url: \"https://ts.krizaka.com\" },\n { id: \"motion\", name: \"Krizaka Motion\", url: \"https://motion.krizaka.com\" },\n { id: \"blog\", name: \"Blog\", url: \"https://blog.krizaka.com\" },\n ],\n contact: {\n page: { fr: \"https://www.krizaka.com/fr/contact\", en: \"https://www.krizaka.com/en/contact\" },\n email: null,\n },\n footer: {\n line: { fr: \"Une entreprise de Technologies Krizaka · Fait à Montréal\", en: \"A Technologies Krizaka company · Made in Montréal\" },\n legal: [\n { id: \"privacy\", label: { fr: \"Confidentialité\", en: \"Privacy\" }, url: { fr: \"https://www.krizaka.com/fr/privacy\", en: \"https://www.krizaka.com/en/privacy\" } },\n { id: \"terms\", label: { fr: \"Conditions\", en: \"Terms\" }, url: { fr: \"https://www.krizaka.com/fr/terms\", en: \"https://www.krizaka.com/en/terms\" } },\n ],\n },\n};\n","import { CDN } from \"./org\";\nimport type { AppConfig } from \"./org.types\";\n\nexport const APP_SCHEMA_URL = `${CDN}/org/v1/app.schema.json`;\nconst UPDATED = \"2026-10-26\";\n\nconst app = (id: string, devUrl: string): AppConfig => ({\n $schema: APP_SCHEMA_URL,\n schemaVersion: 1,\n app: id,\n // Public by nature: an address a client calls. No key, no token, no internal host.\n apiBaseUrl: { dev: devUrl, production: null },\n features: {},\n minAppVersion: \"0.0.0\",\n updatedAt: UPDATED,\n});\n\n/** The runtime config a mobile app may know, per live product. The app reads it at start, with a copy built into the binary as fallback. */\nexport const apps: Record<string, AppConfig> = {\n orazaka: app(\"orazaka\", \"https://dev.orazaka.com\"),\n yomizaka: app(\"yomizaka\", \"https://dev.yomizaka.com\"),\n akinaza: app(\"akinaza\", \"https://dev.akinaza.com\"),\n};\n","import { CDN, ORG_SCHEMA_URL } from \"./org\";\n\nconst localized = {\n type: \"object\",\n additionalProperties: false,\n required: [\"fr\", \"en\"],\n properties: { fr: { type: \"string\", minLength: 1 }, en: { type: \"string\", minLength: 1 } },\n} as const;\nconst httpsUrl = { type: \"string\", format: \"uri\", pattern: \"^https://\" } as const;\nconst mark = {\n type: \"object\",\n additionalProperties: false,\n required: [\"svg\", \"png64\", \"png256\", \"png512\", \"png1024\"],\n properties: { svg: httpsUrl, png64: httpsUrl, png256: httpsUrl, png512: httpsUrl, png1024: httpsUrl },\n} as const;\nconst slug = { type: \"string\", pattern: \"^[a-z0-9]+(-[a-z0-9]+)*$\" } as const;\nconst themed = { type: \"object\", additionalProperties: false, required: [\"dark\", \"light\"], properties: { dark: mark, light: mark } } as const;\nconst date = { type: \"string\", pattern: \"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\" } as const;\nconst semver = { type: \"string\", pattern: \"^\\\\d+\\\\.\\\\d+\\\\.\\\\d+$\" } as const;\n\nconst defaultItems = {\n type: \"array\",\n minItems: 1,\n uniqueItems: true,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"alt\", \"urls\"],\n properties: {\n id: slug,\n alt: localized,\n urls: {\n type: \"object\",\n additionalProperties: false,\n required: [\"webp\"],\n properties: { svg: httpsUrl, webp: { type: \"object\", minProperties: 1, propertyNames: { pattern: \"^\\\\d+$\" }, additionalProperties: httpsUrl } },\n },\n },\n },\n} as const;\n\n/** The JSON Schema of `org/v1/org.json`. Nothing outside it is allowed (`additionalProperties: false` everywhere): a new fact is a new line here first. */\nexport const orgSchema = {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n $id: ORG_SCHEMA_URL,\n title: \"Krizaka organisation — public facts\",\n type: \"object\",\n additionalProperties: false,\n required: [\"$schema\", \"schemaVersion\", \"version\", \"updatedAt\", \"company\", \"brand\", \"people\", \"defaults\", \"products\", \"sites\", \"contact\", \"footer\"],\n properties: {\n $schema: { type: \"string\" },\n schemaVersion: { enum: [1, 2] },\n version: semver,\n updatedAt: date,\n company: {\n type: \"object\",\n additionalProperties: false,\n required: [\"legalName\", \"tradeName\", \"neq\", \"city\", \"region\", \"country\", \"license\", \"madeIn\"],\n properties: {\n legalName: { type: \"string\", minLength: 1 },\n tradeName: { type: \"string\", minLength: 1 },\n neq: { type: \"string\", pattern: \"^\\\\d{10}$\" },\n city: { type: \"string\", minLength: 1 },\n region: { type: \"string\", minLength: 1 },\n country: { type: \"string\", pattern: \"^[A-Z]{2}$\" },\n license: { type: \"string\", minLength: 1 },\n madeIn: localized,\n },\n },\n brand: {\n type: \"object\",\n additionalProperties: false,\n required: [\"name\", \"logo\", \"mark\", \"favicon\", \"appleTouchIcon\", \"socialPreview\", \"manifest\"],\n properties: { name: { type: \"string\", minLength: 1 }, logo: themed, mark: themed, favicon: httpsUrl, appleTouchIcon: httpsUrl, socialPreview: httpsUrl, manifest: httpsUrl },\n },\n people: {\n type: \"object\",\n additionalProperties: false,\n required: [\"defaults\", \"banners\"],\n properties: {\n defaults: {\n type: \"array\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"kind\", \"svg\", \"webp256\", \"webp512\", \"alt\"],\n properties: { id: slug, kind: { enum: [\"person\", \"plain\"] }, svg: httpsUrl, webp256: httpsUrl, webp512: httpsUrl, alt: localized },\n },\n },\n banners: {\n type: \"array\",\n items: { type: \"object\", additionalProperties: false, required: [\"id\", \"url\", \"alt\"], properties: { id: slug, url: httpsUrl, alt: localized } },\n },\n },\n },\n defaults: {\n type: \"object\",\n additionalProperties: false,\n required: [\"version\", \"base\", \"rule\", \"kinds\"],\n properties: {\n version: { type: \"string\", pattern: \"^v\\\\d+$\" },\n base: httpsUrl,\n rule: { type: \"object\", additionalProperties: false, required: [\"pick\", \"description\"], properties: { pick: { const: \"fnv1a32-modulo\" }, description: { type: \"string\", minLength: 1 } } },\n kinds: {\n type: \"object\",\n additionalProperties: false,\n required: [\"person\", \"folder\", \"organisation\", \"shop\", \"banner\"],\n properties: Object.fromEntries([\"person\", \"folder\", \"organisation\", \"shop\", \"banner\"].map((kind) => [kind, defaultItems])),\n },\n },\n },\n products: {\n type: \"array\",\n minItems: 1,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"name\", \"status\", \"url\", \"repo\"],\n properties: { id: slug, name: { type: \"string\", minLength: 1 }, status: { enum: [\"development\", \"devPreview\"] }, url: httpsUrl, repo: httpsUrl },\n },\n },\n sites: {\n type: \"array\",\n minItems: 1,\n items: { type: \"object\", additionalProperties: false, required: [\"id\", \"name\", \"url\"], properties: { id: slug, name: { type: \"string\", minLength: 1 }, url: httpsUrl } },\n },\n contact: {\n type: \"object\",\n additionalProperties: false,\n required: [\"page\", \"email\"],\n properties: {\n page: { type: \"object\", additionalProperties: false, required: [\"fr\", \"en\"], properties: { fr: httpsUrl, en: httpsUrl } },\n email: { type: [\"string\", \"null\"], format: \"email\" },\n },\n },\n footer: {\n type: \"object\",\n additionalProperties: false,\n required: [\"line\", \"legal\"],\n properties: {\n line: localized,\n legal: {\n type: \"array\",\n minItems: 1,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"label\", \"url\"],\n properties: { id: { enum: [\"privacy\", \"terms\"] }, label: localized, url: { type: \"object\", additionalProperties: false, required: [\"fr\", \"en\"], properties: { fr: httpsUrl, en: httpsUrl } } },\n },\n },\n },\n },\n },\n} as const;\n\n/** The JSON Schema of `apps/<product>.json`. */\nexport const appSchema = {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n $id: `${CDN}/org/v1/app.schema.json`,\n title: \"Krizaka mobile app — public runtime config\",\n type: \"object\",\n additionalProperties: false,\n required: [\"$schema\", \"schemaVersion\", \"app\", \"apiBaseUrl\", \"features\", \"minAppVersion\", \"updatedAt\"],\n properties: {\n $schema: { type: \"string\" },\n schemaVersion: { const: 1 },\n app: slug,\n apiBaseUrl: {\n type: \"object\",\n additionalProperties: false,\n required: [\"dev\", \"production\"],\n properties: { dev: { anyOf: [httpsUrl, { type: \"null\" }] }, production: { anyOf: [httpsUrl, { type: \"null\" }] } },\n },\n features: { type: \"object\", additionalProperties: { type: \"boolean\" } },\n minAppVersion: semver,\n updatedAt: date,\n },\n} as const;\n","export { APP_SCHEMA_URL,apps } from \"./apps\";\nexport { DEFAULT_KINDS, defaultFor, defaults, defaultUrl, fetchDefaults, listDefaults, seedHash } from \"./defaults\";\nexport { CDN, org, ORG_SCHEMA_URL, ORG_URL } from \"./org\";\nexport type { AppConfig, AppEnvironment, Localized, Org, OrgAvatar, OrgBanner, OrgDefaultItem, OrgDefaultKind, OrgDefaults, OrgMark, OrgProduct, OrgSite, ProductStatus } from \"./org.types\";\nexport { appSchema, orgSchema } from \"./schema\";\n\nimport { org } from \"./org\";\nimport type { Localized } from \"./org.types\";\n\n/** The text of a localized pair for a language (`fr` or `en`; anything else reads English). */\nexport const localized = (text: Localized, locale: string): string => (locale === \"fr\" ? text.fr : text.en);\n\n/** The footer line of the family, « Une entreprise de Technologies Krizaka · Fait à Montréal ». */\nexport const footerLine = (locale: string): string => localized(org.footer.line, locale);\n"],"mappings":";AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,UAAY;AAAA,EACZ,MAAQ;AAAA,EACR,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,IACP,WAAa;AAAA,EACf;AAAA,EACA,SAAW;AAAA,EACX,QAAU;AAAA,EACV,MAAQ;AAAA,EACR,MAAQ;AAAA,EACR,QAAU;AAAA,EACV,OAAS;AAAA,EACT,SAAW;AAAA,IACT,KAAK;AAAA,MACH,OAAS;AAAA,MACT,QAAU;AAAA,IACZ;AAAA,IACA,cAAc;AAAA,IACd,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,kBAAkB;AAAA,EACpB;AAAA,EACA,OAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,aAAe;AAAA,EACf,SAAW;AAAA,IACT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