Update environment configuration, enhance component functionality, and improve project structure. Added Umami analytics configuration to .env.example and updated astro.config.mjs to use the new site URL. Introduced pagination component in BlogOverview.svelte, refactored image handling in ImageGalleryBlock.svelte, and improved SearchableTextBlock.svelte with tooltip support. Updated package.json with new scripts for Firebase deployment and added new dependencies for Storybook and Firebase. Enhanced styling and layout across various components for better user experience.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import type { StorybookConfig } from '@storybook/svelte-vite';
|
||||
import { svelte } from '@sveltejs/vite-plugin-svelte';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
|
||||
const config: StorybookConfig = {
|
||||
stories: ['../src/lib/ui/**/*.stories.@(js|jsx|ts|tsx|svelte)'],
|
||||
framework: {
|
||||
name: '@storybook/svelte-vite',
|
||||
options: {},
|
||||
},
|
||||
docs: {
|
||||
/** Name der automatisch erzeugten Docs-Seite pro Komponente */
|
||||
defaultName: 'Dokumentation',
|
||||
},
|
||||
viteFinal: async (config) => {
|
||||
config.plugins = config.plugins || [];
|
||||
// Svelte-Plugin explizit vorn einfügen, damit .svelte-Dateien (auch aus node_modules/@storybook/svelte)
|
||||
// vor dem Vite-Import-Analysis-Plugin transformiert werden – nötig für Astro-Projekte ohne eigene vite.config
|
||||
const sveltePlugins = svelte({
|
||||
compilerOptions: {
|
||||
runes: true,
|
||||
},
|
||||
include: ['**/*.svelte', '**/node_modules/@storybook/svelte/**/*.svelte'],
|
||||
});
|
||||
config.plugins.unshift(...sveltePlugins);
|
||||
config.plugins.push(tailwindcss());
|
||||
config.optimizeDeps = config.optimizeDeps ?? {};
|
||||
config.optimizeDeps.exclude = [...(config.optimizeDeps.exclude ?? []), '@storybook/svelte'];
|
||||
config.ssr = config.ssr ?? {};
|
||||
const existing = config.ssr.noExternal;
|
||||
const noExternalList = Array.isArray(existing)
|
||||
? existing
|
||||
: existing
|
||||
? [existing]
|
||||
: [];
|
||||
const normalized = noExternalList.filter(
|
||||
(x): x is string | RegExp => typeof x === 'string' || x instanceof RegExp
|
||||
);
|
||||
config.ssr.noExternal = [...normalized, '@storybook/svelte'];
|
||||
return config;
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
@@ -0,0 +1,27 @@
|
||||
import type { Preview } from '@storybook/svelte';
|
||||
import '../src/styles/global.css';
|
||||
|
||||
const preview: Preview = {
|
||||
/** Autodocs für alle Stories aktivieren (Auto-Dokumentation aus Component + Args) */
|
||||
tags: ['autodocs'],
|
||||
parameters: {
|
||||
controls: {
|
||||
matchers: {
|
||||
color: /(background|color)$/i,
|
||||
date: /Date$/i,
|
||||
},
|
||||
},
|
||||
layout: 'centered',
|
||||
docs: {
|
||||
/** Inhaltsverzeichnis auf der Docs-Seite */
|
||||
toc: true,
|
||||
/** Story in der Docs-Seite anzeigen (vermeidet leere Docs) */
|
||||
story: {
|
||||
inline: true,
|
||||
iframeHeight: 400,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default preview;
|
||||
Reference in New Issue
Block a user