@hyperfixi/core 2.9.4 → 2.10.0

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 (91) hide show
  1. package/dist/ast-utils/index.js +295 -85
  2. package/dist/ast-utils/index.mjs +295 -85
  3. package/dist/chunks/{bridge-DhmZ3Khh.js → bridge-CPNAPYAo.js} +2 -2
  4. package/dist/chunks/browser-modular-B0lGdcoP.js +2 -0
  5. package/dist/chunks/{index-DKrx4rv2.js → index-BQkkNlzO.js} +2 -2
  6. package/dist/commands/advanced/async.d.ts +0 -8
  7. package/dist/commands/advanced/js.d.ts +0 -8
  8. package/dist/commands/animation/measure.d.ts +0 -8
  9. package/dist/commands/animation/settle.d.ts +0 -8
  10. package/dist/commands/animation/start-view-transition.d.ts +0 -8
  11. package/dist/commands/animation/take.d.ts +0 -8
  12. package/dist/commands/animation/transition.d.ts +0 -8
  13. package/dist/commands/async/fetch.d.ts +0 -8
  14. package/dist/commands/async/wait.d.ts +0 -8
  15. package/dist/commands/behaviors/install.d.ts +0 -8
  16. package/dist/commands/content/append.d.ts +0 -8
  17. package/dist/commands/content/prepend.d.ts +0 -8
  18. package/dist/commands/control-flow/break.d.ts +0 -8
  19. package/dist/commands/control-flow/continue.d.ts +0 -8
  20. package/dist/commands/control-flow/exit.d.ts +0 -8
  21. package/dist/commands/control-flow/halt.d.ts +0 -8
  22. package/dist/commands/control-flow/if.d.ts +0 -8
  23. package/dist/commands/control-flow/repeat.d.ts +0 -8
  24. package/dist/commands/control-flow/return.d.ts +0 -8
  25. package/dist/commands/control-flow/throw.d.ts +0 -8
  26. package/dist/commands/data/clear.d.ts +0 -8
  27. package/dist/commands/data/default.d.ts +0 -8
  28. package/dist/commands/data/get.d.ts +0 -8
  29. package/dist/commands/data/increment.d.ts +0 -8
  30. package/dist/commands/data/set.d.ts +0 -8
  31. package/dist/commands/decorators/index.d.ts +2 -8
  32. package/dist/commands/dom/add.d.ts +0 -8
  33. package/dist/commands/dom/close.d.ts +0 -8
  34. package/dist/commands/dom/empty.d.ts +0 -8
  35. package/dist/commands/dom/hide.d.ts +0 -8
  36. package/dist/commands/dom/make.d.ts +0 -8
  37. package/dist/commands/dom/open.d.ts +0 -8
  38. package/dist/commands/dom/process-partials.d.ts +0 -8
  39. package/dist/commands/dom/put.d.ts +0 -8
  40. package/dist/commands/dom/remove.d.ts +0 -8
  41. package/dist/commands/dom/reset.d.ts +0 -8
  42. package/dist/commands/dom/select.d.ts +0 -8
  43. package/dist/commands/dom/show.d.ts +0 -8
  44. package/dist/commands/dom/swap.d.ts +2 -18
  45. package/dist/commands/dom/toggle.d.ts +0 -8
  46. package/dist/commands/events/trigger.d.ts +0 -8
  47. package/dist/commands/execution/blur.d.ts +0 -8
  48. package/dist/commands/execution/call.d.ts +0 -8
  49. package/dist/commands/execution/focus.d.ts +0 -8
  50. package/dist/commands/execution/pseudo-command.d.ts +0 -8
  51. package/dist/commands/index.js +82 -23
  52. package/dist/commands/index.mjs +82 -23
  53. package/dist/commands/navigation/go.d.ts +0 -8
  54. package/dist/commands/navigation/push-url.d.ts +0 -8
  55. package/dist/commands/navigation/scroll-to.d.ts +0 -8
  56. package/dist/commands/templates/render.d.ts +0 -8
  57. package/dist/commands/utility/beep.d.ts +0 -8
  58. package/dist/commands/utility/breakpoint.d.ts +0 -8
  59. package/dist/commands/utility/copy.d.ts +0 -8
  60. package/dist/commands/utility/log.d.ts +0 -8
  61. package/dist/commands/utility/pick.d.ts +0 -8
  62. package/dist/commands/utility/tell.d.ts +0 -8
  63. package/dist/hyperfixi-browser-classic-i18n.js +1 -1
  64. package/dist/hyperfixi-browser-minimal.js +1 -1
  65. package/dist/hyperfixi-browser-standard.js +1 -1
  66. package/dist/hyperfixi-browser.js +1 -1
  67. package/dist/hyperfixi-classic-i18n.js +1 -1
  68. package/dist/hyperfixi-hx-v4.js +1 -1
  69. package/dist/hyperfixi-minimal.js +1 -1
  70. package/dist/hyperfixi-multilingual.js +1 -1
  71. package/dist/hyperfixi-standard.js +1 -1
  72. package/dist/hyperfixi.js +1 -1
  73. package/dist/hyperfixi.mjs +1 -1
  74. package/dist/index.js +441 -143
  75. package/dist/index.min.js +1 -1
  76. package/dist/index.mjs +441 -143
  77. package/dist/lokascript-browser-classic-i18n.js +1 -1
  78. package/dist/lokascript-browser-minimal.js +1 -1
  79. package/dist/lokascript-browser-standard.js +1 -1
  80. package/dist/lokascript-browser.js +1 -1
  81. package/dist/lokascript-multilingual.js +1 -1
  82. package/dist/parser/command-parsers/dom-commands.d.ts +1 -0
  83. package/dist/parser/full-parser.js +47 -1
  84. package/dist/parser/full-parser.mjs +47 -1
  85. package/dist/reference/index.js +6 -5
  86. package/dist/reference/index.mjs +6 -5
  87. package/dist/registry/index.js +50 -6
  88. package/dist/registry/index.mjs +50 -6
  89. package/dist/runtime/command-adapter.d.ts +8 -8
  90. package/package.json +5 -5
  91. package/dist/chunks/browser-modular-BllAMlht.js +0 -2
@@ -5504,7 +5504,7 @@ function getSchema(action) {
5504
5504
  function getDefinedSchemas() {
5505
5505
  return Object.values(commandSchemas).filter((s) => s.roles.length > 0 || s.bareKeyword === true);
5506
5506
  }
5507
- var toggleSchema, addSchema, removeSchema, putSchema, setSchema, bindSchema, liveSchema, eventsourceSchema, socketSchema, workerSchema, interceptSchema, showSchema, hideSchema, onSchema, triggerSchema, waitSchema, fetchSchema, incrementSchema, decrementSchema, appendSchema, prependSchema, logSchema, getCommandSchema, takeSchema, makeSchema, haltSchema, settleSchema, throwSchema, sendSchema, ifSchema, unlessSchema, elseSchema, repeatSchema, forSchema, whileSchema, continueSchema, URL_MARKER_ALL_LANGS, goSchema, transitionSchema, cloneSchema, focusSchema, blurSchema, emptySchema, openSchema, closeSchema, selectSchema, clearSchema, resetSchema, breakpointSchema, callSchema, returnSchema, jsSchema, asyncSchema, tellSchema, defaultSchema, initSchema, behaviorSchema, installSchema, measureSchema, swapSchema, morphSchema, beepSchema, breakSchema, copySchema, exitSchema, pickSchema, scrollSchema, PARTIALS_IN_MARKER_ALL_LANGS, pushSchema, replaceSchema, processSchema, renderSchema, commandSchemas;
5507
+ var toggleSchema, addSchema, removeSchema, putSchema, setSchema, bindSchema, liveSchema, eventsourceSchema, socketSchema, workerSchema, interceptSchema, showSchema, hideSchema, onSchema, triggerSchema, waitSchema, fetchSchema, incrementSchema, decrementSchema, appendSchema, prependSchema, logSchema, getCommandSchema, takeSchema, makeSchema, haltSchema, settleSchema, throwSchema, sendSchema, ifSchema, unlessSchema, elseSchema, repeatSchema, forSchema, whileSchema, continueSchema, URL_MARKER_ALL_LANGS, goSchema, transitionSchema, cloneSchema, focusSchema, blurSchema, emptySchema, openSchema, closeSchema, selectSchema, clearSchema, resetSchema, breakpointSchema, callSchema, returnSchema, jsSchema, asyncSchema, tellSchema, defaultSchema, initSchema, behaviorSchema, installSchema, measureSchema, USING_VIEW_MARKER_ALL_LANGS, VIEW_TRANSITION_MANNER_ROLE, swapSchema, morphSchema, beepSchema, breakSchema, copySchema, exitSchema, pickSchema, scrollSchema, PARTIALS_IN_MARKER_ALL_LANGS, pushSchema, replaceSchema, processSchema, renderSchema, commandSchemas;
5508
5508
  var init_command_schemas = __esm({
5509
5509
  "src/generators/command-schemas.ts"() {
5510
5510
  toggleSchema = {
@@ -5513,7 +5513,6 @@ var init_command_schemas = __esm({
5513
5513
  category: "dom-class",
5514
5514
  primaryRole: "patient",
5515
5515
  // `toggle .active on #btn for 2s` \u2192 args ['.active'], modifiers { on, for }.
5516
- // NOTE: `duration` is read here but not declared in `roles` below.
5517
5516
  ast: { args: ["patient"], modifiers: { on: "destination", for: "duration" } },
5518
5517
  roles: [
5519
5518
  {
@@ -6604,8 +6603,8 @@ var init_command_schemas = __esm({
6604
6603
  description: "Take content from a source element",
6605
6604
  category: "dom-content",
6606
6605
  primaryRole: "patient",
6607
- // `take .active from #parent` \u2192 args ['.active'], modifiers { from: '#parent' }.
6608
- ast: { args: ["patient"], modifiers: { from: "source" } },
6606
+ // `take .active from #parent for me` \u2192 args ['.active'], modifiers { from, for }.
6607
+ ast: { args: ["patient"], modifiers: { from: "source", for: "recipient" } },
6609
6608
  roles: [
6610
6609
  {
6611
6610
  role: "patient",
@@ -6628,6 +6627,38 @@ var init_command_schemas = __esm({
6628
6627
  expectedTypes: ["selector", "reference"],
6629
6628
  svoPosition: 2,
6630
6629
  sovPosition: 1
6630
+ },
6631
+ {
6632
+ role: "recipient",
6633
+ description: "The element the class moves ONTO (`take .active from .tab for me`)",
6634
+ required: false,
6635
+ // References only, deliberately. Upstream accepts an element expression,
6636
+ // but the 23 non-en corpus surfaces carry the recipient as a BARE
6637
+ // trailing pronoun (i18n renders `\u2026 von .tab-button ich`), so this slot
6638
+ // is marker-less almost everywhere and a selector-typed slot would
6639
+ // swallow the second selector of `take .active from .a .b`. English is
6640
+ // unaffected: `take` is on the core parser's skipSemanticParsing list,
6641
+ // so the traditional parser owns `for <anything>` there.
6642
+ expectedTypes: ["reference"],
6643
+ svoPosition: 3,
6644
+ sovPosition: 3,
6645
+ // NO default. The runtime already defaults the recipient to `me`
6646
+ // (commands/animation/take.ts), and a schema default would emit an
6647
+ // explicit `for me` modifier on every take \u2014 re-smuggling the exact
6648
+ // "absent means absent" semantics #859 removed from `source`.
6649
+ //
6650
+ // Shape-anchored on `reference`: without it this optional slot weighs
6651
+ // into every take pattern's denominator in `scoreRoleCoverage`, dropping
6652
+ // plain `take .active from .tab-button` from 1.0 to ~0.69 \u2014 the toggle-es
6653
+ // regression class the R1 role-set flip ratchet exists to catch.
6654
+ valueShape: "reference",
6655
+ // en only. The other 23 languages render the recipient unmarked, so a
6656
+ // marker there would never match their corpus rows; where the marker-less
6657
+ // slot proves inert they stay uncaptured and the pattern lands in the
6658
+ // baseline's `roleLossyPatterns` as named R1 burn-down tail. A language
6659
+ // gets a real particle here ONLY if the empty slot perturbs its other
6660
+ // parses (toggle's ja \u9593 / ko \ub3d9\uc548 case).
6661
+ markerOverride: { en: "for" }
6631
6662
  }
6632
6663
  ]
6633
6664
  };
@@ -7692,6 +7723,47 @@ var init_command_schemas = __esm({
7692
7723
  }
7693
7724
  ]
7694
7725
  };
7726
+ USING_VIEW_MARKER_ALL_LANGS = {
7727
+ en: "using view",
7728
+ es: "using view",
7729
+ pt: "using view",
7730
+ fr: "using view",
7731
+ de: "using view",
7732
+ it: "using view",
7733
+ ja: "using view",
7734
+ ko: "using view",
7735
+ zh: "using view",
7736
+ ar: "using view",
7737
+ he: "using view",
7738
+ hi: "using view",
7739
+ bn: "using view",
7740
+ tr: "using view",
7741
+ ru: "using view",
7742
+ uk: "using view",
7743
+ pl: "using view",
7744
+ id: "using view",
7745
+ vi: "using view",
7746
+ th: "using view",
7747
+ ms: "using view",
7748
+ tl: "using view",
7749
+ sw: "using view",
7750
+ qu: "using view"
7751
+ };
7752
+ VIEW_TRANSITION_MANNER_ROLE = {
7753
+ role: "manner",
7754
+ description: "Run the swap inside a `document.startViewTransition()` (`using view transition`)",
7755
+ required: false,
7756
+ // Both types, because the SAME word tokenizes differently per language and
7757
+ // the difference is an accident of vocabulary: `transition` is a command
7758
+ // keyword in en/fr (it is also their verb) and a bare identifier everywhere
7759
+ // else, which types it `literal` in the first group and `expression` in the
7760
+ // second. Measured: with `['literal']` alone only en and fr captured the
7761
+ // tail. Widening is safe precisely because the slot is marker-guarded \u2014
7762
+ // nothing reaches it until `using view` has matched.
7763
+ expectedTypes: ["literal", "expression"],
7764
+ valueShape: "keyword",
7765
+ markerOverride: USING_VIEW_MARKER_ALL_LANGS
7766
+ };
7695
7767
  swapSchema = {
7696
7768
  action: "swap",
7697
7769
  description: "Swap DOM content using various strategies (innerHTML, outerHTML, delete, etc.)",
@@ -7712,7 +7784,11 @@ var init_command_schemas = __esm({
7712
7784
  // work. Preserved verbatim by the Arc F migration (a faithful migration must
7713
7785
  // not change output) and pinned as two `drift` exemptions; this is the
7714
7786
  // behavior fix those entries were waiting for.
7715
- ast: { args: ["method", "destination", "patient"] },
7787
+ //
7788
+ // `manner` is the exception to "keyword-positional args": it rides as
7789
+ // `modifiers.viewTransition`, which SwapCommand.parseInput reads for presence
7790
+ // alongside its existing flat-args `using`/`view`/`transition` scan.
7791
+ ast: { args: ["method", "destination", "patient"], modifiers: { viewTransition: "manner" } },
7716
7792
  roles: [
7717
7793
  {
7718
7794
  role: "method",
@@ -7807,6 +7883,11 @@ var init_command_schemas = __esm({
7807
7883
  ar: "\u0628\u0640",
7808
7884
  tl: "nang"
7809
7885
  }
7886
+ },
7887
+ {
7888
+ ...VIEW_TRANSITION_MANNER_ROLE,
7889
+ svoPosition: 4,
7890
+ sovPosition: 4
7810
7891
  }
7811
7892
  ]
7812
7893
  };
@@ -7817,7 +7898,15 @@ var init_command_schemas = __esm({
7817
7898
  primaryRole: "patient",
7818
7899
  // `morph #list to it` \u2192 args [content], modifiers { on: element }.
7819
7900
  // Content is source or destination; the element being morphed is the patient.
7820
- ast: { args: [["source", "destination"]], modifiers: { on: "patient" } },
7901
+ //
7902
+ // `manner` rides as `modifiers.viewTransition`, same as swap/process \u2014
7903
+ // MorphCommand.parseInput reads it for presence alongside its existing
7904
+ // flat-args `using`/`view`/`transition` scan (the traditional-parser path,
7905
+ // which owns English because morph sits on SKIP_SEMANTIC_COMMANDS).
7906
+ ast: {
7907
+ args: [["source", "destination"]],
7908
+ modifiers: { on: "patient", viewTransition: "manner" }
7909
+ },
7821
7910
  roles: [
7822
7911
  {
7823
7912
  role: "patient",
@@ -7838,6 +7927,18 @@ var init_command_schemas = __esm({
7838
7927
  sovPosition: 2,
7839
7928
  markerOverride: { en: "to" }
7840
7929
  // "morph #target to it"
7930
+ },
7931
+ {
7932
+ // `morph #target to it using view transition` \u2014 the same tail as swap and
7933
+ // process, closed here for the same reason (#870's third-schema filing):
7934
+ // without the role the semantic parser matched morph at confidence 1.0
7935
+ // and stranded the tail, so every semantic-only consumer (multilingual
7936
+ // bundles, the bridge, `translate()`) silently dropped the animation
7937
+ // request in all 24 languages. Morph has NO hand-written patterns in any
7938
+ // language, so this schema role is the whole fix on the pattern side.
7939
+ ...VIEW_TRANSITION_MANNER_ROLE,
7940
+ svoPosition: 3,
7941
+ sovPosition: 3
7841
7942
  }
7842
7943
  ]
7843
7944
  };
@@ -8024,6 +8125,13 @@ var init_command_schemas = __esm({
8024
8125
  description: "Process hx-partial markup in HTML content",
8025
8126
  category: "dom-content",
8026
8127
  primaryRole: "patient",
8128
+ // `process partials in it` \u2192 args ['it']; the optional tail rides as
8129
+ // `modifiers.viewTransition`, which ProcessPartialsCommand.parseInput has
8130
+ // read since #861 (`raw.modifiers?.viewTransition !== undefined`). Without a
8131
+ // descriptor this schema fell through to `buildGenericCommand`, whose
8132
+ // modifier list is fixed (destination/duration/method/style) and would have
8133
+ // dropped a captured `manner` on the floor.
8134
+ ast: { args: ["patient"], modifiers: { viewTransition: "manner" } },
8027
8135
  roles: [
8028
8136
  {
8029
8137
  role: "patient",
@@ -8033,6 +8141,11 @@ var init_command_schemas = __esm({
8033
8141
  svoPosition: 1,
8034
8142
  sovPosition: 1,
8035
8143
  markerOverride: PARTIALS_IN_MARKER_ALL_LANGS
8144
+ },
8145
+ {
8146
+ ...VIEW_TRANSITION_MANNER_ROLE,
8147
+ svoPosition: 2,
8148
+ sovPosition: 2
8036
8149
  }
8037
8150
  ]
8038
8151
  };
@@ -9488,7 +9601,9 @@ var init_french = __esm({
9488
9601
  trigger: { primary: "d\xE9clencher", normalized: "trigger" },
9489
9602
  send: { primary: "envoyer", alternatives: ["envoie"], normalized: "send" },
9490
9603
  focus: { primary: "focaliser", alternatives: ["concentrer"], normalized: "focus" },
9491
- blur: { primary: "d\xE9focaliser", normalized: "blur" },
9604
+ // `d\u00e9focaliser` is an unattested infinitive; French pedagogy writes
9605
+ // `perte de focus` for the event (2026-07 terminology review).
9606
+ blur: { primary: "perte de focus", alternatives: ["d\xE9focaliser"], normalized: "blur" },
9492
9607
  // Phase 1 (v0.9.90): DOM / form state / debug
9493
9608
  // `vide` (adjective, "empty") is the i18n transformer's `is empty` predicate
9494
9609
  // form; `vider` is the verb ("to empty"). Accept both so the emptiness check
@@ -9501,7 +9616,13 @@ var init_french = __esm({
9501
9616
  reset: { primary: "r\xE9initialiser", alternatives: ["reinitialiser"], normalized: "reset" },
9502
9617
  breakpoint: { primary: "point-arr\xEAt", alternatives: ["point-arret"], normalized: "breakpoint" },
9503
9618
  go: { primary: "aller", alternatives: ["naviguer", "va"], normalized: "go" },
9504
- scroll: { primary: "d\xE9filer", alternatives: ["faire-d\xE9filer"], normalized: "scroll" },
9619
+ // MDN fr and the OQLF standardize the noun `d\u00e9filement` for the event; the
9620
+ // infinitive stays as an alternative.
9621
+ scroll: {
9622
+ primary: "d\xE9filement",
9623
+ alternatives: ["defilement", "d\xE9filer", "faire-d\xE9filer"],
9624
+ normalized: "scroll"
9625
+ },
9505
9626
  push: { primary: "pousser", normalized: "push" },
9506
9627
  replace: { primary: "remplacer", normalized: "replace" },
9507
9628
  process: { primary: "traiter", normalized: "process" },
@@ -9567,9 +9688,15 @@ var init_french = __esm({
9567
9688
  after: { primary: "apr\xE8s", normalized: "after" },
9568
9689
  // Common event names (for event handler patterns)
9569
9690
  click: { primary: "clic", alternatives: ["clique"], normalized: "click" },
9570
- // `resize` event (window-resize): dict emits redimensionner; register it so the
9571
- // event types as literal="resize" (matching en) instead of expression.
9572
- resize: { primary: "redimensionner", normalized: "resize" },
9691
+ // `resize` event (window-resize): the noun `redimensionnement` is the
9692
+ // attested event form ("lors du redimensionnement de la fen\u00eatre"). The dict
9693
+ // still emits redimensionner, kept as an alternative so the event keeps
9694
+ // typing as literal="resize" (matching en) instead of expression.
9695
+ resize: {
9696
+ primary: "redimensionnement",
9697
+ alternatives: ["redimensionner"],
9698
+ normalized: "resize"
9699
+ },
9573
9700
  hover: { primary: "survol", alternatives: ["survoler"], normalized: "hover" },
9574
9701
  submit: { primary: "soumission", alternatives: ["soumettre"], normalized: "submit" },
9575
9702
  input: { primary: "saisie", alternatives: ["entr\xE9e"], normalized: "input" },
@@ -13352,9 +13479,17 @@ var init_turkish = __esm({
13352
13479
  on: { primary: "\xFCzerinde", alternatives: ["zaman"], normalized: "on" },
13353
13480
  trigger: { primary: "tetikle", normalized: "trigger" },
13354
13481
  send: { primary: "g\xF6nder", normalized: "send" },
13355
- // DOM focus
13356
- focus: { primary: "odak", alternatives: ["odaklanma"], normalized: "focus" },
13357
- blur: { primary: "bulan\u0131k", alternatives: ["bulan\u0131kl\u0131k", "bulanik"], normalized: "blur" },
13482
+ // DOM focus. `odaklanma` (the act of focusing) leads over the static state
13483
+ // noun `odak` \u2014 Turkish event prose says "odaklanma olay\u0131". `bulan\u0131k` was
13484
+ // the optical blur (CSS filters, image processing), never the DOM event;
13485
+ // native usage is `odak kayb\u0131` (loss of focus). 2026-07 terminology-review
13486
+ // corrections; old forms stay as parse alternatives.
13487
+ focus: { primary: "odaklanma", alternatives: ["odak"], normalized: "focus" },
13488
+ blur: {
13489
+ primary: "odak kayb\u0131",
13490
+ alternatives: ["odak kaybi", "bulan\u0131k", "bulan\u0131kl\u0131k", "bulanik"],
13491
+ normalized: "blur"
13492
+ },
13358
13493
  // Phase 1 (v0.9.90): DOM / form state / debug
13359
13494
  empty: { primary: "bo\u015Falt", alternatives: ["bosalt", "bo\u015F"], normalized: "empty" },
13360
13495
  open: { primary: "a\xE7", alternatives: ["ac"], normalized: "open" },
@@ -13375,7 +13510,9 @@ var init_turkish = __esm({
13375
13510
  },
13376
13511
  hover: { primary: "\xFCzerine gelme", alternatives: ["\xFCzerinde gezinme"], normalized: "hover" },
13377
13512
  submit: { primary: "g\xF6nderme", normalized: "submit" },
13378
- input: { primary: "giri\u015F", alternatives: ["girdi", "giris"], normalized: "input" },
13513
+ // `giri\u015f` reads as entry/login (giri\u015f yapma) and can imply an auth event;
13514
+ // the data-input term is `girdi` ("Girdi (Input) Eventleri").
13515
+ input: { primary: "girdi", alternatives: ["giri\u015F", "giris"], normalized: "input" },
13379
13516
  change: { primary: "de\u011Fi\u015Fiklik", alternatives: ["de\u011Fi\u015Fim", "degisim"], normalized: "change" },
13380
13517
  // `load` event: the i18n dict emits y\u00fckle for `load`. Without this keyword the
13381
13518
  // SOV reorder's mid-stream `y\u00fckle de` (on load) tokenized as the `install`
@@ -13385,7 +13522,13 @@ var init_turkish = __esm({
13385
13522
  load: { primary: "y\xFCkle", normalized: "load" },
13386
13523
  // Navigation
13387
13524
  go: { primary: "git", normalized: "go" },
13388
- scroll: { primary: "kayd\u0131r", alternatives: ["kaydir"], normalized: "scroll" },
13525
+ // `kayd\u0131r` is the bare imperative; the attested event noun is `kayd\u0131rma`
13526
+ // ("kayd\u0131rma olay\u0131"). The imperative stays as an alternative.
13527
+ scroll: {
13528
+ primary: "kayd\u0131rma",
13529
+ alternatives: ["kaydirma", "kayd\u0131r", "kaydir"],
13530
+ normalized: "scroll"
13531
+ },
13389
13532
  push: { primary: "itele", alternatives: ["push"], normalized: "push" },
13390
13533
  replace: { primary: "de\u011Fi\u015Ftir_url", alternatives: ["degistir_url"], normalized: "replace" },
13391
13534
  process: { primary: "i\u015Fle", alternatives: ["isle"], normalized: "process" },
@@ -14338,6 +14481,49 @@ var init_chinese = __esm({
14338
14481
  }
14339
14482
  });
14340
14483
 
14484
+ // src/parser/utils/marker-resolution.ts
14485
+ function resolveMarkerForRole(roleSpec, profile) {
14486
+ const overrideMarker = roleSpec.markerOverride?.[profile.code];
14487
+ const defaultMarker = profile.roleMarkers[roleSpec.role];
14488
+ if (overrideMarker !== void 0) {
14489
+ const alternatives = legacyMarkerAlternatives(roleSpec, profile.code, overrideMarker);
14490
+ return {
14491
+ primary: overrideMarker,
14492
+ ...alternatives && { alternatives },
14493
+ position: defaultMarker?.position ?? "before",
14494
+ isOverride: true
14495
+ };
14496
+ }
14497
+ if (defaultMarker && defaultMarker.primary) {
14498
+ const result = {
14499
+ primary: defaultMarker.primary,
14500
+ position: defaultMarker.position,
14501
+ isOverride: false
14502
+ };
14503
+ if (defaultMarker.alternatives) {
14504
+ result.alternatives = defaultMarker.alternatives;
14505
+ }
14506
+ return result;
14507
+ }
14508
+ return null;
14509
+ }
14510
+ function legacyMarkerAlternatives(roleSpec, languageCode, overrideMarker) {
14511
+ const legacy = roleSpec.markerLegacy?.[languageCode];
14512
+ if (!legacy?.length) return void 0;
14513
+ const alternatives = [...new Set(legacy)].filter((a) => a && a !== overrideMarker);
14514
+ return alternatives.length ? alternatives : void 0;
14515
+ }
14516
+ function schemaMarkerAlternatives(roleSpec, languageCode, marker) {
14517
+ const legacy = roleSpec.markerLegacy?.[languageCode] ?? [];
14518
+ const variants = roleSpec.methodCarrier ? [] : roleSpec.markerVariants?.[languageCode] ?? [];
14519
+ const alternatives = [.../* @__PURE__ */ new Set([...legacy, ...variants])].filter((a) => a && a !== marker);
14520
+ return alternatives.length ? alternatives : void 0;
14521
+ }
14522
+ var init_marker_resolution = __esm({
14523
+ "src/parser/utils/marker-resolution.ts"() {
14524
+ }
14525
+ });
14526
+
14341
14527
  // src/patterns/put.ts
14342
14528
  function getPutPatternsBn() {
14343
14529
  return [
@@ -29137,49 +29323,6 @@ var init_role_positioning = __esm({
29137
29323
  }
29138
29324
  });
29139
29325
 
29140
- // src/parser/utils/marker-resolution.ts
29141
- function resolveMarkerForRole(roleSpec, profile) {
29142
- const overrideMarker = roleSpec.markerOverride?.[profile.code];
29143
- const defaultMarker = profile.roleMarkers[roleSpec.role];
29144
- if (overrideMarker !== void 0) {
29145
- const alternatives = legacyMarkerAlternatives(roleSpec, profile.code, overrideMarker);
29146
- return {
29147
- primary: overrideMarker,
29148
- ...alternatives && { alternatives },
29149
- position: defaultMarker?.position ?? "before",
29150
- isOverride: true
29151
- };
29152
- }
29153
- if (defaultMarker && defaultMarker.primary) {
29154
- const result = {
29155
- primary: defaultMarker.primary,
29156
- position: defaultMarker.position,
29157
- isOverride: false
29158
- };
29159
- if (defaultMarker.alternatives) {
29160
- result.alternatives = defaultMarker.alternatives;
29161
- }
29162
- return result;
29163
- }
29164
- return null;
29165
- }
29166
- function legacyMarkerAlternatives(roleSpec, languageCode, overrideMarker) {
29167
- const legacy = roleSpec.markerLegacy?.[languageCode];
29168
- if (!legacy?.length) return void 0;
29169
- const alternatives = [...new Set(legacy)].filter((a) => a && a !== overrideMarker);
29170
- return alternatives.length ? alternatives : void 0;
29171
- }
29172
- function schemaMarkerAlternatives(roleSpec, languageCode, marker) {
29173
- const legacy = roleSpec.markerLegacy?.[languageCode] ?? [];
29174
- const variants = roleSpec.methodCarrier ? [] : roleSpec.markerVariants?.[languageCode] ?? [];
29175
- const alternatives = [.../* @__PURE__ */ new Set([...legacy, ...variants])].filter((a) => a && a !== marker);
29176
- return alternatives.length ? alternatives : void 0;
29177
- }
29178
- var init_marker_resolution = __esm({
29179
- "src/parser/utils/marker-resolution.ts"() {
29180
- }
29181
- });
29182
-
29183
29326
  // src/generators/event-handlers-sov.ts
29184
29327
  function resolveRoleMarker(roleSpec, profile) {
29185
29328
  let marker;
@@ -29213,6 +29356,43 @@ function appendOptionalScope(tokens, extraction, commandSchema) {
29213
29356
  });
29214
29357
  extraction.scope = { fromRole: "scope" };
29215
29358
  }
29359
+ function appendOptionalViewTransition(tokens, extraction, commandSchema, languageCode) {
29360
+ appendOptionalTailRole(tokens, extraction, commandSchema, languageCode, "manner", {
29361
+ requireMarker: true
29362
+ });
29363
+ }
29364
+ function appendOptionalRecipient(tokens, extraction, commandSchema, languageCode) {
29365
+ appendOptionalTailRole(tokens, extraction, commandSchema, languageCode, "recipient", {
29366
+ requireMarker: false
29367
+ });
29368
+ }
29369
+ function appendOptionalTailRole(tokens, extraction, commandSchema, languageCode, role, opts) {
29370
+ const spec = commandSchema.roles.find((r) => r.role === role && !r.required);
29371
+ if (!spec) return;
29372
+ const marker = spec.markerOverride?.[languageCode];
29373
+ if (opts.requireMarker && !marker) return;
29374
+ tokens.push({
29375
+ type: "group",
29376
+ optional: true,
29377
+ tokens: [
29378
+ ...(marker ? marker.split(/\s+/) : []).map(
29379
+ (word) => ({ type: "literal", value: word })
29380
+ ),
29381
+ {
29382
+ type: "role",
29383
+ role,
29384
+ optional: true,
29385
+ expectedTypes: spec.expectedTypes,
29386
+ // Load-bearing, same as on the generated command patterns: it exempts
29387
+ // the trailing slot from the matcher's verb guard, keeps the uncaptured
29388
+ // slot out of `scoreRoleCoverage`'s denominator, and (for `keyword`)
29389
+ // normalizes the captured value type to the EN reference's `literal`.
29390
+ ...spec.valueShape !== void 0 ? { valueShape: spec.valueShape } : {}
29391
+ }
29392
+ ]
29393
+ });
29394
+ extraction[role] = { fromRole: role };
29395
+ }
29216
29396
  function generateSOVEventHandlerPattern(commandSchema, profile, keyword, eventMarker, config) {
29217
29397
  const tokens = [];
29218
29398
  tokens.push({ type: "role", role: "event", optional: false });
@@ -29307,6 +29487,15 @@ function generateSOVPatientFirstEventHandlerPattern(commandSchema, profile, keyw
29307
29487
  tokens.push(
29308
29488
  ...swapsOperands ? eventHandlerPatientGroup(commandSchema, trailingMarker) : eventHandlerDestinationGroup(commandSchema, trailingMarker)
29309
29489
  );
29490
+ const extraction = {
29491
+ action: { value: commandSchema.action },
29492
+ event: { fromRole: "event" },
29493
+ [frontedRole]: { fromRole: frontedRole },
29494
+ ...swapsOperands ? {} : eventHandlerDestinationExtraction(commandSchema),
29495
+ ...eventHandlerSourceExtraction(commandSchema)
29496
+ };
29497
+ appendOptionalRecipient(tokens, extraction, commandSchema, profile.code);
29498
+ appendOptionalViewTransition(tokens, extraction, commandSchema, profile.code);
29310
29499
  return {
29311
29500
  id: `${commandSchema.action}-event-${profile.code}-sov-patient-first`,
29312
29501
  language: profile.code,
@@ -29316,13 +29505,7 @@ function generateSOVPatientFirstEventHandlerPattern(commandSchema, profile, keyw
29316
29505
  format: `{patient} ${patientMarker?.primary || ""} {event} ${eventMarker.primary} ${keyword.primary}`,
29317
29506
  tokens
29318
29507
  },
29319
- extraction: {
29320
- action: { value: commandSchema.action },
29321
- event: { fromRole: "event" },
29322
- [frontedRole]: { fromRole: frontedRole },
29323
- ...swapsOperands ? {} : eventHandlerDestinationExtraction(commandSchema),
29324
- ...eventHandlerSourceExtraction(commandSchema)
29325
- }
29508
+ extraction
29326
29509
  };
29327
29510
  }
29328
29511
  function generateSOVPatientFirstWithDestEventHandlerPattern(commandSchema, profile, keyword, eventMarker, config) {
@@ -29764,6 +29947,16 @@ function generateVSOVerbFirstEventHandlerPattern(commandSchema, profile, keyword
29764
29947
  });
29765
29948
  }
29766
29949
  }
29950
+ const extraction = {
29951
+ action: { value: commandSchema.action },
29952
+ event: { fromRole: "event" },
29953
+ [swapsOperands ? "destination" : "patient"]: {
29954
+ fromRole: swapsOperands ? "destination" : "patient"
29955
+ },
29956
+ ...swapsOperands ? {} : eventHandlerDestinationExtraction(commandSchema),
29957
+ ...eventHandlerSourceExtraction(commandSchema)
29958
+ };
29959
+ appendOptionalViewTransition(tokens, extraction, commandSchema, profile.code);
29767
29960
  return {
29768
29961
  id: `${commandSchema.action}-event-${profile.code}-vso-verb-first`,
29769
29962
  language: profile.code,
@@ -29774,15 +29967,7 @@ function generateVSOVerbFirstEventHandlerPattern(commandSchema, profile, keyword
29774
29967
  format: `${keyword.primary} {patient} ${destMarker?.primary || ""} {destination?} ${eventMarker.primary} {event}`,
29775
29968
  tokens
29776
29969
  },
29777
- extraction: {
29778
- action: { value: commandSchema.action },
29779
- event: { fromRole: "event" },
29780
- [swapsOperands ? "destination" : "patient"]: {
29781
- fromRole: swapsOperands ? "destination" : "patient"
29782
- },
29783
- ...swapsOperands ? {} : eventHandlerDestinationExtraction(commandSchema),
29784
- ...eventHandlerSourceExtraction(commandSchema)
29785
- }
29970
+ extraction
29786
29971
  };
29787
29972
  }
29788
29973
  function generateVSOVerbFirstTwoRoleEventHandlerPattern(commandSchema, profile, keyword, eventMarker, config) {
@@ -30357,7 +30542,11 @@ function buildRoleToken(roleSpec, profile) {
30357
30542
  type: "role",
30358
30543
  role: roleSpec.role,
30359
30544
  optional: !roleSpec.required,
30360
- expectedTypes: roleSpec.expectedTypes
30545
+ expectedTypes: roleSpec.expectedTypes,
30546
+ // The matcher reads this too \u2014 a `'keyword'`-shaped slot holds a fixed
30547
+ // keyword phrase (`using view transition`) and must not be skipped by the
30548
+ // trailing-slot verb guard.
30549
+ ...roleSpec.valueShape !== void 0 ? { valueShape: roleSpec.valueShape } : {}
30361
30550
  };
30362
30551
  const prefixLiteral = roleSpec.valuePrefixLiteral?.[profile.code];
30363
30552
  const pushPrefixed = () => {
@@ -30638,9 +30827,24 @@ var init_pick = __esm({
30638
30827
  });
30639
30828
 
30640
30829
  // src/patterns/languages/en/swap.ts
30641
- var swapSimpleEnglish, swapElementEnglish, swapStrategyOfEnglish, swapStrategyEnglish, swapPatternsEn;
30830
+ var VIEW_TRANSITION_TAIL, swapSimpleEnglish, swapElementEnglish, swapStrategyOfEnglish, swapStrategyEnglish, swapPatternsEn;
30642
30831
  var init_swap = __esm({
30643
30832
  "src/patterns/languages/en/swap.ts"() {
30833
+ VIEW_TRANSITION_TAIL = {
30834
+ type: "group",
30835
+ optional: true,
30836
+ tokens: [
30837
+ { type: "literal", value: "using" },
30838
+ { type: "literal", value: "view" },
30839
+ {
30840
+ type: "role",
30841
+ role: "manner",
30842
+ optional: true,
30843
+ expectedTypes: ["literal", "expression"],
30844
+ valueShape: "keyword"
30845
+ }
30846
+ ]
30847
+ };
30644
30848
  swapSimpleEnglish = {
30645
30849
  id: "swap-en-handcrafted",
30646
30850
  language: "en",
@@ -30648,11 +30852,12 @@ var init_swap = __esm({
30648
30852
  priority: 110,
30649
30853
  // Higher than generated patterns
30650
30854
  template: {
30651
- format: "swap {method} {destination}",
30855
+ format: "swap {method} {destination} [using view {manner}]",
30652
30856
  tokens: [
30653
30857
  { type: "literal", value: "swap" },
30654
30858
  { type: "role", role: "method" },
30655
- { type: "role", role: "destination" }
30859
+ { type: "role", role: "destination" },
30860
+ VIEW_TRANSITION_TAIL
30656
30861
  ]
30657
30862
  },
30658
30863
  extraction: {
@@ -30666,12 +30871,13 @@ var init_swap = __esm({
30666
30871
  command: "swap",
30667
30872
  priority: 120,
30668
30873
  template: {
30669
- format: "swap {destination} with {patient}",
30874
+ format: "swap {destination} with {patient} [using view {manner}]",
30670
30875
  tokens: [
30671
30876
  { type: "literal", value: "swap" },
30672
30877
  { type: "role", role: "destination" },
30673
30878
  { type: "literal", value: "with" },
30674
- { type: "role", role: "patient" }
30879
+ { type: "role", role: "patient" },
30880
+ VIEW_TRANSITION_TAIL
30675
30881
  ]
30676
30882
  },
30677
30883
  extraction: {}
@@ -30682,14 +30888,15 @@ var init_swap = __esm({
30682
30888
  command: "swap",
30683
30889
  priority: 140,
30684
30890
  template: {
30685
- format: "swap {method} of {destination} with {patient}",
30891
+ format: "swap {method} of {destination} with {patient} [using view {manner}]",
30686
30892
  tokens: [
30687
30893
  { type: "literal", value: "swap" },
30688
30894
  { type: "role", role: "method" },
30689
30895
  { type: "literal", value: "of" },
30690
30896
  { type: "role", role: "destination" },
30691
30897
  { type: "literal", value: "with" },
30692
- { type: "role", role: "patient" }
30898
+ { type: "role", role: "patient" },
30899
+ VIEW_TRANSITION_TAIL
30693
30900
  ]
30694
30901
  },
30695
30902
  extraction: {}
@@ -30700,13 +30907,14 @@ var init_swap = __esm({
30700
30907
  command: "swap",
30701
30908
  priority: 130,
30702
30909
  template: {
30703
- format: "swap {method} {destination} with {patient}",
30910
+ format: "swap {method} {destination} with {patient} [using view {manner}]",
30704
30911
  tokens: [
30705
30912
  { type: "literal", value: "swap" },
30706
30913
  { type: "role", role: "method" },
30707
30914
  { type: "role", role: "destination" },
30708
30915
  { type: "literal", value: "with" },
30709
- { type: "role", role: "patient" }
30916
+ { type: "role", role: "patient" },
30917
+ VIEW_TRANSITION_TAIL
30710
30918
  ]
30711
30919
  },
30712
30920
  extraction: {}
@@ -32443,6 +32651,7 @@ init_vietnamese();
32443
32651
  init_chinese();
32444
32652
 
32445
32653
  // src/parser/pattern-matcher.ts
32654
+ init_marker_resolution();
32446
32655
  init_command_schemas();
32447
32656
 
32448
32657
  // src/parser/utils/possessive-keywords.ts
@@ -32480,6 +32689,7 @@ init_base();
32480
32689
  // src/parser/semantic-parser.ts
32481
32690
  init_registry();
32482
32691
  init_command_schemas();
32692
+ init_marker_resolution();
32483
32693
 
32484
32694
  // src/parser/block-parser.ts
32485
32695
  init_registry();