@lynx-js/web-core-server 0.18.4 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/27.js +323 -302
- package/dist/index.js +32 -32
- package/dist/legacy-wasm-chunk.js +45 -45
- package/dist/static/wasm/97be315d.module.wasm +0 -0
- package/dist/static/wasm/fbb8137e.module.wasm +0 -0
- package/package.json +5 -5
- package/dist/static/wasm/754c06ee.module.wasm +0 -0
- package/dist/static/wasm/7f8d0487.module.wasm +0 -0
package/dist/27.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export const
|
|
2
|
-
export const
|
|
1
|
+
export const __rspack_esm_id = "27";
|
|
2
|
+
export const __rspack_esm_ids = [
|
|
3
3
|
"27"
|
|
4
4
|
];
|
|
5
5
|
export const __webpack_modules__ = {
|
|
6
|
-
"../../../node_modules/.pnpm/hyphenate-style-name@1.1.0/node_modules/hyphenate-style-name/index.js"
|
|
6
|
+
"../../../node_modules/.pnpm/hyphenate-style-name@1.1.0/node_modules/hyphenate-style-name/index.js" (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
7
7
|
__webpack_require__.d(__webpack_exports__, {
|
|
8
|
-
A: ()=>
|
|
8
|
+
A: ()=>__rspack_default_export
|
|
9
9
|
});
|
|
10
10
|
var uppercasePattern = /[A-Z]/g;
|
|
11
11
|
var msPattern = /^ms-/;
|
|
@@ -18,9 +18,9 @@ export const __webpack_modules__ = {
|
|
|
18
18
|
var hName = name.replace(uppercasePattern, toHyphenLower);
|
|
19
19
|
return cache[name] = msPattern.test(hName) ? '-' + hName : hName;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const __rspack_default_export = hyphenateStyleName;
|
|
22
22
|
},
|
|
23
|
-
"../../../node_modules/.pnpm/wasm-feature-detect@1.8.0/node_modules/wasm-feature-detect/dist/esm/index.js"
|
|
23
|
+
"../../../node_modules/.pnpm/wasm-feature-detect@1.8.0/node_modules/wasm-feature-detect/dist/esm/index.js" (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
24
24
|
__webpack_require__.d(__webpack_exports__, {
|
|
25
25
|
rO: ()=>referenceTypes
|
|
26
26
|
});
|
|
@@ -54,34 +54,34 @@ export const __webpack_modules__ = {
|
|
|
54
54
|
11
|
|
55
55
|
]));
|
|
56
56
|
},
|
|
57
|
-
"../web-mainthread-apis/binary/standard.js"
|
|
58
|
-
__webpack_require__.a(__webpack_module__, async function(
|
|
57
|
+
"../web-mainthread-apis/binary/standard.js" (__webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
58
|
+
__webpack_require__.a(__webpack_module__, async function(__rspack_load_async_deps, __rspack_async_done) {
|
|
59
59
|
try {
|
|
60
60
|
__webpack_require__.d(__webpack_exports__, {
|
|
61
|
-
H4: ()=>
|
|
62
|
-
RS: ()=>
|
|
63
|
-
aC: ()=>
|
|
64
|
-
bL: ()=>
|
|
65
|
-
f: ()=>
|
|
66
|
-
iG: ()=>
|
|
67
|
-
lI: ()=>
|
|
68
|
-
pY: ()=>
|
|
61
|
+
H4: ()=>_standard_bg_js__rspack_import_1.H4,
|
|
62
|
+
RS: ()=>_standard_bg_js__rspack_import_1.RS,
|
|
63
|
+
aC: ()=>_standard_bg_js__rspack_import_1.aC,
|
|
64
|
+
bL: ()=>_standard_bg_js__rspack_import_1.bL,
|
|
65
|
+
f: ()=>_standard_bg_js__rspack_import_1.f,
|
|
66
|
+
iG: ()=>_standard_bg_js__rspack_import_1.iG,
|
|
67
|
+
lI: ()=>_standard_bg_js__rspack_import_1.lI,
|
|
68
|
+
pY: ()=>_standard_bg_js__rspack_import_1.pY
|
|
69
69
|
});
|
|
70
|
-
var
|
|
71
|
-
var
|
|
72
|
-
var
|
|
73
|
-
|
|
70
|
+
var _standard_bg_wasm__rspack_import_0 = __webpack_require__("../web-mainthread-apis/binary/standard_bg.wasm");
|
|
71
|
+
var _standard_bg_js__rspack_import_1 = __webpack_require__("../web-mainthread-apis/binary/standard_bg.js");
|
|
72
|
+
var __rspack_async_deps = __rspack_load_async_deps([
|
|
73
|
+
_standard_bg_wasm__rspack_import_0
|
|
74
74
|
]);
|
|
75
|
-
|
|
76
|
-
(0,
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
_standard_bg_wasm__rspack_import_0 = (__rspack_async_deps.then ? (await __rspack_async_deps)() : __rspack_async_deps)[0];
|
|
76
|
+
(0, _standard_bg_js__rspack_import_1.lI)(_standard_bg_wasm__rspack_import_0);
|
|
77
|
+
_standard_bg_wasm__rspack_import_0.__wbindgen_start();
|
|
78
|
+
__rspack_async_done();
|
|
79
79
|
} catch (e) {
|
|
80
|
-
|
|
80
|
+
__rspack_async_done(e);
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
},
|
|
84
|
-
"../web-mainthread-apis/binary/standard_bg.js"
|
|
84
|
+
"../web-mainthread-apis/binary/standard_bg.js" (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
85
85
|
__webpack_require__.d(__webpack_exports__, {
|
|
86
86
|
H4: ()=>__wbg___wbindgen_throw_b855445ff6a94295,
|
|
87
87
|
RS: ()=>__wbg_push_df81a39d04db858c,
|
|
@@ -206,21 +206,21 @@ export const __webpack_modules__ = {
|
|
|
206
206
|
table.set(offset + 3, false);
|
|
207
207
|
}
|
|
208
208
|
},
|
|
209
|
-
"../web-mainthread-apis/dist/createMainThreadGlobalThis.js"
|
|
210
|
-
__webpack_require__.a(__webpack_module__, async function(
|
|
209
|
+
"../web-mainthread-apis/dist/createMainThreadGlobalThis.js" (__webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
210
|
+
__webpack_require__.a(__webpack_module__, async function(__rspack_load_async_deps, __rspack_async_done) {
|
|
211
211
|
try {
|
|
212
212
|
__webpack_require__.d(__webpack_exports__, {
|
|
213
213
|
D: ()=>createMainThreadGlobalThis
|
|
214
214
|
});
|
|
215
|
-
var
|
|
216
|
-
var
|
|
217
|
-
var
|
|
218
|
-
var
|
|
219
|
-
var
|
|
220
|
-
|
|
221
|
-
|
|
215
|
+
var _lynx_js_web_constants__rspack_import_0 = __webpack_require__("../web-constants/dist/index.js");
|
|
216
|
+
var _createMainThreadLynx_js__rspack_import_1 = __webpack_require__("../web-mainthread-apis/dist/createMainThreadLynx.js");
|
|
217
|
+
var _pureElementPAPIs_js__rspack_import_2 = __webpack_require__("../web-mainthread-apis/dist/pureElementPAPIs.js");
|
|
218
|
+
var _utils_createCrossThreadEvent_js__rspack_import_3 = __webpack_require__("../web-mainthread-apis/dist/utils/createCrossThreadEvent.js");
|
|
219
|
+
var __rspack_async_deps = __rspack_load_async_deps([
|
|
220
|
+
_pureElementPAPIs_js__rspack_import_2,
|
|
221
|
+
_createMainThreadLynx_js__rspack_import_1
|
|
222
222
|
]);
|
|
223
|
-
[
|
|
223
|
+
[_pureElementPAPIs_js__rspack_import_2, _createMainThreadLynx_js__rspack_import_1] = __rspack_async_deps.then ? (await __rspack_async_deps)() : __rspack_async_deps;
|
|
224
224
|
const exposureRelatedAttributes = new Set([
|
|
225
225
|
'exposure-id',
|
|
226
226
|
'exposure-area',
|
|
@@ -242,19 +242,20 @@ export const __webpack_modules__ = {
|
|
|
242
242
|
let pageElement = lynxUniqueIdToElement[1]?.deref();
|
|
243
243
|
let uniqueIdInc = lynxUniqueIdToElement.length || 1;
|
|
244
244
|
const exposureChangedElements = new Set();
|
|
245
|
-
const commonHandler = (event)=>{
|
|
245
|
+
const commonHandler = (event, capture)=>{
|
|
246
246
|
if (!event.currentTarget) return;
|
|
247
|
+
if (event.eventPhase === Event.CAPTURING_PHASE && false === capture || event.eventPhase === Event.BUBBLING_PHASE && true === capture) return;
|
|
247
248
|
const currentTarget = event.currentTarget;
|
|
248
|
-
const isCapture = event.eventPhase === Event.CAPTURING_PHASE;
|
|
249
|
-
const lynxEventName =
|
|
249
|
+
const isCapture = event.eventPhase === Event.AT_TARGET ? capture : event.eventPhase === event.CAPTURING_PHASE;
|
|
250
|
+
const lynxEventName = _lynx_js_web_constants__rspack_import_0.$4[event.type] ?? event.type;
|
|
250
251
|
const runtimeInfo = elementToRuntimeInfoMap.get(currentTarget);
|
|
251
252
|
if (runtimeInfo) {
|
|
252
253
|
const hname = isCapture ? runtimeInfo.eventHandlerMap[lynxEventName]?.capture?.handler : runtimeInfo.eventHandlerMap[lynxEventName]?.bind?.handler;
|
|
253
|
-
const crossThreadEvent = (0,
|
|
254
|
+
const crossThreadEvent = (0, _utils_createCrossThreadEvent_js__rspack_import_3.X)(event, lynxEventName);
|
|
254
255
|
if ('string' == typeof hname) {
|
|
255
|
-
const parentComponentUniqueId = Number(currentTarget.getAttribute(
|
|
256
|
+
const parentComponentUniqueId = Number(currentTarget.getAttribute(_lynx_js_web_constants__rspack_import_0.er));
|
|
256
257
|
const parentComponent = lynxUniqueIdToElement[parentComponentUniqueId].deref();
|
|
257
|
-
const componentId = parentComponent?.getAttribute(
|
|
258
|
+
const componentId = parentComponent?.getAttribute(_lynx_js_web_constants__rspack_import_0.Gq) !== 'page' ? parentComponent?.getAttribute(_lynx_js_web_constants__rspack_import_0.pP) ?? void 0 : void 0;
|
|
258
259
|
if (componentId) callbacks.publicComponentEvent(componentId, hname, crossThreadEvent);
|
|
259
260
|
else callbacks.publishEvent(hname, crossThreadEvent);
|
|
260
261
|
return true;
|
|
@@ -269,10 +270,22 @@ export const __webpack_modules__ = {
|
|
|
269
270
|
}
|
|
270
271
|
return false;
|
|
271
272
|
};
|
|
272
|
-
const
|
|
273
|
-
|
|
273
|
+
const captureHandler = (e)=>{
|
|
274
|
+
commonHandler(e, true);
|
|
275
|
+
};
|
|
276
|
+
const defaultHandler = (e)=>{
|
|
277
|
+
commonHandler(e, false);
|
|
278
|
+
};
|
|
279
|
+
const commonCatchHandler = (event, isCapture)=>{
|
|
280
|
+
const handlerTriggered = commonHandler(event, isCapture);
|
|
274
281
|
if (handlerTriggered) event.stopPropagation();
|
|
275
282
|
};
|
|
283
|
+
const catchCaptureHandler = (e)=>{
|
|
284
|
+
commonCatchHandler(e, true);
|
|
285
|
+
};
|
|
286
|
+
const defaultCatchHandler = (e)=>{
|
|
287
|
+
commonCatchHandler(e, false);
|
|
288
|
+
};
|
|
276
289
|
const __AddEvent = (element, eventType, eventName, newEventHandler)=>{
|
|
277
290
|
eventName = eventName.toLowerCase();
|
|
278
291
|
const isCatch = 'catchEvent' === eventType || 'capture-catch' === eventType;
|
|
@@ -283,7 +296,7 @@ export const __webpack_modules__ = {
|
|
|
283
296
|
enqueueComponent: void 0
|
|
284
297
|
};
|
|
285
298
|
const currentHandler = isCapture ? runtimeInfo.eventHandlerMap[eventName]?.capture : runtimeInfo.eventHandlerMap[eventName]?.bind;
|
|
286
|
-
const currentRegisteredHandler = isCatch ?
|
|
299
|
+
const currentRegisteredHandler = isCatch ? isCapture ? catchCaptureHandler : defaultCatchHandler : isCapture ? captureHandler : defaultHandler;
|
|
287
300
|
if (currentHandler) {
|
|
288
301
|
if (!newEventHandler) {
|
|
289
302
|
element.removeEventListener(eventName, currentRegisteredHandler, {
|
|
@@ -293,7 +306,7 @@ export const __webpack_modules__ = {
|
|
|
293
306
|
if (isExposure && '-1' === element.getAttribute('exposure-id')) mtsGlobalThis.__SetAttribute(element, 'exposure-id', null);
|
|
294
307
|
}
|
|
295
308
|
} else if (newEventHandler) {
|
|
296
|
-
const htmlEventName =
|
|
309
|
+
const htmlEventName = _lynx_js_web_constants__rspack_import_0.vQ[element.tagName]?.[eventName] ?? _lynx_js_web_constants__rspack_import_0.im[eventName] ?? eventName;
|
|
297
310
|
element.addEventListener(htmlEventName, currentRegisteredHandler, {
|
|
298
311
|
capture: isCapture
|
|
299
312
|
});
|
|
@@ -348,11 +361,11 @@ export const __webpack_modules__ = {
|
|
|
348
361
|
const htmlTag = tagMap[tag] ?? tag;
|
|
349
362
|
const element = document.createElement(htmlTag);
|
|
350
363
|
lynxUniqueIdToElement[uniqueId] = new WeakRef(element);
|
|
351
|
-
const parentComponentCssID = lynxUniqueIdToElement[parentComponentUniqueId]?.deref()?.getAttribute(
|
|
352
|
-
parentComponentCssID && '0' !== parentComponentCssID && element.setAttribute(
|
|
353
|
-
element.setAttribute(
|
|
354
|
-
element.setAttribute(
|
|
355
|
-
element.setAttribute(
|
|
364
|
+
const parentComponentCssID = lynxUniqueIdToElement[parentComponentUniqueId]?.deref()?.getAttribute(_lynx_js_web_constants__rspack_import_0.js);
|
|
365
|
+
parentComponentCssID && '0' !== parentComponentCssID && element.setAttribute(_lynx_js_web_constants__rspack_import_0.js, parentComponentCssID);
|
|
366
|
+
element.setAttribute(_lynx_js_web_constants__rspack_import_0.Gq, tag);
|
|
367
|
+
element.setAttribute(_lynx_js_web_constants__rspack_import_0.SP, uniqueId + '');
|
|
368
|
+
element.setAttribute(_lynx_js_web_constants__rspack_import_0.er, parentComponentUniqueId + '');
|
|
356
369
|
return element;
|
|
357
370
|
};
|
|
358
371
|
const __CreateView = (parentComponentUniqueId)=>__CreateElement('view', parentComponentUniqueId);
|
|
@@ -368,11 +381,11 @@ export const __webpack_modules__ = {
|
|
|
368
381
|
const __CreatePage = (componentID, cssID)=>{
|
|
369
382
|
const page = __CreateElement('page', 0);
|
|
370
383
|
page.setAttribute('part', 'page');
|
|
371
|
-
page.setAttribute(
|
|
372
|
-
page.setAttribute(
|
|
373
|
-
page.setAttribute(
|
|
374
|
-
(0,
|
|
375
|
-
if (false === pageConfig.defaultDisplayLinear) page.setAttribute(
|
|
384
|
+
page.setAttribute(_lynx_js_web_constants__rspack_import_0.js, cssID + '');
|
|
385
|
+
page.setAttribute(_lynx_js_web_constants__rspack_import_0.er, '1');
|
|
386
|
+
page.setAttribute(_lynx_js_web_constants__rspack_import_0.pP, componentID);
|
|
387
|
+
(0, _pureElementPAPIs_js__rspack_import_2.uY)(page);
|
|
388
|
+
if (false === pageConfig.defaultDisplayLinear) page.setAttribute(_lynx_js_web_constants__rspack_import_0.Gm, 'false');
|
|
376
389
|
if (true === pageConfig.defaultOverflowVisible) page.setAttribute('lynx-default-overflow-visible', 'true');
|
|
377
390
|
pageElement = page;
|
|
378
391
|
return page;
|
|
@@ -389,13 +402,13 @@ export const __webpack_modules__ = {
|
|
|
389
402
|
};
|
|
390
403
|
const __CreateComponent = (componentParentUniqueID, componentID, cssID, _, name)=>{
|
|
391
404
|
const component = __CreateElement('view', componentParentUniqueID);
|
|
392
|
-
component.setAttribute(
|
|
393
|
-
component.setAttribute(
|
|
405
|
+
component.setAttribute(_lynx_js_web_constants__rspack_import_0.js, cssID + '');
|
|
406
|
+
component.setAttribute(_lynx_js_web_constants__rspack_import_0.pP, componentID);
|
|
394
407
|
component.setAttribute('name', name);
|
|
395
408
|
return component;
|
|
396
409
|
};
|
|
397
410
|
const __SetAttribute = (element, key, value)=>{
|
|
398
|
-
const tag = element.getAttribute(
|
|
411
|
+
const tag = element.getAttribute(_lynx_js_web_constants__rspack_import_0.Gq);
|
|
399
412
|
if ('list' === tag && 'update-list-info' === key) {
|
|
400
413
|
const listInfo = value;
|
|
401
414
|
const { insertAction, removeAction } = listInfo;
|
|
@@ -404,14 +417,14 @@ export const __webpack_modules__ = {
|
|
|
404
417
|
if (runtimeInfo) {
|
|
405
418
|
const componentAtIndex = runtimeInfo.componentAtIndex;
|
|
406
419
|
const enqueueComponent = runtimeInfo.enqueueComponent;
|
|
407
|
-
const uniqueId = (0,
|
|
420
|
+
const uniqueId = (0, _pureElementPAPIs_js__rspack_import_2.Tj)(element);
|
|
408
421
|
for (const action of insertAction)componentAtIndex?.(element, uniqueId, action.position, 0, false);
|
|
409
422
|
for (const action of removeAction)enqueueComponent?.(element, uniqueId, action.position);
|
|
410
423
|
}
|
|
411
424
|
});
|
|
412
425
|
} else {
|
|
413
426
|
null == value ? element.removeAttribute(key) : element.setAttribute(key, value + '');
|
|
414
|
-
if (key ===
|
|
427
|
+
if (key === _lynx_js_web_constants__rspack_import_0.I7 && value) timingFlags.push(value);
|
|
415
428
|
if (exposureRelatedAttributes.has(key)) exposureChangedElements.add(element);
|
|
416
429
|
}
|
|
417
430
|
};
|
|
@@ -420,7 +433,7 @@ export const __webpack_modules__ = {
|
|
|
420
433
|
eventHandlerMap: {},
|
|
421
434
|
componentAtIndex: componentAtIndex,
|
|
422
435
|
enqueueComponent: enqueueComponent,
|
|
423
|
-
uniqueId: (0,
|
|
436
|
+
uniqueId: (0, _pureElementPAPIs_js__rspack_import_2.Tj)(element)
|
|
424
437
|
};
|
|
425
438
|
runtimeInfo.componentAtIndex = componentAtIndex;
|
|
426
439
|
runtimeInfo.enqueueComponent = enqueueComponent;
|
|
@@ -434,8 +447,8 @@ export const __webpack_modules__ = {
|
|
|
434
447
|
};
|
|
435
448
|
const __SetCSSIdForCSSOG = (elements, cssId, entryName)=>{
|
|
436
449
|
for (const element of elements){
|
|
437
|
-
element.setAttribute(
|
|
438
|
-
entryName && element.setAttribute(
|
|
450
|
+
element.setAttribute(_lynx_js_web_constants__rspack_import_0.js, cssId + '');
|
|
451
|
+
entryName && element.setAttribute(_lynx_js_web_constants__rspack_import_0.Pb, entryName);
|
|
439
452
|
const cls = element.getAttribute('class');
|
|
440
453
|
cls && __SetClassesForCSSOG(element, cls);
|
|
441
454
|
}
|
|
@@ -443,16 +456,16 @@ export const __webpack_modules__ = {
|
|
|
443
456
|
const __AddClassForCSSOG = (element, className)=>{
|
|
444
457
|
const newClassName = ((element.getAttribute('class') ?? '') + ' ' + className).trim();
|
|
445
458
|
element.setAttribute('class', newClassName);
|
|
446
|
-
const cssId = element.getAttribute(
|
|
447
|
-
const uniqueId = Number(element.getAttribute(
|
|
448
|
-
const entryName = element.getAttribute(
|
|
459
|
+
const cssId = element.getAttribute(_lynx_js_web_constants__rspack_import_0.js);
|
|
460
|
+
const uniqueId = Number(element.getAttribute(_lynx_js_web_constants__rspack_import_0.SP));
|
|
461
|
+
const entryName = element.getAttribute(_lynx_js_web_constants__rspack_import_0.Pb);
|
|
449
462
|
callbacks.updateCssOGStyle(uniqueId, newClassName, cssId, entryName);
|
|
450
463
|
};
|
|
451
464
|
const __SetClassesForCSSOG = (element, classNames)=>{
|
|
452
|
-
(0,
|
|
453
|
-
const cssId = element.getAttribute(
|
|
454
|
-
const uniqueId = Number(element.getAttribute(
|
|
455
|
-
const entryName = element.getAttribute(
|
|
465
|
+
(0, _pureElementPAPIs_js__rspack_import_2.R5)(element, classNames);
|
|
466
|
+
const cssId = element.getAttribute(_lynx_js_web_constants__rspack_import_0.js);
|
|
467
|
+
const uniqueId = Number(element.getAttribute(_lynx_js_web_constants__rspack_import_0.SP));
|
|
468
|
+
const entryName = element.getAttribute(_lynx_js_web_constants__rspack_import_0.Pb);
|
|
456
469
|
callbacks.updateCssOGStyle(uniqueId, classNames ?? '', cssId, entryName);
|
|
457
470
|
};
|
|
458
471
|
const __LoadLepusChunk = (path)=>{
|
|
@@ -468,7 +481,7 @@ export const __webpack_modules__ = {
|
|
|
468
481
|
const __FlushElementTree = (_subTree, options)=>{
|
|
469
482
|
const timingFlagsCopied = timingFlags;
|
|
470
483
|
timingFlags = [];
|
|
471
|
-
if (pageElement && !pageElement.parentNode && '' !== pageElement.getAttribute(
|
|
484
|
+
if (pageElement && !pageElement.parentNode && '' !== pageElement.getAttribute(_lynx_js_web_constants__rspack_import_0.JA)) rootDom.append(pageElement);
|
|
472
485
|
const exposureChangedElementsArray = Array.from(exposureChangedElements);
|
|
473
486
|
exposureChangedElements.clear();
|
|
474
487
|
callbacks.flushElementTree(options, timingFlagsCopied, exposureChangedElementsArray);
|
|
@@ -477,20 +490,20 @@ export const __webpack_modules__ = {
|
|
|
477
490
|
const templateIdToTemplate = {};
|
|
478
491
|
const createElementForElementTemplateData = (data, parentComponentUniId)=>{
|
|
479
492
|
const element = __CreateElement(data.type, parentComponentUniId);
|
|
480
|
-
(0,
|
|
481
|
-
data.class && (0,
|
|
493
|
+
(0, _pureElementPAPIs_js__rspack_import_2.wr)(element, data.id);
|
|
494
|
+
data.class && (0, _pureElementPAPIs_js__rspack_import_2.R5)(element, data.class.join(' '));
|
|
482
495
|
for (const [key, value] of Object.entries(data.attributes || {}))__SetAttribute(element, key, value);
|
|
483
496
|
for (const [key, value] of Object.entries(data.builtinAttributes || {})){
|
|
484
|
-
if ('dirtyID' === key && value === data.id) (0,
|
|
497
|
+
if ('dirtyID' === key && value === data.id) (0, _pureElementPAPIs_js__rspack_import_2.ZW)(element, value);
|
|
485
498
|
__SetAttribute(element, key, value);
|
|
486
499
|
}
|
|
487
|
-
for (const childData of data.children || [])(0,
|
|
488
|
-
void 0 !== data.dataset && (0,
|
|
500
|
+
for (const childData of data.children || [])(0, _pureElementPAPIs_js__rspack_import_2.vh)(element, createElementForElementTemplateData(childData, parentComponentUniId));
|
|
501
|
+
void 0 !== data.dataset && (0, _pureElementPAPIs_js__rspack_import_2.bw)(element, data.dataset);
|
|
489
502
|
return element;
|
|
490
503
|
};
|
|
491
504
|
const applyEventsForElementTemplate = (data, element)=>{
|
|
492
505
|
const uniqueId = uniqueIdInc++;
|
|
493
|
-
element.setAttribute(
|
|
506
|
+
element.setAttribute(_lynx_js_web_constants__rspack_import_0.SP, uniqueId + '');
|
|
494
507
|
for (const event of data.events || []){
|
|
495
508
|
const { type, name, value } = event;
|
|
496
509
|
__AddEvent(element, type, name, value);
|
|
@@ -521,7 +534,7 @@ export const __webpack_modules__ = {
|
|
|
521
534
|
const element = clonedElements[ii];
|
|
522
535
|
if (data && element) applyEventsForElementTemplate(data, element);
|
|
523
536
|
}
|
|
524
|
-
clonedElements.forEach(
|
|
537
|
+
clonedElements.forEach(_pureElementPAPIs_js__rspack_import_2.uY);
|
|
525
538
|
return clonedElements;
|
|
526
539
|
}
|
|
527
540
|
return [];
|
|
@@ -529,44 +542,44 @@ export const __webpack_modules__ = {
|
|
|
529
542
|
let release = '';
|
|
530
543
|
const isCSSOG = !pageConfig.enableCSSSelector;
|
|
531
544
|
const SystemInfo = {
|
|
532
|
-
...
|
|
545
|
+
..._lynx_js_web_constants__rspack_import_0.c1,
|
|
533
546
|
...config.browserConfig
|
|
534
547
|
};
|
|
535
548
|
const mtsGlobalThis = {
|
|
536
549
|
__ElementFromBinary,
|
|
537
|
-
__GetTemplateParts: rootDom.querySelectorAll ?
|
|
538
|
-
__MarkTemplateElement:
|
|
539
|
-
__MarkPartElement:
|
|
550
|
+
__GetTemplateParts: rootDom.querySelectorAll ? _pureElementPAPIs_js__rspack_import_2.$G : void 0,
|
|
551
|
+
__MarkTemplateElement: _pureElementPAPIs_js__rspack_import_2.uY,
|
|
552
|
+
__MarkPartElement: _pureElementPAPIs_js__rspack_import_2.ZW,
|
|
540
553
|
__AddEvent: ssrHooks?.__AddEvent ?? __AddEvent,
|
|
541
554
|
__GetEvent,
|
|
542
555
|
__GetEvents,
|
|
543
556
|
__SetEvents,
|
|
544
|
-
__AppendElement:
|
|
545
|
-
__ElementIsEqual:
|
|
546
|
-
__FirstElement:
|
|
547
|
-
__GetChildren:
|
|
548
|
-
__GetParent:
|
|
549
|
-
__InsertElementBefore:
|
|
550
|
-
__LastElement:
|
|
551
|
-
__NextElement:
|
|
552
|
-
__RemoveElement:
|
|
553
|
-
__ReplaceElement:
|
|
554
|
-
__ReplaceElements:
|
|
555
|
-
__AddConfig:
|
|
556
|
-
__AddDataset:
|
|
557
|
-
__GetAttributes:
|
|
558
|
-
__GetComponentID:
|
|
559
|
-
__GetDataByKey:
|
|
560
|
-
__GetDataset:
|
|
561
|
-
__GetElementConfig:
|
|
562
|
-
__GetElementUniqueID:
|
|
563
|
-
__GetID:
|
|
564
|
-
__GetTag:
|
|
565
|
-
__SetConfig:
|
|
566
|
-
__SetDataset:
|
|
567
|
-
__SetID:
|
|
568
|
-
__UpdateComponentID:
|
|
569
|
-
__UpdateComponentInfo:
|
|
557
|
+
__AppendElement: _pureElementPAPIs_js__rspack_import_2.vh,
|
|
558
|
+
__ElementIsEqual: _pureElementPAPIs_js__rspack_import_2.pn,
|
|
559
|
+
__FirstElement: _pureElementPAPIs_js__rspack_import_2.vH,
|
|
560
|
+
__GetChildren: _pureElementPAPIs_js__rspack_import_2.yj,
|
|
561
|
+
__GetParent: _pureElementPAPIs_js__rspack_import_2.d6,
|
|
562
|
+
__InsertElementBefore: _pureElementPAPIs_js__rspack_import_2.pi,
|
|
563
|
+
__LastElement: _pureElementPAPIs_js__rspack_import_2.Nu,
|
|
564
|
+
__NextElement: _pureElementPAPIs_js__rspack_import_2.cw,
|
|
565
|
+
__RemoveElement: _pureElementPAPIs_js__rspack_import_2.z3,
|
|
566
|
+
__ReplaceElement: _pureElementPAPIs_js__rspack_import_2.Xk,
|
|
567
|
+
__ReplaceElements: _pureElementPAPIs_js__rspack_import_2.yE,
|
|
568
|
+
__AddConfig: _pureElementPAPIs_js__rspack_import_2.Ud,
|
|
569
|
+
__AddDataset: _pureElementPAPIs_js__rspack_import_2.Kz,
|
|
570
|
+
__GetAttributes: _pureElementPAPIs_js__rspack_import_2.GE,
|
|
571
|
+
__GetComponentID: _pureElementPAPIs_js__rspack_import_2.zP,
|
|
572
|
+
__GetDataByKey: _pureElementPAPIs_js__rspack_import_2.NV,
|
|
573
|
+
__GetDataset: _pureElementPAPIs_js__rspack_import_2.Fl,
|
|
574
|
+
__GetElementConfig: _pureElementPAPIs_js__rspack_import_2.pe,
|
|
575
|
+
__GetElementUniqueID: _pureElementPAPIs_js__rspack_import_2.Tj,
|
|
576
|
+
__GetID: _pureElementPAPIs_js__rspack_import_2.cb,
|
|
577
|
+
__GetTag: _pureElementPAPIs_js__rspack_import_2.zm,
|
|
578
|
+
__SetConfig: _pureElementPAPIs_js__rspack_import_2.l9,
|
|
579
|
+
__SetDataset: _pureElementPAPIs_js__rspack_import_2.bw,
|
|
580
|
+
__SetID: _pureElementPAPIs_js__rspack_import_2.wr,
|
|
581
|
+
__UpdateComponentID: _pureElementPAPIs_js__rspack_import_2.A7,
|
|
582
|
+
__UpdateComponentInfo: _pureElementPAPIs_js__rspack_import_2.$r,
|
|
570
583
|
__CreateElement,
|
|
571
584
|
__CreateView,
|
|
572
585
|
__CreateText,
|
|
@@ -580,20 +593,20 @@ export const __webpack_modules__ = {
|
|
|
580
593
|
__SetAttribute,
|
|
581
594
|
__SwapElement,
|
|
582
595
|
__UpdateListCallbacks,
|
|
583
|
-
__GetConfig:
|
|
584
|
-
__GetAttributeByName:
|
|
585
|
-
__GetClasses:
|
|
586
|
-
__AddClass: isCSSOG ? __AddClassForCSSOG :
|
|
587
|
-
__SetClasses: isCSSOG ? __SetClassesForCSSOG :
|
|
588
|
-
__AddInlineStyle:
|
|
589
|
-
__SetCSSId: isCSSOG ? __SetCSSIdForCSSOG :
|
|
590
|
-
__SetInlineStyles:
|
|
596
|
+
__GetConfig: _pureElementPAPIs_js__rspack_import_2.pe,
|
|
597
|
+
__GetAttributeByName: _pureElementPAPIs_js__rspack_import_2.li,
|
|
598
|
+
__GetClasses: _pureElementPAPIs_js__rspack_import_2.Tq,
|
|
599
|
+
__AddClass: isCSSOG ? __AddClassForCSSOG : _pureElementPAPIs_js__rspack_import_2.gA,
|
|
600
|
+
__SetClasses: isCSSOG ? __SetClassesForCSSOG : _pureElementPAPIs_js__rspack_import_2.R5,
|
|
601
|
+
__AddInlineStyle: _pureElementPAPIs_js__rspack_import_2.kB,
|
|
602
|
+
__SetCSSId: isCSSOG ? __SetCSSIdForCSSOG : _pureElementPAPIs_js__rspack_import_2.D1,
|
|
603
|
+
__SetInlineStyles: _pureElementPAPIs_js__rspack_import_2.c2,
|
|
591
604
|
__LoadLepusChunk,
|
|
592
605
|
__GetPageElement,
|
|
593
606
|
__globalProps: globalProps,
|
|
594
607
|
__QueryComponent: callbacks.__QueryComponent,
|
|
595
608
|
SystemInfo,
|
|
596
|
-
lynx: (0,
|
|
609
|
+
lynx: (0, _createMainThreadLynx_js__rspack_import_1.B)(config, SystemInfo),
|
|
597
610
|
_ReportError: (err, _)=>callbacks._ReportError(err, _, release),
|
|
598
611
|
_SetSourceMapRelease: (errInfo)=>release = errInfo?.release,
|
|
599
612
|
__OnLifecycleEvent: callbacks.__OnLifecycleEvent,
|
|
@@ -616,23 +629,23 @@ export const __webpack_modules__ = {
|
|
|
616
629
|
});
|
|
617
630
|
return mtsRealm.globalWindow;
|
|
618
631
|
}
|
|
619
|
-
|
|
632
|
+
__rspack_async_done();
|
|
620
633
|
} catch (e) {
|
|
621
|
-
|
|
634
|
+
__rspack_async_done(e);
|
|
622
635
|
}
|
|
623
636
|
});
|
|
624
637
|
},
|
|
625
|
-
"../web-mainthread-apis/dist/createMainThreadLynx.js"
|
|
626
|
-
__webpack_require__.a(__webpack_module__, async function(
|
|
638
|
+
"../web-mainthread-apis/dist/createMainThreadLynx.js" (__webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
639
|
+
__webpack_require__.a(__webpack_module__, async function(__rspack_load_async_deps, __rspack_async_done) {
|
|
627
640
|
try {
|
|
628
641
|
__webpack_require__.d(__webpack_exports__, {
|
|
629
642
|
B: ()=>createMainThreadLynx
|
|
630
643
|
});
|
|
631
|
-
var
|
|
632
|
-
var
|
|
633
|
-
|
|
644
|
+
var _createMainThreadGlobalThis_js__rspack_import_0 = __webpack_require__("../web-mainthread-apis/dist/createMainThreadGlobalThis.js");
|
|
645
|
+
var __rspack_async_deps = __rspack_load_async_deps([
|
|
646
|
+
_createMainThreadGlobalThis_js__rspack_import_0
|
|
634
647
|
]);
|
|
635
|
-
|
|
648
|
+
_createMainThreadGlobalThis_js__rspack_import_0 = (__rspack_async_deps.then ? (await __rspack_async_deps)() : __rspack_async_deps)[0];
|
|
636
649
|
function createMainThreadLynx(config, SystemInfo) {
|
|
637
650
|
const requestAnimationFrameBrowserImpl = requestAnimationFrame;
|
|
638
651
|
const cancelAnimationFrameBrowserImpl = cancelAnimationFrame;
|
|
@@ -662,19 +675,19 @@ export const __webpack_modules__ = {
|
|
|
662
675
|
clearInterval: clearIntervalBrowserImpl
|
|
663
676
|
};
|
|
664
677
|
}
|
|
665
|
-
|
|
678
|
+
__rspack_async_done();
|
|
666
679
|
} catch (e) {
|
|
667
|
-
|
|
680
|
+
__rspack_async_done(e);
|
|
668
681
|
}
|
|
669
682
|
});
|
|
670
683
|
},
|
|
671
|
-
"../web-mainthread-apis/dist/crossThreadHandlers/createQueryComponent.js"
|
|
684
|
+
"../web-mainthread-apis/dist/crossThreadHandlers/createQueryComponent.js" (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
672
685
|
__webpack_require__.d(__webpack_exports__, {
|
|
673
686
|
k: ()=>createQueryComponent
|
|
674
687
|
});
|
|
675
|
-
var
|
|
688
|
+
var _lynx_js_web_constants__rspack_import_0 = __webpack_require__("../web-constants/dist/index.js");
|
|
676
689
|
function createQueryComponent(loadTemplate, updateLazyComponentStyle, backgroundThreadRpc, mtsGlobalThisRef, jsContext, mtsRealm) {
|
|
677
|
-
const updateBTSTemplateCache = backgroundThreadRpc.createCall(
|
|
690
|
+
const updateBTSTemplateCache = backgroundThreadRpc.createCall(_lynx_js_web_constants__rspack_import_0.WS);
|
|
678
691
|
const lazyCache = new Map();
|
|
679
692
|
const __QueryComponentImpl = (url, callback)=>{
|
|
680
693
|
const cacheLazy = lazyCache.get(url);
|
|
@@ -709,7 +722,7 @@ export const __webpack_modules__ = {
|
|
|
709
722
|
});
|
|
710
723
|
return null;
|
|
711
724
|
};
|
|
712
|
-
backgroundThreadRpc.registerHandler(
|
|
725
|
+
backgroundThreadRpc.registerHandler(_lynx_js_web_constants__rspack_import_0.nk, (url)=>{
|
|
713
726
|
const ret = new Promise((resolve)=>{
|
|
714
727
|
__QueryComponentImpl(url, (result)=>{
|
|
715
728
|
resolve({
|
|
@@ -725,71 +738,71 @@ export const __webpack_modules__ = {
|
|
|
725
738
|
return __QueryComponentImpl;
|
|
726
739
|
}
|
|
727
740
|
},
|
|
728
|
-
"../web-mainthread-apis/dist/crossThreadHandlers/registerCallLepusMethodHandler.js"
|
|
741
|
+
"../web-mainthread-apis/dist/crossThreadHandlers/registerCallLepusMethodHandler.js" (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
729
742
|
__webpack_require__.d(__webpack_exports__, {
|
|
730
743
|
A: ()=>registerCallLepusMethodHandler
|
|
731
744
|
});
|
|
732
|
-
var
|
|
745
|
+
var _lynx_js_web_constants__rspack_import_0 = __webpack_require__("../web-constants/dist/index.js");
|
|
733
746
|
function registerCallLepusMethodHandler(rpc, runtime) {
|
|
734
|
-
rpc.registerHandler(
|
|
747
|
+
rpc.registerHandler(_lynx_js_web_constants__rspack_import_0.iH, (methodName, data)=>{
|
|
735
748
|
runtime[methodName](data);
|
|
736
749
|
});
|
|
737
750
|
}
|
|
738
751
|
},
|
|
739
|
-
"../web-mainthread-apis/dist/crossThreadHandlers/registerGetCustomSectionHandler.js"
|
|
752
|
+
"../web-mainthread-apis/dist/crossThreadHandlers/registerGetCustomSectionHandler.js" (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
740
753
|
__webpack_require__.d(__webpack_exports__, {
|
|
741
754
|
m: ()=>registerGetCustomSectionHandler
|
|
742
755
|
});
|
|
743
|
-
var
|
|
756
|
+
var _lynx_js_web_constants__rspack_import_0 = __webpack_require__("../web-constants/dist/index.js");
|
|
744
757
|
function registerGetCustomSectionHandler(rpc, customSections) {
|
|
745
|
-
rpc.registerHandler(
|
|
758
|
+
rpc.registerHandler(_lynx_js_web_constants__rspack_import_0.Fw, (key)=>customSections[key]?.content);
|
|
746
759
|
}
|
|
747
760
|
},
|
|
748
|
-
"../web-mainthread-apis/dist/index.js"
|
|
749
|
-
__webpack_require__.a(__webpack_module__, async function(
|
|
761
|
+
"../web-mainthread-apis/dist/index.js" (__webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
762
|
+
__webpack_require__.a(__webpack_module__, async function(__rspack_load_async_deps, __rspack_async_done) {
|
|
750
763
|
try {
|
|
751
764
|
__webpack_require__.d(__webpack_exports__, {
|
|
752
|
-
prepareMainThreadAPIs: ()=>
|
|
765
|
+
prepareMainThreadAPIs: ()=>_prepareMainThreadAPIs_js__rspack_import_0.m
|
|
753
766
|
});
|
|
754
|
-
var
|
|
755
|
-
var
|
|
756
|
-
var
|
|
757
|
-
|
|
758
|
-
|
|
767
|
+
var _prepareMainThreadAPIs_js__rspack_import_0 = __webpack_require__("../web-mainthread-apis/dist/prepareMainThreadAPIs.js");
|
|
768
|
+
var _createMainThreadGlobalThis_js__rspack_import_1 = __webpack_require__("../web-mainthread-apis/dist/createMainThreadGlobalThis.js");
|
|
769
|
+
var __rspack_async_deps = __rspack_load_async_deps([
|
|
770
|
+
_prepareMainThreadAPIs_js__rspack_import_0,
|
|
771
|
+
_createMainThreadGlobalThis_js__rspack_import_1
|
|
759
772
|
]);
|
|
760
|
-
[
|
|
761
|
-
|
|
773
|
+
[_prepareMainThreadAPIs_js__rspack_import_0, _createMainThreadGlobalThis_js__rspack_import_1] = __rspack_async_deps.then ? (await __rspack_async_deps)() : __rspack_async_deps;
|
|
774
|
+
__rspack_async_done();
|
|
762
775
|
} catch (e) {
|
|
763
|
-
|
|
776
|
+
__rspack_async_done(e);
|
|
764
777
|
}
|
|
765
778
|
});
|
|
766
779
|
},
|
|
767
|
-
"../web-mainthread-apis/dist/prepareMainThreadAPIs.js"
|
|
768
|
-
__webpack_require__.a(__webpack_module__, async function(
|
|
780
|
+
"../web-mainthread-apis/dist/prepareMainThreadAPIs.js" (__webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
781
|
+
__webpack_require__.a(__webpack_module__, async function(__rspack_load_async_deps, __rspack_async_done) {
|
|
769
782
|
try {
|
|
770
783
|
__webpack_require__.d(__webpack_exports__, {
|
|
771
784
|
m: ()=>prepareMainThreadAPIs
|
|
772
785
|
});
|
|
773
|
-
var
|
|
774
|
-
var
|
|
775
|
-
var
|
|
776
|
-
var
|
|
777
|
-
var
|
|
778
|
-
var
|
|
779
|
-
var
|
|
780
|
-
var
|
|
781
|
-
|
|
782
|
-
|
|
786
|
+
var _lynx_js_web_constants__rspack_import_0 = __webpack_require__("../web-constants/dist/index.js");
|
|
787
|
+
var _crossThreadHandlers_registerCallLepusMethodHandler_js__rspack_import_1 = __webpack_require__("../web-mainthread-apis/dist/crossThreadHandlers/registerCallLepusMethodHandler.js");
|
|
788
|
+
var _crossThreadHandlers_registerGetCustomSectionHandler_js__rspack_import_2 = __webpack_require__("../web-mainthread-apis/dist/crossThreadHandlers/registerGetCustomSectionHandler.js");
|
|
789
|
+
var _createMainThreadGlobalThis_js__rspack_import_3 = __webpack_require__("../web-mainthread-apis/dist/createMainThreadGlobalThis.js");
|
|
790
|
+
var _utils_createExposureService_js__rspack_import_4 = __webpack_require__("../web-mainthread-apis/dist/utils/createExposureService.js");
|
|
791
|
+
var _utils_processStyleInfo_js__rspack_import_5 = __webpack_require__("../web-mainthread-apis/dist/utils/processStyleInfo.js");
|
|
792
|
+
var _crossThreadHandlers_createQueryComponent_js__rspack_import_6 = __webpack_require__("../web-mainthread-apis/dist/crossThreadHandlers/createQueryComponent.js");
|
|
793
|
+
var __rspack_async_deps = __rspack_load_async_deps([
|
|
794
|
+
_utils_processStyleInfo_js__rspack_import_5,
|
|
795
|
+
_createMainThreadGlobalThis_js__rspack_import_3
|
|
783
796
|
]);
|
|
784
|
-
[
|
|
785
|
-
function prepareMainThreadAPIs(backgroundThreadRpc, rootDom, document, mtsRealmPromise, commitDocument, markTimingInternal, flushMarkTimingInternal, reportError, triggerI18nResourceFallback, initialI18nResources, loadTemplate, ssrHooks) {
|
|
786
|
-
const postTimingFlags = backgroundThreadRpc.createCall(
|
|
787
|
-
const backgroundStart = backgroundThreadRpc.createCall(
|
|
788
|
-
const publishEvent = backgroundThreadRpc.createCall(
|
|
789
|
-
const publicComponentEvent = backgroundThreadRpc.createCall(
|
|
790
|
-
const postExposure = backgroundThreadRpc.createCall(
|
|
791
|
-
const dispatchI18nResource = backgroundThreadRpc.createCall(
|
|
792
|
-
const updateDataBackground = backgroundThreadRpc.createCall(
|
|
797
|
+
[_utils_processStyleInfo_js__rspack_import_5, _createMainThreadGlobalThis_js__rspack_import_3] = __rspack_async_deps.then ? (await __rspack_async_deps)() : __rspack_async_deps;
|
|
798
|
+
function prepareMainThreadAPIs(backgroundThreadRpc, rootDom, document, mtsRealmPromise, commitDocument, markTimingInternal, flushMarkTimingInternal, reportError, triggerI18nResourceFallback, initialI18nResources, loadTemplate, ssrHooks, allOnUI) {
|
|
799
|
+
const postTimingFlags = backgroundThreadRpc.createCall(_lynx_js_web_constants__rspack_import_0.F6);
|
|
800
|
+
const backgroundStart = backgroundThreadRpc.createCall(_lynx_js_web_constants__rspack_import_0.a$);
|
|
801
|
+
const publishEvent = backgroundThreadRpc.createCall(_lynx_js_web_constants__rspack_import_0.JW);
|
|
802
|
+
const publicComponentEvent = backgroundThreadRpc.createCall(_lynx_js_web_constants__rspack_import_0.Ke);
|
|
803
|
+
const postExposure = backgroundThreadRpc.createCall(_lynx_js_web_constants__rspack_import_0.pd);
|
|
804
|
+
const dispatchI18nResource = backgroundThreadRpc.createCall(_lynx_js_web_constants__rspack_import_0.mB);
|
|
805
|
+
const updateDataBackground = backgroundThreadRpc.createCall(_lynx_js_web_constants__rspack_import_0.Ve);
|
|
793
806
|
markTimingInternal('lepus_execute_start');
|
|
794
807
|
async function startMainThread(config, ssrHydrateInfo) {
|
|
795
808
|
let isFp = true;
|
|
@@ -797,18 +810,18 @@ export const __webpack_modules__ = {
|
|
|
797
810
|
const { styleInfo, pageConfig, customSections, cardType } = template;
|
|
798
811
|
const mtsRealm = await mtsRealmPromise;
|
|
799
812
|
markTimingInternal('decode_start');
|
|
800
|
-
const jsContext = new
|
|
813
|
+
const jsContext = new _lynx_js_web_constants__rspack_import_0.tf({
|
|
801
814
|
rpc: backgroundThreadRpc,
|
|
802
|
-
receiveEventEndpoint:
|
|
803
|
-
sendEventEndpoint:
|
|
815
|
+
receiveEventEndpoint: _lynx_js_web_constants__rspack_import_0.Is,
|
|
816
|
+
sendEventEndpoint: _lynx_js_web_constants__rspack_import_0.jK
|
|
804
817
|
});
|
|
805
818
|
const i18nResources = initialI18nResources(initI18nResources);
|
|
806
|
-
const { updateCssOGStyle, updateLazyComponentStyle } = (0,
|
|
819
|
+
const { updateCssOGStyle, updateLazyComponentStyle } = (0, _utils_processStyleInfo_js__rspack_import_5.c6)(styleInfo, pageConfig, rootDom, document, ssrHydrateInfo, allOnUI);
|
|
807
820
|
const mtsGlobalThisRef = {
|
|
808
821
|
mtsGlobalThis: void 0
|
|
809
822
|
};
|
|
810
|
-
const __QueryComponent = (0,
|
|
811
|
-
const mtsGlobalThis = (0,
|
|
823
|
+
const __QueryComponent = (0, _crossThreadHandlers_createQueryComponent_js__rspack_import_6.k)(loadTemplate, updateLazyComponentStyle, backgroundThreadRpc, mtsGlobalThisRef, jsContext, mtsRealm);
|
|
824
|
+
const mtsGlobalThis = (0, _createMainThreadGlobalThis_js__rspack_import_3.D)({
|
|
812
825
|
lynxTemplate: template,
|
|
813
826
|
mtsRealm,
|
|
814
827
|
jsContext,
|
|
@@ -827,10 +840,10 @@ export const __webpack_modules__ = {
|
|
|
827
840
|
let initData = config.initData;
|
|
828
841
|
if (true !== pageConfig.enableJSDataProcessor && mtsGlobalThis.processData) initData = mtsGlobalThis.processData(config.initData);
|
|
829
842
|
markTimingInternal('data_processor_end');
|
|
830
|
-
(0,
|
|
831
|
-
(0,
|
|
832
|
-
const { switchExposureService } = (0,
|
|
833
|
-
backgroundThreadRpc.registerHandler(
|
|
843
|
+
(0, _crossThreadHandlers_registerCallLepusMethodHandler_js__rspack_import_1.A)(backgroundThreadRpc, mtsGlobalThis);
|
|
844
|
+
(0, _crossThreadHandlers_registerGetCustomSectionHandler_js__rspack_import_2.m)(backgroundThreadRpc, customSections);
|
|
845
|
+
const { switchExposureService } = (0, _utils_createExposureService_js__rspack_import_4.b)(rootDom, postExposure);
|
|
846
|
+
backgroundThreadRpc.registerHandler(_lynx_js_web_constants__rspack_import_0.eZ, switchExposureService);
|
|
834
847
|
backgroundStart({
|
|
835
848
|
initData,
|
|
836
849
|
globalProps,
|
|
@@ -887,7 +900,7 @@ export const __webpack_modules__ = {
|
|
|
887
900
|
publishEvent,
|
|
888
901
|
publicComponentEvent,
|
|
889
902
|
_I18nResourceTranslation: (options)=>{
|
|
890
|
-
const matchedInitI18nResources = i18nResources.data?.find((i)=>(0,
|
|
903
|
+
const matchedInitI18nResources = i18nResources.data?.find((i)=>(0, _lynx_js_web_constants__rspack_import_0.HO)(i.options) === (0, _lynx_js_web_constants__rspack_import_0.HO)(options));
|
|
891
904
|
dispatchI18nResource(matchedInitI18nResources?.resource);
|
|
892
905
|
if (matchedInitI18nResources) return matchedInitI18nResources.resource;
|
|
893
906
|
return triggerI18nResourceFallback(options);
|
|
@@ -912,14 +925,14 @@ export const __webpack_modules__ = {
|
|
|
912
925
|
handleUpdatedData
|
|
913
926
|
};
|
|
914
927
|
}
|
|
915
|
-
|
|
928
|
+
__rspack_async_done();
|
|
916
929
|
} catch (e) {
|
|
917
|
-
|
|
930
|
+
__rspack_async_done(e);
|
|
918
931
|
}
|
|
919
932
|
});
|
|
920
933
|
},
|
|
921
|
-
"../web-mainthread-apis/dist/pureElementPAPIs.js"
|
|
922
|
-
__webpack_require__.a(__webpack_module__, async function(
|
|
934
|
+
"../web-mainthread-apis/dist/pureElementPAPIs.js" (__webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
935
|
+
__webpack_require__.a(__webpack_module__, async function(__rspack_load_async_deps, __rspack_async_done) {
|
|
923
936
|
try {
|
|
924
937
|
__webpack_require__.d(__webpack_exports__, {
|
|
925
938
|
$G: ()=>__GetTemplateParts,
|
|
@@ -959,14 +972,14 @@ export const __webpack_modules__ = {
|
|
|
959
972
|
zP: ()=>__GetComponentID,
|
|
960
973
|
zm: ()=>__GetTag
|
|
961
974
|
});
|
|
962
|
-
var
|
|
963
|
-
var
|
|
964
|
-
var
|
|
965
|
-
var
|
|
966
|
-
var
|
|
967
|
-
|
|
975
|
+
var _lynx_js_web_constants__rspack_import_0 = __webpack_require__("../web-constants/dist/index.js");
|
|
976
|
+
var _style_cssPropertyMap_js__rspack_import_1 = __webpack_require__("../web-mainthread-apis/dist/style/cssPropertyMap.js");
|
|
977
|
+
var _style_transformInlineStyle_js__rspack_import_2 = __webpack_require__("../web-mainthread-apis/dist/style/transformInlineStyle.js");
|
|
978
|
+
var hyphenate_style_name__rspack_import_3 = __webpack_require__("../../../node_modules/.pnpm/hyphenate-style-name@1.1.0/node_modules/hyphenate-style-name/index.js");
|
|
979
|
+
var __rspack_async_deps = __rspack_load_async_deps([
|
|
980
|
+
_style_transformInlineStyle_js__rspack_import_2
|
|
968
981
|
]);
|
|
969
|
-
|
|
982
|
+
_style_transformInlineStyle_js__rspack_import_2 = (__rspack_async_deps.then ? (await __rspack_async_deps)() : __rspack_async_deps)[0];
|
|
970
983
|
const __AppendElement = /*#__PURE__*/ (parent, child)=>parent.appendChild(child);
|
|
971
984
|
const __ElementIsEqual = /*#__PURE__*/ (left, right)=>left === right;
|
|
972
985
|
const __FirstElement = /*#__PURE__*/ (element)=>element.firstElementChild;
|
|
@@ -994,19 +1007,19 @@ export const __webpack_modules__ = {
|
|
|
994
1007
|
}
|
|
995
1008
|
};
|
|
996
1009
|
const __AddConfig = /*#__PURE__*/ (element, type, value)=>{
|
|
997
|
-
const currentComponentConfigString = element.getAttribute(
|
|
1010
|
+
const currentComponentConfigString = element.getAttribute(_lynx_js_web_constants__rspack_import_0.tl);
|
|
998
1011
|
let currentComponentConfig = currentComponentConfigString ? JSON.parse(decodeURIComponent(currentComponentConfigString)) : {};
|
|
999
1012
|
currentComponentConfig[type] = value;
|
|
1000
|
-
element.setAttribute(
|
|
1013
|
+
element.setAttribute(_lynx_js_web_constants__rspack_import_0.tl, encodeURIComponent(JSON.stringify(currentComponentConfig)));
|
|
1001
1014
|
};
|
|
1002
1015
|
const __AddDataset = /*#__PURE__*/ (element, key, value)=>{
|
|
1003
1016
|
const currentDataset = __GetDataset(element);
|
|
1004
1017
|
currentDataset[key] = value;
|
|
1005
|
-
element.setAttribute(
|
|
1018
|
+
element.setAttribute(_lynx_js_web_constants__rspack_import_0.C6, encodeURIComponent(JSON.stringify(currentDataset)));
|
|
1006
1019
|
value ? element.setAttribute('data-' + key, value.toString()) : element.removeAttribute('data-' + key);
|
|
1007
1020
|
};
|
|
1008
1021
|
const __GetDataset = /*#__PURE__*/ (element)=>{
|
|
1009
|
-
const datasetString = element.getAttribute(
|
|
1022
|
+
const datasetString = element.getAttribute(_lynx_js_web_constants__rspack_import_0.C6);
|
|
1010
1023
|
const currentDataset = datasetString ? JSON.parse(decodeURIComponent(datasetString)) : {};
|
|
1011
1024
|
return currentDataset;
|
|
1012
1025
|
};
|
|
@@ -1018,34 +1031,34 @@ export const __webpack_modules__ = {
|
|
|
1018
1031
|
attributeName,
|
|
1019
1032
|
element.getAttribute(attributeName)
|
|
1020
1033
|
]).filter(([, value])=>value));
|
|
1021
|
-
const __GetComponentID = /*#__PURE__*/ (element)=>element.getAttribute(
|
|
1034
|
+
const __GetComponentID = /*#__PURE__*/ (element)=>element.getAttribute(_lynx_js_web_constants__rspack_import_0.pP);
|
|
1022
1035
|
const __GetElementConfig = /*#__PURE__*/ (element)=>{
|
|
1023
|
-
const currentComponentConfigString = element.getAttribute(
|
|
1036
|
+
const currentComponentConfigString = element.getAttribute(_lynx_js_web_constants__rspack_import_0.tl);
|
|
1024
1037
|
return currentComponentConfigString ? JSON.parse(decodeURIComponent(currentComponentConfigString)) : {};
|
|
1025
1038
|
};
|
|
1026
1039
|
const __GetAttributeByName = /*#__PURE__*/ (element, name)=>element.getAttribute(name);
|
|
1027
|
-
const __GetElementUniqueID = /*#__PURE__*/ (element)=>element && element.getAttribute ? Number(element.getAttribute(
|
|
1040
|
+
const __GetElementUniqueID = /*#__PURE__*/ (element)=>element && element.getAttribute ? Number(element.getAttribute(_lynx_js_web_constants__rspack_import_0.SP)) : -1;
|
|
1028
1041
|
const __GetID = /*#__PURE__*/ (element)=>element.getAttribute('id');
|
|
1029
1042
|
const __SetID = /*#__PURE__*/ (element, id)=>id ? element.setAttribute('id', id) : element.removeAttribute('id');
|
|
1030
|
-
const __GetTag = /*#__PURE__*/ (element)=>element.getAttribute(
|
|
1043
|
+
const __GetTag = /*#__PURE__*/ (element)=>element.getAttribute(_lynx_js_web_constants__rspack_import_0.Gq);
|
|
1031
1044
|
const __SetConfig = /*#__PURE__*/ (element, config)=>{
|
|
1032
|
-
element.setAttribute(
|
|
1045
|
+
element.setAttribute(_lynx_js_web_constants__rspack_import_0.tl, encodeURIComponent(JSON.stringify(config)));
|
|
1033
1046
|
};
|
|
1034
1047
|
const __SetDataset = /*#__PURE__*/ (element, dataset)=>{
|
|
1035
|
-
element.setAttribute(
|
|
1048
|
+
element.setAttribute(_lynx_js_web_constants__rspack_import_0.C6, encodeURIComponent(JSON.stringify(dataset)));
|
|
1036
1049
|
for (const [key, value] of Object.entries(dataset))element.setAttribute('data-' + key, value.toString());
|
|
1037
1050
|
};
|
|
1038
|
-
const __UpdateComponentID = /*#__PURE__*/ (element, componentID)=>element.setAttribute(
|
|
1051
|
+
const __UpdateComponentID = /*#__PURE__*/ (element, componentID)=>element.setAttribute(_lynx_js_web_constants__rspack_import_0.pP, componentID);
|
|
1039
1052
|
const __GetClasses = /*#__PURE__*/ (element)=>(element.getAttribute('class') ?? '').split(' ').filter((e)=>e);
|
|
1040
1053
|
const __UpdateComponentInfo = /*#__PURE__*/ (element, params)=>{
|
|
1041
1054
|
void 0 !== params.componentID && __UpdateComponentID(element, params.componentID);
|
|
1042
|
-
void 0 !== params.cssID && element.setAttribute(
|
|
1055
|
+
void 0 !== params.cssID && element.setAttribute(_lynx_js_web_constants__rspack_import_0.js, params.cssID + '');
|
|
1043
1056
|
void 0 !== params.name && element.setAttribute('name', params.name);
|
|
1044
1057
|
};
|
|
1045
1058
|
const __SetCSSId = /*#__PURE__*/ (elements, cssId, entryName)=>{
|
|
1046
1059
|
for (const element of elements){
|
|
1047
|
-
element.setAttribute(
|
|
1048
|
-
entryName && element.setAttribute(
|
|
1060
|
+
element.setAttribute(_lynx_js_web_constants__rspack_import_0.js, cssId + '');
|
|
1061
|
+
entryName && element.setAttribute(_lynx_js_web_constants__rspack_import_0.Pb, entryName);
|
|
1049
1062
|
}
|
|
1050
1063
|
};
|
|
1051
1064
|
const __SetClasses = /*#__PURE__*/ (element, classname)=>{
|
|
@@ -1054,13 +1067,13 @@ export const __webpack_modules__ = {
|
|
|
1054
1067
|
const __AddInlineStyle = /*#__PURE__*/ (element, key, value)=>{
|
|
1055
1068
|
let dashName;
|
|
1056
1069
|
if ('number' == typeof key) {
|
|
1057
|
-
const queryResult = (0,
|
|
1070
|
+
const queryResult = (0, _style_cssPropertyMap_js__rspack_import_1.BH)(key);
|
|
1058
1071
|
dashName = queryResult.dashName;
|
|
1059
1072
|
if (queryResult.isX) console.error(`[lynx-web] css property: ${dashName} is not supported.`);
|
|
1060
1073
|
} else dashName = key;
|
|
1061
1074
|
const valueStr = 'number' == typeof value ? value.toString() : value;
|
|
1062
1075
|
if (valueStr) {
|
|
1063
|
-
const { transformedStyle } = (0,
|
|
1076
|
+
const { transformedStyle } = (0, _style_transformInlineStyle_js__rspack_import_2.x)([
|
|
1064
1077
|
[
|
|
1065
1078
|
dashName,
|
|
1066
1079
|
valueStr
|
|
@@ -1075,10 +1088,10 @@ export const __webpack_modules__ = {
|
|
|
1075
1088
|
};
|
|
1076
1089
|
const __SetInlineStyles = /*#__PURE__*/ (element, value)=>{
|
|
1077
1090
|
if (!value) return;
|
|
1078
|
-
if ('string' == typeof value) element.setAttribute('style', (0,
|
|
1091
|
+
if ('string' == typeof value) element.setAttribute('style', (0, _style_transformInlineStyle_js__rspack_import_2.Q)(value));
|
|
1079
1092
|
else {
|
|
1080
|
-
const { transformedStyle } = (0,
|
|
1081
|
-
(0,
|
|
1093
|
+
const { transformedStyle } = (0, _style_transformInlineStyle_js__rspack_import_2.x)(Object.entries(value).map(([k, value])=>[
|
|
1094
|
+
(0, hyphenate_style_name__rspack_import_3.A)(k),
|
|
1082
1095
|
value?.toString?.() ?? ''
|
|
1083
1096
|
]));
|
|
1084
1097
|
const transformedStyleStr = transformedStyle.map(([property, value])=>`${property}:${value};`).join('');
|
|
@@ -1086,30 +1099,30 @@ export const __webpack_modules__ = {
|
|
|
1086
1099
|
}
|
|
1087
1100
|
};
|
|
1088
1101
|
const __GetTemplateParts = (templateElement)=>{
|
|
1089
|
-
const isTemplate = null !== templateElement.getAttribute(
|
|
1102
|
+
const isTemplate = null !== templateElement.getAttribute(_lynx_js_web_constants__rspack_import_0.y);
|
|
1090
1103
|
if (!isTemplate) return {};
|
|
1091
1104
|
const templateUniqueId = __GetElementUniqueID(templateElement);
|
|
1092
1105
|
const parts = {};
|
|
1093
|
-
const partElements = templateElement.querySelectorAll(`[${
|
|
1106
|
+
const partElements = templateElement.querySelectorAll(`[${_lynx_js_web_constants__rspack_import_0.SP}="${templateUniqueId}"] [${_lynx_js_web_constants__rspack_import_0.oZ}]:not([${_lynx_js_web_constants__rspack_import_0.SP}="${templateUniqueId}"] [${_lynx_js_web_constants__rspack_import_0.y}] [${_lynx_js_web_constants__rspack_import_0.oZ}])`);
|
|
1094
1107
|
for (const partElement of partElements){
|
|
1095
|
-
const partId = partElement.getAttribute(
|
|
1108
|
+
const partId = partElement.getAttribute(_lynx_js_web_constants__rspack_import_0.oZ);
|
|
1096
1109
|
if (partId) parts[partId] = partElement;
|
|
1097
1110
|
}
|
|
1098
1111
|
return parts;
|
|
1099
1112
|
};
|
|
1100
1113
|
const __MarkTemplateElement = (element)=>{
|
|
1101
|
-
element.setAttribute(
|
|
1114
|
+
element.setAttribute(_lynx_js_web_constants__rspack_import_0.y, '');
|
|
1102
1115
|
};
|
|
1103
1116
|
const __MarkPartElement = (element, partId)=>{
|
|
1104
|
-
element.setAttribute(
|
|
1117
|
+
element.setAttribute(_lynx_js_web_constants__rspack_import_0.oZ, partId);
|
|
1105
1118
|
};
|
|
1106
|
-
|
|
1119
|
+
__rspack_async_done();
|
|
1107
1120
|
} catch (e) {
|
|
1108
|
-
|
|
1121
|
+
__rspack_async_done(e);
|
|
1109
1122
|
}
|
|
1110
1123
|
});
|
|
1111
1124
|
},
|
|
1112
|
-
"../web-mainthread-apis/dist/style/cssPropertyMap.js"
|
|
1125
|
+
"../web-mainthread-apis/dist/style/cssPropertyMap.js" (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1113
1126
|
__webpack_require__.d(__webpack_exports__, {
|
|
1114
1127
|
BH: ()=>queryCSSProperty
|
|
1115
1128
|
});
|
|
@@ -1354,29 +1367,29 @@ export const __webpack_modules__ = {
|
|
|
1354
1367
|
return cssPropertyMap[index];
|
|
1355
1368
|
}
|
|
1356
1369
|
},
|
|
1357
|
-
"../web-mainthread-apis/dist/style/transformInlineStyle.js"
|
|
1358
|
-
__webpack_require__.a(__webpack_module__, async function(
|
|
1370
|
+
"../web-mainthread-apis/dist/style/transformInlineStyle.js" (__webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1371
|
+
__webpack_require__.a(__webpack_module__, async function(__rspack_load_async_deps, __rspack_async_done) {
|
|
1359
1372
|
try {
|
|
1360
1373
|
__webpack_require__.d(__webpack_exports__, {
|
|
1361
|
-
Q: ()=>
|
|
1362
|
-
x: ()=>
|
|
1374
|
+
Q: ()=>_utils_tokenizer_js__rspack_import_0.Q,
|
|
1375
|
+
x: ()=>_utils_tokenizer_js__rspack_import_0.x
|
|
1363
1376
|
});
|
|
1364
|
-
var
|
|
1365
|
-
var
|
|
1366
|
-
|
|
1377
|
+
var _utils_tokenizer_js__rspack_import_0 = __webpack_require__("../web-mainthread-apis/dist/utils/tokenizer.js");
|
|
1378
|
+
var __rspack_async_deps = __rspack_load_async_deps([
|
|
1379
|
+
_utils_tokenizer_js__rspack_import_0
|
|
1367
1380
|
]);
|
|
1368
|
-
|
|
1369
|
-
|
|
1381
|
+
_utils_tokenizer_js__rspack_import_0 = (__rspack_async_deps.then ? (await __rspack_async_deps)() : __rspack_async_deps)[0];
|
|
1382
|
+
__rspack_async_done();
|
|
1370
1383
|
} catch (e) {
|
|
1371
|
-
|
|
1384
|
+
__rspack_async_done(e);
|
|
1372
1385
|
}
|
|
1373
1386
|
});
|
|
1374
1387
|
},
|
|
1375
|
-
"../web-mainthread-apis/dist/utils/createCrossThreadEvent.js"
|
|
1388
|
+
"../web-mainthread-apis/dist/utils/createCrossThreadEvent.js" (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1376
1389
|
__webpack_require__.d(__webpack_exports__, {
|
|
1377
1390
|
X: ()=>createCrossThreadEvent
|
|
1378
1391
|
});
|
|
1379
|
-
var
|
|
1392
|
+
var _lynx_js_web_constants__rspack_import_0 = __webpack_require__("../web-constants/dist/index.js");
|
|
1380
1393
|
function toCloneableObject(obj) {
|
|
1381
1394
|
const cloneableObj = {};
|
|
1382
1395
|
for(const key in obj){
|
|
@@ -1435,9 +1448,9 @@ export const __webpack_modules__ = {
|
|
|
1435
1448
|
x: domEvent.x,
|
|
1436
1449
|
y: domEvent.y
|
|
1437
1450
|
};
|
|
1438
|
-
const currentTargetDatasetString = currentTargetElement?.getAttribute(
|
|
1451
|
+
const currentTargetDatasetString = currentTargetElement?.getAttribute(_lynx_js_web_constants__rspack_import_0.C6);
|
|
1439
1452
|
const currentTargetDataset = currentTargetDatasetString ? JSON.parse(decodeURIComponent(currentTargetDatasetString)) : {};
|
|
1440
|
-
const targetDatasetString = targetElement.getAttribute(
|
|
1453
|
+
const targetDatasetString = targetElement.getAttribute(_lynx_js_web_constants__rspack_import_0.C6);
|
|
1441
1454
|
const targetDataset = targetDatasetString ? JSON.parse(decodeURIComponent(targetDatasetString)) : {};
|
|
1442
1455
|
return {
|
|
1443
1456
|
type: eventName,
|
|
@@ -1445,12 +1458,12 @@ export const __webpack_modules__ = {
|
|
|
1445
1458
|
target: {
|
|
1446
1459
|
id: targetElement.getAttribute('id'),
|
|
1447
1460
|
dataset: targetDataset,
|
|
1448
|
-
uniqueId: Number(targetElement.getAttribute(
|
|
1461
|
+
uniqueId: Number(targetElement.getAttribute(_lynx_js_web_constants__rspack_import_0.SP))
|
|
1449
1462
|
},
|
|
1450
1463
|
currentTarget: currentTargetElement ? {
|
|
1451
1464
|
id: currentTargetElement.getAttribute('id'),
|
|
1452
1465
|
dataset: currentTargetDataset,
|
|
1453
|
-
uniqueId: Number(currentTargetElement.getAttribute(
|
|
1466
|
+
uniqueId: Number(currentTargetElement.getAttribute(_lynx_js_web_constants__rspack_import_0.SP))
|
|
1454
1467
|
} : null,
|
|
1455
1468
|
detail,
|
|
1456
1469
|
params,
|
|
@@ -1458,12 +1471,12 @@ export const __webpack_modules__ = {
|
|
|
1458
1471
|
};
|
|
1459
1472
|
}
|
|
1460
1473
|
},
|
|
1461
|
-
"../web-mainthread-apis/dist/utils/createExposureService.js"
|
|
1474
|
+
"../web-mainthread-apis/dist/utils/createExposureService.js" (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1462
1475
|
__webpack_require__.d(__webpack_exports__, {
|
|
1463
1476
|
b: ()=>createExposureService
|
|
1464
1477
|
});
|
|
1465
|
-
var
|
|
1466
|
-
var
|
|
1478
|
+
var _lynx_js_web_constants__rspack_import_0 = __webpack_require__("../web-constants/dist/index.js");
|
|
1479
|
+
var _createCrossThreadEvent_js__rspack_import_1 = __webpack_require__("../web-mainthread-apis/dist/utils/createCrossThreadEvent.js");
|
|
1467
1480
|
function createExposureService(rootDom, postExposure) {
|
|
1468
1481
|
let working = true;
|
|
1469
1482
|
let exposureCache = [];
|
|
@@ -1471,8 +1484,8 @@ export const __webpack_modules__ = {
|
|
|
1471
1484
|
let delayCallback = null;
|
|
1472
1485
|
const onScreen = new Map();
|
|
1473
1486
|
function exposureEventHandler(ev) {
|
|
1474
|
-
const exposureEvent = (0,
|
|
1475
|
-
exposureEvent.detail['unique-id'] = parseFloat(ev.target.getAttribute(
|
|
1487
|
+
const exposureEvent = (0, _createCrossThreadEvent_js__rspack_import_1.X)(ev, ev.type);
|
|
1488
|
+
exposureEvent.detail['unique-id'] = parseFloat(ev.target.getAttribute(_lynx_js_web_constants__rspack_import_0.SP));
|
|
1476
1489
|
const exposureID = exposureEvent.detail.exposureID;
|
|
1477
1490
|
if ('exposure' === ev.type) {
|
|
1478
1491
|
exposureCache.push(exposureEvent);
|
|
@@ -1523,7 +1536,7 @@ export const __webpack_modules__ = {
|
|
|
1523
1536
|
};
|
|
1524
1537
|
}
|
|
1525
1538
|
},
|
|
1526
|
-
"../web-mainthread-apis/dist/utils/decodeCssOG.js"
|
|
1539
|
+
"../web-mainthread-apis/dist/utils/decodeCssOG.js" (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1527
1540
|
__webpack_require__.d(__webpack_exports__, {
|
|
1528
1541
|
y: ()=>decodeCssOG
|
|
1529
1542
|
});
|
|
@@ -1539,19 +1552,19 @@ export const __webpack_modules__ = {
|
|
|
1539
1552
|
return declarations.map(([property, value])=>`${property}:${value};`).join('');
|
|
1540
1553
|
}
|
|
1541
1554
|
},
|
|
1542
|
-
"../web-mainthread-apis/dist/utils/processStyleInfo.js"
|
|
1543
|
-
__webpack_require__.a(__webpack_module__, async function(
|
|
1555
|
+
"../web-mainthread-apis/dist/utils/processStyleInfo.js" (__webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1556
|
+
__webpack_require__.a(__webpack_module__, async function(__rspack_load_async_deps, __rspack_async_done) {
|
|
1544
1557
|
try {
|
|
1545
1558
|
__webpack_require__.d(__webpack_exports__, {
|
|
1546
1559
|
c6: ()=>appendStyleElement
|
|
1547
1560
|
});
|
|
1548
|
-
var
|
|
1549
|
-
var
|
|
1550
|
-
var
|
|
1551
|
-
var
|
|
1552
|
-
|
|
1561
|
+
var _lynx_js_web_constants__rspack_import_0 = __webpack_require__("../web-constants/dist/index.js");
|
|
1562
|
+
var _tokenizer_js__rspack_import_1 = __webpack_require__("../web-mainthread-apis/dist/utils/tokenizer.js");
|
|
1563
|
+
var _decodeCssOG_js__rspack_import_2 = __webpack_require__("../web-mainthread-apis/dist/utils/decodeCssOG.js");
|
|
1564
|
+
var __rspack_async_deps = __rspack_load_async_deps([
|
|
1565
|
+
_tokenizer_js__rspack_import_1
|
|
1553
1566
|
]);
|
|
1554
|
-
|
|
1567
|
+
_tokenizer_js__rspack_import_1 = (__rspack_async_deps.then ? (await __rspack_async_deps)() : __rspack_async_deps)[0];
|
|
1555
1568
|
function topologicalSort(styleInfo) {
|
|
1556
1569
|
const queue = [];
|
|
1557
1570
|
const inDegreeMap = new Map();
|
|
@@ -1596,15 +1609,23 @@ export const __webpack_modules__ = {
|
|
|
1596
1609
|
}
|
|
1597
1610
|
return cssIdToImportBy;
|
|
1598
1611
|
}
|
|
1599
|
-
function flattenStyleInfo(styleInfo) {
|
|
1612
|
+
function flattenStyleInfo(styleInfo, cloneDeep) {
|
|
1600
1613
|
const sortedCssIds = topologicalSort(styleInfo);
|
|
1601
1614
|
const cssIdToImportBy = generateImportByMap(styleInfo, sortedCssIds);
|
|
1602
1615
|
sortedCssIds.reverse();
|
|
1603
1616
|
return sortedCssIds.map((cssId)=>{
|
|
1604
1617
|
const oneInfo = styleInfo[cssId];
|
|
1605
1618
|
const flattenedInfo = oneInfo ? {
|
|
1606
|
-
content: oneInfo.content
|
|
1607
|
-
|
|
1619
|
+
content: cloneDeep ? oneInfo.content ? [
|
|
1620
|
+
...oneInfo.content
|
|
1621
|
+
] : [] : oneInfo.content ?? [],
|
|
1622
|
+
rules: cloneDeep ? oneInfo.rules ? oneInfo.rules.map((rule)=>({
|
|
1623
|
+
sel: rule.sel.map((selectors)=>selectors.map((arr)=>arr.slice())),
|
|
1624
|
+
decl: rule.decl.map(([k, v])=>[
|
|
1625
|
+
k,
|
|
1626
|
+
v
|
|
1627
|
+
])
|
|
1628
|
+
})) : [] : oneInfo.rules ?? [],
|
|
1608
1629
|
importBy: Array.from(cssIdToImportBy.get(cssId) ?? [
|
|
1609
1630
|
cssId
|
|
1610
1631
|
])
|
|
@@ -1621,7 +1642,7 @@ export const __webpack_modules__ = {
|
|
|
1621
1642
|
function transformToWebCss(styleInfo) {
|
|
1622
1643
|
for (const cssInfos of styleInfo)for (const rule of cssInfos.rules){
|
|
1623
1644
|
const { sel: selectors, decl: declarations } = rule;
|
|
1624
|
-
const { transformedStyle, childStyle } = (0,
|
|
1645
|
+
const { transformedStyle, childStyle } = (0, _tokenizer_js__rspack_import_1.x)(declarations);
|
|
1625
1646
|
rule.decl = transformedStyle;
|
|
1626
1647
|
if (childStyle.length > 0) cssInfos.rules.push({
|
|
1627
1648
|
sel: selectors.map((selector)=>selector.toSpliced(-2, 1, [
|
|
@@ -1636,8 +1657,8 @@ export const __webpack_modules__ = {
|
|
|
1636
1657
|
function genCssContent(styleInfo, pageConfig, entryName) {
|
|
1637
1658
|
function getExtraSelectors(cssId) {
|
|
1638
1659
|
let suffix;
|
|
1639
|
-
suffix = pageConfig.enableRemoveCSSScope ? `[${
|
|
1640
|
-
suffix = entryName ? `${suffix}[${
|
|
1660
|
+
suffix = pageConfig.enableRemoveCSSScope ? `[${_lynx_js_web_constants__rspack_import_0.Gq}]` : `[${_lynx_js_web_constants__rspack_import_0.js}="${cssId}"]`;
|
|
1661
|
+
suffix = entryName ? `${suffix}[${_lynx_js_web_constants__rspack_import_0.Pb}=${JSON.stringify(entryName)}]` : `${suffix}:not([${_lynx_js_web_constants__rspack_import_0.Pb}])`;
|
|
1641
1662
|
return suffix;
|
|
1642
1663
|
}
|
|
1643
1664
|
const finalCssContent = [];
|
|
@@ -1678,9 +1699,9 @@ export const __webpack_modules__ = {
|
|
|
1678
1699
|
});
|
|
1679
1700
|
return cssOGInfo;
|
|
1680
1701
|
}
|
|
1681
|
-
function appendStyleElement(styleInfo, pageConfig, rootDom, document, ssrHydrateInfo) {
|
|
1702
|
+
function appendStyleElement(styleInfo, pageConfig, rootDom, document, ssrHydrateInfo, allOnUI) {
|
|
1682
1703
|
const lynxUniqueIdToStyleRulesIndex = ssrHydrateInfo?.lynxUniqueIdToStyleRulesIndex ?? [];
|
|
1683
|
-
const flattenedStyleInfo = flattenStyleInfo(styleInfo);
|
|
1704
|
+
const flattenedStyleInfo = flattenStyleInfo(styleInfo, !!allOnUI);
|
|
1684
1705
|
transformToWebCss(flattenedStyleInfo);
|
|
1685
1706
|
const cssOGInfo = pageConfig.enableCSSSelector ? {} : genCssOGInfo(flattenedStyleInfo);
|
|
1686
1707
|
const lazyCSSOGInfo = {};
|
|
@@ -1694,17 +1715,17 @@ export const __webpack_modules__ = {
|
|
|
1694
1715
|
const updateCssOGStyle = (uniqueId, newClassName, cssID, entryName)=>{
|
|
1695
1716
|
const cardStyleElementSheet = cardStyleElement.sheet;
|
|
1696
1717
|
const styleMap = entryName && lazyCSSOGInfo[entryName] ? lazyCSSOGInfo[entryName] : cssOGInfo;
|
|
1697
|
-
const newStyles = (0,
|
|
1718
|
+
const newStyles = (0, _decodeCssOG_js__rspack_import_2.y)(newClassName, styleMap, cssID);
|
|
1698
1719
|
if (void 0 !== lynxUniqueIdToStyleRulesIndex[uniqueId]) {
|
|
1699
1720
|
const rule = cardStyleElementSheet.cssRules[lynxUniqueIdToStyleRulesIndex[uniqueId]];
|
|
1700
1721
|
rule.style.cssText = newStyles;
|
|
1701
1722
|
} else {
|
|
1702
|
-
const index = cardStyleElementSheet.insertRule(`[${
|
|
1723
|
+
const index = cardStyleElementSheet.insertRule(`[${_lynx_js_web_constants__rspack_import_0.SP}="${uniqueId}"]{${newStyles}}`, cardStyleElementSheet.cssRules.length);
|
|
1703
1724
|
lynxUniqueIdToStyleRulesIndex[uniqueId] = index;
|
|
1704
1725
|
}
|
|
1705
1726
|
};
|
|
1706
1727
|
const updateLazyComponentStyle = (styleInfo, entryName)=>{
|
|
1707
|
-
const flattenedStyleInfo = flattenStyleInfo(styleInfo);
|
|
1728
|
+
const flattenedStyleInfo = flattenStyleInfo(styleInfo, !!allOnUI);
|
|
1708
1729
|
transformToWebCss(flattenedStyleInfo);
|
|
1709
1730
|
if (!pageConfig.enableCSSSelector) lazyCSSOGInfo[entryName] = genCssOGInfo(flattenedStyleInfo);
|
|
1710
1731
|
const newStyleSheet = genCssContent(flattenedStyleInfo, pageConfig, entryName);
|
|
@@ -1715,32 +1736,32 @@ export const __webpack_modules__ = {
|
|
|
1715
1736
|
updateLazyComponentStyle
|
|
1716
1737
|
};
|
|
1717
1738
|
}
|
|
1718
|
-
|
|
1739
|
+
__rspack_async_done();
|
|
1719
1740
|
} catch (e) {
|
|
1720
|
-
|
|
1741
|
+
__rspack_async_done(e);
|
|
1721
1742
|
}
|
|
1722
1743
|
});
|
|
1723
1744
|
},
|
|
1724
|
-
"../web-mainthread-apis/dist/utils/tokenizer.js"
|
|
1725
|
-
__webpack_require__.a(__webpack_module__, async function(
|
|
1745
|
+
"../web-mainthread-apis/dist/utils/tokenizer.js" (__webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1746
|
+
__webpack_require__.a(__webpack_module__, async function(__rspack_load_async_deps, __rspack_async_done) {
|
|
1726
1747
|
try {
|
|
1727
1748
|
__webpack_require__.d(__webpack_exports__, {
|
|
1728
1749
|
Q: ()=>transformInlineStyleString,
|
|
1729
1750
|
x: ()=>transformParsedStyles
|
|
1730
1751
|
});
|
|
1731
|
-
var
|
|
1732
|
-
var
|
|
1733
|
-
|
|
1752
|
+
var _wasm_index_js__rspack_import_0 = __webpack_require__("../web-mainthread-apis/wasm/index.js");
|
|
1753
|
+
var __rspack_async_deps = __rspack_load_async_deps([
|
|
1754
|
+
_wasm_index_js__rspack_import_0
|
|
1734
1755
|
]);
|
|
1735
|
-
|
|
1756
|
+
_wasm_index_js__rspack_import_0 = (__rspack_async_deps.then ? (await __rspack_async_deps)() : __rspack_async_deps)[0];
|
|
1736
1757
|
function transformInlineStyleString(str) {
|
|
1737
|
-
return
|
|
1758
|
+
return _wasm_index_js__rspack_import_0.v.transform_raw_u16_inline_style_ptr(str) ?? str;
|
|
1738
1759
|
}
|
|
1739
1760
|
function transformParsedStyles(styles) {
|
|
1740
1761
|
let childStyle = [];
|
|
1741
1762
|
let transformedStyle = [];
|
|
1742
1763
|
for (const [property, value] of styles){
|
|
1743
|
-
const transformedResult =
|
|
1764
|
+
const transformedResult = _wasm_index_js__rspack_import_0.v.transform_raw_u16_inline_style_ptr_parsed(property, value);
|
|
1744
1765
|
if (transformedResult) {
|
|
1745
1766
|
const [transformedStyleForCurrent, childStyleForCurrent] = transformedResult;
|
|
1746
1767
|
transformedStyle = transformedStyle.concat(transformedStyleForCurrent);
|
|
@@ -1755,65 +1776,65 @@ export const __webpack_modules__ = {
|
|
|
1755
1776
|
transformedStyle
|
|
1756
1777
|
};
|
|
1757
1778
|
}
|
|
1758
|
-
|
|
1779
|
+
__rspack_async_done();
|
|
1759
1780
|
} catch (e) {
|
|
1760
|
-
|
|
1781
|
+
__rspack_async_done(e);
|
|
1761
1782
|
}
|
|
1762
1783
|
});
|
|
1763
1784
|
},
|
|
1764
|
-
"../web-mainthread-apis/wasm/index.js"
|
|
1765
|
-
__webpack_require__.a(__webpack_module__, async function(
|
|
1785
|
+
"../web-mainthread-apis/wasm/index.js" (__webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1786
|
+
__webpack_require__.a(__webpack_module__, async function(__rspack_load_async_deps, __rspack_async_done) {
|
|
1766
1787
|
try {
|
|
1767
1788
|
__webpack_require__.d(__webpack_exports__, {
|
|
1768
1789
|
v: ()=>wasm
|
|
1769
1790
|
});
|
|
1770
|
-
var
|
|
1791
|
+
var wasm_feature_detect__rspack_import_0 = __webpack_require__("../../../node_modules/.pnpm/wasm-feature-detect@1.8.0/node_modules/wasm-feature-detect/dist/esm/index.js");
|
|
1771
1792
|
let wasm;
|
|
1772
1793
|
async function initWasm() {
|
|
1773
|
-
const supportsReferenceTypes = await (0,
|
|
1794
|
+
const supportsReferenceTypes = await (0, wasm_feature_detect__rspack_import_0.rO)();
|
|
1774
1795
|
wasm = supportsReferenceTypes ? await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "../web-mainthread-apis/wasm/standard.js")) : await __webpack_require__.e("8").then(__webpack_require__.bind(__webpack_require__, "../web-mainthread-apis/wasm/legacy.js"));
|
|
1775
1796
|
}
|
|
1776
1797
|
await initWasm();
|
|
1777
|
-
|
|
1798
|
+
__rspack_async_done();
|
|
1778
1799
|
} catch (e) {
|
|
1779
|
-
|
|
1800
|
+
__rspack_async_done(e);
|
|
1780
1801
|
}
|
|
1781
1802
|
}, 1);
|
|
1782
1803
|
},
|
|
1783
|
-
"../web-mainthread-apis/wasm/standard.js"
|
|
1784
|
-
__webpack_require__.a(__webpack_module__, async function(
|
|
1804
|
+
"../web-mainthread-apis/wasm/standard.js" (__webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1805
|
+
__webpack_require__.a(__webpack_module__, async function(__rspack_load_async_deps, __rspack_async_done) {
|
|
1785
1806
|
try {
|
|
1786
1807
|
__webpack_require__.r(__webpack_exports__);
|
|
1787
1808
|
__webpack_require__.d(__webpack_exports__, {
|
|
1788
|
-
__wbg___wbindgen_throw_b855445ff6a94295: ()=>
|
|
1789
|
-
__wbg_new_e17d9f43105b08be: ()=>
|
|
1790
|
-
__wbg_push_df81a39d04db858c: ()=>
|
|
1791
|
-
__wbg_set_wasm: ()=>
|
|
1792
|
-
__wbindgen_cast_2241b6af4c4b2941: ()=>
|
|
1793
|
-
__wbindgen_init_externref_table: ()=>
|
|
1794
|
-
transform_raw_u16_inline_style_ptr: ()=>
|
|
1795
|
-
transform_raw_u16_inline_style_ptr_parsed: ()=>
|
|
1809
|
+
__wbg___wbindgen_throw_b855445ff6a94295: ()=>_binary_standard_js__rspack_import_0.H4,
|
|
1810
|
+
__wbg_new_e17d9f43105b08be: ()=>_binary_standard_js__rspack_import_0.f,
|
|
1811
|
+
__wbg_push_df81a39d04db858c: ()=>_binary_standard_js__rspack_import_0.RS,
|
|
1812
|
+
__wbg_set_wasm: ()=>_binary_standard_js__rspack_import_0.lI,
|
|
1813
|
+
__wbindgen_cast_2241b6af4c4b2941: ()=>_binary_standard_js__rspack_import_0.pY,
|
|
1814
|
+
__wbindgen_init_externref_table: ()=>_binary_standard_js__rspack_import_0.bL,
|
|
1815
|
+
transform_raw_u16_inline_style_ptr: ()=>_binary_standard_js__rspack_import_0.aC,
|
|
1816
|
+
transform_raw_u16_inline_style_ptr_parsed: ()=>_binary_standard_js__rspack_import_0.iG
|
|
1796
1817
|
});
|
|
1797
|
-
var
|
|
1798
|
-
var
|
|
1799
|
-
|
|
1818
|
+
var _binary_standard_js__rspack_import_0 = __webpack_require__("../web-mainthread-apis/binary/standard.js");
|
|
1819
|
+
var __rspack_async_deps = __rspack_load_async_deps([
|
|
1820
|
+
_binary_standard_js__rspack_import_0
|
|
1800
1821
|
]);
|
|
1801
|
-
|
|
1802
|
-
|
|
1822
|
+
_binary_standard_js__rspack_import_0 = (__rspack_async_deps.then ? (await __rspack_async_deps)() : __rspack_async_deps)[0];
|
|
1823
|
+
__rspack_async_done();
|
|
1803
1824
|
} catch (e) {
|
|
1804
|
-
|
|
1825
|
+
__rspack_async_done(e);
|
|
1805
1826
|
}
|
|
1806
1827
|
});
|
|
1807
1828
|
},
|
|
1808
|
-
"../web-mainthread-apis/binary/standard_bg.wasm"
|
|
1809
|
-
var
|
|
1810
|
-
module.exports = __webpack_require__.v(exports, module.id, "
|
|
1829
|
+
"../web-mainthread-apis/binary/standard_bg.wasm" (module, exports, __webpack_require__) {
|
|
1830
|
+
var rspack_import_0 = __webpack_require__("../web-mainthread-apis/binary/standard_bg.js");
|
|
1831
|
+
module.exports = __webpack_require__.v(exports, module.id, "97be315d5afffd9f", {
|
|
1811
1832
|
"./standard_bg.js": {
|
|
1812
|
-
__wbg_new_e17d9f43105b08be:
|
|
1813
|
-
__wbg_push_df81a39d04db858c:
|
|
1814
|
-
__wbg___wbindgen_throw_b855445ff6a94295:
|
|
1815
|
-
__wbindgen_init_externref_table:
|
|
1816
|
-
__wbindgen_cast_2241b6af4c4b2941:
|
|
1833
|
+
__wbg_new_e17d9f43105b08be: rspack_import_0.f,
|
|
1834
|
+
__wbg_push_df81a39d04db858c: rspack_import_0.RS,
|
|
1835
|
+
__wbg___wbindgen_throw_b855445ff6a94295: rspack_import_0.H4,
|
|
1836
|
+
__wbindgen_init_externref_table: rspack_import_0.bL,
|
|
1837
|
+
__wbindgen_cast_2241b6af4c4b2941: rspack_import_0.pY
|
|
1817
1838
|
}
|
|
1818
1839
|
});
|
|
1819
1840
|
}
|