@quicktvui/naddons 1.0.0-rc.5 → 1.0.0-rc.6

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 $, ref as A, openBlock as x, createBlock as O, unref as M, mergeProps as F, withCtx as Q, renderSlot as D, shallowRef as ve, watch as ee, computed as j, resolveComponent as de, createElementBlock as Z, normalizeStyle as fe, Fragment as _e, renderList as qe, onMounted as Me, h as H, nextTick as ze, provide as Le, inject as Ue } from "vue";
1
+ import { defineComponent as $, ref as A, openBlock as x, createBlock as O, unref as M, mergeProps as F, withCtx as Q, renderSlot as D, shallowRef as ve, watch as ee, computed as W, useAttrs as Me, resolveComponent as de, createElementBlock as Z, normalizeStyle as fe, Fragment as _e, renderList as qe, onMounted as ze, h as H, nextTick as Le, provide as Ue, inject as Ve } from "vue";
2
2
  import { Native as I } from "@extscreen/es3-vue";
3
- import { useES as Fe, useESPlugin as Ve } from "@extscreen/es3-core";
3
+ import { useES as Fe, useESPlugin as je } from "@extscreen/es3-core";
4
4
  const We = {
5
5
  inheritAttrs: !1
6
6
  }, X = /* @__PURE__ */ $({
@@ -14,7 +14,7 @@ const We = {
14
14
  },
15
15
  emits: ["onTabSelected", "onTabClick", "onTabNeedsData", "onLoadMore", "onScroll", "onScrollStateChanged", "onItemPresence", "onTabFocused", "onItemClick", "onItemLongClick", "onItemFocused", "onProtocolMismatch"],
16
16
  setup(e, { expose: a }) {
17
- const d = A(), u = L(), v = "QtGridTabs", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
17
+ const d = A(), u = L(), g = "QtGridTabs", v = g + "_Plugin", s = (u.isPluginActive ? v : g).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
18
18
  s,
19
19
  u.pluginPackageName || "com.quicktvui.plugin.glintui"
20
20
  );
@@ -56,10 +56,10 @@ const We = {
56
56
  }), (l, i) => (x(), O(M(h), F({
57
57
  ref_key: "nativeRef",
58
58
  ref: d,
59
- protocolVersion: e.protocolVersion,
60
- pageSpec: e.pageSpec,
61
- tabsData: e.tabsData,
62
- actionPayload: e.actionPayload,
59
+ protocolVersion: e.protocolVersion || "",
60
+ pageSpec: e.pageSpec || "",
61
+ tabsData: e.tabsData || "",
62
+ actionPayload: e.actionPayload || "",
63
63
  onOnTabSelected: i[0] || (i[0] = (f) => l.$emit("onTabSelected", f.nativeEvent)),
64
64
  onOnTabClick: i[1] || (i[1] = (f) => l.$emit("onTabClick", f.nativeEvent)),
65
65
  onOnTabNeedsData: i[2] || (i[2] = (f) => l.$emit("onTabNeedsData", f.nativeEvent)),
@@ -87,7 +87,7 @@ try {
87
87
  te = e.registerElement || ((Se = e.default) == null ? void 0 : Se.registerElement);
88
88
  } catch {
89
89
  }
90
- const je = {
90
+ const Ke = {
91
91
  install: (e) => {
92
92
  if (!globalThis.__QtGridTabs_registered)
93
93
  if (te) {
@@ -95,8 +95,8 @@ const je = {
95
95
  te(d, {
96
96
  component: {
97
97
  name: u ? "QtGridTabs_Plugin" : "QtGridTabs",
98
- processEventData(v, g) {
99
- const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
98
+ processEventData(g, v) {
99
+ const c = g.handler || g, s = v || (c == null ? void 0 : c.nativeParams) || {};
100
100
  return c && (c.nativeEvent = s), c;
101
101
  }
102
102
  }
@@ -108,8 +108,8 @@ const je = {
108
108
  e.component("GridTabs", X), e.component("qt-grid-tabs", X), e.component("gt-tabs", X);
109
109
  }
110
110
  };
111
- function Rt(e, a) {
112
- const d = A(""), u = a ? JSON.parse(JSON.stringify(a)) : {}, v = ve([]), g = ve([]);
111
+ function Qt(e, a) {
112
+ const d = A(""), u = a ? JSON.parse(JSON.stringify(a)) : {}, g = ve([]), v = ve([]);
113
113
  let c = !1, s = !1;
114
114
  const h = "__virtual_single_tab__";
115
115
  let l = "", i = !1;
@@ -138,8 +138,8 @@ function Rt(e, a) {
138
138
  return;
139
139
  U.clear();
140
140
  const n = o[0].hasOwnProperty("tabId") || o[0].hasOwnProperty("items") && Array.isArray(o[0].items);
141
- c = 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((r, m) => w(r, `items.value[${m}]`)) : o.forEach((r, m) => {
142
- _(r, `tabs.value[${m}]`), r.items && Array.isArray(r.items) && r.items.forEach((y, b) => w(y, `tabs.value[${m}].items[${b}]`));
141
+ c = 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((r, b) => w(r, `items.value[${b}]`)) : o.forEach((r, b) => {
142
+ _(r, `tabs.value[${b}]`), r.items && Array.isArray(r.items) && r.items.forEach((y, m) => w(y, `tabs.value[${b}].items[${m}]`));
143
143
  }), s = !0, C();
144
144
  }, U = /* @__PURE__ */ new Set(), C = (o = "unknown") => {
145
145
  if (!s) {
@@ -191,9 +191,9 @@ function Rt(e, a) {
191
191
  tabId: h,
192
192
  title: "Virtual Tab",
193
193
  hidden: !0,
194
- items: g.value
194
+ items: v.value
195
195
  }
196
- ]) : n = v.value;
196
+ ]) : n = g.value;
197
197
  const r = JSON.stringify({
198
198
  page_spec: t,
199
199
  tabs: n
@@ -219,23 +219,23 @@ function Rt(e, a) {
219
219
  if (!o || typeof o != "object" || o.__isGridTabsProxy)
220
220
  return o;
221
221
  o.content && typeof o.content == "object" && !o.content.__isGridTabsProxy && (o.content = new Proxy(o.content, {
222
- set(n, r, m, y) {
223
- const b = Reflect.set(n, r, m, y);
222
+ set(n, r, b, y) {
223
+ const m = Reflect.set(n, r, b, y);
224
224
  return o.id && s && p({
225
225
  op: "UPDATE_ITEM",
226
226
  itemId: o.id,
227
227
  payload: o
228
- }), b;
228
+ }), m;
229
229
  }
230
230
  }), 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 }));
231
231
  const t = new Proxy(o, {
232
- set(n, r, m, y) {
233
- const b = Reflect.set(n, r, m, y);
232
+ set(n, r, b, y) {
233
+ const m = Reflect.set(n, r, b, y);
234
234
  return n.id && s && !i && p({
235
235
  op: "UPDATE_ITEM",
236
236
  itemId: n.id,
237
237
  payload: n
238
- }), b;
238
+ }), m;
239
239
  }
240
240
  });
241
241
  return Object.defineProperty(t, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(t, "__v_skip", { value: !0, enumerable: !1 }), t;
@@ -243,74 +243,74 @@ function Rt(e, a) {
243
243
  for (let n = 0; n < o.length; n++)
244
244
  o[n] = T(o[n]);
245
245
  return new Proxy(o, {
246
- get(n, r, m) {
246
+ get(n, r, b) {
247
247
  return r === "push" ? (...y) => {
248
248
  y.forEach((q, K) => w(q, `push(${K})`)), s || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 push()。请先对 items.value 或 tabs.value 进行全量赋值!");
249
- const b = y.map((q) => T(q)), k = Array.prototype.push.apply(n, b);
249
+ const m = y.map((q) => T(q)), k = Array.prototype.push.apply(n, m);
250
250
  return i || p({
251
251
  op: "APPEND_SUB_ITEMS",
252
252
  itemId: t,
253
- payload: { subItems: b }
253
+ payload: { subItems: m }
254
254
  }), k;
255
255
  } : r === "unshift" ? (...y) => {
256
256
  y.forEach((q, K) => w(q, `unshift(${K})`)), s || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 unshift()。请先对 items.value 或 tabs.value 进行全量赋值!");
257
- const b = y.map((q) => T(q)), k = Array.prototype.unshift.apply(n, b);
258
- return s && b.length > 0 && !i && p({
257
+ const m = y.map((q) => T(q)), k = Array.prototype.unshift.apply(n, m);
258
+ return s && m.length > 0 && !i && p({
259
259
  op: "PREPEND_SUB_ITEMS",
260
260
  itemId: t,
261
- payload: { subItems: b }
261
+ payload: { subItems: m }
262
262
  }), k;
263
263
  } : r === "splice" ? (...y) => {
264
- const b = y.length >= 2 && y[0] === 0 && y[1] === n.length, k = Array.prototype.splice.apply(n, y);
265
- return s && b && t !== h ? i || p({
264
+ const m = y.length >= 2 && y[0] === 0 && y[1] === n.length, k = Array.prototype.splice.apply(n, y);
265
+ return s && m && t !== h ? i || p({
266
266
  op: "CLEAR_SUB_ITEMS",
267
267
  itemId: t
268
268
  }) : s && (i || C("items array spliced")), k;
269
- } : Reflect.get(n, r, m);
269
+ } : Reflect.get(n, r, b);
270
270
  },
271
- set(n, r, m, y) {
271
+ set(n, r, b, y) {
272
272
  if (r !== "length" && !isNaN(Number(r))) {
273
- s || console.error(`[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时直接修改了索引 [${String(r)}]。请先对 items.value 或 tabs.value 进行全量赋值!`), w(m, `索引赋值 [${String(r)}]`);
274
- const b = T(m), k = Reflect.set(n, r, b, y);
275
- return b && b.id && !i && p({
273
+ s || console.error(`[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时直接修改了索引 [${String(r)}]。请先对 items.value 或 tabs.value 进行全量赋值!`), w(b, `索引赋值 [${String(r)}]`);
274
+ const m = T(b), k = Reflect.set(n, r, m, y);
275
+ return m && m.id && !i && p({
276
276
  op: "UPDATE_ITEM",
277
- itemId: b.id,
278
- payload: b
277
+ itemId: m.id,
278
+ payload: m
279
279
  }), k;
280
280
  }
281
- return Reflect.set(n, r, m, y);
281
+ return Reflect.set(n, r, b, y);
282
282
  }
283
283
  });
284
284
  }, S = (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, {
285
- set(t, n, r, m) {
285
+ set(t, n, r, b) {
286
286
  if (n === "items") {
287
- let b = r;
288
- return Array.isArray(r) && !r.__isGridTabsProxy && (b = P(r, t.tabId), Object.defineProperty(b, "__isGridTabsProxy", { value: !0, enumerable: !1 })), Reflect.set(t, n, b, m);
287
+ let m = r;
288
+ return Array.isArray(r) && !r.__isGridTabsProxy && (m = P(r, t.tabId), Object.defineProperty(m, "__isGridTabsProxy", { value: !0, enumerable: !1 })), Reflect.set(t, n, m, b);
289
289
  } else if (n === "loadState") {
290
- const b = Reflect.set(t, n, r, m);
290
+ const m = Reflect.set(t, n, r, b);
291
291
  return s && t.tabId && !i && p({
292
292
  op: "UPDATE_TAB_STATE",
293
293
  itemId: t.tabId,
294
294
  payload: { loadState: r }
295
- }), b;
295
+ }), m;
296
296
  }
297
- return Reflect.set(t, n, r, m);
297
+ return Reflect.set(t, n, r, b);
298
298
  }
299
299
  })), B = (o) => {
300
300
  const t = o.map((n) => S(n));
301
301
  return new Proxy(t, {
302
- set(n, r, m, y) {
302
+ set(n, r, b, y) {
303
303
  if (r !== "length" && !isNaN(Number(r))) {
304
- let b = m;
305
- m.__isGridTabsProxy || (b = S(m), Object.defineProperty(b, "__isGridTabsProxy", { value: !0, enumerable: !1 }));
306
- const k = Reflect.set(n, r, b, y);
304
+ let m = b;
305
+ b.__isGridTabsProxy || (m = S(b), Object.defineProperty(m, "__isGridTabsProxy", { value: !0, enumerable: !1 }));
306
+ const k = Reflect.set(n, r, m, y);
307
307
  return C(), k;
308
308
  }
309
- return Reflect.set(n, r, m, y);
309
+ return Reflect.set(n, r, b, y);
310
310
  }
311
311
  });
312
312
  };
313
- ee(v, (o, t) => {
313
+ ee(g, (o, t) => {
314
314
  if (console.log("[useGridTabs] watch(tabs) triggered:", { newTabs: o, isInitialized: s }), !o || o.length === 0) {
315
315
  d.value = "", l = "", s = !1;
316
316
  return;
@@ -320,9 +320,9 @@ function Rt(e, a) {
320
320
  else {
321
321
  console.log("[useGridTabs] newTabs is NOT a proxy, performing full deduceModeAndInitialize & wrapping");
322
322
  const n = B(o);
323
- Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), J(n, "2d"), v.value = n;
323
+ Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), J(n, "2d"), g.value = n;
324
324
  }
325
- }, { flush: "sync", deep: !1 }), ee(g, (o, t) => {
325
+ }, { flush: "sync", deep: !1 }), ee(v, (o, t) => {
326
326
  if (console.log("[useGridTabs] watch(items) triggered:", { newItems: o, isInitialized: s }), !o || o.length === 0) {
327
327
  d.value = "", l = "", s = !1;
328
328
  return;
@@ -332,7 +332,7 @@ function Rt(e, a) {
332
332
  else {
333
333
  console.log("[useGridTabs] newItems is NOT a proxy, performing full deduceModeAndInitialize & wrapping");
334
334
  const n = P(o, h);
335
- Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), J(n, "1d"), g.value = n;
335
+ Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), J(n, "1d"), v.value = n;
336
336
  }
337
337
  }, { flush: "sync", deep: !1 });
338
338
  const N = {}, G = () => {
@@ -344,28 +344,28 @@ function Rt(e, a) {
344
344
  d.value = "", s = !1;
345
345
  return;
346
346
  }
347
- o[0].hasOwnProperty("tabId") || o[0].hasOwnProperty("items") && Array.isArray(o[0].items) ? v.value = o : g.value = o;
347
+ o[0].hasOwnProperty("tabId") || o[0].hasOwnProperty("items") && Array.isArray(o[0].items) ? g.value = o : v.value = o;
348
348
  }, E = (o) => {
349
349
  f.value = o;
350
- }, V = j(() => ({
350
+ }, V = W(() => ({
351
351
  tabsData: d.value,
352
352
  // 不再绑定 actionPayload 属性,完全走命令式 API,防止触发无意义的 Vue 节点更新
353
353
  onTabNeedsData: async (...o) => {
354
354
  let t = o[0];
355
355
  if (t && t.nativeEvent && (t = t.nativeEvent), !f.value.onTabNeedsData)
356
356
  return;
357
- const { tabId: n, index: r, reason: m } = t;
357
+ const { tabId: n, index: r, reason: b } = t;
358
358
  if (U.has(n)) {
359
359
  console.log(`[useGridTabs] onTabNeedsData SKIP: tabId=${n} 已经发起过请求,防止死循环`);
360
360
  return;
361
361
  }
362
362
  U.add(n);
363
363
  try {
364
- const y = await f.value.onTabNeedsData(n, r, m);
364
+ const y = await f.value.onTabNeedsData(n, r, b);
365
365
  if (y && Array.isArray(y))
366
366
  if (N[n] = 1, y.length > 0) {
367
- const b = v.value.find((k) => k.tabId === n);
368
- b && (b.items ? b.items.length > 0 && b.items.splice(0, b.items.length) : b.items = [], b.items.push(...y), b.loadState = "ready", p({
367
+ const m = g.value.find((k) => k.tabId === n);
368
+ m && (m.items ? m.items.length > 0 && m.items.splice(0, m.items.length) : m.items = [], m.items.push(...y), m.loadState = "ready", p({
369
369
  op: "UPDATE_TAB_STATE",
370
370
  itemId: n,
371
371
  payload: { loadState: "ready" }
@@ -383,19 +383,19 @@ function Rt(e, a) {
383
383
  const { tabId: n, itemId: r } = t, y = (N[n] || 1) + 1;
384
384
  console.log(`[useGridTabs] 拦截到底层 onLoadMore,强行接管页码: tabId=${n}, pageNo=${y}`);
385
385
  try {
386
- const b = await f.value.onLoadMore(n, y, r);
387
- if (b && Array.isArray(b))
388
- if (b.length > 0)
386
+ const m = await f.value.onLoadMore(n, y, r);
387
+ if (m && Array.isArray(m))
388
+ if (m.length > 0)
389
389
  if (N[n] = y, c)
390
- g.value.push(...b);
390
+ v.value.push(...m);
391
391
  else {
392
- const k = v.value.find((q) => q.tabId === n);
393
- k && k.items && k.items.push(...b);
392
+ const k = g.value.find((q) => q.tabId === n);
393
+ k && k.items && k.items.push(...m);
394
394
  }
395
395
  else
396
396
  console.warn(`[useGridTabs] ⚠️ 警告: onLoadMore(tabId="${n}", pageNo="${y}") 返回了空数组 []!`), console.warn('👉 如果这是你的最后一页数据,推荐在卡片列表中追加一个 type="no_more" 的 footer 卡片,而不是仅仅返回空。'), console.warn("👉 框架已忽略本次空数据追加,且不会自增页码。");
397
- } catch (b) {
398
- console.error("[useGridTabs] onLoadMore 业务层请求失败:", b);
397
+ } catch (m) {
398
+ console.error("[useGridTabs] onLoadMore 业务层请求失败:", m);
399
399
  }
400
400
  },
401
401
  onItemPresence: (...o) => {
@@ -405,8 +405,8 @@ function Rt(e, a) {
405
405
  let n = typeof t == "string" ? t : (t == null ? void 0 : t.nativeEvent) || t;
406
406
  n && typeof n.data == "string" && (n = n.data);
407
407
  const r = typeof n == "string" ? JSON.parse(n) : n;
408
- r && r.type === "VIEW_PRESENCE_BATCH" && Array.isArray(r.payload) ? r.payload.forEach((m) => {
409
- m.itemId && typeof m.itemId == "string" && m.itemId.startsWith("fallback_pos_") && console.warn(`[useGridTabs] ⚠️ 警告:检测到列表项曝光 (index=${m.index}),但未配置 itemId。请检查传入的 items 数组,务必为每个数据项指定唯一的 itemId,否则底层无法准确进行去重与曝光上报。`), f.value.onItemPresence(m);
408
+ r && r.type === "VIEW_PRESENCE_BATCH" && Array.isArray(r.payload) ? r.payload.forEach((b) => {
409
+ b.itemId && typeof b.itemId == "string" && b.itemId.startsWith("fallback_pos_") && console.warn(`[useGridTabs] ⚠️ 警告:检测到列表项曝光 (index=${b.index}),但未配置 itemId。请检查传入的 items 数组,务必为每个数据项指定唯一的 itemId,否则底层无法准确进行去重与曝光上报。`), f.value.onItemPresence(b);
410
410
  }) : f.value.onItemPresence(r);
411
411
  } catch (n) {
412
412
  console.error("[useGridTabs] Failed to parse onItemPresence event payload:", n), f.value.onItemPresence(t);
@@ -429,14 +429,14 @@ function Rt(e, a) {
429
429
  if (r && typeof r.clickPayload == "string")
430
430
  try {
431
431
  r.clickPayload = JSON.parse(r.clickPayload);
432
- } catch (m) {
433
- console.warn("Failed to parse clickPayload:", m);
432
+ } catch (b) {
433
+ console.warn("Failed to parse clickPayload:", b);
434
434
  }
435
435
  if (r && typeof r.focusPayload == "string")
436
436
  try {
437
437
  r.focusPayload = JSON.parse(r.focusPayload);
438
- } catch (m) {
439
- console.warn("Failed to parse focusPayload:", m);
438
+ } catch (b) {
439
+ console.warn("Failed to parse focusPayload:", b);
440
440
  }
441
441
  f.value.onItemClick(r);
442
442
  } catch (n) {
@@ -515,8 +515,8 @@ function Rt(e, a) {
515
515
  return {
516
516
  tabsDataStr: d,
517
517
  bindings: V,
518
- tabs: v,
519
- items: g,
518
+ tabs: g,
519
+ items: v,
520
520
  initData: R,
521
521
  setCallbacks: E,
522
522
  updateItem: (o, t) => {
@@ -527,12 +527,12 @@ function Rt(e, a) {
527
527
  p({ op: "UPDATE_ITEM", itemId: o, payload: t }), i = !0;
528
528
  try {
529
529
  if (c) {
530
- const n = g.value.find((r) => r.id === o);
530
+ const n = v.value.find((r) => r.id === o);
531
531
  n && Object.assign(n, t);
532
532
  } else
533
- for (const n of v.value)
533
+ for (const n of g.value)
534
534
  if (n.items) {
535
- const r = n.items.find((m) => m.id === o);
535
+ const r = n.items.find((b) => b.id === o);
536
536
  if (r) {
537
537
  Object.assign(r, t);
538
538
  break;
@@ -547,12 +547,12 @@ function Rt(e, a) {
547
547
  p({ op: "DELETE_ITEM", itemId: o, payload: { animated: t } }), i = !0;
548
548
  try {
549
549
  if (c) {
550
- const n = g.value.findIndex((r) => r.id === o);
551
- n !== -1 && g.value.splice(n, 1);
550
+ const n = v.value.findIndex((r) => r.id === o);
551
+ n !== -1 && v.value.splice(n, 1);
552
552
  } else
553
- for (const n of v.value)
553
+ for (const n of g.value)
554
554
  if (n.items) {
555
- const r = n.items.findIndex((m) => m.id === o);
555
+ const r = n.items.findIndex((b) => b.id === o);
556
556
  if (r !== -1) {
557
557
  n.items.splice(r, 1);
558
558
  break;
@@ -572,9 +572,9 @@ function Rt(e, a) {
572
572
  }), i = !0;
573
573
  try {
574
574
  if (c)
575
- g.value.unshift(...t);
575
+ v.value.unshift(...t);
576
576
  else {
577
- const n = v.value.find((r) => r.tabId === o);
577
+ const n = g.value.find((r) => r.tabId === o);
578
578
  n && n.items && n.items.unshift(...t);
579
579
  }
580
580
  } finally {
@@ -590,9 +590,9 @@ function Rt(e, a) {
590
590
  }), i = !0;
591
591
  try {
592
592
  if (c)
593
- g.value.splice(0, g.value.length);
593
+ v.value.splice(0, v.value.length);
594
594
  else {
595
- const t = v.value.find((n) => n.tabId === o);
595
+ const t = g.value.find((n) => n.tabId === o);
596
596
  t && t.items && t.items.splice(0, t.items.length);
597
597
  }
598
598
  } finally {
@@ -608,18 +608,18 @@ function Rt(e, a) {
608
608
  payload: { targetPosition: t, anchorItemId: n }
609
609
  }), i = !0;
610
610
  try {
611
- const r = (m) => {
612
- const y = m.findIndex((k) => k.id === o), b = m.findIndex((k) => k.id === n);
613
- if (y !== -1 && b !== -1) {
614
- const k = m.splice(y, 1)[0], q = m.findIndex((De) => De.id === n), K = t === "after" ? q + 1 : q;
615
- m.splice(K, 0, k);
611
+ const r = (b) => {
612
+ const y = b.findIndex((k) => k.id === o), m = b.findIndex((k) => k.id === n);
613
+ if (y !== -1 && m !== -1) {
614
+ const k = b.splice(y, 1)[0], q = b.findIndex((De) => De.id === n), K = t === "after" ? q + 1 : q;
615
+ b.splice(K, 0, k);
616
616
  }
617
617
  };
618
618
  if (c)
619
- r(g.value);
619
+ r(v.value);
620
620
  else
621
- for (const m of v.value)
622
- m.items && r(m.items);
621
+ for (const b of g.value)
622
+ b.items && r(b.items);
623
623
  } finally {
624
624
  i = !1;
625
625
  }
@@ -634,12 +634,12 @@ function Rt(e, a) {
634
634
  }), i = !0;
635
635
  try {
636
636
  if (c) {
637
- const n = g.value.findIndex((r) => r.id === o);
638
- n !== -1 && (g.value[n] = t);
637
+ const n = v.value.findIndex((r) => r.id === o);
638
+ n !== -1 && (v.value[n] = t);
639
639
  } else
640
- for (const n of v.value)
640
+ for (const n of g.value)
641
641
  if (n.items) {
642
- const r = n.items.findIndex((m) => m.id === o);
642
+ const r = n.items.findIndex((b) => b.id === o);
643
643
  if (r !== -1) {
644
644
  n.items[r] = t;
645
645
  break;
@@ -655,13 +655,13 @@ function Rt(e, a) {
655
655
  getFocusState: async () => new Promise((o, t) => {
656
656
  let n = e.value;
657
657
  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);
658
- const r = (m) => {
659
- if (console.log("[useGridTabs] getFocusState callback received:", m), m && m.isSuccess !== void 0 && m.result !== void 0) {
660
- o(m.result);
658
+ const r = (b) => {
659
+ if (console.log("[useGridTabs] getFocusState callback received:", b), b && b.isSuccess !== void 0 && b.result !== void 0) {
660
+ o(b.result);
661
661
  return;
662
662
  }
663
663
  try {
664
- const y = typeof m == "string" ? JSON.parse(m) : m;
664
+ const y = typeof b == "string" ? JSON.parse(b) : b;
665
665
  o(y);
666
666
  } catch (y) {
667
667
  t(y);
@@ -672,19 +672,19 @@ function Rt(e, a) {
672
672
  getItemRect: async (o) => new Promise((t, n) => {
673
673
  let r = e.value;
674
674
  typeof e.value.getNativeNode == "function" ? r = e.value.getNativeNode() || e.value : e.value.nativeRef && (r = e.value.nativeRef), console.log(`[useGridTabs] getItemRect called for itemId=${o}, nativeTarget:`, r);
675
- const m = (y) => {
675
+ const b = (y) => {
676
676
  if (console.log(`[useGridTabs] getItemRect callback received for itemId=${o}:`, y), y && y.isSuccess !== void 0 && y.result !== void 0) {
677
677
  t(y.result);
678
678
  return;
679
679
  }
680
680
  try {
681
- const b = typeof y == "string" ? JSON.parse(y) : y;
682
- t(b);
683
- } catch (b) {
684
- n(b);
681
+ const m = typeof y == "string" ? JSON.parse(y) : y;
682
+ t(m);
683
+ } catch (m) {
684
+ n(m);
685
685
  }
686
686
  };
687
- typeof I.callUIFunction == "function" ? (console.log('[useGridTabs] Executing Native.callUIFunction("getItemRect") with itemId and callback as 4th arg'), I.callUIFunction(r, "getItemRect", [o], m)) : (console.error("[useGridTabs] Native.callUIFunction is not available"), n(new Error("Native.callUIFunction is not available")));
687
+ typeof I.callUIFunction == "function" ? (console.log('[useGridTabs] Executing Native.callUIFunction("getItemRect") with itemId and callback as 4th arg'), I.callUIFunction(r, "getItemRect", [o], b)) : (console.error("[useGridTabs] Native.callUIFunction is not available"), n(new Error("Native.callUIFunction is not available")));
688
688
  }),
689
689
  requestFocus: (o) => {
690
690
  let t = e.value;
@@ -699,14 +699,14 @@ function Rt(e, a) {
699
699
  payload: {
700
700
  pageSpec: t,
701
701
  page_spec: t,
702
- tabs: v.value
702
+ tabs: g.value
703
703
  }
704
704
  });
705
705
  const n = JSON.parse(d.value);
706
706
  n.page_spec = t, d.value = JSON.stringify(n), l = d.value;
707
707
  },
708
708
  reloadAll: (o, t) => {
709
- u && (Object.keys(u).forEach((n) => delete u[n]), Object.assign(u, o)), v.value = t, p({
709
+ u && (Object.keys(u).forEach((n) => delete u[n]), Object.assign(u, o)), g.value = t, p({
710
710
  op: "RELOAD_TABS",
711
711
  payload: {
712
712
  pageSpec: o,
@@ -721,10 +721,10 @@ function Rt(e, a) {
721
721
  }
722
722
  };
723
723
  }
724
- const Ke = {
724
+ const He = {
725
725
  inheritAttrs: !1
726
- }, me = /* @__PURE__ */ $({
727
- ...Ke,
726
+ }, be = /* @__PURE__ */ $({
727
+ ...He,
728
728
  __name: "Keyboard",
729
729
  props: {
730
730
  backgroundColor: {},
@@ -745,7 +745,7 @@ const Ke = {
745
745
  },
746
746
  emits: ["onInputChanged", "onKeyPressed"],
747
747
  setup(e, { expose: a }) {
748
- const d = A(), u = L(), v = "QtKeyboard", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
748
+ const d = A(), u = L(), g = "QtKeyboard", v = g + "_Plugin", s = (u.isPluginActive ? v : g).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
749
749
  s,
750
750
  u.pluginPackageName || "com.quicktvui.plugin.extraui",
751
751
  "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
@@ -763,19 +763,19 @@ const Ke = {
763
763
  }), (l, i) => (x(), O(M(h), F({
764
764
  ref_key: "nativeRef",
765
765
  ref: d,
766
- backgroundColor: e.backgroundColor,
767
- backgroundGradient: e.backgroundGradient,
768
- textColor: e.textColor,
769
- weakTextColor: e.weakTextColor,
770
- focusBackgroundColor: e.focusBackgroundColor,
771
- focusTextColor: e.focusTextColor,
772
- placeholder: e.placeholder,
773
- textFullKeyboard: e.textFullKeyboard,
774
- textT9Keyboard: e.textT9Keyboard,
766
+ backgroundColor: e.backgroundColor || "",
767
+ backgroundGradient: e.backgroundGradient || "",
768
+ textColor: e.textColor || "",
769
+ weakTextColor: e.weakTextColor || "",
770
+ focusBackgroundColor: e.focusBackgroundColor || "",
771
+ focusTextColor: e.focusTextColor || "",
772
+ placeholder: e.placeholder || "",
773
+ textFullKeyboard: e.textFullKeyboard || "",
774
+ textT9Keyboard: e.textT9Keyboard || "",
775
775
  keyboardType: e.keyboardType,
776
- textClear: e.textClear,
777
- textDelete: e.textDelete,
778
- currentInput: e.currentInput,
776
+ textClear: e.textClear || "",
777
+ textDelete: e.textDelete || "",
778
+ currentInput: e.currentInput || "",
779
779
  autofocus: e.autofocus,
780
780
  rememberKeyboardType: e.rememberKeyboardType,
781
781
  onOnInputChanged: i[0] || (i[0] = (f) => l.$emit("onInputChanged", f.nativeEvent)),
@@ -795,7 +795,7 @@ try {
795
795
  oe = e.registerElement || ((Ee = e.default) == null ? void 0 : Ee.registerElement);
796
796
  } catch {
797
797
  }
798
- const He = {
798
+ const Je = {
799
799
  install: (e) => {
800
800
  if (!globalThis.__QtKeyboard_registered)
801
801
  if (oe) {
@@ -803,8 +803,8 @@ const He = {
803
803
  oe(d, {
804
804
  component: {
805
805
  name: u ? "QtKeyboard_Plugin" : "QtKeyboard",
806
- processEventData(v, g) {
807
- const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
806
+ processEventData(g, v) {
807
+ const c = g.handler || g, s = v || (c == null ? void 0 : c.nativeParams) || {};
808
808
  return c && (c.nativeEvent = s), c;
809
809
  }
810
810
  }
@@ -813,15 +813,15 @@ const He = {
813
813
  a("qt-keyboard", !1), a("qt-keyboard-plugin", !0), a("QtKeyboard", !1), a("QtKeyboard_Plugin", !0), globalThis.__QtKeyboard_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtKeyboard");
814
814
  } else
815
815
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
816
- e.component("Keyboard", me), e.component("qt-keyboard", me);
816
+ e.component("Keyboard", be), e.component("qt-keyboard", be);
817
817
  }
818
- }, Je = {
818
+ }, Ze = {
819
819
  inheritAttrs: !1
820
- }, be = /* @__PURE__ */ $({
821
- ...Je,
820
+ }, me = /* @__PURE__ */ $({
821
+ ...Ze,
822
822
  __name: "PortalPool",
823
823
  setup(e, { expose: a }) {
824
- const d = A(), u = L(), v = "QtPortalPool", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
824
+ const d = A(), u = L(), g = "QtPortalPool", v = g + "_Plugin", s = (u.isPluginActive ? v : g).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
825
825
  s,
826
826
  u.pluginPackageName || "com.quicktvui.plugin.glintui"
827
827
  );
@@ -850,7 +850,7 @@ try {
850
850
  ne = e.registerElement || ((xe = e.default) == null ? void 0 : xe.registerElement);
851
851
  } catch {
852
852
  }
853
- const Ze = {
853
+ const Xe = {
854
854
  install: (e) => {
855
855
  if (!globalThis.__QtPortalPool_registered)
856
856
  if (ne) {
@@ -858,8 +858,8 @@ const Ze = {
858
858
  ne(d, {
859
859
  component: {
860
860
  name: u ? "QtPortalPool_Plugin" : "QtPortalPool",
861
- processEventData(v, g) {
862
- const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
861
+ processEventData(g, v) {
862
+ const c = g.handler || g, s = v || (c == null ? void 0 : c.nativeParams) || {};
863
863
  return c && (c.nativeEvent = s), c;
864
864
  }
865
865
  }
@@ -868,18 +868,18 @@ const Ze = {
868
868
  a("qt-portal-pool", !1), a("qt-portal-pool-plugin", !0), a("QtPortalPool", !1), a("QtPortalPool_Plugin", !0), globalThis.__QtPortalPool_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtPortalPool");
869
869
  } else
870
870
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
871
- e.component("PortalPool", be), e.component("qt-portal-pool", be);
871
+ e.component("PortalPool", me), e.component("qt-portal-pool", me);
872
872
  }
873
- }, Xe = {
873
+ }, Ye = {
874
874
  inheritAttrs: !1
875
875
  }, ye = /* @__PURE__ */ $({
876
- ...Xe,
876
+ ...Ye,
877
877
  __name: "PortalItem",
878
878
  props: {
879
879
  portalId: {}
880
880
  },
881
881
  setup(e, { expose: a }) {
882
- const d = A(), u = L(), v = "QtPortalItem", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
882
+ const d = A(), u = L(), g = "QtPortalItem", v = g + "_Plugin", s = (u.isPluginActive ? v : g).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
883
883
  s,
884
884
  u.pluginPackageName || "com.quicktvui.plugin.glintui"
885
885
  );
@@ -893,7 +893,7 @@ const Ze = {
893
893
  ref: d,
894
894
  style: { position: "absolute" },
895
895
  absolute: !0,
896
- portalId: e.portalId
896
+ portalId: e.portalId || ""
897
897
  }, l.$attrs), {
898
898
  default: Q(() => [
899
899
  D(l.$slots, "default")
@@ -909,7 +909,7 @@ try {
909
909
  ae = e.registerElement || ((Ae = e.default) == null ? void 0 : Ae.registerElement);
910
910
  } catch {
911
911
  }
912
- const Ye = {
912
+ const et = {
913
913
  install: (e) => {
914
914
  if (!globalThis.__QtPortalItem_registered)
915
915
  if (ae) {
@@ -917,8 +917,8 @@ const Ye = {
917
917
  ae(d, {
918
918
  component: {
919
919
  name: u ? "QtPortalItem_Plugin" : "QtPortalItem",
920
- processEventData(v, g) {
921
- const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
920
+ processEventData(g, v) {
921
+ const c = g.handler || g, s = v || (c == null ? void 0 : c.nativeParams) || {};
922
922
  return c && (c.nativeEvent = s), c;
923
923
  }
924
924
  }
@@ -929,17 +929,17 @@ const Ye = {
929
929
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
930
930
  e.component("PortalItem", ye), e.component("qt-portal-item", ye);
931
931
  }
932
- }, et = {
932
+ }, tt = {
933
933
  inheritAttrs: !1
934
934
  }, he = /* @__PURE__ */ $({
935
- ...et,
935
+ ...tt,
936
936
  __name: "HsvBackground",
937
937
  props: {
938
938
  hue: {},
939
939
  hueDuration: {}
940
940
  },
941
941
  setup(e, { expose: a }) {
942
- const d = A(), u = L(), v = "QtHsvBackground", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
942
+ const d = A(), u = L(), g = "QtHsvBackground", v = g + "_Plugin", s = (u.isPluginActive ? v : g).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
943
943
  s,
944
944
  u.pluginPackageName || "com.quicktvui.plugin.glintui"
945
945
  );
@@ -968,7 +968,7 @@ try {
968
968
  le = e.registerElement || ((we = e.default) == null ? void 0 : we.registerElement);
969
969
  } catch {
970
970
  }
971
- const tt = {
971
+ const ot = {
972
972
  install: (e) => {
973
973
  if (!globalThis.__QtHsvBackground_registered)
974
974
  if (le) {
@@ -976,8 +976,8 @@ const tt = {
976
976
  le(d, {
977
977
  component: {
978
978
  name: u ? "QtHsvBackground_Plugin" : "QtHsvBackground",
979
- processEventData(v, g) {
980
- const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
979
+ processEventData(g, v) {
980
+ const c = g.handler || g, s = v || (c == null ? void 0 : c.nativeParams) || {};
981
981
  return c && (c.nativeEvent = s), c;
982
982
  }
983
983
  }
@@ -988,17 +988,17 @@ const tt = {
988
988
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
989
989
  e.component("HsvBackground", he), e.component("qt-hsv-background", he);
990
990
  }
991
- }, ot = {
991
+ }, nt = {
992
992
  inheritAttrs: !1
993
993
  }, pe = /* @__PURE__ */ $({
994
- ...ot,
994
+ ...nt,
995
995
  __name: "SvgImage",
996
996
  props: {
997
997
  src: {},
998
998
  tintColor: {}
999
999
  },
1000
1000
  setup(e, { expose: a }) {
1001
- const d = A(), u = L(), v = "QtSvgImage", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
1001
+ const d = A(), u = L(), g = "QtSvgImage", v = g + "_Plugin", s = (u.isPluginActive ? v : g).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
1002
1002
  s,
1003
1003
  u.pluginPackageName || "com.quicktvui.plugin.extraui",
1004
1004
  "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
@@ -1011,8 +1011,8 @@ const tt = {
1011
1011
  }), (l, i) => (x(), O(M(h), F({
1012
1012
  ref_key: "nativeRef",
1013
1013
  ref: d,
1014
- src: e.src,
1015
- tintColor: e.tintColor
1014
+ src: e.src || "",
1015
+ tintColor: e.tintColor || ""
1016
1016
  }, l.$attrs), {
1017
1017
  default: Q(() => [
1018
1018
  D(l.$slots, "default")
@@ -1028,7 +1028,7 @@ try {
1028
1028
  ie = e.registerElement || (($e = e.default) == null ? void 0 : $e.registerElement);
1029
1029
  } catch {
1030
1030
  }
1031
- const nt = {
1031
+ const at = {
1032
1032
  install: (e) => {
1033
1033
  if (!globalThis.__QtSvgImage_registered)
1034
1034
  if (ie) {
@@ -1036,8 +1036,8 @@ const nt = {
1036
1036
  ie(d, {
1037
1037
  component: {
1038
1038
  name: u ? "QtSvgImage_Plugin" : "QtSvgImage",
1039
- processEventData(v, g) {
1040
- const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
1039
+ processEventData(g, v) {
1040
+ const c = g.handler || g, s = v || (c == null ? void 0 : c.nativeParams) || {};
1041
1041
  return c && (c.nativeEvent = s), c;
1042
1042
  }
1043
1043
  }
@@ -1048,10 +1048,10 @@ const nt = {
1048
1048
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
1049
1049
  e.component("SvgImage", pe), e.component("qt-svg-image", pe);
1050
1050
  }
1051
- }, at = {
1051
+ }, lt = {
1052
1052
  inheritAttrs: !1
1053
- }, lt = /* @__PURE__ */ $({
1054
- ...at,
1053
+ }, it = /* @__PURE__ */ $({
1054
+ ...lt,
1055
1055
  __name: "NaButtonBase",
1056
1056
  props: {
1057
1057
  text: {},
@@ -1074,7 +1074,7 @@ const nt = {
1074
1074
  },
1075
1075
  emits: ["onButtonCustomEvent"],
1076
1076
  setup(e, { expose: a }) {
1077
- const d = A(), u = L(), v = "QtNaButton", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
1077
+ const d = A(), u = L(), g = "QtNaButton", v = g + "_Plugin", s = (u.isPluginActive ? v : g).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
1078
1078
  s,
1079
1079
  u.pluginPackageName || "com.quicktvui.plugin.extraui",
1080
1080
  "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
@@ -1087,20 +1087,20 @@ const nt = {
1087
1087
  }), (l, i) => (x(), O(M(h), F({
1088
1088
  ref_key: "nativeRef",
1089
1089
  ref: d,
1090
- text: e.text,
1091
- icon: e.icon,
1090
+ text: e.text || "",
1091
+ icon: e.icon || "",
1092
1092
  iconSize: e.iconSize,
1093
1093
  iconSpace: e.iconSpace,
1094
- layoutDirection: e.layoutDirection,
1094
+ layoutDirection: e.layoutDirection || "",
1095
1095
  fontSize: e.fontSize,
1096
1096
  maxLines: e.maxLines,
1097
- textColor: e.textColor,
1098
- focusTextColor: e.focusTextColor,
1099
- backgroundColor: e.backgroundColor,
1100
- focusBackgroundColor: e.focusBackgroundColor,
1097
+ textColor: e.textColor || "",
1098
+ focusTextColor: e.focusTextColor || "",
1099
+ backgroundColor: e.backgroundColor || "",
1100
+ focusBackgroundColor: e.focusBackgroundColor || "",
1101
1101
  normalBorderWidth: e.normalBorderWidth,
1102
- normalBorderColor: e.normalBorderColor,
1103
- focusBorderColor: e.focusBorderColor,
1102
+ normalBorderColor: e.normalBorderColor || "",
1103
+ focusBorderColor: e.focusBorderColor || "",
1104
1104
  cornerRadius: e.cornerRadius,
1105
1105
  focusScale: e.focusScale,
1106
1106
  enableFocusBorder: e.enableFocusBorder,
@@ -1112,23 +1112,28 @@ const nt = {
1112
1112
  _: 3
1113
1113
  }, 16, ["text", "icon", "iconSize", "iconSpace", "layoutDirection", "fontSize", "maxLines", "textColor", "focusTextColor", "backgroundColor", "focusBackgroundColor", "normalBorderWidth", "normalBorderColor", "focusBorderColor", "cornerRadius", "focusScale", "enableFocusBorder"]));
1114
1114
  }
1115
- }), it = {
1115
+ }), rt = {
1116
1116
  inheritAttrs: !1
1117
1117
  }, Ce = /* @__PURE__ */ $({
1118
- ...it,
1118
+ ...rt,
1119
1119
  __name: "NaButton",
1120
1120
  props: {
1121
1121
  width: {},
1122
1122
  height: {}
1123
1123
  },
1124
1124
  setup(e) {
1125
- const a = e, d = j(() => ({
1126
- width: typeof a.width == "number" ? `${a.width}px` : a.width,
1127
- height: typeof a.height == "number" ? `${a.height}px` : a.height
1128
- }));
1129
- return (u, v) => (x(), O(lt, F(u.$attrs, { style: d.value }), {
1125
+ const a = e, d = Me(), u = W(() => {
1126
+ const g = {};
1127
+ a.width !== void 0 && (g.width = typeof a.width == "number" ? `${a.width}px` : a.width), a.height !== void 0 && (g.height = typeof a.height == "number" ? `${a.height}px` : a.height);
1128
+ const v = d.style || {};
1129
+ return {
1130
+ ...g,
1131
+ ...typeof v == "object" ? v : {}
1132
+ };
1133
+ });
1134
+ return (g, v) => (x(), O(it, F(g.$attrs, { style: u.value }), {
1130
1135
  default: Q(() => [
1131
- D(u.$slots, "default")
1136
+ D(g.$slots, "default")
1132
1137
  ]),
1133
1138
  _: 3
1134
1139
  }, 16, ["style"]));
@@ -1141,7 +1146,7 @@ try {
1141
1146
  re = e.registerElement || ((Be = e.default) == null ? void 0 : Be.registerElement);
1142
1147
  } catch {
1143
1148
  }
1144
- const rt = {
1149
+ const st = {
1145
1150
  install: (e) => {
1146
1151
  if (!globalThis.__QtNaButton_registered)
1147
1152
  if (re) {
@@ -1149,8 +1154,8 @@ const rt = {
1149
1154
  re(d, {
1150
1155
  component: {
1151
1156
  name: u ? "QtNaButton_Plugin" : "QtNaButton",
1152
- processEventData(v, g) {
1153
- const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
1157
+ processEventData(g, v) {
1158
+ const c = g.handler || g, s = v || (c == null ? void 0 : c.nativeParams) || {};
1154
1159
  return c && (c.nativeEvent = s), c;
1155
1160
  }
1156
1161
  }
@@ -1161,10 +1166,10 @@ const rt = {
1161
1166
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
1162
1167
  e.component("NaButton", Ce), e.component("qt-na-button", Ce);
1163
1168
  }
1164
- }, st = {
1169
+ }, ct = {
1165
1170
  inheritAttrs: !1
1166
1171
  }, ke = /* @__PURE__ */ $({
1167
- ...st,
1172
+ ...ct,
1168
1173
  __name: "NaCheckbox",
1169
1174
  props: {
1170
1175
  text: {},
@@ -1211,7 +1216,7 @@ const rt = {
1211
1216
  },
1212
1217
  emits: ["onCheckedChange"],
1213
1218
  setup(e, { expose: a }) {
1214
- const d = A(), u = L(), v = "QtNaCheckbox", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
1219
+ const d = A(), u = L(), g = "QtNaCheckbox", v = g + "_Plugin", s = (u.isPluginActive ? v : g).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
1215
1220
  s,
1216
1221
  u.pluginPackageName || ""
1217
1222
  );
@@ -1223,15 +1228,15 @@ const rt = {
1223
1228
  }), (l, i) => (x(), O(M(h), F({
1224
1229
  ref_key: "nativeRef",
1225
1230
  ref: d,
1226
- text: e.text,
1231
+ text: e.text || "",
1227
1232
  checked: e.checked,
1228
1233
  disabled: e.disabled,
1229
- checkedIcon: e.checkedIcon,
1230
- uncheckedIcon: e.uncheckedIcon,
1234
+ checkedIcon: e.checkedIcon || "",
1235
+ uncheckedIcon: e.uncheckedIcon || "",
1231
1236
  iconSize: e.iconSize,
1232
1237
  iconSpace: e.iconSpace,
1233
- layoutDirection: e.layoutDirection,
1234
- gravity: e.gravity,
1238
+ layoutDirection: e.layoutDirection || "",
1239
+ gravity: e.gravity || "",
1235
1240
  paddingX: e.paddingX,
1236
1241
  showBackground: e.showBackground,
1237
1242
  fontSize: e.fontSize,
@@ -1250,7 +1255,7 @@ const rt = {
1250
1255
  checkedIconInnerColor: e.checkedIconInnerColor,
1251
1256
  focusCheckedIconInnerColor: e.focusCheckedIconInnerColor,
1252
1257
  disabledIconInnerColor: e.disabledIconInnerColor,
1253
- focusMode: e.focusMode,
1258
+ focusMode: e.focusMode || "",
1254
1259
  bgColor: e.bgColor,
1255
1260
  focusBgColor: e.focusBgColor,
1256
1261
  checkedBgColor: e.checkedBgColor,
@@ -1263,7 +1268,7 @@ const rt = {
1263
1268
  disabledBorderColor: e.disabledBorderColor,
1264
1269
  cornerRadius: e.cornerRadius,
1265
1270
  focusScale: e.focusScale,
1266
- type: e.type,
1271
+ type: e.type || "",
1267
1272
  onOnCheckedChange: i[0] || (i[0] = (f) => l.$emit("onCheckedChange", f.nativeEvent))
1268
1273
  }, l.$attrs), {
1269
1274
  default: Q(() => [
@@ -1280,7 +1285,7 @@ try {
1280
1285
  se = e.registerElement || ((Ge = e.default) == null ? void 0 : Ge.registerElement);
1281
1286
  } catch {
1282
1287
  }
1283
- const ct = {
1288
+ const ut = {
1284
1289
  install: (e) => {
1285
1290
  if (!globalThis.__QtNaCheckbox_registered)
1286
1291
  if (se) {
@@ -1288,8 +1293,8 @@ const ct = {
1288
1293
  se(d, {
1289
1294
  component: {
1290
1295
  name: u ? "QtNaCheckbox_Plugin" : "QtNaCheckbox",
1291
- processEventData(v, g) {
1292
- const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
1296
+ processEventData(g, v) {
1297
+ const c = g.handler || g, s = v || (c == null ? void 0 : c.nativeParams) || {};
1293
1298
  return c && (c.nativeEvent = s), c;
1294
1299
  }
1295
1300
  }
@@ -1300,7 +1305,7 @@ const ct = {
1300
1305
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
1301
1306
  e.component("NaCheckbox", ke), e.component("qt-na-checkbox", ke);
1302
1307
  }
1303
- }, ut = $({
1308
+ }, dt = $({
1304
1309
  name: "NaRadioGroup",
1305
1310
  props: {
1306
1311
  modelValue: {
@@ -1339,29 +1344,29 @@ const ct = {
1339
1344
  emits: ["update:modelValue", "change"],
1340
1345
  setup(e, { emit: a }) {
1341
1346
  return {
1342
- groupStyle: j(() => ({
1347
+ groupStyle: W(() => ({
1343
1348
  display: "flex",
1344
1349
  flexDirection: e.direction,
1345
1350
  alignItems: "center"
1346
1351
  })),
1347
- getItemStyle: (g, c) => {
1352
+ getItemStyle: (v, c) => {
1348
1353
  var h;
1349
- const s = { ...((h = g.props) == null ? void 0 : h.style) || {} };
1354
+ const s = { ...((h = v.props) == null ? void 0 : h.style) || {} };
1350
1355
  return e.itemWidth !== void 0 && (s.width = e.itemWidth), e.itemHeight !== void 0 && (s.height = e.itemHeight), c !== e.options.length - 1 && (e.direction === "row" ? s.marginRight = e.itemGap : s.marginBottom = e.itemGap), s;
1351
1356
  },
1352
- onItemClick: (g) => {
1353
- g.disabled || (a("update:modelValue", g.value), a("change", g.value));
1357
+ onItemClick: (v) => {
1358
+ v.disabled || (a("update:modelValue", v.value), a("change", v.value));
1354
1359
  }
1355
1360
  };
1356
1361
  }
1357
1362
  });
1358
1363
  const ge = (e, a) => {
1359
1364
  const d = e.__vccOpts || e;
1360
- for (const [u, v] of a)
1361
- d[u] = v;
1365
+ for (const [u, g] of a)
1366
+ d[u] = g;
1362
1367
  return d;
1363
1368
  };
1364
- function dt(e, a, d, u, v, g) {
1369
+ function ft(e, a, d, u, g, v) {
1365
1370
  const c = de("qt-na-checkbox");
1366
1371
  return x(), Z("div", {
1367
1372
  class: "na-radio-group",
@@ -1381,11 +1386,11 @@ function dt(e, a, d, u, v, g) {
1381
1386
  }), null, 16, ["checked", "text", "gravity", "showBackground", "disabled", "style", "onClick"]))), 128))
1382
1387
  ], 4);
1383
1388
  }
1384
- const Te = /* @__PURE__ */ ge(ut, [["render", dt], ["__scopeId", "data-v-448252ff"]]), ft = {
1389
+ const Te = /* @__PURE__ */ ge(dt, [["render", ft], ["__scopeId", "data-v-448252ff"]]), gt = {
1385
1390
  install: (e) => {
1386
1391
  e.component("NaRadioGroup", Te), e.component("qt-na-radio-group", Te);
1387
1392
  }
1388
- }, gt = $({
1393
+ }, vt = $({
1389
1394
  name: "NaCheckboxGroup",
1390
1395
  props: {
1391
1396
  modelValue: {
@@ -1424,26 +1429,26 @@ const Te = /* @__PURE__ */ ge(ut, [["render", dt], ["__scopeId", "data-v-448252f
1424
1429
  emits: ["update:modelValue", "change"],
1425
1430
  setup(e, { emit: a }) {
1426
1431
  return {
1427
- groupStyle: j(() => ({
1432
+ groupStyle: W(() => ({
1428
1433
  display: "flex",
1429
1434
  flexDirection: e.direction,
1430
1435
  alignItems: "center"
1431
1436
  })),
1432
- getItemStyle: (g, c) => {
1437
+ getItemStyle: (v, c) => {
1433
1438
  var h;
1434
- const s = { ...((h = g.props) == null ? void 0 : h.style) || {} };
1439
+ const s = { ...((h = v.props) == null ? void 0 : h.style) || {} };
1435
1440
  return e.itemWidth !== void 0 && (s.width = e.itemWidth), e.itemHeight !== void 0 && (s.height = e.itemHeight), c !== e.options.length - 1 && (e.direction === "row" ? s.marginRight = e.itemGap : s.marginBottom = e.itemGap), s;
1436
1441
  },
1437
- onItemClick: (g) => {
1438
- if (g.disabled)
1442
+ onItemClick: (v) => {
1443
+ if (v.disabled)
1439
1444
  return;
1440
- const c = [...e.modelValue], s = c.indexOf(g.value);
1441
- s > -1 ? c.splice(s, 1) : c.push(g.value), a("update:modelValue", c), a("change", c);
1445
+ const c = [...e.modelValue], s = c.indexOf(v.value);
1446
+ s > -1 ? c.splice(s, 1) : c.push(v.value), a("update:modelValue", c), a("change", c);
1442
1447
  }
1443
1448
  };
1444
1449
  }
1445
1450
  });
1446
- function vt(e, a, d, u, v, g) {
1451
+ function bt(e, a, d, u, g, v) {
1447
1452
  const c = de("qt-na-checkbox");
1448
1453
  return x(), Z("div", {
1449
1454
  class: "na-checkbox-group",
@@ -1463,14 +1468,14 @@ function vt(e, a, d, u, v, g) {
1463
1468
  }), null, 16, ["checked", "text", "gravity", "showBackground", "disabled", "style", "onClick"]))), 128))
1464
1469
  ], 4);
1465
1470
  }
1466
- const Ie = /* @__PURE__ */ ge(gt, [["render", vt], ["__scopeId", "data-v-cf6a4eaa"]]), mt = {
1471
+ const Ie = /* @__PURE__ */ ge(vt, [["render", bt], ["__scopeId", "data-v-cf6a4eaa"]]), mt = {
1467
1472
  install: (e) => {
1468
1473
  e.component("NaCheckboxGroup", Ie), e.component("qt-na-checkbox-group", Ie);
1469
1474
  }
1470
- }, bt = {
1475
+ }, yt = {
1471
1476
  inheritAttrs: !1
1472
1477
  }, Ne = /* @__PURE__ */ $({
1473
- ...bt,
1478
+ ...yt,
1474
1479
  __name: "NaSwitcher",
1475
1480
  props: {
1476
1481
  checked: { type: Boolean },
@@ -1488,7 +1493,7 @@ const Ie = /* @__PURE__ */ ge(gt, [["render", vt], ["__scopeId", "data-v-cf6a4ea
1488
1493
  },
1489
1494
  emits: ["onCheckedChange"],
1490
1495
  setup(e, { expose: a }) {
1491
- const d = A(), u = L(), v = "QtNaSwitcher", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
1496
+ const d = A(), u = L(), g = "QtNaSwitcher", v = g + "_Plugin", s = (u.isPluginActive ? v : g).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
1492
1497
  s,
1493
1498
  u.pluginPackageName || ""
1494
1499
  );
@@ -1502,13 +1507,13 @@ const Ie = /* @__PURE__ */ ge(gt, [["render", vt], ["__scopeId", "data-v-cf6a4ea
1502
1507
  ref: d,
1503
1508
  checked: e.checked,
1504
1509
  disabled: e.disabled,
1505
- title: e.title,
1506
- textOn: e.textOn,
1507
- textOff: e.textOff,
1508
- subtitle: e.subtitle,
1509
- subtitleColor: e.subtitleColor,
1510
- titleColor: e.titleColor,
1511
- focusTitleColor: e.focusTitleColor,
1510
+ title: e.title || "",
1511
+ textOn: e.textOn || "",
1512
+ textOff: e.textOff || "",
1513
+ subtitle: e.subtitle || "",
1514
+ subtitleColor: e.subtitleColor || "",
1515
+ titleColor: e.titleColor || "",
1516
+ focusTitleColor: e.focusTitleColor || "",
1512
1517
  titleTextSize: e.titleTextSize,
1513
1518
  subtitleTextSize: e.subtitleTextSize,
1514
1519
  stateTextSize: e.stateTextSize,
@@ -1528,7 +1533,7 @@ try {
1528
1533
  ce = e.registerElement || ((Oe = e.default) == null ? void 0 : Oe.registerElement);
1529
1534
  } catch {
1530
1535
  }
1531
- const yt = {
1536
+ const ht = {
1532
1537
  install: (e) => {
1533
1538
  if (!globalThis.__QtNaSwitcher_registered)
1534
1539
  if (ce) {
@@ -1536,8 +1541,8 @@ const yt = {
1536
1541
  ce(d, {
1537
1542
  component: {
1538
1543
  name: u ? "QtNaSwitcher_Plugin" : "QtNaSwitcher",
1539
- processEventData(v, g) {
1540
- const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
1544
+ processEventData(g, v) {
1545
+ const c = g.handler || g, s = v || (c == null ? void 0 : c.nativeParams) || {};
1541
1546
  return c && (c.nativeEvent = s), c;
1542
1547
  }
1543
1548
  }
@@ -1548,7 +1553,7 @@ const yt = {
1548
1553
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
1549
1554
  e.component("NaSwitcher", Ne), e.component("qt-na-switcher", Ne);
1550
1555
  }
1551
- }, ht = $({
1556
+ }, pt = $({
1552
1557
  name: "NaSettingSwitch",
1553
1558
  props: {
1554
1559
  title: {
@@ -1602,25 +1607,25 @@ const yt = {
1602
1607
  ee(() => e.modelValue, (s) => {
1603
1608
  u.value = s;
1604
1609
  });
1605
- const v = (s) => {
1610
+ const g = (s) => {
1606
1611
  const h = s.checked;
1607
1612
  u.value = h, a("update:modelValue", h), a("change", h);
1608
- }, g = j(() => typeof e.width == "number" ? `${e.width}px` : e.width), c = j(() => {
1613
+ }, v = W(() => typeof e.width == "number" ? `${e.width}px` : e.width), c = W(() => {
1609
1614
  const s = d.style || {}, h = e.subtitle ? (typeof e.height == "number" ? e.height : parseInt(e.height)) + 30 : e.height;
1610
1615
  return {
1611
- width: g.value,
1616
+ width: v.value,
1612
1617
  height: typeof h == "number" ? `${h}px` : h,
1613
1618
  ...s
1614
1619
  };
1615
1620
  });
1616
1621
  return {
1617
1622
  checked: u,
1618
- handleCheckedChange: v,
1623
+ handleCheckedChange: g,
1619
1624
  mergedStyle: c
1620
1625
  };
1621
1626
  }
1622
1627
  });
1623
- function pt(e, a, d, u, v, g) {
1628
+ function Ct(e, a, d, u, g, v) {
1624
1629
  const c = de("qt-na-switcher");
1625
1630
  return x(), O(c, {
1626
1631
  class: "na-setting-switch",
@@ -1637,11 +1642,11 @@ function pt(e, a, d, u, v, g) {
1637
1642
  onOnCheckedChange: e.handleCheckedChange
1638
1643
  }, null, 8, ["style", "title", "subtitle", "checked", "textOn", "textOff", "titleTextSize", "subtitleTextSize", "stateTextSize", "disabled", "onOnCheckedChange"]);
1639
1644
  }
1640
- const Pe = /* @__PURE__ */ ge(ht, [["render", pt]]), Ct = {
1645
+ const Pe = /* @__PURE__ */ ge(pt, [["render", Ct]]), kt = {
1641
1646
  install(e) {
1642
1647
  e.component("NaSettingSwitch", Pe), e.component("qt-na-setting-switch", Pe);
1643
1648
  }
1644
- }, kt = {
1649
+ }, Tt = {
1645
1650
  // 如果设置为 true,则全局跳过所有组件的原生插件安装检查,直接渲染
1646
1651
  skipPluginCheck: !1
1647
1652
  }, Y = /* @__PURE__ */ new Set();
@@ -1656,7 +1661,7 @@ function z(e, a, d) {
1656
1661
  default: !1
1657
1662
  }
1658
1663
  },
1659
- setup(u, { slots: v, attrs: g, expose: c }) {
1664
+ setup(u, { slots: g, attrs: v, expose: c }) {
1660
1665
  const s = A("loading"), h = A(""), l = A(), i = globalThis.__VUE_INSTANCE__;
1661
1666
  c({
1662
1667
  getNativeNode: () => {
@@ -1667,7 +1672,7 @@ function z(e, a, d) {
1667
1672
  });
1668
1673
  let w = null, _ = null;
1669
1674
  try {
1670
- w = Fe(), _ = Ve();
1675
+ w = Fe(), _ = je();
1671
1676
  } catch (C) {
1672
1677
  console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。", C);
1673
1678
  }
@@ -1708,7 +1713,7 @@ function z(e, a, d) {
1708
1713
  return console.warn("[withAsyncPlugin] 检查组件注册状态异常:", C), !1;
1709
1714
  }
1710
1715
  }, U = async () => {
1711
- if (kt.skipPluginCheck || u.skipPluginCheck) {
1716
+ if (Tt.skipPluginCheck || u.skipPluginCheck) {
1712
1717
  console.log(`[withAsyncPlugin] 跳过 ${e} 插件检查 (skipPluginCheck = true)`), s.value = "ready";
1713
1718
  return;
1714
1719
  }
@@ -1745,12 +1750,12 @@ function z(e, a, d) {
1745
1750
  _.addListener({ pkg: a }, B), S = setTimeout(() => {
1746
1751
  _.removeListener(B), P(new Error(`插件安装超时: ${a}`));
1747
1752
  }, 8e3), typeof _.installPlugin == "function" ? _.installPlugin({ pkg: a }) : typeof _.install == "function" ? _.install(a) : P(new Error("当前运行时不支持 install / installPlugin"));
1748
- }), await ze(), Y.add(a), s.value = "ready";
1753
+ }), await Le(), Y.add(a), s.value = "ready";
1749
1754
  } catch (T) {
1750
1755
  console.error("[withAsyncPlugin] 插件加载失败:", T), h.value = (T == null ? void 0 : T.message) || String(T), s.value = "error";
1751
1756
  }
1752
1757
  };
1753
- return Me(() => {
1758
+ return ze(() => {
1754
1759
  U();
1755
1760
  }), () => {
1756
1761
  const C = {
@@ -1758,10 +1763,10 @@ function z(e, a, d) {
1758
1763
  flexDirection: "column",
1759
1764
  justifyContent: "center",
1760
1765
  alignItems: "center",
1761
- ...g.style || {}
1766
+ ...v.style || {}
1762
1767
  };
1763
- g.width !== void 0 && !C.width && (C.width = typeof g.width == "number" ? `${g.width}px` : g.width), g.height !== void 0 && !C.height && (C.height = typeof g.height == "number" ? `${g.height}px` : g.height);
1764
- const T = g.class ? `qt-plugin-container ${g.class}` : "qt-plugin-container", P = {
1768
+ v.width !== void 0 && !C.width && (C.width = typeof v.width == "number" ? `${v.width}px` : v.width), v.height !== void 0 && !C.height && (C.height = typeof v.height == "number" ? `${v.height}px` : v.height);
1769
+ const T = v.class ? `qt-plugin-container ${v.class}` : "qt-plugin-container", P = {
1765
1770
  class: T,
1766
1771
  style: C,
1767
1772
  // 默认关闭外层 div 的裁剪,防止内部组件 focusScale 时被切
@@ -1778,13 +1783,13 @@ function z(e, a, d) {
1778
1783
  H("div", { style: { color: "white", fontSize: "30px", backgroundColor: "rgba(255,0,0,0.5)" } }, `插件加载失败: ${h.value}`)
1779
1784
  ]);
1780
1785
  const S = {}, B = {};
1781
- for (const [E, V] of Object.entries(g))
1786
+ for (const [E, V] of Object.entries(v))
1782
1787
  if (E.startsWith("on") && typeof V == "function") {
1783
- let W = E;
1784
- E.startsWith("onOn") && (W = "on" + E.slice(4)), B[W] = V;
1788
+ let j = E;
1789
+ E.startsWith("onOn") && (j = "on" + E.slice(4)), B[j] = V;
1785
1790
  } else if (E.startsWith("on") && Array.isArray(V)) {
1786
- let W = E;
1787
- E.startsWith("onOn") && (W = "on" + E.slice(4)), B[W] = V;
1791
+ let j = E;
1792
+ E.startsWith("onOn") && (j = "on" + E.slice(4)), B[j] = V;
1788
1793
  } else
1789
1794
  E.startsWith("onOn") || (S[E] = V);
1790
1795
  const N = {
@@ -1798,7 +1803,7 @@ function z(e, a, d) {
1798
1803
  l.value = E;
1799
1804
  }
1800
1805
  }, G = N.tabsData || "", R = N.actionPayload || "";
1801
- return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:", Object.keys(N), "tabsData.length=", G.length, "actionPayload.length=", R.length), H(e, N, v.default ? v.default() : []);
1806
+ return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:", Object.keys(N), "tabsData.length=", G.length, "actionPayload.length=", R.length), H(e, N, g.default ? g.default() : []);
1802
1807
  };
1803
1808
  }
1804
1809
  });
@@ -1809,7 +1814,7 @@ const Re = Symbol("AddonEnvContext"), Qe = {
1809
1814
  pluginPackageName: "com.quicktvui.plugin.glintui",
1810
1815
  builtInVersions: {}
1811
1816
  };
1812
- async function Qt(e = "com.quicktvui.plugin.glintui", a = "_Plugin") {
1817
+ async function Dt(e = "com.quicktvui.plugin.glintui", a = "_Plugin") {
1813
1818
  const d = Fe();
1814
1819
  let u = {};
1815
1820
  try {
@@ -1818,7 +1823,7 @@ async function Qt(e = "com.quicktvui.plugin.glintui", a = "_Plugin") {
1818
1823
  } catch (h) {
1819
1824
  console.warn("[AddonProvider] Failed to fetch built-in versions from AddonEnvModule", h);
1820
1825
  }
1821
- const v = `QtGridTabs${a}`, g = d.isComponentRegistered(v), c = g instanceof Promise ? await g : g, s = {
1826
+ const g = `QtGridTabs${a}`, v = d.isComponentRegistered(g), c = v instanceof Promise ? await v : v, s = {
1822
1827
  isPluginActive: c,
1823
1828
  nameSuffix: c ? a : "",
1824
1829
  // 如果使用了热更插件,包名加上 .ext 后缀(与 Gradle 打包脚本对齐)
@@ -1828,14 +1833,14 @@ async function Qt(e = "com.quicktvui.plugin.glintui", a = "_Plugin") {
1828
1833
  return console.info("[AddonProvider] Environment initialized:", s), s;
1829
1834
  }
1830
1835
  let ue = A(Qe);
1831
- function Dt(e) {
1832
- ue.value = e, Le(Re, ue);
1836
+ function Mt(e) {
1837
+ ue.value = e, Ue(Re, ue);
1833
1838
  }
1834
1839
  function L() {
1835
1840
  var e;
1836
- return ((e = Ue(Re, ue)) == null ? void 0 : e.value) || Qe;
1841
+ return ((e = Ve(Re, ue)) == null ? void 0 : e.value) || Qe;
1837
1842
  }
1838
- async function Tt(e) {
1843
+ async function It(e) {
1839
1844
  console.log("[AddonProvider] Sending GridTabs global config to Native:", e);
1840
1845
  try {
1841
1846
  const a = await I.callNativeWithPromise("GridTabsConfigModule", "setDefaultConfig", JSON.stringify(e));
@@ -1844,7 +1849,7 @@ async function Tt(e) {
1844
1849
  return console.error("[AddonProvider] Failed to initialize GridTabs global config:", a), !1;
1845
1850
  }
1846
1851
  }
1847
- async function It(e) {
1852
+ async function Nt(e) {
1848
1853
  console.log("[AddonProvider] Sending ExtraUI global theme config to Native:", e);
1849
1854
  try {
1850
1855
  const a = await I.callNativeWithPromise("ExtraUIConfigModule", "setThemeConfig", JSON.stringify(e));
@@ -1853,9 +1858,9 @@ async function It(e) {
1853
1858
  return console.error("[AddonProvider] Failed to initialize ExtraUI global theme config:", a), !1;
1854
1859
  }
1855
1860
  }
1856
- async function Mt(e) {
1861
+ async function zt(e) {
1857
1862
  console.log("[AddonProvider] Initializing global theme across all modules:", e);
1858
- const a = await It(e), d = await Tt({
1863
+ const a = await Nt(e), d = await It({
1859
1864
  themeConfig: {
1860
1865
  placeholderColor: e.placeholderColor,
1861
1866
  glowColor: e.glowColor || e.focusBackgroundColor,
@@ -1876,46 +1881,46 @@ async function Mt(e) {
1876
1881
  });
1877
1882
  return a && d;
1878
1883
  }
1879
- const zt = {
1884
+ const Lt = {
1880
1885
  install: (e) => {
1881
- e.use(je), e.use(He), e.use(Ze), e.use(Ye), e.use(tt), e.use(nt), e.use(rt), e.use(ct), e.use(ft), e.use(mt), e.use(yt), e.use(Ct);
1886
+ e.use(Ke), e.use(Je), e.use(Xe), e.use(et), e.use(ot), e.use(at), e.use(st), e.use(ut), e.use(gt), e.use(mt), e.use(ht), e.use(kt);
1882
1887
  }
1883
1888
  };
1884
1889
  export {
1885
1890
  Re as ADDON_ENV_CONTEXT_KEY,
1886
1891
  X as GridTabs,
1887
- je as GridTabsPlugin,
1892
+ Ke as GridTabsPlugin,
1888
1893
  he as HsvBackground,
1889
- tt as HsvBackgroundPlugin,
1890
- me as Keyboard,
1891
- He as KeyboardPlugin,
1894
+ ot as HsvBackgroundPlugin,
1895
+ be as Keyboard,
1896
+ Je as KeyboardPlugin,
1892
1897
  Ce as NaButton,
1893
- rt as NaButtonPlugin,
1898
+ st as NaButtonPlugin,
1894
1899
  ke as NaCheckbox,
1895
1900
  Ie as NaCheckboxGroup,
1896
1901
  mt as NaCheckboxGroupPlugin,
1897
- ct as NaCheckboxPlugin,
1902
+ ut as NaCheckboxPlugin,
1898
1903
  Te as NaRadioGroup,
1899
- ft as NaRadioGroupPlugin,
1904
+ gt as NaRadioGroupPlugin,
1900
1905
  Pe as NaSettingSwitch,
1901
- Ct as NaSettingSwitchPlugin,
1906
+ kt as NaSettingSwitchPlugin,
1902
1907
  Ne as NaSwitcher,
1903
- yt as NaSwitcherPlugin,
1908
+ ht as NaSwitcherPlugin,
1904
1909
  ye as PortalItem,
1905
- Ye as PortalItemPlugin,
1906
- be as PortalPool,
1907
- Ze as PortalPoolPlugin,
1908
- zt as QuickTVUINAddons,
1909
- kt as QuickTVUINAddonsConfig,
1910
+ et as PortalItemPlugin,
1911
+ me as PortalPool,
1912
+ Xe as PortalPoolPlugin,
1913
+ Lt as QuickTVUINAddons,
1914
+ Tt as QuickTVUINAddonsConfig,
1910
1915
  pe as SvgImage,
1911
- nt as SvgImagePlugin,
1912
- zt as default,
1913
- Qt as initAddonEnv,
1914
- It as initExtraUIGlobalTheme,
1915
- Mt as initGlobalTheme,
1916
- Tt as initGridTabsGlobalConfig,
1917
- Dt as provideAddonEnv,
1916
+ at as SvgImagePlugin,
1917
+ Lt as default,
1918
+ Dt as initAddonEnv,
1919
+ Nt as initExtraUIGlobalTheme,
1920
+ zt as initGlobalTheme,
1921
+ It as initGridTabsGlobalConfig,
1922
+ Mt as provideAddonEnv,
1918
1923
  L as useAddonEnv,
1919
- Rt as useGridTabs,
1924
+ Qt as useGridTabs,
1920
1925
  z as withAsyncPlugin
1921
1926
  };