@dxtmisha/scripts 0.11.8 → 1.1.0

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.
Files changed (335) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/ai-resources/componentMaterials.md +19 -0
  3. package/ai-resources/componentPrompt.md +381 -0
  4. package/ai-resources/componentWiki.md +13 -0
  5. package/bin/arguments.ts +168 -0
  6. package/bin/build-packages.ts +34 -3
  7. package/bin/build-publish-packages.ts +12 -2
  8. package/bin/design-component.ts +7 -1
  9. package/bin/design-constructor.ts +22 -3
  10. package/bin/design-figma.ts +26 -4
  11. package/bin/design-flags.ts +14 -2
  12. package/bin/design-library.ts +7 -1
  13. package/bin/design-package.ts +29 -5
  14. package/bin/design-prompt.ts +27 -3
  15. package/bin/design-screenshot.ts +12 -2
  16. package/bin/design-types-save.ts +32 -5
  17. package/bin/design-types.ts +32 -6
  18. package/bin/design-ui.ts +21 -3
  19. package/bin/design-wiki-storm.ts +11 -3
  20. package/dist/AiZAi-BiLAcdFy.js +232 -0
  21. package/dist/PropertiesConfig-BKZz_FWW.js +262 -0
  22. package/{src/config.ts → dist/config.d.ts} +185 -158
  23. package/dist/config.js +20 -0
  24. package/dist/figmaApiTypes-CArSsNW8.js +6 -0
  25. package/dist/library-ai.d.ts +482 -0
  26. package/dist/library-ai.js +2 -0
  27. package/dist/library-figma.d.ts +462 -0
  28. package/dist/library-figma.js +75 -0
  29. package/dist/library-ui.d.ts +586 -0
  30. package/dist/library-ui.js +3760 -0
  31. package/dist/library.d.ts +4910 -0
  32. package/dist/library.js +1568 -0
  33. package/dist/propertyTypes-C64u6rT3.js +236 -0
  34. package/package.json +76 -27
  35. package/bin/ai-doc.ts +0 -7
  36. package/bin/build-functional.ts +0 -5
  37. package/bin/design-component-wiki.ts +0 -11
  38. package/src/classes/Ai/AiAbstract.ts +0 -242
  39. package/src/classes/Ai/AiClaude.ts +0 -26
  40. package/src/classes/Ai/AiClaudeAgent.ts +0 -16
  41. package/src/classes/Ai/AiClaudeAgentLite.ts +0 -86
  42. package/src/classes/Ai/AiClaudeCli.ts +0 -24
  43. package/src/classes/Ai/AiClaudeCliLite.ts +0 -108
  44. package/src/classes/Ai/AiClaudeLite.ts +0 -112
  45. package/src/classes/Ai/AiDoc.ts +0 -81
  46. package/src/classes/Ai/AiDocItem.ts +0 -27
  47. package/src/classes/Ai/AiDocItemAbstract.ts +0 -209
  48. package/src/classes/Ai/AiDocItemClasses.ts +0 -27
  49. package/src/classes/Ai/AiDocItemComposables.ts +0 -20
  50. package/src/classes/Ai/AiDocType.ts +0 -45
  51. package/src/classes/Ai/AiGoogle.ts +0 -26
  52. package/src/classes/Ai/AiGoogleCli.ts +0 -24
  53. package/src/classes/Ai/AiGoogleCliLite.ts +0 -108
  54. package/src/classes/Ai/AiGoogleLite.ts +0 -78
  55. package/src/classes/Ai/AiOpenAi.ts +0 -26
  56. package/src/classes/Ai/AiOpenAiLite.ts +0 -107
  57. package/src/classes/Ai/AiZAi.ts +0 -17
  58. package/src/classes/Ai/AiZAiLite.ts +0 -77
  59. package/src/classes/Ai/ApiTmp.ts +0 -43
  60. package/src/classes/BrowserItem.ts +0 -408
  61. package/src/classes/Build/BuildFunctional.ts +0 -54
  62. package/src/classes/Build/BuildPackages.ts +0 -137
  63. package/src/classes/Build/BuildPublishPackages.ts +0 -105
  64. package/src/classes/BuildItem.ts +0 -187
  65. package/src/classes/Component/ComponentCreator.ts +0 -45
  66. package/src/classes/Component/ComponentItem.ts +0 -161
  67. package/src/classes/Component/ComponentWiki.ts +0 -258
  68. package/src/classes/Component/ComponentWikiFile.ts +0 -138
  69. package/src/classes/Design/DesignCommand.ts +0 -243
  70. package/src/classes/Design/DesignComponent.ts +0 -824
  71. package/src/classes/Design/DesignConstructor.ts +0 -222
  72. package/src/classes/Design/DesignConstructors.ts +0 -101
  73. package/src/classes/Design/DesignFigma.ts +0 -61
  74. package/src/classes/Design/DesignFlags.ts +0 -215
  75. package/src/classes/Design/DesignReplace.ts +0 -672
  76. package/src/classes/Design/DesignScreenshot.ts +0 -140
  77. package/src/classes/Design/DesignStructure.ts +0 -201
  78. package/src/classes/Design/DesignStructureClasses.ts +0 -105
  79. package/src/classes/Design/DesignStructureItemAbstract.ts +0 -52
  80. package/src/classes/Design/DesignStructureRead.ts +0 -349
  81. package/src/classes/Design/DesignStructureStyles.ts +0 -45
  82. package/src/classes/Design/DesignTypes.ts +0 -94
  83. package/src/classes/Design/DesignTypesAi.ts +0 -135
  84. package/src/classes/Design/DesignTypesDescription.ts +0 -121
  85. package/src/classes/Design/DesignTypesMake.ts +0 -460
  86. package/src/classes/Design/DesignTypesMcp.ts +0 -90
  87. package/src/classes/Design/DesignTypesPrompts.ts +0 -332
  88. package/src/classes/Design/DesignTypescript.ts +0 -244
  89. package/src/classes/Design/DesignUi.ts +0 -143
  90. package/src/classes/Design/DesignWiki.ts +0 -52
  91. package/src/classes/Design/DesignWikiStorm.ts +0 -95
  92. package/src/classes/Design/DesignWikiStormItem.ts +0 -316
  93. package/src/classes/FigmaApi.ts +0 -190
  94. package/src/classes/Git/GitRead.ts +0 -261
  95. package/src/classes/Library/LibraryAiMcpItem.ts +0 -67
  96. package/src/classes/Library/LibraryAiPrompt.ts +0 -268
  97. package/src/classes/Library/LibraryAiPromptItem.ts +0 -331
  98. package/src/classes/Library/LibraryAiWiki.ts +0 -127
  99. package/src/classes/Library/LibraryAiWikiItem.ts +0 -79
  100. package/src/classes/Library/LibraryExport.ts +0 -167
  101. package/src/classes/Library/LibraryFlags.ts +0 -62
  102. package/src/classes/Library/LibraryItems.ts +0 -138
  103. package/src/classes/Library/LibraryList.ts +0 -189
  104. package/src/classes/Library/LibraryMedia.ts +0 -139
  105. package/src/classes/Library/LibraryPlugin.ts +0 -73
  106. package/src/classes/Library/LibraryTypes.ts +0 -130
  107. package/src/classes/Package/PackageFile.ts +0 -154
  108. package/src/classes/Package/PackageInit.ts +0 -54
  109. package/src/classes/Package/PackageItem.ts +0 -329
  110. package/src/classes/Properties/Properties.ts +0 -175
  111. package/src/classes/Properties/PropertiesCache.ts +0 -248
  112. package/src/classes/Properties/PropertiesConfig.ts +0 -213
  113. package/src/classes/Properties/PropertiesConvector.ts +0 -52
  114. package/src/classes/Properties/PropertiesFile.ts +0 -522
  115. package/src/classes/Properties/PropertiesImport.ts +0 -182
  116. package/src/classes/Properties/PropertiesItems.ts +0 -605
  117. package/src/classes/Properties/PropertiesKeys.ts +0 -121
  118. package/src/classes/Properties/PropertiesMain.ts +0 -138
  119. package/src/classes/Properties/PropertiesPalette.ts +0 -149
  120. package/src/classes/Properties/PropertiesPath.ts +0 -193
  121. package/src/classes/Properties/PropertiesScss.ts +0 -261
  122. package/src/classes/Properties/PropertiesSeparator.ts +0 -118
  123. package/src/classes/Properties/PropertiesSettings.ts +0 -104
  124. package/src/classes/Properties/PropertiesStandard.ts +0 -180
  125. package/src/classes/Properties/PropertiesTool.ts +0 -80
  126. package/src/classes/Properties/PropertiesTypes.ts +0 -147
  127. package/src/classes/Properties/PropertiesValues.ts +0 -75
  128. package/src/classes/Properties/PropertiesWrap.ts +0 -187
  129. package/src/classes/Properties/convector/convectorColor.ts +0 -27
  130. package/src/classes/Properties/convector/convectorFontFamilies.ts +0 -18
  131. package/src/classes/Properties/convector/convectorShadow.ts +0 -61
  132. package/src/classes/Properties/convector/convectorTypography.ts +0 -19
  133. package/src/classes/Properties/to/PropertiesToAbstract.ts +0 -51
  134. package/src/classes/Properties/to/PropertiesToAnimate.ts +0 -59
  135. package/src/classes/Properties/to/PropertiesToClass.ts +0 -49
  136. package/src/classes/Properties/to/PropertiesToClone.ts +0 -114
  137. package/src/classes/Properties/to/PropertiesToComponent.ts +0 -52
  138. package/src/classes/Properties/to/PropertiesToDrag.ts +0 -231
  139. package/src/classes/Properties/to/PropertiesToDuplicate.ts +0 -165
  140. package/src/classes/Properties/to/PropertiesToFull.ts +0 -36
  141. package/src/classes/Properties/to/PropertiesToLink.ts +0 -259
  142. package/src/classes/Properties/to/PropertiesToMedia.ts +0 -187
  143. package/src/classes/Properties/to/PropertiesToMulti.ts +0 -101
  144. package/src/classes/Properties/to/PropertiesToNone.ts +0 -46
  145. package/src/classes/Properties/to/PropertiesToPalette.ts +0 -241
  146. package/src/classes/Properties/to/PropertiesToProperty.ts +0 -31
  147. package/src/classes/Properties/to/PropertiesToRemove.ts +0 -33
  148. package/src/classes/Properties/to/PropertiesToReplace.ts +0 -77
  149. package/src/classes/Properties/to/PropertiesToRoot.ts +0 -40
  150. package/src/classes/Properties/to/PropertiesToSimilar.ts +0 -128
  151. package/src/classes/Properties/to/PropertiesToSort.ts +0 -146
  152. package/src/classes/Properties/to/PropertiesToState.ts +0 -65
  153. package/src/classes/Properties/to/PropertiesToStyle.ts +0 -52
  154. package/src/classes/Properties/to/PropertiesToSub.ts +0 -95
  155. package/src/classes/Properties/to/PropertiesToSubclass.ts +0 -76
  156. package/src/classes/Properties/to/PropertiesToVar.ts +0 -194
  157. package/src/classes/Properties/to/PropertiesToVariable.ts +0 -176
  158. package/src/classes/Styles/Styles.ts +0 -247
  159. package/src/classes/Styles/StylesClasses.ts +0 -86
  160. package/src/classes/Styles/StylesProperties.ts +0 -197
  161. package/src/classes/Styles/StylesRoot.ts +0 -103
  162. package/src/classes/Styles/StylesTool.ts +0 -112
  163. package/src/classes/Styles/to/StylesToAbstract.ts +0 -93
  164. package/src/classes/Styles/to/StylesToAnimate.ts +0 -19
  165. package/src/classes/Styles/to/StylesToClass.ts +0 -25
  166. package/src/classes/Styles/to/StylesToClassFull.ts +0 -19
  167. package/src/classes/Styles/to/StylesToContainer.ts +0 -24
  168. package/src/classes/Styles/to/StylesToMedia.ts +0 -19
  169. package/src/classes/Styles/to/StylesToProperty.ts +0 -123
  170. package/src/classes/Styles/to/StylesToRoot.ts +0 -14
  171. package/src/classes/Styles/to/StylesToSelector.ts +0 -71
  172. package/src/classes/Styles/to/StylesToVar.ts +0 -105
  173. package/src/classes/Styles/to/StylesToVirtual.ts +0 -33
  174. package/src/composables/useAi.ts +0 -38
  175. package/src/demo/ai.ts +0 -10
  176. package/src/functions/getComponentPaths.ts +0 -13
  177. package/src/functions/getConfigAi.ts +0 -14
  178. package/src/functions/getConstructorProperties.ts +0 -54
  179. package/src/functions/getDirname.ts +0 -17
  180. package/src/functions/getNameDirByPaths.ts +0 -16
  181. package/src/functions/getPackageJson.ts +0 -19
  182. package/src/functions/hasNativeDirname.ts +0 -8
  183. package/src/functions/run.ts +0 -47
  184. package/src/functions/toPathStandardSep.ts +0 -14
  185. package/src/library-ai.ts +0 -10
  186. package/src/library.ts +0 -73
  187. package/src/media/ai/ai-doc-types.ts +0 -21
  188. package/src/media/properties/css.ts +0 -634
  189. package/src/media/properties/cssSelector.ts +0 -74
  190. package/src/media/properties/cssVirtual.ts +0 -12
  191. package/src/media/properties/listSort.ts +0 -113
  192. package/src/media/properties/style.ts +0 -81
  193. package/src/media/templates/component/DesignComponent.mdx +0 -30
  194. package/src/media/templates/component/DesignComponent.stories.ts +0 -34
  195. package/src/media/templates/component/DesignComponent.vue +0 -54
  196. package/src/media/templates/component/DesignComponentAiWiki.vue +0 -25
  197. package/src/media/templates/component/index.ts +0 -13
  198. package/src/media/templates/component/props.ts +0 -27
  199. package/src/media/templates/component/styleToken.scss +0 -17
  200. package/src/media/templates/component/wiki.ts +0 -13
  201. package/src/media/templates/component/wikiData.ts +0 -28
  202. package/src/media/templates/componentDoc/ComponentDoc.vue +0 -26
  203. package/src/media/templates/componentDoc/index.ts +0 -12
  204. package/src/media/templates/componentDoc/materials/README.md +0 -8
  205. package/src/media/templates/componentDoc/materials/prompt.md +0 -38
  206. package/src/media/templates/componentDoc/subcomponents/_.gitignore.txt +0 -0
  207. package/src/media/templates/componentDoc/types.ts +0 -15
  208. package/src/media/templates/componentDoc/wiki/ComponentDoc.mdx +0 -13
  209. package/src/media/templates/componentDoc/wiki/ComponentDoc.stories.ts +0 -24
  210. package/src/media/templates/componentDoc/wiki/prompt.md +0 -41
  211. package/src/media/templates/constructors/Constructors.ts +0 -33
  212. package/src/media/templates/constructors/ConstructorsDesign.tsx +0 -129
  213. package/src/media/templates/constructors/basicTypes.ts +0 -0
  214. package/src/media/templates/constructors/index.ts +0 -5
  215. package/src/media/templates/constructors/props.ts +0 -28
  216. package/src/media/templates/constructors/style.scss +0 -5
  217. package/src/media/templates/constructors/types.ts +0 -47
  218. package/src/media/templates/packages/figma/README.md +0 -1
  219. package/src/media/templates/packages/figma/_.gitignore.txt +0 -29
  220. package/src/media/templates/packages/figma/ai.sample.config.ts +0 -2
  221. package/src/media/templates/packages/figma/design.config.json +0 -3
  222. package/src/media/templates/packages/figma/index.html +0 -12
  223. package/src/media/templates/packages/figma/manifest.json +0 -25
  224. package/src/media/templates/packages/figma/package.json +0 -37
  225. package/src/media/templates/packages/figma/src/App.vue +0 -9
  226. package/src/media/templates/packages/figma/src/classes/_.gitignore.txt +0 -1
  227. package/src/media/templates/packages/figma/src/code.ts +0 -16
  228. package/src/media/templates/packages/figma/src/components/_.gitignore.txt +0 -1
  229. package/src/media/templates/packages/figma/src/composables/_.gitignore.txt +0 -1
  230. package/src/media/templates/packages/figma/src/config.ts +0 -0
  231. package/src/media/templates/packages/figma/src/functions/_.gitignore.txt +0 -1
  232. package/src/media/templates/packages/figma/src/library.ts +0 -0
  233. package/src/media/templates/packages/figma/src/main.ts +0 -4
  234. package/src/media/templates/packages/figma/src/media/_.gitignore.txt +0 -1
  235. package/src/media/templates/packages/figma/src/storybook/_.gitignore.txt +0 -1
  236. package/src/media/templates/packages/figma/src/types/_.gitignore.txt +0 -1
  237. package/src/media/templates/packages/figma/src/vite-env.d.ts +0 -1
  238. package/src/media/templates/packages/figma/tsconfig.app.json +0 -12
  239. package/src/media/templates/packages/figma/tsconfig.json +0 -7
  240. package/src/media/templates/packages/figma/tsconfig.node.json +0 -8
  241. package/src/media/templates/packages/figma/vite.config.ts +0 -7
  242. package/src/media/templates/packages/library/README.md +0 -1
  243. package/src/media/templates/packages/library/_.gitignore.txt +0 -27
  244. package/src/media/templates/packages/library/ai-description.md +0 -15
  245. package/src/media/templates/packages/library/design.config.json +0 -3
  246. package/src/media/templates/packages/library/index.html +0 -12
  247. package/src/media/templates/packages/library/materials/README.md +0 -8
  248. package/src/media/templates/packages/library/materials/prompt.md +0 -45
  249. package/src/media/templates/packages/library/package.json +0 -46
  250. package/src/media/templates/packages/library/src/App.vue +0 -8
  251. package/src/media/templates/packages/library/src/classes/_.gitignore.txt +0 -1
  252. package/src/media/templates/packages/library/src/components/_.gitignore.txt +0 -1
  253. package/src/media/templates/packages/library/src/composables/_.gitignore.txt +0 -1
  254. package/src/media/templates/packages/library/src/functions/_.gitignore.txt +0 -1
  255. package/src/media/templates/packages/library/src/library.ts +0 -0
  256. package/src/media/templates/packages/library/src/main.ts +0 -6
  257. package/src/media/templates/packages/library/src/style.scss +0 -0
  258. package/src/media/templates/packages/library/src/types/_.gitignore.txt +0 -1
  259. package/src/media/templates/packages/library/src/vite-env.d.ts +0 -1
  260. package/src/media/templates/packages/library/tsconfig.app.json +0 -11
  261. package/src/media/templates/packages/library/tsconfig.json +0 -7
  262. package/src/media/templates/packages/library/tsconfig.node.json +0 -7
  263. package/src/media/templates/packages/library/vite.config.ts +0 -14
  264. package/src/media/templates/packages/nitro/README.md +0 -1
  265. package/src/media/templates/packages/nitro/_.gitignore.txt +0 -28
  266. package/src/media/templates/packages/nitro/index.html +0 -2
  267. package/src/media/templates/packages/nitro/package.json +0 -25
  268. package/src/media/templates/packages/nitro/server/plugins/ui-plugin.ts +0 -7
  269. package/src/media/templates/packages/nitro/server/routes/api/hello.ts +0 -13
  270. package/src/media/templates/packages/nitro/src/App.vue +0 -10
  271. package/src/media/templates/packages/nitro/src/assets/_.gitignore.txt +0 -0
  272. package/src/media/templates/packages/nitro/src/components/_.gitignore.txt +0 -0
  273. package/src/media/templates/packages/nitro/src/composables/_.gitignore.txt +0 -0
  274. package/src/media/templates/packages/nitro/src/entry-client.ts +0 -13
  275. package/src/media/templates/packages/nitro/src/entry-server.ts +0 -29
  276. package/src/media/templates/packages/nitro/src/main.ts +0 -14
  277. package/src/media/templates/packages/nitro/src/pages/HomePage.vue +0 -8
  278. package/src/media/templates/packages/nitro/src/router.ts +0 -11
  279. package/src/media/templates/packages/nitro/src/style.scss +0 -0
  280. package/src/media/templates/packages/nitro/src/templates/main.html +0 -21
  281. package/src/media/templates/packages/nitro/src/vite-env.d.ts +0 -11
  282. package/src/media/templates/packages/nitro/tsconfig.app.json +0 -14
  283. package/src/media/templates/packages/nitro/tsconfig.json +0 -7
  284. package/src/media/templates/packages/nitro/tsconfig.node.json +0 -12
  285. package/src/media/templates/packages/nitro/vite.config.ts +0 -17
  286. package/src/media/templates/packages/project/README.md +0 -1
  287. package/src/media/templates/packages/project/_.gitignore.txt +0 -28
  288. package/src/media/templates/packages/project/design.config.json +0 -3
  289. package/src/media/templates/packages/project/index.html +0 -12
  290. package/src/media/templates/packages/project/materials/README.md +0 -8
  291. package/src/media/templates/packages/project/materials/prompt.md +0 -41
  292. package/src/media/templates/packages/project/package.json +0 -13
  293. package/src/media/templates/packages/project/public/_.gitignore.txt +0 -0
  294. package/src/media/templates/packages/project/src/App.vue +0 -12
  295. package/src/media/templates/packages/project/src/assets/_.gitignore.txt +0 -0
  296. package/src/media/templates/packages/project/src/components/_.gitignore.txt +0 -0
  297. package/src/media/templates/packages/project/src/composables/_.gitignore.txt +0 -0
  298. package/src/media/templates/packages/project/src/main.ts +0 -6
  299. package/src/media/templates/packages/project/src/style.scss +0 -0
  300. package/src/media/templates/packages/project/src/vite-env.d.ts +0 -1
  301. package/src/media/templates/packages/project/tsconfig.app.json +0 -11
  302. package/src/media/templates/packages/project/tsconfig.json +0 -7
  303. package/src/media/templates/packages/project/tsconfig.node.json +0 -7
  304. package/src/media/templates/packages/project/vite.config.ts +0 -7
  305. package/src/media/templates/prompts/aiCodeGlobalPrompt.en.md +0 -22
  306. package/src/media/templates/prompts/aiCodeGlobalPrompt.ru.md +0 -21
  307. package/src/media/templates/prompts/aiCodeVuePrompt.en.md +0 -17
  308. package/src/media/templates/prompts/aiCodeVuePrompt.ru.md +0 -17
  309. package/src/media/templates/prompts/aiDocClassPrompt.en.txt +0 -63
  310. package/src/media/templates/prompts/aiDocClassPrompt.ru.txt +0 -63
  311. package/src/media/templates/prompts/aiDocComposablePrompt.en.txt +0 -67
  312. package/src/media/templates/prompts/aiDocComposablePrompt.ru.txt +0 -67
  313. package/src/media/templates/prompts/aiDocFunctionPrompt.en.txt +0 -57
  314. package/src/media/templates/prompts/aiDocFunctionPrompt.ru.txt +0 -57
  315. package/src/media/templates/prompts/componentPrompt.en.txt +0 -182
  316. package/src/media/templates/prompts/componentPrompt.ru.txt +0 -182
  317. package/src/media/templates/prompts/demoClassEn.mdx +0 -111
  318. package/src/media/templates/prompts/demoClassRu.mdx +0 -111
  319. package/src/media/templates/prompts/demoComponentEn.mdx +0 -282
  320. package/src/media/templates/prompts/demoComponentRu.mdx +0 -282
  321. package/src/media/templates/prompts/demoComposableEn.mdx +0 -103
  322. package/src/media/templates/prompts/demoComposableRu.mdx +0 -103
  323. package/src/media/templates/prompts/demoDocEn.mdx +0 -30
  324. package/src/media/templates/prompts/demoDocRu.mdx +0 -30
  325. package/src/media/templates/viteComponentTemplateConfig.ts +0 -14
  326. package/src/types/aiTypes.ts +0 -19
  327. package/src/types/configTypes.ts +0 -69
  328. package/src/types/designTypes.ts +0 -167
  329. package/src/types/figmaApiTypes.ts +0 -337
  330. package/src/types/gitTypes.ts +0 -59
  331. package/src/types/libraryTypes.ts +0 -49
  332. package/src/types/propertyTypes.ts +0 -586
  333. package/src/types/screenshotTypes.ts +0 -55
  334. package/src/types/webTypes.ts +0 -134
  335. package/src/vite-env.d.ts +0 -1
@@ -1,7 +1,38 @@
1
1
  #!/usr/bin/env vite-node
2
2
 
3
- import { BuildPackages } from '../src/classes/Build/BuildPackages'
3
+ import process from 'node:process'
4
+ import { parseCliArguments } from './arguments'
5
+ import { BuildPackages } from '../dist/library.js'
4
6
 
5
- new BuildPackages()
7
+ const { values } = parseCliArguments(
8
+ 'Scans, sorts, and builds monorepo packages managing build order by priorities.',
9
+ 'Usage: dxt-build-packages [--code CODE] [--dir DIR] [--log LOG]',
10
+ {
11
+ code: {
12
+ type: 'string',
13
+ short: 'c',
14
+ description: 'Custom build command or script name to execute'
15
+ },
16
+ dir: {
17
+ type: 'string',
18
+ short: 'd',
19
+ description: 'Packages directory path'
20
+ },
21
+ log: {
22
+ type: 'string',
23
+ short: 'l',
24
+ description: 'Custom build log file name or path'
25
+ }
26
+ }
27
+ )
28
+
29
+ const dir = typeof values.dir === 'string' ? values.dir : undefined
30
+ const code = typeof values.code === 'string' ? values.code : undefined
31
+ const log = typeof values.log === 'string' ? values.log : undefined
32
+
33
+ new BuildPackages(dir, code, log)
6
34
  .make()
7
- .then()
35
+ .catch((error) => {
36
+ console.error('dxt-build-packages failed:', error)
37
+ process.exit(1)
38
+ })
@@ -1,7 +1,17 @@
1
1
  #!/usr/bin/env vite-node
2
2
 
3
- import { BuildPublishPackages } from '../src/classes/Build/BuildPublishPackages'
3
+ import process from 'node:process'
4
+ import { parseCliArguments } from './arguments'
5
+ import { BuildPublishPackages } from '../dist/library.js'
6
+
7
+ parseCliArguments(
8
+ 'Scans changed packages, compares versions with the npm registry, builds and publishes updates.',
9
+ 'Usage: dxt-build-publish-packages'
10
+ )
4
11
 
5
12
  new BuildPublishPackages()
6
13
  .make()
7
- .then()
14
+ .catch((error) => {
15
+ console.error('dxt-build-publish-packages failed:', error)
16
+ process.exit(1)
17
+ })
@@ -1,5 +1,11 @@
1
1
  #!/usr/bin/env vite-node
2
2
 
3
- import { ComponentCreator } from '../src/classes/Component/ComponentCreator'
3
+ import { parseCliArguments } from './arguments'
4
+ import { ComponentCreator } from '../dist/library-ui.js'
5
+
6
+ parseCliArguments(
7
+ 'Discovers empty component directories and scaffolds their initial structure from templates.',
8
+ 'Usage: dxt-component'
9
+ )
4
10
 
5
11
  new ComponentCreator().make()
@@ -1,7 +1,26 @@
1
1
  #!/usr/bin/env vite-node
2
2
 
3
- import { DesignConstructors } from '../src/classes/Design/DesignConstructors'
3
+ import process from 'node:process'
4
+ import { parseCliArguments } from './arguments'
5
+ import { DesignConstructors } from '../dist/library-ui.js'
4
6
 
5
- const name: string = process.argv?.[2] ?? ''
7
+ const { values } = parseCliArguments(
8
+ 'Generates constructor files: property definitions, types, styles, and integration logic.',
9
+ 'Usage: dxt-constructor [--name NAME]',
10
+ {
11
+ name: {
12
+ type: 'string',
13
+ short: 'n',
14
+ description: 'Constructor name'
15
+ }
16
+ }
17
+ )
6
18
 
7
- new DesignConstructors(name).make()
19
+ const name = typeof values.name === 'string' ? values.name : undefined
20
+
21
+ new DesignConstructors(name)
22
+ .make()
23
+ .catch((error) => {
24
+ console.error('dxt-constructor failed:', error)
25
+ process.exit(1)
26
+ })
@@ -1,10 +1,32 @@
1
1
  #!/usr/bin/env vite-node
2
2
 
3
- import { DesignFigma } from '../src/classes/Design/DesignFigma'
3
+ import process from 'node:process'
4
+ import { parseCliArguments } from './arguments'
5
+ import { DesignFigma } from '../dist/library-figma.js'
4
6
 
5
- const fileKey: string = process.argv?.[2] ?? 'fileKey'
6
- const nodeId: string = process.argv?.[3] ?? 'nodeId'
7
+ const { values } = parseCliArguments(
8
+ 'Downloads and processes design assets (SVG graphics, frames) from the Figma API.',
9
+ 'Usage: dxt-figma-layout [--file KEY] [--node ID]',
10
+ {
11
+ file: {
12
+ type: 'string',
13
+ short: 'f',
14
+ description: 'Figma file key'
15
+ },
16
+ node: {
17
+ type: 'string',
18
+ short: 'n',
19
+ description: 'Figma node identifier'
20
+ }
21
+ }
22
+ )
23
+
24
+ const fileKey = (typeof values.file === 'string' ? values.file : undefined) ?? 'fileKey'
25
+ const nodeId = (typeof values.node === 'string' ? values.node : undefined) ?? 'nodeId'
7
26
 
8
27
  new DesignFigma(fileKey, nodeId)
9
28
  .make()
10
- .then()
29
+ .catch((error) => {
30
+ console.error('dxt-figma-layout failed:', error)
31
+ process.exit(1)
32
+ })
@@ -1,5 +1,17 @@
1
1
  #!/usr/bin/env vite-node
2
2
 
3
- import { DesignFlags } from '../src/classes/Design/DesignFlags'
3
+ import process from 'node:process'
4
+ import { parseCliArguments } from './arguments'
5
+ import { DesignFlags } from '../dist/library-ui.js'
4
6
 
5
- new DesignFlags().make()
7
+ parseCliArguments(
8
+ 'Generates a combined flag sprite image (webp) and CSS background-position utility classes.',
9
+ 'Usage: dxt-flags'
10
+ )
11
+
12
+ new DesignFlags()
13
+ .make()
14
+ .catch((error) => {
15
+ console.error('dxt-flags failed:', error)
16
+ process.exit(1)
17
+ })
@@ -1,5 +1,11 @@
1
1
  #!/usr/bin/env vite-node
2
2
 
3
- import { LibraryExport } from '../src/classes/Library/LibraryExport'
3
+ import { parseCliArguments } from './arguments'
4
+ import { LibraryExport } from '../dist/library.js'
5
+
6
+ parseCliArguments(
7
+ 'Generates exportable data and aggregate module entries for the library.',
8
+ 'Usage: dxt-library'
9
+ )
4
10
 
5
11
  new LibraryExport().make()
@@ -1,10 +1,34 @@
1
1
  #!/usr/bin/env vite-node
2
2
 
3
- import { PackageInit } from '../src/classes/Package/PackageInit'
4
- import { UI_DIR_PACKAGES } from '../src/config'
3
+ import { parseCliArguments } from './arguments'
4
+ import { PackageInit } from '../dist/library-ui.js'
5
+ import { UI_DIR_PACKAGES } from '../dist/config.js'
5
6
 
6
- const type: string = process.argv?.[2] ?? 'library'
7
- const templates: string | undefined = process.argv?.[3]
8
- const dir: string | undefined = process.argv?.[4] ?? UI_DIR_PACKAGES
7
+ const { values } = parseCliArguments(
8
+ 'Initializes the package structure and development environment from templates.',
9
+ 'Usage: dxt-package [--type TYPE] [--templates DIR] [--dir DIR]',
10
+ {
11
+ type: {
12
+ type: 'string',
13
+ short: 't',
14
+ default: 'library',
15
+ description: 'Package template type'
16
+ },
17
+ templates: {
18
+ type: 'string',
19
+ description: 'Directory containing package templates'
20
+ },
21
+ dir: {
22
+ type: 'string',
23
+ short: 'd',
24
+ default: UI_DIR_PACKAGES,
25
+ description: 'Target packages directory'
26
+ }
27
+ }
28
+ )
29
+
30
+ const type = (typeof values.type === 'string' ? values.type : undefined) ?? 'library'
31
+ const templates = typeof values.templates === 'string' ? values.templates : undefined
32
+ const dir = (typeof values.dir === 'string' ? values.dir : undefined) ?? UI_DIR_PACKAGES
9
33
 
10
34
  new PackageInit(type, templates, dir).make()
@@ -1,7 +1,31 @@
1
1
  #!/usr/bin/env vite-node
2
2
 
3
- import { LibraryAiPrompt } from '../src/classes/Library/LibraryAiPrompt'
3
+ import process from 'node:process'
4
+ import { parseCliArguments } from './arguments'
5
+ import { LibraryAiPrompt } from '../dist/library.js'
4
6
 
5
- const isMcp = process.argv?.[2] === 'true' || process.argv?.[2] === '1'
7
+ const { values } = parseCliArguments(
8
+ 'Generates the consolidated AI prompt file ai-prompt.md for the project.',
9
+ 'Usage: dxt-prompt [--mcp] [--vue]',
10
+ {
11
+ mcp: {
12
+ type: 'boolean',
13
+ short: 'm',
14
+ default: false,
15
+ description: 'Also generate the MCP configuration files'
16
+ },
17
+ vue: {
18
+ type: 'boolean',
19
+ default: false,
20
+ description: 'Include Vue component prompt rules'
21
+ }
22
+ }
23
+ )
6
24
 
7
- new LibraryAiPrompt([], isMcp).make()
25
+ try {
26
+ new LibraryAiPrompt([], values.mcp === true, values.vue !== false).make()
27
+ process.exit(0)
28
+ } catch (error) {
29
+ console.error('dxt-prompt failed:', error)
30
+ process.exit(1)
31
+ }
@@ -1,7 +1,17 @@
1
1
  #!/usr/bin/env vite-node
2
2
 
3
- import { DesignScreenshot } from '../src/classes/Design/DesignScreenshot'
3
+ import process from 'node:process'
4
+ import { parseCliArguments } from './arguments'
5
+ import { DesignScreenshot } from '../dist/library.js'
6
+
7
+ parseCliArguments(
8
+ 'Captures full-page component screenshots and extracts DOM/CSS artifacts via a headless browser.',
9
+ 'Usage: dxt-screenshot'
10
+ )
4
11
 
5
12
  new DesignScreenshot()
6
13
  .make()
7
- .then()
14
+ .catch((error) => {
15
+ console.error('dxt-screenshot failed:', error)
16
+ process.exit(1)
17
+ })
@@ -1,10 +1,37 @@
1
1
  #!/usr/bin/env vite-node
2
2
 
3
- import { DesignTypes } from '../src/classes/Design/DesignTypes'
3
+ import process from 'node:process'
4
+ import { parseCliArguments } from './arguments'
5
+ import { DesignTypes } from '../dist/library.js'
4
6
 
5
- const dir: string = process.argv?.[2]
6
- const resourcesDir: string = process.argv?.[3]
7
+ const { values } = parseCliArguments(
8
+ 'Rebuilds ai-types.md from the cached ai-types-list directory without running AI.',
9
+ 'Usage: dxt-types-save [--prompts DIR] [--dir DIR] [--dist DIR]',
10
+ {
11
+ prompts: {
12
+ type: 'string',
13
+ short: 'p',
14
+ description: 'Input directory containing prompt files'
15
+ },
16
+ dir: {
17
+ type: 'string',
18
+ short: 'd',
19
+ description: 'Input directory containing declaration files'
20
+ },
21
+ dist: {
22
+ type: 'string',
23
+ description: 'Output directory containing compiled JavaScript files'
24
+ }
25
+ }
26
+ )
7
27
 
8
- new DesignTypes(dir, resourcesDir)
28
+ const promptsDir = typeof values.prompts === 'string' ? values.prompts : undefined
29
+ const dir = typeof values.dir === 'string' ? values.dir : undefined
30
+ const dirDist = typeof values.dist === 'string' ? values.dist : undefined
31
+
32
+ new DesignTypes(promptsDir, dir, dirDist)
9
33
  .makeSave()
10
- .then()
34
+ .catch((error) => {
35
+ console.error('dxt-types-save failed:', error)
36
+ process.exit(1)
37
+ })
@@ -1,11 +1,37 @@
1
1
  #!/usr/bin/env vite-node
2
2
 
3
- import { DesignTypes } from '../src/classes/Design/DesignTypes'
3
+ import process from 'node:process'
4
+ import { parseCliArguments } from './arguments'
5
+ import { DesignTypes } from '../dist/library.js'
4
6
 
5
- const isRaw: boolean = process.argv?.[2] === 'raw' || process.argv?.[2] === '1' || process.argv?.[2] === 'true'
6
- const dir: string = process.argv?.[3]
7
- const resourcesDir: string = process.argv?.[4]
7
+ const { values } = parseCliArguments(
8
+ 'Compiles package declarations and generates AI-optimized type definitions (ai-types.md).',
9
+ 'Usage: dxt-types [--prompts DIR] [--dir DIR] [--dist DIR]',
10
+ {
11
+ prompts: {
12
+ type: 'string',
13
+ short: 'p',
14
+ description: 'Input directory containing prompt files'
15
+ },
16
+ dir: {
17
+ type: 'string',
18
+ short: 'd',
19
+ description: 'Input directory containing declaration files'
20
+ },
21
+ dist: {
22
+ type: 'string',
23
+ description: 'Output directory containing compiled JavaScript files'
24
+ }
25
+ }
26
+ )
8
27
 
9
- new DesignTypes(dir, resourcesDir, isRaw)
28
+ const promptsDir = typeof values.prompts === 'string' ? values.prompts : undefined
29
+ const dir = typeof values.dir === 'string' ? values.dir : undefined
30
+ const dirDist = typeof values.dist === 'string' ? values.dist : undefined
31
+
32
+ new DesignTypes(promptsDir, dir, dirDist)
10
33
  .make()
11
- .then()
34
+ .catch((error) => {
35
+ console.error('dxt-types failed:', error)
36
+ process.exit(1)
37
+ })
package/bin/design-ui.ts CHANGED
@@ -1,7 +1,25 @@
1
1
  #!/usr/bin/env vite-node
2
2
 
3
- import { DesignUi } from '../src/classes/Design/DesignUi'
3
+ import { parseCliArguments } from './arguments'
4
+ import { DesignUi } from '../dist/library-ui.js'
4
5
 
5
- const name: string | undefined = process.argv?.[2] ?? undefined
6
+ const { values } = parseCliArguments(
7
+ 'Orchestrates design system generation: styles, documentation, component structures, and library exports.',
8
+ 'Usage: dxt-ui [--name NAME]',
9
+ {
10
+ name: {
11
+ type: 'string',
12
+ short: 'n',
13
+ description: 'Design system name'
14
+ }
15
+ }
16
+ )
6
17
 
7
- new DesignUi(name).make()
18
+ const name = typeof values.name === 'string' ? values.name : undefined
19
+
20
+ new DesignUi(name)
21
+ .make()
22
+ .catch((error) => {
23
+ console.error('dxt-ui failed:', error)
24
+ process.exit(1)
25
+ })
@@ -1,9 +1,17 @@
1
1
  #!/usr/bin/env vite-node
2
2
 
3
- import { DesignWikiStorm } from '../src/classes/Design/DesignWikiStorm'
3
+ import process from 'node:process'
4
+ import { parseCliArguments } from './arguments'
5
+ import { DesignWikiStorm } from '../dist/library-ui.js'
4
6
 
5
- // const name: string | undefined = process.argv?.[2] ?? undefined
7
+ parseCliArguments(
8
+ 'Generates web-types.json with component metadata for JetBrains IDE IntelliSense support.',
9
+ 'Usage: dxt-wiki-storm'
10
+ )
6
11
 
7
12
  new DesignWikiStorm()
8
13
  .make()
9
- .then()
14
+ .catch((error) => {
15
+ console.error('dxt-wiki-storm failed:', error)
16
+ process.exit(1)
17
+ })
@@ -0,0 +1,232 @@
1
+ import { t as e } from "./PropertiesConfig-BKZz_FWW.js";
2
+ import { forEach as t, random as n, sleep as r } from "@dxtmisha/functional-basic";
3
+ //#region src/classes/Ai/AiAbstract.ts
4
+ var i = class {
5
+ key;
6
+ model;
7
+ config;
8
+ ai;
9
+ prompt = "";
10
+ images = [];
11
+ contents = [];
12
+ constructor(e, t, n = {}) {
13
+ this.key = e, this.model = t, this.config = n;
14
+ }
15
+ getImages() {
16
+ return this.images;
17
+ }
18
+ getContents() {
19
+ return this.contents;
20
+ }
21
+ addImage(e) {
22
+ return this.images.push(e), this;
23
+ }
24
+ addContent(e) {
25
+ return this.contents.push(e), this;
26
+ }
27
+ addPrompt(e) {
28
+ this.prompt += `\n${e}`;
29
+ }
30
+ resetImages() {
31
+ return this.images = [], this;
32
+ }
33
+ resetContents() {
34
+ return this.contents = [], this;
35
+ }
36
+ resetPrompt() {
37
+ this.prompt = "";
38
+ }
39
+ setKey(e) {
40
+ return this.key = e, this.ai &&= void 0, this;
41
+ }
42
+ setModel(e) {
43
+ return this.model = e, this;
44
+ }
45
+ setConfig(e) {
46
+ return this.config = e, this;
47
+ }
48
+ async generate(e, t = !0, i = 0) {
49
+ if (this.ai || (await this.init(), console.log(`[Ai] Initialized AI client with model: ${this.model}`)), this.ai) {
50
+ let a = 1 + i, o = n(1e3, 2e3);
51
+ for (let n = 1; n <= a; n++) {
52
+ console.log(`[Ai] Generating${a > 1 ? ` (attempt ${n}/${a})` : ""}`);
53
+ try {
54
+ let t = await this.response(this.model, this.getMainContents(e));
55
+ return console.log(`[Ai] End (length: ${t.length})`), t;
56
+ } catch (e) {
57
+ console.error(`[Ai] Generation error (attempt ${n}/${a}):`, e), n < a ? (console.log(`[Ai] Retrying in ${Math.round(o)}ms...`), await r(o), o = Math.round(o * 1.6)) : t && process.exit(1);
58
+ }
59
+ }
60
+ }
61
+ return "";
62
+ }
63
+ getMainContents(e) {
64
+ return `${this.prompt}\n${e}`;
65
+ }
66
+ };
67
+ //#endregion
68
+ //#region src/functions/getConfigAi.ts
69
+ function a() {
70
+ return [
71
+ e.getAiKey(),
72
+ e.getAiModel(),
73
+ e.getAiConfig()
74
+ ];
75
+ }
76
+ //#endregion
77
+ //#region src/classes/Ai/AiClaudeLite.ts
78
+ var o = class extends i {
79
+ async init() {
80
+ let { Anthropic: e } = await import("@anthropic-ai/sdk");
81
+ this.ai = new e({ apiKey: this.key });
82
+ }
83
+ toImages() {
84
+ return t(this.images, (e) => ({
85
+ type: "image",
86
+ source: {
87
+ type: "base64",
88
+ media_type: e.mime,
89
+ data: e.base64
90
+ }
91
+ }));
92
+ }
93
+ toContents() {
94
+ return t(this.contents, (e) => ({
95
+ type: "text",
96
+ text: e
97
+ }));
98
+ }
99
+ async response(e, n) {
100
+ let r = await this.ai?.messages.create({
101
+ model: e,
102
+ max_tokens: this.config.maxTokens ?? 4096,
103
+ messages: [{
104
+ role: "user",
105
+ content: [
106
+ ...this.toImages(),
107
+ ...this.toContents(),
108
+ {
109
+ type: "text",
110
+ text: n
111
+ }
112
+ ]
113
+ }],
114
+ ...this.config
115
+ });
116
+ return r?.content ? t(r.content, (e) => {
117
+ if (e.type === "text" && "text" in e) return e.text;
118
+ }).join("\n") : "";
119
+ }
120
+ }, s = class extends o {
121
+ constructor() {
122
+ super(...a());
123
+ }
124
+ }, c = class extends i {
125
+ async init() {
126
+ let { GoogleGenAI: e } = await import("@google/genai");
127
+ this.ai = new e({ apiKey: this.key });
128
+ }
129
+ toImages() {
130
+ return t(this.images, (e) => ({ inlineData: {
131
+ mimeType: e.mime,
132
+ data: e.base64
133
+ } }));
134
+ }
135
+ toContents() {
136
+ return t(this.contents, (e) => ({ text: e }));
137
+ }
138
+ async response(e, t) {
139
+ return (await this.ai?.models.generateContent({
140
+ model: e,
141
+ contents: [...this.toImages(), { parts: [...this.toContents(), { text: t }] }],
142
+ config: this.config
143
+ }))?.text ?? "";
144
+ }
145
+ }, l = class extends c {
146
+ constructor() {
147
+ super(...a());
148
+ }
149
+ }, u = class extends i {
150
+ async init() {
151
+ let { OpenAI: e } = await import("openai");
152
+ this.ai = new e({ apiKey: this.key });
153
+ }
154
+ toImages() {
155
+ return t(this.images, (e) => ({
156
+ type: "image_url",
157
+ image_url: { url: `data:${e.mime};base64,${e.base64}` }
158
+ }));
159
+ }
160
+ toContents() {
161
+ return t(this.contents, (e) => ({
162
+ type: "text",
163
+ text: e
164
+ }));
165
+ }
166
+ async response(e, t) {
167
+ return console.log("asd", this.ai?.baseURL, JSON.stringify({
168
+ model: e,
169
+ messages: [{
170
+ role: "user",
171
+ content: [
172
+ ...this.toImages(),
173
+ ...this.toContents(),
174
+ {
175
+ type: "text",
176
+ text: t
177
+ }
178
+ ]
179
+ }],
180
+ ...this.config
181
+ })), (await this.ai?.chat.completions.create({
182
+ model: e,
183
+ messages: [{
184
+ role: "user",
185
+ content: [
186
+ ...this.toImages(),
187
+ ...this.toContents(),
188
+ {
189
+ type: "text",
190
+ text: t
191
+ }
192
+ ]
193
+ }],
194
+ ...this.config
195
+ }))?.choices?.[0]?.message?.content ?? "";
196
+ }
197
+ }, d = class extends u {
198
+ constructor() {
199
+ super(...a());
200
+ }
201
+ }, f = class extends i {
202
+ async init() {
203
+ let { createXai: e } = await import("@ai-sdk/xai");
204
+ this.ai = e({ apiKey: this.key });
205
+ }
206
+ toImages() {
207
+ return t(this.images, (e) => ({
208
+ type: "image",
209
+ image: `data:${e.mime};base64,${e.base64}`
210
+ }));
211
+ }
212
+ toContents() {
213
+ return t(this.contents, (e) => ({
214
+ type: "text",
215
+ text: e
216
+ }));
217
+ }
218
+ async response(e, t) {
219
+ let { generateText: n } = await import("ai"), { createXai: r } = await import("@ai-sdk/xai"), i = this.ai ?? r({ apiKey: this.key }), a = e || "grok-4.5", { text: o } = await n({
220
+ model: i.responses(a),
221
+ prompt: t,
222
+ ...this.config
223
+ });
224
+ return o ?? "";
225
+ }
226
+ }, p = class extends f {
227
+ constructor() {
228
+ super(...a());
229
+ }
230
+ };
231
+ //#endregion
232
+ export { l as a, o as c, u as i, a as l, f as n, c as o, d as r, s, p as t, i as u };