@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
|
@@ -1,22 +1,317 @@
|
|
|
1
|
-
import { IOddItem } from "../interfaces/IOddItem";
|
|
2
1
|
import { IYinYangAppFactory } from "./IYinYangAppFactory";
|
|
3
|
-
import { ICategory } from "./ICategory";
|
|
4
2
|
import { IYinYangModel } from "./IYinYangModel";
|
|
5
3
|
import { IYinYangView } from "./IYinYangView";
|
|
6
4
|
import { IAnimator } from "./IAnimator";
|
|
5
|
+
import { YinYangInternalModel } from "./IYinYangInternalModel";
|
|
6
|
+
import { ForceFieldLinkDetail } from "../components/controller/force-field/types";
|
|
7
7
|
export interface IYinYangController {
|
|
8
8
|
model: IYinYangModel;
|
|
9
9
|
view: IYinYangView;
|
|
10
10
|
factory: IYinYangAppFactory;
|
|
11
11
|
animator: IAnimator;
|
|
12
12
|
createYinYangChildren(): void;
|
|
13
|
+
clearForceFieldDetails(): void;
|
|
14
|
+
applyChildrenFitScale(): void;
|
|
15
|
+
setChildrenEnabled(isEnabled: boolean): void;
|
|
16
|
+
setChildrenOrbitEnabled(isEnabled: boolean): void;
|
|
17
|
+
setChildrenOrbitDuration(durationMs: number): void;
|
|
18
|
+
setChildrenOrbitSpeed(speed: number): void;
|
|
19
|
+
setChildrenOrbitRadiusScale(scale: number): void;
|
|
20
|
+
animateChildrenHide(): void;
|
|
21
|
+
handleComponentSwitchChildren(): void;
|
|
22
|
+
/** Registers an in-progress animation (rotation, facette/ODD switch, ...)
|
|
23
|
+
* that should block ghost display while active. Returns a token to pass
|
|
24
|
+
* to endBlockingAnimation() once the animation completes. */
|
|
25
|
+
beginBlockingAnimation(label: string): symbol;
|
|
26
|
+
/** Releases a token obtained from beginBlockingAnimation(). */
|
|
27
|
+
endBlockingAnimation(token: symbol): void;
|
|
28
|
+
/** Whether any animation registered via beginBlockingAnimation is still running. */
|
|
29
|
+
hasActiveBlockingAnimation(): boolean;
|
|
30
|
+
cancelOuterSparkForActivation(): void;
|
|
31
|
+
prepareForComponentSwitch(targetComponentId: string): void;
|
|
13
32
|
getBorderNb(): number;
|
|
14
|
-
|
|
15
|
-
getCategories(): ICategory[];
|
|
33
|
+
getInternalModel(): YinYangInternalModel;
|
|
16
34
|
getKey(): string;
|
|
17
35
|
getParentKey(): string | null;
|
|
18
|
-
getIsEnemy(): boolean;
|
|
19
|
-
calculateAverageScore(): number;
|
|
20
36
|
generateChildKey(): string;
|
|
21
37
|
InitializeAnimations(): void;
|
|
38
|
+
highlightOddInChildren(oddId: string | null): void;
|
|
39
|
+
refreshWeightPreviewPulse(): void;
|
|
40
|
+
enterOddView(oddId: string): void;
|
|
41
|
+
exitOddView(): void;
|
|
42
|
+
cancelOddHighlight(): void;
|
|
43
|
+
/** Shows ODD name + description in the details panel (called on ODD arc click). */
|
|
44
|
+
showOddInfo(oddId: string): void;
|
|
45
|
+
/** Shows Composante name + description in the details panel (called on title/legend click). */
|
|
46
|
+
showComposanteInfo(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Sets the number of random force fields (for UI control).
|
|
49
|
+
*/
|
|
50
|
+
setRandomForceFieldCount(count: number): void;
|
|
51
|
+
/**
|
|
52
|
+
* Shows or hides action delta labels next to impacted children.
|
|
53
|
+
*/
|
|
54
|
+
setActionDeltaLabelsVisible(isVisible: boolean): void;
|
|
55
|
+
/**
|
|
56
|
+
* Shows or hides children context labels.
|
|
57
|
+
*/
|
|
58
|
+
setChildrenContextLabelsVisible(isVisible: boolean): void;
|
|
59
|
+
/**
|
|
60
|
+
* Lève le plafond à 1 sur le ratio de performance des prérequis
|
|
61
|
+
* déclencheurs (combos non dangereux), autorisant une cascade de combos à
|
|
62
|
+
* dépasser ×2.
|
|
63
|
+
*/
|
|
64
|
+
setComboUncappedChainedPerformance(isEnabled: boolean): void;
|
|
65
|
+
/**
|
|
66
|
+
* Permet à un combo dangereux de devenir un bonus net : lève le plafond à
|
|
67
|
+
* 1 sur le ratio de performance des prérequis protecteurs, autorisant
|
|
68
|
+
* m = avgRatio à dépasser ×1.
|
|
69
|
+
*/
|
|
70
|
+
setComboDangerousCanBecomeBonus(isEnabled: boolean): void;
|
|
71
|
+
/**
|
|
72
|
+
* Sets shared font scale for labels.
|
|
73
|
+
*/
|
|
74
|
+
setLabelsFontScale(scale: number): void;
|
|
75
|
+
/**
|
|
76
|
+
* Enables/disables text shadow under labels.
|
|
77
|
+
*/
|
|
78
|
+
setLabelsTextShadowEnabled(isEnabled: boolean): void;
|
|
79
|
+
/**
|
|
80
|
+
* Positions child short label above or below each child.
|
|
81
|
+
*/
|
|
82
|
+
setChildLabelPlacement(position: "top" | "bottom"): void;
|
|
83
|
+
/**
|
|
84
|
+
* Shows or hides ODD labels rendered inside Yin/Yang arcs.
|
|
85
|
+
*/
|
|
86
|
+
setOddContextLabelsVisible(isVisible: boolean): void;
|
|
87
|
+
/**
|
|
88
|
+
* Shows or hides all label types at once (action deltas, children labels).
|
|
89
|
+
* ODD labels remain visible but switch between compact ("ODD4") and full label format.
|
|
90
|
+
*/
|
|
91
|
+
setAllLabelsVisible(isVisible: boolean): void;
|
|
92
|
+
/**
|
|
93
|
+
* Switches ODD arc labels between compact ("ODD4") and full label text.
|
|
94
|
+
* Compact mode is used when the global labels toggle is off.
|
|
95
|
+
*/
|
|
96
|
+
setOddLabelsCompact(compact: boolean): void;
|
|
97
|
+
/**
|
|
98
|
+
* Sets radial offset multiplier for child action menu items distance.
|
|
99
|
+
*/
|
|
100
|
+
setChildActionMenuItemDistance(distance: number): void;
|
|
101
|
+
/**
|
|
102
|
+
* Sets size scale for child action menu items.
|
|
103
|
+
*/
|
|
104
|
+
setChildActionMenuItemScale(scale: number): void;
|
|
105
|
+
/**
|
|
106
|
+
* Sets font scale for child action menu item icons.
|
|
107
|
+
*/
|
|
108
|
+
setChildActionIconFontScale(scale: number): void;
|
|
109
|
+
/**
|
|
110
|
+
* Fine (px) adjustment of the Key Event radial menu buttons' distance,
|
|
111
|
+
* layered on top of the auto-computed base distance.
|
|
112
|
+
*/
|
|
113
|
+
setCoreEventMenuDistanceOffset(offset: number): void;
|
|
114
|
+
setCoreEventMenuItemScale(scale: number): void;
|
|
115
|
+
setCoreEventIconFontScale(scale: number): void;
|
|
116
|
+
/**
|
|
117
|
+
* Sets maximum number of lines for child labels (1-3).
|
|
118
|
+
*/
|
|
119
|
+
setChildLabelMaxLines(lines: number): void;
|
|
120
|
+
/**
|
|
121
|
+
* Sets maximum number of lines for ODD arc labels (1-3).
|
|
122
|
+
*/
|
|
123
|
+
setOddLabelMaxLines(lines: number): void;
|
|
124
|
+
setLabelShortMaxChars(chars: number): void;
|
|
125
|
+
isChildrenEnabled(): boolean;
|
|
126
|
+
isActionActive(): boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Sets font scale for action stack item labels.
|
|
129
|
+
*/
|
|
130
|
+
setActionStackLabelFontScale(scale: number): void;
|
|
131
|
+
/**
|
|
132
|
+
* Sets the size scale for the undo/redo/clear-all history buttons.
|
|
133
|
+
*/
|
|
134
|
+
setActionStackHistoryButtonScale(scale: number): void;
|
|
135
|
+
/**
|
|
136
|
+
* Sets font scale for component/child context labels.
|
|
137
|
+
*/
|
|
138
|
+
setComponentLabelFontScale(scale: number): void;
|
|
139
|
+
/**
|
|
140
|
+
* Sets font scale for children état and delta labels.
|
|
141
|
+
*/
|
|
142
|
+
setChildStateDeltaFontScale(scale: number): void;
|
|
143
|
+
/**
|
|
144
|
+
* Sets the distance offset between child circle and état/delta labels.
|
|
145
|
+
*/
|
|
146
|
+
setChildStateDeltaOffset(offset: number): void;
|
|
147
|
+
/**
|
|
148
|
+
* Sets the scale factor for the selection highlight box around état/delta labels.
|
|
149
|
+
*/
|
|
150
|
+
setChildStateDeltaBoxScale(scale: number): void;
|
|
151
|
+
/**
|
|
152
|
+
* Sets font scale for ODD arc labels.
|
|
153
|
+
*/
|
|
154
|
+
setOddLabelFontScale(scale: number): void;
|
|
155
|
+
/**
|
|
156
|
+
* Sets font scale for the facette score/weight labels in the main circle.
|
|
157
|
+
*/
|
|
158
|
+
setFacetteLabelFontScale(scale: number): void;
|
|
159
|
+
/**
|
|
160
|
+
* Shows/hides the "/max" suffix on the facette score/weight labels.
|
|
161
|
+
*/
|
|
162
|
+
setFacetteLabelSuffixVisible(isVisible: boolean): void;
|
|
163
|
+
/**
|
|
164
|
+
* Sets font scale for deployed component legend labels.
|
|
165
|
+
*/
|
|
166
|
+
setComponentLegendLabelFontScale(scale: number): void;
|
|
167
|
+
/**
|
|
168
|
+
* Enables or disables the dark background frame on deployed labels.
|
|
169
|
+
*/
|
|
170
|
+
setLegendLabelsBgEnabled(enabled: boolean): void;
|
|
171
|
+
/**
|
|
172
|
+
* Enables or disables ellipsis for short labels.
|
|
173
|
+
*/
|
|
174
|
+
setDisplayEllipsisForShortLabels(enabled: boolean): void;
|
|
175
|
+
/** Handles a composante click from the Recherche tab — mirrors border arc click logic. */
|
|
176
|
+
searchHandleComposanteClick(componentIndex: number): void;
|
|
177
|
+
/** Navigates the diagram to a composante (no stack insertion). */
|
|
178
|
+
searchNavigateToComponent(componentIndex: number): void;
|
|
179
|
+
/** Navigates the diagram into ODD view (switching component if needed, no stack insertion). */
|
|
180
|
+
searchNavigateToOdd(componentIndex: number, oddId: string): void;
|
|
181
|
+
/** Highlights the ODD arc without entering ODD view (switching component if needed, no stack insertion). */
|
|
182
|
+
searchHighlightOdd(componentIndex: number, oddId: string): void;
|
|
183
|
+
/** Handles an ODD arc click from the Recherche tab — mirrors onDiagramOddArcClicked logic. */
|
|
184
|
+
searchHandleOddArcClick(componentIndex: number, oddId: string): void;
|
|
185
|
+
/** Mirrors a RECHERCHE legend chip's open/closed state onto its arc in the diagram. */
|
|
186
|
+
searchActivateOdd(componentIndex: number, oddId: string, isOpen: boolean): void;
|
|
187
|
+
/** Handles a cutting click from the Recherche tab — mirrors onUserCuttingClicked logic. */
|
|
188
|
+
searchHandleCuttingClick(componentIndex: number, oddId: string, cuttingIndex: number): void;
|
|
189
|
+
/** Navigates the diagram to a specific cutting (switching component if needed, no stack insertion).
|
|
190
|
+
* @param forceOpen Land on this cutting in its open state even if its menu is already
|
|
191
|
+
* flagged active — used by history replay so back/forward never toggles it closed. */
|
|
192
|
+
searchNavigateToCutting(componentIndex: number, oddId: string, cuttingIndex: number, forceOpen?: boolean): void;
|
|
193
|
+
/** Navigates to a cutting and activates an action to show force fields (no stack insertion). */
|
|
194
|
+
searchNavigateToAction(componentIndex: number, oddId: string, cuttingIndex: number, actionId: string): void;
|
|
195
|
+
/** Re-shows a Key Event's descriptive card (preview only, no stack insertion). */
|
|
196
|
+
searchNavigateToKeyEvent(keyEventId: string): void;
|
|
197
|
+
/** Restores the diagram to show a specific action's force field (history restore).
|
|
198
|
+
* Unlike searchNavigateToAction, never toggles off if the action is already active. */
|
|
199
|
+
restoreActionDiagramState(componentIndex: number, oddId: string, cuttingIndex: number, actionId: string): void;
|
|
200
|
+
/**
|
|
201
|
+
* Activates force fields for multiple simultaneous sources on the current composante.
|
|
202
|
+
* Each source is identified by its ODD id and cutting index (0-based array position).
|
|
203
|
+
* Links from all sources are computed, then _computeMergedSegments() merges overlapping
|
|
204
|
+
* segments (same startIndex→endIndex) into a single layer group with cumulative potentialGain.
|
|
205
|
+
*
|
|
206
|
+
* Used by the benchmark to simulate a multi-action stack without drag-and-drop interaction.
|
|
207
|
+
*/
|
|
208
|
+
activateForceFieldMultiSource(sources: Array<{
|
|
209
|
+
oddId: string;
|
|
210
|
+
cuttingIndex: number;
|
|
211
|
+
}>): void;
|
|
212
|
+
/** Starts a drag-to-stack interaction from a search action row. */
|
|
213
|
+
startSearchActionDrag(componentIndex: number, oddId: string, cuttingIndex: number, actionId: string, label: string, startEvent: PointerEvent, sourceEl: Element, onDragIntentDetected?: () => void): void;
|
|
214
|
+
/** Starts a drag-to-stack interaction from a search key event row. */
|
|
215
|
+
startSearchKeyEventDrag(componentIndex: number, keyEventId: string, label: string, startEvent: PointerEvent, sourceEl: Element, onDragIntentDetected?: () => void): void;
|
|
216
|
+
/**
|
|
217
|
+
* Wires a callback for opening the search tab with a query string.
|
|
218
|
+
* Called from main.ts after globalSearch is set up.
|
|
219
|
+
*/
|
|
220
|
+
setOpenSearchWithQuery(cb: (query: string) => void): void;
|
|
221
|
+
/** Wires a callback fired when the user starts dragging an action from the diagram. */
|
|
222
|
+
setOnDiagramActionDragIntent(cb: () => void): void;
|
|
223
|
+
/** Fires whenever the active satellite (child) changes — including deselection. */
|
|
224
|
+
setOnActiveChildChange(cb: () => void): void;
|
|
225
|
+
/** Returns the ODD id, cutting index, and component id of the currently active satellite, or null if none. */
|
|
226
|
+
getActiveChildMeta(): {
|
|
227
|
+
oddId: string;
|
|
228
|
+
cuttingIndex: number;
|
|
229
|
+
componentId: string;
|
|
230
|
+
} | null;
|
|
231
|
+
/** Wires a callback to locate a stack item in the Recherche panel when the user clicks its magnifier icon. */
|
|
232
|
+
setOnLocateStackItemInSearch(cb: (componentId: string, oddId: string, cuttingIndex: number, actionId: string, kind: "action" | "keyEvent") => void): void;
|
|
233
|
+
/** Wires a callback to auto-select a stack item's carrier satellite (action) — or
|
|
234
|
+
* its origin Facette (Key Event, empty oddId) — in the diagram when the user
|
|
235
|
+
* clicks its label. Stays on the current tab (STACK), unlike
|
|
236
|
+
* setOnLocateStackItemInSearch which switches to Recherche. */
|
|
237
|
+
setOnSelectStackItemSatellite(cb: (componentId: string, oddId: string, cuttingIndex: number, stackItemId: string) => void): void;
|
|
238
|
+
/** Centers (animated scroll) the "Effets cumulés" block matching this stack item,
|
|
239
|
+
* once it appears in the panel — see ForceFieldDetailsPanel.requestScrollToStackItemBlock. */
|
|
240
|
+
requestScrollToStackItemBlock(stackItemId: string): void;
|
|
241
|
+
/** Wires callbacks to show/clear the direct action impact block in the Recherche tab. */
|
|
242
|
+
setOnDirectActionBlock(show: (compId: string, oddId: string, cutIdx: number, actionId: string, cardsHtml: string, attachHandlers: (container: HTMLElement) => void) => void, clear: () => void): void;
|
|
243
|
+
/** Wires callbacks to show/clear a Key Event's descriptive card in the Recherche tab. */
|
|
244
|
+
setOnShowKeyEventBlock(show: (compId: string, keyEventId: string, cardsHtml: string, attachHandlers: (container: HTMLElement) => void) => void, clear: () => void): void;
|
|
245
|
+
/** Wires a callback to display a prereq action's direct action block in Panel B. */
|
|
246
|
+
setOnDirectActionBlockPanelB(show: (compId: string, oddId: string, cutIdx: number, actionId: string, cardsHtml: string, attachHandlers: (container: HTMLElement) => void) => void): void;
|
|
247
|
+
showPropagationForContextCutting(componentId: string, oddId: string, cuttingIndex: number): boolean;
|
|
248
|
+
buildDirectActionBlockForContext(compId: string, oddId: string, cutIdx: number, actionId: string, onReady: (compId: string, oddId: string, cutIdx: number, actionId: string, html: string, attachHandlers: (container: HTMLElement) => void) => void): void;
|
|
249
|
+
/** Wires callbacks to show/clear the propagated action block in the Recherche tab. */
|
|
250
|
+
setOnPropagationBlock(show: (compId: string, oddId: string, cutIdx: number, html: string, attachHandlers: (container: HTMLElement) => void, sourceDesc: {
|
|
251
|
+
breadcrumb: string;
|
|
252
|
+
title: string;
|
|
253
|
+
description: string;
|
|
254
|
+
}, rationale?: string) => void, clear: () => void): void;
|
|
255
|
+
/** Wires a callback fired when the user clicks an ODD arc in the diagram. */
|
|
256
|
+
setOnDiagramOddChange(cb: (componentIndex: number, oddId: string, mode: "highlight") => void): void;
|
|
257
|
+
/** Called by YinYangDrawer when the user clicks an ODD arc: toggles that
|
|
258
|
+
* ODD's legend chip in the panel, mirroring a direct chip click. */
|
|
259
|
+
onDiagramOddArcClicked(oddId: string): void;
|
|
260
|
+
/** Called by YinYangDrawer when the user clicks the small "eye" circle of
|
|
261
|
+
* the facette's dominant lobe (yin or yang, per Composante.orientation) —
|
|
262
|
+
* opens/closes the radial menu of Événements Clés for the active facette. */
|
|
263
|
+
onCoreEventNucleusClicked(): void;
|
|
264
|
+
/** Wires a callback fired when the user clicks a composante border, cutting, or action in the diagram. */
|
|
265
|
+
setOnDiagramNavChange(cb: (event: {
|
|
266
|
+
type: "composante";
|
|
267
|
+
componentIndex: number;
|
|
268
|
+
} | {
|
|
269
|
+
type: "cutting";
|
|
270
|
+
componentIndex: number;
|
|
271
|
+
oddId: string;
|
|
272
|
+
cuttingIndex: number;
|
|
273
|
+
} | {
|
|
274
|
+
type: "action";
|
|
275
|
+
componentIndex: number;
|
|
276
|
+
oddId: string;
|
|
277
|
+
cuttingIndex: number;
|
|
278
|
+
actionId: string;
|
|
279
|
+
} | {
|
|
280
|
+
type: "keyEvent";
|
|
281
|
+
componentIndex: number;
|
|
282
|
+
keyEventId: string;
|
|
283
|
+
}) => void): void;
|
|
284
|
+
/** Fired when the active satellite is deselected (toggle-to-close, or an
|
|
285
|
+
* ODD-level interaction taking over) — componentIndex is the current facette. */
|
|
286
|
+
setOnDiagramSatelliteDeselect(cb: (componentIndex: number) => void): void;
|
|
287
|
+
/** Fired when the user clicks the current composante's border arc to hide its satellites. */
|
|
288
|
+
setOnDiagramComposanteDeselect(cb: () => void): void;
|
|
289
|
+
/** Called by BorderDrawer when the user clicks a composante border arc. */
|
|
290
|
+
onDiagramComposanteClicked(componentIndex: number): void;
|
|
291
|
+
/** Toggles satellite (cutting circle) visibility when the user clicks the current composante's border arc. */
|
|
292
|
+
toggleComposanteChildrenFromDiagram(componentIndex: number): void;
|
|
293
|
+
/** Hides satellites when the user collapses a composante in the hierarchy. */
|
|
294
|
+
deactivateComposanteFromHierarchy(): void;
|
|
295
|
+
/** Signalement visuel transient depuis le survol de l'arbre Recherche — null = clear. */
|
|
296
|
+
searchPreviewHover(target: {
|
|
297
|
+
type: string;
|
|
298
|
+
componentIndex: number;
|
|
299
|
+
oddId?: string;
|
|
300
|
+
cuttingIndex?: number;
|
|
301
|
+
actionId?: string;
|
|
302
|
+
} | null): void;
|
|
303
|
+
/** Wire d'un callback déclenché quand la souris entre/sort d'un satellite dans le diagramme. */
|
|
304
|
+
setOnDiagramChildHover(cb: (componentIndex: number | null, oddId: string | null, cuttingIndex?: number) => void): void;
|
|
305
|
+
/** Wire d'un callback déclenché quand la souris entre/sort d'un arc de bordure dans le diagramme. */
|
|
306
|
+
setOnDiagramComposanteHover(cb: (componentIndex: number | null) => void): void;
|
|
307
|
+
/** Wire d'un callback déclenché quand la souris entre/sort d'un cercle d'action dans le menu radial. */
|
|
308
|
+
setOnDiagramActionHover(cb: (componentIndex: number | null, oddId: string | null, cuttingIndex: number | null, actionId: string | null) => void): void;
|
|
309
|
+
/** Wire d'un callback déclenché quand la souris entre/sort d'un arc ODD dans le diagramme
|
|
310
|
+
* (lien inverse vers les chips de la légende ODD du panneau RECHERCHE). */
|
|
311
|
+
setOnDiagramOddArcHover(cb: (oddId: string | null) => void): void;
|
|
312
|
+
/**
|
|
313
|
+
* Returns the current force-field allLinkDetails for this controller.
|
|
314
|
+
* Used by sibling controllers to build a merged detail pool for cross-component chains.
|
|
315
|
+
*/
|
|
316
|
+
getForceFieldAllLinkDetails(): ForceFieldLinkDetail[];
|
|
22
317
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface YinYangCategoryArcGeometry {
|
|
2
|
+
category: string;
|
|
3
|
+
color: string;
|
|
4
|
+
startAngle: number;
|
|
5
|
+
endAngle: number;
|
|
6
|
+
}
|
|
7
|
+
export interface YinYangLayoutGeometry {
|
|
8
|
+
positionX: number;
|
|
9
|
+
positionY: number;
|
|
10
|
+
borderInnerRadius: number;
|
|
11
|
+
}
|
|
12
|
+
export interface YinYangSymbolGeometry {
|
|
13
|
+
centerY: number;
|
|
14
|
+
radius: number;
|
|
15
|
+
smallRadius: number;
|
|
16
|
+
}
|
|
17
|
+
export interface YinYangBorderGeometry {
|
|
18
|
+
innerRadius: number;
|
|
19
|
+
outerRadius: number;
|
|
20
|
+
thickness: number;
|
|
21
|
+
count: number;
|
|
22
|
+
isChild: boolean;
|
|
23
|
+
colors: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface YinYangSpikeGeometry {
|
|
26
|
+
type: "yin" | "yang";
|
|
27
|
+
category: string;
|
|
28
|
+
cuttingIndex: number;
|
|
29
|
+
startX: number;
|
|
30
|
+
startY: number;
|
|
31
|
+
endX: number;
|
|
32
|
+
endY: number;
|
|
33
|
+
color: string;
|
|
34
|
+
}
|
|
35
|
+
export interface IYinYangGeometry {
|
|
36
|
+
layout: YinYangLayoutGeometry;
|
|
37
|
+
yin: YinYangSymbolGeometry;
|
|
38
|
+
yang: YinYangSymbolGeometry;
|
|
39
|
+
categoryArcs: YinYangCategoryArcGeometry[];
|
|
40
|
+
borderSegments: YinYangCategoryArcGeometry[];
|
|
41
|
+
border: YinYangBorderGeometry;
|
|
42
|
+
spikes: YinYangSpikeGeometry[];
|
|
43
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type YinYangOrientation = "yin" | "yang";
|
|
2
|
+
export interface YinYangCategorySlice {
|
|
3
|
+
id: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
weight: number;
|
|
6
|
+
}
|
|
7
|
+
export interface YinYangCuttingNode {
|
|
8
|
+
id: number;
|
|
9
|
+
label?: string;
|
|
10
|
+
shortLabel?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface YinYangOddNode {
|
|
13
|
+
id: string;
|
|
14
|
+
label?: string;
|
|
15
|
+
shortLabel?: string;
|
|
16
|
+
/** Nombre de satellites (cuttings) que compte cet ODD. */
|
|
17
|
+
satelliteCount: number;
|
|
18
|
+
cuttingScores: number[];
|
|
19
|
+
/** Poids de chaque satellite ; pilote le rayon de son cercle enfant. */
|
|
20
|
+
cuttingWeights: number[];
|
|
21
|
+
cuttingIds?: number[];
|
|
22
|
+
cuttings?: YinYangCuttingNode[];
|
|
23
|
+
}
|
|
24
|
+
export interface YinYangComponentNode {
|
|
25
|
+
id: string;
|
|
26
|
+
label?: string;
|
|
27
|
+
shortLabel?: string;
|
|
28
|
+
orientation: YinYangOrientation;
|
|
29
|
+
odds: YinYangOddNode[];
|
|
30
|
+
}
|
|
31
|
+
export interface YinYangInternalModel {
|
|
32
|
+
slices: YinYangCategorySlice[];
|
|
33
|
+
components: YinYangComponentNode[];
|
|
34
|
+
}
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ICategory } from "./ICategory";
|
|
1
|
+
import { YinYangInternalModel } from "./IYinYangInternalModel";
|
|
3
2
|
export interface IYinYangModel {
|
|
4
|
-
|
|
5
|
-
categories: ICategory[];
|
|
3
|
+
internalModel: YinYangInternalModel;
|
|
6
4
|
key: string;
|
|
7
5
|
parentKey: string | null;
|
|
8
6
|
childCounter: number;
|
|
9
7
|
borderNb: number;
|
|
10
|
-
isEnemy: boolean;
|
|
11
8
|
generateChildKey(): string;
|
|
12
|
-
|
|
13
|
-
getSmallCircleData(): {
|
|
14
|
-
score: number;
|
|
15
|
-
angle: number;
|
|
16
|
-
}[];
|
|
17
|
-
setupCategories(data: IOddItem[]): ICategory[];
|
|
9
|
+
resetChildCounter(): void;
|
|
18
10
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./styles/base.css";
|
|
2
|
+
import "./styles/layout.css";
|
|
3
|
+
import "./styles/controls.css";
|
|
4
|
+
import "./styles/details-panel.css";
|
|
5
|
+
import "./styles/search.css";
|
|
6
|
+
import "./styles/delta-chips.css";
|
|
7
|
+
import "./styles/action-image.css";
|
|
8
|
+
export * from "./api";
|
|
9
|
+
import "./benchmark/runner";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ActionImageSize = "thumb" | "full";
|
|
2
|
+
/**
|
|
3
|
+
* Convention : les fichiers webp sont nommés exactement par l'id de l'action
|
|
4
|
+
* (voir scripts/convert-actions.sh), donc l'URL se déduit sans champ stocké.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getActionImageUrl(actionId: string, size: ActionImageSize): string;
|
|
7
|
+
/**
|
|
8
|
+
* Icône vectorielle courte (bouton, préfixe de liste), même convention de nommage.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getActionIconUrl(actionId: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Pictogramme officiel ODD (ONU, version française), même convention de nommage.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getOddIconUrl(oddId: string): string;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { CauseGraph } from "../interfaces/ICauseGraph";
|
|
2
|
+
import { YinYangComponentNode } from "../interfaces/IYinYangInternalModel";
|
|
3
|
+
import { LocalCuttingEdge, PropagationLayersConfig } from "../interfaces/IPropagationLayers";
|
|
4
|
+
export type Action = {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
from: string;
|
|
8
|
+
delta: number;
|
|
9
|
+
category: string;
|
|
10
|
+
cost: number;
|
|
11
|
+
};
|
|
12
|
+
export type PropagatedActionEdge = {
|
|
13
|
+
layerType: "inter" | "intra" | "bridge";
|
|
14
|
+
fromComponentId: string;
|
|
15
|
+
toComponentId: string;
|
|
16
|
+
fromOddId: string;
|
|
17
|
+
toOddId: string;
|
|
18
|
+
fromCuttingId?: number;
|
|
19
|
+
toCuttingId?: number;
|
|
20
|
+
weight: number;
|
|
21
|
+
deltaTo: number;
|
|
22
|
+
baseDelta: number;
|
|
23
|
+
propagationFactor: number;
|
|
24
|
+
fromState: number;
|
|
25
|
+
toState: number;
|
|
26
|
+
absorption: number;
|
|
27
|
+
gap: number;
|
|
28
|
+
rationale?: string;
|
|
29
|
+
/** Entry-point cutting carried from the inter-ODD graph edge (used by Phase 6+7). */
|
|
30
|
+
targetedCutting?: number;
|
|
31
|
+
};
|
|
32
|
+
export type ProjectedActionStateDetails = {
|
|
33
|
+
oddStates: Record<string, number>;
|
|
34
|
+
cuttingStates: CuttingStateMap;
|
|
35
|
+
};
|
|
36
|
+
type CuttingStateMap = Record<string, Record<number, number>>;
|
|
37
|
+
export declare function clampState(state: number): number;
|
|
38
|
+
export declare function tensionFromState(state: number): number;
|
|
39
|
+
export declare function absorptionMultiplier(state: number): number;
|
|
40
|
+
export declare function gapMultiplier(sourceState: number, targetState: number): number;
|
|
41
|
+
export declare function absorptionRuleExplanation(state: number): string;
|
|
42
|
+
export declare function gapRuleExplanation(sourceState: number, targetState: number): string;
|
|
43
|
+
export declare function deriveOddStates(component: YinYangComponentNode): Record<string, number>;
|
|
44
|
+
export declare function deriveCuttingStates(component: YinYangComponentNode): CuttingStateMap;
|
|
45
|
+
/** Find a node in the intra-ODD flat array by toCuttingId (to start AT it). */
|
|
46
|
+
export declare function findNodeInTree(edges: LocalCuttingEdge[], targetId: number): LocalCuttingEdge | null;
|
|
47
|
+
export declare function propagateActionInComponent(component: YinYangComponentNode, graph: CauseGraph, sourceOddId: string, delta: number, k: number): PropagatedActionEdge[];
|
|
48
|
+
export type ActionPropagationDetails = ProjectedActionStateDetails & {
|
|
49
|
+
edges: PropagatedActionEdge[];
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Canonical single-pass propagation: runs the 8 phases once and returns both
|
|
53
|
+
* the collected edges AND the final states. propagateForceFieldActionInComponent
|
|
54
|
+
* and projectActionStateDetailsInComponent below are thin wrappers over this —
|
|
55
|
+
* having them as two independently-maintained twins previously let the
|
|
56
|
+
* state-only path silently drift from the edge path: it never passed
|
|
57
|
+
* `allComponents` into the Phase 5 inter-ODD call (so cross-component edges
|
|
58
|
+
* were absent from its internal `interEdges` — with real data this happened
|
|
59
|
+
* to have no effect on the RETURNED states, since Phase 6/7 already only
|
|
60
|
+
* ever applies same-component budgets, but it meant edges/rationale for ~150
|
|
61
|
+
* real cross-component synergies were unavailable to any caller built on top
|
|
62
|
+
* of the state-only path), and it never threaded the Phase 6/7 "global mode"
|
|
63
|
+
* tracking (`targetedOddsWithGlobalMode`) that the edge path has — inert with
|
|
64
|
+
* today's graph/layers data (no same-component edge without a targetedCutting
|
|
65
|
+
* currently targets an ODD that has its own intra chain) but a silent
|
|
66
|
+
* divergence waiting for the next graph data change. One implementation
|
|
67
|
+
* makes both classes of bug structurally impossible instead of just
|
|
68
|
+
* currently-inert.
|
|
69
|
+
*/
|
|
70
|
+
export declare function computeActionPropagationDetails(component: YinYangComponentNode, graph: CauseGraph, sourceOddId: string, sourceCuttingId: number | undefined, delta: number, k: number, layers?: PropagationLayersConfig, allComponents?: YinYangComponentNode[]): ActionPropagationDetails;
|
|
71
|
+
export declare function propagateForceFieldActionInComponent(component: YinYangComponentNode, graph: CauseGraph, sourceOddId: string, sourceCuttingId: number | undefined, delta: number, k: number, layers?: PropagationLayersConfig, allComponents?: YinYangComponentNode[]): PropagatedActionEdge[];
|
|
72
|
+
export declare function projectActionStateDetailsInComponent(component: YinYangComponentNode, graph: CauseGraph, sourceOddId: string, sourceCuttingId: number | undefined, delta: number, k: number, layers?: PropagationLayersConfig, allComponents?: YinYangComponentNode[]): ProjectedActionStateDetails;
|
|
73
|
+
export declare function projectActionStatesInComponent(component: YinYangComponentNode, graph: CauseGraph, sourceOddId: string, sourceCuttingId: number | undefined, delta: number, k: number, layers?: PropagationLayersConfig, allComponents?: YinYangComponentNode[]): Record<string, number>;
|
|
74
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Whether the STACK panel tab (as opposed to RECHERCHE) is currently active.
|
|
2
|
+
* Mirrors the DOM-based mode check already used in DiagramPanelBridge/main.ts —
|
|
3
|
+
* there is no in-memory "mode" state to read from, tab activity is the source
|
|
4
|
+
* of truth for which panel the user is looking at. */
|
|
5
|
+
export declare function isStackModeActive(): boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Cause } from "../interfaces/ICauseModel";
|
|
2
|
+
import { CauseGraph, CauseNodeId } from "../interfaces/ICauseGraph";
|
|
3
|
+
export declare function makeCauseNodeId(componentId: string, oddId: string): CauseNodeId;
|
|
4
|
+
export declare function listCauseNodeIds(cause: Cause): CauseNodeId[];
|
|
5
|
+
export declare function validateCauseGraph(cause: Cause, graph: CauseGraph): string[];
|
|
6
|
+
export declare function countEdges(graph: CauseGraph): number;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare function average(values: number[]): number;
|
|
2
|
+
export declare function weightedAverage(values: number[], weights: number[]): number;
|
|
3
|
+
export declare function clampScore(value: number): number;
|
|
4
|
+
/**
|
|
5
|
+
* Canonical domain metric in [0, 1]. Weighted by each satellite's `weight`
|
|
6
|
+
* when provided, so a heavier satellite pulls the tension further toward
|
|
7
|
+
* its own score; falls back to a simple average otherwise.
|
|
8
|
+
*/
|
|
9
|
+
export declare function tensionFromCuttings(cuttingScores: number[], cuttingWeights?: number[]): number;
|
|
10
|
+
export declare const oddTensionFromCuttings: typeof tensionFromCuttings;
|
|
11
|
+
export declare function stateFromTension(tension: number): number;
|
|
12
|
+
/** Bornes du poids d'un satellite (importance dans sa facette). Un satellite
|
|
13
|
+
* vaut 1 par défaut ; les actions le font varier par pas entiers, mais ne
|
|
14
|
+
* peuvent jamais le sortir de cette plage. Échelle 0-10 (doublée depuis la
|
|
15
|
+
* 0-5 d'origine) pour laisser de la marge aux deltas cumulés (actions,
|
|
16
|
+
* combos, amplificateurs d'événements clés) avant écrêtage. */
|
|
17
|
+
export declare const WEIGHT_MIN = 0;
|
|
18
|
+
export declare const WEIGHT_MAX = 10;
|
|
19
|
+
export declare function clampWeight(value: number): number;
|
|
20
|
+
/**
|
|
21
|
+
* Delta de poids réellement applicable compte tenu des bornes [WEIGHT_MIN,
|
|
22
|
+
* WEIGHT_MAX] : un delta qui pousserait le poids hors bornes est écrêté, et
|
|
23
|
+
* vaut 0 (donc "aucun delta") si le poids est déjà à la borne visée par son
|
|
24
|
+
* signe — ex: +1 sur un satellite déjà à WEIGHT_MAX ne change rien.
|
|
25
|
+
*/
|
|
26
|
+
export declare function effectiveWeightDelta(currentWeight: number, delta: number): number;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Un seul bloc affiché : les cartes gardent leur hauteur par défaut, calée sur
|
|
3
|
+
* le format des illustrations pour qu'elles s'affichent entières (cf.
|
|
4
|
+
* commentaire sur .ff-chain-card dans details-panel.css).
|
|
5
|
+
* À partir de deux blocs, on réduit la hauteur des cartes pour que deux blocs
|
|
6
|
+
* tiennent dans la hauteur visible du conteneur sans scroll — au-delà, le
|
|
7
|
+
* scroll prend le relais. L'image reste alors visible en entier mais plus
|
|
8
|
+
* petite, avec une bande vide en haut et en bas (object-fit: contain, cf.
|
|
9
|
+
* action-image.css) : c'est la hauteur qui cède, jamais le cadrage.
|
|
10
|
+
*
|
|
11
|
+
* La variable CSS est posée à la fois sur le conteneur ET directement sur
|
|
12
|
+
* chaque `.ff-chain-card` : quand un bloc est ajouté après coup (RECHERCHE,
|
|
13
|
+
* insertAdjacentHTML) plutôt qu'en même temps que les autres (STACK,
|
|
14
|
+
* innerHTML unique), l'héritage seul ne suffit pas toujours à invalider le
|
|
15
|
+
* `height` déjà calculé des cartes existantes — le poser directement sur
|
|
16
|
+
* chaque carte contourne ce cas.
|
|
17
|
+
*/
|
|
18
|
+
export declare function syncChainCardHeight(container: HTMLElement, blockSelector?: string): void;
|
|
19
|
+
/**
|
|
20
|
+
* Recalcule immédiatement puis surveille le conteneur pour garder la hauteur
|
|
21
|
+
* des cartes synchronisée : redimensionnement du panneau (ResizeObserver) et
|
|
22
|
+
* ajout/retrait de blocs (MutationObserver — un bloc peut être ajouté/retiré
|
|
23
|
+
* sans que la taille du conteneur lui-même ne change, ex. panneau RECHERCHE
|
|
24
|
+
* où le bloc secondaire propagé apparaît/disparaît). Idempotent : un seul
|
|
25
|
+
* couple d'observers est installé par conteneur.
|
|
26
|
+
*/
|
|
27
|
+
export declare function watchChainCardHeight(container: HTMLElement, blockSelector?: string): void;
|
|
@@ -2,12 +2,12 @@ import * as d3 from "d3";
|
|
|
2
2
|
import { IGraphicElement } from "../../interfaces/IGraphicElement";
|
|
3
3
|
export declare class D3Element implements IGraphicElement {
|
|
4
4
|
private selection;
|
|
5
|
-
constructor(selection: d3.Selection<any, unknown,
|
|
5
|
+
constructor(selection: d3.Selection<any, unknown, Element | null, any>);
|
|
6
6
|
appendElement(elementType: string): IGraphicElement;
|
|
7
7
|
setStyle(property: string, value: string): IGraphicElement;
|
|
8
8
|
setAttribute(name: string, value: string): IGraphicElement;
|
|
9
9
|
addEventListener(event: string, callback: () => void): void;
|
|
10
|
-
getSelection(): d3.Selection<any, unknown,
|
|
10
|
+
getSelection(): d3.Selection<any, unknown, Element | null, any>;
|
|
11
11
|
select(query: string): IGraphicElement;
|
|
12
12
|
node(): any;
|
|
13
13
|
getDimensions(): {
|