@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.cjs CHANGED
@@ -9351,13 +9351,13 @@ var searchComponentsDefinition = {
9351
9351
  };
9352
9352
  var getComponentTypesDefinition = {
9353
9353
  name: "get_component_types",
9354
- 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').",
9354
+ description: "Get TypeScript type definitions for a specific component directly from the source. Returns the actual TypeScript interface and/or JSON schema.",
9355
9355
  inputSchema: {
9356
9356
  type: "object",
9357
9357
  properties: {
9358
9358
  component: {
9359
9359
  type: "string",
9360
- description: "The name of the component (e.g., 'Button', 'Card', 'Input'). Supports comma-separated names for batch lookup: 'Button,Card,Text,Icon'"
9360
+ description: "The name of the component (e.g., 'Button', 'Card', 'Input')"
9361
9361
  },
9362
9362
  format: {
9363
9363
  type: "string",
@@ -11386,7 +11386,7 @@ function VideoRecordingScreen() {
11386
11386
  )}
11387
11387
  <Button
11388
11388
  onPress={handleToggleRecording}
11389
- intent={camera.isRecording ? 'error' : 'primary'}
11389
+ intent={camera.isRecording ? 'danger' : 'primary'}
11390
11390
  >
11391
11391
  {camera.isRecording ? 'Stop Recording' : 'Record Video'}
11392
11392
  </Button>
@@ -13870,6 +13870,10 @@ function ArticleView({ content }: { content: string }) {
13870
13870
 
13871
13871
  ## Custom Link Handling
13872
13872
 
13873
+ **IMPORTANT**: Do NOT import \`Linking\` from \`react-native\` for opening URLs. The Markdown component has built-in cross-platform link handling via \`linkHandler\`:
13874
+ - \`openExternalLinks: true\` \u2014 opens external URLs in the system browser (cross-platform, no imports needed)
13875
+ - \`onLinkPress\` \u2014 intercept link taps for internal navigation
13876
+
13873
13877
  \`\`\`tsx
13874
13878
  import React from 'react';
13875
13879
  import { Markdown } from '@idealyst/markdown';
@@ -13884,11 +13888,11 @@ function DocumentView({ markdown }: { markdown: string }) {
13884
13888
  onLinkPress: (url) => {
13885
13889
  if (url.startsWith('/')) {
13886
13890
  navigate({ path: url });
13887
- return true; // Prevent default browser behavior
13891
+ return true; // Handled \u2014 prevent default
13888
13892
  }
13889
- return false; // Allow external links to open normally
13893
+ return false; // Not handled \u2014 openExternalLinks takes over
13890
13894
  },
13891
- openExternalLinks: true,
13895
+ openExternalLinks: true, // Opens external URLs cross-platform (no Linking import needed!)
13892
13896
  }}
13893
13897
  >
13894
13898
  {markdown}
@@ -15828,7 +15832,7 @@ This server has tools for every aspect of the framework. **Always look up the AP
15828
15832
  ### Workflow (be efficient \u2014 minimize tool calls)
15829
15833
 
15830
15834
  1. **Start here** \u2014 this intro covers conventions and gotchas
15831
- 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)
15835
+ 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)
15832
15836
  3. **Look up packages** \u2014 call the dedicated \`get_*_guide\` tool with topic \`api\` for each \`@idealyst/*\` package
15833
15837
  4. **Check recipes** \u2014 call \`search_recipes\` to find ready-made patterns for common screens
15834
15838
  5. **Search icons ONCE** \u2014 combine all needed icon terms into ONE \`search_icons\` call (e.g., \`"home settings check timer calendar"\`)
@@ -15837,7 +15841,7 @@ This server has tools for every aspect of the framework. **Always look up the AP
15837
15841
  ### Component Tools
15838
15842
  - \`list_components\` / \`search_components\` \u2014 Discover available components
15839
15843
  - \`get_component_docs\` \u2014 Component features and best practices
15840
- - \`get_component_types\` \u2014 **TypeScript prop interfaces** (supports batch: \`"Button,Card,Text"\`)
15844
+ - \`get_component_types\` \u2014 **TypeScript prop interfaces** for a component
15841
15845
  - \`get_component_examples_ts\` \u2014 Type-checked code examples
15842
15846
  - \`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
15843
15847
 
@@ -15934,13 +15938,23 @@ These are mistakes agents make repeatedly. Each one causes TypeScript compilatio
15934
15938
  15. \`useParams()\` does NOT accept generic type arguments. It returns \`Record<string, string>\`. Do NOT write \`useParams<{ id: string }>()\` \u2014 that causes TS2558.
15935
15939
 
15936
15940
  ### Imports & Styling
15937
- 16. **Never** import from \`react-native\` for UI \u2014 no \`TouchableOpacity\`, \`FlatList\`, \`ScrollView\`, \`Animated\`, \`Dimensions\`.
15941
+ 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\`).
15938
15942
  17. **Never** import from \`react-native-unistyles\` \u2014 use \`@idealyst/theme\` (\`configureThemes\`, \`ThemeSettings\`, \`useTheme\`).
15939
- 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 }}\`.
15943
+ 18. **useTheme()** returns the Theme object **directly** (NOT wrapped): \`const theme = useTheme();\`. Do NOT destructure: \`const { theme } = useTheme()\` \u2014 causes TS2339.
15944
+ 19. **Spacing & Layout**: Use component shorthand props for spacing \u2014 NOT \`theme.spacing\` (which does NOT exist). The correct patterns:
15945
+ - \`<View padding="md" gap="md">\` \u2014 shorthand props on View/Card
15946
+ - \`<View paddingHorizontal="lg" marginVertical="sm">\` \u2014 directional shorthands
15947
+ - \`style={{ backgroundColor: theme.colors.surface.primary }}\` \u2014 inline styles for colors only
15948
+ - \`theme.radii.md\` \u2014 border radius values (this DOES exist)
15949
+ - **WRONG**: \`theme.spacing.md\` \u2014 does NOT exist, causes TS2339
15950
+ - **WRONG**: \`theme.colors.intent.danger\` \u2014 does NOT exist; intents are at \`theme.intents.danger\`
15951
+
15952
+ ### Cross-Platform (CRITICAL)
15953
+ 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.
15954
+ 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).
15940
15955
 
15941
15956
  ### React 19 TypeScript
15942
15957
  - **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[]>([])\`.
15943
- - **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).
15944
15958
 
15945
15959
  ### Scaffolded Project Layout
15946
15960
  When working in a CLI-scaffolded workspace (created with \`idealyst init\` + \`idealyst create\`), files go in specific locations:
@@ -24269,7 +24283,7 @@ function getThemeTypes2(args = {}) {
24269
24283
  try {
24270
24284
  const result = getThemeTypes(format);
24271
24285
  if (typeof result === "object" && result !== null) {
24272
- 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 }}`";
24286
+ 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).';
24273
24287
  }
24274
24288
  return jsonResponse(result);
24275
24289
  } catch (error) {