@stencil/core 5.0.0-beta.21 → 5.0.0-beta.22
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 +10 -10
- 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-ApS_Tn_4.mjs → compiler-CShHxskG.mjs} +134 -124
- package/dist/declarations/stencil-public-compiler.d.ts +0 -5
- package/dist/{index-Dz1G9pWZ.d.mts → index-Clnf0Xcw.d.mts} +1 -1
- package/dist/{index-B9-Byy8z.d.mts → index-ZTa5XM0M.d.mts} +0 -5
- package/dist/signals/index.js +3 -33
- package/dist/sys/node/index.d.mts +1 -1
- package/dist/sys/node/worker.mjs +1 -1
- package/dist/testing/index.d.mts +0 -5
- 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.22";
|
|
1848
1848
|
//#endregion
|
|
1849
1849
|
//#region src/compiler/events.ts
|
|
1850
1850
|
const buildEvents = () => {
|
|
@@ -2643,14 +2643,14 @@ const getTranspileCssConfig = (compileOpts, importData, results) => {
|
|
|
2643
2643
|
};
|
|
2644
2644
|
const getTranspileConfigOpt = (value, validValues, defaultValue) => {
|
|
2645
2645
|
if (value === null || value === "null") return null;
|
|
2646
|
-
value = isString$1(value) ? value.toLowerCase().trim() :
|
|
2646
|
+
value = isString$1(value) ? value.toLowerCase().trim() : void 0;
|
|
2647
2647
|
if (validValues.has(value)) return value;
|
|
2648
2648
|
return defaultValue;
|
|
2649
2649
|
};
|
|
2650
2650
|
const VALID_EXPORT = /* @__PURE__ */ new Set(["customelement", "module"]);
|
|
2651
|
-
const VALID_METADATA = /* @__PURE__ */ new Set(["compilerstatic"
|
|
2651
|
+
const VALID_METADATA = /* @__PURE__ */ new Set(["compilerstatic"]);
|
|
2652
2652
|
const VALID_MODULE = /* @__PURE__ */ new Set(["cjs", "esm"]);
|
|
2653
|
-
const VALID_PROXY = /* @__PURE__ */ new Set(["defineproperty"
|
|
2653
|
+
const VALID_PROXY = /* @__PURE__ */ new Set(["defineproperty"]);
|
|
2654
2654
|
const VALID_STYLE = /* @__PURE__ */ new Set(["static"]);
|
|
2655
2655
|
const VALID_STYLE_IMPORT_DATA = /* @__PURE__ */ new Set(["queryparams"]);
|
|
2656
2656
|
const VALID_TARGET = /* @__PURE__ */ new Set([
|
|
@@ -2830,7 +2830,7 @@ const validateReadmeOutputTarget = (config, outputTarget) => {
|
|
|
2830
2830
|
if (!isAbsolute(outputTarget.dir)) outputTarget.dir = join$1(config.rootDir, outputTarget.dir);
|
|
2831
2831
|
if (outputTarget.footer == null) outputTarget.footer = NOTE;
|
|
2832
2832
|
outputTarget.strict = !!outputTarget.strict;
|
|
2833
|
-
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev =
|
|
2833
|
+
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev = true;
|
|
2834
2834
|
return outputTarget;
|
|
2835
2835
|
};
|
|
2836
2836
|
const validateJsonDocsOutputTarget = (config, diagnostics, outputTarget) => {
|
|
@@ -2842,7 +2842,7 @@ const validateJsonDocsOutputTarget = (config, diagnostics, outputTarget) => {
|
|
|
2842
2842
|
if (isString$1(outputTarget.typesFile) && !isAbsolute(outputTarget.typesFile)) outputTarget.typesFile = join$1(config.rootDir, outputTarget.typesFile);
|
|
2843
2843
|
else if (outputTarget.typesFile !== null && outputTarget.file.endsWith(".json")) outputTarget.typesFile = outputTarget.file.replace(/\.json$/, ".d.ts");
|
|
2844
2844
|
outputTarget.strict = !!outputTarget.strict;
|
|
2845
|
-
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev =
|
|
2845
|
+
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev = true;
|
|
2846
2846
|
return outputTarget;
|
|
2847
2847
|
};
|
|
2848
2848
|
const validateCustomDocsOutputTarget = (config, diagnostics, outputTarget) => {
|
|
@@ -2851,7 +2851,7 @@ const validateCustomDocsOutputTarget = (config, diagnostics, outputTarget) => {
|
|
|
2851
2851
|
err.messageText = `docs-custom outputTarget missing the "generator" function`;
|
|
2852
2852
|
}
|
|
2853
2853
|
outputTarget.strict = !!outputTarget.strict;
|
|
2854
|
-
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev =
|
|
2854
|
+
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev = true;
|
|
2855
2855
|
return outputTarget;
|
|
2856
2856
|
};
|
|
2857
2857
|
const validateVScodeDocsOutputTarget = (config, diagnostics, outputTarget) => {
|
|
@@ -2859,21 +2859,21 @@ const validateVScodeDocsOutputTarget = (config, diagnostics, outputTarget) => {
|
|
|
2859
2859
|
const err = buildError(diagnostics);
|
|
2860
2860
|
err.messageText = `docs-vscode outputTarget missing the "file" path`;
|
|
2861
2861
|
}
|
|
2862
|
-
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev =
|
|
2862
|
+
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev = true;
|
|
2863
2863
|
return outputTarget;
|
|
2864
2864
|
};
|
|
2865
2865
|
const DEFAULT_AGENT_SKILL_DIR = "dist/skill";
|
|
2866
2866
|
const validateAgentSkillOutputTarget = (config, outputTarget) => {
|
|
2867
2867
|
outputTarget.dir = getAbsolutePath(config, outputTarget.dir || DEFAULT_AGENT_SKILL_DIR);
|
|
2868
2868
|
outputTarget.name = toSkillName(outputTarget.name || config.fsNamespace);
|
|
2869
|
-
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev =
|
|
2869
|
+
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev = true;
|
|
2870
2870
|
return outputTarget;
|
|
2871
2871
|
};
|
|
2872
2872
|
const validateCustomElementsManifestOutputTarget = (config, outputTarget) => {
|
|
2873
2873
|
if (!isString$1(outputTarget.file)) outputTarget.file = "custom-elements.json";
|
|
2874
2874
|
if (!isAbsolute(outputTarget.file)) outputTarget.file = join$1(config.rootDir, outputTarget.file);
|
|
2875
2875
|
outputTarget.strict = !!outputTarget.strict;
|
|
2876
|
-
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev =
|
|
2876
|
+
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev = true;
|
|
2877
2877
|
return outputTarget;
|
|
2878
2878
|
};
|
|
2879
2879
|
//#endregion
|
|
@@ -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-ZTa5XM0M.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-CShHxskG.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-ZTa5XM0M.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.22";
|
|
465
|
+
const buildId = "1791847427";
|
|
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.
|
|
@@ -5179,6 +5179,86 @@ const getScopeId = (tagName, mode) => {
|
|
|
5179
5179
|
return "sc-" + tagName + (mode && mode !== "$" ? "-" + mode : "");
|
|
5180
5180
|
};
|
|
5181
5181
|
//#endregion
|
|
5182
|
+
//#region src/compiler/style/transform-stylesheet.ts
|
|
5183
|
+
/**
|
|
5184
|
+
* Run a stylesheet through the plugin (e.g. Sass) and CSS-to-ESM transforms, memoized in
|
|
5185
|
+
* `compilerCtx.cssTransformCache` so every consumer of the same stylesheet shares one computation.
|
|
5186
|
+
*
|
|
5187
|
+
* @param config a user-supplied configuration
|
|
5188
|
+
* @param compilerCtx the current compiler context
|
|
5189
|
+
* @param buildCtx the current build context
|
|
5190
|
+
* @param id the stylesheet's path, annotated with its import data as query params - the cache key
|
|
5191
|
+
* @param data the import data serialized into `id`
|
|
5192
|
+
* @returns the cache entry, or `null` if the stylesheet could not be read
|
|
5193
|
+
*/
|
|
5194
|
+
const transformStylesheet = async (config, compilerCtx, buildCtx, id, data) => {
|
|
5195
|
+
if (compilerCtx.cssTransformCache.has(id)) return compilerCtx.cssTransformCache.get(id) ?? null;
|
|
5196
|
+
if (!compilerCtx.worker) return null;
|
|
5197
|
+
const filePath = normalizeFsPath(id);
|
|
5198
|
+
const code = await compilerCtx.fs.readFile(filePath);
|
|
5199
|
+
if (typeof code !== "string") {
|
|
5200
|
+
compilerCtx.cssTransformCache.set(id, null);
|
|
5201
|
+
return null;
|
|
5202
|
+
}
|
|
5203
|
+
const pluginTransforms = await runPluginTransformsEsmImports(config, compilerCtx, buildCtx, code, filePath);
|
|
5204
|
+
const cssInput = data.tag ? pluginTransforms.code : inlineRelativeCssUrlAssets(pluginTransforms.code, filePath);
|
|
5205
|
+
const cssTransformOutput = await compilerCtx.worker.transformCssToEsm({
|
|
5206
|
+
file: pluginTransforms.id,
|
|
5207
|
+
input: cssInput,
|
|
5208
|
+
tag: data.tag,
|
|
5209
|
+
tags: buildCtx.components.map((c) => c.tagName),
|
|
5210
|
+
addTagTransformers: !!buildCtx.config.compat.additionalTagTransformers,
|
|
5211
|
+
encapsulation: data.encapsulation,
|
|
5212
|
+
mode: data.mode,
|
|
5213
|
+
sourceMap: config.sourceMap,
|
|
5214
|
+
minify: config.minifyCss,
|
|
5215
|
+
autoprefixer: config.autoprefixCss,
|
|
5216
|
+
docs: config.outputTargets.some(isOutputTargetDocs)
|
|
5217
|
+
});
|
|
5218
|
+
const entry = {
|
|
5219
|
+
pluginTransformId: pluginTransforms.id,
|
|
5220
|
+
pluginTransformCode: pluginTransforms.code,
|
|
5221
|
+
pluginTransformDependencies: pluginTransforms.dependencies,
|
|
5222
|
+
pluginTransformDiagnostics: pluginTransforms.diagnostics,
|
|
5223
|
+
cssTransformOutput
|
|
5224
|
+
};
|
|
5225
|
+
compilerCtx.cssTransformCache.set(id, entry);
|
|
5226
|
+
return entry;
|
|
5227
|
+
};
|
|
5228
|
+
/**
|
|
5229
|
+
* 3rd-party stylesheets with relative `url(./font.ttf)` (font-face `src`, a background-image, ...)
|
|
5230
|
+
* have nowhere to resolve that path once this CSS is self-injected as a CSSStyleSheet:
|
|
5231
|
+
* there's no bundler output location for it to be relative *to*.
|
|
5232
|
+
* Inlining the referenced file as a `data:` URI sidesteps needing one - no separate asset
|
|
5233
|
+
* to serve, works the same regardless of how/where the final bundle is deployed.
|
|
5234
|
+
*/
|
|
5235
|
+
const CSS_URL_RE = /url\(\s*(['"]?)([^'"()]+)\1\s*\)/g;
|
|
5236
|
+
const CSS_URL_ASSET_MIME_TYPES = {
|
|
5237
|
+
ttf: "font/ttf",
|
|
5238
|
+
otf: "font/otf",
|
|
5239
|
+
woff: "font/woff",
|
|
5240
|
+
woff2: "font/woff2",
|
|
5241
|
+
eot: "application/vnd.ms-fontobject",
|
|
5242
|
+
png: "image/png",
|
|
5243
|
+
jpg: "image/jpeg",
|
|
5244
|
+
jpeg: "image/jpeg",
|
|
5245
|
+
gif: "image/gif",
|
|
5246
|
+
svg: "image/svg+xml"
|
|
5247
|
+
};
|
|
5248
|
+
const inlineRelativeCssUrlAssets = (cssText, cssFilePath) => cssText.replace(CSS_URL_RE, (original, _quote, url) => {
|
|
5249
|
+
if (/^(data:|[a-z][a-z0-9+.-]*:|\/\/|\/)/i.test(url)) return original;
|
|
5250
|
+
const cleanUrl = url.split(/[?#]/)[0];
|
|
5251
|
+
const ext = cleanUrl.split(".").pop()?.toLowerCase();
|
|
5252
|
+
const mimeType = ext && CSS_URL_ASSET_MIME_TYPES[ext];
|
|
5253
|
+
if (!mimeType) return original;
|
|
5254
|
+
try {
|
|
5255
|
+
const assetPath = resolve(dirname(cssFilePath), cleanUrl);
|
|
5256
|
+
return `url("data:${mimeType};base64,${readFileSync(assetPath).toString("base64")}")`;
|
|
5257
|
+
} catch {
|
|
5258
|
+
return original;
|
|
5259
|
+
}
|
|
5260
|
+
});
|
|
5261
|
+
//#endregion
|
|
5182
5262
|
//#region src/compiler/transformers/stencil-import-path.ts
|
|
5183
5263
|
/**
|
|
5184
5264
|
* Serialize data about a style import to an annotated path, where
|
|
@@ -5298,35 +5378,7 @@ const extTransformsPlugin = (config, compilerCtx, buildCtx) => {
|
|
|
5298
5378
|
if (data != null) {
|
|
5299
5379
|
const filePath = normalizeFsPath(id);
|
|
5300
5380
|
const wasCached = compilerCtx.cssTransformCache.has(id);
|
|
5301
|
-
|
|
5302
|
-
const code = await compilerCtx.fs.readFile(filePath);
|
|
5303
|
-
if (typeof code !== "string") compilerCtx.cssTransformCache.set(id, null);
|
|
5304
|
-
else {
|
|
5305
|
-
const pluginTransforms = await runPluginTransformsEsmImports(config, compilerCtx, buildCtx, code, filePath);
|
|
5306
|
-
const cssInput = data.tag ? pluginTransforms.code : inlineRelativeCssUrlAssets(pluginTransforms.code, filePath);
|
|
5307
|
-
const cssTransformResults = await compilerCtx.worker.transformCssToEsm({
|
|
5308
|
-
file: pluginTransforms.id,
|
|
5309
|
-
input: cssInput,
|
|
5310
|
-
tag: data.tag,
|
|
5311
|
-
tags: buildCtx.components.map((c) => c.tagName),
|
|
5312
|
-
addTagTransformers: !!buildCtx.config.compat.additionalTagTransformers,
|
|
5313
|
-
encapsulation: data.encapsulation,
|
|
5314
|
-
mode: data.mode,
|
|
5315
|
-
sourceMap: config.sourceMap,
|
|
5316
|
-
minify: config.minifyCss,
|
|
5317
|
-
autoprefixer: config.autoprefixCss,
|
|
5318
|
-
docs: config.outputTargets.some(isOutputTargetDocs)
|
|
5319
|
-
});
|
|
5320
|
-
compilerCtx.cssTransformCache.set(id, {
|
|
5321
|
-
pluginTransformId: pluginTransforms.id,
|
|
5322
|
-
pluginTransformCode: pluginTransforms.code,
|
|
5323
|
-
pluginTransformDependencies: pluginTransforms.dependencies,
|
|
5324
|
-
pluginTransformDiagnostics: pluginTransforms.diagnostics,
|
|
5325
|
-
cssTransformOutput: cssTransformResults
|
|
5326
|
-
});
|
|
5327
|
-
}
|
|
5328
|
-
}
|
|
5329
|
-
const cacheEntry = compilerCtx.cssTransformCache.get(id);
|
|
5381
|
+
const cacheEntry = await transformStylesheet(config, compilerCtx, buildCtx, id, data);
|
|
5330
5382
|
if (wasCached) cacheHits++;
|
|
5331
5383
|
if (cacheEntry == null) return null;
|
|
5332
5384
|
/**
|
|
@@ -5401,39 +5453,6 @@ const extTransformsPlugin = (config, compilerCtx, buildCtx) => {
|
|
|
5401
5453
|
}
|
|
5402
5454
|
};
|
|
5403
5455
|
};
|
|
5404
|
-
/**
|
|
5405
|
-
* 3rd-party stylesheets with relative `url(./font.ttf)` (font-face `src`, a background-image, ...)
|
|
5406
|
-
* have nowhere to resolve that path once this CSS is self-injected as a CSSStyleSheet:
|
|
5407
|
-
* there's no bundler output location for it to be relative *to*.
|
|
5408
|
-
* Inlining the referenced file as a `data:` URI sidesteps needing one - no separate asset
|
|
5409
|
-
* to serve, works the same regardless of how/where the final bundle is deployed.
|
|
5410
|
-
*/
|
|
5411
|
-
const CSS_URL_RE = /url\(\s*(['"]?)([^'"()]+)\1\s*\)/g;
|
|
5412
|
-
const CSS_URL_ASSET_MIME_TYPES = {
|
|
5413
|
-
ttf: "font/ttf",
|
|
5414
|
-
otf: "font/otf",
|
|
5415
|
-
woff: "font/woff",
|
|
5416
|
-
woff2: "font/woff2",
|
|
5417
|
-
eot: "application/vnd.ms-fontobject",
|
|
5418
|
-
png: "image/png",
|
|
5419
|
-
jpg: "image/jpeg",
|
|
5420
|
-
jpeg: "image/jpeg",
|
|
5421
|
-
gif: "image/gif",
|
|
5422
|
-
svg: "image/svg+xml"
|
|
5423
|
-
};
|
|
5424
|
-
const inlineRelativeCssUrlAssets = (cssText, cssFilePath) => cssText.replace(CSS_URL_RE, (original, _quote, url) => {
|
|
5425
|
-
if (/^(data:|[a-z][a-z0-9+.-]*:|\/\/|\/)/i.test(url)) return original;
|
|
5426
|
-
const cleanUrl = url.split(/[?#]/)[0];
|
|
5427
|
-
const ext = cleanUrl.split(".").pop()?.toLowerCase();
|
|
5428
|
-
const mimeType = ext && CSS_URL_ASSET_MIME_TYPES[ext];
|
|
5429
|
-
if (!mimeType) return original;
|
|
5430
|
-
try {
|
|
5431
|
-
const assetPath = resolve(dirname(cssFilePath), cleanUrl);
|
|
5432
|
-
return `url("data:${mimeType};base64,${readFileSync(assetPath).toString("base64")}")`;
|
|
5433
|
-
} catch {
|
|
5434
|
-
return original;
|
|
5435
|
-
}
|
|
5436
|
-
});
|
|
5437
5456
|
//#endregion
|
|
5438
5457
|
//#region src/compiler/bundle/file-load-plugin.ts
|
|
5439
5458
|
const RESOLVE_EXTENSIONS = [
|
|
@@ -9955,6 +9974,46 @@ const componentToDeclaration = (component) => {
|
|
|
9955
9974
|
};
|
|
9956
9975
|
};
|
|
9957
9976
|
//#endregion
|
|
9977
|
+
//#region src/compiler/docs/collect-style-docs.ts
|
|
9978
|
+
/**
|
|
9979
|
+
* Populate `styleDocs` for every component from its external stylesheets. Stylesheets a bundler
|
|
9980
|
+
* has already transformed are read from `compilerCtx.cssTransformCache`; the rest are transformed
|
|
9981
|
+
* here, so style docs don't depend on a bundling output target having run.
|
|
9982
|
+
*
|
|
9983
|
+
* @param config the configuration associated with the current Stencil task run
|
|
9984
|
+
* @param compilerCtx the current compiler context
|
|
9985
|
+
* @param buildCtx the build context for the current Stencil task run
|
|
9986
|
+
*/
|
|
9987
|
+
const collectStyleDocs = async (config, compilerCtx, buildCtx) => {
|
|
9988
|
+
const cached = /* @__PURE__ */ new Map();
|
|
9989
|
+
for (const [id, entry] of compilerCtx.cssTransformCache) {
|
|
9990
|
+
const { data } = parseImportPath(id);
|
|
9991
|
+
if (entry && data?.tag) cached.set(cacheKey(id, data.tag, data.mode), entry);
|
|
9992
|
+
}
|
|
9993
|
+
const collect = async (cmp, mode, externalStyle) => {
|
|
9994
|
+
let entry = cached.get(cacheKey(externalStyle.absolutePath, cmp.tagName, mode)) ?? cached.get(cacheKey(externalStyle.originalComponentPath, cmp.tagName, mode));
|
|
9995
|
+
if (!entry) {
|
|
9996
|
+
const data = {
|
|
9997
|
+
tag: cmp.tagName,
|
|
9998
|
+
mode,
|
|
9999
|
+
encapsulation: cmp.encapsulation
|
|
10000
|
+
};
|
|
10001
|
+
const id = `${externalStyle.absolutePath}?${new URLSearchParams(data)}`;
|
|
10002
|
+
const transformed = await transformStylesheet(config, compilerCtx, buildCtx, id, data);
|
|
10003
|
+
if (!transformed) return;
|
|
10004
|
+
entry = transformed;
|
|
10005
|
+
const diagnostics = [...entry.pluginTransformDiagnostics, ...entry.cssTransformOutput.diagnostics];
|
|
10006
|
+
buildCtx.diagnostics.push(...diagnostics);
|
|
10007
|
+
if (hasError(diagnostics)) compilerCtx.cssTransformCache.delete(id);
|
|
10008
|
+
for (const dep of entry.pluginTransformDependencies) compilerCtx.addWatchFile(dep);
|
|
10009
|
+
}
|
|
10010
|
+
cmp.styleDocs ||= [];
|
|
10011
|
+
mergeIntoWith(cmp.styleDocs, entry.cssTransformOutput.styleDocs, (docs) => `${docs.name},${docs.mode}`);
|
|
10012
|
+
};
|
|
10013
|
+
await Promise.all(buildCtx.components.filter((cmp) => !cmp.internal && !cmp.isCollectionDependency).flatMap((cmp) => (cmp.styles ?? []).flatMap((style) => (style.externalStyles ?? []).map((externalStyle) => collect(cmp, style.modeName, externalStyle)))));
|
|
10014
|
+
};
|
|
10015
|
+
const cacheKey = (path, tag, mode) => `${normalizeFsPath(path)}\n${tag}\n${mode}`;
|
|
10016
|
+
//#endregion
|
|
9958
10017
|
//#region src/compiler/docs/custom/index.ts
|
|
9959
10018
|
const generateCustomDocs = async (config, docsData, outputTargets) => {
|
|
9960
10019
|
const customOutputTargets = outputTargets.filter(isOutputTargetDocsCustom);
|
|
@@ -10247,48 +10306,6 @@ const getDefaultReadme = (docsData) => {
|
|
|
10247
10306
|
""
|
|
10248
10307
|
].join("\n");
|
|
10249
10308
|
};
|
|
10250
|
-
/**
|
|
10251
|
-
* Extract the existing CSS Custom Properties section from a README file.
|
|
10252
|
-
* This is used to preserve CSS props documentation when running `stencil docs`
|
|
10253
|
-
* without building styles.
|
|
10254
|
-
*
|
|
10255
|
-
* @param compilerCtx the current compiler context
|
|
10256
|
-
* @param readmePath the path to the README file to read
|
|
10257
|
-
* @returns array of CSS custom properties styles, or undefined if none found
|
|
10258
|
-
*/
|
|
10259
|
-
const extractExistingCssProps = async (compilerCtx, readmePath) => {
|
|
10260
|
-
try {
|
|
10261
|
-
const cssPropsSectionMatch = (await compilerCtx.fs.readFile(readmePath)).match(/## CSS Custom Properties\s*\n\s*\n([\s\S]*?)(?=\n##|\n-{4,}|$)/);
|
|
10262
|
-
if (!cssPropsSectionMatch) return;
|
|
10263
|
-
const cssPropsSection = cssPropsSectionMatch[1];
|
|
10264
|
-
const styles = [];
|
|
10265
|
-
const lines = cssPropsSection.split("\n");
|
|
10266
|
-
let inTable = false;
|
|
10267
|
-
for (const line of lines) {
|
|
10268
|
-
const trimmedLine = line.trim();
|
|
10269
|
-
if (trimmedLine.startsWith("| Name") || trimmedLine.startsWith("| ---")) {
|
|
10270
|
-
inTable = true;
|
|
10271
|
-
continue;
|
|
10272
|
-
}
|
|
10273
|
-
if (inTable && trimmedLine.startsWith("|")) {
|
|
10274
|
-
const parts = trimmedLine.split("|").map((p) => p.trim()).filter((p) => p);
|
|
10275
|
-
if (parts.length >= 2) {
|
|
10276
|
-
const name = parts[0].replace(/`/g, "").trim();
|
|
10277
|
-
const docs = parts[1].trim();
|
|
10278
|
-
if (name.startsWith("--")) styles.push({
|
|
10279
|
-
name,
|
|
10280
|
-
docs,
|
|
10281
|
-
annotation: "prop",
|
|
10282
|
-
mode: void 0
|
|
10283
|
-
});
|
|
10284
|
-
}
|
|
10285
|
-
}
|
|
10286
|
-
}
|
|
10287
|
-
return styles.length > 0 ? styles : void 0;
|
|
10288
|
-
} catch {
|
|
10289
|
-
return;
|
|
10290
|
-
}
|
|
10291
|
-
};
|
|
10292
10309
|
//#endregion
|
|
10293
10310
|
//#region src/compiler/docs/readme/index.ts
|
|
10294
10311
|
const generateReadmeDocs = async (config, compilerCtx, docsData, outputTargets) => {
|
|
@@ -10405,15 +10422,8 @@ const outputDocs = async (config, compilerCtx, buildCtx) => {
|
|
|
10405
10422
|
const docsOutputTargets = filterActiveTargets(config.outputTargets.filter((o) => isOutputTargetDocsReadme(o) || isOutputTargetDocsJson(o) || isOutputTargetDocsCustom(o) || isOutputTargetDocsVscode(o) || isOutputTargetDocsCustomElementsManifest(o) || isOutputTargetDocsAgentSkill(o)), config.devMode);
|
|
10406
10423
|
if (docsOutputTargets.length === 0) return;
|
|
10407
10424
|
await buildCtx.stylesPromise;
|
|
10425
|
+
await collectStyleDocs(config, compilerCtx, buildCtx);
|
|
10408
10426
|
const docsData = await generateDocData(config, compilerCtx, buildCtx);
|
|
10409
|
-
if (config.outputTargets.every((target) => target.type === "docs-readme" || target.type === "docs-json" || target.type === "docs-custom" || target.type === "docs-vscode" || target.type === "docs-custom-elements-manifest" || target.type === "docs-agent-skill")) await Promise.all(docsData.components.map(async (component) => {
|
|
10410
|
-
if (component.styles.length === 0) {
|
|
10411
|
-
const readmeDir = docsOutputTargets.find(isOutputTargetDocsReadme)?.dir || config.srcDir;
|
|
10412
|
-
const readmePath = normalizePath(readmeDir) === normalizePath(config.srcDir) ? component.readmePath : join$2(readmeDir, component.readmePath.replace(config.srcDir, ""));
|
|
10413
|
-
const existingCssProps = await extractExistingCssProps(compilerCtx, readmePath);
|
|
10414
|
-
if (existingCssProps) component.styles = existingCssProps;
|
|
10415
|
-
}
|
|
10416
|
-
}));
|
|
10417
10427
|
await Promise.all([
|
|
10418
10428
|
generateReadmeDocs(config, compilerCtx, docsData, docsOutputTargets),
|
|
10419
10429
|
generateJsonDocs(config, compilerCtx, docsData, docsOutputTargets),
|
|
@@ -21261,7 +21271,7 @@ const validateReadmeOutputTarget = (config, outputTarget) => {
|
|
|
21261
21271
|
if (!isAbsolute$1(outputTarget.dir)) outputTarget.dir = join$2(config.rootDir, outputTarget.dir);
|
|
21262
21272
|
if (outputTarget.footer == null) outputTarget.footer = NOTE;
|
|
21263
21273
|
outputTarget.strict = !!outputTarget.strict;
|
|
21264
|
-
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev =
|
|
21274
|
+
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev = true;
|
|
21265
21275
|
return outputTarget;
|
|
21266
21276
|
};
|
|
21267
21277
|
const validateJsonDocsOutputTarget = (config, diagnostics, outputTarget) => {
|
|
@@ -21273,7 +21283,7 @@ const validateJsonDocsOutputTarget = (config, diagnostics, outputTarget) => {
|
|
|
21273
21283
|
if (isString$1(outputTarget.typesFile) && !isAbsolute$1(outputTarget.typesFile)) outputTarget.typesFile = join$2(config.rootDir, outputTarget.typesFile);
|
|
21274
21284
|
else if (outputTarget.typesFile !== null && outputTarget.file.endsWith(".json")) outputTarget.typesFile = outputTarget.file.replace(/\.json$/, ".d.ts");
|
|
21275
21285
|
outputTarget.strict = !!outputTarget.strict;
|
|
21276
|
-
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev =
|
|
21286
|
+
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev = true;
|
|
21277
21287
|
return outputTarget;
|
|
21278
21288
|
};
|
|
21279
21289
|
const validateCustomDocsOutputTarget = (config, diagnostics, outputTarget) => {
|
|
@@ -21282,7 +21292,7 @@ const validateCustomDocsOutputTarget = (config, diagnostics, outputTarget) => {
|
|
|
21282
21292
|
err.messageText = `docs-custom outputTarget missing the "generator" function`;
|
|
21283
21293
|
}
|
|
21284
21294
|
outputTarget.strict = !!outputTarget.strict;
|
|
21285
|
-
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev =
|
|
21295
|
+
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev = true;
|
|
21286
21296
|
return outputTarget;
|
|
21287
21297
|
};
|
|
21288
21298
|
const validateVScodeDocsOutputTarget = (config, diagnostics, outputTarget) => {
|
|
@@ -21290,21 +21300,21 @@ const validateVScodeDocsOutputTarget = (config, diagnostics, outputTarget) => {
|
|
|
21290
21300
|
const err = buildError(diagnostics);
|
|
21291
21301
|
err.messageText = `docs-vscode outputTarget missing the "file" path`;
|
|
21292
21302
|
}
|
|
21293
|
-
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev =
|
|
21303
|
+
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev = true;
|
|
21294
21304
|
return outputTarget;
|
|
21295
21305
|
};
|
|
21296
21306
|
const DEFAULT_AGENT_SKILL_DIR = "dist/skill";
|
|
21297
21307
|
const validateAgentSkillOutputTarget = (config, outputTarget) => {
|
|
21298
21308
|
outputTarget.dir = getAbsolutePath(config, outputTarget.dir || DEFAULT_AGENT_SKILL_DIR);
|
|
21299
21309
|
outputTarget.name = toSkillName(outputTarget.name || config.fsNamespace);
|
|
21300
|
-
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev =
|
|
21310
|
+
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev = true;
|
|
21301
21311
|
return outputTarget;
|
|
21302
21312
|
};
|
|
21303
21313
|
const validateCustomElementsManifestOutputTarget = (config, outputTarget) => {
|
|
21304
21314
|
if (!isString$1(outputTarget.file)) outputTarget.file = "custom-elements.json";
|
|
21305
21315
|
if (!isAbsolute$1(outputTarget.file)) outputTarget.file = join$2(config.rootDir, outputTarget.file);
|
|
21306
21316
|
outputTarget.strict = !!outputTarget.strict;
|
|
21307
|
-
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev =
|
|
21317
|
+
if (!isBoolean$1(outputTarget.skipInDev)) outputTarget.skipInDev = true;
|
|
21308
21318
|
return outputTarget;
|
|
21309
21319
|
};
|
|
21310
21320
|
//#endregion
|
|
@@ -26325,14 +26335,14 @@ const getTranspileCssConfig = (compileOpts, importData, results) => {
|
|
|
26325
26335
|
};
|
|
26326
26336
|
const getTranspileConfigOpt = (value, validValues, defaultValue) => {
|
|
26327
26337
|
if (value === null || value === "null") return null;
|
|
26328
|
-
value = isString$1(value) ? value.toLowerCase().trim() :
|
|
26338
|
+
value = isString$1(value) ? value.toLowerCase().trim() : void 0;
|
|
26329
26339
|
if (validValues.has(value)) return value;
|
|
26330
26340
|
return defaultValue;
|
|
26331
26341
|
};
|
|
26332
26342
|
const VALID_EXPORT = /* @__PURE__ */ new Set(["customelement", "module"]);
|
|
26333
|
-
const VALID_METADATA = /* @__PURE__ */ new Set(["compilerstatic"
|
|
26343
|
+
const VALID_METADATA = /* @__PURE__ */ new Set(["compilerstatic"]);
|
|
26334
26344
|
const VALID_MODULE = /* @__PURE__ */ new Set(["cjs", "esm"]);
|
|
26335
|
-
const VALID_PROXY = /* @__PURE__ */ new Set(["defineproperty"
|
|
26345
|
+
const VALID_PROXY = /* @__PURE__ */ new Set(["defineproperty"]);
|
|
26336
26346
|
const VALID_STYLE = /* @__PURE__ */ new Set(["static"]);
|
|
26337
26347
|
const VALID_STYLE_IMPORT_DATA = /* @__PURE__ */ new Set(["queryparams"]);
|
|
26338
26348
|
const VALID_TARGET = /* @__PURE__ */ new Set([
|
|
@@ -2101,11 +2101,6 @@ interface Config extends StencilConfig {
|
|
|
2101
2101
|
tsWatchOptions?: any;
|
|
2102
2102
|
_isValidated?: boolean;
|
|
2103
2103
|
_isTesting?: boolean;
|
|
2104
|
-
/**
|
|
2105
|
-
* Internal flag set when --docs CLI flag is used.
|
|
2106
|
-
* Forces docs output targets to build even in dev mode.
|
|
2107
|
-
*/
|
|
2108
|
-
_docsFlag?: boolean;
|
|
2109
2104
|
/**
|
|
2110
2105
|
* Whether running in a CI environment (disables interactive features, adjusts worker count)
|
|
2111
2106
|
*/
|
|
@@ -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-ZTa5XM0M.mjs";
|
|
2
2
|
//#region src/client/client-build.d.ts
|
|
3
3
|
declare const Build: UserBuildConditionals;
|
|
4
4
|
//#endregion
|
|
@@ -2141,11 +2141,6 @@ interface Config extends StencilConfig {
|
|
|
2141
2141
|
tsWatchOptions?: any;
|
|
2142
2142
|
_isValidated?: boolean;
|
|
2143
2143
|
_isTesting?: boolean;
|
|
2144
|
-
/**
|
|
2145
|
-
* Internal flag set when --docs CLI flag is used.
|
|
2146
|
-
* Forces docs output targets to build even in dev mode.
|
|
2147
|
-
*/
|
|
2148
|
-
_docsFlag?: boolean;
|
|
2149
2144
|
/**
|
|
2150
2145
|
* Whether running in a CI environment (disables interactive features, adjusts worker count)
|
|
2151
2146
|
*/
|
package/dist/signals/index.js
CHANGED
|
@@ -103,35 +103,6 @@ const BUILD = {
|
|
|
103
103
|
asyncQueue: false
|
|
104
104
|
};
|
|
105
105
|
BUILD.isDev, BUILD.isTesting;
|
|
106
|
-
const MEMBER_FLAGS = {
|
|
107
|
-
String: 1,
|
|
108
|
-
Number: 2,
|
|
109
|
-
Boolean: 4,
|
|
110
|
-
Any: 8,
|
|
111
|
-
Unknown: 16,
|
|
112
|
-
State: 32,
|
|
113
|
-
Method: 64,
|
|
114
|
-
Event: 128,
|
|
115
|
-
Element: 256,
|
|
116
|
-
ReflectAttr: 512,
|
|
117
|
-
Mutable: 1024,
|
|
118
|
-
Getter: 2048,
|
|
119
|
-
Setter: 4096,
|
|
120
|
-
Prop: 31,
|
|
121
|
-
HasAttribute: 31,
|
|
122
|
-
PropLike: 63
|
|
123
|
-
};
|
|
124
|
-
//#endregion
|
|
125
|
-
//#region src/client/client-host-ref.ts
|
|
126
|
-
/**
|
|
127
|
-
* Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
|
|
128
|
-
*
|
|
129
|
-
* @param ref the runtime ref of interest
|
|
130
|
-
* @returns the Host reference (if found) or undefined
|
|
131
|
-
*/
|
|
132
|
-
const getHostRef = (ref) => {
|
|
133
|
-
if (ref.__s_ghr) return ref.__s_ghr();
|
|
134
|
-
};
|
|
135
106
|
//#endregion
|
|
136
107
|
//#region src/client/client-log.ts
|
|
137
108
|
const STENCIL_DEV_MODE = BUILD.isTesting ? ["STENCIL:"] : ["%cstencil", "color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"];
|
|
@@ -173,13 +144,12 @@ BUILD.lazyLoad || globalThis.HTMLElement;
|
|
|
173
144
|
* @returns the `ReadonlySignal` for the prop, or `null` if not found / not signal-backed
|
|
174
145
|
*/
|
|
175
146
|
const getSignal = (elm, prop) => {
|
|
176
|
-
const
|
|
177
|
-
if (!
|
|
147
|
+
const signals = elm[STENCIL_SIGNALS_SYMBOL];
|
|
148
|
+
if (!signals) {
|
|
178
149
|
if (BUILD.isDev) consoleDevWarn(`getSignal('${prop}'): element <${elm.tagName.toLowerCase()}> is not signal-backed. Ensure signalBacking is true in stencil.config.ts.`);
|
|
179
150
|
return null;
|
|
180
151
|
}
|
|
181
|
-
|
|
182
|
-
return hostRef.$signalValues$.get(prop) ?? null;
|
|
152
|
+
return signals.get(prop) ?? null;
|
|
183
153
|
};
|
|
184
154
|
/**
|
|
185
155
|
* Marks a class method as a reactive effect. Wraps the method in `effect()` after
|
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-CShHxskG.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
|
@@ -1276,11 +1276,6 @@ interface Config extends StencilConfig {
|
|
|
1276
1276
|
tsWatchOptions?: any;
|
|
1277
1277
|
_isValidated?: boolean;
|
|
1278
1278
|
_isTesting?: boolean;
|
|
1279
|
-
/**
|
|
1280
|
-
* Internal flag set when --docs CLI flag is used.
|
|
1281
|
-
* Forces docs output targets to build even in dev mode.
|
|
1282
|
-
*/
|
|
1283
|
-
_docsFlag?: boolean;
|
|
1284
1279
|
/**
|
|
1285
1280
|
* Whether running in a CI environment (disables interactive features, adjusts worker count)
|
|
1286
1281
|
*/
|
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.22";
|
|
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.22",
|
|
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.22",
|
|
130
|
+
"@stencil/dev-server": "5.0.0-beta.22",
|
|
131
|
+
"@stencil/mock-doc": "5.0.0-beta.22"
|
|
132
132
|
},
|
|
133
133
|
"devDependencies": {
|
|
134
134
|
"@ionic/prettier-config": "^4.0.0",
|