@dxtmisha/scripts 0.7.2 → 0.7.7
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/bin/design-wiki-storm.ts +9 -0
- package/package.json +5 -3
- package/src/classes/Ai/AiAbstract.ts +14 -1
- package/src/classes/Ai/AiGoogleLite.ts +2 -1
- package/src/classes/Build/__tests__/buildFunctional.test.ts +43 -0
- package/src/classes/Build/buildFunctional.ts +15 -0
- package/src/classes/Component/ComponentCreator.ts +1 -0
- package/src/classes/Component/ComponentItem.ts +15 -0
- package/src/classes/Component/ComponentWiki.ts +8 -0
- package/src/classes/Component/ComponentWikiFile.ts +2 -0
- package/src/classes/Component/__tests__/ComponentCreator.test.ts +71 -0
- package/src/classes/Component/__tests__/ComponentItem.test.ts +71 -0
- package/src/classes/Design/DesignCommand.ts +15 -14
- package/src/classes/Design/DesignComponent.ts +235 -28
- package/src/classes/Design/DesignConstructor.ts +9 -5
- package/src/classes/Design/DesignConstructors.ts +8 -4
- package/src/classes/Design/DesignFlags.ts +16 -0
- package/src/classes/Design/DesignReplace.ts +10 -6
- package/src/classes/Design/DesignStructure.ts +8 -6
- package/src/classes/Design/DesignStructureClasses.ts +8 -4
- package/src/classes/Design/DesignStructureItemAbstract.ts +11 -2
- package/src/classes/Design/DesignStructureRead.ts +8 -4
- package/src/classes/Design/DesignStructureStyles.ts +8 -4
- package/src/classes/Design/DesignTypes.ts +53 -28
- package/src/classes/Design/DesignTypescript.ts +11 -2
- package/src/classes/Design/DesignUi.ts +42 -11
- package/src/classes/Design/DesignWiki.ts +4 -6
- package/src/classes/Design/DesignWikiStorm.ts +94 -0
- package/src/classes/Design/DesignWikiStormItem.ts +246 -0
- package/src/classes/Git/GitRead.ts +1 -0
- package/src/classes/Git/__tests__/GitRead.test.ts +70 -0
- package/src/classes/Library/LibraryAiWiki.ts +2 -1
- package/src/classes/Library/LibraryFlags.ts +9 -7
- package/src/classes/Library/LibraryItems.ts +9 -9
- package/src/classes/Library/LibraryList.ts +10 -5
- package/src/classes/Library/LibraryMedia.ts +21 -6
- package/src/classes/Library/LibraryPlugin.ts +8 -5
- package/src/classes/Library/LibraryTypes.ts +34 -10
- package/src/classes/Package/PackageInit.ts +12 -4
- package/src/classes/Package/PackageItem.ts +13 -4
- package/src/classes/Properties/Properties.ts +14 -3
- package/src/classes/Properties/PropertiesCache.ts +19 -20
- package/src/classes/Properties/PropertiesConfig.ts +39 -28
- package/src/classes/Properties/PropertiesConvector.ts +10 -6
- package/src/classes/Properties/PropertiesFile.ts +22 -28
- package/src/classes/Properties/PropertiesImport.ts +10 -7
- package/src/classes/Properties/PropertiesItems.ts +19 -12
- package/src/classes/Properties/PropertiesKeys.ts +15 -9
- package/src/classes/Properties/PropertiesMain.ts +13 -7
- package/src/classes/Properties/PropertiesPalette.ts +12 -6
- package/src/classes/Properties/PropertiesPath.ts +17 -11
- package/src/classes/Properties/PropertiesScss.ts +10 -8
- package/src/classes/Properties/PropertiesSeparator.ts +9 -11
- package/src/classes/Properties/PropertiesSettings.ts +8 -6
- package/src/classes/Properties/PropertiesStandard.ts +5 -6
- package/src/classes/Properties/PropertiesTool.ts +16 -9
- package/src/classes/Properties/PropertiesTypes.ts +12 -12
- package/src/classes/Properties/PropertiesValues.ts +14 -14
- package/src/classes/Properties/PropertiesWrap.ts +5 -6
- package/src/classes/Properties/convector/convectorColor.ts +5 -3
- package/src/classes/Properties/to/PropertiesToAbstract.ts +18 -4
- package/src/composables/__tests__/useAi.test.ts +75 -0
- package/src/config.ts +2 -0
- package/src/functions/__tests__/getComponentPaths.test.ts +19 -0
- package/src/functions/__tests__/getConfigAi.test.ts +26 -0
- package/src/functions/__tests__/getConstructorProperties.test.ts +51 -0
- package/src/functions/__tests__/getDirname.test.ts +31 -0
- package/src/functions/__tests__/getNameDirByPaths.test.ts +40 -0
- package/src/functions/__tests__/getPackageJson.test.ts +34 -0
- package/src/functions/__tests__/hasNativeDirname.test.ts +18 -0
- package/src/functions/__tests__/toPathStandardSep.test.ts +31 -0
- package/src/functions/getConfigAi.ts +3 -2
- package/src/functions/toPathStandardSep.ts +1 -1
- package/src/library-ai.ts +0 -1
- package/src/library.ts +6 -0
- package/src/media/properties/css.ts +3 -1
- package/src/media/templates/component/props.ts +1 -1
- package/src/media/templates/component/wiki.ts +6 -12
- package/src/media/templates/component/wikiData.ts +28 -0
- package/src/media/templates/packages/figma/README.md +1 -0
- package/src/media/templates/packages/figma/ai.sample.config.ts +2 -0
- package/src/media/templates/packages/figma/design.config.json +3 -0
- package/src/media/templates/packages/figma/index.html +12 -0
- package/src/media/templates/packages/figma/manifest.json +25 -0
- package/src/media/templates/packages/figma/package.json +37 -0
- package/src/media/templates/packages/figma/src/App.vue +9 -0
- package/src/media/templates/packages/figma/src/classes/_.gitignore.txt +1 -0
- package/src/media/templates/packages/figma/src/code.ts +16 -0
- package/src/media/templates/packages/figma/src/components/_.gitignore.txt +1 -0
- package/src/media/templates/packages/figma/src/composables/_.gitignore.txt +1 -0
- package/src/media/templates/packages/figma/src/config.ts +0 -0
- package/src/media/templates/packages/figma/src/functions/_.gitignore.txt +1 -0
- package/src/media/templates/packages/figma/src/library.ts +0 -0
- package/src/media/templates/packages/figma/src/main.ts +4 -0
- package/src/media/templates/packages/figma/src/media/_.gitignore.txt +1 -0
- package/src/media/templates/packages/figma/src/storybook/_.gitignore.txt +1 -0
- package/src/media/templates/packages/figma/src/types/_.gitignore.txt +1 -0
- package/src/media/templates/packages/figma/src/vite-env.d.ts +1 -0
- package/src/media/templates/packages/figma/tsconfig.app.json +12 -0
- package/src/media/templates/packages/figma/tsconfig.json +7 -0
- package/src/media/templates/packages/figma/tsconfig.node.json +8 -0
- package/src/media/templates/packages/figma/vite.config.ts +7 -0
- package/src/types/configTypes.ts +3 -0
- package/src/types/webTypes.ts +105 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { describe, expect, it, vi, beforeEach } from 'vitest'
|
|
2
|
+
import { getNameDirByPaths } from '../getNameDirByPaths'
|
|
3
|
+
import { PropertiesFile } from '../../classes/Properties/PropertiesFile'
|
|
4
|
+
|
|
5
|
+
vi.mock('../../classes/Properties/PropertiesFile', () => ({
|
|
6
|
+
PropertiesFile: {
|
|
7
|
+
splitForDir: vi.fn(),
|
|
8
|
+
joinPath: vi.fn()
|
|
9
|
+
}
|
|
10
|
+
}))
|
|
11
|
+
|
|
12
|
+
describe('getNameDirByPaths', () => {
|
|
13
|
+
beforeEach(() => {
|
|
14
|
+
vi.clearAllMocks()
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
it('should return the last directory name from provided paths', () => {
|
|
18
|
+
const mockPaths = ['src', 'components', 'button']
|
|
19
|
+
const mockJoinedPath = 'src/components/button'
|
|
20
|
+
const mockSplitDirs = ['src', 'components', 'button']
|
|
21
|
+
|
|
22
|
+
vi.mocked(PropertiesFile.joinPath).mockReturnValue(mockJoinedPath)
|
|
23
|
+
vi.mocked(PropertiesFile.splitForDir).mockReturnValue(mockSplitDirs)
|
|
24
|
+
|
|
25
|
+
const result = getNameDirByPaths(mockPaths)
|
|
26
|
+
|
|
27
|
+
expect(result).toBe('button')
|
|
28
|
+
expect(PropertiesFile.joinPath).toHaveBeenCalledWith(mockPaths)
|
|
29
|
+
expect(PropertiesFile.splitForDir).toHaveBeenCalledWith(mockJoinedPath)
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
it('should work with a single path segment', () => {
|
|
33
|
+
const mockPaths = ['root']
|
|
34
|
+
vi.mocked(PropertiesFile.joinPath).mockReturnValue('root')
|
|
35
|
+
vi.mocked(PropertiesFile.splitForDir).mockReturnValue(['root'])
|
|
36
|
+
|
|
37
|
+
const result = getNameDirByPaths(mockPaths)
|
|
38
|
+
expect(result).toBe('root')
|
|
39
|
+
})
|
|
40
|
+
})
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { describe, expect, it, vi, beforeEach } from 'vitest'
|
|
2
|
+
import { getPackageJson } from '../getPackageJson'
|
|
3
|
+
import { PropertiesFile } from '../../classes/Properties/PropertiesFile'
|
|
4
|
+
import { UI_FILE_PACKAGE } from '../../config'
|
|
5
|
+
|
|
6
|
+
vi.mock('../../classes/Properties/PropertiesFile', () => ({
|
|
7
|
+
PropertiesFile: {
|
|
8
|
+
readFile: vi.fn()
|
|
9
|
+
}
|
|
10
|
+
}))
|
|
11
|
+
|
|
12
|
+
describe('getPackageJson', () => {
|
|
13
|
+
beforeEach(() => {
|
|
14
|
+
vi.clearAllMocks()
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
it('should return package.json content via PropertiesFile.readFile', () => {
|
|
18
|
+
const mockContent = { name: 'test-package', version: '1.0.0' }
|
|
19
|
+
vi.mocked(PropertiesFile.readFile).mockReturnValue(mockContent)
|
|
20
|
+
|
|
21
|
+
const result = getPackageJson()
|
|
22
|
+
|
|
23
|
+
expect(result).toEqual(mockContent)
|
|
24
|
+
expect(PropertiesFile.readFile).toHaveBeenCalledWith(UI_FILE_PACKAGE)
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
it('should return undefined if file reading fails', () => {
|
|
28
|
+
vi.mocked(PropertiesFile.readFile).mockReturnValue(undefined)
|
|
29
|
+
|
|
30
|
+
const result = getPackageJson()
|
|
31
|
+
|
|
32
|
+
expect(result).toBeUndefined()
|
|
33
|
+
})
|
|
34
|
+
})
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import { hasNativeDirname } from '../hasNativeDirname'
|
|
3
|
+
|
|
4
|
+
describe('hasNativeDirname', () => {
|
|
5
|
+
it('should return a boolean', () => {
|
|
6
|
+
const result = hasNativeDirname()
|
|
7
|
+
expect(typeof result).toBe('boolean')
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
it('it should return true if __dirname is defined', () => {
|
|
11
|
+
// In vitest/node environment, __dirname is usually defined
|
|
12
|
+
// We can't easily "un-define" it for a negative test without complex environment manipulation,
|
|
13
|
+
// but we can verify it returns true if it's there
|
|
14
|
+
if (typeof __dirname !== 'undefined') {
|
|
15
|
+
expect(hasNativeDirname()).toBe(true)
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
})
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { describe, expect, it, vi, beforeEach } from 'vitest'
|
|
2
|
+
import { toPathStandardSep } from '../toPathStandardSep'
|
|
3
|
+
import requirePath from 'path'
|
|
4
|
+
|
|
5
|
+
vi.mock('path', async (importOriginal) => {
|
|
6
|
+
const actual = await importOriginal<typeof import('path')>()
|
|
7
|
+
return {
|
|
8
|
+
...actual,
|
|
9
|
+
default: {
|
|
10
|
+
...actual,
|
|
11
|
+
sep: '/'
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
describe('toPathStandardSep', () => {
|
|
17
|
+
beforeEach(() => {
|
|
18
|
+
vi.clearAllMocks()
|
|
19
|
+
vi.mocked(requirePath).sep = '/'
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
it('should replace all forward slashes with the platform-specific separator', () => {
|
|
23
|
+
vi.mocked(requirePath).sep = '\\'
|
|
24
|
+
expect(toPathStandardSep('src/components/button')).toBe('src\\components\\button')
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
it('should not change the path if it already uses the correct separator (unix)', () => {
|
|
28
|
+
vi.mocked(requirePath).sep = '/'
|
|
29
|
+
expect(toPathStandardSep('src/components/button')).toBe('src/components/button')
|
|
30
|
+
})
|
|
31
|
+
})
|
|
@@ -5,9 +5,10 @@ import { PropertiesConfig } from '../classes/Properties/PropertiesConfig'
|
|
|
5
5
|
*
|
|
6
6
|
* Возвращает конфигурацию ИИ: API ключ и модель.
|
|
7
7
|
*/
|
|
8
|
-
export function getConfigAi(): [string, string] {
|
|
8
|
+
export function getConfigAi(): [string, string, Record<string, any>] {
|
|
9
9
|
return [
|
|
10
10
|
PropertiesConfig.getAiKey(),
|
|
11
|
-
PropertiesConfig.getAiModel()
|
|
11
|
+
PropertiesConfig.getAiModel(),
|
|
12
|
+
PropertiesConfig.getAiConfig()
|
|
12
13
|
]
|
|
13
14
|
}
|
|
@@ -10,5 +10,5 @@ import requirePath from 'path'
|
|
|
10
10
|
* @returns The path with standard separators/ Путь со стандартными разделителями
|
|
11
11
|
*/
|
|
12
12
|
export function toPathStandardSep(path: string): string {
|
|
13
|
-
return path.replace(
|
|
13
|
+
return path.replace(/\//g, requirePath.sep)
|
|
14
14
|
}
|
package/src/library-ai.ts
CHANGED
package/src/library.ts
CHANGED
|
@@ -14,10 +14,15 @@ export * from './classes/Build/buildFunctional'
|
|
|
14
14
|
export * from './classes/BuildItem'
|
|
15
15
|
export * from './classes/Design/DesignTypes'
|
|
16
16
|
export * from './classes/Design/DesignTypescript'
|
|
17
|
+
export * from './classes/Design/DesignWikiStorm'
|
|
18
|
+
export * from './classes/Design/DesignWikiStormItem'
|
|
17
19
|
export * from './classes/Git/GitRead'
|
|
20
|
+
export * from './classes/Library/LibraryAiWiki'
|
|
21
|
+
export * from './classes/Library/LibraryAiWikiItem'
|
|
18
22
|
export * from './classes/Library/LibraryExport'
|
|
19
23
|
export * from './classes/Library/LibraryList'
|
|
20
24
|
export * from './classes/Library/LibraryPlugin'
|
|
25
|
+
export * from './classes/Library/LibraryTypes'
|
|
21
26
|
export * from './classes/Properties/PropertiesFile'
|
|
22
27
|
|
|
23
28
|
// Composables
|
|
@@ -36,3 +41,4 @@ export * from './types/designTypes'
|
|
|
36
41
|
export * from './types/gitTypes'
|
|
37
42
|
export * from './types/libraryTypes'
|
|
38
43
|
export * from './types/propertyTypes'
|
|
44
|
+
export * from './types/webTypes'
|
|
@@ -159,7 +159,9 @@ export const cssSizing: string[] = [
|
|
|
159
159
|
'min-inline-size',
|
|
160
160
|
'max-inline-size',
|
|
161
161
|
|
|
162
|
-
'tab-size' // используется для настройки ширины символа табуляции
|
|
162
|
+
'tab-size', // используется для настройки ширины символа табуляции
|
|
163
|
+
|
|
164
|
+
'field-sizing'
|
|
163
165
|
]
|
|
164
166
|
|
|
165
167
|
export const cssContent: string[] = [
|
|
@@ -13,7 +13,7 @@ type PropsToken = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Type describing incoming properties/ Тип, описывающий входящие свойства
|
|
15
15
|
*/
|
|
16
|
-
export type ComponentProps = /* :component.once
|
|
16
|
+
export type ComponentProps = /* :component.once ComponentPropsBasic & */ PropsToken
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Default value for property/ Значение по умолчанию для свойства
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
// :component.once import {
|
|
1
|
+
// :component.once import { WikiStorybook } from '@dxtmisha/wiki/lite'
|
|
2
2
|
// :component.once import { wiki, wikiDescriptions } from '@dxtmisha/wiki/media'
|
|
3
3
|
|
|
4
|
-
// :component.once import {
|
|
5
|
-
// :component.once import { defaults } from './props'
|
|
6
|
-
|
|
7
|
-
// :component.once const propsNames: StorybookProps = [
|
|
8
|
-
// :component.once // :propsList [!] System label / Системная метка
|
|
9
|
-
// :component.once // :propsList [!] System label / Системная метка
|
|
10
|
-
// :component.once ]
|
|
4
|
+
// :component.once import { ComponentWikiData } from './wikiData'
|
|
11
5
|
|
|
12
6
|
// :component.once export const ComponentWikiStorybook = new WikiStorybook(
|
|
13
|
-
// :component.once
|
|
14
|
-
// :component.once
|
|
15
|
-
// :component.once defaults,
|
|
16
|
-
// :component.once
|
|
7
|
+
// :component.once ComponentWikiData.component,
|
|
8
|
+
// :component.once ComponentWikiData.props,
|
|
9
|
+
// :component.once ComponentWikiData.defaults,
|
|
10
|
+
// :component.once ComponentWikiData.wikiDesign,
|
|
17
11
|
// :component.once wiki,
|
|
18
12
|
// :component.once wikiDescriptions
|
|
19
13
|
// :component.once )
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// :component.once import { type StorybookProps, type StorybookSlots, type WikiDataItem } from '@dxtmisha/wiki/lite'
|
|
2
|
+
|
|
3
|
+
// :component.once import { wiki[Design] } from '../../../wiki/wiki'
|
|
4
|
+
// :component.once import { defaults } from './props'
|
|
5
|
+
|
|
6
|
+
// :component.once const propsNames: StorybookProps = [
|
|
7
|
+
// :component.once // :propsList [!] System label / Системная метка
|
|
8
|
+
// :component.once // :propsList [!] System label / Системная метка
|
|
9
|
+
// :component.once ]
|
|
10
|
+
|
|
11
|
+
// :component.once const slotsNames: StorybookSlots = [
|
|
12
|
+
// :component.once // :slotsList [!] System label / Системная метка
|
|
13
|
+
// :component.once // :slotsList [!] System label / Системная метка
|
|
14
|
+
// :component.once ]
|
|
15
|
+
|
|
16
|
+
// :component.once const eventsNames: StorybookSlots = [
|
|
17
|
+
// :component.once // :eventsList [!] System label / Системная метка
|
|
18
|
+
// :component.once // :eventsList [!] System label / Системная метка
|
|
19
|
+
// :component.once ]
|
|
20
|
+
|
|
21
|
+
// :component.once export const ComponentWikiData: WikiDataItem = {
|
|
22
|
+
// :component.once component: 'Component',
|
|
23
|
+
// :component.once props: propsNames,
|
|
24
|
+
// :component.once slots: slotsNames,
|
|
25
|
+
// :component.once events: eventsNames,
|
|
26
|
+
// :component.once defaults,
|
|
27
|
+
// :component.once wikiDesign: wiki[Design]
|
|
28
|
+
// :component.once }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# @packages/library
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8"/>
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
6
|
+
<title>@packages/library</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="app"></div>
|
|
10
|
+
<script type="module" src="/src/main.ts"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@packages/library",
|
|
3
|
+
"id": "--",
|
|
4
|
+
"api": "0.0.0",
|
|
5
|
+
"main": "dist/code.js",
|
|
6
|
+
"capabilities": [
|
|
7
|
+
"codegen",
|
|
8
|
+
"inspect"
|
|
9
|
+
],
|
|
10
|
+
"enableProposedApi": false,
|
|
11
|
+
"documentAccess": "dynamic-page",
|
|
12
|
+
"editorType": [
|
|
13
|
+
"dev"
|
|
14
|
+
],
|
|
15
|
+
"ui": "dist/index.html",
|
|
16
|
+
"codegenLanguages": [
|
|
17
|
+
{
|
|
18
|
+
"label": "Language Label",
|
|
19
|
+
"value": "language-value"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"networkAccess": {
|
|
23
|
+
"allowedDomains": []
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@packages/library",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "[description]",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "vite",
|
|
9
|
+
"build": "vue-tsc -b && vite build --mode ui && vite build --mode code",
|
|
10
|
+
"build:ui:watch": "vue-tsc -b && vite build --mode ui --watch",
|
|
11
|
+
"build:code:watch": "vue-tsc -b && vite build --mode code --watch",
|
|
12
|
+
"preview": "vite preview",
|
|
13
|
+
"test": "vitest",
|
|
14
|
+
"component": "dxt-component",
|
|
15
|
+
"library": "dxt-library",
|
|
16
|
+
"wiki": "dxt-ai-doc src/storybook"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md",
|
|
21
|
+
"package.json"
|
|
22
|
+
],
|
|
23
|
+
"main": "dist/library.js",
|
|
24
|
+
"module": "dist/library.js",
|
|
25
|
+
"types": "dist/library.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"import": "./dist/library.js",
|
|
29
|
+
"types": "./dist/library.d.ts"
|
|
30
|
+
},
|
|
31
|
+
"./style.css": "./dist/style.css",
|
|
32
|
+
"./types/*": "./dist/*",
|
|
33
|
+
"./types/**/*.d.ts": "./dist/**/*.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {},
|
|
36
|
+
"devDependencies": {}
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Delete me
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
switch (figma.mode) {
|
|
2
|
+
case 'inspect':
|
|
3
|
+
figma.showUI(__html__)
|
|
4
|
+
break
|
|
5
|
+
case 'codegen':
|
|
6
|
+
figma.codegen.on('generate', async () => {
|
|
7
|
+
return [
|
|
8
|
+
{
|
|
9
|
+
title: 'Test generate',
|
|
10
|
+
language: 'PLAINTEXT',
|
|
11
|
+
code: 'code test'
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
})
|
|
15
|
+
break
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Delete me
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Delete me
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Delete me
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Delete me
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Delete me
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Delete me
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@dxtmisha/configuration/tsconfig/tsconfig.app.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
5
|
+
"types": ["@figma/plugin-typings"]
|
|
6
|
+
},
|
|
7
|
+
"include": [
|
|
8
|
+
"src/**/*.ts",
|
|
9
|
+
"src/**/*.tsx",
|
|
10
|
+
"src/**/*.vue"
|
|
11
|
+
]
|
|
12
|
+
}
|
package/src/types/configTypes.ts
CHANGED
|
@@ -53,4 +53,7 @@ export type DesignUiConfig = {
|
|
|
53
53
|
|
|
54
54
|
/** Paths to Storybook for AI documentation generation / Пути к Storybook для генерации AI документации */
|
|
55
55
|
aiDocStorybookPath?: string
|
|
56
|
+
|
|
57
|
+
/** AI configuration object / Объект конфигурации ИИ */
|
|
58
|
+
aiConfig?: Record<string, any>
|
|
56
59
|
}
|
|
@@ -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
|
+
}
|