@micheeeeel/yinyangapp 2.3.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,6 +26,9 @@ export interface YinYangMountConfig {
26
26
  minEdge?: number;
27
27
  borderAnimationDuration?: number;
28
28
  includeChildren?: boolean;
29
+ /** Mode PRÉSENTATION : le diagramme se lit, il ne se manœuvre pas — voir
30
+ * `IViewData.presentation`. Défaut : false (l'atelier complet). */
31
+ presentation?: boolean;
29
32
  }
30
33
  export interface YinYangMountHandle {
31
34
  controller: IYinYangController;
@@ -243,6 +243,10 @@ export declare class YinYangController implements IYinYangController {
243
243
  * switches facette. */
244
244
  private cachedGlobalFitShrinkRatio?;
245
245
  private computeGlobalFitShrinkRatio;
246
+ /** Mode PRÉSENTATION (voir `IViewData.presentation`) : le diagramme se lit,
247
+ * il ne se manœuvre pas. Lu sur la vue, donc hérité par les satellites —
248
+ * chacun porte la même `viewData.presentation`. */
249
+ private get isPresentation();
246
250
  applyChildrenFitScale(): void;
247
251
  /** Creates the facette image ring, sized from the room actually left between
248
252
  * the border and the container edge. Call after applyChildrenFitScale() so
@@ -642,12 +646,13 @@ export declare class YinYangController implements IYinYangController {
642
646
  /**
643
647
  * A satellite drill-down and facette-level ODD browsing are mutually
644
648
  * exclusive: deselect any active satellite before an ODD arc interaction
645
- * proceeds, so the panel falls back to a view that actually contains the
646
- * clicked ODD's legend chip (renderCuttingInfo/an active action only show
647
- * a single ODD, or none — toggleOddLegendChipById would otherwise silently
648
- * no-op). Mirrors the toggle-close branch of openActionMenuFromChild, plus
649
- * an explicit renderComposanteInfo (clearProjectedActionState alone falls
650
- * back to the Sphère card, not the Facette one).
649
+ * proceeds. The panel then falls back to the Facette card, which is the one
650
+ * that carries every ODD's legend chip (renderCuttingInfo/an active action
651
+ * only show a single ODD, or none) — so the chip reflecting the newly
652
+ * activated arc is actually there to be seen. Mirrors the toggle-close
653
+ * branch of openActionMenuFromChild, plus an explicit renderComposanteInfo
654
+ * (clearProjectedActionState alone falls back to the Sphère card, not the
655
+ * Facette one).
651
656
  */
652
657
  private deselectActiveChildForOddInteraction;
653
658
  /**
@@ -529,11 +529,11 @@ export declare class ForceFieldDetailsPanel {
529
529
  private getTargetName;
530
530
  private getGhostDetailsContainer;
531
531
  private getForceFieldDetailsContainer;
532
- /** Ouvre/ferme la description de cet ODD sous le descriptif actuellement
533
- * affiché (sphère/facette/satellite), comme un clic direct sur son chip
534
- * de légende. Retourne `null` si aucun chip pour cet ODD n'est visible
535
- * dans le contexte courant (no-op), sinon le nouvel état (ouvert/fermé). */
536
- toggleOddLegendChipById(oddId: string): boolean | null;
532
+ /** Reflète sur la pastille de légende l'état de l'ODD tel que le DIAGRAMME
533
+ * l'a décidé (clic sur l'arc). Le panneau suit : il n'est plus le
534
+ * déclencheur — un panneau absent, gelé ou affichant une autre carte ne
535
+ * doit pas empêcher l'arc de s'activer. */
536
+ setOddLegendChipOpenById(oddId: string, isOpen: boolean): void;
537
537
  clearGhostDetails(): void;
538
538
  /** Freeze the panel during a component switch so clearForceFieldDetails is a no-op. */
539
539
  freezeForSwitch(html: string): void;
@@ -146,9 +146,8 @@ export declare class BorderDrawer {
146
146
  /** Lifts the "voile terne" on one facette's image, veiling every other one
147
147
  * — only one can be unveiled at a time. Driven by the outer spark
148
148
  * sweeping across border arcs. Veils *all* others rather than just the
149
- * previously-tracked index, so this also correctly restores the
150
- * single-spotlight invariant the first time it's called after Idle
151
- * (where every image starts unveiled, not just one). */
149
+ * previously-tracked index, so the single-spotlight invariant holds
150
+ * whatever state the ring was left in. */
152
151
  revealFacetteImage(segmentIndex: number): void;
153
152
  /** Center + radius (pre-scale coordinate space) of a facette's image
154
153
  * thumbnail, so labels can be anchored onto the image instead of
@@ -172,13 +171,13 @@ export declare class BorderDrawer {
172
171
  * timers D3. */
173
172
  activateSegment(segmentIndex: number, immediate?: boolean): void;
174
173
  /** Resets all arc segments to inactive style (e.g. when satellites are
175
- * folded) and returns to Idle: every facette image goes back to full
176
- * color, exactly like a fresh load. */
174
+ * folded) and returns to Idle: every facette image goes back to black and
175
+ * white, exactly like a fresh load. */
177
176
  deactivateSegment(): void;
178
- /** Restores every facette image to full color — the Idle visual, reached
179
- * both at true init and whenever no facette is currently active (e.g.
180
- * after deselecting one via deactivateSegment). */
181
- revealAllFacetteImages(): void;
177
+ /** Veils every facette image — the Idle visual, reached both at true init
178
+ * and whenever no facette is currently active (e.g. after deselecting one
179
+ * via deactivateSegment): no arc is active, so no image is in color. */
180
+ veilAllFacetteImages(): void;
182
181
  /**
183
182
  * Highlights the source component border arc with a temporary beacon.
184
183
  * Used during a component switch when the active action has no visible force field.
@@ -176,7 +176,7 @@ export declare class ViewInitializer {
176
176
  /** Exponent (0-1) applied to each facette's weight ratio (its weight over
177
177
  * the heaviest facette's weight) before it scales the thumbnail radius:
178
178
  * radius = baseRadius * weightRatio^curve. 1 = linear (proportional to
179
- * weight, the default, and the strongest shrinkage). Below 1 attenuates
179
+ * weight, and the strongest shrinkage). Below 1 attenuates
180
180
  * the falloff — lighter facettes stay closer to full size — down to 0,
181
181
  * where every facette renders at the same full size regardless of weight. */
182
182
  facetteImageWeightCurve: number;
@@ -2,6 +2,15 @@ export interface IViewData {
2
2
  minEdge: number;
3
3
  containerId: string;
4
4
  borderAnimationDuration: number;
5
+ /** Mode PRÉSENTATION : le diagramme se lit, il ne se manœuvre pas. Les
6
+ * satellites et les arcs restent sélectionnables (et le diagramme reste
7
+ * vivant), mais l'OUTILLAGE du mode Stratégie ne se déploie pas —
8
+ * boutons d'action autour d'un satellite, menu radial des Événements
9
+ * Clés, champs de force, ghosts d'aperçu. Destiné aux hôtes qui montrent
10
+ * un diagramme dans un récit plutôt que dans l'atelier (voir
11
+ * `docs/integration-yvy-frontend.md`). Hérité par les satellites, qui
12
+ * sont eux-mêmes des contrôleurs complets. Défaut : false. */
13
+ presentation?: boolean;
5
14
  /** Poids de ce satellite relatif à la moyenne de sa fratrie (1 = moyenne),
6
15
  * déjà utilisé pour dériver minEdge dans YinYangController.createYinYangChildren.
7
16
  * Reporté ici tel quel pour que le satellite compense sa propre taille de
@@ -16,6 +16,10 @@ export declare function buildOddLegendHtmlForOdd(odd: ODD, composanteId: string)
16
16
  * Retourne le nouvel état (`true` = ouvert, `false` = refermé) pour que
17
17
  * l'appelant puisse répercuter ce même état ailleurs (ex : l'arc du
18
18
  * diagramme correspondant à cet ODD). */
19
+ /** Met la pastille DANS un état donné, au lieu de la basculer : le panneau
20
+ * REFLÈTE alors un état décidé ailleurs (l'arc du diagramme), il ne le
21
+ * décide pas. No-op si la pastille y est déjà. */
22
+ export declare function setOddLegendChipOpen(chip: HTMLElement, isOpen: boolean): void;
19
23
  export declare function toggleOddLegendChip(chip: HTMLElement): boolean;
20
24
  /** Attache le survol des chips `[data-odd-legend-chip]` d'un container à un
21
25
  * callback (id ODD survolé, ou `null` en sortie — accompagné de la composante
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micheeeeel/yinyangapp",
3
- "version": "2.3.0",
3
+ "version": "2.4.1",
4
4
  "description": "A program to visualize human activity balance to reach Sustainable Development Objectives",
5
5
  "main": "dist/bundle.js",
6
6
  "types": "dist/types/main.d.ts",