@idealyst/mcp-server 1.2.105 → 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.
@@ -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}
@@ -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-NRM3KHHB.js.map
20285
+ //# sourceMappingURL=chunk-NX77GGPR.js.map