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 './stencil-public-compiler';
|
3 | import type { ComponentInterface, ListenOptions, ListenTargetOptions, VNode, VNodeData } from './stencil-public-runtime';
|
4 | import type { InMemoryFileSystem } from '../compiler/sys/in-memory-fs';
|
5 | export interface SourceMap {
|
6 | file: string;
|
7 | mappings: string;
|
8 | names: string[];
|
9 | sourceRoot?: string;
|
10 | sources: string[];
|
11 | sourcesContent?: string[];
|
12 | version: number;
|
13 | }
|
14 | export interface PrintLine {
|
15 | lineIndex: number;
|
16 | lineNumber: number;
|
17 | text?: string;
|
18 | errorCharStart: number;
|
19 | errorLength?: number;
|
20 | }
|
21 | export interface AssetsMeta {
|
22 | absolutePath: string;
|
23 | cmpRelativePath: string;
|
24 | originalComponentPath: string;
|
25 | }
|
26 | export interface ParsedImport {
|
27 | importPath: string;
|
28 | basename: string;
|
29 | ext: string;
|
30 | data: ImportData;
|
31 | }
|
32 | export interface ImportData {
|
33 | tag?: string;
|
34 | encapsulation?: string;
|
35 | mode?: string;
|
36 | }
|
37 | export interface SerializeImportData extends ImportData {
|
38 | importeePath: string;
|
39 | importerPath?: string;
|
40 | }
|
41 | export interface BuildFeatures {
|
42 | style: boolean;
|
43 | mode: boolean;
|
44 | shadowDom: boolean;
|
45 | shadowDelegatesFocus: boolean;
|
46 | scoped: boolean;
|
47 | |
48 |
|
49 |
|
50 | allRenderFn: boolean;
|
51 | |
52 |
|
53 |
|
54 | hasRenderFn: boolean;
|
55 | vdomRender: boolean;
|
56 | vdomAttribute: boolean;
|
57 | vdomClass: boolean;
|
58 | vdomFunctional: boolean;
|
59 | vdomKey: boolean;
|
60 | vdomListener: boolean;
|
61 | vdomPropOrAttr: boolean;
|
62 | vdomRef: boolean;
|
63 | vdomStyle: boolean;
|
64 | vdomText: boolean;
|
65 | vdomXlink: boolean;
|
66 | slotRelocation: boolean;
|
67 | slot: boolean;
|
68 | svg: boolean;
|
69 | element: boolean;
|
70 | event: boolean;
|
71 | hostListener: boolean;
|
72 | hostListenerTargetWindow: boolean;
|
73 | hostListenerTargetDocument: boolean;
|
74 | hostListenerTargetBody: boolean;
|
75 | |
76 |
|
77 |
|
78 | hostListenerTargetParent: boolean;
|
79 | hostListenerTarget: boolean;
|
80 | method: boolean;
|
81 | prop: boolean;
|
82 | propMutable: boolean;
|
83 | state: boolean;
|
84 | watchCallback: boolean;
|
85 | member: boolean;
|
86 | updatable: boolean;
|
87 | propBoolean: boolean;
|
88 | propNumber: boolean;
|
89 | propString: boolean;
|
90 | lifecycle: boolean;
|
91 | cmpDidLoad: boolean;
|
92 | cmpShouldUpdate: boolean;
|
93 | cmpWillLoad: boolean;
|
94 | cmpDidUpdate: boolean;
|
95 | cmpWillUpdate: boolean;
|
96 | cmpWillRender: boolean;
|
97 | cmpDidRender: boolean;
|
98 | cmpDidUnload: boolean;
|
99 | connectedCallback: boolean;
|
100 | disconnectedCallback: boolean;
|
101 | asyncLoading: boolean;
|
102 | observeAttribute: boolean;
|
103 | reflect: boolean;
|
104 | taskQueue: boolean;
|
105 | }
|
106 | export interface BuildConditionals extends Partial<BuildFeatures> {
|
107 | hotModuleReplacement?: boolean;
|
108 | isDebug?: boolean;
|
109 | isTesting?: boolean;
|
110 | isDev?: boolean;
|
111 | devTools?: boolean;
|
112 | invisiblePrehydration?: boolean;
|
113 | hydrateServerSide?: boolean;
|
114 | hydrateClientSide?: boolean;
|
115 | lifecycleDOMEvents?: boolean;
|
116 | cssAnnotations?: boolean;
|
117 | lazyLoad?: boolean;
|
118 | profile?: boolean;
|
119 | cssVarShim?: boolean;
|
120 | constructableCSS?: boolean;
|
121 | appendChildSlotFix?: boolean;
|
122 | slotChildNodesFix?: boolean;
|
123 | scopedSlotTextContentFix?: boolean;
|
124 | cloneNodeFix?: boolean;
|
125 | dynamicImportShim?: boolean;
|
126 | hydratedAttribute?: boolean;
|
127 | hydratedClass?: boolean;
|
128 | initializeNextTick?: boolean;
|
129 | safari10?: boolean;
|
130 | scriptDataOpts?: boolean;
|
131 | shadowDomShim?: boolean;
|
132 | asyncQueue?: boolean;
|
133 | transformTagName?: boolean;
|
134 | attachStyles?: boolean;
|
135 | }
|
136 | export declare type ModuleFormat = 'amd' | 'cjs' | 'es' | 'iife' | 'system' | 'umd' | 'commonjs' | 'esm' | 'module' | 'systemjs';
|
137 | export interface RollupResultModule {
|
138 | id: string;
|
139 | }
|
140 | export interface RollupResults {
|
141 | modules: RollupResultModule[];
|
142 | }
|
143 | export interface UpdatedLazyBuildCtx {
|
144 | name: 'esm-browser' | 'esm' | 'cjs' | 'system';
|
145 | buildCtx: BuildCtx;
|
146 | }
|
147 | export interface BuildCtx {
|
148 | buildId: number;
|
149 | buildResults: CompilerBuildResults;
|
150 | buildStats?: CompilerBuildStats | {
|
151 | diagnostics: Diagnostic[];
|
152 | };
|
153 | buildMessages: string[];
|
154 | bundleBuildCount: number;
|
155 | collections: Collection[];
|
156 | compilerCtx: CompilerCtx;
|
157 | esmBrowserComponentBundle: ReadonlyArray<BundleModule>;
|
158 | esmComponentBundle: ReadonlyArray<BundleModule>;
|
159 | es5ComponentBundle: ReadonlyArray<BundleModule>;
|
160 | systemComponentBundle: ReadonlyArray<BundleModule>;
|
161 | commonJsComponentBundle: ReadonlyArray<BundleModule>;
|
162 | components: ComponentCompilerMeta[];
|
163 | componentGraph: Map<string, string[]>;
|
164 | config: Config;
|
165 | createTimeSpan(msg: string, debug?: boolean): LoggerTimeSpan;
|
166 | data: any;
|
167 | debug: (msg: string) => void;
|
168 | diagnostics: Diagnostic[];
|
169 | dirsAdded: string[];
|
170 | dirsDeleted: string[];
|
171 | entryModules: EntryModule[];
|
172 | filesAdded: string[];
|
173 | filesChanged: string[];
|
174 | filesDeleted: string[];
|
175 | filesUpdated: string[];
|
176 | filesWritten: string[];
|
177 | globalStyle: string | undefined;
|
178 | hasConfigChanges: boolean;
|
179 | hasError: boolean;
|
180 | hasFinished: boolean;
|
181 | hasHtmlChanges: boolean;
|
182 | hasPrintedResults: boolean;
|
183 | hasServiceWorkerChanges: boolean;
|
184 | hasScriptChanges: boolean;
|
185 | hasStyleChanges: boolean;
|
186 | hasWarning: boolean;
|
187 | hydrateAppFilePath: string;
|
188 | indexBuildCount: number;
|
189 | indexDoc: Document;
|
190 | isRebuild: boolean;
|
191 | moduleFiles: Module[];
|
192 | packageJson: PackageJsonData;
|
193 | pendingCopyTasks: Promise<CopyResults>[];
|
194 | progress(task: BuildTask): void;
|
195 | requiresFullBuild: boolean;
|
196 | rollupResults?: RollupResults;
|
197 | scriptsAdded: string[];
|
198 | scriptsDeleted: string[];
|
199 | startTime: number;
|
200 | styleBuildCount: number;
|
201 | stylesPromise: Promise<void>;
|
202 | stylesUpdated: BuildStyleUpdate[];
|
203 | timeSpan: LoggerTimeSpan;
|
204 | timestamp: string;
|
205 | transpileBuildCount: number;
|
206 | validateTypesBuild?(): Promise<void>;
|
207 | validateTypesHandler?: (results: any) => Promise<void>;
|
208 | validateTypesPromise?: Promise<any>;
|
209 | }
|
210 | export interface BuildStyleUpdate {
|
211 | styleTag: string;
|
212 | styleText: string;
|
213 | styleMode: string;
|
214 | }
|
215 | export declare type BuildTask = any;
|
216 | export declare type BuildStatus = 'pending' | 'error' | 'disabled' | 'default';
|
217 | export interface CompilerBuildStats {
|
218 | timestamp: string;
|
219 | compiler: {
|
220 | name: string;
|
221 | version: string;
|
222 | };
|
223 | app: {
|
224 | namespace: string;
|
225 | fsNamespace: string;
|
226 | components: number;
|
227 | entries: number;
|
228 | bundles: number;
|
229 | outputs: any;
|
230 | };
|
231 | options: {
|
232 | minifyJs: boolean;
|
233 | minifyCss: boolean;
|
234 | hashFileNames: boolean;
|
235 | hashedFileNameLength: number;
|
236 | buildEs5: boolean | 'prod';
|
237 | };
|
238 | formats: {
|
239 | esmBrowser: ReadonlyArray<CompilerBuildStatBundle>;
|
240 | esm: ReadonlyArray<CompilerBuildStatBundle>;
|
241 | es5: ReadonlyArray<CompilerBuildStatBundle>;
|
242 | system: ReadonlyArray<CompilerBuildStatBundle>;
|
243 | commonjs: ReadonlyArray<CompilerBuildStatBundle>;
|
244 | };
|
245 | components: BuildComponent[];
|
246 | entries: EntryModule[];
|
247 | rollupResults: RollupResults;
|
248 | sourceGraph?: BuildSourceGraph;
|
249 | componentGraph: BuildResultsComponentGraph;
|
250 | collections: {
|
251 | name: string;
|
252 | source: string;
|
253 | tags: string[];
|
254 | }[];
|
255 | }
|
256 | export interface CompilerBuildStatBundle {
|
257 | key: string;
|
258 | components: string[];
|
259 | bundleId: string;
|
260 | fileName: string;
|
261 | imports: string[];
|
262 | originalByteSize: number;
|
263 | }
|
264 | export interface BuildEntry {
|
265 | entryId: string;
|
266 | components: BuildComponent[];
|
267 | bundles: BuildBundle[];
|
268 | inputs: string[];
|
269 | modes?: string[];
|
270 | encapsulations: Encapsulation[];
|
271 | }
|
272 | export interface BuildBundle {
|
273 | fileName: string;
|
274 | outputs: string[];
|
275 | size?: number;
|
276 | mode?: string;
|
277 | scopedStyles?: boolean;
|
278 | target?: string;
|
279 | }
|
280 | export interface BuildSourceGraph {
|
281 | [filePath: string]: string[];
|
282 | }
|
283 | export interface BuildComponent {
|
284 | tag: string;
|
285 | dependencyOf?: string[];
|
286 | dependencies?: string[];
|
287 | }
|
288 | export interface BundleOutputChunk {
|
289 | code: string;
|
290 | fileName: string;
|
291 | isDynamicEntry: boolean;
|
292 | isEntry: boolean;
|
293 | map: any;
|
294 | dynamicImports: string[];
|
295 | imports: string[];
|
296 | exports: string[];
|
297 | modules: {
|
298 | [modulePath: string]: {
|
299 | renderedExports: string[];
|
300 | removedExports: string[];
|
301 | renderedLength: number;
|
302 | originalLength: number;
|
303 | };
|
304 | };
|
305 | name: string;
|
306 | }
|
307 | export declare type SourceTarget = 'es5' | 'es2017' | 'latest';
|
308 | export interface BundleEntryInputs {
|
309 | [entryKey: string]: string;
|
310 | }
|
311 |
|
312 |
|
313 |
|
314 |
|
315 |
|
316 |
|
317 | export declare type RollupResult = RollupChunkResult | RollupAssetResult;
|
318 | export interface RollupAssetResult {
|
319 | type: 'asset';
|
320 | fileName: string;
|
321 | content: string;
|
322 | }
|
323 | export interface RollupChunkResult {
|
324 | type: 'chunk';
|
325 | entryKey: string;
|
326 | fileName: string;
|
327 | code: string;
|
328 | isEntry: boolean;
|
329 | isComponent: boolean;
|
330 | isCore: boolean;
|
331 | isIndex: boolean;
|
332 | isBrowserLoader: boolean;
|
333 | imports: string[];
|
334 | moduleFormat: ModuleFormat;
|
335 | map?: RollupSourceMap;
|
336 | }
|
337 | export interface RollupSourceMap {
|
338 | file: string;
|
339 | mappings: string;
|
340 | names: string[];
|
341 | sources: string[];
|
342 | sourcesContent: string[];
|
343 | version: number;
|
344 | toString(): string;
|
345 | toUrl(): string;
|
346 | }
|
347 |
|
348 |
|
349 |
|
350 | export declare type OptimizeJsResult = {
|
351 | output: string;
|
352 | diagnostics: Diagnostic[];
|
353 | sourceMap?: SourceMap;
|
354 | };
|
355 | export interface BundleModule {
|
356 | entryKey: string;
|
357 | rollupResult: RollupChunkResult;
|
358 | cmps: ComponentCompilerMeta[];
|
359 | output: BundleModuleOutput;
|
360 | }
|
361 | export interface BundleModuleOutput {
|
362 | bundleId: string;
|
363 | fileName: string;
|
364 | code: string;
|
365 | }
|
366 | export interface Cache {
|
367 | get(key: string): Promise<string>;
|
368 | put(key: string, value: string): Promise<boolean>;
|
369 | has(key: string): Promise<boolean>;
|
370 | createKey(domain: string, ...args: any[]): Promise<string>;
|
371 | commit(): Promise<void>;
|
372 | clear(): void;
|
373 | clearDiskCache(): Promise<void>;
|
374 | getMemoryStats(): string;
|
375 | initCacheDir(): Promise<void>;
|
376 | }
|
377 | export interface CollectionCompilerMeta {
|
378 | collectionName?: string;
|
379 | moduleId?: string;
|
380 | moduleDir?: string;
|
381 | moduleFiles?: Module[];
|
382 | global?: Module;
|
383 | compiler?: CollectionCompilerVersion;
|
384 | isInitialized?: boolean;
|
385 | hasExports?: boolean;
|
386 | dependencies?: string[];
|
387 | bundles?: {
|
388 | components: string[];
|
389 | }[];
|
390 | }
|
391 | export interface CollectionCompilerVersion {
|
392 | name: string;
|
393 | version: string;
|
394 | typescriptVersion?: string;
|
395 | }
|
396 | export interface CollectionManifest {
|
397 | entries?: CollectionComponentEntryPath[];
|
398 | collections?: CollectionDependencyManifest[];
|
399 | global?: string;
|
400 | compiler?: CollectionCompilerVersion;
|
401 | bundles?: CollectionBundleManifest[];
|
402 | }
|
403 | export declare type CollectionComponentEntryPath = string;
|
404 | export interface CollectionBundleManifest {
|
405 | components: string[];
|
406 | }
|
407 | export interface CollectionDependencyManifest {
|
408 | name: string;
|
409 | tags: string[];
|
410 | }
|
411 |
|
412 | export interface Collection {
|
413 | collectionName?: string;
|
414 | moduleDir?: string;
|
415 | moduleFiles?: any[];
|
416 | global?: any;
|
417 | compiler?: CollectionCompiler;
|
418 | isInitialized?: boolean;
|
419 | hasExports?: boolean;
|
420 | dependencies?: string[];
|
421 | bundles?: {
|
422 | components: string[];
|
423 | }[];
|
424 | }
|
425 | export interface CollectionCompiler {
|
426 | name: string;
|
427 | version: string;
|
428 | typescriptVersion?: string;
|
429 | }
|
430 | export interface AppRegistry {
|
431 | namespace?: string;
|
432 | fsNamespace?: string;
|
433 | loader?: string;
|
434 | core?: string;
|
435 | corePolyfilled?: string;
|
436 | global?: string;
|
437 | components?: AppRegistryComponents;
|
438 | }
|
439 | export interface AppRegistryComponents {
|
440 | [tagName: string]: {
|
441 | bundleIds: ModeBundleIds;
|
442 | encapsulation?: 'shadow' | 'scoped';
|
443 | };
|
444 | }
|
445 |
|
446 | export interface ModuleFile {
|
447 | sourceFilePath: string;
|
448 | jsFilePath?: string;
|
449 | dtsFilePath?: string;
|
450 | cmpMeta?: any;
|
451 | isCollectionDependency?: boolean;
|
452 | excludeFromCollection?: boolean;
|
453 | originalCollectionComponentPath?: string;
|
454 | externalImports?: string[];
|
455 | localImports?: string[];
|
456 | potentialCmpRefs?: string[];
|
457 | hasSlot?: boolean;
|
458 | hasSvg?: boolean;
|
459 | }
|
460 | export interface ModuleBundles {
|
461 | [bundleId: string]: string;
|
462 | }
|
463 | export interface CollectionData {
|
464 | components?: ComponentData[];
|
465 | collections?: CollectionDependencyData[];
|
466 | global?: string;
|
467 | modules?: string[];
|
468 | compiler?: {
|
469 | name: string;
|
470 | version: string;
|
471 | typescriptVersion?: string;
|
472 | };
|
473 | bundles?: CollectionBundle[];
|
474 | }
|
475 | export interface CollectionBundle {
|
476 | components: string[];
|
477 | }
|
478 | export interface CollectionDependencyData {
|
479 | name: string;
|
480 | tags: string[];
|
481 | }
|
482 | export interface ComponentData {
|
483 | tag?: string;
|
484 | componentPath?: string;
|
485 | componentClass?: string;
|
486 | dependencies?: string[];
|
487 | styles?: StylesData;
|
488 | props?: PropData[];
|
489 | states?: StateData[];
|
490 | listeners?: ListenerData[];
|
491 | methods?: MethodData[];
|
492 | events?: EventData[];
|
493 | connect?: ConnectData[];
|
494 | context?: ContextData[];
|
495 | hostElement?: HostElementData;
|
496 | host?: any;
|
497 | assetPaths?: string[];
|
498 | slot?: 'hasSlots' | 'hasNamedSlots';
|
499 | shadow?: boolean;
|
500 | scoped?: boolean;
|
501 | priority?: 'low';
|
502 | }
|
503 | export interface StylesData {
|
504 | [modeName: string]: StyleData;
|
505 | }
|
506 | export interface StyleData {
|
507 | stylePaths?: string[];
|
508 | style?: string;
|
509 | }
|
510 | export interface PropData {
|
511 | name?: string;
|
512 | type?: 'Boolean' | 'Number' | 'String' | 'Any';
|
513 | mutable?: boolean;
|
514 | attr?: string;
|
515 | reflectToAttr?: boolean;
|
516 | watch?: string[];
|
517 | }
|
518 | export interface StateData {
|
519 | name: string;
|
520 | }
|
521 | export interface ListenerData {
|
522 | event: string;
|
523 | method: string;
|
524 | capture?: boolean;
|
525 | passive?: boolean;
|
526 | enabled?: boolean;
|
527 | }
|
528 | export interface MethodData {
|
529 | name: string;
|
530 | }
|
531 | export interface EventData {
|
532 | event: string;
|
533 | method?: string;
|
534 | bubbles?: boolean;
|
535 | cancelable?: boolean;
|
536 | composed?: boolean;
|
537 | }
|
538 | export interface ConnectData {
|
539 | name: string;
|
540 | tag?: string;
|
541 | }
|
542 | export interface ContextData {
|
543 | name: string;
|
544 | id?: string;
|
545 | }
|
546 | export interface HostElementData {
|
547 | name: string;
|
548 | }
|
549 | export interface BuildOutputFile {
|
550 | name: string;
|
551 | content: string;
|
552 | }
|
553 | export declare type OnCallback = (buildStart: CompilerBuildStart) => void;
|
554 | export declare type RemoveCallback = () => boolean;
|
555 | export interface CompilerCtx {
|
556 | version: number;
|
557 | activeBuildId: number;
|
558 | activeDirsAdded: string[];
|
559 | activeDirsDeleted: string[];
|
560 | activeFilesAdded: string[];
|
561 | activeFilesDeleted: string[];
|
562 | activeFilesUpdated: string[];
|
563 | addWatchDir: (path: string, recursive: boolean) => void;
|
564 | addWatchFile: (path: string) => void;
|
565 | cache: Cache;
|
566 | cssModuleImports: Map<string, string[]>;
|
567 | cachedGlobalStyle: string;
|
568 | collections: CollectionCompilerMeta[];
|
569 | compilerOptions: any;
|
570 | events: BuildEvents;
|
571 | fs: InMemoryFileSystem;
|
572 | hasSuccessfulBuild: boolean;
|
573 | isActivelyBuilding: boolean;
|
574 | lastBuildResults: CompilerBuildResults;
|
575 | moduleMap: ModuleMap;
|
576 | nodeMap: NodeMap;
|
577 | resolvedCollections: Set<string>;
|
578 | rollupCacheHydrate: any;
|
579 | rollupCacheLazy: any;
|
580 | rollupCacheNative: any;
|
581 | styleModeNames: Set<string>;
|
582 | changedModules: Set<string>;
|
583 | changedFiles: Set<string>;
|
584 | worker?: CompilerWorkerContext;
|
585 | rollupCache: Map<string, any>;
|
586 | reset(): void;
|
587 | }
|
588 | export declare type NodeMap = WeakMap<any, ComponentCompilerMeta>;
|
589 |
|
590 | export interface ComponentCompilerFeatures {
|
591 | hasAttribute: boolean;
|
592 | hasAttributeChangedCallbackFn: boolean;
|
593 | hasComponentWillLoadFn: boolean;
|
594 | hasComponentDidLoadFn: boolean;
|
595 | hasComponentShouldUpdateFn: boolean;
|
596 | hasComponentWillUpdateFn: boolean;
|
597 | hasComponentDidUpdateFn: boolean;
|
598 | hasComponentWillRenderFn: boolean;
|
599 | hasComponentDidRenderFn: boolean;
|
600 | hasComponentDidUnloadFn: boolean;
|
601 | hasConnectedCallbackFn: boolean;
|
602 | hasDisconnectedCallbackFn: boolean;
|
603 | hasElement: boolean;
|
604 | hasEvent: boolean;
|
605 | hasLifecycle: boolean;
|
606 | hasListener: boolean;
|
607 | hasListenerTarget: boolean;
|
608 | hasListenerTargetWindow: boolean;
|
609 | hasListenerTargetDocument: boolean;
|
610 | hasListenerTargetBody: boolean;
|
611 | |
612 |
|
613 |
|
614 | hasListenerTargetParent: boolean;
|
615 | hasMember: boolean;
|
616 | hasMethod: boolean;
|
617 | hasMode: boolean;
|
618 | hasProp: boolean;
|
619 | hasPropBoolean: boolean;
|
620 | hasPropNumber: boolean;
|
621 | hasPropString: boolean;
|
622 | hasPropMutable: boolean;
|
623 | hasReflect: boolean;
|
624 | hasRenderFn: boolean;
|
625 | hasState: boolean;
|
626 | hasStyle: boolean;
|
627 | hasVdomAttribute: boolean;
|
628 | hasVdomClass: boolean;
|
629 | hasVdomFunctional: boolean;
|
630 | hasVdomKey: boolean;
|
631 | hasVdomListener: boolean;
|
632 | hasVdomPropOrAttr: boolean;
|
633 | hasVdomRef: boolean;
|
634 | hasVdomRender: boolean;
|
635 | hasVdomStyle: boolean;
|
636 | hasVdomText: boolean;
|
637 | hasVdomXlink: boolean;
|
638 | hasWatchCallback: boolean;
|
639 | htmlAttrNames: string[];
|
640 | htmlTagNames: string[];
|
641 | htmlParts: string[];
|
642 | isUpdateable: boolean;
|
643 | isPlain: boolean;
|
644 | potentialCmpRefs: string[];
|
645 | }
|
646 |
|
647 | export interface ComponentCompilerMeta extends ComponentCompilerFeatures {
|
648 | assetsDirs: CompilerAssetDir[];
|
649 | componentClassName: string;
|
650 | elementRef: string;
|
651 | encapsulation: Encapsulation;
|
652 | shadowDelegatesFocus: boolean;
|
653 | excludeFromCollection: boolean;
|
654 | isCollectionDependency: boolean;
|
655 | docs: CompilerJsDoc;
|
656 | jsFilePath: string;
|
657 | sourceMapPath: string;
|
658 | listeners: ComponentCompilerListener[];
|
659 | events: ComponentCompilerEvent[];
|
660 | methods: ComponentCompilerMethod[];
|
661 | virtualProperties: ComponentCompilerVirtualProperty[];
|
662 | properties: ComponentCompilerProperty[];
|
663 | watchers: ComponentCompilerWatch[];
|
664 | sourceFilePath: string;
|
665 | states: ComponentCompilerState[];
|
666 | styleDocs: CompilerStyleDoc[];
|
667 | styles: StyleCompiler[];
|
668 | tagName: string;
|
669 | internal: boolean;
|
670 | legacyConnect: ComponentCompilerLegacyConnect[];
|
671 | legacyContext: ComponentCompilerLegacyContext[];
|
672 | dependencies?: string[];
|
673 | dependents?: string[];
|
674 | directDependencies?: string[];
|
675 | directDependents?: string[];
|
676 | }
|
677 | export interface ComponentCompilerLegacyConnect {
|
678 | name: string;
|
679 | connect: string;
|
680 | }
|
681 | export interface ComponentCompilerLegacyContext {
|
682 | name: string;
|
683 | context: string;
|
684 | }
|
685 | export declare type Encapsulation = 'shadow' | 'scoped' | 'none';
|
686 |
|
687 |
|
688 |
|
689 | export interface ComponentCompilerStaticProperty {
|
690 | mutable: boolean;
|
691 | optional: boolean;
|
692 | required: boolean;
|
693 | type: ComponentCompilerPropertyType;
|
694 | complexType: ComponentCompilerPropertyComplexType;
|
695 | attribute?: string;
|
696 | reflect?: boolean;
|
697 | docs: CompilerJsDoc;
|
698 | defaultValue?: string;
|
699 | }
|
700 |
|
701 |
|
702 |
|
703 | export interface ComponentCompilerProperty extends ComponentCompilerStaticProperty {
|
704 | name: string;
|
705 | internal: boolean;
|
706 | }
|
707 | export interface ComponentCompilerVirtualProperty {
|
708 | name: string;
|
709 | type: string;
|
710 | docs: string;
|
711 | }
|
712 | export declare type ComponentCompilerPropertyType = 'any' | 'string' | 'boolean' | 'number' | 'unknown';
|
713 | export interface ComponentCompilerPropertyComplexType {
|
714 | original: string;
|
715 | resolved: string;
|
716 | references: ComponentCompilerTypeReferences;
|
717 | }
|
718 |
|
719 |
|
720 |
|
721 |
|
722 |
|
723 |
|
724 |
|
725 |
|
726 | export declare type ComponentCompilerTypeReferences = Record<string, ComponentCompilerTypeReference>;
|
727 |
|
728 |
|
729 |
|
730 | export interface ComponentCompilerTypeReference {
|
731 | |
732 |
|
733 |
|
734 |
|
735 |
|
736 |
|
737 | location: 'local' | 'global' | 'import';
|
738 | |
739 |
|
740 |
|
741 | path?: string;
|
742 | }
|
743 | export interface ComponentCompilerStaticEvent {
|
744 | name: string;
|
745 | method: string;
|
746 | bubbles: boolean;
|
747 | cancelable: boolean;
|
748 | composed: boolean;
|
749 | docs: CompilerJsDoc;
|
750 | complexType: ComponentCompilerEventComplexType;
|
751 | }
|
752 | export interface ComponentCompilerEvent extends ComponentCompilerStaticEvent {
|
753 | internal: boolean;
|
754 | }
|
755 | export interface ComponentCompilerEventComplexType {
|
756 | original: string;
|
757 | resolved: string;
|
758 | references: ComponentCompilerTypeReferences;
|
759 | }
|
760 | export interface ComponentCompilerListener {
|
761 | name: string;
|
762 | method: string;
|
763 | capture: boolean;
|
764 | passive: boolean;
|
765 | target: ListenTargetOptions | undefined;
|
766 | }
|
767 | export interface ComponentCompilerStaticMethod {
|
768 | docs: CompilerJsDoc;
|
769 | complexType: ComponentCompilerMethodComplexType;
|
770 | }
|
771 | export interface ComponentCompilerMethodComplexType {
|
772 | signature: string;
|
773 | parameters: CompilerJsDoc[];
|
774 | references: ComponentCompilerTypeReferences;
|
775 | return: string;
|
776 | }
|
777 | export interface ComponentCompilerWatch {
|
778 | propName: string;
|
779 | methodName: string;
|
780 | }
|
781 | export interface ComponentCompilerMethod extends ComponentCompilerStaticMethod {
|
782 | name: string;
|
783 | internal: boolean;
|
784 | }
|
785 | export interface ComponentCompilerState {
|
786 | name: string;
|
787 | }
|
788 | export interface CompilerJsDoc {
|
789 | text: string;
|
790 | tags: CompilerJsDocTagInfo[];
|
791 | }
|
792 | export interface CompilerJsDocTagInfo {
|
793 | name: string;
|
794 | text?: string;
|
795 | }
|
796 | export interface CompilerStyleDoc {
|
797 | name: string;
|
798 | docs: string;
|
799 | annotation: 'prop';
|
800 | }
|
801 | export interface CompilerAssetDir {
|
802 | absolutePath?: string;
|
803 | cmpRelativePath?: string;
|
804 | originalComponentPath?: string;
|
805 | }
|
806 | export interface ComponentCompilerData {
|
807 | exportLine: string;
|
808 | filePath: string;
|
809 | cmp: ComponentCompilerMeta;
|
810 | uniqueComponentClassName?: string;
|
811 | importLine?: string;
|
812 | }
|
813 | export interface ComponentConstructor {
|
814 | is?: string;
|
815 | properties?: ComponentConstructorProperties;
|
816 | watchers?: ComponentConstructorWatchers;
|
817 | events?: ComponentConstructorEvent[];
|
818 | listeners?: ComponentConstructorListener[];
|
819 | style?: string;
|
820 | styleId?: string;
|
821 | encapsulation?: ComponentConstructorEncapsulation;
|
822 | observedAttributes?: string[];
|
823 | cmpMeta?: ComponentRuntimeMeta;
|
824 | isProxied?: boolean;
|
825 | isStyleRegistered?: boolean;
|
826 | }
|
827 | export interface ComponentConstructorWatchers {
|
828 | [propName: string]: string[];
|
829 | }
|
830 | export interface ComponentTestingConstructor extends ComponentConstructor {
|
831 | COMPILER_META: ComponentCompilerMeta;
|
832 | prototype?: {
|
833 | componentWillLoad?: Function;
|
834 | componentWillUpdate?: Function;
|
835 | componentWillRender?: Function;
|
836 | __componentWillLoad?: Function;
|
837 | __componentWillUpdate?: Function;
|
838 | __componentWillRender?: Function;
|
839 | };
|
840 | }
|
841 | export interface ComponentNativeConstructor extends ComponentConstructor {
|
842 | cmpMeta: ComponentRuntimeMeta;
|
843 | }
|
844 | export declare type ComponentConstructorEncapsulation = 'shadow' | 'scoped' | 'none';
|
845 | export interface ComponentConstructorProperties {
|
846 | [propName: string]: ComponentConstructorProperty;
|
847 | }
|
848 | export interface ComponentConstructorProperty {
|
849 | attribute?: string;
|
850 | elementRef?: boolean;
|
851 | method?: boolean;
|
852 | mutable?: boolean;
|
853 | reflect?: boolean;
|
854 | state?: boolean;
|
855 | type?: ComponentConstructorPropertyType;
|
856 | watchCallbacks?: string[];
|
857 | }
|
858 | export declare type ComponentConstructorPropertyType = StringConstructor | BooleanConstructor | NumberConstructor | 'string' | 'boolean' | 'number';
|
859 | export interface ComponentConstructorEvent {
|
860 | name: string;
|
861 | method: string;
|
862 | bubbles: boolean;
|
863 | cancelable: boolean;
|
864 | composed: boolean;
|
865 | }
|
866 | export interface ComponentConstructorListener {
|
867 | name: string;
|
868 | method: string;
|
869 | capture?: boolean;
|
870 | passive?: boolean;
|
871 | }
|
872 | export interface HostConfig {
|
873 | hosting?: {
|
874 | rules?: HostRule[];
|
875 | };
|
876 | }
|
877 | export interface HostRule {
|
878 | include: string;
|
879 | headers: HostRuleHeader[];
|
880 | }
|
881 | export interface HostRuleHeader {
|
882 | name?: string;
|
883 | value?: string;
|
884 | }
|
885 | export interface CssVarShim {
|
886 | i(): Promise<any>;
|
887 | addLink(linkEl: HTMLLinkElement): Promise<any>;
|
888 | addGlobalStyle(styleEl: HTMLStyleElement): void;
|
889 | createHostStyle(hostEl: HTMLElement, templateName: string, cssText: string, isScoped: boolean): HTMLStyleElement;
|
890 | removeHost(hostEl: HTMLElement): void;
|
891 | updateHost(hostEl: HTMLElement): void;
|
892 | updateGlobal(): void;
|
893 | }
|
894 | export interface DevClientWindow extends Window {
|
895 | ['s-dev-server']: boolean;
|
896 | ['s-initial-load']: boolean;
|
897 | ['s-build-id']: number;
|
898 | WebSocket: new (socketUrl: string, protos: string[]) => WebSocket;
|
899 | devServerConfig?: DevClientConfig;
|
900 | }
|
901 | export interface DevClientConfig {
|
902 | basePath: string;
|
903 | editors: DevServerEditor[];
|
904 | reloadStrategy: PageReloadStrategy;
|
905 | socketUrl?: string;
|
906 | }
|
907 | export interface HttpRequest {
|
908 | method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS';
|
909 | acceptHeader: string;
|
910 | url: URL;
|
911 | searchParams: URLSearchParams;
|
912 | pathname?: string;
|
913 | filePath?: string;
|
914 | stats?: CompilerFsStats;
|
915 | headers?: {
|
916 | [name: string]: string;
|
917 | };
|
918 | host?: string;
|
919 | }
|
920 | export interface DevServerMessage {
|
921 | startServer?: DevServerConfig;
|
922 | closeServer?: boolean;
|
923 | serverStarted?: DevServerConfig;
|
924 | serverClosed?: boolean;
|
925 | buildStart?: boolean;
|
926 | buildLog?: BuildLog;
|
927 | buildResults?: CompilerBuildResults;
|
928 | requestBuildResults?: boolean;
|
929 | error?: {
|
930 | message?: string;
|
931 | type?: string;
|
932 | stack?: any;
|
933 | };
|
934 | isActivelyBuilding?: boolean;
|
935 | compilerRequestPath?: string;
|
936 | compilerRequestResults?: CompilerRequestResponse;
|
937 | requestLog?: {
|
938 | method: string;
|
939 | url: string;
|
940 | status: number;
|
941 | };
|
942 | }
|
943 | export declare type DevServerSendMessage = (msg: DevServerMessage) => void;
|
944 | export interface DevServerContext {
|
945 | connectorHtml: string;
|
946 | dirTemplate: string;
|
947 | getBuildResults: () => Promise<CompilerBuildResults>;
|
948 | getCompilerRequest: (path: string) => Promise<CompilerRequestResponse>;
|
949 | isServerListening: boolean;
|
950 | logRequest: (req: {
|
951 | method: string;
|
952 | pathname?: string;
|
953 | }, status: number) => void;
|
954 | prerenderConfig: PrerenderConfig;
|
955 | serve302: (req: any, res: any, pathname?: string) => void;
|
956 | serve404: (req: any, res: any, xSource: string, content?: string) => void;
|
957 | serve500: (req: any, res: any, error: any, xSource: string) => void;
|
958 | sys: CompilerSystem;
|
959 | }
|
960 | export declare type InitServerProcess = (sendMsg: (msg: DevServerMessage) => void) => (msg: DevServerMessage) => void;
|
961 | export interface DevResponseHeaders {
|
962 | 'cache-control'?: string;
|
963 | expires?: string;
|
964 | 'content-type'?: string;
|
965 | 'content-length'?: number;
|
966 | date?: string;
|
967 | 'access-control-allow-origin'?: string;
|
968 | 'access-control-expose-headers'?: string;
|
969 | 'content-encoding'?: 'gzip';
|
970 | vary?: 'Accept-Encoding';
|
971 | server?: string;
|
972 | 'x-directory-index'?: string;
|
973 | 'x-source'?: string;
|
974 | }
|
975 | export interface OpenInEditorData {
|
976 | file?: string;
|
977 | line?: number;
|
978 | column?: number;
|
979 | open?: string;
|
980 | editor?: string;
|
981 | exists?: boolean;
|
982 | error?: string;
|
983 | }
|
984 | export interface EntryModule {
|
985 | entryKey: string;
|
986 | cmps: ComponentCompilerMeta[];
|
987 | }
|
988 | export interface EntryBundle {
|
989 | fileName: string;
|
990 | text: string;
|
991 | outputs: string[];
|
992 | modeName: string;
|
993 | isScopedStyles: boolean;
|
994 | sourceTarget: string;
|
995 | }
|
996 | export interface EntryComponent {
|
997 | tag: string;
|
998 | dependencyOf?: string[];
|
999 | }
|
1000 | export interface ComponentRef {
|
1001 | tag: string;
|
1002 | filePath: string;
|
1003 | }
|
1004 | export interface ModuleGraph {
|
1005 | filePath: string;
|
1006 | importPaths: string[];
|
1007 | }
|
1008 | export interface AddEventListener {
|
1009 | (elm: Element | Document | Window, eventName: string, cb: EventListenerCallback, opts?: ListenOptions): Function;
|
1010 | }
|
1011 | export interface EventListenerCallback {
|
1012 | (ev?: any): void;
|
1013 | }
|
1014 | export interface EventEmitterData<T = any> {
|
1015 | detail?: T;
|
1016 | bubbles?: boolean;
|
1017 | cancelable?: boolean;
|
1018 | composed?: boolean;
|
1019 | }
|
1020 | export interface HostElement extends HTMLElement {
|
1021 | connectedCallback?: () => void;
|
1022 | attributeChangedCallback?: (attribName: string, oldVal: string, newVal: string, namespace: string) => void;
|
1023 | disconnectedCallback?: () => void;
|
1024 | host?: Element;
|
1025 | forceUpdate?: () => void;
|
1026 | |
1027 |
|
1028 |
|
1029 | ['s-id']?: string;
|
1030 | |
1031 |
|
1032 |
|
1033 |
|
1034 |
|
1035 |
|
1036 | ['s-cr']?: RenderNode;
|
1037 | |
1038 |
|
1039 |
|
1040 | ['s-lr']?: boolean;
|
1041 | |
1042 |
|
1043 |
|
1044 |
|
1045 | ['s-rc']?: (() => void)[];
|
1046 | /**
|
1047 | * Scope Id
|
1048 | * The scope id of this component when using scoped css encapsulation
|
1049 | * or using shadow dom but the browser doesn't support it
|
1050 | */
|
1051 | ['s-sc']?: string;
|
1052 | /**
|
1053 | * Hot Module Replacement, dev mode only
|
1054 | */
|
1055 | ['s-hmr']?: (versionId: string) => void;
|
1056 | |
1057 |
|
1058 |
|
1059 | ['s-hmr-load']?: () => void;
|
1060 | ['s-p']?: Promise<void>[];
|
1061 | componentOnReady?: () => Promise<this>;
|
1062 | }
|
1063 | export interface HydrateResults {
|
1064 | buildId: string;
|
1065 | diagnostics: Diagnostic[];
|
1066 | url: string;
|
1067 | host: string;
|
1068 | hostname: string;
|
1069 | href: string;
|
1070 | port: string;
|
1071 | pathname: string;
|
1072 | search: string;
|
1073 | hash: string;
|
1074 | html: string;
|
1075 | components: HydrateComponent[];
|
1076 | anchors: HydrateAnchorElement[];
|
1077 | imgs: HydrateImgElement[];
|
1078 | scripts: HydrateScriptElement[];
|
1079 | styles: HydrateStyleElement[];
|
1080 | staticData: HydrateStaticData[];
|
1081 | title: string;
|
1082 | hydratedCount: number;
|
1083 | httpStatus: number;
|
1084 | }
|
1085 | export interface HydrateComponent {
|
1086 | tag: string;
|
1087 | mode: string;
|
1088 | count: number;
|
1089 | depth: number;
|
1090 | }
|
1091 | export interface HydrateElement {
|
1092 | [attrName: string]: string | undefined;
|
1093 | }
|
1094 | export interface HydrateAnchorElement extends HydrateElement {
|
1095 | href?: string;
|
1096 | target?: string;
|
1097 | }
|
1098 | export interface HydrateImgElement extends HydrateElement {
|
1099 | src?: string;
|
1100 | }
|
1101 | export interface HydrateScriptElement extends HydrateElement {
|
1102 | src?: string;
|
1103 | type?: string;
|
1104 | }
|
1105 | export interface HydrateStyleElement extends HydrateElement {
|
1106 | href?: string;
|
1107 | }
|
1108 | export interface HydrateStaticData {
|
1109 | id: string;
|
1110 | type: string;
|
1111 | content: string;
|
1112 | }
|
1113 | export interface JsDoc {
|
1114 | name: string;
|
1115 | documentation: string;
|
1116 | type: string;
|
1117 | tags: JSDocTagInfo[];
|
1118 | default?: string;
|
1119 | parameters?: JsDoc[];
|
1120 | returns?: {
|
1121 | type: string;
|
1122 | documentation: string;
|
1123 | };
|
1124 | }
|
1125 | export interface JSDocTagInfo {
|
1126 | name: string;
|
1127 | text?: string;
|
1128 | }
|
1129 | export interface MinifyJsResult {
|
1130 | code: string;
|
1131 | sourceMap: any;
|
1132 | error: {
|
1133 | message: string;
|
1134 | filename: string;
|
1135 | line: number;
|
1136 | col: number;
|
1137 | pos: number;
|
1138 | };
|
1139 | }
|
1140 | export declare type ModuleMap = Map<string, Module>;
|
1141 |
|
1142 |
|
1143 |
|
1144 |
|
1145 |
|
1146 |
|
1147 |
|
1148 |
|
1149 | export interface Module {
|
1150 | cmps: ComponentCompilerMeta[];
|
1151 | coreRuntimeApis: string[];
|
1152 | collectionName: string;
|
1153 | dtsFilePath: string;
|
1154 | excludeFromCollection: boolean;
|
1155 | externalImports: string[];
|
1156 | htmlAttrNames: string[];
|
1157 | htmlTagNames: string[];
|
1158 | htmlParts: string[];
|
1159 | isCollectionDependency: boolean;
|
1160 | isLegacy: boolean;
|
1161 | jsFilePath: string;
|
1162 | localImports: string[];
|
1163 | originalImports: string[];
|
1164 | originalCollectionComponentPath: string;
|
1165 | potentialCmpRefs: string[];
|
1166 | sourceFilePath: string;
|
1167 | staticSourceFile: any;
|
1168 | staticSourceFileText: string;
|
1169 | sourceMapPath: string;
|
1170 | sourceMapFileText: string;
|
1171 | hasVdomAttribute: boolean;
|
1172 | hasVdomClass: boolean;
|
1173 | hasVdomFunctional: boolean;
|
1174 | hasVdomKey: boolean;
|
1175 | hasVdomListener: boolean;
|
1176 | hasVdomPropOrAttr: boolean;
|
1177 | hasVdomRef: boolean;
|
1178 | hasVdomRender: boolean;
|
1179 | hasVdomStyle: boolean;
|
1180 | hasVdomText: boolean;
|
1181 | hasVdomXlink: boolean;
|
1182 | }
|
1183 | export interface Plugin {
|
1184 | name?: string;
|
1185 | pluginType?: string;
|
1186 | load?: (id: string, context: PluginCtx) => Promise<string> | string;
|
1187 | resolveId?: (importee: string, importer: string, context: PluginCtx) => Promise<string> | string;
|
1188 | transform?: (sourceText: string, id: string, context: PluginCtx) => Promise<PluginTransformResults> | PluginTransformResults | string;
|
1189 | }
|
1190 | export interface PluginTransformResults {
|
1191 | code?: string;
|
1192 | map?: string;
|
1193 | id?: string;
|
1194 | diagnostics?: Diagnostic[];
|
1195 | dependencies?: string[];
|
1196 | }
|
1197 | export interface PluginCtx {
|
1198 | config: Config;
|
1199 | sys: CompilerSystem;
|
1200 | fs: InMemoryFileSystem;
|
1201 | cache: Cache;
|
1202 | diagnostics: Diagnostic[];
|
1203 | }
|
1204 | export interface PrerenderUrlResults {
|
1205 | anchorUrls: string[];
|
1206 | diagnostics: Diagnostic[];
|
1207 | filePath: string;
|
1208 | }
|
1209 | export interface PrerenderUrlRequest {
|
1210 | appDir: string;
|
1211 | buildId: string;
|
1212 | baseUrl: string;
|
1213 | componentGraphPath: string;
|
1214 | devServerHostUrl: string;
|
1215 | hydrateAppFilePath: string;
|
1216 | isDebug: boolean;
|
1217 | prerenderConfigPath: string;
|
1218 | staticSite: boolean;
|
1219 | templateId: string;
|
1220 | url: string;
|
1221 | writeToFilePath: string;
|
1222 | }
|
1223 | export interface PrerenderManager {
|
1224 | config: Config;
|
1225 | prerenderUrlWorker: (prerenderRequest: PrerenderUrlRequest) => Promise<PrerenderUrlResults>;
|
1226 | devServerHostUrl: string;
|
1227 | diagnostics: Diagnostic[];
|
1228 | hydrateAppFilePath: string;
|
1229 | isDebug: boolean;
|
1230 | logCount: number;
|
1231 | outputTarget: OutputTargetWww;
|
1232 | prerenderConfig: PrerenderConfig;
|
1233 | prerenderConfigPath: string;
|
1234 | progressLogger?: LoggerLineUpdater;
|
1235 | resolve: Function;
|
1236 | staticSite: boolean;
|
1237 | templateId: string;
|
1238 | componentGraphPath: string;
|
1239 | urlsProcessing: Set<string>;
|
1240 | urlsPending: Set<string>;
|
1241 | urlsCompleted: Set<string>;
|
1242 | maxConcurrency: number;
|
1243 | }
|
1244 |
|
1245 |
|
1246 |
|
1247 |
|
1248 | export interface RenderNode extends HostElement {
|
1249 | |
1250 |
|
1251 |
|
1252 | host?: Element;
|
1253 | |
1254 |
|
1255 |
|
1256 |
|
1257 | ['s-cn']?: boolean;
|
1258 | |
1259 |
|
1260 |
|
1261 |
|
1262 |
|
1263 | ['s-sr']?: boolean;
|
1264 | |
1265 |
|
1266 |
|
1267 | ['s-sn']?: string;
|
1268 | |
1269 |
|
1270 |
|
1271 |
|
1272 |
|
1273 | ['s-hn']?: string;
|
1274 | |
1275 |
|
1276 |
|
1277 |
|
1278 |
|
1279 |
|
1280 | ['s-ol']?: RenderNode;
|
1281 | |
1282 |
|
1283 |
|
1284 |
|
1285 |
|
1286 | ['s-nr']?: RenderNode;
|
1287 | |
1288 |
|
1289 |
|
1290 | ['s-si']?: string;
|
1291 | |
1292 |
|
1293 |
|
1294 | ['s-host-id']?: number;
|
1295 | |
1296 |
|
1297 |
|
1298 | ['s-node-id']?: number;
|
1299 | |
1300 |
|
1301 |
|
1302 |
|
1303 | ['s-en']?: '' | 'c';
|
1304 | }
|
1305 | export declare type LazyBundlesRuntimeData = LazyBundleRuntimeData[];
|
1306 | export declare type LazyBundleRuntimeData = [
|
1307 |
|
1308 | string,
|
1309 | ComponentRuntimeMetaCompact[]
|
1310 | ];
|
1311 | export declare type ComponentRuntimeMetaCompact = [
|
1312 |
|
1313 | number,
|
1314 |
|
1315 | string,
|
1316 |
|
1317 | {
|
1318 | [memberName: string]: ComponentRuntimeMember;
|
1319 | }?,
|
1320 |
|
1321 | ComponentRuntimeHostListener[]?
|
1322 | ];
|
1323 | export interface ComponentRuntimeMeta {
|
1324 | $flags$: number;
|
1325 | $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 | |
1337 |
|
1338 |
|
1339 | number,
|
1340 | |
1341 |
|
1342 |
|
1343 | string?
|
1344 | ];
|
1345 | export declare type ComponentRuntimeHostListener = [
|
1346 | |
1347 |
|
1348 |
|
1349 | number,
|
1350 | |
1351 |
|
1352 |
|
1353 | string,
|
1354 | |
1355 |
|
1356 |
|
1357 | string
|
1358 | ];
|
1359 | export declare type ModeBundleId = ModeBundleIds | string;
|
1360 | export interface ModeBundleIds {
|
1361 | [modeName: string]: string;
|
1362 | }
|
1363 | export declare type RuntimeRef = HostElement | {};
|
1364 |
|
1365 |
|
1366 |
|
1367 | export interface HostRef {
|
1368 | $ancestorComponent$?: HostElement;
|
1369 | $flags$: number;
|
1370 | $cmpMeta$: ComponentRuntimeMeta;
|
1371 | $hostElement$?: HostElement;
|
1372 | $instanceValues$?: Map<string, any>;
|
1373 | $lazyInstance$?: ComponentInterface;
|
1374 | $onReadyPromise$?: Promise<any>;
|
1375 | $onReadyResolve$?: (elm: any) => void;
|
1376 | $onInstancePromise$?: Promise<any>;
|
1377 | $onInstanceResolve$?: (elm: any) => void;
|
1378 | $onRenderResolve$?: () => void;
|
1379 | $vnode$?: VNode;
|
1380 | $queuedListeners$?: [string, any][];
|
1381 | $rmListeners$?: (() => void)[];
|
1382 | $modeName$?: string;
|
1383 | $renderCount$?: number;
|
1384 | }
|
1385 | export interface PlatformRuntime {
|
1386 | $cssShim$?: CssVarShim;
|
1387 | $flags$: number;
|
1388 | $orgLocNodes$?: Map<string, RenderNode>;
|
1389 | $resourcesUrl$: string;
|
1390 | jmp: (c: Function) => any;
|
1391 | raf: (c: FrameRequestCallback) => number;
|
1392 | ael: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
1393 | rel: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
1394 | ce: (eventName: string, opts?: any) => CustomEvent;
|
1395 | }
|
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>;
|
1401 | export interface ScreenshotConnector {
|
1402 | initBuild(opts: ScreenshotConnectorOptions): Promise<void>;
|
1403 | completeBuild(masterBuild: ScreenshotBuild): Promise<ScreenshotBuildResults>;
|
1404 | getMasterBuild(): Promise<ScreenshotBuild>;
|
1405 | pullMasterBuild(): Promise<void>;
|
1406 | publishBuild(buildResults: ScreenshotBuildResults): Promise<ScreenshotBuildResults>;
|
1407 | getScreenshotCache(): Promise<ScreenshotCache>;
|
1408 | updateScreenshotCache(screenshotCache: ScreenshotCache, buildResults: ScreenshotBuildResults): Promise<ScreenshotCache>;
|
1409 | generateJsonpDataUris(build: ScreenshotBuild): Promise<void>;
|
1410 | sortScreenshots(screenshots: Screenshot[]): Screenshot[];
|
1411 | toJson(masterBuild: ScreenshotBuild, screenshotCache: ScreenshotCache): string;
|
1412 | }
|
1413 | export interface ScreenshotBuildResults {
|
1414 | appNamespace: string;
|
1415 | masterBuild: ScreenshotBuild;
|
1416 | currentBuild: ScreenshotBuild;
|
1417 | compare: ScreenshotCompareResults;
|
1418 | }
|
1419 | export interface ScreenshotCompareResults {
|
1420 | id: string;
|
1421 | a: {
|
1422 | id: string;
|
1423 | message: string;
|
1424 | author: string;
|
1425 | url: string;
|
1426 | previewUrl: string;
|
1427 | };
|
1428 | b: {
|
1429 | id: string;
|
1430 | message: string;
|
1431 | author: string;
|
1432 | url: string;
|
1433 | previewUrl: string;
|
1434 | };
|
1435 | timestamp: number;
|
1436 | url: string;
|
1437 | appNamespace: string;
|
1438 | diffs: ScreenshotDiff[];
|
1439 | }
|
1440 | export interface ScreenshotConnectorOptions {
|
1441 | buildId: string;
|
1442 | buildMessage: string;
|
1443 | buildAuthor?: string;
|
1444 | buildUrl?: string;
|
1445 | previewUrl?: string;
|
1446 | appNamespace: string;
|
1447 | buildTimestamp: number;
|
1448 | logger: Logger;
|
1449 | rootDir: string;
|
1450 | cacheDir: string;
|
1451 | packageDir: string;
|
1452 | screenshotDirName?: string;
|
1453 | imagesDirName?: string;
|
1454 | buildsDirName?: string;
|
1455 | currentBuildDir?: string;
|
1456 | updateMaster?: boolean;
|
1457 | allowableMismatchedPixels?: number;
|
1458 | allowableMismatchedRatio?: number;
|
1459 | pixelmatchThreshold?: number;
|
1460 | waitBeforeScreenshot?: number;
|
1461 | pixelmatchModulePath?: string;
|
1462 | }
|
1463 | export interface ScreenshotBuildData {
|
1464 | buildId: string;
|
1465 | rootDir: string;
|
1466 | screenshotDir: string;
|
1467 | imagesDir: string;
|
1468 | buildsDir: string;
|
1469 | currentBuildDir: string;
|
1470 | updateMaster: boolean;
|
1471 | allowableMismatchedPixels: number;
|
1472 | allowableMismatchedRatio: number;
|
1473 | pixelmatchThreshold: number;
|
1474 | masterScreenshots: {
|
1475 | [screenshotId: string]: string;
|
1476 | };
|
1477 | cache: {
|
1478 | [cacheKey: string]: number;
|
1479 | };
|
1480 | timeoutBeforeScreenshot: number;
|
1481 | pixelmatchModulePath: string;
|
1482 | }
|
1483 | export interface PixelMatchInput {
|
1484 | imageAPath: string;
|
1485 | imageBPath: string;
|
1486 | width: number;
|
1487 | height: number;
|
1488 | pixelmatchThreshold: number;
|
1489 | }
|
1490 | export interface ScreenshotBuild {
|
1491 | id: string;
|
1492 | message: string;
|
1493 | author?: string;
|
1494 | url?: string;
|
1495 | previewUrl?: string;
|
1496 | appNamespace: string;
|
1497 | timestamp: number;
|
1498 | screenshots: Screenshot[];
|
1499 | }
|
1500 | export interface ScreenshotCache {
|
1501 | timestamp?: number;
|
1502 | lastBuildId?: string;
|
1503 | size?: number;
|
1504 | items?: {
|
1505 | |
1506 |
|
1507 |
|
1508 | key: string;
|
1509 | |
1510 |
|
1511 |
|
1512 | ts: number;
|
1513 | |
1514 |
|
1515 |
|
1516 | mp: number;
|
1517 | }[];
|
1518 | }
|
1519 | export interface Screenshot {
|
1520 | id: string;
|
1521 | desc?: string;
|
1522 | image: string;
|
1523 | device?: string;
|
1524 | userAgent?: string;
|
1525 | width?: number;
|
1526 | height?: number;
|
1527 | deviceScaleFactor?: number;
|
1528 | hasTouch?: boolean;
|
1529 | isLandscape?: boolean;
|
1530 | isMobile?: boolean;
|
1531 | testPath?: string;
|
1532 | diff?: ScreenshotDiff;
|
1533 | }
|
1534 | export interface ScreenshotDiff {
|
1535 | mismatchedPixels: number;
|
1536 | id?: string;
|
1537 | desc?: string;
|
1538 | imageA?: string;
|
1539 | imageB?: string;
|
1540 | device?: string;
|
1541 | userAgent?: string;
|
1542 | width?: number;
|
1543 | height?: number;
|
1544 | deviceScaleFactor?: number;
|
1545 | hasTouch?: boolean;
|
1546 | isLandscape?: boolean;
|
1547 | isMobile?: boolean;
|
1548 | allowableMismatchedPixels: number;
|
1549 | allowableMismatchedRatio: number;
|
1550 | testPath?: string;
|
1551 | cacheKey?: string;
|
1552 | }
|
1553 | export interface ScreenshotOptions {
|
1554 | |
1555 |
|
1556 |
|
1557 |
|
1558 | fullPage?: boolean;
|
1559 | |
1560 |
|
1561 |
|
1562 | clip?: ScreenshotBoundingBox;
|
1563 | |
1564 |
|
1565 |
|
1566 |
|
1567 | omitBackground?: boolean;
|
1568 | |
1569 |
|
1570 |
|
1571 |
|
1572 | pixelmatchThreshold?: number;
|
1573 | }
|
1574 | export interface ScreenshotBoundingBox {
|
1575 | |
1576 |
|
1577 |
|
1578 | x: number;
|
1579 | |
1580 |
|
1581 |
|
1582 | y: number;
|
1583 | |
1584 |
|
1585 |
|
1586 | width: number;
|
1587 | |
1588 |
|
1589 |
|
1590 | height: number;
|
1591 | }
|
1592 | export interface ServerConfigInput {
|
1593 | app: ExpressApp;
|
1594 | configPath?: string;
|
1595 | }
|
1596 | export interface ServerConfigOutput {
|
1597 | config: Config;
|
1598 | logger: Logger;
|
1599 | wwwDir: string;
|
1600 | destroy?: () => void;
|
1601 | }
|
1602 | export interface ExpressApp {
|
1603 | use?: Function;
|
1604 | }
|
1605 | export interface MiddlewareConfig {
|
1606 | config: string | Config;
|
1607 | destroy?: () => void;
|
1608 | }
|
1609 | export interface StyleCompiler {
|
1610 | modeName: string;
|
1611 | styleId: string;
|
1612 | styleStr: string;
|
1613 | styleIdentifier: string;
|
1614 | externalStyles: ExternalStyleCompiler[];
|
1615 | }
|
1616 | export interface ExternalStyleCompiler {
|
1617 | absolutePath: string;
|
1618 | relativePath: string;
|
1619 | originalComponentPath: string;
|
1620 | }
|
1621 | export interface CompilerModeStyles {
|
1622 | [modeName: string]: string[];
|
1623 | }
|
1624 | export interface CssImportData {
|
1625 | srcImport: string;
|
1626 | updatedImport?: string;
|
1627 | url: string;
|
1628 | filePath: string;
|
1629 | altFilePath?: string;
|
1630 | styleText?: string | null;
|
1631 | }
|
1632 | export interface CssToEsmImportData {
|
1633 | srcImportText: string;
|
1634 | varName: string;
|
1635 | url: string;
|
1636 | filePath: string;
|
1637 | }
|
1638 |
|
1639 |
|
1640 |
|
1641 | export interface TransformCssToEsmInput {
|
1642 | input: string;
|
1643 | module?: 'cjs' | 'esm' | string;
|
1644 | file?: string;
|
1645 | tag?: string;
|
1646 | encapsulation?: string;
|
1647 | mode?: string;
|
1648 | commentOriginalSelector?: boolean;
|
1649 | sourceMap?: boolean;
|
1650 | minify?: boolean;
|
1651 | docs?: boolean;
|
1652 | autoprefixer?: any;
|
1653 | styleImportData?: string;
|
1654 | }
|
1655 | export interface TransformCssToEsmOutput {
|
1656 | styleText: string;
|
1657 | output: string;
|
1658 | map: any;
|
1659 | diagnostics: Diagnostic[];
|
1660 | defaultVarName: string;
|
1661 | styleDocs: StyleDoc[];
|
1662 | imports: {
|
1663 | varName: string;
|
1664 | importPath: string;
|
1665 | }[];
|
1666 | }
|
1667 | export interface PackageJsonData {
|
1668 | name?: string;
|
1669 | version?: string;
|
1670 | main?: string;
|
1671 | description?: string;
|
1672 | bin?: {
|
1673 | [key: string]: string;
|
1674 | };
|
1675 | browser?: string;
|
1676 | module?: string;
|
1677 | 'jsnext:main'?: string;
|
1678 | 'collection:main'?: string;
|
1679 | unpkg?: string;
|
1680 | collection?: string;
|
1681 | types?: string;
|
1682 | files?: string[];
|
1683 | ['dist-tags']?: {
|
1684 | latest: string;
|
1685 | };
|
1686 | dependencies?: {
|
1687 | [moduleId: string]: string;
|
1688 | };
|
1689 | devDependencies?: {
|
1690 | [moduleId: string]: string;
|
1691 | };
|
1692 | repository?: {
|
1693 | type?: string;
|
1694 | url?: string;
|
1695 | };
|
1696 | private?: boolean;
|
1697 | scripts?: {
|
1698 | [runName: string]: string;
|
1699 | };
|
1700 | license?: string;
|
1701 | keywords?: string[];
|
1702 | }
|
1703 | export interface Workbox {
|
1704 | generateSW(swConfig: any): Promise<any>;
|
1705 | generateFileManifest(): Promise<any>;
|
1706 | getFileManifestEntries(): Promise<any>;
|
1707 | injectManifest(swConfig: any): Promise<any>;
|
1708 | copyWorkboxLibraries(wwwDir: string): Promise<any>;
|
1709 | }
|
1710 | export interface Url {
|
1711 | href?: string;
|
1712 | protocol?: string;
|
1713 | auth?: string;
|
1714 | hostname?: string;
|
1715 | host?: string;
|
1716 | port?: string;
|
1717 | pathname?: string;
|
1718 | path?: string;
|
1719 | search?: string;
|
1720 | query?: string | any;
|
1721 | hash?: string;
|
1722 | }
|
1723 | declare global {
|
1724 | namespace jest {
|
1725 | interface Matchers<R, T> {
|
1726 | |
1727 |
|
1728 |
|
1729 |
|
1730 |
|
1731 |
|
1732 |
|
1733 |
|
1734 | toEqualHtml(expectHtml: string): void;
|
1735 | |
1736 |
|
1737 |
|
1738 |
|
1739 |
|
1740 |
|
1741 |
|
1742 |
|
1743 | toEqualLightHtml(expectLightHtml: string): void;
|
1744 | |
1745 |
|
1746 |
|
1747 |
|
1748 |
|
1749 | toEqualText(expectTextContent: string): void;
|
1750 | |
1751 |
|
1752 |
|
1753 |
|
1754 | toHaveAttribute(expectAttrName: string): void;
|
1755 | |
1756 |
|
1757 |
|
1758 | toEqualAttribute(expectAttrName: string, expectAttrValue: any): void;
|
1759 | |
1760 |
|
1761 |
|
1762 |
|
1763 | toEqualAttributes(expectAttrs: {
|
1764 | [attrName: string]: any;
|
1765 | }): void;
|
1766 | |
1767 |
|
1768 |
|
1769 | toHaveClass(expectClassName: string): void;
|
1770 | |
1771 |
|
1772 |
|
1773 |
|
1774 | toHaveClasses(expectClassNames: string[]): void;
|
1775 | |
1776 |
|
1777 |
|
1778 |
|
1779 | toMatchClasses(expectClassNames: string[]): void;
|
1780 | |
1781 |
|
1782 |
|
1783 |
|
1784 | toHaveReceivedEvent(): void;
|
1785 | |
1786 |
|
1787 |
|
1788 |
|
1789 | toHaveReceivedEventTimes(count: number): void;
|
1790 | |
1791 |
|
1792 |
|
1793 |
|
1794 | toHaveReceivedEventDetail(eventDetail: any): void;
|
1795 | |
1796 |
|
1797 |
|
1798 |
|
1799 | toHaveFirstReceivedEventDetail(eventDetail: any): void;
|
1800 | |
1801 |
|
1802 |
|
1803 |
|
1804 | toHaveNthReceivedEventDetail(index: number, eventDetail: any): void;
|
1805 | |
1806 |
|
1807 |
|
1808 |
|
1809 |
|
1810 |
|
1811 | toMatchScreenshot(opts?: MatchScreenshotOptions): void;
|
1812 | }
|
1813 | }
|
1814 | }
|
1815 | export interface MatchScreenshotOptions {
|
1816 | |
1817 |
|
1818 |
|
1819 |
|
1820 |
|
1821 |
|
1822 |
|
1823 | allowableMismatchedPixels?: number;
|
1824 | |
1825 |
|
1826 |
|
1827 |
|
1828 |
|
1829 |
|
1830 |
|
1831 |
|
1832 |
|
1833 |
|
1834 |
|
1835 |
|
1836 |
|
1837 | allowableMismatchedRatio?: number;
|
1838 | }
|
1839 | export interface EventSpy {
|
1840 | events: SerializedEvent[];
|
1841 | eventName: string;
|
1842 | firstEvent: SerializedEvent;
|
1843 | lastEvent: SerializedEvent;
|
1844 | length: number;
|
1845 | next(): Promise<{
|
1846 | done: boolean;
|
1847 | value: SerializedEvent;
|
1848 | }>;
|
1849 | }
|
1850 | export interface SerializedEvent {
|
1851 | bubbles: boolean;
|
1852 | cancelBubble: boolean;
|
1853 | cancelable: boolean;
|
1854 | composed: boolean;
|
1855 | currentTarget: any;
|
1856 | defaultPrevented: boolean;
|
1857 | detail: any;
|
1858 | eventPhase: any;
|
1859 | isTrusted: boolean;
|
1860 | returnValue: any;
|
1861 | srcElement: any;
|
1862 | target: any;
|
1863 | timeStamp: number;
|
1864 | type: string;
|
1865 | isSerializedEvent: boolean;
|
1866 | }
|
1867 | export interface EventInitDict {
|
1868 | bubbles?: boolean;
|
1869 | cancelable?: boolean;
|
1870 | composed?: boolean;
|
1871 | detail?: any;
|
1872 | }
|
1873 | export interface JestEnvironmentGlobal {
|
1874 | __NEW_TEST_PAGE__: () => Promise<any>;
|
1875 | __CLOSE_OPEN_PAGES__: () => Promise<any>;
|
1876 | Context: any;
|
1877 | loadTestWindow: (testWindow: any) => Promise<void>;
|
1878 | h: any;
|
1879 | resourcesUrl: string;
|
1880 | currentSpec?: {
|
1881 | id: string;
|
1882 | description: string;
|
1883 | fullName: string;
|
1884 | testPath: string;
|
1885 | };
|
1886 | env: {
|
1887 | [prop: string]: string;
|
1888 | };
|
1889 | screenshotDescriptions: Set<string>;
|
1890 | }
|
1891 | export interface E2EProcessEnv {
|
1892 | STENCIL_COMMIT_ID?: string;
|
1893 | STENCIL_COMMIT_MESSAGE?: string;
|
1894 | STENCIL_REPO_URL?: string;
|
1895 | STENCIL_SCREENSHOT_CONNECTOR?: string;
|
1896 | STENCIL_SCREENSHOT_SERVER?: string;
|
1897 | __STENCIL_EMULATE_CONFIGS__?: string;
|
1898 | __STENCIL_ENV__?: string;
|
1899 | __STENCIL_EMULATE__?: string;
|
1900 | __STENCIL_BROWSER_URL__?: string;
|
1901 | __STENCIL_APP_SCRIPT_URL__?: string;
|
1902 | __STENCIL_APP_STYLE_URL__?: string;
|
1903 | __STENCIL_BROWSER_WS_ENDPOINT__?: string;
|
1904 | __STENCIL_BROWSER_WAIT_UNTIL?: string;
|
1905 | __STENCIL_SCREENSHOT__?: 'true';
|
1906 | __STENCIL_SCREENSHOT_BUILD__?: string;
|
1907 | __STENCIL_E2E_TESTS__?: 'true';
|
1908 | __STENCIL_E2E_DEVTOOLS__?: 'true';
|
1909 | __STENCIL_SPEC_TESTS__?: 'true';
|
1910 | __STENCIL_PUPPETEER_MODULE__?: string;
|
1911 | __STENCIL_DEFAULT_TIMEOUT__?: string;
|
1912 | }
|
1913 | export interface AnyHTMLElement extends HTMLElement {
|
1914 | [key: string]: any;
|
1915 | }
|
1916 | export interface SpecPage {
|
1917 | |
1918 |
|
1919 |
|
1920 | body: HTMLBodyElement;
|
1921 | |
1922 |
|
1923 |
|
1924 | doc: HTMLDocument;
|
1925 | |
1926 |
|
1927 |
|
1928 | root?: AnyHTMLElement;
|
1929 | |
1930 |
|
1931 |
|
1932 | rootInstance?: any;
|
1933 | |
1934 |
|
1935 |
|
1936 | setContent: (html: string) => Promise<any>;
|
1937 | |
1938 |
|
1939 |
|
1940 | waitForChanges: () => Promise<any>;
|
1941 | |
1942 |
|
1943 |
|
1944 | win: Window;
|
1945 | build: BuildConditionals;
|
1946 | flushLoadModule: (bundleId?: string) => Promise<any>;
|
1947 | flushQueue: () => Promise<any>;
|
1948 | styles: Map<string, string>;
|
1949 | }
|
1950 | export interface NewSpecPageOptions {
|
1951 | |
1952 |
|
1953 |
|
1954 | components: any[];
|
1955 | |
1956 |
|
1957 |
|
1958 | cookie?: string;
|
1959 | |
1960 |
|
1961 |
|
1962 | direction?: string;
|
1963 | flushQueue?: boolean;
|
1964 | |
1965 |
|
1966 |
|
1967 | html?: string;
|
1968 | |
1969 |
|
1970 |
|
1971 |
|
1972 |
|
1973 | template?: () => any;
|
1974 | |
1975 |
|
1976 |
|
1977 | language?: string;
|
1978 | |
1979 |
|
1980 |
|
1981 | hydrateClientSide?: boolean;
|
1982 | |
1983 |
|
1984 |
|
1985 | hydrateServerSide?: boolean;
|
1986 | |
1987 |
|
1988 |
|
1989 | referrer?: string;
|
1990 | |
1991 |
|
1992 |
|
1993 | supportsShadowDom?: boolean;
|
1994 | |
1995 |
|
1996 |
|
1997 | includeAnnotations?: boolean;
|
1998 | |
1999 |
|
2000 |
|
2001 | url?: string;
|
2002 | |
2003 |
|
2004 |
|
2005 | userAgent?: string;
|
2006 | |
2007 |
|
2008 |
|
2009 | autoApplyChanges?: boolean;
|
2010 | |
2011 |
|
2012 |
|
2013 |
|
2014 | attachStyles?: boolean;
|
2015 | strictBuild?: boolean;
|
2016 | }
|
2017 |
|
2018 |
|
2019 |
|
2020 |
|
2021 |
|
2022 |
|
2023 |
|
2024 | export interface TypesImportData {
|
2025 | [key: string]: TypesMemberNameData[];
|
2026 | }
|
2027 |
|
2028 |
|
2029 |
|
2030 |
|
2031 | export interface TypesMemberNameData {
|
2032 | |
2033 |
|
2034 |
|
2035 | localName: string;
|
2036 | |
2037 |
|
2038 |
|
2039 |
|
2040 | importName?: string;
|
2041 | }
|
2042 | export interface TypesModule {
|
2043 | isDep: boolean;
|
2044 | tagName: string;
|
2045 | tagNameAsPascal: string;
|
2046 | htmlElementName: string;
|
2047 | component: string;
|
2048 | jsx: string;
|
2049 | element: string;
|
2050 | }
|
2051 | export declare type TypeInfo = {
|
2052 | name: string;
|
2053 | type: string;
|
2054 | optional: boolean;
|
2055 | required: boolean;
|
2056 | internal: boolean;
|
2057 | jsdoc?: string;
|
2058 | }[];
|
2059 | export interface Hyperscript {
|
2060 | (sel: any): VNode;
|
2061 | (sel: Node, data: VNodeData): VNode;
|
2062 | (sel: any, data: VNodeData): VNode;
|
2063 | (sel: any, text: string): VNode;
|
2064 | (sel: any, children: Array<VNode | undefined | null>): VNode;
|
2065 | (sel: any, data: VNodeData, text: string): VNode;
|
2066 | (sel: any, data: VNodeData, children: Array<VNode | undefined | null>): VNode;
|
2067 | (sel: any, data: VNodeData, children: VNode): VNode;
|
2068 | }
|
2069 | export declare type ChildType = VNode | number | string;
|
2070 | export declare type PropsType = VNodeProdData | number | string | null;
|
2071 | export interface VNodeProdData {
|
2072 | key?: string | number;
|
2073 | class?: {
|
2074 | [className: string]: boolean;
|
2075 | } | string;
|
2076 | className?: {
|
2077 | [className: string]: boolean;
|
2078 | } | string;
|
2079 | style?: any;
|
2080 | [key: string]: any;
|
2081 | }
|
2082 | export interface CompilerWorkerContext {
|
2083 | optimizeCss(inputOpts: OptimizeCssInput): Promise<OptimizeCssOutput>;
|
2084 | prepareModule(input: string, minifyOpts: any, transpile: boolean, inlineHelpers: boolean): Promise<{
|
2085 | output: string;
|
2086 | diagnostics: Diagnostic[];
|
2087 | sourceMap?: SourceMap;
|
2088 | }>;
|
2089 | prerenderWorker(prerenderRequest: PrerenderUrlRequest): Promise<PrerenderUrlResults>;
|
2090 | transformCssToEsm(input: TransformCssToEsmInput): Promise<TransformCssToEsmOutput>;
|
2091 | }
|
2092 | export interface MsgToWorker {
|
2093 | stencilId: number;
|
2094 | args: any[];
|
2095 | }
|
2096 | export interface MsgFromWorker {
|
2097 | stencilId?: number;
|
2098 | stencilRtnValue: any;
|
2099 | stencilRtnError: string;
|
2100 | }
|
2101 | export interface CompilerWorkerTask {
|
2102 | stencilId?: number;
|
2103 | inputArgs?: any[];
|
2104 | resolve: (val: any) => any;
|
2105 | reject: (msg: string) => any;
|
2106 | retries?: number;
|
2107 | }
|
2108 | export declare type WorkerMsgHandler = (msgToWorker: MsgToWorker) => Promise<any>;
|
2109 | export interface WorkerTask {
|
2110 | taskId: number;
|
2111 | method: string;
|
2112 | args: any[];
|
2113 | resolve: (val: any) => any;
|
2114 | reject: (msg: string) => any;
|
2115 | retries: number;
|
2116 | isLongRunningTask: boolean;
|
2117 | workerKey: string;
|
2118 | }
|
2119 | export interface WorkerMessage {
|
2120 | taskId?: number;
|
2121 | method?: string;
|
2122 | args?: any[];
|
2123 | value?: any;
|
2124 | error?: string;
|
2125 | exit?: boolean;
|
2126 | }
|
2127 | export declare type WorkerRunner = (methodName: string, args: any[]) => Promise<any>;
|
2128 | export interface WorkerRunnerOptions {
|
2129 | isLongRunningTask?: boolean;
|
2130 | workerKey?: string;
|
2131 | }
|
2132 | export interface WorkerContext {
|
2133 | tsHost?: any;
|
2134 | tsProgram?: any;
|
2135 | }
|
2136 | export interface TranspileModuleResults {
|
2137 | sourceFilePath: string;
|
2138 | code: string;
|
2139 | map: any;
|
2140 | diagnostics: Diagnostic[];
|
2141 | moduleFile: Module;
|
2142 | }
|
2143 | export interface ValidateTypesResults {
|
2144 | diagnostics: Diagnostic[];
|
2145 | dirPaths: string[];
|
2146 | filePaths: string[];
|
2147 | }
|
2148 | export interface TerminalInfo {
|
2149 | |
2150 |
|
2151 |
|
2152 | readonly ci: boolean;
|
2153 | |
2154 |
|
2155 |
|
2156 | readonly tty: boolean;
|
2157 | }
|
2158 |
|
2159 |
|
2160 |
|
2161 | export declare type TelemetryCallback = (...args: any[]) => void | Promise<void>;
|
2162 |
|
2163 |
|
2164 |
|
2165 | export interface TrackableData {
|
2166 | yarn: boolean;
|
2167 | component_count?: number;
|
2168 | arguments: string[];
|
2169 | targets: string[];
|
2170 | task: TaskCommand;
|
2171 | duration_ms: number;
|
2172 | packages: string[];
|
2173 | packages_no_versions?: string[];
|
2174 | os_name: string;
|
2175 | os_version: string;
|
2176 | cpu_model: string;
|
2177 | typescript: string;
|
2178 | rollup: string;
|
2179 | system: string;
|
2180 | system_major?: string;
|
2181 | build: string;
|
2182 | stencil: string;
|
2183 | has_app_pwa_config: boolean;
|
2184 | config: Config;
|
2185 | }
|
2186 |
|
2187 |
|
2188 |
|
2189 | export interface Metric {
|
2190 | name: string;
|
2191 | timestamp: string;
|
2192 | source: 'stencil_cli';
|
2193 | value: TrackableData;
|
2194 | session_id: string;
|
2195 | }
|
2196 | export interface TelemetryConfig {
|
2197 | 'telemetry.stencil'?: boolean;
|
2198 | 'tokens.telemetry'?: string;
|
2199 | }
|