@intlayer/editor 9.1.3 → 9.3.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/core/CrossFrameStateManager.cjs +12 -4
- package/dist/cjs/core/CrossFrameStateManager.cjs.map +1 -1
- package/dist/esm/core/CrossFrameStateManager.mjs +12 -4
- package/dist/esm/core/CrossFrameStateManager.mjs.map +1 -1
- package/dist/types/core/CrossFrameStateManager.d.ts +18 -3
- package/dist/types/core/CrossFrameStateManager.d.ts.map +1 -1
- package/dist/types/core/index.d.ts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +6 -6
|
@@ -32,11 +32,19 @@ var CrossFrameStateManager = class extends EventTarget {
|
|
|
32
32
|
get value() {
|
|
33
33
|
return this._value;
|
|
34
34
|
}
|
|
35
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Update the value locally and broadcast it to other frames if emit is enabled.
|
|
37
|
+
*
|
|
38
|
+
* Accepts either a concrete value or an updater function. An updater is applied
|
|
39
|
+
* against the current value first, so the function itself is never handed to
|
|
40
|
+
* `postMessage` — doing so throws `DataCloneError`, since functions are not
|
|
41
|
+
* structured-cloneable.
|
|
42
|
+
*/
|
|
36
43
|
set(newValue) {
|
|
37
|
-
this._value
|
|
38
|
-
this.
|
|
39
|
-
|
|
44
|
+
const resolvedValue = typeof newValue === "function" ? newValue(this._value) : newValue;
|
|
45
|
+
this._value = resolvedValue;
|
|
46
|
+
this.dispatchEvent(new CustomEvent("change", { detail: resolvedValue }));
|
|
47
|
+
if (this._options.emit) this._messenger.send(`${this._key}/post`, resolvedValue);
|
|
40
48
|
}
|
|
41
49
|
/**
|
|
42
50
|
* Start listening for incoming state updates and responding to /get requests.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrossFrameStateManager.cjs","names":[],"sources":["../../../src/core/CrossFrameStateManager.ts"],"sourcesContent":["import type { CrossFrameMessenger } from './CrossFrameMessenger';\n\nexport type CrossFrameStateOptions = {\n /** Whether to broadcast state changes to other frames. Default: true */\n emit?: boolean;\n /** Whether to listen for state updates from other frames. Default: true */\n receive?: boolean;\n};\n\n/**\n * CrossFrameStateManager synchronizes a single named value across frames using\n * the postMessage API via CrossFrameMessenger.\n *\n * Protocol:\n * `{key}/post` — broadcast a new value\n * `{key}/get` — request the current value from other frames\n *\n * Replaces useCrossFrameState across all frameworks.\n *\n * @fires change — CustomEvent<T> dispatched whenever the value changes (local set or received)\n */\nexport class CrossFrameStateManager<T> extends EventTarget {\n private _value: T | undefined;\n private readonly _key: string;\n private readonly _messenger: CrossFrameMessenger;\n private readonly _options: Required<CrossFrameStateOptions>;\n private readonly _unsubscribers: Array<() => void> = [];\n\n constructor(\n key: string,\n messenger: CrossFrameMessenger,\n options: CrossFrameStateOptions & { initialValue?: T } = {}\n ) {\n super();\n this._key = key;\n this._messenger = messenger;\n this._options = {\n emit: options.emit ?? true,\n receive: options.receive ?? true,\n };\n if (options.initialValue !== undefined) {\n this._value = options.initialValue;\n }\n }\n\n get value(): T | undefined {\n return this._value;\n }\n\n
|
|
1
|
+
{"version":3,"file":"CrossFrameStateManager.cjs","names":[],"sources":["../../../src/core/CrossFrameStateManager.ts"],"sourcesContent":["import type { CrossFrameMessenger } from './CrossFrameMessenger';\n\nexport type CrossFrameStateOptions = {\n /** Whether to broadcast state changes to other frames. Default: true */\n emit?: boolean;\n /** Whether to listen for state updates from other frames. Default: true */\n receive?: boolean;\n};\n\n/**\n * A new value, or an updater deriving it from the previous one — mirroring\n * React's `SetStateAction` so callers can use the familiar `set(prev => …)` form.\n *\n * Updaters are resolved locally before broadcasting: a function can never be\n * structured-cloned by `postMessage`, so only the resolved value crosses frames.\n */\nexport type CrossFrameStateAction<T> =\n | T\n | ((previousValue: T | undefined) => T);\n\n/**\n * CrossFrameStateManager synchronizes a single named value across frames using\n * the postMessage API via CrossFrameMessenger.\n *\n * Protocol:\n * `{key}/post` — broadcast a new value\n * `{key}/get` — request the current value from other frames\n *\n * Replaces useCrossFrameState across all frameworks.\n *\n * @fires change — CustomEvent<T> dispatched whenever the value changes (local set or received)\n */\nexport class CrossFrameStateManager<T> extends EventTarget {\n private _value: T | undefined;\n private readonly _key: string;\n private readonly _messenger: CrossFrameMessenger;\n private readonly _options: Required<CrossFrameStateOptions>;\n private readonly _unsubscribers: Array<() => void> = [];\n\n constructor(\n key: string,\n messenger: CrossFrameMessenger,\n options: CrossFrameStateOptions & { initialValue?: T } = {}\n ) {\n super();\n this._key = key;\n this._messenger = messenger;\n this._options = {\n emit: options.emit ?? true,\n receive: options.receive ?? true,\n };\n if (options.initialValue !== undefined) {\n this._value = options.initialValue;\n }\n }\n\n get value(): T | undefined {\n return this._value;\n }\n\n /**\n * Update the value locally and broadcast it to other frames if emit is enabled.\n *\n * Accepts either a concrete value or an updater function. An updater is applied\n * against the current value first, so the function itself is never handed to\n * `postMessage` — doing so throws `DataCloneError`, since functions are not\n * structured-cloneable.\n */\n set(newValue: CrossFrameStateAction<T>): void {\n const resolvedValue =\n typeof newValue === 'function'\n ? (newValue as (previousValue: T | undefined) => T)(this._value)\n : newValue;\n\n this._value = resolvedValue;\n this.dispatchEvent(new CustomEvent<T>('change', { detail: resolvedValue }));\n if (this._options.emit) {\n this._messenger.send(`${this._key}/post`, resolvedValue);\n }\n }\n\n /**\n * Start listening for incoming state updates and responding to /get requests.\n * If receive=true and no initial value is set, sends a /get to request the current value.\n */\n start(): void {\n if (this._options.receive) {\n const unsub = this._messenger.subscribe<T>(\n `${this._key}/post`,\n (data) => {\n this._value = data;\n this.dispatchEvent(new CustomEvent<T>('change', { detail: data }));\n }\n );\n this._unsubscribers.push(unsub);\n }\n\n if (this._options.emit) {\n // Respond to /get requests by broadcasting current value\n const unsub = this._messenger.subscribe(\n `${this._key}/get`,\n (_, originSenderId) => {\n if (originSenderId === this._messenger.senderId) return;\n if (this._value === undefined) return;\n this._messenger.send(`${this._key}/post`, this._value);\n }\n );\n this._unsubscribers.push(unsub);\n }\n\n // If receiving and no initial value, request it from other frames\n if (this._options.receive && this._value === undefined) {\n this._messenger.send(`${this._key}/get`);\n }\n }\n\n /** Stop all listeners. */\n stop(): void {\n for (const unsub of this._unsubscribers) unsub();\n this._unsubscribers.length = 0;\n }\n\n /** Broadcast the current value to all frames (useful after reconnect). */\n postCurrentValue(): void {\n if (this._value !== undefined) {\n this._messenger.send(`${this._key}/post`, this._value);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAgCA,IAAa,yBAAb,cAA+C,YAAY;CACzD,AAAQ;CACR,AAAiB;CACjB,AAAiB;CACjB,AAAiB;CACjB,AAAiB,iBAAoC,CAAC;CAEtD,YACE,KACA,WACA,UAAyD,CAAC,GAC1D;EACA,MAAM;EACN,KAAK,OAAO;EACZ,KAAK,aAAa;EAClB,KAAK,WAAW;GACd,MAAM,QAAQ,QAAQ;GACtB,SAAS,QAAQ,WAAW;EAC9B;EACA,IAAI,QAAQ,iBAAiB,QAC3B,KAAK,SAAS,QAAQ;CAE1B;CAEA,IAAI,QAAuB;EACzB,OAAO,KAAK;CACd;;;;;;;;;CAUA,IAAI,UAA0C;EAC5C,MAAM,gBACJ,OAAO,aAAa,aACf,SAAiD,KAAK,MAAM,IAC7D;EAEN,KAAK,SAAS;EACd,KAAK,cAAc,IAAI,YAAe,UAAU,EAAE,QAAQ,cAAc,CAAC,CAAC;EAC1E,IAAI,KAAK,SAAS,MAChB,KAAK,WAAW,KAAK,GAAG,KAAK,KAAK,QAAQ,aAAa;CAE3D;;;;;CAMA,QAAc;EACZ,IAAI,KAAK,SAAS,SAAS;GACzB,MAAM,QAAQ,KAAK,WAAW,UAC5B,GAAG,KAAK,KAAK,SACZ,SAAS;IACR,KAAK,SAAS;IACd,KAAK,cAAc,IAAI,YAAe,UAAU,EAAE,QAAQ,KAAK,CAAC,CAAC;GACnE,CACF;GACA,KAAK,eAAe,KAAK,KAAK;EAChC;EAEA,IAAI,KAAK,SAAS,MAAM;GAEtB,MAAM,QAAQ,KAAK,WAAW,UAC5B,GAAG,KAAK,KAAK,QACZ,GAAG,mBAAmB;IACrB,IAAI,mBAAmB,KAAK,WAAW,UAAU;IACjD,IAAI,KAAK,WAAW,QAAW;IAC/B,KAAK,WAAW,KAAK,GAAG,KAAK,KAAK,QAAQ,KAAK,MAAM;GACvD,CACF;GACA,KAAK,eAAe,KAAK,KAAK;EAChC;EAGA,IAAI,KAAK,SAAS,WAAW,KAAK,WAAW,QAC3C,KAAK,WAAW,KAAK,GAAG,KAAK,KAAK,KAAK;CAE3C;;CAGA,OAAa;EACX,KAAK,MAAM,SAAS,KAAK,gBAAgB,MAAM;EAC/C,KAAK,eAAe,SAAS;CAC/B;;CAGA,mBAAyB;EACvB,IAAI,KAAK,WAAW,QAClB,KAAK,WAAW,KAAK,GAAG,KAAK,KAAK,QAAQ,KAAK,MAAM;CAEzD;AACF"}
|
|
@@ -30,11 +30,19 @@ var CrossFrameStateManager = class extends EventTarget {
|
|
|
30
30
|
get value() {
|
|
31
31
|
return this._value;
|
|
32
32
|
}
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Update the value locally and broadcast it to other frames if emit is enabled.
|
|
35
|
+
*
|
|
36
|
+
* Accepts either a concrete value or an updater function. An updater is applied
|
|
37
|
+
* against the current value first, so the function itself is never handed to
|
|
38
|
+
* `postMessage` — doing so throws `DataCloneError`, since functions are not
|
|
39
|
+
* structured-cloneable.
|
|
40
|
+
*/
|
|
34
41
|
set(newValue) {
|
|
35
|
-
this._value
|
|
36
|
-
this.
|
|
37
|
-
|
|
42
|
+
const resolvedValue = typeof newValue === "function" ? newValue(this._value) : newValue;
|
|
43
|
+
this._value = resolvedValue;
|
|
44
|
+
this.dispatchEvent(new CustomEvent("change", { detail: resolvedValue }));
|
|
45
|
+
if (this._options.emit) this._messenger.send(`${this._key}/post`, resolvedValue);
|
|
38
46
|
}
|
|
39
47
|
/**
|
|
40
48
|
* Start listening for incoming state updates and responding to /get requests.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrossFrameStateManager.mjs","names":[],"sources":["../../../src/core/CrossFrameStateManager.ts"],"sourcesContent":["import type { CrossFrameMessenger } from './CrossFrameMessenger';\n\nexport type CrossFrameStateOptions = {\n /** Whether to broadcast state changes to other frames. Default: true */\n emit?: boolean;\n /** Whether to listen for state updates from other frames. Default: true */\n receive?: boolean;\n};\n\n/**\n * CrossFrameStateManager synchronizes a single named value across frames using\n * the postMessage API via CrossFrameMessenger.\n *\n * Protocol:\n * `{key}/post` — broadcast a new value\n * `{key}/get` — request the current value from other frames\n *\n * Replaces useCrossFrameState across all frameworks.\n *\n * @fires change — CustomEvent<T> dispatched whenever the value changes (local set or received)\n */\nexport class CrossFrameStateManager<T> extends EventTarget {\n private _value: T | undefined;\n private readonly _key: string;\n private readonly _messenger: CrossFrameMessenger;\n private readonly _options: Required<CrossFrameStateOptions>;\n private readonly _unsubscribers: Array<() => void> = [];\n\n constructor(\n key: string,\n messenger: CrossFrameMessenger,\n options: CrossFrameStateOptions & { initialValue?: T } = {}\n ) {\n super();\n this._key = key;\n this._messenger = messenger;\n this._options = {\n emit: options.emit ?? true,\n receive: options.receive ?? true,\n };\n if (options.initialValue !== undefined) {\n this._value = options.initialValue;\n }\n }\n\n get value(): T | undefined {\n return this._value;\n }\n\n
|
|
1
|
+
{"version":3,"file":"CrossFrameStateManager.mjs","names":[],"sources":["../../../src/core/CrossFrameStateManager.ts"],"sourcesContent":["import type { CrossFrameMessenger } from './CrossFrameMessenger';\n\nexport type CrossFrameStateOptions = {\n /** Whether to broadcast state changes to other frames. Default: true */\n emit?: boolean;\n /** Whether to listen for state updates from other frames. Default: true */\n receive?: boolean;\n};\n\n/**\n * A new value, or an updater deriving it from the previous one — mirroring\n * React's `SetStateAction` so callers can use the familiar `set(prev => …)` form.\n *\n * Updaters are resolved locally before broadcasting: a function can never be\n * structured-cloned by `postMessage`, so only the resolved value crosses frames.\n */\nexport type CrossFrameStateAction<T> =\n | T\n | ((previousValue: T | undefined) => T);\n\n/**\n * CrossFrameStateManager synchronizes a single named value across frames using\n * the postMessage API via CrossFrameMessenger.\n *\n * Protocol:\n * `{key}/post` — broadcast a new value\n * `{key}/get` — request the current value from other frames\n *\n * Replaces useCrossFrameState across all frameworks.\n *\n * @fires change — CustomEvent<T> dispatched whenever the value changes (local set or received)\n */\nexport class CrossFrameStateManager<T> extends EventTarget {\n private _value: T | undefined;\n private readonly _key: string;\n private readonly _messenger: CrossFrameMessenger;\n private readonly _options: Required<CrossFrameStateOptions>;\n private readonly _unsubscribers: Array<() => void> = [];\n\n constructor(\n key: string,\n messenger: CrossFrameMessenger,\n options: CrossFrameStateOptions & { initialValue?: T } = {}\n ) {\n super();\n this._key = key;\n this._messenger = messenger;\n this._options = {\n emit: options.emit ?? true,\n receive: options.receive ?? true,\n };\n if (options.initialValue !== undefined) {\n this._value = options.initialValue;\n }\n }\n\n get value(): T | undefined {\n return this._value;\n }\n\n /**\n * Update the value locally and broadcast it to other frames if emit is enabled.\n *\n * Accepts either a concrete value or an updater function. An updater is applied\n * against the current value first, so the function itself is never handed to\n * `postMessage` — doing so throws `DataCloneError`, since functions are not\n * structured-cloneable.\n */\n set(newValue: CrossFrameStateAction<T>): void {\n const resolvedValue =\n typeof newValue === 'function'\n ? (newValue as (previousValue: T | undefined) => T)(this._value)\n : newValue;\n\n this._value = resolvedValue;\n this.dispatchEvent(new CustomEvent<T>('change', { detail: resolvedValue }));\n if (this._options.emit) {\n this._messenger.send(`${this._key}/post`, resolvedValue);\n }\n }\n\n /**\n * Start listening for incoming state updates and responding to /get requests.\n * If receive=true and no initial value is set, sends a /get to request the current value.\n */\n start(): void {\n if (this._options.receive) {\n const unsub = this._messenger.subscribe<T>(\n `${this._key}/post`,\n (data) => {\n this._value = data;\n this.dispatchEvent(new CustomEvent<T>('change', { detail: data }));\n }\n );\n this._unsubscribers.push(unsub);\n }\n\n if (this._options.emit) {\n // Respond to /get requests by broadcasting current value\n const unsub = this._messenger.subscribe(\n `${this._key}/get`,\n (_, originSenderId) => {\n if (originSenderId === this._messenger.senderId) return;\n if (this._value === undefined) return;\n this._messenger.send(`${this._key}/post`, this._value);\n }\n );\n this._unsubscribers.push(unsub);\n }\n\n // If receiving and no initial value, request it from other frames\n if (this._options.receive && this._value === undefined) {\n this._messenger.send(`${this._key}/get`);\n }\n }\n\n /** Stop all listeners. */\n stop(): void {\n for (const unsub of this._unsubscribers) unsub();\n this._unsubscribers.length = 0;\n }\n\n /** Broadcast the current value to all frames (useful after reconnect). */\n postCurrentValue(): void {\n if (this._value !== undefined) {\n this._messenger.send(`${this._key}/post`, this._value);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAgCA,IAAa,yBAAb,cAA+C,YAAY;CACzD,AAAQ;CACR,AAAiB;CACjB,AAAiB;CACjB,AAAiB;CACjB,AAAiB,iBAAoC,CAAC;CAEtD,YACE,KACA,WACA,UAAyD,CAAC,GAC1D;EACA,MAAM;EACN,KAAK,OAAO;EACZ,KAAK,aAAa;EAClB,KAAK,WAAW;GACd,MAAM,QAAQ,QAAQ;GACtB,SAAS,QAAQ,WAAW;EAC9B;EACA,IAAI,QAAQ,iBAAiB,QAC3B,KAAK,SAAS,QAAQ;CAE1B;CAEA,IAAI,QAAuB;EACzB,OAAO,KAAK;CACd;;;;;;;;;CAUA,IAAI,UAA0C;EAC5C,MAAM,gBACJ,OAAO,aAAa,aACf,SAAiD,KAAK,MAAM,IAC7D;EAEN,KAAK,SAAS;EACd,KAAK,cAAc,IAAI,YAAe,UAAU,EAAE,QAAQ,cAAc,CAAC,CAAC;EAC1E,IAAI,KAAK,SAAS,MAChB,KAAK,WAAW,KAAK,GAAG,KAAK,KAAK,QAAQ,aAAa;CAE3D;;;;;CAMA,QAAc;EACZ,IAAI,KAAK,SAAS,SAAS;GACzB,MAAM,QAAQ,KAAK,WAAW,UAC5B,GAAG,KAAK,KAAK,SACZ,SAAS;IACR,KAAK,SAAS;IACd,KAAK,cAAc,IAAI,YAAe,UAAU,EAAE,QAAQ,KAAK,CAAC,CAAC;GACnE,CACF;GACA,KAAK,eAAe,KAAK,KAAK;EAChC;EAEA,IAAI,KAAK,SAAS,MAAM;GAEtB,MAAM,QAAQ,KAAK,WAAW,UAC5B,GAAG,KAAK,KAAK,QACZ,GAAG,mBAAmB;IACrB,IAAI,mBAAmB,KAAK,WAAW,UAAU;IACjD,IAAI,KAAK,WAAW,QAAW;IAC/B,KAAK,WAAW,KAAK,GAAG,KAAK,KAAK,QAAQ,KAAK,MAAM;GACvD,CACF;GACA,KAAK,eAAe,KAAK,KAAK;EAChC;EAGA,IAAI,KAAK,SAAS,WAAW,KAAK,WAAW,QAC3C,KAAK,WAAW,KAAK,GAAG,KAAK,KAAK,KAAK;CAE3C;;CAGA,OAAa;EACX,KAAK,MAAM,SAAS,KAAK,gBAAgB,MAAM;EAC/C,KAAK,eAAe,SAAS;CAC/B;;CAGA,mBAAyB;EACvB,IAAI,KAAK,WAAW,QAClB,KAAK,WAAW,KAAK,GAAG,KAAK,KAAK,QAAQ,KAAK,MAAM;CAEzD;AACF"}
|
|
@@ -6,6 +6,14 @@ type CrossFrameStateOptions = {
|
|
|
6
6
|
/** Whether to listen for state updates from other frames. Default: true */
|
|
7
7
|
receive?: boolean;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* A new value, or an updater deriving it from the previous one — mirroring
|
|
11
|
+
* React's `SetStateAction` so callers can use the familiar `set(prev => …)` form.
|
|
12
|
+
*
|
|
13
|
+
* Updaters are resolved locally before broadcasting: a function can never be
|
|
14
|
+
* structured-cloned by `postMessage`, so only the resolved value crosses frames.
|
|
15
|
+
*/
|
|
16
|
+
type CrossFrameStateAction<T> = T | ((previousValue: T | undefined) => T);
|
|
9
17
|
/**
|
|
10
18
|
* CrossFrameStateManager synchronizes a single named value across frames using
|
|
11
19
|
* the postMessage API via CrossFrameMessenger.
|
|
@@ -28,8 +36,15 @@ declare class CrossFrameStateManager<T> extends EventTarget {
|
|
|
28
36
|
initialValue?: T;
|
|
29
37
|
});
|
|
30
38
|
get value(): T | undefined;
|
|
31
|
-
/**
|
|
32
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Update the value locally and broadcast it to other frames if emit is enabled.
|
|
41
|
+
*
|
|
42
|
+
* Accepts either a concrete value or an updater function. An updater is applied
|
|
43
|
+
* against the current value first, so the function itself is never handed to
|
|
44
|
+
* `postMessage` — doing so throws `DataCloneError`, since functions are not
|
|
45
|
+
* structured-cloneable.
|
|
46
|
+
*/
|
|
47
|
+
set(newValue: CrossFrameStateAction<T>): void;
|
|
33
48
|
/**
|
|
34
49
|
* Start listening for incoming state updates and responding to /get requests.
|
|
35
50
|
* If receive=true and no initial value is set, sends a /get to request the current value.
|
|
@@ -41,5 +56,5 @@ declare class CrossFrameStateManager<T> extends EventTarget {
|
|
|
41
56
|
postCurrentValue(): void;
|
|
42
57
|
}
|
|
43
58
|
//#endregion
|
|
44
|
-
export { CrossFrameStateManager, CrossFrameStateOptions };
|
|
59
|
+
export { CrossFrameStateAction, CrossFrameStateManager, CrossFrameStateOptions };
|
|
45
60
|
//# sourceMappingURL=CrossFrameStateManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrossFrameStateManager.d.ts","names":[],"sources":["../../../src/core/CrossFrameStateManager.ts"],"mappings":";;KAEY;;EAEV;;EAEA
|
|
1
|
+
{"version":3,"file":"CrossFrameStateManager.d.ts","names":[],"sources":["../../../src/core/CrossFrameStateManager.ts"],"mappings":";;KAEY;;EAEV;;EAEA;;;;;;;;;KAUU,sBAAsB,KAC9B,MACE,eAAe,kBAAkB;;;;;;;;;;;;;cAc1B,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,5 +1,5 @@
|
|
|
1
1
|
import { CrossFrameMessenger, MessagePayload, MessengerConfig } from "./CrossFrameMessenger.js";
|
|
2
|
-
import { CrossFrameStateManager, CrossFrameStateOptions } from "./CrossFrameStateManager.js";
|
|
2
|
+
import { CrossFrameStateAction, CrossFrameStateManager, CrossFrameStateOptions } from "./CrossFrameStateManager.js";
|
|
3
3
|
import { DictionaryContent, EditorStateManager, EditorStateManagerConfig, FileContent } from "./EditorStateManager.js";
|
|
4
4
|
import { IframeClickInterceptor } from "./IframeClickInterceptor.js";
|
|
5
5
|
import { UrlStateManager } from "./UrlStateManager.js";
|
|
@@ -7,4 +7,4 @@ import { getGlobalEditedContent, setGlobalEditedContent, subscribeToGlobalEdited
|
|
|
7
7
|
import { getGlobalFocusedContent, setGlobalFocusedContent, subscribeToGlobalFocusedContent } from "./focusedContentBus.js";
|
|
8
8
|
import { getGlobalEditorManager, onGlobalEditorManagerChange, setGlobalEditorManager } from "./globalManager.js";
|
|
9
9
|
import { buildClientMessengerConfig, initEditorClient, stopEditorClient } from "./initEditorClient.js";
|
|
10
|
-
export { CrossFrameMessenger, CrossFrameStateManager, CrossFrameStateOptions, DictionaryContent, EditorStateManager, EditorStateManagerConfig, FileContent, IframeClickInterceptor, MessagePayload, MessengerConfig, UrlStateManager, buildClientMessengerConfig, getGlobalEditedContent, getGlobalEditorManager, getGlobalFocusedContent, initEditorClient, onGlobalEditorManagerChange, setGlobalEditedContent, setGlobalEditorManager, setGlobalFocusedContent, stopEditorClient, subscribeToGlobalEditedContent, subscribeToGlobalFocusedContent };
|
|
10
|
+
export { CrossFrameMessenger, CrossFrameStateAction, CrossFrameStateManager, CrossFrameStateOptions, DictionaryContent, EditorStateManager, EditorStateManagerConfig, FileContent, IframeClickInterceptor, MessagePayload, MessengerConfig, UrlStateManager, buildClientMessengerConfig, getGlobalEditedContent, getGlobalEditorManager, getGlobalFocusedContent, initEditorClient, onGlobalEditorManagerChange, setGlobalEditedContent, setGlobalEditorManager, setGlobalFocusedContent, stopEditorClient, subscribeToGlobalEditedContent, subscribeToGlobalFocusedContent };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { IntlayerEditedContentElement, defineIntlayerEditedContent } from "./com
|
|
|
5
5
|
import { IntlayerEditorElement, defineIntlayerEditorElement } from "./components/IntlayerEditor.js";
|
|
6
6
|
import "./components/index.js";
|
|
7
7
|
import { CrossFrameMessenger, MessagePayload, MessengerConfig } from "./core/CrossFrameMessenger.js";
|
|
8
|
-
import { CrossFrameStateManager, CrossFrameStateOptions } from "./core/CrossFrameStateManager.js";
|
|
8
|
+
import { CrossFrameStateAction, CrossFrameStateManager, CrossFrameStateOptions } from "./core/CrossFrameStateManager.js";
|
|
9
9
|
import { DictionaryContent, EditorStateManager, EditorStateManagerConfig, FileContent } from "./core/EditorStateManager.js";
|
|
10
10
|
import { IframeClickInterceptor } from "./core/IframeClickInterceptor.js";
|
|
11
11
|
import { UrlStateManager } from "./core/UrlStateManager.js";
|
|
@@ -16,4 +16,4 @@ import { buildClientMessengerConfig, initEditorClient, stopEditorClient } from "
|
|
|
16
16
|
import "./core/index.js";
|
|
17
17
|
import { mergeIframeClick } from "./mergeIframeClick.js";
|
|
18
18
|
import { MessageKey } from "./messageKey.js";
|
|
19
|
-
export { CrossFrameMessenger, CrossFrameStateManager, CrossFrameStateOptions, DictionaryContent, EditorStateManager, EditorStateManagerConfig, FileContent, IframeClickInterceptor, IntlayerContentSelectorElement, IntlayerContentSelectorWrapperElement, IntlayerEditedContentElement, IntlayerEditorElement, MessageKey, MessagePayload, MessengerConfig, UrlStateManager, buildClientMessengerConfig, compareUrls, defineIntlayerContentSelectorWrapper, defineIntlayerEditedContent, defineIntlayerEditorElement, defineIntlayerElements, getGlobalEditedContent, getGlobalEditorManager, getGlobalFocusedContent, initEditorClient, mergeIframeClick, onGlobalEditorManagerChange, setGlobalEditedContent, setGlobalEditorManager, setGlobalFocusedContent, stopEditorClient, subscribeToGlobalEditedContent, subscribeToGlobalFocusedContent };
|
|
19
|
+
export { CrossFrameMessenger, CrossFrameStateAction, CrossFrameStateManager, CrossFrameStateOptions, DictionaryContent, EditorStateManager, EditorStateManagerConfig, FileContent, IframeClickInterceptor, IntlayerContentSelectorElement, IntlayerContentSelectorWrapperElement, IntlayerEditedContentElement, IntlayerEditorElement, MessageKey, MessagePayload, MessengerConfig, UrlStateManager, buildClientMessengerConfig, compareUrls, defineIntlayerContentSelectorWrapper, defineIntlayerEditedContent, defineIntlayerEditorElement, defineIntlayerElements, getGlobalEditedContent, getGlobalEditorManager, getGlobalFocusedContent, initEditorClient, mergeIframeClick, onGlobalEditorManagerChange, setGlobalEditedContent, setGlobalEditorManager, setGlobalFocusedContent, stopEditorClient, subscribeToGlobalEditedContent, subscribeToGlobalFocusedContent };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/editor",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Provides the utilities to interface the application with the Intlayer editor and manipulate dictionaries",
|
|
6
6
|
"keywords": [
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@intlayer/config": "9.
|
|
79
|
-
"@intlayer/core": "9.
|
|
80
|
-
"@intlayer/types": "9.
|
|
81
|
-
"@intlayer/unmerged-dictionaries-entry": "9.
|
|
78
|
+
"@intlayer/config": "9.3.0",
|
|
79
|
+
"@intlayer/core": "9.3.0",
|
|
80
|
+
"@intlayer/types": "9.3.0",
|
|
81
|
+
"@intlayer/unmerged-dictionaries-entry": "9.3.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@types/node": "26.
|
|
84
|
+
"@types/node": "26.2.0",
|
|
85
85
|
"@utils/ts-config": "1.0.4",
|
|
86
86
|
"@utils/ts-config-types": "1.0.4",
|
|
87
87
|
"@utils/tsdown-config": "1.0.4",
|