File tree Expand file tree Collapse file tree 2 files changed +21
-5
lines changed
Expand file tree Collapse file tree 2 files changed +21
-5
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " optics-mcp" ,
3- "version" : " 0.1 .1" ,
4- "description" : " MCP Server for Optics Design System documentation and token usage" ,
3+ "version" : " 0.2 .1" ,
4+ "description" : " MCP Server for Optics Design System documentation and token usage with AI-optimized comprehension guide " ,
55 "main" : " dist/index.js" ,
66 "type" : " module" ,
77 "bin" : {
2828 "license" : " MIT" ,
2929 "repository" : {
3030 "type" : " git" ,
31- "url" : " https://github.com/RoleModel/optics-mcp.git"
31+ "url" : " git+ https://github.com/RoleModel/optics-mcp.git"
3232 },
3333 "bugs" : {
3434 "url" : " https://github.com/RoleModel/optics-mcp/issues"
4747 "files" : [
4848 " dist" ,
4949 " README.md" ,
50- " LICENSE"
50+ " LICENSE" ,
51+ " SYSTEM_OVERVIEW.md" ,
52+ " AI_IMPROVEMENTS.md" ,
53+ " WARP.md" ,
54+ " TOOLS.md" ,
55+ " EXAMPLES.md"
5156 ]
5257}
Original file line number Diff line number Diff line change @@ -174,7 +174,18 @@ export function extractAllValues(css: string): CSSValue[] {
174174 */
175175export function findMatchingToken ( value : string , tokens : Array < { name : string ; value : string ; category : string } > ) : string | null {
176176 // Normalize values for comparison
177- const normalizeValue = ( v : string ) => v . toLowerCase ( ) . replace ( / \s + / g, '' ) ;
177+ // Keep spaces in specific contexts like hsl() and rgba() where they're significant
178+ const normalizeValue = ( v : string ) => {
179+ return v
180+ . toLowerCase ( )
181+ . replace ( / \s + / g, ' ' ) // Normalize multiple spaces to single space
182+ . replace ( / \( \s + / g, '(' ) // Remove space after opening paren
183+ . replace ( / \s + \) / g, ')' ) // Remove space before closing paren
184+ . replace ( / \s * , \s * / g, ',' ) // Normalize commas
185+ . replace ( / \s * \/ \s * / g, '/' ) // Normalize forward slash (for alpha)
186+ . trim ( ) ;
187+ } ;
188+
178189 const normalizedValue = normalizeValue ( value ) ;
179190
180191 for ( const token of tokens ) {
You can’t perform that action at this time.
0 commit comments