@stencil/core 5.0.0-beta.1 → 5.0.0-beta.11

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.
Files changed (32) hide show
  1. package/dist/app-data/index.d.ts +1 -1
  2. package/dist/{client-BRu0GtRn.mjs → client-CdFmjaQa.mjs} +40 -15
  3. package/dist/compiler/browser.d.ts +1 -1
  4. package/dist/compiler/browser.js +77 -41
  5. package/dist/compiler/index.d.mts +1 -1
  6. package/dist/compiler/index.mjs +2 -2
  7. package/dist/compiler/utils/index.d.mts +1 -1
  8. package/dist/{compiler-CJG6qvQt.mjs → compiler-2EypBn_Y.mjs} +346 -122
  9. package/dist/declarations/stencil-public-compiler.d.ts +6 -1
  10. package/dist/declarations/stencil-public-runtime.d.ts +57 -55
  11. package/dist/{index-BXAcVN2j.d.ts → index-BHciXst1.d.ts} +57 -55
  12. package/dist/{index-DmHmu3y0.d.mts → index-CKnzMkZC.d.mts} +1 -1
  13. package/dist/{index-BopBfjPu.d.mts → index-Cw1NW9FW.d.mts} +6 -1
  14. package/dist/index.mjs +1 -1
  15. package/dist/jsx-runtime.mjs +1 -1
  16. package/dist/{node-75gQKkFz.mjs → node-HKfDhPR3.mjs} +1 -1
  17. package/dist/runtime/client/lazy.js +63 -31
  18. package/dist/runtime/client/runtime.d.ts +57 -55
  19. package/dist/runtime/client/runtime.js +63 -31
  20. package/dist/runtime/index.d.ts +1 -1
  21. package/dist/runtime/index.js +63 -31
  22. package/dist/runtime/server/index.d.mts +2 -1
  23. package/dist/runtime/server/index.mjs +83 -44
  24. package/dist/runtime/server/runner.mjs +8 -5
  25. package/dist/signals/index.d.ts +11 -2
  26. package/dist/signals/index.js +11 -1
  27. package/dist/sys/node/index.d.mts +1 -1
  28. package/dist/sys/node/index.mjs +1 -1
  29. package/dist/sys/node/worker.mjs +2 -2
  30. package/dist/testing/index.d.mts +6 -1
  31. package/dist/testing/index.mjs +64 -32
  32. package/package.json +4 -4
@@ -1,2 +1,2 @@
1
- import { n as Env, r as NAMESPACE, t as BUILD } from "../index-BXAcVN2j.js";
1
+ import { n as Env, r as NAMESPACE, t as BUILD } from "../index-BHciXst1.js";
2
2
  export { BUILD, Env, NAMESPACE };
@@ -1,5 +1,5 @@
1
1
  import { B as HOST_FLAGS, C as CMP_FLAGS, G as NODE_TYPES, Z as SVG_NS, o as isComplexType, s as isDef, x as queryNonceMetaTagContent } from "./helpers-Cpp3qc3u.mjs";
2
- import { effect } from "@preact/signals-core";
2
+ import * as SignalsCore from "@preact/signals-core";
3
3
  //#region src/app-data/index.ts
4
4
  /**
5
5
  * A collection of default build flags for a Stencil project.
@@ -722,6 +722,10 @@ const attachStyles = (hostRef) => {
722
722
  */
723
723
  const getScopeId = (cmp, mode) => "sc-" + (BUILD.mode && mode && cmp.$flags$ & CMP_FLAGS.hasMode ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
724
724
  //#endregion
725
+ //#region src/runtime/signals-core.ts
726
+ const getCore = () => globalThis[Symbol.for("stencil.preact-signals-core")] ??= SignalsCore;
727
+ const effect = (fn, options) => getCore().effect(fn, options);
728
+ //#endregion
725
729
  //#region src/runtime/event-emitter.ts
726
730
  /**
727
731
  * Helper function to create & dispatch a custom Event on a provided target
@@ -996,16 +1000,33 @@ const signalNodeDisposers = /* @__PURE__ */ new WeakMap();
996
1000
  const disposeSignalVNode = (vnode) => {
997
1001
  const elm = vnode.$elm$;
998
1002
  if (elm) {
999
- const dispose = signalNodeDisposers.get(elm);
1000
- if (dispose) {
1001
- dispose();
1002
- signalNodeDisposers.delete(elm);
1003
- }
1003
+ disposeTextSignal(elm);
1004
1004
  disposeAllSignalAttrs(elm);
1005
1005
  }
1006
1006
  vnode.$children$?.forEach(disposeSignalVNode);
1007
1007
  };
1008
1008
  /**
1009
+ * Tear down a text node's signal subscription, if it has one.
1010
+ * @param textNode the text node to unsubscribe
1011
+ */
1012
+ const disposeTextSignal = (textNode) => {
1013
+ const dispose = signalNodeDisposers.get(textNode);
1014
+ if (dispose) {
1015
+ dispose();
1016
+ signalNodeDisposers.delete(textNode);
1017
+ }
1018
+ };
1019
+ /**
1020
+ * Subscribe a text node to a signal, keeping its `data` in sync on every change.
1021
+ * @param textNode the text node to keep in sync
1022
+ * @param textSig the signal to subscribe to
1023
+ */
1024
+ const wireTextSignal = (textNode, textSig) => {
1025
+ signalNodeDisposers.set(textNode, effect(() => {
1026
+ textNode.data = String(textSig.value);
1027
+ }));
1028
+ };
1029
+ /**
1009
1030
  * Create a DOM Node corresponding to one of the children of a given VNode.
1010
1031
  *
1011
1032
  * @param oldParentVNode the parent VNode from the previous render
@@ -1027,13 +1048,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex) => {
1027
1048
  if (BUILD.isDev && newVNode.$elm$) consoleDevError(`The JSX ${newVNode.$text$ !== null ? `"${newVNode.$text$}" text` : `"${String(newVNode.$tag$)}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`);
1028
1049
  if (BUILD.vdomText && newVNode.$text$ != null) {
1029
1050
  elm = newVNode.$elm$ = win.document.createTextNode(newVNode.$text$);
1030
- if (BUILD.vdomSignals && newVNode.$signal$) {
1031
- const textSig = newVNode.$signal$;
1032
- const textNode = elm;
1033
- signalNodeDisposers.set(textNode, effect(() => {
1034
- textNode.data = String(textSig.value);
1035
- }));
1036
- }
1051
+ if (BUILD.vdomSignals && newVNode.$signal$) wireTextSignal(elm, newVNode.$signal$);
1037
1052
  } else if (BUILD.slotRelocation && newVNode.$flags$ & VNODE_FLAGS.isSlotReference) {
1038
1053
  elm = newVNode.$elm$ = BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode) : win.document.createTextNode("");
1039
1054
  if (typeof newVNode.$attrs$?.slot === "string") elm["s-sa"] = newVNode.$attrs$.slot;
@@ -1301,7 +1316,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = fal
1301
1316
  }
1302
1317
  if (BUILD.vdomKey && idxInOld >= 0) {
1303
1318
  elmToMove = oldCh[idxInOld];
1304
- if (elmToMove.$tag$ !== newStartVnode.$tag$) node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
1319
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
1305
1320
  else {
1306
1321
  patch(elmToMove, newStartVnode, isInitialRender);
1307
1322
  oldCh[idxInOld] = void 0;
@@ -1394,7 +1409,17 @@ const patch = (oldVNode, newVNode, isInitialRender = false) => {
1394
1409
  else if (BUILD.hydrateClientSide && isInitialRender && BUILD.updatable && oldChildren !== null && newChildren === null) newVNode.$children$ = oldChildren;
1395
1410
  if (BUILD.svg && isSvgMode && tag === "svg") isSvgMode = false;
1396
1411
  } else if (BUILD.vdomText && BUILD.slotRelocation && (defaultHolder = elm["s-cr"])) defaultHolder.parentNode.textContent = text;
1397
- else if (BUILD.vdomText && oldVNode.$text$ !== text) elm.data = text;
1412
+ else if (BUILD.vdomText) {
1413
+ if (BUILD.vdomSignals && newVNode.$signal$) {
1414
+ if (newVNode.$signal$ !== oldVNode.$signal$) {
1415
+ disposeTextSignal(elm);
1416
+ wireTextSignal(elm, newVNode.$signal$);
1417
+ }
1418
+ } else {
1419
+ if (BUILD.vdomSignals && oldVNode.$signal$) disposeTextSignal(elm);
1420
+ if (oldVNode.$text$ !== text) elm.data = text;
1421
+ }
1422
+ }
1398
1423
  };
1399
1424
  /**
1400
1425
  * Component-global information about nodes which are either currently being
@@ -1526,7 +1526,7 @@ declare const transpileSync: (code: string, opts?: TranspileOptions) => Transpil
1526
1526
  * @param cmp the metadata for the component that a type definition string is generated for
1527
1527
  * @param typeImportData locally/imported/globally used type names, which may be used to prevent naming collisions
1528
1528
  * @param areTypesInternal `true` if types being generated are for a project's internal purposes, `false` otherwise
1529
- * @param signalBacking `true` if the component is using signal backing for its props; includes the signals map on the element interface
1529
+ * @param signalBacking `true` if the component is using signal backing for its props; includes the signals map on the element interface and unions JSX prop types with `ReadonlySignal<T>`
1530
1530
  * @returns the generated types string alongside additional metadata
1531
1531
  */
1532
1532
  declare const generateComponentTypes: (cmp: ComponentCompilerMeta, typeImportData: TypesImportData, areTypesInternal: boolean, signalBacking?: boolean) => TypesModule;
@@ -1501,12 +1501,13 @@ const scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector)
1501
1501
  else return shallowPart.trim();
1502
1502
  }).join(", ");
1503
1503
  };
1504
+ const isScopableAtRule = (selector) => selector.startsWith("@media") || selector.startsWith("@supports") || selector.startsWith("@page") || selector.startsWith("@document") || selector.startsWith("@layer");
1504
1505
  const scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
1505
1506
  return processRules(cssText, (rule) => {
1506
1507
  let selector = rule.selector;
1507
1508
  let content = rule.content;
1508
1509
  if (rule.selector[0] !== "@") selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
1509
- else if (rule.selector.startsWith("@media") || rule.selector.startsWith("@supports") || rule.selector.startsWith("@page") || rule.selector.startsWith("@document")) content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector);
1510
+ else if (isScopableAtRule(rule.selector)) content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector);
1510
1511
  return {
1511
1512
  selector: selector.replace(/\s{2,}/g, " ").trim(),
1512
1513
  content
@@ -1598,14 +1599,12 @@ const scopeCss = (cssText, scopeId, commentOriginalSelector) => {
1598
1599
  rule.selector = placeholder + rule.selector;
1599
1600
  return rule;
1600
1601
  };
1601
- cssText = processRules(cssText, (rule) => {
1602
+ const commentSelectors = (input) => processRules(input, (rule) => {
1602
1603
  if (rule.selector[0] !== "@") return processCommentedSelector(rule);
1603
- else if (rule.selector.startsWith("@media") || rule.selector.startsWith("@supports") || rule.selector.startsWith("@page") || rule.selector.startsWith("@document")) {
1604
- rule.content = processRules(rule.content, processCommentedSelector);
1605
- return rule;
1606
- }
1604
+ if (isScopableAtRule(rule.selector)) rule.content = commentSelectors(rule.content);
1607
1605
  return rule;
1608
1606
  });
1607
+ cssText = commentSelectors(cssText);
1609
1608
  }
1610
1609
  const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector);
1611
1610
  cssText = [scoped.cssText, ...commentsWithHash].join("\n");
@@ -1833,7 +1832,7 @@ const validateComponentTag = (tag) => {
1833
1832
  };
1834
1833
  //#endregion
1835
1834
  //#region src/version.ts
1836
- const version = "5.0.0-beta.1";
1835
+ const version = "5.0.0-beta.11";
1837
1836
  //#endregion
1838
1837
  //#region src/compiler/events.ts
1839
1838
  const buildEvents = () => {
@@ -3790,10 +3789,11 @@ const validateConfig = (userConfig = {}, bootstrapConfig) => {
3790
3789
  const devMode = isBoolean$1(config.devMode) ? config.devMode : false;
3791
3790
  config._isTesting = !!(process.env.VITEST || process.env.PLAYWRIGHT_TEST || process.env.TEST_WORKER_INDEX || process.env.TEST_PARALLEL_INDEX || false);
3792
3791
  const sys = config.sys ?? bootstrapConfig.sys ?? createNodeSys({ logger });
3792
+ const hasExplicitGlobalStyleWithInput = (config.outputTargets || []).some((o) => isOutputTargetGlobalStyle(o) && isString$1(o.input));
3793
3793
  if ((!isString$1(config.globalStyle) || !isString$1(config.globalScript)) && typeof sys.accessSync === "function") {
3794
3794
  const preRootDir = typeof config.rootDir !== "string" ? "/" : config.rootDir;
3795
3795
  const srcDir = typeof config.srcDir === "string" ? isAbsolute(config.srcDir) ? config.srcDir : join(preRootDir, config.srcDir) : join(preRootDir, "src");
3796
- if (!isString$1(config.globalStyle)) for (const ext of STYLE_EXT) {
3796
+ if (!isString$1(config.globalStyle) && !hasExplicitGlobalStyleWithInput) for (const ext of STYLE_EXT) {
3797
3797
  const candidate = join(srcDir, `global.${ext}`);
3798
3798
  if (sys.accessSync(candidate)) {
3799
3799
  config.globalStyle = candidate;
@@ -3813,7 +3813,7 @@ const validateConfig = (userConfig = {}, bootstrapConfig) => {
3813
3813
  ...config,
3814
3814
  devMode,
3815
3815
  compat: config.compat || {},
3816
- generateExportMaps: isBoolean$1(config.generateExportMaps) ? config.generateExportMaps : false,
3816
+ generateExportMaps: isBoolean$1(config.generateExportMaps) ? config.generateExportMaps : !isString$1(config.configPath),
3817
3817
  hydratedFlag: validateHydrated(config),
3818
3818
  logLevel,
3819
3819
  logger,
@@ -13195,14 +13195,16 @@ const parseWatchDecorator = (typeChecker, method, decoratorName) => {
13195
13195
  * @param diagnostics for surfacing errors and warnings
13196
13196
  * @param typeChecker a TypeScript typechecker instance
13197
13197
  * @param program a {@link ts.Program} object
13198
+ * @param includeClassExpressions also convert `ts.ClassExpression` nodes (e.g. a mixin factory's
13199
+ * `(Base) => class extends Base {}`), not just named `ts.ClassDeclaration`s
13198
13200
  * @returns a TypeScript transformer factory which can be passed to
13199
13201
  * TypeScript to transform source code during the compilation process
13200
13202
  */
13201
- const convertDecoratorsToStatic = (config, diagnostics, typeChecker, program) => {
13203
+ const convertDecoratorsToStatic = (config, diagnostics, typeChecker, program, includeClassExpressions = false) => {
13202
13204
  return (transformCtx) => {
13203
13205
  let sourceFile;
13204
13206
  const visit = (node) => {
13205
- if (ts$1.isClassDeclaration(node)) return visitClassDeclaration(config, diagnostics, typeChecker, program, node, sourceFile);
13207
+ if (ts$1.isClassDeclaration(node) || includeClassExpressions && ts$1.isClassExpression(node)) return visitClassDeclaration(config, diagnostics, typeChecker, program, node, sourceFile);
13206
13208
  return ts$1.visitEachChild(node, visit, transformCtx);
13207
13209
  };
13208
13210
  return (tsSourceFile) => {
@@ -13212,10 +13214,10 @@ const convertDecoratorsToStatic = (config, diagnostics, typeChecker, program) =>
13212
13214
  };
13213
13215
  };
13214
13216
  /**
13215
- * Visit {@link ts.ClassDeclaration} nodes as part of the tree-traversal
13217
+ * Visit {@link ts.ClassDeclaration}/{@link ts.ClassExpression} nodes as part of the tree-traversal
13216
13218
  * required for {@link convertDecoratorsToStatic} to work.
13217
13219
  *
13218
- * If a given class declaration node is not decorated with `@Component` this
13220
+ * If a given class node is not decorated with `@Component` this
13219
13221
  * function will simply return it as-is. If it _is_ decorated, then it will
13220
13222
  *
13221
13223
  * 1. Convert the arguments to the `@Component` decorator to static values.
@@ -13224,7 +13226,7 @@ const convertDecoratorsToStatic = (config, diagnostics, typeChecker, program) =>
13224
13226
  * to static values.
13225
13227
  * 3. Validate that the various options selected by the component author are
13226
13228
  * valid, both individually and in combination.
13227
- * 4. Return an updated class declaration node which is ready to be used in
13229
+ * 4. Return an updated class node which is ready to be used in
13228
13230
  * the rest of the Stencil compilation pipeline (e.g. in output target
13229
13231
  * generation).
13230
13232
  *
@@ -13243,7 +13245,7 @@ const visitClassDeclaration = (config, diagnostics, typeChecker, program, classN
13243
13245
  const decoratedMembers = classMembers.filter((member) => (retrieveTsDecorators(member)?.length ?? 0) > 0);
13244
13246
  if (!decoratedMembers.length && !componentDecorator) return classNode;
13245
13247
  const filteredMethodsAndFields = removeStencilMethodDecorators(Array.from(classMembers), diagnostics, importAliasMap);
13246
- if (componentDecorator) componentDecoratorToStatic(config, typeChecker, diagnostics, classNode, filteredMethodsAndFields, componentDecorator);
13248
+ if (componentDecorator && ts$1.isClassDeclaration(classNode)) componentDecoratorToStatic(config, typeChecker, diagnostics, classNode, filteredMethodsAndFields, componentDecorator);
13247
13249
  if (decoratedMembers.length > 0) {
13248
13250
  const serializers = serializeDecoratorsToStatic(typeChecker, decoratedMembers, filteredMethodsAndFields, importAliasMap.get("PropSerialize"), "PropSerialize", importAliasMap.get("Prop"));
13249
13251
  const deserializers = serializeDecoratorsToStatic(typeChecker, decoratedMembers, filteredMethodsAndFields, importAliasMap.get("AttrDeserialize"), "AttrDeserialize", importAliasMap.get("Prop"));
@@ -13259,7 +13261,8 @@ const visitClassDeclaration = (config, diagnostics, typeChecker, program, classN
13259
13261
  validateMethods(diagnostics, classMembers);
13260
13262
  const currentDecorators = retrieveTsDecorators(classNode);
13261
13263
  const updatedClassFields = updateConstructor(classNode, filteredMethodsAndFields, []);
13262
- return ts$1.factory.updateClassDeclaration(classNode, [...filterDecorators(currentDecorators, CLASS_DECORATORS_TO_REMOVE.map((decorator) => importAliasMap.get(decorator))) ?? [], ...retrieveTsModifiers(classNode) ?? []], classNode.name, classNode.typeParameters, classNode.heritageClauses, updatedClassFields);
13264
+ const updatedModifiers = [...filterDecorators(currentDecorators, CLASS_DECORATORS_TO_REMOVE.map((decorator) => importAliasMap.get(decorator))) ?? [], ...retrieveTsModifiers(classNode) ?? []];
13265
+ return ts$1.isClassDeclaration(classNode) ? ts$1.factory.updateClassDeclaration(classNode, updatedModifiers, classNode.name, classNode.typeParameters, classNode.heritageClauses, updatedClassFields) : ts$1.factory.updateClassExpression(classNode, updatedModifiers, classNode.name, classNode.typeParameters, classNode.heritageClauses, updatedClassFields);
13263
13266
  };
13264
13267
  /**
13265
13268
  * Take a list of `ClassElement` AST nodes and remove any decorators from
@@ -13870,11 +13873,11 @@ const parseStaticWatchers = (staticMembers) => {
13870
13873
  //#endregion
13871
13874
  //#region src/compiler/transformers/static-to-meta/class-extension/shared.ts
13872
13875
  /**
13873
- * Warns when an `extends`/`Mixin(...)` target resolved to *something* but no class declaration
13874
- * could be found inside it - e.g. a mixin factory whose class isn't a named declaration
13875
- * (`(Base) => class extends Base {}` rather than `(Base) => { class Foo extends Base {} return
13876
- * Foo; }`). Without this, the target is silently dropped: any `@Prop`/`@State` etc. it declares
13877
- * just never appears on the extending component, with no diagnostic explaining why.
13876
+ * Warns when an `extends`/`Mixin(...)` target resolved to *something* but no class literal
13877
+ * could be found inside it - e.g. a mixin factory that returns an existing class by reference
13878
+ * (`(Base) => SomeExistingClass`) rather than a class literal. Without this, the target is
13879
+ * silently dropped: any `@Prop`/`@State` etc. it declares just never appears on the extending
13880
+ * component, with no diagnostic explaining why.
13878
13881
  * @param buildCtx used to surface the warning - omit to warn silently (e.g. from tests)
13879
13882
  * @param targetName the identifier the target was reached through
13880
13883
  * @param anchor the node to attach the warning to
@@ -13882,27 +13885,32 @@ const parseStaticWatchers = (staticMembers) => {
13882
13885
  function warnMixinFactoryClassNotFound(buildCtx, targetName, anchor) {
13883
13886
  if (!buildCtx) return;
13884
13887
  const err = buildWarn(buildCtx.diagnostics);
13885
- err.messageText = `Found "${targetName}", but couldn't find a class declaration inside it. If it's meant to be a mixin factory, make sure it declares and returns a named class, e.g. \`(Base) => { class ${targetName}Class extends Base {} return ${targetName}Class; }\` - a factory that returns a class expression directly (\`(Base) => class extends Base {}\`) isn't recognized, and any \`@Prop\`/\`@State\`/etc. it declares won't be applied.`;
13888
+ err.messageText = `Found "${targetName}", but couldn't find a class inside it. If it's meant to be a mixin factory, make sure it returns a class literal directly, e.g. \`(Base) => class extends Base {}\` or \`(Base) => { class ${targetName}Class extends Base {} return ${targetName}Class; }\` - returning an existing class by reference (\`(Base) => SomeExistingClass\`) isn't recognized, and any \`@Prop\`/\`@State\`/etc. it declares won't be applied.`;
13886
13889
  if (!buildCtx.config._isTesting) augmentDiagnosticWithNode(err, anchor);
13887
13890
  }
13888
13891
  /**
13889
- * Walks the AST looking for a class declaration, optionally by name - descends
13890
- * into a mixin factory's wrapping function (arrow function or `function`
13891
- * declaration) body too, since a mixin factory's class is always nested one
13892
- * level inside it (e.g. `const Foo = (Base) => class extends Base {}`).
13892
+ * Walks the AST looking for a class declaration or class expression, optionally by name -
13893
+ * descends into a mixin factory's wrapping function (arrow function or `function` declaration)
13894
+ * body too, since a mixin factory's class is always nested one level inside it. Recognizes all of:
13895
+ * `const Foo = (Base) => class extends Base {}` (concise arrow body), `const Foo = (Base) => {
13896
+ * return class extends Base {}; }` (block body, `return` of a class expression), and `const Foo =
13897
+ * (Base) => { class FooClass extends Base {} return FooClass; }` (block body, named declaration).
13893
13898
  * @param node the node to search from
13894
- * @param name if given, only matches a class declaration with this name
13895
- * @returns the found class declaration, or `undefined`
13899
+ * @param name if given, only matches a class with this name
13900
+ * @returns the found class, or `undefined`
13896
13901
  */
13897
13902
  function findClassWalk(node, name) {
13898
13903
  if (!node) return void 0;
13899
- if (ts$1.isClassDeclaration(node)) {
13904
+ if (ts$1.isClassDeclaration(node) || ts$1.isClassExpression(node)) {
13900
13905
  if (!name || node.name?.text === name) return node;
13901
13906
  } else if (ts$1.isVariableDeclaration(node) && (!name || name === node.name?.text) && node.initializer && ts$1.isArrowFunction(node.initializer)) {
13907
+ const body = node.initializer.body;
13908
+ if (ts$1.isClassExpression(body)) return body;
13902
13909
  let found;
13903
- ts$1.forEachChild(node.initializer.body, (child) => {
13910
+ ts$1.forEachChild(body, (child) => {
13904
13911
  if (found) return;
13905
13912
  if (ts$1.isClassDeclaration(child)) found = child;
13913
+ else if (ts$1.isReturnStatement(child) && child.expression && ts$1.isClassExpression(child.expression)) found = child.expression;
13906
13914
  });
13907
13915
  return found;
13908
13916
  }
@@ -13915,6 +13923,22 @@ function findClassWalk(node, name) {
13915
13923
  return found;
13916
13924
  }
13917
13925
  /**
13926
+ * The declared name of a mixin-factory statement (`function Foo() {}`, or `const Foo = ...`) -
13927
+ * survives the decorator-to-static-getter transform even when the factory's inner class doesn't
13928
+ * have a name of its own, so it can anchor a post-transform re-lookup via `findClassWalk`.
13929
+ * @param node the factory statement (or its variable declaration) to read a name from
13930
+ * @returns the declared name, or `undefined` if it can't be determined
13931
+ */
13932
+ function factoryDeclaredName(node) {
13933
+ if (!node) return void 0;
13934
+ if (ts$1.isFunctionDeclaration(node)) return node.name?.text;
13935
+ if (ts$1.isVariableDeclaration(node)) return ts$1.isIdentifier(node.name) ? node.name.text : void 0;
13936
+ if (ts$1.isVariableStatement(node)) {
13937
+ const decl = node.declarationList.declarations[0];
13938
+ return decl && ts$1.isIdentifier(decl.name) ? decl.name.text : void 0;
13939
+ }
13940
+ }
13941
+ /**
13918
13942
  * Matches a top-level class/function/variable declaration by name - the three
13919
13943
  * shapes a mixin or base-class export can take (a plain class, a mixin
13920
13944
  * factory function declaration, or a mixin factory assigned to a `const`).
@@ -14036,7 +14060,7 @@ function convertDiskSourceFileDecorators(sourceFile, config, target = ts$1.Scrip
14036
14060
  const program = ts$1.createProgram([sourceFile.fileName], compilerOptions, host);
14037
14061
  const typeChecker = program.getTypeChecker();
14038
14062
  const ownSourceFile = program.getSourceFile(sourceFile.fileName) ?? sourceFile;
14039
- const result = ts$1.transform(ownSourceFile, [convertDecoratorsToStatic(config, [], typeChecker, program)]);
14063
+ const result = ts$1.transform(ownSourceFile, [convertDecoratorsToStatic(config, [], typeChecker, program, true)]);
14040
14064
  const printed = ts$1.createPrinter({ removeComments: false }).printFile(result.transformed[0]);
14041
14065
  return ts$1.createSourceFile(sourceFile.fileName, printed, target, true);
14042
14066
  }
@@ -14123,6 +14147,7 @@ function buildExtendsTree(compilerCtx, classDeclaration, dependentClasses, typeC
14123
14147
  const targetScriptTarget = (ogModule?.staticSourceFile)?.languageVersion ?? ts$1.ScriptTarget.ESNext;
14124
14148
  let classIdentifiers = [];
14125
14149
  let foundClassDeclaration;
14150
+ let foundClassName;
14126
14151
  let keepLooking = true;
14127
14152
  extendsClause.types.forEach((type) => {
14128
14153
  if (ts$1.isExpressionWithTypeArguments(type) && ts$1.isCallExpression(type.expression) && type.expression.expression.getText() === "Mixin") classIdentifiers = type.expression.arguments.filter(ts$1.isIdentifier);
@@ -14139,9 +14164,11 @@ function buildExtendsTree(compilerCtx, classDeclaration, dependentClasses, typeC
14139
14164
  declarations = [...source.statements];
14140
14165
  }
14141
14166
  foundClassDeclaration = declarations?.find(ts$1.isClassDeclaration);
14167
+ foundClassName = foundClassDeclaration?.name?.getText();
14142
14168
  if (!foundClassDeclaration) {
14143
14169
  const node = declarations?.[0];
14144
14170
  foundClassDeclaration = findClassWalk(node);
14171
+ foundClassName = foundClassDeclaration?.name?.getText() ?? factoryDeclaredName(node);
14145
14172
  if (!node) throw "revert to sad path";
14146
14173
  keepLooking = false;
14147
14174
  if (!foundClassDeclaration) warnMixinFactoryClassNotFound(buildCtx, extendee.getText(), classDeclaration);
@@ -14150,7 +14177,7 @@ function buildExtendsTree(compilerCtx, classDeclaration, dependentClasses, typeC
14150
14177
  const foundModule = compilerCtx.moduleMap.get(foundClassDeclaration.getSourceFile().fileName);
14151
14178
  if (foundModule) {
14152
14179
  const moduleSourceFile = foundModule.staticSourceFile;
14153
- const sourceClass = findClassWalk(moduleSourceFile, foundClassDeclaration.name?.getText());
14180
+ const sourceClass = findClassWalk(moduleSourceFile, foundClassName);
14154
14181
  if (sourceClass) {
14155
14182
  dependentClasses.push({
14156
14183
  classNode: sourceClass,
@@ -14171,20 +14198,24 @@ function buildExtendsTree(compilerCtx, classDeclaration, dependentClasses, typeC
14171
14198
  if (!buildCtx.config._isTesting) augmentDiagnosticWithNode(err, classDeclaration);
14172
14199
  return;
14173
14200
  }
14174
- if (matchedStatement && ts$1.isClassDeclaration(matchedStatement)) foundClassDeclaration = matchedStatement;
14175
- else if (matchedStatement) {
14201
+ if (matchedStatement && ts$1.isClassDeclaration(matchedStatement)) {
14202
+ foundClassDeclaration = matchedStatement;
14203
+ foundClassName = foundClassDeclaration.name?.getText();
14204
+ } else if (matchedStatement) {
14176
14205
  foundClassDeclaration = findClassWalk(matchedStatement);
14206
+ foundClassName = foundClassDeclaration?.name?.getText() ?? extendee.getText();
14177
14207
  keepLooking = false;
14178
14208
  if (!foundClassDeclaration) warnMixinFactoryClassNotFound(buildCtx, extendee.getText(), classDeclaration);
14179
14209
  } else {
14180
14210
  foundClassDeclaration = findClassWalk(currentSource, extendee.getText());
14211
+ foundClassName = foundClassDeclaration?.name?.getText() ?? extendee.getText();
14181
14212
  keepLooking = false;
14182
14213
  }
14183
14214
  if (foundClassDeclaration && !dependentClasses.some((dc) => dc.classNode === foundClassDeclaration)) {
14184
14215
  const foundModule = compilerCtx.moduleMap.get(currentSource.fileName);
14185
14216
  if (foundModule?.staticSourceFile) {
14186
14217
  const transformedSource = foundModule.staticSourceFile;
14187
- const transformedClass = findClassWalk(transformedSource, foundClassDeclaration.name?.getText());
14218
+ const transformedClass = findClassWalk(transformedSource, foundClassName);
14188
14219
  if (transformedClass) {
14189
14220
  dependentClasses.push({
14190
14221
  classNode: transformedClass,
@@ -14469,7 +14500,7 @@ function convertInMemorySourceDecorators(sourceFile, config) {
14469
14500
  const program = ts$1.createProgram([sourceFile.fileName], compilerOptions, compilerHost);
14470
14501
  const typeChecker = program.getTypeChecker();
14471
14502
  const ownSourceFile = program.getSourceFile(sourceFile.fileName) ?? sourceFile;
14472
- const result = ts$1.transform(ownSourceFile, [convertDecoratorsToStatic(config, [], typeChecker, program)]);
14503
+ const result = ts$1.transform(ownSourceFile, [convertDecoratorsToStatic(config, [], typeChecker, program, true)]);
14473
14504
  const printed = ts$1.createPrinter({ removeComments: false }).printFile(result.transformed[0]);
14474
14505
  const scriptKind = sourceFile.fileName.endsWith(".tsx") || sourceFile.fileName.endsWith(".ts") ? ts$1.ScriptKind.TSX : ts$1.ScriptKind.JS;
14475
14506
  return ts$1.createSourceFile(sourceFile.fileName, printed, sourceFile.languageVersion, true, scriptKind);
@@ -14644,7 +14675,8 @@ function resolveAncestors(classNode, sf, path, resolveImport, visited, ancestors
14644
14675
  ancestors.push({
14645
14676
  classNode: foundClass,
14646
14677
  sourceFile: foundSf,
14647
- path: foundPath
14678
+ path: foundPath,
14679
+ factoryName: parentName
14648
14680
  });
14649
14681
  if (keepLooking) resolveAncestors(foundClass, foundSf, foundPath, resolveImport, visited, ancestors, rootClassDeclaration, buildCtx);
14650
14682
  }
@@ -14661,8 +14693,8 @@ function resolveAncestors(classNode, sf, path, resolveImport, visited, ancestors
14661
14693
  * @returns the ancestor's metadata
14662
14694
  */
14663
14695
  function extractAncestorMeta(ancestor, cmpSourceFile, resolveImport, config) {
14664
- const { classNode, sourceFile: parentSf, path: resolvedPath } = ancestor;
14665
- const className = classNode.name?.text;
14696
+ const { classNode, sourceFile: parentSf, path: resolvedPath, factoryName } = ancestor;
14697
+ const className = classNode.name?.text ?? factoryName;
14666
14698
  const parentStaticMembers = classNode.members.filter(isStaticGetter);
14667
14699
  let resolvedClassNode = classNode;
14668
14700
  let resolvedStaticMembers = parentStaticMembers;
@@ -16280,7 +16312,7 @@ const FORM_ASSOCIATED_ATTRIBUTES = [
16280
16312
  * @param cmp the metadata for the component that a type definition string is generated for
16281
16313
  * @param typeImportData locally/imported/globally used type names, which may be used to prevent naming collisions
16282
16314
  * @param areTypesInternal `true` if types being generated are for a project's internal purposes, `false` otherwise
16283
- * @param signalBacking `true` if the component is using signal backing for its props; includes the signals map on the element interface
16315
+ * @param signalBacking `true` if the component is using signal backing for its props; includes the signals map on the element interface and unions JSX prop types with `ReadonlySignal<T>`
16284
16316
  * @returns the generated types string alongside additional metadata
16285
16317
  */
16286
16318
  const generateComponentTypes = (cmp, typeImportData, areTypesInternal, signalBacking = false) => {
@@ -16297,8 +16329,12 @@ const generateComponentTypes = (cmp, typeImportData, areTypesInternal, signalBac
16297
16329
  const isDep = cmp.isCollectionDependency;
16298
16330
  const propNames = new Set(propAttributes.map((p) => p.name));
16299
16331
  const formAssociatedAttrs = cmp.formAssociated ? FORM_ASSOCIATED_ATTRIBUTES.filter((attr) => !propNames.has(attr.name)) : [];
16332
+ const jsxPropAttributes = signalBacking ? propAttributes.map((attr) => ({
16333
+ ...attr,
16334
+ type: `${attr.type} | ReadonlySignal<${attr.type}>`
16335
+ })) : propAttributes;
16300
16336
  const jsxAttributes = attributesToMultiLineString([
16301
- ...propAttributes,
16337
+ ...jsxPropAttributes,
16302
16338
  ...eventAttributes,
16303
16339
  ...formAssociatedAttrs
16304
16340
  ], true, areTypesInternal);
@@ -1,4 +1,4 @@
1
- import { $ as CompilerSystemRemoveDirectoryResults, $n as JsonDocMethodParameter, $t as OutputTargetDocsReadme, A as CompilerDependency, An as StencilDevServerConfig, At as LogLevel, B as CompilerEventFsChange, Bn as WatcherCloseResults, Bt as OutputTarget, C as CacheStorage, Cn as SerializeDocumentOptions, Ct as HydrateFactoryOptions, D as Compiler, Dn as SsrDocumentOptions, Dt as LightDomPatches, E as CompileTarget, En as SitemapXmpResults, Et as LazyRequire, F as CompilerEventDirAdd, Fn as TranspileOptions, Ft as NodeResolveConfig, G as CompilerFsStats, Gt as OutputTargetCollection, H as CompilerFileWatcher, Hn as WorkerOptions, Ht as OutputTargetBase, I as CompilerEventDirDelete, In as TranspileResults, It as OptimizeCssInput, J as CompilerSystem, Jt as OutputTargetDistLazy, K as CompilerRequest, Kt as OutputTargetCopy, L as CompilerEventFileAdd, Ln as UnvalidatedConfig, Lt as OptimizeCssOutput, M as CompilerEventBuildLog, Mn as SystemDetails, Mt as LoggerLineUpdater, N as CompilerEventBuildNoChange, Nn as TransformOptions, Nt as LoggerTimeSpan, O as CompilerBuildResults, On as SsrFactoryOptions, Ot as LoadConfigInit, P as CompilerEventBuildStart, Pn as TranspileOnlyResults, Pt as ModeConfig, Q as CompilerSystemRemoveDirectoryOptions, Qt as OutputTargetDocsJson, R as CompilerEventFileDelete, Rn as ValidatedConfig, Rt as OptimizeJsInput, S as BuildResultsComponentGraph, Sn as RolldownConfig, St as HydrateDocumentOptions, T as CompileScriptMinifyOptions, Tn as SitemapXmpOpts, Tt as LOG_LEVELS, U as CompilerFileWatcherCallback, Ut as OutputTargetBaseNext, V as CompilerEventName, Vn as WorkerMainController, Vt as OutputTargetAssets, W as CompilerFileWatcherEvent, Wt as OutputTargetBuild, X as CompilerSystemCreateDirectoryResults, Xt as OutputTargetDocsCustom, Y as CompilerSystemCreateDirectoryOptions, Yt as OutputTargetDocsAgentSkill, Z as CompilerSystemRealpathResults, Zt as OutputTargetDocsCustomElementsManifest, _ as BuildNoChangeResults, _n as ResolveModuleIdOptions, _r as FsWriteResults, _t as DocsReadmeCustomColumn, an as OutputTargetStandalone, ar as JsonDocsListener, at as Config, b as BuildOutput, bn as RobotsTxtOpts, bt as HmrStyleUpdate, c as PrintLine, cn as OutputTargetWww, cr as JsonDocsPart, ct as CopyResults, d as SsrResults, dn as PlatformPath, dr as JsonDocsStyle, dt as CustomElementsExportBehavior, en as OutputTargetDocsVscode, er as JsonDocs, et as CompilerSystemRemoveFileResults, f as WorkerMsgHandler, fn as PrerenderConfig, fr as JsonDocsTag, ft as CustomElementsExportBehaviorOptions, g as BuildLog, gn as PrerenderStartOptions, gr as StyleDoc, gt as Diagnostic, h as BuildEvents, hn as PrerenderResults, hr as JsonDocsValue, ht as DevServerEditor, i as ComponentCompilerTypeReferences, in as OutputTargetSsrWasm, ir as JsonDocsEvent, it as CompilerWatcher, j as CompilerEventBuildFinish, jn as StencilDocsConfig, jt as Logger, k as CompilerBuildStart, kn as StencilConfig, kt as LoadConfigResults, ln as PageReloadStrategy, lr as JsonDocsProp, lt as CopyTask, m as BuildEmitEvents, mn as PrerenderOptions, mr as JsonDocsUsage, mt as DevServerConfig, n as CompilerWorkerContext, nn as OutputTargetLoaderBundle, nr as JsonDocsCustomState, nt as CompilerSystemRenamedPath, o as LazyBundlesRuntimeData, on as OutputTargetStats, or as JsonDocsMethod, ot as ConfigBundle, p as AutoprefixerOptions, pn as PrerenderHydrateOptions, pr as JsonDocsTypeLibrary, pt as DevServer, q as CompilerRequestResponse, qt as OutputTargetCustom, r as ComponentCompilerMeta, rn as OutputTargetSsr, rr as JsonDocsDependencyGraph, rt as CompilerSystemWriteFileResults, s as PackageJsonData, sn as OutputTargetTypes, sr as JsonDocsMethodReturn, st as ConfigCompat, tn as OutputTargetGlobalStyle, tr as JsonDocsComponent, tt as CompilerSystemRenameResults, un as ParsedPath, ur as JsonDocsSlot, ut as Credentials, v as BuildOnEventRemove, vn as ResolveModuleIdResults, vt as FsWatchResults, w as CliInitOptions, wn as ServiceWorkerConfig, wt as HydratedFlag, x as BuildOverrides, xn as RobotsTxtResults, xt as HotModuleReplacement, y as BuildOnEvents, yn as ResolveModuleOptions, yt as HistoryApiFallback, z as CompilerEventFileUpdate, zn as ValidatedOutputTargetWww, zt as OptimizeJsOutput } from "../index-BopBfjPu.mjs";
1
+ import { $ as CompilerSystemRemoveDirectoryResults, $n as JsonDocMethodParameter, $t as OutputTargetDocsReadme, A as CompilerDependency, An as StencilDevServerConfig, At as LogLevel, B as CompilerEventFsChange, Bn as WatcherCloseResults, Bt as OutputTarget, C as CacheStorage, Cn as SerializeDocumentOptions, Ct as HydrateFactoryOptions, D as Compiler, Dn as SsrDocumentOptions, Dt as LightDomPatches, E as CompileTarget, En as SitemapXmpResults, Et as LazyRequire, F as CompilerEventDirAdd, Fn as TranspileOptions, Ft as NodeResolveConfig, G as CompilerFsStats, Gt as OutputTargetCollection, H as CompilerFileWatcher, Hn as WorkerOptions, Ht as OutputTargetBase, I as CompilerEventDirDelete, In as TranspileResults, It as OptimizeCssInput, J as CompilerSystem, Jt as OutputTargetDistLazy, K as CompilerRequest, Kt as OutputTargetCopy, L as CompilerEventFileAdd, Ln as UnvalidatedConfig, Lt as OptimizeCssOutput, M as CompilerEventBuildLog, Mn as SystemDetails, Mt as LoggerLineUpdater, N as CompilerEventBuildNoChange, Nn as TransformOptions, Nt as LoggerTimeSpan, O as CompilerBuildResults, On as SsrFactoryOptions, Ot as LoadConfigInit, P as CompilerEventBuildStart, Pn as TranspileOnlyResults, Pt as ModeConfig, Q as CompilerSystemRemoveDirectoryOptions, Qt as OutputTargetDocsJson, R as CompilerEventFileDelete, Rn as ValidatedConfig, Rt as OptimizeJsInput, S as BuildResultsComponentGraph, Sn as RolldownConfig, St as HydrateDocumentOptions, T as CompileScriptMinifyOptions, Tn as SitemapXmpOpts, Tt as LOG_LEVELS, U as CompilerFileWatcherCallback, Ut as OutputTargetBaseNext, V as CompilerEventName, Vn as WorkerMainController, Vt as OutputTargetAssets, W as CompilerFileWatcherEvent, Wt as OutputTargetBuild, X as CompilerSystemCreateDirectoryResults, Xt as OutputTargetDocsCustom, Y as CompilerSystemCreateDirectoryOptions, Yt as OutputTargetDocsAgentSkill, Z as CompilerSystemRealpathResults, Zt as OutputTargetDocsCustomElementsManifest, _ as BuildNoChangeResults, _n as ResolveModuleIdOptions, _r as FsWriteResults, _t as DocsReadmeCustomColumn, an as OutputTargetStandalone, ar as JsonDocsListener, at as Config, b as BuildOutput, bn as RobotsTxtOpts, bt as HmrStyleUpdate, c as PrintLine, cn as OutputTargetWww, cr as JsonDocsPart, ct as CopyResults, d as SsrResults, dn as PlatformPath, dr as JsonDocsStyle, dt as CustomElementsExportBehavior, en as OutputTargetDocsVscode, er as JsonDocs, et as CompilerSystemRemoveFileResults, f as WorkerMsgHandler, fn as PrerenderConfig, fr as JsonDocsTag, ft as CustomElementsExportBehaviorOptions, g as BuildLog, gn as PrerenderStartOptions, gr as StyleDoc, gt as Diagnostic, h as BuildEvents, hn as PrerenderResults, hr as JsonDocsValue, ht as DevServerEditor, i as ComponentCompilerTypeReferences, in as OutputTargetSsrWasm, ir as JsonDocsEvent, it as CompilerWatcher, j as CompilerEventBuildFinish, jn as StencilDocsConfig, jt as Logger, k as CompilerBuildStart, kn as StencilConfig, kt as LoadConfigResults, ln as PageReloadStrategy, lr as JsonDocsProp, lt as CopyTask, m as BuildEmitEvents, mn as PrerenderOptions, mr as JsonDocsUsage, mt as DevServerConfig, n as CompilerWorkerContext, nn as OutputTargetLoaderBundle, nr as JsonDocsCustomState, nt as CompilerSystemRenamedPath, o as LazyBundlesRuntimeData, on as OutputTargetStats, or as JsonDocsMethod, ot as ConfigBundle, p as AutoprefixerOptions, pn as PrerenderHydrateOptions, pr as JsonDocsTypeLibrary, pt as DevServer, q as CompilerRequestResponse, qt as OutputTargetCustom, r as ComponentCompilerMeta, rn as OutputTargetSsr, rr as JsonDocsDependencyGraph, rt as CompilerSystemWriteFileResults, s as PackageJsonData, sn as OutputTargetTypes, sr as JsonDocsMethodReturn, st as ConfigCompat, tn as OutputTargetGlobalStyle, tr as JsonDocsComponent, tt as CompilerSystemRenameResults, un as ParsedPath, ur as JsonDocsSlot, ut as Credentials, v as BuildOnEventRemove, vn as ResolveModuleIdResults, vt as FsWatchResults, w as CliInitOptions, wn as ServiceWorkerConfig, wt as HydratedFlag, x as BuildOverrides, xn as RobotsTxtResults, xt as HotModuleReplacement, y as BuildOnEvents, yn as ResolveModuleOptions, yt as HistoryApiFallback, z as CompilerEventFileUpdate, zn as ValidatedOutputTargetWww, zt as OptimizeJsOutput } from "../index-Cw1NW9FW.mjs";
2
2
  import ts from "typescript";
3
3
  //#region src/version.d.ts
4
4
  declare const version: string;
@@ -1,3 +1,3 @@
1
- import { _ as buildId, a as createPrerenderer, b as versions, c as createWorkerContext, d as nodeRequire, f as optimizeCss, g as getScopeId, h as cmpMetaToDocsComponent, i as createSystem, l as createWorkerMessageHandler, m as generateManifest, n as transpile, o as loadConfig, p as validateConfig, r as transpileSync, s as createCompiler, t as ts, u as optimizeJs, v as vermoji, x as scopeCss, y as version } from "../compiler-CJG6qvQt.mjs";
2
- import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-75gQKkFz.mjs";
1
+ import { _ as buildId, a as createPrerenderer, b as versions, c as createWorkerContext, d as nodeRequire, f as optimizeCss, g as getScopeId, h as cmpMetaToDocsComponent, i as createSystem, l as createWorkerMessageHandler, m as generateManifest, n as transpile, o as loadConfig, p as validateConfig, r as transpileSync, s as createCompiler, t as ts, u as optimizeJs, v as vermoji, x as scopeCss, y as version } from "../compiler-2EypBn_Y.mjs";
2
+ import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-HKfDhPR3.mjs";
3
3
  export { CustomElementsExportBehaviorOptions, LOG_LEVELS, buildId, cmpMetaToDocsComponent, createCompiler, createPrerenderer, createSystem, createWorkerContext, createWorkerMessageHandler, generateManifest, getScopeId, loadConfig, nodeRequire, optimizeCss, optimizeJs, scopeCss, transpile, transpileSync, ts, validateConfig, vermoji, version, versions };
@@ -1,4 +1,4 @@
1
- import { $i as HOST_FLAGS, $r as isOutputTargetDocsCustom, Ai as isRolldownError, Ar as isTsFile, Bi as COPY, Br as FilterComponentsResult, Ci as escapeHtml, Cr as createJsVarName, Di as loadTypeScriptDiagnostic, Dr as isDtsFile, Ei as augmentDiagnosticWithNode, Er as hasDependency, Fi as ASSETS, Fr as getInlineSourceMappingUrlLinker, Gi as DOCS_CUSTOM, Gr as getComponentsFromModules, Hi as DEFAULT_STYLE_MODE, Hr as filterExcludedComponents, Ii as CMP_FLAGS, Ir as getSourceMappingUrlForEndOfFile, Ji as DOCS_README, Jr as isOutputTargetCopy, Ki as DOCS_CUSTOM_ELEMENTS_MANIFEST, Kr as isOutputTargetAssets, Li as COLLECTION, Lr as getSourceMappingUrlLinker, Mi as formatComponentRuntimeMeta, Mr as parsePackageJson, Ni as formatLazyBundleRuntimeMeta, Nr as readOnlyArrayHasStringMember, Oi as loadTypeScriptDiagnostics, Or as isJsFile, Pi as stringifyRuntimeData, Pr as readPackageJson, Qi as GLOBAL_STYLE, Qr as isOutputTargetDocsAgentSkill, Ri as COLLECTION_APP_DATA_FILE_NAME, Rr as rolldownToStencilSourceMap, Si as shouldIgnoreError, Sr as addDocBlock, Ti as splitLineBreaks, Tr as getTextDocs, Ui as DIST_LAZY, Ur as getComponentsDtsSrcFilePath, Vi as CUSTOM, Vr as filterActiveTargets, Wi as DOCS_AGENT_SKILL, Wr as getComponentsDtsTypesFilePath, Xi as EVENT_FLAGS, Xr as isOutputTargetDistLazy, Yi as DOCS_VSCODE, Yr as isOutputTargetCustom, Zi as GENERATED_DTS, Zr as isOutputTargetDocs, _i as buildJsonFileError, aa as SSR, ai as isOutputTargetLoaderBundle, bi as hasError, br as validateComponentTag, ca as STATS, ci as isOutputTargetStandalone, da as TYPES, di as isOutputTargetWww, ea as HTML_NS, ei as isOutputTargetDocsCustomElementsManifest, fa as VALID_CONFIG_OUTPUT_TARGETS, fi as isValidConfigOutputTarget, gi as buildError, ha as XLINK_NS, hi as TASK_CANCELED_MSG, ia as NODE_TYPES, ii as isOutputTargetGlobalStyle, ji as loadRolldownDiagnostics, jr as isTsxFile, ki as createOnWarnFn, kr as isJsxFile, la as STYLE_EXT, li as isOutputTargetStats, ma as WWW, mi as shouldExcludeComponent, na as LOADER_BUNDLE, ni as isOutputTargetDocsReadme, oa as SSR_WASM, oi as isOutputTargetSsr, pa as WATCH_FLAGS, pi as relativeImport, qi as DOCS_JSON, qr as isOutputTargetCollection, ra as MEMBER_FLAGS, ri as isOutputTargetDocsVscode, sa as STANDALONE, si as isOutputTargetSsrWasm, ta as LISTENER_FLAGS, ti as isOutputTargetDocsJson, ua as SVG_NS, ui as isOutputTargetTypes, vi as buildWarn, vr as ModeValidationError, wi as normalizeDiagnostics, wr as generatePreamble, xi as hasWarning, xr as ParsePackageJsonResult, yi as catchError, yr as validateComponentModes, zi as COLLECTION_MANIFEST_FILE_NAME, zr as result_d_exports } from "../../index-BopBfjPu.mjs";
1
+ import { $i as HOST_FLAGS, $r as isOutputTargetDocsCustom, Ai as isRolldownError, Ar as isTsFile, Bi as COPY, Br as FilterComponentsResult, Ci as escapeHtml, Cr as createJsVarName, Di as loadTypeScriptDiagnostic, Dr as isDtsFile, Ei as augmentDiagnosticWithNode, Er as hasDependency, Fi as ASSETS, Fr as getInlineSourceMappingUrlLinker, Gi as DOCS_CUSTOM, Gr as getComponentsFromModules, Hi as DEFAULT_STYLE_MODE, Hr as filterExcludedComponents, Ii as CMP_FLAGS, Ir as getSourceMappingUrlForEndOfFile, Ji as DOCS_README, Jr as isOutputTargetCopy, Ki as DOCS_CUSTOM_ELEMENTS_MANIFEST, Kr as isOutputTargetAssets, Li as COLLECTION, Lr as getSourceMappingUrlLinker, Mi as formatComponentRuntimeMeta, Mr as parsePackageJson, Ni as formatLazyBundleRuntimeMeta, Nr as readOnlyArrayHasStringMember, Oi as loadTypeScriptDiagnostics, Or as isJsFile, Pi as stringifyRuntimeData, Pr as readPackageJson, Qi as GLOBAL_STYLE, Qr as isOutputTargetDocsAgentSkill, Ri as COLLECTION_APP_DATA_FILE_NAME, Rr as rolldownToStencilSourceMap, Si as shouldIgnoreError, Sr as addDocBlock, Ti as splitLineBreaks, Tr as getTextDocs, Ui as DIST_LAZY, Ur as getComponentsDtsSrcFilePath, Vi as CUSTOM, Vr as filterActiveTargets, Wi as DOCS_AGENT_SKILL, Wr as getComponentsDtsTypesFilePath, Xi as EVENT_FLAGS, Xr as isOutputTargetDistLazy, Yi as DOCS_VSCODE, Yr as isOutputTargetCustom, Zi as GENERATED_DTS, Zr as isOutputTargetDocs, _i as buildJsonFileError, aa as SSR, ai as isOutputTargetLoaderBundle, bi as hasError, br as validateComponentTag, ca as STATS, ci as isOutputTargetStandalone, da as TYPES, di as isOutputTargetWww, ea as HTML_NS, ei as isOutputTargetDocsCustomElementsManifest, fa as VALID_CONFIG_OUTPUT_TARGETS, fi as isValidConfigOutputTarget, gi as buildError, ha as XLINK_NS, hi as TASK_CANCELED_MSG, ia as NODE_TYPES, ii as isOutputTargetGlobalStyle, ji as loadRolldownDiagnostics, jr as isTsxFile, ki as createOnWarnFn, kr as isJsxFile, la as STYLE_EXT, li as isOutputTargetStats, ma as WWW, mi as shouldExcludeComponent, na as LOADER_BUNDLE, ni as isOutputTargetDocsReadme, oa as SSR_WASM, oi as isOutputTargetSsr, pa as WATCH_FLAGS, pi as relativeImport, qi as DOCS_JSON, qr as isOutputTargetCollection, ra as MEMBER_FLAGS, ri as isOutputTargetDocsVscode, sa as STANDALONE, si as isOutputTargetSsrWasm, ta as LISTENER_FLAGS, ti as isOutputTargetDocsJson, ua as SVG_NS, ui as isOutputTargetTypes, vi as buildWarn, vr as ModeValidationError, wi as normalizeDiagnostics, wr as generatePreamble, xi as hasWarning, xr as ParsePackageJsonResult, yi as catchError, yr as validateComponentModes, zi as COLLECTION_MANIFEST_FILE_NAME, zr as result_d_exports } from "../../index-Cw1NW9FW.mjs";
2
2
  //#region src/utils/byte-size.d.ts
3
3
  /**
4
4
  * Used to learn the size of a string in bytes.