@fiddle-digital/string-tune 1.2.1-alpha.0 → 1.2.1-alpha.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.
package/dist/index.d.mts CHANGED
@@ -242,6 +242,8 @@ interface IStringModule {
242
242
  onResize(): void;
243
243
  /** Called when the layout is resize width. */
244
244
  onResizeWidth(): void;
245
+ /** Called when DOM content changes (elements added/removed, images loaded) — no viewport remeasure. */
246
+ onRebuild(): void;
245
247
  /** Called when the system rebuilds the DOM (e.g. after mutations). */
246
248
  onDOMRebuild(): void;
247
249
  /** Called when scroll position changes. */
@@ -1519,6 +1521,8 @@ declare class StringModule implements IStringModule {
1519
1521
  onResize(): void;
1520
1522
  /** Called when the layout is resized width. */
1521
1523
  onResizeWidth(): void;
1524
+ /** Called when DOM content changes (elements added/removed, images loaded) — no viewport remeasure. */
1525
+ onRebuild(): void;
1522
1526
  /** Called when scroll position changes. */
1523
1527
  onScroll(data: StringData): void;
1524
1528
  /** Called when user changed scroll direction. */
@@ -1565,6 +1569,7 @@ declare class ModuleManager {
1565
1569
  onScroll(): void;
1566
1570
  onResizeWidth(): void;
1567
1571
  onResize(): void;
1572
+ onRebuild(): void;
1568
1573
  onMouseMove(e: MouseEvent): void;
1569
1574
  onWheel(e: WheelEvent): void;
1570
1575
  onDirectionChange(): void;
@@ -2096,6 +2101,7 @@ declare class StringScrollbar extends StringModule {
2096
2101
  onInit(): void;
2097
2102
  onScroll(data: StringData): void;
2098
2103
  onResize(): void;
2104
+ onRebuild(): void;
2099
2105
  private addCustomStyles;
2100
2106
  private createScrollbar;
2101
2107
  private updateThumb;
@@ -3756,6 +3762,7 @@ declare class StringTune {
3756
3762
  private observerContainerMutation;
3757
3763
  private pendingResizeRaf;
3758
3764
  private pendingResizeForce;
3765
+ private pendingRebuildRaf;
3759
3766
  private activeScrollIntent;
3760
3767
  /** Singleton instance of StringTune */
3761
3768
  private static i;
@@ -3854,6 +3861,7 @@ declare class StringTune {
3854
3861
  set domBatcherEnabled(enabled: boolean);
3855
3862
  set intersectionObserverEnabled(enabled: boolean);
3856
3863
  private debouncedResize;
3864
+ private debouncedRebuild;
3857
3865
  private constructor();
3858
3866
  /**
3859
3867
  * Returns the singleton instance of StringTune.
@@ -3961,6 +3969,8 @@ declare class StringTune {
3961
3969
  private onDOMChanged;
3962
3970
  private observeContainerMutations;
3963
3971
  private queueResize;
3972
+ private queueRebuild;
3973
+ onRebuild(): void;
3964
3974
  /**
3965
3975
  * Handles mouse move event and dispatches it to cursor and modules.
3966
3976
  * @param e Native mouse move event.
@@ -4011,7 +4021,7 @@ declare class StringTune {
4011
4021
  * Ignores height-only changes on mobile to prevent layout jumps.
4012
4022
  * Rebuilds layout and triggers module resize if size really changed.
4013
4023
  */
4014
- onResize(force?: boolean): void;
4024
+ onResize(force?: boolean, source?: string): void;
4015
4025
  invalidateCenter(id: string): void;
4016
4026
  scrollTo(position: number): void;
4017
4027
  scrollTo(selector: string): void;
package/dist/index.d.ts CHANGED
@@ -242,6 +242,8 @@ interface IStringModule {
242
242
  onResize(): void;
243
243
  /** Called when the layout is resize width. */
244
244
  onResizeWidth(): void;
245
+ /** Called when DOM content changes (elements added/removed, images loaded) — no viewport remeasure. */
246
+ onRebuild(): void;
245
247
  /** Called when the system rebuilds the DOM (e.g. after mutations). */
246
248
  onDOMRebuild(): void;
247
249
  /** Called when scroll position changes. */
@@ -1519,6 +1521,8 @@ declare class StringModule implements IStringModule {
1519
1521
  onResize(): void;
1520
1522
  /** Called when the layout is resized width. */
1521
1523
  onResizeWidth(): void;
1524
+ /** Called when DOM content changes (elements added/removed, images loaded) — no viewport remeasure. */
1525
+ onRebuild(): void;
1522
1526
  /** Called when scroll position changes. */
1523
1527
  onScroll(data: StringData): void;
1524
1528
  /** Called when user changed scroll direction. */
@@ -1565,6 +1569,7 @@ declare class ModuleManager {
1565
1569
  onScroll(): void;
1566
1570
  onResizeWidth(): void;
1567
1571
  onResize(): void;
1572
+ onRebuild(): void;
1568
1573
  onMouseMove(e: MouseEvent): void;
1569
1574
  onWheel(e: WheelEvent): void;
1570
1575
  onDirectionChange(): void;
@@ -2096,6 +2101,7 @@ declare class StringScrollbar extends StringModule {
2096
2101
  onInit(): void;
2097
2102
  onScroll(data: StringData): void;
2098
2103
  onResize(): void;
2104
+ onRebuild(): void;
2099
2105
  private addCustomStyles;
2100
2106
  private createScrollbar;
2101
2107
  private updateThumb;
@@ -3756,6 +3762,7 @@ declare class StringTune {
3756
3762
  private observerContainerMutation;
3757
3763
  private pendingResizeRaf;
3758
3764
  private pendingResizeForce;
3765
+ private pendingRebuildRaf;
3759
3766
  private activeScrollIntent;
3760
3767
  /** Singleton instance of StringTune */
3761
3768
  private static i;
@@ -3854,6 +3861,7 @@ declare class StringTune {
3854
3861
  set domBatcherEnabled(enabled: boolean);
3855
3862
  set intersectionObserverEnabled(enabled: boolean);
3856
3863
  private debouncedResize;
3864
+ private debouncedRebuild;
3857
3865
  private constructor();
3858
3866
  /**
3859
3867
  * Returns the singleton instance of StringTune.
@@ -3961,6 +3969,8 @@ declare class StringTune {
3961
3969
  private onDOMChanged;
3962
3970
  private observeContainerMutations;
3963
3971
  private queueResize;
3972
+ private queueRebuild;
3973
+ onRebuild(): void;
3964
3974
  /**
3965
3975
  * Handles mouse move event and dispatches it to cursor and modules.
3966
3976
  * @param e Native mouse move event.
@@ -4011,7 +4021,7 @@ declare class StringTune {
4011
4021
  * Ignores height-only changes on mobile to prevent layout jumps.
4012
4022
  * Rebuilds layout and triggers module resize if size really changed.
4013
4023
  */
4014
- onResize(force?: boolean): void;
4024
+ onResize(force?: boolean, source?: string): void;
4015
4025
  invalidateCenter(id: string): void;
4016
4026
  scrollTo(position: number): void;
4017
4027
  scrollTo(selector: string): void;