angular-intlayer 8.0.0-canary.1 → 8.0.0-canary.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/editor/useCrossFrameState.cjs +3 -3
- package/dist/cjs/editor/useCrossFrameState.cjs.map +1 -1
- package/dist/cjs/plugins.cjs +2 -2
- package/dist/cjs/plugins.cjs.map +1 -1
- package/dist/esm/editor/useCrossFrameState.mjs +3 -3
- package/dist/esm/editor/useCrossFrameState.mjs.map +1 -1
- package/dist/esm/plugins.mjs +2 -2
- package/dist/esm/plugins.mjs.map +1 -1
- package/dist/types/UI/ContentSelector.component.d.ts.map +1 -1
- package/dist/types/client/installIntlayer.d.ts.map +1 -1
- package/dist/types/client/useDictionary.d.ts.map +1 -1
- package/dist/types/client/useDictionaryAsync.d.ts +0 -1
- package/dist/types/client/useDictionaryAsync.d.ts.map +1 -1
- package/dist/types/client/useDictionaryDynamic.d.ts +2 -2
- package/dist/types/client/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/client/useIntl.d.ts +2 -3
- package/dist/types/client/useIntl.d.ts.map +1 -1
- package/dist/types/client/useIntlayer.d.ts.map +1 -1
- package/dist/types/client/useLoadDynamic.d.ts.map +1 -1
- package/dist/types/client/useLocale.d.ts +5 -5
- package/dist/types/client/useLocale.d.ts.map +1 -1
- package/dist/types/client/useLocaleStorage.d.ts +5 -6
- package/dist/types/client/useLocaleStorage.d.ts.map +1 -1
- package/dist/types/editor/ContentSelectorWrapper.component.d.ts +0 -1
- package/dist/types/editor/ContentSelectorWrapper.component.d.ts.map +1 -1
- package/dist/types/editor/EditedContentRenderer.component.d.ts +2 -2
- package/dist/types/editor/EditedContentRenderer.component.d.ts.map +1 -1
- package/dist/types/editor/EditorSelectorRenderer.component.d.ts +0 -1
- package/dist/types/editor/EditorSelectorRenderer.component.d.ts.map +1 -1
- package/dist/types/editor/communicator.d.ts +0 -1
- package/dist/types/editor/communicator.d.ts.map +1 -1
- package/dist/types/editor/configuration.d.ts.map +1 -1
- package/dist/types/editor/createSharedComposable.d.ts.map +1 -1
- package/dist/types/editor/dictionariesRecord.d.ts.map +1 -1
- package/dist/types/editor/editedContent.d.ts.map +1 -1
- package/dist/types/editor/editorEnabled.d.ts.map +1 -1
- package/dist/types/editor/editorLocale.d.ts.map +1 -1
- package/dist/types/editor/focusDictionary.d.ts.map +1 -1
- package/dist/types/editor/installIntlayerEditor.d.ts +0 -1
- package/dist/types/editor/installIntlayerEditor.d.ts.map +1 -1
- package/dist/types/editor/useCrossFrameMessageListener.d.ts +0 -1
- package/dist/types/editor/useCrossFrameMessageListener.d.ts.map +1 -1
- package/dist/types/editor/useCrossFrameState.d.ts +1 -3
- package/dist/types/editor/useCrossFrameState.d.ts.map +1 -1
- package/dist/types/editor/useCrossURLPathState.d.ts +0 -1
- package/dist/types/editor/useCrossURLPathState.d.ts.map +1 -1
- package/dist/types/editor/useEditedContentRenderer.d.ts.map +1 -1
- package/dist/types/editor/useEditor.d.ts.map +1 -1
- package/dist/types/editor/useIframeClickInterceptor.d.ts.map +1 -1
- package/dist/types/getDictionary.d.ts.map +1 -1
- package/dist/types/getIntlayer.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/markdown/installIntlayerMarkdown.d.ts.map +1 -1
- package/dist/types/plugins.d.ts +0 -1
- package/dist/types/plugins.d.ts.map +1 -1
- package/dist/types/renderIntlayerNode.d.ts.map +1 -1
- package/dist/types/webpack/mergeConfig.d.ts +0 -1
- package/dist/types/webpack/mergeConfig.d.ts.map +1 -1
- package/package.json +10 -10
|
@@ -39,11 +39,11 @@ const useCrossFrameState = (key, initialState, options = {
|
|
|
39
39
|
receive: true
|
|
40
40
|
}) => {
|
|
41
41
|
if (crossFrameStateCache.has(key)) {
|
|
42
|
-
const { state, setState
|
|
42
|
+
const { state, setState, postState } = crossFrameStateCache.get(key);
|
|
43
43
|
return [
|
|
44
44
|
state,
|
|
45
|
-
setState
|
|
46
|
-
postState
|
|
45
|
+
setState,
|
|
46
|
+
postState
|
|
47
47
|
];
|
|
48
48
|
}
|
|
49
49
|
const { emit = true, receive = true } = options;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCrossFrameState.cjs","names":["
|
|
1
|
+
{"version":3,"file":"useCrossFrameState.cjs","names":["useCommunicator"],"sources":["../../../src/editor/useCrossFrameState.ts"],"sourcesContent":["import { type Signal, signal } from '@angular/core';\nimport type { MessageKey } from '@intlayer/editor';\nimport { useCommunicator } from './communicator';\nimport { useCrossFrameMessageListener } from './useCrossFrameMessageListener';\n\nexport type CrossFrameStateOptions = {\n /** Whether to broadcast state changes to other instances (default: true) */\n emit?: boolean;\n /** Whether to listen for state updates from other instances (default: true) */\n receive?: boolean;\n};\n\nconst crossFrameStateCache = new Map<\n string,\n {\n state: Signal<any>;\n setState: (v: any | ((prev: any) => any)) => void;\n postState: () => void;\n }\n>();\n\n/**\n * Utility to resolve either a value or an updater function (mirrors React's `setState`).\n */\nconst resolveState = <S>(\n state: S | ((prev?: S) => S) | undefined,\n prevState?: S\n): S | undefined => {\n if (typeof state === 'function') {\n return (state as (prev?: S) => S)(prevState);\n }\n return state as S;\n};\n\n/**\n * Creates a plain object copy that can be safely serialized\n * for postMessage communication\n */\nconst toSerializable = <T>(obj: T): T => {\n if (obj === null || obj === undefined) return obj;\n // Using parse/stringify for a quick deep clone to remove reactivity\n return JSON.parse(JSON.stringify(obj));\n};\n\n/**\n * Angular replacement for Vue's cross-frame state composable.\n * It synchronises a reactive value across frames/windows via the `postMessage` API.\n *\n * @template S The type of the state being synchronised.\n * @param key Unique key identifying this state channel.\n * @param initialState Initial value (or lazy factory) for the state.\n * @param options Control flags for emitting/receiving updates.\n *\n * @returns `[stateSignal, setState, postState]`\n * - `stateSignal` – Angular `Signal<S | undefined>` holding the current state.\n * - `setState` – Setter with the same API as React's `setState`.\n * - `postState` – Manually broadcast the current state (useful after mutations outside `setState`).\n */\nexport const useCrossFrameState = <S>(\n key: `${MessageKey}`,\n initialState?: S | (() => S),\n options: CrossFrameStateOptions = { emit: true, receive: true }\n): [\n Signal<S | undefined>,\n (v: S | ((prev: S | undefined) => S)) => void,\n () => void,\n] => {\n if (crossFrameStateCache.has(key)) {\n // Return the existing instance\n const { state, setState, postState } = crossFrameStateCache.get(key)!;\n return [state, setState, postState];\n }\n\n const { emit = true, receive = true } = options;\n\n /**\n * Internal reactive state using Angular signals.\n * We resolve the initial value here to avoid one extra render (same idea as in the React version).\n */\n const stateSignal = signal<S | undefined>(resolveState<S>(initialState));\n\n // Get communicator within injection context\n const { postMessage, senderId } = useCommunicator();\n\n /**\n * Broadcast the given value if emitting is allowed and the communicator is ready.\n */\n const broadcastState = (value: S | undefined) => {\n if (\n !emit ||\n typeof postMessage !== 'function' ||\n typeof value === 'undefined'\n )\n return;\n postMessage({\n type: `${key}/post`,\n data: value,\n senderId,\n });\n };\n\n /**\n * Setter that mirrors React's `setState` signature (supports value or updater fn).\n */\n const setState = (valueOrUpdater: S | ((prev: S | undefined) => S)) => {\n const next = resolveState<S>(valueOrUpdater as any, stateSignal());\n const serialised = toSerializable(next);\n stateSignal.set(serialised);\n broadcastState(serialised);\n };\n\n /**\n * Manually broadcast the current state to peers.\n */\n const postState = () => {\n if (typeof postMessage !== 'function') return;\n postMessage({\n type: `${key}/post`,\n data: stateSignal(),\n senderId,\n });\n };\n\n // Emit the initial state (if any) right away so that peers can pick it up.\n broadcastState(stateSignal());\n\n // If we are in receive mode but have no state yet, ask peers for theirs.\n if (\n receive &&\n typeof postMessage === 'function' &&\n typeof stateSignal() === 'undefined'\n ) {\n postMessage({ type: `${key}/get`, senderId });\n }\n\n /* ───────────────────── Incoming messages ───────────────────── */\n\n // 1. Updates posted by other frames\n useCrossFrameMessageListener<S>(\n `${key}/post`,\n receive\n ? (data) => {\n stateSignal.set(data);\n }\n : undefined\n );\n\n // 2. Requests from peers asking for our current value\n const handleGetMessage = (_: unknown, originSenderId?: string) => {\n if (!emit) return;\n if (originSenderId === senderId) return; // Don't respond to our own request\n broadcastState(stateSignal());\n };\n\n useCrossFrameMessageListener(\n `${key}/get`,\n emit ? handleGetMessage : undefined\n );\n\n // Cache this instance\n crossFrameStateCache.set(key, { state: stateSignal, setState, postState });\n\n return [stateSignal as Signal<S | undefined>, setState, postState];\n};\n"],"mappings":";;;;;;AAYA,MAAM,uCAAuB,IAAI,KAO9B;;;;AAKH,MAAM,gBACJ,OACA,cACkB;AAClB,KAAI,OAAO,UAAU,WACnB,QAAQ,MAA0B,UAAU;AAE9C,QAAO;;;;;;AAOT,MAAM,kBAAqB,QAAc;AACvC,KAAI,QAAQ,QAAQ,QAAQ,OAAW,QAAO;AAE9C,QAAO,KAAK,MAAM,KAAK,UAAU,IAAI,CAAC;;;;;;;;;;;;;;;;AAiBxC,MAAa,sBACX,KACA,cACA,UAAkC;CAAE,MAAM;CAAM,SAAS;CAAM,KAK5D;AACH,KAAI,qBAAqB,IAAI,IAAI,EAAE;EAEjC,MAAM,EAAE,OAAO,UAAU,cAAc,qBAAqB,IAAI,IAAI;AACpE,SAAO;GAAC;GAAO;GAAU;GAAU;;CAGrC,MAAM,EAAE,OAAO,MAAM,UAAU,SAAS;;;;;CAMxC,MAAM,wCAAoC,aAAgB,aAAa,CAAC;CAGxE,MAAM,EAAE,aAAa,aAAaA,6CAAiB;;;;CAKnD,MAAM,kBAAkB,UAAyB;AAC/C,MACE,CAAC,QACD,OAAO,gBAAgB,cACvB,OAAO,UAAU,YAEjB;AACF,cAAY;GACV,MAAM,GAAG,IAAI;GACb,MAAM;GACN;GACD,CAAC;;;;;CAMJ,MAAM,YAAY,mBAAqD;EAErE,MAAM,aAAa,eADN,aAAgB,gBAAuB,aAAa,CAAC,CAC3B;AACvC,cAAY,IAAI,WAAW;AAC3B,iBAAe,WAAW;;;;;CAM5B,MAAM,kBAAkB;AACtB,MAAI,OAAO,gBAAgB,WAAY;AACvC,cAAY;GACV,MAAM,GAAG,IAAI;GACb,MAAM,aAAa;GACnB;GACD,CAAC;;AAIJ,gBAAe,aAAa,CAAC;AAG7B,KACE,WACA,OAAO,gBAAgB,cACvB,OAAO,aAAa,KAAK,YAEzB,aAAY;EAAE,MAAM,GAAG,IAAI;EAAO;EAAU,CAAC;AAM/C,0EACE,GAAG,IAAI,QACP,WACK,SAAS;AACR,cAAY,IAAI,KAAK;KAEvB,OACL;CAGD,MAAM,oBAAoB,GAAY,mBAA4B;AAChE,MAAI,CAAC,KAAM;AACX,MAAI,mBAAmB,SAAU;AACjC,iBAAe,aAAa,CAAC;;AAG/B,0EACE,GAAG,IAAI,OACP,OAAO,mBAAmB,OAC3B;AAGD,sBAAqB,IAAI,KAAK;EAAE,OAAO;EAAa;EAAU;EAAW,CAAC;AAE1E,QAAO;EAAC;EAAsC;EAAU;EAAU"}
|
package/dist/cjs/plugins.cjs
CHANGED
|
@@ -33,8 +33,8 @@ const markdownStringPlugin = {
|
|
|
33
33
|
plugins: [{
|
|
34
34
|
id: "markdown-metadata-plugin",
|
|
35
35
|
canHandle: (metadataNode) => typeof metadataNode === "string" || typeof metadataNode === "number" || typeof metadataNode === "boolean" || !metadataNode,
|
|
36
|
-
transform: (metadataNode, props
|
|
37
|
-
...props
|
|
36
|
+
transform: (metadataNode, props) => require_renderIntlayerNode.renderIntlayerNode({
|
|
37
|
+
...props,
|
|
38
38
|
value: metadataNode,
|
|
39
39
|
children: node
|
|
40
40
|
})
|
package/dist/cjs/plugins.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.cjs","names":["renderIntlayerNode","ContentSelectorWrapperComponent","
|
|
1
|
+
{"version":3,"file":"plugins.cjs","names":["renderIntlayerNode","ContentSelectorWrapperComponent","useMarkdown","NodeType"],"sources":["../../src/plugins.ts"],"sourcesContent":["import {\n type DeepTransformContent as DeepTransformContentCore,\n getMarkdownMetadata,\n type HTMLCond,\n type IInterpreterPluginState as IInterpreterPluginStateCore,\n type MarkdownContent,\n type Plugins,\n} from '@intlayer/core';\nimport {\n type DeclaredLocales,\n type KeyPath,\n type LocalesValues,\n NodeType,\n} from '@intlayer/types';\nimport { ContentSelectorWrapperComponent } from './editor';\nimport { useMarkdown } from './markdown/installIntlayerMarkdown';\nimport { renderIntlayerNode } from './renderIntlayerNode';\n\n/** ---------------------------------------------\n * INTLAYER NODE PLUGIN\n * --------------------------------------------- */\n\nexport type IntlayerNodeCond<T> = T extends number | string\n ? IntlayerNode<T>\n : never;\n\nexport interface IntlayerNode<T, P = {}> {\n value: T;\n children?: any;\n additionalProps?: P;\n}\n\n/** Translation plugin. Replaces node with a locale string if nodeType = Translation. */\nexport const intlayerNodePlugins: Plugins = {\n id: 'intlayer-node-plugin',\n canHandle: (node) =>\n typeof node === 'bigint' ||\n typeof node === 'string' ||\n typeof node === 'number',\n transform: (_node, { children, ...rest }) =>\n renderIntlayerNode({\n ...rest,\n value: children,\n children: () => ({\n component: ContentSelectorWrapperComponent,\n props: {\n dictionaryKey: rest.dictionaryKey,\n keyPath: rest.keyPath,\n },\n children: children,\n }),\n }),\n};\n\n/**\n * MARKDOWN PLUGIN\n */\n\nexport type MarkdownStringCond<T> = T extends string\n ? IntlayerNode<string, { metadata: DeepTransformContent<string> }>\n : never;\n\n/** Markdown string plugin. Replaces string node with a component that render the markdown. */\nexport const markdownStringPlugin: Plugins = {\n id: 'markdown-string-plugin',\n canHandle: (node) => typeof node === 'string',\n transform: (node: string, props, deepTransformNode) => {\n const {\n plugins, // Removed to avoid next error - Functions cannot be passed directly to Client Components\n ...rest\n } = props;\n\n const metadata = getMarkdownMetadata(node);\n\n const metadataPlugins: Plugins = {\n id: 'markdown-metadata-plugin',\n canHandle: (metadataNode) =>\n typeof metadataNode === 'string' ||\n typeof metadataNode === 'number' ||\n typeof metadataNode === 'boolean' ||\n !metadataNode,\n transform: (metadataNode, props) =>\n renderIntlayerNode({\n ...props,\n value: metadataNode,\n children: node,\n }),\n };\n\n // Transform metadata while keeping the same structure\n const metadataNodes = deepTransformNode(metadata, {\n plugins: [metadataPlugins],\n dictionaryKey: rest.dictionaryKey,\n keyPath: [],\n });\n\n const render = (components?: any) =>\n renderIntlayerNode({\n ...props,\n value: node,\n children: () => ({\n component: ContentSelectorWrapperComponent,\n props: {\n dictionaryKey: rest.dictionaryKey,\n keyPath: rest.keyPath,\n ...components,\n },\n children: () => {\n const { renderMarkdown } = useMarkdown();\n return renderMarkdown(node, components);\n },\n }),\n additionalProps: {\n metadata: metadataNodes,\n },\n });\n\n const element = render() as any;\n\n return new Proxy(element, {\n get(target, prop, receiver) {\n if (prop === 'value') {\n return node;\n }\n if (prop === 'metadata') {\n return metadataNodes;\n }\n\n if (prop === 'use') {\n return (components?: any) => render(components);\n }\n\n return Reflect.get(target, prop, receiver);\n },\n }) as any;\n },\n};\n\nexport type MarkdownCond<T, S, L extends LocalesValues> = T extends {\n nodeType: NodeType | string;\n [NodeType.Markdown]: infer M;\n metadata?: infer U;\n}\n ? {\n use: (components: any) => any;\n metadata: DeepTransformContent<U>;\n } & any\n : never;\n\nexport const markdownPlugin: Plugins = {\n id: 'markdown-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeType.Markdown,\n transform: (node: MarkdownContent, props, deepTransformNode) => {\n const newKeyPath: KeyPath[] = [\n ...props.keyPath,\n {\n type: NodeType.Markdown,\n },\n ];\n\n const children = node[NodeType.Markdown];\n\n return deepTransformNode(children, {\n ...props,\n children,\n keyPath: newKeyPath,\n plugins: [markdownStringPlugin, ...(props.plugins ?? [])],\n });\n },\n};\n\n/** ---------------------------------------------\n * PLUGINS RESULT\n * --------------------------------------------- */\n\nexport type HTMLPluginCond<T, S, L> = HTMLCond<T, S, L>;\n\nexport interface IInterpreterPluginAngular<T, S, L extends LocalesValues> {\n angularIntlayerNode: IntlayerNodeCond<T>;\n angularMarkdown: MarkdownCond<T, S, L>;\n angularHtml: HTMLPluginCond<T, S, L>;\n}\n\n/**\n * Insert this type as param of `DeepTransformContent` to avoid `intlayer` package pollution.\n *\n * Otherwise the the `angular-intlayer` plugins will override the types of `intlayer` functions.\n */\nexport type IInterpreterPluginState = IInterpreterPluginStateCore & {\n angularIntlayerNode: true;\n angularMarkdown: true;\n angularHtml: true;\n};\n\nexport type DeepTransformContent<\n T,\n L extends LocalesValues = DeclaredLocales,\n> = DeepTransformContentCore<T, IInterpreterPluginState, L>;\n"],"mappings":";;;;;;;;;AAiCA,MAAa,sBAA+B;CAC1C,IAAI;CACJ,YAAY,SACV,OAAO,SAAS,YAChB,OAAO,SAAS,YAChB,OAAO,SAAS;CAClB,YAAY,OAAO,EAAE,UAAU,GAAG,WAChCA,8CAAmB;EACjB,GAAG;EACH,OAAO;EACP,iBAAiB;GACf,WAAWC;GACX,OAAO;IACL,eAAe,KAAK;IACpB,SAAS,KAAK;IACf;GACS;GACX;EACF,CAAC;CACL;;AAWD,MAAa,uBAAgC;CAC3C,IAAI;CACJ,YAAY,SAAS,OAAO,SAAS;CACrC,YAAY,MAAc,OAAO,sBAAsB;EACrD,MAAM,EACJ,SACA,GAAG,SACD;EAoBJ,MAAM,gBAAgB,0DAlBe,KAAK,EAkBQ;GAChD,SAAS,CAjBsB;IAC/B,IAAI;IACJ,YAAY,iBACV,OAAO,iBAAiB,YACxB,OAAO,iBAAiB,YACxB,OAAO,iBAAiB,aACxB,CAAC;IACH,YAAY,cAAc,UACxBD,8CAAmB;KACjB,GAAG;KACH,OAAO;KACP,UAAU;KACX,CAAC;IACL,CAI2B;GAC1B,eAAe,KAAK;GACpB,SAAS,EAAE;GACZ,CAAC;EAEF,MAAM,UAAU,eACdA,8CAAmB;GACjB,GAAG;GACH,OAAO;GACP,iBAAiB;IACf,WAAWC;IACX,OAAO;KACL,eAAe,KAAK;KACpB,SAAS,KAAK;KACd,GAAG;KACJ;IACD,gBAAgB;KACd,MAAM,EAAE,mBAAmBC,sDAAa;AACxC,YAAO,eAAe,MAAM,WAAW;;IAE1C;GACD,iBAAiB,EACf,UAAU,eACX;GACF,CAAC;EAEJ,MAAM,UAAU,QAAQ;AAExB,SAAO,IAAI,MAAM,SAAS,EACxB,IAAI,QAAQ,MAAM,UAAU;AAC1B,OAAI,SAAS,QACX,QAAO;AAET,OAAI,SAAS,WACX,QAAO;AAGT,OAAI,SAAS,MACX,SAAQ,eAAqB,OAAO,WAAW;AAGjD,UAAO,QAAQ,IAAI,QAAQ,MAAM,SAAS;KAE7C,CAAC;;CAEL;AAaD,MAAa,iBAA0B;CACrC,IAAI;CACJ,YAAY,SACV,OAAO,SAAS,YAAY,MAAM,aAAaC,yBAAS;CAC1D,YAAY,MAAuB,OAAO,sBAAsB;EAC9D,MAAM,aAAwB,CAC5B,GAAG,MAAM,SACT,EACE,MAAMA,yBAAS,UAChB,CACF;EAED,MAAM,WAAW,KAAKA,yBAAS;AAE/B,SAAO,kBAAkB,UAAU;GACjC,GAAG;GACH;GACA,SAAS;GACT,SAAS,CAAC,sBAAsB,GAAI,MAAM,WAAW,EAAE,CAAE;GAC1D,CAAC;;CAEL"}
|
|
@@ -38,11 +38,11 @@ const useCrossFrameState = (key, initialState, options = {
|
|
|
38
38
|
receive: true
|
|
39
39
|
}) => {
|
|
40
40
|
if (crossFrameStateCache.has(key)) {
|
|
41
|
-
const { state, setState
|
|
41
|
+
const { state, setState, postState } = crossFrameStateCache.get(key);
|
|
42
42
|
return [
|
|
43
43
|
state,
|
|
44
|
-
setState
|
|
45
|
-
postState
|
|
44
|
+
setState,
|
|
45
|
+
postState
|
|
46
46
|
];
|
|
47
47
|
}
|
|
48
48
|
const { emit = true, receive = true } = options;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCrossFrameState.mjs","names":[
|
|
1
|
+
{"version":3,"file":"useCrossFrameState.mjs","names":[],"sources":["../../../src/editor/useCrossFrameState.ts"],"sourcesContent":["import { type Signal, signal } from '@angular/core';\nimport type { MessageKey } from '@intlayer/editor';\nimport { useCommunicator } from './communicator';\nimport { useCrossFrameMessageListener } from './useCrossFrameMessageListener';\n\nexport type CrossFrameStateOptions = {\n /** Whether to broadcast state changes to other instances (default: true) */\n emit?: boolean;\n /** Whether to listen for state updates from other instances (default: true) */\n receive?: boolean;\n};\n\nconst crossFrameStateCache = new Map<\n string,\n {\n state: Signal<any>;\n setState: (v: any | ((prev: any) => any)) => void;\n postState: () => void;\n }\n>();\n\n/**\n * Utility to resolve either a value or an updater function (mirrors React's `setState`).\n */\nconst resolveState = <S>(\n state: S | ((prev?: S) => S) | undefined,\n prevState?: S\n): S | undefined => {\n if (typeof state === 'function') {\n return (state as (prev?: S) => S)(prevState);\n }\n return state as S;\n};\n\n/**\n * Creates a plain object copy that can be safely serialized\n * for postMessage communication\n */\nconst toSerializable = <T>(obj: T): T => {\n if (obj === null || obj === undefined) return obj;\n // Using parse/stringify for a quick deep clone to remove reactivity\n return JSON.parse(JSON.stringify(obj));\n};\n\n/**\n * Angular replacement for Vue's cross-frame state composable.\n * It synchronises a reactive value across frames/windows via the `postMessage` API.\n *\n * @template S The type of the state being synchronised.\n * @param key Unique key identifying this state channel.\n * @param initialState Initial value (or lazy factory) for the state.\n * @param options Control flags for emitting/receiving updates.\n *\n * @returns `[stateSignal, setState, postState]`\n * - `stateSignal` – Angular `Signal<S | undefined>` holding the current state.\n * - `setState` – Setter with the same API as React's `setState`.\n * - `postState` – Manually broadcast the current state (useful after mutations outside `setState`).\n */\nexport const useCrossFrameState = <S>(\n key: `${MessageKey}`,\n initialState?: S | (() => S),\n options: CrossFrameStateOptions = { emit: true, receive: true }\n): [\n Signal<S | undefined>,\n (v: S | ((prev: S | undefined) => S)) => void,\n () => void,\n] => {\n if (crossFrameStateCache.has(key)) {\n // Return the existing instance\n const { state, setState, postState } = crossFrameStateCache.get(key)!;\n return [state, setState, postState];\n }\n\n const { emit = true, receive = true } = options;\n\n /**\n * Internal reactive state using Angular signals.\n * We resolve the initial value here to avoid one extra render (same idea as in the React version).\n */\n const stateSignal = signal<S | undefined>(resolveState<S>(initialState));\n\n // Get communicator within injection context\n const { postMessage, senderId } = useCommunicator();\n\n /**\n * Broadcast the given value if emitting is allowed and the communicator is ready.\n */\n const broadcastState = (value: S | undefined) => {\n if (\n !emit ||\n typeof postMessage !== 'function' ||\n typeof value === 'undefined'\n )\n return;\n postMessage({\n type: `${key}/post`,\n data: value,\n senderId,\n });\n };\n\n /**\n * Setter that mirrors React's `setState` signature (supports value or updater fn).\n */\n const setState = (valueOrUpdater: S | ((prev: S | undefined) => S)) => {\n const next = resolveState<S>(valueOrUpdater as any, stateSignal());\n const serialised = toSerializable(next);\n stateSignal.set(serialised);\n broadcastState(serialised);\n };\n\n /**\n * Manually broadcast the current state to peers.\n */\n const postState = () => {\n if (typeof postMessage !== 'function') return;\n postMessage({\n type: `${key}/post`,\n data: stateSignal(),\n senderId,\n });\n };\n\n // Emit the initial state (if any) right away so that peers can pick it up.\n broadcastState(stateSignal());\n\n // If we are in receive mode but have no state yet, ask peers for theirs.\n if (\n receive &&\n typeof postMessage === 'function' &&\n typeof stateSignal() === 'undefined'\n ) {\n postMessage({ type: `${key}/get`, senderId });\n }\n\n /* ───────────────────── Incoming messages ───────────────────── */\n\n // 1. Updates posted by other frames\n useCrossFrameMessageListener<S>(\n `${key}/post`,\n receive\n ? (data) => {\n stateSignal.set(data);\n }\n : undefined\n );\n\n // 2. Requests from peers asking for our current value\n const handleGetMessage = (_: unknown, originSenderId?: string) => {\n if (!emit) return;\n if (originSenderId === senderId) return; // Don't respond to our own request\n broadcastState(stateSignal());\n };\n\n useCrossFrameMessageListener(\n `${key}/get`,\n emit ? handleGetMessage : undefined\n );\n\n // Cache this instance\n crossFrameStateCache.set(key, { state: stateSignal, setState, postState });\n\n return [stateSignal as Signal<S | undefined>, setState, postState];\n};\n"],"mappings":";;;;;AAYA,MAAM,uCAAuB,IAAI,KAO9B;;;;AAKH,MAAM,gBACJ,OACA,cACkB;AAClB,KAAI,OAAO,UAAU,WACnB,QAAQ,MAA0B,UAAU;AAE9C,QAAO;;;;;;AAOT,MAAM,kBAAqB,QAAc;AACvC,KAAI,QAAQ,QAAQ,QAAQ,OAAW,QAAO;AAE9C,QAAO,KAAK,MAAM,KAAK,UAAU,IAAI,CAAC;;;;;;;;;;;;;;;;AAiBxC,MAAa,sBACX,KACA,cACA,UAAkC;CAAE,MAAM;CAAM,SAAS;CAAM,KAK5D;AACH,KAAI,qBAAqB,IAAI,IAAI,EAAE;EAEjC,MAAM,EAAE,OAAO,UAAU,cAAc,qBAAqB,IAAI,IAAI;AACpE,SAAO;GAAC;GAAO;GAAU;GAAU;;CAGrC,MAAM,EAAE,OAAO,MAAM,UAAU,SAAS;;;;;CAMxC,MAAM,cAAc,OAAsB,aAAgB,aAAa,CAAC;CAGxE,MAAM,EAAE,aAAa,aAAa,iBAAiB;;;;CAKnD,MAAM,kBAAkB,UAAyB;AAC/C,MACE,CAAC,QACD,OAAO,gBAAgB,cACvB,OAAO,UAAU,YAEjB;AACF,cAAY;GACV,MAAM,GAAG,IAAI;GACb,MAAM;GACN;GACD,CAAC;;;;;CAMJ,MAAM,YAAY,mBAAqD;EAErE,MAAM,aAAa,eADN,aAAgB,gBAAuB,aAAa,CAAC,CAC3B;AACvC,cAAY,IAAI,WAAW;AAC3B,iBAAe,WAAW;;;;;CAM5B,MAAM,kBAAkB;AACtB,MAAI,OAAO,gBAAgB,WAAY;AACvC,cAAY;GACV,MAAM,GAAG,IAAI;GACb,MAAM,aAAa;GACnB;GACD,CAAC;;AAIJ,gBAAe,aAAa,CAAC;AAG7B,KACE,WACA,OAAO,gBAAgB,cACvB,OAAO,aAAa,KAAK,YAEzB,aAAY;EAAE,MAAM,GAAG,IAAI;EAAO;EAAU,CAAC;AAM/C,8BACE,GAAG,IAAI,QACP,WACK,SAAS;AACR,cAAY,IAAI,KAAK;KAEvB,OACL;CAGD,MAAM,oBAAoB,GAAY,mBAA4B;AAChE,MAAI,CAAC,KAAM;AACX,MAAI,mBAAmB,SAAU;AACjC,iBAAe,aAAa,CAAC;;AAG/B,8BACE,GAAG,IAAI,OACP,OAAO,mBAAmB,OAC3B;AAGD,sBAAqB,IAAI,KAAK;EAAE,OAAO;EAAa;EAAU;EAAW,CAAC;AAE1E,QAAO;EAAC;EAAsC;EAAU;EAAU"}
|
package/dist/esm/plugins.mjs
CHANGED
|
@@ -32,8 +32,8 @@ const markdownStringPlugin = {
|
|
|
32
32
|
plugins: [{
|
|
33
33
|
id: "markdown-metadata-plugin",
|
|
34
34
|
canHandle: (metadataNode) => typeof metadataNode === "string" || typeof metadataNode === "number" || typeof metadataNode === "boolean" || !metadataNode,
|
|
35
|
-
transform: (metadataNode, props
|
|
36
|
-
...props
|
|
35
|
+
transform: (metadataNode, props) => renderIntlayerNode({
|
|
36
|
+
...props,
|
|
37
37
|
value: metadataNode,
|
|
38
38
|
children: node
|
|
39
39
|
})
|
package/dist/esm/plugins.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.mjs","names":[
|
|
1
|
+
{"version":3,"file":"plugins.mjs","names":[],"sources":["../../src/plugins.ts"],"sourcesContent":["import {\n type DeepTransformContent as DeepTransformContentCore,\n getMarkdownMetadata,\n type HTMLCond,\n type IInterpreterPluginState as IInterpreterPluginStateCore,\n type MarkdownContent,\n type Plugins,\n} from '@intlayer/core';\nimport {\n type DeclaredLocales,\n type KeyPath,\n type LocalesValues,\n NodeType,\n} from '@intlayer/types';\nimport { ContentSelectorWrapperComponent } from './editor';\nimport { useMarkdown } from './markdown/installIntlayerMarkdown';\nimport { renderIntlayerNode } from './renderIntlayerNode';\n\n/** ---------------------------------------------\n * INTLAYER NODE PLUGIN\n * --------------------------------------------- */\n\nexport type IntlayerNodeCond<T> = T extends number | string\n ? IntlayerNode<T>\n : never;\n\nexport interface IntlayerNode<T, P = {}> {\n value: T;\n children?: any;\n additionalProps?: P;\n}\n\n/** Translation plugin. Replaces node with a locale string if nodeType = Translation. */\nexport const intlayerNodePlugins: Plugins = {\n id: 'intlayer-node-plugin',\n canHandle: (node) =>\n typeof node === 'bigint' ||\n typeof node === 'string' ||\n typeof node === 'number',\n transform: (_node, { children, ...rest }) =>\n renderIntlayerNode({\n ...rest,\n value: children,\n children: () => ({\n component: ContentSelectorWrapperComponent,\n props: {\n dictionaryKey: rest.dictionaryKey,\n keyPath: rest.keyPath,\n },\n children: children,\n }),\n }),\n};\n\n/**\n * MARKDOWN PLUGIN\n */\n\nexport type MarkdownStringCond<T> = T extends string\n ? IntlayerNode<string, { metadata: DeepTransformContent<string> }>\n : never;\n\n/** Markdown string plugin. Replaces string node with a component that render the markdown. */\nexport const markdownStringPlugin: Plugins = {\n id: 'markdown-string-plugin',\n canHandle: (node) => typeof node === 'string',\n transform: (node: string, props, deepTransformNode) => {\n const {\n plugins, // Removed to avoid next error - Functions cannot be passed directly to Client Components\n ...rest\n } = props;\n\n const metadata = getMarkdownMetadata(node);\n\n const metadataPlugins: Plugins = {\n id: 'markdown-metadata-plugin',\n canHandle: (metadataNode) =>\n typeof metadataNode === 'string' ||\n typeof metadataNode === 'number' ||\n typeof metadataNode === 'boolean' ||\n !metadataNode,\n transform: (metadataNode, props) =>\n renderIntlayerNode({\n ...props,\n value: metadataNode,\n children: node,\n }),\n };\n\n // Transform metadata while keeping the same structure\n const metadataNodes = deepTransformNode(metadata, {\n plugins: [metadataPlugins],\n dictionaryKey: rest.dictionaryKey,\n keyPath: [],\n });\n\n const render = (components?: any) =>\n renderIntlayerNode({\n ...props,\n value: node,\n children: () => ({\n component: ContentSelectorWrapperComponent,\n props: {\n dictionaryKey: rest.dictionaryKey,\n keyPath: rest.keyPath,\n ...components,\n },\n children: () => {\n const { renderMarkdown } = useMarkdown();\n return renderMarkdown(node, components);\n },\n }),\n additionalProps: {\n metadata: metadataNodes,\n },\n });\n\n const element = render() as any;\n\n return new Proxy(element, {\n get(target, prop, receiver) {\n if (prop === 'value') {\n return node;\n }\n if (prop === 'metadata') {\n return metadataNodes;\n }\n\n if (prop === 'use') {\n return (components?: any) => render(components);\n }\n\n return Reflect.get(target, prop, receiver);\n },\n }) as any;\n },\n};\n\nexport type MarkdownCond<T, S, L extends LocalesValues> = T extends {\n nodeType: NodeType | string;\n [NodeType.Markdown]: infer M;\n metadata?: infer U;\n}\n ? {\n use: (components: any) => any;\n metadata: DeepTransformContent<U>;\n } & any\n : never;\n\nexport const markdownPlugin: Plugins = {\n id: 'markdown-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeType.Markdown,\n transform: (node: MarkdownContent, props, deepTransformNode) => {\n const newKeyPath: KeyPath[] = [\n ...props.keyPath,\n {\n type: NodeType.Markdown,\n },\n ];\n\n const children = node[NodeType.Markdown];\n\n return deepTransformNode(children, {\n ...props,\n children,\n keyPath: newKeyPath,\n plugins: [markdownStringPlugin, ...(props.plugins ?? [])],\n });\n },\n};\n\n/** ---------------------------------------------\n * PLUGINS RESULT\n * --------------------------------------------- */\n\nexport type HTMLPluginCond<T, S, L> = HTMLCond<T, S, L>;\n\nexport interface IInterpreterPluginAngular<T, S, L extends LocalesValues> {\n angularIntlayerNode: IntlayerNodeCond<T>;\n angularMarkdown: MarkdownCond<T, S, L>;\n angularHtml: HTMLPluginCond<T, S, L>;\n}\n\n/**\n * Insert this type as param of `DeepTransformContent` to avoid `intlayer` package pollution.\n *\n * Otherwise the the `angular-intlayer` plugins will override the types of `intlayer` functions.\n */\nexport type IInterpreterPluginState = IInterpreterPluginStateCore & {\n angularIntlayerNode: true;\n angularMarkdown: true;\n angularHtml: true;\n};\n\nexport type DeepTransformContent<\n T,\n L extends LocalesValues = DeclaredLocales,\n> = DeepTransformContentCore<T, IInterpreterPluginState, L>;\n"],"mappings":";;;;;;;;AAiCA,MAAa,sBAA+B;CAC1C,IAAI;CACJ,YAAY,SACV,OAAO,SAAS,YAChB,OAAO,SAAS,YAChB,OAAO,SAAS;CAClB,YAAY,OAAO,EAAE,UAAU,GAAG,WAChC,mBAAmB;EACjB,GAAG;EACH,OAAO;EACP,iBAAiB;GACf,WAAW;GACX,OAAO;IACL,eAAe,KAAK;IACpB,SAAS,KAAK;IACf;GACS;GACX;EACF,CAAC;CACL;;AAWD,MAAa,uBAAgC;CAC3C,IAAI;CACJ,YAAY,SAAS,OAAO,SAAS;CACrC,YAAY,MAAc,OAAO,sBAAsB;EACrD,MAAM,EACJ,SACA,GAAG,SACD;EAoBJ,MAAM,gBAAgB,kBAlBL,oBAAoB,KAAK,EAkBQ;GAChD,SAAS,CAjBsB;IAC/B,IAAI;IACJ,YAAY,iBACV,OAAO,iBAAiB,YACxB,OAAO,iBAAiB,YACxB,OAAO,iBAAiB,aACxB,CAAC;IACH,YAAY,cAAc,UACxB,mBAAmB;KACjB,GAAG;KACH,OAAO;KACP,UAAU;KACX,CAAC;IACL,CAI2B;GAC1B,eAAe,KAAK;GACpB,SAAS,EAAE;GACZ,CAAC;EAEF,MAAM,UAAU,eACd,mBAAmB;GACjB,GAAG;GACH,OAAO;GACP,iBAAiB;IACf,WAAW;IACX,OAAO;KACL,eAAe,KAAK;KACpB,SAAS,KAAK;KACd,GAAG;KACJ;IACD,gBAAgB;KACd,MAAM,EAAE,mBAAmB,aAAa;AACxC,YAAO,eAAe,MAAM,WAAW;;IAE1C;GACD,iBAAiB,EACf,UAAU,eACX;GACF,CAAC;EAEJ,MAAM,UAAU,QAAQ;AAExB,SAAO,IAAI,MAAM,SAAS,EACxB,IAAI,QAAQ,MAAM,UAAU;AAC1B,OAAI,SAAS,QACX,QAAO;AAET,OAAI,SAAS,WACX,QAAO;AAGT,OAAI,SAAS,MACX,SAAQ,eAAqB,OAAO,WAAW;AAGjD,UAAO,QAAQ,IAAI,QAAQ,MAAM,SAAS;KAE7C,CAAC;;CAEL;AAaD,MAAa,iBAA0B;CACrC,IAAI;CACJ,YAAY,SACV,OAAO,SAAS,YAAY,MAAM,aAAa,SAAS;CAC1D,YAAY,MAAuB,OAAO,sBAAsB;EAC9D,MAAM,aAAwB,CAC5B,GAAG,MAAM,SACT,EACE,MAAM,SAAS,UAChB,CACF;EAED,MAAM,WAAW,KAAK,SAAS;AAE/B,SAAO,kBAAkB,UAAU;GACjC,GAAG;GACH;GACA,SAAS;GACT,SAAS,CAAC,sBAAsB,GAAI,MAAM,WAAW,EAAE,CAAE;GAC1D,CAAC;;CAEL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSelector.component.d.ts","names":[],"sources":["../../../src/UI/ContentSelector.component.ts"],"
|
|
1
|
+
{"version":3,"file":"ContentSelector.component.d.ts","names":[],"sources":["../../../src/UI/ContentSelector.component.ts"],"mappings":";;;cAyCa,wBAAA,YAAoC,MAAA,EAAQ,SAAA;EAC9C,cAAA;EACA,aAAA;EACA,WAAA;EAEC,KAAA,EAAK,YAAA,CAAA,UAAA;EACL,KAAA,EAAK,YAAA;EAGf,YAAA,EAAe,UAAA,CAAW,eAAA;EAAA,QAElB,SAAA;EAAA,QACA,gBAAA;EAAA,QACA,aAAA;EAAA,iBAES,mBAAA;EAAA,iBAIA,YAAA;EAMjB,QAAA,CAAA;EAIA,WAAA,CAAA;EAKA,mBAAA,CAAoB,KAAA,EAAO,UAAA;EAAA,QAInB,iBAAA;EAAA,QAKA,eAAA;EAAA,QAMA,eAAA;EAOR,eAAA,CAAA;EAKA,aAAA,CAAA;EAAA,QAKQ,kBAAA;EAUR,WAAA,CAAY,CAAA,EAAG,UAAA;EAQf,UAAA,CAAA;EAIA,YAAA,CAAA;EAIA,iBAAA,CAAA;IAAA,CAAwB,GAAA;EAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installIntlayer.d.ts","names":[],"sources":["../../../src/client/installIntlayer.ts"],"
|
|
1
|
+
{"version":3,"file":"installIntlayer.d.ts","names":[],"sources":["../../../src/client/installIntlayer.ts"],"mappings":";;;;;cAIa,cAAA,EAAc,cAAA,CAAA,gBAAA;AAAA,cAUd,gBAAA;EACX,eAAA,EAD2B,cAAA,CACZ,cAAA;EAAA,QACP,OAAA;EAAA,SAIC,MAAA,EAAQ,MAAA,CAAO,aAAA;EAExB,SAAA,GAAa,MAAA,EAAQ,aAAA;AAAA;;AAXvB;;cAmBa,oBAAA,GACX,MAAA,GAAS,aAAA,EACT,eAAA,eACC,gBAAA;;;;;;;;;;;;;;;;;;AAHH;;;;;;cAuCa,eAAA,GACX,MAAA,GAAS,aAAA,EACT,eAAA;;;;AAFF;;;AAAA,cAWa,eAAA,GACX,MAAA,GAAS,aAAA,EACT,eAAA,eAAsB,gBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../../src/client/useDictionary.ts"],"
|
|
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,oBAAA,CAAqB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryAsync.d.ts","names":[],"sources":["../../../src/client/useDictionaryAsync.ts"],"
|
|
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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
2
|
import "../index.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _intlayer_types0 from "@intlayer/types";
|
|
4
4
|
import { Dictionary, DictionaryKeys, LocalesValues, StrictModeLocaleMap } from "@intlayer/types";
|
|
5
5
|
import * as _intlayer_core1 from "@intlayer/core";
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ import * as _intlayer_core1 from "@intlayer/core";
|
|
|
10
10
|
*
|
|
11
11
|
* If the locale is not provided, it will use the locale from the client context
|
|
12
12
|
*/
|
|
13
|
-
declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => _intlayer_core1.DeepTransformContent<T["content"], IInterpreterPluginState$1,
|
|
13
|
+
declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => _intlayer_core1.DeepTransformContent<T["content"], IInterpreterPluginState$1, _intlayer_types0.Locale>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { useDictionaryDynamic };
|
|
16
16
|
//# sourceMappingURL=useDictionaryDynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"
|
|
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,eAAA,CAAA,oBAAA,CAAA,CAAA,aAAA,yBAAA,EAAA,gBAAA,CAAA,MAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _angular_core1 from "@angular/core";
|
|
2
2
|
import { LocalesValues } from "@intlayer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/client/useIntl.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Angular composable that provides a locale-bound `Intl` object.
|
|
8
7
|
*
|
|
@@ -27,7 +26,7 @@ import { LocalesValues } from "@intlayer/types";
|
|
|
27
26
|
* }
|
|
28
27
|
* ```
|
|
29
28
|
*/
|
|
30
|
-
declare const useIntl: (locale?: LocalesValues) =>
|
|
29
|
+
declare const useIntl: (locale?: LocalesValues) => _angular_core1.Signal<{
|
|
31
30
|
Collator: {
|
|
32
31
|
new (locales?: LocalesValues, options?: Intl.CollatorOptions): Intl.Collator;
|
|
33
32
|
new (options?: Intl.CollatorOptions & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntl.d.ts","names":[],"sources":["../../../src/client/useIntl.ts"],"
|
|
1
|
+
{"version":3,"file":"useIntl.d.ts","names":[],"sources":["../../../src/client/useIntl.ts"],"mappings":";;;;;;;AA6BA;;;;;;;;;;;;;;;;;;;;;cAAa,OAAA,GAAW,MAAA,GAAS,aAAA,oBAAa,MAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../../src/client/useIntlayer.ts"],"
|
|
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,oBAAA,CAAqB,yBAAA,CAA0B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLoadDynamic.d.ts","names":[],"sources":["../../../src/client/useLoadDynamic.ts"],"
|
|
1
|
+
{"version":3,"file":"useLoadDynamic.d.ts","names":[],"sources":["../../../src/client/useLoadDynamic.ts"],"mappings":";;AAQA;;;;;cAAa,cAAA,aAA4B,MAAA,eACvC,GAAA,UACA,OAAA,EAAS,OAAA,CAAQ,CAAA,MAChB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _angular_core0 from "@angular/core";
|
|
2
|
+
import * as _intlayer_types0 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_core0.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_types0.Locale;
|
|
43
|
+
availableLocales: _intlayer_types0.Locale[];
|
|
44
44
|
setLocale: (newLocale: LocalesValues) => void;
|
|
45
45
|
};
|
|
46
46
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"
|
|
1
|
+
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"mappings":";;;;;KAMK,cAAA;EACH,eAAA;EACA,cAAA,IAAkB,MAAA,EAAQ,aAAA;AAAA;AANyB;;;;;;;;;;AAoCrD;;;;;;;;;;;;;;;;;AApCqD,cAoCxC,SAAA;EAAa,eAAA;EAAA;AAAA,IAGvB,cAAA;UAAmB,cAAA,CAAA,MAAA;;;yBAWU,aAAA;AAAA"}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types2 from "@intlayer/types";
|
|
2
2
|
import { LocalesValues } from "@intlayer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/client/useLocaleStorage.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Get the locale cookie
|
|
8
7
|
*/
|
|
9
8
|
/**
|
|
10
9
|
* Get the locale cookie
|
|
11
10
|
*/
|
|
12
|
-
declare const localeInStorage:
|
|
11
|
+
declare const localeInStorage: _intlayer_types2.Locale;
|
|
13
12
|
/**
|
|
14
13
|
* @deprecated Use localeInStorage instead
|
|
15
14
|
*
|
|
16
15
|
* Get the locale cookie
|
|
17
16
|
*/
|
|
18
|
-
declare const localeCookie:
|
|
17
|
+
declare const localeCookie: _intlayer_types2.Locale;
|
|
19
18
|
/**
|
|
20
19
|
* Set the locale cookie
|
|
21
20
|
*/
|
|
@@ -30,7 +29,7 @@ declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled: boolean)
|
|
|
30
29
|
* Hook that provides the locale storage and a function to set it
|
|
31
30
|
*/
|
|
32
31
|
declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
33
|
-
getLocale: () =>
|
|
32
|
+
getLocale: () => _intlayer_types2.Locale;
|
|
34
33
|
setLocale: (locale: LocalesValues) => void;
|
|
35
34
|
};
|
|
36
35
|
/**
|
|
@@ -41,7 +40,7 @@ declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
|
41
40
|
* Hook that provides the locale cookie and a function to set it
|
|
42
41
|
*/
|
|
43
42
|
declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
|
|
44
|
-
localeCookie:
|
|
43
|
+
localeCookie: _intlayer_types2.Locale;
|
|
45
44
|
setLocaleCookie: (locale: LocalesValues) => void;
|
|
46
45
|
};
|
|
47
46
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"
|
|
1
|
+
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;;AAcA;;;AAAA,cAAa,eAAA,EAA4D,gBAAA,CAA7C,MAAA;;AAM5B;;;;cAAa,YAAA,EAA8B,gBAAA,CAAlB,MAAA;AAKzB;;;AAAA,cAAa,kBAAA,GACX,MAAA,EAAQ,aAAA,EACR,eAAA;;;;;;cAYW,eAAA,GAAe,MAAA,EAblB,aAAA,EAAa,eAAA;;;;cAkBV,gBAAA,GAAoB,eAAA;mBAI7B,gBAAA,CAAA,MAAA;sBAAA,aAAA;AAAA;;AAJJ;;;;;;cAaa,eAAA,GAAmB,eAAA;gBAO/B,gBAAA,CAAA,MAAA;4BAAA,aAAA;AAAA"}
|
|
@@ -2,7 +2,6 @@ import * as _angular_core5 from "@angular/core";
|
|
|
2
2
|
import { NodeProps } from "@intlayer/core";
|
|
3
3
|
|
|
4
4
|
//#region src/editor/ContentSelectorWrapper.component.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Combine your NodeProps (which include dictionaryKey & keyPath)
|
|
8
7
|
* with any other div-like attributes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSelectorWrapper.component.d.ts","names":[],"sources":["../../../src/editor/ContentSelectorWrapper.component.ts"],"
|
|
1
|
+
{"version":3,"file":"ContentSelectorWrapper.component.d.ts","names":[],"sources":["../../../src/editor/ContentSelectorWrapper.component.ts"],"mappings":";;;;;;;AAaA;UAAiB,2BAAA,SAAoC,SAAA;EAAA,CAClD,GAAA;AAAA;AAAA,cAkBU,+BAAA;EACF,aAAA;EACA,OAAA;EAAA,QAGD,eAAA;EAAA,QACA,aAAA;;EAOR,UAAA,EAb0C,cAAA,CAahC,MAAA;EASV,OAAA,EATU,cAAA,CASH,MAAA;EAGP,YAAA,CAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _angular_core2 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_core2.Signal<string>;
|
|
20
20
|
}
|
|
21
21
|
//#endregion
|
|
22
22
|
export { EditedContentRendererComponent, EditedContentRendererProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditedContentRenderer.component.d.ts","names":[],"sources":["../../../src/editor/EditedContentRenderer.component.ts"],"
|
|
1
|
+
{"version":3,"file":"EditedContentRenderer.component.d.ts","names":[],"sources":["../../../src/editor/EditedContentRenderer.component.ts"],"mappings":";;;;UAMiB,0BAAA;EACf,aAAA;EACA,OAAA,EAAS,OAAA;EACT,MAAA,GAAS,MAAA;AAAA;AAAA,cASE,8BAAA;EACF,aAAA;EACA,OAAA,EAAU,OAAA;EACV,MAAA,GAAS,MAAA;EAAA,QAEV,QAAA;EAAA,QAEA,UAAA;EAhBC;;;EA2BT,eAAA,EAfwB,cAAA,CAeT,MAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorSelectorRenderer.component.d.ts","names":[],"sources":["../../../src/editor/EditorSelectorRenderer.component.ts"],"
|
|
1
|
+
{"version":3,"file":"EditorSelectorRenderer.component.d.ts","names":[],"sources":["../../../src/editor/EditorSelectorRenderer.component.ts"],"mappings":";;;;;AAUA;;UAAiB,2BAAA,SAAoC,SAAA;EAAA,CAClD,GAAA;AAAA;AAAA,cAyBU,+BAAA;EACF,aAAA;EACA,OAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communicator.d.ts","names":[],"sources":["../../../src/editor/communicator.ts"],"
|
|
1
|
+
{"version":3,"file":"communicator.d.ts","names":[],"sources":["../../../src/editor/communicator.ts"],"mappings":";;;;;AAQA;KAAY,YAAA;EACV,WAAA,SAAoB,MAAA,CAAO,WAAA;EAC3B,cAAA;EACA,QAAA;AAAA;;;;KAMU,mBAAA,GAAsB,IAAA,CAAK,YAAA;;AAAvC;;;cA4Ba,kBAAA,GACX,OAAA,GAAS,mBAAA,KAAiD,YAAA;;AAD5D;;cAiBa,mBAAA,GACX,SAAA,EAAW,QAAA,EACX,OAAA,GAAS,mBAAA;;;;;cAYE,eAAA,QAAsB,YAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.d.ts","names":[],"sources":["../../../src/editor/configuration.ts"],"
|
|
1
|
+
{"version":3,"file":"configuration.d.ts","names":[],"sources":["../../../src/editor/configuration.ts"],"mappings":";cAMa,gBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSharedComposable.d.ts","names":[],"sources":["../../../src/editor/createSharedComposable.ts"],"
|
|
1
|
+
{"version":3,"file":"createSharedComposable.d.ts","names":[],"sources":["../../../src/editor/createSharedComposable.ts"],"mappings":";KAEK,KAAA,OAAY,IAAA;AAAA,KAEL,sBAAA,WAAiC,KAAA,GAAQ,KAAA,IAAS,CAAA;;;;;iBAM9C,iBAAA,CAAkB,EAAA;;;;;cAkBrB,sBAAA,cAAqC,KAAA,EAChD,UAAA,EAAY,EAAA,KACX,sBAAA,CAAuB,EAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionariesRecord.d.ts","names":[],"sources":["../../../src/editor/dictionariesRecord.ts"],"
|
|
1
|
+
{"version":3,"file":"dictionariesRecord.d.ts","names":[],"sources":["../../../src/editor/dictionariesRecord.ts"],"mappings":";;;;KAWY,iBAAA,GAAoB,MAAA,CAAO,UAAA,SAAmB,UAAA;AAAA,KAErD,wBAAA;EACH,kBAAA,EAAoB,MAAA,CAAO,iBAAA;EAC3B,qBAAA,GAAwB,QAAA,EAAU,iBAAA;EAClC,mBAAA,GAAsB,UAAA,EAAY,UAAA;AAAA;AAAA,cAGvB,4BAAA,QAA4B,wBAAA;;;;cA8B5B,yBAAA,GAA6B,SAAA,EAAW,QAAA;AAAA,cAOxC,qBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editedContent.d.ts","names":[],"sources":["../../../src/editor/editedContent.ts"],"
|
|
1
|
+
{"version":3,"file":"editedContent.d.ts","names":[],"sources":["../../../src/editor/editedContent.ts"],"mappings":";;;;KAYY,aAAA,GAAgB,MAAA,CAAO,UAAA,SAAmB,UAAA;AAAA,KAEjD,mBAAA;EACH,aAAA,EAAe,MAAA,CAAO,aAAA;EACtB,gBAAA,GAAmB,aAAA,EAAe,aAAA;EAClC,qBAAA,GACE,sBAAA,EAAwB,iBAAA,GAAoB,UAAA,kBAC5C,OAAA,EAAS,OAAA,OACN,WAAA;AAAA;;;;cAaM,yBAAA,QAAyB,mBAAA;;;;cAuDzB,oBAAA,GAAwB,SAAA,EAAW,QAAA;AAAA,cAOnC,gBAAA,QAAgB,mBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editorEnabled.d.ts","names":[],"sources":["../../../src/editor/editorEnabled.ts"],"
|
|
1
|
+
{"version":3,"file":"editorEnabled.d.ts","names":[],"sources":["../../../src/editor/editorEnabled.ts"],"mappings":";;;KAcY,uBAAA;EACV,cAAA,EAAgB,MAAA;EAChB,UAAA,EAAY,MAAA;EACZ,OAAA,EAAS,MAAA;AAAA;;;;cAaE,yBAAA,QAAyB,uBAAA;;;;cAqBzB,oBAAA,GAAwB,SAAA,EAAW,QAAA;AAAA,cAOnC,gBAAA,QAAgB,uBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editorLocale.d.ts","names":[],"sources":["../../../src/editor/editorLocale.ts"],"
|
|
1
|
+
{"version":3,"file":"editorLocale.d.ts","names":[],"sources":["../../../src/editor/editorLocale.ts"],"mappings":";;;;cAOa,eAAA,QAAe,gBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focusDictionary.d.ts","names":[],"sources":["../../../src/editor/focusDictionary.ts"],"
|
|
1
|
+
{"version":3,"file":"focusDictionary.d.ts","names":[],"sources":["../../../src/editor/focusDictionary.ts"],"mappings":";;;;KAMY,WAAA;EACV,aAAA;EACA,OAAA,GAAU,OAAA;EACV,cAAA;AAAA;AAAA,KAGG,qBAAA;EACH,cAAA,EAAgB,MAAA,CAAO,WAAA;EACvB,iBAAA,GAAoB,eAAA,EAAiB,WAAA;EACrC,wBAAA,GAA2B,OAAA,EAAS,OAAA;AAAA;;;AALpC;cAgBW,2BAAA,QAA2B,qBAAA;;;;cA2B3B,sBAAA,GAA0B,SAAA,EAAW,QAAA;;cAQrC,kBAAA,QAAkB,qBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installIntlayerEditor.d.ts","names":[],"sources":["../../../src/editor/installIntlayerEditor.ts"],"
|
|
1
|
+
{"version":3,"file":"installIntlayerEditor.d.ts","names":[],"sources":["../../../src/editor/installIntlayerEditor.ts"],"mappings":";;;;;AA8CA;;;;;;;;;;;;;cAAa,qBAAA,GAAyB,QAAA,EAAU,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCrossFrameMessageListener.d.ts","names":[],"sources":["../../../src/editor/useCrossFrameMessageListener.ts"],"
|
|
1
|
+
{"version":3,"file":"useCrossFrameMessageListener.d.ts","names":[],"sources":["../../../src/editor/useCrossFrameMessageListener.ts"],"mappings":";;;;;AAmEA;;;;;;cAAa,4BAAA,MACX,GAAA,KAAQ,UAAA,QAAkB,UAAA,aAAuB,UAAA,QACjD,gBAAA,IAAoB,IAAA,EAAM,CAAA,eAAU,IAAA,GA8BD,CAAA"}
|
|
@@ -3,9 +3,7 @@ import { MessageKey } from "@intlayer/editor";
|
|
|
3
3
|
|
|
4
4
|
//#region src/editor/useCrossFrameState.d.ts
|
|
5
5
|
type CrossFrameStateOptions = {
|
|
6
|
-
/** Whether to broadcast state changes to other instances (default: true) */
|
|
7
|
-
emit?: boolean;
|
|
8
|
-
/** Whether to listen for state updates from other instances (default: true) */
|
|
6
|
+
/** Whether to broadcast state changes to other instances (default: true) */emit?: boolean; /** Whether to listen for state updates from other instances (default: true) */
|
|
9
7
|
receive?: boolean;
|
|
10
8
|
};
|
|
11
9
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCrossFrameState.d.ts","names":[],"sources":["../../../src/editor/useCrossFrameState.ts"],"
|
|
1
|
+
{"version":3,"file":"useCrossFrameState.d.ts","names":[],"sources":["../../../src/editor/useCrossFrameState.ts"],"mappings":";;;;KAKY,sBAAA;8EAEV,IAAA,YAFgC;EAIhC,OAAA;AAAA;;AAiDF;;;;;;;;;;;;;cAAa,kBAAA,MACX,GAAA,KAAQ,UAAA,IACR,YAAA,GAAe,CAAA,UAAW,CAAA,GAC1B,OAAA,GAAS,sBAAA,MAET,MAAA,CAAO,CAAA,gBACN,CAAA,EAAG,CAAA,KAAM,IAAA,EAAM,CAAA,iBAAkB,CAAA"}
|
|
@@ -2,7 +2,6 @@ import { useCrossFrameState } from "./useCrossFrameState.js";
|
|
|
2
2
|
import * as _angular_core3 from "@angular/core";
|
|
3
3
|
|
|
4
4
|
//#region src/editor/useCrossURLPathState.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Hook to create and manage a cross-frame synchronized URL path state
|
|
8
7
|
* @param initial - The initial URL path
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCrossURLPathState.d.ts","names":[],"sources":["../../../src/editor/useCrossURLPathState.ts"],"
|
|
1
|
+
{"version":3,"file":"useCrossURLPathState.d.ts","names":[],"sources":["../../../src/editor/useCrossURLPathState.ts"],"mappings":";;;;;;;AAUA;;;cAAa,oBAAA,GACX,OAAA,WACA,IAAA,GAAO,UAAA,QAAkB,kBAAA,UAAR,cAAA,CAA8B,MAAA,WAAA,CAAA,aAAA,IAAA;;;;;;;cASpC,qBAAA,GAAyB,OAAA,wBAiErC,cAAA,CAjEqD,MAAA,WAAA,CAAA,aAAA,IAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditedContentRenderer.d.ts","names":[],"sources":["../../../src/editor/useEditedContentRenderer.ts"],"
|
|
1
|
+
{"version":3,"file":"useEditedContentRenderer.d.ts","names":[],"sources":["../../../src/editor/useEditedContentRenderer.ts"],"mappings":";;;;UASiB,oBAAA;EACf,qBAAA,CAAsB,aAAA,UAAuB,OAAA,EAAS,OAAA;AAAA;AAAA,cAG3C,4BAAA,EAA4B,cAAA,CAAA,oBAAA;AAAA,cAM5B,4BAAA;EATkD;;;EAa7D,wBAAA,CACE,aAAA,UACA,OAAA,EAAS,OAAA,IACT,QAAA,YACC,MAAA;AAAA;;;AAdL;cAiCa,wBAAA,GACX,aAAA,UACA,OAAA,EAAS,OAAA,IACT,QAAA,cACC,MAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditor.d.ts","names":[],"sources":["../../../src/editor/useEditor.ts"],"
|
|
1
|
+
{"version":3,"file":"useEditor.d.ts","names":[],"sources":["../../../src/editor/useEditor.ts"],"mappings":";cASa,SAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIframeClickInterceptor.d.ts","names":[],"sources":["../../../src/editor/useIframeClickInterceptor.ts"],"
|
|
1
|
+
{"version":3,"file":"useIframeClickInterceptor.d.ts","names":[],"sources":["../../../src/editor/useIframeClickInterceptor.ts"],"mappings":";;AAaA;;;cAAa,yBAAA;;AAkCb;;;cAAa,oBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDictionary.d.ts","names":[],"sources":["../../src/getDictionary.ts"],"
|
|
1
|
+
{"version":3,"file":"getDictionary.d.ts","names":[],"sources":["../../src/getDictionary.ts"],"mappings":";;;;;cAWa,aAAA,aACD,UAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,UAAA,EAAY,CAAA,EACZ,MAAA,GAAS,CAAA,EACT,iBAAA,GAAoB,OAAA,OAAS,eAAA,CAAA,oBAAA,CAAA,CAAA,aAAA,eAAA,CAAA,uBAAA,EAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getIntlayer.d.ts","names":[],"sources":["../../src/getIntlayer.ts"],"
|
|
1
|
+
{"version":3,"file":"getIntlayer.d.ts","names":[],"sources":["../../src/getIntlayer.ts"],"mappings":";;;;;cAaa,WAAA,aACD,cAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,CAAA,EACT,iBAAA,GAAoB,OAAA,OASkC,sBAAA,CACpD,yBAAA,CAA0B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;YAKY,kBAAA,iBAAmC,aAAA,UACnC,yBAAA,CAA0B,CAAA,EAAG,CAAA,EAAG,CAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installIntlayerMarkdown.d.ts","names":[],"sources":["../../../src/markdown/installIntlayerMarkdown.ts"],"
|
|
1
|
+
{"version":3,"file":"installIntlayerMarkdown.d.ts","names":[],"sources":["../../../src/markdown/installIntlayerMarkdown.ts"],"mappings":";;;cAOa,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;;;;cAYL,8BAAA,GACX,cAAA,GAAgB,sBAAA;;YAKX,wBAAA;AAAA;;;;cASM,uBAAA;EAAA,QACH,gBAAA;EAIR,cAAA,CAAe,QAAA,UAAkB,SAAA,kBAA2B,WAAA;AAAA;;;AAjC9D;cA4Ca,WAAA,QAAkB,wBAAA"}
|
package/dist/types/plugins.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { DeclaredLocales, LocalesValues, NodeType } from "@intlayer/types";
|
|
|
2
2
|
import { DeepTransformContent as DeepTransformContent$1, HTMLCond, IInterpreterPluginState as IInterpreterPluginState$1, Plugins } from "@intlayer/core";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins.d.ts
|
|
5
|
-
|
|
6
5
|
/** ---------------------------------------------
|
|
7
6
|
* INTLAYER NODE PLUGIN
|
|
8
7
|
* --------------------------------------------- */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","names":[],"sources":["../../src/plugins.ts"],"
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","names":[],"sources":["../../src/plugins.ts"],"mappings":";;;;;;AAsBA;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,KA2EvB,YAAA,iBAA6B,aAAA,IAAiB,CAAA;EACxD,QAAA,EAAU,QAAA;EAAA,CACT,QAAA,CAAS,QAAA;EACV,QAAA;AAAA;EAGI,GAAA,GAAM,UAAA;EACN,QAAA,EAAU,oBAAA,CAAqB,CAAA;AAAA;AAAA,cAIxB,cAAA,EAAgB,OAAA;;AApH7B;;KA+IY,cAAA,YAA0B,QAAA,CAAS,CAAA,EAAG,CAAA,EAAG,CAAA;AAAA,UAEpC,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;AAAA;;;;;;KAQxB,uBAAA,GAA0B,yBAAA;EACpC,mBAAA;EACA,eAAA;EACA,WAAA;AAAA;AAAA,KAGU,oBAAA,cAEA,aAAA,GAAgB,eAAA,IACxB,sBAAA,CAAyB,CAAA,EAAG,uBAAA,EAAyB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderIntlayerNode.d.ts","names":[],"sources":["../../src/renderIntlayerNode.ts"],"
|
|
1
|
+
{"version":3,"file":"renderIntlayerNode.d.ts","names":[],"sources":["../../src/renderIntlayerNode.ts"],"mappings":";KAAY,YAAA;EACV,KAAA,EAAO,CAAA;AAAA,IACL,eAAA;AAAA,KAEC,uBAAA;EACH,KAAA,EAAO,CAAA;EACP,QAAA;EACA,eAAA;IAAA,CAAqB,GAAA;EAAA;AAAA;AAAA,cAGV,kBAAA;EAEX,QAAA;EAAA,KAAA;EAAA;AAAA,GAIC,uBAAA,CAAwB,CAAA,MAAK,YAAA,CAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeConfig.d.ts","names":[],"sources":["../../../src/webpack/mergeConfig.ts"],"
|
|
1
|
+
{"version":3,"file":"mergeConfig.d.ts","names":[],"sources":["../../../src/webpack/mergeConfig.ts"],"mappings":";cAOa,WAAA,GAAe,UAAA,EAAY,aAAA,KAAgB,aAAA"}
|
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.2",
|
|
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.2",
|
|
89
|
+
"@intlayer/config": "8.0.0-canary.2",
|
|
90
|
+
"@intlayer/core": "8.0.0-canary.2",
|
|
91
|
+
"@intlayer/dictionaries-entry": "8.0.0-canary.2",
|
|
92
|
+
"@intlayer/editor": "8.0.0-canary.2",
|
|
93
|
+
"@intlayer/types": "8.0.0-canary.2",
|
|
94
|
+
"@intlayer/webpack": "8.0.0-canary.2",
|
|
95
95
|
"defu": "6.1.4"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
@@ -101,9 +101,9 @@
|
|
|
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.
|
|
104
|
+
"tsdown": "0.20.0",
|
|
105
105
|
"typescript": "5.9.3",
|
|
106
|
-
"vitest": "4.0.
|
|
106
|
+
"vitest": "4.0.18"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|
|
109
109
|
"@angular/common": "15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0",
|