@rindo/core 2.18.0 → 2.22.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.
Files changed (96) hide show
  1. package/cli/config-flags.d.ts +33 -21
  2. package/cli/index.cjs +670 -388
  3. package/cli/index.d.ts +3 -0
  4. package/cli/index.js +670 -388
  5. package/cli/package.json +1 -1
  6. package/compiler/lib.dom.d.ts +434 -251
  7. package/compiler/lib.dom.iterable.d.ts +7 -13
  8. package/compiler/lib.es2015.collection.d.ts +62 -1
  9. package/compiler/lib.es2015.promise.d.ts +9 -4
  10. package/compiler/lib.es2015.proxy.d.ts +91 -2
  11. package/compiler/lib.es2015.reflect.d.ts +25 -2
  12. package/compiler/lib.es2015.symbol.wellknown.d.ts +3 -3
  13. package/compiler/lib.es2017.intl.d.ts +16 -1
  14. package/compiler/lib.es2019.d.ts +1 -0
  15. package/compiler/lib.es2019.intl.d.ts +25 -0
  16. package/compiler/lib.es2020.intl.d.ts +31 -6
  17. package/compiler/lib.es2021.intl.d.ts +11 -3
  18. package/compiler/lib.es2022.d.ts +1 -0
  19. package/compiler/lib.es2022.error.d.ts +2 -2
  20. package/compiler/lib.es2022.sharedmemory.d.ts +27 -0
  21. package/compiler/lib.es5.d.ts +39 -14
  22. package/compiler/lib.esnext.intl.d.ts +5 -1
  23. package/compiler/lib.webworker.d.ts +318 -55
  24. package/compiler/lib.webworker.iterable.d.ts +11 -3
  25. package/compiler/package.json +1 -1
  26. package/compiler/rindo.d.ts +3 -25
  27. package/compiler/rindo.js +53912 -51834
  28. package/compiler/rindo.min.js +2 -2
  29. package/compiler/sys/in-memory-fs.d.ts +3 -3
  30. package/compiler/transpile.d.ts +32 -0
  31. package/dependencies.json +3 -1
  32. package/dev-server/client/app-error.d.ts +1 -1
  33. package/dev-server/client/index.d.ts +2 -2
  34. package/dev-server/client/index.js +241 -241
  35. package/dev-server/client/package.json +1 -1
  36. package/dev-server/connector.html +3 -3
  37. package/dev-server/index.d.ts +1 -1
  38. package/dev-server/index.js +2 -2
  39. package/dev-server/open-in-editor-api.js +1 -1
  40. package/dev-server/package.json +1 -1
  41. package/dev-server/server-process.js +1182 -1148
  42. package/dev-server/ws.js +1 -1
  43. package/internal/app-data/package.json +1 -1
  44. package/internal/client/css-shim.js +2 -2
  45. package/internal/client/dom.js +1 -1
  46. package/internal/client/index.js +800 -673
  47. package/internal/client/package.json +1 -1
  48. package/internal/client/patch-browser.js +19 -1
  49. package/internal/client/patch-esm.js +1 -1
  50. package/internal/client/polyfills/css-shim.js +1 -1
  51. package/internal/client/shadow-css.js +1 -1
  52. package/internal/hydrate/index.js +154 -143
  53. package/internal/hydrate/package.json +1 -1
  54. package/internal/hydrate/runner.d.ts +1 -1
  55. package/internal/hydrate/runner.js +106 -106
  56. package/internal/package.json +1 -1
  57. package/internal/rindo-core/index.d.ts +9 -10
  58. package/internal/rindo-private.d.ts +149 -80
  59. package/internal/rindo-public-compiler.d.ts +68 -32
  60. package/internal/rindo-public-docs.d.ts +24 -0
  61. package/internal/rindo-public-runtime.d.ts +79 -7
  62. package/internal/testing/index.js +187 -175
  63. package/internal/testing/package.json +1 -1
  64. package/mock-doc/index.cjs +905 -896
  65. package/mock-doc/index.d.ts +2 -2
  66. package/mock-doc/index.js +905 -896
  67. package/mock-doc/package.json +1 -1
  68. package/package.json +48 -57
  69. package/readme.md +44 -31
  70. package/screenshot/compare/build/p-f4745c2f.entry.js +1 -1
  71. package/screenshot/index.d.ts +1 -1
  72. package/screenshot/index.js +3 -3
  73. package/screenshot/package.json +1 -1
  74. package/screenshot/pixel-match.js +983 -849
  75. package/sys/node/autoprefixer.js +2 -2
  76. package/sys/node/glob.js +1 -1
  77. package/sys/node/index.d.ts +4 -0
  78. package/sys/node/index.js +407 -418
  79. package/sys/node/package.json +1 -1
  80. package/sys/node/prompts.js +1 -1
  81. package/sys/node/worker.js +1 -1
  82. package/testing/index.d.ts +6 -6
  83. package/testing/index.js +1136 -1277
  84. package/testing/jest/jest-config.d.ts +1 -1
  85. package/testing/jest/jest-preprocessor.d.ts +3 -3
  86. package/testing/jest/jest-serializer.d.ts +1 -2
  87. package/testing/matchers/index.d.ts +3 -3
  88. package/testing/mock-fetch.d.ts +1 -1
  89. package/testing/mocks.d.ts +2 -2
  90. package/testing/package.json +1 -1
  91. package/testing/puppeteer/puppeteer-declarations.d.ts +5 -5
  92. package/testing/puppeteer/puppeteer-element.d.ts +2 -2
  93. package/testing/puppeteer/puppeteer-events.d.ts +1 -1
  94. package/testing/testing-logger.d.ts +1 -1
  95. package/testing/testing-utils.d.ts +1 -1
  96. package/testing/testing.d.ts +1 -1
@@ -1,7 +1,6 @@
1
- import { BuildResultsComponentGraph } from '.';
2
- import type { BuildEvents, BuildLog, CompilerBuildResults, CompilerBuildStart, CompilerFsStats, CompilerRequestResponse, CompilerSystem, Config, CopyResults, DevServerConfig, DevServerEditor, Diagnostic, Logger, LoggerTimeSpan, OptimizeCssInput, OptimizeCssOutput, OutputTargetWww, PageReloadStrategy, PrerenderConfig, StyleDoc, LoggerLineUpdater, TaskCommand } from './rindo-public-compiler';
3
- import type { ComponentInterface, ListenOptions, ListenTargetOptions, VNode, VNodeData } from './rindo-public-runtime';
4
1
  import type { InMemoryFileSystem } from '../compiler/sys/in-memory-fs';
2
+ import type { BuildEvents, BuildLog, BuildResultsComponentGraph, CompilerBuildResults, CompilerBuildStart, CompilerFsStats, CompilerRequestResponse, CompilerSystem, Config, CopyResults, DevServerConfig, DevServerEditor, Diagnostic, Logger, LoggerLineUpdater, LoggerTimeSpan, OptimizeCssInput, OptimizeCssOutput, OutputTargetWww, PageReloadStrategy, PrerenderConfig, StyleDoc, TaskCommand } from './rindo-public-compiler';
3
+ import type { ComponentInterface, ListenOptions, ListenTargetOptions, VNode, VNodeData } from './rindo-public-runtime';
5
4
  export interface SourceMap {
6
5
  file: string;
7
6
  mappings: string;
@@ -133,7 +132,7 @@ export interface BuildConditionals extends Partial<BuildFeatures> {
133
132
  transformTagName?: boolean;
134
133
  attachStyles?: boolean;
135
134
  }
136
- export declare type ModuleFormat = 'amd' | 'cjs' | 'es' | 'iife' | 'system' | 'umd' | 'commonjs' | 'esm' | 'module' | 'systemjs';
135
+ export type ModuleFormat = 'amd' | 'cjs' | 'es' | 'iife' | 'system' | 'umd' | 'commonjs' | 'esm' | 'module' | 'systemjs';
137
136
  export interface RollupResultModule {
138
137
  id: string;
139
138
  }
@@ -212,8 +211,8 @@ export interface BuildStyleUpdate {
212
211
  styleText: string;
213
212
  styleMode: string;
214
213
  }
215
- export declare type BuildTask = any;
216
- export declare type BuildStatus = 'pending' | 'error' | 'disabled' | 'default';
214
+ export type BuildTask = any;
215
+ export type BuildStatus = 'pending' | 'error' | 'disabled' | 'default';
217
216
  export interface CompilerBuildStats {
218
217
  timestamp: string;
219
218
  compiler: {
@@ -304,7 +303,7 @@ export interface BundleOutputChunk {
304
303
  };
305
304
  name: string;
306
305
  }
307
- export declare type SourceTarget = 'es5' | 'es2017' | 'latest';
306
+ export type SourceTarget = 'es5' | 'es2017' | 'latest';
308
307
  export interface BundleEntryInputs {
309
308
  [entryKey: string]: string;
310
309
  }
@@ -314,7 +313,7 @@ export interface BundleEntryInputs {
314
313
  * Rindo source. As a result, some types are duplicated here for Rollup that will be used within the codebase.
315
314
  * Updates to rollup may require these typings to be updated.
316
315
  */
317
- export declare type RollupResult = RollupChunkResult | RollupAssetResult;
316
+ export type RollupResult = RollupChunkResult | RollupAssetResult;
318
317
  export interface RollupAssetResult {
319
318
  type: 'asset';
320
319
  fileName: string;
@@ -347,7 +346,7 @@ export interface RollupSourceMap {
347
346
  /**
348
347
  * Result of Rindo compressing, mangling, and otherwise 'minifying' JavaScript
349
348
  */
350
- export declare type OptimizeJsResult = {
349
+ export type OptimizeJsResult = {
351
350
  output: string;
352
351
  diagnostics: Diagnostic[];
353
352
  sourceMap?: SourceMap;
@@ -400,7 +399,7 @@ export interface CollectionManifest {
400
399
  compiler?: CollectionCompilerVersion;
401
400
  bundles?: CollectionBundleManifest[];
402
401
  }
403
- export declare type CollectionComponentEntryPath = string;
402
+ export type CollectionComponentEntryPath = string;
404
403
  export interface CollectionBundleManifest {
405
404
  components: string[];
406
405
  }
@@ -550,8 +549,8 @@ export interface BuildOutputFile {
550
549
  name: string;
551
550
  content: string;
552
551
  }
553
- export declare type OnCallback = (buildStart: CompilerBuildStart) => void;
554
- export declare type RemoveCallback = () => boolean;
552
+ export type OnCallback = (buildStart: CompilerBuildStart) => void;
553
+ export type RemoveCallback = () => boolean;
555
554
  export interface CompilerCtx {
556
555
  version: number;
557
556
  activeBuildId: number;
@@ -585,7 +584,7 @@ export interface CompilerCtx {
585
584
  rollupCache: Map<string, any>;
586
585
  reset(): void;
587
586
  }
588
- export declare type NodeMap = WeakMap<any, ComponentCompilerMeta>;
587
+ export type NodeMap = WeakMap<any, ComponentCompilerMeta>;
589
588
  /** Must be serializable to JSON!! */
590
589
  export interface ComponentCompilerFeatures {
591
590
  hasAttribute: boolean;
@@ -682,7 +681,7 @@ export interface ComponentCompilerLegacyContext {
682
681
  name: string;
683
682
  context: string;
684
683
  }
685
- export declare type Encapsulation = 'shadow' | 'scoped' | 'none';
684
+ export type Encapsulation = 'shadow' | 'scoped' | 'none';
686
685
  /**
687
686
  * Intermediate Representation (IR) of a static property on a Rindo component
688
687
  */
@@ -709,7 +708,7 @@ export interface ComponentCompilerVirtualProperty {
709
708
  type: string;
710
709
  docs: string;
711
710
  }
712
- export declare type ComponentCompilerPropertyType = 'any' | 'string' | 'boolean' | 'number' | 'unknown';
711
+ export type ComponentCompilerPropertyType = 'any' | 'string' | 'boolean' | 'number' | 'unknown';
713
712
  export interface ComponentCompilerPropertyComplexType {
714
713
  original: string;
715
714
  resolved: string;
@@ -723,7 +722,7 @@ export interface ComponentCompilerPropertyComplexType {
723
722
  *
724
723
  * Note any key can be a user defined type or a TypeScript standard type.
725
724
  */
726
- export declare type ComponentCompilerTypeReferences = Record<string, ComponentCompilerTypeReference>;
725
+ export type ComponentCompilerTypeReferences = Record<string, ComponentCompilerTypeReference>;
727
726
  /**
728
727
  * Describes a reference to a type used by a component.
729
728
  */
@@ -785,12 +784,30 @@ export interface ComponentCompilerMethod extends ComponentCompilerStaticMethod {
785
784
  export interface ComponentCompilerState {
786
785
  name: string;
787
786
  }
787
+ /**
788
+ * Representation of JSDoc that is pulled off a node in the AST
789
+ */
788
790
  export interface CompilerJsDoc {
791
+ /**
792
+ * The text associated with the JSDoc
793
+ */
789
794
  text: string;
795
+ /**
796
+ * Tags included in the JSDoc
797
+ */
790
798
  tags: CompilerJsDocTagInfo[];
791
799
  }
800
+ /**
801
+ * Representation of a tag that exists in a JSDoc
802
+ */
792
803
  export interface CompilerJsDocTagInfo {
804
+ /**
805
+ * The name of the tag - e.g. `@deprecated`
806
+ */
793
807
  name: string;
808
+ /**
809
+ * Additional text that is associated with the tag - e.g. `@deprecated use v2 of this API`
810
+ */
794
811
  text?: string;
795
812
  }
796
813
  export interface CompilerStyleDoc {
@@ -824,6 +841,10 @@ export interface ComponentConstructor {
824
841
  isProxied?: boolean;
825
842
  isStyleRegistered?: boolean;
826
843
  }
844
+ /**
845
+ * A mapping from class member names to a list of methods which are watching
846
+ * them.
847
+ */
827
848
  export interface ComponentConstructorWatchers {
828
849
  [propName: string]: string[];
829
850
  }
@@ -833,15 +854,15 @@ export interface ComponentTestingConstructor extends ComponentConstructor {
833
854
  componentWillLoad?: Function;
834
855
  componentWillUpdate?: Function;
835
856
  componentWillRender?: Function;
836
- __componentWillLoad?: Function;
837
- __componentWillUpdate?: Function;
838
- __componentWillRender?: Function;
857
+ __componentWillLoad?: Function | null;
858
+ __componentWillUpdate?: Function | null;
859
+ __componentWillRender?: Function | null;
839
860
  };
840
861
  }
841
862
  export interface ComponentNativeConstructor extends ComponentConstructor {
842
863
  cmpMeta: ComponentRuntimeMeta;
843
864
  }
844
- export declare type ComponentConstructorEncapsulation = 'shadow' | 'scoped' | 'none';
865
+ export type ComponentConstructorEncapsulation = 'shadow' | 'scoped' | 'none';
845
866
  export interface ComponentConstructorProperties {
846
867
  [propName: string]: ComponentConstructorProperty;
847
868
  }
@@ -855,7 +876,7 @@ export interface ComponentConstructorProperty {
855
876
  type?: ComponentConstructorPropertyType;
856
877
  watchCallbacks?: string[];
857
878
  }
858
- export declare type ComponentConstructorPropertyType = StringConstructor | BooleanConstructor | NumberConstructor | 'string' | 'boolean' | 'number';
879
+ export type ComponentConstructorPropertyType = StringConstructor | BooleanConstructor | NumberConstructor | 'string' | 'boolean' | 'number';
859
880
  export interface ComponentConstructorEvent {
860
881
  name: string;
861
882
  method: string;
@@ -940,24 +961,21 @@ export interface DevServerMessage {
940
961
  status: number;
941
962
  };
942
963
  }
943
- export declare type DevServerSendMessage = (msg: DevServerMessage) => void;
964
+ export type DevServerSendMessage = (msg: DevServerMessage) => void;
944
965
  export interface DevServerContext {
945
966
  connectorHtml: string;
946
967
  dirTemplate: string;
947
968
  getBuildResults: () => Promise<CompilerBuildResults>;
948
969
  getCompilerRequest: (path: string) => Promise<CompilerRequestResponse>;
949
970
  isServerListening: boolean;
950
- logRequest: (req: {
951
- method: string;
952
- pathname?: string;
953
- }, status: number) => void;
971
+ logRequest: (req: HttpRequest, status: number) => void;
954
972
  prerenderConfig: PrerenderConfig;
955
973
  serve302: (req: any, res: any, pathname?: string) => void;
956
974
  serve404: (req: any, res: any, xSource: string, content?: string) => void;
957
975
  serve500: (req: any, res: any, error: any, xSource: string) => void;
958
976
  sys: CompilerSystem;
959
977
  }
960
- export declare type InitServerProcess = (sendMsg: (msg: DevServerMessage) => void) => (msg: DevServerMessage) => void;
978
+ export type InitServerProcess = (sendMsg: (msg: DevServerMessage) => void) => (msg: DevServerMessage) => void;
961
979
  export interface DevResponseHeaders {
962
980
  'cache-control'?: string;
963
981
  expires?: string;
@@ -1137,7 +1155,7 @@ export interface MinifyJsResult {
1137
1155
  pos: number;
1138
1156
  };
1139
1157
  }
1140
- export declare type ModuleMap = Map<string, Module>;
1158
+ export type ModuleMap = Map<string, Module>;
1141
1159
  /**
1142
1160
  * Rindo's Intermediate Representation (IR) of a module, bundling together
1143
1161
  * various pieces of information like the classes declared within it, the path
@@ -1302,13 +1320,13 @@ export interface RenderNode extends HostElement {
1302
1320
  */
1303
1321
  ['s-en']?: '' | /*shadow*/ 'c';
1304
1322
  }
1305
- export declare type LazyBundlesRuntimeData = LazyBundleRuntimeData[];
1306
- export declare type LazyBundleRuntimeData = [
1323
+ export type LazyBundlesRuntimeData = LazyBundleRuntimeData[];
1324
+ export type LazyBundleRuntimeData = [
1307
1325
  /** bundleIds */
1308
1326
  string,
1309
1327
  ComponentRuntimeMetaCompact[]
1310
1328
  ];
1311
- export declare type ComponentRuntimeMetaCompact = [
1329
+ export type ComponentRuntimeMetaCompact = [
1312
1330
  /** flags */
1313
1331
  number,
1314
1332
  /** tagname */
@@ -1320,47 +1338,87 @@ export declare type ComponentRuntimeMetaCompact = [
1320
1338
  /** listeners */
1321
1339
  ComponentRuntimeHostListener[]?
1322
1340
  ];
1341
+ /**
1342
+ * Runtime metadata for a Rindo component
1343
+ */
1323
1344
  export interface ComponentRuntimeMeta {
1345
+ /**
1346
+ * This number is used to hold a series of bitflags for various features we
1347
+ * support on components. The flags which this value is intended to store are
1348
+ * documented in the {@link CMP_FLAGS} enum.
1349
+ */
1324
1350
  $flags$: number;
1351
+ /**
1352
+ * Just what it says on the tin - the tag name for the component, as set in
1353
+ * the `@Component` decorator.
1354
+ */
1325
1355
  $tagName$: string;
1326
- $members$?: ComponentRuntimeMembers;
1327
- $listeners$?: ComponentRuntimeHostListener[];
1328
- $attrsToReflect$?: [string, string][];
1329
- $watchers$?: ComponentConstructorWatchers;
1330
- $lazyBundleId$?: string;
1331
- }
1332
- export interface ComponentRuntimeMembers {
1333
- [memberName: string]: ComponentRuntimeMember;
1334
- }
1335
- export declare type ComponentRuntimeMember = [
1336
1356
  /**
1337
- * flags data
1357
+ * A map of the component's members, which could include fields decorated
1358
+ * with `@Prop`, `@State`, etc as well as methods.
1338
1359
  */
1339
- number,
1360
+ $members$?: ComponentRuntimeMembers;
1340
1361
  /**
1341
- * attribute name to observe
1362
+ * Information about listeners on the component.
1342
1363
  */
1343
- string?
1344
- ];
1345
- export declare type ComponentRuntimeHostListener = [
1364
+ $listeners$?: ComponentRuntimeHostListener[];
1346
1365
  /**
1347
- * event flags
1366
+ * Tuples containing information about `@Prop` fields on the component which
1367
+ * are set to be reflected (i.e. kept in sync) as HTML attributes when
1368
+ * updated.
1348
1369
  */
1349
- number,
1370
+ $attrsToReflect$?: ComponentRuntimeReflectingAttr[];
1350
1371
  /**
1351
- * event name,
1372
+ * Information about which class members have watchers attached on the component.
1352
1373
  */
1353
- string,
1374
+ $watchers$?: ComponentConstructorWatchers;
1354
1375
  /**
1355
- * event method,
1376
+ * A bundle ID used for lazy loading.
1356
1377
  */
1357
- string
1358
- ];
1359
- export declare type ModeBundleId = ModeBundleIds | string;
1378
+ $lazyBundleId$?: string;
1379
+ }
1380
+ /**
1381
+ * A mapping of the names of members on the component to some runtime-specific
1382
+ * information about them.
1383
+ */
1384
+ export interface ComponentRuntimeMembers {
1385
+ [memberName: string]: ComponentRuntimeMember;
1386
+ }
1387
+ /**
1388
+ * A tuple with information about a class member that's relevant at runtime.
1389
+ * The fields are:
1390
+ *
1391
+ * 1. A number used to hold bitflags for component members. The bit flags which
1392
+ * this is intended to store are documented in the {@link MEMBER_FLAGS} enum.
1393
+ * 2. The attribute name to observe.
1394
+ */
1395
+ export type ComponentRuntimeMember = [number, string?];
1396
+ /**
1397
+ * A tuple holding information about a host listener which is relevant at
1398
+ * runtime. The field are:
1399
+ *
1400
+ * 1. A number used to hold bitflags for listeners. The bit flags which this is
1401
+ * intended to store are documented in the {@link LISTENER_FLAGS} enum.
1402
+ * 2. The event name.
1403
+ * 3. The method name.
1404
+ */
1405
+ export type ComponentRuntimeHostListener = [number, string, string];
1406
+ /**
1407
+ * A tuple containing information about props which are "reflected" at runtime,
1408
+ * meaning that HTML attributes on the component instance are kept in sync with
1409
+ * the prop value.
1410
+ *
1411
+ * The fields are:
1412
+ *
1413
+ * 1. the prop name
1414
+ * 2. the prop attribute.
1415
+ */
1416
+ export type ComponentRuntimeReflectingAttr = [string, string | undefined];
1417
+ export type ModeBundleId = ModeBundleIds | string;
1360
1418
  export interface ModeBundleIds {
1361
1419
  [modeName: string]: string;
1362
1420
  }
1363
- export declare type RuntimeRef = HostElement | {};
1421
+ export type RuntimeRef = HostElement | {};
1364
1422
  /**
1365
1423
  * Interface used to track an Element, it's virtual Node (`VNode`), and other data
1366
1424
  */
@@ -1387,17 +1445,22 @@ export interface PlatformRuntime {
1387
1445
  $flags$: number;
1388
1446
  $orgLocNodes$?: Map<string, RenderNode>;
1389
1447
  $resourcesUrl$: string;
1448
+ /**
1449
+ * The nonce value to be applied to all script/style tags at runtime.
1450
+ * If `null`, the nonce attribute will not be applied.
1451
+ */
1452
+ $nonce$?: string | null;
1390
1453
  jmp: (c: Function) => any;
1391
1454
  raf: (c: FrameRequestCallback) => number;
1392
1455
  ael: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
1393
1456
  rel: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
1394
1457
  ce: (eventName: string, opts?: any) => CustomEvent;
1395
1458
  }
1396
- export declare type RefMap = WeakMap<any, HostRef>;
1397
- export declare type StyleMap = Map<string, CSSStyleSheet | string>;
1398
- export declare type RootAppliedStyleMap = WeakMap<Element, Set<string>>;
1399
- export declare type AppliedStyleMap = Set<string>;
1400
- export declare type ActivelyProcessingCmpMap = Set<Element>;
1459
+ export type RefMap = WeakMap<any, HostRef>;
1460
+ export type StyleMap = Map<string, CSSStyleSheet | string>;
1461
+ export type RootAppliedStyleMap = WeakMap<Element, Set<string>>;
1462
+ export type AppliedStyleMap = Set<string>;
1463
+ export type ActivelyProcessingCmpMap = Set<Element>;
1401
1464
  export interface ScreenshotConnector {
1402
1465
  initBuild(opts: ScreenshotConnectorOptions): Promise<void>;
1403
1466
  completeBuild(masterBuild: ScreenshotBuild): Promise<ScreenshotBuildResults>;
@@ -2013,6 +2076,11 @@ export interface NewSpecPageOptions {
2013
2076
  */
2014
2077
  attachStyles?: boolean;
2015
2078
  strictBuild?: boolean;
2079
+ /**
2080
+ * Default values to be set on the platform runtime object (@see PlatformRuntime) when creating
2081
+ * the spec page.
2082
+ */
2083
+ platform?: Partial<PlatformRuntime>;
2016
2084
  }
2017
2085
  /**
2018
2086
  * A record of `TypesMemberNameData` entities.
@@ -2048,7 +2116,7 @@ export interface TypesModule {
2048
2116
  jsx: string;
2049
2117
  element: string;
2050
2118
  }
2051
- export declare type TypeInfo = {
2119
+ export type TypeInfo = {
2052
2120
  name: string;
2053
2121
  type: string;
2054
2122
  optional: boolean;
@@ -2066,8 +2134,8 @@ export interface Hyperscript {
2066
2134
  (sel: any, data: VNodeData, children: Array<VNode | undefined | null>): VNode;
2067
2135
  (sel: any, data: VNodeData, children: VNode): VNode;
2068
2136
  }
2069
- export declare type ChildType = VNode | number | string;
2070
- export declare type PropsType = VNodeProdData | number | string | null;
2137
+ export type ChildType = VNode | number | string;
2138
+ export type PropsType = VNodeProdData | number | string | null;
2071
2139
  export interface VNodeProdData {
2072
2140
  key?: string | number;
2073
2141
  class?: {
@@ -2105,7 +2173,7 @@ export interface CompilerWorkerTask {
2105
2173
  reject: (msg: string) => any;
2106
2174
  retries?: number;
2107
2175
  }
2108
- export declare type WorkerMsgHandler = (msgToWorker: MsgToWorker) => Promise<any>;
2176
+ export type WorkerMsgHandler = (msgToWorker: MsgToWorker) => Promise<any>;
2109
2177
  export interface WorkerTask {
2110
2178
  taskId: number;
2111
2179
  method: string;
@@ -2124,7 +2192,7 @@ export interface WorkerMessage {
2124
2192
  error?: string;
2125
2193
  exit?: boolean;
2126
2194
  }
2127
- export declare type WorkerRunner = (methodName: string, args: any[]) => Promise<any>;
2195
+ export type WorkerRunner = (methodName: string, args: any[]) => Promise<any>;
2128
2196
  export interface WorkerRunnerOptions {
2129
2197
  isLongRunningTask?: boolean;
2130
2198
  workerKey?: string;
@@ -2158,30 +2226,31 @@ export interface TerminalInfo {
2158
2226
  /**
2159
2227
  * The task to run in order to collect the duration data point.
2160
2228
  */
2161
- export declare type TelemetryCallback = (...args: any[]) => void | Promise<void>;
2229
+ export type TelemetryCallback = (...args: any[]) => void | Promise<void>;
2162
2230
  /**
2163
2231
  * The model for the data that's tracked.
2164
2232
  */
2165
2233
  export interface TrackableData {
2166
- yarn: boolean;
2167
- component_count?: number;
2168
2234
  arguments: string[];
2169
- targets: string[];
2170
- task: TaskCommand;
2171
- duration_ms: number;
2235
+ build: string;
2236
+ component_count?: number;
2237
+ config: Config;
2238
+ cpu_model: string | undefined;
2239
+ duration_ms: number | undefined;
2240
+ has_app_pwa_config: boolean;
2241
+ is_browser_env: boolean;
2242
+ os_name: string | undefined;
2243
+ os_version: string | undefined;
2172
2244
  packages: string[];
2173
2245
  packages_no_versions?: string[];
2174
- os_name: string;
2175
- os_version: string;
2176
- cpu_model: string;
2177
- typescript: string;
2178
2246
  rollup: string;
2247
+ rindo: string;
2179
2248
  system: string;
2180
2249
  system_major?: string;
2181
- build: string;
2182
- rindo: string;
2183
- has_app_pwa_config: boolean;
2184
- config: Config;
2250
+ targets: string[];
2251
+ task: TaskCommand | null;
2252
+ typescript: string;
2253
+ yarn: boolean;
2185
2254
  }
2186
2255
  /**
2187
2256
  * Used as the object sent to the server. Value is the data tracked.