@stencil/core 5.0.0-beta.14 → 5.0.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{client-CAQvc3hT.mjs → client-BUal4Vkx.mjs} +50 -39
- package/dist/compiler/browser.d.ts +13 -24
- package/dist/compiler/browser.js +118 -153
- package/dist/compiler/index.d.mts +25 -2
- package/dist/compiler/index.mjs +3 -3
- package/dist/compiler/utils/index.d.mts +1 -1
- package/dist/{compiler-Bit_AiP4.mjs → compiler-DhVflHyt.mjs} +186 -110
- package/dist/declarations/stencil-public-compiler.d.ts +26 -35
- package/dist/{index-BilaSOF5.d.mts → index-BxnFTzyD.d.mts} +26 -35
- package/dist/{index-BBJVAnzJ.d.mts → index-Cwox4mIi.d.mts} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/{node-Bw9pHJOq.mjs → node-v9OHhp0m.mjs} +1 -5
- package/dist/runtime/client/lazy.js +71 -73
- package/dist/runtime/client/runtime.d.ts +4 -4
- package/dist/runtime/client/runtime.js +71 -73
- package/dist/runtime/index.js +71 -73
- package/dist/runtime/server/index.d.mts +4 -4
- package/dist/runtime/server/index.mjs +81 -81
- package/dist/runtime/server/runner.d.mts +4 -4
- package/dist/sys/node/index.d.mts +1 -1
- package/dist/sys/node/index.mjs +1 -1
- package/dist/sys/node/worker.mjs +2 -2
- package/dist/testing/index.d.mts +21 -30
- package/dist/testing/index.mjs +11 -18
- package/package.json +4 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as CompilerSystemRemoveDirectoryResults, $t as OutputTargetDocsJson, A as CompilerDependency, An as StencilConfig, At as LoadConfigResults, B as CompilerEventFsChange, Bn as ValidatedOutputTargetWww, Bt as OptimizeJsOutput, C as BuildResultsComponentGraph, Cn as RolldownConfig, Ct as HydrateDocumentOptions, D as Compiler, Dn as SitemapXmpResults, Dt as LazyRequire, E as CompileTarget, En as SitemapXmpOpts, Et as LOG_LEVELS, F as CompilerEventDirAdd, Fn as TranspileOnlyResults, Ft as ModeConfig, G as CompilerFsStats, Gt as OutputTargetBuild, H as CompilerFileWatcher, Hn as WorkerMainController, Ht as OutputTargetAssets, I as CompilerEventDirDelete, In as TranspileOptions, It as NodeResolveConfig, J as CompilerSystem, Jt as OutputTargetCustom, K as CompilerRequest, Kt as OutputTargetCollection, L as CompilerEventFileAdd, Ln as TranspileResults, Lt as OptimizeCssInput, M as CompilerEventBuildLog, Mn as StencilDocsConfig, Mt as Logger, N as CompilerEventBuildNoChange, Nn as SystemDetails, Nt as LoggerLineUpdater, O as CompilerBuildResults, On as SsrDocumentOptions, Ot as LightDomPatches, P as CompilerEventBuildStart, Pn as TransformOptions, Pt as LoggerTimeSpan, Q as CompilerSystemRemoveDirectoryOptions, Qn as UserBuildConditionals, Qt as OutputTargetDocsCustomElementsManifest, R as CompilerEventFileDelete, Rn as UnvalidatedConfig, Rt as OptimizeCssOutput, S as BuildOverrides, Sn as RobotsTxtResults, St as HotModuleReplacement, T as CompileScriptMinifyOptions, Tn as ServiceWorkerConfig, Tt as HydratedFlag, U as CompilerFileWatcherCallback, Un as WorkerOptions, Ut as OutputTargetBase, V as CompilerEventName, Vn as WatcherCloseResults, Vt as OutputTarget, W as CompilerFileWatcherEvent, Wt as OutputTargetBaseNext, X as CompilerSystemCreateDirectoryResults, Xt as OutputTargetDocsAgentSkill, Y as CompilerSystemCreateDirectoryOptions, Yt as OutputTargetDistLazy, Z as CompilerSystemRealpathResults, Zt as OutputTargetDocsCustom, _ as BuildLog, _n as PrerenderStartOptions, _r as StyleDoc, _t as DocsReadmeCustomColumn, a as ComponentGlobalStyle, an as OutputTargetSsrWasm, ar as JsonDocsEvent, at as Config, b as BuildOnEvents, bn as ResolveModuleOptions, bt as HmrGlobalStyleUpdate, c as PackageJsonData, cn as OutputTargetTypes, cr as JsonDocsMethodReturn, ct as CopyResults, dn as ParsedPath, dr as JsonDocsSlot, dt as CustomElementsExportBehavior, en as OutputTargetDocsReadme, er as JsonDocMethodParameter, et as CompilerSystemRemoveFileResults, f as SsrResults, fn as PlatformPath, fr as JsonDocsStyle, ft as CustomElementsExportBehaviorOptions, g as BuildEvents, gn as PrerenderResults, gr as JsonDocsValue, gt as Diagnostic, h as BuildEmitEvents, hn as PrerenderOptions, hr as JsonDocsUsage, ht as DevServerEditor, i as ComponentCompilerTypeReferences, in as OutputTargetSsr, ir as JsonDocsDependencyGraph, it as CompilerWatcher, j as CompilerEventBuildFinish, jn as StencilDevServerConfig, jt as LogLevel, k as CompilerBuildStart, kn as SsrFactoryOptions, kt as LoadConfigInit, l as PrintLine, ln as OutputTargetWww, lr as JsonDocsPart, lt as CopyTask, m as AutoprefixerOptions, mn as PrerenderHydrateOptions, mr as JsonDocsTypeLibrary, mt as DevServerConfig, n as CompilerWorkerContext, nn as OutputTargetGlobalStyle, nr as JsonDocsComponent, nt as CompilerSystemRenamedPath, on as OutputTargetStandalone, or as JsonDocsListener, ot as ConfigBundle, p as WorkerMsgHandler, pn as PrerenderConfig, pr as JsonDocsTag, pt as DevServer, q as CompilerRequestResponse, qt as OutputTargetCopy, r as ComponentCompilerMeta, rn as OutputTargetLoaderBundle, rr as JsonDocsCustomState, rt as CompilerSystemWriteFileResults, s as LazyBundlesRuntimeData, sn as OutputTargetStats, sr as JsonDocsMethod, st as ConfigCompat, tn as OutputTargetDocsVscode, tr as JsonDocs, tt as CompilerSystemRenameResults, un as PageReloadStrategy, ur as JsonDocsProp, ut as Credentials, v as BuildNoChangeResults, vn as ResolveModuleIdOptions, vr as FsWriteResults, vt as FsWatchResults, w as CliInitOptions, wn as SerializeDocumentOptions, wt as HydrateFactoryOptions, x as BuildOutput, xn as RobotsTxtOpts, xt as HmrStyleUpdate, y as BuildOnEventRemove, yn as ResolveModuleIdResults, yt as HistoryApiFallback, z as CompilerEventFileUpdate, zn as ValidatedConfig, zt as OptimizeJsInput } from "../index-BxnFTzyD.mjs";
|
|
2
2
|
import ts from "typescript";
|
|
3
|
+
import { Plugin } from "rolldown";
|
|
3
4
|
//#region src/version.d.ts
|
|
4
5
|
declare const version: string;
|
|
5
6
|
declare const buildId: string;
|
|
@@ -336,6 +337,28 @@ declare const hasStencilCssComponentsImport: (css: string) => boolean;
|
|
|
336
337
|
*/
|
|
337
338
|
declare const replaceStencilCssComponentsImport: (css: string, collectedCss: string) => string;
|
|
338
339
|
//#endregion
|
|
340
|
+
//#region src/compiler/bundle/build-flags-plugin.d.ts
|
|
341
|
+
/**
|
|
342
|
+
* Replaces `Build.<flag>` reads (where `Build` is imported from `@stencil/core`) with literals,
|
|
343
|
+
* letting bundlers / minify-ers drop dead branches. Neither oxc nor terser can fold a property
|
|
344
|
+
* read on the runtime's `Build` object.
|
|
345
|
+
*
|
|
346
|
+
* e.g. with `{ isServer: false }`:
|
|
347
|
+
* ```ts
|
|
348
|
+
* if (Build.isServer) { … } // before
|
|
349
|
+
* if (false ) { … } // after
|
|
350
|
+
* ```
|
|
351
|
+
*
|
|
352
|
+
* Replacements are padded to the original length (newlines kept), so an existing sourcemap
|
|
353
|
+
* for `code` stays valid. A `Build` binding that is shadowed or written to in the module is left alone.
|
|
354
|
+
*
|
|
355
|
+
* @param code JS or TS source
|
|
356
|
+
* @param fileName used to pick the parser's script kind
|
|
357
|
+
* @param flags the flag values to fold; flags not present are left as runtime reads
|
|
358
|
+
* @returns the folded code, or `null` if nothing was folded
|
|
359
|
+
*/
|
|
360
|
+
declare const foldBuildFlags: (code: string, fileName: string, flags: Partial<UserBuildConditionals>) => string | null;
|
|
361
|
+
//#endregion
|
|
339
362
|
//#region src/compiler/transpile.d.ts
|
|
340
363
|
/**
|
|
341
364
|
* The `transpile()` function inputs source code as a string, with various options
|
|
@@ -438,4 +461,4 @@ declare const validateConfig: (userConfig: UnvalidatedConfig, bootstrapConfig: L
|
|
|
438
461
|
*/
|
|
439
462
|
declare const validateHydrated: (config: UnvalidatedConfig) => HydratedFlag | null;
|
|
440
463
|
//#endregion
|
|
441
|
-
export { AutoprefixerOptions, BuildEmitEvents, BuildEvents, BuildLog, BuildNoChangeResults, BuildOnEventRemove, BuildOnEvents, BuildOutput, BuildOverrides, BuildResultsComponentGraph,
|
|
464
|
+
export { AutoprefixerOptions, BuildEmitEvents, BuildEvents, BuildLog, BuildNoChangeResults, BuildOnEventRemove, BuildOnEvents, BuildOutput, BuildOverrides, BuildResultsComponentGraph, CliInitOptions, CompileScriptMinifyOptions, CompileTarget, Compiler, CompilerBuildResults, CompilerBuildStart, CompilerDependency, CompilerEventBuildFinish, CompilerEventBuildLog, CompilerEventBuildNoChange, CompilerEventBuildStart, CompilerEventDirAdd, CompilerEventDirDelete, CompilerEventFileAdd, CompilerEventFileDelete, CompilerEventFileUpdate, CompilerEventFsChange, CompilerEventName, CompilerFileWatcher, CompilerFileWatcherCallback, CompilerFileWatcherEvent, CompilerFsStats, CompilerRequest, CompilerRequestResponse, CompilerSystem, CompilerSystemCreateDirectoryOptions, CompilerSystemCreateDirectoryResults, CompilerSystemRealpathResults, CompilerSystemRemoveDirectoryOptions, CompilerSystemRemoveDirectoryResults, CompilerSystemRemoveFileResults, CompilerSystemRenameResults, CompilerSystemRenamedPath, CompilerSystemWriteFileResults, CompilerWatcher, type ComponentCompilerMeta, type ComponentCompilerTypeReferences, type ComponentGlobalStyle, type ComponentTypesConfig, Config, ConfigBundle, ConfigCompat, CopyResults, CopyTask, Credentials, CustomElementsExportBehavior, CustomElementsExportBehaviorOptions, type CustomElementsManifest, DevServer, DevServerConfig, DevServerEditor, Diagnostic, DocsReadmeCustomColumn, FsWatchResults, type FsWriteResults, HistoryApiFallback, HmrGlobalStyleUpdate, HmrStyleUpdate, HotModuleReplacement, HydrateDocumentOptions, HydrateFactoryOptions, HydratedFlag, JsonDocMethodParameter, JsonDocs, JsonDocsComponent, JsonDocsCustomState, JsonDocsDependencyGraph, JsonDocsEvent, JsonDocsListener, JsonDocsMethod, JsonDocsMethodReturn, JsonDocsPart, JsonDocsProp, JsonDocsSlot, JsonDocsStyle, JsonDocsTag, JsonDocsTypeLibrary, JsonDocsUsage, JsonDocsValue, LOG_LEVELS, type LazyBundlesRuntimeData, LazyRequire, LightDomPatches, LoadConfigInit, LoadConfigResults, LogLevel, Logger, LoggerLineUpdater, LoggerTimeSpan, ModeConfig, NodeResolveConfig, OptimizeCssInput, OptimizeCssOutput, OptimizeJsInput, OptimizeJsOutput, OutputTarget, OutputTargetAssets, OutputTargetBase, OutputTargetBaseNext, OutputTargetBuild, OutputTargetCollection, OutputTargetCopy, OutputTargetCustom, OutputTargetDistLazy, OutputTargetDocsAgentSkill, OutputTargetDocsCustom, OutputTargetDocsCustomElementsManifest, OutputTargetDocsJson, OutputTargetDocsReadme, OutputTargetDocsVscode, OutputTargetGlobalStyle, OutputTargetLoaderBundle, OutputTargetSsr, OutputTargetSsrWasm, OutputTargetStandalone, OutputTargetStats, OutputTargetTypes, OutputTargetWww, type PackageJsonData, PageReloadStrategy, ParsedPath, PlatformPath, PrerenderConfig, PrerenderHydrateOptions, PrerenderOptions, PrerenderResults, PrerenderStartOptions, type PrintLine, ResolveModuleIdOptions, ResolveModuleIdResults, ResolveModuleOptions, RobotsTxtOpts, RobotsTxtResults, RolldownConfig, SerializeDocumentOptions, ServiceWorkerConfig, SitemapXmpOpts, SitemapXmpResults, SsrDocumentOptions, SsrFactoryOptions, type SsrResults, StencilConfig, StencilDevServerConfig, StencilDocsConfig, StyleDoc, SystemDetails, TransformOptions, TranspileOnlyResults, TranspileOptions, TranspileResults, UnvalidatedConfig, ValidatedConfig, ValidatedOutputTargetWww, WatcherCloseResults, WorkerMainController, WorkerOptions, buildHydrateCss, buildId, cmpMetaToDocsComponent, createCompiler, createPrerenderer, createSystem, createWorkerContext, createWorkerMessageHandler, foldBuildFlags, generateComponentTypesFile, generateManifest, getScopeId, hasStencilCssComponentsImport, hasStencilGlobalsImport, hasStencilHydrateImport, loadConfig, nodeRequire, optimizeCss, optimizeJs, parseCssOnlyComponents, replaceStencilCssComponentsImport, replaceStencilGlobalsImport, replaceStencilHydrateImport, scopeCss, transpile, transpileSync, ts, validateConfig, validateHydrated, vermoji, version, versions };
|
package/dist/compiler/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-
|
|
3
|
-
export { CustomElementsExportBehaviorOptions, LOG_LEVELS, buildHydrateCss, buildId, cmpMetaToDocsComponent, createCompiler, createPrerenderer, createSystem, createWorkerContext, createWorkerMessageHandler, generateComponentTypesFile, generateManifest, getScopeId, hasStencilCssComponentsImport, hasStencilGlobalsImport, hasStencilHydrateImport, loadConfig, nodeRequire, optimizeCss, optimizeJs, parseCssOnlyComponents, replaceStencilCssComponentsImport, replaceStencilGlobalsImport, replaceStencilHydrateImport, scopeCss, transpile, transpileSync, ts, validateConfig, validateHydrated, vermoji, version, versions };
|
|
1
|
+
import { A as version, C as hasStencilHydrateImport, D as parseCssOnlyComponents, E as replaceStencilHydrateImport, M as scopeCss, O as buildId, S as hasStencilGlobalsImport, T as replaceStencilGlobalsImport, _ as cmpMetaToDocsComponent, a as createPrerenderer, b as buildHydrateCss, c as createWorkerContext, d as nodeRequire, f as optimizeCss, g as generateManifest, h as generateComponentTypesFile, i as createSystem, j as versions, k as vermoji, l as createWorkerMessageHandler, m as validateHydrated, n as transpile, o as loadConfig, p as validateConfig, r as transpileSync, s as createCompiler, t as ts, u as optimizeJs, v as getScopeId, w as replaceStencilCssComponentsImport, x as hasStencilCssComponentsImport, y as foldBuildFlags } from "../compiler-DhVflHyt.mjs";
|
|
2
|
+
import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-v9OHhp0m.mjs";
|
|
3
|
+
export { CustomElementsExportBehaviorOptions, LOG_LEVELS, buildHydrateCss, buildId, cmpMetaToDocsComponent, createCompiler, createPrerenderer, createSystem, createWorkerContext, createWorkerMessageHandler, foldBuildFlags, generateComponentTypesFile, generateManifest, getScopeId, hasStencilCssComponentsImport, hasStencilGlobalsImport, hasStencilHydrateImport, loadConfig, nodeRequire, optimizeCss, optimizeJs, parseCssOnlyComponents, replaceStencilCssComponentsImport, replaceStencilGlobalsImport, replaceStencilHydrateImport, scopeCss, transpile, transpileSync, ts, validateConfig, validateHydrated, vermoji, version, versions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $i as
|
|
1
|
+
import { $i as GLOBAL_STYLE, $r as isOutputTargetDocsAgentSkill, Ai as createOnWarnFn, Ar as isJsxFile, Bi as COLLECTION_MANIFEST_FILE_NAME, Br as result_d_exports, Ci as shouldIgnoreError, Cr as addDocBlock, Di as augmentDiagnosticWithNode, Dr as hasDependency, Ei as splitLineBreaks, Er as getTextDocs, Fi as stringifyRuntimeData, Fr as readPackageJson, Gi as DOCS_AGENT_SKILL, Gr as getComponentsDtsTypesFilePath, Hi as CUSTOM, Hr as filterActiveTargets, Ii as ASSETS, Ir as getInlineSourceMappingUrlLinker, Ji as DOCS_JSON, Jr as isOutputTargetCollection, Ki as DOCS_CUSTOM, Kr as getComponentsFromModules, Li as CMP_FLAGS, Lr as getSourceMappingUrlForEndOfFile, Mi as loadRolldownDiagnostics, Mr as isTsxFile, Ni as formatComponentRuntimeMeta, Nr as parsePackageJson, Oi as loadTypeScriptDiagnostic, Or as isDtsFile, Pi as formatLazyBundleRuntimeMeta, Pr as readOnlyArrayHasStringMember, Qi as GENERATED_DTS, Qr as isOutputTargetDocs, Ri as COLLECTION, Rr as getSourceMappingUrlLinker, Si as hasWarning, Sr as ParsePackageJsonResult, Ti as normalizeDiagnostics, Tr as generatePreamble, Ui as DEFAULT_STYLE_MODE, Ur as filterExcludedComponents, Vi as COPY, Vr as FilterComponentsResult, Wi as DIST_LAZY, Wr as getComponentsDtsSrcFilePath, Xi as DOCS_VSCODE, Xr as isOutputTargetCustom, Yi as DOCS_README, Yr as isOutputTargetCopy, Zi as EVENT_FLAGS, Zr as isOutputTargetDistLazy, _i as buildError, aa as NODE_TYPES, ai as isOutputTargetGlobalStyle, bi as catchError, br as validateComponentModes, ca as STANDALONE, ci as isOutputTargetSsrWasm, da as SVG_NS, di as isOutputTargetTypes, ea as HOST_FLAGS, ei as isOutputTargetDocsCustom, fa as TYPES, fi as isOutputTargetWww, ga as XLINK_NS, gi as TASK_CANCELED_MSG, ha as WWW, hi as shouldExcludeComponent, ia as MEMBER_FLAGS, ii as isOutputTargetDocsVscode, ji as isRolldownError, jr as isTsFile, ki as loadTypeScriptDiagnostics, kr as isJsFile, la as STATS, li as isOutputTargetStandalone, ma as WATCH_FLAGS, mi as relativeImport, na as LISTENER_FLAGS, ni as isOutputTargetDocsJson, oa as SSR, oi as isOutputTargetLoaderBundle, pa as VALID_CONFIG_OUTPUT_TARGETS, pi as isValidConfigOutputTarget, qi as DOCS_CUSTOM_ELEMENTS_MANIFEST, qr as isOutputTargetAssets, ra as LOADER_BUNDLE, ri as isOutputTargetDocsReadme, sa as SSR_WASM, si as isOutputTargetSsr, ta as HTML_NS, ti as isOutputTargetDocsCustomElementsManifest, ua as STYLE_EXT, ui as isOutputTargetStats, vi as buildJsonFileError, wi as escapeHtml, wr as createJsVarName, xi as hasError, xr as validateComponentTag, yi as buildWarn, yr as ModeValidationError, zi as COLLECTION_APP_DATA_FILE_NAME, zr as rolldownToStencilSourceMap } from "../../index-BxnFTzyD.mjs";
|
|
2
2
|
//#region src/utils/byte-size.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Used to learn the size of a string in bytes.
|