@intlayer/editor-react 9.1.3 → 9.2.0
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/FocusDictionaryContext.cjs.map +1 -1
- package/dist/esm/FocusDictionaryContext.mjs.map +1 -1
- package/dist/types/FocusDictionaryContext.d.ts +3 -2
- package/dist/types/FocusDictionaryContext.d.ts.map +1 -1
- package/dist/types/useFocusUnmergedDictionary.d.ts +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusDictionaryContext.cjs","names":["useEditorStateManager","NodeTypes"],"sources":["../../src/FocusDictionaryContext.tsx"],"sourcesContent":["'use client';\n\nimport type { FileContent } from '@intlayer/editor';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport * as NodeTypes from '@intlayer/types/nodeType';\nimport {\n createContext,\n type FC,\n type PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { useEditorStateManager } from './EditorStateContext';\n\nexport type { FileContent } from '@intlayer/editor';\n\nexport type FocusDictionaryState = {\n focusedContent: FileContent | null;\n};\n\nexport type FocusDictionaryActions = {\n setFocusedContent: (value: FileContent | null) => void;\n setFocusedContentKeyPath: (keyPath: KeyPath[]) => void;\n};\n\ntype FocusDictionaryContextType = FocusDictionaryState & FocusDictionaryActions;\n\n// Create native React context fallback\nconst FocusDictionaryReactContext = createContext<\n FocusDictionaryContextType | undefined\n>(undefined);\n\n// Create the Provider\nexport const FocusDictionaryProvider: FC<PropsWithChildren> = ({\n children,\n}) => {\n const manager = useEditorStateManager();\n const [fallbackContent, setFallbackContent] = useState<FileContent | null>(\n null\n );\n\n const setFocusedContent = useCallback(\n (value: FileContent | null) => {\n if (manager) {\n manager.focusedContent.set(value);\n } else {\n setFallbackContent(value);\n }\n },\n [manager]\n );\n\n const setFocusedContentKeyPath = useCallback(\n (keyPath: KeyPath[]) => {\n if (manager) {\n manager.setFocusedContentKeyPath(keyPath);\n } else {\n setFallbackContent((prev) => {\n if (!prev) return null;\n const filtered = keyPath.filter(\n (key) => key.type !== NodeTypes.TRANSLATION\n );\n return { ...prev, keyPath: filtered };\n });\n }\n },\n [manager]\n );\n\n return (\n <FocusDictionaryReactContext.Provider\n value={{\n focusedContent: manager?.focusedContent.value ?? fallbackContent,\n setFocusedContent,\n setFocusedContentKeyPath,\n }}\n >\n {children}\n </FocusDictionaryReactContext.Provider>\n );\n};\n\n// 3. Update the hook to consume the fallback context\nexport const useFocusDictionary = (): FocusDictionaryState &\n FocusDictionaryActions => {\n const manager = useEditorStateManager();\n const reactContext = useContext(FocusDictionaryReactContext);\n\n const [focusedContent, setFocusedContentState] = useState<FileContent | null>(\n manager?.focusedContent.value ?? reactContext?.focusedContent ?? null\n );\n\n useEffect(() => {\n if (!manager) {\n setFocusedContentState(reactContext?.focusedContent ?? null);\n return;\n }\n\n const handler = (e: Event) =>\n setFocusedContentState((e as CustomEvent<FileContent | null>).detail);\n manager.focusedContent.addEventListener('change', handler);\n\n return () => manager.focusedContent.removeEventListener('change', handler);\n }, [manager, reactContext?.focusedContent]);\n\n const setFocusedContent = useCallback(\n (value: FileContent | null) => {\n if (reactContext) {\n reactContext.setFocusedContent(value);\n } else if (manager) {\n manager.focusedContent.set(value);\n }\n },\n [reactContext, manager]\n );\n\n const setFocusedContentKeyPath = useCallback(\n (keyPath: KeyPath[]) => {\n if (reactContext) {\n reactContext.setFocusedContentKeyPath(keyPath);\n } else if (manager) {\n manager.setFocusedContentKeyPath(keyPath);\n }\n },\n [reactContext, manager]\n );\n\n return {\n focusedContent,\n setFocusedContent,\n setFocusedContentKeyPath,\n };\n};\n\nexport const useFocusDictionaryActions = (): FocusDictionaryActions => {\n const { setFocusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n return { setFocusedContent, setFocusedContentKeyPath };\n};\n"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"FocusDictionaryContext.cjs","names":["useEditorStateManager","NodeTypes"],"sources":["../../src/FocusDictionaryContext.tsx"],"sourcesContent":["'use client';\n\nimport type { CrossFrameStateAction, FileContent } from '@intlayer/editor';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport * as NodeTypes from '@intlayer/types/nodeType';\nimport {\n createContext,\n type FC,\n type PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { useEditorStateManager } from './EditorStateContext';\n\nexport type { FileContent } from '@intlayer/editor';\n\nexport type FocusDictionaryState = {\n focusedContent: FileContent | null;\n};\n\nexport type FocusDictionaryActions = {\n /** Accepts a value or an updater — `setFocusedContent(prev => …)`. */\n setFocusedContent: (value: CrossFrameStateAction<FileContent | null>) => void;\n setFocusedContentKeyPath: (keyPath: KeyPath[]) => void;\n};\n\ntype FocusDictionaryContextType = FocusDictionaryState & FocusDictionaryActions;\n\n// Create native React context fallback\nconst FocusDictionaryReactContext = createContext<\n FocusDictionaryContextType | undefined\n>(undefined);\n\n// Create the Provider\nexport const FocusDictionaryProvider: FC<PropsWithChildren> = ({\n children,\n}) => {\n const manager = useEditorStateManager();\n const [fallbackContent, setFallbackContent] = useState<FileContent | null>(\n null\n );\n\n const setFocusedContent = useCallback(\n (value: CrossFrameStateAction<FileContent | null>) => {\n if (manager) {\n manager.focusedContent.set(value);\n } else {\n setFallbackContent(value);\n }\n },\n [manager]\n );\n\n const setFocusedContentKeyPath = useCallback(\n (keyPath: KeyPath[]) => {\n if (manager) {\n manager.setFocusedContentKeyPath(keyPath);\n } else {\n setFallbackContent((prev) => {\n if (!prev) return null;\n const filtered = keyPath.filter(\n (key) => key.type !== NodeTypes.TRANSLATION\n );\n return { ...prev, keyPath: filtered };\n });\n }\n },\n [manager]\n );\n\n return (\n <FocusDictionaryReactContext.Provider\n value={{\n focusedContent: manager?.focusedContent.value ?? fallbackContent,\n setFocusedContent,\n setFocusedContentKeyPath,\n }}\n >\n {children}\n </FocusDictionaryReactContext.Provider>\n );\n};\n\n// 3. Update the hook to consume the fallback context\nexport const useFocusDictionary = (): FocusDictionaryState &\n FocusDictionaryActions => {\n const manager = useEditorStateManager();\n const reactContext = useContext(FocusDictionaryReactContext);\n\n const [focusedContent, setFocusedContentState] = useState<FileContent | null>(\n manager?.focusedContent.value ?? reactContext?.focusedContent ?? null\n );\n\n useEffect(() => {\n if (!manager) {\n setFocusedContentState(reactContext?.focusedContent ?? null);\n return;\n }\n\n const handler = (e: Event) =>\n setFocusedContentState((e as CustomEvent<FileContent | null>).detail);\n manager.focusedContent.addEventListener('change', handler);\n\n return () => manager.focusedContent.removeEventListener('change', handler);\n }, [manager, reactContext?.focusedContent]);\n\n const setFocusedContent = useCallback(\n (value: CrossFrameStateAction<FileContent | null>) => {\n if (reactContext) {\n reactContext.setFocusedContent(value);\n } else if (manager) {\n manager.focusedContent.set(value);\n }\n },\n [reactContext, manager]\n );\n\n const setFocusedContentKeyPath = useCallback(\n (keyPath: KeyPath[]) => {\n if (reactContext) {\n reactContext.setFocusedContentKeyPath(keyPath);\n } else if (manager) {\n manager.setFocusedContentKeyPath(keyPath);\n }\n },\n [reactContext, manager]\n );\n\n return {\n focusedContent,\n setFocusedContent,\n setFocusedContentKeyPath,\n };\n};\n\nexport const useFocusDictionaryActions = (): FocusDictionaryActions => {\n const { setFocusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n return { setFocusedContent, setFocusedContentKeyPath };\n};\n"],"mappings":";;;;;;;;;;;AA+BA,MAAM,uDAEJ,MAAS;AAGX,MAAa,2BAAkD,EAC7D,eACI;CACJ,MAAM,UAAUA,iDAAsB;CACtC,MAAM,CAAC,iBAAiB,0CACtB,IACF;CAEA,MAAM,4CACH,UAAqD;EACpD,IAAI,SACF,QAAQ,eAAe,IAAI,KAAK;OAEhC,mBAAmB,KAAK;CAE5B,GACA,CAAC,OAAO,CACV;CAEA,MAAM,mDACH,YAAuB;EACtB,IAAI,SACF,QAAQ,yBAAyB,OAAO;OAExC,oBAAoB,SAAS;GAC3B,IAAI,CAAC,MAAM,OAAO;GAClB,MAAM,WAAW,QAAQ,QACtB,QAAQ,IAAI,SAASC,yBAAU,WAClC;GACA,OAAO;IAAE,GAAG;IAAM,SAAS;GAAS;EACtC,CAAC;CAEL,GACA,CAAC,OAAO,CACV;CAEA,OACE,2CAAC,4BAA4B,UAA7B;EACE,OAAO;GACL,gBAAgB,SAAS,eAAe,SAAS;GACjD;GACA;EACF;EAEC;CACmC;AAE1C;AAGA,MAAa,2BACe;CAC1B,MAAM,UAAUD,iDAAsB;CACtC,MAAM,qCAA0B,2BAA2B;CAE3D,MAAM,CAAC,gBAAgB,8CACrB,SAAS,eAAe,SAAS,cAAc,kBAAkB,IACnE;CAEA,2BAAgB;EACd,IAAI,CAAC,SAAS;GACZ,uBAAuB,cAAc,kBAAkB,IAAI;GAC3D;EACF;EAEA,MAAM,WAAW,MACf,uBAAwB,EAAsC,MAAM;EACtE,QAAQ,eAAe,iBAAiB,UAAU,OAAO;EAEzD,aAAa,QAAQ,eAAe,oBAAoB,UAAU,OAAO;CAC3E,GAAG,CAAC,SAAS,cAAc,cAAc,CAAC;CAwB1C,OAAO;EACL;EACA,2CAvBC,UAAqD;GACpD,IAAI,cACF,aAAa,kBAAkB,KAAK;QAC/B,IAAI,SACT,QAAQ,eAAe,IAAI,KAAK;EAEpC,GACA,CAAC,cAAc,OAAO,CAgBN;EAChB,kDAbC,YAAuB;GACtB,IAAI,cACF,aAAa,yBAAyB,OAAO;QACxC,IAAI,SACT,QAAQ,yBAAyB,OAAO;EAE5C,GACA,CAAC,cAAc,OAAO,CAMC;CACzB;AACF;AAEA,MAAa,kCAA0D;CACrE,MAAM,EAAE,mBAAmB,6BAA6B,mBAAmB;CAC3E,OAAO;EAAE;EAAmB;CAAyB;AACvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusDictionaryContext.mjs","names":[],"sources":["../../src/FocusDictionaryContext.tsx"],"sourcesContent":["'use client';\n\nimport type { FileContent } from '@intlayer/editor';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport * as NodeTypes from '@intlayer/types/nodeType';\nimport {\n createContext,\n type FC,\n type PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { useEditorStateManager } from './EditorStateContext';\n\nexport type { FileContent } from '@intlayer/editor';\n\nexport type FocusDictionaryState = {\n focusedContent: FileContent | null;\n};\n\nexport type FocusDictionaryActions = {\n setFocusedContent: (value: FileContent | null) => void;\n setFocusedContentKeyPath: (keyPath: KeyPath[]) => void;\n};\n\ntype FocusDictionaryContextType = FocusDictionaryState & FocusDictionaryActions;\n\n// Create native React context fallback\nconst FocusDictionaryReactContext = createContext<\n FocusDictionaryContextType | undefined\n>(undefined);\n\n// Create the Provider\nexport const FocusDictionaryProvider: FC<PropsWithChildren> = ({\n children,\n}) => {\n const manager = useEditorStateManager();\n const [fallbackContent, setFallbackContent] = useState<FileContent | null>(\n null\n );\n\n const setFocusedContent = useCallback(\n (value: FileContent | null) => {\n if (manager) {\n manager.focusedContent.set(value);\n } else {\n setFallbackContent(value);\n }\n },\n [manager]\n );\n\n const setFocusedContentKeyPath = useCallback(\n (keyPath: KeyPath[]) => {\n if (manager) {\n manager.setFocusedContentKeyPath(keyPath);\n } else {\n setFallbackContent((prev) => {\n if (!prev) return null;\n const filtered = keyPath.filter(\n (key) => key.type !== NodeTypes.TRANSLATION\n );\n return { ...prev, keyPath: filtered };\n });\n }\n },\n [manager]\n );\n\n return (\n <FocusDictionaryReactContext.Provider\n value={{\n focusedContent: manager?.focusedContent.value ?? fallbackContent,\n setFocusedContent,\n setFocusedContentKeyPath,\n }}\n >\n {children}\n </FocusDictionaryReactContext.Provider>\n );\n};\n\n// 3. Update the hook to consume the fallback context\nexport const useFocusDictionary = (): FocusDictionaryState &\n FocusDictionaryActions => {\n const manager = useEditorStateManager();\n const reactContext = useContext(FocusDictionaryReactContext);\n\n const [focusedContent, setFocusedContentState] = useState<FileContent | null>(\n manager?.focusedContent.value ?? reactContext?.focusedContent ?? null\n );\n\n useEffect(() => {\n if (!manager) {\n setFocusedContentState(reactContext?.focusedContent ?? null);\n return;\n }\n\n const handler = (e: Event) =>\n setFocusedContentState((e as CustomEvent<FileContent | null>).detail);\n manager.focusedContent.addEventListener('change', handler);\n\n return () => manager.focusedContent.removeEventListener('change', handler);\n }, [manager, reactContext?.focusedContent]);\n\n const setFocusedContent = useCallback(\n (value: FileContent | null) => {\n if (reactContext) {\n reactContext.setFocusedContent(value);\n } else if (manager) {\n manager.focusedContent.set(value);\n }\n },\n [reactContext, manager]\n );\n\n const setFocusedContentKeyPath = useCallback(\n (keyPath: KeyPath[]) => {\n if (reactContext) {\n reactContext.setFocusedContentKeyPath(keyPath);\n } else if (manager) {\n manager.setFocusedContentKeyPath(keyPath);\n }\n },\n [reactContext, manager]\n );\n\n return {\n focusedContent,\n setFocusedContent,\n setFocusedContentKeyPath,\n };\n};\n\nexport const useFocusDictionaryActions = (): FocusDictionaryActions => {\n const { setFocusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n return { setFocusedContent, setFocusedContentKeyPath };\n};\n"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"FocusDictionaryContext.mjs","names":[],"sources":["../../src/FocusDictionaryContext.tsx"],"sourcesContent":["'use client';\n\nimport type { CrossFrameStateAction, FileContent } from '@intlayer/editor';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport * as NodeTypes from '@intlayer/types/nodeType';\nimport {\n createContext,\n type FC,\n type PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from 'react';\nimport { useEditorStateManager } from './EditorStateContext';\n\nexport type { FileContent } from '@intlayer/editor';\n\nexport type FocusDictionaryState = {\n focusedContent: FileContent | null;\n};\n\nexport type FocusDictionaryActions = {\n /** Accepts a value or an updater — `setFocusedContent(prev => …)`. */\n setFocusedContent: (value: CrossFrameStateAction<FileContent | null>) => void;\n setFocusedContentKeyPath: (keyPath: KeyPath[]) => void;\n};\n\ntype FocusDictionaryContextType = FocusDictionaryState & FocusDictionaryActions;\n\n// Create native React context fallback\nconst FocusDictionaryReactContext = createContext<\n FocusDictionaryContextType | undefined\n>(undefined);\n\n// Create the Provider\nexport const FocusDictionaryProvider: FC<PropsWithChildren> = ({\n children,\n}) => {\n const manager = useEditorStateManager();\n const [fallbackContent, setFallbackContent] = useState<FileContent | null>(\n null\n );\n\n const setFocusedContent = useCallback(\n (value: CrossFrameStateAction<FileContent | null>) => {\n if (manager) {\n manager.focusedContent.set(value);\n } else {\n setFallbackContent(value);\n }\n },\n [manager]\n );\n\n const setFocusedContentKeyPath = useCallback(\n (keyPath: KeyPath[]) => {\n if (manager) {\n manager.setFocusedContentKeyPath(keyPath);\n } else {\n setFallbackContent((prev) => {\n if (!prev) return null;\n const filtered = keyPath.filter(\n (key) => key.type !== NodeTypes.TRANSLATION\n );\n return { ...prev, keyPath: filtered };\n });\n }\n },\n [manager]\n );\n\n return (\n <FocusDictionaryReactContext.Provider\n value={{\n focusedContent: manager?.focusedContent.value ?? fallbackContent,\n setFocusedContent,\n setFocusedContentKeyPath,\n }}\n >\n {children}\n </FocusDictionaryReactContext.Provider>\n );\n};\n\n// 3. Update the hook to consume the fallback context\nexport const useFocusDictionary = (): FocusDictionaryState &\n FocusDictionaryActions => {\n const manager = useEditorStateManager();\n const reactContext = useContext(FocusDictionaryReactContext);\n\n const [focusedContent, setFocusedContentState] = useState<FileContent | null>(\n manager?.focusedContent.value ?? reactContext?.focusedContent ?? null\n );\n\n useEffect(() => {\n if (!manager) {\n setFocusedContentState(reactContext?.focusedContent ?? null);\n return;\n }\n\n const handler = (e: Event) =>\n setFocusedContentState((e as CustomEvent<FileContent | null>).detail);\n manager.focusedContent.addEventListener('change', handler);\n\n return () => manager.focusedContent.removeEventListener('change', handler);\n }, [manager, reactContext?.focusedContent]);\n\n const setFocusedContent = useCallback(\n (value: CrossFrameStateAction<FileContent | null>) => {\n if (reactContext) {\n reactContext.setFocusedContent(value);\n } else if (manager) {\n manager.focusedContent.set(value);\n }\n },\n [reactContext, manager]\n );\n\n const setFocusedContentKeyPath = useCallback(\n (keyPath: KeyPath[]) => {\n if (reactContext) {\n reactContext.setFocusedContentKeyPath(keyPath);\n } else if (manager) {\n manager.setFocusedContentKeyPath(keyPath);\n }\n },\n [reactContext, manager]\n );\n\n return {\n focusedContent,\n setFocusedContent,\n setFocusedContentKeyPath,\n };\n};\n\nexport const useFocusDictionaryActions = (): FocusDictionaryActions => {\n const { setFocusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n return { setFocusedContent, setFocusedContentKeyPath };\n};\n"],"mappings":";;;;;;;;AA+BA,MAAM,8BAA8B,cAElC,MAAS;AAGX,MAAa,2BAAkD,EAC7D,eACI;CACJ,MAAM,UAAU,sBAAsB;CACtC,MAAM,CAAC,iBAAiB,sBAAsB,SAC5C,IACF;CAEA,MAAM,oBAAoB,aACvB,UAAqD;EACpD,IAAI,SACF,QAAQ,eAAe,IAAI,KAAK;OAEhC,mBAAmB,KAAK;CAE5B,GACA,CAAC,OAAO,CACV;CAEA,MAAM,2BAA2B,aAC9B,YAAuB;EACtB,IAAI,SACF,QAAQ,yBAAyB,OAAO;OAExC,oBAAoB,SAAS;GAC3B,IAAI,CAAC,MAAM,OAAO;GAClB,MAAM,WAAW,QAAQ,QACtB,QAAQ,IAAI,SAAS,UAAU,WAClC;GACA,OAAO;IAAE,GAAG;IAAM,SAAS;GAAS;EACtC,CAAC;CAEL,GACA,CAAC,OAAO,CACV;CAEA,OACE,oBAAC,4BAA4B,UAA7B;EACE,OAAO;GACL,gBAAgB,SAAS,eAAe,SAAS;GACjD;GACA;EACF;EAEC;CACmC;AAE1C;AAGA,MAAa,2BACe;CAC1B,MAAM,UAAU,sBAAsB;CACtC,MAAM,eAAe,WAAW,2BAA2B;CAE3D,MAAM,CAAC,gBAAgB,0BAA0B,SAC/C,SAAS,eAAe,SAAS,cAAc,kBAAkB,IACnE;CAEA,gBAAgB;EACd,IAAI,CAAC,SAAS;GACZ,uBAAuB,cAAc,kBAAkB,IAAI;GAC3D;EACF;EAEA,MAAM,WAAW,MACf,uBAAwB,EAAsC,MAAM;EACtE,QAAQ,eAAe,iBAAiB,UAAU,OAAO;EAEzD,aAAa,QAAQ,eAAe,oBAAoB,UAAU,OAAO;CAC3E,GAAG,CAAC,SAAS,cAAc,cAAc,CAAC;CAwB1C,OAAO;EACL;EACA,mBAxBwB,aACvB,UAAqD;GACpD,IAAI,cACF,aAAa,kBAAkB,KAAK;QAC/B,IAAI,SACT,QAAQ,eAAe,IAAI,KAAK;EAEpC,GACA,CAAC,cAAc,OAAO,CAgBN;EAChB,0BAd+B,aAC9B,YAAuB;GACtB,IAAI,cACF,aAAa,yBAAyB,OAAO;QACxC,IAAI,SACT,QAAQ,yBAAyB,OAAO;EAE5C,GACA,CAAC,cAAc,OAAO,CAMC;CACzB;AACF;AAEA,MAAa,kCAA0D;CACrE,MAAM,EAAE,mBAAmB,6BAA6B,mBAAmB;CAC3E,OAAO;EAAE;EAAmB;CAAyB;AACvD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FileContent, FileContent as FileContent$1 } from "@intlayer/editor";
|
|
1
|
+
import { CrossFrameStateAction, FileContent, FileContent as FileContent$1 } from "@intlayer/editor";
|
|
2
2
|
import { FC, PropsWithChildren } from "react";
|
|
3
3
|
import { KeyPath } from "@intlayer/types/keyPath";
|
|
4
4
|
//#region src/FocusDictionaryContext.d.ts
|
|
@@ -6,7 +6,8 @@ type FocusDictionaryState = {
|
|
|
6
6
|
focusedContent: FileContent$1 | null;
|
|
7
7
|
};
|
|
8
8
|
type FocusDictionaryActions = {
|
|
9
|
-
|
|
9
|
+
/** Accepts a value or an updater — `setFocusedContent(prev => …)`. */
|
|
10
|
+
setFocusedContent: (value: CrossFrameStateAction<FileContent$1 | null>) => void;
|
|
10
11
|
setFocusedContentKeyPath: (keyPath: KeyPath[]) => void;
|
|
11
12
|
};
|
|
12
13
|
declare const FocusDictionaryProvider: FC<PropsWithChildren>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusDictionaryContext.d.ts","names":[],"sources":["../../src/FocusDictionaryContext.tsx"],"mappings":";;;;KAkBY;EACV,gBAAgB;;KAGN
|
|
1
|
+
{"version":3,"file":"FocusDictionaryContext.d.ts","names":[],"sources":["../../src/FocusDictionaryContext.tsx"],"mappings":";;;;KAkBY;EACV,gBAAgB;;KAGN;;EAEV,oBAAoB,OAAO,sBAAsB;EACjD,2BAA2B,SAAS;;cAWzB,yBAAyB,GAAG;cAkD5B,0BAAyB,uBACpC;cAkDW,iCAAgC"}
|
|
@@ -3,7 +3,7 @@ import { KeyPath } from "@intlayer/types/keyPath";
|
|
|
3
3
|
//#region src/useFocusUnmergedDictionary.d.ts
|
|
4
4
|
declare const useFocusUnmergedDictionary: () => {
|
|
5
5
|
focusedContent: FileContent;
|
|
6
|
-
setFocusedContent: (value: FileContent | null) => void;
|
|
6
|
+
setFocusedContent: (value: import("@intlayer/editor").CrossFrameStateAction<FileContent | null>) => void;
|
|
7
7
|
setFocusedContentKeyPath: (keyPath: KeyPath[]) => void;
|
|
8
8
|
};
|
|
9
9
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/editor-react",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Provides the states, contexts, hooks and components to interact with the Intlayer editor for a React application",
|
|
6
6
|
"keywords": [
|
|
@@ -70,11 +70,11 @@
|
|
|
70
70
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@intlayer/config": "9.
|
|
74
|
-
"@intlayer/core": "9.
|
|
75
|
-
"@intlayer/editor": "9.
|
|
76
|
-
"@intlayer/types": "9.
|
|
77
|
-
"@intlayer/unmerged-dictionaries-entry": "9.
|
|
73
|
+
"@intlayer/config": "9.2.0",
|
|
74
|
+
"@intlayer/core": "9.2.0",
|
|
75
|
+
"@intlayer/editor": "9.2.0",
|
|
76
|
+
"@intlayer/types": "9.2.0",
|
|
77
|
+
"@intlayer/unmerged-dictionaries-entry": "9.2.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@types/node": "26.1.2",
|