@@ -7,7 +7,7 @@ This directory documents the TypeScript conversion in progress.
77| [ SETUP.md] ( SETUP.md ) | First-time contributor — toolchain overview, npm scripts |
88| [ ARCHITECTURE.md] ( ARCHITECTURE.md ) | Anyone working with types — directory layout, public/private split |
99| [ CONVERTING_ATTRIBUTES.md] ( CONVERTING_ATTRIBUTES.md ) | ** Contributor doing conversion work** — step-by-step recipe |
10- | [ GENERATOR.md] ( GENERATOR.md ) | Maintainer extending or debugging the type generator |
10+ | [ GENERATOR.md] ( GENERATOR.md ) | Maintainer extending or debugging the schema type generator |
1111
1212## Status
1313
@@ -16,7 +16,8 @@ This directory documents the TypeScript conversion in progress.
1616- ` AttributeMap ` validation machinery: ✅ done
1717- ** Schema-based type generator** : ✅ done — all trace types + layout + shared interfaces
1818- Consumer entry point (` lib/index.d.ts ` , wired via ` package.json#types ` ): ✅ done
19- - CI gates (` typecheck ` + ` schema-typegen-diff-check ` ): ✅ done
19+ - Modular entry points (` plotly.js/lib/<entry> ` , wired via ` package.json#typesVersions ` ): ✅ done
20+ - CI gates (` typecheck ` + ` schema-typegen-diff-check ` + ` entry-point-types-check ` ): ✅ done
2021- First attribute file converted (modebar): ✅ done
2122- Conversion of remaining files: 🚧 in progress
2223
@@ -36,12 +37,24 @@ This directory documents the TypeScript conversion in progress.
3637 ` Datum[] | Datum[][] | TypedArray ` for * every* ` data_array ` so 2D/3D usage
3738 typechecks, but the trade-off is that 1D-only fields also accept 2D arrays.
3839
39- The published consumer surface lives at [ ` lib/index.d.ts ` ] ( ../../lib/index.d.ts ) .
40+ The published consumer surface has two parts. [ ` lib/index.d.ts ` ] ( ../../lib/index.d.ts )
41+ declares the full library for ` import ... from 'plotly.js' ` . The generated
42+ declarations in [ ` generated/entry_points/ ` ] ( generated/entry_points/ ) cover the
43+ modular entry points, one file each: ` plotly.js/lib/core ` , every trace and
44+ component, the partial bundles, and every locale under
45+ ` plotly.js/lib/locales/ ` .
46+
4047This ` src/types/ ` directory is the authoring location — internal types live
4148here, public types are re-exported through ` lib/index.d.ts ` to consumers.
4249
4350## Generated types
4451
52+ Two tasks generate types. This section covers the schema generator. For the
53+ entry point declarations under
54+ [ ` generated/entry_points/ ` ] ( generated/entry_points/ ) , see
55+ [ ARCHITECTURE.md] ( ARCHITECTURE.md#the-generatedentry_points-directory ) and run
56+ ` npm run entry-point-types ` .
57+
4558The following are ** auto-generated from ` plot-schema.json ` ** by
4659` tasks/generate_schema_types.mjs ` :
4760
0 commit comments