@lokascript/language-server 2.11.1 → 3.0.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/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ All notable changes to `@lokascript/language-server` will be documented in this
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ > **Superseded by the root changelog.** Every package in this monorepo publishes
9
+ > in lockstep at the root version, and the entries below use an older
10
+ > per-package numbering that no published version ever matched. They are kept
11
+ > for the migration notes they carry; they are not a record of recent releases.
12
+ > **For anything since, see
13
+ > [the monorepo CHANGELOG](https://github.com/codetalcott/hyperfixi/blob/main/CHANGELOG.md)**
14
+ > and [GitHub Releases](https://github.com/codetalcott/hyperfixi/releases).
15
+
8
16
  ## [1.0.0] - 2026-02-05
9
17
 
10
18
  ### Added
@@ -3133,6 +3133,9 @@ var StringLiteralExtractor = class {
3133
3133
  }
3134
3134
  canExtract(input, position) {
3135
3135
  const char = input[position];
3136
+ if (char === "'" && position > 0 && /[\p{L}\p{N}_)\]]/u.test(input[position - 1])) {
3137
+ return false;
3138
+ }
3136
3139
  return char === '"' || char === "'" || char === "`" || char === "\u201C" || // Chinese double quote open "
3137
3140
  char === "\u2018";
3138
3141
  }
@@ -6353,6 +6356,9 @@ var MARKER_CONCEPT_NORMALIZEDS = /* @__PURE__ */ new Set([
6353
6356
  "through",
6354
6357
  "without"
6355
6358
  ]);
6359
+ function isHyphenatedWord(native) {
6360
+ return native.includes("-") && /^[\p{L}\p{N}_]+(-[\p{L}\p{N}_]+)+$/u.test(native);
6361
+ }
6356
6362
  var ENGLISH_DOM_EVENT_NAMES = [
6357
6363
  "click",
6358
6364
  "dblclick",
@@ -6651,7 +6657,7 @@ var _BaseTokenizer = class _BaseTokenizer2 {
6651
6657
  (a, b) => b.native.length - a.native.length
6652
6658
  );
6653
6659
  this.multiWordKeywords = this.profileKeywords.filter(
6654
- (k) => k.native.includes(" ") && !MARKER_CONCEPT_NORMALIZEDS.has(k.normalized)
6660
+ (k) => (k.native.includes(" ") || isHyphenatedWord(k.native)) && !MARKER_CONCEPT_NORMALIZEDS.has(k.normalized)
6655
6661
  );
6656
6662
  this.profileKeywordMap = /* @__PURE__ */ new Map();
6657
6663
  for (const keyword of this.profileKeywords) {
package/dist/server.js CHANGED
@@ -138,8 +138,6 @@ var LOKASCRIPT_ONLY_COMMANDS = [
138
138
  "process",
139
139
  // `process "<p>x</p>"` → Unexpected Token : process
140
140
  // Added by Arc A step 4.1 — the omissions that produced NO diagnostic.
141
- "async",
142
- // `async do log "x" end` → Unexpected Token : async
143
141
  "copy",
144
142
  // `copy "x"` → Unexpected Token : copy
145
143
  "push",
@@ -844,7 +842,6 @@ function buildSymbolTable(regions, getKeywordVariants2) {
844
842
  "def",
845
843
  "install",
846
844
  "init",
847
- "async",
848
845
  ...behaviorKws,
849
846
  ...defKws,
850
847
  ...setKws,
@@ -1239,7 +1236,18 @@ var lspMetadata = null;
1239
1236
  try {
1240
1237
  const core = await import("@hyperfixi/core");
1241
1238
  parseFunction = core.parse;
1242
- fromCoreASTFn = core.fromCoreAST;
1239
+ let inferRoles = null;
1240
+ try {
1241
+ ({ schemaRoleInferrer: inferRoles } = await import("@hyperfixi/core/multilingual"));
1242
+ } catch {
1243
+ console.error(
1244
+ "[lokascript-ls] @lokascript/semantic not available \u2014 hover shows roles for `set` and `go` only. Install the semantic package for full role inference."
1245
+ );
1246
+ }
1247
+ fromCoreASTFn = (node) => core.fromCoreAST(
1248
+ node,
1249
+ inferRoles ? { inferRoles } : void 0
1250
+ );
1243
1251
  interchangeLSP = await import("@hyperfixi/core/ast-utils");
1244
1252
  console.error("[lokascript-ls] @hyperfixi/core loaded \u2014 AST parsing + interchange LSP enabled");
1245
1253
  } catch {
@@ -1254,7 +1262,7 @@ try {
1254
1262
  }
1255
1263
  var frameworkIR = null;
1256
1264
  try {
1257
- const fw = await import("./dist-QIYYJ23V.js");
1265
+ const fw = await import("./dist-2GK6K2QJ.js");
1258
1266
  frameworkIR = { fromInterchangeNode: fw.fromInterchangeNode, renderExplicit: fw.renderExplicit };
1259
1267
  console.error(
1260
1268
  "[lokascript-ls] @lokascript/framework loaded \u2014 LSE bracket notation in hover enabled"
@@ -1478,11 +1486,6 @@ var FALLBACK_HOVER_DOCS = {
1478
1486
  description: "Closes a block (event handler, behavior, if, repeat).",
1479
1487
  example: "on click\\n toggle .active\\nend"
1480
1488
  },
1481
- async: {
1482
- title: "async",
1483
- description: "Runs a command asynchronously without blocking.",
1484
- example: "async fetch /api/data"
1485
- },
1486
1489
  tell: {
1487
1490
  title: "tell",
1488
1491
  description: "Sets the default target for subsequent commands.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokascript/language-server",
3
- "version": "2.11.1",
3
+ "version": "3.0.0",
4
4
  "description": "Language Server Protocol implementation for LokaScript/hyperscript with 21 language support",
5
5
  "type": "module",
6
6
  "main": "dist/server.js",
@@ -31,8 +31,8 @@
31
31
  "vscode-languageserver-textdocument": "^1.0.11"
32
32
  },
33
33
  "peerDependencies": {
34
- "@hyperfixi/core": "^2.11.1",
35
- "@lokascript/semantic": "^2.11.1"
34
+ "@hyperfixi/core": "^3.0.0",
35
+ "@lokascript/semantic": "^3.0.0"
36
36
  },
37
37
  "peerDependenciesMeta": {
38
38
  "@lokascript/semantic": {
@@ -43,8 +43,8 @@
43
43
  }
44
44
  },
45
45
  "devDependencies": {
46
- "@hyperfixi/core": "^2.11.1",
47
- "@lokascript/semantic": "^2.11.1",
46
+ "@hyperfixi/core": "^3.0.0",
47
+ "@lokascript/semantic": "^3.0.0",
48
48
  "@types/node": "^26.1.2",
49
49
  "@vitest/coverage-v8": "^4.0.0",
50
50
  "tsup": "^8.0.0",