@witchcraft/ui 0.3.21 → 0.3.23

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "witchcraftUi",
3
3
  "configKey": "witchcraftUi",
4
- "version": "0.3.21",
4
+ "version": "0.3.23",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -73,18 +73,22 @@ const module$1 = defineNuxtModule({
73
73
  directives: options.directives
74
74
  }
75
75
  );
76
+ const assetDir = resolve("runtime/assets");
77
+ const tailwindFiles = globFiles([
78
+ `${assetDir}/**/*.css`,
79
+ `!${assetDir}/**/tailwind.css`,
80
+ `!${assetDir}/**/theme.css`
81
+ ], []);
76
82
  addTemplate({
77
83
  filename: "witchcraft-ui.css",
78
84
  write: true,
79
85
  getContents: () => options._playgroundWorkaround ? crop`
80
86
  ${indent(themeAsTailwindCss(theme, themeConvertionOpts), 5)}
81
- @import "${resolve("runtime/assets/base.css")}";
82
- @import "${resolve("runtime/assets/utils.css")}";
87
+ ${indent(tailwindFiles.map((_) => `@import "${_.filepath}";`).join("\n"), 5)}
83
88
  ${indent(filteredComponentsInfo.map((_) => `@source "${_.filepath}";`).join("\n"), 5)}
84
89
  ` : crop`
85
90
  ${indent(themeAsTailwindCss(theme, themeConvertionOpts), 5)}
86
- @import "@witchcraft/ui/base.css";
87
- @import "@witchcraft/ui/utils.css";
91
+ ${indent(tailwindFiles.map((_) => `@import "${_.filepath.replace(assetDir, "@witchcraft/ui")}";`).join("\n"), 5)}
88
92
  ${indent(filteredComponentsInfo.map((_) => `@source "${_.filepath}";`).join("\n"), 5)}
89
93
  `
90
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
- disabled: boolean;
16
15
  readonly: boolean;
16
+ disabled: 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
- disabled: boolean;
16
15
  readonly: boolean;
16
+ disabled: 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
- disabled: boolean;
29
28
  readonly: boolean;
29
+ disabled: 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
- disabled: boolean;
29
28
  readonly: boolean;
29
+ disabled: 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
- disabled: boolean;
134
133
  readonly: boolean;
134
+ disabled: 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
- disabled: boolean;
134
133
  readonly: boolean;
134
+ disabled: 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
- disabled: boolean;
16
15
  readonly: boolean;
16
+ disabled: 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
- disabled: boolean;
16
15
  readonly: boolean;
16
+ disabled: 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
- disabled: boolean;
12
11
  readonly: boolean;
12
+ disabled: 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
- disabled: boolean;
12
11
  readonly: boolean;
12
+ disabled: 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
- disabled: boolean;
28
27
  readonly: boolean;
28
+ disabled: 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
- disabled: boolean;
28
27
  readonly: boolean;
28
+ disabled: 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
- disabled: boolean;
69
68
  readonly: boolean;
69
+ disabled: 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
- disabled: boolean;
69
68
  readonly: boolean;
69
+ disabled: 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.21",
3
+ "version": "0.3.23",
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
+ "./animation.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
@@ -133,20 +133,25 @@ export default defineNuxtModule<ModuleOptions>({
133
133
  }
134
134
  )
135
135
 
136
+ const assetDir = resolve("runtime/assets")
137
+ const tailwindFiles = globFiles([
138
+ `${assetDir}/**/*.css`,
139
+ `!${assetDir}/**/tailwind.css`,
140
+ `!${assetDir}/**/theme.css`
141
+ ], [])
142
+
136
143
  addTemplate({
137
144
  filename: "witchcraft-ui.css",
138
145
  write: true,
139
146
  getContents: () => options._playgroundWorkaround
140
147
  ? crop`
141
148
  ${indent(themeAsTailwindCss(theme, themeConvertionOpts), 5)}
142
- @import "${resolve("runtime/assets/base.css")}";
143
- @import "${resolve("runtime/assets/utils.css")}";
149
+ ${indent(tailwindFiles.map(_ => `@import "${_.filepath}";`).join("\n"), 5)}
144
150
  ${indent(filteredComponentsInfo.map(_ => `@source "${_.filepath}";`).join("\n"), 5)}
145
151
  `
146
152
  : crop`
147
153
  ${indent(themeAsTailwindCss(theme, themeConvertionOpts), 5)}
148
- @import "@witchcraft/ui/base.css";
149
- @import "@witchcraft/ui/utils.css";
154
+ ${indent(tailwindFiles.map(_ => `@import "${_.filepath.replace(assetDir, "@witchcraft/ui")}";`).join("\n"), 5)}
150
155
  ${indent(filteredComponentsInfo.map(_ => `@source "${_.filepath}";`).join("\n"), 5)}
151
156
  `
152
157
  })
@@ -1,4 +1,4 @@
1
- /* For storybook, not exported. */
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. */
2
2
  @import "tailwindcss" source("../../");
3
3
  @import "./theme.css";
4
4
  @import "./animations.css";