@spartan-ng/brain 1.4.0-beta.3 → 1.4.0-beta.5

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.
@@ -52,6 +52,10 @@ class BrnSlider {
52
52
  step = input(1, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: numberAttribute });
53
53
  /** Minimum number of steps required between thumbs in a range slider. */
54
54
  minStepsBetweenThumbs = input(0, { ...(ngDevMode ? { debugName: "minStepsBetweenThumbs" } : /* istanbul ignore next */ {}), transform: numberAttribute });
55
+ /** Maximum number of steps allowed between thumbs in a range slider. */
56
+ maxStepsBetweenThumbs = input(Number.POSITIVE_INFINITY, { ...(ngDevMode ? { debugName: "maxStepsBetweenThumbs" } : /* istanbul ignore next */ {}), transform: numberAttribute });
57
+ /** Whether a thumb is prevented from being dragged past its neighbouring thumbs in a range slider. */
58
+ preventStepOverThumb = input(false, { ...(ngDevMode ? { debugName: "preventStepOverThumb" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
55
59
  /** Whether the slider is disabled. */
56
60
  disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
57
61
  /** Whether the slider direction is inverted. */
@@ -170,12 +174,29 @@ class BrnSlider {
170
174
  const decimalCount = getDecimalCount(this.step());
171
175
  const snapToStep = roundValue(Math.round((value - this.min()) / this.step()) * this.step() + this.min(), decimalCount);
172
176
  value = clamp(snapToStep, [this.min(), this.max()]);
173
- const newValue = [...this.normalizedValue()];
177
+ const currentValue = this.normalizedValue();
178
+ if (this.preventStepOverThumb() && currentValue.length > 1) {
179
+ const gap = this.minStepsBetweenThumbs() * this.step();
180
+ const lowerBound = atIndex > 0 ? Math.max(this.min(), currentValue[atIndex - 1] + gap) : this.min();
181
+ const upperBound = atIndex < currentValue.length - 1 ? Math.min(this.max(), currentValue[atIndex + 1] - gap) : this.max();
182
+ value = clamp(value, [lowerBound, upperBound]);
183
+ }
184
+ const newValue = [...currentValue];
174
185
  newValue[atIndex] = value;
175
186
  newValue.sort((a, b) => a - b);
176
- if (!hasMinStepsBetweenValues(newValue, this.minStepsBetweenThumbs() * this.step()))
187
+ let newValIndex = 0;
188
+ for (let i = 0; i < newValue.length; i++) {
189
+ if (newValue[i] < value || (newValue[i] === value && i < atIndex)) {
190
+ newValIndex = i + 1;
191
+ }
192
+ }
193
+ // Only validate the gaps adjacent to the moved thumb so that a state which already
194
+ // violates the constraint (e.g. set programmatically via a form control) can still be
195
+ // brought back into compliance by dragging.
196
+ if (!isGapAtIndexWithinBounds(newValue, newValIndex, this.minStepsBetweenThumbs() * this.step(), true))
197
+ return;
198
+ if (!isGapAtIndexWithinBounds(newValue, newValIndex, this.maxStepsBetweenThumbs() * this.step(), false))
177
199
  return;
178
- const newValIndex = newValue.findIndex((val) => val === value);
179
200
  this.valueIndexToChange.set(newValIndex);
180
201
  if (areArrsEqual(newValue, this.value()))
181
202
  return;
@@ -235,7 +256,7 @@ class BrnSlider {
235
256
  }
236
257
  }
237
258
  /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnSlider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
238
- /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: BrnSlider, isStandalone: true, selector: "[brnSlider]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, minStepsBetweenThumbs: { classPropertyName: "minStepsBetweenThumbs", publicName: "minStepsBetweenThumbs", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inverted: { classPropertyName: "inverted", publicName: "inverted", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, showTicks: { classPropertyName: "showTicks", publicName: "showTicks", isSignal: true, isRequired: false, transformFunction: null }, maxTicks: { classPropertyName: "maxTicks", publicName: "maxTicks", isSignal: true, isRequired: false, transformFunction: null }, tickLabelInterval: { classPropertyName: "tickLabelInterval", publicName: "tickLabelInterval", isSignal: true, isRequired: false, transformFunction: null }, formatTick: { classPropertyName: "formatTick", publicName: "formatTick", isSignal: true, isRequired: false, transformFunction: null }, draggableRange: { classPropertyName: "draggableRange", publicName: "draggableRange", isSignal: true, isRequired: false, transformFunction: null }, draggableRangeOnly: { classPropertyName: "draggableRangeOnly", publicName: "draggableRangeOnly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { attributes: { "data-slot": "slider" }, listeners: { "focusout": "_onFocusOut($event)" }, properties: { "attr.id": "id()", "attr.dir": "_direction()", "attr.aria-disabled": "mutableDisabled() ? \"true\" : null", "attr.data-disabled": "mutableDisabled() ? \"\" : null", "attr.data-inverted": "inverted() ? \"\" : null", "attr.data-orientation": "orientation()", "attr.aria-invalid": "_ariaInvalid() ? \"true\" : null", "attr.data-invalid": "_ariaInvalid() ? \"true\" : null", "attr.data-matches-spartan-invalid": "_ariaInvalid() ? \"true\" : null", "attr.data-dirty": "_dirty() ? \"true\" : null", "attr.data-touched": "_touched() ? \"true\" : null" } }, providers: [BRN_SLIDER_VALUE_ACCESSOR, provideBrnSlider(BrnSlider)], exportAs: ["brnSlider"], hostDirectives: [{ directive: i1.BrnFieldControl }], ngImport: i0 });
259
+ /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: BrnSlider, isStandalone: true, selector: "[brnSlider]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, minStepsBetweenThumbs: { classPropertyName: "minStepsBetweenThumbs", publicName: "minStepsBetweenThumbs", isSignal: true, isRequired: false, transformFunction: null }, maxStepsBetweenThumbs: { classPropertyName: "maxStepsBetweenThumbs", publicName: "maxStepsBetweenThumbs", isSignal: true, isRequired: false, transformFunction: null }, preventStepOverThumb: { classPropertyName: "preventStepOverThumb", publicName: "preventStepOverThumb", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inverted: { classPropertyName: "inverted", publicName: "inverted", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, showTicks: { classPropertyName: "showTicks", publicName: "showTicks", isSignal: true, isRequired: false, transformFunction: null }, maxTicks: { classPropertyName: "maxTicks", publicName: "maxTicks", isSignal: true, isRequired: false, transformFunction: null }, tickLabelInterval: { classPropertyName: "tickLabelInterval", publicName: "tickLabelInterval", isSignal: true, isRequired: false, transformFunction: null }, formatTick: { classPropertyName: "formatTick", publicName: "formatTick", isSignal: true, isRequired: false, transformFunction: null }, draggableRange: { classPropertyName: "draggableRange", publicName: "draggableRange", isSignal: true, isRequired: false, transformFunction: null }, draggableRangeOnly: { classPropertyName: "draggableRangeOnly", publicName: "draggableRangeOnly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { attributes: { "data-slot": "slider" }, listeners: { "focusout": "_onFocusOut($event)" }, properties: { "attr.id": "id()", "attr.dir": "_direction()", "attr.aria-disabled": "mutableDisabled() ? \"true\" : null", "attr.data-disabled": "mutableDisabled() ? \"\" : null", "attr.data-inverted": "inverted() ? \"\" : null", "attr.data-orientation": "orientation()", "attr.aria-invalid": "_ariaInvalid() ? \"true\" : null", "attr.data-invalid": "_ariaInvalid() ? \"true\" : null", "attr.data-matches-spartan-invalid": "_ariaInvalid() ? \"true\" : null", "attr.data-dirty": "_dirty() ? \"true\" : null", "attr.data-touched": "_touched() ? \"true\" : null" } }, providers: [BRN_SLIDER_VALUE_ACCESSOR, provideBrnSlider(BrnSlider)], exportAs: ["brnSlider"], hostDirectives: [{ directive: i1.BrnFieldControl }], ngImport: i0 });
239
260
  }
240
261
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnSlider, decorators: [{
241
262
  type: Directive,
@@ -260,7 +281,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
260
281
  '[attr.data-touched]': '_touched() ? "true" : null',
261
282
  },
262
283
  }]
263
- }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], valueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], minStepsBetweenThumbs: [{ type: i0.Input, args: [{ isSignal: true, alias: "minStepsBetweenThumbs", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], inverted: [{ type: i0.Input, args: [{ isSignal: true, alias: "inverted", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], showTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTicks", required: false }] }], maxTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxTicks", required: false }] }], tickLabelInterval: [{ type: i0.Input, args: [{ isSignal: true, alias: "tickLabelInterval", required: false }] }], formatTick: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatTick", required: false }] }], draggableRange: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggableRange", required: false }] }], draggableRangeOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggableRangeOnly", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
284
+ }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], valueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], minStepsBetweenThumbs: [{ type: i0.Input, args: [{ isSignal: true, alias: "minStepsBetweenThumbs", required: false }] }], maxStepsBetweenThumbs: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxStepsBetweenThumbs", required: false }] }], preventStepOverThumb: [{ type: i0.Input, args: [{ isSignal: true, alias: "preventStepOverThumb", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], inverted: [{ type: i0.Input, args: [{ isSignal: true, alias: "inverted", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], showTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTicks", required: false }] }], maxTicks: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxTicks", required: false }] }], tickLabelInterval: [{ type: i0.Input, args: [{ isSignal: true, alias: "tickLabelInterval", required: false }] }], formatTick: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatTick", required: false }] }], draggableRange: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggableRange", required: false }] }], draggableRangeOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggableRangeOnly", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
264
285
  function areArrsEqual(arr1, arr2) {
265
286
  return String(arr1) === String(arr2);
266
287
  }
@@ -274,14 +295,26 @@ function getDecimalCount(value) {
274
295
  function clamp(value, [min, max]) {
275
296
  return Math.min(max, Math.max(min, value));
276
297
  }
277
- function getStepsBetweenValues(values) {
278
- return values.slice(0, -1).map((value, index) => values[index + 1] - value);
279
- }
280
- function hasMinStepsBetweenValues(values, minStepsBetweenValues) {
281
- if (minStepsBetweenValues > 0) {
282
- const stepsBetweenValues = getStepsBetweenValues(values);
283
- const actualMinStepsBetweenValues = Math.min(...stepsBetweenValues);
284
- return actualMinStepsBetweenValues >= minStepsBetweenValues;
298
+ /**
299
+ * Validates only the gaps immediately adjacent to `index`.
300
+ *
301
+ * Checking a single gap (instead of every gap) keeps the slider usable when its initial state
302
+ * already violates the constraint: the unchanged gaps are ignored, so the user can gradually drag
303
+ * the thumbs back into compliance.
304
+ *
305
+ * @param isMin When `true`, the adjacent gaps must be `>= bound`; otherwise they must be `<= bound`.
306
+ */
307
+ function isGapAtIndexWithinBounds(values, index, bound, isMin) {
308
+ if (isMin ? bound <= 0 : !Number.isFinite(bound)) {
309
+ return true;
310
+ }
311
+ const leftGap = index > 0 ? values[index] - values[index - 1] : undefined;
312
+ const rightGap = index < values.length - 1 ? values[index + 1] - values[index] : undefined;
313
+ for (const gap of [leftGap, rightGap]) {
314
+ if (gap === undefined)
315
+ continue;
316
+ if (isMin ? gap < bound : gap > bound)
317
+ return false;
285
318
  }
286
319
  return true;
287
320
  }
@@ -1 +1 @@
1
- {"version":3,"file":"spartan-ng-brain-slider.mjs","sources":["../../../../libs/brain/slider/src/lib/brn-slider.token.ts","../../../../libs/brain/slider/src/lib/brn-slider.ts","../../../../libs/brain/slider/src/lib/brn-slider-range.ts","../../../../libs/brain/slider/src/lib/utils/linear-scale.ts","../../../../libs/brain/slider/src/lib/brn-slider-thumb.ts","../../../../libs/brain/slider/src/lib/brn-slider-tick.ts","../../../../libs/brain/slider/src/lib/brn-slider-track.token.ts","../../../../libs/brain/slider/src/lib/brn-slider-track.ts","../../../../libs/brain/slider/src/index.ts","../../../../libs/brain/slider/src/spartan-ng-brain-slider.ts"],"sourcesContent":["import { type ExistingProvider, inject, InjectionToken, type Type } from '@angular/core';\nimport type { BrnSlider } from './brn-slider';\n\nconst BrnSliderToken = new InjectionToken<BrnSlider>('BrnSliderToken');\n\nexport function provideBrnSlider(slider: Type<BrnSlider>): ExistingProvider {\n\treturn { provide: BrnSliderToken, useExisting: slider };\n}\n\nexport function injectBrnSlider(): BrnSlider {\n\treturn inject(BrnSliderToken);\n}\n","import { Directionality } from '@angular/cdk/bidi';\nimport type { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n\tbooleanAttribute,\n\tcomputed,\n\tDirective,\n\tforwardRef,\n\tinject,\n\tInjector,\n\tinput,\n\tlinkedSignal,\n\tnumberAttribute,\n\ttype OnInit,\n\toutput,\n\tsignal,\n} from '@angular/core';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR, NgControl, NgModel } from '@angular/forms';\nimport { BrnFieldControl } from '@spartan-ng/brain/field';\nimport { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\nimport type { BrnSliderRange } from './brn-slider-range';\nimport type { BrnSliderThumb } from './brn-slider-thumb';\nimport type { BrnSliderTrack } from './brn-slider-track';\nimport { provideBrnSlider } from './brn-slider.token';\n\nexport const BRN_SLIDER_VALUE_ACCESSOR = {\n\tprovide: NG_VALUE_ACCESSOR,\n\tuseExisting: forwardRef(() => BrnSlider),\n\tmulti: true,\n};\n\nlet nextId = 0;\n\n@Directive({\n\tselector: '[brnSlider]',\n\texportAs: 'brnSlider',\n\tproviders: [BRN_SLIDER_VALUE_ACCESSOR, provideBrnSlider(BrnSlider)],\n\thostDirectives: [BrnFieldControl],\n\thost: {\n\t\t'[attr.id]': 'id()',\n\t\t'[attr.dir]': '_direction()',\n\t\t'[attr.aria-disabled]': 'mutableDisabled() ? \"true\" : null',\n\t\t'[attr.data-disabled]': 'mutableDisabled() ? \"\" : null',\n\t\t'[attr.data-inverted]': 'inverted() ? \"\" : null',\n\t\t'[attr.data-orientation]': 'orientation()',\n\t\t'data-slot': 'slider',\n\t\t'(focusout)': '_onFocusOut($event)',\n\t\t'[attr.aria-invalid]': '_ariaInvalid() ? \"true\" : null',\n\t\t'[attr.data-invalid]': '_ariaInvalid() ? \"true\" : null',\n\t\t'[attr.data-matches-spartan-invalid]': '_ariaInvalid() ? \"true\" : null',\n\t\t'[attr.data-dirty]': '_dirty() ? \"true\" : null',\n\t\t'[attr.data-touched]': '_touched() ? \"true\" : null',\n\t},\n})\nexport class BrnSlider implements ControlValueAccessor, OnInit {\n\tprivate readonly _dir = inject(Directionality);\n\tprivate readonly _injector = inject(Injector);\n\tprivate readonly _fieldControl = inject(BrnFieldControl);\n\tpublic ngControl: NgControl | null = null;\n\n\tprotected readonly _ariaInvalid = this._fieldControl.invalid;\n\tprotected readonly _dirty = this._fieldControl.dirty;\n\tprotected readonly _touched = this._fieldControl.touched;\n\tprotected readonly _spartanInvalid = this._fieldControl.spartanInvalid;\n\n\t/** Unique identifier for the slider element. Auto-generated if not provided. */\n\tpublic readonly id = input<string>(`brn-slider-${++nextId}`);\n\n\t/** Accessibility label for the slider. Forwarded to all thumbs. */\n\tpublic readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n\t/** ID of the element that labels this slider for accessibility. Forwarded to all thumbs. */\n\tpublic readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\n\t/**\n\t * The current slider value(s).\n\t *\n\t * For single-thumb sliders, this contains one value.\n\t * For range sliders, values are kept sorted in ascending order.\n\t */\n\tpublic readonly valueInput = input<number[]>([], { alias: 'value' });\n\tpublic readonly value = linkedSignal(this.valueInput);\n\n\t/** Minimum allowed slider value. */\n\tpublic readonly min = input<number, NumberInput>(0, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Maximum allowed slider value. */\n\tpublic readonly max = input<number, NumberInput>(100, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Step increment used when changing values. */\n\tpublic readonly step = input<number, NumberInput>(1, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Minimum number of steps required between thumbs in a range slider. */\n\tpublic readonly minStepsBetweenThumbs = input<number, NumberInput>(0, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Whether the slider is disabled. */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Whether the slider direction is inverted. */\n\tpublic readonly inverted = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Slider orientation. */\n\tpublic readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n\n\t/** Whether tick marks should be displayed. */\n\tpublic readonly showTicks = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Maximum number of ticks to render. Excess ticks are evenly distributed. */\n\tpublic readonly maxTicks = input<number, NumberInput>(25, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Interval at which tick labels are shown. A value of `2` shows a label every second tick. */\n\tpublic readonly tickLabelInterval = input<number, NumberInput>(2, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Defines how the tick should be displayed in the UI. */\n\tpublic readonly formatTick = input<(tick: number) => string>((tick) => tick.toString());\n\n\t/** Whether dragging the selected range should move all thumbs together. */\n\tpublic readonly draggableRange = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Whether only dragging the range should work (overrides normal track clicks). */\n\tpublic readonly draggableRangeOnly = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Emits when the value changes. */\n\tpublic readonly valueChange = output<number[]>();\n\n\t/** @internal Normalized slider values. Values are clamped to `[min, max]` and sorted in ascending order. */\n\tpublic readonly normalizedValue = computed(\n\t\t() => [...this.value()].sort((a, b) => a - b).map((v) => clamp(v, [this.min(), this.max()])),\n\t\t{ equal: areArrsEqual },\n\t);\n\n\t/** Indexes for all active thumbs. */\n\tpublic readonly thumbIndexes = computed(() => Array.from({ length: this.normalizedValue().length }, (_, i) => i), {\n\t\tequal: (a, b) => a.length === b.length,\n\t});\n\n\t/** @internal Whether the slider is in range mode and draggable range is enabled */\n\tpublic readonly isDraggableRange = computed(() => this.draggableRange() && this.normalizedValue().length > 1);\n\n\t/** @internal Whether dragging should only move the range. */\n\tpublic readonly isDraggableRangeOnly = computed(() => this.draggableRangeOnly() && this.isDraggableRange());\n\n\tprotected readonly _direction = this._dir.valueSignal;\n\n\t/** @internal Logical edge from which the slider value increases. */\n\tpublic readonly slidingSource = computed<'top' | 'bottom' | 'left' | 'right'>(() => {\n\t\tconst orientation = this.orientation();\n\t\tconst inverted = this.inverted();\n\n\t\tif (orientation === 'vertical') {\n\t\t\treturn inverted ? 'top' : 'bottom';\n\t\t}\n\n\t\tconst isLtr = this._direction() === 'ltr';\n\t\tconst fromLeft = (isLtr && !inverted) || (!isLtr && inverted);\n\n\t\treturn fromLeft ? 'left' : 'right';\n\t});\n\n\t/** @internal */\n\tpublic readonly isHorizontal = computed(() => this.orientation() === 'horizontal');\n\n\t/** @internal Reference to the slider track instance. */\n\tpublic readonly track = signal<BrnSliderTrack | null>(null);\n\n\t/** @internal Reference to the slider range instance. */\n\tpublic readonly range = signal<BrnSliderRange | null>(null);\n\n\t/** @internal All registered slider thumbs. */\n\tpublic readonly thumbs = signal<BrnSliderThumb[]>([]);\n\n\t/** @internal Index of the thumb currently being updated. */\n\tpublic readonly valueIndexToChange = signal(0);\n\n\t/** @internal Visible tick values after applying density reduction. */\n\tpublic readonly ticks = computed(() => {\n\t\tif (!this.showTicks()) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\t\tconst step = this.step();\n\t\tconst maxTicks = this.maxTicks();\n\n\t\tif (step <= 0 || min > max) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst totalCount = Math.floor((max - min) / step) + 1;\n\n\t\t// No need to reduce\n\t\tif (totalCount <= maxTicks) {\n\t\t\treturn Array.from({ length: totalCount }, (_, i) => min + i * step);\n\t\t}\n\n\t\tconst stride = Math.ceil(totalCount / maxTicks);\n\n\t\treturn Array.from({ length: totalCount }, (_, i) => min + i * step).filter((_, index) => index % stride === 0);\n\t});\n\n\t/** @internal Disabled state that can be controlled internally or externally. */\n\tpublic readonly mutableDisabled = linkedSignal(() => this.disabled());\n\n\t/** @internal Store the on change callback */\n\tprivate _onChange?: ChangeFn<number[]>;\n\n\t/** @internal Store the on touched callback */\n\tprivate _onTouched?: TouchFn;\n\n\tngOnInit(): void {\n\t\tthis.ngControl = this._injector.get(NgControl, null);\n\n\t\t// If bound to an Angular form control, writeValue() will run after ngOnInit,\n\t\t// so avoid initializing defaults here to prevent a transient min-value override.\n\t\tif (!this.ngControl) {\n\t\t\tif (!this.value().length) {\n\t\t\t\tconst defaultValue = [this.min()];\n\t\t\t\tthis.value.set(defaultValue);\n\t\t\t}\n\n\t\t\tconst normalizedValue = this.value()\n\t\t\t\t.map((v) => clamp(v, [this.min(), this.max()]))\n\t\t\t\t.sort((a, b) => a - b);\n\n\t\t\tif (!areArrsEqual(normalizedValue, this.value())) {\n\t\t\t\tthis.value.set(normalizedValue);\n\t\t\t}\n\t\t}\n\t}\n\n\tregisterOnChange(fn: (value: number[]) => void): void {\n\t\tthis._onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: () => void): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.mutableDisabled.set(isDisabled);\n\t}\n\n\twriteValue(value: number[]): void {\n\t\tif (!Array.isArray(value)) return;\n\n\t\tif (this.ngControl instanceof NgModel && !this._onChange) {\n\t\t\t// Avoid phantom call for ngModel\n\t\t\t// https://github.com/angular/angular/issues/14988#issuecomment-2946355465\n\t\t\treturn;\n\t\t}\n\n\t\tconst newValue = [...value].sort((a, b) => a - b).map((v) => clamp(v, [this.min(), this.max()]));\n\t\tthis.value.set(newValue);\n\t}\n\n\t/** Sets a new value for the slider at the given thumb index. */\n\tsetValue(value: number, atIndex: number): void {\n\t\tconst decimalCount = getDecimalCount(this.step());\n\t\tconst snapToStep = roundValue(\n\t\t\tMath.round((value - this.min()) / this.step()) * this.step() + this.min(),\n\t\t\tdecimalCount,\n\t\t);\n\n\t\tvalue = clamp(snapToStep, [this.min(), this.max()]);\n\n\t\tconst newValue = [...this.normalizedValue()];\n\t\tnewValue[atIndex] = value;\n\t\tnewValue.sort((a, b) => a - b);\n\n\t\tif (!hasMinStepsBetweenValues(newValue, this.minStepsBetweenThumbs() * this.step())) return;\n\n\t\tconst newValIndex = newValue.findIndex((val) => val === value);\n\t\tthis.valueIndexToChange.set(newValIndex);\n\n\t\tif (areArrsEqual(newValue, this.value())) return;\n\n\t\tthis.value.set(newValue);\n\t\tthis._onChange?.(newValue);\n\t\tthis.valueChange.emit(newValue);\n\n\t\tif (this.thumbs()[newValIndex]) {\n\t\t\tthis.thumbs()[newValIndex].elementRef.nativeElement.focus();\n\t\t}\n\t}\n\n\t/** Moves the entire range by a delta value, snapping to step and preserving spacing. */\n\tsetAllValuesByDelta(delta: number): void {\n\t\tconst current = this.normalizedValue();\n\t\tif (!current.length || delta === 0) return;\n\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\t\tconst step = this.step();\n\t\tconst decimalCount = getDecimalCount(step);\n\n\t\tconst snappedDelta = roundValue(Math.round(delta / step) * step, decimalCount);\n\t\tif (snappedDelta === 0) return;\n\n\t\tlet next = current.map((v) => v + snappedDelta);\n\n\t\tconst rangeMin = Math.min(...next);\n\t\tconst rangeMax = Math.max(...next);\n\n\t\tif (rangeMin < min) {\n\t\t\tconst offset = min - rangeMin;\n\t\t\tnext = next.map((v) => v + offset);\n\t\t} else if (rangeMax > max) {\n\t\t\tconst offset = max - rangeMax;\n\t\t\tnext = next.map((v) => v + offset);\n\t\t}\n\n\t\tnext = next.map((v) => roundValue(v, decimalCount));\n\n\t\tif (areArrsEqual(next, this.value())) return;\n\n\t\tthis.value.set(next);\n\t\tthis._onChange?.(next);\n\t\tthis.valueChange.emit(next);\n\t}\n\n\t/** @internal */\n\taddThumb(thumb: BrnSliderThumb): void {\n\t\tthis.thumbs.update((thumbs) => {\n\t\t\tthumbs.push(thumb);\n\t\t\treturn [...thumbs];\n\t\t});\n\t}\n\n\t/** @internal */\n\tremoveThumb(thumb: BrnSliderThumb): void {\n\t\tthis.thumbs.update((thumbs) => thumbs.filter((t) => t !== thumb));\n\t}\n\n\tprotected _onFocusOut(event: FocusEvent): void {\n\t\tconst currentTarget = event.currentTarget as HTMLElement;\n\t\tconst focusedEl = event.relatedTarget as HTMLElement | null;\n\n\t\tif (!currentTarget.contains(focusedEl)) {\n\t\t\tthis._onTouched?.();\n\t\t}\n\t}\n}\n\nfunction areArrsEqual(arr1: unknown[], arr2: unknown[]): boolean {\n\treturn String(arr1) === String(arr2);\n}\n\nfunction roundValue(value: number, decimalCount: number): number {\n\tconst rounder = Math.pow(10, decimalCount);\n\treturn Math.round(value * rounder) / rounder;\n}\n\nfunction getDecimalCount(value: number): number {\n\treturn (String(value).split('.')[1] || '').length;\n}\n\nfunction clamp(value: number, [min, max]: [number, number]): number {\n\treturn Math.min(max, Math.max(min, value));\n}\n\nfunction getStepsBetweenValues(values: number[]): number[] {\n\treturn values.slice(0, -1).map((value, index) => values[index + 1]! - value);\n}\n\nfunction hasMinStepsBetweenValues(values: number[], minStepsBetweenValues: number): boolean {\n\tif (minStepsBetweenValues > 0) {\n\t\tconst stepsBetweenValues = getStepsBetweenValues(values);\n\t\tconst actualMinStepsBetweenValues = Math.min(...stepsBetweenValues);\n\t\treturn actualMinStepsBetweenValues >= minStepsBetweenValues;\n\t}\n\treturn true;\n}\n","import { computed, Directive, ElementRef, inject } from '@angular/core';\nimport { injectBrnSlider } from './brn-slider.token';\n\n@Directive({\n\tselector: '[brnSliderRange]',\n\thost: {\n\t\t'[attr.data-disabled]': '_slider.mutableDisabled() ? \"\" : null',\n\t\t'[attr.data-orientation]': '_slider.orientation()',\n\t\t'[attr.data-draggable-range]': '_slider.isDraggableRange() ? \"\" : null',\n\t\t'data-slot': 'slider-range',\n\t\t'[style.inset-inline]': '_slider.isHorizontal() ? _rangeInset() : undefined',\n\t\t'[style.inset-block]': '!_slider.isHorizontal() ? _rangeInset() : undefined',\n\t},\n})\nexport class BrnSliderRange {\n\tprotected readonly _slider = injectBrnSlider();\n\tpublic readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n\tconstructor() {\n\t\tthis._slider.range.set(this);\n\t}\n\n\tprotected readonly _rangeInset = computed(() => {\n\t\tconst thumbs = this._slider.thumbs();\n\t\tif (!thumbs.length) return;\n\n\t\tconst inverted = this._slider.inverted();\n\t\tconst isHorizontal = this._slider.isHorizontal();\n\n\t\tconst start = thumbs[0].percentage();\n\t\tconst end = thumbs[thumbs.length - 1].percentage();\n\n\t\tconst inset = thumbs.length > 1 ? [`${start}%`, `${100 - end}%`] : ['0px', `${100 - start}%`];\n\n\t\tif (!isHorizontal) {\n\t\t\tinset.reverse();\n\t\t}\n\n\t\tif (inverted) {\n\t\t\tinset.reverse();\n\t\t}\n\n\t\treturn inset.join(' ');\n\t});\n}\n","export function linearScale(\n\tinput: readonly [number, number],\n\toutput: readonly [number, number],\n): (value: number) => number {\n\treturn (value: number) => {\n\t\tif (input[0] === input[1] || output[0] === output[1]) return output[0];\n\t\tconst ratio = (output[1] - output[0]) / (input[1] - input[0]);\n\t\treturn output[0] + ratio * (value - input[0]);\n\t};\n}\n","import { isPlatformServer } from '@angular/common';\nimport { computed, DestroyRef, Directive, ElementRef, inject, PLATFORM_ID } from '@angular/core';\nimport { injectElementSize } from '@spartan-ng/brain/core';\nimport { injectBrnSlider } from './brn-slider.token';\nimport { linearScale } from './utils/linear-scale';\n\nconst PAGE_KEYS = ['PageUp', 'PageDown'];\n\n@Directive({\n\tselector: '[brnSliderThumb]',\n\thost: {\n\t\trole: 'slider',\n\t\t'[attr.aria-label]': `_computedAriaLabel()`,\n\t\t'[attr.aria-labelledby]': '_slider.ariaLabelledby() || null',\n\t\t'[attr.aria-orientation]': '_slider.orientation()',\n\t\t'[attr.aria-valuenow]': '_slider.normalizedValue()[_index()]',\n\t\t'[attr.aria-valuemin]': '_slider.min()',\n\t\t'[attr.aria-valuemax]': '_slider.max()',\n\t\t'[attr.tabindex]': '_slider.mutableDisabled() ? -1 : 0',\n\t\t'[attr.data-disabled]': '_slider.mutableDisabled() ? \"\" : null',\n\t\t'[attr.data-orientation]': '_slider.orientation()',\n\t\t'[style.inset-inline-start]':\n\t\t\t'_slider.isHorizontal() ? _slider.inverted() ? undefined : _thumbOffset() : undefined',\n\t\t'[style.inset-inline-end]': '_slider.isHorizontal() ? _slider.inverted() ? _thumbOffset() : undefined : undefined',\n\t\t'[style.inset-block-end]': '!_slider.isHorizontal() ? _slider.inverted() ? undefined : _thumbOffset() : undefined',\n\t\t'[style.inset-block-start]':\n\t\t\t'!_slider.isHorizontal() ? _slider.inverted() ? _thumbOffset() : undefined : undefined',\n\t\t'[style.visibility]': '_thumbReady() ? undefined : \"hidden\"',\n\t\t'[style.pointer-events]': '_thumbReady() ? undefined : \"none\"',\n\t\t'[style.transform]': '_transformValue()',\n\t\t'data-slot': 'slider-thumb',\n\t\t'(pointerdown)': '_onPointerDown($event)',\n\t\t'(pointermove)': '_onPointerMove($event)',\n\t\t'(pointerup)': '_onPointerUp($event)',\n\t\t'(keydown)': 'handleKeydown($event)',\n\t},\n})\nexport class BrnSliderThumb {\n\tprivate readonly _platform = inject(PLATFORM_ID);\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _size = injectElementSize();\n\tprotected readonly _slider = injectBrnSlider();\n\tpublic readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n\t/**\n\t * Indicates whether the thumb is ready to be displayed and interactable.\n\t *\n\t * This signal returns `true` when the element's size has been measured\n\t * and the width is greater than 0. It ensures that the thumb is not\n\t * rendered or interacted with prematurely, which prevents layout\n\t * issues or first-frame “jerks” when using SSR.\n\t */\n\tprotected readonly _thumbReady = computed(() => {\n\t\tconst size = this._size();\n\t\treturn !!size && size.width > 0;\n\t});\n\n\tprotected readonly _index = computed(() => this._slider.thumbs().findIndex((thumb) => thumb === this));\n\n\tpublic readonly percentage = computed(() => {\n\t\tconst range = this._slider.max() - this._slider.min();\n\t\tif (range === 0) return 0;\n\n\t\treturn ((this._slider.normalizedValue()[this._index()] - this._slider.min()) / range) * 100;\n\t});\n\n\tprivate readonly _thumbInBoundsOffset = computed(() => {\n\t\t// we can't compute the offset on the server\n\t\tif (isPlatformServer(this._platform)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst size = this._slider.isHorizontal() ? this._size()?.width : this._size()?.height;\n\t\tif (!size) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst halfSize = size / 2;\n\t\tconst offset = linearScale([0, 50], [0, halfSize]);\n\t\tconst direction = this._slider.slidingSource() === 'left' || this._slider.slidingSource() === 'top' ? 1 : -1;\n\n\t\treturn (halfSize - offset(this.percentage()) * direction) * direction;\n\t});\n\n\t/**\n\t * Offsets the thumb centre point while sliding to ensure it remains\n\t * within the bounds of the slider when reaching the edges.\n\t * Based on https://github.com/radix-ui/primitives/blob/main/packages/react/slider/src/slider.tsx\n\t */\n\tprotected readonly _thumbOffset = computed(() => {\n\t\t// we can't compute the offset on the server\n\t\tif (isPlatformServer(this._platform)) {\n\t\t\treturn this.percentage() + '%';\n\t\t}\n\n\t\treturn `calc(${this.percentage()}% + ${this._thumbInBoundsOffset()}px)`;\n\t});\n\n\tprotected readonly _computedAriaLabel = computed(\n\t\t() => this._slider.ariaLabel() || `Value ${this._index() + 1} of ${this._slider.normalizedValue().length}`,\n\t);\n\n\tprotected readonly _transformValue = computed(() =>\n\t\tthis._slider.orientation() === 'horizontal' ? 'translateX(-50%)' : 'translateY(-50%)',\n\t);\n\n\tconstructor() {\n\t\tthis._slider.addThumb(this);\n\n\t\tthis._destroyRef.onDestroy(() => {\n\t\t\tthis._slider.removeThumb(this);\n\t\t});\n\t}\n\n\tprotected _onPointerDown(event: PointerEvent): void {\n\t\tthis._slider.track()?.onPointerDown(event);\n\t}\n\n\tprotected _onPointerMove(event: PointerEvent): void {\n\t\tthis._slider.track()?.onPointerMove(event);\n\t}\n\n\tprotected _onPointerUp(event: PointerEvent): void {\n\t\tthis._slider.track()?.onPointerUp(event);\n\t}\n\n\tprotected handleKeydown(event: KeyboardEvent): void {\n\t\tif (this._slider.mutableDisabled()) return;\n\n\t\tconst step = this._slider.step();\n\t\tconst min = this._slider.min();\n\t\tconst max = this._slider.max();\n\t\tconst multiplier = event.shiftKey || PAGE_KEYS.includes(event.key) ? 10 : 1;\n\n\t\t// Determine delta based on slider orientation\n\t\tconst dirLR = this._slider.slidingSource() === 'right' ? -1 : 1;\n\t\tconst dirUD = this._slider.slidingSource() === 'top' ? -1 : 1;\n\n\t\tconst deltas: Partial<Record<string, number>> = {\n\t\t\tArrowLeft: -step * multiplier * dirLR,\n\t\t\tArrowRight: step * multiplier * dirLR,\n\t\t\tArrowUp: step * multiplier * dirUD,\n\t\t\tArrowDown: -step * multiplier * dirUD,\n\t\t\tPageUp: step * multiplier,\n\t\t\tPageDown: -step * multiplier,\n\t\t};\n\n\t\t// Home/End keys\n\t\tif (event.key === 'Home') {\n\t\t\tif (this._slider.isDraggableRangeOnly()) {\n\t\t\t\tconst range = this._slider.normalizedValue();\n\t\t\t\tconst delta = min - range[0];\n\t\t\t\tthis._slider.setAllValuesByDelta(delta);\n\t\t\t} else {\n\t\t\t\tthis._slider.setValue(min, this._index());\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.key === 'End') {\n\t\t\tif (this._slider.isDraggableRangeOnly()) {\n\t\t\t\tconst range = this._slider.normalizedValue();\n\t\t\t\tconst delta = max - range[range.length - 1];\n\t\t\t\tthis._slider.setAllValuesByDelta(delta);\n\t\t\t} else {\n\t\t\t\tthis._slider.setValue(max, this._index());\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tconst delta = deltas[event.key];\n\t\tif (delta === undefined) return;\n\n\t\tif (this._slider.isDraggableRangeOnly()) {\n\t\t\tthis._slider.setAllValuesByDelta(delta);\n\t\t} else {\n\t\t\tconst index = this._index();\n\t\t\tconst value = this._slider.normalizedValue()[index];\n\t\t\tthis._slider.setValue(Math.min(max, Math.max(min, value + delta)), index);\n\t\t}\n\n\t\tevent.preventDefault();\n\t}\n}\n","import {\n\tDestroyRef,\n\tDirective,\n\teffect,\n\ttype EmbeddedViewRef,\n\tinject,\n\tRenderer2,\n\tTemplateRef,\n\tViewContainerRef,\n} from '@angular/core';\nimport { injectBrnSlider } from './brn-slider.token';\n\n@Directive({\n\tselector: '[brnSliderTick]',\n\thost: {\n\t\t'data-slot': 'slider-tick',\n\t},\n})\nexport class BrnSliderTick {\n\tprivate readonly _slider = injectBrnSlider();\n\tprivate readonly _templateRef = inject<TemplateRef<BrnSliderTickContext>>(TemplateRef);\n\tprivate readonly _renderer = inject(Renderer2);\n\tprivate readonly _viewContainer = inject(ViewContainerRef);\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate _ticks: EmbeddedViewRef<BrnSliderTickContext>[] = [];\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst ticks = this._slider.ticks();\n\t\t\tconst tickLabelInterval = this._slider.tickLabelInterval();\n\n\t\t\t// Remove any existing ticks\n\t\t\tthis._ticks.forEach((tick) => this._viewContainer.remove(this._viewContainer.indexOf(tick)));\n\n\t\t\t// Create new ticks\n\t\t\tthis._ticks = [];\n\n\t\t\tticks.forEach((tick, index) => {\n\t\t\t\tconst view = this._viewContainer.createEmbeddedView(this._templateRef, {\n\t\t\t\t\t$implicit: tick,\n\t\t\t\t\tindex,\n\t\t\t\t\tformattedTick: this._slider.formatTick()(tick),\n\t\t\t\t});\n\n\t\t\t\tconst tickEl = view.rootNodes[0] as HTMLElement;\n\t\t\t\tif (tickLabelInterval === 0 || index % tickLabelInterval !== 0) {\n\t\t\t\t\tthis._renderer.setAttribute(tickEl, 'data-skip', '');\n\t\t\t\t}\n\n\t\t\t\tthis._ticks.push(view);\n\t\t\t});\n\t\t});\n\n\t\tthis._destroyRef.onDestroy(() => {\n\t\t\tthis._ticks.forEach((tick) => this._viewContainer.remove(this._viewContainer.indexOf(tick)));\n\t\t});\n\t}\n}\n\nexport interface BrnSliderTickContext {\n\t$implicit: number;\n\tindex: number;\n\tformattedTick: string;\n}\n","import { type ExistingProvider, inject, InjectionToken, type Type } from '@angular/core';\nimport type { BrnSliderTrack } from './brn-slider-track';\n\nexport const BrnSliderTrackToken = new InjectionToken<BrnSliderTrack>('BrnSliderTrackToken');\n\nexport function provideBrnSliderTrack(slider: Type<BrnSliderTrack>): ExistingProvider {\n\treturn { provide: BrnSliderTrackToken, useExisting: slider };\n}\n\nexport function injectBrnSliderTrack(): BrnSliderTrack {\n\treturn inject(BrnSliderTrackToken);\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\nimport { provideBrnSliderTrack } from './brn-slider-track.token';\nimport { injectBrnSlider } from './brn-slider.token';\nimport { linearScale } from './utils/linear-scale';\n\n@Directive({\n\tselector: '[brnSliderTrack]',\n\tproviders: [provideBrnSliderTrack(BrnSliderTrack)],\n\thost: {\n\t\t'[attr.data-disabled]': '_slider.mutableDisabled() ? \"\" : null',\n\t\t'[attr.data-orientation]': '_slider.orientation()',\n\t\t'data-slot': 'slider-track',\n\t\t'(pointerdown)': 'onPointerDown($event)',\n\t\t'(pointermove)': 'onPointerMove($event)',\n\t\t'(pointerup)': 'onPointerUp($event)',\n\t},\n})\nexport class BrnSliderTrack {\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprotected readonly _slider = injectBrnSlider();\n\n\tprivate _rangeDragStartPointer: number | null = null;\n\tprivate _rangeDragAccumulatedDelta = 0;\n\n\tconstructor() {\n\t\tthis._slider.track.set(this);\n\t}\n\n\tpublic onPointerDown(event: PointerEvent): void {\n\t\tif (this._slider.mutableDisabled()) return;\n\n\t\tconst target = event.target as HTMLElement;\n\t\tconst isTrack = this._isTrack(target);\n\n\t\t// Draggable range only: ignore empty track clicks\n\t\tif (isTrack && this._slider.isDraggableRangeOnly()) return;\n\n\t\ttarget.setPointerCapture(event.pointerId);\n\t\tconst isRange = this._isRange(target);\n\n\t\t// Prevent browser focus behaviour because we instead focus a thumb manually when values change.\n\t\tif (isTrack || isRange) event.preventDefault();\n\n\t\tif ((isRange && this._slider.isDraggableRange()) || this._slider.isDraggableRangeOnly()) {\n\t\t\tthis._rangeDragStartPointer = this._getPointerPosition(event);\n\t\t\treturn;\n\t\t}\n\n\t\tconst pointerPosition = this._getPointerPosition(event);\n\t\tconst value = this._getValueFromPointer(pointerPosition);\n\t\tconst closestIndex = getClosestValueIndex(this._slider.normalizedValue(), value);\n\n\t\tif (isTrack || isRange) {\n\t\t\tthis._slider.setValue(value, closestIndex);\n\t\t} else {\n\t\t\tthis._slider.valueIndexToChange.set(closestIndex);\n\t\t}\n\t}\n\n\tpublic onPointerMove(event: PointerEvent): void {\n\t\tif (this._slider.mutableDisabled()) return;\n\n\t\tconst target = event.target as HTMLElement;\n\t\tif (!target.hasPointerCapture(event.pointerId)) return;\n\n\t\tif (this._rangeDragStartPointer !== null && this._slider.isDraggableRange()) {\n\t\t\tconst currentPointer = this._getPointerPosition(event);\n\t\t\tconst pixelDelta = currentPointer - this._rangeDragStartPointer;\n\t\t\tconst valueDelta = this._pixelDeltaToValueDelta(pixelDelta);\n\n\t\t\t// Accumulate sub-step deltas\n\t\t\tthis._rangeDragAccumulatedDelta += valueDelta;\n\n\t\t\tconst step = this._slider.step();\n\t\t\tconst snappedDelta = Math.trunc(this._rangeDragAccumulatedDelta / step) * step;\n\n\t\t\tif (snappedDelta !== 0) {\n\t\t\t\tthis._slider.setAllValuesByDelta(snappedDelta);\n\n\t\t\t\t// Remove the applied delta, keep remainder\n\t\t\t\tthis._rangeDragAccumulatedDelta -= snappedDelta;\n\t\t\t}\n\n\t\t\t// Reset start pointer so delta stays incremental\n\t\t\tthis._rangeDragStartPointer = currentPointer;\n\t\t\treturn;\n\t\t}\n\n\t\tconst pointerPosition = this._getPointerPosition(event);\n\t\tconst value = this._getValueFromPointer(pointerPosition);\n\t\tthis._slider.setValue(value, this._slider.valueIndexToChange());\n\t}\n\n\tpublic onPointerUp(event: PointerEvent): void {\n\t\tconst target = event.target as HTMLElement;\n\n\t\tif (target.hasPointerCapture(event.pointerId)) {\n\t\t\ttarget.releasePointerCapture(event.pointerId);\n\t\t}\n\n\t\tthis._rangeDragStartPointer = null;\n\t\tthis._rangeDragAccumulatedDelta = 0;\n\t}\n\n\tprivate _getValueFromPointer(pointerPosition: number): number {\n\t\tconst rect = this._elementRef.nativeElement.getBoundingClientRect();\n\t\tconst source = this._slider.slidingSource();\n\n\t\tconst isVertical = source === 'top' || source === 'bottom';\n\t\tconst size = isVertical ? rect.height : rect.width;\n\n\t\tconst input: [number, number] = [0, size];\n\t\tconst output: [number, number] = [this._slider.min(), this._slider.max()];\n\t\tconst value = linearScale(input, output);\n\n\t\tlet relativePosition: number;\n\n\t\tswitch (source) {\n\t\t\tcase 'left':\n\t\t\t\trelativePosition = pointerPosition - rect.left;\n\t\t\t\tbreak;\n\t\t\tcase 'right':\n\t\t\t\trelativePosition = rect.right - pointerPosition;\n\t\t\t\tbreak;\n\t\t\tcase 'top':\n\t\t\t\trelativePosition = pointerPosition - rect.top;\n\t\t\t\tbreak;\n\t\t\tcase 'bottom':\n\t\t\t\trelativePosition = rect.bottom - pointerPosition;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn value(relativePosition);\n\t}\n\n\tprivate _pixelDeltaToValueDelta(pixelDelta: number): number {\n\t\tconst rect = this._elementRef.nativeElement.getBoundingClientRect();\n\t\tconst size = this._slider.isHorizontal() ? rect.width : rect.height;\n\n\t\tconst scale = linearScale([0, size], [this._slider.min(), this._slider.max()]);\n\n\t\t// Determine direction multiplier based on sliding source\n\t\tlet direction = 1;\n\t\tswitch (this._slider.slidingSource()) {\n\t\t\tcase 'right':\n\t\t\tcase 'bottom':\n\t\t\t\tdirection = -1;\n\t\t\t\tbreak;\n\t\t\tcase 'left':\n\t\t\tcase 'top':\n\t\t\t\tdirection = 1;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn scale(pixelDelta * direction) - scale(0);\n\t}\n\n\tprivate _isTrack(el: HTMLElement): boolean {\n\t\treturn this._elementRef.nativeElement === el;\n\t}\n\n\tprivate _isRange(el: HTMLElement): boolean {\n\t\treturn this._slider.range()?.elementRef.nativeElement === el;\n\t}\n\n\tprivate _getPointerPosition(event: PointerEvent): number {\n\t\treturn this._slider.orientation() === 'horizontal' ? event.clientX : event.clientY;\n\t}\n}\n\nfunction getClosestValueIndex(values: number[], nextValue: number): number {\n\tif (values.length === 1) return 0;\n\tconst distances = values.map((value) => Math.abs(value - nextValue));\n\tconst closestDistance = Math.min(...distances);\n\treturn distances.indexOf(closestDistance);\n}\n","import { BrnSlider } from './lib/brn-slider';\nimport { BrnSliderRange } from './lib/brn-slider-range';\nimport { BrnSliderThumb } from './lib/brn-slider-thumb';\nimport { BrnSliderTick } from './lib/brn-slider-tick';\nimport { BrnSliderTrack } from './lib/brn-slider-track';\n\nexport * from './lib/brn-slider';\nexport * from './lib/brn-slider-range';\nexport * from './lib/brn-slider-thumb';\nexport * from './lib/brn-slider-tick';\nexport * from './lib/brn-slider-track';\nexport * from './lib/brn-slider-track.token';\nexport * from './lib/brn-slider.token';\n\nexport const BrnSliderImports = [BrnSlider, BrnSliderTrack, BrnSliderThumb, BrnSliderRange, BrnSliderTick] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAGA,MAAM,cAAc,GAAG,IAAI,cAAc,CAAY,gBAAgB,CAAC;AAEhE,SAAU,gBAAgB,CAAC,MAAuB,EAAA;IACvD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE;AACxD;SAEgB,eAAe,GAAA;AAC9B,IAAA,OAAO,MAAM,CAAC,cAAc,CAAC;AAC9B;;ACaO,MAAM,yBAAyB,GAAG;AACxC,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,SAAS,CAAC;AACxC,IAAA,KAAK,EAAE,IAAI;;AAGZ,IAAI,MAAM,GAAG,CAAC;MAuBD,SAAS,CAAA;AACJ,IAAA,IAAI,GAAG,MAAM,CAAC,cAAc,CAAC;AAC7B,IAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC5B,IAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;IACjD,SAAS,GAAqB,IAAI;AAEtB,IAAA,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO;AACzC,IAAA,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK;AACjC,IAAA,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,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G,CAAC,GAAG,SAAS,CAAC;AAC9C,IAAA,OAAO,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC;AAC1C;;ACjKO,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa;;ACdzG;;AAEG;;;;"}
1
+ {"version":3,"file":"spartan-ng-brain-slider.mjs","sources":["../../../../libs/brain/slider/src/lib/brn-slider.token.ts","../../../../libs/brain/slider/src/lib/brn-slider.ts","../../../../libs/brain/slider/src/lib/brn-slider-range.ts","../../../../libs/brain/slider/src/lib/utils/linear-scale.ts","../../../../libs/brain/slider/src/lib/brn-slider-thumb.ts","../../../../libs/brain/slider/src/lib/brn-slider-tick.ts","../../../../libs/brain/slider/src/lib/brn-slider-track.token.ts","../../../../libs/brain/slider/src/lib/brn-slider-track.ts","../../../../libs/brain/slider/src/index.ts","../../../../libs/brain/slider/src/spartan-ng-brain-slider.ts"],"sourcesContent":["import { type ExistingProvider, inject, InjectionToken, type Type } from '@angular/core';\nimport type { BrnSlider } from './brn-slider';\n\nconst BrnSliderToken = new InjectionToken<BrnSlider>('BrnSliderToken');\n\nexport function provideBrnSlider(slider: Type<BrnSlider>): ExistingProvider {\n\treturn { provide: BrnSliderToken, useExisting: slider };\n}\n\nexport function injectBrnSlider(): BrnSlider {\n\treturn inject(BrnSliderToken);\n}\n","import { Directionality } from '@angular/cdk/bidi';\nimport type { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n\tbooleanAttribute,\n\tcomputed,\n\tDirective,\n\tforwardRef,\n\tinject,\n\tInjector,\n\tinput,\n\tlinkedSignal,\n\tnumberAttribute,\n\ttype OnInit,\n\toutput,\n\tsignal,\n} from '@angular/core';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR, NgControl, NgModel } from '@angular/forms';\nimport { BrnFieldControl } from '@spartan-ng/brain/field';\nimport { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\nimport type { BrnSliderRange } from './brn-slider-range';\nimport type { BrnSliderThumb } from './brn-slider-thumb';\nimport type { BrnSliderTrack } from './brn-slider-track';\nimport { provideBrnSlider } from './brn-slider.token';\n\nexport const BRN_SLIDER_VALUE_ACCESSOR = {\n\tprovide: NG_VALUE_ACCESSOR,\n\tuseExisting: forwardRef(() => BrnSlider),\n\tmulti: true,\n};\n\nlet nextId = 0;\n\n@Directive({\n\tselector: '[brnSlider]',\n\texportAs: 'brnSlider',\n\tproviders: [BRN_SLIDER_VALUE_ACCESSOR, provideBrnSlider(BrnSlider)],\n\thostDirectives: [BrnFieldControl],\n\thost: {\n\t\t'[attr.id]': 'id()',\n\t\t'[attr.dir]': '_direction()',\n\t\t'[attr.aria-disabled]': 'mutableDisabled() ? \"true\" : null',\n\t\t'[attr.data-disabled]': 'mutableDisabled() ? \"\" : null',\n\t\t'[attr.data-inverted]': 'inverted() ? \"\" : null',\n\t\t'[attr.data-orientation]': 'orientation()',\n\t\t'data-slot': 'slider',\n\t\t'(focusout)': '_onFocusOut($event)',\n\t\t'[attr.aria-invalid]': '_ariaInvalid() ? \"true\" : null',\n\t\t'[attr.data-invalid]': '_ariaInvalid() ? \"true\" : null',\n\t\t'[attr.data-matches-spartan-invalid]': '_ariaInvalid() ? \"true\" : null',\n\t\t'[attr.data-dirty]': '_dirty() ? \"true\" : null',\n\t\t'[attr.data-touched]': '_touched() ? \"true\" : null',\n\t},\n})\nexport class BrnSlider implements ControlValueAccessor, OnInit {\n\tprivate readonly _dir = inject(Directionality);\n\tprivate readonly _injector = inject(Injector);\n\tprivate readonly _fieldControl = inject(BrnFieldControl);\n\tpublic ngControl: NgControl | null = null;\n\n\tprotected readonly _ariaInvalid = this._fieldControl.invalid;\n\tprotected readonly _dirty = this._fieldControl.dirty;\n\tprotected readonly _touched = this._fieldControl.touched;\n\tprotected readonly _spartanInvalid = this._fieldControl.spartanInvalid;\n\n\t/** Unique identifier for the slider element. Auto-generated if not provided. */\n\tpublic readonly id = input<string>(`brn-slider-${++nextId}`);\n\n\t/** Accessibility label for the slider. Forwarded to all thumbs. */\n\tpublic readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n\t/** ID of the element that labels this slider for accessibility. Forwarded to all thumbs. */\n\tpublic readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\n\t/**\n\t * The current slider value(s).\n\t *\n\t * For single-thumb sliders, this contains one value.\n\t * For range sliders, values are kept sorted in ascending order.\n\t */\n\tpublic readonly valueInput = input<number[]>([], { alias: 'value' });\n\tpublic readonly value = linkedSignal(this.valueInput);\n\n\t/** Minimum allowed slider value. */\n\tpublic readonly min = input<number, NumberInput>(0, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Maximum allowed slider value. */\n\tpublic readonly max = input<number, NumberInput>(100, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Step increment used when changing values. */\n\tpublic readonly step = input<number, NumberInput>(1, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Minimum number of steps required between thumbs in a range slider. */\n\tpublic readonly minStepsBetweenThumbs = input<number, NumberInput>(0, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Maximum number of steps allowed between thumbs in a range slider. */\n\tpublic readonly maxStepsBetweenThumbs = input<number, NumberInput>(Number.POSITIVE_INFINITY, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Whether a thumb is prevented from being dragged past its neighbouring thumbs in a range slider. */\n\tpublic readonly preventStepOverThumb = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Whether the slider is disabled. */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Whether the slider direction is inverted. */\n\tpublic readonly inverted = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Slider orientation. */\n\tpublic readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n\n\t/** Whether tick marks should be displayed. */\n\tpublic readonly showTicks = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Maximum number of ticks to render. Excess ticks are evenly distributed. */\n\tpublic readonly maxTicks = input<number, NumberInput>(25, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Interval at which tick labels are shown. A value of `2` shows a label every second tick. */\n\tpublic readonly tickLabelInterval = input<number, NumberInput>(2, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Defines how the tick should be displayed in the UI. */\n\tpublic readonly formatTick = input<(tick: number) => string>((tick) => tick.toString());\n\n\t/** Whether dragging the selected range should move all thumbs together. */\n\tpublic readonly draggableRange = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Whether only dragging the range should work (overrides normal track clicks). */\n\tpublic readonly draggableRangeOnly = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Emits when the value changes. */\n\tpublic readonly valueChange = output<number[]>();\n\n\t/** @internal Normalized slider values. Values are clamped to `[min, max]` and sorted in ascending order. */\n\tpublic readonly normalizedValue = computed(\n\t\t() => [...this.value()].sort((a, b) => a - b).map((v) => clamp(v, [this.min(), this.max()])),\n\t\t{ equal: areArrsEqual },\n\t);\n\n\t/** Indexes for all active thumbs. */\n\tpublic readonly thumbIndexes = computed(() => Array.from({ length: this.normalizedValue().length }, (_, i) => i), {\n\t\tequal: (a, b) => a.length === b.length,\n\t});\n\n\t/** @internal Whether the slider is in range mode and draggable range is enabled */\n\tpublic readonly isDraggableRange = computed(() => this.draggableRange() && this.normalizedValue().length > 1);\n\n\t/** @internal Whether dragging should only move the range. */\n\tpublic readonly isDraggableRangeOnly = computed(() => this.draggableRangeOnly() && this.isDraggableRange());\n\n\tprotected readonly _direction = this._dir.valueSignal;\n\n\t/** @internal Logical edge from which the slider value increases. */\n\tpublic readonly slidingSource = computed<'top' | 'bottom' | 'left' | 'right'>(() => {\n\t\tconst orientation = this.orientation();\n\t\tconst inverted = this.inverted();\n\n\t\tif (orientation === 'vertical') {\n\t\t\treturn inverted ? 'top' : 'bottom';\n\t\t}\n\n\t\tconst isLtr = this._direction() === 'ltr';\n\t\tconst fromLeft = (isLtr && !inverted) || (!isLtr && inverted);\n\n\t\treturn fromLeft ? 'left' : 'right';\n\t});\n\n\t/** @internal */\n\tpublic readonly isHorizontal = computed(() => this.orientation() === 'horizontal');\n\n\t/** @internal Reference to the slider track instance. */\n\tpublic readonly track = signal<BrnSliderTrack | null>(null);\n\n\t/** @internal Reference to the slider range instance. */\n\tpublic readonly range = signal<BrnSliderRange | null>(null);\n\n\t/** @internal All registered slider thumbs. */\n\tpublic readonly thumbs = signal<BrnSliderThumb[]>([]);\n\n\t/** @internal Index of the thumb currently being updated. */\n\tpublic readonly valueIndexToChange = signal(0);\n\n\t/** @internal Visible tick values after applying density reduction. */\n\tpublic readonly ticks = computed(() => {\n\t\tif (!this.showTicks()) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\t\tconst step = this.step();\n\t\tconst maxTicks = this.maxTicks();\n\n\t\tif (step <= 0 || min > max) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst totalCount = Math.floor((max - min) / step) + 1;\n\n\t\t// No need to reduce\n\t\tif (totalCount <= maxTicks) {\n\t\t\treturn Array.from({ length: totalCount }, (_, i) => min + i * step);\n\t\t}\n\n\t\tconst stride = Math.ceil(totalCount / maxTicks);\n\n\t\treturn Array.from({ length: totalCount }, (_, i) => min + i * step).filter((_, index) => index % stride === 0);\n\t});\n\n\t/** @internal Disabled state that can be controlled internally or externally. */\n\tpublic readonly mutableDisabled = linkedSignal(() => this.disabled());\n\n\t/** @internal Store the on change callback */\n\tprivate _onChange?: ChangeFn<number[]>;\n\n\t/** @internal Store the on touched callback */\n\tprivate _onTouched?: TouchFn;\n\n\tngOnInit(): void {\n\t\tthis.ngControl = this._injector.get(NgControl, null);\n\n\t\t// If bound to an Angular form control, writeValue() will run after ngOnInit,\n\t\t// so avoid initializing defaults here to prevent a transient min-value override.\n\t\tif (!this.ngControl) {\n\t\t\tif (!this.value().length) {\n\t\t\t\tconst defaultValue = [this.min()];\n\t\t\t\tthis.value.set(defaultValue);\n\t\t\t}\n\n\t\t\tconst normalizedValue = this.value()\n\t\t\t\t.map((v) => clamp(v, [this.min(), this.max()]))\n\t\t\t\t.sort((a, b) => a - b);\n\n\t\t\tif (!areArrsEqual(normalizedValue, this.value())) {\n\t\t\t\tthis.value.set(normalizedValue);\n\t\t\t}\n\t\t}\n\t}\n\n\tregisterOnChange(fn: (value: number[]) => void): void {\n\t\tthis._onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: () => void): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.mutableDisabled.set(isDisabled);\n\t}\n\n\twriteValue(value: number[]): void {\n\t\tif (!Array.isArray(value)) return;\n\n\t\tif (this.ngControl instanceof NgModel && !this._onChange) {\n\t\t\t// Avoid phantom call for ngModel\n\t\t\t// https://github.com/angular/angular/issues/14988#issuecomment-2946355465\n\t\t\treturn;\n\t\t}\n\n\t\tconst newValue = [...value].sort((a, b) => a - b).map((v) => clamp(v, [this.min(), this.max()]));\n\t\tthis.value.set(newValue);\n\t}\n\n\t/** Sets a new value for the slider at the given thumb index. */\n\tsetValue(value: number, atIndex: number): void {\n\t\tconst decimalCount = getDecimalCount(this.step());\n\t\tconst snapToStep = roundValue(\n\t\t\tMath.round((value - this.min()) / this.step()) * this.step() + this.min(),\n\t\t\tdecimalCount,\n\t\t);\n\n\t\tvalue = clamp(snapToStep, [this.min(), this.max()]);\n\n\t\tconst currentValue = this.normalizedValue();\n\n\t\tif (this.preventStepOverThumb() && currentValue.length > 1) {\n\t\t\tconst gap = this.minStepsBetweenThumbs() * this.step();\n\t\t\tconst lowerBound = atIndex > 0 ? Math.max(this.min(), currentValue[atIndex - 1] + gap) : this.min();\n\t\t\tconst upperBound =\n\t\t\t\tatIndex < currentValue.length - 1 ? Math.min(this.max(), currentValue[atIndex + 1] - gap) : this.max();\n\t\t\tvalue = clamp(value, [lowerBound, upperBound]);\n\t\t}\n\n\t\tconst newValue = [...currentValue];\n\t\tnewValue[atIndex] = value;\n\t\tnewValue.sort((a, b) => a - b);\n\n\t\tlet newValIndex = 0;\n\t\tfor (let i = 0; i < newValue.length; i++) {\n\t\t\tif (newValue[i] < value || (newValue[i] === value && i < atIndex)) {\n\t\t\t\tnewValIndex = i + 1;\n\t\t\t}\n\t\t}\n\n\t\t// Only validate the gaps adjacent to the moved thumb so that a state which already\n\t\t// violates the constraint (e.g. set programmatically via a form control) can still be\n\t\t// brought back into compliance by dragging.\n\t\tif (!isGapAtIndexWithinBounds(newValue, newValIndex, this.minStepsBetweenThumbs() * this.step(), true)) return;\n\n\t\tif (!isGapAtIndexWithinBounds(newValue, newValIndex, this.maxStepsBetweenThumbs() * this.step(), false)) return;\n\n\t\tthis.valueIndexToChange.set(newValIndex);\n\n\t\tif (areArrsEqual(newValue, this.value())) return;\n\n\t\tthis.value.set(newValue);\n\t\tthis._onChange?.(newValue);\n\t\tthis.valueChange.emit(newValue);\n\n\t\tif (this.thumbs()[newValIndex]) {\n\t\t\tthis.thumbs()[newValIndex].elementRef.nativeElement.focus();\n\t\t}\n\t}\n\n\t/** Moves the entire range by a delta value, snapping to step and preserving spacing. */\n\tsetAllValuesByDelta(delta: number): void {\n\t\tconst current = this.normalizedValue();\n\t\tif (!current.length || delta === 0) return;\n\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\t\tconst step = this.step();\n\t\tconst decimalCount = getDecimalCount(step);\n\n\t\tconst snappedDelta = roundValue(Math.round(delta / step) * step, decimalCount);\n\t\tif (snappedDelta === 0) return;\n\n\t\tlet next = current.map((v) => v + snappedDelta);\n\n\t\tconst rangeMin = Math.min(...next);\n\t\tconst rangeMax = Math.max(...next);\n\n\t\tif (rangeMin < min) {\n\t\t\tconst offset = min - rangeMin;\n\t\t\tnext = next.map((v) => v + offset);\n\t\t} else if (rangeMax > max) {\n\t\t\tconst offset = max - rangeMax;\n\t\t\tnext = next.map((v) => v + offset);\n\t\t}\n\n\t\tnext = next.map((v) => roundValue(v, decimalCount));\n\n\t\tif (areArrsEqual(next, this.value())) return;\n\n\t\tthis.value.set(next);\n\t\tthis._onChange?.(next);\n\t\tthis.valueChange.emit(next);\n\t}\n\n\t/** @internal */\n\taddThumb(thumb: BrnSliderThumb): void {\n\t\tthis.thumbs.update((thumbs) => {\n\t\t\tthumbs.push(thumb);\n\t\t\treturn [...thumbs];\n\t\t});\n\t}\n\n\t/** @internal */\n\tremoveThumb(thumb: BrnSliderThumb): void {\n\t\tthis.thumbs.update((thumbs) => thumbs.filter((t) => t !== thumb));\n\t}\n\n\tprotected _onFocusOut(event: FocusEvent): void {\n\t\tconst currentTarget = event.currentTarget as HTMLElement;\n\t\tconst focusedEl = event.relatedTarget as HTMLElement | null;\n\n\t\tif (!currentTarget.contains(focusedEl)) {\n\t\t\tthis._onTouched?.();\n\t\t}\n\t}\n}\n\nfunction areArrsEqual(arr1: unknown[], arr2: unknown[]): boolean {\n\treturn String(arr1) === String(arr2);\n}\n\nfunction roundValue(value: number, decimalCount: number): number {\n\tconst rounder = Math.pow(10, decimalCount);\n\treturn Math.round(value * rounder) / rounder;\n}\n\nfunction getDecimalCount(value: number): number {\n\treturn (String(value).split('.')[1] || '').length;\n}\n\nfunction clamp(value: number, [min, max]: [number, number]): number {\n\treturn Math.min(max, Math.max(min, value));\n}\n\n/**\n * Validates only the gaps immediately adjacent to `index`.\n *\n * Checking a single gap (instead of every gap) keeps the slider usable when its initial state\n * already violates the constraint: the unchanged gaps are ignored, so the user can gradually drag\n * the thumbs back into compliance.\n *\n * @param isMin When `true`, the adjacent gaps must be `>= bound`; otherwise they must be `<= bound`.\n */\nfunction isGapAtIndexWithinBounds(values: number[], index: number, bound: number, isMin: boolean): boolean {\n\tif (isMin ? bound <= 0 : !Number.isFinite(bound)) {\n\t\treturn true;\n\t}\n\n\tconst leftGap = index > 0 ? values[index] - values[index - 1] : undefined;\n\tconst rightGap = index < values.length - 1 ? values[index + 1] - values[index] : undefined;\n\n\tfor (const gap of [leftGap, rightGap]) {\n\t\tif (gap === undefined) continue;\n\t\tif (isMin ? gap < bound : gap > bound) return false;\n\t}\n\n\treturn true;\n}\n","import { computed, Directive, ElementRef, inject } from '@angular/core';\nimport { injectBrnSlider } from './brn-slider.token';\n\n@Directive({\n\tselector: '[brnSliderRange]',\n\thost: {\n\t\t'[attr.data-disabled]': '_slider.mutableDisabled() ? \"\" : null',\n\t\t'[attr.data-orientation]': '_slider.orientation()',\n\t\t'[attr.data-draggable-range]': '_slider.isDraggableRange() ? \"\" : null',\n\t\t'data-slot': 'slider-range',\n\t\t'[style.inset-inline]': '_slider.isHorizontal() ? _rangeInset() : undefined',\n\t\t'[style.inset-block]': '!_slider.isHorizontal() ? _rangeInset() : undefined',\n\t},\n})\nexport class BrnSliderRange {\n\tprotected readonly _slider = injectBrnSlider();\n\tpublic readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n\tconstructor() {\n\t\tthis._slider.range.set(this);\n\t}\n\n\tprotected readonly _rangeInset = computed(() => {\n\t\tconst thumbs = this._slider.thumbs();\n\t\tif (!thumbs.length) return;\n\n\t\tconst inverted = this._slider.inverted();\n\t\tconst isHorizontal = this._slider.isHorizontal();\n\n\t\tconst start = thumbs[0].percentage();\n\t\tconst end = thumbs[thumbs.length - 1].percentage();\n\n\t\tconst inset = thumbs.length > 1 ? [`${start}%`, `${100 - end}%`] : ['0px', `${100 - start}%`];\n\n\t\tif (!isHorizontal) {\n\t\t\tinset.reverse();\n\t\t}\n\n\t\tif (inverted) {\n\t\t\tinset.reverse();\n\t\t}\n\n\t\treturn inset.join(' ');\n\t});\n}\n","export function linearScale(\n\tinput: readonly [number, number],\n\toutput: readonly [number, number],\n): (value: number) => number {\n\treturn (value: number) => {\n\t\tif (input[0] === input[1] || output[0] === output[1]) return output[0];\n\t\tconst ratio = (output[1] - output[0]) / (input[1] - input[0]);\n\t\treturn output[0] + ratio * (value - input[0]);\n\t};\n}\n","import { isPlatformServer } from '@angular/common';\nimport { computed, DestroyRef, Directive, ElementRef, inject, PLATFORM_ID } from '@angular/core';\nimport { injectElementSize } from '@spartan-ng/brain/core';\nimport { injectBrnSlider } from './brn-slider.token';\nimport { linearScale } from './utils/linear-scale';\n\nconst PAGE_KEYS = ['PageUp', 'PageDown'];\n\n@Directive({\n\tselector: '[brnSliderThumb]',\n\thost: {\n\t\trole: 'slider',\n\t\t'[attr.aria-label]': `_computedAriaLabel()`,\n\t\t'[attr.aria-labelledby]': '_slider.ariaLabelledby() || null',\n\t\t'[attr.aria-orientation]': '_slider.orientation()',\n\t\t'[attr.aria-valuenow]': '_slider.normalizedValue()[_index()]',\n\t\t'[attr.aria-valuemin]': '_slider.min()',\n\t\t'[attr.aria-valuemax]': '_slider.max()',\n\t\t'[attr.tabindex]': '_slider.mutableDisabled() ? -1 : 0',\n\t\t'[attr.data-disabled]': '_slider.mutableDisabled() ? \"\" : null',\n\t\t'[attr.data-orientation]': '_slider.orientation()',\n\t\t'[style.inset-inline-start]':\n\t\t\t'_slider.isHorizontal() ? _slider.inverted() ? undefined : _thumbOffset() : undefined',\n\t\t'[style.inset-inline-end]': '_slider.isHorizontal() ? _slider.inverted() ? _thumbOffset() : undefined : undefined',\n\t\t'[style.inset-block-end]': '!_slider.isHorizontal() ? _slider.inverted() ? undefined : _thumbOffset() : undefined',\n\t\t'[style.inset-block-start]':\n\t\t\t'!_slider.isHorizontal() ? _slider.inverted() ? _thumbOffset() : undefined : undefined',\n\t\t'[style.visibility]': '_thumbReady() ? undefined : \"hidden\"',\n\t\t'[style.pointer-events]': '_thumbReady() ? undefined : \"none\"',\n\t\t'[style.transform]': '_transformValue()',\n\t\t'data-slot': 'slider-thumb',\n\t\t'(pointerdown)': '_onPointerDown($event)',\n\t\t'(pointermove)': '_onPointerMove($event)',\n\t\t'(pointerup)': '_onPointerUp($event)',\n\t\t'(keydown)': 'handleKeydown($event)',\n\t},\n})\nexport class BrnSliderThumb {\n\tprivate readonly _platform = inject(PLATFORM_ID);\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _size = injectElementSize();\n\tprotected readonly _slider = injectBrnSlider();\n\tpublic readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n\t/**\n\t * Indicates whether the thumb is ready to be displayed and interactable.\n\t *\n\t * This signal returns `true` when the element's size has been measured\n\t * and the width is greater than 0. It ensures that the thumb is not\n\t * rendered or interacted with prematurely, which prevents layout\n\t * issues or first-frame “jerks” when using SSR.\n\t */\n\tprotected readonly _thumbReady = computed(() => {\n\t\tconst size = this._size();\n\t\treturn !!size && size.width > 0;\n\t});\n\n\tprotected readonly _index = computed(() => this._slider.thumbs().findIndex((thumb) => thumb === this));\n\n\tpublic readonly percentage = computed(() => {\n\t\tconst range = this._slider.max() - this._slider.min();\n\t\tif (range === 0) return 0;\n\n\t\treturn ((this._slider.normalizedValue()[this._index()] - this._slider.min()) / range) * 100;\n\t});\n\n\tprivate readonly _thumbInBoundsOffset = computed(() => {\n\t\t// we can't compute the offset on the server\n\t\tif (isPlatformServer(this._platform)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst size = this._slider.isHorizontal() ? this._size()?.width : this._size()?.height;\n\t\tif (!size) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst halfSize = size / 2;\n\t\tconst offset = linearScale([0, 50], [0, halfSize]);\n\t\tconst direction = this._slider.slidingSource() === 'left' || this._slider.slidingSource() === 'top' ? 1 : -1;\n\n\t\treturn (halfSize - offset(this.percentage()) * direction) * direction;\n\t});\n\n\t/**\n\t * Offsets the thumb centre point while sliding to ensure it remains\n\t * within the bounds of the slider when reaching the edges.\n\t * Based on https://github.com/radix-ui/primitives/blob/main/packages/react/slider/src/slider.tsx\n\t */\n\tprotected readonly _thumbOffset = computed(() => {\n\t\t// we can't compute the offset on the server\n\t\tif (isPlatformServer(this._platform)) {\n\t\t\treturn this.percentage() + '%';\n\t\t}\n\n\t\treturn `calc(${this.percentage()}% + ${this._thumbInBoundsOffset()}px)`;\n\t});\n\n\tprotected readonly _computedAriaLabel = computed(\n\t\t() => this._slider.ariaLabel() || `Value ${this._index() + 1} of ${this._slider.normalizedValue().length}`,\n\t);\n\n\tprotected readonly _transformValue = computed(() =>\n\t\tthis._slider.orientation() === 'horizontal' ? 'translateX(-50%)' : 'translateY(-50%)',\n\t);\n\n\tconstructor() {\n\t\tthis._slider.addThumb(this);\n\n\t\tthis._destroyRef.onDestroy(() => {\n\t\t\tthis._slider.removeThumb(this);\n\t\t});\n\t}\n\n\tprotected _onPointerDown(event: PointerEvent): void {\n\t\tthis._slider.track()?.onPointerDown(event);\n\t}\n\n\tprotected _onPointerMove(event: PointerEvent): void {\n\t\tthis._slider.track()?.onPointerMove(event);\n\t}\n\n\tprotected _onPointerUp(event: PointerEvent): void {\n\t\tthis._slider.track()?.onPointerUp(event);\n\t}\n\n\tprotected handleKeydown(event: KeyboardEvent): void {\n\t\tif (this._slider.mutableDisabled()) return;\n\n\t\tconst step = this._slider.step();\n\t\tconst min = this._slider.min();\n\t\tconst max = this._slider.max();\n\t\tconst multiplier = event.shiftKey || PAGE_KEYS.includes(event.key) ? 10 : 1;\n\n\t\t// Determine delta based on slider orientation\n\t\tconst dirLR = this._slider.slidingSource() === 'right' ? -1 : 1;\n\t\tconst dirUD = this._slider.slidingSource() === 'top' ? -1 : 1;\n\n\t\tconst deltas: Partial<Record<string, number>> = {\n\t\t\tArrowLeft: -step * multiplier * dirLR,\n\t\t\tArrowRight: step * multiplier * dirLR,\n\t\t\tArrowUp: step * multiplier * dirUD,\n\t\t\tArrowDown: -step * multiplier * dirUD,\n\t\t\tPageUp: step * multiplier,\n\t\t\tPageDown: -step * multiplier,\n\t\t};\n\n\t\t// Home/End keys\n\t\tif (event.key === 'Home') {\n\t\t\tif (this._slider.isDraggableRangeOnly()) {\n\t\t\t\tconst range = this._slider.normalizedValue();\n\t\t\t\tconst delta = min - range[0];\n\t\t\t\tthis._slider.setAllValuesByDelta(delta);\n\t\t\t} else {\n\t\t\t\tthis._slider.setValue(min, this._index());\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.key === 'End') {\n\t\t\tif (this._slider.isDraggableRangeOnly()) {\n\t\t\t\tconst range = this._slider.normalizedValue();\n\t\t\t\tconst delta = max - range[range.length - 1];\n\t\t\t\tthis._slider.setAllValuesByDelta(delta);\n\t\t\t} else {\n\t\t\t\tthis._slider.setValue(max, this._index());\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tconst delta = deltas[event.key];\n\t\tif (delta === undefined) return;\n\n\t\tif (this._slider.isDraggableRangeOnly()) {\n\t\t\tthis._slider.setAllValuesByDelta(delta);\n\t\t} else {\n\t\t\tconst index = this._index();\n\t\t\tconst value = this._slider.normalizedValue()[index];\n\t\t\tthis._slider.setValue(Math.min(max, Math.max(min, value + delta)), index);\n\t\t}\n\n\t\tevent.preventDefault();\n\t}\n}\n","import {\n\tDestroyRef,\n\tDirective,\n\teffect,\n\ttype EmbeddedViewRef,\n\tinject,\n\tRenderer2,\n\tTemplateRef,\n\tViewContainerRef,\n} from '@angular/core';\nimport { injectBrnSlider } from './brn-slider.token';\n\n@Directive({\n\tselector: '[brnSliderTick]',\n\thost: {\n\t\t'data-slot': 'slider-tick',\n\t},\n})\nexport class BrnSliderTick {\n\tprivate readonly _slider = injectBrnSlider();\n\tprivate readonly _templateRef = inject<TemplateRef<BrnSliderTickContext>>(TemplateRef);\n\tprivate readonly _renderer = inject(Renderer2);\n\tprivate readonly _viewContainer = inject(ViewContainerRef);\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate _ticks: EmbeddedViewRef<BrnSliderTickContext>[] = [];\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst ticks = this._slider.ticks();\n\t\t\tconst tickLabelInterval = this._slider.tickLabelInterval();\n\n\t\t\t// Remove any existing ticks\n\t\t\tthis._ticks.forEach((tick) => this._viewContainer.remove(this._viewContainer.indexOf(tick)));\n\n\t\t\t// Create new ticks\n\t\t\tthis._ticks = [];\n\n\t\t\tticks.forEach((tick, index) => {\n\t\t\t\tconst view = this._viewContainer.createEmbeddedView(this._templateRef, {\n\t\t\t\t\t$implicit: tick,\n\t\t\t\t\tindex,\n\t\t\t\t\tformattedTick: this._slider.formatTick()(tick),\n\t\t\t\t});\n\n\t\t\t\tconst tickEl = view.rootNodes[0] as HTMLElement;\n\t\t\t\tif (tickLabelInterval === 0 || index % tickLabelInterval !== 0) {\n\t\t\t\t\tthis._renderer.setAttribute(tickEl, 'data-skip', '');\n\t\t\t\t}\n\n\t\t\t\tthis._ticks.push(view);\n\t\t\t});\n\t\t});\n\n\t\tthis._destroyRef.onDestroy(() => {\n\t\t\tthis._ticks.forEach((tick) => this._viewContainer.remove(this._viewContainer.indexOf(tick)));\n\t\t});\n\t}\n}\n\nexport interface BrnSliderTickContext {\n\t$implicit: number;\n\tindex: number;\n\tformattedTick: string;\n}\n","import { type ExistingProvider, inject, InjectionToken, type Type } from '@angular/core';\nimport type { BrnSliderTrack } from './brn-slider-track';\n\nexport const BrnSliderTrackToken = new InjectionToken<BrnSliderTrack>('BrnSliderTrackToken');\n\nexport function provideBrnSliderTrack(slider: Type<BrnSliderTrack>): ExistingProvider {\n\treturn { provide: BrnSliderTrackToken, useExisting: slider };\n}\n\nexport function injectBrnSliderTrack(): BrnSliderTrack {\n\treturn inject(BrnSliderTrackToken);\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\nimport { provideBrnSliderTrack } from './brn-slider-track.token';\nimport { injectBrnSlider } from './brn-slider.token';\nimport { linearScale } from './utils/linear-scale';\n\n@Directive({\n\tselector: '[brnSliderTrack]',\n\tproviders: [provideBrnSliderTrack(BrnSliderTrack)],\n\thost: {\n\t\t'[attr.data-disabled]': '_slider.mutableDisabled() ? \"\" : null',\n\t\t'[attr.data-orientation]': '_slider.orientation()',\n\t\t'data-slot': 'slider-track',\n\t\t'(pointerdown)': 'onPointerDown($event)',\n\t\t'(pointermove)': 'onPointerMove($event)',\n\t\t'(pointerup)': 'onPointerUp($event)',\n\t},\n})\nexport class BrnSliderTrack {\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprotected readonly _slider = injectBrnSlider();\n\n\tprivate _rangeDragStartPointer: number | null = null;\n\tprivate _rangeDragAccumulatedDelta = 0;\n\n\tconstructor() {\n\t\tthis._slider.track.set(this);\n\t}\n\n\tpublic onPointerDown(event: PointerEvent): void {\n\t\tif (this._slider.mutableDisabled()) return;\n\n\t\tconst target = event.target as HTMLElement;\n\t\tconst isTrack = this._isTrack(target);\n\n\t\t// Draggable range only: ignore empty track clicks\n\t\tif (isTrack && this._slider.isDraggableRangeOnly()) return;\n\n\t\ttarget.setPointerCapture(event.pointerId);\n\t\tconst isRange = this._isRange(target);\n\n\t\t// Prevent browser focus behaviour because we instead focus a thumb manually when values change.\n\t\tif (isTrack || isRange) event.preventDefault();\n\n\t\tif ((isRange && this._slider.isDraggableRange()) || this._slider.isDraggableRangeOnly()) {\n\t\t\tthis._rangeDragStartPointer = this._getPointerPosition(event);\n\t\t\treturn;\n\t\t}\n\n\t\tconst pointerPosition = this._getPointerPosition(event);\n\t\tconst value = this._getValueFromPointer(pointerPosition);\n\t\tconst closestIndex = getClosestValueIndex(this._slider.normalizedValue(), value);\n\n\t\tif (isTrack || isRange) {\n\t\t\tthis._slider.setValue(value, closestIndex);\n\t\t} else {\n\t\t\tthis._slider.valueIndexToChange.set(closestIndex);\n\t\t}\n\t}\n\n\tpublic onPointerMove(event: PointerEvent): void {\n\t\tif (this._slider.mutableDisabled()) return;\n\n\t\tconst target = event.target as HTMLElement;\n\t\tif (!target.hasPointerCapture(event.pointerId)) return;\n\n\t\tif (this._rangeDragStartPointer !== null && this._slider.isDraggableRange()) {\n\t\t\tconst currentPointer = this._getPointerPosition(event);\n\t\t\tconst pixelDelta = currentPointer - this._rangeDragStartPointer;\n\t\t\tconst valueDelta = this._pixelDeltaToValueDelta(pixelDelta);\n\n\t\t\t// Accumulate sub-step deltas\n\t\t\tthis._rangeDragAccumulatedDelta += valueDelta;\n\n\t\t\tconst step = this._slider.step();\n\t\t\tconst snappedDelta = Math.trunc(this._rangeDragAccumulatedDelta / step) * step;\n\n\t\t\tif (snappedDelta !== 0) {\n\t\t\t\tthis._slider.setAllValuesByDelta(snappedDelta);\n\n\t\t\t\t// Remove the applied delta, keep remainder\n\t\t\t\tthis._rangeDragAccumulatedDelta -= snappedDelta;\n\t\t\t}\n\n\t\t\t// Reset start pointer so delta stays incremental\n\t\t\tthis._rangeDragStartPointer = currentPointer;\n\t\t\treturn;\n\t\t}\n\n\t\tconst pointerPosition = this._getPointerPosition(event);\n\t\tconst value = this._getValueFromPointer(pointerPosition);\n\t\tthis._slider.setValue(value, this._slider.valueIndexToChange());\n\t}\n\n\tpublic onPointerUp(event: PointerEvent): void {\n\t\tconst target = event.target as HTMLElement;\n\n\t\tif (target.hasPointerCapture(event.pointerId)) {\n\t\t\ttarget.releasePointerCapture(event.pointerId);\n\t\t}\n\n\t\tthis._rangeDragStartPointer = null;\n\t\tthis._rangeDragAccumulatedDelta = 0;\n\t}\n\n\tprivate _getValueFromPointer(pointerPosition: number): number {\n\t\tconst rect = this._elementRef.nativeElement.getBoundingClientRect();\n\t\tconst source = this._slider.slidingSource();\n\n\t\tconst isVertical = source === 'top' || source === 'bottom';\n\t\tconst size = isVertical ? rect.height : rect.width;\n\n\t\tconst input: [number, number] = [0, size];\n\t\tconst output: [number, number] = [this._slider.min(), this._slider.max()];\n\t\tconst value = linearScale(input, output);\n\n\t\tlet relativePosition: number;\n\n\t\tswitch (source) {\n\t\t\tcase 'left':\n\t\t\t\trelativePosition = pointerPosition - rect.left;\n\t\t\t\tbreak;\n\t\t\tcase 'right':\n\t\t\t\trelativePosition = rect.right - pointerPosition;\n\t\t\t\tbreak;\n\t\t\tcase 'top':\n\t\t\t\trelativePosition = pointerPosition - rect.top;\n\t\t\t\tbreak;\n\t\t\tcase 'bottom':\n\t\t\t\trelativePosition = rect.bottom - pointerPosition;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn value(relativePosition);\n\t}\n\n\tprivate _pixelDeltaToValueDelta(pixelDelta: number): number {\n\t\tconst rect = this._elementRef.nativeElement.getBoundingClientRect();\n\t\tconst size = this._slider.isHorizontal() ? rect.width : rect.height;\n\n\t\tconst scale = linearScale([0, size], [this._slider.min(), this._slider.max()]);\n\n\t\t// Determine direction multiplier based on sliding source\n\t\tlet direction = 1;\n\t\tswitch (this._slider.slidingSource()) {\n\t\t\tcase 'right':\n\t\t\tcase 'bottom':\n\t\t\t\tdirection = -1;\n\t\t\t\tbreak;\n\t\t\tcase 'left':\n\t\t\tcase 'top':\n\t\t\t\tdirection = 1;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn scale(pixelDelta * direction) - scale(0);\n\t}\n\n\tprivate _isTrack(el: HTMLElement): boolean {\n\t\treturn this._elementRef.nativeElement === el;\n\t}\n\n\tprivate _isRange(el: HTMLElement): boolean {\n\t\treturn this._slider.range()?.elementRef.nativeElement === el;\n\t}\n\n\tprivate _getPointerPosition(event: PointerEvent): number {\n\t\treturn this._slider.orientation() === 'horizontal' ? event.clientX : event.clientY;\n\t}\n}\n\nfunction getClosestValueIndex(values: number[], nextValue: number): number {\n\tif (values.length === 1) return 0;\n\tconst distances = values.map((value) => Math.abs(value - nextValue));\n\tconst closestDistance = Math.min(...distances);\n\treturn distances.indexOf(closestDistance);\n}\n","import { BrnSlider } from './lib/brn-slider';\nimport { BrnSliderRange } from './lib/brn-slider-range';\nimport { BrnSliderThumb } from './lib/brn-slider-thumb';\nimport { BrnSliderTick } from './lib/brn-slider-tick';\nimport { BrnSliderTrack } from './lib/brn-slider-track';\n\nexport * from './lib/brn-slider';\nexport * from './lib/brn-slider-range';\nexport * from './lib/brn-slider-thumb';\nexport * from './lib/brn-slider-tick';\nexport * from './lib/brn-slider-track';\nexport * from './lib/brn-slider-track.token';\nexport * from './lib/brn-slider.token';\n\nexport const BrnSliderImports = [BrnSlider, BrnSliderTrack, BrnSliderThumb, BrnSliderRange, BrnSliderTick] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAGA,MAAM,cAAc,GAAG,IAAI,cAAc,CAAY,gBAAgB,CAAC;AAEhE,SAAU,gBAAgB,CAAC,MAAuB,EAAA;IACvD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE;AACxD;SAEgB,eAAe,GAAA;AAC9B,IAAA,OAAO,MAAM,CAAC,cAAc,CAAC;AAC9B;;ACaO,MAAM,yBAAyB,GAAG;AACxC,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,SAAS,CAAC;AACxC,IAAA,KAAK,EAAE,IAAI;;AAGZ,IAAI,MAAM,GAAG,CAAC;MAuBD,SAAS,CAAA;AACJ,IAAA,IAAI,GAAG,MAAM,CAAC,cAAc,CAAC;AAC7B,IAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC5B,IAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;IACjD,SAAS,GAAqB,IAAI;AAEtB,IAAA,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO;AACzC,IAAA,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK;AACjC,IAAA,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO;AACrC,IAAA,eAAe,GAAG,IAAI,CAAC,aAAa,CAAC,cAAc;;IAGtD,EAAE,GAAG,KAAK,CAAS,CAAA,WAAA,EAAc,EAAE,MAAM,CAAA,CAAE,yEAAC;;IAG5C,SAAS,GAAG,KAAK,CAAgB,IAAI,iFAAI,KAAK,EAAE,YAAY,EAAA,CAAG;;IAG/D,cAAc,GAAG,KAAK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uBAAuB;AACxC,wBAAA,eAAe,EAAE,uBAAuB;AACxC,wBAAA,aAAa,EAAE,qBAAqB;AACpC,qBAAA;AACD,iBAAA;;AA0JD,SAAS,oBAAoB,CAAC,MAAgB,EAAE,SAAiB,EAAA;AAChE,IAAA,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,CAAC;IACjC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IACpE,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;AAC9C,IAAA,OAAO,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC;AAC1C;;ACjKO,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa;;ACdzG;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spartan-ng/brain",
3
- "version": "1.4.0-beta.3",
3
+ "version": "1.4.0-beta.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/spartan-ng/spartan.git"
@@ -104,6 +104,10 @@ declare class BrnSlider implements ControlValueAccessor, OnInit {
104
104
  readonly step: _angular_core.InputSignalWithTransform<number, NumberInput>;
105
105
  /** Minimum number of steps required between thumbs in a range slider. */
106
106
  readonly minStepsBetweenThumbs: _angular_core.InputSignalWithTransform<number, NumberInput>;
107
+ /** Maximum number of steps allowed between thumbs in a range slider. */
108
+ readonly maxStepsBetweenThumbs: _angular_core.InputSignalWithTransform<number, NumberInput>;
109
+ /** Whether a thumb is prevented from being dragged past its neighbouring thumbs in a range slider. */
110
+ readonly preventStepOverThumb: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
107
111
  /** Whether the slider is disabled. */
108
112
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
109
113
  /** Whether the slider direction is inverted. */
@@ -168,7 +172,7 @@ declare class BrnSlider implements ControlValueAccessor, OnInit {
168
172
  removeThumb(thumb: BrnSliderThumb): void;
169
173
  protected _onFocusOut(event: FocusEvent): void;
170
174
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnSlider, never>;
171
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnSlider, "[brnSlider]", ["brnSlider"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "valueInput": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "minStepsBetweenThumbs": { "alias": "minStepsBetweenThumbs"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inverted": { "alias": "inverted"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "showTicks": { "alias": "showTicks"; "required": false; "isSignal": true; }; "maxTicks": { "alias": "maxTicks"; "required": false; "isSignal": true; }; "tickLabelInterval": { "alias": "tickLabelInterval"; "required": false; "isSignal": true; }; "formatTick": { "alias": "formatTick"; "required": false; "isSignal": true; }; "draggableRange": { "alias": "draggableRange"; "required": false; "isSignal": true; }; "draggableRangeOnly": { "alias": "draggableRangeOnly"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, [{ directive: typeof i1.BrnFieldControl; inputs: {}; outputs: {}; }]>;
175
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnSlider, "[brnSlider]", ["brnSlider"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "valueInput": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "minStepsBetweenThumbs": { "alias": "minStepsBetweenThumbs"; "required": false; "isSignal": true; }; "maxStepsBetweenThumbs": { "alias": "maxStepsBetweenThumbs"; "required": false; "isSignal": true; }; "preventStepOverThumb": { "alias": "preventStepOverThumb"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inverted": { "alias": "inverted"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "showTicks": { "alias": "showTicks"; "required": false; "isSignal": true; }; "maxTicks": { "alias": "maxTicks"; "required": false; "isSignal": true; }; "tickLabelInterval": { "alias": "tickLabelInterval"; "required": false; "isSignal": true; }; "formatTick": { "alias": "formatTick"; "required": false; "isSignal": true; }; "draggableRange": { "alias": "draggableRange"; "required": false; "isSignal": true; }; "draggableRangeOnly": { "alias": "draggableRangeOnly"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, [{ directive: typeof i1.BrnFieldControl; inputs: {}; outputs: {}; }]>;
172
176
  }
173
177
 
174
178
  declare class BrnSliderTick {