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
Extract props from flat-barrel .d.ts files (#24), v0.0.34
Bundlers like tsup/rollup often emit a single dist/index.d.ts with bare
`interface FooProps {…}` declarations (no `export`) and one export block
at the bottom. Strategy 3's types-hydration path already reads pkg.types,
but extractPropsFromDts silently failed on this layout.
- Make `export` optional in both the exact-name and generic *Props regexes
- When regex matches nothing, fall through to the TS AST parser instead of
returning empty
- Add exactMatchOnly option so the types-hydration path doesn't fall back to
"first *Props wins" — a flat barrel .d.ts has many *Props interfaces, and
the generic fallback would give every component the same wrong props
After extracting names, the scanner hydrates props from the package's declared types file (`pkg.exports["."].types` / `pkg.types` / `pkg.typings`). It looks up the exact `${ComponentName}Props` interface for each discovered component — a flat barrel `.d.ts` typically contains many `*Props` interfaces, so the generic "first-match" fallback is disabled in this path. Interfaces declared without `export` (bundler output from tsup/rollup) are handled by making the `export` keyword optional in both the regex and AST extractors.
183
+
182
184
## Props extraction
183
185
184
186
Props are extracted differently depending on the source file type.
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "annotask",
3
-
"version": "0.0.33",
3
+
"version": "0.0.34",
4
4
"description": "Visual UI design tool for web apps. Make changes in the browser and generate structured reports that AI agents can apply to source code. Works with Vue, React, Svelte, SolidJS, and plain HTML via Vite or Webpack.",
0 commit comments