@perspective-dev/viewer-charts 5.4.0 → 5.5.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perspective-dev/viewer-charts",
3
- "version": "5.4.0",
3
+ "version": "5.5.1",
4
4
  "description": "Perspective.js WebGL Plugin",
5
5
  "unpkg": "./dist/cdn/perspective-viewer-charts.js",
6
6
  "jsdelivr": "./dist/cdn/perspective-viewer-charts.js",
@@ -35,10 +35,10 @@
35
35
  "lightningcss": "^1.29.0",
36
36
  "typescript": ">=5 <6",
37
37
  "webpack-glsl-minify": "1.5.0",
38
- "@perspective-dev/client": "^5.4.0",
39
- "@perspective-dev/viewer": "^5.4.0",
40
- "@perspective-dev/esbuild-plugin": "^5.4.0",
41
- "@perspective-dev/test": "^5.4.0"
38
+ "@perspective-dev/client": "^5.5.1",
39
+ "@perspective-dev/esbuild-plugin": "^5.5.1",
40
+ "@perspective-dev/viewer": "^5.5.1",
41
+ "@perspective-dev/test": "^5.5.1"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "node ./build.mjs",
@@ -86,7 +86,8 @@ type FieldSpec =
86
86
  kind: "Enum";
87
87
  variants: ReadonlyArray<{ value: string; label: string }>;
88
88
  }
89
- | { kind: "Number"; min: number; max: number; step?: number };
89
+ | { kind: "Number"; min: number; max: number; step?: number }
90
+ | { kind: "Alignment"; corners?: boolean };
90
91
 
91
92
  /**
92
93
  * A `FieldSpec` entry may be a thunk when its contents depend on
@@ -173,15 +174,7 @@ const FIELD_SCHEMAS: Record<PluginConfigField, FieldSpec | (() => FieldSpec)> =
173
174
  // 0 = auto (the chart family's historical gutter width).
174
175
  legend_width_px: { kind: "Number", min: 0, max: 512, step: 1 },
175
176
  legend_height_px: { kind: "Number", min: 48, max: 1024, step: 1 },
176
- legend_anchor: {
177
- kind: "Enum",
178
- variants: [
179
- { value: "top-right", label: "Top Right" },
180
- { value: "top-left", label: "Top Left" },
181
- { value: "bottom-right", label: "Bottom Right" },
182
- { value: "bottom-left", label: "Bottom Left" },
183
- ],
184
- },
177
+ legend_anchor: { kind: "Alignment", corners: true },
185
178
  legend_x: { kind: "Number", min: 0, max: 1, step: 0.01 },
186
179
  legend_y: { kind: "Number", min: 0, max: 1, step: 0.01 },
187
180
  legend_opacity: { kind: "Number", min: 0, max: 1, step: 0.05 },