galaxy-design 0.2.1 → 0.2.3
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/README.md +44 -4
- package/dist/bin.js +1 -1
- package/dist/bin.js.map +1 -1
- package/dist/commands/add.js +1 -1
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/init.js +8 -4
- package/dist/commands/init.js.map +1 -1
- package/dist/registries/registry-react.json +64 -4
- package/dist/utils/component-copier.js +34 -7
- package/dist/utils/component-copier.js.map +1 -1
- package/dist/utils/component-transformer.js +175 -0
- package/dist/utils/component-transformer.js.map +1 -0
- package/dist/utils/config-schema.js +43 -1
- package/dist/utils/config-schema.js.map +1 -1
- package/dist/utils/detect.js +8 -0
- package/dist/utils/detect.js.map +1 -1
- package/dist/utils/framework-registry.js +9 -2
- package/dist/utils/framework-registry.js.map +1 -1
- package/dist/utils/platform-detector.js +33 -1
- package/dist/utils/platform-detector.js.map +1 -1
- package/package.json +7 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/platform-detector.ts"],"sourcesContent":["import { existsSync } from 'fs';\nimport { join } from 'path';\n\n/**\n * Supported platforms for Galaxy UI CLI\n */\nexport type Platform = 'react-native' | 'flutter' | 'vue' | 'react' | 'angular' | 'unknown';\n\n/**\n * Platform detection result with confidence level\n */\nexport interface PlatformDetectionResult {\n\tplatform: Platform;\n\tconfidence: 'high' | 'medium' | 'low';\n\tevidence: string[];\n\tframework?: string; // For web platforms: vue, react, angular\n}\n\n/**\n * Detect project platform based on file structure and config files\n *\n * Detection priority:\n * 1. Mobile platforms (React Native, Flutter) - highest priority\n * 2. Web frameworks (Vue, React, Angular)\n * 3. Unknown\n */\nexport function detectPlatform(cwd: string): PlatformDetectionResult {\n\tconst evidence: string[] = [];\n\n\t// Check for Flutter (highest priority for mobile)\n\tif (existsSync(join(cwd, 'pubspec.yaml'))) {\n\t\tevidence.push('Found pubspec.yaml (Flutter project file)');\n\n\t\t// Additional Flutter indicators\n\t\tif (existsSync(join(cwd, 'lib'))) {\n\t\t\tevidence.push('Found lib/ directory (Flutter source directory)');\n\t\t}\n\t\tif (existsSync(join(cwd, 'android')) && existsSync(join(cwd, 'ios'))) {\n\t\t\tevidence.push('Found android/ and ios/ directories (Flutter mobile platforms)');\n\t\t}\n\n\t\treturn {\n\t\t\tplatform: 'flutter',\n\t\t\tconfidence: 'high',\n\t\t\tevidence,\n\t\t};\n\t}\n\n\t// Check for React Native\n\tconst hasPackageJson = existsSync(join(cwd, 'package.json'));\n\tconst hasIosDir = existsSync(join(cwd, 'ios'));\n\tconst hasAndroidDir = existsSync(join(cwd, 'android'));\n\tconst hasAppJson = existsSync(join(cwd, 'app.json'));\n\n\tif (hasPackageJson && (hasIosDir || hasAndroidDir)) {\n\t\tevidence.push('Found package.json with mobile platform directories');\n\n\t\tif (hasIosDir) evidence.push('Found ios/ directory');\n\t\tif (hasAndroidDir) evidence.push('Found android/ directory');\n\t\tif (hasAppJson) evidence.push('Found app.json (React Native config)');\n\n\t\t// Check package.json for react-native dependency\n\t\ttry {\n\t\t\tconst packageJson = require(join(cwd, 'package.json'));\n\t\t\tif (packageJson.dependencies?.['react-native']) {\n\t\t\t\tevidence.push('Found react-native in dependencies');\n\t\t\t\treturn {\n\t\t\t\t\tplatform: 'react-native',\n\t\t\t\t\tconfidence: 'high',\n\t\t\t\t\tevidence,\n\t\t\t\t};\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// Ignore JSON parse errors\n\t\t}\n\n\t\t// If has mobile dirs but no react-native dep, still consider it RN with medium confidence\n\t\treturn {\n\t\t\tplatform: 'react-native',\n\t\t\tconfidence: 'medium',\n\t\t\tevidence,\n\t\t};\n\t}\n\n\t// Check for Web frameworks (only if not mobile)\n\tif (hasPackageJson) {\n\t\ttry {\n\t\t\tconst packageJson = require(join(cwd, 'package.json'));\n\t\t\tconst deps = { ...packageJson.dependencies, ...packageJson.devDependencies };\n\n\t\t\t// Check for Vue\n\t\t\tif (deps['vue'] || deps['@vue/cli']) {\n\t\t\t\tevidence.push('Found Vue in dependencies');\n\t\t\t\tif (existsSync(join(cwd, 'vite.config.ts')) || existsSync(join(cwd, 'vite.config.js'))) {\n\t\t\t\t\tevidence.push('Found vite.config (Vue + Vite)');\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tplatform: 'vue',\n\t\t\t\t\tconfidence: 'high',\n\t\t\t\t\tevidence,\n\t\t\t\t\tframework: 'vue',\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Check for Angular\n\t\t\tif (deps['@angular/core']) {\n\t\t\t\tevidence.push('Found @angular/core in dependencies');\n\t\t\t\tif (existsSync(join(cwd, 'angular.json'))) {\n\t\t\t\t\tevidence.push('Found angular.json (Angular config)');\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tplatform: 'angular',\n\t\t\t\t\tconfidence: 'high',\n\t\t\t\t\tevidence,\n\t\t\t\t\tframework: 'angular',\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Check for React (web)\n\t\t\tif (deps['react'] && !hasIosDir && !hasAndroidDir) {\n\t\t\t\tevidence.push('Found React in dependencies (web project)');\n\t\t\t\tif (existsSync(join(cwd, 'vite.config.ts')) || existsSync(join(cwd, 'vite.config.js'))) {\n\t\t\t\t\tevidence.push('Found vite.config (React + Vite)');\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tplatform: 'react',\n\t\t\t\t\tconfidence: 'high',\n\t\t\t\t\tevidence,\n\t\t\t\t\tframework: 'react',\n\t\t\t\t};\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// Ignore errors\n\t\t}\n\t}\n\n\t// Unknown platform\n\treturn {\n\t\tplatform: 'unknown',\n\t\tconfidence: 'low',\n\t\tevidence: ['No recognized project structure found'],\n\t};\n}\n\n/**\n * Get human-readable platform name\n */\nexport function getPlatformDisplayName(platform: Platform): string {\n\tconst names: Record<Platform, string> = {\n\t\t'react-native': 'React Native',\n\t\t'flutter': 'Flutter',\n\t\t'vue': 'Vue.js',\n\t\t'react': 'React',\n\t\t'angular': 'Angular',\n\t\t'unknown': 'Unknown',\n\t};\n\treturn names[platform];\n}\n\n/**\n * Check if platform is mobile\n */\nexport function isMobilePlatform(platform: Platform): boolean {\n\treturn platform === 'react-native' || platform === 'flutter';\n}\n\n/**\n * Check if platform is web\n */\nexport function isWebPlatform(platform: Platform): boolean {\n\treturn platform === 'vue' || platform === 'react' || platform === 'angular';\n}\n\n/**\n * Get registry file name for platform\n */\nexport function getRegistryFileName(platform: Platform): string {\n\tswitch (platform) {\n\t\tcase 'react-native':\n\t\t\treturn 'registry-react-native.json';\n\t\tcase 'flutter':\n\t\t\treturn 'registry-flutter.json';\n\t\tcase 'vue':\n\t\tcase 'react':\n\t\tcase 'angular':\n\t\t\treturn 'registry.json'; // Web platforms use same registry\n\t\tdefault:\n\t\t\treturn 'registry.json';\n\t}\n}\n\n/**\n * Get component source directory for platform\n */\nexport function getComponentSourceDir(platform: Platform): string {\n\tswitch (platform) {\n\t\tcase 'react-native':\n\t\t\treturn 'packages/react-native/src/components';\n\t\tcase 'flutter':\n\t\t\treturn 'packages/flutter/lib/components';\n\t\tcase 'vue':\n\t\t\treturn 'packages/vue/src/components';\n\t\tcase 'react':\n\t\t\treturn 'packages/react/src/components';\n\t\tcase 'angular':\n\t\t\treturn 'packages/angular/src/components';\n\t\tdefault:\n\t\t\tthrow new Error(`Unknown platform: ${platform}`);\n\t}\n}\n"],"names":["existsSync","join","detectPlatform","cwd","evidence","push","platform","confidence","hasPackageJson","hasIosDir","hasAndroidDir","hasAppJson","packageJson","require","dependencies","error","deps","devDependencies","framework","getPlatformDisplayName","names","isMobilePlatform","isWebPlatform","getRegistryFileName","getComponentSourceDir","Error"],"mappings":";AAAA,SAASA,UAAU,QAAQ,KAAK;AAChC,SAASC,IAAI,QAAQ,OAAO;AAiB5B;;;;;;;CAOC,GACD,OAAO,SAASC,eAAeC,GAAW;IACzC,MAAMC,WAAqB,EA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WA,aAAa;AACnE;AAEA;;CAEC,GACD,OAAO,SAASiB,oBAAoBjB,QAAkB;IACrD,OAAQA;QACP,KAAK;YACJ,OAAO;QACR,KAAK;YACJ,OAAO;QACR,KAAK;QACL,KAAK;QACL,KAAK;YACJ,OAAO,iBAAiB,kCAAkC;QAC3D;YACC,OAAO;IACT;AACD;AAEA;;CAEC,GACD,OAAO,SAASkB,sBAAsBlB,QAAkB;IACvD,OAAQA;QACP,KAAK;YACJ,OAAO;QACR,KAAK;YACJ,OAAO;QACR,KAAK;YACJ,OAAO;QACR,KAAK;YACJ,OAAO;QACR,KAAK;YACJ,OAAO;QACR;YACC,MAAM,IAAImB,MAAM,CAAC,kBAAkB,EAAEnB,UAAU;IACjD;AACD"}
|
|
1
|
+
{"version":3,"sources":["../../src/utils/platform-detector.ts"],"sourcesContent":["import { existsSync } from 'fs';\nimport { join } from 'path';\n\n/**\n * Supported platforms for Galaxy UI CLI\n */\nexport type Platform = 'react-native' | 'flutter' | 'vue' | 'react' | 'angular' | 'nextjs' | 'nuxtjs' | 'unknown';\n\n/**\n * Platform detection result with confidence level\n */\nexport interface PlatformDetectionResult {\n\tplatform: Platform;\n\tconfidence: 'high' | 'medium' | 'low';\n\tevidence: string[];\n\tframework?: string; // For web platforms: vue, react, angular\n}\n\n/**\n * Detect project platform based on file structure and config files\n *\n * Detection priority:\n * 1. Mobile platforms (React Native, Flutter) - highest priority\n * 2. Web frameworks (Vue, React, Angular)\n * 3. Unknown\n */\nexport function detectPlatform(cwd: string): PlatformDetectionResult {\n\tconst evidence: string[] = [];\n\n\t// Check for Flutter (highest priority for mobile)\n\tif (existsSync(join(cwd, 'pubspec.yaml'))) {\n\t\tevidence.push('Found pubspec.yaml (Flutter project file)');\n\n\t\t// Additional Flutter indicators\n\t\tif (existsSync(join(cwd, 'lib'))) {\n\t\t\tevidence.push('Found lib/ directory (Flutter source directory)');\n\t\t}\n\t\tif (existsSync(join(cwd, 'android')) && existsSync(join(cwd, 'ios'))) {\n\t\t\tevidence.push('Found android/ and ios/ directories (Flutter mobile platforms)');\n\t\t}\n\n\t\treturn {\n\t\t\tplatform: 'flutter',\n\t\t\tconfidence: 'high',\n\t\t\tevidence,\n\t\t};\n\t}\n\n\t// Check for React Native\n\tconst hasPackageJson = existsSync(join(cwd, 'package.json'));\n\tconst hasIosDir = existsSync(join(cwd, 'ios'));\n\tconst hasAndroidDir = existsSync(join(cwd, 'android'));\n\tconst hasAppJson = existsSync(join(cwd, 'app.json'));\n\n\tif (hasPackageJson && (hasIosDir || hasAndroidDir)) {\n\t\tevidence.push('Found package.json with mobile platform directories');\n\n\t\tif (hasIosDir) evidence.push('Found ios/ directory');\n\t\tif (hasAndroidDir) evidence.push('Found android/ directory');\n\t\tif (hasAppJson) evidence.push('Found app.json (React Native config)');\n\n\t\t// Check package.json for react-native dependency\n\t\ttry {\n\t\t\tconst packageJson = require(join(cwd, 'package.json'));\n\t\t\tif (packageJson.dependencies?.['react-native']) {\n\t\t\t\tevidence.push('Found react-native in dependencies');\n\t\t\t\treturn {\n\t\t\t\t\tplatform: 'react-native',\n\t\t\t\t\tconfidence: 'high',\n\t\t\t\t\tevidence,\n\t\t\t\t};\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// Ignore JSON parse errors\n\t\t}\n\n\t\t// If has mobile dirs but no react-native dep, still consider it RN with medium confidence\n\t\treturn {\n\t\t\tplatform: 'react-native',\n\t\t\tconfidence: 'medium',\n\t\t\tevidence,\n\t\t};\n\t}\n\n\t// Check for Web frameworks (only if not mobile)\n\tif (hasPackageJson) {\n\t\ttry {\n\t\t\tconst packageJson = require(join(cwd, 'package.json'));\n\t\t\tconst deps = { ...packageJson.dependencies, ...packageJson.devDependencies };\n\n\t\t\t// Check for Next.js (must be before React check)\n\t\t\tif (deps['next']) {\n\t\t\t\tevidence.push('Found Next.js in dependencies');\n\t\t\t\tif (existsSync(join(cwd, 'next.config.js')) || existsSync(join(cwd, 'next.config.ts'))) {\n\t\t\t\t\tevidence.push('Found next.config (Next.js config)');\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tplatform: 'nextjs',\n\t\t\t\t\tconfidence: 'high',\n\t\t\t\t\tevidence,\n\t\t\t\t\tframework: 'nextjs',\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Check for Nuxt.js (must be before Vue check)\n\t\t\tif (deps['nuxt'] || deps['nuxt3']) {\n\t\t\t\tevidence.push('Found Nuxt.js in dependencies');\n\t\t\t\tif (existsSync(join(cwd, 'nuxt.config.ts')) || existsSync(join(cwd, 'nuxt.config.js'))) {\n\t\t\t\t\tevidence.push('Found nuxt.config (Nuxt.js config)');\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tplatform: 'nuxtjs',\n\t\t\t\t\tconfidence: 'high',\n\t\t\t\t\tevidence,\n\t\t\t\t\tframework: 'nuxtjs',\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Check for Vue\n\t\t\tif (deps['vue'] || deps['@vue/cli']) {\n\t\t\t\tevidence.push('Found Vue in dependencies');\n\t\t\t\tif (existsSync(join(cwd, 'vite.config.ts')) || existsSync(join(cwd, 'vite.config.js'))) {\n\t\t\t\t\tevidence.push('Found vite.config (Vue + Vite)');\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tplatform: 'vue',\n\t\t\t\t\tconfidence: 'high',\n\t\t\t\t\tevidence,\n\t\t\t\t\tframework: 'vue',\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Check for Angular\n\t\t\tif (deps['@angular/core']) {\n\t\t\t\tevidence.push('Found @angular/core in dependencies');\n\t\t\t\tif (existsSync(join(cwd, 'angular.json'))) {\n\t\t\t\t\tevidence.push('Found angular.json (Angular config)');\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tplatform: 'angular',\n\t\t\t\t\tconfidence: 'high',\n\t\t\t\t\tevidence,\n\t\t\t\t\tframework: 'angular',\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Check for React (web)\n\t\t\tif (deps['react'] && !hasIosDir && !hasAndroidDir) {\n\t\t\t\tevidence.push('Found React in dependencies (web project)');\n\t\t\t\tif (existsSync(join(cwd, 'vite.config.ts')) || existsSync(join(cwd, 'vite.config.js'))) {\n\t\t\t\t\tevidence.push('Found vite.config (React + Vite)');\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tplatform: 'react',\n\t\t\t\t\tconfidence: 'high',\n\t\t\t\t\tevidence,\n\t\t\t\t\tframework: 'react',\n\t\t\t\t};\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// Ignore errors\n\t\t}\n\t}\n\n\t// Unknown platform\n\treturn {\n\t\tplatform: 'unknown',\n\t\tconfidence: 'low',\n\t\tevidence: ['No recognized project structure found'],\n\t};\n}\n\n/**\n * Get human-readable platform name\n */\nexport function getPlatformDisplayName(platform: Platform): string {\n\tconst names: Record<Platform, string> = {\n\t\t'react-native': 'React Native',\n\t\t'flutter': 'Flutter',\n\t\t'vue': 'Vue.js',\n\t\t'react': 'React',\n\t\t'angular': 'Angular',\n\t\t'nextjs': 'Next.js',\n\t\t'nuxtjs': 'Nuxt.js',\n\t\t'unknown': 'Unknown',\n\t};\n\treturn names[platform];\n}\n\n/**\n * Check if platform is mobile\n */\nexport function isMobilePlatform(platform: Platform): boolean {\n\treturn platform === 'react-native' || platform === 'flutter';\n}\n\n/**\n * Check if platform is web\n */\nexport function isWebPlatform(platform: Platform): boolean {\n\treturn platform === 'vue' || platform === 'react' || platform === 'angular' || platform === 'nextjs' || platform === 'nuxtjs';\n}\n\n/**\n * Get registry file name for platform\n */\nexport function getRegistryFileName(platform: Platform): string {\n\tswitch (platform) {\n\t\tcase 'react-native':\n\t\t\treturn 'registry-react-native.json';\n\t\tcase 'flutter':\n\t\t\treturn 'registry-flutter.json';\n\t\tcase 'vue':\n\t\tcase 'nuxtjs':\n\t\tcase 'react':\n\t\tcase 'nextjs':\n\t\tcase 'angular':\n\t\t\treturn 'registry.json'; // Web platforms use same registry\n\t\tdefault:\n\t\t\treturn 'registry.json';\n\t}\n}\n\n/**\n * Get component source directory for platform\n */\nexport function getComponentSourceDir(platform: Platform): string {\n\tswitch (platform) {\n\t\tcase 'react-native':\n\t\t\treturn 'packages/react-native/src/components';\n\t\tcase 'flutter':\n\t\t\treturn 'packages/flutter/lib/components';\n\t\tcase 'vue':\n\t\tcase 'nuxtjs':\n\t\t\treturn 'packages/vue/src/components';\n\t\tcase 'react':\n\t\tcase 'nextjs':\n\t\t\treturn 'packages/react/src/components';\n\t\tcase 'angular':\n\t\t\treturn 'packages/angular/src/components';\n\t\tdefault:\n\t\t\tthrow new Error(`Unknown platform: ${platform}`);\n\t}\n}\n"],"names":["existsSync","join","detectPlatform","cwd","evidence","push","platform","confidence","hasPackageJson","hasIosDir","hasAndroidDir","hasAppJson","packageJson","require","dependencies","error","deps","devDependencies","framework","getPlatformDisplayName","names","isMobilePlatform","isWebPlatform","getRegistryFileName","getComponentSourceDir","Error"],"mappings":";AAAA,SAASA,UAAU,QAAQ,KAAK;AAChC,SAASC,IAAI,QAAQ,OAAO;AAiB5B;;;;;;;CAOC,GACD,OAAO,SAASC,eAAeC,GAAW;IACzC,MAAMC,WAAqB,EAAE;IAE7B,kDAAkD;IAClD,IAAIJ,WAAWC,KAAKE,KAAK,kBAAkB;QAC1CC,SAASC,IAAI,CAAC;QAEd,gCAAgC;QAChC,IAAIL,WAAWC,KAAKE,KAAK,SAAS;YACjCC,SAASC,IAAI,CAAC;QACf;QACA,IAAIL,WAAWC,KAAKE,KAAK,eAAeH,WAAWC,KAAKE,KAAK,SAAS;YACrEC,SAASC,IAAI,CAAC;QACf;QAEA,OAAO;YACNC,UAAU;YACVC,YAAY;YACZH;QACD;IACD;IAEA,yBAAyB;IACzB,MAAMI,iBAAiBR,WAAWC,KAAKE,KAAK;IAC5C,MAAMM,YAAYT,WAAWC,KAAKE,KAAK;IACvC,MAAMO,gBAAgBV,WAAWC,KAAKE,KAAK;IAC3C,MAAMQ,aAAaX,WAAWC,KAAK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O,SAASgB,cAAchB,QAAkB;IAC/C,OAAOA,aAAa,SAASA,aAAa,WAAWA,aAAa,aAAaA,aAAa,YAAYA,aAAa;AACtH;AAEA;;CAEC,GACD,OAAO,SAASiB,oBAAoBjB,QAAkB;IACrD,OAAQA;QACP,KAAK;YACJ,OAAO;QACR,KAAK;YACJ,OAAO;QACR,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACJ,OAAO,iBAAiB,kCAAkC;QAC3D;YACC,OAAO;IACT;AACD;AAEA;;CAEC,GACD,OAAO,SAASkB,sBAAsBlB,QAAkB;IACvD,OAAQA;QACP,KAAK;YACJ,OAAO;QACR,KAAK;YACJ,OAAO;QACR,KAAK;QACL,KAAK;YACJ,OAAO;QACR,KAAK;QACL,KAAK;YACJ,OAAO;QACR,KAAK;YACJ,OAAO;QACR;YACC,MAAM,IAAImB,MAAM,CAAC,kBAAkB,EAAEnB,UAAU;IACjD;AACD"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "galaxy-design",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "CLI tool for adding Galaxy UI components to your Vue, React, Angular, React Native, or Flutter project",
|
|
3
|
+
"version": "0.2.3",
|
|
4
|
+
"description": "CLI tool for adding Galaxy UI components to your Vue, React, Angular, Next.js, Nuxt.js, React Native, or Flutter project",
|
|
5
5
|
"author": "Bùi Trọng Hiếu (kevinbui) <kevinbui210191@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
"vue",
|
|
20
20
|
"react",
|
|
21
21
|
"angular",
|
|
22
|
+
"nextjs",
|
|
23
|
+
"next.js",
|
|
24
|
+
"nuxtjs",
|
|
25
|
+
"nuxt.js",
|
|
22
26
|
"react-native",
|
|
23
27
|
"flutter",
|
|
24
28
|
"mobile",
|
|
@@ -49,7 +53,7 @@
|
|
|
49
53
|
"exports": {
|
|
50
54
|
"./package.json": "./package.json",
|
|
51
55
|
".": {
|
|
52
|
-
"@galaxy-
|
|
56
|
+
"@galaxy-design/source": "./src/index.ts",
|
|
53
57
|
"types": "./dist/index.d.ts",
|
|
54
58
|
"import": "./dist/index.js",
|
|
55
59
|
"default": "./dist/index.js"
|