@quicktvui/naddons 1.0.0-alpha.4 → 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,259 +1,941 @@
1
- import { defineComponent as p, ref as P, openBlock as M, createBlock as F, unref as O, mergeProps as D, withCtx as k, renderSlot as G, onMounted as R, h, nextTick as L } from "vue";
2
- import { useES as x, useESPlugin as q } from "@extscreen/es3-core";
3
- import { Native as v } from "@extscreen/es3-vue";
4
- const E = /* @__PURE__ */ p({
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(o, { expose: t }) {
12
- const a = P(), u = W(
13
- "QtGridTabs",
11
+ setup(e, { expose: o }) {
12
+ const i = E(), t = F(
13
+ "GTTabs",
14
14
  "com.quicktvui.plugin.glintui"
15
15
  );
16
- return t({
17
- scrollToTop: (...c) => {
16
+ return o({
17
+ scrollToTop: (...r) => {
18
18
  var n;
19
- return (n = a.value) == null ? void 0 : n.scrollToTop(...c);
19
+ return (n = i.value) == null ? void 0 : n.scrollToTop(...r);
20
20
  }
21
- }), (c, n) => (M(), F(O(u), D({
21
+ }), (r, n) => (_(), S(q(t), M({
22
22
  ref_key: "nativeRef",
23
- ref: a,
24
- tabsData: o.tabsData,
25
- actionPayload: o.actionPayload,
26
- onOnTabSelected: n[0] || (n[0] = (l) => c.$emit("onTabSelected", l.nativeEvent)),
27
- onOnTabNeedsData: n[1] || (n[1] = (l) => c.$emit("onTabNeedsData", l.nativeEvent)),
28
- onOnLoadMore: n[2] || (n[2] = (l) => c.$emit("onLoadMore", l.nativeEvent)),
29
- onOnItemPresence: n[3] || (n[3] = (l) => c.$emit("onItemPresence", l.nativeEvent)),
30
- onOnTabFocused: n[4] || (n[4] = (l) => c.$emit("onTabFocused", l.nativeEvent)),
31
- onOnItemClick: n[5] || (n[5] = (l) => c.$emit("onItemClick", l.nativeEvent)),
32
- onOnItemFocused: n[6] || (n[6] = (l) => c.$emit("onItemFocused", l.nativeEvent))
33
- }, c.$attrs), {
34
- default: k(() => [
35
- G(c.$slots, "default")
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), {
34
+ default: D(() => [
35
+ O(r.$slots, "default")
36
36
  ]),
37
37
  _: 3
38
38
  }, 16, ["tabsData", "actionPayload"]));
39
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
+ }
40
138
  });
41
- function z(o, t) {
42
- const a = P(!1), u = P(!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);
43
164
  return {
44
- isIntersecting: a,
45
- isVisible: u,
165
+ isIntersecting: i,
166
+ isVisible: t,
46
167
  handlePresenceState: (n) => {
47
- var l, w, y;
168
+ var a, p, b;
48
169
  switch (n) {
49
170
  case "enter":
50
- a.value = !0, (l = t == null ? void 0 : t.onEnter) == null || l.call(t);
171
+ i.value = !0, (a = o == null ? void 0 : o.onEnter) == null || a.call(o);
51
172
  break;
52
173
  case "visible":
53
- u.value = !0, (w = t == null ? void 0 : t.onVisible) == null || w.call(t);
174
+ t.value = !0, (p = o == null ? void 0 : o.onVisible) == null || p.call(o);
54
175
  break;
55
176
  case "leave":
56
- a.value = !1, u.value = !1, (y = t == null ? void 0 : t.onLeave) == null || y.call(t);
177
+ i.value = !1, t.value = !1, (b = o == null ? void 0 : o.onLeave) == null || b.call(o);
57
178
  break;
58
179
  }
59
180
  }
60
181
  };
61
182
  }
62
- let $;
63
- var I;
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;
300
+ try {
301
+ const e = require("@extscreen/es3-vue");
302
+ L = e.registerElement || ((ne = e.default) == null ? void 0 : ne.registerElement);
303
+ } catch {
304
+ }
305
+ const Ee = {
306
+ install: (e) => {
307
+ globalThis.__GTTabs_registered || (L ? (L("gt-tabs", {
308
+ component: {
309
+ name: "GTTabs",
310
+ processEventData(o, i) {
311
+ const t = o.handler || o, r = i || t.nativeParams || {};
312
+ return t && (t.nativeEvent = r), t;
313
+ }
314
+ }
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", {
320
+ component: {
321
+ name: "GTTabs",
322
+ defaultNativeProps: {},
323
+ processEventData(o, i, t) {
324
+ return {
325
+ ...o,
326
+ ...t
327
+ };
328
+ }
329
+ }
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);
562
+ }
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;
64
717
  try {
65
- const o = require("@extscreen/es3-vue");
66
- $ = o.registerElement || ((I = o.default) == null ? void 0 : I.registerElement);
718
+ const e = require("@extscreen/es3-vue");
719
+ U = e.registerElement || ((ie = e.default) == null ? void 0 : ie.registerElement);
67
720
  } catch {
68
721
  }
69
- const Q = {
70
- install: (o) => {
71
- globalThis.__QtGridTabs_registered || ($ ? ($("qt-grid-tabs", {
722
+ const $e = {
723
+ install: (e) => {
724
+ globalThis.__QtDatePicker_registered || (U ? (U("qt-date-picker", {
72
725
  component: {
73
- name: "QtGridTabs",
726
+ name: "QtDatePicker",
74
727
  // 关键:将前端标签映射到真正的 Native 组件名
75
- processEventData(t, a, u) {
76
- return console.log(`[GridTabs/index.ts] qt-grid-tabs 收到原生事件: ${a}, 数据:`, u), t.nativeEvent = u, t;
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;
77
731
  }
78
732
  }
79
- }), $("QtGridTabs", {
733
+ }), U("QtDatePicker", {
80
734
  component: {
81
- name: "QtGridTabs",
82
- processEventData(t, a, u) {
83
- return console.log(`[GridTabs/index.ts] QtGridTabs 收到原生事件: ${a}, 数据:`, u), t.nativeEvent = u, t;
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;
84
739
  }
85
740
  }
86
- }), 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")), o.component("GridTabs", E), o.component("qt-grid-tabs", E);
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);
87
742
  }
88
- }, T = /* @__PURE__ */ new Set();
89
- function W(o, t, a) {
90
- return p({
91
- name: `${o}AsyncWrapper`,
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`,
92
750
  inheritAttrs: !1,
93
- setup(u, { slots: c, attrs: n }) {
94
- const l = P("loading"), w = P("");
95
- let y = null, g = 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;
96
761
  try {
97
- y = x(), g = q();
98
- } catch (i) {
99
- console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。", i);
762
+ b = be(), I = pe();
763
+ } catch (v) {
764
+ console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。", v);
100
765
  }
101
- const S = async () => {
102
- if (!y || typeof y.isComponentRegistered != "function")
766
+ const A = async () => {
767
+ if (!b || typeof b.isComponentRegistered != "function")
103
768
  return console.log("[withAsyncPlugin] es.isComponentRegistered 不可用"), !1;
104
769
  try {
105
- const i = await y.isComponentRegistered(o);
106
- if (console.log(`[withAsyncPlugin] isComponentRegistered('${o}') 返回:`, i), i === !0 || i && typeof i == "object" && (i.registered === !0 || i.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))
107
772
  return !0;
108
773
  try {
109
- const r = await v.callNativeWithPromise("ExtendModule", "getCoreSDKInfo");
110
- if (r && r.core_version) {
111
- const d = r.core_version;
112
- console.log(`[withAsyncPlugin] 当前引擎核心版本: ${d}`);
113
- const e = d.split(".").map((s) => parseInt(s, 10));
114
- if (e.length >= 3 && !isNaN(e[0]) && !isNaN(e[1]) && !isNaN(e[2]))
115
- if (e[0] * 1e6 + e[1] * 1e3 + e[2] >= 1011205) {
116
- console.log(`[withAsyncPlugin] 引擎 >= 1.11.205,使用 ExtendModule 检查 Controller: ${o}`);
117
- const f = o.split("-").map((A) => A.charAt(0).toUpperCase() + A.slice(1)).join("");
118
- console.log(`[withAsyncPlugin] 同时检查原名和驼峰名: ${o}, ${f}`);
119
- const [m, b] = await Promise.all([
120
- v.callNativeWithPromise("ExtendModule", "isComponentRegistered", o).catch(() => !1),
121
- v.callNativeWithPromise("ExtendModule", "isComponentRegistered", f).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)
122
787
  ]);
123
- if (console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${m}, ${b}]`), m === !0 || b === !0)
788
+ if (console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${T}, ${w}]`), T === !0 || w === !0)
124
789
  return !0;
125
790
  } else
126
- console.log(`[withAsyncPlugin] 引擎版本 ${d} < 1.11.205,跳过 ExtendModule 检查`);
791
+ console.log(`[withAsyncPlugin] 引擎版本 ${y} < 1.11.205,跳过 ExtendModule 检查`);
127
792
  else
128
- console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${d}`);
793
+ console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${y}`);
129
794
  }
130
- } catch (r) {
131
- console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:", r);
795
+ } catch (u) {
796
+ console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:", u);
132
797
  }
133
798
  return !1;
134
- } catch (i) {
135
- return console.warn("[withAsyncPlugin] 检查组件注册状态异常:", i), !1;
799
+ } catch (v) {
800
+ return console.warn("[withAsyncPlugin] 检查组件注册状态异常:", v), !1;
801
+ }
802
+ }, $ = async () => {
803
+ if (_e.skipPluginCheck || t.skipPluginCheck) {
804
+ console.log(`[withAsyncPlugin] 跳过 ${e} 插件检查 (skipPluginCheck = true)`), a.value = "ready";
805
+ return;
136
806
  }
137
- }, C = async () => {
138
- if (!t) {
139
- l.value = "ready";
807
+ if (!o) {
808
+ a.value = "ready";
140
809
  return;
141
810
  }
142
- const i = await S();
143
- if (console.log(`[withAsyncPlugin] 拦截检查 - ${o} 是否已注册:`, i), i || T.has(t)) {
144
- l.value = "ready", T.add(t), console.log("[withAsyncPlugin] 组件已注册,跳过安装流程");
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] 组件已注册,跳过安装流程");
145
814
  return;
146
815
  }
147
- if (!g) {
148
- console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${o}`), l.value = "ready";
816
+ if (!I) {
817
+ console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${e}`), a.value = "ready";
149
818
  return;
150
819
  }
151
- console.log(`[withAsyncPlugin] 开始动态安装插件: ${t}`);
820
+ console.log(`[withAsyncPlugin] 开始动态安装插件: ${o}`);
152
821
  try {
153
- await new Promise((r, d) => {
154
- let e;
155
- const s = {
156
- onPluginInstallSuccess(f, m, b) {
157
- f === t && (clearTimeout(e), g.removeListener(s), console.log(`[withAsyncPlugin] 安装成功 pkg=${f} 状态码=${m}`), m == 1003 || m == 1001 ? (a ? (console.log(`[withAsyncPlugin] 触发反射初始化: ${a}`), v.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", {
158
827
  entry: {
159
- from: a,
828
+ from: i,
160
829
  method: "setup"
161
830
  }
162
- })) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"), r()) : d(new Error(`安装失败 pkg=${f} status=${m} msg=${b}`)));
831
+ })) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"), u()) : y(new Error(`安装失败 pkg=${c} status=${T} msg=${w}`)));
163
832
  },
164
- onPluginInstallError(f, m, b) {
165
- f === t && (clearTimeout(e), g.removeListener(s), d(new Error(`安装失败 pkg=${f} status=${m} msg=${b}`)));
833
+ onPluginInstallError(c, T, w) {
834
+ c === o && (clearTimeout(h), I.removeListener(l), y(new Error(`安装失败 pkg=${c} status=${T} msg=${w}`)));
166
835
  }
167
836
  };
168
- g.addListener({ pkg: t }, s), e = setTimeout(() => {
169
- g.removeListener(s), d(new Error(`插件安装超时: ${t}`));
170
- }, 8e3), typeof g.installPlugin == "function" ? g.installPlugin({ pkg: t }) : typeof g.install == "function" ? g.install(t) : d(new Error("当前运行时不支持 install / installPlugin"));
171
- }), await L(), T.add(t), l.value = "ready";
172
- } catch (r) {
173
- console.error("[withAsyncPlugin] 插件加载失败:", r), w.value = (r == null ? void 0 : r.message) || String(r), l.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";
174
843
  }
175
844
  };
176
- return R(() => {
177
- C();
845
+ return ye(() => {
846
+ $();
178
847
  }), () => {
179
- const i = {
180
- width: "100%",
181
- height: "100%",
848
+ const v = {
182
849
  display: "flex",
183
850
  flexDirection: "column",
184
851
  justifyContent: "center",
185
852
  alignItems: "center",
186
853
  ...n.style || {}
187
- };
188
- if (l.value === "loading")
189
- return h("div", { class: "qt-plugin-container", style: i }, [
190
- h("div", { style: { color: "white", fontSize: "30px" } }, "插件加载中...")
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" } }, "插件加载中...")
191
858
  ]);
192
- if (l.value === "error")
193
- return h("div", { class: "qt-plugin-container", style: i }, [
194
- h("div", { style: { color: "white", fontSize: "30px", backgroundColor: "rgba(255,0,0,0.5)" } }, `插件加载失败: ${w.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}`)
195
862
  ]);
196
- const r = {};
197
- for (const [e, s] of Object.entries(n)) {
198
- const f = e.startsWith("on") && e !== "onItemPresence" && e !== "onTabSelected" && e !== "onTabNeedsData" && e !== "onLoadMore" && e !== "onTabFocused" && e !== "onItemClick" && e !== "onItemFocused";
199
- !e.startsWith("onOn") && !f && (r[e] = s);
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);
200
867
  }
201
- const d = {
202
- ...r,
203
- style: { width: "1920px", height: "1080px", backgroundColor: "transparent" },
204
- onItemPresence: (e) => {
205
- console.log(`[withAsyncPlugin] NativeTag=${o} 收到事件 onItemPresence:`, e);
206
- const s = n.onOnItemPresence || n.onItemPresence || n.onitempresence;
207
- typeof s == "function" && s(e);
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);
208
875
  },
209
- onTabSelected: (e) => {
210
- console.log(`[withAsyncPlugin] NativeTag=${o} 收到事件 onTabSelected:`, e);
211
- const s = n.onOnTabSelected || n.onTabSelected;
212
- typeof s == "function" && s(e);
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);
213
880
  },
214
- onTabNeedsData: (e) => {
215
- console.log(`[withAsyncPlugin] NativeTag=${o} 收到事件 onTabNeedsData:`, e);
216
- const s = n.onOnTabNeedsData || n.onTabNeedsData;
217
- typeof s == "function" && s(e);
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);
218
885
  },
219
- onLoadMore: (e) => {
220
- console.log(`[withAsyncPlugin] NativeTag=${o} 收到事件 onLoadMore:`, e);
221
- const s = n.onOnLoadMore || n.onLoadMore;
222
- typeof s == "function" && s(e);
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);
223
890
  },
224
- onTabFocused: (e) => {
225
- console.log(`[withAsyncPlugin] NativeTag=${o} 收到事件 onTabFocused:`, e);
226
- const s = n.onOnTabFocused || n.onTabFocused;
227
- typeof s == "function" && s(e);
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);
228
895
  },
229
- onItemClick: (e) => {
230
- console.log(`[withAsyncPlugin] NativeTag=${o} 收到事件 onItemClick:`, e);
231
- const s = n.onOnItemClick || n.onItemClick;
232
- typeof s == "function" && s(e);
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);
233
900
  },
234
- onItemFocused: (e) => {
235
- console.log(`[withAsyncPlugin] NativeTag=${o} 收到事件 onItemFocused:`, e);
236
- const s = n.onOnItemFocused || n.onItemFocused;
237
- typeof s == "function" && s(e);
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);
238
905
  }
239
906
  };
240
- return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:", Object.keys(d)), h("div", { class: "qt-plugin-container", style: i }, [
241
- h(o, d, c.default ? c.default() : [])
907
+ return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:", Object.keys(h)), N("div", { class: u, style: v }, [
908
+ N(e, h, r.default ? r.default() : [])
242
909
  ]);
243
910
  };
244
911
  }
245
912
  });
246
913
  }
247
- const B = {
248
- install: (o) => {
249
- o.use(Q);
914
+ const Ce = {
915
+ install: (e) => {
916
+ e.use(Ee), e.use(ke), e.use(we), e.use(Ae), e.use($e);
250
917
  }
251
918
  };
252
919
  export {
253
- E as GridTabs,
254
- Q as GridTabsPlugin,
255
- B as QuickTVUINAddons,
256
- B as default,
257
- z as useGridItemPresence,
258
- W 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
259
941
  };