@magmonium/cli 0.8.25 → 0.8.27

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 (2) hide show
  1. package/codegen/index.js +1013 -123
  2. package/package.json +1 -1
package/codegen/index.js CHANGED
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
23
  ACTION_NAME_READER: () => ACTION_NAME_READER,
24
+ ACTION_SELECTION_KEY: () => ACTION_SELECTION_KEY,
24
25
  ALL_VARIANT: () => ALL_VARIANT,
25
26
  API_SEGMENT: () => API_SEGMENT,
26
27
  APP_CONFIG_SOURCE: () => APP_CONFIG_SOURCE,
@@ -56,6 +57,8 @@ __export(index_exports, {
56
57
  BUSY_VARIANT_ID: () => BUSY_VARIANT_ID,
57
58
  BUSY_VARIANT_NAME: () => BUSY_VARIANT_NAME,
58
59
  BUTTON_CLICK_OUTPUT: () => BUTTON_CLICK_OUTPUT,
60
+ BUTTON_KEY_CONFIG_KEY: () => BUTTON_KEY_CONFIG_KEY,
61
+ BUTTON_KEY_PATTERN: () => BUTTON_KEY_PATTERN,
59
62
  CALL_ARG_SOURCES: () => CALL_ARG_SOURCES,
60
63
  CALL_ARG_TRANSFORM_LEAVES: () => CALL_ARG_TRANSFORM_LEAVES,
61
64
  CALL_CONDITION_KINDS: () => CALL_CONDITION_KINDS,
@@ -318,6 +321,7 @@ __export(index_exports, {
318
321
  STYLE_DIRECTIVE_FORM: () => STYLE_DIRECTIVE_FORM,
319
322
  STYLE_DIRECTIVE_KEYS: () => STYLE_DIRECTIVE_KEYS,
320
323
  STYLE_DIRECTIVE_NAMES: () => STYLE_DIRECTIVE_NAMES,
324
+ SUBMIT_TARGET_KEY: () => SUBMIT_TARGET_KEY,
321
325
  TEST_RUNNER_DEV_DEPS: () => TEST_RUNNER_DEV_DEPS,
322
326
  TEXT_SOURCE: () => TEXT_SOURCE,
323
327
  TEXT_SOURCES: () => TEXT_SOURCES,
@@ -354,6 +358,7 @@ __export(index_exports, {
354
358
  actionEnumValues: () => actionEnumValues,
355
359
  actionEnums: () => actionEnums,
356
360
  actionRenderIds: () => actionRenderIds,
361
+ actionSelectionKey: () => actionSelectionKey,
357
362
  activeBackendUrl: () => activeBackendUrl,
358
363
  activeHosts: () => activeHosts,
359
364
  addMenuGroup: () => addMenuGroup,
@@ -414,6 +419,8 @@ __export(index_exports, {
414
419
  bindingPathText: () => bindingPathText,
415
420
  bindingShapeId: () => bindingShapeId,
416
421
  bindingsNeedTranslate: () => bindingsNeedTranslate,
422
+ boundSlotMismatch: () => boundSlotMismatch,
423
+ boundSlotType: () => boundSlotType,
417
424
  buildDesignSource: () => buildDesignSource,
418
425
  buildFormShape: () => buildFormShape,
419
426
  buildOutputOpenValue: () => buildOutputOpenValue,
@@ -444,6 +451,7 @@ __export(index_exports, {
444
451
  callArgStorageRead: () => callArgStorageRead,
445
452
  callArgTargetKey: () => callArgTargetKey,
446
453
  callArgTargets: () => callArgTargets,
454
+ callArgTransformSignature: () => callArgTransformSignature,
447
455
  callArgTypeMismatch: () => callArgTypeMismatch,
448
456
  callArgumentsExpression: () => callArgumentsExpression,
449
457
  callError: () => callError,
@@ -464,6 +472,7 @@ __export(index_exports, {
464
472
  canFillFormKey: () => canFillFormKey,
465
473
  canHostDefaultChild: () => canHostDefaultChild,
466
474
  canHostNavChildren: () => canHostNavChildren,
475
+ canNameSubmitTarget: () => canNameSubmitTarget,
467
476
  canOfferAddChild: () => canOfferAddChild,
468
477
  canOfferReplaceParent: () => canOfferReplaceParent,
469
478
  canOutputCall: () => canOutputCall,
@@ -614,6 +623,7 @@ __export(index_exports, {
614
623
  defaultScreenEmitValue: () => defaultScreenEmitValue,
615
624
  defaultScreenWriteValue: () => defaultScreenWriteValue,
616
625
  defaultStateWriteValue: () => defaultStateWriteValue,
626
+ defaultSubmitTarget: () => defaultSubmitTarget,
617
627
  denialDialogOf: () => denialDialogOf,
618
628
  denialTranslationKeys: () => denialTranslationKeys,
619
629
  derivePaths: () => derivePaths,
@@ -637,6 +647,7 @@ __export(index_exports, {
637
647
  drawnVariants: () => drawnVariants,
638
648
  dropChainStep: () => dropChainStep,
639
649
  dropFormEventMember: () => dropFormEventMember,
650
+ dropOutputBlock: () => dropOutputBlock,
640
651
  dropStaleTrackKeys: () => dropStaleTrackKeys,
641
652
  duplicateMemberName: () => duplicateMemberName,
642
653
  duplicateShapeName: () => duplicateShapeName,
@@ -737,6 +748,7 @@ __export(index_exports, {
737
748
  foldedButtonNames: () => foldedButtonNames,
738
749
  foldedButtons: () => foldedButtons,
739
750
  foldedRouterLink: () => foldedRouterLink,
751
+ formEventFieldTypes: () => formEventFieldTypes,
740
752
  formEventMembers: () => formEventMembers,
741
753
  formFieldIds: () => formFieldIds,
742
754
  formFields: () => formFields,
@@ -745,13 +757,17 @@ __export(index_exports, {
745
757
  formInterfaceName: () => formInterfaceName,
746
758
  formModelFor: () => formModelFor,
747
759
  formModelKeyIssue: () => formModelKeyIssue,
760
+ formModelKeyMismatch: () => formModelKeyMismatch,
761
+ formModelKeySignature: () => formModelKeySignature,
748
762
  formModelKeyType: () => formModelKeyType,
749
763
  formModelKeyZero: () => formModelKeyZero,
764
+ formModelLandedType: () => formModelLandedType,
750
765
  formModelScreenOptions: () => formModelScreenOptions,
751
766
  formModelShapeKeys: () => formModelShapeKeys,
752
767
  formModelSourceReaders: () => formModelSourceReaders,
753
768
  formModelSourceType: () => formModelSourceType,
754
769
  formModelStateOptions: () => formModelStateOptions,
770
+ formModelTransforms: () => formModelTransforms,
755
771
  formRefName: () => formRefName,
756
772
  formRefNames: () => formRefNames,
757
773
  formResetDepths: () => formResetDepths,
@@ -841,12 +857,14 @@ __export(index_exports, {
841
857
  hasRouterOutlet: () => hasRouterOutlet,
842
858
  hasScreenVariableActionEnumConflict: () => hasScreenVariableActionEnumConflict,
843
859
  hasStore: () => hasStore,
860
+ hasSubmitTargetButton: () => hasSubmitTargetButton,
844
861
  hasTextSource: () => hasTextSource,
845
862
  hasValueSource: () => hasValueSource,
846
863
  hasVariableDrift: () => hasVariableDrift,
847
864
  heldFieldIds: () => heldFieldIds,
848
865
  heldProperties: () => heldProperties,
849
866
  holdKey: () => holdKey,
867
+ holdOutputBlock: () => holdOutputBlock,
850
868
  hostRoutesConst: () => hostRoutesConst,
851
869
  iconControlEmitConfigs: () => iconControlEmitConfigs,
852
870
  iconControlGlyph: () => iconControlGlyph,
@@ -906,6 +924,7 @@ __export(index_exports, {
906
924
  isFieldCheckEligible: () => isFieldCheckEligible,
907
925
  isFieldOptionSelected: () => isFieldOptionSelected,
908
926
  isFolderPickSupported: () => isFolderPickSupported,
927
+ isFormModelReadSource: () => isFormModelReadSource,
909
928
  isFormatPipeName: () => isFormatPipeName,
910
929
  isFunctionCheckBound: () => isFunctionCheckBound,
911
930
  isFunctionInUse: () => isFunctionInUse,
@@ -916,6 +935,7 @@ __export(index_exports, {
916
935
  isKeyedRepeat: () => isKeyedRepeat,
917
936
  isKnownVariantId: () => isKnownVariantId,
918
937
  isLegalNavTail: () => isLegalNavTail,
938
+ isLimitDrawn: () => isLimitDrawn,
919
939
  isLinkedFormModel: () => isLinkedFormModel,
920
940
  isLinkedKeySource: () => isLinkedKeySource,
921
941
  isLinkedVariable: () => isLinkedVariable,
@@ -951,6 +971,7 @@ __export(index_exports, {
951
971
  isOutputCallBound: () => isOutputCallBound,
952
972
  isOutputCallKey: () => isOutputCallKey,
953
973
  isOutputConditional: () => isOutputConditional,
974
+ isOutputSelfEmit: () => isOutputSelfEmit,
954
975
  isOverlayDirectiveName: () => isOverlayDirectiveName,
955
976
  isOverlayType: () => isOverlayType,
956
977
  isPassthroughComputed: () => isPassthroughComputed,
@@ -988,6 +1009,7 @@ __export(index_exports, {
988
1009
  isTaglessFamily: () => isTaglessFamily,
989
1010
  isTextSource: () => isTextSource,
990
1011
  isTimerComplete: () => isTimerComplete,
1012
+ isToggleAction: () => isToggleAction,
991
1013
  isUnaryMenuActionOperator: () => isUnaryMenuActionOperator,
992
1014
  isUnaryOperator: () => isUnaryOperator,
993
1015
  isUnaryOutputArmOperator: () => isUnaryOutputArmOperator,
@@ -1032,6 +1054,9 @@ __export(index_exports, {
1032
1054
  liftToList: () => liftToList,
1033
1055
  liftToListInTemplate: () => liftToListInTemplate,
1034
1056
  liftsToList: () => liftsToList,
1057
+ limitSourceFor: () => limitSourceFor,
1058
+ limitSourceOf: () => limitSourceOf,
1059
+ limitSources: () => limitSources,
1035
1060
  linkDrift: () => linkDrift,
1036
1061
  linkTargetKind: () => linkTargetKind,
1037
1062
  linkedVariableReaders: () => linkedVariableReaders,
@@ -1282,6 +1307,7 @@ __export(index_exports, {
1282
1307
  outputOpenStatement: () => outputOpenStatement,
1283
1308
  outputOpenTargets: () => outputOpenTargets,
1284
1309
  outputOpenValueKinds: () => outputOpenValueKinds,
1310
+ outputSelfEmitCall: () => outputSelfEmitCall,
1285
1311
  overlayWidgetRefs: () => overlayWidgetRefs,
1286
1312
  overlayWidgetScreenIds: () => overlayWidgetScreenIds,
1287
1313
  overlayWidgetsProviderBlock: () => overlayWidgetsProviderBlock,
@@ -1327,6 +1353,7 @@ __export(index_exports, {
1327
1353
  persistableOptionSetRows: () => persistableOptionSetRows,
1328
1354
  pickFolder: () => pickFolder,
1329
1355
  pickedNavTail: () => pickedNavTail,
1356
+ placeOutputBlock: () => placeOutputBlock,
1330
1357
  planScreenEmit: () => planScreenEmit,
1331
1358
  pluginContractResync: () => pluginContractResync,
1332
1359
  pluginContracts: () => pluginContracts,
@@ -1338,6 +1365,7 @@ __export(index_exports, {
1338
1365
  pluginPortOf: () => pluginPortOf,
1339
1366
  pluginSourceOf: () => pluginSourceOf,
1340
1367
  presetHosts: () => presetHosts,
1368
+ projectionSlotOf: () => projectionSlotOf,
1341
1369
  propertiesWithComputeds: () => propertiesWithComputeds,
1342
1370
  propertyKey: () => propertyKey,
1343
1371
  pruneFormEventReads: () => pruneFormEventReads,
@@ -1595,6 +1623,7 @@ __export(index_exports, {
1595
1623
  signatureEnums: () => signatureEnums,
1596
1624
  signatureFormIds: () => signatureFormIds,
1597
1625
  signatureNamesOptionRow: () => signatureNamesOptionRow,
1626
+ signaturePipeIndex: () => signaturePipeIndex,
1598
1627
  signatureShapeIds: () => signatureShapeIds,
1599
1628
  signatureText: () => signatureText,
1600
1629
  slug: () => slug,
@@ -1602,6 +1631,7 @@ __export(index_exports, {
1602
1631
  slugifyMessage: () => slugifyMessage,
1603
1632
  sortRowEnumId: () => sortRowEnumId,
1604
1633
  sourceCarriesTrackKey: () => sourceCarriesTrackKey,
1634
+ splitAutoCallEmits: () => splitAutoCallEmits,
1605
1635
  stableId: () => stableId,
1606
1636
  staleCases: () => staleCases,
1607
1637
  staleMenuActionItems: () => staleMenuActionItems,
@@ -1650,9 +1680,15 @@ __export(index_exports, {
1650
1680
  subStoreSuffixError: () => subStoreSuffixError,
1651
1681
  subStoresOf: () => subStoresOf,
1652
1682
  subStoresReachedByMain: () => subStoresReachedByMain,
1683
+ submitTargetForms: () => submitTargetForms,
1684
+ submitTargetLink: () => submitTargetLink,
1685
+ submitTargetOf: () => submitTargetOf,
1653
1686
  successResponse: () => successResponse,
1654
1687
  suggestFormModelName: () => suggestFormModelName,
1655
1688
  suggestMethodName: () => suggestMethodName,
1689
+ suggestNavVariantName: () => suggestNavVariantName,
1690
+ suggestVariantName: () => suggestVariantName,
1691
+ suggestedButtonKeys: () => suggestedButtonKeys,
1656
1692
  survivingNavId: () => survivingNavId,
1657
1693
  swaggerUrlFromBackend: () => swaggerUrlFromBackend,
1658
1694
  syncScreenVariable: () => syncScreenVariable,
@@ -1698,6 +1734,7 @@ __export(index_exports, {
1698
1734
  typeLabel: () => typeLabel,
1699
1735
  typeSigil: () => typeSigil,
1700
1736
  typesMatch: () => typesMatch,
1737
+ typesMatchExactly: () => typesMatchExactly,
1701
1738
  unaryCall: () => unaryCall,
1702
1739
  unboundParams: () => unboundParams,
1703
1740
  unfilledVariables: () => unfilledVariables,
@@ -1706,6 +1743,7 @@ __export(index_exports, {
1706
1743
  updateRuleNode: () => updateRuleNode,
1707
1744
  usesAuthProperty: () => usesAuthProperty,
1708
1745
  usesStorage: () => usesStorage,
1746
+ validateButtonKey: () => validateButtonKey,
1709
1747
  validateCallArgs: () => validateCallArgs,
1710
1748
  validateFeatureName: () => validateFeatureName,
1711
1749
  validateFormName: () => validateFormName,
@@ -1772,6 +1810,7 @@ __export(index_exports, {
1772
1810
  withEventTransform: () => withEventTransform,
1773
1811
  withFormShapes: () => withFormShapes,
1774
1812
  withListRowShape: () => withListRowShape,
1813
+ withOutputSelfEmit: () => withOutputSelfEmit,
1775
1814
  withPropertyEnums: () => withPropertyEnums,
1776
1815
  withScreenEnums: () => withScreenEnums,
1777
1816
  withScreenMethodCallSites: () => withScreenMethodCallSites,
@@ -1874,6 +1913,7 @@ function isReservedVariantName(name3) {
1874
1913
  }
1875
1914
  var LEGACY_VARIANT_JOIN = "or";
1876
1915
  var isLinkedVariable = (variable) => variable.kind === "linked" && !!variable.source;
1916
+ var isFormModelReadSource = (source) => source.source !== "empty" && source.source !== "fixed";
1877
1917
  var isLinkedKeySource = (source) => source.source === "input" || source.source === "computed" || source.source === "path";
1878
1918
  var isLinkedFormModel = (model) => Object.values(model.keys).some(isLinkedKeySource);
1879
1919
  var screenAutoCallWhen = (call) => call.when ?? (call.args.some((row) => row.source === "input") || (call.emits ?? []).some(isMovingScreenEmit) || !!call.reads?.length ? "on-change" : "once");
@@ -1885,6 +1925,74 @@ var screenAutoCallError = (call) => {
1885
1925
  (row) => row.source === "input" || row.source === "binding"
1886
1926
  ) || (call.emits ?? []).some(isMovingScreenEmit) || !!call.reads?.length ? void 0 : "auto-call-never-fires";
1887
1927
  };
1928
+ var isOutputSelfEmit = (call) => {
1929
+ if (call.methodId || call.reads?.length || call.emits?.length !== 1)
1930
+ return false;
1931
+ if (!call.emits[0].value) return false;
1932
+ const { when: _drop, ...derived } = call;
1933
+ return !call.when || call.when === screenAutoCallWhen(derived);
1934
+ };
1935
+ var outputSelfEmitCall = (calls, outputId) => (calls ?? []).find(
1936
+ (call) => isOutputSelfEmit(call) && call.emits?.[0].outputId === outputId
1937
+ );
1938
+ var withOutputSelfEmit = (calls, outputId, value, mintId) => {
1939
+ const own = outputSelfEmitCall(calls, outputId);
1940
+ const rest = (calls ?? []).filter((call) => call !== own);
1941
+ if (!value) return rest;
1942
+ return [
1943
+ ...rest,
1944
+ {
1945
+ id: own?.id ?? mintId(),
1946
+ args: [],
1947
+ emits: [{ id: own?.emits?.[0].id ?? mintId(), outputId, value }]
1948
+ }
1949
+ ];
1950
+ };
1951
+ var splitAutoCallEmits = (calls, inputs = {}) => {
1952
+ const result = [];
1953
+ const selfFired = /* @__PURE__ */ new Set();
1954
+ const push = (call) => {
1955
+ if (isOutputSelfEmit(call)) {
1956
+ const outputId = call.emits?.[0].outputId ?? "";
1957
+ if (selfFired.has(outputId)) return;
1958
+ selfFired.add(outputId);
1959
+ }
1960
+ result.push(call);
1961
+ };
1962
+ for (const call of calls) {
1963
+ const emits = call.emits ?? [];
1964
+ if (!emits.length || !call.methodId && emits.length === 1) {
1965
+ push(call);
1966
+ continue;
1967
+ }
1968
+ const when = screenAutoCallWhen(call);
1969
+ const reads = [...call.reads ?? []];
1970
+ if (call.methodId) {
1971
+ const { emits: _drop, ...rest } = call;
1972
+ push(rest);
1973
+ if (when === "on-change") {
1974
+ const seen = new Set(reads.map((read) => JSON.stringify(read)));
1975
+ for (const row of call.args) {
1976
+ const id = row.source === "input" ? Object.values(inputs).find((one) => one.name === row.input)?.id : void 0;
1977
+ const read = row.source === "binding" ? row.binding : id ? { root: { kind: "input", id }, path: [] } : void 0;
1978
+ if (!read || seen.has(JSON.stringify(read))) continue;
1979
+ seen.add(JSON.stringify(read));
1980
+ reads.push(read);
1981
+ }
1982
+ }
1983
+ }
1984
+ emits.forEach((emit, at) => {
1985
+ const piece = {
1986
+ id: !call.methodId && at === 0 ? call.id : `${call.id}-${emit.id}`,
1987
+ args: [],
1988
+ emits: [emit],
1989
+ ...reads.length ? { reads } : {}
1990
+ };
1991
+ push(screenAutoCallWhen(piece) === when ? piece : { ...piece, when });
1992
+ });
1993
+ }
1994
+ return result;
1995
+ };
1888
1996
  var MENU_ACTION_MEMBERS = [
1889
1997
  "id",
1890
1998
  "label",
@@ -1973,15 +2081,19 @@ var hasRouterLink = (configs) => {
1973
2081
  };
1974
2082
 
1975
2083
  // libs/codegen/src/lib/action-fold-helper.ts
2084
+ var BUTTON_KEY_CONFIG_KEY = "buttonKey";
2085
+ var ACTION_SELECTION_KEY = "selection";
2086
+ var BUTTON_KEY_PATTERN = /^[a-zA-Z0-9_-]+$/;
1976
2087
  var foldedButtonName = (node) => {
1977
2088
  const uuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
1978
- const candidates = ["name", "label", "icon"].map((key2) => node.configs?.[key2]).map((value) => String(value ?? "").trim()).find((value) => value && !uuid.test(value));
2089
+ const candidates = [BUTTON_KEY_CONFIG_KEY, "name", "label", "icon"].map((key2) => node.configs?.[key2]).map((value) => String(value ?? "").trim()).find((value) => value && !uuid.test(value));
1979
2090
  return candidates || "button";
1980
2091
  };
1981
2092
  var foldedButtons = (node) => node.type === "section_action" /* SECTION_ACTION */ ? node.childrens.filter((child) => child.type === "button" /* BUTTON */) : [];
1982
2093
  var foldedConfigs = (node) => {
1983
2094
  const configs = { ...node.configs ?? {} };
1984
2095
  delete configs["name"];
2096
+ delete configs[BUTTON_KEY_CONFIG_KEY];
1985
2097
  Object.entries(configs).forEach(([key2, value]) => {
1986
2098
  if (value === "" || value === void 0 || value === null) {
1987
2099
  delete configs[key2];
@@ -2049,6 +2161,22 @@ var actionButtonEntries = (node) => {
2049
2161
  return [name3, button];
2050
2162
  });
2051
2163
  };
2164
+ var isToggleAction = (node) => node?.type === "section_action" /* SECTION_ACTION */ && node.configs?.["variant"] === "toggle";
2165
+ var actionSelectionKey = (node) => {
2166
+ if (!isToggleAction(node)) return void 0;
2167
+ const id = node.configs?.[ACTION_SELECTION_KEY];
2168
+ if (typeof id !== "string" || !id) return void 0;
2169
+ return actionButtonEntries(node).find(([, button]) => button.id === id)?.[0];
2170
+ };
2171
+ var suggestedButtonKeys = (node) => new Map(actionButtonEntries(node).map(([name3, button]) => [button.id, name3]));
2172
+ var validateButtonKey = (bar, buttonId, key2) => {
2173
+ const trimmed = key2.trim();
2174
+ if (!BUTTON_KEY_PATTERN.test(trimmed)) return "button-key-invalid";
2175
+ const taken = actionButtonEntries(bar ?? {}).some(
2176
+ ([name3, button]) => button.id !== buttonId && name3 === trimmed
2177
+ );
2178
+ return taken ? "button-key-taken" : void 0;
2179
+ };
2052
2180
 
2053
2181
  // libs/codegen/src/lib/app-release-doc.ts
2054
2182
  var APP_RELEASE_DOC = `# Releasing an mm App
@@ -4753,6 +4881,29 @@ var CONTROL_CODEGEN = {
4753
4881
  importFrom: "@angular/router"
4754
4882
  }
4755
4883
  };
4884
+ var NAMED_SLOT_TAGS = /* @__PURE__ */ new Set([
4885
+ "m-section-header",
4886
+ "m-section-hero",
4887
+ "m-jumbotron",
4888
+ "m-section-search",
4889
+ "m-section-stepper",
4890
+ "m-section-badges",
4891
+ "m-section-toggle",
4892
+ "m-action",
4893
+ "m-one-action",
4894
+ "m-section-back",
4895
+ "m-section-filter",
4896
+ "m-section-filter-group",
4897
+ "m-carousel",
4898
+ "m-one-carousel",
4899
+ "m-section-pagination",
4900
+ "m-section-footer",
4901
+ "m-app-logo"
4902
+ ]);
4903
+ function projectionSlotOf(node) {
4904
+ const tag = CONTROL_CODEGEN[node.type]?.tag.split(" ")[0];
4905
+ return tag && NAMED_SLOT_TAGS.has(tag) ? tag : "";
4906
+ }
4756
4907
 
4757
4908
  // libs/codegen/src/lib/option-set-helper.ts
4758
4909
  function isValidOptionSetName(name3) {
@@ -6728,6 +6879,13 @@ var SURFACE_LEAVES = {
6728
6879
  };
6729
6880
  var sameType2 = (a, b) => a.type === "shape" && b.type === "shape" ? a.shapeId === b.shapeId : a.type === b.type;
6730
6881
  var typesMatch = (a, b) => sameType2(a.dataType, b.dataType) && a.cardinality === b.cardinality;
6882
+ var typesMatchExactly = (a, b) => typesMatch(a, b) && enumIdOf(a.dataType) === enumIdOf(b.dataType) && (a.dataType.type !== "enum" || b.dataType.type !== "enum" || a.dataType.enumId === b.dataType.enumId);
6883
+ var signaturePipeIndex = (params, returnType, signature) => typesMatchExactly(returnType, signature.expected) ? params.findIndex(
6884
+ (param) => typesMatchExactly(
6885
+ { dataType: param.dataType, cardinality: param.cardinality },
6886
+ signature.pipe
6887
+ )
6888
+ ) : -1;
6731
6889
  var memberRead = (name3, ctx) => ctx.scope === "class" ? `this.${name3}` : name3;
6732
6890
  var isCall = (expr) => expr.kind === "call";
6733
6891
  var pipeParamValid = (expr, arity) => Number.isInteger(expr.pipeParam) && (expr.pipeParam >= 0 && expr.pipeParam < arity || expr.pipeParam === -1 && !expr.args.some((arg) => arg.kind === "pipe"));
@@ -7364,7 +7522,12 @@ var BINDING_SLOT = {
7364
7522
  // A [ScoreSet]'s Score Date, named for the `m-score-set` input it lands on.
7365
7523
  // Content by the `total` test: whether the set reads stale *is* the datum's
7366
7524
  // age, read off the same record its Scores are.
7367
- scoreDate: "scoreDate"
7525
+ scoreDate: "scoreDate",
7526
+ // A toggle SectionAction's pick, named for the `m-action` input it lands on:
7527
+ // the ButtonKey the bar is lit on, followed rather than owned — a press still
7528
+ // moves it (m-one-ui ADR 0213). Exclusive with the static pick held in
7529
+ // `configs.selection`, a Button's Control id.
7530
+ selection: "selection"
7368
7531
  };
7369
7532
  var USER_VALUE_SLOTS = [
7370
7533
  BINDING_SLOT.id,
@@ -7426,6 +7589,12 @@ function controlMapStateRootIds(map) {
7426
7589
  transformStateRootIds(binding.transform).forEach((id) => ids.add(id));
7427
7590
  })
7428
7591
  );
7592
+ Object.values(map).forEach(
7593
+ (control) => (control.checks ?? []).forEach((check) => {
7594
+ if (check.limitSource === "state" && check.limitRef)
7595
+ ids.add(check.limitRef);
7596
+ })
7597
+ );
7429
7598
  return [...ids];
7430
7599
  }
7431
7600
  function controlMapReadsState(map) {
@@ -8370,7 +8539,7 @@ function fieldKeyType(configs) {
8370
8539
  if (type === "toggle" /* TOGGLE */ || type === "checkbox" /* CHECKBOX */) {
8371
8540
  return { dataType: { type: "boolean" }, cardinality: "one" };
8372
8541
  }
8373
- if (type === "rating" /* RATING */) {
8542
+ if (type === "rating" /* RATING */ || type === "number" /* NUMBER */ || type === "money" /* MONEY */ || type === "range" /* RANGE */) {
8374
8543
  return { dataType: { type: "number" }, cardinality: "one" };
8375
8544
  }
8376
8545
  if (type === "multi_range" /* MULTI_RANGE */) {
@@ -8474,6 +8643,14 @@ function formShapeMap(controlMap) {
8474
8643
  function formEventMembers(controlMap, formId) {
8475
8644
  return buildFormShape(controlMap, formId)?.keys.map((key2) => key2.name) ?? [];
8476
8645
  }
8646
+ function formEventFieldTypes(controlMap, formId) {
8647
+ return Object.fromEntries(
8648
+ (buildFormShape(controlMap, formId)?.keys ?? []).map((key2) => [
8649
+ key2.name,
8650
+ { dataType: key2.dataType, cardinality: key2.cardinality }
8651
+ ])
8652
+ );
8653
+ }
8477
8654
  var OUTPUT_EVENT_MAPS = [
8478
8655
  "outputArgs",
8479
8656
  "outputWrites",
@@ -8920,7 +9097,7 @@ var bindingExpression = (binding, scope, guardAlias) => {
8920
9097
  const leafRead = (leaf) => bindingExpression(leaf, scope);
8921
9098
  const leaves = transformBindingLeaves(binding.transform);
8922
9099
  if (leaves.some((leaf) => !leafRead(leaf))) return void 0;
8923
- return emitTransformExpr(binding.transform, expr, {
9100
+ const call = emitTransformExpr(binding.transform, expr, {
8924
9101
  bindingRead: leafRead,
8925
9102
  functions: scope.functions ?? {},
8926
9103
  properties: roots,
@@ -8935,6 +9112,38 @@ var bindingExpression = (binding, scope, guardAlias) => {
8935
9112
  // one binding never spells the store two ways.
8936
9113
  storeReceiver: (rootId) => scope.storePropOf?.(rootId) ?? scope.storeProp ?? "store"
8937
9114
  });
9115
+ const guards = functionCallGuards(binding, expr, scope, leafRead);
9116
+ if (!guards.length) return call;
9117
+ const hoisted = scope.memberPrefix ? void 0 : guards.map((read) => scope.hoist?.(read));
9118
+ if (hoisted?.every((name3) => !!name3)) {
9119
+ const named = [...guards].map((read, i) => ({ read, name: hoisted[i] })).sort((a, b) => b.read.length - a.read.length).reduce((text3, { read, name: name3 }) => text3.split(read).join(name3), call);
9120
+ return `(${hoisted.map((name3) => `${name3} === undefined`).join(" || ")} ? undefined : ${named})`;
9121
+ }
9122
+ return `(${guards.map((read) => `${read} === undefined`).join(" || ")} ? undefined : ${call})`;
9123
+ };
9124
+ var functionCallGuards = (binding, pipeRead, scope, leafRead) => {
9125
+ if (binding.source !== "function") return [];
9126
+ const call = outerCall(binding.transform);
9127
+ const target = call?.target;
9128
+ if (!call || !target || !("functionId" in target)) return [];
9129
+ const fn = scope.functions?.[target.functionId];
9130
+ if (!fn) return [];
9131
+ const absent = (read, text3) => text3.includes("?.") || !rootIsPresent(read, scope);
9132
+ const guards = [];
9133
+ call.args.forEach((arg, i) => {
9134
+ if (fn.params[i]?.acceptsUndefined || "target" in arg) return;
9135
+ if (arg.kind === "pipe") {
9136
+ if (binding.root.kind !== "none" && absent(binding, pipeRead)) {
9137
+ guards.push(pipeRead);
9138
+ }
9139
+ return;
9140
+ }
9141
+ if (arg.kind === "binding" && arg.binding) {
9142
+ const read = leafRead(arg.binding);
9143
+ if (read && absent(arg.binding, read)) guards.push(read);
9144
+ }
9145
+ });
9146
+ return [...new Set(guards)];
8938
9147
  };
8939
9148
  var guardedBindingRead = (binding, scope, alias) => {
8940
9149
  const root = rootExpression(binding, scope);
@@ -8961,6 +9170,25 @@ var emittedDataType = (binding, scope) => {
8961
9170
  functions: scope.functions
8962
9171
  });
8963
9172
  };
9173
+ var BOUND_SLOT_TYPES = {
9174
+ ["section_pagination" /* SECTION_PAGINATION */]: { [BINDING_SLOT.total]: "number" },
9175
+ ["section_filter" /* SECTION_FILTER */]: {
9176
+ [BINDING_SLOT.min]: "number",
9177
+ [BINDING_SLOT.max]: "number"
9178
+ },
9179
+ ["heat_swatch" /* HEAT_SWATCH */]: { [BINDING_SLOT.value]: "number" },
9180
+ ["score_set_item" /* SCORE_SET_ITEM */]: { [BINDING_SLOT.value]: "number" },
9181
+ ["scale_mark" /* SCALE_MARK */]: { [BINDING_SLOT.value]: "number" },
9182
+ ["score_set" /* SCORE_SET */]: { [BINDING_SLOT.scoreDate]: "string" },
9183
+ ["img" /* IMG */]: { [BINDING_SLOT.src]: "string" }
9184
+ };
9185
+ var boundSlotType = (type, slot) => type ? BOUND_SLOT_TYPES[type]?.[slot] : void 0;
9186
+ var boundSlotMismatch = (type, slot, binding, scope) => {
9187
+ const expected = boundSlotType(type, slot);
9188
+ if (!expected || !binding) return void 0;
9189
+ const actual = emittedDataType(binding, scope)?.type;
9190
+ return actual && actual !== expected ? { expected, actual } : void 0;
9191
+ };
8964
9192
  var textBindingExpression = (binding, scope, translated = false) => {
8965
9193
  const expr = bindingExpression(binding, scope);
8966
9194
  if (!expr) return void 0;
@@ -9689,6 +9917,14 @@ var bindingPipeType = (row, target, scope) => {
9689
9917
  if (!picked?.dataType) return void 0;
9690
9918
  return { dataType: picked.dataType, cardinality: picked.cardinality };
9691
9919
  };
9920
+ function callArgTransformSignature(row, target, scope) {
9921
+ if (!target?.dataType) return void 0;
9922
+ const expected = {
9923
+ dataType: target.dataType,
9924
+ cardinality: target.cardinality
9925
+ };
9926
+ return { pipe: bindingPipeType(row, target, scope) ?? expected, expected };
9927
+ }
9692
9928
  var rowComplete = (row, target, payload, fieldNames, constants, functions, scope) => {
9693
9929
  if (!target) return "call-arg-unknown-target";
9694
9930
  if (!row.source) return "call-arg-incomplete";
@@ -10489,16 +10725,22 @@ function screenWriteToggleAllowed(variable) {
10489
10725
  function screenWriteEventAllowed(payload) {
10490
10726
  return payload !== "void";
10491
10727
  }
10492
- function writeEventReadType(value, payload) {
10493
- if (value.kind !== "event" || value.path?.length) return void 0;
10728
+ var PRIMITIVES = ["string", "number", "boolean"];
10729
+ function writeEventReadType(value, payload, fields = {}) {
10730
+ if (value.kind !== "event") return void 0;
10731
+ if (value.path?.length) {
10732
+ return value.path.length === 1 ? fields[value.path[0]] : void 0;
10733
+ }
10494
10734
  if (payload === "string" || payload === "number" || payload === "boolean") {
10495
10735
  return { dataType: { type: payload }, cardinality: "one" };
10496
10736
  }
10497
10737
  return void 0;
10498
10738
  }
10499
- function writeEventIssue(value, payload, target, functions) {
10739
+ var readMisfits = (read, target) => read.cardinality === "one" && target.cardinality === "one" && PRIMITIVES.includes(read.dataType.type) && read.dataType.type !== target.dataType.type;
10740
+ var typeName2 = (type) => type.cardinality === "many" ? `${type.dataType.type}[]` : type.dataType.type;
10741
+ function writeEventIssue(value, payload, target, functions, fields = {}) {
10500
10742
  if (value.kind !== "event") return void 0;
10501
- const read = writeEventReadType(value, payload);
10743
+ const read = writeEventReadType(value, payload, fields);
10502
10744
  if (value.transform) {
10503
10745
  const err = validateTransform(
10504
10746
  value.transform,
@@ -10510,19 +10752,26 @@ function writeEventIssue(value, payload, target, functions) {
10510
10752
  if (!err) return void 0;
10511
10753
  return err === "value-transform-incomplete" ? "incomplete" : "type-mismatch";
10512
10754
  }
10513
- if (!read || target.cardinality !== "one") return void 0;
10514
- return read.dataType.type === target.dataType.type ? void 0 : "type-mismatch";
10755
+ return read && readMisfits(read, target) ? "type-mismatch" : void 0;
10515
10756
  }
10516
- function writeEventMismatch(value, payload, target) {
10517
- if (value.kind !== "event" || value.transform) return void 0;
10518
- const read = writeEventReadType(value, payload);
10519
- if (!read || target.cardinality !== "one" || read.dataType.type === target.dataType.type) {
10520
- return void 0;
10757
+ function writeEventMismatch(value, payload, target, functions = {}, fields = {}) {
10758
+ if (value.kind !== "event") return void 0;
10759
+ const read = writeEventReadType(value, payload, fields);
10760
+ if (value.transform) {
10761
+ const inferred = inferTransformType(
10762
+ value.transform,
10763
+ read ?? target,
10764
+ "call-arg",
10765
+ functions
10766
+ );
10767
+ if (!inferred.ok || typesMatch(inferred.type, target)) return void 0;
10768
+ return { from: typeName2(inferred.type), to: typeName2(target) };
10521
10769
  }
10770
+ if (!read || !readMisfits(read, target)) return void 0;
10522
10771
  const fix = castTransform(read, target);
10523
10772
  return {
10524
- from: read.dataType.type,
10525
- to: target.dataType.type,
10773
+ from: typeName2(read),
10774
+ to: typeName2(target),
10526
10775
  ...fix ? { fix } : {}
10527
10776
  };
10528
10777
  }
@@ -10588,7 +10837,7 @@ function nextScreenWriteRow(variables, rows, payload, inputs, constants = {}) {
10588
10837
  value: defaultScreenWriteValue(free.variable, payload, inputs, constants)
10589
10838
  };
10590
10839
  }
10591
- function validateScreenWrites(variables, rows, payload, fieldNames, inputs, constants = {}, functions = {}) {
10840
+ function validateScreenWrites(variables, rows, payload, fieldNames, inputs, constants = {}, functions = {}, fields = {}) {
10592
10841
  const seen = /* @__PURE__ */ new Set();
10593
10842
  for (const row of rows) {
10594
10843
  if (seen.has(row.variableId)) return "screen-write-duplicate";
@@ -10627,7 +10876,8 @@ function validateScreenWrites(variables, rows, payload, fieldNames, inputs, cons
10627
10876
  value,
10628
10877
  payload,
10629
10878
  { dataType: { type: variable.dataType }, cardinality: variable.cardinality },
10630
- functions
10879
+ functions,
10880
+ fields
10631
10881
  );
10632
10882
  if (issue === "incomplete") return "screen-write-incomplete";
10633
10883
  if (issue) return "screen-write-type-mismatch";
@@ -10926,7 +11176,7 @@ function nextStateWriteRow(properties, rows, payload, inputs, constants = {}) {
10926
11176
  value: defaultStateWriteValue(free.property, payload, inputs, constants)
10927
11177
  };
10928
11178
  }
10929
- function validateStateWrites(properties, rows, payload, fieldNames, inputs, constants = {}, functions = {}) {
11179
+ function validateStateWrites(properties, rows, payload, fieldNames, inputs, constants = {}, functions = {}, fields = {}) {
10930
11180
  const seen = /* @__PURE__ */ new Set();
10931
11181
  for (const row of rows) {
10932
11182
  if (seen.has(row.propertyId)) return "state-write-duplicate";
@@ -10965,7 +11215,8 @@ function validateStateWrites(properties, rows, payload, fieldNames, inputs, cons
10965
11215
  value,
10966
11216
  payload,
10967
11217
  { dataType: property.dataType, cardinality: property.cardinality },
10968
- functions
11218
+ functions,
11219
+ fields
10969
11220
  );
10970
11221
  if (issue === "incomplete") return "state-write-incomplete";
10971
11222
  if (issue) return "state-write-type-mismatch";
@@ -11699,6 +11950,40 @@ function moveOutputBlock(control, from, block2, to) {
11699
11950
  [map]: writeKey(writeKey(all, from, void 0), to, row)
11700
11951
  };
11701
11952
  }
11953
+ var HELD_BLOCK_KEY = "__held-block";
11954
+ var detach = (value) => JSON.parse(JSON.stringify(value));
11955
+ function holdOutputBlock(control, from, block2) {
11956
+ if (block2.kind === "call" && !isOutputCallBound(control, outputCallKeys(control, from)[block2.index] ?? "")) {
11957
+ return void 0;
11958
+ }
11959
+ const lifted = moveOutputBlock(control, from, block2, HELD_BLOCK_KEY);
11960
+ if (!lifted || lifted === control) return void 0;
11961
+ return {
11962
+ kind: block2.kind,
11963
+ rows: detach(rowsAt(lifted, HELD_BLOCK_KEY))
11964
+ };
11965
+ }
11966
+ function dropOutputBlock(control, from, block2) {
11967
+ const lifted = moveOutputBlock(control, from, block2, HELD_BLOCK_KEY);
11968
+ if (!lifted || lifted === control) return void 0;
11969
+ return clearOutputGroupRows(lifted, HELD_BLOCK_KEY);
11970
+ }
11971
+ function placeOutputBlock(control, held, to) {
11972
+ if (held.kind === "close") return void 0;
11973
+ const seeded = { ...control };
11974
+ for (const [map, row] of Object.entries(held.rows)) {
11975
+ seeded[map] = {
11976
+ ...control[map] ?? {},
11977
+ [HELD_BLOCK_KEY]: detach(row)
11978
+ };
11979
+ }
11980
+ return moveOutputBlock(
11981
+ seeded,
11982
+ HELD_BLOCK_KEY,
11983
+ { kind: held.kind, index: 0 },
11984
+ to
11985
+ );
11986
+ }
11702
11987
  var outputGroupHoldsBlocks = (control, key2) => Object.keys(rowsAt(control, key2)).length > 0 || outputCallIds(control, key2).length > 0;
11703
11988
  function tidyOutputArms(control, output) {
11704
11989
  let next = control;
@@ -11832,6 +12117,82 @@ function validateVariantName(name3, variants, propertyNames, currentId) {
11832
12117
  ) || propertyNames.includes(name3);
11833
12118
  return taken ? "variant-name-taken" : null;
11834
12119
  }
12120
+ var SUGGESTED_NAME_MAX = 40;
12121
+ var OPERATOR_WORDS = {
12122
+ "==": "is",
12123
+ "!=": "is_not",
12124
+ ">": "gt",
12125
+ ">=": "gte",
12126
+ "<": "lt",
12127
+ "<=": "lte",
12128
+ contains: "has",
12129
+ not_contains: "lacks",
12130
+ exists: "has",
12131
+ not_exists: "no"
12132
+ };
12133
+ var toNameWords = (raw) => raw.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
12134
+ var joinWords = (...parts) => parts.filter(Boolean).join("_");
12135
+ var navWords = (navId) => joinWords(toNameWords(navId.split("/").at(-1) ?? ""), "open");
12136
+ function suggestVariantName(rule, sources, isTaken) {
12137
+ const { properties, shapes, functions = {} } = sources;
12138
+ const complete = (node) => ruleError(node, properties, shapes, functions) === null;
12139
+ const segmentNames = (path) => resolvePath(path, properties, shapes).map((segment) => segment.name);
12140
+ const checks = [];
12141
+ const collect2 = (node) => {
12142
+ if (node.kind === "group") node.children.forEach(collect2);
12143
+ else if (node.kind === "check" && complete(node)) checks.push(node);
12144
+ };
12145
+ collect2(rule);
12146
+ const lastCounts = /* @__PURE__ */ new Map();
12147
+ for (const check of checks) {
12148
+ const last = segmentNames(check.path).at(-1) ?? "";
12149
+ lastCounts.set(last, (lastCounts.get(last) ?? 0) + 1);
12150
+ }
12151
+ const pathWords = (path) => {
12152
+ const names = segmentNames(path);
12153
+ const last = names.at(-1) ?? "";
12154
+ return toNameWords(
12155
+ (lastCounts.get(last) ?? 0) > 1 ? names.join("_") : last
12156
+ );
12157
+ };
12158
+ const checkWords = (check) => {
12159
+ const path = joinWords(pathWords(check.path), check.count ? "count" : "");
12160
+ const quantifier = check.quantifier === "every" ? "all" : check.quantifier === "none" ? "no" : "";
12161
+ const op = OPERATOR_WORDS[check.operator];
12162
+ if (check.operator === "exists" || check.operator === "not_exists")
12163
+ return joinWords(quantifier, op, path);
12164
+ const right = check.operand.kind === "path" ? toNameWords(segmentNames(check.operand.path).at(-1) ?? "") : toNameWords(String(check.operand.value)) || "empty";
12165
+ return joinWords(quantifier, path, op, right);
12166
+ };
12167
+ const leaves = [];
12168
+ const words = (node) => {
12169
+ if (node.kind === "group") {
12170
+ const parts = node.children.map(words).filter(Boolean);
12171
+ if (!parts.length) return "";
12172
+ const joined = parts.join(node.connective === "all" ? "_and_" : "_or_");
12173
+ return node.negated ? joinWords("not", joined) : joined;
12174
+ }
12175
+ if (!complete(node)) return "";
12176
+ const leaf = node.kind === "check" ? checkWords(node) : node.kind === "call" ? toNameWords(globalRuleOf(node.ruleId)?.member ?? node.ruleId) : node.kind === "function" ? toNameWords(functions[node.functionId]?.name ?? "") : navWords(node.navId);
12177
+ if (leaf) leaves.push(leaf);
12178
+ return leaf;
12179
+ };
12180
+ const full = words(rule);
12181
+ const name3 = full.length > SUGGESTED_NAME_MAX ? joinWords(leaves[0], "etc") : full;
12182
+ return freeVariantName(name3, isTaken);
12183
+ }
12184
+ function suggestNavVariantName(navId, isTaken) {
12185
+ return navId ? freeVariantName(navWords(navId), isTaken) : "";
12186
+ }
12187
+ function freeVariantName(raw, isTaken) {
12188
+ if (!raw) return "";
12189
+ const name3 = /^[a-z]/.test(raw) ? raw : `v_${raw}`;
12190
+ const unavailable = (candidate) => candidate === BASE_VARIANT_NAME || isReservedVariantName(candidate) || isTaken(candidate);
12191
+ if (!unavailable(name3)) return name3;
12192
+ let n = 2;
12193
+ while (unavailable(`${name3}_${n}`)) n += 1;
12194
+ return `${name3}_${n}`;
12195
+ }
11835
12196
  function isKnownVariantId(id, variants) {
11836
12197
  if (variants[id]) return true;
11837
12198
  if (isBusyVariantId(id)) return true;
@@ -14460,7 +14821,9 @@ var FORMAT_PIPE_CATALOG = [
14460
14821
  // two are offered rather than typed.
14461
14822
  { name: "system", dataType: STR2, options: ["IN", "INTL"], default: "IN" },
14462
14823
  { name: "symbol", dataType: STR2, default: "\u20B9" },
14463
- { name: "forceSign", dataType: BOOL2, default: false }
14824
+ { name: "forceSign", dataType: BOOL2, default: false },
14825
+ // The modulus — the amount printed with no sign, negative or not.
14826
+ { name: "mod", dataType: BOOL2, default: false }
14464
14827
  ]
14465
14828
  },
14466
14829
  {
@@ -15636,6 +15999,79 @@ function openError(open, screens) {
15636
15999
  var drawnOpen = (method, screens) => method.open && !openError(method.open, screens) ? method.open : void 0;
15637
16000
  var openScreenIds = (methods) => Object.values(methods).map((method) => method.open?.screenId).filter((id) => !!id);
15638
16001
 
16002
+ // libs/codegen/src/lib/submit-target-helper.ts
16003
+ var SUBMIT_TARGET_KEY = "submitTarget";
16004
+ var ancestors = (control, controls) => {
16005
+ const chain = [];
16006
+ const seen = /* @__PURE__ */ new Set();
16007
+ for (let id = control.parentId; id && !seen.has(id) && controls[id]; id = controls[id].parentId) {
16008
+ seen.add(id);
16009
+ chain.push(controls[id]);
16010
+ }
16011
+ return chain;
16012
+ };
16013
+ var opensScope = (control) => isTaglessFamily(control.type) || control.type === "content" /* CONTENT */ || (control.variants?.length ?? 0) > 0;
16014
+ var scopeOf = (control, controls) => [control, ...ancestors(control, controls)].find(opensScope);
16015
+ function canNameSubmitTarget(button, controls) {
16016
+ if (button.type !== "button" /* BUTTON */) return false;
16017
+ if (button.configs?.["isSubmit"] !== true) return false;
16018
+ if (button.configs?.["href"]) return false;
16019
+ if (hasRouterLinkDirective(button)) return false;
16020
+ return !ancestors(button, controls).some(
16021
+ (parent) => parent.type === "form" /* FORM */ || parent.type === "section_action" /* SECTION_ACTION */
16022
+ );
16023
+ }
16024
+ var refReaches = (button, buttonChain, form, controls) => {
16025
+ const scope = scopeOf(form, controls);
16026
+ if (!scope) return true;
16027
+ if (!buttonChain.has(scope.id)) return false;
16028
+ if (scope.type !== "branch_arm" /* BRANCH_ARM */) return true;
16029
+ const formSide = armChildOf(scope.id, form, controls);
16030
+ const buttonSide = armChildOf(scope.id, button, controls);
16031
+ return !!formSide && !!buttonSide && projectionSlotOf(formSide) === projectionSlotOf(buttonSide);
16032
+ };
16033
+ var queryReaches = (form, controls) => ![form, ...ancestors(form, controls)].some(
16034
+ (node) => isRepeatFamily(node.type) || node.type === "content" /* CONTENT */
16035
+ );
16036
+ var accessTo = (button, form, controls) => {
16037
+ if (form.type !== "form" /* FORM */) return void 0;
16038
+ const buttonChain = /* @__PURE__ */ new Set([
16039
+ button.id,
16040
+ ...ancestors(button, controls).map((parent) => parent.id)
16041
+ ]);
16042
+ if (refReaches(button, buttonChain, form, controls)) return "ref";
16043
+ return queryReaches(form, controls) ? "query" : void 0;
16044
+ };
16045
+ function submitTargetForms(button, controls) {
16046
+ if (!canNameSubmitTarget(button, controls)) return [];
16047
+ return Object.values(controls).filter(
16048
+ (form) => accessTo(button, form, controls) !== void 0
16049
+ );
16050
+ }
16051
+ var armChildOf = (armId, control, controls) => [control, ...ancestors(control, controls)].find(
16052
+ (node) => node.parentId === armId
16053
+ );
16054
+ function submitTargetOf(button, controls) {
16055
+ return submitTargetLink(button, controls)?.form;
16056
+ }
16057
+ function submitTargetLink(button, controls) {
16058
+ if (!canNameSubmitTarget(button, controls)) return void 0;
16059
+ const id = button.configs?.[SUBMIT_TARGET_KEY];
16060
+ if (typeof id !== "string" || !id) return void 0;
16061
+ const form = controls[id];
16062
+ const access = form ? accessTo(button, form, controls) : void 0;
16063
+ return form && access ? { form, access } : void 0;
16064
+ }
16065
+ function hasSubmitTargetButton(formId, controls) {
16066
+ return Object.values(controls).some(
16067
+ (control) => control.type === "button" /* BUTTON */ && submitTargetOf(control, controls)?.id === formId
16068
+ );
16069
+ }
16070
+ function defaultSubmitTarget(button, controls) {
16071
+ const forms = submitTargetForms(button, controls);
16072
+ return forms.length === 1 ? forms[0].id : void 0;
16073
+ }
16074
+
15639
16075
  // libs/codegen/src/lib/call-outcome-helper.ts
15640
16076
  var OUTCOME_ARMS = [
15641
16077
  "success",
@@ -15844,6 +16280,8 @@ function formRefNames(controls) {
15844
16280
  if (!form || form.type !== "form" /* FORM */) continue;
15845
16281
  refs.set(form.id, formRefName(form));
15846
16282
  }
16283
+ const target = submitTargetOf(control, controls);
16284
+ if (target) refs.set(target.id, formRefName(target));
15847
16285
  }
15848
16286
  return refs;
15849
16287
  }
@@ -19921,8 +20359,83 @@ function countIconReferences(controlMap, name3) {
19921
20359
  var fieldChecks = (control) => control?.checks ?? [];
19922
20360
  var checkKind = (check) => check.kind ?? "function";
19923
20361
  var takesLimit = (kind) => LIMIT_CHECK_KINDS.includes(kind);
20362
+ var limitSourceOf = (check) => check.limitSource ?? "fixed";
20363
+ var isNumberScalar = (dataType, cardinality) => dataType?.type === "number" && (cardinality ?? "one") === "one";
20364
+ function limitSources(scope) {
20365
+ const map = {};
20366
+ const add = (entry2) => {
20367
+ map[entry2.id] = entry2;
20368
+ };
20369
+ const functions = scope.functions ?? {};
20370
+ const storeProp = (id) => {
20371
+ const prop = scope.storePropOf?.(id);
20372
+ return prop ? { storeProp: prop } : {};
20373
+ };
20374
+ Object.values(scope.inputs ?? {}).forEach((input) => {
20375
+ if (isNumberScalar(input.dataType, input.cardinality))
20376
+ add({ id: input.id, name: input.name, source: "screen", read: "signal" });
20377
+ });
20378
+ Object.values(scope.constants ?? {}).forEach((constant) => {
20379
+ if (constant.dataType === "number")
20380
+ add({
20381
+ id: constant.id,
20382
+ name: constant.name,
20383
+ source: "screen",
20384
+ read: "plain"
20385
+ });
20386
+ });
20387
+ Object.values(scope.variables ?? {}).forEach((variable) => {
20388
+ if (variable.dataType === "number" && variable.cardinality === "one")
20389
+ add({
20390
+ id: variable.id,
20391
+ name: variable.name,
20392
+ source: "screen",
20393
+ read: "signal"
20394
+ });
20395
+ });
20396
+ Object.values(scope.screenComputeds ?? {}).forEach((computed) => {
20397
+ const fn = computed.functionId ? functions[computed.functionId] : void 0;
20398
+ const held = fn ? { dataType: fn.returnType, cardinality: returnCardinalityOf(fn) } : computed.returns;
20399
+ if (held && isNumberScalar(held.dataType, held.cardinality))
20400
+ add({
20401
+ id: computed.id,
20402
+ name: computed.name,
20403
+ source: "screen",
20404
+ read: "signal"
20405
+ });
20406
+ });
20407
+ Object.values(scope.properties ?? {}).forEach((property) => {
20408
+ if (isNumberScalar(property.dataType, property.cardinality))
20409
+ add({
20410
+ id: property.id,
20411
+ name: property.name,
20412
+ source: "state",
20413
+ read: "signal",
20414
+ ...storeProp(property.id)
20415
+ });
20416
+ });
20417
+ Object.values(scope.computeds ?? {}).forEach((computed) => {
20418
+ const fn = functions[computed.functionId];
20419
+ if (fn && isNumberScalar(fn.returnType, returnCardinalityOf(fn)))
20420
+ add({
20421
+ id: computed.id,
20422
+ name: computed.name,
20423
+ source: "state",
20424
+ read: "signal",
20425
+ ...storeProp(computed.id)
20426
+ });
20427
+ });
20428
+ return map;
20429
+ }
20430
+ var limitSourceFor = (check, sources) => {
20431
+ const source = limitSourceOf(check);
20432
+ if (source === "fixed" || !check.limitRef) return void 0;
20433
+ const entry2 = sources[check.limitRef];
20434
+ return entry2?.source === source ? entry2 : void 0;
20435
+ };
20436
+ var isLimitDrawn = (check, sources = {}) => limitSourceOf(check) === "fixed" ? typeof check.limit === "number" && Number.isFinite(check.limit) : !!limitSourceFor(check, sources);
19924
20437
  var isBooleanStateProperty = (property) => property?.dataType.type === "boolean" && property.cardinality === "one";
19925
- var isCheckComplete = (check, functions, controlMap = {}, properties = {}) => {
20438
+ var isCheckComplete = (check, functions, controlMap = {}, properties = {}, sources = {}) => {
19926
20439
  const kind = checkKind(check);
19927
20440
  if (kind === "function") {
19928
20441
  const fn = functions[check.functionId];
@@ -19935,9 +20448,7 @@ var isCheckComplete = (check, functions, controlMap = {}, properties = {}) => {
19935
20448
  return !!bound && controlMap[bound]?.type === "field" /* FIELD */;
19936
20449
  });
19937
20450
  }
19938
- if (takesLimit(kind)) {
19939
- return typeof check.limit === "number" && Number.isFinite(check.limit);
19940
- }
20451
+ if (takesLimit(kind)) return isLimitDrawn(check, sources);
19941
20452
  if (kind === "matchField") {
19942
20453
  const target = check.matchFieldId ? controlMap[check.matchFieldId] : void 0;
19943
20454
  return target?.type === "field" /* FIELD */;
@@ -20046,13 +20557,16 @@ var STOCK_VALIDATOR = {
20046
20557
  minAge: "minAgeValidation",
20047
20558
  matchField: "matchFieldValidation"
20048
20559
  };
20049
- function stockStatement(kind, check, fieldName, controlMap) {
20560
+ function stockStatement(kind, check, fieldName, controlMap, limitRead) {
20050
20561
  const call = STOCK_VALIDATOR[kind];
20562
+ const limit = limitRead ? `state.${limitRead.name}` : `${check.limit}`;
20563
+ const drawn = takesLimit(kind) ? (check.message ?? "").trim() : "";
20564
+ const message = drawn ? `, '${drawn.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'${limitRead ? `, '${limitRead.name}'` : ""}` : "";
20051
20565
  if (kind === "email" || kind === "url") {
20052
20566
  return ` ${call}(tree['${fieldName}'] as SchemaPath<string>);`;
20053
20567
  }
20054
20568
  if (kind === "minAge") {
20055
- return ` ${call}(tree['${fieldName}'] as SchemaPath<string>, ${check.limit});`;
20569
+ return ` ${call}(tree['${fieldName}'] as SchemaPath<string>, ${limit}${message ? `, undefined${message}` : ""});`;
20056
20570
  }
20057
20571
  if (kind === "matchField") {
20058
20572
  const target = check.matchFieldId ? controlMap[check.matchFieldId] : void 0;
@@ -20071,14 +20585,15 @@ function stockStatement(kind, check, fieldName, controlMap) {
20071
20585
  ` );`
20072
20586
  ].join("\n");
20073
20587
  }
20074
- return ` ${call}(tree, ['${fieldName}'], ${check.limit});`;
20588
+ return ` ${call}(tree, ['${fieldName}'], ${limit}${message});`;
20075
20589
  }
20076
- function generateFormValidation(controlMap, formId, functions, properties = {}) {
20590
+ function generateFormValidation(controlMap, formId, functions, properties = {}, sources = {}) {
20077
20591
  const shape = buildFormShape(controlMap, formId);
20078
20592
  if (!shape) return void 0;
20079
20593
  const used = /* @__PURE__ */ new Map();
20080
20594
  const stock = /* @__PURE__ */ new Set();
20081
20595
  const statePropertyNames = /* @__PURE__ */ new Set();
20596
+ const limitReads = /* @__PURE__ */ new Map();
20082
20597
  const stateChecks = [];
20083
20598
  const blocks = [];
20084
20599
  let usesForm = false;
@@ -20088,7 +20603,8 @@ function generateFormValidation(controlMap, formId, functions, properties = {})
20088
20603
  const field = controlMap[fieldId];
20089
20604
  const name3 = resolveFieldName({ id: fieldId, configs: field.configs });
20090
20605
  fieldChecks(field).forEach((check) => {
20091
- if (!isCheckComplete(check, functions, controlMap, properties)) return;
20606
+ if (!isCheckComplete(check, functions, controlMap, properties, sources))
20607
+ return;
20092
20608
  const kind = checkKind(check);
20093
20609
  if (kind === "stateTrue" || kind === "stateFalse") {
20094
20610
  const property = check.statePropertyId ? properties[check.statePropertyId] : void 0;
@@ -20117,8 +20633,16 @@ function generateFormValidation(controlMap, formId, functions, properties = {})
20117
20633
  return;
20118
20634
  }
20119
20635
  if (kind !== "function") {
20120
- const statement = stockStatement(kind, check, name3, controlMap);
20636
+ const limitRead = takesLimit(kind) ? limitSourceFor(check, sources) : void 0;
20637
+ const statement = stockStatement(
20638
+ kind,
20639
+ check,
20640
+ name3,
20641
+ controlMap,
20642
+ limitRead
20643
+ );
20121
20644
  if (!statement) return;
20645
+ if (limitRead) limitReads.set(limitRead.name, limitRead);
20122
20646
  stock.add(STOCK_VALIDATOR[kind]);
20123
20647
  if (!takesLimit(kind) || kind === "minAge") usesSchemaPath = true;
20124
20648
  blocks.push(statement);
@@ -20172,6 +20696,9 @@ function generateFormValidation(controlMap, formId, functions, properties = {})
20172
20696
  functions: [...used.values()].sort((a, b) => a.name.localeCompare(b.name)),
20173
20697
  stockValidators: [...stock].sort(),
20174
20698
  statePropertyNames: [...statePropertyNames].sort(),
20699
+ limitReads: [...limitReads.values()].sort(
20700
+ (a, b) => a.name.localeCompare(b.name)
20701
+ ),
20175
20702
  fields: shape.keys,
20176
20703
  stateChecks,
20177
20704
  usesValidate,
@@ -20218,11 +20745,14 @@ function generateFormValidationFile(emission) {
20218
20745
  ] : [],
20219
20746
  ...functionImports ? [functionImports] : [],
20220
20747
  ``,
20221
- ...emission.statePropertyNames.length ? [
20748
+ ...emission.statePropertyNames.length || emission.limitReads.length ? [
20222
20749
  `export const ${emission.memberName} = (state: {`,
20223
20750
  ...emission.statePropertyNames.map(
20224
20751
  (name3) => ` ${name3}: () => boolean | undefined;`
20225
20752
  ),
20753
+ ...emission.limitReads.map(
20754
+ (read) => ` ${read.name}: () => number | undefined;`
20755
+ ),
20226
20756
  `}): SchemaOrSchemaFn<Record<string, unknown>> => (path) => {`
20227
20757
  ] : [
20228
20758
  `export const ${emission.memberName}: SchemaOrSchemaFn<`,
@@ -20240,41 +20770,74 @@ function generateFormValidationFile(emission) {
20240
20770
  ``
20241
20771
  ].join("\n");
20242
20772
  }
20243
- function formValidationBlock(controlMap, functions, properties = {}, stateAccessor = "") {
20773
+ function formValidationBlock(controlMap, functions, properties = {}, stateAccessor = "", sources = {}) {
20244
20774
  const emissions = Object.keys(controlMap).filter((id) => controlMap[id].type === "form" /* FORM */).map((id) => ({
20245
20775
  id,
20246
- emission: generateFormValidation(controlMap, id, functions, properties)
20776
+ emission: generateFormValidation(
20777
+ controlMap,
20778
+ id,
20779
+ functions,
20780
+ properties,
20781
+ sources
20782
+ )
20247
20783
  })).filter(
20248
20784
  (entry2) => !!entry2.emission
20249
20785
  ).map((entry2) => entry2.emission).sort((a, b) => a.memberName.localeCompare(b.memberName));
20250
20786
  if (!emissions.length) return { body: "", emissions: [] };
20251
20787
  const body = emissions.map((emission) => {
20252
- const state = emission.statePropertyNames.length ? `({ ${emission.statePropertyNames.map((name3) => `${name3}: ${stateAccessor}.${name3}`).join(", ")} })` : "";
20788
+ const entries = [
20789
+ ...emission.statePropertyNames.map(
20790
+ (name3) => `${name3}: ${stateAccessor}.${name3}`
20791
+ ),
20792
+ ...emission.limitReads.map((read) => {
20793
+ const receiver = read.source !== "state" ? "this" : read.storeProp ? `this.${read.storeProp}` : stateAccessor;
20794
+ const call = read.read === "signal" ? "()" : "";
20795
+ return `${read.name}: () => ${receiver}.${read.name}${call}`;
20796
+ })
20797
+ ];
20798
+ const state = entries.length ? `({ ${entries.join(", ")} })` : "";
20253
20799
  return ` protected readonly ${emission.memberName} = ${emission.memberName}${state};`;
20254
20800
  }).join("\n");
20255
20801
  return { body: `
20256
20802
  ${body}
20257
20803
  `, emissions };
20258
20804
  }
20259
- function formValidationFiles(controlMap, functions, properties = {}) {
20260
- return formValidationEmissions(controlMap, functions, properties).map(
20805
+ function formValidationFiles(controlMap, functions, properties = {}, sources = {}) {
20806
+ return formValidationEmissions(
20807
+ controlMap,
20808
+ functions,
20809
+ properties,
20810
+ sources
20811
+ ).map(
20261
20812
  ({ fileName, emission }) => ({
20262
20813
  fileName,
20263
20814
  contents: generateFormValidationFile(emission)
20264
20815
  })
20265
20816
  );
20266
20817
  }
20267
- function formValidationEmissions(controlMap, functions, properties = {}) {
20268
- return formValidationBlock(controlMap, functions, properties).emissions.map(
20818
+ function formValidationEmissions(controlMap, functions, properties = {}, sources = {}) {
20819
+ return formValidationBlock(
20820
+ controlMap,
20821
+ functions,
20822
+ properties,
20823
+ "",
20824
+ sources
20825
+ ).emissions.map(
20269
20826
  (emission) => ({
20270
20827
  fileName: validationFileName(emission.formName),
20271
20828
  emission
20272
20829
  })
20273
20830
  );
20274
20831
  }
20275
- function validationBindings(controlMap, functions, properties = {}) {
20832
+ function validationBindings(controlMap, functions, properties = {}, sources = {}) {
20276
20833
  const bindings = {};
20277
- formValidationBlock(controlMap, functions, properties).emissions.forEach(
20834
+ formValidationBlock(
20835
+ controlMap,
20836
+ functions,
20837
+ properties,
20838
+ "",
20839
+ sources
20840
+ ).emissions.forEach(
20278
20841
  (emission) => {
20279
20842
  bindings[emission.formId] = emission.memberName;
20280
20843
  }
@@ -20551,10 +21114,41 @@ function formModelSourceType(source, scope) {
20551
21114
  return void 0;
20552
21115
  }
20553
21116
  function canFillFormKey(source, key2) {
20554
- if (source.cardinality !== key2.cardinality) return false;
21117
+ if (source.cardinality === "many" && key2.cardinality === "one") return false;
21118
+ if (source.dataType === "file" || key2.dataType === "file") {
21119
+ return source.dataType === key2.dataType;
21120
+ }
20555
21121
  if (key2.dataType === "string") return true;
20556
21122
  return source.dataType === key2.dataType;
20557
21123
  }
21124
+ var asTransformType = (type) => ({
21125
+ dataType: { type: type.dataType === "file" ? "string" : type.dataType },
21126
+ cardinality: type.cardinality
21127
+ });
21128
+ var fromTransformType = (type) => {
21129
+ const { type: dataType } = type.dataType;
21130
+ if (dataType !== "string" && dataType !== "number" && dataType !== "boolean") {
21131
+ return void 0;
21132
+ }
21133
+ if (!isKeyCardinality(type.cardinality)) return void 0;
21134
+ return { dataType, cardinality: type.cardinality };
21135
+ };
21136
+ var keyTypeLabel = (type) => `${type.dataType}${type.cardinality === "many" ? "[]" : ""}`;
21137
+ function transformedKeyType(transform, sourceType, scope) {
21138
+ if (transformIncomplete(transform, scope.functions)) {
21139
+ return { ok: false, issue: "transform-incomplete" };
21140
+ }
21141
+ const inferred = inferTransformType(
21142
+ transform,
21143
+ asTransformType(sourceType),
21144
+ "call-arg",
21145
+ scope.functions
21146
+ );
21147
+ if (inferred.ok === false) return { ok: false, issue: "transform-incomplete" };
21148
+ const type = fromTransformType(inferred.type);
21149
+ if (!type) return { ok: false, issue: "transform-type-mismatch" };
21150
+ return { ok: true, type };
21151
+ }
20558
21152
  function formModelKeyIssue(key2, source, scope) {
20559
21153
  const keyType = formModelKeyType(key2);
20560
21154
  if (!keyType) return "source-type-mismatch";
@@ -20570,8 +21164,45 @@ function formModelKeyIssue(key2, source, scope) {
20570
21164
  }
20571
21165
  const sourceType = formModelSourceType(source, scope);
20572
21166
  if (!sourceType) return "source-missing";
21167
+ if (isFormModelReadSource(source) && source.transform) {
21168
+ const out = transformedKeyType(source.transform, sourceType, scope);
21169
+ if (out.ok === false) return out.issue;
21170
+ return canFillFormKey(out.type, keyType) ? void 0 : "transform-type-mismatch";
21171
+ }
20573
21172
  return canFillFormKey(sourceType, keyType) ? void 0 : "source-type-mismatch";
20574
21173
  }
21174
+ function formModelKeyMismatch(key2, source, scope) {
21175
+ if (!isFormModelReadSource(source) || source.transform) return void 0;
21176
+ const keyType = formModelKeyType(key2);
21177
+ const sourceType = formModelSourceType(source, scope);
21178
+ if (!keyType || !sourceType || canFillFormKey(sourceType, keyType)) {
21179
+ return void 0;
21180
+ }
21181
+ const fix = keyType.dataType === "file" ? void 0 : castTransform(asTransformType(sourceType), asTransformType(keyType));
21182
+ return {
21183
+ from: keyTypeLabel(sourceType),
21184
+ to: keyTypeLabel(keyType),
21185
+ ...fix ? { fix } : {}
21186
+ };
21187
+ }
21188
+ function formModelKeySignature(key2, source, scope) {
21189
+ if (!isFormModelReadSource(source)) return void 0;
21190
+ const keyType = formModelKeyType(key2);
21191
+ const sourceType = formModelSourceType(source, scope);
21192
+ if (!keyType || !sourceType || keyType.dataType === "file") return void 0;
21193
+ return {
21194
+ pipe: asTransformType(sourceType),
21195
+ expected: asTransformType(keyType)
21196
+ };
21197
+ }
21198
+ function formModelLandedType(source, scope) {
21199
+ const sourceType = formModelSourceType(source, scope);
21200
+ if (!sourceType) return void 0;
21201
+ if (!isFormModelReadSource(source) || !source.transform) return sourceType;
21202
+ const out = transformedKeyType(source.transform, sourceType, scope);
21203
+ return out.ok ? out.type : void 0;
21204
+ }
21205
+ var isDemoted = (issue) => !!issue && issue !== "source-type-mismatch" && issue !== "transform-incomplete" && issue !== "transform-type-mismatch";
20575
21206
  function reconcileFormModel(model, controlMap, scope) {
20576
21207
  const form = controlMap[model.formId];
20577
21208
  if (!form) return void 0;
@@ -20579,10 +21210,21 @@ function reconcileFormModel(model, controlMap, scope) {
20579
21210
  const keys = {};
20580
21211
  shapeKeys.forEach((key2) => {
20581
21212
  const stored = model.keys[key2.id] ?? { source: "empty" };
20582
- keys[key2.id] = formModelKeyIssue(key2, stored, scope) ? { source: "empty" } : stored;
21213
+ keys[key2.id] = isDemoted(formModelKeyIssue(key2, stored, scope)) ? { source: "empty" } : stored;
20583
21214
  });
20584
21215
  return { ...model, keys };
20585
21216
  }
21217
+ function formModelTransforms(models, controlMap, scope) {
21218
+ return models.flatMap(
21219
+ (model) => formModelShapeKeys(controlMap, model.formId).flatMap((key2) => {
21220
+ const source = model.keys[key2.id];
21221
+ if (!source || !isFormModelReadSource(source) || !source.transform) {
21222
+ return [];
21223
+ }
21224
+ return formModelKeyIssue(key2, source, scope) ? [] : [source.transform];
21225
+ })
21226
+ );
21227
+ }
20586
21228
  function reconcileFormModels(models, controlMap, scope) {
20587
21229
  const next = {};
20588
21230
  Object.entries(models).forEach(([id, model]) => {
@@ -20651,16 +21293,18 @@ function decodeKeySource(value) {
20651
21293
  if (kind === "fixed") return { source: "fixed", value: "" };
20652
21294
  return { source: "empty" };
20653
21295
  }
21296
+ var isPrimitive = (type) => type === "string" || type === "number" || type === "boolean";
21297
+ var sourceOptionLabel = (label, type, key2) => canFillFormKey(type, key2) ? label : `${label} (${keyTypeLabel(type)})`;
20654
21298
  function formModelScreenOptions(key2, scope) {
20655
21299
  const found = [];
20656
21300
  const walk = (prefix, label, dataType, cardinality, member, depth) => {
20657
21301
  if (dataType.type !== "shape" && dataType.type !== "form") {
20658
- const type = isKeyCardinality(cardinality) ? {
20659
- dataType: dataType.type,
20660
- cardinality
20661
- } : void 0;
20662
- if (type && canFillFormKey(type, key2)) {
20663
- found.push({ value: `${prefix}|${member.join(".")}`, label });
21302
+ const type = isKeyCardinality(cardinality) && isPrimitive(dataType.type) ? { dataType: dataType.type, cardinality } : void 0;
21303
+ if (type) {
21304
+ found.push({
21305
+ value: `${prefix}|${member.join(".")}`,
21306
+ label: sourceOptionLabel(label, type, key2)
21307
+ });
20664
21308
  }
20665
21309
  return;
20666
21310
  }
@@ -20693,9 +21337,14 @@ function formModelScreenOptions(key2, scope) {
20693
21337
  );
20694
21338
  });
20695
21339
  Object.values(scope.constants).forEach((constant) => {
20696
- if (canFillFormKey({ dataType: constant.dataType, cardinality: "one" }, key2)) {
20697
- found.push({ value: `constant|${constant.id}`, label: constant.name });
20698
- }
21340
+ found.push({
21341
+ value: `constant|${constant.id}`,
21342
+ label: sourceOptionLabel(
21343
+ constant.name,
21344
+ { dataType: constant.dataType, cardinality: "one" },
21345
+ key2
21346
+ )
21347
+ });
20699
21348
  });
20700
21349
  return found.sort((a, b) => a.label.localeCompare(b.label));
20701
21350
  }
@@ -20705,9 +21354,12 @@ function formModelStateOptions(key2, scope) {
20705
21354
  const found = [];
20706
21355
  const walk = (path, label, dataType, cardinality, depth) => {
20707
21356
  if (dataType.type !== "shape" && dataType.type !== "form") {
20708
- const type = isKeyCardinality(cardinality) ? { dataType: dataType.type, cardinality } : void 0;
20709
- if (type && canFillFormKey(type, key2)) {
20710
- found.push({ value: `path|${path.join(".")}`, label });
21357
+ const type = isKeyCardinality(cardinality) && isPrimitive(dataType.type) ? { dataType: dataType.type, cardinality } : void 0;
21358
+ if (type) {
21359
+ found.push({
21360
+ value: `path|${path.join(".")}`,
21361
+ label: sourceOptionLabel(label, type, key2)
21362
+ });
20711
21363
  }
20712
21364
  return;
20713
21365
  }
@@ -21075,6 +21727,15 @@ function bodyConfigs(node) {
21075
21727
  if (node.type === "audience_picker" /* AUDIENCE_PICKER */) {
21076
21728
  delete configs[AUDIENCE_PICKER_LEVELS_KEY];
21077
21729
  }
21730
+ if (node.type === "button" /* BUTTON */) {
21731
+ delete configs[SUBMIT_TARGET_KEY];
21732
+ delete configs[BUTTON_KEY_CONFIG_KEY];
21733
+ }
21734
+ if (node.type === "section_action" /* SECTION_ACTION */) {
21735
+ const key2 = actionSelectionKey(node);
21736
+ if (key2) configs[ACTION_SELECTION_KEY] = key2;
21737
+ else delete configs[ACTION_SELECTION_KEY];
21738
+ }
21078
21739
  if (node.type === "section_table" /* SECTION_TABLE */) {
21079
21740
  for (const key2 of Object.keys(configs)) {
21080
21741
  if (!SECTION_TABLE_INPUTS.has(key2)) delete configs[key2];
@@ -21205,7 +21866,11 @@ var RAW_BOUND_SLOTS = {
21205
21866
  ["heat_swatch" /* HEAT_SWATCH */]: [BINDING_SLOT.value],
21206
21867
  ["score_set_item" /* SCORE_SET_ITEM */]: [BINDING_SLOT.value],
21207
21868
  ["score_set" /* SCORE_SET */]: [BINDING_SLOT.scoreDate],
21208
- ["scale_mark" /* SCALE_MARK */]: [BINDING_SLOT.value]
21869
+ ["scale_mark" /* SCALE_MARK */]: [BINDING_SLOT.value],
21870
+ // A toggle SectionAction's pick: a ButtonKey or nothing, and `m-action` reads
21871
+ // nothing — or a key none of its Buttons hold — as its first Button
21872
+ // (m-one-ui ADR 0213).
21873
+ ["section_action" /* SECTION_ACTION */]: [BINDING_SLOT.selection]
21209
21874
  };
21210
21875
  var SECTION_TABLE_INPUTS = /* @__PURE__ */ new Set([
21211
21876
  "sticky",
@@ -21580,29 +22245,6 @@ function renderBranch(node, indent2, names, methods, operationOf, storeProp, ctx
21580
22245
  };
21581
22246
  return slots.map(chainFor).join("\n");
21582
22247
  }
21583
- var NAMED_SLOT_TAGS = /* @__PURE__ */ new Set([
21584
- "m-section-header",
21585
- "m-section-hero",
21586
- "m-jumbotron",
21587
- "m-section-search",
21588
- "m-section-stepper",
21589
- "m-section-badges",
21590
- "m-section-toggle",
21591
- "m-action",
21592
- "m-one-action",
21593
- "m-section-back",
21594
- "m-section-filter",
21595
- "m-section-filter-group",
21596
- "m-carousel",
21597
- "m-one-carousel",
21598
- "m-section-pagination",
21599
- "m-section-footer",
21600
- "m-app-logo"
21601
- ]);
21602
- function projectionSlotOf(node) {
21603
- const tag = codegenFor(node.type)?.tag.split(" ")[0];
21604
- return tag && NAMED_SLOT_TAGS.has(tag) ? tag : "";
21605
- }
21606
22248
  function branchSlots(arms) {
21607
22249
  const named = /* @__PURE__ */ new Set();
21608
22250
  let hasDefault = false;
@@ -21788,7 +22430,11 @@ function renderNode(node, indent2, names, methods, operationOf, storeProp, ctx,
21788
22430
  const guard = isScreenOwnedKind(node.variantKind) ? screenVariantGuard(node, ctx.screenVariants ?? {}) : variantGuard(node, names, storeProp);
21789
22431
  const inner = guard ? indent2 + 1 : indent2;
21790
22432
  const gaps = bindingGapComments(node, ctx, storeProp, " ".repeat(indent2));
21791
- const tag = renderTag(
22433
+ ctx.letNames ??= /* @__PURE__ */ new Set();
22434
+ const outerSink = ctx.letSink;
22435
+ const lets = [];
22436
+ ctx.letSink = lets;
22437
+ const drawn = renderTag(
21792
22438
  node,
21793
22439
  inner,
21794
22440
  names,
@@ -21799,9 +22445,24 @@ function renderNode(node, indent2, names, methods, operationOf, storeProp, ctx,
21799
22445
  wires,
21800
22446
  payloads
21801
22447
  );
21802
- if (!tag) return "";
22448
+ ctx.letSink = outerSink;
22449
+ if (!drawn) return "";
22450
+ const innerPad = " ".repeat(inner);
22451
+ const tag = `${lets.map((line) => `${innerPad}${line}
22452
+ `).join("")}${drawn}`;
21803
22453
  return `${gaps}${wrapInGuard(tag, guard, " ".repeat(indent2))}`;
21804
22454
  }
22455
+ var hoistLet = (ctx, read) => {
22456
+ const sink = ctx.letSink;
22457
+ const taken = ctx.letNames;
22458
+ if (!sink || !taken) return void 0;
22459
+ const base = `${/([A-Za-z_$][\w$]*)\W*$/.exec(read)?.[1] ?? "arg"}Value`;
22460
+ let name3 = base;
22461
+ for (let n = 2; taken.has(name3); n += 1) name3 = `${base}${n}`;
22462
+ taken.add(name3);
22463
+ sink.push(`@let ${name3} = ${read};`);
22464
+ return name3;
22465
+ };
21805
22466
  var attrBindingSlots = (type) => {
21806
22467
  if (type === "form" /* FORM */) return [BINDING_SLOT.data];
21807
22468
  if (type === "field" /* FIELD */ || type === "context_menu" /* CONTEXT_MENU */)
@@ -21859,11 +22520,25 @@ var validationMemberFor = (node, ctx) => {
21859
22520
  const bindings = validationBindings(
21860
22521
  controlMap,
21861
22522
  ctx.functions ?? {},
21862
- ctx.properties ?? {}
22523
+ ctx.properties ?? {},
22524
+ checkLimitSources(ctx)
21863
22525
  );
21864
22526
  return bindings[node.id];
21865
22527
  };
22528
+ var checkLimitSources = (ctx) => limitSources({
22529
+ inputs: ctx.inputs,
22530
+ constants: ctx.constants,
22531
+ variables: ctx.variables,
22532
+ screenComputeds: ctx.screenComputeds,
22533
+ properties: ctx.properties,
22534
+ computeds: ctx.computeds,
22535
+ functions: ctx.functions,
22536
+ storePropOf: ctx.storePropOf
22537
+ });
21866
22538
  var bindingScope = (ctx, storeProp) => ({
22539
+ // The render path hands its EmitContext here; any other caller carries no
22540
+ // `letSink`, and the read stays inline.
22541
+ hoist: (read) => hoistLet(ctx, read),
21867
22542
  properties: ctx.properties,
21868
22543
  shapes: ctx.shapes,
21869
22544
  computeds: ctx.computeds,
@@ -22091,6 +22766,7 @@ function boundAttrs(node, ctx, storeProp) {
22091
22766
  if (total) parts.push(` [total]="${total.read}"`);
22092
22767
  for (const slot of RAW_BOUND_SLOTS[node.type] ?? []) {
22093
22768
  if (!bindings?.[slot]) continue;
22769
+ if (slot === BINDING_SLOT.selection && !isToggleAction(node)) continue;
22094
22770
  const expr = bindingExpression(bindings[slot], scope);
22095
22771
  if (expr) parts.push(` [${slot}]="${expr}"`);
22096
22772
  }
@@ -22191,6 +22867,41 @@ var inSectionHeader = (node, ctx) => {
22191
22867
  const parentId = ctx.controlMap?.[node.id]?.parentId;
22192
22868
  return !!parentId && ctx.controlMap?.[parentId]?.type === "section_header" /* SECTION_HEADER */;
22193
22869
  };
22870
+ var submitTargetMember = (form) => `${formRefName(form).replace(/Ref$/, "")}SubmitTarget`;
22871
+ function submitTargetReads(node, ctx) {
22872
+ if (node.type !== "button" /* BUTTON */) return void 0;
22873
+ const controls = ctx.controlMap ?? {};
22874
+ const button = controls[node.id];
22875
+ const link = button ? submitTargetLink(button, controls) : void 0;
22876
+ if (!link) return void 0;
22877
+ if (link.access === "ref") {
22878
+ const ref = formRefName(link.form);
22879
+ return { blocked: `${ref}.blocked()`, submit: `${ref}.submitNow()` };
22880
+ }
22881
+ const member = submitTargetMember(link.form);
22882
+ return {
22883
+ blocked: `${member}()?.blocked() ?? true`,
22884
+ submit: `${member}()?.submitNow()`
22885
+ };
22886
+ }
22887
+ function submitTargetQueriesBlock(controls) {
22888
+ const forms = /* @__PURE__ */ new Map();
22889
+ for (const control of Object.values(controls)) {
22890
+ const link = submitTargetLink(control, controls);
22891
+ if (link?.access === "query") forms.set(link.form.id, link.form);
22892
+ }
22893
+ return [...forms.values()].map(
22894
+ (form) => `
22895
+ protected readonly ${submitTargetMember(
22896
+ form
22897
+ )} = viewChild<SectionFormComponent>('${formRefName(form)}');
22898
+ `
22899
+ ).join("");
22900
+ }
22901
+ function withSubmitCall(outputs, submit) {
22902
+ if (!submit) return outputs;
22903
+ return outputs.includes(' (clicked)="') ? outputs.replace(' (clicked)="', ` (clicked)="${submit}; `) : `${outputs} (clicked)="${submit}"`;
22904
+ }
22194
22905
  function tagAttrs(node, ctx, storeProp) {
22195
22906
  if (node.type === "audience_picker" /* AUDIENCE_PICKER */) {
22196
22907
  const config = ctx.audiencePickerConfigNames?.get(node.id);
@@ -22219,6 +22930,14 @@ function tagAttrs(node, ctx, storeProp) {
22219
22930
  const ref = formRefNames(ctx.controlMap ?? {}).get(node.id);
22220
22931
  return `${ref ? ` #${ref}` : ""}${inlineAttrs(node)}${member ? ` [validation]="${member}"` : ""}${boundAttrs(node, ctx, storeProp)}`;
22221
22932
  }
22933
+ const submitReads = submitTargetReads(node, ctx);
22934
+ if (submitReads) {
22935
+ const configs2 = { ...node.configs ?? {} };
22936
+ delete configs2["isSubmit"];
22937
+ const locked = configs2["disabled"] === true;
22938
+ if (!locked) delete configs2["disabled"];
22939
+ return `${inlineAttrs({ ...node, configs: configs2 })}${locked ? "" : ` [disabled]="${submitReads.blocked}"`}${boundAttrs(node, ctx, storeProp)}`;
22940
+ }
22222
22941
  if (node.type === "section_carousel" /* SECTION_CAROUSEL */) {
22223
22942
  const slides = cardEmit(
22224
22943
  node,
@@ -22913,7 +23632,7 @@ ${" ".repeat(indent2 + index)}}`,
22913
23632
  ctx.overlayNames,
22914
23633
  bindingScope(ctx, storeProp),
22915
23634
  ctx.controlMap?.[node.id]?.bindings
22916
- )}${sectionTableRowItemAttr(node, ctx.controlMap)}${foldedName ? "" : outputAttrs(node, methods, operationOf, storeProp, ctx)}`;
23635
+ )}${sectionTableRowItemAttr(node, ctx.controlMap)}${foldedName ? "" : withSubmitCall(outputAttrs(node, methods, operationOf, storeProp, ctx), submitTargetReads(node, ctx)?.submit)}`;
22917
23636
  const totalGuard = paginationTotalRead(node, ctx, storeProp)?.guard;
22918
23637
  if (totalGuard) {
22919
23638
  return `${pad2}@if (${totalGuard}; as ${PAGINATION_TOTAL_ALIAS}) {
@@ -23438,8 +24157,18 @@ var formModelDeclsBlock = (models, scope) => {
23438
24157
  }
23439
24158
  return void 0;
23440
24159
  };
23441
- const coerce = (read, type) => {
23442
- if (type.cardinality === "many") return `${read} ?? []`;
24160
+ const keyScope = {
24161
+ inputs: scope.inputs,
24162
+ computeds: scope.computeds,
24163
+ constants: scope.constants,
24164
+ functions: scope.functions,
24165
+ shapes: scope.shapes,
24166
+ ...scope.storeProp ? { properties: scope.properties } : {}
24167
+ };
24168
+ const coerce = (read, type, landed) => {
24169
+ if (type.cardinality === "many") {
24170
+ return landed?.cardinality === "one" ? `[${read}].filter((value) => value !== undefined)` : `${read} ?? []`;
24171
+ }
23443
24172
  if (type.dataType === "boolean") return `${read} ?? false`;
23444
24173
  if (type.dataType === "number" || type.dataType === "file") return read;
23445
24174
  return `String(${read} ?? '')`;
@@ -23455,13 +24184,21 @@ var formModelDeclsBlock = (models, scope) => {
23455
24184
  const keyType = formModelKeyType(key2);
23456
24185
  if (!keyType) return ` ${key2.name}: undefined,`;
23457
24186
  const source = model.keys[key2.id] ?? { source: "empty" };
24187
+ if (formModelKeyIssue(key2, source, keyScope)) {
24188
+ return ` ${key2.name}: ${formModelKeyZero(keyType)},`;
24189
+ }
23458
24190
  if (source.source === "fixed") {
23459
24191
  return ` ${key2.name}: ${literalExpression(source.value, {
23460
24192
  type: keyType.dataType
23461
24193
  })},`;
23462
24194
  }
23463
- const read = sourceRead(source);
23464
- return ` ${key2.name}: ${read ? coerce(read, keyType) : formModelKeyZero(keyType)},`;
24195
+ const raw = sourceRead(source);
24196
+ const read = raw && isFormModelReadSource(source) && source.transform ? emitTransformExpr(source.transform, raw, {
24197
+ functions: scope.functions,
24198
+ constants: scope.constants,
24199
+ scope: "class"
24200
+ }) : raw;
24201
+ return ` ${key2.name}: ${read ? coerce(read, keyType, formModelLandedType(source, keyScope)) : formModelKeyZero(keyType)},`;
23465
24202
  });
23466
24203
  const body = rows.length ? `
23467
24204
  ${rows.join("\n")}
@@ -23707,7 +24444,7 @@ ${statements.map((line) => ` ${line};`).join("\n")}
23707
24444
  });
23708
24445
  return emitted.join("");
23709
24446
  }
23710
- function outputOpenEmit(node, output, ctx, storeProp, indent2 = " ", methods = {}, operationOf = () => void 0) {
24447
+ function outputOpenEmit(node, output, ctx, storeProp, indent2 = " ", methods = {}, operationOf = () => void 0, aliasArgs = false) {
23711
24448
  const open = outputOpenOf(node.outputOpens, output);
23712
24449
  if (!open?.screenId) return void 0;
23713
24450
  const ref = ctx.outputOpenRef?.(open.screenId);
@@ -23716,6 +24453,10 @@ function outputOpenEmit(node, output, ctx, storeProp, indent2 = " ", methods
23716
24453
  if (ref.inputs.some((input) => input.required && !filled.has(input.id)))
23717
24454
  return void 0;
23718
24455
  const payload = nodePayloadShape(node, output, ctx);
24456
+ const aliasParams = /* @__PURE__ */ new Map();
24457
+ const readsAlias = (binding) => binding.root.kind === "alias" || transformBindingLeaves(binding.transform).some(
24458
+ (leaf) => leaf.root.kind === "alias"
24459
+ );
23719
24460
  const entries = outputOpenInputEntries(
23720
24461
  open,
23721
24462
  ref.inputs,
@@ -23733,14 +24474,24 @@ function outputOpenEmit(node, output, ctx, storeProp, indent2 = " ", methods
23733
24474
  const member = screenMemberExpression(binding, ctx);
23734
24475
  return member ? `this.${member}` : void 0;
23735
24476
  },
23736
- (binding) => bindingExpression(binding, {
23737
- ...bindingScope(ctx, storeProp),
23738
- memberPrefix: "this."
23739
- }),
24477
+ (binding) => {
24478
+ if (!readsAlias(binding))
24479
+ return bindingExpression(binding, {
24480
+ ...bindingScope(ctx, storeProp),
24481
+ memberPrefix: "this."
24482
+ });
24483
+ if (!aliasArgs || binding.transform) return void 0;
24484
+ const read = bindingExpression(binding, bindingScope(ctx, storeProp));
24485
+ if (!read) return void 0;
24486
+ const param = aliasParams.get(read) ?? `$row${aliasParams.size}`;
24487
+ aliasParams.set(read, param);
24488
+ return param;
24489
+ },
23740
24490
  screenSourceReader(ctx, bindingScope(ctx, storeProp))
23741
24491
  );
23742
24492
  if (!entries) return void 0;
23743
24493
  return {
24494
+ aliasReads: [...aliasParams.keys()],
23744
24495
  member: outputOpenMemberName(node.id, output),
23745
24496
  // A member reading nothing off the gesture takes no parameter, so a void
23746
24497
  // output such as `clicked` opens the overlay with an empty call.
@@ -23923,11 +24674,14 @@ function outputOpenCall(node, output, ctx, scope, storeProp, methods, operationO
23923
24674
  storeProp,
23924
24675
  " ",
23925
24676
  methods,
23926
- operationOf
24677
+ operationOf,
24678
+ true
23927
24679
  );
23928
24680
  if (!emit) return "";
24681
+ if (scope === "class" && emit.aliasReads.length) return "";
23929
24682
  const self = scope === "class" ? "this." : "";
23930
- return `${self}${emit.member}(${emit.readsEvent ? "$event" : ""})`;
24683
+ const args = [...emit.readsEvent ? ["$event"] : [], ...emit.aliasReads];
24684
+ return `${self}${emit.member}(${args.join(", ")})`;
23931
24685
  }
23932
24686
  function outputOpenMembersBlock(tree, ctx, payloads, storeProp, methods, operationOf) {
23933
24687
  const emitted = [];
@@ -23944,13 +24698,19 @@ function outputOpenMembersBlock(tree, ctx, payloads, storeProp, methods, operati
23944
24698
  storeProp,
23945
24699
  " ",
23946
24700
  methods,
23947
- operationOf
24701
+ operationOf,
24702
+ true
23948
24703
  );
23949
24704
  if (!emit) continue;
23950
24705
  const payload = nodePayloadShape(node, output, ctx);
23951
- const param = emit.readsEvent ? `$event: ${payloads.get(node.id)?.type ?? handlerEventType(payload, node.type, output)}` : "";
24706
+ const params = [
24707
+ ...emit.readsEvent ? [
24708
+ `$event: ${payloads.get(node.id)?.type ?? handlerEventType(payload, node.type, output)}`
24709
+ ] : [],
24710
+ ...emit.aliasReads.map((_, index) => `$row${index}: unknown`)
24711
+ ].join(", ");
23952
24712
  emitted.push(`
23953
- protected readonly ${emit.member} = (${param}): void => {
24713
+ protected readonly ${emit.member} = (${params}): void => {
23954
24714
  ${emit.statement}
23955
24715
  };
23956
24716
  `);
@@ -26049,7 +26809,8 @@ function generateTs(tree, naming, featureName, variants = {}, methods = {}, oper
26049
26809
  ctx.controlMap ?? {},
26050
26810
  ctx.functions ?? {},
26051
26811
  ctx.properties ?? {},
26052
- `this.${storeProp}`
26812
+ `this.${storeProp}`,
26813
+ checkLimitSources(ctx)
26053
26814
  );
26054
26815
  const checksBody = checks.body;
26055
26816
  const tables = sectionTableEmissions(ctx.controlMap ?? {});
@@ -26063,7 +26824,9 @@ ${tables.map(
26063
26824
  ).join("\n")}
26064
26825
  ` : "";
26065
26826
  const checksReadState = checks.emissions.some(
26066
- (emission) => emission.statePropertyNames.length > 0
26827
+ (emission) => emission.statePropertyNames.length > 0 || emission.limitReads.some(
26828
+ (read) => read.source === "state" && !read.storeProp
26829
+ )
26067
26830
  );
26068
26831
  const validationImports = checks.emissions.map(
26069
26832
  (emission) => `import { ${emission.memberName} } from '../lib/${validationFileBase(
@@ -26345,9 +27108,13 @@ ${tables.map(
26345
27108
  ctx.storePropOf,
26346
27109
  ctx.outputs ?? {}
26347
27110
  );
27111
+ const submitTargetQueriesBody = submitTargetQueriesBlock(
27112
+ ctx.controlMap ?? {}
27113
+ );
26348
27114
  const angularCore = [
26349
27115
  "ChangeDetectionStrategy",
26350
27116
  "Component",
27117
+ ...submitTargetQueriesBody ? ["viewChild"] : [],
26351
27118
  ...screenComputedsBody || screenVariantsBody || cardsBody || messageParamsBody ? ["computed"] : [],
26352
27119
  ...autoCalls.length ? ["effect"] : [],
26353
27120
  ...autoCallsBody.includes("untracked(") ? ["untracked"] : [],
@@ -26376,6 +27143,24 @@ ${tables.map(
26376
27143
  if (fn) screenFunctions.set(fn.name, fn);
26377
27144
  }
26378
27145
  for (const fn of variantFunctions) screenFunctions.set(fn.name, fn);
27146
+ for (const id of templateTransformRefs(
27147
+ formModelTransforms(
27148
+ Object.values(ctx.formModels ?? {}),
27149
+ ctx.controlMap ?? {},
27150
+ {
27151
+ inputs: ctx.inputs ?? {},
27152
+ computeds: screenComputeds,
27153
+ constants,
27154
+ functions: ctx.functions ?? {},
27155
+ shapes,
27156
+ ...needsStore ? { properties: ctx.properties ?? {} } : {}
27157
+ }
27158
+ ),
27159
+ ctx.functions ?? {}
27160
+ ).functionIds) {
27161
+ const fn = (ctx.functions ?? {})[id];
27162
+ if (fn) screenFunctions.set(fn.name, fn);
27163
+ }
26379
27164
  for (const handler of Object.values(ctx.screenMethods ?? {})) {
26380
27165
  for (const one of screenMethodCalls(handler)) {
26381
27166
  const fn = (ctx.functions ?? {})[one.functionId ?? ""];
@@ -26625,7 +27410,7 @@ ${`${outcomeHandlersBody}${menuActionHandlersBody}`.includes("$event: MenuItem")
26625
27410
  width: 100%
26626
27411
  \`,
26627
27412
  })
26628
- export class ${naming.className} {${storeBody}${busyBody}${authBody}${globalStoreBody}${modalBody}${overlayRefBody}${navRefBody}${navRouterBody}${imgApiOriginBody}${inputsBody}${constantsBody}${screenComputedsBody}${variablesBody}${formModelsBody}${screenVariantsBody}${cardsBody}${searchBody}${messageParamsBody}${outputsBody}${wiresBody}${overlayProps}${contextMenuConfigBody}${audiencePickerConfigBody}${payloadsBody}${transformMembersBody}${memberEnumsBody}${payloadReadersBody}${sectionTablesBody}${checksBody}${screenMethodsBody}${outputOpenBody}${outputLinkBody}${outcomeHandlersBody}${menuActionHandlersBody}${menuConditionBody}${outputArmHandlersBody}${autoCallsBody}}
27413
+ export class ${naming.className} {${storeBody}${busyBody}${authBody}${globalStoreBody}${modalBody}${overlayRefBody}${navRefBody}${navRouterBody}${imgApiOriginBody}${inputsBody}${constantsBody}${screenComputedsBody}${variablesBody}${formModelsBody}${screenVariantsBody}${cardsBody}${searchBody}${messageParamsBody}${outputsBody}${wiresBody}${overlayProps}${contextMenuConfigBody}${audiencePickerConfigBody}${payloadsBody}${transformMembersBody}${memberEnumsBody}${payloadReadersBody}${sectionTablesBody}${submitTargetQueriesBody}${checksBody}${screenMethodsBody}${outputOpenBody}${outputLinkBody}${outcomeHandlersBody}${menuActionHandlersBody}${menuConditionBody}${outputArmHandlersBody}${autoCallsBody}}
26629
27414
  `;
26630
27415
  }
26631
27416
  function assetName(node) {
@@ -26779,12 +27564,14 @@ function generateCode(tree, featureName, screenName, properties = {}, variants =
26779
27564
  validationFiles: formValidationFiles(
26780
27565
  ctx.controlMap ?? {},
26781
27566
  ctx.functions ?? {},
26782
- properties
27567
+ properties,
27568
+ checkLimitSources(codegenCtx)
26783
27569
  ),
26784
27570
  validationEmissions: formValidationEmissions(
26785
27571
  ctx.controlMap ?? {},
26786
27572
  ctx.functions ?? {},
26787
- properties
27573
+ properties,
27574
+ checkLimitSources(codegenCtx)
26788
27575
  ),
26789
27576
  sectionTableFiles: sectionTableFiles(
26790
27577
  sectionTableEmissions(ctx.controlMap ?? {}),
@@ -26961,7 +27748,7 @@ __export(package_exports, {
26961
27748
  version: () => version
26962
27749
  });
26963
27750
  var name = "@magmonium/one";
26964
- var version = "0.4.88";
27751
+ var version = "0.4.109";
26965
27752
  var description = "Magmonium One \u2014 Angular design-system primitives for mm Apps";
26966
27753
  var author = "magmonium";
26967
27754
  var license = "MIT";
@@ -27029,7 +27816,7 @@ __export(package_exports2, {
27029
27816
  version: () => version2
27030
27817
  });
27031
27818
  var name2 = "@magmonium/cli";
27032
- var version2 = "0.8.25";
27819
+ var version2 = "0.8.27";
27033
27820
  var description2 = "A powerful and extensible asset compilation tool that can be shared across multiple projects";
27034
27821
  var bin = {
27035
27822
  "mag-cli": "bin/cli.js"
@@ -27328,6 +28115,49 @@ var migrateLadder = (id, ladder, out) => {
27328
28115
  };
27329
28116
  };
27330
28117
 
28118
+ // libs/codegen/src/lib/button-key-migration.ts
28119
+ var recordOf2 = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
28120
+ var backfillButtonKeys = (controlMap) => {
28121
+ const map = recordOf2(controlMap);
28122
+ if (!map) return controlMap;
28123
+ const out = { ...map };
28124
+ for (const [id, raw] of Object.entries(map)) {
28125
+ const bar = recordOf2(raw);
28126
+ if (bar?.["type"] !== "section_action" /* SECTION_ACTION */) continue;
28127
+ const childIds = (Array.isArray(bar["childrens"]) ? bar["childrens"] : []).filter(
28128
+ (c) => typeof c === "string"
28129
+ );
28130
+ const childrens = childIds.flatMap((childId) => {
28131
+ const child = recordOf2(map[childId]);
28132
+ if (!child) return [];
28133
+ return [
28134
+ {
28135
+ id: childId,
28136
+ type: child["type"],
28137
+ configs: recordOf2(child["configs"]) ?? {},
28138
+ childrens: []
28139
+ }
28140
+ ];
28141
+ });
28142
+ const keys = suggestedButtonKeys({
28143
+ id,
28144
+ type: "section_action" /* SECTION_ACTION */,
28145
+ configs: recordOf2(bar["configs"]) ?? {},
28146
+ childrens
28147
+ });
28148
+ for (const [buttonId, key2] of keys) {
28149
+ const button = recordOf2(out[buttonId]);
28150
+ const configs = recordOf2(button?.["configs"]) ?? {};
28151
+ if (!button || configs[BUTTON_KEY_CONFIG_KEY]) continue;
28152
+ out[buttonId] = {
28153
+ ...button,
28154
+ configs: { ...configs, [BUTTON_KEY_CONFIG_KEY]: key2 }
28155
+ };
28156
+ }
28157
+ }
28158
+ return out;
28159
+ };
28160
+
27331
28161
  // libs/codegen/src/model/control-group.ts
27332
28162
  var CONTROL_GROUP_NAME_MAX = 40;
27333
28163
  var NAME_PATTERN = /^[a-z0-9][a-z0-9-]*$/;
@@ -28804,7 +29634,7 @@ var caseEquals = (actual, expected) => {
28804
29634
  };
28805
29635
 
28806
29636
  // libs/codegen/src/lib/workspace-codec.ts
28807
- var WORKSPACE_SCHEMA_VERSION = 31;
29637
+ var WORKSPACE_SCHEMA_VERSION = 32;
28808
29638
  var MIGRATION_FLOOR = 18;
28809
29639
  var DEPLOY_TOKEN_METHOD_IDS = {
28810
29640
  "@UserStore.ensureDeployToken": "@AuthStore.ensureDeployToken",
@@ -28920,34 +29750,34 @@ var SCREEN_OUTPUT_SIBLINGS = [
28920
29750
  ["screenOutputScreenWrites", "outputScreenWrites"],
28921
29751
  ["screenOutputOutcomes", "outputOutcomes"]
28922
29752
  ];
28923
- var recordOf2 = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
29753
+ var recordOf3 = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
28924
29754
  var migrateScreenOutputMaps = (control) => {
28925
29755
  if (!Object.keys(control).some((key2) => key2.startsWith("screenOutput"))) {
28926
29756
  return control;
28927
29757
  }
28928
29758
  const next = { ...control };
28929
29759
  const merge = (field, key2, value) => {
28930
- next[field] = { ...recordOf2(next[field]) ?? {}, [key2]: value };
29760
+ next[field] = { ...recordOf3(next[field]) ?? {}, [key2]: value };
28931
29761
  };
28932
29762
  for (const [from, to] of SCREEN_OUTPUT_SIBLINGS) {
28933
- for (const [key2, value] of Object.entries(recordOf2(control[from]) ?? {})) {
29763
+ for (const [key2, value] of Object.entries(recordOf3(control[from]) ?? {})) {
28934
29764
  merge(to, key2, value);
28935
29765
  }
28936
29766
  delete next[from];
28937
29767
  }
28938
- const emits = recordOf2(control["screenOutputEmits"]) ?? {};
29768
+ const emits = recordOf3(control["screenOutputEmits"]) ?? {};
28939
29769
  for (const [key2, rows] of Object.entries(emits)) {
28940
29770
  merge("outputEmits", key2, rows);
28941
29771
  }
28942
29772
  delete next["screenOutputEmits"];
28943
- const bindings = recordOf2(control["screenOutputs"]) ?? {};
29773
+ const bindings = recordOf3(control["screenOutputs"]) ?? {};
28944
29774
  for (const [key2, raw] of Object.entries(bindings)) {
28945
29775
  const binding = raw;
28946
29776
  if (binding?.kind === "method") {
28947
29777
  merge("outputs", key2, binding.methodId);
28948
29778
  if (binding.args?.length) merge("outputArgs", key2, binding.args);
28949
29779
  } else if (binding?.kind === "output") {
28950
- const drawn = recordOf2(next["outputEmits"])?.[key2];
29780
+ const drawn = recordOf3(next["outputEmits"])?.[key2];
28951
29781
  merge("outputEmits", key2, [
28952
29782
  ...Array.isArray(drawn) ? drawn : [],
28953
29783
  { id: `reemit-${key2}`, outputId: binding.outputId, value: { kind: "event" } }
@@ -29054,6 +29884,10 @@ var screenOnly = (step) => ({
29054
29884
  step
29055
29885
  });
29056
29886
  var MIGRATIONS = {
29887
+ // 31 → 32: every folded Button keeps the name its bar rendered it under as
29888
+ // its ButtonKey, in a Screen's ControlMap and in every ControlGroup
29889
+ // (m-one-ui ADR 0213).
29890
+ 31: everyKind((blob) => mapBlobControlMaps(blob, backfillButtonKeys)),
29057
29891
  // 30 → 31: a PriceLadder becomes a Scale — its marks ScaleMarks, its chips
29058
29892
  // and picked indicators ScaleRelations — in a Screen's ControlMap and in
29059
29893
  // every ControlGroup (libs/one GLOSSARY.md Scale).
@@ -29336,9 +30170,7 @@ function sanitizeShapes(shapes, reachable = {}, owner = "feature") {
29336
30170
  const raw = value.keys;
29337
30171
  if (!Array.isArray(raw)) continue;
29338
30172
  const takenKeys = /* @__PURE__ */ new Set();
29339
- named[id].keys = raw.filter((key2) => !!key2 && typeof key2 === "object").filter(
29340
- (key2) => typeof key2.name === "string" && isValidPropertyName(key2.name)
29341
- ).filter(
30173
+ named[id].keys = raw.filter((key2) => !!key2 && typeof key2 === "object").filter((key2) => typeof key2.name === "string" && key2.name.trim() !== "").filter(
29342
30174
  (key2) => !takenKeys.has(key2.name) && takenKeys.add(key2.name) !== null
29343
30175
  ).map((key2) => {
29344
30176
  const dataType = sanitizeDataType(key2.dataType, {
@@ -30430,6 +31262,11 @@ function sanitizeFormKeySource(value, scope) {
30430
31262
  const source = value;
30431
31263
  const member = source.member;
30432
31264
  const walk = Array.isArray(member) && member.every((id) => typeof id === "string") ? member : void 0;
31265
+ const transform = sanitizeTransform(
31266
+ source.transform,
31267
+ scope.functions
31268
+ );
31269
+ const fit = transform ? { transform } : {};
30433
31270
  if (source.source === "fixed") {
30434
31271
  return typeof source.value === "string" && source.value.trim() ? { source: "fixed", value: source.value } : EMPTY_KEY;
30435
31272
  }
@@ -30437,24 +31274,26 @@ function sanitizeFormKeySource(value, scope) {
30437
31274
  return scope.inputs[source.inputId] ? {
30438
31275
  source: "input",
30439
31276
  inputId: source.inputId,
30440
- ...walk ? { member: walk } : {}
31277
+ ...walk ? { member: walk } : {},
31278
+ ...fit
30441
31279
  } : EMPTY_KEY;
30442
31280
  }
30443
31281
  if (source.source === "computed") {
30444
31282
  return scope.computedIds.has(source.computedId) ? {
30445
31283
  source: "computed",
30446
31284
  computedId: source.computedId,
30447
- ...walk ? { member: walk } : {}
31285
+ ...walk ? { member: walk } : {},
31286
+ ...fit
30448
31287
  } : EMPTY_KEY;
30449
31288
  }
30450
31289
  if (source.source === "constant") {
30451
- return scope.constants[source.constantId] ? { source: "constant", constantId: source.constantId } : EMPTY_KEY;
31290
+ return scope.constants[source.constantId] ? { source: "constant", constantId: source.constantId, ...fit } : EMPTY_KEY;
30452
31291
  }
30453
31292
  if (source.source === "path") {
30454
31293
  if (!scope.hasStore) return EMPTY_KEY;
30455
31294
  if (!Array.isArray(source.path) || !source.path.length) return EMPTY_KEY;
30456
31295
  if (!source.path.every((id) => typeof id === "string")) return EMPTY_KEY;
30457
- return scope.properties[source.path[0]] ? { source: "path", path: source.path } : EMPTY_KEY;
31296
+ return scope.properties[source.path[0]] ? { source: "path", path: source.path, ...fit } : EMPTY_KEY;
30458
31297
  }
30459
31298
  return EMPTY_KEY;
30460
31299
  }
@@ -30579,7 +31418,10 @@ function sanitizeScreens(screens, features, appFunctions, sharedShapes = {}, enu
30579
31418
  if (Object.keys(variants).length) meta.variants = variants;
30580
31419
  const outputs = sanitizeScreenOutputs(screen.outputs, kind);
30581
31420
  if (Object.keys(outputs).length) meta.outputs = outputs;
30582
- const autoCalls = sanitizeAutoCalls(screen.autoCalls, kind);
31421
+ const autoCalls = splitAutoCallEmits(
31422
+ sanitizeAutoCalls(screen.autoCalls, kind),
31423
+ inputs
31424
+ );
30583
31425
  if (autoCalls.length) meta.autoCalls = autoCalls;
30584
31426
  if (screen.exposed === true && kind !== "page") meta.exposed = true;
30585
31427
  const taken = /* @__PURE__ */ new Set([
@@ -30639,7 +31481,8 @@ function sanitizeScreens(screens, features, appFunctions, sharedShapes = {}, enu
30639
31481
  constants,
30640
31482
  computedIds: new Set(Object.keys(computeds)),
30641
31483
  properties: feature?.properties ?? {},
30642
- hasStore: hasStore(kind)
31484
+ hasStore: hasStore(kind),
31485
+ functions: feature ? { ...appFunctions, ...feature.functions } : appFunctions
30643
31486
  });
30644
31487
  if (Object.keys(formModels).length) meta.formModels = formModels;
30645
31488
  const screenMethods = sanitizeScreenMethods(screen.methods, taken);
@@ -34554,9 +35397,13 @@ var blankLiteral = (dataType, cardinality) => {
34554
35397
  };
34555
35398
  var modelLiteral = (fields, value) => fields.length ? `{ ${fields.map((field) => `${key(field.name)}: ${value(field)}`).join(", ")} }` : "{}";
34556
35399
  var validationTest = (path, emission, shapes = {}) => {
34557
- const { memberName: memberName2, fields, stateChecks, statePropertyNames } = emission;
35400
+ const { memberName: memberName2, fields, stateChecks, statePropertyNames, limitReads } = emission;
34558
35401
  const takesState = statePropertyNames.length > 0;
34559
- const schema = takesState ? `${memberName2}({ ${statePropertyNames.map((name3) => `${key(name3)}: () => holds`).join(", ")} })` : memberName2;
35402
+ const factoryArgs = [
35403
+ ...statePropertyNames.map((name3) => `${key(name3)}: () => holds`),
35404
+ ...limitReads.map((read) => `${key(read.name)}: () => undefined`)
35405
+ ];
35406
+ const schema = factoryArgs.length ? `${memberName2}({ ${factoryArgs.join(", ")} })` : memberName2;
34560
35407
  const runs = takesState ? ["true", "false"] : [""];
34561
35408
  const readAll = (model) => runs.map(
34562
35409
  (holds) => `expect(Object.keys(errorsOf(${[model, holds].filter(Boolean).join(", ")}))).toEqual(Object.keys(${model}));`
@@ -35400,6 +36247,10 @@ var HISTORY_LABELS = [
35400
36247
  // Screen's slot riding it beside the target's (GLOSSARY.md ScreenLink).
35401
36248
  "paste-screen-link",
35402
36249
  "paste-control",
36250
+ // A block row's Cut, so `undo` knows to empty the OutputBlockClipboard the
36251
+ // way it empties the Control clipboard after `cut-control`; and its Paste.
36252
+ "cut-output-block",
36253
+ "paste-output-block",
35403
36254
  "edit-control",
35404
36255
  "edit-binding",
35405
36256
  "edit-variant",
@@ -35455,6 +36306,7 @@ var HISTORY_SELECTION_KEYS = [
35455
36306
  // Annotate the CommonJS export names for ESM import in node:
35456
36307
  0 && (module.exports = {
35457
36308
  ACTION_NAME_READER,
36309
+ ACTION_SELECTION_KEY,
35458
36310
  ALL_VARIANT,
35459
36311
  API_SEGMENT,
35460
36312
  APP_CONFIG_SOURCE,
@@ -35490,6 +36342,8 @@ var HISTORY_SELECTION_KEYS = [
35490
36342
  BUSY_VARIANT_ID,
35491
36343
  BUSY_VARIANT_NAME,
35492
36344
  BUTTON_CLICK_OUTPUT,
36345
+ BUTTON_KEY_CONFIG_KEY,
36346
+ BUTTON_KEY_PATTERN,
35493
36347
  CALL_ARG_SOURCES,
35494
36348
  CALL_ARG_TRANSFORM_LEAVES,
35495
36349
  CALL_CONDITION_KINDS,
@@ -35752,6 +36606,7 @@ var HISTORY_SELECTION_KEYS = [
35752
36606
  STYLE_DIRECTIVE_FORM,
35753
36607
  STYLE_DIRECTIVE_KEYS,
35754
36608
  STYLE_DIRECTIVE_NAMES,
36609
+ SUBMIT_TARGET_KEY,
35755
36610
  TEST_RUNNER_DEV_DEPS,
35756
36611
  TEXT_SOURCE,
35757
36612
  TEXT_SOURCES,
@@ -35788,6 +36643,7 @@ var HISTORY_SELECTION_KEYS = [
35788
36643
  actionEnumValues,
35789
36644
  actionEnums,
35790
36645
  actionRenderIds,
36646
+ actionSelectionKey,
35791
36647
  activeBackendUrl,
35792
36648
  activeHosts,
35793
36649
  addMenuGroup,
@@ -35848,6 +36704,8 @@ var HISTORY_SELECTION_KEYS = [
35848
36704
  bindingPathText,
35849
36705
  bindingShapeId,
35850
36706
  bindingsNeedTranslate,
36707
+ boundSlotMismatch,
36708
+ boundSlotType,
35851
36709
  buildDesignSource,
35852
36710
  buildFormShape,
35853
36711
  buildOutputOpenValue,
@@ -35878,6 +36736,7 @@ var HISTORY_SELECTION_KEYS = [
35878
36736
  callArgStorageRead,
35879
36737
  callArgTargetKey,
35880
36738
  callArgTargets,
36739
+ callArgTransformSignature,
35881
36740
  callArgTypeMismatch,
35882
36741
  callArgumentsExpression,
35883
36742
  callError,
@@ -35898,6 +36757,7 @@ var HISTORY_SELECTION_KEYS = [
35898
36757
  canFillFormKey,
35899
36758
  canHostDefaultChild,
35900
36759
  canHostNavChildren,
36760
+ canNameSubmitTarget,
35901
36761
  canOfferAddChild,
35902
36762
  canOfferReplaceParent,
35903
36763
  canOutputCall,
@@ -36048,6 +36908,7 @@ var HISTORY_SELECTION_KEYS = [
36048
36908
  defaultScreenEmitValue,
36049
36909
  defaultScreenWriteValue,
36050
36910
  defaultStateWriteValue,
36911
+ defaultSubmitTarget,
36051
36912
  denialDialogOf,
36052
36913
  denialTranslationKeys,
36053
36914
  derivePaths,
@@ -36071,6 +36932,7 @@ var HISTORY_SELECTION_KEYS = [
36071
36932
  drawnVariants,
36072
36933
  dropChainStep,
36073
36934
  dropFormEventMember,
36935
+ dropOutputBlock,
36074
36936
  dropStaleTrackKeys,
36075
36937
  duplicateMemberName,
36076
36938
  duplicateShapeName,
@@ -36171,6 +37033,7 @@ var HISTORY_SELECTION_KEYS = [
36171
37033
  foldedButtonNames,
36172
37034
  foldedButtons,
36173
37035
  foldedRouterLink,
37036
+ formEventFieldTypes,
36174
37037
  formEventMembers,
36175
37038
  formFieldIds,
36176
37039
  formFields,
@@ -36179,13 +37042,17 @@ var HISTORY_SELECTION_KEYS = [
36179
37042
  formInterfaceName,
36180
37043
  formModelFor,
36181
37044
  formModelKeyIssue,
37045
+ formModelKeyMismatch,
37046
+ formModelKeySignature,
36182
37047
  formModelKeyType,
36183
37048
  formModelKeyZero,
37049
+ formModelLandedType,
36184
37050
  formModelScreenOptions,
36185
37051
  formModelShapeKeys,
36186
37052
  formModelSourceReaders,
36187
37053
  formModelSourceType,
36188
37054
  formModelStateOptions,
37055
+ formModelTransforms,
36189
37056
  formRefName,
36190
37057
  formRefNames,
36191
37058
  formResetDepths,
@@ -36275,12 +37142,14 @@ var HISTORY_SELECTION_KEYS = [
36275
37142
  hasRouterOutlet,
36276
37143
  hasScreenVariableActionEnumConflict,
36277
37144
  hasStore,
37145
+ hasSubmitTargetButton,
36278
37146
  hasTextSource,
36279
37147
  hasValueSource,
36280
37148
  hasVariableDrift,
36281
37149
  heldFieldIds,
36282
37150
  heldProperties,
36283
37151
  holdKey,
37152
+ holdOutputBlock,
36284
37153
  hostRoutesConst,
36285
37154
  iconControlEmitConfigs,
36286
37155
  iconControlGlyph,
@@ -36340,6 +37209,7 @@ var HISTORY_SELECTION_KEYS = [
36340
37209
  isFieldCheckEligible,
36341
37210
  isFieldOptionSelected,
36342
37211
  isFolderPickSupported,
37212
+ isFormModelReadSource,
36343
37213
  isFormatPipeName,
36344
37214
  isFunctionCheckBound,
36345
37215
  isFunctionInUse,
@@ -36350,6 +37220,7 @@ var HISTORY_SELECTION_KEYS = [
36350
37220
  isKeyedRepeat,
36351
37221
  isKnownVariantId,
36352
37222
  isLegalNavTail,
37223
+ isLimitDrawn,
36353
37224
  isLinkedFormModel,
36354
37225
  isLinkedKeySource,
36355
37226
  isLinkedVariable,
@@ -36385,6 +37256,7 @@ var HISTORY_SELECTION_KEYS = [
36385
37256
  isOutputCallBound,
36386
37257
  isOutputCallKey,
36387
37258
  isOutputConditional,
37259
+ isOutputSelfEmit,
36388
37260
  isOverlayDirectiveName,
36389
37261
  isOverlayType,
36390
37262
  isPassthroughComputed,
@@ -36422,6 +37294,7 @@ var HISTORY_SELECTION_KEYS = [
36422
37294
  isTaglessFamily,
36423
37295
  isTextSource,
36424
37296
  isTimerComplete,
37297
+ isToggleAction,
36425
37298
  isUnaryMenuActionOperator,
36426
37299
  isUnaryOperator,
36427
37300
  isUnaryOutputArmOperator,
@@ -36466,6 +37339,9 @@ var HISTORY_SELECTION_KEYS = [
36466
37339
  liftToList,
36467
37340
  liftToListInTemplate,
36468
37341
  liftsToList,
37342
+ limitSourceFor,
37343
+ limitSourceOf,
37344
+ limitSources,
36469
37345
  linkDrift,
36470
37346
  linkTargetKind,
36471
37347
  linkedVariableReaders,
@@ -36716,6 +37592,7 @@ var HISTORY_SELECTION_KEYS = [
36716
37592
  outputOpenStatement,
36717
37593
  outputOpenTargets,
36718
37594
  outputOpenValueKinds,
37595
+ outputSelfEmitCall,
36719
37596
  overlayWidgetRefs,
36720
37597
  overlayWidgetScreenIds,
36721
37598
  overlayWidgetsProviderBlock,
@@ -36761,6 +37638,7 @@ var HISTORY_SELECTION_KEYS = [
36761
37638
  persistableOptionSetRows,
36762
37639
  pickFolder,
36763
37640
  pickedNavTail,
37641
+ placeOutputBlock,
36764
37642
  planScreenEmit,
36765
37643
  pluginContractResync,
36766
37644
  pluginContracts,
@@ -36772,6 +37650,7 @@ var HISTORY_SELECTION_KEYS = [
36772
37650
  pluginPortOf,
36773
37651
  pluginSourceOf,
36774
37652
  presetHosts,
37653
+ projectionSlotOf,
36775
37654
  propertiesWithComputeds,
36776
37655
  propertyKey,
36777
37656
  pruneFormEventReads,
@@ -37029,6 +37908,7 @@ var HISTORY_SELECTION_KEYS = [
37029
37908
  signatureEnums,
37030
37909
  signatureFormIds,
37031
37910
  signatureNamesOptionRow,
37911
+ signaturePipeIndex,
37032
37912
  signatureShapeIds,
37033
37913
  signatureText,
37034
37914
  slug,
@@ -37036,6 +37916,7 @@ var HISTORY_SELECTION_KEYS = [
37036
37916
  slugifyMessage,
37037
37917
  sortRowEnumId,
37038
37918
  sourceCarriesTrackKey,
37919
+ splitAutoCallEmits,
37039
37920
  stableId,
37040
37921
  staleCases,
37041
37922
  staleMenuActionItems,
@@ -37084,9 +37965,15 @@ var HISTORY_SELECTION_KEYS = [
37084
37965
  subStoreSuffixError,
37085
37966
  subStoresOf,
37086
37967
  subStoresReachedByMain,
37968
+ submitTargetForms,
37969
+ submitTargetLink,
37970
+ submitTargetOf,
37087
37971
  successResponse,
37088
37972
  suggestFormModelName,
37089
37973
  suggestMethodName,
37974
+ suggestNavVariantName,
37975
+ suggestVariantName,
37976
+ suggestedButtonKeys,
37090
37977
  survivingNavId,
37091
37978
  swaggerUrlFromBackend,
37092
37979
  syncScreenVariable,
@@ -37132,6 +38019,7 @@ var HISTORY_SELECTION_KEYS = [
37132
38019
  typeLabel,
37133
38020
  typeSigil,
37134
38021
  typesMatch,
38022
+ typesMatchExactly,
37135
38023
  unaryCall,
37136
38024
  unboundParams,
37137
38025
  unfilledVariables,
@@ -37140,6 +38028,7 @@ var HISTORY_SELECTION_KEYS = [
37140
38028
  updateRuleNode,
37141
38029
  usesAuthProperty,
37142
38030
  usesStorage,
38031
+ validateButtonKey,
37143
38032
  validateCallArgs,
37144
38033
  validateFeatureName,
37145
38034
  validateFormName,
@@ -37206,6 +38095,7 @@ var HISTORY_SELECTION_KEYS = [
37206
38095
  withEventTransform,
37207
38096
  withFormShapes,
37208
38097
  withListRowShape,
38098
+ withOutputSelfEmit,
37209
38099
  withPropertyEnums,
37210
38100
  withScreenEnums,
37211
38101
  withScreenMethodCallSites,