Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
700 commits
Select commit Hold shift + click to select a range
613e974
fix(Highlight|TooltipContext): Support xInterval / yInterval (#681)
techniq Nov 13, 2025
753cce7
Merge branch 'docs-v2' of https://github.com/techniq/layerchart into …
techniq Nov 14, 2025
aea4f37
Merge branch 'next' into docs-v2
techniq Nov 14, 2025
884b6f4
Update geo docs
techniq Nov 14, 2025
37c0049
Update layout docs
techniq Nov 14, 2025
a639527
Update interaction docs
techniq Nov 14, 2025
45770d6
Update annotation and fill docs
techniq Nov 14, 2025
6a58f0c
fix(ExampleLink): Hover styling
techniq Nov 15, 2025
303a053
fix(Example): Disable example resizing (and thus `overflow-hidden` be…
techniq Nov 15, 2025
ac22960
Skeleton-4 example package (#683)
cycle4passion Nov 16, 2025
f871e82
Add WIP frontpage
techniq Nov 16, 2025
aeca96d
Rough in some guides and other pages
techniq Nov 16, 2025
60c10a8
Add WIP tooltip docs
techniq Nov 16, 2025
b25bdbf
Fix check
techniq Nov 16, 2025
4ca9e45
Improve Layer guide
techniq Nov 16, 2025
c303e57
More Layer guide improvements
techniq Nov 16, 2025
0018e54
Tweak styles
techniq Nov 16, 2025
ab8ae18
Merge pull request #680 from cycle4passion:docs-v2-c4p
techniq Nov 16, 2025
b5b3e14
Graticule (#684)
cycle4passion Nov 16, 2025
eb3359d
Fix duplicate exports
techniq Nov 16, 2025
f0f2046
Update packages (except Svelte)
techniq Nov 16, 2025
e3d07a4
Add graphics comparison to Layers guide
techniq Nov 16, 2025
18a579e
Update Svelte to latest (ex. `5.39.13` to `5.43.8`)
techniq Nov 16, 2025
6ff0775
Downgrade content-collections for now to fix build issue
techniq Nov 17, 2025
b0fd4b9
Find the first example (typically usage) and add to component content…
techniq Nov 17, 2025
14e61a4
Extract ImageLink and ExampleScreen from ExampleLink. Add ComponentLink
techniq Nov 17, 2025
35c5d86
Add component links to primitives guide
techniq Nov 17, 2025
e232e74
Improve guides
techniq Nov 17, 2025
1e1137a
fix(ImageLink): fix image layout
techniq Nov 17, 2025
336b8ee
Regenerate screenshots (include all ForceSimulation)
techniq Nov 17, 2025
9db1d3f
fix(ImageLink): fix image layout, take 2
techniq Nov 17, 2025
dc97307
small cleanup
techniq Nov 17, 2025
9750e51
refine
techniq Nov 18, 2025
88c74e3
refine
techniq Nov 18, 2025
c0e0fa8
cleanup
techniq Nov 18, 2025
66d229a
Setup showcase page
techniq Nov 18, 2025
7aef283
Update svelte 5o 5.43.11 (perf improvements)
techniq Nov 18, 2025
2cb05be
Update svelte 5o 5.43.12 (more perf improvements)
techniq Nov 19, 2025
712d08a
Experiment with the design
techniq Nov 19, 2025
6b450b4
Design tweaks
techniq Nov 20, 2025
36f3e05
Some small viewport improvements (examples, layers guide)
techniq Nov 20, 2025
b53f824
Improve ImageLink/ExampleScreenshot, and related
techniq Nov 20, 2025
962df47
Design refinements
techniq Nov 20, 2025
eb3d182
Update deps
techniq Nov 20, 2025
0124cfa
tweaks
techniq Nov 20, 2025
a6ef4b8
Fix header z-index with sticky table cells
techniq Nov 20, 2025
007787b
Rough in more getting-started content
techniq Nov 21, 2025
9b839c3
Improve and animate homepage grid
techniq Nov 21, 2025
126fc16
Update deps
techniq Nov 21, 2025
5b640ed
Improve markdown code blocks (```) syntax highlight. Improve inline …
techniq Nov 21, 2025
3abd1c6
Fix Choropleth example (issue #687)
techniq Nov 21, 2025
1d72932
Fruits CSS variables instead of danger/info/etc. (#690)
cycle4passion Nov 22, 2025
090d920
1. It includes almost no new code, just moves controls around and upd…
cycle4passion Nov 22, 2025
aa65476
tweak menu colors
techniq Nov 22, 2025
dad7f3e
Fix main/code overflow and tweak styles
techniq Nov 22, 2025
1a590fc
Add strong markdown component, tweak styles
techniq Nov 22, 2025
62c2e84
DagrePlayground fix (#692)
cycle4passion Nov 22, 2025
38f35a6
Add missed fruitcolor change for BarChart/color-per-value (#693)
cycle4passion Nov 22, 2025
5cf1e5c
fix header background for light mode
techniq Nov 22, 2025
9f90f94
Persist filter and section as query params
techniq Nov 22, 2025
1637999
Improve example query filter to handle hyphenated example names (`ser…
techniq Nov 22, 2025
3c6659f
Cleanup docs menu
techniq Nov 22, 2025
909b600
Update component examles page to be filtering (like all examples rout…
techniq Nov 22, 2025
637d7ee
Only pass `?filter` if set
techniq Nov 22, 2025
2a6087b
Support loading `<Example ... />` for any `/docs` pages (getting star…
techniq Nov 23, 2025
cd6f58c
Cleanup old example route / content
techniq Nov 23, 2025
df5c2e8
Remove old `[type]` route param (remove old `examples` as we always u…
techniq Nov 23, 2025
4ff0e6f
Remove unneeded `type` parameter from `getMarkdownComponent()`
techniq Nov 23, 2025
13aaf59
Rename `section` to `category`
techniq Nov 23, 2025
24faf21
Merge branch 'next' into docs-v2
techniq Nov 23, 2025
f1ccca5
Fix chartMode bind:value for controls
techniq Nov 23, 2025
9ebc358
Remove no longer needed imports
techniq Nov 23, 2025
f8538dc
Support explicit order for menu items (ex. move Chart, ClipPath, and …
techniq Nov 23, 2025
9bdbc41
Downgrade svelte from 5.43.14 to 5.41.4 (pre-fork 5.42.0)
techniq Nov 23, 2025
4a7feb4
fix(Bar): Fix browser lockup when switching between group and stack l…
techniq Nov 23, 2025
c9d511b
Fix and simplify group / stack config for examples
techniq Nov 23, 2025
9099424
fix(ImageLink): Label truncation
techniq Nov 23, 2025
4e44fcb
Add Tools/Pivot (#694)
cycle4passion Nov 23, 2025
10b41b0
Add Tools and Perf examples (#695)
cycle4passion Nov 23, 2025
2b3b8a6
BarChart/Series-diverging xPadding (#696)
cycle4passion Nov 23, 2025
c1bc3eb
BarChart/group-series-padding bandPadding (#697)
cycle4passion Nov 23, 2025
77a42e1
BarCharts/axis-labels-inside-bars (#698)
cycle4passion Nov 23, 2025
8060e8e
Barchart/custom-chart Fix (#699)
cycle4passion Nov 23, 2025
0be743f
BarChart/sparkbars (#700)
cycle4passion Nov 23, 2025
62d1890
Getting Started Spelling Error (#701)
cycle4passion Nov 23, 2025
e171f4c
Move component examples under examples/components, add utils route/me…
techniq Nov 24, 2025
cbcc80e
Fix generate-screenshots.ts and update all screenshots and catalog info
techniq Nov 24, 2025
6a6dd78
Remove direct perf examples from LineChart docs
techniq Nov 24, 2025
f0e7d5f
Fix border color for top-level items
techniq Nov 24, 2025
b4a1846
Update integration examples to use `next` instead of workspace versio…
techniq Nov 24, 2025
62b10f7
Add simple-icons collection
techniq Nov 24, 2025
7a2a0e0
Improve getting started page
techniq Nov 24, 2025
418fd62
Update to latest svelte (fixed reactive issues we were experiencing)
techniq Nov 24, 2025
e0d4634
Added TabbedContent.svelte (#703)
cycle4passion Nov 25, 2025
1c6f654
Merge branch 'next' into docs-v2
techniq Nov 25, 2025
f30ef6a
Update svelte to latest (5.44.0)
techniq Nov 25, 2025
58806c8
Use AnimationFrames instead of TimerState
techniq Nov 25, 2025
2eaa0a1
Adjust some logic
techniq Nov 25, 2025
a836c31
Change default buffer size to 1k
techniq Nov 25, 2025
fdebf6e
Bump Svelte to 5.45.2
techniq Nov 27, 2025
0cb743f
Fix CI due to `skeleton-4.css`
techniq Nov 30, 2025
a4d0562
Getting Started (#706)
cycle4passion Nov 30, 2025
08ac899
Steps redo (#707)
cycle4passion Dec 1, 2025
1f8c518
Fix getting started links
techniq Dec 2, 2025
79dfec7
AreaChart Padding fixes (#708)
cycle4passion Dec 3, 2025
289a8b7
Update Svelte/Kit packages
techniq Dec 3, 2025
2f4db47
Update deps
techniq Dec 3, 2025
eda70e7
Prettier format
techniq Dec 3, 2025
c3e3431
Fix `<BarChart seriesLayout="group">`
techniq Dec 3, 2025
ed7e0fa
Reduce height of `single stack with indicator` example
techniq Dec 3, 2025
53e52d7
fix(Layer): Make prettier happy
techniq Dec 3, 2025
f948ea0
Improve screenshot route (do not use inherit layout)
techniq Dec 3, 2025
cb455d6
Fix transparent background for screenshots, and add `--all` to force …
techniq Dec 3, 2025
7ac31af
Use javascript/movable action instead of css to fix overfllow. Also …
techniq Dec 3, 2025
2ec9487
Update Svelte to 5.45.5
techniq Dec 3, 2025
65e471a
Fix pivot casing
techniq Dec 3, 2025
08d0c5a
Disable resizing for pivot examples
techniq Dec 3, 2025
4843ad2
Add RelatedLink to improve handling of `related` frontmatter links
techniq Dec 4, 2025
2860572
Cleanup pivot examples
techniq Dec 5, 2025
79a5019
Improve overfllow / clipping and resizing for ColorRamp, Pattern, and…
techniq Dec 5, 2025
b0e4617
Reactive Domain-Range Component (#710)
cycle4passion Dec 7, 2025
d4303d9
PieChart-fruit-colors (#712)
cycle4passion Dec 7, 2025
350c6b4
ArcChart fruit colors (#713)
cycle4passion Dec 7, 2025
67b2194
BarChart-padding (#714)
cycle4passion Dec 7, 2025
671efcc
LineChart-padding (#715)
cycle4passion Dec 7, 2025
4385c6b
Chart-padding (#716)
cycle4passion Dec 7, 2025
e98bb54
Axis-padding (#717)
cycle4passion Dec 7, 2025
973f521
ScatterChart Padding (#711)
cycle4passion Dec 7, 2025
ae307b9
Fix $examples import alias
techniq Dec 7, 2025
4e10d21
Update catalog
techniq Dec 7, 2025
407b561
Update screenshots
techniq Dec 7, 2025
694336c
fix(stripIndent): Only remove leading/trailing empty lines
techniq Dec 7, 2025
a1a6a6d
breaking: Extract `Path` primitive component from `Spline` for better…
techniq Dec 7, 2025
0af3730
Fix type errors
techniq Dec 7, 2025
0250ef1
Update GeoPath to use Path primitive
techniq Dec 7, 2025
6b62fe9
Remove geojson/topojson/shapefile previews from GeoContext docs (just…
techniq Dec 7, 2025
2e0c8ce
Cleanup Spline
techniq Dec 7, 2025
d57151e
padding-all-primitives (#719)
cycle4passion Dec 8, 2025
d1f590e
padding-all-marks (#720)
cycle4passion Dec 8, 2025
d5e5bfa
Padding all geo (#721)
cycle4passion Dec 8, 2025
c079185
Fix bad merge
techniq Dec 8, 2025
91e77d6
scales-update (#722)
cycle4passion Dec 10, 2025
25f2a62
Playground (#723)
techniq Dec 11, 2025
e172a03
Add `@iconify-json/vscode-icons` (colored icons)
techniq Dec 12, 2025
b65f174
Update deps
techniq Dec 14, 2025
9fdb736
header-for-utils-spacing-fix (#729)
cycle4passion Dec 14, 2025
500d067
marker-controls-fix (#728)
cycle4passion Dec 14, 2025
69fbed8
utils-cls-format-string (#726)
cycle4passion Dec 14, 2025
50c1ee6
getting-started-again (#725)
cycle4passion Dec 14, 2025
fb32c6f
playground-wip (#724)
cycle4passion Dec 14, 2025
1d68171
simplified-charts-WIP (#727)
cycle4passion Dec 14, 2025
a3df748
Add shiki diff and line highlighting support
techniq Dec 14, 2025
a418eda
Refine docs
techniq Dec 14, 2025
ce8cf24
Leave breadcrumb for improving syntax highlighting
techniq Dec 14, 2025
196071d
Move diff/line highlighting to app.css and use tailwind classes to si…
techniq Dec 14, 2025
e69e36d
Enhance code block handling with title support and styling improvements
techniq Dec 14, 2025
51576f5
lineargradient-horiz-scrollbars (#730)
cycle4passion Dec 14, 2025
6b727a1
Replace custom `shikiLineHighlightTransformer` with official `@shikij…
techniq Dec 14, 2025
c43a0c5
Add scrollbar styling
techniq Dec 15, 2025
5228344
colorramp-update (#732)
cycle4passion Dec 16, 2025
7f3dd49
annotationpoint-update (#731)
cycle4passion Dec 16, 2025
b930735
Move markdown examples to `/docs/markdown`
techniq Dec 16, 2025
4e94725
markdown-examples (#733)
cycle4passion Dec 17, 2025
85ad080
more-custom-icons (#735)
cycle4passion Dec 18, 2025
20a5225
Support local examples via `<Example path="./Foo.svelte">` along with…
techniq Dec 18, 2025
9df9207
Remove lodash-es dependency (#734)
es3n1n Dec 18, 2025
45cf640
Fix playground padding/scroll
techniq Dec 18, 2025
9ecd505
Fix toggling console via "Console"
techniq Dec 18, 2025
1256f2c
Fix export
techniq Dec 18, 2025
31fa8df
Fix `source` link for Chart
techniq Dec 20, 2025
0bec028
Improve console auto scrolling including only auto-scroll if currentl…
techniq Dec 20, 2025
6713bd7
Fix accidental overflow scrolling from background grid/gradient
techniq Dec 20, 2025
b975567
Create a separate playground template and streamline the deps
techniq Dec 20, 2025
5eb36aa
Fix bars pattern examples
techniq Dec 22, 2025
b6fcae4
unocss (#738)
cycle4passion Dec 23, 2025
e461194
Split mdsx config into multiple files for better readability
techniq Dec 23, 2025
5002cd4
Support svelte live code blocks
techniq Dec 24, 2025
068bf4e
Add `:::steps` and `:::note` markdown directives
techniq Dec 26, 2025
79cdf2f
Switch from remark-directive to remark-mdc, add support for `::tabs` …
techniq Dec 26, 2025
ce17875
Markdown components (#740)
techniq Dec 28, 2025
9d53c60
Improve blockquote styling
techniq Dec 28, 2025
5ead6b2
Convert kebab-case attributes (show-code) to camelCase to match Svelt…
techniq Dec 28, 2025
6534e94
breaking: Change `defaultChartPadding(axis, legend)` to `defaultChart…
techniq Dec 28, 2025
6d173ff
update components to use :example (#742)
cycle4passion Dec 29, 2025
90a557e
Add h4 markdown component
techniq Dec 29, 2025
b3462fe
Change header anchor icon to show before instead of after
techniq Dec 29, 2025
26b15e4
Merge branch 'docs-v2' of https://github.com/techniq/layerchart into …
techniq Dec 29, 2025
9748dd8
Show small up arrow for external links
techniq Dec 29, 2025
4346653
Improve loading performance of examples in markdown by eagerly loadin…
techniq Dec 29, 2025
a3761a3
Regenerate catalog
techniq Dec 29, 2025
e7e90c9
Optimize example loading with dynamic imports
techniq Dec 30, 2025
79c5ee1
Generate lighterweight .webp (vs .png) screenshots at different resol…
techniq Dec 31, 2025
a155628
Fix startContent/endContent snippets
techniq Jan 1, 2026
ed9f858
Determine available layers from per-example (<script module>) or comp…
techniq Jan 1, 2026
e423f65
Styles - 2nd pass (#744)
cycle4passion Jan 1, 2026
4fa7bfe
last-of-padding-updates (#746)
cycle4passion Jan 1, 2026
175aab7
togglegroup no select (#747)
cycle4passion Jan 1, 2026
93802ae
Prevent sidebar scroll jank on page changes. (#748)
cycle4passion Jan 1, 2026
b7e3439
More markdown examples (#751)
cycle4passion Jan 2, 2026
e58c7cb
View transitions (#750)
cycle4passion Jan 2, 2026
80db85f
Fix full page reloading on menu navigation
techniq Jan 2, 2026
5dec563
Support passing `showCode=false` for live code examples
techniq Jan 2, 2026
7fc92cb
Remove `showCode=false` from example
techniq Jan 2, 2026
85fc742
Add releases routes and script to generate initial pages from github …
techniq Jan 4, 2026
dfa8a18
Skip writing existing release files to preserve local edits
techniq Jan 4, 2026
30898ab
Add pagination
techniq Jan 4, 2026
c8d2d98
fix build. format release markdown
techniq Jan 4, 2026
5e09e4a
Also include `lang="ts"` for module
techniq Jan 6, 2026
f1efe67
Re-generate all (update catalog)
techniq Jan 6, 2026
bdb025a
Merge branch 'next' into docs-v2
techniq Jan 6, 2026
5a556b3
Update more defaultChartPadding usage
techniq Jan 7, 2026
7819c56
Disable data preloading until Svelte async/fork is improved
techniq Jan 7, 2026
298b551
Fix HMR infinite loop for Example component rendering by using $state…
techniq Jan 7, 2026
456e007
fix(ExampleScreenshot): Only apply `view-transition-name` on hover to…
techniq Jan 7, 2026
87de731
Move hover checking to set view-transition-name from ExampleScreensho…
techniq Jan 8, 2026
06377d3
bump deps
techniq Jan 8, 2026
3312f61
Ignore content-collections when running tests (workaround `__dirname`…
techniq Jan 8, 2026
2147c48
fix `content` deprecatation warning (content-collections)
techniq Jan 8, 2026
91a5f32
Suppress state_referenced_locally warnings (for now)
techniq Jan 8, 2026
f8cdace
Fix `non_reactive_update` warnings
techniq Jan 8, 2026
9a72795
Improve view transitions
techniq Jan 9, 2026
af92a30
Add TODO reminder to re-add data reloaded after preloadFork behind ex…
techniq Jan 9, 2026
dbf1bbd
fix empty layer toggle showing small circle (#759)
cycle4passion Jan 11, 2026
918cecb
fix(Arc): Setting `strokeWidth` correct (when using Path component in…
techniq Jan 11, 2026
0f07ee5
Fix passing test props (`data-`, etc) to root container
techniq Jan 11, 2026
0292e53
View transition scroll fix (#762)
cycle4passion Jan 13, 2026
5f3b553
Barchart dynamic height example (#763)
cycle4passion Jan 13, 2026
bf77ae0
Layer example (#761)
cycle4passion Jan 13, 2026
022ce5b
Update catalogs and screenshots
techniq Jan 13, 2026
a0dfd92
fix(Path): Set default `--fill-color` to `transparent` instead of `no…
techniq Jan 16, 2026
15537ae
Testing First Pass Arc (#760)
cycle4passion Jan 19, 2026
bd90db7
Better export data prune (#765)
cycle4passion Jan 19, 2026
85ad1fd
Improve example screenshot density on homepage
techniq Jan 21, 2026
4b53b19
Update deps
techniq Jan 23, 2026
098848c
Update svelte to 5.48.1, fixing performance issues of Spike map (and …
techniq Jan 24, 2026
b6b90e3
Update svelte to 5.48.2 (fix `TypeError: $.wait is not a function`)
techniq Jan 24, 2026
7ed2820
fix(Text): Support explicit "\n" and set line-height (to match svg/ca…
techniq Jan 25, 2026
1affd58
Text playground fix (#768)
cycle4passion Jan 25, 2026
40b6f03
Rename word wrap with explicit n (#769)
cycle4passion Jan 25, 2026
3e289e5
Add `Path` to top-level exports and add basic example
techniq Jan 25, 2026
ad9c07d
Text trunc newline examples (#771)
cycle4passion Jan 26, 2026
bb3af0e
Utils updates (#770)
cycle4passion Jan 26, 2026
df51df5
cleanup
techniq Jan 26, 2026
ffa4697
Further arc tests (#767)
cycle4passion Jan 26, 2026
2fe4011
Geopoint icons remove controls (#772)
cycle4passion Jan 26, 2026
b5f2f57
Additional axis examples (#764)
cycle4passion Jan 26, 2026
a2bdb27
feat(Chart|Svg): Support passing `clip` prop to hide overflown content
techniq Jan 26, 2026
e97bce6
also add for `<Html>` layers
techniq Jan 26, 2026
3f447d9
Clipping (#774)
cycle4passion Jan 27, 2026
054236f
Text trunc wrap fix (#775)
cycle4passion Jan 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 5 additions & 0 deletions .changeset/clear-pears-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'layerchart': patch
---

breaking: Change `defaultChartPadding(axis, legend)` to `defaultChartPadding({ axis, legend })` and support overrides (ex. `defaultChartPadding({ left: 50 })`)
5 changes: 5 additions & 0 deletions .changeset/fair-phones-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'layerchart': patch
---

refactor: Rename simplified charts `renderContext` prop to `layer`
5 changes: 5 additions & 0 deletions .changeset/flat-cases-enter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'layerchart': patch
---

refactor: Move contexts to separate `$lib/contexts` module
5 changes: 5 additions & 0 deletions .changeset/four-lizards-win.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'layerchart': patch
---

feat(Layer): Allow `type` to be optional, fallbacking back to `settings.layer` type
5 changes: 5 additions & 0 deletions .changeset/full-times-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'layerchart': patch
---

feat: Support global settings (layer type, debug, etc)
12 changes: 12 additions & 0 deletions .changeset/good-glasses-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'shadcn-svelte-1': patch
'svelteux-2': patch
'skeleton-3': patch
'skeleton4': patch
'standalone': patch
'layerchart': patch
'daisyui-5': patch
'docs': patch
---

Removed lodash-es dependency
5 changes: 5 additions & 0 deletions .changeset/green-poems-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'layerchart': patch
---

fix(Bar): Fix browser lockup when switching between group and stack layouts
5 changes: 5 additions & 0 deletions .changeset/hot-dots-stick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'layerchart': patch
---

feat(Circle|Rect): Support passing children snippet for Html layers
5 changes: 5 additions & 0 deletions .changeset/icy-llamas-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'layerchart': patch
---

feat(Chart): Support passing explicit `width` and `height` instead of requiring parent dimensions
5 changes: 5 additions & 0 deletions .changeset/shaky-ends-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'layerchart': patch
---

feat(Chart|Svg|Html): Support passing `clip` prop to hide overflown content
5 changes: 5 additions & 0 deletions .changeset/silver-mugs-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'layerchart': patch
---

fix(Text): Support explicit "\n" and set line-height (to match svg/canvas) for html layers
5 changes: 5 additions & 0 deletions .changeset/spicy-gifts-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'layerchart': patch
---

feat(Chart): Support `class` prop
5 changes: 5 additions & 0 deletions .changeset/three-cities-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'layerchart': minor
---

breaking: Extract `Path` primitive component from `Spline` for better separation of concerns
5 changes: 5 additions & 0 deletions .changeset/twenty-bushes-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'layerchart': patch
---

feat(Layer): Support showing chart and full frame boundaries with `settings.debug`
58 changes: 58 additions & 0 deletions .claude/skills/svelte-testing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Sveltest Helper

**Comprehensive testing tools and examples for building robust Svelte
5 applications**

This skill provides a complete testing framework for SvelteKit
projects using vitest-browser-svelte. It includes patterns, best
practices, and real-world examples for client-side, server-side, and
SSR testing.

## What You'll Find Here

- ✅ **Foundation First methodology** - Plan comprehensive test
coverage before coding
- ✅ **Real browser testing** - Using vitest-browser-svelte with
Playwright
- ✅ **Client-Server alignment** - Test with real FormData/Request
objects
- ✅ **Svelte 5 runes patterns** - Proper use of untrack(), $derived,
and $effect
- ✅ **Common pitfalls solved** - Strict mode, form submission,
accessibility
- ✅ **Production-ready examples** - Copy-paste test templates

## For Developers

Use this as a quick reference guide when writing tests:

- Browse `SKILL.md` for quick patterns and reminders
- Check `references/detailed-guide.md` for comprehensive examples
- Follow the "Unbreakable Rules" to avoid common mistakes

## For AI Assistants

This skill is automatically invoked by Claude Code when working with
tests in SvelteKit projects. It provides context-aware guidance for
creating and maintaining high-quality tests.

## Structure

- **SKILL.md** - Quick reference for common patterns
- **references/detailed-guide.md** - Complete testing guide with
examples

## Quick Start

```bash
# Run all tests
pnpm test

# Run specific test types
pnpm test:client # Browser component tests
pnpm test:server # API and server logic tests
pnpm test:ssr # Server-side rendering tests

# Generate coverage
pnpm coverage
```
58 changes: 58 additions & 0 deletions .claude/skills/svelte-testing/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
name: svelte-testing
# prettier-ignore
description: Fix and create Svelte 5 tests with vitest-browser-svelte and Playwright. Use when fixing broken tests, debugging failures, writing unit/SSR/e2e tests, or working with vitest/Playwright.
---

# Svelte Testing

## Quick Start

```typescript
// Client-side component test (.svelte.test.ts)
import { render } from 'vitest-browser-svelte';
import { expect } from 'vitest';
import Button from './button.svelte';

test('button click increments counter', async () => {
const { page } = render(Button);
const button = page.getByRole('button', { name: /click me/i });

await button.click();
await expect.element(button).toHaveTextContent('Clicked: 1');
});
```

## Core Principles

- **Always use locators**: `page.getBy*()` methods, never containers
- **Multiple elements**: Use `.first()`, `.nth()`, `.last()` to avoid
strict mode violations
- **Use untrack()**: When accessing `$derived` values in tests
- **Real API objects**: Test with FormData/Request, minimal mocking

## Reference Files

- [core-principles](references/core-principles.md) |
[foundation-first](references/foundation-first.md) |
[client-examples](references/client-examples.md)
- [server-ssr-examples](references/server-ssr-examples.md) |
[critical-patterns](references/critical-patterns.md)
- [client-server-alignment](references/client-server-alignment.md) |
[troubleshooting](references/troubleshooting.md)

## Notes

- Never click SvelteKit form submit buttons - Always use
`await expect.element()`
- Test files: `.svelte.test.ts` (client), `.ssr.test.ts` (SSR),
`server.test.ts` (API)

<!--
PROGRESSIVE DISCLOSURE GUIDELINES:
- Keep this file ~50 lines total (max ~150 lines)
- Use 1-2 code blocks only (recommend 1)
- Keep description <200 chars for Level 1 efficiency
- Move detailed docs to references/ for Level 3 loading
- This is Level 2 - quick reference ONLY, not a manual
-->
181 changes: 181 additions & 0 deletions .claude/skills/svelte-testing/references/client-examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
## Complete Examples

### Example 1: Client-Side Component Test

Real browser testing with user interactions:

```typescript
// button.svelte.test.ts
import { render } from 'vitest-browser-svelte';
import { test, expect, describe } from 'vitest';
import { userEvent } from '@vitest/browser/context';
import Button from './button.svelte';

describe('Button Component', () => {
test('increments counter on click', async () => {
const { page } = render(Button, { props: { label: 'Click me' } });

const button = page.getByRole('button', { name: /click me/i });

await userEvent.click(button);
await expect.element(button).toHaveTextContent('Clicked: 1');

await userEvent.click(button);
await expect.element(button).toHaveTextContent('Clicked: 2');
});

test('supports keyboard interaction', async () => {
render(Button, { props: { label: 'Press me' } });

const button = page.getByRole('button', { name: /press me/i });
await button.focus();
await userEvent.keyboard('{Enter}');

await expect.element(button).toHaveTextContent('Clicked: 1');
});

test('handles multiple buttons with .first()', async () => {
render(ButtonGroup); // Renders multiple buttons

// Handle multiple buttons explicitly
const firstButton = page.getByRole('button').first();
const secondButton = page.getByRole('button').nth(1);

await firstButton.click();
await expect.element(firstButton).toHaveTextContent('Clicked: 1');

await secondButton.click();
await expect
.element(secondButton)
.toHaveTextContent('Clicked: 1');
});
});
```

### Example 2: Testing Svelte 5 Runes

```typescript
// counter.svelte.test.ts
import { render } from 'vitest-browser-svelte';
import { test, expect } from 'vitest';
import { untrack, flushSync } from 'svelte';
import Counter from './counter.svelte';

test('$state and $derived reactivity', async () => {
const { component } = render(Counter);

// Access $state value directly
expect(component.count).toBe(0);

// Update state
component.increment();

// Force synchronous update
flushSync(() => {});

// Access $derived value with untrack
const doubled = untrack(() => component.doubled);
expect(doubled).toBe(2);
});

test('form validation lifecycle', async () => {
const { component } = render(FormComponent);

// Initially valid (no validation run yet)
expect(untrack(() => component.isFormValid())).toBe(true);

// Trigger validation
component.validateAllFields();

// Now invalid (empty required fields)
expect(untrack(() => component.isFormValid())).toBe(false);

// Fix validation errors
component.email.value = 'test@example.com';
component.validateAllFields();

// Valid again
expect(untrack(() => component.isFormValid())).toBe(true);
});
```

### Example 3: Server-Side API Test

Test with real FormData/Request objects:

```typescript
// api/users/server.test.ts
import { test, expect, describe, vi } from 'vitest';
import { POST } from './+server';
import * as database from '$lib/server/database';

vi.mock('$lib/server/database');

describe('POST /api/users', () => {
test('creates user with valid data', async () => {
// Mock only external services
vi.mocked(database.createUser).mockResolvedValue({
id: '123',
email: 'user@example.com',
});

// Use real FormData
const formData = new FormData();
formData.append('email', 'user@example.com');
formData.append('password', 'securepass123');

// Use real Request object
const request = new Request('http://localhost/api/users', {
method: 'POST',
body: formData,
});

const response = await POST({ request });
const data = await response.json();

expect(response.status).toBe(201);
expect(data.email).toBe('user@example.com');
expect(database.createUser).toHaveBeenCalledWith({
email: 'user@example.com',
password: 'securepass123',
});
});

test('rejects invalid email format', async () => {
const formData = new FormData();
formData.append('email', 'invalid-email');
formData.append('password', 'pass123');

const request = new Request('http://localhost/api/users', {
method: 'POST',
body: formData,
});

const response = await POST({ request });
const data = await response.json();

expect(response.status).toBe(400);
expect(data.errors.email).toBeDefined();
expect(database.createUser).not.toHaveBeenCalled();
});

test('handles missing required fields', async () => {
const formData = new FormData();
// Missing email and password

const request = new Request('http://localhost/api/users', {
method: 'POST',
body: formData,
});

const response = await POST({ request });
const data = await response.json();

expect(response.status).toBe(400);
expect(data.errors.email).toBeDefined();
expect(data.errors.password).toBeDefined();
});
});
```

---
Loading
Loading