@magmonium/cli 0.8.21 → 0.8.24

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 +788 -497
  2. package/package.json +1 -1
package/codegen/index.js CHANGED
@@ -225,6 +225,7 @@ __export(index_exports, {
225
225
  ONE_CONFIG_SOURCE: () => ONE_CONFIG_SOURCE,
226
226
  ONE_FUNCTIONS: () => ONE_FUNCTIONS,
227
227
  ONE_FUNCTION_CATALOG: () => ONE_FUNCTION_CATALOG,
228
+ ONE_FUNCTION_DATA_PARAM: () => ONE_FUNCTION_DATA_PARAM,
228
229
  ONE_FUNCTION_ID_PARAM: () => ONE_FUNCTION_ID_PARAM,
229
230
  ONE_FUNCTION_MAP_PARAM: () => ONE_FUNCTION_MAP_PARAM,
230
231
  ONE_FUNCTION_PREFIX: () => ONE_FUNCTION_PREFIX,
@@ -334,6 +335,7 @@ __export(index_exports, {
334
335
  USER_VALUE_LABEL: () => USER_VALUE_LABEL,
335
336
  USER_VALUE_SLOTS: () => USER_VALUE_SLOTS,
336
337
  VALUE_SLOT_LABEL: () => VALUE_SLOT_LABEL,
338
+ VALUE_SOURCE: () => VALUE_SOURCE,
337
339
  VARIANT_JOINS: () => VARIANT_JOINS,
338
340
  VARIANT_KINDS: () => VARIANT_KINDS,
339
341
  WC_CONFIG_STORAGE_KEY: () => WC_CONFIG_STORAGE_KEY,
@@ -834,6 +836,7 @@ __export(index_exports, {
834
836
  hasScreenVariableActionEnumConflict: () => hasScreenVariableActionEnumConflict,
835
837
  hasStore: () => hasStore,
836
838
  hasTextSource: () => hasTextSource,
839
+ hasValueSource: () => hasValueSource,
837
840
  hasVariableDrift: () => hasVariableDrift,
838
841
  heldFieldIds: () => heldFieldIds,
839
842
  heldProperties: () => heldProperties,
@@ -921,6 +924,7 @@ __export(index_exports, {
921
924
  isMessageSlot: () => isMessageSlot,
922
925
  isMethodInUse: () => isMethodInUse,
923
926
  isMountable: () => isMountable,
927
+ isMovingScreenEmit: () => isMovingScreenEmit,
924
928
  isNavAtOrBelow: () => isNavAtOrBelow,
925
929
  isNavInstanceFunction: () => isNavInstanceFunction,
926
930
  isNavRowShape: () => isNavRowShape,
@@ -1002,6 +1006,7 @@ __export(index_exports, {
1002
1006
  isValidTimerName: () => isValidTimerName,
1003
1007
  isValidTranslationKey: () => isValidTranslationKey,
1004
1008
  isValidVariantName: () => isValidVariantName,
1009
+ isValueSource: () => isValueSource,
1005
1010
  isVariantJoin: () => isVariantJoin,
1006
1011
  isVariantKind: () => isVariantKind,
1007
1012
  jsNativesInGroup: () => jsNativesInGroup,
@@ -1092,7 +1097,6 @@ __export(index_exports, {
1092
1097
  mintMenuActionSlot: () => mintMenuActionSlot,
1093
1098
  mintOutputArm: () => mintOutputArm,
1094
1099
  mintOutputCall: () => mintOutputCall,
1095
- mintScreenOutputCall: () => mintScreenOutputCall,
1096
1100
  mistypedScreenArgs: () => mistypedScreenArgs,
1097
1101
  mistypedStateArgs: () => mistypedStateArgs,
1098
1102
  moduleTest: () => moduleTest,
@@ -1217,7 +1221,9 @@ __export(index_exports, {
1217
1221
  outcomeReport: () => outcomeReport,
1218
1222
  outcomeTransformError: () => outcomeTransformError,
1219
1223
  outcomeTransformFailure: () => outcomeTransformFailure,
1224
+ outcomeTransformFunction: () => outcomeTransformFunction,
1220
1225
  outcomeTransformFunctionIds: () => outcomeTransformFunctionIds,
1226
+ outcomeTransformOneFunction: () => outcomeTransformOneFunction,
1221
1227
  outerCall: () => outerCall,
1222
1228
  outputArgRows: () => outputArgRows,
1223
1229
  outputArm: () => outputArm,
@@ -1353,6 +1359,7 @@ __export(index_exports, {
1353
1359
  reconcileFormModels: () => reconcileFormModels,
1354
1360
  redirectRouteLiteral: () => redirectRouteLiteral,
1355
1361
  referencedShapeIds: () => referencedShapeIds,
1362
+ rekeyIds: () => rekeyIds,
1356
1363
  relationshipParent: () => relationshipParent,
1357
1364
  releaseBlocker: () => releaseBlocker,
1358
1365
  remapControlMapNavs: () => remapControlMapNavs,
@@ -1380,7 +1387,6 @@ __export(index_exports, {
1380
1387
  removeOutputArmKeepingBlocks: () => removeOutputArmKeepingBlocks,
1381
1388
  removeOutputCall: () => removeOutputCall,
1382
1389
  removeRuleNode: () => removeRuleNode,
1383
- removeScreenOutputCall: () => removeScreenOutputCall,
1384
1390
  renameComputedOptionSets: () => renameComputedOptionSets,
1385
1391
  renameControlOptionSets: () => renameControlOptionSets,
1386
1392
  renameFormEventMember: () => renameFormEventMember,
@@ -1507,8 +1513,6 @@ __export(index_exports, {
1507
1513
  screenMethodPayload: () => screenMethodPayload,
1508
1514
  screenMethodSignature: () => screenMethodSignature,
1509
1515
  screenNameKey: () => screenNameKey,
1510
- screenOutputCallIds: () => screenOutputCallIds,
1511
- screenOutputCallKeys: () => screenOutputCallKeys,
1512
1516
  screenPropertiesWithComputeds: () => screenPropertiesWithComputeds,
1513
1517
  screenTest: () => screenTest,
1514
1518
  screenVariableActionEnumIds: () => screenVariableActionEnumIds,
@@ -1571,6 +1575,7 @@ __export(index_exports, {
1571
1575
  shapeIdOf: () => shapeIdOf,
1572
1576
  shapeImportPath: () => shapeImportPath,
1573
1577
  shapeInterfaceName: () => shapeInterfaceName,
1578
+ shapeKeyIdMap: () => shapeKeyIdMap,
1574
1579
  shapeKeyOf: () => shapeKeyOf,
1575
1580
  shapeTwinAtOrigin: () => shapeTwinAtOrigin,
1576
1581
  shapesInReach: () => shapesInReach,
@@ -1721,6 +1726,7 @@ __export(index_exports, {
1721
1726
  validationFileName: () => validationFileName,
1722
1727
  validationMemberName: () => validationMemberName,
1723
1728
  validationTest: () => validationTest,
1729
+ valueSourceOf: () => valueSourceOf,
1724
1730
  variableDrift: () => variableDrift,
1725
1731
  variantCheckError: () => variantCheckError,
1726
1732
  variantCheckId: () => variantCheckId,
@@ -1806,6 +1812,9 @@ var ControlType = /* @__PURE__ */ ((ControlType2) => {
1806
1812
  ControlType2["HEAT_SWATCH"] = "heat_swatch";
1807
1813
  ControlType2["SCORE_SET"] = "score_set";
1808
1814
  ControlType2["SCORE_SET_ITEM"] = "score_set_item";
1815
+ ControlType2["PRICE_LADDER"] = "price_ladder";
1816
+ ControlType2["PRICE_LADDER_MARK"] = "price_ladder_mark";
1817
+ ControlType2["PRICE_LADDER_SIGNAL"] = "price_ladder_signal";
1809
1818
  ControlType2["FORM"] = "form";
1810
1819
  ControlType2["FIELD"] = "field";
1811
1820
  ControlType2["SECTION_BUTTON_GROUP"] = "section_button_group";
@@ -1849,12 +1858,14 @@ var LEGACY_VARIANT_JOIN = "or";
1849
1858
  var isLinkedVariable = (variable) => variable.kind === "linked" && !!variable.source;
1850
1859
  var isLinkedKeySource = (source) => source.source === "input" || source.source === "computed" || source.source === "path";
1851
1860
  var isLinkedFormModel = (model) => Object.values(model.keys).some(isLinkedKeySource);
1852
- var screenAutoCallWhen = (call) => call.when ?? (call.args.some((row) => row.source === "input") ? "on-change" : "once");
1861
+ var screenAutoCallWhen = (call) => call.when ?? (call.args.some((row) => row.source === "input") || (call.emits ?? []).some(isMovingScreenEmit) || !!call.reads?.length ? "on-change" : "once");
1862
+ var isMovingScreenEmit = (emit) => emit.value?.kind === "input" || emit.value?.kind === "binding";
1853
1863
  var screenAutoCallError = (call) => {
1864
+ if (!call.methodId && !call.emits?.length) return "auto-call-empty";
1854
1865
  if (screenAutoCallWhen(call) !== "on-change") return void 0;
1855
1866
  return call.args.some(
1856
1867
  (row) => row.source === "input" || row.source === "binding"
1857
- ) ? void 0 : "auto-call-never-fires";
1868
+ ) || (call.emits ?? []).some(isMovingScreenEmit) || !!call.reads?.length ? void 0 : "auto-call-never-fires";
1858
1869
  };
1859
1870
  var MENU_ACTION_MEMBERS = [
1860
1871
  "id",
@@ -2521,6 +2532,44 @@ var shapeClosure = (shapes, shapeId) => {
2521
2532
  };
2522
2533
  var remapDataType = (dataType, fromId, toId) => dataType.type === "shape" && dataType.shapeId === fromId ? { ...dataType, shapeId: toId } : dataType;
2523
2534
  var keyIdKeeper = (heldKeys, mintId) => (name3) => heldKeys.find((key2) => key2.name === name3)?.id ?? mintId();
2535
+ var shapeKeyIdMap = (from, to) => {
2536
+ const byName = new Map(
2537
+ to.keys.map((key2) => [key2.name, key2])
2538
+ );
2539
+ return new Map(
2540
+ from.keys.flatMap((key2) => {
2541
+ const next = byName.get(key2.name);
2542
+ return next && next.id !== key2.id ? [[key2.id, next.id]] : [];
2543
+ })
2544
+ );
2545
+ };
2546
+ function rekeyIds(value, ids) {
2547
+ if (!ids.size) return value;
2548
+ if (typeof value === "string") {
2549
+ return ids.get(value) ?? value;
2550
+ }
2551
+ if (Array.isArray(value)) {
2552
+ let changed = false;
2553
+ const next2 = value.map((entry2) => {
2554
+ const rekeyed = rekeyIds(entry2, ids);
2555
+ if (rekeyed !== entry2) changed = true;
2556
+ return rekeyed;
2557
+ });
2558
+ return changed ? next2 : value;
2559
+ }
2560
+ if (!value || typeof value !== "object") return value;
2561
+ const record = value;
2562
+ let next;
2563
+ for (const [key2, entry2] of Object.entries(record)) {
2564
+ const rekeyed = rekeyIds(entry2, ids);
2565
+ const nextKey = ids.get(key2) ?? key2;
2566
+ if (rekeyed === entry2 && nextKey === key2) continue;
2567
+ next ??= { ...record };
2568
+ if (nextKey !== key2) delete next[key2];
2569
+ next[nextKey] = rekeyed;
2570
+ }
2571
+ return next ?? value;
2572
+ }
2524
2573
  function shapeHolderCount(feature, screens, shapeId) {
2525
2574
  const properties = Object.values(feature.properties).filter(
2526
2575
  (property) => shapeIdOf(property.dataType) === shapeId
@@ -3359,6 +3408,7 @@ var CONTROL_RELATIONSHIPS = {
3359
3408
  "stat" /* STAT */,
3360
3409
  "heat_swatch" /* HEAT_SWATCH */,
3361
3410
  "score_set" /* SCORE_SET */,
3411
+ "price_ladder" /* PRICE_LADDER */,
3362
3412
  "flex" /* FLEX */,
3363
3413
  "card" /* CARD */,
3364
3414
  "chat_bubble" /* CHAT_BUBBLE */,
@@ -3424,6 +3474,7 @@ var CONTROL_RELATIONSHIPS = {
3424
3474
  "stat" /* STAT */,
3425
3475
  "heat_swatch" /* HEAT_SWATCH */,
3426
3476
  "score_set" /* SCORE_SET */,
3477
+ "price_ladder" /* PRICE_LADDER */,
3427
3478
  "flex" /* FLEX */,
3428
3479
  "card" /* CARD */,
3429
3480
  "chat_bubble" /* CHAT_BUBBLE */,
@@ -3450,6 +3501,7 @@ var CONTROL_RELATIONSHIPS = {
3450
3501
  "stat" /* STAT */,
3451
3502
  "heat_swatch" /* HEAT_SWATCH */,
3452
3503
  "score_set" /* SCORE_SET */,
3504
+ "price_ladder" /* PRICE_LADDER */,
3453
3505
  "flex" /* FLEX */,
3454
3506
  "card" /* CARD */,
3455
3507
  "chat_bubble" /* CHAT_BUBBLE */,
@@ -3484,6 +3536,7 @@ var CONTROL_RELATIONSHIPS = {
3484
3536
  "stat" /* STAT */,
3485
3537
  "heat_swatch" /* HEAT_SWATCH */,
3486
3538
  "score_set" /* SCORE_SET */,
3539
+ "price_ladder" /* PRICE_LADDER */,
3487
3540
  "flex" /* FLEX */,
3488
3541
  "card" /* CARD */,
3489
3542
  "chat_bubble" /* CHAT_BUBBLE */,
@@ -3522,6 +3575,7 @@ var CONTROL_RELATIONSHIPS = {
3522
3575
  "stat" /* STAT */,
3523
3576
  "heat_swatch" /* HEAT_SWATCH */,
3524
3577
  "score_set" /* SCORE_SET */,
3578
+ "price_ladder" /* PRICE_LADDER */,
3525
3579
  "card" /* CARD */,
3526
3580
  "chat_bubble" /* CHAT_BUBBLE */,
3527
3581
  "section_carousel" /* SECTION_CAROUSEL */,
@@ -3556,6 +3610,7 @@ var CONTROL_RELATIONSHIPS = {
3556
3610
  "stat" /* STAT */,
3557
3611
  "heat_swatch" /* HEAT_SWATCH */,
3558
3612
  "score_set" /* SCORE_SET */,
3613
+ "price_ladder" /* PRICE_LADDER */,
3559
3614
  "card" /* CARD */,
3560
3615
  "chat_bubble" /* CHAT_BUBBLE */,
3561
3616
  "section_carousel" /* SECTION_CAROUSEL */,
@@ -3622,6 +3677,7 @@ var CONTROL_RELATIONSHIPS = {
3622
3677
  "user" /* USER */,
3623
3678
  "heat_swatch" /* HEAT_SWATCH */,
3624
3679
  "score_set" /* SCORE_SET */,
3680
+ "price_ladder" /* PRICE_LADDER */,
3625
3681
  "button" /* BUTTON */,
3626
3682
  "context_menu" /* CONTEXT_MENU */,
3627
3683
  "audience_picker" /* AUDIENCE_PICKER */,
@@ -3707,6 +3763,16 @@ var CONTROL_RELATIONSHIPS = {
3707
3763
  ["score_set" /* SCORE_SET */]: ["score_set_item" /* SCORE_SET_ITEM */],
3708
3764
  // A leaf: an item renders nothing of its own.
3709
3765
  ["score_set_item" /* SCORE_SET_ITEM */]: [],
3766
+ // Its levels and chips and nothing else — every other setting is an
3767
+ // attribute (libs/one GLOSSARY.md PriceLadder). Dropped empty; the Canvas
3768
+ // lists each child as a row so it can be named and picked.
3769
+ ["price_ladder" /* PRICE_LADDER */]: [
3770
+ "price_ladder_mark" /* PRICE_LADDER_MARK */,
3771
+ "price_ladder_signal" /* PRICE_LADDER_SIGNAL */
3772
+ ],
3773
+ // Leaves: the ladder draws both.
3774
+ ["price_ladder_mark" /* PRICE_LADDER_MARK */]: [],
3775
+ ["price_ladder_signal" /* PRICE_LADDER_SIGNAL */]: [],
3710
3776
  // Content like a Logo, but the one content Control that is not a leaf: what
3711
3777
  // `m-user` projects beneath the name is a ContentControl, the same single
3712
3778
  // child a card Field takes and gated the same way, through `contentSlotOf`.
@@ -3950,6 +4016,9 @@ var OWN_DIRECTIVES = {
3950
4016
  ["heat_swatch" /* HEAT_SWATCH */]: ["routerLink"],
3951
4017
  ["score_set" /* SCORE_SET */]: [],
3952
4018
  ["score_set_item" /* SCORE_SET_ITEM */]: [],
4019
+ ["price_ladder" /* PRICE_LADDER */]: [],
4020
+ ["price_ladder_mark" /* PRICE_LADDER_MARK */]: [],
4021
+ ["price_ladder_signal" /* PRICE_LADDER_SIGNAL */]: [],
3953
4022
  ["form" /* FORM */]: ["routerLink"],
3954
4023
  ["field" /* FIELD */]: ["mOptions", "routerLink"],
3955
4024
  // Nothing to attach: a ContentControl emits an `ng-template` — where a
@@ -4121,6 +4190,9 @@ var CONTROL_LABEL = {
4121
4190
  ["heat_swatch" /* HEAT_SWATCH */]: "heat-swatch",
4122
4191
  ["score_set" /* SCORE_SET */]: "score-set-control",
4123
4192
  ["score_set_item" /* SCORE_SET_ITEM */]: "score-set-item-control",
4193
+ ["price_ladder" /* PRICE_LADDER */]: "price-ladder-control",
4194
+ ["price_ladder_mark" /* PRICE_LADDER_MARK */]: "price-ladder-mark-control",
4195
+ ["price_ladder_signal" /* PRICE_LADDER_SIGNAL */]: "price-ladder-signal-control",
4124
4196
  ["nav_header" /* NAV_HEADER */]: "nav-header",
4125
4197
  ["form" /* FORM */]: "form",
4126
4198
  ["field" /* FIELD */]: "field",
@@ -4193,6 +4265,10 @@ var CONTROL_ICON = {
4193
4265
  // Reuse the Stat glyph until score artwork joins the shared set.
4194
4266
  ["score_set" /* SCORE_SET */]: "control_stat",
4195
4267
  ["score_set_item" /* SCORE_SET_ITEM */]: "control_stat_value",
4268
+ // Reuse the Stat glyphs until ladder artwork joins the shared set.
4269
+ ["price_ladder" /* PRICE_LADDER */]: "control_stat",
4270
+ ["price_ladder_mark" /* PRICE_LADDER_MARK */]: "control_stat_value",
4271
+ ["price_ladder_signal" /* PRICE_LADDER_SIGNAL */]: "control_stat_corner",
4196
4272
  ["nav_header" /* NAV_HEADER */]: "control_nav_header",
4197
4273
  ["form" /* FORM */]: "control_form",
4198
4274
  ["field" /* FIELD */]: "control_field",
@@ -4469,6 +4545,19 @@ var CONTROL_CODEGEN = {
4469
4545
  tag: "m-score-set-item",
4470
4546
  component: "ScoreSetItemComponent"
4471
4547
  },
4548
+ // Folderless for the ScoreSet's reason (libs/one GLOSSARY.md PriceLadder).
4549
+ ["price_ladder" /* PRICE_LADDER */]: {
4550
+ tag: "m-price-ladder",
4551
+ component: "PriceLadderComponent"
4552
+ },
4553
+ ["price_ladder_mark" /* PRICE_LADDER_MARK */]: {
4554
+ tag: "m-price-ladder-mark",
4555
+ component: "PriceLadderMarkComponent"
4556
+ },
4557
+ ["price_ladder_signal" /* PRICE_LADDER_SIGNAL */]: {
4558
+ tag: "m-price-ladder-signal",
4559
+ component: "PriceLadderSignalComponent"
4560
+ },
4472
4561
  // Navigation header with back button and breadcrumb trail.
4473
4562
  // Folderless as it uses NavStore internally and takes no config.
4474
4563
  ["nav_header" /* NAV_HEADER */]: {
@@ -4851,6 +4940,7 @@ var screenMethodCalls = (method) => method ? [
4851
4940
  // libs/codegen/src/model/one-function-catalog.ts
4852
4941
  var ONE_FUNCTION_ID_PARAM = "id";
4853
4942
  var ONE_FUNCTION_MAP_PARAM = "map";
4943
+ var ONE_FUNCTION_DATA_PARAM = "data";
4854
4944
  var ONE_FUNCTION_PREFIX = "one:";
4855
4945
  var ONE_FUNCTIONS = [
4856
4946
  {
@@ -4957,6 +5047,50 @@ var ONE_FUNCTIONS = [
4957
5047
  returnType: { type: "boolean" },
4958
5048
  returnCardinality: "one"
4959
5049
  })
5050
+ },
5051
+ {
5052
+ // `setInMap<T>(id, data: T, map: Record<string, T>): Record<string, T>` —
5053
+ // the map with `data` held under `id`, every other entry kept (ADR 0205).
5054
+ // `loadCoin(id)` answers one coin and `coinsById[id]` is where it lands.
5055
+ // Offered on an OutcomeTransform alone, where the landing names `T`.
5056
+ name: "setInMap",
5057
+ importFrom: ONE_IMPORT_MODULE,
5058
+ reach: ["outcome-transform"],
5059
+ returnsRow: true,
5060
+ params: [
5061
+ { id: ONE_FUNCTION_ID_PARAM, name: "id", rule: "string-one" },
5062
+ { id: ONE_FUNCTION_DATA_PARAM, name: "data", rule: "row-one" },
5063
+ { id: ONE_FUNCTION_MAP_PARAM, name: "map", rule: "map-path" }
5064
+ ],
5065
+ rowParamId: ONE_FUNCTION_DATA_PARAM,
5066
+ rowCardinality: "one",
5067
+ signature: (row) => ({
5068
+ params: [
5069
+ {
5070
+ id: ONE_FUNCTION_ID_PARAM,
5071
+ name: "id",
5072
+ dataType: { type: "string" },
5073
+ cardinality: "one",
5074
+ acceptsUndefined: true
5075
+ },
5076
+ {
5077
+ id: ONE_FUNCTION_DATA_PARAM,
5078
+ name: "data",
5079
+ dataType: row,
5080
+ cardinality: "one",
5081
+ acceptsUndefined: true
5082
+ },
5083
+ {
5084
+ id: ONE_FUNCTION_MAP_PARAM,
5085
+ name: "map",
5086
+ dataType: row,
5087
+ cardinality: "map",
5088
+ acceptsUndefined: true
5089
+ }
5090
+ ],
5091
+ returnType: row,
5092
+ returnCardinality: "map"
5093
+ })
4960
5094
  }
4961
5095
  ];
4962
5096
  var ONE_FUNCTION_CATALOG = Object.fromEntries(ONE_FUNCTIONS.map((entry2) => [entry2.name, entry2]));
@@ -4970,10 +5104,22 @@ function oneFunctionArgFits(param, held, fromPath) {
4970
5104
  if (!held) return false;
4971
5105
  if (param.rule === "string-one")
4972
5106
  return held.dataType.type === "string" && held.cardinality === "one";
4973
- return fromPath && held.cardinality === "map";
5107
+ if (param.rule === "row-one") return held.cardinality === "one";
5108
+ return fromPath && isKeyedCardinality(held.cardinality);
4974
5109
  }
4975
- function oneFunctionReturns(entry2, row) {
4976
- const signature = entry2.signature(row);
5110
+ var isKeyedCardinality = (cardinality) => cardinality === "map" || cardinality === "map-many";
5111
+ function listedSignature(entry2, signature) {
5112
+ return {
5113
+ ...signature,
5114
+ params: signature.params.map(
5115
+ (param, index) => param.cardinality === "map" ? { ...param, cardinality: "map-many" } : entry2.params[index]?.rule === "row-one" ? { ...param, cardinality: "many" } : param
5116
+ ),
5117
+ returnCardinality: !entry2.returnsRow ? signature.returnCardinality : signature.returnCardinality === "map" ? "map-many" : "many"
5118
+ };
5119
+ }
5120
+ var isListed = (entry2, cardinality) => entry2.returnsRow && (cardinality === "many" || cardinality === "map-many");
5121
+ function oneFunctionReturns(entry2, row, mapCardinality = "map") {
5122
+ const signature = mapCardinality === "map-many" ? listedSignature(entry2, entry2.signature(row)) : entry2.signature(row);
4977
5123
  return {
4978
5124
  dataType: signature.returnType,
4979
5125
  cardinality: signature.returnCardinality,
@@ -4981,13 +5127,14 @@ function oneFunctionReturns(entry2, row) {
4981
5127
  };
4982
5128
  }
4983
5129
  function oneFunctionSignature(entry2, returns) {
5130
+ const signature = entry2.signature(returns.dataType);
4984
5131
  return {
4985
5132
  id: "",
4986
5133
  name: entry2.name,
4987
5134
  // An entry answering a fixed type stores that type, not the row: its
4988
5135
  // `map` is spelled `Record<string, unknown>` by the library, so the stand-in
4989
5136
  // over the stored type reads the same at every reader.
4990
- ...entry2.signature(returns.dataType),
5137
+ ...isListed(entry2, returns.cardinality) ? listedSignature(entry2, signature) : signature,
4991
5138
  body: ""
4992
5139
  };
4993
5140
  }
@@ -4995,9 +5142,10 @@ function oneFunctionSignatureText(entry2, rowLabel) {
4995
5142
  const generic = entry2.returnsRow && !rowLabel;
4996
5143
  const t = entry2.returnsRow ? rowLabel ?? "T" : "unknown";
4997
5144
  const params = entry2.params.map(
4998
- (param) => param.rule === "string-one" ? `${param.name}: string` : `${param.name}: Record<string, ${t}>`
5145
+ (param) => param.rule === "string-one" ? `${param.name}: string` : param.rule === "row-one" ? `${param.name}: ${t}` : `${param.name}: Record<string, ${t}>`
4999
5146
  ).join(", ");
5000
- const returns = entry2.returnsRow ? `${t} | undefined` : "boolean";
5147
+ const signature = entry2.signature({ type: "string" });
5148
+ const returns = !entry2.returnsRow ? "boolean" : signature.returnCardinality === "map" ? `Record<string, ${t}>` : `${t} | undefined`;
5001
5149
  return `${entry2.name}${generic ? "<T>" : ""}(${params}): ${returns}`;
5002
5150
  }
5003
5151
 
@@ -6289,6 +6437,20 @@ var BINDING_TRANSFORM_LEAVES = [
6289
6437
  ];
6290
6438
 
6291
6439
  // libs/codegen/src/lib/outcome-transform-helper.ts
6440
+ var outcomeTransformOneFunction = (transform) => {
6441
+ const entry2 = oneFunctionOf(transform?.oneFunction);
6442
+ return entry2?.reach.includes("outcome-transform") ? entry2 : void 0;
6443
+ };
6444
+ function outcomeTransformFunction(transform, landing, functions) {
6445
+ if (!transform) return void 0;
6446
+ if (!transform.oneFunction) return functions[transform.functionId];
6447
+ const entry2 = outcomeTransformOneFunction(transform);
6448
+ if (!entry2 || !landing) return void 0;
6449
+ return oneFunctionSignature(entry2, {
6450
+ dataType: landing.dataType,
6451
+ cardinality: landing.cardinality
6452
+ });
6453
+ }
6292
6454
  var statePathValue = (path, roots, shapes) => {
6293
6455
  const [propertyId, ...keys] = path;
6294
6456
  const property = roots[propertyId];
@@ -6360,7 +6522,8 @@ function outcomeTransformFailure(mapping, method, op, properties, shapes, functi
6360
6522
  };
6361
6523
  }
6362
6524
  const property = properties[mapping.propertyId];
6363
- const fn = functions[transform.functionId];
6525
+ const fn = outcomeTransformFunction(transform, property, functions);
6526
+ const one = outcomeTransformOneFunction(transform);
6364
6527
  if (!property || !fn) {
6365
6528
  return {
6366
6529
  error: "emit-gap-outcome-transform-function",
@@ -6417,6 +6580,13 @@ function outcomeTransformFailure(mapping, method, op, properties, shapes, functi
6417
6580
  }
6418
6581
  continue;
6419
6582
  }
6583
+ if (one?.params[index]?.rule === "map-path" && binding?.source !== "state") {
6584
+ return {
6585
+ error: "emit-gap-outcome-transform-source",
6586
+ paramIndex: index,
6587
+ detail: `${label} \u2014 bind a map the store holds`
6588
+ };
6589
+ }
6420
6590
  const source = argValue(
6421
6591
  binding,
6422
6592
  mapping,
@@ -7119,7 +7289,11 @@ var BINDING_SLOT = {
7119
7289
  // A [ScoreSet]'s Score Date, named for the `m-score-set` input it lands on.
7120
7290
  // Content by the `total` test: whether the set reads stale *is* the datum's
7121
7291
  // age, read off the same record its Scores are.
7122
- scoreDate: "scoreDate"
7292
+ scoreDate: "scoreDate",
7293
+ // A [PriceLadder]'s forward estimate, named for the `m-price-ladder` input it
7294
+ // lands on. Content by the `total` test: the forecast *is* the datum. The
7295
+ // ladder's current price and a mark's level ride `value`.
7296
+ target: "target"
7123
7297
  };
7124
7298
  var USER_VALUE_SLOTS = [
7125
7299
  BINDING_SLOT.id,
@@ -9771,248 +9945,6 @@ var parseCallArgEventKey = (raw) => {
9771
9945
  return text2.startsWith("event.") ? text2.slice("event.".length).split(".").filter(Boolean) : text2.split(".").filter(Boolean);
9772
9946
  };
9773
9947
 
9774
- // libs/codegen/src/lib/output-call-helper.ts
9775
- var OUTPUT_CALL_SEPARATOR = "|call:";
9776
- var CALL_MAPS = [
9777
- "outputs",
9778
- "outputScreenMethods",
9779
- "outputArgs",
9780
- "outputOutcomes"
9781
- ];
9782
- var outputCallKey = (group, callId) => `${group}${OUTPUT_CALL_SEPARATOR}${callId.trim()}`;
9783
- var isOutputCallKey = (key2) => {
9784
- const at = key2.indexOf(OUTPUT_CALL_SEPARATOR);
9785
- return at > 0 && key2.length > at + OUTPUT_CALL_SEPARATOR.length;
9786
- };
9787
- var outputCallGroupKey = (key2) => isOutputCallKey(key2) ? key2.slice(0, key2.indexOf(OUTPUT_CALL_SEPARATOR)) : key2;
9788
- var outputCallIdOf = (key2) => isOutputCallKey(key2) ? key2.slice(
9789
- key2.indexOf(OUTPUT_CALL_SEPARATOR) + OUTPUT_CALL_SEPARATOR.length
9790
- ) : "";
9791
- var wiredCallIds = (site, group) => {
9792
- if (!site) return [];
9793
- const ids = /* @__PURE__ */ new Set();
9794
- CALL_MAPS.forEach(
9795
- (map) => Object.keys(site[map] ?? {}).forEach((key2) => {
9796
- if (isOutputCallKey(key2) && outputCallGroupKey(key2) === group)
9797
- ids.add(outputCallIdOf(key2));
9798
- })
9799
- );
9800
- return [...ids];
9801
- };
9802
- function outputCallIds(site, group) {
9803
- const stored = site?.outputCalls?.[group] ?? [];
9804
- const named = new Set(stored);
9805
- const orphans = wiredCallIds(site, group).filter((id) => !named.has(id)).sort();
9806
- return [...stored, ...orphans];
9807
- }
9808
- var outputCallKeys = (site, group) => [
9809
- group,
9810
- ...outputCallIds(site, group).map((id) => outputCallKey(group, id))
9811
- ];
9812
- var isOutputCallBound = (site, key2) => !!site?.outputs?.[key2] || !!site?.outputScreenMethods?.[key2];
9813
- var outputCallLabel = (site, key2) => {
9814
- if (!isOutputCallKey(key2)) return key2;
9815
- const group = outputCallGroupKey(key2);
9816
- const index = outputCallKeys(site, group).indexOf(key2);
9817
- return `${group} \xB7 call ${index < 0 ? "?" : index + 1}`;
9818
- };
9819
- var outputCallGroups = (keys) => [
9820
- ...new Set([...keys].map(outputCallGroupKey))
9821
- ];
9822
- var withCallIds = (control, group, ids) => {
9823
- const { [group]: _dropped, ...rest } = control.outputCalls ?? {};
9824
- const next = ids.length ? { ...rest, [group]: ids } : rest;
9825
- return {
9826
- ...control,
9827
- outputCalls: Object.keys(next).length ? next : void 0
9828
- };
9829
- };
9830
- var callRowsAt = (control, key2) => {
9831
- const held = {};
9832
- CALL_MAPS.forEach((map) => {
9833
- const rows = control[map];
9834
- if (rows && key2 in rows) held[map] = rows[key2];
9835
- });
9836
- return held;
9837
- };
9838
- var writeCallRows = (control, bags) => {
9839
- const next = { ...control };
9840
- CALL_MAPS.forEach((map) => {
9841
- const rows = { ...control[map] ?? {} };
9842
- let touched = false;
9843
- for (const [key2, bag] of bags) {
9844
- if (key2 in rows) {
9845
- delete rows[key2];
9846
- touched = true;
9847
- }
9848
- if (bag && map in bag) {
9849
- rows[key2] = bag[map];
9850
- touched = true;
9851
- }
9852
- }
9853
- if (!touched) return;
9854
- next[map] = Object.keys(rows).length ? rows : void 0;
9855
- });
9856
- return next;
9857
- };
9858
- function mintOutputCall(control, group) {
9859
- const callId = genId();
9860
- return {
9861
- control: withCallIds(control, group, [
9862
- ...outputCallIds(control, group),
9863
- callId
9864
- ]),
9865
- key: outputCallKey(group, callId)
9866
- };
9867
- }
9868
- function removeOutputCall(control, key2) {
9869
- const group = outputCallGroupKey(key2);
9870
- const ids = outputCallIds(control, group);
9871
- if (isOutputCallKey(key2)) {
9872
- const callId = outputCallIdOf(key2);
9873
- return withCallIds(
9874
- writeCallRows(control, [[key2, void 0]]),
9875
- group,
9876
- ids.filter((id) => id !== callId)
9877
- );
9878
- }
9879
- const [next, ...rest] = ids;
9880
- if (!next) return writeCallRows(control, [[group, void 0]]);
9881
- const promoted = outputCallKey(group, next);
9882
- return withCallIds(
9883
- writeCallRows(control, [
9884
- [group, callRowsAt(control, promoted)],
9885
- [promoted, void 0]
9886
- ]),
9887
- group,
9888
- rest
9889
- );
9890
- }
9891
- function moveOutputCall(control, key2, delta) {
9892
- const group = outputCallGroupKey(key2);
9893
- const keys = outputCallKeys(control, group);
9894
- const from = keys.indexOf(key2);
9895
- if (from < 0) return control;
9896
- const to = Math.min(Math.max(from + delta, 0), keys.length - 1);
9897
- if (to === from) return control;
9898
- const bags = keys.map((one) => callRowsAt(control, one));
9899
- const [moved] = bags.splice(from, 1);
9900
- bags.splice(to, 0, moved);
9901
- return writeCallRows(
9902
- control,
9903
- keys.map((one, index) => [
9904
- one,
9905
- bags[index]
9906
- ])
9907
- );
9908
- }
9909
- function moveOutputCallTo(control, key2, toGroup) {
9910
- if (outputCallGroupKey(key2) === toGroup) return { control, key: key2 };
9911
- const bag = callRowsAt(control, key2);
9912
- const left = removeOutputCall(control, key2);
9913
- const opensGroup = !isOutputCallBound(left, toGroup) && !Object.keys(callRowsAt(left, toGroup)).length && !outputCallIds(left, toGroup).length;
9914
- if (opensGroup) {
9915
- return { control: writeCallRows(left, [[toGroup, bag]]), key: toGroup };
9916
- }
9917
- const minted = mintOutputCall(left, toGroup);
9918
- return {
9919
- control: writeCallRows(minted.control, [[minted.key, bag]]),
9920
- key: minted.key
9921
- };
9922
- }
9923
- function moveOutputCallRows(control, from, to) {
9924
- const ids = outputCallIds(control, from);
9925
- if (!ids.length) return control;
9926
- const moved = writeCallRows(
9927
- control,
9928
- ids.flatMap(
9929
- (id) => [
9930
- [outputCallKey(from, id), void 0],
9931
- [outputCallKey(to, id), callRowsAt(control, outputCallKey(from, id))]
9932
- ]
9933
- )
9934
- );
9935
- return withCallIds(withCallIds(moved, from, []), to, ids);
9936
- }
9937
- function clearOutputCallRows(control, group) {
9938
- const ids = outputCallIds(control, group);
9939
- if (!ids.length && !control.outputCalls?.[group]) return control;
9940
- return withCallIds(
9941
- writeCallRows(
9942
- control,
9943
- ids.map((id) => [
9944
- outputCallKey(group, id),
9945
- void 0
9946
- ])
9947
- ),
9948
- group,
9949
- []
9950
- );
9951
- }
9952
- function pruneOutputCalls(control) {
9953
- const calls = control.outputCalls;
9954
- if (!calls) return control;
9955
- const next = {};
9956
- for (const [group, ids] of Object.entries(calls)) {
9957
- const kept = ids.filter(
9958
- (id) => Object.keys(callRowsAt(control, outputCallKey(group, id))).length
9959
- );
9960
- if (kept.length) next[group] = kept;
9961
- }
9962
- return {
9963
- ...control,
9964
- outputCalls: Object.keys(next).length ? next : void 0
9965
- };
9966
- }
9967
- function screenOutputCallIds(site, outputId) {
9968
- const stored = site?.screenOutputCalls?.[outputId] ?? [];
9969
- const named = new Set(stored);
9970
- const orphans = Object.keys(site?.screenOutputs ?? {}).filter(
9971
- (key2) => isOutputCallKey(key2) && outputCallGroupKey(key2) === outputId
9972
- ).map(outputCallIdOf).filter((id) => !named.has(id)).sort();
9973
- return [...stored, ...orphans];
9974
- }
9975
- var screenOutputCallKeys = (site, outputId) => [
9976
- outputId,
9977
- ...screenOutputCallIds(site, outputId).map(
9978
- (id) => outputCallKey(outputId, id)
9979
- )
9980
- ];
9981
- var withScreenOutputCallIds = (control, outputId, ids) => {
9982
- const { [outputId]: _dropped, ...rest } = control.screenOutputCalls ?? {};
9983
- const next = ids.length ? { ...rest, [outputId]: ids } : rest;
9984
- return {
9985
- ...control,
9986
- screenOutputCalls: Object.keys(next).length ? next : void 0
9987
- };
9988
- };
9989
- function mintScreenOutputCall(control, outputId) {
9990
- const callId = genId();
9991
- return {
9992
- control: withScreenOutputCallIds(control, outputId, [
9993
- ...screenOutputCallIds(control, outputId),
9994
- callId
9995
- ]),
9996
- key: outputCallKey(outputId, callId)
9997
- };
9998
- }
9999
- function removeScreenOutputCall(control, key2) {
10000
- if (!isOutputCallKey(key2)) return control;
10001
- const outputId = outputCallGroupKey(key2);
10002
- const callId = outputCallIdOf(key2);
10003
- const { [key2]: _binding, ...outputs } = control.screenOutputs ?? {};
10004
- const { [key2]: _outcome, ...outcomes } = control.screenOutputOutcomes ?? {};
10005
- return withScreenOutputCallIds(
10006
- {
10007
- ...control,
10008
- screenOutputs: Object.keys(outputs).length ? outputs : void 0,
10009
- screenOutputOutcomes: Object.keys(outcomes).length ? outcomes : void 0
10010
- },
10011
- outputId,
10012
- screenOutputCallIds(control, outputId).filter((id) => id !== callId)
10013
- );
10014
- }
10015
-
10016
9948
  // libs/codegen/src/lib/screen-codegen.ts
10017
9949
  var embeddedRefOf = (node, ctx) => {
10018
9950
  if (node.handRef) return ctx.handRef?.(node.handRef);
@@ -10205,7 +10137,7 @@ function screenControlInputGuards(node, ctx, renderBinding = () => void 0, bindi
10205
10137
  }
10206
10138
  return [...guards.values()];
10207
10139
  }
10208
- function screenControlAttrs(node, ctx, wires, renderMethodCall, renderStateWrite = () => void 0, renderScreenWrites = () => [], renderScreenEmits = () => [], renderBinding = () => void 0, inputAliases = /* @__PURE__ */ new Map(), readSource = () => ({
10140
+ function screenControlAttrs(node, ctx, wires, renderBinding = () => void 0, inputAliases = /* @__PURE__ */ new Map(), readSource = () => ({
10209
10141
  cardinality: void 0,
10210
10142
  present: true
10211
10143
  })) {
@@ -10228,49 +10160,6 @@ function screenControlAttrs(node, ctx, wires, renderMethodCall, renderStateWrite
10228
10160
  const push = (outputName, statement) => {
10229
10161
  handlers.set(outputName, [...handlers.get(outputName) ?? [], statement]);
10230
10162
  };
10231
- const writtenOutputs = /* @__PURE__ */ new Set([
10232
- ...Object.keys(node.screenOutputScreenWrites ?? {}),
10233
- ...Object.keys(node.screenOutputWrites ?? {}),
10234
- ...Object.keys(node.screenOutputEmits ?? {})
10235
- ]);
10236
- for (const outputId of writtenOutputs) {
10237
- const output = ref.outputs[outputId];
10238
- if (!output) continue;
10239
- const payload = output.payload ? output.payload.dataType : "void";
10240
- for (const statement of renderScreenWrites(node, outputId, payload)) {
10241
- push(output.name, statement);
10242
- }
10243
- for (const statement of renderScreenEmits(node, outputId, payload)) {
10244
- push(output.name, statement);
10245
- }
10246
- const patch = renderStateWrite(node, outputId, payload);
10247
- if (patch) push(output.name, patch);
10248
- }
10249
- for (const outputId of outputCallGroups(
10250
- Object.keys(node.screenOutputs ?? {})
10251
- )) {
10252
- const output = ref.outputs[outputId];
10253
- if (!output) continue;
10254
- for (const key2 of screenOutputCallKeys(node, outputId)) {
10255
- const binding = node.screenOutputs?.[key2];
10256
- if (!binding) continue;
10257
- if (binding.kind === "output") {
10258
- const own = (ctx.outputs ?? {})[binding.outputId];
10259
- if (own)
10260
- push(
10261
- output.name,
10262
- `${own.name}.emit(${output.payload ? "$event" : ""})`
10263
- );
10264
- continue;
10265
- }
10266
- const call = renderMethodCall(
10267
- binding.methodId,
10268
- output.name,
10269
- binding.args
10270
- );
10271
- if (call) push(output.name, call);
10272
- }
10273
- }
10274
10163
  for (const wire of wires.values()) {
10275
10164
  if (wire.controlId !== node.id) continue;
10276
10165
  const output = ref.outputs[wire.outputId];
@@ -10656,15 +10545,13 @@ function everyScreenWrite(control) {
10656
10545
  const from = (map) => Object.keys(map ?? {}).flatMap((key2) => screenWriteRows(map, key2));
10657
10546
  return [
10658
10547
  ...from(control.outputScreenWrites),
10659
- ...from(control.screenOutputScreenWrites),
10660
10548
  ...armScreenWrites(control)
10661
10549
  ];
10662
10550
  }
10663
10551
  function armScreenWrites(control) {
10664
10552
  return [
10665
10553
  ...[
10666
- ...Object.values(control.outputOutcomes ?? {}),
10667
- ...Object.values(control.screenOutputOutcomes ?? {})
10554
+ ...Object.values(control.outputOutcomes ?? {})
10668
10555
  ].flatMap((outcome) => [
10669
10556
  ...outcome.success?.screenWrites ?? [],
10670
10557
  ...outcome.denied?.screenWrites ?? [],
@@ -10980,15 +10867,13 @@ function everyStateWrite(control) {
10980
10867
  const from = (map) => Object.keys(map ?? {}).flatMap((key2) => stateWriteRows(map, key2));
10981
10868
  return [
10982
10869
  ...from(control.outputWrites),
10983
- ...from(control.screenOutputWrites),
10984
10870
  ...armStateWrites(control)
10985
10871
  ];
10986
10872
  }
10987
10873
  function armStateWrites(control) {
10988
10874
  return [
10989
10875
  ...[
10990
- ...Object.values(control.outputOutcomes ?? {}),
10991
- ...Object.values(control.screenOutputOutcomes ?? {})
10876
+ ...Object.values(control.outputOutcomes ?? {})
10992
10877
  ].flatMap((outcome) => [
10993
10878
  ...outcome.success?.writes ?? [],
10994
10879
  ...outcome.denied?.writes ?? [],
@@ -11049,6 +10934,200 @@ function stampStatePropertyEnums(properties, controlMaps) {
11049
10934
  return changed ? next : properties;
11050
10935
  }
11051
10936
 
10937
+ // libs/codegen/src/lib/output-call-helper.ts
10938
+ var OUTPUT_CALL_SEPARATOR = "|call:";
10939
+ var CALL_MAPS = [
10940
+ "outputs",
10941
+ "outputScreenMethods",
10942
+ "outputArgs",
10943
+ "outputOutcomes"
10944
+ ];
10945
+ var outputCallKey = (group, callId) => `${group}${OUTPUT_CALL_SEPARATOR}${callId.trim()}`;
10946
+ var isOutputCallKey = (key2) => {
10947
+ const at = key2.indexOf(OUTPUT_CALL_SEPARATOR);
10948
+ return at > 0 && key2.length > at + OUTPUT_CALL_SEPARATOR.length;
10949
+ };
10950
+ var outputCallGroupKey = (key2) => isOutputCallKey(key2) ? key2.slice(0, key2.indexOf(OUTPUT_CALL_SEPARATOR)) : key2;
10951
+ var outputCallIdOf = (key2) => isOutputCallKey(key2) ? key2.slice(
10952
+ key2.indexOf(OUTPUT_CALL_SEPARATOR) + OUTPUT_CALL_SEPARATOR.length
10953
+ ) : "";
10954
+ var wiredCallIds = (site, group) => {
10955
+ if (!site) return [];
10956
+ const ids = /* @__PURE__ */ new Set();
10957
+ CALL_MAPS.forEach(
10958
+ (map) => Object.keys(site[map] ?? {}).forEach((key2) => {
10959
+ if (isOutputCallKey(key2) && outputCallGroupKey(key2) === group)
10960
+ ids.add(outputCallIdOf(key2));
10961
+ })
10962
+ );
10963
+ return [...ids];
10964
+ };
10965
+ function outputCallIds(site, group) {
10966
+ const stored = site?.outputCalls?.[group] ?? [];
10967
+ const named = new Set(stored);
10968
+ const orphans = wiredCallIds(site, group).filter((id) => !named.has(id)).sort();
10969
+ return [...stored, ...orphans];
10970
+ }
10971
+ var outputCallKeys = (site, group) => [
10972
+ group,
10973
+ ...outputCallIds(site, group).map((id) => outputCallKey(group, id))
10974
+ ];
10975
+ var isOutputCallBound = (site, key2) => !!site?.outputs?.[key2] || !!site?.outputScreenMethods?.[key2];
10976
+ var outputCallLabel = (site, key2) => {
10977
+ if (!isOutputCallKey(key2)) return key2;
10978
+ const group = outputCallGroupKey(key2);
10979
+ const index = outputCallKeys(site, group).indexOf(key2);
10980
+ return `${group} \xB7 call ${index < 0 ? "?" : index + 1}`;
10981
+ };
10982
+ var outputCallGroups = (keys) => [
10983
+ ...new Set([...keys].map(outputCallGroupKey))
10984
+ ];
10985
+ var withCallIds = (control, group, ids) => {
10986
+ const { [group]: _dropped, ...rest } = control.outputCalls ?? {};
10987
+ const next = ids.length ? { ...rest, [group]: ids } : rest;
10988
+ return {
10989
+ ...control,
10990
+ outputCalls: Object.keys(next).length ? next : void 0
10991
+ };
10992
+ };
10993
+ var callRowsAt = (control, key2) => {
10994
+ const held = {};
10995
+ CALL_MAPS.forEach((map) => {
10996
+ const rows = control[map];
10997
+ if (rows && key2 in rows) held[map] = rows[key2];
10998
+ });
10999
+ return held;
11000
+ };
11001
+ var writeCallRows = (control, bags) => {
11002
+ const next = { ...control };
11003
+ CALL_MAPS.forEach((map) => {
11004
+ const rows = { ...control[map] ?? {} };
11005
+ let touched = false;
11006
+ for (const [key2, bag] of bags) {
11007
+ if (key2 in rows) {
11008
+ delete rows[key2];
11009
+ touched = true;
11010
+ }
11011
+ if (bag && map in bag) {
11012
+ rows[key2] = bag[map];
11013
+ touched = true;
11014
+ }
11015
+ }
11016
+ if (!touched) return;
11017
+ next[map] = Object.keys(rows).length ? rows : void 0;
11018
+ });
11019
+ return next;
11020
+ };
11021
+ function mintOutputCall(control, group) {
11022
+ const callId = genId();
11023
+ return {
11024
+ control: withCallIds(control, group, [
11025
+ ...outputCallIds(control, group),
11026
+ callId
11027
+ ]),
11028
+ key: outputCallKey(group, callId)
11029
+ };
11030
+ }
11031
+ function removeOutputCall(control, key2) {
11032
+ const group = outputCallGroupKey(key2);
11033
+ const ids = outputCallIds(control, group);
11034
+ if (isOutputCallKey(key2)) {
11035
+ const callId = outputCallIdOf(key2);
11036
+ return withCallIds(
11037
+ writeCallRows(control, [[key2, void 0]]),
11038
+ group,
11039
+ ids.filter((id) => id !== callId)
11040
+ );
11041
+ }
11042
+ const [next, ...rest] = ids;
11043
+ if (!next) return writeCallRows(control, [[group, void 0]]);
11044
+ const promoted = outputCallKey(group, next);
11045
+ return withCallIds(
11046
+ writeCallRows(control, [
11047
+ [group, callRowsAt(control, promoted)],
11048
+ [promoted, void 0]
11049
+ ]),
11050
+ group,
11051
+ rest
11052
+ );
11053
+ }
11054
+ function moveOutputCall(control, key2, delta) {
11055
+ const group = outputCallGroupKey(key2);
11056
+ const keys = outputCallKeys(control, group);
11057
+ const from = keys.indexOf(key2);
11058
+ if (from < 0) return control;
11059
+ const to = Math.min(Math.max(from + delta, 0), keys.length - 1);
11060
+ if (to === from) return control;
11061
+ const bags = keys.map((one) => callRowsAt(control, one));
11062
+ const [moved] = bags.splice(from, 1);
11063
+ bags.splice(to, 0, moved);
11064
+ return writeCallRows(
11065
+ control,
11066
+ keys.map((one, index) => [
11067
+ one,
11068
+ bags[index]
11069
+ ])
11070
+ );
11071
+ }
11072
+ function moveOutputCallTo(control, key2, toGroup) {
11073
+ if (outputCallGroupKey(key2) === toGroup) return { control, key: key2 };
11074
+ const bag = callRowsAt(control, key2);
11075
+ const left = removeOutputCall(control, key2);
11076
+ const opensGroup = !isOutputCallBound(left, toGroup) && !Object.keys(callRowsAt(left, toGroup)).length && !outputCallIds(left, toGroup).length;
11077
+ if (opensGroup) {
11078
+ return { control: writeCallRows(left, [[toGroup, bag]]), key: toGroup };
11079
+ }
11080
+ const minted = mintOutputCall(left, toGroup);
11081
+ return {
11082
+ control: writeCallRows(minted.control, [[minted.key, bag]]),
11083
+ key: minted.key
11084
+ };
11085
+ }
11086
+ function moveOutputCallRows(control, from, to) {
11087
+ const ids = outputCallIds(control, from);
11088
+ if (!ids.length) return control;
11089
+ const moved = writeCallRows(
11090
+ control,
11091
+ ids.flatMap(
11092
+ (id) => [
11093
+ [outputCallKey(from, id), void 0],
11094
+ [outputCallKey(to, id), callRowsAt(control, outputCallKey(from, id))]
11095
+ ]
11096
+ )
11097
+ );
11098
+ return withCallIds(withCallIds(moved, from, []), to, ids);
11099
+ }
11100
+ function clearOutputCallRows(control, group) {
11101
+ const ids = outputCallIds(control, group);
11102
+ if (!ids.length && !control.outputCalls?.[group]) return control;
11103
+ return withCallIds(
11104
+ writeCallRows(
11105
+ control,
11106
+ ids.map((id) => [
11107
+ outputCallKey(group, id),
11108
+ void 0
11109
+ ])
11110
+ ),
11111
+ group,
11112
+ []
11113
+ );
11114
+ }
11115
+ function pruneOutputCalls(control) {
11116
+ const calls = control.outputCalls;
11117
+ if (!calls) return control;
11118
+ const next = {};
11119
+ for (const [group, ids] of Object.entries(calls)) {
11120
+ const kept = ids.filter(
11121
+ (id) => Object.keys(callRowsAt(control, outputCallKey(group, id))).length
11122
+ );
11123
+ if (kept.length) next[group] = kept;
11124
+ }
11125
+ return {
11126
+ ...control,
11127
+ outputCalls: Object.keys(next).length ? next : void 0
11128
+ };
11129
+ }
11130
+
11052
11131
  // libs/codegen/src/lib/output-arm-helper.ts
11053
11132
  var OUTPUT_ARM_SEPARATOR = "|arm:";
11054
11133
  var outputArmKey = (output, armId) => `${output}${OUTPUT_ARM_SEPARATOR}${armId.trim()}`;
@@ -13142,7 +13221,7 @@ function responsePathAt(response, source) {
13142
13221
  const key2 = source.join(".");
13143
13222
  return responsePaths(response).find((p2) => p2.label === key2);
13144
13223
  }
13145
- function importShapes(dataType, from, existing, mintId, overwriteExisting = false, reachable = {}) {
13224
+ function importShapes(dataType, from, existing, mintId, overwriteExisting = false, reachable = {}, heldShapeId) {
13146
13225
  const shapes = { ...existing };
13147
13226
  const byName = new Map(
13148
13227
  [...Object.values(reachable), ...Object.values(shapes)].map((shape) => [
@@ -13151,7 +13230,7 @@ function importShapes(dataType, from, existing, mintId, overwriteExisting = fals
13151
13230
  ])
13152
13231
  );
13153
13232
  const pool = () => ({ ...reachable, ...shapes });
13154
- const importOne = (shapeId) => {
13233
+ const importOne = (shapeId, held) => {
13155
13234
  if (reachable[shapeId] && from[shapeId] === reachable[shapeId]) {
13156
13235
  return shapeId;
13157
13236
  }
@@ -13183,7 +13262,8 @@ function importShapes(dataType, from, existing, mintId, overwriteExisting = fals
13183
13262
  from
13184
13263
  )
13185
13264
  )?.id;
13186
- const reused = byOrigin ?? structural ?? named;
13265
+ const kept = overwriteExisting && held && candidates[held] ? held : void 0;
13266
+ const reused = byOrigin ?? kept ?? structural ?? named;
13187
13267
  if (reused && (!overwriteExisting || reachable[reused])) return reused;
13188
13268
  const id2 = reused ?? mintId();
13189
13269
  const heldKeys = shapes[id2]?.keys ?? [];
@@ -13203,7 +13283,11 @@ function importShapes(dataType, from, existing, mintId, overwriteExisting = fals
13203
13283
  shape.keys.push({ ...key2, id: heldId(key2.name) });
13204
13284
  continue;
13205
13285
  }
13206
- const nested = importOne(key2.dataType.shapeId);
13286
+ const heldKey = heldKeys.find((k) => k.name === key2.name);
13287
+ const nested = importOne(
13288
+ key2.dataType.shapeId,
13289
+ heldKey?.dataType.type === "shape" ? heldKey.dataType.shapeId : void 0
13290
+ );
13207
13291
  if (!nested) continue;
13208
13292
  shape.keys.push({
13209
13293
  id: heldId(key2.name),
@@ -13215,7 +13299,7 @@ function importShapes(dataType, from, existing, mintId, overwriteExisting = fals
13215
13299
  return id2;
13216
13300
  };
13217
13301
  if (dataType?.type !== "shape") return { dataType, shapes };
13218
- const id = importOne(dataType.shapeId);
13302
+ const id = importOne(dataType.shapeId, heldShapeId);
13219
13303
  return {
13220
13304
  dataType: id ? { type: "shape", shapeId: id } : void 0,
13221
13305
  shapes
@@ -15349,8 +15433,7 @@ function setArmDialog(arm, dialog) {
15349
15433
  }
15350
15434
  function denialTranslationKeys(controls) {
15351
15435
  return Object.values(controls).flatMap((control) => [
15352
- ...Object.values(control.outputOutcomes ?? {}),
15353
- ...Object.values(control.screenOutputOutcomes ?? {})
15436
+ ...Object.values(control.outputOutcomes ?? {})
15354
15437
  ]).flatMap((outcome) => {
15355
15438
  const dialog = outcome?.denied?.dialog;
15356
15439
  return dialog ? [dialog.header, dialog.body, dialog.confirmLabel] : [];
@@ -15358,8 +15441,7 @@ function denialTranslationKeys(controls) {
15358
15441
  }
15359
15442
  function controlDrawsDenial(control) {
15360
15443
  return [
15361
- ...Object.values(control.outputOutcomes ?? {}),
15362
- ...Object.values(control.screenOutputOutcomes ?? {})
15444
+ ...Object.values(control.outputOutcomes ?? {})
15363
15445
  ].some((outcome) => armHasRows(outcome?.denied));
15364
15446
  }
15365
15447
  function isOutcomeReportDrawn(report) {
@@ -15386,8 +15468,7 @@ function armClosesOverlay(outcomes, key2, arm) {
15386
15468
  }
15387
15469
  function controlUsesOverlayRef(control) {
15388
15470
  const outcomes = [
15389
- ...Object.values(control.outputOutcomes ?? {}),
15390
- ...Object.values(control.screenOutputOutcomes ?? {})
15471
+ ...Object.values(control.outputOutcomes ?? {})
15391
15472
  ];
15392
15473
  return outcomes.some(
15393
15474
  (outcome) => OUTCOME_ARMS.some(
@@ -15438,8 +15519,7 @@ function validateFormResets(controls, rows, models = {}) {
15438
15519
  }
15439
15520
  function everyFormReset(control) {
15440
15521
  return [
15441
- ...Object.values(control.outputOutcomes ?? {}),
15442
- ...Object.values(control.screenOutputOutcomes ?? {})
15522
+ ...Object.values(control.outputOutcomes ?? {})
15443
15523
  ].flatMap(
15444
15524
  (outcome) => OUTCOME_ARMS.flatMap((arm) => outcome[arm]?.formResets ?? [])
15445
15525
  );
@@ -15502,15 +15582,6 @@ function methodArms(controlMaps) {
15502
15582
  )) {
15503
15583
  mark(control.outputs?.[output], outcome);
15504
15584
  }
15505
- for (const [outputId, outcome] of Object.entries(
15506
- control.screenOutputOutcomes ?? {}
15507
- )) {
15508
- const binding = control.screenOutputs?.[outputId];
15509
- mark(
15510
- binding?.kind === "method" ? binding.methodId : void 0,
15511
- outcome
15512
- );
15513
- }
15514
15585
  }
15515
15586
  }
15516
15587
  return arms;
@@ -16051,7 +16122,11 @@ function landingGate(method, op, codes, subject, cast, roots, shapes, functions,
16051
16122
  }
16052
16123
  };
16053
16124
  }
16054
- function patchLiteral(mappings, properties, shapes, functions, subject, cast = false, roots = properties, taken = /* @__PURE__ */ new Set(), receiverOf = OWN_STORE, gate = NO_GATE, stateType) {
16125
+ function patchLiteral(mappings, properties, shapes, functions, subject, cast = false, roots = properties, taken = /* @__PURE__ */ new Set(), receiverOf = OWN_STORE, gate = NO_GATE, stateType, oneFunctionNames = /* @__PURE__ */ new Set(), spelledShapes = /* @__PURE__ */ new Set()) {
16126
+ const spell = (dataType, cardinality) => {
16127
+ if (dataType?.type === "shape") spelledShapes.add(dataType.shapeId);
16128
+ return tsTypeExpression(shapes, dataType, cardinality);
16129
+ };
16055
16130
  const declarations = [];
16056
16131
  if (gate.declaration) declarations.push(gate.declaration);
16057
16132
  const hoisted = /* @__PURE__ */ new Map();
@@ -16060,8 +16135,17 @@ function patchLiteral(mappings, properties, shapes, functions, subject, cast = f
16060
16135
  if (!property) return void 0;
16061
16136
  const receiver = receiverOf(mapping.propertyId);
16062
16137
  if (mapping.transform) {
16063
- const fn = functions[mapping.transform.functionId];
16138
+ const fn = outcomeTransformFunction(
16139
+ mapping.transform,
16140
+ property,
16141
+ functions
16142
+ );
16064
16143
  if (!fn) return void 0;
16144
+ const typeArgs = mapping.transform.oneFunction ? `<${spell(
16145
+ property.dataType,
16146
+ property.cardinality === "map-many" ? "many" : "one"
16147
+ )}>` : "";
16148
+ if (mapping.transform.oneFunction) oneFunctionNames.add(fn.name);
16065
16149
  const args = mapping.transform.args.map((binding, index) => {
16066
16150
  if (binding.source === "response") {
16067
16151
  return binding.path.length ? {
@@ -16120,7 +16204,7 @@ function patchLiteral(mappings, properties, shapes, functions, subject, cast = f
16120
16204
  }
16121
16205
  locals.set(index, local);
16122
16206
  });
16123
- const call = `${fn.name}(${args.map((arg, index) => locals.get(index) ?? arg.expression).join(", ")})`;
16207
+ const call = `${fn.name}${typeArgs}(${args.map((arg, index) => locals.get(index) ?? arg.expression).join(", ")})`;
16124
16208
  if (!locals.size) return { receiver, key: property.name, value: call };
16125
16209
  const guard = [...new Set(locals.values())].map((local) => `${local} === undefined`).join(" || ");
16126
16210
  const passTerms = [...new Set(locals.values())].map(
@@ -16150,15 +16234,14 @@ function patchLiteral(mappings, properties, shapes, functions, subject, cast = f
16150
16234
  const element = property.dataType.type === "shape" ? shapes[property.dataType.shapeId] : void 0;
16151
16235
  const keyKey = element?.keys.find((k) => k.name === mapping.keyBy);
16152
16236
  const keyRead = keyKey ? `item${memberAccess(element, keyKey)}` : `item.${mapping.keyBy}`;
16153
- const keyed = mapping.keyBy ? property.cardinality === "map-many" ? `(${castRead(read, cast, "unknown[]")} ?? []).reduce<${tsTypeExpression(
16154
- shapes,
16237
+ const keyed = mapping.keyBy ? property.cardinality === "map-many" ? `(${castRead(read, cast, "unknown[]")} ?? []).reduce<${spell(
16155
16238
  property.dataType,
16156
16239
  property.cardinality
16157
16240
  )}>((acc, item) => { (acc[${keyRead}] ??= []).push(item); return acc; }, {})` : `Object.fromEntries((${castRead(read, cast, "unknown[]")} ?? []).map((item) => [${keyRead}, item]))` : void 0;
16158
16241
  const value = keyed ?? castRead(
16159
16242
  read,
16160
16243
  cast,
16161
- tsTypeExpression(shapes, property.dataType, property.cardinality)
16244
+ cast ? spell(property.dataType, property.cardinality) : ""
16162
16245
  );
16163
16246
  return { receiver, key: property.name, value };
16164
16247
  };
@@ -16661,7 +16744,9 @@ function generateStoreMethods(methods, operationOf, properties, shapes, function
16661
16744
  taken,
16662
16745
  receiverOf,
16663
16746
  okGate,
16664
- stateType
16747
+ stateType,
16748
+ oneFunctionNames,
16749
+ argShapes
16665
16750
  );
16666
16751
  const beforePersists = persistStatements(
16667
16752
  method,
@@ -16724,7 +16809,9 @@ function generateStoreMethods(methods, operationOf, properties, shapes, function
16724
16809
  taken,
16725
16810
  receiverOf,
16726
16811
  gate,
16727
- stateType
16812
+ stateType,
16813
+ oneFunctionNames,
16814
+ argShapes
16728
16815
  );
16729
16816
  if (!patch.statements.length) continue;
16730
16817
  const { type, shapeId } = errorBodyType(
@@ -17544,8 +17631,7 @@ function outcomeReadsArgs(outcome) {
17544
17631
  var within = (navId, root) => !!navId && (navId === root || navId.startsWith(`${root}${NAV_ID_SEP2}`));
17545
17632
  function controlNavReferences(control) {
17546
17633
  const outcomes = [
17547
- ...Object.values(control.outputOutcomes ?? {}),
17548
- ...Object.values(control.screenOutputOutcomes ?? {})
17634
+ ...Object.values(control.outputOutcomes ?? {})
17549
17635
  ];
17550
17636
  const navs = [
17551
17637
  ...outcomes.flatMap(
@@ -17574,8 +17660,7 @@ function controlNavReferences(control) {
17574
17660
  function remapControlNavs(control, remap) {
17575
17661
  const navs = [
17576
17662
  ...[
17577
- ...Object.values(control.outputOutcomes ?? {}),
17578
- ...Object.values(control.screenOutputOutcomes ?? {})
17663
+ ...Object.values(control.outputOutcomes ?? {})
17579
17664
  ].flatMap((outcome2) => OUTCOME_ARMS.map((arm) => outcome2?.[arm]?.nav)),
17580
17665
  ...Object.values(control.outputNavs ?? {})
17581
17666
  ];
@@ -17611,7 +17696,6 @@ function remapControlNavs(control, remap) {
17611
17696
  return {
17612
17697
  ...control,
17613
17698
  ...control.outputOutcomes ? { outputOutcomes: each(control.outputOutcomes, outcome) } : {},
17614
- ...control.screenOutputOutcomes ? { screenOutputOutcomes: each(control.screenOutputOutcomes, outcome) } : {},
17615
17699
  ...control.outputNavs ? { outputNavs: each(control.outputNavs, nav) } : {},
17616
17700
  ...control.outputNewTabs ? {
17617
17701
  outputNewTabs: each(
@@ -17907,11 +17991,6 @@ function buildTree(controlMap, rootControlIds, selection) {
17907
17991
  // Carried for `screenId`'s reason: the Canvas draws the embed's box at
17908
17992
  // it and codegen emits it on the tag.
17909
17993
  ...ctrl.maxWidth ? { maxWidth: ctrl.maxWidth } : {},
17910
- ...ctrl.screenOutputs && Object.keys(ctrl.screenOutputs).length ? { screenOutputs: ctrl.screenOutputs } : {},
17911
- ...ctrl.screenOutputCalls && Object.keys(ctrl.screenOutputCalls).length ? { screenOutputCalls: ctrl.screenOutputCalls } : {},
17912
- ...ctrl.screenOutputWrites && Object.keys(ctrl.screenOutputWrites).length ? { screenOutputWrites: ctrl.screenOutputWrites } : {},
17913
- ...ctrl.screenOutputEmits && Object.keys(ctrl.screenOutputEmits).length ? { screenOutputEmits: ctrl.screenOutputEmits } : {},
17914
- ...ctrl.screenOutputScreenWrites && Object.keys(ctrl.screenOutputScreenWrites).length ? { screenOutputScreenWrites: ctrl.screenOutputScreenWrites } : {},
17915
17994
  ...ctrl.checks?.length ? { checks: ctrl.checks } : {},
17916
17995
  ...ctrl.formatPipes?.length ? { formatPipes: ctrl.formatPipes } : {},
17917
17996
  ...ctrl.cards ? { cards: ctrl.cards } : {},
@@ -19354,15 +19433,13 @@ function everyScreenEmit(control) {
19354
19433
  const from = (map) => Object.keys(map ?? {}).flatMap((key2) => screenEmitRows(map, key2));
19355
19434
  return [
19356
19435
  ...from(control.outputEmits),
19357
- ...from(control.screenOutputEmits),
19358
19436
  ...armScreenEmits(control)
19359
19437
  ];
19360
19438
  }
19361
19439
  function armScreenEmits(control) {
19362
19440
  return [
19363
19441
  ...[
19364
- ...Object.values(control.outputOutcomes ?? {}),
19365
- ...Object.values(control.screenOutputOutcomes ?? {})
19442
+ ...Object.values(control.outputOutcomes ?? {})
19366
19443
  ].flatMap((outcome) => [
19367
19444
  ...outcome.success?.emits ?? [],
19368
19445
  ...outcome.denied?.emits ?? [],
@@ -19391,9 +19468,6 @@ function countScreenOutputReferences(controls, outputId) {
19391
19468
  count += everyScreenEmit(control).filter(
19392
19469
  (row) => row.outputId === outputId
19393
19470
  ).length;
19394
- for (const binding of Object.values(control.screenOutputs ?? {})) {
19395
- if (binding.kind === "output" && binding.outputId === outputId) count++;
19396
- }
19397
19471
  }
19398
19472
  return count;
19399
19473
  }
@@ -20906,6 +20980,20 @@ var SCORE_SET_NUMBER_ONLY_KEYS = /* @__PURE__ */ new Set([
20906
20980
  ...NUMBER_ONLY_KEYS,
20907
20981
  "staleAfterDays"
20908
20982
  ]);
20983
+ var PRICE_LADDER_NUMBER_ONLY_KEYS = /* @__PURE__ */ new Set([
20984
+ ...NUMBER_ONLY_KEYS,
20985
+ "value",
20986
+ "target",
20987
+ "targetLow",
20988
+ "targetHigh",
20989
+ "maxSpanPct"
20990
+ ]);
20991
+ var PRICE_LADDER_MARK_NUMBER_ONLY_KEYS = /* @__PURE__ */ new Set([
20992
+ ...NUMBER_ONLY_KEYS,
20993
+ "value",
20994
+ "rank"
20995
+ ]);
20996
+ var PRICE_LADDER_SLOTS = [BINDING_SLOT.value, BINDING_SLOT.target];
20909
20997
  var SECTION_TABLE_INPUTS = /* @__PURE__ */ new Set([
20910
20998
  "sticky",
20911
20999
  "margin",
@@ -21228,6 +21316,9 @@ var numberOnlyKeysOf = (type) => {
21228
21316
  if (type === "section_filter" /* SECTION_FILTER */) return FILTER_NUMBER_ONLY_KEYS;
21229
21317
  if (type === "score_set_item" /* SCORE_SET_ITEM */) return SCORE_ITEM_NUMBER_ONLY_KEYS;
21230
21318
  if (type === "score_set" /* SCORE_SET */) return SCORE_SET_NUMBER_ONLY_KEYS;
21319
+ if (type === "price_ladder" /* PRICE_LADDER */) return PRICE_LADDER_NUMBER_ONLY_KEYS;
21320
+ if (type === "price_ladder_mark" /* PRICE_LADDER_MARK */)
21321
+ return PRICE_LADDER_MARK_NUMBER_ONLY_KEYS;
21231
21322
  return NUMBER_ONLY_KEYS;
21232
21323
  };
21233
21324
  function wrapInGuard(markup, guard, pad2) {
@@ -21483,6 +21574,8 @@ var attrBindingSlots = (type) => {
21483
21574
  if (type === "heat_swatch" /* HEAT_SWATCH */) return [BINDING_SLOT.value];
21484
21575
  if (type === "score_set_item" /* SCORE_SET_ITEM */) return [BINDING_SLOT.value];
21485
21576
  if (type === "score_set" /* SCORE_SET */) return [BINDING_SLOT.scoreDate];
21577
+ if (type === "price_ladder" /* PRICE_LADDER */) return PRICE_LADDER_SLOTS;
21578
+ if (type === "price_ladder_mark" /* PRICE_LADDER_MARK */) return [BINDING_SLOT.value];
21486
21579
  if (type === "section_chart_series" /* SECTION_CHART_SERIES */)
21487
21580
  return [BINDING_SLOT.data, BINDING_SLOT.label];
21488
21581
  return hasTextSource(type) ? [BINDING_SLOT.label] : [];
@@ -21767,6 +21860,12 @@ function boundAttrs(node, ctx, storeProp) {
21767
21860
  const expr = bindingExpression(bindings[BINDING_SLOT.scoreDate], scope);
21768
21861
  if (expr) parts.push(` [scoreDate]="${expr}"`);
21769
21862
  }
21863
+ const ladderSlots = node.type === "price_ladder" /* PRICE_LADDER */ ? PRICE_LADDER_SLOTS : node.type === "price_ladder_mark" /* PRICE_LADDER_MARK */ ? [BINDING_SLOT.value] : [];
21864
+ for (const slot of ladderSlots) {
21865
+ if (!bindings?.[slot]) continue;
21866
+ const expr = bindingExpression(bindings[slot], scope);
21867
+ if (expr) parts.push(` [${slot}]="${expr}"`);
21868
+ }
21770
21869
  if (node.type === "section_chart_series" /* SECTION_CHART_SERIES */ && bindings?.[BINDING_SLOT.data]) {
21771
21870
  const expr = bindingExpression(bindings[BINDING_SLOT.data], scope);
21772
21871
  if (expr) parts.push(` [data]="${expr}"`);
@@ -21944,6 +22043,15 @@ function tagAttrs(node, ctx, storeProp) {
21944
22043
  delete configs2[scoreSlot];
21945
22044
  return `${inlineAttrs({ ...node, configs: configs2 })}${boundAttrs(node, ctx, storeProp)}`;
21946
22045
  }
22046
+ if (node.type === "price_ladder" /* PRICE_LADDER */ || node.type === "price_ladder_mark" /* PRICE_LADDER_MARK */) {
22047
+ const bound = ctx.controlMap?.[node.id]?.bindings ?? {};
22048
+ const slots = attrBindingSlots(node.type).filter((s) => bound[s]);
22049
+ if (slots.length) {
22050
+ const configs2 = { ...node.configs ?? {} };
22051
+ for (const s of slots) delete configs2[s];
22052
+ return `${inlineAttrs({ ...node, configs: configs2 })}${boundAttrs(node, ctx, storeProp)}`;
22053
+ }
22054
+ }
21947
22055
  if (node.type === "section_filter" /* SECTION_FILTER */) {
21948
22056
  const bindings = ctx.controlMap?.[node.id]?.bindings;
21949
22057
  const configs2 = { ...node.configs ?? {} };
@@ -22069,7 +22177,8 @@ function globalMethodCall(node, output, ctx, storeProp, receiverPrefix) {
22069
22177
  receiverPrefix ? { controlId: node.id, memberPrefix: receiverPrefix } : { controlId: node.id }
22070
22178
  ),
22071
22179
  filterGroupEventMember(node),
22072
- node.configs
22180
+ node.configs,
22181
+ screenPayloadOf(node, output, ctx)
22073
22182
  );
22074
22183
  if (args === void 0) return void 0;
22075
22184
  return `${receiverPrefix}${GLOBAL_METHOD_STORES[method.store].prop}.${method.member}(${args})`;
@@ -22091,7 +22200,8 @@ function screenMethodCall(node, output, ctx, storeProp, receiverPrefix) {
22091
22200
  receiverPrefix ? { controlId: node.id, memberPrefix: receiverPrefix } : { controlId: node.id }
22092
22201
  ),
22093
22202
  filterGroupEventMember(node),
22094
- node.configs
22203
+ node.configs,
22204
+ screenPayloadOf(node, output, ctx)
22095
22205
  );
22096
22206
  if (args === void 0) return void 0;
22097
22207
  return `${receiverPrefix}${method.name}(${args})`;
@@ -22107,6 +22217,22 @@ function callsGlobalStore(controlMap, screenMethods, store) {
22107
22217
  )
22108
22218
  );
22109
22219
  }
22220
+ function embeddedOutputOf(node, output, ctx) {
22221
+ if (node.type !== "screen" /* SCREEN */) return void 0;
22222
+ return embeddedRefOf(node, ctx)?.outputs[baseOutputName(output)];
22223
+ }
22224
+ function nodePayloadShape(node, output, ctx) {
22225
+ if (node.type !== "screen" /* SCREEN */) {
22226
+ return payloadShape(output, node.type, node.configs);
22227
+ }
22228
+ return embeddedOutputOf(node, output, ctx)?.payload?.dataType ?? "void";
22229
+ }
22230
+ function screenPayloadOf(node, output, ctx) {
22231
+ return node.type === "screen" /* SCREEN */ && ctx ? nodePayloadShape(node, output, ctx) : void 0;
22232
+ }
22233
+ function nodePayloadEventRoot(node, output) {
22234
+ return node.type === "screen" /* SCREEN */ ? "$event" : payloadEventRoot(output, node.type, node.configs);
22235
+ }
22110
22236
  function outputAttrs(node, methods, operationOf, storeProp, ctx) {
22111
22237
  if (hasRouterLink(node.directives?.["routerLink"]?.configs)) return "";
22112
22238
  if (node.type === "context_menu" /* CONTEXT_MENU */) {
@@ -22130,7 +22256,7 @@ function outputAttrs(node, methods, operationOf, storeProp, ctx) {
22130
22256
  );
22131
22257
  const armed = dispatched.map((output) => {
22132
22258
  const params = [
22133
- ...payloadShape(output, node.type, node.configs) !== "void" ? ["$event"] : [],
22259
+ ...nodePayloadShape(node, output, ctx) !== "void" ? ["$event"] : [],
22134
22260
  ...dispatcherFormRefs(
22135
22261
  node,
22136
22262
  output,
@@ -22183,20 +22309,20 @@ function outputAttrs(node, methods, operationOf, storeProp, ctx) {
22183
22309
  ...screenWritesFor(
22184
22310
  node,
22185
22311
  output,
22186
- payloadShape(output, node.type, node.configs),
22312
+ nodePayloadShape(node, output, ctx),
22187
22313
  ctx,
22188
22314
  node.outputScreenWrites,
22189
- payloadEventRoot(output, node.type, node.configs)
22315
+ nodePayloadEventRoot(node, output)
22190
22316
  )
22191
22317
  );
22192
22318
  statements.push(
22193
22319
  ...screenEmitsFor(
22194
22320
  node,
22195
22321
  output,
22196
- payloadShape(output, node.type, node.configs),
22322
+ nodePayloadShape(node, output, ctx),
22197
22323
  ctx,
22198
22324
  node.outputEmits,
22199
- payloadEventRoot(output, node.type, node.configs),
22325
+ nodePayloadEventRoot(node, output),
22200
22326
  "template",
22201
22327
  storeProp
22202
22328
  )
@@ -22204,11 +22330,11 @@ function outputAttrs(node, methods, operationOf, storeProp, ctx) {
22204
22330
  const patch = statePatchFor(
22205
22331
  node,
22206
22332
  output,
22207
- payloadShape(output, node.type, node.configs),
22333
+ nodePayloadShape(node, output, ctx),
22208
22334
  storeProp,
22209
22335
  ctx,
22210
22336
  node.outputWrites,
22211
- payloadEventRoot(output, node.type, node.configs)
22337
+ nodePayloadEventRoot(node, output)
22212
22338
  );
22213
22339
  if (patch) statements.push(patch);
22214
22340
  const open = outputOpenCall(
@@ -22231,7 +22357,7 @@ function outputAttrs(node, methods, operationOf, storeProp, ctx) {
22231
22357
  ).map(
22232
22358
  (formId) => formRefName((ctx.controlMap ?? {})[formId])
22233
22359
  );
22234
- const takesEvent = payloadShape(output, node.type, node.configs) !== "void";
22360
+ const takesEvent = nodePayloadShape(node, output, ctx) !== "void";
22235
22361
  const params = [...takesEvent ? ["$event"] : [], ...refs];
22236
22362
  return ` (${output})="${outcomeHandlerName(
22237
22363
  node.id,
@@ -22273,7 +22399,8 @@ function inlineCallStatement(node, key2, methods, operationOf, storeProp, ctx) {
22273
22399
  node.type,
22274
22400
  callArgBindings(ctx, storeProp, { controlId: node.id }),
22275
22401
  filterGroupEventMember(node),
22276
- node.configs
22402
+ node.configs,
22403
+ screenPayloadOf(node, key2, ctx)
22277
22404
  );
22278
22405
  return args === void 0 ? void 0 : `${methodReceiver(method, storeProp, ctx)}.${method.name}(${args})`;
22279
22406
  }
@@ -22435,7 +22562,8 @@ function collectPayloadProps(tree, methods, operationOf, shapes = {}, constants
22435
22562
  node.type,
22436
22563
  ctx ? callArgBindings(ctx, storeProp, { controlId: node.id }) : {},
22437
22564
  void 0,
22438
- node.configs
22565
+ node.configs,
22566
+ screenPayloadOf(node, output, ctx)
22439
22567
  ) === void 0) {
22440
22568
  continue;
22441
22569
  }
@@ -22507,47 +22635,6 @@ function renderTag(node, indent2, names, methods, operationOf, storeProp, ctx, w
22507
22635
  node,
22508
22636
  ctx,
22509
22637
  wires,
22510
- (methodId, output, args) => {
22511
- const method = methods[methodId];
22512
- if (!method) return void 0;
22513
- const call = callArguments(
22514
- method,
22515
- operationOf,
22516
- output,
22517
- args ?? [],
22518
- ctx.constants ?? {},
22519
- ctx.functions ?? {},
22520
- ctx.properties ?? {},
22521
- void 0,
22522
- callArgBindings(ctx, storeProp, { controlId: node.id })
22523
- );
22524
- return call === void 0 ? void 0 : `${methodReceiver(method, storeProp, ctx)}.${method.name}(${call})`;
22525
- },
22526
- (screenNode, outputId, payload) => statePatchFor(
22527
- screenNode,
22528
- outputId,
22529
- payload,
22530
- storeProp,
22531
- ctx,
22532
- screenNode.screenOutputWrites
22533
- ),
22534
- (screenNode, outputId, payload) => screenWritesFor(
22535
- screenNode,
22536
- outputId,
22537
- payload,
22538
- ctx,
22539
- screenNode.screenOutputScreenWrites
22540
- ),
22541
- (screenNode, outputId, payload) => screenEmitsFor(
22542
- screenNode,
22543
- outputId,
22544
- payload,
22545
- ctx,
22546
- screenNode.screenOutputEmits,
22547
- "$event",
22548
- "template",
22549
- storeProp
22550
- ),
22551
22638
  // A bound ScreenInput reading a path — a row of the Repeat this embed
22552
22639
  // sits in, a StateProperty — emits through the same walk every other
22553
22640
  // bound slot does (GLOSSARY.md DataBinding).
@@ -22573,7 +22660,12 @@ function renderTag(node, indent2, names, methods, operationOf, storeProp, ctx, w
22573
22660
  const spacing = STYLE_DIRECTIVE_NAMES.map(
22574
22661
  (name3) => styleDirectiveAttrs(name3, filterConfigs(node.directives?.[name3]?.configs))
22575
22662
  ).join("");
22576
- const tag2 = `${pad3}<${ref.tag}${bound}${style}${spacing} />`;
22663
+ const attrs2 = screenOutputHandlers(
22664
+ bound,
22665
+ outputAttrs(node, methods, operationOf, storeProp, ctx),
22666
+ ref
22667
+ );
22668
+ const tag2 = `${pad3}<${ref.tag}${attrs2}${style}${spacing} />`;
22577
22669
  return guards.reduceRight(
22578
22670
  (markup, guard, index) => `${" ".repeat(indent2 + index)}@if (${guard.expression}; as ${guard.alias}) {
22579
22671
  ${markup}
@@ -22658,6 +22750,20 @@ var pluginFacts = (tree) => {
22658
22750
  return facts;
22659
22751
  };
22660
22752
  var OUTPUT_ATTR = / \(([^)]+)\)="([^"]*)"/g;
22753
+ function screenOutputHandlers(bound, own, ref) {
22754
+ const handlers = /* @__PURE__ */ new Map();
22755
+ const push = (name3, statement) => {
22756
+ handlers.set(name3, [...handlers.get(name3) ?? [], statement]);
22757
+ };
22758
+ for (const [, key2, statement] of own.matchAll(OUTPUT_ATTR)) {
22759
+ const name3 = ref.outputs[key2]?.name;
22760
+ if (name3) push(name3, statement);
22761
+ }
22762
+ for (const [, name3, statement] of bound.matchAll(OUTPUT_ATTR)) {
22763
+ push(name3, statement);
22764
+ }
22765
+ return `${bound.replace(OUTPUT_ATTR, "")}${[...handlers.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([name3, statements]) => ` (${name3})="${statements.join("; ")}"`).join("")}`;
22766
+ }
22661
22767
  function renderPluginTag(node, pad2, tag, methods, operationOf, storeProp, ctx) {
22662
22768
  const attrs = `${tagAttrs(node, ctx, storeProp)}${directiveAttrs(
22663
22769
  node,
@@ -22770,7 +22876,8 @@ function hasOutputBinding(tree, methods, operationOf, constants = {}, functions
22770
22876
  node.type,
22771
22877
  ctx ? callArgBindings(ctx, storeProp, { controlId: node.id }) : {},
22772
22878
  void 0,
22773
- node.configs
22879
+ node.configs,
22880
+ screenPayloadOf(node, output, ctx)
22774
22881
  ) !== void 0;
22775
22882
  }) || // A call a wire makes is a call this Screen makes: the rows live inline
22776
22883
  // on the [OutputOpen] rather than in `node.outputs`, so they are asked
@@ -22872,25 +22979,13 @@ function hasStateWrite(tree, ctx) {
22872
22979
  (output) => statePatchFor(
22873
22980
  node,
22874
22981
  output,
22875
- payloadShape(output, node.type, node.configs),
22982
+ nodePayloadShape(node, output, ctx),
22876
22983
  "store",
22877
22984
  ctx,
22878
22985
  node.outputWrites,
22879
- payloadEventRoot(output, node.type, node.configs)
22986
+ nodePayloadEventRoot(node, output)
22880
22987
  ) !== void 0
22881
- ) || Object.keys(node.screenOutputWrites ?? {}).some((outputId) => {
22882
- const ref = embeddedRefOf(node, ctx);
22883
- const output = ref?.outputs[outputId];
22884
- if (!output) return false;
22885
- return statePatchFor(
22886
- node,
22887
- outputId,
22888
- output.payload ? output.payload.dataType : "void",
22889
- "store",
22890
- ctx,
22891
- node.screenOutputWrites
22892
- ) !== void 0;
22893
- }) || hasStateWrite(node.childrens, ctx)
22988
+ ) || hasStateWrite(node.childrens, ctx)
22894
22989
  );
22895
22990
  }
22896
22991
  function collectScreenInputs(tree, methods, operationOf, properties = {}) {
@@ -22935,7 +23030,8 @@ function collectTemplateTransforms(tree, methods, operationOf, constants = {}, f
22935
23030
  node.type,
22936
23031
  ctx ? callArgBindings(ctx, storeProp, { controlId: node.id }) : {},
22937
23032
  void 0,
22938
- node.configs
23033
+ node.configs,
23034
+ screenPayloadOf(node, output, ctx)
22939
23035
  ) === void 0) {
22940
23036
  continue;
22941
23037
  }
@@ -23152,13 +23248,6 @@ var variableDeclsBlock = (variables, scope) => {
23152
23248
  `;
23153
23249
  }).join("");
23154
23250
  };
23155
- function hasScreenMethodBinding(tree) {
23156
- return tree.some(
23157
- (node) => Object.values(node.screenOutputs ?? {}).some(
23158
- (binding) => binding.kind === "method"
23159
- ) || hasScreenMethodBinding(node.childrens)
23160
- );
23161
- }
23162
23251
  var outputDeclsBlock = (outputs) => {
23163
23252
  if (!outputs.length) return "";
23164
23253
  return "\n" + outputs.map(
@@ -23361,14 +23450,14 @@ function outputOpenEmit(node, output, ctx, storeProp, indent2 = " ", methods
23361
23450
  const filled = new Set(outputOpenInputs(open).map((row) => row.inputId));
23362
23451
  if (ref.inputs.some((input) => input.required && !filled.has(input.id)))
23363
23452
  return void 0;
23364
- const payload = payloadShape(output, node.type, node.configs);
23453
+ const payload = nodePayloadShape(node, output, ctx);
23365
23454
  const entries = outputOpenInputEntries(
23366
23455
  open,
23367
23456
  ref.inputs,
23368
23457
  payload,
23369
23458
  ctx.inputs ?? {},
23370
23459
  ctx.constants ?? {},
23371
- payloadEventRoot(output, node.type, node.configs),
23460
+ nodePayloadEventRoot(node, output),
23372
23461
  "this.",
23373
23462
  filterGroupEventMember(node),
23374
23463
  // A `screen` row reads what the embedding class already declares, or walks
@@ -23593,7 +23682,7 @@ function outputOpenMembersBlock(tree, ctx, payloads, storeProp, methods, operati
23593
23682
  operationOf
23594
23683
  );
23595
23684
  if (!emit) continue;
23596
- const payload = payloadShape(output, node.type, node.configs);
23685
+ const payload = nodePayloadShape(node, output, ctx);
23597
23686
  const param = emit.readsEvent ? `$event: ${payloads.get(node.id)?.type ?? handlerEventType(payload, node.type, output)}` : "";
23598
23687
  emitted.push(`
23599
23688
  protected readonly ${emit.member} = (${param}): void => {
@@ -23675,7 +23764,7 @@ function handlerFacts(tree, methods, operationOf, storeProp, ctx) {
23675
23764
  const controls = ctx.controlMap ?? {};
23676
23765
  const handlers = [];
23677
23766
  const record = (node, output, name3, formRefs, pressed = []) => {
23678
- const payload = payloadShape(output, node.type, node.configs);
23767
+ const payload = nodePayloadShape(node, output, ctx);
23679
23768
  if (payload === "void" && !formRefs) return;
23680
23769
  const formShape = payload === "record" ? buildFormShape(controls, node.id) : void 0;
23681
23770
  handlers.push({
@@ -23762,8 +23851,8 @@ function outcomeHandlersBlock(tree, methods, operationOf, storeProp, ctx, payloa
23762
23851
  ).sort()) {
23763
23852
  if (isOutputArmKey(output)) continue;
23764
23853
  if (!groupDrawsOutcome(node, output, methods)) continue;
23765
- const payload = payloadShape(output, node.type, node.configs);
23766
- const eventRoot = payloadEventRoot(output, node.type, node.configs);
23854
+ const payload = nodePayloadShape(node, output, ctx);
23855
+ const eventRoot = nodePayloadEventRoot(node, output);
23767
23856
  const statements = [
23768
23857
  ...screenWritesFor(
23769
23858
  node,
@@ -24215,8 +24304,8 @@ function armExpr(arm, node, ctx, storeProp, payload, eventRoot) {
24215
24304
  function emittableArms(node, output, ctx, storeProp) {
24216
24305
  const control = node;
24217
24306
  if (!offersOutputArms(control)) return [];
24218
- const payload = payloadShape(output, node.type, node.configs);
24219
- const eventRoot = payloadEventRoot(output, node.type, node.configs);
24307
+ const payload = nodePayloadShape(node, output, ctx);
24308
+ const eventRoot = nodePayloadEventRoot(node, output);
24220
24309
  const emitted = [];
24221
24310
  let pendingBreak = false;
24222
24311
  for (const arm of scannedOutputArms(control, output)) {
@@ -24336,8 +24425,8 @@ function outputArmHandlersBlock(tree, methods, operationOf, storeProp, ctx, payl
24336
24425
  ctx
24337
24426
  )) {
24338
24427
  const wired = emittableArms(node, output, ctx, storeProp);
24339
- const payload = payloadShape(output, node.type, node.configs);
24340
- const eventRoot = payloadEventRoot(output, node.type, node.configs);
24428
+ const payload = nodePayloadShape(node, output, ctx);
24429
+ const eventRoot = nodePayloadEventRoot(node, output);
24341
24430
  const control = node;
24342
24431
  const format = (statements, indent2) => statements.map((line) => {
24343
24432
  const statement = line.endsWith(";") ? line : `${line};`;
@@ -24467,7 +24556,8 @@ function classCallStatements(node, key2, payload, eventRoot, methods, operationO
24467
24556
  memberPrefix: "this."
24468
24557
  }),
24469
24558
  filterGroupEventMember(node),
24470
- node.configs
24559
+ node.configs,
24560
+ screenPayloadOf(node, key2, ctx)
24471
24561
  ) : void 0;
24472
24562
  if (!method || args === void 0) return [];
24473
24563
  const statements = [];
@@ -24684,21 +24774,36 @@ function methodArgsOf(method, operationOf, ctx) {
24684
24774
  }
24685
24775
  return op ? methodArgs(method, op) : authoredArgs(method);
24686
24776
  }
24687
- function autoCallsBlock(calls, methods, operationOf, storeProp, inputs, constants, functions = {}, bindings = {}, storePropOf) {
24777
+ function autoCallsBlock(calls, methods, operationOf, storeProp, inputs, constants, functions = {}, bindings = {}, storePropOf, outputs = {}) {
24688
24778
  const byName = new Map(
24689
24779
  Object.values(inputs).map((input) => [input.id, input.name])
24690
24780
  );
24781
+ const given = bindings.bindingScope ?? {};
24782
+ const givenPropOf = given.storePropOf;
24783
+ const classScope = {
24784
+ ...given,
24785
+ ...given.storeProp ? { storeProp: `this.${given.storeProp}` } : {},
24786
+ ...givenPropOf ? {
24787
+ storePropOf: (id) => {
24788
+ const prop = givenPropOf(id);
24789
+ return prop ? `this.${prop}` : void 0;
24790
+ }
24791
+ } : {}
24792
+ };
24793
+ bindings = { ...bindings, bindingScope: classScope };
24794
+ const members = /* @__PURE__ */ new Set();
24691
24795
  const emitted = calls.map((call) => {
24692
- const method = methods[call.methodId];
24693
- if (!method) return "";
24694
24796
  if (screenAutoCallError(call)) return "";
24695
- const op = operationOf(method);
24696
- if (!op) return "";
24797
+ const method = call.methodId ? methods[call.methodId] : void 0;
24798
+ if (call.methodId && !method) return "";
24799
+ const op = method ? operationOf(method) : void 0;
24800
+ if (method && !op) return "";
24697
24801
  const taken = new Set(Object.values(functions).map((fn) => fn.name));
24698
24802
  const localByInput = /* @__PURE__ */ new Map();
24699
24803
  const locals = /* @__PURE__ */ new Map();
24700
24804
  const guarded = /* @__PURE__ */ new Set();
24701
- for (const row of call.args) {
24805
+ const callRows = method ? call.args : [];
24806
+ for (const row of callRows) {
24702
24807
  if (row.source !== "input" || !row.input) continue;
24703
24808
  const name3 = byName.get(row.input) ?? row.input;
24704
24809
  let local = localByInput.get(name3);
@@ -24710,40 +24815,107 @@ function autoCallsBlock(calls, methods, operationOf, storeProp, inputs, constant
24710
24815
  if (!row.optional) guarded.add(local);
24711
24816
  }
24712
24817
  const bound = hoistedBindingLocals(
24713
- call.args,
24818
+ callRows,
24714
24819
  bindings.bindingScope ?? {},
24715
24820
  functions,
24716
24821
  taken
24717
24822
  );
24718
24823
  for (const [row, local] of bound.locals) locals.set(row, local);
24719
24824
  for (const local of bound.guarded) guarded.add(local);
24720
- const args = callArgumentsExpression(
24721
- methodArgs(method, op),
24722
- call.args,
24723
- "void",
24724
- { constants, scope: "class", functions, ...bindings, locals }
24725
- );
24825
+ const args = method && op ? callArgumentsExpression(methodArgs(method, op), call.args, "void", {
24826
+ constants,
24827
+ scope: "class",
24828
+ functions,
24829
+ ...bindings,
24830
+ locals
24831
+ }) : "";
24726
24832
  if (args === void 0) return "";
24727
- const read = [
24833
+ const read = new Map([
24728
24834
  ...[...localByInput.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([name3, local]) => [`this.${name3}()`, local]),
24729
24835
  ...bound.reads
24730
- ];
24731
- const hoists = read.length ? `
24732
- ${read.map(([expr, local]) => ` const ${local} = ${expr};`).join("\n")}` : "";
24733
- const tested = read.filter(([, local]) => guarded.has(local));
24836
+ ]);
24837
+ const emitRows = call.emits ?? [];
24838
+ let emits = emitRows.length ? screenEmitStatements(
24839
+ outputs,
24840
+ emitRows,
24841
+ "void",
24842
+ [],
24843
+ inputs,
24844
+ constants,
24845
+ "$event",
24846
+ "class",
24847
+ void 0,
24848
+ { scope: bindings.bindingScope ?? {} }
24849
+ ) : [];
24850
+ if (emitRows.length && !emits.length) return "";
24851
+ for (const row of emitRows) {
24852
+ const value = row.value;
24853
+ let expr;
24854
+ let base2 = "value";
24855
+ let waits = true;
24856
+ if (value?.kind === "input") {
24857
+ const input = inputs[value.inputId];
24858
+ if (!input) continue;
24859
+ expr = `this.${input.name}()`;
24860
+ base2 = input.name;
24861
+ waits = !input.required;
24862
+ } else if (value?.kind === "binding") {
24863
+ expr = bindingExpression(
24864
+ value.binding,
24865
+ bindings.bindingScope ?? {}
24866
+ );
24867
+ base2 = localBase2(value.binding, bindings.bindingScope ?? {});
24868
+ }
24869
+ if (!expr) continue;
24870
+ let local = read.get(expr);
24871
+ if (!local) {
24872
+ local = mintLocal2(base2, taken);
24873
+ read.set(expr, local);
24874
+ }
24875
+ if (waits) guarded.add(local);
24876
+ const spelled = `.emit(${expr})`;
24877
+ const hoisted = `.emit(${local})`;
24878
+ emits = emits.map(
24879
+ (line) => line.endsWith(spelled) ? line.replace(spelled, hoisted) : line
24880
+ );
24881
+ }
24882
+ for (const binding of call.reads ?? []) {
24883
+ if (binding.root.kind === "alias") return "";
24884
+ const expr = bindingExpression(binding, classScope);
24885
+ if (!expr) return "";
24886
+ let local = read.get(expr);
24887
+ if (!local) {
24888
+ local = mintLocal2(localBase2(binding, classScope), taken);
24889
+ read.set(expr, local);
24890
+ }
24891
+ guarded.add(local);
24892
+ }
24893
+ const reads = [...read.entries()];
24894
+ const hoists = reads.length ? `
24895
+ ${reads.map(([expr, local]) => ` const ${local} = ${expr};`).join("\n")}` : "";
24896
+ const tested = reads.filter(([, local]) => guarded.has(local));
24734
24897
  const guard = tested.length ? `
24735
24898
  if (${tested.map(([, local]) => `${local} === undefined`).join(" || ")}) return;` : "";
24899
+ const base = method ? `${method.name}Call` : `${[...emitRows].map((row) => outputs[row.outputId]?.name ?? "").filter(Boolean).sort()[0] ?? "auto"}Emit`;
24900
+ let member = base;
24901
+ for (let n = 2; members.has(member); n++) member = `${base}${n}`;
24902
+ members.add(member);
24736
24903
  const once = screenAutoCallWhen(call) === "once";
24737
- const flag = `${method.name}CallFired`;
24904
+ const flag = `${member}Fired`;
24738
24905
  const latch = once ? `
24739
24906
  if (this.${flag}) return;
24740
24907
  this.${flag} = true;` : "";
24741
24908
  const flagDecl = once ? `
24742
24909
  private ${flag} = false;
24743
24910
  ` : "";
24911
+ const emitBlock = emits.length ? `
24912
+ untracked(() => {
24913
+ ${emits.map((line) => ` ${line};`).join("\n")}
24914
+ });` : "";
24915
+ const callLine = method ? `
24916
+ this.${storePropOf?.(method.id) ?? storeProp}.${method.name}(${args});` : "";
24744
24917
  return `${flagDecl}
24745
- private readonly ${method.name}Call = effect(() => {${hoists}${guard}${latch}
24746
- this.${storePropOf?.(method.id) ?? storeProp}.${method.name}(${args});
24918
+ private readonly ${member} = effect(() => {${hoists}${guard}${latch}${emitBlock}${callLine}
24747
24919
  });
24748
24920
  `;
24749
24921
  }).filter(Boolean);
@@ -25472,7 +25644,9 @@ function screenTouchedSubStores(ctx, tree, methods, operationOf, constants, clas
25472
25644
  (id) => boundRoots.has(id) || countStateWriteReferences(controlMap, id)
25473
25645
  ) || Object.keys(sub.computeds).some((id) => boundRoots.has(id)) || // A ScreenAutoCall and a ScreenMethod fire from the class rather than
25474
25646
  // from a Control, so the Tree walk below never sees them.
25475
- (ctx.autoCalls ?? []).some((call) => !!sub.methods[call.methodId]) || Object.values(ctx.screenMethods ?? {}).some(
25647
+ (ctx.autoCalls ?? []).some(
25648
+ (call) => !!call.methodId && !!sub.methods[call.methodId]
25649
+ ) || Object.values(ctx.screenMethods ?? {}).some(
25476
25650
  (handler) => screenMethodCalls(handler).some(
25477
25651
  (one) => !!one.methodId && !!sub.methods[one.methodId]
25478
25652
  )
@@ -25578,7 +25752,7 @@ function generateTs(tree, naming, featureName, variants = {}, methods = {}, oper
25578
25752
  featureStoreProp(featureName)
25579
25753
  );
25580
25754
  const autoCalls = (ctx.autoCalls ?? []).filter(
25581
- (call) => !!methods[call.methodId]
25755
+ (call) => call.methodId ? !!methods[call.methodId] : !!call.emits?.length
25582
25756
  );
25583
25757
  const storeProp = featureStoreProp(featureName);
25584
25758
  const transformRefs = templateTransformRefs(
@@ -25670,6 +25844,12 @@ ${tables.map(
25670
25844
  const mainMethods = ctx.storePropOf ? Object.fromEntries(
25671
25845
  Object.entries(methods).filter(([id]) => !ctx.storePropOf?.(id))
25672
25846
  ) : methods;
25847
+ const readsStoreRoot = (binding) => binding.root.kind === "property" || binding.root.kind === "computed";
25848
+ const autoCallEmitsReadState = ctx.hasStore !== false && autoCalls.some(
25849
+ (call) => (call.emits ?? []).some(
25850
+ (row) => row.value?.kind === "binding" && readsStoreRoot(row.value.binding)
25851
+ ) || (call.reads ?? []).some(readsStoreRoot)
25852
+ );
25673
25853
  const callsStore = hasOutputBinding(
25674
25854
  tree,
25675
25855
  mainMethods,
@@ -25679,7 +25859,9 @@ ${tables.map(
25679
25859
  ctx.properties ?? {},
25680
25860
  ctx,
25681
25861
  storeProp
25682
- ) || autoCalls.some((call) => !!mainMethods[call.methodId]) || hasScreenMethodBinding(tree) || hasStateWrite(tree, ctx) || computedReadsState || checksReadState || screenVariantsReadState || menuRulesReadState;
25862
+ ) || autoCalls.some(
25863
+ (call) => !!call.methodId && !!mainMethods[call.methodId]
25864
+ ) || hasStateWrite(tree, ctx) || computedReadsState || checksReadState || screenVariantsReadState || menuRulesReadState || autoCallEmitsReadState;
25683
25865
  const lookup = emissionShapeLookup(methods, operationOf, shapes);
25684
25866
  const screenUsesBusy = controlMapUsesBusy(ctx.controlMap ?? {});
25685
25867
  const hasStore2 = ctx.hasStore ?? (variantList.length > 0 || callsStore);
@@ -25883,11 +26065,24 @@ ${tables.map(
25883
26065
  const classReadsNavRef = `${screenVariantsBody}${screenComputedsBody}`.includes(
25884
26066
  `${NAV_REF_MEMBER}?.`
25885
26067
  );
26068
+ const autoCallsBody = autoCallsBlock(
26069
+ autoCalls,
26070
+ methods,
26071
+ operationOf,
26072
+ storeProp,
26073
+ ctx.inputs ?? {},
26074
+ constants,
26075
+ ctx.functions ?? {},
26076
+ callArgBindings(ctx, storeProp, { memberPrefix: "this." }),
26077
+ ctx.storePropOf,
26078
+ ctx.outputs ?? {}
26079
+ );
25886
26080
  const angularCore = [
25887
26081
  "ChangeDetectionStrategy",
25888
26082
  "Component",
25889
26083
  ...screenComputedsBody || screenVariantsBody || cardsBody || messageParamsBody ? ["computed"] : [],
25890
26084
  ...autoCalls.length ? ["effect"] : [],
26085
+ ...autoCallsBody.includes("untracked(") ? ["untracked"] : [],
25891
26086
  ...needsStore || usesAuth || injectedGlobalStores.length > 0 || usesModal || drawsOverlayClose || drawsOutcomeNav || classReadsNavRef || `${outputLinkBody}${menuActionHandlersBody}${outputArmHandlersBody}`.includes(
25892
26087
  `${NAV_REF_MEMBER}?.`
25893
26088
  ) ? ["inject"] : [],
@@ -26040,17 +26235,6 @@ ${tables.map(
26040
26235
  });
26041
26236
  const outputsBody = outputDeclsBlock(outputs);
26042
26237
  const wiresBody = wireDeclsBlock(wires);
26043
- const autoCallsBody = autoCallsBlock(
26044
- autoCalls,
26045
- methods,
26046
- operationOf,
26047
- storeProp,
26048
- ctx.inputs ?? {},
26049
- constants,
26050
- ctx.functions ?? {},
26051
- callArgBindings(ctx, storeProp, { memberPrefix: "this." }),
26052
- ctx.storePropOf
26053
- );
26054
26238
  const outcomeHandlersBody = outcomeHandlersBlock(
26055
26239
  tree,
26056
26240
  methods,
@@ -26494,7 +26678,7 @@ __export(package_exports, {
26494
26678
  version: () => version
26495
26679
  });
26496
26680
  var name = "@magmonium/one";
26497
- var version = "0.4.79";
26681
+ var version = "0.4.82";
26498
26682
  var description = "Magmonium One \u2014 Angular design-system primitives for mm Apps";
26499
26683
  var author = "magmonium";
26500
26684
  var license = "MIT";
@@ -26562,7 +26746,7 @@ __export(package_exports2, {
26562
26746
  version: () => version2
26563
26747
  });
26564
26748
  var name2 = "@magmonium/cli";
26565
- var version2 = "0.8.21";
26749
+ var version2 = "0.8.24";
26566
26750
  var description2 = "A powerful and extensible asset compilation tool that can be shared across multiple projects";
26567
26751
  var bin = {
26568
26752
  "mag-cli": "bin/cli.js"
@@ -28023,6 +28207,16 @@ var valueFits = (value, dataType, cardinality, shapes) => {
28023
28207
  case "shape": {
28024
28208
  const shape = shapes[dataType.shapeId];
28025
28209
  if (!shape) return void 0;
28210
+ if (shape.positional) {
28211
+ if (!Array.isArray(value) || value.length !== shape.keys.length) {
28212
+ return false;
28213
+ }
28214
+ return everyFit(
28215
+ shape.keys.map(
28216
+ (key2, at) => valueFits(value[at], key2.dataType, key2.cardinality, shapes)
28217
+ )
28218
+ );
28219
+ }
28026
28220
  if (Array.isArray(value) || typeof value !== "object" || value === null) {
28027
28221
  return false;
28028
28222
  }
@@ -28134,7 +28328,7 @@ var caseEquals = (actual, expected) => {
28134
28328
  };
28135
28329
 
28136
28330
  // libs/codegen/src/lib/workspace-codec.ts
28137
- var WORKSPACE_SCHEMA_VERSION = 29;
28331
+ var WORKSPACE_SCHEMA_VERSION = 30;
28138
28332
  var MIGRATION_FLOOR = 18;
28139
28333
  var DEPLOY_TOKEN_METHOD_IDS = {
28140
28334
  "@UserStore.ensureDeployToken": "@AuthStore.ensureDeployToken",
@@ -28230,6 +28424,49 @@ var mapBlobControls = (blob, step) => {
28230
28424
  }
28231
28425
  return next;
28232
28426
  };
28427
+ var SCREEN_OUTPUT_SIBLINGS = [
28428
+ ["screenOutputCalls", "outputCalls"],
28429
+ ["screenOutputWrites", "outputWrites"],
28430
+ ["screenOutputScreenWrites", "outputScreenWrites"],
28431
+ ["screenOutputOutcomes", "outputOutcomes"]
28432
+ ];
28433
+ var recordOf = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
28434
+ var migrateScreenOutputMaps = (control) => {
28435
+ if (!Object.keys(control).some((key2) => key2.startsWith("screenOutput"))) {
28436
+ return control;
28437
+ }
28438
+ const next = { ...control };
28439
+ const merge = (field, key2, value) => {
28440
+ next[field] = { ...recordOf(next[field]) ?? {}, [key2]: value };
28441
+ };
28442
+ for (const [from, to] of SCREEN_OUTPUT_SIBLINGS) {
28443
+ for (const [key2, value] of Object.entries(recordOf(control[from]) ?? {})) {
28444
+ merge(to, key2, value);
28445
+ }
28446
+ delete next[from];
28447
+ }
28448
+ const emits = recordOf(control["screenOutputEmits"]) ?? {};
28449
+ for (const [key2, rows] of Object.entries(emits)) {
28450
+ merge("outputEmits", key2, rows);
28451
+ }
28452
+ delete next["screenOutputEmits"];
28453
+ const bindings = recordOf(control["screenOutputs"]) ?? {};
28454
+ for (const [key2, raw] of Object.entries(bindings)) {
28455
+ const binding = raw;
28456
+ if (binding?.kind === "method") {
28457
+ merge("outputs", key2, binding.methodId);
28458
+ if (binding.args?.length) merge("outputArgs", key2, binding.args);
28459
+ } else if (binding?.kind === "output") {
28460
+ const drawn = recordOf(next["outputEmits"])?.[key2];
28461
+ merge("outputEmits", key2, [
28462
+ ...Array.isArray(drawn) ? drawn : [],
28463
+ { id: `reemit-${key2}`, outputId: binding.outputId, value: { kind: "event" } }
28464
+ ]);
28465
+ }
28466
+ }
28467
+ delete next["screenOutputs"];
28468
+ return next;
28469
+ };
28233
28470
  var compactStoredControl = (control) => {
28234
28471
  const configs = control["configs"];
28235
28472
  if (!configs || typeof configs !== "object" || Array.isArray(configs)) {
@@ -28327,6 +28564,9 @@ var screenOnly = (step) => ({
28327
28564
  step
28328
28565
  });
28329
28566
  var MIGRATIONS = {
28567
+ // 29 → 30: a ScreenControl's ScreenOutputs move onto the standard output
28568
+ // maps, in a Screen's ControlMap and in every ControlGroup (ADR 0207).
28569
+ 29: everyKind((blob) => mapBlobControls(blob, migrateScreenOutputMaps)),
28330
28570
  // 28 → 29: a Control writes only what it says, in a Screen's ControlMap and
28331
28571
  // in every ControlGroup — and a `var:` binding on one carrying no message
28332
28572
  // goes. No translations reach a step, so a slot under a key is kept: it may
@@ -28804,18 +29044,22 @@ function sanitizeOutcomeTransform(value, functions) {
28804
29044
  if (!value || typeof value !== "object") return void 0;
28805
29045
  const transform = value;
28806
29046
  if (!transform || typeof transform.functionId !== "string") return void 0;
28807
- if (!functions[transform.functionId] || !Array.isArray(transform.args)) {
28808
- return void 0;
28809
- }
29047
+ const oneFunction = typeof transform.oneFunction === "string" && transform.oneFunction ? transform.oneFunction : void 0;
29048
+ const known = oneFunction ? !!oneFunctionOf(oneFunction)?.reach.includes("outcome-transform") : !!functions[transform.functionId];
29049
+ if (!known || !Array.isArray(transform.args)) return void 0;
28810
29050
  const args = transform.args.filter((arg) => {
28811
29051
  if (!arg || typeof arg !== "object") return false;
28812
29052
  if (arg.source === "response") {
28813
29053
  return Array.isArray(arg.path) && arg.path.every((part) => typeof part === "string");
28814
29054
  }
28815
29055
  if (arg.source === "args") return typeof arg.arg === "string" && !!arg.arg;
29056
+ if (arg.source === "fixed") return typeof arg.value === "string";
29057
+ if (arg.source === "compute") {
29058
+ return typeof arg.name === "string" && !!arg.name;
29059
+ }
28816
29060
  return arg.source === "state" && Array.isArray(arg.path) && arg.path.every((part) => typeof part === "string");
28817
29061
  });
28818
- return args.length === transform.args.length ? { functionId: transform.functionId, args } : void 0;
29062
+ return args.length === transform.args.length ? oneFunction ? { functionId: "", args, oneFunction } : { functionId: transform.functionId, args } : void 0;
28819
29063
  }
28820
29064
  function sanitizeMethods(methods, properties, functions = {}) {
28821
29065
  if (!methods || typeof methods !== "object") return {};
@@ -29518,23 +29762,33 @@ function sanitizeStoreHook(value, properties, methods, roots = properties) {
29518
29762
  return { reads, writes, calls };
29519
29763
  }
29520
29764
  function sanitizeAutoCalls(calls, kind) {
29521
- if (!hasStore(kind) || !Array.isArray(calls)) return [];
29765
+ if (!Array.isArray(calls)) return [];
29522
29766
  const result = [];
29523
29767
  const seen = /* @__PURE__ */ new Set();
29524
29768
  for (const value of calls) {
29525
29769
  if (!value || typeof value !== "object") continue;
29526
29770
  const call = value;
29527
29771
  if (typeof call.id !== "string" || !call.id) continue;
29528
- if (typeof call.methodId !== "string" || !call.methodId) continue;
29772
+ const methodId = hasStore(kind) && typeof call.methodId === "string" && call.methodId ? call.methodId : void 0;
29773
+ const emits = screenEmitRows({ emits: call.emits }, "emits");
29774
+ if (!methodId && !emits.length) continue;
29775
+ const reads = Array.isArray(call.reads) ? call.reads.filter(
29776
+ (read) => !!read && typeof read === "object" && !!read.root && Array.isArray(read.path)
29777
+ ) : [];
29529
29778
  if (seen.has(call.id)) continue;
29530
29779
  seen.add(call.id);
29531
29780
  result.push({
29532
29781
  id: call.id,
29533
- methodId: call.methodId,
29782
+ ...methodId ? { methodId } : {},
29534
29783
  // Trusted the way a Control's own `outputArgs` is: the slot loader prunes
29535
29784
  // unknown Controls and variants and leaves call-site rows alone, and a row
29536
29785
  // naming something gone emits nothing rather than breaking the load.
29537
- args: Array.isArray(call.args) ? call.args : [],
29786
+ // Rows answer a method's parameters, so a call-less auto-call keeps none.
29787
+ args: methodId && Array.isArray(call.args) ? call.args : [],
29788
+ ...emits.length ? { emits } : {},
29789
+ // Trusted like `args`: a read naming something gone drops at emit and is
29790
+ // reported as an EmitGap (ADR 0206).
29791
+ ...reads.length ? { reads } : {},
29538
29792
  // Kept only where it was drawn: an absent `when` is derived from the rows
29539
29793
  // by screenAutoCallWhen, so a Screen saved before ADR 0080 loads exactly
29540
29794
  // as it emitted then.
@@ -30034,6 +30288,7 @@ function sanitizeOptionSets(optionSets) {
30034
30288
  function repairSplitShapes(features, screens) {
30035
30289
  let nextScreens = screens;
30036
30290
  const nextFeatures = {};
30291
+ const keyIds = /* @__PURE__ */ new Map();
30037
30292
  let changed = false;
30038
30293
  for (const [id, feature] of Object.entries(features)) {
30039
30294
  let current = feature;
@@ -30073,13 +30328,21 @@ function repairSplitShapes(features, screens) {
30073
30328
  const shapes = { ...current.shapes };
30074
30329
  delete shapes[twin.id];
30075
30330
  current = { ...current, shapes };
30331
+ shapeKeyIdMap(twin, keeper).forEach(
30332
+ (to, from) => keyIds.set(from, to)
30333
+ );
30076
30334
  }
30077
30335
  }
30078
30336
  }
30079
30337
  nextFeatures[id] = current;
30080
30338
  if (current !== feature) changed = true;
30081
30339
  }
30082
- return changed ? { features: nextFeatures, screens: nextScreens } : { features, screens };
30340
+ if (!changed) return { features, screens, keyIds };
30341
+ return {
30342
+ features: rekeyIds(nextFeatures, keyIds),
30343
+ screens: rekeyIds(nextScreens, keyIds),
30344
+ keyIds
30345
+ };
30083
30346
  }
30084
30347
  function sanitizeDistinct(raw) {
30085
30348
  if (!Array.isArray(raw)) return [];
@@ -30222,7 +30485,12 @@ function decodeWorkspace(stored, docs) {
30222
30485
  optionSets: sanitizeOptionSets(stored.optionSets),
30223
30486
  patterns: sanitizePatterns(stored.patterns),
30224
30487
  themes: sanitizeThemes(stored.themes),
30225
- controlGroups: sanitizeControlGroups(stored.controlGroups),
30488
+ // Re-keyed with the Screens: a template holds bindings the way a slot
30489
+ // does, so a twin's key ids the split repair retired are swapped here too.
30490
+ controlGroups: rekeyIds(
30491
+ sanitizeControlGroups(stored.controlGroups),
30492
+ repaired.keyIds
30493
+ ),
30226
30494
  // Handed over whole: an adapter keeps them its own way — a slot each in
30227
30495
  // localStorage, a markdown file each on disk (ADR 0146).
30228
30496
  docs,
@@ -30231,7 +30499,7 @@ function decodeWorkspace(stored, docs) {
30231
30499
  // workspace opens emitting exactly what it emitted before, with the
30232
30500
  // binding now a fact the User can disagree with (ADR 0119).
30233
30501
  navMap: backfilledInstanceArgs(
30234
- sanitizeNavMap(stored.navMap),
30502
+ rekeyIds(sanitizeNavMap(stored.navMap), repaired.keyIds),
30235
30503
  // As its members see it: a row shape may be a shared one (ADR 0162).
30236
30504
  (featureId) => {
30237
30505
  const feature = refiled.features[featureId];
@@ -30252,7 +30520,8 @@ function decodeWorkspace(stored, docs) {
30252
30520
  distinct: sanitizeDistinct(stored.distinct)
30253
30521
  },
30254
30522
  currentScreenId,
30255
- palette: sanitizePalette(stored.palette)
30523
+ palette: sanitizePalette(stored.palette),
30524
+ keyIds: repaired.keyIds
30256
30525
  };
30257
30526
  }
30258
30527
  function sanitizeNpmAllowlist(raw) {
@@ -30574,7 +30843,7 @@ function readDesignSource(files3) {
30574
30843
  ),
30575
30844
  DOCS_FOLDER
30576
30845
  );
30577
- const { workspace } = decodeWorkspace(stored, docs);
30846
+ const { workspace, keyIds } = decodeWorkspace(stored, docs);
30578
30847
  const screens = [];
30579
30848
  workspace.screens.forEach((meta) => {
30580
30849
  const raw = parsed(files3[`${DESIGN_SCREENS_DIR}/${meta.id}.json`]);
@@ -30587,7 +30856,7 @@ function readDesignSource(files3) {
30587
30856
  screenStep.blob,
30588
30857
  variantVocabularyOf(meta, workspace.features)
30589
30858
  );
30590
- if (state) screens.push({ meta, state });
30859
+ if (state) screens.push({ meta, state: rekeyIds(state, keyIds) });
30591
30860
  });
30592
30861
  const handRaw = parsed(files3[DESIGN_HAND_PATH]);
30593
30862
  const hand = handRaw && typeof handRaw === "object" ? handRaw.hand ?? EMPTY_HAND_SCAN : EMPTY_HAND_SCAN;
@@ -34503,6 +34772,22 @@ var starterFunction = (starter) => ({
34503
34772
  description: starter.description
34504
34773
  });
34505
34774
 
34775
+ // libs/codegen/src/lib/value-source-helper.ts
34776
+ var VALUE_SOURCE = {
34777
+ static: "static",
34778
+ dynamic: "dynamic"
34779
+ };
34780
+ var VALUE_SOURCES = [
34781
+ VALUE_SOURCE.static,
34782
+ VALUE_SOURCE.dynamic
34783
+ ];
34784
+ var hasValueSource = (type) => type === "price_ladder_mark" /* PRICE_LADDER_MARK */;
34785
+ var isValueSource = (value) => VALUE_SOURCES.includes(value);
34786
+ var valueSourceOf = (control) => {
34787
+ if (control?.valueSource) return control.valueSource;
34788
+ return control?.bindings?.[BINDING_SLOT.value] ? VALUE_SOURCE.dynamic : VALUE_SOURCE.static;
34789
+ };
34790
+
34506
34791
  // libs/codegen/src/model/history.ts
34507
34792
  var HISTORY_DEPTH = 50;
34508
34793
  var EMPTY_HISTORY = { undo: [], redo: [] };
@@ -34788,6 +35073,7 @@ var HISTORY_SELECTION_KEYS = [
34788
35073
  ONE_CONFIG_SOURCE,
34789
35074
  ONE_FUNCTIONS,
34790
35075
  ONE_FUNCTION_CATALOG,
35076
+ ONE_FUNCTION_DATA_PARAM,
34791
35077
  ONE_FUNCTION_ID_PARAM,
34792
35078
  ONE_FUNCTION_MAP_PARAM,
34793
35079
  ONE_FUNCTION_PREFIX,
@@ -34897,6 +35183,7 @@ var HISTORY_SELECTION_KEYS = [
34897
35183
  USER_VALUE_LABEL,
34898
35184
  USER_VALUE_SLOTS,
34899
35185
  VALUE_SLOT_LABEL,
35186
+ VALUE_SOURCE,
34900
35187
  VARIANT_JOINS,
34901
35188
  VARIANT_KINDS,
34902
35189
  WC_CONFIG_STORAGE_KEY,
@@ -35397,6 +35684,7 @@ var HISTORY_SELECTION_KEYS = [
35397
35684
  hasScreenVariableActionEnumConflict,
35398
35685
  hasStore,
35399
35686
  hasTextSource,
35687
+ hasValueSource,
35400
35688
  hasVariableDrift,
35401
35689
  heldFieldIds,
35402
35690
  heldProperties,
@@ -35484,6 +35772,7 @@ var HISTORY_SELECTION_KEYS = [
35484
35772
  isMessageSlot,
35485
35773
  isMethodInUse,
35486
35774
  isMountable,
35775
+ isMovingScreenEmit,
35487
35776
  isNavAtOrBelow,
35488
35777
  isNavInstanceFunction,
35489
35778
  isNavRowShape,
@@ -35565,6 +35854,7 @@ var HISTORY_SELECTION_KEYS = [
35565
35854
  isValidTimerName,
35566
35855
  isValidTranslationKey,
35567
35856
  isValidVariantName,
35857
+ isValueSource,
35568
35858
  isVariantJoin,
35569
35859
  isVariantKind,
35570
35860
  jsNativesInGroup,
@@ -35655,7 +35945,6 @@ var HISTORY_SELECTION_KEYS = [
35655
35945
  mintMenuActionSlot,
35656
35946
  mintOutputArm,
35657
35947
  mintOutputCall,
35658
- mintScreenOutputCall,
35659
35948
  mistypedScreenArgs,
35660
35949
  mistypedStateArgs,
35661
35950
  moduleTest,
@@ -35780,7 +36069,9 @@ var HISTORY_SELECTION_KEYS = [
35780
36069
  outcomeReport,
35781
36070
  outcomeTransformError,
35782
36071
  outcomeTransformFailure,
36072
+ outcomeTransformFunction,
35783
36073
  outcomeTransformFunctionIds,
36074
+ outcomeTransformOneFunction,
35784
36075
  outerCall,
35785
36076
  outputArgRows,
35786
36077
  outputArm,
@@ -35916,6 +36207,7 @@ var HISTORY_SELECTION_KEYS = [
35916
36207
  reconcileFormModels,
35917
36208
  redirectRouteLiteral,
35918
36209
  referencedShapeIds,
36210
+ rekeyIds,
35919
36211
  relationshipParent,
35920
36212
  releaseBlocker,
35921
36213
  remapControlMapNavs,
@@ -35943,7 +36235,6 @@ var HISTORY_SELECTION_KEYS = [
35943
36235
  removeOutputArmKeepingBlocks,
35944
36236
  removeOutputCall,
35945
36237
  removeRuleNode,
35946
- removeScreenOutputCall,
35947
36238
  renameComputedOptionSets,
35948
36239
  renameControlOptionSets,
35949
36240
  renameFormEventMember,
@@ -36070,8 +36361,6 @@ var HISTORY_SELECTION_KEYS = [
36070
36361
  screenMethodPayload,
36071
36362
  screenMethodSignature,
36072
36363
  screenNameKey,
36073
- screenOutputCallIds,
36074
- screenOutputCallKeys,
36075
36364
  screenPropertiesWithComputeds,
36076
36365
  screenTest,
36077
36366
  screenVariableActionEnumIds,
@@ -36134,6 +36423,7 @@ var HISTORY_SELECTION_KEYS = [
36134
36423
  shapeIdOf,
36135
36424
  shapeImportPath,
36136
36425
  shapeInterfaceName,
36426
+ shapeKeyIdMap,
36137
36427
  shapeKeyOf,
36138
36428
  shapeTwinAtOrigin,
36139
36429
  shapesInReach,
@@ -36284,6 +36574,7 @@ var HISTORY_SELECTION_KEYS = [
36284
36574
  validationFileName,
36285
36575
  validationMemberName,
36286
36576
  validationTest,
36577
+ valueSourceOf,
36287
36578
  variableDrift,
36288
36579
  variantCheckError,
36289
36580
  variantCheckId,