@lynx-js/web-core-wasm 0.0.0 → 0.0.2
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 +16 -0
- package/{LICENSE → LICENSE.txt} +1 -1
- package/Notice.txt +1 -0
- package/README.md +1 -0
- package/binary/client/client.d.ts +272 -0
- package/binary/client/client.js +1297 -0
- package/binary/client/client_bg.wasm +0 -0
- package/binary/client/client_bg.wasm.d.ts +71 -0
- package/binary/client/client_debug.d.ts +272 -0
- package/binary/client/client_debug.js +1297 -0
- package/binary/client/client_debug_bg.wasm +0 -0
- package/binary/client/client_debug_bg.wasm.d.ts +71 -0
- package/binary/encode/encode.d.ts +118 -0
- package/binary/encode/encode.js +542 -0
- package/binary/encode/encode_bg.wasm +0 -0
- package/binary/encode/encode_bg.wasm.d.ts +30 -0
- package/binary/encode/encode_debug.d.ts +118 -0
- package/binary/encode/encode_debug.js +542 -0
- package/binary/encode/encode_debug_bg.wasm +0 -0
- package/binary/encode/encode_debug_bg.wasm.d.ts +30 -0
- package/binary/encode/package.json +4 -0
- package/css/in_shadow.css +10 -0
- package/css/index.css +119 -0
- package/dist/client/LynxCrossThreadContext.d.ts +22 -0
- package/dist/client/LynxCrossThreadContext.js +44 -0
- package/dist/client/background/background-apis/createBackgroundLynx.d.ts +25 -0
- package/dist/client/background/background-apis/createBackgroundLynx.js +41 -0
- package/dist/client/background/background-apis/createChunkLoading.d.ts +7 -0
- package/dist/client/background/background-apis/createChunkLoading.js +66 -0
- package/dist/client/background/background-apis/createElement.d.ts +5 -0
- package/dist/client/background/background-apis/createElement.js +18 -0
- package/dist/client/background/background-apis/createNapiLoader.d.ts +5 -0
- package/dist/client/background/background-apis/createNapiLoader.js +23 -0
- package/dist/client/background/background-apis/createNativeApp.d.ts +4 -0
- package/dist/client/background/background-apis/createNativeApp.js +98 -0
- package/dist/client/background/background-apis/createNativeModules.d.ts +3 -0
- package/dist/client/background/background-apis/createNativeModules.js +33 -0
- package/dist/client/background/background-apis/createPerformanceApis.d.ts +3 -0
- package/dist/client/background/background-apis/createPerformanceApis.js +47 -0
- package/dist/client/background/background-apis/createTimingSystem.d.ts +8 -0
- package/dist/client/background/background-apis/createTimingSystem.js +86 -0
- package/dist/client/background/background-apis/crossThreadHandlers/createGetCustomSection.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/createGetCustomSection.js +14 -0
- package/dist/client/background/background-apis/crossThreadHandlers/createGetPathInfo.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/createGetPathInfo.js +23 -0
- package/dist/client/background/background-apis/crossThreadHandlers/createInvokeUIMethod.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/createInvokeUIMethod.js +24 -0
- package/dist/client/background/background-apis/crossThreadHandlers/createJSObjectDestructionObserver.d.ts +2 -0
- package/dist/client/background/background-apis/crossThreadHandlers/createJSObjectDestructionObserver.js +12 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerDisposeHandler.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerDisposeHandler.js +9 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerPublicComponentEventHandler.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerPublicComponentEventHandler.js +8 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerPublishEventHandler.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerPublishEventHandler.js +8 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerSendGlobalEvent.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerSendGlobalEvent.js +10 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateDataHandler.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateDataHandler.js +5 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateGlobalPropsHandler.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateGlobalPropsHandler.js +5 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateI18nResource.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateI18nResource.js +9 -0
- package/dist/client/background/background-apis/startBackgroundThread.d.ts +2 -0
- package/dist/client/background/background-apis/startBackgroundThread.js +42 -0
- package/dist/client/background/index.d.ts +1 -0
- package/dist/client/background/index.js +15 -0
- package/dist/client/decodeWorker/cssLoader.d.ts +12 -0
- package/dist/client/decodeWorker/cssLoader.js +95 -0
- package/dist/client/decodeWorker/decode.worker.d.ts +1 -0
- package/dist/client/decodeWorker/decode.worker.js +339 -0
- package/dist/client/decodeWorker/types.d.ts +32 -0
- package/dist/client/decodeWorker/types.js +2 -0
- package/dist/client/endpoints.d.ts +54 -0
- package/dist/client/endpoints.js +38 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.js +3 -0
- package/dist/client/mainthread/Background.d.ts +30 -0
- package/dist/client/mainthread/Background.js +209 -0
- package/dist/client/mainthread/ExposureServices.d.ts +11 -0
- package/dist/client/mainthread/ExposureServices.js +211 -0
- package/dist/client/mainthread/I18n.d.ts +9 -0
- package/dist/client/mainthread/I18n.js +44 -0
- package/dist/client/mainthread/LynxView.d.ts +170 -0
- package/dist/client/mainthread/LynxView.js +367 -0
- package/dist/client/mainthread/LynxViewInstance.d.ts +52 -0
- package/dist/client/mainthread/LynxViewInstance.js +188 -0
- package/dist/client/mainthread/TemplateManager.d.ts +10 -0
- package/dist/client/mainthread/TemplateManager.js +233 -0
- package/dist/client/mainthread/createIFrameRealm.d.ts +6 -0
- package/dist/client/mainthread/createIFrameRealm.js +68 -0
- package/dist/client/mainthread/createMainThreadGlobalAPIs.d.ts +3 -0
- package/dist/client/mainthread/createMainThreadGlobalAPIs.js +82 -0
- package/dist/client/mainthread/crossThreadHandlers/queryNodes.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/queryNodes.js +74 -0
- package/dist/client/mainthread/crossThreadHandlers/registerGetPathInfoHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerGetPathInfoHandler.js +51 -0
- package/dist/client/mainthread/crossThreadHandlers/registerInvokeUIMethodHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerInvokeUIMethodHandler.js +49 -0
- package/dist/client/mainthread/crossThreadHandlers/registerNapiModulesCallHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerNapiModulesCallHandler.js +8 -0
- package/dist/client/mainthread/crossThreadHandlers/registerNativeModulesCallHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerNativeModulesCallHandler.js +7 -0
- package/dist/client/mainthread/crossThreadHandlers/registerReloadHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerReloadHandler.js +10 -0
- package/dist/client/mainthread/crossThreadHandlers/registerSelectComponentHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerSelectComponentHandler.js +20 -0
- package/dist/client/mainthread/crossThreadHandlers/registerSetNativePropsHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerSetNativePropsHandler.js +28 -0
- package/dist/client/mainthread/crossThreadHandlers/registerTriggerComponentEventHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerTriggerComponentEventHandler.js +12 -0
- package/dist/client/mainthread/crossThreadHandlers/registerTriggerElementMethodEndpointHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerTriggerElementMethodEndpointHandler.js +29 -0
- package/dist/client/mainthread/elementAPIs/WASMJSBinding.d.ts +32 -0
- package/dist/client/mainthread/elementAPIs/WASMJSBinding.js +117 -0
- package/dist/client/mainthread/elementAPIs/createCrossThreadEvent.d.ts +2 -0
- package/dist/client/mainthread/elementAPIs/createCrossThreadEvent.js +77 -0
- package/dist/client/mainthread/elementAPIs/createElementAPI.d.ts +3 -0
- package/dist/client/mainthread/elementAPIs/createElementAPI.js +322 -0
- package/dist/client/mainthread/elementAPIs/index.d.ts +2 -0
- package/dist/client/mainthread/elementAPIs/index.js +3 -0
- package/dist/client/mainthread/elementAPIs/pureElementPAPIs.d.ts +26 -0
- package/dist/client/mainthread/elementAPIs/pureElementPAPIs.js +85 -0
- package/dist/client/mainthread/utils/convertLengthToPx.d.ts +1 -0
- package/dist/client/mainthread/utils/convertLengthToPx.js +25 -0
- package/dist/client/wasm.d.ts +3 -0
- package/dist/client/wasm.js +38 -0
- package/dist/client/webElementsDynamicLoader.d.ts +1 -0
- package/dist/client/webElementsDynamicLoader.js +11 -0
- package/dist/client_prod/static/css/async/web-elements.css +1 -0
- package/dist/client_prod/static/css/client.css +1 -0
- package/dist/client_prod/static/js/async/lynx-core-chunk.js +3 -0
- package/dist/client_prod/static/js/async/web-core-main-chunk.js +1 -0
- package/dist/client_prod/static/js/async/web-core-template-loader-thread.js +8 -0
- package/dist/client_prod/static/js/async/web-core-worker-chunk.js +1 -0
- package/dist/client_prod/static/js/async/web-elements.js +309 -0
- package/dist/client_prod/static/js/client.js +2 -0
- package/dist/client_prod/static/wasm/a156b496.module.wasm +0 -0
- package/dist/constants.d.ts +58 -0
- package/dist/constants.js +114 -0
- package/dist/encode/encodeCSS.d.ts +3 -0
- package/dist/encode/encodeCSS.js +99 -0
- package/dist/encode/index.d.ts +1 -0
- package/dist/encode/index.js +7 -0
- package/dist/encode/webEncoder.d.ts +21 -0
- package/dist/encode/webEncoder.js +110 -0
- package/dist/types/BTSChunk.d.ts +3 -0
- package/dist/types/BTSChunk.js +5 -0
- package/dist/types/Cloneable.d.ts +2 -0
- package/dist/types/Cloneable.js +2 -0
- package/dist/types/DecodedTemplate.d.ts +7 -0
- package/dist/types/DecodedTemplate.js +7 -0
- package/dist/types/Element.d.ts +35 -0
- package/dist/types/Element.js +5 -0
- package/dist/types/ElementTemplateData.d.ts +15 -0
- package/dist/types/ElementTemplateData.js +7 -0
- package/dist/types/EventType.d.ts +56 -0
- package/dist/types/EventType.js +5 -0
- package/dist/types/I18nTypes.d.ts +21 -0
- package/dist/types/I18nTypes.js +2 -0
- package/dist/types/IElementPAPI.d.ts +182 -0
- package/dist/types/IElementPAPI.js +2 -0
- package/dist/types/IMtsBinding.d.ts +14 -0
- package/dist/types/IMtsBinding.js +7 -0
- package/dist/types/JSRealm.d.ts +5 -0
- package/dist/types/JSRealm.js +7 -0
- package/dist/types/LynxContextEventTarget.d.ts +12 -0
- package/dist/types/LynxContextEventTarget.js +5 -0
- package/dist/types/MainThreadLynx.d.ts +15 -0
- package/dist/types/MainThreadLynx.js +2 -0
- package/dist/types/NapiModules.d.ts +9 -0
- package/dist/types/NapiModules.js +5 -0
- package/dist/types/NativeApp.d.ts +120 -0
- package/dist/types/NativeApp.js +5 -0
- package/dist/types/NativeModules.d.ts +2 -0
- package/dist/types/NativeModules.js +5 -0
- package/dist/types/PageConfig.d.ts +9 -0
- package/dist/types/PageConfig.js +2 -0
- package/dist/types/ProcessDataCallback.d.ts +1 -0
- package/dist/types/ProcessDataCallback.js +2 -0
- package/dist/types/TimingAPIs.d.ts +32 -0
- package/dist/types/TimingAPIs.js +5 -0
- package/dist/types/UpdateDataOptions.d.ts +8 -0
- package/dist/types/UpdateDataOptions.js +6 -0
- package/dist/types/WorkerStartMessage.d.ts +14 -0
- package/dist/types/WorkerStartMessage.js +5 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/types/index.js +7 -0
- package/eslint.config.js +34 -0
- package/package.json +86 -4
- package/index.js +0 -1
- package/selfIdentity.plist +0 -0
|
@@ -0,0 +1,1297 @@
|
|
|
1
|
+
/* @ts-self-types="./client_debug.d.ts" */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* * for return of __GetEvents
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export class EventInfo {
|
|
9
|
+
static __wrap(ptr) {
|
|
10
|
+
ptr = ptr >>> 0;
|
|
11
|
+
const obj = Object.create(EventInfo.prototype);
|
|
12
|
+
obj.__wbg_ptr = ptr;
|
|
13
|
+
EventInfoFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
14
|
+
return obj;
|
|
15
|
+
}
|
|
16
|
+
__destroy_into_raw() {
|
|
17
|
+
const ptr = this.__wbg_ptr;
|
|
18
|
+
this.__wbg_ptr = 0;
|
|
19
|
+
EventInfoFinalization.unregister(this);
|
|
20
|
+
return ptr;
|
|
21
|
+
}
|
|
22
|
+
free() {
|
|
23
|
+
const ptr = this.__destroy_into_raw();
|
|
24
|
+
wasm.__wbg_eventinfo_free(ptr, 0);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @returns {any}
|
|
28
|
+
*/
|
|
29
|
+
get event_handler() {
|
|
30
|
+
const ret = wasm.__wbg_get_eventinfo_event_handler(this.__wbg_ptr);
|
|
31
|
+
return ret;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @returns {string}
|
|
35
|
+
*/
|
|
36
|
+
get event_name() {
|
|
37
|
+
let deferred1_0;
|
|
38
|
+
let deferred1_1;
|
|
39
|
+
try {
|
|
40
|
+
const ret = wasm.__wbg_get_eventinfo_event_name(this.__wbg_ptr);
|
|
41
|
+
deferred1_0 = ret[0];
|
|
42
|
+
deferred1_1 = ret[1];
|
|
43
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
44
|
+
} finally {
|
|
45
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @returns {string}
|
|
50
|
+
*/
|
|
51
|
+
get event_type() {
|
|
52
|
+
let deferred1_0;
|
|
53
|
+
let deferred1_1;
|
|
54
|
+
try {
|
|
55
|
+
const ret = wasm.__wbg_get_eventinfo_event_type(this.__wbg_ptr);
|
|
56
|
+
deferred1_0 = ret[0];
|
|
57
|
+
deferred1_1 = ret[1];
|
|
58
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
59
|
+
} finally {
|
|
60
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @param {any} arg0
|
|
65
|
+
*/
|
|
66
|
+
set event_handler(arg0) {
|
|
67
|
+
wasm.__wbg_set_eventinfo_event_handler(this.__wbg_ptr, arg0);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @param {string} arg0
|
|
71
|
+
*/
|
|
72
|
+
set event_name(arg0) {
|
|
73
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
74
|
+
const len0 = WASM_VECTOR_LEN;
|
|
75
|
+
wasm.__wbg_set_eventinfo_event_name(this.__wbg_ptr, ptr0, len0);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @param {string} arg0
|
|
79
|
+
*/
|
|
80
|
+
set event_type(arg0) {
|
|
81
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
82
|
+
const len0 = WASM_VECTOR_LEN;
|
|
83
|
+
wasm.__wbg_set_eventinfo_event_type(this.__wbg_ptr, ptr0, len0);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (Symbol.dispose) EventInfo.prototype[Symbol.dispose] = EventInfo.prototype.free;
|
|
87
|
+
|
|
88
|
+
export class MainThreadWasmContext {
|
|
89
|
+
__destroy_into_raw() {
|
|
90
|
+
const ptr = this.__wbg_ptr;
|
|
91
|
+
this.__wbg_ptr = 0;
|
|
92
|
+
MainThreadWasmContextFinalization.unregister(this);
|
|
93
|
+
return ptr;
|
|
94
|
+
}
|
|
95
|
+
free() {
|
|
96
|
+
const ptr = this.__destroy_into_raw();
|
|
97
|
+
wasm.__wbg_mainthreadwasmcontext_free(ptr, 0);
|
|
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
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @param {number} unique_id
|
|
116
|
+
* @param {any} key
|
|
117
|
+
* @param {any} value
|
|
118
|
+
*/
|
|
119
|
+
add_dataset(unique_id, key, value) {
|
|
120
|
+
const ret = wasm.mainthreadwasmcontext_add_dataset(this.__wbg_ptr, unique_id, key, value);
|
|
121
|
+
if (ret[1]) {
|
|
122
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
123
|
+
}
|
|
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
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* @param {number} parent_component_unique_id
|
|
152
|
+
* @param {HTMLElement} dom
|
|
153
|
+
* @param {number | null} [css_id]
|
|
154
|
+
* @param {string | null} [component_id]
|
|
155
|
+
* @returns {number}
|
|
156
|
+
*/
|
|
157
|
+
create_element_common(parent_component_unique_id, dom, css_id, component_id) {
|
|
158
|
+
var ptr0 = isLikeNone(component_id) ? 0 : passStringToWasm0(component_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
159
|
+
var len0 = WASM_VECTOR_LEN;
|
|
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);
|
|
161
|
+
return ret >>> 0;
|
|
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
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* @param {number} unique_id
|
|
180
|
+
* @returns {string | undefined}
|
|
181
|
+
*/
|
|
182
|
+
get_component_id(unique_id) {
|
|
183
|
+
const ret = wasm.mainthreadwasmcontext_get_component_id(this.__wbg_ptr, unique_id);
|
|
184
|
+
if (ret[3]) {
|
|
185
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
186
|
+
}
|
|
187
|
+
let v1;
|
|
188
|
+
if (ret[0] !== 0) {
|
|
189
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
190
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
191
|
+
}
|
|
192
|
+
return v1;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* @param {number} unique_id
|
|
196
|
+
* @returns {object}
|
|
197
|
+
*/
|
|
198
|
+
get_config(unique_id) {
|
|
199
|
+
const ret = wasm.mainthreadwasmcontext_get_config(this.__wbg_ptr, unique_id);
|
|
200
|
+
if (ret[2]) {
|
|
201
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
202
|
+
}
|
|
203
|
+
return takeFromExternrefTable0(ret[0]);
|
|
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
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* @param {number} unique_id
|
|
215
|
+
* @param {string} key
|
|
216
|
+
* @returns {any}
|
|
217
|
+
*/
|
|
218
|
+
get_data_by_key(unique_id, key) {
|
|
219
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
220
|
+
const len0 = WASM_VECTOR_LEN;
|
|
221
|
+
const ret = wasm.mainthreadwasmcontext_get_data_by_key(this.__wbg_ptr, unique_id, ptr0, len0);
|
|
222
|
+
if (ret[2]) {
|
|
223
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
224
|
+
}
|
|
225
|
+
return takeFromExternrefTable0(ret[0]);
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* @param {number} unique_id
|
|
229
|
+
* @returns {object}
|
|
230
|
+
*/
|
|
231
|
+
get_dataset(unique_id) {
|
|
232
|
+
const ret = wasm.mainthreadwasmcontext_get_dataset(this.__wbg_ptr, unique_id);
|
|
233
|
+
if (ret[2]) {
|
|
234
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
235
|
+
}
|
|
236
|
+
return takeFromExternrefTable0(ret[0]);
|
|
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
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* @param {number} unique_id
|
|
248
|
+
* @returns {object | undefined}
|
|
249
|
+
*/
|
|
250
|
+
get_element_config(unique_id) {
|
|
251
|
+
const ret = wasm.mainthreadwasmcontext_get_element_config(this.__wbg_ptr, unique_id);
|
|
252
|
+
if (ret[2]) {
|
|
253
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
254
|
+
}
|
|
255
|
+
return takeFromExternrefTable0(ret[0]);
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* @param {number} unique_id
|
|
259
|
+
* @param {string} event_name
|
|
260
|
+
* @param {string} event_type
|
|
261
|
+
* @returns {any}
|
|
262
|
+
*/
|
|
263
|
+
get_event(unique_id, event_name, event_type) {
|
|
264
|
+
const ptr0 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
265
|
+
const len0 = WASM_VECTOR_LEN;
|
|
266
|
+
const ptr1 = passStringToWasm0(event_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
267
|
+
const len1 = WASM_VECTOR_LEN;
|
|
268
|
+
const ret = wasm.mainthreadwasmcontext_get_event(this.__wbg_ptr, unique_id, ptr0, len0, ptr1, len1);
|
|
269
|
+
return ret;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* @param {number} unique_id
|
|
273
|
+
* @returns {EventInfo[]}
|
|
274
|
+
*/
|
|
275
|
+
get_events(unique_id) {
|
|
276
|
+
const ret = wasm.mainthreadwasmcontext_get_events(this.__wbg_ptr, unique_id);
|
|
277
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
278
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
279
|
+
return v1;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* @param {string} component_id
|
|
283
|
+
* @returns {number | undefined}
|
|
284
|
+
*/
|
|
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;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* @param {Node} root_node
|
|
293
|
+
* @param {any} mts_binding
|
|
294
|
+
* @param {boolean} config_enable_css_selector
|
|
295
|
+
*/
|
|
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;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* @param {TemplateManager} template_manager
|
|
304
|
+
* @param {string} entry_name
|
|
305
|
+
* @param {boolean} is_entry_template
|
|
306
|
+
*/
|
|
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);
|
|
312
|
+
if (ret[1]) {
|
|
313
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
*
|
|
318
|
+
* * key: String
|
|
319
|
+
* * value: stringifyed js value
|
|
320
|
+
*
|
|
321
|
+
* @param {number} unique_id
|
|
322
|
+
* @param {object} config
|
|
323
|
+
*/
|
|
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
|
+
}
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* @param {Uint32Array} elements_unique_id
|
|
332
|
+
* @param {number} css_id
|
|
333
|
+
* @param {string | null} [entry_name]
|
|
334
|
+
*/
|
|
335
|
+
set_css_id(elements_unique_id, css_id, entry_name) {
|
|
336
|
+
const ptr0 = passArray32ToWasm0(elements_unique_id, wasm.__wbindgen_malloc);
|
|
337
|
+
const len0 = WASM_VECTOR_LEN;
|
|
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
|
+
}
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* @param {number} unique_id
|
|
347
|
+
* @param {HTMLElement} dom
|
|
348
|
+
* @param {object} new_dataset
|
|
349
|
+
*/
|
|
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
|
+
}
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* @param {number} unique_id
|
|
358
|
+
*/
|
|
359
|
+
set_page_element_unique_id(unique_id) {
|
|
360
|
+
wasm.mainthreadwasmcontext_set_page_element_unique_id(this.__wbg_ptr, unique_id);
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* @returns {string[]}
|
|
364
|
+
*/
|
|
365
|
+
take_timing_flags() {
|
|
366
|
+
const ret = wasm.mainthreadwasmcontext_take_timing_flags(this.__wbg_ptr);
|
|
367
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
368
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
369
|
+
return v1;
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* @param {number} unique_id
|
|
373
|
+
* @param {string | null} [component_id]
|
|
374
|
+
*/
|
|
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]);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* @param {number} unique_id
|
|
385
|
+
* @param {string | null} [entry_name]
|
|
386
|
+
*/
|
|
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
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
if (Symbol.dispose) MainThreadWasmContext.prototype[Symbol.dispose] = MainThreadWasmContext.prototype.free;
|
|
397
|
+
|
|
398
|
+
export class RawStyleInfo {
|
|
399
|
+
__destroy_into_raw() {
|
|
400
|
+
const ptr = this.__wbg_ptr;
|
|
401
|
+
this.__wbg_ptr = 0;
|
|
402
|
+
RawStyleInfoFinalization.unregister(this);
|
|
403
|
+
return ptr;
|
|
404
|
+
}
|
|
405
|
+
free() {
|
|
406
|
+
const ptr = this.__destroy_into_raw();
|
|
407
|
+
wasm.__wbg_rawstyleinfo_free(ptr, 0);
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
*
|
|
411
|
+
* * Appends an import to the stylesheet identified by `css_id`.
|
|
412
|
+
* * If the stylesheet does not exist, it is created.
|
|
413
|
+
* * @param css_id - The ID of the CSS file.
|
|
414
|
+
* * @param import_css_id - The ID of the imported CSS file.
|
|
415
|
+
*
|
|
416
|
+
* @param {number} css_id
|
|
417
|
+
* @param {number} import_css_id
|
|
418
|
+
*/
|
|
419
|
+
append_import(css_id, import_css_id) {
|
|
420
|
+
wasm.rawstyleinfo_append_import(this.__wbg_ptr, css_id, import_css_id);
|
|
421
|
+
}
|
|
422
|
+
constructor() {
|
|
423
|
+
const ret = wasm.rawstyleinfo_new();
|
|
424
|
+
this.__wbg_ptr = ret >>> 0;
|
|
425
|
+
RawStyleInfoFinalization.register(this, this.__wbg_ptr, this);
|
|
426
|
+
return this;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
*
|
|
430
|
+
* * Pushes a rule to the stylesheet identified by `css_id`.
|
|
431
|
+
* * If the stylesheet does not exist, it is created.
|
|
432
|
+
* * @param css_id - The ID of the CSS file.
|
|
433
|
+
* * @param rule - The rule to append.
|
|
434
|
+
*
|
|
435
|
+
* @param {number} css_id
|
|
436
|
+
* @param {Rule} rule
|
|
437
|
+
*/
|
|
438
|
+
push_rule(css_id, rule) {
|
|
439
|
+
_assertClass(rule, Rule);
|
|
440
|
+
var ptr0 = rule.__destroy_into_raw();
|
|
441
|
+
wasm.rawstyleinfo_push_rule(this.__wbg_ptr, css_id, ptr0);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
if (Symbol.dispose) RawStyleInfo.prototype[Symbol.dispose] = RawStyleInfo.prototype.free;
|
|
445
|
+
|
|
446
|
+
export class Rule {
|
|
447
|
+
__destroy_into_raw() {
|
|
448
|
+
const ptr = this.__wbg_ptr;
|
|
449
|
+
this.__wbg_ptr = 0;
|
|
450
|
+
RuleFinalization.unregister(this);
|
|
451
|
+
return ptr;
|
|
452
|
+
}
|
|
453
|
+
free() {
|
|
454
|
+
const ptr = this.__destroy_into_raw();
|
|
455
|
+
wasm.__wbg_rule_free(ptr, 0);
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
*
|
|
459
|
+
* * Creates a new Rule with the specified type.
|
|
460
|
+
* * @param rule_type - The type of the rule (e.g., "StyleRule", "FontFaceRule", "KeyframesRule").
|
|
461
|
+
*
|
|
462
|
+
* @param {string} rule_type
|
|
463
|
+
*/
|
|
464
|
+
constructor(rule_type) {
|
|
465
|
+
const ptr0 = passStringToWasm0(rule_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
466
|
+
const len0 = WASM_VECTOR_LEN;
|
|
467
|
+
const ret = wasm.rule_new(ptr0, len0);
|
|
468
|
+
if (ret[2]) {
|
|
469
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
470
|
+
}
|
|
471
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
472
|
+
RuleFinalization.register(this, this.__wbg_ptr, this);
|
|
473
|
+
return this;
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
*
|
|
477
|
+
* * Pushes a declaration to the rule's declaration block.
|
|
478
|
+
* * LynxJS doesn't support !important
|
|
479
|
+
* * @param property_name - The property name.
|
|
480
|
+
* * @param value - The property value.
|
|
481
|
+
*
|
|
482
|
+
* @param {string} property_name
|
|
483
|
+
* @param {string} value
|
|
484
|
+
*/
|
|
485
|
+
push_declaration(property_name, value) {
|
|
486
|
+
const ptr0 = passStringToWasm0(property_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
487
|
+
const len0 = WASM_VECTOR_LEN;
|
|
488
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
489
|
+
const len1 = WASM_VECTOR_LEN;
|
|
490
|
+
wasm.rule_push_declaration(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
*
|
|
494
|
+
* * Pushes a nested rule to the rule.
|
|
495
|
+
* * @param rule - The nested rule to add.
|
|
496
|
+
*
|
|
497
|
+
* @param {Rule} rule
|
|
498
|
+
*/
|
|
499
|
+
push_rule_children(rule) {
|
|
500
|
+
_assertClass(rule, Rule);
|
|
501
|
+
var ptr0 = rule.__destroy_into_raw();
|
|
502
|
+
wasm.rule_push_rule_children(this.__wbg_ptr, ptr0);
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
*
|
|
506
|
+
* * Sets the prelude for the rule.
|
|
507
|
+
* * @param prelude - The prelude to set (SelectorList or KeyFramesPrelude).
|
|
508
|
+
*
|
|
509
|
+
* @param {RulePrelude} prelude
|
|
510
|
+
*/
|
|
511
|
+
set_prelude(prelude) {
|
|
512
|
+
_assertClass(prelude, RulePrelude);
|
|
513
|
+
var ptr0 = prelude.__destroy_into_raw();
|
|
514
|
+
wasm.rule_set_prelude(this.__wbg_ptr, ptr0);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
if (Symbol.dispose) Rule.prototype[Symbol.dispose] = Rule.prototype.free;
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
*
|
|
521
|
+
* * Either SelectorList or KeyFramesPrelude
|
|
522
|
+
* * Depending on the RuleType
|
|
523
|
+
* * If it is SelectorList, then selectors is a list of Selector
|
|
524
|
+
* * If it is KeyFramesPrelude, then selectors has only one selector which is Prelude text, its simple_selectors is empty
|
|
525
|
+
* * If the parent is FontFace, then selectors is empty
|
|
526
|
+
*
|
|
527
|
+
*/
|
|
528
|
+
export class RulePrelude {
|
|
529
|
+
__destroy_into_raw() {
|
|
530
|
+
const ptr = this.__wbg_ptr;
|
|
531
|
+
this.__wbg_ptr = 0;
|
|
532
|
+
RulePreludeFinalization.unregister(this);
|
|
533
|
+
return ptr;
|
|
534
|
+
}
|
|
535
|
+
free() {
|
|
536
|
+
const ptr = this.__destroy_into_raw();
|
|
537
|
+
wasm.__wbg_ruleprelude_free(ptr, 0);
|
|
538
|
+
}
|
|
539
|
+
constructor() {
|
|
540
|
+
const ret = wasm.ruleprelude_new();
|
|
541
|
+
this.__wbg_ptr = ret >>> 0;
|
|
542
|
+
RulePreludeFinalization.register(this, this.__wbg_ptr, this);
|
|
543
|
+
return this;
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
*
|
|
547
|
+
* * Pushes a selector to the list.
|
|
548
|
+
* * @param selector - The selector to add.
|
|
549
|
+
*
|
|
550
|
+
* @param {Selector} selector
|
|
551
|
+
*/
|
|
552
|
+
push_selector(selector) {
|
|
553
|
+
_assertClass(selector, Selector);
|
|
554
|
+
var ptr0 = selector.__destroy_into_raw();
|
|
555
|
+
wasm.ruleprelude_push_selector(this.__wbg_ptr, ptr0);
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
if (Symbol.dispose) RulePrelude.prototype[Symbol.dispose] = RulePrelude.prototype.free;
|
|
559
|
+
|
|
560
|
+
export class Selector {
|
|
561
|
+
__destroy_into_raw() {
|
|
562
|
+
const ptr = this.__wbg_ptr;
|
|
563
|
+
this.__wbg_ptr = 0;
|
|
564
|
+
SelectorFinalization.unregister(this);
|
|
565
|
+
return ptr;
|
|
566
|
+
}
|
|
567
|
+
free() {
|
|
568
|
+
const ptr = this.__destroy_into_raw();
|
|
569
|
+
wasm.__wbg_selector_free(ptr, 0);
|
|
570
|
+
}
|
|
571
|
+
constructor() {
|
|
572
|
+
const ret = wasm.selector_new();
|
|
573
|
+
this.__wbg_ptr = ret >>> 0;
|
|
574
|
+
SelectorFinalization.register(this, this.__wbg_ptr, this);
|
|
575
|
+
return this;
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
*
|
|
579
|
+
* * Pushes a selector section to the selector.
|
|
580
|
+
* * @param selector_type - The type of the selector section (e.g., "ClassSelector", "IdSelector").
|
|
581
|
+
* * @param value - The value of the selector section.
|
|
582
|
+
*
|
|
583
|
+
* @param {string} selector_type
|
|
584
|
+
* @param {string} value
|
|
585
|
+
*/
|
|
586
|
+
push_one_selector_section(selector_type, value) {
|
|
587
|
+
const ptr0 = passStringToWasm0(selector_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
588
|
+
const len0 = WASM_VECTOR_LEN;
|
|
589
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
590
|
+
const len1 = WASM_VECTOR_LEN;
|
|
591
|
+
const ret = wasm.selector_push_one_selector_section(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
592
|
+
if (ret[1]) {
|
|
593
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
if (Symbol.dispose) Selector.prototype[Symbol.dispose] = Selector.prototype.free;
|
|
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
|
+
|
|
762
|
+
function __wbg_get_imports() {
|
|
763
|
+
const import0 = {
|
|
764
|
+
__proto__: null,
|
|
765
|
+
__wbg_Error_8c4e43fe74559d73: function(arg0, arg1) {
|
|
766
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
767
|
+
return ret;
|
|
768
|
+
},
|
|
769
|
+
__wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(arg0, arg1) {
|
|
770
|
+
const ret = debugString(arg1);
|
|
771
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
772
|
+
const len1 = WASM_VECTOR_LEN;
|
|
773
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
774
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
775
|
+
},
|
|
776
|
+
__wbg___wbindgen_is_null_ac34f5003991759a: function(arg0) {
|
|
777
|
+
const ret = arg0 === null;
|
|
778
|
+
return ret;
|
|
779
|
+
},
|
|
780
|
+
__wbg___wbindgen_is_undefined_9e4d92534c42d778: function(arg0) {
|
|
781
|
+
const ret = arg0 === undefined;
|
|
782
|
+
return ret;
|
|
783
|
+
},
|
|
784
|
+
__wbg___wbindgen_jsval_eq_11888390b0186270: function(arg0, arg1) {
|
|
785
|
+
const ret = arg0 === arg1;
|
|
786
|
+
return ret;
|
|
787
|
+
},
|
|
788
|
+
__wbg___wbindgen_string_get_72fb696202c56729: function(arg0, arg1) {
|
|
789
|
+
const obj = arg1;
|
|
790
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
791
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
792
|
+
var len1 = WASM_VECTOR_LEN;
|
|
793
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
794
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
795
|
+
},
|
|
796
|
+
__wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
|
|
797
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
798
|
+
},
|
|
799
|
+
__wbg_addEventListener_509b0778ff0f5d80: function(arg0, arg1, arg2) {
|
|
800
|
+
arg0.addEventListener(getStringFromWasm0(arg1, arg2));
|
|
801
|
+
},
|
|
802
|
+
__wbg_appendChild_dea38765a26d346d: function() { return handleError(function (arg0, arg1) {
|
|
803
|
+
const ret = arg0.appendChild(arg1);
|
|
804
|
+
return ret;
|
|
805
|
+
}, arguments); },
|
|
806
|
+
__wbg_cloneNode_b85e9102a9a31b29: function() { return handleError(function (arg0, arg1) {
|
|
807
|
+
const ret = arg0.cloneNode(arg1 !== 0);
|
|
808
|
+
return ret;
|
|
809
|
+
}, arguments); },
|
|
810
|
+
__wbg_createElement_49f60fdcaae809c8: function() { return handleError(function (arg0, arg1, arg2) {
|
|
811
|
+
const ret = arg0.createElement(getStringFromWasm0(arg1, arg2));
|
|
812
|
+
return ret;
|
|
813
|
+
}, arguments); },
|
|
814
|
+
__wbg_cssRules_554f47f3049cf066: function() { return handleError(function (arg0) {
|
|
815
|
+
const ret = arg0.cssRules;
|
|
816
|
+
return ret;
|
|
817
|
+
}, arguments); },
|
|
818
|
+
__wbg_disableElementEvent_18cf7db59ebb6f06: function(arg0, arg1, arg2, arg3) {
|
|
819
|
+
arg0.disableElementEvent(arg1, getStringFromWasm0(arg2, arg3));
|
|
820
|
+
},
|
|
821
|
+
__wbg_enableElementEvent_9810de74ded79369: function(arg0, arg1, arg2, arg3) {
|
|
822
|
+
arg0.enableElementEvent(arg1, getStringFromWasm0(arg2, arg3));
|
|
823
|
+
},
|
|
824
|
+
__wbg_eventinfo_new: function(arg0) {
|
|
825
|
+
const ret = EventInfo.__wrap(arg0);
|
|
826
|
+
return ret;
|
|
827
|
+
},
|
|
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;
|
|
832
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
833
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
834
|
+
},
|
|
835
|
+
__wbg_get_9b94d73e6221f75c: function(arg0, arg1) {
|
|
836
|
+
const ret = arg0[arg1 >>> 0];
|
|
837
|
+
return ret;
|
|
838
|
+
},
|
|
839
|
+
__wbg_get_b3ed3ad4be2bc8ac: function() { return handleError(function (arg0, arg1) {
|
|
840
|
+
const ret = Reflect.get(arg0, arg1);
|
|
841
|
+
return ret;
|
|
842
|
+
}, arguments); },
|
|
843
|
+
__wbg_has_d4e53238966c12b6: function() { return handleError(function (arg0, arg1) {
|
|
844
|
+
const ret = Reflect.has(arg0, arg1);
|
|
845
|
+
return ret;
|
|
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
|
+
},
|
|
855
|
+
__wbg_keys_b50a709a76add04e: function(arg0) {
|
|
856
|
+
const ret = Object.keys(arg0);
|
|
857
|
+
return ret;
|
|
858
|
+
},
|
|
859
|
+
__wbg_length_32ed9a279acd054c: function(arg0) {
|
|
860
|
+
const ret = arg0.length;
|
|
861
|
+
return ret;
|
|
862
|
+
},
|
|
863
|
+
__wbg_length_35a7bace40f36eac: function(arg0) {
|
|
864
|
+
const ret = arg0.length;
|
|
865
|
+
return ret;
|
|
866
|
+
},
|
|
867
|
+
__wbg_length_edae0cd13a8d3b71: function(arg0) {
|
|
868
|
+
const ret = arg0.length;
|
|
869
|
+
return ret;
|
|
870
|
+
},
|
|
871
|
+
__wbg_new_361308b2356cecd0: function() {
|
|
872
|
+
const ret = new Object();
|
|
873
|
+
return ret;
|
|
874
|
+
},
|
|
875
|
+
__wbg_new_from_slice_a3d2629dc1826784: function(arg0, arg1) {
|
|
876
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
877
|
+
return ret;
|
|
878
|
+
},
|
|
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
|
+
},
|
|
887
|
+
__wbg_prototypesetcall_bdcdcc5842e4d77d: function(arg0, arg1, arg2) {
|
|
888
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
889
|
+
},
|
|
890
|
+
__wbg_publishEvent_9003166a9524dc81: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
|
|
891
|
+
arg0.publishEvent(getStringFromWasm0(arg1, arg2), arg3 === 0 ? undefined : getStringFromWasm0(arg3, arg4), arg5, arg6 >>> 0, arg7, arg8 >>> 0, arg9);
|
|
892
|
+
},
|
|
893
|
+
__wbg_removeAttribute_87259aab06d9f286: function() { return handleError(function (arg0, arg1, arg2) {
|
|
894
|
+
arg0.removeAttribute(getStringFromWasm0(arg1, arg2));
|
|
895
|
+
}, arguments); },
|
|
896
|
+
__wbg_removeProperty_a0d2ff8a76ffd2b1: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
897
|
+
const ret = arg1.removeProperty(getStringFromWasm0(arg2, arg3));
|
|
898
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
899
|
+
const len1 = WASM_VECTOR_LEN;
|
|
900
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
901
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
902
|
+
}, arguments); },
|
|
903
|
+
__wbg_runWorklet_6d04359b8a8c370f: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
904
|
+
arg0.runWorklet(arg1, arg2, arg3 >>> 0, arg4, arg5 >>> 0, arg6);
|
|
905
|
+
},
|
|
906
|
+
__wbg_setAttribute_cc8e4c8a2a008508: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
907
|
+
arg0.setAttribute(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
908
|
+
}, arguments); },
|
|
909
|
+
__wbg_setProperty_cbb25c4e74285b39: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
910
|
+
arg0.setProperty(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
911
|
+
}, arguments); },
|
|
912
|
+
__wbg_set_6cb8631f80447a67: function() { return handleError(function (arg0, arg1, arg2) {
|
|
913
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
914
|
+
return ret;
|
|
915
|
+
}, arguments); },
|
|
916
|
+
__wbg_set_cssText_18380c97092caefa: function(arg0, arg1, arg2) {
|
|
917
|
+
arg0.cssText = getStringFromWasm0(arg1, arg2);
|
|
918
|
+
},
|
|
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);
|
|
925
|
+
},
|
|
926
|
+
__wbg_style_0b7c9bd318f8b807: function(arg0) {
|
|
927
|
+
const ret = arg0.style;
|
|
928
|
+
return ret;
|
|
929
|
+
},
|
|
930
|
+
__wbg_style_fa56cf251a93275a: function(arg0) {
|
|
931
|
+
const ret = arg0.style;
|
|
932
|
+
return ret;
|
|
933
|
+
},
|
|
934
|
+
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
935
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
936
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
937
|
+
return ret;
|
|
938
|
+
},
|
|
939
|
+
__wbindgen_init_externref_table: function() {
|
|
940
|
+
const table = wasm.__wbindgen_externrefs;
|
|
941
|
+
const offset = table.grow(4);
|
|
942
|
+
table.set(0, undefined);
|
|
943
|
+
table.set(offset + 0, undefined);
|
|
944
|
+
table.set(offset + 1, null);
|
|
945
|
+
table.set(offset + 2, true);
|
|
946
|
+
table.set(offset + 3, false);
|
|
947
|
+
},
|
|
948
|
+
__wbindgen_object_is_undefined: function(arg0) {
|
|
949
|
+
const ret = arg0 === undefined;
|
|
950
|
+
return ret;
|
|
951
|
+
},
|
|
952
|
+
};
|
|
953
|
+
return {
|
|
954
|
+
__proto__: null,
|
|
955
|
+
"./client_debug_bg.js": import0,
|
|
956
|
+
};
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
const EventInfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
960
|
+
? { register: () => {}, unregister: () => {} }
|
|
961
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_eventinfo_free(ptr >>> 0, 1));
|
|
962
|
+
const MainThreadWasmContextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
963
|
+
? { register: () => {}, unregister: () => {} }
|
|
964
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_mainthreadwasmcontext_free(ptr >>> 0, 1));
|
|
965
|
+
const RawStyleInfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
966
|
+
? { register: () => {}, unregister: () => {} }
|
|
967
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_rawstyleinfo_free(ptr >>> 0, 1));
|
|
968
|
+
const RuleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
969
|
+
? { register: () => {}, unregister: () => {} }
|
|
970
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_rule_free(ptr >>> 0, 1));
|
|
971
|
+
const RulePreludeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
972
|
+
? { register: () => {}, unregister: () => {} }
|
|
973
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_ruleprelude_free(ptr >>> 0, 1));
|
|
974
|
+
const SelectorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
975
|
+
? { register: () => {}, unregister: () => {} }
|
|
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));
|
|
980
|
+
|
|
981
|
+
function addToExternrefTable0(obj) {
|
|
982
|
+
const idx = wasm.__externref_table_alloc();
|
|
983
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
984
|
+
return idx;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
function _assertClass(instance, klass) {
|
|
988
|
+
if (!(instance instanceof klass)) {
|
|
989
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
function debugString(val) {
|
|
994
|
+
// primitive types
|
|
995
|
+
const type = typeof val;
|
|
996
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
997
|
+
return `${val}`;
|
|
998
|
+
}
|
|
999
|
+
if (type == 'string') {
|
|
1000
|
+
return `"${val}"`;
|
|
1001
|
+
}
|
|
1002
|
+
if (type == 'symbol') {
|
|
1003
|
+
const description = val.description;
|
|
1004
|
+
if (description == null) {
|
|
1005
|
+
return 'Symbol';
|
|
1006
|
+
} else {
|
|
1007
|
+
return `Symbol(${description})`;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
if (type == 'function') {
|
|
1011
|
+
const name = val.name;
|
|
1012
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
1013
|
+
return `Function(${name})`;
|
|
1014
|
+
} else {
|
|
1015
|
+
return 'Function';
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
// objects
|
|
1019
|
+
if (Array.isArray(val)) {
|
|
1020
|
+
const length = val.length;
|
|
1021
|
+
let debug = '[';
|
|
1022
|
+
if (length > 0) {
|
|
1023
|
+
debug += debugString(val[0]);
|
|
1024
|
+
}
|
|
1025
|
+
for(let i = 1; i < length; i++) {
|
|
1026
|
+
debug += ', ' + debugString(val[i]);
|
|
1027
|
+
}
|
|
1028
|
+
debug += ']';
|
|
1029
|
+
return debug;
|
|
1030
|
+
}
|
|
1031
|
+
// Test for built-in
|
|
1032
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
1033
|
+
let className;
|
|
1034
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
1035
|
+
className = builtInMatches[1];
|
|
1036
|
+
} else {
|
|
1037
|
+
// Failed to match the standard '[object ClassName]'
|
|
1038
|
+
return toString.call(val);
|
|
1039
|
+
}
|
|
1040
|
+
if (className == 'Object') {
|
|
1041
|
+
// we're a user defined class or Object
|
|
1042
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
1043
|
+
// easier than looping through ownProperties of `val`.
|
|
1044
|
+
try {
|
|
1045
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
1046
|
+
} catch (_) {
|
|
1047
|
+
return 'Object';
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
// errors
|
|
1051
|
+
if (val instanceof Error) {
|
|
1052
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
1053
|
+
}
|
|
1054
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
1055
|
+
return className;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
1059
|
+
ptr = ptr >>> 0;
|
|
1060
|
+
const mem = getDataViewMemory0();
|
|
1061
|
+
const result = [];
|
|
1062
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
1063
|
+
result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
|
|
1064
|
+
}
|
|
1065
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
1066
|
+
return result;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
1070
|
+
ptr = ptr >>> 0;
|
|
1071
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
let cachedDataViewMemory0 = null;
|
|
1075
|
+
function getDataViewMemory0() {
|
|
1076
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
1077
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
1078
|
+
}
|
|
1079
|
+
return cachedDataViewMemory0;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
function getStringFromWasm0(ptr, len) {
|
|
1083
|
+
ptr = ptr >>> 0;
|
|
1084
|
+
return decodeText(ptr, len);
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
let cachedUint32ArrayMemory0 = null;
|
|
1088
|
+
function getUint32ArrayMemory0() {
|
|
1089
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
1090
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
1091
|
+
}
|
|
1092
|
+
return cachedUint32ArrayMemory0;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
let cachedUint8ArrayMemory0 = null;
|
|
1096
|
+
function getUint8ArrayMemory0() {
|
|
1097
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
1098
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
1099
|
+
}
|
|
1100
|
+
return cachedUint8ArrayMemory0;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
function handleError(f, args) {
|
|
1104
|
+
try {
|
|
1105
|
+
return f.apply(this, args);
|
|
1106
|
+
} catch (e) {
|
|
1107
|
+
const idx = addToExternrefTable0(e);
|
|
1108
|
+
wasm.__wbindgen_exn_store(idx);
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
function isLikeNone(x) {
|
|
1113
|
+
return x === undefined || x === null;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
function passArray32ToWasm0(arg, malloc) {
|
|
1117
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
1118
|
+
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
1119
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1120
|
+
return ptr;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
1124
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
1125
|
+
for (let i = 0; i < array.length; i++) {
|
|
1126
|
+
const add = addToExternrefTable0(array[i]);
|
|
1127
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
1128
|
+
}
|
|
1129
|
+
WASM_VECTOR_LEN = array.length;
|
|
1130
|
+
return ptr;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
1134
|
+
if (realloc === undefined) {
|
|
1135
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1136
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
1137
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
1138
|
+
WASM_VECTOR_LEN = buf.length;
|
|
1139
|
+
return ptr;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
let len = arg.length;
|
|
1143
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
1144
|
+
|
|
1145
|
+
const mem = getUint8ArrayMemory0();
|
|
1146
|
+
|
|
1147
|
+
let offset = 0;
|
|
1148
|
+
|
|
1149
|
+
for (; offset < len; offset++) {
|
|
1150
|
+
const code = arg.charCodeAt(offset);
|
|
1151
|
+
if (code > 0x7F) break;
|
|
1152
|
+
mem[ptr + offset] = code;
|
|
1153
|
+
}
|
|
1154
|
+
if (offset !== len) {
|
|
1155
|
+
if (offset !== 0) {
|
|
1156
|
+
arg = arg.slice(offset);
|
|
1157
|
+
}
|
|
1158
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
1159
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
1160
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
1161
|
+
|
|
1162
|
+
offset += ret.written;
|
|
1163
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
WASM_VECTOR_LEN = offset;
|
|
1167
|
+
return ptr;
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
function takeFromExternrefTable0(idx) {
|
|
1171
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
1172
|
+
wasm.__externref_table_dealloc(idx);
|
|
1173
|
+
return value;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1177
|
+
cachedTextDecoder.decode();
|
|
1178
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
1179
|
+
let numBytesDecoded = 0;
|
|
1180
|
+
function decodeText(ptr, len) {
|
|
1181
|
+
numBytesDecoded += len;
|
|
1182
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
1183
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1184
|
+
cachedTextDecoder.decode();
|
|
1185
|
+
numBytesDecoded = len;
|
|
1186
|
+
}
|
|
1187
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
const cachedTextEncoder = new TextEncoder();
|
|
1191
|
+
|
|
1192
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
1193
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
1194
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1195
|
+
view.set(buf);
|
|
1196
|
+
return {
|
|
1197
|
+
read: arg.length,
|
|
1198
|
+
written: buf.length
|
|
1199
|
+
};
|
|
1200
|
+
};
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
let WASM_VECTOR_LEN = 0;
|
|
1204
|
+
|
|
1205
|
+
let wasmModule, wasm;
|
|
1206
|
+
function __wbg_finalize_init(instance, module) {
|
|
1207
|
+
wasm = instance.exports;
|
|
1208
|
+
wasmModule = module;
|
|
1209
|
+
cachedDataViewMemory0 = null;
|
|
1210
|
+
cachedUint32ArrayMemory0 = null;
|
|
1211
|
+
cachedUint8ArrayMemory0 = null;
|
|
1212
|
+
wasm.__wbindgen_start();
|
|
1213
|
+
return wasm;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
async function __wbg_load(module, imports) {
|
|
1217
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
1218
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
1219
|
+
try {
|
|
1220
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
1221
|
+
} catch (e) {
|
|
1222
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
1223
|
+
|
|
1224
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
1225
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
1226
|
+
|
|
1227
|
+
} else { throw e; }
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
const bytes = await module.arrayBuffer();
|
|
1232
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
1233
|
+
} else {
|
|
1234
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
1235
|
+
|
|
1236
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
1237
|
+
return { instance, module };
|
|
1238
|
+
} else {
|
|
1239
|
+
return instance;
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
function expectedResponseType(type) {
|
|
1244
|
+
switch (type) {
|
|
1245
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
1246
|
+
}
|
|
1247
|
+
return false;
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
function initSync(module) {
|
|
1252
|
+
if (wasm !== undefined) return wasm;
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
if (module !== undefined) {
|
|
1256
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
1257
|
+
({module} = module)
|
|
1258
|
+
} else {
|
|
1259
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
const imports = __wbg_get_imports();
|
|
1264
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
1265
|
+
module = new WebAssembly.Module(module);
|
|
1266
|
+
}
|
|
1267
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
1268
|
+
return __wbg_finalize_init(instance, module);
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
async function __wbg_init(module_or_path) {
|
|
1272
|
+
if (wasm !== undefined) return wasm;
|
|
1273
|
+
|
|
1274
|
+
|
|
1275
|
+
if (module_or_path !== undefined) {
|
|
1276
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
1277
|
+
({module_or_path} = module_or_path)
|
|
1278
|
+
} else {
|
|
1279
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
if (module_or_path === undefined) {
|
|
1284
|
+
module_or_path = new URL('client_debug_bg.wasm', import.meta.url);
|
|
1285
|
+
}
|
|
1286
|
+
const imports = __wbg_get_imports();
|
|
1287
|
+
|
|
1288
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
1289
|
+
module_or_path = fetch(module_or_path);
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
1293
|
+
|
|
1294
|
+
return __wbg_finalize_init(instance, module);
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
export { initSync, __wbg_init as default };
|