@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.mjs
CHANGED
|
@@ -5502,7 +5502,7 @@ function getSchema(action) {
|
|
|
5502
5502
|
function getDefinedSchemas() {
|
|
5503
5503
|
return Object.values(commandSchemas).filter((s) => s.roles.length > 0 || s.bareKeyword === true);
|
|
5504
5504
|
}
|
|
5505
|
-
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;
|
|
5505
|
+
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;
|
|
5506
5506
|
var init_command_schemas = __esm({
|
|
5507
5507
|
"src/generators/command-schemas.ts"() {
|
|
5508
5508
|
toggleSchema = {
|
|
@@ -5511,7 +5511,6 @@ var init_command_schemas = __esm({
|
|
|
5511
5511
|
category: "dom-class",
|
|
5512
5512
|
primaryRole: "patient",
|
|
5513
5513
|
// `toggle .active on #btn for 2s` \u2192 args ['.active'], modifiers { on, for }.
|
|
5514
|
-
// NOTE: `duration` is read here but not declared in `roles` below.
|
|
5515
5514
|
ast: { args: ["patient"], modifiers: { on: "destination", for: "duration" } },
|
|
5516
5515
|
roles: [
|
|
5517
5516
|
{
|
|
@@ -5521,7 +5520,13 @@ var init_command_schemas = __esm({
|
|
|
5521
5520
|
expectedTypes: ["selector"],
|
|
5522
5521
|
selectorKinds: ["class", "attribute"],
|
|
5523
5522
|
svoPosition: 1,
|
|
5524
|
-
sovPosition: 2
|
|
5523
|
+
sovPosition: 2,
|
|
5524
|
+
// zh: the transformer emits `\u5207\u6362 \u628a .active` (the profile's \u628a patient
|
|
5525
|
+
// marker), but natural zh writes `\u5207\u6362 .active` bare \u2014 the handcrafted
|
|
5526
|
+
// patterns' form. Optional accepts both; without it the generated
|
|
5527
|
+
// pattern REQUIRED \u628a and the slim bundles could not parse the bare
|
|
5528
|
+
// form at all. Same treatment as go's destination.
|
|
5529
|
+
markerOptional: { zh: true }
|
|
5525
5530
|
},
|
|
5526
5531
|
{
|
|
5527
5532
|
role: "destination",
|
|
@@ -5859,6 +5864,8 @@ var init_command_schemas = __esm({
|
|
|
5859
5864
|
markerOverride: {
|
|
5860
5865
|
en: "",
|
|
5861
5866
|
// No marker before destination in English: "set :x to 5"
|
|
5867
|
+
es: "",
|
|
5868
|
+
// "establecer x a 5" - no marker before variable (profile default `en` matched nothing)
|
|
5862
5869
|
ja: "\u3092",
|
|
5863
5870
|
// "x \u3092 10 \u306b \u8a2d\u5b9a" - variable gets object marker
|
|
5864
5871
|
ko: "\uB97C",
|
|
@@ -5881,9 +5888,19 @@ var init_command_schemas = __esm({
|
|
|
5881
5888
|
// generated hi set patterns carried the swapped markers and matched no
|
|
5882
5889
|
// corpus, so the whole hi set-family (set-text/inner-html/style/attribute)
|
|
5883
5890
|
// fell to the bare-event fallback (S6 set-trio).
|
|
5884
|
-
hi: "\u0915\u094B"
|
|
5891
|
+
hi: "\u0915\u094B",
|
|
5885
5892
|
// target (destination) gets \u0915\u094b
|
|
5886
|
-
|
|
5893
|
+
// zh: the transformer emits the verb-first BA form `\u8bbe\u7f6e \u628a X \u5230 V`
|
|
5894
|
+
// (\u628a before the variable), while natural zh writes `\u8bbe\u7f6e X \u4e3a V`
|
|
5895
|
+
// (unmarked). \u628a as the marker, optional below, accepts both. The
|
|
5896
|
+
// profile default \u5728 matched neither form, so the generated zh set
|
|
5897
|
+
// patterns were dead weight and the slim bundles (schema-generated
|
|
5898
|
+
// patterns only) could not parse set at all.
|
|
5899
|
+
zh: "\u628A"
|
|
5900
|
+
},
|
|
5901
|
+
// Accept the unmarked natural form alongside the transformer's \u628a form
|
|
5902
|
+
// (same treatment as go's destination).
|
|
5903
|
+
markerOptional: { zh: true }
|
|
5887
5904
|
},
|
|
5888
5905
|
{
|
|
5889
5906
|
role: "patient",
|
|
@@ -5926,8 +5943,14 @@ var init_command_schemas = __esm({
|
|
|
5926
5943
|
// "x \u0995\u09c7 10 \u09a4\u09c7 \u09b8\u09c7\u099f" - destination marker on value
|
|
5927
5944
|
qu: "man",
|
|
5928
5945
|
// "x ta 10 man churay" - destination marker on value
|
|
5929
|
-
hi: "\u092E\u0947\u0902"
|
|
5946
|
+
hi: "\u092E\u0947\u0902",
|
|
5930
5947
|
// value (patient) gets \u092e\u0947\u0902 \u2014 see the destination note above
|
|
5948
|
+
// zh: the transformer/corpus form marks the value with \u5230 (`\u8bbe\u7f6e \u628a X
|
|
5949
|
+
// \u5230 V`); natural zh uses \u4e3a (`\u8bbe\u7f6e X \u4e3a V`). \u5230 is the override,
|
|
5950
|
+
// the \u4e3a-family rides along as variants (all merged as alternatives
|
|
5951
|
+
// by schemaMarkerAlternatives). Profile default \u628a was the PATIENT
|
|
5952
|
+
// marker, which never precedes set's value in either form.
|
|
5953
|
+
zh: "\u5230"
|
|
5931
5954
|
},
|
|
5932
5955
|
// Turkish dative is allomorphic under vowel harmony: the i18n transformer
|
|
5933
5956
|
// emits `e` for quoted-string values (`"red" e`) but `-ya` for a value
|
|
@@ -5940,7 +5963,11 @@ var init_command_schemas = __esm({
|
|
|
5940
5963
|
// not parse as a bare command while `t\u0131klama da @disabled i do\u011fru ya
|
|
5941
5964
|
// ayarla` did. See STRUCTURAL_ARCS_ROADMAP.md (tr set-attribute).
|
|
5942
5965
|
markerVariants: {
|
|
5943
|
-
tr: ["e", "a", "ye", "ya"]
|
|
5966
|
+
tr: ["e", "a", "ye", "ya"],
|
|
5967
|
+
// Natural zh value markers (`\u8bbe\u7f6e X \u4e3a V`), simplified + traditional +
|
|
5968
|
+
// resultative \u2014 the handcrafted set-zh-full alternatives, kept parseable
|
|
5969
|
+
// alongside the transformer's \u5230 override above.
|
|
5970
|
+
zh: ["\u4E3A", "\u70BA", "\u6210"]
|
|
5944
5971
|
}
|
|
5945
5972
|
},
|
|
5946
5973
|
{
|
|
@@ -6602,8 +6629,8 @@ var init_command_schemas = __esm({
|
|
|
6602
6629
|
description: "Take content from a source element",
|
|
6603
6630
|
category: "dom-content",
|
|
6604
6631
|
primaryRole: "patient",
|
|
6605
|
-
// `take .active from #parent` \u2192 args ['.active'], modifiers { from
|
|
6606
|
-
ast: { args: ["patient"], modifiers: { from: "source" } },
|
|
6632
|
+
// `take .active from #parent for me` \u2192 args ['.active'], modifiers { from, for }.
|
|
6633
|
+
ast: { args: ["patient"], modifiers: { from: "source", for: "recipient" } },
|
|
6607
6634
|
roles: [
|
|
6608
6635
|
{
|
|
6609
6636
|
role: "patient",
|
|
@@ -6626,6 +6653,38 @@ var init_command_schemas = __esm({
|
|
|
6626
6653
|
expectedTypes: ["selector", "reference"],
|
|
6627
6654
|
svoPosition: 2,
|
|
6628
6655
|
sovPosition: 1
|
|
6656
|
+
},
|
|
6657
|
+
{
|
|
6658
|
+
role: "recipient",
|
|
6659
|
+
description: "The element the class moves ONTO (`take .active from .tab for me`)",
|
|
6660
|
+
required: false,
|
|
6661
|
+
// References only, deliberately. Upstream accepts an element expression,
|
|
6662
|
+
// but the 23 non-en corpus surfaces carry the recipient as a BARE
|
|
6663
|
+
// trailing pronoun (i18n renders `\u2026 von .tab-button ich`), so this slot
|
|
6664
|
+
// is marker-less almost everywhere and a selector-typed slot would
|
|
6665
|
+
// swallow the second selector of `take .active from .a .b`. English is
|
|
6666
|
+
// unaffected: `take` is on the core parser's skipSemanticParsing list,
|
|
6667
|
+
// so the traditional parser owns `for <anything>` there.
|
|
6668
|
+
expectedTypes: ["reference"],
|
|
6669
|
+
svoPosition: 3,
|
|
6670
|
+
sovPosition: 3,
|
|
6671
|
+
// NO default. The runtime already defaults the recipient to `me`
|
|
6672
|
+
// (commands/animation/take.ts), and a schema default would emit an
|
|
6673
|
+
// explicit `for me` modifier on every take \u2014 re-smuggling the exact
|
|
6674
|
+
// "absent means absent" semantics #859 removed from `source`.
|
|
6675
|
+
//
|
|
6676
|
+
// Shape-anchored on `reference`: without it this optional slot weighs
|
|
6677
|
+
// into every take pattern's denominator in `scoreRoleCoverage`, dropping
|
|
6678
|
+
// plain `take .active from .tab-button` from 1.0 to ~0.69 \u2014 the toggle-es
|
|
6679
|
+
// regression class the R1 role-set flip ratchet exists to catch.
|
|
6680
|
+
valueShape: "reference",
|
|
6681
|
+
// en only. The other 23 languages render the recipient unmarked, so a
|
|
6682
|
+
// marker there would never match their corpus rows; where the marker-less
|
|
6683
|
+
// slot proves inert they stay uncaptured and the pattern lands in the
|
|
6684
|
+
// baseline's `roleLossyPatterns` as named R1 burn-down tail. A language
|
|
6685
|
+
// gets a real particle here ONLY if the empty slot perturbs its other
|
|
6686
|
+
// parses (toggle's ja \u9593 / ko \ub3d9\uc548 case).
|
|
6687
|
+
markerOverride: { en: "for" }
|
|
6629
6688
|
}
|
|
6630
6689
|
]
|
|
6631
6690
|
};
|
|
@@ -7690,6 +7749,47 @@ var init_command_schemas = __esm({
|
|
|
7690
7749
|
}
|
|
7691
7750
|
]
|
|
7692
7751
|
};
|
|
7752
|
+
USING_VIEW_MARKER_ALL_LANGS = {
|
|
7753
|
+
en: "using view",
|
|
7754
|
+
es: "using view",
|
|
7755
|
+
pt: "using view",
|
|
7756
|
+
fr: "using view",
|
|
7757
|
+
de: "using view",
|
|
7758
|
+
it: "using view",
|
|
7759
|
+
ja: "using view",
|
|
7760
|
+
ko: "using view",
|
|
7761
|
+
zh: "using view",
|
|
7762
|
+
ar: "using view",
|
|
7763
|
+
he: "using view",
|
|
7764
|
+
hi: "using view",
|
|
7765
|
+
bn: "using view",
|
|
7766
|
+
tr: "using view",
|
|
7767
|
+
ru: "using view",
|
|
7768
|
+
uk: "using view",
|
|
7769
|
+
pl: "using view",
|
|
7770
|
+
id: "using view",
|
|
7771
|
+
vi: "using view",
|
|
7772
|
+
th: "using view",
|
|
7773
|
+
ms: "using view",
|
|
7774
|
+
tl: "using view",
|
|
7775
|
+
sw: "using view",
|
|
7776
|
+
qu: "using view"
|
|
7777
|
+
};
|
|
7778
|
+
VIEW_TRANSITION_MANNER_ROLE = {
|
|
7779
|
+
role: "manner",
|
|
7780
|
+
description: "Run the swap inside a `document.startViewTransition()` (`using view transition`)",
|
|
7781
|
+
required: false,
|
|
7782
|
+
// Both types, because the SAME word tokenizes differently per language and
|
|
7783
|
+
// the difference is an accident of vocabulary: `transition` is a command
|
|
7784
|
+
// keyword in en/fr (it is also their verb) and a bare identifier everywhere
|
|
7785
|
+
// else, which types it `literal` in the first group and `expression` in the
|
|
7786
|
+
// second. Measured: with `['literal']` alone only en and fr captured the
|
|
7787
|
+
// tail. Widening is safe precisely because the slot is marker-guarded \u2014
|
|
7788
|
+
// nothing reaches it until `using view` has matched.
|
|
7789
|
+
expectedTypes: ["literal", "expression"],
|
|
7790
|
+
valueShape: "keyword",
|
|
7791
|
+
markerOverride: USING_VIEW_MARKER_ALL_LANGS
|
|
7792
|
+
};
|
|
7693
7793
|
swapSchema = {
|
|
7694
7794
|
action: "swap",
|
|
7695
7795
|
description: "Swap DOM content using various strategies (innerHTML, outerHTML, delete, etc.)",
|
|
@@ -7710,7 +7810,11 @@ var init_command_schemas = __esm({
|
|
|
7710
7810
|
// work. Preserved verbatim by the Arc F migration (a faithful migration must
|
|
7711
7811
|
// not change output) and pinned as two `drift` exemptions; this is the
|
|
7712
7812
|
// behavior fix those entries were waiting for.
|
|
7713
|
-
|
|
7813
|
+
//
|
|
7814
|
+
// `manner` is the exception to "keyword-positional args": it rides as
|
|
7815
|
+
// `modifiers.viewTransition`, which SwapCommand.parseInput reads for presence
|
|
7816
|
+
// alongside its existing flat-args `using`/`view`/`transition` scan.
|
|
7817
|
+
ast: { args: ["method", "destination", "patient"], modifiers: { viewTransition: "manner" } },
|
|
7714
7818
|
roles: [
|
|
7715
7819
|
{
|
|
7716
7820
|
role: "method",
|
|
@@ -7805,6 +7909,11 @@ var init_command_schemas = __esm({
|
|
|
7805
7909
|
ar: "\u0628\u0640",
|
|
7806
7910
|
tl: "nang"
|
|
7807
7911
|
}
|
|
7912
|
+
},
|
|
7913
|
+
{
|
|
7914
|
+
...VIEW_TRANSITION_MANNER_ROLE,
|
|
7915
|
+
svoPosition: 4,
|
|
7916
|
+
sovPosition: 4
|
|
7808
7917
|
}
|
|
7809
7918
|
]
|
|
7810
7919
|
};
|
|
@@ -7815,7 +7924,15 @@ var init_command_schemas = __esm({
|
|
|
7815
7924
|
primaryRole: "patient",
|
|
7816
7925
|
// `morph #list to it` \u2192 args [content], modifiers { on: element }.
|
|
7817
7926
|
// Content is source or destination; the element being morphed is the patient.
|
|
7818
|
-
|
|
7927
|
+
//
|
|
7928
|
+
// `manner` rides as `modifiers.viewTransition`, same as swap/process \u2014
|
|
7929
|
+
// MorphCommand.parseInput reads it for presence alongside its existing
|
|
7930
|
+
// flat-args `using`/`view`/`transition` scan (the traditional-parser path,
|
|
7931
|
+
// which owns English because morph sits on SKIP_SEMANTIC_COMMANDS).
|
|
7932
|
+
ast: {
|
|
7933
|
+
args: [["source", "destination"]],
|
|
7934
|
+
modifiers: { on: "patient", viewTransition: "manner" }
|
|
7935
|
+
},
|
|
7819
7936
|
roles: [
|
|
7820
7937
|
{
|
|
7821
7938
|
role: "patient",
|
|
@@ -7836,6 +7953,18 @@ var init_command_schemas = __esm({
|
|
|
7836
7953
|
sovPosition: 2,
|
|
7837
7954
|
markerOverride: { en: "to" }
|
|
7838
7955
|
// "morph #target to it"
|
|
7956
|
+
},
|
|
7957
|
+
{
|
|
7958
|
+
// `morph #target to it using view transition` \u2014 the same tail as swap and
|
|
7959
|
+
// process, closed here for the same reason (#870's third-schema filing):
|
|
7960
|
+
// without the role the semantic parser matched morph at confidence 1.0
|
|
7961
|
+
// and stranded the tail, so every semantic-only consumer (multilingual
|
|
7962
|
+
// bundles, the bridge, `translate()`) silently dropped the animation
|
|
7963
|
+
// request in all 24 languages. Morph has NO hand-written patterns in any
|
|
7964
|
+
// language, so this schema role is the whole fix on the pattern side.
|
|
7965
|
+
...VIEW_TRANSITION_MANNER_ROLE,
|
|
7966
|
+
svoPosition: 3,
|
|
7967
|
+
sovPosition: 3
|
|
7839
7968
|
}
|
|
7840
7969
|
]
|
|
7841
7970
|
};
|
|
@@ -8022,6 +8151,13 @@ var init_command_schemas = __esm({
|
|
|
8022
8151
|
description: "Process hx-partial markup in HTML content",
|
|
8023
8152
|
category: "dom-content",
|
|
8024
8153
|
primaryRole: "patient",
|
|
8154
|
+
// `process partials in it` \u2192 args ['it']; the optional tail rides as
|
|
8155
|
+
// `modifiers.viewTransition`, which ProcessPartialsCommand.parseInput has
|
|
8156
|
+
// read since #861 (`raw.modifiers?.viewTransition !== undefined`). Without a
|
|
8157
|
+
// descriptor this schema fell through to `buildGenericCommand`, whose
|
|
8158
|
+
// modifier list is fixed (destination/duration/method/style) and would have
|
|
8159
|
+
// dropped a captured `manner` on the floor.
|
|
8160
|
+
ast: { args: ["patient"], modifiers: { viewTransition: "manner" } },
|
|
8025
8161
|
roles: [
|
|
8026
8162
|
{
|
|
8027
8163
|
role: "patient",
|
|
@@ -8031,6 +8167,11 @@ var init_command_schemas = __esm({
|
|
|
8031
8167
|
svoPosition: 1,
|
|
8032
8168
|
sovPosition: 1,
|
|
8033
8169
|
markerOverride: PARTIALS_IN_MARKER_ALL_LANGS
|
|
8170
|
+
},
|
|
8171
|
+
{
|
|
8172
|
+
...VIEW_TRANSITION_MANNER_ROLE,
|
|
8173
|
+
svoPosition: 2,
|
|
8174
|
+
sovPosition: 2
|
|
8034
8175
|
}
|
|
8035
8176
|
]
|
|
8036
8177
|
};
|
|
@@ -9486,7 +9627,9 @@ var init_french = __esm({
|
|
|
9486
9627
|
trigger: { primary: "d\xE9clencher", normalized: "trigger" },
|
|
9487
9628
|
send: { primary: "envoyer", alternatives: ["envoie"], normalized: "send" },
|
|
9488
9629
|
focus: { primary: "focaliser", alternatives: ["concentrer"], normalized: "focus" },
|
|
9489
|
-
|
|
9630
|
+
// `d\u00e9focaliser` is an unattested infinitive; French pedagogy writes
|
|
9631
|
+
// `perte de focus` for the event (2026-07 terminology review).
|
|
9632
|
+
blur: { primary: "perte de focus", alternatives: ["d\xE9focaliser"], normalized: "blur" },
|
|
9490
9633
|
// Phase 1 (v0.9.90): DOM / form state / debug
|
|
9491
9634
|
// `vide` (adjective, "empty") is the i18n transformer's `is empty` predicate
|
|
9492
9635
|
// form; `vider` is the verb ("to empty"). Accept both so the emptiness check
|
|
@@ -9499,7 +9642,13 @@ var init_french = __esm({
|
|
|
9499
9642
|
reset: { primary: "r\xE9initialiser", alternatives: ["reinitialiser"], normalized: "reset" },
|
|
9500
9643
|
breakpoint: { primary: "point-arr\xEAt", alternatives: ["point-arret"], normalized: "breakpoint" },
|
|
9501
9644
|
go: { primary: "aller", alternatives: ["naviguer", "va"], normalized: "go" },
|
|
9502
|
-
|
|
9645
|
+
// MDN fr and the OQLF standardize the noun `d\u00e9filement` for the event; the
|
|
9646
|
+
// infinitive stays as an alternative.
|
|
9647
|
+
scroll: {
|
|
9648
|
+
primary: "d\xE9filement",
|
|
9649
|
+
alternatives: ["defilement", "d\xE9filer", "faire-d\xE9filer"],
|
|
9650
|
+
normalized: "scroll"
|
|
9651
|
+
},
|
|
9503
9652
|
push: { primary: "pousser", normalized: "push" },
|
|
9504
9653
|
replace: { primary: "remplacer", normalized: "replace" },
|
|
9505
9654
|
process: { primary: "traiter", normalized: "process" },
|
|
@@ -9565,9 +9714,15 @@ var init_french = __esm({
|
|
|
9565
9714
|
after: { primary: "apr\xE8s", normalized: "after" },
|
|
9566
9715
|
// Common event names (for event handler patterns)
|
|
9567
9716
|
click: { primary: "clic", alternatives: ["clique"], normalized: "click" },
|
|
9568
|
-
// `resize` event (window-resize):
|
|
9569
|
-
// event
|
|
9570
|
-
|
|
9717
|
+
// `resize` event (window-resize): the noun `redimensionnement` is the
|
|
9718
|
+
// attested event form ("lors du redimensionnement de la fen\u00eatre"). The dict
|
|
9719
|
+
// still emits redimensionner, kept as an alternative so the event keeps
|
|
9720
|
+
// typing as literal="resize" (matching en) instead of expression.
|
|
9721
|
+
resize: {
|
|
9722
|
+
primary: "redimensionnement",
|
|
9723
|
+
alternatives: ["redimensionner"],
|
|
9724
|
+
normalized: "resize"
|
|
9725
|
+
},
|
|
9571
9726
|
hover: { primary: "survol", alternatives: ["survoler"], normalized: "hover" },
|
|
9572
9727
|
submit: { primary: "soumission", alternatives: ["soumettre"], normalized: "submit" },
|
|
9573
9728
|
input: { primary: "saisie", alternatives: ["entr\xE9e"], normalized: "input" },
|
|
@@ -13350,9 +13505,17 @@ var init_turkish = __esm({
|
|
|
13350
13505
|
on: { primary: "\xFCzerinde", alternatives: ["zaman"], normalized: "on" },
|
|
13351
13506
|
trigger: { primary: "tetikle", normalized: "trigger" },
|
|
13352
13507
|
send: { primary: "g\xF6nder", normalized: "send" },
|
|
13353
|
-
// DOM focus
|
|
13354
|
-
|
|
13355
|
-
|
|
13508
|
+
// DOM focus. `odaklanma` (the act of focusing) leads over the static state
|
|
13509
|
+
// noun `odak` \u2014 Turkish event prose says "odaklanma olay\u0131". `bulan\u0131k` was
|
|
13510
|
+
// the optical blur (CSS filters, image processing), never the DOM event;
|
|
13511
|
+
// native usage is `odak kayb\u0131` (loss of focus). 2026-07 terminology-review
|
|
13512
|
+
// corrections; old forms stay as parse alternatives.
|
|
13513
|
+
focus: { primary: "odaklanma", alternatives: ["odak"], normalized: "focus" },
|
|
13514
|
+
blur: {
|
|
13515
|
+
primary: "odak kayb\u0131",
|
|
13516
|
+
alternatives: ["odak kaybi", "bulan\u0131k", "bulan\u0131kl\u0131k", "bulanik"],
|
|
13517
|
+
normalized: "blur"
|
|
13518
|
+
},
|
|
13356
13519
|
// Phase 1 (v0.9.90): DOM / form state / debug
|
|
13357
13520
|
empty: { primary: "bo\u015Falt", alternatives: ["bosalt", "bo\u015F"], normalized: "empty" },
|
|
13358
13521
|
open: { primary: "a\xE7", alternatives: ["ac"], normalized: "open" },
|
|
@@ -13373,7 +13536,9 @@ var init_turkish = __esm({
|
|
|
13373
13536
|
},
|
|
13374
13537
|
hover: { primary: "\xFCzerine gelme", alternatives: ["\xFCzerinde gezinme"], normalized: "hover" },
|
|
13375
13538
|
submit: { primary: "g\xF6nderme", normalized: "submit" },
|
|
13376
|
-
|
|
13539
|
+
// `giri\u015f` reads as entry/login (giri\u015f yapma) and can imply an auth event;
|
|
13540
|
+
// the data-input term is `girdi` ("Girdi (Input) Eventleri").
|
|
13541
|
+
input: { primary: "girdi", alternatives: ["giri\u015F", "giris"], normalized: "input" },
|
|
13377
13542
|
change: { primary: "de\u011Fi\u015Fiklik", alternatives: ["de\u011Fi\u015Fim", "degisim"], normalized: "change" },
|
|
13378
13543
|
// `load` event: the i18n dict emits y\u00fckle for `load`. Without this keyword the
|
|
13379
13544
|
// SOV reorder's mid-stream `y\u00fckle de` (on load) tokenized as the `install`
|
|
@@ -13383,7 +13548,13 @@ var init_turkish = __esm({
|
|
|
13383
13548
|
load: { primary: "y\xFCkle", normalized: "load" },
|
|
13384
13549
|
// Navigation
|
|
13385
13550
|
go: { primary: "git", normalized: "go" },
|
|
13386
|
-
|
|
13551
|
+
// `kayd\u0131r` is the bare imperative; the attested event noun is `kayd\u0131rma`
|
|
13552
|
+
// ("kayd\u0131rma olay\u0131"). The imperative stays as an alternative.
|
|
13553
|
+
scroll: {
|
|
13554
|
+
primary: "kayd\u0131rma",
|
|
13555
|
+
alternatives: ["kaydirma", "kayd\u0131r", "kaydir"],
|
|
13556
|
+
normalized: "scroll"
|
|
13557
|
+
},
|
|
13387
13558
|
push: { primary: "itele", alternatives: ["push"], normalized: "push" },
|
|
13388
13559
|
replace: { primary: "de\u011Fi\u015Ftir_url", alternatives: ["degistir_url"], normalized: "replace" },
|
|
13389
13560
|
process: { primary: "i\u015Fle", alternatives: ["isle"], normalized: "process" },
|
|
@@ -14336,6 +14507,49 @@ var init_chinese = __esm({
|
|
|
14336
14507
|
}
|
|
14337
14508
|
});
|
|
14338
14509
|
|
|
14510
|
+
// src/parser/utils/marker-resolution.ts
|
|
14511
|
+
function resolveMarkerForRole(roleSpec, profile) {
|
|
14512
|
+
const overrideMarker = roleSpec.markerOverride?.[profile.code];
|
|
14513
|
+
const defaultMarker = profile.roleMarkers[roleSpec.role];
|
|
14514
|
+
if (overrideMarker !== void 0) {
|
|
14515
|
+
const alternatives = legacyMarkerAlternatives(roleSpec, profile.code, overrideMarker);
|
|
14516
|
+
return {
|
|
14517
|
+
primary: overrideMarker,
|
|
14518
|
+
...alternatives && { alternatives },
|
|
14519
|
+
position: defaultMarker?.position ?? "before",
|
|
14520
|
+
isOverride: true
|
|
14521
|
+
};
|
|
14522
|
+
}
|
|
14523
|
+
if (defaultMarker && defaultMarker.primary) {
|
|
14524
|
+
const result = {
|
|
14525
|
+
primary: defaultMarker.primary,
|
|
14526
|
+
position: defaultMarker.position,
|
|
14527
|
+
isOverride: false
|
|
14528
|
+
};
|
|
14529
|
+
if (defaultMarker.alternatives) {
|
|
14530
|
+
result.alternatives = defaultMarker.alternatives;
|
|
14531
|
+
}
|
|
14532
|
+
return result;
|
|
14533
|
+
}
|
|
14534
|
+
return null;
|
|
14535
|
+
}
|
|
14536
|
+
function legacyMarkerAlternatives(roleSpec, languageCode, overrideMarker) {
|
|
14537
|
+
const legacy = roleSpec.markerLegacy?.[languageCode];
|
|
14538
|
+
if (!legacy?.length) return void 0;
|
|
14539
|
+
const alternatives = [...new Set(legacy)].filter((a) => a && a !== overrideMarker);
|
|
14540
|
+
return alternatives.length ? alternatives : void 0;
|
|
14541
|
+
}
|
|
14542
|
+
function schemaMarkerAlternatives(roleSpec, languageCode, marker) {
|
|
14543
|
+
const legacy = roleSpec.markerLegacy?.[languageCode] ?? [];
|
|
14544
|
+
const variants = roleSpec.methodCarrier ? [] : roleSpec.markerVariants?.[languageCode] ?? [];
|
|
14545
|
+
const alternatives = [.../* @__PURE__ */ new Set([...legacy, ...variants])].filter((a) => a && a !== marker);
|
|
14546
|
+
return alternatives.length ? alternatives : void 0;
|
|
14547
|
+
}
|
|
14548
|
+
var init_marker_resolution = __esm({
|
|
14549
|
+
"src/parser/utils/marker-resolution.ts"() {
|
|
14550
|
+
}
|
|
14551
|
+
});
|
|
14552
|
+
|
|
14339
14553
|
// src/patterns/put.ts
|
|
14340
14554
|
function getPutPatternsBn() {
|
|
14341
14555
|
return [
|
|
@@ -29135,49 +29349,6 @@ var init_role_positioning = __esm({
|
|
|
29135
29349
|
}
|
|
29136
29350
|
});
|
|
29137
29351
|
|
|
29138
|
-
// src/parser/utils/marker-resolution.ts
|
|
29139
|
-
function resolveMarkerForRole(roleSpec, profile) {
|
|
29140
|
-
const overrideMarker = roleSpec.markerOverride?.[profile.code];
|
|
29141
|
-
const defaultMarker = profile.roleMarkers[roleSpec.role];
|
|
29142
|
-
if (overrideMarker !== void 0) {
|
|
29143
|
-
const alternatives = legacyMarkerAlternatives(roleSpec, profile.code, overrideMarker);
|
|
29144
|
-
return {
|
|
29145
|
-
primary: overrideMarker,
|
|
29146
|
-
...alternatives && { alternatives },
|
|
29147
|
-
position: defaultMarker?.position ?? "before",
|
|
29148
|
-
isOverride: true
|
|
29149
|
-
};
|
|
29150
|
-
}
|
|
29151
|
-
if (defaultMarker && defaultMarker.primary) {
|
|
29152
|
-
const result = {
|
|
29153
|
-
primary: defaultMarker.primary,
|
|
29154
|
-
position: defaultMarker.position,
|
|
29155
|
-
isOverride: false
|
|
29156
|
-
};
|
|
29157
|
-
if (defaultMarker.alternatives) {
|
|
29158
|
-
result.alternatives = defaultMarker.alternatives;
|
|
29159
|
-
}
|
|
29160
|
-
return result;
|
|
29161
|
-
}
|
|
29162
|
-
return null;
|
|
29163
|
-
}
|
|
29164
|
-
function legacyMarkerAlternatives(roleSpec, languageCode, overrideMarker) {
|
|
29165
|
-
const legacy = roleSpec.markerLegacy?.[languageCode];
|
|
29166
|
-
if (!legacy?.length) return void 0;
|
|
29167
|
-
const alternatives = [...new Set(legacy)].filter((a) => a && a !== overrideMarker);
|
|
29168
|
-
return alternatives.length ? alternatives : void 0;
|
|
29169
|
-
}
|
|
29170
|
-
function schemaMarkerAlternatives(roleSpec, languageCode, marker) {
|
|
29171
|
-
const legacy = roleSpec.markerLegacy?.[languageCode] ?? [];
|
|
29172
|
-
const variants = roleSpec.methodCarrier ? [] : roleSpec.markerVariants?.[languageCode] ?? [];
|
|
29173
|
-
const alternatives = [.../* @__PURE__ */ new Set([...legacy, ...variants])].filter((a) => a && a !== marker);
|
|
29174
|
-
return alternatives.length ? alternatives : void 0;
|
|
29175
|
-
}
|
|
29176
|
-
var init_marker_resolution = __esm({
|
|
29177
|
-
"src/parser/utils/marker-resolution.ts"() {
|
|
29178
|
-
}
|
|
29179
|
-
});
|
|
29180
|
-
|
|
29181
29352
|
// src/generators/event-handlers-sov.ts
|
|
29182
29353
|
function resolveRoleMarker(roleSpec, profile) {
|
|
29183
29354
|
let marker;
|
|
@@ -29211,6 +29382,44 @@ function appendOptionalScope(tokens, extraction, commandSchema) {
|
|
|
29211
29382
|
});
|
|
29212
29383
|
extraction.scope = { fromRole: "scope" };
|
|
29213
29384
|
}
|
|
29385
|
+
function appendOptionalViewTransition(tokens, extraction, commandSchema, languageCode) {
|
|
29386
|
+
appendOptionalTailRole(tokens, extraction, commandSchema, languageCode, "manner", {
|
|
29387
|
+
requireMarker: true
|
|
29388
|
+
});
|
|
29389
|
+
}
|
|
29390
|
+
function appendOptionalRecipient(tokens, extraction, commandSchema, languageCode) {
|
|
29391
|
+
appendOptionalTailRole(tokens, extraction, commandSchema, languageCode, "recipient", {
|
|
29392
|
+
requireMarker: false
|
|
29393
|
+
});
|
|
29394
|
+
}
|
|
29395
|
+
function appendOptionalTailRole(tokens, extraction, commandSchema, languageCode, role, opts) {
|
|
29396
|
+
const spec = commandSchema.roles.find((r) => r.role === role && !r.required);
|
|
29397
|
+
if (!spec) return;
|
|
29398
|
+
const marker = spec.markerOverride?.[languageCode];
|
|
29399
|
+
if (opts.requireMarker && !marker) return;
|
|
29400
|
+
tokens.push({
|
|
29401
|
+
type: "group",
|
|
29402
|
+
optional: true,
|
|
29403
|
+
tokens: [
|
|
29404
|
+
...(marker ? marker.split(/\s+/) : []).map((word) => ({
|
|
29405
|
+
type: "literal",
|
|
29406
|
+
value: word
|
|
29407
|
+
})),
|
|
29408
|
+
{
|
|
29409
|
+
type: "role",
|
|
29410
|
+
role,
|
|
29411
|
+
optional: true,
|
|
29412
|
+
expectedTypes: spec.expectedTypes,
|
|
29413
|
+
// Load-bearing, same as on the generated command patterns: it exempts
|
|
29414
|
+
// the trailing slot from the matcher's verb guard, keeps the uncaptured
|
|
29415
|
+
// slot out of `scoreRoleCoverage`'s denominator, and (for `keyword`)
|
|
29416
|
+
// normalizes the captured value type to the EN reference's `literal`.
|
|
29417
|
+
...spec.valueShape !== void 0 ? { valueShape: spec.valueShape } : {}
|
|
29418
|
+
}
|
|
29419
|
+
]
|
|
29420
|
+
});
|
|
29421
|
+
extraction[role] = { fromRole: role };
|
|
29422
|
+
}
|
|
29214
29423
|
function generateSOVEventHandlerPattern(commandSchema, profile, keyword, eventMarker, config) {
|
|
29215
29424
|
const tokens = [];
|
|
29216
29425
|
tokens.push({ type: "role", role: "event", optional: false });
|
|
@@ -29305,6 +29514,15 @@ function generateSOVPatientFirstEventHandlerPattern(commandSchema, profile, keyw
|
|
|
29305
29514
|
tokens.push(
|
|
29306
29515
|
...swapsOperands ? eventHandlerPatientGroup(commandSchema, trailingMarker) : eventHandlerDestinationGroup(commandSchema, trailingMarker)
|
|
29307
29516
|
);
|
|
29517
|
+
const extraction = {
|
|
29518
|
+
action: { value: commandSchema.action },
|
|
29519
|
+
event: { fromRole: "event" },
|
|
29520
|
+
[frontedRole]: { fromRole: frontedRole },
|
|
29521
|
+
...swapsOperands ? {} : eventHandlerDestinationExtraction(commandSchema),
|
|
29522
|
+
...eventHandlerSourceExtraction(commandSchema)
|
|
29523
|
+
};
|
|
29524
|
+
appendOptionalRecipient(tokens, extraction, commandSchema, profile.code);
|
|
29525
|
+
appendOptionalViewTransition(tokens, extraction, commandSchema, profile.code);
|
|
29308
29526
|
return {
|
|
29309
29527
|
id: `${commandSchema.action}-event-${profile.code}-sov-patient-first`,
|
|
29310
29528
|
language: profile.code,
|
|
@@ -29314,13 +29532,71 @@ function generateSOVPatientFirstEventHandlerPattern(commandSchema, profile, keyw
|
|
|
29314
29532
|
format: `{patient} ${patientMarker?.primary || ""} {event} ${eventMarker.primary} ${keyword.primary}`,
|
|
29315
29533
|
tokens
|
|
29316
29534
|
},
|
|
29317
|
-
extraction
|
|
29318
|
-
|
|
29319
|
-
|
|
29320
|
-
|
|
29321
|
-
|
|
29322
|
-
|
|
29535
|
+
extraction
|
|
29536
|
+
};
|
|
29537
|
+
}
|
|
29538
|
+
function generateSOVPatientFirstSourceFrontedEventHandlerPattern(commandSchema, profile, keyword, eventMarker, config) {
|
|
29539
|
+
const sourceSpec = commandSchema.roles.find((r) => r.role === "source");
|
|
29540
|
+
if (!sourceSpec) return null;
|
|
29541
|
+
const { marker: sourceMarker, alternatives: sourceAlts } = resolveRoleMarker(sourceSpec, profile);
|
|
29542
|
+
const patientMarker = profile.roleMarkers.patient;
|
|
29543
|
+
if (!sourceMarker) return null;
|
|
29544
|
+
if (sourceMarker === eventMarker.primary || sourceMarker === patientMarker?.primary) return null;
|
|
29545
|
+
const tokens = [];
|
|
29546
|
+
tokens.push({ type: "role", role: "patient", optional: false });
|
|
29547
|
+
if (patientMarker) {
|
|
29548
|
+
tokens.push(
|
|
29549
|
+
patientMarker.alternatives ? {
|
|
29550
|
+
type: "literal",
|
|
29551
|
+
value: patientMarker.primary,
|
|
29552
|
+
alternatives: patientMarker.alternatives
|
|
29553
|
+
} : { type: "literal", value: patientMarker.primary }
|
|
29554
|
+
);
|
|
29555
|
+
}
|
|
29556
|
+
tokens.push({
|
|
29557
|
+
type: "role",
|
|
29558
|
+
role: "source",
|
|
29559
|
+
optional: false,
|
|
29560
|
+
...sourceSpec.expectedTypes ? { expectedTypes: sourceSpec.expectedTypes } : {},
|
|
29561
|
+
...sourceSpec.valueShape !== void 0 ? { valueShape: sourceSpec.valueShape } : {}
|
|
29562
|
+
});
|
|
29563
|
+
for (const word of sourceMarker.split(/\s+/)) {
|
|
29564
|
+
tokens.push(
|
|
29565
|
+
sourceAlts && sourceMarker.split(/\s+/).length === 1 ? { type: "literal", value: word, alternatives: sourceAlts } : { type: "literal", value: word }
|
|
29566
|
+
);
|
|
29567
|
+
}
|
|
29568
|
+
tokens.push({ type: "role", role: "event", optional: false });
|
|
29569
|
+
if (eventMarker.position === "after") {
|
|
29570
|
+
const markerWords = eventMarker.primary.split(/\s+/);
|
|
29571
|
+
if (markerWords.length > 1) {
|
|
29572
|
+
for (const word of markerWords) tokens.push({ type: "literal", value: word });
|
|
29573
|
+
} else {
|
|
29574
|
+
tokens.push(
|
|
29575
|
+
eventMarker.alternatives ? { type: "literal", value: eventMarker.primary, alternatives: eventMarker.alternatives } : { type: "literal", value: eventMarker.primary }
|
|
29576
|
+
);
|
|
29323
29577
|
}
|
|
29578
|
+
}
|
|
29579
|
+
tokens.push(
|
|
29580
|
+
keyword.alternatives ? { type: "literal", value: keyword.primary, alternatives: keyword.alternatives } : { type: "literal", value: keyword.primary }
|
|
29581
|
+
);
|
|
29582
|
+
const extraction = {
|
|
29583
|
+
action: { value: commandSchema.action },
|
|
29584
|
+
event: { fromRole: "event" },
|
|
29585
|
+
patient: { fromRole: "patient" },
|
|
29586
|
+
source: { fromRole: "source" }
|
|
29587
|
+
};
|
|
29588
|
+
appendOptionalRecipient(tokens, extraction, commandSchema, profile.code);
|
|
29589
|
+
appendOptionalViewTransition(tokens, extraction, commandSchema, profile.code);
|
|
29590
|
+
return {
|
|
29591
|
+
id: `${commandSchema.action}-event-${profile.code}-sov-source-fronted`,
|
|
29592
|
+
language: profile.code,
|
|
29593
|
+
command: "on",
|
|
29594
|
+
priority: (config.basePriority ?? 100) + 48,
|
|
29595
|
+
template: {
|
|
29596
|
+
format: `{patient} ${patientMarker?.primary || ""} {source} ${sourceMarker} {event} ${eventMarker.primary} ${keyword.primary}`,
|
|
29597
|
+
tokens
|
|
29598
|
+
},
|
|
29599
|
+
extraction
|
|
29324
29600
|
};
|
|
29325
29601
|
}
|
|
29326
29602
|
function generateSOVPatientFirstWithDestEventHandlerPattern(commandSchema, profile, keyword, eventMarker, config) {
|
|
@@ -29762,6 +30038,16 @@ function generateVSOVerbFirstEventHandlerPattern(commandSchema, profile, keyword
|
|
|
29762
30038
|
});
|
|
29763
30039
|
}
|
|
29764
30040
|
}
|
|
30041
|
+
const extraction = {
|
|
30042
|
+
action: { value: commandSchema.action },
|
|
30043
|
+
event: { fromRole: "event" },
|
|
30044
|
+
[swapsOperands ? "destination" : "patient"]: {
|
|
30045
|
+
fromRole: swapsOperands ? "destination" : "patient"
|
|
30046
|
+
},
|
|
30047
|
+
...swapsOperands ? {} : eventHandlerDestinationExtraction(commandSchema),
|
|
30048
|
+
...eventHandlerSourceExtraction(commandSchema)
|
|
30049
|
+
};
|
|
30050
|
+
appendOptionalViewTransition(tokens, extraction, commandSchema, profile.code);
|
|
29765
30051
|
return {
|
|
29766
30052
|
id: `${commandSchema.action}-event-${profile.code}-vso-verb-first`,
|
|
29767
30053
|
language: profile.code,
|
|
@@ -29772,15 +30058,7 @@ function generateVSOVerbFirstEventHandlerPattern(commandSchema, profile, keyword
|
|
|
29772
30058
|
format: `${keyword.primary} {patient} ${destMarker?.primary || ""} {destination?} ${eventMarker.primary} {event}`,
|
|
29773
30059
|
tokens
|
|
29774
30060
|
},
|
|
29775
|
-
extraction
|
|
29776
|
-
action: { value: commandSchema.action },
|
|
29777
|
-
event: { fromRole: "event" },
|
|
29778
|
-
[swapsOperands ? "destination" : "patient"]: {
|
|
29779
|
-
fromRole: swapsOperands ? "destination" : "patient"
|
|
29780
|
-
},
|
|
29781
|
-
...swapsOperands ? {} : eventHandlerDestinationExtraction(commandSchema),
|
|
29782
|
-
...eventHandlerSourceExtraction(commandSchema)
|
|
29783
|
-
}
|
|
30061
|
+
extraction
|
|
29784
30062
|
};
|
|
29785
30063
|
}
|
|
29786
30064
|
function generateVSOVerbFirstTwoRoleEventHandlerPattern(commandSchema, profile, keyword, eventMarker, config) {
|
|
@@ -30196,6 +30474,14 @@ function generateEventHandlerPatterns(commandSchema, profile, config = defaultCo
|
|
|
30196
30474
|
config
|
|
30197
30475
|
)
|
|
30198
30476
|
);
|
|
30477
|
+
const sourceFronted = generateSOVPatientFirstSourceFrontedEventHandlerPattern(
|
|
30478
|
+
commandSchema,
|
|
30479
|
+
profile,
|
|
30480
|
+
keyword,
|
|
30481
|
+
eventMarker,
|
|
30482
|
+
config
|
|
30483
|
+
);
|
|
30484
|
+
if (sourceFronted) patterns.push(sourceFronted);
|
|
30199
30485
|
const destMarkerCheck = profile.roleMarkers.destination;
|
|
30200
30486
|
if (destMarkerCheck && destMarkerCheck.primary !== eventMarker.primary) {
|
|
30201
30487
|
patterns.push(
|
|
@@ -30355,7 +30641,11 @@ function buildRoleToken(roleSpec, profile) {
|
|
|
30355
30641
|
type: "role",
|
|
30356
30642
|
role: roleSpec.role,
|
|
30357
30643
|
optional: !roleSpec.required,
|
|
30358
|
-
expectedTypes: roleSpec.expectedTypes
|
|
30644
|
+
expectedTypes: roleSpec.expectedTypes,
|
|
30645
|
+
// The matcher reads this too \u2014 a `'keyword'`-shaped slot holds a fixed
|
|
30646
|
+
// keyword phrase (`using view transition`) and must not be skipped by the
|
|
30647
|
+
// trailing-slot verb guard.
|
|
30648
|
+
...roleSpec.valueShape !== void 0 ? { valueShape: roleSpec.valueShape } : {}
|
|
30359
30649
|
};
|
|
30360
30650
|
const prefixLiteral = roleSpec.valuePrefixLiteral?.[profile.code];
|
|
30361
30651
|
const pushPrefixed = () => {
|
|
@@ -30636,9 +30926,24 @@ var init_pick = __esm({
|
|
|
30636
30926
|
});
|
|
30637
30927
|
|
|
30638
30928
|
// src/patterns/languages/en/swap.ts
|
|
30639
|
-
var swapSimpleEnglish, swapElementEnglish, swapStrategyOfEnglish, swapStrategyEnglish, swapPatternsEn;
|
|
30929
|
+
var VIEW_TRANSITION_TAIL, swapSimpleEnglish, swapElementEnglish, swapStrategyOfEnglish, swapStrategyEnglish, swapPatternsEn;
|
|
30640
30930
|
var init_swap = __esm({
|
|
30641
30931
|
"src/patterns/languages/en/swap.ts"() {
|
|
30932
|
+
VIEW_TRANSITION_TAIL = {
|
|
30933
|
+
type: "group",
|
|
30934
|
+
optional: true,
|
|
30935
|
+
tokens: [
|
|
30936
|
+
{ type: "literal", value: "using" },
|
|
30937
|
+
{ type: "literal", value: "view" },
|
|
30938
|
+
{
|
|
30939
|
+
type: "role",
|
|
30940
|
+
role: "manner",
|
|
30941
|
+
optional: true,
|
|
30942
|
+
expectedTypes: ["literal", "expression"],
|
|
30943
|
+
valueShape: "keyword"
|
|
30944
|
+
}
|
|
30945
|
+
]
|
|
30946
|
+
};
|
|
30642
30947
|
swapSimpleEnglish = {
|
|
30643
30948
|
id: "swap-en-handcrafted",
|
|
30644
30949
|
language: "en",
|
|
@@ -30646,11 +30951,12 @@ var init_swap = __esm({
|
|
|
30646
30951
|
priority: 110,
|
|
30647
30952
|
// Higher than generated patterns
|
|
30648
30953
|
template: {
|
|
30649
|
-
format: "swap {method} {destination}",
|
|
30954
|
+
format: "swap {method} {destination} [using view {manner}]",
|
|
30650
30955
|
tokens: [
|
|
30651
30956
|
{ type: "literal", value: "swap" },
|
|
30652
30957
|
{ type: "role", role: "method" },
|
|
30653
|
-
{ type: "role", role: "destination" }
|
|
30958
|
+
{ type: "role", role: "destination" },
|
|
30959
|
+
VIEW_TRANSITION_TAIL
|
|
30654
30960
|
]
|
|
30655
30961
|
},
|
|
30656
30962
|
extraction: {
|
|
@@ -30664,12 +30970,13 @@ var init_swap = __esm({
|
|
|
30664
30970
|
command: "swap",
|
|
30665
30971
|
priority: 120,
|
|
30666
30972
|
template: {
|
|
30667
|
-
format: "swap {destination} with {patient}",
|
|
30973
|
+
format: "swap {destination} with {patient} [using view {manner}]",
|
|
30668
30974
|
tokens: [
|
|
30669
30975
|
{ type: "literal", value: "swap" },
|
|
30670
30976
|
{ type: "role", role: "destination" },
|
|
30671
30977
|
{ type: "literal", value: "with" },
|
|
30672
|
-
{ type: "role", role: "patient" }
|
|
30978
|
+
{ type: "role", role: "patient" },
|
|
30979
|
+
VIEW_TRANSITION_TAIL
|
|
30673
30980
|
]
|
|
30674
30981
|
},
|
|
30675
30982
|
extraction: {}
|
|
@@ -30680,14 +30987,15 @@ var init_swap = __esm({
|
|
|
30680
30987
|
command: "swap",
|
|
30681
30988
|
priority: 140,
|
|
30682
30989
|
template: {
|
|
30683
|
-
format: "swap {method} of {destination} with {patient}",
|
|
30990
|
+
format: "swap {method} of {destination} with {patient} [using view {manner}]",
|
|
30684
30991
|
tokens: [
|
|
30685
30992
|
{ type: "literal", value: "swap" },
|
|
30686
30993
|
{ type: "role", role: "method" },
|
|
30687
30994
|
{ type: "literal", value: "of" },
|
|
30688
30995
|
{ type: "role", role: "destination" },
|
|
30689
30996
|
{ type: "literal", value: "with" },
|
|
30690
|
-
{ type: "role", role: "patient" }
|
|
30997
|
+
{ type: "role", role: "patient" },
|
|
30998
|
+
VIEW_TRANSITION_TAIL
|
|
30691
30999
|
]
|
|
30692
31000
|
},
|
|
30693
31001
|
extraction: {}
|
|
@@ -30698,13 +31006,14 @@ var init_swap = __esm({
|
|
|
30698
31006
|
command: "swap",
|
|
30699
31007
|
priority: 130,
|
|
30700
31008
|
template: {
|
|
30701
|
-
format: "swap {method} {destination} with {patient}",
|
|
31009
|
+
format: "swap {method} {destination} with {patient} [using view {manner}]",
|
|
30702
31010
|
tokens: [
|
|
30703
31011
|
{ type: "literal", value: "swap" },
|
|
30704
31012
|
{ type: "role", role: "method" },
|
|
30705
31013
|
{ type: "role", role: "destination" },
|
|
30706
31014
|
{ type: "literal", value: "with" },
|
|
30707
|
-
{ type: "role", role: "patient" }
|
|
31015
|
+
{ type: "role", role: "patient" },
|
|
31016
|
+
VIEW_TRANSITION_TAIL
|
|
30708
31017
|
]
|
|
30709
31018
|
},
|
|
30710
31019
|
extraction: {}
|
|
@@ -32441,6 +32750,7 @@ init_vietnamese();
|
|
|
32441
32750
|
init_chinese();
|
|
32442
32751
|
|
|
32443
32752
|
// src/parser/pattern-matcher.ts
|
|
32753
|
+
init_marker_resolution();
|
|
32444
32754
|
init_command_schemas();
|
|
32445
32755
|
|
|
32446
32756
|
// src/parser/utils/possessive-keywords.ts
|
|
@@ -32478,6 +32788,7 @@ init_base();
|
|
|
32478
32788
|
// src/parser/semantic-parser.ts
|
|
32479
32789
|
init_registry();
|
|
32480
32790
|
init_command_schemas();
|
|
32791
|
+
init_marker_resolution();
|
|
32481
32792
|
|
|
32482
32793
|
// src/parser/block-parser.ts
|
|
32483
32794
|
init_registry();
|