solid-intlayer 9.9.0 → 9.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/LoadingBoundary.cjs +1 -1
- package/dist/cjs/analytics/useAnalytics.cjs +1 -1
- package/dist/cjs/analytics/useConversion.cjs +1 -1
- package/dist/cjs/analytics/useExperiment.cjs +1 -1
- package/dist/cjs/client/IntlayerProvider.cjs +1 -1
- package/dist/cjs/client/getBrowserLocale.cjs +1 -1
- package/dist/cjs/client/t.cjs +1 -1
- package/dist/cjs/client/useDictionary.cjs +1 -1
- package/dist/cjs/client/useDictionaryAsync.cjs +1 -1
- package/dist/cjs/client/useDictionaryDynamic.cjs +1 -1
- package/dist/cjs/client/useIntlayer.cjs +1 -1
- package/dist/cjs/client/useLoadDynamic.cjs +1 -1
- package/dist/cjs/client/useLocale.cjs +1 -1
- package/dist/cjs/client/useLocaleBase.cjs +1 -1
- package/dist/cjs/client/usePathname.cjs +1 -1
- package/dist/cjs/client/useRewriteURL.cjs +1 -1
- package/dist/cjs/client/useTraduction.cjs +1 -1
- package/dist/cjs/editor/createEditedContentSource.cjs +1 -1
- package/dist/cjs/editor/useEditor.cjs +1 -1
- package/dist/cjs/format/useCompact.cjs +1 -1
- package/dist/cjs/format/useCurrency.cjs +1 -1
- package/dist/cjs/format/useDate.cjs +1 -1
- package/dist/cjs/format/useIntl.cjs +1 -1
- package/dist/cjs/format/useList.cjs +1 -1
- package/dist/cjs/format/useNumber.cjs +1 -1
- package/dist/cjs/format/usePercentage.cjs +1 -1
- package/dist/cjs/format/useRelativeTime.cjs +1 -1
- package/dist/cjs/format/useUnit.cjs +1 -1
- package/dist/cjs/getDictionary.cjs +1 -1
- package/dist/cjs/getIntlayer.cjs +1 -1
- package/dist/cjs/html/HTMLProvider.cjs +1 -1
- package/dist/cjs/html/HTMLRenderer.cjs +1 -1
- package/dist/cjs/markdown/MarkdownProvider.cjs +1 -1
- package/dist/cjs/markdown/MarkdownRenderer.cjs +1 -1
- package/dist/cjs/plugins.cjs +1 -1
- package/dist/cjs/solidTypes.cjs +1 -0
- package/dist/esm/LoadingBoundary.mjs +3 -3
- package/dist/esm/analytics/useAnalytics.mjs +11 -11
- package/dist/esm/analytics/useConversion.mjs +1 -1
- package/dist/esm/analytics/useExperiment.mjs +7 -7
- package/dist/esm/client/IntlayerProvider.mjs +26 -26
- package/dist/esm/client/getBrowserLocale.mjs +21 -21
- package/dist/esm/client/t.mjs +5 -5
- package/dist/esm/client/useDictionary.mjs +17 -17
- package/dist/esm/client/useDictionaryAsync.mjs +7 -7
- package/dist/esm/client/useDictionaryDynamic.mjs +23 -23
- package/dist/esm/client/useIntlayer.mjs +8 -8
- package/dist/esm/client/useLoadDynamic.mjs +19 -19
- package/dist/esm/client/useLocale.mjs +10 -10
- package/dist/esm/client/useLocaleBase.mjs +6 -6
- package/dist/esm/client/usePathname.mjs +4 -4
- package/dist/esm/client/useRewriteURL.mjs +8 -8
- package/dist/esm/client/useTraduction.mjs +5 -5
- package/dist/esm/editor/createEditedContentSource.mjs +3 -3
- package/dist/esm/editor/useEditor.mjs +10 -10
- package/dist/esm/format/useCompact.mjs +6 -6
- package/dist/esm/format/useCurrency.mjs +6 -6
- package/dist/esm/format/useDate.mjs +10 -10
- package/dist/esm/format/useIntl.mjs +5 -5
- package/dist/esm/format/useList.mjs +6 -6
- package/dist/esm/format/useNumber.mjs +6 -6
- package/dist/esm/format/usePercentage.mjs +6 -6
- package/dist/esm/format/useRelativeTime.mjs +6 -6
- package/dist/esm/format/useUnit.mjs +6 -6
- package/dist/esm/getDictionary.mjs +4 -4
- package/dist/esm/getIntlayer.mjs +3 -3
- package/dist/esm/html/HTMLProvider.mjs +6 -6
- package/dist/esm/html/HTMLRenderer.mjs +14 -14
- package/dist/esm/markdown/MarkdownProvider.mjs +19 -19
- package/dist/esm/markdown/MarkdownRenderer.mjs +28 -28
- package/dist/esm/plugins.mjs +97 -97
- package/dist/esm/solidTypes.mjs +0 -0
- package/dist/{esm-BnFj8Txc.js → esm-YGODKOLP.js} +1 -1
- package/dist/{esm-hfQR-yiQ.mjs → esm-bdKnuomJ.mjs} +2 -2
- package/dist/solid/analytics/useAnalytics.jsx +3 -3
- package/dist/solid/analytics/useConversion.js +1 -1
- package/dist/solid/analytics/useExperiment.js +3 -3
- package/dist/solid/client/IntlayerProvider.jsx +4 -4
- package/dist/solid/client/getBrowserLocale.jsx +1 -1
- package/dist/solid/client/t.js +1 -1
- package/dist/solid/client/useDictionary.js +3 -3
- package/dist/solid/client/useDictionaryAsync.js +3 -3
- package/dist/solid/client/useDictionaryDynamic.js +2 -2
- package/dist/solid/client/useIntlayer.js +2 -2
- package/dist/solid/client/useLoadDynamic.js +1 -1
- package/dist/solid/client/useLocale.js +2 -2
- package/dist/solid/client/useLocaleBase.js +1 -1
- package/dist/solid/client/usePathname.js +2 -2
- package/dist/solid/client/useRewriteURL.js +2 -2
- package/dist/solid/client/useTraduction.js +2 -2
- package/dist/solid/editor/createEditedContentSource.js +2 -2
- package/dist/solid/editor/useEditor.jsx +2 -2
- package/dist/solid/{esm-BS5TZIsL.js → esm-1cHk4dPd.js} +2 -2
- package/dist/solid/format/useCompact.js +1 -1
- package/dist/solid/format/useCurrency.js +2 -2
- package/dist/solid/format/useDate.js +2 -2
- package/dist/solid/format/useIntl.js +2 -2
- package/dist/solid/format/useList.js +1 -1
- package/dist/solid/format/useNumber.js +2 -2
- package/dist/solid/format/usePercentage.js +2 -2
- package/dist/solid/format/useRelativeTime.js +2 -2
- package/dist/solid/format/useUnit.js +1 -1
- package/dist/solid/getDictionary.js +1 -1
- package/dist/solid/getIntlayer.js +1 -1
- package/dist/solid/html/HTMLProvider.jsx +1 -1
- package/dist/solid/html/HTMLRenderer.jsx +1 -1
- package/dist/solid/markdown/MarkdownProvider.jsx +1 -1
- package/dist/solid/markdown/MarkdownRenderer.jsx +3 -3
- package/dist/solid/plugins.jsx +5 -5
- package/dist/solid/solidTypes.js +0 -0
- package/dist/types/IntlayerNode.d.ts +4 -3
- package/dist/types/LoadingBoundary.d.ts +4 -3
- package/dist/types/client/useLocaleStorage.d.ts +4 -8
- package/dist/types/editor/ContentSelector.d.ts +4 -13
- package/dist/types/format/useIntl.d.ts +2 -1
- package/dist/types/html/HTMLRenderer.d.ts +4 -3
- package/dist/types/html/types.d.ts +5 -4
- package/dist/types/markdown/MarkdownProvider.d.ts +4 -3
- package/dist/types/markdown/MarkdownRenderer.d.ts +5 -4
- package/dist/types/markdown/compiler.d.ts +2 -2
- package/dist/types/plugins.d.ts +7 -7
- package/dist/types/solidCompat.d.ts +7 -1
- package/dist/types/solidElement/renderSolidElement.d.ts +2 -2
- package/dist/types/solidTypes.d.ts +15 -0
- package/package.json +13 -11
package/dist/solid/client/t.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IntlayerClientContext } from "./IntlayerProvider.jsx";
|
|
2
1
|
import { getTranslation } from "@intlayer/core/interpreter";
|
|
3
2
|
import { useContext } from "solid-js";
|
|
3
|
+
import { IntlayerClientContext } from "./IntlayerProvider.jsx";
|
|
4
4
|
// src/client/t.ts
|
|
5
5
|
/**
|
|
6
6
|
* On the client side, this function returns the translation of the provided multilang content.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { resolveDictionaryArgument } from "@intlayer/core/dictionaryManipulator";
|
|
2
|
+
import { collectTransformCacheWrites, deleteTransformCacheWrites } from "@intlayer/core/interpreter";
|
|
3
|
+
import { createMemo, onCleanup, useContext } from "solid-js";
|
|
1
4
|
import { getDictionary as getDictionary$1 } from "../getDictionary.js";
|
|
2
5
|
import { getPlugins } from "../plugins.jsx";
|
|
3
6
|
import { createContentProxy } from "./contentProxy.js";
|
|
4
7
|
import { IntlayerClientContext } from "./IntlayerProvider.jsx";
|
|
5
8
|
import { unwrapLoadable } from "./useLoadDynamic.js";
|
|
6
|
-
import { collectTransformCacheWrites, deleteTransformCacheWrites } from "@intlayer/core/interpreter";
|
|
7
|
-
import { createMemo, onCleanup, useContext } from "solid-js";
|
|
8
|
-
import { resolveDictionaryArgument } from "@intlayer/core/dictionaryManipulator";
|
|
9
9
|
// src/client/useDictionary.ts
|
|
10
10
|
/**
|
|
11
11
|
* On the client side, Hook that transforms a dictionary (or qualified
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useDictionary } from "./useDictionary.js";
|
|
1
|
+
import { loadDynamicDictionary } from "@intlayer/core/dictionaryManipulator";
|
|
3
2
|
import { resolveInterpreterLocale } from "@intlayer/core/interpreter";
|
|
4
3
|
import { useContext } from "solid-js";
|
|
5
|
-
import {
|
|
4
|
+
import { IntlayerClientContext } from "./IntlayerProvider.jsx";
|
|
5
|
+
import { useDictionary } from "./useDictionary.js";
|
|
6
6
|
// src/client/useDictionaryAsync.ts
|
|
7
7
|
/**
|
|
8
8
|
* On the server side, Hook that transform a dictionary and return the content
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { QUALIFIER_DYNAMIC_TYPES_KEY, getDictionarySelectorCacheKey, getDynamicChunkArgument, getPreloadedDictionary, isQualifiedDynamicLoaderMap, parseDictionarySelector, resolveDictionaryRead, resolveDynamicContentAsync } from "@intlayer/core/dictionaryManipulator";
|
|
2
|
+
import { createMemo, useContext } from "solid-js";
|
|
1
3
|
import { getDictionary } from "../getDictionary.js";
|
|
2
4
|
import { createAsyncValue, trackAsyncValue } from "../solidCompat.js";
|
|
3
5
|
import { createContentProxy } from "./contentProxy.js";
|
|
4
6
|
import { IntlayerClientContext } from "./IntlayerProvider.jsx";
|
|
5
7
|
import { useDictionary } from "./useDictionary.js";
|
|
6
8
|
import { seedDynamicValue, useLoadDynamic } from "./useLoadDynamic.js";
|
|
7
|
-
import { createMemo, useContext } from "solid-js";
|
|
8
|
-
import { QUALIFIER_DYNAMIC_TYPES_KEY, getDictionarySelectorCacheKey, getDynamicChunkArgument, getPreloadedDictionary, isQualifiedDynamicLoaderMap, parseDictionarySelector, resolveDictionaryRead, resolveDynamicContentAsync } from "@intlayer/core/dictionaryManipulator";
|
|
9
9
|
// src/client/useDictionaryDynamic.ts
|
|
10
10
|
/**
|
|
11
11
|
* Loaded chunks stay raw (serializable for hydration) and are interpreted
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { resolveDictionaryArgument } from "@intlayer/core/dictionaryManipulator";
|
|
2
|
+
import { createMemo, useContext } from "solid-js";
|
|
1
3
|
import { getIntlayer } from "../getIntlayer.js";
|
|
2
4
|
import { createContentProxy } from "./contentProxy.js";
|
|
3
5
|
import { IntlayerClientContext } from "./IntlayerProvider.jsx";
|
|
4
|
-
import { createMemo, useContext } from "solid-js";
|
|
5
|
-
import { resolveDictionaryArgument } from "@intlayer/core/dictionaryManipulator";
|
|
6
6
|
// src/client/useIntlayer.ts
|
|
7
7
|
/**
|
|
8
8
|
* Solid hook that picks one dictionary by its key and returns its reactive content.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { untrack } from "solid-js";
|
|
1
2
|
import { PROXY_RESERVED_KEYS } from "../proxyKeys.js";
|
|
2
3
|
import { createAsyncValue, trackAsyncValue } from "../solidCompat.js";
|
|
3
|
-
import { untrack } from "solid-js";
|
|
4
4
|
// src/client/useLoadDynamic.ts
|
|
5
5
|
var NO_PENDING_PRIMITIVE_FALLBACK = Symbol("NO_PENDING_PRIMITIVE_FALLBACK");
|
|
6
6
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { internationalization } from "@intlayer/config/built";
|
|
2
|
+
import { useContext } from "solid-js";
|
|
1
3
|
import { createChangeEffect } from "../solidCompat.js";
|
|
2
4
|
import { IntlayerClientContext } from "./IntlayerProvider.jsx";
|
|
3
5
|
import { setLocaleInStorage } from "./useLocaleStorage.js";
|
|
4
|
-
import { internationalization } from "@intlayer/config/built";
|
|
5
|
-
import { useContext } from "solid-js";
|
|
6
6
|
// src/client/useLocale.ts
|
|
7
7
|
var { defaultLocale, locales: availableLocales } = internationalization ?? {};
|
|
8
8
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IntlayerClientContext } from "./IntlayerProvider.jsx";
|
|
2
1
|
import { internationalization } from "@intlayer/config/built";
|
|
3
2
|
import { useContext } from "solid-js";
|
|
3
|
+
import { IntlayerClientContext } from "./IntlayerProvider.jsx";
|
|
4
4
|
// src/client/useLocaleBase.ts
|
|
5
5
|
var { defaultLocale, locales: availableLocales } = internationalization;
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { onMounted } from "../solidCompat.js";
|
|
2
|
-
import { createSignal } from "solid-js";
|
|
3
1
|
import { getPathWithoutLocale } from "@intlayer/core/localization";
|
|
2
|
+
import { createSignal } from "solid-js";
|
|
3
|
+
import { onMounted } from "../solidCompat.js";
|
|
4
4
|
// src/client/usePathname.ts
|
|
5
5
|
/**
|
|
6
6
|
* Solid hook that returns an accessor containing the current pathname with
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createWatchEffect } from "../solidCompat.js";
|
|
2
|
-
import { useLocale } from "./useLocale.js";
|
|
3
1
|
import { routing } from "@intlayer/config/built";
|
|
4
2
|
import { getRewritePath } from "@intlayer/core/localization";
|
|
3
|
+
import { createWatchEffect } from "../solidCompat.js";
|
|
4
|
+
import { useLocale } from "./useLocale.js";
|
|
5
5
|
// src/client/useRewriteURL.ts
|
|
6
6
|
/**
|
|
7
7
|
* Client-side hook to manage URL rewrites in Solid without triggering a router navigation.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IntlayerClientContext } from "./IntlayerProvider.jsx";
|
|
2
|
-
import { getTranslation } from "@intlayer/core/interpreter";
|
|
3
1
|
import { internationalization } from "@intlayer/config/built";
|
|
2
|
+
import { getTranslation } from "@intlayer/core/interpreter";
|
|
4
3
|
import { useContext } from "solid-js";
|
|
4
|
+
import { IntlayerClientContext } from "./IntlayerProvider.jsx";
|
|
5
5
|
// src/client/useTraduction.ts
|
|
6
6
|
/**
|
|
7
7
|
* On the client side, Hook that picking one dictionary by its id and return the content.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createWatchEffect } from "../solidCompat.js";
|
|
2
|
-
import { createSignal } from "solid-js";
|
|
3
1
|
import { isEnabled } from "@intlayer/editor/isEnabled";
|
|
2
|
+
import { createSignal } from "solid-js";
|
|
3
|
+
import { createWatchEffect } from "../solidCompat.js";
|
|
4
4
|
// src/editor/createEditedContentSource.ts
|
|
5
5
|
/**
|
|
6
6
|
* Tracks the source string edited in the visual editor for a markdown / html
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { isEnabled } from "@intlayer/editor/isEnabled";
|
|
2
|
+
import { createSignal, onCleanup } from "solid-js";
|
|
1
3
|
import { useIntlayerContext } from "../client/IntlayerProvider.jsx";
|
|
2
4
|
import { createWatchEffect, onMounted } from "../solidCompat.js";
|
|
3
|
-
import { createSignal, onCleanup } from "solid-js";
|
|
4
|
-
import { isEnabled } from "@intlayer/editor/isEnabled";
|
|
5
5
|
// src/editor/useEditor.tsx
|
|
6
6
|
/**
|
|
7
7
|
* Initialises the Intlayer editor client singleton when the editor is enabled.
|
|
@@ -45,7 +45,7 @@ var buildContentExposure = (params) => ({
|
|
|
45
45
|
* hashString('session-1:homepage-hero'); // 3039336720
|
|
46
46
|
*/
|
|
47
47
|
var hashString = (input) => {
|
|
48
|
-
let hash =
|
|
48
|
+
let hash = 0x811c9dc5;
|
|
49
49
|
for (let index = 0; index < input.length; index++) {
|
|
50
50
|
hash ^= input.charCodeAt(index);
|
|
51
51
|
hash = Math.imul(hash, 16777619);
|
|
@@ -170,7 +170,7 @@ var createEventBuffer = ({ max }) => {
|
|
|
170
170
|
var isSampledIn = (sessionId, sampleRate) => {
|
|
171
171
|
if (sampleRate >= 1) return true;
|
|
172
172
|
if (sampleRate <= 0) return false;
|
|
173
|
-
return hashString(sessionId) /
|
|
173
|
+
return hashString(sessionId) / 0xffffffff < sampleRate;
|
|
174
174
|
};
|
|
175
175
|
// ../@intlayer/analytics/dist/esm/core/session.mjs
|
|
176
176
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useIntlayerContext } from "../client/IntlayerProvider.jsx";
|
|
2
1
|
import { compact } from "@intlayer/core/formatters";
|
|
2
|
+
import { useIntlayerContext } from "../client/IntlayerProvider.jsx";
|
|
3
3
|
// src/format/useCompact.ts
|
|
4
4
|
/**
|
|
5
5
|
* Solid client hook that provides a localized compact number formatter.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IntlayerClientContext } from "../client/IntlayerProvider.jsx";
|
|
2
|
-
import { useContext } from "solid-js";
|
|
3
1
|
import { currency } from "@intlayer/core/formatters";
|
|
2
|
+
import { useContext } from "solid-js";
|
|
3
|
+
import { IntlayerClientContext } from "../client/IntlayerProvider.jsx";
|
|
4
4
|
// src/format/useCurrency.ts
|
|
5
5
|
/**
|
|
6
6
|
* Solid client hook that provides a localized currency formatter.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IntlayerClientContext } from "../client/IntlayerProvider.jsx";
|
|
2
|
-
import { useContext } from "solid-js";
|
|
3
1
|
import { date, presets } from "@intlayer/core/formatters";
|
|
2
|
+
import { useContext } from "solid-js";
|
|
3
|
+
import { IntlayerClientContext } from "../client/IntlayerProvider.jsx";
|
|
4
4
|
// src/format/useDate.ts
|
|
5
5
|
/**
|
|
6
6
|
* Solid client hook that provides a localized date/time formatter.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IntlayerClientContext } from "../client/IntlayerProvider.jsx";
|
|
2
|
-
import { createMemo, useContext } from "solid-js";
|
|
3
1
|
import { bindIntl } from "@intlayer/core/formatters";
|
|
2
|
+
import { createMemo, useContext } from "solid-js";
|
|
3
|
+
import { IntlayerClientContext } from "../client/IntlayerProvider.jsx";
|
|
4
4
|
// src/format/useIntl.ts
|
|
5
5
|
/**
|
|
6
6
|
* Solid client hook that provides a locale-bound `Intl` object.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useIntlayerContext } from "../client/IntlayerProvider.jsx";
|
|
2
1
|
import { list } from "@intlayer/core/formatters";
|
|
2
|
+
import { useIntlayerContext } from "../client/IntlayerProvider.jsx";
|
|
3
3
|
// src/format/useList.ts
|
|
4
4
|
/**
|
|
5
5
|
* Solid client hook that provides a localized list formatter.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IntlayerClientContext } from "../client/IntlayerProvider.jsx";
|
|
2
|
-
import { useContext } from "solid-js";
|
|
3
1
|
import { number } from "@intlayer/core/formatters";
|
|
2
|
+
import { useContext } from "solid-js";
|
|
3
|
+
import { IntlayerClientContext } from "../client/IntlayerProvider.jsx";
|
|
4
4
|
// src/format/useNumber.ts
|
|
5
5
|
/**
|
|
6
6
|
* Solid client hook that provides a localized number formatter.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IntlayerClientContext } from "../client/IntlayerProvider.jsx";
|
|
2
|
-
import { useContext } from "solid-js";
|
|
3
1
|
import { percentage } from "@intlayer/core/formatters";
|
|
2
|
+
import { useContext } from "solid-js";
|
|
3
|
+
import { IntlayerClientContext } from "../client/IntlayerProvider.jsx";
|
|
4
4
|
// src/format/usePercentage.ts
|
|
5
5
|
/**
|
|
6
6
|
* Solid client hook that provides a localized percentage formatter.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IntlayerClientContext } from "../client/IntlayerProvider.jsx";
|
|
2
|
-
import { useContext } from "solid-js";
|
|
3
1
|
import { relativeTime } from "@intlayer/core/formatters";
|
|
2
|
+
import { useContext } from "solid-js";
|
|
3
|
+
import { IntlayerClientContext } from "../client/IntlayerProvider.jsx";
|
|
4
4
|
// src/format/useRelativeTime.ts
|
|
5
5
|
/**
|
|
6
6
|
* Solid client hook that provides a localized relative time formatter.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useIntlayerContext } from "../client/IntlayerProvider.jsx";
|
|
2
1
|
import { units } from "@intlayer/core/formatters";
|
|
2
|
+
import { useIntlayerContext } from "../client/IntlayerProvider.jsx";
|
|
3
3
|
// src/format/useUnit.ts
|
|
4
4
|
/**
|
|
5
5
|
* Solid client hook that provides a localized unit formatter.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getPlugins } from "./plugins.jsx";
|
|
2
1
|
import { getDictionary as getDictionary$1 } from "@intlayer/core/interpreter";
|
|
2
|
+
import { getPlugins } from "./plugins.jsx";
|
|
3
3
|
// src/getDictionary.ts
|
|
4
4
|
/**
|
|
5
5
|
* Transforms a dictionary (or qualified dictionary group) and returns its
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getPlugins } from "./plugins.jsx";
|
|
2
1
|
import { getIntlayer as getIntlayer$1 } from "@intlayer/core/interpreter";
|
|
2
|
+
import { getPlugins } from "./plugins.jsx";
|
|
3
3
|
// src/getIntlayer.ts
|
|
4
4
|
/**
|
|
5
5
|
* Picks one dictionary by its key and returns its content for the given
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getContextProvider } from "../solidCompat.js";
|
|
2
1
|
import { createContext, useContext } from "solid-js";
|
|
2
|
+
import { getContextProvider } from "../solidCompat.js";
|
|
3
3
|
// src/html/HTMLProvider.tsx
|
|
4
4
|
/**
|
|
5
5
|
* `null` outside a provider. An explicit default keeps `useContext` from
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useHTMLContext } from "./HTMLProvider.jsx";
|
|
2
1
|
import { getHTML } from "@intlayer/core/interpreter";
|
|
3
2
|
import { VOID_HTML_ELEMENTS } from "@intlayer/core/transpiler";
|
|
3
|
+
import { useHTMLContext } from "./HTMLProvider.jsx";
|
|
4
4
|
// src/html/HTMLRenderer.tsx
|
|
5
5
|
/**
|
|
6
6
|
* Renders HTML-like content to JSX with the provided components.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { createContext, useContext } from "solid-js";
|
|
1
2
|
import { getContextProvider } from "../solidCompat.js";
|
|
2
3
|
import { compileMarkdown } from "./compiler.jsx";
|
|
3
|
-
import { createContext, useContext } from "solid-js";
|
|
4
4
|
// src/markdown/MarkdownProvider.tsx
|
|
5
5
|
/**
|
|
6
6
|
* `null` outside a provider. An explicit default keeps `useContext` from
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { getContentNodeByKeyPath } from "@intlayer/core/dictionaryManipulator";
|
|
2
|
+
import { getMarkdownMetadata } from "@intlayer/core/markdown";
|
|
3
|
+
import { createMemo, useContext } from "solid-js";
|
|
1
4
|
import { createEditedContentSource } from "../editor/createEditedContentSource.js";
|
|
2
5
|
import { LoadingBoundary } from "../LoadingBoundary.jsx";
|
|
3
6
|
import { createAsyncValue } from "../solidCompat.js";
|
|
4
7
|
import { compileMarkdown } from "./compiler.jsx";
|
|
5
8
|
import { MarkdownContext, useMarkdown } from "./MarkdownProvider.jsx";
|
|
6
|
-
import { getMarkdownMetadata } from "@intlayer/core/markdown";
|
|
7
|
-
import { createMemo, useContext } from "solid-js";
|
|
8
|
-
import { getContentNodeByKeyPath } from "@intlayer/core/dictionaryManipulator";
|
|
9
9
|
// src/markdown/MarkdownRenderer.tsx
|
|
10
10
|
var renderMarkdown = (content, options = {}) => {
|
|
11
11
|
return compileMarkdown(content, options);
|
package/dist/solid/plugins.jsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { editor, internationalization } from "@intlayer/config/built";
|
|
2
|
+
import { bindInsertedValues, conditionPlugin, enumerationPlugin, fallbackPlugin, filePlugin, genderPlugin, isInterpolableWrapperNode, nestedPlugin, pluralPlugin, resolveInterpreterLocale, selectPlugin, splitInsertionTemplate, transformInterpolableNode, translationPlugin } from "@intlayer/core/interpreter";
|
|
3
|
+
import { getMarkdownMetadata } from "@intlayer/core/markdown";
|
|
4
|
+
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
1
5
|
import { reportExposure } from "./analytics/exposureSink.js";
|
|
2
6
|
import { renderIntlayerNode } from "./IntlayerNode.jsx";
|
|
3
7
|
import { LoadingBoundary } from "./LoadingBoundary.jsx";
|
|
4
8
|
import { lazyComponent } from "./solidCompat.js";
|
|
5
9
|
import { renderSolidElement } from "./solidElement/renderSolidElement.jsx";
|
|
6
|
-
import { bindInsertedValues, conditionPlugin, enumerationPlugin, fallbackPlugin, filePlugin, genderPlugin, isInterpolableWrapperNode, nestedPlugin, pluralPlugin, resolveInterpreterLocale, selectPlugin, splitInsertionTemplate, transformInterpolableNode, translationPlugin } from "@intlayer/core/interpreter";
|
|
7
|
-
import { editor, internationalization } from "@intlayer/config/built";
|
|
8
|
-
import { getMarkdownMetadata } from "@intlayer/core/markdown";
|
|
9
|
-
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
10
10
|
// src/plugins.tsx
|
|
11
11
|
var LazyContentSelector = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : lazyComponent(() => import("./editor/ContentSelector.jsx").then((m) => ({ default: m.ContentSelector })));
|
|
12
12
|
var markdownRendererModulePromise = process.env.INTLAYER_NODE_TYPE_MARKDOWN !== "false" ? import("./markdown/MarkdownRenderer.jsx").then((m) => ({
|
|
@@ -180,7 +180,7 @@ var markdownPlugin = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false" ? fallb
|
|
|
180
180
|
}
|
|
181
181
|
};
|
|
182
182
|
var HTMLSuspenseRenderer = lazyComponent(() => htmlRendererModulePromise.then((HTMLRenderer) => ({ default: HTMLRenderer })));
|
|
183
|
-
/** HTML plugin. Replaces node with a function that takes components =>
|
|
183
|
+
/** HTML plugin. Replaces node with a function that takes components => SolidElement. */
|
|
184
184
|
var htmlPlugin = process.env.INTLAYER_NODE_TYPE_HTML === "false" ? fallbackPlugin : {
|
|
185
185
|
id: "html-plugin",
|
|
186
186
|
canHandle: (node) => typeof node === "object" && node?.nodeType === NodeTypes.HTML,
|
|
File without changes
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NodeProps } from '@intlayer/core/interpreter';
|
|
2
2
|
import { ResolvedEditor } from '@intlayer/types/module_augmentation';
|
|
3
|
-
import {
|
|
3
|
+
import { ParentProps } from 'solid-js';
|
|
4
|
+
import { SolidElement } from './solidTypes';
|
|
4
5
|
/**
|
|
5
6
|
* Content node returned by `useIntlayer`.
|
|
6
7
|
*
|
|
@@ -11,12 +12,12 @@ import { JSX, ParentProps } from 'solid-js';
|
|
|
11
12
|
*/
|
|
12
13
|
export type IntlayerNode<T = NodeProps['children'], AdditionalProps = unknown> = ResolvedEditor<T & {
|
|
13
14
|
value: T;
|
|
14
|
-
} & AdditionalProps,
|
|
15
|
+
} & AdditionalProps, SolidElement & {
|
|
15
16
|
value: T;
|
|
16
17
|
} & AdditionalProps>;
|
|
17
18
|
type RenderIntlayerNodeProps<T> = ParentProps<{
|
|
18
19
|
value: T;
|
|
19
|
-
children:
|
|
20
|
+
children: SolidElement;
|
|
20
21
|
additionalProps?: Record<string, unknown>;
|
|
21
22
|
}>;
|
|
22
23
|
export declare const renderIntlayerNode: <T>({ children, value, additionalProps, }: RenderIntlayerNodeProps<T>) => IntlayerNode<T>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Component
|
|
1
|
+
import { Component } from 'solid-js';
|
|
2
|
+
import { SolidElement } from './solidTypes';
|
|
2
3
|
export type LoadingBoundaryProps = {
|
|
3
|
-
fallback?:
|
|
4
|
-
children:
|
|
4
|
+
fallback?: SolidElement;
|
|
5
|
+
children: SolidElement;
|
|
5
6
|
};
|
|
6
7
|
/**
|
|
7
8
|
* Shows `fallback` while async reads below it are pending: `Suspense` in
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { LocaleStorageClient } from '@intlayer/core/utils';
|
|
1
2
|
import { LocalesValues } from '@intlayer/types/module_augmentation';
|
|
3
|
+
import { Accessor } from 'solid-js';
|
|
2
4
|
/**
|
|
3
5
|
* Reads the locale persisted in the browser storage (cookie, localStorage…).
|
|
4
6
|
*
|
|
@@ -32,10 +34,7 @@ export declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled?:
|
|
|
32
34
|
/**
|
|
33
35
|
* Hook that provides the locale storage and a function to set it
|
|
34
36
|
*/
|
|
35
|
-
export declare const useLocaleStorage: (isCookieEnabled?: boolean) =>
|
|
36
|
-
getLocale: () => import('@intlayer/types').Locale;
|
|
37
|
-
setLocale: (locale: LocalesValues) => void;
|
|
38
|
-
}>;
|
|
37
|
+
export declare const useLocaleStorage: (isCookieEnabled?: boolean) => Accessor<ReturnType<typeof LocaleStorageClient>>;
|
|
39
38
|
/**
|
|
40
39
|
* @deprecated Use useLocaleStorage instead
|
|
41
40
|
*
|
|
@@ -43,7 +42,4 @@ export declare const useLocaleStorage: (isCookieEnabled?: boolean) => import('so
|
|
|
43
42
|
*
|
|
44
43
|
* Hook that provides the locale cookie and a function to set it
|
|
45
44
|
*/
|
|
46
|
-
export declare const useLocaleCookie: (isCookieEnabled?: boolean) =>
|
|
47
|
-
getLocale: () => import('@intlayer/types').Locale;
|
|
48
|
-
setLocale: (locale: LocalesValues) => void;
|
|
49
|
-
}>;
|
|
45
|
+
export declare const useLocaleCookie: (isCookieEnabled?: boolean) => Accessor<ReturnType<typeof LocaleStorageClient>>;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { NodeProps } from '@intlayer/core/interpreter';
|
|
2
|
-
import { Component
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
'intlayer-content-selector-wrapper': JSX.HTMLAttributes<HTMLElement> & {
|
|
7
|
-
'key-path'?: string;
|
|
8
|
-
'dictionary-key'?: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export type ContentSelectorWrapperProps = NodeProps & Omit<JSX.HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
14
|
-
children?: JSX.Element;
|
|
2
|
+
import { Component } from 'solid-js';
|
|
3
|
+
import { IntrinsicElementProps, SolidElement } from '../solidTypes';
|
|
4
|
+
export type ContentSelectorWrapperProps = NodeProps & Omit<IntrinsicElementProps<'div'>, 'children'> & {
|
|
5
|
+
children?: SolidElement;
|
|
15
6
|
};
|
|
16
7
|
export declare const ContentSelector: Component<ContentSelectorWrapperProps>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { WrappedIntl } from '@intlayer/core/formatters';
|
|
2
2
|
import { LocalesValues } from '@intlayer/types/module_augmentation';
|
|
3
|
+
import { Accessor } from 'solid-js';
|
|
3
4
|
/**
|
|
4
5
|
* Solid client hook that provides a locale-bound `Intl` object.
|
|
5
6
|
*
|
|
@@ -18,4 +19,4 @@ import { LocalesValues } from '@intlayer/types/module_augmentation';
|
|
|
18
19
|
* }).format(123.45);
|
|
19
20
|
* ```
|
|
20
21
|
*/
|
|
21
|
-
export declare const useIntl: (locale?: LocalesValues) =>
|
|
22
|
+
export declare const useIntl: (locale?: LocalesValues) => Accessor<WrappedIntl>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { KeyPath } from '@intlayer/types/keyPath';
|
|
2
|
-
import { Component
|
|
2
|
+
import { Component } from 'solid-js';
|
|
3
|
+
import { SolidElement } from '../solidTypes';
|
|
3
4
|
import { HTMLComponents } from './types';
|
|
4
5
|
export type RenderHTMLProps = {
|
|
5
6
|
/**
|
|
@@ -14,14 +15,14 @@ export type RenderHTMLProps = {
|
|
|
14
15
|
* This function does not use context from HTMLProvider. Use `useHTMLRenderer`
|
|
15
16
|
* hook if you want to leverage provider context.
|
|
16
17
|
*/
|
|
17
|
-
export declare const renderHTML: (content: string, { components }?: RenderHTMLProps) =>
|
|
18
|
+
export declare const renderHTML: (content: string, { components }?: RenderHTMLProps) => SolidElement;
|
|
18
19
|
/**
|
|
19
20
|
* Hook that returns a function to render HTML content.
|
|
20
21
|
*
|
|
21
22
|
* This hook considers the configuration from the `HTMLProvider` context if available,
|
|
22
23
|
* falling back to the provided components.
|
|
23
24
|
*/
|
|
24
|
-
export declare const useHTMLRenderer: ({ components }?: RenderHTMLProps) => (content: string) =>
|
|
25
|
+
export declare const useHTMLRenderer: ({ components }?: RenderHTMLProps) => ((content: string) => SolidElement);
|
|
25
26
|
export type HTMLRendererProps = RenderHTMLProps & {
|
|
26
27
|
/**
|
|
27
28
|
* The HTML content to render as a string.
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { HTMLTagsType } from '@intlayer/core/transpiler';
|
|
2
|
-
import {
|
|
2
|
+
import { IntrinsicElementProps, SolidElement } from '../solidTypes';
|
|
3
3
|
/**
|
|
4
4
|
* Helper to extract specific props from the configuration value.
|
|
5
5
|
*/
|
|
6
6
|
type PropsFromConfig<Value> = Value extends true ? {} : Value extends object ? Value : {};
|
|
7
7
|
/**
|
|
8
|
-
* Common props for all elements
|
|
8
|
+
* Common props for all elements: `HTMLAttributes<HTMLElement>`, which Solid 1
|
|
9
|
+
* gives `<section>`.
|
|
9
10
|
*/
|
|
10
|
-
type ElementProps =
|
|
11
|
+
type ElementProps = IntrinsicElementProps<'section'>;
|
|
11
12
|
/**
|
|
12
13
|
* Solid Component type
|
|
13
14
|
*/
|
|
14
|
-
type SolidComponentType<P = {}> = (props: P) =>
|
|
15
|
+
type SolidComponentType<P = {}> = (props: P) => SolidElement;
|
|
15
16
|
/**
|
|
16
17
|
* Helper: Defines the mapping for the explicitly listed keys in T.
|
|
17
18
|
* Handles whether they are Required or Optional.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
1
|
+
import { Component, ParentProps, ValidComponent } from 'solid-js';
|
|
2
2
|
import { HTMLComponents } from '../html/types';
|
|
3
|
+
import { SolidElement } from '../solidTypes';
|
|
3
4
|
import { ParsedMarkdown } from './compiler';
|
|
4
5
|
export type MarkdownProviderOptions = {
|
|
5
6
|
/** Forces the compiler to always output content with a block-level wrapper. */
|
|
@@ -11,7 +12,7 @@ export type MarkdownProviderOptions = {
|
|
|
11
12
|
};
|
|
12
13
|
type MarkdownProviderValue = {
|
|
13
14
|
components?: HTMLComponents<'permissive', {}>;
|
|
14
|
-
renderMarkdown: (content: string | ParsedMarkdown, options?: MarkdownProviderOptions, components?: HTMLComponents<'permissive', {}>, wrapper?: ValidComponent) =>
|
|
15
|
+
renderMarkdown: (content: string | ParsedMarkdown, options?: MarkdownProviderOptions, components?: HTMLComponents<'permissive', {}>, wrapper?: ValidComponent) => SolidElement | Promise<SolidElement>;
|
|
15
16
|
};
|
|
16
17
|
/**
|
|
17
18
|
* `null` outside a provider. An explicit default keeps `useContext` from
|
|
@@ -24,7 +25,7 @@ export type MarkdownProviderProps = ParentProps<{
|
|
|
24
25
|
forceBlock?: boolean;
|
|
25
26
|
preserveFrontmatter?: boolean;
|
|
26
27
|
tagfilter?: boolean;
|
|
27
|
-
renderMarkdown?: (content: string | ParsedMarkdown, options?: MarkdownProviderOptions, components?: HTMLComponents<'permissive', {}>, wrapper?: ValidComponent) =>
|
|
28
|
+
renderMarkdown?: (content: string | ParsedMarkdown, options?: MarkdownProviderOptions, components?: HTMLComponents<'permissive', {}>, wrapper?: ValidComponent) => SolidElement | Promise<SolidElement>;
|
|
28
29
|
}>;
|
|
29
30
|
export declare const MarkdownProvider: Component<MarkdownProviderProps>;
|
|
30
31
|
export declare const useMarkdown: () => MarkdownProviderValue;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { KeyPath } from '@intlayer/types/keyPath';
|
|
2
2
|
import { LocalesValues } from '@intlayer/types/module_augmentation';
|
|
3
|
-
import { Component,
|
|
3
|
+
import { Component, ValidComponent } from 'solid-js';
|
|
4
4
|
import { HTMLComponents } from '../html/types';
|
|
5
|
+
import { SolidElement } from '../solidTypes';
|
|
5
6
|
import { ParsedMarkdown } from './compiler';
|
|
6
7
|
export type RenderMarkdownOptions = {
|
|
7
8
|
components?: HTMLComponents<'permissive', {}>;
|
|
@@ -10,15 +11,15 @@ export type RenderMarkdownOptions = {
|
|
|
10
11
|
preserveFrontmatter?: boolean;
|
|
11
12
|
tagfilter?: boolean;
|
|
12
13
|
};
|
|
13
|
-
export declare const renderMarkdown: (content: string | ParsedMarkdown, options?: RenderMarkdownOptions) => Promise<
|
|
14
|
-
export declare const useMarkdownRenderer: (options?: RenderMarkdownOptions) => (content: string | ParsedMarkdown) => Promise<
|
|
14
|
+
export declare const renderMarkdown: (content: string | ParsedMarkdown, options?: RenderMarkdownOptions) => Promise<SolidElement>;
|
|
15
|
+
export declare const useMarkdownRenderer: (options?: RenderMarkdownOptions) => (content: string | ParsedMarkdown) => Promise<SolidElement>;
|
|
15
16
|
export type MarkdownRendererProps = RenderMarkdownOptions & {
|
|
16
17
|
dictionaryKey: string;
|
|
17
18
|
keyPath: KeyPath[];
|
|
18
19
|
locale?: LocalesValues;
|
|
19
20
|
children: string | ParsedMarkdown;
|
|
20
21
|
};
|
|
21
|
-
export declare const MarkdownRenderer: (props: MarkdownRendererProps) =>
|
|
22
|
+
export declare const MarkdownRenderer: (props: MarkdownRendererProps) => SolidElement;
|
|
22
23
|
export type MarkdownMetadataRendererProps = MarkdownRendererProps & {
|
|
23
24
|
metadataKeyPath: KeyPath[];
|
|
24
25
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CompileOptions, ParsedMarkdown } from '@intlayer/core/markdown';
|
|
2
|
-
import {
|
|
2
|
+
import { SolidElement } from '../solidTypes';
|
|
3
3
|
/**
|
|
4
4
|
* Intermediate AST produced by `parseMarkdown`.
|
|
5
5
|
* Pass this to `compileMarkdown` to skip re-parsing when the same content is
|
|
@@ -40,4 +40,4 @@ export declare const parseMarkdown: (markdown?: string, options?: CompileOptions
|
|
|
40
40
|
* const element = await compileMarkdown('# Hello **world**');
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
|
-
export declare const compileMarkdown: (input?: string | ParsedMarkdown, options?: CompileOptions) => Promise<
|
|
43
|
+
export declare const compileMarkdown: (input?: string | ParsedMarkdown, options?: CompileOptions) => Promise<SolidElement>;
|
package/dist/types/plugins.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DeepTransformContent as DeepTransformContentCore, IInterpreterPluginState as IInterpreterPluginStateCore, Plugins } from '@intlayer/core/interpreter';
|
|
2
2
|
import { DeclaredLocales, LocalesValues } from '@intlayer/types/module_augmentation';
|
|
3
3
|
import { NodeType } from '@intlayer/types/nodeType';
|
|
4
|
-
import { JSX } from 'solid-js';
|
|
5
4
|
import { HTMLComponents } from './html/types';
|
|
6
5
|
import { IntlayerNode } from './IntlayerNode';
|
|
6
|
+
import { SolidElement } from './solidTypes';
|
|
7
7
|
import * as NodeTypes from '@intlayer/types/nodeType';
|
|
8
8
|
/** ---------------------------------------------
|
|
9
9
|
* INTLAYER NODE PLUGIN
|
|
@@ -17,7 +17,7 @@ export declare const intlayerNodePlugins: Plugins;
|
|
|
17
17
|
export type SolidNodeCond<T> = T extends {
|
|
18
18
|
props: any;
|
|
19
19
|
key?: any;
|
|
20
|
-
} ?
|
|
20
|
+
} ? SolidElement : never;
|
|
21
21
|
/** Translation plugin. Replaces node with a locale string if nodeType = Translation. */
|
|
22
22
|
export declare const solidNodePlugins: Plugins;
|
|
23
23
|
/** ---------------------------------------------
|
|
@@ -28,8 +28,8 @@ export type InsertionCond<T, _S, L extends LocalesValues> = T extends {
|
|
|
28
28
|
[NodeTypes.INSERTION]: infer I;
|
|
29
29
|
fields: readonly (infer F)[];
|
|
30
30
|
} ? <V extends {
|
|
31
|
-
[K in Extract<F, string>]: string | number |
|
|
32
|
-
}>(values: V) => I extends string ? V[keyof V] extends string | number ? IntlayerNode<string> : IntlayerNode<
|
|
31
|
+
[K in Extract<F, string>]: string | number | SolidElement;
|
|
32
|
+
}>(values: V) => I extends string ? V[keyof V] extends string | number ? IntlayerNode<string> : IntlayerNode<SolidElement> : DeepTransformContent<I, L> : never;
|
|
33
33
|
/** Insertion plugin for Solid. Handles component/element insertion. */
|
|
34
34
|
export declare const insertionPlugin: Plugins;
|
|
35
35
|
/**
|
|
@@ -37,7 +37,7 @@ export declare const insertionPlugin: Plugins;
|
|
|
37
37
|
*/
|
|
38
38
|
export type MarkdownStringCond<T> = T extends string ? IntlayerNode<string, {
|
|
39
39
|
metadata: DeepTransformContent<string>;
|
|
40
|
-
use: (components?: HTMLComponents<'permissive', {}>) =>
|
|
40
|
+
use: (components?: HTMLComponents<'permissive', {}>) => SolidElement;
|
|
41
41
|
}> : never;
|
|
42
42
|
/** Markdown string plugin. Replaces string node with a component that render the markdown. */
|
|
43
43
|
export declare const markdownStringPlugin: Plugins;
|
|
@@ -47,7 +47,7 @@ export type MarkdownCond<T> = T extends {
|
|
|
47
47
|
metadata?: infer U;
|
|
48
48
|
tags?: infer U;
|
|
49
49
|
} ? IntlayerNode<M, {
|
|
50
|
-
use: (components?: HTMLComponents<'permissive', U>) =>
|
|
50
|
+
use: (components?: HTMLComponents<'permissive', U>) => SolidElement;
|
|
51
51
|
metadata: DeepTransformContent<U>;
|
|
52
52
|
}> : never;
|
|
53
53
|
export declare const markdownPlugin: Plugins;
|
|
@@ -61,7 +61,7 @@ export type HTMLPluginCond<T> = T extends {
|
|
|
61
61
|
} ? IntlayerNode<I, {
|
|
62
62
|
use: (components?: HTMLComponents<'permissive', U>) => IntlayerNode<I>;
|
|
63
63
|
}> : never;
|
|
64
|
-
/** HTML plugin. Replaces node with a function that takes components =>
|
|
64
|
+
/** HTML plugin. Replaces node with a function that takes components => SolidElement. */
|
|
65
65
|
export declare const htmlPlugin: Plugins;
|
|
66
66
|
/** ---------------------------------------------
|
|
67
67
|
* PLUGINS RESULT
|