@lokascript/i18n 1.2.0 → 1.3.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 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;
508
507
  detectLocale: boolean;
509
508
  rtlLocales: string[];
509
+ validate: boolean;
510
510
  preserveOriginalAttribute?: string | undefined;
511
511
  }, {
512
- validate?: boolean | undefined;
513
512
  detectLocale?: boolean | undefined;
514
513
  rtlLocales?: string[] | undefined;
515
514
  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,12 +523,6 @@ 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;
532
526
  fallbackLocale?: string | undefined;
533
527
  dictionaries?: Record<string, z.objectOutputType<{
534
528
  commands: z.ZodRecord<z.ZodString, z.ZodString>;
@@ -539,15 +533,15 @@ declare const EnhancedI18nInputSchema: z.ZodObject<{
539
533
  values: z.ZodRecord<z.ZodString, z.ZodString>;
540
534
  attributes: z.ZodRecord<z.ZodString, z.ZodString>;
541
535
  }, z.ZodRecord<z.ZodString, z.ZodString>, "strip">> | undefined;
542
- variables?: Record<string, unknown> | undefined;
543
- }, {
544
- locale: string;
545
536
  options?: {
546
- validate?: boolean | undefined;
547
- detectLocale?: boolean | undefined;
548
- rtlLocales?: string[] | undefined;
537
+ detectLocale: boolean;
538
+ rtlLocales: string[];
539
+ validate: boolean;
549
540
  preserveOriginalAttribute?: string | undefined;
550
541
  } | undefined;
542
+ variables?: Record<string, unknown> | undefined;
543
+ }, {
544
+ locale: string;
551
545
  fallbackLocale?: string | undefined;
552
546
  dictionaries?: Record<string, z.objectInputType<{
553
547
  commands: z.ZodRecord<z.ZodString, z.ZodString>;
@@ -558,6 +552,12 @@ declare const EnhancedI18nInputSchema: z.ZodObject<{
558
552
  values: z.ZodRecord<z.ZodString, z.ZodString>;
559
553
  attributes: z.ZodRecord<z.ZodString, z.ZodString>;
560
554
  }, 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;
603
602
  set?: any;
604
603
  get?: any;
605
604
  has?: any;
606
- }, {
607
605
  keys?: any;
606
+ }, {
608
607
  set?: any;
609
608
  get?: any;
610
609
  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";
631
630
  locale: {
632
631
  direction: "ltr" | "rtl";
633
632
  current: string;
634
633
  available: string[];
635
634
  fallback?: string | undefined;
636
635
  };
636
+ category: "Universal";
637
637
  dictionary: {
638
- keys?: any;
639
638
  set?: any;
640
639
  get?: any;
641
640
  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";
660
659
  locale: {
661
660
  direction: "ltr" | "rtl";
662
661
  current: string;
663
662
  available: string[];
664
663
  fallback?: string | undefined;
665
664
  };
665
+ category: "Universal";
666
666
  dictionary: {
667
- keys?: any;
668
667
  set?: any;
669
668
  get?: any;
670
669
  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;
732
731
  detectLocale: boolean;
733
732
  rtlLocales: string[];
733
+ validate: boolean;
734
734
  preserveOriginalAttribute?: string | undefined;
735
735
  }, {
736
- validate?: boolean | undefined;
737
736
  detectLocale?: boolean | undefined;
738
737
  rtlLocales?: string[] | undefined;
739
738
  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,12 +747,6 @@ 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;
756
750
  fallbackLocale?: string | undefined;
757
751
  dictionaries?: Record<string, z.objectOutputType<{
758
752
  commands: z.ZodRecord<z.ZodString, z.ZodString>;
@@ -763,15 +757,15 @@ declare class TypedI18nContextImplementation {
763
757
  values: z.ZodRecord<z.ZodString, z.ZodString>;
764
758
  attributes: z.ZodRecord<z.ZodString, z.ZodString>;
765
759
  }, z.ZodRecord<z.ZodString, z.ZodString>, "strip">> | undefined;
766
- variables?: Record<string, unknown> | undefined;
767
- }, {
768
- locale: string;
769
760
  options?: {
770
- validate?: boolean | undefined;
771
- detectLocale?: boolean | undefined;
772
- rtlLocales?: string[] | undefined;
761
+ detectLocale: boolean;
762
+ rtlLocales: string[];
763
+ validate: boolean;
773
764
  preserveOriginalAttribute?: string | undefined;
774
765
  } | undefined;
766
+ variables?: Record<string, unknown> | undefined;
767
+ }, {
768
+ locale: string;
775
769
  fallbackLocale?: string | undefined;
776
770
  dictionaries?: Record<string, z.objectInputType<{
777
771
  commands: z.ZodRecord<z.ZodString, z.ZodString>;
@@ -782,6 +776,12 @@ declare class TypedI18nContextImplementation {
782
776
  values: z.ZodRecord<z.ZodString, z.ZodString>;
783
777
  attributes: z.ZodRecord<z.ZodString, z.ZodString>;
784
778
  }, 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;
508
507
  detectLocale: boolean;
509
508
  rtlLocales: string[];
509
+ validate: boolean;
510
510
  preserveOriginalAttribute?: string | undefined;
511
511
  }, {
512
- validate?: boolean | undefined;
513
512
  detectLocale?: boolean | undefined;
514
513
  rtlLocales?: string[] | undefined;
515
514
  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,12 +523,6 @@ 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;
532
526
  fallbackLocale?: string | undefined;
533
527
  dictionaries?: Record<string, z.objectOutputType<{
534
528
  commands: z.ZodRecord<z.ZodString, z.ZodString>;
@@ -539,15 +533,15 @@ declare const EnhancedI18nInputSchema: z.ZodObject<{
539
533
  values: z.ZodRecord<z.ZodString, z.ZodString>;
540
534
  attributes: z.ZodRecord<z.ZodString, z.ZodString>;
541
535
  }, z.ZodRecord<z.ZodString, z.ZodString>, "strip">> | undefined;
542
- variables?: Record<string, unknown> | undefined;
543
- }, {
544
- locale: string;
545
536
  options?: {
546
- validate?: boolean | undefined;
547
- detectLocale?: boolean | undefined;
548
- rtlLocales?: string[] | undefined;
537
+ detectLocale: boolean;
538
+ rtlLocales: string[];
539
+ validate: boolean;
549
540
  preserveOriginalAttribute?: string | undefined;
550
541
  } | undefined;
542
+ variables?: Record<string, unknown> | undefined;
543
+ }, {
544
+ locale: string;
551
545
  fallbackLocale?: string | undefined;
552
546
  dictionaries?: Record<string, z.objectInputType<{
553
547
  commands: z.ZodRecord<z.ZodString, z.ZodString>;
@@ -558,6 +552,12 @@ declare const EnhancedI18nInputSchema: z.ZodObject<{
558
552
  values: z.ZodRecord<z.ZodString, z.ZodString>;
559
553
  attributes: z.ZodRecord<z.ZodString, z.ZodString>;
560
554
  }, 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;
603
602
  set?: any;
604
603
  get?: any;
605
604
  has?: any;
606
- }, {
607
605
  keys?: any;
606
+ }, {
608
607
  set?: any;
609
608
  get?: any;
610
609
  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";
631
630
  locale: {
632
631
  direction: "ltr" | "rtl";
633
632
  current: string;
634
633
  available: string[];
635
634
  fallback?: string | undefined;
636
635
  };
636
+ category: "Universal";
637
637
  dictionary: {
638
- keys?: any;
639
638
  set?: any;
640
639
  get?: any;
641
640
  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";
660
659
  locale: {
661
660
  direction: "ltr" | "rtl";
662
661
  current: string;
663
662
  available: string[];
664
663
  fallback?: string | undefined;
665
664
  };
665
+ category: "Universal";
666
666
  dictionary: {
667
- keys?: any;
668
667
  set?: any;
669
668
  get?: any;
670
669
  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;
732
731
  detectLocale: boolean;
733
732
  rtlLocales: string[];
733
+ validate: boolean;
734
734
  preserveOriginalAttribute?: string | undefined;
735
735
  }, {
736
- validate?: boolean | undefined;
737
736
  detectLocale?: boolean | undefined;
738
737
  rtlLocales?: string[] | undefined;
739
738
  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,12 +747,6 @@ 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;
756
750
  fallbackLocale?: string | undefined;
757
751
  dictionaries?: Record<string, z.objectOutputType<{
758
752
  commands: z.ZodRecord<z.ZodString, z.ZodString>;
@@ -763,15 +757,15 @@ declare class TypedI18nContextImplementation {
763
757
  values: z.ZodRecord<z.ZodString, z.ZodString>;
764
758
  attributes: z.ZodRecord<z.ZodString, z.ZodString>;
765
759
  }, z.ZodRecord<z.ZodString, z.ZodString>, "strip">> | undefined;
766
- variables?: Record<string, unknown> | undefined;
767
- }, {
768
- locale: string;
769
760
  options?: {
770
- validate?: boolean | undefined;
771
- detectLocale?: boolean | undefined;
772
- rtlLocales?: string[] | undefined;
761
+ detectLocale: boolean;
762
+ rtlLocales: string[];
763
+ validate: boolean;
773
764
  preserveOriginalAttribute?: string | undefined;
774
765
  } | undefined;
766
+ variables?: Record<string, unknown> | undefined;
767
+ }, {
768
+ locale: string;
775
769
  fallbackLocale?: string | undefined;
776
770
  dictionaries?: Record<string, z.objectInputType<{
777
771
  commands: z.ZodRecord<z.ZodString, z.ZodString>;
@@ -782,6 +776,12 @@ declare class TypedI18nContextImplementation {
782
776
  values: z.ZodRecord<z.ZodString, z.ZodString>;
783
777
  attributes: z.ZodRecord<z.ZodString, z.ZodString>;
784
778
  }, 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokascript/i18n",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Grammar transformation and keyword translation for hyperscript",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",