@dxtmisha/scripts 0.6.3 → 0.7.6

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 (121) hide show
  1. package/bin/ai-doc.ts +1 -3
  2. package/bin/build-functional.ts +5 -0
  3. package/bin/design-flags.ts +5 -0
  4. package/bin/design-wiki-storm.ts +9 -0
  5. package/package.json +14 -8
  6. package/src/classes/Ai/AiAbstract.ts +14 -1
  7. package/src/classes/Ai/AiGoogleLite.ts +2 -1
  8. package/src/classes/Build/__tests__/buildFunctional.test.ts +43 -0
  9. package/src/classes/Build/buildFunctional.ts +54 -0
  10. package/src/classes/Component/ComponentCreator.ts +1 -0
  11. package/src/classes/Component/ComponentItem.ts +15 -0
  12. package/src/classes/Component/ComponentWiki.ts +8 -0
  13. package/src/classes/Component/ComponentWikiFile.ts +2 -0
  14. package/src/classes/Component/__tests__/ComponentCreator.test.ts +71 -0
  15. package/src/classes/Component/__tests__/ComponentItem.test.ts +71 -0
  16. package/src/classes/Design/DesignCommand.ts +65 -10
  17. package/src/classes/Design/DesignComponent.ts +303 -39
  18. package/src/classes/Design/DesignConstructor.ts +49 -20
  19. package/src/classes/Design/DesignConstructors.ts +61 -2
  20. package/src/classes/Design/DesignFlags.ts +215 -0
  21. package/src/classes/Design/DesignReplace.ts +11 -7
  22. package/src/classes/Design/DesignStructure.ts +8 -6
  23. package/src/classes/Design/DesignStructureClasses.ts +8 -4
  24. package/src/classes/Design/DesignStructureItemAbstract.ts +11 -2
  25. package/src/classes/Design/DesignStructureRead.ts +8 -4
  26. package/src/classes/Design/DesignStructureStyles.ts +8 -4
  27. package/src/classes/Design/DesignTypes.ts +53 -28
  28. package/src/classes/Design/DesignTypescript.ts +11 -2
  29. package/src/classes/Design/DesignUi.ts +74 -4
  30. package/src/classes/Design/DesignWiki.ts +4 -6
  31. package/src/classes/Design/DesignWikiStorm.ts +94 -0
  32. package/src/classes/Design/DesignWikiStormItem.ts +246 -0
  33. package/src/classes/Git/GitRead.ts +1 -0
  34. package/src/classes/Git/__tests__/GitRead.test.ts +70 -0
  35. package/src/classes/Library/LibraryAiWiki.ts +127 -0
  36. package/src/classes/Library/LibraryAiWikiItem.ts +79 -0
  37. package/src/classes/Library/LibraryExport.ts +0 -2
  38. package/src/classes/Library/LibraryFlags.ts +9 -7
  39. package/src/classes/Library/LibraryItems.ts +22 -13
  40. package/src/classes/Library/LibraryList.ts +189 -0
  41. package/src/classes/Library/LibraryMedia.ts +22 -8
  42. package/src/classes/Library/LibraryPlugin.ts +73 -0
  43. package/src/classes/Library/LibraryTypes.ts +130 -0
  44. package/src/classes/Package/PackageInit.ts +12 -4
  45. package/src/classes/Package/PackageItem.ts +16 -5
  46. package/src/classes/Properties/Properties.ts +14 -3
  47. package/src/classes/Properties/PropertiesCache.ts +19 -20
  48. package/src/classes/Properties/PropertiesConfig.ts +46 -26
  49. package/src/classes/Properties/PropertiesConvector.ts +10 -6
  50. package/src/classes/Properties/PropertiesFile.ts +27 -31
  51. package/src/classes/Properties/PropertiesImport.ts +10 -7
  52. package/src/classes/Properties/PropertiesItems.ts +19 -12
  53. package/src/classes/Properties/PropertiesKeys.ts +15 -9
  54. package/src/classes/Properties/PropertiesMain.ts +13 -7
  55. package/src/classes/Properties/PropertiesPalette.ts +12 -6
  56. package/src/classes/Properties/PropertiesPath.ts +17 -11
  57. package/src/classes/Properties/PropertiesScss.ts +10 -8
  58. package/src/classes/Properties/PropertiesSeparator.ts +9 -11
  59. package/src/classes/Properties/PropertiesSettings.ts +8 -6
  60. package/src/classes/Properties/PropertiesStandard.ts +5 -6
  61. package/src/classes/Properties/PropertiesTool.ts +16 -9
  62. package/src/classes/Properties/PropertiesTypes.ts +12 -12
  63. package/src/classes/Properties/PropertiesValues.ts +14 -14
  64. package/src/classes/Properties/PropertiesWrap.ts +5 -6
  65. package/src/classes/Properties/convector/convectorColor.ts +5 -3
  66. package/src/classes/Properties/to/PropertiesToAbstract.ts +18 -4
  67. package/src/classes/Styles/Styles.ts +1 -0
  68. package/src/composables/__tests__/useAi.test.ts +75 -0
  69. package/src/config.ts +9 -0
  70. package/src/functions/__tests__/getComponentPaths.test.ts +19 -0
  71. package/src/functions/__tests__/getConfigAi.test.ts +26 -0
  72. package/src/functions/__tests__/getConstructorProperties.test.ts +51 -0
  73. package/src/functions/__tests__/getDirname.test.ts +31 -0
  74. package/src/functions/__tests__/getNameDirByPaths.test.ts +40 -0
  75. package/src/functions/__tests__/getPackageJson.test.ts +34 -0
  76. package/src/functions/__tests__/hasNativeDirname.test.ts +18 -0
  77. package/src/functions/__tests__/toPathStandardSep.test.ts +31 -0
  78. package/src/functions/getConfigAi.ts +3 -2
  79. package/src/functions/toPathStandardSep.ts +1 -1
  80. package/src/library-ai.ts +0 -1
  81. package/src/library.ts +10 -0
  82. package/src/media/properties/css.ts +3 -1
  83. package/src/media/templates/component/{DesignComponentWikiAi.vue → DesignComponentAiWiki.vue} +2 -2
  84. package/src/media/templates/component/props.ts +2 -3
  85. package/src/media/templates/component/styleToken.scss +1 -1
  86. package/src/media/templates/component/wiki.ts +6 -12
  87. package/src/media/templates/component/wikiData.ts +28 -0
  88. package/src/media/templates/constructors/props.ts +3 -4
  89. package/src/media/templates/packages/figma/README.md +1 -0
  90. package/src/media/templates/packages/figma/ai.sample.config.ts +2 -0
  91. package/src/media/templates/packages/figma/design.config.json +3 -0
  92. package/src/media/templates/packages/figma/index.html +12 -0
  93. package/src/media/templates/packages/figma/manifest.json +25 -0
  94. package/src/media/templates/packages/figma/package.json +37 -0
  95. package/src/media/templates/packages/figma/src/App.vue +9 -0
  96. package/src/media/templates/packages/figma/src/classes/_.gitignore.txt +1 -0
  97. package/src/media/templates/packages/figma/src/code.ts +16 -0
  98. package/src/media/templates/packages/figma/src/components/_.gitignore.txt +1 -0
  99. package/src/media/templates/packages/figma/src/composables/_.gitignore.txt +1 -0
  100. package/src/media/templates/packages/figma/src/functions/_.gitignore.txt +1 -0
  101. package/src/media/templates/packages/figma/src/library.ts +0 -0
  102. package/src/media/templates/packages/figma/src/main.ts +4 -0
  103. package/src/media/templates/packages/figma/src/media/_.gitignore.txt +1 -0
  104. package/src/media/templates/packages/figma/src/storybook/_.gitignore.txt +1 -0
  105. package/src/media/templates/packages/figma/src/types/_.gitignore.txt +1 -0
  106. package/src/media/templates/packages/figma/src/vite-env.d.ts +1 -0
  107. package/src/media/templates/packages/figma/tsconfig.app.json +12 -0
  108. package/src/media/templates/packages/figma/tsconfig.json +7 -0
  109. package/src/media/templates/packages/figma/tsconfig.node.json +8 -0
  110. package/src/media/templates/packages/figma/vite.config.ts +7 -0
  111. package/src/media/templates/packages/library/src/main.ts +1 -1
  112. package/src/media/templates/packages/project/design.config.json +3 -0
  113. package/src/media/templates/packages/project/index.html +1 -2
  114. package/src/media/templates/packages/project/public/_.gitignore.txt +0 -0
  115. package/src/media/templates/packages/project/src/main.ts +2 -1
  116. package/src/media/templates/packages/project/src/vite-env.d.ts +1 -0
  117. package/src/types/configTypes.ts +6 -0
  118. package/src/types/designTypes.ts +12 -0
  119. package/src/types/libraryTypes.ts +1 -1
  120. package/src/types/webTypes.ts +105 -0
  121. /package/src/media/templates/packages/{library/public/_.gitignore.txt → figma/src/config.ts} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { createApp } from 'vue'
2
2
  import App from './App.vue'
3
3
 
4
- import './styles.scss'
4
+ import './style.scss'
5
5
 
6
6
  createApp(App).mount('#app')
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "../../design.config.json"
3
+ }
@@ -2,9 +2,8 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>player</title>
6
+ <title>@packages/library</title>
8
7
  </head>
9
8
  <body>
10
9
  <div id="app"></div>
@@ -1,5 +1,6 @@
1
1
  import { createApp } from 'vue'
2
- import './style.scss'
3
2
  import App from './App.vue'
4
3
 
4
+ import './style.scss'
5
+
5
6
  createApp(App).mount('#app')
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -12,6 +12,9 @@ export type DesignUiConfig = {
12
12
  /** Design system name / Название дизайн-системы */
13
13
  name: string
14
14
 
15
+ /** Alternative names / Альтернативные названия */
16
+ alternativeName?: string[]
17
+
15
18
  /**
16
19
  * Abbreviation symbol, this key will be used to separate into sub-branches /
17
20
  * Символ сокращения, такой ключ будет разделять на под-ветки
@@ -50,4 +53,7 @@ export type DesignUiConfig = {
50
53
 
51
54
  /** Paths to Storybook for AI documentation generation / Пути к Storybook для генерации AI документации */
52
55
  aiDocStorybookPath?: string
56
+
57
+ /** AI configuration object / Объект конфигурации ИИ */
58
+ aiConfig?: Record<string, any>
53
59
  }
@@ -1,5 +1,17 @@
1
1
  import type { PropertyItem } from './propertyTypes'
2
2
 
3
+ /** Item for design flags / Элемент флагов дизайна */
4
+ export type DesignFlagsItem = {
5
+ /** Flag name / Название флага */
6
+ name: string
7
+ /** X coordinate / Координата X */
8
+ x: number
9
+ /** Y coordinate / Координата Y */
10
+ y: number
11
+ }
12
+ /** List of design flags items / Список элементов флагов дизайна */
13
+ export type DesignFlagsList = DesignFlagsItem[]
14
+
3
15
  /** Design structure state with hierarchy and property information / Состояние структуры дизайна с иерархией и информацией о свойствах */
4
16
  export type DesignStructureState = {
5
17
  /** Element index identifier / Идентификатор индекса элемента */
@@ -23,7 +23,7 @@ export type LibraryItem = {
23
23
  }
24
24
 
25
25
  /** List of library items / Список элементов библиотеки */
26
- export type LibraryList = LibraryItem[]
26
+ export type LibraryAll = LibraryItem[]
27
27
 
28
28
  /** Library files item with name, path and file list / Элемент файлов библиотеки с именем, путём и списком файлов */
29
29
  export type LibraryFilesItem = {
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Basic information for a Web Types item.
3
+ *
4
+ * Базовая информация для элемента Web Types.
5
+ */
6
+ export type WebTypesInfo = {
7
+ 'name': string
8
+ 'description'?: string
9
+ 'doc-url'?: string
10
+ }
11
+
12
+ /**
13
+ * Property definition (e.g. for event arguments or slot scope).
14
+ *
15
+ * Определение свойства (например, для аргументов события или области видимости слота).
16
+ */
17
+ export type WebTypesProperty = {
18
+ name: string
19
+ type?: string
20
+ }
21
+ export type WebTypesProperties = WebTypesProperty[]
22
+
23
+ /**
24
+ * Kind of the attribute value.
25
+ *
26
+ * Вид значения атрибута.
27
+ */
28
+ export type WebTypesAttributeKind = 'expression' | 'string'
29
+
30
+ /**
31
+ * Attribute definition for a tag.
32
+ *
33
+ * Определение атрибута для тега.
34
+ */
35
+ export type WebTypesAttributeItem
36
+ = WebTypesInfo
37
+ & {
38
+ default?: string
39
+ value?: {
40
+ kind?: WebTypesAttributeKind
41
+ type?: string
42
+ }
43
+ }
44
+ export type WebTypesAttributes = WebTypesAttributeItem[]
45
+
46
+ /**
47
+ * Event definition for a tag.
48
+ *
49
+ * Определение события для тега.
50
+ */
51
+ export type WebTypesEventItem
52
+ = WebTypesInfo
53
+ & {
54
+ arguments: WebTypesProperties
55
+ }
56
+ export type WebTypesEvents = WebTypesEventItem[]
57
+
58
+ /**
59
+ * Slot definition for a tag.
60
+ *
61
+ * Определение слота для тега.
62
+ */
63
+ export type WebTypesSlotItem
64
+ = WebTypesInfo
65
+ & {
66
+ 'vue-properties'?: WebTypesProperties
67
+ }
68
+ export type WebTypesSlots = WebTypesSlotItem[]
69
+
70
+ /**
71
+ * Tag (component) definition.
72
+ *
73
+ * Определение тега (компонента).
74
+ */
75
+ export type WebTypesTagItem
76
+ = WebTypesInfo
77
+ & {
78
+ source?: {
79
+ module?: string
80
+ symbol?: string
81
+ }
82
+ attributes?: WebTypesAttributes
83
+ events?: WebTypesEvents
84
+ slots?: WebTypesSlots
85
+ }
86
+ export type WebTypesTags = WebTypesTagItem[]
87
+
88
+ /**
89
+ * Root object for Web Types JSON.
90
+ *
91
+ * Корневой объект для JSON Web Types.
92
+ */
93
+ export type WebTypesVueJson = {
94
+ $schema: 'https://json.schemastore.org/web-types'
95
+ framework: 'vue'
96
+ name: string
97
+ version: string
98
+ contributions: {
99
+ html: {
100
+ 'types-syntax': 'typescript'
101
+ 'description-markup': 'markdown'
102
+ 'tags': WebTypesTags
103
+ }
104
+ }
105
+ }