x-runtime-lib 0.2.2 → 0.2.4

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,4 +1,2 @@
1
1
  export declare function getPropTag(type: string, subtype: string): string | undefined;
2
- export declare function spawnNode(type: string, subtype: string, version: string, ref: {
3
- id: string;
4
- }, key: string): object | undefined;
2
+ export declare function spawnNode(type: string, subtype: string, version: string, ref: boolean, key: string): object | undefined;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { resolveComponent as b, openBlock as _, createBlock as p, nextTick as h } from "vue";
1
+ import { resolveComponent as b, openBlock as _, createBlock as h, nextTick as p } from "vue";
2
2
  const $ = (e, o) => {
3
3
  const n = e.__vccOpts || e;
4
4
  for (const [r, t] of o)
@@ -7,7 +7,7 @@ const $ = (e, o) => {
7
7
  }, w = {};
8
8
  function x(e, o) {
9
9
  const n = b("v-btn");
10
- return _(), p(n);
10
+ return _(), h(n);
11
11
  }
12
12
  const M = /* @__PURE__ */ $(w, [["render", x]]), P = (e) => {
13
13
  e.component("z-btn-v1", M);
@@ -94,8 +94,13 @@ function v(e) {
94
94
  return typeof e.default == "string" ? e.default : "";
95
95
  case "numInput":
96
96
  return typeof e.default == "number" ? e.default : 0;
97
+ case "select":
98
+ return typeof e.default == "string" ? e.default : "";
97
99
  default:
98
- console.assert(!1, `not implemented ui=${e.ui}`);
100
+ console.assert(
101
+ !1,
102
+ `get prop default failed, not implemented ui=${e.ui}`
103
+ );
99
104
  }
100
105
  }
101
106
  function k(e, o) {
@@ -117,14 +122,14 @@ function q(e, o, n, r, t) {
117
122
  console.error(`pkg not found version=${n}`);
118
123
  return;
119
124
  }
120
- const c = {}, f = z(16);
125
+ const l = {}, f = z(16);
121
126
  if (r) {
122
- const l = a.refKey;
123
- if (!a.elements.has(l)) {
127
+ const c = a.refKey;
128
+ if (!a.elements.has(c)) {
124
129
  console.error(`[ref] element not found in pkg key=${t}`);
125
130
  return;
126
131
  }
127
- const i = d[l];
132
+ const i = d[c];
128
133
  if (!i) {
129
134
  console.error(`[ref] element not found in global key=${t}`);
130
135
  return;
@@ -134,7 +139,7 @@ function q(e, o, n, r, t) {
134
139
  console.error(`[ref] props not found key=${t} tag=${s}`);
135
140
  return;
136
141
  }
137
- k(c, u), c.id = f, c.ref = {
142
+ k(l, u), l.id = f, l.ref = {
138
143
  id: t
139
144
  };
140
145
  } else {
@@ -142,19 +147,19 @@ function q(e, o, n, r, t) {
142
147
  console.error(`[key] element not found in pkg key=${t}`);
143
148
  return;
144
149
  }
145
- const l = d[t];
146
- if (!l) {
150
+ const c = d[t];
151
+ if (!c) {
147
152
  console.error(`[key] element not found in global key=${t}`);
148
153
  return;
149
154
  }
150
- const i = l.props[s];
155
+ const i = c.props[s];
151
156
  if (!i) {
152
157
  console.error(`[key] props not found key=${t} tag=${s}`);
153
158
  return;
154
159
  }
155
- k(c, i), c.id = f, c.key = t, l.leaf || (c.children = []);
160
+ k(l, i), l.id = f, l.key = t, c.leaf || (l.children = []);
156
161
  }
157
- return c;
162
+ return l;
158
163
  }
159
164
  const S = (e, o) => {
160
165
  const n = e[o];
@@ -164,7 +169,7 @@ const S = (e, o) => {
164
169
  };
165
170
  async function D(e, o) {
166
171
  const n = await S(/* @__PURE__ */ Object.assign({ "./locales/en.ts": () => import("./en-DKTWxIj4.js"), "./locales/zhHans.ts": () => import("./zhHans-QtZriYRu.js") }), `./locales/${o}.ts`);
167
- return e.global.setLocaleMessage(o, n.default), h();
172
+ return e.global.setLocaleMessage(o, n.default), p();
168
173
  }
169
174
  const F = { install: P };
170
175
  export {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-runtime-lib",
3
3
  "private": false,
4
- "version": "0.2.2",
4
+ "version": "0.2.4",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",