@rindo/core 2.18.0 → 2.22.2
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/cli/config-flags.d.ts +33 -21
- package/cli/index.cjs +670 -388
- package/cli/index.d.ts +3 -0
- package/cli/index.js +670 -388
- package/cli/package.json +1 -1
- package/compiler/lib.dom.d.ts +434 -251
- package/compiler/lib.dom.iterable.d.ts +7 -13
- package/compiler/lib.es2015.collection.d.ts +62 -1
- package/compiler/lib.es2015.promise.d.ts +9 -4
- package/compiler/lib.es2015.proxy.d.ts +91 -2
- package/compiler/lib.es2015.reflect.d.ts +25 -2
- package/compiler/lib.es2015.symbol.wellknown.d.ts +3 -3
- package/compiler/lib.es2017.intl.d.ts +16 -1
- package/compiler/lib.es2019.d.ts +1 -0
- package/compiler/lib.es2019.intl.d.ts +25 -0
- package/compiler/lib.es2020.intl.d.ts +31 -6
- package/compiler/lib.es2021.intl.d.ts +11 -3
- package/compiler/lib.es2022.d.ts +1 -0
- package/compiler/lib.es2022.error.d.ts +2 -2
- package/compiler/lib.es2022.sharedmemory.d.ts +27 -0
- package/compiler/lib.es5.d.ts +39 -14
- package/compiler/lib.esnext.intl.d.ts +5 -1
- package/compiler/lib.webworker.d.ts +318 -55
- package/compiler/lib.webworker.iterable.d.ts +11 -3
- package/compiler/package.json +1 -1
- package/compiler/rindo.d.ts +3 -25
- package/compiler/rindo.js +53912 -51834
- package/compiler/rindo.min.js +2 -2
- package/compiler/sys/in-memory-fs.d.ts +3 -3
- package/compiler/transpile.d.ts +32 -0
- package/dependencies.json +3 -1
- package/dev-server/client/app-error.d.ts +1 -1
- package/dev-server/client/index.d.ts +2 -2
- package/dev-server/client/index.js +241 -241
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +3 -3
- package/dev-server/index.d.ts +1 -1
- package/dev-server/index.js +2 -2
- package/dev-server/open-in-editor-api.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +1182 -1148
- package/dev-server/ws.js +1 -1
- package/internal/app-data/package.json +1 -1
- package/internal/client/css-shim.js +2 -2
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +800 -673
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +19 -1
- package/internal/client/patch-esm.js +1 -1
- package/internal/client/polyfills/css-shim.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/index.js +154 -143
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.d.ts +1 -1
- package/internal/hydrate/runner.js +106 -106
- package/internal/package.json +1 -1
- package/internal/rindo-core/index.d.ts +9 -10
- package/internal/rindo-private.d.ts +149 -80
- package/internal/rindo-public-compiler.d.ts +42 -31
- package/internal/rindo-public-docs.d.ts +24 -0
- package/internal/rindo-public-runtime.d.ts +79 -7
- package/internal/testing/index.js +187 -175
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +905 -896
- package/mock-doc/index.d.ts +2 -2
- package/mock-doc/index.js +905 -896
- package/mock-doc/package.json +1 -1
- package/package.json +48 -57
- package/readme.md +44 -31
- package/screenshot/compare/build/p-f4745c2f.entry.js +1 -1
- package/screenshot/index.d.ts +1 -1
- package/screenshot/index.js +3 -3
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +983 -849
- package/sys/node/autoprefixer.js +2 -2
- package/sys/node/glob.js +1 -1
- package/sys/node/index.d.ts +4 -0
- package/sys/node/index.js +399 -413
- package/sys/node/package.json +1 -1
- package/sys/node/prompts.js +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.d.ts +6 -6
- package/testing/index.js +1136 -1277
- package/testing/jest/jest-config.d.ts +1 -1
- package/testing/jest/jest-preprocessor.d.ts +3 -3
- package/testing/jest/jest-serializer.d.ts +1 -2
- package/testing/matchers/index.d.ts +3 -3
- package/testing/mock-fetch.d.ts +1 -1
- package/testing/mocks.d.ts +2 -2
- package/testing/package.json +1 -1
- package/testing/puppeteer/puppeteer-declarations.d.ts +5 -5
- package/testing/puppeteer/puppeteer-element.d.ts +2 -2
- package/testing/puppeteer/puppeteer-events.d.ts +1 -1
- package/testing/testing-logger.d.ts +1 -1
- package/testing/testing-utils.d.ts +1 -1
- 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
|
|
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
|
|
216
|
-
export
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
554
|
-
export
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
1306
|
-
export
|
|
1323
|
+
export type LazyBundlesRuntimeData = LazyBundleRuntimeData[];
|
|
1324
|
+
export type LazyBundleRuntimeData = [
|
|
1307
1325
|
/** bundleIds */
|
|
1308
1326
|
string,
|
|
1309
1327
|
ComponentRuntimeMetaCompact[]
|
|
1310
1328
|
];
|
|
1311
|
-
export
|
|
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
|
-
*
|
|
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
|
-
|
|
1360
|
+
$members$?: ComponentRuntimeMembers;
|
|
1340
1361
|
/**
|
|
1341
|
-
*
|
|
1362
|
+
* Information about listeners on the component.
|
|
1342
1363
|
*/
|
|
1343
|
-
|
|
1344
|
-
];
|
|
1345
|
-
export declare type ComponentRuntimeHostListener = [
|
|
1364
|
+
$listeners$?: ComponentRuntimeHostListener[];
|
|
1346
1365
|
/**
|
|
1347
|
-
*
|
|
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
|
-
|
|
1370
|
+
$attrsToReflect$?: ComponentRuntimeReflectingAttr[];
|
|
1350
1371
|
/**
|
|
1351
|
-
*
|
|
1372
|
+
* Information about which class members have watchers attached on the component.
|
|
1352
1373
|
*/
|
|
1353
|
-
|
|
1374
|
+
$watchers$?: ComponentConstructorWatchers;
|
|
1354
1375
|
/**
|
|
1355
|
-
*
|
|
1376
|
+
* A bundle ID used for lazy loading.
|
|
1356
1377
|
*/
|
|
1357
|
-
string
|
|
1358
|
-
|
|
1359
|
-
|
|
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
|
|
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
|
|
1397
|
-
export
|
|
1398
|
-
export
|
|
1399
|
-
export
|
|
1400
|
-
export
|
|
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
|
|
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
|
|
2070
|
-
export
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
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
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
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.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { JsonDocs } from './rindo-public-docs';
|
|
2
|
-
import type { PrerenderUrlResults } from '../internal';
|
|
3
1
|
import type { ConfigFlags } from '../cli/config-flags';
|
|
2
|
+
import type { PrerenderUrlResults } from '../internal';
|
|
3
|
+
import type { JsonDocs } from './rindo-public-docs';
|
|
4
4
|
export * from './rindo-public-docs';
|
|
5
5
|
/**
|
|
6
6
|
* https://rindojs.web.app/docs/config/
|
|
@@ -66,7 +66,7 @@ export interface RindoConfig {
|
|
|
66
66
|
* The namespace config is a string representing a namespace for the app.
|
|
67
67
|
* For apps that are not meant to be a library of reusable components,
|
|
68
68
|
* the default of App is just fine. However, if the app is meant to be consumed
|
|
69
|
-
* as a third-party library, such as
|
|
69
|
+
* as a third-party library, such as Family, a unique namespace is required.
|
|
70
70
|
*/
|
|
71
71
|
namespace?: string;
|
|
72
72
|
/**
|
|
@@ -153,7 +153,7 @@ export interface RindoConfig {
|
|
|
153
153
|
*/
|
|
154
154
|
hydratedFlag?: HydratedFlag;
|
|
155
155
|
/**
|
|
156
|
-
*
|
|
156
|
+
* Family prefers to hide all components prior to hydration with a style tag appended
|
|
157
157
|
* to the head of the document containing some `visibility: hidden;` css rules.
|
|
158
158
|
*
|
|
159
159
|
* Disabling this will remove the style tag that sets `visibility: hidden;` on all
|
|
@@ -163,7 +163,7 @@ export interface RindoConfig {
|
|
|
163
163
|
*/
|
|
164
164
|
invisiblePrehydration?: boolean;
|
|
165
165
|
/**
|
|
166
|
-
* Sets the task queue used by
|
|
166
|
+
* Sets the task queue used by Rindo's runtime. The task queue schedules DOM read and writes
|
|
167
167
|
* across the frames to efficiently render and reduce layout thrashing. By default,
|
|
168
168
|
* `async` is used. It's recommended to also try each setting to decide which works
|
|
169
169
|
* best for your use-case. In all cases, if your app has many CPU intensive tasks causing the
|
|
@@ -351,12 +351,12 @@ export interface Config extends RindoConfig {
|
|
|
351
351
|
* conforming to a given interface. For best results, pair with a validation
|
|
352
352
|
* function as shown in the example.
|
|
353
353
|
*/
|
|
354
|
-
|
|
354
|
+
type Loose<T extends Object> = Record<string, any> & Partial<T>;
|
|
355
355
|
/**
|
|
356
356
|
* A Loose version of the Config interface. This is intended to let us load a partial config
|
|
357
357
|
* and have type information carry though as we construct an object which is a valid `Config`.
|
|
358
358
|
*/
|
|
359
|
-
export
|
|
359
|
+
export type UnvalidatedConfig = Loose<Config>;
|
|
360
360
|
/**
|
|
361
361
|
* Helper type to strip optional markers from keys in a type, while preserving other type information for the key.
|
|
362
362
|
* This type takes a union of keys, K, in type T to allow for the type T to be gradually updated.
|
|
@@ -366,20 +366,20 @@ export declare type UnvalidatedConfig = Loose<Config>;
|
|
|
366
366
|
* type ReqFieldFoo = RequireFields<Foo, 'bar'>; // { bar: number, baz?: string }
|
|
367
367
|
* ```
|
|
368
368
|
*/
|
|
369
|
-
|
|
369
|
+
type RequireFields<T, K extends keyof T> = T & {
|
|
370
370
|
[P in K]-?: T[P];
|
|
371
371
|
};
|
|
372
372
|
/**
|
|
373
373
|
* Fields in {@link Config} to make required for {@link ValidatedConfig}
|
|
374
374
|
*/
|
|
375
|
-
|
|
375
|
+
type StrictConfigFields = 'flags' | 'logger' | 'outputTargets' | 'rootDir' | 'sys' | 'testing';
|
|
376
376
|
/**
|
|
377
377
|
* A version of {@link Config} that makes certain fields required. This type represents a valid configuration entity.
|
|
378
378
|
* When a configuration is received by the user, it is a bag of unverified data. In order to make stricter guarantees
|
|
379
379
|
* about the data from a type-safety perspective, this type is intended to be used throughout the codebase once
|
|
380
380
|
* validations have occurred at runtime.
|
|
381
381
|
*/
|
|
382
|
-
export
|
|
382
|
+
export type ValidatedConfig = RequireFields<Config, StrictConfigFields>;
|
|
383
383
|
export interface HydratedFlag {
|
|
384
384
|
/**
|
|
385
385
|
* Defaults to `hydrated`.
|
|
@@ -512,6 +512,10 @@ export interface RindoDevServerConfig {
|
|
|
512
512
|
export interface DevServerConfig extends RindoDevServerConfig {
|
|
513
513
|
browserUrl?: string;
|
|
514
514
|
devServerDir?: string;
|
|
515
|
+
/**
|
|
516
|
+
* A list of glob patterns like `subdir/*.js` to exclude from hot-module
|
|
517
|
+
* reloading updates.
|
|
518
|
+
*/
|
|
515
519
|
excludeHmr?: string[];
|
|
516
520
|
historyApiFallback?: HistoryApiFallback;
|
|
517
521
|
openBrowser?: boolean;
|
|
@@ -529,8 +533,8 @@ export interface DevServerEditor {
|
|
|
529
533
|
supported?: boolean;
|
|
530
534
|
priority?: number;
|
|
531
535
|
}
|
|
532
|
-
export
|
|
533
|
-
export
|
|
536
|
+
export type TaskCommand = 'build' | 'docs' | 'generate' | 'g' | 'help' | 'info' | 'prerender' | 'serve' | 'telemetry' | 'test' | 'version';
|
|
537
|
+
export type PageReloadStrategy = 'hmr' | 'pageReload' | null;
|
|
534
538
|
/**
|
|
535
539
|
* The prerender config is used when prerendering a `www` output target.
|
|
536
540
|
* Within `rindo.config.ts`, set the path to the prerendering
|
|
@@ -1146,6 +1150,7 @@ export interface BuildOnEvents {
|
|
|
1146
1150
|
on(eventName: CompilerEventBuildNoChange, cb: () => void): BuildOnEventRemove;
|
|
1147
1151
|
}
|
|
1148
1152
|
export interface BuildEmitEvents {
|
|
1153
|
+
emit(eventName: CompilerEventName, path: string): void;
|
|
1149
1154
|
emit(eventName: CompilerEventFileAdd, path: string): void;
|
|
1150
1155
|
emit(eventName: CompilerEventFileDelete, path: string): void;
|
|
1151
1156
|
emit(eventName: CompilerEventFileUpdate, path: string): void;
|
|
@@ -1220,7 +1225,7 @@ export interface HmrStyleUpdate {
|
|
|
1220
1225
|
styleTag: string;
|
|
1221
1226
|
styleText: string;
|
|
1222
1227
|
}
|
|
1223
|
-
export
|
|
1228
|
+
export type BuildOnEventRemove = () => boolean;
|
|
1224
1229
|
export interface BuildEvents extends BuildOnEvents, BuildEmitEvents {
|
|
1225
1230
|
unsubscribeAll(): void;
|
|
1226
1231
|
}
|
|
@@ -1228,19 +1233,19 @@ export interface CompilerBuildStart {
|
|
|
1228
1233
|
buildId: number;
|
|
1229
1234
|
timestamp: string;
|
|
1230
1235
|
}
|
|
1231
|
-
export
|
|
1232
|
-
export
|
|
1233
|
-
export
|
|
1234
|
-
export
|
|
1235
|
-
export
|
|
1236
|
-
export
|
|
1237
|
-
export
|
|
1238
|
-
export
|
|
1239
|
-
export
|
|
1240
|
-
export
|
|
1241
|
-
export
|
|
1242
|
-
export
|
|
1243
|
-
export
|
|
1236
|
+
export type CompilerFileWatcherCallback = (fileName: string, eventKind: CompilerFileWatcherEvent) => void;
|
|
1237
|
+
export type CompilerFileWatcherEvent = CompilerEventFileAdd | CompilerEventFileDelete | CompilerEventFileUpdate | CompilerEventDirAdd | CompilerEventDirDelete;
|
|
1238
|
+
export type CompilerEventName = CompilerEventFsChange | CompilerEventFileUpdate | CompilerEventFileAdd | CompilerEventFileDelete | CompilerEventDirAdd | CompilerEventDirDelete | CompilerEventBuildStart | CompilerEventBuildFinish | CompilerEventBuildNoChange | CompilerEventBuildLog;
|
|
1239
|
+
export type CompilerEventFsChange = 'fsChange';
|
|
1240
|
+
export type CompilerEventFileUpdate = 'fileUpdate';
|
|
1241
|
+
export type CompilerEventFileAdd = 'fileAdd';
|
|
1242
|
+
export type CompilerEventFileDelete = 'fileDelete';
|
|
1243
|
+
export type CompilerEventDirAdd = 'dirAdd';
|
|
1244
|
+
export type CompilerEventDirDelete = 'dirDelete';
|
|
1245
|
+
export type CompilerEventBuildStart = 'buildStart';
|
|
1246
|
+
export type CompilerEventBuildFinish = 'buildFinish';
|
|
1247
|
+
export type CompilerEventBuildLog = 'buildLog';
|
|
1248
|
+
export type CompilerEventBuildNoChange = 'buildNoChange';
|
|
1244
1249
|
export interface CompilerFileWatcher {
|
|
1245
1250
|
close(): void | Promise<void>;
|
|
1246
1251
|
}
|
|
@@ -1654,7 +1659,7 @@ export interface EmulateViewport {
|
|
|
1654
1659
|
* in this array without good reason!
|
|
1655
1660
|
*/
|
|
1656
1661
|
export declare const LOG_LEVELS: readonly ["debug", "info", "warn", "error"];
|
|
1657
|
-
export
|
|
1662
|
+
export type LogLevel = (typeof LOG_LEVELS)[number];
|
|
1658
1663
|
/**
|
|
1659
1664
|
* Common logger to be used by the compiler, dev-server and CLI. The CLI will use a
|
|
1660
1665
|
* NodeJS based console logging and colors, and the web will use browser based
|
|
@@ -1850,6 +1855,12 @@ export interface OutputTargetBaseNext {
|
|
|
1850
1855
|
export interface OutputTargetDistCustomElements extends OutputTargetBaseNext {
|
|
1851
1856
|
type: 'dist-custom-elements';
|
|
1852
1857
|
empty?: boolean;
|
|
1858
|
+
/**
|
|
1859
|
+
* Triggers the following behaviors when enabled:
|
|
1860
|
+
* 1. All `@rindo/core/*` module references are treated as external during bundling.
|
|
1861
|
+
* 2. File names are not hashed.
|
|
1862
|
+
* 3. File minification will follow the behavior defined at the root of the Rindo config.
|
|
1863
|
+
*/
|
|
1853
1864
|
externalRuntime?: boolean;
|
|
1854
1865
|
copy?: CopyTask[];
|
|
1855
1866
|
inlineDynamicImports?: boolean;
|
|
@@ -1884,7 +1895,7 @@ export interface OutputTargetBase {
|
|
|
1884
1895
|
*/
|
|
1885
1896
|
type: string;
|
|
1886
1897
|
}
|
|
1887
|
-
export
|
|
1898
|
+
export type OutputTargetBuild = OutputTargetDistCollection | OutputTargetDistLazy;
|
|
1888
1899
|
export interface OutputTargetAngular extends OutputTargetBase {
|
|
1889
1900
|
type: 'angular';
|
|
1890
1901
|
componentCorePackage: string;
|
|
@@ -1972,7 +1983,7 @@ export interface OutputTargetWww extends OutputTargetBase {
|
|
|
1972
1983
|
serviceWorker?: ServiceWorkerConfig | null | false;
|
|
1973
1984
|
appDir?: string;
|
|
1974
1985
|
}
|
|
1975
|
-
export
|
|
1986
|
+
export type OutputTarget = OutputTargetAngular | OutputTargetCopy | OutputTargetCustom | OutputTargetDist | OutputTargetDistCollection | OutputTargetDistCustomElements | OutputTargetDistCustomElementsBundle | OutputTargetDistLazy | OutputTargetDistGlobalStyles | OutputTargetDistLazyLoader | OutputTargetDocsJson | OutputTargetDocsCustom | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetWww | OutputTargetHydrate | OutputTargetStats | OutputTargetDistTypes;
|
|
1976
1987
|
export interface ServiceWorkerConfig {
|
|
1977
1988
|
unregister?: boolean;
|
|
1978
1989
|
swDest?: string;
|
|
@@ -2111,7 +2122,7 @@ export interface OptimizeCssInput {
|
|
|
2111
2122
|
* Instead, this basically just serves as a label type to track
|
|
2112
2123
|
* that arguments are being passed consistently.
|
|
2113
2124
|
*/
|
|
2114
|
-
export
|
|
2125
|
+
export type AutoprefixerOptions = Object;
|
|
2115
2126
|
/**
|
|
2116
2127
|
* Output from CSS optimization functions, wrapping up optimized
|
|
2117
2128
|
* CSS and any diagnostics produced during optimization.
|
|
@@ -2281,7 +2292,7 @@ export interface TranspileOptions {
|
|
|
2281
2292
|
*/
|
|
2282
2293
|
sys?: CompilerSystem;
|
|
2283
2294
|
}
|
|
2284
|
-
export
|
|
2295
|
+
export type CompileTarget = 'latest' | 'esnext' | 'es2020' | 'es2019' | 'es2018' | 'es2017' | 'es2015' | 'es5' | string | undefined;
|
|
2285
2296
|
export interface TranspileResults {
|
|
2286
2297
|
code: string;
|
|
2287
2298
|
data?: any[];
|