@intlayer/core 7.0.0-canary.3 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/getStorageAttributes.cjs +24 -5
- package/dist/cjs/getStorageAttributes.cjs.map +1 -1
- package/dist/cjs/localization/getMultilingualUrls.cjs +3 -1
- package/dist/cjs/localization/getMultilingualUrls.cjs.map +1 -1
- package/dist/cjs/transpiler/file/file.cjs +2 -2
- package/dist/cjs/utils/localeStorage.cjs +18 -5
- package/dist/cjs/utils/localeStorage.cjs.map +1 -1
- package/dist/esm/getStorageAttributes.mjs +24 -5
- package/dist/esm/getStorageAttributes.mjs.map +1 -1
- package/dist/esm/localization/getMultilingualUrls.mjs +2 -1
- package/dist/esm/localization/getMultilingualUrls.mjs.map +1 -1
- package/dist/esm/transpiler/file/file.mjs +1 -1
- package/dist/esm/utils/localeStorage.mjs +18 -5
- package/dist/esm/utils/localeStorage.mjs.map +1 -1
- package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts +4 -4
- package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts +4 -4
- package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts +4 -4
- package/dist/types/deepTransformPlugins/index.d.ts.map +1 -0
- package/dist/types/dictionaryManipulator/getUnmergedDictionaryByKeyPath.d.ts +2 -2
- package/dist/types/dictionaryManipulator/index.d.ts.map +1 -0
- package/dist/types/dictionaryManipulator/orderDictionaries.d.ts +2 -2
- package/dist/types/formatters/index.d.ts.map +1 -0
- package/dist/types/getStorageAttributes.d.ts +7 -3
- package/dist/types/getStorageAttributes.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/interpreter/getContent/index.d.ts.map +1 -0
- package/dist/types/interpreter/getContent/plugins.d.ts.map +1 -1
- package/dist/types/interpreter/getIntlayerAsync.d.ts +13 -0
- package/dist/types/interpreter/getIntlayerAsync.d.ts.map +1 -0
- package/dist/types/interpreter/index.d.ts.map +1 -0
- package/dist/types/localization/getMultilingualUrls.d.ts.map +1 -1
- package/dist/types/localization/index.d.ts.map +1 -0
- package/dist/types/localization/localeList.d.ts +3 -0
- package/dist/types/localization/localeList.d.ts.map +1 -0
- package/dist/types/transpiler/condition/index.d.ts.map +1 -0
- package/dist/types/transpiler/enumeration/enumeration.d.ts.map +1 -1
- package/dist/types/transpiler/enumeration/index.d.ts.map +1 -0
- package/dist/types/transpiler/file/index.d.ts.map +1 -0
- package/dist/types/transpiler/gender/index.d.ts.map +1 -0
- package/dist/types/transpiler/index.d.ts.map +1 -0
- package/dist/types/transpiler/insertion/index.d.ts.map +1 -0
- package/dist/types/transpiler/markdown/index.d.ts.map +1 -0
- package/dist/types/transpiler/nesting/index.d.ts.map +1 -0
- package/dist/types/transpiler/translation/index.d.ts.map +1 -0
- package/dist/types/transpiler/translation/translation.d.ts +1 -1
- package/dist/types/transpiler/translation/translation.d.ts.map +1 -1
- package/dist/types/types/dictionary.d.ts +307 -0
- package/dist/types/types/dictionary.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +5 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/intlayer.d.ts +5 -0
- package/dist/types/types/intlayer.d.ts.map +1 -0
- package/dist/types/types/keyPath.d.ts +47 -0
- package/dist/types/types/keyPath.d.ts.map +1 -0
- package/dist/types/types/nodeType.d.ts +30 -0
- package/dist/types/types/nodeType.d.ts.map +1 -0
- package/dist/types/types/translation.d.ts +25 -0
- package/dist/types/types/translation.d.ts.map +1 -0
- package/dist/types/utils/localeStorage.d.ts +8 -6
- package/dist/types/utils/localeStorage.d.ts.map +1 -1
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localeStorage.mjs","names":["parts: string[]"],"sources":["../../../src/utils/localeStorage.ts"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport type { CookiesAttributes, Locale, LocalesValues } from '@intlayer/types';\nimport { getStorageAttributes } from '../getStorageAttributes';\n\ntype CookieBuildAttributes = {\n /**\n * Cookie domain to store the locale information\n *\n * Default: undefined\n *\n * Define the domain where the cookie is available. Defaults to\n * the domain of the page where the cookie was created.\n */\n domain?: string;\n /**\n * Cookie path to store the locale information\n *\n * Default: undefined\n *\n * Define the path where the cookie is available. Defaults to '/'\n */\n path?: string;\n /**\n * Cookie secure to store the locale information\n *\n * Default: undefined\n *\n * A Boolean indicating if the cookie transmission requires a\n * secure protocol (https). Defaults to false.\n */\n secure?: boolean;\n /**\n * Cookie httpOnly to store the locale information\n *\n * Default: undefined\n *\n * The cookie httpOnly where the locale information is stored.\n */\n httpOnly?: boolean;\n /**\n * Cookie sameSite to store the locale information\n *\n * Default: undefined\n *\n * Asserts that a cookie must not be sent with cross-origin requests,\n * providing some protection against cross-site request forgery\n * attacks (CSRF)\n */\n sameSite?: 'strict' | 'lax' | 'none';\n\n /**\n * Cookie expires to store the locale information\n *\n * Default: undefined\n *\n * Define when the cookie will be removed. Value can be a Number\n * which will be interpreted as days from time of creation or a\n * Date instance. If omitted, the cookie becomes a session cookie.\n */\n expires?: number | undefined;\n};\n\nconst buildCookieString = (\n name: string,\n value: string,\n attributes: Omit<CookiesAttributes, 'name' | 'type'>\n): string => {\n const encodedValue = encodeURIComponent(value);\n const parts: string[] = [`${name}=${encodedValue}`];\n\n if (attributes.path) parts.push(`Path=${attributes.path}`);\n if (attributes.domain) parts.push(`Domain=${attributes.domain}`);\n if (attributes.expires instanceof Date)\n parts.push(`Expires=${attributes.expires.toUTCString()}`);\n\n if (attributes.secure) parts.push('Secure');\n if (attributes.sameSite) parts.push(`SameSite=${attributes.sameSite}`);\n return parts.join('; ');\n};\n\nexport type LocaleStorageOptions = {\n overwrite?: boolean;\n isCookieEnabled?: boolean;\n setCookieStore?: (\n name: string,\n value: string,\n cookie: CookieBuildAttributes\n ) => void;\n setCookieString?: (name: string, cookie: string) => void;\n getCookie?: (name: string) => string | undefined | null;\n setSessionStorage?: (name: string, value: string) => void;\n getSessionStorage?: (name: string) => string | undefined | null;\n setLocaleStorage?: (name: string, value: string) => void;\n getLocaleStorage?: (name: string) => string | undefined | null;\n};\n\n/**\n * Retrieves the locale from various storage mechanisms (cookies, localStorage, sessionStorage).\n * The function checks storage locations in order of priority as defined in the configuration.\n *\n * @returns The locale if found in any storage, or undefined if not found\n */\nexport const getLocaleFromStorage = (\n options: Pick<\n LocaleStorageOptions,\n 'getCookie' | 'getSessionStorage' | 'getLocaleStorage' | 'isCookieEnabled'\n >\n): Locale | undefined => {\n const { routing, internationalization } = configuration;\n const { locales } = internationalization;\n const { storage } = routing;\n\n // If storage is disabled, return undefined\n if (storage === false || options?.isCookieEnabled === false) return undefined;\n\n const storageAttributes = getStorageAttributes(storage);\n\n const isValidLocale = (value: string | null | undefined): value is Locale => {\n if (!value) return false;\n\n return locales.includes(value as Locale);\n };\n\n const readCookie = (name: string): string | undefined => {\n // Prefer provided getter (server or custom environment)\n try {\n const fromOption = options?.getCookie?.(name);\n\n if (fromOption !== null) return fromOption;\n } catch {}\n\n // Fallback to browser cookie parsing\n try {\n const cookieString = document.cookie ?? '';\n\n if (!cookieString) return;\n\n const pairs = cookieString.split(';');\n\n for (let i = 0; i < pairs.length; i++) {\n const part = pairs[i].trim();\n\n if (!part) continue;\n\n const equalIndex = part.indexOf('=');\n const key = equalIndex >= 0 ? part.substring(0, equalIndex) : part;\n\n if (key === name) {\n const rawValue =\n equalIndex >= 0 ? part.substring(equalIndex + 1) : '';\n\n try {\n return decodeURIComponent(rawValue);\n } catch {\n return rawValue;\n }\n }\n }\n } catch {}\n };\n\n // 1) Check cookies first\n for (let i = 0; i < storageAttributes.cookies.length; i++) {\n const { name } = storageAttributes.cookies[i];\n\n const value = readCookie(name);\n\n if (isValidLocale(value)) return value;\n }\n\n // 2) Then check localStorage candidates (browser only)\n for (let i = 0; i < storageAttributes.localStorage.length; i++) {\n const { name } = storageAttributes.localStorage[i];\n\n try {\n const value = options?.getLocaleStorage?.(name);\n\n if (isValidLocale(value)) return value;\n } catch {}\n }\n\n // 3) Finally check sessionStorage candidates (browser only)\n for (let i = 0; i < storageAttributes.sessionStorage.length; i++) {\n const { name } = storageAttributes.sessionStorage[i];\n\n try {\n const value = options?.getSessionStorage?.(name);\n\n if (isValidLocale(value)) return value;\n } catch {}\n }\n};\n\n/**\n * Stores the locale in various storage mechanisms (cookies, localStorage, sessionStorage).\n * The function writes to all configured storage locations according to their attributes.\n * Respects overwrite flags for localStorage and sessionStorage.\n *\n * @param locale - The locale to store\n */\nexport const setLocaleInStorage = (\n locale: LocalesValues,\n options?: LocaleStorageOptions\n): void => {\n // If storage is disabled, do nothing\n if (\n configuration.routing.storage === false ||\n options?.isCookieEnabled === false\n )\n return;\n\n const storageAttributes = getStorageAttributes(configuration.routing.storage);\n\n // Write to cookies (server via setCookie, client via cookieStore/document)\n for (let i = 0; i < storageAttributes.cookies.length; i++) {\n const { name, attributes } = storageAttributes.cookies[i];\n\n try {\n if (options?.setCookieStore) {\n options?.setCookieStore?.(name, locale, {\n ...attributes,\n expires:\n attributes.expires instanceof Date\n ? attributes.expires.getTime()\n : attributes.expires,\n });\n }\n } catch {\n try {\n if (options?.setCookieString) {\n const cookieString = buildCookieString(name, locale, attributes);\n\n options?.setCookieString?.(name, cookieString);\n }\n } catch {}\n }\n }\n\n // Write to localStorage (browser only)\n if (options?.setLocaleStorage) {\n for (let i = 0; i < storageAttributes.localStorage.length; i++) {\n const { name } = storageAttributes.localStorage[i];\n\n try {\n const shouldOverwrite = options?.overwrite ?? true;\n\n if (!shouldOverwrite && options?.getLocaleStorage) {\n const existing = options?.getLocaleStorage?.(name);\n if (existing) continue;\n }\n options?.setLocaleStorage?.(name, locale);\n } catch {}\n }\n }\n\n // Write to sessionStorage (browser only)\n if (options?.setSessionStorage) {\n for (let i = 0; i < storageAttributes.sessionStorage.length; i++) {\n const { name } = storageAttributes.sessionStorage[i];\n\n try {\n const shouldOverwrite = options?.overwrite ?? true;\n\n if (!shouldOverwrite && options?.getSessionStorage) {\n const existing = options?.getSessionStorage?.(name);\n if (existing) continue;\n }\n\n options?.setSessionStorage?.(name, locale);\n } catch {}\n }\n }\n};\n\n/**\n * Utility object to get and set the locale in the storage by considering the configuration\n *\n * @property getLocale - Retrieves the locale from various storage mechanisms (cookies, localStorage, sessionStorage).\n * Retrieves the locale from various storage mechanisms (cookies, localStorage, sessionStorage).\n * The function checks storage locations in order of priority as defined in the configuration.\n *\n * @property setLocale - Stores the locale in various storage mechanisms (cookies, localStorage, sessionStorage).\n * The function writes to all configured storage locations according to their attributes.\n * Respects overwrite flags for localStorage and sessionStorage.\n *\n * @returns The locale if found in any storage, or undefined if not found\n */\nexport const LocaleStorage = (options: LocaleStorageOptions) => ({\n getLocale: () => getLocaleFromStorage(options),\n setLocale: (locale: LocalesValues) => setLocaleInStorage(locale, options),\n});\n"],"mappings":";;;;AA8DA,MAAM,qBACJ,MACA,OACA,eACW;CAEX,MAAMA,QAAkB,CAAC,GAAG,KAAK,GADZ,mBAAmB,MAAM,GACK;AAEnD,KAAI,WAAW,KAAM,OAAM,KAAK,QAAQ,WAAW,OAAO;AAC1D,KAAI,WAAW,OAAQ,OAAM,KAAK,UAAU,WAAW,SAAS;AAChE,KAAI,WAAW,mBAAmB,KAChC,OAAM,KAAK,WAAW,WAAW,QAAQ,aAAa,GAAG;AAE3D,KAAI,WAAW,OAAQ,OAAM,KAAK,SAAS;AAC3C,KAAI,WAAW,SAAU,OAAM,KAAK,YAAY,WAAW,WAAW;AACtE,QAAO,MAAM,KAAK,KAAK;;;;;;;;AAyBzB,MAAa,wBACX,YAIuB;CACvB,MAAM,EAAE,SAAS,yBAAyB;CAC1C,MAAM,EAAE,YAAY;CACpB,MAAM,EAAE,YAAY;AAGpB,KAAI,YAAY,SAAS,SAAS,oBAAoB,MAAO,QAAO;CAEpE,MAAM,oBAAoB,qBAAqB,QAAQ;CAEvD,MAAM,iBAAiB,UAAsD;AAC3E,MAAI,CAAC,MAAO,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configuration from '@intlayer/config/built';\nimport type { CookiesAttributes, Locale, LocalesValues } from '@intlayer/types';\nimport { getStorageAttributes } from '../getStorageAttributes';\n\ntype CookieBuildAttributes = {\n /**\n * Cookie domain to store the locale information\n *\n * Default: undefined\n *\n * Define the domain where the cookie is available. Defaults to\n * the domain of the page where the cookie was created.\n */\n domain?: string;\n /**\n * Cookie path to store the locale information\n *\n * Default: undefined\n *\n * Define the path where the cookie is available. Defaults to '/'\n */\n path?: string;\n /**\n * Cookie secure to store the locale information\n *\n * Default: undefined\n *\n * A Boolean indicating if the cookie transmission requires a\n * secure protocol (https). Defaults to false.\n */\n secure?: boolean;\n /**\n * Cookie httpOnly to store the locale information\n *\n * Default: undefined\n *\n * The cookie httpOnly where the locale information is stored.\n */\n httpOnly?: boolean;\n /**\n * Cookie sameSite to store the locale information\n *\n * Default: undefined\n *\n * Asserts that a cookie must not be sent with cross-origin requests,\n * providing some protection against cross-site request forgery\n * attacks (CSRF)\n */\n sameSite?: 'strict' | 'lax' | 'none';\n\n /**\n * Cookie expires to store the locale information\n *\n * Default: undefined\n *\n * Define when the cookie will be removed. Value can be a Number\n * which will be interpreted as days from time of creation or a\n * Date instance. If omitted, the cookie becomes a session cookie.\n */\n expires?: number | undefined;\n};\n\nconst buildCookieString = (\n name: string,\n value: string,\n attributes: Omit<CookiesAttributes, 'name' | 'type'>\n): string => {\n const encodedValue = encodeURIComponent(value);\n const parts: string[] = [`${name}=${encodedValue}`];\n\n if (attributes.path) parts.push(`Path=${attributes.path}`);\n if (attributes.domain) parts.push(`Domain=${attributes.domain}`);\n if (attributes.expires instanceof Date)\n parts.push(`Expires=${attributes.expires.toUTCString()}`);\n\n if (attributes.secure) parts.push('Secure');\n if (attributes.sameSite) parts.push(`SameSite=${attributes.sameSite}`);\n return parts.join('; ');\n};\n\nexport type LocaleStorageOptions = {\n overwrite?: boolean;\n isCookieEnabled?: boolean;\n setCookieStore?: (\n name: string,\n value: string,\n cookie: CookieBuildAttributes\n ) => void;\n setCookieString?: (name: string, cookie: string) => void;\n getCookie?: (name: string) => string | undefined | null;\n setSessionStorage?: (name: string, value: string) => void;\n getSessionStorage?: (name: string) => string | undefined | null;\n setLocaleStorage?: (name: string, value: string) => void;\n getLocaleStorage?: (name: string) => string | undefined | null;\n getHeader?: (name: string) => string | undefined | null;\n setHeader?: (name: string, value: string) => void;\n};\n\n/**\n * Retrieves the locale from various storage mechanisms (cookies, localStorage, sessionStorage, headers).\n * The function checks storage locations in order of priority as defined in the configuration.\n *\n * @returns The locale if found in any storage, or undefined if not found\n */\nexport const getLocaleFromStorage = (\n options: Pick<\n LocaleStorageOptions,\n | 'getCookie'\n | 'getSessionStorage'\n | 'getLocaleStorage'\n | 'getHeader'\n | 'isCookieEnabled'\n >\n): Locale | undefined => {\n const { routing, internationalization } = configuration;\n const { locales } = internationalization;\n const { storage } = routing;\n\n // If storage is disabled, return undefined\n if (storage === false || options?.isCookieEnabled === false) return undefined;\n\n const storageAttributes = getStorageAttributes(storage);\n\n const isValidLocale = (value: string | null | undefined): value is Locale => {\n if (!value) return false;\n\n return locales.includes(value as Locale);\n };\n\n const readCookie = (name: string): string | undefined => {\n // Prefer provided getter (server or custom environment)\n try {\n const fromOption = options?.getCookie?.(name);\n\n if (fromOption !== null) return fromOption;\n } catch {}\n\n // Fallback to browser cookie parsing\n try {\n const cookieString = document.cookie ?? '';\n\n if (!cookieString) return;\n\n const pairs = cookieString.split(';');\n\n for (let i = 0; i < pairs.length; i++) {\n const part = pairs[i].trim();\n\n if (!part) continue;\n\n const equalIndex = part.indexOf('=');\n const key = equalIndex >= 0 ? part.substring(0, equalIndex) : part;\n\n if (key === name) {\n const rawValue =\n equalIndex >= 0 ? part.substring(equalIndex + 1) : '';\n\n try {\n return decodeURIComponent(rawValue);\n } catch {\n return rawValue;\n }\n }\n }\n } catch {}\n };\n\n // 1) Check cookies first\n for (let i = 0; i < storageAttributes.cookies.length; i++) {\n const { name } = storageAttributes.cookies[i];\n\n const value = readCookie(name);\n\n if (isValidLocale(value)) return value;\n }\n\n // 2) Then check localStorage candidates (browser only)\n for (let i = 0; i < storageAttributes.localStorage.length; i++) {\n const { name } = storageAttributes.localStorage[i];\n\n try {\n const value = options?.getLocaleStorage?.(name);\n\n if (isValidLocale(value)) return value;\n } catch {}\n }\n\n // 3) Check sessionStorage candidates (browser only)\n for (let i = 0; i < storageAttributes.sessionStorage.length; i++) {\n const { name } = storageAttributes.sessionStorage[i];\n\n try {\n const value = options?.getSessionStorage?.(name);\n\n if (isValidLocale(value)) return value;\n } catch {}\n }\n\n // 4) Finally check header candidates (server only)\n for (let i = 0; i < storageAttributes.headers.length; i++) {\n const { name } = storageAttributes.headers[i];\n\n try {\n const value = options?.getHeader?.(name);\n\n if (isValidLocale(value)) return value;\n } catch {}\n }\n};\n\n/**\n * Stores the locale in various storage mechanisms (cookies, localStorage, sessionStorage, headers).\n * The function writes to all configured storage locations according to their attributes.\n * Respects overwrite flags for localStorage and sessionStorage.\n *\n * @param locale - The locale to store\n */\nexport const setLocaleInStorage = (\n locale: LocalesValues,\n options?: LocaleStorageOptions\n): void => {\n // If storage is disabled, do nothing\n if (\n configuration.routing.storage === false ||\n options?.isCookieEnabled === false\n )\n return;\n\n const storageAttributes = getStorageAttributes(configuration.routing.storage);\n\n // Write to cookies (server via setCookie, client via cookieStore/document)\n for (let i = 0; i < storageAttributes.cookies.length; i++) {\n const { name, attributes } = storageAttributes.cookies[i];\n\n try {\n if (options?.setCookieStore) {\n options?.setCookieStore?.(name, locale, {\n ...attributes,\n expires:\n attributes.expires instanceof Date\n ? attributes.expires.getTime()\n : attributes.expires,\n });\n }\n } catch {\n try {\n if (options?.setCookieString) {\n const cookieString = buildCookieString(name, locale, attributes);\n\n options?.setCookieString?.(name, cookieString);\n }\n } catch {}\n }\n }\n\n // Write to localStorage (browser only)\n if (options?.setLocaleStorage) {\n for (let i = 0; i < storageAttributes.localStorage.length; i++) {\n const { name } = storageAttributes.localStorage[i];\n\n try {\n const shouldOverwrite = options?.overwrite ?? true;\n\n if (!shouldOverwrite && options?.getLocaleStorage) {\n const existing = options?.getLocaleStorage?.(name);\n if (existing) continue;\n }\n options?.setLocaleStorage?.(name, locale);\n } catch {}\n }\n }\n\n // Write to sessionStorage (browser only)\n if (options?.setSessionStorage) {\n for (let i = 0; i < storageAttributes.sessionStorage.length; i++) {\n const { name } = storageAttributes.sessionStorage[i];\n\n try {\n const shouldOverwrite = options?.overwrite ?? true;\n\n if (!shouldOverwrite && options?.getSessionStorage) {\n const existing = options?.getSessionStorage?.(name);\n if (existing) continue;\n }\n\n options?.setSessionStorage?.(name, locale);\n } catch {}\n }\n }\n\n // Write to headers (server only)\n if (options?.setHeader) {\n for (let i = 0; i < storageAttributes.headers.length; i++) {\n const { name } = storageAttributes.headers[i];\n\n try {\n options?.setHeader?.(name, locale);\n } catch {}\n }\n }\n};\n\n/**\n * Utility object to get and set the locale in the storage by considering the configuration\n *\n * @property getLocale - Retrieves the locale from various storage mechanisms (cookies, localStorage, sessionStorage, headers).\n * Retrieves the locale from various storage mechanisms (cookies, localStorage, sessionStorage, headers).\n * The function checks storage locations in order of priority as defined in the configuration.\n *\n * @property setLocale - Stores the locale in various storage mechanisms (cookies, localStorage, sessionStorage, headers).\n * The function writes to all configured storage locations according to their attributes.\n * Respects overwrite flags for localStorage and sessionStorage.\n *\n * @returns The locale if found in any storage, or undefined if not found\n */\nexport const LocaleStorage = (options: LocaleStorageOptions) => ({\n getLocale: () => getLocaleFromStorage(options),\n setLocale: (locale: LocalesValues) => setLocaleInStorage(locale, options),\n});\n"],"mappings":";;;;AA8DA,MAAM,qBACJ,MACA,OACA,eACW;CAEX,MAAMA,QAAkB,CAAC,GAAG,KAAK,GADZ,mBAAmB,MAAM,GACK;AAEnD,KAAI,WAAW,KAAM,OAAM,KAAK,QAAQ,WAAW,OAAO;AAC1D,KAAI,WAAW,OAAQ,OAAM,KAAK,UAAU,WAAW,SAAS;AAChE,KAAI,WAAW,mBAAmB,KAChC,OAAM,KAAK,WAA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hD,MAAI;AAGF,OAAI,EAFoB,SAAS,aAAa,SAEtB,SAAS,kBAE/B;QADiB,SAAS,mBAAmB,KAAK,CACpC;;AAEhB,YAAS,mBAAmB,MAAM,OAAO;UACnC;;AAKZ,KAAI,SAAS,kBACX,MAAK,IAAI,IAAI,GAAG,IAAI,kBAAkB,eAAe,QAAQ,KAAK;EAChE,MAAM,EAAE,SAAS,kBAAkB,eAAe;AAElD,MAAI;AAGF,OAAI,EAFoB,SAAS,aAAa,SAEtB,SAAS,mBAE/B;QADiB,SAAS,oBAAoB,KAAK,CACrC;;AAGhB,YAAS,oBAAoB,MAAM,OAAO;UACpC;;AAKZ,KAAI,SAAS,UACX,MAAK,IAAI,IAAI,GAAG,IAAI,kBAAkB,QAAQ,QAAQ,KAAK;EACzD,MAAM,EAAE,SAAS,kBAAkB,QAAQ;AAE3C,MAAI;AACF,YAAS,YAAY,MAAM,OAAO;UAC5B;;;;;;;;;;;;;;;;AAkBd,MAAa,iBAAiB,aAAmC;CAC/D,iBAAiB,qBAAqB,QAAQ;CAC9C,YAAY,WAA0B,mBAAmB,QAAQ,QAAQ;CAC1E"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NodeProps, Plugins } from "../interpreter/getContent/plugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _intlayer_types7 from "@intlayer/types";
|
|
3
3
|
import { ContentNode, DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts
|
|
@@ -25,8 +25,8 @@ declare const getFilterMissingTranslationsDictionary: (dictionary: Dictionary, l
|
|
|
25
25
|
$schema?: string;
|
|
26
26
|
id?: string;
|
|
27
27
|
projectIds?: string[];
|
|
28
|
-
localId?:
|
|
29
|
-
localIds?:
|
|
28
|
+
localId?: _intlayer_types7.LocalDictionaryId;
|
|
29
|
+
localIds?: _intlayer_types7.LocalDictionaryId[];
|
|
30
30
|
key: string;
|
|
31
31
|
title?: string;
|
|
32
32
|
description?: string;
|
|
@@ -35,7 +35,7 @@ declare const getFilterMissingTranslationsDictionary: (dictionary: Dictionary, l
|
|
|
35
35
|
filePath?: string;
|
|
36
36
|
tags?: string[];
|
|
37
37
|
locale?: LocalesValues;
|
|
38
|
-
fill?:
|
|
38
|
+
fill?: _intlayer_types7.Fill;
|
|
39
39
|
filled?: true;
|
|
40
40
|
priority?: number;
|
|
41
41
|
live?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeepTransformContent, NodeProps, Plugins } from "../interpreter/getContent/plugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _intlayer_types4 from "@intlayer/types";
|
|
3
3
|
import { ContentNode, DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts
|
|
@@ -17,8 +17,8 @@ declare const getFilterTranslationsOnlyDictionary: (dictionary: Dictionary, loca
|
|
|
17
17
|
$schema?: string;
|
|
18
18
|
id?: string;
|
|
19
19
|
projectIds?: string[];
|
|
20
|
-
localId?:
|
|
21
|
-
localIds?:
|
|
20
|
+
localId?: _intlayer_types4.LocalDictionaryId;
|
|
21
|
+
localIds?: _intlayer_types4.LocalDictionaryId[];
|
|
22
22
|
key: string;
|
|
23
23
|
title?: string;
|
|
24
24
|
description?: string;
|
|
@@ -27,7 +27,7 @@ declare const getFilterTranslationsOnlyDictionary: (dictionary: Dictionary, loca
|
|
|
27
27
|
filePath?: string;
|
|
28
28
|
tags?: string[];
|
|
29
29
|
locale?: LocalesValues;
|
|
30
|
-
fill?:
|
|
30
|
+
fill?: _intlayer_types4.Fill;
|
|
31
31
|
filled?: true;
|
|
32
32
|
priority?: number;
|
|
33
33
|
live?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NodeProps } from "../interpreter/getContent/plugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _intlayer_types1 from "@intlayer/types";
|
|
3
3
|
import { ContentNode, Dictionary, LocalesValues } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/deepTransformPlugins/getFilteredLocalesContent.d.ts
|
|
@@ -9,8 +9,8 @@ declare const getFilteredLocalesDictionary: (dictionary: Dictionary, locale: Loc
|
|
|
9
9
|
$schema?: string;
|
|
10
10
|
id?: string;
|
|
11
11
|
projectIds?: string[];
|
|
12
|
-
localId?:
|
|
13
|
-
localIds?:
|
|
12
|
+
localId?: _intlayer_types1.LocalDictionaryId;
|
|
13
|
+
localIds?: _intlayer_types1.LocalDictionaryId[];
|
|
14
14
|
key: string;
|
|
15
15
|
title?: string;
|
|
16
16
|
description?: string;
|
|
@@ -19,7 +19,7 @@ declare const getFilteredLocalesDictionary: (dictionary: Dictionary, locale: Loc
|
|
|
19
19
|
filePath?: string;
|
|
20
20
|
tags?: string[];
|
|
21
21
|
locale?: LocalesValues;
|
|
22
|
-
fill?:
|
|
22
|
+
fill?: _intlayer_types1.Fill;
|
|
23
23
|
filled?: true;
|
|
24
24
|
priority?: number;
|
|
25
25
|
live?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/deepTransformPlugins/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types0 from "@intlayer/types";
|
|
2
2
|
import { IntlayerConfig, KeyPath } from "@intlayer/types";
|
|
3
3
|
import { UnmergedDictionaries } from "@intlayer/unmerged-dictionaries-entry";
|
|
4
4
|
|
|
5
5
|
//#region src/dictionaryManipulator/getUnmergedDictionaryByKeyPath.d.ts
|
|
6
|
-
declare const getUnmergedDictionaryByKeyPath: (dictionaryKey: string, keyPath: KeyPath[], dictionariesRecord?: UnmergedDictionaries, configuration?: IntlayerConfig) =>
|
|
6
|
+
declare const getUnmergedDictionaryByKeyPath: (dictionaryKey: string, keyPath: KeyPath[], dictionariesRecord?: UnmergedDictionaries, configuration?: IntlayerConfig) => _intlayer_types0.Dictionary;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { getUnmergedDictionaryByKeyPath };
|
|
9
9
|
//# sourceMappingURL=getUnmergedDictionaryByKeyPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dictionaryManipulator/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC;AACjD,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types0 from "@intlayer/types";
|
|
2
2
|
import { Dictionary } from "@intlayer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/dictionaryManipulator/orderDictionaries.d.ts
|
|
@@ -10,7 +10,7 @@ import { Dictionary } from "@intlayer/types";
|
|
|
10
10
|
* @param priorityStrategy - The priority strategy ('local_first' or 'distant_first')
|
|
11
11
|
* @returns Ordered array of dictionaries
|
|
12
12
|
*/
|
|
13
|
-
declare const orderDictionaries: (dictionaries: Dictionary[], configuration?:
|
|
13
|
+
declare const orderDictionaries: (dictionaries: Dictionary[], configuration?: _intlayer_types0.IntlayerConfig) => Dictionary[];
|
|
14
14
|
//#endregion
|
|
15
15
|
export { orderDictionaries };
|
|
16
16
|
//# sourceMappingURL=orderDictionaries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/formatters/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
|
@@ -8,10 +8,14 @@ type CookieEntry = {
|
|
|
8
8
|
type WebStorageEntry = {
|
|
9
9
|
name: string;
|
|
10
10
|
};
|
|
11
|
-
type
|
|
11
|
+
type HeaderEntry = {
|
|
12
|
+
name: string;
|
|
13
|
+
};
|
|
14
|
+
type ProcessedStorageAttributes = {
|
|
12
15
|
cookies: CookieEntry[];
|
|
13
16
|
localStorage: WebStorageEntry[];
|
|
14
17
|
sessionStorage: WebStorageEntry[];
|
|
18
|
+
headers: HeaderEntry[];
|
|
15
19
|
};
|
|
16
20
|
/**
|
|
17
21
|
* Extracts and normalizes storage configuration into separate arrays for each storage type
|
|
@@ -19,7 +23,7 @@ type StorageAttributes = {
|
|
|
19
23
|
* @param options - The storage configuration from IntlayerConfig
|
|
20
24
|
* @returns An object containing arrays for cookies, localStorage, and sessionStorage
|
|
21
25
|
*/
|
|
22
|
-
declare const getStorageAttributes: (options: IntlayerConfig["routing"]["storage"]) =>
|
|
26
|
+
declare const getStorageAttributes: (options: IntlayerConfig["routing"]["storage"]) => ProcessedStorageAttributes;
|
|
23
27
|
//#endregion
|
|
24
|
-
export {
|
|
28
|
+
export { ProcessedStorageAttributes, getStorageAttributes };
|
|
25
29
|
//# sourceMappingURL=getStorageAttributes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getStorageAttributes.d.ts","names":[],"sources":["../../src/getStorageAttributes.ts"],"sourcesContent":[],"mappings":";;;KAWK,WAAA;;EAAA,UAAA,EAES,IAFE,CAEG,iBAAA,EAAA,MAAA,GAAL,MAAI,CAAA;AAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"getStorageAttributes.d.ts","names":[],"sources":["../../src/getStorageAttributes.ts"],"sourcesContent":[],"mappings":";;;KAWK,WAAA;;EAAA,UAAA,EAES,IAFE,CAEG,iBAAA,EAAA,MAAA,GAAL,MAAI,CAAA;AAAA,CAAA;AAGE,KAAf,eAAA,GAIW;EAIJ,IAAA,EAAA,MAAA;CACD;KALN,WAAA,GAMW;EACE,IAAA,EAAA,MAAA;CACP;AAAW,KAJV,0BAAA,GAIU;EAuLT,OAAA,EA1LF,WA0LE,EAAA;gBAzLG;kBACE;WACP;;;;;;;;cAuLE,gCACF,yCACR"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ import { number } from "./formatters/number.js";
|
|
|
46
46
|
import { percentage } from "./formatters/percentage.js";
|
|
47
47
|
import { relativeTime } from "./formatters/relativeTime.js";
|
|
48
48
|
import { units } from "./formatters/units.js";
|
|
49
|
-
import {
|
|
49
|
+
import { ProcessedStorageAttributes, getStorageAttributes } from "./getStorageAttributes.js";
|
|
50
50
|
import { LocaleStorage, LocaleStorageOptions, getLocaleFromStorage, setLocaleInStorage } from "./utils/localeStorage.js";
|
|
51
51
|
import { getBrowserLocale, localeStorageOptions } from "./localization/getBrowserLocale.js";
|
|
52
52
|
import { getHTMLTextDir } from "./localization/getHTMLTextDir.js";
|
|
@@ -64,4 +64,4 @@ import { CachedIntl, createCachedIntl } from "./utils/intl.js";
|
|
|
64
64
|
import { isSameKeyPath } from "./utils/isSameKeyPath.js";
|
|
65
65
|
import { isValidElement } from "./utils/isValidReactElement.js";
|
|
66
66
|
import { parseYaml } from "./utils/parseYaml.js";
|
|
67
|
-
export { CachedIntl, CachedIntl as Intl, ConditionCond, ConditionContent, ConditionContentStates, DeepTransformContent, DotPath, EnterFormat, EnumerationCond, EnumerationContent, EnumerationContentState, FileCond, FileContent, FileContentConstructor, Gender, GenderCond, GenderContent, GenderContentStates, GetNestingResult, IInterpreterPlugin, IInterpreterPluginState, InsertionCond, InsertionContent, InsertionContentConstructor, IsAny, LocaleStorage, LocaleStorageOptions, MarkdownContent, MarkdownContentConstructor, NestedCond, NestedContent, NestedContentState, NodeProps, Plugins,
|
|
67
|
+
export { CachedIntl, CachedIntl as Intl, ConditionCond, ConditionContent, ConditionContentStates, DeepTransformContent, DotPath, EnterFormat, EnumerationCond, EnumerationContent, EnumerationContentState, FileCond, FileContent, FileContentConstructor, Gender, GenderCond, GenderContent, GenderContentStates, GetNestingResult, IInterpreterPlugin, IInterpreterPluginState, InsertionCond, InsertionContent, InsertionContentConstructor, IsAny, LocaleStorage, LocaleStorageOptions, MarkdownContent, MarkdownContentConstructor, NestedCond, NestedContent, NestedContentState, NodeProps, Plugins, ProcessedStorageAttributes, TranslationCond, TranslationContent, ValidDotPathsFor, buildMaskPlugin, checkIsURLAbsolute, checkMissingLocalesPlugin, compact, condition as cond, conditionPlugin, createCachedIntl, currency, date, deepTransformNode, editDictionaryByKeyPath, enumeration as enu, enumerationPlugin, file, fileContent, filePlugin, filterMissingTranslationsOnlyPlugin, filterTranslationsOnlyPlugin, findMatchingCondition, gender, genderPlugin, getBrowserLocale, getCondition, getContent, getContentNodeByKeyPath, getDefaultNode, getDictionary, getEmptyNode, getEnumeration, getFilterMissingTranslationsContent, getFilterMissingTranslationsDictionary, getFilterTranslationsOnlyContent, getFilterTranslationsOnlyDictionary, getFilteredLocalesContent, getFilteredLocalesDictionary, getHTMLTextDir, getInsertionValues, getIntlayer, getLocaleFromPath, getLocaleFromStorage, getLocaleLang, getLocaleName, getLocalizedContent, getLocalizedUrl, getMarkdownMetadata, getMaskContent, getMissingLocalesContent, getMultilingualUrls, getNesting, getNodeChildren, getNodeType, getPathWithoutLocale, getPerLocaleDictionary, getReplacedValuesContent, getStorageAttributes, getTranslation, getUnmergedDictionaryByKeyPath, insertion as insert, insertContentInDictionary, insertionPlugin, isSameKeyPath, isValidElement, list, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, localeStorageOptions, markdown as md, mergeDictionaries, nesting as nest, nestedPlugin, normalizeDictionaries, normalizeDictionary, number, orderDictionaries, parseYaml, percentage, relativeTime, removeContentNodeByKeyPath, renameContentNodeByKeyPath, setLocaleInStorage, translation as t, translationPlugin, units, updateNodeChildren };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interpreter/getContent/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","names":[],"sources":["../../../../src/interpreter/getContent/plugins.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAoCA;AAcA;;;;;;;AAIc,KAlBF,OAAA,GAkBE;EACR,EAAA,EAAA,MAAA;EAAgB,SAAA,EAAA,CAAA,IAAA,EAAA,GAAA,EAAA,GAAA,O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pC,gBAtCoC,CAsCnB,CAtCmB,EAAA,MAsCV,kBAtCU,CAsCS,CAtCT,EAsCY,CAtCZ,EAsCe,CAtCf,CAAA,EAsCmB,CAtCnB,CAAA,SAAA,KAAA,GAwClC,QAxCkC,CAwCzB,CAxCyB,EAwCtB,CAxCsB,EAwCnB,CAxCmB,CAAA,GA0ClC,kBA1CkC,CA0Cf,CA1Ce,EA0CZ,CA1CY,EA0CT,CA1CS,CAAA,CAAA,MA0CA,kBA1CA,CA0CmB,CA1CnB,EA0CsB,CA1CtB,EA0CyB,CA1CzB,CAAA,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { LocalesValues } from '@intlayer/config/client';
|
|
2
|
+
import type { DictionaryKeys } from '../types';
|
|
3
|
+
import type { Plugins } from './getContent';
|
|
4
|
+
/**
|
|
5
|
+
* On the client side, Hook that picking one dictionary by its key and return the content
|
|
6
|
+
*
|
|
7
|
+
* This hook will prerender the locale dictionary and fetch simultaneously the distant dictionaries to hydrate it.
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* If the locale is not provided, it will use the locale from the client context
|
|
11
|
+
*/
|
|
12
|
+
export declare const getIntlayerAsync: <T extends DictionaryKeys, L extends LocalesValues>(key: T, locale?: L, plugins?: Plugins[]) => Promise<any>;
|
|
13
|
+
//# sourceMappingURL=getIntlayerAsync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getIntlayerAsync.d.ts","sourceRoot":"","sources":["../../../src/interpreter/getIntlayerAsync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAC3B,CAAC,SAAS,cAAc,EACxB,CAAC,SAAS,aAAa,EAEvB,KAAK,CAAC,EACN,SAAS,CAAC,EACV,UAAU,OAAO,EAAE,iBASpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interpreter/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMultilingualUrls.d.ts","names":[],"sources":["../../../src/localization/getMultilingualUrls.ts"],"sourcesContent":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"getMultilingualUrls.d.ts","names":[],"sources":["../../../src/localization/getMultilingualUrls.ts"],"sourcesContent":[],"mappings":";;;;;;AAuCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,6CAEF,6CAEM,qHAQd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/localization/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localeList.d.ts","sourceRoot":"","sources":["../../../src/localization/localeList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,eAAO,MAAM,UAAU,EAAE,OAAO,EAkO/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/condition/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enumeration.d.ts","names":[],"sources":["../../../../src/transpiler/enumeration/enumeration.ts"],"sourcesContent":[],"mappings":";;;KAEK,QAAA;KACA,QAAA;AAH2E,KAI3E,OAAA,GAAU,QAFF,GAEa,QAFb;AAAA,KAIR,KAAA,GAAQ,OAHA;AAAA,KAIR,WAAA,GAHO,IAGW,OAHR,EAAA;AAAmB,KAI7B,QAAA,GAFK,IAEU,OAFP,EAAA;AAAO,KAGf,eAAA,GAFW,KAEY,OAFL,EAAA;AAAO,KAGzB,QAAA,GAFQ,IAEO,
|
|
1
|
+
{"version":3,"file":"enumeration.d.ts","names":[],"sources":["../../../../src/transpiler/enumeration/enumeration.ts"],"sourcesContent":[],"mappings":";;;KAEK,QAAA;KACA,QAAA;AAH2E,KAI3E,OAAA,GAAU,QAFF,GAEa,QAFb;AAAA,KAIR,KAAA,GAAQ,OAHA;AAAA,KAIR,WAAA,GAHO,IAGW,OAHR,EAAA;AAAmB,KAI7B,QAAA,GAFK,IAEU,OAFP,EAAA;AAAO,KAGf,eAAA,GAFW,KAEY,OAFL,EAAA;AAAO,KAGzB,QAAA,GAFQ,IAEO,OAFA,EAAA;AAAO,KAGtB,eAAA,GAFe,KAEQ,OAFA,EAAA;AACvB,KAGO,WAAA,GACR,KAJgB,GAKhB,WALuB,GAMvB,QANuB,GAOvB,eAPuB,GAQvB,QARuB,GASvB,eATuB;AACtB,KAUO,uBAVgB,CAAA,SAAO,CAAA,GAUY,OAVZ,CAWjC,MAXiC,CAW1B,WAX0B,EAWb,SAXa,CAAA,CAAA,GAAA;EAEvB,QAAA,CAAA,EAWC,SAXU;CACnB;AACA,KAYQ,kBAZR,CAAA,YAAA,OAAA,CAAA,GAYgD,cAZhD,CAaF,QAAA,CAAS,WAbP,EAcF,uBAdE,CAcsB,SAdtB,CAAA,CAAA;;;;;;AAMJ;;;;;;;AAMA;;;;;;AAGE;cAqBI,WAA0D,EAAA,CAAA,OAAA,CAAA,CAAA,OAAA,CAAA,EAAxB,uBAAwB,CAAA,OAAA,CAAA,EAAA,GAAQ,cAAR,CAAQ,QAAA,CAAA,WAAR,EAAQ,uBAAR,CAAQ,OAAR,CAAA,EAAA,CAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/enumeration/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/file/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/gender/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transpiler/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,mBAAmB,cAAc,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/insertion/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/markdown/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/nesting/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/translation/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -23,7 +23,7 @@ type TranslationContent<Content$1 = unknown, RecordContent extends StrictModeLoc
|
|
|
23
23
|
* - If a locale is missing, it will make each existing locale optional and raise an error if the locale is not found.
|
|
24
24
|
*/
|
|
25
25
|
declare const translation: <Content = unknown, ContentRecord extends StrictModeLocaleMap<Content> = StrictModeLocaleMap<Content>>(content: ContentRecord) => TypedNodeModel<NodeType.Translation, ContentRecord, {
|
|
26
|
-
nodeType: "translation"
|
|
26
|
+
nodeType: NodeType.Translation | "translation";
|
|
27
27
|
} & {
|
|
28
28
|
translation: ContentRecord;
|
|
29
29
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.d.ts","names":[],"sources":["../../../../src/transpiler/translation/translation.ts"],"sourcesContent":[],"mappings":";;;KAOY,8DAGR,oBAAoB,aAAW,oBAAoB,cACnD,eAAe,QAAA,CAAS,aAAa;;AAJzC;;;;;;;;;AAIwD;;;;;;;;;;cAsBlD,WAKkB,EAAA,CAAA,UAAA,OAAA,EAAA,sBAFpB,mBAEoB,CAFA,OAEA,CAAA,GAFW,mBAEX,CAF+B,OAE/B,CAAA,CAAA,CAAA,OAAA,EAAb,aAAa,EAAA,GAAA,cAAA,CAAA,QAAA,CAAA,WAAA,EAAA,aAAA,EAAA;EAAA,QAAA,
|
|
1
|
+
{"version":3,"file":"translation.d.ts","names":[],"sources":["../../../../src/transpiler/translation/translation.ts"],"sourcesContent":[],"mappings":";;;KAOY,8DAGR,oBAAoB,aAAW,oBAAoB,cACnD,eAAe,QAAA,CAAS,aAAa;;AAJzC;;;;;;;;;AAIwD;;;;;;;;;;cAsBlD,WAKkB,EAAA,CAAA,UAAA,OAAA,EAAA,sBAFpB,mBAEoB,CAFA,OAEA,CAAA,GAFW,mBAEX,CAF+B,OAE/B,CAAA,CAAA,CAAA,OAAA,EAAb,aAAa,EAAA,GAAA,cAAA,CAAA,QAAA,CAAA,WAAA,EAAA,aAAA,EAAA;EAAA,QAAA,sBAAA,GAAA,aAAA"}
|