@lynx-js/web-core-wasm-canary 0.0.2-canary-20260129-92881e7c → 0.0.2-canary-20260129-d02a6062
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/CHANGELOG.md +3 -3
- package/binary/client/client.d.ts +99 -99
- package/binary/client/client.js +381 -391
- package/binary/client/client_bg.wasm +0 -0
- package/binary/client/client_bg.wasm.d.ts +41 -40
- package/binary/client/client_debug.d.ts +102 -102
- package/binary/client/client_debug.js +381 -391
- package/binary/client/client_debug_bg.wasm +0 -0
- package/binary/client/client_debug_bg.wasm.d.ts +44 -43
- package/binary/encode/encode.d.ts +10 -59
- package/binary/encode/encode.js +151 -330
- package/binary/encode/encode_bg.wasm +0 -0
- package/binary/encode/encode_bg.wasm.d.ts +4 -24
- package/binary/encode/encode_debug.d.ts +10 -59
- package/binary/encode/encode_debug.js +82 -333
- package/binary/encode/encode_debug_bg.wasm +0 -0
- package/binary/encode/encode_debug_bg.wasm.d.ts +5 -25
- package/dist/client/decodeWorker/cssLoader.d.ts +1 -1
- package/dist/client/decodeWorker/cssLoader.js +2 -3
- package/dist/client/decodeWorker/decode.worker.js +4 -3
- package/dist/client/mainthread/LynxViewInstance.d.ts +1 -5
- package/dist/client/mainthread/LynxViewInstance.js +8 -16
- package/dist/client/mainthread/TemplateManager.d.ts +0 -1
- package/dist/client/mainthread/TemplateManager.js +5 -29
- package/dist/client/mainthread/elementAPIs/WASMJSBinding.d.ts +4 -10
- package/dist/client/mainthread/elementAPIs/WASMJSBinding.js +14 -19
- package/dist/client/mainthread/elementAPIs/createElementAPI.d.ts +1 -1
- package/dist/client/mainthread/elementAPIs/createElementAPI.js +60 -84
- package/dist/client/wasm.d.ts +1 -9
- package/dist/client/wasm.js +3 -17
- package/dist/client/webElementsDynamicLoader.d.ts +0 -7
- package/dist/client/webElementsDynamicLoader.js +3 -72
- package/dist/client_prod/static/js/async/web-core-main-chunk.js +1 -303
- package/dist/client_prod/static/js/async/web-core-template-loader-thread.js +4 -4
- package/dist/client_prod/static/js/async/web-elements.js +309 -0
- package/dist/client_prod/static/js/client.js +2 -2
- package/dist/client_prod/static/wasm/a156b496.module.wasm +0 -0
- package/dist/encode/webEncoder.js +1 -16
- package/dist/types/DecodedTemplate.d.ts +0 -3
- package/dist/types/IElementPAPI.d.ts +0 -2
- package/dist/types/IMtsBinding.d.ts +4 -1
- package/package.json +3 -4
- package/dist/client/mainthread/StyleManager.d.ts +0 -15
- package/dist/client/mainthread/StyleManager.js +0 -72
- package/dist/client_prod/static/js/async/web-elements-audio.js +0 -1
- package/dist/client_prod/static/js/async/web-elements-foldview.js +0 -1
- package/dist/client_prod/static/js/async/web-elements-input.js +0 -1
- package/dist/client_prod/static/js/async/web-elements-list.js +0 -1
- package/dist/client_prod/static/js/async/web-elements-overlay.js +0 -1
- package/dist/client_prod/static/js/async/web-elements-refrshview.js +0 -1
- package/dist/client_prod/static/js/async/web-elements-swiper.js +0 -1
- package/dist/client_prod/static/js/async/web-elements-textarea.js +0 -1
- package/dist/client_prod/static/js/async/web-elements-viewpager.js +0 -1
- package/dist/client_prod/static/wasm/aa6eb16a.module.wasm +0 -0
- package/dist/encode/encodeElementTemplate.d.ts +0 -2
- package/dist/encode/encodeElementTemplate.js +0 -52
- /package/dist/client_prod/static/css/async/{web-core-main-chunk.css → web-elements.css} +0 -0
|
@@ -1,144 +1,5 @@
|
|
|
1
1
|
/* @ts-self-types="./client_debug.d.ts" */
|
|
2
2
|
|
|
3
|
-
export class DecodedStyleData {
|
|
4
|
-
__destroy_into_raw() {
|
|
5
|
-
const ptr = this.__wbg_ptr;
|
|
6
|
-
this.__wbg_ptr = 0;
|
|
7
|
-
DecodedStyleDataFinalization.unregister(this);
|
|
8
|
-
return ptr;
|
|
9
|
-
}
|
|
10
|
-
free() {
|
|
11
|
-
const ptr = this.__destroy_into_raw();
|
|
12
|
-
wasm.__wbg_decodedstyledata_free(ptr, 0);
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @param {Uint8Array} buffer
|
|
16
|
-
* @param {string | null | undefined} entry_name
|
|
17
|
-
* @param {boolean} config_enable_css_selector
|
|
18
|
-
* @returns {Uint8Array}
|
|
19
|
-
*/
|
|
20
|
-
static decode_into(buffer, entry_name, config_enable_css_selector) {
|
|
21
|
-
var ptr0 = isLikeNone(entry_name) ? 0 : passStringToWasm0(entry_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
22
|
-
var len0 = WASM_VECTOR_LEN;
|
|
23
|
-
const ret = wasm.decodedstyledata_decode_into(buffer, ptr0, len0, config_enable_css_selector);
|
|
24
|
-
if (ret[2]) {
|
|
25
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
26
|
-
}
|
|
27
|
-
return takeFromExternrefTable0(ret[0]);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* @param {RawStyleInfo} raw_style_info
|
|
31
|
-
* @param {boolean} config_enable_css_selector
|
|
32
|
-
* @param {string | null} [entry_name]
|
|
33
|
-
* @returns {Uint8Array}
|
|
34
|
-
*/
|
|
35
|
-
static encode_from_raw_style_info(raw_style_info, config_enable_css_selector, entry_name) {
|
|
36
|
-
_assertClass(raw_style_info, RawStyleInfo);
|
|
37
|
-
var ptr0 = raw_style_info.__destroy_into_raw();
|
|
38
|
-
var ptr1 = isLikeNone(entry_name) ? 0 : passStringToWasm0(entry_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
39
|
-
var len1 = WASM_VECTOR_LEN;
|
|
40
|
-
const ret = wasm.decodedstyledata_encode_from_raw_style_info(ptr0, config_enable_css_selector, ptr1, len1);
|
|
41
|
-
if (ret[2]) {
|
|
42
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
43
|
-
}
|
|
44
|
-
return takeFromExternrefTable0(ret[0]);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* @returns {string}
|
|
48
|
-
*/
|
|
49
|
-
get font_face_content() {
|
|
50
|
-
let deferred1_0;
|
|
51
|
-
let deferred1_1;
|
|
52
|
-
try {
|
|
53
|
-
const ret = wasm.decodedstyledata_font_face_content(this.__wbg_ptr);
|
|
54
|
-
deferred1_0 = ret[0];
|
|
55
|
-
deferred1_1 = ret[1];
|
|
56
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
57
|
-
} finally {
|
|
58
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* @param {Uint8Array} buffer
|
|
63
|
-
*/
|
|
64
|
-
constructor(buffer) {
|
|
65
|
-
const ret = wasm.decodedstyledata_new(buffer);
|
|
66
|
-
if (ret[2]) {
|
|
67
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
68
|
-
}
|
|
69
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
70
|
-
DecodedStyleDataFinalization.register(this, this.__wbg_ptr, this);
|
|
71
|
-
return this;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* @param {number} css_id
|
|
75
|
-
* @param {string[]} class_name
|
|
76
|
-
* @returns {string}
|
|
77
|
-
*/
|
|
78
|
-
query_css_og_declarations_by_css_id(css_id, class_name) {
|
|
79
|
-
let deferred2_0;
|
|
80
|
-
let deferred2_1;
|
|
81
|
-
try {
|
|
82
|
-
const ptr0 = passArrayJsValueToWasm0(class_name, wasm.__wbindgen_malloc);
|
|
83
|
-
const len0 = WASM_VECTOR_LEN;
|
|
84
|
-
const ret = wasm.decodedstyledata_query_css_og_declarations_by_css_id(this.__wbg_ptr, css_id, ptr0, len0);
|
|
85
|
-
deferred2_0 = ret[0];
|
|
86
|
-
deferred2_1 = ret[1];
|
|
87
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
88
|
-
} finally {
|
|
89
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* @returns {string}
|
|
94
|
-
*/
|
|
95
|
-
get style_content() {
|
|
96
|
-
let deferred1_0;
|
|
97
|
-
let deferred1_1;
|
|
98
|
-
try {
|
|
99
|
-
const ret = wasm.decodedstyledata_style_content(this.__wbg_ptr);
|
|
100
|
-
deferred1_0 = ret[0];
|
|
101
|
-
deferred1_1 = ret[1];
|
|
102
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
103
|
-
} finally {
|
|
104
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
if (Symbol.dispose) DecodedStyleData.prototype[Symbol.dispose] = DecodedStyleData.prototype.free;
|
|
109
|
-
|
|
110
|
-
export class ElementTemplateSection {
|
|
111
|
-
static __wrap(ptr) {
|
|
112
|
-
ptr = ptr >>> 0;
|
|
113
|
-
const obj = Object.create(ElementTemplateSection.prototype);
|
|
114
|
-
obj.__wbg_ptr = ptr;
|
|
115
|
-
ElementTemplateSectionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
116
|
-
return obj;
|
|
117
|
-
}
|
|
118
|
-
__destroy_into_raw() {
|
|
119
|
-
const ptr = this.__wbg_ptr;
|
|
120
|
-
this.__wbg_ptr = 0;
|
|
121
|
-
ElementTemplateSectionFinalization.unregister(this);
|
|
122
|
-
return ptr;
|
|
123
|
-
}
|
|
124
|
-
free() {
|
|
125
|
-
const ptr = this.__destroy_into_raw();
|
|
126
|
-
wasm.__wbg_elementtemplatesection_free(ptr, 0);
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* @param {Uint8Array} buffer
|
|
130
|
-
* @returns {ElementTemplateSection}
|
|
131
|
-
*/
|
|
132
|
-
static from_encoded(buffer) {
|
|
133
|
-
const ret = wasm.elementtemplatesection_from_encoded(buffer);
|
|
134
|
-
if (ret[2]) {
|
|
135
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
136
|
-
}
|
|
137
|
-
return ElementTemplateSection.__wrap(ret[0]);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
if (Symbol.dispose) ElementTemplateSection.prototype[Symbol.dispose] = ElementTemplateSection.prototype.free;
|
|
141
|
-
|
|
142
3
|
/**
|
|
143
4
|
*
|
|
144
5
|
* * for return of __GetEvents
|
|
@@ -165,18 +26,18 @@ export class EventInfo {
|
|
|
165
26
|
/**
|
|
166
27
|
* @returns {any}
|
|
167
28
|
*/
|
|
168
|
-
get
|
|
169
|
-
const ret = wasm.
|
|
29
|
+
get event_handler() {
|
|
30
|
+
const ret = wasm.__wbg_get_eventinfo_event_handler(this.__wbg_ptr);
|
|
170
31
|
return ret;
|
|
171
32
|
}
|
|
172
33
|
/**
|
|
173
34
|
* @returns {string}
|
|
174
35
|
*/
|
|
175
|
-
get
|
|
36
|
+
get event_name() {
|
|
176
37
|
let deferred1_0;
|
|
177
38
|
let deferred1_1;
|
|
178
39
|
try {
|
|
179
|
-
const ret = wasm.
|
|
40
|
+
const ret = wasm.__wbg_get_eventinfo_event_name(this.__wbg_ptr);
|
|
180
41
|
deferred1_0 = ret[0];
|
|
181
42
|
deferred1_1 = ret[1];
|
|
182
43
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -187,11 +48,11 @@ export class EventInfo {
|
|
|
187
48
|
/**
|
|
188
49
|
* @returns {string}
|
|
189
50
|
*/
|
|
190
|
-
get
|
|
51
|
+
get event_type() {
|
|
191
52
|
let deferred1_0;
|
|
192
53
|
let deferred1_1;
|
|
193
54
|
try {
|
|
194
|
-
const ret = wasm.
|
|
55
|
+
const ret = wasm.__wbg_get_eventinfo_event_type(this.__wbg_ptr);
|
|
195
56
|
deferred1_0 = ret[0];
|
|
196
57
|
deferred1_1 = ret[1];
|
|
197
58
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -202,24 +63,24 @@ export class EventInfo {
|
|
|
202
63
|
/**
|
|
203
64
|
* @param {any} arg0
|
|
204
65
|
*/
|
|
205
|
-
set
|
|
206
|
-
wasm.
|
|
66
|
+
set event_handler(arg0) {
|
|
67
|
+
wasm.__wbg_set_eventinfo_event_handler(this.__wbg_ptr, arg0);
|
|
207
68
|
}
|
|
208
69
|
/**
|
|
209
70
|
* @param {string} arg0
|
|
210
71
|
*/
|
|
211
|
-
set
|
|
72
|
+
set event_name(arg0) {
|
|
212
73
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
213
74
|
const len0 = WASM_VECTOR_LEN;
|
|
214
|
-
wasm.
|
|
75
|
+
wasm.__wbg_set_eventinfo_event_name(this.__wbg_ptr, ptr0, len0);
|
|
215
76
|
}
|
|
216
77
|
/**
|
|
217
78
|
* @param {string} arg0
|
|
218
79
|
*/
|
|
219
|
-
set
|
|
80
|
+
set event_type(arg0) {
|
|
220
81
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
221
82
|
const len0 = WASM_VECTOR_LEN;
|
|
222
|
-
wasm.
|
|
83
|
+
wasm.__wbg_set_eventinfo_event_type(this.__wbg_ptr, ptr0, len0);
|
|
223
84
|
}
|
|
224
85
|
}
|
|
225
86
|
if (Symbol.dispose) EventInfo.prototype[Symbol.dispose] = EventInfo.prototype.free;
|
|
@@ -235,17 +96,57 @@ export class MainThreadWasmContext {
|
|
|
235
96
|
const ptr = this.__destroy_into_raw();
|
|
236
97
|
wasm.__wbg_mainthreadwasmcontext_free(ptr, 0);
|
|
237
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* @param {number} unique_id
|
|
101
|
+
* @param {string} event_type
|
|
102
|
+
* @param {string} event_name
|
|
103
|
+
* @param {string | null} [event_handler_identifier]
|
|
104
|
+
*/
|
|
105
|
+
add_cross_thread_event(unique_id, event_type, event_name, event_handler_identifier) {
|
|
106
|
+
const ptr0 = passStringToWasm0(event_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
107
|
+
const len0 = WASM_VECTOR_LEN;
|
|
108
|
+
const ptr1 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
109
|
+
const len1 = WASM_VECTOR_LEN;
|
|
110
|
+
var ptr2 = isLikeNone(event_handler_identifier) ? 0 : passStringToWasm0(event_handler_identifier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
111
|
+
var len2 = WASM_VECTOR_LEN;
|
|
112
|
+
wasm.mainthreadwasmcontext_add_cross_thread_event(this.__wbg_ptr, unique_id, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
113
|
+
}
|
|
238
114
|
/**
|
|
239
115
|
* @param {number} unique_id
|
|
240
116
|
* @param {any} key
|
|
241
117
|
* @param {any} value
|
|
242
118
|
*/
|
|
243
|
-
|
|
244
|
-
const ret = wasm.
|
|
119
|
+
add_dataset(unique_id, key, value) {
|
|
120
|
+
const ret = wasm.mainthreadwasmcontext_add_dataset(this.__wbg_ptr, unique_id, key, value);
|
|
245
121
|
if (ret[1]) {
|
|
246
122
|
throw takeFromExternrefTable0(ret[0]);
|
|
247
123
|
}
|
|
248
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* @param {number} unique_id
|
|
127
|
+
* @param {string} event_type
|
|
128
|
+
* @param {string} event_name
|
|
129
|
+
* @param {any | null} [event_handler_identifier]
|
|
130
|
+
*/
|
|
131
|
+
add_run_worklet_event(unique_id, event_type, event_name, event_handler_identifier) {
|
|
132
|
+
const ptr0 = passStringToWasm0(event_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
133
|
+
const len0 = WASM_VECTOR_LEN;
|
|
134
|
+
const ptr1 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
135
|
+
const len1 = WASM_VECTOR_LEN;
|
|
136
|
+
wasm.mainthreadwasmcontext_add_run_worklet_event(this.__wbg_ptr, unique_id, ptr0, len0, ptr1, len1, isLikeNone(event_handler_identifier) ? 0 : addToExternrefTable0(event_handler_identifier));
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* @param {any} event
|
|
140
|
+
* @param {Uint32Array} bubble_unique_id_path
|
|
141
|
+
* @param {string} event_name
|
|
142
|
+
*/
|
|
143
|
+
common_event_handler(event, bubble_unique_id_path, event_name) {
|
|
144
|
+
const ptr0 = passArray32ToWasm0(bubble_unique_id_path, wasm.__wbindgen_malloc);
|
|
145
|
+
const len0 = WASM_VECTOR_LEN;
|
|
146
|
+
const ptr1 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
147
|
+
const len1 = WASM_VECTOR_LEN;
|
|
148
|
+
wasm.mainthreadwasmcontext_common_event_handler(this.__wbg_ptr, event, ptr0, len0, ptr1, len1);
|
|
149
|
+
}
|
|
249
150
|
/**
|
|
250
151
|
* @param {number} parent_component_unique_id
|
|
251
152
|
* @param {HTMLElement} dom
|
|
@@ -253,18 +154,33 @@ export class MainThreadWasmContext {
|
|
|
253
154
|
* @param {string | null} [component_id]
|
|
254
155
|
* @returns {number}
|
|
255
156
|
*/
|
|
256
|
-
|
|
157
|
+
create_element_common(parent_component_unique_id, dom, css_id, component_id) {
|
|
257
158
|
var ptr0 = isLikeNone(component_id) ? 0 : passStringToWasm0(component_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
258
159
|
var len0 = WASM_VECTOR_LEN;
|
|
259
|
-
const ret = wasm.
|
|
160
|
+
const ret = wasm.mainthreadwasmcontext_create_element_common(this.__wbg_ptr, parent_component_unique_id, dom, isLikeNone(css_id) ? 0x100000001 : (css_id) >> 0, ptr0, len0);
|
|
260
161
|
return ret >>> 0;
|
|
261
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* @param {Uint32Array} bubble_unique_id_path
|
|
165
|
+
* @param {string} event_name
|
|
166
|
+
* @param {boolean} is_capture
|
|
167
|
+
* @param {any} serialized_event
|
|
168
|
+
* @returns {boolean}
|
|
169
|
+
*/
|
|
170
|
+
dispatch_event_by_path(bubble_unique_id_path, event_name, is_capture, serialized_event) {
|
|
171
|
+
const ptr0 = passArray32ToWasm0(bubble_unique_id_path, wasm.__wbindgen_malloc);
|
|
172
|
+
const len0 = WASM_VECTOR_LEN;
|
|
173
|
+
const ptr1 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
174
|
+
const len1 = WASM_VECTOR_LEN;
|
|
175
|
+
const ret = wasm.mainthreadwasmcontext_dispatch_event_by_path(this.__wbg_ptr, ptr0, len0, ptr1, len1, is_capture, serialized_event);
|
|
176
|
+
return ret !== 0;
|
|
177
|
+
}
|
|
262
178
|
/**
|
|
263
179
|
* @param {number} unique_id
|
|
264
180
|
* @returns {string | undefined}
|
|
265
181
|
*/
|
|
266
|
-
|
|
267
|
-
const ret = wasm.
|
|
182
|
+
get_component_id(unique_id) {
|
|
183
|
+
const ret = wasm.mainthreadwasmcontext_get_component_id(this.__wbg_ptr, unique_id);
|
|
268
184
|
if (ret[3]) {
|
|
269
185
|
throw takeFromExternrefTable0(ret[2]);
|
|
270
186
|
}
|
|
@@ -279,22 +195,30 @@ export class MainThreadWasmContext {
|
|
|
279
195
|
* @param {number} unique_id
|
|
280
196
|
* @returns {object}
|
|
281
197
|
*/
|
|
282
|
-
|
|
283
|
-
const ret = wasm.
|
|
198
|
+
get_config(unique_id) {
|
|
199
|
+
const ret = wasm.mainthreadwasmcontext_get_config(this.__wbg_ptr, unique_id);
|
|
284
200
|
if (ret[2]) {
|
|
285
201
|
throw takeFromExternrefTable0(ret[1]);
|
|
286
202
|
}
|
|
287
203
|
return takeFromExternrefTable0(ret[0]);
|
|
288
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
* @param {number} unique_id
|
|
207
|
+
* @returns {number | undefined}
|
|
208
|
+
*/
|
|
209
|
+
get_css_id_by_unique_id(unique_id) {
|
|
210
|
+
const ret = wasm.mainthreadwasmcontext_get_css_id_by_unique_id(this.__wbg_ptr, unique_id);
|
|
211
|
+
return ret === 0x100000001 ? undefined : ret;
|
|
212
|
+
}
|
|
289
213
|
/**
|
|
290
214
|
* @param {number} unique_id
|
|
291
215
|
* @param {string} key
|
|
292
216
|
* @returns {any}
|
|
293
217
|
*/
|
|
294
|
-
|
|
218
|
+
get_data_by_key(unique_id, key) {
|
|
295
219
|
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
296
220
|
const len0 = WASM_VECTOR_LEN;
|
|
297
|
-
const ret = wasm.
|
|
221
|
+
const ret = wasm.mainthreadwasmcontext_get_data_by_key(this.__wbg_ptr, unique_id, ptr0, len0);
|
|
298
222
|
if (ret[2]) {
|
|
299
223
|
throw takeFromExternrefTable0(ret[1]);
|
|
300
224
|
}
|
|
@@ -304,19 +228,27 @@ export class MainThreadWasmContext {
|
|
|
304
228
|
* @param {number} unique_id
|
|
305
229
|
* @returns {object}
|
|
306
230
|
*/
|
|
307
|
-
|
|
308
|
-
const ret = wasm.
|
|
231
|
+
get_dataset(unique_id) {
|
|
232
|
+
const ret = wasm.mainthreadwasmcontext_get_dataset(this.__wbg_ptr, unique_id);
|
|
309
233
|
if (ret[2]) {
|
|
310
234
|
throw takeFromExternrefTable0(ret[1]);
|
|
311
235
|
}
|
|
312
236
|
return takeFromExternrefTable0(ret[0]);
|
|
313
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* @param {number} unique_id
|
|
240
|
+
* @returns {HTMLElement | undefined}
|
|
241
|
+
*/
|
|
242
|
+
get_dom_by_unique_id(unique_id) {
|
|
243
|
+
const ret = wasm.mainthreadwasmcontext_get_dom_by_unique_id(this.__wbg_ptr, unique_id);
|
|
244
|
+
return ret;
|
|
245
|
+
}
|
|
314
246
|
/**
|
|
315
247
|
* @param {number} unique_id
|
|
316
248
|
* @returns {object | undefined}
|
|
317
249
|
*/
|
|
318
|
-
|
|
319
|
-
const ret = wasm.
|
|
250
|
+
get_element_config(unique_id) {
|
|
251
|
+
const ret = wasm.mainthreadwasmcontext_get_element_config(this.__wbg_ptr, unique_id);
|
|
320
252
|
if (ret[2]) {
|
|
321
253
|
throw takeFromExternrefTable0(ret[1]);
|
|
322
254
|
}
|
|
@@ -328,236 +260,141 @@ export class MainThreadWasmContext {
|
|
|
328
260
|
* @param {string} event_type
|
|
329
261
|
* @returns {any}
|
|
330
262
|
*/
|
|
331
|
-
|
|
263
|
+
get_event(unique_id, event_name, event_type) {
|
|
332
264
|
const ptr0 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
333
265
|
const len0 = WASM_VECTOR_LEN;
|
|
334
266
|
const ptr1 = passStringToWasm0(event_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
335
267
|
const len1 = WASM_VECTOR_LEN;
|
|
336
|
-
const ret = wasm.
|
|
268
|
+
const ret = wasm.mainthreadwasmcontext_get_event(this.__wbg_ptr, unique_id, ptr0, len0, ptr1, len1);
|
|
337
269
|
return ret;
|
|
338
270
|
}
|
|
339
271
|
/**
|
|
340
272
|
* @param {number} unique_id
|
|
341
273
|
* @returns {EventInfo[]}
|
|
342
274
|
*/
|
|
343
|
-
|
|
344
|
-
const ret = wasm.
|
|
275
|
+
get_events(unique_id) {
|
|
276
|
+
const ret = wasm.mainthreadwasmcontext_get_events(this.__wbg_ptr, unique_id);
|
|
345
277
|
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
346
278
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
347
279
|
return v1;
|
|
348
280
|
}
|
|
349
281
|
/**
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
* * value: stringifyed js value
|
|
353
|
-
*
|
|
354
|
-
* @param {number} unique_id
|
|
355
|
-
* @param {object} config
|
|
282
|
+
* @param {string} component_id
|
|
283
|
+
* @returns {number | undefined}
|
|
356
284
|
*/
|
|
357
|
-
|
|
358
|
-
const
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
285
|
+
get_unique_id_by_component_id(component_id) {
|
|
286
|
+
const ptr0 = passStringToWasm0(component_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
287
|
+
const len0 = WASM_VECTOR_LEN;
|
|
288
|
+
const ret = wasm.mainthreadwasmcontext_get_unique_id_by_component_id(this.__wbg_ptr, ptr0, len0);
|
|
289
|
+
return ret === 0x100000001 ? undefined : ret;
|
|
362
290
|
}
|
|
363
291
|
/**
|
|
364
|
-
* @param {
|
|
365
|
-
* @param {
|
|
366
|
-
* @param {
|
|
292
|
+
* @param {Node} root_node
|
|
293
|
+
* @param {any} mts_binding
|
|
294
|
+
* @param {boolean} config_enable_css_selector
|
|
367
295
|
*/
|
|
368
|
-
|
|
369
|
-
const ret = wasm.
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
296
|
+
constructor(root_node, mts_binding, config_enable_css_selector) {
|
|
297
|
+
const ret = wasm.mainthreadwasmcontext_new(root_node, mts_binding, config_enable_css_selector);
|
|
298
|
+
this.__wbg_ptr = ret >>> 0;
|
|
299
|
+
MainThreadWasmContextFinalization.register(this, this.__wbg_ptr, this);
|
|
300
|
+
return this;
|
|
373
301
|
}
|
|
374
302
|
/**
|
|
375
|
-
* @param {
|
|
376
|
-
* @param {string
|
|
303
|
+
* @param {TemplateManager} template_manager
|
|
304
|
+
* @param {string} entry_name
|
|
305
|
+
* @param {boolean} is_entry_template
|
|
377
306
|
*/
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
const
|
|
307
|
+
push_style_sheet(template_manager, entry_name, is_entry_template) {
|
|
308
|
+
_assertClass(template_manager, TemplateManager);
|
|
309
|
+
const ptr0 = passStringToWasm0(entry_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
310
|
+
const len0 = WASM_VECTOR_LEN;
|
|
311
|
+
const ret = wasm.mainthreadwasmcontext_push_style_sheet(this.__wbg_ptr, template_manager.__wbg_ptr, ptr0, len0, is_entry_template);
|
|
382
312
|
if (ret[1]) {
|
|
383
313
|
throw takeFromExternrefTable0(ret[0]);
|
|
384
314
|
}
|
|
385
315
|
}
|
|
386
|
-
/**
|
|
387
|
-
* @param {HTMLElement} dom
|
|
388
|
-
* @param {number} key
|
|
389
|
-
* @param {string | null} [value]
|
|
390
|
-
*/
|
|
391
|
-
__wasm_AddInlineStyle_number_key(dom, key, value) {
|
|
392
|
-
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
393
|
-
var len0 = WASM_VECTOR_LEN;
|
|
394
|
-
wasm.mainthreadwasmcontext___wasm_AddInlineStyle_number_key(this.__wbg_ptr, dom, key, ptr0, len0);
|
|
395
|
-
}
|
|
396
316
|
/**
|
|
397
317
|
*
|
|
398
|
-
* *
|
|
399
|
-
* *
|
|
318
|
+
* * key: String
|
|
319
|
+
* * value: stringifyed js value
|
|
400
320
|
*
|
|
401
|
-
* @param {HTMLElement} dom
|
|
402
|
-
* @param {string} key
|
|
403
|
-
* @param {string | null} [value]
|
|
404
|
-
*/
|
|
405
|
-
__wasm_AddInlineStyle_str_key(dom, key, value) {
|
|
406
|
-
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
407
|
-
const len0 = WASM_VECTOR_LEN;
|
|
408
|
-
var ptr1 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
409
|
-
var len1 = WASM_VECTOR_LEN;
|
|
410
|
-
wasm.mainthreadwasmcontext___wasm_AddInlineStyle_str_key(this.__wbg_ptr, dom, ptr0, len0, ptr1, len1);
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* @param {HTMLElement} dom
|
|
414
|
-
* @param {string} styles
|
|
415
|
-
* @returns {boolean}
|
|
416
|
-
*/
|
|
417
|
-
__wasm_SetInlineStyles(dom, styles) {
|
|
418
|
-
const ptr0 = passStringToWasm0(styles, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
419
|
-
const len0 = WASM_VECTOR_LEN;
|
|
420
|
-
const ret = wasm.mainthreadwasmcontext___wasm_SetInlineStyles(this.__wbg_ptr, dom, ptr0, len0);
|
|
421
|
-
return ret !== 0;
|
|
422
|
-
}
|
|
423
|
-
/**
|
|
424
321
|
* @param {number} unique_id
|
|
425
|
-
* @param {
|
|
426
|
-
* @param {string} event_name
|
|
427
|
-
* @param {string | null} [event_handler_identifier]
|
|
428
|
-
*/
|
|
429
|
-
__wasm_add_event_bts(unique_id, event_type, event_name, event_handler_identifier) {
|
|
430
|
-
const ptr0 = passStringToWasm0(event_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
431
|
-
const len0 = WASM_VECTOR_LEN;
|
|
432
|
-
const ptr1 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
433
|
-
const len1 = WASM_VECTOR_LEN;
|
|
434
|
-
var ptr2 = isLikeNone(event_handler_identifier) ? 0 : passStringToWasm0(event_handler_identifier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
435
|
-
var len2 = WASM_VECTOR_LEN;
|
|
436
|
-
wasm.mainthreadwasmcontext___wasm_add_event_bts(this.__wbg_ptr, unique_id, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
437
|
-
}
|
|
438
|
-
/**
|
|
439
|
-
* @param {number} unique_id
|
|
440
|
-
* @param {string} event_type
|
|
441
|
-
* @param {string} event_name
|
|
442
|
-
* @param {any | null} [event_handler_identifier]
|
|
322
|
+
* @param {object} config
|
|
443
323
|
*/
|
|
444
|
-
|
|
445
|
-
const
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
wasm.mainthreadwasmcontext___wasm_add_event_run_worklet(this.__wbg_ptr, unique_id, ptr0, len0, ptr1, len1, isLikeNone(event_handler_identifier) ? 0 : addToExternrefTable0(event_handler_identifier));
|
|
324
|
+
set_config(unique_id, config) {
|
|
325
|
+
const ret = wasm.mainthreadwasmcontext_set_config(this.__wbg_ptr, unique_id, config);
|
|
326
|
+
if (ret[1]) {
|
|
327
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
328
|
+
}
|
|
450
329
|
}
|
|
451
330
|
/**
|
|
452
|
-
* @param {
|
|
453
|
-
* @param {
|
|
454
|
-
* @param {string}
|
|
331
|
+
* @param {Uint32Array} elements_unique_id
|
|
332
|
+
* @param {number} css_id
|
|
333
|
+
* @param {string | null} [entry_name]
|
|
455
334
|
*/
|
|
456
|
-
|
|
457
|
-
const ptr0 = passArray32ToWasm0(
|
|
335
|
+
set_css_id(elements_unique_id, css_id, entry_name) {
|
|
336
|
+
const ptr0 = passArray32ToWasm0(elements_unique_id, wasm.__wbindgen_malloc);
|
|
458
337
|
const len0 = WASM_VECTOR_LEN;
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
wasm.
|
|
338
|
+
var ptr1 = isLikeNone(entry_name) ? 0 : passStringToWasm0(entry_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
339
|
+
var len1 = WASM_VECTOR_LEN;
|
|
340
|
+
const ret = wasm.mainthreadwasmcontext_set_css_id(this.__wbg_ptr, ptr0, len0, css_id, ptr1, len1);
|
|
341
|
+
if (ret[1]) {
|
|
342
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
343
|
+
}
|
|
462
344
|
}
|
|
463
345
|
/**
|
|
464
346
|
* @param {number} unique_id
|
|
465
|
-
* @
|
|
466
|
-
|
|
467
|
-
__wasm_get_css_id_by_unique_id(unique_id) {
|
|
468
|
-
const ret = wasm.mainthreadwasmcontext___wasm_get_css_id_by_unique_id(this.__wbg_ptr, unique_id);
|
|
469
|
-
return ret === 0x100000001 ? undefined : ret;
|
|
470
|
-
}
|
|
471
|
-
/**
|
|
472
|
-
* @param {string} component_id
|
|
473
|
-
* @returns {number | undefined}
|
|
474
|
-
*/
|
|
475
|
-
__wasm_get_unique_id_by_component_id(component_id) {
|
|
476
|
-
const ptr0 = passStringToWasm0(component_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
477
|
-
const len0 = WASM_VECTOR_LEN;
|
|
478
|
-
const ret = wasm.mainthreadwasmcontext___wasm_get_unique_id_by_component_id(this.__wbg_ptr, ptr0, len0);
|
|
479
|
-
return ret === 0x100000001 ? undefined : ret;
|
|
480
|
-
}
|
|
481
|
-
/**
|
|
482
|
-
* @param {Uint32Array} elements_unique_id
|
|
483
|
-
* @param {number} css_id
|
|
347
|
+
* @param {HTMLElement} dom
|
|
348
|
+
* @param {object} new_dataset
|
|
484
349
|
*/
|
|
485
|
-
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
|
|
350
|
+
set_dataset(unique_id, dom, new_dataset) {
|
|
351
|
+
const ret = wasm.mainthreadwasmcontext_set_dataset(this.__wbg_ptr, unique_id, dom, new_dataset);
|
|
352
|
+
if (ret[1]) {
|
|
353
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
354
|
+
}
|
|
489
355
|
}
|
|
490
356
|
/**
|
|
491
357
|
* @param {number} unique_id
|
|
492
358
|
*/
|
|
493
|
-
|
|
494
|
-
wasm.
|
|
359
|
+
set_page_element_unique_id(unique_id) {
|
|
360
|
+
wasm.mainthreadwasmcontext_set_page_element_unique_id(this.__wbg_ptr, unique_id);
|
|
495
361
|
}
|
|
496
362
|
/**
|
|
497
363
|
* @returns {string[]}
|
|
498
364
|
*/
|
|
499
|
-
|
|
500
|
-
const ret = wasm.
|
|
365
|
+
take_timing_flags() {
|
|
366
|
+
const ret = wasm.mainthreadwasmcontext_take_timing_flags(this.__wbg_ptr);
|
|
501
367
|
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
502
368
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
503
369
|
return v1;
|
|
504
370
|
}
|
|
505
371
|
/**
|
|
506
|
-
* @param {number}
|
|
507
|
-
* @param {string}
|
|
508
|
-
* @param {string} element_template_name
|
|
509
|
-
* @param {ElementTemplateSection} element_template_section
|
|
510
|
-
* @returns {Element}
|
|
372
|
+
* @param {number} unique_id
|
|
373
|
+
* @param {string | null} [component_id]
|
|
511
374
|
*/
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
const
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
const ret = wasm.mainthreadwasmcontext__wasm_elementFromBinary(this.__wbg_ptr, parent_component_unique_id, ptr0, len0, ptr1, len1, element_template_section.__wbg_ptr);
|
|
519
|
-
if (ret[2]) {
|
|
520
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
375
|
+
update_component_id(unique_id, component_id) {
|
|
376
|
+
var ptr0 = isLikeNone(component_id) ? 0 : passStringToWasm0(component_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
377
|
+
var len0 = WASM_VECTOR_LEN;
|
|
378
|
+
const ret = wasm.mainthreadwasmcontext_update_component_id(this.__wbg_ptr, unique_id, ptr0, len0);
|
|
379
|
+
if (ret[1]) {
|
|
380
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
521
381
|
}
|
|
522
|
-
return takeFromExternrefTable0(ret[0]);
|
|
523
|
-
}
|
|
524
|
-
/**
|
|
525
|
-
* @param {Uint32Array} bubble_unique_id_path
|
|
526
|
-
* @param {string} event_name
|
|
527
|
-
* @param {boolean} is_capture
|
|
528
|
-
* @param {any} serialized_event
|
|
529
|
-
* @returns {boolean}
|
|
530
|
-
*/
|
|
531
|
-
dispatch_event_by_path(bubble_unique_id_path, event_name, is_capture, serialized_event) {
|
|
532
|
-
const ptr0 = passArray32ToWasm0(bubble_unique_id_path, wasm.__wbindgen_malloc);
|
|
533
|
-
const len0 = WASM_VECTOR_LEN;
|
|
534
|
-
const ptr1 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
535
|
-
const len1 = WASM_VECTOR_LEN;
|
|
536
|
-
const ret = wasm.mainthreadwasmcontext_dispatch_event_by_path(this.__wbg_ptr, ptr0, len0, ptr1, len1, is_capture, serialized_event);
|
|
537
|
-
return ret !== 0;
|
|
538
382
|
}
|
|
539
383
|
/**
|
|
540
|
-
* @param {
|
|
541
|
-
* @param {
|
|
542
|
-
* @param {any} mts_binding
|
|
543
|
-
* @param {any} unique_id_symbol
|
|
544
|
-
* @param {boolean} config_enable_css_selector
|
|
384
|
+
* @param {number} unique_id
|
|
385
|
+
* @param {string | null} [entry_name]
|
|
545
386
|
*/
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
387
|
+
update_css_og_style(unique_id, entry_name) {
|
|
388
|
+
var ptr0 = isLikeNone(entry_name) ? 0 : passStringToWasm0(entry_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
389
|
+
var len0 = WASM_VECTOR_LEN;
|
|
390
|
+
const ret = wasm.mainthreadwasmcontext_update_css_og_style(this.__wbg_ptr, unique_id, ptr0, len0);
|
|
391
|
+
if (ret[1]) {
|
|
392
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
393
|
+
}
|
|
551
394
|
}
|
|
552
395
|
}
|
|
553
396
|
if (Symbol.dispose) MainThreadWasmContext.prototype[Symbol.dispose] = MainThreadWasmContext.prototype.free;
|
|
554
397
|
|
|
555
|
-
/**
|
|
556
|
-
*
|
|
557
|
-
* * key: cssId
|
|
558
|
-
* * value: StyleSheet
|
|
559
|
-
*
|
|
560
|
-
*/
|
|
561
398
|
export class RawStyleInfo {
|
|
562
399
|
__destroy_into_raw() {
|
|
563
400
|
const ptr = this.__wbg_ptr;
|
|
@@ -638,6 +475,7 @@ export class Rule {
|
|
|
638
475
|
/**
|
|
639
476
|
*
|
|
640
477
|
* * Pushes a declaration to the rule's declaration block.
|
|
478
|
+
* * LynxJS doesn't support !important
|
|
641
479
|
* * @param property_name - The property name.
|
|
642
480
|
* * @param value - The property value.
|
|
643
481
|
*
|
|
@@ -758,6 +596,169 @@ export class Selector {
|
|
|
758
596
|
}
|
|
759
597
|
if (Symbol.dispose) Selector.prototype[Symbol.dispose] = Selector.prototype.free;
|
|
760
598
|
|
|
599
|
+
export class TemplateManager {
|
|
600
|
+
__destroy_into_raw() {
|
|
601
|
+
const ptr = this.__wbg_ptr;
|
|
602
|
+
this.__wbg_ptr = 0;
|
|
603
|
+
TemplateManagerFinalization.unregister(this);
|
|
604
|
+
return ptr;
|
|
605
|
+
}
|
|
606
|
+
free() {
|
|
607
|
+
const ptr = this.__destroy_into_raw();
|
|
608
|
+
wasm.__wbg_templatemanager_free(ptr, 0);
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* @param {string} template_name
|
|
612
|
+
* @param {Uint8Array} buf
|
|
613
|
+
* @param {Document} document
|
|
614
|
+
*/
|
|
615
|
+
add_style_info(template_name, buf, document) {
|
|
616
|
+
const ptr0 = passStringToWasm0(template_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
617
|
+
const len0 = WASM_VECTOR_LEN;
|
|
618
|
+
const ret = wasm.templatemanager_add_style_info(this.__wbg_ptr, ptr0, len0, buf, document);
|
|
619
|
+
if (ret[1]) {
|
|
620
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
constructor() {
|
|
624
|
+
const ret = wasm.templatemanager_new();
|
|
625
|
+
this.__wbg_ptr = ret >>> 0;
|
|
626
|
+
TemplateManagerFinalization.register(this, this.__wbg_ptr, this);
|
|
627
|
+
return this;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
if (Symbol.dispose) TemplateManager.prototype[Symbol.dispose] = TemplateManager.prototype.free;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
*
|
|
634
|
+
* * The key could be string or number
|
|
635
|
+
* * The value could be string or number or null or undefined
|
|
636
|
+
*
|
|
637
|
+
* @param {HTMLElement} dom
|
|
638
|
+
* @param {string} key
|
|
639
|
+
* @param {string | null} [value]
|
|
640
|
+
*/
|
|
641
|
+
export function add_inline_style_raw_string_key(dom, key, value) {
|
|
642
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
643
|
+
const len0 = WASM_VECTOR_LEN;
|
|
644
|
+
var ptr1 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
645
|
+
var len1 = WASM_VECTOR_LEN;
|
|
646
|
+
wasm.add_inline_style_raw_string_key(dom, ptr0, len0, ptr1, len1);
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* @param {Uint8Array} buffer
|
|
651
|
+
* @param {string | null | undefined} entry_name
|
|
652
|
+
* @param {boolean} config_enable_css_selector
|
|
653
|
+
* @returns {Uint8Array}
|
|
654
|
+
*/
|
|
655
|
+
export function decode_style_info(buffer, entry_name, config_enable_css_selector) {
|
|
656
|
+
var ptr0 = isLikeNone(entry_name) ? 0 : passStringToWasm0(entry_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
657
|
+
var len0 = WASM_VECTOR_LEN;
|
|
658
|
+
const ret = wasm.decode_style_info(buffer, ptr0, len0, config_enable_css_selector);
|
|
659
|
+
if (ret[2]) {
|
|
660
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
661
|
+
}
|
|
662
|
+
return takeFromExternrefTable0(ret[0]);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* @param {RawStyleInfo} raw_style_info
|
|
667
|
+
* @param {boolean} config_enable_css_selector
|
|
668
|
+
* @param {string | null} [entry_name]
|
|
669
|
+
* @returns {Uint8Array}
|
|
670
|
+
*/
|
|
671
|
+
export function encode_legacy_json_generated_raw_style_info(raw_style_info, config_enable_css_selector, entry_name) {
|
|
672
|
+
_assertClass(raw_style_info, RawStyleInfo);
|
|
673
|
+
var ptr0 = raw_style_info.__destroy_into_raw();
|
|
674
|
+
var ptr1 = isLikeNone(entry_name) ? 0 : passStringToWasm0(entry_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
675
|
+
var len1 = WASM_VECTOR_LEN;
|
|
676
|
+
const ret = wasm.encode_legacy_json_generated_raw_style_info(ptr0, config_enable_css_selector, ptr1, len1);
|
|
677
|
+
if (ret[2]) {
|
|
678
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
679
|
+
}
|
|
680
|
+
return takeFromExternrefTable0(ret[0]);
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* @param {Uint8Array} buffer
|
|
685
|
+
* @returns {string}
|
|
686
|
+
*/
|
|
687
|
+
export function get_font_face_content(buffer) {
|
|
688
|
+
let deferred2_0;
|
|
689
|
+
let deferred2_1;
|
|
690
|
+
try {
|
|
691
|
+
const ret = wasm.get_font_face_content(buffer);
|
|
692
|
+
var ptr1 = ret[0];
|
|
693
|
+
var len1 = ret[1];
|
|
694
|
+
if (ret[3]) {
|
|
695
|
+
ptr1 = 0; len1 = 0;
|
|
696
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
697
|
+
}
|
|
698
|
+
deferred2_0 = ptr1;
|
|
699
|
+
deferred2_1 = len1;
|
|
700
|
+
return getStringFromWasm0(ptr1, len1);
|
|
701
|
+
} finally {
|
|
702
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* @param {HTMLElement} dom
|
|
708
|
+
* @param {string[]} k_v_vec
|
|
709
|
+
*/
|
|
710
|
+
export function get_inline_styles_in_key_value_vec(dom, k_v_vec) {
|
|
711
|
+
const ptr0 = passArrayJsValueToWasm0(k_v_vec, wasm.__wbindgen_malloc);
|
|
712
|
+
const len0 = WASM_VECTOR_LEN;
|
|
713
|
+
wasm.get_inline_styles_in_key_value_vec(dom, ptr0, len0);
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* @param {Uint8Array} buffer
|
|
718
|
+
* @returns {string}
|
|
719
|
+
*/
|
|
720
|
+
export function get_style_content(buffer) {
|
|
721
|
+
let deferred2_0;
|
|
722
|
+
let deferred2_1;
|
|
723
|
+
try {
|
|
724
|
+
const ret = wasm.get_style_content(buffer);
|
|
725
|
+
var ptr1 = ret[0];
|
|
726
|
+
var len1 = ret[1];
|
|
727
|
+
if (ret[3]) {
|
|
728
|
+
ptr1 = 0; len1 = 0;
|
|
729
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
730
|
+
}
|
|
731
|
+
deferred2_0 = ptr1;
|
|
732
|
+
deferred2_1 = len1;
|
|
733
|
+
return getStringFromWasm0(ptr1, len1);
|
|
734
|
+
} finally {
|
|
735
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* @param {HTMLElement} dom
|
|
741
|
+
* @param {string} styles
|
|
742
|
+
* @returns {boolean}
|
|
743
|
+
*/
|
|
744
|
+
export function set_inline_styles_in_str(dom, styles) {
|
|
745
|
+
const ptr0 = passStringToWasm0(styles, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
746
|
+
const len0 = WASM_VECTOR_LEN;
|
|
747
|
+
const ret = wasm.set_inline_styles_in_str(dom, ptr0, len0);
|
|
748
|
+
return ret !== 0;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* @param {HTMLElement} dom
|
|
753
|
+
* @param {number} key
|
|
754
|
+
* @param {string | null} [value]
|
|
755
|
+
*/
|
|
756
|
+
export function set_inline_styles_number_key(dom, key, value) {
|
|
757
|
+
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
758
|
+
var len0 = WASM_VECTOR_LEN;
|
|
759
|
+
wasm.set_inline_styles_number_key(dom, key, ptr0, len0);
|
|
760
|
+
}
|
|
761
|
+
|
|
761
762
|
function __wbg_get_imports() {
|
|
762
763
|
const import0 = {
|
|
763
764
|
__proto__: null,
|
|
@@ -802,44 +803,32 @@ function __wbg_get_imports() {
|
|
|
802
803
|
const ret = arg0.appendChild(arg1);
|
|
803
804
|
return ret;
|
|
804
805
|
}, arguments); },
|
|
805
|
-
__wbg_assign_6170c0d04d5c26f4: function(arg0, arg1) {
|
|
806
|
-
const ret = Object.assign(arg0, arg1);
|
|
807
|
-
return ret;
|
|
808
|
-
},
|
|
809
806
|
__wbg_cloneNode_b85e9102a9a31b29: function() { return handleError(function (arg0, arg1) {
|
|
810
807
|
const ret = arg0.cloneNode(arg1 !== 0);
|
|
811
808
|
return ret;
|
|
812
809
|
}, arguments); },
|
|
813
|
-
__wbg_content_681ebf067b179491: function(arg0) {
|
|
814
|
-
const ret = arg0.content;
|
|
815
|
-
return ret;
|
|
816
|
-
},
|
|
817
810
|
__wbg_createElement_49f60fdcaae809c8: function() { return handleError(function (arg0, arg1, arg2) {
|
|
818
811
|
const ret = arg0.createElement(getStringFromWasm0(arg1, arg2));
|
|
819
812
|
return ret;
|
|
820
813
|
}, arguments); },
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
},
|
|
824
|
-
__wbg_done_57b39ecd9addfe81: function(arg0) {
|
|
825
|
-
const ret = arg0.done;
|
|
814
|
+
__wbg_cssRules_554f47f3049cf066: function() { return handleError(function (arg0) {
|
|
815
|
+
const ret = arg0.cssRules;
|
|
826
816
|
return ret;
|
|
817
|
+
}, arguments); },
|
|
818
|
+
__wbg_disableElementEvent_18cf7db59ebb6f06: function(arg0, arg1, arg2, arg3) {
|
|
819
|
+
arg0.disableElementEvent(arg1, getStringFromWasm0(arg2, arg3));
|
|
827
820
|
},
|
|
828
|
-
|
|
829
|
-
arg0.enableElementEvent(arg1
|
|
821
|
+
__wbg_enableElementEvent_9810de74ded79369: function(arg0, arg1, arg2, arg3) {
|
|
822
|
+
arg0.enableElementEvent(arg1, getStringFromWasm0(arg2, arg3));
|
|
830
823
|
},
|
|
831
824
|
__wbg_eventinfo_new: function(arg0) {
|
|
832
825
|
const ret = EventInfo.__wrap(arg0);
|
|
833
826
|
return ret;
|
|
834
827
|
},
|
|
835
|
-
|
|
836
|
-
const ret =
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
__wbg_getAttribute_b9f6fc4b689c71b0: function(arg0, arg1, arg2, arg3) {
|
|
840
|
-
const ret = arg1.getAttribute(getStringFromWasm0(arg2, arg3));
|
|
841
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
842
|
-
var len1 = WASM_VECTOR_LEN;
|
|
828
|
+
__wbg_getClassList_cad84f9875c7e5ee: function(arg0, arg1, arg2) {
|
|
829
|
+
const ret = arg1.getClassList(arg2);
|
|
830
|
+
const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_malloc);
|
|
831
|
+
const len1 = WASM_VECTOR_LEN;
|
|
843
832
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
844
833
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
845
834
|
},
|
|
@@ -855,6 +844,14 @@ function __wbg_get_imports() {
|
|
|
855
844
|
const ret = Reflect.has(arg0, arg1);
|
|
856
845
|
return ret;
|
|
857
846
|
}, arguments); },
|
|
847
|
+
__wbg_insertRule_736c2f80782185c7: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
848
|
+
const ret = arg0.insertRule(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
|
|
849
|
+
return ret;
|
|
850
|
+
}, arguments); },
|
|
851
|
+
__wbg_item_ca823df8214b9e2b: function(arg0, arg1) {
|
|
852
|
+
const ret = arg0.item(arg1 >>> 0);
|
|
853
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
854
|
+
},
|
|
858
855
|
__wbg_keys_b50a709a76add04e: function(arg0) {
|
|
859
856
|
const ret = Object.keys(arg0);
|
|
860
857
|
return ret;
|
|
@@ -867,14 +864,9 @@ function __wbg_get_imports() {
|
|
|
867
864
|
const ret = arg0.length;
|
|
868
865
|
return ret;
|
|
869
866
|
},
|
|
870
|
-
|
|
871
|
-
arg0.
|
|
872
|
-
|
|
873
|
-
__wbg_loadUnknownElement_762c72a091c9dc9e: function(arg0, arg1, arg2) {
|
|
874
|
-
arg0.loadUnknownElement(getStringFromWasm0(arg1, arg2));
|
|
875
|
-
},
|
|
876
|
-
__wbg_markExposureRelatedElementByUniqueId_c37ed9a4da654c4e: function(arg0, arg1, arg2) {
|
|
877
|
-
arg0.markExposureRelatedElementByUniqueId(arg1 >>> 0, arg2 !== 0);
|
|
867
|
+
__wbg_length_edae0cd13a8d3b71: function(arg0) {
|
|
868
|
+
const ret = arg0.length;
|
|
869
|
+
return ret;
|
|
878
870
|
},
|
|
879
871
|
__wbg_new_361308b2356cecd0: function() {
|
|
880
872
|
const ret = new Object();
|
|
@@ -884,20 +876,20 @@ function __wbg_get_imports() {
|
|
|
884
876
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
885
877
|
return ret;
|
|
886
878
|
},
|
|
887
|
-
|
|
888
|
-
const ret = arg0.
|
|
889
|
-
return ret;
|
|
890
|
-
},
|
|
879
|
+
__wbg_ownerDocument_9347874c5cad87d7: function(arg0) {
|
|
880
|
+
const ret = arg0.ownerDocument;
|
|
881
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
882
|
+
},
|
|
883
|
+
__wbg_parentElement_75863410a8617953: function(arg0) {
|
|
884
|
+
const ret = arg0.parentElement;
|
|
885
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
886
|
+
},
|
|
891
887
|
__wbg_prototypesetcall_bdcdcc5842e4d77d: function(arg0, arg1, arg2) {
|
|
892
888
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
893
889
|
},
|
|
894
890
|
__wbg_publishEvent_9003166a9524dc81: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
|
|
895
891
|
arg0.publishEvent(getStringFromWasm0(arg1, arg2), arg3 === 0 ? undefined : getStringFromWasm0(arg3, arg4), arg5, arg6 >>> 0, arg7, arg8 >>> 0, arg9);
|
|
896
892
|
},
|
|
897
|
-
__wbg_querySelectorAll_32f0ddcdb5fe7c56: function() { return handleError(function (arg0, arg1, arg2) {
|
|
898
|
-
const ret = arg0.querySelectorAll(getStringFromWasm0(arg1, arg2));
|
|
899
|
-
return ret;
|
|
900
|
-
}, arguments); },
|
|
901
893
|
__wbg_removeAttribute_87259aab06d9f286: function() { return handleError(function (arg0, arg1, arg2) {
|
|
902
894
|
arg0.removeAttribute(getStringFromWasm0(arg1, arg2));
|
|
903
895
|
}, arguments); },
|
|
@@ -921,24 +913,25 @@ function __wbg_get_imports() {
|
|
|
921
913
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
922
914
|
return ret;
|
|
923
915
|
}, arguments); },
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
return ret;
|
|
916
|
+
__wbg_set_cssText_18380c97092caefa: function(arg0, arg1, arg2) {
|
|
917
|
+
arg0.cssText = getStringFromWasm0(arg1, arg2);
|
|
927
918
|
},
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
919
|
+
__wbg_set_textContent_3e87dba095d9cdbc: function(arg0, arg1, arg2) {
|
|
920
|
+
arg0.textContent = arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2);
|
|
921
|
+
},
|
|
922
|
+
__wbg_sheet_47ea0f14607eb161: function(arg0) {
|
|
923
|
+
const ret = arg0.sheet;
|
|
924
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
931
925
|
},
|
|
932
|
-
|
|
933
|
-
const ret = arg0.
|
|
926
|
+
__wbg_style_0b7c9bd318f8b807: function(arg0) {
|
|
927
|
+
const ret = arg0.style;
|
|
934
928
|
return ret;
|
|
935
929
|
},
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
const ret = arg0;
|
|
930
|
+
__wbg_style_fa56cf251a93275a: function(arg0) {
|
|
931
|
+
const ret = arg0.style;
|
|
939
932
|
return ret;
|
|
940
933
|
},
|
|
941
|
-
|
|
934
|
+
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
942
935
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
943
936
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
944
937
|
return ret;
|
|
@@ -963,12 +956,6 @@ function __wbg_get_imports() {
|
|
|
963
956
|
};
|
|
964
957
|
}
|
|
965
958
|
|
|
966
|
-
const DecodedStyleDataFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
967
|
-
? { register: () => {}, unregister: () => {} }
|
|
968
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_decodedstyledata_free(ptr >>> 0, 1));
|
|
969
|
-
const ElementTemplateSectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
970
|
-
? { register: () => {}, unregister: () => {} }
|
|
971
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_elementtemplatesection_free(ptr >>> 0, 1));
|
|
972
959
|
const EventInfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
973
960
|
? { register: () => {}, unregister: () => {} }
|
|
974
961
|
: new FinalizationRegistry(ptr => wasm.__wbg_eventinfo_free(ptr >>> 0, 1));
|
|
@@ -987,6 +974,9 @@ const RulePreludeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
987
974
|
const SelectorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
988
975
|
? { register: () => {}, unregister: () => {} }
|
|
989
976
|
: new FinalizationRegistry(ptr => wasm.__wbg_selector_free(ptr >>> 0, 1));
|
|
977
|
+
const TemplateManagerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
978
|
+
? { register: () => {}, unregister: () => {} }
|
|
979
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_templatemanager_free(ptr >>> 0, 1));
|
|
990
980
|
|
|
991
981
|
function addToExternrefTable0(obj) {
|
|
992
982
|
const idx = wasm.__externref_table_alloc();
|