@magmonium/cli 0.10.1 → 0.10.3

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.
@@ -27,7 +27,7 @@ __export(invariant_catalog_exports, {
27
27
  runInvariants: () => runInvariants
28
28
  });
29
29
  module.exports = __toCommonJS(invariant_catalog_exports);
30
- var import_codegen52 = require("./index.js");
30
+ var import_codegen53 = require("./index.js");
31
31
 
32
32
  // apps/m-one-ui/src/app/pages/design/model/invariant.ts
33
33
  var targetKey = (target2) => {
@@ -2203,8 +2203,42 @@ var functionCaseArgs = defineInvariant({
2203
2203
  }
2204
2204
  });
2205
2205
 
2206
- // apps/m-one-ui/src/app/pages/design/lib/invariants/filter-group-squeeze-orphan.ts
2206
+ // apps/m-one-ui/src/app/pages/design/lib/invariants/outcome-transform-self-fold.ts
2207
2207
  var import_codegen33 = require("./index.js");
2208
+ var outcomeTransformSelfFold = defineInvariant({
2209
+ name: "outcome-transform-self-fold",
2210
+ message: "invariant-outcome-transform-self-fold",
2211
+ severity: "advisory",
2212
+ deps: ["features"],
2213
+ validate: ({ features }) => Object.values(features).flatMap(
2214
+ (feature) => (0, import_codegen33.storesOf)(feature).flatMap((store) => {
2215
+ const methods = Object.values(store.methods ?? {});
2216
+ const landings = methods.flatMap(
2217
+ (method) => (method.response ?? []).map((mapping) => ({ method, mapping }))
2218
+ );
2219
+ const readsItself = ({ mapping }) => !!mapping.transform?.args.some(
2220
+ (arg) => arg.source === "state" && arg.path[0] === mapping.propertyId
2221
+ );
2222
+ return landings.filter((landing) => readsItself(landing)).filter(({ mapping }) => store.properties[mapping.propertyId]?.cardinality === "one").filter(
2223
+ ({ mapping }) => !landings.some(
2224
+ (other) => other.mapping.propertyId === mapping.propertyId && !readsItself(other)
2225
+ )
2226
+ ).map(({ method, mapping }) => ({
2227
+ subject: `${feature.name}.${method.name} \u2192 ${store.properties[mapping.propertyId].name}`,
2228
+ target: {
2229
+ kind: "panel",
2230
+ panel: "store",
2231
+ featureId: feature.id,
2232
+ ...store.owner.kind === "sub" ? { subStoreId: store.owner.subStoreId } : {},
2233
+ memberId: method.id
2234
+ }
2235
+ }));
2236
+ })
2237
+ )
2238
+ });
2239
+
2240
+ // apps/m-one-ui/src/app/pages/design/lib/invariants/filter-group-squeeze-orphan.ts
2241
+ var import_codegen34 = require("./index.js");
2208
2242
  var orphanIds = (groupId, controlMap) => {
2209
2243
  const found = [];
2210
2244
  const seen = /* @__PURE__ */ new Set();
@@ -2214,8 +2248,8 @@ var orphanIds = (groupId, controlMap) => {
2214
2248
  for (const childId of controlMap[id]?.childrens ?? []) {
2215
2249
  const child = controlMap[childId];
2216
2250
  if (!child) continue;
2217
- if (child.type === import_codegen33.ControlType.SECTION_FILTER) continue;
2218
- if (child.type === import_codegen33.ControlType.COL) {
2251
+ if (child.type === import_codegen34.ControlType.SECTION_FILTER) continue;
2252
+ if (child.type === import_codegen34.ControlType.COL) {
2219
2253
  walk(childId);
2220
2254
  continue;
2221
2255
  }
@@ -2235,12 +2269,12 @@ var filterGroupSqueezeOrphan = defineInvariant({
2235
2269
  });
2236
2270
  var squeezedOrphans = perScreen(
2237
2271
  (controlMap, screen) => Object.entries(controlMap).flatMap(([groupId, control]) => {
2238
- if (control.type !== import_codegen33.ControlType.SECTION_FILTER_GROUP) return [];
2272
+ if (control.type !== import_codegen34.ControlType.SECTION_FILTER_GROUP) return [];
2239
2273
  const parentId = control.parentId;
2240
- const squeezed = !!control.configs?.["squeeze"] || !!parentId && controlMap[parentId]?.type === import_codegen33.ControlType.SECTION_HEADER;
2274
+ const squeezed = !!control.configs?.["squeeze"] || !!parentId && controlMap[parentId]?.type === import_codegen34.ControlType.SECTION_HEADER;
2241
2275
  if (!squeezed) return [];
2242
2276
  return orphanIds(groupId, controlMap).map((orphanId) => ({
2243
- subject: import_codegen33.CONTROL_LABEL[controlMap[orphanId].type],
2277
+ subject: import_codegen34.CONTROL_LABEL[controlMap[orphanId].type],
2244
2278
  target: {
2245
2279
  kind: "control",
2246
2280
  screenId: screen.id,
@@ -2251,7 +2285,7 @@ var squeezedOrphans = perScreen(
2251
2285
  );
2252
2286
 
2253
2287
  // apps/m-one-ui/src/app/pages/design/lib/invariants/context-group-primary-unique.ts
2254
- var import_codegen34 = require("./index.js");
2288
+ var import_codegen35 = require("./index.js");
2255
2289
  var contextGroupPrimaryUnique = defineInvariant({
2256
2290
  name: "context-group-primary-unique",
2257
2291
  message: "invariant-context-group-primary-unique",
@@ -2262,14 +2296,14 @@ var contextGroupPrimaryUnique = defineInvariant({
2262
2296
  });
2263
2297
  var duplicatePrimaries = perScreen(
2264
2298
  (controlMap, screen) => Object.entries(controlMap).flatMap(([groupId, control]) => {
2265
- if (control.type !== import_codegen34.ControlType.SECTION_BUTTON_GROUP) return [];
2299
+ if (control.type !== import_codegen35.ControlType.SECTION_BUTTON_GROUP) return [];
2266
2300
  if (control.configs?.["variant"] !== "context") return [];
2267
2301
  const primaries = (control.childrens ?? []).filter((childId) => {
2268
2302
  const child = controlMap[childId];
2269
- return child?.type === import_codegen34.ControlType.BUTTON && child.configs?.["variant"] === "primary";
2303
+ return child?.type === import_codegen35.ControlType.BUTTON && child.configs?.["variant"] === "primary";
2270
2304
  });
2271
2305
  return primaries.slice(1).map((buttonId) => ({
2272
- subject: import_codegen34.CONTROL_LABEL[import_codegen34.ControlType.BUTTON],
2306
+ subject: import_codegen35.CONTROL_LABEL[import_codegen35.ControlType.BUTTON],
2273
2307
  target: {
2274
2308
  kind: "control",
2275
2309
  screenId: screen.id,
@@ -2280,102 +2314,102 @@ var duplicatePrimaries = perScreen(
2280
2314
  );
2281
2315
 
2282
2316
  // apps/m-one-ui/src/app/pages/design/lib/hand-binding-helper.ts
2283
- var import_codegen36 = require("./index.js");
2317
+ var import_codegen37 = require("./index.js");
2284
2318
 
2285
2319
  // apps/m-one-ui/src/app/pages/design/lib/control-outputs.ts
2286
- var import_codegen35 = require("./index.js");
2320
+ var import_codegen36 = require("./index.js");
2287
2321
  var embeddedOutputsOf = (screens, contractOf = () => void 0) => (control) => {
2288
- if (control.type !== import_codegen35.ControlType.SCREEN) return void 0;
2322
+ if (control.type !== import_codegen36.ControlType.SCREEN) return void 0;
2289
2323
  if (control.handRef) {
2290
2324
  const contract = contractOf(control.handRef);
2291
- return contract ? (0, import_codegen35.handTargetOf)(contract).outputs : void 0;
2325
+ return contract ? (0, import_codegen36.handTargetOf)(contract).outputs : void 0;
2292
2326
  }
2293
2327
  return screens.find((screen) => screen.id === control.screenId)?.outputs;
2294
2328
  };
2295
- var embeddedOutputOf = (control, key, embedded) => embedded?.(control)?.[(0, import_codegen35.outputArmBaseKey)(key)];
2296
- var outputPayloadShape = (control, key, embedded) => control.type === import_codegen35.ControlType.SCREEN ? embeddedOutputOf(control, key, embedded)?.payload?.dataType ?? "void" : (0, import_codegen35.payloadShape)(key, control.type, control.configs);
2329
+ var embeddedOutputOf = (control, key, embedded) => embedded?.(control)?.[(0, import_codegen36.outputArmBaseKey)(key)];
2330
+ var outputPayloadShape = (control, key, embedded) => control.type === import_codegen36.ControlType.SCREEN ? embeddedOutputOf(control, key, embedded)?.payload?.dataType ?? "void" : (0, import_codegen36.payloadShape)(key, control.type, control.configs);
2297
2331
  var outputCallLabelOf = (control, key, embedded) => {
2298
- const label2 = (0, import_codegen35.outputCallLabel)(control, key);
2332
+ const label2 = (0, import_codegen36.outputCallLabel)(control, key);
2299
2333
  const name = embeddedOutputOf(control, key, embedded)?.name;
2300
- const base = (0, import_codegen35.outputArmBaseKey)(key);
2334
+ const base = (0, import_codegen36.outputArmBaseKey)(key);
2301
2335
  return name && label2.startsWith(base) ? `${name}${label2.slice(base.length)}` : label2;
2302
2336
  };
2303
2337
  var CONTROL_OUTPUTS = {
2304
- [import_codegen35.ControlType.BUTTON]: ["clicked"],
2305
- [import_codegen35.ControlType.CONTEXT_MENU]: ["action"],
2338
+ [import_codegen36.ControlType.BUTTON]: ["clicked"],
2339
+ [import_codegen36.ControlType.CONTEXT_MENU]: ["action"],
2306
2340
  // The picker's own value, once the User has moved it — the write half of the
2307
2341
  // controlled binding, drawn as a StateWrite rather than as `[(audience)]`
2308
2342
  // (ADR 0187, ADR 0065). Offered whatever the two halves hold: a picker bound
2309
2343
  // to no `audience` still edits its own value and still fires this.
2310
- [import_codegen35.ControlType.AUDIENCE_PICKER]: ["audienceChange"],
2311
- [import_codegen35.ControlType.CARD]: ["clicked"],
2344
+ [import_codegen36.ControlType.AUDIENCE_PICKER]: ["audienceChange"],
2345
+ [import_codegen36.ControlType.CARD]: ["clicked"],
2312
2346
  // `submitted` is offered only under a Button declaring `isSubmit` — see
2313
2347
  // `outputsOf` below.
2314
- [import_codegen35.ControlType.FORM]: ["submitted", "dataChange", "formInitialized"],
2348
+ [import_codegen36.ControlType.FORM]: ["submitted", "dataChange", "formInitialized"],
2315
2349
  // The Field's own `dataChange`, at field granularity — the value the User
2316
2350
  // typed into this one field, not the form's record (libs/one ADR 0032).
2317
2351
  // Needs no Button, the way the form's does not (see `outputsOf`).
2318
- [import_codegen35.ControlType.FIELD]: ["dataChange"],
2319
- [import_codegen35.ControlType.SECTION]: ["inView"],
2320
- [import_codegen35.ControlType.SECTION_HEADER]: ["actionClick", "action", "back"],
2352
+ [import_codegen36.ControlType.FIELD]: ["dataChange"],
2353
+ [import_codegen36.ControlType.SECTION]: ["inView"],
2354
+ [import_codegen36.ControlType.SECTION_HEADER]: ["actionClick", "action", "back"],
2321
2355
  // Debounced already by the component — what arrives here is the term the User
2322
2356
  // stopped typing, which is the only thing worth binding a call to.
2323
- [import_codegen35.ControlType.SECTION_SEARCH]: ["searchChange"],
2357
+ [import_codegen36.ControlType.SECTION_SEARCH]: ["searchChange"],
2324
2358
  // One output for the whole bar, carrying the Button that was pressed — an
2325
2359
  // `m-action` names its Buttons rather than holding them, so there is no
2326
2360
  // per-Button Control for a binding to sit on (ADR 0009).
2327
- [import_codegen35.ControlType.SECTION_ACTION]: ["clicked"],
2361
+ [import_codegen36.ControlType.SECTION_ACTION]: ["clicked"],
2328
2362
  // Which slide is showing, every time it changes — by drag, by indicator, or
2329
2363
  // by the clock. Two spellings of the one event, because what a caller binds
2330
2364
  // differs: `slideChange` carries the position, `itemChange` the row behind it,
2331
2365
  // which is what a call needing the slide's own data takes.
2332
- [import_codegen35.ControlType.SECTION_CAROUSEL]: ["slideChange", "itemChange"],
2366
+ [import_codegen36.ControlType.SECTION_CAROUSEL]: ["slideChange", "itemChange"],
2333
2367
  // The whole group's selection, every time any Filter beneath it changes
2334
2368
  // (libs/one ADR 0025). Per-change rather than on-close: a group has no single
2335
2369
  // close event full-width, and `switchMap` in the emitted store already drops
2336
2370
  // the responses of calls a later change supersedes.
2337
- [import_codegen35.ControlType.SECTION_FILTER_GROUP]: ["filterChange"],
2371
+ [import_codegen36.ControlType.SECTION_FILTER_GROUP]: ["filterChange"],
2338
2372
  // Offered only outside a group — see `outputsOf` below.
2339
- [import_codegen35.ControlType.SECTION_FILTER]: ["filterChange"],
2373
+ [import_codegen36.ControlType.SECTION_FILTER]: ["filterChange"],
2340
2374
  // One payload, `{offset, perPage}`, and both members are pickable — a
2341
2375
  // CallArgMapping reading `event.offset` gets a number, which is what an
2342
2376
  // ApiOperation's query param takes. The whole `$event` works too, unlike a
2343
2377
  // FilterGroup's list of pairs (ADR 0097).
2344
- [import_codegen35.ControlType.SECTION_PAGINATION]: ["paginationChange"],
2378
+ [import_codegen36.ControlType.SECTION_PAGINATION]: ["paginationChange"],
2345
2379
  // `{id, direction}`, after the rows were reordered in place — bound when the
2346
2380
  // table holds one page of a longer list and whoever fetches has to sort the
2347
2381
  // rest (ADR 0148). `tableInitialized` fires once, after the first render —
2348
2382
  // no payload, the Form's `formInitialized` for a table.
2349
- [import_codegen35.ControlType.SECTION_TABLE]: ["sortChange", "tableInitialized"],
2383
+ [import_codegen36.ControlType.SECTION_TABLE]: ["sortChange", "tableInitialized"],
2350
2384
  // Repeated rows emit their Repeat item; static rows emit `undefined`.
2351
- [import_codegen35.ControlType.SECTION_TABLE_ROW]: ["rowClick"],
2385
+ [import_codegen36.ControlType.SECTION_TABLE_ROW]: ["rowClick"],
2352
2386
  // The preset picked, and the window it drew as `{from, to}` ISO text — both
2353
2387
  // members pickable, each a date an ApiOperation's param takes. Fired when the
2354
2388
  // reader picks a preset or lets go of the navigator, never because an input
2355
2389
  // moved, so a fetch bound here cannot loop (libs/one GLOSSARY.md
2356
2390
  // SectionChart, the SectionPagination rule of ADR 0097).
2357
- [import_codegen35.ControlType.SECTION_CHART]: ["rangeChange", "windowChange"],
2391
+ [import_codegen36.ControlType.SECTION_CHART]: ["rangeChange", "windowChange"],
2358
2392
  // Offered under the `link` variant alone — see `outputsOf` below.
2359
- [import_codegen35.ControlType.TEXT_OUTPUT]: ["clicked"]
2393
+ [import_codegen36.ControlType.TEXT_OUTPUT]: ["clicked"]
2360
2394
  };
2361
2395
  function outputsOf(control, controlMap, embedded) {
2362
- if (control.type === import_codegen35.ControlType.SCREEN) {
2363
- return (0, import_codegen35.listScreenOutputs)(embedded?.(control)).map((output) => output.id);
2396
+ if (control.type === import_codegen36.ControlType.SCREEN) {
2397
+ return (0, import_codegen36.listScreenOutputs)(embedded?.(control)).map((output) => output.id);
2364
2398
  }
2365
- if (control.type === import_codegen35.ControlType.PLUGIN) {
2366
- return (0, import_codegen35.pluginNamesOf)(control.configs, import_codegen35.PLUGIN_OUTPUTS_KEY);
2399
+ if (control.type === import_codegen36.ControlType.PLUGIN) {
2400
+ return (0, import_codegen36.pluginNamesOf)(control.configs, import_codegen36.PLUGIN_OUTPUTS_KEY);
2367
2401
  }
2368
2402
  const offered = CONTROL_OUTPUTS[control.type] ?? [];
2369
- if (control.type === import_codegen35.ControlType.FORM) {
2370
- return controlMap && !hasSubmitButton(control, controlMap) && !(control.id && (0, import_codegen35.hasSubmitTargetButton)(control.id, controlMap)) ? offered.filter((output) => output !== "submitted") : offered;
2403
+ if (control.type === import_codegen36.ControlType.FORM) {
2404
+ return controlMap && !hasSubmitButton(control, controlMap) && !(control.id && (0, import_codegen36.hasSubmitTargetButton)(control.id, controlMap)) ? offered.filter((output) => output !== "submitted") : offered;
2371
2405
  }
2372
- if (control.type === import_codegen35.ControlType.SECTION_FILTER) {
2406
+ if (control.type === import_codegen36.ControlType.SECTION_FILTER) {
2373
2407
  return controlMap && insideFilterGroup(control, controlMap) ? [] : offered;
2374
2408
  }
2375
- if (control.type !== import_codegen35.ControlType.TEXT_OUTPUT) return offered;
2409
+ if (control.type !== import_codegen36.ControlType.TEXT_OUTPUT) return offered;
2376
2410
  const variant = control.configs?.["variant"];
2377
2411
  const isLink = variant === "link" || variant === "link-small";
2378
- return isLink && !(0, import_codegen35.hasRouterLinkDirective)(control) ? offered : [];
2412
+ return isLink && !(0, import_codegen36.hasRouterLinkDirective)(control) ? offered : [];
2379
2413
  }
2380
2414
  function hasSubmitButton(control, controlMap) {
2381
2415
  const queue = [...control.childrens ?? []];
@@ -2385,8 +2419,8 @@ function hasSubmitButton(control, controlMap) {
2385
2419
  if (!id || seen.has(id)) continue;
2386
2420
  seen.add(id);
2387
2421
  const child = controlMap[id];
2388
- if (!child || child.type === import_codegen35.ControlType.FORM) continue;
2389
- if (child.type === import_codegen35.ControlType.BUTTON && child.configs?.["isSubmit"] === true)
2422
+ if (!child || child.type === import_codegen36.ControlType.FORM) continue;
2423
+ if (child.type === import_codegen36.ControlType.BUTTON && child.configs?.["isSubmit"] === true)
2390
2424
  return true;
2391
2425
  queue.push(...child.childrens ?? []);
2392
2426
  }
@@ -2396,27 +2430,27 @@ function insideFilterGroup(control, controlMap) {
2396
2430
  const seen = /* @__PURE__ */ new Set();
2397
2431
  let current = control.parentId ? controlMap[control.parentId] : void 0;
2398
2432
  while (current && !seen.has(current.id)) {
2399
- if (current.type === import_codegen35.ControlType.SECTION_FILTER_GROUP) return true;
2433
+ if (current.type === import_codegen36.ControlType.SECTION_FILTER_GROUP) return true;
2400
2434
  seen.add(current.id);
2401
2435
  current = current.parentId ? controlMap[current.parentId] : void 0;
2402
2436
  }
2403
2437
  return false;
2404
2438
  }
2405
2439
  function offersOutputKey(control, controlMap, key, embedded) {
2406
- if ((0, import_codegen35.hasRouterLink)(control.directives?.["routerLink"]?.configs)) return false;
2407
- const base = (0, import_codegen35.outputArmBaseKey)(key);
2408
- const output = (0, import_codegen35.isMenuActionKey)(base) ? import_codegen35.MENU_ACTION_OUTPUT : base;
2440
+ if ((0, import_codegen36.hasRouterLink)(control.directives?.["routerLink"]?.configs)) return false;
2441
+ const base = (0, import_codegen36.outputArmBaseKey)(key);
2442
+ const output = (0, import_codegen36.isMenuActionKey)(base) ? import_codegen36.MENU_ACTION_OUTPUT : base;
2409
2443
  return outputsOf(control, controlMap, embedded).includes(output);
2410
2444
  }
2411
2445
  var OUTPUT_MAP_FIELDS = [
2412
- ...import_codegen35.OUTPUT_GROUP_MAPS,
2446
+ ...import_codegen36.OUTPUT_GROUP_MAPS,
2413
2447
  "outputCalls",
2414
2448
  "outputArms"
2415
2449
  ];
2416
2450
  var wiredOutputKeys = (control) => [
2417
2451
  ...new Set(
2418
2452
  OUTPUT_MAP_FIELDS.flatMap(
2419
- (field) => Object.keys(control[field] ?? {}).map(import_codegen35.outputArmBaseKey)
2453
+ (field) => Object.keys(control[field] ?? {}).map(import_codegen36.outputArmBaseKey)
2420
2454
  )
2421
2455
  )
2422
2456
  ];
@@ -2426,7 +2460,7 @@ var CLEARED_OUTPUT_WIRING = Object.fromEntries(
2426
2460
 
2427
2461
  // apps/m-one-ui/src/app/pages/design/lib/hand-binding-helper.ts
2428
2462
  var handControls = (controlMap) => Object.values(controlMap).filter(
2429
- (control) => control.type === import_codegen36.ControlType.SCREEN && !!control.handRef
2463
+ (control) => control.type === import_codegen37.ControlType.SCREEN && !!control.handRef
2430
2464
  );
2431
2465
  var unmountableReason = (handRef, hand) => {
2432
2466
  const contract = hand.contracts[handRef];
@@ -2436,7 +2470,7 @@ var unmountableReason = (handRef, hand) => {
2436
2470
  );
2437
2471
  return skipped ? skipped.reason : "gone";
2438
2472
  }
2439
- const blockers = (0, import_codegen36.mountBlockers)(contract);
2473
+ const blockers = (0, import_codegen37.mountBlockers)(contract);
2440
2474
  return blockers.length ? `required: ${blockers.join(", ")}` : void 0;
2441
2475
  };
2442
2476
  var memberOf = (screen, binding) => {
@@ -2507,7 +2541,7 @@ var unboundRequiredInputs = (control, contract) => {
2507
2541
  };
2508
2542
  var mountedContract = (control, hand) => {
2509
2543
  const contract = control.handRef ? hand.contracts[control.handRef] : void 0;
2510
- return contract && (0, import_codegen36.isMountable)(contract) ? contract : void 0;
2544
+ return contract && (0, import_codegen37.isMountable)(contract) ? contract : void 0;
2511
2545
  };
2512
2546
 
2513
2547
  // apps/m-one-ui/src/app/pages/design/lib/invariants/hand-binding-resolves.ts
@@ -2596,7 +2630,7 @@ var handScreenResolves = defineInvariant({
2596
2630
  });
2597
2631
 
2598
2632
  // apps/m-one-ui/src/app/pages/design/lib/invariants/reserved-variant-name-free.ts
2599
- var import_codegen37 = require("./index.js");
2633
+ var import_codegen38 = require("./index.js");
2600
2634
  var reservedVariantNameFree = defineInvariant({
2601
2635
  name: "reserved-variant-name-free",
2602
2636
  message: "invariant-reserved-variant-name",
@@ -2608,7 +2642,7 @@ var reservedVariantNameFree = defineInvariant({
2608
2642
  const held = [
2609
2643
  ...Object.values(feature.properties).map((property) => property.name),
2610
2644
  ...Object.values(feature.variants).map((variant) => variant.name)
2611
- ].filter(import_codegen37.isReservedVariantName);
2645
+ ].filter(import_codegen38.isReservedVariantName);
2612
2646
  return held.length ? [
2613
2647
  {
2614
2648
  subject: `${feature.name}.${held[0]}`,
@@ -2625,7 +2659,7 @@ var reservedVariantNameFree = defineInvariant({
2625
2659
  ...Object.values(screen.outputs ?? {}),
2626
2660
  ...Object.values(screen.constants ?? {}),
2627
2661
  ...Object.values(screen.computeds ?? {})
2628
- ].map((member) => member.name).filter(import_codegen37.isReservedVariantName);
2662
+ ].map((member) => member.name).filter(import_codegen38.isReservedVariantName);
2629
2663
  return held.length ? [
2630
2664
  {
2631
2665
  subject: `${screen.name}.${held[0]}`,
@@ -2638,13 +2672,13 @@ var reservedVariantNameFree = defineInvariant({
2638
2672
  });
2639
2673
 
2640
2674
  // apps/m-one-ui/src/app/pages/design/lib/invariants/feature-name-free.ts
2641
- var import_codegen38 = require("./index.js");
2675
+ var import_codegen39 = require("./index.js");
2642
2676
  var featureNameFree = defineInvariant({
2643
2677
  name: "feature-name-free",
2644
2678
  message: "invariant-feature-name-reserved",
2645
2679
  severity: "advisory",
2646
2680
  deps: ["features", "screens"],
2647
- validate: ({ features, screens }) => Object.values(features).filter((feature) => (0, import_codegen38.isReservedFeatureName)(feature.name)).map((feature) => ({
2681
+ validate: ({ features, screens }) => Object.values(features).filter((feature) => (0, import_codegen39.isReservedFeatureName)(feature.name)).map((feature) => ({
2648
2682
  subject: feature.name,
2649
2683
  target: {
2650
2684
  kind: "screen",
@@ -2654,25 +2688,25 @@ var featureNameFree = defineInvariant({
2654
2688
  });
2655
2689
 
2656
2690
  // apps/m-one-ui/src/app/pages/design/lib/compare-register.ts
2657
- var import_codegen42 = require("./index.js");
2691
+ var import_codegen43 = require("./index.js");
2658
2692
 
2659
2693
  // apps/m-one-ui/src/app/pages/design/lib/code-tree.ts
2660
- var import_codegen39 = require("./index.js");
2694
+ var import_codegen40 = require("./index.js");
2661
2695
  var CODE_AREA_ROOTS = [
2662
- ["pages", `${import_codegen39.PAGES_ROOT}/`],
2663
- ["features", `${import_codegen39.FEATURES_ROOT}/`],
2664
- ["widgets", `${import_codegen39.WIDGETS_ROOT}/`],
2696
+ ["pages", `${import_codegen40.PAGES_ROOT}/`],
2697
+ ["features", `${import_codegen40.FEATURES_ROOT}/`],
2698
+ ["widgets", `${import_codegen40.WIDGETS_ROOT}/`],
2665
2699
  ["shared", "src/app/shared/"],
2666
2700
  ["mag_assets", "mag_assets/"],
2667
2701
  ["magmonium", ".magmonium/"]
2668
2702
  ];
2669
2703
 
2670
2704
  // apps/m-one-ui/src/app/pages/design/lib/function-register.ts
2671
- var import_codegen40 = require("./index.js");
2705
+ var import_codegen41 = require("./index.js");
2672
2706
  var everyFunction = (appFunctions, features) => [
2673
- ...(0, import_codegen40.listFunctions)(appFunctions).map((fn) => ({ fn })),
2674
- ...(0, import_codegen40.listFeatures)(features).flatMap(
2675
- (feature) => (0, import_codegen40.listFunctions)(feature.functions).map((fn) => ({
2707
+ ...(0, import_codegen41.listFunctions)(appFunctions).map((fn) => ({ fn })),
2708
+ ...(0, import_codegen41.listFeatures)(features).flatMap(
2709
+ (feature) => (0, import_codegen41.listFunctions)(feature.functions).map((fn) => ({
2676
2710
  fn,
2677
2711
  featureId: feature.id
2678
2712
  }))
@@ -2687,14 +2721,14 @@ var canonical = (value) => {
2687
2721
  };
2688
2722
 
2689
2723
  // apps/m-one-ui/src/app/pages/design/lib/shape-register.ts
2690
- var import_codegen41 = require("./index.js");
2724
+ var import_codegen42 = require("./index.js");
2691
2725
 
2692
2726
  // apps/m-one-ui/src/app/pages/design/lib/compare-register.ts
2693
- var import_codegen43 = require("./index.js");
2727
+ var import_codegen44 = require("./index.js");
2694
2728
  var everyShape = (features, sharedShapes = {}) => [
2695
- ...(0, import_codegen42.listShapes)(sharedShapes).map((shape) => ({ shape })),
2696
- ...(0, import_codegen42.listFeatures)(features).flatMap(
2697
- (feature) => (0, import_codegen42.listShapes)(feature.shapes).filter((shape) => !(0, import_codegen42.isSharedShapeId)(shape.id)).map((shape) => ({ shape, featureId: feature.id }))
2729
+ ...(0, import_codegen43.listShapes)(sharedShapes).map((shape) => ({ shape })),
2730
+ ...(0, import_codegen43.listFeatures)(features).flatMap(
2731
+ (feature) => (0, import_codegen43.listShapes)(feature.shapes).filter((shape) => !(0, import_codegen43.isSharedShapeId)(shape.id)).map((shape) => ({ shape, featureId: feature.id }))
2698
2732
  )
2699
2733
  ];
2700
2734
  var distinctPair = (kind, a, b) => ({ kind, ids: a < b ? [a, b] : [b, a] });
@@ -2780,24 +2814,24 @@ var themeSelectionResolves = defineInvariant({
2780
2814
  });
2781
2815
 
2782
2816
  // apps/m-one-ui/src/app/pages/design/lib/invariants/search-feed-resolves.ts
2783
- var import_codegen44 = require("./index.js");
2817
+ var import_codegen45 = require("./index.js");
2784
2818
  var searchFeedResolves = defineInvariant({
2785
2819
  name: "search-feed-resolves",
2786
2820
  message: "invariant-search-feed-unresolved",
2787
2821
  severity: "advisory",
2788
2822
  deps: ["features", "functions"],
2789
2823
  validate: ({ features, functions }) => Object.values(features).flatMap(
2790
- (feature) => (0, import_codegen44.storesOf)(feature).flatMap((store) => {
2824
+ (feature) => (0, import_codegen45.storesOf)(feature).flatMap((store) => {
2791
2825
  const feed = store.searchFeed;
2792
2826
  if (!feed) return [];
2793
2827
  const property = store.properties[feed.propertyId];
2794
2828
  const rows = property?.cardinality === "many" ? property.dataType : void 0;
2795
2829
  if (feed.functionId) {
2796
2830
  const fn = feature.functions?.[feed.functionId] ?? functions[feed.functionId];
2797
- if (fn && (0, import_codegen44.isSearchFeedFunction)(fn, property, feature.shapes) && (0, import_codegen44.searchFeedArgsComplete)(fn, feed.args)) {
2831
+ if (fn && (0, import_codegen45.isSearchFeedFunction)(fn, property, feature.shapes) && (0, import_codegen45.searchFeedArgsComplete)(fn, feed.args)) {
2798
2832
  return [];
2799
2833
  }
2800
- } else if (rows && (0, import_codegen44.resolveSearchFeedMember)(feed.title, rows, feature.shapes)) {
2834
+ } else if (rows && (0, import_codegen45.resolveSearchFeedMember)(feed.title, rows, feature.shapes)) {
2801
2835
  return [];
2802
2836
  }
2803
2837
  return [
@@ -2816,14 +2850,14 @@ var searchFeedResolves = defineInvariant({
2816
2850
  });
2817
2851
 
2818
2852
  // apps/m-one-ui/src/app/pages/design/lib/invariants/search-answer-resolves.ts
2819
- var import_codegen45 = require("./index.js");
2853
+ var import_codegen46 = require("./index.js");
2820
2854
  var searchAnswerResolves = defineInvariant({
2821
2855
  name: "search-answer-resolves",
2822
2856
  message: "invariant-search-answer-unresolved",
2823
2857
  severity: "advisory",
2824
2858
  deps: ["navMap", "screens"],
2825
2859
  validate: ({ navMap, screens }) => {
2826
- const screenId = (0, import_codegen45.searchAnswerScreenId)(navMap);
2860
+ const screenId = (0, import_codegen46.searchAnswerScreenId)(navMap);
2827
2861
  if (!screenId) return [];
2828
2862
  const screen = screens.find((s) => s.id === screenId);
2829
2863
  if (screen && (screen.kind === "app_widget" || screen.kind === "feature")) {
@@ -2832,20 +2866,20 @@ var searchAnswerResolves = defineInvariant({
2832
2866
  return [
2833
2867
  {
2834
2868
  subject: screen?.name ?? screenId,
2835
- target: { kind: "nav", navId: import_codegen45.SEARCH_NAV_ID }
2869
+ target: { kind: "nav", navId: import_codegen46.SEARCH_NAV_ID }
2836
2870
  }
2837
2871
  ];
2838
2872
  }
2839
2873
  });
2840
2874
 
2841
2875
  // apps/m-one-ui/src/app/pages/design/lib/invariants/state-path-resolves.ts
2842
- var import_codegen46 = require("./index.js");
2876
+ var import_codegen47 = require("./index.js");
2843
2877
  var reachOf = (feature, shared) => ({
2844
2878
  properties: Object.assign(
2845
2879
  {},
2846
- ...(0, import_codegen46.storesOf)(feature).map((store) => store.properties)
2880
+ ...(0, import_codegen47.storesOf)(feature).map((store) => store.properties)
2847
2881
  ),
2848
- shapes: (0, import_codegen46.shapesInReach)(feature, shared)
2882
+ shapes: (0, import_codegen47.shapesInReach)(feature, shared)
2849
2883
  });
2850
2884
  function declaredIds(value, into = /* @__PURE__ */ new Set()) {
2851
2885
  if (Array.isArray(value)) value.forEach((item) => declaredIds(item, into));
@@ -2861,7 +2895,7 @@ var STATE_SOURCES = /* @__PURE__ */ new Set(["state", "path", "store"]);
2861
2895
  function holdsDeadPath(value, reach, roots, state) {
2862
2896
  if (Array.isArray(value)) {
2863
2897
  if (value.length > 1 && value.every((id) => typeof id === "string") && value[0] in reach.properties && !value.slice(1).some((id) => id in reach.properties)) {
2864
- return !(0, import_codegen46.isPathResolved)(value, reach.properties, reach.shapes);
2898
+ return !(0, import_codegen47.isPathResolved)(value, reach.properties, reach.shapes);
2865
2899
  }
2866
2900
  return value.some((item) => holdsDeadPath(item, reach, roots, state));
2867
2901
  }
@@ -2894,7 +2928,7 @@ var statePathResolves = defineInvariant({
2894
2928
  const reaches = /* @__PURE__ */ new Map();
2895
2929
  const state = new Set(
2896
2930
  Object.values(features).flatMap(
2897
- (feature) => (0, import_codegen46.storesOf)(feature).flatMap((store) => [
2931
+ (feature) => (0, import_codegen47.storesOf)(feature).flatMap((store) => [
2898
2932
  ...Object.keys(store.properties ?? {}),
2899
2933
  ...Object.keys(store.computeds ?? {})
2900
2934
  ])
@@ -2913,7 +2947,7 @@ var statePathResolves = defineInvariant({
2913
2947
  });
2914
2948
  }
2915
2949
  }
2916
- for (const store of (0, import_codegen46.storesOf)(feature)) {
2950
+ for (const store of (0, import_codegen47.storesOf)(feature)) {
2917
2951
  const subStoreId = store.subStore?.id;
2918
2952
  const owner = subStoreId ? { ...at, subStoreId } : at;
2919
2953
  const prefix = store.subStore ? `${feature.name} \u2192 ${store.subStore.name}` : feature.name;
@@ -2934,7 +2968,7 @@ var statePathResolves = defineInvariant({
2934
2968
  }
2935
2969
  }
2936
2970
  for (const screen of screens) {
2937
- const reach = (0, import_codegen46.isFeatureScreen)(screen) ? reaches.get(screen.featureId) : void 0;
2971
+ const reach = (0, import_codegen47.isFeatureScreen)(screen) ? reaches.get(screen.featureId) : void 0;
2938
2972
  if (!reach) continue;
2939
2973
  const at = { kind: "screen", screenId: screen.id, panel: "screen" };
2940
2974
  const own = [
@@ -2979,21 +3013,21 @@ var statePathResolves = defineInvariant({
2979
3013
  });
2980
3014
 
2981
3015
  // apps/m-one-ui/src/app/pages/design/lib/invariants/rule-operand-fits.ts
2982
- var import_codegen47 = require("./index.js");
3016
+ var import_codegen48 = require("./index.js");
2983
3017
  var unfit = (check, properties, shapes) => {
2984
- const error = (0, import_codegen47.checkError)(check, properties, shapes);
3018
+ const error = (0, import_codegen48.checkError)(check, properties, shapes);
2985
3019
  if (error === "rule-path-missing") return false;
2986
3020
  if (error === "rule-operator-invalid" || error === "rule-path-not-leaf" || error === "rule-operand-missing" && check.operand.kind === "path") {
2987
3021
  return true;
2988
3022
  }
2989
- if ((0, import_codegen47.isUnaryOperator)(check.operator) || check.operand.kind !== "literal") {
3023
+ if ((0, import_codegen48.isUnaryOperator)(check.operator) || check.operand.kind !== "literal") {
2990
3024
  return false;
2991
3025
  }
2992
- const segments = (0, import_codegen47.resolvePath)(check.path, properties, shapes);
2993
- if (!check.count && (0, import_codegen47.pathLeafEnumId)(segments)) return false;
2994
- const type = (0, import_codegen47.operandType)((0, import_codegen47.pathLeafType)(segments), !!check.count);
3026
+ const segments = (0, import_codegen48.resolvePath)(check.path, properties, shapes);
3027
+ if (!check.count && (0, import_codegen48.pathLeafEnumId)(segments)) return false;
3028
+ const type = (0, import_codegen48.operandType)((0, import_codegen48.pathLeafType)(segments), !!check.count);
2995
3029
  if (!type) return false;
2996
- return (0, import_codegen47.validateLiteral)(String(check.operand.value), { type }, "one") === "value-type-mismatch";
3030
+ return (0, import_codegen48.validateLiteral)(String(check.operand.value), { type }, "one") === "value-type-mismatch";
2997
3031
  };
2998
3032
  var ruleOperandFits = defineInvariant({
2999
3033
  name: "rule-operand-fits",
@@ -3005,11 +3039,11 @@ var ruleOperandFits = defineInvariant({
3005
3039
  for (const feature of Object.values(features)) {
3006
3040
  const properties = Object.assign(
3007
3041
  {},
3008
- ...(0, import_codegen47.storesOf)(feature).map((store) => store.properties)
3042
+ ...(0, import_codegen48.storesOf)(feature).map((store) => store.properties)
3009
3043
  );
3010
- const shapes = (0, import_codegen47.shapesInReach)(feature, sharedShapes);
3044
+ const shapes = (0, import_codegen48.shapesInReach)(feature, sharedShapes);
3011
3045
  for (const variant of Object.values(feature.variants ?? {})) {
3012
- if ((0, import_codegen47.ruleChecks)(variant.rule).some(
3046
+ if ((0, import_codegen48.ruleChecks)(variant.rule).some(
3013
3047
  (check) => unfit(check, properties, shapes)
3014
3048
  )) {
3015
3049
  found.push({
@@ -3029,7 +3063,7 @@ var ruleOperandFits = defineInvariant({
3029
3063
  });
3030
3064
 
3031
3065
  // apps/m-one-ui/src/app/pages/design/lib/invariants/timer-complete.ts
3032
- var import_codegen48 = require("./index.js");
3066
+ var import_codegen49 = require("./index.js");
3033
3067
  var timerComplete = defineInvariant({
3034
3068
  name: "timer-complete",
3035
3069
  message: "invariant-timer-incomplete",
@@ -3038,7 +3072,7 @@ var timerComplete = defineInvariant({
3038
3072
  validate: ({ features, screens }) => {
3039
3073
  const featureScreen = (featureId) => screens.find((screen) => screen.featureId === featureId)?.id ?? "";
3040
3074
  return Object.values(features).flatMap(
3041
- (feature) => Object.values(feature.timers ?? {}).filter((timer) => (0, import_codegen48.timerError)(timer)).map((timer) => ({
3075
+ (feature) => Object.values(feature.timers ?? {}).filter((timer) => (0, import_codegen49.timerError)(timer)).map((timer) => ({
3042
3076
  subject: `${feature.name}.${timer.name}`,
3043
3077
  target: {
3044
3078
  kind: "screen",
@@ -3050,20 +3084,20 @@ var timerComplete = defineInvariant({
3050
3084
  });
3051
3085
 
3052
3086
  // apps/m-one-ui/src/app/pages/design/lib/invariants/variant-gate-satisfiable.ts
3053
- var import_codegen49 = require("./index.js");
3087
+ var import_codegen50 = require("./index.js");
3054
3088
  var ATOM_CAP2 = 12;
3055
3089
  var foldText2 = (entries, names) => entries.map((entry, index) => {
3056
3090
  const name = names.get(entry.id) ?? entry.id;
3057
- const term = (0, import_codegen49.variantJoinIsNot)(entry.join) ? `!${name}` : name;
3091
+ const term = (0, import_codegen50.variantJoinIsNot)(entry.join) ? `!${name}` : name;
3058
3092
  if (index === 0) return term;
3059
- return `${(0, import_codegen49.variantJoinIsAnd)(entry.join) ? "&&" : "||"} ${term}`;
3093
+ return `${(0, import_codegen50.variantJoinIsAnd)(entry.join) ? "&&" : "||"} ${term}`;
3060
3094
  }).join(" ");
3061
3095
  var variantNames2 = (features, screens, currentScreenId) => {
3062
3096
  const screen = screens.find((one) => one.id === currentScreenId);
3063
3097
  const feature = screen?.featureId ? features[screen.featureId] : void 0;
3064
3098
  const names = /* @__PURE__ */ new Map([
3065
- [import_codegen49.ELSE_VARIANT_ID, import_codegen49.ELSE_VARIANT_NAME],
3066
- [import_codegen49.BUSY_VARIANT_ID, import_codegen49.BUSY_VARIANT_NAME]
3099
+ [import_codegen50.ELSE_VARIANT_ID, import_codegen50.ELSE_VARIANT_NAME],
3100
+ [import_codegen50.BUSY_VARIANT_ID, import_codegen50.BUSY_VARIANT_NAME]
3067
3101
  ]);
3068
3102
  Object.values(feature?.variants ?? {}).forEach(
3069
3103
  (variant) => names.set(variant.id, variant.name)
@@ -3073,16 +3107,16 @@ var variantNames2 = (features, screens, currentScreenId) => {
3073
3107
  var satisfiable = (gates) => {
3074
3108
  const atoms = [
3075
3109
  ...new Set(
3076
- gates.flat().map((entry) => entry.id).filter((id) => !(0, import_codegen49.isReservedVariantId)(id))
3110
+ gates.flat().map((entry) => entry.id).filter((id) => !(0, import_codegen50.isReservedVariantId)(id))
3077
3111
  )
3078
3112
  ];
3079
3113
  if (atoms.length > ATOM_CAP2) return true;
3080
3114
  const rows = 1 << atoms.length;
3081
3115
  for (let row = 0; row < rows; row++) {
3082
3116
  const on = atoms.filter((_, index) => row & 1 << index);
3083
- const base = on.length ? on : [...on, import_codegen49.ELSE_VARIANT_ID];
3084
- for (const withBusy of [base, [...base, import_codegen49.BUSY_VARIANT_ID]]) {
3085
- if (gates.every((gate) => (0, import_codegen49.evaluateVariantGate)(gate, withBusy))) {
3117
+ const base = on.length ? on : [...on, import_codegen50.ELSE_VARIANT_ID];
3118
+ for (const withBusy of [base, [...base, import_codegen50.BUSY_VARIANT_ID]]) {
3119
+ if (gates.every((gate) => (0, import_codegen50.evaluateVariantGate)(gate, withBusy))) {
3086
3120
  return true;
3087
3121
  }
3088
3122
  }
@@ -3101,9 +3135,9 @@ var unsatisfiableGates = perScreen(
3101
3135
  (controlMap, screen, { features, screens }) => {
3102
3136
  const names = variantNames2(features, screens, screen.id);
3103
3137
  return Object.entries(controlMap).flatMap(([controlId, control]) => {
3104
- const own = (0, import_codegen49.controlVariants)(control);
3138
+ const own = (0, import_codegen50.controlVariants)(control);
3105
3139
  if (!own.length) return [];
3106
- const above = (0, import_codegen49.enclosingGates)(controlId, controlMap);
3140
+ const above = (0, import_codegen50.enclosingGates)(controlId, controlMap);
3107
3141
  if (above === null) return [];
3108
3142
  const gates = [own, ...above];
3109
3143
  if (satisfiable(gates)) return [];
@@ -3228,14 +3262,14 @@ function codecDrops(files, source, root = ".magmonium") {
3228
3262
  }
3229
3263
 
3230
3264
  // apps/m-one-ui/src/app/pages/design/lib/emit-gap-helper.ts
3231
- var import_codegen51 = require("./index.js");
3265
+ var import_codegen52 = require("./index.js");
3232
3266
 
3233
3267
  // apps/m-one-ui/src/app/pages/design/lib/store-method-check.ts
3234
- var import_codegen50 = require("./index.js");
3268
+ var import_codegen51 = require("./index.js");
3235
3269
  function storeMethodError(method, scope) {
3236
- const name = (0, import_codegen50.validateMethodName)(method.name, scope.siblings, method.id);
3270
+ const name = (0, import_codegen51.validateMethodName)(method.name, scope.siblings, method.id);
3237
3271
  if (name) return name;
3238
- if ((0, import_codegen50.isStorageMethod)(method)) {
3272
+ if ((0, import_codegen51.isStorageMethod)(method)) {
3239
3273
  const config = method.storage;
3240
3274
  if (!config?.key.trim()) return "emit-gap-storage-method";
3241
3275
  if (config.op !== "delete" && !scope.properties[config.propertyId ?? ""]) {
@@ -3243,8 +3277,8 @@ function storeMethodError(method, scope) {
3243
3277
  }
3244
3278
  return void 0;
3245
3279
  }
3246
- if ((0, import_codegen50.isCacheMethod)(method)) {
3247
- return (0, import_codegen50.cacheMethodError)(
3280
+ if ((0, import_codegen51.isCacheMethod)(method)) {
3281
+ return (0, import_codegen51.cacheMethodError)(
3248
3282
  method,
3249
3283
  scope.methods,
3250
3284
  scope.properties,
@@ -3253,7 +3287,7 @@ function storeMethodError(method, scope) {
3253
3287
  }
3254
3288
  const operation = scope.operationOf(method);
3255
3289
  if (!operation) return "emit-gap-unknown-operation";
3256
- return (0, import_codegen50.validateInputs)(method, operation) ?? (0, import_codegen50.computeInputMemberError)(method, scope.functions, scope.shapes);
3290
+ return (0, import_codegen51.validateInputs)(method, operation) ?? (0, import_codegen51.computeInputMemberError)(method, scope.functions, scope.shapes);
3257
3291
  }
3258
3292
 
3259
3293
  // apps/m-one-ui/src/app/pages/design/lib/emit-gap-helper.ts
@@ -3262,7 +3296,7 @@ var controlLabel = (control) => {
3262
3296
  return name || control.type;
3263
3297
  };
3264
3298
  var featureSliceOf = (meta, features, appFunctions) => {
3265
- if (!(0, import_codegen51.isFeatureScreen)(meta)) {
3299
+ if (!(0, import_codegen52.isFeatureScreen)(meta)) {
3266
3300
  return {
3267
3301
  methods: {},
3268
3302
  properties: {},
@@ -3274,13 +3308,13 @@ var featureSliceOf = (meta, features, appFunctions) => {
3274
3308
  }
3275
3309
  const feature = features[meta.featureId];
3276
3310
  const functions = { ...appFunctions, ...feature?.functions ?? {} };
3277
- const readable = feature ? (0, import_codegen51.readableMembers)(feature, import_codegen51.MAIN_STORE_OWNER) : void 0;
3311
+ const readable = feature ? (0, import_codegen52.readableMembers)(feature, import_codegen52.MAIN_STORE_OWNER) : void 0;
3278
3312
  return {
3279
3313
  methods: readable?.methods ?? {},
3280
3314
  properties: readable?.properties ?? {},
3281
3315
  functions,
3282
3316
  computeds: readable?.computeds ?? {},
3283
- roots: (0, import_codegen51.propertiesWithComputeds)(
3317
+ roots: (0, import_codegen52.propertiesWithComputeds)(
3284
3318
  readable?.properties ?? {},
3285
3319
  readable?.computeds ?? {},
3286
3320
  functions
@@ -3305,11 +3339,11 @@ var screenBindingOptions = (meta, controlMap, slice, inputs, variables, where) =
3305
3339
  var callSiteError = (method, operationOf, rows, payload, constants, functions, bindings, properties = {}, methods = {}, eventMembers = []) => {
3306
3340
  if (!method) return "emit-gap-unknown-method";
3307
3341
  const op = operationOf(method);
3308
- if (!op && !(0, import_codegen51.isStorageMethod)(method) && !(0, import_codegen51.isCacheMethod)(method)) {
3342
+ if (!op && !(0, import_codegen52.isStorageMethod)(method) && !(0, import_codegen52.isCacheMethod)(method)) {
3309
3343
  return "emit-gap-unknown-operation";
3310
3344
  }
3311
- const args = (0, import_codegen51.isCacheMethod)(method) ? (0, import_codegen51.cacheMethodArgs)(method, methods, operationOf) : op ? (0, import_codegen51.methodArgs)(method, op) : (0, import_codegen51.storageMethodArgs)(method, properties);
3312
- return (0, import_codegen51.validateCallArgs)(
3345
+ const args = (0, import_codegen52.isCacheMethod)(method) ? (0, import_codegen52.cacheMethodArgs)(method, methods, operationOf) : op ? (0, import_codegen52.methodArgs)(method, op) : (0, import_codegen52.storageMethodArgs)(method, properties);
3346
+ return (0, import_codegen52.validateCallArgs)(
3313
3347
  args,
3314
3348
  rows,
3315
3349
  payload,
@@ -3348,8 +3382,8 @@ var collectControlGaps = (gaps, meta, controlMap, slice, constants, inputs, vari
3348
3382
  ].filter(
3349
3383
  (output) => offersOutputKey(control, controlMap, output, embedded)
3350
3384
  ));
3351
- const eventMembers = (0, import_codegen51.formEventMembers)(controlMap, control.id);
3352
- const eventFields = (0, import_codegen51.formEventFieldTypes)(controlMap, control.id);
3385
+ const eventMembers = (0, import_codegen52.formEventMembers)(controlMap, control.id);
3386
+ const eventFields = (0, import_codegen52.formEventFieldTypes)(controlMap, control.id);
3353
3387
  const callBindings = screenBindingOptions(
3354
3388
  meta,
3355
3389
  controlMap,
@@ -3360,11 +3394,11 @@ var collectControlGaps = (gaps, meta, controlMap, slice, constants, inputs, vari
3360
3394
  );
3361
3395
  outputs.forEach((output) => {
3362
3396
  const methodId = control.outputs?.[output];
3363
- const globalMethod = methodId ? (0, import_codegen51.globalMethodOf)(methodId) : void 0;
3397
+ const globalMethod = methodId ? (0, import_codegen52.globalMethodOf)(methodId) : void 0;
3364
3398
  if (methodId) {
3365
- const err = globalMethod ? (0, import_codegen51.validateCallArgs)(
3366
- (0, import_codegen51.globalMethodArgs)(globalMethod),
3367
- (0, import_codegen51.outputArgRows)(control.outputArgs, output),
3399
+ const err = globalMethod ? (0, import_codegen52.validateCallArgs)(
3400
+ (0, import_codegen52.globalMethodArgs)(globalMethod),
3401
+ (0, import_codegen52.outputArgRows)(control.outputArgs, output),
3368
3402
  outputPayloadShape(control, output, embedded),
3369
3403
  eventMembers,
3370
3404
  constants,
@@ -3373,7 +3407,7 @@ var collectControlGaps = (gaps, meta, controlMap, slice, constants, inputs, vari
3373
3407
  ) : callSiteError(
3374
3408
  slice.methods[methodId],
3375
3409
  operationOf,
3376
- (0, import_codegen51.outputArgRows)(control.outputArgs, output),
3410
+ (0, import_codegen52.outputArgRows)(control.outputArgs, output),
3377
3411
  outputPayloadShape(control, output, embedded),
3378
3412
  constants,
3379
3413
  slice.functions,
@@ -3397,10 +3431,10 @@ var collectControlGaps = (gaps, meta, controlMap, slice, constants, inputs, vari
3397
3431
  }
3398
3432
  const screenMethodId = control.outputScreenMethods?.[output];
3399
3433
  const screenMethod = screenMethodId ? meta.methods?.[screenMethodId] : void 0;
3400
- if (screenMethod && (0, import_codegen51.screenMethodArgs)(screenMethod).length) {
3401
- const err = (0, import_codegen51.validateCallArgs)(
3402
- (0, import_codegen51.screenMethodArgs)(screenMethod),
3403
- (0, import_codegen51.outputArgRows)(control.outputArgs, output),
3434
+ if (screenMethod && (0, import_codegen52.screenMethodArgs)(screenMethod).length) {
3435
+ const err = (0, import_codegen52.validateCallArgs)(
3436
+ (0, import_codegen52.screenMethodArgs)(screenMethod),
3437
+ (0, import_codegen52.outputArgRows)(control.outputArgs, output),
3404
3438
  outputPayloadShape(control, output, embedded),
3405
3439
  eventMembers,
3406
3440
  constants,
@@ -3419,10 +3453,10 @@ var collectControlGaps = (gaps, meta, controlMap, slice, constants, inputs, vari
3419
3453
  });
3420
3454
  }
3421
3455
  }
3422
- import_codegen51.OUTCOME_ARMS.forEach((arm) => {
3456
+ import_codegen52.OUTCOME_ARMS.forEach((arm) => {
3423
3457
  const rows = control.outputOutcomes?.[output]?.[arm];
3424
3458
  if (!rows) return;
3425
- const resetErr = (0, import_codegen51.validateFormResets)(
3459
+ const resetErr = (0, import_codegen52.validateFormResets)(
3426
3460
  controlMap,
3427
3461
  rows.formResets ?? [],
3428
3462
  meta.formModels ?? {}
@@ -3438,7 +3472,7 @@ var collectControlGaps = (gaps, meta, controlMap, slice, constants, inputs, vari
3438
3472
  output
3439
3473
  });
3440
3474
  }
3441
- const armScreenWriteErr = (0, import_codegen51.validateScreenWrites)(
3475
+ const armScreenWriteErr = (0, import_codegen52.validateScreenWrites)(
3442
3476
  variables,
3443
3477
  rows.screenWrites ?? [],
3444
3478
  outputPayloadShape(control, output, embedded),
@@ -3459,7 +3493,7 @@ var collectControlGaps = (gaps, meta, controlMap, slice, constants, inputs, vari
3459
3493
  output
3460
3494
  });
3461
3495
  }
3462
- const armWriteErr = Object.keys(slice.properties).length ? (0, import_codegen51.validateStateWrites)(
3496
+ const armWriteErr = Object.keys(slice.properties).length ? (0, import_codegen52.validateStateWrites)(
3463
3497
  slice.properties,
3464
3498
  rows.writes ?? [],
3465
3499
  outputPayloadShape(control, output, embedded),
@@ -3481,8 +3515,8 @@ var collectControlGaps = (gaps, meta, controlMap, slice, constants, inputs, vari
3481
3515
  });
3482
3516
  }
3483
3517
  });
3484
- const openErr = (0, import_codegen51.validateOutputOpen)(
3485
- (0, import_codegen51.outputOpenOf)(control.outputOpens, output),
3518
+ const openErr = (0, import_codegen52.validateOutputOpen)(
3519
+ (0, import_codegen52.outputOpenOf)(control.outputOpens, output),
3486
3520
  [...screens],
3487
3521
  outputPayloadShape(control, output, embedded),
3488
3522
  inputs,
@@ -3499,9 +3533,9 @@ var collectControlGaps = (gaps, meta, controlMap, slice, constants, inputs, vari
3499
3533
  output
3500
3534
  });
3501
3535
  }
3502
- const emitErr = (0, import_codegen51.validateScreenEmits)(
3536
+ const emitErr = (0, import_codegen52.validateScreenEmits)(
3503
3537
  meta.outputs ?? {},
3504
- (0, import_codegen51.screenEmitRows)(control.outputEmits, output),
3538
+ (0, import_codegen52.screenEmitRows)(control.outputEmits, output),
3505
3539
  outputPayloadShape(control, output, embedded),
3506
3540
  [],
3507
3541
  inputs,
@@ -3519,7 +3553,7 @@ var collectControlGaps = (gaps, meta, controlMap, slice, constants, inputs, vari
3519
3553
  output
3520
3554
  });
3521
3555
  }
3522
- const open = (0, import_codegen51.outputOpenOf)(control.outputOpens, output);
3556
+ const open = (0, import_codegen52.outputOpenOf)(control.outputOpens, output);
3523
3557
  const opened = open?.screenId ? screens.find((one) => one.id === open.screenId) : void 0;
3524
3558
  for (const [outputId, wire] of Object.entries(open?.outputs ?? {})) {
3525
3559
  const declared = opened?.outputs?.[outputId];
@@ -3545,7 +3579,7 @@ var collectControlGaps = (gaps, meta, controlMap, slice, constants, inputs, vari
3545
3579
  })).find(({ err }) => !!err);
3546
3580
  const callErr = failing?.err;
3547
3581
  const binding = failing?.one ?? wire.binding;
3548
- const wireErr = !declared ? "screen-emit-unknown-output" : callErr ?? (0, import_codegen51.validateScreenEmits)(
3582
+ const wireErr = !declared ? "screen-emit-unknown-output" : callErr ?? (0, import_codegen52.validateScreenEmits)(
3549
3583
  meta.outputs ?? {},
3550
3584
  wire.emits ?? [],
3551
3585
  declared.payload ? declared.payload.dataType : "void",
@@ -3566,9 +3600,9 @@ var collectControlGaps = (gaps, meta, controlMap, slice, constants, inputs, vari
3566
3600
  ...binding ? { methodId: binding.methodId } : {}
3567
3601
  });
3568
3602
  }
3569
- const screenWriteErr = (0, import_codegen51.validateScreenWrites)(
3603
+ const screenWriteErr = (0, import_codegen52.validateScreenWrites)(
3570
3604
  variables,
3571
- (0, import_codegen51.screenWriteRows)(control.outputScreenWrites, output),
3605
+ (0, import_codegen52.screenWriteRows)(control.outputScreenWrites, output),
3572
3606
  outputPayloadShape(control, output, embedded),
3573
3607
  [],
3574
3608
  inputs,
@@ -3587,10 +3621,10 @@ var collectControlGaps = (gaps, meta, controlMap, slice, constants, inputs, vari
3587
3621
  output
3588
3622
  });
3589
3623
  }
3590
- const writeRows = (0, import_codegen51.stateWriteRows)(control.outputWrites, output);
3624
+ const writeRows = (0, import_codegen52.stateWriteRows)(control.outputWrites, output);
3591
3625
  if (!writeRows.length) return;
3592
3626
  if (!Object.keys(slice.properties).length) return;
3593
- const writeErr = (0, import_codegen51.validateStateWrites)(
3627
+ const writeErr = (0, import_codegen52.validateStateWrites)(
3594
3628
  slice.properties,
3595
3629
  writeRows,
3596
3630
  outputPayloadShape(control, output, embedded),
@@ -3618,7 +3652,7 @@ var collectBindingGaps = (gaps, meta, controlMap, slice) => {
3618
3652
  Object.values(controlMap).forEach((control) => {
3619
3653
  Object.entries(control.bindings ?? {}).forEach(([slot, binding]) => {
3620
3654
  if (!binding.transform) return;
3621
- const err = (0, import_codegen51.transformIncomplete)(
3655
+ const err = (0, import_codegen52.transformIncomplete)(
3622
3656
  binding.transform,
3623
3657
  slice.functions,
3624
3658
  slice.roots,
@@ -3633,12 +3667,12 @@ var collectBindingGaps = (gaps, meta, controlMap, slice) => {
3633
3667
  subject: `${meta.name} \xB7 ${controlLabel(control)} \xB7 ${slot}`,
3634
3668
  // The parameter still unanswered where one of them is, so the panel
3635
3669
  // names what to go and fill in rather than only the call it sits under.
3636
- detail: (0, import_codegen51.transformGapDetail)(
3670
+ detail: (0, import_codegen52.transformGapDetail)(
3637
3671
  binding.transform,
3638
3672
  slice.functions,
3639
3673
  slice.roots,
3640
3674
  slice.shapes
3641
- ) ?? (0, import_codegen51.transformLabel)(binding.transform, slice.functions),
3675
+ ) ?? (0, import_codegen52.transformLabel)(binding.transform, slice.functions),
3642
3676
  controlId: control.id,
3643
3677
  slot
3644
3678
  });
@@ -3648,13 +3682,13 @@ var collectBindingGaps = (gaps, meta, controlMap, slice) => {
3648
3682
  var autoCallReadError = (call, bindings) => {
3649
3683
  if (!call.reads?.length) return void 0;
3650
3684
  const offered = new Set(
3651
- (0, import_codegen51.bindingOptions)(bindings, () => true).map((option) => option.value)
3685
+ (0, import_codegen52.bindingOptions)(bindings, () => true).map((option) => option.value)
3652
3686
  );
3653
- return call.reads.every((read) => offered.has((0, import_codegen51.encodeBinding)(read))) ? void 0 : "auto-call-read-gone";
3687
+ return call.reads.every((read) => offered.has((0, import_codegen52.encodeBinding)(read))) ? void 0 : "auto-call-read-gone";
3654
3688
  };
3655
3689
  var collectAutoCallGaps = (gaps, meta, calls, slice, constants, operationOf, bindings) => {
3656
3690
  calls.forEach((call) => {
3657
- const err = (0, import_codegen51.screenAutoCallError)(call) ?? (call.methodId ? callSiteError(
3691
+ const err = (0, import_codegen52.screenAutoCallError)(call) ?? (call.methodId ? callSiteError(
3658
3692
  slice.methods[call.methodId],
3659
3693
  operationOf,
3660
3694
  call.args,
@@ -3664,7 +3698,7 @@ var collectAutoCallGaps = (gaps, meta, calls, slice, constants, operationOf, bin
3664
3698
  bindings,
3665
3699
  slice.properties,
3666
3700
  slice.methods
3667
- ) : void 0) ?? (0, import_codegen51.validateScreenEmits)(
3701
+ ) : void 0) ?? (0, import_codegen52.validateScreenEmits)(
3668
3702
  meta.outputs ?? {},
3669
3703
  call.emits ?? [],
3670
3704
  "void",
@@ -3688,11 +3722,11 @@ var collectAutoCallGaps = (gaps, meta, calls, slice, constants, operationOf, bin
3688
3722
  var collectMethodGaps = (gaps, scope) => {
3689
3723
  Object.values(scope.features).forEach((feature) => {
3690
3724
  const screen = scope.screens.find(
3691
- ({ meta }) => (0, import_codegen51.isFeatureScreen)(meta) && meta.featureId === feature.id
3725
+ ({ meta }) => (0, import_codegen52.isFeatureScreen)(meta) && meta.featureId === feature.id
3692
3726
  )?.meta;
3693
3727
  const functions = { ...scope.functions, ...feature.functions ?? {} };
3694
- (0, import_codegen51.storesOf)(feature).forEach((owned) => {
3695
- const readable = (0, import_codegen51.readableMembers)(feature, owned.owner);
3728
+ (0, import_codegen52.storesOf)(feature).forEach((owned) => {
3729
+ const readable = (0, import_codegen52.readableMembers)(feature, owned.owner);
3696
3730
  Object.values(owned.methods).forEach((method) => {
3697
3731
  const error = storeMethodError(method, {
3698
3732
  operationOf: scope.operationOf,
@@ -3718,22 +3752,22 @@ var collectMethodGaps = (gaps, scope) => {
3718
3752
  var collectResponseGaps = (gaps, scope) => {
3719
3753
  Object.values(scope.features).forEach((feature) => {
3720
3754
  const screen = scope.screens.find(
3721
- ({ meta }) => (0, import_codegen51.isFeatureScreen)(meta) && meta.featureId === feature.id
3755
+ ({ meta }) => (0, import_codegen52.isFeatureScreen)(meta) && meta.featureId === feature.id
3722
3756
  )?.meta;
3723
- (0, import_codegen51.storesOf)(feature).forEach((owned) => {
3724
- const readable = (0, import_codegen51.readableMembers)(feature, owned.owner);
3757
+ (0, import_codegen52.storesOf)(feature).forEach((owned) => {
3758
+ const readable = (0, import_codegen52.readableMembers)(feature, owned.owner);
3725
3759
  Object.values(owned.methods).forEach((method) => {
3726
3760
  const read = scope.operationOf(method);
3727
3761
  if (!read) return;
3728
- const emitted = (0, import_codegen51.emittedOperation)(read, feature.shapes);
3729
- const roots = (0, import_codegen51.propertiesWithComputeds)(
3762
+ const emitted = (0, import_codegen52.emittedOperation)(read, feature.shapes);
3763
+ const roots = (0, import_codegen52.propertiesWithComputeds)(
3730
3764
  readable.properties,
3731
3765
  readable.computeds,
3732
3766
  feature.functions ?? {}
3733
3767
  );
3734
3768
  const judge = (mapping, op) => {
3735
3769
  if (mapping.transform) {
3736
- const failure = (0, import_codegen51.outcomeTransformFailure)(
3770
+ const failure = (0, import_codegen52.outcomeTransformFailure)(
3737
3771
  mapping,
3738
3772
  method,
3739
3773
  op,
@@ -3744,7 +3778,7 @@ var collectResponseGaps = (gaps, scope) => {
3744
3778
  );
3745
3779
  return failure && { err: failure.error, ...failure };
3746
3780
  }
3747
- const err = (0, import_codegen51.responseMappingError)(
3781
+ const err = (0, import_codegen52.responseMappingError)(
3748
3782
  mapping,
3749
3783
  op,
3750
3784
  readable.properties,
@@ -3752,7 +3786,7 @@ var collectResponseGaps = (gaps, scope) => {
3752
3786
  );
3753
3787
  return err && {
3754
3788
  err,
3755
- detail: (0, import_codegen51.responseMappingDetail)(
3789
+ detail: (0, import_codegen52.responseMappingDetail)(
3756
3790
  mapping,
3757
3791
  op,
3758
3792
  readable.properties,
@@ -3784,20 +3818,20 @@ var collectResponseGaps = (gaps, scope) => {
3784
3818
  var collectShadowedShapeGaps = (gaps, scope) => {
3785
3819
  Object.values(scope.features).forEach((feature) => {
3786
3820
  const screen = scope.screens.find(
3787
- ({ meta }) => (0, import_codegen51.isFeatureScreen)(meta) && meta.featureId === feature.id
3821
+ ({ meta }) => (0, import_codegen52.isFeatureScreen)(meta) && meta.featureId === feature.id
3788
3822
  )?.meta;
3789
- const reads = (0, import_codegen51.storesOf)(feature).flatMap(
3823
+ const reads = (0, import_codegen52.storesOf)(feature).flatMap(
3790
3824
  (owned) => Object.values(owned.methods).flatMap((method) => {
3791
3825
  const op = scope.operationOf(method);
3792
3826
  return op ? [{ method, op }] : [];
3793
3827
  })
3794
3828
  );
3795
- (0, import_codegen51.shadowedShapes)(
3829
+ (0, import_codegen52.shadowedShapes)(
3796
3830
  reads.map(({ op }) => op),
3797
3831
  feature.shapes
3798
3832
  ).forEach((shadow) => {
3799
3833
  const first = reads.find(
3800
- ({ op }) => (0, import_codegen51.shadowedShapes)([op], feature.shapes).some(
3834
+ ({ op }) => (0, import_codegen52.shadowedShapes)([op], feature.shapes).some(
3801
3835
  (row) => row.shapeId === shadow.shapeId
3802
3836
  )
3803
3837
  );
@@ -3820,7 +3854,7 @@ var collectNavInstanceGaps = (gaps, scope) => {
3820
3854
  Object.values(navMap).filter((nav) => nav.presentation === "dynamic" && !!nav.instanceSource).forEach((nav) => {
3821
3855
  const source = nav.instanceSource;
3822
3856
  if (!source?.featureId) return;
3823
- const subject = `${nav.navId} \xB7 :${(0, import_codegen51.navParam)(nav)}`;
3857
+ const subject = `${nav.navId} \xB7 :${(0, import_codegen52.navParam)(nav)}`;
3824
3858
  const push = (message, detail) => {
3825
3859
  gaps.push({
3826
3860
  kind: "nav-instance",
@@ -3837,9 +3871,9 @@ var collectNavInstanceGaps = (gaps, scope) => {
3837
3871
  if (!source.functionId) return push("instance-resolver-unbound");
3838
3872
  const fn = feature.functions?.[source.functionId];
3839
3873
  if (!fn) return push("instance-resolver-function-gone");
3840
- if (!(0, import_codegen51.navInstanceReturn)(fn, feature))
3874
+ if (!(0, import_codegen52.navInstanceReturn)(fn, feature))
3841
3875
  return push("instance-resolver-return-unfit", fn.name);
3842
- const unmapped = (0, import_codegen51.unmappedParams)(fn, source.args);
3876
+ const unmapped = (0, import_codegen52.unmappedParams)(fn, source.args);
3843
3877
  if (unmapped.length)
3844
3878
  push("instance-resolver-args-unmapped", unmapped.join(", "));
3845
3879
  });
@@ -3866,15 +3900,15 @@ var collectEmitGaps = (scope) => {
3866
3900
  Object.values(state.controlMap).forEach((control) => {
3867
3901
  Object.keys(control.outputArms ?? {}).forEach((output) => {
3868
3902
  if (!offersOutputKey(control, state.controlMap, output, embedded)) return;
3869
- (0, import_codegen51.outputArms)(control, output).forEach((arm, index) => {
3870
- if ((0, import_codegen51.isOutputArmComplete)(arm)) return;
3903
+ (0, import_codegen52.outputArms)(control, output).forEach((arm, index) => {
3904
+ if ((0, import_codegen52.isOutputArmComplete)(arm)) return;
3871
3905
  gaps.push({
3872
3906
  kind: "binding",
3873
3907
  screenId: meta.id,
3874
3908
  screenName: meta.name,
3875
3909
  subject: `${meta.name} \xB7 ${controlLabel(control)} \xB7 ${output} ${index + 1}`,
3876
3910
  controlId: control.id,
3877
- slot: (0, import_codegen51.outputArmKey)(output, arm.id),
3911
+ slot: (0, import_codegen52.outputArmKey)(output, arm.id),
3878
3912
  message: arm.checks.length ? "Finish this arm condition \u2014 a check is missing its subject, operator or value." : "Give this arm a condition, or it never runs."
3879
3913
  });
3880
3914
  });
@@ -3887,11 +3921,11 @@ var collectEmitGaps = (scope) => {
3887
3921
  ]);
3888
3922
  outputs.forEach((output) => {
3889
3923
  if (!offersOutputKey(control, state.controlMap, output, embedded)) return;
3890
- const message = (0, import_codegen51.validateOutputNewTab)(
3891
- (0, import_codegen51.outputNewTabOf)(control.outputNewTabs, output),
3924
+ const message = (0, import_codegen52.validateOutputNewTab)(
3925
+ (0, import_codegen52.outputNewTabOf)(control.outputNewTabs, output),
3892
3926
  slice.functions
3893
- ) ?? (scope.navMap ? (0, import_codegen51.validateOutputNav)(
3894
- (0, import_codegen51.outputNavOf)(control.outputNavs, output),
3927
+ ) ?? (scope.navMap ? (0, import_codegen52.validateOutputNav)(
3928
+ (0, import_codegen52.outputNavOf)(control.outputNavs, output),
3895
3929
  scope.navMap
3896
3930
  ) : void 0);
3897
3931
  if (!message) return;
@@ -3907,9 +3941,9 @@ var collectEmitGaps = (scope) => {
3907
3941
  });
3908
3942
  });
3909
3943
  Object.values(state.controlMap).forEach((control) => {
3910
- if (control.type !== import_codegen51.ControlType.CONTEXT_MENU) return;
3944
+ if (control.type !== import_codegen52.ControlType.CONTEXT_MENU) return;
3911
3945
  const binding = control.bindings?.["options"];
3912
- const message = binding ? (0, import_codegen51.bindingGapReason)(binding, {
3946
+ const message = binding ? (0, import_codegen52.bindingGapReason)(binding, {
3913
3947
  properties: slice.roots,
3914
3948
  shapes: slice.shapes,
3915
3949
  computeds: slice.computeds,
@@ -3921,7 +3955,7 @@ var collectEmitGaps = (scope) => {
3921
3955
  constants: meta.constants,
3922
3956
  storeProp: "store",
3923
3957
  controlMap: state.controlMap
3924
- }) : (0, import_codegen51.menuOptionsOf)(control).some((group) => group.length) ? void 0 : "Author menu options or bind a collection.";
3958
+ }) : (0, import_codegen52.menuOptionsOf)(control).some((group) => group.length) ? void 0 : "Author menu options or bind a collection.";
3925
3959
  if (message)
3926
3960
  gaps.push({
3927
3961
  kind: "binding",
@@ -3932,27 +3966,27 @@ var collectEmitGaps = (scope) => {
3932
3966
  slot: "options",
3933
3967
  message
3934
3968
  });
3935
- (0, import_codegen51.menuActionSlots)(control).forEach((slot, index) => {
3936
- if ((0, import_codegen51.isMenuActionSlotComplete)(slot)) return;
3969
+ (0, import_codegen52.menuActionSlots)(control).forEach((slot, index) => {
3970
+ if ((0, import_codegen52.isMenuActionSlotComplete)(slot)) return;
3937
3971
  gaps.push({
3938
3972
  kind: "binding",
3939
3973
  screenId: meta.id,
3940
3974
  screenName: meta.name,
3941
3975
  subject: `${meta.name} \xB7 ${controlLabel(control)} \xB7 action ${index + 1}`,
3942
3976
  controlId: control.id,
3943
- slot: (0, import_codegen51.menuActionKey)(slot.id),
3977
+ slot: (0, import_codegen52.menuActionKey)(slot.id),
3944
3978
  message: slot.checks.length ? "Finish this action condition \u2014 a check is missing its operator or value." : "Give this action a condition, or it fires for nothing."
3945
3979
  });
3946
3980
  });
3947
3981
  if (binding) return;
3948
- (0, import_codegen51.staleMenuActionItems)(control).forEach(
3982
+ (0, import_codegen52.staleMenuActionItems)(control).forEach(
3949
3983
  ({ slotId, itemId }) => gaps.push({
3950
3984
  kind: "binding",
3951
3985
  screenId: meta.id,
3952
3986
  screenName: meta.name,
3953
3987
  subject: `${meta.name} \xB7 ${controlLabel(control)} \xB7 ${itemId}`,
3954
3988
  controlId: control.id,
3955
- slot: (0, import_codegen51.menuActionKey)(slotId),
3989
+ slot: (0, import_codegen52.menuActionKey)(slotId),
3956
3990
  message: "This menu no longer holds the item this action is gated on."
3957
3991
  })
3958
3992
  );
@@ -4013,6 +4047,7 @@ var INVARIANTS = [
4013
4047
  filterGroupSqueezeOrphan,
4014
4048
  contextGroupPrimaryUnique,
4015
4049
  functionCaseArgs,
4050
+ outcomeTransformSelfFold,
4016
4051
  handBindingResolves,
4017
4052
  handRequiredInputBound,
4018
4053
  handScreenResolves,
@@ -4054,11 +4089,11 @@ var runInvariants = (scope) => INVARIANTS.flatMap((invariant) => invariant.run(s
4054
4089
  var invariantScopeOf = (source, themeCatalog) => ({
4055
4090
  appTarget: source.appTarget,
4056
4091
  wcConfig: source.wcConfig,
4057
- features: (0, import_codegen52.featuresAsRead)(
4092
+ features: (0, import_codegen53.featuresAsRead)(
4058
4093
  source.features,
4059
4094
  source.sharedShapes,
4060
4095
  source.screens.map(({ meta, state }) => ({
4061
- ...(0, import_codegen52.isFeatureScreen)(meta) ? { featureId: meta.featureId } : {},
4096
+ ...(0, import_codegen53.isFeatureScreen)(meta) ? { featureId: meta.featureId } : {},
4062
4097
  controlMap: state.controlMap
4063
4098
  }))
4064
4099
  ),