diff --git a/package.json b/package.json index 267f5514..c37115ad 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@storybook/addon-postcss": "^2.0.0", "@storybook/addon-svelte-csf": "^1.0.0", "@storybook/svelte": "^6.3.0-alpha.21", - "@sveltejs/vite-plugin-svelte": "^1.0.0-next.11", + "@sveltejs/vite-plugin-svelte": "1.0.0-next.11", "@types/blueimp-load-image": "^5.14.2", "@types/lodash": "^4.14.168", "@types/ndarray": "^1.0.9", @@ -89,9 +89,10 @@ "rollup-plugin-sizes": "^1.0.4", "rollup-plugin-svelte": "^7.1.0", "rollup-plugin-terser": "^7.0.2", - "svelte": "^3.38.2", + "svelte": "~3.39.0", "svelte-loader": "^3.1.1", "svelte-preprocess": "^4.7.3", + "svelte-hmr": "0.14.5", "svelte-range-slider-pips": "^1.7.0", "tailwindcss": "^2.1.4", "typescript": "^4.3.2", diff --git a/src/components/slider/index.ts b/src/components/slider/index.ts index 9003031b..043ca098 100644 --- a/src/components/slider/index.ts +++ b/src/components/slider/index.ts @@ -1,4 +1,5 @@ -import { Slider, SliderOptions } from './slider.component'; +import { Slider } from './slider.component'; +import { SliderOptions } from '../../ui/components/slider-types'; export function slider(options: Partial): Slider { return new Slider(options); diff --git a/src/components/slider/slider.component.ts b/src/components/slider/slider.component.ts index eddbb62b..74ff0b0c 100644 --- a/src/components/slider/slider.component.ts +++ b/src/components/slider/slider.component.ts @@ -1,24 +1,8 @@ import { Component } from '../../core/component'; import { Stream } from '../../core/stream'; +import { SliderOptions } from '../../ui/components/slider-types'; import View from './slider.view.svelte'; -export interface SliderOptions { - values: number[]; - min: number; - max: number; - step: number; - range: boolean | 'min' | 'max'; - float: boolean; - vertical: boolean; - pips: boolean; - pipstep: number; - springValues: { - stiffness: number; - damping: number; - }; - formatter: (x: unknown) => unknown; -} - export class Slider extends Component { title = 'slider'; diff --git a/src/components/slider/slider.view.svelte b/src/components/slider/slider.view.svelte index 332bc50c..ed71fea5 100644 --- a/src/components/slider/slider.view.svelte +++ b/src/components/slider/slider.view.svelte @@ -2,7 +2,8 @@ import { Stream } from '../../core/'; import ViewContainer from '../../core/ViewContainer.svelte'; import RangeSlider from 'svelte-range-slider-pips'; - import { SliderOptions } from './slider.component'; + + import { SliderOptions } from '../../ui/components/slider-types'; export let title: string; export let values: Stream; diff --git a/src/index.ts b/src/index.ts index beadf798..acca457d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,3 @@ -import '@tensorflow/tfjs-backend-webgl'; import './utils'; import './ui/css/styles.css'; diff --git a/src/ui/components/slider-types.ts b/src/ui/components/slider-types.ts new file mode 100644 index 00000000..f1619901 --- /dev/null +++ b/src/ui/components/slider-types.ts @@ -0,0 +1,16 @@ +export interface SliderOptions { + values: number[]; + min: number; + max: number; + step: number; + range: boolean | 'min' | 'max'; + float: boolean; + vertical: boolean; + pips: boolean; + pipstep: number; + springValues: { + stiffness: number; + damping: number; + }; + formatter: (x: unknown) => unknown; +} diff --git a/tailwind.config.js b/tailwind.config.js index 2ae23df0..ccac6ba9 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -13,7 +13,7 @@ module.exports = { black: colors.black, white: colors.white, gray: colors.coolGray, - blue: colors.lightBlue, + blue: colors.sky, green: colors.emerald, indigo: colors.indigo, teal: colors.teal, diff --git a/yarn.lock b/yarn.lock index 22981204..3a7a3ade 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1635,7 +1635,7 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@rollup/pluginutils@^4.1.1": +"@rollup/pluginutils@^4.1.0": version "4.1.1" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.1.1.tgz#1d4da86dd4eded15656a57d933fda2b9a08d47ec" integrity sha512-clDjivHqWGXi7u+0d2r2sBi4Ie6VLEAzWMIkvJLnDmxoOhBYOTfzGbOQBA32THHm11/LiJbd01tJUpJsbshSWQ== @@ -2396,17 +2396,16 @@ resolve-from "^5.0.0" store2 "^2.12.0" -"@sveltejs/vite-plugin-svelte@^1.0.0-next.11": - version "1.0.0-next.15" - resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.0-next.15.tgz#12e853677387aa0891b03bf69afcc678fbf8f8e2" - integrity sha512-8yGX7PxaqtvWw+GHiO2DV7lZ4M7DwIrFq+PgZGZ9X09PuoSeaWszm76GWQXJMKHoPPhdA9084662en9qbv4aRw== +"@sveltejs/vite-plugin-svelte@1.0.0-next.11": + version "1.0.0-next.11" + resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.0-next.11.tgz#1a415a1c4b1642a452e073438c63a73cfd203b51" + integrity sha512-EYR1I145k5rflVqhPwk3442m3bkYimTKSHM9uO5KdomXzt+GS9ZSBJQE3/wy1Di9V8OnGa3oKpckI3OZsHkTIA== dependencies: - "@rollup/pluginutils" "^4.1.1" + "@rollup/pluginutils" "^4.1.0" + chalk "^4.1.1" debug "^4.3.2" - kleur "^4.1.4" - magic-string "^0.25.7" require-relative "^0.8.7" - svelte-hmr "^0.14.7" + svelte-hmr "^0.14.4" "@szmarczak/http-timer@^1.1.2": version "1.1.2" @@ -4548,9 +4547,9 @@ chalk@^3.0.0: supports-color "^7.1.0" chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" - integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" @@ -8885,11 +8884,6 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -kleur@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.4.tgz#8c202987d7e577766d039a8cd461934c01cda04d" - integrity sha512-8QADVssbrFjivHWQU7KkMgptGTl6WAcSdlbBPY4uNF+mWr6DGcKrvY2w4FQJoXch7+fKMjj0dRrL75vk3k23OA== - klona@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.4.tgz#7bb1e3affb0cb8624547ef7e8f6708ea2e39dfc0" @@ -13289,7 +13283,12 @@ svelte-dev-helper@^1.1.9: resolved "https://registry.yarnpkg.com/svelte-dev-helper/-/svelte-dev-helper-1.1.9.tgz#7d187db5c6cdbbd64d75a32f91b8998bde3273c3" integrity sha1-fRh9tcbNu9ZNdaMvkbiZi94yc8M= -svelte-hmr@^0.14.2, svelte-hmr@^0.14.7: +svelte-hmr@0.14.5: + version "0.14.5" + resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.14.5.tgz#739a1ca1f4b8f66569c81424fcd5ddf0f7f1344f" + integrity sha512-3O+kkbT1XKAomKB0LRcdY8JUTzONoNZ8rSH4iEdG7piIYsw+KkXpTkbbU1Sc1yPY4onfXkmCrHElYsxr0V1Snw== + +svelte-hmr@^0.14.2, svelte-hmr@^0.14.4: version "0.14.7" resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.14.7.tgz#7fa8261c7b225d9409f0a86f3b9ea5c3ca6f6607" integrity sha512-pDrzgcWSoMaK6AJkBWkmgIsecW0GChxYZSZieIYfCP0v2oPyx2CYU/zm7TBIcjLVUPP714WxmViE9Thht4etog== @@ -13318,10 +13317,10 @@ svelte-range-slider-pips@^1.7.0: resolved "https://registry.yarnpkg.com/svelte-range-slider-pips/-/svelte-range-slider-pips-1.8.0.tgz#cea0f95979e73918a21a4376b1d1a0cbcea2740e" integrity sha512-7tlTd5bXrGUbJBqL+6YJ8taN1opB2CcUSlBBh7mbpla/T6WH/CxblqnNcQX5Gwghhkol4/u4QjKLe65crLsbDg== -svelte@^3.38.2: - version "3.41.0" - resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.41.0.tgz#2009fd6681453ffb8b5aaa57f4a89a8be3dedd78" - integrity sha512-X9/lnTcRBCrMdyFBVjfmqy1T2vyN8ejUE1OfbWSccc2Z42Amn3ab3XdBgVl+oDkZvzPfPMoxo6CEbWca7pXOew== +svelte@~3.39.0: + version "3.39.0" + resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.39.0.tgz#35d1f18ea9be9109ff7cb54c29a913eddd151453" + integrity sha512-dcJCongL0cRkZWe9q+fde0T4HX8PksBywz2+EGDVIrdYdJaxTzrJu0RVeuDtL8Mx2hs4yn3W8zKPScuzG63hTg== sveltedoc-parser@^4.1.0: version "4.1.0" @@ -14248,9 +14247,9 @@ vue-hot-reload-api@^2.3.0: integrity sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog== vue-loader@^15.7.1: - version "15.9.6" - resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-15.9.6.tgz#f4bb9ae20c3a8370af3ecf09b8126d38ffdb6b8b" - integrity sha512-j0cqiLzwbeImIC6nVIby2o/ABAWhlppyL/m5oJ67R5MloP0hj/DtFgb0Zmq3J9CG7AJ+AXIvHVnJAPBvrLyuDg== + version "15.9.7" + resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-15.9.7.tgz#15b05775c3e0c38407679393c2ce6df673b01044" + integrity sha512-qzlsbLV1HKEMf19IqCJqdNvFJRCI58WNbS6XbPqK13MrLz65es75w392MSQ5TsARAfIjUw+ATm3vlCXUJSOH9Q== dependencies: "@vue/component-compiler-utils" "^3.1.0" hash-sum "^1.0.2"