@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.
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  storageGuides,
8
8
  toolDefinitions,
9
9
  translateGuides
10
- } from "./chunk-NRM3KHHB.js";
10
+ } from "./chunk-NX77GGPR.js";
11
11
 
12
12
  // src/index.ts
13
13
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -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}
@@ -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) {