@sit-onyx/nuxt 1.0.0-beta.19 → 1.0.0-beta.190

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 CHANGED
@@ -1,9 +1,5 @@
1
1
  <div align="center" style="text-align: center">
2
- <picture>
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,6 @@ 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
37
  export { type ModuleOptions, _default as default };
package/dist/module.d.ts CHANGED
@@ -32,6 +32,6 @@ 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
37
  export { type ModuleOptions, _default as default };
package/dist/module.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@sit-onyx/nuxt",
3
3
  "configKey": "onyx",
4
- "version": "1.0.0-beta.18",
4
+ "version": "1.0.0-beta.189",
5
5
  "builder": {
6
- "@nuxt/module-builder": "0.8.1",
6
+ "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "unknown"
8
8
  }
9
9
  }
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, watchEffect } from "#imports";
2
- import { defineNuxtPlugin, useNuxtApp } from "nuxt/app";
3
- import { provideI18n, syncGlobalOptionalText } from "sit-onyx";
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
- provideI18n(app.vueApp, {
16
- locale: computed(() => localeProperties.value.iso ?? "en-US"),
17
- t
18
- });
19
- app.hook("app:beforeMount", () => {
20
- watchEffect(() => {
21
- syncGlobalOptionalText(translate(`onyx.optional`));
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sit-onyx/nuxt",
3
- "version": "1.0.0-beta.19",
3
+ "version": "1.0.0-beta.190",
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": "^1.3.9",
33
- "@nuxt/module-builder": "~0.8.1",
34
- "@nuxt/schema": "^3.12.4",
35
- "@nuxt/test-utils": "^3.13.1",
36
- "@nuxtjs/i18n": "^8.3.1",
37
- "nuxt": "^3.12.4",
38
- "vue-i18n": "^9.13.1"
29
+ "@nuxt/devtools": "^2.3.2",
30
+ "@nuxt/kit": "^3.16.1",
31
+ "@nuxt/module-builder": "~0.8.4",
32
+ "@nuxt/schema": "^3.16.1",
33
+ "@nuxt/test-utils": "^3.17.2",
34
+ "@nuxtjs/i18n": "^9.4.0",
35
+ "nuxt": "^3.16.1",
36
+ "typescript": "5.6.3",
37
+ "vue-i18n": "^11.1.2",
38
+ "sit-onyx": "^1.0.0-beta.188"
39
39
  },
40
40
  "peerDependencies": {
41
- "sit-onyx": "^1.0.0-beta.18"
41
+ "sit-onyx": "^1.0.0-beta.188"
42
42
  },
43
43
  "scripts": {
44
44
  "dev": "nuxi dev playground",