@quicktvui/naddons 1.0.0-alpha.12 → 1.0.0-alpha.20

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,7 +1,7 @@
1
- import { defineComponent as F, ref as $, openBlock as L, createBlock as Q, unref as B, mergeProps as U, withCtx as j, renderSlot as K, shallowRef as ne, watch as oe, computed as Te, onMounted as Ae, h as C, nextTick as Ie, provide as Ee, inject as Ne } from "vue";
2
- import { Native as _ } from "@extscreen/es3-vue";
3
- import { useES as ye, useESPlugin as we } from "@extscreen/es3-core";
4
- const se = "QtGridTabs", W = /* @__PURE__ */ F({
1
+ import { defineComponent as q, ref as x, openBlock as Q, createBlock as B, unref as U, mergeProps as K, withCtx as j, renderSlot as V, shallowRef as oe, watch as J, computed as Ae, onMounted as me, h as L, nextTick as Ie, provide as Ee, inject as Ne } from "vue";
2
+ import { Native as G } from "@extscreen/es3-vue";
3
+ import { useES as pe, useESPlugin as we } from "@extscreen/es3-core";
4
+ const se = "QtGridTabs", H = /* @__PURE__ */ q({
5
5
  __name: "GridTabs",
6
6
  props: {
7
7
  protocolVersion: {},
@@ -10,165 +10,165 @@ const se = "QtGridTabs", W = /* @__PURE__ */ F({
10
10
  hsvHue: { default: -2 }
11
11
  },
12
12
  emits: ["onTabSelected", "onTabNeedsData", "onLoadMore", "onItemPresence", "onTabFocused", "onItemClick", "onItemFocused", "onProtocolMismatch", "onScroll", "onScrollStateChanged"],
13
- setup(o, { expose: a }) {
14
- const d = $(), f = z(), b = se + "_Plugin", l = (f.isPluginActive ? b : se).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), y = V(
15
- l,
16
- f.pluginPackageName || "com.quicktvui.plugin.glintui"
13
+ setup(o, { expose: s }) {
14
+ const d = x(), v = W(), b = se + "_Plugin", c = (v.isPluginActive ? b : se).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), m = z(
15
+ c,
16
+ v.pluginPackageName || "com.quicktvui.plugin.glintui"
17
17
  );
18
- return a({
18
+ return s({
19
19
  getNativeNode: () => {
20
- var i, s;
21
- return ((s = (i = d.value) == null ? void 0 : i.getNativeNode) == null ? void 0 : s.call(i)) || d.value;
20
+ var i, a;
21
+ return ((a = (i = d.value) == null ? void 0 : i.getNativeNode) == null ? void 0 : a.call(i)) || d.value;
22
22
  },
23
23
  dispatchAction: (...i) => {
24
- var c, E;
25
- const s = ((E = (c = d.value) == null ? void 0 : c.getNativeNode) == null ? void 0 : E.call(c)) || d.value;
26
- s && _.callUIFunction(s, "dispatchAction", i);
24
+ var l, P;
25
+ const a = ((P = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : P.call(l)) || d.value;
26
+ a && G.callUIFunction(a, "dispatchAction", i);
27
27
  },
28
28
  scrollToTop: (...i) => {
29
- var c, E;
30
- const s = ((E = (c = d.value) == null ? void 0 : c.getNativeNode) == null ? void 0 : E.call(c)) || d.value;
31
- s && _.callUIFunction(s, "scrollToTop", i);
29
+ var l, P;
30
+ const a = ((P = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : P.call(l)) || d.value;
31
+ a && G.callUIFunction(a, "scrollToTop", i);
32
32
  }
33
- }), (i, s) => (L(), Q(B(y), U({
33
+ }), (i, a) => (Q(), B(U(m), K({
34
34
  ref_key: "nativeRef",
35
35
  ref: d,
36
36
  protocolVersion: o.protocolVersion,
37
37
  tabsData: o.tabsData,
38
38
  actionPayload: o.actionPayload,
39
39
  hsvHue: o.hsvHue,
40
- onOnTabSelected: s[0] || (s[0] = (c) => i.$emit("onTabSelected", c.nativeEvent)),
41
- onOnTabNeedsData: s[1] || (s[1] = (c) => i.$emit("onTabNeedsData", c.nativeEvent)),
42
- onOnLoadMore: s[2] || (s[2] = (c) => i.$emit("onLoadMore", c.nativeEvent)),
43
- onOnItemPresence: s[3] || (s[3] = (c) => i.$emit("onItemPresence", c.nativeEvent)),
44
- onOnTabFocused: s[4] || (s[4] = (c) => i.$emit("onTabFocused", c.nativeEvent)),
45
- onOnItemClick: s[5] || (s[5] = (c) => i.$emit("onItemClick", c.nativeEvent)),
46
- onOnItemFocused: s[6] || (s[6] = (c) => i.$emit("onItemFocused", c.nativeEvent)),
47
- onOnProtocolMismatch: s[7] || (s[7] = (c) => i.$emit("onProtocolMismatch", c.nativeEvent)),
48
- onOnScroll: s[8] || (s[8] = (c) => i.$emit("onScroll", c.nativeEvent)),
49
- onOnScrollStateChanged: s[9] || (s[9] = (c) => i.$emit("onScrollStateChanged", c.nativeEvent))
40
+ onOnTabSelected: a[0] || (a[0] = (l) => i.$emit("onTabSelected", l.nativeEvent)),
41
+ onOnTabNeedsData: a[1] || (a[1] = (l) => i.$emit("onTabNeedsData", l.nativeEvent)),
42
+ onOnLoadMore: a[2] || (a[2] = (l) => i.$emit("onLoadMore", l.nativeEvent)),
43
+ onOnItemPresence: a[3] || (a[3] = (l) => i.$emit("onItemPresence", l.nativeEvent)),
44
+ onOnTabFocused: a[4] || (a[4] = (l) => i.$emit("onTabFocused", l.nativeEvent)),
45
+ onOnItemClick: a[5] || (a[5] = (l) => i.$emit("onItemClick", l.nativeEvent)),
46
+ onOnItemFocused: a[6] || (a[6] = (l) => i.$emit("onItemFocused", l.nativeEvent)),
47
+ onOnProtocolMismatch: a[7] || (a[7] = (l) => i.$emit("onProtocolMismatch", l.nativeEvent)),
48
+ onOnScroll: a[8] || (a[8] = (l) => i.$emit("onScroll", l.nativeEvent)),
49
+ onOnScrollStateChanged: a[9] || (a[9] = (l) => i.$emit("onScrollStateChanged", l.nativeEvent))
50
50
  }, i.$attrs), {
51
51
  default: j(() => [
52
- K(i.$slots, "default")
52
+ V(i.$slots, "default")
53
53
  ]),
54
54
  _: 3
55
55
  }, 16, ["protocolVersion", "tabsData", "actionPayload", "hsvHue"]));
56
56
  }
57
57
  });
58
- let Z;
58
+ let Y;
59
59
  var ge;
60
60
  try {
61
61
  const o = require("@extscreen/es3-vue");
62
- Z = o.registerElement || ((ge = o.default) == null ? void 0 : ge.registerElement);
62
+ Y = o.registerElement || ((ge = o.default) == null ? void 0 : ge.registerElement);
63
63
  } catch {
64
64
  }
65
65
  const ke = {
66
66
  install: (o) => {
67
67
  if (!globalThis.__QtGridTabs_registered)
68
- if (Z) {
69
- const a = (d, f) => {
70
- Z(d, {
68
+ if (Y) {
69
+ const s = (d, v) => {
70
+ Y(d, {
71
71
  component: {
72
- name: f ? "QtGridTabs_Plugin" : "QtGridTabs",
73
- processEventData(b, p) {
74
- const l = b.handler || b, y = p || (l == null ? void 0 : l.nativeParams) || {};
75
- return l && (l.nativeEvent = y), l;
72
+ name: v ? "QtGridTabs_Plugin" : "QtGridTabs",
73
+ processEventData(b, y) {
74
+ const c = b.handler || b, m = y || (c == null ? void 0 : c.nativeParams) || {};
75
+ return c && (c.nativeEvent = m), c;
76
76
  }
77
77
  }
78
78
  });
79
79
  };
80
- a("qt-grid-tabs", !1), a("qt-grid-tabs-plugin", !0), a("QtGridTabs", !1), a("QtGridTabs_Plugin", !0), a("gt-tabs", !1), a("gt-tabs-plugin", !0), globalThis.__QtGridTabs_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtGridTabs");
80
+ s("qt-grid-tabs", !1), s("qt-grid-tabs-plugin", !0), s("QtGridTabs", !1), s("QtGridTabs_Plugin", !0), s("gt-tabs", !1), s("gt-tabs-plugin", !0), globalThis.__QtGridTabs_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtGridTabs");
81
81
  } else
82
82
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
83
- o.component("GridTabs", W), o.component("qt-grid-tabs", W), o.component("gt-tabs", W);
83
+ o.component("GridTabs", H), o.component("qt-grid-tabs", H), o.component("gt-tabs", H);
84
84
  }
85
85
  };
86
- function Fe(o, a) {
87
- const d = $(""), f = ne([]), b = ne([]);
88
- let p = !1, l = !1;
89
- const y = "__virtual_single_tab__";
86
+ function Me(o, s) {
87
+ const d = x(""), v = oe([]), b = oe([]);
88
+ let y = !1, c = !1;
89
+ const m = "__virtual_single_tab__";
90
90
  let i = "";
91
- const s = $({}), c = (t) => {
91
+ const a = x({}), l = (t) => {
92
92
  const e = Array.isArray(t) ? t : [t], n = JSON.stringify(e);
93
- if (l && o.value) {
93
+ if (c && o.value) {
94
94
  if (typeof o.value.dispatchAction == "function") {
95
95
  console.log("[useGridTabs] Calling Wrapper dispatchAction directly"), o.value.dispatchAction(n);
96
96
  return;
97
97
  }
98
98
  let r = o.value;
99
- typeof o.value.getNativeNode == "function" ? r = o.value.getNativeNode() || o.value : o.value.nativeRef && (r = o.value.nativeRef), r ? (console.log("[useGridTabs] Calling Native.callUIFunction(dispatchAction)"), _.callUIFunction(r, "dispatchAction", [n])) : console.warn("[useGridTabs] Native target is null or undefined, cannot call dispatchAction");
99
+ typeof o.value.getNativeNode == "function" ? r = o.value.getNativeNode() || o.value : o.value.nativeRef && (r = o.value.nativeRef), r ? (console.log("[useGridTabs] Calling Native.callUIFunction(dispatchAction)"), G.callUIFunction(r, "dispatchAction", [n])) : console.warn("[useGridTabs] Native target is null or undefined, cannot call dispatchAction");
100
100
  }
101
- }, E = (t, e) => {
101
+ }, P = (t, e) => {
102
102
  if (!t)
103
103
  return !1;
104
104
  let n = !0;
105
105
  return t.id || (console.error(`[useGridTabs] ❌ 数据格式错误 (${e}): 卡片缺失必填字段 'id'。每个卡片必须有唯一标识才能进行后续更新!`, t), n = !1), t.viewType || (console.error(`[useGridTabs] ❌ 数据格式错误 (${e}): 卡片缺失必填字段 'viewType' (id: ${t.id || "未知"})。必须指定 Native 注册的视图类型或 Portal 标识!`, t), n = !1), n;
106
- }, te = (t, e) => {
106
+ }, h = (t, e) => {
107
107
  if (!t)
108
108
  return !1;
109
109
  let n = !0;
110
110
  return t.tabId || (console.error(`[useGridTabs] ❌ 数据格式错误 (${e}): Tab 缺失必填字段 'tabId'。每个 Tab 必须有唯一标识!`, t), n = !1), (t.title === void 0 || t.title === null) && console.warn(`[useGridTabs] ⚠️ 数据格式警告 (${e}): Tab 缺失 'title' 字段 (tabId: ${t.tabId || "未知"}),导航栏可能显示为空。`, t), n;
111
- }, x = (t, e) => {
111
+ }, S = (t, e) => {
112
112
  if (!t || t.length === 0)
113
113
  return;
114
- T.clear();
114
+ I.clear();
115
115
  const n = t[0].hasOwnProperty("tabId") || t[0].hasOwnProperty("items") && Array.isArray(t[0].items);
116
- p = e === "1d", e === "1d" && n ? console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `items.value` (一维瀑布流) 赋值二维 Tabs 数据结构!请改用 `tabs.value = ...`") : e === "2d" && !n && console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `tabs.value` (二维导航) 赋值一维卡片列表数据结构!请改用 `items.value = ...`"), e === "1d" ? t.forEach((r, u) => E(r, `items.value[${u}]`)) : t.forEach((r, u) => {
117
- te(r, `tabs.value[${u}]`), r.items && Array.isArray(r.items) && r.items.forEach((g, v) => E(g, `tabs.value[${u}].items[${v}]`));
118
- }), l = !0, O();
119
- }, T = /* @__PURE__ */ new Set(), O = (t = "unknown") => {
120
- if (!l) {
116
+ y = e === "1d", e === "1d" && n ? console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `items.value` (一维瀑布流) 赋值二维 Tabs 数据结构!请改用 `tabs.value = ...`") : e === "2d" && !n && console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `tabs.value` (二维导航) 赋值一维卡片列表数据结构!请改用 `items.value = ...`"), e === "1d" ? t.forEach((r, u) => P(r, `items.value[${u}]`)) : t.forEach((r, u) => {
117
+ h(r, `tabs.value[${u}]`), r.items && Array.isArray(r.items) && r.items.forEach((f, g) => P(f, `tabs.value[${u}].items[${g}]`));
118
+ }), c = !0, D();
119
+ }, I = /* @__PURE__ */ new Set(), D = (t = "unknown") => {
120
+ if (!c) {
121
121
  console.warn("[useGridTabs] triggerRootUpdate skipped because isInitialized is false");
122
122
  return;
123
123
  }
124
124
  let e = {
125
125
  protocolVersion: "1.28.0",
126
126
  // 新增:显式声明协议版本
127
- gridBasis: (a == null ? void 0 : a.gridBasis) ?? 30,
128
- unitType: (a == null ? void 0 : a.unitType) ?? "px",
129
- contentConfig: (a == null ? void 0 : a.contentConfig) ?? (a == null ? void 0 : a.layoutConfig) ?? {
127
+ gridBasis: (s == null ? void 0 : s.gridBasis) ?? 30,
128
+ unitType: (s == null ? void 0 : s.unitType) ?? "px",
129
+ contentConfig: (s == null ? void 0 : s.contentConfig) ?? (s == null ? void 0 : s.layoutConfig) ?? {
130
130
  box: { padding: [0, 60, 60, 60] },
131
131
  navContentGapNormal: 0,
132
132
  itemGap: 24
133
133
  },
134
- navConfig: (a == null ? void 0 : a.navConfig) ?? {
134
+ navConfig: (s == null ? void 0 : s.navConfig) ?? {
135
135
  dock: "left",
136
136
  mode: "fixed",
137
137
  renderType: "smart-hybrid",
138
138
  box: { size: [200, 0] },
139
139
  expandedBox: { size: [300, 0] }
140
140
  },
141
- cacheConfig: (a == null ? void 0 : a.cacheConfig) ?? {
141
+ cacheConfig: (s == null ? void 0 : s.cacheConfig) ?? {
142
142
  offscreenPageLimit: 1,
143
143
  prefetchOffset: 2,
144
144
  preLoadEnabled: !1,
145
145
  strategy: "data_priority"
146
146
  },
147
- animationConfig: (a == null ? void 0 : a.animationConfig) ?? {
147
+ animationConfig: (s == null ? void 0 : s.animationConfig) ?? {
148
148
  duration: 300,
149
149
  easing: "ease-out"
150
150
  },
151
- interactionStrategy: (a == null ? void 0 : a.interactionStrategy) ?? {
151
+ interactionStrategy: (s == null ? void 0 : s.interactionStrategy) ?? {
152
152
  defaultFocus: "nav",
153
153
  interceptBack: !0,
154
154
  backMode: "home-first",
155
155
  autoScrollToTop: !0,
156
156
  edgeScrollProtection: 0.5
157
157
  },
158
- focusConfig: (a == null ? void 0 : a.focusConfig) ?? {
158
+ focusConfig: (s == null ? void 0 : s.focusConfig) ?? {
159
159
  boundaryLock: { left: !1, right: !1, top: !1, bottom: !1 }
160
160
  },
161
- themeConfig: a == null ? void 0 : a.themeConfig,
162
- referenceResolution: (a == null ? void 0 : a.referenceResolution) ?? { w: 1920, h: 1080 }
161
+ themeConfig: s == null ? void 0 : s.themeConfig,
162
+ referenceResolution: (s == null ? void 0 : s.referenceResolution) ?? { w: 1920, h: 1080 }
163
163
  }, n = [];
164
- p ? (e.navConfig = { ...e.navConfig, renderType: "none" }, n = [
164
+ y ? (e.navConfig = { ...e.navConfig, renderType: "none" }, n = [
165
165
  {
166
- tabId: y,
166
+ tabId: m,
167
167
  title: "Virtual Tab",
168
168
  hidden: !0,
169
169
  items: b.value
170
170
  }
171
- ]) : n = f.value;
171
+ ]) : n = v.value;
172
172
  const r = JSON.stringify({
173
173
  page_spec: e,
174
174
  tabs: n
@@ -180,7 +180,7 @@ function Fe(o, a) {
180
180
  console.log("[useGridTabs] triggerRootUpdate: Data unchanged, skipping RELOAD_TABS");
181
181
  return;
182
182
  }
183
- console.log(`[useGridTabs] triggerRootUpdate: Sending RELOAD_TABS action directly to Native (length=${r.length})`), d.value = r, i = r, c({
183
+ console.log(`[useGridTabs] triggerRootUpdate: Sending RELOAD_TABS action directly to Native (length=${r.length})`), d.value = r, i = r, l({
184
184
  op: "RELOAD_TABS",
185
185
  payload: {
186
186
  pageSpec: e,
@@ -194,282 +194,282 @@ function Fe(o, a) {
194
194
  if (!t || typeof t != "object" || t.__isGridTabsProxy)
195
195
  return t;
196
196
  t.content && typeof t.content == "object" && !t.content.__isGridTabsProxy && (t.content = new Proxy(t.content, {
197
- set(n, r, u, g) {
198
- const v = Reflect.set(n, r, u, g);
199
- return t.id && l && c({
197
+ set(n, r, u, f) {
198
+ const g = Reflect.set(n, r, u, f);
199
+ return t.id && c && l({
200
200
  op: "UPDATE_ITEM",
201
201
  itemId: t.id,
202
202
  payload: t
203
- }), v;
203
+ }), g;
204
204
  }
205
- }), Object.defineProperty(t.content, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(t.content, "__v_skip", { value: !0, enumerable: !1 })), t.subItems && Array.isArray(t.subItems) && !t.subItems.__isGridTabsProxy && (t.subItems = m(t.subItems, t.id), Object.defineProperty(t.subItems, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(t.subItems, "__v_skip", { value: !0, enumerable: !1 }));
205
+ }), Object.defineProperty(t.content, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(t.content, "__v_skip", { value: !0, enumerable: !1 })), t.subItems && Array.isArray(t.subItems) && !t.subItems.__isGridTabsProxy && (t.subItems = p(t.subItems, t.id), Object.defineProperty(t.subItems, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(t.subItems, "__v_skip", { value: !0, enumerable: !1 }));
206
206
  const e = new Proxy(t, {
207
- set(n, r, u, g) {
208
- const v = Reflect.set(n, r, u, g);
209
- return n.id && l && c({
207
+ set(n, r, u, f) {
208
+ const g = Reflect.set(n, r, u, f);
209
+ return n.id && c && l({
210
210
  op: "UPDATE_ITEM",
211
211
  itemId: n.id,
212
212
  payload: n
213
- }), v;
213
+ }), g;
214
214
  }
215
215
  });
216
216
  return Object.defineProperty(e, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(e, "__v_skip", { value: !0, enumerable: !1 }), e;
217
- }, m = (t, e) => {
217
+ }, p = (t, e) => {
218
218
  for (let n = 0; n < t.length; n++)
219
219
  t[n] = R(t[n]);
220
220
  return new Proxy(t, {
221
221
  get(n, r, u) {
222
- return r === "push" ? (...g) => {
223
- g.forEach((q, he) => E(q, `push(${he})`)), l || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 push()。请先对 items.value 或 tabs.value 进行全量赋值!");
224
- const v = g.map((q) => R(q)), w = Array.prototype.push.apply(n, v);
225
- return c({
222
+ return r === "push" ? (...f) => {
223
+ f.forEach((C, he) => P(C, `push(${he})`)), c || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 push()。请先对 items.value 或 tabs.value 进行全量赋值!");
224
+ const g = f.map((C) => R(C)), k = Array.prototype.push.apply(n, g);
225
+ return l({
226
226
  op: "APPEND_SUB_ITEMS",
227
227
  itemId: e,
228
- payload: { subItems: v }
229
- }), w;
230
- } : r === "splice" ? (...g) => {
231
- const v = g.length >= 2 && g[0] === 0 && g[1] === n.length, w = Array.prototype.splice.apply(n, g);
232
- return l && v && e !== y ? c({
228
+ payload: { subItems: g }
229
+ }), k;
230
+ } : r === "splice" ? (...f) => {
231
+ const g = f.length >= 2 && f[0] === 0 && f[1] === n.length, k = Array.prototype.splice.apply(n, f);
232
+ return c && g && e !== m ? l({
233
233
  op: "UPDATE_TAB_STATE",
234
234
  // 借用 UPDATE_TAB_STATE 指令,但带有特殊标识,要求底层清空该 Tab
235
235
  itemId: e,
236
236
  payload: { action: "clear_items" }
237
- }) : l && O("items array spliced"), w;
237
+ }) : c && D("items array spliced"), k;
238
238
  } : Reflect.get(n, r, u);
239
239
  },
240
- set(n, r, u, g) {
240
+ set(n, r, u, f) {
241
241
  if (r !== "length" && !isNaN(Number(r))) {
242
- l || console.error(`[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时直接修改了索引 [${String(r)}]。请先对 items.value 或 tabs.value 进行全量赋值!`), E(u, `索引赋值 [${String(r)}]`);
243
- const v = R(u), w = Reflect.set(n, r, v, g);
244
- return v && v.id && c({
242
+ c || console.error(`[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时直接修改了索引 [${String(r)}]。请先对 items.value 或 tabs.value 进行全量赋值!`), P(u, `索引赋值 [${String(r)}]`);
243
+ const g = R(u), k = Reflect.set(n, r, g, f);
244
+ return g && g.id && l({
245
245
  op: "UPDATE_ITEM",
246
- itemId: v.id,
247
- payload: v
248
- }), w;
246
+ itemId: g.id,
247
+ payload: g
248
+ }), k;
249
249
  }
250
- return Reflect.set(n, r, u, g);
250
+ return Reflect.set(n, r, u, f);
251
251
  }
252
252
  });
253
- }, h = (t) => (t.items && Array.isArray(t.items) && !t.items.__isGridTabsProxy && (t.items = m(t.items, t.tabId), Object.defineProperty(t.items, "__isGridTabsProxy", { value: !0, enumerable: !1 })), new Proxy(t, {
253
+ }, A = (t) => (t.items && Array.isArray(t.items) && !t.items.__isGridTabsProxy && (t.items = p(t.items, t.tabId), Object.defineProperty(t.items, "__isGridTabsProxy", { value: !0, enumerable: !1 })), new Proxy(t, {
254
254
  set(e, n, r, u) {
255
255
  if (n === "items") {
256
- let v = r;
257
- return Array.isArray(r) && !r.__isGridTabsProxy && (v = m(r, e.tabId), Object.defineProperty(v, "__isGridTabsProxy", { value: !0, enumerable: !1 })), Reflect.set(e, n, v, u);
256
+ let g = r;
257
+ return Array.isArray(r) && !r.__isGridTabsProxy && (g = p(r, e.tabId), Object.defineProperty(g, "__isGridTabsProxy", { value: !0, enumerable: !1 })), Reflect.set(e, n, g, u);
258
258
  } else if (n === "loadState") {
259
- const v = Reflect.set(e, n, r, u);
260
- return l && e.tabId && c({
259
+ const g = Reflect.set(e, n, r, u);
260
+ return c && e.tabId && l({
261
261
  op: "UPDATE_TAB_STATE",
262
262
  itemId: e.tabId,
263
263
  payload: { loadState: r }
264
- }), v;
264
+ }), g;
265
265
  }
266
266
  return Reflect.set(e, n, r, u);
267
267
  }
268
- })), N = (t) => {
269
- const e = t.map((n) => h(n));
268
+ })), w = (t) => {
269
+ const e = t.map((n) => A(n));
270
270
  return new Proxy(e, {
271
- set(n, r, u, g) {
271
+ set(n, r, u, f) {
272
272
  if (r !== "length" && !isNaN(Number(r))) {
273
- let v = u;
274
- u.__isGridTabsProxy || (v = h(u), Object.defineProperty(v, "__isGridTabsProxy", { value: !0, enumerable: !1 }));
275
- const w = Reflect.set(n, r, v, g);
276
- return O(), w;
273
+ let g = u;
274
+ u.__isGridTabsProxy || (g = A(u), Object.defineProperty(g, "__isGridTabsProxy", { value: !0, enumerable: !1 }));
275
+ const k = Reflect.set(n, r, g, f);
276
+ return D(), k;
277
277
  }
278
- return Reflect.set(n, r, u, g);
278
+ return Reflect.set(n, r, u, f);
279
279
  }
280
280
  });
281
281
  };
282
- oe(f, (t, e) => {
283
- if (console.log("[useGridTabs] watch(tabs) triggered:", { newTabs: t, isInitialized: l }), !t || t.length === 0) {
284
- d.value = "", i = "", l = !1;
282
+ J(v, (t, e) => {
283
+ if (console.log("[useGridTabs] watch(tabs) triggered:", { newTabs: t, isInitialized: c }), !t || t.length === 0) {
284
+ d.value = "", i = "", c = !1;
285
285
  return;
286
286
  }
287
287
  if (t.__isGridTabsProxy)
288
- console.log("[useGridTabs] newTabs is ALREADY a proxy, triggering root update"), O();
288
+ console.log("[useGridTabs] newTabs is ALREADY a proxy, triggering root update"), D();
289
289
  else {
290
290
  console.log("[useGridTabs] newTabs is NOT a proxy, performing full deduceModeAndInitialize & wrapping");
291
- const n = N(t);
292
- Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), x(n, "2d"), f.value = n;
291
+ const n = w(t);
292
+ Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), S(n, "2d"), v.value = n;
293
293
  }
294
- }, { flush: "sync", deep: !1 }), oe(b, (t, e) => {
295
- if (console.log("[useGridTabs] watch(items) triggered:", { newItems: t, isInitialized: l }), !t || t.length === 0) {
296
- d.value = "", i = "", l = !1;
294
+ }, { flush: "sync", deep: !1 }), J(b, (t, e) => {
295
+ if (console.log("[useGridTabs] watch(items) triggered:", { newItems: t, isInitialized: c }), !t || t.length === 0) {
296
+ d.value = "", i = "", c = !1;
297
297
  return;
298
298
  }
299
299
  if (t.__isGridTabsProxy)
300
- console.log("[useGridTabs] newItems is ALREADY a proxy, triggering root update"), O();
300
+ console.log("[useGridTabs] newItems is ALREADY a proxy, triggering root update"), D();
301
301
  else {
302
302
  console.log("[useGridTabs] newItems is NOT a proxy, performing full deduceModeAndInitialize & wrapping");
303
- const n = m(t, y);
304
- Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), x(n, "1d"), b.value = n;
303
+ const n = p(t, m);
304
+ Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), S(n, "1d"), b.value = n;
305
305
  }
306
306
  }, { flush: "sync", deep: !1 });
307
- const P = {}, k = () => {
308
- console.log("[useGridTabs] resetInitialization called manually"), l = !1, T.clear();
309
- for (const t in P)
310
- delete P[t];
311
- }, A = (t) => {
307
+ const T = {}, $ = () => {
308
+ console.log("[useGridTabs] resetInitialization called manually"), c = !1, I.clear();
309
+ for (const t in T)
310
+ delete T[t];
311
+ }, E = (t) => {
312
312
  if (!t || t.length === 0) {
313
- d.value = "", l = !1;
313
+ d.value = "", c = !1;
314
314
  return;
315
315
  }
316
- t[0].hasOwnProperty("tabId") || t[0].hasOwnProperty("items") && Array.isArray(t[0].items) ? f.value = t : b.value = t;
317
- }, S = (t) => {
318
- s.value = t;
319
- }, G = Te(() => ({
316
+ t[0].hasOwnProperty("tabId") || t[0].hasOwnProperty("items") && Array.isArray(t[0].items) ? v.value = t : b.value = t;
317
+ }, _ = (t) => {
318
+ a.value = t;
319
+ }, O = Ae(() => ({
320
320
  tabsData: d.value,
321
321
  // 不再绑定 actionPayload 属性,完全走命令式 API,防止触发无意义的 Vue 节点更新
322
322
  onTabNeedsData: async (...t) => {
323
323
  let e = t[0];
324
- if (e && e.nativeEvent && (e = e.nativeEvent), !s.value.onTabNeedsData)
324
+ if (e && e.nativeEvent && (e = e.nativeEvent), !a.value.onTabNeedsData)
325
325
  return;
326
326
  const { tabId: n, index: r, reason: u } = e;
327
- if (T.has(n)) {
327
+ if (I.has(n)) {
328
328
  console.log(`[useGridTabs] onTabNeedsData SKIP: tabId=${n} 已经发起过请求,防止死循环`);
329
329
  return;
330
330
  }
331
- T.add(n);
331
+ I.add(n);
332
332
  try {
333
- const g = await s.value.onTabNeedsData(n, r, u);
334
- if (g && Array.isArray(g))
335
- if (P[n] = 1, g.length > 0) {
336
- const v = f.value.find((w) => w.tabId === n);
337
- v && (v.items ? v.items.length > 0 && v.items.splice(0, v.items.length) : v.items = [], v.items.push(...g), v.loadState = "ready", c({
333
+ const f = await a.value.onTabNeedsData(n, r, u);
334
+ if (f && Array.isArray(f))
335
+ if (T[n] = 1, f.length > 0) {
336
+ const g = v.value.find((k) => k.tabId === n);
337
+ g && (g.items ? g.items.length > 0 && g.items.splice(0, g.items.length) : g.items = [], g.items.push(...f), g.loadState = "ready", l({
338
338
  op: "UPDATE_TAB_STATE",
339
339
  itemId: n,
340
340
  payload: { loadState: "ready" }
341
341
  }));
342
342
  } else
343
343
  console.warn(`[useGridTabs] ⚠️ 警告: onTabNeedsData(tabId="${n}") 返回了空数组 []!`), console.warn("👉 如果你已经在此函数内手动调用了 push() 来追加数据,请在最后 return null 或 undefined。"), console.warn("👉 如果该 Tab 确实没有数据,返回 [] 可能会导致底层的 Header 等已有元素被清空,请注意检查。"), console.warn("👉 框架已为您拦截此次空数组覆盖,保留了当前的 DOM 结构。");
344
- } catch (g) {
345
- console.error("[useGridTabs] onTabNeedsData 执行失败:", g), T.delete(n);
344
+ } catch (f) {
345
+ console.error("[useGridTabs] onTabNeedsData 执行失败:", f), I.delete(n);
346
346
  }
347
347
  },
348
348
  onLoadMore: async (...t) => {
349
349
  let e = t[0];
350
- if (e && e.nativeEvent && (e = e.nativeEvent), !s.value.onLoadMore)
350
+ if (e && e.nativeEvent && (e = e.nativeEvent), !a.value.onLoadMore)
351
351
  return;
352
- const { tabId: n, itemId: r } = e, g = (P[n] || 1) + 1;
353
- console.log(`[useGridTabs] 拦截到底层 onLoadMore,强行接管页码: tabId=${n}, pageNo=${g}`);
352
+ const { tabId: n, itemId: r } = e, f = (T[n] || 1) + 1;
353
+ console.log(`[useGridTabs] 拦截到底层 onLoadMore,强行接管页码: tabId=${n}, pageNo=${f}`);
354
354
  try {
355
- const v = await s.value.onLoadMore(n, g, r);
356
- if (v && Array.isArray(v))
357
- if (v.length > 0)
358
- if (P[n] = g, p)
359
- b.value.push(...v);
355
+ const g = await a.value.onLoadMore(n, f, r);
356
+ if (g && Array.isArray(g))
357
+ if (g.length > 0)
358
+ if (T[n] = f, y)
359
+ b.value.push(...g);
360
360
  else {
361
- const w = f.value.find((q) => q.tabId === n);
362
- w && w.items && w.items.push(...v);
361
+ const k = v.value.find((C) => C.tabId === n);
362
+ k && k.items && k.items.push(...g);
363
363
  }
364
364
  else
365
- console.warn(`[useGridTabs] ⚠️ 警告: onLoadMore(tabId="${n}", pageNo="${g}") 返回了空数组 []!`), console.warn('👉 如果这是你的最后一页数据,推荐在卡片列表中追加一个 type="no_more" 的 footer 卡片,而不是仅仅返回空。'), console.warn("👉 框架已忽略本次空数据追加,且不会自增页码。");
366
- } catch (v) {
367
- console.error("[useGridTabs] onLoadMore 业务层请求失败:", v);
365
+ console.warn(`[useGridTabs] ⚠️ 警告: onLoadMore(tabId="${n}", pageNo="${f}") 返回了空数组 []!`), console.warn('👉 如果这是你的最后一页数据,推荐在卡片列表中追加一个 type="no_more" 的 footer 卡片,而不是仅仅返回空。'), console.warn("👉 框架已忽略本次空数据追加,且不会自增页码。");
366
+ } catch (g) {
367
+ console.error("[useGridTabs] onLoadMore 业务层请求失败:", g);
368
368
  }
369
369
  },
370
370
  onItemPresence: (...t) => {
371
371
  let e = t[0];
372
- if (console.log("[useGridTabs] ⚡️ bindings caught onItemPresence:", e), s.value.onItemPresence)
372
+ if (console.log("[useGridTabs] ⚡️ bindings caught onItemPresence:", e), a.value.onItemPresence)
373
373
  try {
374
374
  let n = typeof e == "string" ? e : (e == null ? void 0 : e.nativeEvent) || e;
375
375
  n && typeof n.data == "string" && (n = n.data);
376
376
  const r = typeof n == "string" ? JSON.parse(n) : n;
377
377
  r && r.type === "VIEW_PRESENCE_BATCH" && Array.isArray(r.payload) ? r.payload.forEach((u) => {
378
- u.itemId && typeof u.itemId == "string" && u.itemId.startsWith("fallback_pos_") && console.warn(`[useGridTabs] ⚠️ 警告:检测到列表项曝光 (index=${u.index}),但未配置 itemId。请检查传入的 items 数组,务必为每个数据项指定唯一的 itemId,否则底层无法准确进行去重与曝光上报。`), s.value.onItemPresence(u);
379
- }) : s.value.onItemPresence(r);
378
+ u.itemId && typeof u.itemId == "string" && u.itemId.startsWith("fallback_pos_") && console.warn(`[useGridTabs] ⚠️ 警告:检测到列表项曝光 (index=${u.index}),但未配置 itemId。请检查传入的 items 数组,务必为每个数据项指定唯一的 itemId,否则底层无法准确进行去重与曝光上报。`), a.value.onItemPresence(u);
379
+ }) : a.value.onItemPresence(r);
380
380
  } catch (n) {
381
- console.error("[useGridTabs] Failed to parse onItemPresence event payload:", n), s.value.onItemPresence(e);
381
+ console.error("[useGridTabs] Failed to parse onItemPresence event payload:", n), a.value.onItemPresence(e);
382
382
  }
383
383
  },
384
384
  onTabSelected: (...t) => {
385
385
  let e = t[0];
386
- e && e.nativeEvent && (e = e.nativeEvent), s.value.onTabSelected && s.value.onTabSelected(e);
386
+ e && e.nativeEvent && (e = e.nativeEvent), a.value.onTabSelected && a.value.onTabSelected(e);
387
387
  },
388
388
  onItemClick: (...t) => {
389
389
  let e = t[0];
390
- if (console.log("[useGridTabs] RAW onItemClick intercepted from Native:", e), e && e.nativeEvent && (e = e.nativeEvent), s.value.onItemClick)
390
+ if (console.log("[useGridTabs] RAW onItemClick intercepted from Native:", e), e && e.nativeEvent && (e = e.nativeEvent), a.value.onItemClick)
391
391
  try {
392
392
  let n = typeof e == "string" ? e : (e == null ? void 0 : e.data) || e;
393
393
  console.log("[useGridTabs] Parsed eventStr:", n);
394
394
  const r = typeof n == "string" ? JSON.parse(n) : n;
395
- s.value.onItemClick(r);
395
+ a.value.onItemClick(r);
396
396
  } catch (n) {
397
- console.error("[useGridTabs] Failed to parse onItemClick event payload:", n), s.value.onItemClick(e);
397
+ console.error("[useGridTabs] Failed to parse onItemClick event payload:", n), a.value.onItemClick(e);
398
398
  }
399
399
  else
400
400
  console.warn("[useGridTabs] onItemClick triggered but NO callback registered in callbacksRef!");
401
401
  },
402
402
  onItemFocused: (...t) => {
403
403
  let e = t[0];
404
- if (e && e.nativeEvent && (e = e.nativeEvent), s.value.onItemFocused)
404
+ if (e && e.nativeEvent && (e = e.nativeEvent), a.value.onItemFocused)
405
405
  try {
406
406
  let n = typeof e == "string" ? e : (e == null ? void 0 : e.data) || e;
407
407
  const r = typeof n == "string" ? JSON.parse(n) : n;
408
- s.value.onItemFocused(r);
408
+ a.value.onItemFocused(r);
409
409
  } catch (n) {
410
- console.error("[useGridTabs] Failed to parse onItemFocused event payload:", n), s.value.onItemFocused(e);
410
+ console.error("[useGridTabs] Failed to parse onItemFocused event payload:", n), a.value.onItemFocused(e);
411
411
  }
412
412
  },
413
413
  onTabFocused: (...t) => {
414
414
  let e = t[0];
415
- e && e.nativeEvent && (e = e.nativeEvent), s.value.onTabFocused && s.value.onTabFocused(e);
415
+ e && e.nativeEvent && (e = e.nativeEvent), a.value.onTabFocused && a.value.onTabFocused(e);
416
416
  },
417
417
  onScroll: (...t) => {
418
418
  let e = t[0];
419
- if (e && e.nativeEvent && (e = e.nativeEvent), s.value.onScroll)
419
+ if (e && e.nativeEvent && (e = e.nativeEvent), a.value.onScroll)
420
420
  try {
421
421
  const n = (e == null ? void 0 : e.data) || e;
422
- s.value.onScroll(n);
422
+ a.value.onScroll(n);
423
423
  } catch {
424
- s.value.onScroll(e);
424
+ a.value.onScroll(e);
425
425
  }
426
426
  },
427
427
  onScrollStateChanged: (...t) => {
428
428
  let e = t[0];
429
- if (e && e.nativeEvent && (e = e.nativeEvent), s.value.onScrollStateChanged)
429
+ if (e && e.nativeEvent && (e = e.nativeEvent), a.value.onScrollStateChanged)
430
430
  try {
431
431
  const n = (e == null ? void 0 : e.data) || e;
432
- s.value.onScrollStateChanged(n);
432
+ a.value.onScrollStateChanged(n);
433
433
  } catch {
434
- s.value.onScrollStateChanged(e);
434
+ a.value.onScrollStateChanged(e);
435
435
  }
436
436
  }
437
437
  }));
438
438
  return {
439
439
  tabsDataStr: d,
440
- bindings: G,
441
- tabs: f,
440
+ bindings: O,
441
+ tabs: v,
442
442
  items: b,
443
- initData: A,
444
- setCallbacks: S,
443
+ initData: E,
444
+ setCallbacks: _,
445
445
  updateItem: (t, e) => {
446
- if (!l) {
446
+ if (!c) {
447
447
  console.error("[useGridTabs] ❌ 时机错误: 尚未初始化数据,无法调用 updateItem");
448
448
  return;
449
449
  }
450
- c({ op: "UPDATE_ITEM", itemId: t, payload: e });
450
+ l({ op: "UPDATE_ITEM", itemId: t, payload: e });
451
451
  const n = (r) => {
452
452
  for (const u in e)
453
453
  u === "content" && r.content ? Object.assign(r.content, e.content) : r[u] = e[u];
454
454
  };
455
- if (p) {
455
+ if (y) {
456
456
  const r = b.value.find((u) => u.id === t);
457
457
  r && n(r);
458
458
  } else
459
- for (const r of f.value)
459
+ for (const r of v.value)
460
460
  if (r.items) {
461
- const u = r.items.find((g) => g.id === t);
461
+ const u = r.items.find((f) => f.id === t);
462
462
  if (u) {
463
463
  n(u);
464
464
  break;
465
465
  }
466
466
  }
467
467
  },
468
- dispatchAction: c,
469
- resetInitialization: k,
468
+ dispatchAction: l,
469
+ resetInitialization: $,
470
470
  getFocusState: async () => new Promise((t, e) => {
471
471
  let n = o.value;
472
- typeof o.value.getNativeNode == "function" ? n = o.value.getNativeNode() || o.value : o.value.nativeRef && (n = o.value.nativeRef), _.callUIFunction(n, "getFocusState", [], (r) => {
472
+ typeof o.value.getNativeNode == "function" ? n = o.value.getNativeNode() || o.value : o.value.nativeRef && (n = o.value.nativeRef), G.callUIFunction(n, "getFocusState", [], (r) => {
473
473
  try {
474
474
  const u = typeof r == "string" ? JSON.parse(r) : r;
475
475
  t(u);
@@ -480,18 +480,18 @@ function Fe(o, a) {
480
480
  }),
481
481
  getItemRect: async (t) => new Promise((e, n) => {
482
482
  let r = o.value;
483
- typeof o.value.getNativeNode == "function" ? r = o.value.getNativeNode() || o.value : o.value.nativeRef && (r = o.value.nativeRef), _.callUIFunction(r, "getItemRect", [t], (u) => {
483
+ typeof o.value.getNativeNode == "function" ? r = o.value.getNativeNode() || o.value : o.value.nativeRef && (r = o.value.nativeRef), G.callUIFunction(r, "getItemRect", [t], (u) => {
484
484
  try {
485
- const g = typeof u == "string" ? JSON.parse(u) : u;
486
- e(g);
487
- } catch (g) {
488
- n(g);
485
+ const f = typeof u == "string" ? JSON.parse(u) : u;
486
+ e(f);
487
+ } catch (f) {
488
+ n(f);
489
489
  }
490
490
  });
491
491
  })
492
492
  };
493
493
  }
494
- const ae = "QtKeyboard", re = /* @__PURE__ */ F({
494
+ const re = "QtKeyboard", ae = /* @__PURE__ */ q({
495
495
  __name: "Keyboard",
496
496
  props: {
497
497
  backgroundColor: {},
@@ -507,28 +507,42 @@ const ae = "QtKeyboard", re = /* @__PURE__ */ F({
507
507
  textDelete: {},
508
508
  currentInput: {},
509
509
  autofocus: { type: Boolean },
510
- requestFocus: { type: Boolean }
510
+ requestFocus: { type: Boolean },
511
+ keyboardType: {},
512
+ rememberKeyboardType: { type: Boolean }
511
513
  },
512
514
  emits: ["onInputChanged", "onKeyPressed"],
513
- setup(o, { expose: a }) {
514
- const d = $(), f = z(), b = ae + "_Plugin", l = (f.isPluginActive ? b : ae).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), y = V(
515
- l,
516
- f.pluginPackageName || "com.quicktvui.plugin.extraui",
515
+ setup(o, { expose: s, emit: d }) {
516
+ const v = x(), b = W(), y = re + "_Plugin", m = (b.isPluginActive ? y : re).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), i = z(
517
+ m,
518
+ b.pluginPackageName || "com.quicktvui.plugin.extraui",
517
519
  "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
518
- );
519
- return a({
520
+ ), a = o;
521
+ return me(() => {
522
+ (a.autofocus || a.requestFocus) && setTimeout(() => {
523
+ var P, h;
524
+ const l = ((h = (P = v.value) == null ? void 0 : P.getNativeNode) == null ? void 0 : h.call(P)) || v.value;
525
+ l && G.callUIFunction(l, "requestFocus", [!0]);
526
+ }, 300);
527
+ }), J(() => a.requestFocus, (l) => {
528
+ l && setTimeout(() => {
529
+ var h, S;
530
+ const P = ((S = (h = v.value) == null ? void 0 : h.getNativeNode) == null ? void 0 : S.call(h)) || v.value;
531
+ P && G.callUIFunction(P, "requestFocus", [!0]);
532
+ }, 300);
533
+ }), s({
520
534
  getNativeNode: () => {
521
- var i, s;
522
- return ((s = (i = d.value) == null ? void 0 : i.getNativeNode) == null ? void 0 : s.call(i)) || d.value;
535
+ var l, P;
536
+ return ((P = (l = v.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : P.call(l)) || v.value;
523
537
  },
524
- requestFocus: (...i) => {
525
- var c, E;
526
- const s = ((E = (c = d.value) == null ? void 0 : c.getNativeNode) == null ? void 0 : E.call(c)) || d.value;
527
- s && _.callUIFunction(s, "requestFocus", i);
538
+ requestFocus: (...l) => {
539
+ var h, S;
540
+ const P = ((S = (h = v.value) == null ? void 0 : h.getNativeNode) == null ? void 0 : S.call(h)) || v.value;
541
+ P && G.callUIFunction(P, "requestFocus", l);
528
542
  }
529
- }), (i, s) => (L(), Q(B(y), U({
543
+ }), (l, P) => (Q(), B(U(i), K({
530
544
  ref_key: "nativeRef",
531
- ref: d,
545
+ ref: v,
532
546
  backgroundColor: o.backgroundColor,
533
547
  backgroundGradient: o.backgroundGradient,
534
548
  textColor: o.textColor,
@@ -543,169 +557,171 @@ const ae = "QtKeyboard", re = /* @__PURE__ */ F({
543
557
  currentInput: o.currentInput,
544
558
  autofocus: o.autofocus,
545
559
  requestFocus: o.requestFocus,
546
- onOnInputChanged: s[0] || (s[0] = (c) => i.$emit("onInputChanged", c.nativeEvent)),
547
- onOnKeyPressed: s[1] || (s[1] = (c) => i.$emit("onKeyPressed", c.nativeEvent))
548
- }, i.$attrs), {
560
+ keyboardType: o.keyboardType,
561
+ rememberKeyboardType: o.rememberKeyboardType ?? !0,
562
+ onOnInputChanged: P[0] || (P[0] = (h) => l.$emit("onInputChanged", h.nativeEvent)),
563
+ onOnKeyPressed: P[1] || (P[1] = (h) => l.$emit("onKeyPressed", h.nativeEvent))
564
+ }, l.$attrs), {
549
565
  default: j(() => [
550
- K(i.$slots, "default")
566
+ V(l.$slots, "default")
551
567
  ]),
552
568
  _: 3
553
- }, 16, ["backgroundColor", "backgroundGradient", "textColor", "weakTextColor", "focusBackgroundColor", "focusTextColor", "placeholder", "textFullKeyboard", "textT9Keyboard", "textClear", "textDelete", "currentInput", "autofocus", "requestFocus"]));
569
+ }, 16, ["backgroundColor", "backgroundGradient", "textColor", "weakTextColor", "focusBackgroundColor", "focusTextColor", "placeholder", "textFullKeyboard", "textT9Keyboard", "textClear", "textDelete", "currentInput", "autofocus", "requestFocus", "keyboardType", "rememberKeyboardType"]));
554
570
  }
555
571
  });
556
- let J;
572
+ let X;
557
573
  var fe;
558
574
  try {
559
575
  const o = require("@extscreen/es3-vue");
560
- J = o.registerElement || ((fe = o.default) == null ? void 0 : fe.registerElement);
576
+ X = o.registerElement || ((fe = o.default) == null ? void 0 : fe.registerElement);
561
577
  } catch {
562
578
  }
563
579
  const Se = {
564
580
  install: (o) => {
565
581
  if (!globalThis.__QtKeyboard_registered)
566
- if (J) {
567
- const a = (d, f) => {
568
- J(d, {
582
+ if (X) {
583
+ const s = (d, v) => {
584
+ X(d, {
569
585
  component: {
570
- name: f ? "QtKeyboard_Plugin" : "QtKeyboard",
571
- processEventData(b, p) {
572
- const l = b.handler || b, y = p || (l == null ? void 0 : l.nativeParams) || {};
573
- return l && (l.nativeEvent = y), l;
586
+ name: v ? "QtKeyboard_Plugin" : "QtKeyboard",
587
+ processEventData(b, y) {
588
+ const c = b.handler || b, m = y || (c == null ? void 0 : c.nativeParams) || {};
589
+ return c && (c.nativeEvent = m), c;
574
590
  }
575
591
  }
576
592
  });
577
593
  };
578
- 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");
594
+ s("qt-keyboard", !1), s("qt-keyboard-plugin", !0), s("QtKeyboard", !1), s("QtKeyboard_Plugin", !0), globalThis.__QtKeyboard_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtKeyboard");
579
595
  } else
580
596
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
581
- o.component("Keyboard", re), o.component("qt-keyboard", re);
597
+ o.component("Keyboard", ae), o.component("qt-keyboard", ae);
582
598
  }
583
- }, ie = "QtPortalPool", le = /* @__PURE__ */ F({
599
+ }, ie = "QtPortalPool", le = /* @__PURE__ */ q({
584
600
  __name: "PortalPool",
585
- setup(o, { expose: a }) {
586
- const d = $(), f = z(), b = ie + "_Plugin", l = (f.isPluginActive ? b : ie).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), y = V(
587
- l,
588
- f.pluginPackageName || "com.quicktvui.plugin.glintui"
601
+ setup(o, { expose: s }) {
602
+ const d = x(), v = W(), b = ie + "_Plugin", c = (v.isPluginActive ? b : ie).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), m = z(
603
+ c,
604
+ v.pluginPackageName || "com.quicktvui.plugin.glintui"
589
605
  );
590
- return a({
606
+ return s({
591
607
  getNativeNode: () => {
592
- var i, s;
593
- return ((s = (i = d.value) == null ? void 0 : i.getNativeNode) == null ? void 0 : s.call(i)) || d.value;
608
+ var i, a;
609
+ return ((a = (i = d.value) == null ? void 0 : i.getNativeNode) == null ? void 0 : a.call(i)) || d.value;
594
610
  }
595
- }), (i, s) => (L(), Q(B(y), U({
611
+ }), (i, a) => (Q(), B(U(m), K({
596
612
  ref_key: "nativeRef",
597
613
  ref: d
598
614
  }, i.$attrs), {
599
615
  default: j(() => [
600
- K(i.$slots, "default")
616
+ V(i.$slots, "default")
601
617
  ]),
602
618
  _: 3
603
619
  }, 16));
604
620
  }
605
621
  });
606
- let Y;
622
+ let ee;
607
623
  var be;
608
624
  try {
609
625
  const o = require("@extscreen/es3-vue");
610
- Y = o.registerElement || ((be = o.default) == null ? void 0 : be.registerElement);
626
+ ee = o.registerElement || ((be = o.default) == null ? void 0 : be.registerElement);
611
627
  } catch {
612
628
  }
613
- const _e = {
629
+ const $e = {
614
630
  install: (o) => {
615
631
  if (!globalThis.__QtPortalPool_registered)
616
- if (Y) {
617
- const a = (d, f) => {
618
- Y(d, {
632
+ if (ee) {
633
+ const s = (d, v) => {
634
+ ee(d, {
619
635
  component: {
620
- name: f ? "QtPortalPool_Plugin" : "QtPortalPool",
621
- processEventData(b, p) {
622
- const l = b.handler || b, y = p || (l == null ? void 0 : l.nativeParams) || {};
623
- return l && (l.nativeEvent = y), l;
636
+ name: v ? "QtPortalPool_Plugin" : "QtPortalPool",
637
+ processEventData(b, y) {
638
+ const c = b.handler || b, m = y || (c == null ? void 0 : c.nativeParams) || {};
639
+ return c && (c.nativeEvent = m), c;
624
640
  }
625
641
  }
626
642
  });
627
643
  };
628
- 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");
644
+ s("qt-portal-pool", !1), s("qt-portal-pool-plugin", !0), s("QtPortalPool", !1), s("QtPortalPool_Plugin", !0), globalThis.__QtPortalPool_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtPortalPool");
629
645
  } else
630
646
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
631
647
  o.component("PortalPool", le), o.component("qt-portal-pool", le);
632
648
  }
633
- }, ce = "QtPortalItem", ue = /* @__PURE__ */ F({
649
+ }, ce = "QtPortalItem", ue = /* @__PURE__ */ q({
634
650
  __name: "PortalItem",
635
651
  props: {
636
652
  portalId: {}
637
653
  },
638
- setup(o, { expose: a }) {
639
- const d = $(), f = z(), b = ce + "_Plugin", l = (f.isPluginActive ? b : ce).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), y = V(
640
- l,
641
- f.pluginPackageName || "com.quicktvui.plugin.glintui"
654
+ setup(o, { expose: s }) {
655
+ const d = x(), v = W(), b = ce + "_Plugin", c = (v.isPluginActive ? b : ce).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), m = z(
656
+ c,
657
+ v.pluginPackageName || "com.quicktvui.plugin.glintui"
642
658
  );
643
- return a({
659
+ return s({
644
660
  getNativeNode: () => {
645
- var i, s;
646
- return ((s = (i = d.value) == null ? void 0 : i.getNativeNode) == null ? void 0 : s.call(i)) || d.value;
661
+ var i, a;
662
+ return ((a = (i = d.value) == null ? void 0 : i.getNativeNode) == null ? void 0 : a.call(i)) || d.value;
647
663
  }
648
- }), (i, s) => (L(), Q(B(y), U({
664
+ }), (i, a) => (Q(), B(U(m), K({
649
665
  ref_key: "nativeRef",
650
666
  ref: d,
651
667
  portalId: o.portalId
652
668
  }, i.$attrs), {
653
669
  default: j(() => [
654
- K(i.$slots, "default")
670
+ V(i.$slots, "default")
655
671
  ]),
656
672
  _: 3
657
673
  }, 16, ["portalId"]));
658
674
  }
659
675
  });
660
- let X;
661
- var pe;
676
+ let te;
677
+ var ye;
662
678
  try {
663
679
  const o = require("@extscreen/es3-vue");
664
- X = o.registerElement || ((pe = o.default) == null ? void 0 : pe.registerElement);
680
+ te = o.registerElement || ((ye = o.default) == null ? void 0 : ye.registerElement);
665
681
  } catch {
666
682
  }
667
- const $e = {
683
+ const _e = {
668
684
  install: (o) => {
669
685
  if (!globalThis.__QtPortalItem_registered)
670
- if (X) {
671
- const a = (d, f) => {
672
- X(d, {
686
+ if (te) {
687
+ const s = (d, v) => {
688
+ te(d, {
673
689
  component: {
674
- name: f ? "QtPortalItem_Plugin" : "QtPortalItem",
675
- processEventData(b, p) {
676
- const l = b.handler || b, y = p || (l == null ? void 0 : l.nativeParams) || {};
677
- return l && (l.nativeEvent = y), l;
690
+ name: v ? "QtPortalItem_Plugin" : "QtPortalItem",
691
+ processEventData(b, y) {
692
+ const c = b.handler || b, m = y || (c == null ? void 0 : c.nativeParams) || {};
693
+ return c && (c.nativeEvent = m), c;
678
694
  }
679
695
  }
680
696
  });
681
697
  };
682
- a("qt-portal-item", !1), a("qt-portal-item-plugin", !0), a("QtPortalItem", !1), a("QtPortalItem_Plugin", !0), globalThis.__QtPortalItem_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtPortalItem");
698
+ s("qt-portal-item", !1), s("qt-portal-item-plugin", !0), s("QtPortalItem", !1), s("QtPortalItem_Plugin", !0), globalThis.__QtPortalItem_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtPortalItem");
683
699
  } else
684
700
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
685
701
  o.component("PortalItem", ue), o.component("qt-portal-item", ue);
686
702
  }
687
- }, de = "QtHsvBackground", ve = /* @__PURE__ */ F({
703
+ }, de = "QtHsvBackground", ve = /* @__PURE__ */ q({
688
704
  __name: "HsvBackground",
689
705
  props: {
690
706
  hue: { default: -2 }
691
707
  },
692
- setup(o, { expose: a }) {
693
- const d = $(), f = z(), b = de + "_Plugin", l = (f.isPluginActive ? b : de).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), y = V(
694
- l,
695
- f.pluginPackageName || "com.quicktvui.plugin.glintui"
708
+ setup(o, { expose: s }) {
709
+ const d = x(), v = W(), b = de + "_Plugin", c = (v.isPluginActive ? b : de).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), m = z(
710
+ c,
711
+ v.pluginPackageName || "com.quicktvui.plugin.glintui"
696
712
  );
697
- return a({
713
+ return s({
698
714
  getNativeNode: () => {
699
- var i, s;
700
- return ((s = (i = d.value) == null ? void 0 : i.getNativeNode) == null ? void 0 : s.call(i)) || d.value;
715
+ var i, a;
716
+ return ((a = (i = d.value) == null ? void 0 : i.getNativeNode) == null ? void 0 : a.call(i)) || d.value;
701
717
  }
702
- }), (i, s) => (L(), Q(B(y), U({
718
+ }), (i, a) => (Q(), B(U(m), K({
703
719
  ref_key: "nativeRef",
704
720
  ref: d,
705
721
  hue: o.hue
706
722
  }, i.$attrs), {
707
723
  default: j(() => [
708
- K(i.$slots, "default")
724
+ V(i.$slots, "default")
709
725
  ]),
710
726
  _: 3
711
727
  }, 16, ["hue"]));
@@ -717,9 +733,9 @@ const $e = {
717
733
  }, xe = {
718
734
  // 如果设置为 true,则全局跳过所有组件的原生插件安装检查,直接渲染
719
735
  skipPluginCheck: !1
720
- }, H = /* @__PURE__ */ new Set();
721
- function V(o, a, d) {
722
- return F({
736
+ }, Z = /* @__PURE__ */ new Set();
737
+ function z(o, s, d) {
738
+ return q({
723
739
  name: `${o}AsyncWrapper`,
724
740
  inheritAttrs: !1,
725
741
  props: {
@@ -729,208 +745,208 @@ function V(o, a, d) {
729
745
  default: !1
730
746
  }
731
747
  },
732
- setup(f, { slots: b, attrs: p, expose: l }) {
733
- const y = $("loading"), i = $(""), s = $(), c = globalThis.__VUE_INSTANCE__;
734
- l({
748
+ setup(v, { slots: b, attrs: y, expose: c }) {
749
+ const m = x("loading"), i = x(""), a = x(), l = globalThis.__VUE_INSTANCE__;
750
+ c({
735
751
  getNativeNode: () => {
736
- let m = s.value;
737
- return !m && c && c.vnode && c.vnode.el && (m = c.vnode.el, m.childNodes && m.childNodes.length > 0 && (m = m.childNodes[0])), m;
752
+ let p = a.value;
753
+ return !p && l && l.vnode && l.vnode.el && (p = l.vnode.el, p.childNodes && p.childNodes.length > 0 && (p = p.childNodes[0])), p;
738
754
  },
739
- nativeRef: s
755
+ nativeRef: a
740
756
  });
741
- let x = null, T = null;
757
+ let S = null, I = null;
742
758
  try {
743
- x = ye(), T = we();
744
- } catch (m) {
745
- console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。", m);
759
+ S = pe(), I = we();
760
+ } catch (p) {
761
+ console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。", p);
746
762
  }
747
- const O = async () => {
748
- if (!x || typeof x.isComponentRegistered != "function")
763
+ const D = async () => {
764
+ if (!S || typeof S.isComponentRegistered != "function")
749
765
  return console.log("[withAsyncPlugin] es.isComponentRegistered 不可用"), !1;
750
766
  try {
751
- const m = await x.isComponentRegistered(o);
752
- if (console.log(`[withAsyncPlugin] isComponentRegistered('${o}') 返回:`, m), m === !0 || m && typeof m == "object" && (m.registered === !0 || m.isRegistered === !0))
767
+ const p = await S.isComponentRegistered(o);
768
+ if (console.log(`[withAsyncPlugin] isComponentRegistered('${o}') 返回:`, p), p === !0 || p && typeof p == "object" && (p.registered === !0 || p.isRegistered === !0))
753
769
  return !0;
754
770
  try {
755
- const h = await _.callNativeWithPromise("ExtendModule", "getCoreSDKInfo");
756
- if (h && h.core_version) {
757
- const N = h.core_version;
758
- console.log(`[withAsyncPlugin] 当前引擎核心版本: ${N}`);
759
- const P = N.split(".").map((k) => parseInt(k, 10));
760
- if (P.length >= 3 && !isNaN(P[0]) && !isNaN(P[1]) && !isNaN(P[2]))
761
- if (P[0] * 1e6 + P[1] * 1e3 + P[2] >= 1011205) {
771
+ const A = await G.callNativeWithPromise("ExtendModule", "getCoreSDKInfo");
772
+ if (A && A.core_version) {
773
+ const w = A.core_version;
774
+ console.log(`[withAsyncPlugin] 当前引擎核心版本: ${w}`);
775
+ const T = w.split(".").map(($) => parseInt($, 10));
776
+ if (T.length >= 3 && !isNaN(T[0]) && !isNaN(T[1]) && !isNaN(T[2]))
777
+ if (T[0] * 1e6 + T[1] * 1e3 + T[2] >= 1011205) {
762
778
  console.log(`[withAsyncPlugin] 引擎 >= 1.11.205,使用 ExtendModule 检查 Controller: ${o}`);
763
- const A = o.split("-").map((I) => I.charAt(0).toUpperCase() + I.slice(1)).join("");
764
- console.log(`[withAsyncPlugin] 同时检查原名和驼峰名: ${o}, ${A}`);
765
- const [S, G] = await Promise.all([
766
- _.callNativeWithPromise("ExtendModule", "isComponentRegistered", o).catch(() => !1),
767
- _.callNativeWithPromise("ExtendModule", "isComponentRegistered", A).catch(() => !1)
779
+ const E = o.split("-").map((N) => N.charAt(0).toUpperCase() + N.slice(1)).join("");
780
+ console.log(`[withAsyncPlugin] 同时检查原名和驼峰名: ${o}, ${E}`);
781
+ const [_, O] = await Promise.all([
782
+ G.callNativeWithPromise("ExtendModule", "isComponentRegistered", o).catch(() => !1),
783
+ G.callNativeWithPromise("ExtendModule", "isComponentRegistered", E).catch(() => !1)
768
784
  ]);
769
- if (console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${S}, ${G}]`), S === !0 || G === !0)
785
+ if (console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${_}, ${O}]`), _ === !0 || O === !0)
770
786
  return !0;
771
787
  } else
772
- console.log(`[withAsyncPlugin] 引擎版本 ${N} < 1.11.205,跳过 ExtendModule 检查`);
788
+ console.log(`[withAsyncPlugin] 引擎版本 ${w} < 1.11.205,跳过 ExtendModule 检查`);
773
789
  else
774
- console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${N}`);
790
+ console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${w}`);
775
791
  }
776
- } catch (h) {
777
- console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:", h);
792
+ } catch (A) {
793
+ console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:", A);
778
794
  }
779
795
  return !1;
780
- } catch (m) {
781
- return console.warn("[withAsyncPlugin] 检查组件注册状态异常:", m), !1;
796
+ } catch (p) {
797
+ return console.warn("[withAsyncPlugin] 检查组件注册状态异常:", p), !1;
782
798
  }
783
799
  }, R = async () => {
784
- if (xe.skipPluginCheck || f.skipPluginCheck) {
785
- console.log(`[withAsyncPlugin] 跳过 ${o} 插件检查 (skipPluginCheck = true)`), y.value = "ready";
800
+ if (xe.skipPluginCheck || v.skipPluginCheck) {
801
+ console.log(`[withAsyncPlugin] 跳过 ${o} 插件检查 (skipPluginCheck = true)`), m.value = "ready";
786
802
  return;
787
803
  }
788
- if (!a) {
789
- y.value = "ready";
804
+ if (!s) {
805
+ m.value = "ready";
790
806
  return;
791
807
  }
792
- const m = await O();
793
- if (console.log(`[withAsyncPlugin] 拦截检查 - ${o} 是否已注册:`, m), m || H.has(a)) {
794
- y.value = "ready", H.add(a), console.log("[withAsyncPlugin] 组件已注册,跳过安装流程");
808
+ const p = await D();
809
+ if (console.log(`[withAsyncPlugin] 拦截检查 - ${o} 是否已注册:`, p), p || Z.has(s)) {
810
+ m.value = "ready", Z.add(s), console.log("[withAsyncPlugin] 组件已注册,跳过安装流程");
795
811
  return;
796
812
  }
797
- if (!T) {
798
- console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${o}`), y.value = "ready";
813
+ if (!I) {
814
+ console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${o}`), m.value = "ready";
799
815
  return;
800
816
  }
801
- console.log(`[withAsyncPlugin] 开始动态安装插件: ${a}`);
817
+ console.log(`[withAsyncPlugin] 开始动态安装插件: ${s}`);
802
818
  try {
803
- await new Promise((h, N) => {
804
- let P;
805
- const k = {
806
- onPluginInstallSuccess(A, S, G) {
807
- A === a && (clearTimeout(P), T.removeListener(k), console.log(`[withAsyncPlugin] 安装成功 pkg=${A} 状态码=${S}`), S == 1003 || S == 1001 ? (d ? (console.log(`[withAsyncPlugin] 触发反射初始化: ${d}`), _.callNative("EsNativeModule", "callReflect", {
819
+ await new Promise((A, w) => {
820
+ let T;
821
+ const $ = {
822
+ onPluginInstallSuccess(E, _, O) {
823
+ E === s && (clearTimeout(T), I.removeListener($), console.log(`[withAsyncPlugin] 安装成功 pkg=${E} 状态码=${_}`), _ == 1003 || _ == 1001 ? (d ? (console.log(`[withAsyncPlugin] 触发反射初始化: ${d}`), G.callNative("EsNativeModule", "callReflect", {
808
824
  entry: {
809
825
  from: d,
810
826
  method: "setup"
811
827
  }
812
- })) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"), h()) : N(new Error(`安装失败 pkg=${A} status=${S} msg=${G}`)));
828
+ })) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"), A()) : w(new Error(`安装失败 pkg=${E} status=${_} msg=${O}`)));
813
829
  },
814
- onPluginInstallError(A, S, G) {
815
- A === a && (clearTimeout(P), T.removeListener(k), N(new Error(`安装失败 pkg=${A} status=${S} msg=${G}`)));
830
+ onPluginInstallError(E, _, O) {
831
+ E === s && (clearTimeout(T), I.removeListener($), w(new Error(`安装失败 pkg=${E} status=${_} msg=${O}`)));
816
832
  }
817
833
  };
818
- T.addListener({ pkg: a }, k), P = setTimeout(() => {
819
- T.removeListener(k), N(new Error(`插件安装超时: ${a}`));
820
- }, 8e3), typeof T.installPlugin == "function" ? T.installPlugin({ pkg: a }) : typeof T.install == "function" ? T.install(a) : N(new Error("当前运行时不支持 install / installPlugin"));
821
- }), await Ie(), H.add(a), y.value = "ready";
822
- } catch (h) {
823
- console.error("[withAsyncPlugin] 插件加载失败:", h), i.value = (h == null ? void 0 : h.message) || String(h), y.value = "error";
834
+ I.addListener({ pkg: s }, $), T = setTimeout(() => {
835
+ I.removeListener($), w(new Error(`插件安装超时: ${s}`));
836
+ }, 8e3), typeof I.installPlugin == "function" ? I.installPlugin({ pkg: s }) : typeof I.install == "function" ? I.install(s) : w(new Error("当前运行时不支持 install / installPlugin"));
837
+ }), await Ie(), Z.add(s), m.value = "ready";
838
+ } catch (A) {
839
+ console.error("[withAsyncPlugin] 插件加载失败:", A), i.value = (A == null ? void 0 : A.message) || String(A), m.value = "error";
824
840
  }
825
841
  };
826
- return Ae(() => {
842
+ return me(() => {
827
843
  R();
828
844
  }), () => {
829
- const m = {
845
+ const p = {
830
846
  display: "flex",
831
847
  flexDirection: "column",
832
848
  justifyContent: "center",
833
849
  alignItems: "center",
834
- ...p.style || {}
850
+ ...y.style || {}
835
851
  };
836
- p.width !== void 0 && !m.width && (m.width = typeof p.width == "number" ? `${p.width}px` : p.width), p.height !== void 0 && !m.height && (m.height = typeof p.height == "number" ? `${p.height}px` : p.height);
837
- const h = p.class ? `qt-plugin-container ${p.class}` : "qt-plugin-container", N = {
838
- class: h,
839
- style: m,
852
+ y.width !== void 0 && !p.width && (p.width = typeof y.width == "number" ? `${y.width}px` : y.width), y.height !== void 0 && !p.height && (p.height = typeof y.height == "number" ? `${y.height}px` : y.height);
853
+ const A = y.class ? `qt-plugin-container ${y.class}` : "qt-plugin-container", w = {
854
+ class: A,
855
+ style: p,
840
856
  // 默认关闭外层 div 的裁剪,防止内部组件 focusScale 时被切
841
857
  clipChildren: !1,
842
858
  clipPadding: !1,
843
859
  clipToPadding: !1
844
860
  };
845
- if (y.value === "loading")
846
- return C("div", N, [
847
- C("div", { style: { color: "white", fontSize: "30px" } }, "插件加载中...")
861
+ if (m.value === "loading")
862
+ return L("div", w, [
863
+ L("div", { style: { color: "white", fontSize: "30px" } }, "插件加载中...")
848
864
  ]);
849
- if (y.value === "error")
850
- return C("div", N, [
851
- C("div", { style: { color: "white", fontSize: "30px", backgroundColor: "rgba(255,0,0,0.5)" } }, `插件加载失败: ${i.value}`)
865
+ if (m.value === "error")
866
+ return L("div", w, [
867
+ L("div", { style: { color: "white", fontSize: "30px", backgroundColor: "rgba(255,0,0,0.5)" } }, `插件加载失败: ${i.value}`)
852
868
  ]);
853
- const P = {}, k = {};
854
- for (const [I, D] of Object.entries(p))
855
- if (I.startsWith("on") && typeof D == "function") {
856
- let M = I;
857
- I.startsWith("onOn") && (M = "on" + I.slice(4)), k[M] = D;
858
- } else if (I.startsWith("on") && Array.isArray(D)) {
859
- let M = I;
860
- I.startsWith("onOn") && (M = "on" + I.slice(4)), k[M] = D;
869
+ const T = {}, $ = {};
870
+ for (const [N, F] of Object.entries(y))
871
+ if (N.startsWith("on") && typeof F == "function") {
872
+ let M = N;
873
+ N.startsWith("onOn") && (M = "on" + N.slice(4)), $[M] = F;
874
+ } else if (N.startsWith("on") && Array.isArray(F)) {
875
+ let M = N;
876
+ N.startsWith("onOn") && (M = "on" + N.slice(4)), $[M] = F;
861
877
  } else
862
- I.startsWith("onOn") || (P[I] = D);
863
- const A = {
864
- ...P,
865
- ...k,
866
- class: h,
878
+ N.startsWith("onOn") || (T[N] = F);
879
+ const E = {
880
+ ...T,
881
+ ...$,
882
+ class: A,
867
883
  // 把外层 class 传给内部
868
- style: m,
884
+ style: p,
869
885
  // 把外层 style 传给内部
870
- ref: (I) => {
871
- s.value = I;
886
+ ref: (N) => {
887
+ a.value = N;
872
888
  }
873
- }, S = A.tabsData || "", G = A.actionPayload || "";
874
- return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:", Object.keys(A), "tabsData.length=", S.length, "actionPayload.length=", G.length), C(o, A, b.default ? b.default() : []);
889
+ }, _ = E.tabsData || "", O = E.actionPayload || "";
890
+ return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:", Object.keys(E), "tabsData.length=", _.length, "actionPayload.length=", O.length), L(o, E, b.default ? b.default() : []);
875
891
  };
876
892
  }
877
893
  });
878
894
  }
879
- const me = Symbol("AddonEnvContext"), Pe = {
895
+ const Pe = Symbol("AddonEnvContext"), Te = {
880
896
  isPluginActive: !1,
881
897
  nameSuffix: "",
882
898
  pluginPackageName: "com.quicktvui.plugin.glintui",
883
899
  builtInVersions: {}
884
900
  };
885
- async function Re(o = "com.quicktvui.plugin.glintui", a = "_Plugin") {
886
- const d = ye();
887
- let f = {};
901
+ async function qe(o = "com.quicktvui.plugin.glintui", s = "_Plugin") {
902
+ const d = pe();
903
+ let v = {};
888
904
  try {
889
- const i = await _.callNativeModule("AddonEnvModule", "getBuiltInVersions", []);
890
- i && typeof i == "object" && (f = i);
905
+ const i = await G.callNativeModule("AddonEnvModule", "getBuiltInVersions", []);
906
+ i && typeof i == "object" && (v = i);
891
907
  } catch (i) {
892
908
  console.warn("[AddonProvider] Failed to fetch built-in versions from AddonEnvModule", i);
893
909
  }
894
- const b = `QtGridTabs${a}`, p = d.isComponentRegistered(b), l = p instanceof Promise ? await p : p, y = {
895
- isPluginActive: l,
896
- nameSuffix: l ? a : "",
910
+ const b = `QtGridTabs${s}`, y = d.isComponentRegistered(b), c = y instanceof Promise ? await y : y, m = {
911
+ isPluginActive: c,
912
+ nameSuffix: c ? s : "",
897
913
  // 如果使用了热更插件,包名加上 .ext 后缀(与 Gradle 打包脚本对齐)
898
- pluginPackageName: l ? `${o}.ext` : o,
899
- builtInVersions: f
914
+ pluginPackageName: c ? `${o}.ext` : o,
915
+ builtInVersions: v
900
916
  };
901
- return console.info("[AddonProvider] Environment initialized:", y), y;
917
+ return console.info("[AddonProvider] Environment initialized:", m), m;
902
918
  }
903
- let ee = $(Pe);
904
- function qe(o) {
905
- ee.value = o, Ee(me, ee);
919
+ let ne = x(Te);
920
+ function Re(o) {
921
+ ne.value = o, Ee(Pe, ne);
906
922
  }
907
- function z() {
923
+ function W() {
908
924
  var o;
909
- return ((o = Ne(me, ee)) == null ? void 0 : o.value) || Pe;
925
+ return ((o = Ne(Pe, ne)) == null ? void 0 : o.value) || Te;
910
926
  }
911
927
  const Ce = {
912
928
  install: (o) => {
913
- o.use(ke), o.use(Se), o.use(_e), o.use($e), o.use(Ge);
929
+ o.use(ke), o.use(Se), o.use($e), o.use(_e), o.use(Ge);
914
930
  }
915
931
  };
916
932
  export {
917
- me as ADDON_ENV_CONTEXT_KEY,
918
- W as GridTabs,
933
+ Pe as ADDON_ENV_CONTEXT_KEY,
934
+ H as GridTabs,
919
935
  ke as GridTabsPlugin,
920
936
  ve as HsvBackground,
921
937
  Ge as HsvBackgroundPlugin,
922
- re as Keyboard,
938
+ ae as Keyboard,
923
939
  Se as KeyboardPlugin,
924
940
  ue as PortalItem,
925
- $e as PortalItemPlugin,
941
+ _e as PortalItemPlugin,
926
942
  le as PortalPool,
927
- _e as PortalPoolPlugin,
943
+ $e as PortalPoolPlugin,
928
944
  Ce as QuickTVUINAddons,
929
945
  xe as QuickTVUINAddonsConfig,
930
946
  Ce as default,
931
- Re as initAddonEnv,
932
- qe as provideAddonEnv,
933
- z as useAddonEnv,
934
- Fe as useGridTabs,
935
- V as withAsyncPlugin
947
+ qe as initAddonEnv,
948
+ Re as provideAddonEnv,
949
+ W as useAddonEnv,
950
+ Me as useGridTabs,
951
+ z as withAsyncPlugin
936
952
  };