@nexxtmove/ui 1.1.9 → 1.2.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.js +8 -6
- package/package.json +3 -1
- package/src/nuxt.ts +18 -0
package/dist/nuxt.js
CHANGED
|
@@ -47458,7 +47458,7 @@ var Yw, Xw, Zw, Qw, $w, eT = d((() => {
|
|
|
47458
47458
|
return "[UnexpectedJSONParseError]: " + e.message;
|
|
47459
47459
|
}
|
|
47460
47460
|
};
|
|
47461
|
-
})), bj = /* @__PURE__ */
|
|
47461
|
+
})), bj = /* @__PURE__ */ f(((e, t) => {
|
|
47462
47462
|
var n = v().promises, { compileTemplate: r } = ew(), { optimize: i } = gj(), a = yj()("vite-svg-loader");
|
|
47463
47463
|
t.exports = function(e = {}) {
|
|
47464
47464
|
let { svgoConfig: t, svgo: o, defaultImport: s } = e, c = /\.svg(\?(raw|component|skipsvgo))?$/;
|
|
@@ -47491,7 +47491,7 @@ var Yw, Xw, Zw, Qw, $w, eT = d((() => {
|
|
|
47491
47491
|
}
|
|
47492
47492
|
};
|
|
47493
47493
|
}, t.exports.default = t.exports;
|
|
47494
|
-
})))(), 1),
|
|
47494
|
+
})), xj = v(), Sj = /* @__PURE__ */ h(bj(), 1), Cj = {
|
|
47495
47495
|
NexxtAnimatedNumber: "components/AnimatedNumber/AnimatedNumber.vue",
|
|
47496
47496
|
NexxtAnnouncement: "components/Announcement/Announcement.vue",
|
|
47497
47497
|
NexxtAvatar: "components/Avatar/Avatar.vue",
|
|
@@ -47546,7 +47546,7 @@ var Yw, Xw, Zw, Qw, $w, eT = d((() => {
|
|
|
47546
47546
|
NexxtToggleGroup: "components/ToggleGroup/ToggleGroup.vue",
|
|
47547
47547
|
NexxtTooltip: "components/Tooltip/Tooltip.vue",
|
|
47548
47548
|
NexxtVideoPlayer: "components/VideoPlayer/VideoPlayer.vue"
|
|
47549
|
-
},
|
|
47549
|
+
}, wj = ["@nexxtmove/ui/ui.css", "@nexxtmove/ui/dist/ui.css"], Tj = (e, t) => e.some((e) => e === t || wj.includes(e)), Ej = i({
|
|
47550
47550
|
meta: {
|
|
47551
47551
|
name: "@nexxtmove/ui",
|
|
47552
47552
|
configKey: "nexxtmoveUi",
|
|
@@ -47555,12 +47555,12 @@ var Yw, Xw, Zw, Qw, $w, eT = d((() => {
|
|
|
47555
47555
|
defaults: { addCSS: !0 },
|
|
47556
47556
|
setup(i, a) {
|
|
47557
47557
|
let { resolve: o } = r(import.meta.url);
|
|
47558
|
-
n((0,
|
|
47558
|
+
n((0, Sj.default)()), a.hook("vite:extendConfig", (e) => {
|
|
47559
47559
|
e.resolve ??= {}, e.resolve.alias ??= {};
|
|
47560
47560
|
let t = e.resolve.alias;
|
|
47561
47561
|
t["@ui-assets"] = o("../src/assets");
|
|
47562
47562
|
});
|
|
47563
|
-
for (let t of Object.keys(
|
|
47563
|
+
for (let t of Object.keys(Cj)) e({
|
|
47564
47564
|
name: t,
|
|
47565
47565
|
export: t,
|
|
47566
47566
|
filePath: "@nexxtmove/ui"
|
|
@@ -47576,8 +47576,10 @@ var Yw, Xw, Zw, Qw, $w, eT = d((() => {
|
|
|
47576
47576
|
`,
|
|
47577
47577
|
write: !0
|
|
47578
47578
|
}), a.options.css.push("#build/nexxtmove-ui.css");
|
|
47579
|
+
let n = o("./ui.css");
|
|
47580
|
+
(0, xj.existsSync)(n) && !Tj(a.options.css, n) && a.options.css.push(n);
|
|
47579
47581
|
}
|
|
47580
47582
|
}
|
|
47581
47583
|
});
|
|
47582
47584
|
//#endregion
|
|
47583
|
-
export {
|
|
47585
|
+
export { Ej as default };
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexxtmove/ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"import": "./dist/index.js"
|
|
9
9
|
},
|
|
10
10
|
"./nuxt": "./dist/nuxt.js",
|
|
11
|
+
"./ui.css": "./dist/ui.css",
|
|
12
|
+
"./dist/ui.css": "./dist/ui.css",
|
|
11
13
|
"./theme": "./tailwind/nexxtmove.tailwind.theme.css",
|
|
12
14
|
"./components.json": "./src/components.json",
|
|
13
15
|
"./components/*": "./src/components/*"
|
package/src/nuxt.ts
CHANGED
|
@@ -7,9 +7,17 @@ import {
|
|
|
7
7
|
} from '@nuxt/kit'
|
|
8
8
|
import type { NuxtModule } from '@nuxt/schema'
|
|
9
9
|
import type { UserConfig } from 'vite'
|
|
10
|
+
import { existsSync } from 'node:fs'
|
|
10
11
|
import svgLoader from 'vite-svg-loader'
|
|
11
12
|
import components from './components.json'
|
|
12
13
|
|
|
14
|
+
// The stylesheet may already be listed by the app itself, either as a package
|
|
15
|
+
// specifier or as a resolved path — adding it twice would duplicate the rules.
|
|
16
|
+
const CSS_SPECIFIERS = ['@nexxtmove/ui/ui.css', '@nexxtmove/ui/dist/ui.css']
|
|
17
|
+
|
|
18
|
+
const hasComponentCSS = (css: string[], resolvedPath: string) =>
|
|
19
|
+
css.some((entry) => entry === resolvedPath || CSS_SPECIFIERS.includes(entry))
|
|
20
|
+
|
|
13
21
|
export interface ModuleOptions {
|
|
14
22
|
/**
|
|
15
23
|
* Whether to automatically add the theme CSS.
|
|
@@ -68,6 +76,16 @@ const module: NuxtModule<ModuleOptions> = defineNuxtModule<ModuleOptions>({
|
|
|
68
76
|
write: true,
|
|
69
77
|
})
|
|
70
78
|
nuxt.options.css.push('#build/nexxtmove-ui.css')
|
|
79
|
+
|
|
80
|
+
// Compiled component `<style>` blocks (scoped rules, keyframes). Not
|
|
81
|
+
// covered by the Tailwind entry above — that only scans the .vue source
|
|
82
|
+
// for class names. Pushed last so it stays unlayered and wins over
|
|
83
|
+
// Tailwind's layers.
|
|
84
|
+
const componentCSS = resolve('./ui.css')
|
|
85
|
+
|
|
86
|
+
if (existsSync(componentCSS) && !hasComponentCSS(nuxt.options.css, componentCSS)) {
|
|
87
|
+
nuxt.options.css.push(componentCSS)
|
|
88
|
+
}
|
|
71
89
|
}
|
|
72
90
|
},
|
|
73
91
|
})
|