@stencil/core 4.45.2-dev.1794287161.bb880de → 4.45.2-dev.1794432084.9be802b

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/cli/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil CLI (CommonJS) v4.45.2-dev.1794287161.bb880de | MIT Licensed | https://stenciljs.com
2
+ Stencil CLI (CommonJS) v4.45.2-dev.1794432084.9be802b | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;
package/cli/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil CLI v4.45.2-dev.1794287161.bb880de | MIT Licensed | https://stenciljs.com
2
+ Stencil CLI v4.45.2-dev.1794432084.9be802b | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/cli",
3
- "version": "4.45.2-dev.1794287161.bb880de",
3
+ "version": "4.45.2-dev.1794432084.9be802b",
4
4
  "description": "Stencil CLI.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/compiler",
3
- "version": "4.45.2-dev.1794287161.bb880de",
3
+ "version": "4.45.2-dev.1794432084.9be802b",
4
4
  "description": "Stencil Compiler.",
5
5
  "main": "./stencil.js",
6
6
  "types": "./stencil.d.ts",
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Compiler v4.45.2-dev.1794287161.bb880de | MIT Licensed | https://stenciljs.com
2
+ Stencil Compiler v4.45.2-dev.1794432084.9be802b | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;
@@ -214945,10 +214945,9 @@ var require_source_map_generator2 = __commonJS({
214945
214945
  next = "";
214946
214946
  if (mapping.generatedLine !== previousGeneratedLine) {
214947
214947
  previousGeneratedColumn = 0;
214948
- while (mapping.generatedLine !== previousGeneratedLine) {
214949
- next += ";";
214950
- previousGeneratedLine++;
214951
- }
214948
+ var lineDelta = mapping.generatedLine - previousGeneratedLine;
214949
+ next += lineDelta === 1 ? ";" : ";".repeat(lineDelta);
214950
+ previousGeneratedLine = mapping.generatedLine;
214952
214951
  } else {
214953
214952
  if (i > 0) {
214954
214953
  if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
@@ -215109,9 +215108,17 @@ var require_quick_sort2 = __commonJS({
215109
215108
  let templateFn = new Function(`return ${template}`)();
215110
215109
  return templateFn(comparator);
215111
215110
  }
215111
+ var isEvalAllowed = (function() {
215112
+ try {
215113
+ new Function("return 0")();
215114
+ return true;
215115
+ } catch {
215116
+ return false;
215117
+ }
215118
+ })();
215112
215119
  var sortCache = /* @__PURE__ */ new WeakMap();
215113
215120
  exports2.quickSort = function(ary, comparator, start = 0) {
215114
- let doQuickSort = sortCache.get(comparator);
215121
+ let doQuickSort = isEvalAllowed ? sortCache.get(comparator) : SortTemplate(comparator);
215115
215122
  if (doQuickSort === void 0) {
215116
215123
  doQuickSort = cloneSort(comparator);
215117
215124
  sortCache.set(comparator, doQuickSort);
@@ -215130,6 +215137,7 @@ var require_source_map_consumer2 = __commonJS({
215130
215137
  var ArraySet = require_array_set2().ArraySet;
215131
215138
  var base64VLQ = require_base64_vlq2();
215132
215139
  var quickSort = require_quick_sort2().quickSort;
215140
+ var MAX_SECTION_OFFSET_LINE = 1e7;
215133
215141
  function SourceMapConsumer2(aSourceMap, aSourceMapURL) {
215134
215142
  var sourceMap = aSourceMap;
215135
215143
  if (typeof aSourceMap === "string") {
@@ -215622,6 +215630,7 @@ var require_source_map_consumer2 = __commonJS({
215622
215630
  line: -1,
215623
215631
  column: 0
215624
215632
  };
215633
+ var maxOffsetLine = 0;
215625
215634
  this._sections = sections.map(function(s) {
215626
215635
  if (s.url) {
215627
215636
  throw new Error("Support for url field in sections not implemented.");
@@ -215629,10 +215638,24 @@ var require_source_map_consumer2 = __commonJS({
215629
215638
  var offset = util.getArg(s, "offset");
215630
215639
  var offsetLine = util.getArg(offset, "line");
215631
215640
  var offsetColumn = util.getArg(offset, "column");
215641
+ if (!isValidOffset(offsetLine) || !isValidOffset(offsetColumn)) {
215642
+ throw new Error("Section offset line and column must be non-negative integers.");
215643
+ }
215644
+ if (offsetLine > MAX_SECTION_OFFSET_LINE) {
215645
+ throw new Error("Section offset line must not exceed " + MAX_SECTION_OFFSET_LINE + ".");
215646
+ }
215632
215647
  if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
215633
215648
  throw new Error("Section offsets must be ordered and non-overlapping.");
215634
215649
  }
215635
215650
  lastOffset = offset;
215651
+ var consumer = new SourceMapConsumer2(util.getArg(s, "map"), aSourceMapURL);
215652
+ var totalOffsetLine = offsetLine + (consumer._maxOffsetLine || 0);
215653
+ if (totalOffsetLine > MAX_SECTION_OFFSET_LINE) {
215654
+ throw new Error("Section offset line must not exceed " + MAX_SECTION_OFFSET_LINE + ", including offsets of nested sections.");
215655
+ }
215656
+ if (totalOffsetLine > maxOffsetLine) {
215657
+ maxOffsetLine = totalOffsetLine;
215658
+ }
215636
215659
  return {
215637
215660
  generatedOffset: {
215638
215661
  // The offset fields are 0-based, but we use 1-based indices when
@@ -215640,9 +215663,14 @@ var require_source_map_consumer2 = __commonJS({
215640
215663
  generatedLine: offsetLine + 1,
215641
215664
  generatedColumn: offsetColumn + 1
215642
215665
  },
215643
- consumer: new SourceMapConsumer2(util.getArg(s, "map"), aSourceMapURL)
215666
+ consumer
215644
215667
  };
215645
215668
  });
215669
+ this._maxOffsetLine = maxOffsetLine;
215670
+ }
215671
+ function isValidOffset(aValue) {
215672
+ return typeof aValue === "number" && aValue >= 0 && aValue <= 9007199254740991 && // Number.MAX_SAFE_INTEGER
215673
+ Math.floor(aValue) === aValue;
215646
215674
  }
215647
215675
  IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer2.prototype);
215648
215676
  IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer2;
@@ -215651,8 +215679,9 @@ var require_source_map_consumer2 = __commonJS({
215651
215679
  get: function() {
215652
215680
  var sources = [];
215653
215681
  for (var i = 0; i < this._sections.length; i++) {
215654
- for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
215655
- sources.push(this._sections[i].consumer.sources[j]);
215682
+ var sectionSources = this._sections[i].consumer.sources;
215683
+ for (var j = 0; j < sectionSources.length; j++) {
215684
+ sources.push(sectionSources[j]);
215656
215685
  }
215657
215686
  }
215658
215687
  return sources;
@@ -215819,6 +215848,10 @@ var require_source_node2 = __commonJS({
215819
215848
  }
215820
215849
  }
215821
215850
  while (lastGeneratedLine < mapping.generatedLine) {
215851
+ if (remainingLinesIndex >= remainingLines.length) {
215852
+ lastGeneratedLine = mapping.generatedLine;
215853
+ break;
215854
+ }
215822
215855
  node.add(shiftNextLine());
215823
215856
  lastGeneratedLine++;
215824
215857
  }
@@ -247926,7 +247959,7 @@ var import_typescript72 = __toESM(require_typescript_5_8_3_bundle_cache_min());
247926
247959
 
247927
247960
  // src/version.ts
247928
247961
  init_import_meta_url();
247929
- var buildId = "1794287161";
247962
+ var buildId = "1794432084";
247930
247963
  var minfyJsId = "terser5.37.0_7";
247931
247964
  var optimizeCssId = "autoprefixer10.4.19_postcss8.5.13_7";
247932
247965
  var parse5Version = "7.2.1";
@@ -247934,8 +247967,8 @@ var rollupVersion = "4.44.0";
247934
247967
  var jqueryVersion = "4.0.0-pre";
247935
247968
  var terserVersion = "5.37.0";
247936
247969
  var typescriptVersion = "5.8.3";
247937
- var vermoji = "\u{1F406}";
247938
- var version = "4.45.2-dev.1794287161.bb880de";
247970
+ var vermoji = "\u{1F356}";
247971
+ var version = "4.45.2-dev.1794432084.9be802b";
247939
247972
  var versions = {
247940
247973
  stencil: version,
247941
247974
  parse5: parse5Version,
@@ -252246,20 +252279,30 @@ var updateLazyComponentConstructor = (classMembers, classNode, moduleFile, cmp)
252246
252279
  import_typescript5.default.factory.createParameterDeclaration(void 0, void 0, import_typescript5.default.factory.createIdentifier(HOST_REF_ARG))
252247
252280
  ];
252248
252281
  const cstrStatements = [
252249
- registerInstanceStatement(moduleFile),
252282
+ registerInstanceStatement(moduleFile, classNode),
252250
252283
  ...addCreateEvents(moduleFile, cmp),
252251
252284
  ...createLazyAttachInternalsBinding(cmp)
252252
252285
  ];
252253
252286
  updateConstructor(classNode, classMembers, cstrStatements, cstrMethodArgs);
252254
252287
  };
252255
- var registerInstanceStatement = (moduleFile) => {
252288
+ var registerInstanceStatement = (moduleFile, classNode) => {
252256
252289
  addCoreRuntimeApi(moduleFile, RUNTIME_APIS.registerInstance);
252257
- return import_typescript5.default.factory.createExpressionStatement(
252290
+ const registerCall = import_typescript5.default.factory.createExpressionStatement(
252258
252291
  import_typescript5.default.factory.createCallExpression(import_typescript5.default.factory.createIdentifier(REGISTER_INSTANCE), void 0, [
252259
252292
  import_typescript5.default.factory.createThis(),
252260
252293
  import_typescript5.default.factory.createIdentifier(HOST_REF_ARG)
252261
252294
  ])
252262
252295
  );
252296
+ if (!classNode.name) {
252297
+ return registerCall;
252298
+ }
252299
+ return import_typescript5.default.factory.createIfStatement(
252300
+ import_typescript5.default.factory.createStrictEquality(
252301
+ import_typescript5.default.factory.createMetaProperty(import_typescript5.default.SyntaxKind.NewKeyword, import_typescript5.default.factory.createIdentifier("target")),
252302
+ import_typescript5.default.factory.createIdentifier(classNode.name.text)
252303
+ ),
252304
+ registerCall
252305
+ );
252263
252306
  };
252264
252307
 
252265
252308
  // src/compiler/transformers/remove-static-meta-properties.ts
@@ -252308,19 +252351,82 @@ var STATIC_GETTERS_TO_REMOVE = [
252308
252351
  // src/compiler/transformers/type-library.ts
252309
252352
  init_import_meta_url();
252310
252353
  var import_typescript7 = __toESM(require_typescript_5_8_3_bundle_cache_min());
252354
+
252355
+ // src/compiler/sys/resolve/resolve-utils.ts
252356
+ init_import_meta_url();
252357
+ var COMMON_DIR_MODULE_EXTS = [".tsx", ".ts", ".mts", ".cts", ".mjs", ".js", ".cjs", ".jsx", ".json", ".md"];
252358
+ var isCommonDirModuleFile = (p) => COMMON_DIR_MODULE_EXTS.some((ext2) => p.endsWith(ext2));
252359
+ var setPackageVersion = (pkgVersions, pkgName, pkgVersion) => {
252360
+ pkgVersions.set(pkgName, pkgVersion);
252361
+ };
252362
+ var setPackageVersionByContent = (pkgVersions, pkgContent) => {
252363
+ try {
252364
+ const pkg = JSON.parse(pkgContent);
252365
+ if (pkg.name && pkg.version) {
252366
+ setPackageVersion(pkgVersions, pkg.name, pkg.version);
252367
+ }
252368
+ } catch (e) {
252369
+ }
252370
+ };
252371
+ var isLocalModule = (p) => p.startsWith(".") || p.startsWith("/");
252372
+ var isNodeModulePath = (p) => normalizePath(p).split("/").includes("node_modules");
252373
+ var getModuleId = (orgImport) => {
252374
+ if (orgImport.startsWith("~")) {
252375
+ orgImport = orgImport.substring(1);
252376
+ }
252377
+ const splt = orgImport.split("/");
252378
+ const m = {
252379
+ moduleId: null,
252380
+ filePath: null,
252381
+ scope: null,
252382
+ scopeSubModuleId: null
252383
+ };
252384
+ if (orgImport.startsWith("@") && splt.length > 1) {
252385
+ m.moduleId = splt.slice(0, 2).join("/");
252386
+ m.filePath = splt.slice(2).join("/");
252387
+ m.scope = splt[0];
252388
+ m.scopeSubModuleId = splt[1];
252389
+ } else {
252390
+ m.moduleId = splt[0];
252391
+ m.filePath = splt.slice(1).join("/");
252392
+ }
252393
+ return m;
252394
+ };
252395
+ var getPackageDirPath = (p, moduleId) => {
252396
+ const parts = normalizePath(p).split("/");
252397
+ const m = getModuleId(moduleId);
252398
+ for (let i = parts.length - 1; i >= 1; i--) {
252399
+ if (parts[i - 1] === "node_modules") {
252400
+ if (m.scope) {
252401
+ if (parts[i] === m.scope && parts[i + 1] === m.scopeSubModuleId) {
252402
+ return parts.slice(0, i + 2).join("/");
252403
+ }
252404
+ } else if (parts[i] === m.moduleId) {
252405
+ return parts.slice(0, i + 1).join("/");
252406
+ }
252407
+ }
252408
+ }
252409
+ return null;
252410
+ };
252411
+
252412
+ // src/compiler/transformers/type-library.ts
252311
252413
  var TYPE_LIBRARY = {};
252312
- function addToLibrary(type, typeName, checker, pathToTypeModule) {
252414
+ function addToLibrary(type, typeName, checker, pathToTypeModule, symbol) {
252415
+ var _a3, _b, _c, _d;
252313
252416
  pathToTypeModule = relative(process.cwd(), pathToTypeModule);
252314
252417
  if (pathToTypeModule.startsWith("node_modules")) {
252315
252418
  return "node_modules::" + typeName;
252316
252419
  }
252317
252420
  const id = getTypeId(pathToTypeModule, typeName);
252318
252421
  if (!type.isTypeParameter() && !(id in TYPE_LIBRARY)) {
252319
- const declaration = getTypeDeclaration(checker, type);
252422
+ const alias = (_a3 = symbol == null ? void 0 : symbol.declarations) == null ? void 0 : _a3.find(import_typescript7.default.isTypeAliasDeclaration);
252423
+ const resolvedFile = (_d = (_c = (_b = getSymbolForType(type)) == null ? void 0 : _b.declarations) == null ? void 0 : _c[0]) == null ? void 0 : _d.getSourceFile();
252424
+ const useAlias = alias && resolvedFile && (resolvedFile.hasNoDefaultLib || isNodeModulePath(resolvedFile.fileName));
252425
+ const declaration = useAlias ? alias.getText() : getTypeDeclaration(checker, type);
252320
252426
  if (declaration !== "") {
252321
252427
  TYPE_LIBRARY[id] = {
252322
252428
  declaration,
252323
- docstring: getTypeDocstring(type, checker),
252429
+ docstring: getTypeDocstring(type, checker, useAlias ? symbol : void 0),
252324
252430
  path: pathToTypeModule
252325
252431
  };
252326
252432
  }
@@ -252381,7 +252487,13 @@ function addFileToLibrary(config, filePath) {
252381
252487
  for (const node of exportedTypesInSourceFile(sourceFile)) {
252382
252488
  const type = checker.getTypeAtLocation(node);
252383
252489
  const typeName = node.name.getText();
252384
- addToLibrary(type, typeName, checker, normalizePath(node.getSourceFile().fileName, false));
252490
+ addToLibrary(
252491
+ type,
252492
+ typeName,
252493
+ checker,
252494
+ normalizePath(node.getSourceFile().fileName, false),
252495
+ checker.getSymbolAtLocation(node.name)
252496
+ );
252385
252497
  }
252386
252498
  }
252387
252499
  function getHomeModule(importer, importPath, options, compilerHost, program3) {
@@ -252432,8 +252544,8 @@ function getTypeDeclaration(checker, type) {
252432
252544
  return typeToString(checker, type);
252433
252545
  }
252434
252546
  }
252435
- function getTypeDocstring(type, checker) {
252436
- const symbol = type == null ? void 0 : type.symbol;
252547
+ function getTypeDocstring(type, checker, aliasSymbol) {
252548
+ const symbol = aliasSymbol != null ? aliasSymbol : type == null ? void 0 : type.symbol;
252437
252549
  return symbol ? import_typescript7.default.displayPartsToString(symbol.getDocumentationComment(checker)) : "";
252438
252550
  }
252439
252551
  var getTypeId = (pathToTypeModule, typeName) => {
@@ -252961,7 +253073,13 @@ var getTypeReferenceLocation = (typeName, type, sourceFile, checker, program3) =
252961
253073
  }
252962
253074
  }
252963
253075
  const typeSourceFile = (_d = enumOrClassDeclaration == null ? void 0 : enumOrClassDeclaration.getSourceFile()) != null ? _d : importHomeModule;
252964
- const id = addToLibrary(type, originalTypeName, checker, normalizePath(typeSourceFile.fileName, false));
253076
+ const id = addToLibrary(
253077
+ type,
253078
+ originalTypeName,
253079
+ checker,
253080
+ normalizePath(typeSourceFile.fileName, false),
253081
+ importedSymbol
253082
+ );
252965
253083
  return {
252966
253084
  location: "import",
252967
253085
  path: localImportPath,
@@ -253009,7 +253127,14 @@ var getTypeReferenceLocation = (typeName, type, sourceFile, checker, program3) =
253009
253127
  void 0
253010
253128
  );
253011
253129
  if (localExport) {
253012
- const id = addToLibrary(type, typeName, checker, sourceFile.fileName);
253130
+ const localDecl = findTypeWithName(sourceFile, typeName);
253131
+ const id = addToLibrary(
253132
+ type,
253133
+ typeName,
253134
+ checker,
253135
+ sourceFile.fileName,
253136
+ localDecl && checker.getSymbolAtLocation(localDecl.name)
253137
+ );
253013
253138
  return {
253014
253139
  location: "local",
253015
253140
  // If this is a local import, we know the path to the type
@@ -253049,7 +253174,8 @@ var getTypeReferenceLocation = (typeName, type, sourceFile, checker, program3) =
253049
253174
  type,
253050
253175
  originalTypeName,
253051
253176
  checker,
253052
- normalizePath(declaration.getSourceFile().fileName, false)
253177
+ normalizePath(declaration.getSourceFile().fileName, false),
253178
+ importedSymbol
253053
253179
  );
253054
253180
  return {
253055
253181
  location: "import",
@@ -253246,7 +253372,7 @@ function foundSuper(constructorBodyStatements) {
253246
253372
  (s) => import_typescript9.default.isExpressionStatement(s) && import_typescript9.default.isCallExpression(s.expression) && (s.expression.expression.kind === import_typescript9.default.SyntaxKind.SuperKeyword || import_typescript9.default.isIdentifier(s.expression.expression) && s.expression.expression.escapedText === "super")
253247
253373
  );
253248
253374
  }
253249
- var updateConstructor = (classNode, classMembers, statements, parameters, includeFalseArg) => {
253375
+ var updateConstructor = (classNode, classMembers, statements, parameters, superArgs) => {
253250
253376
  var _a3, _b;
253251
253377
  const constructorIndex = classMembers.findIndex((m) => import_typescript9.default.isConstructorDeclaration(m) && m.body != null);
253252
253378
  const constructorMethod = classMembers[constructorIndex];
@@ -253255,12 +253381,12 @@ var updateConstructor = (classNode, classMembers, statements, parameters, includ
253255
253381
  const constructorBodyStatements = (_a3 = constructorMethod.body) == null ? void 0 : _a3.statements;
253256
253382
  let foundSuperCall = foundSuper(constructorBodyStatements);
253257
253383
  if (!foundSuperCall && needsSuper(classNode)) {
253258
- statements = [createConstructorBodyWithSuper(includeFalseArg), ...statements, ...constructorBodyStatements];
253384
+ statements = [createConstructorBodyWithSuper(superArgs), ...statements, ...constructorBodyStatements];
253259
253385
  } else {
253260
253386
  const updatedStatements = constructorBodyStatements.filter((s) => s !== foundSuperCall);
253261
253387
  if (foundSuperCall) {
253262
- if (includeFalseArg) {
253263
- foundSuperCall = createConstructorBodyWithSuper(includeFalseArg);
253388
+ if (superArgs === "false") {
253389
+ foundSuperCall = createConstructorBodyWithSuper(superArgs);
253264
253390
  }
253265
253391
  statements = [foundSuperCall, ...statements, ...updatedStatements];
253266
253392
  } else {
@@ -253275,7 +253401,7 @@ var updateConstructor = (classNode, classMembers, statements, parameters, includ
253275
253401
  );
253276
253402
  } else {
253277
253403
  if (needsSuper(classNode)) {
253278
- statements = [createConstructorBodyWithSuper(includeFalseArg), ...statements];
253404
+ statements = [createConstructorBodyWithSuper(superArgs), ...statements];
253279
253405
  }
253280
253406
  classMembers.unshift(
253281
253407
  import_typescript9.default.factory.createConstructorDeclaration(void 0, parameters != null ? parameters : [], import_typescript9.default.factory.createBlock(statements, true))
@@ -253290,13 +253416,10 @@ var needsSuper = (classDeclaration3) => {
253290
253416
  }
253291
253417
  return false;
253292
253418
  };
253293
- var createConstructorBodyWithSuper = (includeFalseArg) => {
253419
+ var createConstructorBodyWithSuper = (superArgs) => {
253420
+ const args = superArgs === "false" ? [import_typescript9.default.factory.createFalse()] : superArgs === "forward" ? [import_typescript9.default.factory.createSpreadElement(import_typescript9.default.factory.createIdentifier("arguments"))] : void 0;
253294
253421
  return import_typescript9.default.factory.createExpressionStatement(
253295
- import_typescript9.default.factory.createCallExpression(
253296
- import_typescript9.default.factory.createIdentifier("super"),
253297
- void 0,
253298
- includeFalseArg ? [import_typescript9.default.factory.createFalse()] : void 0
253299
- )
253422
+ import_typescript9.default.factory.createCallExpression(import_typescript9.default.factory.createIdentifier("super"), void 0, args)
253300
253423
  );
253301
253424
  };
253302
253425
  var tsPropDeclName = (node, typeChecker) => {
@@ -258884,65 +259007,6 @@ init_import_meta_url();
258884
259007
 
258885
259008
  // src/compiler/sys/fetch/fetch-utils.ts
258886
259009
  init_import_meta_url();
258887
-
258888
- // src/compiler/sys/resolve/resolve-utils.ts
258889
- init_import_meta_url();
258890
- var COMMON_DIR_MODULE_EXTS = [".tsx", ".ts", ".mts", ".cts", ".mjs", ".js", ".cjs", ".jsx", ".json", ".md"];
258891
- var isCommonDirModuleFile = (p) => COMMON_DIR_MODULE_EXTS.some((ext2) => p.endsWith(ext2));
258892
- var setPackageVersion = (pkgVersions, pkgName, pkgVersion) => {
258893
- pkgVersions.set(pkgName, pkgVersion);
258894
- };
258895
- var setPackageVersionByContent = (pkgVersions, pkgContent) => {
258896
- try {
258897
- const pkg = JSON.parse(pkgContent);
258898
- if (pkg.name && pkg.version) {
258899
- setPackageVersion(pkgVersions, pkg.name, pkg.version);
258900
- }
258901
- } catch (e) {
258902
- }
258903
- };
258904
- var isLocalModule = (p) => p.startsWith(".") || p.startsWith("/");
258905
- var isNodeModulePath = (p) => normalizePath(p).split("/").includes("node_modules");
258906
- var getModuleId = (orgImport) => {
258907
- if (orgImport.startsWith("~")) {
258908
- orgImport = orgImport.substring(1);
258909
- }
258910
- const splt = orgImport.split("/");
258911
- const m = {
258912
- moduleId: null,
258913
- filePath: null,
258914
- scope: null,
258915
- scopeSubModuleId: null
258916
- };
258917
- if (orgImport.startsWith("@") && splt.length > 1) {
258918
- m.moduleId = splt.slice(0, 2).join("/");
258919
- m.filePath = splt.slice(2).join("/");
258920
- m.scope = splt[0];
258921
- m.scopeSubModuleId = splt[1];
258922
- } else {
258923
- m.moduleId = splt[0];
258924
- m.filePath = splt.slice(1).join("/");
258925
- }
258926
- return m;
258927
- };
258928
- var getPackageDirPath = (p, moduleId) => {
258929
- const parts = normalizePath(p).split("/");
258930
- const m = getModuleId(moduleId);
258931
- for (let i = parts.length - 1; i >= 1; i--) {
258932
- if (parts[i - 1] === "node_modules") {
258933
- if (m.scope) {
258934
- if (parts[i] === m.scope && parts[i + 1] === m.scopeSubModuleId) {
258935
- return parts.slice(0, i + 2).join("/");
258936
- }
258937
- } else if (parts[i] === m.moduleId) {
258938
- return parts.slice(0, i + 1).join("/");
258939
- }
258940
- }
258941
- }
258942
- return null;
258943
- };
258944
-
258945
- // src/compiler/sys/fetch/fetch-utils.ts
258946
259010
  var httpFetch = (sys, input, init) => {
258947
259011
  if (sys && isFunction(sys.fetch)) {
258948
259012
  return sys.fetch(input, init);
@@ -260490,7 +260554,7 @@ var tsGetSourceFile = (config, module2) => {
260490
260554
  return null;
260491
260555
  }
260492
260556
  const compilerOptions = { ...config.tsCompilerOptions };
260493
- const host = import_typescript15.default.createCompilerHost(compilerOptions);
260557
+ const host = import_typescript15.default.createCompilerHost(compilerOptions, true);
260494
260558
  const program3 = import_typescript15.default.createProgram([module2.resolvedModule.resolvedFileName], compilerOptions, host);
260495
260559
  return program3.getSourceFile(module2.resolvedModule.resolvedFileName);
260496
260560
  };
@@ -270610,7 +270674,13 @@ var updateNativeConstructor = (classMembers, moduleFile, cmp, classNode) => {
270610
270674
  ...addCreateEvents(moduleFile, cmp),
270611
270675
  ...createNativeAttachInternalsBinding(cmp)
270612
270676
  ];
270613
- updateConstructor(classNode, classMembers, nativeCstrStatements, cstrMethodArgs, cmp.doesExtend);
270677
+ updateConstructor(
270678
+ classNode,
270679
+ classMembers,
270680
+ nativeCstrStatements,
270681
+ cstrMethodArgs,
270682
+ cmp.doesExtend ? "false" : void 0
270683
+ );
270614
270684
  };
270615
270685
  var nativeInit = (cmp) => {
270616
270686
  const initStatements = [nativeRegisterHostStatement()];
@@ -270859,7 +270929,7 @@ var updateNativeExtendedClass = (node, moduleFile, transformOpts) => {
270859
270929
  withHeritageClauses.name,
270860
270930
  withHeritageClauses.typeParameters,
270861
270931
  withHeritageClauses.heritageClauses,
270862
- updateConstructor(withHeritageClauses, Array.from(withHeritageClauses.members), [], params, true)
270932
+ updateConstructor(withHeritageClauses, Array.from(withHeritageClauses.members), [], params, "false")
270863
270933
  );
270864
270934
  }
270865
270935
  return updateComponentClass(
@@ -273326,7 +273396,7 @@ var generateLazyModules = async (config, compilerCtx, buildCtx, outputTargetType
273326
273396
  })
273327
273397
  );
273328
273398
  await Promise.all(
273329
- results.filter((r) => r.type === "asset").map((r) => {
273399
+ getAssetsToWrite(results).map((r) => {
273330
273400
  return Promise.all(
273331
273401
  destinations.map((dest) => {
273332
273402
  return compilerCtx.fs.writeFile(join(dest, r.fileName), r.content);
@@ -273336,6 +273406,14 @@ var generateLazyModules = async (config, compilerCtx, buildCtx, outputTargetType
273336
273406
  );
273337
273407
  return bundleModules;
273338
273408
  };
273409
+ var getAssetsToWrite = (results) => {
273410
+ const chunkSourceMapFileNames = new Set(
273411
+ results.filter((r) => r.type === "chunk").map((r) => `${r.fileName}.map`)
273412
+ );
273413
+ return results.filter(
273414
+ (r) => r.type === "asset" && !chunkSourceMapFileNames.has(r.fileName)
273415
+ );
273416
+ };
273339
273417
  var addStaticImports = (rollupChunkResults, bundleModules) => {
273340
273418
  rollupChunkResults.filter(isStencilCoreResult).forEach((index2) => {
273341
273419
  const generateCjs2 = isCjsFormat(index2) ? generateCaseClauseCjs : generateCaseClause;
@@ -273584,23 +273662,30 @@ var lazyBundleIdPlugin = (buildCtx, config, shouldHash, suffix, isBrowserBuild)
273584
273662
  }
273585
273663
  if (!map2.size) return;
273586
273664
  for (const [_key, file] of files) {
273587
- if (!file.isEntry) continue;
273665
+ if (file.type !== "chunk") continue;
273588
273666
  const newFileName = map2.get(file.fileName);
273589
- if (!newFileName) continue;
273590
- file.facadeModuleId = newFileName;
273591
- file.fileName = newFileName;
273592
- const magicString = new MagicString(file.code);
273593
- file.imports.forEach((imported, i) => {
273594
- const replaced = map2.get(imported);
273595
- if (replaced) {
273596
- magicString.replaceAll(imported, replaced);
273597
- file.imports[i] = replaced;
273667
+ if (newFileName) {
273668
+ file.facadeModuleId = newFileName;
273669
+ file.fileName = newFileName;
273670
+ if (config.sourceMap && file.map) {
273671
+ file.map.file = newFileName;
273598
273672
  }
273599
- });
273600
- file.code = magicString.toString();
273601
- if (config.sourceMap && file.map) {
273602
- file.map.file = newFileName;
273603
273673
  }
273674
+ const renamedImports = new Set(
273675
+ [...file.imports, ...file.dynamicImports].filter((imported) => map2.has(imported))
273676
+ );
273677
+ if (!renamedImports.size) continue;
273678
+ const magicString = new MagicString(file.code);
273679
+ renamedImports.forEach((imported) => magicString.replaceAll(imported, map2.get(imported)));
273680
+ file.code = magicString.toString();
273681
+ file.imports = file.imports.map((imported) => {
273682
+ var _a3;
273683
+ return (_a3 = map2.get(imported)) != null ? _a3 : imported;
273684
+ });
273685
+ file.dynamicImports = file.dynamicImports.map((imported) => {
273686
+ var _a3;
273687
+ return (_a3 = map2.get(imported)) != null ? _a3 : imported;
273688
+ });
273604
273689
  }
273605
273690
  }
273606
273691
  };
@@ -280738,7 +280823,13 @@ var visitClassDeclaration = (config, diagnostics, typeChecker, program3, classNo
280738
280823
  }
280739
280824
  validateMethods(diagnostics, classMembers);
280740
280825
  const currentDecorators = retrieveTsDecorators(classNode);
280741
- const updatedClassFields = updateConstructor(classNode, filteredMethodsAndFields, []);
280826
+ const updatedClassFields = updateConstructor(
280827
+ classNode,
280828
+ filteredMethodsAndFields,
280829
+ [],
280830
+ void 0,
280831
+ "forward"
280832
+ );
280742
280833
  return import_typescript56.default.factory.updateClassDeclaration(
280743
280834
  classNode,
280744
280835
  [
@@ -282299,7 +282390,9 @@ var updateModule = (config, compilerCtx, buildCtx, tsSourceFile, sourceFileText,
282299
282390
  if (isExportableMixinClass(node)) {
282300
282391
  moduleFile.hasExportableMixins = true;
282301
282392
  }
282302
- return;
282393
+ if (getComponentTagName(node.members.filter(isStaticGetter)) != null) {
282394
+ return;
282395
+ }
282303
282396
  } else if (import_typescript65.default.isImportDeclaration(node)) {
282304
282397
  parseModuleImport(config, compilerCtx, buildCtx, moduleFile, srcDirPath, node, true);
282305
282398
  return;
@@ -282307,28 +282400,6 @@ var updateModule = (config, compilerCtx, buildCtx, tsSourceFile, sourceFileText,
282307
282400
  parseCallExpression(moduleFile, node, typeChecker);
282308
282401
  } else if (import_typescript65.default.isStringLiteral(node)) {
282309
282402
  parseStringLiteral(moduleFile, node);
282310
- } else if (import_typescript65.default.isVariableStatement(node)) {
282311
- node.declarationList.declarations.forEach((declaration) => {
282312
- if (declaration.initializer) {
282313
- if (import_typescript65.default.isArrowFunction(declaration.initializer) || import_typescript65.default.isFunctionExpression(declaration.initializer)) {
282314
- const funcBody = declaration.initializer.body;
282315
- if (import_typescript65.default.isBlock(funcBody)) {
282316
- funcBody.statements.forEach((statement) => {
282317
- if (import_typescript65.default.isClassDeclaration(statement)) {
282318
- if (isExportableMixinClass(statement)) {
282319
- moduleFile.hasExportableMixins = true;
282320
- }
282321
- statement.members.forEach((member2) => {
282322
- if (import_typescript65.default.isPropertyDeclaration(member2) && member2.initializer) {
282323
- import_typescript65.default.forEachChild(member2.initializer, visitNode);
282324
- }
282325
- });
282326
- }
282327
- });
282328
- }
282329
- }
282330
- }
282331
- });
282332
282403
  }
282333
282404
  node.forEachChild(visitNode);
282334
282405
  };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Dev Server Client v4.45.2-dev.1794287161.bb880de | MIT Licensed | https://stenciljs.com
2
+ Stencil Dev Server Client v4.45.2-dev.1794432084.9be802b | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
 
5
5
  // src/dev-server/client/app-error.css
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/dev-server/client",
3
- "version": "4.45.2-dev.1794287161.bb880de",
3
+ "version": "4.45.2-dev.1794432084.9be802b",
4
4
  "description": "Stencil Dev Server Client.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",