@opendata-ai/openchart-vanilla 6.20.0 → 6.22.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/dist/index.d.ts CHANGED
@@ -285,14 +285,13 @@ interface SankeyInstance {
285
285
  declare function createSankey(container: HTMLElement, spec: SankeySpec, options?: SankeyMountOptions): SankeyInstance;
286
286
 
287
287
  /**
288
- * SVG renderer: converts a ChartLayout into SVG DOM elements.
289
- *
290
- * Creates an <svg> element with viewBox matching layout dimensions,
291
- * renders chrome (title/subtitle/source), axes, marks, annotations,
292
- * and legend. All styling via inline SVG attributes from layout data.
288
+ * Mark rendering: dispatches to per-mark-type sub-renderers (line, area, rect,
289
+ * arc, point, text, rule, tick).
293
290
  *
294
- * Mark rendering dispatches per mark type with dedicated renderers
295
- * for line, area, rect, arc, and point marks.
291
+ * Mark renderers read module-level animation and gradient state so their
292
+ * signatures stay `(mark, index) => SVGElement`. Callers must invoke
293
+ * `setMarkRenderState()` before `renderMarks()` and `resetMarkRenderState()`
294
+ * after.
296
295
  */
297
296
 
298
297
  type MarkRenderer<T extends Mark> = (mark: T, index: number) => SVGElement;
@@ -301,6 +300,18 @@ type MarkRenderer<T extends Mark> = (mark: T, index: number) => SVGElement;
301
300
  * Built-in renderers are registered below for all chart types.
302
301
  */
303
302
  declare function registerMarkRenderer<T extends Mark>(type: T['type'], renderer: MarkRenderer<T>): void;
303
+
304
+ /**
305
+ * SVG renderer: converts a ChartLayout into SVG DOM elements.
306
+ *
307
+ * Creates an <svg> element with viewBox matching layout dimensions,
308
+ * renders chrome (title/subtitle/source), axes, marks, annotations,
309
+ * and legend. All styling via inline SVG attributes from layout data.
310
+ *
311
+ * This file is the orchestrator only. Each rendering concern lives in its
312
+ * own module under `./renderers/`.
313
+ */
314
+
304
315
  /**
305
316
  * Render a compiled ChartLayout into an SVG element and append it to a container.
306
317
  *