@matreshka/bff 0.25.3 → 0.27.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/components/aliases/button.js +1 -1
- package/dist/components/aliases/column.js +1 -1
- package/dist/components/aliases/row.js +1 -1
- package/dist/components/app.d.ts +1 -1
- package/dist/components/app.js +1 -1
- package/dist/components/board.d.ts +4 -4
- package/dist/components/board.js +6 -6
- package/dist/components/boot.js +1 -1
- package/dist/components/camera.d.ts +5 -5
- package/dist/components/camera.js +3 -3
- package/dist/components/charts/chart.d.ts +3 -3
- package/dist/components/charts/chart.js +2 -2
- package/dist/components/component.d.ts +10 -10
- package/dist/components/component.js +1 -1
- package/dist/components/container.d.ts +2 -2
- package/dist/components/container.js +1 -1
- package/dist/components/dialog.d.ts +4 -4
- package/dist/components/dialog.js +2 -2
- package/dist/components/entry-component.d.ts +1 -1
- package/dist/components/entry-component.js +1 -1
- package/dist/components/enum/password-input-kind.d.ts +1 -1
- package/dist/components/enum/password-input-kind.js +1 -1
- package/dist/components/enum/popover-position-area.d.ts +1 -1
- package/dist/components/enum/popover-position-area.js +1 -1
- package/dist/components/enum/scroll-to-position.d.ts +1 -1
- package/dist/components/enum/scroll-to-position.js +1 -1
- package/dist/components/enum/text-input-kind.d.ts +1 -1
- package/dist/components/enum/text-input-kind.js +1 -1
- package/dist/components/enum/textarea-resize.d.ts +1 -1
- package/dist/components/enum/textarea-resize.js +1 -1
- package/dist/components/file-upload-area.d.ts +2 -2
- package/dist/components/file-upload-area.js +1 -1
- package/dist/components/for-each.d.ts +2 -2
- package/dist/components/for-each.js +2 -2
- package/dist/components/form.d.ts +2 -2
- package/dist/components/form.js +1 -1
- package/dist/components/grid.d.ts +6 -6
- package/dist/components/grid.js +2 -2
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/inputs/number-input.d.ts +1 -1
- package/dist/components/inputs/number-input.js +1 -1
- package/dist/components/inputs/password-input.d.ts +2 -2
- package/dist/components/inputs/password-input.js +1 -1
- package/dist/components/inputs/text-editor.d.ts +1 -1
- package/dist/components/inputs/text-editor.js +15 -15
- package/dist/components/inputs/text-input.d.ts +2 -2
- package/dist/components/inputs/text-input.js +1 -1
- package/dist/components/inputs/textarea.d.ts +2 -2
- package/dist/components/inputs/textarea.js +1 -1
- package/dist/components/item-list/flatten-nested-items.d.ts +1 -1
- package/dist/components/item-list/item-list-host.d.ts +1 -1
- package/dist/components/item-list/item-list.d.ts +1 -1
- package/dist/components/item-list/nested-items-host-support.js +1 -1
- package/dist/components/line.d.ts +1 -1
- package/dist/components/line.js +1 -1
- package/dist/components/map.d.ts +6 -6
- package/dist/components/map.js +6 -6
- package/dist/components/outputs/currency.d.ts +1 -1
- package/dist/components/outputs/currency.js +1 -1
- package/dist/components/outputs/datetime.d.ts +1 -1
- package/dist/components/outputs/datetime.js +1 -1
- package/dist/components/outputs/icon.d.ts +1 -1
- package/dist/components/outputs/icon.js +1 -1
- package/dist/components/outputs/iframe.d.ts +3 -3
- package/dist/components/outputs/iframe.js +2 -2
- package/dist/components/outputs/image.d.ts +6 -6
- package/dist/components/outputs/image.js +4 -4
- package/dist/components/outputs/number.d.ts +1 -1
- package/dist/components/outputs/number.js +1 -1
- package/dist/components/outputs/progress-bar.d.ts +1 -1
- package/dist/components/outputs/progress-bar.js +1 -1
- package/dist/components/outputs/progress-spinner.d.ts +1 -1
- package/dist/components/outputs/progress-spinner.js +1 -1
- package/dist/components/outputs/qr-code.d.ts +1 -1
- package/dist/components/outputs/qr-code.js +1 -1
- package/dist/components/outputs/text.d.ts +5 -5
- package/dist/components/outputs/text.js +7 -7
- package/dist/components/outputs/vector.d.ts +7 -7
- package/dist/components/outputs/vector.js +6 -6
- package/dist/components/page.d.ts +3 -3
- package/dist/components/page.js +1 -1
- package/dist/components/popover.d.ts +2 -2
- package/dist/components/popover.js +2 -2
- package/dist/components/stack.d.ts +25 -25
- package/dist/components/stack.js +10 -10
- package/dist/components/types/container-overlay.d.ts +1 -1
- package/dist/components/utils/targeted-client-component-action.d.ts +1 -1
- package/dist/components/webmcp/web-mcp-tool.d.ts +3 -3
- package/dist/components/webmcp/web-mcp-tool.js +3 -3
- package/dist/core/actions/action.d.ts +1 -1
- package/dist/core/actions/animate-component.d.ts +6 -6
- package/dist/core/actions/animate-component.js +3 -3
- package/dist/core/actions/component-local-actions.d.ts +2 -2
- package/dist/core/actions/set-context.d.ts +1 -1
- package/dist/core/boot.js +1 -1
- package/dist/core/client-storage.js +2 -2
- package/dist/core/client.d.ts +9 -8
- package/dist/core/client.js +10 -9
- package/dist/core/conditions/condition-group.d.ts +1 -1
- package/dist/core/conditions/condition-group.js +2 -2
- package/dist/core/conditions/condition-operand.d.ts +2 -2
- package/dist/core/conditions/condition.d.ts +2 -2
- package/dist/core/conditions/context-array-includes.js +1 -1
- package/dist/core/conditions/context-array-length.d.ts +1 -1
- package/dist/core/conditions/context-array-length.js +2 -2
- package/dist/core/conditions/context-value-defined.d.ts +9 -3
- package/dist/core/conditions/context-value-defined.js +7 -1
- package/dist/core/conditions/context-value-equal.js +1 -1
- package/dist/core/conditions/context-value-in.js +1 -1
- package/dist/core/conditions/context-value-not-equal.js +1 -1
- package/dist/core/conditions/context-value-undefined.d.ts +9 -3
- package/dist/core/conditions/context-value-undefined.js +7 -1
- package/dist/core/conditions/desktop-device.js +1 -1
- package/dist/core/conditions/mobile-device.js +1 -1
- package/dist/core/conditions/not-desktop-device.js +1 -1
- package/dist/core/conditions/not-mobile-device.js +1 -1
- package/dist/core/conditions/not-tablet-device.js +1 -1
- package/dist/core/conditions/tablet-device.js +1 -1
- package/dist/core/context/context-ref.d.ts +1 -1
- package/dist/core/context/context.d.ts +1 -1
- package/dist/core/context/context.js +5 -5
- package/dist/core/gateway-connection.js +8 -8
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/core/local/index.d.ts +2 -2
- package/dist/core/local/index.js +1 -1
- package/dist/core/matreshka.js +2 -2
- package/dist/core/types/client-settings.d.ts +3 -3
- package/dist/core/types/componentable.d.ts +2 -2
- package/dist/core/types/pageable.d.ts +1 -1
- package/dist/core/utils/color-roles-to-ids.d.ts +2 -2
- package/dist/core/utils/color-token-id.d.ts +1 -1
- package/dist/core/utils/replace-context-keys.d.ts +3 -3
- package/dist/core/utils/replace-context-keys.js +6 -67
- package/dist/core/utils/serialize-client-settings-colors-for-handshake.d.ts +2 -2
- package/dist/core/utils/serialize-component-tree.d.ts +2 -2
- package/dist/core/utils/targeted-client-action.d.ts +1 -1
- package/dist/core/utils/targeted-client-action.js +5 -4
- package/dist/platforms/browser-platform.js +13 -13
- package/dist/platforms/max-mini-app-platform.js +2 -2
- package/dist/platforms/mobile-platform.d.ts +1 -1
- package/dist/platforms/mobile-platform.js +21 -21
- package/dist/platforms/platform.d.ts +1 -1
- package/dist/platforms/platform.js +11 -11
- package/dist/platforms/telegram-mini-app-platform.js +7 -7
- package/dist/platforms/utils/client-back-platform-action.js +1 -1
- package/dist/platforms/utils/client-navigate-platform-action.js +1 -1
- package/dist/platforms/utils/client-platform.js +1 -1
- package/dist/platforms/utils/client-reload-platform-action.js +1 -1
- package/dist/platforms/utils/client-route-page-wait.d.ts +1 -1
- package/dist/platforms/utils/client-route-page-wait.js +2 -2
- package/dist/platforms/utils/mobile-ble-services.d.ts +1 -1
- package/dist/platforms/utils/targeted-client-platform-action.d.ts +2 -2
- package/dist/platforms/utils/targeted-client-platform-stream.d.ts +2 -2
- package/dist/platforms/utils/targeted-client-platform-stream.js +5 -4
- package/package.json +4 -2
- package/dist/core/utils/hex-to-hsl.d.ts +0 -14
- package/dist/core/utils/hex-to-hsl.js +0 -49
- package/dist/core/utils/merge-deep.d.ts +0 -8
- package/dist/core/utils/merge-deep.js +0 -39
- package/dist/core/utils/parse-context-path.d.ts +0 -4
- package/dist/core/utils/parse-context-path.js +0 -16
- package/dist/core/utils/set-object-property.d.ts +0 -2
- package/dist/core/utils/set-object-property.js +0 -29
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ScrollToPosition } from "@matreshka/
|
|
2
|
-
import type { BoardPoint } from "@matreshka/
|
|
1
|
+
import { ScrollToPosition } from "@matreshka/client-bff-protocol/enums/scroll-to-position";
|
|
2
|
+
import type { BoardPoint } from "@matreshka/client-bff-protocol/types/board-config";
|
|
3
3
|
import type { VideoInputDevice } from "../../platforms/platform";
|
|
4
4
|
import type { Componentable } from "../types/componentable";
|
|
5
5
|
import type { ActionConfig } from "./action";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JsonObject } from "@matreshka/
|
|
1
|
+
import { JsonObject } from "@matreshka/client-bff-protocol/types/json";
|
|
2
2
|
import { Context, ContextPathPatch } from "../context/context";
|
|
3
3
|
import { ContextValueOrRef } from "../types/context-value-ref";
|
|
4
4
|
import { ActionConfig } from "./action";
|
package/dist/core/boot.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.bootCore = void 0;
|
|
4
|
-
const register_messages_1 = require("@matreshka/
|
|
4
|
+
const register_messages_1 = require("@matreshka/client-bff-protocol/messages/client-to-bff/register-messages");
|
|
5
5
|
const bootCore = (_matreshka) => {
|
|
6
6
|
(0, register_messages_1.registerClientToBffMessages)(); // Чтобы парсить сообщения от клиента
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ClientStorage = void 0;
|
|
4
|
-
const index_1 = require("@matreshka/
|
|
4
|
+
const index_1 = require("@matreshka/client-bff-protocol/messages/bff-to-client/app/index");
|
|
5
5
|
const fetch_from_object_1 = require("@matreshka/shared/utils/fetch-from-object");
|
|
6
|
-
const set_object_property_1 = require("
|
|
6
|
+
const set_object_property_1 = require("@matreshka/shared/utils/set-object-property");
|
|
7
7
|
/**
|
|
8
8
|
* Доступ к клиентскому key-value хранилищу из {@link ClientState.storage}.
|
|
9
9
|
*/
|
package/dist/core/client.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BrowserEngine } from "@matreshka/
|
|
2
|
-
import { BrowserName } from "@matreshka/
|
|
3
|
-
import { DeviceType } from "@matreshka/
|
|
4
|
-
import { OsName } from "@matreshka/
|
|
5
|
-
import { PlatformId } from "@matreshka/
|
|
6
|
-
import { AnyBffToClientMessage, BffToClientMessage } from "@matreshka/
|
|
7
|
-
import { AnyClientToBffMessage } from "@matreshka/
|
|
8
|
-
import { ClientState } from "@matreshka/
|
|
1
|
+
import { BrowserEngine } from "@matreshka/client-bff-protocol/enums/browser-engine";
|
|
2
|
+
import { BrowserName } from "@matreshka/client-bff-protocol/enums/browser-name";
|
|
3
|
+
import { DeviceType } from "@matreshka/client-bff-protocol/enums/device-type";
|
|
4
|
+
import { OsName } from "@matreshka/client-bff-protocol/enums/os-name";
|
|
5
|
+
import { PlatformId } from "@matreshka/client-bff-protocol/enums/platform-id";
|
|
6
|
+
import { AnyBffToClientMessage, BffToClientMessage } from "@matreshka/client-bff-protocol/messages/bff-to-client/bff-to-client-message";
|
|
7
|
+
import { AnyClientToBffMessage } from "@matreshka/client-bff-protocol/messages/client-to-bff/client-to-bff-message";
|
|
8
|
+
import { ClientState } from "@matreshka/client-bff-protocol/types/client-state";
|
|
9
9
|
import { BehaviorSubject, Observable, Subject } from "rxjs";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { Page } from "../components";
|
|
@@ -30,6 +30,7 @@ import { type ComponentTreeNode } from "./types/component-tree-node";
|
|
|
30
30
|
*/
|
|
31
31
|
export declare const ClientHandshakePayloadSchema: z.ZodObject<{
|
|
32
32
|
applicationId: z.ZodString;
|
|
33
|
+
protocolVersion: z.ZodString;
|
|
33
34
|
}, z.core.$strict>;
|
|
34
35
|
export declare const ClientStateSchema: z.ZodObject<{
|
|
35
36
|
route: z.ZodObject<{
|
package/dist/core/client.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Client = exports.ClientStateSchema = exports.ClientHandshakePayloadSchema = void 0;
|
|
4
|
+
const browser_engine_1 = require("@matreshka/client-bff-protocol/enums/browser-engine");
|
|
5
|
+
const browser_name_1 = require("@matreshka/client-bff-protocol/enums/browser-name");
|
|
6
|
+
const platform_id_1 = require("@matreshka/client-bff-protocol/enums/platform-id");
|
|
7
|
+
const message_received_message_1 = require("@matreshka/client-bff-protocol/messages/bff-to-client/message-received-message");
|
|
8
|
+
const app_client_state_message_1 = require("@matreshka/client-bff-protocol/messages/client-to-bff/app/app-client-state-message");
|
|
9
|
+
const handshake_message_1 = require("@matreshka/client-bff-protocol/messages/client-to-bff/app/handshake-message");
|
|
10
|
+
const message_received_message_2 = require("@matreshka/client-bff-protocol/messages/client-to-bff/message-received-message");
|
|
11
|
+
const parse_client_to_bff_message_1 = require("@matreshka/client-bff-protocol/messages/client-to-bff/parse-client-to-bff-message");
|
|
12
|
+
const reliable_delivery_1 = require("@matreshka/client-bff-protocol/messages/reliable-delivery");
|
|
4
13
|
const shared_1 = require("@matreshka/shared");
|
|
5
|
-
const browser_engine_1 = require("@matreshka/shared/enums/browser-engine");
|
|
6
|
-
const browser_name_1 = require("@matreshka/shared/enums/browser-name");
|
|
7
|
-
const platform_id_1 = require("@matreshka/shared/enums/platform-id");
|
|
8
|
-
const message_received_message_1 = require("@matreshka/shared/messages/bff-to-client/message-received-message");
|
|
9
|
-
const app_client_state_message_1 = require("@matreshka/shared/messages/client-to-bff/app/app-client-state-message");
|
|
10
|
-
const handshake_message_1 = require("@matreshka/shared/messages/client-to-bff/app/handshake-message");
|
|
11
|
-
const message_received_message_2 = require("@matreshka/shared/messages/client-to-bff/message-received-message");
|
|
12
|
-
const parse_client_to_bff_message_1 = require("@matreshka/shared/messages/client-to-bff/parse-client-to-bff-message");
|
|
13
|
-
const reliable_delivery_1 = require("@matreshka/shared/messages/reliable-delivery");
|
|
14
14
|
const rxjs_1 = require("rxjs");
|
|
15
15
|
const zod_1 = require("zod");
|
|
16
16
|
const app_1 = require("../components/app");
|
|
@@ -38,6 +38,7 @@ const resolveDeviceTypeFromUserAgent = shared_1.getDeviceTypeFromUserAgent;
|
|
|
38
38
|
*/
|
|
39
39
|
exports.ClientHandshakePayloadSchema = zod_1.z.strictObject({
|
|
40
40
|
applicationId: zod_1.z.string(),
|
|
41
|
+
protocolVersion: zod_1.z.string(),
|
|
41
42
|
});
|
|
42
43
|
exports.ClientStateSchema = zod_1.z.strictObject({
|
|
43
44
|
route: zod_1.z.strictObject({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConditionGroupOperator } from "@matreshka/
|
|
1
|
+
import { ConditionGroupOperator } from "@matreshka/client-bff-protocol/enums/condition-group-operator";
|
|
2
2
|
import { Condition } from "./condition";
|
|
3
3
|
/**
|
|
4
4
|
* Составное условие: все (`and`) или хотя бы одно (`or`) из вложенных условий.
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ConditionGroup = void 0;
|
|
4
4
|
exports.conditionAny = conditionAny;
|
|
5
5
|
exports.conditionAll = conditionAll;
|
|
6
|
-
const condition_group_operator_1 = require("@matreshka/
|
|
7
|
-
const condition_type_1 = require("@matreshka/
|
|
6
|
+
const condition_group_operator_1 = require("@matreshka/client-bff-protocol/enums/condition-group-operator");
|
|
7
|
+
const condition_type_1 = require("@matreshka/client-bff-protocol/enums/condition-type");
|
|
8
8
|
const condition_1 = require("./condition");
|
|
9
9
|
/**
|
|
10
10
|
* Составное условие: все (`and`) или хотя бы одно (`or`) из вложенных условий.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Json, JsonObject, JsonPrimitive } from "@matreshka/
|
|
2
|
-
import type { SerializedOperand } from "@matreshka/
|
|
1
|
+
import type { Json, JsonObject, JsonPrimitive } from "@matreshka/client-bff-protocol/types/json";
|
|
2
|
+
import type { SerializedOperand } from "@matreshka/client-bff-protocol/types/serialized-operand";
|
|
3
3
|
import { Paths, PathValue } from "ts-essentials";
|
|
4
4
|
import { ContextRef, ContextRefValue } from "../context/context-ref";
|
|
5
5
|
import type { CompatibleContextValueRef } from "../types/context-value-ref";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConditionType } from "@matreshka/
|
|
2
|
-
import type { Condition as SerializedCondition } from "@matreshka/
|
|
1
|
+
import { ConditionType } from "@matreshka/client-bff-protocol/enums/condition-type";
|
|
2
|
+
import type { Condition as SerializedCondition } from "@matreshka/client-bff-protocol/types/condition";
|
|
3
3
|
/**
|
|
4
4
|
* Абстрактный класс, представляющий условие с типом и дополнительными данными.
|
|
5
5
|
*
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ContextArrayNotIncludes = exports.ContextArrayIncludes = void 0;
|
|
4
4
|
exports.contextArrayIncludes = contextArrayIncludes;
|
|
5
5
|
exports.contextArrayNotIncludes = contextArrayNotIncludes;
|
|
6
|
-
const condition_type_1 = require("@matreshka/
|
|
6
|
+
const condition_type_1 = require("@matreshka/client-bff-protocol/enums/condition-type");
|
|
7
7
|
const condition_1 = require("./condition");
|
|
8
8
|
const condition_operand_1 = require("./condition-operand");
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ArrayLengthCompare } from "@matreshka/
|
|
1
|
+
import { ArrayLengthCompare } from "@matreshka/client-bff-protocol/enums/array-length-compare";
|
|
2
2
|
import { ContextRef } from "../context/context-ref";
|
|
3
3
|
import { Condition } from "./condition";
|
|
4
4
|
import { CompatibleArrayContextRef, ConditionLengthOperand } from "./condition-operand";
|
|
@@ -8,8 +8,8 @@ exports.contextArrayLengthGreaterThan = contextArrayLengthGreaterThan;
|
|
|
8
8
|
exports.contextArrayLengthGreaterOrEqual = contextArrayLengthGreaterOrEqual;
|
|
9
9
|
exports.contextValueEmpty = contextValueEmpty;
|
|
10
10
|
exports.contextValueNotEmpty = contextValueNotEmpty;
|
|
11
|
-
const array_length_compare_1 = require("@matreshka/
|
|
12
|
-
const condition_type_1 = require("@matreshka/
|
|
11
|
+
const array_length_compare_1 = require("@matreshka/client-bff-protocol/enums/array-length-compare");
|
|
12
|
+
const condition_type_1 = require("@matreshka/client-bff-protocol/enums/condition-type");
|
|
13
13
|
const condition_1 = require("./condition");
|
|
14
14
|
const condition_operand_1 = require("./condition-operand");
|
|
15
15
|
/**
|
|
@@ -3,10 +3,16 @@ import { Condition } from "./condition";
|
|
|
3
3
|
/**
|
|
4
4
|
* Условие, означающее, что в контексте определено значение по заданному ключу.
|
|
5
5
|
*
|
|
6
|
+
* Параметр — `R extends ContextRef<any, any>`. Голый `ContextRef` раскрывается
|
|
7
|
+
* в `ContextRef<JsonObject, string>`. Метод `local.set` принимает значение по пути,
|
|
8
|
+
* поэтому ссылка инвариантна: при `strictFunctionTypes` конкретный ref страницы
|
|
9
|
+
* в этот параметр не входит. `any` в ограничении выводит `R` из аргумента
|
|
10
|
+
* и сохраняет его тип. Тот же приём у {@link contextValueEqual} и {@link contextValueIn}.
|
|
11
|
+
*
|
|
6
12
|
* @internal Используйте {@link contextValueDefined} / {@link when.defined}.
|
|
7
13
|
*/
|
|
8
|
-
export declare class ContextValueDefined extends Condition {
|
|
9
|
-
constructor(ref:
|
|
14
|
+
export declare class ContextValueDefined<R extends ContextRef<any, any>> extends Condition {
|
|
15
|
+
constructor(ref: R);
|
|
10
16
|
}
|
|
11
17
|
/** Функциональная форма {@link ContextValueDefined}. */
|
|
12
|
-
export declare function contextValueDefined(ref:
|
|
18
|
+
export declare function contextValueDefined<R extends ContextRef<any, any>>(ref: R): ContextValueDefined<R>;
|
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ContextValueDefined = void 0;
|
|
4
4
|
exports.contextValueDefined = contextValueDefined;
|
|
5
|
-
const condition_type_1 = require("@matreshka/
|
|
5
|
+
const condition_type_1 = require("@matreshka/client-bff-protocol/enums/condition-type");
|
|
6
6
|
const condition_1 = require("./condition");
|
|
7
7
|
/**
|
|
8
8
|
* Условие, означающее, что в контексте определено значение по заданному ключу.
|
|
9
9
|
*
|
|
10
|
+
* Параметр — `R extends ContextRef<any, any>`. Голый `ContextRef` раскрывается
|
|
11
|
+
* в `ContextRef<JsonObject, string>`. Метод `local.set` принимает значение по пути,
|
|
12
|
+
* поэтому ссылка инвариантна: при `strictFunctionTypes` конкретный ref страницы
|
|
13
|
+
* в этот параметр не входит. `any` в ограничении выводит `R` из аргумента
|
|
14
|
+
* и сохраняет его тип. Тот же приём у {@link contextValueEqual} и {@link contextValueIn}.
|
|
15
|
+
*
|
|
10
16
|
* @internal Используйте {@link contextValueDefined} / {@link when.defined}.
|
|
11
17
|
*/
|
|
12
18
|
class ContextValueDefined extends condition_1.Condition {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ContextValueEqual = void 0;
|
|
4
4
|
exports.contextValueEqual = contextValueEqual;
|
|
5
|
-
const condition_type_1 = require("@matreshka/
|
|
5
|
+
const condition_type_1 = require("@matreshka/client-bff-protocol/enums/condition-type");
|
|
6
6
|
const condition_1 = require("./condition");
|
|
7
7
|
const condition_operand_1 = require("./condition-operand");
|
|
8
8
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ContextValueIn = void 0;
|
|
4
4
|
exports.contextValueIn = contextValueIn;
|
|
5
|
-
const condition_type_1 = require("@matreshka/
|
|
5
|
+
const condition_type_1 = require("@matreshka/client-bff-protocol/enums/condition-type");
|
|
6
6
|
const condition_1 = require("./condition");
|
|
7
7
|
const condition_operand_1 = require("./condition-operand");
|
|
8
8
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ContextValueNotEqual = void 0;
|
|
4
4
|
exports.contextValueNotEqual = contextValueNotEqual;
|
|
5
|
-
const condition_type_1 = require("@matreshka/
|
|
5
|
+
const condition_type_1 = require("@matreshka/client-bff-protocol/enums/condition-type");
|
|
6
6
|
const condition_1 = require("./condition");
|
|
7
7
|
const condition_operand_1 = require("./condition-operand");
|
|
8
8
|
/**
|
|
@@ -3,10 +3,16 @@ import { Condition } from "./condition";
|
|
|
3
3
|
/**
|
|
4
4
|
* Условие, означающее, что значение в контексте по заданному ключу не определено.
|
|
5
5
|
*
|
|
6
|
+
* Параметр — `R extends ContextRef<any, any>`. Голый `ContextRef` раскрывается
|
|
7
|
+
* в `ContextRef<JsonObject, string>`. Метод `local.set` принимает значение по пути,
|
|
8
|
+
* поэтому ссылка инвариантна: при `strictFunctionTypes` конкретный ref страницы
|
|
9
|
+
* в этот параметр не входит. `any` в ограничении выводит `R` из аргумента
|
|
10
|
+
* и сохраняет его тип. Тот же приём у {@link contextValueEqual} и {@link contextValueIn}.
|
|
11
|
+
*
|
|
6
12
|
* @internal Используйте {@link contextValueUndefined} / {@link when.notDefined}.
|
|
7
13
|
*/
|
|
8
|
-
export declare class ContextValueUndefined extends Condition {
|
|
9
|
-
constructor(ref:
|
|
14
|
+
export declare class ContextValueUndefined<R extends ContextRef<any, any>> extends Condition {
|
|
15
|
+
constructor(ref: R);
|
|
10
16
|
}
|
|
11
17
|
/** Функциональная форма {@link ContextValueUndefined}. */
|
|
12
|
-
export declare function contextValueUndefined(ref:
|
|
18
|
+
export declare function contextValueUndefined<R extends ContextRef<any, any>>(ref: R): ContextValueUndefined<R>;
|
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ContextValueUndefined = void 0;
|
|
4
4
|
exports.contextValueUndefined = contextValueUndefined;
|
|
5
|
-
const condition_type_1 = require("@matreshka/
|
|
5
|
+
const condition_type_1 = require("@matreshka/client-bff-protocol/enums/condition-type");
|
|
6
6
|
const condition_1 = require("./condition");
|
|
7
7
|
/**
|
|
8
8
|
* Условие, означающее, что значение в контексте по заданному ключу не определено.
|
|
9
9
|
*
|
|
10
|
+
* Параметр — `R extends ContextRef<any, any>`. Голый `ContextRef` раскрывается
|
|
11
|
+
* в `ContextRef<JsonObject, string>`. Метод `local.set` принимает значение по пути,
|
|
12
|
+
* поэтому ссылка инвариантна: при `strictFunctionTypes` конкретный ref страницы
|
|
13
|
+
* в этот параметр не входит. `any` в ограничении выводит `R` из аргумента
|
|
14
|
+
* и сохраняет его тип. Тот же приём у {@link contextValueEqual} и {@link contextValueIn}.
|
|
15
|
+
*
|
|
10
16
|
* @internal Используйте {@link contextValueUndefined} / {@link when.notDefined}.
|
|
11
17
|
*/
|
|
12
18
|
class ContextValueUndefined extends condition_1.Condition {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DesktopDevice = void 0;
|
|
4
4
|
exports.desktopDevice = desktopDevice;
|
|
5
|
-
const condition_type_1 = require("@matreshka/
|
|
5
|
+
const condition_type_1 = require("@matreshka/client-bff-protocol/enums/condition-type");
|
|
6
6
|
const condition_1 = require("./condition");
|
|
7
7
|
/**
|
|
8
8
|
* Условие: устройство клиента — десктоп.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MobileDevice = void 0;
|
|
4
4
|
exports.mobileDevice = mobileDevice;
|
|
5
|
-
const condition_type_1 = require("@matreshka/
|
|
5
|
+
const condition_type_1 = require("@matreshka/client-bff-protocol/enums/condition-type");
|
|
6
6
|
const condition_1 = require("./condition");
|
|
7
7
|
/**
|
|
8
8
|
* Условие: устройство клиента — мобильный телефон.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NotDesktopDevice = void 0;
|
|
4
4
|
exports.notDesktopDevice = notDesktopDevice;
|
|
5
|
-
const condition_type_1 = require("@matreshka/
|
|
5
|
+
const condition_type_1 = require("@matreshka/client-bff-protocol/enums/condition-type");
|
|
6
6
|
const condition_1 = require("./condition");
|
|
7
7
|
/**
|
|
8
8
|
* Условие: устройство клиента не десктоп.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NotMobileDevice = void 0;
|
|
4
4
|
exports.notMobileDevice = notMobileDevice;
|
|
5
|
-
const condition_type_1 = require("@matreshka/
|
|
5
|
+
const condition_type_1 = require("@matreshka/client-bff-protocol/enums/condition-type");
|
|
6
6
|
const condition_1 = require("./condition");
|
|
7
7
|
/**
|
|
8
8
|
* Условие: устройство клиента не мобильный телефон.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NotTabletDevice = void 0;
|
|
4
4
|
exports.notTabletDevice = notTabletDevice;
|
|
5
|
-
const condition_type_1 = require("@matreshka/
|
|
5
|
+
const condition_type_1 = require("@matreshka/client-bff-protocol/enums/condition-type");
|
|
6
6
|
const condition_1 = require("./condition");
|
|
7
7
|
/**
|
|
8
8
|
* Условие: устройство клиента не планшет.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TabletDevice = void 0;
|
|
4
4
|
exports.tabletDevice = tabletDevice;
|
|
5
|
-
const condition_type_1 = require("@matreshka/
|
|
5
|
+
const condition_type_1 = require("@matreshka/client-bff-protocol/enums/condition-type");
|
|
6
6
|
const condition_1 = require("./condition");
|
|
7
7
|
/**
|
|
8
8
|
* Условие: устройство клиента — планшет.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JsonObject } from "@matreshka/
|
|
1
|
+
import { JsonObject } from "@matreshka/client-bff-protocol/types/json";
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
3
|
import { Paths, PathValue } from "ts-essentials";
|
|
4
4
|
import { ActionConfig } from "../actions/action";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JsonObject } from "@matreshka/
|
|
1
|
+
import { JsonObject } from "@matreshka/client-bff-protocol/types/json";
|
|
2
2
|
import { BehaviorSubject, Observable } from "rxjs";
|
|
3
3
|
import { Paths, PathValue } from "ts-essentials";
|
|
4
4
|
import { ZodObject } from "zod";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Context = void 0;
|
|
4
|
-
const index_1 = require("@matreshka/
|
|
5
|
-
const index_2 = require("@matreshka/
|
|
6
|
-
const targeted_message_1 = require("@matreshka/
|
|
4
|
+
const index_1 = require("@matreshka/client-bff-protocol/messages/bff-to-client/context/index");
|
|
5
|
+
const index_2 = require("@matreshka/client-bff-protocol/messages/client-to-bff/context/index");
|
|
6
|
+
const targeted_message_1 = require("@matreshka/client-bff-protocol/messages/targeted-message");
|
|
7
7
|
const fetch_from_object_1 = require("@matreshka/shared/utils/fetch-from-object");
|
|
8
|
+
const set_object_property_1 = require("@matreshka/shared/utils/set-object-property");
|
|
8
9
|
const rxjs_1 = require("rxjs");
|
|
9
10
|
const zod_1 = require("zod");
|
|
10
11
|
const dec_context_value_1 = require("../actions/dec-context-value");
|
|
@@ -16,7 +17,6 @@ const deep_pick_1 = require("../utils/deep-pick");
|
|
|
16
17
|
const incoming_message_observer_1 = require("../utils/incoming-message-observer");
|
|
17
18
|
const objects_diff_1 = require("../utils/objects-diff");
|
|
18
19
|
const replace_context_keys_1 = require("../utils/replace-context-keys");
|
|
19
|
-
const set_object_property_1 = require("../utils/set-object-property");
|
|
20
20
|
const context_ref_1 = require("./context-ref");
|
|
21
21
|
/** Отделяет чтение через {@link Context.get} от живого дерева в хранилище. */
|
|
22
22
|
function cloneGetResult(value) {
|
|
@@ -196,7 +196,7 @@ class Context {
|
|
|
196
196
|
}
|
|
197
197
|
}));
|
|
198
198
|
clientSubscription.add(client.incomingMessage$
|
|
199
|
-
.pipe((0, rxjs_1.filter)((unsafeMessage) =>
|
|
199
|
+
.pipe((0, rxjs_1.filter)((unsafeMessage) => unsafeMessage instanceof targeted_message_1.TargetedMessage &&
|
|
200
200
|
unsafeMessage.target === this.id))
|
|
201
201
|
.subscribe((0, incoming_message_observer_1.incomingMessageObserver)(client, (unsafeMessage) => {
|
|
202
202
|
if (this.destroyed) {
|
|
@@ -5,14 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.GatewayConnection = void 0;
|
|
7
7
|
exports.buildGatewayWebSocketUrl = buildGatewayWebSocketUrl;
|
|
8
|
-
const bff_message_1 = require("@matreshka/
|
|
9
|
-
const client_message_1 = require("@matreshka/
|
|
10
|
-
const connected_message_1 = require("@matreshka/
|
|
11
|
-
const error_message_1 = require("@matreshka/
|
|
12
|
-
const parse_gateway_to_bff_message_1 = require("@matreshka/
|
|
13
|
-
const session_close_message_1 = require("@matreshka/
|
|
14
|
-
const session_open_message_1 = require("@matreshka/
|
|
15
|
-
const register_gateway_messages_1 = require("@matreshka/
|
|
8
|
+
const bff_message_1 = require("@matreshka/gateway-bff-protocol/messages/bff-to-gateway/bff-message");
|
|
9
|
+
const client_message_1 = require("@matreshka/gateway-bff-protocol/messages/gateway-to-bff/client-message");
|
|
10
|
+
const connected_message_1 = require("@matreshka/gateway-bff-protocol/messages/gateway-to-bff/connected-message");
|
|
11
|
+
const error_message_1 = require("@matreshka/gateway-bff-protocol/messages/gateway-to-bff/error-message");
|
|
12
|
+
const parse_gateway_to_bff_message_1 = require("@matreshka/gateway-bff-protocol/messages/gateway-to-bff/parse-gateway-to-bff-message");
|
|
13
|
+
const session_close_message_1 = require("@matreshka/gateway-bff-protocol/messages/gateway-to-bff/session-close-message");
|
|
14
|
+
const session_open_message_1 = require("@matreshka/gateway-bff-protocol/messages/gateway-to-bff/session-open-message");
|
|
15
|
+
const register_gateway_messages_1 = require("@matreshka/gateway-bff-protocol/messages/register-gateway-messages");
|
|
16
16
|
const rxjs_1 = require("rxjs");
|
|
17
17
|
const ws_1 = __importDefault(require("ws"));
|
|
18
18
|
const version_1 = require("./version");
|
package/dist/core/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export * from "./matreshka";
|
|
|
9
9
|
export * from "./conditions";
|
|
10
10
|
export * from "./context/context";
|
|
11
11
|
export * from "./context/context-ref";
|
|
12
|
-
export type { DimensionalValue } from "@matreshka/
|
|
12
|
+
export type { DimensionalValue } from "@matreshka/client-bff-protocol/types/dimensional-value";
|
|
13
13
|
export { ComponentAnimationEffect, DimensionalUnit, TimingFunction, local, } from "./local";
|
|
14
14
|
export type { ActionConfig, AnimateComponentConfig, ComponentAnimationEffects, DimensionalKeyframeStops, OpacityKeyframeStops, } from "./local";
|
|
15
15
|
export * from "./types/client-settings";
|
|
@@ -17,7 +17,7 @@ export * from "./utils/calculate-components";
|
|
|
17
17
|
export * from "./utils/color-roles-to-ids";
|
|
18
18
|
export * from "./utils/color-token-id";
|
|
19
19
|
export * from "./utils/serialize-component-tree";
|
|
20
|
-
export * from "@matreshka/
|
|
20
|
+
export * from "@matreshka/client-bff-protocol/types/json";
|
|
21
21
|
export * from "./types/component-instance";
|
|
22
22
|
export * from "./types/component-tree-node";
|
|
23
23
|
export * from "./types/componentable";
|
package/dist/core/index.js
CHANGED
|
@@ -36,7 +36,7 @@ __exportStar(require("./utils/calculate-components"), exports);
|
|
|
36
36
|
__exportStar(require("./utils/color-roles-to-ids"), exports);
|
|
37
37
|
__exportStar(require("./utils/color-token-id"), exports);
|
|
38
38
|
__exportStar(require("./utils/serialize-component-tree"), exports);
|
|
39
|
-
__exportStar(require("@matreshka/
|
|
39
|
+
__exportStar(require("@matreshka/client-bff-protocol/types/json"), exports);
|
|
40
40
|
__exportStar(require("./types/component-instance"), exports);
|
|
41
41
|
__exportStar(require("./types/component-tree-node"), exports);
|
|
42
42
|
__exportStar(require("./types/componentable"), exports);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { animate } from "../actions/animate-component";
|
|
2
2
|
import { writeTextToClipboard } from "../actions/write-text-to-clipboard";
|
|
3
3
|
export type { ActionConfig } from "../actions/action";
|
|
4
|
-
export { DimensionalUnit } from "@matreshka/
|
|
5
|
-
export type { DimensionalValue } from "@matreshka/
|
|
4
|
+
export { DimensionalUnit } from "@matreshka/client-bff-protocol/enums/dimensional-unit";
|
|
5
|
+
export type { DimensionalValue } from "@matreshka/client-bff-protocol/types/dimensional-value";
|
|
6
6
|
export { animate, ComponentAnimationEffect, TimingFunction, } from "../actions/animate-component";
|
|
7
7
|
export type { AnimateComponentConfig, ComponentAnimationEffects, DimensionalKeyframeStops, OpacityKeyframeStops, } from "../actions/animate-component";
|
|
8
8
|
/**
|
package/dist/core/local/index.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.local = exports.TimingFunction = exports.ComponentAnimationEffect = exports.animate = exports.DimensionalUnit = void 0;
|
|
4
4
|
const animate_component_1 = require("../actions/animate-component");
|
|
5
5
|
const write_text_to_clipboard_1 = require("../actions/write-text-to-clipboard");
|
|
6
|
-
var dimensional_unit_1 = require("@matreshka/
|
|
6
|
+
var dimensional_unit_1 = require("@matreshka/client-bff-protocol/enums/dimensional-unit");
|
|
7
7
|
Object.defineProperty(exports, "DimensionalUnit", { enumerable: true, get: function () { return dimensional_unit_1.DimensionalUnit; } });
|
|
8
8
|
var animate_component_2 = require("../actions/animate-component");
|
|
9
9
|
Object.defineProperty(exports, "animate", { enumerable: true, get: function () { return animate_component_2.animate; } });
|
package/dist/core/matreshka.js
CHANGED
|
@@ -34,8 +34,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Matreshka = void 0;
|
|
37
|
-
const index_1 = require("@matreshka/
|
|
38
|
-
const handshake_message_1 = require("@matreshka/
|
|
37
|
+
const index_1 = require("@matreshka/client-bff-protocol/messages/bff-to-client/app/index");
|
|
38
|
+
const handshake_message_1 = require("@matreshka/client-bff-protocol/messages/client-to-bff/app/handshake-message");
|
|
39
39
|
const crypto = __importStar(require("crypto"));
|
|
40
40
|
const rxjs_1 = require("rxjs");
|
|
41
41
|
const client_1 = require("./client");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ColorRole } from "@matreshka/
|
|
2
|
-
import { ColorToken } from "@matreshka/
|
|
3
|
-
import { AppFontsConfig } from "@matreshka/
|
|
1
|
+
import { ColorRole } from "@matreshka/client-bff-protocol/enums/color-role";
|
|
2
|
+
import { ColorToken } from "@matreshka/client-bff-protocol/types/color-token";
|
|
3
|
+
import { AppFontsConfig } from "@matreshka/client-bff-protocol/types/fonts";
|
|
4
4
|
export type ClientSettingsColors = {
|
|
5
5
|
/** Реестр определений токенов для handshake и резолва id в UI. */
|
|
6
6
|
registry: ColorToken[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Condition as SerializedCondition } from "@matreshka/
|
|
2
|
-
import type { ServerComponentConfig } from "@matreshka/
|
|
1
|
+
import type { Condition as SerializedCondition } from "@matreshka/client-bff-protocol/types/condition";
|
|
2
|
+
import type { ServerComponentConfig } from "@matreshka/client-bff-protocol/types/server-component-config";
|
|
3
3
|
export type SerializedComponentRule<TOverrides extends Record<string, unknown> = Record<string, unknown>> = {
|
|
4
4
|
conditions: SerializedCondition[];
|
|
5
5
|
overrides: TOverrides;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ColorRole } from "@matreshka/
|
|
2
|
-
import { ColorToken } from "@matreshka/
|
|
1
|
+
import { ColorRole } from "@matreshka/client-bff-protocol/enums/color-role";
|
|
2
|
+
import { ColorToken } from "@matreshka/client-bff-protocol/types/color-token";
|
|
3
3
|
export declare function resolvePartialColorsToIds(colors: Partial<Record<ColorRole, ColorToken>>): Partial<Record<ColorRole, string>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Context } from "../context/context";
|
|
1
|
+
import type { Context } from "../context/context";
|
|
2
2
|
/**
|
|
3
|
-
* Заменяет плейсхолдеры вида
|
|
3
|
+
* Заменяет плейсхолдеры вида `@{ключ}` в строке значениями из объекта контекста.
|
|
4
4
|
*
|
|
5
|
-
* Поддерживает значения по умолчанию через `=` внутри плейсхолдера, например:
|
|
5
|
+
* Поддерживает значения по умолчанию через `=` внутри плейсхолдера, например: `@{name=Гость}`.
|
|
6
6
|
* Рекурсивно обрабатывает случаи, когда после замены появляются новые плейсхолдеры.
|
|
7
7
|
*
|
|
8
8
|
* @param str Строка с плейсхолдерами.
|