@quicktvui/naddons 1.0.0-beta.1 → 1.0.0-rc.1

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