@explorer-1/vue-storybook 0.0.0 → 0.0.1

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.
@@ -10,7 +10,7 @@ import VueCompareImage from 'vue3-compare-image'
10
10
  import { createPinia } from 'pinia'
11
11
  import filters from '@explorer-1/vue/src/utils/filters'
12
12
  import '@explorer-1/common-storybook/src/config/canvas.css'
13
- import '@explorer-1/vue/src/assets/scss/styles.scss'
13
+ import '@explorer-1/common/src/scss/styles.scss'
14
14
  import { withGlobals, globalTypes } from './withGlobals'
15
15
  import customTheme from '@explorer-1/common-storybook/src/config/customTheme'
16
16
  import '@explorer-1/common-storybook/src/config/canvas.css'
@@ -2,7 +2,7 @@ import { useEffect, useGlobals } from '@storybook/preview-api'
2
2
  import { useThemeStore } from '@explorer-1/vue/src/store/theme'
3
3
  import { type Explorer1Theme } from '@explorer-1/vue/src/interfaces'
4
4
 
5
- const getConfig = (config) => {
5
+ export const getConfig = (config) => {
6
6
  // default values
7
7
  let defaultMethod: string = 'css'
8
8
  let options: string[] | undefined = undefined
@@ -40,6 +40,7 @@ const getConfig = (config) => {
40
40
 
41
41
  export const withGlobals = (StoryFn, context) => {
42
42
  const useTheme = useThemeStore()
43
+ // function useTheme((context) => useThemeStore)
43
44
  const { themesConfig, variantsConfig } = context.globals
44
45
  const { options, method } = getConfig(themesConfig)
45
46
  const { options: variantOptions, method: variantMethod } = getConfig(variantsConfig)
@@ -119,7 +120,7 @@ export const withGlobals = (StoryFn, context) => {
119
120
  useEffect(() => {
120
121
  if (variant) {
121
122
  const savedVariant = window.localStorage.getItem('data-variant')
122
- document.body.classList.remove(savedVariant)
123
+ if (savedVariant) document.body.classList.remove(savedVariant)
123
124
  document.body.classList.add(variant)
124
125
  window.localStorage.setItem('data-variant', variant)
125
126
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explorer-1/vue-storybook",
3
- "version": "0.0.0",
3
+ "version": "0.0.1",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -16,9 +16,13 @@
16
16
  "@fancyapps/ui": "^4.0.26",
17
17
  "@tailwindcss/forms": "^0.5.7",
18
18
  "click-outside-vue3": "^4.0.1",
19
+ "dayjs": "^1.11.11",
19
20
  "swiper": "^11.1.3",
20
21
  "vue": "^3.2.47",
21
- "vue3-compare-image": "^1.2.5"
22
+ "vue3-compare-image": "^1.2.5",
23
+ "@explorer-1/common": "1.0.1",
24
+ "@explorer-1/vue": "0.0.3",
25
+ "@explorer-1/common-storybook": "0.0.0"
22
26
  },
23
27
  "devDependencies": {
24
28
  "@rushstack/eslint-patch": "^1.2.0",
@@ -41,21 +45,17 @@
41
45
  "storybook-addon-vue-slots": "^0.9.29",
42
46
  "tailwindcss": "^3.4.3",
43
47
  "ts-node": "^10.9.2",
44
- "typescript": "^5.2.2",
48
+ "typescript": "^5.4.5",
45
49
  "unplugin-vue-components": "^0.27.0",
46
- "vite": "^5.2.0",
50
+ "vite": "^5.3.1",
47
51
  "vue-tsc": "^2.0.6",
48
- "@explorer-1/common": "1.0.0",
49
- "@explorer-1/common-storybook": "0.0.0",
50
- "@explorer-1/vue": "0.0.0",
51
- "@explorer-1/prettier-config": "1.0.0",
52
52
  "@explorer-1/tsconfig": "1.0.0",
53
+ "@explorer-1/prettier-config": "1.0.0",
53
54
  "@explorer-1/html": "0.0.0"
54
55
  },
55
56
  "scripts": {
56
57
  "dev": "pnpm storybook",
57
58
  "prepare:public": "cp -R ./node_modules/@explorer-1/common/src/public/explorer-1/ ./public/explorer-1",
58
- "prepare:public:edu": "cp -R ./node_modules/@explorer-1/common/src/public/explorer-1/ ./public/edu/explorer-1",
59
59
  "prepare:fontcss": "cp ./node_modules/@explorer-1/common/src/scss/_fonts.scss ./public/css/font-face.css",
60
60
  "storybook": "storybook dev -c .storybook -p 6006 --ci",
61
61
  "build": "storybook build -c .storybook -o storybook_compiled",
package/vite.config.ts CHANGED
@@ -21,12 +21,5 @@ export default defineConfig({
21
21
  watch: {
22
22
  usePolling: true
23
23
  }
24
- },
25
- css: {
26
- preprocessorOptions: {
27
- scss: {
28
- additionalData: `@import "@explorer-1/common/src/scss/_hover.scss";`
29
- }
30
- }
31
24
  }
32
25
  })