@intlayer/editor 9.6.0 → 9.7.1
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/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/cjs/compareUrls.cjs +1 -2
- package/dist/cjs/components/ContentSelector.cjs +70 -17
- package/dist/cjs/components/ContentSelector.cjs.map +1 -1
- package/dist/cjs/components/ContentSelectorWrapper.cjs +63 -6
- package/dist/cjs/components/ContentSelectorWrapper.cjs.map +1 -1
- package/dist/cjs/components/index.cjs +2 -2
- package/dist/cjs/components/isInteractiveClickTarget.cjs +65 -0
- package/dist/cjs/components/isInteractiveClickTarget.cjs.map +1 -0
- package/dist/cjs/core/CrossFrameMessenger.cjs +2 -3
- package/dist/cjs/core/CrossFrameStateManager.cjs +1 -2
- package/dist/cjs/core/EditorStateManager.cjs +79 -18
- package/dist/cjs/core/EditorStateManager.cjs.map +1 -1
- package/dist/cjs/core/IframeClickInterceptor.cjs +17 -10
- package/dist/cjs/core/IframeClickInterceptor.cjs.map +1 -1
- package/dist/cjs/core/UrlStateManager.cjs +2 -3
- package/dist/cjs/core/getLocalEditorParentOrigin.cjs +32 -0
- package/dist/cjs/core/getLocalEditorParentOrigin.cjs.map +1 -0
- package/dist/cjs/core/globalManager.cjs +1 -2
- package/dist/cjs/core/index.cjs +10 -8
- package/dist/cjs/core/initEditorClient.cjs +8 -6
- package/dist/cjs/core/initEditorClient.cjs.map +1 -1
- package/dist/cjs/core/selectionClick.cjs +24 -0
- package/dist/cjs/core/selectionClick.cjs.map +1 -0
- package/dist/cjs/core/sharedWindowState.cjs +1 -2
- package/dist/cjs/index.cjs +13 -11
- package/dist/cjs/isEnabled.cjs +1 -2
- package/dist/cjs/messageKey.cjs +5 -2
- package/dist/cjs/messageKey.cjs.map +1 -1
- package/dist/esm/compareUrls.mjs +1 -2
- package/dist/esm/components/ContentSelector.mjs +69 -16
- package/dist/esm/components/ContentSelector.mjs.map +1 -1
- package/dist/esm/components/ContentSelectorWrapper.mjs +61 -4
- package/dist/esm/components/ContentSelectorWrapper.mjs.map +1 -1
- package/dist/esm/components/index.mjs +1 -1
- package/dist/esm/components/isInteractiveClickTarget.mjs +64 -0
- package/dist/esm/components/isInteractiveClickTarget.mjs.map +1 -0
- package/dist/esm/core/CrossFrameMessenger.mjs +1 -2
- package/dist/esm/core/CrossFrameStateManager.mjs +1 -2
- package/dist/esm/core/EditorStateManager.mjs +71 -12
- package/dist/esm/core/EditorStateManager.mjs.map +1 -1
- package/dist/esm/core/IframeClickInterceptor.mjs +16 -9
- package/dist/esm/core/IframeClickInterceptor.mjs.map +1 -1
- package/dist/esm/core/UrlStateManager.mjs +1 -2
- package/dist/esm/core/getLocalEditorParentOrigin.mjs +31 -0
- package/dist/esm/core/getLocalEditorParentOrigin.mjs.map +1 -0
- package/dist/esm/core/globalManager.mjs +1 -2
- package/dist/esm/core/index.mjs +4 -4
- package/dist/esm/core/initEditorClient.mjs +6 -4
- package/dist/esm/core/initEditorClient.mjs.map +1 -1
- package/dist/esm/core/selectionClick.mjs +22 -0
- package/dist/esm/core/selectionClick.mjs.map +1 -0
- package/dist/esm/core/sharedWindowState.mjs +1 -2
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/isEnabled.mjs +1 -2
- package/dist/esm/messageKey.mjs +5 -2
- package/dist/esm/messageKey.mjs.map +1 -1
- package/dist/types/compareUrls.d.ts +0 -2
- package/dist/types/compareUrls.d.ts.map +1 -1
- package/dist/types/components/ContentSelector.d.ts +10 -4
- package/dist/types/components/ContentSelector.d.ts.map +1 -1
- package/dist/types/components/ContentSelectorWrapper.d.ts +5 -2
- package/dist/types/components/ContentSelectorWrapper.d.ts.map +1 -1
- package/dist/types/components/isInteractiveClickTarget.d.ts +14 -0
- package/dist/types/components/isInteractiveClickTarget.d.ts.map +1 -0
- package/dist/types/core/CrossFrameMessenger.d.ts +1 -2
- package/dist/types/core/CrossFrameMessenger.d.ts.map +1 -1
- package/dist/types/core/CrossFrameStateManager.d.ts +0 -2
- package/dist/types/core/CrossFrameStateManager.d.ts.map +1 -1
- package/dist/types/core/EditorStateManager.d.ts +34 -3
- package/dist/types/core/EditorStateManager.d.ts.map +1 -1
- package/dist/types/core/IframeClickInterceptor.d.ts +8 -4
- package/dist/types/core/IframeClickInterceptor.d.ts.map +1 -1
- package/dist/types/core/UrlStateManager.d.ts +0 -2
- package/dist/types/core/UrlStateManager.d.ts.map +1 -1
- package/dist/types/core/getLocalEditorParentOrigin.d.ts +11 -0
- package/dist/types/core/getLocalEditorParentOrigin.d.ts.map +1 -0
- package/dist/types/core/globalManager.d.ts +0 -2
- package/dist/types/core/globalManager.d.ts.map +1 -1
- package/dist/types/core/index.d.ts +4 -4
- package/dist/types/core/initEditorClient.d.ts +0 -2
- package/dist/types/core/initEditorClient.d.ts.map +1 -1
- package/dist/types/core/selectionClick.d.ts +15 -0
- package/dist/types/core/selectionClick.d.ts.map +1 -0
- package/dist/types/core/sharedWindowState.d.ts +1 -2
- package/dist/types/core/sharedWindowState.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -2
- package/dist/types/isEnabled.d.ts +0 -2
- package/dist/types/isEnabled.d.ts.map +1 -1
- package/dist/types/messageKey.d.ts +5 -3
- package/dist/types/messageKey.d.ts.map +1 -1
- package/package.json +8 -8
package/dist/esm/messageKey.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/messageKey.ts
|
|
2
2
|
let MessageKey = /* @__PURE__ */ function(MessageKey) {
|
|
3
3
|
/** Client → editor: announces the client is ready (also used as response to ARE_YOU_THERE) */
|
|
4
4
|
MessageKey["INTLAYER_CLIENT_READY"] = "INTLAYER_CLIENT_READY";
|
|
@@ -12,6 +12,8 @@ let MessageKey = /* @__PURE__ */ function(MessageKey) {
|
|
|
12
12
|
MessageKey["INTLAYER_CONFIGURATION"] = "INTLAYER_CONFIGURATION";
|
|
13
13
|
MessageKey["INTLAYER_CURRENT_LOCALE"] = "INTLAYER_CURRENT_LOCALE";
|
|
14
14
|
MessageKey["INTLAYER_URL_CHANGE"] = "INTLAYER_URL_CHANGE";
|
|
15
|
+
/** Editor → client: asks the client to switch to the given locale */
|
|
16
|
+
MessageKey["INTLAYER_LOCALE_CHANGE_REQUESTED"] = "INTLAYER_LOCALE_CHANGE_REQUESTED";
|
|
15
17
|
/** Client → editor: load and update content */
|
|
16
18
|
MessageKey["INTLAYER_LOCALE_DICTIONARIES_CHANGED"] = "INTLAYER_LOCALE_DICTIONARIES_CHANGED";
|
|
17
19
|
MessageKey["INTLAYER_DISTANT_DICTIONARIES_CHANGED"] = "INTLAYER_DISTANT_DICTIONARIES_CHANGED";
|
|
@@ -23,9 +25,10 @@ let MessageKey = /* @__PURE__ */ function(MessageKey) {
|
|
|
23
25
|
MessageKey["INTLAYER_IFRAME_CLICKED"] = "INTLAYER_IFRAME_CLICKED";
|
|
24
26
|
/** Client → editor: list of dictionary keys currently rendered in the iframe */
|
|
25
27
|
MessageKey["INTLAYER_DISPLAYED_DICTIONARY_KEYS"] = "INTLAYER_DISPLAYED_DICTIONARY_KEYS";
|
|
28
|
+
/** IDE host → editor: colour theme of the IDE embedding the editor */
|
|
29
|
+
MessageKey["INTLAYER_HOST_THEME_CHANGED"] = "INTLAYER_HOST_THEME_CHANGED";
|
|
26
30
|
return MessageKey;
|
|
27
31
|
}({});
|
|
28
32
|
|
|
29
|
-
//#endregion
|
|
30
33
|
export { MessageKey };
|
|
31
34
|
//# sourceMappingURL=messageKey.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageKey.mjs","names":[],"sources":["../../src/messageKey.ts"],"sourcesContent":["export enum MessageKey {\n /** Client → editor: announces the client is ready (also used as response to ARE_YOU_THERE) */\n INTLAYER_CLIENT_READY = 'INTLAYER_CLIENT_READY',\n /** Editor → client: asks if the client is still alive */\n INTLAYER_ARE_YOU_THERE = 'INTLAYER_ARE_YOU_THERE',\n /** Editor → client: instructs the client to activate the editor selector */\n INTLAYER_EDITOR_ACTIVATE = 'INTLAYER_EDITOR_ACTIVATE',\n /** Client → editor: instructs the editor that the client is enabled */\n INTLAYER_EDITOR_ENABLED = 'INTLAYER_EDITOR_ENABLED',\n\n /** Client → editor: send information related the app */\n INTLAYER_CONFIGURATION = 'INTLAYER_CONFIGURATION',\n INTLAYER_CURRENT_LOCALE = 'INTLAYER_CURRENT_LOCALE',\n INTLAYER_URL_CHANGE = 'INTLAYER_URL_CHANGE',\n\n /** Client → editor: load and update content */\n INTLAYER_LOCALE_DICTIONARIES_CHANGED = 'INTLAYER_LOCALE_DICTIONARIES_CHANGED',\n INTLAYER_DISTANT_DICTIONARIES_CHANGED = 'INTLAYER_DISTANT_DICTIONARIES_CHANGED',\n\n /** Client → editor & Editor → client: Update focus and changed content */\n INTLAYER_HOVERED_CONTENT_CHANGED = 'INTLAYER_HOVERED_CONTENT_CHANGED',\n INTLAYER_FOCUSED_CONTENT_CHANGED = 'INTLAYER_FOCUSED_CONTENT_CHANGED',\n INTLAYER_EDITED_CONTENT_CHANGED = 'INTLAYER_EDITED_CONTENT_CHANGED',\n\n /** Client → editor: Helper to sync iframe client reactivity on click client */\n INTLAYER_IFRAME_CLICKED = 'INTLAYER_IFRAME_CLICKED',\n\n /** Client → editor: list of dictionary keys currently rendered in the iframe */\n INTLAYER_DISPLAYED_DICTIONARY_KEYS = 'INTLAYER_DISPLAYED_DICTIONARY_KEYS',\n}\n"],"mappings":";AAAA,IAAY,aAAL;;CAEL;;CAEA;;CAEA;;CAEA;;CAGA;CACA;CACA;;CAGA;CACA;;CAGA;CACA;CACA;;CAGA;;CAGA;;AACF"}
|
|
1
|
+
{"version":3,"file":"messageKey.mjs","names":[],"sources":["../../src/messageKey.ts"],"sourcesContent":["export enum MessageKey {\n /** Client → editor: announces the client is ready (also used as response to ARE_YOU_THERE) */\n INTLAYER_CLIENT_READY = 'INTLAYER_CLIENT_READY',\n /** Editor → client: asks if the client is still alive */\n INTLAYER_ARE_YOU_THERE = 'INTLAYER_ARE_YOU_THERE',\n /** Editor → client: instructs the client to activate the editor selector */\n INTLAYER_EDITOR_ACTIVATE = 'INTLAYER_EDITOR_ACTIVATE',\n /** Client → editor: instructs the editor that the client is enabled */\n INTLAYER_EDITOR_ENABLED = 'INTLAYER_EDITOR_ENABLED',\n\n /** Client → editor: send information related the app */\n INTLAYER_CONFIGURATION = 'INTLAYER_CONFIGURATION',\n INTLAYER_CURRENT_LOCALE = 'INTLAYER_CURRENT_LOCALE',\n INTLAYER_URL_CHANGE = 'INTLAYER_URL_CHANGE',\n /** Editor → client: asks the client to switch to the given locale */\n INTLAYER_LOCALE_CHANGE_REQUESTED = 'INTLAYER_LOCALE_CHANGE_REQUESTED',\n\n /** Client → editor: load and update content */\n INTLAYER_LOCALE_DICTIONARIES_CHANGED = 'INTLAYER_LOCALE_DICTIONARIES_CHANGED',\n INTLAYER_DISTANT_DICTIONARIES_CHANGED = 'INTLAYER_DISTANT_DICTIONARIES_CHANGED',\n\n /** Client → editor & Editor → client: Update focus and changed content */\n INTLAYER_HOVERED_CONTENT_CHANGED = 'INTLAYER_HOVERED_CONTENT_CHANGED',\n INTLAYER_FOCUSED_CONTENT_CHANGED = 'INTLAYER_FOCUSED_CONTENT_CHANGED',\n INTLAYER_EDITED_CONTENT_CHANGED = 'INTLAYER_EDITED_CONTENT_CHANGED',\n\n /** Client → editor: Helper to sync iframe client reactivity on click client */\n INTLAYER_IFRAME_CLICKED = 'INTLAYER_IFRAME_CLICKED',\n\n /** Client → editor: list of dictionary keys currently rendered in the iframe */\n INTLAYER_DISPLAYED_DICTIONARY_KEYS = 'INTLAYER_DISPLAYED_DICTIONARY_KEYS',\n\n /** IDE host → editor: colour theme of the IDE embedding the editor */\n INTLAYER_HOST_THEME_CHANGED = 'INTLAYER_HOST_THEME_CHANGED',\n}\n"],"mappings":";AAAA,IAAY,aAAL;;CAEL;;CAEA;;CAEA;;CAEA;;CAGA;CACA;CACA;;CAEA;;CAGA;CACA;;CAGA;CACA;CACA;;CAGA;;CAGA;;CAGA;;AACF"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/compareUrls.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Compare two URLs for equality.
|
|
4
3
|
* This function is used to determine if a message originates from the same origin.
|
|
@@ -16,5 +15,4 @@
|
|
|
16
15
|
* @returns Whether the two URLs are equal.
|
|
17
16
|
*/
|
|
18
17
|
export declare const compareUrls: (url1: string, url2: string) => boolean;
|
|
19
|
-
//#endregion
|
|
20
18
|
//# sourceMappingURL=compareUrls.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compareUrls.d.ts","names":[],"sources":["../../src/compareUrls.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"compareUrls.d.ts","names":[],"sources":["../../src/compareUrls.ts"],"mappings":";;;;;;;;;;;;;;;;qBAgBa,cAAW,cAAgB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/components/ContentSelector.d.ts
|
|
2
1
|
declare const _HTMLElement: {
|
|
3
2
|
new (): HTMLElement;
|
|
4
3
|
prototype: HTMLElement;
|
|
@@ -7,9 +6,15 @@ declare const _HTMLElement: {
|
|
|
7
6
|
* <intlayer-content-selector>
|
|
8
7
|
*
|
|
9
8
|
* A framework-agnostic web component that wraps content with Intlayer editor
|
|
10
|
-
* selection UI (hover outline,
|
|
9
|
+
* selection UI (hover outline, click to select, click-outside to deselect).
|
|
11
10
|
*
|
|
12
|
-
*
|
|
11
|
+
* Content is selected by:
|
|
12
|
+
* - a click, unless it lands on something the app handles (link, button,
|
|
13
|
+
* form control, clickable ancestor), which keeps its behavior
|
|
14
|
+
* - a long press, on any content
|
|
15
|
+
* - a ⌘ / Ctrl + click, on any content, cancelling the click's own action
|
|
16
|
+
*
|
|
17
|
+
* @fires intlayer:press - Fired when the content is selected. Bubbles.
|
|
13
18
|
* @fires intlayer:hover - Fired on mouseenter. Bubbles.
|
|
14
19
|
* @fires intlayer:unhover - Fired on mouseleave / mouseup. Bubbles.
|
|
15
20
|
* @fires intlayer:click-outside - Fired when a click occurs outside the element. Bubbles.
|
|
@@ -37,6 +42,7 @@ export declare class IntlayerContentSelectorElement extends _HTMLElement {
|
|
|
37
42
|
private _updateActiveState;
|
|
38
43
|
private _clearPressTimer;
|
|
39
44
|
private _dispatch;
|
|
45
|
+
private _select;
|
|
40
46
|
private _handleMouseDown;
|
|
41
47
|
private _handleMouseEnter;
|
|
42
48
|
private _handleMouseUpOrLeave;
|
|
@@ -49,5 +55,5 @@ export declare class IntlayerContentSelectorElement extends _HTMLElement {
|
|
|
49
55
|
* Safe to call multiple times — only registers elements that are not yet defined.
|
|
50
56
|
*/
|
|
51
57
|
export declare const defineIntlayerElements: () => void;
|
|
52
|
-
|
|
58
|
+
export {};
|
|
53
59
|
//# sourceMappingURL=ContentSelector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSelector.d.ts","names":[],"sources":["../../../src/components/ContentSelector.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentSelector.d.ts","names":[],"sources":["../../../src/components/ContentSelector.ts"],"mappings":"A,cA6DM;;;;;;;;;;;;;;;;;;;;;;;;qBAyBO,uCAAuC;UAC1C;UACA;UACA;UACA;UACA;UACA;UACA;aAEG;MAIP;MAGA,YAAY;MAKZ;MAGA,cAAc;EAIlB;EAgCA,yBACE,cACA,wBACA;EAWF;EAkBA;UASQ;UAUA;UAOA;UAMA;UAOA;UAKA;UAMA;UASA;UAuBA;;;;;;;qBAWG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { KeyPath } from "@intlayer/types/keyPath";
|
|
2
2
|
declare const _HTMLElement: {
|
|
3
3
|
new (): HTMLElement;
|
|
4
4
|
prototype: HTMLElement;
|
|
@@ -30,6 +30,8 @@ export declare class IntlayerContentSelectorWrapperElement extends _HTMLElement
|
|
|
30
30
|
/** Removes the listeners attached to the current manager's states */
|
|
31
31
|
private _unsubManagerState;
|
|
32
32
|
static get observedAttributes(): string[];
|
|
33
|
+
get dictionaryKey(): string;
|
|
34
|
+
get filteredKeyPath(): KeyPath[];
|
|
33
35
|
constructor();
|
|
34
36
|
attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
35
37
|
connectedCallback(): void;
|
|
@@ -54,9 +56,10 @@ export declare class IntlayerContentSelectorWrapperElement extends _HTMLElement
|
|
|
54
56
|
private _handlePress;
|
|
55
57
|
private _handleHover;
|
|
56
58
|
private _handleUnhover;
|
|
59
|
+
private _handleClickOutside;
|
|
57
60
|
private _render;
|
|
58
61
|
private _rebuildContent;
|
|
59
62
|
}
|
|
60
63
|
export declare const defineIntlayerContentSelectorWrapper: () => void;
|
|
61
|
-
|
|
64
|
+
export {};
|
|
62
65
|
//# sourceMappingURL=ContentSelectorWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSelectorWrapper.d.ts","names":[],"sources":["../../../src/components/ContentSelectorWrapper.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"ContentSelectorWrapper.d.ts","names":[],"sources":["../../../src/components/ContentSelectorWrapper.ts"],"mappings":";cA8GM;;;;;;;;;;;;;;;;;;qBAmBO,8CAA8C;UACjD;UACA;UACA;UACA;UACA;UACA;UAEA;UACA;UAEA;;UAEA;aAEG;MAIP;MAIA,mBAAmB;EAIvB;EAQA,yBACE,cACA,0BACA;EAYF;EAQA;UAOQ;UAQA;UAMA;UAkDA;;;;;UA6BA;;;;;UA6BA;UAWA;UASA;UAoBA;UA8BA;UAWA;UAWA;UAQA;UAiCA;UA+BA;;qBAqCG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a click on editable content lands on something the application
|
|
3
|
+
* handles itself: a link, a button, a form control, or an ancestor rendered as
|
|
4
|
+
* clickable (`cursor: pointer`, the mark of delegated handlers such as React
|
|
5
|
+
* `onClick`). Such clicks keep their behavior; the content is then selected
|
|
6
|
+
* with a long press or a modifier click instead.
|
|
7
|
+
*
|
|
8
|
+
* The cursor is only read on ancestors of the editor elements: content inside
|
|
9
|
+
* them inherits the selector's own pointer cursor.
|
|
10
|
+
*
|
|
11
|
+
* @param event - Click event, read through its composed path
|
|
12
|
+
*/
|
|
13
|
+
export declare const isInteractiveClickTarget: (event: Event) => boolean;
|
|
14
|
+
//# sourceMappingURL=isInteractiveClickTarget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isInteractiveClickTarget.d.ts","names":[],"sources":["../../../src/components/isInteractiveClickTarget.ts"],"mappings":";;;;;;;;;;;;qBA4Da,2BAAwB,OAAW"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/core/CrossFrameMessenger.d.ts
|
|
2
1
|
export type MessagePayload = {
|
|
3
2
|
type: string;
|
|
4
3
|
data?: unknown;
|
|
@@ -49,5 +48,5 @@ export declare class CrossFrameMessenger {
|
|
|
49
48
|
subscribe<T = unknown>(type: string, handler: MessageHandler<T>): () => void;
|
|
50
49
|
private _handleMessage;
|
|
51
50
|
}
|
|
52
|
-
|
|
51
|
+
export {};
|
|
53
52
|
//# sourceMappingURL=CrossFrameMessenger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrossFrameMessenger.d.ts","names":[],"sources":["../../../src/core/CrossFrameMessenger.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CrossFrameMessenger.d.ts","names":[],"sources":["../../../src/core/CrossFrameMessenger.ts"],"mappings":"A,YAIY;EACV;EACA;EACA;;EAEA;;YAGU;;;;;EAKV;;;;;EAKA,gBAAgB,SAAS,gBAAgB;;KAGtC,eAAe,gBAAgB,MAAM,GAAG;;;;;;;;qBAShC;WACF;mBACQ;mBACA;UAET;;mBAES;;mBAEA;EAEjB,YAAY,QAAQ;;EAMpB;;EAUA;;EAQA,KAAK,cAAc;;;;;EAmBnB,UAAU,aAAa,cAAc,SAAS,eAAe;UAUrD"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CrossFrameMessenger } from "./CrossFrameMessenger.js";
|
|
2
|
-
//#region src/core/CrossFrameStateManager.d.ts
|
|
3
2
|
export type CrossFrameStateOptions = {
|
|
4
3
|
/** Whether to broadcast state changes to other frames. Default: true */
|
|
5
4
|
emit?: boolean;
|
|
@@ -55,5 +54,4 @@ export declare class CrossFrameStateManager<T> extends EventTarget {
|
|
|
55
54
|
/** Broadcast the current value to all frames (useful after reconnect). */
|
|
56
55
|
postCurrentValue(): void;
|
|
57
56
|
}
|
|
58
|
-
//#endregion
|
|
59
57
|
//# sourceMappingURL=CrossFrameStateManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrossFrameStateManager.d.ts","names":[],"sources":["../../../src/core/CrossFrameStateManager.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CrossFrameStateManager.d.ts","names":[],"sources":["../../../src/core/CrossFrameStateManager.ts"],"mappings":";YAEY;;EAEV;;EAEA;;;;;;;;;YAUU,sBAAsB,KAC9B,MACE,eAAe,kBAAkB;;;;;;;;;;;;;qBAc1B,uBAAuB,WAAW;UACrC;mBACS;mBACA;mBACA;mBACA;EAEjB,YACE,aACA,WAAW,qBACX,UAAS;IAA2B,eAAe;;MAcjD,SAAS;;;;;;;;;EAYb,IAAI,UAAU,sBAAsB;;;;;EAiBpC;;EAgCA;;EAMA"}
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { CrossFrameMessenger, MessengerConfig } from "./CrossFrameMessenger.js";
|
|
2
2
|
import { CrossFrameStateManager } from "./CrossFrameStateManager.js";
|
|
3
|
+
import { KeyPath } from "@intlayer/types/keyPath";
|
|
3
4
|
import { Locale } from "@intlayer/types/allLocales";
|
|
4
5
|
import { IntlayerConfig } from "@intlayer/types/config";
|
|
5
6
|
import { ContentNode, Dictionary, LocalDictionaryId } from "@intlayer/types/dictionary";
|
|
6
|
-
import { KeyPath } from "@intlayer/types/keyPath";
|
|
7
|
-
//#region src/core/EditorStateManager.d.ts
|
|
8
7
|
export type DictionaryContent = Record<LocalDictionaryId, Dictionary>;
|
|
8
|
+
/** Delay between two editor pings checking the client still answers. */
|
|
9
|
+
export declare const CLIENT_HEARTBEAT_INTERVAL_MS = 3000;
|
|
10
|
+
/**
|
|
11
|
+
* Silence after which the client counts as disconnected (e.g. its dev server
|
|
12
|
+
* restarted). Pings go on, so it is activated again as soon as it answers.
|
|
13
|
+
*/
|
|
14
|
+
export declare const CLIENT_HEARTBEAT_TIMEOUT_MS = 10000;
|
|
15
|
+
/** Sent by the client with `INTLAYER_CLIENT_READY`. */
|
|
16
|
+
export type ClientReadyPayload = {
|
|
17
|
+
/** Whether the editor already activated this client. */
|
|
18
|
+
isActivated: boolean;
|
|
19
|
+
};
|
|
9
20
|
type EditorConfig = Pick<IntlayerConfig, 'editor'>;
|
|
10
21
|
export type FileContent = {
|
|
11
22
|
dictionaryKey: string;
|
|
@@ -44,9 +55,12 @@ export declare class EditorStateManager {
|
|
|
44
55
|
private _unsubAreYouThere;
|
|
45
56
|
private _unsubActivate;
|
|
46
57
|
private _unsubClientReady;
|
|
58
|
+
private _clientHeartbeatTimer;
|
|
59
|
+
private _lastClientReadyAt;
|
|
47
60
|
private _displayedKeysObserver;
|
|
48
61
|
private _displayedKeysTimer;
|
|
49
62
|
private _displayedKeysListeners;
|
|
63
|
+
private _unsubDisplayedKeysGet;
|
|
50
64
|
private _stopSharedStateSyncs;
|
|
51
65
|
constructor(config: EditorStateManagerConfig);
|
|
52
66
|
start(): void;
|
|
@@ -56,6 +70,16 @@ export declare class EditorStateManager {
|
|
|
56
70
|
* Call this when the user clicks "Enable Editor" or when the iframe reloads.
|
|
57
71
|
*/
|
|
58
72
|
pingClient(): void;
|
|
73
|
+
/**
|
|
74
|
+
* EDITOR mode: asks the client to switch locale. Covers applications whose
|
|
75
|
+
* locale is held in memory or storage only (no locale segment in the URL).
|
|
76
|
+
*/
|
|
77
|
+
requestLocaleChange(locale: Locale): void;
|
|
78
|
+
/**
|
|
79
|
+
* CLIENT mode: subscribes to the locale changes requested by the editor.
|
|
80
|
+
* Returns an unsubscribe function.
|
|
81
|
+
*/
|
|
82
|
+
onLocaleChangeRequested(handler: (locale: Locale) => void): () => void;
|
|
59
83
|
setFocusedContentKeyPath(keyPath: KeyPath[]): void;
|
|
60
84
|
setLocaleDictionary(dictionary: Dictionary): void;
|
|
61
85
|
setEditedDictionary(newDict: Dictionary): void;
|
|
@@ -78,9 +102,16 @@ export declare class EditorStateManager {
|
|
|
78
102
|
* Also pings the client immediately in case it loaded before the editor.
|
|
79
103
|
*/
|
|
80
104
|
private _setupEditorHandshake;
|
|
105
|
+
/**
|
|
106
|
+
* EDITOR mode: keeps pinging the client. A client that stopped answering
|
|
107
|
+
* (dev server restart, reloaded frame, re-evaluated client module) is marked
|
|
108
|
+
* disconnected, then activated again on its next answer.
|
|
109
|
+
*/
|
|
110
|
+
private _startClientHeartbeat;
|
|
111
|
+
private _stopClientHeartbeat;
|
|
81
112
|
private _setupActivationHandshake;
|
|
82
113
|
private _broadcastData;
|
|
83
114
|
private _loadDictionaries;
|
|
84
115
|
}
|
|
85
|
-
|
|
116
|
+
export {};
|
|
86
117
|
//# sourceMappingURL=EditorStateManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorStateManager.d.ts","names":[],"sources":["../../../src/core/EditorStateManager.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"EditorStateManager.d.ts","names":[],"sources":["../../../src/core/EditorStateManager.ts"],"mappings":";;;;;;YA2BY,oBAAoB,OAAO,mBAAmB;;qBAG7C;;;;;qBAMA;;YAGD;;EAEV;;KASG,eAAe,KAAK;YAQb;EACV;EACA,oBAAoB;EACpB,UAAU;;YAGA;;EAEV;;EAEA,WAAW;;EAEX,gBAAgB;;;;;;;;;;qBAWL;WACF,WAAW;WACX,eAAe;WACf,gBAAgB,uBAAuB;WACvC,oBAAoB,uBAAuB;WAC3C,eAAe,uBAAuB;WACtC,eAAe,uBAAuB;WACtC,eAAe,uBAAuB;WACtC,yBAAyB;mBAEjB;mBACA;mBACA;mBACA;UAGT;UACA;UAEA;UACA;UACA;UAGA;UACA;UACA;UACA;UAGA;EAER,YAAY,QAAQ;EA+DpB;EAoCA;;;;;EA8BA;;;;;EAcA,oBAAoB,QAAQ;;;;;EAU5B,wBAAwB,UAAU,QAAQ;EAW1C,yBAAyB,SAAS;EAUlC,oBAAoB,YAAY;EAYhC,oBAAoB,SAAS;EAa7B,iBACE,mBAAmB,mBACnB,UAAU;EAaZ,WACE,mBAAmB,mBACnB,UAAU,aACV,UAAS,WACT;EAgDF,cACE,mBAAmB,mBACnB,QAAQ,gBACR,UAAS;EAmBX,cACE,mBAAmB,mBACnB,SAAS;EAwBX,eAAe,mBAAmB;EAOlC,gBACE,wBAAwB,4BACxB,SAAS,YACR;;;;;UA0DK;UAyCA;UAeA;UAqCA;;;;;UAqBA;;;;;;UAmCA;UAeA;UAKA;UA0BA;UAmCM"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { CrossFrameMessenger } from "./CrossFrameMessenger.js";
|
|
2
|
-
//#region src/core/IframeClickInterceptor.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Forwards clicks across the iframe boundary.
|
|
5
4
|
*
|
|
6
|
-
* - startInterceptor(): client (iframe) side — reports each
|
|
5
|
+
* - startInterceptor(): client (iframe) side — reports each click to the editor
|
|
7
6
|
* - startMerger(): editor (parent) side — replays reported clicks on its window
|
|
7
|
+
*
|
|
8
|
+
* Clicks are reported once released rather than on mousedown: a long press on
|
|
9
|
+
* content starts with a mousedown too, and reporting it closed the editor
|
|
10
|
+
* drawers right before the press focused content in them. A completed long
|
|
11
|
+
* press stops its own click (see `ContentSelector`), and a click selecting
|
|
12
|
+
* content is marked as such, so neither is reported.
|
|
8
13
|
*/
|
|
9
14
|
export declare class IframeClickInterceptor {
|
|
10
15
|
private readonly _messenger;
|
|
11
|
-
private
|
|
16
|
+
private _clickHandler;
|
|
12
17
|
private _unsubscribeMerge;
|
|
13
18
|
constructor(messenger: CrossFrameMessenger);
|
|
14
19
|
startInterceptor(): void;
|
|
@@ -16,5 +21,4 @@ export declare class IframeClickInterceptor {
|
|
|
16
21
|
stopInterceptor(): void;
|
|
17
22
|
stopMerger(): void;
|
|
18
23
|
}
|
|
19
|
-
//#endregion
|
|
20
24
|
//# sourceMappingURL=IframeClickInterceptor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IframeClickInterceptor.d.ts","names":[],"sources":["../../../src/core/IframeClickInterceptor.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"IframeClickInterceptor.d.ts","names":[],"sources":["../../../src/core/IframeClickInterceptor.ts"],"mappings":";;;;;;;;;;;;;qBAgCa;mBACM;UACT;UACA;EAER,YAAY,WAAW;EAIvB;EAUA;EAOA;EAOA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CrossFrameMessenger } from "./CrossFrameMessenger.js";
|
|
2
|
-
//#region src/core/UrlStateManager.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* UrlStateManager patches window.history and broadcasts URL path changes
|
|
5
4
|
* across frames via postMessage.
|
|
@@ -15,5 +14,4 @@ export declare class UrlStateManager {
|
|
|
15
14
|
start(): void;
|
|
16
15
|
stop(): void;
|
|
17
16
|
}
|
|
18
|
-
//#endregion
|
|
19
17
|
//# sourceMappingURL=UrlStateManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UrlStateManager.d.ts","names":[],"sources":["../../../src/core/UrlStateManager.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"UrlStateManager.d.ts","names":[],"sources":["../../../src/core/UrlStateManager.ts"],"mappings":";;;;;;;qBASa;mBACM;UACT;UACA;UACA;EAER,YAAY,WAAW;EAIvB;EA2CA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Origin of the parent frame to trust as the editor, when both it and the
|
|
3
|
+
* configured `editorURL` are local. A local editor moves to the next free port
|
|
4
|
+
* when its own is taken, so the `editorURL` baked into the app can miss it.
|
|
5
|
+
*
|
|
6
|
+
* @param editorURL - Configured editor URL.
|
|
7
|
+
* @param parentOrigin - Origin of the frame embedding the app.
|
|
8
|
+
* @returns The parent origin, or `undefined` when it must not be trusted.
|
|
9
|
+
*/
|
|
10
|
+
export declare const getLocalEditorParentOrigin: (editorURL: string | undefined, parentOrigin: string | undefined) => string | undefined;
|
|
11
|
+
//# sourceMappingURL=getLocalEditorParentOrigin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLocalEditorParentOrigin.d.ts","names":[],"sources":["../../../src/core/getLocalEditorParentOrigin.ts"],"mappings":";;;;;;;;;qBAoBa,6BAA0B,+BACR"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EditorStateManager } from "./EditorStateManager.js";
|
|
2
|
-
//#region src/core/globalManager.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Retrieves the global editor state manager instance.
|
|
5
4
|
* Returns null if no manager has been set or in SSR environments where
|
|
@@ -33,5 +32,4 @@ export declare const setGlobalEditorManager: (manager: EditorStateManager | null
|
|
|
33
32
|
* ```
|
|
34
33
|
*/
|
|
35
34
|
export declare const onGlobalEditorManagerChange: (changeCallback: (manager: EditorStateManager | null) => void) => (() => void);
|
|
36
|
-
//#endregion
|
|
37
35
|
//# sourceMappingURL=globalManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalManager.d.ts","names":[],"sources":["../../../src/core/globalManager.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"globalManager.d.ts","names":[],"sources":["../../../src/core/globalManager.ts"],"mappings":";;;;;;;;qBAmDa,8BAA6B;;;;;;;qBAiB7B,yBAAsB,SACxB;;;;;;;;;;;;;;;;;;qBA+BE,8BAA2B,iBACrB,SAAS"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CrossFrameMessenger, MessagePayload, MessengerConfig } from "./CrossFrameMessenger.js";
|
|
2
2
|
import { CrossFrameStateAction, CrossFrameStateManager, CrossFrameStateOptions } from "./CrossFrameStateManager.js";
|
|
3
|
-
import { DictionaryContent, EditorStateManager, EditorStateManagerConfig, FileContent } from "./EditorStateManager.js";
|
|
4
|
-
import { IframeClickInterceptor } from "./IframeClickInterceptor.js";
|
|
5
|
-
import { UrlStateManager } from "./UrlStateManager.js";
|
|
3
|
+
import { CLIENT_HEARTBEAT_INTERVAL_MS, CLIENT_HEARTBEAT_TIMEOUT_MS, ClientReadyPayload, DictionaryContent, EditorStateManager, EditorStateManagerConfig, FileContent } from "./EditorStateManager.js";
|
|
6
4
|
import { getGlobalEditorManager, onGlobalEditorManagerChange, setGlobalEditorManager } from "./globalManager.js";
|
|
5
|
+
import { IframeClickInterceptor } from "./IframeClickInterceptor.js";
|
|
7
6
|
import { initEditorClient, stopEditorClient } from "./initEditorClient.js";
|
|
8
7
|
import { SharedWindowState, createSharedWindowState } from "./sharedWindowState.js";
|
|
9
|
-
|
|
8
|
+
import { UrlStateManager } from "./UrlStateManager.js";
|
|
9
|
+
export { CLIENT_HEARTBEAT_INTERVAL_MS, CLIENT_HEARTBEAT_TIMEOUT_MS, ClientReadyPayload, CrossFrameMessenger, CrossFrameStateAction, CrossFrameStateManager, CrossFrameStateOptions, DictionaryContent, EditorStateManager, EditorStateManagerConfig, FileContent, IframeClickInterceptor, MessagePayload, MessengerConfig, SharedWindowState, UrlStateManager, createSharedWindowState, getGlobalEditorManager, initEditorClient, onGlobalEditorManagerChange, setGlobalEditorManager, stopEditorClient };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EditorStateManager } from "./EditorStateManager.js";
|
|
2
|
-
//#region src/core/initEditorClient.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Initialize the Intlayer editor client singleton.
|
|
5
4
|
* Safe to call multiple times — returns the existing manager if already initialized.
|
|
@@ -12,5 +11,4 @@ export declare const initEditorClient: () => EditorStateManager;
|
|
|
12
11
|
* only when the last provider unmounts.
|
|
13
12
|
*/
|
|
14
13
|
export declare const stopEditorClient: () => void;
|
|
15
|
-
//#endregion
|
|
16
14
|
//# sourceMappingURL=initEditorClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initEditorClient.d.ts","names":[],"sources":["../../../src/core/initEditorClient.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"initEditorClient.d.ts","names":[],"sources":["../../../src/core/initEditorClient.ts"],"mappings":";;;;;;;qBA2Da,wBAAuB;;;;;qBAuBvB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marks a click as having selected content, so outer selectors don't select
|
|
3
|
+
* their own content too, and the iframe click interceptor doesn't report it to
|
|
4
|
+
* the editor as a click outside its drawers.
|
|
5
|
+
*
|
|
6
|
+
* @param event - Click that selected content
|
|
7
|
+
*/
|
|
8
|
+
export declare const markSelectionClick: (event: Event) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Whether a click already selected content.
|
|
11
|
+
*
|
|
12
|
+
* @param event - Click to check
|
|
13
|
+
*/
|
|
14
|
+
export declare const isSelectionClick: (event: Event) => boolean;
|
|
15
|
+
//# sourceMappingURL=selectionClick.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectionClick.d.ts","names":[],"sources":["../../../src/core/selectionClick.ts"],"mappings":";;;;;;;qBAUa,qBAAkB,OAAW;;;;;;qBAS7B,mBAAgB,OAAW"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/core/sharedWindowState.d.ts
|
|
2
1
|
type SharedWindowStateListener<T> = (value: T, sourceId?: string) => void;
|
|
3
2
|
export type SharedWindowState<T> = {
|
|
4
3
|
/** Last published value, `undefined` until one is published */
|
|
@@ -14,5 +13,5 @@ export type SharedWindowState<T> = {
|
|
|
14
13
|
* Stored on `window` so duplicated copies of this package share it too.
|
|
15
14
|
*/
|
|
16
15
|
export declare const createSharedWindowState: <T>(name: string) => SharedWindowState<T>;
|
|
17
|
-
|
|
16
|
+
export {};
|
|
18
17
|
//# sourceMappingURL=sharedWindowState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedWindowState.d.ts","names":[],"sources":["../../../src/core/sharedWindowState.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"sharedWindowState.d.ts","names":[],"sources":["../../../src/core/sharedWindowState.ts"],"mappings":"A,KAQK,0BAA0B,MAAM,OAAO,GAAG;YAEnC,kBAAkB;;EAE5B,WAAW;;EAEX,MAAM,OAAO,GAAG;;EAEhB,YAAY,UAAU,0BAA0B;;;;;;;qBAQrC,0BAA2B,GAAC,iBAEtC,kBAAkB"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { IntlayerContentSelectorElement, defineIntlayerElements } from "./components/ContentSelector.js";
|
|
2
2
|
import { IntlayerContentSelectorWrapperElement, defineIntlayerContentSelectorWrapper } from "./components/ContentSelectorWrapper.js";
|
|
3
|
+
import "./components/index.js";
|
|
3
4
|
import { CrossFrameMessenger, MessagePayload, MessengerConfig } from "./core/CrossFrameMessenger.js";
|
|
4
5
|
import { CrossFrameStateAction, CrossFrameStateManager, CrossFrameStateOptions } from "./core/CrossFrameStateManager.js";
|
|
5
|
-
import { DictionaryContent, EditorStateManager, EditorStateManagerConfig, FileContent } from "./core/EditorStateManager.js";
|
|
6
|
+
import { CLIENT_HEARTBEAT_INTERVAL_MS, CLIENT_HEARTBEAT_TIMEOUT_MS, ClientReadyPayload, DictionaryContent, EditorStateManager, EditorStateManagerConfig, FileContent } from "./core/EditorStateManager.js";
|
|
6
7
|
import { IframeClickInterceptor } from "./core/IframeClickInterceptor.js";
|
|
7
8
|
import { UrlStateManager } from "./core/UrlStateManager.js";
|
|
8
9
|
import { getGlobalEditorManager, onGlobalEditorManagerChange, setGlobalEditorManager } from "./core/globalManager.js";
|
|
@@ -10,4 +11,4 @@ import { initEditorClient, stopEditorClient } from "./core/initEditorClient.js";
|
|
|
10
11
|
import { SharedWindowState, createSharedWindowState } from "./core/sharedWindowState.js";
|
|
11
12
|
import "./core/index.js";
|
|
12
13
|
import { MessageKey } from "./messageKey.js";
|
|
13
|
-
export { CrossFrameMessenger, CrossFrameStateAction, CrossFrameStateManager, CrossFrameStateOptions, DictionaryContent, EditorStateManager, EditorStateManagerConfig, FileContent, IframeClickInterceptor, IntlayerContentSelectorElement, IntlayerContentSelectorWrapperElement, MessageKey, MessagePayload, MessengerConfig, SharedWindowState, UrlStateManager, createSharedWindowState, defineIntlayerContentSelectorWrapper, defineIntlayerElements, getGlobalEditorManager, initEditorClient, onGlobalEditorManagerChange, setGlobalEditorManager, stopEditorClient };
|
|
14
|
+
export { CLIENT_HEARTBEAT_INTERVAL_MS, CLIENT_HEARTBEAT_TIMEOUT_MS, ClientReadyPayload, CrossFrameMessenger, CrossFrameStateAction, CrossFrameStateManager, CrossFrameStateOptions, DictionaryContent, EditorStateManager, EditorStateManagerConfig, FileContent, IframeClickInterceptor, IntlayerContentSelectorElement, IntlayerContentSelectorWrapperElement, MessageKey, MessagePayload, MessengerConfig, SharedWindowState, UrlStateManager, createSharedWindowState, defineIntlayerContentSelectorWrapper, defineIntlayerElements, getGlobalEditorManager, initEditorClient, onGlobalEditorManagerChange, setGlobalEditorManager, stopEditorClient };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isEnabled.d.ts","names":[],"sources":["../../src/isEnabled.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"isEnabled.d.ts","names":[],"sources":["../../src/isEnabled.ts"],"mappings":"A,qBAIa"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/messageKey.d.ts
|
|
2
1
|
export declare enum MessageKey {
|
|
3
2
|
/** Client → editor: announces the client is ready (also used as response to ARE_YOU_THERE) */
|
|
4
3
|
INTLAYER_CLIENT_READY = "INTLAYER_CLIENT_READY",
|
|
@@ -12,6 +11,8 @@ export declare enum MessageKey {
|
|
|
12
11
|
INTLAYER_CONFIGURATION = "INTLAYER_CONFIGURATION",
|
|
13
12
|
INTLAYER_CURRENT_LOCALE = "INTLAYER_CURRENT_LOCALE",
|
|
14
13
|
INTLAYER_URL_CHANGE = "INTLAYER_URL_CHANGE",
|
|
14
|
+
/** Editor → client: asks the client to switch to the given locale */
|
|
15
|
+
INTLAYER_LOCALE_CHANGE_REQUESTED = "INTLAYER_LOCALE_CHANGE_REQUESTED",
|
|
15
16
|
/** Client → editor: load and update content */
|
|
16
17
|
INTLAYER_LOCALE_DICTIONARIES_CHANGED = "INTLAYER_LOCALE_DICTIONARIES_CHANGED",
|
|
17
18
|
INTLAYER_DISTANT_DICTIONARIES_CHANGED = "INTLAYER_DISTANT_DICTIONARIES_CHANGED",
|
|
@@ -22,7 +23,8 @@ export declare enum MessageKey {
|
|
|
22
23
|
/** Client → editor: Helper to sync iframe client reactivity on click client */
|
|
23
24
|
INTLAYER_IFRAME_CLICKED = "INTLAYER_IFRAME_CLICKED",
|
|
24
25
|
/** Client → editor: list of dictionary keys currently rendered in the iframe */
|
|
25
|
-
INTLAYER_DISPLAYED_DICTIONARY_KEYS = "INTLAYER_DISPLAYED_DICTIONARY_KEYS"
|
|
26
|
+
INTLAYER_DISPLAYED_DICTIONARY_KEYS = "INTLAYER_DISPLAYED_DICTIONARY_KEYS",
|
|
27
|
+
/** IDE host → editor: colour theme of the IDE embedding the editor */
|
|
28
|
+
INTLAYER_HOST_THEME_CHANGED = "INTLAYER_HOST_THEME_CHANGED"
|
|
26
29
|
}
|
|
27
|
-
//#endregion
|
|
28
30
|
//# sourceMappingURL=messageKey.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageKey.d.ts","names":[],"sources":["../../src/messageKey.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"messageKey.d.ts","names":[],"sources":["../../src/messageKey.ts"],"mappings":"A,oBAAY;;EAEV;;EAEA;;EAEA;;EAEA;;EAGA;EACA;EACA;;EAEA;;EAGA;EACA;;EAGA;EACA;EACA;;EAGA;;EAGA;;EAGA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/editor",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.7.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Provides the utilities to interface the application with the Intlayer editor and manipulate dictionaries",
|
|
6
6
|
"keywords": [
|
|
@@ -76,20 +76,20 @@
|
|
|
76
76
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@intlayer/config": "9.
|
|
80
|
-
"@intlayer/core": "9.
|
|
81
|
-
"@intlayer/dictionaries-entry": "9.
|
|
82
|
-
"@intlayer/types": "9.
|
|
79
|
+
"@intlayer/config": "9.7.1",
|
|
80
|
+
"@intlayer/core": "9.7.1",
|
|
81
|
+
"@intlayer/dictionaries-entry": "9.7.1",
|
|
82
|
+
"@intlayer/types": "9.7.1"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@types/node": "^
|
|
85
|
+
"@types/node": "^26",
|
|
86
86
|
"@utils/ts-config": "1.0.4",
|
|
87
87
|
"@utils/ts-config-types": "1.0.4",
|
|
88
88
|
"@utils/tsdown-config": "1.0.4",
|
|
89
89
|
"rimraf": "6.1.3",
|
|
90
|
-
"tsdown": "0.23.
|
|
90
|
+
"tsdown": "0.23.4",
|
|
91
91
|
"typescript": "7.0.2",
|
|
92
|
-
"vitest": "5.0
|
|
92
|
+
"vitest": "5.1.0"
|
|
93
93
|
},
|
|
94
94
|
"engines": {
|
|
95
95
|
"node": ">=14.18"
|