@lynx-js/web-core-wasm-canary 0.0.0 → 0.0.1-canary-20260116-ce265e8f
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 +8 -0
- package/{LICENSE → LICENSE.txt} +1 -1
- package/Notice.txt +1 -0
- package/README.md +1 -0
- package/binary/client/client.d.ts +263 -0
- package/binary/client/client.js +1339 -0
- package/binary/client/client_bg.wasm +0 -0
- package/binary/client/client_bg.wasm.d.ts +70 -0
- package/binary/client/client_debug.d.ts +263 -0
- package/binary/client/client_debug.js +1339 -0
- package/binary/client/client_debug_bg.wasm +0 -0
- package/binary/client/client_debug_bg.wasm.d.ts +70 -0
- package/binary/encode/encode.d.ts +157 -0
- package/binary/encode/encode.js +17 -0
- package/binary/encode/encode_bg.js +749 -0
- package/binary/encode/encode_bg.wasm +0 -0
- package/binary/encode/encode_bg.wasm.d.ts +50 -0
- package/binary/encode/encode_debug.d.ts +157 -0
- package/binary/encode/encode_debug.js +17 -0
- package/binary/encode/encode_debug_bg.js +822 -0
- package/binary/encode/encode_debug_bg.wasm +0 -0
- package/binary/encode/encode_debug_bg.wasm.d.ts +50 -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 +24 -0
- package/dist/client/background/background-apis/createBackgroundLynx.js +38 -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 +96 -0
- package/dist/client/decodeWorker/decode.worker.d.ts +1 -0
- package/dist/client/decodeWorker/decode.worker.js +338 -0
- package/dist/client/decodeWorker/types.d.ts +32 -0
- package/dist/client/decodeWorker/types.js +2 -0
- package/dist/client/endpoints.d.ts +53 -0
- package/dist/client/endpoints.js +37 -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 +207 -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 +56 -0
- package/dist/client/mainthread/LynxViewInstance.js +196 -0
- package/dist/client/mainthread/StyleManager.d.ts +15 -0
- package/dist/client/mainthread/StyleManager.js +72 -0
- package/dist/client/mainthread/TemplateManager.d.ts +11 -0
- package/dist/client/mainthread/TemplateManager.js +257 -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/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 +38 -0
- package/dist/client/mainthread/elementAPIs/WASMJSBinding.js +122 -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 +346 -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 +11 -0
- package/dist/client/wasm.js +52 -0
- package/dist/client/webElementsDynamicLoader.d.ts +8 -0
- package/dist/client/webElementsDynamicLoader.js +80 -0
- package/dist/client_prod/static/css/async/web-core-main-chunk.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 +303 -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-audio.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-foldview.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-input.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-list.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-overlay.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-refrshview.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-swiper.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-textarea.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-viewpager.js +1 -0
- package/dist/client_prod/static/js/client.js +2 -0
- package/dist/client_prod/static/wasm/7ff75609.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/encodeElementTemplate.d.ts +2 -0
- package/dist/encode/encodeElementTemplate.js +52 -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 +125 -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 +10 -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 +184 -0
- package/dist/types/IElementPAPI.js +2 -0
- package/dist/types/IMtsBinding.d.ts +11 -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 +87 -4
- package/index.js +0 -1
- package/selfIdentity.plist +0 -0
|
@@ -0,0 +1,749 @@
|
|
|
1
|
+
let wasm;
|
|
2
|
+
let wasmModule;
|
|
3
|
+
export function __wbg_set_wasm(exports, module) {
|
|
4
|
+
wasm = exports;
|
|
5
|
+
wasmModule = module;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
let cachedUint8ArrayMemory0 = null;
|
|
10
|
+
|
|
11
|
+
function getUint8ArrayMemory0() {
|
|
12
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
13
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
14
|
+
}
|
|
15
|
+
return cachedUint8ArrayMemory0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
19
|
+
|
|
20
|
+
cachedTextDecoder.decode();
|
|
21
|
+
|
|
22
|
+
function decodeText(ptr, len) {
|
|
23
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function getStringFromWasm0(ptr, len) {
|
|
27
|
+
ptr = ptr >>> 0;
|
|
28
|
+
return decodeText(ptr, len);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
let WASM_VECTOR_LEN = 0;
|
|
32
|
+
|
|
33
|
+
const cachedTextEncoder = new TextEncoder();
|
|
34
|
+
|
|
35
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
36
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
37
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
38
|
+
view.set(buf);
|
|
39
|
+
return {
|
|
40
|
+
read: arg.length,
|
|
41
|
+
written: buf.length
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
47
|
+
|
|
48
|
+
if (realloc === undefined) {
|
|
49
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
50
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
51
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
52
|
+
WASM_VECTOR_LEN = buf.length;
|
|
53
|
+
return ptr;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
let len = arg.length;
|
|
57
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
58
|
+
|
|
59
|
+
const mem = getUint8ArrayMemory0();
|
|
60
|
+
|
|
61
|
+
let offset = 0;
|
|
62
|
+
|
|
63
|
+
for (; offset < len; offset++) {
|
|
64
|
+
const code = arg.charCodeAt(offset);
|
|
65
|
+
if (code > 0x7F) break;
|
|
66
|
+
mem[ptr + offset] = code;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (offset !== len) {
|
|
70
|
+
if (offset !== 0) {
|
|
71
|
+
arg = arg.slice(offset);
|
|
72
|
+
}
|
|
73
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
74
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
75
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
76
|
+
|
|
77
|
+
offset += ret.written;
|
|
78
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
WASM_VECTOR_LEN = offset;
|
|
82
|
+
return ptr;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function isLikeNone(x) {
|
|
86
|
+
return x === undefined || x === null;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
let cachedDataViewMemory0 = null;
|
|
90
|
+
|
|
91
|
+
function getDataViewMemory0() {
|
|
92
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
93
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
94
|
+
}
|
|
95
|
+
return cachedDataViewMemory0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
99
|
+
ptr = ptr >>> 0;
|
|
100
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function takeFromExternrefTable0(idx) {
|
|
104
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
105
|
+
wasm.__externref_table_dealloc(idx);
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function _assertClass(instance, klass) {
|
|
110
|
+
if (!(instance instanceof klass)) {
|
|
111
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function addToExternrefTable0(obj) {
|
|
116
|
+
const idx = wasm.__externref_table_alloc();
|
|
117
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
118
|
+
return idx;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
122
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
123
|
+
for (let i = 0; i < array.length; i++) {
|
|
124
|
+
const add = addToExternrefTable0(array[i]);
|
|
125
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
126
|
+
}
|
|
127
|
+
WASM_VECTOR_LEN = array.length;
|
|
128
|
+
return ptr;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* @enum {1 | 3 | 5 | 6 | 7 | 8 | 10 | 11 | 12}
|
|
132
|
+
*/
|
|
133
|
+
export const LEOAsmOpcode = Object.freeze({
|
|
134
|
+
SetAttribute: 1, "1": "SetAttribute",
|
|
135
|
+
RemoveChild: 3, "3": "RemoveChild",
|
|
136
|
+
AppendChild: 5, "5": "AppendChild",
|
|
137
|
+
CreateElement: 6, "6": "CreateElement",
|
|
138
|
+
SetAttributeSlot: 7, "7": "SetAttributeSlot",
|
|
139
|
+
AppendElementSlot: 8, "8": "AppendElementSlot",
|
|
140
|
+
SetDataset: 10, "10": "SetDataset",
|
|
141
|
+
AddEvent: 11, "11": "AddEvent",
|
|
142
|
+
AppendToRoot: 12, "12": "AppendToRoot",
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
const DecodedStyleDataFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
146
|
+
? { register: () => {}, unregister: () => {} }
|
|
147
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_decodedstyledata_free(ptr >>> 0, 1));
|
|
148
|
+
|
|
149
|
+
export class DecodedStyleData {
|
|
150
|
+
|
|
151
|
+
__destroy_into_raw() {
|
|
152
|
+
const ptr = this.__wbg_ptr;
|
|
153
|
+
this.__wbg_ptr = 0;
|
|
154
|
+
DecodedStyleDataFinalization.unregister(this);
|
|
155
|
+
return ptr;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
free() {
|
|
159
|
+
const ptr = this.__destroy_into_raw();
|
|
160
|
+
wasm.__wbg_decodedstyledata_free(ptr, 0);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* @param {Uint8Array} buffer
|
|
164
|
+
*/
|
|
165
|
+
constructor(buffer) {
|
|
166
|
+
const ret = wasm.decodedstyledata_new(buffer);
|
|
167
|
+
if (ret[2]) {
|
|
168
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
169
|
+
}
|
|
170
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
171
|
+
DecodedStyleDataFinalization.register(this, this.__wbg_ptr, this);
|
|
172
|
+
return this;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* @returns {string}
|
|
176
|
+
*/
|
|
177
|
+
get style_content() {
|
|
178
|
+
let deferred1_0;
|
|
179
|
+
let deferred1_1;
|
|
180
|
+
try {
|
|
181
|
+
const ret = wasm.decodedstyledata_style_content(this.__wbg_ptr);
|
|
182
|
+
deferred1_0 = ret[0];
|
|
183
|
+
deferred1_1 = ret[1];
|
|
184
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
185
|
+
} finally {
|
|
186
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* @returns {string}
|
|
191
|
+
*/
|
|
192
|
+
get font_face_content() {
|
|
193
|
+
let deferred1_0;
|
|
194
|
+
let deferred1_1;
|
|
195
|
+
try {
|
|
196
|
+
const ret = wasm.decodedstyledata_font_face_content(this.__wbg_ptr);
|
|
197
|
+
deferred1_0 = ret[0];
|
|
198
|
+
deferred1_1 = ret[1];
|
|
199
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
200
|
+
} finally {
|
|
201
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* @param {number} css_id
|
|
206
|
+
* @param {string[]} class_name
|
|
207
|
+
* @returns {string}
|
|
208
|
+
*/
|
|
209
|
+
query_css_og_declarations_by_css_id(css_id, class_name) {
|
|
210
|
+
let deferred2_0;
|
|
211
|
+
let deferred2_1;
|
|
212
|
+
try {
|
|
213
|
+
const ptr0 = passArrayJsValueToWasm0(class_name, wasm.__wbindgen_malloc);
|
|
214
|
+
const len0 = WASM_VECTOR_LEN;
|
|
215
|
+
const ret = wasm.decodedstyledata_query_css_og_declarations_by_css_id(this.__wbg_ptr, css_id, ptr0, len0);
|
|
216
|
+
deferred2_0 = ret[0];
|
|
217
|
+
deferred2_1 = ret[1];
|
|
218
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
219
|
+
} finally {
|
|
220
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* @param {Uint8Array} buffer
|
|
225
|
+
* @param {string | null | undefined} entry_name
|
|
226
|
+
* @param {boolean} config_enable_css_selector
|
|
227
|
+
* @returns {Uint8Array}
|
|
228
|
+
*/
|
|
229
|
+
static decode_into(buffer, entry_name, config_enable_css_selector) {
|
|
230
|
+
var ptr0 = isLikeNone(entry_name) ? 0 : passStringToWasm0(entry_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
231
|
+
var len0 = WASM_VECTOR_LEN;
|
|
232
|
+
const ret = wasm.decodedstyledata_decode_into(buffer, ptr0, len0, config_enable_css_selector);
|
|
233
|
+
if (ret[2]) {
|
|
234
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
235
|
+
}
|
|
236
|
+
return takeFromExternrefTable0(ret[0]);
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* @param {RawStyleInfo} raw_style_info
|
|
240
|
+
* @param {boolean} config_enable_css_selector
|
|
241
|
+
* @param {string | null} [entry_name]
|
|
242
|
+
* @returns {Uint8Array}
|
|
243
|
+
*/
|
|
244
|
+
static encode_from_raw_style_info(raw_style_info, config_enable_css_selector, entry_name) {
|
|
245
|
+
_assertClass(raw_style_info, RawStyleInfo);
|
|
246
|
+
var ptr0 = raw_style_info.__destroy_into_raw();
|
|
247
|
+
var ptr1 = isLikeNone(entry_name) ? 0 : passStringToWasm0(entry_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
248
|
+
var len1 = WASM_VECTOR_LEN;
|
|
249
|
+
const ret = wasm.decodedstyledata_encode_from_raw_style_info(ptr0, config_enable_css_selector, ptr1, len1);
|
|
250
|
+
if (ret[2]) {
|
|
251
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
252
|
+
}
|
|
253
|
+
return takeFromExternrefTable0(ret[0]);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
if (Symbol.dispose) DecodedStyleData.prototype[Symbol.dispose] = DecodedStyleData.prototype.free;
|
|
257
|
+
|
|
258
|
+
const ElementTemplateSectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
259
|
+
? { register: () => {}, unregister: () => {} }
|
|
260
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_elementtemplatesection_free(ptr >>> 0, 1));
|
|
261
|
+
|
|
262
|
+
export class ElementTemplateSection {
|
|
263
|
+
|
|
264
|
+
static __wrap(ptr) {
|
|
265
|
+
ptr = ptr >>> 0;
|
|
266
|
+
const obj = Object.create(ElementTemplateSection.prototype);
|
|
267
|
+
obj.__wbg_ptr = ptr;
|
|
268
|
+
ElementTemplateSectionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
269
|
+
return obj;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
__destroy_into_raw() {
|
|
273
|
+
const ptr = this.__wbg_ptr;
|
|
274
|
+
this.__wbg_ptr = 0;
|
|
275
|
+
ElementTemplateSectionFinalization.unregister(this);
|
|
276
|
+
return ptr;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
free() {
|
|
280
|
+
const ptr = this.__destroy_into_raw();
|
|
281
|
+
wasm.__wbg_elementtemplatesection_free(ptr, 0);
|
|
282
|
+
}
|
|
283
|
+
constructor() {
|
|
284
|
+
const ret = wasm.elementtemplatesection_new();
|
|
285
|
+
this.__wbg_ptr = ret >>> 0;
|
|
286
|
+
ElementTemplateSectionFinalization.register(this, this.__wbg_ptr, this);
|
|
287
|
+
return this;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* @param {Uint8Array} buffer
|
|
291
|
+
* @returns {ElementTemplateSection}
|
|
292
|
+
*/
|
|
293
|
+
static from_encoded(buffer) {
|
|
294
|
+
const ret = wasm.elementtemplatesection_from_encoded(buffer);
|
|
295
|
+
if (ret[2]) {
|
|
296
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
297
|
+
}
|
|
298
|
+
return ElementTemplateSection.__wrap(ret[0]);
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* @param {string} id
|
|
302
|
+
* @param {RawElementTemplate} raw_element_template
|
|
303
|
+
*/
|
|
304
|
+
add_element_template(id, raw_element_template) {
|
|
305
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
306
|
+
const len0 = WASM_VECTOR_LEN;
|
|
307
|
+
_assertClass(raw_element_template, RawElementTemplate);
|
|
308
|
+
var ptr1 = raw_element_template.__destroy_into_raw();
|
|
309
|
+
wasm.elementtemplatesection_add_element_template(this.__wbg_ptr, ptr0, len0, ptr1);
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* @returns {Uint8Array}
|
|
313
|
+
*/
|
|
314
|
+
encode() {
|
|
315
|
+
const ret = wasm.elementtemplatesection_encode(this.__wbg_ptr);
|
|
316
|
+
return ret;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
if (Symbol.dispose) ElementTemplateSection.prototype[Symbol.dispose] = ElementTemplateSection.prototype.free;
|
|
320
|
+
|
|
321
|
+
const OperationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
322
|
+
? { register: () => {}, unregister: () => {} }
|
|
323
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_operation_free(ptr >>> 0, 1));
|
|
324
|
+
|
|
325
|
+
export class Operation {
|
|
326
|
+
|
|
327
|
+
__destroy_into_raw() {
|
|
328
|
+
const ptr = this.__wbg_ptr;
|
|
329
|
+
this.__wbg_ptr = 0;
|
|
330
|
+
OperationFinalization.unregister(this);
|
|
331
|
+
return ptr;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
free() {
|
|
335
|
+
const ptr = this.__destroy_into_raw();
|
|
336
|
+
wasm.__wbg_operation_free(ptr, 0);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
if (Symbol.dispose) Operation.prototype[Symbol.dispose] = Operation.prototype.free;
|
|
340
|
+
|
|
341
|
+
const RawElementTemplateFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
342
|
+
? { register: () => {}, unregister: () => {} }
|
|
343
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_rawelementtemplate_free(ptr >>> 0, 1));
|
|
344
|
+
|
|
345
|
+
export class RawElementTemplate {
|
|
346
|
+
|
|
347
|
+
__destroy_into_raw() {
|
|
348
|
+
const ptr = this.__wbg_ptr;
|
|
349
|
+
this.__wbg_ptr = 0;
|
|
350
|
+
RawElementTemplateFinalization.unregister(this);
|
|
351
|
+
return ptr;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
free() {
|
|
355
|
+
const ptr = this.__destroy_into_raw();
|
|
356
|
+
wasm.__wbg_rawelementtemplate_free(ptr, 0);
|
|
357
|
+
}
|
|
358
|
+
constructor() {
|
|
359
|
+
const ret = wasm.rawelementtemplate_new();
|
|
360
|
+
this.__wbg_ptr = ret >>> 0;
|
|
361
|
+
RawElementTemplateFinalization.register(this, this.__wbg_ptr, this);
|
|
362
|
+
return this;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* @param {number} element_id
|
|
366
|
+
*/
|
|
367
|
+
append_to_root(element_id) {
|
|
368
|
+
wasm.rawelementtemplate_append_to_root(this.__wbg_ptr, element_id);
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* @param {string} tag_names
|
|
372
|
+
* @param {number} element_id
|
|
373
|
+
*/
|
|
374
|
+
create_element(tag_names, element_id) {
|
|
375
|
+
const ptr0 = passStringToWasm0(tag_names, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
376
|
+
const len0 = WASM_VECTOR_LEN;
|
|
377
|
+
wasm.rawelementtemplate_create_element(this.__wbg_ptr, ptr0, len0, element_id);
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* @param {number} element_id
|
|
381
|
+
* @param {string} attr_name
|
|
382
|
+
* @param {string} attr_value
|
|
383
|
+
*/
|
|
384
|
+
set_attribute(element_id, attr_name, attr_value) {
|
|
385
|
+
const ptr0 = passStringToWasm0(attr_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
386
|
+
const len0 = WASM_VECTOR_LEN;
|
|
387
|
+
const ptr1 = passStringToWasm0(attr_value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
388
|
+
const len1 = WASM_VECTOR_LEN;
|
|
389
|
+
wasm.rawelementtemplate_set_attribute(this.__wbg_ptr, element_id, ptr0, len0, ptr1, len1);
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* @param {number} element_id
|
|
393
|
+
* @param {string} data_name
|
|
394
|
+
* @param {string} data_value
|
|
395
|
+
*/
|
|
396
|
+
set_dataset(element_id, data_name, data_value) {
|
|
397
|
+
const ptr0 = passStringToWasm0(data_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
398
|
+
const len0 = WASM_VECTOR_LEN;
|
|
399
|
+
const ptr1 = passStringToWasm0(data_value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
400
|
+
const len1 = WASM_VECTOR_LEN;
|
|
401
|
+
wasm.rawelementtemplate_set_dataset(this.__wbg_ptr, element_id, ptr0, len0, ptr1, len1);
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* @param {number} parent_element_id
|
|
405
|
+
* @param {number} child_element_id
|
|
406
|
+
*/
|
|
407
|
+
append_child(parent_element_id, child_element_id) {
|
|
408
|
+
wasm.rawelementtemplate_append_child(this.__wbg_ptr, parent_element_id, child_element_id);
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* @param {number} element_id
|
|
412
|
+
* @param {string} event_type
|
|
413
|
+
* @param {string} event_name
|
|
414
|
+
* @param {string} event_value
|
|
415
|
+
*/
|
|
416
|
+
set_cross_thread_event(element_id, event_type, event_name, event_value) {
|
|
417
|
+
const ptr0 = passStringToWasm0(event_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
418
|
+
const len0 = WASM_VECTOR_LEN;
|
|
419
|
+
const ptr1 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
420
|
+
const len1 = WASM_VECTOR_LEN;
|
|
421
|
+
const ptr2 = passStringToWasm0(event_value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
422
|
+
const len2 = WASM_VECTOR_LEN;
|
|
423
|
+
wasm.rawelementtemplate_set_cross_thread_event(this.__wbg_ptr, element_id, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* @param {number} element_id
|
|
427
|
+
* @param {number} attribute_slot_id
|
|
428
|
+
* @param {string} attr_name
|
|
429
|
+
*/
|
|
430
|
+
set_attribute_slot(element_id, attribute_slot_id, attr_name) {
|
|
431
|
+
const ptr0 = passStringToWasm0(attr_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
432
|
+
const len0 = WASM_VECTOR_LEN;
|
|
433
|
+
wasm.rawelementtemplate_set_attribute_slot(this.__wbg_ptr, element_id, attribute_slot_id, ptr0, len0);
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* @param {number} parent_element_id
|
|
437
|
+
* @param {number} child_element_slot_id
|
|
438
|
+
*/
|
|
439
|
+
append_element_slot(parent_element_id, child_element_slot_id) {
|
|
440
|
+
wasm.rawelementtemplate_append_element_slot(this.__wbg_ptr, parent_element_id, child_element_slot_id);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
if (Symbol.dispose) RawElementTemplate.prototype[Symbol.dispose] = RawElementTemplate.prototype.free;
|
|
444
|
+
|
|
445
|
+
const RawStyleInfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
446
|
+
? { register: () => {}, unregister: () => {} }
|
|
447
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_rawstyleinfo_free(ptr >>> 0, 1));
|
|
448
|
+
/**
|
|
449
|
+
*
|
|
450
|
+
* * key: cssId
|
|
451
|
+
* * value: StyleSheet
|
|
452
|
+
*
|
|
453
|
+
*/
|
|
454
|
+
export class RawStyleInfo {
|
|
455
|
+
|
|
456
|
+
__destroy_into_raw() {
|
|
457
|
+
const ptr = this.__wbg_ptr;
|
|
458
|
+
this.__wbg_ptr = 0;
|
|
459
|
+
RawStyleInfoFinalization.unregister(this);
|
|
460
|
+
return ptr;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
free() {
|
|
464
|
+
const ptr = this.__destroy_into_raw();
|
|
465
|
+
wasm.__wbg_rawstyleinfo_free(ptr, 0);
|
|
466
|
+
}
|
|
467
|
+
constructor() {
|
|
468
|
+
const ret = wasm.rawstyleinfo_new();
|
|
469
|
+
this.__wbg_ptr = ret >>> 0;
|
|
470
|
+
RawStyleInfoFinalization.register(this, this.__wbg_ptr, this);
|
|
471
|
+
return this;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
*
|
|
475
|
+
* * Appends an import to the stylesheet identified by `css_id`.
|
|
476
|
+
* * If the stylesheet does not exist, it is created.
|
|
477
|
+
* * @param css_id - The ID of the CSS file.
|
|
478
|
+
* * @param import_css_id - The ID of the imported CSS file.
|
|
479
|
+
*
|
|
480
|
+
* @param {number} css_id
|
|
481
|
+
* @param {number} import_css_id
|
|
482
|
+
*/
|
|
483
|
+
append_import(css_id, import_css_id) {
|
|
484
|
+
wasm.rawstyleinfo_append_import(this.__wbg_ptr, css_id, import_css_id);
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
*
|
|
488
|
+
* * Pushes a rule to the stylesheet identified by `css_id`.
|
|
489
|
+
* * If the stylesheet does not exist, it is created.
|
|
490
|
+
* * @param css_id - The ID of the CSS file.
|
|
491
|
+
* * @param rule - The rule to append.
|
|
492
|
+
*
|
|
493
|
+
* @param {number} css_id
|
|
494
|
+
* @param {Rule} rule
|
|
495
|
+
*/
|
|
496
|
+
push_rule(css_id, rule) {
|
|
497
|
+
_assertClass(rule, Rule);
|
|
498
|
+
var ptr0 = rule.__destroy_into_raw();
|
|
499
|
+
wasm.rawstyleinfo_push_rule(this.__wbg_ptr, css_id, ptr0);
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
*
|
|
503
|
+
* * Encodes the RawStyleInfo into a Uint8Array using bincode serialization.
|
|
504
|
+
* * @returns A Uint8Array containing the serialized RawStyleInfo.
|
|
505
|
+
*
|
|
506
|
+
* @returns {Uint8Array}
|
|
507
|
+
*/
|
|
508
|
+
encode() {
|
|
509
|
+
const ret = wasm.rawstyleinfo_encode(this.__wbg_ptr);
|
|
510
|
+
if (ret[2]) {
|
|
511
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
512
|
+
}
|
|
513
|
+
return takeFromExternrefTable0(ret[0]);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
if (Symbol.dispose) RawStyleInfo.prototype[Symbol.dispose] = RawStyleInfo.prototype.free;
|
|
517
|
+
|
|
518
|
+
const RuleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
519
|
+
? { register: () => {}, unregister: () => {} }
|
|
520
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_rule_free(ptr >>> 0, 1));
|
|
521
|
+
|
|
522
|
+
export class Rule {
|
|
523
|
+
|
|
524
|
+
__destroy_into_raw() {
|
|
525
|
+
const ptr = this.__wbg_ptr;
|
|
526
|
+
this.__wbg_ptr = 0;
|
|
527
|
+
RuleFinalization.unregister(this);
|
|
528
|
+
return ptr;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
free() {
|
|
532
|
+
const ptr = this.__destroy_into_raw();
|
|
533
|
+
wasm.__wbg_rule_free(ptr, 0);
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
*
|
|
537
|
+
* * Creates a new Rule with the specified type.
|
|
538
|
+
* * @param rule_type - The type of the rule (e.g., "StyleRule", "FontFaceRule", "KeyframesRule").
|
|
539
|
+
*
|
|
540
|
+
* @param {string} rule_type
|
|
541
|
+
*/
|
|
542
|
+
constructor(rule_type) {
|
|
543
|
+
const ptr0 = passStringToWasm0(rule_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
544
|
+
const len0 = WASM_VECTOR_LEN;
|
|
545
|
+
const ret = wasm.rule_new(ptr0, len0);
|
|
546
|
+
if (ret[2]) {
|
|
547
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
548
|
+
}
|
|
549
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
550
|
+
RuleFinalization.register(this, this.__wbg_ptr, this);
|
|
551
|
+
return this;
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
*
|
|
555
|
+
* * Sets the prelude for the rule.
|
|
556
|
+
* * @param prelude - The prelude to set (SelectorList or KeyFramesPrelude).
|
|
557
|
+
*
|
|
558
|
+
* @param {RulePrelude} prelude
|
|
559
|
+
*/
|
|
560
|
+
set_prelude(prelude) {
|
|
561
|
+
_assertClass(prelude, RulePrelude);
|
|
562
|
+
var ptr0 = prelude.__destroy_into_raw();
|
|
563
|
+
wasm.rule_set_prelude(this.__wbg_ptr, ptr0);
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
*
|
|
567
|
+
* * Pushes a declaration to the rule's declaration block.
|
|
568
|
+
* * @param property_name - The property name.
|
|
569
|
+
* * @param value - The property value.
|
|
570
|
+
*
|
|
571
|
+
* @param {string} property_name
|
|
572
|
+
* @param {string} value
|
|
573
|
+
*/
|
|
574
|
+
push_declaration(property_name, value) {
|
|
575
|
+
const ptr0 = passStringToWasm0(property_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
576
|
+
const len0 = WASM_VECTOR_LEN;
|
|
577
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
578
|
+
const len1 = WASM_VECTOR_LEN;
|
|
579
|
+
wasm.rule_push_declaration(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
*
|
|
583
|
+
* * Pushes a nested rule to the rule.
|
|
584
|
+
* * @param rule - The nested rule to add.
|
|
585
|
+
*
|
|
586
|
+
* @param {Rule} rule
|
|
587
|
+
*/
|
|
588
|
+
push_rule_children(rule) {
|
|
589
|
+
_assertClass(rule, Rule);
|
|
590
|
+
var ptr0 = rule.__destroy_into_raw();
|
|
591
|
+
wasm.rule_push_rule_children(this.__wbg_ptr, ptr0);
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
if (Symbol.dispose) Rule.prototype[Symbol.dispose] = Rule.prototype.free;
|
|
595
|
+
|
|
596
|
+
const RulePreludeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
597
|
+
? { register: () => {}, unregister: () => {} }
|
|
598
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_ruleprelude_free(ptr >>> 0, 1));
|
|
599
|
+
/**
|
|
600
|
+
*
|
|
601
|
+
* * Either SelectorList or KeyFramesPrelude
|
|
602
|
+
* * Depending on the RuleType
|
|
603
|
+
* * If it is SelectorList, then selectors is a list of Selector
|
|
604
|
+
* * If it is KeyFramesPrelude, then selectors has only one selector which is Prelude text, its simple_selectors is empty
|
|
605
|
+
* * If the parent is FontFace, then selectors is empty
|
|
606
|
+
*
|
|
607
|
+
*/
|
|
608
|
+
export class RulePrelude {
|
|
609
|
+
|
|
610
|
+
__destroy_into_raw() {
|
|
611
|
+
const ptr = this.__wbg_ptr;
|
|
612
|
+
this.__wbg_ptr = 0;
|
|
613
|
+
RulePreludeFinalization.unregister(this);
|
|
614
|
+
return ptr;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
free() {
|
|
618
|
+
const ptr = this.__destroy_into_raw();
|
|
619
|
+
wasm.__wbg_ruleprelude_free(ptr, 0);
|
|
620
|
+
}
|
|
621
|
+
constructor() {
|
|
622
|
+
const ret = wasm.ruleprelude_new();
|
|
623
|
+
this.__wbg_ptr = ret >>> 0;
|
|
624
|
+
RulePreludeFinalization.register(this, this.__wbg_ptr, this);
|
|
625
|
+
return this;
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
*
|
|
629
|
+
* * Pushes a selector to the list.
|
|
630
|
+
* * @param selector - The selector to add.
|
|
631
|
+
*
|
|
632
|
+
* @param {Selector} selector
|
|
633
|
+
*/
|
|
634
|
+
push_selector(selector) {
|
|
635
|
+
_assertClass(selector, Selector);
|
|
636
|
+
var ptr0 = selector.__destroy_into_raw();
|
|
637
|
+
wasm.ruleprelude_push_selector(this.__wbg_ptr, ptr0);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
if (Symbol.dispose) RulePrelude.prototype[Symbol.dispose] = RulePrelude.prototype.free;
|
|
641
|
+
|
|
642
|
+
const SelectorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
643
|
+
? { register: () => {}, unregister: () => {} }
|
|
644
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_selector_free(ptr >>> 0, 1));
|
|
645
|
+
|
|
646
|
+
export class Selector {
|
|
647
|
+
|
|
648
|
+
__destroy_into_raw() {
|
|
649
|
+
const ptr = this.__wbg_ptr;
|
|
650
|
+
this.__wbg_ptr = 0;
|
|
651
|
+
SelectorFinalization.unregister(this);
|
|
652
|
+
return ptr;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
free() {
|
|
656
|
+
const ptr = this.__destroy_into_raw();
|
|
657
|
+
wasm.__wbg_selector_free(ptr, 0);
|
|
658
|
+
}
|
|
659
|
+
constructor() {
|
|
660
|
+
const ret = wasm.ruleprelude_new();
|
|
661
|
+
this.__wbg_ptr = ret >>> 0;
|
|
662
|
+
SelectorFinalization.register(this, this.__wbg_ptr, this);
|
|
663
|
+
return this;
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
*
|
|
667
|
+
* * Pushes a selector section to the selector.
|
|
668
|
+
* * @param selector_type - The type of the selector section (e.g., "ClassSelector", "IdSelector").
|
|
669
|
+
* * @param value - The value of the selector section.
|
|
670
|
+
*
|
|
671
|
+
* @param {string} selector_type
|
|
672
|
+
* @param {string} value
|
|
673
|
+
*/
|
|
674
|
+
push_one_selector_section(selector_type, value) {
|
|
675
|
+
const ptr0 = passStringToWasm0(selector_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
676
|
+
const len0 = WASM_VECTOR_LEN;
|
|
677
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
678
|
+
const len1 = WASM_VECTOR_LEN;
|
|
679
|
+
const ret = wasm.selector_push_one_selector_section(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
680
|
+
if (ret[1]) {
|
|
681
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
if (Symbol.dispose) Selector.prototype[Symbol.dispose] = Selector.prototype.free;
|
|
686
|
+
|
|
687
|
+
const StyleInfoDecoderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
688
|
+
? { register: () => {}, unregister: () => {} }
|
|
689
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_styleinfodecoder_free(ptr >>> 0, 1));
|
|
690
|
+
|
|
691
|
+
export class StyleInfoDecoder {
|
|
692
|
+
|
|
693
|
+
__destroy_into_raw() {
|
|
694
|
+
const ptr = this.__wbg_ptr;
|
|
695
|
+
this.__wbg_ptr = 0;
|
|
696
|
+
StyleInfoDecoderFinalization.unregister(this);
|
|
697
|
+
return ptr;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
free() {
|
|
701
|
+
const ptr = this.__destroy_into_raw();
|
|
702
|
+
wasm.__wbg_styleinfodecoder_free(ptr, 0);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
if (Symbol.dispose) StyleInfoDecoder.prototype[Symbol.dispose] = StyleInfoDecoder.prototype.free;
|
|
706
|
+
|
|
707
|
+
export function __wbg_Error_e83987f665cf5504(arg0, arg1) {
|
|
708
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
709
|
+
return ret;
|
|
710
|
+
};
|
|
711
|
+
|
|
712
|
+
export function __wbg___wbindgen_string_get_e4f06c90489ad01b(arg0, arg1) {
|
|
713
|
+
const obj = arg1;
|
|
714
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
715
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
716
|
+
var len1 = WASM_VECTOR_LEN;
|
|
717
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
718
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
export function __wbg___wbindgen_throw_b855445ff6a94295(arg0, arg1) {
|
|
722
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
723
|
+
};
|
|
724
|
+
|
|
725
|
+
export function __wbg_length_69bca3cb64fc8748(arg0) {
|
|
726
|
+
const ret = arg0.length;
|
|
727
|
+
return ret;
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
export function __wbg_new_from_slice_92f4d78ca282a2d2(arg0, arg1) {
|
|
731
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
732
|
+
return ret;
|
|
733
|
+
};
|
|
734
|
+
|
|
735
|
+
export function __wbg_prototypesetcall_2a6620b6922694b2(arg0, arg1, arg2) {
|
|
736
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
737
|
+
};
|
|
738
|
+
|
|
739
|
+
export function __wbindgen_init_externref_table() {
|
|
740
|
+
const table = wasm.__wbindgen_externrefs;
|
|
741
|
+
const offset = table.grow(4);
|
|
742
|
+
table.set(0, undefined);
|
|
743
|
+
table.set(offset + 0, undefined);
|
|
744
|
+
table.set(offset + 1, null);
|
|
745
|
+
table.set(offset + 2, true);
|
|
746
|
+
table.set(offset + 3, false);
|
|
747
|
+
;
|
|
748
|
+
};
|
|
749
|
+
|