Skip to content

feat(docs): List props inherited from other components' Props in component APIs - #117

Merged
techniq merged 1 commit into
nextfrom
techniq/api-composed-props
Nov 26, 2026
Merged

techniq merged 1 commit into
nextfrom
techniq/api-composed-props

Conversation

@techniq

@techniq techniq commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Component APIs now list the props a component takes through another component's Props, ex. Points' PointsProps = PointsPropsWithoutHTML & Omit<Without<CircleProps, PointsPropsWithoutHTML>, 'ref'>, whose z, class, cx, ... were missing.

  • Inherited props: an intersection member that's another component's Props (bare, or wrapped in Omit / Without / Pick / Partial / ...) is resolved with the type checker, and its props added with inheritedFrom (ex. "Circle"). DOM/SVG attributes (from svelte/elements / the DOM typings) and props the component already declares are left out.
  • Resolution: the program follows imports (moduleResolution: Bundler, so ./X.shared.svelte.js is its .ts) and maps SvelteKit's $lib to the nearest src/lib. Unresolved, $lib's Without was any, collapsing the whole intersection to any.
  • Extended types: a member naming the base …PropsWithoutHTML (ex. inside Without<…>) is no longer skipped as if it were the base type; wrapped Props are named for the Props they wrap (CircleProps, not Omit), with inherited: true.
  • llms: API tables list a component's own props, then a line per component it inherits from.

Checked against LayerChart: regenerating every core and @layerchart/webgl API, no existing prop is removed or changed; 22 composed components gain their inherited props (ex. Points from Circle, Labels from Text, the charts from Chart).

🤖 Generated with Claude Code

…onent APIs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Deploying layerstack with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5063bd3
Status:🚫  Build failed.

View logs

@changeset-bot

changeset-bot Bot commented Nov 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5063bd3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@layerstack/docs Minor
@layerstack/docs-site Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@layerstack/docs

npm i https://pkg.pr.new/@layerstack/docs@117

@layerstack/svelte-actions

npm i https://pkg.pr.new/@layerstack/svelte-actions@117

@layerstack/svelte-state

npm i https://pkg.pr.new/@layerstack/svelte-state@117

@layerstack/svelte-stores

npm i https://pkg.pr.new/@layerstack/svelte-stores@117

@layerstack/svelte-table

npm i https://pkg.pr.new/@layerstack/svelte-table@117

@layerstack/tailwind

npm i https://pkg.pr.new/@layerstack/tailwind@117

@layerstack/utils

npm i https://pkg.pr.new/@layerstack/utils@117

commit: 5063bd3

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
layerstack ✅ Ready (View Log) Visit Preview 5063bd3

@techniq
techniq merged commit 4e60304 into next Nov 26, 2026
5 of 6 checks passed
@techniq
techniq deleted the techniq/api-composed-props branch November 26, 2026 04:30
@github-actions github-actions Bot mentioned this pull request Nov 26, 2026

This branch was successfully deployed

1 active deployment
Preview — 5063bd31 Deployed Nov 26, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant