@nuxt-ignis/ui 0.0.1 → 0.0.2
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.d.mts +4 -3
- package/dist/module.json +1 -1
- package/dist/module.mjs +27 -25
- package/dist/runtime/plugin.d.ts +1 -1
- package/dist/types.d.mts +7 -1
- package/package.json +2 -2
package/dist/module.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
|
|
3
|
-
interface
|
|
3
|
+
interface IgnisUIOptions {
|
|
4
|
+
active?: boolean;
|
|
4
5
|
ui?: boolean;
|
|
5
6
|
tailwind?: boolean;
|
|
6
7
|
openprops?: boolean;
|
|
@@ -8,7 +9,7 @@ interface ModuleOptions {
|
|
|
8
9
|
/** Absolute path to the CSS directory (provided by the core layer) */
|
|
9
10
|
cssDir?: string;
|
|
10
11
|
}
|
|
11
|
-
declare const _default: _nuxt_schema.NuxtModule<
|
|
12
|
+
declare const _default: _nuxt_schema.NuxtModule<IgnisUIOptions, IgnisUIOptions, false>;
|
|
12
13
|
|
|
13
14
|
export { _default as default };
|
|
14
|
-
export type {
|
|
15
|
+
export type { IgnisUIOptions };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver,
|
|
1
|
+
import { defineNuxtModule, createResolver, addPlugin } from '@nuxt/kit';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { defu } from 'defu';
|
|
4
4
|
import OpenProps from 'open-props';
|
|
@@ -10,34 +10,22 @@ const module$1 = defineNuxtModule({
|
|
|
10
10
|
name: "@nuxt-ignis/ui",
|
|
11
11
|
configKey: "ignisUI"
|
|
12
12
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
charts: false
|
|
20
|
-
};
|
|
21
|
-
nuxt.options.runtimeConfig.public.ignis.ui = options.ui || false;
|
|
22
|
-
nuxt.options.runtimeConfig.public.ignis.tailwind = options.tailwind || false;
|
|
23
|
-
nuxt.options.runtimeConfig.public.ignis.openprops = options.openprops || false;
|
|
24
|
-
nuxt.options.runtimeConfig.public.ignis.charts = options.charts || false;
|
|
25
|
-
const cssDir = options.cssDir || "";
|
|
13
|
+
moduleDependencies(nuxt) {
|
|
14
|
+
console.warn("@nuxt-ignis/forms - module dependencies are being resolved");
|
|
15
|
+
const modules = {};
|
|
16
|
+
const nuxtOpts = nuxt.options;
|
|
17
|
+
const options = nuxtOpts.ignisUI || nuxtOpts.ignis?.ui;
|
|
18
|
+
const cssDir = options?.cssDir || "";
|
|
26
19
|
let tailwindFixRequired = false;
|
|
27
|
-
if (options
|
|
20
|
+
if (options?.ui === true) {
|
|
28
21
|
tailwindFixRequired = true;
|
|
29
|
-
|
|
22
|
+
modules["@nuxt/ui"] = {};
|
|
30
23
|
if (cssDir) {
|
|
31
24
|
nuxt.options.css.push(join(cssDir, "ignis-nuxt-ui.css"));
|
|
32
25
|
}
|
|
33
26
|
console.debug("@nuxt/ui module installed");
|
|
34
27
|
} else {
|
|
35
|
-
|
|
36
|
-
compilerOptions: {
|
|
37
|
-
isCustomElement: (tag) => tag === "Icon" || tag === "UApp"
|
|
38
|
-
}
|
|
39
|
-
}, nuxt.options.vue);
|
|
40
|
-
if (options.tailwind === true) {
|
|
28
|
+
if (options?.tailwind === true) {
|
|
41
29
|
tailwindFixRequired = true;
|
|
42
30
|
if (cssDir) {
|
|
43
31
|
nuxt.options.css.push(join(cssDir, "ignis-tailwind.css"));
|
|
@@ -55,7 +43,7 @@ const module$1 = defineNuxtModule({
|
|
|
55
43
|
}
|
|
56
44
|
}, nuxt.options.vite);
|
|
57
45
|
}
|
|
58
|
-
if (options
|
|
46
|
+
if (options?.openprops === true) {
|
|
59
47
|
if (cssDir) {
|
|
60
48
|
nuxt.options.css.push(join(cssDir, "ignis-open-props.css"));
|
|
61
49
|
}
|
|
@@ -66,10 +54,24 @@ const module$1 = defineNuxtModule({
|
|
|
66
54
|
}, nuxt.options.postcss);
|
|
67
55
|
console.debug("Open Props CSS enabled");
|
|
68
56
|
}
|
|
69
|
-
if (options
|
|
70
|
-
|
|
57
|
+
if (options?.charts === true) {
|
|
58
|
+
modules["nuxt-charts"] = {};
|
|
71
59
|
console.debug("nuxt-charts module installed");
|
|
72
60
|
}
|
|
61
|
+
return modules;
|
|
62
|
+
},
|
|
63
|
+
setup(options, nuxt) {
|
|
64
|
+
nuxt.options.runtimeConfig.public.ignis ||= {
|
|
65
|
+
ui: false,
|
|
66
|
+
tailwind: false,
|
|
67
|
+
openprops: false,
|
|
68
|
+
charts: false
|
|
69
|
+
};
|
|
70
|
+
nuxt.options.runtimeConfig.public.ignis.ui = options.ui || false;
|
|
71
|
+
nuxt.options.runtimeConfig.public.ignis.tailwind = options.tailwind || false;
|
|
72
|
+
nuxt.options.runtimeConfig.public.ignis.openprops = options.openprops || false;
|
|
73
|
+
nuxt.options.runtimeConfig.public.ignis.charts = options.charts || false;
|
|
74
|
+
const resolver = createResolver(import.meta.url);
|
|
73
75
|
addPlugin(resolver.resolve("./runtime/plugin"));
|
|
74
76
|
}
|
|
75
77
|
});
|
package/dist/runtime/plugin.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: any;
|
|
2
2
|
export default _default;
|
package/dist/types.d.mts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
+
|
|
3
|
+
import type { default as Module } from './module.mjs'
|
|
4
|
+
|
|
5
|
+
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
+
|
|
1
7
|
export { default } from './module.mjs'
|
|
2
8
|
|
|
3
|
-
export { type
|
|
9
|
+
export { type IgnisUIOptions } from './module.mjs'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt-ignis/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Nuxt Ignis module - UI features",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@nuxt/devtools": "^3.1.1",
|
|
44
|
-
"@nuxt/eslint-config": "^1.
|
|
44
|
+
"@nuxt/eslint-config": "^1.15.1",
|
|
45
45
|
"@nuxt/module-builder": "^1.0.2",
|
|
46
46
|
"@nuxt/schema": "4.3.1",
|
|
47
47
|
"@nuxt/test-utils": "^4.0.0",
|