Comments (6)
Thanks for letting me know. Iām waiting for the full Svelte 5 release before figuring out what form LayerCake takes. Given that the library is a collection of stores and stores are no more, it will mean a significant rewrite.
from layercake.
Great ā thanks for the offer! The first approach I plan on trying will be to replace every store with a $state
rune and then instead of derived stores, use $derived
. I haven't seen any examples on how runes interact with contexts, though.
Slots are also deprecated so there will have to be some changes there, too. It looks like the existing syntax may work if layout components render a children
snippet.
But since Svelte 5 is still a moving target, I think it's better to wait until it settles.
from layercake.
There's a PR for making this compatible with Svelte 5. I may merge it or may wait until 5.0.0 is out: #190
edit: this has been merged and the library is compatible with Svelte 5
from layercake.
A note on the timing for this: Since the library is compatible with Svelte 4 and 5 but a migration to runes will cut off support for anything less than Svelte 5, I'm not in a huge rush to do that. It may make most sense to wait for something like Svelte 6 when some of the features Layer Cake uses become deprecated.
The goal here being that it works for the largest number of people.
from layercake.
FYI the existing LayerCake library works out of the box in Svelte 5 projects. That PR clears up some peerDependency warnings.
Eventually I will port LayerCake to using runes but it will require changes to component API. Using $state runes, you can no longer destructure values from contexts like you can with stores
import { getContext } from 'svelte';
const { xGet, yGet } = getContext('LayerCake');
// becomes...
const chart = getContext('LayerCake')
chart.xGet
chart.yGet
I may include a helper so you're not interacting with getContext
directly
import { LayerCake, Svg, getChart } from 'layercake';
const c = getChart();
c.xGet
c.YGet
The design is still TBD but that approach seems to help with the ergonomics. Feedback welcome.
from layercake.
I may be able to help out with that... I do dataviz, performance and low level for a living. Check out https://github.com/nestauk/svizzle It doesn't use LayerCake (yet) but a port is planned.
It will have to wait for a new LayerCake release however.
from layercake.
Related Issues (20)
- Should auto-calculated ordinal domain return sorted? HOT 3
- Sorted ordinal regression HOT 14
- Collapsible tree HOT 3
- Chart showing up blank HOT 10
- Update to SvelteKit 2 HOT 2
- Question: is it NOT meant to be used with TypeScript? HOT 4
- Scatter plot with two dataset HOT 9
- Add prop to not sort a calculated domain from ordinal scale HOT 1
- Tick position on new Axis Y.html component is slightly off for bandwidth scales
- Deprecate `extents` prop perhaps? HOT 8
- examples: Modify components to support negative bars and columns
- How to handle combo charts? HOT 2
- Add option to suppress negative dimension warning. HOT 1
- Missing rollup package causing CI to fail HOT 1
- Cannot click on code files in examples website
- MultiLine doesn't render lines with undefined points HOT 6
- Add a prop to HTML Axis components to use pixels and not percentages HOT 1
- Remove percentages from annotation example HOT 1
- Remove `$:` from function definitions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from layercake.