@lokascript/i18n 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +34 -34
- package/dist/index.d.ts +34 -34
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -504,15 +504,15 @@ declare const EnhancedI18nInputSchema: z.ZodObject<{
|
|
|
504
504
|
preserveOriginalAttribute: z.ZodOptional<z.ZodString>;
|
|
505
505
|
validate: z.ZodDefault<z.ZodBoolean>;
|
|
506
506
|
}, "strip", z.ZodTypeAny, {
|
|
507
|
+
validate: boolean;
|
|
507
508
|
detectLocale: boolean;
|
|
508
509
|
rtlLocales: string[];
|
|
509
|
-
validate: boolean;
|
|
510
510
|
preserveOriginalAttribute?: string | undefined;
|
|
511
511
|
}, {
|
|
512
|
+
validate?: boolean | undefined;
|
|
512
513
|
detectLocale?: boolean | undefined;
|
|
513
514
|
rtlLocales?: string[] | undefined;
|
|
514
515
|
preserveOriginalAttribute?: string | undefined;
|
|
515
|
-
validate?: boolean | undefined;
|
|
516
516
|
}>>;
|
|
517
517
|
/** Context variables for translation */
|
|
518
518
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -523,6 +523,12 @@ declare const EnhancedI18nInputSchema: z.ZodObject<{
|
|
|
523
523
|
locale: string;
|
|
524
524
|
environment: "frontend" | "backend" | "universal";
|
|
525
525
|
debug: boolean;
|
|
526
|
+
options?: {
|
|
527
|
+
validate: boolean;
|
|
528
|
+
detectLocale: boolean;
|
|
529
|
+
rtlLocales: string[];
|
|
530
|
+
preserveOriginalAttribute?: string | undefined;
|
|
531
|
+
} | undefined;
|
|
526
532
|
fallbackLocale?: string | undefined;
|
|
527
533
|
dictionaries?: Record<string, z.objectOutputType<{
|
|
528
534
|
commands: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -533,15 +539,15 @@ declare const EnhancedI18nInputSchema: z.ZodObject<{
|
|
|
533
539
|
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
534
540
|
attributes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
535
541
|
}, z.ZodRecord<z.ZodString, z.ZodString>, "strip">> | undefined;
|
|
536
|
-
options?: {
|
|
537
|
-
detectLocale: boolean;
|
|
538
|
-
rtlLocales: string[];
|
|
539
|
-
validate: boolean;
|
|
540
|
-
preserveOriginalAttribute?: string | undefined;
|
|
541
|
-
} | undefined;
|
|
542
542
|
variables?: Record<string, unknown> | undefined;
|
|
543
543
|
}, {
|
|
544
544
|
locale: string;
|
|
545
|
+
options?: {
|
|
546
|
+
validate?: boolean | undefined;
|
|
547
|
+
detectLocale?: boolean | undefined;
|
|
548
|
+
rtlLocales?: string[] | undefined;
|
|
549
|
+
preserveOriginalAttribute?: string | undefined;
|
|
550
|
+
} | undefined;
|
|
545
551
|
fallbackLocale?: string | undefined;
|
|
546
552
|
dictionaries?: Record<string, z.objectInputType<{
|
|
547
553
|
commands: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -552,12 +558,6 @@ declare const EnhancedI18nInputSchema: z.ZodObject<{
|
|
|
552
558
|
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
553
559
|
attributes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
554
560
|
}, z.ZodRecord<z.ZodString, z.ZodString>, "strip">> | undefined;
|
|
555
|
-
options?: {
|
|
556
|
-
detectLocale?: boolean | undefined;
|
|
557
|
-
rtlLocales?: string[] | undefined;
|
|
558
|
-
preserveOriginalAttribute?: string | undefined;
|
|
559
|
-
validate?: boolean | undefined;
|
|
560
|
-
} | undefined;
|
|
561
561
|
variables?: Record<string, unknown> | undefined;
|
|
562
562
|
environment?: "frontend" | "backend" | "universal" | undefined;
|
|
563
563
|
debug?: boolean | undefined;
|
|
@@ -599,15 +599,15 @@ declare const EnhancedI18nOutputSchema: z.ZodObject<{
|
|
|
599
599
|
has: z.ZodAny;
|
|
600
600
|
keys: z.ZodAny;
|
|
601
601
|
}, "strip", z.ZodTypeAny, {
|
|
602
|
+
keys?: any;
|
|
602
603
|
set?: any;
|
|
603
604
|
get?: any;
|
|
604
605
|
has?: any;
|
|
605
|
-
keys?: any;
|
|
606
606
|
}, {
|
|
607
|
+
keys?: any;
|
|
607
608
|
set?: any;
|
|
608
609
|
get?: any;
|
|
609
610
|
has?: any;
|
|
610
|
-
keys?: any;
|
|
611
611
|
}>;
|
|
612
612
|
/** Formatting utilities */
|
|
613
613
|
format: z.ZodObject<{
|
|
@@ -627,18 +627,18 @@ declare const EnhancedI18nOutputSchema: z.ZodObject<{
|
|
|
627
627
|
date?: any;
|
|
628
628
|
}>;
|
|
629
629
|
}, "strip", z.ZodTypeAny, {
|
|
630
|
+
category: "Universal";
|
|
630
631
|
locale: {
|
|
631
632
|
direction: "ltr" | "rtl";
|
|
632
633
|
current: string;
|
|
633
634
|
available: string[];
|
|
634
635
|
fallback?: string | undefined;
|
|
635
636
|
};
|
|
636
|
-
category: "Universal";
|
|
637
637
|
dictionary: {
|
|
638
|
+
keys?: any;
|
|
638
639
|
set?: any;
|
|
639
640
|
get?: any;
|
|
640
641
|
has?: any;
|
|
641
|
-
keys?: any;
|
|
642
642
|
};
|
|
643
643
|
contextId: string;
|
|
644
644
|
timestamp: number;
|
|
@@ -656,18 +656,18 @@ declare const EnhancedI18nOutputSchema: z.ZodObject<{
|
|
|
656
656
|
getLocale?: any;
|
|
657
657
|
validateTranslation?: any;
|
|
658
658
|
}, {
|
|
659
|
+
category: "Universal";
|
|
659
660
|
locale: {
|
|
660
661
|
direction: "ltr" | "rtl";
|
|
661
662
|
current: string;
|
|
662
663
|
available: string[];
|
|
663
664
|
fallback?: string | undefined;
|
|
664
665
|
};
|
|
665
|
-
category: "Universal";
|
|
666
666
|
dictionary: {
|
|
667
|
+
keys?: any;
|
|
667
668
|
set?: any;
|
|
668
669
|
get?: any;
|
|
669
670
|
has?: any;
|
|
670
|
-
keys?: any;
|
|
671
671
|
};
|
|
672
672
|
contextId: string;
|
|
673
673
|
timestamp: number;
|
|
@@ -728,15 +728,15 @@ declare class TypedI18nContextImplementation {
|
|
|
728
728
|
preserveOriginalAttribute: z.ZodOptional<z.ZodString>;
|
|
729
729
|
validate: z.ZodDefault<z.ZodBoolean>;
|
|
730
730
|
}, "strip", z.ZodTypeAny, {
|
|
731
|
+
validate: boolean;
|
|
731
732
|
detectLocale: boolean;
|
|
732
733
|
rtlLocales: string[];
|
|
733
|
-
validate: boolean;
|
|
734
734
|
preserveOriginalAttribute?: string | undefined;
|
|
735
735
|
}, {
|
|
736
|
+
validate?: boolean | undefined;
|
|
736
737
|
detectLocale?: boolean | undefined;
|
|
737
738
|
rtlLocales?: string[] | undefined;
|
|
738
739
|
preserveOriginalAttribute?: string | undefined;
|
|
739
|
-
validate?: boolean | undefined;
|
|
740
740
|
}>>;
|
|
741
741
|
/** Context variables for translation */
|
|
742
742
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -747,6 +747,12 @@ declare class TypedI18nContextImplementation {
|
|
|
747
747
|
locale: string;
|
|
748
748
|
environment: "frontend" | "backend" | "universal";
|
|
749
749
|
debug: boolean;
|
|
750
|
+
options?: {
|
|
751
|
+
validate: boolean;
|
|
752
|
+
detectLocale: boolean;
|
|
753
|
+
rtlLocales: string[];
|
|
754
|
+
preserveOriginalAttribute?: string | undefined;
|
|
755
|
+
} | undefined;
|
|
750
756
|
fallbackLocale?: string | undefined;
|
|
751
757
|
dictionaries?: Record<string, z.objectOutputType<{
|
|
752
758
|
commands: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -757,15 +763,15 @@ declare class TypedI18nContextImplementation {
|
|
|
757
763
|
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
758
764
|
attributes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
759
765
|
}, z.ZodRecord<z.ZodString, z.ZodString>, "strip">> | undefined;
|
|
760
|
-
options?: {
|
|
761
|
-
detectLocale: boolean;
|
|
762
|
-
rtlLocales: string[];
|
|
763
|
-
validate: boolean;
|
|
764
|
-
preserveOriginalAttribute?: string | undefined;
|
|
765
|
-
} | undefined;
|
|
766
766
|
variables?: Record<string, unknown> | undefined;
|
|
767
767
|
}, {
|
|
768
768
|
locale: string;
|
|
769
|
+
options?: {
|
|
770
|
+
validate?: boolean | undefined;
|
|
771
|
+
detectLocale?: boolean | undefined;
|
|
772
|
+
rtlLocales?: string[] | undefined;
|
|
773
|
+
preserveOriginalAttribute?: string | undefined;
|
|
774
|
+
} | undefined;
|
|
769
775
|
fallbackLocale?: string | undefined;
|
|
770
776
|
dictionaries?: Record<string, z.objectInputType<{
|
|
771
777
|
commands: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -776,12 +782,6 @@ declare class TypedI18nContextImplementation {
|
|
|
776
782
|
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
777
783
|
attributes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
778
784
|
}, z.ZodRecord<z.ZodString, z.ZodString>, "strip">> | undefined;
|
|
779
|
-
options?: {
|
|
780
|
-
detectLocale?: boolean | undefined;
|
|
781
|
-
rtlLocales?: string[] | undefined;
|
|
782
|
-
preserveOriginalAttribute?: string | undefined;
|
|
783
|
-
validate?: boolean | undefined;
|
|
784
|
-
} | undefined;
|
|
785
785
|
variables?: Record<string, unknown> | undefined;
|
|
786
786
|
environment?: "frontend" | "backend" | "universal" | undefined;
|
|
787
787
|
debug?: boolean | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -504,15 +504,15 @@ declare const EnhancedI18nInputSchema: z.ZodObject<{
|
|
|
504
504
|
preserveOriginalAttribute: z.ZodOptional<z.ZodString>;
|
|
505
505
|
validate: z.ZodDefault<z.ZodBoolean>;
|
|
506
506
|
}, "strip", z.ZodTypeAny, {
|
|
507
|
+
validate: boolean;
|
|
507
508
|
detectLocale: boolean;
|
|
508
509
|
rtlLocales: string[];
|
|
509
|
-
validate: boolean;
|
|
510
510
|
preserveOriginalAttribute?: string | undefined;
|
|
511
511
|
}, {
|
|
512
|
+
validate?: boolean | undefined;
|
|
512
513
|
detectLocale?: boolean | undefined;
|
|
513
514
|
rtlLocales?: string[] | undefined;
|
|
514
515
|
preserveOriginalAttribute?: string | undefined;
|
|
515
|
-
validate?: boolean | undefined;
|
|
516
516
|
}>>;
|
|
517
517
|
/** Context variables for translation */
|
|
518
518
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -523,6 +523,12 @@ declare const EnhancedI18nInputSchema: z.ZodObject<{
|
|
|
523
523
|
locale: string;
|
|
524
524
|
environment: "frontend" | "backend" | "universal";
|
|
525
525
|
debug: boolean;
|
|
526
|
+
options?: {
|
|
527
|
+
validate: boolean;
|
|
528
|
+
detectLocale: boolean;
|
|
529
|
+
rtlLocales: string[];
|
|
530
|
+
preserveOriginalAttribute?: string | undefined;
|
|
531
|
+
} | undefined;
|
|
526
532
|
fallbackLocale?: string | undefined;
|
|
527
533
|
dictionaries?: Record<string, z.objectOutputType<{
|
|
528
534
|
commands: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -533,15 +539,15 @@ declare const EnhancedI18nInputSchema: z.ZodObject<{
|
|
|
533
539
|
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
534
540
|
attributes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
535
541
|
}, z.ZodRecord<z.ZodString, z.ZodString>, "strip">> | undefined;
|
|
536
|
-
options?: {
|
|
537
|
-
detectLocale: boolean;
|
|
538
|
-
rtlLocales: string[];
|
|
539
|
-
validate: boolean;
|
|
540
|
-
preserveOriginalAttribute?: string | undefined;
|
|
541
|
-
} | undefined;
|
|
542
542
|
variables?: Record<string, unknown> | undefined;
|
|
543
543
|
}, {
|
|
544
544
|
locale: string;
|
|
545
|
+
options?: {
|
|
546
|
+
validate?: boolean | undefined;
|
|
547
|
+
detectLocale?: boolean | undefined;
|
|
548
|
+
rtlLocales?: string[] | undefined;
|
|
549
|
+
preserveOriginalAttribute?: string | undefined;
|
|
550
|
+
} | undefined;
|
|
545
551
|
fallbackLocale?: string | undefined;
|
|
546
552
|
dictionaries?: Record<string, z.objectInputType<{
|
|
547
553
|
commands: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -552,12 +558,6 @@ declare const EnhancedI18nInputSchema: z.ZodObject<{
|
|
|
552
558
|
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
553
559
|
attributes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
554
560
|
}, z.ZodRecord<z.ZodString, z.ZodString>, "strip">> | undefined;
|
|
555
|
-
options?: {
|
|
556
|
-
detectLocale?: boolean | undefined;
|
|
557
|
-
rtlLocales?: string[] | undefined;
|
|
558
|
-
preserveOriginalAttribute?: string | undefined;
|
|
559
|
-
validate?: boolean | undefined;
|
|
560
|
-
} | undefined;
|
|
561
561
|
variables?: Record<string, unknown> | undefined;
|
|
562
562
|
environment?: "frontend" | "backend" | "universal" | undefined;
|
|
563
563
|
debug?: boolean | undefined;
|
|
@@ -599,15 +599,15 @@ declare const EnhancedI18nOutputSchema: z.ZodObject<{
|
|
|
599
599
|
has: z.ZodAny;
|
|
600
600
|
keys: z.ZodAny;
|
|
601
601
|
}, "strip", z.ZodTypeAny, {
|
|
602
|
+
keys?: any;
|
|
602
603
|
set?: any;
|
|
603
604
|
get?: any;
|
|
604
605
|
has?: any;
|
|
605
|
-
keys?: any;
|
|
606
606
|
}, {
|
|
607
|
+
keys?: any;
|
|
607
608
|
set?: any;
|
|
608
609
|
get?: any;
|
|
609
610
|
has?: any;
|
|
610
|
-
keys?: any;
|
|
611
611
|
}>;
|
|
612
612
|
/** Formatting utilities */
|
|
613
613
|
format: z.ZodObject<{
|
|
@@ -627,18 +627,18 @@ declare const EnhancedI18nOutputSchema: z.ZodObject<{
|
|
|
627
627
|
date?: any;
|
|
628
628
|
}>;
|
|
629
629
|
}, "strip", z.ZodTypeAny, {
|
|
630
|
+
category: "Universal";
|
|
630
631
|
locale: {
|
|
631
632
|
direction: "ltr" | "rtl";
|
|
632
633
|
current: string;
|
|
633
634
|
available: string[];
|
|
634
635
|
fallback?: string | undefined;
|
|
635
636
|
};
|
|
636
|
-
category: "Universal";
|
|
637
637
|
dictionary: {
|
|
638
|
+
keys?: any;
|
|
638
639
|
set?: any;
|
|
639
640
|
get?: any;
|
|
640
641
|
has?: any;
|
|
641
|
-
keys?: any;
|
|
642
642
|
};
|
|
643
643
|
contextId: string;
|
|
644
644
|
timestamp: number;
|
|
@@ -656,18 +656,18 @@ declare const EnhancedI18nOutputSchema: z.ZodObject<{
|
|
|
656
656
|
getLocale?: any;
|
|
657
657
|
validateTranslation?: any;
|
|
658
658
|
}, {
|
|
659
|
+
category: "Universal";
|
|
659
660
|
locale: {
|
|
660
661
|
direction: "ltr" | "rtl";
|
|
661
662
|
current: string;
|
|
662
663
|
available: string[];
|
|
663
664
|
fallback?: string | undefined;
|
|
664
665
|
};
|
|
665
|
-
category: "Universal";
|
|
666
666
|
dictionary: {
|
|
667
|
+
keys?: any;
|
|
667
668
|
set?: any;
|
|
668
669
|
get?: any;
|
|
669
670
|
has?: any;
|
|
670
|
-
keys?: any;
|
|
671
671
|
};
|
|
672
672
|
contextId: string;
|
|
673
673
|
timestamp: number;
|
|
@@ -728,15 +728,15 @@ declare class TypedI18nContextImplementation {
|
|
|
728
728
|
preserveOriginalAttribute: z.ZodOptional<z.ZodString>;
|
|
729
729
|
validate: z.ZodDefault<z.ZodBoolean>;
|
|
730
730
|
}, "strip", z.ZodTypeAny, {
|
|
731
|
+
validate: boolean;
|
|
731
732
|
detectLocale: boolean;
|
|
732
733
|
rtlLocales: string[];
|
|
733
|
-
validate: boolean;
|
|
734
734
|
preserveOriginalAttribute?: string | undefined;
|
|
735
735
|
}, {
|
|
736
|
+
validate?: boolean | undefined;
|
|
736
737
|
detectLocale?: boolean | undefined;
|
|
737
738
|
rtlLocales?: string[] | undefined;
|
|
738
739
|
preserveOriginalAttribute?: string | undefined;
|
|
739
|
-
validate?: boolean | undefined;
|
|
740
740
|
}>>;
|
|
741
741
|
/** Context variables for translation */
|
|
742
742
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -747,6 +747,12 @@ declare class TypedI18nContextImplementation {
|
|
|
747
747
|
locale: string;
|
|
748
748
|
environment: "frontend" | "backend" | "universal";
|
|
749
749
|
debug: boolean;
|
|
750
|
+
options?: {
|
|
751
|
+
validate: boolean;
|
|
752
|
+
detectLocale: boolean;
|
|
753
|
+
rtlLocales: string[];
|
|
754
|
+
preserveOriginalAttribute?: string | undefined;
|
|
755
|
+
} | undefined;
|
|
750
756
|
fallbackLocale?: string | undefined;
|
|
751
757
|
dictionaries?: Record<string, z.objectOutputType<{
|
|
752
758
|
commands: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -757,15 +763,15 @@ declare class TypedI18nContextImplementation {
|
|
|
757
763
|
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
758
764
|
attributes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
759
765
|
}, z.ZodRecord<z.ZodString, z.ZodString>, "strip">> | undefined;
|
|
760
|
-
options?: {
|
|
761
|
-
detectLocale: boolean;
|
|
762
|
-
rtlLocales: string[];
|
|
763
|
-
validate: boolean;
|
|
764
|
-
preserveOriginalAttribute?: string | undefined;
|
|
765
|
-
} | undefined;
|
|
766
766
|
variables?: Record<string, unknown> | undefined;
|
|
767
767
|
}, {
|
|
768
768
|
locale: string;
|
|
769
|
+
options?: {
|
|
770
|
+
validate?: boolean | undefined;
|
|
771
|
+
detectLocale?: boolean | undefined;
|
|
772
|
+
rtlLocales?: string[] | undefined;
|
|
773
|
+
preserveOriginalAttribute?: string | undefined;
|
|
774
|
+
} | undefined;
|
|
769
775
|
fallbackLocale?: string | undefined;
|
|
770
776
|
dictionaries?: Record<string, z.objectInputType<{
|
|
771
777
|
commands: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -776,12 +782,6 @@ declare class TypedI18nContextImplementation {
|
|
|
776
782
|
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
777
783
|
attributes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
778
784
|
}, z.ZodRecord<z.ZodString, z.ZodString>, "strip">> | undefined;
|
|
779
|
-
options?: {
|
|
780
|
-
detectLocale?: boolean | undefined;
|
|
781
|
-
rtlLocales?: string[] | undefined;
|
|
782
|
-
preserveOriginalAttribute?: string | undefined;
|
|
783
|
-
validate?: boolean | undefined;
|
|
784
|
-
} | undefined;
|
|
785
785
|
variables?: Record<string, unknown> | undefined;
|
|
786
786
|
environment?: "frontend" | "backend" | "universal" | undefined;
|
|
787
787
|
debug?: boolean | undefined;
|