@sit-onyx/nuxt 1.0.0-beta.19 → 1.0.0-beta.191
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/README.md +1 -5
- package/dist/module.d.mts +3 -2
- package/dist/module.d.ts +3 -2
- package/dist/module.json +2 -2
- package/dist/module.mjs +2 -2
- package/dist/runtime/plugins/onyx.js +15 -12
- package/dist/types.d.mts +7 -1
- package/dist/types.d.ts +7 -1
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
<div align="center" style="text-align: center">
|
|
2
|
-
<
|
|
3
|
-
<source media="(prefers-color-scheme: dark)" type="image/svg+xml" srcset="https://raw.githubusercontent.com/SchwarzIT/onyx/main/.github/onyx-logo-light.svg">
|
|
4
|
-
<source media="(prefers-color-scheme: light)" type="image/svg+xml" srcset="https://raw.githubusercontent.com/SchwarzIT/onyx/main/.github/onyx-logo-dark.svg">
|
|
5
|
-
<img alt="onyx logo" src="https://raw.githubusercontent.com/SchwarzIT/onyx/main/.github/onyx-logo-dark.svg" width="160px">
|
|
6
|
-
</picture>
|
|
2
|
+
<img alt="onyx logo" src="https://raw.githubusercontent.com/SchwarzIT/onyx/main/.github/onyx-logo.svg" height="96px">
|
|
7
3
|
</div>
|
|
8
4
|
|
|
9
5
|
<br>
|
package/dist/module.d.mts
CHANGED
|
@@ -32,6 +32,7 @@ interface ModuleOptions {
|
|
|
32
32
|
registerLocales?: Record<string, "en-US" | "de-DE" | "ko-KR">;
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
35
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
36
36
|
|
|
37
|
-
export {
|
|
37
|
+
export { _default as default };
|
|
38
|
+
export type { ModuleOptions };
|
package/dist/module.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ interface ModuleOptions {
|
|
|
32
32
|
registerLocales?: Record<string, "en-US" | "de-DE" | "ko-KR">;
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
35
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
36
36
|
|
|
37
|
-
export {
|
|
37
|
+
export { _default as default };
|
|
38
|
+
export type { ModuleOptions };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -12,10 +12,10 @@ const module = defineNuxtModule({
|
|
|
12
12
|
setup(options, nuxt) {
|
|
13
13
|
const logger = useLogger("@sit-onyx/nuxt");
|
|
14
14
|
const { resolve } = createResolver(import.meta.url);
|
|
15
|
-
nuxt.options.postcss.plugins.cssnano = { preset: ["default", { calc: false }] };
|
|
16
15
|
nuxt.options.css.push("sit-onyx/style.css");
|
|
17
16
|
if (options.theme !== "onyx") {
|
|
18
|
-
nuxt.options.css.push(`sit-onyx/themes/${options.theme}.css`);
|
|
17
|
+
nuxt.options.css.push(`sit-onyx/themes/${options.theme}-light.css`);
|
|
18
|
+
nuxt.options.css.push(`sit-onyx/themes/${options.theme}-dark.css`);
|
|
19
19
|
}
|
|
20
20
|
if (!options.disableGlobalStyles) {
|
|
21
21
|
nuxt.options.css.push("sit-onyx/global.css");
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import { computed
|
|
2
|
-
import { defineNuxtPlugin, useNuxtApp } from "nuxt/app";
|
|
3
|
-
import {
|
|
1
|
+
import { computed } from "#imports";
|
|
2
|
+
import { defineNuxtPlugin, useNuxtApp, useRouter } from "nuxt/app";
|
|
3
|
+
import { createOnyx } from "sit-onyx";
|
|
4
4
|
export default defineNuxtPlugin({
|
|
5
5
|
name: "onyx:plugin",
|
|
6
6
|
// @ts-ignore: dependency comes from @nuxtjs/i18n
|
|
7
7
|
dependsOn: ["i18n:plugin"],
|
|
8
8
|
setup: (app) => {
|
|
9
9
|
const { t: translate, localeProperties } = useNuxtApp().$i18n;
|
|
10
|
+
const router = useRouter();
|
|
10
11
|
const t = computed(() => {
|
|
11
12
|
return (key, placeholders) => {
|
|
12
13
|
return translate(`onyx.${key}`, placeholders?.n ?? 1, { named: placeholders });
|
|
13
14
|
};
|
|
14
15
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
app.vueApp.use(
|
|
17
|
+
createOnyx({
|
|
18
|
+
i18n: {
|
|
19
|
+
locale: computed(
|
|
20
|
+
() => localeProperties.value.language ?? localeProperties.value.iso ?? "en-US"
|
|
21
|
+
),
|
|
22
|
+
t
|
|
23
|
+
},
|
|
24
|
+
router
|
|
25
|
+
})
|
|
26
|
+
);
|
|
24
27
|
}
|
|
25
28
|
});
|
package/dist/types.d.mts
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
+
|
|
3
|
+
import type { default as Module } from './module.js'
|
|
4
|
+
|
|
5
|
+
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
+
|
|
7
|
+
export { default } from './module.js'
|
package/dist/types.d.ts
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
+
|
|
3
|
+
import type { default as Module } from './module'
|
|
4
|
+
|
|
5
|
+
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
+
|
|
7
|
+
export { default } from './module'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sit-onyx/nuxt",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.191",
|
|
4
4
|
"description": "A Nuxt module to easily integrate onyx into Nuxt projects",
|
|
5
5
|
"author": "Schwarz IT KG",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
"files": [
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@nuxt/kit": "^3.12.4"
|
|
30
|
-
},
|
|
31
28
|
"devDependencies": {
|
|
32
|
-
"@nuxt/devtools": "^
|
|
33
|
-
"@nuxt/
|
|
34
|
-
"@nuxt/
|
|
35
|
-
"@nuxt/
|
|
36
|
-
"@
|
|
37
|
-
"
|
|
38
|
-
"
|
|
29
|
+
"@nuxt/devtools": "^2.3.2",
|
|
30
|
+
"@nuxt/kit": "^3.16.2",
|
|
31
|
+
"@nuxt/module-builder": "~0.8.4",
|
|
32
|
+
"@nuxt/schema": "^3.16.2",
|
|
33
|
+
"@nuxt/test-utils": "^3.17.2",
|
|
34
|
+
"@nuxtjs/i18n": "^9.5.2",
|
|
35
|
+
"nuxt": "^3.16.2",
|
|
36
|
+
"typescript": "5.8.3",
|
|
37
|
+
"vue-i18n": "^11.1.3",
|
|
38
|
+
"sit-onyx": "^1.0.0-beta.189"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"sit-onyx": "^1.0.0-beta.
|
|
41
|
+
"sit-onyx": "^1.0.0-beta.189"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"dev": "nuxi dev playground",
|