@lynx-js/web-core-server-canary 0.18.5-canary-20251203-06ba61c9 → 0.18.5-canary-20251204-736b8322
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 +1 -1
- package/dist/27.js +18 -5
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/dist/27.js
CHANGED
|
@@ -242,10 +242,11 @@ 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 isCapture = event.eventPhase === Event.AT_TARGET ? capture : event.eventPhase === event.CAPTURING_PHASE;
|
|
249
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) {
|
|
@@ -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, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/web-core-server-canary",
|
|
3
|
-
"version": "0.18.5-canary-
|
|
3
|
+
"version": "0.18.5-canary-20251204-736b8322",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [],
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"rsbuild-plugin-arethetypeswrong": "0.1.1",
|
|
27
27
|
"rsbuild-plugin-publint": "0.3.3",
|
|
28
|
+
"@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.18.5-canary-20251204-736b8322",
|
|
29
|
+
"@lynx-js/web-elements-template": "npm:@lynx-js/web-elements-template-canary@0.8.12-canary-20251204-736b8322",
|
|
28
30
|
"@lynx-js/offscreen-document": "npm:@lynx-js/offscreen-document-canary@0.1.4",
|
|
29
|
-
"@lynx-js/web-
|
|
30
|
-
"@lynx-js/web-
|
|
31
|
-
"@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.18.5-canary-20251203-06ba61c9",
|
|
32
|
-
"@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.18.5-canary-20251203-06ba61c9"
|
|
31
|
+
"@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.18.5-canary-20251204-736b8322",
|
|
32
|
+
"@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.18.5-canary-20251204-736b8322"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "rslib build",
|