nuxt-hs-ui 2.0.1 → 2.0.3

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.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.15.0"
6
6
  },
7
- "version": "2.0.1",
7
+ "version": "2.0.3",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -65,6 +65,9 @@ const module = defineNuxtModule({
65
65
  async setup(_options, _nuxt) {
66
66
  const resolver = createResolver(import.meta.url);
67
67
  const resolve = resolver.resolve;
68
+ const runtimeDir = resolve("./runtime");
69
+ const isDevelopment = runtimeDir.endsWith("src/runtime") || runtimeDir.endsWith("src\\runtime");
70
+ const extension = isDevelopment ? "scss" : "css";
68
71
  const twReqConfig = {
69
72
  content: {
70
73
  files: [
@@ -106,8 +109,8 @@ const module = defineNuxtModule({
106
109
  path: resolve("runtime/components/misc"),
107
110
  prefix: _options.prefix.misc
108
111
  });
109
- _nuxt.options.css.push(resolve("runtime/style.scss"));
110
- _nuxt.options.css.push(resolve("runtime/tailwind.scss"));
112
+ _nuxt.options.css.push(resolve("runtime/style." + extension));
113
+ _nuxt.options.css.push(resolve("runtime/tailwind." + extension));
111
114
  _nuxt.options.css.push(resolve("runtime/assets/flatpickr-dark.css"));
112
115
  _nuxt.options.css.push(
113
116
  resolve("runtime/assets/flatpickr-month-select-style.css")
@@ -11,6 +11,7 @@ export declare const useHsMultiLang: import("pinia").StoreDefinition<"HsMultiLan
11
11
  init(arg: {
12
12
  lang?: string;
13
13
  setDayjsLang?: (lang: string) => void;
14
+ changeLangFunc?: (lang: string) => Promise<void> | void;
14
15
  }): void;
15
16
  tx(text: MultiLang, lang?: undefined): import("vue").ComputedRef<string>;
16
17
  }>;
@@ -20,6 +20,8 @@ export const useHsMultiLang = defineStore("HsMultiLang", {
20
20
  init(arg) {
21
21
  const state = this.state;
22
22
  if (state.isInit) return;
23
+ const changeLangFunc = arg.changeLangFunc === void 0 ? () => {
24
+ } : arg.changeLangFunc;
23
25
  const setDayjsLang = arg.setDayjsLang !== void 0 ? arg.setDayjsLang : (lang) => {
24
26
  if (lang === "ja") {
25
27
  dayjs.locale(ja);
@@ -35,6 +37,7 @@ export const useHsMultiLang = defineStore("HsMultiLang", {
35
37
  } else {
36
38
  setDayjsLang(lang);
37
39
  }
40
+ changeLangFunc(lang);
38
41
  },
39
42
  { immediate: true }
40
43
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-hs-ui",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "My new Nuxt module",
5
5
  "repository": "https://github.com/hare-systems-ryo/nuxt-hs-ui",
6
6
  "license": "MIT",