@quicktvui/naddons 1.0.0-alpha.3 → 1.0.0-alpha.5

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,232 +1,941 @@
1
- import { defineComponent as S, ref as b, openBlock as x, createBlock as R, unref as G, mergeProps as M, withCtx as D, renderSlot as k, onMounted as q, h, nextTick as L } from "vue";
2
- import { useES as Q, useESPlugin as F } from "@extscreen/es3-core";
3
- import { Native as P } from "@extscreen/es3-vue";
4
- const T = /* @__PURE__ */ S({
1
+ import { defineComponent as x, ref as E, openBlock as _, createBlock as S, unref as q, mergeProps as M, withCtx as D, renderSlot as O, computed as ae, resolveComponent as j, normalizeStyle as ue, watch as C, createElementBlock as de, Fragment as me, renderList as fe, shallowRef as H, onMounted as ye, h as N, nextTick as ge } from "vue";
2
+ import { useES as be, useESPlugin as pe } from "@extscreen/es3-core";
3
+ import { Native as G } from "@extscreen/es3-vue";
4
+ const W = /* @__PURE__ */ x({
5
5
  __name: "GridTabs",
6
6
  props: {
7
7
  tabsData: {},
8
8
  actionPayload: {}
9
9
  },
10
10
  emits: ["onTabSelected", "onTabNeedsData", "onLoadMore", "onItemPresence", "onTabFocused", "onItemClick", "onItemFocused"],
11
- setup(r, { expose: e, emit: u }) {
12
- const d = b(), w = O(
13
- "QtGridTabs",
11
+ setup(e, { expose: o }) {
12
+ const i = E(), t = F(
13
+ "GTTabs",
14
14
  "com.quicktvui.plugin.glintui"
15
- ), y = u;
16
- function s(a, t) {
17
- console.log(`[GridTabs.vue] received event from AsyncWrapper: ${a}`, t);
18
- const n = t && t.nativeEvent !== void 0 ? t.nativeEvent : t;
19
- console.log(`[GridTabs.vue] emitting to parent: ${a}`, n), y(a, n);
20
- }
21
- return e({
22
- scrollToTop: (...a) => {
23
- var t;
24
- return (t = d.value) == null ? void 0 : t.scrollToTop(...a);
25
- }
26
- }), (a, t) => (x(), R(G(w), M({
15
+ );
16
+ return o({
17
+ scrollToTop: (...r) => {
18
+ var n;
19
+ return (n = i.value) == null ? void 0 : n.scrollToTop(...r);
20
+ }
21
+ }), (r, n) => (_(), S(q(t), M({
27
22
  ref_key: "nativeRef",
28
- ref: d,
29
- tabsData: r.tabsData,
30
- actionPayload: r.actionPayload,
31
- onOnTabSelected: t[0] || (t[0] = (n) => s("onTabSelected", n)),
32
- onOnTabNeedsData: t[1] || (t[1] = (n) => s("onTabNeedsData", n)),
33
- onOnLoadMore: t[2] || (t[2] = (n) => s("onLoadMore", n)),
34
- onOnItemPresence: t[3] || (t[3] = (n) => s("onItemPresence", n)),
35
- onOnTabFocused: t[4] || (t[4] = (n) => s("onTabFocused", n)),
36
- onOnItemClick: t[5] || (t[5] = (n) => s("onItemClick", n)),
37
- onOnItemFocused: t[6] || (t[6] = (n) => s("onItemFocused", n))
38
- }, a.$attrs), {
23
+ ref: i,
24
+ tabsData: e.tabsData,
25
+ actionPayload: e.actionPayload,
26
+ onOnTabSelected: n[0] || (n[0] = (a) => r.$emit("onTabSelected", a.nativeEvent)),
27
+ onOnTabNeedsData: n[1] || (n[1] = (a) => r.$emit("onTabNeedsData", a.nativeEvent)),
28
+ onOnLoadMore: n[2] || (n[2] = (a) => r.$emit("onLoadMore", a.nativeEvent)),
29
+ onOnItemPresence: n[3] || (n[3] = (a) => r.$emit("onItemPresence", a.nativeEvent)),
30
+ onOnTabFocused: n[4] || (n[4] = (a) => r.$emit("onTabFocused", a.nativeEvent)),
31
+ onOnItemClick: n[5] || (n[5] = (a) => r.$emit("onItemClick", a.nativeEvent)),
32
+ onOnItemFocused: n[6] || (n[6] = (a) => r.$emit("onItemFocused", a.nativeEvent))
33
+ }, r.$attrs), {
39
34
  default: D(() => [
40
- k(a.$slots, "default")
35
+ O(r.$slots, "default")
41
36
  ]),
42
37
  _: 3
43
38
  }, 16, ["tabsData", "actionPayload"]));
44
39
  }
40
+ }), ve = x({
41
+ name: "PortalItem",
42
+ props: {
43
+ portalId: {
44
+ type: String,
45
+ required: !0
46
+ },
47
+ // 前端必须传入明确的宽高 (由于不支持 100%)
48
+ width: {
49
+ type: [Number, String],
50
+ required: !0
51
+ },
52
+ height: {
53
+ type: [Number, String],
54
+ required: !0
55
+ }
56
+ },
57
+ setup(e) {
58
+ return {
59
+ itemStyle: ae(() => {
60
+ const i = typeof e.width == "number" ? `${e.width}px` : e.width, t = typeof e.height == "number" ? `${e.height}px` : e.height;
61
+ return {
62
+ width: i,
63
+ height: t,
64
+ display: "flex",
65
+ flexDirection: "column"
66
+ };
67
+ })
68
+ };
69
+ }
70
+ }), le = (e, o) => {
71
+ const i = e.__vccOpts || e;
72
+ for (const [t, r] of o)
73
+ i[t] = r;
74
+ return i;
75
+ };
76
+ function he(e, o, i, t, r, n) {
77
+ const a = j("qt-portal-item-native");
78
+ return _(), S(a, {
79
+ portalId: e.portalId,
80
+ style: ue(e.itemStyle)
81
+ }, {
82
+ default: D(() => [
83
+ O(e.$slots, "default")
84
+ ]),
85
+ _: 3
86
+ }, 8, ["portalId", "style"]);
87
+ }
88
+ const z = /* @__PURE__ */ le(ve, [["render", he]]), Pe = x({
89
+ name: "PortalPool",
90
+ components: {
91
+ PortalItem: z
92
+ },
93
+ props: {
94
+ // 传入原始的数据源
95
+ data: {
96
+ type: Array,
97
+ default: () => []
98
+ },
99
+ // GridTabs 发出的 presence 状态表 (由父级监听 @onItemPresence 后传入)
100
+ // 格式: { [itemId: string]: 'visible' | 'enter' | 'attached' | 'leave' }
101
+ presenceMap: {
102
+ type: Object,
103
+ default: () => ({})
104
+ },
105
+ // 总宽度,用于计算基于 span 的 px 宽度
106
+ gridBasis: {
107
+ type: Number,
108
+ default: 24
109
+ },
110
+ totalWidth: {
111
+ type: Number,
112
+ default: 1920
113
+ }
114
+ },
115
+ setup(e) {
116
+ const o = E([]), i = () => {
117
+ var r;
118
+ const t = [];
119
+ for (const n of e.data)
120
+ if (n.viewType && n.viewType.startsWith("portal:") && n.portalId) {
121
+ const a = e.presenceMap[n.itemId] || "leave";
122
+ if (a !== "leave" && a !== "null" && a) {
123
+ const p = n.span || e.gridBasis, b = Math.round(e.totalWidth / e.gridBasis * p), I = ((r = n.layoutConfig) == null ? void 0 : r.aspectRatio) || 1, A = Math.round(b / I);
124
+ t.push({
125
+ ...n,
126
+ presenceState: a,
127
+ width: b,
128
+ height: A
129
+ });
130
+ }
131
+ }
132
+ o.value = t;
133
+ };
134
+ return C(() => e.data, i, { deep: !0, immediate: !0 }), C(() => e.presenceMap, i, { deep: !0 }), {
135
+ activePortals: o
136
+ };
137
+ }
45
138
  });
46
- function U(r, e) {
47
- const u = b(!1), d = b(!1);
139
+ function Ie(e, o, i, t, r, n) {
140
+ const a = j("PortalItem"), p = j("qt-portal-pool-native");
141
+ return _(), S(p, { class: "qt-portal-pool-hidden" }, {
142
+ default: D(() => [
143
+ (_(!0), de(me, null, fe(e.activePortals, (b) => (_(), S(a, {
144
+ key: b.portalId,
145
+ portalId: b.portalId,
146
+ width: b.width,
147
+ height: b.height
148
+ }, {
149
+ default: D(() => [
150
+ O(e.$slots, "default", {
151
+ portal: b,
152
+ presenceState: b.presenceState
153
+ })
154
+ ]),
155
+ _: 2
156
+ }, 1032, ["portalId", "width", "height"]))), 128))
157
+ ]),
158
+ _: 3
159
+ });
160
+ }
161
+ const X = /* @__PURE__ */ le(Pe, [["render", Ie]]);
162
+ function Re(e, o) {
163
+ const i = E(!1), t = E(!1);
48
164
  return {
49
- isIntersecting: u,
50
- isVisible: d,
51
- handlePresenceState: (y) => {
52
- var s, a, t;
53
- switch (y) {
165
+ isIntersecting: i,
166
+ isVisible: t,
167
+ handlePresenceState: (n) => {
168
+ var a, p, b;
169
+ switch (n) {
54
170
  case "enter":
55
- u.value = !0, (s = e == null ? void 0 : e.onEnter) == null || s.call(e);
171
+ i.value = !0, (a = o == null ? void 0 : o.onEnter) == null || a.call(o);
56
172
  break;
57
173
  case "visible":
58
- d.value = !0, (a = e == null ? void 0 : e.onVisible) == null || a.call(e);
174
+ t.value = !0, (p = o == null ? void 0 : o.onVisible) == null || p.call(o);
59
175
  break;
60
176
  case "leave":
61
- u.value = !1, d.value = !1, (t = e == null ? void 0 : e.onLeave) == null || t.call(e);
177
+ i.value = !1, t.value = !1, (b = o == null ? void 0 : o.onLeave) == null || b.call(o);
62
178
  break;
63
179
  }
64
180
  }
65
181
  };
66
182
  }
67
- let E;
68
- var p;
183
+ function Oe() {
184
+ const e = E(""), o = (n) => {
185
+ const a = Array.isArray(n) ? n : [n];
186
+ e.value = JSON.stringify(a);
187
+ };
188
+ return {
189
+ actionPayloadStr: e,
190
+ dispatchAction: o,
191
+ updateItem: (n, a) => {
192
+ o({
193
+ op: "UPDATE_ITEM",
194
+ itemId: n,
195
+ payload: a
196
+ });
197
+ },
198
+ appendItems: (n, a) => {
199
+ o({
200
+ op: "APPEND_SUB_ITEMS",
201
+ itemId: n,
202
+ payload: {
203
+ subItems: a
204
+ }
205
+ });
206
+ },
207
+ removeItem: (n) => {
208
+ o({
209
+ op: "REMOVE_ITEM",
210
+ itemId: n
211
+ });
212
+ }
213
+ };
214
+ }
215
+ function Te(e, o) {
216
+ if (JSON.stringify(e.page_spec) !== JSON.stringify(o.page_spec) || JSON.stringify(e.navConfig) !== JSON.stringify(o.navConfig))
217
+ return "FULL_RELOAD";
218
+ const i = e.tabs || [], t = o.tabs || [];
219
+ if (i.length !== t.length)
220
+ return "FULL_RELOAD";
221
+ for (let n = 0; n < t.length; n++)
222
+ if (i[n].tabId !== t[n].tabId)
223
+ return "FULL_RELOAD";
224
+ const r = [];
225
+ for (let n = 0; n < t.length; n++) {
226
+ const a = i[n].items || [], p = t[n].items || [], b = t[n].tabId, I = new Map(a.map((u) => [u.id || u.itemId, u])), A = new Map(p.map((u) => [u.id || u.itemId, u]));
227
+ let $ = -1;
228
+ const v = [];
229
+ for (let u = 0; u < p.length; u++) {
230
+ const y = p[u], h = y.id || y.itemId, l = I.get(h);
231
+ if (l) {
232
+ const c = a.findIndex((R) => (R.id || R.itemId) === h);
233
+ if (c <= $ || ($ = c, l.viewType !== y.viewType || l.span !== y.span))
234
+ return "FULL_RELOAD";
235
+ const T = JSON.stringify(l.content) !== JSON.stringify(y.content), w = l.state !== y.state;
236
+ (T || w) && r.push({
237
+ op: "UPDATE_ITEM",
238
+ itemId: h,
239
+ payload: {
240
+ content: T ? y.content : void 0,
241
+ state: w ? y.state : void 0
242
+ }
243
+ });
244
+ } else {
245
+ let c = !0;
246
+ for (let T = u + 1; T < p.length; T++)
247
+ if (I.has(p[T].id || p[T].itemId)) {
248
+ c = !1;
249
+ break;
250
+ }
251
+ if (!c)
252
+ return "FULL_RELOAD";
253
+ v.push(y);
254
+ }
255
+ }
256
+ v.length > 0 && r.push({
257
+ op: "APPEND_SUB_ITEMS",
258
+ itemId: b,
259
+ // 追加到对应的 Tab 容器下
260
+ payload: { subItems: v }
261
+ });
262
+ for (const u of a) {
263
+ const y = u.id || u.itemId;
264
+ A.has(y) || r.push({
265
+ op: "REMOVE_ITEM",
266
+ itemId: y
267
+ });
268
+ }
269
+ }
270
+ return r;
271
+ }
272
+ function Ne(e) {
273
+ const o = E(""), i = E("");
274
+ let t = "";
275
+ return C(e, (r) => {
276
+ if (!r) {
277
+ o.value = "", t = "";
278
+ return;
279
+ }
280
+ const n = JSON.stringify(r);
281
+ if (n !== t) {
282
+ if (!t) {
283
+ o.value = n, t = n;
284
+ return;
285
+ }
286
+ try {
287
+ const a = JSON.parse(t), p = JSON.parse(n), b = Te(a, p);
288
+ b === "FULL_RELOAD" ? (console.log("[@quicktvui/naddons] Auto-Diff: 结构突变,执行全量刷新 (FULL_RELOAD)"), o.value = n) : b.length > 0 && (console.log("[@quicktvui/naddons] Auto-Diff: 命中局部更新,生成 Patch 指令 ->", b), i.value = JSON.stringify(b)), t = n;
289
+ } catch (a) {
290
+ console.warn("[@quicktvui/naddons] Auto-Diff failed, falling back to FULL_RELOAD", a), o.value = n, t = n;
291
+ }
292
+ }
293
+ }, { deep: !0, immediate: !0 }), {
294
+ tabsDataStr: o,
295
+ actionPayloadStr: i
296
+ };
297
+ }
298
+ let L;
299
+ var ne;
69
300
  try {
70
- const r = require("@extscreen/es3-vue");
71
- E = r.registerElement || ((p = r.default) == null ? void 0 : p.registerElement);
301
+ const e = require("@extscreen/es3-vue");
302
+ L = e.registerElement || ((ne = e.default) == null ? void 0 : ne.registerElement);
72
303
  } catch {
73
304
  }
74
- const W = {
75
- install: (r) => {
76
- globalThis.__QtGridTabs_registered || (E ? (E("qt-grid-tabs", {
305
+ const Ee = {
306
+ install: (e) => {
307
+ globalThis.__GTTabs_registered || (L ? (L("gt-tabs", {
77
308
  component: {
78
- name: "QtGridTabs",
79
- // 关键:将前端标签映射到真正的 Native 组件名
80
- processEventData(e, u, d) {
81
- return {
82
- handler: u,
83
- nativeEvent: d
84
- };
309
+ name: "GTTabs",
310
+ processEventData(o, i) {
311
+ const t = o.handler || o, r = i || t.nativeParams || {};
312
+ return t && (t.nativeEvent = r), t;
85
313
  }
86
314
  }
87
- }), E("QtGridTabs", {
315
+ }), L("qt-portal-pool-native", {
316
+ component: { name: "QtPortalPool" }
317
+ }), L("qt-portal-item-native", {
318
+ component: { name: "QtPortalItem" }
319
+ }), L("qt-grid-tabs", {
88
320
  component: {
89
- name: "QtGridTabs",
90
- processEventData(e, u, d) {
321
+ name: "GTTabs",
322
+ defaultNativeProps: {},
323
+ processEventData(o, i, t) {
91
324
  return {
92
- handler: u,
93
- nativeEvent: d
325
+ ...o,
326
+ ...t
94
327
  };
95
328
  }
96
329
  }
97
- }), globalThis.__QtGridTabs_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtGridTabs")) : console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue")), r.component("GridTabs", T), r.component("qt-grid-tabs", T);
330
+ }), globalThis.__GTTabs_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tags for GridTabs & Portals")) : console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue")), e.component("GridTabs", W), e.component("gt-tabs", W), e.component("qt-grid-tabs", W), e.component("QtPortalItem", z), e.component("qt-portal-item", z), e.component("QtPortalPool", X), e.component("qt-portal-pool", X);
331
+ }
332
+ };
333
+ function Le(e, o) {
334
+ const i = E(""), t = E(""), r = H([]), n = H([]);
335
+ let a = !1, p = !1;
336
+ const b = "__virtual_single_tab__", I = E({}), A = (s) => {
337
+ const m = Array.isArray(s) ? s : [s];
338
+ t.value = JSON.stringify(m);
339
+ }, $ = (s, m) => {
340
+ if (!s)
341
+ return !1;
342
+ let d = !0;
343
+ return s.id || (console.error(`[useGridTabs] ❌ 数据格式错误 (${m}): 卡片缺失必填字段 'id'。每个卡片必须有唯一标识才能进行后续更新!`, s), d = !1), s.viewType || (console.error(`[useGridTabs] ❌ 数据格式错误 (${m}): 卡片缺失必填字段 'viewType' (id: ${s.id || "未知"})。必须指定 Native 注册的视图类型或 Portal 标识!`, s), d = !1), d;
344
+ }, v = (s, m) => {
345
+ if (!s)
346
+ return !1;
347
+ let d = !0;
348
+ return s.tabId || (console.error(`[useGridTabs] ❌ 数据格式错误 (${m}): Tab 缺失必填字段 'tabId'。每个 Tab 必须有唯一标识!`, s), d = !1), (s.title === void 0 || s.title === null) && console.warn(`[useGridTabs] ⚠️ 数据格式警告 (${m}): Tab 缺失 'title' 字段 (tabId: ${s.tabId || "未知"}),导航栏可能显示为空。`, s), d;
349
+ }, u = (s, m) => {
350
+ if (!s || s.length === 0)
351
+ return;
352
+ const d = s[0].hasOwnProperty("tabId") || s[0].hasOwnProperty("items") && Array.isArray(s[0].items);
353
+ a = m === "1d", m === "1d" && d ? console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `items.value` (一维瀑布流) 赋值二维 Tabs 数据结构!请改用 `tabs.value = ...`") : m === "2d" && !d && console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `tabs.value` (二维导航) 赋值一维卡片列表数据结构!请改用 `items.value = ...`"), m === "1d" ? s.forEach((g, f) => $(g, `items.value[${f}]`)) : s.forEach((g, f) => {
354
+ v(g, `tabs.value[${f}]`), g.items && Array.isArray(g.items) && g.items.forEach((P, k) => $(P, `tabs.value[${f}].items[${k}]`));
355
+ }), p = !0, y();
356
+ }, y = () => {
357
+ if (!p)
358
+ return;
359
+ let s = {
360
+ gridBasis: (o == null ? void 0 : o.gridBasis) ?? 30,
361
+ unitType: (o == null ? void 0 : o.unitType) ?? "px",
362
+ layoutConfig: (o == null ? void 0 : o.layoutConfig) ?? {
363
+ screenPadding: { left: 60, right: 60, top: 0, bottom: 60 },
364
+ navContentGapNormal: 0,
365
+ itemGap: 24
366
+ },
367
+ navConfig: (o == null ? void 0 : o.navConfig) ?? {
368
+ placement: "left",
369
+ mode: "fixed",
370
+ renderType: "classic",
371
+ baseSize: 200,
372
+ expandedSize: 300
373
+ },
374
+ referenceResolution: (o == null ? void 0 : o.referenceResolution) ?? { w: 1920, h: 1080 }
375
+ }, m = [];
376
+ a ? (s.navConfig = { ...s.navConfig, renderType: "none" }, m = [
377
+ {
378
+ tabId: b,
379
+ title: "Virtual Tab",
380
+ hidden: !0,
381
+ items: n.value
382
+ }
383
+ ]) : m = r.value, i.value = JSON.stringify({
384
+ page_spec: s,
385
+ tabs: m
386
+ });
387
+ }, h = (s, m) => new Proxy(s, {
388
+ get(d, g, f) {
389
+ return g === "push" ? (...P) => {
390
+ P.forEach((V, ce) => $(V, `push(${ce})`)), p || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 push()。请先对 items.value 或 tabs.value 进行全量赋值!");
391
+ const k = Array.prototype.push.apply(d, P);
392
+ return A({
393
+ op: "APPEND_SUB_ITEMS",
394
+ itemId: m,
395
+ payload: { subItems: P }
396
+ }), k;
397
+ } : Reflect.get(d, g, f);
398
+ },
399
+ set(d, g, f, P) {
400
+ if (g !== "length" && !isNaN(Number(g))) {
401
+ p || console.error(`[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时直接修改了索引 [${String(g)}]。请先对 items.value 或 tabs.value 进行全量赋值!`), $(f, `索引赋值 [${String(g)}]`);
402
+ const k = Reflect.set(d, g, f, P);
403
+ return f && f.id && A({
404
+ op: "UPDATE_ITEM",
405
+ itemId: f.id,
406
+ payload: f
407
+ }), k;
408
+ }
409
+ return Reflect.set(d, g, f, P);
410
+ }
411
+ }), l = (s) => (s.items && Array.isArray(s.items) && !s.items.__isGridTabsProxy && (s.items = h(s.items, s.tabId), Object.defineProperty(s.items, "__isGridTabsProxy", { value: !0, enumerable: !1 })), new Proxy(s, {
412
+ set(m, d, g, f) {
413
+ if (d === "items") {
414
+ let P = g;
415
+ Array.isArray(g) && !g.__isGridTabsProxy && (P = h(g, m.tabId), Object.defineProperty(P, "__isGridTabsProxy", { value: !0, enumerable: !1 }));
416
+ const k = Reflect.set(m, d, P, f);
417
+ return y(), k;
418
+ }
419
+ return Reflect.set(m, d, g, f);
420
+ }
421
+ })), c = (s) => {
422
+ const m = s.map((d) => l(d));
423
+ return new Proxy(m, {
424
+ set(d, g, f, P) {
425
+ if (g !== "length" && !isNaN(Number(g))) {
426
+ let k = f;
427
+ f.__isGridTabsProxy || (k = l(f), Object.defineProperty(k, "__isGridTabsProxy", { value: !0, enumerable: !1 }));
428
+ const V = Reflect.set(d, g, k, P);
429
+ return y(), V;
430
+ }
431
+ return Reflect.set(d, g, f, P);
432
+ }
433
+ });
434
+ };
435
+ C(r, (s, m) => {
436
+ if (!s || s.length === 0) {
437
+ i.value = "", p = !1;
438
+ return;
439
+ }
440
+ if (s.__isGridTabsProxy)
441
+ y();
442
+ else {
443
+ u(s, "2d");
444
+ const d = c(s);
445
+ Object.defineProperty(d, "__isGridTabsProxy", { value: !0, enumerable: !1 }), r.value = d;
446
+ }
447
+ }, { flush: "sync" }), C(n, (s, m) => {
448
+ if (!s || s.length === 0) {
449
+ i.value = "", p = !1;
450
+ return;
451
+ }
452
+ if (s.__isGridTabsProxy)
453
+ y();
454
+ else {
455
+ u(s, "1d");
456
+ const d = h(s, b);
457
+ Object.defineProperty(d, "__isGridTabsProxy", { value: !0, enumerable: !1 }), n.value = d;
458
+ }
459
+ }, { flush: "sync" });
460
+ const T = (s) => {
461
+ if (!s || s.length === 0) {
462
+ i.value = "", p = !1;
463
+ return;
464
+ }
465
+ s[0].hasOwnProperty("tabId") || s[0].hasOwnProperty("items") && Array.isArray(s[0].items) ? r.value = s : n.value = s;
466
+ }, w = (s) => {
467
+ I.value = s;
468
+ }, R = ae(() => ({
469
+ tabsData: i.value,
470
+ actionPayload: t.value,
471
+ onTabNeedsData: async (s) => {
472
+ if (!I.value.onTabNeedsData)
473
+ return;
474
+ const { tabId: m, index: d, reason: g } = s, f = await I.value.onTabNeedsData(m, d, g);
475
+ if (f && Array.isArray(f)) {
476
+ const P = r.value.find((k) => k.tabId === m);
477
+ P && (P.items = f);
478
+ }
479
+ },
480
+ onLoadMore: async (s) => {
481
+ if (!I.value.onLoadMore)
482
+ return;
483
+ const { tabId: m, cursor: d, itemId: g } = s, f = await I.value.onLoadMore(m, d, g);
484
+ if (f && Array.isArray(f) && f.length > 0)
485
+ if (a)
486
+ n.value.push(...f);
487
+ else {
488
+ const P = r.value.find((k) => k.tabId === m);
489
+ P && P.items && P.items.push(...f);
490
+ }
491
+ }
492
+ }));
493
+ return {
494
+ tabsDataStr: i,
495
+ actionPayloadStr: t,
496
+ bindings: R,
497
+ tabs: r,
498
+ items: n,
499
+ initData: T,
500
+ setCallbacks: w,
501
+ dispatchAction: A
502
+ };
503
+ }
504
+ const Y = /* @__PURE__ */ x({
505
+ __name: "RatingBar",
506
+ props: {
507
+ numStars: {},
508
+ rating: {},
509
+ stepSize: {},
510
+ isIndicator: { type: Boolean }
511
+ },
512
+ emits: ["onRatingChanged"],
513
+ setup(e) {
514
+ const o = E(), i = F(
515
+ "QtRatingBar",
516
+ "com.quicktvui.plugin.extraui",
517
+ "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
518
+ );
519
+ return (t, r) => (_(), S(q(i), M({
520
+ ref_key: "nativeRef",
521
+ ref: o,
522
+ numStars: e.numStars,
523
+ rating: e.rating,
524
+ stepSize: e.stepSize,
525
+ isIndicator: e.isIndicator,
526
+ onOnRatingChanged: r[0] || (r[0] = (n) => t.$emit("onRatingChanged", n.nativeEvent))
527
+ }, t.$attrs), {
528
+ default: D(() => [
529
+ O(t.$slots, "default")
530
+ ]),
531
+ _: 3
532
+ }, 16, ["numStars", "rating", "stepSize", "isIndicator"]));
533
+ }
534
+ });
535
+ let K;
536
+ var oe;
537
+ try {
538
+ const e = require("@extscreen/es3-vue");
539
+ K = e.registerElement || ((oe = e.default) == null ? void 0 : oe.registerElement);
540
+ } catch {
541
+ }
542
+ const ke = {
543
+ install: (e) => {
544
+ globalThis.__QtRatingBar_registered || (K ? (K("qt-rating-bar", {
545
+ component: {
546
+ name: "QtRatingBar",
547
+ // 关键:将前端标签映射到真正的 Native 组件名
548
+ processEventData(o, i) {
549
+ const t = o.handler || o, r = i || (t == null ? void 0 : t.nativeParams) || {};
550
+ return t && (t.nativeEvent = r), t;
551
+ }
552
+ }
553
+ }), K("QtRatingBar", {
554
+ component: {
555
+ name: "QtRatingBar",
556
+ processEventData(o, i) {
557
+ const t = o.handler || o, r = i || (t == null ? void 0 : t.nativeParams) || {};
558
+ return t && (t.nativeEvent = r), t;
559
+ }
560
+ }
561
+ }), globalThis.__QtRatingBar_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtRatingBar")) : console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue")), e.component("RatingBar", Y), e.component("qt-rating-bar", Y);
98
562
  }
99
- }, A = /* @__PURE__ */ new Set();
100
- function O(r, e, u) {
101
- return S({
102
- name: `${r}AsyncWrapper`,
563
+ }, Z = /* @__PURE__ */ x({
564
+ __name: "Keyboard",
565
+ props: {
566
+ backgroundColor: {},
567
+ textColor: {},
568
+ weakTextColor: {},
569
+ focusBackgroundColor: {},
570
+ focusTextColor: {},
571
+ placeholder: {},
572
+ textFullKeyboard: {},
573
+ textT9Keyboard: {},
574
+ textClear: {},
575
+ textDelete: {},
576
+ currentInput: {}
577
+ },
578
+ emits: ["onInputChanged", "onKeyPressed"],
579
+ setup(e) {
580
+ const o = E(), i = F(
581
+ "QtKeyboard",
582
+ "com.quicktvui.plugin.extraui",
583
+ "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
584
+ );
585
+ return (t, r) => (_(), S(q(i), M({
586
+ ref_key: "nativeRef",
587
+ ref: o,
588
+ backgroundColor: e.backgroundColor,
589
+ textColor: e.textColor,
590
+ weakTextColor: e.weakTextColor,
591
+ focusBackgroundColor: e.focusBackgroundColor,
592
+ focusTextColor: e.focusTextColor,
593
+ placeholder: e.placeholder,
594
+ textFullKeyboard: e.textFullKeyboard,
595
+ textT9Keyboard: e.textT9Keyboard,
596
+ textClear: e.textClear,
597
+ textDelete: e.textDelete,
598
+ currentInput: e.currentInput,
599
+ onOnInputChanged: r[0] || (r[0] = (n) => t.$emit("onInputChanged", n.nativeEvent)),
600
+ onOnKeyPressed: r[1] || (r[1] = (n) => t.$emit("onKeyPressed", n.nativeEvent))
601
+ }, t.$attrs), {
602
+ default: D(() => [
603
+ O(t.$slots, "default")
604
+ ]),
605
+ _: 3
606
+ }, 16, ["backgroundColor", "textColor", "weakTextColor", "focusBackgroundColor", "focusTextColor", "placeholder", "textFullKeyboard", "textT9Keyboard", "textClear", "textDelete", "currentInput"]));
607
+ }
608
+ });
609
+ let Q;
610
+ var re;
611
+ try {
612
+ const e = require("@extscreen/es3-vue");
613
+ Q = e.registerElement || ((re = e.default) == null ? void 0 : re.registerElement);
614
+ } catch {
615
+ }
616
+ const we = {
617
+ install: (e) => {
618
+ globalThis.__QtKeyboard_registered || (Q ? (Q("qt-keyboard", {
619
+ component: {
620
+ name: "QtKeyboard",
621
+ // 关键:将前端标签映射到真正的 Native 组件名
622
+ processEventData(o, i) {
623
+ const t = o.handler || o, r = i || (t == null ? void 0 : t.nativeParams) || {};
624
+ return t && (t.nativeEvent = r), t;
625
+ }
626
+ }
627
+ }), Q("QtKeyboard", {
628
+ component: {
629
+ name: "QtKeyboard",
630
+ processEventData(o, i) {
631
+ const t = o.handler || o, r = i || (t == null ? void 0 : t.nativeParams) || {};
632
+ return t && (t.nativeEvent = r), t;
633
+ }
634
+ }
635
+ }), globalThis.__QtKeyboard_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtKeyboard")) : console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue")), e.component("Keyboard", Z), e.component("qt-keyboard", Z);
636
+ }
637
+ }, ee = /* @__PURE__ */ x({
638
+ __name: "NumericKeyboard",
639
+ props: {
640
+ maxLength: {}
641
+ },
642
+ emits: ["onNumberPressed"],
643
+ setup(e) {
644
+ const o = E(), i = F(
645
+ "QtNumericKeyboard",
646
+ "com.quicktvui.plugin.extraui",
647
+ "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
648
+ );
649
+ return (t, r) => (_(), S(q(i), M({
650
+ ref_key: "nativeRef",
651
+ ref: o,
652
+ maxLength: e.maxLength,
653
+ onOnNumberPressed: r[0] || (r[0] = (n) => t.$emit("onNumberPressed", n.nativeEvent))
654
+ }, t.$attrs), {
655
+ default: D(() => [
656
+ O(t.$slots, "default")
657
+ ]),
658
+ _: 3
659
+ }, 16, ["maxLength"]));
660
+ }
661
+ });
662
+ let B;
663
+ var se;
664
+ try {
665
+ const e = require("@extscreen/es3-vue");
666
+ B = e.registerElement || ((se = e.default) == null ? void 0 : se.registerElement);
667
+ } catch {
668
+ }
669
+ const Ae = {
670
+ install: (e) => {
671
+ globalThis.__QtNumericKeyboard_registered || (B ? (B("qt-numeric-keyboard", {
672
+ component: {
673
+ name: "QtNumericKeyboard",
674
+ // 关键:将前端标签映射到真正的 Native 组件名
675
+ processEventData(o, i) {
676
+ const t = o.handler || o, r = i || (t == null ? void 0 : t.nativeParams) || {};
677
+ return t && (t.nativeEvent = r), t;
678
+ }
679
+ }
680
+ }), B("QtNumericKeyboard", {
681
+ component: {
682
+ name: "QtNumericKeyboard",
683
+ processEventData(o, i) {
684
+ const t = o.handler || o, r = i || (t == null ? void 0 : t.nativeParams) || {};
685
+ return t && (t.nativeEvent = r), t;
686
+ }
687
+ }
688
+ }), globalThis.__QtNumericKeyboard_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNumericKeyboard")) : console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue")), e.component("NumericKeyboard", ee), e.component("qt-numeric-keyboard", ee);
689
+ }
690
+ }, te = /* @__PURE__ */ x({
691
+ __name: "DatePicker",
692
+ props: {
693
+ initialDate: {}
694
+ },
695
+ emits: ["onDateChanged"],
696
+ setup(e) {
697
+ const o = E(), i = F(
698
+ "QtDatePicker",
699
+ "com.quicktvui.plugin.extraui",
700
+ "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
701
+ );
702
+ return (t, r) => (_(), S(q(i), M({
703
+ ref_key: "nativeRef",
704
+ ref: o,
705
+ initialDate: e.initialDate,
706
+ onOnDateChanged: r[0] || (r[0] = (n) => t.$emit("onDateChanged", n.nativeEvent))
707
+ }, t.$attrs), {
708
+ default: D(() => [
709
+ O(t.$slots, "default")
710
+ ]),
711
+ _: 3
712
+ }, 16, ["initialDate"]));
713
+ }
714
+ });
715
+ let U;
716
+ var ie;
717
+ try {
718
+ const e = require("@extscreen/es3-vue");
719
+ U = e.registerElement || ((ie = e.default) == null ? void 0 : ie.registerElement);
720
+ } catch {
721
+ }
722
+ const $e = {
723
+ install: (e) => {
724
+ globalThis.__QtDatePicker_registered || (U ? (U("qt-date-picker", {
725
+ component: {
726
+ name: "QtDatePicker",
727
+ // 关键:将前端标签映射到真正的 Native 组件名
728
+ processEventData(o, i) {
729
+ const t = o.handler || o, r = i || (t == null ? void 0 : t.nativeParams) || {};
730
+ return t && (t.nativeEvent = r), t;
731
+ }
732
+ }
733
+ }), U("QtDatePicker", {
734
+ component: {
735
+ name: "QtDatePicker",
736
+ processEventData(o, i) {
737
+ const t = o.handler || o, r = i || (t == null ? void 0 : t.nativeParams) || {};
738
+ return t && (t.nativeEvent = r), t;
739
+ }
740
+ }
741
+ }), globalThis.__QtDatePicker_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtDatePicker")) : console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue")), e.component("DatePicker", te), e.component("qt-date-picker", te);
742
+ }
743
+ }, _e = {
744
+ // 如果设置为 true,则全局跳过所有组件的原生插件安装检查,直接渲染
745
+ skipPluginCheck: !1
746
+ }, J = /* @__PURE__ */ new Set();
747
+ function F(e, o, i) {
748
+ return x({
749
+ name: `${e}AsyncWrapper`,
103
750
  inheritAttrs: !1,
104
- setup(d, { slots: w, attrs: y }) {
105
- const s = b("loading"), a = b("");
106
- let t = null, n = null;
751
+ props: {
752
+ // 允许单个组件级别跳过检查
753
+ skipPluginCheck: {
754
+ type: Boolean,
755
+ default: !1
756
+ }
757
+ },
758
+ setup(t, { slots: r, attrs: n }) {
759
+ const a = E("loading"), p = E("");
760
+ let b = null, I = null;
107
761
  try {
108
- t = Q(), n = F();
109
- } catch (l) {
110
- console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。", l);
762
+ b = be(), I = pe();
763
+ } catch (v) {
764
+ console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。", v);
111
765
  }
112
- const I = async () => {
113
- if (!t || typeof t.isComponentRegistered != "function")
766
+ const A = async () => {
767
+ if (!b || typeof b.isComponentRegistered != "function")
114
768
  return console.log("[withAsyncPlugin] es.isComponentRegistered 不可用"), !1;
115
769
  try {
116
- const l = await t.isComponentRegistered(r);
117
- if (console.log(`[withAsyncPlugin] isComponentRegistered('${r}') 返回:`, l), l === !0 || l && typeof l == "object" && (l.registered === !0 || l.isRegistered === !0))
770
+ const v = await b.isComponentRegistered(e);
771
+ if (console.log(`[withAsyncPlugin] isComponentRegistered('${e}') 返回:`, v), v === !0 || v && typeof v == "object" && (v.registered === !0 || v.isRegistered === !0))
118
772
  return !0;
119
773
  try {
120
- const o = await P.callNativeWithPromise("ExtendModule", "getCoreSDKInfo");
121
- if (o && o.core_version) {
122
- const c = o.core_version;
123
- console.log(`[withAsyncPlugin] 当前引擎核心版本: ${c}`);
124
- const i = c.split(".").map((f) => parseInt(f, 10));
125
- if (i.length >= 3 && !isNaN(i[0]) && !isNaN(i[1]) && !isNaN(i[2]))
126
- if (i[0] * 1e6 + i[1] * 1e3 + i[2] >= 1011205) {
127
- console.log(`[withAsyncPlugin] 引擎 >= 1.11.205,使用 ExtendModule 检查 Controller: ${r}`);
128
- const g = r.split("-").map(($) => $.charAt(0).toUpperCase() + $.slice(1)).join("");
129
- console.log(`[withAsyncPlugin] 同时检查原名和驼峰名: ${r}, ${g}`);
130
- const [m, v] = await Promise.all([
131
- P.callNativeWithPromise("ExtendModule", "isComponentRegistered", r).catch(() => !1),
132
- P.callNativeWithPromise("ExtendModule", "isComponentRegistered", g).catch(() => !1)
774
+ const u = await G.callNativeWithPromise("ExtendModule", "getCoreSDKInfo");
775
+ if (u && u.core_version) {
776
+ const y = u.core_version;
777
+ console.log(`[withAsyncPlugin] 当前引擎核心版本: ${y}`);
778
+ const h = y.split(".").map((l) => parseInt(l, 10));
779
+ if (h.length >= 3 && !isNaN(h[0]) && !isNaN(h[1]) && !isNaN(h[2]))
780
+ if (h[0] * 1e6 + h[1] * 1e3 + h[2] >= 1011205) {
781
+ console.log(`[withAsyncPlugin] 引擎 >= 1.11.205,使用 ExtendModule 检查 Controller: ${e}`);
782
+ const c = e.split("-").map((R) => R.charAt(0).toUpperCase() + R.slice(1)).join("");
783
+ console.log(`[withAsyncPlugin] 同时检查原名和驼峰名: ${e}, ${c}`);
784
+ const [T, w] = await Promise.all([
785
+ G.callNativeWithPromise("ExtendModule", "isComponentRegistered", e).catch(() => !1),
786
+ G.callNativeWithPromise("ExtendModule", "isComponentRegistered", c).catch(() => !1)
133
787
  ]);
134
- if (console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${m}, ${v}]`), m === !0 || v === !0)
788
+ if (console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${T}, ${w}]`), T === !0 || w === !0)
135
789
  return !0;
136
790
  } else
137
- console.log(`[withAsyncPlugin] 引擎版本 ${c} < 1.11.205,跳过 ExtendModule 检查`);
791
+ console.log(`[withAsyncPlugin] 引擎版本 ${y} < 1.11.205,跳过 ExtendModule 检查`);
138
792
  else
139
- console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${c}`);
793
+ console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${y}`);
140
794
  }
141
- } catch (o) {
142
- console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:", o);
795
+ } catch (u) {
796
+ console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:", u);
143
797
  }
144
798
  return !1;
145
- } catch (l) {
146
- return console.warn("[withAsyncPlugin] 检查组件注册状态异常:", l), !1;
799
+ } catch (v) {
800
+ return console.warn("[withAsyncPlugin] 检查组件注册状态异常:", v), !1;
147
801
  }
148
- }, C = async () => {
149
- if (!e) {
150
- s.value = "ready";
802
+ }, $ = async () => {
803
+ if (_e.skipPluginCheck || t.skipPluginCheck) {
804
+ console.log(`[withAsyncPlugin] 跳过 ${e} 插件检查 (skipPluginCheck = true)`), a.value = "ready";
151
805
  return;
152
806
  }
153
- const l = await I();
154
- if (console.log(`[withAsyncPlugin] 拦截检查 - ${r} 是否已注册:`, l), l || A.has(e)) {
155
- s.value = "ready", A.add(e), console.log("[withAsyncPlugin] 组件已注册,跳过安装流程");
807
+ if (!o) {
808
+ a.value = "ready";
156
809
  return;
157
810
  }
158
- if (!n) {
159
- console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${r}`), s.value = "ready";
811
+ const v = await A();
812
+ if (console.log(`[withAsyncPlugin] 拦截检查 - ${e} 是否已注册:`, v), v || J.has(o)) {
813
+ a.value = "ready", J.add(o), console.log("[withAsyncPlugin] 组件已注册,跳过安装流程");
160
814
  return;
161
815
  }
162
- console.log(`[withAsyncPlugin] 开始动态安装插件: ${e}`);
816
+ if (!I) {
817
+ console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${e}`), a.value = "ready";
818
+ return;
819
+ }
820
+ console.log(`[withAsyncPlugin] 开始动态安装插件: ${o}`);
163
821
  try {
164
- await new Promise((o, c) => {
165
- let i;
166
- const f = {
167
- onPluginInstallSuccess(g, m, v) {
168
- g === e && (clearTimeout(i), n.removeListener(f), console.log(`[withAsyncPlugin] 安装成功 pkg=${g} 状态码=${m}`), m == 1003 || m == 1001 ? (u ? (console.log(`[withAsyncPlugin] 触发反射初始化: ${u}`), P.callNative("EsNativeModule", "callReflect", {
822
+ await new Promise((u, y) => {
823
+ let h;
824
+ const l = {
825
+ onPluginInstallSuccess(c, T, w) {
826
+ c === o && (clearTimeout(h), I.removeListener(l), console.log(`[withAsyncPlugin] 安装成功 pkg=${c} 状态码=${T}`), T == 1003 || T == 1001 ? (i ? (console.log(`[withAsyncPlugin] 触发反射初始化: ${i}`), G.callNative("EsNativeModule", "callReflect", {
169
827
  entry: {
170
- from: u,
828
+ from: i,
171
829
  method: "setup"
172
830
  }
173
- })) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"), o()) : c(new Error(`安装失败 pkg=${g} status=${m} msg=${v}`)));
831
+ })) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"), u()) : y(new Error(`安装失败 pkg=${c} status=${T} msg=${w}`)));
174
832
  },
175
- onPluginInstallError(g, m, v) {
176
- g === e && (clearTimeout(i), n.removeListener(f), c(new Error(`安装失败 pkg=${g} status=${m} msg=${v}`)));
833
+ onPluginInstallError(c, T, w) {
834
+ c === o && (clearTimeout(h), I.removeListener(l), y(new Error(`安装失败 pkg=${c} status=${T} msg=${w}`)));
177
835
  }
178
836
  };
179
- n.addListener({ pkg: e }, f), i = setTimeout(() => {
180
- n.removeListener(f), c(new Error(`插件安装超时: ${e}`));
181
- }, 8e3), typeof n.installPlugin == "function" ? n.installPlugin({ pkg: e }) : typeof n.install == "function" ? n.install(e) : c(new Error("当前运行时不支持 install / installPlugin"));
182
- }), await L(), A.add(e), s.value = "ready";
183
- } catch (o) {
184
- console.error("[withAsyncPlugin] 插件加载失败:", o), a.value = (o == null ? void 0 : o.message) || String(o), s.value = "error";
837
+ I.addListener({ pkg: o }, l), h = setTimeout(() => {
838
+ I.removeListener(l), y(new Error(`插件安装超时: ${o}`));
839
+ }, 8e3), typeof I.installPlugin == "function" ? I.installPlugin({ pkg: o }) : typeof I.install == "function" ? I.install(o) : y(new Error("当前运行时不支持 install / installPlugin"));
840
+ }), await ge(), J.add(o), a.value = "ready";
841
+ } catch (u) {
842
+ console.error("[withAsyncPlugin] 插件加载失败:", u), p.value = (u == null ? void 0 : u.message) || String(u), a.value = "error";
185
843
  }
186
844
  };
187
- return q(() => {
188
- C();
845
+ return ye(() => {
846
+ $();
189
847
  }), () => {
190
- const l = {
191
- width: "100%",
192
- height: "100%",
848
+ const v = {
193
849
  display: "flex",
194
850
  flexDirection: "column",
195
851
  justifyContent: "center",
196
852
  alignItems: "center",
197
- ...y.style || {}
198
- };
199
- if (s.value === "loading")
200
- return h("div", { class: "qt-plugin-container", style: l }, [
201
- h("div", { style: { color: "white", fontSize: "30px" } }, "插件加载中...")
853
+ ...n.style || {}
854
+ }, u = n.class ? `qt-plugin-container ${n.class}` : "qt-plugin-container";
855
+ if (a.value === "loading")
856
+ return N("div", { class: u, style: v }, [
857
+ N("div", { style: { color: "white", fontSize: "30px" } }, "插件加载中...")
202
858
  ]);
203
- if (s.value === "error")
204
- return h("div", { class: "qt-plugin-container", style: l }, [
205
- h("div", { style: { color: "white", fontSize: "30px", backgroundColor: "rgba(255,0,0,0.5)" } }, `插件加载失败: ${a.value}`)
859
+ if (a.value === "error")
860
+ return N("div", { class: u, style: v }, [
861
+ N("div", { style: { color: "white", fontSize: "30px", backgroundColor: "rgba(255,0,0,0.5)" } }, `插件加载失败: ${p.value}`)
206
862
  ]);
207
- const o = {};
208
- for (const [c, i] of Object.entries(y))
209
- c.startsWith("on") && typeof i == "function" ? o[c] = (...f) => (console.log(`[withAsyncPlugin] NativeTag=${r} 收到事件 ${c}:`, f), i(...f)) : o[c] = i;
210
- return h("div", { class: "qt-plugin-container", style: l }, [
211
- h(r, {
212
- ...o,
213
- style: { width: "100%", height: "100%", backgroundColor: "transparent" }
214
- }, w.default ? w.default() : [])
863
+ const y = {};
864
+ for (const [l, c] of Object.entries(n)) {
865
+ const T = l.startsWith("on") && l !== "onItemPresence" && l !== "onTabSelected" && l !== "onTabNeedsData" && l !== "onLoadMore" && l !== "onTabFocused" && l !== "onItemClick" && l !== "onItemFocused";
866
+ l === "class" || l === "style" || !l.startsWith("onOn") && !T && (y[l] = c);
867
+ }
868
+ const h = {
869
+ ...y,
870
+ style: { width: "100%", height: "100%", backgroundColor: "transparent" },
871
+ onItemPresence: (l) => {
872
+ console.log(`[withAsyncPlugin] NativeTag=${e} 收到事件 onItemPresence:`, l);
873
+ const c = n.onOnItemPresence || n.onItemPresence || n["onItem-presence"] || n.onitempresence;
874
+ typeof c == "function" && c(l);
875
+ },
876
+ onTabSelected: (l) => {
877
+ console.log(`[withAsyncPlugin] NativeTag=${e} 收到事件 onTabSelected:`, l);
878
+ const c = n.onOnTabSelected || n.onTabSelected || n["onTab-selected"] || n.ontabselected;
879
+ typeof c == "function" && c(l);
880
+ },
881
+ onTabNeedsData: (l) => {
882
+ console.log(`[withAsyncPlugin] NativeTag=${e} 收到事件 onTabNeedsData:`, l);
883
+ const c = n.onOnTabNeedsData || n.onTabNeedsData || n["onTab-needs-data"] || n.ontabneedsdata;
884
+ typeof c == "function" && c(l);
885
+ },
886
+ onLoadMore: (l) => {
887
+ console.log(`[withAsyncPlugin] NativeTag=${e} 收到事件 onLoadMore:`, l);
888
+ const c = n.onOnLoadMore || n.onLoadMore || n["onLoad-more"] || n.onloadmore;
889
+ typeof c == "function" && c(l);
890
+ },
891
+ onTabFocused: (l) => {
892
+ console.log(`[withAsyncPlugin] NativeTag=${e} 收到事件 onTabFocused:`, l);
893
+ const c = n.onOnTabFocused || n.onTabFocused || n["onTab-focused"] || n.ontabfocused;
894
+ typeof c == "function" && c(l);
895
+ },
896
+ onItemClick: (l) => {
897
+ console.log(`[withAsyncPlugin] NativeTag=${e} 收到事件 onItemClick:`, l);
898
+ const c = n.onOnItemClick || n.onItemClick || n["onItem-click"] || n.onitemclick;
899
+ typeof c == "function" && c(l);
900
+ },
901
+ onItemFocused: (l) => {
902
+ console.log(`[withAsyncPlugin] NativeTag=${e} 收到事件 onItemFocused:`, l);
903
+ const c = n.onOnItemFocused || n.onItemFocused || n["onItem-focused"] || n.onitemfocused;
904
+ typeof c == "function" && c(l);
905
+ }
906
+ };
907
+ return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:", Object.keys(h)), N("div", { class: u, style: v }, [
908
+ N(e, h, r.default ? r.default() : [])
215
909
  ]);
216
910
  };
217
911
  }
218
912
  });
219
913
  }
220
- const K = {
221
- install: (r) => {
222
- r.use(W);
914
+ const Ce = {
915
+ install: (e) => {
916
+ e.use(Ee), e.use(ke), e.use(we), e.use(Ae), e.use($e);
223
917
  }
224
918
  };
225
919
  export {
226
- T as GridTabs,
227
- W as GridTabsPlugin,
228
- K as QuickTVUINAddons,
229
- K as default,
230
- U as useGridItemPresence,
231
- O as withAsyncPlugin
920
+ te as DatePicker,
921
+ $e as DatePickerPlugin,
922
+ W as GridTabs,
923
+ Ee as GridTabsPlugin,
924
+ Z as Keyboard,
925
+ we as KeyboardPlugin,
926
+ ee as NumericKeyboard,
927
+ Ae as NumericKeyboardPlugin,
928
+ z as PortalItem,
929
+ X as PortalPool,
930
+ Ce as QuickTVUINAddons,
931
+ _e as QuickTVUINAddonsConfig,
932
+ Y as RatingBar,
933
+ ke as RatingBarPlugin,
934
+ Ce as default,
935
+ Te as diffGridTabsData,
936
+ Re as useGridItemPresence,
937
+ Le as useGridTabs,
938
+ Ne as useGridTabsData,
939
+ Oe as useGridTabsUpdater,
940
+ F as withAsyncPlugin
232
941
  };