@absolutejs/absolute 0.19.0-beta.923 → 0.19.0-beta.925

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,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-1StGYU/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-V4sB2h/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-1StGYU/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-V4sB2h/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
48
48
  getWarningController()?.maybeWarn(primitiveName);
49
49
  };
50
50
 
51
- // .angular-partial-tmp-1StGYU/src/core/streamingSlotRegistry.ts
51
+ // .angular-partial-tmp-V4sB2h/src/core/streamingSlotRegistry.ts
52
52
  var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
53
53
  var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
54
54
  var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
package/dist/build.js CHANGED
@@ -18742,6 +18742,33 @@ var fail = (reason, detail, location) => ({
18742
18742
  }
18743
18743
  }
18744
18744
  return false;
18745
+ }, CONTROL_CREATE_METHOD_NAME = "\u0275ngControlCreate", extractControlCreate = (cls) => {
18746
+ for (const member of cls.members) {
18747
+ if (!ts7.isMethodDeclaration(member))
18748
+ continue;
18749
+ if (member.modifiers?.some((m) => m.kind === ts7.SyntaxKind.StaticKeyword))
18750
+ continue;
18751
+ const name = member.name;
18752
+ if (name === undefined)
18753
+ continue;
18754
+ const nameText = ts7.isIdentifier(name) ? name.text : name.getText();
18755
+ if (nameText !== CONTROL_CREATE_METHOD_NAME)
18756
+ continue;
18757
+ const firstParam = member.parameters[0];
18758
+ if (firstParam === undefined || firstParam.type === undefined || !ts7.isTypeReferenceNode(firstParam.type)) {
18759
+ return { passThroughInput: null };
18760
+ }
18761
+ const typeArgs = firstParam.type.typeArguments;
18762
+ if (typeArgs === undefined || typeArgs.length !== 1) {
18763
+ return { passThroughInput: null };
18764
+ }
18765
+ const arg = typeArgs[0];
18766
+ if (arg === undefined || !ts7.isLiteralTypeNode(arg) || !ts7.isStringLiteral(arg.literal)) {
18767
+ return { passThroughInput: null };
18768
+ }
18769
+ return { passThroughInput: arg.literal.text };
18770
+ }
18771
+ return null;
18745
18772
  }, resolveEnumPropertyAccess = (expr, enumName, values) => {
18746
18773
  if (!ts7.isPropertyAccessExpression(expr))
18747
18774
  return null;
@@ -18917,30 +18944,36 @@ var fail = (reason, detail, location) => ({
18917
18944
  }, extractInputsAndOutputs = (cls, compiler) => {
18918
18945
  const inputs = {};
18919
18946
  const outputs = {};
18947
+ let hasDecoratorIO = false;
18948
+ let hasSignalIO = false;
18920
18949
  for (const member of cls.members) {
18921
18950
  if (!ts7.isPropertyDeclaration(member))
18922
18951
  continue;
18923
18952
  const decoratorIn = extractDecoratorInput(member, compiler);
18924
18953
  if (decoratorIn) {
18925
18954
  inputs[decoratorIn.classPropertyName] = decoratorIn.meta;
18955
+ hasDecoratorIO = true;
18926
18956
  continue;
18927
18957
  }
18928
18958
  const signalIn = extractSignalInput(member, compiler);
18929
18959
  if (signalIn) {
18930
18960
  inputs[signalIn.classPropertyName] = signalIn.meta;
18961
+ hasSignalIO = true;
18931
18962
  continue;
18932
18963
  }
18933
18964
  const decoratorOut = extractDecoratorOutput(member);
18934
18965
  if (decoratorOut) {
18935
18966
  outputs[decoratorOut.classPropertyName] = decoratorOut.bindingName;
18967
+ hasDecoratorIO = true;
18936
18968
  continue;
18937
18969
  }
18938
18970
  const signalOut = extractSignalOutput(member);
18939
18971
  if (signalOut) {
18940
18972
  outputs[signalOut.classPropertyName] = signalOut.bindingName;
18973
+ hasSignalIO = true;
18941
18974
  }
18942
18975
  }
18943
- return { inputs, outputs };
18976
+ return { inputs, outputs, hasDecoratorIO, hasSignalIO };
18944
18977
  }, ATTR_BINDING_RE, EVENT_BINDING_RE, emptyHost = () => ({
18945
18978
  attributes: {},
18946
18979
  listeners: {},
@@ -19722,7 +19755,20 @@ var fail = (reason, detail, location) => ({
19722
19755
  if (!ts7.isConstructorDeclaration(member))
19723
19756
  continue;
19724
19757
  for (const param of member.parameters) {
19725
- ctorParamTypes.push(param.type ? param.type.getText() : "");
19758
+ const typeText = param.type ? param.type.getText() : "";
19759
+ const decorators = ts7.getDecorators(param) ?? [];
19760
+ const decoratorSig = decorators.length === 0 ? "" : decorators.map((d2) => {
19761
+ const expr = d2.expression;
19762
+ if (ts7.isCallExpression(expr) && ts7.isIdentifier(expr.expression)) {
19763
+ const args = expr.arguments.map((a) => a.getText()).join(",");
19764
+ return `@${expr.expression.text}(${args})`;
19765
+ }
19766
+ if (ts7.isIdentifier(expr)) {
19767
+ return `@${expr.text}`;
19768
+ }
19769
+ return "@<unknown>";
19770
+ }).join("");
19771
+ ctorParamTypes.push(`${typeText}${decoratorSig}`);
19726
19772
  }
19727
19773
  break;
19728
19774
  }
@@ -19977,7 +20023,12 @@ ${block}
19977
20023
  if (!className_)
19978
20024
  return fail("class-not-found", "anonymous class");
19979
20025
  const wrappedClass = new compiler.WrappedNodeExpr(className_);
19980
- const { inputs, outputs } = extractInputsAndOutputs(classNode, compiler);
20026
+ const {
20027
+ inputs,
20028
+ outputs,
20029
+ hasDecoratorIO,
20030
+ hasSignalIO
20031
+ } = extractInputsAndOutputs(classNode, compiler);
19981
20032
  const projectRelPath = relative13(projectRoot, componentFilePath).replace(/\\/g, "/");
19982
20033
  const fingerprintId = encodeURIComponent(`${projectRelPath}@${className}`);
19983
20034
  const currentFingerprint = extractFingerprint(classNode, className, decoratorMeta, inputs, outputs, sourceFile, componentDir);
@@ -20011,11 +20062,11 @@ ${block}
20011
20062
  inputs,
20012
20063
  outputs,
20013
20064
  usesInheritance: false,
20014
- controlCreate: null,
20065
+ controlCreate: extractControlCreate(classNode),
20015
20066
  exportAs: advancedMetadata.exportAs,
20016
20067
  providers: advancedMetadata.providers,
20017
20068
  isStandalone: decoratorMeta.standalone,
20018
- isSignal: false,
20069
+ isSignal: (hasSignalIO || advancedMetadata.contentQueries.some((q2) => q2.isSignal) || advancedMetadata.viewQueries.some((q2) => q2.isSignal)) && !hasDecoratorIO && !advancedMetadata.contentQueries.some((q2) => !q2.isSignal) && !advancedMetadata.viewQueries.some((q2) => !q2.isSignal),
20019
20070
  hostDirectives: advancedMetadata.hostDirectives,
20020
20071
  template: {
20021
20072
  nodes: parsed.nodes,
@@ -22912,5 +22963,5 @@ export {
22912
22963
  build
22913
22964
  };
22914
22965
 
22915
- //# debugId=E7526B27E09085A964756E2164756E21
22966
+ //# debugId=9A589DD8147B77D664756E2164756E21
22916
22967
  //# sourceMappingURL=build.js.map