@intlayer/core 9.4.0-canary.0 → 9.4.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/README.md +3 -0
- package/dist/cjs/dictionaryManipulator/index.cjs +5 -2
- package/dist/cjs/index.cjs +15 -3
- package/dist/cjs/interpreter/dictionaryTransformCache.cjs +111 -0
- package/dist/cjs/interpreter/dictionaryTransformCache.cjs.map +1 -0
- package/dist/cjs/interpreter/getDictionary.cjs +8 -8
- package/dist/cjs/interpreter/getDictionary.cjs.map +1 -1
- package/dist/cjs/interpreter/getDictionaryAsync.cjs +79 -0
- package/dist/cjs/interpreter/getDictionaryAsync.cjs.map +1 -0
- package/dist/cjs/interpreter/getIntlayer.cjs +22 -15
- package/dist/cjs/interpreter/getIntlayer.cjs.map +1 -1
- package/dist/cjs/interpreter/getIntlayerAsync.cjs +36 -0
- package/dist/cjs/interpreter/getIntlayerAsync.cjs.map +1 -0
- package/dist/cjs/interpreter/index.cjs +10 -1
- package/dist/cjs/localization/generateSitemap.cjs +57 -27
- package/dist/cjs/localization/generateSitemap.cjs.map +1 -1
- package/dist/cjs/localization/getLocalizedPath.cjs +3 -0
- package/dist/cjs/localization/getLocalizedPath.cjs.map +1 -1
- package/dist/cjs/localization/getLocalizedPath.test-d.cjs +16 -0
- package/dist/cjs/localization/getLocalizedPath.test-d.cjs.map +1 -1
- package/dist/cjs/localization/getLocalizedUrl.cjs +8 -0
- package/dist/cjs/localization/getLocalizedUrl.cjs.map +1 -1
- package/dist/cjs/localization/getLocalizedUrl.test-d.cjs +36 -0
- package/dist/cjs/localization/getLocalizedUrl.test-d.cjs.map +1 -1
- package/dist/cjs/localization/getPrefix.cjs.map +1 -1
- package/dist/cjs/markdown/constants.cjs +24 -3
- package/dist/cjs/markdown/constants.cjs.map +1 -1
- package/dist/esm/dictionaryManipulator/index.mjs +4 -3
- package/dist/esm/index.mjs +7 -3
- package/dist/esm/interpreter/dictionaryTransformCache.mjs +107 -0
- package/dist/esm/interpreter/dictionaryTransformCache.mjs.map +1 -0
- package/dist/esm/interpreter/getDictionary.mjs +9 -9
- package/dist/esm/interpreter/getDictionary.mjs.map +1 -1
- package/dist/esm/interpreter/getDictionaryAsync.mjs +78 -0
- package/dist/esm/interpreter/getDictionaryAsync.mjs.map +1 -0
- package/dist/esm/interpreter/getIntlayer.mjs +22 -15
- package/dist/esm/interpreter/getIntlayer.mjs.map +1 -1
- package/dist/esm/interpreter/getIntlayerAsync.mjs +35 -0
- package/dist/esm/interpreter/getIntlayerAsync.mjs.map +1 -0
- package/dist/esm/interpreter/index.mjs +4 -1
- package/dist/esm/localization/generateSitemap.mjs +57 -27
- package/dist/esm/localization/generateSitemap.mjs.map +1 -1
- package/dist/esm/localization/getLocalizedPath.mjs +3 -0
- package/dist/esm/localization/getLocalizedPath.mjs.map +1 -1
- package/dist/esm/localization/getLocalizedPath.test-d.mjs +16 -0
- package/dist/esm/localization/getLocalizedPath.test-d.mjs.map +1 -1
- package/dist/esm/localization/getLocalizedUrl.mjs +8 -0
- package/dist/esm/localization/getLocalizedUrl.mjs.map +1 -1
- package/dist/esm/localization/getLocalizedUrl.test-d.mjs +36 -0
- package/dist/esm/localization/getLocalizedUrl.test-d.mjs.map +1 -1
- package/dist/esm/localization/getPrefix.mjs.map +1 -1
- package/dist/esm/markdown/constants.mjs +24 -3
- package/dist/esm/markdown/constants.mjs.map +1 -1
- package/dist/types/dictionaryManipulator/index.d.ts +3 -2
- package/dist/types/index.d.ts +7 -3
- package/dist/types/interpreter/dictionaryTransformCache.d.ts +42 -0
- package/dist/types/interpreter/dictionaryTransformCache.d.ts.map +1 -0
- package/dist/types/interpreter/getContent/plugins.d.ts +2 -2
- package/dist/types/interpreter/getDictionary.d.ts +0 -5
- package/dist/types/interpreter/getDictionary.d.ts.map +1 -1
- package/dist/types/interpreter/getDictionaryAsync.d.ts +34 -0
- package/dist/types/interpreter/getDictionaryAsync.d.ts.map +1 -0
- package/dist/types/interpreter/getIntlayer.d.ts.map +1 -1
- package/dist/types/interpreter/getIntlayerAsync.d.ts +36 -0
- package/dist/types/interpreter/getIntlayerAsync.d.ts.map +1 -0
- package/dist/types/interpreter/index.d.ts +5 -2
- package/dist/types/localization/generateSitemap.d.ts +34 -9
- package/dist/types/localization/generateSitemap.d.ts.map +1 -1
- package/dist/types/localization/getLocalizedPath.d.ts +3 -0
- package/dist/types/localization/getLocalizedPath.d.ts.map +1 -1
- package/dist/types/localization/getLocalizedUrl.d.ts +8 -0
- package/dist/types/localization/getLocalizedUrl.d.ts.map +1 -1
- package/dist/types/localization/getPrefix.d.ts +9 -4
- package/dist/types/localization/getPrefix.d.ts.map +1 -1
- package/dist/types/markdown/constants.d.ts +0 -1
- package/dist/types/markdown/constants.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.mjs","names":[],"sources":["../../../src/markdown/constants.ts"],"sourcesContent":["// ============================================================================\n// RULE TYPES\n// ============================================================================\n\n/**\n * Analogous to `node.type`. Please note that the values here may change at any time,\n * so do not hard code against the value directly.\n */\nexport const RuleType = {\n blockQuote: '0',\n breakLine: '1',\n breakThematic: '2',\n codeBlock: '3',\n codeFenced: '4',\n codeInline: '5',\n footnote: '6',\n footnoteReference: '7',\n gfmTask: '8',\n heading: '9',\n headingSetext: '10',\n /** only available if not `disableHTMLParsing` */\n htmlBlock: '11',\n htmlComment: '12',\n /** only available if not `disableHTMLParsing` */\n htmlSelfClosing: '13',\n /** Custom components like <Tabs>, <TabItem> */\n customComponent: '34',\n image: '14',\n link: '15',\n /** emits a `link` 'node', does not render directly */\n linkAngleBraceStyleDetector: '16',\n /** emits a `link` 'node', does not render directly */\n linkBareUrlDetector: '17',\n newlineCoalescer: '19',\n orderedList: '20',\n paragraph: '21',\n ref: '22',\n refImage: '23',\n refLink: '24',\n table: '25',\n tableSeparator: '26',\n text: '27',\n textBolded: '28',\n textEmphasized: '29',\n textEscaped: '30',\n textMarked: '31',\n textStrikethroughed: '32',\n unorderedList: '33',\n} as const;\n\n// In test environment, use human-readable keys for easier debugging\nif (process.env.NODE_ENV === 'test') {\n Object.keys(RuleType).forEach((key) => {\n (RuleType as any)[key] = key;\n });\n}\n\nexport type RuleTypeValue = (typeof RuleType)[keyof typeof RuleType];\n\n// ============================================================================\n// PRIORITY LEVELS\n// ============================================================================\n\n/**\n * Priority levels for rule ordering.\n */\nexport const Priority = {\n /** anything that must scan the tree before everything else */\n MAX: 0,\n /** scans for block-level constructs */\n HIGH: 1,\n /** inline w/ more priority than other inline */\n MED: 2,\n /** inline elements */\n LOW: 3,\n /** bare text and stuff that is considered leftovers */\n MIN: 4,\n} as const;\n\nexport type PriorityValue = (typeof Priority)[keyof typeof Priority];\n\n// ============================================================================\n// PERFORMANCE CONSTANTS\n// ============================================================================\n\n/** Threshold for performance logging (in milliseconds) */\nexport const DURATION_DELAY_TRIGGER = 20;\n\n// ============================================================================\n// ATTRIBUTE MAPPING\n// ============================================================================\n\n/**\n * Map of HTML attributes to their JSX prop equivalents.\n * Some renderers use camelCase for certain attributes.\n */\nexport const ATTRIBUTE_TO_NODE_PROP_MAP: Record<string, string> = [\n 'allowFullScreen',\n 'allowTransparency',\n 'autoComplete',\n 'autoFocus',\n 'autoPlay',\n 'cellPadding',\n 'cellSpacing',\n 'charSet',\n 'classId',\n 'colSpan',\n 'contentEditable',\n 'contextMenu',\n 'crossOrigin',\n 'encType',\n 'formAction',\n 'formEncType',\n 'formMethod',\n 'formNoValidate',\n 'formTarget',\n 'frameBorder',\n 'hrefLang',\n 'inputMode',\n 'keyParams',\n 'keyType',\n 'marginHeight',\n 'marginWidth',\n 'maxLength',\n 'mediaGroup',\n 'minLength',\n 'noValidate',\n 'radioGroup',\n 'readOnly',\n 'rowSpan',\n 'spellCheck',\n 'srcDoc',\n 'srcLang',\n 'srcSet',\n 'tabIndex',\n 'useMap',\n].reduce(\n (obj: Record<string, string>, x) => {\n obj[x.toLowerCase()] = x;\n return obj;\n },\n { class: 'className', for: 'htmlFor' }\n);\n\n// ============================================================================\n// NAMED CODES TO UNICODE\n// ============================================================================\n\n/**\n * Default HTML entity to unicode mappings.\n */\nexport const NAMED_CODES_TO_UNICODE: Record<string, string> = {\n amp: '\\u0026',\n apos: '\\u0027',\n gt: '\\u003e',\n lt: '\\u003c',\n nbsp: '\\u00a0',\n quot: '\\u201c',\n};\n\n// ============================================================================\n// SPECIAL ELEMENTS\n// ============================================================================\n\n/** HTML elements that should not have their content processed */\nexport const DO_NOT_PROCESS_HTML_ELEMENTS = ['style', 'script', 'pre'];\n\n/** Attributes that require URL sanitization */\nexport const ATTRIBUTES_TO_SANITIZE = [\n 'src',\n 'href',\n 'data',\n 'formAction',\n 'srcDoc',\n 'action',\n];\n\n// ============================================================================\n// REGEX PATTERNS\n// ============================================================================\n\n/** Attribute extractor regex */\nexport const ATTR_EXTRACTOR_R =\n /([-A-Z0-9_:]+)(?:\\s*=\\s*(?:(?:\"((?:\\\\.|[^\"])*)\")|(?:'((?:\\\\.|[^'])*)')|(?:\\{((?:\\\\.|{[^}]*?}|[^}])*)\\})))?/gi;\n\n/** Block end detection */\nexport const BLOCK_END_R = /\\n{2,}$/;\n\n/** Blockquote patterns */\nexport const BLOCKQUOTE_R = /^(\\s*>[\\s\\S]*?)(?=\\n\\n|$)/;\nexport const BLOCKQUOTE_TRIM_LEFT_MULTILINE_R = /^ *> ?/gm;\nexport const BLOCKQUOTE_ALERT_R = /^(?:\\[!([^\\]]*)\\]\\n)?([\\s\\S]*)/;\n\n/** Line break patterns */\nexport const BREAK_LINE_R = /^ {2,}\\n/;\nexport const BREAK_THEMATIC_R = /^(?:([-*_])( *\\1){2,}) *(?:\\n *)+\\n/;\n\n/** Code block patterns */\nexport const CODE_BLOCK_FENCED_R =\n /^(?: {1,3})?(`{3,}|~{3,}) *(\\S+)? *([^\\n]*?)?\\n([\\s\\S]*?)(?:\\1\\n?|$)/;\nexport const CODE_BLOCK_R = /^(?: {4}[^\\n]+\\n*)+(?:\\n *)+\\n?/;\n/** A single line opening or closing a fenced code block, with its indentation. */\nexport const FENCE_DELIMITER_R = /^([ \\t]*)(`{3,}|~{3,})/;\nexport const CODE_INLINE_R = /^(`+)((?:\\\\`|(?!\\1)`|[^`])+)\\1/;\n\n/** Newline patterns */\nexport const CONSECUTIVE_NEWLINE_R = /^(?:\\n *)*\\n/;\nexport const CR_NEWLINE_R = /\\r\\n?/g;\n\n/** Footnote patterns */\nexport const FOOTNOTE_R = /^\\[\\^([^\\]]+)](:(.*)((\\n+ {4,}.*)|(\\n(?!\\[\\^).+))*)/;\nexport const FOOTNOTE_REFERENCE_R = /^\\[\\^([^\\]]+)]/;\n\n/** Form feed */\nexport const FORMFEED_R = /\\f/g;\n\n/** Front matter */\nexport const FRONT_MATTER_R = /^---[ \\t]*\\n(.|\\n)*?\\n---[ \\t]*\\n/;\n\n/** GFM task */\nexport const GFM_TASK_R = /^\\s*?\\[(x|\\s)\\]/;\n\n/** Heading patterns */\nexport const HEADING_R = /^ *(#{1,6}) *([^\\n]+?)(?: +#*)?(?:\\n *)*(?:\\n|$)/;\nexport const HEADING_ATX_COMPLIANT_R =\n /^ *(#{1,6}) +([^\\n]+?)(?: +#*)?(?:\\n *)*(?:\\n|$)/;\nexport const HEADING_SETEXT_R = /^([^\\n]+)\\n *(=|-)\\2{2,} *\\n/;\n\n/** HTML patterns */\nexport const HTML_BLOCK_ELEMENT_R =\n /^ *(?!<[a-zA-Z][^ >/]* ?\\/>)<([a-zA-Z][^ >/]*) ?((?:[^>]*[^/])?)>\\n?(\\s*(?:<\\1[^>]*?>[\\s\\S]*?<\\/\\1>|(?!<\\1\\b)[\\s\\S])*?)<\\/\\1>(?!<\\/\\1>)\\n*/i;\nexport const HTML_CHAR_CODE_R =\n /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi;\nexport const HTML_COMMENT_R = /^<!--[\\s\\S]*?(?:-->)/;\nexport const HTML_CUSTOM_ATTR_R = /^(data|aria|x)-[a-z_][a-z\\d_.-]*$/;\nexport const HTML_SELF_CLOSING_ELEMENT_R =\n /^ *<([a-zA-Z][a-zA-Z0-9:]*)(?:\\s+((?:<.*?>|[^>])*))?\\/?>(?!<\\/\\1>)(\\s*\\n)?/i;\n\n/** Custom component pattern */\nexport const CUSTOM_COMPONENT_R =\n /^ *<([A-Z][a-zA-Z0-9]*)(?:\\s+((?:<.*?>|[^>])*))?>\\n?(\\s*(?:<\\1[^>]*?>[\\s\\S]*?<\\/\\1>|(?!<\\1\\b)[\\s\\S])*?)<\\/\\1>(?!<\\/\\1>)\\n*/;\n\n/** Interpolation */\nexport const INTERPOLATION_R = /^\\{.*\\}$/;\n\n/** Link patterns */\nexport const LINK_AUTOLINK_BARE_URL_R = /^(https?:\\/\\/[^\\s<]+[^<.,:;\"')\\]\\s])/;\nexport const LINK_AUTOLINK_R = /^<([^ >]+[:@/][^ >]+)>/;\nexport const CAPTURE_LETTER_AFTER_HYPHEN = /-([a-z])?/gi;\n\n/** Table patterns */\nexport const NP_TABLE_R =\n /^(\\|.*)\\n(?: *(\\|? *[-:]+ *\\|[-| :]*)\\n((?:.*\\|.*\\n)*))?\\n?/;\nexport const TABLE_TRIM_PIPES = /(^ *\\||\\| *$)/g;\nexport const TABLE_CENTER_ALIGN = /^ *:-+: *$/;\nexport const TABLE_LEFT_ALIGN = /^ *:-+ *$/;\nexport const TABLE_RIGHT_ALIGN = /^ *-+: *$/;\n\n/** Paragraph */\nexport const PARAGRAPH_R = /^[^\\n]+(?: {2}\\n|\\n{2,})/;\n\n/** Reference patterns */\nexport const REFERENCE_IMAGE_OR_LINK =\n /^\\[([^\\]]*)\\]:\\s+<?([^\\s>]+)>?\\s*(\"([^\"]*)\")?/;\nexport const REFERENCE_IMAGE_R = /^!\\[([^\\]]*)\\] ?\\[([^\\]]*)\\]/;\nexport const REFERENCE_LINK_R = /^\\[([^\\]]*)\\] ?\\[([^\\]]*)\\]/;\n\n/** Block detection */\nexport const SHOULD_RENDER_AS_BLOCK_R = /(\\n|^[-*]\\s|^#|^ {2,}|^-{2,}|^>\\s)/;\n\n/** Tab and whitespace */\nexport const TAB_R = /\\t/g;\nexport const TRIM_STARTING_NEWLINES = /^\\n+/;\nexport const HTML_LEFT_TRIM_AMOUNT_R = /^\\n*([ \\t]*)/;\n\n/** List patterns */\nexport const LIST_LOOKBEHIND_R = /(?:^|\\n)( *)$/;\nexport const ORDERED_LIST_BULLET = '(?:\\\\d+\\\\.)';\nexport const UNORDERED_LIST_BULLET = '(?:[*+-])';\n\n/** Text formatting patterns */\nexport const TEXT_ESCAPED_R = /^\\\\([^0-9A-Za-z\\s])/;\nexport const UNESCAPE_R = /\\\\([^0-9A-Za-z\\s])/g;\nexport const TEXT_PLAIN_R =\n /^[\\s\\S](?:(?! {2}\\n|[0-9]\\.|http)[^=*_~\\-\\n:<`\\\\[!])*/;\n\n/** Shortcode pattern */\nexport const SHORTCODE_R = /^(:[a-zA-Z0-9-_]+:)/;\n\n// ============================================================================\n// LIST TYPE CONSTANTS\n// ============================================================================\n\nexport type ListType = 1 | 2;\nexport const ORDERED: ListType = 1;\nexport const UNORDERED: ListType = 2;\n\n// ============================================================================\n// INLINE PATTERN HELPERS\n// ============================================================================\n\n/**\n * Ensure there's at least one more instance of the delimiter later\n * in the current sequence.\n */\nexport const LOOKAHEAD = (double: number): string =>\n `(?=[\\\\s\\\\S]+?\\\\1${double ? '\\\\1' : ''})`;\n\n/**\n * For inline formatting, this partial attempts to ignore characters that\n * may appear in nested formatting.\n */\nexport const INLINE_SKIP_R =\n '((?:\\\\[.*?\\\\][([].*?[)\\\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\\\[^\\\\s]|[\\\\s\\\\S])+?)';\n\n/** Bold text pattern */\nexport const TEXT_BOLD_R = new RegExp(\n `^([*_])\\\\1${LOOKAHEAD(1)}${INLINE_SKIP_R}\\\\1\\\\1(?!\\\\1)`\n);\n\n/** Emphasized text pattern */\nexport const TEXT_EMPHASIZED_R = new RegExp(\n `^([*_])${LOOKAHEAD(0)}${INLINE_SKIP_R}\\\\1(?!\\\\1)`\n);\n\n/** Marked text pattern */\nexport const TEXT_MARKED_R = new RegExp(\n `^(==)${LOOKAHEAD(0)}${INLINE_SKIP_R}\\\\1`\n);\n\n/** Strikethrough text pattern */\nexport const TEXT_STRIKETHROUGHED_R = new RegExp(\n `^(~~)${LOOKAHEAD(0)}${INLINE_SKIP_R}\\\\1`\n);\n\n// ============================================================================\n// LIST REGEX GENERATORS\n// ============================================================================\n\nexport const generateListItemPrefix = (type: ListType): string => {\n return (\n '( *)(' +\n (type === ORDERED ? ORDERED_LIST_BULLET : UNORDERED_LIST_BULLET) +\n ') +'\n );\n};\n\nexport const ORDERED_LIST_ITEM_PREFIX = generateListItemPrefix(ORDERED);\nexport const UNORDERED_LIST_ITEM_PREFIX = generateListItemPrefix(UNORDERED);\n\nexport const generateListItemPrefixRegex = (type: ListType): RegExp => {\n return new RegExp(\n '^' +\n (type === ORDERED ? ORDERED_LIST_ITEM_PREFIX : UNORDERED_LIST_ITEM_PREFIX)\n );\n};\n\nexport const ORDERED_LIST_ITEM_PREFIX_R = generateListItemPrefixRegex(ORDERED);\nexport const UNORDERED_LIST_ITEM_PREFIX_R =\n generateListItemPrefixRegex(UNORDERED);\n\nexport const generateListItemRegex = (type: ListType): RegExp => {\n return new RegExp(\n '^' +\n (type === ORDERED\n ? ORDERED_LIST_ITEM_PREFIX\n : UNORDERED_LIST_ITEM_PREFIX) +\n '[^\\\\n]*(?:\\\\n' +\n '(?!\\\\1' +\n (type === ORDERED ? ORDERED_LIST_BULLET : UNORDERED_LIST_BULLET) +\n ' )[^\\\\n]*)*(\\\\n|$)',\n 'gm'\n );\n};\n\nexport const ORDERED_LIST_ITEM_R = generateListItemRegex(ORDERED);\nexport const UNORDERED_LIST_ITEM_R = generateListItemRegex(UNORDERED);\n\nexport const generateListRegex = (type: ListType): RegExp => {\n const bullet = type === ORDERED ? ORDERED_LIST_BULLET : UNORDERED_LIST_BULLET;\n\n return new RegExp(\n '^( *)(' +\n bullet +\n ') ' +\n '[\\\\s\\\\S]+?(?:\\\\n{2,}(?! )' +\n '(?!\\\\1' +\n bullet +\n ' (?!' +\n bullet +\n ' ))\\\\n*' +\n '|\\\\s*\\\\n*$)'\n );\n};\n\nexport const ORDERED_LIST_R = generateListRegex(ORDERED);\nexport const UNORDERED_LIST_R = generateListRegex(UNORDERED);\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"constants.mjs","names":[],"sources":["../../../src/markdown/constants.ts"],"sourcesContent":["// ============================================================================\n// RULE TYPES\n// ============================================================================\n\n/**\n * Analogous to `node.type`. Please note that the values here may change at any time,\n * so do not hard code against the value directly.\n */\nexport const RuleType = {\n blockQuote: '0',\n breakLine: '1',\n breakThematic: '2',\n codeBlock: '3',\n codeFenced: '4',\n codeInline: '5',\n footnote: '6',\n footnoteReference: '7',\n gfmTask: '8',\n heading: '9',\n headingSetext: '10',\n /** only available if not `disableHTMLParsing` */\n htmlBlock: '11',\n htmlComment: '12',\n /** only available if not `disableHTMLParsing` */\n htmlSelfClosing: '13',\n /** Custom components like <Tabs>, <TabItem> */\n customComponent: '34',\n image: '14',\n link: '15',\n /** emits a `link` 'node', does not render directly */\n linkAngleBraceStyleDetector: '16',\n /** emits a `link` 'node', does not render directly */\n linkBareUrlDetector: '17',\n newlineCoalescer: '19',\n orderedList: '20',\n paragraph: '21',\n ref: '22',\n refImage: '23',\n refLink: '24',\n table: '25',\n tableSeparator: '26',\n text: '27',\n textBolded: '28',\n textEmphasized: '29',\n textEscaped: '30',\n textMarked: '31',\n textStrikethroughed: '32',\n unorderedList: '33',\n} as const;\n\n// In test environment, use human-readable keys for easier debugging\nif (process.env.NODE_ENV === 'test') {\n Object.keys(RuleType).forEach((key) => {\n (RuleType as any)[key] = key;\n });\n}\n\nexport type RuleTypeValue = (typeof RuleType)[keyof typeof RuleType];\n\n// ============================================================================\n// PRIORITY LEVELS\n// ============================================================================\n\n/**\n * Priority levels for rule ordering.\n */\nexport const Priority = {\n /** anything that must scan the tree before everything else */\n MAX: 0,\n /** scans for block-level constructs */\n HIGH: 1,\n /** inline w/ more priority than other inline */\n MED: 2,\n /** inline elements */\n LOW: 3,\n /** bare text and stuff that is considered leftovers */\n MIN: 4,\n} as const;\n\nexport type PriorityValue = (typeof Priority)[keyof typeof Priority];\n\n// ============================================================================\n// PERFORMANCE CONSTANTS\n// ============================================================================\n\n/** Threshold for performance logging (in milliseconds) */\nexport const DURATION_DELAY_TRIGGER = 20;\n\n// ============================================================================\n// ATTRIBUTE MAPPING\n// ============================================================================\n\n/**\n * Map of HTML attributes to their JSX prop equivalents.\n * Some renderers use camelCase for certain attributes.\n */\nexport const ATTRIBUTE_TO_NODE_PROP_MAP: Record<string, string> = [\n 'allowFullScreen',\n 'allowTransparency',\n 'autoComplete',\n 'autoFocus',\n 'autoPlay',\n 'cellPadding',\n 'cellSpacing',\n 'charSet',\n 'classId',\n 'colSpan',\n 'contentEditable',\n 'contextMenu',\n 'crossOrigin',\n 'encType',\n 'formAction',\n 'formEncType',\n 'formMethod',\n 'formNoValidate',\n 'formTarget',\n 'frameBorder',\n 'hrefLang',\n 'inputMode',\n 'keyParams',\n 'keyType',\n 'marginHeight',\n 'marginWidth',\n 'maxLength',\n 'mediaGroup',\n 'minLength',\n 'noValidate',\n 'radioGroup',\n 'readOnly',\n 'rowSpan',\n 'spellCheck',\n 'srcDoc',\n 'srcLang',\n 'srcSet',\n 'tabIndex',\n 'useMap',\n].reduce(\n (obj: Record<string, string>, x) => {\n obj[x.toLowerCase()] = x;\n return obj;\n },\n { class: 'className', for: 'htmlFor' }\n);\n\n// ============================================================================\n// NAMED CODES TO UNICODE\n// ============================================================================\n\n/**\n * Default HTML entity to unicode mappings.\n */\nexport const NAMED_CODES_TO_UNICODE: Record<string, string> = {\n amp: '\\u0026',\n apos: '\\u0027',\n gt: '\\u003e',\n lt: '\\u003c',\n nbsp: '\\u00a0',\n quot: '\\u201c',\n};\n\n// ============================================================================\n// SPECIAL ELEMENTS\n// ============================================================================\n\n/** HTML elements that should not have their content processed */\nexport const DO_NOT_PROCESS_HTML_ELEMENTS = ['style', 'script', 'pre'];\n\n/** Attributes that require URL sanitization */\nexport const ATTRIBUTES_TO_SANITIZE = [\n 'src',\n 'href',\n 'data',\n 'formAction',\n 'srcDoc',\n 'action',\n];\n\n// ============================================================================\n// REGEX PATTERNS\n// ============================================================================\n\n/** Attribute extractor regex */\nexport const ATTR_EXTRACTOR_R =\n /([-A-Z0-9_:]+)(?:\\s*=\\s*(?:(?:\"((?:\\\\.|[^\"])*)\")|(?:'((?:\\\\.|[^'])*)')|(?:\\{((?:\\\\.|{[^}]*?}|[^}])*)\\})))?/gi;\n\n/** Block end detection */\nexport const BLOCK_END_R = /\\n{2,}$/;\n\n/** Blockquote patterns */\nexport const BLOCKQUOTE_R = /^(\\s*>[\\s\\S]*?)(?=\\n\\n|$)/;\nexport const BLOCKQUOTE_TRIM_LEFT_MULTILINE_R = /^ *> ?/gm;\nexport const BLOCKQUOTE_ALERT_R = /^(?:\\[!([^\\]]*)\\]\\n)?([\\s\\S]*)/;\n\n/** Line break patterns */\nexport const BREAK_LINE_R = /^ {2,}\\n/;\nexport const BREAK_THEMATIC_R = /^(?:([-*_])( *\\1){2,}) *(?:\\n *)+\\n/;\n\n/** Code block patterns */\nexport const CODE_BLOCK_FENCED_R =\n /^(?: {1,3})?(`{3,}|~{3,}) *(\\S+)? *([^\\n]*?)?\\n([\\s\\S]*?)(?:\\1\\n?|$)/;\nexport const CODE_BLOCK_R = /^(?: {4}[^\\n]+\\n*)+(?:\\n *)+\\n?/;\n/** A single line opening or closing a fenced code block, with its indentation. */\nexport const FENCE_DELIMITER_R = /^([ \\t]*)(`{3,}|~{3,})/;\nexport const CODE_INLINE_R = /^(`+)((?:\\\\`|(?!\\1)`|[^`])+)\\1/;\n\n/** Newline patterns */\nexport const CONSECUTIVE_NEWLINE_R = /^(?:\\n *)*\\n/;\nexport const CR_NEWLINE_R = /\\r\\n?/g;\n\n/** Footnote patterns */\nexport const FOOTNOTE_R = /^\\[\\^([^\\]]+)](:(.*)((\\n+ {4,}.*)|(\\n(?!\\[\\^).+))*)/;\nexport const FOOTNOTE_REFERENCE_R = /^\\[\\^([^\\]]+)]/;\n\n/** Form feed */\nexport const FORMFEED_R = /\\f/g;\n\n/** Front matter */\nexport const FRONT_MATTER_R = /^---[ \\t]*\\n(.|\\n)*?\\n---[ \\t]*\\n/;\n\n/** GFM task */\nexport const GFM_TASK_R = /^\\s*?\\[(x|\\s)\\]/;\n\n/** Heading patterns */\nexport const HEADING_R = /^ *(#{1,6}) *([^\\n]+?)(?: +#*)?(?:\\n *)*(?:\\n|$)/;\nexport const HEADING_ATX_COMPLIANT_R =\n /^ *(#{1,6}) +([^\\n]+?)(?: +#*)?(?:\\n *)*(?:\\n|$)/;\nexport const HEADING_SETEXT_R = /^([^\\n]+)\\n *(=|-)\\2{2,} *\\n/;\n\n/** HTML patterns */\n\n/**\n * Run of characters carrying no meaning inside an opening tag: neither a quote\n * opening a value nor an angle bracket delimiting a tag.\n */\nconst TAG_PLAIN_RUN = `[^>\"'<]*`;\n\n/**\n * Quoted attribute value. It may hold an angle bracket —\n * `<Tab label='Intlayer >=9.4'>` — but not a line break, which keeps a tag that\n * turns out not to match from trying every later quote of the document as its\n * closing one.\n */\nconst TAG_QUOTED_VALUE = `\"[^\"\\\\n]*\"|'[^'\\\\n]*'`;\n\n/**\n * Attribute list of an opening tag, written as a plain run followed by\n * quote-or-bracket-led segments so that each character has a single way to be\n * read. A lone quote is allowed last so a tag holding an unbalanced one still\n * parses, as it did before quoted values were recognised.\n */\nconst TAG_ATTRIBUTES = `${TAG_PLAIN_RUN}(?:(?:${TAG_QUOTED_VALUE}|<.*?>|[\"'])${TAG_PLAIN_RUN})*`;\n\n/** Rejects the opening tag of a self-closing element, `<div class=\"a\"/>`. */\nconst NOT_SELF_CLOSING = `(?![^>]*/>)`;\n\n/**\n * Opening tag of a nested element bearing the same name as the outer one. This\n * one stays a plain scan up to the first `>`: it is tried at every character of\n * the element's content, and a richer pattern here costs an order of magnitude\n * on documents whose tag never closes.\n */\nconst NESTED_SAME_TAG_OPENING = `<\\\\1[^>]*?>`;\n\nexport const HTML_BLOCK_ELEMENT_R = new RegExp(\n `^ *(?!<[a-zA-Z][^ >/]* ?/>)<([a-zA-Z][^ >/]*) ?(${NOT_SELF_CLOSING}${TAG_ATTRIBUTES})>\\\\n?(\\\\s*(?:${NESTED_SAME_TAG_OPENING}[\\\\s\\\\S]*?</\\\\1>|(?!<\\\\1\\\\b)[\\\\s\\\\S])*?)</\\\\1>(?!</\\\\1>)\\\\n*`,\n 'i'\n);\nexport const HTML_CHAR_CODE_R =\n /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi;\nexport const HTML_COMMENT_R = /^<!--[\\s\\S]*?(?:-->)/;\nexport const HTML_CUSTOM_ATTR_R = /^(data|aria|x)-[a-z_][a-z\\d_.-]*$/;\nexport const HTML_SELF_CLOSING_ELEMENT_R = new RegExp(\n `^ *<([a-zA-Z][a-zA-Z0-9:]*)(?:\\\\s+(${TAG_ATTRIBUTES}))?/?>(?!</\\\\1>)(\\\\s*\\\\n)?`,\n 'i'\n);\n\n/** Custom component pattern */\nexport const CUSTOM_COMPONENT_R = new RegExp(\n `^ *<([A-Z][a-zA-Z0-9]*)(?:\\\\s+(${TAG_ATTRIBUTES}))?>\\\\n?(\\\\s*(?:${NESTED_SAME_TAG_OPENING}[\\\\s\\\\S]*?</\\\\1>|(?!<\\\\1\\\\b)[\\\\s\\\\S])*?)</\\\\1>(?!</\\\\1>)\\\\n*`\n);\n\n/** Interpolation */\nexport const INTERPOLATION_R = /^\\{.*\\}$/;\n\n/** Link patterns */\nexport const LINK_AUTOLINK_BARE_URL_R = /^(https?:\\/\\/[^\\s<]+[^<.,:;\"')\\]\\s])/;\nexport const LINK_AUTOLINK_R = /^<([^ >]+[:@/][^ >]+)>/;\nexport const CAPTURE_LETTER_AFTER_HYPHEN = /-([a-z])?/gi;\n\n/** Table patterns */\nexport const NP_TABLE_R =\n /^(\\|.*)\\n(?: *(\\|? *[-:]+ *\\|[-| :]*)\\n((?:.*\\|.*\\n)*))?\\n?/;\nexport const TABLE_TRIM_PIPES = /(^ *\\||\\| *$)/g;\nexport const TABLE_CENTER_ALIGN = /^ *:-+: *$/;\nexport const TABLE_LEFT_ALIGN = /^ *:-+ *$/;\nexport const TABLE_RIGHT_ALIGN = /^ *-+: *$/;\n\n/** Paragraph */\nexport const PARAGRAPH_R = /^[^\\n]+(?: {2}\\n|\\n{2,})/;\n\n/** Reference patterns */\nexport const REFERENCE_IMAGE_OR_LINK =\n /^\\[([^\\]]*)\\]:\\s+<?([^\\s>]+)>?\\s*(\"([^\"]*)\")?/;\nexport const REFERENCE_IMAGE_R = /^!\\[([^\\]]*)\\] ?\\[([^\\]]*)\\]/;\nexport const REFERENCE_LINK_R = /^\\[([^\\]]*)\\] ?\\[([^\\]]*)\\]/;\n\n/** Block detection */\nexport const SHOULD_RENDER_AS_BLOCK_R = /(\\n|^[-*]\\s|^#|^ {2,}|^-{2,}|^>\\s)/;\n\n/** Tab and whitespace */\nexport const TAB_R = /\\t/g;\nexport const TRIM_STARTING_NEWLINES = /^\\n+/;\nexport const HTML_LEFT_TRIM_AMOUNT_R = /^\\n*([ \\t]*)/;\n\n/** List patterns */\nexport const LIST_LOOKBEHIND_R = /(?:^|\\n)( *)$/;\nexport const ORDERED_LIST_BULLET = '(?:\\\\d+\\\\.)';\nexport const UNORDERED_LIST_BULLET = '(?:[*+-])';\n\n/** Text formatting patterns */\nexport const TEXT_ESCAPED_R = /^\\\\([^0-9A-Za-z\\s])/;\nexport const UNESCAPE_R = /\\\\([^0-9A-Za-z\\s])/g;\nexport const TEXT_PLAIN_R =\n /^[\\s\\S](?:(?! {2}\\n|[0-9]\\.|http)[^=*_~\\-\\n:<`\\\\[!])*/;\n\n/** Shortcode pattern */\nexport const SHORTCODE_R = /^(:[a-zA-Z0-9-_]+:)/;\n\n// ============================================================================\n// LIST TYPE CONSTANTS\n// ============================================================================\n\nexport type ListType = 1 | 2;\nexport const ORDERED: ListType = 1;\nexport const UNORDERED: ListType = 2;\n\n// ============================================================================\n// INLINE PATTERN HELPERS\n// ============================================================================\n\n/**\n * Ensure there's at least one more instance of the delimiter later\n * in the current sequence.\n */\nexport const LOOKAHEAD = (double: number): string =>\n `(?=[\\\\s\\\\S]+?\\\\1${double ? '\\\\1' : ''})`;\n\n/**\n * For inline formatting, this partial attempts to ignore characters that\n * may appear in nested formatting.\n */\nexport const INLINE_SKIP_R =\n '((?:\\\\[.*?\\\\][([].*?[)\\\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\\\[^\\\\s]|[\\\\s\\\\S])+?)';\n\n/** Bold text pattern */\nexport const TEXT_BOLD_R = new RegExp(\n `^([*_])\\\\1${LOOKAHEAD(1)}${INLINE_SKIP_R}\\\\1\\\\1(?!\\\\1)`\n);\n\n/** Emphasized text pattern */\nexport const TEXT_EMPHASIZED_R = new RegExp(\n `^([*_])${LOOKAHEAD(0)}${INLINE_SKIP_R}\\\\1(?!\\\\1)`\n);\n\n/** Marked text pattern */\nexport const TEXT_MARKED_R = new RegExp(\n `^(==)${LOOKAHEAD(0)}${INLINE_SKIP_R}\\\\1`\n);\n\n/** Strikethrough text pattern */\nexport const TEXT_STRIKETHROUGHED_R = new RegExp(\n `^(~~)${LOOKAHEAD(0)}${INLINE_SKIP_R}\\\\1`\n);\n\n// ============================================================================\n// LIST REGEX GENERATORS\n// ============================================================================\n\nexport const generateListItemPrefix = (type: ListType): string => {\n return (\n '( *)(' +\n (type === ORDERED ? ORDERED_LIST_BULLET : UNORDERED_LIST_BULLET) +\n ') +'\n );\n};\n\nexport const ORDERED_LIST_ITEM_PREFIX = generateListItemPrefix(ORDERED);\nexport const UNORDERED_LIST_ITEM_PREFIX = generateListItemPrefix(UNORDERED);\n\nexport const generateListItemPrefixRegex = (type: ListType): RegExp => {\n return new RegExp(\n '^' +\n (type === ORDERED ? ORDERED_LIST_ITEM_PREFIX : UNORDERED_LIST_ITEM_PREFIX)\n );\n};\n\nexport const ORDERED_LIST_ITEM_PREFIX_R = generateListItemPrefixRegex(ORDERED);\nexport const UNORDERED_LIST_ITEM_PREFIX_R =\n generateListItemPrefixRegex(UNORDERED);\n\nexport const generateListItemRegex = (type: ListType): RegExp => {\n return new RegExp(\n '^' +\n (type === ORDERED\n ? ORDERED_LIST_ITEM_PREFIX\n : UNORDERED_LIST_ITEM_PREFIX) +\n '[^\\\\n]*(?:\\\\n' +\n '(?!\\\\1' +\n (type === ORDERED ? ORDERED_LIST_BULLET : UNORDERED_LIST_BULLET) +\n ' )[^\\\\n]*)*(\\\\n|$)',\n 'gm'\n );\n};\n\nexport const ORDERED_LIST_ITEM_R = generateListItemRegex(ORDERED);\nexport const UNORDERED_LIST_ITEM_R = generateListItemRegex(UNORDERED);\n\nexport const generateListRegex = (type: ListType): RegExp => {\n const bullet = type === ORDERED ? ORDERED_LIST_BULLET : UNORDERED_LIST_BULLET;\n\n return new RegExp(\n '^( *)(' +\n bullet +\n ') ' +\n '[\\\\s\\\\S]+?(?:\\\\n{2,}(?! )' +\n '(?!\\\\1' +\n bullet +\n ' (?!' +\n bullet +\n ' ))\\\\n*' +\n '|\\\\s*\\\\n*$)'\n );\n};\n\nexport const ORDERED_LIST_R = generateListRegex(ORDERED);\nexport const UNORDERED_LIST_R = generateListRegex(UNORDERED);\n"],"mappings":"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"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PlainDynamicLoaderMap, ResolvedDynamicLoader, findPlainDynamicLoader, resolvePlainDynamicLoader } from "./plainDynamicLoader.js";
|
|
2
|
+
import { DynamicDictionaryLoader, QUALIFIER_DYNAMIC_TYPES_KEY, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, isQualifiedDynamicLoaderMap, resolveQualifiedDynamicContent, resolveQualifiedDynamicContentAsync } from "./qualifiedDynamicLoader.js";
|
|
1
3
|
import { editDictionaryByKeyPath } from "./editDictionaryByKeyPath.js";
|
|
2
4
|
import { getContentNodeByKeyPath } from "./getContentNodeByKeyPath.js";
|
|
3
5
|
import { getDefaultNode } from "./getDefaultNode.js";
|
|
@@ -12,8 +14,7 @@ import { orderDictionaries } from "./orderDictionaries.js";
|
|
|
12
14
|
import { PRELOADED_DYNAMIC_KEY, PreloadableDynamicLoaderMap, PreloadedDynamicEntry, getPreloadedDictionary } from "./preloadedDynamicLoader.js";
|
|
13
15
|
import { COMPOSITE_ID_SEPARATOR, DEFAULT_VARIANT_ID, getDictionarySelectorCacheKey, isQualifiedDictionaryGroup, parseDictionarySelector, reconstructQualifiedEntry, resolveDictionaryArgument, resolveEffectiveVariantId, resolveProviderVariant, resolveQualifiedDictionary, serializeVariant, serializeVariantChain } from "./qualifiedDictionary.js";
|
|
14
16
|
import { QUALIFIER_ORDER, getDictionaryCompositeIds, getDictionaryQualifierIds, getDictionaryQualifierTypes, getVariantIds } from "./qualifiedDictionaryDeclaration.js";
|
|
15
|
-
import { DynamicDictionaryLoader, QUALIFIER_DYNAMIC_TYPES_KEY, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, isQualifiedDynamicLoaderMap, resolveQualifiedDynamicContent, resolveQualifiedDynamicContentAsync } from "./qualifiedDynamicLoader.js";
|
|
16
17
|
import { removeContentNodeByKeyPath } from "./removeContentNodeByKeyPath.js";
|
|
17
18
|
import { renameContentNodeByKeyPath } from "./renameContentNodeByKeyPath.js";
|
|
18
19
|
import { updateNodeChildren } from "./updateNodeChildren.js";
|
|
19
|
-
export { COMPOSITE_ID_SEPARATOR, DEFAULT_VARIANT_ID, DynamicDictionaryLoader, NestedFieldReferences, PRELOADED_DYNAMIC_KEY, PreloadableDynamicLoaderMap, PreloadedDynamicEntry, QUALIFIER_DYNAMIC_TYPES_KEY, QUALIFIER_ORDER, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, editDictionaryByKeyPath, getContentNodeByKeyPath, getDefaultNode, getDictionaryCompositeIds, getDictionaryQualifierIds, getDictionaryQualifierTypes, getDictionarySelectorCacheKey, getEmptyNode, getNestedDictionaryGraph, getNestedDictionaryKeys, getNestedDictionaryReferences, getNodeChildren, getNodeType, getPreloadedDictionary, getVariantIds, isQualifiedDictionaryGroup, isQualifiedDynamicLoaderMap, mergeDictionaries, mergeQualifiedDictionaries, normalizeDictionaries, normalizeDictionary, orderDictionaries, parseDictionarySelector, reconstructQualifiedEntry, removeContentNodeByKeyPath, renameContentNodeByKeyPath, resolveDictionaryArgument, resolveEffectiveVariantId, resolveProviderVariant, resolveQualifiedDictionary, resolveQualifiedDynamicContent, resolveQualifiedDynamicContentAsync, serializeVariant, serializeVariantChain, updateNodeChildren };
|
|
20
|
+
export { COMPOSITE_ID_SEPARATOR, DEFAULT_VARIANT_ID, DynamicDictionaryLoader, NestedFieldReferences, PRELOADED_DYNAMIC_KEY, PlainDynamicLoaderMap, PreloadableDynamicLoaderMap, PreloadedDynamicEntry, QUALIFIER_DYNAMIC_TYPES_KEY, QUALIFIER_ORDER, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, ResolvedDynamicLoader, editDictionaryByKeyPath, findPlainDynamicLoader, getContentNodeByKeyPath, getDefaultNode, getDictionaryCompositeIds, getDictionaryQualifierIds, getDictionaryQualifierTypes, getDictionarySelectorCacheKey, getEmptyNode, getNestedDictionaryGraph, getNestedDictionaryKeys, getNestedDictionaryReferences, getNodeChildren, getNodeType, getPreloadedDictionary, getVariantIds, isQualifiedDictionaryGroup, isQualifiedDynamicLoaderMap, mergeDictionaries, mergeQualifiedDictionaries, normalizeDictionaries, normalizeDictionary, orderDictionaries, parseDictionarySelector, reconstructQualifiedEntry, removeContentNodeByKeyPath, renameContentNodeByKeyPath, resolveDictionaryArgument, resolveEffectiveVariantId, resolvePlainDynamicLoader, resolveProviderVariant, resolveQualifiedDictionary, resolveQualifiedDynamicContent, resolveQualifiedDynamicContentAsync, serializeVariant, serializeVariantChain, updateNodeChildren };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -16,17 +16,22 @@ import { PluralCategory, PluralContent, PluralContentState, plural } from "./tra
|
|
|
16
16
|
import { SelectContent, SelectContentStates, select } from "./transpiler/select/select.js";
|
|
17
17
|
import { TranslationContent, t as translation } from "./transpiler/translation/translation.js";
|
|
18
18
|
import "./transpiler/index.js";
|
|
19
|
-
import { getCondition } from "./interpreter/getCondition.js";
|
|
20
19
|
import { GetNestingResult, getNesting } from "./interpreter/getNesting.js";
|
|
21
20
|
import { ConditionCond, DeepTransformContent, EnumerationCond, FileCond, GenderCond, IInterpreterPlugin, IInterpreterPluginState, InsertionCond, IsAny, NestedCond, NodeProps, Plugins, PluralCond, SelectCond, SelectSelector, TranslationCond, UnionKeys, ValueAtKey, conditionPlugin, enumerationPlugin, fallbackPlugin, filePlugin, genderPlugin, insertionPlugin, nestedPlugin, pluralPlugin, selectPlugin, translationPlugin } from "./interpreter/getContent/plugins.js";
|
|
22
21
|
import { deepTransformNode } from "./interpreter/getContent/deepTransform.js";
|
|
23
22
|
import { getBasePlugins, getContent } from "./interpreter/getContent/getContent.js";
|
|
23
|
+
import { getDictionaryTransformCacheKey, getPluginsCacheKey, readTransformCache, writeTransformCache } from "./interpreter/dictionaryTransformCache.js";
|
|
24
|
+
import { getCondition } from "./interpreter/getCondition.js";
|
|
24
25
|
import { getDictionary } from "./interpreter/getDictionary.js";
|
|
26
|
+
import { PlainDynamicLoaderMap, ResolvedDynamicLoader, findPlainDynamicLoader, resolvePlainDynamicLoader } from "./dictionaryManipulator/plainDynamicLoader.js";
|
|
27
|
+
import { DynamicDictionaryLoader, QUALIFIER_DYNAMIC_TYPES_KEY, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, isQualifiedDynamicLoaderMap, resolveQualifiedDynamicContent, resolveQualifiedDynamicContentAsync } from "./dictionaryManipulator/qualifiedDynamicLoader.js";
|
|
28
|
+
import { getDictionaryAsync } from "./interpreter/getDictionaryAsync.js";
|
|
25
29
|
import { findMatchingCondition, getEnumeration } from "./interpreter/getEnumeration.js";
|
|
26
30
|
import { getGender } from "./interpreter/getGender.js";
|
|
27
31
|
import { getHTML } from "./interpreter/getHTML.js";
|
|
28
32
|
import { getInsertion } from "./interpreter/getInsertion.js";
|
|
29
33
|
import { getIntlayer } from "./interpreter/getIntlayer.js";
|
|
34
|
+
import { getIntlayerAsync } from "./interpreter/getIntlayerAsync.js";
|
|
30
35
|
import { getPlural } from "./interpreter/getPlural.js";
|
|
31
36
|
import { getSelect } from "./interpreter/getSelect.js";
|
|
32
37
|
import { getTranslation } from "./interpreter/getTranslation.js";
|
|
@@ -58,7 +63,6 @@ import { orderDictionaries } from "./dictionaryManipulator/orderDictionaries.js"
|
|
|
58
63
|
import { PRELOADED_DYNAMIC_KEY, PreloadableDynamicLoaderMap, PreloadedDynamicEntry, getPreloadedDictionary } from "./dictionaryManipulator/preloadedDynamicLoader.js";
|
|
59
64
|
import { COMPOSITE_ID_SEPARATOR, DEFAULT_VARIANT_ID, getDictionarySelectorCacheKey, isQualifiedDictionaryGroup, parseDictionarySelector, reconstructQualifiedEntry, resolveDictionaryArgument, resolveEffectiveVariantId, resolveProviderVariant, resolveQualifiedDictionary, serializeVariant, serializeVariantChain } from "./dictionaryManipulator/qualifiedDictionary.js";
|
|
60
65
|
import { QUALIFIER_ORDER, getDictionaryCompositeIds, getDictionaryQualifierIds, getDictionaryQualifierTypes, getVariantIds } from "./dictionaryManipulator/qualifiedDictionaryDeclaration.js";
|
|
61
|
-
import { DynamicDictionaryLoader, QUALIFIER_DYNAMIC_TYPES_KEY, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, isQualifiedDynamicLoaderMap, resolveQualifiedDynamicContent, resolveQualifiedDynamicContentAsync } from "./dictionaryManipulator/qualifiedDynamicLoader.js";
|
|
62
66
|
import { removeContentNodeByKeyPath } from "./dictionaryManipulator/removeContentNodeByKeyPath.js";
|
|
63
67
|
import { renameContentNodeByKeyPath } from "./dictionaryManipulator/renameContentNodeByKeyPath.js";
|
|
64
68
|
import { updateNodeChildren } from "./dictionaryManipulator/updateNodeChildren.js";
|
|
@@ -117,4 +121,4 @@ import { CookieBuildAttributes, LocaleStorage, LocaleStorageClient, LocaleStorag
|
|
|
117
121
|
import { YamlRecord, YamlValue, parseYaml } from "./utils/parseYaml.js";
|
|
118
122
|
import { stringifyYaml } from "./utils/stringifyYaml.js";
|
|
119
123
|
import "./utils/index.js";
|
|
120
|
-
export { ATTRIBUTES_TO_SANITIZE, ATTRIBUTE_TO_NODE_PROP_MAP, ATTR_EXTRACTOR_R, BLOCKQUOTE_ALERT_R, BLOCKQUOTE_R, BLOCKQUOTE_TRIM_LEFT_MULTILINE_R, BLOCK_END_R, BREAK_LINE_R, BREAK_THEMATIC_R, type BlockQuoteNode, type BoldTextNode, type BreakLineNode, type BreakThematicNode, CAPTURE_LETTER_AFTER_HYPHEN, CODE_BLOCK_FENCED_R, CODE_BLOCK_R, CODE_INLINE_R, COMPOSITE_ID_SEPARATOR, CONSECUTIVE_NEWLINE_R, CR_NEWLINE_R, CUSTOM_COMPONENT_R, CachedIntl, CachedIntl as Intl, type CodeBlockNode, type CodeFencedNode, type CodeInlineNode, type CompileOptions, type ComponentOverrides, ConditionCond, ConditionContent, ConditionContentStates, CookieBuildAttributes, type CustomComponentNode, DEFAULT_VARIANT_ID, DO_NOT_PROCESS_HTML_ELEMENTS, DURATION_DELAY_TRIGGER, DateTimePreset, DeepTransformContent, DotPath, DynamicDictionaryLoader, type ElementType, EnterFormat, EnumerationCond, EnumerationContent, EnumerationContentState, type EscapedTextNode, FENCE_DELIMITER_R, FOOTNOTE_R, FOOTNOTE_REFERENCE_R, FORMFEED_R, FRONT_MATTER_R, FileCond, type FileContent, type FileContentConstructor, type FootnoteNode, type FootnoteReferenceNode, type GFMTaskNode, GFM_TASK_R, Gender, GenderCond, GenderContent, GenderContentStates, type GenerateSitemapOptions, GetNestingResult, type GetPrefixOptions, type GetPrefixResult, HEADING_ATX_COMPLIANT_R, HEADING_R, HEADING_SETEXT_R, type HTMLCommentNode, HTMLContent, HTMLContentConstructor, type HTMLNode, type HTMLSelfClosingNode, type HTMLTag, HTMLTagsType, HTMLValidationIssue, HTMLValidationResult, HTML_BLOCK_ELEMENT_R, HTML_CHAR_CODE_R, HTML_COMMENT_R, HTML_CUSTOM_ATTR_R, HTML_LEFT_TRIM_AMOUNT_R, HTML_SELF_CLOSING_ELEMENT_R, HTML_TAGS, type HeadingNode, type HeadingSetextNode, IInterpreterPlugin, IInterpreterPluginState, INLINE_SKIP_R, INTERPOLATION_R, type ImageNode, InsertionCond, InsertionContent, InsertionContentConstructor, InterpolableNode, IntlConstructorName, IsAny, type ItalicTextNode, JsonValue, LINK_AUTOLINK_BARE_URL_R, LINK_AUTOLINK_R, LIST_LOOKBEHIND_R, LOOKAHEAD, type LinkAngleBraceNode, type LinkBareURLNode, type LinkNode, ListType, type LocaleDomainMap, LocaleStorage, LocaleStorageClient, LocaleStorageClientOptions, LocaleStorageOptions, LocaleStorageServer, LocaleStorageServerOptions, type LocalizedPathResult, MarkdownContent, MarkdownContentConstructor, type MarkdownContext, type MarkdownOptions, MarkdownReferences, type MarkdownRuntime, type HTMLValidationIssue as MarkdownValidationIssue, MarkdownValidationResult, type MarkedTextNode, MessageFormatDialect, MessageValues, NAMED_CODES_TO_UNICODE, NP_TABLE_R, NestedCond, NestedContent, NestedContentState, NestedFieldReferences, type NestedParser, type NewlineNode, NodeProps, ORDERED, ORDERED_LIST_BULLET, ORDERED_LIST_ITEM_PREFIX, ORDERED_LIST_ITEM_PREFIX_R, ORDERED_LIST_ITEM_R, ORDERED_LIST_R, type OrderedListNode, PARAGRAPH_R, PRELOADED_DYNAMIC_KEY, type ParagraphNode, type ParseState, ParsedMarkdown, type Parser, type ParserResult, Plugins, PluralCategory, PluralCond, PluralContent, PluralContentState, PortableObject, PreloadableDynamicLoaderMap, PreloadedDynamicEntry, Priority, PriorityValue, type ProxyMode, QUALIFIER_DYNAMIC_TYPES_KEY, QUALIFIER_ORDER, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, REFERENCE_IMAGE_OR_LINK, REFERENCE_IMAGE_R, REFERENCE_LINK_R, type ReferenceImageNode, type ReferenceLinkNode, type ReferenceNode, type RenderRuleHook, type Rule, type RuleOutput, RuleType, RuleTypeValue, type Rules, SHORTCODE_R, SHOULD_RENDER_AS_BLOCK_R, SelectCond, SelectContent, SelectContentStates, SelectSelector, type SitemapUrlEntry, type StrikethroughTextNode, TABLE_CENTER_ALIGN, TABLE_LEFT_ALIGN, TABLE_RIGHT_ALIGN, TABLE_TRIM_PIPES, TAB_R, TEXT_BOLD_R, TEXT_EMPHASIZED_R, TEXT_ESCAPED_R, TEXT_MARKED_R, TEXT_PLAIN_R, TEXT_STRIKETHROUGHED_R, TRIM_STARTING_NEWLINES, type TableNode, type TableSeparatorNode, TaggedMessageToken, type TextNode, TranslationCond, TranslationContent, UNESCAPE_R, UNORDERED, UNORDERED_LIST_BULLET, UNORDERED_LIST_ITEM_PREFIX, UNORDERED_LIST_ITEM_PREFIX_R, UNORDERED_LIST_ITEM_R, UNORDERED_LIST_R, UnionKeys, type UnorderedListNode, VOID_HTML_ELEMENTS, ValidDotPathsFor, ValueAtKey, WrappedIntl, YamlRecord, YamlValue, allowInline, anyScopeRegex, attributeValueToNodePropValue, bindIntl, blockRegex, buildMaskPlugin, captureNothing, checkIsURLAbsolute, checkMissingLocalesPlugin, compact, comparePaths, compile, compileWithOptions, condition as cond, conditionPlugin, createCompiler, createRenderer, currency, cx, date, deepTransformNode, editDictionaryByKeyPath, enumeration as enu, enumerationPlugin, fallbackPlugin, type file, type fileContent, filePlugin, filterMissingTranslationsOnlyPlugin, filterTranslationsOnlyPlugin, findMatchingCondition, formatProxyEnabledMessage, gender, genderPlugin, generateListItemPrefix, generateListItemPrefixRegex, generateListItemRegex, generateListRegex, generateSitemap, generateSitemapUrl, get, getBasePlugins, getBrowserLocale, getCachedIntl, getCanonicalPath, getCondition, getContent, getContentNodeByKeyPath, getCookie, getDefaultNode, getDictionary, getDictionaryCompositeIds, getDictionaryQualifierIds, getDictionaryQualifierTypes, getDictionarySelectorCacheKey, getDomainHostname, getDomainOrigin, getEditedContent, getEditedDictionary, getEmptyNode, getEnumeration, getFilterMissingTranslationsContent, getFilterMissingTranslationsDictionary, getFilterTranslationsOnlyContent, getFilterTranslationsOnlyDictionary, getFilteredLocalesContent, getFilteredLocalesDictionary, getGender, getHTML, getHTMLTextDir, getInsertion, getInsertionValues, getInternalPath, getInterpolableContent, getIntlayer, getLocale, getLocaleFromDomain, getLocaleFromPath, getLocaleFromStorage, getLocaleFromStorageClient, getLocaleFromStorageServer, getLocaleLang, getLocaleName, getLocalizedContent, getLocalizedPath, getLocalizedUrl, getMarkdownMetadata, getMaskContent, getMissingLocalesContent, getMissingLocalesContentFromDictionary, getMultilingualDictionary, getMultilingualUrls, getNestedDictionaryGraph, getNestedDictionaryKeys, getNestedDictionaryReferences, getNesting, getNodeChildren, getNodeType, getPathWithoutLocale, getPerLocaleDictionary, getPlural, getPrefix, getPreloadLocale, getPreloadedDictionary, getReplacedValuesContent, getRewritePath, getRewriteRules, getSelect, getSplittedContent, getSplittedDictionaryContent, getTranslation, getVariantIds, html, i18nextToIntlayerFormatter, icuToIntlayerFormatter, inlineRegex, insertion as insert, insertContentInDictionary, insertionPlugin, interpolateMessage, intlayerToI18nextFormatter, intlayerToICUFormatter, intlayerToPortableObjectFormatter, intlayerToVueI18nFormatter, isDeclaredLocale, isInterpolableWrapperNode, isLocaleExclusiveOnDomain, isProxyStorageLocaleEnabled, isQualifiedDictionaryGroup, isQualifiedDynamicLoaderMap, isSameKeyPath, isValidElement, list, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, localeStorageOptions, markdown as md, mergeDictionaries, mergeQualifiedDictionaries, navigatePath, nesting as nest, nestedPlugin, normalizeAttributeKey, normalizeDictionaries, normalizeDictionary, normalizePath, normalizeWhitespace, number, orderDictionaries, parseBlock, parseCaptureInline, parseDictionarySelector, parseInline, parseMarkdown, parseSimpleInline, parseStyleAttribute, parseTableAlign, parseTableAlignCapture, parseTableCells, parseTableRow, parseTaggedMessage, parseYaml, parserFor, percentage, plural, pluralPlugin, portableObjectToIntlayerFormatter, presets, qualifies, rebuildInterpolableContent, reconstructQualifiedEntry, relativeTime, removeContentNodeByKeyPath, renameContentNodeByKeyPath, renderFor, renderMarkdownAst, renderNothing, resolveBrowserLocale, resolveDictionaryArgument, resolveEffectiveVariantId, resolveLocalizedPath, resolveMessage, resolveMessageNode, resolveProviderVariant, resolveProxyMode, resolveQualifiedDictionary, resolveQualifiedDynamicContent, resolveQualifiedDynamicContentAsync, sanitizer, select, selectPlugin, serializeVariant, serializeVariantChain, setLocaleInStorage, setLocaleInStorageClient, setLocaleInStorageServer, simpleInlineRegex, slugify, some, splitInsertionTemplate, startsWith, stringifyYaml, translation as t, transformInterpolableNode, translationPlugin, trimEnd, trimLeadingWhitespaceOutsideFences, unescapeString, units, unquote, updateNodeChildren, validateHTML, validateMarkdown, validatePrefix, vueI18nToIntlayerFormatter };
|
|
124
|
+
export { ATTRIBUTES_TO_SANITIZE, ATTRIBUTE_TO_NODE_PROP_MAP, ATTR_EXTRACTOR_R, BLOCKQUOTE_ALERT_R, BLOCKQUOTE_R, BLOCKQUOTE_TRIM_LEFT_MULTILINE_R, BLOCK_END_R, BREAK_LINE_R, BREAK_THEMATIC_R, type BlockQuoteNode, type BoldTextNode, type BreakLineNode, type BreakThematicNode, CAPTURE_LETTER_AFTER_HYPHEN, CODE_BLOCK_FENCED_R, CODE_BLOCK_R, CODE_INLINE_R, COMPOSITE_ID_SEPARATOR, CONSECUTIVE_NEWLINE_R, CR_NEWLINE_R, CUSTOM_COMPONENT_R, CachedIntl, CachedIntl as Intl, type CodeBlockNode, type CodeFencedNode, type CodeInlineNode, type CompileOptions, type ComponentOverrides, ConditionCond, ConditionContent, ConditionContentStates, CookieBuildAttributes, type CustomComponentNode, DEFAULT_VARIANT_ID, DO_NOT_PROCESS_HTML_ELEMENTS, DURATION_DELAY_TRIGGER, DateTimePreset, DeepTransformContent, DotPath, DynamicDictionaryLoader, type ElementType, EnterFormat, EnumerationCond, EnumerationContent, EnumerationContentState, type EscapedTextNode, FENCE_DELIMITER_R, FOOTNOTE_R, FOOTNOTE_REFERENCE_R, FORMFEED_R, FRONT_MATTER_R, FileCond, type FileContent, type FileContentConstructor, type FootnoteNode, type FootnoteReferenceNode, type GFMTaskNode, GFM_TASK_R, Gender, GenderCond, GenderContent, GenderContentStates, type GenerateSitemapOptions, GetNestingResult, type GetPrefixOptions, type GetPrefixResult, HEADING_ATX_COMPLIANT_R, HEADING_R, HEADING_SETEXT_R, type HTMLCommentNode, HTMLContent, HTMLContentConstructor, type HTMLNode, type HTMLSelfClosingNode, type HTMLTag, HTMLTagsType, HTMLValidationIssue, HTMLValidationResult, HTML_BLOCK_ELEMENT_R, HTML_CHAR_CODE_R, HTML_COMMENT_R, HTML_CUSTOM_ATTR_R, HTML_LEFT_TRIM_AMOUNT_R, HTML_SELF_CLOSING_ELEMENT_R, HTML_TAGS, type HeadingNode, type HeadingSetextNode, IInterpreterPlugin, IInterpreterPluginState, INLINE_SKIP_R, INTERPOLATION_R, type ImageNode, InsertionCond, InsertionContent, InsertionContentConstructor, InterpolableNode, IntlConstructorName, IsAny, type ItalicTextNode, JsonValue, LINK_AUTOLINK_BARE_URL_R, LINK_AUTOLINK_R, LIST_LOOKBEHIND_R, LOOKAHEAD, type LinkAngleBraceNode, type LinkBareURLNode, type LinkNode, ListType, type LocaleDomainMap, LocaleStorage, LocaleStorageClient, LocaleStorageClientOptions, LocaleStorageOptions, LocaleStorageServer, LocaleStorageServerOptions, type LocalizedPathResult, MarkdownContent, MarkdownContentConstructor, type MarkdownContext, type MarkdownOptions, MarkdownReferences, type MarkdownRuntime, type HTMLValidationIssue as MarkdownValidationIssue, MarkdownValidationResult, type MarkedTextNode, MessageFormatDialect, MessageValues, NAMED_CODES_TO_UNICODE, NP_TABLE_R, NestedCond, NestedContent, NestedContentState, NestedFieldReferences, type NestedParser, type NewlineNode, NodeProps, ORDERED, ORDERED_LIST_BULLET, ORDERED_LIST_ITEM_PREFIX, ORDERED_LIST_ITEM_PREFIX_R, ORDERED_LIST_ITEM_R, ORDERED_LIST_R, type OrderedListNode, PARAGRAPH_R, PRELOADED_DYNAMIC_KEY, type ParagraphNode, type ParseState, ParsedMarkdown, type Parser, type ParserResult, PlainDynamicLoaderMap, Plugins, PluralCategory, PluralCond, PluralContent, PluralContentState, PortableObject, PreloadableDynamicLoaderMap, PreloadedDynamicEntry, Priority, PriorityValue, type ProxyMode, QUALIFIER_DYNAMIC_TYPES_KEY, QUALIFIER_ORDER, QualifiedDynamicLoaderMap, QualifiedDynamicLoaderTree, REFERENCE_IMAGE_OR_LINK, REFERENCE_IMAGE_R, REFERENCE_LINK_R, type ReferenceImageNode, type ReferenceLinkNode, type ReferenceNode, type RenderRuleHook, ResolvedDynamicLoader, type Rule, type RuleOutput, RuleType, RuleTypeValue, type Rules, SHORTCODE_R, SHOULD_RENDER_AS_BLOCK_R, SelectCond, SelectContent, SelectContentStates, SelectSelector, type SitemapUrlEntry, type StrikethroughTextNode, TABLE_CENTER_ALIGN, TABLE_LEFT_ALIGN, TABLE_RIGHT_ALIGN, TABLE_TRIM_PIPES, TAB_R, TEXT_BOLD_R, TEXT_EMPHASIZED_R, TEXT_ESCAPED_R, TEXT_MARKED_R, TEXT_PLAIN_R, TEXT_STRIKETHROUGHED_R, TRIM_STARTING_NEWLINES, type TableNode, type TableSeparatorNode, TaggedMessageToken, type TextNode, TranslationCond, TranslationContent, UNESCAPE_R, UNORDERED, UNORDERED_LIST_BULLET, UNORDERED_LIST_ITEM_PREFIX, UNORDERED_LIST_ITEM_PREFIX_R, UNORDERED_LIST_ITEM_R, UNORDERED_LIST_R, UnionKeys, type UnorderedListNode, VOID_HTML_ELEMENTS, ValidDotPathsFor, ValueAtKey, WrappedIntl, YamlRecord, YamlValue, allowInline, anyScopeRegex, attributeValueToNodePropValue, bindIntl, blockRegex, buildMaskPlugin, captureNothing, checkIsURLAbsolute, checkMissingLocalesPlugin, compact, comparePaths, compile, compileWithOptions, condition as cond, conditionPlugin, createCompiler, createRenderer, currency, cx, date, deepTransformNode, editDictionaryByKeyPath, enumeration as enu, enumerationPlugin, fallbackPlugin, type file, type fileContent, filePlugin, filterMissingTranslationsOnlyPlugin, filterTranslationsOnlyPlugin, findMatchingCondition, findPlainDynamicLoader, formatProxyEnabledMessage, gender, genderPlugin, generateListItemPrefix, generateListItemPrefixRegex, generateListItemRegex, generateListRegex, generateSitemap, generateSitemapUrl, get, getBasePlugins, getBrowserLocale, getCachedIntl, getCanonicalPath, getCondition, getContent, getContentNodeByKeyPath, getCookie, getDefaultNode, getDictionary, getDictionaryAsync, getDictionaryCompositeIds, getDictionaryQualifierIds, getDictionaryQualifierTypes, getDictionarySelectorCacheKey, getDictionaryTransformCacheKey, getDomainHostname, getDomainOrigin, getEditedContent, getEditedDictionary, getEmptyNode, getEnumeration, getFilterMissingTranslationsContent, getFilterMissingTranslationsDictionary, getFilterTranslationsOnlyContent, getFilterTranslationsOnlyDictionary, getFilteredLocalesContent, getFilteredLocalesDictionary, getGender, getHTML, getHTMLTextDir, getInsertion, getInsertionValues, getInternalPath, getInterpolableContent, getIntlayer, getIntlayerAsync, getLocale, getLocaleFromDomain, getLocaleFromPath, getLocaleFromStorage, getLocaleFromStorageClient, getLocaleFromStorageServer, getLocaleLang, getLocaleName, getLocalizedContent, getLocalizedPath, getLocalizedUrl, getMarkdownMetadata, getMaskContent, getMissingLocalesContent, getMissingLocalesContentFromDictionary, getMultilingualDictionary, getMultilingualUrls, getNestedDictionaryGraph, getNestedDictionaryKeys, getNestedDictionaryReferences, getNesting, getNodeChildren, getNodeType, getPathWithoutLocale, getPerLocaleDictionary, getPluginsCacheKey, getPlural, getPrefix, getPreloadLocale, getPreloadedDictionary, getReplacedValuesContent, getRewritePath, getRewriteRules, getSelect, getSplittedContent, getSplittedDictionaryContent, getTranslation, getVariantIds, html, i18nextToIntlayerFormatter, icuToIntlayerFormatter, inlineRegex, insertion as insert, insertContentInDictionary, insertionPlugin, interpolateMessage, intlayerToI18nextFormatter, intlayerToICUFormatter, intlayerToPortableObjectFormatter, intlayerToVueI18nFormatter, isDeclaredLocale, isInterpolableWrapperNode, isLocaleExclusiveOnDomain, isProxyStorageLocaleEnabled, isQualifiedDictionaryGroup, isQualifiedDynamicLoaderMap, isSameKeyPath, isValidElement, list, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, localeStorageOptions, markdown as md, mergeDictionaries, mergeQualifiedDictionaries, navigatePath, nesting as nest, nestedPlugin, normalizeAttributeKey, normalizeDictionaries, normalizeDictionary, normalizePath, normalizeWhitespace, number, orderDictionaries, parseBlock, parseCaptureInline, parseDictionarySelector, parseInline, parseMarkdown, parseSimpleInline, parseStyleAttribute, parseTableAlign, parseTableAlignCapture, parseTableCells, parseTableRow, parseTaggedMessage, parseYaml, parserFor, percentage, plural, pluralPlugin, portableObjectToIntlayerFormatter, presets, qualifies, readTransformCache, rebuildInterpolableContent, reconstructQualifiedEntry, relativeTime, removeContentNodeByKeyPath, renameContentNodeByKeyPath, renderFor, renderMarkdownAst, renderNothing, resolveBrowserLocale, resolveDictionaryArgument, resolveEffectiveVariantId, resolveLocalizedPath, resolveMessage, resolveMessageNode, resolvePlainDynamicLoader, resolveProviderVariant, resolveProxyMode, resolveQualifiedDictionary, resolveQualifiedDynamicContent, resolveQualifiedDynamicContentAsync, sanitizer, select, selectPlugin, serializeVariant, serializeVariantChain, setLocaleInStorage, setLocaleInStorageClient, setLocaleInStorageServer, simpleInlineRegex, slugify, some, splitInsertionTemplate, startsWith, stringifyYaml, translation as t, transformInterpolableNode, translationPlugin, trimEnd, trimLeadingWhitespaceOutsideFences, unescapeString, units, unquote, updateNodeChildren, validateHTML, validateMarkdown, validatePrefix, vueI18nToIntlayerFormatter, writeTransformCache };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Plugins } from "./getContent/plugins.js";
|
|
2
|
+
import "./getContent/index.js";
|
|
3
|
+
import { Dictionary } from "@intlayer/types/dictionary";
|
|
4
|
+
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
5
|
+
//#region src/interpreter/dictionaryTransformCache.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Returns the cache-key fragment identifying a plugin array.
|
|
8
|
+
*
|
|
9
|
+
* @param plugins - The plugin array a transform runs with, or `undefined` when
|
|
10
|
+
* the interpreter's base plugins are used.
|
|
11
|
+
*/
|
|
12
|
+
declare const getPluginsCacheKey: (plugins?: Plugins[]) => string;
|
|
13
|
+
/**
|
|
14
|
+
* Builds the cache key for one transformed entry.
|
|
15
|
+
*
|
|
16
|
+
* @param locale - The resolved locale, already defaulted by the caller.
|
|
17
|
+
* @param selectorCacheKey - Serialized selector, empty for a plain dictionary.
|
|
18
|
+
* @param plugins - The plugin array the transform runs with.
|
|
19
|
+
*/
|
|
20
|
+
declare const getDictionaryTransformCacheKey: (locale: LocalesValues, selectorCacheKey: string, plugins?: Plugins[]) => string;
|
|
21
|
+
/**
|
|
22
|
+
* Looks up the transformed content cached for `dictionary` under `cacheKey`.
|
|
23
|
+
*
|
|
24
|
+
* The hit is reported through a discriminated result rather than through the
|
|
25
|
+
* value: `null` is a legitimate cached content — an unresolvable qualified
|
|
26
|
+
* coordinate — so a miss can never be inferred from the value alone.
|
|
27
|
+
*/
|
|
28
|
+
declare const readTransformCache: <Content>(dictionary: Dictionary | object, cacheKey: string) => {
|
|
29
|
+
hit: true;
|
|
30
|
+
content: Content;
|
|
31
|
+
} | {
|
|
32
|
+
hit: false;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Stores transformed content for `dictionary` under `cacheKey`.
|
|
36
|
+
*
|
|
37
|
+
* @returns The stored content, so callers can `return writeTransformCache(...)`.
|
|
38
|
+
*/
|
|
39
|
+
declare const writeTransformCache: <Content>(dictionary: Dictionary | object, cacheKey: string, content: Content) => Content;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { getDictionaryTransformCacheKey, getPluginsCacheKey, readTransformCache, writeTransformCache };
|
|
42
|
+
//# sourceMappingURL=dictionaryTransformCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictionaryTransformCache.d.ts","names":[],"sources":["../../../src/interpreter/dictionaryTransformCache.ts"],"mappings":";;;;;;;;;;;cA2Ba,qBAAkB,UAAc;;;;;;;;cAwDhC,iCAA8B,QACjC,eAAa,0BACG,UACd;;;;;;;;cAUC,qBAAsB,SAAO,YAC5B,qBAAmB;EAE5B;EAAW,SAAS;;EAAc;;;;;;;cAe1B,sBAAuB,SAAO,YAC7B,qBAAmB,kBACf,SACP,YACR"}
|
|
@@ -2,10 +2,10 @@ import { Gender } from "../../transpiler/gender/gender.js";
|
|
|
2
2
|
import "../../transpiler/index.js";
|
|
3
3
|
import { GetNestingResult } from "../getNesting.js";
|
|
4
4
|
import { DeclaredLocales, DictionaryKeys, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
5
|
-
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
6
|
-
import { NodeType } from "@intlayer/types/nodeType";
|
|
7
5
|
import { Locale } from "@intlayer/types/allLocales";
|
|
8
6
|
import { KeyPath } from "@intlayer/types/keyPath";
|
|
7
|
+
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
8
|
+
import { NodeType } from "@intlayer/types/nodeType";
|
|
9
9
|
//#region src/interpreter/getContent/plugins.d.ts
|
|
10
10
|
/** ---------------------------------------------
|
|
11
11
|
* PLUGIN DEFINITION
|
|
@@ -6,11 +6,6 @@ import { DeclaredLocales, ExtractSelectorLocale, LocalesValues } from "@intlayer
|
|
|
6
6
|
/**
|
|
7
7
|
* Transforms a dictionary in a single pass, applying each plugin as needed.
|
|
8
8
|
*
|
|
9
|
-
* Also accepts a `QualifiedDictionaryGroup` (collections, variants) together
|
|
10
|
-
* with a selector as second argument — the group is resolved to a single entry
|
|
11
|
-
* (or an ordered array of entries for collections without an `item` selector)
|
|
12
|
-
* before transformation.
|
|
13
|
-
*
|
|
14
9
|
* @param dictionary The dictionary (or qualified dictionary group) to transform.
|
|
15
10
|
* @param localeOrSelector The locale, or a selector object (`{ item }`,
|
|
16
11
|
* `{ variant }`, optionally with `locale`).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDictionary.d.ts","names":[],"sources":["../../../src/interpreter/getDictionary.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getDictionary.d.ts","names":[],"sources":["../../../src/interpreter/getDictionary.ts"],"mappings":";;;;;;;;;;;;;;cAuCa,sBACL,UAAU,aAAa,gCACvB,UAAU,gBAAgB,qBAAqB,iBAAe,YAExD,GAAC,mBACM,GAAC,UACV,cACT,qBACD,kCAAkC,GAAG,IACrC,yBACA,sBAAsB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { DeepTransformContent, IInterpreterPluginState, Plugins } from "./getContent/plugins.js";
|
|
2
|
+
import "./getContent/index.js";
|
|
3
|
+
import { PlainDynamicLoaderMap } from "../dictionaryManipulator/plainDynamicLoader.js";
|
|
4
|
+
import { QualifiedDynamicLoaderMap } from "../dictionaryManipulator/qualifiedDynamicLoader.js";
|
|
5
|
+
import { Dictionary, DictionarySelector } from "@intlayer/types/dictionary";
|
|
6
|
+
import { DeclaredLocales, ExtractSelectorLocale, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
7
|
+
//#region src/interpreter/getDictionaryAsync.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Loads a single locale chunk of a dictionary and returns its transformed
|
|
10
|
+
* content.
|
|
11
|
+
*
|
|
12
|
+
* Counterpart of {@link getDictionary} for the per-locale loader maps emitted
|
|
13
|
+
* in `.intlayer/dynamic_dictionaries/`: instead of receiving a dictionary
|
|
14
|
+
* holding every locale, it receives the loader map and awaits only the chunk
|
|
15
|
+
* the requested locale needs.
|
|
16
|
+
*
|
|
17
|
+
* The loader map is either plain (`locale → loader`) or qualified
|
|
18
|
+
* (`locale → qualifierId → loader`, for collections and variants). For a
|
|
19
|
+
* qualified map, only the chunk(s) the selector targets are loaded.
|
|
20
|
+
*
|
|
21
|
+
* Build plugins rewrite every `getIntlayerAsync('key', locale)` call into a
|
|
22
|
+
* `getDictionaryAsync(loaderMap, 'key', locale)` one, so applications call
|
|
23
|
+
* {@link getIntlayerAsync} and never this function directly.
|
|
24
|
+
*
|
|
25
|
+
* @param dictionaryLoaders - Plain or qualified per-locale loader map.
|
|
26
|
+
* @param key - Dictionary key, used to namespace the chunk cache.
|
|
27
|
+
* @param localeOrSelector - The locale, or a selector object (`{ item }`,
|
|
28
|
+
* `{ variant }`, optionally with `locale`).
|
|
29
|
+
* @param plugins - Node transformers. Defaults to the base interpreter set.
|
|
30
|
+
*/
|
|
31
|
+
declare const getDictionaryAsync: <const T extends Dictionary, const A extends LocalesValues | DictionarySelector = DeclaredLocales>(dictionaryLoaders: PlainDynamicLoaderMap<T> | QualifiedDynamicLoaderMap, key: string, localeOrSelector?: A, plugins?: Plugins[]) => Promise<DeepTransformContent<T['content'], IInterpreterPluginState, ExtractSelectorLocale<A>>>;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { getDictionaryAsync };
|
|
34
|
+
//# sourceMappingURL=getDictionaryAsync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDictionaryAsync.d.ts","names":[],"sources":["../../../src/interpreter/getDictionaryAsync.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiFa,2BACL,UAAU,kBACV,UAAU,gBAAgB,qBAAqB,iBAAe,mBAEjD,sBAAsB,KAAK,2BAAyB,aAC5D,mBACQ,GAAC,UACV,cACT,QACD,qBACE,cACA,yBACA,sBAAsB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getIntlayer.d.ts","names":[],"sources":["../../../src/interpreter/getIntlayer.ts"],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"getIntlayer.d.ts","names":[],"sources":["../../../src/interpreter/getIntlayer.ts"],"mappings":";;;;;;;;;;;;;;;cAsFa,oBACL,UAAU,sBACV,UAAU,gBAAgB,qBAAqB,iBAAe,KAE/D,GAAC,mBACa,GAAC,UACV,cACT,qBACD,yBAAyB,GAAG,IAC5B,yBACA,sBAAsB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { DeepTransformContent, IInterpreterPluginState, Plugins } from "./getContent/plugins.js";
|
|
2
|
+
import "./getContent/index.js";
|
|
3
|
+
import { DictionarySelector } from "@intlayer/types/dictionary";
|
|
4
|
+
import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, ExtractSelectorLocale, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
5
|
+
//#region src/interpreter/getIntlayerAsync.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Picks one dictionary by its key and resolves its content for the given
|
|
8
|
+
* locale or selector, loading that locale alone.
|
|
9
|
+
*
|
|
10
|
+
* Async counterpart of {@link getIntlayer}, meant for the places a dictionary
|
|
11
|
+
* is read outside of rendering — route `head` / metadata builders, loaders,
|
|
12
|
+
* server functions. Where `getIntlayer` pulls in the merged dictionary holding
|
|
13
|
+
* every locale, the build plugins (`@intlayer/babel`, `@intlayer/swc`) rewrite
|
|
14
|
+
* this call into `getDictionaryAsync(loaderMap, key, locale)`, pointing it at
|
|
15
|
+
* the per-locale chunks in `.intlayer/dynamic_dictionaries/`, so the bundle
|
|
16
|
+
* only ever carries the locale actually requested.
|
|
17
|
+
*
|
|
18
|
+
* Without those plugins — an unoptimized build — the call resolves through the
|
|
19
|
+
* synchronous dictionary registry instead: the same content, without the
|
|
20
|
+
* per-locale split.
|
|
21
|
+
*
|
|
22
|
+
* The second argument is either a locale (`'fr'`) or a selector object:
|
|
23
|
+
* - `{ item: 2 }` — collection item (omit `item` to get every item as array)
|
|
24
|
+
* - `{ variant: 'black-friday' }` — named variant (omit for the `default` one)
|
|
25
|
+
* - `{ variant: { id: 'prod_abc', userId: '123' } }` — structured variant
|
|
26
|
+
* - `locale` can be combined with any selector: `{ item: 2, locale: 'fr' }`
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const { title } = await getIntlayerAsync('home-metadata', locale);
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
declare const getIntlayerAsync: <const T extends DictionaryKeys, const A extends LocalesValues | DictionarySelector = DeclaredLocales>(key: T, localeOrSelector?: A, plugins?: Plugins[]) => Promise<DeepTransformContent<DictionaryRegistryResult<T, A>, IInterpreterPluginState, ExtractSelectorLocale<A>>>;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { getIntlayerAsync };
|
|
36
|
+
//# sourceMappingURL=getIntlayerAsync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getIntlayerAsync.d.ts","names":[],"sources":["../../../src/interpreter/getIntlayerAsync.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0Ca,yBACL,UAAU,sBACV,UAAU,gBAAgB,qBAAqB,iBAAe,KAE/D,GAAC,mBACa,GAAC,UACV,cACT,QACD,qBACE,yBAAyB,GAAG,IAC5B,yBACA,sBAAsB"}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { getCondition } from "./getCondition.js";
|
|
2
1
|
import { GetNestingResult, getNesting } from "./getNesting.js";
|
|
3
2
|
import { ConditionCond, DeepTransformContent, EnumerationCond, FileCond, GenderCond, IInterpreterPlugin, IInterpreterPluginState, InsertionCond, IsAny, NestedCond, NodeProps, Plugins, PluralCond, SelectCond, SelectSelector, TranslationCond, UnionKeys, ValueAtKey, conditionPlugin, enumerationPlugin, fallbackPlugin, filePlugin, genderPlugin, insertionPlugin, nestedPlugin, pluralPlugin, selectPlugin, translationPlugin } from "./getContent/plugins.js";
|
|
4
3
|
import { deepTransformNode } from "./getContent/deepTransform.js";
|
|
5
4
|
import { getBasePlugins, getContent } from "./getContent/getContent.js";
|
|
6
5
|
import "./getContent/index.js";
|
|
6
|
+
import { getDictionaryTransformCacheKey, getPluginsCacheKey, readTransformCache, writeTransformCache } from "./dictionaryTransformCache.js";
|
|
7
|
+
import { getCondition } from "./getCondition.js";
|
|
7
8
|
import { getDictionary } from "./getDictionary.js";
|
|
9
|
+
import { getDictionaryAsync } from "./getDictionaryAsync.js";
|
|
8
10
|
import { findMatchingCondition, getEnumeration } from "./getEnumeration.js";
|
|
9
11
|
import { getGender } from "./getGender.js";
|
|
10
12
|
import { getHTML } from "./getHTML.js";
|
|
11
13
|
import { getInsertion } from "./getInsertion.js";
|
|
12
14
|
import { getIntlayer } from "./getIntlayer.js";
|
|
15
|
+
import { getIntlayerAsync } from "./getIntlayerAsync.js";
|
|
13
16
|
import { getPlural } from "./getPlural.js";
|
|
14
17
|
import { getSelect } from "./getSelect.js";
|
|
15
18
|
import { getTranslation } from "./getTranslation.js";
|
|
16
19
|
import { InterpolableNode, getInterpolableContent, isInterpolableWrapperNode, rebuildInterpolableContent, transformInterpolableNode } from "./interpolableNode.js";
|
|
17
20
|
import { splitInsertionTemplate } from "./splitAndJoinInsertion.js";
|
|
18
|
-
export { ConditionCond, DeepTransformContent, EnumerationCond, FileCond, GenderCond, GetNestingResult, IInterpreterPlugin, IInterpreterPluginState, InsertionCond, InterpolableNode, IsAny, NestedCond, NodeProps, Plugins, PluralCond, SelectCond, SelectSelector, TranslationCond, UnionKeys, ValueAtKey, conditionPlugin, deepTransformNode, enumerationPlugin, fallbackPlugin, filePlugin, findMatchingCondition, genderPlugin, getBasePlugins, getCondition, getContent, getDictionary, getEnumeration, getGender, getHTML, getInsertion, getInterpolableContent, getIntlayer, getNesting, getPlural, getSelect, getTranslation, insertionPlugin, isInterpolableWrapperNode, nestedPlugin, pluralPlugin, rebuildInterpolableContent, selectPlugin, splitInsertionTemplate, transformInterpolableNode, translationPlugin };
|
|
21
|
+
export { ConditionCond, DeepTransformContent, EnumerationCond, FileCond, GenderCond, GetNestingResult, IInterpreterPlugin, IInterpreterPluginState, InsertionCond, InterpolableNode, IsAny, NestedCond, NodeProps, Plugins, PluralCond, SelectCond, SelectSelector, TranslationCond, UnionKeys, ValueAtKey, conditionPlugin, deepTransformNode, enumerationPlugin, fallbackPlugin, filePlugin, findMatchingCondition, genderPlugin, getBasePlugins, getCondition, getContent, getDictionary, getDictionaryAsync, getDictionaryTransformCacheKey, getEnumeration, getGender, getHTML, getInsertion, getInterpolableContent, getIntlayer, getIntlayerAsync, getNesting, getPluginsCacheKey, getPlural, getSelect, getTranslation, insertionPlugin, isInterpolableWrapperNode, nestedPlugin, pluralPlugin, readTransformCache, rebuildInterpolableContent, selectPlugin, splitInsertionTemplate, transformInterpolableNode, translationPlugin, writeTransformCache };
|
|
@@ -15,23 +15,48 @@ type GenerateSitemapOptions = {
|
|
|
15
15
|
/**
|
|
16
16
|
* Whether to include xhtml:link alternate tags for multilingual support.
|
|
17
17
|
*
|
|
18
|
-
* When enabled, alternate links are only generated for
|
|
19
|
-
* differ per locale:
|
|
18
|
+
* When enabled, alternate links are only generated for routing setups where
|
|
19
|
+
* URLs differ per locale:
|
|
20
20
|
* - 'prefix-no-default': included
|
|
21
21
|
* - 'prefix-all': included
|
|
22
22
|
* - 'search-params': included
|
|
23
|
-
* - 'no-prefix': excluded
|
|
23
|
+
* - 'no-prefix': excluded, unless `domains` gives locales distinct hostnames
|
|
24
24
|
*
|
|
25
25
|
* @default true
|
|
26
26
|
*/
|
|
27
27
|
xhtmlLinks?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Whether to emit one `<url>` entry per locale instead of a single entry for
|
|
30
|
+
* the default locale carrying the alternates.
|
|
31
|
+
*
|
|
32
|
+
* Both forms are valid for search engines, but only a URL listed as a `<loc>`
|
|
33
|
+
* is reported as submitted: an alternate-only locale is discoverable, yet
|
|
34
|
+
* Search Console attributes it no referring sitemap. Enabling this gives
|
|
35
|
+
* every localized URL its own entry, each repeating the complete alternate
|
|
36
|
+
* set, which is the form Google documents for large multilingual sites.
|
|
37
|
+
*
|
|
38
|
+
* Multiplies the entry count by the number of locales, so keep an eye on the
|
|
39
|
+
* 50 000 URL / 50 MB per-file limits — split into a sitemap index beyond it.
|
|
40
|
+
*
|
|
41
|
+
* Only applies where alternates apply: locale URLs must be distinct (see
|
|
42
|
+
* `xhtmlLinks`) and the path must not point at a file. Locales served from
|
|
43
|
+
* their own domain are left out, as a sitemap may only submit URLs of the
|
|
44
|
+
* site it is hosted on.
|
|
45
|
+
*
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
entryPerLocale?: boolean;
|
|
28
49
|
locales?: LocalesValues[];
|
|
29
50
|
defaultLocale?: LocalesValues;
|
|
30
51
|
mode?: RoutingConfig['mode'];
|
|
31
52
|
rewrite?: RoutingConfig['rewrite'];
|
|
53
|
+
domains?: RoutingConfig['domains'];
|
|
32
54
|
};
|
|
33
55
|
/**
|
|
34
|
-
* Generates
|
|
56
|
+
* Generates the `<url>` sitemap entries for the given path.
|
|
57
|
+
*
|
|
58
|
+
* Emits a single entry for the default locale, or — with `entryPerLocale` — one
|
|
59
|
+
* entry per localized URL, each repeating the same alternate set.
|
|
35
60
|
*
|
|
36
61
|
* Example:
|
|
37
62
|
*
|
|
@@ -50,15 +75,15 @@ type GenerateSitemapOptions = {
|
|
|
50
75
|
* // <loc>https://example.com/dashboard</loc>
|
|
51
76
|
* // <changefreq>weekly</changefreq>
|
|
52
77
|
* // <priority>0.8</priority>
|
|
53
|
-
* // <xhtml:link rel="alternate"
|
|
54
|
-
* // <xhtml:link rel="alternate"
|
|
55
|
-
* // <xhtml:link rel="alternate"
|
|
78
|
+
* // <xhtml:link rel="alternate" hreflang="en" href="https://example.com/dashboard"/>
|
|
79
|
+
* // <xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/dashboard"/>
|
|
80
|
+
* // <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/dashboard"/>
|
|
56
81
|
* // </url>
|
|
57
82
|
* ```
|
|
58
83
|
*
|
|
59
|
-
* @param path - The canonical path to generate the
|
|
84
|
+
* @param path - The canonical path to generate the entries for.
|
|
60
85
|
* @param options - Configuration options.
|
|
61
|
-
* @returns
|
|
86
|
+
* @returns One or more `<url>` XML strings, joined by a newline.
|
|
62
87
|
*/
|
|
63
88
|
declare const generateSitemapUrl: (path: string, options: SitemapUrlEntry & GenerateSitemapOptions) => string;
|
|
64
89
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateSitemap.d.ts","names":[],"sources":["../../../src/localization/generateSitemap.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"generateSitemap.d.ts","names":[],"sources":["../../../src/localization/generateSitemap.ts"],"mappings":";;;KAMY;;EAEV;EACA;EACA;;EAEA;;KAGU;;EAEV;;;;;;;;;;;;;EAaA;;;;;;;;;;;;;;;;;;;;;EAqBA;EACA,UAAU;EACV,gBAAgB;EAChB,OAAO;EACP,UAAU;EACV,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsFC,qBAAkB,cACjB,SACH,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuFhB,kBAAe,SACjB,mBAAiB,SACjB"}
|
|
@@ -25,6 +25,9 @@ import { LocalesValues, LocalizedPathname, ResolvedDefaultLocale } from "@intlay
|
|
|
25
25
|
* getLocalizedPath('/contact', 'fr'); // '/fr/contact' (no rewrite rule matches)
|
|
26
26
|
* getLocalizedPath('https://intlayer.org/about', 'fr'); // '/fr/a-propos' (origin dropped)
|
|
27
27
|
*
|
|
28
|
+
* // routing: { domains: { zh: 'intlayer.cn' } } — zh is alone on that hostname
|
|
29
|
+
* getLocalizedPath('/about', 'zh'); // '/about' (the domain identifies the locale)
|
|
30
|
+
*
|
|
28
31
|
* // Manual rules, bypassing the configuration
|
|
29
32
|
* getLocalizedPath('/contact', 'fr', {
|
|
30
33
|
* rewrite: { '/contact': { fr: '/contactez-nous' } },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLocalizedPath.d.ts","names":[],"sources":["../../../src/localization/getLocalizedPath.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getLocalizedPath.d.ts","names":[],"sources":["../../../src/localization/getLocalizedPath.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8Da,yBACL,oCACA,sBAAsB,gBAAgB,uBAAqB,eAElD,eAAa,SACpB,eAAa,UACZ,mBACR,kBAAkB,eAAe"}
|
|
@@ -31,6 +31,10 @@ import { LocalesValues, LocalizedUrl, ResolvedDefaultLocale } from "@intlayer/ty
|
|
|
31
31
|
* // no-prefix mode
|
|
32
32
|
* getLocalizedUrl('/about', 'fr', { locales: ['en', 'fr'], defaultLocale: 'en', mode: 'no-prefix' });
|
|
33
33
|
* // Returns '/about' for any locale
|
|
34
|
+
*
|
|
35
|
+
* // domain routing
|
|
36
|
+
* getLocalizedUrl('/about', 'zh', { domains: { zh: 'intlayer.cn' }, currentDomain: 'intlayer.org' });
|
|
37
|
+
* // Returns 'https://intlayer.cn/about' — the domain identifies the locale, so no prefix
|
|
34
38
|
* ```
|
|
35
39
|
*
|
|
36
40
|
* @param url - The original URL string to be processed.
|
|
@@ -48,6 +52,10 @@ import { LocalesValues, LocalizedUrl, ResolvedDefaultLocale } from "@intlayer/ty
|
|
|
48
52
|
* The return type is narrowed to a template-literal type when both `url` and
|
|
49
53
|
* `currentLocale` are string literals and the routing mode / defaultLocale are
|
|
50
54
|
* not overridden via `options`.
|
|
55
|
+
*
|
|
56
|
+
* For a locale mapped to a domain by `routing.domains` it narrows to the union
|
|
57
|
+
* of the two URLs this function can return — the absolute one on that domain,
|
|
58
|
+
* and the relative one it returns when the current page already lives there.
|
|
51
59
|
*/
|
|
52
60
|
declare const getLocalizedUrl: <const T extends string, const L extends LocalesValues = ResolvedDefaultLocale>(url: T, currentLocale?: L, options?: RoutingOptions) => LocalizedUrl<T, L>;
|
|
53
61
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLocalizedUrl.d.ts","names":[],"sources":["../../../src/localization/getLocalizedUrl.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getLocalizedUrl.d.ts","names":[],"sources":["../../../src/localization/getLocalizedUrl.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmEa,wBACL,wBACA,UAAU,gBAAgB,uBAAqB,KAEhD,GAAC,gBACS,GAAC,UACP,mBACR,aAAa,GAAG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DeclaredLocales, LocalesValues, ResolvedDefaultLocale, ResolvedRoutingMode } from "@intlayer/types/module_augmentation";
|
|
1
|
+
import { DeclaredLocales, DomainRuleMap, IsDomainExclusive, LocalesValues, ResolvedDefaultLocale, ResolvedDomains, ResolvedRoutingMode } from "@intlayer/types/module_augmentation";
|
|
2
2
|
import { RewriteRules, RoutingConfig } from "@intlayer/types/config";
|
|
3
3
|
//#region src/localization/getPrefix.d.ts
|
|
4
4
|
/**
|
|
@@ -65,11 +65,16 @@ type GetPrefixResult = {
|
|
|
65
65
|
*
|
|
66
66
|
* Distributes over union locales — calling `getPrefix('fr')` in `prefix-no-default`
|
|
67
67
|
* mode with `defaultLocale = 'en'` resolves to `{ prefix: 'fr/'; localePrefix: 'fr' }`.
|
|
68
|
+
* A locale served from its own exclusive domain resolves to an empty prefix, as
|
|
69
|
+
* the hostname already identifies it.
|
|
68
70
|
*
|
|
69
|
-
* Note:
|
|
70
|
-
*
|
|
71
|
+
* Note: the "locale not in locales" edge case returns an empty result at runtime
|
|
72
|
+
* regardless of what this type reports.
|
|
71
73
|
*/
|
|
72
|
-
type GetPrefixResultNarrowed<L extends LocalesValues | undefined, Mode extends string = ResolvedRoutingMode, Default extends LocalesValues = ResolvedDefaultLocale> = L extends string ? [string] extends [L] ? GetPrefixResultNarrowed<DeclaredLocales, Mode, Default> :
|
|
74
|
+
type GetPrefixResultNarrowed<L extends LocalesValues | undefined, Mode extends string = ResolvedRoutingMode, Default extends LocalesValues = ResolvedDefaultLocale, Domains extends DomainRuleMap = ResolvedDomains> = L extends string ? [string] extends [L] ? GetPrefixResultNarrowed<DeclaredLocales, Mode, Default, Domains> : IsDomainExclusive<L, Domains> extends true ? {
|
|
75
|
+
prefix: '';
|
|
76
|
+
localePrefix: undefined;
|
|
77
|
+
} : [string] extends [Mode] ? GetPrefixResult : Mode extends 'prefix-all' ? {
|
|
73
78
|
prefix: `${L}/`;
|
|
74
79
|
localePrefix: L;
|
|
75
80
|
} : Mode extends 'prefix-no-default' ? L extends Default ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPrefix.d.ts","names":[],"sources":["../../../src/localization/getPrefix.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"getPrefix.d.ts","names":[],"sources":["../../../src/localization/getPrefix.ts"],"mappings":";;;;;;KAqBY;EACV,UAAU;EACV,gBAAgB;EAChB,OAAO;EACP,UAAU,2BAA2B;EACrC,UAAU;;;;;;;;;;;;EAYV;;;;;;cAOW,uBAAoB,UACtB,mBACR,KAAK;EACN,eAAe;EACf,MAAM;EACN,SAAS;;;;;;;;;;;;;;cAsBE,mBAAgB,OACpB,kCAAgC,mBACpB,oBAClB,SAAS;KAGA;EACV,gBAAgB;EAChB,OAAO;;KAGG;;;;;EAKV;;;;EAIA,cAAc;;;;;;;;;;;;;KAcJ,wBACV,UAAU,2BACV,sBAAsB,qBACtB,gBAAgB,gBAAgB,uBAChC,gBAAgB,gBAAgB,mBAC9B,qCACkB,KAChB,wBAAwB,iBAAiB,MAAM,SAAS,WACxD,kBAAkB,GAAG;EACjB;EAAY;sBACI,QAChB,kBACA;EACI,WAAW;EAAM,cAAc;IACjC,mCACE,UAAU;EACN;EAAY;;EACZ,WAAW;EAAM,cAAc;;EACjC;EAAY;;EACtB;EAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmCL,kBAAmB,UAAU,2BAAyB,QACzD,GAAC,UACA,mBACR,wBAAwB"}
|
|
@@ -109,7 +109,6 @@ declare const GFM_TASK_R: RegExp;
|
|
|
109
109
|
declare const HEADING_R: RegExp;
|
|
110
110
|
declare const HEADING_ATX_COMPLIANT_R: RegExp;
|
|
111
111
|
declare const HEADING_SETEXT_R: RegExp;
|
|
112
|
-
/** HTML patterns */
|
|
113
112
|
declare const HTML_BLOCK_ELEMENT_R: RegExp;
|
|
114
113
|
declare const HTML_CHAR_CODE_R: RegExp;
|
|
115
114
|
declare const HTML_COMMENT_R: RegExp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","names":[],"sources":["../../../src/markdown/constants.ts"],"mappings":";;;;;cAQa;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;;WAEA;;WAEA;WACA;WACA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;KAUU,wBAAwB,uBAAuB;;;;cAS9C;;WAEX;;WAEA;;WAEA;;WAEA;;WAEA;;KAGU,wBAAwB,uBAAuB;;cAO9C;;;;;cAUA,4BAA4B;;;;cAuD5B,wBAAwB;;cAcxB;;cAGA;;cAcA,kBAAgB;;cAIhB,aAAW;;cAGX,cAAY;cACZ,kCAAgC;cAChC,oBAAkB;;cAGlB,cAAY;cACZ,kBAAgB;;cAGhB,qBAAmB;cAEnB,cAAY;;cAEZ,mBAAiB;cACjB,eAAa;;cAGb,uBAAqB;cACrB,cAAY;;cAGZ,YAAU;cACV,sBAAoB;;cAGpB,YAAU;;cAGV,gBAAc;;cAGd,YAAU;;cAGV,WAAS;cACT,yBAAuB;cAEvB,kBAAgB
|
|
1
|
+
{"version":3,"file":"constants.d.ts","names":[],"sources":["../../../src/markdown/constants.ts"],"mappings":";;;;;cAQa;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;;WAEA;;WAEA;WACA;WACA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;KAUU,wBAAwB,uBAAuB;;;;cAS9C;;WAEX;;WAEA;;WAEA;;WAEA;;WAEA;;KAGU,wBAAwB,uBAAuB;;cAO9C;;;;;cAUA,4BAA4B;;;;cAuD5B,wBAAwB;;cAcxB;;cAGA;;cAcA,kBAAgB;;cAIhB,aAAW;;cAGX,cAAY;cACZ,kCAAgC;cAChC,oBAAkB;;cAGlB,cAAY;cACZ,kBAAgB;;cAGhB,qBAAmB;cAEnB,cAAY;;cAEZ,mBAAiB;cACjB,eAAa;;cAGb,uBAAqB;cACrB,cAAY;;cAGZ,YAAU;cACV,sBAAoB;;cAGpB,YAAU;;cAGV,gBAAc;;cAGd,YAAU;;cAGV,WAAS;cACT,yBAAuB;cAEvB,kBAAgB;cAqChB,sBAAoB;cAIpB,kBAAgB;cAEhB,gBAAc;cACd,oBAAkB;cAClB,6BAA2B;;cAM3B,oBAAkB;;cAKlB,iBAAe;;cAGf,0BAAwB;cACxB,iBAAe;cACf,6BAA2B;;cAG3B,YAAU;cAEV,kBAAgB;cAChB,oBAAkB;cAClB,kBAAgB;cAChB,mBAAiB;;cAGjB,aAAW;;cAGX,yBAAuB;cAEvB,mBAAiB;cACjB,kBAAgB;;cAGhB,0BAAwB;;cAGxB,OAAK;cACL,wBAAsB;cACtB,yBAAuB;;cAGvB,mBAAiB;cACjB;cACA;;cAGA,gBAAc;cACd,YAAU;cACV,cAAY;;cAIZ,aAAW;KAMZ;cACC,SAAS;cACT,WAAW;;;;;cAUX,YAAS;;;;;cAOT;;cAIA,aAAW;;cAKX,mBAAiB;;cAKjB,eAAa;;cAKb,wBAAsB;cAQtB,yBAAsB,MAAU;cAQhC;cACA;cAEA,8BAA2B,MAAU,aAAW;cAOhD,4BAA0B;cAC1B,8BAA4B;cAG5B,wBAAqB,MAAU,aAAW;cAc1C,qBAAmB;cACnB,uBAAqB;cAErB,oBAAiB,MAAU,aAAW;cAiBtC,gBAAc;cACd,kBAAgB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/core",
|
|
3
|
-
"version": "9.4.0
|
|
3
|
+
"version": "9.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Includes core Intlayer functions like translation, dictionary, and utility functions shared across multiple packages.",
|
|
6
6
|
"keywords": [
|
|
@@ -172,15 +172,15 @@
|
|
|
172
172
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
173
173
|
},
|
|
174
174
|
"dependencies": {
|
|
175
|
-
"@intlayer/api": "9.4.0
|
|
176
|
-
"@intlayer/config": "9.4.0
|
|
177
|
-
"@intlayer/dictionaries-entry": "9.4.0
|
|
178
|
-
"@intlayer/types": "9.4.0
|
|
179
|
-
"@intlayer/unmerged-dictionaries-entry": "9.4.0
|
|
175
|
+
"@intlayer/api": "9.4.0",
|
|
176
|
+
"@intlayer/config": "9.4.0",
|
|
177
|
+
"@intlayer/dictionaries-entry": "9.4.0",
|
|
178
|
+
"@intlayer/types": "9.4.0",
|
|
179
|
+
"@intlayer/unmerged-dictionaries-entry": "9.4.0",
|
|
180
180
|
"defu": "6.1.7"
|
|
181
181
|
},
|
|
182
182
|
"devDependencies": {
|
|
183
|
-
"@types/node": "26.
|
|
183
|
+
"@types/node": "26.3.0",
|
|
184
184
|
"@utils/ts-config": "1.0.4",
|
|
185
185
|
"@utils/ts-config-types": "1.0.4",
|
|
186
186
|
"@utils/tsdown-config": "1.0.4",
|