@symbiote-native/slider 5.0.3 → 5.2.0

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.
Files changed (79) hide show
  1. package/README.md +24 -7
  2. package/build/angular/slider/index.android.js +9 -1
  3. package/build/angular/slider/index.ios.js +10 -2
  4. package/build/angular/slider/shared.d.ts +6 -1
  5. package/build/angular/slider/shared.js +23 -1
  6. package/build/core/index.d.ts +2 -2
  7. package/build/core/render-slider.js +5 -1
  8. package/build/core/render-steps-indicator.js +13 -4
  9. package/build/core/slider-props.js +4 -6
  10. package/build/react/slider/index.ios.js +1 -1
  11. package/build/react/slider/shared.js +11 -4
  12. package/build/register/index.js +5 -2
  13. package/build/solid/index.d.ts +4 -0
  14. package/build/solid/index.js +8 -0
  15. package/build/solid/slider/index.android.d.ts +2 -0
  16. package/build/solid/slider/index.android.js +10 -0
  17. package/build/solid/slider/index.d.ts +1 -0
  18. package/build/solid/slider/index.ios.d.ts +2 -0
  19. package/build/solid/slider/index.ios.js +11 -0
  20. package/build/solid/slider/index.js +4 -0
  21. package/build/solid/slider/shared.d.ts +12 -0
  22. package/build/solid/slider/shared.js +296 -0
  23. package/build/svelte/index.d.ts +3 -0
  24. package/build/svelte/index.js +9 -0
  25. package/build/svelte/slider/index.svelte +326 -0
  26. package/build/svelte/slider/index.svelte.d.ts +5 -0
  27. package/build/svelte/slider/slider-platform.android.d.ts +2 -0
  28. package/build/svelte/slider/slider-platform.android.js +11 -0
  29. package/build/svelte/slider/slider-platform.d.ts +1 -0
  30. package/build/svelte/slider/slider-platform.ios.d.ts +2 -0
  31. package/build/svelte/slider/slider-platform.ios.js +12 -0
  32. package/build/svelte/slider/slider-platform.js +5 -0
  33. package/build/svelte/slider/slider-props.d.ts +7 -0
  34. package/build/svelte/slider/slider-props.js +1 -0
  35. package/build/vue/slider/index.ios.js +1 -1
  36. package/build/vue/slider/shared.js +11 -5
  37. package/build-ngc/angular/slider/index.android.js +18 -4
  38. package/build-ngc/angular/slider/index.android.js.map +1 -1
  39. package/build-ngc/angular/slider/index.ios.js +19 -5
  40. package/build-ngc/angular/slider/index.ios.js.map +1 -1
  41. package/build-ngc/angular/slider/shared.d.ts +6 -1
  42. package/build-ngc/angular/slider/shared.js +26 -4
  43. package/build-ngc/angular/slider/shared.js.map +1 -1
  44. package/build-ngc/core/index.d.ts +2 -2
  45. package/build-ngc/core/index.js.map +1 -1
  46. package/build-ngc/core/render-slider.js +5 -1
  47. package/build-ngc/core/render-slider.js.map +1 -1
  48. package/build-ngc/core/render-steps-indicator.js +13 -4
  49. package/build-ngc/core/render-steps-indicator.js.map +1 -1
  50. package/build-ngc/core/slider-props.js +4 -6
  51. package/build-ngc/core/slider-props.js.map +1 -1
  52. package/build-ngc/core/slider-state.js.map +1 -1
  53. package/build-ngc/register/index.js +5 -2
  54. package/build-ngc/register/index.js.map +1 -1
  55. package/package.json +48 -15
  56. package/src/angular/slider/index.android.ts +9 -1
  57. package/src/angular/slider/index.ios.ts +13 -2
  58. package/src/angular/slider/shared.ts +55 -10
  59. package/src/core/index.ts +9 -2
  60. package/src/core/render-slider.ts +24 -6
  61. package/src/core/render-steps-indicator.ts +38 -10
  62. package/src/core/slider-props.ts +17 -17
  63. package/src/core/slider-state.ts +16 -5
  64. package/src/react/slider/index.ios.ts +4 -1
  65. package/src/react/slider/shared.ts +66 -15
  66. package/src/register/index.ts +9 -2
  67. package/src/solid/index.ts +12 -0
  68. package/src/solid/slider/index.android.ts +15 -0
  69. package/src/solid/slider/index.ios.ts +19 -0
  70. package/src/solid/slider/index.ts +5 -0
  71. package/src/solid/slider/shared.ts +468 -0
  72. package/src/svelte/index.ts +12 -0
  73. package/src/svelte/slider/index.svelte +326 -0
  74. package/src/svelte/slider/slider-platform.android.ts +14 -0
  75. package/src/svelte/slider/slider-platform.ios.ts +18 -0
  76. package/src/svelte/slider/slider-platform.ts +5 -0
  77. package/src/svelte/slider/slider-props.ts +17 -0
  78. package/src/vue/slider/index.ios.ts +4 -1
  79. package/src/vue/slider/shared.ts +72 -19
package/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # @symbiote-native/slider
2
2
 
3
3
  A wrapper package for [SymbioteNative](../../README.md) that makes the third-party native
4
- `@react-native-community/slider` view usable from **every** adapter — React, Vue, and Angular —
5
- not just React. The library's default export is a React component (it calls hooks off the React
6
- dispatcher), so a non-React adapter renders it with a null dispatcher and it throws. This package
4
+ `@react-native-community/slider` view usable from **every** adapter — React, Vue, Svelte, Solid,
5
+ and Angular — not just React. The library's default export is a React component (it calls hooks
6
+ off the React dispatcher), so a non-React adapter renders it with a null dispatcher and it throws.
7
+ This package
7
8
  reaches the native `RNCSlider` view directly through the engine's `createNode`-by-ViewConfig path
8
9
  instead of importing the library's React component — the same mechanism SymbioteNative uses for its
9
10
  own primitives.
@@ -29,14 +30,16 @@ src/register.ts side-effect import of RNCSlider's codegen spec — registers its
29
30
  (never the library's React Slider.tsx)
30
31
  src/react/ @symbiote-native/slider/react — forwardRef FC + descriptorToReact
31
32
  src/vue/ @symbiote-native/slider/vue — defineComponent + descriptorToVue
33
+ src/svelte/ @symbiote-native/slider/svelte — .svelte component + the DOM-shim renderer
34
+ src/solid/ @symbiote-native/slider/solid — signals + descriptorToSolid
32
35
  src/angular/ @symbiote-native/slider/angular — Angular component + descriptorToAngular
33
36
  ```
34
37
 
35
38
  Each adapter entry imports `../register` first (so the ViewConfig is registered before the
36
39
  component ever mounts), then exposes a platform-split `Slider`. The core is written once; every
37
40
  adapter inherits the same folding logic and the same `ISliderProps` surface (extended per-adapter
38
- only where a field carries a framework element — the custom `StepMarker` is a React render prop
39
- but a Vue scoped slot).
41
+ only where a field carries a framework element — the custom `StepMarker` is a React render prop, a
42
+ Vue scoped slot, a Svelte `Snippet`, and a Solid render prop taking an **accessor**).
40
43
 
41
44
  ## Packaging — one dependency, not two
42
45
 
@@ -64,7 +67,7 @@ import { Slider } from '@symbiote-native/slider/react';
64
67
  minimumTrackTintColor="#7fb5ff"
65
68
  maximumTrackTintColor="#334155"
66
69
  thumbTintColor="#ffffff"
67
- />
70
+ />;
68
71
  ```
69
72
 
70
73
  ```vue
@@ -81,6 +84,20 @@ import { Slider } from '@symbiote-native/slider/vue';
81
84
  </template>
82
85
  ```
83
86
 
87
+ ```tsx
88
+ // Solid — the marker props arrive as an ACCESSOR, so only the leaf reading them re-runs
89
+ import { Slider } from '@symbiote-native/slider/solid';
90
+
91
+ <Slider
92
+ value={volume()}
93
+ onValueChange={setVolume}
94
+ step={0.25}
95
+ StepMarker={marker => (
96
+ <symbiote-view style={{ opacity: marker().stepMarked ? 1 : 0.3 }} />
97
+ )}
98
+ />;
99
+ ```
100
+
84
101
  ```ts
85
102
  // Angular — examples/angular/App.ts
86
103
  import { Slider } from '@symbiote-native/slider/angular';
@@ -93,6 +110,6 @@ processors from its own ViewConfig at runtime, so there is nothing to pre-resolv
93
110
  ## Test it
94
111
 
95
112
  Headless component tests live next to each adapter entry
96
- (`src/{react,vue,angular}/slider/slider.test.{ts,tsx}`) and inject a fake ViewConfig via
113
+ (`src/{react,vue,svelte,solid,angular}/slider/slider*.test.{ts,tsx}`) and inject a fake ViewConfig via
97
114
  `setNativeViewConfigSource`, so they run without a real Fabric host. Native rendering is verified
98
115
  on-device (see the parent [README](../../README.md) for the project's testing model).
@@ -34,7 +34,8 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
34
34
  }
35
35
  return useValue ? value : void 0;
36
36
  };
37
- import { ChangeDetectionStrategy, Component } from '@angular/core';
37
+ import { ChangeDetectionStrategy, Component, forwardRef } from '@angular/core';
38
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
38
39
  import { DescriptorOutlet } from '@symbiote-native/angular';
39
40
  import { SliderBase } from './shared.js';
40
41
  import { SLIDER_STEP_RESOLUTION_ANDROID } from '../../core/index.js';
@@ -45,6 +46,13 @@ let Slider = (() => {
45
46
  standalone: true,
46
47
  imports: [DescriptorOutlet],
47
48
  changeDetection: ChangeDetectionStrategy.OnPush,
49
+ providers: [
50
+ {
51
+ provide: NG_VALUE_ACCESSOR,
52
+ useExisting: forwardRef(() => Slider),
53
+ multi: true,
54
+ },
55
+ ],
48
56
  template: `<symbiote-descriptor-outlet [node]="descriptor" />`,
49
57
  })];
50
58
  let _classDescriptor;
@@ -35,10 +35,11 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
35
35
  }
36
36
  return useValue ? value : void 0;
37
37
  };
38
- import { ChangeDetectionStrategy, Component } from '@angular/core';
38
+ import { ChangeDetectionStrategy, Component, forwardRef } from '@angular/core';
39
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
39
40
  import { DescriptorOutlet } from '@symbiote-native/angular';
40
41
  import { SliderBase } from './shared.js';
41
- import { SLIDER_IOS_DEFAULT_HEIGHT, SLIDER_STEP_RESOLUTION_IOS } from '../../core/index.js';
42
+ import { SLIDER_IOS_DEFAULT_HEIGHT, SLIDER_STEP_RESOLUTION_IOS, } from '../../core/index.js';
42
43
  const IOS_STEPS_CONTAINER_TOP = 10;
43
44
  let Slider = (() => {
44
45
  let _classDecorators = [Component({
@@ -46,6 +47,13 @@ let Slider = (() => {
46
47
  standalone: true,
47
48
  imports: [DescriptorOutlet],
48
49
  changeDetection: ChangeDetectionStrategy.OnPush,
50
+ providers: [
51
+ {
52
+ provide: NG_VALUE_ACCESSOR,
53
+ useExisting: forwardRef(() => Slider),
54
+ multi: true,
55
+ },
56
+ ],
49
57
  template: `<symbiote-descriptor-outlet [node]="descriptor" />`,
50
58
  })];
51
59
  let _classDescriptor;
@@ -1,9 +1,10 @@
1
1
  import { EventEmitter, type OnChanges } from '@angular/core';
2
+ import type { ControlValueAccessor } from '@angular/forms';
2
3
  import type { IAccessibilityProps, IAccessibilityStateValue, IAriaProps, IDescriptor } from '@symbiote-native/components';
3
4
  import { type ISymbioteEvent } from '@symbiote-native/engine';
4
5
  import { type ISliderPlatform, type ISliderProps as ISliderBaseProps } from '../../core';
5
6
  export type ISliderProps = Omit<ISliderBaseProps, 'onValueChange' | 'onSlidingStart' | 'onSlidingComplete' | 'onAccessibilityAction'>;
6
- export declare abstract class SliderBase implements ISliderProps, OnChanges {
7
+ export declare abstract class SliderBase implements ISliderProps, OnChanges, ControlValueAccessor {
7
8
  value?: number;
8
9
  minimumValue?: number;
9
10
  maximumValue?: number;
@@ -79,6 +80,10 @@ export declare abstract class SliderBase implements ISliderProps, OnChanges {
79
80
  protected readonly handleSlidingComplete: (event: ISymbioteEvent) => void;
80
81
  protected readonly handleAccessibilityAction: (event: ISymbioteEvent) => void;
81
82
  protected readonly handleLayout: (event: ISymbioteEvent) => void;
83
+ writeValue(value: number | null): void;
84
+ registerOnChange(fn: (value: number) => void): void;
85
+ registerOnTouched(fn: () => void): void;
86
+ setDisabledState(isDisabled: boolean): void;
82
87
  private inputProps;
83
88
  get descriptor(): IDescriptor;
84
89
  }
@@ -521,6 +521,25 @@ let SliderBase = (() => {
521
521
  this.changeDetector.markForCheck();
522
522
  }
523
523
  };
524
+ // ControlValueAccessor — `value`/`disabled` are plain @Input() fields feeding the `descriptor`
525
+ // getter (re-evaluated on every OnPush check, no fold/commit dance), so writeValue()/
526
+ // setDisabledState() can set them straight, no TextInput-style stale-safe seam needed.
527
+ writeValue(value) {
528
+ this.value = value ?? undefined;
529
+ this.changeDetector.markForCheck();
530
+ }
531
+ registerOnChange(fn) {
532
+ this.valueChange.subscribe(fn);
533
+ }
534
+ registerOnTouched(fn) {
535
+ // Slider has no blur concept (it's a drag control, not a text field) — the thumb release is
536
+ // the closest "the user is done interacting" signal.
537
+ this.slidingComplete.subscribe(() => fn());
538
+ }
539
+ setDisabledState(isDisabled) {
540
+ this.disabled = isDisabled;
541
+ this.changeDetector.markForCheck();
542
+ }
524
543
  inputProps() {
525
544
  return {
526
545
  value: this.value,
@@ -641,7 +660,10 @@ let SliderBase = (() => {
641
660
  inverted,
642
661
  platform: this.platform,
643
662
  });
644
- return renderSlider(view, this.platform, { steps, onLayout: this.handleLayout });
663
+ return renderSlider(view, this.platform, {
664
+ steps,
665
+ onLayout: this.handleLayout,
666
+ });
645
667
  }
646
668
  };
647
669
  return SliderBase = _classThis;
@@ -1,7 +1,7 @@
1
1
  export * from './constants';
2
2
  export { sanitizeSliderValue, resolveSliderDisabled, resolveSliderAccessibilityState, resolveSliderLowerLimit, resolveSliderUpperLimit, valueFromSliderEvent, computeStepOptions, shouldRenderStepsIndicator, resolveThumbTintColor, shouldPassNativeThumbImage, isInvalidLimitConfig, } from './slider-state';
3
3
  export type { ISliderAccessibilityState } from './slider-state';
4
- export type { ISliderProps, ISliderPlatform, ISliderViewProps } from './slider-props';
4
+ export type { ISliderProps, ISliderPlatform, ISliderViewProps, } from './slider-props';
5
5
  export { renderSlider, renderSliderNative, resolveSliderWrapperStyle, resolveSliderNativeStyle, } from './render-slider';
6
6
  export { renderStepsIndicator, resolveStepsContainerStyle, stepNumberFontSize, orderStepOptions, STEP_INDICATOR_ELEMENT_STYLE, TRACK_MARK_CONTAINER_STYLE, THUMB_IMAGE_CONTAINER_STYLE, THUMB_IMAGE_STYLE, STEP_NUMBER_CONTAINER_STYLE, } from './render-steps-indicator';
7
- export type { IStepsIndicatorParams, IStepMarkerProps } from './render-steps-indicator';
7
+ export type { IStepsIndicatorParams, IStepMarkerProps, } from './render-steps-indicator';
@@ -11,7 +11,11 @@ import { RNC_SLIDER_VIEW_NAME } from './constants.js';
11
11
  // The native slider stretches to the measured wrapper width when one is given (the step indicator
12
12
  // and thumb then share one coordinate space); without it the slider sizes naturally.
13
13
  export function resolveSliderNativeStyle(width, platform) {
14
- const base = { zIndex: 1, alignContent: 'center', alignItems: 'center' };
14
+ const base = {
15
+ zIndex: 1,
16
+ alignContent: 'center',
17
+ alignItems: 'center',
18
+ };
15
19
  const sized = width === undefined ? base : [base, { width }];
16
20
  return [platform.defaultStyle, sized];
17
21
  }
@@ -64,16 +64,25 @@ export function orderStepOptions(options, inverted) {
64
64
  function renderStepCell(value, displayIndex, params, fontSize) {
65
65
  const trackMarkChildren = [];
66
66
  if (params.thumbImage !== undefined && value === params.currentValue) {
67
- trackMarkChildren.push(el('symbiote-view', { style: THUMB_IMAGE_CONTAINER_STYLE, testID: 'sliderTrackMark-thumbImage' }, [el('symbiote-image', { source: params.thumbImage, style: THUMB_IMAGE_STYLE })]));
67
+ trackMarkChildren.push(el('symbiote-view', {
68
+ style: THUMB_IMAGE_CONTAINER_STYLE,
69
+ testID: 'sliderTrackMark-thumbImage',
70
+ }, [
71
+ el('symbiote-image', {
72
+ source: params.thumbImage,
73
+ style: THUMB_IMAGE_STYLE,
74
+ }),
75
+ ]));
68
76
  }
69
77
  const cellChildren = [
70
78
  el('symbiote-view', { style: TRACK_MARK_CONTAINER_STYLE }, trackMarkChildren),
71
79
  ];
72
80
  if (params.renderStepNumber === true) {
73
81
  cellChildren.push(el('symbiote-view', { style: STEP_NUMBER_CONTAINER_STYLE }, [
74
- txt({ testID: `${displayIndex}th-step`, style: { fontSize } }, [
75
- String(value),
76
- ]),
82
+ txt({
83
+ testID: `${displayIndex}th-step`,
84
+ style: { fontSize },
85
+ }, [String(value)]),
77
86
  ]));
78
87
  }
79
88
  return el('symbiote-view', { style: STEP_INDICATOR_ELEMENT_STYLE }, cellChildren);
@@ -1,7 +1,5 @@
1
- // Slider prop types. Every field of the slider's public surface is framework-agnostic EXCEPT the
2
- // custom `StepMarker`, which is a render component returning a framework element (React FC vs Vue
3
- // slot) — since that element type is framework-specific, it can't live in a shared type, so it
4
- // stays in each adapter's own flavored prop type. ISliderProps here is the shared agnostic base
5
- // every adapter re-exports and extends; ISliderViewProps is the pre-resolved input the render fn
6
- // paints.
1
+ // Slider prop types. ISliderProps is the shared agnostic base every adapter re-exports and
2
+ // extends; ISliderViewProps is the pre-resolved input the render fn paints. The custom
3
+ // `StepMarker` field is per-adapter (a framework element return type can't live here) - see
4
+ // CLAUDE.md's <prop_types_split_agnostic_vs_per_adapter>.
7
5
  export {};
@@ -2,7 +2,7 @@
2
2
  // default), lays out implicit steps at 1000-point resolution, and nudges the step row down 10pt.
3
3
  // Also the base (./index re-exports it) for headless. Mirrors the library's iOS branches.
4
4
  import { createSlider } from './shared.js';
5
- import { SLIDER_IOS_DEFAULT_HEIGHT, SLIDER_STEP_RESOLUTION_IOS } from '../../core/index.js';
5
+ import { SLIDER_IOS_DEFAULT_HEIGHT, SLIDER_STEP_RESOLUTION_IOS, } from '../../core/index.js';
6
6
  const IOS_STEPS_CONTAINER_TOP = 10;
7
7
  export const Slider = createSlider({
8
8
  defaultStyle: { height: SLIDER_IOS_DEFAULT_HEIGHT },
@@ -8,10 +8,10 @@
8
8
  // it). This is the React twin of the Vue wrapper; both drive the engine, NEITHER imports the
9
9
  // library's React Slider component — that component internally calls React hooks off the React
10
10
  // dispatcher, so a non-React adapter rendering it directly would crash on a null dispatcher.
11
- import { createElement, forwardRef, useCallback, useEffect, useState } from 'react';
11
+ import { createElement, forwardRef, useCallback, useEffect, useState, } from 'react';
12
12
  import { descriptorToReact, Image } from '@symbiote-native/react';
13
13
  import { resolveAccessibilityProps } from '@symbiote-native/components';
14
- import { dlog } from '@symbiote-native/engine';
14
+ import { dlog, } from '@symbiote-native/engine';
15
15
  import { sanitizeSliderValue, resolveSliderDisabled, resolveSliderAccessibilityState, resolveSliderLowerLimit, resolveSliderUpperLimit, valueFromSliderEvent, shouldRenderStepsIndicator, resolveThumbTintColor, shouldPassNativeThumbImage, isInvalidLimitConfig, computeStepOptions, orderStepOptions, stepNumberFontSize, renderSlider, renderSliderNative, resolveStepsContainerStyle, renderStepsIndicator, STEP_INDICATOR_ELEMENT_STYLE, TRACK_MARK_CONTAINER_STYLE, THUMB_IMAGE_CONTAINER_STYLE, THUMB_IMAGE_STYLE, STEP_NUMBER_CONTAINER_STYLE, SLIDER_DEFAULT_MINIMUM_VALUE, SLIDER_DEFAULT_MAXIMUM_VALUE, SLIDER_DEFAULT_STEP, SLIDER_ON_CHANGE, SLIDER_ON_VALUE_CHANGE, SLIDER_ON_SLIDING_START, SLIDER_ON_SLIDING_COMPLETE, SLIDER_ON_ACCESSIBILITY_ACTION, } from '../../core/index.js';
16
16
  function isRecord(value) {
17
17
  return typeof value === 'object' && value !== null && !Array.isArray(value);
@@ -116,7 +116,11 @@ export function createSlider(platform) {
116
116
  platform,
117
117
  StepMarker,
118
118
  });
119
- return createElement('symbiote-view', { style: resolveStepsWrapperStyle(style, platform), onLayout: handleLayout, className }, overlay, descriptorToReact(renderSliderNative(view, platform)));
119
+ return createElement('symbiote-view', {
120
+ style: resolveStepsWrapperStyle(style, platform),
121
+ onLayout: handleLayout,
122
+ className,
123
+ }, overlay, descriptorToReact(renderSliderNative(view, platform)));
120
124
  }
121
125
  const steps = renderStepsIndicator({
122
126
  options,
@@ -158,7 +162,10 @@ function renderCustomStepsOverlay(params) {
158
162
  key: 'thumb',
159
163
  style: THUMB_IMAGE_CONTAINER_STYLE,
160
164
  testID: 'sliderTrackMark-thumbImage',
161
- }, createElement(Image, { source: params.thumbImage, style: THUMB_IMAGE_STYLE })));
165
+ }, createElement(Image, {
166
+ source: params.thumbImage,
167
+ style: THUMB_IMAGE_STYLE,
168
+ })));
162
169
  }
163
170
  const cellChildren = [
164
171
  createElement('symbiote-view', { key: 'track', style: TRACK_MARK_CONTAINER_STYLE }, ...trackChildren),
@@ -6,7 +6,7 @@
6
6
  // hooks, so it is framework-agnostic and shared by every adapter entry (vue / react). Each adapter
7
7
  // barrel imports it; the component modules and their headless tests stay free of the spec.
8
8
  import '@react-native-community/slider/dist/RNCSliderNativeComponent';
9
- import { processColor, registerComponent } from '@symbiote-native/engine';
9
+ import { processColor, registerComponent, } from '@symbiote-native/engine';
10
10
  import { RNC_SLIDER_VIEW_NAME, SLIDER_ON_CHANGE, SLIDER_ON_VALUE_CHANGE, SLIDER_ON_SLIDING_START, SLIDER_ON_SLIDING_COMPLETE, SLIDER_ON_ACCESSIBILITY_ACTION, } from '../core/index.js';
11
11
  function listenerName(prop) {
12
12
  return prop.charAt(2).toLowerCase() + prop.slice(3);
@@ -22,7 +22,10 @@ function processSliderColor(value) {
22
22
  registerComponent(RNC_SLIDER_VIEW_NAME, {
23
23
  events: [
24
24
  { raw: 'topChange', listener: listenerName(SLIDER_ON_CHANGE) },
25
- { raw: 'topRNCSliderValueChange', listener: listenerName(SLIDER_ON_VALUE_CHANGE) },
25
+ {
26
+ raw: 'topRNCSliderValueChange',
27
+ listener: listenerName(SLIDER_ON_VALUE_CHANGE),
28
+ },
26
29
  {
27
30
  raw: 'topRNCSliderSlidingStart',
28
31
  listener: listenerName(SLIDER_ON_SLIDING_START),
@@ -0,0 +1,4 @@
1
+ import '../register';
2
+ export { Slider } from './slider';
3
+ export type { ISliderProps, ISliderStepMarker } from './slider';
4
+ export type { IStepMarkerProps } from '../core';
@@ -0,0 +1,8 @@
1
+ // @symbiote-native/slider/solid: the Solid wrapper over the @react-native-community/slider native
2
+ // view. The bare import below is FIRST and is a side effect, not a re-export: it registers the
3
+ // native view's ViewConfig (the codegen spec, never the library's React component) before any
4
+ // Slider can mount. Metro's production-only `inlineRequires` moves a require down to the first
5
+ // place its binding is USED and compiles a barrel's re-export into a lazy getter, so a registration
6
+ // reached through one silently never runs in RELEASE builds only. Do not restructure it.
7
+ import '../register';
8
+ export { Slider } from './slider';
@@ -0,0 +1,2 @@
1
+ export type { ISliderProps, ISliderStepMarker } from './shared';
2
+ export declare const Slider: (props: import("./shared").ISliderProps) => import("@symbiote-native/solid/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ // Slider on Android: the native view sizes itself (no default height), lays out implicit steps at
2
+ // 128-point resolution, and keeps the step row at the top. Mirrors the library's Android branches.
3
+ import { createSlider } from './shared.js';
4
+ import { SLIDER_STEP_RESOLUTION_ANDROID } from '../../core/index.js';
5
+ const ANDROID_STEPS_CONTAINER_TOP = 0;
6
+ export const Slider = createSlider({
7
+ defaultStyle: {},
8
+ stepResolution: SLIDER_STEP_RESOLUTION_ANDROID,
9
+ stepsContainerTop: ANDROID_STEPS_CONTAINER_TOP,
10
+ });
@@ -0,0 +1 @@
1
+ export * from './index.ios';
@@ -0,0 +1,2 @@
1
+ export type { ISliderProps, ISliderStepMarker } from './shared';
2
+ export declare const Slider: (props: import("./shared").ISliderProps) => import("@symbiote-native/solid/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ // Slider on iOS: the native view has an intrinsic 40pt height (the wrapper applies it as the
2
+ // default), lays out implicit steps at 1000-point resolution, and nudges the step row down 10pt.
3
+ // Also the base (./index re-exports it) for headless. Mirrors the library's iOS branches.
4
+ import { createSlider } from './shared.js';
5
+ import { SLIDER_IOS_DEFAULT_HEIGHT, SLIDER_STEP_RESOLUTION_IOS, } from '../../core/index.js';
6
+ const IOS_STEPS_CONTAINER_TOP = 10;
7
+ export const Slider = createSlider({
8
+ defaultStyle: { height: SLIDER_IOS_DEFAULT_HEIGHT },
9
+ stepResolution: SLIDER_STEP_RESOLUTION_IOS,
10
+ stepsContainerTop: IOS_STEPS_CONTAINER_TOP,
11
+ });
@@ -0,0 +1,4 @@
1
+ // Base / default Slider: re-exports the iOS build. Metro overrides this with index.ios.ts /
2
+ // index.android.ts on a real host; under vitest / tsc the resolution lands here. Filename is the
3
+ // selector, no Platform.OS read — the same convention adapters/solid's own Switch follows.
4
+ export * from './index.ios.js';
@@ -0,0 +1,12 @@
1
+ import type { Accessor, Ref } from 'solid-js';
2
+ import { type IHostInstance } from '@symbiote-native/solid';
3
+ import type { JSX } from '@symbiote-native/solid/jsx-runtime';
4
+ import { type IClassNameValue } from '@symbiote-native/engine';
5
+ import { type ISliderPlatform, type ISliderProps as ISliderBaseProps, type IStepMarkerProps } from '../../core';
6
+ export type ISliderStepMarker = (marker: Accessor<IStepMarkerProps>) => JSX.Element;
7
+ export type ISliderProps = ISliderBaseProps & {
8
+ class?: IClassNameValue;
9
+ StepMarker?: ISliderStepMarker;
10
+ ref?: Ref<IHostInstance>;
11
+ };
12
+ export declare function createSlider(platform: ISliderPlatform): (props: ISliderProps) => JSX.Element;