@witchcraft/ui 0.3.21 → 0.3.22

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.22",
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,21 @@ 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
+ ], []);
76
81
  addTemplate({
77
82
  filename: "witchcraft-ui.css",
78
83
  write: true,
79
84
  getContents: () => options._playgroundWorkaround ? crop`
80
85
  ${indent(themeAsTailwindCss(theme, themeConvertionOpts), 5)}
81
- @import "${resolve("runtime/assets/base.css")}";
82
- @import "${resolve("runtime/assets/utils.css")}";
86
+ ${indent(tailwindFiles.map((_) => `@import "${_.filepath}";`).join("\n"), 5)}
83
87
  ${indent(filteredComponentsInfo.map((_) => `@source "${_.filepath}";`).join("\n"), 5)}
84
88
  ` : crop`
85
89
  ${indent(themeAsTailwindCss(theme, themeConvertionOpts), 5)}
86
- @import "@witchcraft/ui/base.css";
87
- @import "@witchcraft/ui/utils.css";
90
+ ${indent(tailwindFiles.map((_) => `@import "${_.filepath.replace(assetDir, "@witchcraft/ui/")}";`).join("\n"), 5)}
88
91
  ${indent(filteredComponentsInfo.map((_) => `@source "${_.filepath}";`).join("\n"), 5)}
89
92
  `
90
93
  });
@@ -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.22",
4
4
  "description": "Vue component library.",
5
5
  "type": "module",
6
6
  "main": "./dist/runtime/main.lib.js",
package/src/module.ts CHANGED
@@ -133,20 +133,24 @@ 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
+ ], [])
141
+
136
142
  addTemplate({
137
143
  filename: "witchcraft-ui.css",
138
144
  write: true,
139
145
  getContents: () => options._playgroundWorkaround
140
146
  ? crop`
141
147
  ${indent(themeAsTailwindCss(theme, themeConvertionOpts), 5)}
142
- @import "${resolve("runtime/assets/base.css")}";
143
- @import "${resolve("runtime/assets/utils.css")}";
148
+ ${indent(tailwindFiles.map(_ => `@import "${_.filepath}";`).join("\n"), 5)}
144
149
  ${indent(filteredComponentsInfo.map(_ => `@source "${_.filepath}";`).join("\n"), 5)}
145
150
  `
146
151
  : crop`
147
152
  ${indent(themeAsTailwindCss(theme, themeConvertionOpts), 5)}
148
- @import "@witchcraft/ui/base.css";
149
- @import "@witchcraft/ui/utils.css";
153
+ ${indent(tailwindFiles.map(_ => `@import "${_.filepath.replace(assetDir, "@witchcraft/ui/")}";`).join("\n"), 5)}
150
154
  ${indent(filteredComponentsInfo.map(_ => `@source "${_.filepath}";`).join("\n"), 5)}
151
155
  `
152
156
  })
@@ -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";