generaltranslation 8.1.21 → 8.1.22

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.
@@ -1,2 +1,2 @@
1
- export declare const formatI18nextWarning = "Warning: formatI18next is not currently supported but will be implemented in a future version. Use _formatMessage for current ICU message format support.";
2
- export declare const formatJsxWarning = "Warning: formatJsx is not currently supported but will be implemented in a future version. Use _formatMessage for current ICU message format support.";
1
+ export declare const formatI18nextWarning = "Warning: formatI18next is not currently supported but will be implemented in a future version. Use _formatMessageICU for current ICU message format support.";
2
+ export declare const formatJsxWarning = "Warning: formatJsx is not currently supported but will be implemented in a future version. Use _formatMessageICU for current ICU message format support.";
@@ -27,10 +27,14 @@ export type JsxElement = {
27
27
  c?: JsxChildren;
28
28
  };
29
29
  export type JsxChild = string | JsxElement | Variable;
30
+ /**
31
+ * The format of the string content
32
+ */
33
+ export type StringFormat = 'ICU' | 'I18NEXT' | 'STRING';
30
34
  /**
31
35
  * The format of the content
32
36
  */
33
- export type DataFormat = 'JSX' | 'ICU' | 'I18NEXT' | 'STRING';
37
+ export type DataFormat = 'JSX' | StringFormat;
34
38
  /**
35
39
  * A content type representing JSX, ICU, and I18next messages
36
40
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.cjs.min.cjs","sources":["../src/types-dir/jsx/content.ts"],"sourcesContent":["import { Variable } from './variables';\n\n/**\n * Map of data-_gt properties to their corresponding React props\n */\nexport const HTML_CONTENT_PROPS = {\n pl: 'placeholder',\n ti: 'title',\n alt: 'alt',\n arl: 'aria-label',\n arb: 'aria-labelledby',\n ard: 'aria-describedby',\n} as const;\n\nexport type HtmlContentPropKeysRecord = Partial<\n Record<keyof typeof HTML_CONTENT_PROPS, string>\n>;\nexport type HtmlContentPropValuesRecord = Partial<\n Record<(typeof HTML_CONTENT_PROPS)[keyof typeof HTML_CONTENT_PROPS], string>\n>;\n\n/**\n * GTProp is an internal property used to contain data for translating and rendering elements.\n * note, transformations are only read on the server side if they are 'plural' or 'branch'\n */\nexport type GTProp = {\n b?: Record<string, JsxChildren>; // Branches\n t?: 'p' | 'b'; // Branch Transformation\n} & HtmlContentPropKeysRecord;\n\nexport type JsxElement = {\n t?: string; // tag name\n i?: number; // id\n d?: GTProp; // GT data\n c?: JsxChildren; // children\n};\n\nexport type JsxChild = string | JsxElement | Variable;\n\n/**\n * The format of the content\n */\nexport type DataFormat = 'JSX' | 'ICU' | 'I18NEXT' | 'STRING';\n\n/**\n * A content type representing JSX, ICU, and I18next messages\n */\nexport type Content = JsxChildren | IcuMessage | StringMessage | I18nextMessage;\n\n/**\n * A content type representing JSX elements\n */\nexport type JsxChildren = JsxChild | JsxChild[];\n\n/**\n * A content type representing ICU messages\n */\nexport type IcuMessage = string;\n\n/**\n * A content type representing I18next messages\n */\nexport type I18nextMessage = string;\n\n/**\n * A content type representing plain strings\n */\nexport type StringMessage = string;\n"],"names":["pl","ti","alt","arl","arb","ard"],"mappings":"wCAKkC,CAChCA,GAAI,cACJC,GAAI,QACJC,IAAK,MACLC,IAAK,aACLC,IAAK,kBACLC,IAAK"}
1
+ {"version":3,"file":"types.cjs.min.cjs","sources":["../src/types-dir/jsx/content.ts"],"sourcesContent":["import { Variable } from './variables';\n\n/**\n * Map of data-_gt properties to their corresponding React props\n */\nexport const HTML_CONTENT_PROPS = {\n pl: 'placeholder',\n ti: 'title',\n alt: 'alt',\n arl: 'aria-label',\n arb: 'aria-labelledby',\n ard: 'aria-describedby',\n} as const;\n\nexport type HtmlContentPropKeysRecord = Partial<\n Record<keyof typeof HTML_CONTENT_PROPS, string>\n>;\nexport type HtmlContentPropValuesRecord = Partial<\n Record<(typeof HTML_CONTENT_PROPS)[keyof typeof HTML_CONTENT_PROPS], string>\n>;\n\n/**\n * GTProp is an internal property used to contain data for translating and rendering elements.\n * note, transformations are only read on the server side if they are 'plural' or 'branch'\n */\nexport type GTProp = {\n b?: Record<string, JsxChildren>; // Branches\n t?: 'p' | 'b'; // Branch Transformation\n} & HtmlContentPropKeysRecord;\n\nexport type JsxElement = {\n t?: string; // tag name\n i?: number; // id\n d?: GTProp; // GT data\n c?: JsxChildren; // children\n};\n\nexport type JsxChild = string | JsxElement | Variable;\n\n/**\n * The format of the string content\n */\nexport type StringFormat = 'ICU' | 'I18NEXT' | 'STRING';\n\n/**\n * The format of the content\n */\nexport type DataFormat = 'JSX' | StringFormat;\n\n/**\n * A content type representing JSX, ICU, and I18next messages\n */\nexport type Content = JsxChildren | IcuMessage | StringMessage | I18nextMessage;\n\n/**\n * A content type representing JSX elements\n */\nexport type JsxChildren = JsxChild | JsxChild[];\n\n/**\n * A content type representing ICU messages\n */\nexport type IcuMessage = string;\n\n/**\n * A content type representing I18next messages\n */\nexport type I18nextMessage = string;\n\n/**\n * A content type representing plain strings\n */\nexport type StringMessage = string;\n"],"names":["pl","ti","alt","arl","arb","ard"],"mappings":"wCAKkC,CAChCA,GAAI,cACJC,GAAI,QACJC,IAAK,MACLC,IAAK,aACLC,IAAK,kBACLC,IAAK"}
package/dist/types.d.ts CHANGED
@@ -62,10 +62,14 @@ type JsxElement = {
62
62
  c?: JsxChildren;
63
63
  };
64
64
  type JsxChild = string | JsxElement | Variable;
65
+ /**
66
+ * The format of the string content
67
+ */
68
+ type StringFormat = 'ICU' | 'I18NEXT' | 'STRING';
65
69
  /**
66
70
  * The format of the content
67
71
  */
68
- type DataFormat = 'JSX' | 'ICU' | 'I18NEXT' | 'STRING';
72
+ type DataFormat = 'JSX' | StringFormat;
69
73
  /**
70
74
  * A content type representing JSX, ICU, and I18next messages
71
75
  */
@@ -122,7 +126,7 @@ type HashMetadata = {
122
126
  context?: string;
123
127
  id?: string;
124
128
  maxChars?: number;
125
- dataFormat: DataFormat;
129
+ dataFormat?: DataFormat;
126
130
  };
127
131
 
128
132
  type TranslationStatusResult = {
@@ -1 +1 @@
1
- {"version":3,"file":"types.esm.min.mjs","sources":["../src/types-dir/jsx/content.ts"],"sourcesContent":["import { Variable } from './variables';\n\n/**\n * Map of data-_gt properties to their corresponding React props\n */\nexport const HTML_CONTENT_PROPS = {\n pl: 'placeholder',\n ti: 'title',\n alt: 'alt',\n arl: 'aria-label',\n arb: 'aria-labelledby',\n ard: 'aria-describedby',\n} as const;\n\nexport type HtmlContentPropKeysRecord = Partial<\n Record<keyof typeof HTML_CONTENT_PROPS, string>\n>;\nexport type HtmlContentPropValuesRecord = Partial<\n Record<(typeof HTML_CONTENT_PROPS)[keyof typeof HTML_CONTENT_PROPS], string>\n>;\n\n/**\n * GTProp is an internal property used to contain data for translating and rendering elements.\n * note, transformations are only read on the server side if they are 'plural' or 'branch'\n */\nexport type GTProp = {\n b?: Record<string, JsxChildren>; // Branches\n t?: 'p' | 'b'; // Branch Transformation\n} & HtmlContentPropKeysRecord;\n\nexport type JsxElement = {\n t?: string; // tag name\n i?: number; // id\n d?: GTProp; // GT data\n c?: JsxChildren; // children\n};\n\nexport type JsxChild = string | JsxElement | Variable;\n\n/**\n * The format of the content\n */\nexport type DataFormat = 'JSX' | 'ICU' | 'I18NEXT' | 'STRING';\n\n/**\n * A content type representing JSX, ICU, and I18next messages\n */\nexport type Content = JsxChildren | IcuMessage | StringMessage | I18nextMessage;\n\n/**\n * A content type representing JSX elements\n */\nexport type JsxChildren = JsxChild | JsxChild[];\n\n/**\n * A content type representing ICU messages\n */\nexport type IcuMessage = string;\n\n/**\n * A content type representing I18next messages\n */\nexport type I18nextMessage = string;\n\n/**\n * A content type representing plain strings\n */\nexport type StringMessage = string;\n"],"names":["HTML_CONTENT_PROPS","pl","ti","alt","arl","arb","ard"],"mappings":"AAKO,IAAMA,EAAqB,CAChCC,GAAI,cACJC,GAAI,QACJC,IAAK,MACLC,IAAK,aACLC,IAAK,kBACLC,IAAK"}
1
+ {"version":3,"file":"types.esm.min.mjs","sources":["../src/types-dir/jsx/content.ts"],"sourcesContent":["import { Variable } from './variables';\n\n/**\n * Map of data-_gt properties to their corresponding React props\n */\nexport const HTML_CONTENT_PROPS = {\n pl: 'placeholder',\n ti: 'title',\n alt: 'alt',\n arl: 'aria-label',\n arb: 'aria-labelledby',\n ard: 'aria-describedby',\n} as const;\n\nexport type HtmlContentPropKeysRecord = Partial<\n Record<keyof typeof HTML_CONTENT_PROPS, string>\n>;\nexport type HtmlContentPropValuesRecord = Partial<\n Record<(typeof HTML_CONTENT_PROPS)[keyof typeof HTML_CONTENT_PROPS], string>\n>;\n\n/**\n * GTProp is an internal property used to contain data for translating and rendering elements.\n * note, transformations are only read on the server side if they are 'plural' or 'branch'\n */\nexport type GTProp = {\n b?: Record<string, JsxChildren>; // Branches\n t?: 'p' | 'b'; // Branch Transformation\n} & HtmlContentPropKeysRecord;\n\nexport type JsxElement = {\n t?: string; // tag name\n i?: number; // id\n d?: GTProp; // GT data\n c?: JsxChildren; // children\n};\n\nexport type JsxChild = string | JsxElement | Variable;\n\n/**\n * The format of the string content\n */\nexport type StringFormat = 'ICU' | 'I18NEXT' | 'STRING';\n\n/**\n * The format of the content\n */\nexport type DataFormat = 'JSX' | StringFormat;\n\n/**\n * A content type representing JSX, ICU, and I18next messages\n */\nexport type Content = JsxChildren | IcuMessage | StringMessage | I18nextMessage;\n\n/**\n * A content type representing JSX elements\n */\nexport type JsxChildren = JsxChild | JsxChild[];\n\n/**\n * A content type representing ICU messages\n */\nexport type IcuMessage = string;\n\n/**\n * A content type representing I18next messages\n */\nexport type I18nextMessage = string;\n\n/**\n * A content type representing plain strings\n */\nexport type StringMessage = string;\n"],"names":["HTML_CONTENT_PROPS","pl","ti","alt","arl","arb","ard"],"mappings":"AAKO,IAAMA,EAAqB,CAChCC,GAAI,cACJC,GAAI,QACJC,IAAK,MACLC,IAAK,aACLC,IAAK,kBACLC,IAAK"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generaltranslation",
3
- "version": "8.1.21",
3
+ "version": "8.1.22",
4
4
  "description": "A language toolkit for AI developers",
5
5
  "main": "dist/index.cjs.min.cjs",
6
6
  "module": "dist/index.esm.min.mjs",