@idealyst/mcp-server 1.2.104 → 1.2.106

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/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  storageGuides,
8
8
  toolDefinitions,
9
9
  translateGuides
10
- } from "./chunk-ZDB2NURA.js";
10
+ } from "./chunk-NX77GGPR.js";
11
11
 
12
12
  // src/index.ts
13
13
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -168,13 +168,13 @@ var searchComponentsDefinition = {
168
168
  };
169
169
  var getComponentTypesDefinition = {
170
170
  name: "get_component_types",
171
- description: "Get TypeScript type definitions for a specific component directly from the source. Returns the actual TypeScript interface and/or JSON schema. Supports comma-separated names to batch multiple components in one call (e.g., 'Button,Card,Text').",
171
+ description: "Get TypeScript type definitions for a specific component directly from the source. Returns the actual TypeScript interface and/or JSON schema.",
172
172
  inputSchema: {
173
173
  type: "object",
174
174
  properties: {
175
175
  component: {
176
176
  type: "string",
177
- description: "The name of the component (e.g., 'Button', 'Card', 'Input'). Supports comma-separated names for batch lookup: 'Button,Card,Text,Icon'"
177
+ description: "The name of the component (e.g., 'Button', 'Card', 'Input')"
178
178
  },
179
179
  format: {
180
180
  type: "string",
@@ -3667,7 +3667,7 @@ function VideoRecordingScreen() {
3667
3667
  )}
3668
3668
  <Button
3669
3669
  onPress={handleToggleRecording}
3670
- intent={camera.isRecording ? 'error' : 'primary'}
3670
+ intent={camera.isRecording ? 'danger' : 'primary'}
3671
3671
  >
3672
3672
  {camera.isRecording ? 'Stop Recording' : 'Record Video'}
3673
3673
  </Button>
@@ -6151,6 +6151,10 @@ function ArticleView({ content }: { content: string }) {
6151
6151
 
6152
6152
  ## Custom Link Handling
6153
6153
 
6154
+ **IMPORTANT**: Do NOT import \`Linking\` from \`react-native\` for opening URLs. The Markdown component has built-in cross-platform link handling via \`linkHandler\`:
6155
+ - \`openExternalLinks: true\` \u2014 opens external URLs in the system browser (cross-platform, no imports needed)
6156
+ - \`onLinkPress\` \u2014 intercept link taps for internal navigation
6157
+
6154
6158
  \`\`\`tsx
6155
6159
  import React from 'react';
6156
6160
  import { Markdown } from '@idealyst/markdown';
@@ -6165,11 +6169,11 @@ function DocumentView({ markdown }: { markdown: string }) {
6165
6169
  onLinkPress: (url) => {
6166
6170
  if (url.startsWith('/')) {
6167
6171
  navigate({ path: url });
6168
- return true; // Prevent default browser behavior
6172
+ return true; // Handled \u2014 prevent default
6169
6173
  }
6170
- return false; // Allow external links to open normally
6174
+ return false; // Not handled \u2014 openExternalLinks takes over
6171
6175
  },
6172
- openExternalLinks: true,
6176
+ openExternalLinks: true, // Opens external URLs cross-platform (no Linking import needed!)
6173
6177
  }}
6174
6178
  >
6175
6179
  {markdown}
@@ -11406,7 +11410,7 @@ This server has tools for every aspect of the framework. **Always look up the AP
11406
11410
  ### Workflow (be efficient \u2014 minimize tool calls)
11407
11411
 
11408
11412
  1. **Start here** \u2014 this intro covers conventions and gotchas
11409
- 2. **Look up components** \u2014 call \`get_component_types\` for EVERY component you plan to use. **Batch them in one call**: \`get_component_types({ component: "Button,Card,Text,View" })\` returns all types at once. (Card has NO compound components \u2014 no Card.Content/Card.Header)
11413
+ 2. **Look up components** \u2014 call \`get_component_types\` for EVERY component you plan to use. Call it for each component you need. (Card has NO compound components \u2014 no Card.Content/Card.Header)
11410
11414
  3. **Look up packages** \u2014 call the dedicated \`get_*_guide\` tool with topic \`api\` for each \`@idealyst/*\` package
11411
11415
  4. **Check recipes** \u2014 call \`search_recipes\` to find ready-made patterns for common screens
11412
11416
  5. **Search icons ONCE** \u2014 combine all needed icon terms into ONE \`search_icons\` call (e.g., \`"home settings check timer calendar"\`)
@@ -11415,7 +11419,7 @@ This server has tools for every aspect of the framework. **Always look up the AP
11415
11419
  ### Component Tools
11416
11420
  - \`list_components\` / \`search_components\` \u2014 Discover available components
11417
11421
  - \`get_component_docs\` \u2014 Component features and best practices
11418
- - \`get_component_types\` \u2014 **TypeScript prop interfaces** (supports batch: \`"Button,Card,Text"\`)
11422
+ - \`get_component_types\` \u2014 **TypeScript prop interfaces** for a component
11419
11423
  - \`get_component_examples_ts\` \u2014 Type-checked code examples
11420
11424
  - \`search_icons\` \u2014 Find Material Design icon names (7,447 available). **Batch your needs**: search once with multiple terms like \`"home settings user check"\` rather than making separate calls per icon
11421
11425
 
@@ -11512,13 +11516,23 @@ These are mistakes agents make repeatedly. Each one causes TypeScript compilatio
11512
11516
  15. \`useParams()\` does NOT accept generic type arguments. It returns \`Record<string, string>\`. Do NOT write \`useParams<{ id: string }>()\` \u2014 that causes TS2558.
11513
11517
 
11514
11518
  ### Imports & Styling
11515
- 16. **Never** import from \`react-native\` for UI \u2014 no \`TouchableOpacity\`, \`FlatList\`, \`ScrollView\`, \`Animated\`, \`Dimensions\`.
11519
+ 16. **Never** import from \`react-native\` \u2014 no \`TouchableOpacity\`, \`FlatList\`, \`ScrollView\`, \`Animated\`, \`Dimensions\`, \`Linking\`, \`Platform\`. Idealyst provides cross-platform alternatives for all of these (e.g., \`openExternalLinks\` on Markdown, \`Pressable\` from \`@idealyst/components\`).
11516
11520
  17. **Never** import from \`react-native-unistyles\` \u2014 use \`@idealyst/theme\` (\`configureThemes\`, \`ThemeSettings\`, \`useTheme\`).
11517
- 18. **useTheme()** returns the Theme object **directly** (NOT wrapped): \`const theme = useTheme();\`. Do NOT destructure: \`const { theme } = useTheme()\` causes TS2339. Use theme tokens for colors and spacing: \`style={{ padding: theme.spacing.md, backgroundColor: theme.colors.surface.primary }}\`.
11521
+ 18. **useTheme()** returns the Theme object **directly** (NOT wrapped): \`const theme = useTheme();\`. Do NOT destructure: \`const { theme } = useTheme()\` \u2014 causes TS2339.
11522
+ 19. **Spacing & Layout**: Use component shorthand props for spacing \u2014 NOT \`theme.spacing\` (which does NOT exist). The correct patterns:
11523
+ - \`<View padding="md" gap="md">\` \u2014 shorthand props on View/Card
11524
+ - \`<View paddingHorizontal="lg" marginVertical="sm">\` \u2014 directional shorthands
11525
+ - \`style={{ backgroundColor: theme.colors.surface.primary }}\` \u2014 inline styles for colors only
11526
+ - \`theme.radii.md\` \u2014 border radius values (this DOES exist)
11527
+ - **WRONG**: \`theme.spacing.md\` \u2014 does NOT exist, causes TS2339
11528
+ - **WRONG**: \`theme.colors.intent.danger\` \u2014 does NOT exist; intents are at \`theme.intents.danger\`
11529
+
11530
+ ### Cross-Platform (CRITICAL)
11531
+ 20. **Never use raw HTML/SVG elements** (\`<svg>\`, \`<circle>\`, \`<canvas>\`, \`<div>\`, \`<span>\`, \`<input>\`) \u2014 they are web-only and will crash on React Native, just like react-native primitives crash on web. Also never use CSS \`transition\` or \`animation\` properties in styles \u2014 they don't exist on native. If you need custom drawing or circular progress, use \`@idealyst/animate\` hooks or \`@idealyst/charts\` \u2014 never raw SVG.
11532
+ 21. **Avoid web-only CSS** like \`cursor: 'pointer'\` in shared styles \u2014 not valid on native. Use \`Pressable\` or \`Button\` for interactive elements (they handle cursor automatically on web).
11518
11533
 
11519
11534
  ### React 19 TypeScript
11520
11535
  - **useRef** requires an initial argument: \`useRef<T>(null)\` \u2014 NOT \`useRef<T>()\`. Omitting the argument causes TS2554. For non-null refs use: \`useRef<number>(0)\`, \`useRef<string[]>([])\`.
11521
- - **Avoid web-only CSS** like \`cursor: 'pointer'\` in shared styles \u2014 not valid on native. Use \`Pressable\` or \`Button\` for interactive elements (they handle cursor automatically on web).
11522
11536
 
11523
11537
  ### Scaffolded Project Layout
11524
11538
  When working in a CLI-scaffolded workspace (created with \`idealyst init\` + \`idealyst create\`), files go in specific locations:
@@ -19855,7 +19869,7 @@ function getThemeTypes2(args = {}) {
19855
19869
  try {
19856
19870
  const result = getThemeTypes(format);
19857
19871
  if (typeof result === "object" && result !== null) {
19858
- result.useThemeNote = "IMPORTANT: useTheme() returns Theme directly \u2014 NOT wrapped in an object. Correct: `const theme = useTheme();` WRONG: `const { theme } = useTheme();` (causes TS2339). Then use inline styles: `style={{ padding: theme.spacing.md, backgroundColor: theme.colors.surface.primary }}`";
19872
+ result.useThemeNote = 'IMPORTANT: useTheme() returns Theme directly \u2014 NOT wrapped in an object. Correct: `const theme = useTheme();` WRONG: `const { theme } = useTheme();` (causes TS2339). Theme top-level keys: intents, radii, shadows, colors, sizes, interaction, breakpoints. For spacing, use component props (padding="md", gap="md") \u2014 NOT theme.spacing (does NOT exist). For colors: `style={{ backgroundColor: theme.colors.surface.primary }}`. For radii: `style={{ borderRadius: theme.radii.md }}`. For intents: `theme.intents.primary` (NOT theme.colors.intent).';
19859
19873
  }
19860
19874
  return jsonResponse(result);
19861
19875
  } catch (error) {