ts: fix types in some mark and transform props#402
Conversation
✅ Deploy Preview for svelteplot ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.0 |
There was a problem hiding this comment.
💡 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".
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.1 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.2 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.3 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.4 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.5 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.6 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.7 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-402
# or install the specific version
npm install svelteplot@0.10.3-pr-402.8 |
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
Area.svelte,Dot.svelte,Rect.svelte,Spike.svelte,Link.svelte,DifferenceY.svelte,BoxY.svelte) to make theirdataand 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
Link.svelte, includingtextFill,textStroke,textStartOffset, andtextStrokeWidth, as well as a legacybendprop for curvature. [1] [2] [3]r(radius) channel and support for custom alignment strings toText.svelte, enhancing label placement and swarm layouts. [1] [2]Type System Improvements
BaseMarkPropswith a comprehensive set of font and text styling properties (e.g.,fontFamily,fontSize,fontStyle,fontWeight,letterSpacing,wordSpacing,textAnchor,textTransform,textDecoration, andblend), enabling fine-grained control over text appearance in marks. [1] [2]filtertype inBaseMarkPropsto allow any data type, and generalized the[key: data-sveltekit-*]type inLinkableMarkPropsfor broader compatibility. [1] [2]Transform and Utility Enhancements
KernelName,Kernel, andDensityOptions, and added a type guard for kernel names indensity.ts. [1] [2] [3] [4] [5] [6]interval,anchor,reduce,strict) optional inwindow.tsfor 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.