@lynx-js/web-core-server-canary 0.18.5-canary-20251203-06ba61c9 → 0.18.5-canary-20251203-40c3a1a0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @lynx-js/web-core-server
2
2
 
3
- ## 0.18.5-canary-20251203023322-06ba61c9375eab7c4e5ceaa1bd653e24d2dfca13
3
+ ## 0.18.5-canary-20251203084300-40c3a1a0436701e46b505301c4ba66a8f68de7c0
4
4
 
5
5
  ## 0.18.4
6
6
 
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 commonCatchHandler = (event)=>{
273
- const handlerTriggered = commonHandler(event);
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 ? commonCatchHandler : commonHandler;
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-20251203-06ba61c9",
3
+ "version": "0.18.5-canary-20251203-40c3a1a0",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -26,10 +26,10 @@
26
26
  "rsbuild-plugin-arethetypeswrong": "0.1.1",
27
27
  "rsbuild-plugin-publint": "0.3.3",
28
28
  "@lynx-js/offscreen-document": "npm:@lynx-js/offscreen-document-canary@0.1.4",
29
- "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.18.5-canary-20251203-06ba61c9",
30
- "@lynx-js/web-elements-template": "npm:@lynx-js/web-elements-template-canary@0.8.12-canary-20251203-06ba61c9",
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"
29
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.18.5-canary-20251203-40c3a1a0",
30
+ "@lynx-js/web-elements-template": "npm:@lynx-js/web-elements-template-canary@0.8.12-canary-20251203-40c3a1a0",
31
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.18.5-canary-20251203-40c3a1a0",
32
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.18.5-canary-20251203-40c3a1a0"
33
33
  },
34
34
  "scripts": {
35
35
  "build": "rslib build",