@idealyst/mcp-server 1.2.101 → 1.2.102

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.
@@ -0,0 +1,161 @@
1
+ /**
2
+ * Image Component Examples
3
+ *
4
+ * These examples are type-checked against the actual ImageProps interface
5
+ * to ensure accuracy and correctness.
6
+ */
7
+
8
+ import React from 'react';
9
+ import { Image, View, Text } from '@idealyst/components';
10
+
11
+ // Example 1: Basic Image
12
+ export function BasicImage() {
13
+ return (
14
+ <Image
15
+ source={{ uri: 'https://picsum.photos/300/200' }}
16
+ alt="A random placeholder image"
17
+ />
18
+ );
19
+ }
20
+
21
+ // Example 2: Image with Dimensions
22
+ export function ImageWithDimensions() {
23
+ return (
24
+ <View spacing="md">
25
+ <Image
26
+ source={{ uri: 'https://picsum.photos/400/300' }}
27
+ alt="Fixed dimensions"
28
+ width={400}
29
+ height={300}
30
+ />
31
+ <Image
32
+ source={{ uri: 'https://picsum.photos/600/400' }}
33
+ alt="With aspect ratio"
34
+ width="100%"
35
+ aspectRatio={16 / 9}
36
+ />
37
+ </View>
38
+ );
39
+ }
40
+
41
+ // Example 3: Image Object Fit
42
+ export function ImageObjectFit() {
43
+ return (
44
+ <View spacing="md">
45
+ <Image
46
+ source={{ uri: 'https://picsum.photos/400/300' }}
47
+ alt="Contain mode"
48
+ width={200}
49
+ height={200}
50
+ objectFit="contain"
51
+ />
52
+ <Image
53
+ source={{ uri: 'https://picsum.photos/400/300' }}
54
+ alt="Cover mode"
55
+ width={200}
56
+ height={200}
57
+ objectFit="cover"
58
+ />
59
+ <Image
60
+ source={{ uri: 'https://picsum.photos/400/300' }}
61
+ alt="Fill mode"
62
+ width={200}
63
+ height={200}
64
+ objectFit="fill"
65
+ />
66
+ </View>
67
+ );
68
+ }
69
+
70
+ // Example 4: Image with Placeholder and Fallback
71
+ export function ImageWithPlaceholder() {
72
+ return (
73
+ <View spacing="md">
74
+ <Image
75
+ source={{ uri: 'https://picsum.photos/300/200' }}
76
+ alt="Image with placeholder"
77
+ width={300}
78
+ height={200}
79
+ placeholder={
80
+ <View style={{ width: 300, height: 200, backgroundColor: '#e0e0e0', justifyContent: 'center', alignItems: 'center' }}>
81
+ <Text>Loading...</Text>
82
+ </View>
83
+ }
84
+ fallback={
85
+ <View style={{ width: 300, height: 200, backgroundColor: '#f5f5f5', justifyContent: 'center', alignItems: 'center' }}>
86
+ <Text>Failed to load image</Text>
87
+ </View>
88
+ }
89
+ />
90
+ </View>
91
+ );
92
+ }
93
+
94
+ // Example 5: Image with Border Radius
95
+ export function ImageWithBorderRadius() {
96
+ return (
97
+ <View spacing="md">
98
+ <Image
99
+ source={{ uri: 'https://picsum.photos/200/200' }}
100
+ alt="Rounded corners"
101
+ width={200}
102
+ height={200}
103
+ borderRadius={12}
104
+ />
105
+ <Image
106
+ source={{ uri: 'https://picsum.photos/150/150' }}
107
+ alt="Circular image"
108
+ width={150}
109
+ height={150}
110
+ borderRadius={75}
111
+ />
112
+ </View>
113
+ );
114
+ }
115
+
116
+ // Example 6: Image with Lazy Loading
117
+ export function ImageLazyLoading() {
118
+ return (
119
+ <Image
120
+ source={{ uri: 'https://picsum.photos/600/400' }}
121
+ alt="Lazy loaded image"
122
+ width="100%"
123
+ aspectRatio={3 / 2}
124
+ loading="lazy"
125
+ />
126
+ );
127
+ }
128
+
129
+ // Example 7: Combined Image Features
130
+ export function CombinedImageFeatures() {
131
+ const [loaded, setLoaded] = React.useState(false);
132
+
133
+ return (
134
+ <View spacing="md">
135
+ <Image
136
+ source={{ uri: 'https://picsum.photos/400/300' }}
137
+ alt="Featured image with combined props"
138
+ width="100%"
139
+ aspectRatio={4 / 3}
140
+ objectFit="cover"
141
+ borderRadius={16}
142
+ loading="lazy"
143
+ placeholder={
144
+ <View style={{ width: '100%', aspectRatio: 4 / 3, backgroundColor: '#e0e0e0', justifyContent: 'center', alignItems: 'center' }}>
145
+ <Text>Loading...</Text>
146
+ </View>
147
+ }
148
+ fallback={
149
+ <View style={{ width: '100%', aspectRatio: 4 / 3, backgroundColor: '#f5f5f5', justifyContent: 'center', alignItems: 'center' }}>
150
+ <Text>Image unavailable</Text>
151
+ </View>
152
+ }
153
+ onLoad={() => setLoaded(true)}
154
+ onError={(error) => console.log('Image failed to load:', error)}
155
+ accessibilityLabel="A featured landscape photograph"
156
+ testID="featured-image"
157
+ />
158
+ {loaded && <Text>Image loaded successfully</Text>}
159
+ </View>
160
+ );
161
+ }
@@ -53,29 +53,28 @@ export function TextAlignment() {
53
53
  export function TextWithColor() {
54
54
  return (
55
55
  <View spacing="md">
56
- <Text >Blue text</Text>
57
- <Text >Green text</Text>
58
- <Text >Red text</Text>
59
- <Text >Gray text</Text>
60
- <Text >Purple text</Text>
56
+ <Text color="primary">Primary text color</Text>
57
+ <Text color="secondary">Secondary text color</Text>
58
+ <Text color="tertiary">Tertiary text color</Text>
59
+ <Text color="inverse">Inverse text color</Text>
61
60
  </View>
62
61
  );
63
62
  }
64
63
 
65
- // Example 6: Combining Size, Weight, and Color
64
+ // Example 6: Combining Typography, Weight, and Color
66
65
  export function CombinedTextStyles() {
67
66
  return (
68
67
  <View spacing="md">
69
- <Text typography="h5" weight="bold">
68
+ <Text typography="h5" weight="bold" color="primary">
70
69
  Heading 1
71
70
  </Text>
72
- <Text typography="subtitle1" weight="semibold">
71
+ <Text typography="subtitle1" weight="semibold" color="primary">
73
72
  Heading 2
74
73
  </Text>
75
- <Text typography="body1" weight="medium">
74
+ <Text typography="body1" weight="medium" color="secondary">
76
75
  Subheading
77
76
  </Text>
78
- <Text typography="body2" weight="normal">
77
+ <Text typography="body2" weight="normal" color="tertiary">
79
78
  Body text
80
79
  </Text>
81
80
  </View>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idealyst/mcp-server",
3
- "version": "1.2.101",
3
+ "version": "1.2.102",
4
4
  "description": "MCP server providing documentation and examples for the Idealyst framework",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -33,7 +33,11 @@
33
33
  "prebuild": "yarn extract-types && yarn validate-examples",
34
34
  "build": "tsup && mkdir -p dist/generated && cp -r src/generated/* dist/generated/",
35
35
  "dev": "tsup --watch",
36
- "start": "node dist/index.js"
36
+ "start": "node dist/index.js",
37
+ "eval": "tsx eval/src/run-eval.ts",
38
+ "eval:all": "tsx eval/src/run-eval.ts --scenarios all",
39
+ "eval:quick": "tsx eval/src/run-eval.ts --scenarios login-screen --verbose",
40
+ "eval:list": "tsx eval/src/run-eval.ts --list"
37
41
  },
38
42
  "publishConfig": {
39
43
  "access": "public",
@@ -49,15 +53,17 @@
49
53
  "author": "Idealyst",
50
54
  "license": "MIT",
51
55
  "dependencies": {
52
- "@idealyst/components": "^1.2.101",
53
- "@idealyst/navigation": "^1.2.101",
54
- "@idealyst/theme": "^1.2.101",
55
- "@idealyst/tooling": "^1.2.101",
56
+ "@idealyst/components": "^1.2.102",
57
+ "@idealyst/navigation": "^1.2.102",
58
+ "@idealyst/theme": "^1.2.102",
59
+ "@idealyst/tooling": "^1.2.102",
56
60
  "@modelcontextprotocol/sdk": "^1.0.4"
57
61
  },
58
62
  "devDependencies": {
63
+ "@types/better-sqlite3": "^7.6.12",
59
64
  "@types/node": "^20.0.0",
60
65
  "@types/react": "^19.1.0",
66
+ "better-sqlite3": "^11.7.0",
61
67
  "chalk": "^5.3.0",
62
68
  "react": "^19.1.0",
63
69
  "react-native": "^0.80.1",