@vicinae/api 0.16.2 → 0.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/color.d.ts +2 -1
- package/dist/api/color.js +48 -3
- package/dist/api/components/action-pannel.d.ts +3 -3
- package/dist/api/components/action-pannel.js +4 -2
- package/dist/api/components/actions.d.ts +1 -1
- package/dist/api/components/actions.js +7 -1
- package/dist/api/components/dropdown.d.ts +1 -1
- package/dist/api/components/dropdown.js +3 -1
- package/dist/api/components/empty-view.js +4 -2
- package/dist/api/components/form.d.ts +1 -1
- package/dist/api/components/form.js +3 -1
- package/dist/api/components/grid.d.ts +8 -19
- package/dist/api/components/grid.js +32 -2
- package/dist/api/components/list.d.ts +22 -3
- package/dist/api/components/list.js +49 -2
- package/dist/api/components/metadata.d.ts +1 -1
- package/dist/api/components/metadata.js +5 -1
- package/dist/api/components/tag.d.ts +2 -2
- package/dist/api/components/tag.js +4 -3
- package/dist/api/image.d.ts +7 -5
- package/dist/api/image.js +4 -0
- package/dist/api/proto/daemon.d.ts +4 -1
- package/dist/api/proto/daemon.js +71 -16
- package/dist/api/proto/ui.d.ts +12 -1
- package/dist/api/proto/ui.js +164 -9
- package/dist/commands/build/index.js +5 -2
- package/dist/commands/develop/index.js +7 -2
- package/dist/schemas/manifest.d.ts +254 -4
- package/dist/schemas/manifest.js +202 -4
- package/dist/utils/extension-types.d.ts +14 -0
- package/dist/utils/extension-types.js +162 -0
- package/package.json +1 -1
- package/types/jsx.d.ts +41 -32
package/dist/api/proto/daemon.js
CHANGED
|
@@ -186,7 +186,17 @@ exports.PingResponse = {
|
|
|
186
186
|
},
|
|
187
187
|
};
|
|
188
188
|
function createBaseDmenuRequest() {
|
|
189
|
-
return {
|
|
189
|
+
return {
|
|
190
|
+
rawContent: "",
|
|
191
|
+
navigationTitle: "",
|
|
192
|
+
placeholder: "",
|
|
193
|
+
sectionTitle: "",
|
|
194
|
+
noSection: false,
|
|
195
|
+
noQuickLook: false,
|
|
196
|
+
noIcon: false,
|
|
197
|
+
noMetadata: false,
|
|
198
|
+
query: "",
|
|
199
|
+
};
|
|
190
200
|
}
|
|
191
201
|
exports.DmenuRequest = {
|
|
192
202
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -199,14 +209,23 @@ exports.DmenuRequest = {
|
|
|
199
209
|
if (message.placeholder !== "") {
|
|
200
210
|
writer.uint32(26).string(message.placeholder);
|
|
201
211
|
}
|
|
202
|
-
if (message.noIcon !== false) {
|
|
203
|
-
writer.uint32(32).bool(message.noIcon);
|
|
204
|
-
}
|
|
205
212
|
if (message.sectionTitle !== "") {
|
|
206
|
-
writer.uint32(
|
|
213
|
+
writer.uint32(34).string(message.sectionTitle);
|
|
207
214
|
}
|
|
208
215
|
if (message.noSection !== false) {
|
|
209
|
-
writer.uint32(
|
|
216
|
+
writer.uint32(40).bool(message.noSection);
|
|
217
|
+
}
|
|
218
|
+
if (message.noQuickLook !== false) {
|
|
219
|
+
writer.uint32(48).bool(message.noQuickLook);
|
|
220
|
+
}
|
|
221
|
+
if (message.noIcon !== false) {
|
|
222
|
+
writer.uint32(56).bool(message.noIcon);
|
|
223
|
+
}
|
|
224
|
+
if (message.noMetadata !== false) {
|
|
225
|
+
writer.uint32(64).bool(message.noMetadata);
|
|
226
|
+
}
|
|
227
|
+
if (message.query !== "") {
|
|
228
|
+
writer.uint32(74).string(message.query);
|
|
210
229
|
}
|
|
211
230
|
return writer;
|
|
212
231
|
},
|
|
@@ -239,24 +258,45 @@ exports.DmenuRequest = {
|
|
|
239
258
|
continue;
|
|
240
259
|
}
|
|
241
260
|
case 4: {
|
|
242
|
-
if (tag !==
|
|
261
|
+
if (tag !== 34) {
|
|
243
262
|
break;
|
|
244
263
|
}
|
|
245
|
-
message.
|
|
264
|
+
message.sectionTitle = reader.string();
|
|
246
265
|
continue;
|
|
247
266
|
}
|
|
248
267
|
case 5: {
|
|
249
|
-
if (tag !==
|
|
268
|
+
if (tag !== 40) {
|
|
250
269
|
break;
|
|
251
270
|
}
|
|
252
|
-
message.
|
|
271
|
+
message.noSection = reader.bool();
|
|
253
272
|
continue;
|
|
254
273
|
}
|
|
255
274
|
case 6: {
|
|
256
275
|
if (tag !== 48) {
|
|
257
276
|
break;
|
|
258
277
|
}
|
|
259
|
-
message.
|
|
278
|
+
message.noQuickLook = reader.bool();
|
|
279
|
+
continue;
|
|
280
|
+
}
|
|
281
|
+
case 7: {
|
|
282
|
+
if (tag !== 56) {
|
|
283
|
+
break;
|
|
284
|
+
}
|
|
285
|
+
message.noIcon = reader.bool();
|
|
286
|
+
continue;
|
|
287
|
+
}
|
|
288
|
+
case 8: {
|
|
289
|
+
if (tag !== 64) {
|
|
290
|
+
break;
|
|
291
|
+
}
|
|
292
|
+
message.noMetadata = reader.bool();
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
case 9: {
|
|
296
|
+
if (tag !== 74) {
|
|
297
|
+
break;
|
|
298
|
+
}
|
|
299
|
+
message.query = reader.string();
|
|
260
300
|
continue;
|
|
261
301
|
}
|
|
262
302
|
}
|
|
@@ -272,9 +312,12 @@ exports.DmenuRequest = {
|
|
|
272
312
|
rawContent: isSet(object.rawContent) ? globalThis.String(object.rawContent) : "",
|
|
273
313
|
navigationTitle: isSet(object.navigationTitle) ? globalThis.String(object.navigationTitle) : "",
|
|
274
314
|
placeholder: isSet(object.placeholder) ? globalThis.String(object.placeholder) : "",
|
|
275
|
-
noIcon: isSet(object.noIcon) ? globalThis.Boolean(object.noIcon) : false,
|
|
276
315
|
sectionTitle: isSet(object.sectionTitle) ? globalThis.String(object.sectionTitle) : "",
|
|
277
316
|
noSection: isSet(object.noSection) ? globalThis.Boolean(object.noSection) : false,
|
|
317
|
+
noQuickLook: isSet(object.noQuickLook) ? globalThis.Boolean(object.noQuickLook) : false,
|
|
318
|
+
noIcon: isSet(object.noIcon) ? globalThis.Boolean(object.noIcon) : false,
|
|
319
|
+
noMetadata: isSet(object.noMetadata) ? globalThis.Boolean(object.noMetadata) : false,
|
|
320
|
+
query: isSet(object.query) ? globalThis.String(object.query) : "",
|
|
278
321
|
};
|
|
279
322
|
},
|
|
280
323
|
toJSON(message) {
|
|
@@ -288,15 +331,24 @@ exports.DmenuRequest = {
|
|
|
288
331
|
if (message.placeholder !== "") {
|
|
289
332
|
obj.placeholder = message.placeholder;
|
|
290
333
|
}
|
|
291
|
-
if (message.noIcon !== false) {
|
|
292
|
-
obj.noIcon = message.noIcon;
|
|
293
|
-
}
|
|
294
334
|
if (message.sectionTitle !== "") {
|
|
295
335
|
obj.sectionTitle = message.sectionTitle;
|
|
296
336
|
}
|
|
297
337
|
if (message.noSection !== false) {
|
|
298
338
|
obj.noSection = message.noSection;
|
|
299
339
|
}
|
|
340
|
+
if (message.noQuickLook !== false) {
|
|
341
|
+
obj.noQuickLook = message.noQuickLook;
|
|
342
|
+
}
|
|
343
|
+
if (message.noIcon !== false) {
|
|
344
|
+
obj.noIcon = message.noIcon;
|
|
345
|
+
}
|
|
346
|
+
if (message.noMetadata !== false) {
|
|
347
|
+
obj.noMetadata = message.noMetadata;
|
|
348
|
+
}
|
|
349
|
+
if (message.query !== "") {
|
|
350
|
+
obj.query = message.query;
|
|
351
|
+
}
|
|
300
352
|
return obj;
|
|
301
353
|
},
|
|
302
354
|
create(base) {
|
|
@@ -307,9 +359,12 @@ exports.DmenuRequest = {
|
|
|
307
359
|
message.rawContent = object.rawContent ?? "";
|
|
308
360
|
message.navigationTitle = object.navigationTitle ?? "";
|
|
309
361
|
message.placeholder = object.placeholder ?? "";
|
|
310
|
-
message.noIcon = object.noIcon ?? false;
|
|
311
362
|
message.sectionTitle = object.sectionTitle ?? "";
|
|
312
363
|
message.noSection = object.noSection ?? false;
|
|
364
|
+
message.noQuickLook = object.noQuickLook ?? false;
|
|
365
|
+
message.noIcon = object.noIcon ?? false;
|
|
366
|
+
message.noMetadata = object.noMetadata ?? false;
|
|
367
|
+
message.query = object.query ?? "";
|
|
313
368
|
return message;
|
|
314
369
|
},
|
|
315
370
|
};
|
package/dist/api/proto/ui.d.ts
CHANGED
|
@@ -146,11 +146,20 @@ export interface ImageSource {
|
|
|
146
146
|
raw?: string | undefined;
|
|
147
147
|
themed?: ThemedImageSource | undefined;
|
|
148
148
|
}
|
|
149
|
+
export interface DynamicColor {
|
|
150
|
+
light: string;
|
|
151
|
+
dark: string;
|
|
152
|
+
adjustContrast?: boolean | undefined;
|
|
153
|
+
}
|
|
154
|
+
export interface ColorLike {
|
|
155
|
+
raw?: string | undefined;
|
|
156
|
+
dynamic?: DynamicColor | undefined;
|
|
157
|
+
}
|
|
149
158
|
export interface Image {
|
|
150
159
|
source: ImageSource | undefined;
|
|
151
160
|
fallback?: ImageSource | undefined;
|
|
152
161
|
mask?: ImageMask | undefined;
|
|
153
|
-
|
|
162
|
+
tintColor?: ColorLike | undefined;
|
|
154
163
|
}
|
|
155
164
|
export declare const ShowToastRequest: MessageFns<ShowToastRequest>;
|
|
156
165
|
export declare const HideToastRequest: MessageFns<HideToastRequest>;
|
|
@@ -174,6 +183,8 @@ export declare const RenderNode: MessageFns<RenderNode>;
|
|
|
174
183
|
export declare const RenderNode_PropsEntry: MessageFns<RenderNode_PropsEntry>;
|
|
175
184
|
export declare const ThemedImageSource: MessageFns<ThemedImageSource>;
|
|
176
185
|
export declare const ImageSource: MessageFns<ImageSource>;
|
|
186
|
+
export declare const DynamicColor: MessageFns<DynamicColor>;
|
|
187
|
+
export declare const ColorLike: MessageFns<ColorLike>;
|
|
177
188
|
export declare const Image: MessageFns<Image>;
|
|
178
189
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
179
190
|
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
package/dist/api/proto/ui.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v6.32.1
|
|
6
6
|
// source: ui.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.Image = 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;
|
|
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
9
|
exports.toastStyleFromJSON = toastStyleFromJSON;
|
|
10
10
|
exports.toastStyleToJSON = toastStyleToJSON;
|
|
11
11
|
exports.popToRootTypeFromJSON = popToRootTypeFromJSON;
|
|
@@ -2036,8 +2036,161 @@ exports.ImageSource = {
|
|
|
2036
2036
|
return message;
|
|
2037
2037
|
},
|
|
2038
2038
|
};
|
|
2039
|
+
function createBaseDynamicColor() {
|
|
2040
|
+
return { light: "", dark: "", adjustContrast: undefined };
|
|
2041
|
+
}
|
|
2042
|
+
exports.DynamicColor = {
|
|
2043
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2044
|
+
if (message.light !== "") {
|
|
2045
|
+
writer.uint32(10).string(message.light);
|
|
2046
|
+
}
|
|
2047
|
+
if (message.dark !== "") {
|
|
2048
|
+
writer.uint32(18).string(message.dark);
|
|
2049
|
+
}
|
|
2050
|
+
if (message.adjustContrast !== undefined) {
|
|
2051
|
+
writer.uint32(24).bool(message.adjustContrast);
|
|
2052
|
+
}
|
|
2053
|
+
return writer;
|
|
2054
|
+
},
|
|
2055
|
+
decode(input, length) {
|
|
2056
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2057
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2058
|
+
const message = createBaseDynamicColor();
|
|
2059
|
+
while (reader.pos < end) {
|
|
2060
|
+
const tag = reader.uint32();
|
|
2061
|
+
switch (tag >>> 3) {
|
|
2062
|
+
case 1: {
|
|
2063
|
+
if (tag !== 10) {
|
|
2064
|
+
break;
|
|
2065
|
+
}
|
|
2066
|
+
message.light = reader.string();
|
|
2067
|
+
continue;
|
|
2068
|
+
}
|
|
2069
|
+
case 2: {
|
|
2070
|
+
if (tag !== 18) {
|
|
2071
|
+
break;
|
|
2072
|
+
}
|
|
2073
|
+
message.dark = reader.string();
|
|
2074
|
+
continue;
|
|
2075
|
+
}
|
|
2076
|
+
case 3: {
|
|
2077
|
+
if (tag !== 24) {
|
|
2078
|
+
break;
|
|
2079
|
+
}
|
|
2080
|
+
message.adjustContrast = reader.bool();
|
|
2081
|
+
continue;
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2085
|
+
break;
|
|
2086
|
+
}
|
|
2087
|
+
reader.skip(tag & 7);
|
|
2088
|
+
}
|
|
2089
|
+
return message;
|
|
2090
|
+
},
|
|
2091
|
+
fromJSON(object) {
|
|
2092
|
+
return {
|
|
2093
|
+
light: isSet(object.light) ? globalThis.String(object.light) : "",
|
|
2094
|
+
dark: isSet(object.dark) ? globalThis.String(object.dark) : "",
|
|
2095
|
+
adjustContrast: isSet(object.adjustContrast) ? globalThis.Boolean(object.adjustContrast) : undefined,
|
|
2096
|
+
};
|
|
2097
|
+
},
|
|
2098
|
+
toJSON(message) {
|
|
2099
|
+
const obj = {};
|
|
2100
|
+
if (message.light !== "") {
|
|
2101
|
+
obj.light = message.light;
|
|
2102
|
+
}
|
|
2103
|
+
if (message.dark !== "") {
|
|
2104
|
+
obj.dark = message.dark;
|
|
2105
|
+
}
|
|
2106
|
+
if (message.adjustContrast !== undefined) {
|
|
2107
|
+
obj.adjustContrast = message.adjustContrast;
|
|
2108
|
+
}
|
|
2109
|
+
return obj;
|
|
2110
|
+
},
|
|
2111
|
+
create(base) {
|
|
2112
|
+
return exports.DynamicColor.fromPartial(base ?? {});
|
|
2113
|
+
},
|
|
2114
|
+
fromPartial(object) {
|
|
2115
|
+
const message = createBaseDynamicColor();
|
|
2116
|
+
message.light = object.light ?? "";
|
|
2117
|
+
message.dark = object.dark ?? "";
|
|
2118
|
+
message.adjustContrast = object.adjustContrast ?? undefined;
|
|
2119
|
+
return message;
|
|
2120
|
+
},
|
|
2121
|
+
};
|
|
2122
|
+
function createBaseColorLike() {
|
|
2123
|
+
return { raw: undefined, dynamic: undefined };
|
|
2124
|
+
}
|
|
2125
|
+
exports.ColorLike = {
|
|
2126
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2127
|
+
if (message.raw !== undefined) {
|
|
2128
|
+
writer.uint32(10).string(message.raw);
|
|
2129
|
+
}
|
|
2130
|
+
if (message.dynamic !== undefined) {
|
|
2131
|
+
exports.DynamicColor.encode(message.dynamic, writer.uint32(18).fork()).join();
|
|
2132
|
+
}
|
|
2133
|
+
return writer;
|
|
2134
|
+
},
|
|
2135
|
+
decode(input, length) {
|
|
2136
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2137
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2138
|
+
const message = createBaseColorLike();
|
|
2139
|
+
while (reader.pos < end) {
|
|
2140
|
+
const tag = reader.uint32();
|
|
2141
|
+
switch (tag >>> 3) {
|
|
2142
|
+
case 1: {
|
|
2143
|
+
if (tag !== 10) {
|
|
2144
|
+
break;
|
|
2145
|
+
}
|
|
2146
|
+
message.raw = reader.string();
|
|
2147
|
+
continue;
|
|
2148
|
+
}
|
|
2149
|
+
case 2: {
|
|
2150
|
+
if (tag !== 18) {
|
|
2151
|
+
break;
|
|
2152
|
+
}
|
|
2153
|
+
message.dynamic = exports.DynamicColor.decode(reader, reader.uint32());
|
|
2154
|
+
continue;
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2158
|
+
break;
|
|
2159
|
+
}
|
|
2160
|
+
reader.skip(tag & 7);
|
|
2161
|
+
}
|
|
2162
|
+
return message;
|
|
2163
|
+
},
|
|
2164
|
+
fromJSON(object) {
|
|
2165
|
+
return {
|
|
2166
|
+
raw: isSet(object.raw) ? globalThis.String(object.raw) : undefined,
|
|
2167
|
+
dynamic: isSet(object.dynamic) ? exports.DynamicColor.fromJSON(object.dynamic) : undefined,
|
|
2168
|
+
};
|
|
2169
|
+
},
|
|
2170
|
+
toJSON(message) {
|
|
2171
|
+
const obj = {};
|
|
2172
|
+
if (message.raw !== undefined) {
|
|
2173
|
+
obj.raw = message.raw;
|
|
2174
|
+
}
|
|
2175
|
+
if (message.dynamic !== undefined) {
|
|
2176
|
+
obj.dynamic = exports.DynamicColor.toJSON(message.dynamic);
|
|
2177
|
+
}
|
|
2178
|
+
return obj;
|
|
2179
|
+
},
|
|
2180
|
+
create(base) {
|
|
2181
|
+
return exports.ColorLike.fromPartial(base ?? {});
|
|
2182
|
+
},
|
|
2183
|
+
fromPartial(object) {
|
|
2184
|
+
const message = createBaseColorLike();
|
|
2185
|
+
message.raw = object.raw ?? undefined;
|
|
2186
|
+
message.dynamic = (object.dynamic !== undefined && object.dynamic !== null)
|
|
2187
|
+
? exports.DynamicColor.fromPartial(object.dynamic)
|
|
2188
|
+
: undefined;
|
|
2189
|
+
return message;
|
|
2190
|
+
},
|
|
2191
|
+
};
|
|
2039
2192
|
function createBaseImage() {
|
|
2040
|
-
return { source: undefined, fallback: undefined, mask: undefined,
|
|
2193
|
+
return { source: undefined, fallback: undefined, mask: undefined, tintColor: undefined };
|
|
2041
2194
|
}
|
|
2042
2195
|
exports.Image = {
|
|
2043
2196
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -2050,8 +2203,8 @@ exports.Image = {
|
|
|
2050
2203
|
if (message.mask !== undefined) {
|
|
2051
2204
|
writer.uint32(24).int32(message.mask);
|
|
2052
2205
|
}
|
|
2053
|
-
if (message.
|
|
2054
|
-
writer.uint32(34).
|
|
2206
|
+
if (message.tintColor !== undefined) {
|
|
2207
|
+
exports.ColorLike.encode(message.tintColor, writer.uint32(34).fork()).join();
|
|
2055
2208
|
}
|
|
2056
2209
|
return writer;
|
|
2057
2210
|
},
|
|
@@ -2087,7 +2240,7 @@ exports.Image = {
|
|
|
2087
2240
|
if (tag !== 34) {
|
|
2088
2241
|
break;
|
|
2089
2242
|
}
|
|
2090
|
-
message.
|
|
2243
|
+
message.tintColor = exports.ColorLike.decode(reader, reader.uint32());
|
|
2091
2244
|
continue;
|
|
2092
2245
|
}
|
|
2093
2246
|
}
|
|
@@ -2103,7 +2256,7 @@ exports.Image = {
|
|
|
2103
2256
|
source: isSet(object.source) ? exports.ImageSource.fromJSON(object.source) : undefined,
|
|
2104
2257
|
fallback: isSet(object.fallback) ? exports.ImageSource.fromJSON(object.fallback) : undefined,
|
|
2105
2258
|
mask: isSet(object.mask) ? imageMaskFromJSON(object.mask) : undefined,
|
|
2106
|
-
|
|
2259
|
+
tintColor: isSet(object.tintColor) ? exports.ColorLike.fromJSON(object.tintColor) : undefined,
|
|
2107
2260
|
};
|
|
2108
2261
|
},
|
|
2109
2262
|
toJSON(message) {
|
|
@@ -2117,8 +2270,8 @@ exports.Image = {
|
|
|
2117
2270
|
if (message.mask !== undefined) {
|
|
2118
2271
|
obj.mask = imageMaskToJSON(message.mask);
|
|
2119
2272
|
}
|
|
2120
|
-
if (message.
|
|
2121
|
-
obj.
|
|
2273
|
+
if (message.tintColor !== undefined) {
|
|
2274
|
+
obj.tintColor = exports.ColorLike.toJSON(message.tintColor);
|
|
2122
2275
|
}
|
|
2123
2276
|
return obj;
|
|
2124
2277
|
},
|
|
@@ -2134,7 +2287,9 @@ exports.Image = {
|
|
|
2134
2287
|
? exports.ImageSource.fromPartial(object.fallback)
|
|
2135
2288
|
: undefined;
|
|
2136
2289
|
message.mask = object.mask ?? undefined;
|
|
2137
|
-
message.
|
|
2290
|
+
message.tintColor = (object.tintColor !== undefined && object.tintColor !== null)
|
|
2291
|
+
? exports.ColorLike.fromPartial(object.tintColor)
|
|
2292
|
+
: undefined;
|
|
2138
2293
|
return message;
|
|
2139
2294
|
},
|
|
2140
2295
|
};
|
|
@@ -43,6 +43,7 @@ const node_fs_1 = require("node:fs");
|
|
|
43
43
|
const node_path_1 = require("node:path");
|
|
44
44
|
const logger_js_1 = require("../../utils/logger.js");
|
|
45
45
|
const utils_js_1 = require("../../utils/utils.js");
|
|
46
|
+
const extension_types_js_1 = require("../../utils/extension-types.js");
|
|
46
47
|
const manifest_js_1 = __importDefault(require("../../schemas/manifest.js"));
|
|
47
48
|
class Build extends core_1.Command {
|
|
48
49
|
static args = {};
|
|
@@ -91,11 +92,11 @@ class Build extends core_1.Command {
|
|
|
91
92
|
const tsxSource = `${base}.tsx`;
|
|
92
93
|
const tsSource = `${base}.ts`;
|
|
93
94
|
let source = tsxSource;
|
|
94
|
-
if (cmd.mode
|
|
95
|
+
if (cmd.mode === "view" && !(0, node_fs_1.existsSync)(tsxSource)) {
|
|
95
96
|
throw new Error(`Unable to find view command ${cmd.name} at ${tsxSource}`);
|
|
96
97
|
}
|
|
97
98
|
// we allow .ts or .tsx for no-view
|
|
98
|
-
if (cmd.mode
|
|
99
|
+
if (cmd.mode === "no-view") {
|
|
99
100
|
if (!(0, node_fs_1.existsSync)(tsxSource)) {
|
|
100
101
|
source = tsSource;
|
|
101
102
|
if (!(0, node_fs_1.existsSync)(tsSource)) {
|
|
@@ -125,6 +126,8 @@ class Build extends core_1.Command {
|
|
|
125
126
|
}
|
|
126
127
|
};
|
|
127
128
|
process.chdir(src);
|
|
129
|
+
logger.logInfo("Generating extension types...");
|
|
130
|
+
(0, extension_types_js_1.updateExtensionTypes)(manifest, src);
|
|
128
131
|
logger.logInfo("Checking types...");
|
|
129
132
|
const typeCheck = (0, node_child_process_1.spawnSync)("npx", ["tsc", "--noEmit"]);
|
|
130
133
|
if (typeCheck.error) {
|
|
@@ -45,6 +45,7 @@ const promises_1 = require("node:fs/promises");
|
|
|
45
45
|
const node_path_1 = require("node:path");
|
|
46
46
|
const logger_js_1 = require("../../utils/logger.js");
|
|
47
47
|
const utils_js_1 = require("../../utils/utils.js");
|
|
48
|
+
const extension_types_js_1 = require("../../utils/extension-types.js");
|
|
48
49
|
const vicinae_js_1 = require("../../utils/vicinae.js");
|
|
49
50
|
const manifest_js_1 = __importDefault(require("../../schemas/manifest.js"));
|
|
50
51
|
class Develop extends core_1.Command {
|
|
@@ -82,6 +83,8 @@ class Develop extends core_1.Command {
|
|
|
82
83
|
};
|
|
83
84
|
let manifest = parseManifest();
|
|
84
85
|
const vicinae = new vicinae_js_1.VicinaeClient();
|
|
86
|
+
logger.logInfo("Generating extension types...");
|
|
87
|
+
(0, extension_types_js_1.updateExtensionTypes)(manifest, flags.target);
|
|
85
88
|
const typeCheck = async () => {
|
|
86
89
|
const spawned = (0, node_child_process_1.spawn)("npx", ["tsc", "--noEmit"]);
|
|
87
90
|
let stderr = Buffer.from("");
|
|
@@ -112,11 +115,11 @@ class Develop extends core_1.Command {
|
|
|
112
115
|
const tsxSource = `${base}.tsx`;
|
|
113
116
|
const tsSource = `${base}.ts`;
|
|
114
117
|
let source = tsxSource;
|
|
115
|
-
if (cmd.mode
|
|
118
|
+
if (cmd.mode === "view" && !(0, node_fs_1.existsSync)(tsxSource)) {
|
|
116
119
|
throw new Error(`could not find entrypoint src/${cmd.name}.tsx for command ${cmd.name}.`);
|
|
117
120
|
}
|
|
118
121
|
// we allow .ts or .tsx for no-view
|
|
119
|
-
if (cmd.mode
|
|
122
|
+
if (cmd.mode === "no-view") {
|
|
120
123
|
if (!(0, node_fs_1.existsSync)(tsxSource)) {
|
|
121
124
|
source = tsSource;
|
|
122
125
|
if (!(0, node_fs_1.existsSync)(tsSource)) {
|
|
@@ -194,6 +197,8 @@ class Develop extends core_1.Command {
|
|
|
194
197
|
.on("all", async (_, path) => {
|
|
195
198
|
if (path.endsWith("package.json")) {
|
|
196
199
|
manifest = parseManifest();
|
|
200
|
+
logger.logInfo("Generating extension types...");
|
|
201
|
+
(0, extension_types_js_1.updateExtensionTypes)(manifest, flags.target);
|
|
197
202
|
}
|
|
198
203
|
logger.logEvent(`changed file ${path}`);
|
|
199
204
|
await safeBuild(extensionDir);
|