@object-ui/plugin-charts 17.5.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/README.md CHANGED
@@ -20,11 +20,14 @@ pnpm add @object-ui/plugin-charts
20
20
  ### Automatic Registration (Side-Effect Import)
21
21
 
22
22
  ```typescript
23
- // In your app entry point (e.g., App.tsx or main.tsx)
23
+ // In your app entry point (e.g., App.tsx or main.tsx). This side-effect import
24
+ // is the one that registers the components; the type import below is erased at
25
+ // build time and registers nothing.
24
26
  import '@object-ui/plugin-charts';
27
+ import type { BarChartSchema } from '@object-ui/plugin-charts';
25
28
 
26
- // Now you can use chart-bar type in your schemas
27
- const schema = {
29
+ // Now you can use the bar-chart type in your schemas
30
+ const schema: BarChartSchema = {
28
31
  type: 'bar-chart',
29
32
  data: [
30
33
  { name: 'Jan', value: 400 },
@@ -43,9 +46,11 @@ const schema = {
43
46
  import { chartComponents } from '@object-ui/plugin-charts';
44
47
  import { ComponentRegistry } from '@object-ui/core';
45
48
 
46
- // Manually register if needed
49
+ // Manually register if needed. The third argument is not optional in practice:
50
+ // `register()` without a namespace is the deprecated form and warns at runtime.
51
+ // `plugin-charts` is the namespace this package registers under itself.
47
52
  Object.entries(chartComponents).forEach(([type, component]) => {
48
- ComponentRegistry.register(type, component);
53
+ ComponentRegistry.register(type, component, { namespace: 'plugin-charts' });
49
54
  });
50
55
  ```
51
56
 
@@ -70,17 +75,27 @@ const schema: BarChartSchema = {
70
75
 
71
76
  ## Schema API
72
77
 
73
- ```typescript
74
- {
75
- type: 'bar-chart',
76
- data?: Array<Record<string, any>>, // Chart data
77
- dataKey?: string, // Y-axis data key (default: 'value')
78
- xAxisKey?: string, // X-axis label key (default: 'name')
79
- height?: number, // Chart height in pixels (default: 400)
80
- color?: string, // Bar color (default: '#8884d8')
81
- className?: string // Tailwind classes
82
- }
83
- ```
78
+ `BarChartSchema` is the published contract — import it (see **TypeScript Support**
79
+ above) rather than re-declaring this shape in your own code. It is re-exported
80
+ from `@object-ui/types`, so the type you annotate with and the schema that
81
+ validates your document are the same declaration.
82
+
83
+ | Member | Type | Required | Default | Notes |
84
+ | --- | --- | --- | --- | --- |
85
+ | `type` | `'bar-chart'` | yes | — | The registry keyword this schema renders under. |
86
+ | `data` | `Array<Record<string, any>>` | no | `[]` | Rows to plot — one bar per row. |
87
+ | `dataKey` | `string` | no | `'value'` | Row key holding the bar's value (the y axis). |
88
+ | `xAxisKey` | `string` | no | `'name'` | Row key holding the bar's category label (the x axis). |
89
+ | `height` | `number` | no | `400` | Chart height in pixels — a number, not a CSS length. |
90
+ | `color` | `string` | no | `hsl(var(--primary))` | Bar fill colour, forwarded to Recharts verbatim. |
91
+ | `className` | `string` | no | `''` | Tailwind classes. Inherited from `BaseSchema`. |
92
+
93
+ Every default above is the renderer's own — the parameter defaults of
94
+ `ChartBarRenderer`'s implementation in `src/ChartImpl.tsx`, which is what an
95
+ omitted member actually resolves to at render time. Note `color`: the type's
96
+ JSDoc and the registration's `defaultProps` both still record `'#8884d8'`, but
97
+ neither is read on the render path, so an omitted `color` renders as the theme
98
+ token above.
84
99
 
85
100
  ## Lazy Loading Architecture
86
101
 
@@ -93,7 +108,7 @@ When bundled, Vite automatically creates separate chunks:
93
108
  - `index.js` (~200 bytes) - The entry point
94
109
  - `ChartImpl-xxx.js` (~541 KB minified, ~136 KB gzipped) - The lazy-loaded implementation
95
110
 
96
- The Recharts library is only downloaded when a `chart-bar` component is actually rendered, not on initial page load.
111
+ The Recharts library is only downloaded when a `bar-chart` component is actually rendered, not on initial page load.
97
112
 
98
113
  ## Build Output Example
99
114
 
@@ -1,5 +1,6 @@
1
- import { ChartContainerConfig } from './ChartContainerImpl';
2
- import { NormalizedAxis, NormalizedSeries } from './normalizeChartSchema';
1
+ import { ChartContainerConfig } from './ChartContainerImpl.js';
2
+ import { DeclaredChartFamily, NormalizedAxis, NormalizedSeries } from './normalizeChartSchema.js';
3
+ import { ChartSegmentClickEvent } from '@object-ui/core';
3
4
  /**
4
5
  * ObjectUI
5
6
  * Copyright (c) 2024-present ObjectStack Inc.
@@ -10,11 +11,22 @@ import { NormalizedAxis, NormalizedSeries } from './normalizeChartSchema';
10
11
  import * as React from "react";
11
12
  export interface AdvancedChartImplProps {
12
13
  /**
13
- * Chart family. `combo` is renderer-local and rarely needs to be passed:
14
- * series declaring different families derive it (`effectiveChartFamily`),
15
- * which is how `@objectstack/spec` expresses a combo chart.
14
+ * Chart family, as the schema names it. `combo` is renderer-local and rarely
15
+ * needs to be passed: series declaring different families derive it
16
+ * (`effectiveChartFamily`), which is how `@objectstack/spec` expresses a
17
+ * combo chart.
18
+ *
19
+ * Typed as the declared chart families ({@link DeclaredChartFamily}: the
20
+ * spec's `ChartType` and the `object-chart` node's own union, by reference),
21
+ * so a misspelled family does not compile. The family dispatch below is the
22
+ * one place a family becomes a form: a chart for `RENDERABLE`, the number
23
+ * card for the single-value families, the tabular notice for the tabular
24
+ * ones, and a notice for anything else, which is how a value from unvalidated
25
+ * JSON outside the type is answered at runtime. ⛔ There is no default family
26
+ * (objectui#11520): an absent family is that notice too, never a bar. A
27
+ * caller that means a bar passes `'bar'`.
16
28
  */
17
- chartType?: 'bar' | 'column' | 'horizontal-bar' | 'line' | 'area' | 'pie' | 'donut' | 'radar' | 'scatter' | 'funnel' | 'combo' | 'treemap' | 'sankey';
29
+ chartType?: DeclaredChartFamily;
18
30
  data?: Array<Record<string, any>>;
19
31
  config?: ChartContainerConfig;
20
32
  xAxisKey?: string;
@@ -52,27 +64,54 @@ export interface AdvancedChartImplProps {
52
64
  categoryOrder?: string[];
53
65
  /**
54
66
  * Optional drill-down click handler. Fires when a chart segment is clicked
55
- * with `{ category, series, value }`. Wired for bar/horizontal-bar/line/
56
- * area/pie/donut. Other chart types are no-ops in L1.
67
+ * with `{ category, categoryId, series, value }`. Wired for
68
+ * bar/horizontal-bar/line/area/pie/donut/funnel/scatter/treemap/sankey —
69
+ * each has its own click handler attached to its mark(s) below — and for
70
+ * `combo`, whose `Bar`/`Line`/`Area` marks are the same components the plain
71
+ * cartesian branch renders and now emit the same event with the same
72
+ * semantics (ruled on objectui#4692).
73
+ *
74
+ * `combo` differs from the plain cartesian branch in exactly ONE way, and
75
+ * deliberately: **only its marks drill.** A click on the plot surface or an
76
+ * axis stays silent there, where the plain branch would fall back to its
77
+ * axis-level answer. A combo plots several measures on one plot, so a
78
+ * surface click has no single series answer to give — the same reasoning
79
+ * objectui#4672's ruling used for the pivoted case. The plain branch keeps
80
+ * that fallback because its own marks share one measure, so its axis answer
81
+ * is either unambiguous or explicitly named by recharts.
82
+ *
83
+ * That combo drills at all is what keeps its DERIVATION from costing an
84
+ * interaction. The branch is reachable without authoring
85
+ * `chartType: 'combo'`: `effectiveChartFamily` derives it whenever a series'
86
+ * own family disagrees with the chart's own (see its doc comment), so giving
87
+ * one series of a drillable chart a different `type` used to turn that
88
+ * chart's drill off with nothing in the authored spec saying drill was
89
+ * touched. It now changes the mark and nothing else.
90
+ *
91
+ * Radar is the one remaining no-op in L1 — its branch attaches no click
92
+ * handler anywhere.
57
93
  */
58
- onChartClick?: (event: {
59
- category?: string;
60
- series?: string;
61
- value?: number;
62
- }) => void;
94
+ onChartClick?: (event: ChartSegmentClickEvent) => void;
63
95
  /**
64
96
  * Spec `ChartAxis` presentation for the category axis — `format` (tick
65
- * formatter), `title`, `showGridLines`. Its `field` already arrived as
97
+ * formatter), `title`, `showGridLines`, `position` (the side it is drawn
98
+ * on — see `placeXAxis`), and on scatter's measure x axis `min` / `max` /
99
+ * `stepSize` / `logarithmic` as well. Its `field` already arrived as
66
100
  * {@link AdvancedChartImplProps.xAxisKey}. Resolved by
67
101
  * `normalizeChartSchema`, so the renderer never parses the author shape.
68
102
  */
69
103
  xAxis?: NormalizedAxis;
70
104
  /**
71
105
  * Spec `ChartConfig.yAxis` — one entry per value axis, in declaration order.
72
- * Index 0 is the primary axis; a second entry (or one with
73
- * `position: 'right'`) turns on the secondary axis that `series[].yAxis`
74
- * binds to. Carries `min`/`max` (domain), `format` (ticks), `logarithmic`
75
- * (scale) and `title`.
106
+ * Index 0 is the primary axis. A second entry turns on the second value
107
+ * axis; each entry's `position` picks the slot it is drawn in, and
108
+ * `series[].yAxis` binds a series to a slot (`placeYAxes` in
109
+ * `normalizeChartSchema`). A lone entry is the chart's only value axis,
110
+ * drawn on the side it names. Carries `min`/`max` (domain), `format`
111
+ * (ticks), `logarithmic` (scale) and `title`. An entry after the second
112
+ * (after the first on `scatter`, which draws one y axis) is drawn on no
113
+ * axis, and the chart carries a note naming it (`yAxisUndrawnNotes`,
114
+ * objectui#10691, objectui#10721).
76
115
  */
77
116
  yAxes?: NormalizedAxis[];
78
117
  /** Spec `ChartConfig.showLegend`. Omitted → shown (the schema default). */
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ import { ChartSegmentClickEvent } from '@object-ui/core';
2
3
  export interface ChartBarRendererProps {
3
4
  schema: {
4
5
  type: string;
@@ -33,12 +34,23 @@ export interface ChartRendererProps {
33
34
  * the same key, so declaring only the internal shape here made
34
35
  * `series: [{ name: 'total' }]` a type error on an author who was writing
35
36
  * the protocol correctly — and, until #2945, one whose chart also rendered
36
- * blank. `normalizeChartSchema` translates; an array that already speaks the
37
- * internal shape passes through untouched.
37
+ * blank. `normalizeChartSchema` translates every entry, of either shape,
38
+ * uniformly — see the normalization comment in the component body.
39
+ *
40
+ * Both arms carry the per-series family override `type`, with the same
41
+ * member type (objectui#8086): the renderer honours it on either shape,
42
+ * because every entry goes through `normalizeSeries` (`01c27c431`), and
43
+ * `ChartDataSeriesSchema` declares `dataKey` and `name` independently
44
+ * optional beside it — so a `dataKey` entry carrying `type` is what the
45
+ * contract and the renderer both accept, and this union says so.
46
+ * `chartType` stays on the `dataKey` arm alone: it is the renderer's
47
+ * INTERNAL spelling of `type`, and it wins when an entry writes both.
48
+ * Pinned at compile time in `ChartRenderer.seriesTypeArm-8086.test.ts`.
38
49
  */
39
50
  series?: Array<{
40
51
  dataKey: string;
41
52
  label?: string;
53
+ type?: string;
42
54
  variant?: 'current' | 'comparison';
43
55
  opacity?: number;
44
56
  dashArray?: string;
@@ -88,11 +100,7 @@ export interface ChartRendererProps {
88
100
  isAnimationActive?: boolean;
89
101
  };
90
102
  /** Drill-down click handler — wired by ObjectChart when drillDown is enabled. */
91
- onChartClick?: (event: {
92
- category?: string;
93
- series?: string;
94
- value?: number;
95
- }) => void;
103
+ onChartClick?: (event: ChartSegmentClickEvent) => void;
96
104
  }
97
105
  /**
98
106
  * ChartRenderer - The public API for the advanced chart component
@@ -1,9 +1,20 @@
1
1
  import { default as React } from 'react';
2
+ import { humanizeLabel, ChartSegmentClickEvent } from '@object-ui/core';
3
+ import { BaseSchema, ObjectChartSchema } from '@object-ui/types';
2
4
  /**
3
5
  * Humanize a snake_case or kebab-case string into Title Case.
4
- * Local implementation to avoid a dependency on @object-ui/fields.
6
+ *
7
+ * Was a local implementation here "to avoid a dependency on
8
+ * `@object-ui/fields`" — byte-identical to that package's export, which
9
+ * `plugin-grid` / `plugin-gantt` / `plugin-detail` read, so the two could drift
10
+ * into a live disagreement (one dashboard can hold a chart and a grid over the
11
+ * same stored value). objectui#5444 moved the single implementation to
12
+ * `@object-ui/core`, which this package already depends on: the dependency the
13
+ * copy existed to avoid is still avoided, and there is now one function rather
14
+ * than two. Re-exported at module scope because that is the surface this file
15
+ * has always offered.
5
16
  */
6
- export declare function humanizeLabel(value: string): string;
17
+ export { humanizeLabel };
7
18
  /**
8
19
  * The result column an object-bound `aggregate` projects its value under
9
20
  * (framework#3701, `chartAggregateValueKey` in `@objectstack/spec/ui`).
@@ -18,16 +29,82 @@ export declare function aggregateValueKey(aggregate: {
18
29
  field?: string;
19
30
  function?: string;
20
31
  }): string;
32
+ /**
33
+ * The category axis this chart plots BY — resolved ONCE, for every reader.
34
+ *
35
+ * ## Why this is a function and not three inline reads
36
+ *
37
+ * "Which column is the category?" was spelled three times in this file, at
38
+ * three fidelities, and the refusal below would have been a fourth. That is the
39
+ * objectui#5042 / objectui#7544 drift shape — a second opinion of one question
40
+ * that nothing keeps in agreement — and objectui#7544's fix
41
+ * (`resolveListChartBinding` in `plugin-list/src/ListView.tsx`) is the same move
42
+ * one layer up, on the AUTHORED list-view chart block.
43
+ *
44
+ * ⚠️ It is one layer up, not this layer. `resolveListChartBinding` reads
45
+ * `{ chart, options.chart }` with `xAxisField` / `categoryField` / `yAxisFields`
46
+ * — the block an author writes on a LIST VIEW. By the time a schema reaches
47
+ * this component the relays have already translated that block into
48
+ * `{ objectName, aggregate, xAxisKey, series }`, and the producers that never
49
+ * had such a block at all (the two dashboard surfaces, and directly authored
50
+ * `object-chart` metadata) compose the translated shape straight away. So the
51
+ * upstream resolver cannot be CALLED here — asked for `schema.chart` it would
52
+ * read `undefined` off every chart this component renders and answer
53
+ * "unresolvable" for all of them. What is shared is the QUESTION and the rule
54
+ * for answering it; the vocabulary is necessarily this layer's.
55
+ *
56
+ * ## The three legs, in the order the render pipeline applies them
57
+ *
58
+ * 1. A structured `GroupBy` node (`{ field, dateGranularity }`) — its `field`
59
+ * IS the category, and nothing substitutes for it: `runAggregate` sends the
60
+ * node itself as the server's `groupBy`, so a node naming no field has no
61
+ * other spelling that could rescue it.
62
+ * 2. A legacy string `aggregate.groupBy`.
63
+ * 3. Otherwise the chart plots rows as fetched, and the category is whatever
64
+ * `normalizeChartSchema` — this package's ONE translation of the spec's
65
+ * author-facing chart shape into the renderer's internal contract — resolves
66
+ * for the x axis: `xAxisKey`, else spec `xAxis.field`, else a bare string
67
+ * `xAxis`. Reading `schema.xAxisKey` alone here would have refused a chart
68
+ * that authored the spec spelling and renders correctly today, because
69
+ * `ChartRenderer` normalizes DOWNSTREAM of this component.
70
+ *
71
+ * Returns `undefined` only when the schema names no category by any declared
72
+ * spelling — a real answer, and what {@link ObjectChart}'s refusal keys on.
73
+ *
74
+ * ⚠️ LEDGERED, on purpose: this is the one `normalizeChartSchema` call in the
75
+ * package that passes NO language (objectui#8943). It is safe here and only
76
+ * here — the call reads `.xAxisKey`, a COLUMN NAME, and nothing else. No
77
+ * `I18nLabel` slot on the result is ever read through this path, so there is no
78
+ * label for a language to resolve. Keeping the function pure (it is called from
79
+ * plain module scope, outside any component) is worth more than a language
80
+ * argument that would change no byte of its answer. ⛔ If this ever starts
81
+ * reading `title` / `subtitle` / `description` / an axis `title` / a series
82
+ * `label`, it needs the viewer's language and can no longer be called from
83
+ * outside a component.
84
+ */
85
+ export declare function resolveChartCategoryField(schema: {
86
+ aggregate?: {
87
+ groupBy?: unknown;
88
+ } | undefined;
89
+ xAxisKey?: unknown;
90
+ xAxis?: unknown;
91
+ } | undefined | null): string | undefined;
21
92
  /** Suffix the previous-window value carries under a compareTo overlay. */
22
93
  export declare const COMPARISON_SUFFIX = "__comparison";
23
94
  /**
24
95
  * Client-side aggregation for fetched records.
25
96
  * Groups records by `groupBy` field and applies the aggregation function
26
97
  * to the `field` values in each group.
98
+ *
99
+ * `function` is optional because the `switch` below already implements that:
100
+ * an absent (or unknown) function falls through to `sum`. The parameter used to
101
+ * say `function: string`, which was a claim about the CALLER rather than about
102
+ * this body — and no caller could satisfy it once `ObjectChartSchema.aggregate`
103
+ * was declared with the requiredness its own reads have (objectui#7946).
27
104
  */
28
105
  export declare function aggregateRecords(records: any[], aggregate: {
29
106
  field?: string;
30
- function: string;
107
+ function?: string;
31
108
  groupBy: string;
32
109
  }): any[];
33
110
  /**
@@ -45,7 +122,51 @@ export declare function aggregateRecords(records: any[], aggregate: {
45
122
  */
46
123
  export declare function resolveGroupByLabels(data: any[], groupByField: string, objectSchema: any, dataSource?: any, translateOption?: (value: string, fallbackLabel: string) => string): Promise<any[]>;
47
124
  export { extractRecords } from '@object-ui/core';
48
- export declare const ObjectChart: (props: any) => React.JSX.Element;
125
+ /**
126
+ * Props of {@link ObjectChart} — anchored to the published `ObjectChartSchema`
127
+ * (objectui#7946, maintainer ruling 2026-09-09 option A), as objectui#6576 did
128
+ * for `ObjectGalleryProps.schema`.
129
+ *
130
+ * ## What this replaces, and what it buys
131
+ *
132
+ * This component was published as `(props: any)`, so every `schema={{ … }}`
133
+ * literal handed to it — including the two in `app-shell`'s `ObjectView` — was
134
+ * type-checked against NOTHING. That is the mechanism that let objectui#7891's
135
+ * undeclared `config` rung live from the day it was written until someone read
136
+ * the spec by hand, and it is why the two `as any` casts on those literals
137
+ * measured INERT: an `any` consumer accepts a cast and its absence alike.
138
+ *
139
+ * With the anchor, a wrong VALUE TYPE on a declared key is a compile error at
140
+ * the producer (`xAxisKey: 42`, `series: 'x'`, `type: 'chart'`, and every
141
+ * `BaseSchema` member — `visible: 42`). ⚠️ A MISSPELLED key is still accepted:
142
+ * `BaseSchema` carries `[key: string]: any` (objectui#5155), the same ceiling
143
+ * objectui#6576 accepted knowingly. `__tests__/ObjectChart.schemaAnchor-7946.test.ts`
144
+ * pins both halves, the ceiling included, so the anchor is not read as more
145
+ * than it is.
146
+ */
147
+ export interface ObjectChartProps {
148
+ /**
149
+ * The `object-chart` node — anchored to the exported schema type. Every
150
+ * `BaseSchema` member is writable, `bind` / `className` / `data` included;
151
+ * the widget's own keys are declared there.
152
+ */
153
+ schema: ObjectChartSchema;
154
+ /**
155
+ * Host data source. `any` deliberately, and it is NOT a residue of the shape
156
+ * this card removed: it is the type `SchemaRendererContext.dataSource`
157
+ * itself carries, and this component falls back to that context value, so a
158
+ * narrower declaration here would claim a guarantee the fallback cannot
159
+ * keep. Narrowing it is a repo-wide `dataSource` interface, not this card.
160
+ */
161
+ dataSource?: any;
162
+ /**
163
+ * Optional host-owned segment click. When provided (e.g. a dataset widget
164
+ * that owns precise drill-through), it takes over the chart click and the
165
+ * widget's own object-drill drawer is suppressed.
166
+ */
167
+ onSegmentClick?: (ev: ChartSegmentClickEvent) => void;
168
+ }
169
+ export declare const ObjectChart: (props: ObjectChartProps) => React.JSX.Element;
49
170
  /**
50
171
  * Registry shell for `object-chart` — maps the spec's
51
172
  * `PageComponentSchema.dataSource` binding onto the keys {@link ObjectChart}
@@ -57,5 +178,23 @@ export declare const ObjectChart: (props: any) => React.JSX.Element;
57
178
  * spec documents rendered an empty frame with no error and no request. Lives
58
179
  * here, beside the registration, rather than in `ChartContainerImpl` — the
59
180
  * binding is a registry-boundary concern, not a rendering one.
181
+ *
182
+ * ## Its props type — the node BEFORE the gate (objectui#8885)
183
+ *
184
+ * This shell used to be published as `(props: any)`. `schema` is now
185
+ * `BaseSchema`, the node `SchemaRenderer` hands every registered renderer, and
186
+ * ⛔ NOT `ObjectChartSchema`. The node arrives here before the gate has mapped
187
+ * its `dataSource` binding, and nothing has validated it as a chart. Typing it
188
+ * post-gate would claim a validation that has not happened, and that type's
189
+ * `type: 'object-chart'` literal is also false for the `chart` alias that
190
+ * `index.tsx` registers this same shell under.
191
+ *
192
+ * Every other prop is `ObjectChart`'s own, taken from `ObjectChartProps`, so
193
+ * the type is CLOSED: a misspelled prop name is an excess-property error, not
194
+ * an `any` passed straight through. Both halves are existing exported names;
195
+ * no new type is minted. Pinned by
196
+ * `__tests__/ObjectChartBlock.props-8885.test.tsx`.
60
197
  */
61
- export declare const ObjectChartBlock: (props: any) => React.JSX.Element;
198
+ export declare const ObjectChartBlock: (props: Omit<ObjectChartProps, "schema"> & {
199
+ schema: BaseSchema;
200
+ }) => React.JSX.Element;
package/dist/index.d.ts CHANGED
@@ -1,10 +1,70 @@
1
- import { ChartBarRenderer, ChartRenderer } from './ChartRenderer';
2
- export type { BarChartSchema } from './types';
1
+ import { ChartBarRenderer, ChartRenderer } from './ChartRenderer.js';
2
+ export type { BarChartSchema } from './types.js';
3
3
  export { ChartBarRenderer, ChartRenderer };
4
- export { ObjectChart, ObjectChartBlock } from './ObjectChart';
5
- export { normalizeChartSchema } from './normalizeChartSchema';
6
- export type { NormalizedChartSchema } from './normalizeChartSchema';
4
+ export { ObjectChart, ObjectChartBlock } from './ObjectChart.js';
5
+ export type { ObjectChartProps } from './ObjectChart.js';
6
+ export { normalizeChartSchema } from './normalizeChartSchema.js';
7
+ export type { NormalizedChartSchema } from './normalizeChartSchema.js';
7
8
  export declare const chartComponents: {
8
- 'bar-chart': import('react').FC<import('./ChartRenderer').ChartBarRendererProps>;
9
- chart: import('react').FC<import('./ChartRenderer').ChartRendererProps>;
9
+ 'bar-chart': import('react').FC<import('./ChartRenderer.js').ChartBarRendererProps>;
10
+ chart: import('react').FC<import('./ChartRenderer.js').ChartRendererProps>;
10
11
  };
12
+ /**
13
+ * ⛔ The `pie-chart`, `donut-chart` and `radar-chart` node type keys are
14
+ * RETIRED (objectui#10859 batch 8, phase 2c, the seat's fork ruling on that
15
+ * card, by the objectui#10393 / objectui#8760 route). Each family is reached as
16
+ * `{ type: 'chart', chartType: 'pie' | 'donut' | 'radar' }`, the spelling that
17
+ * draws ("chartType is the spelling that draws", objectui#8760).
18
+ *
19
+ * ## What was here, and why it went
20
+ *
21
+ * Three registrations of the generic `ChartRenderer`, one per key, each in the
22
+ * `plugin-charts` namespace, so each stored `plugin-charts:KEY` and the bare
23
+ * `KEY` fallback; their families came from `CHART_TYPE_KEYWORD_FAMILIES` rows
24
+ * (objectui#7401), which went in the same change. No `@object-ui/types` arm
25
+ * claims any of the three, so `objectui validate` refused such a node at
26
+ * `type` while the registry mounted it.
27
+ *
28
+ * ## Why unregistering is the whole retirement
29
+ *
30
+ * Phase 2b found one producer and reported the three as a fork:
31
+ * `examples/chart-examples.ts` in this package authored all three, pinned by
32
+ * objectui#7401's "the in-repo examples draw what they say". The fork ruling
33
+ * moved those examples to `chart` + `chartType` first; the 7401 pin still
34
+ * asserts each draws its family and no bar. Re-measured for phase 2c after that
35
+ * move: 0 producers in source, docs, examples, the catalog or objectstack, and
36
+ * 0 runtime emission. The console's lazy stubs went in the same change, so no
37
+ * table or host keeps a key alive. The pie, donut and radar FAMILIES are
38
+ * untouched.
39
+ */
40
+ /**
41
+ * ⛔ The `scatter-chart` node type key is RETIRED (objectui#10859 batch 8,
42
+ * phase 2b, the seat's ruling on that card, by the objectui#10393 /
43
+ * objectui#8760 route). The scatter family is reached the way every other
44
+ * family is: `{ type: 'chart', chartType: 'scatter' }`, the spelling that
45
+ * draws ("chartType is the spelling that draws", objectui#8760).
46
+ *
47
+ * ## What was here, and why it went
48
+ *
49
+ * A registration of the generic `ChartRenderer` under `scatter-chart` in the
50
+ * `plugin-charts` namespace (described, not quoted: source readers such as
51
+ * `@object-ui/types`' node-slot test take a quoted call in a comment for a live
52
+ * one) — a second key on the generic renderer, which stored
53
+ * both `plugin-charts:scatter-chart` and the bare `scatter-chart` fallback, and
54
+ * whose family came from its `CHART_TYPE_KEYWORD_FAMILIES` row (objectui#7401).
55
+ * No `@object-ui/types` arm claims it, so `objectui validate` refused a node
56
+ * authored `type: 'scatter-chart'` at `type` while the registry mounted it.
57
+ *
58
+ * ## Why unregistering is the whole retirement
59
+ *
60
+ * Nothing wrote the node: 0 producers in source, docs, examples, the catalog
61
+ * or objectstack, and 0 runtime emission, re-measured for phase 2b. Its
62
+ * `CHART_TYPE_KEYWORD_FAMILIES` row and the console's lazy stub
63
+ * (`apps/console/src/register-plugins.ts`) went in the same change, so no table
64
+ * or host keeps the key alive. The `scatter` FAMILY is untouched.
65
+ *
66
+ * `pie-chart`, `donut-chart` and `radar-chart` were ruled the same way. Phase
67
+ * 2b kept them registered as a fork, because `examples/chart-examples.ts` still
68
+ * authored them; phase 2c retired them once those examples had moved (the note
69
+ * above).
70
+ */