@vueless/storybook 1.1.3-beta.6 → 1.1.3-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/{.storybook → .storybook-js}/main.js +1 -1
  2. package/{.storybook → .storybook-js}/manager.js +20 -12
  3. package/{.storybook → .storybook-js}/preview.js +28 -26
  4. package/{.storybook → .storybook-js}/themes/themeDark.js +1 -1
  5. package/{.storybook → .storybook-js}/themes/themeLight.js +1 -1
  6. package/{.storybook → .storybook-js}/themes/themeLightPreview.js +1 -1
  7. package/{.storybook → .storybook-js}/vite.config.js +1 -0
  8. package/.storybook-ts/main.ts +10 -0
  9. package/.storybook-ts/manager-head.html +34 -0
  10. package/.storybook-ts/manager.ts +34 -0
  11. package/.storybook-ts/preview-head.html +11 -0
  12. package/.storybook-ts/preview.ts +79 -0
  13. package/.storybook-ts/public/favicons/favicon.ico +0 -0
  14. package/.storybook-ts/public/favicons/favicon.svg +4 -0
  15. package/.storybook-ts/public/images/vueless-logo-dark.svg +12 -0
  16. package/.storybook-ts/public/images/vueless-logo-light.svg +12 -0
  17. package/.storybook-ts/themes/manager.css +177 -0
  18. package/.storybook-ts/themes/preview.css +612 -0
  19. package/.storybook-ts/themes/themeDark.ts +45 -0
  20. package/.storybook-ts/themes/themeLight.ts +45 -0
  21. package/.storybook-ts/themes/themeLightPreview.ts +41 -0
  22. package/.storybook-ts/vite.config.ts +24 -0
  23. package/README.md +8 -1
  24. package/bin/index.js +6 -2
  25. package/package.json +8 -2
  26. /package/{.storybook → .storybook-js}/manager-head.html +0 -0
  27. /package/{.storybook → .storybook-js}/preview-head.html +0 -0
  28. /package/{.storybook → .storybook-js}/public/favicons/favicon.ico +0 -0
  29. /package/{.storybook → .storybook-js}/public/favicons/favicon.svg +0 -0
  30. /package/{.storybook → .storybook-js}/public/images/vueless-logo-dark.svg +0 -0
  31. /package/{.storybook → .storybook-js}/public/images/vueless-logo-light.svg +0 -0
  32. /package/{.storybook → .storybook-js}/themes/manager.css +0 -0
  33. /package/{.storybook → .storybook-js}/themes/preview.css +0 -0
@@ -0,0 +1,41 @@
1
+ import { create } from "storybook/theming/create";
2
+ import type { ThemeVars } from "storybook/theming";
3
+
4
+ export const themeLightPreview: ThemeVars = create({
5
+ base: "light",
6
+ // Typography
7
+ fontBase: '"Roboto", sans-serif',
8
+ fontCode: "monospace",
9
+
10
+ // Main colors
11
+ colorPrimary: "#111827", // gray-900
12
+ colorSecondary: "#6b7280", // gray-500
13
+
14
+ // UI
15
+ appBg: "#f3f4f6", // gray-100
16
+ appPreviewBg: "#f9fafb", // gray-50
17
+ appBorderColor: "#e5e7eb", // gray-200
18
+ appContentBg: "#f9fafb", // gray-50
19
+ appBorderRadius: 8,
20
+
21
+ // Text colors
22
+ textColor: "#111827", // gray-900
23
+ textInverseColor: "#f9fafb", // gray-50
24
+
25
+ // Toolbar default and active colors
26
+ barTextColor: "#6b7280", // gray-500
27
+ barHoverColor: "#4b5563", // gray-600
28
+ barSelectedColor: "#374151", // gray-700
29
+ barBg: "#ffffff", // white
30
+
31
+ // Form colors
32
+ inputBg: "#ffffff", // white
33
+ inputBorder: "#d1d5db", // gray-300
34
+ inputTextColor: "#111827", // gray-900
35
+ inputBorderRadius: 4,
36
+
37
+ buttonBg: "#f3f4f6", // gray-100
38
+ buttonBorder: "#e5e7eb", // gray-200
39
+ booleanBg: "#f9fafb", // gray-50
40
+ booleanSelectedBg: "#e5e7eb", // gray-200
41
+ });
@@ -0,0 +1,24 @@
1
+ import { defineConfig } from "vite";
2
+
3
+ // Plugins
4
+ import Vue from "@vitejs/plugin-vue";
5
+ import { Vueless, TailwindCSS } from "vueless/plugin-vite";
6
+ import { STORYBOOK_ENV } from "vueless/constants.js";
7
+
8
+ export default defineConfig({
9
+ plugins: [Vue(), TailwindCSS(), Vueless({ env: STORYBOOK_ENV })],
10
+ optimizeDeps: {
11
+ include: [
12
+ "cva",
13
+ "tailwind-merge",
14
+ "prettier2",
15
+ "prettier2/parser-html",
16
+ "@storybook/addon-docs/blocks",
17
+ "storybook/theming/create",
18
+ "storybook/internal/docs-tools",
19
+ "@storybook/addon-themes",
20
+ "@storybook/vue3-vite",
21
+ "@vueless/storybook",
22
+ ],
23
+ },
24
+ });
package/README.md CHANGED
@@ -9,7 +9,14 @@ Zero config preset to launch a tailored Storybook instance for a [Vueless](https
9
9
  ## Installation
10
10
 
11
11
  ```bash
12
- npm install @vueless/storybook
12
+ # Install Vueless UI.
13
+ npm install vueless
14
+
15
+ # Install Vueless Storybook preset.
16
+ npm install -D @vueless/storybook
17
+
18
+ # Copy Vueless Storybook preset into your project.
19
+ npx @vueless/storybook
13
20
  ```
14
21
 
15
22
  ## Contributing
package/bin/index.js CHANGED
@@ -5,12 +5,16 @@ import path from "node:path";
5
5
  import { cwd } from "node:process";
6
6
  import { styleText } from "node:util";
7
7
  import fs, { promises } from "node:fs";
8
+ import { detectTypeScript } from "vueless/utils/node/helper.js";
8
9
 
9
10
  const __dirname = path.dirname(new URL(import.meta.url).pathname);
10
- const source = path.join(__dirname, "..", ".storybook");
11
+ const sourceTs = path.join(__dirname, "..", ".storybook-ts");
12
+ const sourceJs = path.join(__dirname, "..", ".storybook-js");
11
13
  const target = path.join(cwd(), ".storybook");
12
14
 
13
- copyStorybookPreset(source, target);
15
+ const hasTypeScript = await detectTypeScript();
16
+
17
+ hasTypeScript ? copyStorybookPreset(sourceTs, target) : copyStorybookPreset(sourceJs, target);
14
18
 
15
19
  await addStorybookCommands();
16
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vueless/storybook",
3
- "version": "1.1.3-beta.6",
3
+ "version": "1.1.3-beta.8",
4
4
  "description": "Simplifies Storybook configuration for Vueless UI library.",
5
5
  "author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
6
6
  "homepage": "https://vueless.com",
@@ -14,6 +14,7 @@
14
14
  "copy": "./bin/index.js"
15
15
  },
16
16
  "scripts": {
17
+ "ts:check": "vue-tsc --build --force",
17
18
  "lint": "eslint --no-fix src/",
18
19
  "lint:fix": "eslint --fix src/",
19
20
  "lint:ci": "eslint --no-fix --max-warnings=0",
@@ -40,7 +41,9 @@
40
41
  "devDependencies": {
41
42
  "@release-it/bumper": "^7.0.5",
42
43
  "@stylistic/eslint-plugin": "^5.2.3",
44
+ "@tsconfig/node20": "^20.1.6",
43
45
  "@types/node": "^24.3.0",
46
+ "@vitejs/plugin-vue": "^6.0.1",
44
47
  "eslint": "^9.33.0",
45
48
  "eslint-config-prettier": "^10.1.8",
46
49
  "eslint-plugin-node": "^11.1.0",
@@ -49,9 +52,12 @@
49
52
  "prettier": "^3.6.2",
50
53
  "release-it": "^19.0.4",
51
54
  "tailwindcss": "^4.1.12",
55
+ "typescript": "^5.9.2",
56
+ "typescript-eslint": "^8.40.0",
52
57
  "vue": "latest",
53
58
  "vue-router": "latest",
54
- "vueless": "^1.2.0"
59
+ "vue-tsc": "^3.0.6",
60
+ "vueless": "^1.2.1-beta.2"
55
61
  },
56
62
  "overrides": {
57
63
  "vue-docgen-api": {
File without changes
File without changes