{"version":3,"file":"types.cjs","names":[],"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 * String format content.\n */\nexport type StringContent = IcuMessage | StringMessage | I18nextMessage;\n\n/**\n * A content type representing JSX, ICU, and I18next messages.\n */\nexport type Content = JsxChildren | StringContent;\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"],"mappings":";;;;;AAKA,MAAa,qBAAqB;CAChC,IAAI;CACJ,IAAI;CACJ,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACN"}