@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.
- package/dist/components/GridTabs/GridTabs.vue.d.ts +13 -22
- package/dist/components/GridTabs/useGridTabs.d.ts +12 -2
- package/dist/components/Keyboard/Keyboard.vue.d.ts +2 -4
- package/dist/components/SvgImage/SvgImage.vue.d.ts +26 -0
- package/dist/components/SvgImage/index.d.ts +13 -0
- package/dist/core/AddonProvider.d.ts +7 -0
- package/dist/index.d.ts +6 -1
- package/dist/naddons.cjs.js +1 -1
- package/dist/naddons.es.js +732 -487
- package/package.json +1 -1
package/dist/naddons.es.js
CHANGED
|
@@ -1,186 +1,207 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Native as
|
|
3
|
-
import { useES as
|
|
4
|
-
const
|
|
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", "
|
|
13
|
-
setup(o, { expose:
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
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
|
|
18
|
+
return u({
|
|
19
19
|
getNativeNode: () => {
|
|
20
|
-
var
|
|
21
|
-
return ((
|
|
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: (...
|
|
24
|
-
var
|
|
25
|
-
const
|
|
26
|
-
|
|
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
|
-
|
|
29
|
-
var
|
|
30
|
-
const
|
|
31
|
-
|
|
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
|
-
}), (
|
|
53
|
+
}), (a, l) => (q(), R(U(f), Q({
|
|
34
54
|
ref_key: "nativeRef",
|
|
35
|
-
ref:
|
|
55
|
+
ref: c,
|
|
36
56
|
protocolVersion: o.protocolVersion,
|
|
57
|
+
pageSpec: o.pageSpec,
|
|
37
58
|
tabsData: o.tabsData,
|
|
38
59
|
actionPayload: o.actionPayload,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
default:
|
|
52
|
-
|
|
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", "
|
|
76
|
+
}, 16, ["protocolVersion", "pageSpec", "tabsData", "actionPayload"]));
|
|
56
77
|
}
|
|
57
78
|
});
|
|
58
79
|
let Y;
|
|
59
|
-
var
|
|
80
|
+
var be;
|
|
60
81
|
try {
|
|
61
82
|
const o = require("@extscreen/es3-vue");
|
|
62
|
-
Y = o.registerElement || ((
|
|
83
|
+
Y = o.registerElement || ((be = o.default) == null ? void 0 : be.registerElement);
|
|
63
84
|
} catch {
|
|
64
85
|
}
|
|
65
|
-
const
|
|
86
|
+
const xe = {
|
|
66
87
|
install: (o) => {
|
|
67
88
|
if (!globalThis.__QtGridTabs_registered)
|
|
68
89
|
if (Y) {
|
|
69
|
-
const
|
|
70
|
-
Y(
|
|
90
|
+
const u = (c, r) => {
|
|
91
|
+
Y(c, {
|
|
71
92
|
component: {
|
|
72
|
-
name:
|
|
73
|
-
processEventData(b,
|
|
74
|
-
const
|
|
75
|
-
return
|
|
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
|
-
|
|
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",
|
|
104
|
+
o.component("GridTabs", Z), o.component("qt-grid-tabs", Z), o.component("gt-tabs", Z);
|
|
84
105
|
}
|
|
85
106
|
};
|
|
86
|
-
function
|
|
87
|
-
const
|
|
88
|
-
let
|
|
89
|
-
const
|
|
90
|
-
let
|
|
91
|
-
const
|
|
92
|
-
const e = Array.isArray(t) ? t : [t]
|
|
93
|
-
if (
|
|
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(
|
|
116
|
+
console.log("[useGridTabs] Calling Wrapper dispatchAction directly"), o.value.dispatchAction(e);
|
|
96
117
|
return;
|
|
97
118
|
}
|
|
98
|
-
let
|
|
99
|
-
typeof o.value.getNativeNode == "function" ?
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
132
|
+
}, J = (t, e) => {
|
|
112
133
|
if (!t || t.length === 0)
|
|
113
134
|
return;
|
|
114
|
-
|
|
135
|
+
F.clear();
|
|
115
136
|
const n = t[0].hasOwnProperty("tabId") || t[0].hasOwnProperty("items") && Array.isArray(t[0].items);
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}),
|
|
119
|
-
},
|
|
120
|
-
if (!
|
|
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: (
|
|
128
|
-
unitType: (
|
|
129
|
-
contentConfig: (
|
|
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: (
|
|
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: (
|
|
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: (
|
|
168
|
+
animationConfig: (r == null ? void 0 : r.animationConfig) ?? {
|
|
148
169
|
duration: 300,
|
|
149
170
|
easing: "ease-out"
|
|
150
171
|
},
|
|
151
|
-
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: (
|
|
179
|
+
focusConfig: (r == null ? void 0 : r.focusConfig) ?? {
|
|
159
180
|
boundaryLock: { left: !1, right: !1, top: !1, bottom: !1 }
|
|
160
181
|
},
|
|
161
|
-
themeConfig:
|
|
162
|
-
referenceResolution: (
|
|
182
|
+
themeConfig: r == null ? void 0 : r.themeConfig,
|
|
183
|
+
referenceResolution: (r == null ? void 0 : r.referenceResolution) ?? { w: 1920, h: 1080 }
|
|
163
184
|
}, n = [];
|
|
164
|
-
|
|
185
|
+
d ? (e.navConfig = { ...e.navConfig, renderType: "none" }, n = [
|
|
165
186
|
{
|
|
166
|
-
tabId:
|
|
187
|
+
tabId: a,
|
|
167
188
|
title: "Virtual Tab",
|
|
168
189
|
hidden: !0,
|
|
169
|
-
items:
|
|
190
|
+
items: m.value
|
|
170
191
|
}
|
|
171
|
-
]) : n =
|
|
172
|
-
const
|
|
192
|
+
]) : n = b.value;
|
|
193
|
+
const s = JSON.stringify({
|
|
173
194
|
page_spec: e,
|
|
174
195
|
tabs: n
|
|
175
196
|
});
|
|
176
|
-
if (
|
|
177
|
-
console.log(`[useGridTabs] triggerRootUpdate: Initializing tabsDataStr (length=${
|
|
197
|
+
if (c.value === "")
|
|
198
|
+
console.log(`[useGridTabs] triggerRootUpdate: Initializing tabsDataStr (length=${s.length})`), c.value = s, l = s;
|
|
178
199
|
else {
|
|
179
|
-
if (
|
|
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=${
|
|
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
|
-
},
|
|
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,
|
|
198
|
-
const g = Reflect.set(n,
|
|
199
|
-
return t.id &&
|
|
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 =
|
|
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,
|
|
208
|
-
const g = Reflect.set(n,
|
|
209
|
-
return n.id &&
|
|
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
|
-
},
|
|
238
|
+
}, A = (t, e) => {
|
|
218
239
|
for (let n = 0; n < t.length; n++)
|
|
219
|
-
t[n] =
|
|
240
|
+
t[n] = h(t[n]);
|
|
220
241
|
return new Proxy(t, {
|
|
221
|
-
get(n,
|
|
222
|
-
return
|
|
223
|
-
|
|
224
|
-
const g =
|
|
225
|
-
return
|
|
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
|
-
}),
|
|
230
|
-
} :
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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: {
|
|
237
|
-
})
|
|
238
|
-
} :
|
|
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,
|
|
241
|
-
if (
|
|
242
|
-
|
|
243
|
-
const g =
|
|
244
|
-
return g && g.id &&
|
|
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
|
-
}),
|
|
275
|
+
}), I;
|
|
249
276
|
}
|
|
250
|
-
return Reflect.set(n,
|
|
277
|
+
return Reflect.set(n, s, v, p);
|
|
251
278
|
}
|
|
252
279
|
});
|
|
253
|
-
},
|
|
254
|
-
set(e, n,
|
|
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 =
|
|
257
|
-
return Array.isArray(
|
|
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,
|
|
260
|
-
return
|
|
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:
|
|
290
|
+
payload: { loadState: s }
|
|
264
291
|
}), g;
|
|
265
292
|
}
|
|
266
|
-
return Reflect.set(e, n,
|
|
293
|
+
return Reflect.set(e, n, s, v);
|
|
267
294
|
}
|
|
268
|
-
})),
|
|
269
|
-
const e = t.map((n) =>
|
|
295
|
+
})), _ = (t) => {
|
|
296
|
+
const e = t.map((n) => S(n));
|
|
270
297
|
return new Proxy(e, {
|
|
271
|
-
set(n,
|
|
272
|
-
if (
|
|
273
|
-
let g =
|
|
274
|
-
|
|
275
|
-
const
|
|
276
|
-
return
|
|
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,
|
|
305
|
+
return Reflect.set(n, s, v, p);
|
|
279
306
|
}
|
|
280
307
|
});
|
|
281
308
|
};
|
|
282
|
-
|
|
283
|
-
if (console.log("[useGridTabs] watch(tabs) triggered:", { newTabs: t, isInitialized:
|
|
284
|
-
|
|
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"),
|
|
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 =
|
|
292
|
-
Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }),
|
|
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 }),
|
|
295
|
-
if (console.log("[useGridTabs] watch(items) triggered:", { newItems: t, isInitialized:
|
|
296
|
-
|
|
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"),
|
|
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 =
|
|
304
|
-
Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }),
|
|
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
|
|
308
|
-
console.log("[useGridTabs] resetInitialization called manually"),
|
|
309
|
-
for (const t in
|
|
310
|
-
delete
|
|
311
|
-
},
|
|
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
|
-
|
|
340
|
+
c.value = "", f = !1;
|
|
314
341
|
return;
|
|
315
342
|
}
|
|
316
|
-
t[0].hasOwnProperty("tabId") || t[0].hasOwnProperty("items") && Array.isArray(t[0].items) ?
|
|
317
|
-
},
|
|
318
|
-
|
|
319
|
-
},
|
|
320
|
-
tabsData:
|
|
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), !
|
|
351
|
+
if (e && e.nativeEvent && (e = e.nativeEvent), !y.value.onTabNeedsData)
|
|
325
352
|
return;
|
|
326
|
-
const { tabId: n, index:
|
|
327
|
-
if (
|
|
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
|
-
|
|
358
|
+
F.add(n);
|
|
332
359
|
try {
|
|
333
|
-
const
|
|
334
|
-
if (
|
|
335
|
-
if (
|
|
336
|
-
const g =
|
|
337
|
-
g && (g.items ? g.items.length > 0 && g.items.splice(0, g.items.length) : g.items = [], g.items.push(...
|
|
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 (
|
|
345
|
-
console.error("[useGridTabs] onTabNeedsData 执行失败:",
|
|
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), !
|
|
377
|
+
if (e && e.nativeEvent && (e = e.nativeEvent), !y.value.onLoadMore)
|
|
351
378
|
return;
|
|
352
|
-
const { tabId: n, itemId:
|
|
353
|
-
console.log(`[useGridTabs] 拦截到底层 onLoadMore,强行接管页码: tabId=${n}, pageNo=${
|
|
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
|
|
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 (
|
|
359
|
-
|
|
385
|
+
if (N[n] = p, d)
|
|
386
|
+
m.value.push(...g);
|
|
360
387
|
else {
|
|
361
|
-
const
|
|
362
|
-
|
|
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="${
|
|
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),
|
|
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
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}) :
|
|
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),
|
|
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),
|
|
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),
|
|
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
|
-
|
|
394
|
-
|
|
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),
|
|
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),
|
|
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
|
|
408
|
-
|
|
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),
|
|
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),
|
|
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),
|
|
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
|
-
|
|
459
|
+
y.value.onScroll(n);
|
|
423
460
|
} catch {
|
|
424
|
-
|
|
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),
|
|
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
|
-
|
|
469
|
+
y.value.onScrollStateChanged(n);
|
|
433
470
|
} catch {
|
|
434
|
-
|
|
471
|
+
y.value.onScrollStateChanged(e);
|
|
435
472
|
}
|
|
436
473
|
}
|
|
437
474
|
}));
|
|
438
475
|
return {
|
|
439
|
-
tabsDataStr:
|
|
440
|
-
bindings:
|
|
441
|
-
tabs:
|
|
442
|
-
items:
|
|
443
|
-
initData:
|
|
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 (!
|
|
483
|
+
if (!f) {
|
|
447
484
|
console.error("[useGridTabs] ❌ 时机错误: 尚未初始化数据,无法调用 updateItem");
|
|
448
485
|
return;
|
|
449
486
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
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
|
-
|
|
469
|
-
|
|
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),
|
|
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
|
|
475
|
-
t(
|
|
476
|
-
} catch (
|
|
477
|
-
e(
|
|
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
|
|
483
|
-
typeof o.value.getNativeNode == "function" ?
|
|
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
|
|
486
|
-
e(
|
|
487
|
-
} catch (
|
|
488
|
-
n(
|
|
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
|
|
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:
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
|
|
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
|
-
)
|
|
521
|
-
return
|
|
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
|
|
536
|
-
return ((
|
|
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: (...
|
|
539
|
-
var
|
|
540
|
-
const
|
|
541
|
-
|
|
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
|
-
}), (
|
|
720
|
+
}), (a, l) => (q(), R(U(f), Q({
|
|
544
721
|
ref_key: "nativeRef",
|
|
545
|
-
ref:
|
|
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
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
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", "
|
|
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
|
|
749
|
+
var ye;
|
|
574
750
|
try {
|
|
575
751
|
const o = require("@extscreen/es3-vue");
|
|
576
|
-
X = o.registerElement || ((
|
|
752
|
+
X = o.registerElement || ((ye = o.default) == null ? void 0 : ye.registerElement);
|
|
577
753
|
} catch {
|
|
578
754
|
}
|
|
579
|
-
const
|
|
755
|
+
const Ge = {
|
|
580
756
|
install: (o) => {
|
|
581
757
|
if (!globalThis.__QtKeyboard_registered)
|
|
582
758
|
if (X) {
|
|
583
|
-
const
|
|
584
|
-
X(
|
|
759
|
+
const u = (c, r) => {
|
|
760
|
+
X(c, {
|
|
585
761
|
component: {
|
|
586
|
-
name:
|
|
587
|
-
processEventData(b,
|
|
588
|
-
const
|
|
589
|
-
return
|
|
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
|
-
|
|
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",
|
|
773
|
+
o.component("Keyboard", re), o.component("qt-keyboard", re);
|
|
598
774
|
}
|
|
599
|
-
},
|
|
775
|
+
}, ce = "QtPortalPool", ue = /* @__PURE__ */ D({
|
|
600
776
|
__name: "PortalPool",
|
|
601
|
-
setup(o, { expose:
|
|
602
|
-
const
|
|
603
|
-
|
|
604
|
-
|
|
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
|
|
782
|
+
return u({
|
|
607
783
|
getNativeNode: () => {
|
|
608
|
-
var
|
|
609
|
-
return ((
|
|
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
|
-
}), (
|
|
787
|
+
}), (a, l) => (q(), R(U(f), Q({
|
|
612
788
|
ref_key: "nativeRef",
|
|
613
|
-
ref:
|
|
614
|
-
},
|
|
615
|
-
default:
|
|
616
|
-
|
|
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
|
|
799
|
+
var Pe;
|
|
624
800
|
try {
|
|
625
801
|
const o = require("@extscreen/es3-vue");
|
|
626
|
-
ee = o.registerElement || ((
|
|
802
|
+
ee = o.registerElement || ((Pe = o.default) == null ? void 0 : Pe.registerElement);
|
|
627
803
|
} catch {
|
|
628
804
|
}
|
|
629
|
-
const
|
|
805
|
+
const Oe = {
|
|
630
806
|
install: (o) => {
|
|
631
807
|
if (!globalThis.__QtPortalPool_registered)
|
|
632
808
|
if (ee) {
|
|
633
|
-
const
|
|
634
|
-
ee(
|
|
809
|
+
const u = (c, r) => {
|
|
810
|
+
ee(c, {
|
|
635
811
|
component: {
|
|
636
|
-
name:
|
|
637
|
-
processEventData(b,
|
|
638
|
-
const
|
|
639
|
-
return
|
|
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
|
-
|
|
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",
|
|
823
|
+
o.component("PortalPool", ue), o.component("qt-portal-pool", ue);
|
|
648
824
|
}
|
|
649
|
-
},
|
|
825
|
+
}, de = "QtPortalItem", fe = /* @__PURE__ */ D({
|
|
650
826
|
__name: "PortalItem",
|
|
651
827
|
props: {
|
|
652
828
|
portalId: {}
|
|
653
829
|
},
|
|
654
|
-
setup(o, { expose:
|
|
655
|
-
const
|
|
656
|
-
|
|
657
|
-
|
|
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
|
|
835
|
+
return u({
|
|
660
836
|
getNativeNode: () => {
|
|
661
|
-
var
|
|
662
|
-
return ((
|
|
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
|
-
}), (
|
|
840
|
+
}), (a, l) => (q(), R(U(f), Q({
|
|
665
841
|
ref_key: "nativeRef",
|
|
666
|
-
ref:
|
|
842
|
+
ref: c,
|
|
667
843
|
portalId: o.portalId
|
|
668
|
-
},
|
|
669
|
-
default:
|
|
670
|
-
|
|
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
|
|
853
|
+
var Te;
|
|
678
854
|
try {
|
|
679
855
|
const o = require("@extscreen/es3-vue");
|
|
680
|
-
te = o.registerElement || ((
|
|
856
|
+
te = o.registerElement || ((Te = o.default) == null ? void 0 : Te.registerElement);
|
|
681
857
|
} catch {
|
|
682
858
|
}
|
|
683
|
-
const
|
|
859
|
+
const Fe = {
|
|
684
860
|
install: (o) => {
|
|
685
861
|
if (!globalThis.__QtPortalItem_registered)
|
|
686
862
|
if (te) {
|
|
687
|
-
const
|
|
688
|
-
te(
|
|
863
|
+
const u = (c, r) => {
|
|
864
|
+
te(c, {
|
|
689
865
|
component: {
|
|
690
|
-
name:
|
|
691
|
-
processEventData(b,
|
|
692
|
-
const
|
|
693
|
-
return
|
|
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
|
-
|
|
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",
|
|
877
|
+
o.component("PortalItem", fe), o.component("qt-portal-item", fe);
|
|
702
878
|
}
|
|
703
|
-
},
|
|
879
|
+
}, ve = "QtHsvBackground", ge = /* @__PURE__ */ D({
|
|
704
880
|
__name: "HsvBackground",
|
|
705
881
|
props: {
|
|
706
882
|
hue: { default: -2 }
|
|
707
883
|
},
|
|
708
|
-
setup(o, { expose:
|
|
709
|
-
const
|
|
710
|
-
|
|
711
|
-
|
|
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
|
|
889
|
+
return u({
|
|
714
890
|
getNativeNode: () => {
|
|
715
|
-
var
|
|
716
|
-
return ((
|
|
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
|
-
}), (
|
|
894
|
+
}), (a, l) => (q(), R(U(f), Q({
|
|
719
895
|
ref_key: "nativeRef",
|
|
720
|
-
ref:
|
|
896
|
+
ref: c,
|
|
721
897
|
hue: o.hue
|
|
722
|
-
},
|
|
723
|
-
default:
|
|
724
|
-
|
|
898
|
+
}, a.$attrs), {
|
|
899
|
+
default: B(() => [
|
|
900
|
+
j(a.$slots, "default")
|
|
725
901
|
]),
|
|
726
902
|
_: 3
|
|
727
903
|
}, 16, ["hue"]));
|
|
728
904
|
}
|
|
729
|
-
}),
|
|
905
|
+
}), Me = {
|
|
730
906
|
install(o) {
|
|
731
|
-
o.component("qt-hsv-background",
|
|
907
|
+
o.component("qt-hsv-background", ge), o.component("HsvBackground", ge);
|
|
732
908
|
}
|
|
733
|
-
},
|
|
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
|
-
},
|
|
737
|
-
function
|
|
738
|
-
return
|
|
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(
|
|
749
|
-
const
|
|
750
|
-
|
|
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
|
|
753
|
-
return !
|
|
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:
|
|
988
|
+
nativeRef: l
|
|
756
989
|
});
|
|
757
|
-
let
|
|
990
|
+
let G = null, $ = null;
|
|
758
991
|
try {
|
|
759
|
-
|
|
760
|
-
} catch (
|
|
761
|
-
console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。",
|
|
992
|
+
G = he(), $ = Ce();
|
|
993
|
+
} catch (P) {
|
|
994
|
+
console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。", P);
|
|
762
995
|
}
|
|
763
|
-
const
|
|
764
|
-
if (!
|
|
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
|
|
768
|
-
if (console.log(`[withAsyncPlugin] isComponentRegistered('${o}') 返回:`,
|
|
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
|
|
772
|
-
if (
|
|
773
|
-
const
|
|
774
|
-
console.log(`[withAsyncPlugin] 当前引擎核心版本: ${
|
|
775
|
-
const
|
|
776
|
-
if (
|
|
777
|
-
if (
|
|
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
|
|
780
|
-
console.log(`[withAsyncPlugin] 同时检查原名和驼峰名: ${o}, ${
|
|
781
|
-
const [
|
|
782
|
-
|
|
783
|
-
|
|
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 返回: [${
|
|
1018
|
+
if (console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${w}, ${O}]`), w === !0 || O === !0)
|
|
786
1019
|
return !0;
|
|
787
1020
|
} else
|
|
788
|
-
console.log(`[withAsyncPlugin] 引擎版本 ${
|
|
1021
|
+
console.log(`[withAsyncPlugin] 引擎版本 ${A} < 1.11.205,跳过 ExtendModule 检查`);
|
|
789
1022
|
else
|
|
790
|
-
console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${
|
|
1023
|
+
console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${A}`);
|
|
791
1024
|
}
|
|
792
|
-
} catch (
|
|
793
|
-
console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:",
|
|
1025
|
+
} catch (h) {
|
|
1026
|
+
console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:", h);
|
|
794
1027
|
}
|
|
795
1028
|
return !1;
|
|
796
|
-
} catch (
|
|
797
|
-
return console.warn("[withAsyncPlugin] 检查组件注册状态异常:",
|
|
1029
|
+
} catch (P) {
|
|
1030
|
+
return console.warn("[withAsyncPlugin] 检查组件注册状态异常:", P), !1;
|
|
798
1031
|
}
|
|
799
|
-
},
|
|
800
|
-
if (
|
|
801
|
-
console.log(`[withAsyncPlugin] 跳过 ${o} 插件检查 (skipPluginCheck = true)`),
|
|
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 (!
|
|
805
|
-
|
|
1037
|
+
if (!u) {
|
|
1038
|
+
f.value = "ready";
|
|
806
1039
|
return;
|
|
807
1040
|
}
|
|
808
|
-
const
|
|
809
|
-
if (console.log(`[withAsyncPlugin] 拦截检查 - ${o} 是否已注册:`,
|
|
810
|
-
|
|
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 (
|
|
814
|
-
console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${o}`),
|
|
1046
|
+
if (!$) {
|
|
1047
|
+
console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${o}`), f.value = "ready";
|
|
815
1048
|
return;
|
|
816
1049
|
}
|
|
817
|
-
console.log(`[withAsyncPlugin] 开始动态安装插件: ${
|
|
1050
|
+
console.log(`[withAsyncPlugin] 开始动态安装插件: ${u}`);
|
|
818
1051
|
try {
|
|
819
|
-
await new Promise((
|
|
820
|
-
let
|
|
821
|
-
const
|
|
822
|
-
onPluginInstallSuccess(
|
|
823
|
-
|
|
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:
|
|
1058
|
+
from: c,
|
|
826
1059
|
method: "setup"
|
|
827
1060
|
}
|
|
828
|
-
})) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"),
|
|
1061
|
+
})) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"), h()) : A(new Error(`安装失败 pkg=${N} status=${w} msg=${O}`)));
|
|
829
1062
|
},
|
|
830
|
-
onPluginInstallError(
|
|
831
|
-
|
|
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
|
-
|
|
835
|
-
|
|
836
|
-
}, 8e3), typeof
|
|
837
|
-
}), await
|
|
838
|
-
} catch (
|
|
839
|
-
console.error("[withAsyncPlugin] 插件加载失败:",
|
|
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
|
|
843
|
-
|
|
1075
|
+
return ke(() => {
|
|
1076
|
+
F();
|
|
844
1077
|
}), () => {
|
|
845
|
-
const
|
|
1078
|
+
const P = {
|
|
846
1079
|
display: "flex",
|
|
847
1080
|
flexDirection: "column",
|
|
848
1081
|
justifyContent: "center",
|
|
849
1082
|
alignItems: "center",
|
|
850
|
-
...
|
|
1083
|
+
...m.style || {}
|
|
851
1084
|
};
|
|
852
|
-
|
|
853
|
-
const
|
|
854
|
-
class:
|
|
855
|
-
style:
|
|
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 (
|
|
862
|
-
return
|
|
863
|
-
|
|
1094
|
+
if (f.value === "loading")
|
|
1095
|
+
return z("div", A, [
|
|
1096
|
+
z("div", { style: { color: "white", fontSize: "30px" } }, "插件加载中...")
|
|
864
1097
|
]);
|
|
865
|
-
if (
|
|
866
|
-
return
|
|
867
|
-
|
|
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
|
|
870
|
-
for (const [
|
|
871
|
-
if (
|
|
872
|
-
let
|
|
873
|
-
|
|
874
|
-
} else if (
|
|
875
|
-
let
|
|
876
|
-
|
|
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
|
-
|
|
879
|
-
const
|
|
880
|
-
...
|
|
881
|
-
|
|
882
|
-
class:
|
|
1111
|
+
k.startsWith("onOn") || (S[k] = M);
|
|
1112
|
+
const N = {
|
|
1113
|
+
...S,
|
|
1114
|
+
..._,
|
|
1115
|
+
class: h,
|
|
883
1116
|
// 把外层 class 传给内部
|
|
884
|
-
style:
|
|
1117
|
+
style: P,
|
|
885
1118
|
// 把外层 style 传给内部
|
|
886
|
-
ref: (
|
|
887
|
-
|
|
1119
|
+
ref: (k) => {
|
|
1120
|
+
l.value = k;
|
|
888
1121
|
}
|
|
889
|
-
},
|
|
890
|
-
return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:", Object.keys(
|
|
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
|
|
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
|
|
902
|
-
const
|
|
903
|
-
let
|
|
1134
|
+
async function et(o = "com.quicktvui.plugin.glintui", u = "_Plugin") {
|
|
1135
|
+
const c = he();
|
|
1136
|
+
let r = {};
|
|
904
1137
|
try {
|
|
905
|
-
const
|
|
906
|
-
|
|
907
|
-
} catch (
|
|
908
|
-
console.warn("[AddonProvider] Failed to fetch built-in versions from AddonEnvModule",
|
|
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${
|
|
911
|
-
isPluginActive:
|
|
912
|
-
nameSuffix:
|
|
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:
|
|
915
|
-
builtInVersions:
|
|
1147
|
+
pluginPackageName: d ? `${o}.ext` : o,
|
|
1148
|
+
builtInVersions: r
|
|
916
1149
|
};
|
|
917
|
-
return console.info("[AddonProvider] Environment initialized:",
|
|
1150
|
+
return console.info("[AddonProvider] Environment initialized:", f), f;
|
|
918
1151
|
}
|
|
919
|
-
let
|
|
920
|
-
function
|
|
921
|
-
|
|
1152
|
+
let oe = x(Ee);
|
|
1153
|
+
function tt(o) {
|
|
1154
|
+
oe.value = o, we(Ne, oe);
|
|
922
1155
|
}
|
|
923
|
-
function
|
|
1156
|
+
function V() {
|
|
924
1157
|
var o;
|
|
925
|
-
return ((o = Ne
|
|
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
|
|
1169
|
+
const ot = {
|
|
928
1170
|
install: (o) => {
|
|
929
|
-
o.use(
|
|
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
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
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
|
};
|