@vicinae/api 0.20.8 → 0.20.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/api/alert.d.ts +1 -1
  2. package/dist/api/alert.js +9 -14
  3. package/dist/api/client.d.ts +7 -0
  4. package/dist/api/client.js +11 -0
  5. package/dist/api/clipboard.d.ts +4 -8
  6. package/dist/api/clipboard.js +13 -18
  7. package/dist/api/color.d.ts +4 -10
  8. package/dist/api/color.js +8 -47
  9. package/dist/api/command.js +4 -6
  10. package/dist/api/controls.js +9 -56
  11. package/dist/api/environment.d.ts +0 -11
  12. package/dist/api/environment.js +2 -1
  13. package/dist/api/file-search.d.ts +3 -4
  14. package/dist/api/file-search.js +6 -4
  15. package/dist/api/globals.d.ts +9 -0
  16. package/dist/api/globals.js +5 -0
  17. package/dist/api/hooks/use-imperative-form-handle.d.ts +1 -1
  18. package/dist/api/hooks/use-imperative-form-handle.js +6 -3
  19. package/dist/api/hooks/use-navigation.d.ts +2 -2
  20. package/dist/api/hooks/use-navigation.js +2 -5
  21. package/dist/api/image.d.ts +4 -4
  22. package/dist/api/image.js +12 -51
  23. package/dist/api/index.d.ts +0 -2
  24. package/dist/api/index.js +0 -2
  25. package/dist/api/local-storage.js +7 -14
  26. package/dist/api/oauth.d.ts +1 -1
  27. package/dist/api/oauth.js +7 -15
  28. package/dist/api/preference.d.ts +2 -4
  29. package/dist/api/preference.js +10 -6
  30. package/dist/api/proto/api.d.ts +240 -0
  31. package/dist/api/proto/api.js +271 -0
  32. package/dist/api/toast.js +7 -77
  33. package/dist/api/utils.d.ts +6 -2
  34. package/dist/api/utils.js +9 -26
  35. package/dist/api/window-management.d.ts +3 -5
  36. package/dist/api/window-management.js +14 -27
  37. package/dist/schemas/manifest.d.ts +3 -3
  38. package/package.json +1 -4
  39. package/dist/api/bus.d.ts +0 -125
  40. package/dist/api/bus.js +0 -201
  41. package/dist/api/context/index.d.ts +0 -1
  42. package/dist/api/context/index.js +0 -17
  43. package/dist/api/context/navigation-context.d.ts +0 -7
  44. package/dist/api/context/navigation-context.js +0 -12
  45. package/dist/api/context/navigation-provider.d.ts +0 -7
  46. package/dist/api/context/navigation-provider.js +0 -58
  47. package/dist/api/hooks.d.ts +0 -1
  48. package/dist/api/hooks.js +0 -30
  49. package/dist/api/proto/application.d.ts +0 -79
  50. package/dist/api/proto/application.js +0 -826
  51. package/dist/api/proto/clipboard.d.ts +0 -88
  52. package/dist/api/proto/clipboard.js +0 -929
  53. package/dist/api/proto/command.d.ts +0 -35
  54. package/dist/api/proto/command.js +0 -182
  55. package/dist/api/proto/common.d.ts +0 -28
  56. package/dist/api/proto/common.js +0 -102
  57. package/dist/api/proto/extension.d.ts +0 -106
  58. package/dist/api/proto/extension.js +0 -1122
  59. package/dist/api/proto/file-search.d.ts +0 -42
  60. package/dist/api/proto/file-search.js +0 -290
  61. package/dist/api/proto/google/protobuf/struct.d.ts +0 -107
  62. package/dist/api/proto/google/protobuf/struct.js +0 -456
  63. package/dist/api/proto/ipc.d.ts +0 -64
  64. package/dist/api/proto/ipc.js +0 -604
  65. package/dist/api/proto/manager.d.ts +0 -87
  66. package/dist/api/proto/manager.js +0 -776
  67. package/dist/api/proto/oauth.d.ts +0 -97
  68. package/dist/api/proto/oauth.js +0 -994
  69. package/dist/api/proto/storage.d.ts +0 -80
  70. package/dist/api/proto/storage.js +0 -804
  71. package/dist/api/proto/ui.d.ts +0 -208
  72. package/dist/api/proto/ui.js +0 -2316
  73. package/dist/api/proto/wlr-clipboard.d.ts +0 -30
  74. package/dist/api/proto/wlr-clipboard.js +0 -158
  75. package/dist/api/proto/wm.d.ts +0 -142
  76. package/dist/api/proto/wm.js +0 -1714
@@ -1,2316 +0,0 @@
1
- "use strict";
2
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
- // versions:
4
- // protoc-gen-ts_proto v2.7.7
5
- // protoc v6.33.1
6
- // source: ui.proto
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.Image = exports.ColorLike = exports.DynamicColor = exports.ImageSource = exports.ThemedImageSource = exports.RenderNode_PropsEntry = exports.RenderNode = exports.Response = exports.Request = exports.PopToRootRequest = exports.ConfirmAlertAction = exports.ConfirmAlertResponse = exports.ConfirmAlertRequest = exports.RenderRequest = exports.ShowHudRequest = exports.GetSelectedTextResponse = exports.GetSelectedTextRequest = exports.SetSearchTextRequest = exports.ClearSearchBarRequest = exports.CloseMainWindowRequest = exports.PopViewRequest = exports.PushViewRequest = exports.UpdateToastRequest = exports.HideToastRequest = exports.ShowToastRequest = exports.ImageMask = exports.ConfirmAlertActionStyle = exports.PopToRootType = exports.ToastStyle = exports.protobufPackage = void 0;
9
- exports.toastStyleFromJSON = toastStyleFromJSON;
10
- exports.toastStyleToJSON = toastStyleToJSON;
11
- exports.popToRootTypeFromJSON = popToRootTypeFromJSON;
12
- exports.popToRootTypeToJSON = popToRootTypeToJSON;
13
- exports.confirmAlertActionStyleFromJSON = confirmAlertActionStyleFromJSON;
14
- exports.confirmAlertActionStyleToJSON = confirmAlertActionStyleToJSON;
15
- exports.imageMaskFromJSON = imageMaskFromJSON;
16
- exports.imageMaskToJSON = imageMaskToJSON;
17
- /* eslint-disable */
18
- const wire_1 = require("@bufbuild/protobuf/wire");
19
- const common_1 = require("./common");
20
- const struct_1 = require("./google/protobuf/struct");
21
- exports.protobufPackage = "proto.ext.ui";
22
- var ToastStyle;
23
- (function (ToastStyle) {
24
- ToastStyle[ToastStyle["Success"] = 0] = "Success";
25
- ToastStyle[ToastStyle["Info"] = 1] = "Info";
26
- ToastStyle[ToastStyle["Warning"] = 2] = "Warning";
27
- ToastStyle[ToastStyle["Error"] = 3] = "Error";
28
- ToastStyle[ToastStyle["Dynamic"] = 4] = "Dynamic";
29
- ToastStyle[ToastStyle["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
30
- })(ToastStyle || (exports.ToastStyle = ToastStyle = {}));
31
- function toastStyleFromJSON(object) {
32
- switch (object) {
33
- case 0:
34
- case "Success":
35
- return ToastStyle.Success;
36
- case 1:
37
- case "Info":
38
- return ToastStyle.Info;
39
- case 2:
40
- case "Warning":
41
- return ToastStyle.Warning;
42
- case 3:
43
- case "Error":
44
- return ToastStyle.Error;
45
- case 4:
46
- case "Dynamic":
47
- return ToastStyle.Dynamic;
48
- case -1:
49
- case "UNRECOGNIZED":
50
- default:
51
- return ToastStyle.UNRECOGNIZED;
52
- }
53
- }
54
- function toastStyleToJSON(object) {
55
- switch (object) {
56
- case ToastStyle.Success:
57
- return "Success";
58
- case ToastStyle.Info:
59
- return "Info";
60
- case ToastStyle.Warning:
61
- return "Warning";
62
- case ToastStyle.Error:
63
- return "Error";
64
- case ToastStyle.Dynamic:
65
- return "Dynamic";
66
- case ToastStyle.UNRECOGNIZED:
67
- default:
68
- return "UNRECOGNIZED";
69
- }
70
- }
71
- var PopToRootType;
72
- (function (PopToRootType) {
73
- PopToRootType[PopToRootType["PopToRootDefault"] = 0] = "PopToRootDefault";
74
- PopToRootType[PopToRootType["PopToRootImmediate"] = 1] = "PopToRootImmediate";
75
- PopToRootType[PopToRootType["PopToRootSuspended"] = 2] = "PopToRootSuspended";
76
- PopToRootType[PopToRootType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
77
- })(PopToRootType || (exports.PopToRootType = PopToRootType = {}));
78
- function popToRootTypeFromJSON(object) {
79
- switch (object) {
80
- case 0:
81
- case "PopToRootDefault":
82
- return PopToRootType.PopToRootDefault;
83
- case 1:
84
- case "PopToRootImmediate":
85
- return PopToRootType.PopToRootImmediate;
86
- case 2:
87
- case "PopToRootSuspended":
88
- return PopToRootType.PopToRootSuspended;
89
- case -1:
90
- case "UNRECOGNIZED":
91
- default:
92
- return PopToRootType.UNRECOGNIZED;
93
- }
94
- }
95
- function popToRootTypeToJSON(object) {
96
- switch (object) {
97
- case PopToRootType.PopToRootDefault:
98
- return "PopToRootDefault";
99
- case PopToRootType.PopToRootImmediate:
100
- return "PopToRootImmediate";
101
- case PopToRootType.PopToRootSuspended:
102
- return "PopToRootSuspended";
103
- case PopToRootType.UNRECOGNIZED:
104
- default:
105
- return "UNRECOGNIZED";
106
- }
107
- }
108
- var ConfirmAlertActionStyle;
109
- (function (ConfirmAlertActionStyle) {
110
- ConfirmAlertActionStyle[ConfirmAlertActionStyle["Default"] = 0] = "Default";
111
- ConfirmAlertActionStyle[ConfirmAlertActionStyle["Destructive"] = 1] = "Destructive";
112
- ConfirmAlertActionStyle[ConfirmAlertActionStyle["Cancel"] = 2] = "Cancel";
113
- ConfirmAlertActionStyle[ConfirmAlertActionStyle["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
114
- })(ConfirmAlertActionStyle || (exports.ConfirmAlertActionStyle = ConfirmAlertActionStyle = {}));
115
- function confirmAlertActionStyleFromJSON(object) {
116
- switch (object) {
117
- case 0:
118
- case "Default":
119
- return ConfirmAlertActionStyle.Default;
120
- case 1:
121
- case "Destructive":
122
- return ConfirmAlertActionStyle.Destructive;
123
- case 2:
124
- case "Cancel":
125
- return ConfirmAlertActionStyle.Cancel;
126
- case -1:
127
- case "UNRECOGNIZED":
128
- default:
129
- return ConfirmAlertActionStyle.UNRECOGNIZED;
130
- }
131
- }
132
- function confirmAlertActionStyleToJSON(object) {
133
- switch (object) {
134
- case ConfirmAlertActionStyle.Default:
135
- return "Default";
136
- case ConfirmAlertActionStyle.Destructive:
137
- return "Destructive";
138
- case ConfirmAlertActionStyle.Cancel:
139
- return "Cancel";
140
- case ConfirmAlertActionStyle.UNRECOGNIZED:
141
- default:
142
- return "UNRECOGNIZED";
143
- }
144
- }
145
- var ImageMask;
146
- (function (ImageMask) {
147
- ImageMask[ImageMask["None"] = 0] = "None";
148
- ImageMask[ImageMask["Circle"] = 1] = "Circle";
149
- ImageMask[ImageMask["RoundedRectangle"] = 2] = "RoundedRectangle";
150
- ImageMask[ImageMask["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
151
- })(ImageMask || (exports.ImageMask = ImageMask = {}));
152
- function imageMaskFromJSON(object) {
153
- switch (object) {
154
- case 0:
155
- case "None":
156
- return ImageMask.None;
157
- case 1:
158
- case "Circle":
159
- return ImageMask.Circle;
160
- case 2:
161
- case "RoundedRectangle":
162
- return ImageMask.RoundedRectangle;
163
- case -1:
164
- case "UNRECOGNIZED":
165
- default:
166
- return ImageMask.UNRECOGNIZED;
167
- }
168
- }
169
- function imageMaskToJSON(object) {
170
- switch (object) {
171
- case ImageMask.None:
172
- return "None";
173
- case ImageMask.Circle:
174
- return "Circle";
175
- case ImageMask.RoundedRectangle:
176
- return "RoundedRectangle";
177
- case ImageMask.UNRECOGNIZED:
178
- default:
179
- return "UNRECOGNIZED";
180
- }
181
- }
182
- function createBaseShowToastRequest() {
183
- return { id: "", title: "", message: "", style: 0 };
184
- }
185
- exports.ShowToastRequest = {
186
- encode(message, writer = new wire_1.BinaryWriter()) {
187
- if (message.id !== "") {
188
- writer.uint32(10).string(message.id);
189
- }
190
- if (message.title !== "") {
191
- writer.uint32(18).string(message.title);
192
- }
193
- if (message.message !== "") {
194
- writer.uint32(26).string(message.message);
195
- }
196
- if (message.style !== 0) {
197
- writer.uint32(32).int32(message.style);
198
- }
199
- return writer;
200
- },
201
- decode(input, length) {
202
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
203
- const end = length === undefined ? reader.len : reader.pos + length;
204
- const message = createBaseShowToastRequest();
205
- while (reader.pos < end) {
206
- const tag = reader.uint32();
207
- switch (tag >>> 3) {
208
- case 1: {
209
- if (tag !== 10) {
210
- break;
211
- }
212
- message.id = reader.string();
213
- continue;
214
- }
215
- case 2: {
216
- if (tag !== 18) {
217
- break;
218
- }
219
- message.title = reader.string();
220
- continue;
221
- }
222
- case 3: {
223
- if (tag !== 26) {
224
- break;
225
- }
226
- message.message = reader.string();
227
- continue;
228
- }
229
- case 4: {
230
- if (tag !== 32) {
231
- break;
232
- }
233
- message.style = reader.int32();
234
- continue;
235
- }
236
- }
237
- if ((tag & 7) === 4 || tag === 0) {
238
- break;
239
- }
240
- reader.skip(tag & 7);
241
- }
242
- return message;
243
- },
244
- fromJSON(object) {
245
- return {
246
- id: isSet(object.id) ? globalThis.String(object.id) : "",
247
- title: isSet(object.title) ? globalThis.String(object.title) : "",
248
- message: isSet(object.message) ? globalThis.String(object.message) : "",
249
- style: isSet(object.style) ? toastStyleFromJSON(object.style) : 0,
250
- };
251
- },
252
- toJSON(message) {
253
- const obj = {};
254
- if (message.id !== "") {
255
- obj.id = message.id;
256
- }
257
- if (message.title !== "") {
258
- obj.title = message.title;
259
- }
260
- if (message.message !== "") {
261
- obj.message = message.message;
262
- }
263
- if (message.style !== 0) {
264
- obj.style = toastStyleToJSON(message.style);
265
- }
266
- return obj;
267
- },
268
- create(base) {
269
- return exports.ShowToastRequest.fromPartial(base ?? {});
270
- },
271
- fromPartial(object) {
272
- const message = createBaseShowToastRequest();
273
- message.id = object.id ?? "";
274
- message.title = object.title ?? "";
275
- message.message = object.message ?? "";
276
- message.style = object.style ?? 0;
277
- return message;
278
- },
279
- };
280
- function createBaseHideToastRequest() {
281
- return { id: "" };
282
- }
283
- exports.HideToastRequest = {
284
- encode(message, writer = new wire_1.BinaryWriter()) {
285
- if (message.id !== "") {
286
- writer.uint32(10).string(message.id);
287
- }
288
- return writer;
289
- },
290
- decode(input, length) {
291
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
292
- const end = length === undefined ? reader.len : reader.pos + length;
293
- const message = createBaseHideToastRequest();
294
- while (reader.pos < end) {
295
- const tag = reader.uint32();
296
- switch (tag >>> 3) {
297
- case 1: {
298
- if (tag !== 10) {
299
- break;
300
- }
301
- message.id = reader.string();
302
- continue;
303
- }
304
- }
305
- if ((tag & 7) === 4 || tag === 0) {
306
- break;
307
- }
308
- reader.skip(tag & 7);
309
- }
310
- return message;
311
- },
312
- fromJSON(object) {
313
- return { id: isSet(object.id) ? globalThis.String(object.id) : "" };
314
- },
315
- toJSON(message) {
316
- const obj = {};
317
- if (message.id !== "") {
318
- obj.id = message.id;
319
- }
320
- return obj;
321
- },
322
- create(base) {
323
- return exports.HideToastRequest.fromPartial(base ?? {});
324
- },
325
- fromPartial(object) {
326
- const message = createBaseHideToastRequest();
327
- message.id = object.id ?? "";
328
- return message;
329
- },
330
- };
331
- function createBaseUpdateToastRequest() {
332
- return { id: "", title: "" };
333
- }
334
- exports.UpdateToastRequest = {
335
- encode(message, writer = new wire_1.BinaryWriter()) {
336
- if (message.id !== "") {
337
- writer.uint32(10).string(message.id);
338
- }
339
- if (message.title !== "") {
340
- writer.uint32(18).string(message.title);
341
- }
342
- return writer;
343
- },
344
- decode(input, length) {
345
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
346
- const end = length === undefined ? reader.len : reader.pos + length;
347
- const message = createBaseUpdateToastRequest();
348
- while (reader.pos < end) {
349
- const tag = reader.uint32();
350
- switch (tag >>> 3) {
351
- case 1: {
352
- if (tag !== 10) {
353
- break;
354
- }
355
- message.id = reader.string();
356
- continue;
357
- }
358
- case 2: {
359
- if (tag !== 18) {
360
- break;
361
- }
362
- message.title = reader.string();
363
- continue;
364
- }
365
- }
366
- if ((tag & 7) === 4 || tag === 0) {
367
- break;
368
- }
369
- reader.skip(tag & 7);
370
- }
371
- return message;
372
- },
373
- fromJSON(object) {
374
- return {
375
- id: isSet(object.id) ? globalThis.String(object.id) : "",
376
- title: isSet(object.title) ? globalThis.String(object.title) : "",
377
- };
378
- },
379
- toJSON(message) {
380
- const obj = {};
381
- if (message.id !== "") {
382
- obj.id = message.id;
383
- }
384
- if (message.title !== "") {
385
- obj.title = message.title;
386
- }
387
- return obj;
388
- },
389
- create(base) {
390
- return exports.UpdateToastRequest.fromPartial(base ?? {});
391
- },
392
- fromPartial(object) {
393
- const message = createBaseUpdateToastRequest();
394
- message.id = object.id ?? "";
395
- message.title = object.title ?? "";
396
- return message;
397
- },
398
- };
399
- function createBasePushViewRequest() {
400
- return {};
401
- }
402
- exports.PushViewRequest = {
403
- encode(_, writer = new wire_1.BinaryWriter()) {
404
- return writer;
405
- },
406
- decode(input, length) {
407
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
408
- const end = length === undefined ? reader.len : reader.pos + length;
409
- const message = createBasePushViewRequest();
410
- while (reader.pos < end) {
411
- const tag = reader.uint32();
412
- switch (tag >>> 3) {
413
- }
414
- if ((tag & 7) === 4 || tag === 0) {
415
- break;
416
- }
417
- reader.skip(tag & 7);
418
- }
419
- return message;
420
- },
421
- fromJSON(_) {
422
- return {};
423
- },
424
- toJSON(_) {
425
- const obj = {};
426
- return obj;
427
- },
428
- create(base) {
429
- return exports.PushViewRequest.fromPartial(base ?? {});
430
- },
431
- fromPartial(_) {
432
- const message = createBasePushViewRequest();
433
- return message;
434
- },
435
- };
436
- function createBasePopViewRequest() {
437
- return {};
438
- }
439
- exports.PopViewRequest = {
440
- encode(_, writer = new wire_1.BinaryWriter()) {
441
- return writer;
442
- },
443
- decode(input, length) {
444
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
445
- const end = length === undefined ? reader.len : reader.pos + length;
446
- const message = createBasePopViewRequest();
447
- while (reader.pos < end) {
448
- const tag = reader.uint32();
449
- switch (tag >>> 3) {
450
- }
451
- if ((tag & 7) === 4 || tag === 0) {
452
- break;
453
- }
454
- reader.skip(tag & 7);
455
- }
456
- return message;
457
- },
458
- fromJSON(_) {
459
- return {};
460
- },
461
- toJSON(_) {
462
- const obj = {};
463
- return obj;
464
- },
465
- create(base) {
466
- return exports.PopViewRequest.fromPartial(base ?? {});
467
- },
468
- fromPartial(_) {
469
- const message = createBasePopViewRequest();
470
- return message;
471
- },
472
- };
473
- function createBaseCloseMainWindowRequest() {
474
- return { clearRootSearch: false, popToRoot: 0 };
475
- }
476
- exports.CloseMainWindowRequest = {
477
- encode(message, writer = new wire_1.BinaryWriter()) {
478
- if (message.clearRootSearch !== false) {
479
- writer.uint32(8).bool(message.clearRootSearch);
480
- }
481
- if (message.popToRoot !== 0) {
482
- writer.uint32(16).int32(message.popToRoot);
483
- }
484
- return writer;
485
- },
486
- decode(input, length) {
487
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
488
- const end = length === undefined ? reader.len : reader.pos + length;
489
- const message = createBaseCloseMainWindowRequest();
490
- while (reader.pos < end) {
491
- const tag = reader.uint32();
492
- switch (tag >>> 3) {
493
- case 1: {
494
- if (tag !== 8) {
495
- break;
496
- }
497
- message.clearRootSearch = reader.bool();
498
- continue;
499
- }
500
- case 2: {
501
- if (tag !== 16) {
502
- break;
503
- }
504
- message.popToRoot = reader.int32();
505
- continue;
506
- }
507
- }
508
- if ((tag & 7) === 4 || tag === 0) {
509
- break;
510
- }
511
- reader.skip(tag & 7);
512
- }
513
- return message;
514
- },
515
- fromJSON(object) {
516
- return {
517
- clearRootSearch: isSet(object.clearRootSearch) ? globalThis.Boolean(object.clearRootSearch) : false,
518
- popToRoot: isSet(object.popToRoot) ? popToRootTypeFromJSON(object.popToRoot) : 0,
519
- };
520
- },
521
- toJSON(message) {
522
- const obj = {};
523
- if (message.clearRootSearch !== false) {
524
- obj.clearRootSearch = message.clearRootSearch;
525
- }
526
- if (message.popToRoot !== 0) {
527
- obj.popToRoot = popToRootTypeToJSON(message.popToRoot);
528
- }
529
- return obj;
530
- },
531
- create(base) {
532
- return exports.CloseMainWindowRequest.fromPartial(base ?? {});
533
- },
534
- fromPartial(object) {
535
- const message = createBaseCloseMainWindowRequest();
536
- message.clearRootSearch = object.clearRootSearch ?? false;
537
- message.popToRoot = object.popToRoot ?? 0;
538
- return message;
539
- },
540
- };
541
- function createBaseClearSearchBarRequest() {
542
- return {};
543
- }
544
- exports.ClearSearchBarRequest = {
545
- encode(_, writer = new wire_1.BinaryWriter()) {
546
- return writer;
547
- },
548
- decode(input, length) {
549
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
550
- const end = length === undefined ? reader.len : reader.pos + length;
551
- const message = createBaseClearSearchBarRequest();
552
- while (reader.pos < end) {
553
- const tag = reader.uint32();
554
- switch (tag >>> 3) {
555
- }
556
- if ((tag & 7) === 4 || tag === 0) {
557
- break;
558
- }
559
- reader.skip(tag & 7);
560
- }
561
- return message;
562
- },
563
- fromJSON(_) {
564
- return {};
565
- },
566
- toJSON(_) {
567
- const obj = {};
568
- return obj;
569
- },
570
- create(base) {
571
- return exports.ClearSearchBarRequest.fromPartial(base ?? {});
572
- },
573
- fromPartial(_) {
574
- const message = createBaseClearSearchBarRequest();
575
- return message;
576
- },
577
- };
578
- function createBaseSetSearchTextRequest() {
579
- return { text: "" };
580
- }
581
- exports.SetSearchTextRequest = {
582
- encode(message, writer = new wire_1.BinaryWriter()) {
583
- if (message.text !== "") {
584
- writer.uint32(10).string(message.text);
585
- }
586
- return writer;
587
- },
588
- decode(input, length) {
589
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
590
- const end = length === undefined ? reader.len : reader.pos + length;
591
- const message = createBaseSetSearchTextRequest();
592
- while (reader.pos < end) {
593
- const tag = reader.uint32();
594
- switch (tag >>> 3) {
595
- case 1: {
596
- if (tag !== 10) {
597
- break;
598
- }
599
- message.text = reader.string();
600
- continue;
601
- }
602
- }
603
- if ((tag & 7) === 4 || tag === 0) {
604
- break;
605
- }
606
- reader.skip(tag & 7);
607
- }
608
- return message;
609
- },
610
- fromJSON(object) {
611
- return { text: isSet(object.text) ? globalThis.String(object.text) : "" };
612
- },
613
- toJSON(message) {
614
- const obj = {};
615
- if (message.text !== "") {
616
- obj.text = message.text;
617
- }
618
- return obj;
619
- },
620
- create(base) {
621
- return exports.SetSearchTextRequest.fromPartial(base ?? {});
622
- },
623
- fromPartial(object) {
624
- const message = createBaseSetSearchTextRequest();
625
- message.text = object.text ?? "";
626
- return message;
627
- },
628
- };
629
- function createBaseGetSelectedTextRequest() {
630
- return {};
631
- }
632
- exports.GetSelectedTextRequest = {
633
- encode(_, writer = new wire_1.BinaryWriter()) {
634
- return writer;
635
- },
636
- decode(input, length) {
637
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
638
- const end = length === undefined ? reader.len : reader.pos + length;
639
- const message = createBaseGetSelectedTextRequest();
640
- while (reader.pos < end) {
641
- const tag = reader.uint32();
642
- switch (tag >>> 3) {
643
- }
644
- if ((tag & 7) === 4 || tag === 0) {
645
- break;
646
- }
647
- reader.skip(tag & 7);
648
- }
649
- return message;
650
- },
651
- fromJSON(_) {
652
- return {};
653
- },
654
- toJSON(_) {
655
- const obj = {};
656
- return obj;
657
- },
658
- create(base) {
659
- return exports.GetSelectedTextRequest.fromPartial(base ?? {});
660
- },
661
- fromPartial(_) {
662
- const message = createBaseGetSelectedTextRequest();
663
- return message;
664
- },
665
- };
666
- function createBaseGetSelectedTextResponse() {
667
- return { text: "" };
668
- }
669
- exports.GetSelectedTextResponse = {
670
- encode(message, writer = new wire_1.BinaryWriter()) {
671
- if (message.text !== "") {
672
- writer.uint32(10).string(message.text);
673
- }
674
- return writer;
675
- },
676
- decode(input, length) {
677
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
678
- const end = length === undefined ? reader.len : reader.pos + length;
679
- const message = createBaseGetSelectedTextResponse();
680
- while (reader.pos < end) {
681
- const tag = reader.uint32();
682
- switch (tag >>> 3) {
683
- case 1: {
684
- if (tag !== 10) {
685
- break;
686
- }
687
- message.text = reader.string();
688
- continue;
689
- }
690
- }
691
- if ((tag & 7) === 4 || tag === 0) {
692
- break;
693
- }
694
- reader.skip(tag & 7);
695
- }
696
- return message;
697
- },
698
- fromJSON(object) {
699
- return { text: isSet(object.text) ? globalThis.String(object.text) : "" };
700
- },
701
- toJSON(message) {
702
- const obj = {};
703
- if (message.text !== "") {
704
- obj.text = message.text;
705
- }
706
- return obj;
707
- },
708
- create(base) {
709
- return exports.GetSelectedTextResponse.fromPartial(base ?? {});
710
- },
711
- fromPartial(object) {
712
- const message = createBaseGetSelectedTextResponse();
713
- message.text = object.text ?? "";
714
- return message;
715
- },
716
- };
717
- function createBaseShowHudRequest() {
718
- return { text: "", clearRootSearch: false, popToRoot: 0 };
719
- }
720
- exports.ShowHudRequest = {
721
- encode(message, writer = new wire_1.BinaryWriter()) {
722
- if (message.text !== "") {
723
- writer.uint32(10).string(message.text);
724
- }
725
- if (message.clearRootSearch !== false) {
726
- writer.uint32(16).bool(message.clearRootSearch);
727
- }
728
- if (message.popToRoot !== 0) {
729
- writer.uint32(24).int32(message.popToRoot);
730
- }
731
- return writer;
732
- },
733
- decode(input, length) {
734
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
735
- const end = length === undefined ? reader.len : reader.pos + length;
736
- const message = createBaseShowHudRequest();
737
- while (reader.pos < end) {
738
- const tag = reader.uint32();
739
- switch (tag >>> 3) {
740
- case 1: {
741
- if (tag !== 10) {
742
- break;
743
- }
744
- message.text = reader.string();
745
- continue;
746
- }
747
- case 2: {
748
- if (tag !== 16) {
749
- break;
750
- }
751
- message.clearRootSearch = reader.bool();
752
- continue;
753
- }
754
- case 3: {
755
- if (tag !== 24) {
756
- break;
757
- }
758
- message.popToRoot = reader.int32();
759
- continue;
760
- }
761
- }
762
- if ((tag & 7) === 4 || tag === 0) {
763
- break;
764
- }
765
- reader.skip(tag & 7);
766
- }
767
- return message;
768
- },
769
- fromJSON(object) {
770
- return {
771
- text: isSet(object.text) ? globalThis.String(object.text) : "",
772
- clearRootSearch: isSet(object.clearRootSearch) ? globalThis.Boolean(object.clearRootSearch) : false,
773
- popToRoot: isSet(object.popToRoot) ? popToRootTypeFromJSON(object.popToRoot) : 0,
774
- };
775
- },
776
- toJSON(message) {
777
- const obj = {};
778
- if (message.text !== "") {
779
- obj.text = message.text;
780
- }
781
- if (message.clearRootSearch !== false) {
782
- obj.clearRootSearch = message.clearRootSearch;
783
- }
784
- if (message.popToRoot !== 0) {
785
- obj.popToRoot = popToRootTypeToJSON(message.popToRoot);
786
- }
787
- return obj;
788
- },
789
- create(base) {
790
- return exports.ShowHudRequest.fromPartial(base ?? {});
791
- },
792
- fromPartial(object) {
793
- const message = createBaseShowHudRequest();
794
- message.text = object.text ?? "";
795
- message.clearRootSearch = object.clearRootSearch ?? false;
796
- message.popToRoot = object.popToRoot ?? 0;
797
- return message;
798
- },
799
- };
800
- function createBaseRenderRequest() {
801
- return { json: "" };
802
- }
803
- exports.RenderRequest = {
804
- encode(message, writer = new wire_1.BinaryWriter()) {
805
- if (message.json !== "") {
806
- writer.uint32(10).string(message.json);
807
- }
808
- return writer;
809
- },
810
- decode(input, length) {
811
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
812
- const end = length === undefined ? reader.len : reader.pos + length;
813
- const message = createBaseRenderRequest();
814
- while (reader.pos < end) {
815
- const tag = reader.uint32();
816
- switch (tag >>> 3) {
817
- case 1: {
818
- if (tag !== 10) {
819
- break;
820
- }
821
- message.json = reader.string();
822
- continue;
823
- }
824
- }
825
- if ((tag & 7) === 4 || tag === 0) {
826
- break;
827
- }
828
- reader.skip(tag & 7);
829
- }
830
- return message;
831
- },
832
- fromJSON(object) {
833
- return { json: isSet(object.json) ? globalThis.String(object.json) : "" };
834
- },
835
- toJSON(message) {
836
- const obj = {};
837
- if (message.json !== "") {
838
- obj.json = message.json;
839
- }
840
- return obj;
841
- },
842
- create(base) {
843
- return exports.RenderRequest.fromPartial(base ?? {});
844
- },
845
- fromPartial(object) {
846
- const message = createBaseRenderRequest();
847
- message.json = object.json ?? "";
848
- return message;
849
- },
850
- };
851
- function createBaseConfirmAlertRequest() {
852
- return {
853
- title: "",
854
- description: "",
855
- icon: undefined,
856
- dismissAction: undefined,
857
- primaryAction: undefined,
858
- rememberUserChoice: false,
859
- };
860
- }
861
- exports.ConfirmAlertRequest = {
862
- encode(message, writer = new wire_1.BinaryWriter()) {
863
- if (message.title !== "") {
864
- writer.uint32(10).string(message.title);
865
- }
866
- if (message.description !== "") {
867
- writer.uint32(18).string(message.description);
868
- }
869
- if (message.icon !== undefined) {
870
- exports.Image.encode(message.icon, writer.uint32(26).fork()).join();
871
- }
872
- if (message.dismissAction !== undefined) {
873
- exports.ConfirmAlertAction.encode(message.dismissAction, writer.uint32(34).fork()).join();
874
- }
875
- if (message.primaryAction !== undefined) {
876
- exports.ConfirmAlertAction.encode(message.primaryAction, writer.uint32(42).fork()).join();
877
- }
878
- if (message.rememberUserChoice !== false) {
879
- writer.uint32(48).bool(message.rememberUserChoice);
880
- }
881
- return writer;
882
- },
883
- decode(input, length) {
884
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
885
- const end = length === undefined ? reader.len : reader.pos + length;
886
- const message = createBaseConfirmAlertRequest();
887
- while (reader.pos < end) {
888
- const tag = reader.uint32();
889
- switch (tag >>> 3) {
890
- case 1: {
891
- if (tag !== 10) {
892
- break;
893
- }
894
- message.title = reader.string();
895
- continue;
896
- }
897
- case 2: {
898
- if (tag !== 18) {
899
- break;
900
- }
901
- message.description = reader.string();
902
- continue;
903
- }
904
- case 3: {
905
- if (tag !== 26) {
906
- break;
907
- }
908
- message.icon = exports.Image.decode(reader, reader.uint32());
909
- continue;
910
- }
911
- case 4: {
912
- if (tag !== 34) {
913
- break;
914
- }
915
- message.dismissAction = exports.ConfirmAlertAction.decode(reader, reader.uint32());
916
- continue;
917
- }
918
- case 5: {
919
- if (tag !== 42) {
920
- break;
921
- }
922
- message.primaryAction = exports.ConfirmAlertAction.decode(reader, reader.uint32());
923
- continue;
924
- }
925
- case 6: {
926
- if (tag !== 48) {
927
- break;
928
- }
929
- message.rememberUserChoice = reader.bool();
930
- continue;
931
- }
932
- }
933
- if ((tag & 7) === 4 || tag === 0) {
934
- break;
935
- }
936
- reader.skip(tag & 7);
937
- }
938
- return message;
939
- },
940
- fromJSON(object) {
941
- return {
942
- title: isSet(object.title) ? globalThis.String(object.title) : "",
943
- description: isSet(object.description) ? globalThis.String(object.description) : "",
944
- icon: isSet(object.icon) ? exports.Image.fromJSON(object.icon) : undefined,
945
- dismissAction: isSet(object.dismissAction) ? exports.ConfirmAlertAction.fromJSON(object.dismissAction) : undefined,
946
- primaryAction: isSet(object.primaryAction) ? exports.ConfirmAlertAction.fromJSON(object.primaryAction) : undefined,
947
- rememberUserChoice: isSet(object.rememberUserChoice) ? globalThis.Boolean(object.rememberUserChoice) : false,
948
- };
949
- },
950
- toJSON(message) {
951
- const obj = {};
952
- if (message.title !== "") {
953
- obj.title = message.title;
954
- }
955
- if (message.description !== "") {
956
- obj.description = message.description;
957
- }
958
- if (message.icon !== undefined) {
959
- obj.icon = exports.Image.toJSON(message.icon);
960
- }
961
- if (message.dismissAction !== undefined) {
962
- obj.dismissAction = exports.ConfirmAlertAction.toJSON(message.dismissAction);
963
- }
964
- if (message.primaryAction !== undefined) {
965
- obj.primaryAction = exports.ConfirmAlertAction.toJSON(message.primaryAction);
966
- }
967
- if (message.rememberUserChoice !== false) {
968
- obj.rememberUserChoice = message.rememberUserChoice;
969
- }
970
- return obj;
971
- },
972
- create(base) {
973
- return exports.ConfirmAlertRequest.fromPartial(base ?? {});
974
- },
975
- fromPartial(object) {
976
- const message = createBaseConfirmAlertRequest();
977
- message.title = object.title ?? "";
978
- message.description = object.description ?? "";
979
- message.icon = (object.icon !== undefined && object.icon !== null) ? exports.Image.fromPartial(object.icon) : undefined;
980
- message.dismissAction = (object.dismissAction !== undefined && object.dismissAction !== null)
981
- ? exports.ConfirmAlertAction.fromPartial(object.dismissAction)
982
- : undefined;
983
- message.primaryAction = (object.primaryAction !== undefined && object.primaryAction !== null)
984
- ? exports.ConfirmAlertAction.fromPartial(object.primaryAction)
985
- : undefined;
986
- message.rememberUserChoice = object.rememberUserChoice ?? false;
987
- return message;
988
- },
989
- };
990
- function createBaseConfirmAlertResponse() {
991
- return { confirmed: false };
992
- }
993
- exports.ConfirmAlertResponse = {
994
- encode(message, writer = new wire_1.BinaryWriter()) {
995
- if (message.confirmed !== false) {
996
- writer.uint32(8).bool(message.confirmed);
997
- }
998
- return writer;
999
- },
1000
- decode(input, length) {
1001
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1002
- const end = length === undefined ? reader.len : reader.pos + length;
1003
- const message = createBaseConfirmAlertResponse();
1004
- while (reader.pos < end) {
1005
- const tag = reader.uint32();
1006
- switch (tag >>> 3) {
1007
- case 1: {
1008
- if (tag !== 8) {
1009
- break;
1010
- }
1011
- message.confirmed = reader.bool();
1012
- continue;
1013
- }
1014
- }
1015
- if ((tag & 7) === 4 || tag === 0) {
1016
- break;
1017
- }
1018
- reader.skip(tag & 7);
1019
- }
1020
- return message;
1021
- },
1022
- fromJSON(object) {
1023
- return { confirmed: isSet(object.confirmed) ? globalThis.Boolean(object.confirmed) : false };
1024
- },
1025
- toJSON(message) {
1026
- const obj = {};
1027
- if (message.confirmed !== false) {
1028
- obj.confirmed = message.confirmed;
1029
- }
1030
- return obj;
1031
- },
1032
- create(base) {
1033
- return exports.ConfirmAlertResponse.fromPartial(base ?? {});
1034
- },
1035
- fromPartial(object) {
1036
- const message = createBaseConfirmAlertResponse();
1037
- message.confirmed = object.confirmed ?? false;
1038
- return message;
1039
- },
1040
- };
1041
- function createBaseConfirmAlertAction() {
1042
- return { title: "", style: 0 };
1043
- }
1044
- exports.ConfirmAlertAction = {
1045
- encode(message, writer = new wire_1.BinaryWriter()) {
1046
- if (message.title !== "") {
1047
- writer.uint32(10).string(message.title);
1048
- }
1049
- if (message.style !== 0) {
1050
- writer.uint32(16).int32(message.style);
1051
- }
1052
- return writer;
1053
- },
1054
- decode(input, length) {
1055
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1056
- const end = length === undefined ? reader.len : reader.pos + length;
1057
- const message = createBaseConfirmAlertAction();
1058
- while (reader.pos < end) {
1059
- const tag = reader.uint32();
1060
- switch (tag >>> 3) {
1061
- case 1: {
1062
- if (tag !== 10) {
1063
- break;
1064
- }
1065
- message.title = reader.string();
1066
- continue;
1067
- }
1068
- case 2: {
1069
- if (tag !== 16) {
1070
- break;
1071
- }
1072
- message.style = reader.int32();
1073
- continue;
1074
- }
1075
- }
1076
- if ((tag & 7) === 4 || tag === 0) {
1077
- break;
1078
- }
1079
- reader.skip(tag & 7);
1080
- }
1081
- return message;
1082
- },
1083
- fromJSON(object) {
1084
- return {
1085
- title: isSet(object.title) ? globalThis.String(object.title) : "",
1086
- style: isSet(object.style) ? confirmAlertActionStyleFromJSON(object.style) : 0,
1087
- };
1088
- },
1089
- toJSON(message) {
1090
- const obj = {};
1091
- if (message.title !== "") {
1092
- obj.title = message.title;
1093
- }
1094
- if (message.style !== 0) {
1095
- obj.style = confirmAlertActionStyleToJSON(message.style);
1096
- }
1097
- return obj;
1098
- },
1099
- create(base) {
1100
- return exports.ConfirmAlertAction.fromPartial(base ?? {});
1101
- },
1102
- fromPartial(object) {
1103
- const message = createBaseConfirmAlertAction();
1104
- message.title = object.title ?? "";
1105
- message.style = object.style ?? 0;
1106
- return message;
1107
- },
1108
- };
1109
- function createBasePopToRootRequest() {
1110
- return { clearSearchBar: false };
1111
- }
1112
- exports.PopToRootRequest = {
1113
- encode(message, writer = new wire_1.BinaryWriter()) {
1114
- if (message.clearSearchBar !== false) {
1115
- writer.uint32(8).bool(message.clearSearchBar);
1116
- }
1117
- return writer;
1118
- },
1119
- decode(input, length) {
1120
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1121
- const end = length === undefined ? reader.len : reader.pos + length;
1122
- const message = createBasePopToRootRequest();
1123
- while (reader.pos < end) {
1124
- const tag = reader.uint32();
1125
- switch (tag >>> 3) {
1126
- case 1: {
1127
- if (tag !== 8) {
1128
- break;
1129
- }
1130
- message.clearSearchBar = reader.bool();
1131
- continue;
1132
- }
1133
- }
1134
- if ((tag & 7) === 4 || tag === 0) {
1135
- break;
1136
- }
1137
- reader.skip(tag & 7);
1138
- }
1139
- return message;
1140
- },
1141
- fromJSON(object) {
1142
- return { clearSearchBar: isSet(object.clearSearchBar) ? globalThis.Boolean(object.clearSearchBar) : false };
1143
- },
1144
- toJSON(message) {
1145
- const obj = {};
1146
- if (message.clearSearchBar !== false) {
1147
- obj.clearSearchBar = message.clearSearchBar;
1148
- }
1149
- return obj;
1150
- },
1151
- create(base) {
1152
- return exports.PopToRootRequest.fromPartial(base ?? {});
1153
- },
1154
- fromPartial(object) {
1155
- const message = createBasePopToRootRequest();
1156
- message.clearSearchBar = object.clearSearchBar ?? false;
1157
- return message;
1158
- },
1159
- };
1160
- function createBaseRequest() {
1161
- return {
1162
- render: undefined,
1163
- showToast: undefined,
1164
- hideToast: undefined,
1165
- updateToast: undefined,
1166
- pushView: undefined,
1167
- popView: undefined,
1168
- clearSearch: undefined,
1169
- closeMainWindow: undefined,
1170
- showHud: undefined,
1171
- setSearchText: undefined,
1172
- confirmAlert: undefined,
1173
- getSelectedText: undefined,
1174
- popToRoot: undefined,
1175
- };
1176
- }
1177
- exports.Request = {
1178
- encode(message, writer = new wire_1.BinaryWriter()) {
1179
- if (message.render !== undefined) {
1180
- exports.RenderRequest.encode(message.render, writer.uint32(10).fork()).join();
1181
- }
1182
- if (message.showToast !== undefined) {
1183
- exports.ShowToastRequest.encode(message.showToast, writer.uint32(18).fork()).join();
1184
- }
1185
- if (message.hideToast !== undefined) {
1186
- exports.HideToastRequest.encode(message.hideToast, writer.uint32(26).fork()).join();
1187
- }
1188
- if (message.updateToast !== undefined) {
1189
- exports.UpdateToastRequest.encode(message.updateToast, writer.uint32(34).fork()).join();
1190
- }
1191
- if (message.pushView !== undefined) {
1192
- exports.PushViewRequest.encode(message.pushView, writer.uint32(42).fork()).join();
1193
- }
1194
- if (message.popView !== undefined) {
1195
- exports.PopViewRequest.encode(message.popView, writer.uint32(50).fork()).join();
1196
- }
1197
- if (message.clearSearch !== undefined) {
1198
- exports.ClearSearchBarRequest.encode(message.clearSearch, writer.uint32(58).fork()).join();
1199
- }
1200
- if (message.closeMainWindow !== undefined) {
1201
- exports.CloseMainWindowRequest.encode(message.closeMainWindow, writer.uint32(66).fork()).join();
1202
- }
1203
- if (message.showHud !== undefined) {
1204
- exports.ShowHudRequest.encode(message.showHud, writer.uint32(74).fork()).join();
1205
- }
1206
- if (message.setSearchText !== undefined) {
1207
- exports.SetSearchTextRequest.encode(message.setSearchText, writer.uint32(82).fork()).join();
1208
- }
1209
- if (message.confirmAlert !== undefined) {
1210
- exports.ConfirmAlertRequest.encode(message.confirmAlert, writer.uint32(90).fork()).join();
1211
- }
1212
- if (message.getSelectedText !== undefined) {
1213
- exports.GetSelectedTextRequest.encode(message.getSelectedText, writer.uint32(98).fork()).join();
1214
- }
1215
- if (message.popToRoot !== undefined) {
1216
- exports.PopToRootRequest.encode(message.popToRoot, writer.uint32(106).fork()).join();
1217
- }
1218
- return writer;
1219
- },
1220
- decode(input, length) {
1221
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1222
- const end = length === undefined ? reader.len : reader.pos + length;
1223
- const message = createBaseRequest();
1224
- while (reader.pos < end) {
1225
- const tag = reader.uint32();
1226
- switch (tag >>> 3) {
1227
- case 1: {
1228
- if (tag !== 10) {
1229
- break;
1230
- }
1231
- message.render = exports.RenderRequest.decode(reader, reader.uint32());
1232
- continue;
1233
- }
1234
- case 2: {
1235
- if (tag !== 18) {
1236
- break;
1237
- }
1238
- message.showToast = exports.ShowToastRequest.decode(reader, reader.uint32());
1239
- continue;
1240
- }
1241
- case 3: {
1242
- if (tag !== 26) {
1243
- break;
1244
- }
1245
- message.hideToast = exports.HideToastRequest.decode(reader, reader.uint32());
1246
- continue;
1247
- }
1248
- case 4: {
1249
- if (tag !== 34) {
1250
- break;
1251
- }
1252
- message.updateToast = exports.UpdateToastRequest.decode(reader, reader.uint32());
1253
- continue;
1254
- }
1255
- case 5: {
1256
- if (tag !== 42) {
1257
- break;
1258
- }
1259
- message.pushView = exports.PushViewRequest.decode(reader, reader.uint32());
1260
- continue;
1261
- }
1262
- case 6: {
1263
- if (tag !== 50) {
1264
- break;
1265
- }
1266
- message.popView = exports.PopViewRequest.decode(reader, reader.uint32());
1267
- continue;
1268
- }
1269
- case 7: {
1270
- if (tag !== 58) {
1271
- break;
1272
- }
1273
- message.clearSearch = exports.ClearSearchBarRequest.decode(reader, reader.uint32());
1274
- continue;
1275
- }
1276
- case 8: {
1277
- if (tag !== 66) {
1278
- break;
1279
- }
1280
- message.closeMainWindow = exports.CloseMainWindowRequest.decode(reader, reader.uint32());
1281
- continue;
1282
- }
1283
- case 9: {
1284
- if (tag !== 74) {
1285
- break;
1286
- }
1287
- message.showHud = exports.ShowHudRequest.decode(reader, reader.uint32());
1288
- continue;
1289
- }
1290
- case 10: {
1291
- if (tag !== 82) {
1292
- break;
1293
- }
1294
- message.setSearchText = exports.SetSearchTextRequest.decode(reader, reader.uint32());
1295
- continue;
1296
- }
1297
- case 11: {
1298
- if (tag !== 90) {
1299
- break;
1300
- }
1301
- message.confirmAlert = exports.ConfirmAlertRequest.decode(reader, reader.uint32());
1302
- continue;
1303
- }
1304
- case 12: {
1305
- if (tag !== 98) {
1306
- break;
1307
- }
1308
- message.getSelectedText = exports.GetSelectedTextRequest.decode(reader, reader.uint32());
1309
- continue;
1310
- }
1311
- case 13: {
1312
- if (tag !== 106) {
1313
- break;
1314
- }
1315
- message.popToRoot = exports.PopToRootRequest.decode(reader, reader.uint32());
1316
- continue;
1317
- }
1318
- }
1319
- if ((tag & 7) === 4 || tag === 0) {
1320
- break;
1321
- }
1322
- reader.skip(tag & 7);
1323
- }
1324
- return message;
1325
- },
1326
- fromJSON(object) {
1327
- return {
1328
- render: isSet(object.render) ? exports.RenderRequest.fromJSON(object.render) : undefined,
1329
- showToast: isSet(object.showToast) ? exports.ShowToastRequest.fromJSON(object.showToast) : undefined,
1330
- hideToast: isSet(object.hideToast) ? exports.HideToastRequest.fromJSON(object.hideToast) : undefined,
1331
- updateToast: isSet(object.updateToast) ? exports.UpdateToastRequest.fromJSON(object.updateToast) : undefined,
1332
- pushView: isSet(object.pushView) ? exports.PushViewRequest.fromJSON(object.pushView) : undefined,
1333
- popView: isSet(object.popView) ? exports.PopViewRequest.fromJSON(object.popView) : undefined,
1334
- clearSearch: isSet(object.clearSearch) ? exports.ClearSearchBarRequest.fromJSON(object.clearSearch) : undefined,
1335
- closeMainWindow: isSet(object.closeMainWindow)
1336
- ? exports.CloseMainWindowRequest.fromJSON(object.closeMainWindow)
1337
- : undefined,
1338
- showHud: isSet(object.showHud) ? exports.ShowHudRequest.fromJSON(object.showHud) : undefined,
1339
- setSearchText: isSet(object.setSearchText) ? exports.SetSearchTextRequest.fromJSON(object.setSearchText) : undefined,
1340
- confirmAlert: isSet(object.confirmAlert) ? exports.ConfirmAlertRequest.fromJSON(object.confirmAlert) : undefined,
1341
- getSelectedText: isSet(object.getSelectedText)
1342
- ? exports.GetSelectedTextRequest.fromJSON(object.getSelectedText)
1343
- : undefined,
1344
- popToRoot: isSet(object.popToRoot) ? exports.PopToRootRequest.fromJSON(object.popToRoot) : undefined,
1345
- };
1346
- },
1347
- toJSON(message) {
1348
- const obj = {};
1349
- if (message.render !== undefined) {
1350
- obj.render = exports.RenderRequest.toJSON(message.render);
1351
- }
1352
- if (message.showToast !== undefined) {
1353
- obj.showToast = exports.ShowToastRequest.toJSON(message.showToast);
1354
- }
1355
- if (message.hideToast !== undefined) {
1356
- obj.hideToast = exports.HideToastRequest.toJSON(message.hideToast);
1357
- }
1358
- if (message.updateToast !== undefined) {
1359
- obj.updateToast = exports.UpdateToastRequest.toJSON(message.updateToast);
1360
- }
1361
- if (message.pushView !== undefined) {
1362
- obj.pushView = exports.PushViewRequest.toJSON(message.pushView);
1363
- }
1364
- if (message.popView !== undefined) {
1365
- obj.popView = exports.PopViewRequest.toJSON(message.popView);
1366
- }
1367
- if (message.clearSearch !== undefined) {
1368
- obj.clearSearch = exports.ClearSearchBarRequest.toJSON(message.clearSearch);
1369
- }
1370
- if (message.closeMainWindow !== undefined) {
1371
- obj.closeMainWindow = exports.CloseMainWindowRequest.toJSON(message.closeMainWindow);
1372
- }
1373
- if (message.showHud !== undefined) {
1374
- obj.showHud = exports.ShowHudRequest.toJSON(message.showHud);
1375
- }
1376
- if (message.setSearchText !== undefined) {
1377
- obj.setSearchText = exports.SetSearchTextRequest.toJSON(message.setSearchText);
1378
- }
1379
- if (message.confirmAlert !== undefined) {
1380
- obj.confirmAlert = exports.ConfirmAlertRequest.toJSON(message.confirmAlert);
1381
- }
1382
- if (message.getSelectedText !== undefined) {
1383
- obj.getSelectedText = exports.GetSelectedTextRequest.toJSON(message.getSelectedText);
1384
- }
1385
- if (message.popToRoot !== undefined) {
1386
- obj.popToRoot = exports.PopToRootRequest.toJSON(message.popToRoot);
1387
- }
1388
- return obj;
1389
- },
1390
- create(base) {
1391
- return exports.Request.fromPartial(base ?? {});
1392
- },
1393
- fromPartial(object) {
1394
- const message = createBaseRequest();
1395
- message.render = (object.render !== undefined && object.render !== null)
1396
- ? exports.RenderRequest.fromPartial(object.render)
1397
- : undefined;
1398
- message.showToast = (object.showToast !== undefined && object.showToast !== null)
1399
- ? exports.ShowToastRequest.fromPartial(object.showToast)
1400
- : undefined;
1401
- message.hideToast = (object.hideToast !== undefined && object.hideToast !== null)
1402
- ? exports.HideToastRequest.fromPartial(object.hideToast)
1403
- : undefined;
1404
- message.updateToast = (object.updateToast !== undefined && object.updateToast !== null)
1405
- ? exports.UpdateToastRequest.fromPartial(object.updateToast)
1406
- : undefined;
1407
- message.pushView = (object.pushView !== undefined && object.pushView !== null)
1408
- ? exports.PushViewRequest.fromPartial(object.pushView)
1409
- : undefined;
1410
- message.popView = (object.popView !== undefined && object.popView !== null)
1411
- ? exports.PopViewRequest.fromPartial(object.popView)
1412
- : undefined;
1413
- message.clearSearch = (object.clearSearch !== undefined && object.clearSearch !== null)
1414
- ? exports.ClearSearchBarRequest.fromPartial(object.clearSearch)
1415
- : undefined;
1416
- message.closeMainWindow = (object.closeMainWindow !== undefined && object.closeMainWindow !== null)
1417
- ? exports.CloseMainWindowRequest.fromPartial(object.closeMainWindow)
1418
- : undefined;
1419
- message.showHud = (object.showHud !== undefined && object.showHud !== null)
1420
- ? exports.ShowHudRequest.fromPartial(object.showHud)
1421
- : undefined;
1422
- message.setSearchText = (object.setSearchText !== undefined && object.setSearchText !== null)
1423
- ? exports.SetSearchTextRequest.fromPartial(object.setSearchText)
1424
- : undefined;
1425
- message.confirmAlert = (object.confirmAlert !== undefined && object.confirmAlert !== null)
1426
- ? exports.ConfirmAlertRequest.fromPartial(object.confirmAlert)
1427
- : undefined;
1428
- message.getSelectedText = (object.getSelectedText !== undefined && object.getSelectedText !== null)
1429
- ? exports.GetSelectedTextRequest.fromPartial(object.getSelectedText)
1430
- : undefined;
1431
- message.popToRoot = (object.popToRoot !== undefined && object.popToRoot !== null)
1432
- ? exports.PopToRootRequest.fromPartial(object.popToRoot)
1433
- : undefined;
1434
- return message;
1435
- },
1436
- };
1437
- function createBaseResponse() {
1438
- return {
1439
- render: undefined,
1440
- showToast: undefined,
1441
- hideToast: undefined,
1442
- updateToast: undefined,
1443
- pushView: undefined,
1444
- popView: undefined,
1445
- clearSearch: undefined,
1446
- closeMainWindow: undefined,
1447
- showHud: undefined,
1448
- setSearchText: undefined,
1449
- confirmAlert: undefined,
1450
- getSelectedText: undefined,
1451
- popToRoot: undefined,
1452
- };
1453
- }
1454
- exports.Response = {
1455
- encode(message, writer = new wire_1.BinaryWriter()) {
1456
- if (message.render !== undefined) {
1457
- common_1.AckResponse.encode(message.render, writer.uint32(10).fork()).join();
1458
- }
1459
- if (message.showToast !== undefined) {
1460
- common_1.AckResponse.encode(message.showToast, writer.uint32(18).fork()).join();
1461
- }
1462
- if (message.hideToast !== undefined) {
1463
- common_1.AckResponse.encode(message.hideToast, writer.uint32(26).fork()).join();
1464
- }
1465
- if (message.updateToast !== undefined) {
1466
- common_1.AckResponse.encode(message.updateToast, writer.uint32(34).fork()).join();
1467
- }
1468
- if (message.pushView !== undefined) {
1469
- common_1.AckResponse.encode(message.pushView, writer.uint32(42).fork()).join();
1470
- }
1471
- if (message.popView !== undefined) {
1472
- common_1.AckResponse.encode(message.popView, writer.uint32(50).fork()).join();
1473
- }
1474
- if (message.clearSearch !== undefined) {
1475
- common_1.AckResponse.encode(message.clearSearch, writer.uint32(58).fork()).join();
1476
- }
1477
- if (message.closeMainWindow !== undefined) {
1478
- common_1.AckResponse.encode(message.closeMainWindow, writer.uint32(66).fork()).join();
1479
- }
1480
- if (message.showHud !== undefined) {
1481
- common_1.AckResponse.encode(message.showHud, writer.uint32(74).fork()).join();
1482
- }
1483
- if (message.setSearchText !== undefined) {
1484
- common_1.AckResponse.encode(message.setSearchText, writer.uint32(82).fork()).join();
1485
- }
1486
- if (message.confirmAlert !== undefined) {
1487
- exports.ConfirmAlertResponse.encode(message.confirmAlert, writer.uint32(90).fork()).join();
1488
- }
1489
- if (message.getSelectedText !== undefined) {
1490
- exports.GetSelectedTextResponse.encode(message.getSelectedText, writer.uint32(98).fork()).join();
1491
- }
1492
- if (message.popToRoot !== undefined) {
1493
- common_1.AckResponse.encode(message.popToRoot, writer.uint32(106).fork()).join();
1494
- }
1495
- return writer;
1496
- },
1497
- decode(input, length) {
1498
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1499
- const end = length === undefined ? reader.len : reader.pos + length;
1500
- const message = createBaseResponse();
1501
- while (reader.pos < end) {
1502
- const tag = reader.uint32();
1503
- switch (tag >>> 3) {
1504
- case 1: {
1505
- if (tag !== 10) {
1506
- break;
1507
- }
1508
- message.render = common_1.AckResponse.decode(reader, reader.uint32());
1509
- continue;
1510
- }
1511
- case 2: {
1512
- if (tag !== 18) {
1513
- break;
1514
- }
1515
- message.showToast = common_1.AckResponse.decode(reader, reader.uint32());
1516
- continue;
1517
- }
1518
- case 3: {
1519
- if (tag !== 26) {
1520
- break;
1521
- }
1522
- message.hideToast = common_1.AckResponse.decode(reader, reader.uint32());
1523
- continue;
1524
- }
1525
- case 4: {
1526
- if (tag !== 34) {
1527
- break;
1528
- }
1529
- message.updateToast = common_1.AckResponse.decode(reader, reader.uint32());
1530
- continue;
1531
- }
1532
- case 5: {
1533
- if (tag !== 42) {
1534
- break;
1535
- }
1536
- message.pushView = common_1.AckResponse.decode(reader, reader.uint32());
1537
- continue;
1538
- }
1539
- case 6: {
1540
- if (tag !== 50) {
1541
- break;
1542
- }
1543
- message.popView = common_1.AckResponse.decode(reader, reader.uint32());
1544
- continue;
1545
- }
1546
- case 7: {
1547
- if (tag !== 58) {
1548
- break;
1549
- }
1550
- message.clearSearch = common_1.AckResponse.decode(reader, reader.uint32());
1551
- continue;
1552
- }
1553
- case 8: {
1554
- if (tag !== 66) {
1555
- break;
1556
- }
1557
- message.closeMainWindow = common_1.AckResponse.decode(reader, reader.uint32());
1558
- continue;
1559
- }
1560
- case 9: {
1561
- if (tag !== 74) {
1562
- break;
1563
- }
1564
- message.showHud = common_1.AckResponse.decode(reader, reader.uint32());
1565
- continue;
1566
- }
1567
- case 10: {
1568
- if (tag !== 82) {
1569
- break;
1570
- }
1571
- message.setSearchText = common_1.AckResponse.decode(reader, reader.uint32());
1572
- continue;
1573
- }
1574
- case 11: {
1575
- if (tag !== 90) {
1576
- break;
1577
- }
1578
- message.confirmAlert = exports.ConfirmAlertResponse.decode(reader, reader.uint32());
1579
- continue;
1580
- }
1581
- case 12: {
1582
- if (tag !== 98) {
1583
- break;
1584
- }
1585
- message.getSelectedText = exports.GetSelectedTextResponse.decode(reader, reader.uint32());
1586
- continue;
1587
- }
1588
- case 13: {
1589
- if (tag !== 106) {
1590
- break;
1591
- }
1592
- message.popToRoot = common_1.AckResponse.decode(reader, reader.uint32());
1593
- continue;
1594
- }
1595
- }
1596
- if ((tag & 7) === 4 || tag === 0) {
1597
- break;
1598
- }
1599
- reader.skip(tag & 7);
1600
- }
1601
- return message;
1602
- },
1603
- fromJSON(object) {
1604
- return {
1605
- render: isSet(object.render) ? common_1.AckResponse.fromJSON(object.render) : undefined,
1606
- showToast: isSet(object.showToast) ? common_1.AckResponse.fromJSON(object.showToast) : undefined,
1607
- hideToast: isSet(object.hideToast) ? common_1.AckResponse.fromJSON(object.hideToast) : undefined,
1608
- updateToast: isSet(object.updateToast) ? common_1.AckResponse.fromJSON(object.updateToast) : undefined,
1609
- pushView: isSet(object.pushView) ? common_1.AckResponse.fromJSON(object.pushView) : undefined,
1610
- popView: isSet(object.popView) ? common_1.AckResponse.fromJSON(object.popView) : undefined,
1611
- clearSearch: isSet(object.clearSearch) ? common_1.AckResponse.fromJSON(object.clearSearch) : undefined,
1612
- closeMainWindow: isSet(object.closeMainWindow) ? common_1.AckResponse.fromJSON(object.closeMainWindow) : undefined,
1613
- showHud: isSet(object.showHud) ? common_1.AckResponse.fromJSON(object.showHud) : undefined,
1614
- setSearchText: isSet(object.setSearchText) ? common_1.AckResponse.fromJSON(object.setSearchText) : undefined,
1615
- confirmAlert: isSet(object.confirmAlert) ? exports.ConfirmAlertResponse.fromJSON(object.confirmAlert) : undefined,
1616
- getSelectedText: isSet(object.getSelectedText)
1617
- ? exports.GetSelectedTextResponse.fromJSON(object.getSelectedText)
1618
- : undefined,
1619
- popToRoot: isSet(object.popToRoot) ? common_1.AckResponse.fromJSON(object.popToRoot) : undefined,
1620
- };
1621
- },
1622
- toJSON(message) {
1623
- const obj = {};
1624
- if (message.render !== undefined) {
1625
- obj.render = common_1.AckResponse.toJSON(message.render);
1626
- }
1627
- if (message.showToast !== undefined) {
1628
- obj.showToast = common_1.AckResponse.toJSON(message.showToast);
1629
- }
1630
- if (message.hideToast !== undefined) {
1631
- obj.hideToast = common_1.AckResponse.toJSON(message.hideToast);
1632
- }
1633
- if (message.updateToast !== undefined) {
1634
- obj.updateToast = common_1.AckResponse.toJSON(message.updateToast);
1635
- }
1636
- if (message.pushView !== undefined) {
1637
- obj.pushView = common_1.AckResponse.toJSON(message.pushView);
1638
- }
1639
- if (message.popView !== undefined) {
1640
- obj.popView = common_1.AckResponse.toJSON(message.popView);
1641
- }
1642
- if (message.clearSearch !== undefined) {
1643
- obj.clearSearch = common_1.AckResponse.toJSON(message.clearSearch);
1644
- }
1645
- if (message.closeMainWindow !== undefined) {
1646
- obj.closeMainWindow = common_1.AckResponse.toJSON(message.closeMainWindow);
1647
- }
1648
- if (message.showHud !== undefined) {
1649
- obj.showHud = common_1.AckResponse.toJSON(message.showHud);
1650
- }
1651
- if (message.setSearchText !== undefined) {
1652
- obj.setSearchText = common_1.AckResponse.toJSON(message.setSearchText);
1653
- }
1654
- if (message.confirmAlert !== undefined) {
1655
- obj.confirmAlert = exports.ConfirmAlertResponse.toJSON(message.confirmAlert);
1656
- }
1657
- if (message.getSelectedText !== undefined) {
1658
- obj.getSelectedText = exports.GetSelectedTextResponse.toJSON(message.getSelectedText);
1659
- }
1660
- if (message.popToRoot !== undefined) {
1661
- obj.popToRoot = common_1.AckResponse.toJSON(message.popToRoot);
1662
- }
1663
- return obj;
1664
- },
1665
- create(base) {
1666
- return exports.Response.fromPartial(base ?? {});
1667
- },
1668
- fromPartial(object) {
1669
- const message = createBaseResponse();
1670
- message.render = (object.render !== undefined && object.render !== null)
1671
- ? common_1.AckResponse.fromPartial(object.render)
1672
- : undefined;
1673
- message.showToast = (object.showToast !== undefined && object.showToast !== null)
1674
- ? common_1.AckResponse.fromPartial(object.showToast)
1675
- : undefined;
1676
- message.hideToast = (object.hideToast !== undefined && object.hideToast !== null)
1677
- ? common_1.AckResponse.fromPartial(object.hideToast)
1678
- : undefined;
1679
- message.updateToast = (object.updateToast !== undefined && object.updateToast !== null)
1680
- ? common_1.AckResponse.fromPartial(object.updateToast)
1681
- : undefined;
1682
- message.pushView = (object.pushView !== undefined && object.pushView !== null)
1683
- ? common_1.AckResponse.fromPartial(object.pushView)
1684
- : undefined;
1685
- message.popView = (object.popView !== undefined && object.popView !== null)
1686
- ? common_1.AckResponse.fromPartial(object.popView)
1687
- : undefined;
1688
- message.clearSearch = (object.clearSearch !== undefined && object.clearSearch !== null)
1689
- ? common_1.AckResponse.fromPartial(object.clearSearch)
1690
- : undefined;
1691
- message.closeMainWindow = (object.closeMainWindow !== undefined && object.closeMainWindow !== null)
1692
- ? common_1.AckResponse.fromPartial(object.closeMainWindow)
1693
- : undefined;
1694
- message.showHud = (object.showHud !== undefined && object.showHud !== null)
1695
- ? common_1.AckResponse.fromPartial(object.showHud)
1696
- : undefined;
1697
- message.setSearchText = (object.setSearchText !== undefined && object.setSearchText !== null)
1698
- ? common_1.AckResponse.fromPartial(object.setSearchText)
1699
- : undefined;
1700
- message.confirmAlert = (object.confirmAlert !== undefined && object.confirmAlert !== null)
1701
- ? exports.ConfirmAlertResponse.fromPartial(object.confirmAlert)
1702
- : undefined;
1703
- message.getSelectedText = (object.getSelectedText !== undefined && object.getSelectedText !== null)
1704
- ? exports.GetSelectedTextResponse.fromPartial(object.getSelectedText)
1705
- : undefined;
1706
- message.popToRoot = (object.popToRoot !== undefined && object.popToRoot !== null)
1707
- ? common_1.AckResponse.fromPartial(object.popToRoot)
1708
- : undefined;
1709
- return message;
1710
- },
1711
- };
1712
- function createBaseRenderNode() {
1713
- return { type: "", hasDirtyChild: false, hasDirtyProps: false, props: {}, children: [] };
1714
- }
1715
- exports.RenderNode = {
1716
- encode(message, writer = new wire_1.BinaryWriter()) {
1717
- if (message.type !== "") {
1718
- writer.uint32(10).string(message.type);
1719
- }
1720
- if (message.hasDirtyChild !== false) {
1721
- writer.uint32(16).bool(message.hasDirtyChild);
1722
- }
1723
- if (message.hasDirtyProps !== false) {
1724
- writer.uint32(24).bool(message.hasDirtyProps);
1725
- }
1726
- Object.entries(message.props).forEach(([key, value]) => {
1727
- if (value !== undefined) {
1728
- exports.RenderNode_PropsEntry.encode({ key: key, value }, writer.uint32(34).fork()).join();
1729
- }
1730
- });
1731
- for (const v of message.children) {
1732
- exports.RenderNode.encode(v, writer.uint32(42).fork()).join();
1733
- }
1734
- return writer;
1735
- },
1736
- decode(input, length) {
1737
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1738
- const end = length === undefined ? reader.len : reader.pos + length;
1739
- const message = createBaseRenderNode();
1740
- while (reader.pos < end) {
1741
- const tag = reader.uint32();
1742
- switch (tag >>> 3) {
1743
- case 1: {
1744
- if (tag !== 10) {
1745
- break;
1746
- }
1747
- message.type = reader.string();
1748
- continue;
1749
- }
1750
- case 2: {
1751
- if (tag !== 16) {
1752
- break;
1753
- }
1754
- message.hasDirtyChild = reader.bool();
1755
- continue;
1756
- }
1757
- case 3: {
1758
- if (tag !== 24) {
1759
- break;
1760
- }
1761
- message.hasDirtyProps = reader.bool();
1762
- continue;
1763
- }
1764
- case 4: {
1765
- if (tag !== 34) {
1766
- break;
1767
- }
1768
- const entry4 = exports.RenderNode_PropsEntry.decode(reader, reader.uint32());
1769
- if (entry4.value !== undefined) {
1770
- message.props[entry4.key] = entry4.value;
1771
- }
1772
- continue;
1773
- }
1774
- case 5: {
1775
- if (tag !== 42) {
1776
- break;
1777
- }
1778
- message.children.push(exports.RenderNode.decode(reader, reader.uint32()));
1779
- continue;
1780
- }
1781
- }
1782
- if ((tag & 7) === 4 || tag === 0) {
1783
- break;
1784
- }
1785
- reader.skip(tag & 7);
1786
- }
1787
- return message;
1788
- },
1789
- fromJSON(object) {
1790
- return {
1791
- type: isSet(object.type) ? globalThis.String(object.type) : "",
1792
- hasDirtyChild: isSet(object.hasDirtyChild) ? globalThis.Boolean(object.hasDirtyChild) : false,
1793
- hasDirtyProps: isSet(object.hasDirtyProps) ? globalThis.Boolean(object.hasDirtyProps) : false,
1794
- props: isObject(object.props)
1795
- ? Object.entries(object.props).reduce((acc, [key, value]) => {
1796
- acc[key] = value;
1797
- return acc;
1798
- }, {})
1799
- : {},
1800
- children: globalThis.Array.isArray(object?.children)
1801
- ? object.children.map((e) => exports.RenderNode.fromJSON(e))
1802
- : [],
1803
- };
1804
- },
1805
- toJSON(message) {
1806
- const obj = {};
1807
- if (message.type !== "") {
1808
- obj.type = message.type;
1809
- }
1810
- if (message.hasDirtyChild !== false) {
1811
- obj.hasDirtyChild = message.hasDirtyChild;
1812
- }
1813
- if (message.hasDirtyProps !== false) {
1814
- obj.hasDirtyProps = message.hasDirtyProps;
1815
- }
1816
- if (message.props) {
1817
- const entries = Object.entries(message.props);
1818
- if (entries.length > 0) {
1819
- obj.props = {};
1820
- entries.forEach(([k, v]) => {
1821
- obj.props[k] = v;
1822
- });
1823
- }
1824
- }
1825
- if (message.children?.length) {
1826
- obj.children = message.children.map((e) => exports.RenderNode.toJSON(e));
1827
- }
1828
- return obj;
1829
- },
1830
- create(base) {
1831
- return exports.RenderNode.fromPartial(base ?? {});
1832
- },
1833
- fromPartial(object) {
1834
- const message = createBaseRenderNode();
1835
- message.type = object.type ?? "";
1836
- message.hasDirtyChild = object.hasDirtyChild ?? false;
1837
- message.hasDirtyProps = object.hasDirtyProps ?? false;
1838
- message.props = Object.entries(object.props ?? {}).reduce((acc, [key, value]) => {
1839
- if (value !== undefined) {
1840
- acc[key] = value;
1841
- }
1842
- return acc;
1843
- }, {});
1844
- message.children = object.children?.map((e) => exports.RenderNode.fromPartial(e)) || [];
1845
- return message;
1846
- },
1847
- };
1848
- function createBaseRenderNode_PropsEntry() {
1849
- return { key: "", value: undefined };
1850
- }
1851
- exports.RenderNode_PropsEntry = {
1852
- encode(message, writer = new wire_1.BinaryWriter()) {
1853
- if (message.key !== "") {
1854
- writer.uint32(10).string(message.key);
1855
- }
1856
- if (message.value !== undefined) {
1857
- struct_1.Value.encode(struct_1.Value.wrap(message.value), writer.uint32(18).fork()).join();
1858
- }
1859
- return writer;
1860
- },
1861
- decode(input, length) {
1862
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1863
- const end = length === undefined ? reader.len : reader.pos + length;
1864
- const message = createBaseRenderNode_PropsEntry();
1865
- while (reader.pos < end) {
1866
- const tag = reader.uint32();
1867
- switch (tag >>> 3) {
1868
- case 1: {
1869
- if (tag !== 10) {
1870
- break;
1871
- }
1872
- message.key = reader.string();
1873
- continue;
1874
- }
1875
- case 2: {
1876
- if (tag !== 18) {
1877
- break;
1878
- }
1879
- message.value = struct_1.Value.unwrap(struct_1.Value.decode(reader, reader.uint32()));
1880
- continue;
1881
- }
1882
- }
1883
- if ((tag & 7) === 4 || tag === 0) {
1884
- break;
1885
- }
1886
- reader.skip(tag & 7);
1887
- }
1888
- return message;
1889
- },
1890
- fromJSON(object) {
1891
- return {
1892
- key: isSet(object.key) ? globalThis.String(object.key) : "",
1893
- value: isSet(object?.value) ? object.value : undefined,
1894
- };
1895
- },
1896
- toJSON(message) {
1897
- const obj = {};
1898
- if (message.key !== "") {
1899
- obj.key = message.key;
1900
- }
1901
- if (message.value !== undefined) {
1902
- obj.value = message.value;
1903
- }
1904
- return obj;
1905
- },
1906
- create(base) {
1907
- return exports.RenderNode_PropsEntry.fromPartial(base ?? {});
1908
- },
1909
- fromPartial(object) {
1910
- const message = createBaseRenderNode_PropsEntry();
1911
- message.key = object.key ?? "";
1912
- message.value = object.value ?? undefined;
1913
- return message;
1914
- },
1915
- };
1916
- function createBaseThemedImageSource() {
1917
- return { light: "", dark: "" };
1918
- }
1919
- exports.ThemedImageSource = {
1920
- encode(message, writer = new wire_1.BinaryWriter()) {
1921
- if (message.light !== "") {
1922
- writer.uint32(10).string(message.light);
1923
- }
1924
- if (message.dark !== "") {
1925
- writer.uint32(18).string(message.dark);
1926
- }
1927
- return writer;
1928
- },
1929
- decode(input, length) {
1930
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1931
- const end = length === undefined ? reader.len : reader.pos + length;
1932
- const message = createBaseThemedImageSource();
1933
- while (reader.pos < end) {
1934
- const tag = reader.uint32();
1935
- switch (tag >>> 3) {
1936
- case 1: {
1937
- if (tag !== 10) {
1938
- break;
1939
- }
1940
- message.light = reader.string();
1941
- continue;
1942
- }
1943
- case 2: {
1944
- if (tag !== 18) {
1945
- break;
1946
- }
1947
- message.dark = reader.string();
1948
- continue;
1949
- }
1950
- }
1951
- if ((tag & 7) === 4 || tag === 0) {
1952
- break;
1953
- }
1954
- reader.skip(tag & 7);
1955
- }
1956
- return message;
1957
- },
1958
- fromJSON(object) {
1959
- return {
1960
- light: isSet(object.light) ? globalThis.String(object.light) : "",
1961
- dark: isSet(object.dark) ? globalThis.String(object.dark) : "",
1962
- };
1963
- },
1964
- toJSON(message) {
1965
- const obj = {};
1966
- if (message.light !== "") {
1967
- obj.light = message.light;
1968
- }
1969
- if (message.dark !== "") {
1970
- obj.dark = message.dark;
1971
- }
1972
- return obj;
1973
- },
1974
- create(base) {
1975
- return exports.ThemedImageSource.fromPartial(base ?? {});
1976
- },
1977
- fromPartial(object) {
1978
- const message = createBaseThemedImageSource();
1979
- message.light = object.light ?? "";
1980
- message.dark = object.dark ?? "";
1981
- return message;
1982
- },
1983
- };
1984
- function createBaseImageSource() {
1985
- return { raw: undefined, themed: undefined };
1986
- }
1987
- exports.ImageSource = {
1988
- encode(message, writer = new wire_1.BinaryWriter()) {
1989
- if (message.raw !== undefined) {
1990
- writer.uint32(10).string(message.raw);
1991
- }
1992
- if (message.themed !== undefined) {
1993
- exports.ThemedImageSource.encode(message.themed, writer.uint32(18).fork()).join();
1994
- }
1995
- return writer;
1996
- },
1997
- decode(input, length) {
1998
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1999
- const end = length === undefined ? reader.len : reader.pos + length;
2000
- const message = createBaseImageSource();
2001
- while (reader.pos < end) {
2002
- const tag = reader.uint32();
2003
- switch (tag >>> 3) {
2004
- case 1: {
2005
- if (tag !== 10) {
2006
- break;
2007
- }
2008
- message.raw = reader.string();
2009
- continue;
2010
- }
2011
- case 2: {
2012
- if (tag !== 18) {
2013
- break;
2014
- }
2015
- message.themed = exports.ThemedImageSource.decode(reader, reader.uint32());
2016
- continue;
2017
- }
2018
- }
2019
- if ((tag & 7) === 4 || tag === 0) {
2020
- break;
2021
- }
2022
- reader.skip(tag & 7);
2023
- }
2024
- return message;
2025
- },
2026
- fromJSON(object) {
2027
- return {
2028
- raw: isSet(object.raw) ? globalThis.String(object.raw) : undefined,
2029
- themed: isSet(object.themed) ? exports.ThemedImageSource.fromJSON(object.themed) : undefined,
2030
- };
2031
- },
2032
- toJSON(message) {
2033
- const obj = {};
2034
- if (message.raw !== undefined) {
2035
- obj.raw = message.raw;
2036
- }
2037
- if (message.themed !== undefined) {
2038
- obj.themed = exports.ThemedImageSource.toJSON(message.themed);
2039
- }
2040
- return obj;
2041
- },
2042
- create(base) {
2043
- return exports.ImageSource.fromPartial(base ?? {});
2044
- },
2045
- fromPartial(object) {
2046
- const message = createBaseImageSource();
2047
- message.raw = object.raw ?? undefined;
2048
- message.themed = (object.themed !== undefined && object.themed !== null)
2049
- ? exports.ThemedImageSource.fromPartial(object.themed)
2050
- : undefined;
2051
- return message;
2052
- },
2053
- };
2054
- function createBaseDynamicColor() {
2055
- return { light: "", dark: "", adjustContrast: undefined };
2056
- }
2057
- exports.DynamicColor = {
2058
- encode(message, writer = new wire_1.BinaryWriter()) {
2059
- if (message.light !== "") {
2060
- writer.uint32(10).string(message.light);
2061
- }
2062
- if (message.dark !== "") {
2063
- writer.uint32(18).string(message.dark);
2064
- }
2065
- if (message.adjustContrast !== undefined) {
2066
- writer.uint32(24).bool(message.adjustContrast);
2067
- }
2068
- return writer;
2069
- },
2070
- decode(input, length) {
2071
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2072
- const end = length === undefined ? reader.len : reader.pos + length;
2073
- const message = createBaseDynamicColor();
2074
- while (reader.pos < end) {
2075
- const tag = reader.uint32();
2076
- switch (tag >>> 3) {
2077
- case 1: {
2078
- if (tag !== 10) {
2079
- break;
2080
- }
2081
- message.light = reader.string();
2082
- continue;
2083
- }
2084
- case 2: {
2085
- if (tag !== 18) {
2086
- break;
2087
- }
2088
- message.dark = reader.string();
2089
- continue;
2090
- }
2091
- case 3: {
2092
- if (tag !== 24) {
2093
- break;
2094
- }
2095
- message.adjustContrast = reader.bool();
2096
- continue;
2097
- }
2098
- }
2099
- if ((tag & 7) === 4 || tag === 0) {
2100
- break;
2101
- }
2102
- reader.skip(tag & 7);
2103
- }
2104
- return message;
2105
- },
2106
- fromJSON(object) {
2107
- return {
2108
- light: isSet(object.light) ? globalThis.String(object.light) : "",
2109
- dark: isSet(object.dark) ? globalThis.String(object.dark) : "",
2110
- adjustContrast: isSet(object.adjustContrast) ? globalThis.Boolean(object.adjustContrast) : undefined,
2111
- };
2112
- },
2113
- toJSON(message) {
2114
- const obj = {};
2115
- if (message.light !== "") {
2116
- obj.light = message.light;
2117
- }
2118
- if (message.dark !== "") {
2119
- obj.dark = message.dark;
2120
- }
2121
- if (message.adjustContrast !== undefined) {
2122
- obj.adjustContrast = message.adjustContrast;
2123
- }
2124
- return obj;
2125
- },
2126
- create(base) {
2127
- return exports.DynamicColor.fromPartial(base ?? {});
2128
- },
2129
- fromPartial(object) {
2130
- const message = createBaseDynamicColor();
2131
- message.light = object.light ?? "";
2132
- message.dark = object.dark ?? "";
2133
- message.adjustContrast = object.adjustContrast ?? undefined;
2134
- return message;
2135
- },
2136
- };
2137
- function createBaseColorLike() {
2138
- return { raw: undefined, dynamic: undefined };
2139
- }
2140
- exports.ColorLike = {
2141
- encode(message, writer = new wire_1.BinaryWriter()) {
2142
- if (message.raw !== undefined) {
2143
- writer.uint32(10).string(message.raw);
2144
- }
2145
- if (message.dynamic !== undefined) {
2146
- exports.DynamicColor.encode(message.dynamic, writer.uint32(18).fork()).join();
2147
- }
2148
- return writer;
2149
- },
2150
- decode(input, length) {
2151
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2152
- const end = length === undefined ? reader.len : reader.pos + length;
2153
- const message = createBaseColorLike();
2154
- while (reader.pos < end) {
2155
- const tag = reader.uint32();
2156
- switch (tag >>> 3) {
2157
- case 1: {
2158
- if (tag !== 10) {
2159
- break;
2160
- }
2161
- message.raw = reader.string();
2162
- continue;
2163
- }
2164
- case 2: {
2165
- if (tag !== 18) {
2166
- break;
2167
- }
2168
- message.dynamic = exports.DynamicColor.decode(reader, reader.uint32());
2169
- continue;
2170
- }
2171
- }
2172
- if ((tag & 7) === 4 || tag === 0) {
2173
- break;
2174
- }
2175
- reader.skip(tag & 7);
2176
- }
2177
- return message;
2178
- },
2179
- fromJSON(object) {
2180
- return {
2181
- raw: isSet(object.raw) ? globalThis.String(object.raw) : undefined,
2182
- dynamic: isSet(object.dynamic) ? exports.DynamicColor.fromJSON(object.dynamic) : undefined,
2183
- };
2184
- },
2185
- toJSON(message) {
2186
- const obj = {};
2187
- if (message.raw !== undefined) {
2188
- obj.raw = message.raw;
2189
- }
2190
- if (message.dynamic !== undefined) {
2191
- obj.dynamic = exports.DynamicColor.toJSON(message.dynamic);
2192
- }
2193
- return obj;
2194
- },
2195
- create(base) {
2196
- return exports.ColorLike.fromPartial(base ?? {});
2197
- },
2198
- fromPartial(object) {
2199
- const message = createBaseColorLike();
2200
- message.raw = object.raw ?? undefined;
2201
- message.dynamic = (object.dynamic !== undefined && object.dynamic !== null)
2202
- ? exports.DynamicColor.fromPartial(object.dynamic)
2203
- : undefined;
2204
- return message;
2205
- },
2206
- };
2207
- function createBaseImage() {
2208
- return { source: undefined, fallback: undefined, mask: undefined, tintColor: undefined };
2209
- }
2210
- exports.Image = {
2211
- encode(message, writer = new wire_1.BinaryWriter()) {
2212
- if (message.source !== undefined) {
2213
- exports.ImageSource.encode(message.source, writer.uint32(10).fork()).join();
2214
- }
2215
- if (message.fallback !== undefined) {
2216
- exports.ImageSource.encode(message.fallback, writer.uint32(18).fork()).join();
2217
- }
2218
- if (message.mask !== undefined) {
2219
- writer.uint32(24).int32(message.mask);
2220
- }
2221
- if (message.tintColor !== undefined) {
2222
- exports.ColorLike.encode(message.tintColor, writer.uint32(34).fork()).join();
2223
- }
2224
- return writer;
2225
- },
2226
- decode(input, length) {
2227
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2228
- const end = length === undefined ? reader.len : reader.pos + length;
2229
- const message = createBaseImage();
2230
- while (reader.pos < end) {
2231
- const tag = reader.uint32();
2232
- switch (tag >>> 3) {
2233
- case 1: {
2234
- if (tag !== 10) {
2235
- break;
2236
- }
2237
- message.source = exports.ImageSource.decode(reader, reader.uint32());
2238
- continue;
2239
- }
2240
- case 2: {
2241
- if (tag !== 18) {
2242
- break;
2243
- }
2244
- message.fallback = exports.ImageSource.decode(reader, reader.uint32());
2245
- continue;
2246
- }
2247
- case 3: {
2248
- if (tag !== 24) {
2249
- break;
2250
- }
2251
- message.mask = reader.int32();
2252
- continue;
2253
- }
2254
- case 4: {
2255
- if (tag !== 34) {
2256
- break;
2257
- }
2258
- message.tintColor = exports.ColorLike.decode(reader, reader.uint32());
2259
- continue;
2260
- }
2261
- }
2262
- if ((tag & 7) === 4 || tag === 0) {
2263
- break;
2264
- }
2265
- reader.skip(tag & 7);
2266
- }
2267
- return message;
2268
- },
2269
- fromJSON(object) {
2270
- return {
2271
- source: isSet(object.source) ? exports.ImageSource.fromJSON(object.source) : undefined,
2272
- fallback: isSet(object.fallback) ? exports.ImageSource.fromJSON(object.fallback) : undefined,
2273
- mask: isSet(object.mask) ? imageMaskFromJSON(object.mask) : undefined,
2274
- tintColor: isSet(object.tintColor) ? exports.ColorLike.fromJSON(object.tintColor) : undefined,
2275
- };
2276
- },
2277
- toJSON(message) {
2278
- const obj = {};
2279
- if (message.source !== undefined) {
2280
- obj.source = exports.ImageSource.toJSON(message.source);
2281
- }
2282
- if (message.fallback !== undefined) {
2283
- obj.fallback = exports.ImageSource.toJSON(message.fallback);
2284
- }
2285
- if (message.mask !== undefined) {
2286
- obj.mask = imageMaskToJSON(message.mask);
2287
- }
2288
- if (message.tintColor !== undefined) {
2289
- obj.tintColor = exports.ColorLike.toJSON(message.tintColor);
2290
- }
2291
- return obj;
2292
- },
2293
- create(base) {
2294
- return exports.Image.fromPartial(base ?? {});
2295
- },
2296
- fromPartial(object) {
2297
- const message = createBaseImage();
2298
- message.source = (object.source !== undefined && object.source !== null)
2299
- ? exports.ImageSource.fromPartial(object.source)
2300
- : undefined;
2301
- message.fallback = (object.fallback !== undefined && object.fallback !== null)
2302
- ? exports.ImageSource.fromPartial(object.fallback)
2303
- : undefined;
2304
- message.mask = object.mask ?? undefined;
2305
- message.tintColor = (object.tintColor !== undefined && object.tintColor !== null)
2306
- ? exports.ColorLike.fromPartial(object.tintColor)
2307
- : undefined;
2308
- return message;
2309
- },
2310
- };
2311
- function isObject(value) {
2312
- return typeof value === "object" && value !== null;
2313
- }
2314
- function isSet(value) {
2315
- return value !== null && value !== undefined;
2316
- }