@statorjs/language-server 0.1.32-next.0 → 0.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/server.cjs +24 -1
  2. package/package.json +2 -2
package/dist/server.cjs CHANGED
@@ -44609,6 +44609,29 @@ function lowerTemplate(template, opts = {}) {
44609
44609
  import_typescript3.default.forEachChild(node, (child) => checkNoReadInDefer(child, nowInsideDefer));
44610
44610
  };
44611
44611
  checkNoReadInDefer(fragment, false);
44612
+ const RCDATA_BINDINGS = /* @__PURE__ */ new Set(["read", "each", "when", "match", "defer"]);
44613
+ const checkNoBindingInRcdata = (node, rcdataTag) => {
44614
+ if (rcdataTag && import_typescript3.default.isCallExpression(node) && import_typescript3.default.isIdentifier(node.expression) && RCDATA_BINDINGS.has(node.expression.text)) {
44615
+ const callee = node.expression.text;
44616
+ throw new CompileError(
44617
+ `stator: ${callee}() cannot appear inside <${rcdataTag}> \u2014 its content is raw text (RCDATA), so the ${callee === "read" ? "live-slot wrapper" : "region markers"} would render as literal markup. Interpolate a static value instead (a selector property like {machine.someSelector}, or a frontmatter constant); if the value must be live, bind an attribute or use an island.`,
44618
+ loc2(node)
44619
+ );
44620
+ }
44621
+ if (import_typescript3.default.isJsxElement(node)) {
44622
+ const opening = node.openingElement;
44623
+ const tagName = import_typescript3.default.isIdentifier(opening.tagName) ? opening.tagName.text : null;
44624
+ const isRcdata = tagName === "textarea" || tagName === "title";
44625
+ checkNoBindingInRcdata(opening, rcdataTag);
44626
+ for (const child of node.children) {
44627
+ checkNoBindingInRcdata(child, isRcdata ? tagName : rcdataTag);
44628
+ }
44629
+ checkNoBindingInRcdata(node.closingElement, rcdataTag);
44630
+ return;
44631
+ }
44632
+ import_typescript3.default.forEachChild(node, (child) => checkNoBindingInRcdata(child, rcdataTag));
44633
+ };
44634
+ checkNoBindingInRcdata(fragment, null);
44612
44635
  const checkItemReadPlacement = (node, frames) => {
44613
44636
  if (import_typescript3.default.isCallExpression(node) && import_typescript3.default.isIdentifier(node.expression)) {
44614
44637
  const callee = node.expression.text;
@@ -45704,7 +45727,7 @@ var STATOR_AMBIENT = `declare const Stator: {
45704
45727
  reads<const T extends readonly __SMachineDef[]>(defs: T): { -readonly [K in keyof T]: __SInstanceOf<T[K]> };
45705
45728
  forwarded(name: \`on:\${string}\`): (() => unknown) | undefined;
45706
45729
  request: any;
45707
- response: { status: number; headers: Record<string, string>; cookies: any };
45730
+ response: { status: number; headers: Headers; cookies: any };
45708
45731
  };
45709
45732
  declare global {
45710
45733
  namespace JSX {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statorjs/language-server",
3
- "version": "0.1.32-next.0",
3
+ "version": "0.1.32",
4
4
  "description": "Volar-based language server for .stator files.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -33,7 +33,7 @@
33
33
  "volar-service-typescript": "0.0.71",
34
34
  "vscode-css-languageservice": "^6.3.0",
35
35
  "vscode-uri": "^3.0.8",
36
- "@statorjs/stator": "2.10.0-next.0"
36
+ "@statorjs/stator": "2.10.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "typescript": "^5.6.0"