@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.
@@ -67,13 +67,13 @@ var searchComponentsDefinition = {
67
67
  };
68
68
  var getComponentTypesDefinition = {
69
69
  name: "get_component_types",
70
- 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').",
70
+ description: "Get TypeScript type definitions for a specific component directly from the source. Returns the actual TypeScript interface and/or JSON schema.",
71
71
  inputSchema: {
72
72
  type: "object",
73
73
  properties: {
74
74
  component: {
75
75
  type: "string",
76
- description: "The name of the component (e.g., 'Button', 'Card', 'Input'). Supports comma-separated names for batch lookup: 'Button,Card,Text,Icon'"
76
+ description: "The name of the component (e.g., 'Button', 'Card', 'Input')"
77
77
  },
78
78
  format: {
79
79
  type: "string",
@@ -3566,7 +3566,7 @@ function VideoRecordingScreen() {
3566
3566
  )}
3567
3567
  <Button
3568
3568
  onPress={handleToggleRecording}
3569
- intent={camera.isRecording ? 'error' : 'primary'}
3569
+ intent={camera.isRecording ? 'danger' : 'primary'}
3570
3570
  >
3571
3571
  {camera.isRecording ? 'Stop Recording' : 'Record Video'}
3572
3572
  </Button>
@@ -6050,6 +6050,10 @@ function ArticleView({ content }: { content: string }) {
6050
6050
 
6051
6051
  ## Custom Link Handling
6052
6052
 
6053
+ **IMPORTANT**: Do NOT import \`Linking\` from \`react-native\` for opening URLs. The Markdown component has built-in cross-platform link handling via \`linkHandler\`:
6054
+ - \`openExternalLinks: true\` \u2014 opens external URLs in the system browser (cross-platform, no imports needed)
6055
+ - \`onLinkPress\` \u2014 intercept link taps for internal navigation
6056
+
6053
6057
  \`\`\`tsx
6054
6058
  import React from 'react';
6055
6059
  import { Markdown } from '@idealyst/markdown';
@@ -6064,11 +6068,11 @@ function DocumentView({ markdown }: { markdown: string }) {
6064
6068
  onLinkPress: (url) => {
6065
6069
  if (url.startsWith('/')) {
6066
6070
  navigate({ path: url });
6067
- return true; // Prevent default browser behavior
6071
+ return true; // Handled \u2014 prevent default
6068
6072
  }
6069
- return false; // Allow external links to open normally
6073
+ return false; // Not handled \u2014 openExternalLinks takes over
6070
6074
  },
6071
- openExternalLinks: true,
6075
+ openExternalLinks: true, // Opens external URLs cross-platform (no Linking import needed!)
6072
6076
  }}
6073
6077
  >
6074
6078
  {markdown}
@@ -11315,7 +11319,7 @@ This server has tools for every aspect of the framework. **Always look up the AP
11315
11319
  ### Workflow (be efficient \u2014 minimize tool calls)
11316
11320
 
11317
11321
  1. **Start here** \u2014 this intro covers conventions and gotchas
11318
- 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)
11322
+ 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)
11319
11323
  3. **Look up packages** \u2014 call the dedicated \`get_*_guide\` tool with topic \`api\` for each \`@idealyst/*\` package
11320
11324
  4. **Check recipes** \u2014 call \`search_recipes\` to find ready-made patterns for common screens
11321
11325
  5. **Search icons ONCE** \u2014 combine all needed icon terms into ONE \`search_icons\` call (e.g., \`"home settings check timer calendar"\`)
@@ -11324,7 +11328,7 @@ This server has tools for every aspect of the framework. **Always look up the AP
11324
11328
  ### Component Tools
11325
11329
  - \`list_components\` / \`search_components\` \u2014 Discover available components
11326
11330
  - \`get_component_docs\` \u2014 Component features and best practices
11327
- - \`get_component_types\` \u2014 **TypeScript prop interfaces** (supports batch: \`"Button,Card,Text"\`)
11331
+ - \`get_component_types\` \u2014 **TypeScript prop interfaces** for a component
11328
11332
  - \`get_component_examples_ts\` \u2014 Type-checked code examples
11329
11333
  - \`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
11330
11334
 
@@ -11421,13 +11425,23 @@ These are mistakes agents make repeatedly. Each one causes TypeScript compilatio
11421
11425
  15. \`useParams()\` does NOT accept generic type arguments. It returns \`Record<string, string>\`. Do NOT write \`useParams<{ id: string }>()\` \u2014 that causes TS2558.
11422
11426
 
11423
11427
  ### Imports & Styling
11424
- 16. **Never** import from \`react-native\` for UI \u2014 no \`TouchableOpacity\`, \`FlatList\`, \`ScrollView\`, \`Animated\`, \`Dimensions\`.
11428
+ 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\`).
11425
11429
  17. **Never** import from \`react-native-unistyles\` \u2014 use \`@idealyst/theme\` (\`configureThemes\`, \`ThemeSettings\`, \`useTheme\`).
11426
- 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 }}\`.
11430
+ 18. **useTheme()** returns the Theme object **directly** (NOT wrapped): \`const theme = useTheme();\`. Do NOT destructure: \`const { theme } = useTheme()\` \u2014 causes TS2339.
11431
+ 19. **Spacing & Layout**: Use component shorthand props for spacing \u2014 NOT \`theme.spacing\` (which does NOT exist). The correct patterns:
11432
+ - \`<View padding="md" gap="md">\` \u2014 shorthand props on View/Card
11433
+ - \`<View paddingHorizontal="lg" marginVertical="sm">\` \u2014 directional shorthands
11434
+ - \`style={{ backgroundColor: theme.colors.surface.primary }}\` \u2014 inline styles for colors only
11435
+ - \`theme.radii.md\` \u2014 border radius values (this DOES exist)
11436
+ - **WRONG**: \`theme.spacing.md\` \u2014 does NOT exist, causes TS2339
11437
+ - **WRONG**: \`theme.colors.intent.danger\` \u2014 does NOT exist; intents are at \`theme.intents.danger\`
11438
+
11439
+ ### Cross-Platform (CRITICAL)
11440
+ 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.
11441
+ 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).
11427
11442
 
11428
11443
  ### React 19 TypeScript
11429
11444
  - **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[]>([])\`.
11430
- - **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).
11431
11445
 
11432
11446
  ### Scaffolded Project Layout
11433
11447
  When working in a CLI-scaffolded workspace (created with \`idealyst init\` + \`idealyst create\`), files go in specific locations:
@@ -19764,7 +19778,7 @@ function getThemeTypes2(args = {}) {
19764
19778
  try {
19765
19779
  const result = getThemeTypes(format);
19766
19780
  if (typeof result === "object" && result !== null) {
19767
- 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 }}`";
19781
+ 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).';
19768
19782
  }
19769
19783
  return jsonResponse(result);
19770
19784
  } catch (error) {
@@ -20268,4 +20282,4 @@ export {
20268
20282
  toolHandlers,
20269
20283
  callTool
20270
20284
  };
20271
- //# sourceMappingURL=chunk-ZDB2NURA.js.map
20285
+ //# sourceMappingURL=chunk-NX77GGPR.js.map