@hyperfixi/core 2.9.4 → 2.11.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.
- package/dist/ast-utils/index.js +400 -89
- package/dist/ast-utils/index.mjs +400 -89
- package/dist/behaviors/index.js +2 -1
- package/dist/behaviors/index.mjs +2 -1
- package/dist/chunks/{bridge-DhmZ3Khh.js → bridge-De7lnU_9.js} +2 -2
- package/dist/chunks/browser-modular-DpHHlmJ0.js +2 -0
- package/dist/chunks/{index-DKrx4rv2.js → index-D6-8bcsy.js} +2 -2
- package/dist/commands/advanced/async.d.ts +0 -8
- package/dist/commands/advanced/js.d.ts +0 -8
- package/dist/commands/animation/measure.d.ts +0 -8
- package/dist/commands/animation/settle.d.ts +0 -8
- package/dist/commands/animation/start-view-transition.d.ts +0 -8
- package/dist/commands/animation/take.d.ts +0 -8
- package/dist/commands/animation/transition.d.ts +0 -8
- package/dist/commands/async/fetch.d.ts +0 -8
- package/dist/commands/async/wait.d.ts +0 -8
- package/dist/commands/behaviors/install.d.ts +0 -8
- package/dist/commands/content/append.d.ts +0 -8
- package/dist/commands/content/prepend.d.ts +0 -8
- package/dist/commands/control-flow/break.d.ts +0 -8
- package/dist/commands/control-flow/continue.d.ts +0 -8
- package/dist/commands/control-flow/exit.d.ts +0 -8
- package/dist/commands/control-flow/halt.d.ts +0 -8
- package/dist/commands/control-flow/if.d.ts +0 -8
- package/dist/commands/control-flow/repeat.d.ts +0 -8
- package/dist/commands/control-flow/return.d.ts +0 -8
- package/dist/commands/control-flow/throw.d.ts +0 -8
- package/dist/commands/data/clear.d.ts +0 -8
- package/dist/commands/data/default.d.ts +0 -8
- package/dist/commands/data/get.d.ts +0 -8
- package/dist/commands/data/increment.d.ts +0 -8
- package/dist/commands/data/set.d.ts +0 -8
- package/dist/commands/decorators/index.d.ts +2 -8
- package/dist/commands/dom/add.d.ts +0 -8
- package/dist/commands/dom/close.d.ts +0 -8
- package/dist/commands/dom/empty.d.ts +0 -8
- package/dist/commands/dom/hide.d.ts +0 -8
- package/dist/commands/dom/make.d.ts +0 -8
- package/dist/commands/dom/open.d.ts +0 -8
- package/dist/commands/dom/process-partials.d.ts +0 -8
- package/dist/commands/dom/put.d.ts +0 -8
- package/dist/commands/dom/remove.d.ts +0 -8
- package/dist/commands/dom/reset.d.ts +0 -8
- package/dist/commands/dom/select.d.ts +0 -8
- package/dist/commands/dom/show.d.ts +0 -8
- package/dist/commands/dom/swap.d.ts +2 -18
- package/dist/commands/dom/toggle.d.ts +0 -8
- package/dist/commands/events/trigger.d.ts +0 -8
- package/dist/commands/execution/blur.d.ts +0 -8
- package/dist/commands/execution/call.d.ts +0 -8
- package/dist/commands/execution/focus.d.ts +0 -8
- package/dist/commands/execution/pseudo-command.d.ts +0 -8
- package/dist/commands/helpers/dom-mutation.d.ts +3 -2
- package/dist/commands/helpers/index.d.ts +1 -1
- package/dist/commands/index.js +156 -31
- package/dist/commands/index.mjs +156 -31
- package/dist/commands/navigation/go.d.ts +0 -8
- package/dist/commands/navigation/push-url.d.ts +0 -8
- package/dist/commands/navigation/scroll-to.d.ts +0 -8
- package/dist/commands/templates/render.d.ts +0 -8
- package/dist/commands/utility/beep.d.ts +0 -8
- package/dist/commands/utility/breakpoint.d.ts +0 -8
- package/dist/commands/utility/copy.d.ts +0 -8
- package/dist/commands/utility/log.d.ts +0 -8
- package/dist/commands/utility/pick.d.ts +0 -8
- package/dist/commands/utility/tell.d.ts +0 -8
- package/dist/hyperfixi-browser-classic-i18n.js +1 -1
- package/dist/hyperfixi-browser-minimal.js +1 -1
- package/dist/hyperfixi-browser-standard.js +1 -1
- package/dist/hyperfixi-browser.js +1 -1
- package/dist/hyperfixi-classic-i18n.js +1 -1
- package/dist/hyperfixi-hx-v4.js +1 -1
- package/dist/hyperfixi-minimal.js +1 -1
- package/dist/hyperfixi-multilingual.js +1 -1
- package/dist/hyperfixi-standard.js +1 -1
- package/dist/hyperfixi.js +1 -1
- package/dist/hyperfixi.mjs +1 -1
- package/dist/index.js +660 -171
- package/dist/index.min.js +1 -1
- package/dist/index.mjs +660 -171
- package/dist/lokascript-browser-classic-i18n.js +1 -1
- package/dist/lokascript-browser-minimal.js +1 -1
- package/dist/lokascript-browser-standard.js +1 -1
- package/dist/lokascript-browser.js +1 -1
- package/dist/lokascript-multilingual.js +1 -1
- package/dist/lsp-metadata.js +2 -2
- package/dist/lsp-metadata.mjs +2 -2
- package/dist/metadata.d.ts +1 -1
- package/dist/metadata.js +13 -11
- package/dist/metadata.mjs +13 -11
- package/dist/parser/command-parsers/dom-commands.d.ts +1 -0
- package/dist/parser/full-parser.js +47 -1
- package/dist/parser/full-parser.mjs +47 -1
- package/dist/reference/index.js +13 -7
- package/dist/reference/index.mjs +13 -7
- package/dist/registry/index.js +56 -10
- package/dist/registry/index.mjs +56 -10
- package/dist/runtime/command-adapter.d.ts +8 -8
- package/dist/utils/element-check.d.ts +1 -0
- package/dist/version.d.ts +2 -0
- package/package.json +5 -5
- package/dist/chunks/browser-modular-BllAMlht.js +0 -2
package/dist/ast-utils/index.js
CHANGED
|
@@ -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
|
{
|
|
@@ -5523,7 +5522,13 @@ var init_command_schemas = __esm({
|
|
|
5523
5522
|
expectedTypes: ["selector"],
|
|
5524
5523
|
selectorKinds: ["class", "attribute"],
|
|
5525
5524
|
svoPosition: 1,
|
|
5526
|
-
sovPosition: 2
|
|
5525
|
+
sovPosition: 2,
|
|
5526
|
+
// zh: the transformer emits `\u5207\u6362 \u628a .active` (the profile's \u628a patient
|
|
5527
|
+
// marker), but natural zh writes `\u5207\u6362 .active` bare \u2014 the handcrafted
|
|
5528
|
+
// patterns' form. Optional accepts both; without it the generated
|
|
5529
|
+
// pattern REQUIRED \u628a and the slim bundles could not parse the bare
|
|
5530
|
+
// form at all. Same treatment as go's destination.
|
|
5531
|
+
markerOptional: { zh: true }
|
|
5527
5532
|
},
|
|
5528
5533
|
{
|
|
5529
5534
|
role: "destination",
|
|
@@ -5861,6 +5866,8 @@ var init_command_schemas = __esm({
|
|
|
5861
5866
|
markerOverride: {
|
|
5862
5867
|
en: "",
|
|
5863
5868
|
// No marker before destination in English: "set :x to 5"
|
|
5869
|
+
es: "",
|
|
5870
|
+
// "establecer x a 5" - no marker before variable (profile default `en` matched nothing)
|
|
5864
5871
|
ja: "\u3092",
|
|
5865
5872
|
// "x \u3092 10 \u306b \u8a2d\u5b9a" - variable gets object marker
|
|
5866
5873
|
ko: "\uB97C",
|
|
@@ -5883,9 +5890,19 @@ var init_command_schemas = __esm({
|
|
|
5883
5890
|
// generated hi set patterns carried the swapped markers and matched no
|
|
5884
5891
|
// corpus, so the whole hi set-family (set-text/inner-html/style/attribute)
|
|
5885
5892
|
// fell to the bare-event fallback (S6 set-trio).
|
|
5886
|
-
hi: "\u0915\u094B"
|
|
5893
|
+
hi: "\u0915\u094B",
|
|
5887
5894
|
// target (destination) gets \u0915\u094b
|
|
5888
|
-
|
|
5895
|
+
// zh: the transformer emits the verb-first BA form `\u8bbe\u7f6e \u628a X \u5230 V`
|
|
5896
|
+
// (\u628a before the variable), while natural zh writes `\u8bbe\u7f6e X \u4e3a V`
|
|
5897
|
+
// (unmarked). \u628a as the marker, optional below, accepts both. The
|
|
5898
|
+
// profile default \u5728 matched neither form, so the generated zh set
|
|
5899
|
+
// patterns were dead weight and the slim bundles (schema-generated
|
|
5900
|
+
// patterns only) could not parse set at all.
|
|
5901
|
+
zh: "\u628A"
|
|
5902
|
+
},
|
|
5903
|
+
// Accept the unmarked natural form alongside the transformer's \u628a form
|
|
5904
|
+
// (same treatment as go's destination).
|
|
5905
|
+
markerOptional: { zh: true }
|
|
5889
5906
|
},
|
|
5890
5907
|
{
|
|
5891
5908
|
role: "patient",
|
|
@@ -5928,8 +5945,14 @@ var init_command_schemas = __esm({
|
|
|
5928
5945
|
// "x \u0995\u09c7 10 \u09a4\u09c7 \u09b8\u09c7\u099f" - destination marker on value
|
|
5929
5946
|
qu: "man",
|
|
5930
5947
|
// "x ta 10 man churay" - destination marker on value
|
|
5931
|
-
hi: "\u092E\u0947\u0902"
|
|
5948
|
+
hi: "\u092E\u0947\u0902",
|
|
5932
5949
|
// value (patient) gets \u092e\u0947\u0902 \u2014 see the destination note above
|
|
5950
|
+
// zh: the transformer/corpus form marks the value with \u5230 (`\u8bbe\u7f6e \u628a X
|
|
5951
|
+
// \u5230 V`); natural zh uses \u4e3a (`\u8bbe\u7f6e X \u4e3a V`). \u5230 is the override,
|
|
5952
|
+
// the \u4e3a-family rides along as variants (all merged as alternatives
|
|
5953
|
+
// by schemaMarkerAlternatives). Profile default \u628a was the PATIENT
|
|
5954
|
+
// marker, which never precedes set's value in either form.
|
|
5955
|
+
zh: "\u5230"
|
|
5933
5956
|
},
|
|
5934
5957
|
// Turkish dative is allomorphic under vowel harmony: the i18n transformer
|
|
5935
5958
|
// emits `e` for quoted-string values (`"red" e`) but `-ya` for a value
|
|
@@ -5942,7 +5965,11 @@ var init_command_schemas = __esm({
|
|
|
5942
5965
|
// not parse as a bare command while `t\u0131klama da @disabled i do\u011fru ya
|
|
5943
5966
|
// ayarla` did. See STRUCTURAL_ARCS_ROADMAP.md (tr set-attribute).
|
|
5944
5967
|
markerVariants: {
|
|
5945
|
-
tr: ["e", "a", "ye", "ya"]
|
|
5968
|
+
tr: ["e", "a", "ye", "ya"],
|
|
5969
|
+
// Natural zh value markers (`\u8bbe\u7f6e X \u4e3a V`), simplified + traditional +
|
|
5970
|
+
// resultative \u2014 the handcrafted set-zh-full alternatives, kept parseable
|
|
5971
|
+
// alongside the transformer's \u5230 override above.
|
|
5972
|
+
zh: ["\u4E3A", "\u70BA", "\u6210"]
|
|
5946
5973
|
}
|
|
5947
5974
|
},
|
|
5948
5975
|
{
|
|
@@ -6604,8 +6631,8 @@ var init_command_schemas = __esm({
|
|
|
6604
6631
|
description: "Take content from a source element",
|
|
6605
6632
|
category: "dom-content",
|
|
6606
6633
|
primaryRole: "patient",
|
|
6607
|
-
// `take .active from #parent` \u2192 args ['.active'], modifiers { from
|
|
6608
|
-
ast: { args: ["patient"], modifiers: { from: "source" } },
|
|
6634
|
+
// `take .active from #parent for me` \u2192 args ['.active'], modifiers { from, for }.
|
|
6635
|
+
ast: { args: ["patient"], modifiers: { from: "source", for: "recipient" } },
|
|
6609
6636
|
roles: [
|
|
6610
6637
|
{
|
|
6611
6638
|
role: "patient",
|
|
@@ -6628,6 +6655,38 @@ var init_command_schemas = __esm({
|
|
|
6628
6655
|
expectedTypes: ["selector", "reference"],
|
|
6629
6656
|
svoPosition: 2,
|
|
6630
6657
|
sovPosition: 1
|
|
6658
|
+
},
|
|
6659
|
+
{
|
|
6660
|
+
role: "recipient",
|
|
6661
|
+
description: "The element the class moves ONTO (`take .active from .tab for me`)",
|
|
6662
|
+
required: false,
|
|
6663
|
+
// References only, deliberately. Upstream accepts an element expression,
|
|
6664
|
+
// but the 23 non-en corpus surfaces carry the recipient as a BARE
|
|
6665
|
+
// trailing pronoun (i18n renders `\u2026 von .tab-button ich`), so this slot
|
|
6666
|
+
// is marker-less almost everywhere and a selector-typed slot would
|
|
6667
|
+
// swallow the second selector of `take .active from .a .b`. English is
|
|
6668
|
+
// unaffected: `take` is on the core parser's skipSemanticParsing list,
|
|
6669
|
+
// so the traditional parser owns `for <anything>` there.
|
|
6670
|
+
expectedTypes: ["reference"],
|
|
6671
|
+
svoPosition: 3,
|
|
6672
|
+
sovPosition: 3,
|
|
6673
|
+
// NO default. The runtime already defaults the recipient to `me`
|
|
6674
|
+
// (commands/animation/take.ts), and a schema default would emit an
|
|
6675
|
+
// explicit `for me` modifier on every take \u2014 re-smuggling the exact
|
|
6676
|
+
// "absent means absent" semantics #859 removed from `source`.
|
|
6677
|
+
//
|
|
6678
|
+
// Shape-anchored on `reference`: without it this optional slot weighs
|
|
6679
|
+
// into every take pattern's denominator in `scoreRoleCoverage`, dropping
|
|
6680
|
+
// plain `take .active from .tab-button` from 1.0 to ~0.69 \u2014 the toggle-es
|
|
6681
|
+
// regression class the R1 role-set flip ratchet exists to catch.
|
|
6682
|
+
valueShape: "reference",
|
|
6683
|
+
// en only. The other 23 languages render the recipient unmarked, so a
|
|
6684
|
+
// marker there would never match their corpus rows; where the marker-less
|
|
6685
|
+
// slot proves inert they stay uncaptured and the pattern lands in the
|
|
6686
|
+
// baseline's `roleLossyPatterns` as named R1 burn-down tail. A language
|
|
6687
|
+
// gets a real particle here ONLY if the empty slot perturbs its other
|
|
6688
|
+
// parses (toggle's ja \u9593 / ko \ub3d9\uc548 case).
|
|
6689
|
+
markerOverride: { en: "for" }
|
|
6631
6690
|
}
|
|
6632
6691
|
]
|
|
6633
6692
|
};
|
|
@@ -7692,6 +7751,47 @@ var init_command_schemas = __esm({
|
|
|
7692
7751
|
}
|
|
7693
7752
|
]
|
|
7694
7753
|
};
|
|
7754
|
+
USING_VIEW_MARKER_ALL_LANGS = {
|
|
7755
|
+
en: "using view",
|
|
7756
|
+
es: "using view",
|
|
7757
|
+
pt: "using view",
|
|
7758
|
+
fr: "using view",
|
|
7759
|
+
de: "using view",
|
|
7760
|
+
it: "using view",
|
|
7761
|
+
ja: "using view",
|
|
7762
|
+
ko: "using view",
|
|
7763
|
+
zh: "using view",
|
|
7764
|
+
ar: "using view",
|
|
7765
|
+
he: "using view",
|
|
7766
|
+
hi: "using view",
|
|
7767
|
+
bn: "using view",
|
|
7768
|
+
tr: "using view",
|
|
7769
|
+
ru: "using view",
|
|
7770
|
+
uk: "using view",
|
|
7771
|
+
pl: "using view",
|
|
7772
|
+
id: "using view",
|
|
7773
|
+
vi: "using view",
|
|
7774
|
+
th: "using view",
|
|
7775
|
+
ms: "using view",
|
|
7776
|
+
tl: "using view",
|
|
7777
|
+
sw: "using view",
|
|
7778
|
+
qu: "using view"
|
|
7779
|
+
};
|
|
7780
|
+
VIEW_TRANSITION_MANNER_ROLE = {
|
|
7781
|
+
role: "manner",
|
|
7782
|
+
description: "Run the swap inside a `document.startViewTransition()` (`using view transition`)",
|
|
7783
|
+
required: false,
|
|
7784
|
+
// Both types, because the SAME word tokenizes differently per language and
|
|
7785
|
+
// the difference is an accident of vocabulary: `transition` is a command
|
|
7786
|
+
// keyword in en/fr (it is also their verb) and a bare identifier everywhere
|
|
7787
|
+
// else, which types it `literal` in the first group and `expression` in the
|
|
7788
|
+
// second. Measured: with `['literal']` alone only en and fr captured the
|
|
7789
|
+
// tail. Widening is safe precisely because the slot is marker-guarded \u2014
|
|
7790
|
+
// nothing reaches it until `using view` has matched.
|
|
7791
|
+
expectedTypes: ["literal", "expression"],
|
|
7792
|
+
valueShape: "keyword",
|
|
7793
|
+
markerOverride: USING_VIEW_MARKER_ALL_LANGS
|
|
7794
|
+
};
|
|
7695
7795
|
swapSchema = {
|
|
7696
7796
|
action: "swap",
|
|
7697
7797
|
description: "Swap DOM content using various strategies (innerHTML, outerHTML, delete, etc.)",
|
|
@@ -7712,7 +7812,11 @@ var init_command_schemas = __esm({
|
|
|
7712
7812
|
// work. Preserved verbatim by the Arc F migration (a faithful migration must
|
|
7713
7813
|
// not change output) and pinned as two `drift` exemptions; this is the
|
|
7714
7814
|
// behavior fix those entries were waiting for.
|
|
7715
|
-
|
|
7815
|
+
//
|
|
7816
|
+
// `manner` is the exception to "keyword-positional args": it rides as
|
|
7817
|
+
// `modifiers.viewTransition`, which SwapCommand.parseInput reads for presence
|
|
7818
|
+
// alongside its existing flat-args `using`/`view`/`transition` scan.
|
|
7819
|
+
ast: { args: ["method", "destination", "patient"], modifiers: { viewTransition: "manner" } },
|
|
7716
7820
|
roles: [
|
|
7717
7821
|
{
|
|
7718
7822
|
role: "method",
|
|
@@ -7807,6 +7911,11 @@ var init_command_schemas = __esm({
|
|
|
7807
7911
|
ar: "\u0628\u0640",
|
|
7808
7912
|
tl: "nang"
|
|
7809
7913
|
}
|
|
7914
|
+
},
|
|
7915
|
+
{
|
|
7916
|
+
...VIEW_TRANSITION_MANNER_ROLE,
|
|
7917
|
+
svoPosition: 4,
|
|
7918
|
+
sovPosition: 4
|
|
7810
7919
|
}
|
|
7811
7920
|
]
|
|
7812
7921
|
};
|
|
@@ -7817,7 +7926,15 @@ var init_command_schemas = __esm({
|
|
|
7817
7926
|
primaryRole: "patient",
|
|
7818
7927
|
// `morph #list to it` \u2192 args [content], modifiers { on: element }.
|
|
7819
7928
|
// Content is source or destination; the element being morphed is the patient.
|
|
7820
|
-
|
|
7929
|
+
//
|
|
7930
|
+
// `manner` rides as `modifiers.viewTransition`, same as swap/process \u2014
|
|
7931
|
+
// MorphCommand.parseInput reads it for presence alongside its existing
|
|
7932
|
+
// flat-args `using`/`view`/`transition` scan (the traditional-parser path,
|
|
7933
|
+
// which owns English because morph sits on SKIP_SEMANTIC_COMMANDS).
|
|
7934
|
+
ast: {
|
|
7935
|
+
args: [["source", "destination"]],
|
|
7936
|
+
modifiers: { on: "patient", viewTransition: "manner" }
|
|
7937
|
+
},
|
|
7821
7938
|
roles: [
|
|
7822
7939
|
{
|
|
7823
7940
|
role: "patient",
|
|
@@ -7838,6 +7955,18 @@ var init_command_schemas = __esm({
|
|
|
7838
7955
|
sovPosition: 2,
|
|
7839
7956
|
markerOverride: { en: "to" }
|
|
7840
7957
|
// "morph #target to it"
|
|
7958
|
+
},
|
|
7959
|
+
{
|
|
7960
|
+
// `morph #target to it using view transition` \u2014 the same tail as swap and
|
|
7961
|
+
// process, closed here for the same reason (#870's third-schema filing):
|
|
7962
|
+
// without the role the semantic parser matched morph at confidence 1.0
|
|
7963
|
+
// and stranded the tail, so every semantic-only consumer (multilingual
|
|
7964
|
+
// bundles, the bridge, `translate()`) silently dropped the animation
|
|
7965
|
+
// request in all 24 languages. Morph has NO hand-written patterns in any
|
|
7966
|
+
// language, so this schema role is the whole fix on the pattern side.
|
|
7967
|
+
...VIEW_TRANSITION_MANNER_ROLE,
|
|
7968
|
+
svoPosition: 3,
|
|
7969
|
+
sovPosition: 3
|
|
7841
7970
|
}
|
|
7842
7971
|
]
|
|
7843
7972
|
};
|
|
@@ -8024,6 +8153,13 @@ var init_command_schemas = __esm({
|
|
|
8024
8153
|
description: "Process hx-partial markup in HTML content",
|
|
8025
8154
|
category: "dom-content",
|
|
8026
8155
|
primaryRole: "patient",
|
|
8156
|
+
// `process partials in it` \u2192 args ['it']; the optional tail rides as
|
|
8157
|
+
// `modifiers.viewTransition`, which ProcessPartialsCommand.parseInput has
|
|
8158
|
+
// read since #861 (`raw.modifiers?.viewTransition !== undefined`). Without a
|
|
8159
|
+
// descriptor this schema fell through to `buildGenericCommand`, whose
|
|
8160
|
+
// modifier list is fixed (destination/duration/method/style) and would have
|
|
8161
|
+
// dropped a captured `manner` on the floor.
|
|
8162
|
+
ast: { args: ["patient"], modifiers: { viewTransition: "manner" } },
|
|
8027
8163
|
roles: [
|
|
8028
8164
|
{
|
|
8029
8165
|
role: "patient",
|
|
@@ -8033,6 +8169,11 @@ var init_command_schemas = __esm({
|
|
|
8033
8169
|
svoPosition: 1,
|
|
8034
8170
|
sovPosition: 1,
|
|
8035
8171
|
markerOverride: PARTIALS_IN_MARKER_ALL_LANGS
|
|
8172
|
+
},
|
|
8173
|
+
{
|
|
8174
|
+
...VIEW_TRANSITION_MANNER_ROLE,
|
|
8175
|
+
svoPosition: 2,
|
|
8176
|
+
sovPosition: 2
|
|
8036
8177
|
}
|
|
8037
8178
|
]
|
|
8038
8179
|
};
|
|
@@ -9488,7 +9629,9 @@ var init_french = __esm({
|
|
|
9488
9629
|
trigger: { primary: "d\xE9clencher", normalized: "trigger" },
|
|
9489
9630
|
send: { primary: "envoyer", alternatives: ["envoie"], normalized: "send" },
|
|
9490
9631
|
focus: { primary: "focaliser", alternatives: ["concentrer"], normalized: "focus" },
|
|
9491
|
-
|
|
9632
|
+
// `d\u00e9focaliser` is an unattested infinitive; French pedagogy writes
|
|
9633
|
+
// `perte de focus` for the event (2026-07 terminology review).
|
|
9634
|
+
blur: { primary: "perte de focus", alternatives: ["d\xE9focaliser"], normalized: "blur" },
|
|
9492
9635
|
// Phase 1 (v0.9.90): DOM / form state / debug
|
|
9493
9636
|
// `vide` (adjective, "empty") is the i18n transformer's `is empty` predicate
|
|
9494
9637
|
// form; `vider` is the verb ("to empty"). Accept both so the emptiness check
|
|
@@ -9501,7 +9644,13 @@ var init_french = __esm({
|
|
|
9501
9644
|
reset: { primary: "r\xE9initialiser", alternatives: ["reinitialiser"], normalized: "reset" },
|
|
9502
9645
|
breakpoint: { primary: "point-arr\xEAt", alternatives: ["point-arret"], normalized: "breakpoint" },
|
|
9503
9646
|
go: { primary: "aller", alternatives: ["naviguer", "va"], normalized: "go" },
|
|
9504
|
-
|
|
9647
|
+
// MDN fr and the OQLF standardize the noun `d\u00e9filement` for the event; the
|
|
9648
|
+
// infinitive stays as an alternative.
|
|
9649
|
+
scroll: {
|
|
9650
|
+
primary: "d\xE9filement",
|
|
9651
|
+
alternatives: ["defilement", "d\xE9filer", "faire-d\xE9filer"],
|
|
9652
|
+
normalized: "scroll"
|
|
9653
|
+
},
|
|
9505
9654
|
push: { primary: "pousser", normalized: "push" },
|
|
9506
9655
|
replace: { primary: "remplacer", normalized: "replace" },
|
|
9507
9656
|
process: { primary: "traiter", normalized: "process" },
|
|
@@ -9567,9 +9716,15 @@ var init_french = __esm({
|
|
|
9567
9716
|
after: { primary: "apr\xE8s", normalized: "after" },
|
|
9568
9717
|
// Common event names (for event handler patterns)
|
|
9569
9718
|
click: { primary: "clic", alternatives: ["clique"], normalized: "click" },
|
|
9570
|
-
// `resize` event (window-resize):
|
|
9571
|
-
// event
|
|
9572
|
-
|
|
9719
|
+
// `resize` event (window-resize): the noun `redimensionnement` is the
|
|
9720
|
+
// attested event form ("lors du redimensionnement de la fen\u00eatre"). The dict
|
|
9721
|
+
// still emits redimensionner, kept as an alternative so the event keeps
|
|
9722
|
+
// typing as literal="resize" (matching en) instead of expression.
|
|
9723
|
+
resize: {
|
|
9724
|
+
primary: "redimensionnement",
|
|
9725
|
+
alternatives: ["redimensionner"],
|
|
9726
|
+
normalized: "resize"
|
|
9727
|
+
},
|
|
9573
9728
|
hover: { primary: "survol", alternatives: ["survoler"], normalized: "hover" },
|
|
9574
9729
|
submit: { primary: "soumission", alternatives: ["soumettre"], normalized: "submit" },
|
|
9575
9730
|
input: { primary: "saisie", alternatives: ["entr\xE9e"], normalized: "input" },
|
|
@@ -13352,9 +13507,17 @@ var init_turkish = __esm({
|
|
|
13352
13507
|
on: { primary: "\xFCzerinde", alternatives: ["zaman"], normalized: "on" },
|
|
13353
13508
|
trigger: { primary: "tetikle", normalized: "trigger" },
|
|
13354
13509
|
send: { primary: "g\xF6nder", normalized: "send" },
|
|
13355
|
-
// DOM focus
|
|
13356
|
-
|
|
13357
|
-
|
|
13510
|
+
// DOM focus. `odaklanma` (the act of focusing) leads over the static state
|
|
13511
|
+
// noun `odak` \u2014 Turkish event prose says "odaklanma olay\u0131". `bulan\u0131k` was
|
|
13512
|
+
// the optical blur (CSS filters, image processing), never the DOM event;
|
|
13513
|
+
// native usage is `odak kayb\u0131` (loss of focus). 2026-07 terminology-review
|
|
13514
|
+
// corrections; old forms stay as parse alternatives.
|
|
13515
|
+
focus: { primary: "odaklanma", alternatives: ["odak"], normalized: "focus" },
|
|
13516
|
+
blur: {
|
|
13517
|
+
primary: "odak kayb\u0131",
|
|
13518
|
+
alternatives: ["odak kaybi", "bulan\u0131k", "bulan\u0131kl\u0131k", "bulanik"],
|
|
13519
|
+
normalized: "blur"
|
|
13520
|
+
},
|
|
13358
13521
|
// Phase 1 (v0.9.90): DOM / form state / debug
|
|
13359
13522
|
empty: { primary: "bo\u015Falt", alternatives: ["bosalt", "bo\u015F"], normalized: "empty" },
|
|
13360
13523
|
open: { primary: "a\xE7", alternatives: ["ac"], normalized: "open" },
|
|
@@ -13375,7 +13538,9 @@ var init_turkish = __esm({
|
|
|
13375
13538
|
},
|
|
13376
13539
|
hover: { primary: "\xFCzerine gelme", alternatives: ["\xFCzerinde gezinme"], normalized: "hover" },
|
|
13377
13540
|
submit: { primary: "g\xF6nderme", normalized: "submit" },
|
|
13378
|
-
|
|
13541
|
+
// `giri\u015f` reads as entry/login (giri\u015f yapma) and can imply an auth event;
|
|
13542
|
+
// the data-input term is `girdi` ("Girdi (Input) Eventleri").
|
|
13543
|
+
input: { primary: "girdi", alternatives: ["giri\u015F", "giris"], normalized: "input" },
|
|
13379
13544
|
change: { primary: "de\u011Fi\u015Fiklik", alternatives: ["de\u011Fi\u015Fim", "degisim"], normalized: "change" },
|
|
13380
13545
|
// `load` event: the i18n dict emits y\u00fckle for `load`. Without this keyword the
|
|
13381
13546
|
// SOV reorder's mid-stream `y\u00fckle de` (on load) tokenized as the `install`
|
|
@@ -13385,7 +13550,13 @@ var init_turkish = __esm({
|
|
|
13385
13550
|
load: { primary: "y\xFCkle", normalized: "load" },
|
|
13386
13551
|
// Navigation
|
|
13387
13552
|
go: { primary: "git", normalized: "go" },
|
|
13388
|
-
|
|
13553
|
+
// `kayd\u0131r` is the bare imperative; the attested event noun is `kayd\u0131rma`
|
|
13554
|
+
// ("kayd\u0131rma olay\u0131"). The imperative stays as an alternative.
|
|
13555
|
+
scroll: {
|
|
13556
|
+
primary: "kayd\u0131rma",
|
|
13557
|
+
alternatives: ["kaydirma", "kayd\u0131r", "kaydir"],
|
|
13558
|
+
normalized: "scroll"
|
|
13559
|
+
},
|
|
13389
13560
|
push: { primary: "itele", alternatives: ["push"], normalized: "push" },
|
|
13390
13561
|
replace: { primary: "de\u011Fi\u015Ftir_url", alternatives: ["degistir_url"], normalized: "replace" },
|
|
13391
13562
|
process: { primary: "i\u015Fle", alternatives: ["isle"], normalized: "process" },
|
|
@@ -14338,6 +14509,49 @@ var init_chinese = __esm({
|
|
|
14338
14509
|
}
|
|
14339
14510
|
});
|
|
14340
14511
|
|
|
14512
|
+
// src/parser/utils/marker-resolution.ts
|
|
14513
|
+
function resolveMarkerForRole(roleSpec, profile) {
|
|
14514
|
+
const overrideMarker = roleSpec.markerOverride?.[profile.code];
|
|
14515
|
+
const defaultMarker = profile.roleMarkers[roleSpec.role];
|
|
14516
|
+
if (overrideMarker !== void 0) {
|
|
14517
|
+
const alternatives = legacyMarkerAlternatives(roleSpec, profile.code, overrideMarker);
|
|
14518
|
+
return {
|
|
14519
|
+
primary: overrideMarker,
|
|
14520
|
+
...alternatives && { alternatives },
|
|
14521
|
+
position: defaultMarker?.position ?? "before",
|
|
14522
|
+
isOverride: true
|
|
14523
|
+
};
|
|
14524
|
+
}
|
|
14525
|
+
if (defaultMarker && defaultMarker.primary) {
|
|
14526
|
+
const result = {
|
|
14527
|
+
primary: defaultMarker.primary,
|
|
14528
|
+
position: defaultMarker.position,
|
|
14529
|
+
isOverride: false
|
|
14530
|
+
};
|
|
14531
|
+
if (defaultMarker.alternatives) {
|
|
14532
|
+
result.alternatives = defaultMarker.alternatives;
|
|
14533
|
+
}
|
|
14534
|
+
return result;
|
|
14535
|
+
}
|
|
14536
|
+
return null;
|
|
14537
|
+
}
|
|
14538
|
+
function legacyMarkerAlternatives(roleSpec, languageCode, overrideMarker) {
|
|
14539
|
+
const legacy = roleSpec.markerLegacy?.[languageCode];
|
|
14540
|
+
if (!legacy?.length) return void 0;
|
|
14541
|
+
const alternatives = [...new Set(legacy)].filter((a) => a && a !== overrideMarker);
|
|
14542
|
+
return alternatives.length ? alternatives : void 0;
|
|
14543
|
+
}
|
|
14544
|
+
function schemaMarkerAlternatives(roleSpec, languageCode, marker) {
|
|
14545
|
+
const legacy = roleSpec.markerLegacy?.[languageCode] ?? [];
|
|
14546
|
+
const variants = roleSpec.methodCarrier ? [] : roleSpec.markerVariants?.[languageCode] ?? [];
|
|
14547
|
+
const alternatives = [.../* @__PURE__ */ new Set([...legacy, ...variants])].filter((a) => a && a !== marker);
|
|
14548
|
+
return alternatives.length ? alternatives : void 0;
|
|
14549
|
+
}
|
|
14550
|
+
var init_marker_resolution = __esm({
|
|
14551
|
+
"src/parser/utils/marker-resolution.ts"() {
|
|
14552
|
+
}
|
|
14553
|
+
});
|
|
14554
|
+
|
|
14341
14555
|
// src/patterns/put.ts
|
|
14342
14556
|
function getPutPatternsBn() {
|
|
14343
14557
|
return [
|
|
@@ -29137,49 +29351,6 @@ var init_role_positioning = __esm({
|
|
|
29137
29351
|
}
|
|
29138
29352
|
});
|
|
29139
29353
|
|
|
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
29354
|
// src/generators/event-handlers-sov.ts
|
|
29184
29355
|
function resolveRoleMarker(roleSpec, profile) {
|
|
29185
29356
|
let marker;
|
|
@@ -29213,6 +29384,44 @@ function appendOptionalScope(tokens, extraction, commandSchema) {
|
|
|
29213
29384
|
});
|
|
29214
29385
|
extraction.scope = { fromRole: "scope" };
|
|
29215
29386
|
}
|
|
29387
|
+
function appendOptionalViewTransition(tokens, extraction, commandSchema, languageCode) {
|
|
29388
|
+
appendOptionalTailRole(tokens, extraction, commandSchema, languageCode, "manner", {
|
|
29389
|
+
requireMarker: true
|
|
29390
|
+
});
|
|
29391
|
+
}
|
|
29392
|
+
function appendOptionalRecipient(tokens, extraction, commandSchema, languageCode) {
|
|
29393
|
+
appendOptionalTailRole(tokens, extraction, commandSchema, languageCode, "recipient", {
|
|
29394
|
+
requireMarker: false
|
|
29395
|
+
});
|
|
29396
|
+
}
|
|
29397
|
+
function appendOptionalTailRole(tokens, extraction, commandSchema, languageCode, role, opts) {
|
|
29398
|
+
const spec = commandSchema.roles.find((r) => r.role === role && !r.required);
|
|
29399
|
+
if (!spec) return;
|
|
29400
|
+
const marker = spec.markerOverride?.[languageCode];
|
|
29401
|
+
if (opts.requireMarker && !marker) return;
|
|
29402
|
+
tokens.push({
|
|
29403
|
+
type: "group",
|
|
29404
|
+
optional: true,
|
|
29405
|
+
tokens: [
|
|
29406
|
+
...(marker ? marker.split(/\s+/) : []).map((word) => ({
|
|
29407
|
+
type: "literal",
|
|
29408
|
+
value: word
|
|
29409
|
+
})),
|
|
29410
|
+
{
|
|
29411
|
+
type: "role",
|
|
29412
|
+
role,
|
|
29413
|
+
optional: true,
|
|
29414
|
+
expectedTypes: spec.expectedTypes,
|
|
29415
|
+
// Load-bearing, same as on the generated command patterns: it exempts
|
|
29416
|
+
// the trailing slot from the matcher's verb guard, keeps the uncaptured
|
|
29417
|
+
// slot out of `scoreRoleCoverage`'s denominator, and (for `keyword`)
|
|
29418
|
+
// normalizes the captured value type to the EN reference's `literal`.
|
|
29419
|
+
...spec.valueShape !== void 0 ? { valueShape: spec.valueShape } : {}
|
|
29420
|
+
}
|
|
29421
|
+
]
|
|
29422
|
+
});
|
|
29423
|
+
extraction[role] = { fromRole: role };
|
|
29424
|
+
}
|
|
29216
29425
|
function generateSOVEventHandlerPattern(commandSchema, profile, keyword, eventMarker, config) {
|
|
29217
29426
|
const tokens = [];
|
|
29218
29427
|
tokens.push({ type: "role", role: "event", optional: false });
|
|
@@ -29307,6 +29516,15 @@ function generateSOVPatientFirstEventHandlerPattern(commandSchema, profile, keyw
|
|
|
29307
29516
|
tokens.push(
|
|
29308
29517
|
...swapsOperands ? eventHandlerPatientGroup(commandSchema, trailingMarker) : eventHandlerDestinationGroup(commandSchema, trailingMarker)
|
|
29309
29518
|
);
|
|
29519
|
+
const extraction = {
|
|
29520
|
+
action: { value: commandSchema.action },
|
|
29521
|
+
event: { fromRole: "event" },
|
|
29522
|
+
[frontedRole]: { fromRole: frontedRole },
|
|
29523
|
+
...swapsOperands ? {} : eventHandlerDestinationExtraction(commandSchema),
|
|
29524
|
+
...eventHandlerSourceExtraction(commandSchema)
|
|
29525
|
+
};
|
|
29526
|
+
appendOptionalRecipient(tokens, extraction, commandSchema, profile.code);
|
|
29527
|
+
appendOptionalViewTransition(tokens, extraction, commandSchema, profile.code);
|
|
29310
29528
|
return {
|
|
29311
29529
|
id: `${commandSchema.action}-event-${profile.code}-sov-patient-first`,
|
|
29312
29530
|
language: profile.code,
|
|
@@ -29316,13 +29534,71 @@ function generateSOVPatientFirstEventHandlerPattern(commandSchema, profile, keyw
|
|
|
29316
29534
|
format: `{patient} ${patientMarker?.primary || ""} {event} ${eventMarker.primary} ${keyword.primary}`,
|
|
29317
29535
|
tokens
|
|
29318
29536
|
},
|
|
29319
|
-
extraction
|
|
29320
|
-
|
|
29321
|
-
|
|
29322
|
-
|
|
29323
|
-
|
|
29324
|
-
|
|
29537
|
+
extraction
|
|
29538
|
+
};
|
|
29539
|
+
}
|
|
29540
|
+
function generateSOVPatientFirstSourceFrontedEventHandlerPattern(commandSchema, profile, keyword, eventMarker, config) {
|
|
29541
|
+
const sourceSpec = commandSchema.roles.find((r) => r.role === "source");
|
|
29542
|
+
if (!sourceSpec) return null;
|
|
29543
|
+
const { marker: sourceMarker, alternatives: sourceAlts } = resolveRoleMarker(sourceSpec, profile);
|
|
29544
|
+
const patientMarker = profile.roleMarkers.patient;
|
|
29545
|
+
if (!sourceMarker) return null;
|
|
29546
|
+
if (sourceMarker === eventMarker.primary || sourceMarker === patientMarker?.primary) return null;
|
|
29547
|
+
const tokens = [];
|
|
29548
|
+
tokens.push({ type: "role", role: "patient", optional: false });
|
|
29549
|
+
if (patientMarker) {
|
|
29550
|
+
tokens.push(
|
|
29551
|
+
patientMarker.alternatives ? {
|
|
29552
|
+
type: "literal",
|
|
29553
|
+
value: patientMarker.primary,
|
|
29554
|
+
alternatives: patientMarker.alternatives
|
|
29555
|
+
} : { type: "literal", value: patientMarker.primary }
|
|
29556
|
+
);
|
|
29557
|
+
}
|
|
29558
|
+
tokens.push({
|
|
29559
|
+
type: "role",
|
|
29560
|
+
role: "source",
|
|
29561
|
+
optional: false,
|
|
29562
|
+
...sourceSpec.expectedTypes ? { expectedTypes: sourceSpec.expectedTypes } : {},
|
|
29563
|
+
...sourceSpec.valueShape !== void 0 ? { valueShape: sourceSpec.valueShape } : {}
|
|
29564
|
+
});
|
|
29565
|
+
for (const word of sourceMarker.split(/\s+/)) {
|
|
29566
|
+
tokens.push(
|
|
29567
|
+
sourceAlts && sourceMarker.split(/\s+/).length === 1 ? { type: "literal", value: word, alternatives: sourceAlts } : { type: "literal", value: word }
|
|
29568
|
+
);
|
|
29569
|
+
}
|
|
29570
|
+
tokens.push({ type: "role", role: "event", optional: false });
|
|
29571
|
+
if (eventMarker.position === "after") {
|
|
29572
|
+
const markerWords = eventMarker.primary.split(/\s+/);
|
|
29573
|
+
if (markerWords.length > 1) {
|
|
29574
|
+
for (const word of markerWords) tokens.push({ type: "literal", value: word });
|
|
29575
|
+
} else {
|
|
29576
|
+
tokens.push(
|
|
29577
|
+
eventMarker.alternatives ? { type: "literal", value: eventMarker.primary, alternatives: eventMarker.alternatives } : { type: "literal", value: eventMarker.primary }
|
|
29578
|
+
);
|
|
29325
29579
|
}
|
|
29580
|
+
}
|
|
29581
|
+
tokens.push(
|
|
29582
|
+
keyword.alternatives ? { type: "literal", value: keyword.primary, alternatives: keyword.alternatives } : { type: "literal", value: keyword.primary }
|
|
29583
|
+
);
|
|
29584
|
+
const extraction = {
|
|
29585
|
+
action: { value: commandSchema.action },
|
|
29586
|
+
event: { fromRole: "event" },
|
|
29587
|
+
patient: { fromRole: "patient" },
|
|
29588
|
+
source: { fromRole: "source" }
|
|
29589
|
+
};
|
|
29590
|
+
appendOptionalRecipient(tokens, extraction, commandSchema, profile.code);
|
|
29591
|
+
appendOptionalViewTransition(tokens, extraction, commandSchema, profile.code);
|
|
29592
|
+
return {
|
|
29593
|
+
id: `${commandSchema.action}-event-${profile.code}-sov-source-fronted`,
|
|
29594
|
+
language: profile.code,
|
|
29595
|
+
command: "on",
|
|
29596
|
+
priority: (config.basePriority ?? 100) + 48,
|
|
29597
|
+
template: {
|
|
29598
|
+
format: `{patient} ${patientMarker?.primary || ""} {source} ${sourceMarker} {event} ${eventMarker.primary} ${keyword.primary}`,
|
|
29599
|
+
tokens
|
|
29600
|
+
},
|
|
29601
|
+
extraction
|
|
29326
29602
|
};
|
|
29327
29603
|
}
|
|
29328
29604
|
function generateSOVPatientFirstWithDestEventHandlerPattern(commandSchema, profile, keyword, eventMarker, config) {
|
|
@@ -29764,6 +30040,16 @@ function generateVSOVerbFirstEventHandlerPattern(commandSchema, profile, keyword
|
|
|
29764
30040
|
});
|
|
29765
30041
|
}
|
|
29766
30042
|
}
|
|
30043
|
+
const extraction = {
|
|
30044
|
+
action: { value: commandSchema.action },
|
|
30045
|
+
event: { fromRole: "event" },
|
|
30046
|
+
[swapsOperands ? "destination" : "patient"]: {
|
|
30047
|
+
fromRole: swapsOperands ? "destination" : "patient"
|
|
30048
|
+
},
|
|
30049
|
+
...swapsOperands ? {} : eventHandlerDestinationExtraction(commandSchema),
|
|
30050
|
+
...eventHandlerSourceExtraction(commandSchema)
|
|
30051
|
+
};
|
|
30052
|
+
appendOptionalViewTransition(tokens, extraction, commandSchema, profile.code);
|
|
29767
30053
|
return {
|
|
29768
30054
|
id: `${commandSchema.action}-event-${profile.code}-vso-verb-first`,
|
|
29769
30055
|
language: profile.code,
|
|
@@ -29774,15 +30060,7 @@ function generateVSOVerbFirstEventHandlerPattern(commandSchema, profile, keyword
|
|
|
29774
30060
|
format: `${keyword.primary} {patient} ${destMarker?.primary || ""} {destination?} ${eventMarker.primary} {event}`,
|
|
29775
30061
|
tokens
|
|
29776
30062
|
},
|
|
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
|
-
}
|
|
30063
|
+
extraction
|
|
29786
30064
|
};
|
|
29787
30065
|
}
|
|
29788
30066
|
function generateVSOVerbFirstTwoRoleEventHandlerPattern(commandSchema, profile, keyword, eventMarker, config) {
|
|
@@ -30198,6 +30476,14 @@ function generateEventHandlerPatterns(commandSchema, profile, config = defaultCo
|
|
|
30198
30476
|
config
|
|
30199
30477
|
)
|
|
30200
30478
|
);
|
|
30479
|
+
const sourceFronted = generateSOVPatientFirstSourceFrontedEventHandlerPattern(
|
|
30480
|
+
commandSchema,
|
|
30481
|
+
profile,
|
|
30482
|
+
keyword,
|
|
30483
|
+
eventMarker,
|
|
30484
|
+
config
|
|
30485
|
+
);
|
|
30486
|
+
if (sourceFronted) patterns.push(sourceFronted);
|
|
30201
30487
|
const destMarkerCheck = profile.roleMarkers.destination;
|
|
30202
30488
|
if (destMarkerCheck && destMarkerCheck.primary !== eventMarker.primary) {
|
|
30203
30489
|
patterns.push(
|
|
@@ -30357,7 +30643,11 @@ function buildRoleToken(roleSpec, profile) {
|
|
|
30357
30643
|
type: "role",
|
|
30358
30644
|
role: roleSpec.role,
|
|
30359
30645
|
optional: !roleSpec.required,
|
|
30360
|
-
expectedTypes: roleSpec.expectedTypes
|
|
30646
|
+
expectedTypes: roleSpec.expectedTypes,
|
|
30647
|
+
// The matcher reads this too \u2014 a `'keyword'`-shaped slot holds a fixed
|
|
30648
|
+
// keyword phrase (`using view transition`) and must not be skipped by the
|
|
30649
|
+
// trailing-slot verb guard.
|
|
30650
|
+
...roleSpec.valueShape !== void 0 ? { valueShape: roleSpec.valueShape } : {}
|
|
30361
30651
|
};
|
|
30362
30652
|
const prefixLiteral = roleSpec.valuePrefixLiteral?.[profile.code];
|
|
30363
30653
|
const pushPrefixed = () => {
|
|
@@ -30638,9 +30928,24 @@ var init_pick = __esm({
|
|
|
30638
30928
|
});
|
|
30639
30929
|
|
|
30640
30930
|
// src/patterns/languages/en/swap.ts
|
|
30641
|
-
var swapSimpleEnglish, swapElementEnglish, swapStrategyOfEnglish, swapStrategyEnglish, swapPatternsEn;
|
|
30931
|
+
var VIEW_TRANSITION_TAIL, swapSimpleEnglish, swapElementEnglish, swapStrategyOfEnglish, swapStrategyEnglish, swapPatternsEn;
|
|
30642
30932
|
var init_swap = __esm({
|
|
30643
30933
|
"src/patterns/languages/en/swap.ts"() {
|
|
30934
|
+
VIEW_TRANSITION_TAIL = {
|
|
30935
|
+
type: "group",
|
|
30936
|
+
optional: true,
|
|
30937
|
+
tokens: [
|
|
30938
|
+
{ type: "literal", value: "using" },
|
|
30939
|
+
{ type: "literal", value: "view" },
|
|
30940
|
+
{
|
|
30941
|
+
type: "role",
|
|
30942
|
+
role: "manner",
|
|
30943
|
+
optional: true,
|
|
30944
|
+
expectedTypes: ["literal", "expression"],
|
|
30945
|
+
valueShape: "keyword"
|
|
30946
|
+
}
|
|
30947
|
+
]
|
|
30948
|
+
};
|
|
30644
30949
|
swapSimpleEnglish = {
|
|
30645
30950
|
id: "swap-en-handcrafted",
|
|
30646
30951
|
language: "en",
|
|
@@ -30648,11 +30953,12 @@ var init_swap = __esm({
|
|
|
30648
30953
|
priority: 110,
|
|
30649
30954
|
// Higher than generated patterns
|
|
30650
30955
|
template: {
|
|
30651
|
-
format: "swap {method} {destination}",
|
|
30956
|
+
format: "swap {method} {destination} [using view {manner}]",
|
|
30652
30957
|
tokens: [
|
|
30653
30958
|
{ type: "literal", value: "swap" },
|
|
30654
30959
|
{ type: "role", role: "method" },
|
|
30655
|
-
{ type: "role", role: "destination" }
|
|
30960
|
+
{ type: "role", role: "destination" },
|
|
30961
|
+
VIEW_TRANSITION_TAIL
|
|
30656
30962
|
]
|
|
30657
30963
|
},
|
|
30658
30964
|
extraction: {
|
|
@@ -30666,12 +30972,13 @@ var init_swap = __esm({
|
|
|
30666
30972
|
command: "swap",
|
|
30667
30973
|
priority: 120,
|
|
30668
30974
|
template: {
|
|
30669
|
-
format: "swap {destination} with {patient}",
|
|
30975
|
+
format: "swap {destination} with {patient} [using view {manner}]",
|
|
30670
30976
|
tokens: [
|
|
30671
30977
|
{ type: "literal", value: "swap" },
|
|
30672
30978
|
{ type: "role", role: "destination" },
|
|
30673
30979
|
{ type: "literal", value: "with" },
|
|
30674
|
-
{ type: "role", role: "patient" }
|
|
30980
|
+
{ type: "role", role: "patient" },
|
|
30981
|
+
VIEW_TRANSITION_TAIL
|
|
30675
30982
|
]
|
|
30676
30983
|
},
|
|
30677
30984
|
extraction: {}
|
|
@@ -30682,14 +30989,15 @@ var init_swap = __esm({
|
|
|
30682
30989
|
command: "swap",
|
|
30683
30990
|
priority: 140,
|
|
30684
30991
|
template: {
|
|
30685
|
-
format: "swap {method} of {destination} with {patient}",
|
|
30992
|
+
format: "swap {method} of {destination} with {patient} [using view {manner}]",
|
|
30686
30993
|
tokens: [
|
|
30687
30994
|
{ type: "literal", value: "swap" },
|
|
30688
30995
|
{ type: "role", role: "method" },
|
|
30689
30996
|
{ type: "literal", value: "of" },
|
|
30690
30997
|
{ type: "role", role: "destination" },
|
|
30691
30998
|
{ type: "literal", value: "with" },
|
|
30692
|
-
{ type: "role", role: "patient" }
|
|
30999
|
+
{ type: "role", role: "patient" },
|
|
31000
|
+
VIEW_TRANSITION_TAIL
|
|
30693
31001
|
]
|
|
30694
31002
|
},
|
|
30695
31003
|
extraction: {}
|
|
@@ -30700,13 +31008,14 @@ var init_swap = __esm({
|
|
|
30700
31008
|
command: "swap",
|
|
30701
31009
|
priority: 130,
|
|
30702
31010
|
template: {
|
|
30703
|
-
format: "swap {method} {destination} with {patient}",
|
|
31011
|
+
format: "swap {method} {destination} with {patient} [using view {manner}]",
|
|
30704
31012
|
tokens: [
|
|
30705
31013
|
{ type: "literal", value: "swap" },
|
|
30706
31014
|
{ type: "role", role: "method" },
|
|
30707
31015
|
{ type: "role", role: "destination" },
|
|
30708
31016
|
{ type: "literal", value: "with" },
|
|
30709
|
-
{ type: "role", role: "patient" }
|
|
31017
|
+
{ type: "role", role: "patient" },
|
|
31018
|
+
VIEW_TRANSITION_TAIL
|
|
30710
31019
|
]
|
|
30711
31020
|
},
|
|
30712
31021
|
extraction: {}
|
|
@@ -32443,6 +32752,7 @@ init_vietnamese();
|
|
|
32443
32752
|
init_chinese();
|
|
32444
32753
|
|
|
32445
32754
|
// src/parser/pattern-matcher.ts
|
|
32755
|
+
init_marker_resolution();
|
|
32446
32756
|
init_command_schemas();
|
|
32447
32757
|
|
|
32448
32758
|
// src/parser/utils/possessive-keywords.ts
|
|
@@ -32480,6 +32790,7 @@ init_base();
|
|
|
32480
32790
|
// src/parser/semantic-parser.ts
|
|
32481
32791
|
init_registry();
|
|
32482
32792
|
init_command_schemas();
|
|
32793
|
+
init_marker_resolution();
|
|
32483
32794
|
|
|
32484
32795
|
// src/parser/block-parser.ts
|
|
32485
32796
|
init_registry();
|