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,3 +1,7 @@
|
|
|
1
|
+
import * as intlayer19 from "intlayer";
|
|
2
|
+
|
|
3
|
+
//#region src/client/format/useNumber.d.ts
|
|
4
|
+
|
|
1
5
|
/**
|
|
2
6
|
* React client hook that provides a localized number formatter.
|
|
3
7
|
*
|
|
@@ -20,7 +24,9 @@
|
|
|
20
24
|
* @returns {(value: string | number, options?: import("../createNumber").NumberProps) => string}
|
|
21
25
|
* A number formatting function bound to the active locale.
|
|
22
26
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
declare const useNumber: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
28
|
+
locale?: intlayer19.LocalesValues;
|
|
25
29
|
}) => string;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { useNumber };
|
|
26
32
|
//# sourceMappingURL=useNumber.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNumber.d.ts","
|
|
1
|
+
{"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../../src/client/format/useNumber.ts"],"sourcesContent":[],"mappings":";;;;;;;AA4BA;;;;;;;;;;;;;;;;;;;cAAa,oDAAS,IAAA,CAAA;WAAA,UAAA,CAAA"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import * as intlayer18 from "intlayer";
|
|
2
|
+
|
|
3
|
+
//#region src/client/format/usePercentage.d.ts
|
|
4
|
+
|
|
1
5
|
/**
|
|
2
6
|
* React hook to provide a percentage formatter function
|
|
3
7
|
* based on the current application locale.
|
|
@@ -16,7 +20,9 @@
|
|
|
16
20
|
* @returns {(value: string | number, options?: Omit<PercentageOptions, "value">) => string}
|
|
17
21
|
* A function that formats numbers or numeric strings into localized percentages.
|
|
18
22
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
declare const usePercentage: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
24
|
+
locale?: intlayer18.LocalesValues;
|
|
21
25
|
}) => string;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { usePercentage };
|
|
22
28
|
//# sourceMappingURL=usePercentage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePercentage.d.ts","
|
|
1
|
+
{"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../../src/client/format/usePercentage.ts"],"sourcesContent":[],"mappings":";;;;;;;AAwBA;;;;;;;;;;;;;;;cAAa,wDAAa,IAAA,CAAA;WAAA,UAAA,CAAA"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import * as intlayer20 from "intlayer";
|
|
2
|
+
|
|
3
|
+
//#region src/client/format/useRelativeTime.d.ts
|
|
4
|
+
|
|
1
5
|
/**
|
|
2
6
|
* Client-side React hook for accessing a localized relative time formatter.
|
|
3
7
|
*
|
|
@@ -16,8 +20,10 @@
|
|
|
16
20
|
* @returns {ReturnType<typeof createRelativeTime>} A relative time formatting function
|
|
17
21
|
* bound to the current client locale.
|
|
18
22
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
declare const useRelativeTime: () => (from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
|
|
24
|
+
locale?: intlayer20.LocalesValues;
|
|
25
|
+
unit?: Intl.RelativeTimeFormatUnit;
|
|
22
26
|
}) => string;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { useRelativeTime };
|
|
23
29
|
//# sourceMappingURL=useRelativeTime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRelativeTime.d.ts","
|
|
1
|
+
{"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../../src/client/format/useRelativeTime.ts"],"sourcesContent":[],"mappings":";;;;;;;AAwBA;;;;;;;;;;;;;;;cAAa,gDAAe,6BAAA,gBAAA,IAAA,CAAA;WAAA,UAAA,CAAA"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import * as intlayer15 from "intlayer";
|
|
2
|
+
|
|
3
|
+
//#region src/client/format/useUnit.d.ts
|
|
4
|
+
|
|
1
5
|
/**
|
|
2
6
|
* React hook that provides a unit formatting function
|
|
3
7
|
* based on the current locale from {@link useLocaleBase}.
|
|
@@ -15,7 +19,9 @@
|
|
|
15
19
|
*
|
|
16
20
|
* @returns {Function} A unit formatting function that accepts a value and optional formatting options.
|
|
17
21
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
declare const useUnit: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
23
|
+
locale?: intlayer15.LocalesValues;
|
|
20
24
|
}) => string;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { useUnit };
|
|
21
27
|
//# sourceMappingURL=useUnit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUnit.d.ts","
|
|
1
|
+
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../../src/client/format/useUnit.ts"],"sourcesContent":[],"mappings":";;;;;;;AAuBA;;;;;;;;;;;;;;cAAa,kDAAO,IAAA,CAAA;WAAA,UAAA,CAAA"}
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export { useDictionaryDynamic
|
|
13
|
-
export { useI18n } from './useI18n';
|
|
14
|
-
export { useIntlayer } from './useIntlayer';
|
|
15
|
-
export { useLoadDynamic } from './useLoadDynamic';
|
|
16
|
-
export { useLocale } from './useLocale';
|
|
17
|
-
export { useLocaleBase } from './useLocaleBase';
|
|
18
|
-
export { localeCookie, setLocaleCookie, useLocaleCookie, } from './useLocaleCookie';
|
|
19
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
import { IntlayerClientContext, IntlayerProvider, IntlayerProviderContent, IntlayerProviderProps, useIntlayerContext } from "./IntlayerProvider.js";
|
|
2
|
+
import { t } from "./t.js";
|
|
3
|
+
import { useDictionary } from "./useDictionary.js";
|
|
4
|
+
import { useDictionaryAsync } from "./useDictionaryAsync.js";
|
|
5
|
+
import { useDictionaryDynamic } from "./useDictionaryDynamic.js";
|
|
6
|
+
import { useI18n } from "./useI18n.js";
|
|
7
|
+
import { useIntlayer } from "./useIntlayer.js";
|
|
8
|
+
import { useLoadDynamic } from "./useLoadDynamic.js";
|
|
9
|
+
import { useLocale } from "./useLocale.js";
|
|
10
|
+
import { useLocaleBase } from "./useLocaleBase.js";
|
|
11
|
+
import { localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, useLocaleCookie, useLocaleStorage } from "./useLocaleStorage.js";
|
|
12
|
+
export { IntlayerClientContext, IntlayerProvider, IntlayerProviderContent, type IntlayerProviderProps, localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, t, useDictionary, useDictionaryAsync, useDictionaryDynamic, useI18n, useIntlayer, useIntlayerContext, useLoadDynamic, useLocale, useLocaleBase, useLocaleCookie, useLocaleStorage };
|
package/dist/types/client/t.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { LocalesValues, StrictModeLocaleMap } from "@intlayer/types";
|
|
2
|
+
|
|
3
|
+
//#region src/client/t.d.ts
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* On the client side, this function returns the translation of the provided multilang content.
|
|
5
7
|
*
|
|
6
8
|
* If the locale is not provided, it will use the locale from the client context
|
|
7
9
|
*/
|
|
8
|
-
|
|
10
|
+
declare const t: <Content = string>(multilangContent: StrictModeLocaleMap<Content>, locale?: LocalesValues) => Content;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { t };
|
|
9
13
|
//# sourceMappingURL=t.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"t.d.ts","
|
|
1
|
+
{"version":3,"file":"t.d.ts","names":[],"sources":["../../../src/client/t.ts"],"sourcesContent":[],"mappings":";;;;;;AAYA;;;AAEW,cAFE,CAEF,EAAA,CAAA,UAAA,MAAA,CAAA,CAAA,gBAAA,EADS,mBACT,CAD6B,OAC7B,CAAA,EAAA,MAAA,CAAA,EAAA,aAAA,EAAA,GAAa,OAAb"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
|
+
import * as _intlayer_core0 from "@intlayer/core";
|
|
3
|
+
import { DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
|
|
4
|
+
|
|
5
|
+
//#region src/client/useDictionary.d.ts
|
|
6
|
+
|
|
3
7
|
/**
|
|
4
8
|
* On the server side, Hook that transform a dictionary and return the content
|
|
5
9
|
*
|
|
6
10
|
* If the locale is not provided, it will use the locale from the client context
|
|
7
11
|
*/
|
|
8
|
-
|
|
12
|
+
declare const useDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) => _intlayer_core0.DeepTransformContent<T["content"], IInterpreterPluginState$1, L>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { useDictionary };
|
|
9
15
|
//# sourceMappingURL=useDictionary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionary.d.ts","
|
|
1
|
+
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../../src/client/useDictionary.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAgBA;AACY,cADC,aACD,EAAA,CAAA,UAAA,UAAA,EAAA,UACA,aADA,GACgB,eADhB,CAAA,CAAA,UAAA,EAGE,CAHF,EAAA,MAAA,CAAA,EAID,CAJC,EAAA,GAIA,eAAA,CAAA,oBAJA,CAIA,CAJA,CAAA,SAAA,CAAA,EAIA,yBAAA,EAAA,CAJA,CAAA"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { DeclaredLocales, Dictionary, LocalesValues, StrictModeLocaleMap } from "@intlayer/types";
|
|
2
|
+
|
|
3
|
+
//#region src/client/useDictionaryAsync.d.ts
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* On the server side, Hook that transform a dictionary and return the content
|
|
5
7
|
*
|
|
6
8
|
* If the locale is not provided, it will use the locale from the client context
|
|
7
9
|
*/
|
|
8
|
-
|
|
10
|
+
declare const useDictionaryAsync: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, locale?: L) => Promise<T>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { useDictionaryAsync };
|
|
9
13
|
//# sourceMappingURL=useDictionaryAsync.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryAsync.d.ts","
|
|
1
|
+
{"version":3,"file":"useDictionaryAsync.d.ts","names":[],"sources":["../../../src/client/useDictionaryAsync.ts"],"sourcesContent":[],"mappings":";;;;;;AAkBA;;;AAE4B,cAFf,kBAEe,EAAA,CAAA,UADhB,UACgB,EAAA,UAAhB,aAAgB,GAAA,eAAA,CAAA,CAAA,iBAAA,EAEP,mBAFO,CAAA,GAAA,GAEmB,OAFnB,CAE2B,CAF3B,CAAA,CAAA,EAAA,MAAA,CAAA,EAGjB,CAHiB,EAAA,GAIzB,OAJyB,CAIjB,CAJiB,CAAA"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
|
+
import * as _intlayer_core2 from "@intlayer/core";
|
|
3
|
+
import { Dictionary, DictionaryKeys, LocalesValues, StrictModeLocaleMap } from "@intlayer/types";
|
|
4
|
+
import * as intlayer14 from "intlayer";
|
|
5
|
+
|
|
6
|
+
//#region src/client/useDictionaryDynamic.d.ts
|
|
3
7
|
/**
|
|
4
8
|
* On the server side, Hook that transform a dictionary and return the content
|
|
5
9
|
*
|
|
6
10
|
* If the locale is not provided, it will use the locale from the client context
|
|
7
11
|
*/
|
|
8
|
-
|
|
12
|
+
declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => _intlayer_core2.DeepTransformContent<T["content"], IInterpreterPluginState$1, intlayer14.Locale | (string & {})>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { useDictionaryDynamic };
|
|
9
15
|
//# sourceMappingURL=useDictionaryDynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryDynamic.d.ts","
|
|
1
|
+
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;AAmBa,cAAA,oBAuBZ,EAAA,CAAA,UAtBW,UAsBX,EAAA,UArBW,cAqBX,CAAA,CAAA,iBAAA,EAnBoB,mBAmBpB,CAAA,GAAA,GAnB8C,OAmB9C,CAnBsD,CAmBtD,CAAA,CAAA,EAAA,GAAA,EAlBM,CAkBN,EAAA,MAAA,CAAA,EAjBU,aAiBV,EAAA,GAjBuB,eAAA,CAAA,oBAiBvB,CAjBuB,CAiBvB,CAAA,SAAA,CAAA,EAjBuB,yBAAA,EAAA,UAAA,CAAA,MAAA,GAiBvB,CAAA,MAAA,GAAA,CAAA,CAAA,CAAA,CAAA"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { DeepTransformContent as DeepTransformContent$1 } from "../plugins.js";
|
|
2
|
+
import { ValidDotPathsFor } from "@intlayer/core";
|
|
3
|
+
import { DeclaredLocales, DictionaryKeys, DictionaryRegistryContent, GetSubPath, LocalesValues } from "@intlayer/types";
|
|
4
|
+
|
|
5
|
+
//#region src/client/useI18n.d.ts
|
|
6
|
+
|
|
5
7
|
/**
|
|
6
8
|
* Hook that provides a translation function `t()` for accessing nested content by key.
|
|
7
9
|
* This hook mimics the pattern found in libraries like i18next, next-intl, and vue-i18n.
|
|
@@ -19,5 +21,7 @@ import { type IntlayerDictionaryTypesConnector } from 'intlayer';
|
|
|
19
21
|
* const ariaLabel = t('button.ariaLabel').value; // 'Close modal'
|
|
20
22
|
* ```
|
|
21
23
|
*/
|
|
22
|
-
|
|
24
|
+
declare const useI18n: <T extends DictionaryKeys, L extends LocalesValues = DeclaredLocales>(namespace: T, locale?: L) => <P extends ValidDotPathsFor<T>>(path: P) => GetSubPath<DeepTransformContent$1<DictionaryRegistryContent<T>>, P>;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { useI18n };
|
|
23
27
|
//# sourceMappingURL=useI18n.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useI18n.d.ts","
|
|
1
|
+
{"version":3,"file":"useI18n.d.ts","names":[],"sources":["../../../src/client/useI18n.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA+BA;;;;;;;;;;;;;;;cAAa,oBACD,0BACA,gBAAgB,4BAEf,YACF,iBAkBY,iBAAiB,UAC9B,MAEL,WAAW,uBAAqB,0BAA0B,KAAK"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
|
+
import * as _intlayer_core0 from "@intlayer/core";
|
|
3
|
+
import * as _intlayer_types0 from "@intlayer/types";
|
|
4
|
+
import { DeclaredLocales, DictionaryKeys, LocalesValues } from "@intlayer/types";
|
|
5
|
+
|
|
6
|
+
//#region src/client/useIntlayer.d.ts
|
|
7
|
+
|
|
5
8
|
/**
|
|
6
9
|
* On the client side, Hook that picking one dictionary by its key and return the content
|
|
7
10
|
*
|
|
@@ -9,5 +12,7 @@ import type { DeepTransformContent } from '../plugins';
|
|
|
9
12
|
*
|
|
10
13
|
* When you need the raw string for attributes like `aria-label`, access the `.value` property of the returned content
|
|
11
14
|
*/
|
|
12
|
-
|
|
15
|
+
declare const useIntlayer: <T extends DictionaryKeys, L extends LocalesValues = DeclaredLocales>(key: T, locale?: L) => _intlayer_core0.DeepTransformContent<_intlayer_types0.DictionaryRegistryContent<T>, IInterpreterPluginState$1, L>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { useIntlayer };
|
|
13
18
|
//# sourceMappingURL=useIntlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntlayer.d.ts","
|
|
1
|
+
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../../src/client/useIntlayer.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;AAkBA;;AAEY,cAFC,WAED,EAAA,CAAA,UADA,cACA,EAAA,UAAA,aAAA,GAAgB,eAAhB,CAAA,CAAA,GAAA,EAEL,CAFK,EAAA,MAAA,CAAA,EAGD,CAHC,EAAA,GAGA,eAAA,CAAA,oBAHA,CAGA,gBAAA,CAAA,yBAHA,CAGA,CAHA,CAAA,EAGA,yBAAA,EAAA,CAHA,CAAA"}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/client/useLoadDynamic.d.ts
|
|
2
|
+
declare const useLoadDynamic: <T>(key: string, promise: Promise<T>) => T;
|
|
3
|
+
//#endregion
|
|
4
|
+
export { useLoadDynamic };
|
|
2
5
|
//# sourceMappingURL=useLoadDynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLoadDynamic.d.ts","
|
|
1
|
+
{"version":3,"file":"useLoadDynamic.d.ts","names":[],"sources":["../../../src/client/useLoadDynamic.ts"],"sourcesContent":[],"mappings":";cA2Ba,0CAA2C,QAAQ,OAAK"}
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { DeclaredLocales, LocalesValues } from "@intlayer/types";
|
|
2
|
+
|
|
3
|
+
//#region src/client/useLocale.d.ts
|
|
4
|
+
type UseLocaleProps = {
|
|
5
|
+
isCookieEnabled?: boolean;
|
|
6
|
+
onLocaleChange?: (locale: LocalesValues) => void;
|
|
7
|
+
};
|
|
8
|
+
type UseLocaleResult = {
|
|
9
|
+
locale: DeclaredLocales;
|
|
10
|
+
defaultLocale: DeclaredLocales;
|
|
11
|
+
availableLocales: DeclaredLocales[];
|
|
12
|
+
setLocale: (locale: LocalesValues) => void;
|
|
4
13
|
};
|
|
5
14
|
/**
|
|
6
15
|
* On the client side, hook to get the current locale and all related fields
|
|
7
16
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
export {};
|
|
17
|
+
declare const useLocale: ({
|
|
18
|
+
isCookieEnabled,
|
|
19
|
+
onLocaleChange
|
|
20
|
+
}?: UseLocaleProps) => UseLocaleResult;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { useLocale };
|
|
15
23
|
//# sourceMappingURL=useLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.d.ts","
|
|
1
|
+
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"sourcesContent":[],"mappings":";;;KAQK,cAAA;;EAAA,cAAA,CAAA,EAAc,CAAA,MAAA,EAES,aAAA,EAAA,GAAa,IAAA;AAAA,CAAA;KAGpC,eAAA,GACK;EACO,MAAA,EADP,eACO;EACG,aAAA,EADH,eACG;EACE,gBAAA,EADF,eACE,EAAA;EAAa,SAAA,EAAA,CAAA,MAAA,EAAb,aAAa,EAAA,GAAA,IAAA;AAMnC,CAAA;;;;AAGyB,cAHZ,SAGY,EAAA,CAAA;EAAA,eAAA;EAAA;AAAA,CAAA,CAAA,EAAtB,cAAsB,EAAA,GAAA,eAAA"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
import * as intlayer0 from "intlayer";
|
|
2
|
+
|
|
3
|
+
//#region src/client/useLocaleBase.d.ts
|
|
1
4
|
/**
|
|
2
5
|
* On the client side, hook to get the current locale and all related fields
|
|
3
6
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
declare const useLocaleBase: () => {
|
|
8
|
+
locale: intlayer0.Locale | (string & {});
|
|
9
|
+
defaultLocale: intlayer0.Locale;
|
|
10
|
+
availableLocales: intlayer0.Locale[];
|
|
11
|
+
setLocale: (newLocale: intlayer0.LocalesValues) => void;
|
|
9
12
|
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { useLocaleBase };
|
|
10
15
|
//# sourceMappingURL=useLocaleBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocaleBase.d.ts","
|
|
1
|
+
{"version":3,"file":"useLocaleBase.d.ts","names":[],"sources":["../../../src/client/useLocaleBase.ts"],"sourcesContent":[],"mappings":";;;;;;AAYa,cAAA,aASZ,EAAA,GAAA,GAAA;EAAA,MAAA,EAAA,SAAA,CAAA,MAAA,GAAA,CAAA,MAAA,GAAA,CAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { LocalesValues } from "@intlayer/types";
|
|
2
|
+
import * as intlayer3 from "intlayer";
|
|
3
|
+
|
|
4
|
+
//#region src/client/useLocaleStorage.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Get the locale cookie
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Get the locale cookie
|
|
11
|
+
*/
|
|
12
|
+
declare const localeInStorage: intlayer3.Locale;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Use localeInStorage instead
|
|
15
|
+
*
|
|
16
|
+
* Get the locale cookie
|
|
17
|
+
*/
|
|
18
|
+
declare const localeCookie: intlayer3.Locale;
|
|
19
|
+
/**
|
|
20
|
+
* Set the locale cookie
|
|
21
|
+
*/
|
|
22
|
+
declare const setLocaleInStorage: (locale: LocalesValues, isCookieEnabled?: boolean) => void;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Use setLocaleInStorage instead
|
|
25
|
+
*
|
|
26
|
+
* Set the locale cookie
|
|
27
|
+
*/
|
|
28
|
+
declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled?: boolean) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Hook that provides the locale cookie and a function to set it
|
|
31
|
+
*/
|
|
32
|
+
declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
33
|
+
getLocale: () => intlayer3.Locale;
|
|
34
|
+
setLocale: (locale: LocalesValues) => void;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated Use useLocaleStorage instead
|
|
38
|
+
*
|
|
39
|
+
* For GDPR compliance, use useLocaleStorage instead
|
|
40
|
+
*
|
|
41
|
+
* Hook that provides the locale cookie and a function to set it
|
|
42
|
+
*/
|
|
43
|
+
declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
|
|
44
|
+
localeCookie: intlayer3.Locale;
|
|
45
|
+
setLocaleCookie: (locale: LocalesValues) => void;
|
|
46
|
+
};
|
|
47
|
+
//#endregion
|
|
48
|
+
export { localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, useLocaleCookie, useLocaleStorage };
|
|
49
|
+
//# sourceMappingURL=useLocaleStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAeA;AAMA;AAKA;AAca,cAzBA,eAYH,EAZ+D,SAAA,CAA7C,MAYL;AAkBvB;AAiBA;;;;cAzCa,cAA8B,SAAA,CAAlB;;;;cAKZ,6BACH;;;;;;cAaG,0BAbH;;;;cAkBG;mBAQV,SAAA,CAAA;sBAAA;;;;;;;;;cASU;gBAOZ,SAAA,CAAA;4BAAA"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StrictModeLocaleMap } from "@intlayer/types";
|
|
2
|
+
|
|
3
|
+
//#region src/client/useTraduction.d.ts
|
|
4
|
+
|
|
2
5
|
/**
|
|
3
6
|
* On the client side, Hook that picking one dictionary by its id and return the content.
|
|
4
7
|
*
|
|
@@ -20,5 +23,7 @@ import { type LanguageContent } from '@intlayer/core';
|
|
|
20
23
|
* - this function will require each locale to be defined if defined in the project configuration.
|
|
21
24
|
* - If a locale is missing, it will make each existing locale optional and raise an error if the locale is not found.
|
|
22
25
|
*/
|
|
23
|
-
|
|
26
|
+
declare const useTranslation: <Content = string>(languageContent: StrictModeLocaleMap<Content>) => Content;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { useTranslation };
|
|
24
29
|
//# sourceMappingURL=useTraduction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTraduction.d.ts","
|
|
1
|
+
{"version":3,"file":"useTraduction.d.ts","names":[],"sources":["../../../src/client/useTraduction.ts"],"sourcesContent":[],"mappings":";;;;;;AA0BA;;;;;;;;;;;;;;;;;;;cAAa,oDACM,oBAAoB,aACpC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { NodeProps } from "@intlayer/core";
|
|
2
|
+
import { FC, HTMLAttributes } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/editor/ContentSelectorWrapper.d.ts
|
|
5
|
+
type ContentSelectorWrapperProps = NodeProps & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
|
|
6
|
+
declare const ContentSelectorRenderer: FC<ContentSelectorWrapperProps>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ContentSelectorRenderer, ContentSelectorWrapperProps };
|
|
5
9
|
//# sourceMappingURL=ContentSelectorWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSelectorWrapper.d.ts","
|
|
1
|
+
{"version":3,"file":"ContentSelectorWrapper.d.ts","names":[],"sources":["../../../src/editor/ContentSelectorWrapper.tsx"],"sourcesContent":[],"mappings":";;;;KAaY,2BAAA,GAA8B,YACxC,KAAK,eAAe;cA+DT,yBAAyB,GAAG"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FC, PropsWithChildren } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/editor/IntlayerEditorProvider.d.ts
|
|
4
|
+
declare const IntlayerEditorProvider: FC<PropsWithChildren>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { IntlayerEditorProvider };
|
|
3
7
|
//# sourceMappingURL=IntlayerEditorProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlayerEditorProvider.d.ts","
|
|
1
|
+
{"version":3,"file":"IntlayerEditorProvider.d.ts","names":[],"sources":["../../../src/editor/IntlayerEditorProvider.tsx"],"sourcesContent":[],"mappings":";;;cAiCa,wBAAwB,GAAG"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ContentSelectorRenderer, ContentSelectorWrapperProps } from "./ContentSelectorWrapper.js";
|
|
2
|
+
export { ContentSelectorRenderer, ContentSelectorWrapperProps };
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { KeyPath, Locale } from "@intlayer/types";
|
|
3
|
+
|
|
4
|
+
//#region src/editor/useEditedContentRenderer.d.ts
|
|
4
5
|
type EditedContentRendererProps = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
dictionaryKey: string;
|
|
7
|
+
keyPath: KeyPath[];
|
|
8
|
+
children: string;
|
|
9
|
+
locale?: Locale;
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
declare const useEditedContentRenderer: ({
|
|
12
|
+
dictionaryKey,
|
|
13
|
+
keyPath,
|
|
14
|
+
children
|
|
15
|
+
}: EditedContentRendererProps) => string;
|
|
16
|
+
declare const EditedContentRenderer: FC<EditedContentRendererProps>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { EditedContentRenderer, useEditedContentRenderer };
|
|
13
19
|
//# sourceMappingURL=useEditedContentRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditedContentRenderer.d.ts","
|
|
1
|
+
{"version":3,"file":"useEditedContentRenderer.d.ts","names":[],"sources":["../../../src/editor/useEditedContentRenderer.tsx"],"sourcesContent":[],"mappings":";;;;KAQK,0BAAA;;EAAA,OAAA,EAEM,OAFN,EAAA;EAOQ,QAAA,EAAA,MAAA;EAA4B,MAAA,CAAA,EAH9B,MAG8B;CAAA;AAAA,cAA5B,wBAA4B,EAAA,CAAA;EAAA,aAAA;EAAA,OAAA;EAAA;AAAA,CAAA,EAItC,0BAJsC,EAAA,GAAA,MAAA;AAItC,cAiBU,qBAjBV,EAiBiC,EAjBjC,CAiBoC,0BAjBpC,CAAA"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { DeepTransformContent as DeepTransformContent$1 } from "./plugins.js";
|
|
2
|
+
import { Plugins } from "@intlayer/core";
|
|
3
|
+
import { DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
|
|
4
|
+
|
|
5
|
+
//#region src/getDictionary.d.ts
|
|
6
|
+
declare const getDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L, additionalPlugins?: Plugins[]) => DeepTransformContent$1<T["content"], L>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { getDictionary };
|
|
5
9
|
//# sourceMappingURL=getDictionary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDictionary.d.ts","
|
|
1
|
+
{"version":3,"file":"getDictionary.d.ts","names":[],"sources":["../../src/getDictionary.ts"],"sourcesContent":[],"mappings":";;;;;cAgBa,0BACD,sBACA,gBAAgB,6BAEd,YACH,uBACW,cACnB,uBAAqB,cAAc"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { DeepTransformContent as DeepTransformContent$1 } from "./plugins.js";
|
|
2
|
+
import { Plugins } from "@intlayer/core";
|
|
3
|
+
import { DeclaredLocales, DictionaryKeys, DictionaryRegistryContent, LocalesValues } from "@intlayer/types";
|
|
4
|
+
|
|
5
|
+
//#region src/getIntlayer.d.ts
|
|
6
|
+
declare const getIntlayer: <T extends DictionaryKeys, L extends LocalesValues = DeclaredLocales>(key: T, locale?: L, additionalPlugins?: Plugins[]) => DeepTransformContent$1<DictionaryRegistryContent<T>, L>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { getIntlayer };
|
|
5
9
|
//# sourceMappingURL=getIntlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getIntlayer.d.ts","
|
|
1
|
+
{"version":3,"file":"getIntlayer.d.ts","names":[],"sources":["../../src/getIntlayer.ts"],"sourcesContent":[],"mappings":";;;;;cAca,wBACD,0BACA,gBAAgB,sBAErB,YACI,uBACW,cACnB,uBAAqB,0BAA0B,IAAI"}
|