@stencil/core 4.43.5-dev.1783490418.f6d6f8c → 4.44.0-dev.1786425893.26eaafd

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Compiler v4.43.5-dev.1783490418.f6d6f8c | MIT Licensed | https://stenciljs.com
2
+ Stencil Compiler v4.44.0-dev.1786425893.26eaafd | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;
@@ -215959,7 +215959,7 @@ var require_previous_map = __commonJS({
215959
215959
  "use strict";
215960
215960
  init_import_meta_url();
215961
215961
  var { existsSync: existsSync2, readFileSync: readFileSync2 } = require("fs");
215962
- var { dirname: dirname39, join: join3 } = require("path");
215962
+ var { dirname: dirname40, join: join3 } = require("path");
215963
215963
  var { SourceMapConsumer: SourceMapConsumer2, SourceMapGenerator: SourceMapGenerator2 } = require_source_map2();
215964
215964
  function fromBase64(str) {
215965
215965
  if (Buffer) {
@@ -215979,7 +215979,7 @@ var require_previous_map = __commonJS({
215979
215979
  if (!this.mapFile && opts.from) {
215980
215980
  this.mapFile = opts.from;
215981
215981
  }
215982
- if (this.mapFile) this.root = dirname39(this.mapFile);
215982
+ if (this.mapFile) this.root = dirname40(this.mapFile);
215983
215983
  if (text) this.text = text;
215984
215984
  }
215985
215985
  consumer() {
@@ -216027,7 +216027,7 @@ var require_previous_map = __commonJS({
216027
216027
  return void 0;
216028
216028
  }
216029
216029
  }
216030
- this.root = dirname39(path7);
216030
+ this.root = dirname40(path7);
216031
216031
  if (existsSync2(path7)) {
216032
216032
  this.mapFile = path7;
216033
216033
  return readFileSync2(path7, "utf-8").toString().trim();
@@ -216064,7 +216064,7 @@ var require_previous_map = __commonJS({
216064
216064
  return this.decodeInline(this.annotation);
216065
216065
  } else if (this.annotation) {
216066
216066
  let map2 = this.annotation;
216067
- if (file) map2 = join3(dirname39(file), map2);
216067
+ if (file) map2 = join3(dirname40(file), map2);
216068
216068
  let unknown = this.loadFile(map2, file, false);
216069
216069
  if (unknown) {
216070
216070
  try {
@@ -216522,12 +216522,12 @@ var require_map_generator = __commonJS({
216522
216522
  "node_modules/postcss/lib/map-generator.js"(exports2, module2) {
216523
216523
  "use strict";
216524
216524
  init_import_meta_url();
216525
- var { dirname: dirname39, relative: relative7, resolve: resolve10, sep: sep5 } = require("path");
216525
+ var { dirname: dirname40, relative: relative7, resolve: resolve10, sep: sep5 } = require("path");
216526
216526
  var { SourceMapConsumer: SourceMapConsumer2, SourceMapGenerator: SourceMapGenerator2 } = require_source_map2();
216527
216527
  var { pathToFileURL: pathToFileURL2 } = require("url");
216528
216528
  var Input2 = require_input();
216529
216529
  var sourceMapAvailable = Boolean(SourceMapConsumer2 && SourceMapGenerator2);
216530
- var pathAvailable = Boolean(dirname39 && resolve10 && relative7 && sep5);
216530
+ var pathAvailable = Boolean(dirname40 && resolve10 && relative7 && sep5);
216531
216531
  var MapGenerator = class {
216532
216532
  constructor(stringify4, root2, opts, cssString) {
216533
216533
  this.stringify = stringify4;
@@ -216559,7 +216559,7 @@ var require_map_generator = __commonJS({
216559
216559
  applyPrevMaps() {
216560
216560
  for (let prev of this.previous()) {
216561
216561
  let from = this.toUrl(this.path(prev.file));
216562
- let root2 = prev.root || dirname39(prev.file);
216562
+ let root2 = prev.root || dirname40(prev.file);
216563
216563
  let map2;
216564
216564
  if (this.mapOpts.sourcesContent === false) {
216565
216565
  map2 = new SourceMapConsumer2(prev.text);
@@ -216754,9 +216754,9 @@ var require_map_generator = __commonJS({
216754
216754
  if (/^\w+:\/\//.test(file)) return file;
216755
216755
  let cached = this.memoizedPaths.get(file);
216756
216756
  if (cached) return cached;
216757
- let from = this.opts.to ? dirname39(this.opts.to) : ".";
216757
+ let from = this.opts.to ? dirname40(this.opts.to) : ".";
216758
216758
  if (typeof this.mapOpts.annotation === "string") {
216759
- from = dirname39(resolve10(from, this.mapOpts.annotation));
216759
+ from = dirname40(resolve10(from, this.mapOpts.annotation));
216760
216760
  }
216761
216761
  let path7 = relative7(from, file);
216762
216762
  this.memoizedPaths.set(file, path7);
@@ -247771,7 +247771,7 @@ var import_typescript72 = __toESM(require_typescript_5_8_3_bundle_cache_min());
247771
247771
 
247772
247772
  // src/version.ts
247773
247773
  init_import_meta_url();
247774
- var buildId = "1783490418";
247774
+ var buildId = "1786425893";
247775
247775
  var minfyJsId = "terser5.37.0_7";
247776
247776
  var optimizeCssId = "autoprefixer10.4.19_postcss8.5.13_7";
247777
247777
  var parse5Version = "7.2.1";
@@ -247779,8 +247779,8 @@ var rollupVersion = "4.44.0";
247779
247779
  var jqueryVersion = "4.0.0-pre";
247780
247780
  var terserVersion = "5.37.0";
247781
247781
  var typescriptVersion = "5.8.3";
247782
- var vermoji = "\u{1F427}";
247783
- var version = "4.43.5-dev.1783490418.f6d6f8c";
247782
+ var vermoji = "\u26C4\uFE0F";
247783
+ var version = "4.44.0-dev.1786425893.26eaafd";
247784
247784
  var versions = {
247785
247785
  stencil: version,
247786
247786
  parse5: parse5Version,
@@ -251543,6 +251543,7 @@ var getModuleLegacy = (compilerCtx, sourceFilePath) => {
251543
251543
  htmlAttrNames: [],
251544
251544
  htmlTagNames: [],
251545
251545
  htmlParts: [],
251546
+ htmlSlots: [],
251546
251547
  isCollectionDependency: false,
251547
251548
  isLegacy: false,
251548
251549
  localImports: [],
@@ -252616,7 +252617,10 @@ var objectLiteralToObjectMap = (objectLiteral, typeChecker, diagnostics, errorNo
252616
252617
  };
252617
252618
  var resolveVarInObjectLiteral = (node, typeChecker, _diagnostics, _errorNode) => {
252618
252619
  if (import_typescript9.default.isIdentifier(node)) {
252619
- const symbol = typeChecker.getSymbolAtLocation(node);
252620
+ let symbol = typeChecker.getSymbolAtLocation(node);
252621
+ if (symbol && symbol.flags & import_typescript9.default.SymbolFlags.Alias) {
252622
+ symbol = typeChecker.getAliasedSymbol(symbol);
252623
+ }
252620
252624
  if (!symbol || !symbol.valueDeclaration) {
252621
252625
  throw new Error(
252622
252626
  `resolveVar() cannot resolve the value of "${node.text}" at compile time. Only const variables and object properties with string literal values are supported.`
@@ -253032,7 +253036,7 @@ function foundSuper(constructorBodyStatements) {
253032
253036
  }
253033
253037
  var updateConstructor = (classNode, classMembers, statements, parameters, includeFalseArg) => {
253034
253038
  var _a3, _b;
253035
- const constructorIndex = classMembers.findIndex((m) => m.kind === import_typescript9.default.SyntaxKind.Constructor);
253039
+ const constructorIndex = classMembers.findIndex((m) => import_typescript9.default.isConstructorDeclaration(m) && m.body != null);
253036
253040
  const constructorMethod = classMembers[constructorIndex];
253037
253041
  if (constructorIndex < 0 && !(statements == null ? void 0 : statements.length) && !needsSuper(classNode)) return classMembers;
253038
253042
  if (constructorIndex >= 0 && import_typescript9.default.isConstructorDeclaration(constructorMethod)) {
@@ -258681,6 +258685,7 @@ var setPackageVersionByContent = (pkgVersions, pkgContent) => {
258681
258685
  }
258682
258686
  };
258683
258687
  var isLocalModule = (p) => p.startsWith(".") || p.startsWith("/");
258688
+ var isNodeModulePath = (p) => normalizePath(p).split("/").includes("node_modules");
258684
258689
  var getModuleId = (orgImport) => {
258685
258690
  if (orgImport.startsWith("~")) {
258686
258691
  orgImport = orgImport.substring(1);
@@ -260327,6 +260332,7 @@ var createModule = (staticSourceFile, staticSourceFileText, emitFilepath) => ({
260327
260332
  hasVdomXlink: false,
260328
260333
  htmlAttrNames: [],
260329
260334
  htmlParts: [],
260335
+ htmlSlots: [],
260330
260336
  htmlTagNames: [],
260331
260337
  isCollectionDependency: false,
260332
260338
  isLegacy: false,
@@ -268979,6 +268985,16 @@ var MINIFY_CHAR_BREAK = /* @__PURE__ */ new Set([
268979
268985
  ]);
268980
268986
 
268981
268987
  // src/compiler/optimize/optimize-module.ts
268988
+ /**
268989
+ * Matches the comments that must survive minification. This extends Terser's default
268990
+ * `comments: 'some'` behavior (`@license`, `@preserve`, etc.) with bundler directive
268991
+ * comments — `@vite-ignore` and webpack magic comments (e.g. `webpackInclude:`,
268992
+ * `webpackMode:`) — which downstream bundlers read from inside dynamic `import()`
268993
+ * calls in the emitted output (e.g. `esm-es5`). Without this, Vite warns that the
268994
+ * runtime's dynamic import cannot be analyzed and webpack ignores the lazy-loading
268995
+ * hints entirely.
268996
+ */
268997
+ var PRESERVED_COMMENTS = /^\**!|@preserve|@license|@cc_on|@vite-ignore|webpack[A-Z][a-zA-Z]+:/i;
268982
268998
  var optimizeModule = async (config, compilerCtx, opts) => {
268983
268999
  if (!opts.minify && opts.sourceTarget !== "es5" || opts.input === "") {
268984
269000
  return {
@@ -269061,6 +269077,7 @@ var getTerserOptions = (config, sourceTarget, prettyOutput) => {
269061
269077
  if (sourceTarget === "es5") {
269062
269078
  opts.ecma = opts.format.ecma = 5;
269063
269079
  opts.compress = false;
269080
+ opts.format.comments = PRESERVED_COMMENTS;
269064
269081
  opts.mangle = {
269065
269082
  properties: getTerserManglePropertiesConfig()
269066
269083
  };
@@ -275539,7 +275556,7 @@ var getDocsComponents = async (config, compilerCtx, buildCtx) => {
275539
275556
  methods: getDocsMethods(cmp.methods),
275540
275557
  events: getDocsEvents(cmp.events),
275541
275558
  styles: getDocsStyles(cmp),
275542
- slots: getDocsSlots(cmp.docs.tags),
275559
+ slots: getDocsSlots(cmp.htmlSlots, cmp.docs.tags),
275543
275560
  parts: getDocsParts(cmp.htmlParts, cmp.docs.tags),
275544
275561
  customStates: getDocsCustomStates(cmp),
275545
275562
  listeners: getDocsListeners(cmp.listeners)
@@ -275726,9 +275743,12 @@ var getDocsDeprecationText = (tags) => {
275726
275743
  }
275727
275744
  return void 0;
275728
275745
  };
275729
- var getDocsSlots = (tags) => {
275746
+ var DEFAULT_SLOT_DOCS = "The default slot";
275747
+ var getDocsSlots = (vdom, tags) => {
275748
+ const docsSlots = getNameText("slot", tags).map(([name, docs]) => ({ name, docs }));
275749
+ const vdomSlots = vdom.map((name) => ({ name, docs: name === "" ? DEFAULT_SLOT_DOCS : "" }));
275730
275750
  return sortBy(
275731
- getNameText("slot", tags).map(([name, docs]) => ({ name, docs })),
275751
+ unique([...docsSlots, ...vdomSlots], (s) => s.name),
275732
275752
  (a) => a.name
275733
275753
  );
275734
275754
  };
@@ -277476,6 +277496,7 @@ var updateImportReferenceFactory = (typeCounts, filePath, config) => {
277476
277496
  };
277477
277497
 
277478
277498
  // src/compiler/types/generate-app-types.ts
277499
+ var MAX_ONE_OF_REQUIRED_PROPS = 8;
277479
277500
  var generateAppTypes = async (config, compilerCtx, buildCtx, destination) => {
277480
277501
  const timespan = buildCtx.createTimeSpan(`generated app types started`, true);
277481
277502
  const areTypesInternal = destination === "src";
@@ -277568,10 +277589,12 @@ var generateComponentTypesFile = (config, buildCtx, areTypesInternal) => {
277568
277589
  c.push(` }`);
277569
277590
  c.push(`}`);
277570
277591
  c.push(`declare namespace LocalJSX {`);
277571
- const hasAnyRequiredProps = modules.some((m) => m.requiredProps);
277592
+ const hasAnyRequiredProps = modules.some(
277593
+ (m) => m.requiredProps && m.requiredProps.length > 0 && m.requiredProps.length <= MAX_ONE_OF_REQUIRED_PROPS
277594
+ );
277572
277595
  if (hasAnyRequiredProps) {
277573
277596
  c.push(
277574
- ` type OneOf<K extends string, PropT, AttrT = PropT> = { [P in K]: PropT } & { [P in \`attr:\${K}\` | \`prop:\${K}\`]?: never } | { [P in \`attr:\${K}\`]: AttrT } & { [P in K | \`prop:\${K}\`]?: never } | { [P in \`prop:\${K}\`]: PropT } & { [P in K | \`attr:\${K}\`]?: never };`
277597
+ ` type OneOf<K extends string, PropT, AttrT = PropT> = { [P in K]: PropT } & { [P in \`attr:\${K}\`]?: never } | { [P in \`attr:\${K}\`]: AttrT } & { [P in K]?: never };`
277575
277598
  );
277576
277599
  c.push(``);
277577
277600
  }
@@ -277592,7 +277615,7 @@ var generateComponentTypesFile = (config, buildCtx, areTypesInternal) => {
277592
277615
  ...modules.map((m) => {
277593
277616
  if (m.explicitAttributes) {
277594
277617
  const baseOptional = `Omit<${m.tagNameAsPascal}, keyof ${m.tagNameAsPascal}Attributes> & { [K in keyof ${m.tagNameAsPascal} & keyof ${m.tagNameAsPascal}Attributes]?: ${m.tagNameAsPascal}[K] } & { [K in keyof ${m.tagNameAsPascal} & keyof ${m.tagNameAsPascal}Attributes as \`attr:\${K}\`]?: ${m.tagNameAsPascal}Attributes[K] } & { [K in keyof ${m.tagNameAsPascal} & keyof ${m.tagNameAsPascal}Attributes as \`prop:\${K}\`]?: ${m.tagNameAsPascal}[K] }`;
277595
- if (m.requiredProps && m.requiredProps.length > 0) {
277618
+ if (m.requiredProps && m.requiredProps.length > 0 && m.requiredProps.length <= MAX_ONE_OF_REQUIRED_PROPS) {
277596
277619
  const requiredUnions = m.requiredProps.map((prop) => {
277597
277620
  return `OneOf<"${prop.name}", ${m.tagNameAsPascal}["${prop.name}"], ${m.tagNameAsPascal}Attributes["${prop.name}"]>`;
277598
277621
  }).join(" & ");
@@ -278485,7 +278508,7 @@ var hasChangedImportContent = async (config, compilerCtx, buildCtx, filePath, co
278485
278508
 
278486
278509
  // src/compiler/transpile/run-program.ts
278487
278510
  init_import_meta_url();
278488
- var import_path53 = require("path");
278511
+ var import_path54 = require("path");
278489
278512
 
278490
278513
  // src/compiler/entries/resolve-component-dependencies.ts
278491
278514
  init_import_meta_url();
@@ -278690,7 +278713,10 @@ var getDecoratorParameter = (arg, typeChecker, diagnostics, errorNode) => {
278690
278713
  };
278691
278714
  var resolveVariableValue = (node, typeChecker, diagnostics, errorNode) => {
278692
278715
  if (import_typescript43.default.isIdentifier(node)) {
278693
- const symbol = typeChecker.getSymbolAtLocation(node);
278716
+ let symbol = typeChecker.getSymbolAtLocation(node);
278717
+ if (symbol && symbol.flags & import_typescript43.default.SymbolFlags.Alias) {
278718
+ symbol = typeChecker.getAliasedSymbol(symbol);
278719
+ }
278694
278720
  if (!symbol || !symbol.valueDeclaration) {
278695
278721
  const err4 = buildError(diagnostics);
278696
278722
  err4.messageText = `resolveVar() cannot resolve the value of "${node.text}" at compile time. Only const variables and object properties with string literal values are supported.`;
@@ -280536,7 +280562,7 @@ var filterDecorators = (decorators, excludeList) => {
280536
280562
 
280537
280563
  // src/compiler/transformers/static-to-meta/parse-static.ts
280538
280564
  init_import_meta_url();
280539
- var import_path52 = require("path");
280565
+ var import_path53 = require("path");
280540
280566
  var import_typescript65 = __toESM(require_typescript_5_8_3_bundle_cache_min());
280541
280567
 
280542
280568
  // src/compiler/transformers/static-to-meta/call-expression.ts
@@ -280546,9 +280572,22 @@ var import_typescript58 = __toESM(require_typescript_5_8_3_bundle_cache_min());
280546
280572
  // src/compiler/transformers/static-to-meta/vdom.ts
280547
280573
  init_import_meta_url();
280548
280574
  var import_typescript57 = __toESM(require_typescript_5_8_3_bundle_cache_min());
280549
- var gatherVdomMeta = (m, args) => {
280575
+ var resolveStaticStringValue = (expr, typeChecker) => {
280576
+ if (import_typescript57.default.isStringLiteralLike(expr)) {
280577
+ return expr.text;
280578
+ }
280579
+ if (typeChecker) {
280580
+ const type = typeChecker.getTypeAtLocation(expr);
280581
+ if (type.isStringLiteral()) {
280582
+ return type.value;
280583
+ }
280584
+ }
280585
+ return void 0;
280586
+ };
280587
+ var gatherVdomMeta = (m, args, typeChecker) => {
280550
280588
  m.hasVdomRender = true;
280551
280589
  const hTag = args[0];
280590
+ const isSlotTag = import_typescript57.default.isStringLiteral(hTag) && hTag.text === "slot";
280552
280591
  if (!import_typescript57.default.isStringLiteral(hTag) && (!import_typescript57.default.isIdentifier(hTag) || hTag.text !== "Host")) {
280553
280592
  m.hasVdomFunctional = true;
280554
280593
  }
@@ -280564,6 +280603,8 @@ var gatherVdomMeta = (m, args) => {
280564
280603
  m.hasVdomStyle = true;
280565
280604
  m.hasVdomXlink = true;
280566
280605
  } else if (import_typescript57.default.isObjectLiteralExpression(objectLiteral)) {
280606
+ let slotName;
280607
+ let hasDynamicSlotName = false;
280567
280608
  objectLiteral.properties.forEach((prop) => {
280568
280609
  m.hasVdomAttribute = true;
280569
280610
  if (import_typescript57.default.isSpreadAssignment(prop) || import_typescript57.default.isComputedPropertyName(prop.name)) {
@@ -280574,6 +280615,7 @@ var gatherVdomMeta = (m, args) => {
280574
280615
  m.hasVdomRef = true;
280575
280616
  m.hasVdomStyle = true;
280576
280617
  m.hasVdomXlink = true;
280618
+ hasDynamicSlotName = isSlotTag || hasDynamicSlotName;
280577
280619
  } else if (prop.name && prop.name.text && prop.name.text.length > 0) {
280578
280620
  const attrName = prop.name.text;
280579
280621
  if (attrName === "key") {
@@ -280593,15 +280635,31 @@ var gatherVdomMeta = (m, args) => {
280593
280635
  m.hasVdomPropOrAttr = true;
280594
280636
  }
280595
280637
  import_typescript57.default.SyntaxKind.StringLiteral;
280596
- if (attrName === "part" && import_typescript57.default.isPropertyAssignment(prop) && import_typescript57.default.isStringLiteral(prop.initializer)) {
280597
- m.htmlParts.push(
280598
- ...prop.initializer.text.toLowerCase().split(" ").filter((part) => part.length > 0)
280599
- );
280638
+ if (attrName === "part" && import_typescript57.default.isPropertyAssignment(prop)) {
280639
+ const partValue = resolveStaticStringValue(prop.initializer, typeChecker);
280640
+ if (partValue !== void 0) {
280641
+ m.htmlParts.push(...partValue.split(" ").filter((part) => part.length > 0));
280642
+ }
280643
+ }
280644
+ if (isSlotTag && attrName === "name" && import_typescript57.default.isPropertyAssignment(prop)) {
280645
+ const resolvedSlotName = resolveStaticStringValue(prop.initializer, typeChecker);
280646
+ if (resolvedSlotName !== void 0) {
280647
+ slotName = resolvedSlotName;
280648
+ } else {
280649
+ hasDynamicSlotName = true;
280650
+ }
280600
280651
  }
280601
280652
  m.htmlAttrNames.push(attrName);
280602
280653
  }
280603
280654
  });
280655
+ if (isSlotTag && !hasDynamicSlotName) {
280656
+ m.htmlSlots.push(slotName != null ? slotName : "");
280657
+ }
280658
+ } else if (isSlotTag) {
280659
+ m.htmlSlots.push("");
280604
280660
  }
280661
+ } else if (isSlotTag) {
280662
+ m.htmlSlots.push("");
280605
280663
  }
280606
280664
  if (!m.hasVdomText) {
280607
280665
  for (let i = 2; i < args.length; i++) {
@@ -280649,11 +280707,11 @@ var visitCallExpressionArgs = (m, callExpressionName, args, typeChecker) => {
280649
280707
  if (fnName === "h" || fnName === H2 || fnName === "createElement") {
280650
280708
  visitCallExpressionArg(m, args[0], typeChecker);
280651
280709
  if (fnName === "h" || fnName === H2) {
280652
- gatherVdomMeta(m, args);
280710
+ gatherVdomMeta(m, args, typeChecker);
280653
280711
  }
280654
280712
  } else if (fnName === "jsx" || fnName === "jsxs" || fnName === "jsxDEV" || fnName === "_jsx" || fnName === "_jsxs" || fnName === "_jsxDEV") {
280655
280713
  visitCallExpressionArg(m, args[0], typeChecker);
280656
- gatherVdomMeta(m, args);
280714
+ gatherVdomMeta(m, args, typeChecker);
280657
280715
  if (args.length > 2 && args[2]) {
280658
280716
  m.hasVdomKey = true;
280659
280717
  }
@@ -280706,7 +280764,7 @@ var resolveFunctionalComponentDep = (m, identifier3, typeChecker) => {
280706
280764
 
280707
280765
  // src/compiler/transformers/static-to-meta/component.ts
280708
280766
  init_import_meta_url();
280709
- var import_path48 = require("path");
280767
+ var import_path49 = require("path");
280710
280768
  var import_typescript62 = __toESM(require_typescript_5_8_3_bundle_cache_min());
280711
280769
 
280712
280770
  // src/compiler/transformers/add-component-meta-static.ts
@@ -281030,6 +281088,7 @@ var parseStyleIdentifier = (parsedStyle, modeName) => {
281030
281088
 
281031
281089
  // src/compiler/transformers/static-to-meta/class-extension.ts
281032
281090
  init_import_meta_url();
281091
+ var import_path48 = require("path");
281033
281092
  var import_typescript61 = __toESM(require_typescript_5_8_3_bundle_cache_min());
281034
281093
 
281035
281094
  // src/compiler/transformers/static-to-meta/events.ts
@@ -281123,6 +281182,21 @@ var parseStaticProps = (staticMembers) => {
281123
281182
  });
281124
281183
  };
281125
281184
 
281185
+ // src/compiler/transformers/static-to-meta/serializers.ts
281186
+ init_import_meta_url();
281187
+ var parseStaticSerializers = (staticMembers, translateType) => {
281188
+ const parsedSerializers = getStaticValue(staticMembers, translateType);
281189
+ if (!parsedSerializers || parsedSerializers.length === 0) {
281190
+ return [];
281191
+ }
281192
+ return parsedSerializers.map((parsedSerial) => {
281193
+ return {
281194
+ propName: parsedSerial.propName,
281195
+ methodName: parsedSerial.methodName
281196
+ };
281197
+ });
281198
+ };
281199
+
281126
281200
  // src/compiler/transformers/static-to-meta/states.ts
281127
281201
  init_import_meta_url();
281128
281202
  var parseStaticStates = (staticMembers) => {
@@ -281157,21 +281231,6 @@ var parseStaticWatchers = (staticMembers) => {
281157
281231
  });
281158
281232
  };
281159
281233
 
281160
- // src/compiler/transformers/static-to-meta/serializers.ts
281161
- init_import_meta_url();
281162
- var parseStaticSerializers = (staticMembers, translateType) => {
281163
- const parsedSerializers = getStaticValue(staticMembers, translateType);
281164
- if (!parsedSerializers || parsedSerializers.length === 0) {
281165
- return [];
281166
- }
281167
- return parsedSerializers.map((parsedSerial) => {
281168
- return {
281169
- propName: parsedSerial.propName,
281170
- methodName: parsedSerial.methodName
281171
- };
281172
- });
281173
- };
281174
-
281175
281234
  // src/compiler/transformers/static-to-meta/class-extension.ts
281176
281235
  var deDupeMembers = (dedupeMembers, staticMembers) => {
281177
281236
  return dedupeMembers.filter(
@@ -281405,6 +281464,35 @@ function buildExtendsTree(compilerCtx, classDeclaration3, dependentClasses, type
281405
281464
  });
281406
281465
  return dependentClasses;
281407
281466
  }
281467
+ var ensureRelativeSpecifier = (specifier) => {
281468
+ return specifier.startsWith(".") ? specifier : `./${specifier}`;
281469
+ };
281470
+ var reanchorInheritedTypeReferences = (members, extendedClassFileName, cmpSourceFilePath) => {
281471
+ const extendedClassDir = (0, import_path48.dirname)(normalizePath(extendedClassFileName, false));
281472
+ const cmpDir = (0, import_path48.dirname)(normalizePath(cmpSourceFilePath, false));
281473
+ if (extendedClassDir === cmpDir || isNodeModulePath(extendedClassFileName)) {
281474
+ return members;
281475
+ }
281476
+ members.forEach((member2) => {
281477
+ var _a3;
281478
+ const references = (_a3 = member2.complexType) == null ? void 0 : _a3.references;
281479
+ if (!references) {
281480
+ return;
281481
+ }
281482
+ Object.values(references).forEach((reference) => {
281483
+ var _a4;
281484
+ if (reference.location === "import" && ((_a4 = reference.path) == null ? void 0 : _a4.startsWith("."))) {
281485
+ const typeModulePath = join(extendedClassDir, reference.path);
281486
+ reference.path = ensureRelativeSpecifier(relative(cmpDir, typeModulePath));
281487
+ } else if (reference.location === "local") {
281488
+ const extendedClassModule = normalizePath(extendedClassFileName, false).replace(/\.(tsx|ts)$/, "");
281489
+ reference.location = "import";
281490
+ reference.path = ensureRelativeSpecifier(relative(cmpDir, extendedClassModule));
281491
+ }
281492
+ });
281493
+ });
281494
+ return members;
281495
+ };
281408
281496
  function mergeExtendedClassMeta(compilerCtx, typeChecker, buildCtx, cmpNode, staticMembers, moduleFile) {
281409
281497
  const tree = buildExtendsTree(compilerCtx, cmpNode, [], typeChecker, buildCtx, moduleFile);
281410
281498
  let hasMixin = false;
@@ -281421,10 +281509,22 @@ function mergeExtendedClassMeta(compilerCtx, typeChecker, buildCtx, cmpNode, sta
281421
281509
  tree.forEach((extendedClass) => {
281422
281510
  var _a3, _b, _c, _d, _e, _f, _g, _h, _i, _j;
281423
281511
  const extendedStaticMembers = extendedClass.classNode.members.filter(isStaticGetter);
281424
- const mixinProps = (_a3 = parseStaticProps(extendedStaticMembers)) != null ? _a3 : [];
281512
+ const mixinProps = reanchorInheritedTypeReferences(
281513
+ (_a3 = parseStaticProps(extendedStaticMembers)) != null ? _a3 : [],
281514
+ extendedClass.fileName,
281515
+ moduleFile.sourceFilePath
281516
+ );
281425
281517
  const mixinStates = (_b = parseStaticStates(extendedStaticMembers)) != null ? _b : [];
281426
- const mixinMethods = (_c = parseStaticMethods(extendedStaticMembers)) != null ? _c : [];
281427
- const mixinEvents = (_d = parseStaticEvents(extendedStaticMembers)) != null ? _d : [];
281518
+ const mixinMethods = reanchorInheritedTypeReferences(
281519
+ (_c = parseStaticMethods(extendedStaticMembers)) != null ? _c : [],
281520
+ extendedClass.fileName,
281521
+ moduleFile.sourceFilePath
281522
+ );
281523
+ const mixinEvents = reanchorInheritedTypeReferences(
281524
+ (_d = parseStaticEvents(extendedStaticMembers)) != null ? _d : [],
281525
+ extendedClass.fileName,
281526
+ moduleFile.sourceFilePath
281527
+ );
281428
281528
  const isMixin = mixinProps.length > 0 || mixinStates.length > 0 || mixinMethods.length > 0 || mixinEvents.length > 0;
281429
281529
  const module2 = compilerCtx.moduleMap.get(extendedClass.fileName);
281430
281530
  if (!module2) return;
@@ -281585,6 +281685,7 @@ var parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile, b
281585
281685
  htmlAttrNames: [],
281586
281686
  htmlTagNames: [],
281587
281687
  htmlParts: [],
281688
+ htmlSlots: [],
281588
281689
  isUpdateable: false,
281589
281690
  potentialCmpRefs: [],
281590
281691
  dependents: [],
@@ -281606,6 +281707,7 @@ var parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile, b
281606
281707
  cmp.hasModernPropertyDecls = detectModernPropDeclarations(cmpNode) || doesExtend;
281607
281708
  cmp.htmlAttrNames = unique(cmp.htmlAttrNames);
281608
281709
  cmp.htmlTagNames = unique(cmp.htmlTagNames);
281710
+ cmp.htmlSlots = unique(cmp.htmlSlots);
281609
281711
  cmp.hasSlot = cmp.hasSlot || cmp.htmlTagNames.includes("slot");
281610
281712
  cmp.potentialCmpRefs = unique(cmp.potentialCmpRefs);
281611
281713
  setComponentBuildConditionals(cmp);
@@ -281659,12 +281761,12 @@ var parseVirtualProp = (tag) => {
281659
281761
  };
281660
281762
  var parseAssetsDirs = (staticMembers, componentFilePath) => {
281661
281763
  const dirs = getStaticValue(staticMembers, "assetsDirs") || [];
281662
- const componentDir = normalizePath((0, import_path48.dirname)(componentFilePath));
281764
+ const componentDir = normalizePath((0, import_path49.dirname)(componentFilePath));
281663
281765
  return dirs.map((dir) => {
281664
281766
  dir = normalizePath(dir.trim());
281665
281767
  let absolutePath = dir;
281666
281768
  let cmpRelativePath = dir;
281667
- if ((0, import_path48.isAbsolute)(dir)) {
281769
+ if ((0, import_path49.isAbsolute)(dir)) {
281668
281770
  cmpRelativePath = relative(componentDir, dir);
281669
281771
  } else {
281670
281772
  absolutePath = join(componentDir, dir);
@@ -281679,16 +281781,16 @@ var parseAssetsDirs = (staticMembers, componentFilePath) => {
281679
281781
 
281680
281782
  // src/compiler/transformers/static-to-meta/import.ts
281681
281783
  init_import_meta_url();
281682
- var import_path51 = require("path");
281784
+ var import_path52 = require("path");
281683
281785
  var import_typescript64 = __toESM(require_typescript_5_8_3_bundle_cache_min());
281684
281786
 
281685
281787
  // src/compiler/transformers/collections/add-external-import.ts
281686
281788
  init_import_meta_url();
281687
- var import_path50 = require("path");
281789
+ var import_path51 = require("path");
281688
281790
 
281689
281791
  // src/compiler/transformers/collections/parse-collection-module.ts
281690
281792
  init_import_meta_url();
281691
- var import_path49 = require("path");
281793
+ var import_path50 = require("path");
281692
281794
 
281693
281795
  // src/compiler/transformers/collections/parse-collection-manifest.ts
281694
281796
  init_import_meta_url();
@@ -281769,7 +281871,7 @@ var parseCollection = (config, compilerCtx, buildCtx, moduleId, pkgJsonFilePath,
281769
281871
  if (collection != null) {
281770
281872
  return collection;
281771
281873
  }
281772
- const collectionPackageRootDir = (0, import_path49.dirname)(pkgJsonFilePath);
281874
+ const collectionPackageRootDir = (0, import_path50.dirname)(pkgJsonFilePath);
281773
281875
  const collectionFilePath = join(collectionPackageRootDir, pkgData.collection);
281774
281876
  const relPath = relative(config.rootDir, collectionFilePath);
281775
281877
  config.logger.debug(`load collection: ${collectionName}, ${relPath}`);
@@ -281777,7 +281879,7 @@ var parseCollection = (config, compilerCtx, buildCtx, moduleId, pkgJsonFilePath,
281777
281879
  if (!collectionJsonStr) {
281778
281880
  return null;
281779
281881
  }
281780
- const collectionDir = normalizePath((0, import_path49.dirname)(collectionFilePath));
281882
+ const collectionDir = normalizePath((0, import_path50.dirname)(collectionFilePath));
281781
281883
  collection = parseCollectionManifest(config, compilerCtx, buildCtx, collectionName, collectionDir, collectionJsonStr);
281782
281884
  collection.moduleId = moduleId;
281783
281885
  if (pkgData.module && pkgData.module !== pkgData.main) {
@@ -281844,7 +281946,7 @@ var addExternalImport = (config, compilerCtx, buildCtx, moduleFile, containingFi
281844
281946
  buildCtx.collections.push(collection);
281845
281947
  if (Array.isArray(collection.dependencies)) {
281846
281948
  collection.dependencies.forEach((dependencyModuleId) => {
281847
- const resolveFromDir = (0, import_path50.dirname)(pkgJsonFilePath);
281949
+ const resolveFromDir = (0, import_path51.dirname)(pkgJsonFilePath);
281848
281950
  addExternalImport(
281849
281951
  config,
281850
281952
  compilerCtx,
@@ -281865,7 +281967,7 @@ var parseModuleImport = (config, compilerCtx, buildCtx, moduleFile, dirPath, imp
281865
281967
  if (!moduleFile.originalImports.includes(importPath)) {
281866
281968
  moduleFile.originalImports.push(importPath);
281867
281969
  }
281868
- if ((0, import_path51.isAbsolute)(importPath)) {
281970
+ if ((0, import_path52.isAbsolute)(importPath)) {
281869
281971
  importPath = normalizePath(importPath);
281870
281972
  moduleFile.localImports.push(importPath);
281871
281973
  } else if (importPath.startsWith(".")) {
@@ -281914,8 +282016,8 @@ var updateModule = (config, compilerCtx, buildCtx, tsSourceFile, sourceFileText,
281914
282016
  if (prevModuleFile && prevModuleFile.staticSourceFileText === sourceFileText) {
281915
282017
  return prevModuleFile;
281916
282018
  }
281917
- const srcDirPath = (0, import_path52.dirname)(sourceFilePath);
281918
- const emitFileName = (0, import_path52.basename)(emitFilePath);
282019
+ const srcDirPath = (0, import_path53.dirname)(sourceFilePath);
282020
+ const emitFileName = (0, import_path53.basename)(emitFilePath);
281919
282021
  emitFilePath = normalizePath(join(srcDirPath, emitFileName));
281920
282022
  const moduleFile = createModule(tsSourceFile, sourceFileText, emitFilePath);
281921
282023
  if (prevModuleFile == null ? void 0 : prevModuleFile.cmps) moduleFile.cmps = prevModuleFile.cmps;
@@ -282140,7 +282242,7 @@ var getRelativeDts = (config, srcPath, emitDtsPath) => {
282140
282242
  if (normalizePath(config.srcDir) === srcPath) {
282141
282243
  break;
282142
282244
  }
282143
- const b = (0, import_path53.basename)(emitDtsPath);
282245
+ const b = (0, import_path54.basename)(emitDtsPath);
282144
282246
  parts.push(b);
282145
282247
  emitDtsPath = normalizePath(join(emitDtsPath, ".."));
282146
282248
  srcPath = normalizePath(join(normalizePath(srcPath), ".."));
@@ -282156,7 +282258,7 @@ init_import_meta_url();
282156
282258
 
282157
282259
  // src/compiler/build/build-hmr.ts
282158
282260
  init_import_meta_url();
282159
- var import_path54 = require("path");
282261
+ var import_path55 = require("path");
282160
282262
  var generateHmr = (config, compilerCtx, buildCtx) => {
282161
282263
  var _a3;
282162
282264
  if (((_a3 = config.devServer) == null ? void 0 : _a3.reloadStrategy) == null) {
@@ -282289,7 +282391,7 @@ var getExternalStylesUpdated = (buildCtx, outputTargetsWww) => {
282289
282391
  if (cssFiles.length === 0) {
282290
282392
  return null;
282291
282393
  }
282292
- return cssFiles.map((cssFile) => (0, import_path54.basename)(cssFile)).sort();
282394
+ return cssFiles.map((cssFile) => (0, import_path55.basename)(cssFile)).sort();
282293
282395
  };
282294
282396
  var getImagesUpdated = (buildCtx, outputTargetsWww) => {
282295
282397
  if (outputTargetsWww.length === 0) {
@@ -282297,7 +282399,7 @@ var getImagesUpdated = (buildCtx, outputTargetsWww) => {
282297
282399
  }
282298
282400
  const imageFiles = buildCtx.filesChanged.reduce((arr, filePath) => {
282299
282401
  if (IMAGE_EXT.some((ext2) => filePath.toLowerCase().endsWith(ext2))) {
282300
- const fileName = (0, import_path54.basename)(filePath);
282402
+ const fileName = (0, import_path55.basename)(filePath);
282301
282403
  if (!arr.includes(fileName)) {
282302
282404
  arr.push(fileName);
282303
282405
  }
@@ -282324,7 +282426,7 @@ var excludeHmrFiles = (config, excludeHmr, filesChanged2) => {
282324
282426
  }
282325
282427
  if (shouldExclude) {
282326
282428
  config.logger.debug(`excludeHmr: ${fileChanged}`);
282327
- excludeFiles.push((0, import_path54.basename)(fileChanged));
282429
+ excludeFiles.push((0, import_path55.basename)(fileChanged));
282328
282430
  }
282329
282431
  return shouldExclude;
282330
282432
  }).some((r) => r);
@@ -282653,7 +282755,7 @@ init_import_meta_url();
282653
282755
 
282654
282756
  // src/compiler/html/validate-manifest-json.ts
282655
282757
  init_import_meta_url();
282656
- var import_path55 = require("path");
282758
+ var import_path56 = require("path");
282657
282759
  var validateManifestJson = (config, compilerCtx, buildCtx) => {
282658
282760
  if (config.devMode) {
282659
282761
  return null;
@@ -282698,7 +282800,7 @@ var validateManifestJsonIcon = async (compilerCtx, buildCtx, manifestFilePath, m
282698
282800
  if (iconSrc.startsWith("/")) {
282699
282801
  iconSrc = iconSrc.slice(1);
282700
282802
  }
282701
- const manifestDir = (0, import_path55.dirname)(manifestFilePath);
282803
+ const manifestDir = (0, import_path56.dirname)(manifestFilePath);
282702
282804
  const iconPath = join(manifestDir, iconSrc);
282703
282805
  const hasAccess = await compilerCtx.fs.access(iconPath);
282704
282806
  if (!hasAccess) {
@@ -282709,7 +282811,7 @@ var validateManifestJsonIcon = async (compilerCtx, buildCtx, manifestFilePath, m
282709
282811
 
282710
282812
  // src/compiler/types/validate-build-package-json.ts
282711
282813
  init_import_meta_url();
282712
- var import_path56 = require("path");
282814
+ var import_path57 = require("path");
282713
282815
 
282714
282816
  // src/compiler/types/package-json-log-utils.ts
282715
282817
  init_import_meta_url();
@@ -282885,7 +282987,7 @@ var validatePackageFiles = async (config, compilerCtx, buildCtx, outputTarget) =
282885
282987
  await Promise.all(
282886
282988
  buildCtx.packageJson.files.map(async (pkgFile) => {
282887
282989
  if (!isGlob(pkgFile)) {
282888
- const packageJsonDir = (0, import_path56.dirname)(config.packageJsonFilePath);
282990
+ const packageJsonDir = (0, import_path57.dirname)(config.packageJsonFilePath);
282889
282991
  const absPath = join(packageJsonDir, pkgFile);
282890
282992
  const hasAccess = await compilerCtx.fs.access(absPath);
282891
282993
  if (!hasAccess) {
@@ -283097,11 +283199,11 @@ var createFullBuild = async (config, compilerCtx) => {
283097
283199
 
283098
283200
  // src/compiler/build/watch-build.ts
283099
283201
  init_import_meta_url();
283100
- var import_path59 = require("path");
283202
+ var import_path60 = require("path");
283101
283203
 
283102
283204
  // src/compiler/bundle/dev-module.ts
283103
283205
  init_import_meta_url();
283104
- var import_path57 = require("path");
283206
+ var import_path58 = require("path");
283105
283207
  var compilerRequest = async (config, compilerCtx, data) => {
283106
283208
  const results = {
283107
283209
  path: data.path,
@@ -283207,7 +283309,7 @@ var bundleDevModule = async (config, compilerCtx, parsedUrl, results) => {
283207
283309
  var useDevModuleCache = async (config, p) => {
283208
283310
  if (config.enableCache) {
283209
283311
  for (let i = 0; i < 10; i++) {
283210
- const n3 = (0, import_path57.basename)(p);
283312
+ const n3 = (0, import_path58.basename)(p);
283211
283313
  if (n3 === "node_modules") {
283212
283314
  return true;
283213
283315
  }
@@ -283215,7 +283317,7 @@ var useDevModuleCache = async (config, p) => {
283215
283317
  if (isSymbolicLink) {
283216
283318
  return false;
283217
283319
  }
283218
- p = (0, import_path57.dirname)(p);
283320
+ p = (0, import_path58.dirname)(p);
283219
283321
  }
283220
283322
  }
283221
283323
  return false;
@@ -283236,7 +283338,7 @@ var parseDevModuleUrl = (config, u) => {
283236
283338
  };
283237
283339
  if (u && u.includes(DEV_MODULE_DIR) && u.endsWith(".js")) {
283238
283340
  const url = new URL(u, "https://stenciljs.com");
283239
- let reqPath = (0, import_path57.basename)(url.pathname);
283341
+ let reqPath = (0, import_path58.basename)(url.pathname);
283240
283342
  reqPath = reqPath.substring(0, reqPath.length - 3);
283241
283343
  const splt = reqPath.split("@");
283242
283344
  if (splt.length === 2) {
@@ -283260,11 +283362,11 @@ var getDevModuleCachePath = (config, parsedUrl) => {
283260
283362
 
283261
283363
  // src/compiler/fs-watch/fs-watch-rebuild.ts
283262
283364
  init_import_meta_url();
283263
- var import_path58 = require("path");
283365
+ var import_path59 = require("path");
283264
283366
  var filesChanged = (buildCtx) => {
283265
283367
  return unique([...buildCtx.filesUpdated, ...buildCtx.filesAdded, ...buildCtx.filesDeleted]).sort();
283266
283368
  };
283267
- var unaryBasename = (filePath) => (0, import_path58.basename)(filePath);
283369
+ var unaryBasename = (filePath) => (0, import_path59.basename)(filePath);
283268
283370
  var getExt = (filePath) => {
283269
283371
  const fileParts = filePath.split(".");
283270
283372
  return fileParts.length > 1 ? fileParts.pop().toLowerCase() : null;
@@ -283595,7 +283697,7 @@ var updateCompilerCtxCache = (config, compilerCtx, path7, kind) => {
283595
283697
  } else if (kind === "dirDelete") {
283596
283698
  const fsRootDir = resolve("/");
283597
283699
  compilerCtx.moduleMap.forEach((_, moduleFilePath) => {
283598
- let moduleAncestorDir = (0, import_path59.dirname)(moduleFilePath);
283700
+ let moduleAncestorDir = (0, import_path60.dirname)(moduleFilePath);
283599
283701
  for (let i = 0; i < 50; i++) {
283600
283702
  if (moduleAncestorDir === config.rootDir || moduleAncestorDir === fsRootDir) {
283601
283703
  break;
@@ -283606,7 +283708,7 @@ var updateCompilerCtxCache = (config, compilerCtx, path7, kind) => {
283606
283708
  compilerCtx.changedFiles.add(moduleFilePath);
283607
283709
  break;
283608
283710
  }
283609
- moduleAncestorDir = (0, import_path59.dirname)(moduleAncestorDir);
283711
+ moduleAncestorDir = (0, import_path60.dirname)(moduleAncestorDir);
283610
283712
  }
283611
283713
  });
283612
283714
  }
@@ -283795,7 +283897,7 @@ var getConfig = (userConfig) => {
283795
283897
 
283796
283898
  // src/compiler/sys/in-memory-fs.ts
283797
283899
  init_import_meta_url();
283798
- var import_path60 = require("path");
283900
+ var import_path61 = require("path");
283799
283901
  var createInMemoryFs = (sys) => {
283800
283902
  const items = /* @__PURE__ */ new Map();
283801
283903
  const outputTargetTypes = /* @__PURE__ */ new Map();
@@ -283920,7 +284022,7 @@ var createInMemoryFs = (sys) => {
283920
284022
  const shouldExcludeFromReaddir = (opts, item) => {
283921
284023
  if (item.isDirectory) {
283922
284024
  if (Array.isArray(opts.excludeDirNames)) {
283923
- const base2 = (0, import_path60.basename)(item.absPath);
284025
+ const base2 = (0, import_path61.basename)(item.absPath);
283924
284026
  if (opts.excludeDirNames.some((dir) => base2 === dir)) {
283925
284027
  return true;
283926
284028
  }
@@ -284168,12 +284270,12 @@ var createInMemoryFs = (sys) => {
284168
284270
  };
284169
284271
  const ensureDir = async (path7, inMemoryOnly) => {
284170
284272
  if (!inMemoryOnly) {
284171
- await sys.createDir((0, import_path60.dirname)(path7), { recursive: true });
284273
+ await sys.createDir((0, import_path61.dirname)(path7), { recursive: true });
284172
284274
  return;
284173
284275
  }
284174
284276
  const allDirs = [];
284175
284277
  while (true) {
284176
- path7 = (0, import_path60.dirname)(path7);
284278
+ path7 = (0, import_path61.dirname)(path7);
284177
284279
  if (typeof path7 === "string" && path7.length > 0 && path7 !== "/" && path7.endsWith(":/") === false && path7.endsWith(":\\") === false) {
284178
284280
  allDirs.push(path7);
284179
284281
  } else {
@@ -284372,7 +284474,7 @@ var getCommitInstructions = (items) => {
284372
284474
  if (item.queueWriteToDisk === true) {
284373
284475
  if (item.isFile === true) {
284374
284476
  instructions.filesToWrite.push(itemPath);
284375
- const dir = normalizePath((0, import_path60.dirname)(itemPath));
284477
+ const dir = normalizePath((0, import_path61.dirname)(itemPath));
284376
284478
  if (!instructions.dirsToEnsure.includes(dir)) {
284377
284479
  instructions.dirsToEnsure.push(dir);
284378
284480
  }
@@ -284403,7 +284505,7 @@ var getCommitInstructions = (items) => {
284403
284505
  const src = itemPath;
284404
284506
  const dest = item.queueCopyFileToDest;
284405
284507
  instructions.filesToCopy.push([src, dest]);
284406
- const dir = normalizePath((0, import_path60.dirname)(dest));
284508
+ const dir = normalizePath((0, import_path61.dirname)(dest));
284407
284509
  if (!instructions.dirsToEnsure.includes(dir)) {
284408
284510
  instructions.dirsToEnsure.push(dir);
284409
284511
  }
@@ -285400,7 +285502,7 @@ var optimizeCss2 = async (inputOpts) => {
285400
285502
 
285401
285503
  // src/compiler/prerender/prerender-worker.ts
285402
285504
  init_import_meta_url();
285403
- var import_path61 = require("path");
285505
+ var import_path62 = require("path");
285404
285506
 
285405
285507
  // src/compiler/prerender/crawl-urls.ts
285406
285508
  init_import_meta_url();
@@ -286147,7 +286249,7 @@ var prerenderWorker = async (sys, prerenderRequest) => {
286147
286249
  prerenderEnsureDir(sys, prerenderCtx2, results.filePath);
286148
286250
  const writePromise = sys.writeFile(results.filePath, html);
286149
286251
  if (Array.isArray(hydrateResults.staticData) && hydrateResults.staticData.length > 0) {
286150
- const pageDir = (0, import_path61.dirname)(results.filePath);
286252
+ const pageDir = (0, import_path62.dirname)(results.filePath);
286151
286253
  await Promise.all(
286152
286254
  hydrateResults.staticData.map(async (s) => {
286153
286255
  if (s.type === "application/json") {
@@ -286208,7 +286310,7 @@ var prerenderEnsureDir = (sys, prerenderCtx2, p) => {
286208
286310
 
286209
286311
  // src/compiler/style/css-to-esm.ts
286210
286312
  init_import_meta_url();
286211
- var import_path62 = __toESM(require("path"));
286313
+ var import_path63 = __toESM(require("path"));
286212
286314
  var CSS_IMPORT_RE = /(@import)\s+(url\()?\s?(.*?)\s?\)?([^;]*);?/gi;
286213
286315
  var transformCssToEsm = async (input) => {
286214
286316
  const results = transformCssToEsmModule(input);
@@ -286275,7 +286377,7 @@ var transformCssToEsmModule = (input) => {
286275
286377
  };
286276
286378
  var generateTransformCssToEsm = (input, results) => {
286277
286379
  const s = new MagicString("");
286278
- results.styleText = results.styleText.replace(/\n/g, " ").replace(/\r/g, " ").replace(/\t/g, " ").replace(/`/g, "\\`").replace(/\u000c/g, "\\f").replace(/\u0008/g, "\\b").replace(/\u000b/g, "\\v").replace(/\0/g, "\\0").replace(/\\/g, "\\\\");
286380
+ results.styleText = results.styleText.replace(/\\/g, "\\\\").replace(/\n/g, " ").replace(/\r/g, " ").replace(/\t/g, " ").replace(/\u000c/g, "\\\\f").replace(/\u0008/g, "\\\\b").replace(/\u000b/g, "\\\\v").replace(/\0/g, "\\\\0").replace(/`/g, "\\`").replace(/\$\{/g, "\\${");
286279
286381
  if (input.addTagTransformers) {
286280
286382
  results.styleText = addTagTransformToCssString(results.styleText, input.tags);
286281
286383
  }
@@ -286322,7 +286424,7 @@ var getCssToEsmImports = (varNames, cssText, filePath, modeName) => {
286322
286424
  return cssImports;
286323
286425
  }
286324
286426
  cssText = stripCssComments(cssText);
286325
- const dir = import_path62.default.dirname(filePath);
286427
+ const dir = import_path63.default.dirname(filePath);
286326
286428
  let r;
286327
286429
  while (r = CSS_IMPORT_RE.exec(cssText)) {
286328
286430
  const cssImportData = {
@@ -286337,7 +286439,7 @@ var getCssToEsmImports = (varNames, cssText, filePath, modeName) => {
286337
286439
  } else if (isCssNodeModule2(cssImportData.url)) {
286338
286440
  cssImportData.filePath = cssImportData.url.substring(1);
286339
286441
  cssImportData.isNodeModule = true;
286340
- } else if (import_path62.default.isAbsolute(cssImportData.url)) {
286442
+ } else if (import_path63.default.isAbsolute(cssImportData.url)) {
286341
286443
  cssImportData.filePath = normalizePath(cssImportData.url);
286342
286444
  } else {
286343
286445
  cssImportData.filePath = normalizePath(resolve(dir, cssImportData.url));
@@ -286367,7 +286469,7 @@ var isLocalCssImport2 = (srcImport) => {
286367
286469
  return true;
286368
286470
  };
286369
286471
  var createCssVarName = (filePath, modeName) => {
286370
- let varName = import_path62.default.basename(filePath);
286472
+ let varName = import_path63.default.basename(filePath);
286371
286473
  if (modeName && modeName !== DEFAULT_STYLE_MODE && !varName.includes(modeName)) {
286372
286474
  varName = modeName + "-" + varName;
286373
286475
  }
@@ -286443,11 +286545,11 @@ var createCompiler = async (userConfig) => {
286443
286545
  // src/compiler/config/load-config.ts
286444
286546
  init_import_meta_url();
286445
286547
  var import_sys_api_node3 = require("../sys/node/index.js");
286446
- var import_path64 = require("path");
286548
+ var import_path65 = require("path");
286447
286549
 
286448
286550
  // src/compiler/sys/typescript/typescript-config.ts
286449
286551
  init_import_meta_url();
286450
- var import_path63 = require("path");
286552
+ var import_path64 = require("path");
286451
286553
  var import_typescript69 = __toESM(require_typescript_5_8_3_bundle_cache_min());
286452
286554
  var validateTsConfig = async (config, sys, init) => {
286453
286555
  var _a3;
@@ -286550,7 +286652,7 @@ var getTsConfigPath = async (config, sys, init) => {
286550
286652
  content: ""
286551
286653
  };
286552
286654
  if (isString(config.tsconfig)) {
286553
- if (!(0, import_path63.isAbsolute)(config.tsconfig)) {
286655
+ if (!(0, import_path64.isAbsolute)(config.tsconfig)) {
286554
286656
  tsconfig.path = join(config.rootDir, config.tsconfig);
286555
286657
  } else {
286556
286658
  tsconfig.path = config.tsconfig;
@@ -286621,7 +286723,7 @@ var loadConfig = async (init = {}) => {
286621
286723
  configPath = loadedConfigFile.configPath;
286622
286724
  unknownConfig.config = { ...loadedConfigFile, ...config };
286623
286725
  unknownConfig.config.configPath = configPath;
286624
- unknownConfig.config.rootDir = typeof config.rootDir === "string" ? config.rootDir : normalizePath((0, import_path64.dirname)(configPath));
286726
+ unknownConfig.config.rootDir = typeof config.rootDir === "string" ? config.rootDir : normalizePath((0, import_path65.dirname)(configPath));
286625
286727
  } else {
286626
286728
  unknownConfig.config = { ...config };
286627
286729
  unknownConfig.config.configPath = null;
@@ -286684,7 +286786,7 @@ var evaluateConfigFile = async (diagnostics, configFilePath) => {
286684
286786
 
286685
286787
  // src/compiler/prerender/prerender-main.ts
286686
286788
  init_import_meta_url();
286687
- var import_path66 = require("path");
286789
+ var import_path67 = require("path");
286688
286790
 
286689
286791
  // src/hydrate/runner/render-utils.ts
286690
286792
  init_import_meta_url();
@@ -286706,7 +286808,7 @@ init_import_meta_url();
286706
286808
 
286707
286809
  // src/compiler/prerender/prerendered-write-path.ts
286708
286810
  init_import_meta_url();
286709
- var import_path65 = __toESM(require("path"));
286811
+ var import_path66 = __toESM(require("path"));
286710
286812
  var getWriteFilePathFromUrlPath = (manager, inputHref) => {
286711
286813
  const baseUrl = new URL(manager.outputTarget.baseUrl, manager.devServerHostUrl);
286712
286814
  const basePathname = baseUrl.pathname.toLowerCase();
@@ -286717,7 +286819,7 @@ var getWriteFilePathFromUrlPath = (manager, inputHref) => {
286717
286819
  const isPrerrenderRoot = basePathname === inputPathname;
286718
286820
  let fileName;
286719
286821
  if (isPrerrenderRoot) {
286720
- fileName = import_path65.default.basename(manager.outputTarget.indexHtml);
286822
+ fileName = import_path66.default.basename(manager.outputTarget.indexHtml);
286721
286823
  } else {
286722
286824
  fileName = "index.html";
286723
286825
  }
@@ -287107,7 +287209,7 @@ var runPrerender = async (config, hydrateAppFilePath, componentGraph, srcIndexHt
287107
287209
  diagnostic.header = `Prerender Error`;
287108
287210
  diagnostic.messageText = `Build results missing "hydrateAppFilePath"`;
287109
287211
  } else {
287110
- if (!(0, import_path66.isAbsolute)(hydrateAppFilePath)) {
287212
+ if (!(0, import_path67.isAbsolute)(hydrateAppFilePath)) {
287111
287213
  hydrateAppFilePath = join(config.sys.getCurrentDirectory(), hydrateAppFilePath);
287112
287214
  }
287113
287215
  const hydrateAppExists = await config.sys.access(hydrateAppFilePath);
@@ -287294,7 +287396,7 @@ var getComponentPathContent = (componentGraph, outputTarget) => {
287294
287396
  init_import_meta_url();
287295
287397
  var import_sys_api_node4 = require("../sys/node/index.js");
287296
287398
  var os = __toESM(require("os"));
287297
- var import_path67 = __toESM(require("path"));
287399
+ var import_path68 = __toESM(require("path"));
287298
287400
  var process2 = __toESM(require("process"));
287299
287401
  var createSystem = (c) => {
287300
287402
  var _a3;
@@ -287324,8 +287426,8 @@ var createSystem = (c) => {
287324
287426
  if (p === "/" || p === "") {
287325
287427
  return "/";
287326
287428
  }
287327
- const dir = (0, import_path67.dirname)(p);
287328
- const base2 = (0, import_path67.basename)(p);
287429
+ const dir = (0, import_path68.dirname)(p);
287430
+ const base2 = (0, import_path68.basename)(p);
287329
287431
  if (dir.endsWith("/")) {
287330
287432
  return normalizePath(`${dir}${base2}`);
287331
287433
  }
@@ -287350,8 +287452,8 @@ var createSystem = (c) => {
287350
287452
  const createDirSync = (p, opts) => {
287351
287453
  p = normalize4(p);
287352
287454
  const results = {
287353
- basename: (0, import_path67.basename)(p),
287354
- dirname: (0, import_path67.dirname)(p),
287455
+ basename: (0, import_path68.basename)(p),
287456
+ dirname: (0, import_path68.dirname)(p),
287355
287457
  path: p,
287356
287458
  newDirs: [],
287357
287459
  error: null
@@ -287360,14 +287462,14 @@ var createSystem = (c) => {
287360
287462
  return results;
287361
287463
  };
287362
287464
  const createDirRecursiveSync = (p, opts, results) => {
287363
- const parentDir = (0, import_path67.dirname)(p);
287465
+ const parentDir = (0, import_path68.dirname)(p);
287364
287466
  if (opts && opts.recursive && !isRootPath(parentDir)) {
287365
287467
  createDirRecursiveSync(parentDir, opts, results);
287366
287468
  }
287367
287469
  const item = items.get(p);
287368
287470
  if (!item) {
287369
287471
  items.set(p, {
287370
- basename: (0, import_path67.basename)(p),
287472
+ basename: (0, import_path68.basename)(p),
287371
287473
  dirname: parentDir,
287372
287474
  isDirectory: true,
287373
287475
  isFile: false,
@@ -287473,7 +287575,7 @@ var createSystem = (c) => {
287473
287575
  const itemStat = statSync2(oldPath);
287474
287576
  if (!itemStat.error && !results.error) {
287475
287577
  if (itemStat.isFile) {
287476
- const newFileParentDir = (0, import_path67.dirname)(newPath);
287578
+ const newFileParentDir = (0, import_path68.dirname)(newPath);
287477
287579
  const createDirResults = createDirSync(newFileParentDir, { recursive: true });
287478
287580
  const fileContent = items.get(oldPath).data;
287479
287581
  const writeResults = writeFileSync(newPath, fileContent);
@@ -287509,8 +287611,8 @@ var createSystem = (c) => {
287509
287611
  const resolvePath = (p) => normalize4(p);
287510
287612
  const removeDirSync = (p, opts = {}) => {
287511
287613
  const results = {
287512
- basename: (0, import_path67.basename)(p),
287513
- dirname: (0, import_path67.dirname)(p),
287614
+ basename: (0, import_path68.basename)(p),
287615
+ dirname: (0, import_path68.dirname)(p),
287514
287616
  path: p,
287515
287617
  removedDirs: [],
287516
287618
  removedFiles: [],
@@ -287575,8 +287677,8 @@ var createSystem = (c) => {
287575
287677
  const removeFileSync = (p) => {
287576
287678
  p = normalize4(p);
287577
287679
  const results = {
287578
- basename: (0, import_path67.basename)(p),
287579
- dirname: (0, import_path67.dirname)(p),
287680
+ basename: (0, import_path68.basename)(p),
287681
+ dirname: (0, import_path68.dirname)(p),
287580
287682
  path: p,
287581
287683
  error: null
287582
287684
  };
@@ -287613,8 +287715,8 @@ var createSystem = (c) => {
287613
287715
  item.watcherCallbacks.push(dirWatcherCallback);
287614
287716
  } else {
287615
287717
  items.set(p, {
287616
- basename: (0, import_path67.basename)(p),
287617
- dirname: (0, import_path67.dirname)(p),
287718
+ basename: (0, import_path68.basename)(p),
287719
+ dirname: (0, import_path68.dirname)(p),
287618
287720
  isDirectory: true,
287619
287721
  isFile: false,
287620
287722
  watcherCallbacks: [dirWatcherCallback],
@@ -287648,8 +287750,8 @@ var createSystem = (c) => {
287648
287750
  item.watcherCallbacks.push(fileWatcherCallback);
287649
287751
  } else {
287650
287752
  items.set(p, {
287651
- basename: (0, import_path67.basename)(p),
287652
- dirname: (0, import_path67.dirname)(p),
287753
+ basename: (0, import_path68.basename)(p),
287754
+ dirname: (0, import_path68.dirname)(p),
287653
287755
  isDirectory: false,
287654
287756
  isFile: true,
287655
287757
  watcherCallbacks: [fileWatcherCallback],
@@ -287664,7 +287766,7 @@ var createSystem = (c) => {
287664
287766
  };
287665
287767
  };
287666
287768
  const emitDirectoryWatch = (p, emitted) => {
287667
- const parentDir = normalize4((0, import_path67.dirname)(p));
287769
+ const parentDir = normalize4((0, import_path68.dirname)(p));
287668
287770
  const dirItem = items.get(parentDir);
287669
287771
  if (dirItem && dirItem.isDirectory && dirItem.watcherCallbacks) {
287670
287772
  for (const watcherCallback of dirItem.watcherCallbacks) {
@@ -287693,8 +287795,8 @@ var createSystem = (c) => {
287693
287795
  }
287694
287796
  } else {
287695
287797
  items.set(p, {
287696
- basename: (0, import_path67.basename)(p),
287697
- dirname: (0, import_path67.dirname)(p),
287798
+ basename: (0, import_path68.basename)(p),
287799
+ dirname: (0, import_path68.dirname)(p),
287698
287800
  isDirectory: false,
287699
287801
  isFile: true,
287700
287802
  watcherCallbacks: null,
@@ -287762,7 +287864,7 @@ var createSystem = (c) => {
287762
287864
  isSymbolicLink,
287763
287865
  nextTick: nextTick2,
287764
287866
  normalizePath: normalize4,
287765
- platformPath: import_path67.default,
287867
+ platformPath: import_path68.default,
287766
287868
  readDir,
287767
287869
  readDirSync,
287768
287870
  readFile: readFile2,
@@ -287956,7 +288058,7 @@ var import_typescript71 = __toESM(require_typescript_5_8_3_bundle_cache_min());
287956
288058
 
287957
288059
  // src/compiler/transformers/static-to-meta/visitor.ts
287958
288060
  init_import_meta_url();
287959
- var import_path68 = require("path");
288061
+ var import_path69 = require("path");
287960
288062
  var import_typescript70 = __toESM(require_typescript_5_8_3_bundle_cache_min());
287961
288063
  var convertStaticToMeta = (config, compilerCtx, buildCtx, typeChecker, collection, transformOpts) => {
287962
288064
  return (transformCtx) => {
@@ -287975,7 +288077,7 @@ var convertStaticToMeta = (config, compilerCtx, buildCtx, typeChecker, collectio
287975
288077
  return import_typescript70.default.visitEachChild(node, visitNode, transformCtx);
287976
288078
  };
287977
288079
  return (tsSourceFile) => {
287978
- dirPath = (0, import_path68.dirname)(tsSourceFile.fileName);
288080
+ dirPath = (0, import_path69.dirname)(tsSourceFile.fileName);
287979
288081
  moduleFile = getModuleLegacy(compilerCtx, tsSourceFile.fileName);
287980
288082
  resetModuleLegacy(moduleFile);
287981
288083
  if (collection != null) {