@object-ui/plugin-charts 17.1.0 → 17.2.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 CHANGED
@@ -1,5 +1,101 @@
1
1
  # @object-ui/plugin-charts
2
2
 
3
+ ## 17.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4a51e77: Stop declaring 14 symbols across ten packages under names `@objectstack/spec`
8
+ owns (objectui#3161, objectstack#4115 batch 7 — the long tail, one or two
9
+ entries per package). All ten packages leave the ledger, which drops from 17
10
+ collisions across 11 packages to 3 across 1.
11
+
12
+ **Renamed exports** — in every case the spec exports the same name for a
13
+ _different_ thing, so the old name was a mis-description rather than a dialect:
14
+
15
+ | package | was | now | what the spec's same-named export is |
16
+ | :------------------------- | :--------------------------------- | :--------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------- |
17
+ | `@object-ui/fields` | `FieldWidgetProps` | `FieldWidgetComponentProps` | the DECLARED field-widget plugin props contract (a zod object; `field.type` is the `FieldType` enum, `readonly`/`required` carry defaults) |
18
+ | `@object-ui/layout` | `PageHeaderProps` | `PageHeaderComponentProps` | the authored `page:header` node — a zod schema of `title`, `subtitle`, an icon NAME, `breadcrumb`, `actions: string[]` |
19
+ | `@object-ui/layout` | `Page` | `PageNodeRenderer` | the authored page metadata DOCUMENT (`name`, `label`, `type`, `regions`) |
20
+ | `@object-ui/plugin-detail` | `ObjectFieldLike` | `ObjectDefFieldLike` | the i18n duck type `translateObject` walks (`help`/`description`, plus `[key: string]: any`) |
21
+ | `@object-ui/plugin-grid` | `ColumnSummaryConfig` | `ColumnSummarySetting` | the OBJECT form of `ListColumn.summary` **only** — the local one was the whole union, shorthand included |
22
+ | `@object-ui/plugin-grid` | `isMultiValueField` | `hasMultiValueShape` | the spec's classifier, which requires a def with a `type`; the local one is called with `undefined` |
23
+ | `@object-ui/collaboration` | `RealtimeConfig` | `RealtimeSubscriptionConfig` | the app's realtime DECLARATION (`enabled`, `transport`, `subscriptions[]`) |
24
+ | `@object-ui/plugin-charts` | `ChartConfig` | `ChartContainerConfig` | the authored chart document (`type`, `xAxis`, `series`, `showLegend`, …) |
25
+ | `@object-ui/plugin-form` | `FormSection` / `FormSectionProps` | `FormSectionContainer` / `FormSectionContainerProps` | the authored form-section metadata (`name`, `pane`, `visibleWhen`, `fields`) |
26
+ | `@object-ui/providers` | `Theme` | `ThemePreference` | a whole theme DOCUMENT (`name`, `label`, `colors`, `typography`) |
27
+ | `@object-ui/runner` | `App` (default export) | `RunnerApp` | the authored application metadata type **and** the `App.create()` builder |
28
+ | `@object-ui/sdui-parser` | `ValidationResult` | `ManifestValidationResult` | plugin-manifest validation (`{ valid, errors?, warnings? }`), exported from both `kernel` and `contracts` |
29
+
30
+ `ManifestValidationResult` follows the `<what was validated>Validation<Error|Result>`
31
+ convention registered on objectstack#4115 (`@object-ui/core` took
32
+ `SchemaNodeValidationResult` in batch 4). `PageHeaderComponentProps` deliberately
33
+ reuses the name `@object-ui/app-shell` already chose for its own header props in
34
+ batch 3, so one concept does not acquire two dialect names one package apart.
35
+
36
+ **Now derived from the spec instead of hand-written:**
37
+
38
+ - `@object-ui/fields` — `isFileIdToken` is re-exported from
39
+ `@objectstack/spec/data`. The local copy was character-for-character identical
40
+ to the spec's function while its comment said it "mirrors" it, so every
41
+ behaviour test passed and only reference identity could tell the two apart.
42
+ The regex is a wire decision: widening it server-side while a copy here kept
43
+ the old bound would make every new id read as "not a reference", and the
44
+ widget would submit the legacy inline blob to a backend expecting a reference.
45
+ - `@object-ui/plugin-detail` — `FeedFilterMode` is re-exported from
46
+ `@objectstack/spec/data`, in a file that already imported the sibling
47
+ `FeedItemType` from the spec.
48
+ - `@object-ui/plugin-grid` — the eleven-member aggregation union is now the
49
+ spec's `ColumnSummary` enum, so the total `Record<ColumnSummaryType, string>`
50
+ label map turns a member the spec adds into a compile error instead of a
51
+ blank footer cell. `ColumnSummarySetting` is `NonNullable<ListColumn['summary']>`,
52
+ i.e. whatever forms the spec itself accepts. `hasMultiValueShape` delegates to
53
+ the spec's `isMultiValueField` rather than re-deriving it from
54
+ `MULTI_OPTION_TYPES` / `MULTI_CAPABLE_TYPES`.
55
+ - `@object-ui/providers` — `ThemePreference` is the spec's `ThemeMode` union
56
+ plus the one legacy `'system'` spelling this provider still honours for stored
57
+ preferences, read off the schema's own `_zod` carrier so the package takes no
58
+ zod dependency.
59
+
60
+ `@objectstack/spec` moves from `devDependencies` to `dependencies` in
61
+ `@object-ui/fields` (it re-exports a runtime function) and `@object-ui/providers`
62
+ (its public `.d.ts` now references the spec).
63
+
64
+ Scored `minor`, not `major`, per this repo's fixed-group rule — objectui's major
65
+ tracks `@objectstack`, so breaking changes of our own ship as minor with the
66
+ semantics spelled out above (see AGENTS.md §版本号策略). A `major` here would carry
67
+ all 39 packages of the fixed group to `18.0.0` and off objectstack's 17.x line.
68
+
69
+ ### Patch Changes
70
+
71
+ - Updated dependencies [4ae0ac4]
72
+ - Updated dependencies [696e3c1]
73
+ - Updated dependencies [bca45cc]
74
+ - Updated dependencies [a889e31]
75
+ - Updated dependencies [09d30a4]
76
+ - Updated dependencies [4bf612c]
77
+ - Updated dependencies [335041c]
78
+ - Updated dependencies [b414983]
79
+ - Updated dependencies [256f8cc]
80
+ - Updated dependencies [d9668a7]
81
+ - Updated dependencies [4b470b9]
82
+ - Updated dependencies [cb82705]
83
+ - Updated dependencies [f572849]
84
+ - Updated dependencies [f6e8d78]
85
+ - Updated dependencies [ea96284]
86
+ - Updated dependencies [d3584c6]
87
+ - Updated dependencies [a8ad6c0]
88
+ - Updated dependencies [444457c]
89
+ - Updated dependencies [850033c]
90
+ - Updated dependencies [022e4c3]
91
+ - Updated dependencies [009e25d]
92
+ - Updated dependencies [726b89c]
93
+ - @object-ui/types@17.2.0
94
+ - @object-ui/components@17.2.0
95
+ - @object-ui/core@17.2.0
96
+ - @object-ui/react@17.2.0
97
+ - @object-ui/i18n@17.2.0
98
+
3
99
  ## 17.1.0
4
100
 
5
101
  ### Minor Changes
@@ -1,4 +1,4 @@
1
- import { ChartConfig } from './ChartContainerImpl';
1
+ import { ChartContainerConfig } from './ChartContainerImpl';
2
2
  import { NormalizedAxis, NormalizedSeries } from './normalizeChartSchema';
3
3
  /**
4
4
  * ObjectUI
@@ -16,7 +16,7 @@ export interface AdvancedChartImplProps {
16
16
  */
17
17
  chartType?: 'bar' | 'column' | 'horizontal-bar' | 'line' | 'area' | 'pie' | 'donut' | 'radar' | 'scatter' | 'funnel' | 'combo' | 'treemap' | 'sankey';
18
18
  data?: Array<Record<string, any>>;
19
- config?: ChartConfig;
19
+ config?: ChartContainerConfig;
20
20
  xAxisKey?: string;
21
21
  /**
22
22
  * Plotted series, in the renderer's internal shape. Authors write the spec
@@ -11,7 +11,23 @@ declare const THEMES: {
11
11
  readonly light: "";
12
12
  readonly dark: ".dark";
13
13
  };
14
- export type ChartConfig = {
14
+ /**
15
+ * Per-series presentation for `<ChartContainer>`: a map from series dataKey to
16
+ * the legend label, icon and colour (or per-theme colours) that key renders
17
+ * with. Shadcn's chart primitive, kept in this package's own copy of it.
18
+ *
19
+ * Named `ChartContainerConfig`, not `ChartConfig` (objectui#3161,
20
+ * objectstack#4115 ledger batch 7). `@objectstack/spec/ui` owns `ChartConfig`
21
+ * for the authored chart METADATA — `type: bar | line | pie | …`, `xAxis`,
22
+ * `yAxis`, `series`, `showLegend`, `annotations` — and the collision was not
23
+ * theoretical here: `AdvancedChartImpl.tsx` declares `config?: ChartConfig`
24
+ * meaning THIS map, three lines above doc comments that say "Spec
25
+ * `ChartConfig.yAxis`" and "Spec `ChartConfig.showLegend`" meaning the other
26
+ * one. One identifier, two concepts, one file. `normalizeChartSchema` is the
27
+ * seam between them: it reads the authored spec chart and produces the
28
+ * renderer's axes/series, of which this map is the styling half.
29
+ */
30
+ export type ChartContainerConfig = {
15
31
  [k in string]: {
16
32
  label?: React.ReactNode;
17
33
  icon?: React.ComponentType;
@@ -24,7 +40,7 @@ export type ChartConfig = {
24
40
  });
25
41
  };
26
42
  declare function ChartContainer({ id, className, children, config, disableSettleRemount, ...props }: React.ComponentProps<"div"> & {
27
- config: ChartConfig;
43
+ config: ChartContainerConfig;
28
44
  children: React.ComponentProps<typeof ResponsiveContainer>["children"];
29
45
  /**
30
46
  * Skip the settle re-mount below. Set by callers that render their series with
@@ -36,7 +52,7 @@ declare function ChartContainer({ id, className, children, config, disableSettle
36
52
  }): React.JSX.Element;
37
53
  declare const ChartStyle: ({ id, config }: {
38
54
  id: string;
39
- config: ChartConfig;
55
+ config: ChartContainerConfig;
40
56
  }) => React.JSX.Element | null;
41
57
  declare const ChartTooltip: typeof Tooltip;
42
58
  declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: any): React.JSX.Element | null;