@fundar/data-chart-telling 0.0.26 → 0.0.28

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.
Files changed (58) hide show
  1. package/dist/charts/BaseChart.svelte +18 -10
  2. package/dist/charts/BaseChart.svelte.d.ts +4 -2
  3. package/dist/charts/heatmap/Chart.svelte +2 -2
  4. package/dist/charts/pyramid/Chart.svelte +2 -2
  5. package/dist/configuration/config.svelte.js +26 -0
  6. package/dist/configuration/themes/dark.js +4 -0
  7. package/dist/configuration/themes/index.d.ts +64 -0
  8. package/dist/index.d.ts +6 -2
  9. package/dist/index.js +2 -0
  10. package/dist/layout/coordinates/CoordinatesLayout.svelte +1 -1
  11. package/dist/layout/facet/FacetIndicator.svelte +31 -0
  12. package/dist/layout/facet/FacetIndicator.svelte.d.ts +8 -0
  13. package/dist/layout/facet/FacetLayout.svelte +249 -24
  14. package/dist/layout/facet/FacetLayout.svelte.d.ts +7 -1
  15. package/dist/layout/legend/ContinuousSection.svelte +1 -1
  16. package/dist/layout/legend/ContinuousSection.svelte.d.ts +1 -1
  17. package/dist/layout/legend/DiscreteSection.svelte +1 -1
  18. package/dist/layout/legend/DiscreteSection.svelte.d.ts +1 -1
  19. package/dist/layout/legend/LegendLayout.svelte +1 -1
  20. package/dist/layout/legend/LegendLayout.svelte.d.ts +1 -1
  21. package/dist/layout/legend/interaction.svelte.d.ts +9 -1
  22. package/dist/layout/legend/interaction.svelte.js +9 -1
  23. package/dist/layout/timeline/Timeline.svelte +1 -1
  24. package/dist/layout/timeline/Timeline.svelte.d.ts +1 -1
  25. package/dist/layout/timeline/TimelineLayout.svelte +1 -1
  26. package/dist/layout/timeline/TimelineLayout.svelte.d.ts +1 -1
  27. package/dist/layout/tooltip/controller.svelte.js +16 -2
  28. package/dist/markers/HoverMarker.svelte +2 -2
  29. package/dist/plots/bar/Plot.svelte +43 -4
  30. package/dist/plots/bar/ValueLabels.svelte +69 -23
  31. package/dist/plots/bar/ValueLabels.svelte.d.ts +10 -1
  32. package/dist/plots/heatmap/Plot.svelte +4 -4
  33. package/dist/plots/heatmap/ValueLabels.svelte +3 -3
  34. package/dist/plots/heatmap/ValueLabels.svelte.d.ts +1 -1
  35. package/dist/plots/line/Plot.svelte +34 -29
  36. package/dist/plots/line/ValueLabels.svelte +73 -51
  37. package/dist/plots/line/ValueLabels.svelte.d.ts +8 -4
  38. package/dist/plots/pyramid/Plot.svelte +41 -6
  39. package/dist/plots/pyramid/ValueLabels.svelte +70 -24
  40. package/dist/plots/pyramid/ValueLabels.svelte.d.ts +10 -1
  41. package/dist/plots/scatter/Plot.svelte +40 -4
  42. package/dist/plots/scatter/ValueLabels.svelte +90 -47
  43. package/dist/plots/scatter/ValueLabels.svelte.d.ts +14 -5
  44. package/dist/plots/utils/labelOverflow.svelte.d.ts +51 -0
  45. package/dist/plots/utils/labelOverflow.svelte.js +116 -0
  46. package/dist/plots/utils/legendDisabled.d.ts +1 -1
  47. package/dist/types/charts/common.d.ts +3 -50
  48. package/dist/types/charts/props.d.ts +3 -2
  49. package/dist/types/configuration/styling.d.ts +19 -0
  50. package/dist/types/layout/facet.d.ts +41 -0
  51. package/dist/types/layout/legend.d.ts +65 -1
  52. package/dist/types/layout/styles.d.ts +1 -12
  53. package/dist/types/layout/timeline.d.ts +32 -0
  54. package/dist/types/layout/timeline.js +1 -0
  55. package/dist/utils/interpolate.d.ts +1 -1
  56. package/package.json +1 -1
  57. package/dist/types/charts/legend.d.ts +0 -60
  58. /package/dist/types/{charts/legend.js → layout/facet.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import type { EasingName, EasingFn } from '../types/charts/interpolate';
2
- import type { TimeValue, TimelineInterpolation } from '../types/charts/common';
2
+ import type { TimeValue, TimelineInterpolation } from '../types/layout/timeline';
3
3
  import type { AxisValue } from '../types/layout/scales';
4
4
  import type { Accessor } from '../types/plots/data/common';
5
5
  export declare function resolveEasing(easing?: EasingName | EasingFn): EasingFn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fundar/data-chart-telling",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,60 +0,0 @@
1
- import type { SymbolType, LineStyle } from '../plots/constants';
2
- import type { StrokeStyle, DotStyle } from '../plots/styling';
3
- export type LegendSectionType = 'discrete' | 'continuous';
4
- /**
5
- * Style applied to whatever a legend interaction has turned "off" — a
6
- * toggled-off discrete series, or a datapoint/cell/feature outside an active
7
- * continuous range filter. `opacity` is a blanket convenience: any
8
- * `*Opacity` field a consumer doesn't set falls back to it, so
9
- * `{ opacity: 0.1 }` alone is enough to read as "disabled" everywhere.
10
- */
11
- export type LegendDisabledStyle = {
12
- opacity?: number;
13
- stroke?: StrokeStyle;
14
- dots?: DotStyle;
15
- fill?: string;
16
- fillOpacity?: number;
17
- };
18
- export type LegendItem = {
19
- name: string;
20
- label?: string;
21
- color?: string;
22
- symbol?: SymbolType;
23
- opacity?: number;
24
- lineStyle?: LineStyle;
25
- /** Initial toggled-off state (uncontrolled — the user can still click it back on). */
26
- disabled?: boolean;
27
- };
28
- export type DiscreteLegendSection = {
29
- type: 'discrete';
30
- title?: string;
31
- items: LegendItem[];
32
- columns?: number;
33
- /** Enables click-to-toggle on each item. */
34
- interactive?: boolean;
35
- /** Style applied to a toggled-off item's series. Falls back to `cfg.legend.disabledOpacity`. */
36
- disabledStyle?: LegendDisabledStyle;
37
- };
38
- export type ContinuousLegendSection = {
39
- type: 'continuous';
40
- title?: string;
41
- columns?: number;
42
- min: number;
43
- max: number;
44
- colorMin?: string;
45
- colorMax?: string;
46
- ticks?: number[];
47
- width?: number;
48
- format?: (v: number) => string;
49
- /** Enables drag handles on the bar's edges to narrow the visible range. */
50
- interactive?: boolean;
51
- /**
52
- * How the color ramp responds to a narrowed range: `'rescale'` reprojects
53
- * it onto the new bounds, `'filter'` keeps the original domain and only
54
- * excludes out-of-range values. Defaults to `'filter'`.
55
- */
56
- mode?: 'rescale' | 'filter';
57
- /** Style applied to values outside the active range. Falls back to `cfg.legend.disabledOpacity`. */
58
- disabledStyle?: LegendDisabledStyle;
59
- };
60
- export type LegendSection = DiscreteLegendSection | ContinuousLegendSection;