@reforgium/internal 1.0.2 → 1.1.1

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.
@@ -394,6 +394,18 @@ type TranslationProvider = {
394
394
  */
395
395
  loadNamespace: (ns: string) => Promise<void>;
396
396
  };
397
+ /**
398
+ * Provider for changing the application lang.
399
+ *
400
+ * Supplies a method to programmatically switch between supported languages.
401
+ *
402
+ * @example
403
+ * ```ts
404
+ * const changeLang = inject(CHANGE_LANGE);
405
+ * changeLang('ru');
406
+ * ```
407
+ */
408
+ type ChangeLangProvider = (lang: Langs) => void;
397
409
  /**
398
410
  * Injection token for the current application language as a Signal.
399
411
  * Provides reactive access to the currently selected language.
@@ -402,6 +414,14 @@ type TranslationProvider = {
402
414
  * @type {InjectionToken<Signal<Langs>>}
403
415
  */
404
416
  declare const SELECTED_LANG: InjectionToken<Signal<Langs>>;
417
+ /**
418
+ * Injection token for language change provider.
419
+ * Provides access to method for changing the current application language.
420
+ * Can be overridden in app.config with a custom provider.
421
+ *
422
+ * @type {InjectionToken<ChangeLangProvider>}
423
+ */
424
+ declare const CHANGE_LANG: InjectionToken<ChangeLangProvider>;
405
425
  /**
406
426
  * Injection token for translation provider.
407
427
  * Provides access to translation methods for message retrieval and namespace loading.
@@ -417,11 +437,24 @@ declare const TRANSLATION: InjectionToken<TranslationProvider>;
417
437
  * `'dark'` — dark theme
418
438
  */
419
439
  type Themes = 'light' | 'dark';
440
+ /**
441
+ * Provider for changing the application theme.
442
+ *
443
+ * Supplies a method to programmatically switch between supported themes.
444
+ *
445
+ * @example
446
+ * ```ts
447
+ * const changeTheme = inject(CHANGE_THEME);
448
+ * changeTheme('dark');
449
+ * ```
450
+ */
451
+ type ChangeThemeProvider = (lang: Themes) => void;
420
452
  /**
421
453
  * Current application theme as Signal.
422
454
  * Can be overridden in app.config with a custom provider.
423
455
  */
424
456
  declare const SELECTED_THEME: InjectionToken<Signal<Themes>>;
457
+ declare const CHANGE_THEME: InjectionToken<ChangeThemeProvider>;
425
458
 
426
459
  /**
427
460
  * Supported device types for responsive design and device-specific logic.
@@ -501,148 +534,192 @@ type ValidationMessages = Record<string, (error: ValidationErrorData) => string>
501
534
  declare const VALIDATION_MESSAGES: InjectionToken<ValidationMessages>;
502
535
 
503
536
  /**
504
- * Загружает файл из объекта Blob и предлагает пользователю сохранить его.
537
+ * Downloads a file from a Blob object and prompts the user to save it.
505
538
  *
506
- * @param {Blob} blob - Объект Blob, представляющий файл для загрузки.
507
- * @param {string} [fileName] - Опционально. Имя для загружаемого файла.
508
- * Если не указано, в качестве имени файла будет использоваться текущая метка времени.
509
- * @return {void} Не возвращает значение.
539
+ * @param {Blob} blob - Blob object representing the file to download.
540
+ * @param {string} [fileName] - Optional. Name for the downloaded file.
541
+ * If not specified, the current timestamp will be used as the filename.
542
+ * @return {void} Does not return a value.
510
543
  */
511
544
  declare function downloadByBlob(blob: Blob, fileName?: string | undefined): void;
512
545
  /**
513
- * Инициирует загрузку файла по-указанному URL. Опционально можно указать пользовательское имя файла.
546
+ * Initiates a file download for the given URL. Optionally, a custom filename can be specified.
514
547
  *
515
- * @param {string} url - URL файла для загрузки.
516
- * @param {string} [filename] - Желаемое имя для загружаемого файла.
517
- * Если не указано, будет использовано имя на основе временной метки.
518
- * @return {void} Функция не возвращает значение.
548
+ * @param {string} url - URL of the file to download.
549
+ * @param {string} [filename] - Desired name for the downloaded file.
550
+ * If not specified, a timestamp-based name will be used.
551
+ * @return {void} The function does not return a value.
519
552
  */
520
553
  declare function downloadByUrl(url: string, filename?: string): void;
521
554
  /**
522
- * Копирует указанный текст в буфер обмена. Использует Clipboard API, если доступен,
523
- * в противном случае использует `document.execCommand` в качестве запасного метода.
555
+ * Copies the specified text to the clipboard. Uses the Clipboard API if available,
556
+ * otherwise falls back to `document.execCommand`.
524
557
  *
525
- * @param {string} text - Текст, который необходимо скопировать в буфер обмена.
526
- * @return {Promise<boolean>} Промис, который резолвится в boolean, указывающий, было ли
527
- * копирование текста успешным.
558
+ * @param {string} text - The text to copy to the clipboard.
559
+ * @return {Promise<boolean>} A promise that resolves to a boolean indicating whether
560
+ * the text copying was successful.
528
561
  */
529
562
  declare function copyText(text: string): Promise<boolean>;
530
563
  /**
531
- * Преобразует строку в формате Base64 в объект Blob.
564
+ * Converts a Base64 encoded string to a Blob object.
532
565
  *
533
- * @param {string} base64 - Строка в формате Base64. Может опционально включать MIME-тип
534
- * в формате `data:<mimeType>;base64,<data>`.
535
- * @param {string} [mimeType=''] - MIME-тип данных. Необязательный параметр, будет переопределен,
536
- * если `base64` включает MIME-тип.
537
- * @return {Blob} Объект Blob, созданный из строки в формате Base64.
566
+ * @param {string} base64 - Base64 encoded string. Can optionally include a MIME type
567
+ * in the format `data:<mimeType>;base64,<data>`.
568
+ * @param {string} [mimeType=''] - MIME type of the data. Optional parameter, will be overridden
569
+ * if the `base64` string includes a MIME type.
570
+ * @return {Blob} A Blob object created from the Base64 string.
538
571
  */
539
572
  declare function base64ToBlob(base64: string, mimeType?: string): Blob;
540
573
 
574
+ /**
575
+ * Creates a debounced signal that delays updates from the source signal.
576
+ * The output signal will only update after the specified delay has passed without new values.
577
+ *
578
+ * @template T - The type of the signal value
579
+ * @param {Signal<T>} src - The source signal to debounce
580
+ * @param {number} [ms=150] - The debounce delay in milliseconds (default: 150ms)
581
+ * @param {Object} [opts] - Optional configuration
582
+ * @param {Injector} [opts.injector] - Optional injector for the effect context
583
+ * @returns {Signal<T>} A readonly signal that emits debounced values from the source
584
+ *
585
+ * @example
586
+ * ```typescript
587
+ * const searchQuery = signal('');
588
+ * const debouncedQuery = debounceSignal(searchQuery, 300);
589
+ *
590
+ * effect(() => {
591
+ * console.log('Debounced value:', debouncedQuery());
592
+ * });
593
+ * ```
594
+ */
541
595
  declare const debounceSignal: <T>(src: Signal<T>, ms?: number, opts?: {
542
596
  injector?: Injector;
543
597
  }) => Signal<T>;
598
+ /**
599
+ * Creates a throttled signal that limits the rate of updates from the source signal.
600
+ * The output signal will emit the first value immediately, then wait for the specified delay
601
+ * before allowing subsequent updates. If values are emitted during the waiting period,
602
+ * the last value will be queued and emitted after the delay.
603
+ *
604
+ * @template T - The type of the signal value
605
+ * @param {Signal<T>} src - The source signal to throttle
606
+ * @param {number} [ms=100] - The throttle delay in milliseconds (default: 100ms)
607
+ * @param {Object} [opts] - Optional configuration
608
+ * @param {Injector} [opts.injector] - Optional injector for the effect context
609
+ * @returns {Signal<T>} A readonly signal that emits throttled values from the source
610
+ *
611
+ * @example
612
+ * ```typescript
613
+ * const scrollPosition = signal(0);
614
+ * const throttledPosition = throttleSignal(scrollPosition, 200);
615
+ *
616
+ * effect(() => {
617
+ * console.log('Throttled position:', throttledPosition());
618
+ * });
619
+ * ```
620
+ */
544
621
  declare const throttleSignal: <T>(src: Signal<T>, ms?: number, opts?: {
545
622
  injector?: Injector;
546
623
  }) => Signal<T>;
547
624
 
548
625
  /**
549
- * Форматирует объект даты в строку заданного формата.
626
+ * Formats a Date object into a string of the given format.
550
627
  *
551
- * @param {Date} date - Объект даты для форматирования.
552
- * @param {string} [format='yyyy-MM-dd'] - Строковый формат для применения. По умолчанию 'yyyy-MM-dd'.
553
- * Поддерживаемые токены в строке формата:
554
- * - yyyy: Полный год (например, 2023)
555
- * - MM: Месяц с ведущим нулем (01-12)
556
- * - dd: День месяца с ведущим нулем (01-31)
557
- * - HH: Час в 24-часовом формате с ведущим нулем (00-23)
558
- * - mm: Минуты с ведущим нулем (00-59)
559
- * - ss: Секунды с ведущим нулем (00-59)
628
+ * @param {Date} date - Date object to format.
629
+ * @param {string} [format='yyyy-MM-dd'] - String format to apply. Defaults to 'yyyy-MM-dd'.
630
+ * Supported tokens in the format string:
631
+ * - yyyy: Full year (e.g., 2023)
632
+ * - MM: Month with leading zero (01-12)
633
+ * - dd: Day of the month with leading zero (01-31)
634
+ * - HH: Hour in 24-hour format with leading zero (00-23)
635
+ * - mm: Minutes with leading zero (00-59)
636
+ * - ss: Seconds with leading zero (00-59)
560
637
  *
561
- * @returns {string} Отформатированная строка даты. Возвращает пустую строку, если входная дата некорректна.
638
+ * @returns {string} Formatted date string. Returns an empty string if the input date is invalid.
562
639
  */
563
640
  declare const formatDate: (date: Date, format?: string) => string;
564
641
  /**
565
- * Форматирует заданную дату в локализованную строковую репрезентацию в формате 'день месяц год'.
566
- * Месяц локализован для 'ru-RU' локали и сокращен.
642
+ * Formats the given date into a localized string representation in the format 'day month year'.
643
+ * The month is localized for 'ru-RU' locale and abbreviated.
567
644
  *
568
- * @param {Date} date - Объект даты для форматирования.
569
- * @return {string} Строка, представляющая отформатированную дату в формате 'день месяц год'.
645
+ * @param {Date} date - Date object to format.
646
+ * @return {string} A string representing the formatted date in the format 'day month year'.
570
647
  */
571
648
  declare function formatToLocaledDate(date: Date): string;
572
649
  /**
573
- * Парсит дату из строки по заданной маске.
574
- * Поддерживает dd, MM, yyyy, HH, mm, ss.
575
- * Разделители любые: '.', '/', '-',' '.
650
+ * Parses a date from a string based on the given mask.
651
+ * Supports dd, MM, yyyy, HH, mm, ss.
652
+ * Any delimiters: '.', '/', '-', ' '.
576
653
  *
577
- * @param {string} value - исходная строка с датой
578
- * @param {string} format - маска, например "dd.MM.yyyy"
654
+ * @param {string} value - source date string
655
+ * @param {string} format - mask, e.g., "dd.MM.yyyy"
579
656
  * @returns {Date|null}
580
657
  */
581
658
  declare const parseToDate: (value: unknown, format?: string) => Date | null;
582
659
  /**
583
- * Парсит строковое представление двух дат в кортеж объектов `Date` или значений `null`.
660
+ * Parses a string representation of two dates into a tuple of `Date` objects or `null` values.
584
661
  *
585
- * Эта функция пытается извлечь и разобрать два значения даты из входной строки
586
- * на основе предоставленного формата даты. Если парсинг неуспешен, возвращаемый кортеж будет
587
- * состоять из значений `null`. По умолчанию ожидаемый формат даты - `dd.MM.yyyy`, но он
588
- * может быть изменен.
662
+ * This function attempts to extract and parse two date values from the input string
663
+ * based on the provided date format. If parsing is unsuccessful, the returned tuple will
664
+ * consist of `null` values. The default expected date format is `dd.MM.yyyy`, but it
665
+ * can be changed.
589
666
  *
590
- * @param {string | null} value - Строка, содержащая представления дат для разбора.
591
- * Если `null`, функция вернет `[null, null]`.
592
- * @param {string} [format='dd.MM.yyyy'] - Формат даты, используемый для парсинга.
593
- * Поддерживает `yyyy`, `MM`, `dd`, `HH`, `mm` и `ss`.
594
- * @returns {[Date | null, Date | null]} Кортеж, где первый элемент - разобранная начальная дата
595
- * и второй элемент - разобранная конечная дата. Если парсинг не удался, оба элемента будут `null`.
667
+ * @param {string | null} value - String containing date representations to parse.
668
+ * If `null`, the function will return `[null, null]`.
669
+ * @param {string} [format='dd.MM.yyyy'] - Date format used for parsing.
670
+ * Supports `yyyy`, `MM`, `dd`, `HH`, `mm`, and `ss`.
671
+ * @returns {[Date | null, Date | null]} A tuple where the first element is the parsed start date
672
+ * and the second element is the parsed end date. If parsing fails, both elements will be `null`.
596
673
  */
597
674
  declare const parseToDatePeriod: (value: unknown, format?: string) => [Date | null, Date | null];
598
675
  /**
599
- * Определяет, является ли переданное значение периодом дат.
676
+ * Determines if the given value is a date period.
600
677
  *
601
- * Период дат представляется в виде массива, содержащего ровно два экземпляра Date.
602
- * Оба элемента массива должны быть корректными объектами Date (т.е. не `Invalid Date`).
678
+ * A date period is represented as an array containing exactly two Date instances.
679
+ * Both elements of the array must be valid Date objects (i.e., not `Invalid Date`).
603
680
  *
604
- * @param {unknown} value - Значение для проверки.
605
- * @returns {value is [Date, Date]} - Возвращает `true`, если значение является корректным периодом дат, иначе `false`.
681
+ * @param {unknown} value - Value to check.
682
+ * @returns {value is [Date, Date]} - Returns `true` if the value is a valid date period, otherwise `false`.
606
683
  */
607
684
  declare const isDatePeriod: (value: unknown) => value is [Date, Date];
608
685
  /**
609
- * Преобразует различные типы данных в объект Date.
686
+ * Converts various data types to a Date object.
610
687
  *
611
- * @param {unknown} v - Значение для преобразования. Может быть объектом Date,
612
- * числом (timestamp) или строкой, содержащей корректную дату.
613
- * @returns {Date} Объект Date. Если преобразование невозможно, возвращает Invalid Date.
688
+ * @param {unknown} v - Value to convert. Can be a Date object,
689
+ * a number (timestamp), or a string containing a valid date.
690
+ * @returns {Date} Date object. If conversion is impossible, returns Invalid Date.
614
691
  */
615
692
  declare const toDate: (v: unknown) => Date;
616
693
  /**
617
- * Переводит строку даты из заданного формата в ISO (UTC).
618
- * Пример:
694
+ * Converts a date string from a given format to ISO (UTC).
695
+ * Example:
619
696
  * reformatDateToISO("24.11.2025", "dd.MM.yyyy")
620
697
  * → "2025-11-24T00:00:00.000Z"
621
698
  */
622
699
  declare function reformatDateToISO(dateStr: string, mask: string): string | null;
623
700
 
624
701
  /**
625
- * Определяет, является ли переданное значение null или undefined, опционально учитывая
626
- * пустые строки как null-подобные значения.
702
+ * Determines if the given value is null or undefined, optionally considering
703
+ * empty strings as null-like values.
627
704
  *
628
- * @param {unknown} value - Значение для проверки на null или undefined.
629
- * @param {boolean} [withEmptyString=false] - Если true, пустые строки также считаются
630
- * null-подобными значениями в дополнение к null и undefined.
631
- * @returns {value is null | undefined} Возвращает `true`, если значение равно null, undefined,
632
- * или (если `withEmptyString` равно true) пустой строке. В противном случае возвращает `false`.
705
+ * @param {unknown} value - Value to check for null or undefined.
706
+ * @param {boolean} [withEmptyString=false] - If true, empty strings are also considered
707
+ * null-like values in addition to null and undefined.
708
+ * @returns {value is null | undefined} Returns `true` if the value is null, undefined,
709
+ * or (if `withEmptyString` is true) an empty string. Otherwise returns `false`.
633
710
  */
634
711
  declare const isNullable: (value: unknown, withEmptyString?: boolean) => value is null | undefined;
635
712
  /**
636
- * Проверяет, является ли переданное значение числом или может быть преобразовано в корректное число.
713
+ * Checks if the given value is a number or can be converted to a valid number.
637
714
  *
638
- * Эта функция проверяет, является ли входное значение числовым. Если входное значение
639
- * имеет тип number, проверяется, что оно является конечным числом и не NaN. Если входное
640
- * значение является строкой, проверяется возможность преобразования этой строки в корректное число.
715
+ * This function checks if the input value is numeric. If the input value
716
+ * is of type number, it is verified to be a finite number and not NaN. If the input
717
+ * value is a string, it checks if this string can be converted to a valid number.
641
718
  *
642
- * @param {unknown} value - Значение для проверки.
643
- * @param {boolean} [fromString=false] - Если true, строковые значения будут пытаться преобразоваться в число.
644
- * @returns {value is number} `true` если значение является числом или строкой,
645
- * которую можно преобразовать в число; иначе `false`.
719
+ * @param {unknown} value - Value to check.
720
+ * @param {boolean} [fromString=false] - If true, string values will attempt to be converted to a number.
721
+ * @returns {value is number} `true` if the value is a number or a string
722
+ * that can be converted to a number; otherwise `false`.
646
723
  */
647
724
  declare const isNumber: (value: unknown, fromString?: boolean) => value is number;
648
725
  /**
@@ -688,22 +765,22 @@ declare const parseQueryArray: (val: unknown, mode: "comma" | "json" | "multi",
688
765
  declare const concatArray: (value: AnyType[], mode: "comma" | "json" | "multi", key?: string) => string;
689
766
 
690
767
  /**
691
- * Форматирует число или строку, содержащую число, добавляя пробелы в качестве разделителей тысяч.
768
+ * Formats a number or a string containing a number by adding spaces as thousands separators.
692
769
  *
693
- * @param {number|string} num - Число или строка для форматирования.
694
- * Если входное значение null, undefined или недопустимое число, возвращается пустая строка.
695
- * @return {string} Отформатированная строка с пробелами в качестве разделителей тысяч или пустая строка,
696
- * если входные данные недопустимы.
770
+ * @param {number|string} num - The number or string to format.
771
+ * If the input value is null, undefined, or an invalid number, an empty string is returned.
772
+ * @return {string} Formatted string with spaces as thousands separators, or an empty string
773
+ * if the input is invalid.
697
774
  */
698
775
  declare function formatToSpacedNumber(num: number | string): string;
699
776
  /**
700
- * Обрезает строку до указанного количества символов и добавляет многоточие ('…'),
701
- * если строка превышает лимит.
777
+ * Truncates a string to the specified number of characters and adds an ellipsis ('…')
778
+ * if the string exceeds the limit.
702
779
  *
703
- * @param {string} text - Текст для обрезки.
704
- * @param {number} limit - Максимально допустимая длина строки.
705
- * @returns {string} Обрезанная строка с многоточием, если длина превышает лимит,
706
- * или исходная строка, если нет.
780
+ * @param {string} text - The text to truncate.
781
+ * @param {number} limit - Maximum allowed string length.
782
+ * @returns {string} Truncated string with an ellipsis if length exceeds the limit,
783
+ * or the original string otherwise.
707
784
  */
708
785
  declare const truncate: (text: string, limit: number) => string;
709
786
 
@@ -711,111 +788,111 @@ type Directions = Direction | [Direction] | [Direction, Direction];
711
788
  declare const getCorrectedPosition: (anchor: ElementPosition & Partial<ElementSize>, triggerSize: ElementSize, boundBox: ElementEdges, directions: Directions, offset: number) => ElementPosition;
712
789
 
713
790
  /**
714
- * Вычисляет доступное вертикальное пространство под заданным элементом в области просмотра.
791
+ * Calculates the available vertical space below the given element in the viewport.
715
792
  *
716
- * @param {Element} el - DOM элемент, для которого необходимо вычислить доступную высоту снизу.
717
- * @param {number} [margin=20] - Опциональное поле, вычитаемое из вычисленной доступной высоты.
718
- * @return {number} Доступная высота в пикселях под элементом с учетом поля.
719
- * Возвращает 0, если нет доступного пространства.
793
+ * @param {Element} el - DOM element for which to calculate the available height below.
794
+ * @param {number} [margin=20] - Optional margin subtracted from the calculated available height.
795
+ * @return {number} Available height in pixels below the element, taking margin into account.
796
+ * Returns 0 if there is no available space.
720
797
  */
721
798
  declare function getAvailableHeight(el: Element, margin?: number): number;
722
799
 
723
800
  /**
724
- * Извлекает значение по вложенному пути внутри объекта или массива.
725
- * Путь указывается в виде строки с разделителями-точками.
801
+ * Retrieves a value by a nested path within an object or array.
802
+ * The path is specified as a dot-delimited string.
726
803
  *
727
- * @param obj Объект или массив для обхода.
728
- * @param path Строка с разделителями-точками, указывающая путь для извлечения значения.
729
- * @return Значение, найденное по указанному пути, или undefined, если путь не существует или недействителен.
804
+ * @param obj The object or array to traverse.
805
+ * @param path A dot-delimited string specifying the path to retrieve the value.
806
+ * @return The value found at the specified path, or undefined if the path does not exist or is invalid.
730
807
  */
731
808
  declare function getChainedValue<T = unknown>(obj: unknown, path: string): T | undefined;
732
809
 
733
810
  /**
734
- * Нормализует заданный URL, удаляя избыточные слеши, разрешая сегменты с точками
735
- * и обеспечивая отсутствие завершающих слешей в конце URL.
811
+ * Normalizes a given URL by removing redundant slashes, resolving dot segments,
812
+ * and ensuring there are no trailing slashes at the end of the URL.
736
813
  *
737
- * @param {string} url - Строка URL для нормализации.
738
- * @return {string} - Нормализованная строка URL.
814
+ * @param {string} url - The URL string to normalize.
815
+ * @return {string} - The normalized URL string.
739
816
  */
740
817
  declare function normalizeUrl(url: string): string;
741
818
  /**
742
- * Заменяет заполнители в предоставленном URL-шаблоне соответствующими значениями из объекта params.
743
- * Заполнители определяются как `:key` в строке шаблона.
819
+ * Replaces placeholders in the provided URL template with corresponding values from the params object.
820
+ * Placeholders are defined as `:key` in the template string.
744
821
  *
745
- * @param {string} template URL-шаблон, содержащий заполнители для замены.
746
- * @param {AnyDict} [params] Опциональный словарь, содержащий пары ключ-значение.
747
- * Ключи соответствуют заполнителям в шаблоне, а значения заменят их.
748
- * @return {string} URL с заполнителями, замененными соответствующими значениями из объекта params.
749
- * По умолчанию возвращает исходный шаблон, если params не предоставлен.
822
+ * @param {string} template URL template containing placeholders to replace.
823
+ * @param {AnyDict} [params] Optional dictionary containing key-value pairs.
824
+ * Keys correspond to placeholders in the template, and values will replace them.
825
+ * @return {string} URL with placeholders replaced by corresponding values from the params object.
826
+ * Defaults to the original template if params is not provided.
750
827
  */
751
828
  declare function fillUrlWithParams(template: string, params?: AnyDict): string;
752
829
  /**
753
- * Добавляет параметры запроса к указанному URL.
830
+ * Appends query parameters to the specified URL.
754
831
  *
755
- * @param {string} url Базовый URL, к которому будут добавлены параметры запроса.
756
- * @param {Record<string, unknown>} [params] Опциональный объект, содержащий пары ключ-значение параметров запроса.
757
- * Ключи со значениями null или undefined будут проигнорированы.
758
- * @return {string} URL с добавленными параметрами запроса.
832
+ * @param {string} url Base URL to which query parameters will be added.
833
+ * @param {Record<string, unknown>} [params] Optional object containing query parameter key-value pairs.
834
+ * Keys with null or undefined values will be ignored.
835
+ * @return {string} URL with appended query parameters.
759
836
  */
760
837
  declare function appendQueryParams(url: string, params?: Record<string, unknown>): string;
761
838
  /**
762
- * Разбирает строку запроса в объект, содержащий пары ключ-значение.
839
+ * Parses a query string into an object containing key-value pairs.
763
840
  *
764
- * @param {string} query - Строка запроса для разбора. Может начинаться с '?'.
765
- * @return {Record<string, string>} Объект, где каждый ключ - это имя параметра запроса,
766
- * а значение - соответствующее значение.
841
+ * @param {string} query - The query string to parse. May start with '?'.
842
+ * @return {Record<string, string>} An object where each key is a query parameter name,
843
+ * and the value is the corresponding value.
767
844
  */
768
845
  declare function parseQueryParams(query: string): Record<string, string>;
769
846
 
770
847
  /**
771
848
  * Constructs a query string from a given object and concatenation type.
772
849
  *
773
- * @param {Record<string, any>} object - Объект с парами ключ-значение для преобразования в строку запроса.
774
- * Ключи представляют имена параметров, а значения - значения параметров.
775
- * @param {'comma' | 'json' | 'multi'} concatType - Метод обработки значений массива:
776
- * - 'comma': Объединяет элементы массива через запятую.
777
- * - 'json': Сериализует массив как JSON строку.
778
- * - 'multi': Создает несколько записей для элементов массива, где каждый связан с одним и тем же ключом.
779
- * @returns {string} - Сформированная строка запроса с закодированными как URI компоненты ключами и значениями.
850
+ * @param {Record<string, any>} object - Object with key-value pairs to convert into a query string.
851
+ * Keys represent parameter names, and values represent parameter values.
852
+ * @param {'comma' | 'json' | 'multi'} concatType - Method for handling array values:
853
+ * - 'comma': Joins array elements with a comma.
854
+ * - 'json': Serializes the array as a JSON string.
855
+ * - 'multi': Creates multiple entries for array elements, each associated with the same key.
856
+ * @returns {string} - Formed query string with keys and values encoded as URI components.
780
857
  */
781
858
  declare const makeQuery: (object: AnyDict, concatType: "comma" | "json" | "multi") => string;
782
859
  /**
783
- * Сравнивает два маршрута, чтобы определить, совпадает ли фактический маршрут с шаблоном маршрута.
784
- * Поддерживает статическое и динамическое сопоставление маршрутов с опциональным учетом подмаршрутов.
860
+ * Compares two routes to determine if the actual route matches the route template.
861
+ * Supports static and dynamic route matching with optional subroute consideration.
785
862
  *
786
- * @param {string} actualRoute - Фактический путь маршрута для сравнения.
787
- * @param {string} pureRoute - Шаблонный путь маршрута для сопоставления, который может включать заполнители
788
- * (например, `:id`).
789
- * @param {boolean} [withSubroute=false] - Определяет, разрешать ли сопоставление подмаршрутов. Если true,
790
- * actualRoute должен начинаться с заполненного pureRoute.
791
- * @return {boolean} Возвращает true, если фактический маршрут соответствует шаблонному
792
- * маршруту (и опциональному условию подмаршрута, если включено), в противном случае false.
863
+ * @param {string} actualRoute - Actual route path to compare.
864
+ * @param {string} pureRoute - Template route path to match, which may include placeholders
865
+ * (e.g., `:id`).
866
+ * @param {boolean} [withSubroute=false] - Determines whether to allow subroute matching. If true,
867
+ * actualRoute must start with the filled pureRoute.
868
+ * @return {boolean} Returns true if the actual route matches the template
869
+ * route (and optional subroute condition if enabled), otherwise false.
793
870
  */
794
871
  declare const compareRoutes: (actualRoute: string, pureRoute: string, withSubroute?: boolean) => boolean;
795
872
  /**
796
- * Обрабатывает и материализует путь маршрута путем декодирования и при необходимости замены параметров маршрута.
873
+ * Processes and materializes a route path by decoding and, if necessary, replacing route parameters.
797
874
  *
798
- * @param {string} actualRoute - Фактический путь маршрута, обычно предоставляемый
799
- * в качестве источника значений динамических параметров.
800
- * @param {string} pureRoute - Шаблон пути маршрута, может включать динамические сегменты, обозначенные `:`.
801
- * @returns {string} Полностью материализованный и декодированный путь маршрута.
875
+ * @param {string} actualRoute - Actual route path, usually provided
876
+ * as a source for dynamic parameter values.
877
+ * @param {string} pureRoute - Route path template, may include dynamic segments denoted by `:`.
878
+ * @returns {string} Fully materialized and decoded route path.
802
879
  */
803
880
  declare const materializeRoutePath: (actualRoute: string, pureRoute: string) => string;
804
881
 
805
882
  /**
806
- * Рекурсивно проверяет равенство двух объектов, включая вложенные структуры и особые случаи,
807
- * такие как массивы, наборы, карты, даты и NaN.
883
+ * Recursively checks the equality of two objects, including nested structures and special cases
884
+ * such as arrays, sets, maps, dates, and NaN.
808
885
  *
809
- * @param {AnyType} a - Первый объект для сравнения.
810
- * @param {AnyType} b - Второй объект для сравнения.
811
- * @param {Map} [seen=new Map()] - Карта, используемая для обнаружения циклических ссылок
812
- * при глубокой проверке равенства.
813
- * @return {boolean} - Возвращает true, если объекты полностью равны, иначе возвращает false.
886
+ * @param {AnyType} a - The first object to compare.
887
+ * @param {AnyType} b - The second object to compare.
888
+ * @param {Map} [seen=new Map()] - A map used to detect cyclic references
889
+ * during deep equality check.
890
+ * @return {boolean} - Returns true if the objects are deeply equal, otherwise returns false.
814
891
  */
815
892
  declare function deepEqual(a: AnyType, b: AnyType, seen?: Map<any, any>): boolean;
816
893
 
817
894
  declare const generateId: (limit?: number, radix?: number) => string;
818
895
 
819
- export { CURRENT_DEVICE, SELECTED_LANG, SELECTED_THEME, TRANSLATION, VALIDATION_MESSAGES, appendQueryParams, base64ToBlob, compareRoutes, concatArray, copyText, debounceSignal, deepEqual, downloadByBlob, downloadByUrl, fillUrlWithParams, formatDate, formatToLocaledDate, formatToSpacedNumber, generateId, getAvailableHeight, getChainedValue, getCorrectedPosition, isDatePeriod, isNullable, isNumber, isObject, makeQuery, materializeRoutePath, normalizeUrl, parseQueryArray, parseQueryParams, parseToDate, parseToDatePeriod, reformatDateToISO, throttleSignal, toDate, truncate };
896
+ export { CHANGE_LANG, CHANGE_THEME, CURRENT_DEVICE, SELECTED_LANG, SELECTED_THEME, TRANSLATION, VALIDATION_MESSAGES, appendQueryParams, base64ToBlob, compareRoutes, concatArray, copyText, debounceSignal, deepEqual, downloadByBlob, downloadByUrl, fillUrlWithParams, formatDate, formatToLocaledDate, formatToSpacedNumber, generateId, getAvailableHeight, getChainedValue, getCorrectedPosition, isDatePeriod, isNullable, isNumber, isObject, makeQuery, materializeRoutePath, normalizeUrl, parseQueryArray, parseQueryParams, parseToDate, parseToDatePeriod, reformatDateToISO, throttleSignal, toDate, truncate };
820
897
  export type { AnyDict, AnyType, Appearance, Devices, Direction, ElementEdges, ElementPosition, ElementRect, ElementSize, ErrorResponse, JsonObject, JsonPrimitive, JsonValue, Langs, LiteralOf, Mutable, Nullable, NullableProps, Nullish, OptionalExcept, PageableRequest, PageableResponse, Query, QueryParams, QueryScalar, RequiredExcept, RestMethods, SelectIconOption, SelectOption, SortToken, Themes, ValidationErrorData, ValidationMessages, ValueOf };
821
898
  //# sourceMappingURL=reforgium-internal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reforgium-internal.d.ts","sources":["../../../../libs/internal/src/models/components.ts","../../../../libs/internal/src/models/elements.ts","../../../../libs/internal/src/models/util.ts","../../../../libs/internal/src/models/api.ts","../../../../libs/internal/src/tokens/locale.token.ts","../../../../libs/internal/src/tokens/theme.token.ts","../../../../libs/internal/src/tokens/device.token.ts","../../../../libs/internal/src/tokens/validation-messages.token.ts","../../../../libs/internal/src/utils/web.utils.ts","../../../../libs/internal/src/utils/timers.utils.ts","../../../../libs/internal/src/utils/date.utils.ts","../../../../libs/internal/src/utils/types.utils.ts","../../../../libs/internal/src/utils/format.utils.ts","../../../../libs/internal/src/utils/positions.utils.ts","../../../../libs/internal/src/utils/available-height.utils.ts","../../../../libs/internal/src/utils/get-chained-value.utils.ts","../../../../libs/internal/src/utils/urls.utils.ts","../../../../libs/internal/src/utils/routes.utils.ts","../../../../libs/internal/src/utils/deep-equal.utils.ts","../../../../libs/internal/src/utils/generate.utils.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;AAeG;;AAGH;;;;;;;;;;;;;;AAcG;AACG;;;;;;AAQN;;;;;;;;;;;;;;;;;;AAkBG;;;AAGD;;;AC9DF;;;;;AAKG;AACG;AAEN;;;;;;AAMG;AACG;;;;AAKN;;;;;;AAMG;AACG;;;;AAKN;;;;;;;;;AASG;AACG;AACJ;AACA;AACA;AACA;;AAGF;;;;;;;;;;;;;;AAcG;AACG;;AChEN;;;;;AAKG;AAEG;AAEN;;;;;AAKG;AACG;AAEN;;;;;;AAMG;AACG;AAEN;;;;;AAKG;AACG;AAEN;;;;;;AAMG;AACG;;;AAEN;;;AAGG;AACG;;;AAEN;;;;;;AAMG;;;;AAKH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;;;AAKG;AACH;;AC7KA;;;;;;;;;AASG;AACH;AAGA;;;;;;;;;;;AAWG;AACH;AAYA;;;;;;;;;AASG;AACH;AAGA;;;;;;;;;;;;;;AAcG;AACH;AAmCA;;;;;;;;;;;;AAYG;AACH;;ACnHA;;;;;;;AAOG;AACH;AAYA;;;;;;;;AAQG;AACH;;AC3BA;AAEA;;ACJA;;;;;;;AAOG;AACH;;ACRA;;;;;;;AAOG;AACH;;ACNA;;;;;;AAMG;AACH;AAUA;;;;;;;;;AASG;AACH;AAQA;;;;;;;AAOG;AACH;AAcA;;;;;;AAMG;AACH;;AC/DA;;;;;;;;;;AAUG;AACH;AAeA;;;;;;;;;;;AAWG;AACH;AAUA;;;;;;;AAOG;AACH;;ACxDA;;;;;;;;;AASG;AACH;;ACbA;;;"}
1
+ {"version":3,"file":"reforgium-internal.d.ts","sources":["../../../../libs/internal/src/models/components.ts","../../../../libs/internal/src/models/elements.ts","../../../../libs/internal/src/models/util.ts","../../../../libs/internal/src/models/api.ts","../../../../libs/internal/src/tokens/locale.token.ts","../../../../libs/internal/src/tokens/theme.token.ts","../../../../libs/internal/src/tokens/device.token.ts","../../../../libs/internal/src/tokens/validation-messages.token.ts","../../../../libs/internal/src/utils/web.utils.ts","../../../../libs/internal/src/utils/timers.utils.ts","../../../../libs/internal/src/utils/date.utils.ts","../../../../libs/internal/src/utils/types.utils.ts","../../../../libs/internal/src/utils/format.utils.ts","../../../../libs/internal/src/utils/positions.utils.ts","../../../../libs/internal/src/utils/available-height.utils.ts","../../../../libs/internal/src/utils/get-chained-value.utils.ts","../../../../libs/internal/src/utils/urls.utils.ts","../../../../libs/internal/src/utils/routes.utils.ts","../../../../libs/internal/src/utils/deep-equal.utils.ts","../../../../libs/internal/src/utils/generate.utils.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;AAeG;;AAGH;;;;;;;;;;;;;;AAcG;AACG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