@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.cjs CHANGED
@@ -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}
@@ -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) {