Skip to content

Commit 66f4268

Browse files
committed
Update type docs/generator/schema per removal of Chart Studio code
1 parent 2e5e84c commit 66f4268

5 files changed

Lines changed: 18 additions & 107 deletions

File tree

src/types/ARCHITECTURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The split:
6161
- **`_internal` namespace** wrapping types whose direct names would
6262
mislead consumers (Marker is scatter-only, Line is the marker
6363
outline) or are schema-internal helpers (AutoRangeOptions,
64-
Lighting, Stream, ErrorY). Reachable as `_internal.Marker` etc.
64+
Lighting, ErrorY). Reachable as `_internal.Marker` etc.
6565
but not at the top level.
6666

6767
Generated from `plot-schema.json` by `tasks/generate_schema_types.mjs`.

src/types/GENERATOR.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,11 @@ const SHARED_NAME_OVERRIDES = new Map([
7575
['legendgrouptitle', 'LegendGroupTitle'],
7676
['error_y', 'ErrorY'],
7777
['error_x', 'ErrorX'],
78-
['stream', 'Stream'],
7978
]);
8079
```
8180

8281
Names in `SHARED_NAME_OVERRIDES` bypass `MIN_PROPERTIES`, so small
83-
containers like `Stream` (2 properties) can be opted in as shared.
82+
containers like `ErrorX` / `ErrorY` (3 properties) can be opted in as shared.
8483

8584
After fingerprinting completes, the generator **injects** the `transition`
8685
and `frame` subtrees from `schema.animation` as shared types (`Transition`
@@ -133,11 +132,11 @@ without overrides (all fields are concrete booleans).
133132

134133
`ConfigBase` is emitted from `schema.config` after registering Edits'
135134
fingerprint in `sharedTypes`, so `edits?: Edits` references the named
136-
interface rather than re-inlining the subtree. Seven config fields whose
135+
interface rather than re-inlining the subtree. Six config fields whose
137136
schema `valType` is `any` (`locales`, `modeBarButtons`,
138137
`modeBarButtonsToAdd`, `modeBarButtonsToRemove`, `setBackground`,
139-
`showSources`, `toImageButtonOptions`) come through as `any`; the
140-
hand-written `Config` in `core/config.d.ts` overrides them via
138+
`toImageButtonOptions`) come through as `any`; the hand-written `Config`
139+
in `core/config.d.ts` overrides them via
141140
`Omit<ConfigBase, keyof ConfigOverrides> & ConfigOverrides`.
142141

143142
### Phase 6: Internal namespace
@@ -147,7 +146,7 @@ Names in `INTERNAL_INTERFACES` are wrapped in `export namespace _internal {
147146

148147
```js
149148
const INTERNAL_INTERFACES = new Set([
150-
'AutoRangeOptions', 'ErrorY', 'Lighting', 'Line', 'Marker', 'Stream'
149+
'AutoRangeOptions', 'ErrorY', 'Lighting', 'Line', 'Marker'
151150
]);
152151
```
153152

@@ -190,7 +189,7 @@ src/types/generated/schema.d.ts
190189
│ Pattern, TickFormatStops, LegendGroupTitle, ...)
191190
├── Internal shared interfaces in `namespace _internal` (Marker, Line,
192191
│ AutoRangeOptions,
193-
│ Lighting, Stream, ErrorY)
192+
│ Lighting, ErrorY)
194193
├── Trace interfaces (ScatterData, BarData, ... — 49 traces)
195194
├── Layout component interfaces (LayoutAxis, Legend, Scene, Annotation, etc.)
196195
├── Layout interface

src/types/core/config.d.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,13 @@ export interface ToImageButtonOptions {
7070
// ---------------------------------------------------------------------------
7171

7272
/**
73-
* Hand-written overrides for the seven `schema.config` fields whose
73+
* Hand-written overrides for the six `schema.config` fields whose
7474
* `valType` is `any`. These accept functions or arbitrary-key maps that the
7575
* JSON schema fundamentally cannot describe, so they stay typed by hand.
7676
*/
7777
interface ConfigOverrides {
7878
/** Override the background color: a static color name, or a function called per-render. */
7979
setBackground?: 'opaque' | 'transparent' | ((gd: PlotlyHTMLElement, bgColor: string) => void);
80-
/** Source attribution shown at the bottom of the graph. */
81-
showSources?: false | ((gd: PlotlyHTMLElement) => void | Promise<void>);
8280
/** Define fully custom mode bar buttons as nested array of button groups. */
8381
modeBarButtons?: ModeBarButtonAny[][] | false;
8482
/** Add mode bar buttons using config objects or default-button names. */

0 commit comments

Comments
 (0)