You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Style Engine: Export public TypeScript types (#79079)
* Style engine: export public TypeScript types
Re-export the `Style`, `StyleOptions`, and `GeneratedCSSRule` types from the
package entry point so consumers of `@wordpress/style-engine` can type their
usage of `compileCSS` and `getCSSRules`. These are the types that appear in
the public function signatures; internal helper types remain unexported,
matching the convention used by `rich-text` and `components`.
Each exported type is documented at the export site so the autogenerated API
docs render a description, and the README is regenerated accordingly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Style engine: differentiate type doc comments per review feedback
Use a concise summary at each export (which docgen renders into the README)
and a fuller description at each type definition (which IDE tooling surfaces
on hover), so the two are no longer identical. Matches the pattern used by
the `rich-text` and `worker-threads` packages.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Style engine: include backgrounds in the Style type description
The `Style` interface gained a top-level `background` key; reword its
definition comment to mention backgrounds and phrase the property list as
non-exhaustive ("such as") so it stays accurate as the type evolves.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Style engine: add @example usage to compileCSS and getCSSRules
Document both functions with an @example JSDoc block so docgen renders a
Usage example into the README's autogenerated API section. This makes the
exported Style, StyleOptions and GeneratedCSSRule types learnable in context
(selector vs. inline output, structured rules), with the example colocated
with the code as a single source of truth rather than hand-written README
prose. Outputs were verified against the package's behaviour.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: packages/style-engine/CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,10 @@
2
2
3
3
## Unreleased
4
4
5
+
### Enhancements
6
+
7
+
- Export the `Style`, `StyleOptions`, and `GeneratedCSSRule` TypeScript types so that consumers of the public API can type their usage of `compileCSS` and `getCSSRules`.
0 commit comments