x-runtime-lib 0.1.5 → 0.1.6

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.
@@ -1,3 +1,2 @@
1
1
  import { I18n } from 'vue-i18n';
2
2
  export declare function loadLocaleMessageElement(i18n: I18n, locale: string): Promise<void>;
3
- export declare const i18nElement: I18n<{}, {}, {}, string, false>;
package/dist/index.js CHANGED
@@ -1,42 +1,35 @@
1
- import { createI18n as s } from "vue-i18n";
2
- import { nextTick as a } from "vue";
3
- const c = {}, i = [
1
+ import { nextTick as o } from "vue";
2
+ const i = {}, a = [
4
3
  // basic
5
4
  "basic/btn/v1"
6
5
  ];
7
- i.forEach((n) => {
6
+ a.forEach((s) => {
8
7
  var t;
9
- const e = (t = require("@/elements/" + n)) == null ? void 0 : t.default;
10
- console.assert(e), c[e.key] = e;
8
+ const e = (t = require("../../elements/" + s)) == null ? void 0 : t.default;
9
+ console.assert(e), i[e.key] = e;
11
10
  });
12
- const l = ["globality_v1", "btn_v1"], r = [
11
+ const c = ["globality_v1", "btn_v1"], r = [
13
12
  {
14
13
  id: "basic",
15
14
  name: "basic",
16
- items: l
15
+ items: c
17
16
  }
18
- ], m = "globality_v1", u = "ref_v1", f = {
17
+ ], l = "globality_v1", m = "ref_v1", u = {
19
18
  groups: r,
20
- globalityKey: m,
21
- refKey: u
22
- }, d = { v1: f }, b = (n, e) => {
23
- const t = n[e];
24
- return t ? typeof t == "function" ? t() : Promise.resolve(t) : new Promise((g, o) => {
25
- (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(o.bind(null, new Error("Unknown variable dynamic import: " + e)));
19
+ globalityKey: l,
20
+ refKey: m
21
+ }, y = { v1: u }, b = (s, e) => {
22
+ const t = s[e];
23
+ return t ? typeof t == "function" ? t() : Promise.resolve(t) : new Promise((f, n) => {
24
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(n.bind(null, new Error("Unknown variable dynamic import: " + e)));
26
25
  });
27
26
  };
28
- async function v(n, e) {
29
- const t = await b(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./index-lXrNuo59.js"), "./locales/zhHans/index.ts": () => import("./index-DYxpcVy9.js") }), `./locales/${e}/index.ts`);
30
- return n.global.setLocaleMessage(e, t.default), a();
27
+ async function d(s, e) {
28
+ const t = await b(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./index-DYxpcVy9.js"), "./locales/zhHans/index.ts": () => import("./index-lXrNuo59.js") }), `./locales/${e}/index.ts`);
29
+ return s.global.setLocaleMessage(e, t.default), o();
31
30
  }
32
- const k = s({
33
- legacy: !1,
34
- locale: "en",
35
- fallbackLocale: "en"
36
- });
37
31
  export {
38
- c as cfgs,
39
- k as i18nElement,
40
- v as loadLocaleMessageElement,
41
- d as pkgs
32
+ i as cfgs,
33
+ d as loadLocaleMessageElement,
34
+ y as pkgs
42
35
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-runtime-lib",
3
3
  "private": false,
4
- "version": "0.1.5",
4
+ "version": "0.1.6",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",