Skip to content

ts: fix types in some mark and transform props#402

Merged
gka merged 16 commits intomainfrom
fix/resolve-svelte-check-issues-2
Feb 21, 2026
Merged

ts: fix types in some mark and transform props#402
gka merged 16 commits intomainfrom
fix/resolve-svelte-check-issues-2

Conversation

@gka
Copy link
Copy Markdown
Contributor

@gka gka commented Feb 20, 2026

This pull request introduces several improvements and enhancements to mark components and type definitions, focusing on increased flexibility, better type safety, and additional customization options for visual marks. The most significant changes are grouped below.

Mark Component Prop Flexibility

  • Updated several mark components (Area.svelte, Dot.svelte, Rect.svelte, Spike.svelte, Link.svelte, DifferenceY.svelte, BoxY.svelte) to make their data and channel accessors (e.g., x, y, x1, y1, etc.) optional, improving usability and allowing for more flexible mark definitions. [1] [2] [3] [4] [5] [6] [7]

Enhanced Mark Customization

  • Added new text label customization options to Link.svelte, including textFill, textStroke, textStartOffset, and textStrokeWidth, as well as a legacy bend prop for curvature. [1] [2] [3]
  • Added a r (radius) channel and support for custom alignment strings to Text.svelte, enhancing label placement and swarm layouts. [1] [2]

Type System Improvements

  • Extended BaseMarkProps with a comprehensive set of font and text styling properties (e.g., fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, wordSpacing, textAnchor, textTransform, textDecoration, and blend), enabling fine-grained control over text appearance in marks. [1] [2]
  • Relaxed the filter type in BaseMarkProps to allow any data type, and generalized the [key: data-sveltekit-*] type in LinkableMarkProps for broader compatibility. [1] [2]

Transform and Utility Enhancements

  • Improved type exports and type safety for density transforms by exporting KernelName, Kernel, and DensityOptions, and added a type guard for kernel names in density.ts. [1] [2] [3] [4] [5] [6]
  • Made window transform options (interval, anchor, reduce, strict) optional in window.ts for more flexible moving window computations.

These changes collectively make the mark components more robust, customizable, and easier to use in a variety of visualization scenarios.

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 20, 2026

Deploy Preview for svelteplot ready!

Name Link
🔨 Latest commit d1c64b2
🔍 Latest deploy log https://app.netlify.com/projects/svelteplot/deploys/699982979a42e40008040f8d
😎 Deploy Preview https://deploy-preview-402--svelteplot.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.10.3-pr-402.0

Install it with:

npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.0

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6349f9879a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib/marks/Link.svelte Outdated
@github-actions
Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.10.3-pr-402.1

Install it with:

npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.1

@github-actions
Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.10.3-pr-402.2

Install it with:

npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.2

@github-actions
Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.10.3-pr-402.3

Install it with:

npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.3

@github-actions
Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.10.3-pr-402.4

Install it with:

npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.4

@github-actions
Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.10.3-pr-402.5

Install it with:

npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.5

@github-actions
Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.10.3-pr-402.6

Install it with:

npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.6

@github-actions
Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.10.3-pr-402.7

Install it with:

npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.7

@github-actions
Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.10.3-pr-402.8

Install it with:

npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.8

@gka gka merged commit 6bca7bf into main Feb 21, 2026
9 checks passed
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