@egen-civitas/esm-styleguide 2.1.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @egen-civitas/esm-styleguide
2
2
 
3
+ ## 2.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 477171f: `LiveOrb` devient une **tête 3D de type Baymax** au lieu d'une sphère : crâne large et arrondi, deux yeux ovales reliés par un trait fin, et deux oreillettes de casque avec anneau lumineux vert → jaune. Les proportions ont été mesurées sur la mascotte EGEN (rapport largeur/hauteur de la tête ≈ 1 : 0,74, yeux ≈ 3,7 fois leur largeur d'écart, trait ≈ 15 % de la hauteur d'un œil).
8
+
9
+ - **Rendu** : un seul fragment shader raymarché (scène SDF : crâne ellipsoïdal, oreillettes à cuvette creuse + anneau néon, raccord doux). Éclairage fixe dans le monde (ombres douces, occlusion ambiante, reflet), halo néon, silhouette anti-crénelée.
10
+ - **La tête pivote** vers le pointeur (lacet, tangage, léger roulis) avec un ressort amorti pour un mouvement de cou naturel, et un très léger balancement au repos. Les yeux, le trait et les oreilles sont solidaires du crâne : ils épousent sa courbure et se déforment en perspective quand il tourne. Le clignement écrase les yeux, le trait reste.
11
+ - **Suivi du pointeur** par angle (et non plus saturé à quelques pixels du centre), donc fluide même pour un avatar de 38 px ; retour à la pose neutre quand le pointeur quitte la fenêtre.
12
+ - **Repli sans GPU** refait dans le même design (tête, yeux, trait, oreilles à dégradé néon) avec un léger parallaxe vers le pointeur ; il ne dépend plus d'aucune classe Tailwind.
13
+ - **Robustesse** : la boucle de rendu se met en pause hors écran / onglet masqué, et une perte de contexte WebGL bascule sur le repli.
14
+ - **API rétro-compatible** : `variant` (`white`, `black`, `webgl`, `custom`), `color`, `eyeColor`, `colors`, `interactive`, `blink`, `size`, `className` sont inchangés, donc tous les usages existants (avec leurs variantes) sont mis à jour sans modification. Nouveautés : `ears` (défaut `true`), `earColors` (deux couleurs, défaut vert → jaune ; la matière `webgl` réutilise sa palette), `label` (nom accessible, défaut `Assistant avatar`). `createLiveOrb` accepte les mêmes options ; `headRotation` est exporté depuis le module.
15
+
16
+ Le shell est republié pour embarquer cette version du styleguide.
17
+
18
+ ## 2.2.0
19
+
20
+ ### Minor Changes
21
+
22
+ - 1ffdcd4: `SectionSlot` : une page expose un slot d'extensions (`<SectionSlot name="home-sections" />`) et chaque app y branche sa propre `Section` depuis son `routes.json`. Les en-têtes de section sont **collants** : l'en-tête reste en haut de la zone de défilement tant que le corps de sa section est visible, puis la section suivante prend le relais. Le mode passe par des variables CSS héritées (`--section-header-position`, `--section-sticky-top`, `--section-sticky-z`, `--section-sticky-bg`), donc il traverse les parcels single-spa sans contexte React partagé.
23
+
24
+ `Section` gagne `stickyHeader`, `stickyOffset` et `stickyZIndex` (hérités du `SectionSlot` quand absents ; `stickyHeader={false}` pour s'en exempter). Nouveaux exports : `SectionSlot`, `SectionCard`, `SectionCardTitleButton`, `SECTION_CARD_CLASS`, `stickyStyleVars`, `STICKY_VARS`. Le shell est republié pour embarquer cette version du styleguide.
25
+
3
26
  ## 2.1.1
4
27
 
5
28
  ### Patch Changes
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- export type LiveOrbVariant = "white" | "black" | "webgl" | "custom";
1
+ import React from 'react';
2
+ export type LiveOrbVariant = 'white' | 'black' | 'webgl' | 'custom';
3
3
  export type LiveOrbOptions = {
4
4
  /** Material preset. Default `"white"`. */
5
5
  variant?: LiveOrbVariant;
@@ -9,10 +9,17 @@ export type LiveOrbOptions = {
9
9
  eyeColor?: string;
10
10
  /** Unlit wash stops — used when `variant="webgl"`. */
11
11
  colors?: string[];
12
- /** Eyes follow the pointer. Default `true`. */
12
+ /** The head turns and the eyes follow the pointer. Default `true`. */
13
13
  interactive?: boolean;
14
14
  /** Occasional blink. Default `true`. */
15
15
  blink?: boolean;
16
+ /** Glowing headphone ear-cups on both sides of the head. Default `true`. */
17
+ ears?: boolean;
18
+ /**
19
+ * Neon ring of the ear-cups: two hex stops blended around the ring.
20
+ * Default green → yellow (`variant="webgl"` reuses its own palette).
21
+ */
22
+ earColors?: string[];
16
23
  /** Fires when WebGL is ready (`true`) or torn down (`false`). */
17
24
  onHasGl?: (ok: boolean) => void;
18
25
  };
@@ -34,30 +41,43 @@ export declare const CUSTOM_DEFAULT: {
34
41
  };
35
42
  /** Violet / foam / dust-rose — stock unlit wash. */
36
43
  export declare const WEBGL_COLORS: string[];
37
- export declare function resolveVariant(variant: LiveOrbVariant, color?: string, eyeColor?: string, colors?: string[]): {
44
+ /** Neon ring of the ear-cups: green → yellow (measured on the EGEN mascot). */
45
+ export declare const EAR_COLORS: string[];
46
+ export declare function resolveVariant(variant: LiveOrbVariant, color?: string, eyeColor?: string, colors?: string[], earColors?: string[]): {
38
47
  body: string;
39
48
  eye: string;
40
49
  mode: number;
41
50
  palette: string[];
51
+ ear: string[];
42
52
  };
43
53
  export declare function fallbackFaceStyle(resolved: ReturnType<typeof resolveVariant>): {
44
54
  backgroundColor?: string;
45
55
  backgroundImage?: string;
46
56
  };
47
57
  /**
48
- * Evenly lit sphere with two capsule eyes that follow the pointer.
49
- * The orb stays put — only the gaze moves.
58
+ * Head → world rotation, column-major (what `uniformMatrix3fv` expects).
59
+ * Order: roll about the face axis, then nod (pitch), then turn (yaw) —
60
+ * so the head turns about the vertical axis, like a neck would.
61
+ */
62
+ export declare function headRotation(yaw: number, pitch: number, roll: number): Float32Array;
63
+ /**
64
+ * Evenly lit 3D head (Baymax-style): wide rounded skull, two oval eyes joined
65
+ * by a thin line, glowing headphone ear-cups. The head turns toward the
66
+ * pointer; eyes, line and ears are rigid with it, so they follow the surface.
50
67
  */
51
68
  export declare function createLiveOrb(canvas: HTMLCanvasElement, initial?: LiveOrbOptions): LiveOrbInstance | null;
52
- export type LiveOrbProps = Omit<LiveOrbOptions, "onHasGl"> & {
69
+ export type LiveOrbProps = Omit<LiveOrbOptions, 'onHasGl'> & {
53
70
  className?: string;
54
71
  /** Edge length in CSS pixels. Default `280`. */
55
72
  size?: number;
73
+ /** Accessible name. Default `"Assistant avatar"`. */
74
+ label?: string;
56
75
  };
57
76
  /**
58
- * Evenly lit sphere with two capsule eyes that follow the pointer.
59
- * The orb stays put — only the gaze moves.
77
+ * Evenly lit 3D head (Baymax-style): wide rounded skull, two oval eyes joined
78
+ * by a thin line, glowing headphone ear-cups. The head turns to follow the
79
+ * pointer. Falls back to a CSS head when WebGL is unavailable.
60
80
  */
61
- export declare function LiveOrb({ className, size, variant, color, eyeColor, colors, interactive, blink, }: LiveOrbProps): React.JSX.Element;
81
+ export declare function LiveOrb({ className, size, label, variant, color, eyeColor, colors, interactive, blink, ears, earColors, }: LiveOrbProps): React.JSX.Element;
62
82
  export default LiveOrb;
63
83
  //# sourceMappingURL=live-orb.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"live-orb.component.d.ts","sourceRoot":"","sources":["../../src/assistant/live-orb.component.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEpE,MAAM,MAAM,cAAc,GAAG;IAC3B,0CAA0C;IAC1C,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wCAAwC;IACxC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,iEAAiE;IACjE,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,CAAC,O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