facebook / lexical

Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.
https://lexical.dev
MIT License
17.37k stars 1.43k forks source link

Bug: API modules list #5913

Closed Aemulatio closed 1 week ago

Aemulatio commented 2 weeks ago

It's look like there're some internal modules presented into API->Modules block of the documentation

image
etrepum commented 2 weeks ago

They're not internal modules, those are all public modules that can be imported. On the other hand, @lexical/react is not a module that can be imported. For some historical reason that I don't know about, the @lexical/react package is organized in this way rather than having a central "barrel" module where all of the internals can be imported. My guess is that it's organized in this way to support a rudimentary tree-shaking bundler.

It might make sense to organize the documentation for @lexical/react's modules in some other way, or bite the bullet and make it all importable from @lexical/react, but in its current state the API sidebar lists all of the modules you can import. Previously (before #5850), there was no API documentation at all for any of these modules on the website.