@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,929 +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: clipboard.proto
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.Response = exports.Request = exports.PasteToClipboardResponse = exports.CopyToClipboardResponse = exports.ClipboardReadContent = exports.ClipboardContent = exports.PasteToClipboardRequest = exports.CopyToClipboardRequest = exports.ReadContentResponse = exports.ReadContentRequest = exports.ClearResponse = exports.ClearRequest = exports.ClipboardOptions = exports.ClipboardPathContent = exports.ClipboardHtmlContent = exports.protobufPackage = void 0;
9
- /* eslint-disable */
10
- const wire_1 = require("@bufbuild/protobuf/wire");
11
- exports.protobufPackage = "proto.ext.clipboard";
12
- function createBaseClipboardHtmlContent() {
13
- return { html: "", text: "" };
14
- }
15
- exports.ClipboardHtmlContent = {
16
- encode(message, writer = new wire_1.BinaryWriter()) {
17
- if (message.html !== "") {
18
- writer.uint32(10).string(message.html);
19
- }
20
- if (message.text !== "") {
21
- writer.uint32(18).string(message.text);
22
- }
23
- return writer;
24
- },
25
- decode(input, length) {
26
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
27
- const end = length === undefined ? reader.len : reader.pos + length;
28
- const message = createBaseClipboardHtmlContent();
29
- while (reader.pos < end) {
30
- const tag = reader.uint32();
31
- switch (tag >>> 3) {
32
- case 1: {
33
- if (tag !== 10) {
34
- break;
35
- }
36
- message.html = reader.string();
37
- continue;
38
- }
39
- case 2: {
40
- if (tag !== 18) {
41
- break;
42
- }
43
- message.text = reader.string();
44
- continue;
45
- }
46
- }
47
- if ((tag & 7) === 4 || tag === 0) {
48
- break;
49
- }
50
- reader.skip(tag & 7);
51
- }
52
- return message;
53
- },
54
- fromJSON(object) {
55
- return {
56
- html: isSet(object.html) ? globalThis.String(object.html) : "",
57
- text: isSet(object.text) ? globalThis.String(object.text) : "",
58
- };
59
- },
60
- toJSON(message) {
61
- const obj = {};
62
- if (message.html !== "") {
63
- obj.html = message.html;
64
- }
65
- if (message.text !== "") {
66
- obj.text = message.text;
67
- }
68
- return obj;
69
- },
70
- create(base) {
71
- return exports.ClipboardHtmlContent.fromPartial(base ?? {});
72
- },
73
- fromPartial(object) {
74
- const message = createBaseClipboardHtmlContent();
75
- message.html = object.html ?? "";
76
- message.text = object.text ?? "";
77
- return message;
78
- },
79
- };
80
- function createBaseClipboardPathContent() {
81
- return { path: "" };
82
- }
83
- exports.ClipboardPathContent = {
84
- encode(message, writer = new wire_1.BinaryWriter()) {
85
- if (message.path !== "") {
86
- writer.uint32(10).string(message.path);
87
- }
88
- return writer;
89
- },
90
- decode(input, length) {
91
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
92
- const end = length === undefined ? reader.len : reader.pos + length;
93
- const message = createBaseClipboardPathContent();
94
- while (reader.pos < end) {
95
- const tag = reader.uint32();
96
- switch (tag >>> 3) {
97
- case 1: {
98
- if (tag !== 10) {
99
- break;
100
- }
101
- message.path = reader.string();
102
- continue;
103
- }
104
- }
105
- if ((tag & 7) === 4 || tag === 0) {
106
- break;
107
- }
108
- reader.skip(tag & 7);
109
- }
110
- return message;
111
- },
112
- fromJSON(object) {
113
- return { path: isSet(object.path) ? globalThis.String(object.path) : "" };
114
- },
115
- toJSON(message) {
116
- const obj = {};
117
- if (message.path !== "") {
118
- obj.path = message.path;
119
- }
120
- return obj;
121
- },
122
- create(base) {
123
- return exports.ClipboardPathContent.fromPartial(base ?? {});
124
- },
125
- fromPartial(object) {
126
- const message = createBaseClipboardPathContent();
127
- message.path = object.path ?? "";
128
- return message;
129
- },
130
- };
131
- function createBaseClipboardOptions() {
132
- return { concealed: false };
133
- }
134
- exports.ClipboardOptions = {
135
- encode(message, writer = new wire_1.BinaryWriter()) {
136
- if (message.concealed !== false) {
137
- writer.uint32(8).bool(message.concealed);
138
- }
139
- return writer;
140
- },
141
- decode(input, length) {
142
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
143
- const end = length === undefined ? reader.len : reader.pos + length;
144
- const message = createBaseClipboardOptions();
145
- while (reader.pos < end) {
146
- const tag = reader.uint32();
147
- switch (tag >>> 3) {
148
- case 1: {
149
- if (tag !== 8) {
150
- break;
151
- }
152
- message.concealed = reader.bool();
153
- continue;
154
- }
155
- }
156
- if ((tag & 7) === 4 || tag === 0) {
157
- break;
158
- }
159
- reader.skip(tag & 7);
160
- }
161
- return message;
162
- },
163
- fromJSON(object) {
164
- return { concealed: isSet(object.concealed) ? globalThis.Boolean(object.concealed) : false };
165
- },
166
- toJSON(message) {
167
- const obj = {};
168
- if (message.concealed !== false) {
169
- obj.concealed = message.concealed;
170
- }
171
- return obj;
172
- },
173
- create(base) {
174
- return exports.ClipboardOptions.fromPartial(base ?? {});
175
- },
176
- fromPartial(object) {
177
- const message = createBaseClipboardOptions();
178
- message.concealed = object.concealed ?? false;
179
- return message;
180
- },
181
- };
182
- function createBaseClearRequest() {
183
- return {};
184
- }
185
- exports.ClearRequest = {
186
- encode(_, writer = new wire_1.BinaryWriter()) {
187
- return writer;
188
- },
189
- decode(input, length) {
190
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
191
- const end = length === undefined ? reader.len : reader.pos + length;
192
- const message = createBaseClearRequest();
193
- while (reader.pos < end) {
194
- const tag = reader.uint32();
195
- switch (tag >>> 3) {
196
- }
197
- if ((tag & 7) === 4 || tag === 0) {
198
- break;
199
- }
200
- reader.skip(tag & 7);
201
- }
202
- return message;
203
- },
204
- fromJSON(_) {
205
- return {};
206
- },
207
- toJSON(_) {
208
- const obj = {};
209
- return obj;
210
- },
211
- create(base) {
212
- return exports.ClearRequest.fromPartial(base ?? {});
213
- },
214
- fromPartial(_) {
215
- const message = createBaseClearRequest();
216
- return message;
217
- },
218
- };
219
- function createBaseClearResponse() {
220
- return {};
221
- }
222
- exports.ClearResponse = {
223
- encode(_, writer = new wire_1.BinaryWriter()) {
224
- return writer;
225
- },
226
- decode(input, length) {
227
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
228
- const end = length === undefined ? reader.len : reader.pos + length;
229
- const message = createBaseClearResponse();
230
- while (reader.pos < end) {
231
- const tag = reader.uint32();
232
- switch (tag >>> 3) {
233
- }
234
- if ((tag & 7) === 4 || tag === 0) {
235
- break;
236
- }
237
- reader.skip(tag & 7);
238
- }
239
- return message;
240
- },
241
- fromJSON(_) {
242
- return {};
243
- },
244
- toJSON(_) {
245
- const obj = {};
246
- return obj;
247
- },
248
- create(base) {
249
- return exports.ClearResponse.fromPartial(base ?? {});
250
- },
251
- fromPartial(_) {
252
- const message = createBaseClearResponse();
253
- return message;
254
- },
255
- };
256
- function createBaseReadContentRequest() {
257
- return {};
258
- }
259
- exports.ReadContentRequest = {
260
- encode(_, writer = new wire_1.BinaryWriter()) {
261
- return writer;
262
- },
263
- decode(input, length) {
264
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
265
- const end = length === undefined ? reader.len : reader.pos + length;
266
- const message = createBaseReadContentRequest();
267
- while (reader.pos < end) {
268
- const tag = reader.uint32();
269
- switch (tag >>> 3) {
270
- }
271
- if ((tag & 7) === 4 || tag === 0) {
272
- break;
273
- }
274
- reader.skip(tag & 7);
275
- }
276
- return message;
277
- },
278
- fromJSON(_) {
279
- return {};
280
- },
281
- toJSON(_) {
282
- const obj = {};
283
- return obj;
284
- },
285
- create(base) {
286
- return exports.ReadContentRequest.fromPartial(base ?? {});
287
- },
288
- fromPartial(_) {
289
- const message = createBaseReadContentRequest();
290
- return message;
291
- },
292
- };
293
- function createBaseReadContentResponse() {
294
- return { content: undefined };
295
- }
296
- exports.ReadContentResponse = {
297
- encode(message, writer = new wire_1.BinaryWriter()) {
298
- if (message.content !== undefined) {
299
- exports.ClipboardReadContent.encode(message.content, writer.uint32(10).fork()).join();
300
- }
301
- return writer;
302
- },
303
- decode(input, length) {
304
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
305
- const end = length === undefined ? reader.len : reader.pos + length;
306
- const message = createBaseReadContentResponse();
307
- while (reader.pos < end) {
308
- const tag = reader.uint32();
309
- switch (tag >>> 3) {
310
- case 1: {
311
- if (tag !== 10) {
312
- break;
313
- }
314
- message.content = exports.ClipboardReadContent.decode(reader, reader.uint32());
315
- continue;
316
- }
317
- }
318
- if ((tag & 7) === 4 || tag === 0) {
319
- break;
320
- }
321
- reader.skip(tag & 7);
322
- }
323
- return message;
324
- },
325
- fromJSON(object) {
326
- return { content: isSet(object.content) ? exports.ClipboardReadContent.fromJSON(object.content) : undefined };
327
- },
328
- toJSON(message) {
329
- const obj = {};
330
- if (message.content !== undefined) {
331
- obj.content = exports.ClipboardReadContent.toJSON(message.content);
332
- }
333
- return obj;
334
- },
335
- create(base) {
336
- return exports.ReadContentResponse.fromPartial(base ?? {});
337
- },
338
- fromPartial(object) {
339
- const message = createBaseReadContentResponse();
340
- message.content = (object.content !== undefined && object.content !== null)
341
- ? exports.ClipboardReadContent.fromPartial(object.content)
342
- : undefined;
343
- return message;
344
- },
345
- };
346
- function createBaseCopyToClipboardRequest() {
347
- return { content: undefined, options: undefined };
348
- }
349
- exports.CopyToClipboardRequest = {
350
- encode(message, writer = new wire_1.BinaryWriter()) {
351
- if (message.content !== undefined) {
352
- exports.ClipboardContent.encode(message.content, writer.uint32(10).fork()).join();
353
- }
354
- if (message.options !== undefined) {
355
- exports.ClipboardOptions.encode(message.options, writer.uint32(18).fork()).join();
356
- }
357
- return writer;
358
- },
359
- decode(input, length) {
360
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
361
- const end = length === undefined ? reader.len : reader.pos + length;
362
- const message = createBaseCopyToClipboardRequest();
363
- while (reader.pos < end) {
364
- const tag = reader.uint32();
365
- switch (tag >>> 3) {
366
- case 1: {
367
- if (tag !== 10) {
368
- break;
369
- }
370
- message.content = exports.ClipboardContent.decode(reader, reader.uint32());
371
- continue;
372
- }
373
- case 2: {
374
- if (tag !== 18) {
375
- break;
376
- }
377
- message.options = exports.ClipboardOptions.decode(reader, reader.uint32());
378
- continue;
379
- }
380
- }
381
- if ((tag & 7) === 4 || tag === 0) {
382
- break;
383
- }
384
- reader.skip(tag & 7);
385
- }
386
- return message;
387
- },
388
- fromJSON(object) {
389
- return {
390
- content: isSet(object.content) ? exports.ClipboardContent.fromJSON(object.content) : undefined,
391
- options: isSet(object.options) ? exports.ClipboardOptions.fromJSON(object.options) : undefined,
392
- };
393
- },
394
- toJSON(message) {
395
- const obj = {};
396
- if (message.content !== undefined) {
397
- obj.content = exports.ClipboardContent.toJSON(message.content);
398
- }
399
- if (message.options !== undefined) {
400
- obj.options = exports.ClipboardOptions.toJSON(message.options);
401
- }
402
- return obj;
403
- },
404
- create(base) {
405
- return exports.CopyToClipboardRequest.fromPartial(base ?? {});
406
- },
407
- fromPartial(object) {
408
- const message = createBaseCopyToClipboardRequest();
409
- message.content = (object.content !== undefined && object.content !== null)
410
- ? exports.ClipboardContent.fromPartial(object.content)
411
- : undefined;
412
- message.options = (object.options !== undefined && object.options !== null)
413
- ? exports.ClipboardOptions.fromPartial(object.options)
414
- : undefined;
415
- return message;
416
- },
417
- };
418
- function createBasePasteToClipboardRequest() {
419
- return { content: undefined };
420
- }
421
- exports.PasteToClipboardRequest = {
422
- encode(message, writer = new wire_1.BinaryWriter()) {
423
- if (message.content !== undefined) {
424
- exports.ClipboardContent.encode(message.content, writer.uint32(10).fork()).join();
425
- }
426
- return writer;
427
- },
428
- decode(input, length) {
429
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
430
- const end = length === undefined ? reader.len : reader.pos + length;
431
- const message = createBasePasteToClipboardRequest();
432
- while (reader.pos < end) {
433
- const tag = reader.uint32();
434
- switch (tag >>> 3) {
435
- case 1: {
436
- if (tag !== 10) {
437
- break;
438
- }
439
- message.content = exports.ClipboardContent.decode(reader, reader.uint32());
440
- continue;
441
- }
442
- }
443
- if ((tag & 7) === 4 || tag === 0) {
444
- break;
445
- }
446
- reader.skip(tag & 7);
447
- }
448
- return message;
449
- },
450
- fromJSON(object) {
451
- return { content: isSet(object.content) ? exports.ClipboardContent.fromJSON(object.content) : undefined };
452
- },
453
- toJSON(message) {
454
- const obj = {};
455
- if (message.content !== undefined) {
456
- obj.content = exports.ClipboardContent.toJSON(message.content);
457
- }
458
- return obj;
459
- },
460
- create(base) {
461
- return exports.PasteToClipboardRequest.fromPartial(base ?? {});
462
- },
463
- fromPartial(object) {
464
- const message = createBasePasteToClipboardRequest();
465
- message.content = (object.content !== undefined && object.content !== null)
466
- ? exports.ClipboardContent.fromPartial(object.content)
467
- : undefined;
468
- return message;
469
- },
470
- };
471
- function createBaseClipboardContent() {
472
- return { text: undefined, html: undefined, path: undefined };
473
- }
474
- exports.ClipboardContent = {
475
- encode(message, writer = new wire_1.BinaryWriter()) {
476
- if (message.text !== undefined) {
477
- writer.uint32(10).string(message.text);
478
- }
479
- if (message.html !== undefined) {
480
- exports.ClipboardHtmlContent.encode(message.html, writer.uint32(18).fork()).join();
481
- }
482
- if (message.path !== undefined) {
483
- exports.ClipboardPathContent.encode(message.path, writer.uint32(26).fork()).join();
484
- }
485
- return writer;
486
- },
487
- decode(input, length) {
488
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
489
- const end = length === undefined ? reader.len : reader.pos + length;
490
- const message = createBaseClipboardContent();
491
- while (reader.pos < end) {
492
- const tag = reader.uint32();
493
- switch (tag >>> 3) {
494
- case 1: {
495
- if (tag !== 10) {
496
- break;
497
- }
498
- message.text = reader.string();
499
- continue;
500
- }
501
- case 2: {
502
- if (tag !== 18) {
503
- break;
504
- }
505
- message.html = exports.ClipboardHtmlContent.decode(reader, reader.uint32());
506
- continue;
507
- }
508
- case 3: {
509
- if (tag !== 26) {
510
- break;
511
- }
512
- message.path = exports.ClipboardPathContent.decode(reader, reader.uint32());
513
- continue;
514
- }
515
- }
516
- if ((tag & 7) === 4 || tag === 0) {
517
- break;
518
- }
519
- reader.skip(tag & 7);
520
- }
521
- return message;
522
- },
523
- fromJSON(object) {
524
- return {
525
- text: isSet(object.text) ? globalThis.String(object.text) : undefined,
526
- html: isSet(object.html) ? exports.ClipboardHtmlContent.fromJSON(object.html) : undefined,
527
- path: isSet(object.path) ? exports.ClipboardPathContent.fromJSON(object.path) : undefined,
528
- };
529
- },
530
- toJSON(message) {
531
- const obj = {};
532
- if (message.text !== undefined) {
533
- obj.text = message.text;
534
- }
535
- if (message.html !== undefined) {
536
- obj.html = exports.ClipboardHtmlContent.toJSON(message.html);
537
- }
538
- if (message.path !== undefined) {
539
- obj.path = exports.ClipboardPathContent.toJSON(message.path);
540
- }
541
- return obj;
542
- },
543
- create(base) {
544
- return exports.ClipboardContent.fromPartial(base ?? {});
545
- },
546
- fromPartial(object) {
547
- const message = createBaseClipboardContent();
548
- message.text = object.text ?? undefined;
549
- message.html = (object.html !== undefined && object.html !== null)
550
- ? exports.ClipboardHtmlContent.fromPartial(object.html)
551
- : undefined;
552
- message.path = (object.path !== undefined && object.path !== null)
553
- ? exports.ClipboardPathContent.fromPartial(object.path)
554
- : undefined;
555
- return message;
556
- },
557
- };
558
- function createBaseClipboardReadContent() {
559
- return { text: "", file: undefined, html: undefined };
560
- }
561
- exports.ClipboardReadContent = {
562
- encode(message, writer = new wire_1.BinaryWriter()) {
563
- if (message.text !== "") {
564
- writer.uint32(10).string(message.text);
565
- }
566
- if (message.file !== undefined) {
567
- writer.uint32(18).string(message.file);
568
- }
569
- if (message.html !== undefined) {
570
- writer.uint32(26).string(message.html);
571
- }
572
- return writer;
573
- },
574
- decode(input, length) {
575
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
576
- const end = length === undefined ? reader.len : reader.pos + length;
577
- const message = createBaseClipboardReadContent();
578
- while (reader.pos < end) {
579
- const tag = reader.uint32();
580
- switch (tag >>> 3) {
581
- case 1: {
582
- if (tag !== 10) {
583
- break;
584
- }
585
- message.text = reader.string();
586
- continue;
587
- }
588
- case 2: {
589
- if (tag !== 18) {
590
- break;
591
- }
592
- message.file = reader.string();
593
- continue;
594
- }
595
- case 3: {
596
- if (tag !== 26) {
597
- break;
598
- }
599
- message.html = 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 {
612
- text: isSet(object.text) ? globalThis.String(object.text) : "",
613
- file: isSet(object.file) ? globalThis.String(object.file) : undefined,
614
- html: isSet(object.html) ? globalThis.String(object.html) : undefined,
615
- };
616
- },
617
- toJSON(message) {
618
- const obj = {};
619
- if (message.text !== "") {
620
- obj.text = message.text;
621
- }
622
- if (message.file !== undefined) {
623
- obj.file = message.file;
624
- }
625
- if (message.html !== undefined) {
626
- obj.html = message.html;
627
- }
628
- return obj;
629
- },
630
- create(base) {
631
- return exports.ClipboardReadContent.fromPartial(base ?? {});
632
- },
633
- fromPartial(object) {
634
- const message = createBaseClipboardReadContent();
635
- message.text = object.text ?? "";
636
- message.file = object.file ?? undefined;
637
- message.html = object.html ?? undefined;
638
- return message;
639
- },
640
- };
641
- function createBaseCopyToClipboardResponse() {
642
- return {};
643
- }
644
- exports.CopyToClipboardResponse = {
645
- encode(_, writer = new wire_1.BinaryWriter()) {
646
- return writer;
647
- },
648
- decode(input, length) {
649
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
650
- const end = length === undefined ? reader.len : reader.pos + length;
651
- const message = createBaseCopyToClipboardResponse();
652
- while (reader.pos < end) {
653
- const tag = reader.uint32();
654
- switch (tag >>> 3) {
655
- }
656
- if ((tag & 7) === 4 || tag === 0) {
657
- break;
658
- }
659
- reader.skip(tag & 7);
660
- }
661
- return message;
662
- },
663
- fromJSON(_) {
664
- return {};
665
- },
666
- toJSON(_) {
667
- const obj = {};
668
- return obj;
669
- },
670
- create(base) {
671
- return exports.CopyToClipboardResponse.fromPartial(base ?? {});
672
- },
673
- fromPartial(_) {
674
- const message = createBaseCopyToClipboardResponse();
675
- return message;
676
- },
677
- };
678
- function createBasePasteToClipboardResponse() {
679
- return {};
680
- }
681
- exports.PasteToClipboardResponse = {
682
- encode(_, writer = new wire_1.BinaryWriter()) {
683
- return writer;
684
- },
685
- decode(input, length) {
686
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
687
- const end = length === undefined ? reader.len : reader.pos + length;
688
- const message = createBasePasteToClipboardResponse();
689
- while (reader.pos < end) {
690
- const tag = reader.uint32();
691
- switch (tag >>> 3) {
692
- }
693
- if ((tag & 7) === 4 || tag === 0) {
694
- break;
695
- }
696
- reader.skip(tag & 7);
697
- }
698
- return message;
699
- },
700
- fromJSON(_) {
701
- return {};
702
- },
703
- toJSON(_) {
704
- const obj = {};
705
- return obj;
706
- },
707
- create(base) {
708
- return exports.PasteToClipboardResponse.fromPartial(base ?? {});
709
- },
710
- fromPartial(_) {
711
- const message = createBasePasteToClipboardResponse();
712
- return message;
713
- },
714
- };
715
- function createBaseRequest() {
716
- return { copy: undefined, paste: undefined, readContent: undefined, clear: undefined };
717
- }
718
- exports.Request = {
719
- encode(message, writer = new wire_1.BinaryWriter()) {
720
- if (message.copy !== undefined) {
721
- exports.CopyToClipboardRequest.encode(message.copy, writer.uint32(10).fork()).join();
722
- }
723
- if (message.paste !== undefined) {
724
- exports.PasteToClipboardRequest.encode(message.paste, writer.uint32(18).fork()).join();
725
- }
726
- if (message.readContent !== undefined) {
727
- exports.ReadContentRequest.encode(message.readContent, writer.uint32(26).fork()).join();
728
- }
729
- if (message.clear !== undefined) {
730
- exports.ClearRequest.encode(message.clear, writer.uint32(34).fork()).join();
731
- }
732
- return writer;
733
- },
734
- decode(input, length) {
735
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
736
- const end = length === undefined ? reader.len : reader.pos + length;
737
- const message = createBaseRequest();
738
- while (reader.pos < end) {
739
- const tag = reader.uint32();
740
- switch (tag >>> 3) {
741
- case 1: {
742
- if (tag !== 10) {
743
- break;
744
- }
745
- message.copy = exports.CopyToClipboardRequest.decode(reader, reader.uint32());
746
- continue;
747
- }
748
- case 2: {
749
- if (tag !== 18) {
750
- break;
751
- }
752
- message.paste = exports.PasteToClipboardRequest.decode(reader, reader.uint32());
753
- continue;
754
- }
755
- case 3: {
756
- if (tag !== 26) {
757
- break;
758
- }
759
- message.readContent = exports.ReadContentRequest.decode(reader, reader.uint32());
760
- continue;
761
- }
762
- case 4: {
763
- if (tag !== 34) {
764
- break;
765
- }
766
- message.clear = exports.ClearRequest.decode(reader, reader.uint32());
767
- continue;
768
- }
769
- }
770
- if ((tag & 7) === 4 || tag === 0) {
771
- break;
772
- }
773
- reader.skip(tag & 7);
774
- }
775
- return message;
776
- },
777
- fromJSON(object) {
778
- return {
779
- copy: isSet(object.copy) ? exports.CopyToClipboardRequest.fromJSON(object.copy) : undefined,
780
- paste: isSet(object.paste) ? exports.PasteToClipboardRequest.fromJSON(object.paste) : undefined,
781
- readContent: isSet(object.readContent) ? exports.ReadContentRequest.fromJSON(object.readContent) : undefined,
782
- clear: isSet(object.clear) ? exports.ClearRequest.fromJSON(object.clear) : undefined,
783
- };
784
- },
785
- toJSON(message) {
786
- const obj = {};
787
- if (message.copy !== undefined) {
788
- obj.copy = exports.CopyToClipboardRequest.toJSON(message.copy);
789
- }
790
- if (message.paste !== undefined) {
791
- obj.paste = exports.PasteToClipboardRequest.toJSON(message.paste);
792
- }
793
- if (message.readContent !== undefined) {
794
- obj.readContent = exports.ReadContentRequest.toJSON(message.readContent);
795
- }
796
- if (message.clear !== undefined) {
797
- obj.clear = exports.ClearRequest.toJSON(message.clear);
798
- }
799
- return obj;
800
- },
801
- create(base) {
802
- return exports.Request.fromPartial(base ?? {});
803
- },
804
- fromPartial(object) {
805
- const message = createBaseRequest();
806
- message.copy = (object.copy !== undefined && object.copy !== null)
807
- ? exports.CopyToClipboardRequest.fromPartial(object.copy)
808
- : undefined;
809
- message.paste = (object.paste !== undefined && object.paste !== null)
810
- ? exports.PasteToClipboardRequest.fromPartial(object.paste)
811
- : undefined;
812
- message.readContent = (object.readContent !== undefined && object.readContent !== null)
813
- ? exports.ReadContentRequest.fromPartial(object.readContent)
814
- : undefined;
815
- message.clear = (object.clear !== undefined && object.clear !== null)
816
- ? exports.ClearRequest.fromPartial(object.clear)
817
- : undefined;
818
- return message;
819
- },
820
- };
821
- function createBaseResponse() {
822
- return { copy: undefined, paste: undefined, readContent: undefined, clear: undefined };
823
- }
824
- exports.Response = {
825
- encode(message, writer = new wire_1.BinaryWriter()) {
826
- if (message.copy !== undefined) {
827
- exports.CopyToClipboardResponse.encode(message.copy, writer.uint32(10).fork()).join();
828
- }
829
- if (message.paste !== undefined) {
830
- exports.PasteToClipboardResponse.encode(message.paste, writer.uint32(18).fork()).join();
831
- }
832
- if (message.readContent !== undefined) {
833
- exports.ReadContentResponse.encode(message.readContent, writer.uint32(26).fork()).join();
834
- }
835
- if (message.clear !== undefined) {
836
- exports.ClearResponse.encode(message.clear, writer.uint32(34).fork()).join();
837
- }
838
- return writer;
839
- },
840
- decode(input, length) {
841
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
842
- const end = length === undefined ? reader.len : reader.pos + length;
843
- const message = createBaseResponse();
844
- while (reader.pos < end) {
845
- const tag = reader.uint32();
846
- switch (tag >>> 3) {
847
- case 1: {
848
- if (tag !== 10) {
849
- break;
850
- }
851
- message.copy = exports.CopyToClipboardResponse.decode(reader, reader.uint32());
852
- continue;
853
- }
854
- case 2: {
855
- if (tag !== 18) {
856
- break;
857
- }
858
- message.paste = exports.PasteToClipboardResponse.decode(reader, reader.uint32());
859
- continue;
860
- }
861
- case 3: {
862
- if (tag !== 26) {
863
- break;
864
- }
865
- message.readContent = exports.ReadContentResponse.decode(reader, reader.uint32());
866
- continue;
867
- }
868
- case 4: {
869
- if (tag !== 34) {
870
- break;
871
- }
872
- message.clear = exports.ClearResponse.decode(reader, reader.uint32());
873
- continue;
874
- }
875
- }
876
- if ((tag & 7) === 4 || tag === 0) {
877
- break;
878
- }
879
- reader.skip(tag & 7);
880
- }
881
- return message;
882
- },
883
- fromJSON(object) {
884
- return {
885
- copy: isSet(object.copy) ? exports.CopyToClipboardResponse.fromJSON(object.copy) : undefined,
886
- paste: isSet(object.paste) ? exports.PasteToClipboardResponse.fromJSON(object.paste) : undefined,
887
- readContent: isSet(object.readContent) ? exports.ReadContentResponse.fromJSON(object.readContent) : undefined,
888
- clear: isSet(object.clear) ? exports.ClearResponse.fromJSON(object.clear) : undefined,
889
- };
890
- },
891
- toJSON(message) {
892
- const obj = {};
893
- if (message.copy !== undefined) {
894
- obj.copy = exports.CopyToClipboardResponse.toJSON(message.copy);
895
- }
896
- if (message.paste !== undefined) {
897
- obj.paste = exports.PasteToClipboardResponse.toJSON(message.paste);
898
- }
899
- if (message.readContent !== undefined) {
900
- obj.readContent = exports.ReadContentResponse.toJSON(message.readContent);
901
- }
902
- if (message.clear !== undefined) {
903
- obj.clear = exports.ClearResponse.toJSON(message.clear);
904
- }
905
- return obj;
906
- },
907
- create(base) {
908
- return exports.Response.fromPartial(base ?? {});
909
- },
910
- fromPartial(object) {
911
- const message = createBaseResponse();
912
- message.copy = (object.copy !== undefined && object.copy !== null)
913
- ? exports.CopyToClipboardResponse.fromPartial(object.copy)
914
- : undefined;
915
- message.paste = (object.paste !== undefined && object.paste !== null)
916
- ? exports.PasteToClipboardResponse.fromPartial(object.paste)
917
- : undefined;
918
- message.readContent = (object.readContent !== undefined && object.readContent !== null)
919
- ? exports.ReadContentResponse.fromPartial(object.readContent)
920
- : undefined;
921
- message.clear = (object.clear !== undefined && object.clear !== null)
922
- ? exports.ClearResponse.fromPartial(object.clear)
923
- : undefined;
924
- return message;
925
- },
926
- };
927
- function isSet(value) {
928
- return value !== null && value !== undefined;
929
- }