clan-app: Symlink more stuff from ui to ui-2d

This commit is contained in:
Qubasa
2025-06-18 18:07:58 +02:00
parent e785a6be4e
commit f80332a3f0
28 changed files with 2 additions and 20820 deletions

View File

@@ -0,0 +1 @@
../ui/.storybook

View File

@@ -1,34 +0,0 @@
import { createRequire } from "module";
import { dirname, join } from "path";
import { mergeConfig } from "vite";
import type { StorybookConfig } from "@kachurun/storybook-solid-vite";
const require = createRequire(import.meta.url);
const getAbsolutePath = (pkg: string) =>
dirname(require.resolve(join(pkg, "package.json")));
const config: StorybookConfig = {
stories: ["../src/components/**/*.mdx", "../src/components/**/*.stories.tsx"],
addons: [
getAbsolutePath("@storybook/addon-links"),
getAbsolutePath("@storybook/addon-essentials"),
getAbsolutePath("@storybook/addon-interactions"),
],
framework: {
name: "@kachurun/storybook-solid-vite",
options: {},
},
async viteFinal(config) {
return mergeConfig(config, {
define: { "process.env": {} },
});
},
docs: {
autodocs: "tag",
},
core: {
disableTelemetry: true,
},
};
export default config;

View File

@@ -1,5 +0,0 @@
html {
/* revert this which only makes sense when rendering inside the clan app webview */
overflow-x: revert;
overflow-y: revert;
}

View File

@@ -1,29 +0,0 @@
import type { Preview } from "@kachurun/storybook-solid";
import "@/src/components/v2/index.css";
import "../src/index.css";
import "./preview.css";
export const preview: Preview = {
tags: ["autodocs"],
parameters: {
docs: { toc: true },
backgrounds: {
values: [
{ name: "Dark", value: "#333" },
{ name: "Light", value: "#ffffff" },
],
default: "Light",
},
// automatically create action args for all props that start with "on"
actions: { argTypesRegex: "^on.*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
};
export default preview;

View File

@@ -1,12 +0,0 @@
import type { TestRunnerConfig } from "@storybook/test-runner";
const config: TestRunnerConfig = {
async postVisit(page, context) {
// the #storybook-root element wraps the story. In Storybook 6.x, the selector is #root
const elementHandler = await page.$("#storybook-root");
const innerHTML = await elementHandler.innerHTML();
expect(innerHTML).toMatchSnapshot();
},
};
export default config;