@internetstiftelsen/charts 0.0.1 → 0.0.2

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/bar.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Selection } from 'd3';
2
- import type { BarConfig, DataItem, ScaleType, Orientation } from './types';
2
+ import type { BarConfig, DataItem, ScaleType, Orientation } from './types.js';
3
3
  import type { ChartComponent } from '@/lib/chart-interface';
4
4
  export declare class Bar implements ChartComponent {
5
5
  readonly type: "bar";
package/base-chart.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { type Selection } from 'd3';
2
- import type { DataItem, ChartTheme, AxisScaleConfig } from './types';
2
+ import type { DataItem, ChartTheme, AxisScaleConfig } from './types.js';
3
3
  import type { ChartComponent } from '@/lib/chart-interface';
4
- import type { XAxis } from './x-axis';
5
- import type { YAxis } from './y-axis';
6
- import type { Grid } from './grid';
7
- import type { Tooltip } from './tooltip';
8
- import type { Legend } from './legend';
9
- import type { Title } from './title';
10
- import { LayoutManager, type PlotAreaBounds } from './layout-manager';
4
+ import type { XAxis } from './x-axis.js';
5
+ import type { YAxis } from './y-axis.js';
6
+ import type { Grid } from './grid.js';
7
+ import type { Tooltip } from './tooltip.js';
8
+ import type { Legend } from './legend.js';
9
+ import type { Title } from './title.js';
10
+ import { LayoutManager, type PlotAreaBounds } from './layout-manager.js';
11
11
  export type BaseChartConfig = {
12
12
  data: DataItem[];
13
13
  theme?: Partial<ChartTheme>;
package/base-chart.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { create } from 'd3';
2
- import { defaultTheme } from './theme';
3
- import { ChartValidator } from './validation';
4
- import { LayoutManager } from './layout-manager';
2
+ import { defaultTheme } from './theme.js';
3
+ import { ChartValidator } from './validation.js';
4
+ import { LayoutManager } from './layout-manager.js';
5
5
  /**
6
6
  * Base chart class that provides common functionality for all chart types
7
7
  */
package/grid.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type Selection } from 'd3';
2
- import type { GridConfig, ChartTheme } from './types';
2
+ import type { GridConfig, ChartTheme } from './types.js';
3
3
  import type { ChartComponent } from '@/lib/chart-interface';
4
4
  export declare class Grid implements ChartComponent {
5
5
  readonly type: "grid";
@@ -1,5 +1,5 @@
1
- import type { LayoutAwareComponent } from './chart-interface';
2
- import type { ChartTheme } from './types';
1
+ import type { LayoutAwareComponent } from './chart-interface.js';
2
+ import type { ChartTheme } from './types.js';
3
3
  export type PlotAreaBounds = {
4
4
  left: number;
5
5
  right: number;
package/legend.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { type Selection } from 'd3';
2
- import type { LegendConfig, ChartTheme } from './types';
3
- import type { Line } from './line';
4
- import type { Bar } from './bar';
2
+ import type { LegendConfig, ChartTheme } from './types.js';
3
+ import type { Line } from './line.js';
4
+ import type { Bar } from './bar.js';
5
5
  import type { LayoutAwareComponent, ComponentSpace } from '@/lib/chart-interface';
6
6
  export declare class Legend implements LayoutAwareComponent {
7
7
  readonly type: "legend";
package/legend.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import {} from 'd3';
2
- import { getSeriesColor } from './types';
2
+ import { getSeriesColor } from './types.js';
3
3
  export class Legend {
4
4
  constructor(config) {
5
5
  Object.defineProperty(this, "type", {
package/line.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type Selection } from 'd3';
2
- import type { LineConfig, DataItem, ScaleType } from './types';
2
+ import type { LineConfig, DataItem, ScaleType } from './types.js';
3
3
  import type { ChartComponent } from '@/lib/chart-interface';
4
4
  export declare class Line implements ChartComponent {
5
5
  readonly type: "line";
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.1",
2
+ "version": "0.0.2",
3
3
  "name": "@internetstiftelsen/charts",
4
4
  "type": "module",
5
5
  "exports": {
package/title.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type Selection } from 'd3';
2
- import type { TitleConfig, ChartTheme } from './types';
3
- import type { LayoutAwareComponent, ComponentSpace } from './chart-interface';
2
+ import type { TitleConfig, ChartTheme } from './types.js';
3
+ import type { LayoutAwareComponent, ComponentSpace } from './chart-interface.js';
4
4
  export declare class Title implements LayoutAwareComponent {
5
5
  readonly type: "title";
6
6
  readonly text: string;
package/tooltip.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { type Selection } from 'd3';
2
- import type { TooltipConfig, DataItem, ChartTheme } from './types';
2
+ import type { TooltipConfig, DataItem, ChartTheme } from './types.js';
3
3
  import type { ChartComponent } from '@/lib/chart-interface';
4
- import type { Line } from './line';
5
- import type { Bar } from './bar';
6
- import type { PlotAreaBounds } from './layout-manager';
4
+ import type { Line } from './line.js';
5
+ import type { Bar } from './bar.js';
6
+ import type { PlotAreaBounds } from './layout-manager.js';
7
7
  export declare class Tooltip implements ChartComponent {
8
8
  readonly type: "tooltip";
9
9
  readonly formatter?: (dataKey: string, value: any, data: DataItem) => string;
package/tooltip.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { pointer, select } from 'd3';
2
- import { getSeriesColor } from './types';
2
+ import { getSeriesColor } from './types.js';
3
3
  export class Tooltip {
4
4
  constructor(config) {
5
5
  Object.defineProperty(this, "type", {
package/validation.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { DataItem } from './types';
1
+ import type { DataItem } from './types.js';
2
2
  export declare class ChartValidationError extends Error {
3
3
  constructor(message: string);
4
4
  }
package/x-axis.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type Selection } from 'd3';
2
- import type { XAxisConfig, ChartTheme } from './types';
2
+ import type { XAxisConfig, ChartTheme } from './types.js';
3
3
  import type { LayoutAwareComponent, ComponentSpace } from '@/lib/chart-interface';
4
4
  export declare class XAxis implements LayoutAwareComponent {
5
5
  readonly type: "xAxis";
package/xy-chart.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { BaseChart, type BaseChartConfig } from './base-chart';
1
+ import { BaseChart, type BaseChartConfig } from './base-chart.js';
2
2
  import type { ChartComponent } from '@/lib/chart-interface';
3
3
  export type XYChartConfig = BaseChartConfig;
4
4
  export declare class XYChart extends BaseChart {
package/xy-chart.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { max, min, scaleBand, scaleLinear, scaleTime, scaleLog, } from 'd3';
2
- import { getSeriesColor } from './types';
3
- import { BaseChart } from './base-chart';
4
- import { ChartValidator } from './validation';
2
+ import { getSeriesColor } from './types.js';
3
+ import { BaseChart } from './base-chart.js';
4
+ import { ChartValidator } from './validation.js';
5
5
  export class XYChart extends BaseChart {
6
6
  constructor(config) {
7
7
  super(config);
package/y-axis.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type Selection } from 'd3';
2
- import type { ChartTheme, YAxisConfig } from './types';
2
+ import type { ChartTheme, YAxisConfig } from './types.js';
3
3
  import type { LayoutAwareComponent, ComponentSpace } from '@/lib/chart-interface';
4
4
  export declare class YAxis implements LayoutAwareComponent {
5
5
  readonly type: "yAxis";