@object-ui/plugin-charts 17.6.0 → 17.7.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/CHANGELOG.md +2840 -0
- package/README.md +32 -17
- package/dist/AdvancedChartImpl.d.ts +29 -11
- package/dist/ChartRenderer.d.ts +13 -2
- package/dist/ObjectChart.d.ts +133 -4
- package/dist/index.d.ts +67 -7
- package/dist/index.js +1704 -1064
- package/dist/index.umd.cjs +2 -2
- package/dist/normalizeChartSchema.d.ts +225 -14
- package/dist/types.d.ts +31 -28
- package/package.json +12 -11
package/dist/types.d.ts
CHANGED
|
@@ -1,8 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ObjectUI
|
|
3
|
+
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* TypeScript type definitions for @object-ui/plugin-charts
|
|
10
|
+
*
|
|
11
|
+
* These types can be imported by applications using this plugin
|
|
12
|
+
* to get full TypeScript support for chart schemas.
|
|
13
|
+
*/
|
|
2
14
|
/**
|
|
3
15
|
* Bar Chart component schema.
|
|
4
16
|
* Renders a bar chart using Recharts library.
|
|
5
17
|
*
|
|
18
|
+
* ⚠️ RE-EXPORTED, not declared here. The authority is
|
|
19
|
+
* `BarChartSchema` in `@object-ui/types` (`packages/types/src/data-display.ts`),
|
|
20
|
+
* which is also where the zod mirror `AnyComponentSchema` validates against
|
|
21
|
+
* lives — so the type an author reads and the schema that accepts their
|
|
22
|
+
* document cannot drift apart.
|
|
23
|
+
*
|
|
24
|
+
* Why that direction and not the other (objectui#6273, the 2026-08-25 family
|
|
25
|
+
* ruling objectui#6172 / 甲-A1): `@object-ui/types` is the lower layer and
|
|
26
|
+
* cannot import from a plugin without creating a cycle, so of the two possible
|
|
27
|
+
* authorities only this one is legal.
|
|
28
|
+
*
|
|
29
|
+
* The two declarations were measured structurally before this re-point rather
|
|
30
|
+
* than assumed equivalent — same heritage (`BaseSchema`), same six members,
|
|
31
|
+
* same per-member types and optionality, mutually assignable in both
|
|
32
|
+
* directions — so nothing about the published shape changes here. The import
|
|
33
|
+
* path `@object-ui/plugin-charts` keeps working exactly as before.
|
|
34
|
+
*
|
|
6
35
|
* @example
|
|
7
36
|
* ```typescript
|
|
8
37
|
* import type { BarChartSchema } from '@object-ui/plugin-charts';
|
|
@@ -18,30 +47,4 @@ import { BaseSchema } from '@object-ui/types';
|
|
|
18
47
|
* }
|
|
19
48
|
* ```
|
|
20
49
|
*/
|
|
21
|
-
export
|
|
22
|
-
type: 'bar-chart';
|
|
23
|
-
/**
|
|
24
|
-
* Array of data points to display in the chart.
|
|
25
|
-
*/
|
|
26
|
-
data?: Array<Record<string, any>>;
|
|
27
|
-
/**
|
|
28
|
-
* Key in the data object for the Y-axis values.
|
|
29
|
-
* @default 'value'
|
|
30
|
-
*/
|
|
31
|
-
dataKey?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Key in the data object for the X-axis labels.
|
|
34
|
-
* @default 'name'
|
|
35
|
-
*/
|
|
36
|
-
xAxisKey?: string;
|
|
37
|
-
/**
|
|
38
|
-
* Height of the chart in pixels.
|
|
39
|
-
* @default 400
|
|
40
|
-
*/
|
|
41
|
-
height?: number;
|
|
42
|
-
/**
|
|
43
|
-
* Color of the bars.
|
|
44
|
-
* @default '#8884d8'
|
|
45
|
-
*/
|
|
46
|
-
color?: string;
|
|
47
|
-
}
|
|
50
|
+
export type { BarChartSchema } from '@object-ui/types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/plugin-charts",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Chart components plugin for Object UI, powered by Recharts",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"lucide-react": "^1.
|
|
27
|
+
"lucide-react": "^1.43.0",
|
|
28
28
|
"recharts": "^3.10.1",
|
|
29
|
-
"@object-ui/components": "17.
|
|
30
|
-
"@object-ui/core": "17.
|
|
31
|
-
"@object-ui/i18n": "17.
|
|
32
|
-
"@object-ui/react": "17.
|
|
33
|
-
"@object-ui/types": "17.
|
|
29
|
+
"@object-ui/components": "17.7.0",
|
|
30
|
+
"@object-ui/core": "17.7.0",
|
|
31
|
+
"@object-ui/i18n": "17.7.0",
|
|
32
|
+
"@object-ui/react": "17.7.0",
|
|
33
|
+
"@object-ui/types": "17.7.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
"@vitejs/plugin-react": "^6.0.5",
|
|
44
44
|
"typescript": "^6.0.3",
|
|
45
45
|
"vite": "^8.2.1",
|
|
46
|
-
"vite-plugin-dts": "^5.0.3"
|
|
46
|
+
"vite-plugin-dts": "^5.0.3",
|
|
47
|
+
"@object-ui/test-support": "17.4.0"
|
|
47
48
|
},
|
|
48
49
|
"keywords": [
|
|
49
50
|
"objectui",
|
|
@@ -70,9 +71,9 @@
|
|
|
70
71
|
],
|
|
71
72
|
"scripts": {
|
|
72
73
|
"build": "vite build",
|
|
73
|
-
"test": "vitest run",
|
|
74
|
-
"test:watch": "vitest",
|
|
75
|
-
"type-check": "tsc --noEmit",
|
|
74
|
+
"test": "vitest run --root ../.. packages/plugin-charts/",
|
|
75
|
+
"test:watch": "vitest --root ../.. packages/plugin-charts/",
|
|
76
|
+
"type-check": "tsc --noEmit && tsc -p tsconfig.test.json",
|
|
76
77
|
"lint": "eslint ."
|
|
77
78
|
}
|
|
78
79
|
}
|