@stencil/core 5.0.0-beta.22 → 5.0.0-beta.23
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/compiler/browser.js +3 -2
- package/dist/compiler/index.d.mts +1 -1
- package/dist/compiler/index.mjs +1 -1
- package/dist/compiler/utils/index.d.mts +1 -1
- package/dist/{compiler-CShHxskG.mjs → compiler-B7K47DPN.mjs} +80 -41
- package/dist/declarations/stencil-public-compiler.d.ts +4 -2
- package/dist/{index-ZTa5XM0M.d.mts → index-C41EOWaQ.d.mts} +4 -2
- package/dist/{index-Clnf0Xcw.d.mts → index-CxpWC93f.d.mts} +1 -1
- package/dist/sys/node/index.d.mts +1 -1
- package/dist/sys/node/worker.mjs +1 -1
- package/dist/testing/index.d.mts +4 -2
- package/dist/testing/index.mjs +1 -1
- package/package.json +4 -4
package/dist/compiler/browser.js
CHANGED
|
@@ -1844,7 +1844,7 @@ const validateComponentTag = (tag) => {
|
|
|
1844
1844
|
};
|
|
1845
1845
|
//#endregion
|
|
1846
1846
|
//#region src/version.ts
|
|
1847
|
-
const version = "5.0.0-beta.
|
|
1847
|
+
const version = "5.0.0-beta.23";
|
|
1848
1848
|
//#endregion
|
|
1849
1849
|
//#region src/compiler/events.ts
|
|
1850
1850
|
const buildEvents = () => {
|
|
@@ -2869,8 +2869,9 @@ const validateAgentSkillOutputTarget = (config, outputTarget) => {
|
|
|
2869
2869
|
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev = true;
|
|
2870
2870
|
return outputTarget;
|
|
2871
2871
|
};
|
|
2872
|
+
const DEFAULT_CUSTOM_ELEMENTS_MANIFEST_FILE = "dist/custom-elements.json";
|
|
2872
2873
|
const validateCustomElementsManifestOutputTarget = (config, outputTarget) => {
|
|
2873
|
-
if (!isString$1(outputTarget.file)) outputTarget.file =
|
|
2874
|
+
if (!isString$1(outputTarget.file)) outputTarget.file = DEFAULT_CUSTOM_ELEMENTS_MANIFEST_FILE;
|
|
2874
2875
|
if (!isAbsolute(outputTarget.file)) outputTarget.file = join$1(config.rootDir, outputTarget.file);
|
|
2875
2876
|
outputTarget.strict = !!outputTarget.strict;
|
|
2876
2877
|
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev = true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as CompilerFsStats, $n as WorkerMainController, $t as OutputTargetBuild, A as BuildOverrides, An as ResolveModuleIdResults, At as HotModuleReplacement, B as CompilerEventBuildLog, Bn as SsrFactoryOptions, Bt as Logger, C as BuildEmitEvents, Cn as PluginTransformResults, Cr as JsonDocsStyle, Ct as DevServerEditor, D as BuildOnEventRemove, Dn as PrerenderResults, Dr as JsonDocsValue, Dt as HistoryApiFallback, E as BuildNoChangeResults, En as PrerenderOptions, Er as JsonDocsUsage, Et as FsWatchResults, F as Compiler, Fn as SerializeDocumentOptions, Ft as LazyRequire, G as CompilerEventFileAdd, Gn as TransformOptions, Gt as OptimizeCssInput, H as CompilerEventBuildStart, Hn as StencilDevServerConfig, Ht as LoggerTimeSpan, I as CompilerBuildResults, In as ServiceWorkerConfig, It as LightDomPatches, J as CompilerEventFsChange, Jn as TranspileResults, Jt as OptimizeJsOutput, K as CompilerEventFileDelete, Kn as TranspileOnlyResults, Kt as OptimizeCssOutput, L as CompilerBuildStart, Ln as SitemapXmpOpts, Lt as LoadConfigInit, M as CliInitOptions, Mn as RobotsTxtOpts, Mt as HydrateFactoryOptions, N as CompileScriptMinifyOptions, Nn as RobotsTxtResults, Nt as HydratedFlag, O as BuildOnEvents, On as PrerenderStartOptions, Or as StyleDoc, Ot as HmrGlobalStyleUpdate, P as CompileTarget, Pn as RolldownConfig, Pt as LOG_LEVELS, Q as CompilerFileWatcherEvent, Qn as WatcherCloseResults, Qt as OutputTargetBaseNext, R as CompilerDependency, Rn as SitemapXmpResults, Rt as LoadConfigResults, S as AutoprefixerOptions, Sn as PluginCtx, Sr as JsonDocsSlot, St as DevServerConfig, T as BuildLog, Tn as PrerenderHydrateOptions, Tr as JsonDocsTypeLibrary, Tt as DocsReadmeCustomColumn, U as CompilerEventDirAdd, Un as StencilDocsConfig, Ut as ModeConfig, V as CompilerEventBuildNoChange, Vn as StencilConfig, Vt as LoggerLineUpdater, W as CompilerEventDirDelete, Wn as SystemDetails, Wt as NodeResolveConfig, X as CompilerFileWatcher, Xn as ValidatedConfig, Xt as OutputTargetAssets, Y as CompilerEventName, Yn as UnvalidatedConfig, Yt as OutputTarget, Z as CompilerFileWatcherCallback, Zn as ValidatedOutputTargetWww, Zt as OutputTargetBase, _ as PrintLine, _n as OutputTargetWww, _r as JsonDocsListener, _t as CopyTask, a as ComponentCompilerEvent, an as OutputTargetDocsCustom, at as CompilerSystemRealpathResults, b as SsrResults, bn as PlatformPath, br as JsonDocsPart, bt as CustomElementsExportBehaviorOptions, c as ComponentCompilerMethod, cn as OutputTargetDocsReadme, ct as CompilerSystemRemoveFileResults, d as ComponentCompilerTypeReferences, dn as OutputTargetLoaderBundle, dr as JsonDocMethodParameter, dt as CompilerSystemWriteFileResults, en as OutputTargetCollection, er as WorkerOptions, et as CompilerRequest, f as ComponentGlobalStyle, fn as OutputTargetSsr, fr as JsonDocs, ft as CompilerWatcher, g as PrerenderUrlResults, gn as OutputTargetTypes, gr as JsonDocsEvent, gt as CopyResults, h as PackageJsonData, hn as OutputTargetStats, hr as JsonDocsDependencyGraph, ht as ConfigCompat, i as CompilerWorkerContext, in as OutputTargetDocsAgentSkill, it as CompilerSystemCreateDirectoryResults, j as BuildResultsComponentGraph, jn as ResolveModuleOptions, jt as HydrateDocumentOptions, k as BuildOutput, kn as ResolveModuleIdOptions, kr as FsWriteResults, kt as HmrStyleUpdate, l as ComponentCompilerProperty, ln as OutputTargetDocsVscode, lr as UserBuildConditionals, lt as CompilerSystemRenameResults, m as LazyBundlesRuntimeData, mn as OutputTargetStandalone, mr as JsonDocsCustomState, mt as ConfigBundle, nn as OutputTargetCustom, nt as CompilerSystem, o as ComponentCompilerListener, on as OutputTargetDocsCustomElementsManifest, ot as CompilerSystemRemoveDirectoryOptions, pn as OutputTargetSsrWasm, pr as JsonDocsComponent, pt as Config, q as CompilerEventFileUpdate, qn as TranspileOptions, qt as OptimizeJsInput, r as CompilerCtx, rn as OutputTargetDistLazy, rt as CompilerSystemCreateDirectoryOptions, s as ComponentCompilerMeta, sn as OutputTargetDocsJson, st as CompilerSystemRemoveDirectoryResults, t as BuildCtx, tn as OutputTargetCopy, tt as CompilerRequestResponse, u as ComponentCompilerState, un as OutputTargetGlobalStyle, ut as CompilerSystemRenamedPath, vn as PageReloadStrategy, vr as JsonDocsMethod, vt as Credentials, w as BuildEvents, wn as PrerenderConfig, wr as JsonDocsTag, wt as Diagnostic, x as WorkerMsgHandler, xn as Plugin, xr as JsonDocsProp, xt as DevServer, yn as ParsedPath, yr as JsonDocsMethodReturn, yt as CustomElementsExportBehavior, z as CompilerEventBuildFinish, zn as SsrDocumentOptions, zt as LogLevel } from "../index-
|
|
1
|
+
import { $ as CompilerFsStats, $n as WorkerMainController, $t as OutputTargetBuild, A as BuildOverrides, An as ResolveModuleIdResults, At as HotModuleReplacement, B as CompilerEventBuildLog, Bn as SsrFactoryOptions, Bt as Logger, C as BuildEmitEvents, Cn as PluginTransformResults, Cr as JsonDocsStyle, Ct as DevServerEditor, D as BuildOnEventRemove, Dn as PrerenderResults, Dr as JsonDocsValue, Dt as HistoryApiFallback, E as BuildNoChangeResults, En as PrerenderOptions, Er as JsonDocsUsage, Et as FsWatchResults, F as Compiler, Fn as SerializeDocumentOptions, Ft as LazyRequire, G as CompilerEventFileAdd, Gn as TransformOptions, Gt as OptimizeCssInput, H as CompilerEventBuildStart, Hn as StencilDevServerConfig, Ht as LoggerTimeSpan, I as CompilerBuildResults, In as ServiceWorkerConfig, It as LightDomPatches, J as CompilerEventFsChange, Jn as TranspileResults, Jt as OptimizeJsOutput, K as CompilerEventFileDelete, Kn as TranspileOnlyResults, Kt as OptimizeCssOutput, L as CompilerBuildStart, Ln as SitemapXmpOpts, Lt as LoadConfigInit, M as CliInitOptions, Mn as RobotsTxtOpts, Mt as HydrateFactoryOptions, N as CompileScriptMinifyOptions, Nn as RobotsTxtResults, Nt as HydratedFlag, O as BuildOnEvents, On as PrerenderStartOptions, Or as StyleDoc, Ot as HmrGlobalStyleUpdate, P as CompileTarget, Pn as RolldownConfig, Pt as LOG_LEVELS, Q as CompilerFileWatcherEvent, Qn as WatcherCloseResults, Qt as OutputTargetBaseNext, R as CompilerDependency, Rn as SitemapXmpResults, Rt as LoadConfigResults, S as AutoprefixerOptions, Sn as PluginCtx, Sr as JsonDocsSlot, St as DevServerConfig, T as BuildLog, Tn as PrerenderHydrateOptions, Tr as JsonDocsTypeLibrary, Tt as DocsReadmeCustomColumn, U as CompilerEventDirAdd, Un as StencilDocsConfig, Ut as ModeConfig, V as CompilerEventBuildNoChange, Vn as StencilConfig, Vt as LoggerLineUpdater, W as CompilerEventDirDelete, Wn as SystemDetails, Wt as NodeResolveConfig, X as CompilerFileWatcher, Xn as ValidatedConfig, Xt as OutputTargetAssets, Y as CompilerEventName, Yn as UnvalidatedConfig, Yt as OutputTarget, Z as CompilerFileWatcherCallback, Zn as ValidatedOutputTargetWww, Zt as OutputTargetBase, _ as PrintLine, _n as OutputTargetWww, _r as JsonDocsListener, _t as CopyTask, a as ComponentCompilerEvent, an as OutputTargetDocsCustom, at as CompilerSystemRealpathResults, b as SsrResults, bn as PlatformPath, br as JsonDocsPart, bt as CustomElementsExportBehaviorOptions, c as ComponentCompilerMethod, cn as OutputTargetDocsReadme, ct as CompilerSystemRemoveFileResults, d as ComponentCompilerTypeReferences, dn as OutputTargetLoaderBundle, dr as JsonDocMethodParameter, dt as CompilerSystemWriteFileResults, en as OutputTargetCollection, er as WorkerOptions, et as CompilerRequest, f as ComponentGlobalStyle, fn as OutputTargetSsr, fr as JsonDocs, ft as CompilerWatcher, g as PrerenderUrlResults, gn as OutputTargetTypes, gr as JsonDocsEvent, gt as CopyResults, h as PackageJsonData, hn as OutputTargetStats, hr as JsonDocsDependencyGraph, ht as ConfigCompat, i as CompilerWorkerContext, in as OutputTargetDocsAgentSkill, it as CompilerSystemCreateDirectoryResults, j as BuildResultsComponentGraph, jn as ResolveModuleOptions, jt as HydrateDocumentOptions, k as BuildOutput, kn as ResolveModuleIdOptions, kr as FsWriteResults, kt as HmrStyleUpdate, l as ComponentCompilerProperty, ln as OutputTargetDocsVscode, lr as UserBuildConditionals, lt as CompilerSystemRenameResults, m as LazyBundlesRuntimeData, mn as OutputTargetStandalone, mr as JsonDocsCustomState, mt as ConfigBundle, nn as OutputTargetCustom, nt as CompilerSystem, o as ComponentCompilerListener, on as OutputTargetDocsCustomElementsManifest, ot as CompilerSystemRemoveDirectoryOptions, pn as OutputTargetSsrWasm, pr as JsonDocsComponent, pt as Config, q as CompilerEventFileUpdate, qn as TranspileOptions, qt as OptimizeJsInput, r as CompilerCtx, rn as OutputTargetDistLazy, rt as CompilerSystemCreateDirectoryOptions, s as ComponentCompilerMeta, sn as OutputTargetDocsJson, st as CompilerSystemRemoveDirectoryResults, t as BuildCtx, tn as OutputTargetCopy, tt as CompilerRequestResponse, u as ComponentCompilerState, un as OutputTargetGlobalStyle, ut as CompilerSystemRenamedPath, vn as PageReloadStrategy, vr as JsonDocsMethod, vt as Credentials, w as BuildEvents, wn as PrerenderConfig, wr as JsonDocsTag, wt as Diagnostic, x as WorkerMsgHandler, xn as Plugin, xr as JsonDocsProp, xt as DevServer, yn as ParsedPath, yr as JsonDocsMethodReturn, yt as CustomElementsExportBehavior, z as CompilerEventBuildFinish, zn as SsrDocumentOptions, zt as LogLevel } from "../index-C41EOWaQ.mjs";
|
|
2
2
|
import ts from "typescript";
|
|
3
3
|
import { Plugin as Plugin$1 } from "rolldown";
|
|
4
4
|
//#region src/version.d.ts
|
package/dist/compiler/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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-
|
|
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-B7K47DPN.mjs";
|
|
2
2
|
import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-Bz2SOK7_.mjs";
|
|
3
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 CUSTOM, $r as filterActiveTargets, Ai as buildWarn, Ar as ModeValidationError, Bi as loadTypeScriptDiagnostics, Br as isJsFile, Ca as TYPES, Ci as isOutputTargetWww, Da as XLINK_NS, Di as TASK_CANCELED_MSG, Ea as WWW, Ei as shouldExcludeComponent, Fi as escapeHtml, Fr as createJsVarName, Gi as formatLazyBundleRuntimeMeta, Gr as readOnlyArrayHasStringMember, Hi as isRolldownError, Hr as isTsFile, Ii as normalizeDiagnostics, Ir as generatePreamble, Ji as CMP_FLAGS, Jr as getSourceMappingUrlForEndOfFile, Ki as stringifyRuntimeData, Kr as readPackageJson, Li as splitLineBreaks, Lr as getTextDocs, Mi as hasError, Mr as validateComponentTag, Ni as hasWarning, Nr as ParsePackageJsonResult, Oi as buildError, Pi as shouldIgnoreError, Pr as addDocBlock, Qi as COPY, Qr as FilterComponentsResult, Ri as augmentDiagnosticWithNode, Rr as hasDependency, Sa as SVG_NS, Si as isOutputTargetTypes, Ta as WATCH_FLAGS, Ti as relativeImport, Ui as loadRolldownDiagnostics, Ur as isTsxFile, Vi as createOnWarnFn, Vr as isJsxFile, Wi as formatComponentRuntimeMeta, Wr as parsePackageJson, Xi as COLLECTION_APP_DATA_FILE_NAME, Xr as rolldownToStencilSourceMap, Yi as COLLECTION, Yr as getSourceMappingUrlLinker, Zi as COLLECTION_MANIFEST_FILE_NAME, Zr as result_d_exports, _a as SSR, _i as isOutputTargetLoaderBundle, aa as DOCS_JSON, ai as isOutputTargetCollection, ba as STATS, bi as isOutputTargetStandalone, ca as EVENT_FLAGS, ci as isOutputTargetDistLazy, da as HOST_FLAGS, di as isOutputTargetDocsCustom, ea as DEFAULT_STYLE_MODE, ei as filterExcludedComponents, fa as HTML_NS, fi as isOutputTargetDocsCustomElementsManifest, ga as NODE_TYPES, gi as isOutputTargetGlobalStyle, ha as MEMBER_FLAGS, hi as isOutputTargetDocsVscode, ia as DOCS_CUSTOM_ELEMENTS_MANIFEST, ii as isOutputTargetAssets, ji as catchError, jr as validateComponentModes, ki as buildJsonFileError, la as GENERATED_DTS, li as isOutputTargetDocs, ma as LOADER_BUNDLE, mi as isOutputTargetDocsReadme, na as DOCS_AGENT_SKILL, ni as getComponentsDtsTypesFilePath, oa as DOCS_README, oi as isOutputTargetCopy, pa as LISTENER_FLAGS, pi as isOutputTargetDocsJson, qi as ASSETS, qr as getInlineSourceMappingUrlLinker, ra as DOCS_CUSTOM, ri as getComponentsFromModules, sa as DOCS_VSCODE, si as isOutputTargetCustom, ta as DIST_LAZY, ti as getComponentsDtsSrcFilePath, ua as GLOBAL_STYLE, ui as isOutputTargetDocsAgentSkill, va as SSR_WASM, vi as isOutputTargetSsr, wa as VALID_CONFIG_OUTPUT_TARGETS, wi as isValidConfigOutputTarget, xa as STYLE_EXT, xi as isOutputTargetStats, ya as STANDALONE, yi as isOutputTargetSsrWasm, zi as loadTypeScriptDiagnostic, zr as isDtsFile } from "../../index-
|
|
1
|
+
import { $i as CUSTOM, $r as filterActiveTargets, Ai as buildWarn, Ar as ModeValidationError, Bi as loadTypeScriptDiagnostics, Br as isJsFile, Ca as TYPES, Ci as isOutputTargetWww, Da as XLINK_NS, Di as TASK_CANCELED_MSG, Ea as WWW, Ei as shouldExcludeComponent, Fi as escapeHtml, Fr as createJsVarName, Gi as formatLazyBundleRuntimeMeta, Gr as readOnlyArrayHasStringMember, Hi as isRolldownError, Hr as isTsFile, Ii as normalizeDiagnostics, Ir as generatePreamble, Ji as CMP_FLAGS, Jr as getSourceMappingUrlForEndOfFile, Ki as stringifyRuntimeData, Kr as readPackageJson, Li as splitLineBreaks, Lr as getTextDocs, Mi as hasError, Mr as validateComponentTag, Ni as hasWarning, Nr as ParsePackageJsonResult, Oi as buildError, Pi as shouldIgnoreError, Pr as addDocBlock, Qi as COPY, Qr as FilterComponentsResult, Ri as augmentDiagnosticWithNode, Rr as hasDependency, Sa as SVG_NS, Si as isOutputTargetTypes, Ta as WATCH_FLAGS, Ti as relativeImport, Ui as loadRolldownDiagnostics, Ur as isTsxFile, Vi as createOnWarnFn, Vr as isJsxFile, Wi as formatComponentRuntimeMeta, Wr as parsePackageJson, Xi as COLLECTION_APP_DATA_FILE_NAME, Xr as rolldownToStencilSourceMap, Yi as COLLECTION, Yr as getSourceMappingUrlLinker, Zi as COLLECTION_MANIFEST_FILE_NAME, Zr as result_d_exports, _a as SSR, _i as isOutputTargetLoaderBundle, aa as DOCS_JSON, ai as isOutputTargetCollection, ba as STATS, bi as isOutputTargetStandalone, ca as EVENT_FLAGS, ci as isOutputTargetDistLazy, da as HOST_FLAGS, di as isOutputTargetDocsCustom, ea as DEFAULT_STYLE_MODE, ei as filterExcludedComponents, fa as HTML_NS, fi as isOutputTargetDocsCustomElementsManifest, ga as NODE_TYPES, gi as isOutputTargetGlobalStyle, ha as MEMBER_FLAGS, hi as isOutputTargetDocsVscode, ia as DOCS_CUSTOM_ELEMENTS_MANIFEST, ii as isOutputTargetAssets, ji as catchError, jr as validateComponentModes, ki as buildJsonFileError, la as GENERATED_DTS, li as isOutputTargetDocs, ma as LOADER_BUNDLE, mi as isOutputTargetDocsReadme, na as DOCS_AGENT_SKILL, ni as getComponentsDtsTypesFilePath, oa as DOCS_README, oi as isOutputTargetCopy, pa as LISTENER_FLAGS, pi as isOutputTargetDocsJson, qi as ASSETS, qr as getInlineSourceMappingUrlLinker, ra as DOCS_CUSTOM, ri as getComponentsFromModules, sa as DOCS_VSCODE, si as isOutputTargetCustom, ta as DIST_LAZY, ti as getComponentsDtsSrcFilePath, ua as GLOBAL_STYLE, ui as isOutputTargetDocsAgentSkill, va as SSR_WASM, vi as isOutputTargetSsr, wa as VALID_CONFIG_OUTPUT_TARGETS, wi as isValidConfigOutputTarget, xa as STYLE_EXT, xi as isOutputTargetStats, ya as STANDALONE, yi as isOutputTargetSsrWasm, zi as loadTypeScriptDiagnostic, zr as isDtsFile } from "../../index-C41EOWaQ.mjs";
|
|
2
2
|
//#region src/utils/byte-size.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Used to learn the size of a string in bytes.
|
|
@@ -461,9 +461,9 @@ const scopeCss = (cssText, scopeId, commentOriginalSelector) => {
|
|
|
461
461
|
};
|
|
462
462
|
//#endregion
|
|
463
463
|
//#region src/version.ts
|
|
464
|
-
const version = "5.0.0-beta.
|
|
465
|
-
const buildId = "
|
|
466
|
-
const vermoji = "
|
|
464
|
+
const version = "5.0.0-beta.23";
|
|
465
|
+
const buildId = "1791932475";
|
|
466
|
+
const vermoji = "🐒";
|
|
467
467
|
/**
|
|
468
468
|
* Get the installed version of a tool/dependency.
|
|
469
469
|
* Handles packages with exports maps that point to subdirectories.
|
|
@@ -9785,22 +9785,63 @@ const generateAgentSkillDocs = async (compilerCtx, docsData, outputTargets) => {
|
|
|
9785
9785
|
}));
|
|
9786
9786
|
};
|
|
9787
9787
|
//#endregion
|
|
9788
|
+
//#region src/compiler/build/update-package-json.ts
|
|
9789
|
+
const isJsonObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
9790
|
+
/**
|
|
9791
|
+
* Apply an update to the project's `package.json`, keeping its indentation, line endings
|
|
9792
|
+
* and key order. Nothing is written if there's no `package.json` or the update changes nothing.
|
|
9793
|
+
*
|
|
9794
|
+
* @param config The validated Stencil config
|
|
9795
|
+
* @param compilerCtx The compiler context
|
|
9796
|
+
* @param update Mutates the parsed `package.json`
|
|
9797
|
+
* @param immediateWrite Write straight to disk instead of queuing the write for the next commit
|
|
9798
|
+
*/
|
|
9799
|
+
const updatePackageJson = async (config, compilerCtx, update, immediateWrite = false) => {
|
|
9800
|
+
const source = await readPackageJsonSource(config, compilerCtx);
|
|
9801
|
+
const pkg = source ? parsePackageJson(source, config.packageJsonFilePath).data : null;
|
|
9802
|
+
if (!source || !isJsonObject(pkg)) return;
|
|
9803
|
+
const before = JSON.stringify(pkg);
|
|
9804
|
+
update(pkg);
|
|
9805
|
+
if (JSON.stringify(pkg) === before) return;
|
|
9806
|
+
const eol = source.includes("\r\n") ? "\r\n" : "\n";
|
|
9807
|
+
const indent = /^([ \t]+)"/m.exec(source)?.[1] ?? 2;
|
|
9808
|
+
let output = JSON.stringify(pkg, null, indent);
|
|
9809
|
+
if (/\n\s*$/.test(source)) output += "\n";
|
|
9810
|
+
output = output.replace(/\n/g, eol);
|
|
9811
|
+
await compilerCtx.fs.writeFile(config.packageJsonFilePath, output, { immediateWrite });
|
|
9812
|
+
};
|
|
9813
|
+
const readPackageJsonSource = async (config, compilerCtx) => {
|
|
9814
|
+
try {
|
|
9815
|
+
return await compilerCtx.fs.readFile(config.packageJsonFilePath);
|
|
9816
|
+
} catch {
|
|
9817
|
+
return;
|
|
9818
|
+
}
|
|
9819
|
+
};
|
|
9820
|
+
//#endregion
|
|
9788
9821
|
//#region src/compiler/docs/cem/index.ts
|
|
9789
9822
|
/**
|
|
9790
9823
|
* Generate Custom Elements Manifest (custom-elements.json) output
|
|
9791
9824
|
* conforming to the Custom Elements Manifest specification.
|
|
9792
9825
|
* @see https://github.com/webcomponents/custom-elements-manifest
|
|
9793
9826
|
*
|
|
9827
|
+
* The `customElements` field of the project's `package.json` is pointed at the manifest
|
|
9828
|
+
* (the first one, if several are configured), which is how tooling locates it.
|
|
9829
|
+
*
|
|
9830
|
+
* @param config the Stencil configuration associated with the project
|
|
9794
9831
|
* @param compilerCtx the current compiler context
|
|
9795
9832
|
* @param docsData the generated docs data from Stencil components
|
|
9796
9833
|
* @param outputTargets the output targets configured for the build
|
|
9797
9834
|
*/
|
|
9798
|
-
const generateCustomElementsManifestDocs = async (compilerCtx, docsData, outputTargets) => {
|
|
9835
|
+
const generateCustomElementsManifestDocs = async (config, compilerCtx, docsData, outputTargets) => {
|
|
9799
9836
|
const cemOutputTargets = outputTargets.filter(isOutputTargetDocsCustomElementsManifest);
|
|
9800
9837
|
if (cemOutputTargets.length === 0) return;
|
|
9801
9838
|
const manifest = generateManifest(docsData);
|
|
9802
9839
|
const jsonContent = JSON.stringify(manifest, null, 2) + "\n";
|
|
9803
9840
|
await Promise.all(cemOutputTargets.map((outputTarget) => compilerCtx.fs.writeFile(outputTarget.file, jsonContent)));
|
|
9841
|
+
const manifestPath = normalizePath(relative$1(config.rootDir, cemOutputTargets[0].file), false);
|
|
9842
|
+
if (!manifestPath.startsWith("../")) await updatePackageJson(config, compilerCtx, (pkg) => {
|
|
9843
|
+
pkg.customElements = manifestPath;
|
|
9844
|
+
});
|
|
9804
9845
|
};
|
|
9805
9846
|
/**
|
|
9806
9847
|
* Generate the Custom Elements Manifest from Stencil docs data
|
|
@@ -10429,7 +10470,7 @@ const outputDocs = async (config, compilerCtx, buildCtx) => {
|
|
|
10429
10470
|
generateJsonDocs(config, compilerCtx, docsData, docsOutputTargets),
|
|
10430
10471
|
generateVscodeDocs(compilerCtx, docsData, docsOutputTargets),
|
|
10431
10472
|
generateCustomDocs(config, docsData, docsOutputTargets),
|
|
10432
|
-
generateCustomElementsManifestDocs(compilerCtx, docsData, docsOutputTargets),
|
|
10473
|
+
generateCustomElementsManifestDocs(config, compilerCtx, docsData, docsOutputTargets),
|
|
10433
10474
|
generateAgentSkillDocs(compilerCtx, docsData, docsOutputTargets)
|
|
10434
10475
|
]);
|
|
10435
10476
|
};
|
|
@@ -19755,13 +19796,13 @@ const validateTypeField = (config, compilerCtx, buildCtx, recommendations) => {
|
|
|
19755
19796
|
if (recommendations.moduleOptions.length > 0 && currentType !== "module") packageJsonWarn(config, compilerCtx, buildCtx, `package.json "type" property should be set to "module".`, "\"type\"");
|
|
19756
19797
|
};
|
|
19757
19798
|
/**
|
|
19758
|
-
* Check if a rootDir-relative directory is covered by a package.json `files` array,
|
|
19799
|
+
* Check if a rootDir-relative directory or file is covered by a package.json `files` array,
|
|
19759
19800
|
* either directly or via a parent directory entry (e.g. "dist/" covers "dist/types/").
|
|
19760
19801
|
* @param files the package.json "files" array
|
|
19761
|
-
* @param dir the rootDir-relative
|
|
19802
|
+
* @param dir the rootDir-relative path to check for
|
|
19762
19803
|
* @returns true if `dir` is covered by one of the `files` entries
|
|
19763
19804
|
*/
|
|
19764
|
-
const
|
|
19805
|
+
const isCoveredByFiles = (files, dir) => {
|
|
19765
19806
|
const normalizedDir = dir.replace(/\/$/, "").replace(/^\.\//, "");
|
|
19766
19807
|
return files.some((userPath) => {
|
|
19767
19808
|
const normalizedUserPath = normalizePath(userPath).replace(/\/$/, "").replace(/^\.\//, "");
|
|
@@ -19791,7 +19832,15 @@ const validateFilesField = async (config, compilerCtx, buildCtx) => {
|
|
|
19791
19832
|
return;
|
|
19792
19833
|
}
|
|
19793
19834
|
const files = buildCtx.packageJson.files;
|
|
19794
|
-
const
|
|
19835
|
+
const manifest = config.outputTargets.find(isOutputTargetDocsCustomElementsManifest);
|
|
19836
|
+
if (manifest?.file) {
|
|
19837
|
+
const manifestPath = normalizePath(relative$1(config.rootDir, manifest.file), false);
|
|
19838
|
+
if (!manifestPath.startsWith("../") && !isCoveredByFiles(files, manifestPath)) {
|
|
19839
|
+
const msg = `package.json "files" array doesn't cover the Custom Elements Manifest "${manifestPath}", so it won't be published.`;
|
|
19840
|
+
packageJsonWarn(config, compilerCtx, buildCtx, msg, `"files"`);
|
|
19841
|
+
}
|
|
19842
|
+
}
|
|
19843
|
+
const uncoveredDirs = distDirs.filter((dir) => !isCoveredByFiles(files, dir));
|
|
19795
19844
|
if (uncoveredDirs.length > 0) {
|
|
19796
19845
|
const msg = `package.json "files" array must contain the distribution ${uncoveredDirs.length > 1 ? "directories" : "directory"} ${formatDirs(uncoveredDirs)} when generating a distribution.`;
|
|
19797
19846
|
packageJsonWarn(config, compilerCtx, buildCtx, msg, `"files"`);
|
|
@@ -19916,7 +19965,6 @@ const OWNED_CONDITIONS = [
|
|
|
19916
19965
|
"import",
|
|
19917
19966
|
"require"
|
|
19918
19967
|
];
|
|
19919
|
-
const isJsonObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
19920
19968
|
/**
|
|
19921
19969
|
* Write the `exports` map entry points into the project's `package.json`.
|
|
19922
19970
|
*
|
|
@@ -19924,6 +19972,7 @@ const isJsonObject = (v) => typeof v === "object" && v !== null && !Array.isArra
|
|
|
19924
19972
|
* (respects user customization), otherwise a default is set (loader-bundle > standalone)
|
|
19925
19973
|
* - every other generated entry is owned by Stencil and rewritten on each build
|
|
19926
19974
|
* - per-component entries whose component no longer exists are removed
|
|
19975
|
+
* - `./custom-elements.json` points at the Custom Elements Manifest, if one is generated
|
|
19927
19976
|
* - entries Stencil doesn't generate are left untouched
|
|
19928
19977
|
*
|
|
19929
19978
|
* @param config The validated Stencil config
|
|
@@ -19936,37 +19985,23 @@ const writeExportMaps = async (config, compilerCtx, buildCtx) => {
|
|
|
19936
19985
|
const ssr = config.outputTargets.find(isOutputTargetSsr);
|
|
19937
19986
|
const types = config.outputTargets.find(isOutputTargetTypes);
|
|
19938
19987
|
if (!loaderBundle && !standalone && !ssr) return;
|
|
19939
|
-
const source = await readPackageJsonSource(config, compilerCtx);
|
|
19940
|
-
const pkg = source ? parsePackageJson(source, config.packageJsonFilePath).data : null;
|
|
19941
|
-
if (!source || !isJsonObject(pkg)) return;
|
|
19942
|
-
let exportMap = toExportMap(pkg.exports);
|
|
19943
|
-
if (loaderBundle || standalone) {
|
|
19944
|
-
const root = getRootExport(config, compilerCtx, exportMap["."], loaderBundle, standalone, types);
|
|
19945
|
-
exportMap = "." in exportMap ? {
|
|
19946
|
-
...exportMap,
|
|
19947
|
-
".": root
|
|
19948
|
-
} : {
|
|
19949
|
-
".": root,
|
|
19950
|
-
...exportMap
|
|
19951
|
-
};
|
|
19952
|
-
}
|
|
19953
19988
|
const generated = getGeneratedExports(config, buildCtx, loaderBundle, standalone, ssr, types);
|
|
19954
|
-
|
|
19955
|
-
|
|
19956
|
-
|
|
19957
|
-
|
|
19958
|
-
|
|
19959
|
-
|
|
19960
|
-
|
|
19961
|
-
|
|
19962
|
-
|
|
19963
|
-
|
|
19964
|
-
|
|
19965
|
-
|
|
19966
|
-
|
|
19967
|
-
|
|
19968
|
-
|
|
19969
|
-
}
|
|
19989
|
+
await updatePackageJson(config, compilerCtx, (pkg) => {
|
|
19990
|
+
let exportMap = toExportMap(pkg.exports);
|
|
19991
|
+
if (loaderBundle || standalone) {
|
|
19992
|
+
const root = getRootExport(config, compilerCtx, exportMap["."], loaderBundle, standalone, types);
|
|
19993
|
+
exportMap = "." in exportMap ? {
|
|
19994
|
+
...exportMap,
|
|
19995
|
+
".": root
|
|
19996
|
+
} : {
|
|
19997
|
+
".": root,
|
|
19998
|
+
...exportMap
|
|
19999
|
+
};
|
|
20000
|
+
}
|
|
20001
|
+
if (standalone?.dir) removeStaleComponentExports(exportMap, generated, toRelativePath(config, standalone.dir));
|
|
20002
|
+
for (const [key, entry] of Object.entries(generated)) exportMap[key] = isString$1(entry) ? entry : mergeConditions(exportMap[key], entry);
|
|
20003
|
+
pkg.exports = exportMap;
|
|
20004
|
+
}, true);
|
|
19970
20005
|
};
|
|
19971
20006
|
/**
|
|
19972
20007
|
* Normalize a `package.json` `exports` value into its subpath-keyed form.
|
|
@@ -20083,6 +20118,9 @@ const getGeneratedExports = (config, buildCtx, loaderBundle, standalone, ssr, ty
|
|
|
20083
20118
|
if (assetsDir) generated["./assets/*"] = `${toRelativePath(config, assetsDir)}/*`;
|
|
20084
20119
|
for (const globalStyle of globalStyles) if (globalStyle.dir && globalStyle.fileName && globalStyle.dir !== assetsDir) generated[`./assets/${globalStyle.fileName}`] = toRelativePath(config, join$2(globalStyle.dir, globalStyle.fileName));
|
|
20085
20120
|
}
|
|
20121
|
+
const manifest = config.outputTargets.find(isOutputTargetDocsCustomElementsManifest);
|
|
20122
|
+
if (manifest?.file) generated["./custom-elements.json"] = toRelativePath(config, manifest.file);
|
|
20123
|
+
generated["./package.json"] = "./package.json";
|
|
20086
20124
|
return generated;
|
|
20087
20125
|
};
|
|
20088
20126
|
/**
|
|
@@ -21310,8 +21348,9 @@ const validateAgentSkillOutputTarget = (config, outputTarget) => {
|
|
|
21310
21348
|
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev = true;
|
|
21311
21349
|
return outputTarget;
|
|
21312
21350
|
};
|
|
21351
|
+
const DEFAULT_CUSTOM_ELEMENTS_MANIFEST_FILE = "dist/custom-elements.json";
|
|
21313
21352
|
const validateCustomElementsManifestOutputTarget = (config, outputTarget) => {
|
|
21314
|
-
if (!isString$1(outputTarget.file)) outputTarget.file =
|
|
21353
|
+
if (!isString$1(outputTarget.file)) outputTarget.file = DEFAULT_CUSTOM_ELEMENTS_MANIFEST_FILE;
|
|
21315
21354
|
if (!isAbsolute$1(outputTarget.file)) outputTarget.file = join$2(config.rootDir, outputTarget.file);
|
|
21316
21355
|
outputTarget.strict = !!outputTarget.strict;
|
|
21317
21356
|
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev = true;
|
|
@@ -3832,9 +3832,11 @@ interface OutputTargetDocsCustomElementsManifest extends OutputTargetBase {
|
|
|
3832
3832
|
type: 'docs-custom-elements-manifest';
|
|
3833
3833
|
/**
|
|
3834
3834
|
* The file path where the custom-elements.json manifest will be written.
|
|
3835
|
-
* Defaults to 'custom-elements.json'
|
|
3835
|
+
* Defaults to 'dist/custom-elements.json'.
|
|
3836
|
+
*
|
|
3837
|
+
* The `customElements` field of the project's `package.json` is set to this path.
|
|
3836
3838
|
*/
|
|
3837
|
-
file
|
|
3839
|
+
file?: string;
|
|
3838
3840
|
strict?: boolean;
|
|
3839
3841
|
}
|
|
3840
3842
|
interface OutputTargetDocsCustom extends OutputTargetBase {
|
|
@@ -3872,9 +3872,11 @@ interface OutputTargetDocsCustomElementsManifest extends OutputTargetBase {
|
|
|
3872
3872
|
type: 'docs-custom-elements-manifest';
|
|
3873
3873
|
/**
|
|
3874
3874
|
* The file path where the custom-elements.json manifest will be written.
|
|
3875
|
-
* Defaults to 'custom-elements.json'
|
|
3875
|
+
* Defaults to 'dist/custom-elements.json'.
|
|
3876
|
+
*
|
|
3877
|
+
* The `customElements` field of the project's `package.json` is set to this path.
|
|
3876
3878
|
*/
|
|
3877
|
-
file
|
|
3879
|
+
file?: string;
|
|
3878
3880
|
strict?: boolean;
|
|
3879
3881
|
}
|
|
3880
3882
|
interface OutputTargetDocsCustom extends OutputTargetBase {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ar as RafCallback, cr as TagTransformer, lr as UserBuildConditionals, n as ChildType, nr as ErrorHandler, p as HostElement, rr as FunctionalComponent, sr as ResolutionHandler, ur as VNode, v as PropsType, y as RuntimeRef } from "./index-
|
|
1
|
+
import { ar as RafCallback, cr as TagTransformer, lr as UserBuildConditionals, n as ChildType, nr as ErrorHandler, p as HostElement, rr as FunctionalComponent, sr as ResolutionHandler, ur as VNode, v as PropsType, y as RuntimeRef } from "./index-C41EOWaQ.mjs";
|
|
2
2
|
//#region src/client/client-build.d.ts
|
|
3
3
|
declare const Build: UserBuildConditionals;
|
|
4
4
|
//#endregion
|
package/dist/sys/node/worker.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as createWorkerMessageHandler } from "../../compiler-
|
|
1
|
+
import { l as createWorkerMessageHandler } from "../../compiler-B7K47DPN.mjs";
|
|
2
2
|
import { t as createNodeSys } from "../../node-Bz2SOK7_.mjs";
|
|
3
3
|
//#region src/sys/node/node-worker-thread.ts
|
|
4
4
|
/**
|
package/dist/testing/index.d.mts
CHANGED
|
@@ -2628,9 +2628,11 @@ interface OutputTargetDocsCustomElementsManifest extends OutputTargetBase {
|
|
|
2628
2628
|
type: 'docs-custom-elements-manifest';
|
|
2629
2629
|
/**
|
|
2630
2630
|
* The file path where the custom-elements.json manifest will be written.
|
|
2631
|
-
* Defaults to 'custom-elements.json'
|
|
2631
|
+
* Defaults to 'dist/custom-elements.json'.
|
|
2632
|
+
*
|
|
2633
|
+
* The `customElements` field of the project's `package.json` is set to this path.
|
|
2632
2634
|
*/
|
|
2633
|
-
file
|
|
2635
|
+
file?: string;
|
|
2634
2636
|
strict?: boolean;
|
|
2635
2637
|
}
|
|
2636
2638
|
interface OutputTargetDocsCustom extends OutputTargetBase {
|
package/dist/testing/index.mjs
CHANGED
|
@@ -33,7 +33,7 @@ import "@rollup/pluginutils";
|
|
|
33
33
|
import { createHash } from "crypto";
|
|
34
34
|
import { afterAll, vi } from "vitest";
|
|
35
35
|
//#region src/version.ts
|
|
36
|
-
const version = "5.0.0-beta.
|
|
36
|
+
const version = "5.0.0-beta.23";
|
|
37
37
|
const MEMBER_FLAGS = {
|
|
38
38
|
String: 1,
|
|
39
39
|
Number: 2,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.23",
|
|
4
4
|
"description": "A Compiler for Web Components and Progressive Web Apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -126,9 +126,9 @@
|
|
|
126
126
|
"terser": "^5.50.0",
|
|
127
127
|
"tinyglobby": "^0.2.17",
|
|
128
128
|
"typescript": ">5.0.0 <7.0.0",
|
|
129
|
-
"@stencil/cli": "5.0.0-beta.
|
|
130
|
-
"@stencil/
|
|
131
|
-
"@stencil/
|
|
129
|
+
"@stencil/cli": "5.0.0-beta.23",
|
|
130
|
+
"@stencil/mock-doc": "5.0.0-beta.23",
|
|
131
|
+
"@stencil/dev-server": "5.0.0-beta.23"
|
|
132
132
|
},
|
|
133
133
|
"devDependencies": {
|
|
134
134
|
"@ionic/prettier-config": "^4.0.0",
|