pxt-core 13.2.13 → 13.2.15
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/built/backendutils.d.ts +120 -0
- package/built/backendutils.js +2171 -5
- package/built/cli.js +5 -2
- package/built/pxt.js +5785 -5553
- package/built/pxtcompiler.js +2 -2
- package/built/pxtlib.d.ts +178 -127
- package/built/pxtlib.js +21858 -21629
- package/built/target.js +1 -1
- package/built/targetlight.js +1 -1
- package/built/tests/blocksrunner.js +7 -3
- package/built/tests/blockssetup.js +7 -3
- package/built/web/main.js +2 -2
- package/built/web/pxtapp.js +2 -2
- package/built/web/pxtasseteditor.js +1 -1
- package/built/web/pxtcompiler.js +1 -1
- package/built/web/pxtembed.js +1 -1
- package/built/web/pxtlib.js +1 -1
- package/built/web/pxtworker.js +1 -1
- package/built/web/rtlsemantic.css +1 -1
- package/built/web/runnerembed.js +1 -1
- package/built/web/semantic.css +1 -1
- package/package.json +1 -1
- package/theme/common.less +1 -1
- package/theme/project-backpack.less +5 -1
- package/theme/project-tools.less +4 -4
- package/theme/toolbox.less +4 -0
package/built/pxtcompiler.js
CHANGED
|
@@ -10247,7 +10247,7 @@ var ts;
|
|
|
10247
10247
|
optstarget = enabled.target;
|
|
10248
10248
|
}
|
|
10249
10249
|
}
|
|
10250
|
-
pxtc.hexfile.setupFor(optstarget, extinfo || pxtc.emptyExtInfo(), res);
|
|
10250
|
+
pxtc.hexfile.setupFor(optstarget, extinfo || pxtc.emptyExtInfo(pxt.appTarget.compileService), res);
|
|
10251
10251
|
pxtc.hexfile.setupInlineAssembly(opts);
|
|
10252
10252
|
}
|
|
10253
10253
|
let bin = new Binary();
|
|
@@ -17202,7 +17202,7 @@ __flash_checksums:
|
|
|
17202
17202
|
const opts0 = pxtc.U.flatClone(opts);
|
|
17203
17203
|
// normally, this would already have been done, but if the main variant
|
|
17204
17204
|
// is disabled, another variant may be set up
|
|
17205
|
-
hexfile.setupFor(opts.target, opts.extinfo || pxtc.emptyExtInfo(), cres);
|
|
17205
|
+
hexfile.setupFor(opts.target, opts.extinfo || pxtc.emptyExtInfo(pxt.appTarget.compileService), cres);
|
|
17206
17206
|
assembleAndPatch(src, bin, opts, cres);
|
|
17207
17207
|
if (!cres.builtVariants) {
|
|
17208
17208
|
cres.builtVariants = [];
|
package/built/pxtlib.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
/// <reference path="../localtypings/pxtarget.d.ts" />
|
|
1
2
|
/// <reference path="../localtypings/pxtpackage.d.ts" />
|
|
2
3
|
/// <reference path="../localtypings/pxtparts.d.ts" />
|
|
3
|
-
/// <reference path="../localtypings/pxtarget.d.ts" />
|
|
4
4
|
/// <reference path="../localtypings/projectheader.d.ts" />
|
|
5
5
|
/// <reference path="../localtypings/dom.d.ts" />
|
|
6
|
-
/// <reference path="../localtypings/dompurify.d.ts" />
|
|
7
6
|
/// <reference path="../localtypings/pxtmusic.d.ts" />
|
|
8
7
|
/// <reference path="../pxtcompiler/ext-typescript/lib/typescriptServices.d.ts" />
|
|
8
|
+
/// <reference path="../localtypings/dompurify.d.ts" />
|
|
9
9
|
/// <reference types="web-bluetooth" />
|
|
10
10
|
declare namespace pxt {
|
|
11
11
|
function aiTrackEvent(id: string, data?: any, measures?: any): void;
|
|
@@ -284,6 +284,7 @@ declare namespace ts.pxtc {
|
|
|
284
284
|
}
|
|
285
285
|
import pxtc = ts.pxtc;
|
|
286
286
|
declare namespace ts.pxtc.Util {
|
|
287
|
+
function contains(str: string, contains: string): boolean;
|
|
287
288
|
function assert(cond: boolean, msg?: string): void;
|
|
288
289
|
function flatClone<T extends Object>(obj: T): T;
|
|
289
290
|
function clone<T>(v: T): T;
|
|
@@ -346,6 +347,39 @@ declare namespace ts.pxtc {
|
|
|
346
347
|
*/
|
|
347
348
|
let encodeBase64: (s: string) => string;
|
|
348
349
|
}
|
|
350
|
+
declare namespace ts.pxtc.Util {
|
|
351
|
+
function iterMap<T>(m: pxt.Map<T>, f: (k: string, v: T) => void): void;
|
|
352
|
+
function values<T>(m: pxt.Map<T>): T[];
|
|
353
|
+
function pushRange<T>(trg: T[], src: ArrayLike<T>): void;
|
|
354
|
+
function concatArrayLike<T>(arrays: ArrayLike<ArrayLike<T>>): T[];
|
|
355
|
+
function concat<T>(arrays: T[][]): T[];
|
|
356
|
+
function jsonMergeFrom(trg: any, src: any): void;
|
|
357
|
+
function jsonCopyFrom<T>(trg: T, src: T): void;
|
|
358
|
+
function jsonFlatten(v: any): pxt.Map<any>;
|
|
359
|
+
function jsonUnFlatten(v: pxt.Map<any>): any;
|
|
360
|
+
function strcmp(a: string, b: string): 0 | 1 | -1;
|
|
361
|
+
function endsWith(str: string, suffix: string): boolean;
|
|
362
|
+
function startsWith(str: string, prefix: string): boolean;
|
|
363
|
+
function toUTF8(str: string, cesu8?: boolean): string;
|
|
364
|
+
function toUTF8Array(s: string): Uint8Array;
|
|
365
|
+
}
|
|
366
|
+
declare namespace pxt {
|
|
367
|
+
export import U = pxtc.Util;
|
|
368
|
+
export import Util = pxtc.Util;
|
|
369
|
+
}
|
|
370
|
+
declare namespace pxt {
|
|
371
|
+
/** Resolves compile defaults and a variant without modifying the supplied target. */
|
|
372
|
+
function getAppTargetVariant(target: TargetBundle, variant: string): TargetBundle;
|
|
373
|
+
function patchCompileTarget(target: AppTarget): void;
|
|
374
|
+
}
|
|
375
|
+
declare namespace ts.pxtc.Util {
|
|
376
|
+
function cloneTargetBundle(target: pxt.TargetBundle): pxt.TargetBundle;
|
|
377
|
+
function cloneApis(byQName: pxt.Map<pxtc.SymbolInfo>): pxt.Map<SymbolInfo>;
|
|
378
|
+
function cloneSymbolInfo(sym: pxtc.SymbolInfo): pxtc.SymbolInfo;
|
|
379
|
+
}
|
|
380
|
+
declare namespace ts.pxtc.BrowserImpl {
|
|
381
|
+
function sha256buffer(buf: Uint8Array): string;
|
|
382
|
+
}
|
|
349
383
|
declare namespace ts.pxtc.Util {
|
|
350
384
|
export class CancellationToken {
|
|
351
385
|
private pending;
|
|
@@ -374,24 +408,11 @@ declare namespace ts.pxtc.Util {
|
|
|
374
408
|
export function oops(msg?: string): Error;
|
|
375
409
|
export function reversed<T>(arr: T[]): T[];
|
|
376
410
|
export function arrayEquals<U>(a: U[], b: U[], compare?: (c: U, d: U) => boolean): boolean;
|
|
377
|
-
export function iterMap<T>(m: pxt.Map<T>, f: (k: string, v: T) => void): void;
|
|
378
411
|
export function mapMap<T, S>(m: pxt.Map<T>, f: (k: string, v: T) => S): pxt.Map<S>;
|
|
379
|
-
export function values<T>(m: pxt.Map<T>): T[];
|
|
380
|
-
export function pushRange<T>(trg: T[], src: ArrayLike<T>): void;
|
|
381
|
-
export function concatArrayLike<T>(arrays: ArrayLike<ArrayLike<T>>): T[];
|
|
382
|
-
export function concat<T>(arrays: T[][]): T[];
|
|
383
412
|
export function memcpy(trg: Uint8Array, trgOff: number, src: ArrayLike<number>, srcOff?: number, len?: number): void;
|
|
384
413
|
export function uint8ArrayConcat(chunks: Uint8Array[]): Uint8Array;
|
|
385
414
|
export function jsonTryParse(s: string): any;
|
|
386
|
-
export function jsonMergeFrom(trg: any, src: any): void;
|
|
387
|
-
export function jsonCopyFrom<T>(trg: T, src: T): void;
|
|
388
|
-
export function jsonFlatten(v: any): pxt.Map<any>;
|
|
389
|
-
export function jsonUnFlatten(v: pxt.Map<any>): any;
|
|
390
|
-
export function strcmp(a: string, b: string): 0 | 1 | -1;
|
|
391
415
|
export function stringMapEq(a: pxt.Map<string>, b: pxt.Map<string>): boolean;
|
|
392
|
-
export function endsWith(str: string, suffix: string): boolean;
|
|
393
|
-
export function startsWith(str: string, prefix: string): boolean;
|
|
394
|
-
export function contains(str: string, contains: string): boolean;
|
|
395
416
|
export function replaceAll(str: string, old: string, new_: string): string;
|
|
396
417
|
export function snakify(s: string): string;
|
|
397
418
|
export function sortObjectFields<T>(o: T): T;
|
|
@@ -472,7 +493,6 @@ declare namespace ts.pxtc.Util {
|
|
|
472
493
|
export function stringToUint8Array(input: string): Uint8Array;
|
|
473
494
|
export function uint8ArrayToString(input: ArrayLike<number>): string;
|
|
474
495
|
export function fromUTF8(binstr: string): string;
|
|
475
|
-
export function toUTF8(str: string, cesu8?: boolean): string;
|
|
476
496
|
export function toHex(bytes: ArrayLike<number>): string;
|
|
477
497
|
export function fromHex(hex: string): Uint8Array;
|
|
478
498
|
export class PromiseQueue {
|
|
@@ -545,10 +565,6 @@ declare namespace ts.pxtc.Util {
|
|
|
545
565
|
export function decodeBlobAsync(dataURL: string): Promise<Uint8Array>;
|
|
546
566
|
export function parseQueryString(qs: string): pxt.Map<string>;
|
|
547
567
|
export function stringifyQueryString(url: string, qs: any): string;
|
|
548
|
-
export function cloneTargetBundle(target: pxt.TargetBundle): pxt.TargetBundle;
|
|
549
|
-
export function cloneApis(byQName: pxt.Map<pxtc.SymbolInfo>): pxt.Map<SymbolInfo>;
|
|
550
|
-
export function cloneSymbolInfo(sym: pxtc.SymbolInfo): pxtc.SymbolInfo;
|
|
551
|
-
export function toUTF8Array(s: string): Uint8Array;
|
|
552
568
|
export function fromUTF8Array(s: Uint8Array): string;
|
|
553
569
|
export function getHomeUrl(): string;
|
|
554
570
|
export function isExperienceSupported(experienceId: string): boolean;
|
|
@@ -567,7 +583,6 @@ declare namespace ts.pxtc.Util {
|
|
|
567
583
|
export {};
|
|
568
584
|
}
|
|
569
585
|
declare namespace ts.pxtc.BrowserImpl {
|
|
570
|
-
function sha256buffer(buf: Uint8Array): string;
|
|
571
586
|
function sha256string(s: string): string;
|
|
572
587
|
}
|
|
573
588
|
declare namespace ts.pxtc.jsonPatch {
|
|
@@ -635,8 +650,6 @@ declare namespace pxt.perf {
|
|
|
635
650
|
};
|
|
636
651
|
}
|
|
637
652
|
declare namespace pxt {
|
|
638
|
-
export import U = pxtc.Util;
|
|
639
|
-
export import Util = pxtc.Util;
|
|
640
653
|
interface TCPIO {
|
|
641
654
|
onData: (v: Uint8Array) => void;
|
|
642
655
|
onError: (e: Error) => void;
|
|
@@ -650,6 +663,7 @@ declare namespace pxt {
|
|
|
650
663
|
function setBundledApiInfo(inf: Map<PackageApiInfo>): void;
|
|
651
664
|
function getBundledApiInfo(): Map<PackageApiInfo>;
|
|
652
665
|
function savedAppTheme(): AppTheme;
|
|
666
|
+
function getUnpatchedAppTarget(): TargetBundle;
|
|
653
667
|
function setCompileSwitch(name: string, value: boolean): void;
|
|
654
668
|
function setCompileSwitches(names: string): void;
|
|
655
669
|
function bundledSvg(id: string): string;
|
|
@@ -1161,9 +1175,36 @@ declare namespace Measurements {
|
|
|
1161
1175
|
const WebworkerRecvHandler = "webworker recvHandler";
|
|
1162
1176
|
const NetworkRequest = "network.request";
|
|
1163
1177
|
}
|
|
1164
|
-
declare namespace pxt {
|
|
1165
|
-
function
|
|
1166
|
-
function
|
|
1178
|
+
declare namespace pxt.packageUtils {
|
|
1179
|
+
function getVersionProtocol(version: string): string;
|
|
1180
|
+
function isVariantDisabled(config: PackageConfig, variant: string): boolean;
|
|
1181
|
+
function getConfigDependencies(config: PackageConfig, includeTests: boolean, includeCpp: boolean, isTestDependencyAvailable: (id: string, version: string) => boolean): Map<string>;
|
|
1182
|
+
/** Evaluates fileDependencies with && taking precedence over ||, without reading target or package globals. */
|
|
1183
|
+
function evaluateDependencyCondition(condition: string, target: Pick<AppTarget, "id" | "platformid">, hasDependency: (id: string) => boolean, onInvalidCondition: (condition: string) => void): boolean;
|
|
1184
|
+
function getConfigFiles(config: PackageConfig, includeTests: boolean, target: Pick<AppTarget, "id" | "platformid">, hasDependency: (id: string) => boolean, onInvalidCondition: (condition: string, filename: string) => void): string[];
|
|
1185
|
+
}
|
|
1186
|
+
declare namespace ts.pxtc {
|
|
1187
|
+
function parseCommentString(cmt: string): CommentAttrs;
|
|
1188
|
+
function updateBlockDef(attrs: CommentAttrs): void;
|
|
1189
|
+
function parseBlockDefinition(def: string): ParsedBlockDef;
|
|
1190
|
+
}
|
|
1191
|
+
declare namespace pxt.github {
|
|
1192
|
+
interface ParsedRepo {
|
|
1193
|
+
owner?: string;
|
|
1194
|
+
project?: string;
|
|
1195
|
+
slug: string;
|
|
1196
|
+
fullName: string;
|
|
1197
|
+
tag?: string;
|
|
1198
|
+
fileName?: string;
|
|
1199
|
+
}
|
|
1200
|
+
function parseRepoId(repo: string): ParsedRepo;
|
|
1201
|
+
function stringifyRepo(p: ParsedRepo, ignoreCase?: boolean): string;
|
|
1202
|
+
function join(...parts: string[]): string;
|
|
1203
|
+
}
|
|
1204
|
+
declare namespace ts.pxtc {
|
|
1205
|
+
const NATIVE_TYPE_THUMB = "thumb";
|
|
1206
|
+
const NATIVE_TYPE_VM = "vm";
|
|
1207
|
+
function emptyExtInfo(compileService: pxt.TargetCompileService): ExtensionInfo;
|
|
1167
1208
|
}
|
|
1168
1209
|
declare namespace pxt.cpp {
|
|
1169
1210
|
function nsWriter(nskw?: string): {
|
|
@@ -1176,14 +1217,35 @@ declare namespace pxt.cpp {
|
|
|
1176
1217
|
};
|
|
1177
1218
|
function parseCppInt(v: string): number;
|
|
1178
1219
|
class PkgConflictError extends Error {
|
|
1179
|
-
|
|
1180
|
-
|
|
1220
|
+
pkg0Id: string;
|
|
1221
|
+
pkg1Id: string;
|
|
1181
1222
|
settingName: string;
|
|
1182
1223
|
isUserError: boolean;
|
|
1183
1224
|
isVersionConflict: boolean;
|
|
1184
1225
|
constructor(msg: string);
|
|
1185
1226
|
}
|
|
1186
|
-
|
|
1227
|
+
interface ExtensionInfoHost {
|
|
1228
|
+
cache: Map<pxtc.ExtensionInfo>;
|
|
1229
|
+
logger: Pick<Logger, "debug" | "log">;
|
|
1230
|
+
perf: {
|
|
1231
|
+
measureStart(name: string): void;
|
|
1232
|
+
measureEnd(name: string): void;
|
|
1233
|
+
};
|
|
1234
|
+
}
|
|
1235
|
+
/**
|
|
1236
|
+
* Generates native extension files from pxt.json and project files, with dependencies
|
|
1237
|
+
* under pxt_modules/<directory>/. Dependencies resolve by directory, pxt.json name,
|
|
1238
|
+
* or their prefix before "---".
|
|
1239
|
+
* The target must not have variant overrides applied.
|
|
1240
|
+
* @example getExtensionInfo({ "pxt.json": config, "main.cpp": source }, target, "v2", host)
|
|
1241
|
+
*/
|
|
1242
|
+
function getExtensionInfo(files: Map<string>, target: TargetBundle, variant: string, host: ExtensionInfoHost): pxtc.ExtensionInfo;
|
|
1243
|
+
}
|
|
1244
|
+
declare namespace pxt {
|
|
1245
|
+
function lzmaDecompressAsync(buf: Uint8Array): Promise<string>;
|
|
1246
|
+
function lzmaCompressAsync(text: string): Promise<Uint8Array>;
|
|
1247
|
+
}
|
|
1248
|
+
declare namespace pxt.cpp {
|
|
1187
1249
|
interface HexFileMeta {
|
|
1188
1250
|
cloudId: string;
|
|
1189
1251
|
targetVersions?: pxt.TargetVersions;
|
|
@@ -1282,87 +1344,6 @@ declare namespace pxt.discourse {
|
|
|
1282
1344
|
function extractSharedIdFromPostUrl(url: string): Promise<string>;
|
|
1283
1345
|
function topicsByTag(apiUrl: string, tag: string): Promise<pxt.CodeCard[]>;
|
|
1284
1346
|
}
|
|
1285
|
-
declare namespace pxt.docs {
|
|
1286
|
-
type MarkedRenderFunction = (src: string, options?: any) => string;
|
|
1287
|
-
interface MarkedRenderer {
|
|
1288
|
-
options?: any;
|
|
1289
|
-
parser: {
|
|
1290
|
-
parse: (tokens: any[], loose?: boolean) => string;
|
|
1291
|
-
parseInline: (tokens: any[]) => string;
|
|
1292
|
-
};
|
|
1293
|
-
code?: (token: any) => string;
|
|
1294
|
-
link?: (token: any) => string;
|
|
1295
|
-
image?: (token: any) => string;
|
|
1296
|
-
listitem?: (token: any) => string;
|
|
1297
|
-
heading?: (token: any) => string;
|
|
1298
|
-
}
|
|
1299
|
-
interface MarkedModule extends MarkedRenderFunction {
|
|
1300
|
-
Renderer: {
|
|
1301
|
-
new (): MarkedRenderer;
|
|
1302
|
-
};
|
|
1303
|
-
lexer: (src: string, options?: any) => any[];
|
|
1304
|
-
setOptions: (options: any) => void;
|
|
1305
|
-
parseInline?: (src: string, options?: any) => string;
|
|
1306
|
-
parse?: (src: string, options?: any) => string;
|
|
1307
|
-
}
|
|
1308
|
-
export function htmlQuote(s: string): string;
|
|
1309
|
-
export function normalizeStaticMarkdown(markdown: string): string;
|
|
1310
|
-
export function html2Quote(s: string): string;
|
|
1311
|
-
export interface BreadcrumbEntry {
|
|
1312
|
-
name: string;
|
|
1313
|
-
href: string;
|
|
1314
|
-
}
|
|
1315
|
-
export let requireMarked: () => MarkedModule | undefined;
|
|
1316
|
-
export let requireDOMSanitizer: () => (html: string) => string;
|
|
1317
|
-
export interface RenderData {
|
|
1318
|
-
html: string;
|
|
1319
|
-
theme: AppTheme;
|
|
1320
|
-
params: Map<string>;
|
|
1321
|
-
filepath?: string;
|
|
1322
|
-
versionPath?: string;
|
|
1323
|
-
ghEditURLs?: string[];
|
|
1324
|
-
finish?: () => string;
|
|
1325
|
-
boxes?: Map<string>;
|
|
1326
|
-
macros?: Map<string>;
|
|
1327
|
-
settings?: Map<string>;
|
|
1328
|
-
TOC?: TOCMenuEntry[];
|
|
1329
|
-
}
|
|
1330
|
-
export function prepTemplate(d: RenderData): void;
|
|
1331
|
-
export interface RenderOptions {
|
|
1332
|
-
template: string;
|
|
1333
|
-
markdown: string;
|
|
1334
|
-
theme?: AppTheme;
|
|
1335
|
-
pubinfo?: Map<string>;
|
|
1336
|
-
filepath?: string;
|
|
1337
|
-
versionPath?: string;
|
|
1338
|
-
locale?: Map<string>;
|
|
1339
|
-
ghEditURLs?: string[];
|
|
1340
|
-
repo?: {
|
|
1341
|
-
name: string;
|
|
1342
|
-
fullName: string;
|
|
1343
|
-
tag?: string;
|
|
1344
|
-
};
|
|
1345
|
-
throwOnError?: boolean;
|
|
1346
|
-
TOC?: TOCMenuEntry[];
|
|
1347
|
-
}
|
|
1348
|
-
export function setupRenderer(renderer: MarkedRenderer, context?: {
|
|
1349
|
-
versionPath?: string;
|
|
1350
|
-
}): void;
|
|
1351
|
-
export function renderConditionalMacros(template: string, pubinfo: Map<string>): string;
|
|
1352
|
-
export function renderMarkdown(opts: RenderOptions): string;
|
|
1353
|
-
export function embedUrl(rootUrl: string, tag: string, id: string, height?: number): string;
|
|
1354
|
-
export function runUrl(url: string, padding: string, id: string): string;
|
|
1355
|
-
export function codeEmbedUrl(rootUrl: string, id: string, height?: number): string;
|
|
1356
|
-
export function translate(html: string, locale: Map<string>): {
|
|
1357
|
-
text: string;
|
|
1358
|
-
missing: Map<string>;
|
|
1359
|
-
};
|
|
1360
|
-
export function buildTOC(summaryMD: string): pxt.TOCMenuEntry[];
|
|
1361
|
-
export function visitTOC(toc: TOCMenuEntry[], fn: (e: TOCMenuEntry) => void): void;
|
|
1362
|
-
export function augmentDocs(baseMd: string, childMd: string): string;
|
|
1363
|
-
export function hydrateYouTubeEmbeds(content: HTMLElement, tickEvent: boolean): void;
|
|
1364
|
-
export {};
|
|
1365
|
-
}
|
|
1366
1347
|
declare namespace pxt.dom {
|
|
1367
1348
|
function el(name: string, attributes?: pxt.Map<string | number>, children?: string | HTMLElement | (string | HTMLElement)[]): HTMLElement;
|
|
1368
1349
|
}
|
|
@@ -1601,14 +1582,6 @@ declare namespace pxt.github {
|
|
|
1601
1582
|
name: string;
|
|
1602
1583
|
company: string;
|
|
1603
1584
|
}
|
|
1604
|
-
interface ParsedRepo {
|
|
1605
|
-
owner?: string;
|
|
1606
|
-
project?: string;
|
|
1607
|
-
slug: string;
|
|
1608
|
-
fullName: string;
|
|
1609
|
-
tag?: string;
|
|
1610
|
-
fileName?: string;
|
|
1611
|
-
}
|
|
1612
1585
|
enum GitRepoStatus {
|
|
1613
1586
|
Unknown = 0,
|
|
1614
1587
|
Approved = 1,
|
|
@@ -1634,12 +1607,9 @@ declare namespace pxt.github {
|
|
|
1634
1607
|
function isRepoHidden(repo: ParsedRepo, config: pxt.PackagesConfig): boolean;
|
|
1635
1608
|
function repoAsync(repopath: string, config: pxt.PackagesConfig): Promise<GitRepo>;
|
|
1636
1609
|
function searchAsync(query: string, config: pxt.PackagesConfig): Promise<GitRepo[]>;
|
|
1637
|
-
function parseRepoId(repo: string): ParsedRepo;
|
|
1638
1610
|
function toGithubDependencyPath(path: string, tag?: string): string;
|
|
1639
1611
|
function isGithubId(id: string): boolean;
|
|
1640
|
-
function stringifyRepo(p: ParsedRepo, ignoreCase?: boolean): string;
|
|
1641
1612
|
function normalizeRepoId(id: string, defaultTag?: string, ignoreCase?: boolean): string;
|
|
1642
|
-
function join(...parts: string[]): string;
|
|
1643
1613
|
function upgradedPackageReferenceAsync(cfg: PackagesConfig, id: string): Promise<string>;
|
|
1644
1614
|
function upgradedPackageId(cfg: PackagesConfig, id: string): string;
|
|
1645
1615
|
function latestVersionAsync(repopath: string, config: PackagesConfig, useProxy?: boolean, noCache?: boolean): Promise<string>;
|
|
@@ -2137,6 +2107,12 @@ declare namespace pxt.assets.music {
|
|
|
2137
2107
|
function getSongInfo(song: pxt.assets.music.Song): SongInfo;
|
|
2138
2108
|
function getEmptySong(measures: number): pxt.assets.music.Song;
|
|
2139
2109
|
}
|
|
2110
|
+
declare namespace pxt.cpp {
|
|
2111
|
+
interface PkgConflictError {
|
|
2112
|
+
pkg0: Package;
|
|
2113
|
+
pkg1: Package;
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2140
2116
|
declare namespace pxt {
|
|
2141
2117
|
class Package {
|
|
2142
2118
|
id: string;
|
|
@@ -2362,8 +2338,6 @@ declare namespace ts.pxtc {
|
|
|
2362
2338
|
const BINARY_PXT64 = "binary.pxt64";
|
|
2363
2339
|
const BINARY_ESP = "binary.bin";
|
|
2364
2340
|
const BINARY_SRCMAP = "binary.srcmap";
|
|
2365
|
-
const NATIVE_TYPE_THUMB = "thumb";
|
|
2366
|
-
const NATIVE_TYPE_VM = "vm";
|
|
2367
2341
|
const BLOCK_TRANSLATION_CACHE_KEY = "_blocks";
|
|
2368
2342
|
interface BlocksInfo {
|
|
2369
2343
|
apis: ApisInfo;
|
|
@@ -2528,11 +2502,7 @@ declare namespace ts.pxtc {
|
|
|
2528
2502
|
let apiLocalizationStrings: pxt.Map<string>;
|
|
2529
2503
|
function localizeApisAsync(apis: pxtc.ApisInfo, mainPkg: pxt.MainPackage): Promise<pxtc.ApisInfo>;
|
|
2530
2504
|
function getBlockTranslationsCacheKey(key: string): string | undefined;
|
|
2531
|
-
function emptyExtInfo(): ExtensionInfo;
|
|
2532
|
-
function parseCommentString(cmt: string): CommentAttrs;
|
|
2533
2505
|
function parameterTypeIsArrowFunction(pr: pxtc.ParameterDesc): boolean;
|
|
2534
|
-
function updateBlockDef(attrs: CommentAttrs): void;
|
|
2535
|
-
function parseBlockDefinition(def: string): ParsedBlockDef;
|
|
2536
2506
|
interface ChecksumBlock {
|
|
2537
2507
|
magic: number;
|
|
2538
2508
|
endMarkerPos: number;
|
|
@@ -4192,3 +4162,84 @@ declare namespace pxtmelody {
|
|
|
4192
4162
|
}
|
|
4193
4163
|
const SampleMelodies: MelodyInfo[];
|
|
4194
4164
|
}
|
|
4165
|
+
declare namespace pxt.docs {
|
|
4166
|
+
type MarkedRenderFunction = (src: string, options?: any) => string;
|
|
4167
|
+
interface MarkedRenderer {
|
|
4168
|
+
options?: any;
|
|
4169
|
+
parser: {
|
|
4170
|
+
parse: (tokens: any[], loose?: boolean) => string;
|
|
4171
|
+
parseInline: (tokens: any[]) => string;
|
|
4172
|
+
};
|
|
4173
|
+
code?: (token: any) => string;
|
|
4174
|
+
link?: (token: any) => string;
|
|
4175
|
+
image?: (token: any) => string;
|
|
4176
|
+
listitem?: (token: any) => string;
|
|
4177
|
+
heading?: (token: any) => string;
|
|
4178
|
+
}
|
|
4179
|
+
interface MarkedModule extends MarkedRenderFunction {
|
|
4180
|
+
Renderer: {
|
|
4181
|
+
new (): MarkedRenderer;
|
|
4182
|
+
};
|
|
4183
|
+
lexer: (src: string, options?: any) => any[];
|
|
4184
|
+
setOptions: (options: any) => void;
|
|
4185
|
+
parseInline?: (src: string, options?: any) => string;
|
|
4186
|
+
parse?: (src: string, options?: any) => string;
|
|
4187
|
+
}
|
|
4188
|
+
export function htmlQuote(s: string): string;
|
|
4189
|
+
export function normalizeStaticMarkdown(markdown: string): string;
|
|
4190
|
+
export function html2Quote(s: string): string;
|
|
4191
|
+
export interface BreadcrumbEntry {
|
|
4192
|
+
name: string;
|
|
4193
|
+
href: string;
|
|
4194
|
+
}
|
|
4195
|
+
export let requireMarked: () => MarkedModule | undefined;
|
|
4196
|
+
export let requireDOMSanitizer: () => (html: string) => string;
|
|
4197
|
+
export interface RenderData {
|
|
4198
|
+
html: string;
|
|
4199
|
+
theme: AppTheme;
|
|
4200
|
+
params: Map<string>;
|
|
4201
|
+
filepath?: string;
|
|
4202
|
+
versionPath?: string;
|
|
4203
|
+
ghEditURLs?: string[];
|
|
4204
|
+
finish?: () => string;
|
|
4205
|
+
boxes?: Map<string>;
|
|
4206
|
+
macros?: Map<string>;
|
|
4207
|
+
settings?: Map<string>;
|
|
4208
|
+
TOC?: TOCMenuEntry[];
|
|
4209
|
+
}
|
|
4210
|
+
export function prepTemplate(d: RenderData): void;
|
|
4211
|
+
export interface RenderOptions {
|
|
4212
|
+
template: string;
|
|
4213
|
+
markdown: string;
|
|
4214
|
+
theme?: AppTheme;
|
|
4215
|
+
pubinfo?: Map<string>;
|
|
4216
|
+
filepath?: string;
|
|
4217
|
+
versionPath?: string;
|
|
4218
|
+
locale?: Map<string>;
|
|
4219
|
+
ghEditURLs?: string[];
|
|
4220
|
+
repo?: {
|
|
4221
|
+
name: string;
|
|
4222
|
+
fullName: string;
|
|
4223
|
+
tag?: string;
|
|
4224
|
+
};
|
|
4225
|
+
throwOnError?: boolean;
|
|
4226
|
+
TOC?: TOCMenuEntry[];
|
|
4227
|
+
}
|
|
4228
|
+
export function setupRenderer(renderer: MarkedRenderer, context?: {
|
|
4229
|
+
versionPath?: string;
|
|
4230
|
+
}): void;
|
|
4231
|
+
export function renderConditionalMacros(template: string, pubinfo: Map<string>): string;
|
|
4232
|
+
export function renderMarkdown(opts: RenderOptions): string;
|
|
4233
|
+
export function embedUrl(rootUrl: string, tag: string, id: string, height?: number): string;
|
|
4234
|
+
export function runUrl(url: string, padding: string, id: string): string;
|
|
4235
|
+
export function codeEmbedUrl(rootUrl: string, id: string, height?: number): string;
|
|
4236
|
+
export function translate(html: string, locale: Map<string>): {
|
|
4237
|
+
text: string;
|
|
4238
|
+
missing: Map<string>;
|
|
4239
|
+
};
|
|
4240
|
+
export function buildTOC(summaryMD: string): pxt.TOCMenuEntry[];
|
|
4241
|
+
export function visitTOC(toc: TOCMenuEntry[], fn: (e: TOCMenuEntry) => void): void;
|
|
4242
|
+
export function augmentDocs(baseMd: string, childMd: string): string;
|
|
4243
|
+
export function hydrateYouTubeEmbeds(content: HTMLElement, tickEvent: boolean): void;
|
|
4244
|
+
export {};
|
|
4245
|
+
}
|