@micheeeeel/yinyangapp 1.0.6 → 2.0.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 +105 -0
- package/dist/bundle.js +2 -1
- package/dist/bundle.js.LICENSE.txt +1 -0
- package/dist/types/adapters/yinYangAdapter.d.ts +10 -0
- package/dist/types/animations/AnimationsMngr.d.ts +7 -19
- package/dist/types/api-film.d.ts +22 -0
- package/dist/types/api.d.ts +48 -0
- package/dist/types/benchmark/runner.d.ts +5 -0
- package/dist/types/benchmark/scenarios.d.ts +118 -0
- package/dist/types/components/action-image/ActionImageModal.d.ts +42 -0
- package/dist/types/components/controller/YinYangController.d.ts +946 -18
- package/dist/types/components/controller/action-stack/ActionStackController.d.ts +149 -0
- package/dist/types/components/controller/action-stack/ActionStackDragHandler.d.ts +111 -0
- package/dist/types/components/controller/action-stack/ActionStackManager.d.ts +118 -0
- package/dist/types/components/controller/action-stack/ActionStackState.d.ts +169 -0
- package/dist/types/components/controller/actions/ActionProjectionService.d.ts +73 -0
- package/dist/types/components/controller/actions/ChildActionMenuController.d.ts +83 -0
- package/dist/types/components/controller/actions/CoreEventMenuController.d.ts +90 -0
- package/dist/types/components/controller/actions/radialItemMenu.d.ts +117 -0
- package/dist/types/components/controller/children/ChildInteractionController.d.ts +38 -0
- package/dist/types/components/controller/children/ChildrenOrbitService.d.ts +14 -0
- package/dist/types/components/controller/force-field/EventFieldLifecycleController.d.ts +104 -0
- package/dist/types/components/controller/force-field/EventFieldRenderer.d.ts +86 -0
- package/dist/types/components/controller/force-field/ForceFieldComputationService.d.ts +50 -0
- package/dist/types/components/controller/force-field/ForceFieldDetailsPanel.d.ts +639 -0
- package/dist/types/components/controller/force-field/ForceFieldLifecycleController.d.ts +53 -0
- package/dist/types/components/controller/force-field/ForceFieldRenderer.d.ts +67 -0
- package/dist/types/components/controller/force-field/types.d.ts +42 -0
- package/dist/types/components/controller/labels/ChildScoresDeltaRenderer.d.ts +33 -0
- package/dist/types/components/controller/labels/ContextLabelsRenderer.d.ts +155 -0
- package/dist/types/components/controller/labels/WeightPreviewRingRenderer.d.ts +61 -0
- package/dist/types/components/controller/odd/ChildrenOrbitManager.d.ts +25 -0
- package/dist/types/components/controller/odd/OddViewManager.d.ts +44 -0
- package/dist/types/components/controller/search/SearchPanelSynchronizer.d.ts +125 -0
- package/dist/types/components/controller/settings/ControllerSettingsApplier.d.ts +50 -0
- package/dist/types/components/controller/state/BlockingAnimationTracker.d.ts +17 -0
- package/dist/types/components/controller/state/YinYangControllerState.d.ts +176 -0
- package/dist/types/components/controller/utils/actionStackMath.d.ts +13 -0
- package/dist/types/components/controller/utils/actionStackReorder.d.ts +7 -0
- package/dist/types/components/controller/utils/childrenOrbit.d.ts +18 -0
- package/dist/types/components/controller/utils/cuttingLabels.d.ts +9 -0
- package/dist/types/components/controller/utils/eventFieldStyle.d.ts +13 -0
- package/dist/types/components/controller/utils/eventFieldTargets.d.ts +47 -0
- package/dist/types/components/controller/utils/forceFieldMetadata.d.ts +4 -0
- package/dist/types/components/controller/utils/forceFieldPresentation.d.ts +9 -0
- package/dist/types/components/controller/utils/forceFieldStyle.d.ts +10 -0
- package/dist/types/components/controller/utils/labelGeometry.d.ts +5 -0
- package/dist/types/components/controller/utils/oddCutting.d.ts +2 -0
- package/dist/types/components/controller/utils/svgCoordinates.d.ts +9 -0
- package/dist/types/components/controller/utils/svgTransform.d.ts +5 -0
- package/dist/types/components/controller/utils/textLayout.d.ts +2 -0
- package/dist/types/components/controls/VizControlsPanel.d.ts +14 -0
- package/dist/types/components/factory/YinYangAppFactory.d.ts +4 -6
- package/dist/types/components/model/YinYangModel.d.ts +4 -30
- package/dist/types/components/panel/DiagramPanelBridge.d.ts +34 -0
- package/dist/types/components/panel/PanelManager.d.ts +150 -0
- package/dist/types/components/search/GlobalSearchController.d.ts +396 -0
- package/dist/types/components/stack-nav/StackNavOverlay.d.ts +82 -0
- package/dist/types/components/view/BorderDrawer.d.ts +203 -13
- package/dist/types/components/view/SpikeDrawer.d.ts +37 -31
- package/dist/types/components/view/ViewInitializer.d.ts +438 -2
- package/dist/types/components/view/YinYangDrawer.d.ts +414 -11
- package/dist/types/config/animationConfig.d.ts +37 -0
- package/dist/types/config/deltaColors.d.ts +64 -0
- package/dist/types/config/labelStyleConfig.d.ts +50 -0
- package/dist/types/data/OddCategoryColors.d.ts +12 -2
- package/dist/types/data/adverse-action-planner.d.ts +51 -0
- package/dist/types/data/adverse-action-planner.test.d.ts +1 -0
- package/dist/types/data/amplifier-engine.d.ts +107 -0
- package/dist/types/data/amplifier-engine.test.d.ts +1 -0
- package/dist/types/data/combo-engine.d.ts +94 -0
- package/dist/types/data/combo-engine.test.d.ts +1 -0
- package/dist/types/data/odd_generic_descriptions.d.ts +4 -0
- package/dist/types/data/odd_labels.d.ts +5 -0
- package/dist/types/data/yasuni_actions.d.ts +47 -0
- package/dist/types/data/yasuni_adverse_actions.d.ts +2 -0
- package/dist/types/data/yasuni_adverse_key_events.d.ts +2 -0
- package/dist/types/data/yasuni_cause.d.ts +33 -0
- package/dist/types/data/yasuni_graph.d.ts +22 -0
- package/dist/types/data/yasuni_key_events.d.ts +61 -0
- package/dist/types/data/yasuni_propagation_layers.d.ts +3 -0
- package/dist/types/interfaces/IActions.d.ts +1 -0
- package/dist/types/interfaces/ICauseGraph.d.ts +9 -0
- package/dist/types/interfaces/ICauseModel.d.ts +33 -0
- package/dist/types/interfaces/IGraphicsStrategy.d.ts +9 -5
- package/dist/types/interfaces/IPropagationLayers.d.ts +27 -0
- package/dist/types/interfaces/IViewData.d.ts +12 -0
- package/dist/types/interfaces/IYinYangAppFactory.d.ts +3 -3
- package/dist/types/interfaces/IYinYangController.d.ts +301 -6
- package/dist/types/interfaces/IYinYangGeometry.d.ts +43 -0
- package/dist/types/interfaces/IYinYangInternalModel.d.ts +34 -0
- package/dist/types/interfaces/IYinYangModel.d.ts +3 -11
- package/dist/types/main.d.ts +9 -0
- package/dist/types/utils/actionImages.d.ts +14 -0
- package/dist/types/utils/actionPropagation.d.ts +74 -0
- package/dist/types/utils/appMode.d.ts +5 -0
- package/dist/types/utils/causeGraph.d.ts +6 -0
- package/dist/types/utils/causeMetrics.d.ts +26 -0
- package/dist/types/utils/chainCardHeight.d.ts +27 -0
- package/dist/types/utils/d3/D3Element.d.ts +2 -2
- package/dist/types/utils/d3/D3GraphicsStrategy.d.ts +21 -4
- package/dist/types/utils/deltaChips.d.ts +15 -0
- package/dist/types/utils/deltaLabels.d.ts +54 -0
- package/dist/types/utils/facetteImages.d.ts +1 -0
- package/dist/types/utils/geometryUtils.d.ts +0 -1
- package/dist/types/utils/hierBadge.d.ts +44 -0
- package/dist/types/utils/idleSphereImage.d.ts +8 -0
- package/dist/types/utils/keyEventImages.d.ts +41 -0
- package/dist/types/utils/oddLegend.d.ts +30 -0
- package/dist/types/utils/positionalEfficiency.d.ts +16 -0
- package/dist/types/utils/yinYangWatermark.d.ts +29 -0
- package/package.json +27 -12
- package/dist/index.html +0 -1
- package/dist/types/data/coupe_rase_Orangs-outans/data_Kalimantan.d.ts +0 -3
- package/dist/types/data/coupe_rase_Orangs-outans/data_PT_Mayawana_Persada.d.ts +0 -3
- package/dist/types/data/data_institu_bancaire.d.ts +0 -3
- package/dist/types/interfaces/IOddItem.d.ts +0 -6
- package/dist/types/script.d.ts +0 -13
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { YinYangComponentNode, YinYangInternalModel, YinYangOddNode } from "../interfaces/IYinYangInternalModel";
|
|
2
|
+
import { Cause } from "../interfaces/ICauseModel";
|
|
3
|
+
export declare function mapCauseToInternalModel(cause: Cause): YinYangInternalModel;
|
|
4
|
+
/**
|
|
5
|
+
* Builds a single-component, single-odd, single-cutting internal model for a
|
|
6
|
+
* satellite child, preserving the parent odd's orientation/labels so the
|
|
7
|
+
* child renders identically to its parent component instead of falling back
|
|
8
|
+
* to legacy defaults.
|
|
9
|
+
*/
|
|
10
|
+
export declare function buildChildCuttingInternalModel(component: YinYangComponentNode, odd: YinYangOddNode, cuttingIndex: number, cuttingScore: number): YinYangInternalModel;
|
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
import { IYinYangController } from "../interfaces/IYinYangController";
|
|
2
2
|
export declare class AnimationsMngr {
|
|
3
|
-
private
|
|
4
|
-
constructor();
|
|
5
|
-
/**
|
|
6
|
-
* Subscribes a component (YinYangController) to the animation manager.
|
|
7
|
-
* Each component will have a specified rotation direction and duration.
|
|
8
|
-
*/
|
|
3
|
+
private subscriberMap;
|
|
9
4
|
subscribe(component: IYinYangController, clockWise?: boolean, time?: number): void;
|
|
10
|
-
/**
|
|
11
|
-
* Starts the animations for all subscribed components.
|
|
12
|
-
* Each component will rotate based on the specified direction and duration.
|
|
13
|
-
*/
|
|
14
5
|
startAll(): void;
|
|
15
|
-
|
|
16
|
-
* Reverts the rotation direction of a specific component and re-applies the animation.
|
|
17
|
-
* This will interrupt any ongoing animations and start a new one with the opposite direction.
|
|
18
|
-
*/
|
|
6
|
+
setRotationDuration(durationMs: number): void;
|
|
19
7
|
revertRotation(component: IYinYangController): void;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* The rotation applies to the entire group with the center of the large circle as the pivot.
|
|
23
|
-
* It also applies individual translations and rotations to the Yin and Yang parts.
|
|
24
|
-
*/
|
|
8
|
+
stopRotation(component: IYinYangController): void;
|
|
9
|
+
private resetRotationFrame;
|
|
25
10
|
animate(component: IYinYangController, clockWise: boolean, time?: number): void;
|
|
11
|
+
private startRotationLoop;
|
|
12
|
+
private applyRotationFrame;
|
|
13
|
+
private applyRotationToYinYangGroup;
|
|
26
14
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { YinYangData } from "./api";
|
|
2
|
+
export interface YinYangFilmConfig {
|
|
3
|
+
data: YinYangData;
|
|
4
|
+
/** Côté du SVG produit (px). */
|
|
5
|
+
size: number;
|
|
6
|
+
/** Durée d'un tour complet de l'étincelle. Défaut : 7000 ms. Surchargeable
|
|
7
|
+
* sans recuire via la variable CSS `--yy-rotation` sur le <svg> (ex. "9s"). */
|
|
8
|
+
rotationDurationMs?: number;
|
|
9
|
+
/** Durée réelle d'une bascule de composante. Défaut : animationConfig. */
|
|
10
|
+
switchDurationMs?: number;
|
|
11
|
+
/** Images échantillonnées par bascule (0 = switch immédiat). Défaut : 4. */
|
|
12
|
+
transitionFrames?: number;
|
|
13
|
+
spark?: {
|
|
14
|
+
color?: string;
|
|
15
|
+
strokeWidth?: number;
|
|
16
|
+
lengthRatio?: number;
|
|
17
|
+
};
|
|
18
|
+
/** Retire les <text> (titres) — inutiles à petite taille. Défaut : true. */
|
|
19
|
+
stripText?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** Cuit un tour complet et renvoie un <svg> autonome (keyframes inlinées). */
|
|
22
|
+
export declare function createYinYangFilmSvg(config: YinYangFilmConfig): SVGSVGElement;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { IViewData } from "./interfaces/IViewData";
|
|
2
|
+
import type { IYinYangController } from "./interfaces/IYinYangController";
|
|
3
|
+
import type { YinYangInternalModel } from "./interfaces/IYinYangInternalModel";
|
|
4
|
+
import type { Cause } from "./interfaces/ICauseModel";
|
|
5
|
+
export type { IViewData } from "./interfaces/IViewData";
|
|
6
|
+
export type { IYinYangController } from "./interfaces/IYinYangController";
|
|
7
|
+
export type { Cause, CauseComponent, CauseOdd, CauseOddCutting, } from "./interfaces/ICauseModel";
|
|
8
|
+
export type { YinYangInternalModel, YinYangComponentNode, YinYangOddNode, YinYangCuttingNode, YinYangCategorySlice, YinYangOrientation, } from "./interfaces/IYinYangInternalModel";
|
|
9
|
+
export { mapCauseToInternalModel } from "./adapters/yinYangAdapter";
|
|
10
|
+
/** Données acceptées : soit une `Cause` (format métier), soit le modèle interne déjà adapté. */
|
|
11
|
+
export type YinYangData = Cause | YinYangInternalModel;
|
|
12
|
+
export interface YinYangSvgConfig {
|
|
13
|
+
data: YinYangData;
|
|
14
|
+
/** `containerId` est optionnel : un id unique est généré si absent. */
|
|
15
|
+
viewData: Partial<Omit<IViewData, "minEdge">> & {
|
|
16
|
+
minEdge: number;
|
|
17
|
+
};
|
|
18
|
+
/** Crée aussi les satellites (facettes). Défaut : true. */
|
|
19
|
+
includeChildren?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface YinYangMountConfig {
|
|
22
|
+
data: YinYangData;
|
|
23
|
+
/** Élément DOM (ou son id) déjà présent dans la page, dimensionné par l'hôte. */
|
|
24
|
+
container: HTMLElement | string;
|
|
25
|
+
/** Défaut : min(largeur, hauteur) du conteneur. */
|
|
26
|
+
minEdge?: number;
|
|
27
|
+
borderAnimationDuration?: number;
|
|
28
|
+
includeChildren?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface YinYangMountHandle {
|
|
31
|
+
controller: IYinYangController;
|
|
32
|
+
/** Vide le conteneur. */
|
|
33
|
+
destroy(): void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Monte un diagramme vivant (interactif) dans un conteneur fourni par l'hôte.
|
|
37
|
+
* À appeler côté client uniquement (accès au DOM).
|
|
38
|
+
*/
|
|
39
|
+
export declare function mountYinYang(config: YinYangMountConfig): YinYangMountHandle;
|
|
40
|
+
/**
|
|
41
|
+
* Rend un diagramme hors écran et renvoie un clone détaché du `<svg>` produit,
|
|
42
|
+
* que l'hôte injecte où il veut (ex. `ref.current.appendChild(svg)` en React).
|
|
43
|
+
*/
|
|
44
|
+
export declare function createYinYangSvg(config: YinYangSvgConfig): SVGSVGElement | null;
|
|
45
|
+
/** Variante en lot : une seule zone hors écran pour tous les rendus. */
|
|
46
|
+
export declare function createYinYangSvgs(configs: YinYangSvgConfig[]): (SVGSVGElement | null)[];
|
|
47
|
+
export { createYinYangFilmSvg } from "./api-film";
|
|
48
|
+
export type { YinYangFilmConfig } from "./api-film";
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scenario 1 — Large dataset initialization.
|
|
3
|
+
*
|
|
4
|
+
* Creates a full Yasuni instance (6 composantes, ~30 ODDs, ~120 cuttings) and
|
|
5
|
+
* renders all orbit children via the real factory/controller pipeline.
|
|
6
|
+
* Measures the synchronous initialization cost: SVG group creation, arc
|
|
7
|
+
* geometry, gradient/mask defs, and the full children orbit setup.
|
|
8
|
+
*
|
|
9
|
+
* Performance measure name: "bm-large"
|
|
10
|
+
*/
|
|
11
|
+
export declare function runLargeDatasetScenario(): Promise<void>;
|
|
12
|
+
export interface ComponentSwitchHooks {
|
|
13
|
+
onSwitchStart?: () => void;
|
|
14
|
+
onSwitchEnd?: () => void;
|
|
15
|
+
}
|
|
16
|
+
export interface ForceFieldHooks {
|
|
17
|
+
onSteadyStateStart?: () => void;
|
|
18
|
+
onSteadyStateEnd?: () => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Scenario 2 — Component switch animation.
|
|
22
|
+
*
|
|
23
|
+
* Navigates sequentially through all 6 Yasuni composantes via
|
|
24
|
+
* searchNavigateToComponent(), letting each 800 ms animation complete before
|
|
25
|
+
* triggering the next. Measures the cumulative per-frame cost of arc-geometry
|
|
26
|
+
* recalculation and RGB colour interpolation across a full cycle.
|
|
27
|
+
*
|
|
28
|
+
* hooks.onSwitchStart / onSwitchEnd fire around each 800 ms animation window
|
|
29
|
+
* (not the 100 ms inter-switch buffer), allowing the caller to measure FPS
|
|
30
|
+
* only during active animation rather than idle sleep time.
|
|
31
|
+
*
|
|
32
|
+
* Performance measure name: "bm-switch"
|
|
33
|
+
*/
|
|
34
|
+
export declare function runComponentSwitchScenario(hooks?: ComponentSwitchHooks): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Scenario 3 — Rotation animation.
|
|
37
|
+
*
|
|
38
|
+
* Starts the continuous rotation animation (AnimationsMngr RAF loop) on a
|
|
39
|
+
* full Yasuni instance including orbit children, and lets it run for
|
|
40
|
+
* TRANSITION_DURATION_MS. Measures per-frame cost: Yin/Yang orbital math,
|
|
41
|
+
* SVG transform updates for parent + all children.
|
|
42
|
+
*
|
|
43
|
+
* Performance measure name: "bm-transition"
|
|
44
|
+
*/
|
|
45
|
+
export declare function runTransitionScenario(): Promise<void>;
|
|
46
|
+
export interface BaselineHooks {
|
|
47
|
+
onMeasureStart?: () => void;
|
|
48
|
+
onMeasureEnd?: () => void;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Scenario — Baseline (pivot).
|
|
52
|
+
*
|
|
53
|
+
* Controller + satellites en état idle : aucune action activée, aucune rotation,
|
|
54
|
+
* aucun champ de force. Seuls les RAF loops systèmes tournent en arrière-plan
|
|
55
|
+
* (ghost pulse, outer spark, cycle couleurs de bordure).
|
|
56
|
+
*
|
|
57
|
+
* Sert de référence directe pour quantifier le surcoût de chaque autre scénario :
|
|
58
|
+
* (forceField.avgFps - baseline.avgFps) = coût pur du champ de force.
|
|
59
|
+
*
|
|
60
|
+
* Performance measure name: "bm-baseline"
|
|
61
|
+
*/
|
|
62
|
+
export declare function runBaselineScenario(hooks?: BaselineHooks): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Scenario 4 — forceFieldNav : activation via la pile de navigation complète.
|
|
65
|
+
*
|
|
66
|
+
* Appelle searchNavigateToAction(0, "ODD_15", 0, "gen_bhf_moratoire_infra").
|
|
67
|
+
* Cette voie active le champ de force ET les panneaux UI (menu d'action, panneau
|
|
68
|
+
* cutting/action detail) qui ont leurs propres cycles d'animation. setupMs mesure
|
|
69
|
+
* donc la navigation + build() + ensureElements(), pas le build() seul.
|
|
70
|
+
*
|
|
71
|
+
* Scénario "production" : reflète le coût réel ressenti par l'utilisateur.
|
|
72
|
+
* Comparer avgFrameMsVsBaseline avec forceFieldDirect pour isoler le surcoût
|
|
73
|
+
* des panneaux UI par rapport au champ de force seul.
|
|
74
|
+
*
|
|
75
|
+
* Performance measure names: "bm-forcefield-nav-setup", "bm-forcefield-nav"
|
|
76
|
+
*/
|
|
77
|
+
export declare function runForceFieldNavScenario(hooks?: ForceFieldHooks): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* Scenario 5 — forceFieldDirect : activation directe, source unique, sans UI.
|
|
80
|
+
*
|
|
81
|
+
* Appelle activateForceFieldMultiSource([ODD_15/cut0]) directement, sans passer
|
|
82
|
+
* par la pile de navigation. Aucun panneau de détail, aucun menu d'action :
|
|
83
|
+
* seul le RAF loop du champ de force est actif pendant la mesure steady-state.
|
|
84
|
+
*
|
|
85
|
+
* Référence pure : avgFrameMsVsBaseline mesure uniquement le coût du pipeline
|
|
86
|
+
* de rendu (pulse, dashoffset, gradient cache) — sans le bruit des animations UI.
|
|
87
|
+
* setupMs = 1× build() + ensureElements() + premier updateVisual().
|
|
88
|
+
*
|
|
89
|
+
* Comparer avec forceFieldNav pour isoler le surcoût des panneaux UI.
|
|
90
|
+
* Comparer avec forceFieldMerged pour mesurer le coût marginal des 2 sources
|
|
91
|
+
* supplémentaires après fusion.
|
|
92
|
+
*
|
|
93
|
+
* Performance measure names: "bm-forcefield-direct-setup", "bm-forcefield-direct"
|
|
94
|
+
*/
|
|
95
|
+
export declare function runForceFieldDirectScenario(hooks?: ForceFieldHooks): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Scenario 6 — forceFieldMerged : 3 sources simultanées, activation directe.
|
|
98
|
+
*
|
|
99
|
+
* Appelle activateForceFieldMultiSource() avec 3 sources sur composante 0 :
|
|
100
|
+
* - ODD_15 cut0 (Corridors brisés)
|
|
101
|
+
* - ODD_6 cut0 (Pipelines qui fuient dans les rivières)
|
|
102
|
+
* - ODD_3 cut0 (Maladies de peau en hausse)
|
|
103
|
+
*
|
|
104
|
+
* Même voie d'activation que forceFieldDirect (sans panneaux UI), mais 3× sources.
|
|
105
|
+
* Les liens cross-composante des 3 sources partagent le même targetComponentId
|
|
106
|
+
* → _computeMergedSegments() les fusionne : N×3 layer groups → N par composante
|
|
107
|
+
* externe, réduisant les passes GPU drop-shadow proportionnellement.
|
|
108
|
+
*
|
|
109
|
+
* setupMs = 3× build() + ensureElements(N fusionnés) + premier updateVisual().
|
|
110
|
+
* duration = régime établi (3 s), directement comparable à forceFieldDirect.
|
|
111
|
+
*
|
|
112
|
+
* Comparaison clé : forceFieldMerged.avgFrameMsVsBaseline vs forceFieldDirect.avgFrameMsVsBaseline
|
|
113
|
+
* = coût marginal réel des 2 sources supplémentaires après fusion des segments.
|
|
114
|
+
* Si les deux valeurs sont proches → la fusion absorbe le surcoût des sources additionnelles.
|
|
115
|
+
*
|
|
116
|
+
* Performance measure names: "bm-forcefield-merged-setup", "bm-forcefield-merged"
|
|
117
|
+
*/
|
|
118
|
+
export declare function runForceFieldMergedScenario(hooks?: ForceFieldHooks): Promise<void>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Popup plein écran affichant la version Full (HD) d'une vignette de carte.
|
|
3
|
+
* Singleton monté une fois : un seul <img> réutilisé (src remplacé à
|
|
4
|
+
* chaque ouverture) pour ne jamais garder plus d'une image HD en mémoire.
|
|
5
|
+
*
|
|
6
|
+
* Ouverture par délégation d'événements sur `document` : toute vignette
|
|
7
|
+
* ajoutée après coup (re-render innerHTML) est cliquable sans re-binding.
|
|
8
|
+
*
|
|
9
|
+
* Deux contrats reconnus, résolus par _resolveZoomTarget :
|
|
10
|
+
* - `.action-thumb[data-action-id]` — vignette d'action, dont le Full et le
|
|
11
|
+
* libellé se déduisent du catalogue ;
|
|
12
|
+
* - `[data-full-src]` (+ `data-caption`) — contrat neutre pour tout ce qui
|
|
13
|
+
* n'est pas une action et porte donc sa propre image : carte Événement
|
|
14
|
+
* Clé aujourd'hui (voir ForceFieldDetailsPanel.buildKeyEventCardHtml), un
|
|
15
|
+
* autre type de carte demain, sans rien changer ici.
|
|
16
|
+
*/
|
|
17
|
+
export declare class ActionImageModal {
|
|
18
|
+
private readonly overlayEl;
|
|
19
|
+
private readonly imgEl;
|
|
20
|
+
private readonly captionEl;
|
|
21
|
+
private isOpen;
|
|
22
|
+
private readonly _preloaded;
|
|
23
|
+
private _outsideClickHandler;
|
|
24
|
+
private _keyHandler;
|
|
25
|
+
private _dragState;
|
|
26
|
+
constructor();
|
|
27
|
+
/** Vignette cliquable la plus proche de `el`, résolue en (Full, légende). */
|
|
28
|
+
private _resolveZoomTarget;
|
|
29
|
+
private _bindGlobalListeners;
|
|
30
|
+
/**
|
|
31
|
+
* Certaines cartes superposent leurs liens de propagation (.ff-card-steps)
|
|
32
|
+
* en surimpression de la vignette, dans un bandeau ancré en bas et scrollable
|
|
33
|
+
* (.ff-card-steps-overlay) — voir ForceFieldDetailsPanel._renderChainCardHtml.
|
|
34
|
+
* Comme ce bandeau couvre toute l'image, il faut distinguer soi-même un clic
|
|
35
|
+
* (ouvrir la popup HD) d'un glissé (faire défiler les liens par-dessus l'image) :
|
|
36
|
+
* un clic natif sur ce calque n'atteint jamais l'<img> qu'il recouvre.
|
|
37
|
+
*/
|
|
38
|
+
private _bindCardStepsOverlayDrag;
|
|
39
|
+
private _preloadFull;
|
|
40
|
+
open(fullSrc: string, caption: string): void;
|
|
41
|
+
close(): void;
|
|
42
|
+
}
|