@lism-css/mcp 0.24.0 → 0.26.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/data/meta.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { packageVersion } from '../lib/version.js';
2
2
  export const meta = {
3
- generatedAt: '2026-07-06',
4
- sourceCommit: '61898938',
3
+ generatedAt: '2026-08-16',
4
+ sourceCommit: '06107666',
5
5
  docsVersion: packageVersion,
6
6
  };
@@ -85,16 +85,24 @@ export function searchDocs(entries, query, options) {
85
85
  .filter(({ score }) => score > 0)
86
86
  .sort((a, b) => b.score - a.score)
87
87
  .slice(0, limit);
88
- const DOCS_BASE_URL = 'https://lism-css.com/docs';
89
88
  return scored.map(({ entry, score }) => ({
90
89
  sourcePath: entry.sourcePath,
91
- url: `${DOCS_BASE_URL}/${sourcePathToUrlSlug(entry.sourcePath)}/`,
90
+ url: slugToPageUrl(sourcePathToUrlSlug(entry.sourcePath)),
92
91
  heading: entry.title,
93
92
  snippet: entry.snippet,
94
93
  score,
95
94
  nextTool: getNextTool(entry, guideTopics),
96
95
  }));
97
96
  }
97
+ const SITE_BASE_URL = 'https://lism-css.com';
98
+ /**
99
+ * URL スラッグを公開ページの URL に変換する。
100
+ * `ui/` 配下はサイト直下(`/ui/...`)、それ以外は `/docs/` 配下で公開される
101
+ * (apps/docs の `getPostUrl` と同じルーティング規則)。
102
+ */
103
+ function slugToPageUrl(slug) {
104
+ return slug.startsWith('ui/') ? `${SITE_BASE_URL}/${slug}/` : `${SITE_BASE_URL}/docs/${slug}/`;
105
+ }
98
106
  /** `sourcePath`(拡張子なし)の末尾セグメントを返す(例: `primitives/l--flex` → `l--flex`) */
99
107
  function getBasename(withoutExt) {
100
108
  const parts = withoutExt.split('/');
@@ -120,9 +128,10 @@ function getNextTool(entry, guideTopics) {
120
128
  if (withoutExt.startsWith('property-class/')) {
121
129
  return `get_props_system(prop: "${basename}")`;
122
130
  }
123
- // ui/examples/ は実装例ページ(Card, Hero 等)で get_component では解決できないため誘導しない。
131
+ // ui/block-examples/(Chat, Timeline 等)と ui/components/(Card, Hero 等)は、
132
+ // パッケージが提供するコンポーネントではなく Lism CSS での実装例ページなので get_component では解決できない。
124
133
  // 詳細が必要な場合は検索結果の url を参照してもらう。
125
- if (withoutExt.startsWith('ui/examples/')) {
134
+ if (withoutExt.startsWith('ui/block-examples/') || withoutExt.startsWith('ui/components/')) {
126
135
  return null;
127
136
  }
128
137
  // category ベースの判定
@@ -22,14 +22,14 @@ const GUIDE_TOPICS = {
22
22
  'set-class': { files: ['set-class.md'], label: 'Set classes (set--plain, set--bxsh, set--hov, etc.)' },
23
23
  'primitive-class': {
24
24
  files: ['primitive-class.md'],
25
- label: 'Primitive class prefixes (is--, l--, a--) and Component class (c--), with column-layout primitive selection guide',
25
+ label: 'Primitive class prefixes (l--, a--), with column-layout primitive selection guide',
26
26
  },
27
27
  'trait-class': {
28
28
  files: ['trait-class.md'],
29
29
  label: 'Trait classes (is--, has--): declarative role/feature classes in the lism-trait layer',
30
30
  },
31
31
  'utility-class': { files: ['utility-class.md'], label: 'Utility classes (u--trim, u--cbox, etc.)' },
32
- 'css-rules': { files: ['css-rules.md'], label: 'CSS methodology, layer structure, naming conventions' },
32
+ 'css-rules': { files: ['css-rules.md'], label: 'CSS methodology, layer structure, Block Class (b--) / Custom Class (c--), naming conventions' },
33
33
  naming: {
34
34
  files: ['naming.md'],
35
35
  label: 'Naming conventions: CSS variable / class naming rules, {prop} and {value} abbreviation rules',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lism-css/mcp",
3
- "version": "0.24.0",
3
+ "version": "0.26.0",
4
4
  "description": "MCP server for lism-css documentation and API reference.",
5
5
  "keywords": [
6
6
  "mcp",
@@ -24,13 +24,13 @@
24
24
  "bin"
25
25
  ],
26
26
  "dependencies": {
27
- "@modelcontextprotocol/sdk": "^1.27.1",
27
+ "@modelcontextprotocol/sdk": "^1.29.0",
28
28
  "zod": "^3.25.76"
29
29
  },
30
30
  "devDependencies": {
31
- "@types/node": "^25.0.0",
32
- "typescript": "^5.8.3",
33
- "vitest": "^4.1.0"
31
+ "@types/node": "^25.9.4",
32
+ "typescript": "^5.9.3",
33
+ "vitest": "^4.1.10"
34
34
  },
35
35
  "license": "MIT",
36
36
  "engines": {