@octanejs/base-ui 0.1.11 → 0.1.15

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/src/slider.ts CHANGED
@@ -12,6 +12,8 @@
12
12
  // React hydration-warning no-op). With the default `center` alignment, thumb/indicator positions
13
13
  // are pure math (`valueToPercent`), so mount and keyboard interaction render identically without
14
14
  // layout (pointer drag needs real layout — inert in jsdom, so not differential-covered).
15
+ // Edge-aligned visibility uses octane's real server/hydration snapshot; the
16
+ // React-specific pre-hydration script is not needed for that snapshot contract.
15
17
  import {
16
18
  createContext,
17
19
  createElement,
@@ -1016,7 +1018,7 @@ function SliderIndicator(componentProps: any): any {
1016
1018
  const { render, className, style: styleProp, ref, ...elementProps } = componentProps;
1017
1019
  const { indicatorPosition, inset, max, min, orientation, renderBeforeHydration, state, values } =
1018
1020
  useSliderRootContext();
1019
- const isHydrating = useIsHydrating();
1021
+ const isHydrating = useIsHydrating(subSlot(slot, 'hydrating'));
1020
1022
  const vertical = orientation === 'vertical';
1021
1023
  const range = values.length > 1;
1022
1024
 
@@ -1180,7 +1182,7 @@ function SliderThumb(componentProps: any): any {
1180
1182
  undefined,
1181
1183
  subSlot(slot, 'posPct'),
1182
1184
  );
1183
- const isHydrating = useIsHydrating();
1185
+ const isHydrating = useIsHydrating(subSlot(slot, 'hydrating'));
1184
1186
 
1185
1187
  const safeLastUsedThumbIndex =
1186
1188
  lastUsedThumbIndex >= 0 && lastUsedThumbIndex < sliderValues.length ? lastUsedThumbIndex : -1;