@intlayer/editor-react 8.3.3 → 8.4.0-canary.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.
Files changed (87) hide show
  1. package/dist/cjs/CommunicatorContext.cjs +1 -1
  2. package/dist/cjs/CommunicatorContext.cjs.map +1 -1
  3. package/dist/cjs/ConfigurationContext.cjs +1 -1
  4. package/dist/cjs/ConfigurationContext.cjs.map +1 -1
  5. package/dist/cjs/DictionariesRecordContext.cjs +1 -1
  6. package/dist/cjs/DictionariesRecordContext.cjs.map +1 -1
  7. package/dist/cjs/EditedContentContext.cjs +1 -1
  8. package/dist/cjs/EditedContentContext.cjs.map +1 -1
  9. package/dist/cjs/EditorEnabledContext.cjs +1 -1
  10. package/dist/cjs/EditorEnabledContext.cjs.map +1 -1
  11. package/dist/cjs/EditorProvider.cjs +1 -1
  12. package/dist/cjs/EditorProvider.cjs.map +1 -1
  13. package/dist/cjs/EditorStateContext.cjs +2 -0
  14. package/dist/cjs/EditorStateContext.cjs.map +1 -0
  15. package/dist/cjs/FocusDictionaryContext.cjs +1 -1
  16. package/dist/cjs/FocusDictionaryContext.cjs.map +1 -1
  17. package/dist/cjs/index.cjs +1 -1
  18. package/dist/cjs/useCrossFrameMessageListener.cjs +1 -1
  19. package/dist/cjs/useCrossFrameMessageListener.cjs.map +1 -1
  20. package/dist/cjs/useCrossFrameState.cjs +1 -1
  21. package/dist/cjs/useCrossFrameState.cjs.map +1 -1
  22. package/dist/cjs/useCrossURLPathState.cjs +1 -1
  23. package/dist/cjs/useCrossURLPathState.cjs.map +1 -1
  24. package/dist/cjs/useEditorLocale.cjs +1 -1
  25. package/dist/cjs/useEditorLocale.cjs.map +1 -1
  26. package/dist/cjs/useFocusUnmergedDictionary.cjs +1 -1
  27. package/dist/cjs/useFocusUnmergedDictionary.cjs.map +1 -1
  28. package/dist/cjs/useIframeClickInterceptor.cjs +1 -1
  29. package/dist/cjs/useIframeClickInterceptor.cjs.map +1 -1
  30. package/dist/esm/CommunicatorContext.mjs +1 -1
  31. package/dist/esm/CommunicatorContext.mjs.map +1 -1
  32. package/dist/esm/ConfigurationContext.mjs +1 -1
  33. package/dist/esm/ConfigurationContext.mjs.map +1 -1
  34. package/dist/esm/DictionariesRecordContext.mjs +1 -1
  35. package/dist/esm/DictionariesRecordContext.mjs.map +1 -1
  36. package/dist/esm/EditedContentContext.mjs +1 -1
  37. package/dist/esm/EditedContentContext.mjs.map +1 -1
  38. package/dist/esm/EditorEnabledContext.mjs +1 -1
  39. package/dist/esm/EditorEnabledContext.mjs.map +1 -1
  40. package/dist/esm/EditorProvider.mjs +1 -1
  41. package/dist/esm/EditorProvider.mjs.map +1 -1
  42. package/dist/esm/EditorStateContext.mjs +2 -0
  43. package/dist/esm/EditorStateContext.mjs.map +1 -0
  44. package/dist/esm/FocusDictionaryContext.mjs +1 -1
  45. package/dist/esm/FocusDictionaryContext.mjs.map +1 -1
  46. package/dist/esm/index.mjs +1 -1
  47. package/dist/esm/useCrossFrameMessageListener.mjs +1 -1
  48. package/dist/esm/useCrossFrameMessageListener.mjs.map +1 -1
  49. package/dist/esm/useCrossFrameState.mjs +1 -1
  50. package/dist/esm/useCrossFrameState.mjs.map +1 -1
  51. package/dist/esm/useCrossURLPathState.mjs +1 -1
  52. package/dist/esm/useCrossURLPathState.mjs.map +1 -1
  53. package/dist/esm/useEditorLocale.mjs +1 -1
  54. package/dist/esm/useEditorLocale.mjs.map +1 -1
  55. package/dist/esm/useFocusUnmergedDictionary.mjs.map +1 -1
  56. package/dist/esm/useIframeClickInterceptor.mjs +1 -1
  57. package/dist/esm/useIframeClickInterceptor.mjs.map +1 -1
  58. package/dist/types/CommunicatorContext.d.ts +6 -5
  59. package/dist/types/CommunicatorContext.d.ts.map +1 -1
  60. package/dist/types/ConfigurationContext.d.ts +5 -5
  61. package/dist/types/ConfigurationContext.d.ts.map +1 -1
  62. package/dist/types/DictionariesRecordContext.d.ts +8 -11
  63. package/dist/types/DictionariesRecordContext.d.ts.map +1 -1
  64. package/dist/types/EditedContentContext.d.ts +9 -11
  65. package/dist/types/EditedContentContext.d.ts.map +1 -1
  66. package/dist/types/EditorEnabledContext.d.ts +21 -9
  67. package/dist/types/EditorEnabledContext.d.ts.map +1 -1
  68. package/dist/types/EditorProvider.d.ts +9 -4
  69. package/dist/types/EditorProvider.d.ts.map +1 -1
  70. package/dist/types/EditorStateContext.d.ts +11 -0
  71. package/dist/types/EditorStateContext.d.ts.map +1 -0
  72. package/dist/types/FocusDictionaryContext.d.ts +8 -16
  73. package/dist/types/FocusDictionaryContext.d.ts.map +1 -1
  74. package/dist/types/index.d.ts +9 -8
  75. package/dist/types/useCrossFrameMessageListener.d.ts +3 -13
  76. package/dist/types/useCrossFrameMessageListener.d.ts.map +1 -1
  77. package/dist/types/useCrossFrameState.d.ts +2 -20
  78. package/dist/types/useCrossFrameState.d.ts.map +1 -1
  79. package/dist/types/useCrossURLPathState.d.ts.map +1 -1
  80. package/dist/types/useEditorLocale.d.ts +2 -3
  81. package/dist/types/useEditorLocale.d.ts.map +1 -1
  82. package/dist/types/useFocusUnmergedDictionary.d.ts +1 -2
  83. package/dist/types/useFocusUnmergedDictionary.d.ts.map +1 -1
  84. package/dist/types/useIframeClickInterceptor.d.ts +11 -1
  85. package/dist/types/useIframeClickInterceptor.d.ts.map +1 -1
  86. package/package.json +7 -7
  87. package/dist/cjs/_virtual/_rolldown/runtime.cjs +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"EditorProvider.d.ts","names":[],"sources":["../../src/EditorProvider.tsx"],"mappings":";;;;;KA2FY,mBAAA,GAAsB,yBAAA,GAChC,0BAAA;EACE,IAAA;AAAA;AAAA,cAmBS,cAAA,EAAgB,EAAA,CAAG,iBAAA,CAAkB,mBAAA"}
1
+ {"version":3,"file":"EditorProvider.d.ts","names":[],"sources":["../../src/EditorProvider.tsx"],"mappings":";;;;KAYY,mBAAA;EACV,aAAA,EAAe,cAAA;EACf,WAAA,GAAc,IAAA;EACd,cAAA;AAAA;;;;;cAOW,cAAA,EAAgB,EAAA,CAAG,iBAAA,CAAkB,mBAAA"}
@@ -0,0 +1,11 @@
1
+ import { EditorStateManager } from "@intlayer/editor";
2
+ import { FC, PropsWithChildren } from "react";
3
+
4
+ //#region src/EditorStateContext.d.ts
5
+ declare const EditorStateProvider: FC<PropsWithChildren<{
6
+ manager: EditorStateManager;
7
+ }>>;
8
+ declare const useEditorStateManager: () => EditorStateManager | null;
9
+ //#endregion
10
+ export { EditorStateProvider, useEditorStateManager };
11
+ //# sourceMappingURL=EditorStateContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorStateContext.d.ts","names":[],"sources":["../../src/EditorStateContext.tsx"],"mappings":";;;;cAYa,mBAAA,EAAqB,EAAA,CAChC,iBAAA;EAAoB,OAAA,EAAS,kBAAA;AAAA;AAAA,cAOlB,qBAAA,QAA4B,kBAAA"}
@@ -1,27 +1,19 @@
1
- import { Dispatch, FC, PropsWithChildren, SetStateAction } from "react";
2
- import { LocalDictionaryId } from "@intlayer/types/dictionary";
1
+ import { FileContent, FileContent as FileContent$1 } from "@intlayer/editor";
3
2
  import { KeyPath } from "@intlayer/types/keyPath";
4
3
 
5
4
  //#region src/FocusDictionaryContext.d.ts
6
- type FileContent = {
7
- dictionaryKey: string;
8
- dictionaryLocalId?: LocalDictionaryId;
9
- keyPath?: KeyPath[];
10
- };
11
5
  type FocusDictionaryState = {
12
- focusedContent: FileContent | null;
6
+ focusedContent: FileContent$1 | null;
13
7
  };
14
8
  type FocusDictionaryActions = {
15
- setFocusedContent: Dispatch<SetStateAction<FileContent | null>>;
9
+ setFocusedContent: (value: FileContent$1 | null) => void;
16
10
  setFocusedContentKeyPath: (keyPath: KeyPath[]) => void;
17
11
  };
18
- declare const FocusDictionaryProvider: FC<PropsWithChildren>;
12
+ /**
13
+ * Returns the focused-content state and setters, backed by EditorStateManager.
14
+ */
15
+ declare const useFocusDictionary: () => FocusDictionaryState & FocusDictionaryActions;
19
16
  declare const useFocusDictionaryActions: () => FocusDictionaryActions;
20
- declare const useFocusDictionary: () => {
21
- setFocusedContent: Dispatch<SetStateAction<FileContent | null>>;
22
- setFocusedContentKeyPath: (keyPath: KeyPath[]) => void;
23
- focusedContent: FileContent | null;
24
- };
25
17
  //#endregion
26
- export { FileContent, FocusDictionaryActions, FocusDictionaryProvider, FocusDictionaryState, useFocusDictionary, useFocusDictionaryActions };
18
+ export { type FileContent, FocusDictionaryActions, FocusDictionaryState, useFocusDictionary, useFocusDictionaryActions };
27
19
  //# sourceMappingURL=FocusDictionaryContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FocusDictionaryContext.d.ts","names":[],"sources":["../../src/FocusDictionaryContext.tsx"],"mappings":";;;;;KAgBY,WAAA;EACV,aAAA;EACA,iBAAA,GAAoB,iBAAA;EACpB,OAAA,GAAU,OAAA;AAAA;AAAA,KAGA,oBAAA;EACV,cAAA,EAAgB,WAAA;AAAA;AAAA,KAGN,sBAAA;EACV,iBAAA,EAAmB,QAAA,CAAS,cAAA,CAAe,WAAA;EAC3C,wBAAA,GAA2B,OAAA,EAAS,OAAA;AAAA;AAAA,cAUzB,uBAAA,EAAyB,EAAA,CAAG,iBAAA;AAAA,cAsC5B,yBAAA,QAAyB,sBAAA;AAAA,cAUzB,kBAAA;qBA3DQ,QAAA,CAAS,cAAA,CAAe,WAAA;6BAChB,OAAA,EAAS,OAAA;kBALpB,WAAA;AAAA"}
1
+ {"version":3,"file":"FocusDictionaryContext.d.ts","names":[],"sources":["../../src/FocusDictionaryContext.tsx"],"mappings":";;;;KASY,oBAAA;EACV,cAAA,EAAgB,aAAA;AAAA;AAAA,KAGN,sBAAA;EACV,iBAAA,GAAoB,KAAA,EAAO,aAAA;EAC3B,wBAAA,GAA2B,OAAA,EAAS,OAAA;AAAA;;;;cAMzB,kBAAA,QAAyB,oBAAA,GACpC,sBAAA;AAAA,cAuBW,yBAAA,QAAgC,sBAAA"}
@@ -1,15 +1,16 @@
1
- import { CommunicatorProvider, CommunicatorProviderProps, UseCrossPlatformStateProps, useCommunicator } from "./CommunicatorContext.js";
1
+ import { MessengerConfig, UseCrossPlatformStateProps, useCommunicator } from "./CommunicatorContext.js";
2
2
  import { ConfigurationProvider, ConfigurationProviderProps, useConfiguration, useConfigurationState } from "./ConfigurationContext.js";
3
- import { DictionariesRecordProvider, DictionaryContent, useDictionariesRecord, useDictionariesRecordActions } from "./DictionariesRecordContext.js";
4
- import { EditedContentProvider, useEditedContent, useEditedContentActions, useGetEditedContentState, usePostEditedContentState } from "./EditedContentContext.js";
5
- import { CrossFrameStateOptions, useCrossFrameState } from "./useCrossFrameState.js";
6
- import { EditorEnabledProvider, EditorEnabledStateProps, useEditorEnabled, useEditorEnabledState, useGetEditorEnabledState, usePostEditorEnabledState } from "./EditorEnabledContext.js";
3
+ import { DictionaryContent as DictionaryContent$1, useDictionariesRecord, useDictionariesRecordActions } from "./DictionariesRecordContext.js";
4
+ import { useEditedContent, useEditedContentActions, useGetEditedContentState, usePostEditedContentState } from "./EditedContentContext.js";
5
+ import { EditorEnabledStateProps, useEditorEnabled, useEditorEnabledState, useEditorPingClient, useGetEditorEnabledState, usePostEditorEnabledState } from "./EditorEnabledContext.js";
7
6
  import { EditorProvider, EditorProviderProps } from "./EditorProvider.js";
8
- import { FileContent, FocusDictionaryActions, FocusDictionaryProvider, FocusDictionaryState, useFocusDictionary, useFocusDictionaryActions } from "./FocusDictionaryContext.js";
7
+ import { EditorStateProvider, useEditorStateManager } from "./EditorStateContext.js";
8
+ import { FileContent, FocusDictionaryActions, FocusDictionaryState, useFocusDictionary, useFocusDictionaryActions } from "./FocusDictionaryContext.js";
9
9
  import { useCrossFrameMessageListener } from "./useCrossFrameMessageListener.js";
10
+ import { CrossFrameStateOptions, useCrossFrameState } from "./useCrossFrameState.js";
10
11
  import { useCrossURLPathSetter, useCrossURLPathState } from "./useCrossURLPathState.js";
11
12
  import { useEditorLocale, useSetEditorLocale } from "./useEditorLocale.js";
12
13
  import { useFocusUnmergedDictionary } from "./useFocusUnmergedDictionary.js";
13
14
  import { useIframeClickInterceptor, useIframeClickMerger } from "./useIframeClickInterceptor.js";
14
- export * from "@intlayer/editor";
15
- export { CommunicatorProvider, CommunicatorProviderProps, ConfigurationProvider, ConfigurationProviderProps, CrossFrameStateOptions, DictionariesRecordProvider, DictionaryContent, EditedContentProvider, EditorEnabledProvider, EditorEnabledStateProps, EditorProvider, EditorProviderProps, FileContent, FocusDictionaryActions, FocusDictionaryProvider, FocusDictionaryState, UseCrossPlatformStateProps, useCommunicator, useConfiguration, useConfigurationState, useCrossFrameMessageListener, useCrossFrameState, useCrossURLPathSetter, useCrossURLPathState, useDictionariesRecord, useDictionariesRecordActions, useEditedContent, useEditedContentActions, useEditorEnabled, useEditorEnabledState, useEditorLocale, useFocusDictionary, useFocusDictionaryActions, useFocusUnmergedDictionary, useGetEditedContentState, useGetEditorEnabledState, useIframeClickInterceptor, useIframeClickMerger, usePostEditedContentState, usePostEditorEnabledState, useSetEditorLocale };
15
+ import { MessageKey } from "@intlayer/editor";
16
+ export { ConfigurationProvider, ConfigurationProviderProps, CrossFrameStateOptions, EditorEnabledStateProps, EditorProvider, EditorProviderProps, EditorStateProvider, FileContent, FocusDictionaryActions, FocusDictionaryState, MessageKey, MessengerConfig, UseCrossPlatformStateProps, useCommunicator, useConfiguration, useConfigurationState, useCrossFrameMessageListener, useCrossFrameState, useCrossURLPathSetter, useCrossURLPathState, useDictionariesRecord, useDictionariesRecordActions, useEditedContent, useEditedContentActions, useEditorEnabled, useEditorEnabledState, useEditorLocale, useEditorPingClient, useEditorStateManager, useFocusDictionary, useFocusDictionaryActions, useFocusUnmergedDictionary, useGetEditedContentState, useGetEditorEnabledState, useIframeClickInterceptor, useIframeClickMerger, usePostEditedContentState, usePostEditorEnabledState, useSetEditorLocale };
@@ -2,20 +2,10 @@ import { MessageKey } from "@intlayer/editor";
2
2
 
3
3
  //#region src/useCrossFrameMessageListener.d.ts
4
4
  /**
5
- * useCrossFrameMessageListener
5
+ * Listens for cross-frame messages of the specified type and calls the callback.
6
+ * Returns a function to manually send a message of the same type.
6
7
  *
7
- * This React hook listens for messages sent via the `postMessage` API and triggers a callback
8
- * whenever a message of the specified type (`key`) is received. It is useful for synchronizing
9
- * state or events across different windows, iframes, or contexts.
10
- *
11
- * @template S - The type of the data payload in the message.
12
- * @param key - A unique identifier for the message type to listen for.
13
- * @param [onEventTriggered] - A callback function triggered when a message
14
- * @param [revalidator] - A function that re-suscribes the listener. Could be usefull if onEventTriggered depend of some state
15
- * with the specified key is received. The callback receives the message data as its argument.
16
- *
17
- * @returns {{ postMessage: (data: S) => void }} An object containing a `postMessage` function
18
- * that allows broadcasting messages with the specified key and data.
8
+ * Backed by CrossFrameMessenger from EditorStateManager.
19
9
  */
20
10
  declare const useCrossFrameMessageListener: <S>(key: `${MessageKey}` | `${MessageKey}/post` | `${MessageKey}/get`, onEventTriggered?: (data: S) => void, revalidator?: any) => (data?: S) => void;
21
11
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"useCrossFrameMessageListener.d.ts","names":[],"sources":["../../src/useCrossFrameMessageListener.tsx"],"mappings":";;;;;AAsBA;;;;;;;;;;;;;;cAAa,4BAAA,MACX,GAAA,KAAQ,UAAA,QAAkB,UAAA,aAAuB,UAAA,QACjD,gBAAA,IAAoB,IAAA,EAAM,CAAA,WAC1B,WAAA,YAAiB,IAAA,GAsDiB,CAAA"}
1
+ {"version":3,"file":"useCrossFrameMessageListener.d.ts","names":[],"sources":["../../src/useCrossFrameMessageListener.tsx"],"mappings":";;;;;AAYA;;;;cAAa,4BAAA,MACX,GAAA,KAAQ,UAAA,QAAkB,UAAA,aAAuB,UAAA,QACjD,gBAAA,IAAoB,IAAA,EAAM,CAAA,WAC1B,WAAA,YASQ,IAAA,GAAO,CAAA"}
@@ -1,5 +1,5 @@
1
- import { Dispatch, SetStateAction } from "react";
2
1
  import { MessageKey } from "@intlayer/editor";
2
+ import { Dispatch, SetStateAction } from "react";
3
3
 
4
4
  //#region src/useCrossFrameState.d.ts
5
5
  type CrossFrameStateOptions = {
@@ -7,25 +7,7 @@ type CrossFrameStateOptions = {
7
7
  receive?: boolean;
8
8
  };
9
9
  /**
10
- * Configuration options for `useCrossFrameState`.
11
- * @typedef {Object} CrossFrameStateOptions
12
- * @property {boolean} [emit=true] - Whether to broadcast state changes to other instances.
13
- * @property {boolean} [receive=true] - Whether to listen for state updates from other instances.
14
- */
15
- /**
16
- * useCrossFrameState
17
- *
18
- * This React hook synchronizes state across multiple instances (e.g., different iframes or windows).
19
- * It uses the `postMessage` API to communicate state changes and updates between instances.
20
- *
21
- * @template S - The type of the state.
22
- * @param key - A unique identifier for the state to synchronize.
23
- * @param initialState - The initial state value or a function to compute it lazily.
24
- * @param options - Configuration options to control emitting and receiving messages.
25
- * - `emit` (default: true): Whether to broadcast state changes to other instances.
26
- * - `receive` (default: true): Whether to listen for state updates from other instances.
27
- *
28
- * @returns {[S, Dispatch<SetStateAction<S>>]} An array containing the current state and a setter function.
10
+ * Synchronizes a React state value across frames using CrossFrameStateManager.
29
11
  */
30
12
  declare const useCrossFrameState: <S>(key: `${MessageKey}`, initialState?: S | (() => S), options?: CrossFrameStateOptions) => [S, Dispatch<SetStateAction<S>>, () => void];
31
13
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"useCrossFrameState.d.ts","names":[],"sources":["../../src/useCrossFrameState.tsx"],"mappings":";;;;KAOY,sBAAA;EACV,IAAA;EACA,OAAA;AAAA;;;;AA8BF;;;;;;;;;;;;;;;;;;cAAa,kBAAA,MACX,GAAA,KAAQ,UAAA,IACR,YAAA,GAAe,CAAA,UAAW,CAAA,GAC1B,OAAA,GAAU,sBAAA,MACR,CAAA,EAAG,QAAA,CAAS,cAAA,CAAe,CAAA"}
1
+ {"version":3,"file":"useCrossFrameState.d.ts","names":[],"sources":["../../src/useCrossFrameState.tsx"],"mappings":";;;;KAaY,sBAAA;EACV,IAAA;EACA,OAAA;AAAA;;;;cAMW,kBAAA,MACX,GAAA,KAAQ,UAAA,IACR,YAAA,GAAe,CAAA,UAAW,CAAA,GAC1B,OAAA,GAAU,sBAAA,MACR,CAAA,EAAG,QAAA,CAAS,cAAA,CAAe,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useCrossURLPathState.d.ts","names":[],"sources":["../../src/useCrossURLPathState.tsx"],"mappings":";;;;cASa,oBAAA,GACX,YAAA,WACA,OAAA,GAAU,sBAAA,cAAsB,KAAA,CAAA,QAAA,CAAA,KAAA,CAAA,cAAA;AAAA,cAGrB,qBAAA,GAAyB,YAAA,uBAAqB,KAAA,CAAA,QAAA,CA8D1D,KAAA,CA9D0D,cAAA"}
1
+ {"version":3,"file":"useCrossURLPathState.d.ts","names":[],"sources":["../../src/useCrossURLPathState.tsx"],"mappings":";;;;cAQa,oBAAA,GACX,YAAA,WACA,OAAA,GAAU,sBAAA,cAAsB,KAAA,CAAA,QAAA,CAAA,KAAA,CAAA,cAAA;AAAA,cAGrB,qBAAA,GAAyB,YAAA,uBAAqB,KAAA,CAAA,QAAA,CAI1D,KAAA,CAJ0D,cAAA"}
@@ -1,9 +1,8 @@
1
- import * as react from "react";
2
1
  import { Locale } from "@intlayer/types/allLocales";
3
2
 
4
3
  //#region src/useEditorLocale.d.ts
5
- declare const useEditorLocale: () => Locale;
6
- declare const useSetEditorLocale: () => [Locale, react.Dispatch<react.SetStateAction<Locale>>, () => void];
4
+ declare const useEditorLocale: () => Locale | undefined;
5
+ declare const useSetEditorLocale: () => (locale: Locale) => void;
7
6
  //#endregion
8
7
  export { useEditorLocale, useSetEditorLocale };
9
8
  //# sourceMappingURL=useEditorLocale.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useEditorLocale.d.ts","names":[],"sources":["../../src/useEditorLocale.tsx"],"mappings":";;;;cAIa,eAAA,QAAe,MAAA;AAAA,cAaf,kBAAA,SAAkB,MAAA,EAAA,KAAA,CAAA,QAAA,CAAA,KAAA,CAAA,cAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"useEditorLocale.d.ts","names":[],"sources":["../../src/useEditorLocale.tsx"],"mappings":";;;cAMa,eAAA,QAAsB,MAAA;AAAA,cAkBtB,kBAAA,SAEH,MAAA,EAAQ,MAAA"}
@@ -1,11 +1,10 @@
1
1
  import { FileContent } from "./FocusDictionaryContext.js";
2
- import * as react from "react";
3
2
  import { KeyPath } from "@intlayer/types/keyPath";
4
3
 
5
4
  //#region src/useFocusUnmergedDictionary.d.ts
6
5
  declare const useFocusUnmergedDictionary: () => {
7
6
  focusedContent: FileContent;
8
- setFocusedContent: react.Dispatch<react.SetStateAction<FileContent>>;
7
+ setFocusedContent: (value: FileContent | null) => void;
9
8
  setFocusedContentKeyPath: (keyPath: KeyPath[]) => void;
10
9
  };
11
10
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusUnmergedDictionary.d.ts","names":[],"sources":["../../src/useFocusUnmergedDictionary.tsx"],"mappings":";;;;;cA8Ca,0BAAA"}
1
+ {"version":3,"file":"useFocusUnmergedDictionary.d.ts","names":[],"sources":["../../src/useFocusUnmergedDictionary.tsx"],"mappings":";;;;cA8Ca,0BAAA"}
@@ -1,6 +1,16 @@
1
1
  //#region src/useIframeClickInterceptor.d.ts
2
+ /**
3
+ * Broadcasts mousedown events from within an iframe to the parent frame.
4
+ * Called in the client application (inside the iframe).
5
+ * Note: EditorStateManager.start() already sets this up in client mode.
6
+ * This hook exists for explicit / standalone use cases.
7
+ */
2
8
  declare const useIframeClickInterceptor: () => void;
3
- declare const useIframeClickMerger: () => (data?: MessageEvent<any>) => void;
9
+ /**
10
+ * Merges received iframe click events into the parent's DOM event stream.
11
+ * Called in the editor (parent frame).
12
+ */
13
+ declare const useIframeClickMerger: () => void;
4
14
  //#endregion
5
15
  export { useIframeClickInterceptor, useIframeClickMerger };
6
16
  //# sourceMappingURL=useIframeClickInterceptor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useIframeClickInterceptor.d.ts","names":[],"sources":["../../src/useIframeClickInterceptor.tsx"],"mappings":";cAMa,yBAAA;AAAA,cAgBA,oBAAA,SAAoB,IAAA,GAAA,YAAA"}
1
+ {"version":3,"file":"useIframeClickInterceptor.d.ts","names":[],"sources":["../../src/useIframeClickInterceptor.tsx"],"mappings":";;AAWA;;;;;cAAa,yBAAA;;;;;cAQA,oBAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/editor-react",
3
- "version": "8.3.3",
3
+ "version": "8.4.0-canary.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": "8.3.3",
74
- "@intlayer/core": "8.3.3",
75
- "@intlayer/editor": "8.3.3",
76
- "@intlayer/types": "8.3.3",
77
- "@intlayer/unmerged-dictionaries-entry": "8.3.3"
73
+ "@intlayer/config": "8.4.0-canary.0",
74
+ "@intlayer/core": "8.4.0-canary.0",
75
+ "@intlayer/editor": "8.4.0-canary.0",
76
+ "@intlayer/types": "8.4.0-canary.0",
77
+ "@intlayer/unmerged-dictionaries-entry": "8.4.0-canary.0"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@types/node": "25.5.0",
@@ -86,7 +86,7 @@
86
86
  "react": ">=16.0.0",
87
87
  "react-dom": ">=16.0.0",
88
88
  "rimraf": "6.1.3",
89
- "tsdown": "0.21.2",
89
+ "tsdown": "0.21.4",
90
90
  "typescript": "5.9.3",
91
91
  "vitest": "4.1.0"
92
92
  },
@@ -1 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__toESM=s;