@ethlete/core 4.18.0 → 4.18.2
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.
|
@@ -2360,6 +2360,7 @@ const buildSignalEffects = (el, config) => {
|
|
|
2360
2360
|
});
|
|
2361
2361
|
}
|
|
2362
2362
|
}
|
|
2363
|
+
console.log('buildSignalEffects updated elements');
|
|
2363
2364
|
});
|
|
2364
2365
|
const effects = {};
|
|
2365
2366
|
const has = (tokens) => tokens in effects;
|
|
@@ -2375,6 +2376,7 @@ const buildSignalEffects = (el, config) => {
|
|
|
2375
2376
|
continue;
|
|
2376
2377
|
config.updateFn(el, tokenArray, signal());
|
|
2377
2378
|
}
|
|
2379
|
+
console.log('buildSignalEffects updated bindings');
|
|
2378
2380
|
});
|
|
2379
2381
|
});
|
|
2380
2382
|
};
|
|
@@ -2500,6 +2502,7 @@ const signalElementDimensions = (el) => {
|
|
|
2500
2502
|
? { inlineSize: devicePixelContentBoxSize.inlineSize, blockSize: devicePixelContentBoxSize.blockSize }
|
|
2501
2503
|
: null,
|
|
2502
2504
|
}));
|
|
2505
|
+
console.log('signalElementDimensions changes');
|
|
2503
2506
|
}
|
|
2504
2507
|
});
|
|
2505
2508
|
effect(() => {
|
|
@@ -2516,6 +2519,7 @@ const signalElementDimensions = (el) => {
|
|
|
2516
2519
|
}
|
|
2517
2520
|
observer.observe(els.currentElement);
|
|
2518
2521
|
}
|
|
2522
|
+
console.log('signalElementDimensions observe change');
|
|
2519
2523
|
}, { allowSignalWrites: true });
|
|
2520
2524
|
destroyRef.onDestroy(() => observer.disconnect());
|
|
2521
2525
|
return elementDimensionsSignal.asReadonly();
|
|
@@ -2532,6 +2536,7 @@ const signalElementMutations = (el, options) => {
|
|
|
2532
2536
|
return;
|
|
2533
2537
|
const entry = e[0];
|
|
2534
2538
|
if (entry) {
|
|
2539
|
+
console.log('signalElementMutations changes:', entry.type);
|
|
2535
2540
|
zone.run(() => elementMutationsSignal.set(entry));
|
|
2536
2541
|
}
|
|
2537
2542
|
});
|
|
@@ -2544,6 +2549,7 @@ const signalElementMutations = (el, options) => {
|
|
|
2544
2549
|
if (els.currentElement) {
|
|
2545
2550
|
observer.observe(els.currentElement, options);
|
|
2546
2551
|
}
|
|
2552
|
+
console.log('signalElementMutations observe change');
|
|
2547
2553
|
}, { allowSignalWrites: true });
|
|
2548
2554
|
destroyRef.onDestroy(() => observer.disconnect());
|
|
2549
2555
|
return elementMutationsSignal.asReadonly();
|
|
@@ -2590,6 +2596,7 @@ const signalElementScrollState = (el, options) => {
|
|
|
2590
2596
|
const { width, height } = dimensions.rect;
|
|
2591
2597
|
const canScrollHorizontally = scrollWidth > width;
|
|
2592
2598
|
const canScrollVertically = scrollHeight > height;
|
|
2599
|
+
console.log('signalElementScrollState changes:', canScrollHorizontally, canScrollVertically);
|
|
2593
2600
|
return {
|
|
2594
2601
|
canScroll: canScrollHorizontally || canScrollVertically,
|
|
2595
2602
|
canScrollHorizontally,
|
|
@@ -2637,6 +2644,7 @@ const signalElementIntersection = (el, options) => {
|
|
|
2637
2644
|
currentValues = [...currentValues, intersectionEntry];
|
|
2638
2645
|
}
|
|
2639
2646
|
}
|
|
2647
|
+
console.log('signalElementIntersection updateIntersections', currentValues.length);
|
|
2640
2648
|
zone.run(() => elementIntersectionSignal.set(currentValues));
|
|
2641
2649
|
};
|
|
2642
2650
|
const updateIntersectionObserver = (rendered, enabled, rootEl) => {
|
|
@@ -2714,11 +2722,13 @@ const signalElementIntersection = (el, options) => {
|
|
|
2714
2722
|
const rendered = isRendered();
|
|
2715
2723
|
const enabled = isEnabled();
|
|
2716
2724
|
untracked(() => updateIntersectionObserver(rendered, enabled, rootEl));
|
|
2725
|
+
console.log(`signalElementIntersection updateIntersectionObserver: ${rendered} ${enabled}`);
|
|
2717
2726
|
}, { allowSignalWrites: true });
|
|
2718
2727
|
effect(() => {
|
|
2719
2728
|
const els = elements();
|
|
2720
2729
|
const obs = observer();
|
|
2721
2730
|
untracked(() => updateObservedElements(obs, els));
|
|
2731
|
+
console.log(`signalElementIntersection updateObservedElements: ${els.currentElements.length}`);
|
|
2722
2732
|
});
|
|
2723
2733
|
destroyRef.onDestroy(() => observer()?.disconnect());
|
|
2724
2734
|
return elementIntersectionSignal.asReadonly();
|
|
@@ -2744,6 +2754,7 @@ const signalElementChildren = (el) => {
|
|
|
2744
2754
|
children.push(element);
|
|
2745
2755
|
}
|
|
2746
2756
|
}
|
|
2757
|
+
console.log(`signalElementChildren changes: ${children.length}`);
|
|
2747
2758
|
return children;
|
|
2748
2759
|
});
|
|
2749
2760
|
};
|
|
@@ -2880,6 +2891,7 @@ const maybeSignalValue = (value) => {
|
|
|
2880
2891
|
const CURSOR_DRAG_SCROLL_DEADZONE = 5;
|
|
2881
2892
|
/** The class that is added to the element when the cursor is being dragged. */
|
|
2882
2893
|
const CURSOR_DRAG_SCROLLING_CLASS$1 = 'et-cursor-drag-scroll--scrolling';
|
|
2894
|
+
const CURSOR_DRAG_INIT_CLASS = 'et-cursor-drag-scroll--init';
|
|
2883
2895
|
/** A function to apply cursor drag scroll behavior to an element. */
|
|
2884
2896
|
const useCursorDragScroll = (el, options) => {
|
|
2885
2897
|
const elements = buildElementSignal(el);
|
|
@@ -2928,13 +2940,15 @@ const useCursorDragScroll = (el, options) => {
|
|
|
2928
2940
|
renderer.removeStyle(el, 'scrollSnapType');
|
|
2929
2941
|
renderer.removeStyle(el, 'scrollBehavior');
|
|
2930
2942
|
renderer.removeClass(el, CURSOR_DRAG_SCROLLING_CLASS$1);
|
|
2943
|
+
renderer.removeClass(el, CURSOR_DRAG_INIT_CLASS);
|
|
2931
2944
|
renderer.removeStyle(document.documentElement, 'cursor');
|
|
2932
2945
|
return;
|
|
2933
2946
|
}
|
|
2934
2947
|
if (currIsInitDragging) {
|
|
2935
|
-
renderer.addClass(el,
|
|
2948
|
+
renderer.addClass(el, CURSOR_DRAG_INIT_CLASS);
|
|
2936
2949
|
}
|
|
2937
2950
|
if (currIsDragging) {
|
|
2951
|
+
renderer.addClass(el, CURSOR_DRAG_SCROLLING_CLASS$1);
|
|
2938
2952
|
renderer.setStyle(el, 'scrollSnapType', 'none');
|
|
2939
2953
|
renderer.setStyle(el, 'scrollBehavior', 'unset');
|
|
2940
2954
|
renderer.setStyle(el, 'cursor', 'grabbing');
|
|
@@ -2945,6 +2959,7 @@ const useCursorDragScroll = (el, options) => {
|
|
|
2945
2959
|
renderer.removeStyle(el, 'scrollSnapType');
|
|
2946
2960
|
renderer.removeStyle(el, 'scrollBehavior');
|
|
2947
2961
|
renderer.removeClass(el, CURSOR_DRAG_SCROLLING_CLASS$1);
|
|
2962
|
+
renderer.removeClass(el, CURSOR_DRAG_INIT_CLASS);
|
|
2948
2963
|
renderer.removeStyle(document.documentElement, 'cursor');
|
|
2949
2964
|
}
|
|
2950
2965
|
});
|