@lynx-js/web-core-server 0.15.5 → 0.15.6
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 +6 -0
- package/dist/index.js +109 -94
- package/dist/legacy-wasm-chunk.js +77 -35
- package/dist/static/wasm/43143691.module.wasm +0 -0
- package/dist/static/wasm/57807697.module.wasm +0 -0
- package/package.json +4 -4
- package/dist/static/wasm/1d0f646c207811d4.module.wasm +0 -0
- package/dist/static/wasm/8e708eec9c98f88c.module.wasm +0 -0
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -8,12 +8,10 @@ var __webpack_modules__ = {
|
|
|
8
8
|
__webpack_require__.d(__webpack_exports__, {
|
|
9
9
|
C2: ()=>_standard_bg_js__WEBPACK_IMPORTED_MODULE_0__.C2,
|
|
10
10
|
Or: ()=>_standard_bg_js__WEBPACK_IMPORTED_MODULE_0__.Or,
|
|
11
|
-
Y1: ()=>_standard_bg_js__WEBPACK_IMPORTED_MODULE_0__.Y1,
|
|
12
11
|
a9: ()=>_standard_bg_js__WEBPACK_IMPORTED_MODULE_0__.a9,
|
|
13
|
-
|
|
12
|
+
h4: ()=>_standard_bg_js__WEBPACK_IMPORTED_MODULE_0__.h4,
|
|
14
13
|
oT: ()=>_standard_bg_js__WEBPACK_IMPORTED_MODULE_0__.oT,
|
|
15
14
|
pE: ()=>_standard_bg_js__WEBPACK_IMPORTED_MODULE_0__.pE,
|
|
16
|
-
sy: ()=>_standard_bg_js__WEBPACK_IMPORTED_MODULE_0__.sy,
|
|
17
15
|
xJ: ()=>_standard_bg_js__WEBPACK_IMPORTED_MODULE_0__.xJ,
|
|
18
16
|
xQ: ()=>_standard_bg_js__WEBPACK_IMPORTED_MODULE_0__.xQ
|
|
19
17
|
});
|
|
@@ -35,12 +33,10 @@ var __webpack_modules__ = {
|
|
|
35
33
|
__webpack_require__.d(__webpack_exports__, {
|
|
36
34
|
C2: ()=>__wbg_push_737cfc8c1432c2c6,
|
|
37
35
|
Or: ()=>__wbindgen_throw,
|
|
38
|
-
Y1: ()=>malloc,
|
|
39
36
|
a9: ()=>__wbg_new_78feb108b6472713,
|
|
40
|
-
|
|
37
|
+
h4: ()=>__wbindgen_string_new,
|
|
41
38
|
oT: ()=>__wbg_set_wasm,
|
|
42
39
|
pE: ()=>transform_raw_u16_inline_style_ptr_parsed,
|
|
43
|
-
sy: ()=>__wbg_fromCharCode_5493f9b25e1ce0a1,
|
|
44
40
|
xJ: ()=>transform_raw_u16_inline_style_ptr,
|
|
45
41
|
xQ: ()=>__wbindgen_init_externref_table
|
|
46
42
|
});
|
|
@@ -49,15 +45,6 @@ var __webpack_modules__ = {
|
|
|
49
45
|
function __wbg_set_wasm(val) {
|
|
50
46
|
wasm = val;
|
|
51
47
|
}
|
|
52
|
-
let cachedUint16ArrayMemory0 = null;
|
|
53
|
-
function getUint16ArrayMemory0() {
|
|
54
|
-
if (null === cachedUint16ArrayMemory0 || 0 === cachedUint16ArrayMemory0.byteLength) cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer);
|
|
55
|
-
return cachedUint16ArrayMemory0;
|
|
56
|
-
}
|
|
57
|
-
function getArrayU16FromWasm0(ptr, len) {
|
|
58
|
-
ptr >>>= 0;
|
|
59
|
-
return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
|
|
60
|
-
}
|
|
61
48
|
const lTextDecoder = 'undefined' == typeof TextDecoder ? (0, module.require)('util').TextDecoder : TextDecoder;
|
|
62
49
|
let cachedTextDecoder = new lTextDecoder('utf-8', {
|
|
63
50
|
ignoreBOM: true,
|
|
@@ -73,23 +60,64 @@ var __webpack_modules__ = {
|
|
|
73
60
|
ptr >>>= 0;
|
|
74
61
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
75
62
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
63
|
+
let WASM_VECTOR_LEN = 0;
|
|
64
|
+
const lTextEncoder = 'undefined' == typeof TextEncoder ? (0, module.require)('util').TextEncoder : TextEncoder;
|
|
65
|
+
let cachedTextEncoder = new lTextEncoder('utf-8');
|
|
66
|
+
const encodeString = 'function' == typeof cachedTextEncoder.encodeInto ? function(arg, view) {
|
|
67
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
68
|
+
} : function(arg, view) {
|
|
69
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
70
|
+
view.set(buf);
|
|
71
|
+
return {
|
|
72
|
+
read: arg.length,
|
|
73
|
+
written: buf.length
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
77
|
+
if (void 0 === realloc) {
|
|
78
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
79
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
80
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
81
|
+
WASM_VECTOR_LEN = buf.length;
|
|
82
|
+
return ptr;
|
|
83
|
+
}
|
|
84
|
+
let len = arg.length;
|
|
85
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
86
|
+
const mem = getUint8ArrayMemory0();
|
|
87
|
+
let offset = 0;
|
|
88
|
+
for(; offset < len; offset++){
|
|
89
|
+
const code = arg.charCodeAt(offset);
|
|
90
|
+
if (code > 0x7F) break;
|
|
91
|
+
mem[ptr + offset] = code;
|
|
92
|
+
}
|
|
93
|
+
if (offset !== len) {
|
|
94
|
+
if (0 !== offset) arg = arg.slice(offset);
|
|
95
|
+
ptr = realloc(ptr, len, len = offset + 3 * arg.length, 1) >>> 0;
|
|
96
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
97
|
+
const ret = encodeString(arg, view);
|
|
98
|
+
offset += ret.written;
|
|
99
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
100
|
+
}
|
|
101
|
+
WASM_VECTOR_LEN = offset;
|
|
102
|
+
return ptr;
|
|
87
103
|
}
|
|
88
|
-
function
|
|
89
|
-
wasm.
|
|
104
|
+
function transform_raw_u16_inline_style_ptr(str) {
|
|
105
|
+
const ptr0 = passStringToWasm0(str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
106
|
+
const len0 = WASM_VECTOR_LEN;
|
|
107
|
+
const ret = wasm.transform_raw_u16_inline_style_ptr(ptr0, len0);
|
|
108
|
+
let v2;
|
|
109
|
+
if (0 !== ret[0]) {
|
|
110
|
+
v2 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
111
|
+
wasm.__wbindgen_free(ret[0], +ret[1], 1);
|
|
112
|
+
}
|
|
113
|
+
return v2;
|
|
90
114
|
}
|
|
91
|
-
function
|
|
92
|
-
const
|
|
115
|
+
function transform_raw_u16_inline_style_ptr_parsed(name, value) {
|
|
116
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
117
|
+
const len0 = WASM_VECTOR_LEN;
|
|
118
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
119
|
+
const len1 = WASM_VECTOR_LEN;
|
|
120
|
+
const ret = wasm.transform_raw_u16_inline_style_ptr_parsed(ptr0, len0, ptr1, len1);
|
|
93
121
|
return ret;
|
|
94
122
|
}
|
|
95
123
|
function __wbg_new_78feb108b6472713() {
|
|
@@ -109,6 +137,10 @@ var __webpack_modules__ = {
|
|
|
109
137
|
table.set(offset + 2, true);
|
|
110
138
|
table.set(offset + 3, false);
|
|
111
139
|
}
|
|
140
|
+
function __wbindgen_string_new(arg0, arg1) {
|
|
141
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
142
|
+
return ret;
|
|
143
|
+
}
|
|
112
144
|
function __wbindgen_throw(arg0, arg1) {
|
|
113
145
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
114
146
|
}
|
|
@@ -118,25 +150,20 @@ var __webpack_modules__ = {
|
|
|
118
150
|
try {
|
|
119
151
|
__webpack_require__.r(__webpack_exports__);
|
|
120
152
|
__webpack_require__.d(__webpack_exports__, {
|
|
121
|
-
__wbg_fromCharCode_5493f9b25e1ce0a1: ()=>_dist_standard_js__WEBPACK_IMPORTED_MODULE_0__.sy,
|
|
122
153
|
__wbg_new_78feb108b6472713: ()=>_dist_standard_js__WEBPACK_IMPORTED_MODULE_0__.a9,
|
|
123
154
|
__wbg_push_737cfc8c1432c2c6: ()=>_dist_standard_js__WEBPACK_IMPORTED_MODULE_0__.C2,
|
|
124
155
|
__wbg_set_wasm: ()=>_dist_standard_js__WEBPACK_IMPORTED_MODULE_0__.oT,
|
|
125
156
|
__wbindgen_init_externref_table: ()=>_dist_standard_js__WEBPACK_IMPORTED_MODULE_0__.xQ,
|
|
157
|
+
__wbindgen_string_new: ()=>_dist_standard_js__WEBPACK_IMPORTED_MODULE_0__.h4,
|
|
126
158
|
__wbindgen_throw: ()=>_dist_standard_js__WEBPACK_IMPORTED_MODULE_0__.Or,
|
|
127
|
-
free: ()=>_dist_standard_js__WEBPACK_IMPORTED_MODULE_0__.gd,
|
|
128
|
-
malloc: ()=>_dist_standard_js__WEBPACK_IMPORTED_MODULE_0__.Y1,
|
|
129
|
-
memory: ()=>_dist_standard_bg_wasm__WEBPACK_IMPORTED_MODULE_1__.memory,
|
|
130
159
|
transform_raw_u16_inline_style_ptr: ()=>_dist_standard_js__WEBPACK_IMPORTED_MODULE_0__.xJ,
|
|
131
160
|
transform_raw_u16_inline_style_ptr_parsed: ()=>_dist_standard_js__WEBPACK_IMPORTED_MODULE_0__.pE
|
|
132
161
|
});
|
|
133
162
|
var _dist_standard_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../web-style-transformer/dist/standard.js");
|
|
134
|
-
var _dist_standard_bg_wasm__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../web-style-transformer/dist/standard_bg.wasm");
|
|
135
163
|
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([
|
|
136
|
-
_dist_standard_js__WEBPACK_IMPORTED_MODULE_0__
|
|
137
|
-
_dist_standard_bg_wasm__WEBPACK_IMPORTED_MODULE_1__
|
|
164
|
+
_dist_standard_js__WEBPACK_IMPORTED_MODULE_0__
|
|
138
165
|
]);
|
|
139
|
-
|
|
166
|
+
_dist_standard_js__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
|
140
167
|
__webpack_async_result__();
|
|
141
168
|
} catch (e) {
|
|
142
169
|
__webpack_async_result__(e);
|
|
@@ -145,10 +172,10 @@ var __webpack_modules__ = {
|
|
|
145
172
|
},
|
|
146
173
|
"../web-style-transformer/dist/standard_bg.wasm": function(module, exports, __webpack_require__) {
|
|
147
174
|
var WEBPACK_IMPORTED_MODULE_0 = __webpack_require__("../web-style-transformer/dist/standard_bg.js");
|
|
148
|
-
module.exports = __webpack_require__.v(exports, module.id, "
|
|
175
|
+
module.exports = __webpack_require__.v(exports, module.id, "431436911960378f", {
|
|
149
176
|
"./standard_bg.js": {
|
|
150
|
-
__wbg_fromCharCode_5493f9b25e1ce0a1: WEBPACK_IMPORTED_MODULE_0.sy,
|
|
151
177
|
__wbg_new_78feb108b6472713: WEBPACK_IMPORTED_MODULE_0.a9,
|
|
178
|
+
__wbindgen_string_new: WEBPACK_IMPORTED_MODULE_0.h4,
|
|
152
179
|
__wbg_push_737cfc8c1432c2c6: WEBPACK_IMPORTED_MODULE_0.C2,
|
|
153
180
|
__wbindgen_throw: WEBPACK_IMPORTED_MODULE_0.Or,
|
|
154
181
|
__wbindgen_init_externref_table: WEBPACK_IMPORTED_MODULE_0.xQ
|
|
@@ -299,7 +326,7 @@ __webpack_require__.m = __webpack_modules__;
|
|
|
299
326
|
import('fs'),
|
|
300
327
|
import('url')
|
|
301
328
|
]).then(([{ readFile }, { URL }])=>new Promise((resolve, reject)=>{
|
|
302
|
-
readFile(new URL("static/wasm/" + wasmModuleHash + ".module.wasm", import.meta.url), (err, buffer)=>{
|
|
329
|
+
readFile(new URL("static/wasm/" + wasmModuleHash.slice(0, 8) + ".module.wasm", import.meta.url), (err, buffer)=>{
|
|
303
330
|
if (err) return reject(err);
|
|
304
331
|
resolve({
|
|
305
332
|
arrayBuffer () {
|
|
@@ -730,7 +757,9 @@ const mainThreadInjectVars = [
|
|
|
730
757
|
'__SetDataset',
|
|
731
758
|
'__SetID',
|
|
732
759
|
'__UpdateComponentID',
|
|
760
|
+
'__UpdateComponentInfo',
|
|
733
761
|
'__GetConfig',
|
|
762
|
+
'__GetAttributeByName',
|
|
734
763
|
'__UpdateListCallbacks',
|
|
735
764
|
'__AppendElement',
|
|
736
765
|
'__ElementIsEqual',
|
|
@@ -826,7 +855,7 @@ function registerCallLepusMethodHandler(rpc, runtime) {
|
|
|
826
855
|
function registerGetCustomSectionHandler(rpc, customSections) {
|
|
827
856
|
rpc.registerHandler(getCustomSectionsEndpoint, (key)=>customSections[key]?.content);
|
|
828
857
|
}
|
|
829
|
-
function createMainThreadLynx(config) {
|
|
858
|
+
function createMainThreadLynx(config, SystemInfo) {
|
|
830
859
|
return {
|
|
831
860
|
getJSContext () {
|
|
832
861
|
return config.jsContext;
|
|
@@ -841,7 +870,8 @@ function createMainThreadLynx(config) {
|
|
|
841
870
|
getCustomSectionSync (key) {
|
|
842
871
|
return config.customSections[key]?.content;
|
|
843
872
|
},
|
|
844
|
-
markPipelineTiming: config.callbacks.markTiming
|
|
873
|
+
markPipelineTiming: config.callbacks.markTiming,
|
|
874
|
+
SystemInfo
|
|
845
875
|
};
|
|
846
876
|
}
|
|
847
877
|
const referenceTypes = async ()=>WebAssembly.validate(new Uint8Array([
|
|
@@ -878,51 +908,22 @@ async function initWasm() {
|
|
|
878
908
|
const supportsReferenceTypes = await referenceTypes();
|
|
879
909
|
wasm = supportsReferenceTypes ? await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "../web-style-transformer/standard.js")) : await __webpack_require__.e("501").then(__webpack_require__.bind(__webpack_require__, "../web-style-transformer/legacy.js"));
|
|
880
910
|
}
|
|
881
|
-
let HEAPU16;
|
|
882
|
-
const stringToUTF16 = (str)=>{
|
|
883
|
-
const len = str.length;
|
|
884
|
-
const ptr = wasm.malloc(len << 1);
|
|
885
|
-
if (!HEAPU16 || 0 == HEAPU16.byteLength) HEAPU16 = new Uint16Array(wasm.memory.buffer);
|
|
886
|
-
for(let i = 0; i < len; i++)HEAPU16[(ptr >> 1) + i] = str.charCodeAt(i);
|
|
887
|
-
return {
|
|
888
|
-
ptr,
|
|
889
|
-
len
|
|
890
|
-
};
|
|
891
|
-
};
|
|
892
911
|
function transformInlineStyleString(str) {
|
|
893
|
-
|
|
894
|
-
try {
|
|
895
|
-
const transformedStyle = wasm.transform_raw_u16_inline_style_ptr(ptr, len) ?? str;
|
|
896
|
-
wasm.free(ptr, len << 1);
|
|
897
|
-
return transformedStyle;
|
|
898
|
-
} catch (e) {
|
|
899
|
-
wasm.free(ptr, len << 1);
|
|
900
|
-
throw e;
|
|
901
|
-
}
|
|
912
|
+
return wasm.transform_raw_u16_inline_style_ptr(str) ?? str;
|
|
902
913
|
}
|
|
903
914
|
function transformParsedStyles(styles) {
|
|
904
915
|
let childStyle = [];
|
|
905
916
|
let transformedStyle = [];
|
|
906
917
|
for (const [property, value] of styles){
|
|
907
|
-
const
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
if (childStyleForCurrent) childStyle = childStyle.concat(childStyleForCurrent);
|
|
917
|
-
} else transformedStyle.push([
|
|
918
|
-
property,
|
|
919
|
-
value
|
|
920
|
-
]);
|
|
921
|
-
} catch (e) {
|
|
922
|
-
wasm.free(propertyPtr, propertyLen << 1);
|
|
923
|
-
wasm.free(valuePtr, valueLen << 1);
|
|
924
|
-
throw e;
|
|
925
|
-
}
|
|
918
|
+
const transformedResult = wasm.transform_raw_u16_inline_style_ptr_parsed(property, value);
|
|
919
|
+
if (transformedResult) {
|
|
920
|
+
const [transformedStyleForCurrent, childStyleForCurrent] = transformedResult;
|
|
921
|
+
transformedStyle = transformedStyle.concat(transformedStyleForCurrent);
|
|
922
|
+
if (childStyleForCurrent) childStyle = childStyle.concat(childStyleForCurrent);
|
|
923
|
+
} else transformedStyle.push([
|
|
924
|
+
property,
|
|
925
|
+
value
|
|
926
|
+
]);
|
|
926
927
|
}
|
|
927
928
|
return {
|
|
928
929
|
childStyle,
|
|
@@ -1320,6 +1321,7 @@ const __GetElementConfig = /*#__PURE__*/ (element)=>{
|
|
|
1320
1321
|
const currentComponentConfigString = element.getAttribute(lynxComponentConfigAttribute);
|
|
1321
1322
|
return currentComponentConfigString ? JSON.parse(decodeURIComponent(currentComponentConfigString)) : {};
|
|
1322
1323
|
};
|
|
1324
|
+
const __GetAttributeByName = /*#__PURE__*/ (element, name)=>element.getAttribute(name);
|
|
1323
1325
|
const __GetElementUniqueID = /*#__PURE__*/ (element)=>element && element.getAttribute ? Number(element.getAttribute(lynxUniqueIdAttribute)) : -1;
|
|
1324
1326
|
const __GetID = /*#__PURE__*/ (element)=>element.getAttribute('id');
|
|
1325
1327
|
const __SetID = /*#__PURE__*/ (element, id)=>id ? element.setAttribute('id', id) : element.removeAttribute('id');
|
|
@@ -1333,6 +1335,11 @@ const __SetDataset = /*#__PURE__*/ (element, dataset)=>{
|
|
|
1333
1335
|
};
|
|
1334
1336
|
const __UpdateComponentID = /*#__PURE__*/ (element, componentID)=>element.setAttribute(componentIdAttribute, componentID);
|
|
1335
1337
|
const __GetClasses = /*#__PURE__*/ (element)=>(element.getAttribute('class') ?? '').split(' ').filter((e)=>e);
|
|
1338
|
+
const __UpdateComponentInfo = /*#__PURE__*/ (element, params)=>{
|
|
1339
|
+
void 0 !== params.componentID && __UpdateComponentID(element, params.componentID);
|
|
1340
|
+
void 0 !== params.cssID && element.setAttribute(cssIdAttribute, params.cssID + '');
|
|
1341
|
+
void 0 !== params.name && element.setAttribute('name', params.name);
|
|
1342
|
+
};
|
|
1336
1343
|
const __SetCSSId = /*#__PURE__*/ (elements, cssId)=>{
|
|
1337
1344
|
for (const element of elements)element.setAttribute(cssIdAttribute, cssId + '');
|
|
1338
1345
|
};
|
|
@@ -1740,21 +1747,25 @@ function createMainThreadGlobalThis(config) {
|
|
|
1740
1747
|
const createElementForElementTemplateData = (data, parentComponentUniId)=>{
|
|
1741
1748
|
const element = __CreateElement(data.type, parentComponentUniId);
|
|
1742
1749
|
__SetID(element, data.id);
|
|
1743
|
-
__SetClasses(element, data.class.join(' '));
|
|
1744
|
-
for (const [key, value] of Object.entries(data.attributes))__SetAttribute(element, key, value);
|
|
1745
|
-
for (const [key, value] of Object.entries(data.builtinAttributes
|
|
1746
|
-
|
|
1750
|
+
data.class && __SetClasses(element, data.class.join(' '));
|
|
1751
|
+
for (const [key, value] of Object.entries(data.attributes || {}))__SetAttribute(element, key, value);
|
|
1752
|
+
for (const [key, value] of Object.entries(data.builtinAttributes || {})){
|
|
1753
|
+
if ('dirtyID' === key && value === data.id) __MarkPartElement(element, value);
|
|
1754
|
+
__SetAttribute(element, key, value);
|
|
1755
|
+
}
|
|
1756
|
+
for (const childData of data.children || [])__AppendElement(element, createElementForElementTemplateData(childData, parentComponentUniId));
|
|
1757
|
+
void 0 !== data.dataset && __SetDataset(element, data.dataset);
|
|
1747
1758
|
return element;
|
|
1748
1759
|
};
|
|
1749
1760
|
const applyEventsForElementTemplate = (data, element)=>{
|
|
1750
1761
|
const uniqueId = uniqueIdInc++;
|
|
1751
1762
|
element.setAttribute(lynxUniqueIdAttribute, uniqueId + '');
|
|
1752
|
-
for (const event of data.events){
|
|
1763
|
+
for (const event of data.events || []){
|
|
1753
1764
|
const { type, name, value } = event;
|
|
1754
1765
|
__AddEvent(element, type, name, value);
|
|
1755
1766
|
}
|
|
1756
|
-
for(let ii = 0; ii < data.children.length; ii++){
|
|
1757
|
-
const childData = data.children[ii];
|
|
1767
|
+
for(let ii = 0; ii < (data.children || []).length; ii++){
|
|
1768
|
+
const childData = (data.children || [])[ii];
|
|
1758
1769
|
const childElement = element.children[ii];
|
|
1759
1770
|
if (childData && childElement) applyEventsForElementTemplate(childData, childElement);
|
|
1760
1771
|
}
|
|
@@ -1779,12 +1790,17 @@ function createMainThreadGlobalThis(config) {
|
|
|
1779
1790
|
const element = clonedElements[ii];
|
|
1780
1791
|
if (data && element) applyEventsForElementTemplate(data, element);
|
|
1781
1792
|
}
|
|
1793
|
+
clonedElements.forEach(__MarkTemplateElement);
|
|
1782
1794
|
return clonedElements;
|
|
1783
1795
|
}
|
|
1784
1796
|
return [];
|
|
1785
1797
|
};
|
|
1786
1798
|
let release = '';
|
|
1787
1799
|
const isCSSOG = !pageConfig.enableCSSSelector;
|
|
1800
|
+
const SystemInfo = {
|
|
1801
|
+
...systemInfo,
|
|
1802
|
+
...config.browserConfig
|
|
1803
|
+
};
|
|
1788
1804
|
const mtsGlobalThis = {
|
|
1789
1805
|
__ElementFromBinary,
|
|
1790
1806
|
__GetTemplateParts: rootDom.querySelectorAll ? __GetTemplateParts : void 0,
|
|
@@ -1819,6 +1835,7 @@ function createMainThreadGlobalThis(config) {
|
|
|
1819
1835
|
__SetDataset: __SetDataset,
|
|
1820
1836
|
__SetID: __SetID,
|
|
1821
1837
|
__UpdateComponentID: __UpdateComponentID,
|
|
1838
|
+
__UpdateComponentInfo: __UpdateComponentInfo,
|
|
1822
1839
|
__CreateElement,
|
|
1823
1840
|
__CreateView,
|
|
1824
1841
|
__CreateText,
|
|
@@ -1833,6 +1850,7 @@ function createMainThreadGlobalThis(config) {
|
|
|
1833
1850
|
__SwapElement,
|
|
1834
1851
|
__UpdateListCallbacks,
|
|
1835
1852
|
__GetConfig: __GetElementConfig,
|
|
1853
|
+
__GetAttributeByName: __GetAttributeByName,
|
|
1836
1854
|
__GetClasses: __GetClasses,
|
|
1837
1855
|
__AddClass: isCSSOG ? __AddClassForCSSOG : __AddClass,
|
|
1838
1856
|
__SetClasses: isCSSOG ? __SetClassesForCSSOG : __SetClasses,
|
|
@@ -1842,11 +1860,8 @@ function createMainThreadGlobalThis(config) {
|
|
|
1842
1860
|
__LoadLepusChunk,
|
|
1843
1861
|
__GetPageElement,
|
|
1844
1862
|
__globalProps: globalProps,
|
|
1845
|
-
SystemInfo
|
|
1846
|
-
|
|
1847
|
-
...config.browserConfig
|
|
1848
|
-
},
|
|
1849
|
-
lynx: createMainThreadLynx(config),
|
|
1863
|
+
SystemInfo,
|
|
1864
|
+
lynx: createMainThreadLynx(config, SystemInfo),
|
|
1850
1865
|
_ReportError: (err, _)=>callbacks._ReportError(err, _, release),
|
|
1851
1866
|
_SetSourceMapRelease: (errInfo)=>release = errInfo?.release,
|
|
1852
1867
|
__OnLifecycleEvent: callbacks.__OnLifecycleEvent,
|
|
@@ -8,12 +8,10 @@ export const __webpack_modules__ = {
|
|
|
8
8
|
__webpack_require__.d(__webpack_exports__, {
|
|
9
9
|
C2: ()=>_legacy_bg_js__WEBPACK_IMPORTED_MODULE_0__.C2,
|
|
10
10
|
Or: ()=>_legacy_bg_js__WEBPACK_IMPORTED_MODULE_0__.Or,
|
|
11
|
-
Y1: ()=>_legacy_bg_js__WEBPACK_IMPORTED_MODULE_0__.Y1,
|
|
12
11
|
a9: ()=>_legacy_bg_js__WEBPACK_IMPORTED_MODULE_0__.a9,
|
|
13
|
-
|
|
12
|
+
h4: ()=>_legacy_bg_js__WEBPACK_IMPORTED_MODULE_0__.h4,
|
|
14
13
|
oT: ()=>_legacy_bg_js__WEBPACK_IMPORTED_MODULE_0__.oT,
|
|
15
14
|
pE: ()=>_legacy_bg_js__WEBPACK_IMPORTED_MODULE_0__.pE,
|
|
16
|
-
sy: ()=>_legacy_bg_js__WEBPACK_IMPORTED_MODULE_0__.sy,
|
|
17
15
|
ug: ()=>_legacy_bg_js__WEBPACK_IMPORTED_MODULE_0__.ug,
|
|
18
16
|
xJ: ()=>_legacy_bg_js__WEBPACK_IMPORTED_MODULE_0__.xJ
|
|
19
17
|
});
|
|
@@ -34,12 +32,10 @@ export const __webpack_modules__ = {
|
|
|
34
32
|
__webpack_require__.d(__webpack_exports__, {
|
|
35
33
|
C2: ()=>__wbg_push_737cfc8c1432c2c6,
|
|
36
34
|
Or: ()=>__wbindgen_throw,
|
|
37
|
-
Y1: ()=>malloc,
|
|
38
35
|
a9: ()=>__wbg_new_78feb108b6472713,
|
|
39
|
-
|
|
36
|
+
h4: ()=>__wbindgen_string_new,
|
|
40
37
|
oT: ()=>__wbg_set_wasm,
|
|
41
38
|
pE: ()=>transform_raw_u16_inline_style_ptr_parsed,
|
|
42
|
-
sy: ()=>__wbg_fromCharCode_5493f9b25e1ce0a1,
|
|
43
39
|
ug: ()=>__wbindgen_object_drop_ref,
|
|
44
40
|
xJ: ()=>transform_raw_u16_inline_style_ptr
|
|
45
41
|
});
|
|
@@ -48,15 +44,6 @@ export const __webpack_modules__ = {
|
|
|
48
44
|
function __wbg_set_wasm(val) {
|
|
49
45
|
wasm = val;
|
|
50
46
|
}
|
|
51
|
-
let cachedUint16ArrayMemory0 = null;
|
|
52
|
-
function getUint16ArrayMemory0() {
|
|
53
|
-
if (null === cachedUint16ArrayMemory0 || 0 === cachedUint16ArrayMemory0.byteLength) cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer);
|
|
54
|
-
return cachedUint16ArrayMemory0;
|
|
55
|
-
}
|
|
56
|
-
function getArrayU16FromWasm0(ptr, len) {
|
|
57
|
-
ptr >>>= 0;
|
|
58
|
-
return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
|
|
59
|
-
}
|
|
60
47
|
const heap = new Array(128).fill(void 0);
|
|
61
48
|
heap.push(void 0, null, true, false);
|
|
62
49
|
let heap_next = heap.length;
|
|
@@ -95,24 +82,77 @@ export const __webpack_modules__ = {
|
|
|
95
82
|
ptr >>>= 0;
|
|
96
83
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
97
84
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
85
|
+
let WASM_VECTOR_LEN = 0;
|
|
86
|
+
const lTextEncoder = 'undefined' == typeof TextEncoder ? (0, module.require)('util').TextEncoder : TextEncoder;
|
|
87
|
+
let cachedTextEncoder = new lTextEncoder('utf-8');
|
|
88
|
+
const encodeString = 'function' == typeof cachedTextEncoder.encodeInto ? function(arg, view) {
|
|
89
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
90
|
+
} : function(arg, view) {
|
|
91
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
92
|
+
view.set(buf);
|
|
93
|
+
return {
|
|
94
|
+
read: arg.length,
|
|
95
|
+
written: buf.length
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
99
|
+
if (void 0 === realloc) {
|
|
100
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
101
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
102
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
103
|
+
WASM_VECTOR_LEN = buf.length;
|
|
104
|
+
return ptr;
|
|
105
|
+
}
|
|
106
|
+
let len = arg.length;
|
|
107
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
108
|
+
const mem = getUint8ArrayMemory0();
|
|
109
|
+
let offset = 0;
|
|
110
|
+
for(; offset < len; offset++){
|
|
111
|
+
const code = arg.charCodeAt(offset);
|
|
112
|
+
if (code > 0x7F) break;
|
|
113
|
+
mem[ptr + offset] = code;
|
|
114
|
+
}
|
|
115
|
+
if (offset !== len) {
|
|
116
|
+
if (0 !== offset) arg = arg.slice(offset);
|
|
117
|
+
ptr = realloc(ptr, len, len = offset + 3 * arg.length, 1) >>> 0;
|
|
118
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
119
|
+
const ret = encodeString(arg, view);
|
|
120
|
+
offset += ret.written;
|
|
121
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
122
|
+
}
|
|
123
|
+
WASM_VECTOR_LEN = offset;
|
|
124
|
+
return ptr;
|
|
105
125
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
126
|
+
let cachedDataViewMemory0 = null;
|
|
127
|
+
function getDataViewMemory0() {
|
|
128
|
+
if (null === cachedDataViewMemory0 || true === cachedDataViewMemory0.buffer.detached || void 0 === cachedDataViewMemory0.buffer.detached && cachedDataViewMemory0.buffer !== wasm.memory.buffer) cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
129
|
+
return cachedDataViewMemory0;
|
|
109
130
|
}
|
|
110
|
-
function
|
|
111
|
-
|
|
131
|
+
function transform_raw_u16_inline_style_ptr(str) {
|
|
132
|
+
try {
|
|
133
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
134
|
+
const ptr0 = passStringToWasm0(str, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
135
|
+
const len0 = WASM_VECTOR_LEN;
|
|
136
|
+
wasm.transform_raw_u16_inline_style_ptr(retptr, ptr0, len0);
|
|
137
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 0, true);
|
|
138
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4, true);
|
|
139
|
+
let v2;
|
|
140
|
+
if (0 !== r0) {
|
|
141
|
+
v2 = getStringFromWasm0(r0, r1).slice();
|
|
142
|
+
wasm.__wbindgen_export_2(r0, +r1, 1);
|
|
143
|
+
}
|
|
144
|
+
return v2;
|
|
145
|
+
} finally{
|
|
146
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
147
|
+
}
|
|
112
148
|
}
|
|
113
|
-
function
|
|
114
|
-
const
|
|
115
|
-
|
|
149
|
+
function transform_raw_u16_inline_style_ptr_parsed(name, value) {
|
|
150
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
151
|
+
const len0 = WASM_VECTOR_LEN;
|
|
152
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
153
|
+
const len1 = WASM_VECTOR_LEN;
|
|
154
|
+
const ret = wasm.transform_raw_u16_inline_style_ptr_parsed(ptr0, len0, ptr1, len1);
|
|
155
|
+
return takeObject(ret);
|
|
116
156
|
}
|
|
117
157
|
function __wbg_new_78feb108b6472713() {
|
|
118
158
|
const ret = new Array();
|
|
@@ -125,6 +165,10 @@ export const __webpack_modules__ = {
|
|
|
125
165
|
function __wbindgen_object_drop_ref(arg0) {
|
|
126
166
|
takeObject(arg0);
|
|
127
167
|
}
|
|
168
|
+
function __wbindgen_string_new(arg0, arg1) {
|
|
169
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
170
|
+
return addHeapObject(ret);
|
|
171
|
+
}
|
|
128
172
|
function __wbindgen_throw(arg0, arg1) {
|
|
129
173
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
130
174
|
}
|
|
@@ -134,14 +178,12 @@ export const __webpack_modules__ = {
|
|
|
134
178
|
try {
|
|
135
179
|
__webpack_require__.r(__webpack_exports__);
|
|
136
180
|
__webpack_require__.d(__webpack_exports__, {
|
|
137
|
-
__wbg_fromCharCode_5493f9b25e1ce0a1: ()=>_dist_legacy_js__WEBPACK_IMPORTED_MODULE_0__.sy,
|
|
138
181
|
__wbg_new_78feb108b6472713: ()=>_dist_legacy_js__WEBPACK_IMPORTED_MODULE_0__.a9,
|
|
139
182
|
__wbg_push_737cfc8c1432c2c6: ()=>_dist_legacy_js__WEBPACK_IMPORTED_MODULE_0__.C2,
|
|
140
183
|
__wbg_set_wasm: ()=>_dist_legacy_js__WEBPACK_IMPORTED_MODULE_0__.oT,
|
|
141
184
|
__wbindgen_object_drop_ref: ()=>_dist_legacy_js__WEBPACK_IMPORTED_MODULE_0__.ug,
|
|
185
|
+
__wbindgen_string_new: ()=>_dist_legacy_js__WEBPACK_IMPORTED_MODULE_0__.h4,
|
|
142
186
|
__wbindgen_throw: ()=>_dist_legacy_js__WEBPACK_IMPORTED_MODULE_0__.Or,
|
|
143
|
-
free: ()=>_dist_legacy_js__WEBPACK_IMPORTED_MODULE_0__.gd,
|
|
144
|
-
malloc: ()=>_dist_legacy_js__WEBPACK_IMPORTED_MODULE_0__.Y1,
|
|
145
187
|
memory: ()=>_dist_legacy_bg_wasm__WEBPACK_IMPORTED_MODULE_1__.memory,
|
|
146
188
|
transform_raw_u16_inline_style_ptr: ()=>_dist_legacy_js__WEBPACK_IMPORTED_MODULE_0__.xJ,
|
|
147
189
|
transform_raw_u16_inline_style_ptr_parsed: ()=>_dist_legacy_js__WEBPACK_IMPORTED_MODULE_0__.pE
|
|
@@ -161,10 +203,10 @@ export const __webpack_modules__ = {
|
|
|
161
203
|
},
|
|
162
204
|
"../web-style-transformer/dist/legacy_bg.wasm": function(module, exports, __webpack_require__) {
|
|
163
205
|
var WEBPACK_IMPORTED_MODULE_0 = __webpack_require__("../web-style-transformer/dist/legacy_bg.js");
|
|
164
|
-
module.exports = __webpack_require__.v(exports, module.id, "
|
|
206
|
+
module.exports = __webpack_require__.v(exports, module.id, "578076972e1e5ffd", {
|
|
165
207
|
"./legacy_bg.js": {
|
|
166
|
-
__wbg_fromCharCode_5493f9b25e1ce0a1: WEBPACK_IMPORTED_MODULE_0.sy,
|
|
167
208
|
__wbg_new_78feb108b6472713: WEBPACK_IMPORTED_MODULE_0.a9,
|
|
209
|
+
__wbindgen_string_new: WEBPACK_IMPORTED_MODULE_0.h4,
|
|
168
210
|
__wbg_push_737cfc8c1432c2c6: WEBPACK_IMPORTED_MODULE_0.C2,
|
|
169
211
|
__wbindgen_object_drop_ref: WEBPACK_IMPORTED_MODULE_0.ug,
|
|
170
212
|
__wbindgen_throw: WEBPACK_IMPORTED_MODULE_0.Or
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/web-core-server",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [],
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
],
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@lynx-js/offscreen-document": "0.1.3",
|
|
27
|
-
"@lynx-js/web-constants": "0.15.
|
|
27
|
+
"@lynx-js/web-constants": "0.15.6",
|
|
28
28
|
"@lynx-js/web-elements-template": "0.8.4",
|
|
29
|
-
"@lynx-js/web-mainthread-apis": "0.15.
|
|
30
|
-
"@lynx-js/web-worker-rpc": "0.15.
|
|
29
|
+
"@lynx-js/web-mainthread-apis": "0.15.6",
|
|
30
|
+
"@lynx-js/web-worker-rpc": "0.15.6"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "rslib build",
|
|
Binary file
|
|
Binary file
|