@myghf/ui 0.4.0 → 0.5.0

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/nuxt.d.ts CHANGED
@@ -1,14 +1,61 @@
1
1
  export interface ModuleOptions {
2
- /** Auto-import the component exports. */
3
- autoImports?: boolean;
2
+ /**
3
+ * Auto-import the library's components, composables and utilities.
4
+ * Pass an object to enable/disable the components and composables groups
5
+ * independently (unspecified keys default to enabled).
6
+ */
7
+ autoImports?: boolean | {
8
+ components?: boolean;
9
+ composables?: boolean;
10
+ };
4
11
  /** Optional prefix for auto-imported components. */
5
12
  prefix?: string;
13
+ /**
14
+ * Wire the Tailwind preset and content glob into `@nuxtjs/tailwindcss`.
15
+ * Set to `false` to opt out and silence the "not detected" warning.
16
+ */
17
+ tailwind?: boolean;
6
18
  }
19
+ export interface ResolvedAutoImports {
20
+ components: boolean;
21
+ composables: boolean;
22
+ }
23
+ /**
24
+ * Normalises the `autoImports` option into concrete per-group flags.
25
+ * `true`/`undefined` enable everything, `false` disables everything, and an
26
+ * object enables every key that is not explicitly set to `false`.
27
+ */
28
+ export declare function resolveAutoImports(option: ModuleOptions['autoImports']): ResolvedAutoImports;
7
29
  /**
8
30
  * Vue component exports that can be auto-imported by the Nuxt module.
9
31
  * Kept in sync with the component `default` exports in `src/index.ts`.
10
32
  */
11
33
  export declare const AUTO_IMPORT_COMPONENTS: string[];
34
+ /**
35
+ * Composable (stateful `use*`/`create*`) exports that are auto-imported
36
+ * unprefixed. Kept in sync with the runtime exports in `src/index.ts`.
37
+ */
38
+ export declare const AUTO_IMPORT_COMPOSABLES: string[];
39
+ /**
40
+ * Remaining pure runtime exports (helpers, formatters, tone/icon utilities)
41
+ * that are auto-imported unprefixed. Together with `AUTO_IMPORT_COMPONENTS`
42
+ * and `AUTO_IMPORT_COMPOSABLES` this covers every runtime export of
43
+ * `src/index.ts`.
44
+ */
45
+ export declare const AUTO_IMPORT_UTILITIES: string[];
46
+ /** Tailwind content glob needed to scan the published library bundle. */
47
+ export declare const TAILWIND_CONTENT_GLOB = "./node_modules/@myghf/ui/dist/**/*.js";
48
+ /** Minimal structural shape of the `@nuxtjs/tailwindcss` module options. */
49
+ export interface TailwindLikeOptions {
50
+ config?: Record<string, unknown>;
51
+ }
52
+ /**
53
+ * Adds the library's Tailwind content glob and preset to a
54
+ * `@nuxtjs/tailwindcss` config. Idempotent: calling it repeatedly (e.g. a
55
+ * module loaded more than once) never adds a duplicate entry. The string,
56
+ * array, and `{ files: [...] }` forms of `content` are all preserved.
57
+ */
58
+ export declare function wireTailwindConfig<T extends TailwindLikeOptions>(tailwind: T, preset: unknown): T;
12
59
  declare const _default: import('@nuxt/schema').NuxtModule<ModuleOptions, ModuleOptions, false>;
13
60
  export default _default;
14
61
  //# sourceMappingURL=nuxt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nuxt.d.ts","sourceRoot":"","sources":["../src/nuxt.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,UAgDlC,CAAA;;AAED,wBAiCE"}
1
+ {"version":3,"file":"nuxt.d.ts","sourceRoot":"","sources":["../src/nuxt.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG;QAAE,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;IACvE,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,OAAO,CAAA;IACnB,WAAW,EAAE,OAAO,CAAA;CACrB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,aAAa,CAAC,aAAa,CAAC,GACnC,mBAAmB,CASrB;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,UAgDlC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,UAOnC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,UAuBjC,CAAA;AAED,yEAAyE;AACzE,eAAO,MAAM,qBAAqB,0CAA0C,CAAA;AAE5E,4EAA4E;AAC5E,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjC;AAwCD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,mBAAmB,EAC9D,QAAQ,EAAE,CAAC,EACX,MAAM,EAAE,OAAO,GACd,CAAC,CAaH;;AAED,wBAuCE"}
package/dist/nuxt.js CHANGED
@@ -1,32 +1,98 @@
1
- import { addComponent as e, defineNuxtModule as t } from "@nuxt/kit";
1
+ import { addComponent as e, addImports as t, defineNuxtModule as n, logger as r } from "@nuxt/kit";
2
2
  //#region src/nuxt.ts
3
- var n = /* @__PURE__ */ "ThemeToggle.Icon.Button.Input.InputNumber.Textarea.Password.Label.FormField.FormDescription.FormMessage.Checkbox.Tag.Alert.Message.Spinner.Skeleton.Avatar.Tabs.TabsList.TabsTrigger.TabsContent.Select.SelectButton.DatePicker.Dialog.Drawer.DropdownMenu.DropdownMenuTrigger.DropdownMenuContent.DropdownMenuItem.DropdownMenuSeparator.DropdownMenuLabel.DropdownMenuGroup.TransferList.Table.TableHeader.TableBody.TableRow.TableHead.TableCell.TableEmpty.TablePagination.DataTable.TreeTable.TreeSelect.Toaster".split("."), r = t({
3
+ function i(e) {
4
+ return e === !1 ? {
5
+ components: !1,
6
+ composables: !1
7
+ } : e === void 0 || e === !0 ? {
8
+ components: !0,
9
+ composables: !0
10
+ } : {
11
+ components: e.components ?? !0,
12
+ composables: e.composables ?? !0
13
+ };
14
+ }
15
+ var a = /* @__PURE__ */ "ThemeToggle.Icon.Button.Input.InputNumber.Textarea.Password.Label.FormField.FormDescription.FormMessage.Checkbox.Tag.Alert.Message.Spinner.Skeleton.Avatar.Tabs.TabsList.TabsTrigger.TabsContent.Select.SelectButton.DatePicker.Dialog.Drawer.DropdownMenu.DropdownMenuTrigger.DropdownMenuContent.DropdownMenuItem.DropdownMenuSeparator.DropdownMenuLabel.DropdownMenuGroup.TransferList.Table.TableHeader.TableBody.TableRow.TableHead.TableCell.TableEmpty.TablePagination.DataTable.TreeTable.TreeSelect.Toaster".split("."), o = [
16
+ "useTheme",
17
+ "createTheme",
18
+ "useToast",
19
+ "createToastStore",
20
+ "toastKey",
21
+ "useFormField"
22
+ ], s = [
23
+ "cn",
24
+ "toneClasses",
25
+ "toPascalCase",
26
+ "resolveIconName",
27
+ "toNumberOrNull",
28
+ "mergeFormatOptions",
29
+ "dateToValue",
30
+ "valueToDate",
31
+ "toMinutes",
32
+ "toTime",
33
+ "clampTime",
34
+ "sortRange",
35
+ "toISODate",
36
+ "buildHourOptions",
37
+ "buildMinuteOptions",
38
+ "to12Hour",
39
+ "from12Hour",
40
+ "getFirstDayOfWeek",
41
+ "getWeekdayLabels",
42
+ "getMonthLabel",
43
+ "formatLocalizedDate",
44
+ "formatLocalizedTime"
45
+ ], c = "./node_modules/@myghf/ui/dist/**/*.js";
46
+ function l(e) {
47
+ if (typeof e == "string") return e === "./node_modules/@myghf/ui/dist/**/*.js" ? [e] : [e, c];
48
+ if (Array.isArray(e)) return e.includes("./node_modules/@myghf/ui/dist/**/*.js") ? e : [...e, c];
49
+ if (e && typeof e == "object" && Array.isArray(e.files)) {
50
+ let t = e, n = t.files;
51
+ return n.includes("./node_modules/@myghf/ui/dist/**/*.js") ? t : {
52
+ ...t,
53
+ files: [...n, c]
54
+ };
55
+ }
56
+ return [c];
57
+ }
58
+ function u(e, t) {
59
+ e.config ??= {};
60
+ let n = e.config;
61
+ n.content = l(n.content);
62
+ let r = Array.isArray(n.presets) ? n.presets : [];
63
+ return r.includes(t) || r.push(t), n.presets = r, e;
64
+ }
65
+ var d = n({
4
66
  meta: {
5
67
  name: "@myghf/ui",
6
68
  configKey: "myghfUi"
7
69
  },
8
70
  defaults: {
9
71
  autoImports: !0,
10
- prefix: ""
72
+ prefix: "",
73
+ tailwind: !0
11
74
  },
12
- async setup(t, r) {
13
- r.options.build.transpile.push("@myghf/ui"), r.options.css.unshift("@myghf/ui/tokens.css");
14
- let i = r.options.tailwindcss;
15
- if (i) {
16
- i.config ??= {};
17
- let e = i.config.content ?? [];
18
- e.push("./node_modules/@myghf/ui/dist/**/*.js"), i.config.content = e;
19
- let t = i.config.presets ?? [], n = (await import("@myghf/ui/tailwind-preset")).default;
20
- t.push(n), i.config.presets = t;
75
+ async setup(n, c) {
76
+ if (c.options.build.transpile.push("@myghf/ui"), c.options.css.unshift("@myghf/ui/tokens.css"), n.tailwind !== !1) {
77
+ let e = c.options.tailwindcss;
78
+ if (e) {
79
+ let t = (await import("@myghf/ui/tailwind-preset")).default;
80
+ u(e, t);
81
+ } else r.warn("@nuxtjs/tailwindcss was not detected, so the @myghf/ui Tailwind preset and content glob were NOT added automatically. Add './node_modules/@myghf/ui/dist/**/*.js' to your Tailwind `content`, and import '@myghf/ui/tailwind-preset' and add the imported preset object to your `presets`, or set `myghfUi: { tailwind: false }` to silence this.");
21
82
  }
22
- if (t.autoImports) for (let r of n) e({
23
- name: `${t.prefix}${r}`,
24
- export: r,
83
+ let l = i(n.autoImports);
84
+ if (l.components) for (let t of a) e({
85
+ name: `${n.prefix}${t}`,
86
+ export: t,
25
87
  filePath: "@myghf/ui"
26
88
  });
89
+ if (l.composables) for (let e of [...o, ...s]) t({
90
+ name: e,
91
+ from: "@myghf/ui"
92
+ });
27
93
  }
28
94
  });
29
95
  //#endregion
30
- export { n as AUTO_IMPORT_COMPONENTS, r as default };
96
+ export { a as AUTO_IMPORT_COMPONENTS, o as AUTO_IMPORT_COMPOSABLES, s as AUTO_IMPORT_UTILITIES, c as TAILWIND_CONTENT_GLOB, d as default, i as resolveAutoImports, u as wireTailwindConfig };
31
97
 
32
98
  //# sourceMappingURL=nuxt.js.map
package/dist/nuxt.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"nuxt.js","names":[],"sources":["../src/nuxt.ts"],"sourcesContent":["import { addComponent, defineNuxtModule } from '@nuxt/kit'\n\nexport interface ModuleOptions {\n /** Auto-import the component exports. */\n autoImports?: boolean\n /** Optional prefix for auto-imported components. */\n prefix?: string\n}\n\n/**\n * Vue component exports that can be auto-imported by the Nuxt module.\n * Kept in sync with the component `default` exports in `src/index.ts`.\n */\nexport const AUTO_IMPORT_COMPONENTS = [\n 'ThemeToggle',\n 'Icon',\n 'Button',\n 'Input',\n 'InputNumber',\n 'Textarea',\n 'Password',\n 'Label',\n 'FormField',\n 'FormDescription',\n 'FormMessage',\n 'Checkbox',\n 'Tag',\n 'Alert',\n 'Message',\n 'Spinner',\n 'Skeleton',\n 'Avatar',\n 'Tabs',\n 'TabsList',\n 'TabsTrigger',\n 'TabsContent',\n 'Select',\n 'SelectButton',\n 'DatePicker',\n 'Dialog',\n 'Drawer',\n 'DropdownMenu',\n 'DropdownMenuTrigger',\n 'DropdownMenuContent',\n 'DropdownMenuItem',\n 'DropdownMenuSeparator',\n 'DropdownMenuLabel',\n 'DropdownMenuGroup',\n 'TransferList',\n 'Table',\n 'TableHeader',\n 'TableBody',\n 'TableRow',\n 'TableHead',\n 'TableCell',\n 'TableEmpty',\n 'TablePagination',\n 'DataTable',\n 'TreeTable',\n 'TreeSelect',\n 'Toaster',\n]\n\nexport default defineNuxtModule<ModuleOptions>({\n meta: { name: '@myghf/ui', configKey: 'myghfUi' },\n defaults: { autoImports: true, prefix: '' },\n async setup(options, nuxt) {\n nuxt.options.build.transpile.push('@myghf/ui')\n nuxt.options.css.unshift('@myghf/ui/tokens.css')\n\n // Tailwind is provided by @nuxtjs/tailwindcss, which is not a dependency\n // here, so access its config defensively.\n const tw = (nuxt.options as unknown as Record<string, unknown>).tailwindcss as\n | { config?: Record<string, unknown> }\n | undefined\n if (tw) {\n tw.config ??= {}\n const content = (tw.config.content as string[] | undefined) ?? []\n content.push('./node_modules/@myghf/ui/dist/**/*.js')\n tw.config.content = content\n const presets = (tw.config.presets as unknown[] | undefined) ?? []\n // Tailwind requires preset *objects*; it does not resolve string paths.\n // The specifier is a variable so it is resolved at runtime by the\n // consumer rather than bundled into this module.\n const presetId = '@myghf/ui/tailwind-preset'\n const preset = (await import(presetId)).default\n presets.push(preset)\n tw.config.presets = presets\n }\n\n if (options.autoImports) {\n for (const name of AUTO_IMPORT_COMPONENTS) {\n addComponent({ name: `${options.prefix}${name}`, export: name, filePath: '@myghf/ui' })\n }\n }\n },\n})\n"],"mappings":";;AAaA,IAAa,IAAyB,ihBAgDtC,GAEA,IAAe,EAAgC;CAC7C,MAAM;EAAE,MAAM;EAAa,WAAW;CAAU;CAChD,UAAU;EAAE,aAAa;EAAM,QAAQ;CAAG;CAC1C,MAAM,MAAM,GAAS,GAAM;EAEzB,AADA,EAAK,QAAQ,MAAM,UAAU,KAAK,WAAW,GAC7C,EAAK,QAAQ,IAAI,QAAQ,sBAAsB;EAI/C,IAAM,IAAM,EAAK,QAA+C;EAGhE,IAAI,GAAI;GACN,EAAG,WAAW,CAAC;GACf,IAAM,IAAW,EAAG,OAAO,WAAoC,CAAC;GAEhE,AADA,EAAQ,KAAK,uCAAuC,GACpD,EAAG,OAAO,UAAU;GACpB,IAAM,IAAW,EAAG,OAAO,WAAqC,CAAC,GAK3D,KAAU,MAAM,OAAO,6BAAA,CAAW;GAExC,AADA,EAAQ,KAAK,CAAM,GACnB,EAAG,OAAO,UAAU;EACtB;EAEA,IAAI,EAAQ,aACV,KAAK,IAAM,KAAQ,GACjB,EAAa;GAAE,MAAM,GAAG,EAAQ,SAAS;GAAQ,QAAQ;GAAM,UAAU;EAAY,CAAC;CAG5F;AACF,CAAC"}
1
+ {"version":3,"file":"nuxt.js","names":[],"sources":["../src/nuxt.ts"],"sourcesContent":["import { addComponent, addImports, defineNuxtModule, logger } from '@nuxt/kit'\n\nexport interface ModuleOptions {\n /**\n * Auto-import the library's components, composables and utilities.\n * Pass an object to enable/disable the components and composables groups\n * independently (unspecified keys default to enabled).\n */\n autoImports?: boolean | { components?: boolean; composables?: boolean }\n /** Optional prefix for auto-imported components. */\n prefix?: string\n /**\n * Wire the Tailwind preset and content glob into `@nuxtjs/tailwindcss`.\n * Set to `false` to opt out and silence the \"not detected\" warning.\n */\n tailwind?: boolean\n}\n\nexport interface ResolvedAutoImports {\n components: boolean\n composables: boolean\n}\n\n/**\n * Normalises the `autoImports` option into concrete per-group flags.\n * `true`/`undefined` enable everything, `false` disables everything, and an\n * object enables every key that is not explicitly set to `false`.\n */\nexport function resolveAutoImports(\n option: ModuleOptions['autoImports'],\n): ResolvedAutoImports {\n if (option === false) return { components: false, composables: false }\n if (option === undefined || option === true) {\n return { components: true, composables: true }\n }\n return {\n components: option.components ?? true,\n composables: option.composables ?? true,\n }\n}\n\n/**\n * Vue component exports that can be auto-imported by the Nuxt module.\n * Kept in sync with the component `default` exports in `src/index.ts`.\n */\nexport const AUTO_IMPORT_COMPONENTS = [\n 'ThemeToggle',\n 'Icon',\n 'Button',\n 'Input',\n 'InputNumber',\n 'Textarea',\n 'Password',\n 'Label',\n 'FormField',\n 'FormDescription',\n 'FormMessage',\n 'Checkbox',\n 'Tag',\n 'Alert',\n 'Message',\n 'Spinner',\n 'Skeleton',\n 'Avatar',\n 'Tabs',\n 'TabsList',\n 'TabsTrigger',\n 'TabsContent',\n 'Select',\n 'SelectButton',\n 'DatePicker',\n 'Dialog',\n 'Drawer',\n 'DropdownMenu',\n 'DropdownMenuTrigger',\n 'DropdownMenuContent',\n 'DropdownMenuItem',\n 'DropdownMenuSeparator',\n 'DropdownMenuLabel',\n 'DropdownMenuGroup',\n 'TransferList',\n 'Table',\n 'TableHeader',\n 'TableBody',\n 'TableRow',\n 'TableHead',\n 'TableCell',\n 'TableEmpty',\n 'TablePagination',\n 'DataTable',\n 'TreeTable',\n 'TreeSelect',\n 'Toaster',\n]\n\n/**\n * Composable (stateful `use*`/`create*`) exports that are auto-imported\n * unprefixed. Kept in sync with the runtime exports in `src/index.ts`.\n */\nexport const AUTO_IMPORT_COMPOSABLES = [\n 'useTheme',\n 'createTheme',\n 'useToast',\n 'createToastStore',\n 'toastKey',\n 'useFormField',\n]\n\n/**\n * Remaining pure runtime exports (helpers, formatters, tone/icon utilities)\n * that are auto-imported unprefixed. Together with `AUTO_IMPORT_COMPONENTS`\n * and `AUTO_IMPORT_COMPOSABLES` this covers every runtime export of\n * `src/index.ts`.\n */\nexport const AUTO_IMPORT_UTILITIES = [\n 'cn',\n 'toneClasses',\n 'toPascalCase',\n 'resolveIconName',\n 'toNumberOrNull',\n 'mergeFormatOptions',\n 'dateToValue',\n 'valueToDate',\n 'toMinutes',\n 'toTime',\n 'clampTime',\n 'sortRange',\n 'toISODate',\n 'buildHourOptions',\n 'buildMinuteOptions',\n 'to12Hour',\n 'from12Hour',\n 'getFirstDayOfWeek',\n 'getWeekdayLabels',\n 'getMonthLabel',\n 'formatLocalizedDate',\n 'formatLocalizedTime',\n]\n\n/** Tailwind content glob needed to scan the published library bundle. */\nexport const TAILWIND_CONTENT_GLOB = './node_modules/@myghf/ui/dist/**/*.js'\n\n/** Minimal structural shape of the `@nuxtjs/tailwindcss` module options. */\nexport interface TailwindLikeOptions {\n config?: Record<string, unknown>\n}\n\n/** Tailwind's object form of `content`: `{ files: [...] }`. */\ninterface TailwindContentObject {\n files?: unknown[]\n [key: string]: unknown\n}\n\n/**\n * Returns the Tailwind `content` value with the library glob appended, without\n * clobbering whatever shape the consumer already uses. Tailwind accepts a bare\n * string glob, an array of globs, or `{ files: [...] }`; an unrecognised value\n * falls back to a fresh array. Idempotent — a value already containing the glob\n * is returned unchanged.\n */\nfunction appendContentGlob(content: unknown): unknown {\n if (typeof content === 'string') {\n return content === TAILWIND_CONTENT_GLOB\n ? [content]\n : [content, TAILWIND_CONTENT_GLOB]\n }\n if (Array.isArray(content)) {\n return content.includes(TAILWIND_CONTENT_GLOB)\n ? content\n : [...content, TAILWIND_CONTENT_GLOB]\n }\n if (\n content &&\n typeof content === 'object' &&\n Array.isArray((content as TailwindContentObject).files)\n ) {\n const object = content as TailwindContentObject\n const files = object.files as unknown[]\n return files.includes(TAILWIND_CONTENT_GLOB)\n ? object\n : { ...object, files: [...files, TAILWIND_CONTENT_GLOB] }\n }\n return [TAILWIND_CONTENT_GLOB]\n}\n\n/**\n * Adds the library's Tailwind content glob and preset to a\n * `@nuxtjs/tailwindcss` config. Idempotent: calling it repeatedly (e.g. a\n * module loaded more than once) never adds a duplicate entry. The string,\n * array, and `{ files: [...] }` forms of `content` are all preserved.\n */\nexport function wireTailwindConfig<T extends TailwindLikeOptions>(\n tailwind: T,\n preset: unknown,\n): T {\n tailwind.config ??= {}\n const config = tailwind.config\n\n config.content = appendContentGlob(config.content)\n\n const presets = Array.isArray(config.presets) ? (config.presets as unknown[]) : []\n if (!presets.includes(preset)) {\n presets.push(preset)\n }\n config.presets = presets\n\n return tailwind\n}\n\nexport default defineNuxtModule<ModuleOptions>({\n meta: { name: '@myghf/ui', configKey: 'myghfUi' },\n defaults: { autoImports: true, prefix: '', tailwind: true },\n async setup(options, nuxt) {\n nuxt.options.build.transpile.push('@myghf/ui')\n nuxt.options.css.unshift('@myghf/ui/tokens.css')\n\n if (options.tailwind !== false) {\n // Tailwind is provided by @nuxtjs/tailwindcss, which is an optional peer\n // and not a dependency here, so access its config defensively.\n const tailwind = (nuxt.options as unknown as Record<string, unknown>).tailwindcss as\n | TailwindLikeOptions\n | undefined\n if (tailwind) {\n // Tailwind requires preset *objects*; it does not resolve string paths.\n // The specifier is a variable so it is resolved at runtime by the\n // consumer rather than bundled into this module.\n const presetId = '@myghf/ui/tailwind-preset'\n const preset = (await import(presetId)).default\n wireTailwindConfig(tailwind, preset)\n } else {\n logger.warn(\n \"@nuxtjs/tailwindcss was not detected, so the @myghf/ui Tailwind preset and content glob were NOT added automatically. Add './node_modules/@myghf/ui/dist/**/*.js' to your Tailwind `content`, and import '@myghf/ui/tailwind-preset' and add the imported preset object to your `presets`, or set `myghfUi: { tailwind: false }` to silence this.\",\n )\n }\n }\n\n const autoImports = resolveAutoImports(options.autoImports)\n if (autoImports.components) {\n for (const name of AUTO_IMPORT_COMPONENTS) {\n addComponent({ name: `${options.prefix}${name}`, export: name, filePath: '@myghf/ui' })\n }\n }\n if (autoImports.composables) {\n for (const name of [...AUTO_IMPORT_COMPOSABLES, ...AUTO_IMPORT_UTILITIES]) {\n addImports({ name, from: '@myghf/ui' })\n }\n }\n },\n})\n"],"mappings":";;AA4BA,SAAgB,EACd,GACqB;CAKrB,OAJI,MAAW,KAAc;EAAE,YAAY;EAAO,aAAa;CAAM,IACjE,MAAW,KAAA,KAAa,MAAW,KAC9B;EAAE,YAAY;EAAM,aAAa;CAAK,IAExC;EACL,YAAY,EAAO,cAAc;EACjC,aAAa,EAAO,eAAe;CACrC;AACF;AAMA,IAAa,IAAyB,ihBAgDtC,GAMa,IAA0B;CACrC;CACA;CACA;CACA;CACA;CACA;AACF,GAQa,IAAwB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAGa,IAAwB;AAoBrC,SAAS,EAAkB,GAA2B;CACpD,IAAI,OAAO,KAAY,UACrB,OAAO,MAAA,0CACH,CAAC,CAAO,IACR,CAAC,GAAS,CAAqB;CAErC,IAAI,MAAM,QAAQ,CAAO,GACvB,OAAO,EAAQ,SAAA,uCAA8B,IACzC,IACA,CAAC,GAAG,GAAS,CAAqB;CAExC,IACE,KACA,OAAO,KAAY,YACnB,MAAM,QAAS,EAAkC,KAAK,GACtD;EACA,IAAM,IAAS,GACT,IAAQ,EAAO;EACrB,OAAO,EAAM,SAAA,uCAA8B,IACvC,IACA;GAAE,GAAG;GAAQ,OAAO,CAAC,GAAG,GAAO,CAAqB;EAAE;CAC5D;CACA,OAAO,CAAC,CAAqB;AAC/B;AAQA,SAAgB,EACd,GACA,GACG;CACH,EAAS,WAAW,CAAC;CACrB,IAAM,IAAS,EAAS;CAExB,EAAO,UAAU,EAAkB,EAAO,OAAO;CAEjD,IAAM,IAAU,MAAM,QAAQ,EAAO,OAAO,IAAK,EAAO,UAAwB,CAAC;CAMjF,OALK,EAAQ,SAAS,CAAM,KAC1B,EAAQ,KAAK,CAAM,GAErB,EAAO,UAAU,GAEV;AACT;AAEA,IAAA,IAAe,EAAgC;CAC7C,MAAM;EAAE,MAAM;EAAa,WAAW;CAAU;CAChD,UAAU;EAAE,aAAa;EAAM,QAAQ;EAAI,UAAU;CAAK;CAC1D,MAAM,MAAM,GAAS,GAAM;EAIzB,IAHA,EAAK,QAAQ,MAAM,UAAU,KAAK,WAAW,GAC7C,EAAK,QAAQ,IAAI,QAAQ,sBAAsB,GAE3C,EAAQ,aAAa,IAAO;GAG9B,IAAM,IAAY,EAAK,QAA+C;GAGtE,IAAI,GAAU;IAKZ,IAAM,KAAU,MAAM,OAAO,6BAAA,CAAW;IACxC,EAAmB,GAAU,CAAM;GACrC,OACE,EAAO,KACL,mVACF;EAEJ;EAEA,IAAM,IAAc,EAAmB,EAAQ,WAAW;EAC1D,IAAI,EAAY,YACd,KAAK,IAAM,KAAQ,GACjB,EAAa;GAAE,MAAM,GAAG,EAAQ,SAAS;GAAQ,QAAQ;GAAM,UAAU;EAAY,CAAC;EAG1F,IAAI,EAAY,aACd,KAAK,IAAM,KAAQ,CAAC,GAAG,GAAyB,GAAG,CAAqB,GACtE,EAAW;GAAE;GAAM,MAAM;EAAY,CAAC;CAG5C;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myghf/ui",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -57,6 +57,7 @@
57
57
  "peerDependencies": {
58
58
  "@nuxt/kit": ">=3.0.0",
59
59
  "@nuxt/schema": ">=3.0.0",
60
+ "@nuxtjs/tailwindcss": "^6.0.0",
60
61
  "tailwindcss": "^3.4.0",
61
62
  "vue": "^3.5.0"
62
63
  },
@@ -66,6 +67,9 @@
66
67
  },
67
68
  "@nuxt/schema": {
68
69
  "optional": true
70
+ },
71
+ "@nuxtjs/tailwindcss": {
72
+ "optional": true
69
73
  }
70
74
  },
71
75
  "devDependencies": {