@symbiote-native/slider 5.0.1 → 5.0.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.
Files changed (45) hide show
  1. package/build/angular/index.d.ts +3 -0
  2. package/build/angular/index.js +2 -0
  3. package/build/angular/slider/index.android.d.ts +9 -0
  4. package/build/angular/slider/index.android.js +71 -0
  5. package/build/angular/slider/index.d.ts +2 -0
  6. package/build/angular/slider/index.ios.d.ts +11 -0
  7. package/build/angular/slider/index.ios.js +72 -0
  8. package/build/angular/slider/index.js +3 -0
  9. package/build/angular/slider/shared.d.ts +84 -0
  10. package/build/angular/slider/shared.js +649 -0
  11. package/build/core/constants.d.ts +20 -0
  12. package/build/core/constants.js +40 -0
  13. package/build/core/index.d.ts +7 -0
  14. package/build/core/index.js +10 -0
  15. package/build/core/render-slider.d.ts +11 -0
  16. package/build/core/render-slider.js +66 -0
  17. package/build/core/render-steps-indicator.d.ts +28 -0
  18. package/build/core/render-steps-indicator.js +91 -0
  19. package/build/core/slider-props.d.ts +52 -0
  20. package/build/core/slider-props.js +7 -0
  21. package/build/core/slider-state.d.ts +15 -0
  22. package/build/core/slider-state.js +73 -0
  23. package/build/react/index.d.ts +4 -0
  24. package/build/react/index.js +7 -0
  25. package/build/react/slider/index.android.d.ts +1 -0
  26. package/build/react/slider/index.android.js +10 -0
  27. package/build/react/slider/index.d.ts +1 -0
  28. package/build/react/slider/index.ios.d.ts +1 -0
  29. package/build/react/slider/index.ios.js +11 -0
  30. package/build/react/slider/index.js +3 -0
  31. package/build/react/slider/shared.d.ts +10 -0
  32. package/build/react/slider/shared.js +176 -0
  33. package/build/register/index.d.ts +1 -0
  34. package/build/register/index.js +47 -0
  35. package/build/vue/index.d.ts +3 -0
  36. package/build/vue/index.js +7 -0
  37. package/build/vue/slider/index.android.d.ts +18 -0
  38. package/build/vue/slider/index.android.js +10 -0
  39. package/build/vue/slider/index.d.ts +2 -0
  40. package/build/vue/slider/index.ios.d.ts +18 -0
  41. package/build/vue/slider/index.ios.js +11 -0
  42. package/build/vue/slider/index.js +3 -0
  43. package/build/vue/slider/shared.d.ts +26 -0
  44. package/build/vue/slider/shared.js +253 -0
  45. package/package.json +5 -5
@@ -0,0 +1,3 @@
1
+ import '../register';
2
+ export { Slider } from './slider';
3
+ export type { ISliderProps } from './slider/shared';
@@ -0,0 +1,2 @@
1
+ import '../register';
2
+ export { Slider } from './slider';
@@ -0,0 +1,9 @@
1
+ import { SliderBase } from './shared';
2
+ export type { ISliderProps } from './shared';
3
+ export declare class Slider extends SliderBase {
4
+ protected readonly platform: {
5
+ defaultStyle: {};
6
+ stepResolution: number;
7
+ stepsContainerTop: number;
8
+ };
9
+ }
@@ -0,0 +1,71 @@
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
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
4
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
5
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
6
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
7
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
8
+ var _, done = false;
9
+ for (var i = decorators.length - 1; i >= 0; i--) {
10
+ var context = {};
11
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
12
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
13
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
14
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
15
+ if (kind === "accessor") {
16
+ if (result === void 0) continue;
17
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
18
+ if (_ = accept(result.get)) descriptor.get = _;
19
+ if (_ = accept(result.set)) descriptor.set = _;
20
+ if (_ = accept(result.init)) initializers.unshift(_);
21
+ }
22
+ else if (_ = accept(result)) {
23
+ if (kind === "field") initializers.unshift(_);
24
+ else descriptor[key] = _;
25
+ }
26
+ }
27
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
28
+ done = true;
29
+ };
30
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
31
+ var useValue = arguments.length > 2;
32
+ for (var i = 0; i < initializers.length; i++) {
33
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
34
+ }
35
+ return useValue ? value : void 0;
36
+ };
37
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
38
+ import { DescriptorOutlet } from '@symbiote-native/angular';
39
+ import { SliderBase } from './shared.js';
40
+ import { SLIDER_STEP_RESOLUTION_ANDROID } from '../../core/index.js';
41
+ const ANDROID_STEPS_CONTAINER_TOP = 0;
42
+ let Slider = (() => {
43
+ let _classDecorators = [Component({
44
+ selector: 'Slider',
45
+ standalone: true,
46
+ imports: [DescriptorOutlet],
47
+ changeDetection: ChangeDetectionStrategy.OnPush,
48
+ template: `<symbiote-descriptor-outlet [node]="descriptor" />`,
49
+ })];
50
+ let _classDescriptor;
51
+ let _classExtraInitializers = [];
52
+ let _classThis;
53
+ let _classSuper = SliderBase;
54
+ var Slider = class extends _classSuper {
55
+ static { _classThis = this; }
56
+ static {
57
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
58
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
59
+ Slider = _classThis = _classDescriptor.value;
60
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
61
+ __runInitializers(_classThis, _classExtraInitializers);
62
+ }
63
+ platform = {
64
+ defaultStyle: {},
65
+ stepResolution: SLIDER_STEP_RESOLUTION_ANDROID,
66
+ stepsContainerTop: ANDROID_STEPS_CONTAINER_TOP,
67
+ };
68
+ };
69
+ return Slider = _classThis;
70
+ })();
71
+ export { Slider };
@@ -0,0 +1,2 @@
1
+ export { Slider } from './index.ios';
2
+ export type { ISliderProps } from './shared';
@@ -0,0 +1,11 @@
1
+ import { SliderBase } from './shared';
2
+ export type { ISliderProps } from './shared';
3
+ export declare class Slider extends SliderBase {
4
+ protected readonly platform: {
5
+ defaultStyle: {
6
+ height: number;
7
+ };
8
+ stepResolution: number;
9
+ stepsContainerTop: number;
10
+ };
11
+ }
@@ -0,0 +1,72 @@
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
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
5
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
6
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
7
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
8
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
9
+ var _, done = false;
10
+ for (var i = decorators.length - 1; i >= 0; i--) {
11
+ var context = {};
12
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
13
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
14
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
15
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
16
+ if (kind === "accessor") {
17
+ if (result === void 0) continue;
18
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
19
+ if (_ = accept(result.get)) descriptor.get = _;
20
+ if (_ = accept(result.set)) descriptor.set = _;
21
+ if (_ = accept(result.init)) initializers.unshift(_);
22
+ }
23
+ else if (_ = accept(result)) {
24
+ if (kind === "field") initializers.unshift(_);
25
+ else descriptor[key] = _;
26
+ }
27
+ }
28
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
29
+ done = true;
30
+ };
31
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
32
+ var useValue = arguments.length > 2;
33
+ for (var i = 0; i < initializers.length; i++) {
34
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
35
+ }
36
+ return useValue ? value : void 0;
37
+ };
38
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
39
+ import { DescriptorOutlet } from '@symbiote-native/angular';
40
+ import { SliderBase } from './shared.js';
41
+ import { SLIDER_IOS_DEFAULT_HEIGHT, SLIDER_STEP_RESOLUTION_IOS } from '../../core/index.js';
42
+ const IOS_STEPS_CONTAINER_TOP = 10;
43
+ let Slider = (() => {
44
+ let _classDecorators = [Component({
45
+ selector: 'Slider',
46
+ standalone: true,
47
+ imports: [DescriptorOutlet],
48
+ changeDetection: ChangeDetectionStrategy.OnPush,
49
+ template: `<symbiote-descriptor-outlet [node]="descriptor" />`,
50
+ })];
51
+ let _classDescriptor;
52
+ let _classExtraInitializers = [];
53
+ let _classThis;
54
+ let _classSuper = SliderBase;
55
+ var Slider = class extends _classSuper {
56
+ static { _classThis = this; }
57
+ static {
58
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
59
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
60
+ Slider = _classThis = _classDescriptor.value;
61
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
62
+ __runInitializers(_classThis, _classExtraInitializers);
63
+ }
64
+ platform = {
65
+ defaultStyle: { height: SLIDER_IOS_DEFAULT_HEIGHT },
66
+ stepResolution: SLIDER_STEP_RESOLUTION_IOS,
67
+ stepsContainerTop: IOS_STEPS_CONTAINER_TOP,
68
+ };
69
+ };
70
+ return Slider = _classThis;
71
+ })();
72
+ export { Slider };
@@ -0,0 +1,3 @@
1
+ // Base entry for headless / tsc: re-exports the iOS variant (Metro picks index.ios / index.android
2
+ // per platform via filename selection; this no-suffix file is what tsx/vitest resolve).
3
+ export { Slider } from './index.ios.js';
@@ -0,0 +1,84 @@
1
+ import { EventEmitter, type OnChanges } from '@angular/core';
2
+ import type { IAccessibilityProps, IAccessibilityStateValue, IAriaProps, IDescriptor } from '@symbiote-native/components';
3
+ import { type ISymbioteEvent } from '@symbiote-native/engine';
4
+ import { type ISliderPlatform, type ISliderProps as ISliderBaseProps } from '../../core';
5
+ export type ISliderProps = Omit<ISliderBaseProps, 'onValueChange' | 'onSlidingStart' | 'onSlidingComplete' | 'onAccessibilityAction'>;
6
+ export declare abstract class SliderBase implements ISliderProps, OnChanges {
7
+ value?: number;
8
+ minimumValue?: number;
9
+ maximumValue?: number;
10
+ step?: number;
11
+ lowerLimit?: number;
12
+ upperLimit?: number;
13
+ minimumTrackTintColor?: ISliderProps['minimumTrackTintColor'];
14
+ maximumTrackTintColor?: ISliderProps['maximumTrackTintColor'];
15
+ thumbTintColor?: ISliderProps['thumbTintColor'];
16
+ disabled?: boolean;
17
+ inverted?: boolean;
18
+ tapToSeek?: boolean;
19
+ vertical?: boolean;
20
+ thumbImage?: ISliderProps['thumbImage'];
21
+ minimumTrackImage?: ISliderProps['minimumTrackImage'];
22
+ maximumTrackImage?: ISliderProps['maximumTrackImage'];
23
+ trackImage?: ISliderProps['trackImage'];
24
+ thumbSize?: number;
25
+ accessibilityUnits?: string;
26
+ accessibilityIncrements?: readonly string[];
27
+ renderStepNumber?: boolean;
28
+ testID?: string;
29
+ style?: ISliderProps['style'];
30
+ nativeID?: string;
31
+ accessible?: boolean;
32
+ accessibilityLabel?: string;
33
+ accessibilityHint?: string;
34
+ accessibilityRole?: IAccessibilityProps['accessibilityRole'];
35
+ accessibilityState?: IAccessibilityStateValue;
36
+ accessibilityValue?: IAccessibilityProps['accessibilityValue'];
37
+ accessibilityActions?: IAccessibilityProps['accessibilityActions'];
38
+ accessibilityLabelledBy?: string | string[];
39
+ importantForAccessibility?: IAccessibilityProps['importantForAccessibility'];
40
+ accessibilityLiveRegion?: IAccessibilityProps['accessibilityLiveRegion'];
41
+ screenReaderFocusable?: boolean;
42
+ accessibilityViewIsModal?: boolean;
43
+ accessibilityElementsHidden?: boolean;
44
+ accessibilityIgnoresInvertColors?: boolean;
45
+ accessibilityLanguage?: string;
46
+ accessibilityRespondsToUserInteraction?: boolean;
47
+ accessibilityShowsLargeContentViewer?: boolean;
48
+ accessibilityLargeContentTitle?: string;
49
+ onAccessibilityTap?: (event: ISymbioteEvent) => void;
50
+ onMagicTap?: (event: ISymbioteEvent) => void;
51
+ onAccessibilityEscape?: (event: ISymbioteEvent) => void;
52
+ role?: IAriaProps['role'];
53
+ ariaLabel?: string;
54
+ ariaLabelledBy?: string;
55
+ ariaLive?: IAriaProps['aria-live'];
56
+ ariaHidden?: boolean;
57
+ ariaBusy?: boolean;
58
+ ariaChecked?: boolean | 'mixed';
59
+ ariaDisabled?: boolean;
60
+ ariaExpanded?: boolean;
61
+ ariaSelected?: boolean;
62
+ ariaModal?: boolean;
63
+ ariaValueMax?: number;
64
+ ariaValueMin?: number;
65
+ ariaValueNow?: number;
66
+ ariaValueText?: string;
67
+ readonly valueChange: EventEmitter<number>;
68
+ readonly slidingStart: EventEmitter<number>;
69
+ readonly slidingComplete: EventEmitter<number>;
70
+ readonly accessibilityAction: EventEmitter<ISymbioteEvent>;
71
+ protected abstract readonly platform: ISliderPlatform;
72
+ private readonly changeDetector;
73
+ private readonly elementRef;
74
+ private reportedValue;
75
+ private width;
76
+ ngOnChanges(): void;
77
+ protected readonly handleValueChange: (event: ISymbioteEvent) => void;
78
+ protected readonly handleSlidingStart: (event: ISymbioteEvent) => void;
79
+ protected readonly handleSlidingComplete: (event: ISymbioteEvent) => void;
80
+ protected readonly handleAccessibilityAction: (event: ISymbioteEvent) => void;
81
+ protected readonly handleLayout: (event: ISymbioteEvent) => void;
82
+ private inputProps;
83
+ get descriptor(): IDescriptor;
84
+ }