react-intlayer 6.1.6 → 7.0.0-canary.2
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/IntlayerNode.cjs +17 -46
- package/dist/cjs/IntlayerNode.cjs.map +1 -1
- package/dist/cjs/UI/ContentSelector.cjs +96 -128
- package/dist/cjs/UI/ContentSelector.cjs.map +1 -1
- package/dist/cjs/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/cjs/client/IntlayerProvider.cjs +64 -93
- package/dist/cjs/client/IntlayerProvider.cjs.map +1 -1
- package/dist/cjs/client/format/index.cjs +17 -50
- package/dist/cjs/client/format/useCompact.cjs +29 -39
- package/dist/cjs/client/format/useCompact.cjs.map +1 -1
- package/dist/cjs/client/format/useCurrency.cjs +43 -39
- package/dist/cjs/client/format/useCurrency.cjs.map +1 -1
- package/dist/cjs/client/format/useDate.cjs +45 -36
- package/dist/cjs/client/format/useDate.cjs.map +1 -1
- package/dist/cjs/client/format/useList.cjs +40 -39
- package/dist/cjs/client/format/useList.cjs.map +1 -1
- package/dist/cjs/client/format/useNumber.cjs +41 -39
- package/dist/cjs/client/format/useNumber.cjs.map +1 -1
- package/dist/cjs/client/format/usePercentage.cjs +37 -39
- package/dist/cjs/client/format/usePercentage.cjs.map +1 -1
- package/dist/cjs/client/format/useRelativeTime.cjs +37 -39
- package/dist/cjs/client/format/useRelativeTime.cjs.map +1 -1
- package/dist/cjs/client/format/useUnit.cjs +36 -39
- package/dist/cjs/client/format/useUnit.cjs.map +1 -1
- package/dist/cjs/client/index.cjs +31 -72
- package/dist/cjs/client/t.cjs +21 -34
- package/dist/cjs/client/t.cjs.map +1 -1
- package/dist/cjs/client/useDictionary.cjs +26 -36
- package/dist/cjs/client/useDictionary.cjs.map +1 -1
- package/dist/cjs/client/useDictionaryAsync.cjs +23 -52
- package/dist/cjs/client/useDictionaryAsync.cjs.map +1 -1
- package/dist/cjs/client/useDictionaryDynamic.cjs +24 -53
- package/dist/cjs/client/useDictionaryDynamic.cjs.map +1 -1
- package/dist/cjs/client/useI18n.cjs +45 -55
- package/dist/cjs/client/useI18n.cjs.map +1 -1
- package/dist/cjs/client/useIntlayer.cjs +28 -36
- package/dist/cjs/client/useIntlayer.cjs.map +1 -1
- package/dist/cjs/client/useLoadDynamic.cjs +21 -50
- package/dist/cjs/client/useLoadDynamic.cjs.map +1 -1
- package/dist/cjs/client/useLocale.cjs +39 -70
- package/dist/cjs/client/useLocale.cjs.map +1 -1
- package/dist/cjs/client/useLocaleBase.cjs +25 -53
- package/dist/cjs/client/useLocaleBase.cjs.map +1 -1
- package/dist/cjs/client/useLocaleStorage.cjs +63 -0
- package/dist/cjs/client/useLocaleStorage.cjs.map +1 -0
- package/dist/cjs/client/useTraduction.cjs +34 -35
- package/dist/cjs/client/useTraduction.cjs.map +1 -1
- package/dist/cjs/editor/ContentSelectorWrapper.cjs +55 -91
- package/dist/cjs/editor/ContentSelectorWrapper.cjs.map +1 -1
- package/dist/cjs/editor/IntlayerEditorProvider.cjs +45 -92
- package/dist/cjs/editor/IntlayerEditorProvider.cjs.map +1 -1
- package/dist/cjs/editor/index.cjs +3 -23
- package/dist/cjs/editor/useEditedContentRenderer.cjs +40 -59
- package/dist/cjs/editor/useEditedContentRenderer.cjs.map +1 -1
- package/dist/cjs/getDictionary.cjs +15 -40
- package/dist/cjs/getDictionary.cjs.map +1 -1
- package/dist/cjs/getIntlayer.cjs +15 -36
- package/dist/cjs/getIntlayer.cjs.map +1 -1
- package/dist/cjs/index.cjs +33 -75
- package/dist/cjs/markdown/MarkdownProvider.cjs +19 -39
- package/dist/cjs/markdown/MarkdownProvider.cjs.map +1 -1
- package/dist/cjs/markdown/MarkdownRenderer.cjs +39 -80
- package/dist/cjs/markdown/MarkdownRenderer.cjs.map +1 -1
- package/dist/cjs/markdown/index.cjs +7 -25
- package/dist/cjs/plugins.cjs +92 -119
- package/dist/cjs/plugins.cjs.map +1 -1
- package/dist/cjs/reactElement/renderReactElement.cjs +39 -59
- package/dist/cjs/reactElement/renderReactElement.cjs.map +1 -1
- package/dist/cjs/server/IntlayerServerProvider.cjs +33 -53
- package/dist/cjs/server/IntlayerServerProvider.cjs.map +1 -1
- package/dist/cjs/server/format/index.cjs +17 -50
- package/dist/cjs/server/format/useCompact.cjs +25 -35
- package/dist/cjs/server/format/useCompact.cjs.map +1 -1
- package/dist/cjs/server/format/useCurrency.cjs +36 -35
- package/dist/cjs/server/format/useCurrency.cjs.map +1 -1
- package/dist/cjs/server/format/useDate.cjs +41 -35
- package/dist/cjs/server/format/useDate.cjs.map +1 -1
- package/dist/cjs/server/format/useList.cjs +33 -35
- package/dist/cjs/server/format/useList.cjs.map +1 -1
- package/dist/cjs/server/format/useNumber.cjs +37 -35
- package/dist/cjs/server/format/useNumber.cjs.map +1 -1
- package/dist/cjs/server/format/usePercentage.cjs +33 -35
- package/dist/cjs/server/format/usePercentage.cjs.map +1 -1
- package/dist/cjs/server/format/useRelativeTime.cjs +33 -35
- package/dist/cjs/server/format/useRelativeTime.cjs.map +1 -1
- package/dist/cjs/server/format/useUnit.cjs +32 -35
- package/dist/cjs/server/format/useUnit.cjs.map +1 -1
- package/dist/cjs/server/index.cjs +21 -57
- package/dist/cjs/server/serverContext.cjs +40 -71
- package/dist/cjs/server/serverContext.cjs.map +1 -1
- package/dist/cjs/server/t.cjs +33 -33
- package/dist/cjs/server/t.cjs.map +1 -1
- package/dist/cjs/server/useDictionary.cjs +14 -32
- package/dist/cjs/server/useDictionary.cjs.map +1 -1
- package/dist/cjs/server/useDictionaryAsync.cjs +18 -44
- package/dist/cjs/server/useDictionaryAsync.cjs.map +1 -1
- package/dist/cjs/server/useDictionaryDynamic.cjs +19 -48
- package/dist/cjs/server/useDictionaryDynamic.cjs.map +1 -1
- package/dist/cjs/server/useI18n.cjs +35 -47
- package/dist/cjs/server/useI18n.cjs.map +1 -1
- package/dist/cjs/server/useIntlayer.cjs +14 -32
- package/dist/cjs/server/useIntlayer.cjs.map +1 -1
- package/dist/cjs/server/useLoadDynamic.cjs +11 -41
- package/dist/cjs/server/useLoadDynamic.cjs.map +1 -1
- package/dist/cjs/server/useLocale.cjs +21 -43
- package/dist/cjs/server/useLocale.cjs.map +1 -1
- package/dist/esm/IntlayerNode.mjs +13 -23
- package/dist/esm/IntlayerNode.mjs.map +1 -1
- package/dist/esm/UI/ContentSelector.mjs +92 -108
- package/dist/esm/UI/ContentSelector.mjs.map +1 -1
- package/dist/esm/client/IntlayerProvider.mjs +49 -53
- package/dist/esm/client/IntlayerProvider.mjs.map +1 -1
- package/dist/esm/client/format/index.mjs +2 -11
- package/dist/esm/client/format/useCompact.mjs +25 -14
- package/dist/esm/client/format/useCompact.mjs.map +1 -1
- package/dist/esm/client/format/useCurrency.mjs +39 -14
- package/dist/esm/client/format/useCurrency.mjs.map +1 -1
- package/dist/esm/client/format/useDate.mjs +41 -11
- package/dist/esm/client/format/useDate.mjs.map +1 -1
- package/dist/esm/client/format/useList.mjs +36 -14
- package/dist/esm/client/format/useList.mjs.map +1 -1
- package/dist/esm/client/format/useNumber.mjs +37 -14
- package/dist/esm/client/format/useNumber.mjs.map +1 -1
- package/dist/esm/client/format/usePercentage.mjs +33 -14
- package/dist/esm/client/format/usePercentage.mjs.map +1 -1
- package/dist/esm/client/format/useRelativeTime.mjs +33 -14
- package/dist/esm/client/format/useRelativeTime.mjs.map +1 -1
- package/dist/esm/client/format/useUnit.mjs +32 -14
- package/dist/esm/client/format/useUnit.mjs.map +1 -1
- package/dist/esm/client/index.mjs +5 -33
- package/dist/esm/client/t.mjs +17 -9
- package/dist/esm/client/t.mjs.map +1 -1
- package/dist/esm/client/useDictionary.mjs +23 -11
- package/dist/esm/client/useDictionary.mjs.map +1 -1
- package/dist/esm/client/useDictionaryAsync.mjs +18 -16
- package/dist/esm/client/useDictionaryAsync.mjs.map +1 -1
- package/dist/esm/client/useDictionaryDynamic.mjs +18 -16
- package/dist/esm/client/useDictionaryDynamic.mjs.map +1 -1
- package/dist/esm/client/useI18n.mjs +41 -30
- package/dist/esm/client/useI18n.mjs.map +1 -1
- package/dist/esm/client/useIntlayer.mjs +25 -11
- package/dist/esm/client/useIntlayer.mjs.map +1 -1
- package/dist/esm/client/useLoadDynamic.mjs +20 -26
- package/dist/esm/client/useLoadDynamic.mjs.map +1 -1
- package/dist/esm/client/useLocale.mjs +35 -35
- package/dist/esm/client/useLocale.mjs.map +1 -1
- package/dist/esm/client/useLocaleBase.mjs +20 -17
- package/dist/esm/client/useLocaleBase.mjs.map +1 -1
- package/dist/esm/client/useLocaleStorage.mjs +55 -0
- package/dist/esm/client/useLocaleStorage.mjs.map +1 -0
- package/dist/esm/client/useTraduction.mjs +30 -10
- package/dist/esm/client/useTraduction.mjs.map +1 -1
- package/dist/esm/editor/ContentSelectorWrapper.mjs +48 -70
- package/dist/esm/editor/ContentSelectorWrapper.mjs.map +1 -1
- package/dist/esm/editor/IntlayerEditorProvider.mjs +39 -61
- package/dist/esm/editor/IntlayerEditorProvider.mjs.map +1 -1
- package/dist/esm/editor/index.mjs +3 -2
- package/dist/esm/editor/useEditedContentRenderer.mjs +33 -32
- package/dist/esm/editor/useEditedContentRenderer.mjs.map +1 -1
- package/dist/esm/getDictionary.mjs +13 -22
- package/dist/esm/getDictionary.mjs.map +1 -1
- package/dist/esm/getIntlayer.mjs +13 -18
- package/dist/esm/getIntlayer.mjs.map +1 -1
- package/dist/esm/index.mjs +6 -35
- package/dist/esm/markdown/MarkdownProvider.mjs +14 -16
- package/dist/esm/markdown/MarkdownProvider.mjs.map +1 -1
- package/dist/esm/markdown/MarkdownRenderer.mjs +34 -57
- package/dist/esm/markdown/MarkdownRenderer.mjs.map +1 -1
- package/dist/esm/markdown/index.mjs +4 -3
- package/dist/esm/plugins.mjs +82 -92
- package/dist/esm/plugins.mjs.map +1 -1
- package/dist/esm/reactElement/renderReactElement.mjs +36 -34
- package/dist/esm/reactElement/renderReactElement.mjs.map +1 -1
- package/dist/esm/server/IntlayerServerProvider.mjs +22 -11
- package/dist/esm/server/IntlayerServerProvider.mjs.map +1 -1
- package/dist/esm/server/format/index.mjs +2 -11
- package/dist/esm/server/format/useCompact.mjs +22 -10
- package/dist/esm/server/format/useCompact.mjs.map +1 -1
- package/dist/esm/server/format/useCurrency.mjs +33 -10
- package/dist/esm/server/format/useCurrency.mjs.map +1 -1
- package/dist/esm/server/format/useDate.mjs +38 -10
- package/dist/esm/server/format/useDate.mjs.map +1 -1
- package/dist/esm/server/format/useList.mjs +30 -10
- package/dist/esm/server/format/useList.mjs.map +1 -1
- package/dist/esm/server/format/useNumber.mjs +34 -10
- package/dist/esm/server/format/useNumber.mjs.map +1 -1
- package/dist/esm/server/format/usePercentage.mjs +30 -10
- package/dist/esm/server/format/usePercentage.mjs.map +1 -1
- package/dist/esm/server/format/useRelativeTime.mjs +30 -10
- package/dist/esm/server/format/useRelativeTime.mjs.map +1 -1
- package/dist/esm/server/format/useUnit.mjs +29 -10
- package/dist/esm/server/format/useUnit.mjs.map +1 -1
- package/dist/esm/server/index.mjs +4 -20
- package/dist/esm/server/serverContext.mjs +36 -35
- package/dist/esm/server/serverContext.mjs.map +1 -1
- package/dist/esm/server/t.mjs +30 -8
- package/dist/esm/server/t.mjs.map +1 -1
- package/dist/esm/server/useDictionary.mjs +12 -6
- package/dist/esm/server/useDictionary.mjs.map +1 -1
- package/dist/esm/server/useDictionaryAsync.mjs +14 -8
- package/dist/esm/server/useDictionaryAsync.mjs.map +1 -1
- package/dist/esm/server/useDictionaryDynamic.mjs +14 -11
- package/dist/esm/server/useDictionaryDynamic.mjs.map +1 -1
- package/dist/esm/server/useI18n.mjs +33 -21
- package/dist/esm/server/useI18n.mjs.map +1 -1
- package/dist/esm/server/useIntlayer.mjs +12 -6
- package/dist/esm/server/useIntlayer.mjs.map +1 -1
- package/dist/esm/server/useLoadDynamic.mjs +8 -6
- package/dist/esm/server/useLoadDynamic.mjs.map +1 -1
- package/dist/esm/server/useLocale.mjs +18 -8
- package/dist/esm/server/useLocale.mjs.map +1 -1
- package/dist/types/IntlayerNode.d.ts +19 -12
- package/dist/types/IntlayerNode.d.ts.map +1 -1
- package/dist/types/UI/ContentSelector.d.ts +12 -9
- package/dist/types/UI/ContentSelector.d.ts.map +1 -1
- package/dist/types/client/IntlayerProvider.d.ts +21 -15
- package/dist/types/client/IntlayerProvider.d.ts.map +1 -1
- package/dist/types/client/format/index.d.ts +9 -9
- package/dist/types/client/format/useCompact.d.ts +8 -2
- package/dist/types/client/format/useCompact.d.ts.map +1 -1
- package/dist/types/client/format/useCurrency.d.ts +8 -2
- package/dist/types/client/format/useCurrency.d.ts.map +1 -1
- package/dist/types/client/format/useDate.d.ts +7 -2
- package/dist/types/client/format/useDate.d.ts.map +1 -1
- package/dist/types/client/format/useList.d.ts +8 -2
- package/dist/types/client/format/useList.d.ts.map +1 -1
- package/dist/types/client/format/useNumber.d.ts +8 -2
- package/dist/types/client/format/useNumber.d.ts.map +1 -1
- package/dist/types/client/format/usePercentage.d.ts +8 -2
- package/dist/types/client/format/usePercentage.d.ts.map +1 -1
- package/dist/types/client/format/useRelativeTime.d.ts +9 -3
- package/dist/types/client/format/useRelativeTime.d.ts.map +1 -1
- package/dist/types/client/format/useUnit.d.ts +8 -2
- package/dist/types/client/format/useUnit.d.ts.map +1 -1
- package/dist/types/client/index.d.ts +12 -19
- package/dist/types/client/t.d.ts +7 -3
- package/dist/types/client/t.d.ts.map +1 -1
- package/dist/types/client/useDictionary.d.ts +9 -3
- package/dist/types/client/useDictionary.d.ts.map +1 -1
- package/dist/types/client/useDictionaryAsync.d.ts +7 -3
- package/dist/types/client/useDictionaryAsync.d.ts.map +1 -1
- package/dist/types/client/useDictionaryDynamic.d.ts +9 -3
- package/dist/types/client/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/client/useI18n.d.ts +9 -5
- package/dist/types/client/useI18n.d.ts.map +1 -1
- package/dist/types/client/useIntlayer.d.ts +10 -5
- package/dist/types/client/useIntlayer.d.ts.map +1 -1
- package/dist/types/client/useLoadDynamic.d.ts +4 -1
- package/dist/types/client/useLoadDynamic.d.ts.map +1 -1
- package/dist/types/client/useLocale.d.ts +18 -10
- package/dist/types/client/useLocale.d.ts.map +1 -1
- package/dist/types/client/useLocaleBase.d.ts +10 -5
- package/dist/types/client/useLocaleBase.d.ts.map +1 -1
- package/dist/types/client/useLocaleStorage.d.ts +49 -0
- package/dist/types/client/useLocaleStorage.d.ts.map +1 -0
- package/dist/types/client/useTraduction.d.ts +7 -2
- package/dist/types/client/useTraduction.d.ts.map +1 -1
- package/dist/types/editor/ContentSelectorWrapper.d.ts +8 -4
- package/dist/types/editor/ContentSelectorWrapper.d.ts.map +1 -1
- package/dist/types/editor/IntlayerEditorProvider.d.ts +6 -2
- package/dist/types/editor/IntlayerEditorProvider.d.ts.map +1 -1
- package/dist/types/editor/index.d.ts +2 -2
- package/dist/types/editor/useEditedContentRenderer.d.ts +16 -10
- package/dist/types/editor/useEditedContentRenderer.d.ts.map +1 -1
- package/dist/types/getDictionary.d.ts +8 -4
- package/dist/types/getDictionary.d.ts.map +1 -1
- package/dist/types/getIntlayer.d.ts +8 -4
- package/dist/types/getIntlayer.d.ts.map +1 -1
- package/dist/types/index.d.ts +19 -17
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/markdown/MarkdownProvider.d.ts +8 -5
- package/dist/types/markdown/MarkdownProvider.d.ts.map +1 -1
- package/dist/types/markdown/MarkdownRenderer.d.ts +13 -11
- package/dist/types/markdown/MarkdownRenderer.d.ts.map +1 -1
- package/dist/types/markdown/index.d.ts +3 -3
- package/dist/types/plugins.d.ts +33 -27
- package/dist/types/plugins.d.ts.map +1 -1
- package/dist/types/reactElement/renderReactElement.d.ts +7 -2
- package/dist/types/reactElement/renderReactElement.d.ts.map +1 -1
- package/dist/types/server/IntlayerServerProvider.d.ts +25 -19
- package/dist/types/server/IntlayerServerProvider.d.ts.map +1 -1
- package/dist/types/server/format/index.d.ts +9 -9
- package/dist/types/server/format/useCompact.d.ts +7 -2
- package/dist/types/server/format/useCompact.d.ts.map +1 -1
- package/dist/types/server/format/useCurrency.d.ts +7 -2
- package/dist/types/server/format/useCurrency.d.ts.map +1 -1
- package/dist/types/server/format/useDate.d.ts +7 -2
- package/dist/types/server/format/useDate.d.ts.map +1 -1
- package/dist/types/server/format/useList.d.ts +7 -2
- package/dist/types/server/format/useList.d.ts.map +1 -1
- package/dist/types/server/format/useNumber.d.ts +7 -2
- package/dist/types/server/format/useNumber.d.ts.map +1 -1
- package/dist/types/server/format/usePercentage.d.ts +7 -2
- package/dist/types/server/format/usePercentage.d.ts.map +1 -1
- package/dist/types/server/format/useRelativeTime.d.ts +7 -2
- package/dist/types/server/format/useRelativeTime.d.ts.map +1 -1
- package/dist/types/server/format/useUnit.d.ts +7 -2
- package/dist/types/server/format/useUnit.d.ts.map +1 -1
- package/dist/types/server/index.d.ts +10 -10
- package/dist/types/server/serverContext.d.ts +23 -27
- package/dist/types/server/serverContext.d.ts.map +1 -1
- package/dist/types/server/t.d.ts +7 -3
- package/dist/types/server/t.d.ts.map +1 -1
- package/dist/types/server/useDictionary.d.ts +9 -3
- package/dist/types/server/useDictionary.d.ts.map +1 -1
- package/dist/types/server/useDictionaryAsync.d.ts +9 -3
- package/dist/types/server/useDictionaryAsync.d.ts.map +1 -1
- package/dist/types/server/useDictionaryDynamic.d.ts +9 -3
- package/dist/types/server/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/server/useI18n.d.ts +9 -5
- package/dist/types/server/useI18n.d.ts.map +1 -1
- package/dist/types/server/useIntlayer.d.ts +9 -3
- package/dist/types/server/useIntlayer.d.ts.map +1 -1
- package/dist/types/server/useLoadDynamic.d.ts +4 -1
- package/dist/types/server/useLoadDynamic.d.ts.map +1 -1
- package/dist/types/server/useLocale.d.ts +11 -4
- package/dist/types/server/useLocale.d.ts.map +1 -1
- package/package.json +43 -49
- package/LICENSE +0 -202
- package/dist/cjs/client/format/index.cjs.map +0 -1
- package/dist/cjs/client/getBrowserLocale.cjs +0 -173
- package/dist/cjs/client/getBrowserLocale.cjs.map +0 -1
- package/dist/cjs/client/index.cjs.map +0 -1
- package/dist/cjs/client/useLocaleCookie.cjs +0 -60
- package/dist/cjs/client/useLocaleCookie.cjs.map +0 -1
- package/dist/cjs/editor/index.cjs.map +0 -1
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/cjs/markdown/index.cjs.map +0 -1
- package/dist/cjs/server/format/index.cjs.map +0 -1
- package/dist/cjs/server/index.cjs.map +0 -1
- package/dist/esm/client/format/index.mjs.map +0 -1
- package/dist/esm/client/getBrowserLocale.mjs +0 -138
- package/dist/esm/client/getBrowserLocale.mjs.map +0 -1
- package/dist/esm/client/index.mjs.map +0 -1
- package/dist/esm/client/useLocaleCookie.mjs +0 -24
- package/dist/esm/client/useLocaleCookie.mjs.map +0 -1
- package/dist/esm/editor/index.mjs.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/markdown/index.mjs.map +0 -1
- package/dist/esm/server/format/index.mjs.map +0 -1
- package/dist/esm/server/index.mjs.map +0 -1
- package/dist/types/client/format/index.d.ts.map +0 -1
- package/dist/types/client/getBrowserLocale.d.ts +0 -25
- package/dist/types/client/getBrowserLocale.d.ts.map +0 -1
- package/dist/types/client/index.d.ts.map +0 -1
- package/dist/types/client/useLocaleCookie.d.ts +0 -17
- package/dist/types/client/useLocaleCookie.d.ts.map +0 -1
- package/dist/types/editor/index.d.ts.map +0 -1
- package/dist/types/markdown/index.d.ts.map +0 -1
- package/dist/types/server/format/index.d.ts.map +0 -1
- package/dist/types/server/index.d.ts.map +0 -1
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var getBrowserLocale_exports = {};
|
|
30
|
-
__export(getBrowserLocale_exports, {
|
|
31
|
-
LanguageDetector: () => LanguageDetector,
|
|
32
|
-
getBrowserLocale: () => getBrowserLocale
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(getBrowserLocale_exports);
|
|
35
|
-
var import_built = __toESM(require("@intlayer/config/built"));
|
|
36
|
-
var import_client = require("@intlayer/config/client");
|
|
37
|
-
var LanguageDetector = /* @__PURE__ */ ((LanguageDetector2) => {
|
|
38
|
-
LanguageDetector2["Querystring"] = "querystring";
|
|
39
|
-
LanguageDetector2["Cookie"] = "cookie";
|
|
40
|
-
LanguageDetector2["LocalStorage"] = "localStorage";
|
|
41
|
-
LanguageDetector2["SessionStorage"] = "sessionStorage";
|
|
42
|
-
LanguageDetector2["Navigator"] = "navigator";
|
|
43
|
-
LanguageDetector2["HtmlTag"] = "htmlTag";
|
|
44
|
-
return LanguageDetector2;
|
|
45
|
-
})(LanguageDetector || {});
|
|
46
|
-
const getDefaultsOptions = () => {
|
|
47
|
-
const { middleware } = import_built.default;
|
|
48
|
-
return {
|
|
49
|
-
order: [
|
|
50
|
-
"querystring" /* Querystring */,
|
|
51
|
-
"cookie" /* Cookie */,
|
|
52
|
-
"navigator" /* Navigator */,
|
|
53
|
-
"htmlTag" /* HtmlTag */
|
|
54
|
-
],
|
|
55
|
-
lookupQuerystring: "locale",
|
|
56
|
-
lookupCookie: middleware?.cookieName,
|
|
57
|
-
htmlTag: document.documentElement
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
const isLocalStorageAvailable = () => {
|
|
61
|
-
try {
|
|
62
|
-
if (typeof window === "undefined") return false;
|
|
63
|
-
const testKey = "intlayer.translate.boo";
|
|
64
|
-
window.localStorage.setItem(testKey, "foo");
|
|
65
|
-
window.localStorage.removeItem(testKey);
|
|
66
|
-
return true;
|
|
67
|
-
} catch {
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
const isSessionStorageAvailable = () => {
|
|
72
|
-
try {
|
|
73
|
-
if (typeof window === "undefined") return false;
|
|
74
|
-
const testKey = "intlayer.translate.boo";
|
|
75
|
-
window.sessionStorage.setItem(testKey, "foo");
|
|
76
|
-
window.sessionStorage.removeItem(testKey);
|
|
77
|
-
return true;
|
|
78
|
-
} catch {
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const detectLanguage = (order, options) => {
|
|
83
|
-
const detected = {};
|
|
84
|
-
const queryStringDetector = () => {
|
|
85
|
-
if (typeof window === "undefined") return;
|
|
86
|
-
const search = window.location.search || "";
|
|
87
|
-
const params = new URLSearchParams(search);
|
|
88
|
-
const value = params.get(options.lookupQuerystring ?? "");
|
|
89
|
-
if (value) {
|
|
90
|
-
detected["querystring" /* Querystring */] = value;
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
const cookieDetector = () => {
|
|
94
|
-
if (typeof document === "undefined") return;
|
|
95
|
-
const cookies = document.cookie.split(";");
|
|
96
|
-
const cookieName = `${options.lookupCookie ?? ""}=`;
|
|
97
|
-
const cookie = cookies.find((c) => c.trim().startsWith(cookieName));
|
|
98
|
-
if (cookie) {
|
|
99
|
-
const value = cookie.split("=")[1].trim();
|
|
100
|
-
detected["cookie" /* Cookie */] = value;
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
const localStorageDetector = () => {
|
|
104
|
-
if (!isLocalStorageAvailable()) return;
|
|
105
|
-
const value = window.localStorage.getItem(options.lookupLocalStorage ?? "");
|
|
106
|
-
if (value) {
|
|
107
|
-
detected["localStorage" /* LocalStorage */] = value;
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
const sessionStorageDetector = () => {
|
|
111
|
-
if (!isSessionStorageAvailable()) return;
|
|
112
|
-
const value = window.sessionStorage.getItem(
|
|
113
|
-
options.lookupSessionStorage ?? ""
|
|
114
|
-
);
|
|
115
|
-
if (value) {
|
|
116
|
-
detected["sessionStorage" /* SessionStorage */] = value;
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
const navigatorDetector = () => {
|
|
120
|
-
if (typeof navigator === "undefined") return;
|
|
121
|
-
if (navigator.language) {
|
|
122
|
-
detected["navigator" /* Navigator */] = navigator.language;
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
const htmlTagDetector = () => {
|
|
126
|
-
const htmlTag = options.htmlTag;
|
|
127
|
-
if (htmlTag && typeof htmlTag.getAttribute === "function") {
|
|
128
|
-
const lang = htmlTag.getAttribute("lang");
|
|
129
|
-
if (lang) {
|
|
130
|
-
detected["htmlTag" /* HtmlTag */] = lang;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
const detectors = {
|
|
135
|
-
["querystring" /* Querystring */]: queryStringDetector,
|
|
136
|
-
["cookie" /* Cookie */]: cookieDetector,
|
|
137
|
-
["localStorage" /* LocalStorage */]: localStorageDetector,
|
|
138
|
-
["sessionStorage" /* SessionStorage */]: sessionStorageDetector,
|
|
139
|
-
["navigator" /* Navigator */]: navigatorDetector,
|
|
140
|
-
["htmlTag" /* HtmlTag */]: htmlTagDetector
|
|
141
|
-
};
|
|
142
|
-
order.forEach((detectorName) => {
|
|
143
|
-
detectors[detectorName]?.();
|
|
144
|
-
});
|
|
145
|
-
return detected;
|
|
146
|
-
};
|
|
147
|
-
const getFirstAvailableLocale = (locales, order) => {
|
|
148
|
-
const { internationalization } = import_built.default;
|
|
149
|
-
for (const detector of order) {
|
|
150
|
-
const localesArray = [locales[detector]].flat();
|
|
151
|
-
for (const locale of localesArray) {
|
|
152
|
-
if (locale && (internationalization?.locales).includes(locale)) {
|
|
153
|
-
return locale;
|
|
154
|
-
} else if (locale?.includes("-") && (internationalization?.locales).includes(
|
|
155
|
-
locale.split("-")[0]
|
|
156
|
-
)) {
|
|
157
|
-
return locale.split("-")[0];
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
return internationalization?.defaultLocale ?? import_client.Locales.ENGLISH;
|
|
162
|
-
};
|
|
163
|
-
const getBrowserLocale = (userOptions = {}) => {
|
|
164
|
-
const options = { ...getDefaultsOptions(), ...userOptions };
|
|
165
|
-
const locales = detectLanguage(options.order ?? [], options);
|
|
166
|
-
return getFirstAvailableLocale(locales, options.order ?? []);
|
|
167
|
-
};
|
|
168
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
169
|
-
0 && (module.exports = {
|
|
170
|
-
LanguageDetector,
|
|
171
|
-
getBrowserLocale
|
|
172
|
-
});
|
|
173
|
-
//# sourceMappingURL=getBrowserLocale.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/client/getBrowserLocale.tsx"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport { Locales } from '@intlayer/config/client';\n\nexport enum LanguageDetector {\n Querystring = 'querystring',\n Cookie = 'cookie',\n LocalStorage = 'localStorage',\n SessionStorage = 'sessionStorage',\n Navigator = 'navigator',\n HtmlTag = 'htmlTag',\n}\n\n// Default settings for the language detector\ntype LanguageDetectorOptions = {\n order?: LanguageDetector[];\n lookupQuerystring?: string;\n lookupCookie?: string;\n lookupLocalStorage?: string;\n lookupSessionStorage?: string;\n excludeCacheFor?: string[];\n htmlTag?: HTMLElement | null;\n};\n\nconst getDefaultsOptions = (): LanguageDetectorOptions => {\n const { middleware } = configuration;\n\n return {\n order: [\n LanguageDetector.Querystring,\n LanguageDetector.Cookie,\n LanguageDetector.Navigator,\n LanguageDetector.HtmlTag,\n ],\n lookupQuerystring: 'locale',\n lookupCookie: middleware?.cookieName,\n htmlTag: document.documentElement,\n };\n};\n\n// Helper functions for various checks and operations\nconst isLocalStorageAvailable = (): boolean => {\n try {\n if (typeof window === 'undefined') return false;\n const testKey = 'intlayer.translate.boo';\n window.localStorage.setItem(testKey, 'foo');\n window.localStorage.removeItem(testKey);\n return true;\n } catch {\n return false;\n }\n};\n\nconst isSessionStorageAvailable = (): boolean => {\n try {\n if (typeof window === 'undefined') return false;\n const testKey = 'intlayer.translate.boo';\n window.sessionStorage.setItem(testKey, 'foo');\n window.sessionStorage.removeItem(testKey);\n return true;\n } catch {\n return false;\n }\n};\n\n// Function to detect language using different detectors\nconst detectLanguage = (\n order: string[],\n options: LanguageDetectorOptions\n): Record<LanguageDetector, Locales | Locales[]> => {\n const detected: Record<LanguageDetector, Locales | Locales[]> = {} as Record<\n LanguageDetector,\n Locales | Locales[]\n >;\n\n const queryStringDetector = () => {\n if (typeof window === 'undefined') return;\n const search = window.location.search || '';\n const params = new URLSearchParams(search);\n const value = params.get(options.lookupQuerystring ?? '');\n if (value) {\n detected[LanguageDetector.Querystring] = value as Locales;\n }\n };\n\n const cookieDetector = () => {\n if (typeof document === 'undefined') return;\n const cookies = document.cookie.split(';');\n const cookieName = `${options.lookupCookie ?? ''}=`;\n const cookie = cookies.find((c) => c.trim().startsWith(cookieName));\n if (cookie) {\n const value = cookie.split('=')[1].trim();\n\n detected[LanguageDetector.Cookie] = value as Locales;\n }\n };\n\n const localStorageDetector = () => {\n if (!isLocalStorageAvailable()) return;\n const value = window.localStorage.getItem(options.lookupLocalStorage ?? '');\n if (value) {\n detected[LanguageDetector.LocalStorage] = value as Locales;\n }\n };\n\n const sessionStorageDetector = () => {\n if (!isSessionStorageAvailable()) return;\n const value = window.sessionStorage.getItem(\n options.lookupSessionStorage ?? ''\n );\n if (value) {\n detected[LanguageDetector.SessionStorage] = value as Locales;\n }\n };\n\n const navigatorDetector = () => {\n if (typeof navigator === 'undefined') return;\n\n if (navigator.language) {\n detected[LanguageDetector.Navigator] = navigator.language as Locales;\n }\n };\n\n const htmlTagDetector = () => {\n const htmlTag = options.htmlTag;\n if (htmlTag && typeof htmlTag.getAttribute === 'function') {\n const lang = htmlTag.getAttribute('lang');\n if (lang) {\n detected[LanguageDetector.HtmlTag] = lang as Locales;\n }\n }\n };\n\n // Map detector names to their corresponding functions\n const detectors: Record<string, () => void> = {\n [LanguageDetector.Querystring]: queryStringDetector,\n [LanguageDetector.Cookie]: cookieDetector,\n [LanguageDetector.LocalStorage]: localStorageDetector,\n [LanguageDetector.SessionStorage]: sessionStorageDetector,\n [LanguageDetector.Navigator]: navigatorDetector,\n [LanguageDetector.HtmlTag]: htmlTagDetector,\n };\n\n // Use the provided order to run each detector\n order.forEach((detectorName) => {\n detectors[detectorName]?.();\n });\n\n return detected;\n};\n\nconst getFirstAvailableLocale = (\n locales: Record<LanguageDetector, Locales | Locales[]>,\n order: LanguageDetector[]\n): Locales => {\n const { internationalization } = configuration;\n\n for (const detector of order) {\n const localesArray = [locales[detector]].flat();\n\n for (const locale of localesArray) {\n if (locale && (internationalization?.locales).includes(locale)) {\n return locale;\n } else if (\n locale?.includes('-') &&\n (internationalization?.locales).includes(\n locale.split('-')[0] as Locales\n )\n ) {\n return locale.split('-')[0] as Locales;\n }\n }\n }\n\n return internationalization?.defaultLocale ?? Locales.ENGLISH;\n};\n\n/**\n * Core language detector function\n * const detectedLanguages = detectLanguage(['LanguageDetector.Cookie', 'LanguageDetector.LocalStorage'], { lookupCookie: 'myCookie' });\n */\nexport const getBrowserLocale = (\n userOptions: LanguageDetectorOptions | undefined = {}\n): Locales => {\n const options = { ...getDefaultsOptions(), ...userOptions };\n\n const locales = detectLanguage(options.order ?? [], options);\n\n return getFirstAvailableLocale(locales, options.order ?? []);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0B;AAC1B,oBAAwB;AAEjB,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,iBAAc;AACd,EAAAA,kBAAA,YAAS;AACT,EAAAA,kBAAA,kBAAe;AACf,EAAAA,kBAAA,oBAAiB;AACjB,EAAAA,kBAAA,eAAY;AACZ,EAAAA,kBAAA,aAAU;AANA,SAAAA;AAAA,GAAA;AAoBZ,MAAM,qBAAqB,MAA+B;AACxD,QAAM,EAAE,WAAW,IAAI,aAAAC;AAEvB,SAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,IACnB,cAAc,YAAY;AAAA,IAC1B,SAAS,SAAS;AAAA,EACpB;AACF;AAGA,MAAM,0BAA0B,MAAe;AAC7C,MAAI;AACF,QAAI,OAAO,WAAW,YAAa,QAAO;AAC1C,UAAM,UAAU;AAChB,WAAO,aAAa,QAAQ,SAAS,KAAK;AAC1C,WAAO,aAAa,WAAW,OAAO;AACtC,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,MAAM,4BAA4B,MAAe;AAC/C,MAAI;AACF,QAAI,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mB,GAAG,GAAG,YAAY;AAE1D,QAAM,UAAU,eAAe,QAAQ,SAAS,CAAC,GAAG,OAAO;AAE3D,SAAO,wBAAwB,SAAS,QAAQ,SAAS,CAAC,CAAC;AAC7D;","names":["LanguageDetector","configuration"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/client/index.ts"],"sourcesContent":["/**\n * Client-side exports for internal package use.\n *\n * Note: This file is used by other packages that import from 'react-intlayer/client'.\n * The main package index.ts imports directly from individual files to avoid circular dependencies.\n */\n\nexport { getBrowserLocale } from './getBrowserLocale';\nexport {\n IntlayerClientContext,\n IntlayerProvider,\n IntlayerProviderContent,\n useIntlayerContext,\n type IntlayerProviderProps,\n} from './IntlayerProvider';\nexport { t } from './t';\nexport { useDictionary } from './useDictionary';\nexport { useDictionaryAsync } from './useDictionaryAsync';\nexport { useDictionaryDynamic } from './useDictionaryDynamic';\nexport { useI18n } from './useI18n';\nexport { useIntlayer } from './useIntlayer';\nexport { useLoadDynamic } from './useLoadDynamic';\nexport { useLocale } from './useLocale';\nexport { useLocaleBase } from './useLocaleBase';\nexport {\n localeCookie,\n setLocaleCookie,\n useLocaleCookie,\n} from './useLocaleCookie';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,8BAAiC;AACjC,8BAMO;AACP,eAAkB;AAClB,2BAA8B;AAC9B,gCAAmC;AACnC,kCAAqC;AACrC,qBAAwB;AACxB,yBAA4B;AAC5B,4BAA+B;AAC/B,uBAA0B;AAC1B,2BAA8B;AAC9B,6BAIO;","names":[]}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var useLocaleCookie_exports = {};
|
|
30
|
-
__export(useLocaleCookie_exports, {
|
|
31
|
-
localeCookie: () => localeCookie,
|
|
32
|
-
setLocaleCookie: () => setLocaleCookie,
|
|
33
|
-
useLocaleCookie: () => useLocaleCookie
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(useLocaleCookie_exports);
|
|
36
|
-
var import_built = __toESM(require("@intlayer/config/built"));
|
|
37
|
-
var import_js_cookie = __toESM(require("js-cookie"));
|
|
38
|
-
const { cookieName } = import_built.default.middleware;
|
|
39
|
-
const cookieAttributes = {
|
|
40
|
-
path: "/",
|
|
41
|
-
expires: void 0,
|
|
42
|
-
domain: void 0,
|
|
43
|
-
secure: false,
|
|
44
|
-
sameSite: "strict"
|
|
45
|
-
};
|
|
46
|
-
const localeCookie = import_js_cookie.default.get(cookieName);
|
|
47
|
-
const setLocaleCookie = (locale) => {
|
|
48
|
-
import_js_cookie.default.set(cookieName, locale, cookieAttributes);
|
|
49
|
-
};
|
|
50
|
-
const useLocaleCookie = () => ({
|
|
51
|
-
localeCookie,
|
|
52
|
-
setLocaleCookie
|
|
53
|
-
});
|
|
54
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
-
0 && (module.exports = {
|
|
56
|
-
localeCookie,
|
|
57
|
-
setLocaleCookie,
|
|
58
|
-
useLocaleCookie
|
|
59
|
-
});
|
|
60
|
-
//# sourceMappingURL=useLocaleCookie.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/client/useLocaleCookie.ts"],"sourcesContent":["import type { LocalesValues } from '@intlayer/config/client';\nimport configuration from '@intlayer/config/built';\n\nimport Cookies from 'js-cookie';\n\nconst { cookieName } = configuration.middleware;\n\nconst cookieAttributes: Cookies.CookieAttributes = {\n path: '/',\n expires: undefined,\n domain: undefined,\n secure: false,\n sameSite: 'strict',\n};\n\n/**\n * Get the locale cookie\n */\nexport const localeCookie = Cookies.get(cookieName) as unknown as\n | LocalesValues\n | undefined;\n\n/**\n * Set the locale cookie\n */\nexport const setLocaleCookie = (locale: LocalesValues) => {\n Cookies.set(cookieName, locale, cookieAttributes);\n};\n\n/**\n * Hook that provides the locale cookie and a function to set it\n */\nexport const useLocaleCookie = () => ({\n localeCookie,\n setLocaleCookie,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAA0B;AAE1B,uBAAoB;AAEpB,MAAM,EAAE,WAAW,IAAI,aAAAA,QAAc;AAErC,MAAM,mBAA6C;AAAA,EACjD,MAAM;AAAA,EACN,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AACZ;AAKO,MAAM,eAAe,iBAAAC,QAAQ,IAAI,UAAU;AAO3C,MAAM,kBAAkB,CAAC,WAA0B;AACxD,mBAAAA,QAAQ,IAAI,YAAY,QAAQ,gBAAgB;AAClD;AAKO,MAAM,kBAAkB,OAAO;AAAA,EACpC;AAAA,EACA;AACF;","names":["configuration","Cookies"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/editor/index.ts"],"sourcesContent":["export * from './ContentSelectorWrapper';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAc,qCAAd;","names":[]}
|
package/dist/cjs/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import type { IInterpreterPluginReact } from './plugins';\n\ndeclare module '@intlayer/core' {\n interface IInterpreterPlugin<T, S> extends IInterpreterPluginReact<T> {}\n}\n\n// Import directly from individual files to avoid circular dependency issues\nexport { getBrowserLocale } from './client/getBrowserLocale';\nexport {\n IntlayerClientContext,\n IntlayerProvider,\n IntlayerProviderContent,\n useIntlayerContext,\n type IntlayerProviderProps,\n} from './client/IntlayerProvider';\nexport { t } from './client/t';\nexport { useDictionary } from './client/useDictionary';\nexport { useDictionaryAsync } from './client/useDictionaryAsync';\nexport { useDictionaryDynamic } from './client/useDictionaryDynamic';\nexport { useI18n } from './client/useI18n';\nexport { useIntlayer } from './client/useIntlayer';\nexport { useLoadDynamic } from './client/useLoadDynamic';\nexport { useLocale } from './client/useLocale';\nexport { useLocaleBase } from './client/useLocaleBase';\nexport {\n localeCookie,\n setLocaleCookie,\n useLocaleCookie,\n} from './client/useLocaleCookie';\n\nexport { type IntlayerNode } from './IntlayerNode';\nexport { MarkdownProvider } from './markdown/index';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,8BAAiC;AACjC,8BAMO;AACP,eAAkB;AAClB,2BAA8B;AAC9B,gCAAmC;AACnC,kCAAqC;AACrC,qBAAwB;AACxB,yBAA4B;AAC5B,4BAA+B;AAC/B,uBAA0B;AAC1B,2BAA8B;AAC9B,6BAIO;AAGP,sBAAiC;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/markdown/index.ts"],"sourcesContent":["export * from './MarkdownProvider';\nexport * from './MarkdownRenderer';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,6BAAc,+BAAd;AACA,6BAAc,+BADd;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/server/format/index.ts"],"sourcesContent":["export { useCompact } from './useCompact';\nexport { useCurrency } from './useCurrency';\nexport { useDate } from './useDate';\nexport { useList } from './useList';\nexport { useNumber } from './useNumber';\nexport { usePercentage } from './usePercentage';\nexport { useRelativeTime } from './useRelativeTime';\nexport { useUnit } from './useUnit';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA2B;AAC3B,yBAA4B;AAC5B,qBAAwB;AACxB,qBAAwB;AACxB,uBAA0B;AAC1B,2BAA8B;AAC9B,6BAAgC;AAChC,qBAAwB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/server/index.ts"],"sourcesContent":["export {\n IntlayerServerContext as IntlayerServer,\n IntlayerServerProvider,\n locale,\n} from './IntlayerServerProvider';\nexport { t } from './t';\nexport { useDictionary } from './useDictionary';\nexport { useDictionaryAsync } from './useDictionaryAsync';\nexport { useDictionaryDynamic } from './useDictionaryDynamic';\nexport { useI18n } from './useI18n';\nexport { useIntlayer } from './useIntlayer';\nexport { useLoadDynamic } from './useLoadDynamic';\nexport { useLocale } from './useLocale';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oCAIO;AACP,eAAkB;AAClB,2BAA8B;AAC9B,gCAAmC;AACnC,kCAAqC;AACrC,qBAAwB;AACxB,yBAA4B;AAC5B,4BAA+B;AAC/B,uBAA0B;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/client/format/index.ts"],"sourcesContent":["export { useCompact } from './useCompact';\nexport { useCurrency } from './useCurrency';\nexport { useDate } from './useDate';\nexport { useList } from './useList';\nexport { useNumber } from './useNumber';\nexport { usePercentage } from './usePercentage';\nexport { useRelativeTime } from './useRelativeTime';\nexport { useUnit } from './useUnit';\n"],"mappings":"AAAA,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAC5B,SAAS,eAAe;AACxB,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,eAAe;","names":[]}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import configuration from "@intlayer/config/built";
|
|
2
|
-
import { Locales } from "@intlayer/config/client";
|
|
3
|
-
var LanguageDetector = /* @__PURE__ */ ((LanguageDetector2) => {
|
|
4
|
-
LanguageDetector2["Querystring"] = "querystring";
|
|
5
|
-
LanguageDetector2["Cookie"] = "cookie";
|
|
6
|
-
LanguageDetector2["LocalStorage"] = "localStorage";
|
|
7
|
-
LanguageDetector2["SessionStorage"] = "sessionStorage";
|
|
8
|
-
LanguageDetector2["Navigator"] = "navigator";
|
|
9
|
-
LanguageDetector2["HtmlTag"] = "htmlTag";
|
|
10
|
-
return LanguageDetector2;
|
|
11
|
-
})(LanguageDetector || {});
|
|
12
|
-
const getDefaultsOptions = () => {
|
|
13
|
-
const { middleware } = configuration;
|
|
14
|
-
return {
|
|
15
|
-
order: [
|
|
16
|
-
"querystring" /* Querystring */,
|
|
17
|
-
"cookie" /* Cookie */,
|
|
18
|
-
"navigator" /* Navigator */,
|
|
19
|
-
"htmlTag" /* HtmlTag */
|
|
20
|
-
],
|
|
21
|
-
lookupQuerystring: "locale",
|
|
22
|
-
lookupCookie: middleware?.cookieName,
|
|
23
|
-
htmlTag: document.documentElement
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
const isLocalStorageAvailable = () => {
|
|
27
|
-
try {
|
|
28
|
-
if (typeof window === "undefined") return false;
|
|
29
|
-
const testKey = "intlayer.translate.boo";
|
|
30
|
-
window.localStorage.setItem(testKey, "foo");
|
|
31
|
-
window.localStorage.removeItem(testKey);
|
|
32
|
-
return true;
|
|
33
|
-
} catch {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
const isSessionStorageAvailable = () => {
|
|
38
|
-
try {
|
|
39
|
-
if (typeof window === "undefined") return false;
|
|
40
|
-
const testKey = "intlayer.translate.boo";
|
|
41
|
-
window.sessionStorage.setItem(testKey, "foo");
|
|
42
|
-
window.sessionStorage.removeItem(testKey);
|
|
43
|
-
return true;
|
|
44
|
-
} catch {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
const detectLanguage = (order, options) => {
|
|
49
|
-
const detected = {};
|
|
50
|
-
const queryStringDetector = () => {
|
|
51
|
-
if (typeof window === "undefined") return;
|
|
52
|
-
const search = window.location.search || "";
|
|
53
|
-
const params = new URLSearchParams(search);
|
|
54
|
-
const value = params.get(options.lookupQuerystring ?? "");
|
|
55
|
-
if (value) {
|
|
56
|
-
detected["querystring" /* Querystring */] = value;
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
const cookieDetector = () => {
|
|
60
|
-
if (typeof document === "undefined") return;
|
|
61
|
-
const cookies = document.cookie.split(";");
|
|
62
|
-
const cookieName = `${options.lookupCookie ?? ""}=`;
|
|
63
|
-
const cookie = cookies.find((c) => c.trim().startsWith(cookieName));
|
|
64
|
-
if (cookie) {
|
|
65
|
-
const value = cookie.split("=")[1].trim();
|
|
66
|
-
detected["cookie" /* Cookie */] = value;
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
const localStorageDetector = () => {
|
|
70
|
-
if (!isLocalStorageAvailable()) return;
|
|
71
|
-
const value = window.localStorage.getItem(options.lookupLocalStorage ?? "");
|
|
72
|
-
if (value) {
|
|
73
|
-
detected["localStorage" /* LocalStorage */] = value;
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
const sessionStorageDetector = () => {
|
|
77
|
-
if (!isSessionStorageAvailable()) return;
|
|
78
|
-
const value = window.sessionStorage.getItem(
|
|
79
|
-
options.lookupSessionStorage ?? ""
|
|
80
|
-
);
|
|
81
|
-
if (value) {
|
|
82
|
-
detected["sessionStorage" /* SessionStorage */] = value;
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
const navigatorDetector = () => {
|
|
86
|
-
if (typeof navigator === "undefined") return;
|
|
87
|
-
if (navigator.language) {
|
|
88
|
-
detected["navigator" /* Navigator */] = navigator.language;
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
const htmlTagDetector = () => {
|
|
92
|
-
const htmlTag = options.htmlTag;
|
|
93
|
-
if (htmlTag && typeof htmlTag.getAttribute === "function") {
|
|
94
|
-
const lang = htmlTag.getAttribute("lang");
|
|
95
|
-
if (lang) {
|
|
96
|
-
detected["htmlTag" /* HtmlTag */] = lang;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
const detectors = {
|
|
101
|
-
["querystring" /* Querystring */]: queryStringDetector,
|
|
102
|
-
["cookie" /* Cookie */]: cookieDetector,
|
|
103
|
-
["localStorage" /* LocalStorage */]: localStorageDetector,
|
|
104
|
-
["sessionStorage" /* SessionStorage */]: sessionStorageDetector,
|
|
105
|
-
["navigator" /* Navigator */]: navigatorDetector,
|
|
106
|
-
["htmlTag" /* HtmlTag */]: htmlTagDetector
|
|
107
|
-
};
|
|
108
|
-
order.forEach((detectorName) => {
|
|
109
|
-
detectors[detectorName]?.();
|
|
110
|
-
});
|
|
111
|
-
return detected;
|
|
112
|
-
};
|
|
113
|
-
const getFirstAvailableLocale = (locales, order) => {
|
|
114
|
-
const { internationalization } = configuration;
|
|
115
|
-
for (const detector of order) {
|
|
116
|
-
const localesArray = [locales[detector]].flat();
|
|
117
|
-
for (const locale of localesArray) {
|
|
118
|
-
if (locale && (internationalization?.locales).includes(locale)) {
|
|
119
|
-
return locale;
|
|
120
|
-
} else if (locale?.includes("-") && (internationalization?.locales).includes(
|
|
121
|
-
locale.split("-")[0]
|
|
122
|
-
)) {
|
|
123
|
-
return locale.split("-")[0];
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return internationalization?.defaultLocale ?? Locales.ENGLISH;
|
|
128
|
-
};
|
|
129
|
-
const getBrowserLocale = (userOptions = {}) => {
|
|
130
|
-
const options = { ...getDefaultsOptions(), ...userOptions };
|
|
131
|
-
const locales = detectLanguage(options.order ?? [], options);
|
|
132
|
-
return getFirstAvailableLocale(locales, options.order ?? []);
|
|
133
|
-
};
|
|
134
|
-
export {
|
|
135
|
-
LanguageDetector,
|
|
136
|
-
getBrowserLocale
|
|
137
|
-
};
|
|
138
|
-
//# sourceMappingURL=getBrowserLocale.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/client/getBrowserLocale.tsx"],"sourcesContent":["import configuration from '@intlayer/config/built';\nimport { Locales } from '@intlayer/config/client';\n\nexport enum LanguageDetector {\n Querystring = 'querystring',\n Cookie = 'cookie',\n LocalStorage = 'localStorage',\n SessionStorage = 'sessionStorage',\n Navigator = 'navigator',\n HtmlTag = 'htmlTag',\n}\n\n// Default settings for the language detector\ntype LanguageDetectorOptions = {\n order?: LanguageDetector[];\n lookupQuerystring?: string;\n lookupCookie?: string;\n lookupLocalStorage?: string;\n lookupSessionStorage?: string;\n excludeCacheFor?: string[];\n htmlTag?: HTMLElement | null;\n};\n\nconst getDefaultsOptions = (): LanguageDetectorOptions => {\n const { middleware } = configuration;\n\n return {\n order: [\n LanguageDetector.Querystring,\n LanguageDetector.Cookie,\n LanguageDetector.Navigator,\n LanguageDetector.HtmlTag,\n ],\n lookupQuerystring: 'locale',\n lookupCookie: middleware?.cookieName,\n htmlTag: document.documentElement,\n };\n};\n\n// Helper functions for various checks and operations\nconst isLocalStorageAvailable = (): boolean => {\n try {\n if (typeof window === 'undefined') return false;\n const testKey = 'intlayer.translate.boo';\n window.localStorage.setItem(testKey, 'foo');\n window.localStorage.removeItem(testKey);\n return true;\n } catch {\n return false;\n }\n};\n\nconst isSessionStorageAvailable = (): boolean => {\n try {\n if (typeof window === 'undefined') return false;\n const testKey = 'intlayer.translate.boo';\n window.sessionStorage.setItem(testKey, 'foo');\n window.sessionStorage.removeItem(testKey);\n return true;\n } catch {\n return false;\n }\n};\n\n// Function to detect language using different detectors\nconst detectLanguage = (\n order: string[],\n options: LanguageDetectorOptions\n): Record<LanguageDetector, Locales | Locales[]> => {\n const detected: Record<LanguageDetector, Locales | Locales[]> = {} as Record<\n LanguageDetector,\n Locales | Locales[]\n >;\n\n const queryStringDetector = () => {\n if (typeof window === 'undefined') return;\n const search = window.location.search || '';\n const params = new URLSearchParams(search);\n const value = params.get(options.lookupQuerystring ?? '');\n if (value) {\n detected[LanguageDetector.Querystring] = value as Locales;\n }\n };\n\n const cookieDetector = () => {\n if (typeof document === 'undefined') return;\n const cookies = document.cookie.split(';');\n const cookieName = `${options.lookupCookie ?? ''}=`;\n const cookie = cookies.find((c) => c.trim().startsWith(cookieName));\n if (cookie) {\n const value = cookie.split('=')[1].trim();\n\n detected[LanguageDetector.Cookie] = value as Locales;\n }\n };\n\n const localStorageDetector = () => {\n if (!isLocalStorageAvailable()) return;\n const value = window.localStorage.getItem(options.lookupLocalStorage ?? '');\n if (value) {\n detected[LanguageDetector.LocalStorage] = value as Locales;\n }\n };\n\n const sessionStorageDetector = () => {\n if (!isSessionStorageAvailable()) return;\n const value = window.sessionStorage.getItem(\n options.lookupSessionStorage ?? ''\n );\n if (value) {\n detected[LanguageDetector.SessionStorage] = value as Locales;\n }\n };\n\n const navigatorDetector = () => {\n if (typeof navigator === 'undefined') return;\n\n if (navigator.language) {\n detected[LanguageDetector.Navigator] = navigator.language as Locales;\n }\n };\n\n const htmlTagDetector = () => {\n const htmlTag = options.htmlTag;\n if (htmlTag && typeof htmlTag.getAttribute === 'function') {\n const lang = htmlTag.getAttribute('lang');\n if (lang) {\n detected[LanguageDetector.HtmlTag] = lang as Locales;\n }\n }\n };\n\n // Map detector names to their corresponding functions\n const detectors: Record<string, () => void> = {\n [LanguageDetector.Querystring]: queryStringDetector,\n [LanguageDetector.Cookie]: cookieDetector,\n [LanguageDetector.LocalStorage]: localStorageDetector,\n [LanguageDetector.SessionStorage]: sessionStorageDetector,\n [LanguageDetector.Navigator]: navigatorDetector,\n [LanguageDetector.HtmlTag]: htmlTagDetector,\n };\n\n // Use the provided order to run each detector\n order.forEach((detectorName) => {\n detectors[detectorName]?.();\n });\n\n return detected;\n};\n\nconst getFirstAvailableLocale = (\n locales: Record<LanguageDetector, Locales | Locales[]>,\n order: LanguageDetector[]\n): Locales => {\n const { internationalization } = configuration;\n\n for (const detector of order) {\n const localesArray = [locales[detector]].flat();\n\n for (const locale of localesArray) {\n if (locale && (internationalization?.locales).includes(locale)) {\n return locale;\n } else if (\n locale?.includes('-') &&\n (internationalization?.locales).includes(\n locale.split('-')[0] as Locales\n )\n ) {\n return locale.split('-')[0] as Locales;\n }\n }\n }\n\n return internationalization?.defaultLocale ?? Locales.ENGLISH;\n};\n\n/**\n * Core language detector function\n * const detectedLanguages = detectLanguage(['LanguageDetector.Cookie', 'LanguageDetector.LocalStorage'], { lookupCookie: 'myCookie' });\n */\nexport const getBrowserLocale = (\n userOptions: LanguageDetectorOptions | undefined = {}\n): Locales => {\n const options = { ...getDefaultsOptions(), ...userOptions };\n\n const locales = detectLanguage(options.order ?? [], options);\n\n return getFirstAvailableLocale(locales, options.order ?? []);\n};\n"],"mappings":"AAAA,OAAO,mBAAmB;AAC1B,SAAS,eAAe;AAEjB,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,iBAAc;AACd,EAAAA,kBAAA,YAAS;AACT,EAAAA,kBAAA,kBAAe;AACf,EAAAA,kBAAA,oBAAiB;AACjB,EAAAA,kBAAA,eAAY;AACZ,EAAAA,kBAAA,aAAU;AANA,SAAAA;AAAA,GAAA;AAoBZ,MAAM,qBAAqB,MAA+B;AACxD,QAAM,EAAE,WAAW,IAAI;AAEvB,SAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,IACnB,cAAc,YAAY;AAAA,IAC1B,SAAS,SAAS;AAAA,EACpB;AACF;AAGA,MAAM,0BAA0B,MAAe;AAC7C,MAAI;AACF,QAAI,OAAO,WAAW,YAAa,QAAO;AAC1C,UAAM,UAAU;AAChB,WAAO,aAAa,QAAQ,SAAS,KAAK;AAC1C,WAAO,aAAa,WAAW,OAAO;AACtC,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,MAAM,4BAA4B,MAAe;AAC/C,MAAI;AACF,QAAI,OAAO,WAAW,YAAa,QAAO;AAC1C,UAAM,UAAU;AAChB,WAAO,eAAe,QAAQ,SAAS,KAAK;AAC5C,WAAO,eAAe,WAAW,OAAO;AACxC,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAGA,MAAM,iBAAiB,CACrB,OACA,YACkD;AAClD,QAAM,WAA0D,CAAC;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client-side exports for internal package use.\n *\n * Note: This file is used by other packages that import from 'react-intlayer/client'.\n * The main package index.ts imports directly from individual files to avoid circular dependencies.\n */\n\nexport { getBrowserLocale } from './getBrowserLocale';\nexport {\n IntlayerClientContext,\n IntlayerProvider,\n IntlayerProviderContent,\n useIntlayerContext,\n type IntlayerProviderProps,\n} from './IntlayerProvider';\nexport { t } from './t';\nexport { useDictionary } from './useDictionary';\nexport { useDictionaryAsync } from './useDictionaryAsync';\nexport { useDictionaryDynamic } from './useDictionaryDynamic';\nexport { useI18n } from './useI18n';\nexport { useIntlayer } from './useIntlayer';\nexport { useLoadDynamic } from './useLoadDynamic';\nexport { useLocale } from './useLocale';\nexport { useLocaleBase } from './useLocaleBase';\nexport {\n localeCookie,\n setLocaleCookie,\n useLocaleCookie,\n} from './useLocaleCookie';\n"],"mappings":"AAOA,SAAS,wBAAwB;AACjC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,SAAS;AAClB,SAAS,qBAAqB;AAC9B,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AACrC,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import configuration from "@intlayer/config/built";
|
|
2
|
-
import Cookies from "js-cookie";
|
|
3
|
-
const { cookieName } = configuration.middleware;
|
|
4
|
-
const cookieAttributes = {
|
|
5
|
-
path: "/",
|
|
6
|
-
expires: void 0,
|
|
7
|
-
domain: void 0,
|
|
8
|
-
secure: false,
|
|
9
|
-
sameSite: "strict"
|
|
10
|
-
};
|
|
11
|
-
const localeCookie = Cookies.get(cookieName);
|
|
12
|
-
const setLocaleCookie = (locale) => {
|
|
13
|
-
Cookies.set(cookieName, locale, cookieAttributes);
|
|
14
|
-
};
|
|
15
|
-
const useLocaleCookie = () => ({
|
|
16
|
-
localeCookie,
|
|
17
|
-
setLocaleCookie
|
|
18
|
-
});
|
|
19
|
-
export {
|
|
20
|
-
localeCookie,
|
|
21
|
-
setLocaleCookie,
|
|
22
|
-
useLocaleCookie
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=useLocaleCookie.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/client/useLocaleCookie.ts"],"sourcesContent":["import type { LocalesValues } from '@intlayer/config/client';\nimport configuration from '@intlayer/config/built';\n\nimport Cookies from 'js-cookie';\n\nconst { cookieName } = configuration.middleware;\n\nconst cookieAttributes: Cookies.CookieAttributes = {\n path: '/',\n expires: undefined,\n domain: undefined,\n secure: false,\n sameSite: 'strict',\n};\n\n/**\n * Get the locale cookie\n */\nexport const localeCookie = Cookies.get(cookieName) as unknown as\n | LocalesValues\n | undefined;\n\n/**\n * Set the locale cookie\n */\nexport const setLocaleCookie = (locale: LocalesValues) => {\n Cookies.set(cookieName, locale, cookieAttributes);\n};\n\n/**\n * Hook that provides the locale cookie and a function to set it\n */\nexport const useLocaleCookie = () => ({\n localeCookie,\n setLocaleCookie,\n});\n"],"mappings":"AACA,OAAO,mBAAmB;AAE1B,OAAO,aAAa;AAEpB,MAAM,EAAE,WAAW,IAAI,cAAc;AAErC,MAAM,mBAA6C;AAAA,EACjD,MAAM;AAAA,EACN,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AACZ;AAKO,MAAM,eAAe,QAAQ,IAAI,UAAU;AAO3C,MAAM,kBAAkB,CAAC,WAA0B;AACxD,UAAQ,IAAI,YAAY,QAAQ,gBAAgB;AAClD;AAKO,MAAM,kBAAkB,OAAO;AAAA,EACpC;AAAA,EACA;AACF;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/editor/index.ts"],"sourcesContent":["export * from './ContentSelectorWrapper';\n"],"mappings":"AAAA,cAAc;","names":[]}
|
package/dist/esm/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import type { IInterpreterPluginReact } from './plugins';\n\ndeclare module '@intlayer/core' {\n interface IInterpreterPlugin<T, S> extends IInterpreterPluginReact<T> {}\n}\n\n// Import directly from individual files to avoid circular dependency issues\nexport { getBrowserLocale } from './client/getBrowserLocale';\nexport {\n IntlayerClientContext,\n IntlayerProvider,\n IntlayerProviderContent,\n useIntlayerContext,\n type IntlayerProviderProps,\n} from './client/IntlayerProvider';\nexport { t } from './client/t';\nexport { useDictionary } from './client/useDictionary';\nexport { useDictionaryAsync } from './client/useDictionaryAsync';\nexport { useDictionaryDynamic } from './client/useDictionaryDynamic';\nexport { useI18n } from './client/useI18n';\nexport { useIntlayer } from './client/useIntlayer';\nexport { useLoadDynamic } from './client/useLoadDynamic';\nexport { useLocale } from './client/useLocale';\nexport { useLocaleBase } from './client/useLocaleBase';\nexport {\n localeCookie,\n setLocaleCookie,\n useLocaleCookie,\n} from './client/useLocaleCookie';\n\nexport { type IntlayerNode } from './IntlayerNode';\nexport { MarkdownProvider } from './markdown/index';\n"],"mappings":"AAOA,SAAS,wBAAwB;AACjC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,SAAS;AAClB,SAAS,qBAAqB;AAC9B,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AACrC,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,wBAAwB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/markdown/index.ts"],"sourcesContent":["export * from './MarkdownProvider';\nexport * from './MarkdownRenderer';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/server/format/index.ts"],"sourcesContent":["export { useCompact } from './useCompact';\nexport { useCurrency } from './useCurrency';\nexport { useDate } from './useDate';\nexport { useList } from './useList';\nexport { useNumber } from './useNumber';\nexport { usePercentage } from './usePercentage';\nexport { useRelativeTime } from './useRelativeTime';\nexport { useUnit } from './useUnit';\n"],"mappings":"AAAA,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAC5B,SAAS,eAAe;AACxB,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,eAAe;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/server/index.ts"],"sourcesContent":["export {\n IntlayerServerContext as IntlayerServer,\n IntlayerServerProvider,\n locale,\n} from './IntlayerServerProvider';\nexport { t } from './t';\nexport { useDictionary } from './useDictionary';\nexport { useDictionaryAsync } from './useDictionaryAsync';\nexport { useDictionaryDynamic } from './useDictionaryDynamic';\nexport { useI18n } from './useI18n';\nexport { useIntlayer } from './useIntlayer';\nexport { useLoadDynamic } from './useLoadDynamic';\nexport { useLocale } from './useLocale';\n"],"mappings":"AAAA;AAAA,EAC2B;AAAA,EACzB;AAAA,EACA;AAAA,OACK;AACP,SAAS,SAAS;AAClB,SAAS,qBAAqB;AAC9B,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AACrC,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/format/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Locales } from '@intlayer/config/client';
|
|
2
|
-
export declare enum LanguageDetector {
|
|
3
|
-
Querystring = "querystring",
|
|
4
|
-
Cookie = "cookie",
|
|
5
|
-
LocalStorage = "localStorage",
|
|
6
|
-
SessionStorage = "sessionStorage",
|
|
7
|
-
Navigator = "navigator",
|
|
8
|
-
HtmlTag = "htmlTag"
|
|
9
|
-
}
|
|
10
|
-
type LanguageDetectorOptions = {
|
|
11
|
-
order?: LanguageDetector[];
|
|
12
|
-
lookupQuerystring?: string;
|
|
13
|
-
lookupCookie?: string;
|
|
14
|
-
lookupLocalStorage?: string;
|
|
15
|
-
lookupSessionStorage?: string;
|
|
16
|
-
excludeCacheFor?: string[];
|
|
17
|
-
htmlTag?: HTMLElement | null;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Core language detector function
|
|
21
|
-
* const detectedLanguages = detectLanguage(['LanguageDetector.Cookie', 'LanguageDetector.LocalStorage'], { lookupCookie: 'myCookie' });
|
|
22
|
-
*/
|
|
23
|
-
export declare const getBrowserLocale: (userOptions?: LanguageDetectorOptions | undefined) => Locales;
|
|
24
|
-
export {};
|
|
25
|
-
//# sourceMappingURL=getBrowserLocale.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getBrowserLocale.d.ts","sourceRoot":"","sources":["../../../src/client/getBrowserLocale.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,E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AAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,YAAY,EACZ,eAAe,EACf,eAAe,GAChB,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { LocalesValues } from '@intlayer/config/client';
|
|
2
|
-
/**
|
|
3
|
-
* Get the locale cookie
|
|
4
|
-
*/
|
|
5
|
-
export declare const localeCookie: LocalesValues | undefined;
|
|
6
|
-
/**
|
|
7
|
-
* Set the locale cookie
|
|
8
|
-
*/
|
|
9
|
-
export declare const setLocaleCookie: (locale: LocalesValues) => void;
|
|
10
|
-
/**
|
|
11
|
-
* Hook that provides the locale cookie and a function to set it
|
|
12
|
-
*/
|
|
13
|
-
export declare const useLocaleCookie: () => {
|
|
14
|
-
localeCookie: LocalesValues;
|
|
15
|
-
setLocaleCookie: (locale: LocalesValues) => void;
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=useLocaleCookie.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLocaleCookie.d.ts","sourceRoot":"","sources":["../../../src/client/useLocaleCookie.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAe7D;;GAEG;AACH,eAAO,MAAM,YAAY,EACrB,aAAa,GACb,SAAS,CAAC;AAEd;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,aAAa,SAEpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;;8BAPY,aAAa;CAUnD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/markdown/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/server/format/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,IAAI,cAAc,EACvC,sBAAsB,EACtB,MAAM,GACP,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|