@dcl/protocol 1.0.0-20302100396.commit-b2ab885 → 1.0.0-20440758478.commit-91726de
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/out-js/decentraland/sdk/components/visibility_component.gen.d.ts +8 -0
- package/out-js/decentraland/sdk/components/visibility_component.gen.js +17 -3
- package/out-js/decentraland/sdk/components/visibility_component.gen.js.map +1 -1
- package/out-ts/decentraland/sdk/components/visibility_component.gen.ts +28 -3
- package/package.json +2 -2
- package/proto/decentraland/sdk/components/visibility_component.proto +7 -0
|
@@ -3,6 +3,14 @@ export declare const protobufPackage = "decentraland.sdk.components";
|
|
|
3
3
|
export interface PBVisibilityComponent {
|
|
4
4
|
/** default=true */
|
|
5
5
|
visible?: boolean | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Propagation follows certain rules:
|
|
8
|
+
* - Any own visibility component takes priority
|
|
9
|
+
* - If no own visibility component, visibility is determined by visibility of the nearest parent with propagate = true
|
|
10
|
+
* - If no own component and no parent with propagate = true, visibility is "visible"
|
|
11
|
+
* - Visibility is always updated, whenever hierarchy, parent component or own component changes
|
|
12
|
+
*/
|
|
13
|
+
propagateToChildren?: boolean | undefined;
|
|
6
14
|
}
|
|
7
15
|
export declare namespace PBVisibilityComponent {
|
|
8
16
|
function encode(message: PBVisibilityComponent, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -8,7 +8,7 @@ exports.PBVisibilityComponent = exports.protobufPackage = void 0;
|
|
|
8
8
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
9
|
exports.protobufPackage = "decentraland.sdk.components";
|
|
10
10
|
function createBasePBVisibilityComponent() {
|
|
11
|
-
return { visible: undefined };
|
|
11
|
+
return { visible: undefined, propagateToChildren: undefined };
|
|
12
12
|
}
|
|
13
13
|
var PBVisibilityComponent;
|
|
14
14
|
(function (PBVisibilityComponent) {
|
|
@@ -16,6 +16,9 @@ var PBVisibilityComponent;
|
|
|
16
16
|
if (message.visible !== undefined) {
|
|
17
17
|
writer.uint32(8).bool(message.visible);
|
|
18
18
|
}
|
|
19
|
+
if (message.propagateToChildren !== undefined) {
|
|
20
|
+
writer.uint32(16).bool(message.propagateToChildren);
|
|
21
|
+
}
|
|
19
22
|
return writer;
|
|
20
23
|
}
|
|
21
24
|
PBVisibilityComponent.encode = encode;
|
|
@@ -32,6 +35,12 @@ var PBVisibilityComponent;
|
|
|
32
35
|
}
|
|
33
36
|
message.visible = reader.bool();
|
|
34
37
|
continue;
|
|
38
|
+
case 2:
|
|
39
|
+
if (tag !== 16) {
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
message.propagateToChildren = reader.bool();
|
|
43
|
+
continue;
|
|
35
44
|
}
|
|
36
45
|
if ((tag & 7) === 4 || tag === 0) {
|
|
37
46
|
break;
|
|
@@ -42,12 +51,16 @@ var PBVisibilityComponent;
|
|
|
42
51
|
}
|
|
43
52
|
PBVisibilityComponent.decode = decode;
|
|
44
53
|
function fromJSON(object) {
|
|
45
|
-
return {
|
|
54
|
+
return {
|
|
55
|
+
visible: isSet(object.visible) ? Boolean(object.visible) : undefined,
|
|
56
|
+
propagateToChildren: isSet(object.propagateToChildren) ? Boolean(object.propagateToChildren) : undefined,
|
|
57
|
+
};
|
|
46
58
|
}
|
|
47
59
|
PBVisibilityComponent.fromJSON = fromJSON;
|
|
48
60
|
function toJSON(message) {
|
|
49
61
|
const obj = {};
|
|
50
62
|
message.visible !== undefined && (obj.visible = message.visible);
|
|
63
|
+
message.propagateToChildren !== undefined && (obj.propagateToChildren = message.propagateToChildren);
|
|
51
64
|
return obj;
|
|
52
65
|
}
|
|
53
66
|
PBVisibilityComponent.toJSON = toJSON;
|
|
@@ -56,9 +69,10 @@ var PBVisibilityComponent;
|
|
|
56
69
|
}
|
|
57
70
|
PBVisibilityComponent.create = create;
|
|
58
71
|
function fromPartial(object) {
|
|
59
|
-
var _a;
|
|
72
|
+
var _a, _b;
|
|
60
73
|
const message = createBasePBVisibilityComponent();
|
|
61
74
|
message.visible = (_a = object.visible) !== null && _a !== void 0 ? _a : undefined;
|
|
75
|
+
message.propagateToChildren = (_b = object.propagateToChildren) !== null && _b !== void 0 ? _b : undefined;
|
|
62
76
|
return message;
|
|
63
77
|
}
|
|
64
78
|
PBVisibilityComponent.fromPartial = fromPartial;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visibility_component.gen.js","sourceRoot":"","sources":["../../../../out-ts/decentraland/sdk/components/visibility_component.gen.ts"],"names":[],"mappings":";;;;;;AAAA,oBAAoB;AACpB,iEAAqC;AAExB,QAAA,eAAe,GAAG,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"visibility_component.gen.js","sourceRoot":"","sources":["../../../../out-ts/decentraland/sdk/components/visibility_component.gen.ts"],"names":[],"mappings":";;;;;;AAAA,oBAAoB;AACpB,iEAAqC;AAExB,QAAA,eAAe,GAAG,6BAA6B,CAAC;AAiB7D,SAAS,+BAA+B;IACtC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,SAAS,EAAE,CAAC;AAChE,CAAC;AAED,IAAiB,qBAAqB,CAmErC;AAnED,WAAiB,qBAAqB;IACpC,SAAgB,MAAM,CAAC,OAA8B,EAAE,SAAqB,iBAAG,CAAC,MAAM,CAAC,MAAM,EAAE;QAC7F,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACzC,CAAC;QACD,IAAI,OAAO,CAAC,mBAAmB,KAAK,SAAS,EAAE,CAAC;YAC9C,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;QACtD,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IARe,4BAAM,SAQrB,CAAA;IAED,SAAgB,MAAM,CA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5
5
|
|
|
6
6
|
export interface PBVisibilityComponent {
|
|
7
7
|
/** default=true */
|
|
8
|
-
visible?:
|
|
8
|
+
visible?:
|
|
9
|
+
| boolean
|
|
10
|
+
| undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Propagation follows certain rules:
|
|
13
|
+
* - Any own visibility component takes priority
|
|
14
|
+
* - If no own visibility component, visibility is determined by visibility of the nearest parent with propagate = true
|
|
15
|
+
* - If no own component and no parent with propagate = true, visibility is "visible"
|
|
16
|
+
* - Visibility is always updated, whenever hierarchy, parent component or own component changes
|
|
17
|
+
*/
|
|
18
|
+
propagateToChildren?: boolean | undefined;
|
|
9
19
|
}
|
|
10
20
|
|
|
11
21
|
function createBasePBVisibilityComponent(): PBVisibilityComponent {
|
|
12
|
-
return { visible: undefined };
|
|
22
|
+
return { visible: undefined, propagateToChildren: undefined };
|
|
13
23
|
}
|
|
14
24
|
|
|
15
25
|
export namespace PBVisibilityComponent {
|
|
@@ -17,6 +27,9 @@ export namespace PBVisibilityComponent {
|
|
|
17
27
|
if (message.visible !== undefined) {
|
|
18
28
|
writer.uint32(8).bool(message.visible);
|
|
19
29
|
}
|
|
30
|
+
if (message.propagateToChildren !== undefined) {
|
|
31
|
+
writer.uint32(16).bool(message.propagateToChildren);
|
|
32
|
+
}
|
|
20
33
|
return writer;
|
|
21
34
|
}
|
|
22
35
|
|
|
@@ -34,6 +47,13 @@ export namespace PBVisibilityComponent {
|
|
|
34
47
|
|
|
35
48
|
message.visible = reader.bool();
|
|
36
49
|
continue;
|
|
50
|
+
case 2:
|
|
51
|
+
if (tag !== 16) {
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
message.propagateToChildren = reader.bool();
|
|
56
|
+
continue;
|
|
37
57
|
}
|
|
38
58
|
if ((tag & 7) === 4 || tag === 0) {
|
|
39
59
|
break;
|
|
@@ -44,12 +64,16 @@ export namespace PBVisibilityComponent {
|
|
|
44
64
|
}
|
|
45
65
|
|
|
46
66
|
export function fromJSON(object: any): PBVisibilityComponent {
|
|
47
|
-
return {
|
|
67
|
+
return {
|
|
68
|
+
visible: isSet(object.visible) ? Boolean(object.visible) : undefined,
|
|
69
|
+
propagateToChildren: isSet(object.propagateToChildren) ? Boolean(object.propagateToChildren) : undefined,
|
|
70
|
+
};
|
|
48
71
|
}
|
|
49
72
|
|
|
50
73
|
export function toJSON(message: PBVisibilityComponent): unknown {
|
|
51
74
|
const obj: any = {};
|
|
52
75
|
message.visible !== undefined && (obj.visible = message.visible);
|
|
76
|
+
message.propagateToChildren !== undefined && (obj.propagateToChildren = message.propagateToChildren);
|
|
53
77
|
return obj;
|
|
54
78
|
}
|
|
55
79
|
|
|
@@ -62,6 +86,7 @@ export namespace PBVisibilityComponent {
|
|
|
62
86
|
): PBVisibilityComponent {
|
|
63
87
|
const message = createBasePBVisibilityComponent();
|
|
64
88
|
message.visible = object.visible ?? undefined;
|
|
89
|
+
message.propagateToChildren = object.propagateToChildren ?? undefined;
|
|
65
90
|
return message;
|
|
66
91
|
}
|
|
67
92
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/protocol",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-20440758478.commit-91726de",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "decentraland/protocol.git",
|
|
6
6
|
"homepage": "https://github.com/decentraland/protocol#readme",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"out-js",
|
|
31
31
|
"public"
|
|
32
32
|
],
|
|
33
|
-
"commit": "
|
|
33
|
+
"commit": "91726deaab38fac92808e4e7df4f2c0cc2710ff0"
|
|
34
34
|
}
|
|
@@ -6,4 +6,11 @@ option (common.ecs_component_id) = 1081;
|
|
|
6
6
|
|
|
7
7
|
message PBVisibilityComponent {
|
|
8
8
|
optional bool visible = 1; // default=true
|
|
9
|
+
|
|
10
|
+
// Propagation follows certain rules:
|
|
11
|
+
// - Any own visibility component takes priority
|
|
12
|
+
// - If no own visibility component, visibility is determined by visibility of the nearest parent with propagate = true
|
|
13
|
+
// - If no own component and no parent with propagate = true, visibility is "visible"
|
|
14
|
+
// - Visibility is always updated, whenever hierarchy, parent component or own component changes
|
|
15
|
+
optional bool propagate_to_children = 2; // default=false
|
|
9
16
|
}
|