@lokascript/compilation-service 2.10.0 → 2.11.1

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.
@@ -2,11 +2,11 @@ import {
2
2
  CoreParserAdapter,
3
3
  convertCoreASTToAOT,
4
4
  createCoreParserAdapter
5
- } from "./chunk-SB5NPMTN.js";
5
+ } from "./chunk-BDISUJ32.js";
6
6
  import "./chunk-GBPMR66W.js";
7
7
  export {
8
8
  CoreParserAdapter,
9
9
  convertCoreASTToAOT,
10
10
  createCoreParserAdapter
11
11
  };
12
- //# sourceMappingURL=core-parser-adapter-VCJB52SO-3GSEHXCZ.js.map
12
+ //# sourceMappingURL=core-parser-adapter-VCJB52SO-W3GDT5C6.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CoreParserAdapter,
3
3
  createCoreParserAdapter
4
- } from "./chunk-SB5NPMTN.js";
4
+ } from "./chunk-BDISUJ32.js";
5
5
  import {
6
6
  SemanticParserAdapter,
7
7
  createSemanticAdapter
@@ -4214,7 +4214,7 @@ async function compileHyperscript(code, options) {
4214
4214
  async function createMultilingualCompiler() {
4215
4215
  const compiler = new AOTCompiler();
4216
4216
  try {
4217
- const { createCoreParserAdapter: createCoreParserAdapter2 } = await import("./core-parser-adapter-VCJB52SO-3GSEHXCZ.js");
4217
+ const { createCoreParserAdapter: createCoreParserAdapter2 } = await import("./core-parser-adapter-VCJB52SO-W3GDT5C6.js");
4218
4218
  compiler.setParser(await createCoreParserAdapter2());
4219
4219
  } catch {
4220
4220
  }
@@ -4267,4 +4267,4 @@ export {
4267
4267
  sanitizeSelector,
4268
4268
  scanFiles
4269
4269
  };
4270
- //# sourceMappingURL=dist-CIDZTZVT.js.map
4270
+ //# sourceMappingURL=dist-4JWIJVFR.js.map
@@ -8191,6 +8191,12 @@ function createChildContext(parent, element) {
8191
8191
  function isHTMLElement$2(value) {
8192
8192
  return value !== null && typeof value === "object" && "nodeType" in value && value.nodeType === 1 && "tagName" in value && typeof value.tagName === "string" && "classList" in value;
8193
8193
  }
8194
+ function isInsertableNode(value) {
8195
+ if (value === null || typeof value !== "object")
8196
+ return false;
8197
+ const nodeType = value.nodeType;
8198
+ return nodeType === 1 || nodeType === 3 || nodeType === 11;
8199
+ }
8194
8200
  function isNodeList(value) {
8195
8201
  return value !== null && typeof value === "object" && "length" in value && typeof value.length === "number" && (Symbol.iterator in value || typeof value.item === "function");
8196
8202
  }
@@ -9962,6 +9968,11 @@ function evaluateLiteral(node) {
9962
9968
  }
9963
9969
  async function evaluateIdentifier(node, context) {
9964
9970
  const name = node.name;
9971
+ if (name.startsWith("$")) {
9972
+ notifyGlobalRead(name.slice(1), context);
9973
+ } else if (node.scope === "global") {
9974
+ notifyGlobalRead(name, context);
9975
+ }
9965
9976
  if (name === "me" || name === "my" || name === "I") {
9966
9977
  return getExpr(context, "me").evaluate(context);
9967
9978
  }
@@ -9981,7 +9992,6 @@ async function evaluateIdentifier(node, context) {
9981
9992
  return getExpr(context, "document").evaluate(context);
9982
9993
  }
9983
9994
  if (node.scope === "global" && context.globals?.has(name)) {
9984
- notifyGlobalRead(name, context);
9985
9995
  return context.globals.get(name);
9986
9996
  }
9987
9997
  if (node.scope === "element") {
@@ -9992,12 +10002,9 @@ async function evaluateIdentifier(node, context) {
9992
10002
  return context.locals.get(name);
9993
10003
  }
9994
10004
  if (context.globals && context.globals.has(name)) {
9995
- if (name.startsWith("$"))
9996
- notifyGlobalRead(name.slice(1), context);
9997
10005
  return context.globals.get(name);
9998
10006
  }
9999
10007
  if (name.startsWith("$") && context.globals && context.globals.has(name.slice(1))) {
10000
- notifyGlobalRead(name.slice(1), context);
10001
10008
  return context.globals.get(name.slice(1));
10002
10009
  }
10003
10010
  if (context[name] !== void 0) {
@@ -16833,7 +16840,7 @@ function insertContent(target, content, position) {
16833
16840
  insertReplace(target, content);
16834
16841
  return;
16835
16842
  }
16836
- if (isHTMLElement$2(content)) {
16843
+ if (isInsertableNode(content)) {
16837
16844
  insertElement(target, content, position);
16838
16845
  } else {
16839
16846
  insertText(target, content, position);
@@ -16843,7 +16850,7 @@ function insertContentSemantic(target, content, position) {
16843
16850
  insertContent(target, content, toInsertPosition(position));
16844
16851
  }
16845
16852
  function insertReplace(target, content) {
16846
- if (isHTMLElement$2(content)) {
16853
+ if (isInsertableNode(content)) {
16847
16854
  target.innerHTML = "";
16848
16855
  target.appendChild(content);
16849
16856
  } else {
@@ -16887,6 +16894,52 @@ function insertText(target, content, position) {
16887
16894
  target.insertAdjacentText(domPosition, content);
16888
16895
  }
16889
16896
  }
16897
+ function moveOrInsert(parent, element, ref) {
16898
+ const p = parent;
16899
+ if (typeof p.moveBefore === "function" && element.isConnected && parent.isConnected) {
16900
+ try {
16901
+ p.moveBefore(element, ref);
16902
+ return;
16903
+ } catch {
16904
+ }
16905
+ }
16906
+ parent.insertBefore(element, ref);
16907
+ }
16908
+ function insertElementsInOrder(target, elements, position) {
16909
+ switch (position) {
16910
+ case "beforeend":
16911
+ for (const el of elements)
16912
+ moveOrInsert(target, el, null);
16913
+ break;
16914
+ case "afterbegin":
16915
+ for (let i = elements.length - 1; i >= 0; i--) {
16916
+ moveOrInsert(target, elements[i], target.firstChild);
16917
+ }
16918
+ break;
16919
+ case "beforebegin": {
16920
+ const parent = target.parentElement;
16921
+ if (!parent)
16922
+ return;
16923
+ for (const el of elements)
16924
+ moveOrInsert(parent, el, target);
16925
+ break;
16926
+ }
16927
+ case "afterend": {
16928
+ const parent = target.parentElement;
16929
+ if (!parent)
16930
+ return;
16931
+ for (let i = elements.length - 1; i >= 0; i--) {
16932
+ moveOrInsert(parent, elements[i], target.nextSibling);
16933
+ }
16934
+ break;
16935
+ }
16936
+ case "replace":
16937
+ target.innerHTML = "";
16938
+ for (const el of elements)
16939
+ moveOrInsert(target, el, null);
16940
+ break;
16941
+ }
16942
+ }
16890
16943
  function removeElement(element) {
16891
16944
  if (element.parentNode) {
16892
16945
  element.remove();
@@ -17916,7 +17969,11 @@ var PutCommand = (() => {
17916
17969
  } else {
17917
17970
  for (const t of targets) {
17918
17971
  const content = this.parseValue(value);
17919
- insertContentSemantic(t, content, position);
17972
+ if (Array.isArray(content)) {
17973
+ insertElementsInOrder(t, content, toInsertPosition(position));
17974
+ } else {
17975
+ insertContentSemantic(t, content, position);
17976
+ }
17920
17977
  }
17921
17978
  }
17922
17979
  return targets;
@@ -17948,6 +18005,11 @@ var PutCommand = (() => {
17948
18005
  parseValue(v2) {
17949
18006
  if (isHTMLElement$2(v2))
17950
18007
  return v2;
18008
+ if (Array.isArray(v2) && v2.length > 0 && v2.every(isHTMLElement$2)) {
18009
+ return v2;
18010
+ }
18011
+ if (isInsertableNode(v2))
18012
+ return v2;
17951
18013
  return v2 == null ? "" : String(v2);
17952
18014
  }
17953
18015
  looksLikeCss(s) {
@@ -19144,7 +19206,8 @@ var morphAdapter = {
19144
19206
  function getStartViewTransition() {
19145
19207
  if (typeof document === "undefined")
19146
19208
  return void 0;
19147
- return document.startViewTransition;
19209
+ const fn = document.startViewTransition;
19210
+ return typeof fn === "function" ? fn.bind(document) : void 0;
19148
19211
  }
19149
19212
  function isViewTransitionsSupported() {
19150
19213
  return typeof getStartViewTransition() === "function";
@@ -25915,6 +25978,7 @@ var Runtime = class extends RuntimeBase {
25915
25978
  return this.registry;
25916
25979
  }
25917
25980
  };
25981
+ var VERSION$1 = "2.11.1";
25918
25982
  function createLiteral$1(value, dataType) {
25919
25983
  return dataType ? { type: "literal", value, dataType } : { type: "literal", value };
25920
25984
  }
@@ -30192,14 +30256,26 @@ var MultilingualDSLImpl = class {
30192
30256
  }
30193
30257
  translate(input, fromLanguage, toLanguage) {
30194
30258
  if (isExplicitSyntax$1(input)) return input;
30195
- for (const language of [fromLanguage, toLanguage]) {
30196
- if (!this.profileProvider.getProfile(language)) {
30197
- throw new Error(
30198
- `translate() requires a grammar profile for language "${language}", but none is configured. Set 'grammarProfile' on the LanguageConfig for "${language}" in createMultilingualDSL() (parse/validate/compile do not need it), or inject a custom 'profileProvider'.`
30199
- );
30259
+ let node;
30260
+ try {
30261
+ node = this.parseWithConfidence(input, fromLanguage).node;
30262
+ } catch (parseError) {
30263
+ if (this.hasGrammarProfile(fromLanguage) && this.hasGrammarProfile(toLanguage)) {
30264
+ return this.transformer.transform(input, fromLanguage, toLanguage);
30200
30265
  }
30266
+ throw parseError;
30201
30267
  }
30202
- return this.transformer.transform(input, fromLanguage, toLanguage);
30268
+ const rendered = this.registry.getSupportedLanguages().includes(toLanguage) ? this.render(node, toLanguage) : null;
30269
+ if (rendered != null) return rendered;
30270
+ if (this.hasGrammarProfile(fromLanguage) && this.hasGrammarProfile(toLanguage)) {
30271
+ return this.transformer.transform(input, fromLanguage, toLanguage);
30272
+ }
30273
+ throw new Error(
30274
+ `translate() could not render action "${node.action}" in language "${toLanguage}": no custom renderer, domain renderer, or schema pattern covers it, and no grammar profile is configured for the transformer fallback. Either add "${toLanguage}" to the DSL's languages/renderer, or set 'grammarProfile' on its LanguageConfig in createMultilingualDSL() (parse/validate/compile do not need it).`
30275
+ );
30276
+ }
30277
+ hasGrammarProfile(language) {
30278
+ return this.profileProvider.getProfile(language) != null;
30203
30279
  }
30204
30280
  compile(input, language) {
30205
30281
  if (!this.codeGenerator) {
@@ -34485,7 +34561,13 @@ var init_command_schemas = __esm({
34485
34561
  expectedTypes: ["selector"],
34486
34562
  selectorKinds: ["class", "attribute"],
34487
34563
  svoPosition: 1,
34488
- sovPosition: 2
34564
+ sovPosition: 2,
34565
+ // zh: the transformer emits `\u5207\u6362 \u628a .active` (the profile's \u628a patient
34566
+ // marker), but natural zh writes `\u5207\u6362 .active` bare \u2014 the handcrafted
34567
+ // patterns' form. Optional accepts both; without it the generated
34568
+ // pattern REQUIRED \u628a and the slim bundles could not parse the bare
34569
+ // form at all. Same treatment as go's destination.
34570
+ markerOptional: { zh: true }
34489
34571
  },
34490
34572
  {
34491
34573
  role: "destination",
@@ -34823,6 +34905,8 @@ var init_command_schemas = __esm({
34823
34905
  markerOverride: {
34824
34906
  en: "",
34825
34907
  // No marker before destination in English: "set :x to 5"
34908
+ es: "",
34909
+ // "establecer x a 5" - no marker before variable (profile default `en` matched nothing)
34826
34910
  ja: "\u3092",
34827
34911
  // "x \u3092 10 \u306b \u8a2d\u5b9a" - variable gets object marker
34828
34912
  ko: "\uB97C",
@@ -34845,9 +34929,19 @@ var init_command_schemas = __esm({
34845
34929
  // generated hi set patterns carried the swapped markers and matched no
34846
34930
  // corpus, so the whole hi set-family (set-text/inner-html/style/attribute)
34847
34931
  // fell to the bare-event fallback (S6 set-trio).
34848
- hi: "\u0915\u094B"
34932
+ hi: "\u0915\u094B",
34849
34933
  // target (destination) gets \u0915\u094b
34850
- }
34934
+ // zh: the transformer emits the verb-first BA form `\u8bbe\u7f6e \u628a X \u5230 V`
34935
+ // (\u628a before the variable), while natural zh writes `\u8bbe\u7f6e X \u4e3a V`
34936
+ // (unmarked). \u628a as the marker, optional below, accepts both. The
34937
+ // profile default \u5728 matched neither form, so the generated zh set
34938
+ // patterns were dead weight and the slim bundles (schema-generated
34939
+ // patterns only) could not parse set at all.
34940
+ zh: "\u628A"
34941
+ },
34942
+ // Accept the unmarked natural form alongside the transformer's \u628a form
34943
+ // (same treatment as go's destination).
34944
+ markerOptional: { zh: true }
34851
34945
  },
34852
34946
  {
34853
34947
  role: "patient",
@@ -34890,8 +34984,14 @@ var init_command_schemas = __esm({
34890
34984
  // "x \u0995\u09c7 10 \u09a4\u09c7 \u09b8\u09c7\u099f" - destination marker on value
34891
34985
  qu: "man",
34892
34986
  // "x ta 10 man churay" - destination marker on value
34893
- hi: "\u092E\u0947\u0902"
34987
+ hi: "\u092E\u0947\u0902",
34894
34988
  // value (patient) gets \u092e\u0947\u0902 \u2014 see the destination note above
34989
+ // zh: the transformer/corpus form marks the value with \u5230 (`\u8bbe\u7f6e \u628a X
34990
+ // \u5230 V`); natural zh uses \u4e3a (`\u8bbe\u7f6e X \u4e3a V`). \u5230 is the override,
34991
+ // the \u4e3a-family rides along as variants (all merged as alternatives
34992
+ // by schemaMarkerAlternatives). Profile default \u628a was the PATIENT
34993
+ // marker, which never precedes set's value in either form.
34994
+ zh: "\u5230"
34895
34995
  },
34896
34996
  // Turkish dative is allomorphic under vowel harmony: the i18n transformer
34897
34997
  // emits `e` for quoted-string values (`"red" e`) but `-ya` for a value
@@ -34904,7 +35004,11 @@ var init_command_schemas = __esm({
34904
35004
  // not parse as a bare command while `t\u0131klama da @disabled i do\u011fru ya
34905
35005
  // ayarla` did. See STRUCTURAL_ARCS_ROADMAP.md (tr set-attribute).
34906
35006
  markerVariants: {
34907
- tr: ["e", "a", "ye", "ya"]
35007
+ tr: ["e", "a", "ye", "ya"],
35008
+ // Natural zh value markers (`\u8bbe\u7f6e X \u4e3a V`), simplified + traditional +
35009
+ // resultative \u2014 the handcrafted set-zh-full alternatives, kept parseable
35010
+ // alongside the transformer's \u5230 override above.
35011
+ zh: ["\u4E3A", "\u70BA", "\u6210"]
34908
35012
  }
34909
35013
  },
34910
35014
  {
@@ -58514,9 +58618,10 @@ function appendOptionalTailRole(tokens, extraction, commandSchema, languageCode,
58514
58618
  type: "group",
58515
58619
  optional: true,
58516
58620
  tokens: [
58517
- ...(marker ? marker.split(/\s+/) : []).map(
58518
- (word) => ({ type: "literal", value: word })
58519
- ),
58621
+ ...(marker ? marker.split(/\s+/) : []).map((word) => ({
58622
+ type: "literal",
58623
+ value: word
58624
+ })),
58520
58625
  {
58521
58626
  type: "role",
58522
58627
  role,
@@ -58647,6 +58752,70 @@ function generateSOVPatientFirstEventHandlerPattern(commandSchema, profile, keyw
58647
58752
  extraction
58648
58753
  };
58649
58754
  }
58755
+ function generateSOVPatientFirstSourceFrontedEventHandlerPattern(commandSchema, profile, keyword, eventMarker, config2) {
58756
+ const sourceSpec = commandSchema.roles.find((r) => r.role === "source");
58757
+ if (!sourceSpec) return null;
58758
+ const { marker: sourceMarker, alternatives: sourceAlts } = resolveRoleMarker(sourceSpec, profile);
58759
+ const patientMarker = profile.roleMarkers.patient;
58760
+ if (!sourceMarker) return null;
58761
+ if (sourceMarker === eventMarker.primary || sourceMarker === patientMarker?.primary) return null;
58762
+ const tokens = [];
58763
+ tokens.push({ type: "role", role: "patient", optional: false });
58764
+ if (patientMarker) {
58765
+ tokens.push(
58766
+ patientMarker.alternatives ? {
58767
+ type: "literal",
58768
+ value: patientMarker.primary,
58769
+ alternatives: patientMarker.alternatives
58770
+ } : { type: "literal", value: patientMarker.primary }
58771
+ );
58772
+ }
58773
+ tokens.push({
58774
+ type: "role",
58775
+ role: "source",
58776
+ optional: false,
58777
+ ...sourceSpec.expectedTypes ? { expectedTypes: sourceSpec.expectedTypes } : {},
58778
+ ...sourceSpec.valueShape !== void 0 ? { valueShape: sourceSpec.valueShape } : {}
58779
+ });
58780
+ for (const word of sourceMarker.split(/\s+/)) {
58781
+ tokens.push(
58782
+ sourceAlts && sourceMarker.split(/\s+/).length === 1 ? { type: "literal", value: word, alternatives: sourceAlts } : { type: "literal", value: word }
58783
+ );
58784
+ }
58785
+ tokens.push({ type: "role", role: "event", optional: false });
58786
+ if (eventMarker.position === "after") {
58787
+ const markerWords = eventMarker.primary.split(/\s+/);
58788
+ if (markerWords.length > 1) {
58789
+ for (const word of markerWords) tokens.push({ type: "literal", value: word });
58790
+ } else {
58791
+ tokens.push(
58792
+ eventMarker.alternatives ? { type: "literal", value: eventMarker.primary, alternatives: eventMarker.alternatives } : { type: "literal", value: eventMarker.primary }
58793
+ );
58794
+ }
58795
+ }
58796
+ tokens.push(
58797
+ keyword.alternatives ? { type: "literal", value: keyword.primary, alternatives: keyword.alternatives } : { type: "literal", value: keyword.primary }
58798
+ );
58799
+ const extraction = {
58800
+ action: { value: commandSchema.action },
58801
+ event: { fromRole: "event" },
58802
+ patient: { fromRole: "patient" },
58803
+ source: { fromRole: "source" }
58804
+ };
58805
+ appendOptionalRecipient(tokens, extraction, commandSchema, profile.code);
58806
+ appendOptionalViewTransition(tokens, extraction, commandSchema, profile.code);
58807
+ return {
58808
+ id: `${commandSchema.action}-event-${profile.code}-sov-source-fronted`,
58809
+ language: profile.code,
58810
+ command: "on",
58811
+ priority: (config2.basePriority ?? 100) + 48,
58812
+ template: {
58813
+ format: `{patient} ${patientMarker?.primary || ""} {source} ${sourceMarker} {event} ${eventMarker.primary} ${keyword.primary}`,
58814
+ tokens
58815
+ },
58816
+ extraction
58817
+ };
58818
+ }
58650
58819
  function generateSOVPatientFirstWithDestEventHandlerPattern(commandSchema, profile, keyword, eventMarker, config2) {
58651
58820
  const tokens = [];
58652
58821
  tokens.push({ type: "role", role: "patient", optional: false });
@@ -59545,6 +59714,14 @@ function generateEventHandlerPatterns(commandSchema, profile, config2 = defaultC
59545
59714
  config2
59546
59715
  )
59547
59716
  );
59717
+ const sourceFronted = generateSOVPatientFirstSourceFrontedEventHandlerPattern(
59718
+ commandSchema,
59719
+ profile,
59720
+ keyword,
59721
+ eventMarker,
59722
+ config2
59723
+ );
59724
+ if (sourceFronted) patterns.push(sourceFronted);
59548
59725
  const destMarkerCheck = profile.roleMarkers.destination;
59549
59726
  if (destMarkerCheck && destMarkerCheck.primary !== eventMarker.primary) {
59550
59727
  patterns.push(
@@ -64702,7 +64879,10 @@ var _PatternMatcher2 = class _PatternMatcher3 {
64702
64879
  }
64703
64880
  }
64704
64881
  if (patternToken.valueShape === "keyword" && value.type === "expression") {
64705
- captured.set(patternToken.role, createLiteral(String(value.raw ?? "")));
64882
+ captured.set(
64883
+ patternToken.role,
64884
+ createLiteral(String(value.raw ?? ""))
64885
+ );
64706
64886
  } else {
64707
64887
  captured.set(patternToken.role, value);
64708
64888
  }
@@ -65800,7 +65980,7 @@ var _PatternMatcher2 = class _PatternMatcher3 {
65800
65980
  } else if (rule.value !== void 0) {
65801
65981
  captured.set(role, { type: "literal", value: rule.value });
65802
65982
  } else if (rule.default) {
65803
- captured.set(role, rule.default);
65983
+ captured.set(role, { ...rule.default, implicit: true });
65804
65984
  }
65805
65985
  }
65806
65986
  }
@@ -66649,14 +66829,20 @@ var SemanticRendererImpl = class {
66649
66829
  return parts.join(" ");
66650
66830
  }
66651
66831
  /**
66652
- * Join a statement list the way a block body reads: ` then ` between siblings,
66653
- * but a single space immediately after a loop/tell block header (whose body
66654
- * follows directly). Shared by renderConditional's branches; renderCompound
66655
- * keeps its own copy because it also handles the multi-handler and bind-feature
66656
- * cases.
66832
+ * Join a statement list the way a block body reads: the target language's `then`
66833
+ * between siblings, but a single space immediately after a loop/tell block header
66834
+ * (whose body follows directly). Used by renderConditional's branches;
66835
+ * renderCompound keeps its own copy because it also handles the multi-handler
66836
+ * and bind-feature cases.
66837
+ *
66838
+ * The chain word is localized (`this.keyword(language, 'then')`) for the same
66839
+ * reason renderCompound localizes it: a hardcoded English `then` leaks into every
66840
+ * non-en block body (`\u3082\u3057 \u2026 \u524a\u9664 then \u8ffd\u52a0`), which no target-language tokenizer
66841
+ * recognizes as a connector.
66657
66842
  */
66658
66843
  joinStatements(statements, language) {
66659
66844
  const rendered = statements.map((s) => this.render(s, language));
66845
+ const thenKw = this.keyword(language, "then");
66660
66846
  let out = rendered[0] ?? "";
66661
66847
  for (let i = 1; i < rendered.length; i++) {
66662
66848
  const prev = statements[i - 1];
@@ -66664,7 +66850,7 @@ var SemanticRendererImpl = class {
66664
66850
  if (prev.kind === "command" && BLOCK_NEEDS_TRAILING_END.has(prev.action)) {
66665
66851
  out += ` ${this.keyword(language, "end")}`;
66666
66852
  }
66667
- out += (afterBlockHeader ? " " : " then ") + rendered[i];
66853
+ out += (afterBlockHeader ? " " : ` ${thenKw} `) + rendered[i];
66668
66854
  }
66669
66855
  return out;
66670
66856
  }
@@ -66837,6 +67023,7 @@ var SemanticRendererImpl = class {
66837
67023
  if (!roleToken) continue;
66838
67024
  const roleValue = node.roles.get(roleName);
66839
67025
  if (roleValue?.type !== "reference" || roleValue.value !== "me") continue;
67026
+ if (!roleValue.implicit) continue;
66840
67027
  if (roleName === "destination") {
66841
67028
  const patient = node.roles.get("patient");
66842
67029
  if (patient?.type === "literal" && patient.dataType === "string") continue;
@@ -67274,7 +67461,7 @@ function fillSchemaDefaults(node) {
67274
67461
  const roles = node.roles;
67275
67462
  for (const spec of schema.roles) {
67276
67463
  if (spec.default !== void 0 && !roles.has(spec.role)) {
67277
- roles.set(spec.role, { ...spec.default });
67464
+ roles.set(spec.role, { ...spec.default, implicit: true });
67278
67465
  }
67279
67466
  }
67280
67467
  }
@@ -67860,7 +68047,7 @@ var _SemanticParserImpl = class _SemanticParserImpl2 {
67860
68047
  }
67861
68048
  let eventModifiers = patternMatcher.extractEventModifiers(tokens);
67862
68049
  const sourceValue = match.captured.get("source");
67863
- if (sourceValue && match.pattern.id.includes("source") && !(sourceValue.type === "reference" && sourceValue.value === "me")) {
68050
+ if (sourceValue && match.pattern.id.endsWith("source") && !(sourceValue.type === "reference" && sourceValue.value === "me")) {
67864
68051
  eventModifiers = { ...eventModifiers ?? {}, from: sourceValue };
67865
68052
  }
67866
68053
  const additionalEvents = this.extractOrConjunctionEvents(tokens, language);
@@ -79301,7 +79488,7 @@ function createRuntimeInstance(options) {
79301
79488
  return new Runtime(options);
79302
79489
  }
79303
79490
  function getVersion() {
79304
- return "2.0.0";
79491
+ return VERSION$1;
79305
79492
  }
79306
79493
  function toCompileError(error) {
79307
79494
  return {
@@ -86725,4 +86912,4 @@ export {
86725
86912
  toCoreAST,
86726
86913
  validatePartialContent
86727
86914
  };
86728
- //# sourceMappingURL=dist-I7VYJWBF.js.map
86915
+ //# sourceMappingURL=dist-MGUUIWYB.js.map