-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #239 from PRIME-TU-Delft/svelte-5
Merge add-svelte-5 into main
- Loading branch information
Showing
304 changed files
with
13,842 additions
and
12,994 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
engine-strict=true | ||
resolution-mode=highest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v22.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
import type { StorybookConfig } from '@storybook/sveltekit'; | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx|svelte)'], | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts|svelte)'], | ||
addons: [ | ||
'@storybook/addon-svelte-csf', | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@chromatic-com/storybook', | ||
'@storybook/addon-interactions', | ||
'@storybook/addon-svelte-csf' | ||
'@storybook/addon-interactions' | ||
], | ||
framework: { | ||
name: '@storybook/sveltekit', | ||
options: {} | ||
}, | ||
docs: { | ||
autodocs: 'tag' | ||
} | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" | ||
integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" | ||
crossorigin="anonymous" | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
import type { Preview } from '@storybook/svelte'; | ||
|
||
import '../src/app.css'; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i | ||
} | ||
}, | ||
options: { | ||
storySort: { | ||
order: ['Initialize', 'D3', '*'] | ||
} | ||
} | ||
} | ||
}, | ||
tags: ['autodocs'] | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# TODOS | ||
|
||
- [ ] Share -> Embed link is broken | ||
|
||
# Overal changes | ||
|
||
- Better and more consistant url parameters see [readme](./README.md?tab=readme-ov-file#url-parameters) | ||
- bind:controls -> {controls} | ||
- Clicking reset will animate sliders and subsequent changes back to the initial state | ||
- Reset and pause are now two different things | ||
- reset -> resets the scene to the initial state | ||
- pause -> pauses the scene and allows for scrolling | ||
- Pause is now called `Lock/unlock` to better represent the functionality | ||
- AbstractCanvas component is now Scene component | ||
|
||
## Renames | ||
|
||
- `d3-components` folder is now `d3` | ||
- `threlte-components` folder is now `threlte` | ||
- `activityStore.ts` is now `activity.svelte.ts` | ||
- `globalState.ts` is now `globalState.svelte.ts` | ||
|
||
## breaking changes in 3D | ||
|
||
### Canvas3D | ||
|
||
- It is no longer possible to set custom lights | ||
- Colours are the same as 2D colours | ||
|
||
### Axis3D | ||
|
||
- AxisSpacing is no longer reliable on zoom level | ||
- No longer is origin >30x rendered | ||
- A gizmo can be added to the axis for orientation | ||
|
||
### Latex3D | ||
|
||
- Prop `extend` (vector) has become -> offset (vector) and extend (number) | ||
- Prop `size` (number) -> `fontSize` (number) | ||
|
||
### Line3D | ||
|
||
- points ([Vector3, Vector3]) -> origin (Vector3) and endPoint (Vector3) | ||
|
||
### Vector3D | ||
|
||
- isAlwaysOnTop is now also applicable to the head of the vector | ||
- radius is resized | ||
- cone head now scales with radius | ||
- striped -> isDashed | ||
- let:endPoint is now accesible via `{#snippet children(endPoint)}` | ||
- `noNormalise` prop is added to prevent normalisation of the vector | ||
|
||
--- | ||
|
||
--- | ||
|
||
## Breaking changes in 2D | ||
|
||
- Colours are more vibrant and closer to the 2D colour set | ||
|
||
### Canvas2D: | ||
|
||
- It is no longer possible to set custom lights for 3D scenes | ||
- <svelte:template name="splitCanvas"> -> {#snippet splitCanvas2DChildren()} | ||
- <svelte:template name="splitCanvas3d"> -> {#snippet splitCanvas3DChildren()} | ||
|
||
### Vector2D: | ||
|
||
- let:endPoint is now accesible via `{#snippet children(endPoint)}` | ||
- `noNormalise` prop is added to prevent normalisation of the vector | ||
|
||
### Draggables2D | ||
|
||
- draggables are now part of controls and can be added to the canvas by using the `controls` prop | ||
- snap is now a function that is passed in the controls | ||
- snap: (point: Vector2) => Vector2 | ||
- The default snap function can be found by importing `Draggable.snapToGrid` | ||
|
||
### Latex2D | ||
|
||
- No longer uses mathjax but is now rendered with katex | ||
- `size` (number) -> `fontSize` (number) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"onlyChanged": true, | ||
"projectId": "Project:64bd84b22e54c77ce9fcbc6b", | ||
"zip": true | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
{ | ||
"$schema": "https://shadcn-svelte.com/schema.json", | ||
"style": "new-york", | ||
"style": "default", | ||
"tailwind": { | ||
"config": "tailwind.config.js", | ||
"css": "src/app.postcss", | ||
"css": "src/app.css", | ||
"baseColor": "slate" | ||
}, | ||
"aliases": { | ||
"components": "$lib/components", | ||
"utils": "$lib/utils" | ||
"utils": "$lib/utils/shadcn-utils" | ||
}, | ||
"typescript": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import js from '@eslint/js'; | ||
import ts from 'typescript-eslint'; | ||
import svelte from 'eslint-plugin-svelte'; | ||
import prettier from 'eslint-config-prettier'; | ||
import globals from 'globals'; | ||
|
||
/** @type {import('eslint').Linter.FlatConfig[]} */ | ||
export default [ | ||
js.configs.recommended, | ||
...ts.configs.recommended, | ||
...svelte.configs['flat/recommended'], | ||
prettier, | ||
...svelte.configs['flat/prettier'], | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.node | ||
} | ||
} | ||
}, | ||
{ | ||
files: ['**/*.svelte'], | ||
languageOptions: { | ||
parserOptions: { | ||
parser: ts.parser | ||
} | ||
} | ||
}, | ||
{ | ||
ignores: ['build/', '.svelte-kit/', 'dist/'] | ||
}, | ||
{ | ||
rules: { | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': ['warn'] | ||
} | ||
} | ||
]; |
Oops, something went wrong.