react-intlayer 9.4.2 → 9.4.4
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/markdown/MarkdownProvider.cjs.map +1 -1
- package/dist/esm/markdown/MarkdownProvider.mjs.map +1 -1
- package/dist/types/IntlayerNode.d.ts +2 -3
- package/dist/types/IntlayerNode.d.ts.map +1 -1
- package/dist/types/UI/ContentSelector.d.ts +1 -2
- package/dist/types/UI/ContentSelector.d.ts.map +1 -1
- package/dist/types/analytics/AnalyticsProvider.d.ts +1 -2
- package/dist/types/analytics/AnalyticsProvider.d.ts.map +1 -1
- package/dist/types/analytics/exposureSink.d.ts +4 -5
- package/dist/types/analytics/exposureSink.d.ts.map +1 -1
- package/dist/types/analytics/useAnalytics.d.ts +1 -2
- package/dist/types/analytics/useAnalytics.d.ts.map +1 -1
- package/dist/types/analytics/useConversion.d.ts +2 -3
- package/dist/types/analytics/useConversion.d.ts.map +1 -1
- package/dist/types/analytics/useExperiment.d.ts +2 -3
- package/dist/types/analytics/useExperiment.d.ts.map +1 -1
- package/dist/types/client/IntlayerProvider.d.ts +5 -6
- package/dist/types/client/IntlayerProvider.d.ts.map +1 -1
- package/dist/types/client/format/useCompact.d.ts +1 -2
- package/dist/types/client/format/useCompact.d.ts.map +1 -1
- package/dist/types/client/format/useCurrency.d.ts +1 -2
- package/dist/types/client/format/useCurrency.d.ts.map +1 -1
- package/dist/types/client/format/useDate.d.ts +1 -2
- package/dist/types/client/format/useDate.d.ts.map +1 -1
- package/dist/types/client/format/useIntl.d.ts +1 -2
- package/dist/types/client/format/useIntl.d.ts.map +1 -1
- package/dist/types/client/format/useList.d.ts +1 -6
- package/dist/types/client/format/useList.d.ts.map +1 -1
- package/dist/types/client/format/useNumber.d.ts +1 -2
- package/dist/types/client/format/useNumber.d.ts.map +1 -1
- package/dist/types/client/format/usePercentage.d.ts +1 -2
- package/dist/types/client/format/usePercentage.d.ts.map +1 -1
- package/dist/types/client/format/useRelativeTime.d.ts +1 -2
- package/dist/types/client/format/useRelativeTime.d.ts.map +1 -1
- package/dist/types/client/format/useUnit.d.ts +1 -2
- package/dist/types/client/format/useUnit.d.ts.map +1 -1
- package/dist/types/client/t.d.ts +1 -2
- package/dist/types/client/t.d.ts.map +1 -1
- package/dist/types/client/useDictionary.d.ts +1 -2
- package/dist/types/client/useDictionary.d.ts.map +1 -1
- package/dist/types/client/useDictionaryAsync.d.ts +1 -2
- package/dist/types/client/useDictionaryAsync.d.ts.map +1 -1
- package/dist/types/client/useDictionaryDynamic.d.ts +1 -2
- package/dist/types/client/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/client/useI18n.d.ts +1 -2
- package/dist/types/client/useI18n.d.ts.map +1 -1
- package/dist/types/client/useIntlayer.d.ts +1 -2
- package/dist/types/client/useIntlayer.d.ts.map +1 -1
- package/dist/types/client/useLoadDynamic.d.ts +2 -3
- package/dist/types/client/useLoadDynamic.d.ts.map +1 -1
- package/dist/types/client/useLocale.d.ts +3 -4
- package/dist/types/client/useLocale.d.ts.map +1 -1
- package/dist/types/client/useLocaleBase.d.ts +1 -2
- package/dist/types/client/useLocaleBase.d.ts.map +1 -1
- package/dist/types/client/useLocaleStorage.d.ts +6 -7
- package/dist/types/client/useLocaleStorage.d.ts.map +1 -1
- package/dist/types/client/usePathname.d.ts +1 -2
- package/dist/types/client/usePathname.d.ts.map +1 -1
- package/dist/types/client/useRewriteURL.d.ts +1 -2
- package/dist/types/client/useRewriteURL.d.ts.map +1 -1
- package/dist/types/client/useTraduction.d.ts +1 -2
- package/dist/types/client/useTraduction.d.ts.map +1 -1
- package/dist/types/editor/ContentSelector.d.ts +2 -3
- package/dist/types/editor/ContentSelector.d.ts.map +1 -1
- package/dist/types/editor/EditorProvider.d.ts +1 -2
- package/dist/types/editor/EditorProvider.d.ts.map +1 -1
- package/dist/types/editor/useEditor.d.ts +1 -2
- 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 +2 -3
- package/dist/types/html/HTMLComponentTypes.d.ts.map +1 -1
- package/dist/types/html/HTMLProvider.d.ts +2 -3
- package/dist/types/html/HTMLProvider.d.ts.map +1 -1
- package/dist/types/html/HTMLRenderer.d.ts +5 -6
- package/dist/types/html/HTMLRenderer.d.ts.map +1 -1
- package/dist/types/html/HTMLRendererPlugin.d.ts +1 -2
- package/dist/types/html/HTMLRendererPlugin.d.ts.map +1 -1
- package/dist/types/html/types.d.ts +1 -2
- package/dist/types/html/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +10 -18
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/markdown/MarkdownProvider.d.ts +5 -6
- package/dist/types/markdown/MarkdownProvider.d.ts.map +1 -1
- package/dist/types/markdown/MarkdownRenderer.d.ts +5 -6
- package/dist/types/markdown/MarkdownRenderer.d.ts.map +1 -1
- package/dist/types/markdown/MarkdownRendererPlugin.d.ts +1 -2
- package/dist/types/markdown/MarkdownRendererPlugin.d.ts.map +1 -1
- package/dist/types/markdown/processor.d.ts +4 -4
- package/dist/types/markdown/processor.d.ts.map +1 -1
- package/dist/types/markdown/runtime.d.ts +2 -3
- package/dist/types/markdown/runtime.d.ts.map +1 -1
- package/dist/types/plugins.d.ts +16 -17
- package/dist/types/plugins.d.ts.map +1 -1
- package/dist/types/reactElement/renderReactElement.d.ts +1 -2
- package/dist/types/reactElement/renderReactElement.d.ts.map +1 -1
- package/dist/types/server/IntlayerServerProvider.d.ts +8 -9
- package/dist/types/server/IntlayerServerProvider.d.ts.map +1 -1
- package/dist/types/server/format/useCompact.d.ts +1 -2
- package/dist/types/server/format/useCompact.d.ts.map +1 -1
- package/dist/types/server/format/useCurrency.d.ts +1 -2
- package/dist/types/server/format/useCurrency.d.ts.map +1 -1
- package/dist/types/server/format/useDate.d.ts +1 -2
- package/dist/types/server/format/useDate.d.ts.map +1 -1
- package/dist/types/server/format/useIntl.d.ts +1 -2
- package/dist/types/server/format/useIntl.d.ts.map +1 -1
- package/dist/types/server/format/useList.d.ts +1 -2
- package/dist/types/server/format/useList.d.ts.map +1 -1
- package/dist/types/server/format/useNumber.d.ts +1 -2
- package/dist/types/server/format/useNumber.d.ts.map +1 -1
- package/dist/types/server/format/usePercentage.d.ts +1 -2
- package/dist/types/server/format/usePercentage.d.ts.map +1 -1
- package/dist/types/server/format/useRelativeTime.d.ts +1 -2
- package/dist/types/server/format/useRelativeTime.d.ts.map +1 -1
- package/dist/types/server/format/useUnit.d.ts +1 -2
- package/dist/types/server/format/useUnit.d.ts.map +1 -1
- package/dist/types/server/serverContext.d.ts +3 -4
- package/dist/types/server/serverContext.d.ts.map +1 -1
- package/dist/types/server/t.d.ts +1 -2
- package/dist/types/server/t.d.ts.map +1 -1
- package/dist/types/server/useDictionary.d.ts +1 -2
- package/dist/types/server/useDictionary.d.ts.map +1 -1
- package/dist/types/server/useDictionaryAsync.d.ts +1 -2
- package/dist/types/server/useDictionaryAsync.d.ts.map +1 -1
- package/dist/types/server/useDictionaryDynamic.d.ts +1 -2
- package/dist/types/server/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/server/useI18n.d.ts +1 -2
- package/dist/types/server/useI18n.d.ts.map +1 -1
- package/dist/types/server/useIntlayer.d.ts +1 -2
- package/dist/types/server/useIntlayer.d.ts.map +1 -1
- package/dist/types/server/useLoadDynamic.d.ts +1 -2
- package/dist/types/server/useLoadDynamic.d.ts.map +1 -1
- package/dist/types/server/useLocale.d.ts +2 -3
- package/dist/types/server/useLocale.d.ts.map +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownProvider.cjs","names":["createContext","useContext","compileMarkdown"],"sources":["../../../src/markdown/MarkdownProvider.tsx"],"sourcesContent":["'use client';\n\nimport {\n createContext,\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\n type ReactNode,\n useContext,\n} from 'react';\nimport type { HTMLComponents } from '../html/HTMLComponentTypes';\nimport {\n compileMarkdown,\n type MarkdownRendererOptions,\n type ParsedMarkdown,\n} from './processor';\n\nexport type MarkdownProviderOptions = {\n /** Forces the compiler to always output content with a block-level wrapper. */\n forceBlock?: boolean;\n /** Forces the compiler to always output content with an inline wrapper. */\n forceInline?: boolean;\n /** Whether to preserve frontmatter in the markdown content. */\n preserveFrontmatter?: boolean;\n /** Whether to use the GitHub Tag Filter for security. */\n tagfilter?: boolean;\n};\n\
|
|
1
|
+
{"version":3,"file":"MarkdownProvider.cjs","names":["createContext","useContext","compileMarkdown"],"sources":["../../../src/markdown/MarkdownProvider.tsx"],"sourcesContent":["'use client';\n\nimport {\n createContext,\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\n type ReactNode,\n useContext,\n} from 'react';\nimport type { HTMLComponents } from '../html/HTMLComponentTypes';\nimport {\n compileMarkdown,\n type MarkdownRendererOptions,\n type ParsedMarkdown,\n} from './processor';\n\nexport type MarkdownProviderOptions = {\n /** Forces the compiler to always output content with a block-level wrapper. */\n forceBlock?: boolean;\n /** Forces the compiler to always output content with an inline wrapper. */\n forceInline?: boolean;\n /** Whether to preserve frontmatter in the markdown content. */\n preserveFrontmatter?: boolean;\n /** Whether to use the GitHub Tag Filter for security. */\n tagfilter?: boolean;\n};\n\nexport type MarkdownContextValue = {\n components?: HTMLComponents<'permissive', {}>;\n renderMarkdown: (\n markdown: string | ParsedMarkdown,\n options?: MarkdownProviderOptions,\n components?: HTMLComponents<'permissive', {}>,\n wrapper?: FC<HTMLAttributes<HTMLElement>>\n ) => ReactNode | Promise<ReactNode>;\n};\n\nexport type MarkdownProviderProps = PropsWithChildren<\n MarkdownProviderOptions & {\n components?: HTMLComponents<'permissive', {}>;\n wrapper?: FC<HTMLAttributes<HTMLElement>>;\n renderMarkdown?: (\n markdown: string | ParsedMarkdown,\n options?: MarkdownProviderOptions,\n components?: HTMLComponents<'permissive', {}>,\n wrapper?: FC<HTMLAttributes<HTMLElement>>\n ) => ReactNode | Promise<ReactNode>;\n }\n>;\n\nconst MarkdownContext = createContext<MarkdownContextValue | undefined>(\n undefined\n);\n\n/**\n * Returns the raw `MarkdownProvider` context value — the active\n * `renderMarkdown` function plus any provider-level component overrides.\n * Returns `undefined` when called outside a `<MarkdownProvider>`.\n * Prefer `useMarkdownRenderer` for most use cases; use this hook only when\n * you need direct access to the context object itself.\n */\nexport const useMarkdownContext = () => useContext(MarkdownContext);\n\nconst mergeOptions = (\n baseOptions: MarkdownRendererOptions,\n options: MarkdownProviderOptions = {},\n components: HTMLComponents<'permissive', {}> = {},\n wrapper?: FC<HTMLAttributes<HTMLElement>>\n): MarkdownRendererOptions => {\n return {\n ...baseOptions,\n ...options,\n forceBlock: options.forceBlock ?? baseOptions.forceBlock,\n forceInline: options.forceInline ?? baseOptions.forceInline,\n preserveFrontmatter:\n options.preserveFrontmatter ?? baseOptions.preserveFrontmatter,\n tagfilter: options.tagfilter ?? baseOptions.tagfilter,\n wrapper: wrapper || baseOptions.wrapper,\n\n forceWrapper: !!(wrapper || baseOptions.wrapper),\n components: { ...baseOptions.components, ...components },\n };\n};\n\n/**\n * Provider for the MarkdownRenderer component.\n *\n * It will provide the `renderMarkdown` function to the context, which can be used to render markdown.\n *\n * ```tsx\n * const content = useIntlayer('app');\n *\n * return (\n * <div>\n * {content.markdown} // Will be rendered with the components and options provided to the MarkdownProvider\n * </div>\n * );\n * ```\n *\n * @example\n * ```tsx\n * <MarkdownProvider components={{ h1: CustomHeading }}>\n * <MarkdownRenderer>\n * {markdownContent}\n * </MarkdownRenderer>\n * </MarkdownProvider>\n * ```\n */\nexport const MarkdownProvider: FC<MarkdownProviderProps> = ({\n children,\n components,\n wrapper,\n forceBlock,\n forceInline,\n preserveFrontmatter,\n tagfilter,\n renderMarkdown: customRenderFn,\n}) => {\n const baseOptions: MarkdownRendererOptions = {\n components,\n forceBlock,\n forceInline,\n wrapper,\n forceWrapper: !!wrapper,\n preserveFrontmatter,\n tagfilter,\n };\n\n // Standard internal renderer\n const defaultRenderMarkdown = (\n markdown: string | ParsedMarkdown,\n options?: MarkdownProviderOptions,\n components?: HTMLComponents<'permissive', {}>,\n wrapper?: FC<HTMLAttributes<HTMLElement>>\n ) => {\n const mergedOptions = mergeOptions(\n baseOptions,\n options,\n components,\n wrapper\n );\n\n return compileMarkdown(markdown, mergedOptions);\n };\n\n // Wrapper for user-provided custom renderer\n // Note: We wrap in a clean Provider to prevent infinite recursion\n const customRenderMarkdownWrapper = (\n markdown: string | ParsedMarkdown,\n options?: MarkdownProviderOptions,\n components?: HTMLComponents<'permissive', {}>,\n wrapper?: FC<HTMLAttributes<HTMLElement>>\n ) => (\n <MarkdownContext.Provider value={undefined}>\n {customRenderFn?.(markdown, options, components, wrapper) as ReactNode}\n </MarkdownContext.Provider>\n );\n\n return (\n <MarkdownContext.Provider\n value={{\n components,\n renderMarkdown: customRenderFn\n ? customRenderMarkdownWrapper\n : defaultRenderMarkdown,\n }}\n >\n {children}\n </MarkdownContext.Provider>\n );\n};\n"],"mappings":";;;;;;;;AAmDA,MAAM,sBAAkBA,qBACtB,MACF;;;;;;;;AASA,MAAa,+BAA2BC,kBAAW,eAAe;AAElE,MAAM,gBACJ,aACA,UAAmC,CAAC,GACpC,aAA+C,CAAC,GAChD,YAC4B;CAC5B,OAAO;EACL,GAAG;EACH,GAAG;EACH,YAAY,QAAQ,cAAc,YAAY;EAC9C,aAAa,QAAQ,eAAe,YAAY;EAChD,qBACE,QAAQ,uBAAuB,YAAY;EAC7C,WAAW,QAAQ,aAAa,YAAY;EAC5C,SAAS,WAAW,YAAY;EAEhC,cAAc,CAAC,EAAE,WAAW,YAAY;EACxC,YAAY;GAAE,GAAG,YAAY;GAAY,GAAG;EAAW;CACzD;AACF;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAa,oBAA+C,EAC1D,UACA,YACA,SACA,YACA,aACA,qBACA,WACA,gBAAgB,qBACZ;CACJ,MAAM,cAAuC;EAC3C;EACA;EACA;EACA;EACA,cAAc,CAAC,CAAC;EAChB;EACA;CACF;CAGA,MAAM,yBACJ,UACA,SACA,YACA,YACG;EACH,MAAM,gBAAgB,aACpB,aACA,SACA,YACA,OACF;EAEA,OAAOC,2CAAgB,UAAU,aAAa;CAChD;CAIA,MAAM,+BACJ,UACA,SACA,YACA,YAEA,2CAAC,gBAAgB,UAAjB;EAA0B,OAAO;YAC9B,iBAAiB,UAAU,SAAS,YAAY,OAAO;CAChC;CAG5B,OACE,2CAAC,gBAAgB,UAAjB;EACE,OAAO;GACL;GACA,gBAAgB,iBACZ,8BACA;EACN;EAEC;CACuB;AAE9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownProvider.mjs","names":[],"sources":["../../../src/markdown/MarkdownProvider.tsx"],"sourcesContent":["'use client';\n\nimport {\n createContext,\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\n type ReactNode,\n useContext,\n} from 'react';\nimport type { HTMLComponents } from '../html/HTMLComponentTypes';\nimport {\n compileMarkdown,\n type MarkdownRendererOptions,\n type ParsedMarkdown,\n} from './processor';\n\nexport type MarkdownProviderOptions = {\n /** Forces the compiler to always output content with a block-level wrapper. */\n forceBlock?: boolean;\n /** Forces the compiler to always output content with an inline wrapper. */\n forceInline?: boolean;\n /** Whether to preserve frontmatter in the markdown content. */\n preserveFrontmatter?: boolean;\n /** Whether to use the GitHub Tag Filter for security. */\n tagfilter?: boolean;\n};\n\
|
|
1
|
+
{"version":3,"file":"MarkdownProvider.mjs","names":[],"sources":["../../../src/markdown/MarkdownProvider.tsx"],"sourcesContent":["'use client';\n\nimport {\n createContext,\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\n type ReactNode,\n useContext,\n} from 'react';\nimport type { HTMLComponents } from '../html/HTMLComponentTypes';\nimport {\n compileMarkdown,\n type MarkdownRendererOptions,\n type ParsedMarkdown,\n} from './processor';\n\nexport type MarkdownProviderOptions = {\n /** Forces the compiler to always output content with a block-level wrapper. */\n forceBlock?: boolean;\n /** Forces the compiler to always output content with an inline wrapper. */\n forceInline?: boolean;\n /** Whether to preserve frontmatter in the markdown content. */\n preserveFrontmatter?: boolean;\n /** Whether to use the GitHub Tag Filter for security. */\n tagfilter?: boolean;\n};\n\nexport type MarkdownContextValue = {\n components?: HTMLComponents<'permissive', {}>;\n renderMarkdown: (\n markdown: string | ParsedMarkdown,\n options?: MarkdownProviderOptions,\n components?: HTMLComponents<'permissive', {}>,\n wrapper?: FC<HTMLAttributes<HTMLElement>>\n ) => ReactNode | Promise<ReactNode>;\n};\n\nexport type MarkdownProviderProps = PropsWithChildren<\n MarkdownProviderOptions & {\n components?: HTMLComponents<'permissive', {}>;\n wrapper?: FC<HTMLAttributes<HTMLElement>>;\n renderMarkdown?: (\n markdown: string | ParsedMarkdown,\n options?: MarkdownProviderOptions,\n components?: HTMLComponents<'permissive', {}>,\n wrapper?: FC<HTMLAttributes<HTMLElement>>\n ) => ReactNode | Promise<ReactNode>;\n }\n>;\n\nconst MarkdownContext = createContext<MarkdownContextValue | undefined>(\n undefined\n);\n\n/**\n * Returns the raw `MarkdownProvider` context value — the active\n * `renderMarkdown` function plus any provider-level component overrides.\n * Returns `undefined` when called outside a `<MarkdownProvider>`.\n * Prefer `useMarkdownRenderer` for most use cases; use this hook only when\n * you need direct access to the context object itself.\n */\nexport const useMarkdownContext = () => useContext(MarkdownContext);\n\nconst mergeOptions = (\n baseOptions: MarkdownRendererOptions,\n options: MarkdownProviderOptions = {},\n components: HTMLComponents<'permissive', {}> = {},\n wrapper?: FC<HTMLAttributes<HTMLElement>>\n): MarkdownRendererOptions => {\n return {\n ...baseOptions,\n ...options,\n forceBlock: options.forceBlock ?? baseOptions.forceBlock,\n forceInline: options.forceInline ?? baseOptions.forceInline,\n preserveFrontmatter:\n options.preserveFrontmatter ?? baseOptions.preserveFrontmatter,\n tagfilter: options.tagfilter ?? baseOptions.tagfilter,\n wrapper: wrapper || baseOptions.wrapper,\n\n forceWrapper: !!(wrapper || baseOptions.wrapper),\n components: { ...baseOptions.components, ...components },\n };\n};\n\n/**\n * Provider for the MarkdownRenderer component.\n *\n * It will provide the `renderMarkdown` function to the context, which can be used to render markdown.\n *\n * ```tsx\n * const content = useIntlayer('app');\n *\n * return (\n * <div>\n * {content.markdown} // Will be rendered with the components and options provided to the MarkdownProvider\n * </div>\n * );\n * ```\n *\n * @example\n * ```tsx\n * <MarkdownProvider components={{ h1: CustomHeading }}>\n * <MarkdownRenderer>\n * {markdownContent}\n * </MarkdownRenderer>\n * </MarkdownProvider>\n * ```\n */\nexport const MarkdownProvider: FC<MarkdownProviderProps> = ({\n children,\n components,\n wrapper,\n forceBlock,\n forceInline,\n preserveFrontmatter,\n tagfilter,\n renderMarkdown: customRenderFn,\n}) => {\n const baseOptions: MarkdownRendererOptions = {\n components,\n forceBlock,\n forceInline,\n wrapper,\n forceWrapper: !!wrapper,\n preserveFrontmatter,\n tagfilter,\n };\n\n // Standard internal renderer\n const defaultRenderMarkdown = (\n markdown: string | ParsedMarkdown,\n options?: MarkdownProviderOptions,\n components?: HTMLComponents<'permissive', {}>,\n wrapper?: FC<HTMLAttributes<HTMLElement>>\n ) => {\n const mergedOptions = mergeOptions(\n baseOptions,\n options,\n components,\n wrapper\n );\n\n return compileMarkdown(markdown, mergedOptions);\n };\n\n // Wrapper for user-provided custom renderer\n // Note: We wrap in a clean Provider to prevent infinite recursion\n const customRenderMarkdownWrapper = (\n markdown: string | ParsedMarkdown,\n options?: MarkdownProviderOptions,\n components?: HTMLComponents<'permissive', {}>,\n wrapper?: FC<HTMLAttributes<HTMLElement>>\n ) => (\n <MarkdownContext.Provider value={undefined}>\n {customRenderFn?.(markdown, options, components, wrapper) as ReactNode}\n </MarkdownContext.Provider>\n );\n\n return (\n <MarkdownContext.Provider\n value={{\n components,\n renderMarkdown: customRenderFn\n ? customRenderMarkdownWrapper\n : defaultRenderMarkdown,\n }}\n >\n {children}\n </MarkdownContext.Provider>\n );\n};\n"],"mappings":";;;;;;;AAmDA,MAAM,kBAAkB,cACtB,MACF;;;;;;;;AASA,MAAa,2BAA2B,WAAW,eAAe;AAElE,MAAM,gBACJ,aACA,UAAmC,CAAC,GACpC,aAA+C,CAAC,GAChD,YAC4B;CAC5B,OAAO;EACL,GAAG;EACH,GAAG;EACH,YAAY,QAAQ,cAAc,YAAY;EAC9C,aAAa,QAAQ,eAAe,YAAY;EAChD,qBACE,QAAQ,uBAAuB,YAAY;EAC7C,WAAW,QAAQ,aAAa,YAAY;EAC5C,SAAS,WAAW,YAAY;EAEhC,cAAc,CAAC,EAAE,WAAW,YAAY;EACxC,YAAY;GAAE,GAAG,YAAY;GAAY,GAAG;EAAW;CACzD;AACF;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAa,oBAA+C,EAC1D,UACA,YACA,SACA,YACA,aACA,qBACA,WACA,gBAAgB,qBACZ;CACJ,MAAM,cAAuC;EAC3C;EACA;EACA;EACA;EACA,cAAc,CAAC,CAAC;EAChB;EACA;CACF;CAGA,MAAM,yBACJ,UACA,SACA,YACA,YACG;EACH,MAAM,gBAAgB,aACpB,aACA,SACA,YACA,OACF;EAEA,OAAO,gBAAgB,UAAU,aAAa;CAChD;CAIA,MAAM,+BACJ,UACA,SACA,YACA,YAEA,oBAAC,gBAAgB,UAAjB;EAA0B,OAAO;YAC9B,iBAAiB,UAAU,SAAS,YAAY,OAAO;CAChC;CAG5B,OACE,oBAAC,gBAAgB,UAAjB;EACE,OAAO;GACL;GACA,gBAAgB,iBACZ,8BACA;EACN;EAEC;CACuB;AAE9B"}
|
|
@@ -2,7 +2,7 @@ import { NodeProps } from "@intlayer/core/interpreter";
|
|
|
2
2
|
import { ResolvedEditor } from "@intlayer/types/module_augmentation";
|
|
3
3
|
import { PropsWithChildren, ReactNode } from "react";
|
|
4
4
|
//#region src/IntlayerNode.d.ts
|
|
5
|
-
type IntlayerNode<T = NodeProps['children'], AdditionalProps = Record<string, never>> = ResolvedEditor<T, ReactNode> & {
|
|
5
|
+
export type IntlayerNode<T = NodeProps['children'], AdditionalProps = Record<string, never>> = ResolvedEditor<T, ReactNode> & {
|
|
6
6
|
value: T;
|
|
7
7
|
} & AdditionalProps & T;
|
|
8
8
|
type RenderIntlayerNodeProps<T> = PropsWithChildren<{
|
|
@@ -12,7 +12,6 @@ type RenderIntlayerNodeProps<T> = PropsWithChildren<{
|
|
|
12
12
|
[key: string]: any;
|
|
13
13
|
};
|
|
14
14
|
}>;
|
|
15
|
-
declare const renderIntlayerNode: <T>({ children, value, additionalProps }: RenderIntlayerNodeProps<T>) => IntlayerNode<T>;
|
|
15
|
+
export declare const renderIntlayerNode: <T>({ children, value, additionalProps }: RenderIntlayerNodeProps<T>) => IntlayerNode<T>;
|
|
16
16
|
//#endregion
|
|
17
|
-
export { IntlayerNode, renderIntlayerNode };
|
|
18
17
|
//# sourceMappingURL=IntlayerNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlayerNode.d.ts","names":[],"sources":["../../src/IntlayerNode.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"IntlayerNode.d.ts","names":[],"sources":["../../src/IntlayerNode.tsx"],"mappings":";;;;YASY,aACV,IAAI,uBACJ,kBAAkB,yBAChB,eAAe,GAAG;EACpB,OAAO;IACL,kBACF;KAEG,wBAAwB,KAAK;EAChC,OAAO;EACP,UAAU;EACV;KAAqB;;;qBAGV,qBACX,KAAC,UAAA,OAAA,mBAKA,wBAAwB,OAAK,aAAa"}
|
|
@@ -8,7 +8,6 @@ type ContentSelectorProps = {
|
|
|
8
8
|
pressDuration?: number;
|
|
9
9
|
isSelecting?: boolean;
|
|
10
10
|
} & Omit<HTMLAttributes<HTMLDivElement>, 'content'>;
|
|
11
|
-
declare const ContentSelector: FC<ContentSelectorProps>;
|
|
11
|
+
export declare const ContentSelector: FC<ContentSelectorProps>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { ContentSelector };
|
|
14
13
|
//# sourceMappingURL=ContentSelector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSelector.d.ts","names":[],"sources":["../../../src/UI/ContentSelector.tsx"],"mappings":";;KAcK;EACH;EACA;EACA;EACA;EACA;EACA;IACE,KAAK,eAAe;
|
|
1
|
+
{"version":3,"file":"ContentSelector.d.ts","names":[],"sources":["../../../src/UI/ContentSelector.tsx"],"mappings":";;KAcK;EACH;EACA;EACA;EACA;EACA;EACA;IACE,KAAK,eAAe;qBAEX,iBAAiB,GAAG"}
|
|
@@ -4,7 +4,6 @@ import { FC, PropsWithChildren } from "react";
|
|
|
4
4
|
* Runs {@link useAnalytics} and renders its children unchanged. Mounted inside
|
|
5
5
|
* {@link IntlayerProvider} alongside `EditorProvider`.
|
|
6
6
|
*/
|
|
7
|
-
declare const AnalyticsProvider: FC<PropsWithChildren>;
|
|
7
|
+
export declare const AnalyticsProvider: FC<PropsWithChildren>;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { AnalyticsProvider };
|
|
10
9
|
//# sourceMappingURL=AnalyticsProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnalyticsProvider.d.ts","names":[],"sources":["../../../src/analytics/AnalyticsProvider.tsx"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"AnalyticsProvider.d.ts","names":[],"sources":["../../../src/analytics/AnalyticsProvider.tsx"],"mappings":";;;;;;qBAOa,mBAAmB,GAAG"}
|
|
@@ -5,28 +5,27 @@ import { KeyPath } from "@intlayer/types/keyPath";
|
|
|
5
5
|
* only) so the interpreter hot path in `plugins.tsx` never statically imports
|
|
6
6
|
* `@intlayer/analytics` — the package stays optional and tree-shakeable.
|
|
7
7
|
*/
|
|
8
|
-
type ExposureInput = {
|
|
8
|
+
export type ExposureInput = {
|
|
9
9
|
dictionaryKey: string;
|
|
10
10
|
keyPath: KeyPath[];
|
|
11
11
|
locale?: string;
|
|
12
12
|
nodeType?: string;
|
|
13
13
|
};
|
|
14
14
|
/** Consumer of exposure reports, installed by `useAnalytics` after init. */
|
|
15
|
-
type ExposureSink = (input: ExposureInput) => void;
|
|
15
|
+
export type ExposureSink = (input: ExposureInput) => void;
|
|
16
16
|
/**
|
|
17
17
|
* Installs (or clears) the exposure sink. `useAnalytics` sets this once the
|
|
18
18
|
* analytics client has loaded, and clears it on unmount.
|
|
19
19
|
*
|
|
20
20
|
* @param next - The sink to install, or `null` to clear.
|
|
21
21
|
*/
|
|
22
|
-
declare const setExposureSink: (next: ExposureSink | null) => void;
|
|
22
|
+
export declare const setExposureSink: (next: ExposureSink | null) => void;
|
|
23
23
|
/**
|
|
24
24
|
* Forwards a content exposure to the installed sink. A cheap null-check when
|
|
25
25
|
* analytics is not running, so it is safe to call from every node resolution.
|
|
26
26
|
*
|
|
27
27
|
* @param input - The node metadata to report.
|
|
28
28
|
*/
|
|
29
|
-
declare const reportExposure: (input: ExposureInput) => void;
|
|
29
|
+
export declare const reportExposure: (input: ExposureInput) => void;
|
|
30
30
|
//#endregion
|
|
31
|
-
export { ExposureInput, ExposureSink, reportExposure, setExposureSink };
|
|
32
31
|
//# sourceMappingURL=exposureSink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exposureSink.d.ts","names":[],"sources":["../../../src/analytics/exposureSink.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"exposureSink.d.ts","names":[],"sources":["../../../src/analytics/exposureSink.ts"],"mappings":";;;;;;;YAOY;EACV;EACA,SAAS;EACT;EACA;;;YAIU,gBAAgB,OAAO;;;;;;;qBAUtB,kBAAe,MAAU;;;;;;;qBAUzB,iBAAc,OAAW"}
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
* `@intlayer/analytics`, pay nothing — the whole body is guarded by
|
|
10
10
|
* `INTLAYER_ANALYTICS_ENABLED` and dead-code-eliminated at build time.
|
|
11
11
|
*/
|
|
12
|
-
declare const useAnalytics: () => void;
|
|
12
|
+
export declare const useAnalytics: () => void;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { useAnalytics };
|
|
15
14
|
//# sourceMappingURL=useAnalytics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAnalytics.d.ts","names":[],"sources":["../../../src/analytics/useAnalytics.tsx"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useAnalytics.d.ts","names":[],"sources":["../../../src/analytics/useAnalytics.tsx"],"mappings":";;;;;;;;;;;qBAkBa"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Parameters describing a conversion to record.
|
|
4
4
|
*/
|
|
5
|
-
type ConversionParams = {
|
|
5
|
+
export type ConversionParams = {
|
|
6
6
|
/** The experiment this conversion is attributed to. */
|
|
7
7
|
experimentKey: string;
|
|
8
8
|
/** The variant the session was assigned. */
|
|
@@ -25,7 +25,6 @@ type ConversionParams = {
|
|
|
25
25
|
* })}>Get started</button>
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
|
-
declare const useConversion: () => (params: ConversionParams) => void;
|
|
28
|
+
export declare const useConversion: () => (params: ConversionParams) => void;
|
|
29
29
|
//#endregion
|
|
30
|
-
export { ConversionParams, useConversion };
|
|
31
30
|
//# sourceMappingURL=useConversion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConversion.d.ts","names":[],"sources":["../../../src/analytics/useConversion.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"useConversion.d.ts","names":[],"sources":["../../../src/analytics/useConversion.tsx"],"mappings":";;;;YAQY;;EAEV;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;qBAgBW,sBAAa,QACI"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* The state of an A/B experiment for the current session.
|
|
4
4
|
*/
|
|
5
|
-
type ExperimentState = {
|
|
5
|
+
export type ExperimentState = {
|
|
6
6
|
/**
|
|
7
7
|
* The variant assigned to this session. Until assignment resolves (and on
|
|
8
8
|
* the server, or when analytics is disabled), this is the first variant —
|
|
@@ -35,7 +35,6 @@ type ExperimentState = {
|
|
|
35
35
|
* const content = useIntlayer(variant === 'b' ? 'hero-b' : 'hero');
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
declare const useExperiment: (experimentKey: string, variants: string[], weights?: number[]) => ExperimentState;
|
|
38
|
+
export declare const useExperiment: (experimentKey: string, variants: string[], weights?: number[]) => ExperimentState;
|
|
39
39
|
//#endregion
|
|
40
|
-
export { ExperimentState, useExperiment };
|
|
41
40
|
//# sourceMappingURL=useExperiment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExperiment.d.ts","names":[],"sources":["../../../src/analytics/useExperiment.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"useExperiment.d.ts","names":[],"sources":["../../../src/analytics/useExperiment.tsx"],"mappings":";;;;YAQY;;;;;;EAMV;;;;;;EAMA;;;;;;;;;;;;;;;;;;;;;qBAsBW,gBAAa,uBACH,oBACH,uBAEjB"}
|
|
@@ -15,17 +15,17 @@ type IntlayerValue = {
|
|
|
15
15
|
/**
|
|
16
16
|
* Context that stores the current locale on the client side.
|
|
17
17
|
*/
|
|
18
|
-
declare const IntlayerClientContext: import("react").Context<IntlayerValue>;
|
|
18
|
+
export declare const IntlayerClientContext: import("react").Context<IntlayerValue>;
|
|
19
19
|
/**
|
|
20
20
|
* Hook that provides the current Intlayer client context.
|
|
21
21
|
*
|
|
22
22
|
* @returns The current Intlayer context values.
|
|
23
23
|
*/
|
|
24
|
-
declare const useIntlayerContext: () => {};
|
|
24
|
+
export declare const useIntlayerContext: () => {};
|
|
25
25
|
/**
|
|
26
26
|
* Props for the IntlayerProvider component.
|
|
27
27
|
*/
|
|
28
|
-
type IntlayerProviderProps = PropsWithChildren<{
|
|
28
|
+
export type IntlayerProviderProps = PropsWithChildren<{
|
|
29
29
|
/**
|
|
30
30
|
* The locale to use. If not provided, it will be detected from storage or configuration.
|
|
31
31
|
*/
|
|
@@ -74,7 +74,7 @@ type IntlayerProviderProps = PropsWithChildren<{
|
|
|
74
74
|
* @param props - The provider props.
|
|
75
75
|
* @returns The provider component.
|
|
76
76
|
*/
|
|
77
|
-
declare const IntlayerProviderContent: FC<IntlayerProviderProps>;
|
|
77
|
+
export declare const IntlayerProviderContent: FC<IntlayerProviderProps>;
|
|
78
78
|
/**
|
|
79
79
|
* Main provider for Intlayer in React applications.
|
|
80
80
|
*
|
|
@@ -95,7 +95,6 @@ declare const IntlayerProviderContent: FC<IntlayerProviderProps>;
|
|
|
95
95
|
* );
|
|
96
96
|
* ```
|
|
97
97
|
*/
|
|
98
|
-
declare const IntlayerProvider: FC<IntlayerProviderProps>;
|
|
98
|
+
export declare const IntlayerProvider: FC<IntlayerProviderProps>;
|
|
99
99
|
//#endregion
|
|
100
|
-
export { IntlayerClientContext, IntlayerProvider, IntlayerProviderContent, IntlayerProviderProps, useIntlayerContext };
|
|
101
100
|
//# sourceMappingURL=IntlayerProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlayerProvider.d.ts","names":[],"sources":["../../../src/client/IntlayerProvider.tsx"],"mappings":";;;KAqBK;EACH,QAAQ;EACR,YAAY,WAAW;;;;;EAKvB,UAAU;EACV;EACA;;;;;
|
|
1
|
+
{"version":3,"file":"IntlayerProvider.d.ts","names":[],"sources":["../../../src/client/IntlayerProvider.tsx"],"mappings":";;;KAqBK;EACH,QAAQ;EACR,YAAY,WAAW;;;;;EAKvB,UAAU;EACV;EACA;;;;;qBAMW,uCAAqB,QAAA;;;;;;qBAWrB;;;;YAKD,wBAAwB;;;;EAIlC,SAAS;;;;;;;;;;;;;;;;;;;EAmBT,UAAU;;;;EAIV,gBAAgB;;;;EAIhB,aAAa,QAAQ;;;;EAIrB;;;;EAIA;;;;;;;;;;qBAWW,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;qBAgF5B,kBAAkB,GAAG"}
|
|
@@ -9,9 +9,8 @@
|
|
|
9
9
|
* formatCompact(1500); // "1.5K"
|
|
10
10
|
* ```
|
|
11
11
|
*/
|
|
12
|
-
declare const useCompact: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
12
|
+
export declare const useCompact: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
13
13
|
locale?: import("@intlayer/types").LocalesValues;
|
|
14
14
|
}) => string;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { useCompact };
|
|
17
16
|
//# sourceMappingURL=useCompact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../../src/client/format/useCompact.ts"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../../src/client/format/useCompact.ts"],"mappings":";;;;;;;;;;;qBAgBa,mBAAU,wBAAA,UAAA,KAAA"}
|
|
@@ -23,9 +23,8 @@
|
|
|
23
23
|
* // "¥9,876,543"
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
-
declare const useCurrency: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
26
|
+
export declare const useCurrency: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
27
27
|
locale?: import("@intlayer/types").LocalesValues;
|
|
28
28
|
}) => string;
|
|
29
29
|
//#endregion
|
|
30
|
-
export { useCurrency };
|
|
31
30
|
//# sourceMappingURL=useCurrency.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../../src/client/format/useCurrency.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../../src/client/format/useCurrency.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;qBA8Ba,oBAAW,wBAAA,UAAA,KAAA"}
|
|
@@ -26,7 +26,6 @@ import { date } from "@intlayer/core/formatters";
|
|
|
26
26
|
*
|
|
27
27
|
* @see createDate
|
|
28
28
|
*/
|
|
29
|
-
declare const useDate: () => (...args: Parameters<typeof date>) => string;
|
|
29
|
+
export declare const useDate: () => (...args: Parameters<typeof date>) => string;
|
|
30
30
|
//#endregion
|
|
31
|
-
export { useDate };
|
|
32
31
|
//# sourceMappingURL=useDate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../../src/client/format/useDate.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../../src/client/format/useDate.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAgCa,mBAAO,MAGD,kBAAkB"}
|
|
@@ -29,7 +29,6 @@ import { WrappedIntl } from "@intlayer/core/formatters";
|
|
|
29
29
|
* const date2 = new intl.DateTimeFormat('fr-FR').format(new Date());
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
declare const useIntl: (locale?: LocalesValues) => WrappedIntl;
|
|
32
|
+
export declare const useIntl: (locale?: LocalesValues) => WrappedIntl;
|
|
33
33
|
//#endregion
|
|
34
|
-
export { useIntl };
|
|
35
34
|
//# sourceMappingURL=useIntl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntl.d.ts","names":[],"sources":["../../../../src/client/format/useIntl.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useIntl.d.ts","names":[],"sources":["../../../../src/client/format/useIntl.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAmCa,UAAO,SAAa,kBAAa"}
|
|
@@ -20,13 +20,8 @@
|
|
|
20
20
|
* // "1, 2 und 3"
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
declare const useList: () => (values: (string | number)[], options?: {
|
|
24
|
-
localeMatcher?: 'lookup' | 'best fit';
|
|
25
|
-
type?: 'conjunction' | 'disjunction' | 'unit';
|
|
26
|
-
style?: 'long' | 'short' | 'narrow';
|
|
27
|
-
} & {
|
|
23
|
+
export declare const useList: () => (values: (string | number)[], options?: import("@intlayer/core/formatters").ListFormatOptions & {
|
|
28
24
|
locale?: import("@intlayer/types").LocalesValues;
|
|
29
25
|
}) => string;
|
|
30
26
|
//#endregion
|
|
31
|
-
export { useList };
|
|
32
27
|
//# sourceMappingURL=useList.d.ts.map
|
|
@@ -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":";;;;;;;;;;;;;;;;;;;;;;qBA2Ba,gBAAO,6BAAA,8CAAA"}
|
|
@@ -21,9 +21,8 @@
|
|
|
21
21
|
* @returns {(value: string | number, options?: import("../createNumber").NumberProps) => string}
|
|
22
22
|
* A number formatting function bound to the active locale.
|
|
23
23
|
*/
|
|
24
|
-
declare const useNumber: () => (value: string | number, args_1?: Intl.NumberFormatOptions & {
|
|
24
|
+
export declare const useNumber: () => (value: string | number, args_1?: Intl.NumberFormatOptions & {
|
|
25
25
|
locale?: import("@intlayer/types").LocalesValues;
|
|
26
26
|
}) => string;
|
|
27
27
|
//#endregion
|
|
28
|
-
export { useNumber };
|
|
29
28
|
//# sourceMappingURL=useNumber.d.ts.map
|
|
@@ -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":";;;;;;;;;;;;;;;;;;;;;;;qBA4Ba,kBAAS,wBAAA,SAAA,KAAA"}
|
|
@@ -17,9 +17,8 @@
|
|
|
17
17
|
* @returns {(value: string | number, options?: Omit<PercentageOptions, "value">) => string}
|
|
18
18
|
* A function that formats numbers or numeric strings into localized percentages.
|
|
19
19
|
*/
|
|
20
|
-
declare const usePercentage: () => (value: string | number, args_1?: Intl.NumberFormatOptions & {
|
|
20
|
+
export declare const usePercentage: () => (value: string | number, args_1?: Intl.NumberFormatOptions & {
|
|
21
21
|
locale?: import("@intlayer/types").LocalesValues;
|
|
22
22
|
}) => string;
|
|
23
23
|
//#endregion
|
|
24
|
-
export { usePercentage };
|
|
25
24
|
//# sourceMappingURL=usePercentage.d.ts.map
|
|
@@ -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":";;;;;;;;;;;;;;;;;;;qBAwBa,sBAAa,wBAAA,SAAA,KAAA"}
|
|
@@ -17,10 +17,9 @@
|
|
|
17
17
|
* @returns {ReturnType<typeof createRelativeTime>} A relative time formatting function
|
|
18
18
|
* bound to the current client locale.
|
|
19
19
|
*/
|
|
20
|
-
declare const useRelativeTime: () => (from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
|
|
20
|
+
export declare const useRelativeTime: () => (from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
|
|
21
21
|
locale?: import("@intlayer/types").LocalesValues;
|
|
22
22
|
unit?: Intl.RelativeTimeFormatUnit;
|
|
23
23
|
}) => string;
|
|
24
24
|
//#endregion
|
|
25
|
-
export { useRelativeTime };
|
|
26
25
|
//# sourceMappingURL=useRelativeTime.d.ts.map
|
|
@@ -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":";;;;;;;;;;;;;;;;;;;qBAwBa,wBAAe,wBAAA,MAAA,uBAAA,MAAA,UAAA,KAAA"}
|
|
@@ -16,9 +16,8 @@
|
|
|
16
16
|
*
|
|
17
17
|
* @returns {Function} A unit formatting function that accepts a value and optional formatting options.
|
|
18
18
|
*/
|
|
19
|
-
declare const useUnit: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
19
|
+
export declare const useUnit: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
20
20
|
locale?: import("@intlayer/types").LocalesValues;
|
|
21
21
|
}) => string;
|
|
22
22
|
//#endregion
|
|
23
|
-
export { useUnit };
|
|
24
23
|
//# sourceMappingURL=useUnit.d.ts.map
|
|
@@ -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":";;;;;;;;;;;;;;;;;;qBAuBa,gBAAO,wBAAA,UAAA,KAAA"}
|
package/dist/types/client/t.d.ts
CHANGED
|
@@ -24,7 +24,6 @@ import { LocalesValues, StrictModeLocaleMap } from "@intlayer/types/module_augme
|
|
|
24
24
|
* };
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
declare const t: <Content = string>(multilangContent: StrictModeLocaleMap<Content>, locale?: LocalesValues) => Content;
|
|
27
|
+
export declare const t: <Content = string>(multilangContent: StrictModeLocaleMap<Content>, locale?: LocalesValues) => Content;
|
|
28
28
|
//#endregion
|
|
29
|
-
export { t };
|
|
30
29
|
//# sourceMappingURL=t.d.ts.map
|
|
@@ -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":";;;;;;;;;;;;;;;;;;;;;;;;;;qBAkCa,IAAK,kBAAgB,kBACd,oBAAoB,UAAQ,SACrC,kBAAa"}
|
|
@@ -10,7 +10,6 @@ import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup } from
|
|
|
10
10
|
* use the locale from the client context. The same applies to the variant,
|
|
11
11
|
* which falls back to the provider's ambient `variant`.
|
|
12
12
|
*/
|
|
13
|
-
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>>;
|
|
13
|
+
export 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>>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { useDictionary };
|
|
16
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":";;;;;;;;;;;;qBA2Ba,sBACL,UAAU,aAAa,gCACvB,UACF,gBACA,2BAA2B,KAAK,iBAAe,YAEvC,GAAC,mBACM,2CAAC,+CAAA,kCAAA,GAAA,IAAA,mDAAA,sBAAA"}
|
|
@@ -6,7 +6,6 @@ import { Dictionary } from "@intlayer/types/dictionary";
|
|
|
6
6
|
*
|
|
7
7
|
* If the locale is not provided, it will use the locale from the client context
|
|
8
8
|
*/
|
|
9
|
-
declare const useDictionaryAsync: <const T extends Dictionary, const L extends LocalesValues = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, locale?: L) => Promise<T>;
|
|
9
|
+
export declare const useDictionaryAsync: <const T extends Dictionary, const L extends LocalesValues = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, locale?: L) => Promise<T>;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { useDictionaryAsync };
|
|
12
11
|
//# sourceMappingURL=useDictionaryAsync.d.ts.map
|
|
@@ -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":";;;;;;;;qBAkBa,2BACL,UAAU,kBACV,UAAU,gBAAgB,iBAAe,mBAE5B,0BAA0B,QAAQ,KAAG,SAC/C,MACR,QAAQ"}
|
|
@@ -13,7 +13,6 @@ import { QualifiedDynamicLoaderMap } from "@intlayer/core/dictionaryManipulator"
|
|
|
13
13
|
* If the locale is not provided (directly or through the selector), the client
|
|
14
14
|
* context locale is used.
|
|
15
15
|
*/
|
|
16
|
-
declare const useDictionaryDynamic: <const T extends Dictionary, const K extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<K> = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>> | QualifiedDynamicLoaderMap, key: K, localeOrSelector?: A) => any;
|
|
16
|
+
export declare const useDictionaryDynamic: <const T extends Dictionary, const K extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<K> = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>> | QualifiedDynamicLoaderMap, key: K, localeOrSelector?: A) => any;
|
|
17
17
|
//#endregion
|
|
18
|
-
export { useDictionaryDynamic };
|
|
19
18
|
//# sourceMappingURL=useDictionaryDynamic.d.ts.map
|
|
@@ -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":";;;;;;;;;;;;;;;qBAsCa,6BACL,UAAU,kBACV,UAAU,sBACV,UAAU,gBAAgB,yBAAyB,KAAK,iBAAe,mBAGzE,0BAA0B,QAAQ,MAClC,2BAAyB,KACxB,GAAC,mBACa"}
|
|
@@ -20,7 +20,6 @@ import { GetSubPath } from "@intlayer/types/dictionary";
|
|
|
20
20
|
* const ariaLabel = t('button.ariaLabel').value; // 'Close modal'
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
declare const useI18n: <T extends DictionaryKeys, L extends DeclaredLocales = DeclaredLocales>(namespace: T, locale?: L) => <P extends ValidDotPathsFor<T>>(path: P) => GetSubPath<DeepTransformContent<DictionaryRegistryContent<T>>, P>;
|
|
23
|
+
export declare const useI18n: <T extends DictionaryKeys, L extends DeclaredLocales = DeclaredLocales>(namespace: T, locale?: L) => <P extends ValidDotPathsFor<T>>(path: P) => GetSubPath<DeepTransformContent<DictionaryRegistryContent<T>>, P>;
|
|
24
24
|
//#endregion
|
|
25
|
-
export { useI18n };
|
|
26
25
|
//# sourceMappingURL=useI18n.d.ts.map
|
|
@@ -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":";;;;;;;;;;;;;;;;;;;;;;qBA+Ba,UACX,UAAU,gBACV,UAAU,kBAAkB,iBAAe,WAEhC,GAAC,SACH,OAkBE,UAAU,iBAAiB,IAAE,MAChC,MAEL,WAAW,qBAAqB,0BAA0B,KAAK"}
|
|
@@ -29,7 +29,6 @@ import { DeclaredLocales, DictionaryKeys, DictionarySelectorForKey, LocalesValue
|
|
|
29
29
|
* };
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
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>>;
|
|
32
|
+
export 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
33
|
//#endregion
|
|
34
|
-
export { useIntlayer };
|
|
35
34
|
//# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA4Ca,oBACL,UAAU,sBACV,UAAU,gBAAgB,yBAAyB,KAAK,iBAAe,KAExE,GAAC,mBACa,2CAAC,+CAAA,yBAAA,GAAA,IAAA,mDAAA,sBAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/client/useLoadDynamic.d.ts
|
|
2
|
-
declare const useLoadDynamic: <T>(key: string, promise: Promise<T>) => T;
|
|
2
|
+
export declare const useLoadDynamic: <T>(key: string, promise: Promise<T>) => T;
|
|
3
3
|
/**
|
|
4
4
|
* Fills the same cache {@link useLoadDynamic} reads, ahead of render.
|
|
5
5
|
*
|
|
@@ -19,7 +19,6 @@ declare const useLoadDynamic: <T>(key: string, promise: Promise<T>) => T;
|
|
|
19
19
|
* dictionary twice never issues a second request.
|
|
20
20
|
* @returns A promise that settles — never rejects — once the entry is readable.
|
|
21
21
|
*/
|
|
22
|
-
declare const preloadDynamic: <T>(key: string, loader: () => Promise<T>) => Promise<void>;
|
|
22
|
+
export declare const preloadDynamic: <T>(key: string, loader: () => Promise<T>) => Promise<void>;
|
|
23
23
|
//#endregion
|
|
24
|
-
export { preloadDynamic, useLoadDynamic };
|
|
25
24
|
//# sourceMappingURL=useLoadDynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLoadDynamic.d.ts","names":[],"sources":["../../../src/client/useLoadDynamic.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"useLoadDynamic.d.ts","names":[],"sources":["../../../src/client/useLoadDynamic.ts"],"mappings":";qBAqCa,iBAAkB,GAAC,aAAa,SAAW,QAAQ,OAAK;;;;;;;;;;;;;;;;;;;;qBA2BxD,iBAAkB,GAAC,aACnB,cACG,QAAQ,OACrB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DeclaredLocales, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
2
|
//#region src/client/useLocale.d.ts
|
|
3
|
-
type UseLocaleProps = {
|
|
3
|
+
export type UseLocaleProps = {
|
|
4
4
|
isCookieEnabled?: boolean;
|
|
5
5
|
onLocaleChange?: (locale: DeclaredLocales) => void;
|
|
6
6
|
};
|
|
7
|
-
type UseLocaleResult = {
|
|
7
|
+
export type UseLocaleResult = {
|
|
8
8
|
locale: DeclaredLocales;
|
|
9
9
|
defaultLocale: DeclaredLocales;
|
|
10
10
|
availableLocales: DeclaredLocales[];
|
|
@@ -33,7 +33,6 @@ type UseLocaleResult = {
|
|
|
33
33
|
* };
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
declare const useLocale: ({ isCookieEnabled, onLocaleChange }?: UseLocaleProps) => UseLocaleResult;
|
|
36
|
+
export declare const useLocale: ({ isCookieEnabled, onLocaleChange }?: UseLocaleProps) => UseLocaleResult;
|
|
37
37
|
//#endregion
|
|
38
|
-
export { UseLocaleProps, UseLocaleResult, useLocale };
|
|
39
38
|
//# 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":";;YAWY;EACV;EACA,kBAAkB,QAAQ;;YAGhB;EACV,QAAQ;EACR,eAAe;EACf,kBAAkB;EAClB,YAAY,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;qBA0BT,cAAS,iBAAA,mBAGnB,mBAAsB"}
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* On the client side, hook to get the current locale and all related fields
|
|
4
4
|
*/
|
|
5
|
-
declare const useLocaleBase: () => {
|
|
5
|
+
export declare const useLocaleBase: () => {
|
|
6
6
|
locale: import("@intlayer/types").LocalesValues;
|
|
7
7
|
defaultLocale: any;
|
|
8
8
|
availableLocales: any;
|
|
9
9
|
setLocale: (newLocale: import("@intlayer/types").LocalesValues) => void;
|
|
10
10
|
};
|
|
11
11
|
//#endregion
|
|
12
|
-
export { useLocaleBase };
|
|
13
12
|
//# sourceMappingURL=useLocaleBase.d.ts.map
|
|
@@ -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":";;;;qBAWa"}
|