@witchcraft/ui 0.3.22 → 0.3.24

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.
package/README.md CHANGED
@@ -31,6 +31,7 @@ It does not install "@nuxtjs/tailwindcss" for now since it's not compatible with
31
31
  // without Nuxt:
32
32
  @import "@witchcraft/ui/utils.css";
33
33
  @import "@witchcraft/ui/base.css";
34
+ @import "@witchcraft/ui/animations.css";
34
35
  // source used components
35
36
  @source "@witchcraft/ui/components";
36
37
 
@@ -117,6 +118,7 @@ See [@witchcraft/editor/vite.config.dev.ts].
117
118
  ```css
118
119
  @import "@witchcraft/ui/utils.css";
119
120
  @import "@witchcraft/ui/base.css";
121
+ @import "@witchcraft/ui/animations.css";
120
122
  @source "/path/to/node_modules/@witchcraft/ui/src/runtime/components";
121
123
  ```
122
124
  Base just contains animation keyframes, basic styles for vue animations, and some basic global styles. They will get imported regardless of whether they are used since otherwise tailwind does not detect they are being used.
package/dist/module.d.mts CHANGED
@@ -35,7 +35,7 @@ interface ModuleOptions {
35
35
  */
36
36
  mainCssFile?: string;
37
37
  /** @internal */
38
- _playgroundWorkaround?: boolean;
38
+ _playgroundWorkaround?: string;
39
39
  }
40
40
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
41
41
 
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "witchcraftUi",
3
3
  "configKey": "witchcraftUi",
4
- "version": "0.3.22",
4
+ "version": "0.3.24",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -37,7 +37,7 @@ const module$1 = defineNuxtModule({
37
37
  componentPrefix: "W",
38
38
  debug: true,
39
39
  mainCssFile: "~/assets/css/tailwind.css",
40
- _playgroundWorkaround: false
40
+ _playgroundWorkaround: void 0
41
41
  },
42
42
  moduleDependencies: {
43
43
  // not working, see note for unpluginOptions
@@ -76,18 +76,19 @@ const module$1 = defineNuxtModule({
76
76
  const assetDir = resolve("runtime/assets");
77
77
  const tailwindFiles = globFiles([
78
78
  `${assetDir}/**/*.css`,
79
- `!${assetDir}/**/tailwind.css`
79
+ `!${assetDir}/**/tailwind.css`,
80
+ `!${assetDir}/**/theme.css`
80
81
  ], []);
81
82
  addTemplate({
82
83
  filename: "witchcraft-ui.css",
83
84
  write: true,
84
- getContents: () => options._playgroundWorkaround ? crop`
85
+ getContents: () => options._playgroundWorkaround === "@witchcraft/ui" ? crop`
85
86
  ${indent(themeAsTailwindCss(theme, themeConvertionOpts), 5)}
86
87
  ${indent(tailwindFiles.map((_) => `@import "${_.filepath}";`).join("\n"), 5)}
87
88
  ${indent(filteredComponentsInfo.map((_) => `@source "${_.filepath}";`).join("\n"), 5)}
88
89
  ` : crop`
89
90
  ${indent(themeAsTailwindCss(theme, themeConvertionOpts), 5)}
90
- ${indent(tailwindFiles.map((_) => `@import "${_.filepath.replace(assetDir, "@witchcraft/ui/")}";`).join("\n"), 5)}
91
+ ${indent(tailwindFiles.map((_) => `@import "${_.filepath.replace(assetDir, "@witchcraft/ui")}";`).join("\n"), 5)}
91
92
  ${indent(filteredComponentsInfo.map((_) => `@source "${_.filepath}";`).join("\n"), 5)}
92
93
  `
93
94
  });
@@ -12,8 +12,8 @@ export default _default;
12
12
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
13
13
  label: string;
14
14
  color: "warning" | "ok" | "danger" | "primary" | "secondary" | false;
15
- readonly: boolean;
16
15
  disabled: boolean;
16
+ readonly: boolean;
17
17
  border: boolean;
18
18
  unstyle: boolean;
19
19
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
@@ -12,8 +12,8 @@ export default _default;
12
12
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
13
13
  label: string;
14
14
  color: "warning" | "ok" | "danger" | "primary" | "secondary" | false;
15
- readonly: boolean;
16
15
  disabled: boolean;
16
+ readonly: boolean;
17
17
  border: boolean;
18
18
  unstyle: boolean;
19
19
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
@@ -25,8 +25,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props
25
25
  onSubmit?: ((val: boolean) => any) | undefined;
26
26
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
27
27
  }>, {
28
- readonly: boolean;
29
28
  disabled: boolean;
29
+ readonly: boolean;
30
30
  border: boolean;
31
31
  unstyle: boolean;
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
@@ -25,8 +25,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props
25
25
  onSubmit?: ((val: boolean) => any) | undefined;
26
26
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
27
27
  }>, {
28
- readonly: boolean;
29
28
  disabled: boolean;
29
+ readonly: boolean;
30
30
  border: boolean;
31
31
  unstyle: boolean;
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
@@ -130,8 +130,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props
130
130
  onFocus?: ((val: FocusEvent) => any) | undefined;
131
131
  onIndicatorClick?: ((val: MouseEvent) => any) | undefined;
132
132
  }>, {
133
- readonly: boolean;
134
133
  disabled: boolean;
134
+ readonly: boolean;
135
135
  border: boolean;
136
136
  unstyle: boolean;
137
137
  valid: boolean;
@@ -130,8 +130,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props
130
130
  onFocus?: ((val: FocusEvent) => any) | undefined;
131
131
  onIndicatorClick?: ((val: MouseEvent) => any) | undefined;
132
132
  }>, {
133
- readonly: boolean;
134
133
  disabled: boolean;
134
+ readonly: boolean;
135
135
  border: boolean;
136
136
  unstyle: boolean;
137
137
  valid: boolean;
@@ -12,8 +12,8 @@ declare const _default: typeof __VLS_export;
12
12
  export default _default;
13
13
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
14
14
  id: string;
15
- readonly: boolean;
16
15
  disabled: boolean;
16
+ readonly: boolean;
17
17
  border: boolean;
18
18
  unstyle: boolean;
19
19
  valid: boolean;
@@ -12,8 +12,8 @@ declare const _default: typeof __VLS_export;
12
12
  export default _default;
13
13
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
14
14
  id: string;
15
- readonly: boolean;
16
15
  disabled: boolean;
16
+ readonly: boolean;
17
17
  border: boolean;
18
18
  unstyle: boolean;
19
19
  valid: boolean;
@@ -8,8 +8,8 @@ declare const __VLS_export: import("vue").DefineComponent<LinkableByIdProps & Ba
8
8
  theme?: Theme;
9
9
  }> & Readonly<{}>, {
10
10
  theme: Theme;
11
- readonly: boolean;
12
11
  disabled: boolean;
12
+ readonly: boolean;
13
13
  border: boolean;
14
14
  unstyle: boolean;
15
15
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -8,8 +8,8 @@ declare const __VLS_export: import("vue").DefineComponent<LinkableByIdProps & Ba
8
8
  theme?: Theme;
9
9
  }> & Readonly<{}>, {
10
10
  theme: Theme;
11
- readonly: boolean;
12
11
  disabled: boolean;
12
+ readonly: boolean;
13
13
  border: boolean;
14
14
  unstyle: boolean;
15
15
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -24,8 +24,8 @@ Partial<Omit<HTMLAttributes, "class"> & TailwindClassProp>, RealProps {
24
24
  declare const _default: typeof __VLS_export;
25
25
  export default _default;
26
26
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
27
- readonly: boolean;
28
27
  disabled: boolean;
28
+ readonly: boolean;
29
29
  border: boolean;
30
30
  unstyle: boolean;
31
31
  autohideOnComplete: number;
@@ -24,8 +24,8 @@ Partial<Omit<HTMLAttributes, "class"> & TailwindClassProp>, RealProps {
24
24
  declare const _default: typeof __VLS_export;
25
25
  export default _default;
26
26
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
27
- readonly: boolean;
28
27
  disabled: boolean;
28
+ readonly: boolean;
29
29
  border: boolean;
30
30
  unstyle: boolean;
31
31
  autohideOnComplete: number;
@@ -65,8 +65,8 @@ declare const __VLS_export: import("vue").DefineComponent<Props & {
65
65
  "onFocus:parent"?: (() => any) | undefined;
66
66
  }>, {
67
67
  id: string;
68
- readonly: boolean;
69
68
  disabled: boolean;
69
+ readonly: boolean;
70
70
  border: boolean;
71
71
  unstyle: boolean;
72
72
  recordingTitle: string;
@@ -65,8 +65,8 @@ declare const __VLS_export: import("vue").DefineComponent<Props & {
65
65
  "onFocus:parent"?: (() => any) | undefined;
66
66
  }>, {
67
67
  id: string;
68
- readonly: boolean;
69
68
  disabled: boolean;
69
+ readonly: boolean;
70
70
  border: boolean;
71
71
  unstyle: boolean;
72
72
  recordingTitle: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@witchcraft/ui",
3
- "version": "0.3.22",
3
+ "version": "0.3.24",
4
4
  "description": "Vue component library.",
5
5
  "type": "module",
6
6
  "main": "./dist/runtime/main.lib.js",
@@ -32,6 +32,7 @@
32
32
  },
33
33
  "./utils.css": "./src/runtime/assets/utils.css",
34
34
  "./base.css": "./src/runtime/assets/base.css",
35
+ "./animations.css": "./src/runtime/assets/animations.css",
35
36
  "./nuxt": {
36
37
  "types": "./dist/types.d.mts",
37
38
  "import": "./dist/module.mjs"
package/src/module.ts CHANGED
@@ -75,7 +75,7 @@ export interface ModuleOptions {
75
75
  */
76
76
  mainCssFile?: string
77
77
  /** @internal */
78
- _playgroundWorkaround?: boolean
78
+ _playgroundWorkaround?: string
79
79
  }
80
80
 
81
81
  export default defineNuxtModule<ModuleOptions>({
@@ -93,7 +93,7 @@ export default defineNuxtModule<ModuleOptions>({
93
93
  componentPrefix: "W",
94
94
  debug: true,
95
95
  mainCssFile: "~/assets/css/tailwind.css",
96
- _playgroundWorkaround: false
96
+ _playgroundWorkaround: undefined
97
97
  },
98
98
  moduleDependencies: {
99
99
  // not working, see note for unpluginOptions
@@ -136,13 +136,14 @@ export default defineNuxtModule<ModuleOptions>({
136
136
  const assetDir = resolve("runtime/assets")
137
137
  const tailwindFiles = globFiles([
138
138
  `${assetDir}/**/*.css`,
139
- `!${assetDir}/**/tailwind.css`
139
+ `!${assetDir}/**/tailwind.css`,
140
+ `!${assetDir}/**/theme.css`
140
141
  ], [])
141
142
 
142
143
  addTemplate({
143
144
  filename: "witchcraft-ui.css",
144
145
  write: true,
145
- getContents: () => options._playgroundWorkaround
146
+ getContents: () => options._playgroundWorkaround === "@witchcraft/ui"
146
147
  ? crop`
147
148
  ${indent(themeAsTailwindCss(theme, themeConvertionOpts), 5)}
148
149
  ${indent(tailwindFiles.map(_ => `@import "${_.filepath}";`).join("\n"), 5)}
@@ -150,7 +151,7 @@ export default defineNuxtModule<ModuleOptions>({
150
151
  `
151
152
  : crop`
152
153
  ${indent(themeAsTailwindCss(theme, themeConvertionOpts), 5)}
153
- ${indent(tailwindFiles.map(_ => `@import "${_.filepath.replace(assetDir, "@witchcraft/ui/")}";`).join("\n"), 5)}
154
+ ${indent(tailwindFiles.map(_ => `@import "${_.filepath.replace(assetDir, "@witchcraft/ui")}";`).join("\n"), 5)}
154
155
  ${indent(filteredComponentsInfo.map(_ => `@source "${_.filepath}";`).join("\n"), 5)}
155
156
  `
156
157
  })
@@ -1,4 +1,4 @@
1
- /* For storybook, **NOT EXPORTED**. The nuxt module creates it's own version of this file by looking at all css files in this folder. See it for details. */
1
+ /* For storybook, **NOT EXPORTED**. The nuxt module creates it's own version of this file by looking at all css files in this folder. See it for details. We also need to be sure to add them to the exports. */
2
2
  @import "tailwindcss" source("../../");
3
3
  @import "./theme.css";
4
4
  @import "./animations.css";