angular-intlayer 8.0.0-canary.4 → 8.0.0-canary.6
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/README.md +0 -2
- package/dist/cjs/UI/ContentSelector.component.cjs +53 -32
- package/dist/cjs/UI/ContentSelector.component.cjs.map +1 -1
- package/dist/cjs/_virtual/_@oxc-project_runtime@0.110.0/helpers/decorate.cjs +11 -0
- package/dist/cjs/_virtual/_@oxc-project_runtime@0.110.0/helpers/decorateMetadata.cjs +8 -0
- package/dist/cjs/client/index.cjs +6 -1
- package/dist/cjs/client/installIntlayer.cjs +9 -2
- package/dist/cjs/client/installIntlayer.cjs.map +1 -1
- package/dist/cjs/client/useDictionary.cjs +1 -1
- package/dist/cjs/client/useDictionary.cjs.map +1 -1
- package/dist/cjs/client/useIntlayer.cjs +1 -1
- package/dist/cjs/client/useIntlayer.cjs.map +1 -1
- package/dist/cjs/editor/ContentSelectorWrapper.component.cjs +28 -18
- package/dist/cjs/editor/ContentSelectorWrapper.component.cjs.map +1 -1
- package/dist/cjs/editor/EditedContentRenderer.component.cjs +21 -10
- package/dist/cjs/editor/EditedContentRenderer.component.cjs.map +1 -1
- package/dist/cjs/editor/EditorSelectorRenderer.component.cjs +16 -6
- package/dist/cjs/editor/EditorSelectorRenderer.component.cjs.map +1 -1
- package/dist/cjs/editor/index.cjs +18 -3
- package/dist/cjs/editor/useEditedContentRenderer.cjs +9 -2
- package/dist/cjs/editor/useEditedContentRenderer.cjs.map +1 -1
- package/dist/cjs/getDictionary.cjs +1 -0
- package/dist/cjs/getDictionary.cjs.map +1 -1
- package/dist/cjs/getIntlayer.cjs +2 -0
- package/dist/cjs/getIntlayer.cjs.map +1 -1
- package/dist/cjs/index.cjs +15 -2
- package/dist/cjs/markdown/index.cjs +7 -1
- package/dist/cjs/markdown/installIntlayerMarkdown.cjs +45 -4
- package/dist/cjs/markdown/installIntlayerMarkdown.cjs.map +1 -1
- package/dist/cjs/plugins.cjs +101 -3
- package/dist/cjs/plugins.cjs.map +1 -1
- package/dist/cjs/renderIntlayerNode.cjs +15 -5
- package/dist/cjs/renderIntlayerNode.cjs.map +1 -1
- package/dist/esm/UI/ContentSelector.component.mjs +47 -31
- package/dist/esm/UI/ContentSelector.component.mjs.map +1 -1
- package/dist/esm/_virtual/_@oxc-project_runtime@0.110.0/helpers/decorate.mjs +10 -0
- package/dist/esm/_virtual/_@oxc-project_runtime@0.110.0/helpers/decorateMetadata.mjs +7 -0
- package/dist/esm/client/installIntlayer.mjs +3 -1
- package/dist/esm/client/installIntlayer.mjs.map +1 -1
- package/dist/esm/client/useDictionary.mjs +1 -1
- package/dist/esm/client/useDictionary.mjs.map +1 -1
- package/dist/esm/client/useIntlayer.mjs +1 -1
- package/dist/esm/client/useIntlayer.mjs.map +1 -1
- package/dist/esm/editor/ContentSelectorWrapper.component.mjs +22 -17
- package/dist/esm/editor/ContentSelectorWrapper.component.mjs.map +1 -1
- package/dist/esm/editor/EditedContentRenderer.component.mjs +15 -9
- package/dist/esm/editor/EditedContentRenderer.component.mjs.map +1 -1
- package/dist/esm/editor/EditorSelectorRenderer.component.mjs +10 -5
- package/dist/esm/editor/EditorSelectorRenderer.component.mjs.map +1 -1
- package/dist/esm/editor/useEditedContentRenderer.mjs +3 -1
- package/dist/esm/editor/useEditedContentRenderer.mjs.map +1 -1
- package/dist/esm/getDictionary.mjs +2 -1
- package/dist/esm/getDictionary.mjs.map +1 -1
- package/dist/esm/getIntlayer.mjs +3 -1
- package/dist/esm/getIntlayer.mjs.map +1 -1
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/markdown/index.mjs +2 -2
- package/dist/esm/markdown/installIntlayerMarkdown.mjs +39 -4
- package/dist/esm/markdown/installIntlayerMarkdown.mjs.map +1 -1
- package/dist/esm/plugins.mjs +102 -6
- package/dist/esm/plugins.mjs.map +1 -1
- package/dist/esm/renderIntlayerNode.mjs +15 -5
- package/dist/esm/renderIntlayerNode.mjs.map +1 -1
- package/dist/types/client/installIntlayer.d.ts +2 -2
- package/dist/types/client/useDictionary.d.ts +2 -1
- package/dist/types/client/useDictionary.d.ts.map +1 -1
- package/dist/types/client/useDictionaryAsync.d.ts +2 -1
- package/dist/types/client/useDictionaryAsync.d.ts.map +1 -1
- package/dist/types/client/useDictionaryDynamic.d.ts +4 -3
- package/dist/types/client/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/client/useIntl.d.ts +2 -2
- package/dist/types/client/useIntlayer.d.ts +2 -1
- package/dist/types/client/useIntlayer.d.ts.map +1 -1
- package/dist/types/client/useLocale.d.ts +5 -5
- package/dist/types/client/useLocaleStorage.d.ts +5 -5
- package/dist/types/editor/EditedContentRenderer.component.d.ts +2 -2
- package/dist/types/editor/useCrossURLPathState.d.ts +3 -3
- package/dist/types/getIntlayer.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/markdown/index.d.ts +2 -2
- package/dist/types/markdown/installIntlayerMarkdown.d.ts +3 -1
- package/dist/types/markdown/installIntlayerMarkdown.d.ts.map +1 -1
- package/dist/types/plugins.d.ts +38 -10
- package/dist/types/plugins.d.ts.map +1 -1
- package/package.json +9 -9
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { DeepTransformContent } from "../plugins.js";
|
|
2
|
+
import { Signal } from "@angular/core";
|
|
2
3
|
import { Dictionary, LocalesValues } from "@intlayer/types";
|
|
3
4
|
|
|
4
5
|
//#region src/client/useDictionary.d.ts
|
|
5
|
-
declare const useDictionary: <T extends Dictionary>(dictionary: T, locale?: LocalesValues) => DeepTransformContent<T["content"]
|
|
6
|
+
declare const useDictionary: <T extends Dictionary>(dictionary: T, locale?: LocalesValues) => Signal<DeepTransformContent<T["content"]>>;
|
|
6
7
|
//#endregion
|
|
7
8
|
export { useDictionary };
|
|
8
9
|
//# 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":";;;;;cAMa,aAAA,aAA2B,UAAA,EACtC,UAAA,EAAY,CAAA,EACZ,MAAA,GAAS,aAAA,KACR,MAAA,CAAO,oBAAA,CAAqB,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as _angular_core0 from "@angular/core";
|
|
1
2
|
import { Dictionary, LocalesValues, StrictModeLocaleMap } from "@intlayer/types";
|
|
2
3
|
|
|
3
4
|
//#region src/client/useDictionaryAsync.d.ts
|
|
@@ -6,7 +7,7 @@ import { Dictionary, LocalesValues, StrictModeLocaleMap } from "@intlayer/types"
|
|
|
6
7
|
*
|
|
7
8
|
* If the locale is not provided, it will use the locale from the client context
|
|
8
9
|
*/
|
|
9
|
-
declare const useDictionaryAsync: <T extends Dictionary>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, locale?: LocalesValues) => Promise<any
|
|
10
|
+
declare const useDictionaryAsync: <T extends Dictionary>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, locale?: LocalesValues) => Promise<_angular_core0.Signal<any>>;
|
|
10
11
|
//#endregion
|
|
11
12
|
export { useDictionaryAsync };
|
|
12
13
|
//# 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":";;;;;;;AAiBA;;cAAa,kBAAA,aAAsC,UAAA,EACjD,iBAAA,EAAmB,mBAAA,OAA0B,OAAA,CAAQ,CAAA,IACrD,MAAA,GAAS,aAAA,KAAa,OAAA,CAAA,cAAA,CAAA,MAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
2
|
import "../index.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _angular_core5 from "@angular/core";
|
|
4
|
+
import * as _intlayer_types0 from "@intlayer/types";
|
|
4
5
|
import { Dictionary, DictionaryKeys, LocalesValues, StrictModeLocaleMap } from "@intlayer/types";
|
|
5
|
-
import * as
|
|
6
|
+
import * as _intlayer_core0 from "@intlayer/core";
|
|
6
7
|
|
|
7
8
|
//#region src/client/useDictionaryDynamic.d.ts
|
|
8
9
|
/**
|
|
@@ -10,7 +11,7 @@ import * as _intlayer_core1 from "@intlayer/core";
|
|
|
10
11
|
*
|
|
11
12
|
* If the locale is not provided, it will use the locale from the client context
|
|
12
13
|
*/
|
|
13
|
-
declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) =>
|
|
14
|
+
declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => _angular_core5.Signal<_intlayer_core0.DeepTransformContent<T["content"], IInterpreterPluginState$1, _intlayer_types0.Locale>>;
|
|
14
15
|
//#endregion
|
|
15
16
|
export { useDictionaryDynamic };
|
|
16
17
|
//# 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":";;;;;;;;;;;;;cAmBa,oBAAA,aACD,UAAA,YACA,cAAA,EAEV,iBAAA,EAAmB,mBAAA,OAA0B,OAAA,CAAQ,CAAA,IACrD,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,aAAA,KAAa,cAAA,CAAA,MAAA,CAAA,eAAA,CAAA,oBAAA,CAAA,CAAA,aAAA,yBAAA,EAAA,gBAAA,CAAA,MAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _angular_core0 from "@angular/core";
|
|
2
2
|
import { LocalesValues } from "@intlayer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/client/useIntl.d.ts
|
|
@@ -26,7 +26,7 @@ import { LocalesValues } from "@intlayer/types";
|
|
|
26
26
|
* }
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
declare const useIntl: (locale?: LocalesValues) =>
|
|
29
|
+
declare const useIntl: (locale?: LocalesValues) => _angular_core0.Signal<{
|
|
30
30
|
Collator: {
|
|
31
31
|
new (locales?: LocalesValues, options?: Intl.CollatorOptions): Intl.Collator;
|
|
32
32
|
new (options?: Intl.CollatorOptions & {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DeepTransformContent } from "../plugins.js";
|
|
2
|
+
import { Signal } from "@angular/core";
|
|
2
3
|
import { DictionaryKeys, DictionaryRegistryContent, LocalesValues } from "@intlayer/types";
|
|
3
4
|
|
|
4
5
|
//#region src/client/useIntlayer.d.ts
|
|
@@ -31,7 +32,7 @@ declare const isUpdatableNode: (val: unknown) => val is {
|
|
|
31
32
|
* }
|
|
32
33
|
* ```
|
|
33
34
|
*/
|
|
34
|
-
declare const useIntlayer: <T extends DictionaryKeys, L extends LocalesValues>(key: T, locale?: LocalesValues) => DeepTransformContent<DictionaryRegistryContent<T
|
|
35
|
+
declare const useIntlayer: <T extends DictionaryKeys, L extends LocalesValues>(key: T, locale?: LocalesValues) => Signal<DeepTransformContent<DictionaryRegistryContent<T>>>;
|
|
35
36
|
//#endregion
|
|
36
37
|
export { isUpdatableNode, useIntlayer };
|
|
37
38
|
//# 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":";;;;;;cAWa,eAAA,GACX,GAAA,cACC,GAAA;EAAS,QAAA,GAAW,CAAA;AAAA;;;;;;;;;AA8BvB;;;;;;;;;;;;;;;;;cAAa,WAAA,aAAyB,cAAA,YAA0B,aAAA,EAC9D,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,aAAA,KACR,MAAA,CAAO,oBAAA,CAAqB,yBAAA,CAA0B,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _angular_core6 from "@angular/core";
|
|
2
|
+
import * as _intlayer_types4 from "@intlayer/types";
|
|
3
3
|
import { LocalesValues } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/client/useLocale.d.ts
|
|
@@ -38,9 +38,9 @@ declare const useLocale: ({
|
|
|
38
38
|
isCookieEnabled,
|
|
39
39
|
onLocaleChange
|
|
40
40
|
}?: useLocaleProps) => {
|
|
41
|
-
locale:
|
|
42
|
-
defaultLocale:
|
|
43
|
-
availableLocales:
|
|
41
|
+
locale: _angular_core6.Signal<"af" | "af-ZA" | "ar" | "ar-AE" | "ar-BH" | "ar-DZ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MA" | "ar-OM" | "ar-QA" | "ar-SA" | "ar-SY" | "ar-TN" | "ar-YE" | "az" | "az-AZ" | "be" | "be-BY" | "bg" | "bg-BG" | "bs" | "bs-BA" | "ca" | "ca-ES" | "cs" | "cs-CZ" | "cy" | "cy-GB" | "da" | "da-DK" | "de" | "de-AT" | "de-CH" | "de-DE" | "de-LI" | "de-LU" | "dv" | "dv-MV" | "el" | "el-GR" | "en" | "en-AU" | "en-BZ" | "en-CA" | "en-CB" | "en-GB" | "en-IE" | "en-JM" | "en-NZ" | "en-PH" | "en-TT" | "en-US" | "en-ZA" | "en-ZW" | "eo" | "es" | "es-AR" | "es-BO" | "es-CL" | "es-CO" | "es-CR" | "es-DO" | "es-EC" | "es-ES" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PE" | "es-PR" | "es-PY" | "es-SV" | "es-UY" | "es-VE" | "et" | "et-EE" | "eu" | "eu-ES" | "fa" | "fa-IR" | "fi" | "fi-FI" | "fo" | "fo-FO" | "fr" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "fr-LU" | "fr-MC" | "ga" | "ga-IE" | "gd" | "gd-GB" | "gl" | "gl-ES" | "gu" | "gu-IN" | "he" | "he-IL" | "hi" | "hi-IN" | "hr" | "hr-BA" | "hr-HR" | "hu" | "hu-HU" | "hy" | "hy-AM" | "id" | "id-ID" | "is" | "is-IS" | "it" | "it-CH" | "it-IT" | "ja" | "ja-JP" | "ka" | "ka-GE" | "kk" | "kk-KZ" | "kn" | "kn-IN" | "ko" | "ko-KR" | "kok" | "kok-IN" | "ku" | "ku-TR" | "ky" | "ky-KG" | "lt" | "lt-LT" | "lv" | "lv-LV" | "mi" | "mi-NZ" | "mk" | "mk-MK" | "mn" | "mn-MN" | "mr" | "mr-IN" | "ms" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "ml" | "ml-IN" | "no" | "nb" | "nb-NO" | "nl" | "nl-BE" | "nl-NL" | "nn" | "nn-NO" | "ns" | "ns-ZA" | "pa" | "pa-IN" | "pl" | "pl-PL" | "ps" | "ps-AR" | "pt" | "pt-BR" | "pt-PT" | "qu" | "qu-BO" | "qu-EC" | "qu-PE" | "ro" | "ro-RO" | "ro-MD" | "rm" | "rm-CH" | "ru" | "ru-RU" | "ru-MD" | "sa" | "sa-IN" | "se" | "se-FI" | "se-NO" | "se-SE" | "hsb" | "hsb-DE" | "dsb" | "dsb-DE" | "sk" | "sk-SK" | "sl" | "sl-SI" | "sq" | "sq-AL" | "sr" | "sr-BA" | "sr-SP" | "sv" | "sv-FI" | "sv-SE" | "sw" | "sw-KE" | "syr" | "syr-SY" | "ta" | "ta-IN" | "te" | "te-IN" | "th" | "th-TH" | "tl" | "tl-PH" | "tn" | "tn-ZA" | "tr" | "tr-TR" | "tt" | "tt-RU" | "ts" | "uk" | "uk-UA" | "ur" | "ur-PK" | "uz" | "uz-UZ" | "vi" | "vi-VN" | "ve" | "ve-ZA" | "xh" | "xh-ZA" | "zh" | "zh-Hans" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-SG" | "zh-Hant" | "zu" | "zu-ZA" | "bn" | "bn-BD" | "bn-IN" | "bn-MM" | "my" | "my-MM" | "km" | "km-KH" | "lo" | "lo-LA" | "yo" | "yo-NG" | "yi" | "yi-001" | "am" | "am-ET" | "ne" | "ne-NP" | "si" | "si-LK" | "sr-Cyrl" | "sr-RS" | "en-IN" | "en-SG" | "en-HK" | "en-NG" | "en-PK" | "en-MY" | "en-BW" | "en-KE" | "en-TZ" | "en-GH" | "en-UG" | "es-CU" | "es-US" | "pt-GW" | "pt-MZ" | "pt-ST" | "pt-CV" | "pt-TL" | "pt-MO" | "zh-TW" | "ar-MR" | "ar-PS" | "ar-SD" | "ar-DJ" | "ar-SO" | "ar-TD" | "ar-KM" | (string & {})>;
|
|
42
|
+
defaultLocale: _intlayer_types4.Locale;
|
|
43
|
+
availableLocales: _intlayer_types4.Locale[];
|
|
44
44
|
setLocale: (newLocale: LocalesValues) => void;
|
|
45
45
|
};
|
|
46
46
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types0 from "@intlayer/types";
|
|
2
2
|
import { LocalesValues } from "@intlayer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/client/useLocaleStorage.d.ts
|
|
@@ -8,13 +8,13 @@ import { LocalesValues } from "@intlayer/types";
|
|
|
8
8
|
/**
|
|
9
9
|
* Get the locale cookie
|
|
10
10
|
*/
|
|
11
|
-
declare const localeInStorage:
|
|
11
|
+
declare const localeInStorage: _intlayer_types0.Locale;
|
|
12
12
|
/**
|
|
13
13
|
* @deprecated Use localeInStorage instead
|
|
14
14
|
*
|
|
15
15
|
* Get the locale cookie
|
|
16
16
|
*/
|
|
17
|
-
declare const localeCookie:
|
|
17
|
+
declare const localeCookie: _intlayer_types0.Locale;
|
|
18
18
|
/**
|
|
19
19
|
* Set the locale cookie
|
|
20
20
|
*/
|
|
@@ -29,7 +29,7 @@ declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled: boolean)
|
|
|
29
29
|
* Hook that provides the locale storage and a function to set it
|
|
30
30
|
*/
|
|
31
31
|
declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
32
|
-
getLocale: () =>
|
|
32
|
+
getLocale: () => _intlayer_types0.Locale;
|
|
33
33
|
setLocale: (locale: LocalesValues) => void;
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
@@ -40,7 +40,7 @@ declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
|
40
40
|
* Hook that provides the locale cookie and a function to set it
|
|
41
41
|
*/
|
|
42
42
|
declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
|
|
43
|
-
localeCookie:
|
|
43
|
+
localeCookie: _intlayer_types0.Locale;
|
|
44
44
|
setLocaleCookie: (locale: LocalesValues) => void;
|
|
45
45
|
};
|
|
46
46
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _angular_core4 from "@angular/core";
|
|
2
2
|
import { KeyPath, Locale } from "@intlayer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/editor/EditedContentRenderer.component.d.ts
|
|
@@ -16,7 +16,7 @@ declare class EditedContentRendererComponent {
|
|
|
16
16
|
/**
|
|
17
17
|
* Object → getContent → string, same as the React version.
|
|
18
18
|
*/
|
|
19
|
-
renderedContent:
|
|
19
|
+
renderedContent: _angular_core4.Signal<string>;
|
|
20
20
|
}
|
|
21
21
|
//#endregion
|
|
22
22
|
export { EditedContentRendererComponent, EditedContentRendererProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCrossFrameState } from "./useCrossFrameState.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _angular_core7 from "@angular/core";
|
|
3
3
|
|
|
4
4
|
//#region src/editor/useCrossURLPathState.d.ts
|
|
5
5
|
/**
|
|
@@ -8,14 +8,14 @@ import * as _angular_core5 from "@angular/core";
|
|
|
8
8
|
* @param opts - Options for controlling emit and receive behavior
|
|
9
9
|
* @returns A tuple containing [state signal, setState function, forceSync function]
|
|
10
10
|
*/
|
|
11
|
-
declare const useCrossURLPathState: (initial?: string, opts?: Parameters<typeof useCrossFrameState>[2]) => [
|
|
11
|
+
declare const useCrossURLPathState: (initial?: string, opts?: Parameters<typeof useCrossFrameState>[2]) => [_angular_core7.Signal<string>, (v: string | ((prev: string) => string)) => void, () => void];
|
|
12
12
|
/**
|
|
13
13
|
* Hook for host applications to push URL path changes into the shared state
|
|
14
14
|
* This also monkey patches history methods to capture navigation events
|
|
15
15
|
* @param initial - The initial URL path
|
|
16
16
|
* @returns A tuple containing [state signal, setState function]
|
|
17
17
|
*/
|
|
18
|
-
declare const useCrossURLPathSetter: (initial?: string) => readonly [
|
|
18
|
+
declare const useCrossURLPathSetter: (initial?: string) => readonly [_angular_core7.Signal<string>, (v: string | ((prev: string) => string)) => void];
|
|
19
19
|
//#endregion
|
|
20
20
|
export { useCrossURLPathSetter, useCrossURLPathState };
|
|
21
21
|
//# sourceMappingURL=useCrossURLPathState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getIntlayer.d.ts","names":[],"sources":["../../src/getIntlayer.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"getIntlayer.d.ts","names":[],"sources":["../../src/getIntlayer.ts"],"mappings":";;;;;cAea,WAAA,aACD,cAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,CAAA,EACT,iBAAA,GAAoB,OAAA,OAWkC,sBAAA,CACpD,yBAAA,CAA0B,CAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { INTLAYER_TOKEN, IntlayerProvider, createIntlayerClient, installIntlayer, provideIntlayer } from "./client/installIntlayer.js";
|
|
2
|
-
import { DeepTransformContent, HTMLPluginCond, IInterpreterPluginAngular, IInterpreterPluginState, IntlayerNode, IntlayerNodeCond, MarkdownCond, MarkdownStringCond, intlayerNodePlugins, markdownPlugin, markdownStringPlugin } from "./plugins.js";
|
|
2
|
+
import { DeepTransformContent, HTMLPluginCond, IInterpreterPluginAngular, IInterpreterPluginState, InsertionPluginCond, IntlayerNode, IntlayerNodeCond, MarkdownCond, MarkdownStringCond, htmlPlugin, insertionPlugin, intlayerNodePlugins, markdownPlugin, markdownStringPlugin } from "./plugins.js";
|
|
3
3
|
import { useDictionary } from "./client/useDictionary.js";
|
|
4
4
|
import { useDictionaryAsync } from "./client/useDictionaryAsync.js";
|
|
5
5
|
import { getDictionary } from "./getDictionary.js";
|
|
6
6
|
import { getIntlayer } from "./getIntlayer.js";
|
|
7
|
-
import { INTLAYER_MARKDOWN_TOKEN, IntlayerMarkdownProvider, IntlayerMarkdownService, createIntlayerMarkdownProvider, useMarkdown } from "./markdown/installIntlayerMarkdown.js";
|
|
7
|
+
import { INTLAYER_MARKDOWN_TOKEN, IntlayerMarkdownProvider, IntlayerMarkdownService, createIntlayerMarkdownProvider, htmlRuntime, useMarkdown } from "./markdown/installIntlayerMarkdown.js";
|
|
8
8
|
import "./markdown/index.js";
|
|
9
9
|
import { useDictionaryDynamic } from "./client/useDictionaryDynamic.js";
|
|
10
10
|
import { useIntl } from "./client/useIntl.js";
|
|
@@ -19,5 +19,5 @@ declare module '@intlayer/core' {
|
|
|
19
19
|
interface IInterpreterPlugin<T, S, L extends LocalesValues> extends IInterpreterPluginAngular<T, S, L> {}
|
|
20
20
|
}
|
|
21
21
|
//#endregion
|
|
22
|
-
export { DeepTransformContent, HTMLPluginCond, IInterpreterPluginAngular, IInterpreterPluginState, INTLAYER_MARKDOWN_TOKEN, INTLAYER_TOKEN, IntlayerMarkdownProvider, IntlayerMarkdownService, IntlayerNode, IntlayerNodeCond, IntlayerProvider, MarkdownCond, MarkdownStringCond, createIntlayerClient, createIntlayerMarkdownProvider, getDictionary, getIntlayer, installIntlayer, intlayerNodePlugins, isUpdatableNode, markdownPlugin, markdownStringPlugin, provideIntlayer, useDictionary, useDictionaryAsync, useDictionaryDynamic, useIntl, useIntlayer, useLoadDynamic, useLocale, useMarkdown };
|
|
22
|
+
export { DeepTransformContent, HTMLPluginCond, IInterpreterPluginAngular, IInterpreterPluginState, INTLAYER_MARKDOWN_TOKEN, INTLAYER_TOKEN, InsertionPluginCond, IntlayerMarkdownProvider, IntlayerMarkdownService, IntlayerNode, IntlayerNodeCond, IntlayerProvider, MarkdownCond, MarkdownStringCond, createIntlayerClient, createIntlayerMarkdownProvider, getDictionary, getIntlayer, htmlPlugin, htmlRuntime, insertionPlugin, installIntlayer, intlayerNodePlugins, isUpdatableNode, markdownPlugin, markdownStringPlugin, provideIntlayer, useDictionary, useDictionaryAsync, useDictionaryDynamic, useIntl, useIntlayer, useLoadDynamic, useLocale, useMarkdown };
|
|
23
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { INTLAYER_MARKDOWN_TOKEN, IntlayerMarkdownProvider, IntlayerMarkdownService, createIntlayerMarkdownProvider, useMarkdown } from "./installIntlayerMarkdown.js";
|
|
2
|
-
export { INTLAYER_MARKDOWN_TOKEN, IntlayerMarkdownProvider, IntlayerMarkdownService, createIntlayerMarkdownProvider, useMarkdown };
|
|
1
|
+
import { INTLAYER_MARKDOWN_TOKEN, IntlayerMarkdownProvider, IntlayerMarkdownService, createIntlayerMarkdownProvider, htmlRuntime, useMarkdown } from "./installIntlayerMarkdown.js";
|
|
2
|
+
export { INTLAYER_MARKDOWN_TOKEN, IntlayerMarkdownProvider, IntlayerMarkdownService, createIntlayerMarkdownProvider, htmlRuntime, useMarkdown };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InjectionToken, TemplateRef } from "@angular/core";
|
|
2
|
+
import { MarkdownRuntime } from "@intlayer/core";
|
|
2
3
|
|
|
3
4
|
//#region src/markdown/installIntlayerMarkdown.d.ts
|
|
4
5
|
declare const INTLAYER_MARKDOWN_TOKEN: InjectionToken<IntlayerMarkdownProvider>;
|
|
@@ -11,6 +12,7 @@ type RenderMarkdownFunction = (markdown: string, overrides?: any | RenderMarkdow
|
|
|
11
12
|
type IntlayerMarkdownProvider = {
|
|
12
13
|
renderMarkdown: RenderMarkdownFunction;
|
|
13
14
|
};
|
|
15
|
+
declare const htmlRuntime: MarkdownRuntime;
|
|
14
16
|
/**
|
|
15
17
|
* Create IntlayerMarkdown provider configuration
|
|
16
18
|
*/
|
|
@@ -30,5 +32,5 @@ declare class IntlayerMarkdownService {
|
|
|
30
32
|
*/
|
|
31
33
|
declare const useMarkdown: () => IntlayerMarkdownProvider;
|
|
32
34
|
//#endregion
|
|
33
|
-
export { INTLAYER_MARKDOWN_TOKEN, IntlayerMarkdownProvider, IntlayerMarkdownService, createIntlayerMarkdownProvider, useMarkdown };
|
|
35
|
+
export { INTLAYER_MARKDOWN_TOKEN, IntlayerMarkdownProvider, IntlayerMarkdownService, createIntlayerMarkdownProvider, htmlRuntime, useMarkdown };
|
|
34
36
|
//# sourceMappingURL=installIntlayerMarkdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installIntlayerMarkdown.d.ts","names":[],"sources":["../../../src/markdown/installIntlayerMarkdown.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"installIntlayerMarkdown.d.ts","names":[],"sources":["../../../src/markdown/installIntlayerMarkdown.ts"],"mappings":";;;;cAQa,uBAAA,EAAuB,cAAA,CAAA,wBAAA;AAAA,KAG/B,qBAAA;EACH,UAAA;EACA,OAAA;EACA,OAAA;AAAA;AAAA,KAGG,sBAAA,IACH,QAAA,UACA,SAAA,SAAkB,qBAAA,cACN,WAAA;AAAA,KAEF,wBAAA;EACV,cAAA,EAAgB,sBAAA;AAAA;AAAA,cAIL,WAAA,EAAa,eAAA;;;;cA0Db,8BAAA,GACX,cAAA,GAAgB,sBAAA;;YAKX,wBAAA;AAAA;;;;cASM,uBAAA;EAAA,QACH,gBAAA;EAIR,cAAA,CAAe,QAAA,UAAkB,SAAA,kBAA2B,WAAA;AAAA;;AAnF9D;;cA8Fa,WAAA,QAAkB,wBAAA"}
|
package/dist/types/plugins.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeclaredLocales, LocalesValues, NodeType } from "@intlayer/types";
|
|
2
|
-
import { DeepTransformContent as DeepTransformContent$1,
|
|
2
|
+
import { DeepTransformContent as DeepTransformContent$1, IInterpreterPluginState as IInterpreterPluginState$1, Plugins } from "@intlayer/core";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins.d.ts
|
|
5
5
|
/** ---------------------------------------------
|
|
@@ -21,23 +21,50 @@ type MarkdownStringCond<T> = T extends string ? IntlayerNode<string, {
|
|
|
21
21
|
}> : never;
|
|
22
22
|
/** Markdown string plugin. Replaces string node with a component that render the markdown. */
|
|
23
23
|
declare const markdownStringPlugin: Plugins;
|
|
24
|
-
type MarkdownCond<T,
|
|
24
|
+
type MarkdownCond<T, _S, _L extends LocalesValues> = T extends {
|
|
25
25
|
nodeType: NodeType | string;
|
|
26
26
|
[NodeType.Markdown]: infer M;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
tags?: infer U;
|
|
28
|
+
metadata?: infer V;
|
|
29
|
+
} ? IntlayerNode<M, {
|
|
30
|
+
use: (components?: Record<keyof U, any>) => any;
|
|
31
|
+
metadata: DeepTransformContent<V>;
|
|
32
|
+
}> : never;
|
|
32
33
|
declare const markdownPlugin: Plugins;
|
|
33
34
|
/** ---------------------------------------------
|
|
34
|
-
*
|
|
35
|
+
* HTML PLUGIN
|
|
35
36
|
* --------------------------------------------- */
|
|
36
|
-
|
|
37
|
+
/**
|
|
38
|
+
* HTML conditional type.
|
|
39
|
+
*
|
|
40
|
+
* This ensures type safety:
|
|
41
|
+
* - `html('<div>Hello <CustomComponent /></div>').use({ CustomComponent: ... })` - optional but typed
|
|
42
|
+
*/
|
|
43
|
+
type HTMLPluginCond<T, _S, _L> = T extends {
|
|
44
|
+
nodeType: NodeType | string;
|
|
45
|
+
[NodeType.HTML]: infer I;
|
|
46
|
+
tags?: infer U;
|
|
47
|
+
} ? IntlayerNode<I, {
|
|
48
|
+
use: (components?: Record<keyof U, any>) => any;
|
|
49
|
+
}> : never;
|
|
50
|
+
/** HTML plugin. Replaces node with a function that takes components => IntlayerNode. */
|
|
51
|
+
declare const htmlPlugin: Plugins;
|
|
52
|
+
/** ---------------------------------------------
|
|
53
|
+
* INSERTION PLUGIN
|
|
54
|
+
* --------------------------------------------- */
|
|
55
|
+
/**
|
|
56
|
+
* Insertion conditional type.
|
|
57
|
+
*/
|
|
58
|
+
type InsertionPluginCond<T> = T extends {
|
|
59
|
+
nodeType: NodeType | string;
|
|
60
|
+
[NodeType.Insertion]: infer _I;
|
|
61
|
+
} ? (args: Record<string, string | number>) => string : never;
|
|
62
|
+
declare const insertionPlugin: Plugins;
|
|
37
63
|
interface IInterpreterPluginAngular<T, S, L extends LocalesValues> {
|
|
38
64
|
angularIntlayerNode: IntlayerNodeCond<T>;
|
|
39
65
|
angularMarkdown: MarkdownCond<T, S, L>;
|
|
40
66
|
angularHtml: HTMLPluginCond<T, S, L>;
|
|
67
|
+
angularInsertion: InsertionPluginCond<T>;
|
|
41
68
|
}
|
|
42
69
|
/**
|
|
43
70
|
* Insert this type as param of `DeepTransformContent` to avoid `intlayer` package pollution.
|
|
@@ -48,8 +75,9 @@ type IInterpreterPluginState = IInterpreterPluginState$1 & {
|
|
|
48
75
|
angularIntlayerNode: true;
|
|
49
76
|
angularMarkdown: true;
|
|
50
77
|
angularHtml: true;
|
|
78
|
+
angularInsertion: true;
|
|
51
79
|
};
|
|
52
80
|
type DeepTransformContent<T, L extends LocalesValues = DeclaredLocales> = DeepTransformContent$1<T, IInterpreterPluginState, L>;
|
|
53
81
|
//#endregion
|
|
54
|
-
export { DeepTransformContent, HTMLPluginCond, IInterpreterPluginAngular, IInterpreterPluginState, IntlayerNode, IntlayerNodeCond, MarkdownCond, MarkdownStringCond, intlayerNodePlugins, markdownPlugin, markdownStringPlugin };
|
|
82
|
+
export { DeepTransformContent, HTMLPluginCond, IInterpreterPluginAngular, IInterpreterPluginState, InsertionPluginCond, IntlayerNode, IntlayerNodeCond, MarkdownCond, MarkdownStringCond, htmlPlugin, insertionPlugin, intlayerNodePlugins, markdownPlugin, markdownStringPlugin };
|
|
55
83
|
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","names":[],"sources":["../../src/plugins.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","names":[],"sources":["../../src/plugins.ts"],"mappings":";;;;;;AAoDA;KAAY,gBAAA,MAAsB,CAAA,2BAC9B,YAAA,CAAa,CAAA;AAAA,UAGA,YAAA;EACf,KAAA,EAAO,CAAA;EACP,QAAA;EACA,eAAA,GAAkB,CAAA;AAAA;;cAIP,mBAAA,EAAqB,OAAA;;;;KAyBtB,kBAAA,MAAwB,CAAA,kBAChC,YAAA;EAAuB,QAAA,EAAU,oBAAA;AAAA;;cAIxB,oBAAA,EAAsB,OAAA;AAAA,KAqGvB,YAAA,mBAA+B,aAAA,IAAiB,CAAA;EAC1D,QAAA,EAAU,QAAA;EAAA,CACT,QAAA,CAAS,QAAA;EACV,IAAA;EACA,QAAA;AAAA,IAEE,YAAA,CACE,CAAA;EAEE,GAAA,GAAM,UAAA,GAAa,MAAA,OAAa,CAAA;EAChC,QAAA,EAAU,oBAAA,CAAqB,CAAA;AAAA;AAAA,cAK1B,cAAA,EAAgB,OAAA;AAlJ7B;;;;;AAyBA;;;;KA0JY,cAAA,cAA4B,CAAA;EACtC,QAAA,EAAU,QAAA;EAAA,CACT,QAAA,CAAS,IAAA;EACV,IAAA;AAAA,IAEE,YAAA,CACE,CAAA;EAEE,GAAA,GAAM,UAAA,GAAa,MAAA,OAAa,CAAA;AAAA;;cAM3B,UAAA,EAAY,OAAA;;;AAnKzB;;;;KAgQY,mBAAA,MAAyB,CAAA;EACnC,QAAA,EAAU,QAAA;EAAA,CACT,QAAA,CAAS,SAAA;AAAA,KAEP,IAAA,EAAM,MAAA;AAAA,cAGE,eAAA,EAAiB,OAAA;AAAA,UA6Bb,yBAAA,iBAA0C,aAAA;EACzD,mBAAA,EAAqB,gBAAA,CAAiB,CAAA;EACtC,eAAA,EAAiB,YAAA,CAAa,CAAA,EAAG,CAAA,EAAG,CAAA;EACpC,WAAA,EAAa,cAAA,CAAe,CAAA,EAAG,CAAA,EAAG,CAAA;EAClC,gBAAA,EAAkB,mBAAA,CAAoB,CAAA;AAAA;;;;;;KAQ5B,uBAAA,GAA0B,yBAAA;EACpC,mBAAA;EACA,eAAA;EACA,WAAA;EACA,gBAAA;AAAA;AAAA,KAGU,oBAAA,cAEA,aAAA,GAAgB,eAAA,IACxB,sBAAA,CAAyB,CAAA,EAAG,uBAAA,EAAyB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angular-intlayer",
|
|
3
|
-
"version": "8.0.0-canary.
|
|
3
|
+
"version": "8.0.0-canary.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Angular applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -85,13 +85,13 @@
|
|
|
85
85
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@intlayer/chokidar": "8.0.0-canary.
|
|
89
|
-
"@intlayer/config": "8.0.0-canary.
|
|
90
|
-
"@intlayer/core": "8.0.0-canary.
|
|
91
|
-
"@intlayer/dictionaries-entry": "8.0.0-canary.
|
|
92
|
-
"@intlayer/editor": "8.0.0-canary.
|
|
93
|
-
"@intlayer/types": "8.0.0-canary.
|
|
94
|
-
"@intlayer/webpack": "8.0.0-canary.
|
|
88
|
+
"@intlayer/chokidar": "8.0.0-canary.6",
|
|
89
|
+
"@intlayer/config": "8.0.0-canary.6",
|
|
90
|
+
"@intlayer/core": "8.0.0-canary.6",
|
|
91
|
+
"@intlayer/dictionaries-entry": "8.0.0-canary.6",
|
|
92
|
+
"@intlayer/editor": "8.0.0-canary.6",
|
|
93
|
+
"@intlayer/types": "8.0.0-canary.6",
|
|
94
|
+
"@intlayer/webpack": "8.0.0-canary.6",
|
|
95
95
|
"defu": "6.1.4"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"@utils/ts-config-types": "1.0.4",
|
|
102
102
|
"@utils/tsdown-config": "1.0.4",
|
|
103
103
|
"rimraf": "6.1.2",
|
|
104
|
-
"tsdown": "0.20.
|
|
104
|
+
"tsdown": "0.20.1",
|
|
105
105
|
"typescript": "5.9.3",
|
|
106
106
|
"vitest": "4.0.18"
|
|
107
107
|
},
|