x-runtime-lib 0.1.1

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 ADDED
@@ -0,0 +1 @@
1
+ # x-runtime-lib
@@ -0,0 +1,2 @@
1
+ import { ItemMeta } from '../../../../types';
2
+ export declare const densityItemsV1: ItemMeta[];
@@ -0,0 +1 @@
1
+ export * from './densityItems/v1';
@@ -0,0 +1,2 @@
1
+ declare const cfgs: any;
2
+ export default cfgs;
@@ -0,0 +1,2 @@
1
+ import { EventMeta } from '../../../../types';
2
+ export declare const events: EventMeta[];
@@ -0,0 +1,2 @@
1
+ import { MethodMeta } from '../../../../types';
2
+ export declare const methods: MethodMeta[];
@@ -0,0 +1,5 @@
1
+ import { PropMeta } from '../../../../types';
2
+ export declare const props: {
3
+ pageCommon: PropMeta[];
4
+ compCommon: PropMeta[];
5
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
@@ -0,0 +1,14 @@
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 };
@@ -0,0 +1,10 @@
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;
@@ -0,0 +1,33 @@
1
+ export type EventMeta = {
2
+ key: string;
3
+ name: string;
4
+ params?: {
5
+ key: string;
6
+ name: string;
7
+ }[];
8
+ };
9
+ export type MethodMeta = {
10
+ key: string;
11
+ name: string;
12
+ inputs?: {
13
+ key: string;
14
+ name: string;
15
+ }[];
16
+ outputs?: {
17
+ key: string;
18
+ name: string;
19
+ }[];
20
+ };
21
+ export type ItemMeta = {
22
+ title: string;
23
+ value: string;
24
+ };
25
+ export type PropMeta = {
26
+ key: string;
27
+ name: string;
28
+ ui?: 'void' | 'strInput' | 'numInput' | 'select';
29
+ default?: unknown;
30
+ items?: ItemMeta[];
31
+ parent?: boolean;
32
+ children?: PropMeta[];
33
+ };
@@ -0,0 +1,3 @@
1
+ import { I18n } from 'vue-i18n';
2
+ export declare function loadLocaleMessageElement(i18n: I18n, locale: string): Promise<void>;
3
+ export declare const i18nElement: I18n<{}, {}, {}, string, false>;
@@ -0,0 +1,4 @@
1
+ const e = {};
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const e = {};
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,2 @@
1
+ export * from './elements';
2
+ export * from './i18n/element';
package/dist/index.js ADDED
@@ -0,0 +1,42 @@
1
+ import { createI18n as s } from "vue-i18n";
2
+ import { nextTick as a } from "vue";
3
+ const c = {}, i = [
4
+ // basic
5
+ "basic/btn/v1"
6
+ ];
7
+ i.forEach((n) => {
8
+ var t;
9
+ const e = (t = require("@/elements/" + n)) == null ? void 0 : t.default;
10
+ console.assert(e), c[e.key] = e;
11
+ });
12
+ const l = ["globality_v1", "btn_v1"], r = [
13
+ {
14
+ id: "basic",
15
+ name: "basic",
16
+ items: l
17
+ }
18
+ ], m = "globality_v1", u = "ref_v1", f = {
19
+ 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)));
26
+ });
27
+ };
28
+ async function v(n, e) {
29
+ 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`);
30
+ return n.global.setLocaleMessage(e, t.default), a();
31
+ }
32
+ const k = s({
33
+ legacy: !1,
34
+ locale: "en",
35
+ fallbackLocale: "en"
36
+ });
37
+ export {
38
+ c as cfgs,
39
+ k as i18nElement,
40
+ v as loadLocaleMessageElement,
41
+ d as pkgs
42
+ };
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "x-runtime-lib",
3
+ "private": false,
4
+ "version": "0.1.1",
5
+ "type": "module",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "dev": "vite",
13
+ "build": "vue-tsc && vite build",
14
+ "preview": "vite preview",
15
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
16
+ "format": "prettier --write .",
17
+ "lint-staged": "lint-staged",
18
+ "prepare": "husky"
19
+ },
20
+ "lint-staged": {
21
+ "*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts}": "eslint --fix",
22
+ "*": "prettier --write ."
23
+ },
24
+ "peerDependencies": {
25
+ "vue": "^3.4.26",
26
+ "vue-i18n": "^9.13.1",
27
+ "vuetify": "^3.6.3"
28
+ },
29
+ "devDependencies": {
30
+ "@rushstack/eslint-patch": "^1.8.0",
31
+ "@types/node": "^20.12.7",
32
+ "@vitejs/plugin-vue": "^5.0.4",
33
+ "@vue/eslint-config-prettier": "^9.0.0",
34
+ "@vue/eslint-config-typescript": "^13.0.0",
35
+ "eslint": "^8.57.0",
36
+ "eslint-plugin-vue": "^9.24.1",
37
+ "husky": "^9.0.11",
38
+ "lint-staged": "^15.2.2",
39
+ "prettier": "3.2.5",
40
+ "rollup-plugin-copy": "^3.5.0",
41
+ "sass": "^1.74.1",
42
+ "typescript": "^5.2.2",
43
+ "vite": "^5.2.0",
44
+ "vite-plugin-css-injected-by-js": "^3.5.0",
45
+ "vue-tsc": "^2.0.6"
46
+ }
47
+ }