diff --git a/.gitignore b/.gitignore
index a1998d3..fdcffad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,9 @@ node_modules
.vercel_build_output/
package-lock.json
.svench
+
+.DS_STORE
+.cache
+.temp
+node_modules/
+dist/yarn-error.log
diff --git a/.storybook/main.js b/.storybook/main.js
index 444611d..cbe87f7 100644
--- a/.storybook/main.js
+++ b/.storybook/main.js
@@ -1,12 +1,47 @@
-const path = require('path');
+const path = require("path");
+const preprocess = require("svelte-preprocess");
module.exports = {
- addons: ['@storybook/addon-actions/register'],
- stories: [ '../src/**/*stories.js' ],
- webpackFinal: (config) => {
- config.resolve.alias['~'] = path.resolve(__dirname, '../src/');
- config.resolve.alias['~C'] = path.resolve(__dirname, '../src/components/');
+ core: { builder: "storybook-builder-vite" },
+ staticDirs: ["../static", "../pictures"],
+ stories: [
+ "../src/**/*.stories.mdx",
+ "../src/**/*.stories.svelte",
+ "../src/**/stories.svelte",
+ ],
+ addons: [
+ "@storybook/addon-essentials",
+ "@storybook/addon-svelte-csf",
+ ],
+ framework: "@storybook/svelte",
+ svelteOptions: {
+ preprocess: preprocess(),
+ },
+ async viteFinal(config, { configType }) {
- return config;
- }
+ if(!config.resolve.alias) config.resolve.alias = {};
+ // customize the Vite config here
+ config.resolve.alias.$lib = path.resolve(__dirname, "../src/lib/");
+ config.resolve.alias.$app = path.resolve(__dirname, "../fake/app/");
+
+ config.resolve.dedupe = ["@storybook/client-api"];
+
+ // return the customized config
+ return config;
+ },
+ webpackFinal: async (config) => {
+ return {
+ ...config,
+ resolve: {
+ ...config.resolve,
+ alias: {
+ ...config.resolve?.alias,
+ $app: path.resolve("./fake/app"),
+ "\\$lib": path.resolve(__dirname, "../src/lib/"),
+ $lib: path.resolve(__dirname, "../src/lib/"),
+ "\\$app/env": path.resolve(__dirname, "../fake/app/env.js"),
+ },
+ },
+ };
+ },
};
diff --git a/.storybook/package.json b/.storybook/package.json
new file mode 100644
index 0000000..5bbefff
--- /dev/null
+++ b/.storybook/package.json
@@ -0,0 +1,3 @@
+{
+ "type": "commonjs"
+}
diff --git a/.storybook/preview.js b/.storybook/preview.js
new file mode 100644
index 0000000..fe480ff
--- /dev/null
+++ b/.storybook/preview.js
@@ -0,0 +1,11 @@
+import "$lib/style/index.js";
+
+export const parameters = {
+ actions: { argTypesRegex: "^on[A-Z].*" },
+ controls: {
+ matchers: {
+ color: /(background|color)$/i,
+ date: /Date$/,
+ },
+ },
+};
diff --git a/.vitebook/App.svelte b/.vitebook/App.svelte
new file mode 100644
index 0000000..ae1b2b7
--- /dev/null
+++ b/.vitebook/App.svelte
@@ -0,0 +1,6 @@
+
{json}
+