@tsrx/mcp 0.0.32 → 0.0.33
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/package.json +3 -3
- package/src/analyze.js +1 -1
- package/src/generated/docs.js +5 -5
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "MCP server for TSRX documentation and project context",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Dominic Gannaway",
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.33",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
38
38
|
"prettier": "^3.8.3",
|
|
39
39
|
"zod": "^4.3.6",
|
|
40
|
-
"@tsrx/core": "0.1.
|
|
41
|
-
"@tsrx/prettier-plugin": "0.3.
|
|
40
|
+
"@tsrx/core": "0.1.20",
|
|
41
|
+
"@tsrx/prettier-plugin": "0.3.72"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/node": "^24.3.0",
|
package/src/analyze.js
CHANGED
|
@@ -78,7 +78,7 @@ function create_advice(input) {
|
|
|
78
78
|
severity: 'info',
|
|
79
79
|
title: 'Wrap expression-position JSX',
|
|
80
80
|
message:
|
|
81
|
-
'When JSX is needed as a value, wrap
|
|
81
|
+
'When JSX is needed as a value, wrap native TSRX in a fragment `<>...</>` or use a host compatibility island such as `<tsx:react>...</tsx:react>`.',
|
|
82
82
|
documentation: ['tsrx://docs/tsx-expression-values.md'],
|
|
83
83
|
});
|
|
84
84
|
}
|
package/src/generated/docs.js
CHANGED
|
@@ -11,7 +11,7 @@ export const documentation_sections = [
|
|
|
11
11
|
use_cases:
|
|
12
12
|
'always, introduction, explain tsrx, compare jsx, language model context, runtime targets',
|
|
13
13
|
content:
|
|
14
|
-
'# TSRX Overview\n\nTSRX is a TypeScript language extension for authoring declarative UI in .tsrx files. It adds a small set of syntax forms on top of TypeScript, while letting each target compiler define the runtime semantics.\n\nCore ideas:\n- Components are ordinary TypeScript functions that return TSRX.\n- TSRX opens in expression position, then template children use a template statement list inside the fragment.\n- control-flow statements can contain template output.\n- native TSRX can be returned directly as `<div />` or
|
|
14
|
+
'# TSRX Overview\n\nTSRX is a TypeScript language extension for authoring declarative UI in .tsrx files. It adds a small set of syntax forms on top of TypeScript, while letting each target compiler define the runtime semantics.\n\nCore ideas:\n- Components are ordinary TypeScript functions that return TSRX.\n- TSRX opens in expression position, then template children use a template statement list inside the fragment.\n- control-flow statements can contain template output.\n- native TSRX can be returned directly as `<div />` or `<>...</>`.\n- lazy destructuring uses &[] and &{} for by-reference bindings.\n\nThe core language docs should stay target-neutral. After identifying the active runtime target, use target-specific docs, prompts, or skills for runtime imports, bundler setup, and semantics that are not defined by TSRX itself.\n\nSource: website-tsrx/src/pages/specification.tsrx',
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
slug: 'components',
|
|
@@ -29,12 +29,12 @@ export const documentation_sections = [
|
|
|
29
29
|
'# Text and Template Expressions\n\nRaw unquoted text children are not valid TSRX. Static text should be written as a direct double-quoted child, and dynamic values should be wrapped in braces.\n\n```tsx\nfunction Greeting({ name }: { name: string }) {\n return <>\n <h1>"Hello"</h1>\n <p>{name}</p>\n </>;\n}\n```\n\nSingle-quoted strings and template literals remain JavaScript expressions, so they must be inside braces. When you need explicit string coercion, write it in JavaScript with `String(value)`, `value + \'\'`, or a typed string value.\n\nSpecification grammar:\n\n```text\nDoubleQuotedTextChild :\n " JSXStringCharactersopt "\n\nTemplateExpression :\n { AssignmentExpression }\n```\n\nSource: website-tsrx/src/pages/specification.tsrx#templates',
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
-
slug: '
|
|
32
|
+
slug: 'expression-values',
|
|
33
33
|
title: 'Expression Values',
|
|
34
34
|
use_cases:
|
|
35
|
-
'fragments,
|
|
35
|
+
'fragments, pass template as prop, return template from helper, render props, expression position jsx',
|
|
36
36
|
content:
|
|
37
|
-
'# Expression Values\n\nReturned TSRX opens in expression position. Inside the TSRX fragment, template elements are statements and control flow can emit UI.\n\n```tsx\nfunction App() {\n const title = <>"Settings"</>;\n\n return <Card title={title} />;\n}\n```\n\nNative TSRX expression fragments can contain setup statements and template control flow:\n\n```tsx\nfunction badge(label: string) {\n return <>\n const normalized = label.trim();\n <span class="badge">{normalized}</span>\n </>;\n}\n```\n\nUse fragments for assigning UI to variables, returning UI from helper functions, or passing UI as props.\n\nSpecification grammar:\n\n```text\nTsrxExpression :\n Element\n <> TemplateChildrenopt </>\n
|
|
37
|
+
'# Expression Values\n\nReturned TSRX opens in expression position. Inside the TSRX fragment, template elements are statements and control flow can emit UI.\n\n```tsx\nfunction App() {\n const title = <>"Settings"</>;\n\n return <Card title={title} />;\n}\n```\n\nNative TSRX expression fragments can contain setup statements and template control flow:\n\n```tsx\nfunction badge(label: string) {\n return <>\n const normalized = label.trim();\n <span class="badge">{normalized}</span>\n </>;\n}\n```\n\nUse fragments for assigning UI to variables, returning UI from helper functions, or passing UI as props.\n\nSpecification grammar:\n\n```text\nTsrxExpression :\n Element\n <> TemplateChildrenopt </>\n```\n\nSource: website-tsrx/src/pages/specification.tsrx#expression-values',
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
slug: 'control-flow',
|
|
@@ -65,7 +65,7 @@ export const documentation_sections = [
|
|
|
65
65
|
use_cases:
|
|
66
66
|
'runtime target, compiler package, target-specific setup, skills, runtime semantics',
|
|
67
67
|
content:
|
|
68
|
-
'# Target Integration\n\nTSRX authoring syntax is shared, but output and runtime semantics are target-defined.\n\nThe core MCP server should detect the target, then hand off runtime-specific questions to a target-specific skill, prompt, resource set, or compiler-backed tool.\n\nTarget-specific layers should own:\n- package installation and bundler setup\n- runtime imports and helper APIs\n-
|
|
68
|
+
'# Target Integration\n\nTSRX authoring syntax is shared, but output and runtime semantics are target-defined.\n\nThe core MCP server should detect the target, then hand off runtime-specific questions to a target-specific skill, prompt, resource set, or compiler-backed tool.\n\nTarget-specific layers should own:\n- package installation and bundler setup\n- runtime imports and helper APIs\n- compiler warnings and semantic restrictions\n- examples that depend on a specific rendering runtime\n\nWhen helping in an existing project, detect the target before generating code. If no target-specific layer is available, stay within target-neutral TSRX syntax and ask for confirmation before assuming runtime APIs.\n\nSource: website-tsrx/src/pages/getting-started.tsrx',
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
slug: 'tooling',
|