@quicktvui/naddons 1.0.0-rc.2 → 1.0.0-rc.3

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,6 +1,6 @@
1
- import { defineComponent as w, ref as A, openBlock as S, createBlock as $, unref as D, mergeProps as B, withCtx as R, renderSlot as F, shallowRef as me, watch as ee, computed as W, resolveComponent as ge, createElementBlock as J, normalizeStyle as fe, Fragment as Ke, renderList as He, onMounted as et, h as H, nextTick as tt, provide as ot, inject as nt } from "vue";
1
+ import { defineComponent as w, ref as A, openBlock as P, createBlock as $, unref as D, mergeProps as B, withCtx as R, renderSlot as F, shallowRef as me, watch as ee, computed as W, resolveComponent as ge, createElementBlock as Z, normalizeStyle as fe, Fragment as Ke, renderList as He, onMounted as et, h as H, nextTick as tt, provide as ot, inject as nt } from "vue";
2
2
  import { Native as N } from "@extscreen/es3-vue";
3
- import { useES as Ze, useESPlugin as at } from "@extscreen/es3-core";
3
+ import { useES as Je, useESPlugin as at } from "@extscreen/es3-core";
4
4
  const be = "QtGridTabs", X = /* @__PURE__ */ w({
5
5
  __name: "GridTabs",
6
6
  props: {
@@ -11,64 +11,64 @@ const be = "QtGridTabs", X = /* @__PURE__ */ w({
11
11
  },
12
12
  emits: ["onTabSelected", "onTabClick", "onTabNeedsData", "onLoadMore", "onScroll", "onScrollStateChanged", "onItemPresence", "onTabFocused", "onItemClick", "onItemLongClick", "onItemFocused", "onProtocolMismatch"],
13
13
  setup(e, { expose: i }) {
14
- const u = A(), s = _(), f = be + "_Plugin", l = (s.isPluginActive ? f : be).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
14
+ const d = A(), s = _(), f = be + "_Plugin", l = (s.isPluginActive ? f : be).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
15
15
  l,
16
16
  s.pluginPackageName || "com.quicktvui.plugin.glintui"
17
17
  );
18
18
  return i({
19
19
  getNativeNode: () => {
20
- var a, c;
21
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
20
+ var a, u;
21
+ return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
22
22
  },
23
23
  dispatchAction: (...a) => {
24
- var d, h;
25
- const c = ((h = (d = u.value) == null ? void 0 : d.getNativeNode) == null ? void 0 : h.call(d)) || u.value;
26
- if (c)
24
+ var g, h;
25
+ const u = ((h = (g = d.value) == null ? void 0 : g.getNativeNode) == null ? void 0 : h.call(g)) || d.value;
26
+ if (u)
27
27
  if (a.length > 0) {
28
28
  let C = a[0];
29
- typeof C == "object" && (C = JSON.stringify(C)), N.callUIFunction(c, "dispatchAction", [C]);
29
+ typeof C == "object" && (C = JSON.stringify(C)), N.callUIFunction(u, "dispatchAction", [C]);
30
30
  } else
31
- N.callUIFunction(c, "dispatchAction", a);
31
+ N.callUIFunction(u, "dispatchAction", a);
32
32
  },
33
33
  scrollToTop: (...a) => {
34
- var d, h;
35
- const c = ((h = (d = u.value) == null ? void 0 : d.getNativeNode) == null ? void 0 : h.call(d)) || u.value;
36
- c && N.callUIFunction(c, "scrollToTop", a);
34
+ var g, h;
35
+ const u = ((h = (g = d.value) == null ? void 0 : g.getNativeNode) == null ? void 0 : h.call(g)) || d.value;
36
+ u && N.callUIFunction(u, "scrollToTop", a);
37
37
  },
38
38
  getFocusState: (...a) => {
39
- var d, h;
40
- const c = ((h = (d = u.value) == null ? void 0 : d.getNativeNode) == null ? void 0 : h.call(d)) || u.value;
41
- c && N.callUIFunction(c, "getFocusState", a);
39
+ var g, h;
40
+ const u = ((h = (g = d.value) == null ? void 0 : g.getNativeNode) == null ? void 0 : h.call(g)) || d.value;
41
+ u && N.callUIFunction(u, "getFocusState", a);
42
42
  },
43
43
  getItemRect: (...a) => {
44
- var d, h;
45
- const c = ((h = (d = u.value) == null ? void 0 : d.getNativeNode) == null ? void 0 : h.call(d)) || u.value;
46
- c && N.callUIFunction(c, "getItemRect", a);
44
+ var g, h;
45
+ const u = ((h = (g = d.value) == null ? void 0 : g.getNativeNode) == null ? void 0 : h.call(g)) || d.value;
46
+ u && N.callUIFunction(u, "getItemRect", a);
47
47
  },
48
48
  requestFocus: (...a) => {
49
- var d, h;
50
- const c = ((h = (d = u.value) == null ? void 0 : d.getNativeNode) == null ? void 0 : h.call(d)) || u.value;
51
- c && N.callUIFunction(c, "requestFocus", a);
49
+ var g, h;
50
+ const u = ((h = (g = d.value) == null ? void 0 : g.getNativeNode) == null ? void 0 : h.call(g)) || d.value;
51
+ u && N.callUIFunction(u, "requestFocus", a);
52
52
  }
53
- }), (a, c) => (S(), $(D(r), B({
53
+ }), (a, u) => (P(), $(D(r), B({
54
54
  ref_key: "nativeRef",
55
- ref: u,
55
+ ref: d,
56
56
  protocolVersion: e.protocolVersion,
57
57
  pageSpec: e.pageSpec,
58
58
  tabsData: e.tabsData,
59
59
  actionPayload: e.actionPayload,
60
- onOnTabSelected: c[0] || (c[0] = (d) => a.$emit("onTabSelected", d.nativeEvent)),
61
- onOnTabClick: c[1] || (c[1] = (d) => a.$emit("onTabClick", d.nativeEvent)),
62
- onOnTabNeedsData: c[2] || (c[2] = (d) => a.$emit("onTabNeedsData", d.nativeEvent)),
63
- onOnLoadMore: c[3] || (c[3] = (d) => a.$emit("onLoadMore", d.nativeEvent)),
64
- onOnScroll: c[4] || (c[4] = (d) => a.$emit("onScroll", d.nativeEvent)),
65
- onOnScrollStateChanged: c[5] || (c[5] = (d) => a.$emit("onScrollStateChanged", d.nativeEvent)),
66
- onOnItemPresence: c[6] || (c[6] = (d) => a.$emit("onItemPresence", d.nativeEvent)),
67
- onOnTabFocused: c[7] || (c[7] = (d) => a.$emit("onTabFocused", d.nativeEvent)),
68
- onOnItemClick: c[8] || (c[8] = (d) => a.$emit("onItemClick", d.nativeEvent)),
69
- onOnItemLongClick: c[9] || (c[9] = (d) => a.$emit("onItemLongClick", d.nativeEvent)),
70
- onOnItemFocused: c[10] || (c[10] = (d) => a.$emit("onItemFocused", d.nativeEvent)),
71
- onOnProtocolMismatch: c[11] || (c[11] = (d) => a.$emit("onProtocolMismatch", d.nativeEvent))
60
+ onOnTabSelected: u[0] || (u[0] = (g) => a.$emit("onTabSelected", g.nativeEvent)),
61
+ onOnTabClick: u[1] || (u[1] = (g) => a.$emit("onTabClick", g.nativeEvent)),
62
+ onOnTabNeedsData: u[2] || (u[2] = (g) => a.$emit("onTabNeedsData", g.nativeEvent)),
63
+ onOnLoadMore: u[3] || (u[3] = (g) => a.$emit("onLoadMore", g.nativeEvent)),
64
+ onOnScroll: u[4] || (u[4] = (g) => a.$emit("onScroll", g.nativeEvent)),
65
+ onOnScrollStateChanged: u[5] || (u[5] = (g) => a.$emit("onScrollStateChanged", g.nativeEvent)),
66
+ onOnItemPresence: u[6] || (u[6] = (g) => a.$emit("onItemPresence", g.nativeEvent)),
67
+ onOnTabFocused: u[7] || (u[7] = (g) => a.$emit("onTabFocused", g.nativeEvent)),
68
+ onOnItemClick: u[8] || (u[8] = (g) => a.$emit("onItemClick", g.nativeEvent)),
69
+ onOnItemLongClick: u[9] || (u[9] = (g) => a.$emit("onItemLongClick", g.nativeEvent)),
70
+ onOnItemFocused: u[10] || (u[10] = (g) => a.$emit("onItemFocused", g.nativeEvent)),
71
+ onOnProtocolMismatch: u[11] || (u[11] = (g) => a.$emit("onProtocolMismatch", g.nativeEvent))
72
72
  }, a.$attrs), {
73
73
  default: R(() => [
74
74
  F(a.$slots, "default")
@@ -88,8 +88,8 @@ const it = {
88
88
  install: (e) => {
89
89
  if (!globalThis.__QtGridTabs_registered)
90
90
  if (te) {
91
- const i = (u, s) => {
92
- te(u, {
91
+ const i = (d, s) => {
92
+ te(d, {
93
93
  component: {
94
94
  name: s ? "QtGridTabs_Plugin" : "QtGridTabs",
95
95
  processEventData(f, v) {
@@ -106,10 +106,10 @@ const it = {
106
106
  }
107
107
  };
108
108
  function _t(e, i) {
109
- const u = A(""), s = i ? JSON.parse(JSON.stringify(i)) : {}, f = me([]), v = me([]);
109
+ const d = A(""), s = i ? JSON.parse(JSON.stringify(i)) : {}, f = me([]), v = me([]);
110
110
  let l = !1, r = !1;
111
111
  const a = "__virtual_single_tab__";
112
- let c = "", d = !1;
112
+ let u = "", g = !1;
113
113
  const h = A({}), C = (o) => {
114
114
  const t = Array.isArray(o) ? o : [o];
115
115
  if (r && e.value) {
@@ -130,13 +130,13 @@ function _t(e, i) {
130
130
  return !1;
131
131
  let n = !0;
132
132
  return o.tabId || (console.error(`[useGridTabs] ❌ 数据格式错误 (${t}): Tab 缺失必填字段 'tabId'。每个 Tab 必须有唯一标识!`, o), n = !1), (o.title === void 0 || o.title === null) && console.warn(`[useGridTabs] ⚠️ 数据格式警告 (${t}): Tab 缺失 'title' 字段 (tabId: ${o.tabId || "未知"}),导航栏可能显示为空。`, o), n;
133
- }, Z = (o, t) => {
133
+ }, J = (o, t) => {
134
134
  if (!o || o.length === 0)
135
135
  return;
136
136
  U.clear();
137
137
  const n = o[0].hasOwnProperty("tabId") || o[0].hasOwnProperty("items") && Array.isArray(o[0].items);
138
- l = t === "1d", t === "1d" && n ? console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `items.value` (一维瀑布流) 赋值二维 Tabs 数据结构!请改用 `tabs.value = ...`") : t === "2d" && !n && console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `tabs.value` (二维导航) 赋值一维卡片列表数据结构!请改用 `items.value = ...`"), t === "1d" ? o.forEach((g, m) => z(g, `items.value[${m}]`)) : o.forEach((g, m) => {
139
- q(g, `tabs.value[${m}]`), g.items && Array.isArray(g.items) && g.items.forEach((y, b) => z(y, `tabs.value[${m}].items[${b}]`));
138
+ l = t === "1d", t === "1d" && n ? console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `items.value` (一维瀑布流) 赋值二维 Tabs 数据结构!请改用 `tabs.value = ...`") : t === "2d" && !n && console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `tabs.value` (二维导航) 赋值一维卡片列表数据结构!请改用 `items.value = ...`"), t === "1d" ? o.forEach((c, m) => z(c, `items.value[${m}]`)) : o.forEach((c, m) => {
139
+ q(c, `tabs.value[${m}]`), c.items && Array.isArray(c.items) && c.items.forEach((y, b) => z(y, `tabs.value[${m}].items[${b}]`));
140
140
  }), r = !0, p();
141
141
  }, U = /* @__PURE__ */ new Set(), p = (o = "unknown") => {
142
142
  if (!r) {
@@ -191,18 +191,18 @@ function _t(e, i) {
191
191
  items: v.value
192
192
  }
193
193
  ]) : n = f.value;
194
- const g = JSON.stringify({
194
+ const c = JSON.stringify({
195
195
  page_spec: t,
196
196
  tabs: n
197
197
  });
198
- if (u.value === "")
199
- console.log(`[useGridTabs] triggerRootUpdate: Initializing tabsDataStr (length=${g.length})`), u.value = g, c = g;
198
+ if (d.value === "")
199
+ console.log(`[useGridTabs] triggerRootUpdate: Initializing tabsDataStr (length=${c.length})`), d.value = c, u = c;
200
200
  else {
201
- if (c === g) {
201
+ if (u === c) {
202
202
  console.log("[useGridTabs] triggerRootUpdate: Data unchanged, skipping RELOAD_TABS");
203
203
  return;
204
204
  }
205
- console.log(`[useGridTabs] triggerRootUpdate: Sending RELOAD_TABS action directly to Native (length=${g.length})`), u.value = g, c = g, C({
205
+ console.log(`[useGridTabs] triggerRootUpdate: Sending RELOAD_TABS action directly to Native (length=${c.length})`), d.value = c, u = c, C({
206
206
  op: "RELOAD_TABS",
207
207
  payload: {
208
208
  pageSpec: t,
@@ -216,19 +216,19 @@ function _t(e, i) {
216
216
  if (!o || typeof o != "object" || o.__isGridTabsProxy)
217
217
  return o;
218
218
  o.content && typeof o.content == "object" && !o.content.__isGridTabsProxy && (o.content = new Proxy(o.content, {
219
- set(n, g, m, y) {
220
- const b = Reflect.set(n, g, m, y);
219
+ set(n, c, m, y) {
220
+ const b = Reflect.set(n, c, m, y);
221
221
  return o.id && r && C({
222
222
  op: "UPDATE_ITEM",
223
223
  itemId: o.id,
224
224
  payload: o
225
225
  }), b;
226
226
  }
227
- }), Object.defineProperty(o.content, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(o.content, "__v_skip", { value: !0, enumerable: !1 })), o.subItems && Array.isArray(o.subItems) && !o.subItems.__isGridTabsProxy && (o.subItems = P(o.subItems, o.id), Object.defineProperty(o.subItems, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(o.subItems, "__v_skip", { value: !0, enumerable: !1 }));
227
+ }), Object.defineProperty(o.content, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(o.content, "__v_skip", { value: !0, enumerable: !1 })), o.subItems && Array.isArray(o.subItems) && !o.subItems.__isGridTabsProxy && (o.subItems = S(o.subItems, o.id), Object.defineProperty(o.subItems, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(o.subItems, "__v_skip", { value: !0, enumerable: !1 }));
228
228
  const t = new Proxy(o, {
229
- set(n, g, m, y) {
230
- const b = Reflect.set(n, g, m, y);
231
- return n.id && r && !d && C({
229
+ set(n, c, m, y) {
230
+ const b = Reflect.set(n, c, m, y);
231
+ return n.id && r && !g && C({
232
232
  op: "UPDATE_ITEM",
233
233
  itemId: n.id,
234
234
  payload: n
@@ -236,80 +236,80 @@ function _t(e, i) {
236
236
  }
237
237
  });
238
238
  return Object.defineProperty(t, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(t, "__v_skip", { value: !0, enumerable: !1 }), t;
239
- }, P = (o, t) => {
239
+ }, S = (o, t) => {
240
240
  for (let n = 0; n < o.length; n++)
241
241
  o[n] = I(o[n]);
242
242
  return new Proxy(o, {
243
- get(n, g, m) {
244
- return g === "push" ? (...y) => {
243
+ get(n, c, m) {
244
+ return c === "push" ? (...y) => {
245
245
  y.forEach((Q, K) => z(Q, `push(${K})`)), r || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 push()。请先对 items.value 或 tabs.value 进行全量赋值!");
246
246
  const b = y.map((Q) => I(Q)), k = Array.prototype.push.apply(n, b);
247
- return d || C({
247
+ return g || C({
248
248
  op: "APPEND_SUB_ITEMS",
249
249
  itemId: t,
250
250
  payload: { subItems: b }
251
251
  }), k;
252
- } : g === "unshift" ? (...y) => {
252
+ } : c === "unshift" ? (...y) => {
253
253
  y.forEach((Q, K) => z(Q, `unshift(${K})`)), r || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 unshift()。请先对 items.value 或 tabs.value 进行全量赋值!");
254
254
  const b = y.map((Q) => I(Q)), k = Array.prototype.unshift.apply(n, b);
255
- return r && b.length > 0 && !d && C({
255
+ return r && b.length > 0 && !g && C({
256
256
  op: "PREPEND_SUB_ITEMS",
257
257
  itemId: t,
258
258
  payload: { subItems: b }
259
259
  }), k;
260
- } : g === "splice" ? (...y) => {
260
+ } : c === "splice" ? (...y) => {
261
261
  const b = y.length >= 2 && y[0] === 0 && y[1] === n.length, k = Array.prototype.splice.apply(n, y);
262
- return r && b && t !== a ? d || C({
262
+ return r && b && t !== a ? g || C({
263
263
  op: "CLEAR_SUB_ITEMS",
264
264
  itemId: t
265
- }) : r && (d || p("items array spliced")), k;
266
- } : Reflect.get(n, g, m);
265
+ }) : r && (g || p("items array spliced")), k;
266
+ } : Reflect.get(n, c, m);
267
267
  },
268
- set(n, g, m, y) {
269
- if (g !== "length" && !isNaN(Number(g))) {
270
- r || console.error(`[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时直接修改了索引 [${String(g)}]。请先对 items.value 或 tabs.value 进行全量赋值!`), z(m, `索引赋值 [${String(g)}]`);
271
- const b = I(m), k = Reflect.set(n, g, b, y);
272
- return b && b.id && !d && C({
268
+ set(n, c, m, y) {
269
+ if (c !== "length" && !isNaN(Number(c))) {
270
+ r || console.error(`[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时直接修改了索引 [${String(c)}]。请先对 items.value 或 tabs.value 进行全量赋值!`), z(m, `索引赋值 [${String(c)}]`);
271
+ const b = I(m), k = Reflect.set(n, c, b, y);
272
+ return b && b.id && !g && C({
273
273
  op: "UPDATE_ITEM",
274
274
  itemId: b.id,
275
275
  payload: b
276
276
  }), k;
277
277
  }
278
- return Reflect.set(n, g, m, y);
278
+ return Reflect.set(n, c, m, y);
279
279
  }
280
280
  });
281
- }, E = (o) => (o.items && Array.isArray(o.items) && !o.items.__isGridTabsProxy && (o.items = P(o.items, o.tabId), Object.defineProperty(o.items, "__isGridTabsProxy", { value: !0, enumerable: !1 })), new Proxy(o, {
282
- set(t, n, g, m) {
281
+ }, E = (o) => (o.items && Array.isArray(o.items) && !o.items.__isGridTabsProxy && (o.items = S(o.items, o.tabId), Object.defineProperty(o.items, "__isGridTabsProxy", { value: !0, enumerable: !1 })), new Proxy(o, {
282
+ set(t, n, c, m) {
283
283
  if (n === "items") {
284
- let b = g;
285
- return Array.isArray(g) && !g.__isGridTabsProxy && (b = P(g, t.tabId), Object.defineProperty(b, "__isGridTabsProxy", { value: !0, enumerable: !1 })), Reflect.set(t, n, b, m);
284
+ let b = c;
285
+ return Array.isArray(c) && !c.__isGridTabsProxy && (b = S(c, t.tabId), Object.defineProperty(b, "__isGridTabsProxy", { value: !0, enumerable: !1 })), Reflect.set(t, n, b, m);
286
286
  } else if (n === "loadState") {
287
- const b = Reflect.set(t, n, g, m);
288
- return r && t.tabId && !d && C({
287
+ const b = Reflect.set(t, n, c, m);
288
+ return r && t.tabId && !g && C({
289
289
  op: "UPDATE_TAB_STATE",
290
290
  itemId: t.tabId,
291
- payload: { loadState: g }
291
+ payload: { loadState: c }
292
292
  }), b;
293
293
  }
294
- return Reflect.set(t, n, g, m);
294
+ return Reflect.set(t, n, c, m);
295
295
  }
296
296
  })), G = (o) => {
297
297
  const t = o.map((n) => E(n));
298
298
  return new Proxy(t, {
299
- set(n, g, m, y) {
300
- if (g !== "length" && !isNaN(Number(g))) {
299
+ set(n, c, m, y) {
300
+ if (c !== "length" && !isNaN(Number(c))) {
301
301
  let b = m;
302
302
  m.__isGridTabsProxy || (b = E(m), Object.defineProperty(b, "__isGridTabsProxy", { value: !0, enumerable: !1 }));
303
- const k = Reflect.set(n, g, b, y);
303
+ const k = Reflect.set(n, c, b, y);
304
304
  return p(), k;
305
305
  }
306
- return Reflect.set(n, g, m, y);
306
+ return Reflect.set(n, c, m, y);
307
307
  }
308
308
  });
309
309
  };
310
310
  ee(f, (o, t) => {
311
311
  if (console.log("[useGridTabs] watch(tabs) triggered:", { newTabs: o, isInitialized: r }), !o || o.length === 0) {
312
- u.value = "", c = "", r = !1;
312
+ d.value = "", u = "", r = !1;
313
313
  return;
314
314
  }
315
315
  if (o.__isGridTabsProxy)
@@ -317,19 +317,19 @@ function _t(e, i) {
317
317
  else {
318
318
  console.log("[useGridTabs] newTabs is NOT a proxy, performing full deduceModeAndInitialize & wrapping");
319
319
  const n = G(o);
320
- Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Z(n, "2d"), f.value = n;
320
+ Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), J(n, "2d"), f.value = n;
321
321
  }
322
322
  }, { flush: "sync", deep: !1 }), ee(v, (o, t) => {
323
323
  if (console.log("[useGridTabs] watch(items) triggered:", { newItems: o, isInitialized: r }), !o || o.length === 0) {
324
- u.value = "", c = "", r = !1;
324
+ d.value = "", u = "", r = !1;
325
325
  return;
326
326
  }
327
327
  if (o.__isGridTabsProxy)
328
328
  console.log("[useGridTabs] newItems is ALREADY a proxy, triggering root update"), p();
329
329
  else {
330
330
  console.log("[useGridTabs] newItems is NOT a proxy, performing full deduceModeAndInitialize & wrapping");
331
- const n = P(o, a);
332
- Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Z(n, "1d"), v.value = n;
331
+ const n = S(o, a);
332
+ Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), J(n, "1d"), v.value = n;
333
333
  }
334
334
  }, { flush: "sync", deep: !1 });
335
335
  const T = {}, O = () => {
@@ -338,27 +338,27 @@ function _t(e, i) {
338
338
  delete T[o];
339
339
  }, M = (o) => {
340
340
  if (!o || o.length === 0) {
341
- u.value = "", r = !1;
341
+ d.value = "", r = !1;
342
342
  return;
343
343
  }
344
344
  o[0].hasOwnProperty("tabId") || o[0].hasOwnProperty("items") && Array.isArray(o[0].items) ? f.value = o : v.value = o;
345
345
  }, x = (o) => {
346
346
  h.value = o;
347
347
  }, V = W(() => ({
348
- tabsData: u.value,
348
+ tabsData: d.value,
349
349
  // 不再绑定 actionPayload 属性,完全走命令式 API,防止触发无意义的 Vue 节点更新
350
350
  onTabNeedsData: async (...o) => {
351
351
  let t = o[0];
352
352
  if (t && t.nativeEvent && (t = t.nativeEvent), !h.value.onTabNeedsData)
353
353
  return;
354
- const { tabId: n, index: g, reason: m } = t;
354
+ const { tabId: n, index: c, reason: m } = t;
355
355
  if (U.has(n)) {
356
356
  console.log(`[useGridTabs] onTabNeedsData SKIP: tabId=${n} 已经发起过请求,防止死循环`);
357
357
  return;
358
358
  }
359
359
  U.add(n);
360
360
  try {
361
- const y = await h.value.onTabNeedsData(n, g, m);
361
+ const y = await h.value.onTabNeedsData(n, c, m);
362
362
  if (y && Array.isArray(y))
363
363
  if (T[n] = 1, y.length > 0) {
364
364
  const b = f.value.find((k) => k.tabId === n);
@@ -377,10 +377,10 @@ function _t(e, i) {
377
377
  let t = o[0];
378
378
  if (t && t.nativeEvent && (t = t.nativeEvent), !h.value.onLoadMore)
379
379
  return;
380
- const { tabId: n, itemId: g } = t, y = (T[n] || 1) + 1;
380
+ const { tabId: n, itemId: c } = t, y = (T[n] || 1) + 1;
381
381
  console.log(`[useGridTabs] 拦截到底层 onLoadMore,强行接管页码: tabId=${n}, pageNo=${y}`);
382
382
  try {
383
- const b = await h.value.onLoadMore(n, y, g);
383
+ const b = await h.value.onLoadMore(n, y, c);
384
384
  if (b && Array.isArray(b))
385
385
  if (b.length > 0)
386
386
  if (T[n] = y, l)
@@ -401,10 +401,10 @@ function _t(e, i) {
401
401
  try {
402
402
  let n = typeof t == "string" ? t : (t == null ? void 0 : t.nativeEvent) || t;
403
403
  n && typeof n.data == "string" && (n = n.data);
404
- const g = typeof n == "string" ? JSON.parse(n) : n;
405
- g && g.type === "VIEW_PRESENCE_BATCH" && Array.isArray(g.payload) ? g.payload.forEach((m) => {
404
+ const c = typeof n == "string" ? JSON.parse(n) : n;
405
+ c && c.type === "VIEW_PRESENCE_BATCH" && Array.isArray(c.payload) ? c.payload.forEach((m) => {
406
406
  m.itemId && typeof m.itemId == "string" && m.itemId.startsWith("fallback_pos_") && console.warn(`[useGridTabs] ⚠️ 警告:检测到列表项曝光 (index=${m.index}),但未配置 itemId。请检查传入的 items 数组,务必为每个数据项指定唯一的 itemId,否则底层无法准确进行去重与曝光上报。`), h.value.onItemPresence(m);
407
- }) : h.value.onItemPresence(g);
407
+ }) : h.value.onItemPresence(c);
408
408
  } catch (n) {
409
409
  console.error("[useGridTabs] Failed to parse onItemPresence event payload:", n), h.value.onItemPresence(t);
410
410
  }
@@ -422,8 +422,20 @@ function _t(e, i) {
422
422
  if (console.log("[useGridTabs] RAW onItemClick intercepted from Native:", t), t && t.nativeEvent && (t = t.nativeEvent), h.value.onItemClick)
423
423
  try {
424
424
  let n = typeof t == "string" ? t : (t == null ? void 0 : t.data) || t;
425
- const g = typeof n == "string" ? JSON.parse(n) : n;
426
- h.value.onItemClick(g);
425
+ const c = typeof n == "string" ? JSON.parse(n) : n;
426
+ if (c && typeof c.clickPayload == "string")
427
+ try {
428
+ c.clickPayload = JSON.parse(c.clickPayload);
429
+ } catch (m) {
430
+ console.warn("Failed to parse clickPayload:", m);
431
+ }
432
+ if (c && typeof c.focusPayload == "string")
433
+ try {
434
+ c.focusPayload = JSON.parse(c.focusPayload);
435
+ } catch (m) {
436
+ console.warn("Failed to parse focusPayload:", m);
437
+ }
438
+ h.value.onItemClick(c);
427
439
  } catch (n) {
428
440
  console.error("[useGridTabs] Failed to parse onItemClick event payload:", n), h.value.onItemClick(t);
429
441
  }
@@ -435,8 +447,18 @@ function _t(e, i) {
435
447
  if (console.log("[useGridTabs] RAW onItemLongClick intercepted from Native:", t), typeof t == "number" && o.length >= 3 && typeof o[1] == "string" && (t = o[2]), t && t.nativeEvent && (t = t.nativeEvent), h.value.onItemLongClick)
436
448
  try {
437
449
  let n = typeof t == "string" ? t : (t == null ? void 0 : t.data) || t;
438
- const g = typeof n == "string" ? JSON.parse(n) : n;
439
- h.value.onItemLongClick(g);
450
+ const c = typeof n == "string" ? JSON.parse(n) : n;
451
+ if (c && typeof c.clickPayload == "string")
452
+ try {
453
+ c.clickPayload = JSON.parse(c.clickPayload);
454
+ } catch {
455
+ }
456
+ if (c && typeof c.focusPayload == "string")
457
+ try {
458
+ c.focusPayload = JSON.parse(c.focusPayload);
459
+ } catch {
460
+ }
461
+ h.value.onItemLongClick(c);
440
462
  } catch (n) {
441
463
  console.error("[useGridTabs] Failed to parse onItemLongClick event payload:", n), h.value.onItemLongClick(t);
442
464
  }
@@ -446,8 +468,18 @@ function _t(e, i) {
446
468
  if (t && t.nativeEvent && (t = t.nativeEvent), h.value.onItemFocused)
447
469
  try {
448
470
  let n = typeof t == "string" ? t : (t == null ? void 0 : t.data) || t;
449
- const g = typeof n == "string" ? JSON.parse(n) : n;
450
- h.value.onItemFocused(g);
471
+ const c = typeof n == "string" ? JSON.parse(n) : n;
472
+ if (c && typeof c.clickPayload == "string")
473
+ try {
474
+ c.clickPayload = JSON.parse(c.clickPayload);
475
+ } catch {
476
+ }
477
+ if (c && typeof c.focusPayload == "string")
478
+ try {
479
+ c.focusPayload = JSON.parse(c.focusPayload);
480
+ } catch {
481
+ }
482
+ h.value.onItemFocused(c);
451
483
  } catch (n) {
452
484
  console.error("[useGridTabs] Failed to parse onItemFocused event payload:", n), h.value.onItemFocused(t);
453
485
  }
@@ -478,7 +510,7 @@ function _t(e, i) {
478
510
  }
479
511
  }));
480
512
  return {
481
- tabsDataStr: u,
513
+ tabsDataStr: d,
482
514
  bindings: V,
483
515
  tabs: f,
484
516
  items: v,
@@ -489,42 +521,42 @@ function _t(e, i) {
489
521
  console.error("[useGridTabs] ❌ 时机错误: 尚未初始化数据,无法调用 updateItem");
490
522
  return;
491
523
  }
492
- C({ op: "UPDATE_ITEM", itemId: o, payload: t }), d = !0;
524
+ C({ op: "UPDATE_ITEM", itemId: o, payload: t }), g = !0;
493
525
  try {
494
526
  if (l) {
495
- const n = v.value.find((g) => g.id === o);
527
+ const n = v.value.find((c) => c.id === o);
496
528
  n && Object.assign(n, t);
497
529
  } else
498
530
  for (const n of f.value)
499
531
  if (n.items) {
500
- const g = n.items.find((m) => m.id === o);
501
- if (g) {
502
- Object.assign(g, t);
532
+ const c = n.items.find((m) => m.id === o);
533
+ if (c) {
534
+ Object.assign(c, t);
503
535
  break;
504
536
  }
505
537
  }
506
538
  } finally {
507
- d = !1;
539
+ g = !1;
508
540
  }
509
541
  },
510
542
  deleteItem: (o, t = !0) => {
511
543
  if (r) {
512
- C({ op: "DELETE_ITEM", itemId: o, payload: { animated: t } }), d = !0;
544
+ C({ op: "DELETE_ITEM", itemId: o, payload: { animated: t } }), g = !0;
513
545
  try {
514
546
  if (l) {
515
- const n = v.value.findIndex((g) => g.id === o);
547
+ const n = v.value.findIndex((c) => c.id === o);
516
548
  n !== -1 && v.value.splice(n, 1);
517
549
  } else
518
550
  for (const n of f.value)
519
551
  if (n.items) {
520
- const g = n.items.findIndex((m) => m.id === o);
521
- if (g !== -1) {
522
- n.items.splice(g, 1);
552
+ const c = n.items.findIndex((m) => m.id === o);
553
+ if (c !== -1) {
554
+ n.items.splice(c, 1);
523
555
  break;
524
556
  }
525
557
  }
526
558
  } finally {
527
- d = !1;
559
+ g = !1;
528
560
  }
529
561
  }
530
562
  },
@@ -534,16 +566,16 @@ function _t(e, i) {
534
566
  op: "PREPEND_SUB_ITEMS",
535
567
  itemId: o,
536
568
  payload: { subItems: t }
537
- }), d = !0;
569
+ }), g = !0;
538
570
  try {
539
571
  if (l)
540
572
  v.value.unshift(...t);
541
573
  else {
542
- const n = f.value.find((g) => g.tabId === o);
574
+ const n = f.value.find((c) => c.tabId === o);
543
575
  n && n.items && n.items.unshift(...t);
544
576
  }
545
577
  } finally {
546
- d = !1;
578
+ g = !1;
547
579
  }
548
580
  }
549
581
  },
@@ -552,7 +584,7 @@ function _t(e, i) {
552
584
  C({
553
585
  op: "CLEAR_SUB_ITEMS",
554
586
  itemId: o
555
- }), d = !0;
587
+ }), g = !0;
556
588
  try {
557
589
  if (l)
558
590
  v.value.splice(0, v.value.length);
@@ -561,7 +593,7 @@ function _t(e, i) {
561
593
  t && t.items && t.items.splice(0, t.items.length);
562
594
  }
563
595
  } finally {
564
- d = !1;
596
+ g = !1;
565
597
  }
566
598
  }
567
599
  },
@@ -571,9 +603,9 @@ function _t(e, i) {
571
603
  op: "MOVE_ITEM",
572
604
  itemId: o,
573
605
  payload: { targetPosition: t, anchorItemId: n }
574
- }), d = !0;
606
+ }), g = !0;
575
607
  try {
576
- const g = (m) => {
608
+ const c = (m) => {
577
609
  const y = m.findIndex((k) => k.id === o), b = m.findIndex((k) => k.id === n);
578
610
  if (y !== -1 && b !== -1) {
579
611
  const k = m.splice(y, 1)[0], Q = m.findIndex((Ye) => Ye.id === n), K = t === "after" ? Q + 1 : Q;
@@ -581,12 +613,12 @@ function _t(e, i) {
581
613
  }
582
614
  };
583
615
  if (l)
584
- g(v.value);
616
+ c(v.value);
585
617
  else
586
618
  for (const m of f.value)
587
- m.items && g(m.items);
619
+ m.items && c(m.items);
588
620
  } finally {
589
- d = !1;
621
+ g = !1;
590
622
  }
591
623
  }
592
624
  },
@@ -596,22 +628,22 @@ function _t(e, i) {
596
628
  op: "REPLACE_ITEM",
597
629
  itemId: o,
598
630
  payload: t
599
- }), d = !0;
631
+ }), g = !0;
600
632
  try {
601
633
  if (l) {
602
- const n = v.value.findIndex((g) => g.id === o);
634
+ const n = v.value.findIndex((c) => c.id === o);
603
635
  n !== -1 && (v.value[n] = t);
604
636
  } else
605
637
  for (const n of f.value)
606
638
  if (n.items) {
607
- const g = n.items.findIndex((m) => m.id === o);
608
- if (g !== -1) {
609
- n.items[g] = t;
639
+ const c = n.items.findIndex((m) => m.id === o);
640
+ if (c !== -1) {
641
+ n.items[c] = t;
610
642
  break;
611
643
  }
612
644
  }
613
645
  } finally {
614
- d = !1;
646
+ g = !1;
615
647
  }
616
648
  }
617
649
  },
@@ -620,7 +652,7 @@ function _t(e, i) {
620
652
  getFocusState: async () => new Promise((o, t) => {
621
653
  let n = e.value;
622
654
  typeof e.value.getNativeNode == "function" ? n = e.value.getNativeNode() || e.value : e.value.nativeRef && (n = e.value.nativeRef), console.log("[useGridTabs] getFocusState called, nativeTarget:", n);
623
- const g = (m) => {
655
+ const c = (m) => {
624
656
  if (console.log("[useGridTabs] getFocusState callback received:", m), m && m.isSuccess !== void 0 && m.result !== void 0) {
625
657
  o(m.result);
626
658
  return;
@@ -632,11 +664,11 @@ function _t(e, i) {
632
664
  t(y);
633
665
  }
634
666
  };
635
- typeof N.callUIFunction == "function" ? (console.log('[useGridTabs] Executing Native.callUIFunction("getFocusState") with callback as 4th arg'), N.callUIFunction(n, "getFocusState", [], g)) : (console.error("[useGridTabs] Native.callUIFunction is not available"), t(new Error("Native.callUIFunction is not available")));
667
+ typeof N.callUIFunction == "function" ? (console.log('[useGridTabs] Executing Native.callUIFunction("getFocusState") with callback as 4th arg'), N.callUIFunction(n, "getFocusState", [], c)) : (console.error("[useGridTabs] Native.callUIFunction is not available"), t(new Error("Native.callUIFunction is not available")));
636
668
  }),
637
669
  getItemRect: async (o) => new Promise((t, n) => {
638
- let g = e.value;
639
- typeof e.value.getNativeNode == "function" ? g = e.value.getNativeNode() || e.value : e.value.nativeRef && (g = e.value.nativeRef), console.log(`[useGridTabs] getItemRect called for itemId=${o}, nativeTarget:`, g);
670
+ let c = e.value;
671
+ typeof e.value.getNativeNode == "function" ? c = e.value.getNativeNode() || e.value : e.value.nativeRef && (c = e.value.nativeRef), console.log(`[useGridTabs] getItemRect called for itemId=${o}, nativeTarget:`, c);
640
672
  const m = (y) => {
641
673
  if (console.log(`[useGridTabs] getItemRect callback received for itemId=${o}:`, y), y && y.isSuccess !== void 0 && y.result !== void 0) {
642
674
  t(y.result);
@@ -649,7 +681,7 @@ function _t(e, i) {
649
681
  n(b);
650
682
  }
651
683
  };
652
- typeof N.callUIFunction == "function" ? (console.log('[useGridTabs] Executing Native.callUIFunction("getItemRect") with itemId and callback as 4th arg'), N.callUIFunction(g, "getItemRect", [o], m)) : (console.error("[useGridTabs] Native.callUIFunction is not available"), n(new Error("Native.callUIFunction is not available")));
684
+ typeof N.callUIFunction == "function" ? (console.log('[useGridTabs] Executing Native.callUIFunction("getItemRect") with itemId and callback as 4th arg'), N.callUIFunction(c, "getItemRect", [o], m)) : (console.error("[useGridTabs] Native.callUIFunction is not available"), n(new Error("Native.callUIFunction is not available")));
653
685
  }),
654
686
  requestFocus: (o) => {
655
687
  let t = e.value;
@@ -658,7 +690,7 @@ function _t(e, i) {
658
690
  updatePageSpec: (o) => {
659
691
  if (!r)
660
692
  return;
661
- const t = Object.assign({}, JSON.parse(u.value).page_spec, o);
693
+ const t = Object.assign({}, JSON.parse(d.value).page_spec, o);
662
694
  o.layout && (t.navConfig = Object.assign({}, t.navConfig, o.layout)), o.navConfig && (t.navConfig = Object.assign({}, t.navConfig, o.navConfig)), o.contentConfig && (t.contentConfig = Object.assign({}, t.contentConfig, o.contentConfig)), s && Object.assign(s, t), C({
663
695
  op: "RELOAD_TABS",
664
696
  payload: {
@@ -667,8 +699,8 @@ function _t(e, i) {
667
699
  tabs: f.value
668
700
  }
669
701
  });
670
- const n = JSON.parse(u.value);
671
- n.page_spec = t, u.value = JSON.stringify(n), c = u.value;
702
+ const n = JSON.parse(d.value);
703
+ n.page_spec = t, d.value = JSON.stringify(n), u = d.value;
672
704
  },
673
705
  reloadAll: (o, t) => {
674
706
  s && (Object.keys(s).forEach((n) => delete s[n]), Object.assign(s, o)), f.value = t, C({
@@ -707,24 +739,24 @@ const ye = "QtKeyboard", he = /* @__PURE__ */ w({
707
739
  },
708
740
  emits: ["onInputChanged", "onKeyPressed"],
709
741
  setup(e, { expose: i }) {
710
- const u = A(), s = _(), f = ye + "_Plugin", l = (s.isPluginActive ? f : ye).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
742
+ const d = A(), s = _(), f = ye + "_Plugin", l = (s.isPluginActive ? f : ye).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
711
743
  l,
712
744
  s.pluginPackageName || "com.quicktvui.plugin.extraui",
713
745
  "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
714
746
  );
715
747
  return i({
716
748
  getNativeNode: () => {
717
- var a, c;
718
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
749
+ var a, u;
750
+ return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
719
751
  },
720
752
  requestFocus: (...a) => {
721
- var d, h;
722
- const c = ((h = (d = u.value) == null ? void 0 : d.getNativeNode) == null ? void 0 : h.call(d)) || u.value;
723
- c && N.callUIFunction(c, "requestFocus", a);
753
+ var g, h;
754
+ const u = ((h = (g = d.value) == null ? void 0 : g.getNativeNode) == null ? void 0 : h.call(g)) || d.value;
755
+ u && N.callUIFunction(u, "requestFocus", a);
724
756
  }
725
- }), (a, c) => (S(), $(D(r), B({
757
+ }), (a, u) => (P(), $(D(r), B({
726
758
  ref_key: "nativeRef",
727
- ref: u,
759
+ ref: d,
728
760
  backgroundColor: e.backgroundColor,
729
761
  backgroundGradient: e.backgroundGradient,
730
762
  textColor: e.textColor,
@@ -740,8 +772,8 @@ const ye = "QtKeyboard", he = /* @__PURE__ */ w({
740
772
  currentInput: e.currentInput,
741
773
  autofocus: e.autofocus,
742
774
  rememberKeyboardType: e.rememberKeyboardType,
743
- onOnInputChanged: c[0] || (c[0] = (d) => a.$emit("onInputChanged", d.nativeEvent)),
744
- onOnKeyPressed: c[1] || (c[1] = (d) => a.$emit("onKeyPressed", d.nativeEvent))
775
+ onOnInputChanged: u[0] || (u[0] = (g) => a.$emit("onInputChanged", g.nativeEvent)),
776
+ onOnKeyPressed: u[1] || (u[1] = (g) => a.$emit("onKeyPressed", g.nativeEvent))
745
777
  }, a.$attrs), {
746
778
  default: R(() => [
747
779
  F(a.$slots, "default")
@@ -761,8 +793,8 @@ const lt = {
761
793
  install: (e) => {
762
794
  if (!globalThis.__QtKeyboard_registered)
763
795
  if (oe) {
764
- const i = (u, s) => {
765
- oe(u, {
796
+ const i = (d, s) => {
797
+ oe(d, {
766
798
  component: {
767
799
  name: s ? "QtKeyboard_Plugin" : "QtKeyboard",
768
800
  processEventData(f, v) {
@@ -780,18 +812,18 @@ const lt = {
780
812
  }, pe = "QtPortalPool", Ce = /* @__PURE__ */ w({
781
813
  __name: "PortalPool",
782
814
  setup(e, { expose: i }) {
783
- const u = A(), s = _(), f = pe + "_Plugin", l = (s.isPluginActive ? f : pe).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
815
+ const d = A(), s = _(), f = pe + "_Plugin", l = (s.isPluginActive ? f : pe).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
784
816
  l,
785
817
  s.pluginPackageName || "com.quicktvui.plugin.glintui"
786
818
  );
787
819
  return i({
788
820
  getNativeNode: () => {
789
- var a, c;
790
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
821
+ var a, u;
822
+ return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
791
823
  }
792
- }), (a, c) => (S(), $(D(r), B({
824
+ }), (a, u) => (P(), $(D(r), B({
793
825
  ref_key: "nativeRef",
794
- ref: u,
826
+ ref: d,
795
827
  style: { position: "absolute" },
796
828
  absolute: !0
797
829
  }, a.$attrs), {
@@ -813,8 +845,8 @@ const rt = {
813
845
  install: (e) => {
814
846
  if (!globalThis.__QtPortalPool_registered)
815
847
  if (ne) {
816
- const i = (u, s) => {
817
- ne(u, {
848
+ const i = (d, s) => {
849
+ ne(d, {
818
850
  component: {
819
851
  name: s ? "QtPortalPool_Plugin" : "QtPortalPool",
820
852
  processEventData(f, v) {
@@ -835,18 +867,18 @@ const rt = {
835
867
  portalId: {}
836
868
  },
837
869
  setup(e, { expose: i }) {
838
- const u = A(), s = _(), f = ke + "_Plugin", l = (s.isPluginActive ? f : ke).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
870
+ const d = A(), s = _(), f = ke + "_Plugin", l = (s.isPluginActive ? f : ke).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
839
871
  l,
840
872
  s.pluginPackageName || "com.quicktvui.plugin.glintui"
841
873
  );
842
874
  return i({
843
875
  getNativeNode: () => {
844
- var a, c;
845
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
876
+ var a, u;
877
+ return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
846
878
  }
847
- }), (a, c) => (S(), $(D(r), B({
879
+ }), (a, u) => (P(), $(D(r), B({
848
880
  ref_key: "nativeRef",
849
- ref: u,
881
+ ref: d,
850
882
  style: { position: "absolute" },
851
883
  absolute: !0,
852
884
  portalId: e.portalId
@@ -869,8 +901,8 @@ const st = {
869
901
  install: (e) => {
870
902
  if (!globalThis.__QtPortalItem_registered)
871
903
  if (ae) {
872
- const i = (u, s) => {
873
- ae(u, {
904
+ const i = (d, s) => {
905
+ ae(d, {
874
906
  component: {
875
907
  name: s ? "QtPortalItem_Plugin" : "QtPortalItem",
876
908
  processEventData(f, v) {
@@ -892,18 +924,18 @@ const st = {
892
924
  hueDuration: {}
893
925
  },
894
926
  setup(e, { expose: i }) {
895
- const u = A(), s = _(), f = Ne + "_Plugin", l = (s.isPluginActive ? f : Ne).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
927
+ const d = A(), s = _(), f = Ne + "_Plugin", l = (s.isPluginActive ? f : Ne).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
896
928
  l,
897
929
  s.pluginPackageName || "com.quicktvui.plugin.glintui"
898
930
  );
899
931
  return i({
900
932
  getNativeNode: () => {
901
- var a, c;
902
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
933
+ var a, u;
934
+ return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
903
935
  }
904
- }), (a, c) => (S(), $(D(r), B({
936
+ }), (a, u) => (P(), $(D(r), B({
905
937
  ref_key: "nativeRef",
906
- ref: u,
938
+ ref: d,
907
939
  hue: e.hue,
908
940
  hueDuration: e.hueDuration
909
941
  }, a.$attrs), {
@@ -925,8 +957,8 @@ const ct = {
925
957
  install: (e) => {
926
958
  if (!globalThis.__QtHsvBackground_registered)
927
959
  if (ie) {
928
- const i = (u, s) => {
929
- ie(u, {
960
+ const i = (d, s) => {
961
+ ie(d, {
930
962
  component: {
931
963
  name: s ? "QtHsvBackground_Plugin" : "QtHsvBackground",
932
964
  processEventData(f, v) {
@@ -941,26 +973,26 @@ const ct = {
941
973
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
942
974
  e.component("HsvBackground", Te), e.component("qt-hsv-background", Te);
943
975
  }
944
- }, Se = "QtSvgImage", Pe = /* @__PURE__ */ w({
976
+ }, Pe = "QtSvgImage", Se = /* @__PURE__ */ w({
945
977
  __name: "SvgImage",
946
978
  props: {
947
979
  src: {},
948
980
  tintColor: {}
949
981
  },
950
982
  setup(e, { expose: i }) {
951
- const u = A(), s = _(), f = Se + "_Plugin", l = (s.isPluginActive ? f : Se).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
983
+ const d = A(), s = _(), f = Pe + "_Plugin", l = (s.isPluginActive ? f : Pe).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
952
984
  l,
953
985
  s.pluginPackageName || "com.quicktvui.plugin.extraui",
954
986
  "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
955
987
  );
956
988
  return i({
957
989
  getNativeNode: () => {
958
- var a, c;
959
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
990
+ var a, u;
991
+ return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
960
992
  }
961
- }), (a, c) => (S(), $(D(r), B({
993
+ }), (a, u) => (P(), $(D(r), B({
962
994
  ref_key: "nativeRef",
963
- ref: u,
995
+ ref: d,
964
996
  src: e.src,
965
997
  tintColor: e.tintColor
966
998
  }, a.$attrs), {
@@ -982,8 +1014,8 @@ const ut = {
982
1014
  install: (e) => {
983
1015
  if (!globalThis.__QtSvgImage_registered)
984
1016
  if (le) {
985
- const i = (u, s) => {
986
- le(u, {
1017
+ const i = (d, s) => {
1018
+ le(d, {
987
1019
  component: {
988
1020
  name: s ? "QtSvgImage_Plugin" : "QtSvgImage",
989
1021
  processEventData(f, v) {
@@ -996,7 +1028,7 @@ const ut = {
996
1028
  i("qt-svg-image", !1), i("qt-svg-image-plugin", !0), i("QtSvgImage", !1), i("QtSvgImage_Plugin", !0), globalThis.__QtSvgImage_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtSvgImage");
997
1029
  } else
998
1030
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
999
- e.component("SvgImage", Pe), e.component("qt-svg-image", Pe);
1031
+ e.component("SvgImage", Se), e.component("qt-svg-image", Se);
1000
1032
  }
1001
1033
  }, Ee = "QtNaButton", dt = /* @__PURE__ */ w({
1002
1034
  __name: "NaButtonBase",
@@ -1021,19 +1053,19 @@ const ut = {
1021
1053
  },
1022
1054
  emits: ["onButtonCustomEvent"],
1023
1055
  setup(e, { expose: i }) {
1024
- const u = A(), s = _(), f = Ee + "_Plugin", l = (s.isPluginActive ? f : Ee).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
1056
+ const d = A(), s = _(), f = Ee + "_Plugin", l = (s.isPluginActive ? f : Ee).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
1025
1057
  l,
1026
1058
  s.pluginPackageName || "com.quicktvui.plugin.extraui",
1027
1059
  "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
1028
1060
  );
1029
1061
  return i({
1030
1062
  getNativeNode: () => {
1031
- var a, c;
1032
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
1063
+ var a, u;
1064
+ return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
1033
1065
  }
1034
- }), (a, c) => (S(), $(D(r), B({
1066
+ }), (a, u) => (P(), $(D(r), B({
1035
1067
  ref_key: "nativeRef",
1036
- ref: u,
1068
+ ref: d,
1037
1069
  text: e.text,
1038
1070
  icon: e.icon,
1039
1071
  iconSize: e.iconSize,
@@ -1051,7 +1083,7 @@ const ut = {
1051
1083
  cornerRadius: e.cornerRadius,
1052
1084
  focusScale: e.focusScale,
1053
1085
  enableFocusBorder: e.enableFocusBorder,
1054
- onOnButtonCustomEvent: c[0] || (c[0] = (d) => a.$emit("onButtonCustomEvent", d.nativeEvent))
1086
+ onOnButtonCustomEvent: u[0] || (u[0] = (g) => a.$emit("onButtonCustomEvent", g.nativeEvent))
1055
1087
  }, a.$attrs), {
1056
1088
  default: R(() => [
1057
1089
  F(a.$slots, "default")
@@ -1066,11 +1098,11 @@ const ut = {
1066
1098
  height: {}
1067
1099
  },
1068
1100
  setup(e) {
1069
- const i = e, u = W(() => ({
1101
+ const i = e, d = W(() => ({
1070
1102
  width: typeof i.width == "number" ? `${i.width}px` : i.width,
1071
1103
  height: typeof i.height == "number" ? `${i.height}px` : i.height
1072
1104
  }));
1073
- return (s, f) => (S(), $(dt, B(s.$attrs, { style: u.value }), {
1105
+ return (s, f) => (P(), $(dt, B(s.$attrs, { style: d.value }), {
1074
1106
  default: R(() => [
1075
1107
  F(s.$slots, "default")
1076
1108
  ]),
@@ -1089,8 +1121,8 @@ const gt = {
1089
1121
  install: (e) => {
1090
1122
  if (!globalThis.__QtNaButton_registered)
1091
1123
  if (re) {
1092
- const i = (u, s) => {
1093
- re(u, {
1124
+ const i = (d, s) => {
1125
+ re(d, {
1094
1126
  component: {
1095
1127
  name: s ? "QtNaButton_Plugin" : "QtNaButton",
1096
1128
  processEventData(f, v) {
@@ -1152,18 +1184,18 @@ const gt = {
1152
1184
  },
1153
1185
  emits: ["onCheckedChange"],
1154
1186
  setup(e, { expose: i }) {
1155
- const u = A(), s = _(), f = Ae + "_Plugin", l = (s.isPluginActive ? f : Ae).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
1187
+ const d = A(), s = _(), f = Ae + "_Plugin", l = (s.isPluginActive ? f : Ae).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
1156
1188
  l,
1157
1189
  s.pluginPackageName || ""
1158
1190
  );
1159
1191
  return i({
1160
1192
  getNativeNode: () => {
1161
- var a, c;
1162
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
1193
+ var a, u;
1194
+ return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
1163
1195
  }
1164
- }), (a, c) => (S(), $(D(r), B({
1196
+ }), (a, u) => (P(), $(D(r), B({
1165
1197
  ref_key: "nativeRef",
1166
- ref: u,
1198
+ ref: d,
1167
1199
  text: e.text,
1168
1200
  checked: e.checked,
1169
1201
  disabled: e.disabled,
@@ -1205,7 +1237,7 @@ const gt = {
1205
1237
  cornerRadius: e.cornerRadius,
1206
1238
  focusScale: e.focusScale,
1207
1239
  type: e.type,
1208
- onOnCheckedChange: c[0] || (c[0] = (d) => a.$emit("onCheckedChange", d.nativeEvent))
1240
+ onOnCheckedChange: u[0] || (u[0] = (g) => a.$emit("onCheckedChange", g.nativeEvent))
1209
1241
  }, a.$attrs), {
1210
1242
  default: R(() => [
1211
1243
  F(a.$slots, "default")
@@ -1225,8 +1257,8 @@ const ft = {
1225
1257
  install: (e) => {
1226
1258
  if (!globalThis.__QtNaCheckbox_registered)
1227
1259
  if (se) {
1228
- const i = (u, s) => {
1229
- se(u, {
1260
+ const i = (d, s) => {
1261
+ se(d, {
1230
1262
  component: {
1231
1263
  name: s ? "QtNaCheckbox_Plugin" : "QtNaCheckbox",
1232
1264
  processEventData(f, v) {
@@ -1297,18 +1329,18 @@ const ft = {
1297
1329
  }
1298
1330
  });
1299
1331
  const ve = (e, i) => {
1300
- const u = e.__vccOpts || e;
1332
+ const d = e.__vccOpts || e;
1301
1333
  for (const [s, f] of i)
1302
- u[s] = f;
1303
- return u;
1334
+ d[s] = f;
1335
+ return d;
1304
1336
  };
1305
- function mt(e, i, u, s, f, v) {
1337
+ function mt(e, i, d, s, f, v) {
1306
1338
  const l = ge("qt-na-checkbox");
1307
- return S(), J("div", {
1339
+ return P(), Z("div", {
1308
1340
  class: "na-radio-group",
1309
1341
  style: fe(e.groupStyle)
1310
1342
  }, [
1311
- (S(!0), J(Ke, null, He(e.options, (r, a) => (S(), $(l, B({
1343
+ (P(!0), Z(Ke, null, He(e.options, (r, a) => (P(), $(l, B({
1312
1344
  key: a,
1313
1345
  type: "radio",
1314
1346
  checked: e.modelValue === r.value,
@@ -1318,7 +1350,7 @@ function mt(e, i, u, s, f, v) {
1318
1350
  disabled: r.disabled
1319
1351
  }, { ref_for: !0 }, r.props, {
1320
1352
  style: e.getItemStyle(r, a),
1321
- onClick: (c) => e.onItemClick(r)
1353
+ onClick: (u) => e.onItemClick(r)
1322
1354
  }), null, 16, ["checked", "text", "gravity", "showBackground", "disabled", "style", "onClick"]))), 128))
1323
1355
  ], 4);
1324
1356
  }
@@ -1384,13 +1416,13 @@ const $e = /* @__PURE__ */ ve(vt, [["render", mt], ["__scopeId", "data-v-448252f
1384
1416
  };
1385
1417
  }
1386
1418
  });
1387
- function ht(e, i, u, s, f, v) {
1419
+ function ht(e, i, d, s, f, v) {
1388
1420
  const l = ge("qt-na-checkbox");
1389
- return S(), J("div", {
1421
+ return P(), Z("div", {
1390
1422
  class: "na-checkbox-group",
1391
1423
  style: fe(e.groupStyle)
1392
1424
  }, [
1393
- (S(!0), J(Ke, null, He(e.options, (r, a) => (S(), $(l, B({
1425
+ (P(!0), Z(Ke, null, He(e.options, (r, a) => (P(), $(l, B({
1394
1426
  key: a,
1395
1427
  type: "checkbox",
1396
1428
  checked: e.modelValue.includes(r.value),
@@ -1400,7 +1432,7 @@ function ht(e, i, u, s, f, v) {
1400
1432
  disabled: r.disabled
1401
1433
  }, { ref_for: !0 }, r.props, {
1402
1434
  style: e.getItemStyle(r, a),
1403
- onClick: (c) => e.onItemClick(r)
1435
+ onClick: (u) => e.onItemClick(r)
1404
1436
  }), null, 16, ["checked", "text", "gravity", "showBackground", "disabled", "style", "onClick"]))), 128))
1405
1437
  ], 4);
1406
1438
  }
@@ -1426,18 +1458,18 @@ const Be = /* @__PURE__ */ ve(yt, [["render", ht], ["__scopeId", "data-v-cf6a4ea
1426
1458
  },
1427
1459
  emits: ["onCheckedChange"],
1428
1460
  setup(e, { expose: i }) {
1429
- const u = A(), s = _(), f = Ge + "_Plugin", l = (s.isPluginActive ? f : Ge).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
1461
+ const d = A(), s = _(), f = Ge + "_Plugin", l = (s.isPluginActive ? f : Ge).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
1430
1462
  l,
1431
1463
  s.pluginPackageName || ""
1432
1464
  );
1433
1465
  return i({
1434
1466
  getNativeNode: () => {
1435
- var a, c;
1436
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
1467
+ var a, u;
1468
+ return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
1437
1469
  }
1438
- }), (a, c) => (S(), $(D(r), B({
1470
+ }), (a, u) => (P(), $(D(r), B({
1439
1471
  ref_key: "nativeRef",
1440
- ref: u,
1472
+ ref: d,
1441
1473
  checked: e.checked,
1442
1474
  disabled: e.disabled,
1443
1475
  title: e.title,
@@ -1450,7 +1482,7 @@ const Be = /* @__PURE__ */ ve(yt, [["render", ht], ["__scopeId", "data-v-cf6a4ea
1450
1482
  titleTextSize: e.titleTextSize,
1451
1483
  subtitleTextSize: e.subtitleTextSize,
1452
1484
  stateTextSize: e.stateTextSize,
1453
- onOnCheckedChange: c[0] || (c[0] = (d) => a.$emit("onCheckedChange", d.nativeEvent))
1485
+ onOnCheckedChange: u[0] || (u[0] = (g) => a.$emit("onCheckedChange", g.nativeEvent))
1454
1486
  }, a.$attrs), {
1455
1487
  default: R(() => [
1456
1488
  F(a.$slots, "default")
@@ -1470,8 +1502,8 @@ const Ct = {
1470
1502
  install: (e) => {
1471
1503
  if (!globalThis.__QtNaSwitcher_registered)
1472
1504
  if (ce) {
1473
- const i = (u, s) => {
1474
- ce(u, {
1505
+ const i = (d, s) => {
1506
+ ce(d, {
1475
1507
  component: {
1476
1508
  name: s ? "QtNaSwitcher_Plugin" : "QtNaSwitcher",
1477
1509
  processEventData(f, v) {
@@ -1535,7 +1567,7 @@ const Ct = {
1535
1567
  }
1536
1568
  },
1537
1569
  emits: ["update:modelValue", "change"],
1538
- setup(e, { emit: i, attrs: u }) {
1570
+ setup(e, { emit: i, attrs: d }) {
1539
1571
  const s = A(e.modelValue);
1540
1572
  ee(() => e.modelValue, (r) => {
1541
1573
  s.value = r;
@@ -1544,7 +1576,7 @@ const Ct = {
1544
1576
  const a = r.checked;
1545
1577
  s.value = a, i("update:modelValue", a), i("change", a);
1546
1578
  }, v = W(() => typeof e.width == "number" ? `${e.width}px` : e.width), l = W(() => {
1547
- const r = u.style || {}, a = e.subtitle ? (typeof e.height == "number" ? e.height : parseInt(e.height)) + 30 : e.height;
1579
+ const r = d.style || {}, a = e.subtitle ? (typeof e.height == "number" ? e.height : parseInt(e.height)) + 30 : e.height;
1548
1580
  return {
1549
1581
  width: v.value,
1550
1582
  height: typeof a == "number" ? `${a}px` : a,
@@ -1558,9 +1590,9 @@ const Ct = {
1558
1590
  };
1559
1591
  }
1560
1592
  });
1561
- function It(e, i, u, s, f, v) {
1593
+ function It(e, i, d, s, f, v) {
1562
1594
  const l = ge("qt-na-switcher");
1563
- return S(), $(l, {
1595
+ return P(), $(l, {
1564
1596
  class: "na-setting-switch",
1565
1597
  style: fe(e.mergedStyle),
1566
1598
  title: e.title,
@@ -1594,19 +1626,19 @@ const qe = /* @__PURE__ */ ve(kt, [["render", It]]), Nt = {
1594
1626
  },
1595
1627
  emits: ["onInputClick", "onChange"],
1596
1628
  setup(e, { expose: i }) {
1597
- const u = A(), s = _(), f = Qe + "_Plugin", l = (s.isPluginActive ? f : Qe).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
1629
+ const d = A(), s = _(), f = Qe + "_Plugin", l = (s.isPluginActive ? f : Qe).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
1598
1630
  l,
1599
1631
  s.pluginPackageName || "com.quicktvui.plugin.extraui",
1600
1632
  "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
1601
1633
  );
1602
1634
  return i({
1603
1635
  getNativeNode: () => {
1604
- var a, c;
1605
- return ((c = (a = u.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : c.call(a)) || u.value;
1636
+ var a, u;
1637
+ return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
1606
1638
  }
1607
- }), (a, c) => (S(), $(D(r), B({
1639
+ }), (a, u) => (P(), $(D(r), B({
1608
1640
  ref_key: "nativeRef",
1609
- ref: u,
1641
+ ref: d,
1610
1642
  text: e.text,
1611
1643
  placeholder: e.placeholder,
1612
1644
  type: e.type,
@@ -1616,8 +1648,8 @@ const qe = /* @__PURE__ */ ve(kt, [["render", It]]), Nt = {
1616
1648
  cursorVisible: e.cursorVisible,
1617
1649
  useSystemKeyboard: e.useSystemKeyboard,
1618
1650
  trailingIcon: e.trailingIcon,
1619
- onOnInputClick: c[0] || (c[0] = (d) => a.$emit("onInputClick", d.nativeEvent)),
1620
- onOnChange: c[1] || (c[1] = (d) => a.$emit("onChange", d.nativeEvent))
1651
+ onOnInputClick: u[0] || (u[0] = (g) => a.$emit("onInputClick", g.nativeEvent)),
1652
+ onOnChange: u[1] || (u[1] = (g) => a.$emit("onChange", g.nativeEvent))
1621
1653
  }, a.$attrs), {
1622
1654
  default: R(() => [
1623
1655
  F(a.$slots, "default")
@@ -1632,17 +1664,17 @@ const qe = /* @__PURE__ */ ve(kt, [["render", It]]), Nt = {
1632
1664
  },
1633
1665
  emits: ["onInputClick", "onChange"],
1634
1666
  setup(e, { emit: i }) {
1635
- const u = i, s = e, f = W(() => {
1667
+ const d = i, s = e, f = W(() => {
1636
1668
  let r = 60;
1637
1669
  return s.inputSize === "large" ? r = 70 : s.inputSize === "small" && (r = 50), {
1638
1670
  height: `${r}px`
1639
1671
  };
1640
1672
  }), v = (r) => {
1641
- u("onInputClick", r);
1673
+ d("onInputClick", r);
1642
1674
  }, l = (r) => {
1643
- u("onChange", r);
1675
+ d("onChange", r);
1644
1676
  };
1645
- return (r, a) => (S(), $(Tt, B(r.$attrs, {
1677
+ return (r, a) => (P(), $(Tt, B(r.$attrs, {
1646
1678
  style: f.value,
1647
1679
  inputSize: e.inputSize,
1648
1680
  onOnInputClick: v,
@@ -1662,12 +1694,12 @@ try {
1662
1694
  ue = e.registerElement || ((je = e.default) == null ? void 0 : je.registerElement);
1663
1695
  } catch {
1664
1696
  }
1665
- const St = {
1697
+ const Pt = {
1666
1698
  install: (e) => {
1667
1699
  if (!globalThis.__QtNaInputView_registered)
1668
1700
  if (ue) {
1669
- const i = (u, s) => {
1670
- ue(u, {
1701
+ const i = (d, s) => {
1702
+ ue(d, {
1671
1703
  component: {
1672
1704
  name: s ? "QtNaInputView_Plugin" : "QtNaInputView",
1673
1705
  processEventData(f, v) {
@@ -1682,11 +1714,11 @@ const St = {
1682
1714
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
1683
1715
  e.component("NaInputView", Re), e.component("qt-na-input-view", Re);
1684
1716
  }
1685
- }, Pt = {
1717
+ }, St = {
1686
1718
  // 如果设置为 true,则全局跳过所有组件的原生插件安装检查,直接渲染
1687
1719
  skipPluginCheck: !1
1688
1720
  }, Y = /* @__PURE__ */ new Set();
1689
- function L(e, i, u) {
1721
+ function L(e, i, d) {
1690
1722
  return w({
1691
1723
  name: `${e}AsyncWrapper`,
1692
1724
  inheritAttrs: !1,
@@ -1698,21 +1730,21 @@ function L(e, i, u) {
1698
1730
  }
1699
1731
  },
1700
1732
  setup(s, { slots: f, attrs: v, expose: l }) {
1701
- const r = A("loading"), a = A(""), c = A(), d = globalThis.__VUE_INSTANCE__;
1733
+ const r = A("loading"), a = A(""), u = A(), g = globalThis.__VUE_INSTANCE__;
1702
1734
  l({
1703
1735
  getNativeNode: () => {
1704
- let p = c.value;
1705
- return !p && d && d.vnode && d.vnode.el && (p = d.vnode.el, p.childNodes && p.childNodes.length > 0 && (p = p.childNodes[0])), p;
1736
+ let p = u.value;
1737
+ return !p && g && g.vnode && g.vnode.el && (p = g.vnode.el, p.childNodes && p.childNodes.length > 0 && (p = p.childNodes[0])), p;
1706
1738
  },
1707
- nativeRef: c
1739
+ nativeRef: u
1708
1740
  });
1709
1741
  let z = null, q = null;
1710
1742
  try {
1711
- z = Ze(), q = at();
1743
+ z = Je(), q = at();
1712
1744
  } catch (p) {
1713
1745
  console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。", p);
1714
1746
  }
1715
- const Z = async () => {
1747
+ const J = async () => {
1716
1748
  if (!z || typeof z.isComponentRegistered != "function")
1717
1749
  return console.log("[withAsyncPlugin] es.isComponentRegistered 不可用"), !1;
1718
1750
  try {
@@ -1722,9 +1754,9 @@ function L(e, i, u) {
1722
1754
  try {
1723
1755
  const I = await N.callNativeWithPromise("ExtendModule", "getCoreSDKInfo");
1724
1756
  if (I && I.core_version) {
1725
- const P = I.core_version;
1726
- console.log(`[withAsyncPlugin] 当前引擎核心版本: ${P}`);
1727
- const E = P.split(".").map((G) => parseInt(G, 10));
1757
+ const S = I.core_version;
1758
+ console.log(`[withAsyncPlugin] 当前引擎核心版本: ${S}`);
1759
+ const E = S.split(".").map((G) => parseInt(G, 10));
1728
1760
  if (E.length >= 3 && !isNaN(E[0]) && !isNaN(E[1]) && !isNaN(E[2]))
1729
1761
  if (E[0] * 1e6 + E[1] * 1e3 + E[2] >= 1011205) {
1730
1762
  console.log(`[withAsyncPlugin] 引擎 >= 1.11.205,使用 ExtendModule 检查 Controller: ${e}`);
@@ -1737,9 +1769,9 @@ function L(e, i, u) {
1737
1769
  if (console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${O}, ${M}]`), O === !0 || M === !0)
1738
1770
  return !0;
1739
1771
  } else
1740
- console.log(`[withAsyncPlugin] 引擎版本 ${P} < 1.11.205,跳过 ExtendModule 检查`);
1772
+ console.log(`[withAsyncPlugin] 引擎版本 ${S} < 1.11.205,跳过 ExtendModule 检查`);
1741
1773
  else
1742
- console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${P}`);
1774
+ console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${S}`);
1743
1775
  }
1744
1776
  } catch (I) {
1745
1777
  console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:", I);
@@ -1749,7 +1781,7 @@ function L(e, i, u) {
1749
1781
  return console.warn("[withAsyncPlugin] 检查组件注册状态异常:", p), !1;
1750
1782
  }
1751
1783
  }, U = async () => {
1752
- if (Pt.skipPluginCheck || s.skipPluginCheck) {
1784
+ if (St.skipPluginCheck || s.skipPluginCheck) {
1753
1785
  console.log(`[withAsyncPlugin] 跳过 ${e} 插件检查 (skipPluginCheck = true)`), r.value = "ready";
1754
1786
  return;
1755
1787
  }
@@ -1757,7 +1789,7 @@ function L(e, i, u) {
1757
1789
  r.value = "ready";
1758
1790
  return;
1759
1791
  }
1760
- const p = await Z();
1792
+ const p = await J();
1761
1793
  if (console.log(`[withAsyncPlugin] 拦截检查 - ${e} 是否已注册:`, p), p || Y.has(i)) {
1762
1794
  r.value = "ready", Y.add(i), console.log("[withAsyncPlugin] 组件已注册,跳过安装流程");
1763
1795
  return;
@@ -1768,24 +1800,24 @@ function L(e, i, u) {
1768
1800
  }
1769
1801
  console.log(`[withAsyncPlugin] 开始动态安装插件: ${i}`);
1770
1802
  try {
1771
- await new Promise((I, P) => {
1803
+ await new Promise((I, S) => {
1772
1804
  let E;
1773
1805
  const G = {
1774
1806
  onPluginInstallSuccess(T, O, M) {
1775
- T === i && (clearTimeout(E), q.removeListener(G), console.log(`[withAsyncPlugin] 安装成功 pkg=${T} 状态码=${O}`), O == 1003 || O == 1001 ? (u ? (console.log(`[withAsyncPlugin] 触发反射初始化: ${u}`), N.callNative("EsNativeModule", "callReflect", {
1807
+ T === i && (clearTimeout(E), q.removeListener(G), console.log(`[withAsyncPlugin] 安装成功 pkg=${T} 状态码=${O}`), O == 1003 || O == 1001 ? (d ? (console.log(`[withAsyncPlugin] 触发反射初始化: ${d}`), N.callNative("EsNativeModule", "callReflect", {
1776
1808
  entry: {
1777
- from: u,
1809
+ from: d,
1778
1810
  method: "setup"
1779
1811
  }
1780
- })) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"), I()) : P(new Error(`安装失败 pkg=${T} status=${O} msg=${M}`)));
1812
+ })) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"), I()) : S(new Error(`安装失败 pkg=${T} status=${O} msg=${M}`)));
1781
1813
  },
1782
1814
  onPluginInstallError(T, O, M) {
1783
- T === i && (clearTimeout(E), q.removeListener(G), P(new Error(`安装失败 pkg=${T} status=${O} msg=${M}`)));
1815
+ T === i && (clearTimeout(E), q.removeListener(G), S(new Error(`安装失败 pkg=${T} status=${O} msg=${M}`)));
1784
1816
  }
1785
1817
  };
1786
1818
  q.addListener({ pkg: i }, G), E = setTimeout(() => {
1787
- q.removeListener(G), P(new Error(`插件安装超时: ${i}`));
1788
- }, 8e3), typeof q.installPlugin == "function" ? q.installPlugin({ pkg: i }) : typeof q.install == "function" ? q.install(i) : P(new Error("当前运行时不支持 install / installPlugin"));
1819
+ q.removeListener(G), S(new Error(`插件安装超时: ${i}`));
1820
+ }, 8e3), typeof q.installPlugin == "function" ? q.installPlugin({ pkg: i }) : typeof q.install == "function" ? q.install(i) : S(new Error("当前运行时不支持 install / installPlugin"));
1789
1821
  }), await tt(), Y.add(i), r.value = "ready";
1790
1822
  } catch (I) {
1791
1823
  console.error("[withAsyncPlugin] 插件加载失败:", I), a.value = (I == null ? void 0 : I.message) || String(I), r.value = "error";
@@ -1802,7 +1834,7 @@ function L(e, i, u) {
1802
1834
  ...v.style || {}
1803
1835
  };
1804
1836
  v.width !== void 0 && !p.width && (p.width = typeof v.width == "number" ? `${v.width}px` : v.width), v.height !== void 0 && !p.height && (p.height = typeof v.height == "number" ? `${v.height}px` : v.height);
1805
- const I = v.class ? `qt-plugin-container ${v.class}` : "qt-plugin-container", P = {
1837
+ const I = v.class ? `qt-plugin-container ${v.class}` : "qt-plugin-container", S = {
1806
1838
  class: I,
1807
1839
  style: p,
1808
1840
  // 默认关闭外层 div 的裁剪,防止内部组件 focusScale 时被切
@@ -1811,11 +1843,11 @@ function L(e, i, u) {
1811
1843
  clipToPadding: !1
1812
1844
  };
1813
1845
  if (r.value === "loading")
1814
- return H("div", P, [
1846
+ return H("div", S, [
1815
1847
  H("div", { style: { color: "white", fontSize: "30px" } }, "插件加载中...")
1816
1848
  ]);
1817
1849
  if (r.value === "error")
1818
- return H("div", P, [
1850
+ return H("div", S, [
1819
1851
  H("div", { style: { color: "white", fontSize: "30px", backgroundColor: "rgba(255,0,0,0.5)" } }, `插件加载失败: ${a.value}`)
1820
1852
  ]);
1821
1853
  const E = {}, G = {};
@@ -1836,7 +1868,7 @@ function L(e, i, u) {
1836
1868
  style: p,
1837
1869
  // 把外层 style 传给内部
1838
1870
  ref: (x) => {
1839
- c.value = x;
1871
+ u.value = x;
1840
1872
  }
1841
1873
  }, O = T.tabsData || "", M = T.actionPayload || "";
1842
1874
  return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:", Object.keys(T), "tabsData.length=", O.length, "actionPayload.length=", M.length), H(e, T, f.default ? f.default() : []);
@@ -1844,14 +1876,14 @@ function L(e, i, u) {
1844
1876
  }
1845
1877
  });
1846
1878
  }
1847
- const Je = Symbol("AddonEnvContext"), Xe = {
1879
+ const Ze = Symbol("AddonEnvContext"), Xe = {
1848
1880
  isPluginActive: !1,
1849
1881
  nameSuffix: "",
1850
1882
  pluginPackageName: "com.quicktvui.plugin.glintui",
1851
1883
  builtInVersions: {}
1852
1884
  };
1853
1885
  async function Ut(e = "com.quicktvui.plugin.glintui", i = "_Plugin") {
1854
- const u = Ze();
1886
+ const d = Je();
1855
1887
  let s = {};
1856
1888
  try {
1857
1889
  const a = await N.callNativeModule("AddonEnvModule", "getBuiltInVersions", []);
@@ -1859,7 +1891,7 @@ async function Ut(e = "com.quicktvui.plugin.glintui", i = "_Plugin") {
1859
1891
  } catch (a) {
1860
1892
  console.warn("[AddonProvider] Failed to fetch built-in versions from AddonEnvModule", a);
1861
1893
  }
1862
- const f = `QtGridTabs${i}`, v = u.isComponentRegistered(f), l = v instanceof Promise ? await v : v, r = {
1894
+ const f = `QtGridTabs${i}`, v = d.isComponentRegistered(f), l = v instanceof Promise ? await v : v, r = {
1863
1895
  isPluginActive: l,
1864
1896
  nameSuffix: l ? i : "",
1865
1897
  // 如果使用了热更插件,包名加上 .ext 后缀(与 Gradle 打包脚本对齐)
@@ -1870,11 +1902,11 @@ async function Ut(e = "com.quicktvui.plugin.glintui", i = "_Plugin") {
1870
1902
  }
1871
1903
  let de = A(Xe);
1872
1904
  function Vt(e) {
1873
- de.value = e, ot(Je, de);
1905
+ de.value = e, ot(Ze, de);
1874
1906
  }
1875
1907
  function _() {
1876
1908
  var e;
1877
- return ((e = nt(Je, de)) == null ? void 0 : e.value) || Xe;
1909
+ return ((e = nt(Ze, de)) == null ? void 0 : e.value) || Xe;
1878
1910
  }
1879
1911
  async function Et(e) {
1880
1912
  console.log("[AddonProvider] Sending GridTabs global config to Native:", e);
@@ -1896,7 +1928,7 @@ async function xt(e) {
1896
1928
  }
1897
1929
  async function Wt(e) {
1898
1930
  console.log("[AddonProvider] Initializing global theme across all modules:", e);
1899
- const i = await xt(e), u = await Et({
1931
+ const i = await xt(e), d = await Et({
1900
1932
  themeConfig: {
1901
1933
  placeholderColor: e.placeholderColor,
1902
1934
  glowColor: e.glowColor || e.focusBackgroundColor,
@@ -1915,15 +1947,15 @@ async function Wt(e) {
1915
1947
  // 更多属性映射根据后续 Glint/GridTabs 支持情况添加
1916
1948
  }
1917
1949
  });
1918
- return i && u;
1950
+ return i && d;
1919
1951
  }
1920
1952
  const jt = {
1921
1953
  install: (e) => {
1922
- e.use(it), e.use(lt), e.use(rt), e.use(st), e.use(ct), e.use(ut), e.use(gt), e.use(ft), e.use(bt), e.use(pt), e.use(Ct), e.use(Nt), e.use(St);
1954
+ e.use(it), e.use(lt), e.use(rt), e.use(st), e.use(ct), e.use(ut), e.use(gt), e.use(ft), e.use(bt), e.use(pt), e.use(Ct), e.use(Nt), e.use(Pt);
1923
1955
  }
1924
1956
  };
1925
1957
  export {
1926
- Je as ADDON_ENV_CONTEXT_KEY,
1958
+ Ze as ADDON_ENV_CONTEXT_KEY,
1927
1959
  X as GridTabs,
1928
1960
  it as GridTabsPlugin,
1929
1961
  Te as HsvBackground,
@@ -1937,7 +1969,7 @@ export {
1937
1969
  pt as NaCheckboxGroupPlugin,
1938
1970
  ft as NaCheckboxPlugin,
1939
1971
  Re as NaInputView,
1940
- St as NaInputViewPlugin,
1972
+ Pt as NaInputViewPlugin,
1941
1973
  $e as NaRadioGroup,
1942
1974
  bt as NaRadioGroupPlugin,
1943
1975
  qe as NaSettingSwitch,
@@ -1949,8 +1981,8 @@ export {
1949
1981
  Ce as PortalPool,
1950
1982
  rt as PortalPoolPlugin,
1951
1983
  jt as QuickTVUINAddons,
1952
- Pt as QuickTVUINAddonsConfig,
1953
- Pe as SvgImage,
1984
+ St as QuickTVUINAddonsConfig,
1985
+ Se as SvgImage,
1954
1986
  ut as SvgImagePlugin,
1955
1987
  jt as default,
1956
1988
  Ut as initAddonEnv,