react-intlayer 9.0.0-canary.2 → 9.0.0-canary.21
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 +0 -1
- package/dist/cjs/IntlayerNode.cjs.map +1 -1
- package/dist/cjs/UI/ContentSelector.cjs +0 -1
- package/dist/cjs/UI/ContentSelector.cjs.map +1 -1
- package/dist/cjs/analytics/AnalyticsProvider.cjs +16 -0
- package/dist/cjs/analytics/AnalyticsProvider.cjs.map +1 -0
- package/dist/cjs/analytics/exposureSink.cjs +27 -0
- package/dist/cjs/analytics/exposureSink.cjs.map +1 -0
- package/dist/cjs/analytics/index.cjs +10 -0
- package/dist/cjs/analytics/useAnalytics.cjs +54 -0
- package/dist/cjs/analytics/useAnalytics.cjs.map +1 -0
- package/dist/cjs/analytics/useConversion.cjs +32 -0
- package/dist/cjs/analytics/useConversion.cjs.map +1 -0
- package/dist/cjs/analytics/useExperiment.cjs +65 -0
- package/dist/cjs/analytics/useExperiment.cjs.map +1 -0
- package/dist/cjs/client/IntlayerProvider.cjs +6 -2
- package/dist/cjs/client/IntlayerProvider.cjs.map +1 -1
- package/dist/cjs/client/format/useCompact.cjs +0 -1
- package/dist/cjs/client/format/useCompact.cjs.map +1 -1
- package/dist/cjs/client/format/useCurrency.cjs +0 -1
- package/dist/cjs/client/format/useCurrency.cjs.map +1 -1
- package/dist/cjs/client/format/useDate.cjs +0 -1
- package/dist/cjs/client/format/useDate.cjs.map +1 -1
- package/dist/cjs/client/format/useIntl.cjs +0 -1
- package/dist/cjs/client/format/useIntl.cjs.map +1 -1
- package/dist/cjs/client/format/useList.cjs +0 -1
- package/dist/cjs/client/format/useList.cjs.map +1 -1
- package/dist/cjs/client/format/useNumber.cjs +0 -1
- package/dist/cjs/client/format/useNumber.cjs.map +1 -1
- package/dist/cjs/client/format/usePercentage.cjs +0 -1
- package/dist/cjs/client/format/usePercentage.cjs.map +1 -1
- package/dist/cjs/client/format/useRelativeTime.cjs +0 -1
- package/dist/cjs/client/format/useRelativeTime.cjs.map +1 -1
- package/dist/cjs/client/format/useUnit.cjs +0 -1
- package/dist/cjs/client/format/useUnit.cjs.map +1 -1
- package/dist/cjs/client/index.cjs +2 -0
- package/dist/cjs/client/t.cjs +0 -1
- package/dist/cjs/client/t.cjs.map +1 -1
- package/dist/cjs/client/useDictionary.cjs +1 -2
- package/dist/cjs/client/useDictionary.cjs.map +1 -1
- package/dist/cjs/client/useDictionaryAsync.cjs +0 -1
- package/dist/cjs/client/useDictionaryAsync.cjs.map +1 -1
- package/dist/cjs/client/useDictionaryDynamic.cjs +2 -3
- package/dist/cjs/client/useDictionaryDynamic.cjs.map +1 -1
- package/dist/cjs/client/useI18n.cjs +0 -1
- package/dist/cjs/client/useI18n.cjs.map +1 -1
- package/dist/cjs/client/useIntlayer.cjs +1 -3
- package/dist/cjs/client/useIntlayer.cjs.map +1 -1
- package/dist/cjs/client/useLoadDynamic.cjs.map +1 -1
- package/dist/cjs/client/useLocale.cjs +0 -1
- package/dist/cjs/client/useLocale.cjs.map +1 -1
- package/dist/cjs/client/useLocaleBase.cjs +0 -1
- package/dist/cjs/client/useLocaleBase.cjs.map +1 -1
- package/dist/cjs/client/useLocaleStorage.cjs +0 -1
- package/dist/cjs/client/useLocaleStorage.cjs.map +1 -1
- package/dist/cjs/client/usePathname.cjs +40 -0
- package/dist/cjs/client/usePathname.cjs.map +1 -0
- package/dist/cjs/client/useRewriteURL.cjs +0 -1
- package/dist/cjs/client/useRewriteURL.cjs.map +1 -1
- package/dist/cjs/client/useTraduction.cjs +0 -1
- package/dist/cjs/client/useTraduction.cjs.map +1 -1
- package/dist/cjs/editor/ContentSelector.cjs +1 -2
- package/dist/cjs/editor/ContentSelector.cjs.map +1 -1
- package/dist/cjs/editor/EditorProvider.cjs.map +1 -1
- package/dist/cjs/editor/useEditor.cjs +1 -2
- package/dist/cjs/editor/useEditor.cjs.map +1 -1
- package/dist/cjs/getDictionary.cjs +1 -2
- package/dist/cjs/getDictionary.cjs.map +1 -1
- package/dist/cjs/getIntlayer.cjs +1 -2
- package/dist/cjs/getIntlayer.cjs.map +1 -1
- package/dist/cjs/html/HTMLProvider.cjs +0 -1
- package/dist/cjs/html/HTMLProvider.cjs.map +1 -1
- package/dist/cjs/html/HTMLRenderer.cjs +0 -1
- package/dist/cjs/html/HTMLRenderer.cjs.map +1 -1
- package/dist/cjs/html/HTMLRendererPlugin.cjs.map +1 -1
- package/dist/cjs/index.cjs +8 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/markdown/MarkdownProvider.cjs +0 -1
- package/dist/cjs/markdown/MarkdownProvider.cjs.map +1 -1
- package/dist/cjs/markdown/MarkdownRenderer.cjs +0 -1
- package/dist/cjs/markdown/MarkdownRenderer.cjs.map +1 -1
- package/dist/cjs/markdown/MarkdownRendererPlugin.cjs.map +1 -1
- package/dist/cjs/markdown/processor.cjs +0 -1
- package/dist/cjs/markdown/processor.cjs.map +1 -1
- package/dist/cjs/markdown/runtime.cjs +0 -1
- package/dist/cjs/markdown/runtime.cjs.map +1 -1
- package/dist/cjs/plugins.cjs +41 -24
- package/dist/cjs/plugins.cjs.map +1 -1
- package/dist/cjs/reactElement/renderReactElement.cjs +0 -1
- package/dist/cjs/reactElement/renderReactElement.cjs.map +1 -1
- package/dist/cjs/server/IntlayerServerProvider.cjs +0 -1
- package/dist/cjs/server/IntlayerServerProvider.cjs.map +1 -1
- package/dist/cjs/server/format/useCompact.cjs +0 -1
- package/dist/cjs/server/format/useCompact.cjs.map +1 -1
- package/dist/cjs/server/format/useCurrency.cjs +0 -1
- package/dist/cjs/server/format/useCurrency.cjs.map +1 -1
- package/dist/cjs/server/format/useDate.cjs +0 -1
- package/dist/cjs/server/format/useDate.cjs.map +1 -1
- package/dist/cjs/server/format/useIntl.cjs +0 -1
- package/dist/cjs/server/format/useIntl.cjs.map +1 -1
- package/dist/cjs/server/format/useList.cjs +0 -1
- package/dist/cjs/server/format/useList.cjs.map +1 -1
- package/dist/cjs/server/format/useNumber.cjs +0 -1
- package/dist/cjs/server/format/useNumber.cjs.map +1 -1
- package/dist/cjs/server/format/usePercentage.cjs +0 -1
- package/dist/cjs/server/format/usePercentage.cjs.map +1 -1
- package/dist/cjs/server/format/useRelativeTime.cjs +0 -1
- package/dist/cjs/server/format/useRelativeTime.cjs.map +1 -1
- package/dist/cjs/server/format/useUnit.cjs +0 -1
- package/dist/cjs/server/format/useUnit.cjs.map +1 -1
- package/dist/cjs/server/serverContext.cjs.map +1 -1
- package/dist/cjs/server/t.cjs +0 -1
- package/dist/cjs/server/t.cjs.map +1 -1
- package/dist/cjs/server/useDictionary.cjs +1 -1
- package/dist/cjs/server/useDictionary.cjs.map +1 -1
- package/dist/cjs/server/useDictionaryAsync.cjs +0 -1
- package/dist/cjs/server/useDictionaryAsync.cjs.map +1 -1
- package/dist/cjs/server/useDictionaryDynamic.cjs +2 -3
- package/dist/cjs/server/useDictionaryDynamic.cjs.map +1 -1
- package/dist/cjs/server/useI18n.cjs.map +1 -1
- package/dist/cjs/server/useIntlayer.cjs +2 -2
- package/dist/cjs/server/useIntlayer.cjs.map +1 -1
- package/dist/cjs/server/useLoadDynamic.cjs.map +1 -1
- package/dist/cjs/server/useLocale.cjs +0 -1
- package/dist/cjs/server/useLocale.cjs.map +1 -1
- package/dist/esm/IntlayerNode.mjs.map +1 -1
- package/dist/esm/UI/ContentSelector.mjs.map +1 -1
- package/dist/esm/analytics/AnalyticsProvider.mjs +15 -0
- package/dist/esm/analytics/AnalyticsProvider.mjs.map +1 -0
- package/dist/esm/analytics/exposureSink.mjs +24 -0
- package/dist/esm/analytics/exposureSink.mjs.map +1 -0
- package/dist/esm/analytics/index.mjs +6 -0
- package/dist/esm/analytics/useAnalytics.mjs +53 -0
- package/dist/esm/analytics/useAnalytics.mjs.map +1 -0
- package/dist/esm/analytics/useConversion.mjs +31 -0
- package/dist/esm/analytics/useConversion.mjs.map +1 -0
- package/dist/esm/analytics/useExperiment.mjs +64 -0
- package/dist/esm/analytics/useExperiment.mjs.map +1 -0
- package/dist/esm/client/IntlayerProvider.mjs +6 -1
- package/dist/esm/client/IntlayerProvider.mjs.map +1 -1
- package/dist/esm/client/format/useCompact.mjs.map +1 -1
- package/dist/esm/client/format/useCurrency.mjs.map +1 -1
- package/dist/esm/client/format/useDate.mjs.map +1 -1
- package/dist/esm/client/format/useIntl.mjs.map +1 -1
- package/dist/esm/client/format/useList.mjs.map +1 -1
- package/dist/esm/client/format/useNumber.mjs.map +1 -1
- package/dist/esm/client/format/usePercentage.mjs.map +1 -1
- package/dist/esm/client/format/useRelativeTime.mjs.map +1 -1
- package/dist/esm/client/format/useUnit.mjs.map +1 -1
- package/dist/esm/client/index.mjs +2 -1
- package/dist/esm/client/t.mjs.map +1 -1
- package/dist/esm/client/useDictionary.mjs +1 -1
- package/dist/esm/client/useDictionary.mjs.map +1 -1
- package/dist/esm/client/useDictionaryAsync.mjs.map +1 -1
- package/dist/esm/client/useDictionaryDynamic.mjs +2 -2
- package/dist/esm/client/useDictionaryDynamic.mjs.map +1 -1
- package/dist/esm/client/useI18n.mjs.map +1 -1
- package/dist/esm/client/useIntlayer.mjs +1 -2
- package/dist/esm/client/useIntlayer.mjs.map +1 -1
- package/dist/esm/client/useLoadDynamic.mjs.map +1 -1
- package/dist/esm/client/useLocale.mjs.map +1 -1
- package/dist/esm/client/useLocaleBase.mjs.map +1 -1
- package/dist/esm/client/useLocaleStorage.mjs.map +1 -1
- package/dist/esm/client/usePathname.mjs +39 -0
- package/dist/esm/client/usePathname.mjs.map +1 -0
- package/dist/esm/client/useRewriteURL.mjs.map +1 -1
- package/dist/esm/client/useTraduction.mjs.map +1 -1
- package/dist/esm/editor/ContentSelector.mjs +1 -1
- package/dist/esm/editor/ContentSelector.mjs.map +1 -1
- package/dist/esm/editor/EditorProvider.mjs.map +1 -1
- package/dist/esm/editor/useEditor.mjs +1 -1
- package/dist/esm/editor/useEditor.mjs.map +1 -1
- package/dist/esm/getDictionary.mjs +1 -1
- package/dist/esm/getDictionary.mjs.map +1 -1
- package/dist/esm/getIntlayer.mjs +1 -1
- package/dist/esm/getIntlayer.mjs.map +1 -1
- package/dist/esm/html/HTMLProvider.mjs.map +1 -1
- package/dist/esm/html/HTMLRenderer.mjs.map +1 -1
- package/dist/esm/html/HTMLRendererPlugin.mjs.map +1 -1
- package/dist/esm/index.mjs +5 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/markdown/MarkdownProvider.mjs.map +1 -1
- package/dist/esm/markdown/MarkdownRenderer.mjs.map +1 -1
- package/dist/esm/markdown/MarkdownRendererPlugin.mjs.map +1 -1
- package/dist/esm/markdown/processor.mjs.map +1 -1
- package/dist/esm/markdown/runtime.mjs.map +1 -1
- package/dist/esm/plugins.mjs +41 -24
- package/dist/esm/plugins.mjs.map +1 -1
- package/dist/esm/reactElement/renderReactElement.mjs.map +1 -1
- package/dist/esm/server/IntlayerServerProvider.mjs.map +1 -1
- package/dist/esm/server/format/useCompact.mjs.map +1 -1
- package/dist/esm/server/format/useCurrency.mjs.map +1 -1
- package/dist/esm/server/format/useDate.mjs.map +1 -1
- package/dist/esm/server/format/useIntl.mjs.map +1 -1
- package/dist/esm/server/format/useList.mjs.map +1 -1
- package/dist/esm/server/format/useNumber.mjs.map +1 -1
- package/dist/esm/server/format/usePercentage.mjs.map +1 -1
- package/dist/esm/server/format/useRelativeTime.mjs.map +1 -1
- package/dist/esm/server/format/useUnit.mjs.map +1 -1
- package/dist/esm/server/serverContext.mjs.map +1 -1
- package/dist/esm/server/t.mjs.map +1 -1
- package/dist/esm/server/useDictionary.mjs +1 -1
- package/dist/esm/server/useDictionary.mjs.map +1 -1
- package/dist/esm/server/useDictionaryAsync.mjs.map +1 -1
- package/dist/esm/server/useDictionaryDynamic.mjs +2 -2
- package/dist/esm/server/useDictionaryDynamic.mjs.map +1 -1
- package/dist/esm/server/useI18n.mjs.map +1 -1
- package/dist/esm/server/useIntlayer.mjs +2 -2
- package/dist/esm/server/useIntlayer.mjs.map +1 -1
- package/dist/esm/server/useLoadDynamic.mjs.map +1 -1
- package/dist/esm/server/useLocale.mjs.map +1 -1
- package/dist/types/IntlayerNode.d.ts +1 -6
- package/dist/types/IntlayerNode.d.ts.map +1 -1
- package/dist/types/UI/ContentSelector.d.ts +0 -1
- package/dist/types/UI/ContentSelector.d.ts.map +1 -1
- package/dist/types/analytics/AnalyticsProvider.d.ts +10 -0
- package/dist/types/analytics/AnalyticsProvider.d.ts.map +1 -0
- package/dist/types/analytics/exposureSink.d.ts +32 -0
- package/dist/types/analytics/exposureSink.d.ts.map +1 -0
- package/dist/types/analytics/index.d.ts +5 -0
- package/dist/types/analytics/useAnalytics.d.ts +15 -0
- package/dist/types/analytics/useAnalytics.d.ts.map +1 -0
- package/dist/types/analytics/useConversion.d.ts +31 -0
- package/dist/types/analytics/useConversion.d.ts.map +1 -0
- package/dist/types/analytics/useExperiment.d.ts +41 -0
- package/dist/types/analytics/useExperiment.d.ts.map +1 -0
- package/dist/types/client/IntlayerProvider.d.ts +1 -3
- package/dist/types/client/IntlayerProvider.d.ts.map +1 -1
- package/dist/types/client/format/useCompact.d.ts +1 -3
- package/dist/types/client/format/useCompact.d.ts.map +1 -1
- package/dist/types/client/format/useCurrency.d.ts +1 -3
- package/dist/types/client/format/useCurrency.d.ts.map +1 -1
- package/dist/types/client/format/useDate.d.ts +0 -1
- package/dist/types/client/format/useDate.d.ts.map +1 -1
- package/dist/types/client/format/useIntl.d.ts +0 -1
- package/dist/types/client/format/useIntl.d.ts.map +1 -1
- package/dist/types/client/format/useList.d.ts +4 -6
- package/dist/types/client/format/useList.d.ts.map +1 -1
- package/dist/types/client/format/useNumber.d.ts +1 -3
- package/dist/types/client/format/useNumber.d.ts.map +1 -1
- package/dist/types/client/format/usePercentage.d.ts +1 -3
- package/dist/types/client/format/usePercentage.d.ts.map +1 -1
- package/dist/types/client/format/useRelativeTime.d.ts +1 -3
- package/dist/types/client/format/useRelativeTime.d.ts.map +1 -1
- package/dist/types/client/format/useUnit.d.ts +1 -3
- package/dist/types/client/format/useUnit.d.ts.map +1 -1
- package/dist/types/client/index.d.ts +2 -1
- package/dist/types/client/t.d.ts +0 -1
- package/dist/types/client/t.d.ts.map +1 -1
- package/dist/types/client/useDictionary.d.ts +2 -5
- package/dist/types/client/useDictionary.d.ts.map +1 -1
- package/dist/types/client/useDictionaryAsync.d.ts +0 -1
- package/dist/types/client/useDictionaryAsync.d.ts.map +1 -1
- package/dist/types/client/useDictionaryDynamic.d.ts +0 -1
- package/dist/types/client/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/client/useI18n.d.ts +0 -1
- package/dist/types/client/useI18n.d.ts.map +1 -1
- package/dist/types/client/useIntlayer.d.ts +2 -6
- package/dist/types/client/useIntlayer.d.ts.map +1 -1
- package/dist/types/client/useLoadDynamic.d.ts.map +1 -1
- package/dist/types/client/useLocale.d.ts +1 -5
- package/dist/types/client/useLocale.d.ts.map +1 -1
- package/dist/types/client/useLocaleBase.d.ts +2 -4
- package/dist/types/client/useLocaleBase.d.ts.map +1 -1
- package/dist/types/client/useLocaleStorage.d.ts +5 -10
- package/dist/types/client/useLocaleStorage.d.ts.map +1 -1
- package/dist/types/client/usePathname.d.ts +23 -0
- package/dist/types/client/usePathname.d.ts.map +1 -0
- package/dist/types/client/useRewriteURL.d.ts.map +1 -1
- package/dist/types/client/useTraduction.d.ts +0 -1
- package/dist/types/client/useTraduction.d.ts.map +1 -1
- package/dist/types/editor/ContentSelector.d.ts +0 -1
- package/dist/types/editor/ContentSelector.d.ts.map +1 -1
- package/dist/types/editor/EditorProvider.d.ts +0 -1
- package/dist/types/editor/EditorProvider.d.ts.map +1 -1
- package/dist/types/editor/useEditor.d.ts.map +1 -1
- package/dist/types/getDictionary.d.ts +1 -2
- package/dist/types/getDictionary.d.ts.map +1 -1
- package/dist/types/getIntlayer.d.ts +1 -2
- package/dist/types/getIntlayer.d.ts.map +1 -1
- package/dist/types/html/HTMLComponentTypes.d.ts +8 -9
- package/dist/types/html/HTMLComponentTypes.d.ts.map +1 -1
- package/dist/types/html/HTMLProvider.d.ts +0 -1
- package/dist/types/html/HTMLProvider.d.ts.map +1 -1
- package/dist/types/html/HTMLRenderer.d.ts +2 -7
- package/dist/types/html/HTMLRenderer.d.ts.map +1 -1
- package/dist/types/html/HTMLRendererPlugin.d.ts +0 -1
- package/dist/types/html/HTMLRendererPlugin.d.ts.map +1 -1
- package/dist/types/html/types.d.ts +0 -1
- package/dist/types/html/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +18 -35
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/markdown/MarkdownProvider.d.ts +7 -4
- package/dist/types/markdown/MarkdownProvider.d.ts.map +1 -1
- package/dist/types/markdown/MarkdownRenderer.d.ts +2 -17
- package/dist/types/markdown/MarkdownRenderer.d.ts.map +1 -1
- package/dist/types/markdown/MarkdownRendererPlugin.d.ts +0 -1
- package/dist/types/markdown/MarkdownRendererPlugin.d.ts.map +1 -1
- package/dist/types/markdown/processor.d.ts +0 -1
- package/dist/types/markdown/processor.d.ts.map +1 -1
- package/dist/types/markdown/runtime.d.ts +0 -1
- package/dist/types/markdown/runtime.d.ts.map +1 -1
- package/dist/types/plugins.d.ts +1 -2
- package/dist/types/plugins.d.ts.map +1 -1
- package/dist/types/reactElement/renderReactElement.d.ts +0 -1
- package/dist/types/reactElement/renderReactElement.d.ts.map +1 -1
- package/dist/types/server/IntlayerServerProvider.d.ts +1 -3
- package/dist/types/server/IntlayerServerProvider.d.ts.map +1 -1
- package/dist/types/server/format/useCompact.d.ts +0 -1
- package/dist/types/server/format/useCompact.d.ts.map +1 -1
- package/dist/types/server/format/useCurrency.d.ts +0 -1
- package/dist/types/server/format/useCurrency.d.ts.map +1 -1
- package/dist/types/server/format/useDate.d.ts +0 -1
- package/dist/types/server/format/useDate.d.ts.map +1 -1
- package/dist/types/server/format/useIntl.d.ts +0 -1
- package/dist/types/server/format/useIntl.d.ts.map +1 -1
- package/dist/types/server/format/useList.d.ts +0 -1
- package/dist/types/server/format/useList.d.ts.map +1 -1
- package/dist/types/server/format/useNumber.d.ts +0 -1
- package/dist/types/server/format/useNumber.d.ts.map +1 -1
- package/dist/types/server/format/usePercentage.d.ts +0 -1
- package/dist/types/server/format/usePercentage.d.ts.map +1 -1
- package/dist/types/server/format/useRelativeTime.d.ts +0 -1
- package/dist/types/server/format/useRelativeTime.d.ts.map +1 -1
- package/dist/types/server/format/useUnit.d.ts +0 -1
- package/dist/types/server/format/useUnit.d.ts.map +1 -1
- package/dist/types/server/serverContext.d.ts +1 -5
- package/dist/types/server/serverContext.d.ts.map +1 -1
- package/dist/types/server/t.d.ts +0 -1
- package/dist/types/server/t.d.ts.map +1 -1
- package/dist/types/server/useDictionary.d.ts +2 -5
- package/dist/types/server/useDictionary.d.ts.map +1 -1
- package/dist/types/server/useDictionaryAsync.d.ts +2 -5
- package/dist/types/server/useDictionaryAsync.d.ts.map +1 -1
- package/dist/types/server/useDictionaryDynamic.d.ts +0 -1
- package/dist/types/server/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/server/useI18n.d.ts +0 -1
- package/dist/types/server/useI18n.d.ts.map +1 -1
- package/dist/types/server/useIntlayer.d.ts +3 -6
- package/dist/types/server/useIntlayer.d.ts.map +1 -1
- package/dist/types/server/useLoadDynamic.d.ts.map +1 -1
- package/dist/types/server/useLocale.d.ts +0 -1
- package/dist/types/server/useLocale.d.ts.map +1 -1
- package/package.json +22 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../../src/client/format/useList.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../../src/client/format/useList.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;cA2Ba,gBAAO,6BAAA"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as _$_intlayer_types0 from "@intlayer/types";
|
|
2
|
-
|
|
3
1
|
//#region src/client/format/useNumber.d.ts
|
|
4
2
|
/**
|
|
5
3
|
* React client hook that provides a localized number formatter.
|
|
@@ -24,7 +22,7 @@ import * as _$_intlayer_types0 from "@intlayer/types";
|
|
|
24
22
|
* A number formatting function bound to the active locale.
|
|
25
23
|
*/
|
|
26
24
|
declare const useNumber: () => (value: string | number, args_1?: Intl.NumberFormatOptions & {
|
|
27
|
-
locale?:
|
|
25
|
+
locale?: import("@intlayer/types").LocalesValues;
|
|
28
26
|
}) => string;
|
|
29
27
|
//#endregion
|
|
30
28
|
export { useNumber };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../../src/client/format/useNumber.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../../src/client/format/useNumber.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;cA4Ba,kBAAS,wBAAA,SAAA,KAAA"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as _$_intlayer_types0 from "@intlayer/types";
|
|
2
|
-
|
|
3
1
|
//#region src/client/format/usePercentage.d.ts
|
|
4
2
|
/**
|
|
5
3
|
* React hook to provide a percentage formatter function
|
|
@@ -20,7 +18,7 @@ import * as _$_intlayer_types0 from "@intlayer/types";
|
|
|
20
18
|
* A function that formats numbers or numeric strings into localized percentages.
|
|
21
19
|
*/
|
|
22
20
|
declare const usePercentage: () => (value: string | number, args_1?: Intl.NumberFormatOptions & {
|
|
23
|
-
locale?:
|
|
21
|
+
locale?: import("@intlayer/types").LocalesValues;
|
|
24
22
|
}) => string;
|
|
25
23
|
//#endregion
|
|
26
24
|
export { usePercentage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../../src/client/format/usePercentage.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../../src/client/format/usePercentage.ts"],"mappings":";;;;;;;;;;;;;;;;;;;cAwBa,sBAAa,wBAAA,SAAA,KAAA"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as _$_intlayer_types0 from "@intlayer/types";
|
|
2
|
-
|
|
3
1
|
//#region src/client/format/useRelativeTime.d.ts
|
|
4
2
|
/**
|
|
5
3
|
* Client-side React hook for accessing a localized relative time formatter.
|
|
@@ -20,7 +18,7 @@ import * as _$_intlayer_types0 from "@intlayer/types";
|
|
|
20
18
|
* bound to the current client locale.
|
|
21
19
|
*/
|
|
22
20
|
declare const useRelativeTime: () => (from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
|
|
23
|
-
locale?:
|
|
21
|
+
locale?: import("@intlayer/types").LocalesValues;
|
|
24
22
|
unit?: Intl.RelativeTimeFormatUnit;
|
|
25
23
|
}) => string;
|
|
26
24
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../../src/client/format/useRelativeTime.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../../src/client/format/useRelativeTime.ts"],"mappings":";;;;;;;;;;;;;;;;;;;cAwBa,wBAAe,wBAAA,MAAA,uBAAA,MAAA,UAAA,KAAA"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as _$_intlayer_types0 from "@intlayer/types";
|
|
2
|
-
|
|
3
1
|
//#region src/client/format/useUnit.d.ts
|
|
4
2
|
/**
|
|
5
3
|
* React hook that provides a unit formatting function
|
|
@@ -19,7 +17,7 @@ import * as _$_intlayer_types0 from "@intlayer/types";
|
|
|
19
17
|
* @returns {Function} A unit formatting function that accepts a value and optional formatting options.
|
|
20
18
|
*/
|
|
21
19
|
declare const useUnit: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
22
|
-
locale?:
|
|
20
|
+
locale?: import("@intlayer/types").LocalesValues;
|
|
23
21
|
}) => string;
|
|
24
22
|
//#endregion
|
|
25
23
|
export { useUnit };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../../src/client/format/useUnit.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../../src/client/format/useUnit.ts"],"mappings":";;;;;;;;;;;;;;;;;;cAuBa,gBAAO,wBAAA,UAAA,KAAA"}
|
|
@@ -9,5 +9,6 @@ import { useLoadDynamic } from "./useLoadDynamic.js";
|
|
|
9
9
|
import { useLocale } from "./useLocale.js";
|
|
10
10
|
import { useLocaleBase } from "./useLocaleBase.js";
|
|
11
11
|
import { localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, useLocaleCookie, useLocaleStorage } from "./useLocaleStorage.js";
|
|
12
|
+
import { usePathname } from "./usePathname.js";
|
|
12
13
|
import { useRewriteURL } from "./useRewriteURL.js";
|
|
13
|
-
export { IntlayerClientContext, IntlayerProvider, IntlayerProviderContent, type IntlayerProviderProps, localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, t, useDictionary, useDictionaryAsync, useDictionaryDynamic, useI18n, useIntlayer, useIntlayerContext, useLoadDynamic, useLocale, useLocaleBase, useLocaleCookie, useLocaleStorage, useRewriteURL };
|
|
14
|
+
export { IntlayerClientContext, IntlayerProvider, IntlayerProviderContent, type IntlayerProviderProps, localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, t, useDictionary, useDictionaryAsync, useDictionaryDynamic, useI18n, useIntlayer, useIntlayerContext, useLoadDynamic, useLocale, useLocaleBase, useLocaleCookie, useLocaleStorage, usePathname, useRewriteURL };
|
package/dist/types/client/t.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"t.d.ts","names":[],"sources":["../../../src/client/t.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"t.d.ts","names":[],"sources":["../../../src/client/t.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;cAkCa,IAAK,kBAAgB,kBACd,oBAAoB,UAAQ,SACrC,kBAAa"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { IInterpreterPluginState
|
|
2
|
-
import * as _$_intlayer_core_interpreter0 from "@intlayer/core/interpreter";
|
|
1
|
+
import { IInterpreterPluginState } from "../plugins.js";
|
|
3
2
|
import { DeclaredLocales, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
4
|
-
import * as _$_intlayer_types0 from "@intlayer/types";
|
|
5
3
|
import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup } from "@intlayer/types/dictionary";
|
|
6
|
-
|
|
7
4
|
//#region src/client/useDictionary.d.ts
|
|
8
5
|
/**
|
|
9
6
|
* Client-side hook that transforms a dictionary (or qualified dictionary
|
|
@@ -12,7 +9,7 @@ import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup } from
|
|
|
12
9
|
* If the locale is not provided (directly or through the selector), it will
|
|
13
10
|
* use the locale from the client context.
|
|
14
11
|
*/
|
|
15
|
-
declare const useDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends LocalesValues | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) =>
|
|
12
|
+
declare const useDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends LocalesValues | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => import("@intlayer/core/interpreter").DeepTransformContent<import("@intlayer/types").ResolveQualifiedDictionaryContent<T, A>, IInterpreterPluginState, import("@intlayer/types").ExtractSelectorLocale<A>>;
|
|
16
13
|
//#endregion
|
|
17
14
|
export { useDictionary };
|
|
18
15
|
//# sourceMappingURL=useDictionary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../../src/client/useDictionary.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../../src/client/useDictionary.ts"],"mappings":";;;;;;;;;;;cAuBa,sBACL,UAAU,aAAa,gCACvB,UACF,gBACA,2BAA2B,KAAK,iBAAe,YAEvC,GAAC,mBACM,2CAAC,+CAAA,kCAAA,GAAA,IAAA,mDAAA,sBAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DeclaredLocales, LocalesValues, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
|
|
2
2
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
3
|
-
|
|
4
3
|
//#region src/client/useDictionaryAsync.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* On the server side, Hook that transform a dictionary and return the content
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryAsync.d.ts","names":[],"sources":["../../../src/client/useDictionaryAsync.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDictionaryAsync.d.ts","names":[],"sources":["../../../src/client/useDictionaryAsync.ts"],"mappings":";;;;;;;;cAkBa,2BACL,UAAU,kBACV,UAAU,gBAAgB,iBAAe,mBAE5B,0BAA0B,QAAQ,KAAG,SAC/C,MACR,QAAQ"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DictionaryKeys, DictionarySelectorForKey, LocalesValues, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
|
|
2
2
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
3
3
|
import { QualifiedDynamicLoaderMap } from "@intlayer/core/dictionaryManipulator";
|
|
4
|
-
|
|
5
4
|
//#region src/client/useDictionaryDynamic.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Client-side hook that lazily loads a dictionary and returns its content.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"mappings":";;;;;;;;;;;;;;;cAmCa,6BACL,UAAU,kBACV,UAAU,sBACV,UAAU,gBAAgB,yBAAyB,KAAK,eAAa,mBAGvE,0BAA0B,QAAQ,MAClC,2BAAyB,KACxB,GAAC,mBACa"}
|
|
@@ -2,7 +2,6 @@ import { DeepTransformContent } from "../plugins.js";
|
|
|
2
2
|
import { DeclaredLocales, DictionaryKeys, DictionaryRegistryContent, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
3
|
import { ValidDotPathsFor } from "@intlayer/core/transpiler";
|
|
4
4
|
import { GetSubPath } from "@intlayer/types/dictionary";
|
|
5
|
-
|
|
6
5
|
//#region src/client/useI18n.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* Hook that provides a translation function `t()` for accessing nested content by key.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useI18n.d.ts","names":[],"sources":["../../../src/client/useI18n.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useI18n.d.ts","names":[],"sources":["../../../src/client/useI18n.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;cAgCa,UACX,UAAU,gBACV,UAAU,gBAAgB,iBAAe,WAE9B,GAAC,SACH,OAkBE,UAAU,iBAAiB,IAAE,MAChC,MAEL,WAAW,qBAAqB,0BAA0B,KAAK"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { IInterpreterPluginState
|
|
2
|
-
import * as _$_intlayer_core_interpreter0 from "@intlayer/core/interpreter";
|
|
1
|
+
import { IInterpreterPluginState } from "../plugins.js";
|
|
3
2
|
import { DeclaredLocales, DictionaryKeys, DictionarySelectorForKey, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
4
|
-
import * as _$_intlayer_types0 from "@intlayer/types";
|
|
5
|
-
|
|
6
3
|
//#region src/client/useIntlayer.d.ts
|
|
7
4
|
/**
|
|
8
5
|
* Client-side hook that picks one dictionary by its key and returns its content.
|
|
@@ -10,7 +7,6 @@ import * as _$_intlayer_types0 from "@intlayer/types";
|
|
|
10
7
|
* The second argument is either a locale or a selector object:
|
|
11
8
|
* - `{ item: 2 }` — collection item (omit `item` to get every item as array)
|
|
12
9
|
* - `{ variant: 'black-friday' }` — named variant (omit for the `default` one)
|
|
13
|
-
* - `{ id: 'prod_abc', ...metaFields }` — meta record
|
|
14
10
|
* - `locale` composes with any selector and overrides the context locale
|
|
15
11
|
*
|
|
16
12
|
* @param key - The unique key of the dictionary to retrieve.
|
|
@@ -29,7 +25,7 @@ import * as _$_intlayer_types0 from "@intlayer/types";
|
|
|
29
25
|
* };
|
|
30
26
|
* ```
|
|
31
27
|
*/
|
|
32
|
-
declare const useIntlayer: <const T extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: A) =>
|
|
28
|
+
declare const useIntlayer: <const T extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: A) => import("@intlayer/core/interpreter").DeepTransformContent<import("@intlayer/types").DictionaryRegistryResult<T, A>, IInterpreterPluginState, import("@intlayer/types").ExtractSelectorLocale<A>>;
|
|
33
29
|
//#endregion
|
|
34
30
|
export { useIntlayer };
|
|
35
31
|
//# sourceMappingURL=useIntlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../../src/client/useIntlayer.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../../src/client/useIntlayer.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;cAqCa,oBACL,UAAU,sBACV,UAAU,gBAAgB,yBAAyB,KAAK,iBAAe,KAExE,GAAC,mBACa,2CAAC,+CAAA,yBAAA,GAAA,IAAA,mDAAA,sBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLoadDynamic.d.ts","names":[],"sources":["../../../src/client/useLoadDynamic.ts"],"mappings":";cA2Ba,
|
|
1
|
+
{"version":3,"file":"useLoadDynamic.d.ts","names":[],"sources":["../../../src/client/useLoadDynamic.ts"],"mappings":";cA2Ba,iBAAkB,GAAC,aAAa,SAAW,QAAQ,OAAK"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DeclaredLocales, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
|
-
|
|
3
2
|
//#region src/client/useLocale.d.ts
|
|
4
3
|
type UseLocaleProps = {
|
|
5
4
|
isCookieEnabled?: boolean;
|
|
@@ -34,10 +33,7 @@ type UseLocaleResult = {
|
|
|
34
33
|
* };
|
|
35
34
|
* ```
|
|
36
35
|
*/
|
|
37
|
-
declare const useLocale: ({
|
|
38
|
-
isCookieEnabled,
|
|
39
|
-
onLocaleChange
|
|
40
|
-
}?: UseLocaleProps) => UseLocaleResult;
|
|
36
|
+
declare const useLocale: ({ isCookieEnabled, onLocaleChange }?: UseLocaleProps) => UseLocaleResult;
|
|
41
37
|
//#endregion
|
|
42
38
|
export { UseLocaleProps, UseLocaleResult, useLocale };
|
|
43
39
|
//# sourceMappingURL=useLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"mappings":";;KAWY;EACV;EACA,kBAAkB,QAAQ;;KAGhB;EACV,QAAQ;EACR,eAAe;EACf,kBAAkB;EAClB,YAAY,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;cA0BT,cAAS,iBAAA,mBAGnB,mBAAsB"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import * as _$_intlayer_types0 from "@intlayer/types";
|
|
2
|
-
|
|
3
1
|
//#region src/client/useLocaleBase.d.ts
|
|
4
2
|
/**
|
|
5
3
|
* On the client side, hook to get the current locale and all related fields
|
|
6
4
|
*/
|
|
7
5
|
declare const useLocaleBase: () => {
|
|
8
|
-
locale:
|
|
6
|
+
locale: import("@intlayer/types").LocalesValues;
|
|
9
7
|
defaultLocale: any;
|
|
10
8
|
availableLocales: any;
|
|
11
|
-
setLocale: (newLocale:
|
|
9
|
+
setLocale: (newLocale: import("@intlayer/types").LocalesValues) => void;
|
|
12
10
|
};
|
|
13
11
|
//#endregion
|
|
14
12
|
export { useLocaleBase };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocaleBase.d.ts","names":[],"sources":["../../../src/client/useLocaleBase.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocaleBase.d.ts","names":[],"sources":["../../../src/client/useLocaleBase.ts"],"mappings":";;;;cAWa"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
|
-
import * as _$_intlayer_types0 from "@intlayer/types";
|
|
3
|
-
|
|
4
2
|
//#region src/client/useLocaleStorage.d.ts
|
|
5
3
|
/**
|
|
6
4
|
* Get the locale cookie
|
|
@@ -8,13 +6,13 @@ import * as _$_intlayer_types0 from "@intlayer/types";
|
|
|
8
6
|
/**
|
|
9
7
|
* Get the locale cookie
|
|
10
8
|
*/
|
|
11
|
-
declare const localeInStorage:
|
|
9
|
+
declare const localeInStorage: import("@intlayer/types").Locale;
|
|
12
10
|
/**
|
|
13
11
|
* @deprecated Use localeInStorage instead
|
|
14
12
|
*
|
|
15
13
|
* Get the locale cookie
|
|
16
14
|
*/
|
|
17
|
-
declare const localeCookie:
|
|
15
|
+
declare const localeCookie: import("@intlayer/types").Locale;
|
|
18
16
|
/**
|
|
19
17
|
* Set the locale cookie
|
|
20
18
|
*/
|
|
@@ -24,12 +22,12 @@ declare const setLocaleInStorage: (locale: LocalesValues, isCookieEnabled?: bool
|
|
|
24
22
|
*
|
|
25
23
|
* Set the locale cookie
|
|
26
24
|
*/
|
|
27
|
-
declare const setLocaleCookie:
|
|
25
|
+
declare const setLocaleCookie: typeof setLocaleInStorage;
|
|
28
26
|
/**
|
|
29
27
|
* Hook that provides the locale cookie and a function to set it
|
|
30
28
|
*/
|
|
31
29
|
declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
32
|
-
getLocale: () =>
|
|
30
|
+
getLocale: () => import("@intlayer/types").Locale;
|
|
33
31
|
setLocale: (locale: LocalesValues) => void;
|
|
34
32
|
};
|
|
35
33
|
/**
|
|
@@ -39,10 +37,7 @@ declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
|
39
37
|
*
|
|
40
38
|
* Hook that provides the locale cookie and a function to set it
|
|
41
39
|
*/
|
|
42
|
-
declare const useLocaleCookie:
|
|
43
|
-
getLocale: () => _$_intlayer_types0.Locale;
|
|
44
|
-
setLocale: (locale: LocalesValues) => void;
|
|
45
|
-
};
|
|
40
|
+
declare const useLocaleCookie: typeof useLocaleStorage;
|
|
46
41
|
//#endregion
|
|
47
42
|
export { localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, useLocaleCookie, useLocaleStorage };
|
|
48
43
|
//# sourceMappingURL=useLocaleStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;;;cAea,2CAAe;;;;;;cAMf,wCAAY;;;;cAKZ,qBAAkB,QACrB,eAAa;;;;;;cAaV,wBAAe;;;;cAKf,mBAAgB;;sBAAhB;;;;;;;;;cAiBA,wBAAe"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/client/usePathname.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* React hook that returns the current pathname with the locale segment removed.
|
|
4
|
+
*
|
|
5
|
+
* Reacts to browser back/forward navigation via the `popstate` event.
|
|
6
|
+
* Falls back to an empty string during server-side rendering.
|
|
7
|
+
*
|
|
8
|
+
* @returns The current pathname without the locale prefix.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { usePathname } from 'react-intlayer';
|
|
13
|
+
*
|
|
14
|
+
* const NavItem = ({ href }: { href: string }) => {
|
|
15
|
+
* const pathname = usePathname();
|
|
16
|
+
* return <a className={pathname === href ? 'active' : ''}>{href}</a>;
|
|
17
|
+
* };
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare const usePathname: () => string;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { usePathname };
|
|
23
|
+
//# sourceMappingURL=usePathname.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePathname.d.ts","names":[],"sources":["../../../src/client/usePathname.ts"],"mappings":";;;;;;;;;;;;;;;;;;;cAuBa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRewriteURL.d.ts","names":[],"sources":["../../../src/client/useRewriteURL.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useRewriteURL.d.ts","names":[],"sources":["../../../src/client/useRewriteURL.ts"],"mappings":";;;;;;;;;;;;;;;;;;;cA0Ba"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTraduction.d.ts","names":[],"sources":["../../../src/client/useTraduction.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTraduction.d.ts","names":[],"sources":["../../../src/client/useTraduction.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;cA0Ba,uBAAwB,kBAAgB,iBAClC,oBAAoB,aACpC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { NodeProps } from "@intlayer/core/interpreter";
|
|
2
2
|
import { FC, HTMLAttributes } from "react";
|
|
3
|
-
|
|
4
3
|
//#region src/editor/ContentSelector.d.ts
|
|
5
4
|
type ContentSelectorProps = NodeProps & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
|
|
6
5
|
declare const ContentSelector: FC<ContentSelectorProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSelector.d.ts","names":[],"sources":["../../../src/editor/ContentSelector.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentSelector.d.ts","names":[],"sources":["../../../src/editor/ContentSelector.tsx"],"mappings":";;;KAMY,uBAAuB,YACjC,KAAK,eAAe;cAET,iBAAiB,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorProvider.d.ts","names":[],"sources":["../../../src/editor/EditorProvider.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"EditorProvider.d.ts","names":[],"sources":["../../../src/editor/EditorProvider.tsx"],"mappings":";;cAGa,gBAAgB,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditor.d.ts","names":[],"sources":["../../../src/editor/useEditor.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useEditor.d.ts","names":[],"sources":["../../../src/editor/useEditor.tsx"],"mappings":";;;;;;cAaa"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { DeepTransformContent } from "./plugins.js";
|
|
2
2
|
import { DeclaredLocales, ExtractSelectorLocale, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
3
|
import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent } from "@intlayer/types/dictionary";
|
|
4
|
-
|
|
5
4
|
//#region src/getDictionary.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Transforms a dictionary (or qualified dictionary group) and returns its
|
|
8
7
|
* content for the given locale or selector (`{ item }`, `{ variant }`,
|
|
9
|
-
*
|
|
8
|
+
* optionally combined with `locale`).
|
|
10
9
|
*/
|
|
11
10
|
declare const getDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends LocalesValues | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => DeepTransformContent<ResolveQualifiedDictionaryContent<T, A>, ExtractSelectorLocale<A>>;
|
|
12
11
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDictionary.d.ts","names":[],"sources":["../../src/getDictionary.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getDictionary.d.ts","names":[],"sources":["../../src/getDictionary.ts"],"mappings":";;;;;;;;;cAmBa,sBACL,UAAU,aAAa,gCACvB,UACF,gBACA,2BAA2B,KAAK,iBAAe,YAEvC,GAAC,mBACM,MAClB,qBACD,kCAAkC,GAAG,IACrC,sBAAsB"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { DeepTransformContent } from "./plugins.js";
|
|
2
2
|
import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
|
-
|
|
4
3
|
//#region src/getIntlayer.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Picks one dictionary by its key and returns its content for the given
|
|
7
|
-
* locale or selector (`{ item }`, `{ variant }`,
|
|
6
|
+
* locale or selector (`{ item }`, `{ variant }`,
|
|
8
7
|
* optionally combined with `locale`).
|
|
9
8
|
*/
|
|
10
9
|
declare const getIntlayer: <const T extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: A) => DeepTransformContent<DictionaryRegistryResult<T, A>, ExtractSelectorLocale<A>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getIntlayer.d.ts","names":[],"sources":["../../src/getIntlayer.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getIntlayer.d.ts","names":[],"sources":["../../src/getIntlayer.ts"],"mappings":";;;;;;;;cAgBa,oBACL,UAAU,sBACV,UAAU,gBAAgB,yBAAyB,KAAK,iBAAe,KAExE,GAAC,mBACa,MAClB,qBACD,yBAAyB,GAAG,IAC5B,sBAAsB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, FC, HTMLAttributes, JSX } from "react";
|
|
2
2
|
import { HTMLTagsType } from "@intlayer/core/transpiler";
|
|
3
|
-
|
|
4
3
|
//#region src/html/HTMLComponentTypes.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Helper to map string types from dictionary to TypeScript types
|
|
@@ -9,7 +8,7 @@ type PropTypeMap<T> = T extends 'string' ? string : T extends 'number' ? number
|
|
|
9
8
|
/**
|
|
10
9
|
* Helper to extract specific props from the configuration value.
|
|
11
10
|
*/
|
|
12
|
-
type PropsFromConfig<Value> = Value extends true ? {} : Value extends object ? { [K in Exclude<keyof Value, 'children'>]?: PropTypeMap<Value[K]
|
|
11
|
+
type PropsFromConfig<Value> = Value extends true ? {} : Value extends object ? { [K in Exclude<keyof Value, 'children'>]?: PropTypeMap<Value[K]>; } : {};
|
|
13
12
|
/**
|
|
14
13
|
* Smart Type to resolve props based on the key K.
|
|
15
14
|
*/
|
|
@@ -18,12 +17,12 @@ type ElementProps<K> = K extends keyof JSX.IntrinsicElements ? ComponentProps<K>
|
|
|
18
17
|
* Helper: Defines the mapping for the explicitly listed keys in T.
|
|
19
18
|
* Handles whether they are Required or Optional.
|
|
20
19
|
*/
|
|
21
|
-
type DefinedComponents<T, IsRequired extends boolean> = IsRequired extends true ? { [K in keyof T]: FC<ElementProps<K> & PropsFromConfig<T[K]
|
|
20
|
+
type DefinedComponents<T, IsRequired extends boolean> = IsRequired extends true ? { [K in keyof T]: FC<ElementProps<K> & PropsFromConfig<T[K]>>; } : { [K in keyof T]?: FC<ElementProps<K> & PropsFromConfig<T[K]>>; };
|
|
22
21
|
/**
|
|
23
22
|
* Helper: Defines the standard HTML tags NOT listed in T.
|
|
24
23
|
* These are always optional when included.
|
|
25
24
|
*/
|
|
26
|
-
type RestHTMLComponents<T> = { [K in Exclude<keyof HTMLTagsType, keyof T>]?: FC<K extends keyof JSX.IntrinsicElements ? ComponentProps<K> : HTMLAttributes<HTMLElement
|
|
25
|
+
type RestHTMLComponents<T> = { [K in Exclude<keyof HTMLTagsType, keyof T>]?: FC<K extends keyof JSX.IntrinsicElements ? ComponentProps<K> : HTMLAttributes<HTMLElement>>; };
|
|
27
26
|
/**
|
|
28
27
|
* The supported modes for the HTMLComponents type.
|
|
29
28
|
*/
|
|
@@ -31,12 +30,12 @@ type HTMLComponentMode = 'permissive' | 'optional' | 'inclusive' | 'strict';
|
|
|
31
30
|
/**
|
|
32
31
|
* The main component definition with Mode support.
|
|
33
32
|
*/
|
|
34
|
-
type HTMLComponents<Mode extends HTMLComponentMode = 'optional', T = {}> = Mode extends 'strict' ? DefinedComponents<T, true> : Mode extends 'inclusive'
|
|
35
|
-
DefinedComponents<T, true> & RestHTMLComponents<T> : Mode extends 'permissive'
|
|
36
|
-
DefinedComponents<T, false> & RestHTMLComponents<T> & {
|
|
33
|
+
type HTMLComponents<Mode extends HTMLComponentMode = 'optional', T = {}> = Mode extends 'strict' ? DefinedComponents<T, true> : Mode extends 'inclusive' // Inclusive: Keys in T are required. Rest of HTML is optional.
|
|
34
|
+
? DefinedComponents<T, true> & RestHTMLComponents<T> : Mode extends 'permissive' // Permissive: Keys in T optional. Rest of HTML optional. Any other string allowed.
|
|
35
|
+
? DefinedComponents<T, false> & RestHTMLComponents<T> & {
|
|
37
36
|
[key: string]: FC<any>;
|
|
38
|
-
}
|
|
39
|
-
DefinedComponents<T, false> & RestHTMLComponents<T>;
|
|
37
|
+
} // Optional (Default): Keys in T optional. Rest of HTML optional.
|
|
38
|
+
: DefinedComponents<T, false> & RestHTMLComponents<T>;
|
|
40
39
|
//#endregion
|
|
41
40
|
export { HTMLComponentMode, HTMLComponents };
|
|
42
41
|
//# sourceMappingURL=HTMLComponentTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTMLComponentTypes.d.ts","names":[],"sources":["../../../src/html/HTMLComponentTypes.tsx"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"HTMLComponentTypes.d.ts","names":[],"sources":["../../../src/html/HTMLComponentTypes.tsx"],"mappings":";;;;;;KAMK,YAAY,KAAK,8BAElB,8BAEE,gCAEE;;;;KAKH,gBAAgB,SAAS,0BAE1B,0BACK,KAAK,cAAc,sBAAsB,YAAY,MAAM;;;;KAM/D,aAAa,KAAK,gBAAgB,IAAI,oBACvC,eAAe,KACf,eAAe;;;;;KAMd,kBAAkB,GAAG,8BAA8B,6BAGjD,WAAW,IAAI,GAAG,aAAa,KAAK,gBAAgB,EAAE,aAItD,WAAW,KAAK,GAAG,aAAa,KAAK,gBAAgB,EAAE;;;;;KAOzD,mBAAmB,QACrB,KAAK,cAAc,oBAAoB,MAAM,GAC5C,gBAAgB,IAAI,oBAChB,eAAe,KACf,eAAe;;;;KAOX;;;;KASA,eACV,aAAa,gCACb,UACE,wBAEA,kBAAkB,WAClB;GAEE,kBAAkB,WAAW,mBAAmB,KAChD;GAEE,kBAAkB,YAChB,mBAAmB;GAChB,cAAc;;GAGnB,kBAAkB,YAAY,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTMLProvider.d.ts","names":[],"sources":["../../../src/html/HTMLProvider.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"HTMLProvider.d.ts","names":[],"sources":["../../../src/html/HTMLProvider.tsx"],"mappings":";;;KAUK;EACH,aAAa;;KAGV,oBAAoB;;;;EAIvB,aAAa;;cAKF,sBAAc;cAEd,cAAc,GAAG"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { HTMLComponents } from "./HTMLComponentTypes.js";
|
|
2
2
|
import { FC, JSX } from "react";
|
|
3
|
-
|
|
4
3
|
//#region src/html/HTMLRenderer.d.ts
|
|
5
4
|
type RenderHTMLProps = {
|
|
6
5
|
/**
|
|
@@ -15,18 +14,14 @@ type RenderHTMLProps = {
|
|
|
15
14
|
* This function does not use context from HTMLProvider. Use `useHTMLRenderer`
|
|
16
15
|
* hook if you want to leverage provider context.
|
|
17
16
|
*/
|
|
18
|
-
declare const renderHTML: (content: string, {
|
|
19
|
-
components
|
|
20
|
-
}?: RenderHTMLProps) => JSX.Element;
|
|
17
|
+
declare const renderHTML: (content: string, { components }?: RenderHTMLProps) => JSX.Element;
|
|
21
18
|
/**
|
|
22
19
|
* Hook that returns a function to render HTML content.
|
|
23
20
|
*
|
|
24
21
|
* This hook considers the configuration from the `HTMLProvider` context if available,
|
|
25
22
|
* falling back to the provided components.
|
|
26
23
|
*/
|
|
27
|
-
declare const useHTMLRenderer: ({
|
|
28
|
-
components
|
|
29
|
-
}?: RenderHTMLProps) => (content: string) => JSX.Element;
|
|
24
|
+
declare const useHTMLRenderer: ({ components }?: RenderHTMLProps) => (content: string) => JSX.Element;
|
|
30
25
|
type HTMLRendererProps = RenderHTMLProps & {
|
|
31
26
|
/**
|
|
32
27
|
* The HTML content to render as a string.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTMLRenderer.d.ts","names":[],"sources":["../../../src/html/HTMLRenderer.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"HTMLRenderer.d.ts","names":[],"sources":["../../../src/html/HTMLRenderer.tsx"],"mappings":";;;KAQY;;;;;EAKV,aAAa;;;;;;;;cASF,aAAU,mBACN,eACM,oBACpB,IAAI;;;;;;;cAuCM,oBAAe,eAAoB,qBAAe,oBAGtC,IAAA;KAUb,oBAAoB;;;;EAI9B;;;;;;;;cASW,cAAc,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTMLRendererPlugin.d.ts","names":[],"sources":["../../../src/html/HTMLRendererPlugin.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"HTMLRendererPlugin.d.ts","names":[],"sources":["../../../src/html/HTMLRendererPlugin.tsx"],"mappings":";;KAIK;EACH;EACA,iBAAiB;;cAGN,oBAAoB,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/html/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/html/types.ts"],"mappings":";;KAEY;EACV,WAAW;GACV"}
|