x-runtime-lib 0.1.6 → 0.1.8

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.
@@ -0,0 +1,2 @@
1
+ import { App } from 'vue';
2
+ export declare const install: (app: App) => void;
@@ -0,0 +1,2 @@
1
+ import { ZItem } from '../../../types';
2
+ export declare const densityItemsV1: ZItem[];
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ v1: import("..").ZPkg;
3
+ };
4
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { ZPkg } from '../../types';
2
+ declare const pkg: ZPkg;
3
+ export default pkg;
@@ -0,0 +1,3 @@
1
+ import { ZElement } from '../../../types';
2
+ declare const element: ZElement;
3
+ export default element;
@@ -0,0 +1,6 @@
1
+ export * from './_pkg';
2
+ export * from './types';
3
+ import { ZElement } from './types';
4
+ export declare const elements: {
5
+ [key: string]: ZElement;
6
+ };
@@ -1,4 +1,4 @@
1
- export type ZEventMeta = {
1
+ export type ZEvent = {
2
2
  key: string;
3
3
  name: string;
4
4
  params?: {
@@ -6,7 +6,7 @@ export type ZEventMeta = {
6
6
  name: string;
7
7
  }[];
8
8
  };
9
- export type ZMethodMeta = {
9
+ export type ZMethod = {
10
10
  key: string;
11
11
  name: string;
12
12
  inputs?: {
@@ -18,20 +18,42 @@ export type ZMethodMeta = {
18
18
  name: string;
19
19
  }[];
20
20
  };
21
- export type ZItemMeta = {
21
+ export type ZItem = {
22
22
  title: string;
23
23
  value: string;
24
24
  };
25
- export type ZPropMeta = {
25
+ export type ZProp = {
26
26
  key: string;
27
27
  keyFlag?: boolean;
28
28
  name: string;
29
- children?: ZPropMeta[];
29
+ children?: ZProp[];
30
30
  ui?: 'void' | 'strInput' | 'numInput' | 'select';
31
- items?: ZItemMeta[];
31
+ items?: ZItem[];
32
32
  array?: boolean;
33
33
  default?: unknown;
34
34
  readonly?: boolean;
35
35
  static?: boolean;
36
36
  value?: unknown;
37
37
  };
38
+ export type ZElement = {
39
+ key: string;
40
+ name: string;
41
+ comp: string;
42
+ leaf: boolean;
43
+ events: ZEvent[];
44
+ methods: ZMethod[];
45
+ props: {
46
+ [key: string]: ZProp[];
47
+ };
48
+ };
49
+ export type ZGroup = {
50
+ key: string;
51
+ name: string;
52
+ items: string[];
53
+ };
54
+ export type ZPkg = {
55
+ version: string;
56
+ globalityKey: string;
57
+ refKey: string;
58
+ groups: ZGroup[];
59
+ };
@@ -0,0 +1,21 @@
1
+ const t = {
2
+ basic: "Basic",
3
+ comp: {
4
+ button: "Button"
5
+ },
6
+ evt: {
7
+ click: "Click"
8
+ },
9
+ item: {
10
+ default: "Default",
11
+ comfortable: "Comfortable",
12
+ compact: "Compact"
13
+ },
14
+ prop: {
15
+ density: "Density",
16
+ settings: "Settings"
17
+ }
18
+ };
19
+ export {
20
+ t as default
21
+ };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,5 @@
1
- export * from './elements';
1
+ declare const _default: {
2
+ install: (app: import("vue").App<any>) => void;
3
+ };
4
+ export default _default;
2
5
  export * from './i18n/element';
package/dist/index.js CHANGED
@@ -1,35 +1,28 @@
1
- import { nextTick as o } from "vue";
2
- const i = {}, a = [
3
- // basic
4
- "basic/btn/v1"
5
- ];
6
- a.forEach((s) => {
7
- var t;
8
- const e = (t = require("../../elements/" + s)) == null ? void 0 : t.default;
9
- console.assert(e), i[e.key] = e;
10
- });
11
- const c = ["globality_v1", "btn_v1"], r = [
12
- {
13
- id: "basic",
14
- name: "basic",
15
- items: c
16
- }
17
- ], l = "globality_v1", m = "ref_v1", u = {
18
- groups: r,
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)));
1
+ import { resolveComponent as c, openBlock as r, createBlock as a, nextTick as i } from "vue";
2
+ const l = (n, t) => {
3
+ const e = n.__vccOpts || n;
4
+ for (const [s, o] of t)
5
+ e[s] = o;
6
+ return e;
7
+ }, m = {};
8
+ function u(n, t) {
9
+ const e = c("v-btn");
10
+ return r(), a(e);
11
+ }
12
+ const _ = /* @__PURE__ */ l(m, [["render", u]]), f = (n) => {
13
+ n.component("z-btn-v1", _);
14
+ }, p = (n, t) => {
15
+ const e = n[t];
16
+ return e ? typeof e == "function" ? e() : Promise.resolve(e) : new Promise((s, o) => {
17
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(o.bind(null, new Error("Unknown variable dynamic import: " + t)));
25
18
  });
26
19
  };
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();
20
+ async function b(n, t) {
21
+ const e = await p(/* @__PURE__ */ Object.assign({ "./locales/en.ts": () => import("./en-BdBaKtic.js"), "./locales/zhHans.ts": () => import("./zhHans-CwlEZHgw.js") }), `./locales/${t}.ts`);
22
+ return n.global.setLocaleMessage(t, e.default), i();
30
23
  }
24
+ const d = { install: f };
31
25
  export {
32
- i as cfgs,
33
- d as loadLocaleMessageElement,
34
- y as pkgs
26
+ d as default,
27
+ b as loadLocaleMessageElement
35
28
  };
@@ -0,0 +1,21 @@
1
+ const t = {
2
+ basic: "基本",
3
+ comp: {
4
+ button: "按钮"
5
+ },
6
+ evt: {
7
+ click: "点击"
8
+ },
9
+ item: {
10
+ default: "缺省",
11
+ comfortable: "舒适",
12
+ compact: "紧凑"
13
+ },
14
+ prop: {
15
+ density: "密度",
16
+ settings: "设置"
17
+ }
18
+ };
19
+ export {
20
+ t as default
21
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-runtime-lib",
3
3
  "private": false,
4
- "version": "0.1.6",
4
+ "version": "0.1.8",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -1,2 +0,0 @@
1
- import { ZItemMeta } from '../../../../types';
2
- export declare const densityItemsV1: ZItemMeta[];
@@ -1 +0,0 @@
1
- export * from './densityItems/v1';
@@ -1,2 +0,0 @@
1
- declare const cfgs: any;
2
- export default cfgs;
@@ -1,2 +0,0 @@
1
- import { ZEventMeta } from '../../../../types';
2
- export declare const events: ZEventMeta[];
@@ -1,2 +0,0 @@
1
- import { ZMethodMeta } from '../../../../types';
2
- export declare const methods: ZMethodMeta[];
@@ -1,5 +0,0 @@
1
- import { ZPropMeta } from '../../../../types';
2
- export declare const props: {
3
- pageCommon: ZPropMeta[];
4
- compCommon: ZPropMeta[];
5
- };
@@ -1,14 +0,0 @@
1
- export * from './types';
2
- import cfgs from './_reg';
3
- declare const pkgs: {
4
- v1: {
5
- groups: {
6
- id: string;
7
- name: string;
8
- items: string[];
9
- }[];
10
- globalityKey: string;
11
- refKey: string;
12
- };
13
- };
14
- export { cfgs, pkgs };
@@ -1,10 +0,0 @@
1
- declare const _default: {
2
- groups: {
3
- id: string;
4
- name: string;
5
- items: string[];
6
- }[];
7
- globalityKey: string;
8
- refKey: string;
9
- };
10
- export default _default;
@@ -1,4 +0,0 @@
1
- const e = {};
2
- export {
3
- e as default
4
- };
@@ -1,4 +0,0 @@
1
- const e = {};
2
- export {
3
- e as default
4
- };